@engrate/components 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -1,51 +1,100 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),ue=require("react"),Jr=require("react-dom");function Qr(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const a=Qr(ue),Rt=Qr(Jr);function df(e,t){const n=a.createContext(t),o=s=>{const{children:i,...l}=s,d=a.useMemo(()=>l,Object.values(l));return c.jsx(n.Provider,{value:d,children:i})};o.displayName=e+"Provider";function r(s){const i=a.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[o,r]}function le(e,t=[]){let n=[];function o(s,i){const l=a.createContext(i),d=n.length;n=[...n,i];const u=p=>{const{scope:g,children:v,...x}=p,m=g?.[e]?.[d]||l,h=a.useMemo(()=>x,Object.values(x));return c.jsx(m.Provider,{value:h,children:v})};u.displayName=s+"Provider";function f(p,g){const v=g?.[e]?.[d]||l,x=a.useContext(v);if(x)return x;if(i!==void 0)return i;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[u,f]}const r=()=>{const s=n.map(i=>a.createContext(i));return function(l){const d=l?.[e]||s;return a.useMemo(()=>({[`__scope${e}`]:{...l,[e]:d}}),[l,d])}};return r.scopeName=e,[o,uf(r,...t)]}function uf(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const i=o.reduce((l,{useScope:d,scopeName:u})=>{const p=d(s)[`__scope${u}`];return{...l,...p}},{});return a.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function lr(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ne(...e){return t=>{let n=!1;const o=e.map(r=>{const s=lr(r,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r<o.length;r++){const s=o[r];typeof s=="function"?s():lr(e[r],null)}}}}function G(...e){return a.useCallback(Ne(...e),e)}function A(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var se=globalThis?.document?a.useLayoutEffect:()=>{},ff=a[" useId ".trim().toString()]||(()=>{}),pf=0;function me(e){const[t,n]=a.useState(ff());return se(()=>{n(o=>o??String(pf++))},[e]),e||(t?`radix-${t}`:"")}var mf=a[" useInsertionEffect ".trim().toString()]||se;function he({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,s,i]=gf({defaultProp:t,onChange:n}),l=e!==void 0,d=l?e:r;{const f=a.useRef(e!==void 0);a.useEffect(()=>{const p=f.current;p!==l&&console.warn(`${o} is changing from ${p?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=l},[l,o])}const u=a.useCallback(f=>{if(l){const p=hf(f)?f(e):f;p!==e&&i.current?.(p)}else s(f)},[l,e,s,i]);return[d,u]}function gf({defaultProp:e,onChange:t}){const[n,o]=a.useState(e),r=a.useRef(n),s=a.useRef(t);return mf(()=>{s.current=t},[t]),a.useEffect(()=>{r.current!==n&&(s.current?.(n),r.current=n)},[n,r]),[n,o,s]}function hf(e){return typeof e=="function"}function vf(e){const t=xf(e),n=a.forwardRef((o,r)=>{const{children:s,...i}=o,l=a.Children.toArray(s),d=l.find(yf);if(d){const u=d.props.children,f=l.map(p=>p===d?a.Children.count(u)>1?a.Children.only(null):a.isValidElement(u)?u.props.children:null:p);return c.jsx(t,{...i,ref:r,children:a.isValidElement(u)?a.cloneElement(u,void 0,f):null})}return c.jsx(t,{...i,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function xf(e){const t=a.forwardRef((n,o)=>{const{children:r,...s}=n;if(a.isValidElement(r)){const i=Cf(r),l=wf(s,r.props);return r.type!==a.Fragment&&(l.ref=o?Ne(o,i):i),a.cloneElement(r,l)}return a.Children.count(r)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var bf=Symbol("radix.slottable");function yf(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===bf}function wf(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...l)=>{const d=s(...l);return r(...l),d}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function Cf(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Sf=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],L=Sf.reduce((e,t)=>{const n=vf(`Primitive.${t}`),o=a.forwardRef((r,s)=>{const{asChild:i,...l}=r,d=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(d,{...l,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function Co(e,t){e&&Rt.flushSync(()=>e.dispatchEvent(t))}function ie(e){const t=a.useRef(e);return a.useEffect(()=>{t.current=e}),a.useMemo(()=>(...n)=>t.current?.(...n),[])}function Rf(e,t=globalThis?.document){const n=ie(e);a.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var Ef="DismissableLayer",no="dismissableLayer.update",Tf="dismissableLayer.pointerDownOutside",Pf="dismissableLayer.focusOutside",cr,es=a.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ze=a.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:i,onDismiss:l,...d}=e,u=a.useContext(es),[f,p]=a.useState(null),g=f?.ownerDocument??globalThis?.document,[,v]=a.useState({}),x=G(t,R=>p(R)),m=Array.from(u.layers),[h]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(h),b=f?m.indexOf(f):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,S=b>=y,E=Mf(R=>{const P=R.target,$=[...u.branches].some(F=>F.contains(P));!S||$||(r?.(R),i?.(R),R.defaultPrevented||l?.())},g),N=Af(R=>{const P=R.target;[...u.branches].some(F=>F.contains(P))||(s?.(R),i?.(R),R.defaultPrevented||l?.())},g);return Rf(R=>{b===u.layers.size-1&&(o?.(R),!R.defaultPrevented&&l&&(R.preventDefault(),l()))},g),a.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(cr=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),dr(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=cr)}},[f,g,n,u]),a.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),dr())},[f,u]),a.useEffect(()=>{const R=()=>v({});return document.addEventListener(no,R),()=>document.removeEventListener(no,R)},[]),c.jsx(L.div,{...d,ref:x,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:A(e.onFocusCapture,N.onFocusCapture),onBlurCapture:A(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:A(e.onPointerDownCapture,E.onPointerDownCapture)})});Ze.displayName=Ef;var Nf="DismissableLayerBranch",ts=a.forwardRef((e,t)=>{const n=a.useContext(es),o=a.useRef(null),r=G(t,o);return a.useEffect(()=>{const s=o.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),c.jsx(L.div,{...e,ref:r})});ts.displayName=Nf;function Mf(e,t=globalThis?.document){const n=ie(e),o=a.useRef(!1),r=a.useRef(()=>{});return a.useEffect(()=>{const s=l=>{if(l.target&&!o.current){let d=function(){ns(Tf,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=d,t.addEventListener("click",r.current,{once:!0})):d()}else t.removeEventListener("click",r.current);o.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function Af(e,t=globalThis?.document){const n=ie(e),o=a.useRef(!1);return a.useEffect(()=>{const r=s=>{s.target&&!o.current&&ns(Pf,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function dr(){const e=new CustomEvent(no);document.dispatchEvent(e)}function ns(e,t,n,{discrete:o}){const r=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?Co(r,s):r.dispatchEvent(s)}var Df=Ze,_f=ts,zn="focusScope.autoFocusOnMount",Gn="focusScope.autoFocusOnUnmount",ur={bubbles:!1,cancelable:!0},If="FocusScope",Et=a.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...i}=e,[l,d]=a.useState(null),u=ie(r),f=ie(s),p=a.useRef(null),g=G(t,m=>d(m)),v=a.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;a.useEffect(()=>{if(o){let m=function(w){if(v.paused||!l)return;const S=w.target;l.contains(S)?p.current=S:je(p.current,{select:!0})},h=function(w){if(v.paused||!l)return;const S=w.relatedTarget;S!==null&&(l.contains(S)||je(p.current,{select:!0}))},y=function(w){if(document.activeElement===document.body)for(const E of w)E.removedNodes.length>0&&je(l)};document.addEventListener("focusin",m),document.addEventListener("focusout",h);const b=new MutationObserver(y);return l&&b.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",h),b.disconnect()}}},[o,l,v.paused]),a.useEffect(()=>{if(l){pr.add(v);const m=document.activeElement;if(!l.contains(m)){const y=new CustomEvent(zn,ur);l.addEventListener(zn,u),l.dispatchEvent(y),y.defaultPrevented||(kf(Ff(os(l)),{select:!0}),document.activeElement===m&&je(l))}return()=>{l.removeEventListener(zn,u),setTimeout(()=>{const y=new CustomEvent(Gn,ur);l.addEventListener(Gn,f),l.dispatchEvent(y),y.defaultPrevented||je(m??document.body,{select:!0}),l.removeEventListener(Gn,f),pr.remove(v)},0)}}},[l,u,f,v]);const x=a.useCallback(m=>{if(!n&&!o||v.paused)return;const h=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(h&&y){const b=m.currentTarget,[w,S]=jf(b);w&&S?!m.shiftKey&&y===S?(m.preventDefault(),n&&je(w,{select:!0})):m.shiftKey&&y===w&&(m.preventDefault(),n&&je(S,{select:!0})):y===b&&m.preventDefault()}},[n,o,v.paused]);return c.jsx(L.div,{tabIndex:-1,...i,ref:g,onKeyDown:x})});Et.displayName=If;function kf(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(je(o,{select:t}),document.activeElement!==n)return}function jf(e){const t=os(e),n=fr(t,e),o=fr(t.reverse(),e);return[n,o]}function os(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function fr(e,t){for(const n of e)if(!Of(n,{upTo:t}))return n}function Of(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function $f(e){return e instanceof HTMLInputElement&&"select"in e}function je(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&$f(e)&&t&&e.select()}}var pr=Lf();function Lf(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=mr(e,t),e.unshift(t)},remove(t){e=mr(e,t),e[0]?.resume()}}}function mr(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function Ff(e){return e.filter(t=>t.tagName!=="A")}var Vf="Portal",Je=a.forwardRef((e,t)=>{const{container:n,...o}=e,[r,s]=a.useState(!1);se(()=>s(!0),[]);const i=n||r&&globalThis?.document?.body;return i?Jr.createPortal(c.jsx(L.div,{...o,ref:t}),i):null});Je.displayName=Vf;function Bf(e,t){return a.useReducer((n,o)=>t[n][o]??n,e)}var fe=e=>{const{present:t,children:n}=e,o=Wf(t),r=typeof n=="function"?n({present:o.isPresent}):a.Children.only(n),s=G(o.ref,zf(r));return typeof n=="function"||o.isPresent?a.cloneElement(r,{ref:s}):null};fe.displayName="Presence";function Wf(e){const[t,n]=a.useState(),o=a.useRef(null),r=a.useRef(e),s=a.useRef("none"),i=e?"mounted":"unmounted",[l,d]=Bf(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return a.useEffect(()=>{const u=$t(o.current);s.current=l==="mounted"?u:"none"},[l]),se(()=>{const u=o.current,f=r.current;if(f!==e){const g=s.current,v=$t(u);e?d("MOUNT"):v==="none"||u?.display==="none"?d("UNMOUNT"):d(f&&g!==v?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,d]),se(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,p=v=>{const m=$t(o.current).includes(CSS.escape(v.animationName));if(v.target===t&&m&&(d("ANIMATION_END"),!r.current)){const h=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},g=v=>{v.target===t&&(s.current=$t(o.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:a.useCallback(u=>{o.current=u?getComputedStyle(u):null,n(u)},[])}}function $t(e){return e?.animationName||"none"}function zf(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Hn=0;function cn(){a.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??gr()),document.body.insertAdjacentElement("beforeend",e[1]??gr()),Hn++,()=>{Hn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Hn--}},[])}function gr(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Re=function(){return Re=Object.assign||function(t){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Re.apply(this,arguments)};function rs(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function Gf(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,s;o<r;o++)(s||!(o in t))&&(s||(s=Array.prototype.slice.call(t,0,o)),s[o]=t[o]);return e.concat(s||Array.prototype.slice.call(t))}var Xt="right-scroll-bar-position",qt="width-before-scroll-bar",Hf="with-scroll-bars-hidden",Uf="--removed-body-scroll-bar-size";function Un(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Kf(e,t){var n=ue.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}})[0];return n.callback=t,n.facade}var Yf=typeof window<"u"?a.useLayoutEffect:a.useEffect,hr=new WeakMap;function Xf(e,t){var n=Kf(null,function(o){return e.forEach(function(r){return Un(r,o)})});return Yf(function(){var o=hr.get(n);if(o){var r=new Set(o),s=new Set(e),i=n.current;r.forEach(function(l){s.has(l)||Un(l,null)}),s.forEach(function(l){r.has(l)||Un(l,i)})}hr.set(n,e)},[e]),n}function qf(e){return e}function Zf(e,t){t===void 0&&(t=qf);var n=[],o=!1,r={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var i=t(s,o);return n.push(i),function(){n=n.filter(function(l){return l!==i})}},assignSyncMedium:function(s){for(o=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(l){return s(l)},filter:function(){return n}}},assignMedium:function(s){o=!0;var i=[];if(n.length){var l=n;n=[],l.forEach(s),i=n}var d=function(){var f=i;i=[],f.forEach(s)},u=function(){return Promise.resolve().then(d)};u(),n={push:function(f){i.push(f),u()},filter:function(f){return i=i.filter(f),n}}}};return r}function Jf(e){e===void 0&&(e={});var t=Zf(null);return t.options=Re({async:!0,ssr:!1},e),t}var ss=function(e){var t=e.sideCar,n=rs(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return a.createElement(o,Re({},n))};ss.isSideCarExport=!0;function Qf(e,t){return e.useMedium(t),ss}var as=Jf(),Kn=function(){},dn=a.forwardRef(function(e,t){var n=a.useRef(null),o=a.useState({onScrollCapture:Kn,onWheelCapture:Kn,onTouchMoveCapture:Kn}),r=o[0],s=o[1],i=e.forwardProps,l=e.children,d=e.className,u=e.removeScrollBar,f=e.enabled,p=e.shards,g=e.sideCar,v=e.noRelative,x=e.noIsolation,m=e.inert,h=e.allowPinchZoom,y=e.as,b=y===void 0?"div":y,w=e.gapMode,S=rs(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=g,N=Xf([n,t]),R=Re(Re({},S),r);return a.createElement(a.Fragment,null,f&&a.createElement(E,{sideCar:as,removeScrollBar:u,shards:p,noRelative:v,noIsolation:x,inert:m,setCallbacks:s,allowPinchZoom:!!h,lockRef:n,gapMode:w}),i?a.cloneElement(a.Children.only(l),Re(Re({},R),{ref:N})):a.createElement(b,Re({},R,{className:d,ref:N}),l))});dn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};dn.classNames={fullWidth:qt,zeroRight:Xt};var ep=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function tp(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ep();return t&&e.setAttribute("nonce",t),e}function np(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function op(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var rp=function(){var e=0,t=null;return{add:function(n){e==0&&(t=tp())&&(np(t,n),op(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},sp=function(){var e=rp();return function(t,n){a.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},is=function(){var e=sp(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},ap={left:0,top:0,right:0,gap:0},Yn=function(e){return parseInt(e||"",10)||0},ip=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[Yn(n),Yn(o),Yn(r)]},lp=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return ap;var t=ip(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},cp=is(),rt="data-scroll-locked",dp=function(e,t,n,o){var r=e.left,s=e.top,i=e.right,l=e.gap;return n===void 0&&(n="margin"),`
2
- .`.concat(Hf,` {
3
- overflow: hidden `).concat(o,`;
4
- padding-right: `).concat(l,"px ").concat(o,`;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react/jsx-runtime"),A=require("react"),mi=require("react-dom");function Ew(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const d=Ew(A),hi=Ew(mi);function Gj(e,t){const r=d.createContext(t),n=i=>{const{children:a,...s}=i,l=d.useMemo(()=>s,Object.values(s));return b.jsx(r.Provider,{value:l,children:a})};n.displayName=e+"Provider";function o(i){const a=d.useContext(r);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[n,o]}function it(e,t=[]){let r=[];function n(i,a){const s=d.createContext(a),l=r.length;r=[...r,a];const c=f=>{const{scope:p,children:v,...g}=f,m=p?.[e]?.[l]||s,h=d.useMemo(()=>g,Object.values(g));return b.jsx(m.Provider,{value:h,children:v})};c.displayName=i+"Provider";function u(f,p){const v=p?.[e]?.[l]||s,g=d.useContext(v);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[c,u]}const o=()=>{const i=r.map(a=>d.createContext(a));return function(s){const l=s?.[e]||i;return d.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[n,qj(o,...t)]}function qj(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=n.reduce((s,{useScope:l,scopeName:c})=>{const f=l(i)[`__scope${c}`];return{...s,...f}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}function Am(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function lr(...e){return t=>{let r=!1;const n=e.map(o=>{const i=Am(o,t);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let o=0;o<n.length;o++){const i=n[o];typeof i=="function"?i():Am(e[o],null)}}}}function oe(...e){return d.useCallback(lr(...e),e)}function U(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),r===!1||!o.defaultPrevented)return t?.(o)}}var et=globalThis?.document?d.useLayoutEffect:()=>{},Yj=d[" useId ".trim().toString()]||(()=>{}),Xj=0;function St(e){const[t,r]=d.useState(Yj());return et(()=>{r(n=>n??String(Xj++))},[e]),e||(t?`radix-${t}`:"")}var Zj=d[" useInsertionEffect ".trim().toString()]||et;function Et({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,i,a]=Jj({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:o;{const u=d.useRef(e!==void 0);d.useEffect(()=>{const f=u.current;f!==s&&console.warn(`${n} is changing from ${f?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=s},[s,n])}const c=d.useCallback(u=>{if(s){const f=Qj(u)?u(e):u;f!==e&&a.current?.(f)}else i(u)},[s,e,i,a]);return[l,c]}function Jj({defaultProp:e,onChange:t}){const[r,n]=d.useState(e),o=d.useRef(r),i=d.useRef(t);return Zj(()=>{i.current=t},[t]),d.useEffect(()=>{o.current!==r&&(i.current?.(r),o.current=r)},[r,o]),[r,n,i]}function Qj(e){return typeof e=="function"}function ek(e){const t=tk(e),r=d.forwardRef((n,o)=>{const{children:i,...a}=n,s=d.Children.toArray(i),l=s.find(nk);if(l){const c=l.props.children,u=s.map(f=>f===l?d.Children.count(c)>1?d.Children.only(null):d.isValidElement(c)?c.props.children:null:f);return b.jsx(t,{...a,ref:o,children:d.isValidElement(c)?d.cloneElement(c,void 0,u):null})}return b.jsx(t,{...a,ref:o,children:i})});return r.displayName=`${e}.Slot`,r}function tk(e){const t=d.forwardRef((r,n)=>{const{children:o,...i}=r;if(d.isValidElement(o)){const a=ik(o),s=ok(i,o.props);return o.type!==d.Fragment&&(s.ref=n?lr(n,a):a),d.cloneElement(o,s)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var rk=Symbol("radix.slottable");function nk(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===rk}function ok(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...s)=>{const l=i(...s);return o(...s),l}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}function ik(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var ak=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ee=ak.reduce((e,t)=>{const r=ek(`Primitive.${t}`),n=d.forwardRef((o,i)=>{const{asChild:a,...s}=o,l=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(l,{...s,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Id(e,t){e&&hi.flushSync(()=>e.dispatchEvent(t))}function ot(e){const t=d.useRef(e);return d.useEffect(()=>{t.current=e}),d.useMemo(()=>(...r)=>t.current?.(...r),[])}function sk(e,t=globalThis?.document){const r=ot(e);d.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var lk="DismissableLayer",pf="dismissableLayer.update",ck="dismissableLayer.pointerDownOutside",uk="dismissableLayer.focusOutside",_m,Cw=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Dn=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,c=d.useContext(Cw),[u,f]=d.useState(null),p=u?.ownerDocument??globalThis?.document,[,v]=d.useState({}),g=oe(t,E=>f(E)),m=Array.from(c.layers),[h]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(h),x=u?m.indexOf(u):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,P=x>=y,O=dk(E=>{const C=E.target,j=[...c.branches].some(D=>D.contains(C));!P||j||(o?.(E),a?.(E),E.defaultPrevented||s?.())},p),S=pk(E=>{const C=E.target;[...c.branches].some(D=>D.contains(C))||(i?.(E),a?.(E),E.defaultPrevented||s?.())},p);return sk(E=>{x===c.layers.size-1&&(n?.(E),!E.defaultPrevented&&s&&(E.preventDefault(),s()))},p),d.useEffect(()=>{if(u)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(_m=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),Tm(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=_m)}},[u,p,r,c]),d.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),Tm())},[u,c]),d.useEffect(()=>{const E=()=>v({});return document.addEventListener(pf,E),()=>document.removeEventListener(pf,E)},[]),b.jsx(ee.div,{...l,ref:g,style:{pointerEvents:w?P?"auto":"none":void 0,...e.style},onFocusCapture:U(e.onFocusCapture,S.onFocusCapture),onBlurCapture:U(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:U(e.onPointerDownCapture,O.onPointerDownCapture)})});Dn.displayName=lk;var fk="DismissableLayerBranch",Aw=d.forwardRef((e,t)=>{const r=d.useContext(Cw),n=d.useRef(null),o=oe(t,n);return d.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),b.jsx(ee.div,{...e,ref:o})});Aw.displayName=fk;function dk(e,t=globalThis?.document){const r=ot(e),n=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const i=s=>{if(s.target&&!n.current){let l=function(){_w(ck,r,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function pk(e,t=globalThis?.document){const r=ot(e),n=d.useRef(!1);return d.useEffect(()=>{const o=i=>{i.target&&!n.current&&_w(uk,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Tm(){const e=new CustomEvent(pf);document.dispatchEvent(e)}function _w(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?Id(o,i):o.dispatchEvent(i)}var vk=Dn,mk=Aw,bc="focusScope.autoFocusOnMount",xc="focusScope.autoFocusOnUnmount",Mm={bubbles:!1,cancelable:!0},hk="FocusScope",gi=d.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,l]=d.useState(null),c=ot(o),u=ot(i),f=d.useRef(null),p=oe(t,m=>l(m)),v=d.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;d.useEffect(()=>{if(n){let m=function(w){if(v.paused||!s)return;const P=w.target;s.contains(P)?f.current=P:Rr(f.current,{select:!0})},h=function(w){if(v.paused||!s)return;const P=w.relatedTarget;P!==null&&(s.contains(P)||Rr(f.current,{select:!0}))},y=function(w){if(document.activeElement===document.body)for(const O of w)O.removedNodes.length>0&&Rr(s)};document.addEventListener("focusin",m),document.addEventListener("focusout",h);const x=new MutationObserver(y);return s&&x.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",h),x.disconnect()}}},[n,s,v.paused]),d.useEffect(()=>{if(s){km.add(v);const m=document.activeElement;if(!s.contains(m)){const y=new CustomEvent(bc,Mm);s.addEventListener(bc,c),s.dispatchEvent(y),y.defaultPrevented||(gk(Pk(Tw(s)),{select:!0}),document.activeElement===m&&Rr(s))}return()=>{s.removeEventListener(bc,c),setTimeout(()=>{const y=new CustomEvent(xc,Mm);s.addEventListener(xc,u),s.dispatchEvent(y),y.defaultPrevented||Rr(m??document.body,{select:!0}),s.removeEventListener(xc,u),km.remove(v)},0)}}},[s,c,u,v]);const g=d.useCallback(m=>{if(!r&&!n||v.paused)return;const h=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(h&&y){const x=m.currentTarget,[w,P]=yk(x);w&&P?!m.shiftKey&&y===P?(m.preventDefault(),r&&Rr(w,{select:!0})):m.shiftKey&&y===w&&(m.preventDefault(),r&&Rr(P,{select:!0})):y===x&&m.preventDefault()}},[r,n,v.paused]);return b.jsx(ee.div,{tabIndex:-1,...a,ref:p,onKeyDown:g})});gi.displayName=hk;function gk(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Rr(n,{select:t}),document.activeElement!==r)return}function yk(e){const t=Tw(e),r=jm(t,e),n=jm(t.reverse(),e);return[r,n]}function Tw(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function jm(e,t){for(const r of e)if(!bk(r,{upTo:t}))return r}function bk(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function xk(e){return e instanceof HTMLInputElement&&"select"in e}function Rr(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&xk(e)&&t&&e.select()}}var km=wk();function wk(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=Nm(e,t),e.unshift(t)},remove(t){e=Nm(e,t),e[0]?.resume()}}}function Nm(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Pk(e){return e.filter(t=>t.tagName!=="A")}var Sk="Portal",Rn=d.forwardRef((e,t)=>{const{container:r,...n}=e,[o,i]=d.useState(!1);et(()=>i(!0),[]);const a=r||o&&globalThis?.document?.body;return a?mi.createPortal(b.jsx(ee.div,{...n,ref:t}),a):null});Rn.displayName=Sk;function Ok(e,t){return d.useReducer((r,n)=>t[r][n]??r,e)}var pt=e=>{const{present:t,children:r}=e,n=Ek(t),o=typeof r=="function"?r({present:n.isPresent}):d.Children.only(r),i=oe(n.ref,Ck(o));return typeof r=="function"||n.isPresent?d.cloneElement(o,{ref:i}):null};pt.displayName="Presence";function Ek(e){const[t,r]=d.useState(),n=d.useRef(null),o=d.useRef(e),i=d.useRef("none"),a=e?"mounted":"unmounted",[s,l]=Ok(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{const c=Qi(n.current);i.current=s==="mounted"?c:"none"},[s]),et(()=>{const c=n.current,u=o.current;if(u!==e){const p=i.current,v=Qi(c);e?l("MOUNT"):v==="none"||c?.display==="none"?l("UNMOUNT"):l(u&&p!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),et(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,f=v=>{const m=Qi(n.current).includes(CSS.escape(v.animationName));if(v.target===t&&m&&(l("ANIMATION_END"),!o.current)){const h=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},p=v=>{v.target===t&&(i.current=Qi(n.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:d.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function Qi(e){return e?.animationName||"none"}function Ck(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var wc=0;function Xs(){d.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Im()),document.body.insertAdjacentElement("beforeend",e[1]??Im()),wc++,()=>{wc===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),wc--}},[])}function Im(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Zt=function(){return Zt=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},Zt.apply(this,arguments)};function Mw(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function Ak(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}var Da="right-scroll-bar-position",Ra="width-before-scroll-bar",_k="with-scroll-bars-hidden",Tk="--removed-body-scroll-bar-size";function Pc(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Mk(e,t){var r=A.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var jk=typeof window<"u"?d.useLayoutEffect:d.useEffect,Dm=new WeakMap;function kk(e,t){var r=Mk(null,function(n){return e.forEach(function(o){return Pc(o,n)})});return jk(function(){var n=Dm.get(r);if(n){var o=new Set(n),i=new Set(e),a=r.current;o.forEach(function(s){i.has(s)||Pc(s,null)}),i.forEach(function(s){o.has(s)||Pc(s,a)})}Dm.set(r,e)},[e]),r}function Nk(e){return e}function Ik(e,t){t===void 0&&(t=Nk);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(i){var a=t(i,n);return r.push(a),function(){r=r.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(n=!0;r.length;){var a=r;r=[],a.forEach(i)}r={push:function(s){return i(s)},filter:function(){return r}}},assignMedium:function(i){n=!0;var a=[];if(r.length){var s=r;r=[],s.forEach(i),a=r}var l=function(){var u=a;a=[],u.forEach(i)},c=function(){return Promise.resolve().then(l)};c(),r={push:function(u){a.push(u),c()},filter:function(u){return a=a.filter(u),r}}}};return o}function Dk(e){e===void 0&&(e={});var t=Ik(null);return t.options=Zt({async:!0,ssr:!1},e),t}var jw=function(e){var t=e.sideCar,r=Mw(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return d.createElement(n,Zt({},r))};jw.isSideCarExport=!0;function Rk(e,t){return e.useMedium(t),jw}var kw=Dk(),Sc=function(){},Zs=d.forwardRef(function(e,t){var r=d.useRef(null),n=d.useState({onScrollCapture:Sc,onWheelCapture:Sc,onTouchMoveCapture:Sc}),o=n[0],i=n[1],a=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,f=e.shards,p=e.sideCar,v=e.noRelative,g=e.noIsolation,m=e.inert,h=e.allowPinchZoom,y=e.as,x=y===void 0?"div":y,w=e.gapMode,P=Mw(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),O=p,S=kk([r,t]),E=Zt(Zt({},P),o);return d.createElement(d.Fragment,null,u&&d.createElement(O,{sideCar:kw,removeScrollBar:c,shards:f,noRelative:v,noIsolation:g,inert:m,setCallbacks:i,allowPinchZoom:!!h,lockRef:r,gapMode:w}),a?d.cloneElement(d.Children.only(s),Zt(Zt({},E),{ref:S})):d.createElement(x,Zt({},E,{className:l,ref:S}),s))});Zs.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Zs.classNames={fullWidth:Ra,zeroRight:Da};var $k=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Lk(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=$k();return t&&e.setAttribute("nonce",t),e}function Fk(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function zk(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Bk=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Lk())&&(Fk(t,r),zk(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Vk=function(){var e=Bk();return function(t,r){d.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Nw=function(){var e=Vk(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},Wk={left:0,top:0,right:0,gap:0},Oc=function(e){return parseInt(e||"",10)||0},Kk=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Oc(r),Oc(n),Oc(o)]},Uk=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Wk;var t=Kk(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},Hk=Nw(),eo="data-scroll-locked",Gk=function(e,t,r,n){var o=e.left,i=e.top,a=e.right,s=e.gap;return r===void 0&&(r="margin"),`
2
+ .`.concat(_k,` {
3
+ overflow: hidden `).concat(n,`;
4
+ padding-right: `).concat(s,"px ").concat(n,`;
5
5
  }
6
- body[`).concat(rt,`] {
7
- overflow: hidden `).concat(o,`;
6
+ body[`).concat(eo,`] {
7
+ overflow: hidden `).concat(n,`;
8
8
  overscroll-behavior: contain;
9
- `).concat([t&&"position: relative ".concat(o,";"),n==="margin"&&`
10
- padding-left: `.concat(r,`px;
11
- padding-top: `).concat(s,`px;
12
- padding-right: `).concat(i,`px;
9
+ `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
10
+ padding-left: `.concat(o,`px;
11
+ padding-top: `).concat(i,`px;
12
+ padding-right: `).concat(a,`px;
13
13
  margin-left:0;
14
14
  margin-top:0;
15
- margin-right: `).concat(l,"px ").concat(o,`;
16
- `),n==="padding"&&"padding-right: ".concat(l,"px ").concat(o,";")].filter(Boolean).join(""),`
15
+ margin-right: `).concat(s,"px ").concat(n,`;
16
+ `),r==="padding"&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),`
17
17
  }
18
18
 
19
- .`).concat(Xt,` {
20
- right: `).concat(l,"px ").concat(o,`;
19
+ .`).concat(Da,` {
20
+ right: `).concat(s,"px ").concat(n,`;
21
21
  }
22
22
 
23
- .`).concat(qt,` {
24
- margin-right: `).concat(l,"px ").concat(o,`;
23
+ .`).concat(Ra,` {
24
+ margin-right: `).concat(s,"px ").concat(n,`;
25
25
  }
26
26
 
27
- .`).concat(Xt," .").concat(Xt,` {
28
- right: 0 `).concat(o,`;
27
+ .`).concat(Da," .").concat(Da,` {
28
+ right: 0 `).concat(n,`;
29
29
  }
30
30
 
31
- .`).concat(qt," .").concat(qt,` {
32
- margin-right: 0 `).concat(o,`;
31
+ .`).concat(Ra," .").concat(Ra,` {
32
+ margin-right: 0 `).concat(n,`;
33
33
  }
34
34
 
35
- body[`).concat(rt,`] {
36
- `).concat(Uf,": ").concat(l,`px;
35
+ body[`).concat(eo,`] {
36
+ `).concat(Tk,": ").concat(s,`px;
37
37
  }
38
- `)},vr=function(){var e=parseInt(document.body.getAttribute(rt)||"0",10);return isFinite(e)?e:0},up=function(){a.useEffect(function(){return document.body.setAttribute(rt,(vr()+1).toString()),function(){var e=vr()-1;e<=0?document.body.removeAttribute(rt):document.body.setAttribute(rt,e.toString())}},[])},fp=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,r=o===void 0?"margin":o;up();var s=a.useMemo(function(){return lp(r)},[r]);return a.createElement(cp,{styles:dp(s,!t,r,n?"":"!important")})},oo=!1;if(typeof window<"u")try{var Lt=Object.defineProperty({},"passive",{get:function(){return oo=!0,!0}});window.addEventListener("test",Lt,Lt),window.removeEventListener("test",Lt,Lt)}catch{oo=!1}var et=oo?{passive:!1}:!1,pp=function(e){return e.tagName==="TEXTAREA"},ls=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!pp(e)&&n[t]==="visible")},mp=function(e){return ls(e,"overflowY")},gp=function(e){return ls(e,"overflowX")},xr=function(e,t){var n=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var r=cs(e,o);if(r){var s=ds(e,o),i=s[1],l=s[2];if(i>l)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},hp=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},vp=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},cs=function(e,t){return e==="v"?mp(t):gp(t)},ds=function(e,t){return e==="v"?hp(t):vp(t)},xp=function(e,t){return e==="h"&&t==="rtl"?-1:1},bp=function(e,t,n,o,r){var s=xp(e,window.getComputedStyle(t).direction),i=s*o,l=n.target,d=t.contains(l),u=!1,f=i>0,p=0,g=0;do{if(!l)break;var v=ds(e,l),x=v[0],m=v[1],h=v[2],y=m-h-s*x;(x||y)&&cs(e,l)&&(p+=y,g+=x);var b=l.parentNode;l=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!d&&l!==document.body||d&&(t.contains(l)||t===l));return(f&&Math.abs(p)<1||!f&&Math.abs(g)<1)&&(u=!0),u},Ft=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},br=function(e){return[e.deltaX,e.deltaY]},yr=function(e){return e&&"current"in e?e.current:e},yp=function(e,t){return e[0]===t[0]&&e[1]===t[1]},wp=function(e){return`
38
+ `)},Rm=function(){var e=parseInt(document.body.getAttribute(eo)||"0",10);return isFinite(e)?e:0},qk=function(){d.useEffect(function(){return document.body.setAttribute(eo,(Rm()+1).toString()),function(){var e=Rm()-1;e<=0?document.body.removeAttribute(eo):document.body.setAttribute(eo,e.toString())}},[])},Yk=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;qk();var i=d.useMemo(function(){return Uk(o)},[o]);return d.createElement(Hk,{styles:Gk(i,!t,o,r?"":"!important")})},vf=!1;if(typeof window<"u")try{var ea=Object.defineProperty({},"passive",{get:function(){return vf=!0,!0}});window.addEventListener("test",ea,ea),window.removeEventListener("test",ea,ea)}catch{vf=!1}var Kn=vf?{passive:!1}:!1,Xk=function(e){return e.tagName==="TEXTAREA"},Iw=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Xk(e)&&r[t]==="visible")},Zk=function(e){return Iw(e,"overflowY")},Jk=function(e){return Iw(e,"overflowX")},$m=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=Dw(e,n);if(o){var i=Rw(e,n),a=i[1],s=i[2];if(a>s)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Qk=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},eN=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},Dw=function(e,t){return e==="v"?Zk(t):Jk(t)},Rw=function(e,t){return e==="v"?Qk(t):eN(t)},tN=function(e,t){return e==="h"&&t==="rtl"?-1:1},rN=function(e,t,r,n,o){var i=tN(e,window.getComputedStyle(t).direction),a=i*n,s=r.target,l=t.contains(s),c=!1,u=a>0,f=0,p=0;do{if(!s)break;var v=Rw(e,s),g=v[0],m=v[1],h=v[2],y=m-h-i*g;(g||y)&&Dw(e,s)&&(f+=y,p+=g);var x=s.parentNode;s=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(u&&Math.abs(f)<1||!u&&Math.abs(p)<1)&&(c=!0),c},ta=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Lm=function(e){return[e.deltaX,e.deltaY]},Fm=function(e){return e&&"current"in e?e.current:e},nN=function(e,t){return e[0]===t[0]&&e[1]===t[1]},oN=function(e){return`
39
39
  .block-interactivity-`.concat(e,` {pointer-events: none;}
40
40
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
41
- `)},Cp=0,tt=[];function Sp(e){var t=a.useRef([]),n=a.useRef([0,0]),o=a.useRef(),r=a.useState(Cp++)[0],s=a.useState(is)[0],i=a.useRef(e);a.useEffect(function(){i.current=e},[e]),a.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var m=Gf([e.lockRef.current],(e.shards||[]).map(yr),!0).filter(Boolean);return m.forEach(function(h){return h.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),m.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var l=a.useCallback(function(m,h){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!i.current.allowPinchZoom;var y=Ft(m),b=n.current,w="deltaX"in m?m.deltaX:b[0]-y[0],S="deltaY"in m?m.deltaY:b[1]-y[1],E,N=m.target,R=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in m&&R==="h"&&N.type==="range")return!1;var P=window.getSelection(),$=P&&P.anchorNode,F=$?$===N||$.contains(N):!1;if(F)return!1;var B=xr(R,N);if(!B)return!0;if(B?E=R:(E=R==="v"?"h":"v",B=xr(R,N)),!B)return!1;if(!o.current&&"changedTouches"in m&&(w||S)&&(o.current=E),!E)return!0;var k=o.current||E;return bp(k,h,m,k==="h"?w:S)},[]),d=a.useCallback(function(m){var h=m;if(!(!tt.length||tt[tt.length-1]!==s)){var y="deltaY"in h?br(h):Ft(h),b=t.current.filter(function(E){return E.name===h.type&&(E.target===h.target||h.target===E.shadowParent)&&yp(E.delta,y)})[0];if(b&&b.should){h.cancelable&&h.preventDefault();return}if(!b){var w=(i.current.shards||[]).map(yr).filter(Boolean).filter(function(E){return E.contains(h.target)}),S=w.length>0?l(h,w[0]):!i.current.noIsolation;S&&h.cancelable&&h.preventDefault()}}},[]),u=a.useCallback(function(m,h,y,b){var w={name:m,delta:h,target:y,should:b,shadowParent:Rp(y)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),f=a.useCallback(function(m){n.current=Ft(m),o.current=void 0},[]),p=a.useCallback(function(m){u(m.type,br(m),m.target,l(m,e.lockRef.current))},[]),g=a.useCallback(function(m){u(m.type,Ft(m),m.target,l(m,e.lockRef.current))},[]);a.useEffect(function(){return tt.push(s),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",d,et),document.addEventListener("touchmove",d,et),document.addEventListener("touchstart",f,et),function(){tt=tt.filter(function(m){return m!==s}),document.removeEventListener("wheel",d,et),document.removeEventListener("touchmove",d,et),document.removeEventListener("touchstart",f,et)}},[]);var v=e.removeScrollBar,x=e.inert;return a.createElement(a.Fragment,null,x?a.createElement(s,{styles:wp(r)}):null,v?a.createElement(fp,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Rp(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Ep=Qf(as,Sp);var Tt=a.forwardRef(function(e,t){return a.createElement(dn,Re({},e,{ref:t,sideCar:Ep}))});Tt.classNames=dn.classNames;var Tp=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},nt=new WeakMap,Vt=new WeakMap,Bt={},Xn=0,us=function(e){return e&&(e.host||us(e.parentNode))},Pp=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=us(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Np=function(e,t,n,o){var r=Pp(t,Array.isArray(e)?e:[e]);Bt[n]||(Bt[n]=new WeakMap);var s=Bt[n],i=[],l=new Set,d=new Set(r),u=function(p){!p||l.has(p)||(l.add(p),u(p.parentNode))};r.forEach(u);var f=function(p){!p||d.has(p)||Array.prototype.forEach.call(p.children,function(g){if(l.has(g))f(g);else try{var v=g.getAttribute(o),x=v!==null&&v!=="false",m=(nt.get(g)||0)+1,h=(s.get(g)||0)+1;nt.set(g,m),s.set(g,h),i.push(g),m===1&&x&&Vt.set(g,!0),h===1&&g.setAttribute(n,"true"),x||g.setAttribute(o,"true")}catch(y){console.error("aria-hidden: cannot operate on ",g,y)}})};return f(t),l.clear(),Xn++,function(){i.forEach(function(p){var g=nt.get(p)-1,v=s.get(p)-1;nt.set(p,g),s.set(p,v),g||(Vt.has(p)||p.removeAttribute(o),Vt.delete(p)),v||p.removeAttribute(n)}),Xn--,Xn||(nt=new WeakMap,nt=new WeakMap,Vt=new WeakMap,Bt={})}},un=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=Tp(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live], script"))),Np(o,r,n,"aria-hidden")):function(){return null}};function Mp(e){const t=Ap(e),n=a.forwardRef((o,r)=>{const{children:s,...i}=o,l=a.Children.toArray(s),d=l.find(_p);if(d){const u=d.props.children,f=l.map(p=>p===d?a.Children.count(u)>1?a.Children.only(null):a.isValidElement(u)?u.props.children:null:p);return c.jsx(t,{...i,ref:r,children:a.isValidElement(u)?a.cloneElement(u,void 0,f):null})}return c.jsx(t,{...i,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function Ap(e){const t=a.forwardRef((n,o)=>{const{children:r,...s}=n;if(a.isValidElement(r)){const i=kp(r),l=Ip(s,r.props);return r.type!==a.Fragment&&(l.ref=o?Ne(o,i):i),a.cloneElement(r,l)}return a.Children.count(r)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Dp=Symbol("radix.slottable");function _p(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Dp}function Ip(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...l)=>{const d=s(...l);return r(...l),d}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function kp(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var fn="Dialog",[fs,ps]=le(fn),[jp,Ce]=fs(fn),ms=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:r,onOpenChange:s,modal:i=!0}=e,l=a.useRef(null),d=a.useRef(null),[u,f]=he({prop:o,defaultProp:r??!1,onChange:s,caller:fn});return c.jsx(jp,{scope:t,triggerRef:l,contentRef:d,contentId:me(),titleId:me(),descriptionId:me(),open:u,onOpenChange:f,onOpenToggle:a.useCallback(()=>f(p=>!p),[f]),modal:i,children:n})};ms.displayName=fn;var gs="DialogTrigger",hs=a.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=Ce(gs,n),s=G(t,r.triggerRef);return c.jsx(L.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Eo(r.open),...o,ref:s,onClick:A(e.onClick,r.onOpenToggle)})});hs.displayName=gs;var So="DialogPortal",[Op,vs]=fs(So,{forceMount:void 0}),xs=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:r}=e,s=Ce(So,t);return c.jsx(Op,{scope:t,forceMount:n,children:a.Children.map(o,i=>c.jsx(fe,{present:n||s.open,children:c.jsx(Je,{asChild:!0,container:r,children:i})}))})};xs.displayName=So;var Jt="DialogOverlay",bs=a.forwardRef((e,t)=>{const n=vs(Jt,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=Ce(Jt,e.__scopeDialog);return s.modal?c.jsx(fe,{present:o||s.open,children:c.jsx(Lp,{...r,ref:t})}):null});bs.displayName=Jt;var $p=Mp("DialogOverlay.RemoveScroll"),Lp=a.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=Ce(Jt,n);return c.jsx(Tt,{as:$p,allowPinchZoom:!0,shards:[r.contentRef],children:c.jsx(L.div,{"data-state":Eo(r.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),Ke="DialogContent",ys=a.forwardRef((e,t)=>{const n=vs(Ke,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=Ce(Ke,e.__scopeDialog);return c.jsx(fe,{present:o||s.open,children:s.modal?c.jsx(Fp,{...r,ref:t}):c.jsx(Vp,{...r,ref:t})})});ys.displayName=Ke;var Fp=a.forwardRef((e,t)=>{const n=Ce(Ke,e.__scopeDialog),o=a.useRef(null),r=G(t,n.contentRef,o);return a.useEffect(()=>{const s=o.current;if(s)return un(s)},[]),c.jsx(ws,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:A(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:A(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,l=i.button===0&&i.ctrlKey===!0;(i.button===2||l)&&s.preventDefault()}),onFocusOutside:A(e.onFocusOutside,s=>s.preventDefault())})}),Vp=a.forwardRef((e,t)=>{const n=Ce(Ke,e.__scopeDialog),o=a.useRef(!1),r=a.useRef(!1);return c.jsx(ws,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(o.current||n.triggerRef.current?.focus(),s.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const i=s.target;n.triggerRef.current?.contains(i)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})}),ws=a.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:s,...i}=e,l=Ce(Ke,n),d=a.useRef(null),u=G(t,d);return cn(),c.jsxs(c.Fragment,{children:[c.jsx(Et,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:s,children:c.jsx(Ze,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Eo(l.open),...i,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(Wp,{titleId:l.titleId}),c.jsx(Gp,{contentRef:d,descriptionId:l.descriptionId})]})]})}),Ro="DialogTitle",Cs=a.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=Ce(Ro,n);return c.jsx(L.h2,{id:r.titleId,...o,ref:t})});Cs.displayName=Ro;var Ss="DialogDescription",Rs=a.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=Ce(Ss,n);return c.jsx(L.p,{id:r.descriptionId,...o,ref:t})});Rs.displayName=Ss;var Es="DialogClose",Ts=a.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=Ce(Es,n);return c.jsx(L.button,{type:"button",...o,ref:t,onClick:A(e.onClick,()=>r.onOpenChange(!1))})});Ts.displayName=Es;function Eo(e){return e?"open":"closed"}var Ps="DialogTitleWarning",[Bp,Ns]=df(Ps,{contentName:Ke,titleName:Ro,docsSlug:"dialog"}),Wp=({titleId:e})=>{const t=Ns(Ps),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
41
+ `)},iN=0,Un=[];function aN(e){var t=d.useRef([]),r=d.useRef([0,0]),n=d.useRef(),o=d.useState(iN++)[0],i=d.useState(Nw)[0],a=d.useRef(e);d.useEffect(function(){a.current=e},[e]),d.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=Ak([e.lockRef.current],(e.shards||[]).map(Fm),!0).filter(Boolean);return m.forEach(function(h){return h.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=d.useCallback(function(m,h){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!a.current.allowPinchZoom;var y=ta(m),x=r.current,w="deltaX"in m?m.deltaX:x[0]-y[0],P="deltaY"in m?m.deltaY:x[1]-y[1],O,S=m.target,E=Math.abs(w)>Math.abs(P)?"h":"v";if("touches"in m&&E==="h"&&S.type==="range")return!1;var C=window.getSelection(),j=C&&C.anchorNode,D=j?j===S||j.contains(S):!1;if(D)return!1;var R=$m(E,S);if(!R)return!0;if(R?O=E:(O=E==="v"?"h":"v",R=$m(E,S)),!R)return!1;if(!n.current&&"changedTouches"in m&&(w||P)&&(n.current=O),!O)return!0;var _=n.current||O;return rN(_,h,m,_==="h"?w:P)},[]),l=d.useCallback(function(m){var h=m;if(!(!Un.length||Un[Un.length-1]!==i)){var y="deltaY"in h?Lm(h):ta(h),x=t.current.filter(function(O){return O.name===h.type&&(O.target===h.target||h.target===O.shadowParent)&&nN(O.delta,y)})[0];if(x&&x.should){h.cancelable&&h.preventDefault();return}if(!x){var w=(a.current.shards||[]).map(Fm).filter(Boolean).filter(function(O){return O.contains(h.target)}),P=w.length>0?s(h,w[0]):!a.current.noIsolation;P&&h.cancelable&&h.preventDefault()}}},[]),c=d.useCallback(function(m,h,y,x){var w={name:m,delta:h,target:y,should:x,shadowParent:sN(y)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(P){return P!==w})},1)},[]),u=d.useCallback(function(m){r.current=ta(m),n.current=void 0},[]),f=d.useCallback(function(m){c(m.type,Lm(m),m.target,s(m,e.lockRef.current))},[]),p=d.useCallback(function(m){c(m.type,ta(m),m.target,s(m,e.lockRef.current))},[]);d.useEffect(function(){return Un.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",l,Kn),document.addEventListener("touchmove",l,Kn),document.addEventListener("touchstart",u,Kn),function(){Un=Un.filter(function(m){return m!==i}),document.removeEventListener("wheel",l,Kn),document.removeEventListener("touchmove",l,Kn),document.removeEventListener("touchstart",u,Kn)}},[]);var v=e.removeScrollBar,g=e.inert;return d.createElement(d.Fragment,null,g?d.createElement(i,{styles:oN(o)}):null,v?d.createElement(Yk,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function sN(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const lN=Rk(kw,aN);var yi=d.forwardRef(function(e,t){return d.createElement(Zs,Zt({},e,{ref:t,sideCar:lN}))});yi.classNames=Zs.classNames;var cN=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Hn=new WeakMap,ra=new WeakMap,na={},Ec=0,$w=function(e){return e&&(e.host||$w(e.parentNode))},uN=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=$w(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},fN=function(e,t,r,n){var o=uN(t,Array.isArray(e)?e:[e]);na[r]||(na[r]=new WeakMap);var i=na[r],a=[],s=new Set,l=new Set(o),c=function(f){!f||s.has(f)||(s.add(f),c(f.parentNode))};o.forEach(c);var u=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(p){if(s.has(p))u(p);else try{var v=p.getAttribute(n),g=v!==null&&v!=="false",m=(Hn.get(p)||0)+1,h=(i.get(p)||0)+1;Hn.set(p,m),i.set(p,h),a.push(p),m===1&&g&&ra.set(p,!0),h===1&&p.setAttribute(r,"true"),g||p.setAttribute(n,"true")}catch(y){console.error("aria-hidden: cannot operate on ",p,y)}})};return u(t),s.clear(),Ec++,function(){a.forEach(function(f){var p=Hn.get(f)-1,v=i.get(f)-1;Hn.set(f,p),i.set(f,v),p||(ra.has(f)||f.removeAttribute(n),ra.delete(f)),v||f.removeAttribute(r)}),Ec--,Ec||(Hn=new WeakMap,Hn=new WeakMap,ra=new WeakMap,na={})}},Js=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=cN(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),fN(n,o,r,"aria-hidden")):function(){return null}};function dN(e){const t=pN(e),r=d.forwardRef((n,o)=>{const{children:i,...a}=n,s=d.Children.toArray(i),l=s.find(mN);if(l){const c=l.props.children,u=s.map(f=>f===l?d.Children.count(c)>1?d.Children.only(null):d.isValidElement(c)?c.props.children:null:f);return b.jsx(t,{...a,ref:o,children:d.isValidElement(c)?d.cloneElement(c,void 0,u):null})}return b.jsx(t,{...a,ref:o,children:i})});return r.displayName=`${e}.Slot`,r}function pN(e){const t=d.forwardRef((r,n)=>{const{children:o,...i}=r;if(d.isValidElement(o)){const a=gN(o),s=hN(i,o.props);return o.type!==d.Fragment&&(s.ref=n?lr(n,a):a),d.cloneElement(o,s)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var vN=Symbol("radix.slottable");function mN(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===vN}function hN(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...s)=>{const l=i(...s);return o(...s),l}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}function gN(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Qs="Dialog",[Lw,Fw]=it(Qs),[yN,Kt]=Lw(Qs),zw=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=d.useRef(null),l=d.useRef(null),[c,u]=Et({prop:n,defaultProp:o??!1,onChange:i,caller:Qs});return b.jsx(yN,{scope:t,triggerRef:s,contentRef:l,contentId:St(),titleId:St(),descriptionId:St(),open:c,onOpenChange:u,onOpenToggle:d.useCallback(()=>u(f=>!f),[u]),modal:a,children:r})};zw.displayName=Qs;var Bw="DialogTrigger",Vw=d.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Kt(Bw,r),i=oe(t,o.triggerRef);return b.jsx(ee.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":$d(o.open),...n,ref:i,onClick:U(e.onClick,o.onOpenToggle)})});Vw.displayName=Bw;var Dd="DialogPortal",[bN,Ww]=Lw(Dd,{forceMount:void 0}),Kw=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:o}=e,i=Kt(Dd,t);return b.jsx(bN,{scope:t,forceMount:r,children:d.Children.map(n,a=>b.jsx(pt,{present:r||i.open,children:b.jsx(Rn,{asChild:!0,container:o,children:a})}))})};Kw.displayName=Dd;var Ka="DialogOverlay",Uw=d.forwardRef((e,t)=>{const r=Ww(Ka,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=Kt(Ka,e.__scopeDialog);return i.modal?b.jsx(pt,{present:n||i.open,children:b.jsx(wN,{...o,ref:t})}):null});Uw.displayName=Ka;var xN=dN("DialogOverlay.RemoveScroll"),wN=d.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Kt(Ka,r);return b.jsx(yi,{as:xN,allowPinchZoom:!0,shards:[o.contentRef],children:b.jsx(ee.div,{"data-state":$d(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),Pn="DialogContent",Hw=d.forwardRef((e,t)=>{const r=Ww(Pn,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=Kt(Pn,e.__scopeDialog);return b.jsx(pt,{present:n||i.open,children:i.modal?b.jsx(PN,{...o,ref:t}):b.jsx(SN,{...o,ref:t})})});Hw.displayName=Pn;var PN=d.forwardRef((e,t)=>{const r=Kt(Pn,e.__scopeDialog),n=d.useRef(null),o=oe(t,r.contentRef,n);return d.useEffect(()=>{const i=n.current;if(i)return Js(i)},[]),b.jsx(Gw,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:U(e.onCloseAutoFocus,i=>{i.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:U(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:U(e.onFocusOutside,i=>i.preventDefault())})}),SN=d.forwardRef((e,t)=>{const r=Kt(Pn,e.__scopeDialog),n=d.useRef(!1),o=d.useRef(!1);return b.jsx(Gw,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),i.defaultPrevented||(n.current||r.triggerRef.current?.focus(),i.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=i.target;r.triggerRef.current?.contains(a)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),Gw=d.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=Kt(Pn,r),l=d.useRef(null),c=oe(t,l);return Xs(),b.jsxs(b.Fragment,{children:[b.jsx(gi,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i,children:b.jsx(Dn,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":$d(s.open),...a,ref:c,onDismiss:()=>s.onOpenChange(!1)})}),b.jsxs(b.Fragment,{children:[b.jsx(EN,{titleId:s.titleId}),b.jsx(AN,{contentRef:l,descriptionId:s.descriptionId})]})]})}),Rd="DialogTitle",qw=d.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Kt(Rd,r);return b.jsx(ee.h2,{id:o.titleId,...n,ref:t})});qw.displayName=Rd;var Yw="DialogDescription",Xw=d.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Kt(Yw,r);return b.jsx(ee.p,{id:o.descriptionId,...n,ref:t})});Xw.displayName=Yw;var Zw="DialogClose",Jw=d.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Kt(Zw,r);return b.jsx(ee.button,{type:"button",...n,ref:t,onClick:U(e.onClick,()=>o.onOpenChange(!1))})});Jw.displayName=Zw;function $d(e){return e?"open":"closed"}var Qw="DialogTitleWarning",[ON,e0]=Gj(Qw,{contentName:Pn,titleName:Rd,docsSlug:"dialog"}),EN=({titleId:e})=>{const t=e0(Qw),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
42
42
 
43
43
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
44
44
 
45
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return a.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},zp="DialogDescriptionWarning",Gp=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ns(zp).contentName}}.`;return a.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},Ms=ms,As=hs,Ds=xs,_s=bs,Is=ys,ks=Cs,js=Rs,pn=Ts,Hp=Symbol("radix.slottable");function Up(e){const t=({children:n})=>c.jsx(c.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Hp,t}var Os="AlertDialog",[Kp]=le(Os,[ps]),Ie=ps(),$s=e=>{const{__scopeAlertDialog:t,...n}=e,o=Ie(t);return c.jsx(Ms,{...o,...n,modal:!0})};$s.displayName=Os;var Yp="AlertDialogTrigger",Ls=a.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Ie(n);return c.jsx(As,{...r,...o,ref:t})});Ls.displayName=Yp;var Xp="AlertDialogPortal",Fs=e=>{const{__scopeAlertDialog:t,...n}=e,o=Ie(t);return c.jsx(Ds,{...o,...n})};Fs.displayName=Xp;var qp="AlertDialogOverlay",Vs=a.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Ie(n);return c.jsx(_s,{...r,...o,ref:t})});Vs.displayName=qp;var st="AlertDialogContent",[Zp,Jp]=Kp(st),Qp=Up("AlertDialogContent"),Bs=a.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:o,...r}=e,s=Ie(n),i=a.useRef(null),l=G(t,i),d=a.useRef(null);return c.jsx(Bp,{contentName:st,titleName:Ws,docsSlug:"alert-dialog",children:c.jsx(Zp,{scope:n,cancelRef:d,children:c.jsxs(Is,{role:"alertdialog",...s,...r,ref:l,onOpenAutoFocus:A(r.onOpenAutoFocus,u=>{u.preventDefault(),d.current?.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[c.jsx(Qp,{children:o}),c.jsx(tm,{contentRef:i})]})})})});Bs.displayName=st;var Ws="AlertDialogTitle",zs=a.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Ie(n);return c.jsx(ks,{...r,...o,ref:t})});zs.displayName=Ws;var Gs="AlertDialogDescription",Hs=a.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Ie(n);return c.jsx(js,{...r,...o,ref:t})});Hs.displayName=Gs;var em="AlertDialogAction",Us=a.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Ie(n);return c.jsx(pn,{...r,...o,ref:t})});Us.displayName=em;var Ks="AlertDialogCancel",Ys=a.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,{cancelRef:r}=Jp(Ks,n),s=Ie(n),i=G(t,r);return c.jsx(pn,{...s,...o,ref:i})});Ys.displayName=Ks;var tm=({contentRef:e})=>{const t=`\`${st}\` requires a description for the component to be accessible for screen reader users.
45
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return d.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},CN="DialogDescriptionWarning",AN=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${e0(CN).contentName}}.`;return d.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},t0=zw,r0=Vw,n0=Kw,o0=Uw,i0=Hw,a0=qw,s0=Xw,el=Jw,_N=Symbol("radix.slottable");function TN(e){const t=({children:r})=>b.jsx(b.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=_N,t}var l0="AlertDialog",[MN]=it(l0,[Fw]),Cr=Fw(),c0=e=>{const{__scopeAlertDialog:t,...r}=e,n=Cr(t);return b.jsx(t0,{...n,...r,modal:!0})};c0.displayName=l0;var jN="AlertDialogTrigger",u0=d.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Cr(r);return b.jsx(r0,{...o,...n,ref:t})});u0.displayName=jN;var kN="AlertDialogPortal",f0=e=>{const{__scopeAlertDialog:t,...r}=e,n=Cr(t);return b.jsx(n0,{...n,...r})};f0.displayName=kN;var NN="AlertDialogOverlay",d0=d.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Cr(r);return b.jsx(o0,{...o,...n,ref:t})});d0.displayName=NN;var to="AlertDialogContent",[IN,DN]=MN(to),RN=TN("AlertDialogContent"),p0=d.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:n,...o}=e,i=Cr(r),a=d.useRef(null),s=oe(t,a),l=d.useRef(null);return b.jsx(ON,{contentName:to,titleName:v0,docsSlug:"alert-dialog",children:b.jsx(IN,{scope:r,cancelRef:l,children:b.jsxs(i0,{role:"alertdialog",...i,...o,ref:s,onOpenAutoFocus:U(o.onOpenAutoFocus,c=>{c.preventDefault(),l.current?.focus({preventScroll:!0})}),onPointerDownOutside:c=>c.preventDefault(),onInteractOutside:c=>c.preventDefault(),children:[b.jsx(RN,{children:n}),b.jsx(LN,{contentRef:a})]})})})});p0.displayName=to;var v0="AlertDialogTitle",m0=d.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Cr(r);return b.jsx(a0,{...o,...n,ref:t})});m0.displayName=v0;var h0="AlertDialogDescription",g0=d.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Cr(r);return b.jsx(s0,{...o,...n,ref:t})});g0.displayName=h0;var $N="AlertDialogAction",y0=d.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Cr(r);return b.jsx(el,{...o,...n,ref:t})});y0.displayName=$N;var b0="AlertDialogCancel",x0=d.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:o}=DN(b0,r),i=Cr(r),a=oe(t,o);return b.jsx(el,{...i,...n,ref:a})});x0.displayName=b0;var LN=({contentRef:e})=>{const t=`\`${to}\` requires a description for the component to be accessible for screen reader users.
46
46
 
47
- You can add a description to the \`${st}\` by passing a \`${Gs}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
47
+ You can add a description to the \`${to}\` by passing a \`${h0}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
48
48
 
49
- Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${st}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
49
+ Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${to}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
50
50
 
51
- For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return a.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},nm=$s,om=Ls,rm=Fs,sm=Vs,am=Bs,im=Us,lm=Ys,cm=zs,dm=Hs;function Xs(e){var t,n,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=Xs(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function qs(){for(var e,t,n=0,o="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=Xs(e))&&(o&&(o+=" "),o+=t);return o}const wr=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Cr=qs,U=(e,t)=>n=>{var o;if(t?.variants==null)return Cr(e,n?.class,n?.className);const{variants:r,defaultVariants:s}=t,i=Object.keys(r).map(u=>{const f=n?.[u],p=s?.[u];if(f===null)return null;const g=wr(f)||wr(p);return r[u][g]}),l=n&&Object.entries(n).reduce((u,f)=>{let[p,g]=f;return g===void 0||(u[p]=g),u},{}),d=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((u,f)=>{let{class:p,className:g,...v}=f;return Object.entries(v).every(x=>{let[m,h]=x;return Array.isArray(h)?h.includes({...s,...l}[m]):{...s,...l}[m]===h})?[...u,p,g]:u},[]);return Cr(e,i,d,n?.class,n?.className)},um=(e,t)=>{const n=new Array(e.length+t.length);for(let o=0;o<e.length;o++)n[o]=e[o];for(let o=0;o<t.length;o++)n[e.length+o]=t[o];return n},fm=(e,t)=>({classGroupId:e,validator:t}),Zs=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Qt="-",Sr=[],pm="arbitrary..",mm=e=>{const t=hm(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return gm(i);const l=i.split(Qt),d=l[0]===""&&l.length>1?1:0;return Js(l,d,t)},getConflictingClassGroupIds:(i,l)=>{if(l){const d=o[i],u=n[i];return d?u?um(u,d):d:u||Sr}return n[i]||Sr}}},Js=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const r=e[t],s=n.nextPart.get(r);if(s){const u=Js(e,t+1,s);if(u)return u}const i=n.validators;if(i===null)return;const l=t===0?e.join(Qt):e.slice(t).join(Qt),d=i.length;for(let u=0;u<d;u++){const f=i[u];if(f.validator(l))return f.classGroupId}},gm=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),o=t.slice(0,n);return o?pm+o:void 0})(),hm=e=>{const{theme:t,classGroups:n}=e;return vm(n,t)},vm=(e,t)=>{const n=Zs();for(const o in e){const r=e[o];To(r,n,o,t)}return n},To=(e,t,n,o)=>{const r=e.length;for(let s=0;s<r;s++){const i=e[s];xm(i,t,n,o)}},xm=(e,t,n,o)=>{if(typeof e=="string"){bm(e,t,n);return}if(typeof e=="function"){ym(e,t,n,o);return}wm(e,t,n,o)},bm=(e,t,n)=>{const o=e===""?t:Qs(t,e);o.classGroupId=n},ym=(e,t,n,o)=>{if(Cm(e)){To(e(o),t,n,o);return}t.validators===null&&(t.validators=[]),t.validators.push(fm(n,e))},wm=(e,t,n,o)=>{const r=Object.entries(e),s=r.length;for(let i=0;i<s;i++){const[l,d]=r[i];To(d,Qs(t,l),n,o)}},Qs=(e,t)=>{let n=e;const o=t.split(Qt),r=o.length;for(let s=0;s<r;s++){const i=o[s];let l=n.nextPart.get(i);l||(l=Zs(),n.nextPart.set(i,l)),n=l}return n},Cm=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Sm=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),o=Object.create(null);const r=(s,i)=>{n[s]=i,t++,t>e&&(t=0,o=n,n=Object.create(null))};return{get(s){let i=n[s];if(i!==void 0)return i;if((i=o[s])!==void 0)return r(s,i),i},set(s,i){s in n?n[s]=i:r(s,i)}}},ro="!",Rr=":",Rm=[],Er=(e,t,n,o,r)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:o,isExternal:r}),Em=e=>{const{prefix:t,experimentalParseClassName:n}=e;let o=r=>{const s=[];let i=0,l=0,d=0,u;const f=r.length;for(let m=0;m<f;m++){const h=r[m];if(i===0&&l===0){if(h===Rr){s.push(r.slice(d,m)),d=m+1;continue}if(h==="/"){u=m;continue}}h==="["?i++:h==="]"?i--:h==="("?l++:h===")"&&l--}const p=s.length===0?r:r.slice(d);let g=p,v=!1;p.endsWith(ro)?(g=p.slice(0,-1),v=!0):p.startsWith(ro)&&(g=p.slice(1),v=!0);const x=u&&u>d?u-d:void 0;return Er(s,v,g,x)};if(t){const r=t+Rr,s=o;o=i=>i.startsWith(r)?s(i.slice(r.length)):Er(Rm,!1,i,void 0,!0)}if(n){const r=o;o=s=>n({className:s,parseClassName:r})}return o},Tm=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,o)=>{t.set(n,1e6+o)}),n=>{const o=[];let r=[];for(let s=0;s<n.length;s++){const i=n[s],l=i[0]==="[",d=t.has(i);l||d?(r.length>0&&(r.sort(),o.push(...r),r=[]),o.push(i)):r.push(i)}return r.length>0&&(r.sort(),o.push(...r)),o}},Pm=e=>({cache:Sm(e.cacheSize),parseClassName:Em(e),sortModifiers:Tm(e),...mm(e)}),Nm=/\s+/,Mm=(e,t)=>{const{parseClassName:n,getClassGroupId:o,getConflictingClassGroupIds:r,sortModifiers:s}=t,i=[],l=e.trim().split(Nm);let d="";for(let u=l.length-1;u>=0;u-=1){const f=l[u],{isExternal:p,modifiers:g,hasImportantModifier:v,baseClassName:x,maybePostfixModifierPosition:m}=n(f);if(p){d=f+(d.length>0?" "+d:d);continue}let h=!!m,y=o(h?x.substring(0,m):x);if(!y){if(!h){d=f+(d.length>0?" "+d:d);continue}if(y=o(x),!y){d=f+(d.length>0?" "+d:d);continue}h=!1}const b=g.length===0?"":g.length===1?g[0]:s(g).join(":"),w=v?b+ro:b,S=w+y;if(i.indexOf(S)>-1)continue;i.push(S);const E=r(y,h);for(let N=0;N<E.length;++N){const R=E[N];i.push(w+R)}d=f+(d.length>0?" "+d:d)}return d},Am=(...e)=>{let t=0,n,o,r="";for(;t<e.length;)(n=e[t++])&&(o=ea(n))&&(r&&(r+=" "),r+=o);return r},ea=e=>{if(typeof e=="string")return e;let t,n="";for(let o=0;o<e.length;o++)e[o]&&(t=ea(e[o]))&&(n&&(n+=" "),n+=t);return n},Tr=(e,...t)=>{let n,o,r,s;const i=d=>{const u=t.reduce((f,p)=>p(f),e());return n=Pm(u),o=n.cache.get,r=n.cache.set,s=l,l(d)},l=d=>{const u=o(d);if(u)return u;const f=Mm(d,n);return r(d,f),f};return s=i,(...d)=>s(Am(...d))},Dm=[],re=e=>{const t=n=>n[e]||Dm;return t.isThemeGetter=!0,t},ta=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,na=/^\((?:(\w[\w-]*):)?(.+)\)$/i,_m=/^\d+\/\d+$/,Im=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,km=/\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$/,jm=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Om=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,$m=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ot=e=>_m.test(e),H=e=>!!e&&!Number.isNaN(Number(e)),ke=e=>!!e&&Number.isInteger(Number(e)),qn=e=>e.endsWith("%")&&H(e.slice(0,-1)),Ae=e=>Im.test(e),Lm=()=>!0,Fm=e=>km.test(e)&&!jm.test(e),oa=()=>!1,Vm=e=>Om.test(e),Bm=e=>$m.test(e),Wm=e=>!j(e)&&!O(e),zm=e=>dt(e,aa,oa),j=e=>ta.test(e),He=e=>dt(e,ia,Fm),Zn=e=>dt(e,Ym,H),Pr=e=>dt(e,ra,oa),Gm=e=>dt(e,sa,Bm),Wt=e=>dt(e,la,Vm),O=e=>na.test(e),ht=e=>ut(e,ia),Hm=e=>ut(e,Xm),Nr=e=>ut(e,ra),Um=e=>ut(e,aa),Km=e=>ut(e,sa),zt=e=>ut(e,la,!0),dt=(e,t,n)=>{const o=ta.exec(e);return o?o[1]?t(o[1]):n(o[2]):!1},ut=(e,t,n=!1)=>{const o=na.exec(e);return o?o[1]?t(o[1]):n:!1},ra=e=>e==="position"||e==="percentage",sa=e=>e==="image"||e==="url",aa=e=>e==="length"||e==="size"||e==="bg-size",ia=e=>e==="length",Ym=e=>e==="number",Xm=e=>e==="family-name",la=e=>e==="shadow",Mr=()=>{const e=re("color"),t=re("font"),n=re("text"),o=re("font-weight"),r=re("tracking"),s=re("leading"),i=re("breakpoint"),l=re("container"),d=re("spacing"),u=re("radius"),f=re("shadow"),p=re("inset-shadow"),g=re("text-shadow"),v=re("drop-shadow"),x=re("blur"),m=re("perspective"),h=re("aspect"),y=re("ease"),b=re("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...S(),O,j],N=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto","contain","none"],P=()=>[O,j,d],$=()=>[ot,"full","auto",...P()],F=()=>[ke,"none","subgrid",O,j],B=()=>["auto",{span:["full",ke,O,j]},ke,O,j],k=()=>[ke,"auto",O,j],z=()=>["auto","min","max","fr",O,j],D=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],I=()=>["auto",...P()],W=()=>[ot,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],C=()=>[e,O,j],M=()=>[...S(),Nr,Pr,{position:[O,j]}],K=()=>["no-repeat",{repeat:["","x","y","space","round"]}],q=()=>["auto","cover","contain",Um,zm,{size:[O,j]}],ee=()=>[qn,ht,He],Y=()=>["","none","full",u,O,j],X=()=>["",H,ht,He],te=()=>["solid","dashed","dotted","double"],ae=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],_=()=>[H,qn,Nr,Pr],J=()=>["","none",x,O,j],oe=()=>["none",H,O,j],Z=()=>["none",H,O,j],Q=()=>[H,O,j],ne=()=>[ot,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ae],breakpoint:[Ae],color:[Lm],container:[Ae],"drop-shadow":[Ae],ease:["in","out","in-out"],font:[Wm],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ae],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ae],shadow:[Ae],spacing:["px",H],text:[Ae],"text-shadow":[Ae],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ot,j,O,h]}],container:["container"],columns:[{columns:[H,j,O,l]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"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:E()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:$()}],"inset-x":[{"inset-x":$()}],"inset-y":[{"inset-y":$()}],start:[{start:$()}],end:[{end:$()}],top:[{top:$()}],right:[{right:$()}],bottom:[{bottom:$()}],left:[{left:$()}],visibility:["visible","invisible","collapse"],z:[{z:[ke,"auto",O,j]}],basis:[{basis:[ot,"full","auto",l,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[H,ot,"auto","initial","none",j]}],grow:[{grow:["",H,O,j]}],shrink:[{shrink:["",H,O,j]}],order:[{order:[ke,"first","last","none",O,j]}],"grid-cols":[{"grid-cols":F()}],"col-start-end":[{col:B()}],"col-start":[{"col-start":k()}],"col-end":[{"col-end":k()}],"grid-rows":[{"grid-rows":F()}],"row-start-end":[{row:B()}],"row-start":[{"row-start":k()}],"row-end":[{"row-end":k()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":z()}],"auto-rows":[{"auto-rows":z()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...D(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...D()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":D()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:I()}],mx:[{mx:I()}],my:[{my:I()}],ms:[{ms:I()}],me:[{me:I()}],mt:[{mt:I()}],mr:[{mr:I()}],mb:[{mb:I()}],ml:[{ml:I()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],w:[{w:[l,"screen",...W()]}],"min-w":[{"min-w":[l,"screen","none",...W()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[i]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh",...W()]}],"font-size":[{text:["base",n,ht,He]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,O,Zn]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",qn,j]}],"font-family":[{font:[Hm,j,t]}],"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:[r,O,j]}],"line-clamp":[{"line-clamp":[H,"none",O,Zn]}],leading:[{leading:[s,...P()]}],"list-image":[{"list-image":["none",O,j]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",O,j]}],"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:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:[H,"from-font","auto",O,He]}],"text-decoration-color":[{decoration:C()}],"underline-offset":[{"underline-offset":[H,"auto",O,j]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",O,j]}],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",O,j]}],"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:K()}],"bg-size":[{bg:q()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ke,O,j],radial:["",O,j],conic:[ke,O,j]},Km,Gm]}],"bg-color":[{bg:C()}],"gradient-from-pos":[{from:ee()}],"gradient-via-pos":[{via:ee()}],"gradient-to-pos":[{to:ee()}],"gradient-from":[{from:C()}],"gradient-via":[{via:C()}],"gradient-to":[{to:C()}],rounded:[{rounded:Y()}],"rounded-s":[{"rounded-s":Y()}],"rounded-e":[{"rounded-e":Y()}],"rounded-t":[{"rounded-t":Y()}],"rounded-r":[{"rounded-r":Y()}],"rounded-b":[{"rounded-b":Y()}],"rounded-l":[{"rounded-l":Y()}],"rounded-ss":[{"rounded-ss":Y()}],"rounded-se":[{"rounded-se":Y()}],"rounded-ee":[{"rounded-ee":Y()}],"rounded-es":[{"rounded-es":Y()}],"rounded-tl":[{"rounded-tl":Y()}],"rounded-tr":[{"rounded-tr":Y()}],"rounded-br":[{"rounded-br":Y()}],"rounded-bl":[{"rounded-bl":Y()}],"border-w":[{border:X()}],"border-w-x":[{"border-x":X()}],"border-w-y":[{"border-y":X()}],"border-w-s":[{"border-s":X()}],"border-w-e":[{"border-e":X()}],"border-w-t":[{"border-t":X()}],"border-w-r":[{"border-r":X()}],"border-w-b":[{"border-b":X()}],"border-w-l":[{"border-l":X()}],"divide-x":[{"divide-x":X()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":X()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...te(),"hidden","none"]}],"divide-style":[{divide:[...te(),"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-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:[...te(),"none","hidden"]}],"outline-offset":[{"outline-offset":[H,O,j]}],"outline-w":[{outline:["",H,ht,He]}],"outline-color":[{outline:C()}],shadow:[{shadow:["","none",f,zt,Wt]}],"shadow-color":[{shadow:C()}],"inset-shadow":[{"inset-shadow":["none",p,zt,Wt]}],"inset-shadow-color":[{"inset-shadow":C()}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:C()}],"ring-offset-w":[{"ring-offset":[H,He]}],"ring-offset-color":[{"ring-offset":C()}],"inset-ring-w":[{"inset-ring":X()}],"inset-ring-color":[{"inset-ring":C()}],"text-shadow":[{"text-shadow":["none",g,zt,Wt]}],"text-shadow-color":[{"text-shadow":C()}],opacity:[{opacity:[H,O,j]}],"mix-blend":[{"mix-blend":[...ae(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ae()}],"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":[H]}],"mask-image-linear-from-pos":[{"mask-linear-from":_()}],"mask-image-linear-to-pos":[{"mask-linear-to":_()}],"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":_()}],"mask-image-t-to-pos":[{"mask-t-to":_()}],"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":_()}],"mask-image-r-to-pos":[{"mask-r-to":_()}],"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":_()}],"mask-image-b-to-pos":[{"mask-b-to":_()}],"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":_()}],"mask-image-l-to-pos":[{"mask-l-to":_()}],"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":_()}],"mask-image-x-to-pos":[{"mask-x-to":_()}],"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":_()}],"mask-image-y-to-pos":[{"mask-y-to":_()}],"mask-image-y-from-color":[{"mask-y-from":C()}],"mask-image-y-to-color":[{"mask-y-to":C()}],"mask-image-radial":[{"mask-radial":[O,j]}],"mask-image-radial-from-pos":[{"mask-radial-from":_()}],"mask-image-radial-to-pos":[{"mask-radial-to":_()}],"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":S()}],"mask-image-conic-pos":[{"mask-conic":[H]}],"mask-image-conic-from-pos":[{"mask-conic-from":_()}],"mask-image-conic-to-pos":[{"mask-conic-to":_()}],"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:K()}],"mask-size":[{mask:q()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",O,j]}],filter:[{filter:["","none",O,j]}],blur:[{blur:J()}],brightness:[{brightness:[H,O,j]}],contrast:[{contrast:[H,O,j]}],"drop-shadow":[{"drop-shadow":["","none",v,zt,Wt]}],"drop-shadow-color":[{"drop-shadow":C()}],grayscale:[{grayscale:["",H,O,j]}],"hue-rotate":[{"hue-rotate":[H,O,j]}],invert:[{invert:["",H,O,j]}],saturate:[{saturate:[H,O,j]}],sepia:[{sepia:["",H,O,j]}],"backdrop-filter":[{"backdrop-filter":["","none",O,j]}],"backdrop-blur":[{"backdrop-blur":J()}],"backdrop-brightness":[{"backdrop-brightness":[H,O,j]}],"backdrop-contrast":[{"backdrop-contrast":[H,O,j]}],"backdrop-grayscale":[{"backdrop-grayscale":["",H,O,j]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[H,O,j]}],"backdrop-invert":[{"backdrop-invert":["",H,O,j]}],"backdrop-opacity":[{"backdrop-opacity":[H,O,j]}],"backdrop-saturate":[{"backdrop-saturate":[H,O,j]}],"backdrop-sepia":[{"backdrop-sepia":["",H,O,j]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",O,j]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[H,"initial",O,j]}],ease:[{ease:["linear","initial",y,O,j]}],delay:[{delay:[H,O,j]}],animate:[{animate:["none",b,O,j]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,O,j]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:oe()}],"rotate-x":[{"rotate-x":oe()}],"rotate-y":[{"rotate-y":oe()}],"rotate-z":[{"rotate-z":oe()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:Q()}],"skew-x":[{"skew-x":Q()}],"skew-y":[{"skew-y":Q()}],transform:[{transform:[O,j,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ne()}],"translate-x":[{"translate-x":ne()}],"translate-y":[{"translate-y":ne()}],"translate-z":[{"translate-z":ne()}],"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",O,j]}],"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":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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",O,j]}],fill:[{fill:["none",...C()]}],"stroke-w":[{stroke:[H,ht,He,Zn]}],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","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-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-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-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-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"]}},qm=(e,{cacheSize:t,prefix:n,experimentalParseClassName:o,extend:r={},override:s={}})=>(vt(e,"cacheSize",t),vt(e,"prefix",n),vt(e,"experimentalParseClassName",o),Gt(e.theme,s.theme),Gt(e.classGroups,s.classGroups),Gt(e.conflictingClassGroups,s.conflictingClassGroups),Gt(e.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),vt(e,"orderSensitiveModifiers",s.orderSensitiveModifiers),Ht(e.theme,r.theme),Ht(e.classGroups,r.classGroups),Ht(e.conflictingClassGroups,r.conflictingClassGroups),Ht(e.conflictingClassGroupModifiers,r.conflictingClassGroupModifiers),ca(e,r,"orderSensitiveModifiers"),e),vt=(e,t,n)=>{n!==void 0&&(e[t]=n)},Gt=(e,t)=>{if(t)for(const n in t)vt(e,n,t[n])},Ht=(e,t)=>{if(t)for(const n in t)ca(e,t,n)},ca=(e,t,n)=>{const o=t[n];o!==void 0&&(e[n]=e[n]?e[n].concat(o):o)},Zm=(e,...t)=>typeof e=="function"?Tr(Mr,e,...t):Tr(()=>qm(Mr(),e),...t),Jm=Zm({extend:{classGroups:{"font-size":[{text:["hero","h1","h2","h3","h4","lead","semi-lead","body-lg","body","descriptive","small","label","label-sm"]}]}}});function T(...e){return Jm(qs(e))}var Qm=Symbol.for("react.lazy"),en=a[" use ".trim().toString()];function eg(e){return typeof e=="object"&&e!==null&&"then"in e}function da(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Qm&&"_payload"in e&&eg(e._payload)}function ua(e){const t=tg(e),n=a.forwardRef((o,r)=>{let{children:s,...i}=o;da(s)&&typeof en=="function"&&(s=en(s._payload));const l=a.Children.toArray(s),d=l.find(og);if(d){const u=d.props.children,f=l.map(p=>p===d?a.Children.count(u)>1?a.Children.only(null):a.isValidElement(u)?u.props.children:null:p);return c.jsx(t,{...i,ref:r,children:a.isValidElement(u)?a.cloneElement(u,void 0,f):null})}return c.jsx(t,{...i,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}var Se=ua("Slot");function tg(e){const t=a.forwardRef((n,o)=>{let{children:r,...s}=n;if(da(r)&&typeof en=="function"&&(r=en(r._payload)),a.isValidElement(r)){const i=sg(r),l=rg(s,r.props);return r.type!==a.Fragment&&(l.ref=o?Ne(o,i):i),a.cloneElement(r,l)}return a.Children.count(r)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ng=Symbol("radix.slottable");function og(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ng}function rg(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...l)=>{const d=s(...l);return r(...l),d}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function sg(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const mn=U("text-body focus-visible:ring-sunflower inline-flex items-center justify-center font-sans font-normal whitespace-nowrap transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{primary:"bg-sunflower text-primary hover:bg-sunflower-hover active:bg-sunflower-hover",secondary:"border-border bg-border text-primary active:bg-alt border hover:bg-white",ghost:"text-primary hover:bg-alt active:bg-contrast"},size:{sm:"rounded-pill text-small px-5 py-1",default:"rounded-pill text-small px-8 py-1.5",lg:"rounded-pill text-body px-12 py-2",icon:"h-10 w-10 rounded-full"}},defaultVariants:{variant:"primary",size:"default"}}),fa=a.forwardRef(({className:e,variant:t,size:n,asChild:o=!1,...r},s)=>{const i=o?Se:"button";return c.jsx(i,{className:T(mn({variant:t,size:n,className:e})),ref:s,...r})});fa.displayName="Button";const ag=nm,ig=om,pa=rm,Po=a.forwardRef(({className:e,...t},n)=>c.jsx(sm,{ref:n,className:T("fixed inset-0 z-50 bg-black/50","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","duration-200",e),...t}));Po.displayName="AlertDialogOverlay";const ma=U(["fixed top-1/2 left-1/2 z-50 -translate-x-1/2 -translate-y-1/2","bg-main grid w-full gap-4 p-6 shadow-lg","max-h-[85vh] overflow-y-auto","border-border rounded-lg border","focus-visible:ring-sunflower focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%]","data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]","duration-200"],{variants:{size:{sm:"max-w-[400px]",default:"max-w-[500px]",lg:"max-w-[640px]"}},defaultVariants:{size:"default"}}),ga=a.forwardRef(({className:e,size:t,...n},o)=>c.jsxs(pa,{children:[c.jsx(Po,{}),c.jsx(am,{ref:o,className:T(ma({size:t}),e),...n})]}));ga.displayName="AlertDialogContent";const ha=a.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:T("flex flex-col space-y-2 text-center sm:text-left",e),...t}));ha.displayName="AlertDialogHeader";const va=a.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:T("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t}));va.displayName="AlertDialogFooter";const xa=a.forwardRef(({className:e,...t},n)=>c.jsx(cm,{ref:n,className:T("text-primary text-lg leading-none tracking-tight",e),...t}));xa.displayName="AlertDialogTitle";const ba=a.forwardRef(({className:e,...t},n)=>c.jsx(dm,{ref:n,className:T("text-secondary text-sm",e),...t}));ba.displayName="AlertDialogDescription";const ya=a.forwardRef(({className:e,variant:t="primary",size:n="default",...o},r)=>c.jsx(im,{ref:r,className:T(mn({variant:t,size:n}),e),...o}));ya.displayName="AlertDialogAction";const wa=a.forwardRef(({className:e,variant:t="secondary",size:n="default",...o},r)=>c.jsx(lm,{ref:r,className:T(mn({variant:t,size:n}),"mt-2 sm:mt-0",e),...o}));wa.displayName="AlertDialogCancel";const Ca=U("focus-visible:ring-sunflower inline-flex items-center justify-center font-sans font-normal whitespace-nowrap transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",{variants:{variant:{sunflower:"bg-sunflower text-primary","lemon-meringue":"bg-lemon-meringue text-primary border-tertiary border",vanilla:"bg-vanilla text-primary border-tertiary border",eggshell:"bg-eggshell text-primary border-tertiary border","warm-purple":"bg-warm-purple text-white","cool-purple":"bg-cool-purple text-white","electric-blue":"bg-electric-blue text-white","deep-blue":"bg-deep-blue text-white",error:"bg-error text-white",secondary:"border-border bg-alt text-secondary border"},size:{sm:"rounded-pill px-2 py-0.5 text-xs",md:"rounded-pill px-2.5 py-1 text-xs",lg:"rounded-pill text-body px-3.5 py-1 text-sm",xl:"rounded-pill text-body px-4 py-1.5 text-xl"}},defaultVariants:{variant:"sunflower",size:"md"}}),Sa=a.forwardRef(({className:e,variant:t,size:n,asChild:o=!1,...r},s)=>{const i=o?Se:"span";return c.jsx(i,{className:T(Ca({variant:t,size:n,className:e})),ref:s,...r})});Sa.displayName="Badge";const Ra=U("text-small flex items-center font-sans",{variants:{size:{sm:"text-label gap-1.5",default:"text-small gap-2",lg:"text-body gap-2.5"}},defaultVariants:{size:"default"}}),so=U("focus-visible:ring-sunflower inline-flex items-center transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",{variants:{isCurrentPage:{true:"cursor-default text-black",false:"text-quaternary hover:text-primary"}},defaultVariants:{isCurrentPage:!1}}),Ea=a.forwardRef(({className:e,size:t,separator:n=c.jsx(No,{}),children:o,...r},s)=>{const i=a.Children.toArray(o).filter(a.isValidElement);return c.jsx("nav",{ref:s,"aria-label":"Breadcrumb",...r,children:c.jsx("ol",{className:T(Ra({size:t,className:e})),children:i.map((l,d)=>c.jsxs("li",{className:"inline-flex items-center gap-2",children:[l,d<i.length-1&&n]},d))})})});Ea.displayName="Breadcrumbs";const Ta=a.forwardRef(({className:e,asChild:t=!1,isCurrentPage:n=!1,...o},r)=>{if(n)return c.jsx("span",{className:T(so({isCurrentPage:!0,className:e})),"aria-current":"page",children:o.children});const s=t?Se:"a";return c.jsx(s,{ref:r,className:T(so({isCurrentPage:!1,className:e})),...o})});Ta.displayName="BreadcrumbItem";const No=a.forwardRef(({className:e,children:t,...n},o)=>c.jsx("span",{ref:o,role:"presentation","aria-hidden":"true",className:T("text-tertiary",e),...n,children:t??c.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",children:c.jsx("path",{d:"M6 12L10 8L6 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}));No.displayName="BreadcrumbSeparator";const Pa=U("focus-visible:ring-sunflower rounded transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",{variants:{variant:{default:"",elevated:"shadow",ghost:""},padding:{none:"p-0",sm:"p-4",default:"p-6",lg:"p-8"},bg:{card:"bg-card",main:"bg-main",alt:"bg-alt",contrast:"bg-contrast",transparent:"bg-transparent",sunflower:"bg-sunflower","sunflower-hover":"bg-sunflower-hover","lemon-meringue":"bg-lemon-meringue",vanilla:"bg-vanilla",eggshell:"bg-eggshell","warm-purple":"bg-warm-purple","cool-purple":"bg-cool-purple","electric-blue":"bg-electric-blue","deep-blue":"bg-deep-blue",error:"bg-error"}},defaultVariants:{variant:"default",padding:"default",bg:"alt"}}),Na=a.forwardRef(({className:e,variant:t,padding:n,bg:o,asChild:r=!1,...s},i)=>{const l=r?Se:"div";return c.jsx(l,{className:T(Pa({variant:t,padding:n,bg:o,className:e})),ref:i,...s})});Na.displayName="Card";function gn(e){const t=a.useRef({value:e,previous:e});return a.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function hn(e){const[t,n]=a.useState(void 0);return se(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const s=r[0];let i,l;if("borderBoxSize"in s){const d=s.borderBoxSize,u=Array.isArray(d)?d[0]:d;i=u.inlineSize,l=u.blockSize}else i=e.offsetWidth,l=e.offsetHeight;n({width:i,height:l})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var vn="Checkbox",[lg]=le(vn),[cg,Mo]=lg(vn);function dg(e){const{__scopeCheckbox:t,checked:n,children:o,defaultChecked:r,disabled:s,form:i,name:l,onCheckedChange:d,required:u,value:f="on",internal_do_not_use_render:p}=e,[g,v]=he({prop:n,defaultProp:r??!1,onChange:d,caller:vn}),[x,m]=a.useState(null),[h,y]=a.useState(null),b=a.useRef(!1),w=x?!!i||!!x.closest("form"):!0,S={checked:g,disabled:s,setChecked:v,control:x,setControl:m,name:l,form:i,value:f,hasConsumerStoppedPropagationRef:b,required:u,defaultChecked:Oe(r)?!1:r,isFormControl:w,bubbleInput:h,setBubbleInput:y};return c.jsx(cg,{scope:t,...S,children:ug(p)?p(S):o})}var Ma="CheckboxTrigger",Aa=a.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...o},r)=>{const{control:s,value:i,disabled:l,checked:d,required:u,setControl:f,setChecked:p,hasConsumerStoppedPropagationRef:g,isFormControl:v,bubbleInput:x}=Mo(Ma,e),m=G(r,f),h=a.useRef(d);return a.useEffect(()=>{const y=s?.form;if(y){const b=()=>p(h.current);return y.addEventListener("reset",b),()=>y.removeEventListener("reset",b)}},[s,p]),c.jsx(L.button,{type:"button",role:"checkbox","aria-checked":Oe(d)?"mixed":d,"aria-required":u,"data-state":Oa(d),"data-disabled":l?"":void 0,disabled:l,value:i,...o,ref:m,onKeyDown:A(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:A(n,y=>{p(b=>Oe(b)?!0:!b),x&&v&&(g.current=y.isPropagationStopped(),g.current||y.stopPropagation())})})});Aa.displayName=Ma;var Da=a.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:o,checked:r,defaultChecked:s,required:i,disabled:l,value:d,onCheckedChange:u,form:f,...p}=e;return c.jsx(dg,{__scopeCheckbox:n,checked:r,defaultChecked:s,disabled:l,required:i,onCheckedChange:u,name:o,form:f,value:d,internal_do_not_use_render:({isFormControl:g})=>c.jsxs(c.Fragment,{children:[c.jsx(Aa,{...p,ref:t,__scopeCheckbox:n}),g&&c.jsx(ja,{__scopeCheckbox:n})]})})});Da.displayName=vn;var _a="CheckboxIndicator",Ia=a.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:o,...r}=e,s=Mo(_a,n);return c.jsx(fe,{present:o||Oe(s.checked)||s.checked===!0,children:c.jsx(L.span,{"data-state":Oa(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:t,style:{pointerEvents:"none",...e.style}})})});Ia.displayName=_a;var ka="CheckboxBubbleInput",ja=a.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:o,hasConsumerStoppedPropagationRef:r,checked:s,defaultChecked:i,required:l,disabled:d,name:u,value:f,form:p,bubbleInput:g,setBubbleInput:v}=Mo(ka,e),x=G(n,v),m=gn(s),h=hn(o);a.useEffect(()=>{const b=g;if(!b)return;const w=window.HTMLInputElement.prototype,E=Object.getOwnPropertyDescriptor(w,"checked").set,N=!r.current;if(m!==s&&E){const R=new Event("click",{bubbles:N});b.indeterminate=Oe(s),E.call(b,Oe(s)?!1:s),b.dispatchEvent(R)}},[g,m,s,r]);const y=a.useRef(Oe(s)?!1:s);return c.jsx(L.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??y.current,required:l,disabled:d,name:u,value:f,form:p,...t,tabIndex:-1,ref:x,style:{...t.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});ja.displayName=ka;function ug(e){return typeof e=="function"}function Oe(e){return e==="indeterminate"}function Oa(e){return Oe(e)?"indeterminate":e?"checked":"unchecked"}const $a=a.forwardRef(({className:e,...t},n)=>c.jsx(Da,{ref:n,className:T("border-border bg-card peer h-5 w-5 shrink-0 rounded border transition-colors","focus-visible:ring-sunflower focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none","disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:border-sunflower data-[state=checked]:bg-sunflower data-[state=checked]:text-primary",e),...t,children:c.jsx(Ia,{className:T("flex items-center justify-center text-current"),children:c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",className:"h-3.5 w-3.5",children:c.jsx("polyline",{points:"20 6 9 17 4 12"})})})}));$a.displayName="Checkbox";function Ar(e){const t=fg(e),n=a.forwardRef((o,r)=>{const{children:s,...i}=o,l=a.Children.toArray(s),d=l.find(mg);if(d){const u=d.props.children,f=l.map(p=>p===d?a.Children.count(u)>1?a.Children.only(null):a.isValidElement(u)?u.props.children:null:p);return c.jsx(t,{...i,ref:r,children:a.isValidElement(u)?a.cloneElement(u,void 0,f):null})}return c.jsx(t,{...i,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function fg(e){const t=a.forwardRef((n,o)=>{const{children:r,...s}=n;if(a.isValidElement(r)){const i=hg(r),l=gg(s,r.props);return r.type!==a.Fragment&&(l.ref=o?Ne(o,i):i),a.cloneElement(r,l)}return a.Children.count(r)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var pg=Symbol("radix.slottable");function mg(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===pg}function gg(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...l)=>{const d=s(...l);return r(...l),d}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function hg(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function xn(e){const t=e+"CollectionProvider",[n,o]=le(t),[r,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{const{scope:h,children:y}=m,b=ue.useRef(null),w=ue.useRef(new Map).current;return c.jsx(r,{scope:h,itemMap:w,collectionRef:b,children:y})};i.displayName=t;const l=e+"CollectionSlot",d=Ar(l),u=ue.forwardRef((m,h)=>{const{scope:y,children:b}=m,w=s(l,y),S=G(h,w.collectionRef);return c.jsx(d,{ref:S,children:b})});u.displayName=l;const f=e+"CollectionItemSlot",p="data-radix-collection-item",g=Ar(f),v=ue.forwardRef((m,h)=>{const{scope:y,children:b,...w}=m,S=ue.useRef(null),E=G(h,S),N=s(f,y);return ue.useEffect(()=>(N.itemMap.set(S,{ref:S,...w}),()=>{N.itemMap.delete(S)})),c.jsx(g,{[p]:"",ref:E,children:b})});v.displayName=f;function x(m){const h=s(e+"CollectionConsumer",m);return ue.useCallback(()=>{const b=h.collectionRef.current;if(!b)return[];const w=Array.from(b.querySelectorAll(`[${p}]`));return Array.from(h.itemMap.values()).sort((N,R)=>w.indexOf(N.ref.current)-w.indexOf(R.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:i,Slot:u,ItemSlot:v},x,o]}var vg=a.createContext(void 0);function bn(e){const t=a.useContext(vg);return e||t||"ltr"}const xg=["top","right","bottom","left"],$e=Math.min,pe=Math.max,tn=Math.round,Ut=Math.floor,Te=e=>({x:e,y:e}),bg={left:"right",right:"left",bottom:"top",top:"bottom"},yg={start:"end",end:"start"};function ao(e,t,n){return pe(e,$e(t,n))}function De(e,t){return typeof e=="function"?e(t):e}function _e(e){return e.split("-")[0]}function ft(e){return e.split("-")[1]}function Ao(e){return e==="x"?"y":"x"}function Do(e){return e==="y"?"height":"width"}const wg=new Set(["top","bottom"]);function Ee(e){return wg.has(_e(e))?"y":"x"}function _o(e){return Ao(Ee(e))}function Cg(e,t,n){n===void 0&&(n=!1);const o=ft(e),r=_o(e),s=Do(r);let i=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=nn(i)),[i,nn(i)]}function Sg(e){const t=nn(e);return[io(e),t,io(t)]}function io(e){return e.replace(/start|end/g,t=>yg[t])}const Dr=["left","right"],_r=["right","left"],Rg=["top","bottom"],Eg=["bottom","top"];function Tg(e,t,n){switch(e){case"top":case"bottom":return n?t?_r:Dr:t?Dr:_r;case"left":case"right":return t?Rg:Eg;default:return[]}}function Pg(e,t,n,o){const r=ft(e);let s=Tg(_e(e),n==="start",o);return r&&(s=s.map(i=>i+"-"+r),t&&(s=s.concat(s.map(io)))),s}function nn(e){return e.replace(/left|right|bottom|top/g,t=>bg[t])}function Ng(e){return{top:0,right:0,bottom:0,left:0,...e}}function La(e){return typeof e!="number"?Ng(e):{top:e,right:e,bottom:e,left:e}}function on(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function Ir(e,t,n){let{reference:o,floating:r}=e;const s=Ee(t),i=_o(t),l=Do(i),d=_e(t),u=s==="y",f=o.x+o.width/2-r.width/2,p=o.y+o.height/2-r.height/2,g=o[l]/2-r[l]/2;let v;switch(d){case"top":v={x:f,y:o.y-r.height};break;case"bottom":v={x:f,y:o.y+o.height};break;case"right":v={x:o.x+o.width,y:p};break;case"left":v={x:o.x-r.width,y:p};break;default:v={x:o.x,y:o.y}}switch(ft(t)){case"start":v[i]-=g*(n&&u?-1:1);break;case"end":v[i]+=g*(n&&u?-1:1);break}return v}async function Mg(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:s,rects:i,elements:l,strategy:d}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:g=!1,padding:v=0}=De(t,e),x=La(v),h=l[g?p==="floating"?"reference":"floating":p],y=on(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(h)))==null||n?h:h.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:u,rootBoundary:f,strategy:d})),b=p==="floating"?{x:o,y:r,width:i.floating.width,height:i.floating.height}:i.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),S=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},E=on(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:b,offsetParent:w,strategy:d}):b);return{top:(y.top-E.top+x.top)/S.y,bottom:(E.bottom-y.bottom+x.bottom)/S.y,left:(y.left-E.left+x.left)/S.x,right:(E.right-y.right+x.right)/S.x}}const Ag=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:i}=n,l=s.filter(Boolean),d=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:r}),{x:f,y:p}=Ir(u,o,d),g=o,v={},x=0;for(let h=0;h<l.length;h++){var m;const{name:y,fn:b}=l[h],{x:w,y:S,data:E,reset:N}=await b({x:f,y:p,initialPlacement:o,placement:g,strategy:r,middlewareData:v,rects:u,platform:{...i,detectOverflow:(m=i.detectOverflow)!=null?m:Mg},elements:{reference:e,floating:t}});f=w??f,p=S??p,v={...v,[y]:{...v[y],...E}},N&&x<=50&&(x++,typeof N=="object"&&(N.placement&&(g=N.placement),N.rects&&(u=N.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:r}):N.rects),{x:f,y:p}=Ir(u,g,d)),h=-1)}return{x:f,y:p,placement:g,strategy:r,middlewareData:v}},Dg=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:s,platform:i,elements:l,middlewareData:d}=t,{element:u,padding:f=0}=De(e,t)||{};if(u==null)return{};const p=La(f),g={x:n,y:o},v=_o(r),x=Do(v),m=await i.getDimensions(u),h=v==="y",y=h?"top":"left",b=h?"bottom":"right",w=h?"clientHeight":"clientWidth",S=s.reference[x]+s.reference[v]-g[v]-s.floating[x],E=g[v]-s.reference[v],N=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let R=N?N[w]:0;(!R||!await(i.isElement==null?void 0:i.isElement(N)))&&(R=l.floating[w]||s.floating[x]);const P=S/2-E/2,$=R/2-m[x]/2-1,F=$e(p[y],$),B=$e(p[b],$),k=F,z=R-m[x]-B,D=R/2-m[x]/2+P,V=ao(k,D,z),I=!d.arrow&&ft(r)!=null&&D!==V&&s.reference[x]/2-(D<k?F:B)-m[x]/2<0,W=I?D<k?D-k:D-z:0;return{[v]:g[v]+W,data:{[v]:V,centerOffset:D-V-W,...I&&{alignmentOffset:W}},reset:I}}}),_g=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:s,rects:i,initialPlacement:l,platform:d,elements:u}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:m=!0,...h}=De(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=_e(r),b=Ee(l),w=_e(l)===l,S=await(d.isRTL==null?void 0:d.isRTL(u.floating)),E=g||(w||!m?[nn(l)]:Sg(l)),N=x!=="none";!g&&N&&E.push(...Pg(l,m,x,S));const R=[l,...E],P=await d.detectOverflow(t,h),$=[];let F=((o=s.flip)==null?void 0:o.overflows)||[];if(f&&$.push(P[y]),p){const D=Cg(r,i,S);$.push(P[D[0]],P[D[1]])}if(F=[...F,{placement:r,overflows:$}],!$.every(D=>D<=0)){var B,k;const D=(((B=s.flip)==null?void 0:B.index)||0)+1,V=R[D];if(V&&(!(p==="alignment"?b!==Ee(V):!1)||F.every(C=>Ee(C.placement)===b?C.overflows[0]>0:!0)))return{data:{index:D,overflows:F},reset:{placement:V}};let I=(k=F.filter(W=>W.overflows[0]<=0).sort((W,C)=>W.overflows[1]-C.overflows[1])[0])==null?void 0:k.placement;if(!I)switch(v){case"bestFit":{var z;const W=(z=F.filter(C=>{if(N){const M=Ee(C.placement);return M===b||M==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(M=>M>0).reduce((M,K)=>M+K,0)]).sort((C,M)=>C[1]-M[1])[0])==null?void 0:z[0];W&&(I=W);break}case"initialPlacement":I=l;break}if(r!==I)return{reset:{placement:I}}}return{}}}};function kr(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function jr(e){return xg.some(t=>e[t]>=0)}const Ig=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:o}=t,{strategy:r="referenceHidden",...s}=De(e,t);switch(r){case"referenceHidden":{const i=await o.detectOverflow(t,{...s,elementContext:"reference"}),l=kr(i,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:jr(l)}}}case"escaped":{const i=await o.detectOverflow(t,{...s,altBoundary:!0}),l=kr(i,n.floating);return{data:{escapedOffsets:l,escaped:jr(l)}}}default:return{}}}}},Fa=new Set(["left","top"]);async function kg(e,t){const{placement:n,platform:o,elements:r}=e,s=await(o.isRTL==null?void 0:o.isRTL(r.floating)),i=_e(n),l=ft(n),d=Ee(n)==="y",u=Fa.has(i)?-1:1,f=s&&d?-1:1,p=De(t,e);let{mainAxis:g,crossAxis:v,alignmentAxis:x}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&typeof x=="number"&&(v=l==="end"?x*-1:x),d?{x:v*f,y:g*u}:{x:g*u,y:v*f}}const jg=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:s,placement:i,middlewareData:l}=t,d=await kg(t,e);return i===((n=l.offset)==null?void 0:n.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:r+d.x,y:s+d.y,data:{...d,placement:i}}}}},Og=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r,platform:s}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:d={fn:y=>{let{x:b,y:w}=y;return{x:b,y:w}}},...u}=De(e,t),f={x:n,y:o},p=await s.detectOverflow(t,u),g=Ee(_e(r)),v=Ao(g);let x=f[v],m=f[g];if(i){const y=v==="y"?"top":"left",b=v==="y"?"bottom":"right",w=x+p[y],S=x-p[b];x=ao(w,x,S)}if(l){const y=g==="y"?"top":"left",b=g==="y"?"bottom":"right",w=m+p[y],S=m-p[b];m=ao(w,m,S)}const h=d.fn({...t,[v]:x,[g]:m});return{...h,data:{x:h.x-n,y:h.y-o,enabled:{[v]:i,[g]:l}}}}}},$g=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:s,middlewareData:i}=t,{offset:l=0,mainAxis:d=!0,crossAxis:u=!0}=De(e,t),f={x:n,y:o},p=Ee(r),g=Ao(p);let v=f[g],x=f[p];const m=De(l,t),h=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(d){const w=g==="y"?"height":"width",S=s.reference[g]-s.floating[w]+h.mainAxis,E=s.reference[g]+s.reference[w]-h.mainAxis;v<S?v=S:v>E&&(v=E)}if(u){var y,b;const w=g==="y"?"width":"height",S=Fa.has(_e(r)),E=s.reference[p]-s.floating[w]+(S&&((y=i.offset)==null?void 0:y[p])||0)+(S?0:h.crossAxis),N=s.reference[p]+s.reference[w]+(S?0:((b=i.offset)==null?void 0:b[p])||0)-(S?h.crossAxis:0);x<E?x=E:x>N&&(x=N)}return{[g]:v,[p]:x}}}},Lg=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:s,platform:i,elements:l}=t,{apply:d=()=>{},...u}=De(e,t),f=await i.detectOverflow(t,u),p=_e(r),g=ft(r),v=Ee(r)==="y",{width:x,height:m}=s.floating;let h,y;p==="top"||p==="bottom"?(h=p,y=g===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(y=p,h=g==="end"?"top":"bottom");const b=m-f.top-f.bottom,w=x-f.left-f.right,S=$e(m-f[h],b),E=$e(x-f[y],w),N=!t.middlewareData.shift;let R=S,P=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=w),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(R=b),N&&!g){const F=pe(f.left,0),B=pe(f.right,0),k=pe(f.top,0),z=pe(f.bottom,0);v?P=x-2*(F!==0||B!==0?F+B:pe(f.left,f.right)):R=m-2*(k!==0||z!==0?k+z:pe(f.top,f.bottom))}await d({...t,availableWidth:P,availableHeight:R});const $=await i.getDimensions(l.floating);return x!==$.width||m!==$.height?{reset:{rects:!0}}:{}}}};function yn(){return typeof window<"u"}function pt(e){return Va(e)?(e.nodeName||"").toLowerCase():"#document"}function ge(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Me(e){var t;return(t=(Va(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Va(e){return yn()?e instanceof Node||e instanceof ge(e).Node:!1}function ye(e){return yn()?e instanceof Element||e instanceof ge(e).Element:!1}function Pe(e){return yn()?e instanceof HTMLElement||e instanceof ge(e).HTMLElement:!1}function Or(e){return!yn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ge(e).ShadowRoot}const Fg=new Set(["inline","contents"]);function Pt(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=we(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!Fg.has(r)}const Vg=new Set(["table","td","th"]);function Bg(e){return Vg.has(pt(e))}const Wg=[":popover-open",":modal"];function wn(e){return Wg.some(t=>{try{return e.matches(t)}catch{return!1}})}const zg=["transform","translate","scale","rotate","perspective"],Gg=["transform","translate","scale","rotate","perspective","filter"],Hg=["paint","layout","strict","content"];function Io(e){const t=ko(),n=ye(e)?we(e):e;return zg.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Gg.some(o=>(n.willChange||"").includes(o))||Hg.some(o=>(n.contain||"").includes(o))}function Ug(e){let t=Le(e);for(;Pe(t)&&!it(t);){if(Io(t))return t;if(wn(t))return null;t=Le(t)}return null}function ko(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Kg=new Set(["html","body","#document"]);function it(e){return Kg.has(pt(e))}function we(e){return ge(e).getComputedStyle(e)}function Cn(e){return ye(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Le(e){if(pt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Or(e)&&e.host||Me(e);return Or(t)?t.host:t}function Ba(e){const t=Le(e);return it(t)?e.ownerDocument?e.ownerDocument.body:e.body:Pe(t)&&Pt(t)?t:Ba(t)}function yt(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=Ba(e),s=r===((o=e.ownerDocument)==null?void 0:o.body),i=ge(r);if(s){const l=lo(i);return t.concat(i,i.visualViewport||[],Pt(r)?r:[],l&&n?yt(l):[])}return t.concat(r,yt(r,[],n))}function lo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Wa(e){const t=we(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=Pe(e),s=r?e.offsetWidth:n,i=r?e.offsetHeight:o,l=tn(n)!==s||tn(o)!==i;return l&&(n=s,o=i),{width:n,height:o,$:l}}function jo(e){return ye(e)?e:e.contextElement}function at(e){const t=jo(e);if(!Pe(t))return Te(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:s}=Wa(t);let i=(s?tn(n.width):n.width)/o,l=(s?tn(n.height):n.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const Yg=Te(0);function za(e){const t=ge(e);return!ko()||!t.visualViewport?Yg:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Xg(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ge(e)?!1:t}function Ye(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=jo(e);let i=Te(1);t&&(o?ye(o)&&(i=at(o)):i=at(e));const l=Xg(s,n,o)?za(s):Te(0);let d=(r.left+l.x)/i.x,u=(r.top+l.y)/i.y,f=r.width/i.x,p=r.height/i.y;if(s){const g=ge(s),v=o&&ye(o)?ge(o):o;let x=g,m=lo(x);for(;m&&o&&v!==x;){const h=at(m),y=m.getBoundingClientRect(),b=we(m),w=y.left+(m.clientLeft+parseFloat(b.paddingLeft))*h.x,S=y.top+(m.clientTop+parseFloat(b.paddingTop))*h.y;d*=h.x,u*=h.y,f*=h.x,p*=h.y,d+=w,u+=S,x=ge(m),m=lo(x)}}return on({width:f,height:p,x:d,y:u})}function Sn(e,t){const n=Cn(e).scrollLeft;return t?t.left+n:Ye(Me(e)).left+n}function Ga(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Sn(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function qg(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const s=r==="fixed",i=Me(o),l=t?wn(t.floating):!1;if(o===i||l&&s)return n;let d={scrollLeft:0,scrollTop:0},u=Te(1);const f=Te(0),p=Pe(o);if((p||!p&&!s)&&((pt(o)!=="body"||Pt(i))&&(d=Cn(o)),Pe(o))){const v=Ye(o);u=at(o),f.x=v.x+o.clientLeft,f.y=v.y+o.clientTop}const g=i&&!p&&!s?Ga(i,d):Te(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-d.scrollLeft*u.x+f.x+g.x,y:n.y*u.y-d.scrollTop*u.y+f.y+g.y}}function Zg(e){return Array.from(e.getClientRects())}function Jg(e){const t=Me(e),n=Cn(e),o=e.ownerDocument.body,r=pe(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),s=pe(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let i=-n.scrollLeft+Sn(e);const l=-n.scrollTop;return we(o).direction==="rtl"&&(i+=pe(t.clientWidth,o.clientWidth)-r),{width:r,height:s,x:i,y:l}}const $r=25;function Qg(e,t){const n=ge(e),o=Me(e),r=n.visualViewport;let s=o.clientWidth,i=o.clientHeight,l=0,d=0;if(r){s=r.width,i=r.height;const f=ko();(!f||f&&t==="fixed")&&(l=r.offsetLeft,d=r.offsetTop)}const u=Sn(o);if(u<=0){const f=o.ownerDocument,p=f.body,g=getComputedStyle(p),v=f.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,x=Math.abs(o.clientWidth-p.clientWidth-v);x<=$r&&(s-=x)}else u<=$r&&(s+=u);return{width:s,height:i,x:l,y:d}}const eh=new Set(["absolute","fixed"]);function th(e,t){const n=Ye(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,s=Pe(e)?at(e):Te(1),i=e.clientWidth*s.x,l=e.clientHeight*s.y,d=r*s.x,u=o*s.y;return{width:i,height:l,x:d,y:u}}function Lr(e,t,n){let o;if(t==="viewport")o=Qg(e,n);else if(t==="document")o=Jg(Me(e));else if(ye(t))o=th(t,n);else{const r=za(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return on(o)}function Ha(e,t){const n=Le(e);return n===t||!ye(n)||it(n)?!1:we(n).position==="fixed"||Ha(n,t)}function nh(e,t){const n=t.get(e);if(n)return n;let o=yt(e,[],!1).filter(l=>ye(l)&&pt(l)!=="body"),r=null;const s=we(e).position==="fixed";let i=s?Le(e):e;for(;ye(i)&&!it(i);){const l=we(i),d=Io(i);!d&&l.position==="fixed"&&(r=null),(s?!d&&!r:!d&&l.position==="static"&&!!r&&eh.has(r.position)||Pt(i)&&!d&&Ha(e,i))?o=o.filter(f=>f!==i):r=l,i=Le(i)}return t.set(e,o),o}function oh(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[...n==="clippingAncestors"?wn(t)?[]:nh(t,this._c):[].concat(n),o],l=i[0],d=i.reduce((u,f)=>{const p=Lr(t,f,r);return u.top=pe(p.top,u.top),u.right=$e(p.right,u.right),u.bottom=$e(p.bottom,u.bottom),u.left=pe(p.left,u.left),u},Lr(t,l,r));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function rh(e){const{width:t,height:n}=Wa(e);return{width:t,height:n}}function sh(e,t,n){const o=Pe(t),r=Me(t),s=n==="fixed",i=Ye(e,!0,s,t);let l={scrollLeft:0,scrollTop:0};const d=Te(0);function u(){d.x=Sn(r)}if(o||!o&&!s)if((pt(t)!=="body"||Pt(r))&&(l=Cn(t)),o){const v=Ye(t,!0,s,t);d.x=v.x+t.clientLeft,d.y=v.y+t.clientTop}else r&&u();s&&!o&&r&&u();const f=r&&!o&&!s?Ga(r,l):Te(0),p=i.left+l.scrollLeft-d.x-f.x,g=i.top+l.scrollTop-d.y-f.y;return{x:p,y:g,width:i.width,height:i.height}}function Jn(e){return we(e).position==="static"}function Fr(e,t){if(!Pe(e)||we(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Me(e)===n&&(n=n.ownerDocument.body),n}function Ua(e,t){const n=ge(e);if(wn(e))return n;if(!Pe(e)){let r=Le(e);for(;r&&!it(r);){if(ye(r)&&!Jn(r))return r;r=Le(r)}return n}let o=Fr(e,t);for(;o&&Bg(o)&&Jn(o);)o=Fr(o,t);return o&&it(o)&&Jn(o)&&!Io(o)?n:o||Ug(e)||n}const ah=async function(e){const t=this.getOffsetParent||Ua,n=this.getDimensions,o=await n(e.floating);return{reference:sh(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function ih(e){return we(e).direction==="rtl"}const lh={convertOffsetParentRelativeRectToViewportRelativeRect:qg,getDocumentElement:Me,getClippingRect:oh,getOffsetParent:Ua,getElementRects:ah,getClientRects:Zg,getDimensions:rh,getScale:at,isElement:ye,isRTL:ih};function Ka(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ch(e,t){let n=null,o;const r=Me(e);function s(){var l;clearTimeout(o),(l=n)==null||l.disconnect(),n=null}function i(l,d){l===void 0&&(l=!1),d===void 0&&(d=1),s();const u=e.getBoundingClientRect(),{left:f,top:p,width:g,height:v}=u;if(l||t(),!g||!v)return;const x=Ut(p),m=Ut(r.clientWidth-(f+g)),h=Ut(r.clientHeight-(p+v)),y=Ut(f),w={rootMargin:-x+"px "+-m+"px "+-h+"px "+-y+"px",threshold:pe(0,$e(1,d))||1};let S=!0;function E(N){const R=N[0].intersectionRatio;if(R!==d){if(!S)return i();R?i(!1,R):o=setTimeout(()=>{i(!1,1e-7)},1e3)}R===1&&!Ka(u,e.getBoundingClientRect())&&i(),S=!1}try{n=new IntersectionObserver(E,{...w,root:r.ownerDocument})}catch{n=new IntersectionObserver(E,w)}n.observe(e)}return i(!0),s}function dh(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:d=!1}=o,u=jo(e),f=r||s?[...u?yt(u):[],...yt(t)]:[];f.forEach(y=>{r&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const p=u&&l?ch(u,n):null;let g=-1,v=null;i&&(v=new ResizeObserver(y=>{let[b]=y;b&&b.target===u&&v&&(v.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var w;(w=v)==null||w.observe(t)})),n()}),u&&!d&&v.observe(u),v.observe(t));let x,m=d?Ye(e):null;d&&h();function h(){const y=Ye(e);m&&!Ka(m,y)&&n(),m=y,x=requestAnimationFrame(h)}return n(),()=>{var y;f.forEach(b=>{r&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),p?.(),(y=v)==null||y.disconnect(),v=null,d&&cancelAnimationFrame(x)}}const uh=jg,fh=Og,ph=_g,mh=Lg,gh=Ig,Vr=Dg,hh=$g,vh=(e,t,n)=>{const o=new Map,r={platform:lh,...n},s={...r.platform,_c:o};return Ag(e,t,{...r,platform:s})};var xh=typeof document<"u",bh=function(){},Zt=xh?ue.useLayoutEffect:bh;function rn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!rn(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const s=r[o];if(!(s==="_owner"&&e.$$typeof)&&!rn(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Ya(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Br(e,t){const n=Ya(e);return Math.round(t*n)/n}function Qn(e){const t=a.useRef(e);return Zt(()=>{t.current=e}),t}function yh(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:s,floating:i}={},transform:l=!0,whileElementsMounted:d,open:u}=e,[f,p]=a.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,v]=a.useState(o);rn(g,o)||v(o);const[x,m]=a.useState(null),[h,y]=a.useState(null),b=a.useCallback(C=>{C!==N.current&&(N.current=C,m(C))},[]),w=a.useCallback(C=>{C!==R.current&&(R.current=C,y(C))},[]),S=s||x,E=i||h,N=a.useRef(null),R=a.useRef(null),P=a.useRef(f),$=d!=null,F=Qn(d),B=Qn(r),k=Qn(u),z=a.useCallback(()=>{if(!N.current||!R.current)return;const C={placement:t,strategy:n,middleware:g};B.current&&(C.platform=B.current),vh(N.current,R.current,C).then(M=>{const K={...M,isPositioned:k.current!==!1};D.current&&!rn(P.current,K)&&(P.current=K,Rt.flushSync(()=>{p(K)}))})},[g,t,n,B,k]);Zt(()=>{u===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,p(C=>({...C,isPositioned:!1})))},[u]);const D=a.useRef(!1);Zt(()=>(D.current=!0,()=>{D.current=!1}),[]),Zt(()=>{if(S&&(N.current=S),E&&(R.current=E),S&&E){if(F.current)return F.current(S,E,z);z()}},[S,E,z,F,$]);const V=a.useMemo(()=>({reference:N,floating:R,setReference:b,setFloating:w}),[b,w]),I=a.useMemo(()=>({reference:S,floating:E}),[S,E]),W=a.useMemo(()=>{const C={position:n,left:0,top:0};if(!I.floating)return C;const M=Br(I.floating,f.x),K=Br(I.floating,f.y);return l?{...C,transform:"translate("+M+"px, "+K+"px)",...Ya(I.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:M,top:K}},[n,l,I.floating,f.x,f.y]);return a.useMemo(()=>({...f,update:z,refs:V,elements:I,floatingStyles:W}),[f,z,V,I,W])}const wh=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?Vr({element:o.current,padding:r}).fn(n):{}:o?Vr({element:o,padding:r}).fn(n):{}}}},Ch=(e,t)=>({...uh(e),options:[e,t]}),Sh=(e,t)=>({...fh(e),options:[e,t]}),Rh=(e,t)=>({...hh(e),options:[e,t]}),Eh=(e,t)=>({...ph(e),options:[e,t]}),Th=(e,t)=>({...mh(e),options:[e,t]}),Ph=(e,t)=>({...gh(e),options:[e,t]}),Nh=(e,t)=>({...wh(e),options:[e,t]});var Mh="Arrow",Xa=a.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...s}=e;return c.jsx(L.svg,{...s,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});Xa.displayName=Mh;var Ah=Xa,Oo="Popper",[qa,Fe]=le(Oo),[Dh,Za]=qa(Oo),Ja=e=>{const{__scopePopper:t,children:n}=e,[o,r]=a.useState(null);return c.jsx(Dh,{scope:t,anchor:o,onAnchorChange:r,children:n})};Ja.displayName=Oo;var Qa="PopperAnchor",ei=a.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,s=Za(Qa,n),i=a.useRef(null),l=G(t,i),d=a.useRef(null);return a.useEffect(()=>{const u=d.current;d.current=o?.current||i.current,u!==d.current&&s.onAnchorChange(d.current)}),o?null:c.jsx(L.div,{...r,ref:l})});ei.displayName=Qa;var $o="PopperContent",[_h,Ih]=qa($o),ti=a.forwardRef((e,t)=>{const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:s="center",alignOffset:i=0,arrowPadding:l=0,avoidCollisions:d=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:g=!1,updatePositionStrategy:v="optimized",onPlaced:x,...m}=e,h=Za($o,n),[y,b]=a.useState(null),w=G(t,_=>b(_)),[S,E]=a.useState(null),N=hn(S),R=N?.width??0,P=N?.height??0,$=o+(s!=="center"?"-"+s:""),F=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},B=Array.isArray(u)?u:[u],k=B.length>0,z={padding:F,boundary:B.filter(jh),altBoundary:k},{refs:D,floatingStyles:V,placement:I,isPositioned:W,middlewareData:C}=yh({strategy:"fixed",placement:$,whileElementsMounted:(..._)=>dh(..._,{animationFrame:v==="always"}),elements:{reference:h.anchor},middleware:[Ch({mainAxis:r+P,alignmentAxis:i}),d&&Sh({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Rh():void 0,...z}),d&&Eh({...z}),Th({...z,apply:({elements:_,rects:J,availableWidth:oe,availableHeight:Z})=>{const{width:Q,height:ne}=J.reference,ve=_.floating.style;ve.setProperty("--radix-popper-available-width",`${oe}px`),ve.setProperty("--radix-popper-available-height",`${Z}px`),ve.setProperty("--radix-popper-anchor-width",`${Q}px`),ve.setProperty("--radix-popper-anchor-height",`${ne}px`)}}),S&&Nh({element:S,padding:l}),Oh({arrowWidth:R,arrowHeight:P}),g&&Ph({strategy:"referenceHidden",...z})]}),[M,K]=ri(I),q=ie(x);se(()=>{W&&q?.()},[W,q]);const ee=C.arrow?.x,Y=C.arrow?.y,X=C.arrow?.centerOffset!==0,[te,ae]=a.useState();return se(()=>{y&&ae(window.getComputedStyle(y).zIndex)},[y]),c.jsx("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:W?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:te,"--radix-popper-transform-origin":[C.transformOrigin?.x,C.transformOrigin?.y].join(" "),...C.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(_h,{scope:n,placedSide:M,onArrowChange:E,arrowX:ee,arrowY:Y,shouldHideArrow:X,children:c.jsx(L.div,{"data-side":M,"data-align":K,...m,ref:w,style:{...m.style,animation:W?void 0:"none"}})})})});ti.displayName=$o;var ni="PopperArrow",kh={top:"bottom",right:"left",bottom:"top",left:"right"},oi=a.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,s=Ih(ni,o),i=kh[s.placedSide];return c.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:c.jsx(Ah,{...r,ref:n,style:{...r.style,display:"block"}})})});oi.displayName=ni;function jh(e){return e!==null}var Oh=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:o,middlewareData:r}=t,i=r.arrow?.centerOffset!==0,l=i?0:e.arrowWidth,d=i?0:e.arrowHeight,[u,f]=ri(n),p={start:"0%",center:"50%",end:"100%"}[f],g=(r.arrow?.x??0)+l/2,v=(r.arrow?.y??0)+d/2;let x="",m="";return u==="bottom"?(x=i?p:`${g}px`,m=`${-d}px`):u==="top"?(x=i?p:`${g}px`,m=`${o.floating.height+d}px`):u==="right"?(x=`${-d}px`,m=i?p:`${v}px`):u==="left"&&(x=`${o.floating.width+d}px`,m=i?p:`${v}px`),{data:{x,y:m}}}});function ri(e){const[t,n="center"]=e.split("-");return[t,n]}var Nt=Ja,Mt=ei,Rn=ti,En=oi,eo="rovingFocusGroup.onEntryFocus",$h={bubbles:!1,cancelable:!0},At="RovingFocusGroup",[co,si,Lh]=xn(At),[Fh,Tn]=le(At,[Lh]),[Vh,Bh]=Fh(At),ai=a.forwardRef((e,t)=>c.jsx(co.Provider,{scope:e.__scopeRovingFocusGroup,children:c.jsx(co.Slot,{scope:e.__scopeRovingFocusGroup,children:c.jsx(Wh,{...e,ref:t})})}));ai.displayName=At;var Wh=a.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:d,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...p}=e,g=a.useRef(null),v=G(t,g),x=bn(s),[m,h]=he({prop:i,defaultProp:l??null,onChange:d,caller:At}),[y,b]=a.useState(!1),w=ie(u),S=si(n),E=a.useRef(!1),[N,R]=a.useState(0);return a.useEffect(()=>{const P=g.current;if(P)return P.addEventListener(eo,w),()=>P.removeEventListener(eo,w)},[w]),c.jsx(Vh,{scope:n,orientation:o,dir:x,loop:r,currentTabStopId:m,onItemFocus:a.useCallback(P=>h(P),[h]),onItemShiftTab:a.useCallback(()=>b(!0),[]),onFocusableItemAdd:a.useCallback(()=>R(P=>P+1),[]),onFocusableItemRemove:a.useCallback(()=>R(P=>P-1),[]),children:c.jsx(L.div,{tabIndex:y||N===0?-1:0,"data-orientation":o,...p,ref:v,style:{outline:"none",...e.style},onMouseDown:A(e.onMouseDown,()=>{E.current=!0}),onFocus:A(e.onFocus,P=>{const $=!E.current;if(P.target===P.currentTarget&&$&&!y){const F=new CustomEvent(eo,$h);if(P.currentTarget.dispatchEvent(F),!F.defaultPrevented){const B=S().filter(I=>I.focusable),k=B.find(I=>I.active),z=B.find(I=>I.id===m),V=[k,z,...B].filter(Boolean).map(I=>I.ref.current);ci(V,f)}}E.current=!1}),onBlur:A(e.onBlur,()=>b(!1))})})}),ii="RovingFocusGroupItem",li=a.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:s,children:i,...l}=e,d=me(),u=s||d,f=Bh(ii,n),p=f.currentTabStopId===u,g=si(n),{onFocusableItemAdd:v,onFocusableItemRemove:x,currentTabStopId:m}=f;return a.useEffect(()=>{if(o)return v(),()=>x()},[o,v,x]),c.jsx(co.ItemSlot,{scope:n,id:u,focusable:o,active:r,children:c.jsx(L.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...l,ref:t,onMouseDown:A(e.onMouseDown,h=>{o?f.onItemFocus(u):h.preventDefault()}),onFocus:A(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:A(e.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){f.onItemShiftTab();return}if(h.target!==h.currentTarget)return;const y=Hh(h,f.orientation,f.dir);if(y!==void 0){if(h.metaKey||h.ctrlKey||h.altKey||h.shiftKey)return;h.preventDefault();let w=g().filter(S=>S.focusable).map(S=>S.ref.current);if(y==="last")w.reverse();else if(y==="prev"||y==="next"){y==="prev"&&w.reverse();const S=w.indexOf(h.currentTarget);w=f.loop?Uh(w,S+1):w.slice(S+1)}setTimeout(()=>ci(w))}}),children:typeof i=="function"?i({isCurrentTabStop:p,hasTabStop:m!=null}):i})})});li.displayName=ii;var zh={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Gh(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Hh(e,t,n){const o=Gh(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return zh[o]}function ci(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function Uh(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var di=ai,ui=li;function Kh(e){const t=Yh(e),n=a.forwardRef((o,r)=>{const{children:s,...i}=o,l=a.Children.toArray(s),d=l.find(qh);if(d){const u=d.props.children,f=l.map(p=>p===d?a.Children.count(u)>1?a.Children.only(null):a.isValidElement(u)?u.props.children:null:p);return c.jsx(t,{...i,ref:r,children:a.isValidElement(u)?a.cloneElement(u,void 0,f):null})}return c.jsx(t,{...i,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function Yh(e){const t=a.forwardRef((n,o)=>{const{children:r,...s}=n;if(a.isValidElement(r)){const i=Jh(r),l=Zh(s,r.props);return r.type!==a.Fragment&&(l.ref=o?Ne(o,i):i),a.cloneElement(r,l)}return a.Children.count(r)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Xh=Symbol("radix.slottable");function qh(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Xh}function Zh(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...l)=>{const d=s(...l);return r(...l),d}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function Jh(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var uo=["Enter"," "],Qh=["ArrowDown","PageUp","Home"],fi=["ArrowUp","PageDown","End"],ev=[...Qh,...fi],tv={ltr:[...uo,"ArrowRight"],rtl:[...uo,"ArrowLeft"]},nv={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Dt="Menu",[wt,ov,rv]=xn(Dt),[Qe,Pn]=le(Dt,[rv,Fe,Tn]),_t=Fe(),pi=Tn(),[mi,Ve]=Qe(Dt),[sv,It]=Qe(Dt),gi=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:r,onOpenChange:s,modal:i=!0}=e,l=_t(t),[d,u]=a.useState(null),f=a.useRef(!1),p=ie(s),g=bn(r);return a.useEffect(()=>{const v=()=>{f.current=!0,document.addEventListener("pointerdown",x,{capture:!0,once:!0}),document.addEventListener("pointermove",x,{capture:!0,once:!0})},x=()=>f.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",x,{capture:!0}),document.removeEventListener("pointermove",x,{capture:!0})}},[]),c.jsx(Nt,{...l,children:c.jsx(mi,{scope:t,open:n,onOpenChange:p,content:d,onContentChange:u,children:c.jsx(sv,{scope:t,onClose:a.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:g,modal:i,children:o})})})};gi.displayName=Dt;var av="MenuAnchor",Lo=a.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=_t(n);return c.jsx(Mt,{...r,...o,ref:t})});Lo.displayName=av;var Fo="MenuPortal",[iv,hi]=Qe(Fo,{forceMount:void 0}),vi=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:r}=e,s=Ve(Fo,t);return c.jsx(iv,{scope:t,forceMount:n,children:c.jsx(fe,{present:n||s.open,children:c.jsx(Je,{asChild:!0,container:r,children:o})})})};vi.displayName=Fo;var xe="MenuContent",[lv,Vo]=Qe(xe),xi=a.forwardRef((e,t)=>{const n=hi(xe,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=Ve(xe,e.__scopeMenu),i=It(xe,e.__scopeMenu);return c.jsx(wt.Provider,{scope:e.__scopeMenu,children:c.jsx(fe,{present:o||s.open,children:c.jsx(wt.Slot,{scope:e.__scopeMenu,children:i.modal?c.jsx(cv,{...r,ref:t}):c.jsx(dv,{...r,ref:t})})})})}),cv=a.forwardRef((e,t)=>{const n=Ve(xe,e.__scopeMenu),o=a.useRef(null),r=G(t,o);return a.useEffect(()=>{const s=o.current;if(s)return un(s)},[]),c.jsx(Bo,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:A(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),dv=a.forwardRef((e,t)=>{const n=Ve(xe,e.__scopeMenu);return c.jsx(Bo,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),uv=Kh("MenuContent.ScrollLock"),Bo=a.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:l,onEntryFocus:d,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:g,onDismiss:v,disableOutsideScroll:x,...m}=e,h=Ve(xe,n),y=It(xe,n),b=_t(n),w=pi(n),S=ov(n),[E,N]=a.useState(null),R=a.useRef(null),P=G(t,R,h.onContentChange),$=a.useRef(0),F=a.useRef(""),B=a.useRef(0),k=a.useRef(null),z=a.useRef("right"),D=a.useRef(0),V=x?Tt:a.Fragment,I=x?{as:uv,allowPinchZoom:!0}:void 0,W=M=>{const K=F.current+M,q=S().filter(_=>!_.disabled),ee=document.activeElement,Y=q.find(_=>_.ref.current===ee)?.textValue,X=q.map(_=>_.textValue),te=Sv(X,K,Y),ae=q.find(_=>_.textValue===te)?.ref.current;(function _(J){F.current=J,window.clearTimeout($.current),J!==""&&($.current=window.setTimeout(()=>_(""),1e3))})(K),ae&&setTimeout(()=>ae.focus())};a.useEffect(()=>()=>window.clearTimeout($.current),[]),cn();const C=a.useCallback(M=>z.current===k.current?.side&&Ev(M,k.current?.area),[]);return c.jsx(lv,{scope:n,searchRef:F,onItemEnter:a.useCallback(M=>{C(M)&&M.preventDefault()},[C]),onItemLeave:a.useCallback(M=>{C(M)||(R.current?.focus(),N(null))},[C]),onTriggerLeave:a.useCallback(M=>{C(M)&&M.preventDefault()},[C]),pointerGraceTimerRef:B,onPointerGraceIntentChange:a.useCallback(M=>{k.current=M},[]),children:c.jsx(V,{...I,children:c.jsx(Et,{asChild:!0,trapped:r,onMountAutoFocus:A(s,M=>{M.preventDefault(),R.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:c.jsx(Ze,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:g,onDismiss:v,children:c.jsx(di,{asChild:!0,...w,dir:y.dir,orientation:"vertical",loop:o,currentTabStopId:E,onCurrentTabStopIdChange:N,onEntryFocus:A(d,M=>{y.isUsingKeyboardRef.current||M.preventDefault()}),preventScrollOnEntryFocus:!0,children:c.jsx(Rn,{role:"menu","aria-orientation":"vertical","data-state":ji(h.open),"data-radix-menu-content":"",dir:y.dir,...b,...m,ref:P,style:{outline:"none",...m.style},onKeyDown:A(m.onKeyDown,M=>{const q=M.target.closest("[data-radix-menu-content]")===M.currentTarget,ee=M.ctrlKey||M.altKey||M.metaKey,Y=M.key.length===1;q&&(M.key==="Tab"&&M.preventDefault(),!ee&&Y&&W(M.key));const X=R.current;if(M.target!==X||!ev.includes(M.key))return;M.preventDefault();const ae=S().filter(_=>!_.disabled).map(_=>_.ref.current);fi.includes(M.key)&&ae.reverse(),wv(ae)}),onBlur:A(e.onBlur,M=>{M.currentTarget.contains(M.target)||(window.clearTimeout($.current),F.current="")}),onPointerMove:A(e.onPointerMove,Ct(M=>{const K=M.target,q=D.current!==M.clientX;if(M.currentTarget.contains(K)&&q){const ee=M.clientX>D.current?"right":"left";z.current=ee,D.current=M.clientX}}))})})})})})})});xi.displayName=xe;var fv="MenuGroup",Wo=a.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return c.jsx(L.div,{role:"group",...o,ref:t})});Wo.displayName=fv;var pv="MenuLabel",bi=a.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return c.jsx(L.div,{...o,ref:t})});bi.displayName=pv;var sn="MenuItem",Wr="menu.itemSelect",Nn=a.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...r}=e,s=a.useRef(null),i=It(sn,e.__scopeMenu),l=Vo(sn,e.__scopeMenu),d=G(t,s),u=a.useRef(!1),f=()=>{const p=s.current;if(!n&&p){const g=new CustomEvent(Wr,{bubbles:!0,cancelable:!0});p.addEventListener(Wr,v=>o?.(v),{once:!0}),Co(p,g),g.defaultPrevented?u.current=!1:i.onClose()}};return c.jsx(yi,{...r,ref:d,disabled:n,onClick:A(e.onClick,f),onPointerDown:p=>{e.onPointerDown?.(p),u.current=!0},onPointerUp:A(e.onPointerUp,p=>{u.current||p.currentTarget?.click()}),onKeyDown:A(e.onKeyDown,p=>{const g=l.searchRef.current!=="";n||g&&p.key===" "||uo.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});Nn.displayName=sn;var yi=a.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:r,...s}=e,i=Vo(sn,n),l=pi(n),d=a.useRef(null),u=G(t,d),[f,p]=a.useState(!1),[g,v]=a.useState("");return a.useEffect(()=>{const x=d.current;x&&v((x.textContent??"").trim())},[s.children]),c.jsx(wt.ItemSlot,{scope:n,disabled:o,textValue:r??g,children:c.jsx(ui,{asChild:!0,...l,focusable:!o,children:c.jsx(L.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...s,ref:u,onPointerMove:A(e.onPointerMove,Ct(x=>{o?i.onItemLeave(x):(i.onItemEnter(x),x.defaultPrevented||x.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:A(e.onPointerLeave,Ct(x=>i.onItemLeave(x))),onFocus:A(e.onFocus,()=>p(!0)),onBlur:A(e.onBlur,()=>p(!1))})})})}),mv="MenuCheckboxItem",wi=a.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...r}=e;return c.jsx(Ti,{scope:e.__scopeMenu,checked:n,children:c.jsx(Nn,{role:"menuitemcheckbox","aria-checked":an(n)?"mixed":n,...r,ref:t,"data-state":Ho(n),onSelect:A(r.onSelect,()=>o?.(an(n)?!0:!n),{checkForDefaultPrevented:!1})})})});wi.displayName=mv;var Ci="MenuRadioGroup",[gv,hv]=Qe(Ci,{value:void 0,onValueChange:()=>{}}),Si=a.forwardRef((e,t)=>{const{value:n,onValueChange:o,...r}=e,s=ie(o);return c.jsx(gv,{scope:e.__scopeMenu,value:n,onValueChange:s,children:c.jsx(Wo,{...r,ref:t})})});Si.displayName=Ci;var Ri="MenuRadioItem",Ei=a.forwardRef((e,t)=>{const{value:n,...o}=e,r=hv(Ri,e.__scopeMenu),s=n===r.value;return c.jsx(Ti,{scope:e.__scopeMenu,checked:s,children:c.jsx(Nn,{role:"menuitemradio","aria-checked":s,...o,ref:t,"data-state":Ho(s),onSelect:A(o.onSelect,()=>r.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Ei.displayName=Ri;var zo="MenuItemIndicator",[Ti,vv]=Qe(zo,{checked:!1}),Pi=a.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...r}=e,s=vv(zo,n);return c.jsx(fe,{present:o||an(s.checked)||s.checked===!0,children:c.jsx(L.span,{...r,ref:t,"data-state":Ho(s.checked)})})});Pi.displayName=zo;var xv="MenuSeparator",Ni=a.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return c.jsx(L.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});Ni.displayName=xv;var bv="MenuArrow",Mi=a.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=_t(n);return c.jsx(En,{...r,...o,ref:t})});Mi.displayName=bv;var Go="MenuSub",[yv,Ai]=Qe(Go),Di=e=>{const{__scopeMenu:t,children:n,open:o=!1,onOpenChange:r}=e,s=Ve(Go,t),i=_t(t),[l,d]=a.useState(null),[u,f]=a.useState(null),p=ie(r);return a.useEffect(()=>(s.open===!1&&p(!1),()=>p(!1)),[s.open,p]),c.jsx(Nt,{...i,children:c.jsx(mi,{scope:t,open:o,onOpenChange:p,content:u,onContentChange:f,children:c.jsx(yv,{scope:t,contentId:me(),triggerId:me(),trigger:l,onTriggerChange:d,children:n})})})};Di.displayName=Go;var xt="MenuSubTrigger",_i=a.forwardRef((e,t)=>{const n=Ve(xt,e.__scopeMenu),o=It(xt,e.__scopeMenu),r=Ai(xt,e.__scopeMenu),s=Vo(xt,e.__scopeMenu),i=a.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:d}=s,u={__scopeMenu:e.__scopeMenu},f=a.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return a.useEffect(()=>f,[f]),a.useEffect(()=>{const p=l.current;return()=>{window.clearTimeout(p),d(null)}},[l,d]),c.jsx(Lo,{asChild:!0,...u,children:c.jsx(yi,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":ji(n.open),...e,ref:Ne(t,r.onTriggerChange),onClick:p=>{e.onClick?.(p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:A(e.onPointerMove,Ct(p=>{s.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(s.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:A(e.onPointerLeave,Ct(p=>{f();const g=n.content?.getBoundingClientRect();if(g){const v=n.content?.dataset.side,x=v==="right",m=x?-5:5,h=g[x?"left":"right"],y=g[x?"right":"left"];s.onPointerGraceIntentChange({area:[{x:p.clientX+m,y:p.clientY},{x:h,y:g.top},{x:y,y:g.top},{x:y,y:g.bottom},{x:h,y:g.bottom}],side:v}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(p),p.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:A(e.onKeyDown,p=>{const g=s.searchRef.current!=="";e.disabled||g&&p.key===" "||tv[o.dir].includes(p.key)&&(n.onOpenChange(!0),n.content?.focus(),p.preventDefault())})})})});_i.displayName=xt;var Ii="MenuSubContent",ki=a.forwardRef((e,t)=>{const n=hi(xe,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=Ve(xe,e.__scopeMenu),i=It(xe,e.__scopeMenu),l=Ai(Ii,e.__scopeMenu),d=a.useRef(null),u=G(t,d);return c.jsx(wt.Provider,{scope:e.__scopeMenu,children:c.jsx(fe,{present:o||s.open,children:c.jsx(wt.Slot,{scope:e.__scopeMenu,children:c.jsx(Bo,{id:l.contentId,"aria-labelledby":l.triggerId,...r,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{i.isUsingKeyboardRef.current&&d.current?.focus(),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:A(e.onFocusOutside,f=>{f.target!==l.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:A(e.onEscapeKeyDown,f=>{i.onClose(),f.preventDefault()}),onKeyDown:A(e.onKeyDown,f=>{const p=f.currentTarget.contains(f.target),g=nv[i.dir].includes(f.key);p&&g&&(s.onOpenChange(!1),l.trigger?.focus(),f.preventDefault())})})})})})});ki.displayName=Ii;function ji(e){return e?"open":"closed"}function an(e){return e==="indeterminate"}function Ho(e){return an(e)?"indeterminate":e?"checked":"unchecked"}function wv(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Cv(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function Sv(e,t,n){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=Cv(e,Math.max(s,0));r.length===1&&(i=i.filter(u=>u!==n));const d=i.find(u=>u.toLowerCase().startsWith(r.toLowerCase()));return d!==n?d:void 0}function Rv(e,t){const{x:n,y:o}=e;let r=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const l=t[s],d=t[i],u=l.x,f=l.y,p=d.x,g=d.y;f>o!=g>o&&n<(p-u)*(o-f)/(g-f)+u&&(r=!r)}return r}function Ev(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Rv(n,t)}function Ct(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Oi=gi,$i=Lo,Li=vi,Fi=xi,Vi=Wo,Bi=bi,Wi=Nn,zi=wi,Gi=Si,Hi=Ei,Ui=Pi,Ki=Ni,Yi=Mi,Xi=Di,qi=_i,Zi=ki,Uo="ContextMenu",[Tv]=le(Uo,[Pn]),ce=Pn(),[Pv,Ji]=Tv(Uo),Qi=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:o,dir:r,modal:s=!0}=e,[i,l]=a.useState(!1),d=ce(t),u=ie(o),f=a.useCallback(p=>{l(p),u(p)},[u]);return c.jsx(Pv,{scope:t,open:i,onOpenChange:f,modal:s,children:c.jsx(Oi,{...d,dir:r,open:i,onOpenChange:f,modal:s,children:n})})};Qi.displayName=Uo;var el="ContextMenuTrigger",tl=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,disabled:o=!1,...r}=e,s=Ji(el,n),i=ce(n),l=a.useRef({x:0,y:0}),d=a.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...l.current})}),u=a.useRef(0),f=a.useCallback(()=>window.clearTimeout(u.current),[]),p=g=>{l.current={x:g.clientX,y:g.clientY},s.onOpenChange(!0)};return a.useEffect(()=>f,[f]),a.useEffect(()=>{o&&f()},[o,f]),c.jsxs(c.Fragment,{children:[c.jsx($i,{...i,virtualRef:d}),c.jsx(L.span,{"data-state":s.open?"open":"closed","data-disabled":o?"":void 0,...r,ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:o?e.onContextMenu:A(e.onContextMenu,g=>{f(),p(g),g.preventDefault()}),onPointerDown:o?e.onPointerDown:A(e.onPointerDown,Kt(g=>{f(),u.current=window.setTimeout(()=>p(g),700)})),onPointerMove:o?e.onPointerMove:A(e.onPointerMove,Kt(f)),onPointerCancel:o?e.onPointerCancel:A(e.onPointerCancel,Kt(f)),onPointerUp:o?e.onPointerUp:A(e.onPointerUp,Kt(f))})]})});tl.displayName=el;var Nv="ContextMenuPortal",nl=e=>{const{__scopeContextMenu:t,...n}=e,o=ce(t);return c.jsx(Li,{...o,...n})};nl.displayName=Nv;var ol="ContextMenuContent",rl=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=Ji(ol,n),s=ce(n),i=a.useRef(!1);return c.jsx(Fi,{...s,...o,ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:l=>{e.onCloseAutoFocus?.(l),!l.defaultPrevented&&i.current&&l.preventDefault(),i.current=!1},onInteractOutside:l=>{e.onInteractOutside?.(l),!l.defaultPrevented&&!r.modal&&(i.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});rl.displayName=ol;var Mv="ContextMenuGroup",sl=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=ce(n);return c.jsx(Vi,{...r,...o,ref:t})});sl.displayName=Mv;var Av="ContextMenuLabel",al=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=ce(n);return c.jsx(Bi,{...r,...o,ref:t})});al.displayName=Av;var Dv="ContextMenuItem",il=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=ce(n);return c.jsx(Wi,{...r,...o,ref:t})});il.displayName=Dv;var _v="ContextMenuCheckboxItem",ll=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=ce(n);return c.jsx(zi,{...r,...o,ref:t})});ll.displayName=_v;var Iv="ContextMenuRadioGroup",cl=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=ce(n);return c.jsx(Gi,{...r,...o,ref:t})});cl.displayName=Iv;var kv="ContextMenuRadioItem",dl=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=ce(n);return c.jsx(Hi,{...r,...o,ref:t})});dl.displayName=kv;var jv="ContextMenuItemIndicator",ul=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=ce(n);return c.jsx(Ui,{...r,...o,ref:t})});ul.displayName=jv;var Ov="ContextMenuSeparator",fl=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=ce(n);return c.jsx(Ki,{...r,...o,ref:t})});fl.displayName=Ov;var $v="ContextMenuArrow",Lv=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=ce(n);return c.jsx(Yi,{...r,...o,ref:t})});Lv.displayName=$v;var pl="ContextMenuSub",ml=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:o,open:r,defaultOpen:s}=e,i=ce(t),[l,d]=he({prop:r,defaultProp:s??!1,onChange:o,caller:pl});return c.jsx(Xi,{...i,open:l,onOpenChange:d,children:n})};ml.displayName=pl;var Fv="ContextMenuSubTrigger",gl=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=ce(n);return c.jsx(qi,{...r,...o,ref:t})});gl.displayName=Fv;var Vv="ContextMenuSubContent",hl=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=ce(n);return c.jsx(Zi,{...r,...o,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});hl.displayName=Vv;function Kt(e){return t=>t.pointerType!=="mouse"?e(t):void 0}var Bv=Qi,Wv=tl,zv=nl,Gv=rl,Hv=sl,Uv=al,Kv=il,Yv=ll,Xv=cl,qv=dl,vl=ul,Zv=fl,Jv=ml,Qv=gl,ex=hl;const tx=Bv,nx=Wv,ox=Hv,xl=zv,rx=Jv,sx=Xv,bl=a.forwardRef(({className:e,inset:t,children:n,...o},r)=>c.jsxs(Qv,{ref:r,className:T("text-body flex cursor-default items-center rounded-sm px-2 py-1.5 outline-none select-none","focus:bg-vanilla focus:text-primary","data-[state=open]:bg-vanilla data-[state=open]:text-primary",t&&"pl-8",e),...o,children:[n,c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"ml-auto h-4 w-4",children:c.jsx("path",{d:"m9 18 6-6-6-6"})})]}));bl.displayName="ContextMenuSubTrigger";const yl=a.forwardRef(({className:e,...t},n)=>c.jsx(ex,{ref:n,className:T("border-border bg-card text-primary z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 font-sans shadow-lg","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-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",e),...t}));yl.displayName="ContextMenuSubContent";const wl=a.forwardRef(({className:e,...t},n)=>c.jsx(xl,{children:c.jsx(Gv,{ref:n,className:T("border-border bg-card text-primary z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 font-sans shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-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",e),...t})}));wl.displayName="ContextMenuContent";const Cl=a.forwardRef(({className:e,inset:t,...n},o)=>c.jsx(Kv,{ref:o,className:T("text-body relative flex cursor-default items-center rounded-sm px-2 py-1.5 outline-none select-none","focus:bg-vanilla focus:text-primary","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...n}));Cl.displayName="ContextMenuItem";const Sl=a.forwardRef(({className:e,children:t,checked:n,...o},r)=>c.jsxs(Yv,{ref:r,className:T("text-body relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 outline-none select-none","focus:bg-vanilla focus:text-primary","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...o,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(vl,{children:c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:c.jsx("path",{d:"M20 6 9 17l-5-5"})})})}),t]}));Sl.displayName="ContextMenuCheckboxItem";const Rl=a.forwardRef(({className:e,children:t,...n},o)=>c.jsxs(qv,{ref:o,className:T("text-body relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 outline-none select-none","focus:bg-vanilla focus:text-primary","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(vl,{children:c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-2 w-2 fill-current",children:c.jsx("circle",{cx:"12",cy:"12",r:"10"})})})}),t]}));Rl.displayName="ContextMenuRadioItem";const El=a.forwardRef(({className:e,inset:t,...n},o)=>c.jsx(Uv,{ref:o,className:T("text-small text-primary px-2 py-1.5",t&&"pl-8",e),...n}));El.displayName="ContextMenuLabel";const Tl=a.forwardRef(({className:e,...t},n)=>c.jsx(Zv,{ref:n,className:T("bg-border -mx-1 my-1 h-px",e),...t}));Tl.displayName="ContextMenuSeparator";const Pl=a.forwardRef(({className:e,...t},n)=>c.jsx("span",{ref:n,className:T("text-small text-tertiary ml-auto tracking-widest",e),...t}));Pl.displayName="ContextMenuShortcut";function ax(e){const t=ix(e),n=a.forwardRef((o,r)=>{const{children:s,...i}=o,l=a.Children.toArray(s),d=l.find(cx);if(d){const u=d.props.children,f=l.map(p=>p===d?a.Children.count(u)>1?a.Children.only(null):a.isValidElement(u)?u.props.children:null:p);return c.jsx(t,{...i,ref:r,children:a.isValidElement(u)?a.cloneElement(u,void 0,f):null})}return c.jsx(t,{...i,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function ix(e){const t=a.forwardRef((n,o)=>{const{children:r,...s}=n;if(a.isValidElement(r)){const i=ux(r),l=dx(s,r.props);return r.type!==a.Fragment&&(l.ref=o?Ne(o,i):i),a.cloneElement(r,l)}return a.Children.count(r)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var lx=Symbol("radix.slottable");function cx(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===lx}function dx(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...l)=>{const d=s(...l);return r(...l),d}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function ux(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Mn="Popover",[Nl]=le(Mn,[Fe]),kt=Fe(),[fx,Be]=Nl(Mn),Ml=e=>{const{__scopePopover:t,children:n,open:o,defaultOpen:r,onOpenChange:s,modal:i=!1}=e,l=kt(t),d=a.useRef(null),[u,f]=a.useState(!1),[p,g]=he({prop:o,defaultProp:r??!1,onChange:s,caller:Mn});return c.jsx(Nt,{...l,children:c.jsx(fx,{scope:t,contentId:me(),triggerRef:d,open:p,onOpenChange:g,onOpenToggle:a.useCallback(()=>g(v=>!v),[g]),hasCustomAnchor:u,onCustomAnchorAdd:a.useCallback(()=>f(!0),[]),onCustomAnchorRemove:a.useCallback(()=>f(!1),[]),modal:i,children:n})})};Ml.displayName=Mn;var Al="PopoverAnchor",px=a.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Be(Al,n),s=kt(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:l}=r;return a.useEffect(()=>(i(),()=>l()),[i,l]),c.jsx(Mt,{...s,...o,ref:t})});px.displayName=Al;var Dl="PopoverTrigger",_l=a.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Be(Dl,n),s=kt(n),i=G(t,r.triggerRef),l=c.jsx(L.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":$l(r.open),...o,ref:i,onClick:A(e.onClick,r.onOpenToggle)});return r.hasCustomAnchor?l:c.jsx(Mt,{asChild:!0,...s,children:l})});_l.displayName=Dl;var Ko="PopoverPortal",[mx,gx]=Nl(Ko,{forceMount:void 0}),Il=e=>{const{__scopePopover:t,forceMount:n,children:o,container:r}=e,s=Be(Ko,t);return c.jsx(mx,{scope:t,forceMount:n,children:c.jsx(fe,{present:n||s.open,children:c.jsx(Je,{asChild:!0,container:r,children:o})})})};Il.displayName=Ko;var lt="PopoverContent",kl=a.forwardRef((e,t)=>{const n=gx(lt,e.__scopePopover),{forceMount:o=n.forceMount,...r}=e,s=Be(lt,e.__scopePopover);return c.jsx(fe,{present:o||s.open,children:s.modal?c.jsx(vx,{...r,ref:t}):c.jsx(xx,{...r,ref:t})})});kl.displayName=lt;var hx=ax("PopoverContent.RemoveScroll"),vx=a.forwardRef((e,t)=>{const n=Be(lt,e.__scopePopover),o=a.useRef(null),r=G(t,o),s=a.useRef(!1);return a.useEffect(()=>{const i=o.current;if(i)return un(i)},[]),c.jsx(Tt,{as:hx,allowPinchZoom:!0,children:c.jsx(jl,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:A(e.onCloseAutoFocus,i=>{i.preventDefault(),s.current||n.triggerRef.current?.focus()}),onPointerDownOutside:A(e.onPointerDownOutside,i=>{const l=i.detail.originalEvent,d=l.button===0&&l.ctrlKey===!0,u=l.button===2||d;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:A(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),xx=a.forwardRef((e,t)=>{const n=Be(lt,e.__scopePopover),o=a.useRef(!1),r=a.useRef(!1);return c.jsx(jl,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(o.current||n.triggerRef.current?.focus(),s.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const i=s.target;n.triggerRef.current?.contains(i)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})}),jl=a.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEscapeKeyDown:l,onPointerDownOutside:d,onFocusOutside:u,onInteractOutside:f,...p}=e,g=Be(lt,n),v=kt(n);return cn(),c.jsx(Et,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:s,children:c.jsx(Ze,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:f,onEscapeKeyDown:l,onPointerDownOutside:d,onFocusOutside:u,onDismiss:()=>g.onOpenChange(!1),children:c.jsx(Rn,{"data-state":$l(g.open),role:"dialog",id:g.contentId,...v,...p,ref:t,style:{...p.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Ol="PopoverClose",bx=a.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Be(Ol,n);return c.jsx(L.button,{type:"button",...o,ref:t,onClick:A(e.onClick,()=>r.onOpenChange(!1))})});bx.displayName=Ol;var yx="PopoverArrow",wx=a.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=kt(n);return c.jsx(En,{...r,...o,ref:t})});wx.displayName=yx;function $l(e){return e?"open":"closed"}var Ll=Ml,Fl=_l,Vl=Il,Bl=kl;const Wl=(...e)=>e.filter((t,n,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===n).join(" ").trim();const Cx=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const Sx=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,o)=>o?o.toUpperCase():n.toLowerCase());const zr=e=>{const t=Sx(e);return t.charAt(0).toUpperCase()+t.slice(1)};var Rx={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"};const Ex=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const Tx=ue.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:o,className:r="",children:s,iconNode:i,...l},d)=>ue.createElement("svg",{ref:d,...Rx,width:t,height:t,stroke:e,strokeWidth:o?Number(n)*24/Number(t):n,className:Wl("lucide",r),...!s&&!Ex(l)&&{"aria-hidden":"true"},...l},[...i.map(([u,f])=>ue.createElement(u,f)),...Array.isArray(s)?s:[s]]));const mt=(e,t)=>{const n=ue.forwardRef(({className:o,...r},s)=>ue.createElement(Tx,{ref:s,iconNode:t,className:Wl(`lucide-${Cx(zr(e))}`,`lucide-${e}`,o),...r}));return n.displayName=zr(e),n};const Px=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],zl=mt("calendar",Px);const Nx=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Gl=mt("chevron-left",Nx);const Mx=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Hl=mt("chevron-right",Mx);const Ax=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Dx=mt("clock",Ax);const _x=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],Ix=mt("ellipsis",_x);const kx=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ul=mt("x",kx),jx=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Gr=["January","February","March","April","May","June","July","August","September","October","November","December"];function Hr(e,t){return new Date(e,t+1,0).getDate()}function Ox(e,t){return new Date(e,t,1).getDay()}function Kl(e,t){return e?e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate():!1}function $x(e){return Kl(new Date,e)}function Ur(e,t="yyyy-MM-dd"){if(!e)return"";const n=String(e.getMonth()+1).padStart(2,"0"),o=String(e.getDate()).padStart(2,"0"),r=e.getFullYear();return t.replace("yyyy",String(r)).replace("MM",n).replace("dd",o)}const Yl=U(["bg-card text-body text-primary placeholder:text-tertiary","flex h-10 w-full items-center justify-between rounded-md border px-3 py-2","font-sans transition-colors","focus-visible:ring-sunflower focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none","disabled:cursor-not-allowed disabled:opacity-50"],{variants:{variant:{default:"border-border",error:"border-error"}},defaultVariants:{variant:"default"}}),Xl=U(["inline-flex h-9 w-9 items-center justify-center rounded-full text-sm","transition-colors focus-visible:outline-none","focus-visible:ring-sunflower focus-visible:ring-2 focus-visible:ring-offset-1"],{variants:{state:{default:"hover:bg-sunflower text-primary",selected:"bg-sunflower text-primary font-medium",today:"hover:bg-sunflower border-sunflower text-primary border",disabled:"text-tertiary cursor-not-allowed opacity-50",outside:"text-tertiary opacity-50"}},defaultVariants:{state:"default"}}),ql=a.forwardRef(({value:e,onChange:t,placeholder:n="Select a date",format:o="MM/dd/yyyy",minDate:r,maxDate:s,disabled:i=!1,variant:l,className:d,id:u,name:f,"aria-label":p,"aria-describedby":g},v)=>{const[x,m]=a.useState(!1),[h,y]=a.useState(()=>e||new Date),b=h.getFullYear(),w=h.getMonth(),S=Hr(b,w),E=Ox(b,w),N=a.useMemo(()=>{const k=[],z=w===0?11:w-1,D=w===0?b-1:b,V=Hr(D,z);for(let M=E-1;M>=0;M--)k.push({date:new Date(D,z,V-M),isOutside:!0});for(let M=1;M<=S;M++)k.push({date:new Date(b,w,M),isOutside:!1});const I=42-k.length,W=w===11?0:w+1,C=w===11?b+1:b;for(let M=1;M<=I;M++)k.push({date:new Date(C,W,M),isOutside:!0});return k},[b,w,S,E]),R=()=>{y(new Date(b,w-1,1))},P=()=>{y(new Date(b,w+1,1))},$=k=>{t?.(k),m(!1)},F=k=>!!(r&&k<new Date(r.setHours(0,0,0,0))||s&&k>new Date(s.setHours(23,59,59,999))),B=(k,z)=>F(k)?"disabled":z?"outside":e&&Kl(e,k)?"selected":$x(k)?"today":"default";return a.useEffect(()=>{e&&y(e)},[e]),c.jsxs(Ll,{open:x,onOpenChange:m,children:[c.jsx(Fl,{asChild:!0,children:c.jsxs("button",{ref:v,id:u,type:"button",disabled:i,className:T(Yl({variant:l}),d),"aria-label":p||"Choose date","aria-describedby":g,"aria-haspopup":"dialog","aria-expanded":x,children:[c.jsx("span",{className:T("truncate",!e&&"text-tertiary"),children:e?Ur(e,o):n}),c.jsx(zl,{className:"text-tertiary h-4 w-4 shrink-0"}),f&&c.jsx("input",{type:"hidden",name:f,value:e?Ur(e,"yyyy-MM-dd"):""})]})}),c.jsx(Vl,{children:c.jsxs(Bl,{className:T("bg-main border-border z-50 w-auto rounded-lg border p-4 shadow-lg","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2","data-[side=top]:slide-in-from-bottom-2"),sideOffset:4,align:"start",children:[c.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[c.jsx("button",{type:"button",onClick:R,className:T("hover:bg-alt focus-visible:ring-sunflower inline-flex h-8 w-8 items-center justify-center rounded-full","transition-colors focus-visible:ring-2 focus-visible:outline-none"),"aria-label":"Previous month",children:c.jsx(Gl,{className:"h-4 w-4"})}),c.jsxs("span",{className:"text-primary text-sm font-medium",children:[Gr[w]," ",b]}),c.jsx("button",{type:"button",onClick:P,className:T("hover:bg-alt focus-visible:ring-sunflower inline-flex h-8 w-8 items-center justify-center rounded-full","transition-colors focus-visible:ring-2 focus-visible:outline-none"),"aria-label":"Next month",children:c.jsx(Hl,{className:"h-4 w-4"})})]}),c.jsx("div",{className:"mb-2 grid grid-cols-7 gap-1",children:jx.map(k=>c.jsx("div",{className:"text-tertiary text-center text-xs font-medium",children:k},k))}),c.jsx("div",{className:"grid grid-cols-7 gap-1",role:"grid","aria-label":`${Gr[w]} ${b}`,children:N.map(({date:k,isOutside:z},D)=>{const V=B(k,z),I=V==="disabled";return c.jsx("button",{type:"button",onClick:()=>!I&&$(k),disabled:I,className:Xl({state:V}),"aria-label":k.toLocaleDateString("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric"}),"aria-selected":V==="selected",tabIndex:z?-1:0,children:k.getDate()},D)})}),c.jsx("div",{className:"border-border mt-4 border-t pt-4",children:c.jsx("button",{type:"button",onClick:()=>$(new Date),className:T("text-sunflower hover:text-sunflower-hover w-full text-center text-sm font-medium","transition-colors focus-visible:underline focus-visible:outline-none"),children:"Today"})})]})})]})});ql.displayName="DatePicker";const Lx=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Kr=["January","February","March","April","May","June","July","August","September","October","November","December"];function Yr(e,t){return new Date(e,t+1,0).getDate()}function Fx(e,t){return new Date(e,t,1).getDay()}function Zl(e,t){return e?e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate():!1}function Vx(e){return Zl(new Date,e)}function Bx(e,t="yyyy-MM-dd",n=!0){if(!e)return"";const o=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0"),s=e.getFullYear(),i=e.getHours(),l=i%12||12,d=n?String(i).padStart(2,"0"):String(l).padStart(2,"0"),u=String(e.getMinutes()).padStart(2,"0"),f=i>=12?"PM":"AM";return t.replace("yyyy",String(s)).replace("MM",o).replace("dd",r).replace("HH",String(i).padStart(2,"0")).replace("hh",d).replace("mm",u).replace("a",f)}function Xr(e){const t=e.match(/^(\d{1,2}):(\d{2})$/);return t&&t[1]&&t[2]?{hours:Math.min(23,Math.max(0,parseInt(t[1],10))),minutes:Math.min(59,Math.max(0,parseInt(t[2],10)))}:{hours:0,minutes:0}}const Jl=U(["bg-card text-body text-primary placeholder:text-tertiary","flex h-10 w-full items-center justify-between rounded-md border px-3 py-2","font-sans transition-colors","focus-visible:ring-sunflower focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none","disabled:cursor-not-allowed disabled:opacity-50"],{variants:{variant:{default:"border-border",error:"border-error"}},defaultVariants:{variant:"default"}}),Ql=U(["inline-flex h-9 w-9 items-center justify-center rounded-full text-sm","transition-colors focus-visible:outline-none","focus-visible:ring-sunflower focus-visible:ring-2 focus-visible:ring-offset-1"],{variants:{state:{default:"hover:bg-sunflower text-primary",selected:"bg-sunflower text-primary font-medium",today:"hover:bg-sunflower border-sunflower text-primary border",disabled:"text-tertiary cursor-not-allowed opacity-50",outside:"text-tertiary opacity-50"}},defaultVariants:{state:"default"}}),ec=a.forwardRef(({value:e,onChange:t,placeholder:n="Select date and time",format:o="yyyy-MM-dd HH:mm",minDate:r,maxDate:s,disabled:i=!1,variant:l,className:d,id:u,name:f,use24Hour:p=!0,minuteStep:g=1,"aria-label":v,"aria-describedby":x},m)=>{const[h,y]=a.useState(!1),[b,w]=a.useState(()=>e||new Date),[S,E]=a.useState(()=>e?`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`:"12:00"),N=b.getFullYear(),R=b.getMonth(),P=Yr(N,R),$=Fx(N,R),F=a.useMemo(()=>{const C=[],M=R===0?11:R-1,K=R===0?N-1:N,q=Yr(K,M);for(let te=$-1;te>=0;te--)C.push({date:new Date(K,M,q-te),isOutside:!0});for(let te=1;te<=P;te++)C.push({date:new Date(N,R,te),isOutside:!1});const ee=42-C.length,Y=R===11?0:R+1,X=R===11?N+1:N;for(let te=1;te<=ee;te++)C.push({date:new Date(X,Y,te),isOutside:!0});return C},[N,R,P,$]),B=()=>{w(new Date(N,R-1,1))},k=()=>{w(new Date(N,R+1,1))},z=C=>{const{hours:M,minutes:K}=Xr(S),q=new Date(C.getFullYear(),C.getMonth(),C.getDate(),M,K);t?.(q)},D=C=>{const M=C.target.value;if(E(M),e){const{hours:K,minutes:q}=Xr(M),ee=new Date(e);ee.setHours(K,q),t?.(ee)}},V=()=>{const C=new Date;E(`${String(C.getHours()).padStart(2,"0")}:${String(C.getMinutes()).padStart(2,"0")}`),t?.(C),y(!1)},I=C=>!!(r&&C<new Date(r.setHours(0,0,0,0))||s&&C>new Date(s.setHours(23,59,59,999))),W=(C,M)=>I(C)?"disabled":M?"outside":e&&Zl(e,C)?"selected":Vx(C)?"today":"default";return a.useEffect(()=>{e&&(w(e),E(`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`))},[e]),c.jsxs(Ll,{open:h,onOpenChange:y,children:[c.jsx(Fl,{asChild:!0,children:c.jsxs("button",{ref:m,id:u,type:"button",disabled:i,className:T(Jl({variant:l}),d),"aria-label":v||"Choose date and time","aria-describedby":x,"aria-haspopup":"dialog","aria-expanded":h,children:[c.jsx("span",{className:T("truncate",!e&&"text-tertiary"),children:e?Bx(e,o,p):n}),c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx(Dx,{className:"text-tertiary h-4 w-4 shrink-0"}),c.jsx(zl,{className:"text-tertiary h-4 w-4 shrink-0"})]}),f&&c.jsx("input",{type:"hidden",name:f,value:e?e.toISOString():""})]})}),c.jsx(Vl,{children:c.jsxs(Bl,{className:T("bg-main border-border z-50 w-auto rounded-lg border p-4 shadow-lg","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2","data-[side=top]:slide-in-from-bottom-2"),sideOffset:4,align:"start",children:[c.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[c.jsx("button",{type:"button",onClick:B,className:T("hover:bg-alt focus-visible:ring-sunflower inline-flex h-8 w-8 items-center justify-center rounded-full","transition-colors focus-visible:ring-2 focus-visible:outline-none"),"aria-label":"Previous month",children:c.jsx(Gl,{className:"h-4 w-4"})}),c.jsxs("span",{className:"text-primary text-sm font-medium",children:[Kr[R]," ",N]}),c.jsx("button",{type:"button",onClick:k,className:T("hover:bg-alt focus-visible:ring-sunflower inline-flex h-8 w-8 items-center justify-center rounded-full","transition-colors focus-visible:ring-2 focus-visible:outline-none"),"aria-label":"Next month",children:c.jsx(Hl,{className:"h-4 w-4"})})]}),c.jsx("div",{className:"mb-2 grid grid-cols-7 gap-1",children:Lx.map(C=>c.jsx("div",{className:"text-tertiary text-center text-xs font-medium",children:C},C))}),c.jsx("div",{className:"grid grid-cols-7 gap-1",role:"grid","aria-label":`${Kr[R]} ${N}`,children:F.map(({date:C,isOutside:M},K)=>{const q=W(C,M),ee=q==="disabled";return c.jsx("button",{type:"button",onClick:()=>!ee&&z(C),disabled:ee,className:Ql({state:q}),"aria-label":C.toLocaleDateString("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric"}),"aria-selected":q==="selected",tabIndex:M?-1:0,children:C.getDate()},K)})}),c.jsx("div",{className:"border-border mt-4 border-t pt-4",children:c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("label",{htmlFor:"time-input",className:"text-secondary text-sm font-medium",children:"Time"}),c.jsx("input",{id:"time-input",type:"time",value:S,onChange:D,step:g*60,className:T("bg-card text-body text-primary border-border rounded-md border px-2 py-1","focus-visible:ring-sunflower focus-visible:ring-2 focus-visible:outline-none"),"aria-label":"Select time"})]})}),c.jsx("div",{className:"border-border mt-4 border-t pt-4",children:c.jsx("button",{type:"button",onClick:V,className:T("text-sunflower hover:text-sunflower-hover w-full text-center text-sm font-medium","transition-colors focus-visible:underline focus-visible:outline-none"),children:"Now"})})]})})]})});ec.displayName="DateTimePicker";const tc=U("bg-border shrink-0",{variants:{orientation:{horizontal:"h-px w-full",vertical:"h-full w-px"}},defaultVariants:{orientation:"horizontal"}}),nc=a.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...o},r)=>{const s=t??"horizontal";return c.jsx("div",{ref:r,role:n?"none":"separator","aria-orientation":n?void 0:s,className:T(tc({orientation:s,className:e})),...o})});nc.displayName="Divider";var An="DropdownMenu",[Wx]=le(An,[Pn]),de=Pn(),[zx,oc]=Wx(An),rc=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:r,defaultOpen:s,onOpenChange:i,modal:l=!0}=e,d=de(t),u=a.useRef(null),[f,p]=he({prop:r,defaultProp:s??!1,onChange:i,caller:An});return c.jsx(zx,{scope:t,triggerId:me(),triggerRef:u,contentId:me(),open:f,onOpenChange:p,onOpenToggle:a.useCallback(()=>p(g=>!g),[p]),modal:l,children:c.jsx(Oi,{...d,open:f,onOpenChange:p,dir:o,modal:l,children:n})})};rc.displayName=An;var sc="DropdownMenuTrigger",ac=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...r}=e,s=oc(sc,n),i=de(n);return c.jsx($i,{asChild:!0,...i,children:c.jsx(L.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...r,ref:Ne(t,s.triggerRef),onPointerDown:A(e.onPointerDown,l=>{!o&&l.button===0&&l.ctrlKey===!1&&(s.onOpenToggle(),s.open||l.preventDefault())}),onKeyDown:A(e.onKeyDown,l=>{o||(["Enter"," "].includes(l.key)&&s.onOpenToggle(),l.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});ac.displayName=sc;var Gx="DropdownMenuPortal",ic=e=>{const{__scopeDropdownMenu:t,...n}=e,o=de(t);return c.jsx(Li,{...o,...n})};ic.displayName=Gx;var lc="DropdownMenuContent",cc=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oc(lc,n),s=de(n),i=a.useRef(!1);return c.jsx(Fi,{id:r.contentId,"aria-labelledby":r.triggerId,...s,...o,ref:t,onCloseAutoFocus:A(e.onCloseAutoFocus,l=>{i.current||r.triggerRef.current?.focus(),i.current=!1,l.preventDefault()}),onInteractOutside:A(e.onInteractOutside,l=>{const d=l.detail.originalEvent,u=d.button===0&&d.ctrlKey===!0,f=d.button===2||u;(!r.modal||f)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});cc.displayName=lc;var Hx="DropdownMenuGroup",dc=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=de(n);return c.jsx(Vi,{...r,...o,ref:t})});dc.displayName=Hx;var Ux="DropdownMenuLabel",uc=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=de(n);return c.jsx(Bi,{...r,...o,ref:t})});uc.displayName=Ux;var Kx="DropdownMenuItem",fc=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=de(n);return c.jsx(Wi,{...r,...o,ref:t})});fc.displayName=Kx;var Yx="DropdownMenuCheckboxItem",pc=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=de(n);return c.jsx(zi,{...r,...o,ref:t})});pc.displayName=Yx;var Xx="DropdownMenuRadioGroup",mc=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=de(n);return c.jsx(Gi,{...r,...o,ref:t})});mc.displayName=Xx;var qx="DropdownMenuRadioItem",gc=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=de(n);return c.jsx(Hi,{...r,...o,ref:t})});gc.displayName=qx;var Zx="DropdownMenuItemIndicator",hc=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=de(n);return c.jsx(Ui,{...r,...o,ref:t})});hc.displayName=Zx;var Jx="DropdownMenuSeparator",vc=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=de(n);return c.jsx(Ki,{...r,...o,ref:t})});vc.displayName=Jx;var Qx="DropdownMenuArrow",eb=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=de(n);return c.jsx(Yi,{...r,...o,ref:t})});eb.displayName=Qx;var tb=e=>{const{__scopeDropdownMenu:t,children:n,open:o,onOpenChange:r,defaultOpen:s}=e,i=de(t),[l,d]=he({prop:o,defaultProp:s??!1,onChange:r,caller:"DropdownMenuSub"});return c.jsx(Xi,{...i,open:l,onOpenChange:d,children:n})},nb="DropdownMenuSubTrigger",xc=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=de(n);return c.jsx(qi,{...r,...o,ref:t})});xc.displayName=nb;var ob="DropdownMenuSubContent",bc=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=de(n);return c.jsx(Zi,{...r,...o,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});bc.displayName=ob;var rb=rc,yc=ac,sb=ic,ab=cc,ib=dc,lb=uc,cb=fc,db=pc,ub=mc,fb=gc,wc=hc,pb=vc,mb=tb,gb=xc,hb=bc;const vb=rb,xb=yc,bb=ib,Cc=sb,yb=mb,wb=ub,Sc=a.forwardRef(({className:e,inset:t,children:n,...o},r)=>c.jsxs(gb,{ref:r,className:T("text-body flex cursor-default items-center rounded-sm px-2 py-1.5 outline-none select-none","focus:bg-vanilla focus:text-primary","data-[state=open]:bg-vanilla data-[state=open]:text-primary",t&&"pl-8",e),...o,children:[n,c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"ml-auto h-4 w-4",children:c.jsx("path",{d:"m9 18 6-6-6-6"})})]}));Sc.displayName="DropdownMenuSubTrigger";const Rc=a.forwardRef(({className:e,...t},n)=>c.jsx(hb,{ref:n,className:T("border-border bg-card text-primary z-50 min-w-32 overflow-hidden rounded-md border p-1 font-sans shadow-lg","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-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",e),...t}));Rc.displayName="DropdownMenuSubContent";const Ec=a.forwardRef(({className:e,sideOffset:t=4,...n},o)=>c.jsx(Cc,{children:c.jsx(ab,{ref:o,sideOffset:t,className:T("border-border bg-card text-primary z-50 min-w-32 overflow-hidden rounded-md border p-1 font-sans shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-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",e),...n})}));Ec.displayName="DropdownMenuContent";const Tc=a.forwardRef(({className:e,inset:t,...n},o)=>c.jsx(cb,{ref:o,className:T("text-body relative flex cursor-default items-center rounded-sm px-2 py-1.5 outline-none select-none","focus:bg-vanilla focus:text-primary","data-disabled:pointer-events-none data-disabled:opacity-50",t&&"pl-8",e),...n}));Tc.displayName="DropdownMenuItem";const Pc=a.forwardRef(({className:e,children:t,checked:n,...o},r)=>c.jsxs(db,{ref:r,className:T("text-body relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 outline-none select-none","focus:bg-vanilla focus:text-primary","data-disabled:pointer-events-none data-disabled:opacity-50",e),checked:n,...o,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(wc,{children:c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:c.jsx("path",{d:"M20 6 9 17l-5-5"})})})}),t]}));Pc.displayName="DropdownMenuCheckboxItem";const Nc=a.forwardRef(({className:e,children:t,...n},o)=>c.jsxs(fb,{ref:o,className:T("text-body relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 outline-none select-none","focus:bg-vanilla focus:text-primary","data-disabled:pointer-events-none data-disabled:opacity-50",e),...n,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(wc,{children:c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-2 w-2 fill-current",children:c.jsx("circle",{cx:"12",cy:"12",r:"10"})})})}),t]}));Nc.displayName="DropdownMenuRadioItem";const Mc=a.forwardRef(({className:e,inset:t,...n},o)=>c.jsx(lb,{ref:o,className:T("text-small text-primary px-2 py-1.5",t&&"pl-8",e),...n}));Mc.displayName="DropdownMenuLabel";const Ac=a.forwardRef(({className:e,...t},n)=>c.jsx(pb,{ref:n,className:T("bg-border -mx-1 my-1 h-px",e),...t}));Ac.displayName="DropdownMenuSeparator";const Dc=a.forwardRef(({className:e,...t},n)=>c.jsx("span",{ref:n,className:T("text-small text-tertiary ml-auto tracking-widest",e),...t}));Dc.displayName="DropdownMenuShortcut";const _c=a.forwardRef(({className:e,iconSize:t="default",...n},o)=>{const r={sm:"h-4 w-4",default:"h-5 w-5",lg:"h-6 w-6"},s={sm:"h-7 w-7",default:"h-8 w-8",lg:"h-10 w-10"};return c.jsxs(yc,{ref:o,className:T("text-secondary inline-flex items-center justify-center rounded-md transition-colors","hover:bg-vanilla hover:text-primary","focus-visible:ring-sunflower focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none","disabled:pointer-events-none disabled:opacity-50",s[t],e),...n,children:[c.jsx(Ix,{className:r[t]}),c.jsx("span",{className:"sr-only",children:"Open menu"})]})});_c.displayName="ActionsMenuButton";const Ic=U("font-mono text-xs leading-5 font-normal tracking-[1.2px] uppercase",{variants:{variant:{default:"text-primary",primary:"text-primary",secondary:"text-secondary"},size:{default:"text-xs",sm:"text-[10px]",lg:"text-sm"}},defaultVariants:{variant:"default",size:"default"}}),kc=a.forwardRef(({className:e,variant:t,size:n,asChild:o=!1,...r},s)=>{const i=o?Se:"span";return c.jsx(i,{className:T(Ic({variant:t,size:n,className:e})),ref:s,...r})});kc.displayName="Eyebrow";var Cb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Sb=Cb.reduce((e,t)=>{const n=ua(`Primitive.${t}`),o=a.forwardRef((r,s)=>{const{asChild:i,...l}=r,d=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(d,{...l,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),Rb="Label",jc=a.forwardRef((e,t)=>c.jsx(Sb.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));jc.displayName=Rb;var Eb=jc;const Oc=U("text-tertiary font-sans font-normal peer-disabled:cursor-not-allowed peer-disabled:opacity-50",{variants:{size:{default:"text-small",sm:"text-label"}},defaultVariants:{size:"default"}}),Yo=a.forwardRef(({className:e,size:t,...n},o)=>c.jsx(Eb,{ref:o,className:T(Oc({size:t}),e),...n}));Yo.displayName="Label";const Xo=a.forwardRef(({className:e,variant:t="default",children:n,...o},r)=>n?c.jsx("p",{ref:r,className:T("text-descriptive font-sans text-sm",t==="default"?"text-tertiary":"text-error",e),...o,children:n}):null);Xo.displayName="FormMessage";const $c=a.forwardRef(({className:e,label:t,labelSize:n,hint:o,error:r,htmlFor:s,children:i,...l},d)=>{const u=s?`${s}-message`:void 0;return c.jsxs("div",{ref:d,className:T("flex flex-col gap-1.5",e),...l,children:[t&&c.jsx(Yo,{htmlFor:s,size:n,children:t}),i,(o||r)&&c.jsx(Xo,{id:u,variant:r?"error":"default",role:r?"alert":void 0,children:r||o})]})});$c.displayName="FormField";const Tb=U("grid",{variants:{cols:{1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",12:"grid-cols-12"},gap:{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},justify:{start:"justify-items-start",center:"justify-items-center",end:"justify-items-end",stretch:"justify-items-stretch"}},defaultVariants:{cols:1,gap:"md",align:"stretch",justify:"stretch"}}),Pb={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",12:"grid-cols-12"},Nb={none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},Mb={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},Ab={start:"justify-items-start",center:"justify-items-center",end:"justify-items-end",stretch:"justify-items-stretch"};function Ue(e,t,n){if(!e)return n?t[n]:"";if(typeof e=="object"){const o=[];return e.base!==void 0?o.push(t[e.base]):n&&o.push(t[n]),e.sm!==void 0&&o.push(`sm:${t[e.sm].split(":").pop()}`),e.md!==void 0&&o.push(`md:${t[e.md].split(":").pop()}`),e.lg!==void 0&&o.push(`lg:${t[e.lg].split(":").pop()}`),e.xl!==void 0&&o.push(`xl:${t[e.xl].split(":").pop()}`),e["2xl"]!==void 0&&o.push(`2xl:${t[e["2xl"]].split(":").pop()}`),o.join(" ")}return t[e]}const Lc=a.forwardRef(({className:e,cols:t,gap:n,align:o,justify:r,asChild:s=!1,...i},l)=>{const d=s?Se:"div",u=Ue(t,Pb,1),f=Ue(n,Nb,"md"),p=Ue(o,Mb,"stretch"),g=Ue(r,Ab,"stretch");return c.jsx(d,{className:T("grid",u,f,p,g,e),ref:l,...i})});Lc.displayName="Grid";const Db=U("",{variants:{colSpan:{1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12",full:"col-span-full"},rowSpan:{1:"row-span-1",2:"row-span-2",3:"row-span-3",4:"row-span-4",5:"row-span-5",6:"row-span-6",full:"row-span-full"},colStart:{1:"col-start-1",2:"col-start-2",3:"col-start-3",4:"col-start-4",5:"col-start-5",6:"col-start-6",7:"col-start-7",8:"col-start-8",9:"col-start-9",10:"col-start-10",11:"col-start-11",12:"col-start-12",auto:"col-start-auto"}},defaultVariants:{}}),_b={1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12",full:"col-span-full"},Ib={1:"row-span-1",2:"row-span-2",3:"row-span-3",4:"row-span-4",5:"row-span-5",6:"row-span-6",full:"row-span-full"},kb={1:"col-start-1",2:"col-start-2",3:"col-start-3",4:"col-start-4",5:"col-start-5",6:"col-start-6",7:"col-start-7",8:"col-start-8",9:"col-start-9",10:"col-start-10",11:"col-start-11",12:"col-start-12",auto:"col-start-auto"},Fc=a.forwardRef(({className:e,colSpan:t,rowSpan:n,colStart:o,asChild:r=!1,...s},i)=>{const l=r?Se:"div",d=Ue(t,_b),u=Ue(n,Ib),f=Ue(o,kb);return c.jsx(l,{className:T(d,u,f,e),ref:i,...s})});Fc.displayName="GridItem";const Vc=U("text-primary font-normal",{variants:{level:{hero:"font-display text-hero",h1:"text-h1 font-sans font-normal",h2:"text-h2 font-sans font-normal",h3:"text-h3 font-sans font-normal",h4:"text-h4 font-sans font-normal"}},defaultVariants:{level:"h1"}}),jb={hero:"h1",h1:"h1",h2:"h2",h3:"h3",h4:"h4"},Bc=a.forwardRef(({className:e,level:t="h1",as:n,asChild:o=!1,...r},s)=>{const i=n??jb[t??"h1"],l=o?Se:i;return c.jsx(l,{className:T(Vc({level:t,className:e})),ref:s,...r})});Bc.displayName="Heading";const Wc=U("bg-card text-body text-primary placeholder:text-tertiary flex h-10 w-full rounded-md border px-3 py-2 font-sans transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",{variants:{variant:{default:"border-border focus-visible:ring-sunflower",error:"border-error focus-visible:ring-error"}},defaultVariants:{variant:"default"}}),zc=a.forwardRef(({className:e,variant:t,type:n="text",...o},r)=>c.jsx("input",{type:n,className:T(Wc({variant:t}),e),ref:r,...o}));zc.displayName="Input";const Gc=U("focus-visible:ring-sunflower inline-flex items-center font-sans transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",{variants:{variant:{default:"text-primary hover:text-secondary underline underline-offset-4",muted:"text-secondary hover:text-primary underline underline-offset-4",nav:"text-primary hover:text-secondary no-underline hover:underline hover:underline-offset-4"},size:{sm:"text-small",default:"text-body",lg:"text-body font-medium"}},defaultVariants:{variant:"default",size:"default"}}),Hc=a.forwardRef(({className:e,variant:t,size:n,asChild:o=!1,...r},s)=>{const i=o?Se:"a";return c.jsx(i,{className:T(Gc({variant:t,size:n,className:e})),ref:s,...r})});Hc.displayName="Link";const Ob=Ms,$b=As,Uc=Ds,Lb=pn,qo=a.forwardRef(({className:e,...t},n)=>c.jsx(_s,{ref:n,className:T("fixed inset-0 z-50 bg-black/50","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","duration-200",e),...t}));qo.displayName="ModalOverlay";const Kc=U(["fixed top-1/2 left-1/2 z-50 -translate-x-1/2 -translate-y-1/2","bg-main grid w-full gap-4 p-6 shadow-lg","max-h-[85vh] overflow-y-auto","border-border rounded-lg border","focus-visible:ring-sunflower focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%]","data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]","duration-200"],{variants:{size:{sm:"max-w-[400px]",default:"max-w-[500px]",lg:"max-w-[640px]",full:"max-w-[95vw]"}},defaultVariants:{size:"default"}}),Yc=a.forwardRef(({className:e,children:t,size:n,showCloseButton:o=!0,...r},s)=>c.jsxs(Uc,{children:[c.jsx(qo,{}),c.jsxs(Is,{ref:s,className:T(Kc({size:n}),e),...r,children:[t,o&&c.jsxs(pn,{className:T("absolute top-4 right-4 rounded-sm opacity-70","ring-offset-main transition-opacity","hover:opacity-100","focus:ring-sunflower focus:ring-2 focus:ring-offset-2 focus:outline-none","disabled:pointer-events-none","data-[state=open]:bg-alt data-[state=open]:text-secondary"),children:[c.jsx(Ul,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Yc.displayName="ModalContent";const Xc=a.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:T("flex flex-col space-y-1.5 text-center sm:text-left",e),...t}));Xc.displayName="ModalHeader";const qc=a.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:T("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t}));qc.displayName="ModalFooter";const Zc=a.forwardRef(({className:e,...t},n)=>c.jsx(ks,{ref:n,className:T("text-primary text-lg leading-none tracking-tight",e),...t}));Zc.displayName="ModalTitle";const Jc=a.forwardRef(({className:e,...t},n)=>c.jsx(js,{ref:n,className:T("text-secondary text-sm",e),...t}));Jc.displayName="ModalDescription";const Qc=U("bg-border relative w-full overflow-hidden rounded-full",{variants:{size:{sm:"h-1",default:"h-2",lg:"h-3",xl:"h-4"}},defaultVariants:{size:"default"}}),ed=U("h-full transition-all duration-300 ease-out",{variants:{variant:{default:"bg-sunflower",muted:"bg-secondary",success:"bg-electric-blue"},animated:{true:"animate-pulse",false:""}},defaultVariants:{variant:"default",animated:!1}}),td=a.forwardRef(({className:e,value:t=0,max:n=100,size:o,variant:r,animated:s,label:i="Progress",indeterminate:l=!1,...d},u)=>{const f=Math.min(Math.max(t/n*100,0),100);return c.jsx("div",{ref:u,role:"progressbar","aria-valuenow":l?void 0:t,"aria-valuemin":0,"aria-valuemax":n,"aria-label":i,className:T(Qc({size:o,className:e})),...d,children:c.jsx("div",{className:T(ed({variant:r,animated:s}),l&&"animate-progress-indeterminate"),style:{width:l?"50%":`${f}%`}})})});td.displayName="ProgressIndicator";var Zo="Radio",[Fb,nd]=le(Zo),[Vb,Bb]=Fb(Zo),od=a.forwardRef((e,t)=>{const{__scopeRadio:n,name:o,checked:r=!1,required:s,disabled:i,value:l="on",onCheck:d,form:u,...f}=e,[p,g]=a.useState(null),v=G(t,h=>g(h)),x=a.useRef(!1),m=p?u||!!p.closest("form"):!0;return c.jsxs(Vb,{scope:n,checked:r,disabled:i,children:[c.jsx(L.button,{type:"button",role:"radio","aria-checked":r,"data-state":id(r),"data-disabled":i?"":void 0,disabled:i,value:l,...f,ref:v,onClick:A(e.onClick,h=>{r||d?.(),m&&(x.current=h.isPropagationStopped(),x.current||h.stopPropagation())})}),m&&c.jsx(ad,{control:p,bubbles:!x.current,name:o,value:l,checked:r,required:s,disabled:i,form:u,style:{transform:"translateX(-100%)"}})]})});od.displayName=Zo;var rd="RadioIndicator",sd=a.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:o,...r}=e,s=Bb(rd,n);return c.jsx(fe,{present:o||s.checked,children:c.jsx(L.span,{"data-state":id(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:t})})});sd.displayName=rd;var Wb="RadioBubbleInput",ad=a.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:o=!0,...r},s)=>{const i=a.useRef(null),l=G(i,s),d=gn(n),u=hn(t);return a.useEffect(()=>{const f=i.current;if(!f)return;const p=window.HTMLInputElement.prototype,v=Object.getOwnPropertyDescriptor(p,"checked").set;if(d!==n&&v){const x=new Event("click",{bubbles:o});v.call(f,n),f.dispatchEvent(x)}},[d,n,o]),c.jsx(L.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...r,tabIndex:-1,ref:l,style:{...r.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});ad.displayName=Wb;function id(e){return e?"checked":"unchecked"}var zb=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Dn="RadioGroup",[Gb]=le(Dn,[Tn,nd]),ld=Tn(),cd=nd(),[Hb,Ub]=Gb(Dn),dd=a.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:o,defaultValue:r,value:s,required:i=!1,disabled:l=!1,orientation:d,dir:u,loop:f=!0,onValueChange:p,...g}=e,v=ld(n),x=bn(u),[m,h]=he({prop:s,defaultProp:r??null,onChange:p,caller:Dn});return c.jsx(Hb,{scope:n,name:o,required:i,disabled:l,value:m,onValueChange:h,children:c.jsx(di,{asChild:!0,...v,orientation:d,dir:x,loop:f,children:c.jsx(L.div,{role:"radiogroup","aria-required":i,"aria-orientation":d,"data-disabled":l?"":void 0,dir:x,...g,ref:t})})})});dd.displayName=Dn;var ud="RadioGroupItem",fd=a.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:o,...r}=e,s=Ub(ud,n),i=s.disabled||o,l=ld(n),d=cd(n),u=a.useRef(null),f=G(t,u),p=s.value===r.value,g=a.useRef(!1);return a.useEffect(()=>{const v=m=>{zb.includes(m.key)&&(g.current=!0)},x=()=>g.current=!1;return document.addEventListener("keydown",v),document.addEventListener("keyup",x),()=>{document.removeEventListener("keydown",v),document.removeEventListener("keyup",x)}},[]),c.jsx(ui,{asChild:!0,...l,focusable:!i,active:p,children:c.jsx(od,{disabled:i,required:s.required,checked:p,...d,...r,name:s.name,ref:f,onCheck:()=>s.onValueChange(r.value),onKeyDown:A(v=>{v.key==="Enter"&&v.preventDefault()}),onFocus:A(r.onFocus,()=>{g.current&&u.current?.click()})})})});fd.displayName=ud;var Kb="RadioGroupIndicator",pd=a.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...o}=e,r=cd(n);return c.jsx(sd,{...r,...o,ref:t})});pd.displayName=Kb;var Yb=dd,Xb=fd,qb=pd;const md=a.forwardRef(({className:e,...t},n)=>c.jsx(Yb,{className:T("grid gap-2",e),...t,ref:n}));md.displayName="RadioGroup";const gd=a.forwardRef(({className:e,...t},n)=>c.jsx(Xb,{ref:n,className:T("border-border bg-card aspect-square h-5 w-5 rounded-full border transition-colors","focus-visible:ring-sunflower focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none","disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:border-sunflower",e),...t,children:c.jsx(qb,{className:"flex items-center justify-center",children:c.jsx("span",{className:"bg-sunflower h-2.5 w-2.5 rounded-full"})})}));gd.displayName="RadioGroupItem";function qr(e,[t,n]){return Math.min(n,Math.max(t,e))}function Zb(e){const t=Jb(e),n=a.forwardRef((o,r)=>{const{children:s,...i}=o,l=a.Children.toArray(s),d=l.find(ey);if(d){const u=d.props.children,f=l.map(p=>p===d?a.Children.count(u)>1?a.Children.only(null):a.isValidElement(u)?u.props.children:null:p);return c.jsx(t,{...i,ref:r,children:a.isValidElement(u)?a.cloneElement(u,void 0,f):null})}return c.jsx(t,{...i,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function Jb(e){const t=a.forwardRef((n,o)=>{const{children:r,...s}=n;if(a.isValidElement(r)){const i=ny(r),l=ty(s,r.props);return r.type!==a.Fragment&&(l.ref=o?Ne(o,i):i),a.cloneElement(r,l)}return a.Children.count(r)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Qb=Symbol("radix.slottable");function ey(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Qb}function ty(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...l)=>{const d=s(...l);return r(...l),d}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function ny(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var hd=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),oy="VisuallyHidden",_n=a.forwardRef((e,t)=>c.jsx(L.span,{...e,ref:t,style:{...hd,...e.style}}));_n.displayName=oy;var ry=_n,sy=[" ","Enter","ArrowUp","ArrowDown"],ay=[" ","Enter"],Xe="Select",[In,kn,iy]=xn(Xe),[gt]=le(Xe,[iy,Fe]),jn=Fe(),[ly,We]=gt(Xe),[cy,dy]=gt(Xe),vd=e=>{const{__scopeSelect:t,children:n,open:o,defaultOpen:r,onOpenChange:s,value:i,defaultValue:l,onValueChange:d,dir:u,name:f,autoComplete:p,disabled:g,required:v,form:x}=e,m=jn(t),[h,y]=a.useState(null),[b,w]=a.useState(null),[S,E]=a.useState(!1),N=bn(u),[R,P]=he({prop:o,defaultProp:r??!1,onChange:s,caller:Xe}),[$,F]=he({prop:i,defaultProp:l,onChange:d,caller:Xe}),B=a.useRef(null),k=h?x||!!h.closest("form"):!0,[z,D]=a.useState(new Set),V=Array.from(z).map(I=>I.props.value).join(";");return c.jsx(Nt,{...m,children:c.jsxs(ly,{required:v,scope:t,trigger:h,onTriggerChange:y,valueNode:b,onValueNodeChange:w,valueNodeHasChildren:S,onValueNodeHasChildrenChange:E,contentId:me(),value:$,onValueChange:F,open:R,onOpenChange:P,dir:N,triggerPointerDownPosRef:B,disabled:g,children:[c.jsx(In.Provider,{scope:t,children:c.jsx(cy,{scope:e.__scopeSelect,onNativeOptionAdd:a.useCallback(I=>{D(W=>new Set(W).add(I))},[]),onNativeOptionRemove:a.useCallback(I=>{D(W=>{const C=new Set(W);return C.delete(I),C})},[]),children:n})}),k?c.jsxs(Wd,{"aria-hidden":!0,required:v,tabIndex:-1,name:f,autoComplete:p,value:$,onChange:I=>F(I.target.value),disabled:g,form:x,children:[$===void 0?c.jsx("option",{value:""}):null,Array.from(z)]},V):null]})})};vd.displayName=Xe;var xd="SelectTrigger",bd=a.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:o=!1,...r}=e,s=jn(n),i=We(xd,n),l=i.disabled||o,d=G(t,i.onTriggerChange),u=kn(n),f=a.useRef("touch"),[p,g,v]=Gd(m=>{const h=u().filter(w=>!w.disabled),y=h.find(w=>w.value===i.value),b=Hd(h,m,y);b!==void 0&&i.onValueChange(b.value)}),x=m=>{l||(i.onOpenChange(!0),v()),m&&(i.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return c.jsx(Mt,{asChild:!0,...s,children:c.jsx(L.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":zd(i.value)?"":void 0,...r,ref:d,onClick:A(r.onClick,m=>{m.currentTarget.focus(),f.current!=="mouse"&&x(m)}),onPointerDown:A(r.onPointerDown,m=>{f.current=m.pointerType;const h=m.target;h.hasPointerCapture(m.pointerId)&&h.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(x(m),m.preventDefault())}),onKeyDown:A(r.onKeyDown,m=>{const h=p.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&g(m.key),!(h&&m.key===" ")&&sy.includes(m.key)&&(x(),m.preventDefault())})})})});bd.displayName=xd;var yd="SelectValue",wd=a.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,children:s,placeholder:i="",...l}=e,d=We(yd,n),{onValueNodeHasChildrenChange:u}=d,f=s!==void 0,p=G(t,d.onValueNodeChange);return se(()=>{u(f)},[u,f]),c.jsx(L.span,{...l,ref:p,style:{pointerEvents:"none"},children:zd(d.value)?c.jsx(c.Fragment,{children:i}):s})});wd.displayName=yd;var uy="SelectIcon",Cd=a.forwardRef((e,t)=>{const{__scopeSelect:n,children:o,...r}=e;return c.jsx(L.span,{"aria-hidden":!0,...r,ref:t,children:o||"▼"})});Cd.displayName=uy;var fy="SelectPortal",Sd=e=>c.jsx(Je,{asChild:!0,...e});Sd.displayName=fy;var qe="SelectContent",Rd=a.forwardRef((e,t)=>{const n=We(qe,e.__scopeSelect),[o,r]=a.useState();if(se(()=>{r(new DocumentFragment)},[]),!n.open){const s=o;return s?Rt.createPortal(c.jsx(Ed,{scope:e.__scopeSelect,children:c.jsx(In.Slot,{scope:e.__scopeSelect,children:c.jsx("div",{children:e.children})})}),s):null}return c.jsx(Td,{...e,ref:t})});Rd.displayName=qe;var be=10,[Ed,ze]=gt(qe),py="SelectContentImpl",my=Zb("SelectContent.RemoveScroll"),Td=a.forwardRef((e,t)=>{const{__scopeSelect:n,position:o="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:s,onPointerDownOutside:i,side:l,sideOffset:d,align:u,alignOffset:f,arrowPadding:p,collisionBoundary:g,collisionPadding:v,sticky:x,hideWhenDetached:m,avoidCollisions:h,...y}=e,b=We(qe,n),[w,S]=a.useState(null),[E,N]=a.useState(null),R=G(t,_=>S(_)),[P,$]=a.useState(null),[F,B]=a.useState(null),k=kn(n),[z,D]=a.useState(!1),V=a.useRef(!1);a.useEffect(()=>{if(w)return un(w)},[w]),cn();const I=a.useCallback(_=>{const[J,...oe]=k().map(ne=>ne.ref.current),[Z]=oe.slice(-1),Q=document.activeElement;for(const ne of _)if(ne===Q||(ne?.scrollIntoView({block:"nearest"}),ne===J&&E&&(E.scrollTop=0),ne===Z&&E&&(E.scrollTop=E.scrollHeight),ne?.focus(),document.activeElement!==Q))return},[k,E]),W=a.useCallback(()=>I([P,w]),[I,P,w]);a.useEffect(()=>{z&&W()},[z,W]);const{onOpenChange:C,triggerPointerDownPosRef:M}=b;a.useEffect(()=>{if(w){let _={x:0,y:0};const J=Z=>{_={x:Math.abs(Math.round(Z.pageX)-(M.current?.x??0)),y:Math.abs(Math.round(Z.pageY)-(M.current?.y??0))}},oe=Z=>{_.x<=10&&_.y<=10?Z.preventDefault():w.contains(Z.target)||C(!1),document.removeEventListener("pointermove",J),M.current=null};return M.current!==null&&(document.addEventListener("pointermove",J),document.addEventListener("pointerup",oe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",J),document.removeEventListener("pointerup",oe,{capture:!0})}}},[w,C,M]),a.useEffect(()=>{const _=()=>C(!1);return window.addEventListener("blur",_),window.addEventListener("resize",_),()=>{window.removeEventListener("blur",_),window.removeEventListener("resize",_)}},[C]);const[K,q]=Gd(_=>{const J=k().filter(Q=>!Q.disabled),oe=J.find(Q=>Q.ref.current===document.activeElement),Z=Hd(J,_,oe);Z&&setTimeout(()=>Z.ref.current.focus())}),ee=a.useCallback((_,J,oe)=>{const Z=!V.current&&!oe;(b.value!==void 0&&b.value===J||Z)&&($(_),Z&&(V.current=!0))},[b.value]),Y=a.useCallback(()=>w?.focus(),[w]),X=a.useCallback((_,J,oe)=>{const Z=!V.current&&!oe;(b.value!==void 0&&b.value===J||Z)&&B(_)},[b.value]),te=o==="popper"?fo:Pd,ae=te===fo?{side:l,sideOffset:d,align:u,alignOffset:f,arrowPadding:p,collisionBoundary:g,collisionPadding:v,sticky:x,hideWhenDetached:m,avoidCollisions:h}:{};return c.jsx(Ed,{scope:n,content:w,viewport:E,onViewportChange:N,itemRefCallback:ee,selectedItem:P,onItemLeave:Y,itemTextRefCallback:X,focusSelectedItem:W,selectedItemText:F,position:o,isPositioned:z,searchRef:K,children:c.jsx(Tt,{as:my,allowPinchZoom:!0,children:c.jsx(Et,{asChild:!0,trapped:b.open,onMountAutoFocus:_=>{_.preventDefault()},onUnmountAutoFocus:A(r,_=>{b.trigger?.focus({preventScroll:!0}),_.preventDefault()}),children:c.jsx(Ze,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:_=>_.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:c.jsx(te,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:_=>_.preventDefault(),...y,...ae,onPlaced:()=>D(!0),ref:R,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:A(y.onKeyDown,_=>{const J=_.ctrlKey||_.altKey||_.metaKey;if(_.key==="Tab"&&_.preventDefault(),!J&&_.key.length===1&&q(_.key),["ArrowUp","ArrowDown","Home","End"].includes(_.key)){let Z=k().filter(Q=>!Q.disabled).map(Q=>Q.ref.current);if(["ArrowUp","End"].includes(_.key)&&(Z=Z.slice().reverse()),["ArrowUp","ArrowDown"].includes(_.key)){const Q=_.target,ne=Z.indexOf(Q);Z=Z.slice(ne+1)}setTimeout(()=>I(Z)),_.preventDefault()}})})})})})})});Td.displayName=py;var gy="SelectItemAlignedPosition",Pd=a.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:o,...r}=e,s=We(qe,n),i=ze(qe,n),[l,d]=a.useState(null),[u,f]=a.useState(null),p=G(t,R=>f(R)),g=kn(n),v=a.useRef(!1),x=a.useRef(!0),{viewport:m,selectedItem:h,selectedItemText:y,focusSelectedItem:b}=i,w=a.useCallback(()=>{if(s.trigger&&s.valueNode&&l&&u&&m&&h&&y){const R=s.trigger.getBoundingClientRect(),P=u.getBoundingClientRect(),$=s.valueNode.getBoundingClientRect(),F=y.getBoundingClientRect();if(s.dir!=="rtl"){const Q=F.left-P.left,ne=$.left-Q,ve=R.left-ne,Ge=R.width+ve,Vn=Math.max(Ge,P.width),Bn=window.innerWidth-be,Wn=qr(ne,[be,Math.max(be,Bn-Vn)]);l.style.minWidth=Ge+"px",l.style.left=Wn+"px"}else{const Q=P.right-F.right,ne=window.innerWidth-$.right-Q,ve=window.innerWidth-R.right-ne,Ge=R.width+ve,Vn=Math.max(Ge,P.width),Bn=window.innerWidth-be,Wn=qr(ne,[be,Math.max(be,Bn-Vn)]);l.style.minWidth=Ge+"px",l.style.right=Wn+"px"}const B=g(),k=window.innerHeight-be*2,z=m.scrollHeight,D=window.getComputedStyle(u),V=parseInt(D.borderTopWidth,10),I=parseInt(D.paddingTop,10),W=parseInt(D.borderBottomWidth,10),C=parseInt(D.paddingBottom,10),M=V+I+z+C+W,K=Math.min(h.offsetHeight*5,M),q=window.getComputedStyle(m),ee=parseInt(q.paddingTop,10),Y=parseInt(q.paddingBottom,10),X=R.top+R.height/2-be,te=k-X,ae=h.offsetHeight/2,_=h.offsetTop+ae,J=V+I+_,oe=M-J;if(J<=X){const Q=B.length>0&&h===B[B.length-1].ref.current;l.style.bottom="0px";const ne=u.clientHeight-m.offsetTop-m.offsetHeight,ve=Math.max(te,ae+(Q?Y:0)+ne+W),Ge=J+ve;l.style.height=Ge+"px"}else{const Q=B.length>0&&h===B[0].ref.current;l.style.top="0px";const ve=Math.max(X,V+m.offsetTop+(Q?ee:0)+ae)+oe;l.style.height=ve+"px",m.scrollTop=J-X+m.offsetTop}l.style.margin=`${be}px 0`,l.style.minHeight=K+"px",l.style.maxHeight=k+"px",o?.(),requestAnimationFrame(()=>v.current=!0)}},[g,s.trigger,s.valueNode,l,u,m,h,y,s.dir,o]);se(()=>w(),[w]);const[S,E]=a.useState();se(()=>{u&&E(window.getComputedStyle(u).zIndex)},[u]);const N=a.useCallback(R=>{R&&x.current===!0&&(w(),b?.(),x.current=!1)},[w,b]);return c.jsx(vy,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:v,onScrollButtonChange:N,children:c.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:c.jsx(L.div,{...r,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});Pd.displayName=gy;var hy="SelectPopperPosition",fo=a.forwardRef((e,t)=>{const{__scopeSelect:n,align:o="start",collisionPadding:r=be,...s}=e,i=jn(n);return c.jsx(Rn,{...i,...s,ref:t,align:o,collisionPadding:r,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});fo.displayName=hy;var[vy,Jo]=gt(qe,{}),po="SelectViewport",Nd=a.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:o,...r}=e,s=ze(po,n),i=Jo(po,n),l=G(t,s.onViewportChange),d=a.useRef(0);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),c.jsx(In.Slot,{scope:n,children:c.jsx(L.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:A(r.onScroll,u=>{const f=u.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:g}=i;if(g?.current&&p){const v=Math.abs(d.current-f.scrollTop);if(v>0){const x=window.innerHeight-be*2,m=parseFloat(p.style.minHeight),h=parseFloat(p.style.height),y=Math.max(m,h);if(y<x){const b=y+v,w=Math.min(x,b),S=b-w;p.style.height=w+"px",p.style.bottom==="0px"&&(f.scrollTop=S>0?S:0,p.style.justifyContent="flex-end")}}}d.current=f.scrollTop})})})]})});Nd.displayName=po;var Md="SelectGroup",[xy,by]=gt(Md),Ad=a.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=me();return c.jsx(xy,{scope:n,id:r,children:c.jsx(L.div,{role:"group","aria-labelledby":r,...o,ref:t})})});Ad.displayName=Md;var Dd="SelectLabel",_d=a.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=by(Dd,n);return c.jsx(L.div,{id:r.id,...o,ref:t})});_d.displayName=Dd;var ln="SelectItem",[yy,Id]=gt(ln),kd=a.forwardRef((e,t)=>{const{__scopeSelect:n,value:o,disabled:r=!1,textValue:s,...i}=e,l=We(ln,n),d=ze(ln,n),u=l.value===o,[f,p]=a.useState(s??""),[g,v]=a.useState(!1),x=G(t,b=>d.itemRefCallback?.(b,o,r)),m=me(),h=a.useRef("touch"),y=()=>{r||(l.onValueChange(o),l.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return c.jsx(yy,{scope:n,value:o,disabled:r,textId:m,isSelected:u,onItemTextChange:a.useCallback(b=>{p(w=>w||(b?.textContent??"").trim())},[]),children:c.jsx(In.ItemSlot,{scope:n,value:o,disabled:r,textValue:f,children:c.jsx(L.div,{role:"option","aria-labelledby":m,"data-highlighted":g?"":void 0,"aria-selected":u&&g,"data-state":u?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...i,ref:x,onFocus:A(i.onFocus,()=>v(!0)),onBlur:A(i.onBlur,()=>v(!1)),onClick:A(i.onClick,()=>{h.current!=="mouse"&&y()}),onPointerUp:A(i.onPointerUp,()=>{h.current==="mouse"&&y()}),onPointerDown:A(i.onPointerDown,b=>{h.current=b.pointerType}),onPointerMove:A(i.onPointerMove,b=>{h.current=b.pointerType,r?d.onItemLeave?.():h.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:A(i.onPointerLeave,b=>{b.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:A(i.onKeyDown,b=>{d.searchRef?.current!==""&&b.key===" "||(ay.includes(b.key)&&y(),b.key===" "&&b.preventDefault())})})})})});kd.displayName=ln;var bt="SelectItemText",jd=a.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,...s}=e,i=We(bt,n),l=ze(bt,n),d=Id(bt,n),u=dy(bt,n),[f,p]=a.useState(null),g=G(t,y=>p(y),d.onItemTextChange,y=>l.itemTextRefCallback?.(y,d.value,d.disabled)),v=f?.textContent,x=a.useMemo(()=>c.jsx("option",{value:d.value,disabled:d.disabled,children:v},d.value),[d.disabled,d.value,v]),{onNativeOptionAdd:m,onNativeOptionRemove:h}=u;return se(()=>(m(x),()=>h(x)),[m,h,x]),c.jsxs(c.Fragment,{children:[c.jsx(L.span,{id:d.textId,...s,ref:g}),d.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Rt.createPortal(s.children,i.valueNode):null]})});jd.displayName=bt;var Od="SelectItemIndicator",$d=a.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return Id(Od,n).isSelected?c.jsx(L.span,{"aria-hidden":!0,...o,ref:t}):null});$d.displayName=Od;var mo="SelectScrollUpButton",Ld=a.forwardRef((e,t)=>{const n=ze(mo,e.__scopeSelect),o=Jo(mo,e.__scopeSelect),[r,s]=a.useState(!1),i=G(t,o.onScrollButtonChange);return se(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=d.scrollTop>0;s(u)};const d=n.viewport;return l(),d.addEventListener("scroll",l),()=>d.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),r?c.jsx(Vd,{...e,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:d}=n;l&&d&&(l.scrollTop=l.scrollTop-d.offsetHeight)}}):null});Ld.displayName=mo;var go="SelectScrollDownButton",Fd=a.forwardRef((e,t)=>{const n=ze(go,e.__scopeSelect),o=Jo(go,e.__scopeSelect),[r,s]=a.useState(!1),i=G(t,o.onScrollButtonChange);return se(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=d.scrollHeight-d.clientHeight,f=Math.ceil(d.scrollTop)<u;s(f)};const d=n.viewport;return l(),d.addEventListener("scroll",l),()=>d.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),r?c.jsx(Vd,{...e,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:d}=n;l&&d&&(l.scrollTop=l.scrollTop+d.offsetHeight)}}):null});Fd.displayName=go;var Vd=a.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:o,...r}=e,s=ze("SelectScrollButton",n),i=a.useRef(null),l=kn(n),d=a.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return a.useEffect(()=>()=>d(),[d]),se(()=>{l().find(f=>f.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),c.jsx(L.div,{"aria-hidden":!0,...r,ref:t,style:{flexShrink:0,...r.style},onPointerDown:A(r.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(o,50))}),onPointerMove:A(r.onPointerMove,()=>{s.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(o,50))}),onPointerLeave:A(r.onPointerLeave,()=>{d()})})}),wy="SelectSeparator",Bd=a.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return c.jsx(L.div,{"aria-hidden":!0,...o,ref:t})});Bd.displayName=wy;var ho="SelectArrow",Cy=a.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=jn(n),s=We(ho,n),i=ze(ho,n);return s.open&&i.position==="popper"?c.jsx(En,{...r,...o,ref:t}):null});Cy.displayName=ho;var Sy="SelectBubbleInput",Wd=a.forwardRef(({__scopeSelect:e,value:t,...n},o)=>{const r=a.useRef(null),s=G(o,r),i=gn(t);return a.useEffect(()=>{const l=r.current;if(!l)return;const d=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(d,"value").set;if(i!==t&&f){const p=new Event("change",{bubbles:!0});f.call(l,t),l.dispatchEvent(p)}},[i,t]),c.jsx(L.select,{...n,style:{...hd,...n.style},ref:s,defaultValue:t})});Wd.displayName=Sy;function zd(e){return e===""||e===void 0}function Gd(e){const t=ie(e),n=a.useRef(""),o=a.useRef(0),r=a.useCallback(i=>{const l=n.current+i;t(l),(function d(u){n.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>d(""),1e3))})(l)},[t]),s=a.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return a.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,r,s]}function Hd(e,t,n){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=Ry(e,Math.max(s,0));r.length===1&&(i=i.filter(u=>u!==n));const d=i.find(u=>u.textValue.toLowerCase().startsWith(r.toLowerCase()));return d!==n?d:void 0}function Ry(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var Ey=vd,Ty=bd,Py=wd,Ny=Cd,My=Sd,Ay=Rd,Dy=Nd,_y=Ad,Iy=_d,ky=kd,jy=jd,Oy=$d,$y=Ld,Ly=Fd,Fy=Bd;const Vy=Ey,By=_y,Wy=Py,Ud=a.forwardRef(({className:e,children:t,variant:n="default",...o},r)=>c.jsxs(Ty,{ref:r,className:T("bg-card text-body text-primary flex h-10 w-full items-center justify-between rounded-md border px-3 py-2 font-sans transition-colors","placeholder:text-tertiary","focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none","disabled:cursor-not-allowed disabled:opacity-50","[&>span]:line-clamp-1",n==="default"?"border-border focus-visible:ring-sunflower":"border-error focus-visible:ring-error",e),...o,children:[t,c.jsx(Ny,{asChild:!0,children:c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4 opacity-50",children:c.jsx("path",{d:"m6 9 6 6 6-6"})})})]}));Ud.displayName="SelectTrigger";const Qo=a.forwardRef(({className:e,...t},n)=>c.jsx($y,{ref:n,className:T("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:c.jsx("path",{d:"m18 15-6-6-6 6"})})}));Qo.displayName="SelectScrollUpButton";const er=a.forwardRef(({className:e,...t},n)=>c.jsx(Ly,{ref:n,className:T("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:c.jsx("path",{d:"m6 9 6 6 6-6"})})}));er.displayName="SelectScrollDownButton";const Kd=a.forwardRef(({className:e,children:t,position:n="popper",...o},r)=>c.jsx(My,{children:c.jsxs(Ay,{ref:r,className:T("border-border bg-card text-primary relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border font-sans shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-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",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...o,children:[c.jsx(Qo,{}),c.jsx(Dy,{className:T("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),c.jsx(er,{})]})}));Kd.displayName="SelectContent";const Yd=a.forwardRef(({className:e,...t},n)=>c.jsx(Iy,{ref:n,className:T("text-small text-tertiary py-1.5 pr-2 pl-8 font-normal",e),...t}));Yd.displayName="SelectLabel";const Xd=a.forwardRef(({className:e,children:t,...n},o)=>c.jsxs(ky,{ref:o,className:T("text-body relative flex w-full cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 outline-none select-none","focus:bg-vanilla focus:text-primary","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(Oy,{children:c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:c.jsx("polyline",{points:"20 6 9 17 4 12"})})})}),c.jsx(jy,{children:t})]}));Xd.displayName="SelectItem";const qd=a.forwardRef(({className:e,...t},n)=>c.jsx(Fy,{ref:n,className:T("bg-border -mx-1 my-1 h-px",e),...t}));qd.displayName="SelectSeparator";const Zd=U("bg-alt animate-pulse",{variants:{variant:{default:"rounded-md",circular:"rounded-full",text:"rounded"}},defaultVariants:{variant:"default"}}),Jd=a.forwardRef(({className:e,variant:t,width:n,height:o,style:r,...s},i)=>{const l={...r,...n!==void 0&&{width:typeof n=="number"?`${n}px`:n},...o!==void 0&&{height:typeof o=="number"?`${o}px`:o}};return c.jsx("div",{ref:i,"aria-hidden":"true",className:T(Zd({variant:t,className:e})),style:l,...s})});Jd.displayName="Skeleton";const Qd=U("inline-block animate-spin rounded-full border-solid border-current border-r-transparent motion-reduce:animate-[spin_1.5s_linear_infinite]",{variants:{variant:{default:"text-sunflower",muted:"text-secondary",inverted:"text-white"},size:{sm:"h-4 w-4 border-2",default:"h-6 w-6 border-2",lg:"h-8 w-8 border-3",xl:"h-12 w-12 border-4"}},defaultVariants:{variant:"default",size:"default"}}),eu=a.forwardRef(({className:e,variant:t,size:n,label:o="Loading",...r},s)=>c.jsx("span",{ref:s,role:"status","aria-label":o,className:T(Qd({variant:t,size:n,className:e})),...r,children:c.jsx("span",{className:"sr-only",children:o})}));eu.displayName="Spinner";const tu=U("flex",{variants:{direction:{vertical:"flex-col",horizontal:"flex-row"},gap:{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},wrap:{nowrap:"flex-nowrap",wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse"}},defaultVariants:{direction:"vertical",gap:"md",align:"stretch",justify:"start",wrap:"nowrap"}}),nu=a.forwardRef(({className:e,direction:t,gap:n,align:o,justify:r,wrap:s,asChild:i=!1,...l},d)=>{const u=i?Se:"div";return c.jsx(u,{className:T(tu({direction:t,gap:n,align:o,justify:r,wrap:s,className:e})),ref:d,...l})});nu.displayName="Stack";var On="Switch",[zy]=le(On),[Gy,Hy]=zy(On),ou=a.forwardRef((e,t)=>{const{__scopeSwitch:n,name:o,checked:r,defaultChecked:s,required:i,disabled:l,value:d="on",onCheckedChange:u,form:f,...p}=e,[g,v]=a.useState(null),x=G(t,w=>v(w)),m=a.useRef(!1),h=g?f||!!g.closest("form"):!0,[y,b]=he({prop:r,defaultProp:s??!1,onChange:u,caller:On});return c.jsxs(Gy,{scope:n,checked:y,disabled:l,children:[c.jsx(L.button,{type:"button",role:"switch","aria-checked":y,"aria-required":i,"data-state":iu(y),"data-disabled":l?"":void 0,disabled:l,value:d,...p,ref:x,onClick:A(e.onClick,w=>{b(S=>!S),h&&(m.current=w.isPropagationStopped(),m.current||w.stopPropagation())})}),h&&c.jsx(au,{control:g,bubbles:!m.current,name:o,value:d,checked:y,required:i,disabled:l,form:f,style:{transform:"translateX(-100%)"}})]})});ou.displayName=On;var ru="SwitchThumb",su=a.forwardRef((e,t)=>{const{__scopeSwitch:n,...o}=e,r=Hy(ru,n);return c.jsx(L.span,{"data-state":iu(r.checked),"data-disabled":r.disabled?"":void 0,...o,ref:t})});su.displayName=ru;var Uy="SwitchBubbleInput",au=a.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:o=!0,...r},s)=>{const i=a.useRef(null),l=G(i,s),d=gn(n),u=hn(t);return a.useEffect(()=>{const f=i.current;if(!f)return;const p=window.HTMLInputElement.prototype,v=Object.getOwnPropertyDescriptor(p,"checked").set;if(d!==n&&v){const x=new Event("click",{bubbles:o});v.call(f,n),f.dispatchEvent(x)}},[d,n,o]),c.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...r,tabIndex:-1,ref:l,style:{...r.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});au.displayName=Uy;function iu(e){return e?"checked":"unchecked"}var Ky=ou,Yy=su;const lu=a.forwardRef(({className:e,...t},n)=>c.jsx(Ky,{className:T("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors","focus-visible:ring-sunflower focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none","disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:bg-sunflower data-[state=unchecked]:bg-contrast",e),...t,ref:n,children:c.jsx(Yy,{className:T("pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform","data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));lu.displayName="Switch";const cu=U("text-body w-full caption-bottom border-collapse font-sans",{variants:{variant:{default:"border-separate border-spacing-0",striped:"border-separate border-spacing-0"},size:{default:"",compact:""}},defaultVariants:{variant:"default",size:"default"}}),Xy=U("border-border bg-alt border-b",{variants:{},defaultVariants:{}}),qy=U("",{variants:{},defaultVariants:{}}),Zy=U("transition-colors",{variants:{variant:{default:"border-border hover:bg-alt/50 border-b",striped:"border-border even:bg-alt/30 hover:bg-alt border-b"}},defaultVariants:{variant:"default"}}),Jy=U("text-small text-primary text-left align-middle font-sans font-normal [&:has([role=checkbox])]:pr-0",{variants:{sortable:{true:"hover:bg-contrast cursor-pointer select-none",false:""},size:{default:"h-12 px-4",compact:"h-8 px-2"}},defaultVariants:{sortable:!1,size:"default"}}),Qy=U("text-secondary align-middle [&:has([role=checkbox])]:pr-0",{variants:{size:{default:"p-4",compact:"p-2"}},defaultVariants:{size:"default"}}),tr=a.createContext({size:"default"}),du=a.forwardRef(({className:e,variant:t,size:n="default",...o},r)=>c.jsx(tr.Provider,{value:{size:n??"default"},children:c.jsx("div",{className:"relative w-full overflow-auto",children:c.jsx("table",{ref:r,className:T(cu({variant:t,size:n}),e),...o})})}));du.displayName="Table";const uu=a.forwardRef(({className:e,...t},n)=>c.jsx("thead",{ref:n,className:T(Xy(),e),...t}));uu.displayName="TableHeader";const fu=a.forwardRef(({className:e,...t},n)=>c.jsx("tbody",{ref:n,className:T(qy(),e),...t}));fu.displayName="TableBody";const pu=a.forwardRef(({className:e,...t},n)=>c.jsx("tfoot",{ref:n,className:T("border-border bg-alt text-primary border-t font-normal",e),...t}));pu.displayName="TableFooter";const mu=a.forwardRef(({className:e,variant:t,...n},o)=>c.jsx("tr",{ref:o,className:T(Zy({variant:t}),e),...n}));mu.displayName="TableRow";const gu=a.forwardRef(({className:e,children:t,sortable:n=!1,sortDirection:o=null,onSort:r,...s},i)=>{const{size:l}=a.useContext(tr),d=()=>{n&&r&&r()},u=f=>{n&&r&&(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),r())};return c.jsx("th",{ref:i,className:T(Jy({sortable:n,size:l}),e),onClick:d,onKeyDown:u,tabIndex:n?0:void 0,role:n?"button":void 0,"aria-sort":o==="asc"?"ascending":o==="desc"?"descending":void 0,...s,children:c.jsxs("div",{className:"flex items-center gap-2",children:[t,n&&c.jsxs("span",{className:"inline-flex flex-col","aria-hidden":"true",children:[c.jsx("svg",{className:T("h-3 w-3 transition-opacity",o==="asc"?"opacity-100":"opacity-30"),fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:c.jsx("path",{d:"M7 15l5-5 5 5"})}),c.jsx("svg",{className:T("-mt-1 h-3 w-3 transition-opacity",o==="desc"?"opacity-100":"opacity-30"),fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:c.jsx("path",{d:"M7 9l5 5 5-5"})})]})]})})});gu.displayName="TableHead";const hu=a.forwardRef(({className:e,...t},n)=>{const{size:o}=a.useContext(tr);return c.jsx("td",{ref:n,className:T(Qy({size:o}),e),...t})});hu.displayName="TableCell";const vu=a.forwardRef(({className:e,...t},n)=>c.jsx("caption",{ref:n,className:T("text-small text-tertiary mt-4",e),...t}));vu.displayName="TableCaption";function ew({data:e,initialSortKey:t=null,initialSortDirection:n="asc"}){const[o,r]=a.useState(t),[s,i]=a.useState(n),l=a.useCallback(u=>{r(f=>f===u?(i(p=>p==="asc"?"desc":p==="desc"?(r(null),null):"asc"),f):(i("asc"),u))},[]);return{sortedData:a.useMemo(()=>!o||!s?e:[...e].sort((u,f)=>{const p=u[o],g=f[o];if(p===g)return 0;let v=0;return typeof p=="string"&&typeof g=="string"?v=p.localeCompare(g):typeof p=="number"&&typeof g=="number"?v=p-g:v=String(p).localeCompare(String(g)),s==="asc"?v:-v}),[e,o,s]),sortKey:o,sortDirection:s,handleSort:l}}function tw({data:e,filterKeys:t}){const[n,o]=a.useState("");return{filteredData:a.useMemo(()=>{if(!n.trim())return e;const s=n.toLowerCase();return e.filter(i=>t&&t.length>0?t.some(l=>String(i[l]).toLowerCase().includes(s)):Object.values(i).some(l=>String(l).toLowerCase().includes(s)))},[e,n,t]),filterValue:n,setFilterValue:o}}const xu=a.createContext(null);function bu(){const e=a.useContext(xu);if(!e)throw new Error("Tab components must be used within a Tabs component");return e}const yu=a.forwardRef(({className:e,defaultValue:t="",value:n,onValueChange:o,children:r,...s},i)=>{const[l,d]=a.useState(t),u=n!==void 0?n:l,f=a.useCallback(p=>{n===void 0&&d(p),o?.(p)},[n,o]);return c.jsx(xu.Provider,{value:{activeTab:u,setActiveTab:f},children:c.jsx("div",{ref:i,className:T("w-full",e),...s,children:r})})});yu.displayName="Tabs";const wu=U("text-body inline-flex items-center font-sans transition-colors",{variants:{variant:{default:"border-border gap-1 border-b",pills:"rounded-pill bg-alt gap-2 p-1"}},defaultVariants:{variant:"default"}}),Cu=a.forwardRef(({className:e,variant:t,...n},o)=>c.jsx("div",{ref:o,role:"tablist",className:T(wu({variant:t,className:e})),...n}));Cu.displayName="TabList";const Su=U("focus-visible:ring-sunflower inline-flex items-center justify-center font-sans font-normal whitespace-nowrap transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"text-secondary hover:text-primary data-[state=active]:border-sunflower data-[state=active]:text-primary border-b-2 border-transparent px-4 py-2",pills:"rounded-pill text-secondary hover:text-primary data-[state=active]:bg-card data-[state=active]:text-primary px-4 py-1.5 data-[state=active]:shadow-sm"},size:{sm:"text-small",default:"text-body",lg:"text-body font-medium"}},defaultVariants:{variant:"default",size:"default"}}),Ru=a.forwardRef(({className:e,variant:t,size:n,value:o,...r},s)=>{const{activeTab:i,setActiveTab:l}=bu(),d=i===o;return c.jsx("button",{ref:s,role:"tab",type:"button","aria-selected":d,"data-state":d?"active":"inactive",onClick:()=>l(o),className:T(Su({variant:t,size:n,className:e})),...r})});Ru.displayName="TabTrigger";const Eu=U("font-sans",{variants:{size:{sm:"text-small mt-3",default:"text-body mt-4",lg:"text-body mt-6"}},defaultVariants:{size:"default"}}),Tu=a.forwardRef(({className:e,size:t,value:n,...o},r)=>{const{activeTab:s}=bu(),i=s===n;return i?c.jsx("div",{ref:r,role:"tabpanel","data-state":i?"active":"inactive",className:T(Eu({size:t,className:e})),...o}):null});Tu.displayName="TabContent";const Pu=U("font-sans",{variants:{variant:{lead:"text-lead text-primary","semi-lead":"text-semi-lead text-secondary","body-lg":"text-body-lg text-secondary",body:"text-body text-secondary",descriptive:"text-descriptive text-secondary",label:"text-label text-tertiary","label-sm":"text-label-sm text-tertiary"},weight:{regular:"font-normal",medium:"font-medium"}},defaultVariants:{variant:"body",weight:"regular"}}),Nu=a.forwardRef(({className:e,variant:t="body",weight:n="regular",as:o="p",asChild:r=!1,...s},i)=>{const l=r?Se:o;return c.jsx(l,{className:T(Pu({variant:t,weight:n,className:e})),ref:i,...s})});Nu.displayName="Text";const Mu=U("bg-card text-body text-primary placeholder:text-tertiary flex min-h-[80px] w-full rounded-md border px-3 py-2 font-sans transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",{variants:{variant:{default:"border-border focus-visible:ring-sunflower",error:"border-error focus-visible:ring-error"},resize:{none:"resize-none",vertical:"resize-y",horizontal:"resize-x",both:"resize"}},defaultVariants:{variant:"default",resize:"vertical"}}),Au=a.forwardRef(({className:e,variant:t,resize:n,...o},r)=>c.jsx("textarea",{className:T(Mu({variant:t,resize:n}),e),ref:r,...o}));Au.displayName="Textarea";var nr="ToastProvider",[or,nw,ow]=xn("Toast"),[Du]=le("Toast",[ow]),[rw,$n]=Du(nr),_u=e=>{const{__scopeToast:t,label:n="Notification",duration:o=5e3,swipeDirection:r="right",swipeThreshold:s=50,children:i}=e,[l,d]=a.useState(null),[u,f]=a.useState(0),p=a.useRef(!1),g=a.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${nr}\`. Expected non-empty \`string\`.`),c.jsx(or.Provider,{scope:t,children:c.jsx(rw,{scope:t,label:n,duration:o,swipeDirection:r,swipeThreshold:s,toastCount:u,viewport:l,onViewportChange:d,onToastAdd:a.useCallback(()=>f(v=>v+1),[]),onToastRemove:a.useCallback(()=>f(v=>v-1),[]),isFocusedToastEscapeKeyDownRef:p,isClosePausedRef:g,children:i})})};_u.displayName=nr;var Iu="ToastViewport",sw=["F8"],vo="toast.viewportPause",xo="toast.viewportResume",ku=a.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:o=sw,label:r="Notifications ({hotkey})",...s}=e,i=$n(Iu,n),l=nw(n),d=a.useRef(null),u=a.useRef(null),f=a.useRef(null),p=a.useRef(null),g=G(t,p,i.onViewportChange),v=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),x=i.toastCount>0;a.useEffect(()=>{const h=y=>{o.length!==0&&o.every(w=>y[w]||y.code===w)&&p.current?.focus()};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[o]),a.useEffect(()=>{const h=d.current,y=p.current;if(x&&h&&y){const b=()=>{if(!i.isClosePausedRef.current){const N=new CustomEvent(vo);y.dispatchEvent(N),i.isClosePausedRef.current=!0}},w=()=>{if(i.isClosePausedRef.current){const N=new CustomEvent(xo);y.dispatchEvent(N),i.isClosePausedRef.current=!1}},S=N=>{!h.contains(N.relatedTarget)&&w()},E=()=>{h.contains(document.activeElement)||w()};return h.addEventListener("focusin",b),h.addEventListener("focusout",S),h.addEventListener("pointermove",b),h.addEventListener("pointerleave",E),window.addEventListener("blur",b),window.addEventListener("focus",w),()=>{h.removeEventListener("focusin",b),h.removeEventListener("focusout",S),h.removeEventListener("pointermove",b),h.removeEventListener("pointerleave",E),window.removeEventListener("blur",b),window.removeEventListener("focus",w)}}},[x,i.isClosePausedRef]);const m=a.useCallback(({tabbingDirection:h})=>{const b=l().map(w=>{const S=w.ref.current,E=[S,...xw(S)];return h==="forwards"?E:E.reverse()});return(h==="forwards"?b.reverse():b).flat()},[l]);return a.useEffect(()=>{const h=p.current;if(h){const y=b=>{const w=b.altKey||b.ctrlKey||b.metaKey;if(b.key==="Tab"&&!w){const E=document.activeElement,N=b.shiftKey;if(b.target===h&&N){u.current?.focus();return}const $=m({tabbingDirection:N?"backwards":"forwards"}),F=$.findIndex(B=>B===E);to($.slice(F+1))?b.preventDefault():N?u.current?.focus():f.current?.focus()}};return h.addEventListener("keydown",y),()=>h.removeEventListener("keydown",y)}},[l,m]),c.jsxs(_f,{ref:d,role:"region","aria-label":r.replace("{hotkey}",v),tabIndex:-1,style:{pointerEvents:x?void 0:"none"},children:[x&&c.jsx(bo,{ref:u,onFocusFromOutsideViewport:()=>{const h=m({tabbingDirection:"forwards"});to(h)}}),c.jsx(or.Slot,{scope:n,children:c.jsx(L.ol,{tabIndex:-1,...s,ref:g})}),x&&c.jsx(bo,{ref:f,onFocusFromOutsideViewport:()=>{const h=m({tabbingDirection:"backwards"});to(h)}})]})});ku.displayName=Iu;var ju="ToastFocusProxy",bo=a.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:o,...r}=e,s=$n(ju,n);return c.jsx(_n,{tabIndex:0,...r,ref:t,style:{position:"fixed"},onFocus:i=>{const l=i.relatedTarget;!s.viewport?.contains(l)&&o()}})});bo.displayName=ju;var jt="Toast",aw="toast.swipeStart",iw="toast.swipeMove",lw="toast.swipeCancel",cw="toast.swipeEnd",Ou=a.forwardRef((e,t)=>{const{forceMount:n,open:o,defaultOpen:r,onOpenChange:s,...i}=e,[l,d]=he({prop:o,defaultProp:r??!0,onChange:s,caller:jt});return c.jsx(fe,{present:n||l,children:c.jsx(fw,{open:l,...i,ref:t,onClose:()=>d(!1),onPause:ie(e.onPause),onResume:ie(e.onResume),onSwipeStart:A(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:A(e.onSwipeMove,u=>{const{x:f,y:p}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${p}px`)}),onSwipeCancel:A(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:A(e.onSwipeEnd,u=>{const{x:f,y:p}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${p}px`),d(!1)})})})});Ou.displayName=jt;var[dw,uw]=Du(jt,{onClose(){}}),fw=a.forwardRef((e,t)=>{const{__scopeToast:n,type:o="foreground",duration:r,open:s,onClose:i,onEscapeKeyDown:l,onPause:d,onResume:u,onSwipeStart:f,onSwipeMove:p,onSwipeCancel:g,onSwipeEnd:v,...x}=e,m=$n(jt,n),[h,y]=a.useState(null),b=G(t,D=>y(D)),w=a.useRef(null),S=a.useRef(null),E=r||m.duration,N=a.useRef(0),R=a.useRef(E),P=a.useRef(0),{onToastAdd:$,onToastRemove:F}=m,B=ie(()=>{h?.contains(document.activeElement)&&m.viewport?.focus(),i()}),k=a.useCallback(D=>{!D||D===1/0||(window.clearTimeout(P.current),N.current=new Date().getTime(),P.current=window.setTimeout(B,D))},[B]);a.useEffect(()=>{const D=m.viewport;if(D){const V=()=>{k(R.current),u?.()},I=()=>{const W=new Date().getTime()-N.current;R.current=R.current-W,window.clearTimeout(P.current),d?.()};return D.addEventListener(vo,I),D.addEventListener(xo,V),()=>{D.removeEventListener(vo,I),D.removeEventListener(xo,V)}}},[m.viewport,E,d,u,k]),a.useEffect(()=>{s&&!m.isClosePausedRef.current&&k(E)},[s,E,m.isClosePausedRef,k]),a.useEffect(()=>($(),()=>F()),[$,F]);const z=a.useMemo(()=>h?zu(h):null,[h]);return m.viewport?c.jsxs(c.Fragment,{children:[z&&c.jsx(pw,{__scopeToast:n,role:"status","aria-live":o==="foreground"?"assertive":"polite",children:z}),c.jsx(dw,{scope:n,onClose:B,children:Rt.createPortal(c.jsx(or.ItemSlot,{scope:n,children:c.jsx(Df,{asChild:!0,onEscapeKeyDown:A(l,()=>{m.isFocusedToastEscapeKeyDownRef.current||B(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:c.jsx(L.li,{tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":m.swipeDirection,...x,ref:b,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:A(e.onKeyDown,D=>{D.key==="Escape"&&(l?.(D.nativeEvent),D.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,B()))}),onPointerDown:A(e.onPointerDown,D=>{D.button===0&&(w.current={x:D.clientX,y:D.clientY})}),onPointerMove:A(e.onPointerMove,D=>{if(!w.current)return;const V=D.clientX-w.current.x,I=D.clientY-w.current.y,W=!!S.current,C=["left","right"].includes(m.swipeDirection),M=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,K=C?M(0,V):0,q=C?0:M(0,I),ee=D.pointerType==="touch"?10:2,Y={x:K,y:q},X={originalEvent:D,delta:Y};W?(S.current=Y,Yt(iw,p,X,{discrete:!1})):Zr(Y,m.swipeDirection,ee)?(S.current=Y,Yt(aw,f,X,{discrete:!1}),D.target.setPointerCapture(D.pointerId)):(Math.abs(V)>ee||Math.abs(I)>ee)&&(w.current=null)}),onPointerUp:A(e.onPointerUp,D=>{const V=S.current,I=D.target;if(I.hasPointerCapture(D.pointerId)&&I.releasePointerCapture(D.pointerId),S.current=null,w.current=null,V){const W=D.currentTarget,C={originalEvent:D,delta:V};Zr(V,m.swipeDirection,m.swipeThreshold)?Yt(cw,v,C,{discrete:!0}):Yt(lw,g,C,{discrete:!0}),W.addEventListener("click",M=>M.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),pw=e=>{const{__scopeToast:t,children:n,...o}=e,r=$n(jt,t),[s,i]=a.useState(!1),[l,d]=a.useState(!1);return hw(()=>i(!0)),a.useEffect(()=>{const u=window.setTimeout(()=>d(!0),1e3);return()=>window.clearTimeout(u)},[]),l?null:c.jsx(Je,{asChild:!0,children:c.jsx(_n,{...o,children:s&&c.jsxs(c.Fragment,{children:[r.label," ",n]})})})},mw="ToastTitle",$u=a.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e;return c.jsx(L.div,{...o,ref:t})});$u.displayName=mw;var gw="ToastDescription",Lu=a.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e;return c.jsx(L.div,{...o,ref:t})});Lu.displayName=gw;var Fu="ToastAction",Vu=a.forwardRef((e,t)=>{const{altText:n,...o}=e;return n.trim()?c.jsx(Wu,{altText:n,asChild:!0,children:c.jsx(rr,{...o,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Fu}\`. Expected non-empty \`string\`.`),null)});Vu.displayName=Fu;var Bu="ToastClose",rr=a.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e,r=uw(Bu,n);return c.jsx(Wu,{asChild:!0,children:c.jsx(L.button,{type:"button",...o,ref:t,onClick:A(e.onClick,r.onClose)})})});rr.displayName=Bu;var Wu=a.forwardRef((e,t)=>{const{__scopeToast:n,altText:o,...r}=e;return c.jsx(L.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0,...r,ref:t})});function zu(e){const t=[];return Array.from(e.childNodes).forEach(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent&&t.push(o.textContent),vw(o)){const r=o.ariaHidden||o.hidden||o.style.display==="none",s=o.dataset.radixToastAnnounceExclude==="";if(!r)if(s){const i=o.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...zu(o))}}),t}function Yt(e,t,n,{discrete:o}){const r=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?Co(r,s):r.dispatchEvent(s)}var Zr=(e,t,n=0)=>{const o=Math.abs(e.x),r=Math.abs(e.y),s=o>r;return t==="left"||t==="right"?s&&o>n:!s&&r>n};function hw(e=()=>{}){const t=ie(e);se(()=>{let n=0,o=0;return n=window.requestAnimationFrame(()=>o=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(o)}},[t])}function vw(e){return e.nodeType===e.ELEMENT_NODE}function xw(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function to(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var bw=_u,yw=ku,ww=Ou,Cw=$u,Sw=Lu,Rw=Vu,Ew=rr;const Tw=bw,Gu=a.forwardRef(({className:e,...t},n)=>c.jsx(yw,{ref:n,className:T("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:top-auto sm:right-0 sm:bottom-0 sm:flex-col md:max-w-[420px]",e),...t}));Gu.displayName="ToastViewport";const Hu=U(["group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-lg border p-4 shadow-lg transition-all","data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none","data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out","data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full"],{variants:{variant:{default:"border-border bg-main text-primary",success:"border-sunflower/30 bg-eggshell text-primary [&>svg]:text-sunflower",error:"border-error/30 bg-main text-primary [&>svg]:text-error",warning:"border-sunflower/50 bg-vanilla text-primary [&>svg]:text-sunflower",info:"border-electric-blue/30 bg-main text-primary [&>svg]:text-electric-blue"}},defaultVariants:{variant:"default"}}),Uu=a.forwardRef(({className:e,variant:t,...n},o)=>c.jsx(ww,{ref:o,className:T(Hu({variant:t}),e),...n}));Uu.displayName="Toast";const Ku=a.forwardRef(({className:e,...t},n)=>c.jsx(Rw,{ref:n,className:T("rounded-pill border-border inline-flex h-8 shrink-0 items-center justify-center border bg-transparent px-3 text-sm font-medium","ring-offset-main transition-colors","hover:bg-alt","focus:ring-sunflower focus:ring-2 focus:ring-offset-2 focus:outline-none","disabled:pointer-events-none disabled:opacity-50","group-[.error]:border-error/30 group-[.error]:hover:border-error/50 group-[.error]:hover:bg-error/10 group-[.error]:focus:ring-error",e),...t}));Ku.displayName="ToastAction";const Yu=a.forwardRef(({className:e,...t},n)=>c.jsxs(Ew,{ref:n,className:T("text-secondary absolute top-2 right-2 rounded-sm p-1 opacity-0 transition-opacity","hover:text-primary","focus:ring-sunflower focus:opacity-100 focus:ring-2 focus:outline-none","group-hover:opacity-100","group-[.error]:text-error/70 group-[.error]:hover:text-error group-[.error]:focus:ring-error group-[.error]:focus:ring-offset-error",e),"toast-close":"",...t,children:[c.jsx(Ul,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]}));Yu.displayName="ToastClose";const Xu=a.forwardRef(({className:e,...t},n)=>c.jsx(Cw,{ref:n,className:T("text-sm",e),...t}));Xu.displayName="ToastTitle";const qu=a.forwardRef(({className:e,...t},n)=>c.jsx(Sw,{ref:n,className:T("text-secondary text-sm",e),...t}));qu.displayName="ToastDescription";var Pw=Symbol("radix.slottable");function Nw(e){const t=({children:n})=>c.jsx(c.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Pw,t}var[Ln]=le("Tooltip",[Fe]),Fn=Fe(),Zu="TooltipProvider",Mw=700,yo="tooltip.open",[Aw,sr]=Ln(Zu),Ju=e=>{const{__scopeTooltip:t,delayDuration:n=Mw,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:s}=e,i=a.useRef(!0),l=a.useRef(!1),d=a.useRef(0);return a.useEffect(()=>{const u=d.current;return()=>window.clearTimeout(u)},[]),c.jsx(Aw,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:a.useCallback(()=>{window.clearTimeout(d.current),i.current=!1},[]),onClose:a.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>i.current=!0,o)},[o]),isPointerInTransitRef:l,onPointerInTransitChange:a.useCallback(u=>{l.current=u},[]),disableHoverableContent:r,children:s})};Ju.displayName=Zu;var St="Tooltip",[Dw,Ot]=Ln(St),Qu=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:r,onOpenChange:s,disableHoverableContent:i,delayDuration:l}=e,d=sr(St,e.__scopeTooltip),u=Fn(t),[f,p]=a.useState(null),g=me(),v=a.useRef(0),x=i??d.disableHoverableContent,m=l??d.delayDuration,h=a.useRef(!1),[y,b]=he({prop:o,defaultProp:r??!1,onChange:R=>{R?(d.onOpen(),document.dispatchEvent(new CustomEvent(yo))):d.onClose(),s?.(R)},caller:St}),w=a.useMemo(()=>y?h.current?"delayed-open":"instant-open":"closed",[y]),S=a.useCallback(()=>{window.clearTimeout(v.current),v.current=0,h.current=!1,b(!0)},[b]),E=a.useCallback(()=>{window.clearTimeout(v.current),v.current=0,b(!1)},[b]),N=a.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{h.current=!0,b(!0),v.current=0},m)},[m,b]);return a.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),c.jsx(Nt,{...u,children:c.jsx(Dw,{scope:t,contentId:g,open:y,stateAttribute:w,trigger:f,onTriggerChange:p,onTriggerEnter:a.useCallback(()=>{d.isOpenDelayedRef.current?N():S()},[d.isOpenDelayedRef,N,S]),onTriggerLeave:a.useCallback(()=>{x?E():(window.clearTimeout(v.current),v.current=0)},[E,x]),onOpen:S,onClose:E,disableHoverableContent:x,children:n})})};Qu.displayName=St;var wo="TooltipTrigger",ef=a.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=Ot(wo,n),s=sr(wo,n),i=Fn(n),l=a.useRef(null),d=G(t,l,r.onTriggerChange),u=a.useRef(!1),f=a.useRef(!1),p=a.useCallback(()=>u.current=!1,[]);return a.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),c.jsx(Mt,{asChild:!0,...i,children:c.jsx(L.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...o,ref:d,onPointerMove:A(e.onPointerMove,g=>{g.pointerType!=="touch"&&!f.current&&!s.isPointerInTransitRef.current&&(r.onTriggerEnter(),f.current=!0)}),onPointerLeave:A(e.onPointerLeave,()=>{r.onTriggerLeave(),f.current=!1}),onPointerDown:A(e.onPointerDown,()=>{r.open&&r.onClose(),u.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:A(e.onFocus,()=>{u.current||r.onOpen()}),onBlur:A(e.onBlur,r.onClose),onClick:A(e.onClick,r.onClose)})})});ef.displayName=wo;var ar="TooltipPortal",[_w,Iw]=Ln(ar,{forceMount:void 0}),tf=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:r}=e,s=Ot(ar,t);return c.jsx(_w,{scope:t,forceMount:n,children:c.jsx(fe,{present:n||s.open,children:c.jsx(Je,{asChild:!0,container:r,children:o})})})};tf.displayName=ar;var ct="TooltipContent",nf=a.forwardRef((e,t)=>{const n=Iw(ct,e.__scopeTooltip),{forceMount:o=n.forceMount,side:r="top",...s}=e,i=Ot(ct,e.__scopeTooltip);return c.jsx(fe,{present:o||i.open,children:i.disableHoverableContent?c.jsx(of,{side:r,...s,ref:t}):c.jsx(kw,{side:r,...s,ref:t})})}),kw=a.forwardRef((e,t)=>{const n=Ot(ct,e.__scopeTooltip),o=sr(ct,e.__scopeTooltip),r=a.useRef(null),s=G(t,r),[i,l]=a.useState(null),{trigger:d,onClose:u}=n,f=r.current,{onPointerInTransitChange:p}=o,g=a.useCallback(()=>{l(null),p(!1)},[p]),v=a.useCallback((x,m)=>{const h=x.currentTarget,y={x:x.clientX,y:x.clientY},b=Lw(y,h.getBoundingClientRect()),w=Fw(y,b),S=Vw(m.getBoundingClientRect()),E=Ww([...w,...S]);l(E),p(!0)},[p]);return a.useEffect(()=>()=>g(),[g]),a.useEffect(()=>{if(d&&f){const x=h=>v(h,f),m=h=>v(h,d);return d.addEventListener("pointerleave",x),f.addEventListener("pointerleave",m),()=>{d.removeEventListener("pointerleave",x),f.removeEventListener("pointerleave",m)}}},[d,f,v,g]),a.useEffect(()=>{if(i){const x=m=>{const h=m.target,y={x:m.clientX,y:m.clientY},b=d?.contains(h)||f?.contains(h),w=!Bw(y,i);b?g():w&&(g(),u())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[d,f,i,u,g]),c.jsx(of,{...e,ref:s})}),[jw,Ow]=Ln(St,{isInside:!1}),$w=Nw("TooltipContent"),of=a.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":r,onEscapeKeyDown:s,onPointerDownOutside:i,...l}=e,d=Ot(ct,n),u=Fn(n),{onClose:f}=d;return a.useEffect(()=>(document.addEventListener(yo,f),()=>document.removeEventListener(yo,f)),[f]),a.useEffect(()=>{if(d.trigger){const p=g=>{g.target?.contains(d.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[d.trigger,f]),c.jsx(Ze,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:c.jsxs(Rn,{"data-state":d.stateAttribute,...u,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx($w,{children:o}),c.jsx(jw,{scope:n,isInside:!0,children:c.jsx(ry,{id:d.contentId,role:"tooltip",children:r||o})})]})})});nf.displayName=ct;var rf="TooltipArrow",sf=a.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=Fn(n);return Ow(rf,n).isInside?null:c.jsx(En,{...r,...o,ref:t})});sf.displayName=rf;function Lw(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,o,r,s)){case s:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function Fw(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function Vw(e){const{top:t,right:n,bottom:o,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:o},{x:r,y:o}]}function Bw(e,t){const{x:n,y:o}=e;let r=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const l=t[s],d=t[i],u=l.x,f=l.y,p=d.x,g=d.y;f>o!=g>o&&n<(p-u)*(o-f)/(g-f)+u&&(r=!r)}return r}function Ww(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),zw(t)}function zw(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const r=e[o];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(r.y-i.y)>=(s.y-i.y)*(r.x-i.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const r=e[o];for(;n.length>=2;){const s=n[n.length-1],i=n[n.length-2];if((s.x-i.x)*(r.y-i.y)>=(s.y-i.y)*(r.x-i.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Gw=Ju,Hw=Qu,Uw=ef,Kw=tf,Yw=nf,Xw=sf;const qw=Gw,Zw=Hw,Jw=Uw,af=Kw,ir=a.forwardRef(({className:e,...t},n)=>c.jsx(Xw,{ref:n,className:T("fill-primary",e),...t}));ir.displayName="TooltipArrow";const lf=U(["z-50 overflow-hidden rounded-md px-3 py-1.5 font-sans shadow-md","animate-in fade-in-0 zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","data-[side=bottom]:slide-in-from-top-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"],{variants:{variant:{default:"bg-primary text-small text-white",light:"bg-card text-primary text-small border-border border"}},defaultVariants:{variant:"default"}}),cf=a.forwardRef(({className:e,variant:t,sideOffset:n=4,showArrow:o=!1,children:r,...s},i)=>c.jsx(af,{children:c.jsxs(Yw,{ref:i,sideOffset:n,className:T(lf({variant:t,className:e})),...s,children:[r,o&&c.jsx(ir,{className:t==="light"?"fill-card":"fill-primary"})]})}));cf.displayName="TooltipContent";exports.ActionsMenuButton=_c;exports.AlertDialog=ag;exports.AlertDialogAction=ya;exports.AlertDialogCancel=wa;exports.AlertDialogContent=ga;exports.AlertDialogDescription=ba;exports.AlertDialogFooter=va;exports.AlertDialogHeader=ha;exports.AlertDialogOverlay=Po;exports.AlertDialogPortal=pa;exports.AlertDialogTitle=xa;exports.AlertDialogTrigger=ig;exports.Badge=Sa;exports.BreadcrumbItem=Ta;exports.BreadcrumbSeparator=No;exports.Breadcrumbs=Ea;exports.Button=fa;exports.Card=Na;exports.Checkbox=$a;exports.ContextMenu=tx;exports.ContextMenuCheckboxItem=Sl;exports.ContextMenuContent=wl;exports.ContextMenuGroup=ox;exports.ContextMenuItem=Cl;exports.ContextMenuLabel=El;exports.ContextMenuPortal=xl;exports.ContextMenuRadioGroup=sx;exports.ContextMenuRadioItem=Rl;exports.ContextMenuSeparator=Tl;exports.ContextMenuShortcut=Pl;exports.ContextMenuSub=rx;exports.ContextMenuSubContent=yl;exports.ContextMenuSubTrigger=bl;exports.ContextMenuTrigger=nx;exports.DatePicker=ql;exports.DateTimePicker=ec;exports.Divider=nc;exports.DropdownMenu=vb;exports.DropdownMenuCheckboxItem=Pc;exports.DropdownMenuContent=Ec;exports.DropdownMenuGroup=bb;exports.DropdownMenuItem=Tc;exports.DropdownMenuLabel=Mc;exports.DropdownMenuPortal=Cc;exports.DropdownMenuRadioGroup=wb;exports.DropdownMenuRadioItem=Nc;exports.DropdownMenuSeparator=Ac;exports.DropdownMenuShortcut=Dc;exports.DropdownMenuSub=yb;exports.DropdownMenuSubContent=Rc;exports.DropdownMenuSubTrigger=Sc;exports.DropdownMenuTrigger=xb;exports.Eyebrow=kc;exports.FormField=$c;exports.FormMessage=Xo;exports.Grid=Lc;exports.GridItem=Fc;exports.Heading=Bc;exports.Input=zc;exports.Label=Yo;exports.Link=Hc;exports.Modal=Ob;exports.ModalClose=Lb;exports.ModalContent=Yc;exports.ModalDescription=Jc;exports.ModalFooter=qc;exports.ModalHeader=Xc;exports.ModalOverlay=qo;exports.ModalPortal=Uc;exports.ModalTitle=Zc;exports.ModalTrigger=$b;exports.ProgressIndicator=td;exports.RadioGroup=md;exports.RadioGroupItem=gd;exports.Select=Vy;exports.SelectContent=Kd;exports.SelectGroup=By;exports.SelectItem=Xd;exports.SelectLabel=Yd;exports.SelectScrollDownButton=er;exports.SelectScrollUpButton=Qo;exports.SelectSeparator=qd;exports.SelectTrigger=Ud;exports.SelectValue=Wy;exports.Skeleton=Jd;exports.Spinner=eu;exports.Stack=nu;exports.Switch=lu;exports.TabContent=Tu;exports.TabList=Cu;exports.TabTrigger=Ru;exports.Table=du;exports.TableBody=fu;exports.TableCaption=vu;exports.TableCell=hu;exports.TableFooter=pu;exports.TableHead=gu;exports.TableHeader=uu;exports.TableRow=mu;exports.Tabs=yu;exports.Text=Nu;exports.Textarea=Au;exports.Toast=Uu;exports.ToastAction=Ku;exports.ToastClose=Yu;exports.ToastDescription=qu;exports.ToastProvider=Tw;exports.ToastTitle=Xu;exports.ToastViewport=Gu;exports.Tooltip=Zw;exports.TooltipArrow=ir;exports.TooltipContent=cf;exports.TooltipPortal=af;exports.TooltipProvider=qw;exports.TooltipTrigger=Jw;exports.alertDialogContentVariants=ma;exports.badgeVariants=Ca;exports.breadcrumbItemVariants=so;exports.breadcrumbsVariants=Ra;exports.buttonVariants=mn;exports.calendarDayVariants=Xl;exports.cardVariants=Pa;exports.cn=T;exports.datePickerTriggerVariants=Yl;exports.dateTimePickerCalendarDayVariants=Ql;exports.dateTimePickerTriggerVariants=Jl;exports.dividerVariants=tc;exports.eyebrowVariants=Ic;exports.gridItemVariants=Db;exports.gridVariants=Tb;exports.headingVariants=Vc;exports.inputVariants=Wc;exports.labelVariants=Oc;exports.linkVariants=Gc;exports.modalContentVariants=Kc;exports.progressBarVariants=ed;exports.progressIndicatorVariants=Qc;exports.skeletonVariants=Zd;exports.spinnerVariants=Qd;exports.stackVariants=tu;exports.tabContentVariants=Eu;exports.tabListVariants=wu;exports.tabTriggerVariants=Su;exports.tableVariants=cu;exports.textVariants=Pu;exports.textareaVariants=Mu;exports.toastVariants=Hu;exports.tooltipContentVariants=lf;exports.useFilterableTable=tw;exports.useSortableTable=ew;
51
+ For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return d.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},FN=c0,zN=u0,BN=f0,VN=d0,WN=p0,KN=y0,UN=x0,HN=m0,GN=g0;function w0(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=w0(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function fe(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=w0(e))&&(n&&(n+=" "),n+=t);return n}const zm=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Bm=fe,ie=(e,t)=>r=>{var n;if(t?.variants==null)return Bm(e,r?.class,r?.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(c=>{const u=r?.[c],f=i?.[c];if(u===null)return null;const p=zm(u)||zm(f);return o[c][p]}),s=r&&Object.entries(r).reduce((c,u)=>{let[f,p]=u;return p===void 0||(c[f]=p),c},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,u)=>{let{class:f,className:p,...v}=u;return Object.entries(v).every(g=>{let[m,h]=g;return Array.isArray(h)?h.includes({...i,...s}[m]):{...i,...s}[m]===h})?[...c,f,p]:c},[]);return Bm(e,a,l,r?.class,r?.className)},qN=(e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},YN=(e,t)=>({classGroupId:e,validator:t}),P0=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Ua="-",Vm=[],XN="arbitrary..",ZN=e=>{const t=QN(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return JN(a);const s=a.split(Ua),l=s[0]===""&&s.length>1?1:0;return S0(s,l,t)},getConflictingClassGroupIds:(a,s)=>{if(s){const l=n[a],c=r[a];return l?c?qN(c,l):l:c||Vm}return r[a]||Vm}}},S0=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const o=e[t],i=r.nextPart.get(o);if(i){const c=S0(e,t+1,i);if(c)return c}const a=r.validators;if(a===null)return;const s=t===0?e.join(Ua):e.slice(t).join(Ua),l=a.length;for(let c=0;c<l;c++){const u=a[c];if(u.validator(s))return u.classGroupId}},JN=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?XN+n:void 0})(),QN=e=>{const{theme:t,classGroups:r}=e;return eI(r,t)},eI=(e,t)=>{const r=P0();for(const n in e){const o=e[n];Ld(o,r,n,t)}return r},Ld=(e,t,r,n)=>{const o=e.length;for(let i=0;i<o;i++){const a=e[i];tI(a,t,r,n)}},tI=(e,t,r,n)=>{if(typeof e=="string"){rI(e,t,r);return}if(typeof e=="function"){nI(e,t,r,n);return}oI(e,t,r,n)},rI=(e,t,r)=>{const n=e===""?t:O0(t,e);n.classGroupId=r},nI=(e,t,r,n)=>{if(iI(e)){Ld(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(YN(r,e))},oI=(e,t,r,n)=>{const o=Object.entries(e),i=o.length;for(let a=0;a<i;a++){const[s,l]=o[a];Ld(l,O0(t,s),r,n)}},O0=(e,t)=>{let r=e;const n=t.split(Ua),o=n.length;for(let i=0;i<o;i++){const a=n[i];let s=r.nextPart.get(a);s||(s=P0(),r.nextPart.set(a,s)),r=s}return r},iI=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,aI=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const o=(i,a)=>{r[i]=a,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(i){let a=r[i];if(a!==void 0)return a;if((a=n[i])!==void 0)return o(i,a),a},set(i,a){i in r?r[i]=a:o(i,a)}}},mf="!",Wm=":",sI=[],Km=(e,t,r,n,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:o}),lI=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const i=[];let a=0,s=0,l=0,c;const u=o.length;for(let m=0;m<u;m++){const h=o[m];if(a===0&&s===0){if(h===Wm){i.push(o.slice(l,m)),l=m+1;continue}if(h==="/"){c=m;continue}}h==="["?a++:h==="]"?a--:h==="("?s++:h===")"&&s--}const f=i.length===0?o:o.slice(l);let p=f,v=!1;f.endsWith(mf)?(p=f.slice(0,-1),v=!0):f.startsWith(mf)&&(p=f.slice(1),v=!0);const g=c&&c>l?c-l:void 0;return Km(i,v,p,g)};if(t){const o=t+Wm,i=n;n=a=>a.startsWith(o)?i(a.slice(o.length)):Km(sI,!1,a,void 0,!0)}if(r){const o=n;n=i=>r({className:i,parseClassName:o})}return n},cI=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let o=[];for(let i=0;i<r.length;i++){const a=r[i],s=a[0]==="[",l=t.has(a);s||l?(o.length>0&&(o.sort(),n.push(...o),o=[]),n.push(a)):o.push(a)}return o.length>0&&(o.sort(),n.push(...o)),n}},uI=e=>({cache:aI(e.cacheSize),parseClassName:lI(e),sortModifiers:cI(e),...ZN(e)}),fI=/\s+/,dI=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(fI);let l="";for(let c=s.length-1;c>=0;c-=1){const u=s[c],{isExternal:f,modifiers:p,hasImportantModifier:v,baseClassName:g,maybePostfixModifierPosition:m}=r(u);if(f){l=u+(l.length>0?" "+l:l);continue}let h=!!m,y=n(h?g.substring(0,m):g);if(!y){if(!h){l=u+(l.length>0?" "+l:l);continue}if(y=n(g),!y){l=u+(l.length>0?" "+l:l);continue}h=!1}const x=p.length===0?"":p.length===1?p[0]:i(p).join(":"),w=v?x+mf:x,P=w+y;if(a.indexOf(P)>-1)continue;a.push(P);const O=o(y,h);for(let S=0;S<O.length;++S){const E=O[S];a.push(w+E)}l=u+(l.length>0?" "+l:l)}return l},pI=(...e)=>{let t=0,r,n,o="";for(;t<e.length;)(r=e[t++])&&(n=E0(r))&&(o&&(o+=" "),o+=n);return o},E0=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=E0(e[n]))&&(r&&(r+=" "),r+=t);return r},Um=(e,...t)=>{let r,n,o,i;const a=l=>{const c=t.reduce((u,f)=>f(u),e());return r=uI(c),n=r.cache.get,o=r.cache.set,i=s,s(l)},s=l=>{const c=n(l);if(c)return c;const u=dI(l,r);return o(l,u),u};return i=a,(...l)=>i(pI(...l))},vI=[],Le=e=>{const t=r=>r[e]||vI;return t.isThemeGetter=!0,t},C0=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,A0=/^\((?:(\w[\w-]*):)?(.+)\)$/i,mI=/^\d+\/\d+$/,hI=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,gI=/\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$/,yI=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,bI=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,xI=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Gn=e=>mI.test(e),ae=e=>!!e&&!Number.isNaN(Number(e)),Dr=e=>!!e&&Number.isInteger(Number(e)),Cc=e=>e.endsWith("%")&&ae(e.slice(0,-1)),ur=e=>hI.test(e),wI=()=>!0,PI=e=>gI.test(e)&&!yI.test(e),_0=()=>!1,SI=e=>bI.test(e),OI=e=>xI.test(e),EI=e=>!X(e)&&!Z(e),CI=e=>ho(e,j0,_0),X=e=>C0.test(e),sn=e=>ho(e,k0,PI),Ac=e=>ho(e,jI,ae),Hm=e=>ho(e,T0,_0),AI=e=>ho(e,M0,OI),oa=e=>ho(e,N0,SI),Z=e=>A0.test(e),ko=e=>go(e,k0),_I=e=>go(e,kI),Gm=e=>go(e,T0),TI=e=>go(e,j0),MI=e=>go(e,M0),ia=e=>go(e,N0,!0),ho=(e,t,r)=>{const n=C0.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},go=(e,t,r=!1)=>{const n=A0.exec(e);return n?n[1]?t(n[1]):r:!1},T0=e=>e==="position"||e==="percentage",M0=e=>e==="image"||e==="url",j0=e=>e==="length"||e==="size"||e==="bg-size",k0=e=>e==="length",jI=e=>e==="number",kI=e=>e==="family-name",N0=e=>e==="shadow",qm=()=>{const e=Le("color"),t=Le("font"),r=Le("text"),n=Le("font-weight"),o=Le("tracking"),i=Le("leading"),a=Le("breakpoint"),s=Le("container"),l=Le("spacing"),c=Le("radius"),u=Le("shadow"),f=Le("inset-shadow"),p=Le("text-shadow"),v=Le("drop-shadow"),g=Le("blur"),m=Le("perspective"),h=Le("aspect"),y=Le("ease"),x=Le("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],O=()=>[...P(),Z,X],S=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],C=()=>[Z,X,l],j=()=>[Gn,"full","auto",...C()],D=()=>[Dr,"none","subgrid",Z,X],R=()=>["auto",{span:["full",Dr,Z,X]},Dr,Z,X],_=()=>[Dr,"auto",Z,X],k=()=>["auto","min","max","fr",Z,X],I=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...C()],K=()=>[Gn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],T=()=>[e,Z,X],N=()=>[...P(),Gm,Hm,{position:[Z,X]}],G=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Q=()=>["auto","cover","contain",TI,CI,{size:[Z,X]}],te=()=>[Cc,ko,sn],ne=()=>["","none","full",c,Z,X],re=()=>["",ae,ko,sn],le=()=>["solid","dashed","dotted","double"],Oe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],W=()=>[ae,Cc,Gm,Hm],ue=()=>["","none",g,Z,X],$=()=>["none",ae,Z,X],H=()=>["none",ae,Z,X],F=()=>[ae,Z,X],L=()=>[Gn,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ur],breakpoint:[ur],color:[wI],container:[ur],"drop-shadow":[ur],ease:["in","out","in-out"],font:[EI],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ur],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ur],shadow:[ur],spacing:["px",ae],text:[ur],"text-shadow":[ur],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Gn,X,Z,h]}],container:["container"],columns:[{columns:[ae,X,Z,s]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"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:O()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:j()}],"inset-x":[{"inset-x":j()}],"inset-y":[{"inset-y":j()}],start:[{start:j()}],end:[{end:j()}],top:[{top:j()}],right:[{right:j()}],bottom:[{bottom:j()}],left:[{left:j()}],visibility:["visible","invisible","collapse"],z:[{z:[Dr,"auto",Z,X]}],basis:[{basis:[Gn,"full","auto",s,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ae,Gn,"auto","initial","none",X]}],grow:[{grow:["",ae,Z,X]}],shrink:[{shrink:["",ae,Z,X]}],order:[{order:[Dr,"first","last","none",Z,X]}],"grid-cols":[{"grid-cols":D()}],"col-start-end":[{col:R()}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":D()}],"row-start-end":[{row:R()}],"row-start":[{"row-start":_()}],"row-end":[{"row-end":_()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...I(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...I()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":I()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:K()}],w:[{w:[s,"screen",...K()]}],"min-w":[{"min-w":[s,"screen","none",...K()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...K()]}],h:[{h:["screen","lh",...K()]}],"min-h":[{"min-h":["screen","lh","none",...K()]}],"max-h":[{"max-h":["screen","lh",...K()]}],"font-size":[{text:["base",r,ko,sn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Z,Ac]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Cc,X]}],"font-family":[{font:[_I,X,t]}],"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,Z,X]}],"line-clamp":[{"line-clamp":[ae,"none",Z,Ac]}],leading:[{leading:[i,...C()]}],"list-image":[{"list-image":["none",Z,X]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Z,X]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:T()}],"text-color":[{text:T()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...le(),"wavy"]}],"text-decoration-thickness":[{decoration:[ae,"from-font","auto",Z,sn]}],"text-decoration-color":[{decoration:T()}],"underline-offset":[{"underline-offset":[ae,"auto",Z,X]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Z,X]}],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",Z,X]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:N()}],"bg-repeat":[{bg:G()}],"bg-size":[{bg:Q()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Dr,Z,X],radial:["",Z,X],conic:[Dr,Z,X]},MI,AI]}],"bg-color":[{bg:T()}],"gradient-from-pos":[{from:te()}],"gradient-via-pos":[{via:te()}],"gradient-to-pos":[{to:te()}],"gradient-from":[{from:T()}],"gradient-via":[{via:T()}],"gradient-to":[{to:T()}],rounded:[{rounded:ne()}],"rounded-s":[{"rounded-s":ne()}],"rounded-e":[{"rounded-e":ne()}],"rounded-t":[{"rounded-t":ne()}],"rounded-r":[{"rounded-r":ne()}],"rounded-b":[{"rounded-b":ne()}],"rounded-l":[{"rounded-l":ne()}],"rounded-ss":[{"rounded-ss":ne()}],"rounded-se":[{"rounded-se":ne()}],"rounded-ee":[{"rounded-ee":ne()}],"rounded-es":[{"rounded-es":ne()}],"rounded-tl":[{"rounded-tl":ne()}],"rounded-tr":[{"rounded-tr":ne()}],"rounded-br":[{"rounded-br":ne()}],"rounded-bl":[{"rounded-bl":ne()}],"border-w":[{border:re()}],"border-w-x":[{"border-x":re()}],"border-w-y":[{"border-y":re()}],"border-w-s":[{"border-s":re()}],"border-w-e":[{"border-e":re()}],"border-w-t":[{"border-t":re()}],"border-w-r":[{"border-r":re()}],"border-w-b":[{"border-b":re()}],"border-w-l":[{"border-l":re()}],"divide-x":[{"divide-x":re()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":re()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...le(),"hidden","none"]}],"divide-style":[{divide:[...le(),"hidden","none"]}],"border-color":[{border:T()}],"border-color-x":[{"border-x":T()}],"border-color-y":[{"border-y":T()}],"border-color-s":[{"border-s":T()}],"border-color-e":[{"border-e":T()}],"border-color-t":[{"border-t":T()}],"border-color-r":[{"border-r":T()}],"border-color-b":[{"border-b":T()}],"border-color-l":[{"border-l":T()}],"divide-color":[{divide:T()}],"outline-style":[{outline:[...le(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ae,Z,X]}],"outline-w":[{outline:["",ae,ko,sn]}],"outline-color":[{outline:T()}],shadow:[{shadow:["","none",u,ia,oa]}],"shadow-color":[{shadow:T()}],"inset-shadow":[{"inset-shadow":["none",f,ia,oa]}],"inset-shadow-color":[{"inset-shadow":T()}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:T()}],"ring-offset-w":[{"ring-offset":[ae,sn]}],"ring-offset-color":[{"ring-offset":T()}],"inset-ring-w":[{"inset-ring":re()}],"inset-ring-color":[{"inset-ring":T()}],"text-shadow":[{"text-shadow":["none",p,ia,oa]}],"text-shadow-color":[{"text-shadow":T()}],opacity:[{opacity:[ae,Z,X]}],"mix-blend":[{"mix-blend":[...Oe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Oe()}],"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":[ae]}],"mask-image-linear-from-pos":[{"mask-linear-from":W()}],"mask-image-linear-to-pos":[{"mask-linear-to":W()}],"mask-image-linear-from-color":[{"mask-linear-from":T()}],"mask-image-linear-to-color":[{"mask-linear-to":T()}],"mask-image-t-from-pos":[{"mask-t-from":W()}],"mask-image-t-to-pos":[{"mask-t-to":W()}],"mask-image-t-from-color":[{"mask-t-from":T()}],"mask-image-t-to-color":[{"mask-t-to":T()}],"mask-image-r-from-pos":[{"mask-r-from":W()}],"mask-image-r-to-pos":[{"mask-r-to":W()}],"mask-image-r-from-color":[{"mask-r-from":T()}],"mask-image-r-to-color":[{"mask-r-to":T()}],"mask-image-b-from-pos":[{"mask-b-from":W()}],"mask-image-b-to-pos":[{"mask-b-to":W()}],"mask-image-b-from-color":[{"mask-b-from":T()}],"mask-image-b-to-color":[{"mask-b-to":T()}],"mask-image-l-from-pos":[{"mask-l-from":W()}],"mask-image-l-to-pos":[{"mask-l-to":W()}],"mask-image-l-from-color":[{"mask-l-from":T()}],"mask-image-l-to-color":[{"mask-l-to":T()}],"mask-image-x-from-pos":[{"mask-x-from":W()}],"mask-image-x-to-pos":[{"mask-x-to":W()}],"mask-image-x-from-color":[{"mask-x-from":T()}],"mask-image-x-to-color":[{"mask-x-to":T()}],"mask-image-y-from-pos":[{"mask-y-from":W()}],"mask-image-y-to-pos":[{"mask-y-to":W()}],"mask-image-y-from-color":[{"mask-y-from":T()}],"mask-image-y-to-color":[{"mask-y-to":T()}],"mask-image-radial":[{"mask-radial":[Z,X]}],"mask-image-radial-from-pos":[{"mask-radial-from":W()}],"mask-image-radial-to-pos":[{"mask-radial-to":W()}],"mask-image-radial-from-color":[{"mask-radial-from":T()}],"mask-image-radial-to-color":[{"mask-radial-to":T()}],"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":P()}],"mask-image-conic-pos":[{"mask-conic":[ae]}],"mask-image-conic-from-pos":[{"mask-conic-from":W()}],"mask-image-conic-to-pos":[{"mask-conic-to":W()}],"mask-image-conic-from-color":[{"mask-conic-from":T()}],"mask-image-conic-to-color":[{"mask-conic-to":T()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:N()}],"mask-repeat":[{mask:G()}],"mask-size":[{mask:Q()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Z,X]}],filter:[{filter:["","none",Z,X]}],blur:[{blur:ue()}],brightness:[{brightness:[ae,Z,X]}],contrast:[{contrast:[ae,Z,X]}],"drop-shadow":[{"drop-shadow":["","none",v,ia,oa]}],"drop-shadow-color":[{"drop-shadow":T()}],grayscale:[{grayscale:["",ae,Z,X]}],"hue-rotate":[{"hue-rotate":[ae,Z,X]}],invert:[{invert:["",ae,Z,X]}],saturate:[{saturate:[ae,Z,X]}],sepia:[{sepia:["",ae,Z,X]}],"backdrop-filter":[{"backdrop-filter":["","none",Z,X]}],"backdrop-blur":[{"backdrop-blur":ue()}],"backdrop-brightness":[{"backdrop-brightness":[ae,Z,X]}],"backdrop-contrast":[{"backdrop-contrast":[ae,Z,X]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ae,Z,X]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ae,Z,X]}],"backdrop-invert":[{"backdrop-invert":["",ae,Z,X]}],"backdrop-opacity":[{"backdrop-opacity":[ae,Z,X]}],"backdrop-saturate":[{"backdrop-saturate":[ae,Z,X]}],"backdrop-sepia":[{"backdrop-sepia":["",ae,Z,X]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Z,X]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ae,"initial",Z,X]}],ease:[{ease:["linear","initial",y,Z,X]}],delay:[{delay:[ae,Z,X]}],animate:[{animate:["none",x,Z,X]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,Z,X]}],"perspective-origin":[{"perspective-origin":O()}],rotate:[{rotate:$()}],"rotate-x":[{"rotate-x":$()}],"rotate-y":[{"rotate-y":$()}],"rotate-z":[{"rotate-z":$()}],scale:[{scale:H()}],"scale-x":[{"scale-x":H()}],"scale-y":[{"scale-y":H()}],"scale-z":[{"scale-z":H()}],"scale-3d":["scale-3d"],skew:[{skew:F()}],"skew-x":[{"skew-x":F()}],"skew-y":[{"skew-y":F()}],transform:[{transform:[Z,X,"","none","gpu","cpu"]}],"transform-origin":[{origin:O()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:L()}],"translate-x":[{"translate-x":L()}],"translate-y":[{"translate-y":L()}],"translate-z":[{"translate-z":L()}],"translate-none":["translate-none"],accent:[{accent:T()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:T()}],"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",Z,X]}],"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":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"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",Z,X]}],fill:[{fill:["none",...T()]}],"stroke-w":[{stroke:[ae,ko,sn,Ac]}],stroke:[{stroke:["none",...T()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-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-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-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-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"]}},NI=(e,{cacheSize:t,prefix:r,experimentalParseClassName:n,extend:o={},override:i={}})=>(Vo(e,"cacheSize",t),Vo(e,"prefix",r),Vo(e,"experimentalParseClassName",n),aa(e.theme,i.theme),aa(e.classGroups,i.classGroups),aa(e.conflictingClassGroups,i.conflictingClassGroups),aa(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),Vo(e,"orderSensitiveModifiers",i.orderSensitiveModifiers),sa(e.theme,o.theme),sa(e.classGroups,o.classGroups),sa(e.conflictingClassGroups,o.conflictingClassGroups),sa(e.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),I0(e,o,"orderSensitiveModifiers"),e),Vo=(e,t,r)=>{r!==void 0&&(e[t]=r)},aa=(e,t)=>{if(t)for(const r in t)Vo(e,r,t[r])},sa=(e,t)=>{if(t)for(const r in t)I0(e,t,r)},I0=(e,t,r)=>{const n=t[r];n!==void 0&&(e[r]=e[r]?e[r].concat(n):n)},II=(e,...t)=>typeof e=="function"?Um(qm,e,...t):Um(()=>NI(qm(),e),...t),DI=II({extend:{classGroups:{"font-size":[{text:["hero","h1","h2","h3","h4","lead","semi-lead","body-lg","body","descriptive","small","label","label-sm"]}]}}});function B(...e){return DI(fe(e))}var RI=Symbol.for("react.lazy"),Ha=d[" use ".trim().toString()];function $I(e){return typeof e=="object"&&e!==null&&"then"in e}function D0(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===RI&&"_payload"in e&&$I(e._payload)}function R0(e){const t=LI(e),r=d.forwardRef((n,o)=>{let{children:i,...a}=n;D0(i)&&typeof Ha=="function"&&(i=Ha(i._payload));const s=d.Children.toArray(i),l=s.find(zI);if(l){const c=l.props.children,u=s.map(f=>f===l?d.Children.count(c)>1?d.Children.only(null):d.isValidElement(c)?c.props.children:null:f);return b.jsx(t,{...a,ref:o,children:d.isValidElement(c)?d.cloneElement(c,void 0,u):null})}return b.jsx(t,{...a,ref:o,children:i})});return r.displayName=`${e}.Slot`,r}var Ut=R0("Slot");function LI(e){const t=d.forwardRef((r,n)=>{let{children:o,...i}=r;if(D0(o)&&typeof Ha=="function"&&(o=Ha(o._payload)),d.isValidElement(o)){const a=VI(o),s=BI(i,o.props);return o.type!==d.Fragment&&(s.ref=n?lr(n,a):a),d.cloneElement(o,s)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var FI=Symbol("radix.slottable");function zI(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===FI}function BI(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...s)=>{const l=i(...s);return o(...s),l}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}function VI(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}const tl=ie("text-body focus-visible:ring-sunflower inline-flex items-center justify-center font-sans font-normal whitespace-nowrap transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{primary:"bg-sunflower text-primary hover:bg-sunflower-hover active:bg-sunflower-hover",secondary:"border-border bg-border text-primary active:bg-alt border hover:bg-white",ghost:"text-primary hover:bg-alt active:bg-contrast"},size:{sm:"rounded-pill text-small px-5 py-1",default:"rounded-pill text-small px-8 py-1.5",lg:"rounded-pill text-body px-12 py-2",icon:"h-10 w-10 rounded-full"}},defaultVariants:{variant:"primary",size:"default"}}),$0=d.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},i)=>{const a=n?Ut:"button";return b.jsx(a,{className:B(tl({variant:t,size:r,className:e})),ref:i,...o})});$0.displayName="Button";const WI=FN,KI=zN,L0=BN,Fd=d.forwardRef(({className:e,...t},r)=>b.jsx(VN,{ref:r,className:B("fixed inset-0 z-50 bg-black/50","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","duration-200",e),...t}));Fd.displayName="AlertDialogOverlay";const F0=ie(["fixed top-1/2 left-1/2 z-50 -translate-x-1/2 -translate-y-1/2","bg-main grid w-full gap-4 p-6 shadow-lg","max-h-[85vh] overflow-y-auto","border-border rounded-lg border","focus-visible:ring-sunflower focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%]","data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]","duration-200"],{variants:{size:{sm:"max-w-[400px]",default:"max-w-[500px]",lg:"max-w-[640px]"}},defaultVariants:{size:"default"}}),z0=d.forwardRef(({className:e,size:t,...r},n)=>b.jsxs(L0,{children:[b.jsx(Fd,{}),b.jsx(WN,{ref:n,className:B(F0({size:t}),e),...r})]}));z0.displayName="AlertDialogContent";const B0=d.forwardRef(({className:e,...t},r)=>b.jsx("div",{ref:r,className:B("flex flex-col space-y-2 text-center sm:text-left",e),...t}));B0.displayName="AlertDialogHeader";const V0=d.forwardRef(({className:e,...t},r)=>b.jsx("div",{ref:r,className:B("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t}));V0.displayName="AlertDialogFooter";const W0=d.forwardRef(({className:e,...t},r)=>b.jsx(HN,{ref:r,className:B("text-primary text-lg leading-none tracking-tight",e),...t}));W0.displayName="AlertDialogTitle";const K0=d.forwardRef(({className:e,...t},r)=>b.jsx(GN,{ref:r,className:B("text-secondary text-sm",e),...t}));K0.displayName="AlertDialogDescription";const U0=d.forwardRef(({className:e,variant:t="primary",size:r="default",...n},o)=>b.jsx(KN,{ref:o,className:B(tl({variant:t,size:r}),e),...n}));U0.displayName="AlertDialogAction";const H0=d.forwardRef(({className:e,variant:t="secondary",size:r="default",...n},o)=>b.jsx(UN,{ref:o,className:B(tl({variant:t,size:r}),"mt-2 sm:mt-0",e),...n}));H0.displayName="AlertDialogCancel";const G0=ie("focus-visible:ring-sunflower inline-flex items-center justify-center font-sans font-normal whitespace-nowrap transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",{variants:{variant:{sunflower:"bg-sunflower text-primary","lemon-meringue":"bg-lemon-meringue text-primary border-tertiary border",vanilla:"bg-vanilla text-primary border-tertiary border",eggshell:"bg-eggshell text-primary border-tertiary border","warm-purple":"bg-warm-purple text-white","cool-purple":"bg-cool-purple text-white","electric-blue":"bg-electric-blue text-white","deep-blue":"bg-deep-blue text-white",error:"bg-error text-white",secondary:"border-border bg-alt text-secondary border"},size:{sm:"rounded-pill px-2 py-0.5 text-xs",md:"rounded-pill px-2.5 py-1 text-xs",lg:"rounded-pill text-body px-3.5 py-1 text-sm",xl:"rounded-pill text-body px-4 py-1.5 text-xl"}},defaultVariants:{variant:"sunflower",size:"md"}}),q0=d.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},i)=>{const a=n?Ut:"span";return b.jsx(a,{className:B(G0({variant:t,size:r,className:e})),ref:i,...o})});q0.displayName="Badge";var UI=["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 zd(e){if(typeof e!="string")return!1;var t=UI;return t.includes(e)}var HI=["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"],GI=new Set(HI);function Y0(e){return typeof e!="string"?!1:GI.has(e)}function X0(e){return typeof e=="string"&&e.startsWith("data-")}function Ct(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(Y0(r)||X0(r))&&(t[r]=e[r]);return t}function Sn(e){if(e==null)return null;if(A.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return Ct(t)}return typeof e=="object"&&!Array.isArray(e)?Ct(e):null}function ft(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(Y0(r)||X0(r)||zd(r))&&(t[r]=e[r]);return t}function qI(e){return e==null?null:A.isValidElement(e)?ft(e.props):typeof e=="object"&&!Array.isArray(e)?ft(e):null}var YI=["children","width","height","viewBox","className","style","title","desc"];function hf(){return hf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},hf.apply(null,arguments)}function XI(e,t){if(e==null)return{};var r,n,o=ZI(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function ZI(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Bd=A.forwardRef((e,t)=>{var{children:r,width:n,height:o,viewBox:i,className:a,style:s,title:l,desc:c}=e,u=XI(e,YI),f=i||{width:n,height:o,x:0,y:0},p=fe("recharts-surface",a);return d.createElement("svg",hf({},ft(u),{className:p,width:n,height:o,style:s,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height),ref:t}),d.createElement("title",null,l),d.createElement("desc",null,c),r)}),JI=["children","className"];function gf(){return gf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gf.apply(null,arguments)}function QI(e,t){if(e==null)return{};var r,n,o=eD(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function eD(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Ge=d.forwardRef((e,t)=>{var{children:r,className:n}=e,o=QI(e,JI),i=fe("recharts-layer",n);return d.createElement("g",gf({className:i},ft(o),{ref:t}),r)}),Z0=A.createContext(null),tD=()=>A.useContext(Z0);function we(e){return function(){return e}}const J0=Math.cos,Ga=Math.sin,Ht=Math.sqrt,qa=Math.PI,rl=2*qa,yf=Math.PI,bf=2*yf,cn=1e-6,rD=bf-cn;function Q0(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function nD(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Q0;const r=10**t;return function(n){this._+=n[0];for(let o=1,i=n.length;o<i;++o)this._+=Math.round(arguments[o]*r)/r+n[o]}}class oD{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Q0:nD(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,o){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+o}`}bezierCurveTo(t,r,n,o,i,a){this._append`C${+t},${+r},${+n},${+o},${this._x1=+i},${this._y1=+a}`}arcTo(t,r,n,o,i){if(t=+t,r=+r,n=+n,o=+o,i=+i,i<0)throw new Error(`negative radius: ${i}`);let a=this._x1,s=this._y1,l=n-t,c=o-r,u=a-t,f=s-r,p=u*u+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(p>cn)if(!(Math.abs(f*l-c*u)>cn)||!i)this._append`L${this._x1=t},${this._y1=r}`;else{let v=n-a,g=o-s,m=l*l+c*c,h=v*v+g*g,y=Math.sqrt(m),x=Math.sqrt(p),w=i*Math.tan((yf-Math.acos((m+p-h)/(2*y*x)))/2),P=w/x,O=w/y;Math.abs(P-1)>cn&&this._append`L${t+P*u},${r+P*f}`,this._append`A${i},${i},0,0,${+(f*v>u*g)},${this._x1=t+O*l},${this._y1=r+O*c}`}}arc(t,r,n,o,i,a){if(t=+t,r=+r,n=+n,a=!!a,n<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(o),l=n*Math.sin(o),c=t+s,u=r+l,f=1^a,p=a?o-i:i-o;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>cn||Math.abs(this._y1-u)>cn)&&this._append`L${c},${u}`,n&&(p<0&&(p=p%bf+bf),p>rD?this._append`A${n},${n},0,1,${f},${t-s},${r-l}A${n},${n},0,1,${f},${this._x1=c},${this._y1=u}`:p>cn&&this._append`A${n},${n},0,${+(p>=yf)},${f},${this._x1=t+n*Math.cos(i)},${this._y1=r+n*Math.sin(i)}`)}rect(t,r,n,o){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+o}h${-n}Z`}toString(){return this._}}function Vd(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new oD(t)}function Wd(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function eP(e){this._context=e}eP.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function nl(e){return new eP(e)}function tP(e){return e[0]}function rP(e){return e[1]}function nP(e,t){var r=we(!0),n=null,o=nl,i=null,a=Vd(s);e=typeof e=="function"?e:e===void 0?tP:we(e),t=typeof t=="function"?t:t===void 0?rP:we(t);function s(l){var c,u=(l=Wd(l)).length,f,p=!1,v;for(n==null&&(i=o(v=a())),c=0;c<=u;++c)!(c<u&&r(f=l[c],c,l))===p&&((p=!p)?i.lineStart():i.lineEnd()),p&&i.point(+e(f,c,l),+t(f,c,l));if(v)return i=null,v+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:we(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:we(+l),s):t},s.defined=function(l){return arguments.length?(r=typeof l=="function"?l:we(!!l),s):r},s.curve=function(l){return arguments.length?(o=l,n!=null&&(i=o(n)),s):o},s.context=function(l){return arguments.length?(l==null?n=i=null:i=o(n=l),s):n},s}function la(e,t,r){var n=null,o=we(!0),i=null,a=nl,s=null,l=Vd(c);e=typeof e=="function"?e:e===void 0?tP:we(+e),t=typeof t=="function"?t:we(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?rP:we(+r);function c(f){var p,v,g,m=(f=Wd(f)).length,h,y=!1,x,w=new Array(m),P=new Array(m);for(i==null&&(s=a(x=l())),p=0;p<=m;++p){if(!(p<m&&o(h=f[p],p,f))===y)if(y=!y)v=p,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),g=p-1;g>=v;--g)s.point(w[g],P[g]);s.lineEnd(),s.areaEnd()}y&&(w[p]=+e(h,p,f),P[p]=+t(h,p,f),s.point(n?+n(h,p,f):w[p],r?+r(h,p,f):P[p]))}if(x)return s=null,x+""||null}function u(){return nP().defined(o).curve(a).context(i)}return c.x=function(f){return arguments.length?(e=typeof f=="function"?f:we(+f),n=null,c):e},c.x0=function(f){return arguments.length?(e=typeof f=="function"?f:we(+f),c):e},c.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:we(+f),c):n},c.y=function(f){return arguments.length?(t=typeof f=="function"?f:we(+f),r=null,c):t},c.y0=function(f){return arguments.length?(t=typeof f=="function"?f:we(+f),c):t},c.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:we(+f),c):r},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(r)},c.lineX1=function(){return u().x(n).y(t)},c.defined=function(f){return arguments.length?(o=typeof f=="function"?f:we(!!f),c):o},c.curve=function(f){return arguments.length?(a=f,i!=null&&(s=a(i)),c):a},c.context=function(f){return arguments.length?(f==null?i=s=null:s=a(i=f),c):i},c}class oP{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function iD(e){return new oP(e,!0)}function aD(e){return new oP(e,!1)}const Kd={draw(e,t){const r=Ht(t/qa);e.moveTo(r,0),e.arc(0,0,r,0,rl)}},sD={draw(e,t){const r=Ht(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},iP=Ht(1/3),lD=iP*2,cD={draw(e,t){const r=Ht(t/lD),n=r*iP;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},uD={draw(e,t){const r=Ht(t),n=-r/2;e.rect(n,n,r,r)}},fD=.8908130915292852,aP=Ga(qa/10)/Ga(7*qa/10),dD=Ga(rl/10)*aP,pD=-J0(rl/10)*aP,vD={draw(e,t){const r=Ht(t*fD),n=dD*r,o=pD*r;e.moveTo(0,-r),e.lineTo(n,o);for(let i=1;i<5;++i){const a=rl*i/5,s=J0(a),l=Ga(a);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*o,l*n+s*o)}e.closePath()}},_c=Ht(3),mD={draw(e,t){const r=-Ht(t/(_c*3));e.moveTo(0,r*2),e.lineTo(-_c*r,-r),e.lineTo(_c*r,-r),e.closePath()}},_t=-.5,Tt=Ht(3)/2,xf=1/Ht(12),hD=(xf/2+1)*3,gD={draw(e,t){const r=Ht(t/hD),n=r/2,o=r*xf,i=n,a=r*xf+r,s=-i,l=a;e.moveTo(n,o),e.lineTo(i,a),e.lineTo(s,l),e.lineTo(_t*n-Tt*o,Tt*n+_t*o),e.lineTo(_t*i-Tt*a,Tt*i+_t*a),e.lineTo(_t*s-Tt*l,Tt*s+_t*l),e.lineTo(_t*n+Tt*o,_t*o-Tt*n),e.lineTo(_t*i+Tt*a,_t*a-Tt*i),e.lineTo(_t*s+Tt*l,_t*l-Tt*s),e.closePath()}};function yD(e,t){let r=null,n=Vd(o);e=typeof e=="function"?e:we(e||Kd),t=typeof t=="function"?t:we(t===void 0?64:+t);function o(){let i;if(r||(r=i=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),i)return r=null,i+""||null}return o.type=function(i){return arguments.length?(e=typeof i=="function"?i:we(i),o):e},o.size=function(i){return arguments.length?(t=typeof i=="function"?i:we(+i),o):t},o.context=function(i){return arguments.length?(r=i??null,o):r},o}function Ya(){}function Xa(e,t,r){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+r)/6)}function sP(e){this._context=e}sP.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:Xa(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Xa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function bD(e){return new sP(e)}function lP(e){this._context=e}lP.prototype={areaStart:Ya,areaEnd:Ya,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Xa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function xD(e){return new lP(e)}function cP(e){this._context=e}cP.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Xa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function wD(e){return new cP(e)}function uP(e){this._context=e}uP.prototype={areaStart:Ya,areaEnd:Ya,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function PD(e){return new uP(e)}function Ym(e){return e<0?-1:1}function Xm(e,t,r){var n=e._x1-e._x0,o=t-e._x1,i=(e._y1-e._y0)/(n||o<0&&-0),a=(r-e._y1)/(o||n<0&&-0),s=(i*o+a*n)/(n+o);return(Ym(i)+Ym(a))*Math.min(Math.abs(i),Math.abs(a),.5*Math.abs(s))||0}function Zm(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Tc(e,t,r){var n=e._x0,o=e._y0,i=e._x1,a=e._y1,s=(i-n)/3;e._context.bezierCurveTo(n+s,o+s*t,i-s,a-s*r,i,a)}function Za(e){this._context=e}Za.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:Tc(this,this._t0,Zm(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Tc(this,Zm(this,r=Xm(this,e,t)),r);break;default:Tc(this,this._t0,r=Xm(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function fP(e){this._context=new dP(e)}(fP.prototype=Object.create(Za.prototype)).point=function(e,t){Za.prototype.point.call(this,t,e)};function dP(e){this._context=e}dP.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,r,n,o,i){this._context.bezierCurveTo(t,e,n,r,i,o)}};function SD(e){return new Za(e)}function OD(e){return new fP(e)}function pP(e){this._context=e}pP.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,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=Jm(e),o=Jm(t),i=0,a=1;a<r;++i,++a)this._context.bezierCurveTo(n[0][i],o[0][i],n[1][i],o[1][i],e[a],t[a]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Jm(e){var t,r=e.length-1,n,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 ED(e){return new pP(e)}function ol(e,t){this._context=e,this._t=t}ol.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function CD(e){return new ol(e,.5)}function AD(e){return new ol(e,0)}function _D(e){return new ol(e,1)}function On(e,t){if((a=e.length)>1)for(var r=1,n,o,i=e[t[0]],a,s=i.length;r<a;++r)for(o=i,i=e[t[r]],n=0;n<s;++n)i[n][1]+=i[n][0]=isNaN(o[n][1])?o[n][0]:o[n][1]}function wf(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function TD(e,t){return e[t]}function MD(e){const t=[];return t.key=e,t}function jD(){var e=we([]),t=wf,r=On,n=TD;function o(i){var a=Array.from(e.apply(this,arguments),MD),s,l=a.length,c=-1,u;for(const f of i)for(s=0,++c;s<l;++s)(a[s][c]=[0,+n(f,a[s].key,c,i)]).data=f;for(s=0,u=Wd(t(a));s<l;++s)a[u[s]].index=s;return r(a,u),a}return o.keys=function(i){return arguments.length?(e=typeof i=="function"?i:we(Array.from(i)),o):e},o.value=function(i){return arguments.length?(n=typeof i=="function"?i:we(+i),o):n},o.order=function(i){return arguments.length?(t=i==null?wf:typeof i=="function"?i:we(Array.from(i)),o):t},o.offset=function(i){return arguments.length?(r=i??On,o):r},o}function kD(e,t){if((n=e.length)>0){for(var r,n,o=0,i=e[0].length,a;o<i;++o){for(a=r=0;r<n;++r)a+=e[r][o][1]||0;if(a)for(r=0;r<n;++r)e[r][o][1]/=a}On(e,t)}}function ND(e,t){if((o=e.length)>0){for(var r=0,n=e[t[0]],o,i=n.length;r<i;++r){for(var a=0,s=0;a<o;++a)s+=e[a][r][1]||0;n[r][1]+=n[r][0]=-s/2}On(e,t)}}function ID(e,t){if(!(!((a=e.length)>0)||!((i=(o=e[t[0]]).length)>0))){for(var r=0,n=1,o,i,a;n<i;++n){for(var s=0,l=0,c=0;s<a;++s){for(var u=e[t[s]],f=u[n][1]||0,p=u[n-1][1]||0,v=(f-p)/2,g=0;g<s;++g){var m=e[t[g]],h=m[n][1]||0,y=m[n-1][1]||0;v+=h-y}l+=f,c+=v*f}o[n-1][1]+=o[n-1][0]=r,l&&(r-=c/l)}o[n-1][1]+=o[n-1][0]=r,On(e,t)}}function Zr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Mc={},jc={},Qm;function DD(){return Qm||(Qm=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==="__proto__"}e.isUnsafeProperty=t})(jc)),jc}var kc={},eh;function vP(){return eh||(eh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){switch(typeof r){case"number":case"symbol":return!1;case"string":return r.includes(".")||r.includes("[")||r.includes("]")}}e.isDeepKey=t})(kc)),kc}var Nc={},th;function Ud(){return th||(th=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="string"||typeof r=="symbol"?r:Object.is(r?.valueOf?.(),-0)?"-0":String(r)}e.toKey=t})(Nc)),Nc}var Ic={},Dc={},rh;function RD(){return rh||(rh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){if(r==null)return"";if(typeof r=="string")return r;if(Array.isArray(r))return r.map(t).join(",");const n=String(r);return n==="0"&&Object.is(Number(r),-0)?"-0":n}e.toString=t})(Dc)),Dc}var nh;function Hd(){return nh||(nh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=RD(),r=Ud();function n(o){if(Array.isArray(o))return o.map(r.toKey);if(typeof o=="symbol")return[o];o=t.toString(o);const i=[],a=o.length;if(a===0)return i;let s=0,l="",c="",u=!1;for(o.charCodeAt(0)===46&&(i.push(""),s++);s<a;){const f=o[s];c?f==="\\"&&s+1<a?(s++,l+=o[s]):f===c?c="":l+=f:u?f==='"'||f==="'"?c=f:f==="]"?(u=!1,i.push(l),l=""):l+=f:f==="["?(u=!0,l&&(i.push(l),l="")):f==="."?l&&(i.push(l),l=""):l+=f,s++}return l&&i.push(l),i}e.toPath=n})(Ic)),Ic}var oh;function Gd(){return oh||(oh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=DD(),r=vP(),n=Ud(),o=Hd();function i(s,l,c){if(s==null)return c;switch(typeof l){case"string":{if(t.isUnsafeProperty(l))return c;const u=s[l];return u===void 0?r.isDeepKey(l)?i(s,o.toPath(l),c):c:u}case"number":case"symbol":{typeof l=="number"&&(l=n.toKey(l));const u=s[l];return u===void 0?c:u}default:{if(Array.isArray(l))return a(s,l,c);if(Object.is(l?.valueOf(),-0)?l="-0":l=String(l),t.isUnsafeProperty(l))return c;const u=s[l];return u===void 0?c:u}}}function a(s,l,c){if(l.length===0)return c;let u=s;for(let f=0;f<l.length;f++){if(u==null||t.isUnsafeProperty(l[f]))return c;u=u[l[f]]}return u===void 0?c:u}e.get=i})(Mc)),Mc}var Rc,ih;function $D(){return ih||(ih=1,Rc=Gd().get),Rc}var LD=$D();const En=Zr(LD);var FD=4;function Br(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:FD,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function je(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return e.reduce((o,i,a)=>{var s=r[a-1];return typeof s=="string"?o+s+i:s!==void 0?o+Br(s)+i:o+i},"")}var He=e=>e===0?0:e>0?1:-1,nr=e=>typeof e=="number"&&e!=+e,Cn=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,q=e=>(typeof e=="number"||e instanceof Number)&&!nr(e),or=e=>q(e)||typeof e=="string",zD=0,Yo=e=>{var t=++zD;return"".concat(e||"").concat(t)},nt=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!q(t)&&typeof t!="string")return n;var i;if(Cn(t)){if(r==null)return n;var a=t.indexOf("%");i=r*parseFloat(t.slice(0,a))/100}else i=+t;return nr(i)&&(i=n),o&&r!=null&&i>r&&(i=r),i},mP=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;n<t;n++)if(!r[String(e[n])])r[String(e[n])]=!0;else return!0;return!1};function Ce(e,t,r){return q(e)&&q(t)?Br(e+r*(t-e)):t}function hP(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):En(n,t))===r)}var _e=e=>e===null||typeof e>"u",bi=e=>_e(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function mt(e){return e!=null}function $n(){}var BD=["type","size","sizeType"];function Pf(){return Pf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Pf.apply(null,arguments)}function ah(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function sh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ah(Object(r),!0).forEach(function(n){VD(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ah(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function VD(e,t,r){return(t=WD(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function WD(e){var t=KD(e,"string");return typeof t=="symbol"?t:t+""}function KD(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function UD(e,t){if(e==null)return{};var r,n,o=HD(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function HD(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var gP={symbolCircle:Kd,symbolCross:sD,symbolDiamond:cD,symbolSquare:uD,symbolStar:vD,symbolTriangle:mD,symbolWye:gD},GD=Math.PI/180,qD=e=>{var t="symbol".concat(bi(e));return gP[t]||Kd},YD=(e,t,r)=>{if(t==="area")return e;switch(r){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var n=18*GD;return 1.25*e*e*(Math.tan(n)-Math.tan(n*2)*Math.tan(n)**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}},XD=(e,t)=>{gP["symbol".concat(bi(e))]=t},qd=e=>{var{type:t="circle",size:r=64,sizeType:n="area"}=e,o=UD(e,BD),i=sh(sh({},o),{},{type:t,size:r,sizeType:n}),a="circle";typeof t=="string"&&(a=t);var s=()=>{var p=qD(a),v=yD().type(p).size(YD(r,n,a)),g=v();if(g!==null)return g},{className:l,cx:c,cy:u}=i,f=ft(i);return q(c)&&q(u)&&q(r)?d.createElement("path",Pf({},f,{className:fe("recharts-symbols",l),transform:"translate(".concat(c,", ").concat(u,")"),d:s()})):null};qd.registerSymbol=XD;var yP=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,Yd=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(A.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(o=>{zd(o)&&(n[o]=(i=>r[o](r,i)))}),n},ZD=(e,t,r)=>n=>(e(t,r,n),null),xi=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(o=>{var i=e[o];zd(o)&&typeof i=="function"&&(n||(n={}),n[o]=ZD(i,t,r))}),n};function lh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function JD(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lh(Object(r),!0).forEach(function(n){QD(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function QD(e,t,r){return(t=eR(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eR(e){var t=tR(e,"string");return typeof t=="symbol"?t:t+""}function tR(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $e(e,t){var r=JD({},e),n=t,o=Object.keys(t),i=o.reduce((a,s)=>(a[s]===void 0&&n[s]!==void 0&&(a[s]=n[s]),a),r);return i}function Ja(){return Ja=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ja.apply(null,arguments)}function ch(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function rR(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ch(Object(r),!0).forEach(function(n){nR(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ch(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nR(e,t,r){return(t=oR(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oR(e){var t=iR(e,"string");return typeof t=="symbol"?t:t+""}function iR(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var jt=32,aR={align:"center",iconSize:14,inactiveColor:"#ccc",layout:"horizontal",verticalAlign:"middle"};function sR(e){var{data:t,iconType:r,inactiveColor:n}=e,o=jt/2,i=jt/6,a=jt/3,s=t.inactive?n:t.color,l=r??t.type;if(l==="none")return null;if(l==="plainline"){var c;return d.createElement("line",{strokeWidth:4,fill:"none",stroke:s,strokeDasharray:(c=t.payload)===null||c===void 0?void 0:c.strokeDasharray,x1:0,y1:o,x2:jt,y2:o,className:"recharts-legend-icon"})}if(l==="line")return d.createElement("path",{strokeWidth:4,fill:"none",stroke:s,d:"M0,".concat(o,"h").concat(a,`
52
+ A`).concat(i,",").concat(i,",0,1,1,").concat(2*a,",").concat(o,`
53
+ H`).concat(jt,"M").concat(2*a,",").concat(o,`
54
+ A`).concat(i,",").concat(i,",0,1,1,").concat(a,",").concat(o),className:"recharts-legend-icon"});if(l==="rect")return d.createElement("path",{stroke:"none",fill:s,d:"M0,".concat(jt/8,"h").concat(jt,"v").concat(jt*3/4,"h").concat(-jt,"z"),className:"recharts-legend-icon"});if(d.isValidElement(t.legendIcon)){var u=rR({},t);return delete u.legendIcon,d.cloneElement(t.legendIcon,u)}return d.createElement(qd,{fill:s,cx:o,cy:o,size:jt,sizeType:"diameter",type:l})}function lR(e){var{payload:t,iconSize:r,layout:n,formatter:o,inactiveColor:i,iconType:a}=e,s={x:0,y:0,width:jt,height:jt},l={display:n==="horizontal"?"inline-block":"block",marginRight:10},c={display:"inline-block",verticalAlign:"middle",marginRight:4};return t.map((u,f)=>{var p=u.formatter||o,v=fe({"recharts-legend-item":!0,["legend-item-".concat(f)]:!0,inactive:u.inactive});if(u.type==="none")return null;var g=u.inactive?i:u.color,m=p?p(u.value,u,f):u.value;return d.createElement("li",Ja({className:v,style:l,key:"legend-item-".concat(f)},xi(e,u,f)),d.createElement(Bd,{width:r,height:r,viewBox:s,style:c,"aria-label":"".concat(m," legend icon")},d.createElement(sR,{data:u,iconType:a,inactiveColor:i})),d.createElement("span",{className:"recharts-legend-item-text",style:{color:g}},m))})}var cR=e=>{var t=$e(e,aR),{payload:r,layout:n,align:o}=t;if(!r||!r.length)return null;var i={padding:0,margin:0,textAlign:n==="horizontal"?o:"left"};return d.createElement("ul",{className:"recharts-default-legend",style:i},d.createElement(lR,Ja({},t,{payload:r})))},$c={},Lc={},uh;function uR(){return uh||(uh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){const o=new Map;for(let i=0;i<r.length;i++){const a=r[i],s=n(a,i,r);o.has(s)||o.set(s,a)}return Array.from(o.values())}e.uniqBy=t})(Lc)),Lc}var Fc={},fh;function fR(){return fh||(fh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){return function(...o){return r.apply(this,o.slice(0,n))}}e.ary=t})(Fc)),Fc}var zc={},dh;function bP(){return dh||(dh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r}e.identity=t})(zc)),zc}var Bc={},Vc={},Wc={},ph;function dR(){return ph||(ph=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Number.isSafeInteger(r)&&r>=0}e.isLength=t})(Wc)),Wc}var vh;function Xd(){return vh||(vh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=dR();function r(n){return n!=null&&typeof n!="function"&&t.isLength(n.length)}e.isArrayLike=r})(Vc)),Vc}var Kc={},mh;function pR(){return mh||(mh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="object"&&r!==null}e.isObjectLike=t})(Kc)),Kc}var hh;function vR(){return hh||(hh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Xd(),r=pR();function n(o){return r.isObjectLike(o)&&t.isArrayLike(o)}e.isArrayLikeObject=n})(Bc)),Bc}var Uc={},Hc={},gh;function mR(){return gh||(gh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Gd();function r(n){return function(o){return t.get(o,n)}}e.property=r})(Hc)),Hc}var Gc={},qc={},Yc={},Xc={},yh;function xP(){return yh||(yh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r!==null&&(typeof r=="object"||typeof r=="function")}e.isObject=t})(Xc)),Xc}var Zc={},bh;function wP(){return bh||(bh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null||typeof r!="object"&&typeof r!="function"}e.isPrimitive=t})(Zc)),Zc}var Jc={},xh;function PP(){return xh||(xh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){return r===n||Number.isNaN(r)&&Number.isNaN(n)}e.isEqualsSameValueZero=t})(Jc)),Jc}var wh;function hR(){return wh||(wh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=xP(),r=wP(),n=PP();function o(u,f,p){return typeof p!="function"?o(u,f,()=>{}):i(u,f,function v(g,m,h,y,x,w){const P=p(g,m,h,y,x,w);return P!==void 0?!!P:i(g,m,v,w)},new Map)}function i(u,f,p,v){if(f===u)return!0;switch(typeof f){case"object":return a(u,f,p,v);case"function":return Object.keys(f).length>0?i(u,{...f},p,v):n.isEqualsSameValueZero(u,f);default:return t.isObject(u)?typeof f=="string"?f==="":!0:n.isEqualsSameValueZero(u,f)}}function a(u,f,p,v){if(f==null)return!0;if(Array.isArray(f))return l(u,f,p,v);if(f instanceof Map)return s(u,f,p,v);if(f instanceof Set)return c(u,f,p,v);const g=Object.keys(f);if(u==null||r.isPrimitive(u))return g.length===0;if(g.length===0)return!0;if(v?.has(f))return v.get(f)===u;v?.set(f,u);try{for(let m=0;m<g.length;m++){const h=g[m];if(!r.isPrimitive(u)&&!(h in u)||f[h]===void 0&&u[h]!==void 0||f[h]===null&&u[h]!==null||!p(u[h],f[h],h,u,f,v))return!1}return!0}finally{v?.delete(f)}}function s(u,f,p,v){if(f.size===0)return!0;if(!(u instanceof Map))return!1;for(const[g,m]of f.entries()){const h=u.get(g);if(p(h,m,g,u,f,v)===!1)return!1}return!0}function l(u,f,p,v){if(f.length===0)return!0;if(!Array.isArray(u))return!1;const g=new Set;for(let m=0;m<f.length;m++){const h=f[m];let y=!1;for(let x=0;x<u.length;x++){if(g.has(x))continue;const w=u[x];let P=!1;if(p(w,h,m,u,f,v)&&(P=!0),P){g.add(x),y=!0;break}}if(!y)return!1}return!0}function c(u,f,p,v){return f.size===0?!0:u instanceof Set?l([...u],[...f],p,v):!1}e.isMatchWith=o,e.isSetMatch=c})(Yc)),Yc}var Ph;function SP(){return Ph||(Ph=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=hR();function r(n,o){return t.isMatchWith(n,o,()=>{})}e.isMatch=r})(qc)),qc}var Qc={},eu={},tu={},Sh;function gR(){return Sh||(Sh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Object.getOwnPropertySymbols(r).filter(n=>Object.prototype.propertyIsEnumerable.call(r,n))}e.getSymbols=t})(tu)),tu}var ru={},Oh;function Zd(){return Oh||(Oh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null?r===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(r)}e.getTag=t})(ru)),ru}var nu={},Eh;function OP(){return Eh||(Eh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",r="[object String]",n="[object Number]",o="[object Boolean]",i="[object Arguments]",a="[object Symbol]",s="[object Date]",l="[object Map]",c="[object Set]",u="[object Array]",f="[object Function]",p="[object ArrayBuffer]",v="[object Object]",g="[object Error]",m="[object DataView]",h="[object Uint8Array]",y="[object Uint8ClampedArray]",x="[object Uint16Array]",w="[object Uint32Array]",P="[object BigUint64Array]",O="[object Int8Array]",S="[object Int16Array]",E="[object Int32Array]",C="[object BigInt64Array]",j="[object Float32Array]",D="[object Float64Array]";e.argumentsTag=i,e.arrayBufferTag=p,e.arrayTag=u,e.bigInt64ArrayTag=C,e.bigUint64ArrayTag=P,e.booleanTag=o,e.dataViewTag=m,e.dateTag=s,e.errorTag=g,e.float32ArrayTag=j,e.float64ArrayTag=D,e.functionTag=f,e.int16ArrayTag=S,e.int32ArrayTag=E,e.int8ArrayTag=O,e.mapTag=l,e.numberTag=n,e.objectTag=v,e.regexpTag=t,e.setTag=c,e.stringTag=r,e.symbolTag=a,e.uint16ArrayTag=x,e.uint32ArrayTag=w,e.uint8ArrayTag=h,e.uint8ClampedArrayTag=y})(nu)),nu}var ou={},Ch;function yR(){return Ch||(Ch=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}e.isTypedArray=t})(ou)),ou}var Ah;function EP(){return Ah||(Ah=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=gR(),r=Zd(),n=OP(),o=wP(),i=yR();function a(u,f){return s(u,void 0,u,new Map,f)}function s(u,f,p,v=new Map,g=void 0){const m=g?.(u,f,p,v);if(m!==void 0)return m;if(o.isPrimitive(u))return u;if(v.has(u))return v.get(u);if(Array.isArray(u)){const h=new Array(u.length);v.set(u,h);for(let y=0;y<u.length;y++)h[y]=s(u[y],y,p,v,g);return Object.hasOwn(u,"index")&&(h.index=u.index),Object.hasOwn(u,"input")&&(h.input=u.input),h}if(u instanceof Date)return new Date(u.getTime());if(u instanceof RegExp){const h=new RegExp(u.source,u.flags);return h.lastIndex=u.lastIndex,h}if(u instanceof Map){const h=new Map;v.set(u,h);for(const[y,x]of u)h.set(y,s(x,y,p,v,g));return h}if(u instanceof Set){const h=new Set;v.set(u,h);for(const y of u)h.add(s(y,void 0,p,v,g));return h}if(typeof Buffer<"u"&&Buffer.isBuffer(u))return u.subarray();if(i.isTypedArray(u)){const h=new(Object.getPrototypeOf(u)).constructor(u.length);v.set(u,h);for(let y=0;y<u.length;y++)h[y]=s(u[y],y,p,v,g);return h}if(u instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&u instanceof SharedArrayBuffer)return u.slice(0);if(u instanceof DataView){const h=new DataView(u.buffer.slice(0),u.byteOffset,u.byteLength);return v.set(u,h),l(h,u,p,v,g),h}if(typeof File<"u"&&u instanceof File){const h=new File([u],u.name,{type:u.type});return v.set(u,h),l(h,u,p,v,g),h}if(typeof Blob<"u"&&u instanceof Blob){const h=new Blob([u],{type:u.type});return v.set(u,h),l(h,u,p,v,g),h}if(u instanceof Error){const h=new u.constructor;return v.set(u,h),h.message=u.message,h.name=u.name,h.stack=u.stack,h.cause=u.cause,l(h,u,p,v,g),h}if(u instanceof Boolean){const h=new Boolean(u.valueOf());return v.set(u,h),l(h,u,p,v,g),h}if(u instanceof Number){const h=new Number(u.valueOf());return v.set(u,h),l(h,u,p,v,g),h}if(u instanceof String){const h=new String(u.valueOf());return v.set(u,h),l(h,u,p,v,g),h}if(typeof u=="object"&&c(u)){const h=Object.create(Object.getPrototypeOf(u));return v.set(u,h),l(h,u,p,v,g),h}return u}function l(u,f,p=u,v,g){const m=[...Object.keys(f),...t.getSymbols(f)];for(let h=0;h<m.length;h++){const y=m[h],x=Object.getOwnPropertyDescriptor(u,y);(x==null||x.writable)&&(u[y]=s(f[y],y,p,v,g))}}function c(u){switch(r.getTag(u)){case n.argumentsTag:case n.arrayTag:case n.arrayBufferTag:case n.dataViewTag:case n.booleanTag:case n.dateTag:case n.float32ArrayTag:case n.float64ArrayTag:case n.int8ArrayTag:case n.int16ArrayTag:case n.int32ArrayTag:case n.mapTag:case n.numberTag:case n.objectTag:case n.regexpTag:case n.setTag:case n.stringTag:case n.symbolTag:case n.uint8ArrayTag:case n.uint8ClampedArrayTag:case n.uint16ArrayTag:case n.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=a,e.cloneDeepWithImpl=s,e.copyProperties=l})(eu)),eu}var _h;function bR(){return _h||(_h=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=EP();function r(n){return t.cloneDeepWithImpl(n,void 0,n,new Map,void 0)}e.cloneDeep=r})(Qc)),Qc}var Th;function xR(){return Th||(Th=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=SP(),r=bR();function n(o){return o=r.cloneDeep(o),i=>t.isMatch(i,o)}e.matches=n})(Gc)),Gc}var iu={},au={},su={},Mh;function wR(){return Mh||(Mh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=EP(),r=Zd(),n=OP();function o(i,a){return t.cloneDeepWith(i,(s,l,c,u)=>{const f=a?.(s,l,c,u);if(f!==void 0)return f;if(typeof i=="object"){if(r.getTag(i)===n.objectTag&&typeof i.constructor!="function"){const p={};return u.set(i,p),t.copyProperties(p,i,c,u),p}switch(Object.prototype.toString.call(i)){case n.numberTag:case n.stringTag:case n.booleanTag:{const p=new i.constructor(i?.valueOf());return t.copyProperties(p,i),p}case n.argumentsTag:{const p={};return t.copyProperties(p,i),p.length=i.length,p[Symbol.iterator]=i[Symbol.iterator],p}default:return}}})}e.cloneDeepWith=o})(su)),su}var jh;function PR(){return jh||(jh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=wR();function r(n){return t.cloneDeepWith(n)}e.cloneDeep=r})(au)),au}var lu={},cu={},kh;function CP(){return kh||(kh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;function r(n,o=Number.MAX_SAFE_INTEGER){switch(typeof n){case"number":return Number.isInteger(n)&&n>=0&&n<o;case"symbol":return!1;case"string":return t.test(n)}}e.isIndex=r})(cu)),cu}var uu={},Nh;function SR(){return Nh||(Nh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Zd();function r(n){return n!==null&&typeof n=="object"&&t.getTag(n)==="[object Arguments]"}e.isArguments=r})(uu)),uu}var Ih;function OR(){return Ih||(Ih=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=vP(),r=CP(),n=SR(),o=Hd();function i(a,s){let l;if(Array.isArray(s)?l=s:typeof s=="string"&&t.isDeepKey(s)&&a?.[s]==null?l=o.toPath(s):l=[s],l.length===0)return!1;let c=a;for(let u=0;u<l.length;u++){const f=l[u];if((c==null||!Object.hasOwn(c,f))&&!((Array.isArray(c)||n.isArguments(c))&&r.isIndex(f)&&f<c.length))return!1;c=c[f]}return!0}e.has=i})(lu)),lu}var Dh;function ER(){return Dh||(Dh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=SP(),r=Ud(),n=PR(),o=Gd(),i=OR();function a(s,l){switch(typeof s){case"object":{Object.is(s?.valueOf(),-0)&&(s="-0");break}case"number":{s=r.toKey(s);break}}return l=n.cloneDeep(l),function(c){const u=o.get(c,s);return u===void 0?i.has(c,s):l===void 0?u===void 0:t.isMatch(u,l)}}e.matchesProperty=a})(iu)),iu}var Rh;function CR(){return Rh||(Rh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=bP(),r=mR(),n=xR(),o=ER();function i(a){if(a==null)return t.identity;switch(typeof a){case"function":return a;case"object":return Array.isArray(a)&&a.length===2?o.matchesProperty(a[0],a[1]):n.matches(a);case"string":case"symbol":case"number":return r.property(a)}}e.iteratee=i})(Uc)),Uc}var $h;function AR(){return $h||($h=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=uR(),r=fR(),n=bP(),o=vR(),i=CR();function a(s,l=n.identity){return o.isArrayLikeObject(s)?t.uniqBy(Array.from(s),r.ary(i.iteratee(l),1)):[]}e.uniqBy=a})($c)),$c}var fu,Lh;function _R(){return Lh||(Lh=1,fu=AR().uniqBy),fu}var TR=_R();const Fh=Zr(TR);function AP(e,t,r){return t===!0?Fh(e,r):typeof t=="function"?Fh(e,t):e}var ca={exports:{}},du={},ua={exports:{}},pu={};var zh;function MR(){if(zh)return pu;zh=1;var e=A;function t(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(f,p){var v=p(),g=n({inst:{value:v,getSnapshot:p}}),m=g[0].inst,h=g[1];return i(function(){m.value=v,m.getSnapshot=p,l(m)&&h({inst:m})},[f,v,p]),o(function(){return l(m)&&h({inst:m}),f(function(){l(m)&&h({inst:m})})},[f]),a(v),v}function l(f){var p=f.getSnapshot;f=f.value;try{var v=p();return!r(f,v)}catch{return!0}}function c(f,p){return p()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:s;return pu.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,pu}var vu={};var Bh;function jR(){return Bh||(Bh=1,process.env.NODE_ENV!=="production"&&(function(){function e(v,g){return v===g&&(v!==0||1/v===1/g)||v!==v&&g!==g}function t(v,g){u||o.startTransition===void 0||(u=!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 m=g();if(!f){var h=g();i(m,h)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}h=a({inst:{value:m,getSnapshot:g}});var y=h[0].inst,x=h[1];return l(function(){y.value=m,y.getSnapshot=g,r(y)&&x({inst:y})},[v,m,g]),s(function(){return r(y)&&x({inst:y}),v(function(){r(y)&&x({inst:y})})},[v]),c(m),m}function r(v){var g=v.getSnapshot;v=v.value;try{var m=g();return!i(v,m)}catch{return!0}}function n(v,g){return g()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=A,i=typeof Object.is=="function"?Object.is:e,a=o.useState,s=o.useEffect,l=o.useLayoutEffect,c=o.useDebugValue,u=!1,f=!1,p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?n:t;vu.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:p,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),vu}var Vh;function _P(){return Vh||(Vh=1,process.env.NODE_ENV==="production"?ua.exports=MR():ua.exports=jR()),ua.exports}var Wh;function kR(){if(Wh)return du;Wh=1;var e=A,t=_P();function r(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var n=typeof Object.is=="function"?Object.is:r,o=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;return du.useSyncExternalStoreWithSelector=function(c,u,f,p,v){var g=i(null);if(g.current===null){var m={hasValue:!1,value:null};g.current=m}else m=g.current;g=s(function(){function y(S){if(!x){if(x=!0,w=S,S=p(S),v!==void 0&&m.hasValue){var E=m.value;if(v(E,S))return P=E}return P=S}if(E=P,n(w,S))return E;var C=p(S);return v!==void 0&&v(E,C)?(w=S,E):(w=S,P=C)}var x=!1,w,P,O=f===void 0?null:f;return[function(){return y(u())},O===null?void 0:function(){return y(O())}]},[u,f,p,v]);var h=o(c,g[0],g[1]);return a(function(){m.hasValue=!0,m.value=h},[h]),l(h),h},du}var mu={};var Kh;function NR(){return Kh||(Kh=1,process.env.NODE_ENV!=="production"&&(function(){function e(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=A,r=_P(),n=typeof Object.is=="function"?Object.is:e,o=r.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;mu.useSyncExternalStoreWithSelector=function(c,u,f,p,v){var g=i(null);if(g.current===null){var m={hasValue:!1,value:null};g.current=m}else m=g.current;g=s(function(){function y(S){if(!x){if(x=!0,w=S,S=p(S),v!==void 0&&m.hasValue){var E=m.value;if(v(E,S))return P=E}return P=S}if(E=P,n(w,S))return E;var C=p(S);return v!==void 0&&v(E,C)?(w=S,E):(w=S,P=C)}var x=!1,w,P,O=f===void 0?null:f;return[function(){return y(u())},O===null?void 0:function(){return y(O())}]},[u,f,p,v]);var h=o(c,g[0],g[1]);return a(function(){m.hasValue=!0,m.value=h},[h]),l(h),h},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),mu}var Uh;function IR(){return Uh||(Uh=1,process.env.NODE_ENV==="production"?ca.exports=kR():ca.exports=NR()),ca.exports}var DR=IR(),Jd=A.createContext(null),RR=e=>e,Pe=()=>{var e=A.useContext(Jd);return e?e.store.dispatch:RR},$a=()=>{},$R=()=>$a,LR=(e,t)=>e===t;function J(e){var t=A.useContext(Jd),r=A.useMemo(()=>t?n=>{if(n!=null)return e(n)}:$a,[t,e]);return DR.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:$R,t?t.store.getState:$a,t?t.store.getState:$a,r,LR)}var FR=(e,t,r)=>{if(t.length===1&&t[0]===r){let n=!1;try{const o={};e(o)===o&&(n=!0)}catch{}if(n){let o;try{throw new Error}catch(i){({stack:o}=i)}console.warn(`The result function returned its own inputs without modification. e.g
55
+ \`createSelector([state => state.todos], todos => todos)\`
56
+ This could lead to inefficient memoization and unnecessary re-renders.
57
+ Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:o})}}},zR=(e,t,r)=>{const{memoize:n,memoizeOptions:o}=t,{inputSelectorResults:i,inputSelectorResultsCopy:a}=e,s=n(()=>({}),...o);if(!(s.apply(null,i)===s.apply(null,a))){let c;try{throw new Error}catch(u){({stack:c}=u)}console.warn(`An input selector returned a different result when passed same arguments.
58
+ This means your output selector will likely run more frequently than intended.
59
+ Avoid returning a new reference inside your input selector, e.g.
60
+ \`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:r,firstInputs:i,secondInputs:a,stack:c})}},BR={inputStabilityCheck:"once",identityFunctionCheck:"once"};function VR(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function WR(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function KR(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var Hh=e=>Array.isArray(e)?e:[e];function UR(e){const t=Array.isArray(e[0])?e[0]:e;return KR(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Gh(e,t){const r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var HR=(e,t)=>{const{identityFunctionCheck:r,inputStabilityCheck:n}={...BR,...t};return{identityFunctionCheck:{shouldRun:r==="always"||r==="once"&&e,run:FR},inputStabilityCheck:{shouldRun:n==="always"||n==="once"&&e,run:zR}}},GR=class{constructor(e){this.value=e}deref(){return this.value}},qR=typeof WeakRef<"u"?WeakRef:GR,YR=0,qh=1;function fa(){return{s:YR,v:void 0,o:null,p:null}}function TP(e,t={}){let r=fa();const{resultEqualityCheck:n}=t;let o,i=0;function a(){let s=r;const{length:l}=arguments;for(let f=0,p=l;f<p;f++){const v=arguments[f];if(typeof v=="function"||typeof v=="object"&&v!==null){let g=s.o;g===null&&(s.o=g=new WeakMap);const m=g.get(v);m===void 0?(s=fa(),g.set(v,s)):s=m}else{let g=s.p;g===null&&(s.p=g=new Map);const m=g.get(v);m===void 0?(s=fa(),g.set(v,s)):s=m}}const c=s;let u;if(s.s===qh)u=s.v;else if(u=e.apply(null,arguments),i++,n){const f=o?.deref?.()??o;f!=null&&n(f,u)&&(u=f,i!==0&&i--),o=typeof u=="object"&&u!==null||typeof u=="function"?new qR(u):u}return c.s=qh,c.v=u,u}return a.clearCache=()=>{r=fa(),a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}function XR(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...o)=>{let i=0,a=0,s,l={},c=o.pop();typeof c=="object"&&(l=c,c=o.pop()),VR(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...r,...l},{memoize:f,memoizeOptions:p=[],argsMemoize:v=TP,argsMemoizeOptions:g=[],devModeChecks:m={}}=u,h=Hh(p),y=Hh(g),x=UR(o),w=f(function(){return i++,c.apply(null,arguments)},...h);let P=!0;const O=v(function(){a++;const E=Gh(x,arguments);if(s=w.apply(null,E),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:C,inputStabilityCheck:j}=HR(P,m);if(C.shouldRun&&C.run(c,E,s),j.shouldRun){const D=Gh(x,arguments);j.run({inputSelectorResults:E,inputSelectorResultsCopy:D},{memoize:f,memoizeOptions:h},arguments)}P&&(P=!1)}return s},...y);return Object.assign(O,{resultFunc:c,memoizedResultFunc:w,dependencies:x,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>s,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:f,argsMemoize:v})};return Object.assign(n,{withTypes:()=>n}),n}var M=XR(TP),ZR=Object.assign((e,t=M)=>{WR(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const r=Object.keys(e),n=r.map(i=>e[i]);return t(n,(...i)=>i.reduce((a,s,l)=>(a[r[l]]=s,a),{}))},{withTypes:()=>ZR}),hu={},gu={},yu={},Yh;function JR(){return Yh||(Yh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="symbol"?1:n===null?2:n===void 0?3:n!==n?4:0}const r=(n,o,i)=>{if(n!==o){const a=t(n),s=t(o);if(a===s&&a===0){if(n<o)return i==="desc"?1:-1;if(n>o)return i==="desc"?-1:1}return i==="desc"?s-a:a-s}return 0};e.compareValues=r})(yu)),yu}var bu={},xu={},Xh;function MP(){return Xh||(Xh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"||r instanceof Symbol}e.isSymbol=t})(xu)),xu}var Zh;function QR(){return Zh||(Zh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=MP(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function o(i,a){return Array.isArray(i)?!1:typeof i=="number"||typeof i=="boolean"||i==null||t.isSymbol(i)?!0:typeof i=="string"&&(n.test(i)||!r.test(i))||a!=null&&Object.hasOwn(a,i)}e.isKey=o})(bu)),bu}var Jh;function e$(){return Jh||(Jh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=JR(),r=QR(),n=Hd();function o(i,a,s,l){if(i==null)return[];s=l?void 0:s,Array.isArray(i)||(i=Object.values(i)),Array.isArray(a)||(a=a==null?[null]:[a]),a.length===0&&(a=[null]),Array.isArray(s)||(s=s==null?[]:[s]),s=s.map(v=>String(v));const c=(v,g)=>{let m=v;for(let h=0;h<g.length&&m!=null;++h)m=m[g[h]];return m},u=(v,g)=>g==null||v==null?g:typeof v=="object"&&"key"in v?Object.hasOwn(g,v.key)?g[v.key]:c(g,v.path):typeof v=="function"?v(g):Array.isArray(v)?c(g,v):typeof g=="object"?g[v]:g,f=a.map(v=>(Array.isArray(v)&&v.length===1&&(v=v[0]),v==null||typeof v=="function"||Array.isArray(v)||r.isKey(v)?v:{key:v,path:n.toPath(v)}));return i.map(v=>({original:v,criteria:f.map(g=>u(g,v))})).slice().sort((v,g)=>{for(let m=0;m<f.length;m++){const h=t.compareValues(v.criteria[m],g.criteria[m],s[m]);if(h!==0)return h}return 0}).map(v=>v.original)}e.orderBy=o})(gu)),gu}var wu={},Qh;function t$(){return Qh||(Qh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n=1){const o=[],i=Math.floor(n),a=(s,l)=>{for(let c=0;c<s.length;c++){const u=s[c];Array.isArray(u)&&l<i?a(u,l+1):o.push(u)}};return a(r,0),o}e.flatten=t})(wu)),wu}var Pu={},eg;function jP(){return eg||(eg=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=CP(),r=Xd(),n=xP(),o=PP();function i(a,s,l){return n.isObject(l)&&(typeof s=="number"&&r.isArrayLike(l)&&t.isIndex(s)&&s<l.length||typeof s=="string"&&s in l)?o.isEqualsSameValueZero(l[s],a):!1}e.isIterateeCall=i})(Pu)),Pu}var tg;function r$(){return tg||(tg=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=e$(),r=t$(),n=jP();function o(i,...a){const s=a.length;return s>1&&n.isIterateeCall(i,a[0],a[1])?a=[]:s>2&&n.isIterateeCall(a[0],a[1],a[2])&&(a=[a[0]]),t.orderBy(i,r.flatten(a),["asc"])}e.sortBy=o})(hu)),hu}var Su,rg;function n$(){return rg||(rg=1,Su=r$().sortBy),Su}var o$=n$();const il=Zr(o$);var kP=e=>e.legend.settings,i$=e=>e.legend.size,a$=e=>e.legend.payload,s$=M([a$,kP],(e,t)=>{var{itemSorter:r}=t,n=e.flat(1);return r?il(n,r):n});function l$(){return J(s$)}var da=1;function NP(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,r]=A.useState({height:0,left:0,top:0,width:0}),n=A.useCallback(o=>{if(o!=null){var i=o.getBoundingClientRect(),a={height:i.height,left:i.left,top:i.top,width:i.width};(Math.abs(a.height-t.height)>da||Math.abs(a.left-t.left)>da||Math.abs(a.top-t.top)>da||Math.abs(a.width-t.width)>da)&&r({height:a.height,left:a.left,top:a.top,width:a.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,n]}function Je(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 c$=typeof Symbol=="function"&&Symbol.observable||"@@observable",ng=c$,Ou=()=>Math.random().toString(36).substring(7).split("").join("."),u$={INIT:`@@redux/INIT${Ou()}`,REPLACE:`@@redux/REPLACE${Ou()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Ou()}`},yn=u$;function wi(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function f$(e){if(e===void 0)return"undefined";if(e===null)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(v$(e))return"date";if(p$(e))return"error";const r=d$(e);switch(r){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return r}return Object.prototype.toString.call(e).slice(8,-1).toLowerCase().replace(/\s/g,"")}function d$(e){return typeof e.constructor=="function"?e.constructor.name:null}function p$(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function v$(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function $r(e){let t=typeof e;return process.env.NODE_ENV!=="production"&&(t=f$(e)),t}function IP(e,t,r){if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?Je(2):`Expected the root reducer to be a function. Instead, received: '${$r(e)}'`);if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?Je(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(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(process.env.NODE_ENV==="production"?Je(1):`Expected the enhancer to be a function. Instead, received: '${$r(r)}'`);return r(IP)(e,t)}let n=e,o=t,i=new Map,a=i,s=0,l=!1;function c(){a===i&&(a=new Map,i.forEach((h,y)=>{a.set(y,h)}))}function u(){if(l)throw new Error(process.env.NODE_ENV==="production"?Je(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 f(h){if(typeof h!="function")throw new Error(process.env.NODE_ENV==="production"?Je(4):`Expected the listener to be a function. Instead, received: '${$r(h)}'`);if(l)throw new Error(process.env.NODE_ENV==="production"?Je(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 y=!0;c();const x=s++;return a.set(x,h),function(){if(y){if(l)throw new Error(process.env.NODE_ENV==="production"?Je(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.");y=!1,c(),a.delete(x),i=null}}}function p(h){if(!wi(h))throw new Error(process.env.NODE_ENV==="production"?Je(7):`Actions must be plain objects. Instead, the actual type was: '${$r(h)}'. 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(typeof h.type>"u")throw new Error(process.env.NODE_ENV==="production"?Je(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(typeof h.type!="string")throw new Error(process.env.NODE_ENV==="production"?Je(17):`Action "type" property must be a string. Instead, the actual type was: '${$r(h.type)}'. Value was: '${h.type}' (stringified)`);if(l)throw new Error(process.env.NODE_ENV==="production"?Je(9):"Reducers may not dispatch actions.");try{l=!0,o=n(o,h)}finally{l=!1}return(i=a).forEach(x=>{x()}),h}function v(h){if(typeof h!="function")throw new Error(process.env.NODE_ENV==="production"?Je(10):`Expected the nextReducer to be a function. Instead, received: '${$r(h)}`);n=h,p({type:yn.REPLACE})}function g(){const h=f;return{subscribe(y){if(typeof y!="object"||y===null)throw new Error(process.env.NODE_ENV==="production"?Je(11):`Expected the observer to be an object. Instead, received: '${$r(y)}'`);function x(){const P=y;P.next&&P.next(u())}return x(),{unsubscribe:h(x)}},[ng](){return this}}}return p({type:yn.INIT}),{dispatch:p,subscribe:f,getState:u,replaceReducer:v,[ng]:g}}function og(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function m$(e,t,r,n){const o=Object.keys(t),i=r&&r.type===yn.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(o.length===0)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!wi(e))return`The ${i} has unexpected type of "${$r(e)}". Expected argument to be an object with the following keys: "${o.join('", "')}"`;const a=Object.keys(e).filter(s=>!t.hasOwnProperty(s)&&!n[s]);if(a.forEach(s=>{n[s]=!0}),!(r&&r.type===yn.REPLACE)&&a.length>0)return`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.`}function h$(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:yn.INIT})>"u")throw new Error(process.env.NODE_ENV==="production"?Je(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(typeof r(void 0,{type:yn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?Je(13):`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${yn.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.`)})}function DP(e){const t=Object.keys(e),r={};for(let a=0;a<t.length;a++){const s=t[a];process.env.NODE_ENV!=="production"&&typeof e[s]>"u"&&og(`No reducer provided for key "${s}"`),typeof e[s]=="function"&&(r[s]=e[s])}const n=Object.keys(r);let o;process.env.NODE_ENV!=="production"&&(o={});let i;try{h$(r)}catch(a){i=a}return function(s={},l){if(i)throw i;if(process.env.NODE_ENV!=="production"){const f=m$(s,r,l,o);f&&og(f)}let c=!1;const u={};for(let f=0;f<n.length;f++){const p=n[f],v=r[p],g=s[p],m=v(g,l);if(typeof m>"u"){const h=l&&l.type;throw new Error(process.env.NODE_ENV==="production"?Je(14):`When called with an action of type ${h?`"${String(h)}"`:"(unknown type)"}, the slice reducer for key "${p}" 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.`)}u[p]=m,c=c||m!==g}return c=c||n.length!==Object.keys(s).length,c?u:s}}function Qa(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function g$(...e){return t=>(r,n)=>{const o=t(r,n);let i=()=>{throw new Error(process.env.NODE_ENV==="production"?Je(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")};const a={getState:o.getState,dispatch:(l,...c)=>i(l,...c)},s=e.map(l=>l(a));return i=Qa(...s)(o.dispatch),{...o,dispatch:i}}}function Qd(e){return wi(e)&&"type"in e&&typeof e.type=="string"}var RP=Symbol.for("immer-nothing"),ig=Symbol.for("immer-draftable"),dt=Symbol.for("immer-state"),y$=process.env.NODE_ENV!=="production"?[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 xt(e,...t){if(process.env.NODE_ENV!=="production"){const r=y$[e],n=dn(r)?r.apply(null,t):r;throw new Error(`[Immer] ${n}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Pt=Object,io=Pt.getPrototypeOf,es="constructor",al="prototype",Sf="configurable",ts="enumerable",La="writable",Xo="value",gr=e=>!!e&&!!e[dt];function Bt(e){return e?$P(e)||ll(e)||!!e[ig]||!!e[es]?.[ig]||cl(e)||ul(e):!1}var b$=Pt[al][es].toString(),ag=new WeakMap;function $P(e){if(!e||!ep(e))return!1;const t=io(e);if(t===null||t===Pt[al])return!0;const r=Pt.hasOwnProperty.call(t,es)&&t[es];if(r===Object)return!0;if(!dn(r))return!1;let n=ag.get(r);return n===void 0&&(n=Function.toString.call(r),ag.set(r,n)),n===b$}function sl(e,t,r=!0){Pi(e)===0?(r?Reflect.ownKeys(e):Pt.keys(e)).forEach(o=>{t(o,e[o],e)}):e.forEach((n,o)=>t(o,n,e))}function Pi(e){const t=e[dt];return t?t.type_:ll(e)?1:cl(e)?2:ul(e)?3:0}var sg=(e,t,r=Pi(e))=>r===2?e.has(t):Pt[al].hasOwnProperty.call(e,t),Of=(e,t,r=Pi(e))=>r===2?e.get(t):e[t],rs=(e,t,r,n=Pi(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function x$(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var ll=Array.isArray,cl=e=>e instanceof Map,ul=e=>e instanceof Set,ep=e=>typeof e=="object",dn=e=>typeof e=="function",Eu=e=>typeof e=="boolean";function w$(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var fr=e=>e.copy_||e.base_,tp=e=>e.modified_?e.copy_:e.base_;function Ef(e,t){if(cl(e))return new Map(e);if(ul(e))return new Set(e);if(ll(e))return Array[al].slice.call(e);const r=$P(e);if(t===!0||t==="class_only"&&!r){const n=Pt.getOwnPropertyDescriptors(e);delete n[dt];let o=Reflect.ownKeys(n);for(let i=0;i<o.length;i++){const a=o[i],s=n[a];s[La]===!1&&(s[La]=!0,s[Sf]=!0),(s.get||s.set)&&(n[a]={[Sf]:!0,[La]:!0,[ts]:s[ts],[Xo]:e[a]})}return Pt.create(io(e),n)}else{const n=io(e);if(n!==null&&r)return{...e};const o=Pt.create(n);return Pt.assign(o,e)}}function rp(e,t=!1){return fl(e)||gr(e)||!Bt(e)||(Pi(e)>1&&Pt.defineProperties(e,{set:pa,add:pa,clear:pa,delete:pa}),Pt.freeze(e),t&&sl(e,(r,n)=>{rp(n,!0)},!1)),e}function P$(){xt(2)}var pa={[Xo]:P$};function fl(e){return e===null||!ep(e)?!0:Pt.isFrozen(e)}var ns="MapSet",Cf="Patches",lg="ArrayMethods",LP={};function An(e){const t=LP[e];return t||xt(0,e),t}var cg=e=>!!LP[e],Zo,FP=()=>Zo,S$=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:cg(ns)?An(ns):void 0,arrayMethodsPlugin_:cg(lg)?An(lg):void 0});function ug(e,t){t&&(e.patchPlugin_=An(Cf),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Af(e){_f(e),e.drafts_.forEach(O$),e.drafts_=null}function _f(e){e===Zo&&(Zo=e.parent_)}var fg=e=>Zo=S$(Zo,e);function O$(e){const t=e[dt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function dg(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[dt].modified_&&(Af(t),xt(4)),Bt(e)&&(e=pg(t,e));const{patchPlugin_:o}=t;o&&o.generateReplacementPatches_(r[dt].base_,e,t)}else e=pg(t,r);return E$(t,e,!0),Af(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==RP?e:void 0}function pg(e,t){if(fl(t))return t;const r=t[dt];if(!r)return os(t,e.handledSet_,e);if(!dl(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){const{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);VP(r,e)}return r.copy_}function E$(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&rp(t,r)}function zP(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var dl=(e,t)=>e.scope_===t,C$=[];function BP(e,t,r,n){const o=fr(e),i=e.type_;if(n!==void 0&&Of(o,n,i)===t){rs(o,n,r,i);return}if(!e.draftLocations_){const s=e.draftLocations_=new Map;sl(o,(l,c)=>{if(gr(c)){const u=s.get(c)||[];u.push(l),s.set(c,u)}})}const a=e.draftLocations_.get(t)??C$;for(const s of a)rs(o,s,r,i)}function A$(e,t,r){e.callbacks_.push(function(o){const i=t;if(!i||!dl(i,o))return;o.mapSetPlugin_?.fixSetContents(i);const a=tp(i);BP(e,i.draft_??i,a,r),VP(i,o)})}function VP(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:n}=t;if(n){const o=n.getPath(e);o&&n.generatePatches_(e,o,t)}zP(e)}}function _$(e,t,r){const{scope_:n}=e;if(gr(r)){const o=r[dt];dl(o,n)&&o.callbacks_.push(function(){Fa(e);const a=tp(o);BP(e,r,a,t)})}else Bt(r)&&e.callbacks_.push(function(){const i=fr(e);e.type_===3?i.has(r)&&os(r,n.handledSet_,n):Of(i,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&os(Of(e.copy_,t,e.type_),n.handledSet_,n)})}function os(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||gr(e)||t.has(e)||!Bt(e)||fl(e)||(t.add(e),sl(e,(n,o)=>{if(gr(o)){const i=o[dt];if(dl(i,r)){const a=tp(i);rs(e,n,a,e.type_),zP(i)}}else Bt(o)&&os(o,t,r)})),e}function T$(e,t){const r=ll(e),n={type_:r?1:0,scope_:t?t.scope_:FP(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let o=n,i=is;r&&(o=[n],i=Jo);const{revoke:a,proxy:s}=Proxy.revocable(o,i);return n.draft_=s,n.revoke_=a,[s,n]}var is={get(e,t){if(t===dt)return e;let r=e.scope_.arrayMethodsPlugin_;const n=e.type_===1&&typeof t=="string";if(n&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);const o=fr(e);if(!sg(o,t,e.type_))return M$(e,o,t);const i=o[t];if(e.finalized_||!Bt(i)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&w$(t))return i;if(i===Cu(e.base_,t)){Fa(e);const a=e.type_===1?+t:t,s=Mf(e.scope_,i,e,a);return e.copy_[a]=s}return i},has(e,t){return t in fr(e)},ownKeys(e){return Reflect.ownKeys(fr(e))},set(e,t,r){const n=WP(fr(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const o=Cu(fr(e),t),i=o?.[dt];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(x$(r,o)&&(r!==void 0||sg(e.base_,t,e.type_)))return!0;Fa(e),Tf(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),_$(e,t,r)),!0},deleteProperty(e,t){return Fa(e),Cu(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Tf(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=fr(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[La]:!0,[Sf]:e.type_!==1||t!=="length",[ts]:n[ts],[Xo]:r[t]}},defineProperty(){xt(11)},getPrototypeOf(e){return io(e.base_)},setPrototypeOf(){xt(12)}},Jo={};for(let e in is){let t=is[e];Jo[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}Jo.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&xt(13),Jo.set.call(this,e,t,void 0)};Jo.set=function(e,t,r){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&xt(14),is.set.call(this,e[0],t,r,e[0])};function Cu(e,t){const r=e[dt];return(r?fr(r):e)[t]}function M$(e,t,r){const n=WP(t,r);return n?Xo in n?n[Xo]:n.get?.call(e.draft_):void 0}function WP(e,t){if(!(t in e))return;let r=io(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=io(r)}}function Tf(e){e.modified_||(e.modified_=!0,e.parent_&&Tf(e.parent_))}function Fa(e){e.copy_||(e.assigned_=new Map,e.copy_=Ef(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var j$=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(r,n,o)=>{if(dn(r)&&!dn(n)){const a=n;n=r;const s=this;return function(c=a,...u){return s.produce(c,f=>n.call(this,f,...u))}}dn(n)||xt(6),o!==void 0&&!dn(o)&&xt(7);let i;if(Bt(r)){const a=fg(this),s=Mf(a,r,void 0);let l=!0;try{i=n(s),l=!1}finally{l?Af(a):_f(a)}return ug(a,o),dg(i,a)}else if(!r||!ep(r)){if(i=n(r),i===void 0&&(i=r),i===RP&&(i=void 0),this.autoFreeze_&&rp(i,!0),o){const a=[],s=[];An(Cf).generateReplacementPatches_(r,i,{patches_:a,inversePatches_:s}),o(a,s)}return i}else xt(1,r)},this.produceWithPatches=(r,n)=>{if(dn(r))return(s,...l)=>this.produceWithPatches(s,c=>r(c,...l));let o,i;return[this.produce(r,n,(s,l)=>{o=s,i=l}),o,i]},Eu(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Eu(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Eu(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){Bt(t)||xt(8),gr(t)&&(t=zt(t));const r=fg(this),n=Mf(r,t,void 0);return n[dt].isManual_=!0,_f(r),n}finishDraft(t,r){const n=t&&t[dt];(!n||!n.isManual_)&&xt(9);const{scope_:o}=n;return ug(o,r),dg(void 0,o)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,r){let n;for(n=r.length-1;n>=0;n--){const i=r[n];if(i.path.length===0&&i.op==="replace"){t=i.value;break}}n>-1&&(r=r.slice(n+1));const o=An(Cf).applyPatches_;return gr(t)?o(t,r):this.produce(t,i=>o(i,r))}};function Mf(e,t,r,n){const[o,i]=cl(t)?An(ns).proxyMap_(t,r):ul(t)?An(ns).proxySet_(t,r):T$(t,r);return(r?.scope_??FP()).drafts_.push(o),i.callbacks_=r?.callbacks_??[],i.key_=n,r&&n!==void 0?A$(r,i,n):i.callbacks_.push(function(l){l.mapSetPlugin_?.fixSetContents(i);const{patchPlugin_:c}=l;i.modified_&&c&&c.generatePatches_(i,[],l)}),o}function zt(e){return gr(e)||xt(10,e),KP(e)}function KP(e){if(!Bt(e)||fl(e))return e;const t=e[dt];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Ef(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Ef(e,!0);return sl(r,(o,i)=>{rs(r,o,KP(i))},n),t&&(t.finalized_=!1),r}var k$=new j$,UP=k$.produce;function HP(e){return({dispatch:r,getState:n})=>o=>i=>typeof i=="function"?i(r,n,e):o(i)}var N$=HP(),I$=HP,D$=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Qa:Qa.apply(null,arguments)},R$=e=>e&&typeof e.match=="function";function It(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(process.env.NODE_ENV==="production"?me(0):"prepareAction did not return an object");return{type:e,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>Qd(n)&&n.type===e,r}function $$(e){return typeof e=="function"&&"type"in e&&R$(e)}function L$(e){const t=e?`${e}`.split("/"):[],r=t[t.length-1]||"actionCreator";return`Detected an action creator with type "${e||"unknown"}" being dispatched.
61
+ Make sure you're calling the action creator before dispatching, i.e. \`dispatch(${r}())\` instead of \`dispatch(${r})\`. This is necessary even if the action has no payload.`}function F$(e={}){if(process.env.NODE_ENV==="production")return()=>r=>n=>r(n);const{isActionCreator:t=$$}=e;return()=>r=>n=>(t(n)&&console.warn(L$(n.type)),r(n))}function GP(e,t){let r=0;return{measureTime(n){const o=Date.now();try{return n()}finally{const i=Date.now();r+=i-o}},warnIfExceeded(){r>e&&console.warn(`${t} took ${r}ms, which is more than the warning threshold of ${e}ms.
62
+ If 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.
63
+ It is disabled in production builds, so you don't need to worry about that.`)}}}var qP=class Wo extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Wo.prototype)}static get[Symbol.species](){return Wo}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Wo(...t[0].concat(this)):new Wo(...t.concat(this))}};function vg(e){return Bt(e)?UP(e,()=>{}):e}function va(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function z$(e){return typeof e!="object"||e==null||Object.isFrozen(e)}function B$(e,t,r){const n=YP(e,t,r);return{detectMutations(){return XP(e,t,n,r)}}}function YP(e,t=[],r,n="",o=new Set){const i={value:r};if(!e(r)&&!o.has(r)){o.add(r),i.children={};const a=t.length>0;for(const s in r){const l=n?n+"."+s:s;a&&t.some(u=>u instanceof RegExp?u.test(l):l===u)||(i.children[s]=YP(e,t,r[s],l))}}return i}function XP(e,t=[],r,n,o=!1,i=""){const a=r?r.value:void 0,s=a===n;if(o&&!s&&!Number.isNaN(n))return{wasMutated:!0,path:i};if(e(a)||e(n))return{wasMutated:!1};const l={};for(let u in r.children)l[u]=!0;for(let u in n)l[u]=!0;const c=t.length>0;for(let u in l){const f=i?i+"."+u:u;if(c&&t.some(g=>g instanceof RegExp?g.test(f):f===g))continue;const p=XP(e,t,r.children[u],n[u],s,f);if(p.wasMutated)return p}return{wasMutated:!1}}function V$(e={}){if(process.env.NODE_ENV==="production")return()=>t=>r=>t(r);{let t=function(s,l,c,u){return JSON.stringify(s,r(l,u),c)},r=function(s,l){let c=[],u=[];return l||(l=function(f,p){return c[0]===p?"[Circular ~]":"[Circular ~."+u.slice(0,c.indexOf(p)).join(".")+"]"}),function(f,p){if(c.length>0){var v=c.indexOf(this);~v?c.splice(v+1):c.push(this),~v?u.splice(v,1/0,f):u.push(f),~c.indexOf(p)&&(p=l.call(this,f,p))}else c.push(p);return s==null?p:s.call(this,f,p)}},{isImmutable:n=z$,ignoredPaths:o,warnAfter:i=32}=e;const a=B$.bind(null,n,o);return({getState:s})=>{let l=s(),c=a(l),u;return f=>p=>{const v=GP(i,"ImmutableStateInvariantMiddleware");v.measureTime(()=>{if(l=s(),u=c.detectMutations(),c=a(l),u.wasMutated)throw new Error(process.env.NODE_ENV==="production"?me(19):`A state mutation was detected between dispatches, in the path '${u.path||""}'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)});const g=f(p);return v.measureTime(()=>{if(l=s(),u=c.detectMutations(),c=a(l),u.wasMutated)throw new Error(process.env.NODE_ENV==="production"?me(20):`A state mutation was detected inside a dispatch, in the path: ${u.path||""}. Take a look at the reducer(s) handling the action ${t(p)}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)}),v.warnIfExceeded(),g}}}}function ZP(e){const t=typeof e;return e==null||t==="string"||t==="boolean"||t==="number"||Array.isArray(e)||wi(e)}function jf(e,t="",r=ZP,n,o=[],i){let a;if(!r(e))return{keyPath:t||"<root>",value:e};if(typeof e!="object"||e===null||i?.has(e))return!1;const s=n!=null?n(e):Object.entries(e),l=o.length>0;for(const[c,u]of s){const f=t?t+"."+c:c;if(!(l&&o.some(v=>v instanceof RegExp?v.test(f):f===v))){if(!r(u))return{keyPath:f,value:u};if(typeof u=="object"&&(a=jf(u,f,r,n,o,i),a))return a}}return i&&JP(e)&&i.add(e),!1}function JP(e){if(!Object.isFrozen(e))return!1;for(const t of Object.values(e))if(!(typeof t!="object"||t===null)&&!JP(t))return!1;return!0}function W$(e={}){if(process.env.NODE_ENV==="production")return()=>t=>r=>t(r);{const{isSerializable:t=ZP,getEntries:r,ignoredActions:n=[],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 f=>p=>v=>{if(!Qd(v))return p(v);const g=p(v),m=GP(a,"SerializableStateInvariantMiddleware");return!l&&!(n.length&&n.indexOf(v.type)!==-1)&&m.measureTime(()=>{const h=jf(v,"",t,r,o,u);if(h){const{keyPath:y,value:x}=h;console.error(`A non-serializable value was detected in an action, in the path: \`${y}\`. Value:`,x,`
64
+ Take a look at the logic that dispatched this action: `,v,`
65
+ (See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)`,`
66
+ (To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)`)}}),s||(m.measureTime(()=>{const h=f.getState(),y=jf(h,"",t,r,i,u);if(y){const{keyPath:x,value:w}=y;console.error(`A non-serializable value was detected in the state, in the path: \`${x}\`. Value:`,w,`
67
+ Take a look at the reducer(s) handling this action type: ${v.type}.
68
+ (See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),m.warnIfExceeded()),g}}}function ma(e){return typeof e=="boolean"}var K$=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=t??{};let a=new qP;if(r&&(ma(r)?a.push(N$):a.push(I$(r.extraArgument))),process.env.NODE_ENV!=="production"){if(n){let s={};ma(n)||(s=n),a.unshift(V$(s))}if(o){let s={};ma(o)||(s=o),a.push(W$(s))}if(i){let s={};ma(i)||(s=i),a.unshift(F$(s))}}return a},QP="RTK_autoBatch",Ee=()=>e=>({payload:e,meta:{[QP]:!0}}),mg=e=>t=>{setTimeout(t,e)},eS=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let o=!0,i=!1,a=!1;const s=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:mg(10):e.type==="callback"?e.queueNotification:mg(e.timeout),c=()=>{a=!1,i&&(i=!1,s.forEach(u=>u()))};return Object.assign({},n,{subscribe(u){const f=()=>o&&u(),p=n.subscribe(f);return s.add(u),()=>{p(),s.delete(u)}},dispatch(u){try{return o=!u?.meta?.[QP],i=!o,i&&(a||(a=!0,l(c))),n.dispatch(u)}finally{o=!0}}})},U$=e=>function(r){const{autoBatch:n=!0}=r??{};let o=new qP(e);return n&&o.push(eS(typeof n=="object"?n:void 0)),o};function H$(e){const t=K$(),{reducer:r=void 0,middleware:n,devTools:o=!0,duplicateMiddlewareCheck:i=!0,preloadedState:a=void 0,enhancers:s=void 0}=e||{};let l;if(typeof r=="function")l=r;else if(wi(r))l=DP(r);else throw new Error(process.env.NODE_ENV==="production"?me(1):"`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers");if(process.env.NODE_ENV!=="production"&&n&&typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?me(2):"`middleware` field must be a callback");let c;if(typeof n=="function"){if(c=n(t),process.env.NODE_ENV!=="production"&&!Array.isArray(c))throw new Error(process.env.NODE_ENV==="production"?me(3):"when using a middleware builder function, an array of middleware must be returned")}else c=t();if(process.env.NODE_ENV!=="production"&&c.some(m=>typeof m!="function"))throw new Error(process.env.NODE_ENV==="production"?me(4):"each middleware provided to configureStore must be a function");if(process.env.NODE_ENV!=="production"&&i){let m=new Set;c.forEach(h=>{if(m.has(h))throw new Error(process.env.NODE_ENV==="production"?me(42):"Duplicate middleware references found when creating the store. Ensure that each middleware is only included once.");m.add(h)})}let u=Qa;o&&(u=D$({trace:process.env.NODE_ENV!=="production",...typeof o=="object"&&o}));const f=g$(...c),p=U$(f);if(process.env.NODE_ENV!=="production"&&s&&typeof s!="function")throw new Error(process.env.NODE_ENV==="production"?me(5):"`enhancers` field must be a callback");let v=typeof s=="function"?s(p):p();if(process.env.NODE_ENV!=="production"&&!Array.isArray(v))throw new Error(process.env.NODE_ENV==="production"?me(6):"`enhancers` callback must return an array");if(process.env.NODE_ENV!=="production"&&v.some(m=>typeof m!="function"))throw new Error(process.env.NODE_ENV==="production"?me(7):"each enhancer provided to configureStore must be a function");process.env.NODE_ENV!=="production"&&c.length&&!v.includes(f)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");const g=u(...v);return IP(l,a,g)}function tS(e){const t={},r=[];let n;const o={addCase(i,a){if(process.env.NODE_ENV!=="production"){if(r.length>0)throw new Error(process.env.NODE_ENV==="production"?me(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(n)throw new Error(process.env.NODE_ENV==="production"?me(27):"`builder.addCase` should only be called before calling `builder.addDefaultCase`")}const s=typeof i=="string"?i:i.type;if(!s)throw new Error(process.env.NODE_ENV==="production"?me(28):"`builder.addCase` cannot be called with an empty action type");if(s in t)throw new Error(process.env.NODE_ENV==="production"?me(29):`\`builder.addCase\` cannot be called with two reducers for the same action type '${s}'`);return t[s]=a,o},addAsyncThunk(i,a){if(process.env.NODE_ENV!=="production"&&n)throw new Error(process.env.NODE_ENV==="production"?me(43):"`builder.addAsyncThunk` should only be called before calling `builder.addDefaultCase`");return a.pending&&(t[i.pending.type]=a.pending),a.rejected&&(t[i.rejected.type]=a.rejected),a.fulfilled&&(t[i.fulfilled.type]=a.fulfilled),a.settled&&r.push({matcher:i.settled,reducer:a.settled}),o},addMatcher(i,a){if(process.env.NODE_ENV!=="production"&&n)throw new Error(process.env.NODE_ENV==="production"?me(30):"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return r.push({matcher:i,reducer:a}),o},addDefaultCase(i){if(process.env.NODE_ENV!=="production"&&n)throw new Error(process.env.NODE_ENV==="production"?me(31):"`builder.addDefaultCase` can only be called once");return n=i,o}};return e(o),[t,r,n]}function G$(e){return typeof e=="function"}function q$(e,t){if(process.env.NODE_ENV!=="production"&&typeof t=="object")throw new Error(process.env.NODE_ENV==="production"?me(8):"The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");let[r,n,o]=tS(t),i;if(G$(e))i=()=>vg(e());else{const s=vg(e);i=()=>s}function a(s=i(),l){let c=[r[l.type],...n.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[o]),c.reduce((u,f)=>{if(f)if(gr(u)){const v=f(u,l);return v===void 0?u:v}else{if(Bt(u))return UP(u,p=>f(p,l));{const p=f(u,l);if(p===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return p}}return u},s)}return a.getInitialState=i,a}var Y$="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",X$=(e=21)=>{let t="",r=e;for(;r--;)t+=Y$[Math.random()*64|0];return t},Z$=Symbol.for("rtk-slice-createasyncthunk");function J$(e,t){return`${e}/${t}`}function Q$({creators:e}={}){const t=e?.asyncThunk?.[Z$];return function(n){const{name:o,reducerPath:i=o}=n;if(!o)throw new Error(process.env.NODE_ENV==="production"?me(11):"`name` is a required option for createSlice");typeof process<"u"&&process.env.NODE_ENV==="development"&&n.initialState===void 0&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");const a=(typeof n.reducers=="function"?n.reducers(t2()):n.reducers)||{},s=Object.keys(a),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(w,P){const O=typeof w=="string"?w:w.type;if(!O)throw new Error(process.env.NODE_ENV==="production"?me(12):"`context.addCase` cannot be called with an empty action type");if(O in l.sliceCaseReducersByType)throw new Error(process.env.NODE_ENV==="production"?me(13):"`context.addCase` cannot be called with two reducers for the same action type: "+O);return l.sliceCaseReducersByType[O]=P,c},addMatcher(w,P){return l.sliceMatchers.push({matcher:w,reducer:P}),c},exposeAction(w,P){return l.actionCreators[w]=P,c},exposeCaseReducer(w,P){return l.sliceCaseReducersByName[w]=P,c}};s.forEach(w=>{const P=a[w],O={reducerName:w,type:J$(o,w),createNotation:typeof n.reducers=="function"};n2(P)?i2(O,P,c,t):r2(O,P,c)});function u(){if(process.env.NODE_ENV!=="production"&&typeof n.extraReducers=="object")throw new Error(process.env.NODE_ENV==="production"?me(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[w={},P=[],O=void 0]=typeof n.extraReducers=="function"?tS(n.extraReducers):[n.extraReducers],S={...w,...l.sliceCaseReducersByType};return q$(n.initialState,E=>{for(let C in S)E.addCase(C,S[C]);for(let C of l.sliceMatchers)E.addMatcher(C.matcher,C.reducer);for(let C of P)E.addMatcher(C.matcher,C.reducer);O&&E.addDefaultCase(O)})}const f=w=>w,p=new Map,v=new WeakMap;let g;function m(w,P){return g||(g=u()),g(w,P)}function h(){return g||(g=u()),g.getInitialState()}function y(w,P=!1){function O(E){let C=E[w];if(typeof C>"u"){if(P)C=va(v,O,h);else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?me(15):"selectSlice returned undefined for an uninjected slice reducer")}return C}function S(E=f){const C=va(p,P,()=>new WeakMap);return va(C,E,()=>{const j={};for(const[D,R]of Object.entries(n.selectors??{}))j[D]=e2(R,E,()=>va(v,E,h),P);return j})}return{reducerPath:w,getSelectors:S,get selectors(){return S(O)},selectSlice:O}}const x={name:o,reducer:m,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:h,...y(i),injectInto(w,{reducerPath:P,...O}={}){const S=P??i;return w.inject({reducerPath:S,reducer:m},O),{...x,...y(S,!0)}}};return x}}function e2(e,t,r,n){function o(i,...a){let s=t(i);if(typeof s>"u"){if(n)s=r();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?me(16):"selectState returned undefined for an uninjected slice reducer")}return e(s,...a)}return o.unwrapped=e,o}var gt=Q$();function t2(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function r2({type:e,reducerName:t,createNotation:r},n,o){let i,a;if("reducer"in n){if(r&&!o2(n))throw new Error(process.env.NODE_ENV==="production"?me(17):"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");i=n.reducer,a=n.prepare}else i=n;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,a?It(e,a):It(e))}function n2(e){return e._reducerDefinitionType==="asyncThunk"}function o2(e){return e._reducerDefinitionType==="reducerWithPrepare"}function i2({type:e,reducerName:t},r,n,o){if(!o)throw new Error(process.env.NODE_ENV==="production"?me(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}=r,f=o(e,i,u);n.exposeAction(t,f),a&&n.addCase(f.fulfilled,a),s&&n.addCase(f.pending,s),l&&n.addCase(f.rejected,l),c&&n.addMatcher(f.settled,c),n.exposeCaseReducer(t,{fulfilled:a||ha,pending:s||ha,rejected:l||ha,settled:c||ha})}function ha(){}var a2="task",rS="listener",nS="completed",np="cancelled",s2=`task-${np}`,l2=`task-${nS}`,kf=`${rS}-${np}`,c2=`${rS}-${nS}`,pl=class{constructor(e){this.code=e,this.message=`${a2} ${np} (reason: ${e})`}name="TaskAbortError";message},op=(e,t)=>{if(typeof e!="function")throw new TypeError(process.env.NODE_ENV==="production"?me(32):`${t} is not a function`)},as=()=>{},oS=(e,t=as)=>(e.catch(t),e),iS=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),bn=e=>{if(e.aborted)throw new pl(e.reason)};function aS(e,t){let r=as;return new Promise((n,o)=>{const i=()=>o(new pl(e.reason));if(e.aborted){i();return}r=iS(e,i),t.finally(()=>r()).then(n,o)}).finally(()=>{r=as})}var u2=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof pl?"cancelled":"rejected",error:r}}finally{t?.()}},ss=e=>t=>oS(aS(e,t).then(r=>(bn(e),r))),sS=e=>{const t=ss(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:ro}=Object,hg={},Si="listenerMiddleware",f2=(e,t)=>{const r=n=>iS(e,()=>n.abort(e.reason));return(n,o)=>{op(n,"taskExecutor");const i=new AbortController;r(i);const a=u2(async()=>{bn(e),bn(i.signal);const s=await n({pause:ss(i.signal),delay:sS(i.signal),signal:i.signal});return bn(i.signal),s},()=>i.abort(l2));return o?.autoJoin&&t.push(a.catch(as)),{result:ss(e)(a),cancel(){i.abort(s2)}}}},d2=(e,t)=>{const r=async(n,o)=>{bn(t);let i=()=>{};const s=[new Promise((l,c)=>{let u=e({predicate:n,effect:(f,p)=>{p.unsubscribe(),l([f,p.getState(),p.getOriginalState()])}});i=()=>{u(),c()}})];o!=null&&s.push(new Promise(l=>setTimeout(l,o,null)));try{const l=await aS(t,Promise.race(s));return bn(t),l}finally{i()}};return(n,o)=>oS(r(n,o))},lS=e=>{let{type:t,actionCreator:r,matcher:n,predicate:o,effect:i}=e;if(t)o=It(t).match;else if(r)t=r.type,o=r.match;else if(n)o=n;else if(!o)throw new Error(process.env.NODE_ENV==="production"?me(21):"Creating or removing a listener requires one of the known fields for matching an action");return op(i,"options.listener"),{predicate:o,type:t,effect:i}},cS=ro(e=>{const{type:t,predicate:r,effect:n}=lS(e);return{id:X$(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(process.env.NODE_ENV==="production"?me(22):"Unsubscribe not initialized")}}},{withTypes:()=>cS}),gg=(e,t)=>{const{type:r,effect:n,predicate:o}=lS(t);return Array.from(e.values()).find(i=>(typeof r=="string"?i.type===r:i.predicate===o)&&i.effect===n)},Nf=e=>{e.pending.forEach(t=>{t.abort(kf)})},p2=(e,t)=>()=>{for(const r of t.keys())Nf(r);e.clear()},yg=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},uS=ro(It(`${Si}/add`),{withTypes:()=>uS}),v2=It(`${Si}/removeAll`),fS=ro(It(`${Si}/remove`),{withTypes:()=>fS}),m2=(...e)=>{console.error(`${Si}/error`,...e)},Oi=(e={})=>{const t=new Map,r=new Map,n=v=>{const g=r.get(v)??0;r.set(v,g+1)},o=v=>{const g=r.get(v)??1;g===1?r.delete(v):r.set(v,g-1)},{extra:i,onError:a=m2}=e;op(a,"onError");const s=v=>(v.unsubscribe=()=>t.delete(v.id),t.set(v.id,v),g=>{v.unsubscribe(),g?.cancelActive&&Nf(v)}),l=v=>{const g=gg(t,v)??cS(v);return s(g)};ro(l,{withTypes:()=>l});const c=v=>{const g=gg(t,v);return g&&(g.unsubscribe(),v.cancelActive&&Nf(g)),!!g};ro(c,{withTypes:()=>c});const u=async(v,g,m,h)=>{const y=new AbortController,x=d2(l,y.signal),w=[];try{v.pending.add(y),n(v),await Promise.resolve(v.effect(g,ro({},m,{getOriginalState:h,condition:(P,O)=>x(P,O).then(Boolean),take:x,delay:sS(y.signal),pause:ss(y.signal),extra:i,signal:y.signal,fork:f2(y.signal,w),unsubscribe:v.unsubscribe,subscribe:()=>{t.set(v.id,v)},cancelActiveListeners:()=>{v.pending.forEach((P,O,S)=>{P!==y&&(P.abort(kf),S.delete(P))})},cancel:()=>{y.abort(kf),v.pending.delete(y)},throwIfCancelled:()=>{bn(y.signal)}})))}catch(P){P instanceof pl||yg(a,P,{raisedBy:"effect"})}finally{await Promise.all(w),y.abort(c2),o(v),v.pending.delete(y)}},f=p2(t,r);return{middleware:v=>g=>m=>{if(!Qd(m))return g(m);if(uS.match(m))return l(m.payload);if(v2.match(m)){f();return}if(fS.match(m))return c(m.payload);let h=v.getState();const y=()=>{if(h===hg)throw new Error(process.env.NODE_ENV==="production"?me(23):`${Si}: getOriginalState can only be called synchronously`);return h};let x;try{if(x=g(m),t.size>0){const w=v.getState(),P=Array.from(t.values());for(const O of P){let S=!1;try{S=O.predicate(m,w,h)}catch(E){S=!1,yg(a,E,{raisedBy:"predicate"})}S&&u(O,m,v,y)}}}finally{h=hg}return x},startListening:l,stopListening:c,clearListeners:f}};function me(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 h2={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},dS=gt({name:"chartLayout",initialState:h2,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 r,n,o,i;e.margin.top=(r=t.payload.top)!==null&&r!==void 0?r:0,e.margin.right=(n=t.payload.right)!==null&&n!==void 0?n:0,e.margin.bottom=(o=t.payload.bottom)!==null&&o!==void 0?o:0,e.margin.left=(i=t.payload.left)!==null&&i!==void 0?i:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:g2,setLayout:y2,setChartSize:b2,setScale:x2}=dS.actions,w2=dS.reducer;function pS(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function ce(e){return Number.isFinite(e)}function ir(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function bg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Jn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bg(Object(r),!0).forEach(function(n){P2(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function P2(e,t,r){return(t=S2(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function S2(e){var t=O2(e,"string");return typeof t=="symbol"?t:t+""}function O2(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function be(e,t,r){return _e(e)||_e(t)?r:or(t)?En(e,t,r):typeof t=="function"?t(e):r}var E2=(e,t,r)=>{if(t&&r){var{width:n,height:o}=r,{align:i,verticalAlign:a,layout:s}=t;if((s==="vertical"||s==="horizontal"&&a==="middle")&&i!=="center"&&q(e[i]))return Jn(Jn({},e),{},{[i]:e[i]+(n||0)});if((s==="horizontal"||s==="vertical"&&i==="center")&&a!=="middle"&&q(e[a]))return Jn(Jn({},e),{},{[a]:e[a]+(o||0)})}return e},Ar=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",vS=(e,t,r,n)=>{if(n)return e.map(s=>s.coordinate);var o,i,a=e.map(s=>(s.coordinate===t&&(o=!0),s.coordinate===r&&(i=!0),s.coordinate));return o||a.push(t),i||a.push(r),a},mS=(e,t,r)=>{if(!e)return null;var{duplicateDomain:n,type:o,range:i,scale:a,realScaleType:s,isCategorical:l,categoricalDomain:c,tickCount:u,ticks:f,niceTicks:p,axisType:v}=e;if(!a)return null;var g=s==="scaleBand"&&a.bandwidth?a.bandwidth()/2:2,m=o==="category"&&a.bandwidth?a.bandwidth()/g:0;if(m=v==="angleAxis"&&i&&i.length>=2?He(i[0]-i[1])*2*m:m,f||p){var h=(f||p||[]).map((y,x)=>{var w=n?n.indexOf(y):y,P=a.map(w);return ce(P)?{coordinate:P+m,value:y,offset:m,index:x}:null}).filter(mt);return h}return l&&c?c.map((y,x)=>{var w=a.map(y);return ce(w)?{coordinate:w+m,value:y,index:x,offset:m}:null}).filter(mt):a.ticks&&u!=null?a.ticks(u).map((y,x)=>{var w=a.map(y);return ce(w)?{coordinate:w+m,value:y,index:x,offset:m}:null}).filter(mt):a.domain().map((y,x)=>{var w=a.map(y);return ce(w)?{coordinate:w+m,value:n?n[y]:y,index:x,offset:m}:null}).filter(mt)},C2=(e,t)=>{if(!t||t.length!==2||!q(t[0])||!q(t[1]))return e;var r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]),o=[e[0],e[1]];return(!q(e[0])||e[0]<r)&&(o[0]=r),(!q(e[1])||e[1]>n)&&(o[1]=n),o[0]>n&&(o[0]=n),o[1]<r&&(o[1]=r),o},A2=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var o=0;o<n;++o)for(var i=0,a=0,s=0;s<r;++s){var l=e[s],c=l?.[o];if(c!=null){var u=c[1],f=c[0],p=nr(u)?f:u;p>=0?(c[0]=i,i+=p,c[1]=i):(c[0]=a,a+=p,c[1]=a)}}}},_2=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var o=0;o<n;++o)for(var i=0,a=0;a<r;++a){var s=e[a],l=s?.[o];if(l!=null){var c=nr(l[1])?l[0]:l[1];c>=0?(l[0]=i,i+=c,l[1]=i):(l[0]=0,l[1]=0)}}}},T2={sign:A2,expand:kD,none:On,silhouette:ND,wiggle:ID,positive:_2},M2=(e,t,r)=>{var n,o=(n=T2[r])!==null&&n!==void 0?n:On,i=jD().keys(t).value((s,l)=>Number(be(s,l,0))).order(wf).offset(o),a=i(e);return a.forEach((s,l)=>{s.forEach((c,u)=>{var f=be(e[u],t[l],0);Array.isArray(f)&&f.length===2&&q(f[0])&&q(f[1])&&(c[0]=f[0],c[1]=f[1])})}),a};function j2(e){return e==null?void 0:String(e)}function xg(e){var{axis:t,ticks:r,bandSize:n,entry:o,index:i,dataKey:a}=e;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!_e(o[t.dataKey])){var s=hP(r,"value",o[t.dataKey]);if(s)return s.coordinate+n/2}return r!=null&&r[i]?r[i].coordinate+n/2:null}var l=be(o,_e(a)?t.dataKey:a),c=t.scale.map(l);return q(c)?c:null}var wg=e=>{var{axis:t,ticks:r,offset:n,bandSize:o,entry:i,index:a}=e;if(t.type==="category")return r[a]?r[a].coordinate+n:null;var s=be(i,t.dataKey,t.scale.domain()[a]);if(_e(s))return null;var l=t.scale.map(s);return q(l)?l-o/2+n:null},k2=e=>{var{numericAxis:t}=e,r=t.scale.domain();if(t.type==="number"){var n=Math.min(r[0],r[1]),o=Math.max(r[0],r[1]);return n<=0&&o>=0?0:o<0?o:n}return r[0]},N2=e=>{var t=e.flat(2).filter(q);return[Math.min(...t),Math.max(...t)]},I2=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],D2=(e,t,r)=>{if(e!=null)return I2(Object.keys(e).reduce((n,o)=>{var i=e[o];if(!i)return n;var{stackedData:a}=i,s=a.reduce((l,c)=>{var u=pS(c,t,r),f=N2(u);return!ce(f[0])||!ce(f[1])?l:[Math.min(l[0],f[0]),Math.max(l[1],f[1])]},[1/0,-1/0]);return[Math.min(s[0],n[0]),Math.max(s[1],n[1])]},[1/0,-1/0]))},Pg=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Sg=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,ao=(e,t,r)=>{if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&t&&t.length>=2){for(var o=il(t,u=>u.coordinate),i=1/0,a=1,s=o.length;a<s;a++){var l=o[a],c=o[a-1];i=Math.min((l?.coordinate||0)-(c?.coordinate||0),i)}return i===1/0?0:i}return r?void 0:0};function Og(e){var{tooltipEntrySettings:t,dataKey:r,payload:n,value:o,name:i}=e;return Jn(Jn({},t),{},{dataKey:r,payload:n,value:o,name:i})}function yo(e,t){if(e)return String(e);if(typeof t=="string")return t}var R2=(e,t)=>{if(t==="horizontal")return e.chartX;if(t==="vertical")return e.chartY},$2=(e,t)=>t==="centric"?e.angle:e.radius,_r=e=>e.layout.width,Tr=e=>e.layout.height,L2=e=>e.layout.scale,hS=e=>e.layout.margin,vl=M(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),ml=M(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),gS="data-recharts-item-index",yS="data-recharts-item-id",Ei=60;function Eg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ga(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Eg(Object(r),!0).forEach(function(n){F2(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Eg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function F2(e,t,r){return(t=z2(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function z2(e){var t=B2(e,"string");return typeof t=="symbol"?t:t+""}function B2(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var V2=e=>e.brush.height;function W2(e){var t=ml(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var o=typeof n.width=="number"?n.width:Ei;return r+o}return r},0)}function K2(e){var t=ml(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var o=typeof n.width=="number"?n.width:Ei;return r+o}return r},0)}function U2(e){var t=vl(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function H2(e){var t=vl(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var ze=M([_r,Tr,hS,V2,W2,K2,U2,H2,kP,i$],(e,t,r,n,o,i,a,s,l,c)=>{var u={left:(r.left||0)+o,right:(r.right||0)+i},f={top:(r.top||0)+a,bottom:(r.bottom||0)+s},p=ga(ga({},f),u),v=p.bottom;p.bottom+=n,p=E2(p,l,c);var g=e-p.left-p.right,m=t-p.top-p.bottom;return ga(ga({brushBottom:v},p),{},{width:Math.max(g,0),height:Math.max(m,0)})}),G2=M(ze,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),ip=M(_r,Tr,(e,t)=>({x:0,y:0,width:e,height:t})),q2=A.createContext(null),at=()=>A.useContext(q2)!=null,hl=e=>e.brush,gl=M([hl,ze,hS],(e,t,r)=>({height:e.height,x:q(e.x)?e.x:t.left,y:q(e.y)?e.y:t.top+t.height+t.brushBottom-(r?.bottom||0),width:q(e.width)?e.width:t.width})),Au={},_u={},Tu={},Cg;function Y2(){return Cg||(Cg=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n,{signal:o,edges:i}={}){let a,s=null;const l=i!=null&&i.includes("leading"),c=i==null||i.includes("trailing"),u=()=>{s!==null&&(r.apply(a,s),a=void 0,s=null)},f=()=>{c&&u(),m()};let p=null;const v=()=>{p!=null&&clearTimeout(p),p=setTimeout(()=>{p=null,f()},n)},g=()=>{p!==null&&(clearTimeout(p),p=null)},m=()=>{g(),a=void 0,s=null},h=()=>{u()},y=function(...x){if(o?.aborted)return;a=this,s=x;const w=p==null;v(),l&&w&&u()};return y.schedule=v,y.cancel=m,y.flush=h,o?.addEventListener("abort",m,{once:!0}),y}e.debounce=t})(Tu)),Tu}var Ag;function X2(){return Ag||(Ag=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Y2();function r(n,o=0,i={}){typeof i!="object"&&(i={});const{leading:a=!1,trailing:s=!0,maxWait:l}=i,c=Array(2);a&&(c[0]="leading"),s&&(c[1]="trailing");let u,f=null;const p=t.debounce(function(...m){u=n.apply(this,m),f=null},o,{edges:c}),v=function(...m){return l!=null&&(f===null&&(f=Date.now()),Date.now()-f>=l)?(u=n.apply(this,m),f=Date.now(),p.cancel(),p.schedule(),u):(p.apply(this,m),u)},g=()=>(p.flush(),u);return v.cancel=p.cancel,v.flush=g,v}e.debounce=r})(_u)),_u}var _g;function Z2(){return _g||(_g=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=X2();function r(n,o=0,i={}){const{leading:a=!0,trailing:s=!0}=i;return t.debounce(n,o,{leading:a,maxWait:o,trailing:s})}e.throttle=r})(Au)),Au}var Mu,Tg;function J2(){return Tg||(Tg=1,Mu=Z2().throttle),Mu}var Q2=J2();const eL=Zr(Q2);var ls=function(t,r){for(var n=arguments.length,o=new Array(n>2?n-2:0),i=2;i<n;i++)o[i-2]=arguments[i];if(typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var a=0;console.warn(r.replace(/%s/g,()=>o[a++]))}},Jt={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},bS=(e,t,r)=>{var{width:n=Jt.width,height:o=Jt.height,aspect:i,maxHeight:a}=r,s=Cn(n)?e:Number(n),l=Cn(o)?t:Number(o);return i&&i>0&&(s?l=s/i:l&&(s=l*i),a&&l!=null&&l>a&&(l=a)),{calculatedWidth:s,calculatedHeight:l}},tL={width:0,height:0,overflow:"visible"},rL={width:0,overflowX:"visible"},nL={height:0,overflowY:"visible"},oL={},iL=e=>{var{width:t,height:r}=e,n=Cn(t),o=Cn(r);return n&&o?tL:n?rL:o?nL:oL};function aL(e){var{width:t,height:r,aspect:n}=e,o=t,i=r;return o===void 0&&i===void 0?(o=Jt.width,i=Jt.height):o===void 0?o=n&&n>0?void 0:Jt.width:i===void 0&&(i=n&&n>0?void 0:Jt.height),{width:o,height:i}}function If(){return If=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},If.apply(null,arguments)}function Mg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function jg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Mg(Object(r),!0).forEach(function(n){sL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sL(e,t,r){return(t=lL(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lL(e){var t=cL(e,"string");return typeof t=="symbol"?t:t+""}function cL(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xS=A.createContext(Jt.initialDimension);function uL(e){return ir(e.width)&&ir(e.height)}function wS(e){var{children:t,width:r,height:n}=e,o=A.useMemo(()=>({width:r,height:n}),[r,n]);return uL(o)?d.createElement(xS.Provider,{value:o},t):null}var ap=()=>A.useContext(xS),fL=A.forwardRef((e,t)=>{var{aspect:r,initialDimension:n=Jt.initialDimension,width:o,height:i,minWidth:a=Jt.minWidth,minHeight:s,maxHeight:l,children:c,debounce:u=Jt.debounce,id:f,className:p,onResize:v,style:g={}}=e,m=A.useRef(null),h=A.useRef();h.current=v,A.useImperativeHandle(t,()=>m.current);var[y,x]=A.useState({containerWidth:n.width,containerHeight:n.height}),w=A.useCallback((C,j)=>{x(D=>{var R=Math.round(C),_=Math.round(j);return D.containerWidth===R&&D.containerHeight===_?D:{containerWidth:R,containerHeight:_}})},[]);A.useEffect(()=>{if(m.current==null||typeof ResizeObserver>"u")return $n;var C=_=>{var k,I=_[0];if(I!=null){var{width:V,height:z}=I.contentRect;w(V,z),(k=h.current)===null||k===void 0||k.call(h,V,z)}};u>0&&(C=eL(C,u,{trailing:!0,leading:!1}));var j=new ResizeObserver(C),{width:D,height:R}=m.current.getBoundingClientRect();return w(D,R),j.observe(m.current),()=>{j.disconnect()}},[w,u]);var{containerWidth:P,containerHeight:O}=y;ls(!r||r>0,"The aspect(%s) must be greater than zero.",r);var{calculatedWidth:S,calculatedHeight:E}=bS(P,O,{width:o,height:i,aspect:r,maxHeight:l});return ls(S!=null&&S>0||E!=null&&E>0,`The width(%s) and height(%s) of chart should be greater than 0,
69
+ please check the style of container, or the props width(%s) and height(%s),
70
+ or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
71
+ height and width.`,S,E,o,i,a,s,r),d.createElement("div",{id:f?"".concat(f):void 0,className:fe("recharts-responsive-container",p),style:jg(jg({},g),{},{width:o,height:i,minWidth:a,minHeight:s,maxHeight:l}),ref:m},d.createElement("div",{style:iL({width:o,height:i})},d.createElement(wS,{width:S,height:E},c)))}),sp=A.forwardRef((e,t)=>{var r=ap();if(ir(r.width)&&ir(r.height))return e.children;var{width:n,height:o}=aL({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:i,calculatedHeight:a}=bS(void 0,void 0,{width:n,height:o,aspect:e.aspect,maxHeight:e.maxHeight});return q(i)&&q(a)?d.createElement(wS,{width:i,height:a},e.children):d.createElement(fL,If({},e,{width:n,height:o,ref:t}))});function lp(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 yl=()=>{var e,t=at(),r=J(G2),n=J(gl),o=(e=J(hl))===null||e===void 0?void 0:e.padding;return!t||!n||!o?r:{width:n.width-o.left-o.right,height:n.height-o.top-o.bottom,x:o.left,y:o.top}},dL={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},PS=()=>{var e;return(e=J(ze))!==null&&e!==void 0?e:dL},cp=()=>J(_r),up=()=>J(Tr),pL=()=>J(e=>e.layout.margin),ve=e=>e.layout.layoutType,Ln=()=>J(ve),SS=()=>{var e=Ln();if(e==="horizontal"||e==="vertical")return e},OS=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},vL=()=>{var e=Ln();return e!==void 0},Ci=e=>{var t=Pe(),r=at(),{width:n,height:o}=e,i=ap(),a=n,s=o;return i&&(a=i.width>0?i.width:n,s=i.height>0?i.height:o),A.useEffect(()=>{!r&&ir(a)&&ir(s)&&t(b2({width:a,height:s}))},[t,r,a,s]),null},ES=Symbol.for("immer-nothing"),kg=Symbol.for("immer-draftable"),At=Symbol.for("immer-state"),mL=process.env.NODE_ENV!=="production"?[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 vt(e,...t){if(process.env.NODE_ENV!=="production"){const r=mL[e],n=typeof r=="function"?r.apply(null,t):r;throw new Error(`[Immer] ${n}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Qo=Object.getPrototypeOf;function so(e){return!!e&&!!e[At]}function _n(e){return e?CS(e)||Array.isArray(e)||!!e[kg]||!!e.constructor?.[kg]||Ai(e)||xl(e):!1}var hL=Object.prototype.constructor.toString(),Ng=new WeakMap;function CS(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(r===Object)return!0;if(typeof r!="function")return!1;let n=Ng.get(r);return n===void 0&&(n=Function.toString.call(r),Ng.set(r,n)),n===hL}function cs(e,t,r=!0){bl(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(o=>{t(o,e[o],e)}):e.forEach((n,o)=>t(o,n,e))}function bl(e){const t=e[At];return t?t.type_:Array.isArray(e)?1:Ai(e)?2:xl(e)?3:0}function Df(e,t){return bl(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function AS(e,t,r){const n=bl(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function gL(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Ai(e){return e instanceof Map}function xl(e){return e instanceof Set}function un(e){return e.copy_||e.base_}function Rf(e,t){if(Ai(e))return new Map(e);if(xl(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=CS(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[At];let o=Reflect.ownKeys(n);for(let i=0;i<o.length;i++){const a=o[i],s=n[a];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(n[a]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[a]})}return Object.create(Qo(e),n)}else{const n=Qo(e);if(n!==null&&r)return{...e};const o=Object.create(n);return Object.assign(o,e)}}function fp(e,t=!1){return wl(e)||so(e)||!_n(e)||(bl(e)>1&&Object.defineProperties(e,{set:ya,add:ya,clear:ya,delete:ya}),Object.freeze(e),t&&Object.values(e).forEach(r=>fp(r,!0))),e}function yL(){vt(2)}var ya={value:yL};function wl(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var bL={};function Tn(e){const t=bL[e];return t||vt(0,e),t}var ei;function _S(){return ei}function xL(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Ig(e,t){t&&(Tn("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function $f(e){Lf(e),e.drafts_.forEach(wL),e.drafts_=null}function Lf(e){e===ei&&(ei=e.parent_)}function Dg(e){return ei=xL(ei,e)}function wL(e){const t=e[At];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Rg(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[At].modified_&&($f(t),vt(4)),_n(e)&&(e=us(t,e),t.parent_||fs(t,e)),t.patches_&&Tn("Patches").generateReplacementPatches_(r[At].base_,e,t.patches_,t.inversePatches_)):e=us(t,r,[]),$f(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ES?e:void 0}function us(e,t,r){if(wl(t))return t;const n=e.immer_.shouldUseStrictIteration(),o=t[At];if(!o)return cs(t,(i,a)=>$g(e,o,t,i,a,r),n),t;if(o.scope_!==e)return t;if(!o.modified_)return fs(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;const i=o.copy_;let a=i,s=!1;o.type_===3&&(a=new Set(i),i.clear(),s=!0),cs(a,(l,c)=>$g(e,o,i,l,c,r,s),n),fs(e,i,!1),r&&e.patches_&&Tn("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function $g(e,t,r,n,o,i,a){if(o==null||typeof o!="object"&&!a)return;const s=wl(o);if(!(s&&!a)){if(process.env.NODE_ENV!=="production"&&o===r&&vt(5),so(o)){const l=i&&t&&t.type_!==3&&!Df(t.assigned_,n)?i.concat(n):void 0,c=us(e,o,l);if(AS(r,n,c),so(c))e.canAutoFreeze_=!1;else return}else a&&r.add(o);if(_n(o)&&!s){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===o&&s)return;us(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(Ai(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&fs(e,o)}}}function fs(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&fp(t,r)}function PL(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:_S(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=n,i=dp;r&&(o=[n],i=ti);const{revoke:a,proxy:s}=Proxy.revocable(o,i);return n.draft_=s,n.revoke_=a,s}var dp={get(e,t){if(t===At)return e;const r=un(e);if(!Df(r,t))return SL(e,r,t);const n=r[t];return e.finalized_||!_n(n)?n:n===ju(e.base_,t)?(ku(e),e.copy_[t]=zf(n,e)):n},has(e,t){return t in un(e)},ownKeys(e){return Reflect.ownKeys(un(e))},set(e,t,r){const n=TS(un(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const o=ju(un(e),t),i=o?.[At];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(gL(r,o)&&(r!==void 0||Df(e.base_,t)))return!0;ku(e),Ff(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return ju(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,ku(e),Ff(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=un(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){vt(11)},getPrototypeOf(e){return Qo(e.base_)},setPrototypeOf(){vt(12)}},ti={};cs(dp,(e,t)=>{ti[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});ti.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&vt(13),ti.set.call(this,e,t,void 0)};ti.set=function(e,t,r){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&vt(14),dp.set.call(this,e[0],t,r,e[0])};function ju(e,t){const r=e[At];return(r?un(r):e)[t]}function SL(e,t,r){const n=TS(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function TS(e,t){if(!(t in e))return;let r=Qo(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Qo(r)}}function Ff(e){e.modified_||(e.modified_=!0,e.parent_&&Ff(e.parent_))}function ku(e){e.copy_||(e.copy_=Rf(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var OL=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){const i=r;r=t;const a=this;return function(l=i,...c){return a.produce(l,u=>r.call(this,u,...c))}}typeof r!="function"&&vt(6),n!==void 0&&typeof n!="function"&&vt(7);let o;if(_n(t)){const i=Dg(this),a=zf(t,void 0);let s=!0;try{o=r(a),s=!1}finally{s?$f(i):Lf(i)}return Ig(i,n),Rg(o,i)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===ES&&(o=void 0),this.autoFreeze_&&fp(o,!0),n){const i=[],a=[];Tn("Patches").generateReplacementPatches_(t,o,i,a),n(i,a)}return o}else vt(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(a,...s)=>this.produceWithPatches(a,l=>t(l,...s));let n,o;return[this.produce(t,r,(a,s)=>{n=a,o=s}),n,o]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof e?.useStrictIteration=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){_n(e)||vt(8),so(e)&&(e=EL(e));const t=Dg(this),r=zf(e,void 0);return r[At].isManual_=!0,Lf(t),r}finishDraft(e,t){const r=e&&e[At];(!r||!r.isManual_)&&vt(9);const{scope_:n}=r;return Ig(n,t),Rg(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));const n=Tn("Patches").applyPatches_;return so(e)?n(e,t):this.produce(e,o=>n(o,t))}};function zf(e,t){const r=Ai(e)?Tn("MapSet").proxyMap_(e,t):xl(e)?Tn("MapSet").proxySet_(e,t):PL(e,t);return(t?t.scope_:_S()).drafts_.push(r),r}function EL(e){return so(e)||vt(10,e),MS(e)}function MS(e){if(!_n(e)||wl(e))return e;const t=e[At];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Rf(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Rf(e,!0);return cs(r,(o,i)=>{AS(r,o,MS(i))},n),t&&(t.finalized_=!1),r}var CL=new OL;CL.produce;var AL={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},jS=gt({name:"legend",initialState:AL,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:Ee()},replaceLegendPayload:{reducer(e,t){var{prev:r,next:n}=t.payload,o=zt(e).payload.indexOf(r);o>-1&&(e.payload[o]=n)},prepare:Ee()},removeLegendPayload:{reducer(e,t){var r=zt(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:Ee()}}}),{setLegendSize:Lg,setLegendSettings:_L,addLegendPayload:kS,replaceLegendPayload:NS,removeLegendPayload:IS}=jS.actions,TL=jS.reducer,ML=["contextPayload"];function Bf(){return Bf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Bf.apply(null,arguments)}function Fg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function lo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Fg(Object(r),!0).forEach(function(n){jL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jL(e,t,r){return(t=kL(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kL(e){var t=NL(e,"string");return typeof t=="symbol"?t:t+""}function NL(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function IL(e,t){if(e==null)return{};var r,n,o=DL(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function DL(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function RL(e){return e.value}function $L(e){var{contextPayload:t}=e,r=IL(e,ML),n=AP(t,e.payloadUniqBy,RL),o=lo(lo({},r),{},{payload:n});return d.isValidElement(e.content)?d.cloneElement(e.content,o):typeof e.content=="function"?d.createElement(e.content,o):d.createElement(cR,o)}function LL(e,t,r,n,o,i){var{layout:a,align:s,verticalAlign:l}=t,c,u;return(!e||(e.left===void 0||e.left===null)&&(e.right===void 0||e.right===null))&&(s==="center"&&a==="vertical"?c={left:((n||0)-i.width)/2}:c=s==="right"?{right:r&&r.right||0}:{left:r&&r.left||0}),(!e||(e.top===void 0||e.top===null)&&(e.bottom===void 0||e.bottom===null))&&(l==="middle"?u={top:((o||0)-i.height)/2}:u=l==="bottom"?{bottom:r&&r.bottom||0}:{top:r&&r.top||0}),lo(lo({},c),u)}function FL(e){var t=Pe();return A.useEffect(()=>{t(_L(e))},[t,e]),null}function zL(e){var t=Pe();return A.useEffect(()=>(t(Lg(e)),()=>{t(Lg({width:0,height:0}))}),[t,e]),null}function BL(e,t,r,n){return e==="vertical"&&t!=null?{height:t}:e==="horizontal"?{width:r||n}:null}var VL={align:"center",iconSize:14,inactiveColor:"#ccc",itemSorter:"value",layout:"horizontal",verticalAlign:"bottom"};function Pl(e){var t=$e(e,VL),r=l$(),n=tD(),o=pL(),{width:i,height:a,wrapperStyle:s,portal:l}=t,[c,u]=NP([r]),f=cp(),p=up();if(f==null||p==null)return null;var v=f-(o?.left||0)-(o?.right||0),g=BL(t.layout,a,i,v),m=l?s:lo(lo({position:"absolute",width:g?.width||i||"auto",height:g?.height||a||"auto"},LL(s,t,o,f,p,c)),s),h=l??n;if(h==null||r==null)return null;var y=d.createElement("div",{className:"recharts-legend-wrapper",style:m,ref:u},d.createElement(FL,{layout:t.layout,align:t.align,verticalAlign:t.verticalAlign,itemSorter:t.itemSorter}),!l&&d.createElement(zL,{width:c.width,height:c.height}),d.createElement($L,Bf({},t,g,{margin:o,chartWidth:f,chartHeight:p,contextPayload:r})));return mi.createPortal(y,h)}Pl.displayName="Legend";function Vf(){return Vf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Vf.apply(null,arguments)}function zg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function No(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zg(Object(r),!0).forEach(function(n){WL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function WL(e,t,r){return(t=KL(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function KL(e){var t=UL(e,"string");return typeof t=="symbol"?t:t+""}function UL(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function HL(e){return Array.isArray(e)&&or(e[0])&&or(e[1])?e.join(" ~ "):e}var qn={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},GL=e=>{var{separator:t=qn.separator,contentStyle:r,itemStyle:n,labelStyle:o=qn.labelStyle,payload:i,formatter:a,itemSorter:s,wrapperClassName:l,labelClassName:c,label:u,labelFormatter:f,accessibilityLayer:p=qn.accessibilityLayer}=e,v=()=>{if(i&&i.length){var O={padding:0,margin:0},S=(s?il(i,s):i).map((E,C)=>{if(E.type==="none")return null;var j=E.formatter||a||HL,{value:D,name:R}=E,_=D,k=R;if(j){var I=j(D,R,E,C,i);if(Array.isArray(I))[_,k]=I;else if(I!=null)_=I;else return null}var V=No(No({},qn.itemStyle),{},{color:E.color||qn.itemStyle.color},n);return d.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(C),style:V},or(k)?d.createElement("span",{className:"recharts-tooltip-item-name"},k):null,or(k)?d.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,d.createElement("span",{className:"recharts-tooltip-item-value"},_),d.createElement("span",{className:"recharts-tooltip-item-unit"},E.unit||""))});return d.createElement("ul",{className:"recharts-tooltip-item-list",style:O},S)}return null},g=No(No({},qn.contentStyle),r),m=No({margin:0},o),h=!_e(u),y=h?u:"",x=fe("recharts-default-tooltip",l),w=fe("recharts-tooltip-label",c);h&&f&&i!==void 0&&i!==null&&(y=f(u,i));var P=p?{role:"status","aria-live":"assertive"}:{};return d.createElement("div",Vf({className:x,style:g},P),d.createElement("p",{className:w,style:m},d.isValidElement(y)?y:"".concat(y)),v())},Io="recharts-tooltip-wrapper",qL={visibility:"hidden"};function YL(e){var{coordinate:t,translateX:r,translateY:n}=e;return fe(Io,{["".concat(Io,"-right")]:q(r)&&t&&q(t.x)&&r>=t.x,["".concat(Io,"-left")]:q(r)&&t&&q(t.x)&&r<t.x,["".concat(Io,"-bottom")]:q(n)&&t&&q(t.y)&&n>=t.y,["".concat(Io,"-top")]:q(n)&&t&&q(t.y)&&n<t.y})}function Bg(e){var{allowEscapeViewBox:t,coordinate:r,key:n,offset:o,position:i,reverseDirection:a,tooltipDimension:s,viewBox:l,viewBoxDimension:c}=e;if(i&&q(i[n]))return i[n];var u=r[n]-s-(o>0?o:0),f=r[n]+o;if(t[n])return a[n]?u:f;var p=l[n];if(p==null)return 0;if(a[n]){var v=u,g=p;return v<g?Math.max(f,p):Math.max(u,p)}if(c==null)return 0;var m=f+s,h=p+c;return m>h?Math.max(u,p):Math.max(f,p)}function XL(e){var{translateX:t,translateY:r,useTranslate3d:n}=e;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function ZL(e){var{allowEscapeViewBox:t,coordinate:r,offsetTop:n,offsetLeft:o,position:i,reverseDirection:a,tooltipBox:s,useTranslate3d:l,viewBox:c}=e,u,f,p;return s.height>0&&s.width>0&&r?(f=Bg({allowEscapeViewBox:t,coordinate:r,key:"x",offset:o,position:i,reverseDirection:a,tooltipDimension:s.width,viewBox:c,viewBoxDimension:c.width}),p=Bg({allowEscapeViewBox:t,coordinate:r,key:"y",offset:n,position:i,reverseDirection:a,tooltipDimension:s.height,viewBox:c,viewBoxDimension:c.height}),u=XL({translateX:f,translateY:p,useTranslate3d:l})):u=qL,{cssProperties:u,cssClasses:YL({translateX:f,translateY:p,coordinate:r})}}function Vg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ba(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Vg(Object(r),!0).forEach(function(n){Wf(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Wf(e,t,r){return(t=JL(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function JL(e){var t=QL(e,"string");return typeof t=="symbol"?t:t+""}function QL(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class eF extends A.PureComponent{constructor(){super(...arguments),Wf(this,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}),Wf(this,"handleKeyDown",t=>{if(t.key==="Escape"){var r,n,o,i;this.setState({dismissed:!0,dismissedAtCoordinate:{x:(r=(n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==null&&r!==void 0?r:0,y:(o=(i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==null&&o!==void 0?o:0}})}})}componentDidMount(){document.addEventListener("keydown",this.handleKeyDown)}componentWillUnmount(){document.removeEventListener("keydown",this.handleKeyDown)}componentDidUpdate(){var t,r;this.state.dismissed&&(((t=this.props.coordinate)===null||t===void 0?void 0:t.x)!==this.state.dismissedAtCoordinate.x||((r=this.props.coordinate)===null||r===void 0?void 0:r.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}render(){var{active:t,allowEscapeViewBox:r,animationDuration:n,animationEasing:o,children:i,coordinate:a,hasPayload:s,isAnimationActive:l,offset:c,position:u,reverseDirection:f,useTranslate3d:p,viewBox:v,wrapperStyle:g,lastBoundingBox:m,innerRef:h,hasPortalFromProps:y}=this.props,x=typeof c=="number"?c:c.x,w=typeof c=="number"?c:c.y,{cssClasses:P,cssProperties:O}=ZL({allowEscapeViewBox:r,coordinate:a,offsetLeft:x,offsetTop:w,position:u,reverseDirection:f,tooltipBox:{height:m.height,width:m.width},useTranslate3d:p,viewBox:v}),S=y?{}:ba(ba({transition:l&&t?"transform ".concat(n,"ms ").concat(o):void 0},O),{},{pointerEvents:"none",visibility:!this.state.dismissed&&t&&s?"visible":"hidden",position:"absolute",top:0,left:0}),E=ba(ba({},S),{},{visibility:!this.state.dismissed&&t&&s?"visible":"hidden"},g);return d.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:P,style:E,ref:h},i)}}var DS=()=>{var e;return(e=J(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function Kf(){return Kf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Kf.apply(null,arguments)}function Wg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Kg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Wg(Object(r),!0).forEach(function(n){tF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tF(e,t,r){return(t=rF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rF(e){var t=nF(e,"string");return typeof t=="symbol"?t:t+""}function nF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ug={curveBasisClosed:xD,curveBasisOpen:wD,curveBasis:bD,curveBumpX:iD,curveBumpY:aD,curveLinearClosed:PD,curveLinear:nl,curveMonotoneX:SD,curveMonotoneY:OD,curveNatural:ED,curveStep:CD,curveStepAfter:_D,curveStepBefore:AD},ds=e=>ce(e.x)&&ce(e.y),Hg=e=>e.base!=null&&ds(e.base)&&ds(e),Do=e=>e.x,Ro=e=>e.y,oF=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(bi(e));if((r==="curveMonotone"||r==="curveBump")&&t){var n=Ug["".concat(r).concat(t==="vertical"?"Y":"X")];if(n)return n}return Ug[r]||nl},Gg={connectNulls:!1,type:"linear"},iF=e=>{var{type:t=Gg.type,points:r=[],baseLine:n,layout:o,connectNulls:i=Gg.connectNulls}=e,a=oF(t,o),s=i?r.filter(ds):r;if(Array.isArray(n)){var l,c=r.map((g,m)=>Kg(Kg({},g),{},{base:n[m]}));o==="vertical"?l=la().y(Ro).x1(Do).x0(g=>g.base.x):l=la().x(Do).y1(Ro).y0(g=>g.base.y);var u=l.defined(Hg).curve(a),f=i?c.filter(Hg):c;return u(f)}var p;o==="vertical"&&q(n)?p=la().y(Ro).x1(Do).x0(n):q(n)?p=la().x(Do).y1(Ro).y0(n):p=nP().x(Do).y(Ro);var v=p.defined(ds).curve(a);return v(s)},pp=e=>{var{className:t,points:r,path:n,pathRef:o}=e,i=Ln();if((!r||!r.length)&&!n)return null;var a={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||i,connectNulls:e.connectNulls},s=r&&r.length?iF(a):n;return d.createElement("path",Kf({},Ct(e),Yd(e),{className:fe("recharts-curve",t),d:s===null?void 0:s,ref:o}))},aF=["x","y","top","left","width","height","className"];function Uf(){return Uf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Uf.apply(null,arguments)}function qg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function sF(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qg(Object(r),!0).forEach(function(n){lF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lF(e,t,r){return(t=cF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cF(e){var t=uF(e,"string");return typeof t=="symbol"?t:t+""}function uF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fF(e,t){if(e==null)return{};var r,n,o=dF(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function dF(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var pF=(e,t,r,n,o,i)=>"M".concat(e,",").concat(o,"v").concat(n,"M").concat(i,",").concat(t,"h").concat(r),vF=e=>{var{x:t=0,y:r=0,top:n=0,left:o=0,width:i=0,height:a=0,className:s}=e,l=fF(e,aF),c=sF({x:t,y:r,top:n,left:o,width:i,height:a},l);return!q(t)||!q(r)||!q(i)||!q(a)||!q(n)||!q(o)?null:d.createElement("path",Uf({},ft(c),{className:fe("recharts-cross",s),d:pF(t,r,i,a,n,o)}))};function mF(e,t,r,n){var o=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-o:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-o,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function Yg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Xg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yg(Object(r),!0).forEach(function(n){hF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function hF(e,t,r){return(t=gF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gF(e){var t=yF(e,"string");return typeof t=="symbol"?t:t+""}function yF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var bF=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),RS=(e,t,r)=>e.map(n=>"".concat(bF(n)," ").concat(t,"ms ").concat(r)).join(","),xF=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((r,n)=>r.filter(o=>n.includes(o))),ri=(e,t)=>Object.keys(t).reduce((r,n)=>Xg(Xg({},r),{},{[n]:e(n,t[n])}),{});function Zg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Fe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Zg(Object(r),!0).forEach(function(n){wF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function wF(e,t,r){return(t=PF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function PF(e){var t=SF(e,"string");return typeof t=="symbol"?t:t+""}function SF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ps=(e,t,r)=>e+(t-e)*r,Hf=e=>{var{from:t,to:r}=e;return t!==r},$S=(e,t,r)=>{var n=ri((o,i)=>{if(Hf(i)){var[a,s]=e(i.from,i.to,i.velocity);return Fe(Fe({},i),{},{from:a,velocity:s})}return i},t);return r<1?ri((o,i)=>Hf(i)&&n[o]!=null?Fe(Fe({},i),{},{velocity:ps(i.velocity,n[o].velocity,r),from:ps(i.from,n[o].from,r)}):i,t):$S(e,n,r-1)};function OF(e,t,r,n,o,i){var a,s=n.reduce((p,v)=>Fe(Fe({},p),{},{[v]:{from:e[v],velocity:0,to:t[v]}}),{}),l=()=>ri((p,v)=>v.from,s),c=()=>!Object.values(s).filter(Hf).length,u=null,f=p=>{a||(a=p);var v=p-a,g=v/r.dt;s=$S(r,s,g),o(Fe(Fe(Fe({},e),t),l())),a=p,c()||(u=i.setTimeout(f))};return()=>(u=i.setTimeout(f),()=>{var p;(p=u)===null||p===void 0||p()})}function EF(e,t,r,n,o,i,a){var s=null,l=o.reduce((f,p)=>{var v=e[p],g=t[p];return v==null||g==null?f:Fe(Fe({},f),{},{[p]:[v,g]})},{}),c,u=f=>{c||(c=f);var p=(f-c)/n,v=ri((m,h)=>ps(...h,r(p)),l);if(i(Fe(Fe(Fe({},e),t),v)),p<1)s=a.setTimeout(u);else{var g=ri((m,h)=>ps(...h,r(1)),l);i(Fe(Fe(Fe({},e),t),g))}};return()=>(s=a.setTimeout(u),()=>{var f;(f=s)===null||f===void 0||f()})}const CF=(e,t,r,n,o,i)=>{var a=xF(e,t);return r==null?()=>(o(Fe(Fe({},e),t)),()=>{}):r.isStepper===!0?OF(e,t,r,a,o,i):EF(e,t,r,n,a,o,i)};var vs=1e-4,LS=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],FS=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),Jg=(e,t)=>r=>{var n=LS(e,t);return FS(n,r)},AF=(e,t)=>r=>{var n=LS(e,t),o=[...n.map((i,a)=>i*a).slice(1),0];return FS(o,r)},_F=e=>{var t,r=e.split("(");if(r.length!==2||r[0]!=="cubic-bezier")return null;var n=(t=r[1])===null||t===void 0||(t=t.split(")")[0])===null||t===void 0?void 0:t.split(",");if(n==null||n.length!==4)return null;var o=n.map(i=>parseFloat(i));return[o[0],o[1],o[2],o[3]]},TF=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(r.length===1)switch(r[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 o=_F(r[0]);if(o)return o}}return r.length===4?r:[0,0,1,1]},MF=(e,t,r,n)=>{var o=Jg(e,r),i=Jg(t,n),a=AF(e,r),s=c=>c>1?1:c<0?0:c,l=c=>{for(var u=c>1?1:c,f=u,p=0;p<8;++p){var v=o(f)-u,g=a(f);if(Math.abs(v-u)<vs||g<vs)return i(f);f=s(f-v/g)}return i(f)};return l.isStepper=!1,l},Qg=function(){return MF(...TF(...arguments))},jF=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:r=100,damping:n=8,dt:o=17}=t,i=(a,s,l)=>{var c=-(a-s)*r,u=l*n,f=l+(c-u)*o/1e3,p=l*o/1e3+a;return Math.abs(p-s)<vs&&Math.abs(f)<vs?[s,0]:[p,f]};return i.isStepper=!0,i.dt=o,i},kF=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return Qg(e);case"spring":return jF();default:if(e.split("(")[0]==="cubic-bezier")return Qg(e)}return typeof e=="function"?e:null};function NF(e){var t,r=()=>null,n=!1,o=null,i=a=>{if(!n){if(Array.isArray(a)){if(!a.length)return;var s=a,[l,...c]=s;if(typeof l=="number"){o=e.setTimeout(i.bind(null,c),l);return}i(l),o=e.setTimeout(i.bind(null,c));return}typeof a=="string"&&(t=a,r(t)),typeof a=="object"&&(t=a,r(t)),typeof a=="function"&&a()}};return{stop:()=>{n=!0},start:a=>{n=!1,o&&(o(),o=null),i(a)},subscribe:a=>(r=a,()=>{r=()=>null}),getTimeoutController:()=>e}}class IF{setTimeout(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),o=null,i=a=>{a-n>=r?t(a):typeof requestAnimationFrame=="function"&&(o=requestAnimationFrame(i))};return o=requestAnimationFrame(i),()=>{o!=null&&cancelAnimationFrame(o)}}}function DF(){return NF(new IF)}var RF=A.createContext(DF);function $F(e,t){var r=A.useContext(RF);return A.useMemo(()=>t??r(e),[e,t,r])}var LF=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),Sl={isSsr:LF()},FF={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},ey={t:0},Nu={t:1};function _i(e){var t=$e(e,FF),{isActive:r,canBegin:n,duration:o,easing:i,begin:a,onAnimationEnd:s,onAnimationStart:l,children:c}=t,u=r==="auto"?!Sl.isSsr:r,f=$F(t.animationId,t.animationManager),[p,v]=A.useState(u?ey:Nu),g=A.useRef(null);return A.useEffect(()=>{u||v(Nu)},[u]),A.useEffect(()=>{if(!u||!n)return $n;var m=CF(ey,Nu,kF(i),o,v,f.getTimeoutController()),h=()=>{g.current=m()};return f.start([l,a,h,o,s]),()=>{f.stop(),g.current&&g.current(),s()}},[u,n,o,i,a,l,s,f]),c(p.t)}function Ti(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=A.useRef(Yo(t)),n=A.useRef(e);return n.current!==e&&(r.current=Yo(t),n.current=e),r.current}var zF=["radius"],BF=["radius"],ty,ry,ny,oy,iy,ay,sy,ly,cy,uy;function fy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function dy(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fy(Object(r),!0).forEach(function(n){VF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function VF(e,t,r){return(t=WF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function WF(e){var t=KF(e,"string");return typeof t=="symbol"?t:t+""}function KF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ms(){return ms=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ms.apply(null,arguments)}function py(e,t){if(e==null)return{};var r,n,o=UF(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function UF(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Gt(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var vy=(e,t,r,n,o)=>{var i=Br(r),a=Br(n),s=Math.min(Math.abs(i)/2,Math.abs(a)/2),l=a>=0?1:-1,c=i>=0?1:-1,u=a>=0&&i>=0||a<0&&i<0?1:0,f;if(s>0&&Array.isArray(o)){for(var p=[0,0,0,0],v=0,g=4;v<g;v++){var m,h=(m=o[v])!==null&&m!==void 0?m:0;p[v]=h>s?s:h}f=je(ty||(ty=Gt(["M",",",""])),e,t+l*p[0]),p[0]>0&&(f+=je(ry||(ry=Gt(["A ",",",",0,0,",",",",",""])),p[0],p[0],u,e+c*p[0],t)),f+=je(ny||(ny=Gt(["L ",",",""])),e+r-c*p[1],t),p[1]>0&&(f+=je(oy||(oy=Gt(["A ",",",",0,0,",`,
72
+ `,",",""])),p[1],p[1],u,e+r,t+l*p[1])),f+=je(iy||(iy=Gt(["L ",",",""])),e+r,t+n-l*p[2]),p[2]>0&&(f+=je(ay||(ay=Gt(["A ",",",",0,0,",`,
73
+ `,",",""])),p[2],p[2],u,e+r-c*p[2],t+n)),f+=je(sy||(sy=Gt(["L ",",",""])),e+c*p[3],t+n),p[3]>0&&(f+=je(ly||(ly=Gt(["A ",",",",0,0,",`,
74
+ `,",",""])),p[3],p[3],u,e,t+n-l*p[3])),f+="Z"}else if(s>0&&o===+o&&o>0){var y=Math.min(s,o);f=je(cy||(cy=Gt(["M ",",",`
75
+ A `,",",",0,0,",",",",",`
76
+ L `,",",`
77
+ A `,",",",0,0,",",",",",`
78
+ L `,",",`
79
+ A `,",",",0,0,",",",",",`
80
+ L `,",",`
81
+ A `,",",",0,0,",",",","," Z"])),e,t+l*y,y,y,u,e+c*y,t,e+r-c*y,t,y,y,u,e+r,t+l*y,e+r,t+n-l*y,y,y,u,e+r-c*y,t+n,e+c*y,t+n,y,y,u,e,t+n-l*y)}else f=je(uy||(uy=Gt(["M ",","," h "," v "," h "," Z"])),e,t,r,n,-r);return f},my={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},zS=e=>{var t=$e(e,my),r=A.useRef(null),[n,o]=A.useState(-1);A.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var K=r.current.getTotalLength();K&&o(K)}catch{}},[]);var{x:i,y:a,width:s,height:l,radius:c,className:u}=t,{animationEasing:f,animationDuration:p,animationBegin:v,isAnimationActive:g,isUpdateAnimationActive:m}=t,h=A.useRef(s),y=A.useRef(l),x=A.useRef(i),w=A.useRef(a),P=A.useMemo(()=>({x:i,y:a,width:s,height:l,radius:c}),[i,a,s,l,c]),O=Ti(P,"rectangle-");if(i!==+i||a!==+a||s!==+s||l!==+l||s===0||l===0)return null;var S=fe("recharts-rectangle",u);if(!m){var E=ft(t),{radius:C}=E,j=py(E,zF);return d.createElement("path",ms({},j,{x:Br(i),y:Br(a),width:Br(s),height:Br(l),radius:typeof c=="number"?c:void 0,className:S,d:vy(i,a,s,l,c)}))}var D=h.current,R=y.current,_=x.current,k=w.current,I="0px ".concat(n===-1?1:n,"px"),V="".concat(n,"px 0px"),z=RS(["strokeDasharray"],p,typeof f=="string"?f:my.animationEasing);return d.createElement(_i,{animationId:O,key:O,canBegin:n>0,duration:p,easing:f,isActive:m,begin:v},K=>{var T=Ce(D,s,K),N=Ce(R,l,K),G=Ce(_,i,K),Q=Ce(k,a,K);r.current&&(h.current=T,y.current=N,x.current=G,w.current=Q);var te;g?K>0?te={transition:z,strokeDasharray:V}:te={strokeDasharray:I}:te={strokeDasharray:V};var ne=ft(t),{radius:re}=ne,le=py(ne,BF);return d.createElement("path",ms({},le,{radius:typeof c=="number"?c:void 0,className:S,d:vy(G,Q,T,N,c),ref:r,style:dy(dy({},te),t.style)}))})};function hy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function gy(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hy(Object(r),!0).forEach(function(n){HF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function HF(e,t,r){return(t=GF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function GF(e){var t=qF(e,"string");return typeof t=="symbol"?t:t+""}function qF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var hs=Math.PI/180,YF=e=>e*180/Math.PI,Ie=(e,t,r,n)=>({x:e+Math.cos(-hs*n)*r,y:t+Math.sin(-hs*n)*r}),BS=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},XF=(e,t)=>{var{x:r,y:n}=e,{x:o,y:i}=t;return Math.sqrt((r-o)**2+(n-i)**2)},ZF=(e,t)=>{var{x:r,y:n}=e,{cx:o,cy:i}=t,a=XF({x:r,y:n},{x:o,y:i});if(a<=0)return{radius:a,angle:0};var s=(r-o)/a,l=Math.acos(s);return n>i&&(l=2*Math.PI-l),{radius:a,angle:YF(l),angleInRadian:l}},JF=e=>{var{startAngle:t,endAngle:r}=e,n=Math.floor(t/360),o=Math.floor(r/360),i=Math.min(n,o);return{startAngle:t-i*360,endAngle:r-i*360}},QF=(e,t)=>{var{startAngle:r,endAngle:n}=t,o=Math.floor(r/360),i=Math.floor(n/360),a=Math.min(o,i);return e+a*360},ez=(e,t)=>{var{chartX:r,chartY:n}=e,{radius:o,angle:i}=ZF({x:r,y:n},t),{innerRadius:a,outerRadius:s}=t;if(o<a||o>s||o===0)return null;var{startAngle:l,endAngle:c}=JF(t),u=i,f;if(l<=c){for(;u>c;)u-=360;for(;u<l;)u+=360;f=u>=l&&u<=c}else{for(;u>l;)u-=360;for(;u<c;)u+=360;f=u>=c&&u<=l}return f?gy(gy({},t),{},{radius:o,angle:QF(u,t)}):null};function VS(e){var{cx:t,cy:r,radius:n,startAngle:o,endAngle:i}=e,a=Ie(t,r,n,o),s=Ie(t,r,n,i);return{points:[a,s],cx:t,cy:r,radius:n,startAngle:o,endAngle:i}}var yy,by,xy,wy,Py,Sy,Oy;function Gf(){return Gf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Gf.apply(null,arguments)}function pn(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var tz=(e,t)=>{var r=He(t-e),n=Math.min(Math.abs(t-e),359.999);return r*n},xa=e=>{var{cx:t,cy:r,radius:n,angle:o,sign:i,isExternal:a,cornerRadius:s,cornerIsExternal:l}=e,c=s*(a?1:-1)+n,u=Math.asin(s/c)/hs,f=l?o:o+i*u,p=Ie(t,r,c,f),v=Ie(t,r,n,f),g=l?o-i*u:o,m=Ie(t,r,c*Math.cos(u*hs),g);return{center:p,circleTangency:v,lineTangency:m,theta:u}},WS=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:o,startAngle:i,endAngle:a}=e,s=tz(i,a),l=i+s,c=Ie(t,r,o,i),u=Ie(t,r,o,l),f=je(yy||(yy=pn(["M ",",",`
82
+ A `,",",`,0,
83
+ `,",",`,
84
+ `,",",`
85
+ `])),c.x,c.y,o,o,+(Math.abs(s)>180),+(i>l),u.x,u.y);if(n>0){var p=Ie(t,r,n,i),v=Ie(t,r,n,l);f+=je(by||(by=pn(["L ",",",`
86
+ A `,",",`,0,
87
+ `,",",`,
88
+ `,","," Z"])),v.x,v.y,n,n,+(Math.abs(s)>180),+(i<=l),p.x,p.y)}else f+=je(xy||(xy=pn(["L ",","," Z"])),t,r);return f},rz=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:o,cornerRadius:i,forceCornerRadius:a,cornerIsExternal:s,startAngle:l,endAngle:c}=e,u=He(c-l),{circleTangency:f,lineTangency:p,theta:v}=xa({cx:t,cy:r,radius:o,angle:l,sign:u,cornerRadius:i,cornerIsExternal:s}),{circleTangency:g,lineTangency:m,theta:h}=xa({cx:t,cy:r,radius:o,angle:c,sign:-u,cornerRadius:i,cornerIsExternal:s}),y=s?Math.abs(l-c):Math.abs(l-c)-v-h;if(y<0)return a?je(wy||(wy=pn(["M ",",",`
89
+ a`,",",",0,0,1,",`,0
90
+ a`,",",",0,0,1,",`,0
91
+ `])),p.x,p.y,i,i,i*2,i,i,-i*2):WS({cx:t,cy:r,innerRadius:n,outerRadius:o,startAngle:l,endAngle:c});var x=je(Py||(Py=pn(["M ",",",`
92
+ A`,",",",0,0,",",",",",`
93
+ A`,",",",0,",",",",",",",`
94
+ A`,",",",0,0,",",",",",`
95
+ `])),p.x,p.y,i,i,+(u<0),f.x,f.y,o,o,+(y>180),+(u<0),g.x,g.y,i,i,+(u<0),m.x,m.y);if(n>0){var{circleTangency:w,lineTangency:P,theta:O}=xa({cx:t,cy:r,radius:n,angle:l,sign:u,isExternal:!0,cornerRadius:i,cornerIsExternal:s}),{circleTangency:S,lineTangency:E,theta:C}=xa({cx:t,cy:r,radius:n,angle:c,sign:-u,isExternal:!0,cornerRadius:i,cornerIsExternal:s}),j=s?Math.abs(l-c):Math.abs(l-c)-O-C;if(j<0&&i===0)return"".concat(x,"L").concat(t,",").concat(r,"Z");x+=je(Sy||(Sy=pn(["L",",",`
96
+ A`,",",",0,0,",",",",",`
97
+ A`,",",",0,",",",",",",",`
98
+ A`,",",",0,0,",",",",","Z"])),E.x,E.y,i,i,+(u<0),S.x,S.y,n,n,+(j>180),+(u>0),w.x,w.y,i,i,+(u<0),P.x,P.y)}else x+=je(Oy||(Oy=pn(["L",",","Z"])),t,r);return x},nz={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},KS=e=>{var t=$e(e,nz),{cx:r,cy:n,innerRadius:o,outerRadius:i,cornerRadius:a,forceCornerRadius:s,cornerIsExternal:l,startAngle:c,endAngle:u,className:f}=t;if(i<o||c===u)return null;var p=fe("recharts-sector",f),v=i-o,g=nt(a,v,0,!0),m;return g>0&&Math.abs(c-u)<360?m=rz({cx:r,cy:n,innerRadius:o,outerRadius:i,cornerRadius:Math.min(g,v/2),forceCornerRadius:s,cornerIsExternal:l,startAngle:c,endAngle:u}):m=WS({cx:r,cy:n,innerRadius:o,outerRadius:i,startAngle:c,endAngle:u}),d.createElement("path",Gf({},ft(t),{className:p,d:m}))};function oz(e,t,r){if(e==="horizontal")return[{x:t.x,y:r.top},{x:t.x,y:r.top+r.height}];if(e==="vertical")return[{x:r.left,y:t.y},{x:r.left+r.width,y:t.y}];if(yP(t)){if(e==="centric"){var{cx:n,cy:o,innerRadius:i,outerRadius:a,angle:s}=t,l=Ie(n,o,i,s),c=Ie(n,o,a,s);return[{x:l.x,y:l.y},{x:c.x,y:c.y}]}return VS(t)}}var Iu={},Du={},Ru={},Ey;function iz(){return Ey||(Ey=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=MP();function r(n){return t.isSymbol(n)?NaN:Number(n)}e.toNumber=r})(Ru)),Ru}var Cy;function az(){return Cy||(Cy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=iz();function r(n){return n?(n=t.toNumber(n),n===1/0||n===-1/0?(n<0?-1:1)*Number.MAX_VALUE:n===n?n:0):n===0?n:0}e.toFinite=r})(Du)),Du}var Ay;function sz(){return Ay||(Ay=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=jP(),r=az();function n(o,i,a){a&&typeof a!="number"&&t.isIterateeCall(o,i,a)&&(i=a=void 0),o=r.toFinite(o),i===void 0?(i=o,o=0):i=r.toFinite(i),a=a===void 0?o<i?1:-1:r.toFinite(a);const s=Math.max(Math.ceil((i-o)/(a||1)),0),l=new Array(s);for(let c=0;c<s;c++)l[c]=o,o+=a;return l}e.range=n})(Iu)),Iu}var $u,_y;function lz(){return _y||(_y=1,$u=sz().range),$u}var cz=lz();const US=Zr(cz);function Vr(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function uz(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function vp(e){let t,r,n;e.length!==2?(t=Vr,r=(s,l)=>Vr(e(s),l),n=(s,l)=>e(s)-l):(t=e===Vr||e===uz?e:fz,r=e,n=e);function o(s,l,c=0,u=s.length){if(c<u){if(t(l,l)!==0)return u;do{const f=c+u>>>1;r(s[f],l)<0?c=f+1:u=f}while(c<u)}return c}function i(s,l,c=0,u=s.length){if(c<u){if(t(l,l)!==0)return u;do{const f=c+u>>>1;r(s[f],l)<=0?c=f+1:u=f}while(c<u)}return c}function a(s,l,c=0,u=s.length){const f=o(s,l,c,u-1);return f>c&&n(s[f-1],l)>-n(s[f],l)?f-1:f}return{left:o,center:a,right:i}}function fz(){return 0}function HS(e){return e===null?NaN:+e}function*dz(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const pz=vp(Vr),Mi=pz.right;vp(HS).center;class Ty extends Map{constructor(t,r=hz){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,o]of t)this.set(n,o)}get(t){return super.get(My(this,t))}has(t){return super.has(My(this,t))}set(t,r){return super.set(vz(this,t),r)}delete(t){return super.delete(mz(this,t))}}function My({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function vz({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function mz({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function hz(e){return e!==null&&typeof e=="object"?e.valueOf():e}function gz(e=Vr){if(e===Vr)return GS;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function GS(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const yz=Math.sqrt(50),bz=Math.sqrt(10),xz=Math.sqrt(2);function gs(e,t,r){const n=(t-e)/Math.max(0,r),o=Math.floor(Math.log10(n)),i=n/Math.pow(10,o),a=i>=yz?10:i>=bz?5:i>=xz?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<=r&&r<2?gs(e,t,r*2):[s,l,c]}function qf(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[o,i,a]=n?gs(t,e,r):gs(e,t,r);if(!(i>=o))return[];const s=i-o+1,l=new Array(s);if(n)if(a<0)for(let c=0;c<s;++c)l[c]=(i-c)/-a;else for(let c=0;c<s;++c)l[c]=(i-c)*a;else if(a<0)for(let c=0;c<s;++c)l[c]=(o+c)/-a;else for(let c=0;c<s;++c)l[c]=(o+c)*a;return l}function Yf(e,t,r){return t=+t,e=+e,r=+r,gs(e,t,r)[2]}function Xf(e,t,r){t=+t,e=+e,r=+r;const n=t<e,o=n?Yf(t,e,r):Yf(e,t,r);return(n?-1:1)*(o<0?1/-o:o)}function jy(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function ky(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function qS(e,t,r=0,n=1/0,o){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(o=o===void 0?GS:gz(o);n>r;){if(n-r>600){const l=n-r+1,c=t-r+1,u=Math.log(l),f=.5*Math.exp(2*u/3),p=.5*Math.sqrt(u*f*(l-f)/l)*(c-l/2<0?-1:1),v=Math.max(r,Math.floor(t-c*f/l+p)),g=Math.min(n,Math.floor(t+(l-c)*f/l+p));qS(e,t,v,g,o)}const i=e[t];let a=r,s=n;for($o(e,r,t),o(e[n],i)>0&&$o(e,r,n);a<s;){for($o(e,a,s),++a,--s;o(e[a],i)<0;)++a;for(;o(e[s],i)>0;)--s}o(e[r],i)===0?$o(e,r,s):(++s,$o(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function $o(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function wz(e,t,r){if(e=Float64Array.from(dz(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return ky(e);if(t>=1)return jy(e);var n,o=(n-1)*t,i=Math.floor(o),a=jy(qS(e,i).subarray(0,i+1)),s=ky(e.subarray(i+1));return a+(s-a)*(o-i)}}function Pz(e,t,r=HS){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,o=(n-1)*t,i=Math.floor(o),a=+r(e[i],i,e),s=+r(e[i+1],i+1,e);return a+(s-a)*(o-i)}}function Sz(e,t,r){e=+e,t=+t,r=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+r;for(var n=-1,o=Math.max(0,Math.ceil((t-e)/r))|0,i=new Array(o);++n<o;)i[n]=e+n*r;return i}function Rt(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Mr(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const Zf=Symbol("implicit");function mp(){var e=new Ty,t=[],r=[],n=Zf;function o(i){let a=e.get(i);if(a===void 0){if(n!==Zf)return n;e.set(i,a=t.push(i)-1)}return r[a%r.length]}return o.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new Ty;for(const a of i)e.has(a)||e.set(a,t.push(a)-1);return o},o.range=function(i){return arguments.length?(r=Array.from(i),o):r.slice()},o.unknown=function(i){return arguments.length?(n=i,o):n},o.copy=function(){return mp(t,r).unknown(n)},Rt.apply(o,arguments),o}function hp(){var e=mp().unknown(void 0),t=e.domain,r=e.range,n=0,o=1,i,a,s=!1,l=0,c=0,u=.5;delete e.unknown;function f(){var p=t().length,v=o<n,g=v?o:n,m=v?n:o;i=(m-g)/Math.max(1,p-l+c*2),s&&(i=Math.floor(i)),g+=(m-g-i*(p-l))*u,a=i*(1-l),s&&(g=Math.round(g),a=Math.round(a));var h=Sz(p).map(function(y){return g+i*y});return r(v?h.reverse():h)}return e.domain=function(p){return arguments.length?(t(p),f()):t()},e.range=function(p){return arguments.length?([n,o]=p,n=+n,o=+o,f()):[n,o]},e.rangeRound=function(p){return[n,o]=p,n=+n,o=+o,s=!0,f()},e.bandwidth=function(){return a},e.step=function(){return i},e.round=function(p){return arguments.length?(s=!!p,f()):s},e.padding=function(p){return arguments.length?(l=Math.min(1,c=+p),f()):l},e.paddingInner=function(p){return arguments.length?(l=Math.min(1,p),f()):l},e.paddingOuter=function(p){return arguments.length?(c=+p,f()):c},e.align=function(p){return arguments.length?(u=Math.max(0,Math.min(1,p)),f()):u},e.copy=function(){return hp(t(),[n,o]).round(s).paddingInner(l).paddingOuter(c).align(u)},Rt.apply(f(),arguments)}function YS(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return YS(t())},e}function Oz(){return YS(hp.apply(null,arguments).paddingInner(1))}function gp(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function XS(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function ji(){}var ni=.7,ys=1/ni,no="\\s*([+-]?\\d+)\\s*",oi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",tr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ez=/^#([0-9a-f]{3,8})$/,Cz=new RegExp(`^rgb\\(${no},${no},${no}\\)$`),Az=new RegExp(`^rgb\\(${tr},${tr},${tr}\\)$`),_z=new RegExp(`^rgba\\(${no},${no},${no},${oi}\\)$`),Tz=new RegExp(`^rgba\\(${tr},${tr},${tr},${oi}\\)$`),Mz=new RegExp(`^hsl\\(${oi},${tr},${tr}\\)$`),jz=new RegExp(`^hsla\\(${oi},${tr},${tr},${oi}\\)$`),Ny={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};gp(ji,ii,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Iy,formatHex:Iy,formatHex8:kz,formatHsl:Nz,formatRgb:Dy,toString:Dy});function Iy(){return this.rgb().formatHex()}function kz(){return this.rgb().formatHex8()}function Nz(){return ZS(this).formatHsl()}function Dy(){return this.rgb().formatRgb()}function ii(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Ez.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Ry(t):r===3?new ht(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?wa(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?wa(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Cz.exec(e))?new ht(t[1],t[2],t[3],1):(t=Az.exec(e))?new ht(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=_z.exec(e))?wa(t[1],t[2],t[3],t[4]):(t=Tz.exec(e))?wa(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Mz.exec(e))?Fy(t[1],t[2]/100,t[3]/100,1):(t=jz.exec(e))?Fy(t[1],t[2]/100,t[3]/100,t[4]):Ny.hasOwnProperty(e)?Ry(Ny[e]):e==="transparent"?new ht(NaN,NaN,NaN,0):null}function Ry(e){return new ht(e>>16&255,e>>8&255,e&255,1)}function wa(e,t,r,n){return n<=0&&(e=t=r=NaN),new ht(e,t,r,n)}function Iz(e){return e instanceof ji||(e=ii(e)),e?(e=e.rgb(),new ht(e.r,e.g,e.b,e.opacity)):new ht}function Jf(e,t,r,n){return arguments.length===1?Iz(e):new ht(e,t,r,n??1)}function ht(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}gp(ht,Jf,XS(ji,{brighter(e){return e=e==null?ys:Math.pow(ys,e),new ht(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ni:Math.pow(ni,e),new ht(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ht(xn(this.r),xn(this.g),xn(this.b),bs(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:$y,formatHex:$y,formatHex8:Dz,formatRgb:Ly,toString:Ly}));function $y(){return`#${vn(this.r)}${vn(this.g)}${vn(this.b)}`}function Dz(){return`#${vn(this.r)}${vn(this.g)}${vn(this.b)}${vn((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ly(){const e=bs(this.opacity);return`${e===1?"rgb(":"rgba("}${xn(this.r)}, ${xn(this.g)}, ${xn(this.b)}${e===1?")":`, ${e})`}`}function bs(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function xn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function vn(e){return e=xn(e),(e<16?"0":"")+e.toString(16)}function Fy(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Ft(e,t,r,n)}function ZS(e){if(e instanceof Ft)return new Ft(e.h,e.s,e.l,e.opacity);if(e instanceof ji||(e=ii(e)),!e)return new Ft;if(e instanceof Ft)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,o=Math.min(t,r,n),i=Math.max(t,r,n),a=NaN,s=i-o,l=(i+o)/2;return s?(t===i?a=(r-n)/s+(r<n)*6:r===i?a=(n-t)/s+2:a=(t-r)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new Ft(a,s,l,e.opacity)}function Rz(e,t,r,n){return arguments.length===1?ZS(e):new Ft(e,t,r,n??1)}function Ft(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}gp(Ft,Rz,XS(ji,{brighter(e){return e=e==null?ys:Math.pow(ys,e),new Ft(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ni:Math.pow(ni,e),new Ft(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,o=2*r-n;return new ht(Lu(e>=240?e-240:e+120,o,n),Lu(e,o,n),Lu(e<120?e+240:e-120,o,n),this.opacity)},clamp(){return new Ft(zy(this.h),Pa(this.s),Pa(this.l),bs(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=bs(this.opacity);return`${e===1?"hsl(":"hsla("}${zy(this.h)}, ${Pa(this.s)*100}%, ${Pa(this.l)*100}%${e===1?")":`, ${e})`}`}}));function zy(e){return e=(e||0)%360,e<0?e+360:e}function Pa(e){return Math.max(0,Math.min(1,e||0))}function Lu(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const yp=e=>()=>e;function $z(e,t){return function(r){return e+r*t}}function Lz(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function Fz(e){return(e=+e)==1?JS:function(t,r){return r-t?Lz(t,r,e):yp(isNaN(t)?r:t)}}function JS(e,t){var r=t-e;return r?$z(e,r):yp(isNaN(e)?t:e)}const By=(function e(t){var r=Fz(t);function n(o,i){var a=r((o=Jf(o)).r,(i=Jf(i)).r),s=r(o.g,i.g),l=r(o.b,i.b),c=JS(o.opacity,i.opacity);return function(u){return o.r=a(u),o.g=s(u),o.b=l(u),o.opacity=c(u),o+""}}return n.gamma=e,n})(1);function zz(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),o;return function(i){for(o=0;o<r;++o)n[o]=e[o]*(1-i)+t[o]*i;return n}}function Bz(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Vz(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,o=new Array(n),i=new Array(r),a;for(a=0;a<n;++a)o[a]=bo(e[a],t[a]);for(;a<r;++a)i[a]=t[a];return function(s){for(a=0;a<n;++a)i[a]=o[a](s);return i}}function Wz(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function xs(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function Kz(e,t){var r={},n={},o;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(o in t)o in e?r[o]=bo(e[o],t[o]):n[o]=t[o];return function(i){for(o in r)n[o]=r[o](i);return n}}var Qf=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Fu=new RegExp(Qf.source,"g");function Uz(e){return function(){return e}}function Hz(e){return function(t){return e(t)+""}}function Gz(e,t){var r=Qf.lastIndex=Fu.lastIndex=0,n,o,i,a=-1,s=[],l=[];for(e=e+"",t=t+"";(n=Qf.exec(e))&&(o=Fu.exec(t));)(i=o.index)>r&&(i=t.slice(r,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(o=o[0])?s[a]?s[a]+=o:s[++a]=o:(s[++a]=null,l.push({i:a,x:xs(n,o)})),r=Fu.lastIndex;return r<t.length&&(i=t.slice(r),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?Hz(l[0].x):Uz(t):(t=l.length,function(c){for(var u=0,f;u<t;++u)s[(f=l[u]).i]=f.x(c);return s.join("")})}function bo(e,t){var r=typeof t,n;return t==null||r==="boolean"?yp(t):(r==="number"?xs:r==="string"?(n=ii(t))?(t=n,By):Gz:t instanceof ii?By:t instanceof Date?Wz:Bz(t)?zz:Array.isArray(t)?Vz:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Kz:xs)(e,t)}function bp(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function qz(e,t){t===void 0&&(t=e,e=bo);for(var r=0,n=t.length-1,o=t[0],i=new Array(n<0?0:n);r<n;)i[r]=e(o,o=t[++r]);return function(a){var s=Math.max(0,Math.min(n-1,Math.floor(a*=n)));return i[s](a-s)}}function Yz(e){return function(){return e}}function ws(e){return+e}var Vy=[0,1];function ut(e){return e}function ed(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:Yz(isNaN(t)?NaN:.5)}function Xz(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function Zz(e,t,r){var n=e[0],o=e[1],i=t[0],a=t[1];return o<n?(n=ed(o,n),i=r(a,i)):(n=ed(n,o),i=r(i,a)),function(s){return i(n(s))}}function Jz(e,t,r){var n=Math.min(e.length,t.length)-1,o=new Array(n),i=new Array(n),a=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<n;)o[a]=ed(e[a],e[a+1]),i[a]=r(t[a],t[a+1]);return function(s){var l=Mi(e,s,1,n)-1;return i[l](o[l](s))}}function ki(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Ol(){var e=Vy,t=Vy,r=bo,n,o,i,a=ut,s,l,c;function u(){var p=Math.min(e.length,t.length);return a!==ut&&(a=Xz(e[0],e[p-1])),s=p>2?Jz:Zz,l=c=null,f}function f(p){return p==null||isNaN(p=+p)?i:(l||(l=s(e.map(n),t,r)))(n(a(p)))}return f.invert=function(p){return a(o((c||(c=s(t,e.map(n),xs)))(p)))},f.domain=function(p){return arguments.length?(e=Array.from(p,ws),u()):e.slice()},f.range=function(p){return arguments.length?(t=Array.from(p),u()):t.slice()},f.rangeRound=function(p){return t=Array.from(p),r=bp,u()},f.clamp=function(p){return arguments.length?(a=p?!0:ut,u()):a!==ut},f.interpolate=function(p){return arguments.length?(r=p,u()):r},f.unknown=function(p){return arguments.length?(i=p,f):i},function(p,v){return n=p,o=v,u()}}function xp(){return Ol()(ut,ut)}function Qz(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Ps(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function co(e){return e=Ps(Math.abs(e)),e?e[1]:NaN}function eB(e,t){return function(r,n){for(var o=r.length,i=[],a=0,s=e[0],l=0;o>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),i.push(r.substring(o-=s,o+s)),!((l+=s+1)>n));)s=e[a=(a+1)%e.length];return i.reverse().join(t)}}function tB(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var rB=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ai(e){if(!(t=rB.exec(e)))throw new Error("invalid format: "+e);var t;return new wp({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]})}ai.prototype=wp.prototype;function wp(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}wp.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function nB(e){e:for(var t=e.length,r=1,n=-1,o;r<t;++r)switch(e[r]){case".":n=o=r;break;case"0":n===0&&(n=r),o=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(o+1):e}var Ss;function oB(e,t){var r=Ps(e,t);if(!r)return Ss=void 0,e.toPrecision(t);var n=r[0],o=r[1],i=o-(Ss=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,a=n.length;return i===a?n:i>a?n+new Array(i-a+1).join("0"):i>0?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+Ps(e,Math.max(0,t+i-1))[0]}function Wy(e,t){var r=Ps(e,t);if(!r)return e+"";var n=r[0],o=r[1];return o<0?"0."+new Array(-o).join("0")+n:n.length>o+1?n.slice(0,o+1)+"."+n.slice(o+1):n+new Array(o-n.length+2).join("0")}const Ky={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Qz,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)=>Wy(e*100,t),r:Wy,s:oB,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Uy(e){return e}var Hy=Array.prototype.map,Gy=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function iB(e){var t=e.grouping===void 0||e.thousands===void 0?Uy:eB(Hy.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",o=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?Uy:tB(Hy.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(f,p){f=ai(f);var v=f.fill,g=f.align,m=f.sign,h=f.symbol,y=f.zero,x=f.width,w=f.comma,P=f.precision,O=f.trim,S=f.type;S==="n"?(w=!0,S="g"):Ky[S]||(P===void 0&&(P=12),O=!0,S="g"),(y||v==="0"&&g==="=")&&(y=!0,v="0",g="=");var E=(p&&p.prefix!==void 0?p.prefix:"")+(h==="$"?r:h==="#"&&/[boxX]/.test(S)?"0"+S.toLowerCase():""),C=(h==="$"?n:/[%p]/.test(S)?a:"")+(p&&p.suffix!==void 0?p.suffix:""),j=Ky[S],D=/[defgprs%]/.test(S);P=P===void 0?6:/[gprs]/.test(S)?Math.max(1,Math.min(21,P)):Math.max(0,Math.min(20,P));function R(_){var k=E,I=C,V,z,K;if(S==="c")I=j(_)+I,_="";else{_=+_;var T=_<0||1/_<0;if(_=isNaN(_)?l:j(Math.abs(_),P),O&&(_=nB(_)),T&&+_==0&&m!=="+"&&(T=!1),k=(T?m==="("?m:s:m==="-"||m==="("?"":m)+k,I=(S==="s"&&!isNaN(_)&&Ss!==void 0?Gy[8+Ss/3]:"")+I+(T&&m==="("?")":""),D){for(V=-1,z=_.length;++V<z;)if(K=_.charCodeAt(V),48>K||K>57){I=(K===46?o+_.slice(V+1):_.slice(V))+I,_=_.slice(0,V);break}}}w&&!y&&(_=t(_,1/0));var N=k.length+_.length+I.length,G=N<x?new Array(x-N+1).join(v):"";switch(w&&y&&(_=t(G+_,G.length?x-I.length:1/0),G=""),g){case"<":_=k+_+I+G;break;case"=":_=k+G+_+I;break;case"^":_=G.slice(0,N=G.length>>1)+k+_+I+G.slice(N);break;default:_=G+k+_+I;break}return i(_)}return R.toString=function(){return f+""},R}function u(f,p){var v=Math.max(-8,Math.min(8,Math.floor(co(p)/3)))*3,g=Math.pow(10,-v),m=c((f=ai(f),f.type="f",f),{suffix:Gy[8+v/3]});return function(h){return m(g*h)}}return{format:c,formatPrefix:u}}var Sa,Pp,QS;aB({thousands:",",grouping:[3],currency:["$",""]});function aB(e){return Sa=iB(e),Pp=Sa.format,QS=Sa.formatPrefix,Sa}function sB(e){return Math.max(0,-co(Math.abs(e)))}function lB(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(co(t)/3)))*3-co(Math.abs(e)))}function cB(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,co(t)-co(e))+1}function eO(e,t,r,n){var o=Xf(e,t,r),i;switch(n=ai(n??",f"),n.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(i=lB(o,a))&&(n.precision=i),QS(n,a)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(i=cB(o,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=i-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(i=sB(o))&&(n.precision=i-(n.type==="%")*2);break}}return Pp(n)}function Jr(e){var t=e.domain;return e.ticks=function(r){var n=t();return qf(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var o=t();return eO(o[0],o[o.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),o=0,i=n.length-1,a=n[o],s=n[i],l,c,u=10;for(s<a&&(c=a,a=s,s=c,c=o,o=i,i=c);u-- >0;){if(c=Yf(a,s,r),c===l)return n[o]=a,n[i]=s,t(n);if(c>0)a=Math.floor(a/c)*c,s=Math.ceil(s/c)*c;else if(c<0)a=Math.ceil(a*c)/c,s=Math.floor(s*c)/c;else break;l=c}return e},e}function tO(){var e=xp();return e.copy=function(){return ki(e,tO())},Rt.apply(e,arguments),Jr(e)}function rO(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,ws),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return rO(e).unknown(t)},e=arguments.length?Array.from(e,ws):[0,1],Jr(r)}function nO(e,t){e=e.slice();var r=0,n=e.length-1,o=e[r],i=e[n],a;return i<o&&(a=r,r=n,n=a,a=o,o=i,i=a),e[r]=t.floor(o),e[n]=t.ceil(i),e}function qy(e){return Math.log(e)}function Yy(e){return Math.exp(e)}function uB(e){return-Math.log(-e)}function fB(e){return-Math.exp(-e)}function dB(e){return isFinite(e)?+("1e"+e):e<0?0:e}function pB(e){return e===10?dB:e===Math.E?Math.exp:t=>Math.pow(e,t)}function vB(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function Xy(e){return(t,r)=>-e(-t,r)}function Sp(e){const t=e(qy,Yy),r=t.domain;let n=10,o,i;function a(){return o=vB(n),i=pB(n),r()[0]<0?(o=Xy(o),i=Xy(i),e(uB,fB)):e(qy,Yy),t}return t.base=function(s){return arguments.length?(n=+s,a()):n},t.domain=function(s){return arguments.length?(r(s),a()):r()},t.ticks=s=>{const l=r();let c=l[0],u=l[l.length-1];const f=u<c;f&&([c,u]=[u,c]);let p=o(c),v=o(u),g,m;const h=s==null?10:+s;let y=[];if(!(n%1)&&v-p<h){if(p=Math.floor(p),v=Math.ceil(v),c>0){for(;p<=v;++p)for(g=1;g<n;++g)if(m=p<0?g/i(-p):g*i(p),!(m<c)){if(m>u)break;y.push(m)}}else for(;p<=v;++p)for(g=n-1;g>=1;--g)if(m=p>0?g/i(-p):g*i(p),!(m<c)){if(m>u)break;y.push(m)}y.length*2<h&&(y=qf(c,u,h))}else y=qf(p,v,Math.min(v-p,h)).map(i);return f?y.reverse():y},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=ai(l)).precision==null&&(l.trim=!0),l=Pp(l)),s===1/0)return l;const c=Math.max(1,n*s/t.ticks().length);return u=>{let f=u/i(Math.round(o(u)));return f*n<n-.5&&(f*=n),f<=c?l(u):""}},t.nice=()=>r(nO(r(),{floor:s=>i(Math.floor(o(s))),ceil:s=>i(Math.ceil(o(s)))})),t}function oO(){const e=Sp(Ol()).domain([1,10]);return e.copy=()=>ki(e,oO()).base(e.base()),Rt.apply(e,arguments),e}function Zy(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Jy(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Op(e){var t=1,r=e(Zy(t),Jy(t));return r.constant=function(n){return arguments.length?e(Zy(t=+n),Jy(t)):t},Jr(r)}function iO(){var e=Op(Ol());return e.copy=function(){return ki(e,iO()).constant(e.constant())},Rt.apply(e,arguments)}function Qy(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function mB(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function hB(e){return e<0?-e*e:e*e}function Ep(e){var t=e(ut,ut),r=1;function n(){return r===1?e(ut,ut):r===.5?e(mB,hB):e(Qy(r),Qy(1/r))}return t.exponent=function(o){return arguments.length?(r=+o,n()):r},Jr(t)}function Cp(){var e=Ep(Ol());return e.copy=function(){return ki(e,Cp()).exponent(e.exponent())},Rt.apply(e,arguments),e}function gB(){return Cp.apply(null,arguments).exponent(.5)}function eb(e){return Math.sign(e)*e*e}function yB(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function aO(){var e=xp(),t=[0,1],r=!1,n;function o(i){var a=yB(e(i));return isNaN(a)?n:r?Math.round(a):a}return o.invert=function(i){return e.invert(eb(i))},o.domain=function(i){return arguments.length?(e.domain(i),o):e.domain()},o.range=function(i){return arguments.length?(e.range((t=Array.from(i,ws)).map(eb)),o):t.slice()},o.rangeRound=function(i){return o.range(i).round(!0)},o.round=function(i){return arguments.length?(r=!!i,o):r},o.clamp=function(i){return arguments.length?(e.clamp(i),o):e.clamp()},o.unknown=function(i){return arguments.length?(n=i,o):n},o.copy=function(){return aO(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},Rt.apply(o,arguments),Jr(o)}function sO(){var e=[],t=[],r=[],n;function o(){var a=0,s=Math.max(1,t.length);for(r=new Array(s-1);++a<s;)r[a-1]=Pz(e,a/s);return i}function i(a){return a==null||isNaN(a=+a)?n:t[Mi(r,a)]}return i.invertExtent=function(a){var s=t.indexOf(a);return s<0?[NaN,NaN]:[s>0?r[s-1]:e[0],s<r.length?r[s]:e[e.length-1]]},i.domain=function(a){if(!arguments.length)return e.slice();e=[];for(let s of a)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(Vr),o()},i.range=function(a){return arguments.length?(t=Array.from(a),o()):t.slice()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.quantiles=function(){return r.slice()},i.copy=function(){return sO().domain(e).range(t).unknown(n)},Rt.apply(i,arguments)}function lO(){var e=0,t=1,r=1,n=[.5],o=[0,1],i;function a(l){return l!=null&&l<=l?o[Mi(n,l,0,r)]:i}function s(){var l=-1;for(n=new Array(r);++l<r;)n[l]=((l+1)*t-(l-r)*e)/(r+1);return a}return a.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},a.range=function(l){return arguments.length?(r=(o=Array.from(l)).length-1,s()):o.slice()},a.invertExtent=function(l){var c=o.indexOf(l);return c<0?[NaN,NaN]:c<1?[e,n[0]]:c>=r?[n[r-1],t]:[n[c-1],n[c]]},a.unknown=function(l){return arguments.length&&(i=l),a},a.thresholds=function(){return n.slice()},a.copy=function(){return lO().domain([e,t]).range(o).unknown(i)},Rt.apply(Jr(a),arguments)}function cO(){var e=[.5],t=[0,1],r,n=1;function o(i){return i!=null&&i<=i?t[Mi(e,i,0,n)]:r}return o.domain=function(i){return arguments.length?(e=Array.from(i),n=Math.min(e.length,t.length-1),o):e.slice()},o.range=function(i){return arguments.length?(t=Array.from(i),n=Math.min(e.length,t.length-1),o):t.slice()},o.invertExtent=function(i){var a=t.indexOf(i);return[e[a-1],e[a]]},o.unknown=function(i){return arguments.length?(r=i,o):r},o.copy=function(){return cO().domain(e).range(t).unknown(r)},Rt.apply(o,arguments)}const zu=new Date,Bu=new Date;function Be(e,t,r,n){function o(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return o.floor=i=>(e(i=new Date(+i)),i),o.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),o.round=i=>{const a=o(i),s=o.ceil(i);return i-a<s-i?a:s},o.offset=(i,a)=>(t(i=new Date(+i),a==null?1:Math.floor(a)),i),o.range=(i,a,s)=>{const l=[];if(i=o.ceil(i),s=s==null?1:Math.floor(s),!(i<a)||!(s>0))return l;let c;do l.push(c=new Date(+i)),t(i,s),e(i);while(c<i&&i<a);return l},o.filter=i=>Be(a=>{if(a>=a)for(;e(a),!i(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!i(a););else for(;--s>=0;)for(;t(a,1),!i(a););}),r&&(o.count=(i,a)=>(zu.setTime(+i),Bu.setTime(+a),e(zu),e(Bu),Math.floor(r(zu,Bu))),o.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?o.filter(n?a=>n(a)%i===0:a=>o.count(0,a)%i===0):o)),o}const Os=Be(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Os.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Be(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Os);Os.range;const pr=1e3,kt=pr*60,vr=kt*60,yr=vr*24,Ap=yr*7,tb=yr*30,Vu=yr*365,mn=Be(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*pr)},(e,t)=>(t-e)/pr,e=>e.getUTCSeconds());mn.range;const _p=Be(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*pr)},(e,t)=>{e.setTime(+e+t*kt)},(e,t)=>(t-e)/kt,e=>e.getMinutes());_p.range;const Tp=Be(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*kt)},(e,t)=>(t-e)/kt,e=>e.getUTCMinutes());Tp.range;const Mp=Be(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*pr-e.getMinutes()*kt)},(e,t)=>{e.setTime(+e+t*vr)},(e,t)=>(t-e)/vr,e=>e.getHours());Mp.range;const jp=Be(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*vr)},(e,t)=>(t-e)/vr,e=>e.getUTCHours());jp.range;const Ni=Be(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*kt)/yr,e=>e.getDate()-1);Ni.range;const El=Be(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/yr,e=>e.getUTCDate()-1);El.range;const uO=Be(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/yr,e=>Math.floor(e/yr));uO.range;function Fn(e){return Be(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*kt)/Ap)}const Cl=Fn(0),Es=Fn(1),bB=Fn(2),xB=Fn(3),uo=Fn(4),wB=Fn(5),PB=Fn(6);Cl.range;Es.range;bB.range;xB.range;uo.range;wB.range;PB.range;function zn(e){return Be(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/Ap)}const Al=zn(0),Cs=zn(1),SB=zn(2),OB=zn(3),fo=zn(4),EB=zn(5),CB=zn(6);Al.range;Cs.range;SB.range;OB.range;fo.range;EB.range;CB.range;const kp=Be(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());kp.range;const Np=Be(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Np.range;const br=Be(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());br.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Be(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});br.range;const xr=Be(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());xr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Be(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});xr.range;function fO(e,t,r,n,o,i){const a=[[mn,1,pr],[mn,5,5*pr],[mn,15,15*pr],[mn,30,30*pr],[i,1,kt],[i,5,5*kt],[i,15,15*kt],[i,30,30*kt],[o,1,vr],[o,3,3*vr],[o,6,6*vr],[o,12,12*vr],[n,1,yr],[n,2,2*yr],[r,1,Ap],[t,1,tb],[t,3,3*tb],[e,1,Vu]];function s(c,u,f){const p=u<c;p&&([c,u]=[u,c]);const v=f&&typeof f.range=="function"?f:l(c,u,f),g=v?v.range(c,+u+1):[];return p?g.reverse():g}function l(c,u,f){const p=Math.abs(u-c)/f,v=vp(([,,h])=>h).right(a,p);if(v===a.length)return e.every(Xf(c/Vu,u/Vu,f));if(v===0)return Os.every(Math.max(Xf(c,u,f),1));const[g,m]=a[p/a[v-1][2]<a[v][2]/p?v-1:v];return g.every(m)}return[s,l]}const[AB,_B]=fO(xr,Np,Al,uO,jp,Tp),[TB,MB]=fO(br,kp,Cl,Ni,Mp,_p);function Wu(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 Ku(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 Lo(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function jB(e){var t=e.dateTime,r=e.date,n=e.time,o=e.periods,i=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=Fo(o),u=zo(o),f=Fo(i),p=zo(i),v=Fo(a),g=zo(a),m=Fo(s),h=zo(s),y=Fo(l),x=zo(l),w={a:K,A:T,b:N,B:G,c:null,d:sb,e:sb,f:eV,g:uV,G:dV,H:ZB,I:JB,j:QB,L:dO,m:tV,M:rV,p:Q,q:te,Q:ub,s:fb,S:nV,u:oV,U:iV,V:aV,w:sV,W:lV,x:null,X:null,y:cV,Y:fV,Z:pV,"%":cb},P={a:ne,A:re,b:le,B:Oe,c:null,d:lb,e:lb,f:gV,g:AV,G:TV,H:vV,I:mV,j:hV,L:vO,m:yV,M:bV,p:W,q:ue,Q:ub,s:fb,S:xV,u:wV,U:PV,V:SV,w:OV,W:EV,x:null,X:null,y:CV,Y:_V,Z:MV,"%":cb},O={a:D,A:R,b:_,B:k,c:I,d:ib,e:ib,f:GB,g:ob,G:nb,H:ab,I:ab,j:WB,L:HB,m:VB,M:KB,p:j,q:BB,Q:YB,s:XB,S:UB,u:RB,U:$B,V:LB,w:DB,W:FB,x:V,X:z,y:ob,Y:nb,Z:zB,"%":qB};w.x=S(r,w),w.X=S(n,w),w.c=S(t,w),P.x=S(r,P),P.X=S(n,P),P.c=S(t,P);function S($,H){return function(F){var L=[],de=-1,se=0,Xe=$.length,Ze,$t,Cm;for(F instanceof Date||(F=new Date(+F));++de<Xe;)$.charCodeAt(de)===37&&(L.push($.slice(se,de)),($t=rb[Ze=$.charAt(++de)])!=null?Ze=$.charAt(++de):$t=Ze==="e"?" ":"0",(Cm=H[Ze])&&(Ze=Cm(F,$t)),L.push(Ze),se=de+1);return L.push($.slice(se,de)),L.join("")}}function E($,H){return function(F){var L=Lo(1900,void 0,1),de=C(L,$,F+="",0),se,Xe;if(de!=F.length)return null;if("Q"in L)return new Date(L.Q);if("s"in L)return new Date(L.s*1e3+("L"in L?L.L:0));if(H&&!("Z"in L)&&(L.Z=0),"p"in L&&(L.H=L.H%12+L.p*12),L.m===void 0&&(L.m="q"in L?L.q:0),"V"in L){if(L.V<1||L.V>53)return null;"w"in L||(L.w=1),"Z"in L?(se=Ku(Lo(L.y,0,1)),Xe=se.getUTCDay(),se=Xe>4||Xe===0?Cs.ceil(se):Cs(se),se=El.offset(se,(L.V-1)*7),L.y=se.getUTCFullYear(),L.m=se.getUTCMonth(),L.d=se.getUTCDate()+(L.w+6)%7):(se=Wu(Lo(L.y,0,1)),Xe=se.getDay(),se=Xe>4||Xe===0?Es.ceil(se):Es(se),se=Ni.offset(se,(L.V-1)*7),L.y=se.getFullYear(),L.m=se.getMonth(),L.d=se.getDate()+(L.w+6)%7)}else("W"in L||"U"in L)&&("w"in L||(L.w="u"in L?L.u%7:"W"in L?1:0),Xe="Z"in L?Ku(Lo(L.y,0,1)).getUTCDay():Wu(Lo(L.y,0,1)).getDay(),L.m=0,L.d="W"in L?(L.w+6)%7+L.W*7-(Xe+5)%7:L.w+L.U*7-(Xe+6)%7);return"Z"in L?(L.H+=L.Z/100|0,L.M+=L.Z%100,Ku(L)):Wu(L)}}function C($,H,F,L){for(var de=0,se=H.length,Xe=F.length,Ze,$t;de<se;){if(L>=Xe)return-1;if(Ze=H.charCodeAt(de++),Ze===37){if(Ze=H.charAt(de++),$t=O[Ze in rb?H.charAt(de++):Ze],!$t||(L=$t($,F,L))<0)return-1}else if(Ze!=F.charCodeAt(L++))return-1}return L}function j($,H,F){var L=c.exec(H.slice(F));return L?($.p=u.get(L[0].toLowerCase()),F+L[0].length):-1}function D($,H,F){var L=v.exec(H.slice(F));return L?($.w=g.get(L[0].toLowerCase()),F+L[0].length):-1}function R($,H,F){var L=f.exec(H.slice(F));return L?($.w=p.get(L[0].toLowerCase()),F+L[0].length):-1}function _($,H,F){var L=y.exec(H.slice(F));return L?($.m=x.get(L[0].toLowerCase()),F+L[0].length):-1}function k($,H,F){var L=m.exec(H.slice(F));return L?($.m=h.get(L[0].toLowerCase()),F+L[0].length):-1}function I($,H,F){return C($,t,H,F)}function V($,H,F){return C($,r,H,F)}function z($,H,F){return C($,n,H,F)}function K($){return a[$.getDay()]}function T($){return i[$.getDay()]}function N($){return l[$.getMonth()]}function G($){return s[$.getMonth()]}function Q($){return o[+($.getHours()>=12)]}function te($){return 1+~~($.getMonth()/3)}function ne($){return a[$.getUTCDay()]}function re($){return i[$.getUTCDay()]}function le($){return l[$.getUTCMonth()]}function Oe($){return s[$.getUTCMonth()]}function W($){return o[+($.getUTCHours()>=12)]}function ue($){return 1+~~($.getUTCMonth()/3)}return{format:function($){var H=S($+="",w);return H.toString=function(){return $},H},parse:function($){var H=E($+="",!1);return H.toString=function(){return $},H},utcFormat:function($){var H=S($+="",P);return H.toString=function(){return $},H},utcParse:function($){var H=E($+="",!0);return H.toString=function(){return $},H}}}var rb={"-":"",_:" ",0:"0"},qe=/^\s*\d+/,kB=/^%/,NB=/[\\^$*+?|[\]().{}]/g;function pe(e,t,r){var n=e<0?"-":"",o=(n?-e:e)+"",i=o.length;return n+(i<r?new Array(r-i+1).join(t)+o:o)}function IB(e){return e.replace(NB,"\\$&")}function Fo(e){return new RegExp("^(?:"+e.map(IB).join("|")+")","i")}function zo(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function DB(e,t,r){var n=qe.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function RB(e,t,r){var n=qe.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function $B(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function LB(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function FB(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function nb(e,t,r){var n=qe.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function ob(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function zB(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function BB(e,t,r){var n=qe.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function VB(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function ib(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function WB(e,t,r){var n=qe.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function ab(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function KB(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function UB(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function HB(e,t,r){var n=qe.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function GB(e,t,r){var n=qe.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function qB(e,t,r){var n=kB.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function YB(e,t,r){var n=qe.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function XB(e,t,r){var n=qe.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function sb(e,t){return pe(e.getDate(),t,2)}function ZB(e,t){return pe(e.getHours(),t,2)}function JB(e,t){return pe(e.getHours()%12||12,t,2)}function QB(e,t){return pe(1+Ni.count(br(e),e),t,3)}function dO(e,t){return pe(e.getMilliseconds(),t,3)}function eV(e,t){return dO(e,t)+"000"}function tV(e,t){return pe(e.getMonth()+1,t,2)}function rV(e,t){return pe(e.getMinutes(),t,2)}function nV(e,t){return pe(e.getSeconds(),t,2)}function oV(e){var t=e.getDay();return t===0?7:t}function iV(e,t){return pe(Cl.count(br(e)-1,e),t,2)}function pO(e){var t=e.getDay();return t>=4||t===0?uo(e):uo.ceil(e)}function aV(e,t){return e=pO(e),pe(uo.count(br(e),e)+(br(e).getDay()===4),t,2)}function sV(e){return e.getDay()}function lV(e,t){return pe(Es.count(br(e)-1,e),t,2)}function cV(e,t){return pe(e.getFullYear()%100,t,2)}function uV(e,t){return e=pO(e),pe(e.getFullYear()%100,t,2)}function fV(e,t){return pe(e.getFullYear()%1e4,t,4)}function dV(e,t){var r=e.getDay();return e=r>=4||r===0?uo(e):uo.ceil(e),pe(e.getFullYear()%1e4,t,4)}function pV(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+pe(t/60|0,"0",2)+pe(t%60,"0",2)}function lb(e,t){return pe(e.getUTCDate(),t,2)}function vV(e,t){return pe(e.getUTCHours(),t,2)}function mV(e,t){return pe(e.getUTCHours()%12||12,t,2)}function hV(e,t){return pe(1+El.count(xr(e),e),t,3)}function vO(e,t){return pe(e.getUTCMilliseconds(),t,3)}function gV(e,t){return vO(e,t)+"000"}function yV(e,t){return pe(e.getUTCMonth()+1,t,2)}function bV(e,t){return pe(e.getUTCMinutes(),t,2)}function xV(e,t){return pe(e.getUTCSeconds(),t,2)}function wV(e){var t=e.getUTCDay();return t===0?7:t}function PV(e,t){return pe(Al.count(xr(e)-1,e),t,2)}function mO(e){var t=e.getUTCDay();return t>=4||t===0?fo(e):fo.ceil(e)}function SV(e,t){return e=mO(e),pe(fo.count(xr(e),e)+(xr(e).getUTCDay()===4),t,2)}function OV(e){return e.getUTCDay()}function EV(e,t){return pe(Cs.count(xr(e)-1,e),t,2)}function CV(e,t){return pe(e.getUTCFullYear()%100,t,2)}function AV(e,t){return e=mO(e),pe(e.getUTCFullYear()%100,t,2)}function _V(e,t){return pe(e.getUTCFullYear()%1e4,t,4)}function TV(e,t){var r=e.getUTCDay();return e=r>=4||r===0?fo(e):fo.ceil(e),pe(e.getUTCFullYear()%1e4,t,4)}function MV(){return"+0000"}function cb(){return"%"}function ub(e){return+e}function fb(e){return Math.floor(+e/1e3)}var Yn,hO,gO;jV({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function jV(e){return Yn=jB(e),hO=Yn.format,Yn.parse,gO=Yn.utcFormat,Yn.utcParse,Yn}function kV(e){return new Date(e)}function NV(e){return e instanceof Date?+e:+new Date(+e)}function Ip(e,t,r,n,o,i,a,s,l,c){var u=xp(),f=u.invert,p=u.domain,v=c(".%L"),g=c(":%S"),m=c("%I:%M"),h=c("%I %p"),y=c("%a %d"),x=c("%b %d"),w=c("%B"),P=c("%Y");function O(S){return(l(S)<S?v:s(S)<S?g:a(S)<S?m:i(S)<S?h:n(S)<S?o(S)<S?y:x:r(S)<S?w:P)(S)}return u.invert=function(S){return new Date(f(S))},u.domain=function(S){return arguments.length?p(Array.from(S,NV)):p().map(kV)},u.ticks=function(S){var E=p();return e(E[0],E[E.length-1],S??10)},u.tickFormat=function(S,E){return E==null?O:c(E)},u.nice=function(S){var E=p();return(!S||typeof S.range!="function")&&(S=t(E[0],E[E.length-1],S??10)),S?p(nO(E,S)):u},u.copy=function(){return ki(u,Ip(e,t,r,n,o,i,a,s,l,c))},u}function IV(){return Rt.apply(Ip(TB,MB,br,kp,Cl,Ni,Mp,_p,mn,hO).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function DV(){return Rt.apply(Ip(AB,_B,xr,Np,Al,El,jp,Tp,mn,gO).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function _l(){var e=0,t=1,r,n,o,i,a=ut,s=!1,l;function c(f){return f==null||isNaN(f=+f)?l:a(o===0?.5:(f=(i(f)-r)*o,s?Math.max(0,Math.min(1,f)):f))}c.domain=function(f){return arguments.length?([e,t]=f,r=i(e=+e),n=i(t=+t),o=r===n?0:1/(n-r),c):[e,t]},c.clamp=function(f){return arguments.length?(s=!!f,c):s},c.interpolator=function(f){return arguments.length?(a=f,c):a};function u(f){return function(p){var v,g;return arguments.length?([v,g]=p,a=f(v,g),c):[a(0),a(1)]}}return c.range=u(bo),c.rangeRound=u(bp),c.unknown=function(f){return arguments.length?(l=f,c):l},function(f){return i=f,r=f(e),n=f(t),o=r===n?0:1/(n-r),c}}function Qr(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function yO(){var e=Jr(_l()(ut));return e.copy=function(){return Qr(e,yO())},Mr.apply(e,arguments)}function bO(){var e=Sp(_l()).domain([1,10]);return e.copy=function(){return Qr(e,bO()).base(e.base())},Mr.apply(e,arguments)}function xO(){var e=Op(_l());return e.copy=function(){return Qr(e,xO()).constant(e.constant())},Mr.apply(e,arguments)}function Dp(){var e=Ep(_l());return e.copy=function(){return Qr(e,Dp()).exponent(e.exponent())},Mr.apply(e,arguments)}function RV(){return Dp.apply(null,arguments).exponent(.5)}function wO(){var e=[],t=ut;function r(n){if(n!=null&&!isNaN(n=+n))return t((Mi(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let o of n)o!=null&&!isNaN(o=+o)&&e.push(o);return e.sort(Vr),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,o)=>t(o/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(o,i)=>wz(e,i/n))},r.copy=function(){return wO(t).domain(e)},Mr.apply(r,arguments)}function Tl(){var e=0,t=.5,r=1,n=1,o,i,a,s,l,c=ut,u,f=!1,p;function v(m){return isNaN(m=+m)?p:(m=.5+((m=+u(m))-i)*(n*m<n*i?s:l),c(f?Math.max(0,Math.min(1,m)):m))}v.domain=function(m){return arguments.length?([e,t,r]=m,o=u(e=+e),i=u(t=+t),a=u(r=+r),s=o===i?0:.5/(i-o),l=i===a?0:.5/(a-i),n=i<o?-1:1,v):[e,t,r]},v.clamp=function(m){return arguments.length?(f=!!m,v):f},v.interpolator=function(m){return arguments.length?(c=m,v):c};function g(m){return function(h){var y,x,w;return arguments.length?([y,x,w]=h,c=qz(m,[y,x,w]),v):[c(0),c(.5),c(1)]}}return v.range=g(bo),v.rangeRound=g(bp),v.unknown=function(m){return arguments.length?(p=m,v):p},function(m){return u=m,o=m(e),i=m(t),a=m(r),s=o===i?0:.5/(i-o),l=i===a?0:.5/(a-i),n=i<o?-1:1,v}}function PO(){var e=Jr(Tl()(ut));return e.copy=function(){return Qr(e,PO())},Mr.apply(e,arguments)}function SO(){var e=Sp(Tl()).domain([.1,1,10]);return e.copy=function(){return Qr(e,SO()).base(e.base())},Mr.apply(e,arguments)}function OO(){var e=Op(Tl());return e.copy=function(){return Qr(e,OO()).constant(e.constant())},Mr.apply(e,arguments)}function Rp(){var e=Ep(Tl());return e.copy=function(){return Qr(e,Rp()).exponent(e.exponent())},Mr.apply(e,arguments)}function $V(){return Rp.apply(null,arguments).exponent(.5)}const Ko=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:hp,scaleDiverging:PO,scaleDivergingLog:SO,scaleDivergingPow:Rp,scaleDivergingSqrt:$V,scaleDivergingSymlog:OO,scaleIdentity:rO,scaleImplicit:Zf,scaleLinear:tO,scaleLog:oO,scaleOrdinal:mp,scalePoint:Oz,scalePow:Cp,scaleQuantile:sO,scaleQuantize:lO,scaleRadial:aO,scaleSequential:yO,scaleSequentialLog:bO,scaleSequentialPow:Dp,scaleSequentialQuantile:wO,scaleSequentialSqrt:RV,scaleSequentialSymlog:xO,scaleSqrt:gB,scaleSymlog:iO,scaleThreshold:cO,scaleTime:IV,scaleUtc:DV,tickFormat:eO},Symbol.toStringTag,{value:"Module"}));var jr=e=>e.chartData,Ml=M([jr],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),$p=(e,t,r,n)=>n?Ml(e):jr(e),LV=(e,t,r)=>r?Ml(e):jr(e);function wr(e){if(Array.isArray(e)&&e.length===2){var[t,r]=e;if(ce(t)&&ce(r))return!0}return!1}function db(e,t,r){return r?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function EO(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[r,n]=e,o,i;if(ce(r))o=r;else if(typeof r=="function")return;if(ce(n))i=n;else if(typeof n=="function")return;var a=[o,i];if(wr(a))return a}}function FV(e,t,r){if(!(!r&&t==null)){if(typeof e=="function"&&t!=null)try{var n=e(t,r);if(wr(n))return db(n,t,r)}catch{}if(Array.isArray(e)&&e.length===2){var[o,i]=e,a,s;if(o==="auto")t!=null&&(a=Math.min(...t));else if(q(o))a=o;else if(typeof o=="function")try{t!=null&&(a=o(t?.[0]))}catch{}else if(typeof o=="string"&&Pg.test(o)){var l=Pg.exec(o);if(l==null||l[1]==null||t==null)a=void 0;else{var c=+l[1];a=t[0]-c}}else a=t?.[0];if(i==="auto")t!=null&&(s=Math.max(...t));else if(q(i))s=i;else if(typeof i=="function")try{t!=null&&(s=i(t?.[1]))}catch{}else if(typeof i=="string"&&Sg.test(i)){var u=Sg.exec(i);if(u==null||u[1]==null||t==null)s=void 0;else{var f=+u[1];s=t[1]+f}}else s=t?.[1];var p=[a,s];if(wr(p))return t==null?p:db(p,t,r)}}}var xo=1e9,zV={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Fp,Ae=!0,Dt="[DecimalError] ",wn=Dt+"Invalid argument: ",Lp=Dt+"Exponent out of range: ",wo=Math.floor,fn=Math.pow,BV=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,wt,Ue=1e7,Se=7,CO=9007199254740991,As=wo(CO/Se),Y={};Y.absoluteValue=Y.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};Y.comparedTo=Y.cmp=function(e){var t,r,n,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(n=i.d.length,o=e.d.length,t=0,r=n<o?n:o;t<r;++t)if(i.d[t]!==e.d[t])return i.d[t]>e.d[t]^i.s<0?1:-1;return n===o?0:n>o^i.s<0?1:-1};Y.decimalPlaces=Y.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Se;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};Y.dividedBy=Y.div=function(e){return mr(this,new this.constructor(e))};Y.dividedToIntegerBy=Y.idiv=function(e){var t=this,r=t.constructor;return xe(mr(t,new r(e),0,1),r.precision)};Y.equals=Y.eq=function(e){return!this.cmp(e)};Y.exponent=function(){return Re(this)};Y.greaterThan=Y.gt=function(e){return this.cmp(e)>0};Y.greaterThanOrEqualTo=Y.gte=function(e){return this.cmp(e)>=0};Y.isInteger=Y.isint=function(){return this.e>this.d.length-2};Y.isNegative=Y.isneg=function(){return this.s<0};Y.isPositive=Y.ispos=function(){return this.s>0};Y.isZero=function(){return this.s===0};Y.lessThan=Y.lt=function(e){return this.cmp(e)<0};Y.lessThanOrEqualTo=Y.lte=function(e){return this.cmp(e)<1};Y.logarithm=Y.log=function(e){var t,r=this,n=r.constructor,o=n.precision,i=o+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(wt))throw Error(Dt+"NaN");if(r.s<1)throw Error(Dt+(r.s?"NaN":"-Infinity"));return r.eq(wt)?new n(0):(Ae=!1,t=mr(si(r,i),si(e,i),i),Ae=!0,xe(t,o))};Y.minus=Y.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?TO(t,e):AO(t,(e.s=-e.s,e))};Y.modulo=Y.mod=function(e){var t,r=this,n=r.constructor,o=n.precision;if(e=new n(e),!e.s)throw Error(Dt+"NaN");return r.s?(Ae=!1,t=mr(r,e,0,1).times(e),Ae=!0,r.minus(t)):xe(new n(r),o)};Y.naturalExponential=Y.exp=function(){return _O(this)};Y.naturalLogarithm=Y.ln=function(){return si(this)};Y.negated=Y.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Y.plus=Y.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?AO(t,e):TO(t,(e.s=-e.s,e))};Y.precision=Y.sd=function(e){var t,r,n,o=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(wn+e);if(t=Re(o)+1,n=o.d.length-1,r=n*Se+1,n=o.d[n],n){for(;n%10==0;n/=10)r--;for(n=o.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};Y.squareRoot=Y.sqrt=function(){var e,t,r,n,o,i,a,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(Dt+"NaN")}for(e=Re(s),Ae=!1,o=Math.sqrt(+s),o==0||o==1/0?(t=Qt(s.d),(t.length+e)%2==0&&(t+="0"),o=Math.sqrt(t),e=wo((e+1)/2)-(e<0||e%2),o==1/0?t="5e"+e:(t=o.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new l(t)):n=new l(o.toString()),r=l.precision,o=a=r+3;;)if(i=n,n=i.plus(mr(s,i,a+2)).times(.5),Qt(i.d).slice(0,a)===(t=Qt(n.d)).slice(0,a)){if(t=t.slice(a-3,a+1),o==a&&t=="4999"){if(xe(i,r+1,0),i.times(i).eq(s)){n=i;break}}else if(t!="9999")break;a+=4}return Ae=!0,xe(n,r)};Y.times=Y.mul=function(e){var t,r,n,o,i,a,s,l,c,u=this,f=u.constructor,p=u.d,v=(e=new f(e)).d;if(!u.s||!e.s)return new f(0);for(e.s*=u.s,r=u.e+e.e,l=p.length,c=v.length,l<c&&(i=p,p=v,v=i,a=l,l=c,c=a),i=[],a=l+c,n=a;n--;)i.push(0);for(n=c;--n>=0;){for(t=0,o=l+n;o>n;)s=i[o]+v[n]*p[o-n-1]+t,i[o--]=s%Ue|0,t=s/Ue|0;i[o]=(i[o]+t)%Ue|0}for(;!i[--a];)i.pop();return t?++r:i.shift(),e.d=i,e.e=r,Ae?xe(e,f.precision):e};Y.toDecimalPlaces=Y.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(ar(e,0,xo),t===void 0?t=n.rounding:ar(t,0,8),xe(r,e+Re(r)+1,t))};Y.toExponential=function(e,t){var r,n=this,o=n.constructor;return e===void 0?r=Mn(n,!0):(ar(e,0,xo),t===void 0?t=o.rounding:ar(t,0,8),n=xe(new o(n),e+1,t),r=Mn(n,!0,e+1)),r};Y.toFixed=function(e,t){var r,n,o=this,i=o.constructor;return e===void 0?Mn(o):(ar(e,0,xo),t===void 0?t=i.rounding:ar(t,0,8),n=xe(new i(o),e+Re(o)+1,t),r=Mn(n.abs(),!1,e+Re(n)+1),o.isneg()&&!o.isZero()?"-"+r:r)};Y.toInteger=Y.toint=function(){var e=this,t=e.constructor;return xe(new t(e),Re(e)+1,t.rounding)};Y.toNumber=function(){return+this};Y.toPower=Y.pow=function(e){var t,r,n,o,i,a,s=this,l=s.constructor,c=12,u=+(e=new l(e));if(!e.s)return new l(wt);if(s=new l(s),!s.s){if(e.s<1)throw Error(Dt+"Infinity");return s}if(s.eq(wt))return s;if(n=l.precision,e.eq(wt))return xe(s,n);if(t=e.e,r=e.d.length-1,a=t>=r,i=s.s,a){if((r=u<0?-u:u)<=CO){for(o=new l(wt),t=Math.ceil(n/Se+4),Ae=!1;r%2&&(o=o.times(s),vb(o.d,t)),r=wo(r/2),r!==0;)s=s.times(s),vb(s.d,t);return Ae=!0,e.s<0?new l(wt).div(o):xe(o,n)}}else if(i<0)throw Error(Dt+"NaN");return i=i<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,Ae=!1,o=e.times(si(s,n+c)),Ae=!0,o=_O(o),o.s=i,o};Y.toPrecision=function(e,t){var r,n,o=this,i=o.constructor;return e===void 0?(r=Re(o),n=Mn(o,r<=i.toExpNeg||r>=i.toExpPos)):(ar(e,1,xo),t===void 0?t=i.rounding:ar(t,0,8),o=xe(new i(o),e,t),r=Re(o),n=Mn(o,e<=r||r<=i.toExpNeg,e)),n};Y.toSignificantDigits=Y.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(ar(e,1,xo),t===void 0?t=n.rounding:ar(t,0,8)),xe(new n(r),e,t)};Y.toString=Y.valueOf=Y.val=Y.toJSON=Y[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Re(e),r=e.constructor;return Mn(e,t<=r.toExpNeg||t>=r.toExpPos)};function AO(e,t){var r,n,o,i,a,s,l,c,u=e.constructor,f=u.precision;if(!e.s||!t.s)return t.s||(t=new u(e)),Ae?xe(t,f):t;if(l=e.d,c=t.d,a=e.e,o=t.e,l=l.slice(),i=a-o,i){for(i<0?(n=l,i=-i,s=c.length):(n=c,o=a,s=l.length),a=Math.ceil(f/Se),s=a>s?a+1:s+1,i>s&&(i=s,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for(s=l.length,i=c.length,s-i<0&&(i=s,n=c,c=l,l=n),r=0;i;)r=(l[--i]=l[i]+c[i]+r)/Ue|0,l[i]%=Ue;for(r&&(l.unshift(r),++o),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=o,Ae?xe(t,f):t}function ar(e,t,r){if(e!==~~e||e<t||e>r)throw Error(wn+e)}function Qt(e){var t,r,n,o=e.length-1,i="",a=e[0];if(o>0){for(i+=a,t=1;t<o;t++)n=e[t]+"",r=Se-n.length,r&&(i+=Lr(r)),i+=n;a=e[t],n=a+"",r=Se-n.length,r&&(i+=Lr(r))}else if(a===0)return"0";for(;a%10===0;)a/=10;return i+a}var mr=(function(){function e(n,o){var i,a=0,s=n.length;for(n=n.slice();s--;)i=n[s]*o+a,n[s]=i%Ue|0,a=i/Ue|0;return a&&n.unshift(a),n}function t(n,o,i,a){var s,l;if(i!=a)l=i>a?1:-1;else for(s=l=0;s<i;s++)if(n[s]!=o[s]){l=n[s]>o[s]?1:-1;break}return l}function r(n,o,i){for(var a=0;i--;)n[i]-=a,a=n[i]<o[i]?1:0,n[i]=a*Ue+n[i]-o[i];for(;!n[0]&&n.length>1;)n.shift()}return function(n,o,i,a){var s,l,c,u,f,p,v,g,m,h,y,x,w,P,O,S,E,C,j=n.constructor,D=n.s==o.s?1:-1,R=n.d,_=o.d;if(!n.s)return new j(n);if(!o.s)throw Error(Dt+"Division by zero");for(l=n.e-o.e,E=_.length,O=R.length,v=new j(D),g=v.d=[],c=0;_[c]==(R[c]||0);)++c;if(_[c]>(R[c]||0)&&--l,i==null?x=i=j.precision:a?x=i+(Re(n)-Re(o))+1:x=i,x<0)return new j(0);if(x=x/Se+2|0,c=0,E==1)for(u=0,_=_[0],x++;(c<O||u)&&x--;c++)w=u*Ue+(R[c]||0),g[c]=w/_|0,u=w%_|0;else{for(u=Ue/(_[0]+1)|0,u>1&&(_=e(_,u),R=e(R,u),E=_.length,O=R.length),P=E,m=R.slice(0,E),h=m.length;h<E;)m[h++]=0;C=_.slice(),C.unshift(0),S=_[0],_[1]>=Ue/2&&++S;do u=0,s=t(_,m,E,h),s<0?(y=m[0],E!=h&&(y=y*Ue+(m[1]||0)),u=y/S|0,u>1?(u>=Ue&&(u=Ue-1),f=e(_,u),p=f.length,h=m.length,s=t(f,m,p,h),s==1&&(u--,r(f,E<p?C:_,p))):(u==0&&(s=u=1),f=_.slice()),p=f.length,p<h&&f.unshift(0),r(m,f,h),s==-1&&(h=m.length,s=t(_,m,E,h),s<1&&(u++,r(m,E<h?C:_,h))),h=m.length):s===0&&(u++,m=[0]),g[c++]=u,s&&m[0]?m[h++]=R[P]||0:(m=[R[P]],h=1);while((P++<O||m[0]!==void 0)&&x--)}return g[0]||g.shift(),v.e=l,xe(v,a?i+Re(v)+1:i)}})();function _O(e,t){var r,n,o,i,a,s,l=0,c=0,u=e.constructor,f=u.precision;if(Re(e)>16)throw Error(Lp+Re(e));if(!e.s)return new u(wt);for(Ae=!1,s=f,a=new u(.03125);e.abs().gte(.1);)e=e.times(a),c+=5;for(n=Math.log(fn(2,c))/Math.LN10*2+5|0,s+=n,r=o=i=new u(wt),u.precision=s;;){if(o=xe(o.times(e),s),r=r.times(++l),a=i.plus(mr(o,r,s)),Qt(a.d).slice(0,s)===Qt(i.d).slice(0,s)){for(;c--;)i=xe(i.times(i),s);return u.precision=f,t==null?(Ae=!0,xe(i,f)):i}i=a}}function Re(e){for(var t=e.e*Se,r=e.d[0];r>=10;r/=10)t++;return t}function Uu(e,t,r){if(t>e.LN10.sd())throw Ae=!0,r&&(e.precision=r),Error(Dt+"LN10 precision limit exceeded");return xe(new e(e.LN10),t)}function Lr(e){for(var t="";e--;)t+="0";return t}function si(e,t){var r,n,o,i,a,s,l,c,u,f=1,p=10,v=e,g=v.d,m=v.constructor,h=m.precision;if(v.s<1)throw Error(Dt+(v.s?"NaN":"-Infinity"));if(v.eq(wt))return new m(0);if(t==null?(Ae=!1,c=h):c=t,v.eq(10))return t==null&&(Ae=!0),Uu(m,c);if(c+=p,m.precision=c,r=Qt(g),n=r.charAt(0),i=Re(v),Math.abs(i)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)v=v.times(e),r=Qt(v.d),n=r.charAt(0),f++;i=Re(v),n>1?(v=new m("0."+r),i++):v=new m(n+"."+r.slice(1))}else return l=Uu(m,c+2,h).times(i+""),v=si(new m(n+"."+r.slice(1)),c-p).plus(l),m.precision=h,t==null?(Ae=!0,xe(v,h)):v;for(s=a=v=mr(v.minus(wt),v.plus(wt),c),u=xe(v.times(v),c),o=3;;){if(a=xe(a.times(u),c),l=s.plus(mr(a,new m(o),c)),Qt(l.d).slice(0,c)===Qt(s.d).slice(0,c))return s=s.times(2),i!==0&&(s=s.plus(Uu(m,c+2,h).times(i+""))),s=mr(s,new m(f),c),m.precision=h,t==null?(Ae=!0,xe(s,h)):s;s=l,o+=2}}function pb(e,t){var r,n,o;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(o=t.length;t.charCodeAt(o-1)===48;)--o;if(t=t.slice(n,o),t){if(o-=n,r=r-n-1,e.e=wo(r/Se),e.d=[],n=(r+1)%Se,r<0&&(n+=Se),n<o){for(n&&e.d.push(+t.slice(0,n)),o-=Se;n<o;)e.d.push(+t.slice(n,n+=Se));t=t.slice(n),n=Se-t.length}else n-=o;for(;n--;)t+="0";if(e.d.push(+t),Ae&&(e.e>As||e.e<-As))throw Error(Lp+r)}else e.s=0,e.e=0,e.d=[0];return e}function xe(e,t,r){var n,o,i,a,s,l,c,u,f=e.d;for(a=1,i=f[0];i>=10;i/=10)a++;if(n=t-a,n<0)n+=Se,o=t,c=f[u=0];else{if(u=Math.ceil((n+1)/Se),i=f.length,u>=i)return e;for(c=i=f[u],a=1;i>=10;i/=10)a++;n%=Se,o=n-Se+a}if(r!==void 0&&(i=fn(10,a-o-1),s=c/i%10|0,l=t<0||f[u+1]!==void 0||c%i,l=r<4?(s||l)&&(r==0||r==(e.s<0?3:2)):s>5||s==5&&(r==4||l||r==6&&(n>0?o>0?c/fn(10,a-o):0:f[u-1])%10&1||r==(e.s<0?8:7))),t<1||!f[0])return l?(i=Re(e),f.length=1,t=t-i-1,f[0]=fn(10,(Se-t%Se)%Se),e.e=wo(-t/Se)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(n==0?(f.length=u,i=1,u--):(f.length=u+1,i=fn(10,Se-n),f[u]=o>0?(c/fn(10,a-o)%fn(10,o)|0)*i:0),l)for(;;)if(u==0){(f[0]+=i)==Ue&&(f[0]=1,++e.e);break}else{if(f[u]+=i,f[u]!=Ue)break;f[u--]=0,i=1}for(n=f.length;f[--n]===0;)f.pop();if(Ae&&(e.e>As||e.e<-As))throw Error(Lp+Re(e));return e}function TO(e,t){var r,n,o,i,a,s,l,c,u,f,p=e.constructor,v=p.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new p(e),Ae?xe(t,v):t;if(l=e.d,f=t.d,n=t.e,c=e.e,l=l.slice(),a=c-n,a){for(u=a<0,u?(r=l,a=-a,s=f.length):(r=f,n=c,s=l.length),o=Math.max(Math.ceil(v/Se),s)+2,a>o&&(a=o,r.length=1),r.reverse(),o=a;o--;)r.push(0);r.reverse()}else{for(o=l.length,s=f.length,u=o<s,u&&(s=o),o=0;o<s;o++)if(l[o]!=f[o]){u=l[o]<f[o];break}a=0}for(u&&(r=l,l=f,f=r,t.s=-t.s),s=l.length,o=f.length-s;o>0;--o)l[s++]=0;for(o=f.length;o>a;){if(l[--o]<f[o]){for(i=o;i&&l[--i]===0;)l[i]=Ue-1;--l[i],l[o]+=Ue}l[o]-=f[o]}for(;l[--s]===0;)l.pop();for(;l[0]===0;l.shift())--n;return l[0]?(t.d=l,t.e=n,Ae?xe(t,v):t):new p(0)}function Mn(e,t,r){var n,o=Re(e),i=Qt(e.d),a=i.length;return t?(r&&(n=r-a)>0?i=i.charAt(0)+"."+i.slice(1)+Lr(n):a>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(o<0?"e":"e+")+o):o<0?(i="0."+Lr(-o-1)+i,r&&(n=r-a)>0&&(i+=Lr(n))):o>=a?(i+=Lr(o+1-a),r&&(n=r-o-1)>0&&(i=i+"."+Lr(n))):((n=o+1)<a&&(i=i.slice(0,n)+"."+i.slice(n)),r&&(n=r-a)>0&&(o+1===a&&(i+="."),i+=Lr(n))),e.s<0?"-"+i:i}function vb(e,t){if(e.length>t)return e.length=t,!0}function MO(e){var t,r,n;function o(i){var a=this;if(!(a instanceof o))return new o(i);if(a.constructor=o,i instanceof o){a.s=i.s,a.e=i.e,a.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(wn+i);if(i>0)a.s=1;else if(i<0)i=-i,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(i===~~i&&i<1e7){a.e=0,a.d=[i];return}return pb(a,i.toString())}else if(typeof i!="string")throw Error(wn+i);if(i.charCodeAt(0)===45?(i=i.slice(1),a.s=-1):a.s=1,BV.test(i))pb(a,i);else throw Error(wn+i)}if(o.prototype=Y,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.clone=MO,o.config=o.set=VV,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return o.config(e),o}function VV(e){if(!e||typeof e!="object")throw Error(Dt+"Object expected");var t,r,n,o=["precision",1,xo,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<o.length;t+=3)if((n=e[r=o[t]])!==void 0)if(wo(n)===n&&n>=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(wn+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(wn+r+": "+n);return this}var Fp=MO(zV);wt=new Fp(1);const he=Fp;function jO(e){var t;return e===0?t=1:t=Math.floor(new he(e).abs().log(10).toNumber())+1,t}function kO(e,t,r){for(var n=new he(e),o=0,i=[];n.lt(t)&&o<1e5;)i.push(n.toNumber()),n=n.add(r),o++;return i}var NO=e=>{var[t,r]=e,[n,o]=[t,r];return t>r&&([n,o]=[r,t]),[n,o]},IO=(e,t,r)=>{if(e.lte(0))return new he(0);var n=jO(e.toNumber()),o=new he(10).pow(n),i=e.div(o),a=n!==1?.05:.1,s=new he(Math.ceil(i.div(a).toNumber())).add(r).mul(a),l=s.mul(o);return t?new he(l.toNumber()):new he(Math.ceil(l.toNumber()))},WV=(e,t,r)=>{var n=new he(1),o=new he(e);if(!o.isint()&&r){var i=Math.abs(e);i<1?(n=new he(10).pow(jO(e)-1),o=new he(Math.floor(o.div(n).toNumber())).mul(n)):i>1&&(o=new he(Math.floor(e)))}else e===0?o=new he(Math.floor((t-1)/2)):r||(o=new he(Math.floor(e)));for(var a=Math.floor((t-1)/2),s=[],l=0;l<t;l++)s.push(o.add(new he(l-a).mul(n)).toNumber());return s},DO=function(t,r,n,o){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((r-t)/(n-1)))return{step:new he(0),tickMin:new he(0),tickMax:new he(0)};var a=IO(new he(r).sub(t).div(n-1),o,i),s;t<=0&&r>=0?s=new he(0):(s=new he(t).add(r).div(2),s=s.sub(new he(s).mod(a)));var l=Math.ceil(s.sub(t).div(a).toNumber()),c=Math.ceil(new he(r).sub(s).div(a).toNumber()),u=l+c+1;return u>n?DO(t,r,n,o,i+1):(u<n&&(c=r>0?c+(n-u):c,l=r>0?l:l+(n-u)),{step:a,tickMin:s.sub(new he(l).mul(a)),tickMax:s.add(new he(c).mul(a))})},KV=function(t){var[r,n]=t,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Math.max(o,2),[s,l]=NO([r,n]);if(s===-1/0||l===1/0){var c=l===1/0?[s,...Array(o-1).fill(1/0)]:[...Array(o-1).fill(-1/0),l];return r>n?c.reverse():c}if(s===l)return WV(s,o,i);var{step:u,tickMin:f,tickMax:p}=DO(s,l,a,i,0),v=kO(f,p.add(new he(.1).mul(u)),u);return r>n?v.reverse():v},UV=function(t,r){var[n,o]=t,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,[a,s]=NO([n,o]);if(a===-1/0||s===1/0)return[n,o];if(a===s)return[a];var l=Math.max(r,2),c=IO(new he(s).sub(a).div(l-1),i,0),u=[...kO(new he(a),new he(s),c),s];return i===!1&&(u=u.map(f=>Math.round(f))),n>o?u.reverse():u},RO=e=>e.rootProps.maxBarSize,HV=e=>e.rootProps.barGap,$O=e=>e.rootProps.barCategoryGap,GV=e=>e.rootProps.barSize,Ii=e=>e.rootProps.stackOffset,LO=e=>e.rootProps.reverseStackOrder,zp=e=>e.options.chartName,Bp=e=>e.rootProps.syncId,FO=e=>e.rootProps.syncMethod,Vp=e=>e.options.eventEmitter,De={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},ln={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},qt={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},jl=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function kl(e,t,r){if(r!=="auto")return r;if(e!=null)return Ar(e,t)?"category":"number"}function mb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function _s(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mb(Object(r),!0).forEach(function(n){qV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qV(e,t,r){return(t=YV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function YV(e){var t=XV(e,"string");return typeof t=="symbol"?t:t+""}function XV(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var hb={allowDataOverflow:ln.allowDataOverflow,allowDecimals:ln.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:ln.angleAxisId,includeHidden:!1,name:void 0,reversed:ln.reversed,scale:ln.scale,tick:ln.tick,tickCount:void 0,ticks:void 0,type:ln.type,unit:void 0},gb={allowDataOverflow:qt.allowDataOverflow,allowDecimals:qt.allowDecimals,allowDuplicatedCategory:qt.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:qt.radiusAxisId,includeHidden:qt.includeHidden,name:void 0,reversed:qt.reversed,scale:qt.scale,tick:qt.tick,tickCount:qt.tickCount,ticks:void 0,type:qt.type,unit:void 0},ZV=(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},Wp=M([ZV,OS],(e,t)=>{var r;if(e!=null)return e;var n=(r=kl(t,"angleAxis",hb.type))!==null&&r!==void 0?r:"category";return _s(_s({},hb),{},{type:n})}),JV=(e,t)=>e.polarAxis.radiusAxis[t],Kp=M([JV,OS],(e,t)=>{var r;if(e!=null)return e;var n=(r=kl(t,"radiusAxis",gb.type))!==null&&r!==void 0?r:"category";return _s(_s({},gb),{},{type:n})}),Nl=e=>e.polarOptions,Up=M([_r,Tr,ze],BS),zO=M([Nl,Up],(e,t)=>{if(e!=null)return nt(e.innerRadius,t,0)}),BO=M([Nl,Up],(e,t)=>{if(e!=null)return nt(e.outerRadius,t,t*.8)}),QV=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:r}=e;return[t,r]},VO=M([Nl],QV);M([Wp,VO],jl);var WO=M([Up,zO,BO],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});M([Kp,WO],jl);var KO=M([ve,Nl,zO,BO,_r,Tr],(e,t,r,n,o,i)=>{if(!(e!=="centric"&&e!=="radial"||t==null||r==null||n==null)){var{cx:a,cy:s,startAngle:l,endAngle:c}=t;return{cx:nt(a,o,o/2),cy:nt(s,i,i/2),innerRadius:r,outerRadius:n,startAngle:l,endAngle:c,clockWise:!1}}}),Te=(e,t)=>t,Di=(e,t,r)=>r;function Hp(e){return e?.id}function UO(e,t,r){var{chartData:n=[]}=t,{allowDuplicatedCategory:o,dataKey:i}=r,a=new Map;return e.forEach(s=>{var l,c=(l=s.data)!==null&&l!==void 0?l:n;if(!(c==null||c.length===0)){var u=Hp(s);c.forEach((f,p)=>{var v=i==null||o?p:String(be(f,i,null)),g=be(f,s.dataKey,0),m;a.has(v)?m=a.get(v):m={},Object.assign(m,{[u]:g}),a.set(v,m)})}}),Array.from(a.values())}function Il(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var Dl=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function Rl(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function eW(e,t){if(e.length===t.length){for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return!1}var Ye=e=>{var t=ve(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},Po=e=>e.tooltip.settings.axisId;function tW(e){if(e in Ko)return Ko[e]();var t="scale".concat(bi(e));if(t in Ko)return Ko[t]()}function yb(e){var t=e.ticks,r=e.bandwidth,n=e.range(),o=[Math.min(...n),Math.max(...n)];return{domain:()=>e.domain(),range:(function(i){function a(){return i.apply(this,arguments)}return a.toString=function(){return i.toString()},a})(()=>o),rangeMin:()=>o[0],rangeMax:()=>o[1],isInRange(i){var a=o[0],s=o[1];return a<=s?i>=a&&i<=s:i>=s&&i<=a},bandwidth:r?()=>r.call(e):void 0,ticks:t?i=>t.call(e,i):void 0,map:(i,a)=>{var s=e(i);if(s!=null){if(e.bandwidth&&a!==null&&a!==void 0&&a.position){var l=e.bandwidth();switch(a.position){case"middle":s+=l/2;break;case"end":s+=l;break}}return s}}}}function bb(e,t,r){if(typeof e=="function")return yb(e.copy().domain(t).range(r));if(e!=null){var n=tW(e);if(n!=null)return n.domain(t).range(r),yb(n)}}var HO=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!wr(t)){for(var r,n,o=0;o<t.length;o++){var i=t[o];ce(i)&&((r===void 0||i<r)&&(r=i),(n===void 0||i>n)&&(n=i))}return r!==void 0&&n!==void 0?[r,n]:void 0}return t}default:return t}};function xb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Ts(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xb(Object(r),!0).forEach(function(n){rW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rW(e,t,r){return(t=nW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nW(e){var t=oW(e,"string");return typeof t=="symbol"?t:t+""}function oW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var td=[0,"auto"],We={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},GO=(e,t)=>e.cartesianAxis.xAxis[t],kr=(e,t)=>{var r=GO(e,t);return r??We},Ke={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:td,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,width:Ei},qO=(e,t)=>e.cartesianAxis.yAxis[t],Nr=(e,t)=>{var r=qO(e,t);return r??Ke},iW={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:""},Gp=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??iW},Ne=(e,t,r)=>{switch(t){case"xAxis":return kr(e,r);case"yAxis":return Nr(e,r);case"zAxis":return Gp(e,r);case"angleAxis":return Wp(e,r);case"radiusAxis":return Kp(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},aW=(e,t,r)=>{switch(t){case"xAxis":return kr(e,r);case"yAxis":return Nr(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},So=(e,t,r)=>{switch(t){case"xAxis":return kr(e,r);case"yAxis":return Nr(e,r);case"angleAxis":return Wp(e,r);case"radiusAxis":return Kp(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},YO=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function qp(e,t){return r=>{switch(e){case"xAxis":return"xAxisId"in r&&r.xAxisId===t;case"yAxis":return"yAxisId"in r&&r.yAxisId===t;case"zAxis":return"zAxisId"in r&&r.zAxisId===t;case"angleAxis":return"angleAxisId"in r&&r.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in r&&r.radiusAxisId===t;default:return!1}}}var $l=e=>e.graphicalItems.cartesianItems,sW=M([Te,Di],qp),Yp=(e,t,r)=>e.filter(r).filter(n=>t?.includeHidden===!0?!0:!n.hide),Ri=M([$l,Ne,sW],Yp,{memoizeOptions:{resultEqualityCheck:Rl}}),XO=M([Ri],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(Il)),ZO=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),lW=M([Ri],ZO),Xp=e=>e.map(t=>t.data).filter(Boolean).flat(1),cW=M([Ri],Xp,{memoizeOptions:{resultEqualityCheck:Rl}}),Zp=(e,t)=>{var{chartData:r=[],dataStartIndex:n,dataEndIndex:o}=t;return e.length>0?e:r.slice(n,o+1)},Jp=M([cW,$p],Zp),Qp=(e,t,r)=>t?.dataKey!=null?e.map(n=>({value:be(n,t.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(o=>({value:be(o,n)}))):e.map(n=>({value:n})),Ll=M([Jp,Ne,Ri],Qp);function JO(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function za(e){if(or(e)||e instanceof Date){var t=Number(e);if(ce(t))return t}}function wb(e){if(Array.isArray(e)){var t=[za(e[0]),za(e[1])];return wr(t)?t:void 0}var r=za(e);if(r!=null)return[r,r]}function Pr(e){return e.map(za).filter(mt)}function uW(e,t,r){return!r||typeof t!="number"||nr(t)?[]:r.length?Pr(r.flatMap(n=>{var o=be(e,n.dataKey),i,a;if(Array.isArray(o)?[i,a]=o:i=a=o,!(!ce(i)||!ce(a)))return[t-i,t+a]})):[]}var Ve=e=>{var t=Ye(e),r=Po(e);return So(e,t,r)},$i=M([Ve],e=>e?.dataKey),fW=M([XO,$p,Ve],UO),QO=(e,t,r,n)=>{var o={},i=t.reduce((a,s)=>{if(s.stackId==null)return a;var l=a[s.stackId];return l==null&&(l=[]),l.push(s),a[s.stackId]=l,a},o);return Object.fromEntries(Object.entries(i).map(a=>{var[s,l]=a,c=n?[...l].reverse():l,u=c.map(Hp);return[s,{stackedData:M2(e,u,r),graphicalItems:c}]}))},rd=M([fW,XO,Ii,LO],QO),eE=(e,t,r,n)=>{var{dataStartIndex:o,dataEndIndex:i}=t;if(n==null&&r!=="zAxis"){var a=D2(e,o,i);if(!(a!=null&&a[0]===0&&a[1]===0))return a}},dW=M([Ne],e=>e.allowDataOverflow),ev=e=>{var t;if(e==null||!("domain"in e))return td;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var r=Pr(e.ticks);return[Math.min(...r),Math.max(...r)]}if(e.type==="category")return e.ticks.map(String)}return(t=e?.domain)!==null&&t!==void 0?t:td},tv=M([Ne],ev),rv=M([tv,dW],EO),pW=M([rd,jr,Te,rv],eE,{memoizeOptions:{resultEqualityCheck:Dl}}),Fl=e=>e.errorBars,vW=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>JO(r,n)),Ms=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var o=r.filter(Boolean);if(o.length!==0){var i=o.flat(),a=Math.min(...i),s=Math.max(...i);return[a,s]}},nv=(e,t,r,n,o)=>{var i,a;if(r.length>0&&e.forEach(s=>{r.forEach(l=>{var c,u,f=(c=n[l.id])===null||c===void 0?void 0:c.filter(y=>JO(o,y)),p=be(s,(u=t.dataKey)!==null&&u!==void 0?u:l.dataKey),v=uW(s,p,f);if(v.length>=2){var g=Math.min(...v),m=Math.max(...v);(i==null||g<i)&&(i=g),(a==null||m>a)&&(a=m)}var h=wb(p);h!=null&&(i=i==null?h[0]:Math.min(i,h[0]),a=a==null?h[1]:Math.max(a,h[1]))})}),t?.dataKey!=null&&e.forEach(s=>{var l=wb(be(s,t.dataKey));l!=null&&(i=i==null?l[0]:Math.min(i,l[0]),a=a==null?l[1]:Math.max(a,l[1]))}),ce(i)&&ce(a))return[i,a]},mW=M([Jp,Ne,lW,Fl,Te],nv,{memoizeOptions:{resultEqualityCheck:Dl}});function hW(e){var{value:t}=e;if(or(t)||t instanceof Date)return t}var gW=(e,t,r)=>{var n=e.map(hW).filter(o=>o!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&mP(n))?US(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},tE=e=>e.referenceElements.dots,Oo=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),yW=M([tE,Te,Di],Oo),rE=e=>e.referenceElements.areas,bW=M([rE,Te,Di],Oo),nE=e=>e.referenceElements.lines,xW=M([nE,Te,Di],Oo),oE=(e,t)=>{if(e!=null){var r=Pr(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},wW=M(yW,Te,oE),iE=(e,t)=>{if(e!=null){var r=Pr(e.flatMap(n=>[t==="xAxis"?n.x1:n.y1,t==="xAxis"?n.x2:n.y2]));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},PW=M([bW,Te],iE);function SW(e){var t;if(e.x!=null)return Pr([e.x]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.x);return r==null||r.length===0?[]:Pr(r)}function OW(e){var t;if(e.y!=null)return Pr([e.y]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.y);return r==null||r.length===0?[]:Pr(r)}var aE=(e,t)=>{if(e!=null){var r=e.flatMap(n=>t==="xAxis"?SW(n):OW(n));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},EW=M([xW,Te],aE),CW=M(wW,EW,PW,(e,t,r)=>Ms(e,r,t)),ov=(e,t,r,n,o,i,a,s)=>{if(r!=null)return r;var l=a==="vertical"&&s==="xAxis"||a==="horizontal"&&s==="yAxis",c=l?Ms(n,i,o):Ms(i,o);return FV(t,c,e.allowDataOverflow)},AW=M([Ne,tv,rv,pW,mW,CW,ve,Te],ov,{memoizeOptions:{resultEqualityCheck:Dl}}),_W=[0,1],iv=(e,t,r,n,o,i,a)=>{if(!((e==null||r==null||r.length===0)&&a===void 0)){var{dataKey:s,type:l}=e,c=Ar(t,i);if(c&&s==null){var u;return US(0,(u=r?.length)!==null&&u!==void 0?u:0)}return l==="category"?gW(n,e,c):o==="expand"?_W:a}},av=M([Ne,ve,Jp,Ll,Ii,Te,AW],iv);function TW(e){return e in Ko}var sE=(e,t,r)=>{if(e!=null){var{scale:n,type:o}=e;if(n==="auto")return o==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!t)?"point":o==="category"?"band":"linear";if(typeof n=="string"){var i="scale".concat(bi(n));return TW(i)?i:"point"}}},en=M([Ne,YO,zp],sE);function sv(e,t,r,n){if(!(r==null||n==null))return typeof e.scale=="function"?bb(e.scale,r,n):bb(t,r,n)}var lv=(e,t,r)=>{var n=ev(t);if(!(r!=="auto"&&r!=="linear")){if(t!=null&&t.tickCount&&Array.isArray(n)&&(n[0]==="auto"||n[1]==="auto")&&wr(e))return KV(e,t.tickCount,t.allowDecimals);if(t!=null&&t.tickCount&&t.type==="number"&&wr(e))return UV(e,t.tickCount,t.allowDecimals)}},cv=M([av,So,en],lv),uv=(e,t,r,n)=>{if(n!=="angleAxis"&&e?.type==="number"&&wr(t)&&Array.isArray(r)&&r.length>0){var o,i,a=t[0],s=(o=r[0])!==null&&o!==void 0?o:0,l=t[1],c=(i=r[r.length-1])!==null&&i!==void 0?i:0;return[Math.min(a,s),Math.max(l,c)]}return t},MW=M([Ne,av,cv,Te],uv),jW=M(Ll,Ne,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(Pr(e.map(f=>f.value))).sort((f,p)=>f-p),o=n[0],i=n[n.length-1];if(o==null||i==null)return 1/0;var a=i-o;if(a===0)return 1/0;for(var s=0;s<n.length-1;s++){var l=n[s],c=n[s+1];if(!(l==null||c==null)){var u=c-l;r=Math.min(r,u)}}return r/a}}),lE=M(jW,ve,$O,ze,(e,t,r,n,o)=>o,(e,t,r,n,o)=>{if(!ce(e))return 0;var i=t==="vertical"?n.height:n.width;if(o==="gap")return e*i/2;if(o==="no-gap"){var a=nt(r,e*i),s=e*i/2;return s-a-(s-a)/i*a}return 0}),kW=(e,t,r)=>{var n=kr(e,t);return n==null||typeof n.padding!="string"?0:lE(e,"xAxis",t,r,n.padding)},NW=(e,t,r)=>{var n=Nr(e,t);return n==null||typeof n.padding!="string"?0:lE(e,"yAxis",t,r,n.padding)},IW=M(kr,kW,(e,t)=>{var r,n;if(e==null)return{left:0,right:0};var{padding:o}=e;return typeof o=="string"?{left:t,right:t}:{left:((r=o.left)!==null&&r!==void 0?r:0)+t,right:((n=o.right)!==null&&n!==void 0?n:0)+t}}),DW=M(Nr,NW,(e,t)=>{var r,n;if(e==null)return{top:0,bottom:0};var{padding:o}=e;return typeof o=="string"?{top:t,bottom:t}:{top:((r=o.top)!==null&&r!==void 0?r:0)+t,bottom:((n=o.bottom)!==null&&n!==void 0?n:0)+t}}),RW=M([ze,IW,gl,hl,(e,t,r)=>r],(e,t,r,n,o)=>{var{padding:i}=n;return o?[i.left,r.width-i.right]:[e.left+t.left,e.left+e.width-t.right]}),$W=M([ze,ve,DW,gl,hl,(e,t,r)=>r],(e,t,r,n,o,i)=>{var{padding:a}=o;return i?[n.height-a.bottom,a.top]:t==="horizontal"?[e.top+e.height-r.bottom,e.top+r.top]:[e.top+r.top,e.top+e.height-r.bottom]}),Li=(e,t,r,n)=>{var o;switch(t){case"xAxis":return RW(e,r,n);case"yAxis":return $W(e,r,n);case"zAxis":return(o=Gp(e,r))===null||o===void 0?void 0:o.range;case"angleAxis":return VO(e);case"radiusAxis":return WO(e,r);default:return}},cE=M([Ne,Li],jl),LW=M([en,MW],HO),zl=M([Ne,en,LW,cE],sv);M([Ri,Fl,Te],vW);function uE(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var Bl=(e,t)=>t,Vl=(e,t,r)=>r,FW=M(vl,Bl,Vl,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(uE)),zW=M(ml,Bl,Vl,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(uE)),fE=(e,t)=>({width:e.width,height:t.height}),BW=(e,t)=>{var r=typeof t.width=="number"?t.width:Ei;return{width:r,height:e.height}},dE=M(ze,kr,fE),VW=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},WW=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},KW=M(Tr,ze,FW,Bl,Vl,(e,t,r,n,o)=>{var i={},a;return r.forEach(s=>{var l=fE(t,s);a==null&&(a=VW(t,n,e));var c=n==="top"&&!o||n==="bottom"&&o;i[s.id]=a-Number(c)*l.height,a+=(c?-1:1)*l.height}),i}),UW=M(_r,ze,zW,Bl,Vl,(e,t,r,n,o)=>{var i={},a;return r.forEach(s=>{var l=BW(t,s);a==null&&(a=WW(t,n,e));var c=n==="left"&&!o||n==="right"&&o;i[s.id]=a-Number(c)*l.width,a+=(c?-1:1)*l.width}),i}),HW=(e,t)=>{var r=kr(e,t);if(r!=null)return KW(e,r.orientation,r.mirror)},GW=M([ze,kr,HW,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var o=r?.[n];return o==null?{x:e.left,y:0}:{x:e.left,y:o}}}),qW=(e,t)=>{var r=Nr(e,t);if(r!=null)return UW(e,r.orientation,r.mirror)},YW=M([ze,Nr,qW,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var o=r?.[n];return o==null?{x:0,y:e.top}:{x:o,y:e.top}}}),pE=M(ze,Nr,(e,t)=>{var r=typeof t.width=="number"?t.width:Ei;return{width:r,height:e.height}}),Pb=(e,t,r)=>{switch(t){case"xAxis":return dE(e,r).width;case"yAxis":return pE(e,r).height;default:return}},vE=(e,t,r,n)=>{if(r!=null){var{allowDuplicatedCategory:o,type:i,dataKey:a}=r,s=Ar(e,n),l=t.map(c=>c.value);if(a&&s&&i==="category"&&o&&mP(l))return l}},fv=M([ve,Ll,Ne,Te],vE),mE=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var{type:o,scale:i}=r,a=Ar(e,n);if(a&&(o==="number"||i!=="auto"))return t.map(s=>s.value)}},dv=M([ve,Ll,So,Te],mE),Sb=M([ve,aW,en,zl,fv,dv,Li,cv,Te],(e,t,r,n,o,i,a,s,l)=>{if(t!=null){var c=Ar(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:r,scale:n}}}),XW=(e,t,r,n,o,i,a,s,l)=>{if(!(t==null||n==null)){var c=Ar(e,l),{type:u,ticks:f,tickCount:p}=t,v=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,g=u==="category"&&n.bandwidth?n.bandwidth()/v:0;g=l==="angleAxis"&&i!=null&&i.length>=2?He(i[0]-i[1])*2*g:g;var m=f||o;return m?m.map((h,y)=>{var x=a?a.indexOf(h):h,w=n.map(x);return ce(w)?{index:y,coordinate:w+g,value:h,offset:g}:null}).filter(mt):c&&s?s.map((h,y)=>{var x=n.map(h);return ce(x)?{coordinate:x+g,value:h,index:y,offset:g}:null}).filter(mt):n.ticks?n.ticks(p).map((h,y)=>{var x=n.map(h);return ce(x)?{coordinate:x+g,value:h,index:y,offset:g}:null}).filter(mt):n.domain().map((h,y)=>{var x=n.map(h);return ce(x)?{coordinate:x+g,value:a?a[h]:h,index:y,offset:g}:null}).filter(mt)}},hE=M([ve,So,en,zl,cv,Li,fv,dv,Te],XW),ZW=(e,t,r,n,o,i,a)=>{if(!(t==null||r==null||n==null||n[0]===n[1])){var s=Ar(e,a),{tickCount:l}=t,c=0;return c=a==="angleAxis"&&n?.length>=2?He(n[0]-n[1])*2*c:c,s&&i?i.map((u,f)=>{var p=r.map(u);return ce(p)?{coordinate:p+c,value:u,index:f,offset:c}:null}).filter(mt):r.ticks?r.ticks(l).map((u,f)=>{var p=r.map(u);return ce(p)?{coordinate:p+c,value:u,index:f,offset:c}:null}).filter(mt):r.domain().map((u,f)=>{var p=r.map(u);return ce(p)?{coordinate:p+c,value:o?o[u]:u,index:f,offset:c}:null}).filter(mt)}},Ur=M([ve,So,zl,Li,fv,dv,Te],ZW),Hr=M(Ne,zl,(e,t)=>{if(!(e==null||t==null))return Ts(Ts({},e),{},{scale:t})}),JW=M([Ne,en,av,cE],sv);M((e,t,r)=>Gp(e,r),JW,(e,t)=>{if(!(e==null||t==null))return Ts(Ts({},e),{},{scale:t})});var QW=M([ve,vl,ml],(e,t,r)=>{switch(e){case"horizontal":return t.some(n=>n.reversed)?"right-to-left":"left-to-right";case"vertical":return r.some(n=>n.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),gE=e=>e.options.defaultTooltipEventType,yE=e=>e.options.validateTooltipEventTypes;function bE(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function pv(e,t){var r=gE(e),n=yE(e);return bE(t,r,n)}function eK(e){return J(t=>pv(t,e))}var xE=(e,t)=>{var r,n=Number(t);if(!(nr(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},tK=e=>e.tooltip.settings,zr={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},rK={itemInteraction:{click:zr,hover:zr},axisInteraction:{click:zr,hover:zr},keyboardInteraction:zr,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}},wE=gt({name:"tooltip",initialState:rK,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:Ee()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:r,next:n}=t.payload,o=zt(e).tooltipItemPayloads.indexOf(r);o>-1&&(e.tooltipItemPayloads[o]=n)},prepare:Ee()},removeTooltipEntrySettings:{reducer(e,t){var r=zt(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:Ee()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,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.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.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.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:nK,replaceTooltipEntrySettings:oK,removeTooltipEntrySettings:iK,setTooltipSettingsState:aK,setActiveMouseOverItemIndex:PE,mouseLeaveItem:sK,mouseLeaveChart:SE,setActiveClickItemIndex:lK,setMouseOverAxisIndex:OE,setMouseClickAxisIndex:cK,setSyncInteraction:nd,setKeyboardInteraction:od}=wE.actions,uK=wE.reducer;function Ob(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Oa(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ob(Object(r),!0).forEach(function(n){fK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ob(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function fK(e,t,r){return(t=dK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dK(e){var t=pK(e,"string");return typeof t=="symbol"?t:t+""}function pK(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vK(e,t,r){return t==="axis"?r==="click"?e.axisInteraction.click:e.axisInteraction.hover:r==="click"?e.itemInteraction.click:e.itemInteraction.hover}function mK(e){return e.index!=null}var EE=(e,t,r,n)=>{if(t==null)return zr;var o=vK(e,t,r);if(o==null)return zr;if(o.active)return o;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var i=e.settings.active===!0;if(mK(o)){if(i)return Oa(Oa({},o),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n,graphicalItemId:void 0};return Oa(Oa({},zr),{},{coordinate:o.coordinate})};function hK(e){if(typeof e=="number")return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var r=Number(e);return Number.isFinite(r)?r:void 0}function gK(e,t){var r=hK(e),n=t[0],o=t[1];if(r===void 0)return!1;var i=Math.min(n,o),a=Math.max(n,o);return r>=i&&r<=a}function yK(e,t,r){if(r==null||t==null)return!0;var n=be(e,t);return n==null||!wr(r)?!0:gK(n,r)}var vv=(e,t,r,n)=>{var o=e?.index;if(o==null)return null;var i=Number(o);if(!ce(i))return o;var a=0,s=1/0;t.length>0&&(s=t.length-1);var l=Math.max(a,Math.min(i,s)),c=t[l];return c==null||yK(c,r,n)?String(l):null},CE=(e,t,r,n,o,i,a)=>{if(i!=null){var s=a[0],l=s?.getPosition(i);if(l!=null)return l;var c=o?.[Number(i)];if(c)return r==="horizontal"?{x:c.coordinate,y:(n.top+t)/2}:{x:(n.left+e)/2,y:c.coordinate}}},AE=(e,t,r,n)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var o;if(r==="hover"?o=e.itemInteraction.hover.graphicalItemId:o=e.itemInteraction.click.graphicalItemId,o==null&&n!=null){var i=e.tooltipItemPayloads[0];return i!=null?[i]:[]}return e.tooltipItemPayloads.filter(a=>{var s;return((s=a.settings)===null||s===void 0?void 0:s.graphicalItemId)===o})},_E=e=>e.options.tooltipPayloadSearcher,Eo=e=>e.tooltip;function Eb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Cb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Eb(Object(r),!0).forEach(function(n){bK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Eb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bK(e,t,r){return(t=xK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xK(e){var t=wK(e,"string");return typeof t=="symbol"?t:t+""}function wK(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function PK(e,t){return e??t}var TE=(e,t,r,n,o,i,a)=>{if(!(t==null||i==null)){var{chartData:s,computedData:l,dataStartIndex:c,dataEndIndex:u}=r,f=[];return e.reduce((p,v)=>{var g,{dataDefinedOnItem:m,settings:h}=v,y=PK(m,s),x=Array.isArray(y)?pS(y,c,u):y,w=(g=h?.dataKey)!==null&&g!==void 0?g:n,P=h?.nameKey,O;if(n&&Array.isArray(x)&&!Array.isArray(x[0])&&a==="axis"?O=hP(x,n,o):O=i(x,t,l,P),Array.isArray(O))O.forEach(E=>{var C=Cb(Cb({},h),{},{name:E.name,unit:E.unit,color:void 0,fill:void 0});p.push(Og({tooltipEntrySettings:C,dataKey:E.dataKey,payload:E.payload,value:be(E.payload,E.dataKey),name:E.name}))});else{var S;p.push(Og({tooltipEntrySettings:h,dataKey:w,payload:O,value:be(O,w),name:(S=be(O,P))!==null&&S!==void 0?S:h?.name}))}return p},f)}},mv=M([Ve,YO,zp],sE),SK=M([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),OK=M([Ye,Po],qp),Co=M([SK,Ve,OK],Yp,{memoizeOptions:{resultEqualityCheck:Rl}}),EK=M([Co],e=>e.filter(Il)),CK=M([Co],Xp,{memoizeOptions:{resultEqualityCheck:Rl}}),Ao=M([CK,jr],Zp),AK=M([EK,jr,Ve],UO),hv=M([Ao,Ve,Co],Qp),ME=M([Ve],ev),_K=M([Ve],e=>e.allowDataOverflow),jE=M([ME,_K],EO),TK=M([Co],e=>e.filter(Il)),MK=M([AK,TK,Ii,LO],QO),jK=M([MK,jr,Ye,jE],eE),kK=M([Co],ZO),NK=M([Ao,Ve,kK,Fl,Ye],nv,{memoizeOptions:{resultEqualityCheck:Dl}}),IK=M([tE,Ye,Po],Oo),DK=M([IK,Ye],oE),RK=M([rE,Ye,Po],Oo),$K=M([RK,Ye],iE),LK=M([nE,Ye,Po],Oo),FK=M([LK,Ye],aE),zK=M([DK,FK,$K],Ms),BK=M([Ve,ME,jE,jK,NK,zK,ve,Ye],ov),Fi=M([Ve,ve,Ao,hv,Ii,Ye,BK],iv),VK=M([Fi,Ve,mv],lv),WK=M([Ve,Fi,VK,Ye],uv),kE=e=>{var t=Ye(e),r=Po(e),n=!1;return Li(e,t,r,n)},NE=M([Ve,kE],jl),IE=M([Ve,mv,WK,NE],sv),KK=M([ve,hv,Ve,Ye],vE),UK=M([ve,hv,Ve,Ye],mE),HK=(e,t,r,n,o,i,a,s)=>{if(t){var{type:l}=t,c=Ar(e,s);if(n){var u=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,f=l==="category"&&n.bandwidth?n.bandwidth()/u:0;return f=s==="angleAxis"&&o!=null&&o?.length>=2?He(o[0]-o[1])*2*f:f,c&&a?a.map((p,v)=>{var g=n.map(p);return ce(g)?{coordinate:g+f,value:p,index:v,offset:f}:null}).filter(mt):n.domain().map((p,v)=>{var g=n.map(p);return ce(g)?{coordinate:g+f,value:i?i[p]:p,index:v,offset:f}:null}).filter(mt)}}},Ir=M([ve,Ve,mv,IE,kE,KK,UK,Ye],HK),gv=M([gE,yE,tK],(e,t,r)=>bE(r.shared,e,t)),DE=e=>e.tooltip.settings.trigger,yv=e=>e.tooltip.settings.defaultIndex,zi=M([Eo,gv,DE,yv],EE),Gr=M([zi,Ao,$i,Fi],vv),RE=M([Ir,Gr],xE),bv=M([zi],e=>{if(e)return e.dataKey}),GK=M([zi],e=>{if(e)return e.graphicalItemId}),$E=M([Eo,gv,DE,yv],AE),qK=M([_r,Tr,ve,ze,Ir,yv,$E],CE),YK=M([zi,qK],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),XK=M([zi],e=>{var t;return(t=e?.active)!==null&&t!==void 0?t:!1}),ZK=M([$E,Gr,jr,$i,RE,_E,gv],TE),JK=M([ZK],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});function Ab(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function _b(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ab(Object(r),!0).forEach(function(n){QK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ab(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function QK(e,t,r){return(t=eU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eU(e){var t=tU(e,"string");return typeof t=="symbol"?t:t+""}function tU(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var rU=()=>J(Ve),nU=()=>{var e=rU(),t=J(Ir),r=J(IE);return ao(!e||!r?void 0:_b(_b({},e),{},{scale:r}),t)};function Tb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Xn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Tb(Object(r),!0).forEach(function(n){oU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function oU(e,t,r){return(t=iU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iU(e){var t=aU(e,"string");return typeof t=="symbol"?t:t+""}function aU(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var sU=(e,t,r,n)=>{var o=t.find(i=>i&&i.index===r);if(o){if(e==="horizontal")return{x:o.coordinate,y:n.chartY};if(e==="vertical")return{x:n.chartX,y:o.coordinate}}return{x:0,y:0}},lU=(e,t,r,n)=>{var o=t.find(c=>c&&c.index===r);if(o){if(e==="centric"){var i=o.coordinate,{radius:a}=n;return Xn(Xn(Xn({},n),Ie(n.cx,n.cy,a,i)),{},{angle:i,radius:a})}var s=o.coordinate,{angle:l}=n;return Xn(Xn(Xn({},n),Ie(n.cx,n.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}};function cU(e,t){var{chartX:r,chartY:n}=e;return r>=t.left&&r<=t.left+t.width&&n>=t.top&&n<=t.top+t.height}var LE=(e,t,r,n,o)=>{var i,a=(i=t?.length)!==null&&i!==void 0?i:0;if(a<=1||e==null)return 0;if(n==="angleAxis"&&o!=null&&Math.abs(Math.abs(o[1]-o[0])-360)<=1e-6)for(var s=0;s<a;s++){var l,c,u,f,p,v=s>0?(l=r[s-1])===null||l===void 0?void 0:l.coordinate:(c=r[a-1])===null||c===void 0?void 0:c.coordinate,g=(u=r[s])===null||u===void 0?void 0:u.coordinate,m=s>=a-1?(f=r[0])===null||f===void 0?void 0:f.coordinate:(p=r[s+1])===null||p===void 0?void 0:p.coordinate,h=void 0;if(!(v==null||g==null||m==null))if(He(g-v)!==He(m-g)){var y=[];if(He(m-g)===He(o[1]-o[0])){h=m;var x=g+o[1]-o[0];y[0]=Math.min(x,(x+v)/2),y[1]=Math.max(x,(x+v)/2)}else{h=v;var w=m+o[1]-o[0];y[0]=Math.min(g,(w+g)/2),y[1]=Math.max(g,(w+g)/2)}var P=[Math.min(g,(h+g)/2),Math.max(g,(h+g)/2)];if(e>P[0]&&e<=P[1]||e>=y[0]&&e<=y[1]){var O;return(O=r[s])===null||O===void 0?void 0:O.index}}else{var S=Math.min(v,m),E=Math.max(v,m);if(e>(S+g)/2&&e<=(E+g)/2){var C;return(C=r[s])===null||C===void 0?void 0:C.index}}}else if(t)for(var j=0;j<a;j++){var D=t[j];if(D!=null){var R=t[j+1],_=t[j-1];if(j===0&&R!=null&&e<=(D.coordinate+R.coordinate)/2||j===a-1&&_!=null&&e>(D.coordinate+_.coordinate)/2||j>0&&j<a-1&&_!=null&&R!=null&&e>(D.coordinate+_.coordinate)/2&&e<=(D.coordinate+R.coordinate)/2)return D.index}}return-1},uU=()=>J(zp),xv=(e,t)=>t,FE=(e,t,r)=>r,wv=(e,t,r,n)=>n,fU=M(Ir,e=>il(e,t=>t.coordinate)),Pv=M([Eo,xv,FE,wv],EE),Sv=M([Pv,Ao,$i,Fi],vv),dU=(e,t,r)=>{if(t!=null){var n=Eo(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},zE=M([Eo,xv,FE,wv],AE),js=M([_r,Tr,ve,ze,Ir,wv,zE],CE),pU=M([Pv,js],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),BE=M([Ir,Sv],xE),vU=M([zE,Sv,jr,$i,BE,_E,xv],TE),mU=M([Pv,Sv],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),hU=(e,t,r,n,o,i,a)=>{if(!(!e||!r||!n||!o)&&cU(e,a)){var s=R2(e,t),l=LE(s,i,o,r,n),c=sU(t,o,l,e);return{activeIndex:String(l),activeCoordinate:c}}},gU=(e,t,r,n,o,i,a)=>{if(!(!e||!n||!o||!i||!r)){var s=ez(e,r);if(s){var l=$2(s,t),c=LE(l,a,i,n,o),u=lU(t,i,c,s);return{activeIndex:String(c),activeCoordinate:u}}}},yU=(e,t,r,n,o,i,a,s)=>{if(!(!e||!t||!n||!o||!i))return t==="horizontal"||t==="vertical"?hU(e,t,n,o,i,a,s):gU(e,t,r,n,o,i,a)},bU=M(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,r)=>r,(e,t,r)=>{if(t!=null){var n=e[t];if(n!=null)return r?n.panoramaElement:n.element}}),xU=M(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(n=>parseInt(n,10)).concat(Object.values(De)),r=Array.from(new Set(t));return r.sort((n,o)=>n-o)},{memoizeOptions:{resultEqualityCheck:eW}});function Mb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function jb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Mb(Object(r),!0).forEach(function(n){wU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function wU(e,t,r){return(t=PU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function PU(e){var t=SU(e,"string");return typeof t=="symbol"?t:t+""}function SU(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var OU={},EU={zIndexMap:Object.values(De).reduce((e,t)=>jb(jb({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),OU)},CU=new Set(Object.values(De));function AU(e){return CU.has(e)}var VE=gt({name:"zIndex",initialState:EU,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]?e.zIndexMap[r].consumers+=1:e.zIndexMap[r]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:Ee()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]&&(e.zIndexMap[r].consumers-=1,e.zIndexMap[r].consumers<=0&&!AU(r)&&delete e.zIndexMap[r])},prepare:Ee()},registerZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:r,element:n,isPanorama:o}=t.payload;e.zIndexMap[r]?o?e.zIndexMap[r].panoramaElement=n:e.zIndexMap[r].element=n:e.zIndexMap[r]={consumers:0,element:o?void 0:n,panoramaElement:o?n:void 0}},prepare:Ee()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]&&(t.payload.isPanorama?e.zIndexMap[r].panoramaElement=void 0:e.zIndexMap[r].element=void 0)},prepare:Ee()}}}),{registerZIndexPortal:_U,unregisterZIndexPortal:TU,registerZIndexPortalElement:MU,unregisterZIndexPortalElement:jU}=VE.actions,kU=VE.reducer;function yt(e){var{zIndex:t,children:r}=e,n=vL(),o=n&&t!==void 0&&t!==0,i=at(),a=Pe();A.useLayoutEffect(()=>o?(a(_U({zIndex:t})),()=>{a(TU({zIndex:t}))}):$n,[a,t,o]);var s=J(l=>bU(l,t,i));return o?s?mi.createPortal(r,s):null:r}function id(){return id=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},id.apply(null,arguments)}function kb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Ea(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kb(Object(r),!0).forEach(function(n){NU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function NU(e,t,r){return(t=IU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function IU(e){var t=DU(e,"string");return typeof t=="symbol"?t:t+""}function DU(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function RU(e){var{cursor:t,cursorComp:r,cursorProps:n}=e;return A.isValidElement(t)?A.cloneElement(t,n):A.createElement(r,n)}function $U(e){var t,{coordinate:r,payload:n,index:o,offset:i,tooltipAxisBandSize:a,layout:s,cursor:l,tooltipEventType:c,chartName:u}=e,f=r,p=n,v=o;if(!l||!f||u!=="ScatterChart"&&c!=="axis")return null;var g,m,h;if(u==="ScatterChart")g=f,m=vF,h=De.cursorLine;else if(u==="BarChart")g=mF(s,f,i,a),m=zS,h=De.cursorRectangle;else if(s==="radial"&&yP(f)){var{cx:y,cy:x,radius:w,startAngle:P,endAngle:O}=VS(f);g={cx:y,cy:x,startAngle:P,endAngle:O,innerRadius:w,outerRadius:w},m=KS,h=De.cursorLine}else g={points:oz(s,f,i)},m=pp,h=De.cursorLine;var S=typeof l=="object"&&"className"in l?l.className:void 0,E=Ea(Ea(Ea(Ea({stroke:"#ccc",pointerEvents:"none"},i),g),Sn(l)),{},{payload:p,payloadIndex:v,className:fe("recharts-tooltip-cursor",S)});return d.createElement(yt,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:h},d.createElement(RU,{cursor:l,cursorComp:m,cursorProps:E}))}function LU(e){var t=nU(),r=PS(),n=Ln(),o=uU();return t==null||r==null||n==null||o==null?null:d.createElement($U,id({},e,{offset:r,layout:n,tooltipAxisBandSize:t,chartName:o}))}var WE=A.createContext(null),FU=()=>A.useContext(WE),Hu={exports:{}},Nb;function zU(){return Nb||(Nb=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function o(l,c,u){this.fn=l,this.context=c,this.once=u||!1}function i(l,c,u,f,p){if(typeof u!="function")throw new TypeError("The listener must be a function");var v=new o(u,f||l,p),g=r?r+c:c;return l._events[g]?l._events[g].fn?l._events[g]=[l._events[g],v]:l._events[g].push(v):(l._events[g]=v,l._eventsCount++),l}function a(l,c){--l._eventsCount===0?l._events=new n:delete l._events[c]}function s(){this._events=new n,this._eventsCount=0}s.prototype.eventNames=function(){var c=[],u,f;if(this._eventsCount===0)return c;for(f in u=this._events)t.call(u,f)&&c.push(r?f.slice(1):f);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(u)):c},s.prototype.listeners=function(c){var u=r?r+c:c,f=this._events[u];if(!f)return[];if(f.fn)return[f.fn];for(var p=0,v=f.length,g=new Array(v);p<v;p++)g[p]=f[p].fn;return g},s.prototype.listenerCount=function(c){var u=r?r+c:c,f=this._events[u];return f?f.fn?1:f.length:0},s.prototype.emit=function(c,u,f,p,v,g){var m=r?r+c:c;if(!this._events[m])return!1;var h=this._events[m],y=arguments.length,x,w;if(h.fn){switch(h.once&&this.removeListener(c,h.fn,void 0,!0),y){case 1:return h.fn.call(h.context),!0;case 2:return h.fn.call(h.context,u),!0;case 3:return h.fn.call(h.context,u,f),!0;case 4:return h.fn.call(h.context,u,f,p),!0;case 5:return h.fn.call(h.context,u,f,p,v),!0;case 6:return h.fn.call(h.context,u,f,p,v,g),!0}for(w=1,x=new Array(y-1);w<y;w++)x[w-1]=arguments[w];h.fn.apply(h.context,x)}else{var P=h.length,O;for(w=0;w<P;w++)switch(h[w].once&&this.removeListener(c,h[w].fn,void 0,!0),y){case 1:h[w].fn.call(h[w].context);break;case 2:h[w].fn.call(h[w].context,u);break;case 3:h[w].fn.call(h[w].context,u,f);break;case 4:h[w].fn.call(h[w].context,u,f,p);break;default:if(!x)for(O=1,x=new Array(y-1);O<y;O++)x[O-1]=arguments[O];h[w].fn.apply(h[w].context,x)}}return!0},s.prototype.on=function(c,u,f){return i(this,c,u,f,!1)},s.prototype.once=function(c,u,f){return i(this,c,u,f,!0)},s.prototype.removeListener=function(c,u,f,p){var v=r?r+c:c;if(!this._events[v])return this;if(!u)return a(this,v),this;var g=this._events[v];if(g.fn)g.fn===u&&(!p||g.once)&&(!f||g.context===f)&&a(this,v);else{for(var m=0,h=[],y=g.length;m<y;m++)(g[m].fn!==u||p&&!g[m].once||f&&g[m].context!==f)&&h.push(g[m]);h.length?this._events[v]=h.length===1?h[0]:h:a(this,v)}return this},s.prototype.removeAllListeners=function(c){var u;return c?(u=r?r+c:c,this._events[u]&&a(this,u)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s})(Hu)),Hu.exports}var BU=zU();const VU=Zr(BU);var li=new VU,ad="recharts.syncEvent.tooltip",Ib="recharts.syncEvent.brush",Ov=(e,t)=>{if(t&&Array.isArray(e)){var r=Number.parseInt(t,10);if(!nr(r))return e[r]}},WU={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},KE=gt({name:"options",initialState:WU,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),KU=KE.reducer,{createEventEmitter:UU}=KE.actions;function HU(e){return e.tooltip.syncInteraction}var GU={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},UE=gt({name:"chartData",initialState:GU,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}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:r,endIndex:n}=t.payload;r!=null&&(e.dataStartIndex=r),n!=null&&(e.dataEndIndex=n)}}}),{setChartData:Db,setDataStartEndIndexes:qU,setComputedData:NQ}=UE.actions,YU=UE.reducer,XU=["x","y"];function Rb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Zn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Rb(Object(r),!0).forEach(function(n){ZU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ZU(e,t,r){return(t=JU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function JU(e){var t=QU(e,"string");return typeof t=="symbol"?t:t+""}function QU(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function e5(e,t){if(e==null)return{};var r,n,o=t5(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function t5(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function r5(){var e=J(Bp),t=J(Vp),r=Pe(),n=J(FO),o=J(Ir),i=Ln(),a=yl(),s=J(l=>l.rootProps.className);A.useEffect(()=>{if(e==null)return $n;var l=(c,u,f)=>{if(t!==f&&e===c){if(n==="index"){var p;if(a&&u!==null&&u!==void 0&&(p=u.payload)!==null&&p!==void 0&&p.coordinate&&u.payload.sourceViewBox){var v=u.payload.coordinate,{x:g,y:m}=v,h=e5(v,XU),{x:y,y:x,width:w,height:P}=u.payload.sourceViewBox,O=Zn(Zn({},h),{},{x:a.x+(w?(g-y)/w:0)*a.width,y:a.y+(P?(m-x)/P:0)*a.height});r(Zn(Zn({},u),{},{payload:Zn(Zn({},u.payload),{},{coordinate:O})}))}else r(u);return}if(o!=null){var S;if(typeof n=="function"){var E={activeTooltipIndex:u.payload.index==null?void 0:Number(u.payload.index),isTooltipActive:u.payload.active,activeIndex:u.payload.index==null?void 0:Number(u.payload.index),activeLabel:u.payload.label,activeDataKey:u.payload.dataKey,activeCoordinate:u.payload.coordinate},C=n(o,E);S=o[C]}else n==="value"&&(S=o.find(z=>String(z.value)===u.payload.label));var{coordinate:j}=u.payload;if(S==null||u.payload.active===!1||j==null||a==null){r(nd({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}var{x:D,y:R}=j,_=Math.min(D,a.x+a.width),k=Math.min(R,a.y+a.height),I={x:i==="horizontal"?S.coordinate:_,y:i==="horizontal"?k:S.coordinate},V=nd({active:u.payload.active,coordinate:I,dataKey:u.payload.dataKey,index:String(S.index),label:u.payload.label,sourceViewBox:u.payload.sourceViewBox,graphicalItemId:u.payload.graphicalItemId});r(V)}}};return li.on(ad,l),()=>{li.off(ad,l)}},[s,r,t,e,n,o,i,a])}function n5(){var e=J(Bp),t=J(Vp),r=Pe();A.useEffect(()=>{if(e==null)return $n;var n=(o,i,a)=>{t!==a&&e===o&&r(qU(i))};return li.on(Ib,n),()=>{li.off(Ib,n)}},[r,t,e])}function o5(){var e=Pe();A.useEffect(()=>{e(UU())},[e]),r5(),n5()}function i5(e,t,r,n,o,i){var a=J(v=>dU(v,e,t)),s=J(Vp),l=J(Bp),c=J(FO),u=J(HU),f=u?.active,p=yl();A.useEffect(()=>{if(!f&&l!=null&&s!=null){var v=nd({active:i,coordinate:r,dataKey:a,index:o,label:typeof n=="number"?String(n):n,sourceViewBox:p,graphicalItemId:void 0});li.emit(ad,l,v,s)}},[f,r,a,o,n,s,l,c,i,p])}function $b(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Lb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$b(Object(r),!0).forEach(function(n){a5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$b(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function a5(e,t,r){return(t=s5(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s5(e){var t=l5(e,"string");return typeof t=="symbol"?t:t+""}function l5(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function c5(e){return e.dataKey}function u5(e,t){return d.isValidElement(e)?d.cloneElement(e,t):typeof e=="function"?d.createElement(e,t):d.createElement(GL,t)}var Fb=[],f5={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 Ev(e){var t,r,n=$e(e,f5),{active:o,allowEscapeViewBox:i,animationDuration:a,animationEasing:s,content:l,filterNull:c,isAnimationActive:u,offset:f,payloadUniqBy:p,position:v,reverseDirection:g,useTranslate3d:m,wrapperStyle:h,cursor:y,shared:x,trigger:w,defaultIndex:P,portal:O,axisId:S}=n,E=Pe(),C=typeof P=="number"?String(P):P;A.useEffect(()=>{E(aK({shared:x,trigger:w,axisId:S,active:o,defaultIndex:C}))},[E,x,w,S,o,C]);var j=yl(),D=DS(),R=eK(x),{activeIndex:_,isActive:k}=(t=J(W=>mU(W,R,w,C)))!==null&&t!==void 0?t:{},I=J(W=>vU(W,R,w,C)),V=J(W=>BE(W,R,w,C)),z=J(W=>pU(W,R,w,C)),K=I,T=FU(),N=(r=o??k)!==null&&r!==void 0?r:!1,[G,Q]=NP([K,N]),te=R==="axis"?V:void 0;i5(R,w,z,te,_,N);var ne=O??T;if(ne==null||j==null||R==null)return null;var re=K??Fb;N||(re=Fb),c&&re.length&&(re=AP(re.filter(W=>W.value!=null&&(W.hide!==!0||n.includeHidden)),p,c5));var le=re.length>0,Oe=d.createElement(eF,{allowEscapeViewBox:i,animationDuration:a,animationEasing:s,isAnimationActive:u,active:N,coordinate:z,hasPayload:le,offset:f,position:v,reverseDirection:g,useTranslate3d:m,viewBox:j,wrapperStyle:h,lastBoundingBox:G,innerRef:Q,hasPortalFromProps:!!O},u5(l,Lb(Lb({},n),{},{payload:re,label:te,active:N,activeIndex:_,coordinate:z,accessibilityLayer:D})));return d.createElement(d.Fragment,null,mi.createPortal(Oe,ne),N&&d.createElement(LU,{cursor:y,tooltipEventType:R,coordinate:z,payload:re,index:_}))}var Bi=e=>null;Bi.displayName="Cell";function d5(e,t,r){return(t=p5(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p5(e){var t=v5(e,"string");return typeof t=="symbol"?t:t+""}function v5(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class m5{constructor(t){d5(this,"cache",new Map),this.maxSize=t}get(t){var r=this.cache.get(t);return r!==void 0&&(this.cache.delete(t),this.cache.set(t,r)),r}set(t,r){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var n=this.cache.keys().next().value;n!=null&&this.cache.delete(n)}this.cache.set(t,r)}clear(){this.cache.clear()}size(){return this.cache.size}}function zb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function h5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zb(Object(r),!0).forEach(function(n){g5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function g5(e,t,r){return(t=y5(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y5(e){var t=b5(e,"string");return typeof t=="symbol"?t:t+""}function b5(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var x5={cacheSize:2e3,enableCache:!0},HE=h5({},x5),Bb=new m5(HE.cacheSize),w5={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},Vb="recharts_measurement_span";function P5(e,t){var r=t.fontSize||"",n=t.fontFamily||"",o=t.fontWeight||"",i=t.fontStyle||"",a=t.letterSpacing||"",s=t.textTransform||"";return"".concat(e,"|").concat(r,"|").concat(n,"|").concat(o,"|").concat(i,"|").concat(a,"|").concat(s)}var Wb=(e,t)=>{try{var r=document.getElementById(Vb);r||(r=document.createElement("span"),r.setAttribute("id",Vb),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,w5,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},qo=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Sl.isSsr)return{width:0,height:0};if(!HE.enableCache)return Wb(t,r);var n=P5(t,r),o=Bb.get(n);if(o)return o;var i=Wb(t,r);return Bb.set(n,i),i},GE;function S5(e,t,r){return(t=O5(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function O5(e){var t=E5(e,"string");return typeof t=="symbol"?t:t+""}function E5(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Kb=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Ub=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,C5=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,A5=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,_5={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},T5=["cm","mm","pt","pc","in","Q","px"];function M5(e){return T5.includes(e)}var Qn="NaN";function j5(e,t){return e*_5[t]}class Qe{static parse(t){var r,[,n,o]=(r=A5.exec(t))!==null&&r!==void 0?r:[];return n==null?Qe.NaN:new Qe(parseFloat(n),o??"")}constructor(t,r){this.num=t,this.unit=r,this.num=t,this.unit=r,nr(t)&&(this.unit=""),r!==""&&!C5.test(r)&&(this.num=NaN,this.unit=""),M5(r)&&(this.num=j5(t,r),this.unit="px")}add(t){return this.unit!==t.unit?new Qe(NaN,""):new Qe(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new Qe(NaN,""):new Qe(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Qe(NaN,""):new Qe(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Qe(NaN,""):new Qe(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return nr(this.num)}}GE=Qe;S5(Qe,"NaN",new GE(NaN,""));function qE(e){if(e==null||e.includes(Qn))return Qn;for(var t=e;t.includes("*")||t.includes("/");){var r,[,n,o,i]=(r=Kb.exec(t))!==null&&r!==void 0?r:[],a=Qe.parse(n??""),s=Qe.parse(i??""),l=o==="*"?a.multiply(s):a.divide(s);if(l.isNaN())return Qn;t=t.replace(Kb,l.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var c,[,u,f,p]=(c=Ub.exec(t))!==null&&c!==void 0?c:[],v=Qe.parse(u??""),g=Qe.parse(p??""),m=f==="+"?v.add(g):v.subtract(g);if(m.isNaN())return Qn;t=t.replace(Ub,m.toString())}return t}var Hb=/\(([^()]*)\)/;function k5(e){for(var t=e,r;(r=Hb.exec(t))!=null;){var[,n]=r;t=t.replace(Hb,qE(n))}return t}function N5(e){var t=e.replace(/\s+/g,"");return t=k5(t),t=qE(t),t}function I5(e){try{return N5(e)}catch{return Qn}}function Gu(e){var t=I5(e.slice(5,-1));return t===Qn?"":t}var D5=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],R5=["dx","dy","angle","className","breakAll"];function sd(){return sd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},sd.apply(null,arguments)}function Gb(e,t){if(e==null)return{};var r,n,o=$5(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function $5(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var YE=/[ \f\n\r\t\v\u2028\u2029]+/,XE=e=>{var{children:t,breakAll:r,style:n}=e;try{var o=[];_e(t)||(r?o=t.toString().split(""):o=t.toString().split(YE));var i=o.map(s=>({word:s,width:qo(s,n).width})),a=r?0:qo(" ",n).width;return{wordsWithComputedWidth:i,spaceWidth:a}}catch{return null}};function L5(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}var ZE=(e,t,r,n)=>e.reduce((o,i)=>{var{word:a,width:s}=i,l=o[o.length-1];if(l&&s!=null&&(t==null||n||l.width+s+r<Number(t)))l.words.push(a),l.width+=s+r;else{var c={words:[a],width:s};o.push(c)}return o},[]),JE=e=>e.reduce((t,r)=>t.width>r.width?t:r),F5="…",qb=(e,t,r,n,o,i,a,s)=>{var l=e.slice(0,t),c=XE({breakAll:r,style:n,children:l+F5});if(!c)return[!1,[]];var u=ZE(c.wordsWithComputedWidth,i,a,s),f=u.length>o||JE(u).width>Number(i);return[f,u]},z5=(e,t,r,n,o)=>{var{maxLines:i,children:a,style:s,breakAll:l}=e,c=q(i),u=String(a),f=ZE(t,n,r,o);if(!c||o)return f;var p=f.length>i||JE(f).width>Number(n);if(!p)return f;for(var v=0,g=u.length-1,m=0,h;v<=g&&m<=u.length-1;){var y=Math.floor((v+g)/2),x=y-1,[w,P]=qb(u,x,l,s,i,n,r,o),[O]=qb(u,y,l,s,i,n,r,o);if(!w&&!O&&(v=y+1),w&&O&&(g=y-1),!w&&O){h=P;break}m++}return h||f},Yb=e=>{var t=_e(e)?[]:e.toString().split(YE);return[{words:t,width:void 0}]},B5=e=>{var{width:t,scaleToFit:r,children:n,style:o,breakAll:i,maxLines:a}=e;if((t||r)&&!Sl.isSsr){var s,l,c=XE({breakAll:i,children:n,style:o});if(c){var{wordsWithComputedWidth:u,spaceWidth:f}=c;s=u,l=f}else return Yb(n);return z5({breakAll:i,children:n,maxLines:a,style:o},s,l,t,!!r)}return Yb(n)},QE="#808080",V5={angle:0,breakAll:!1,capHeight:"0.71em",fill:QE,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},Wl=A.forwardRef((e,t)=>{var r=$e(e,V5),{x:n,y:o,lineHeight:i,capHeight:a,fill:s,scaleToFit:l,textAnchor:c,verticalAnchor:u}=r,f=Gb(r,D5),p=A.useMemo(()=>B5({breakAll:f.breakAll,children:f.children,maxLines:f.maxLines,scaleToFit:l,style:f.style,width:f.width}),[f.breakAll,f.children,f.maxLines,l,f.style,f.width]),{dx:v,dy:g,angle:m,className:h,breakAll:y}=f,x=Gb(f,R5);if(!or(n)||!or(o)||p.length===0)return null;var w=Number(n)+(q(v)?v:0),P=Number(o)+(q(g)?g:0);if(!ce(w)||!ce(P))return null;var O;switch(u){case"start":O=Gu("calc(".concat(a,")"));break;case"middle":O=Gu("calc(".concat((p.length-1)/2," * -").concat(i," + (").concat(a," / 2))"));break;default:O=Gu("calc(".concat(p.length-1," * -").concat(i,")"));break}var S=[],E=p[0];if(l&&E!=null){var C=E.width,{width:j}=f;S.push("scale(".concat(q(j)&&q(C)?j/C:1,")"))}return m&&S.push("rotate(".concat(m,", ").concat(w,", ").concat(P,")")),S.length&&(x.transform=S.join(" ")),d.createElement("text",sd({},ft(x),{ref:t,x:w,y:P,className:fe("recharts-text",h),textAnchor:c,fill:s.includes("url")?QE:s}),p.map((D,R)=>{var _=D.words.join(y?"":" ");return d.createElement("tspan",{x:w,dy:R===0?O:i,key:"".concat(_,"-").concat(R)},_)}))});Wl.displayName="Text";function Xb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Yt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Xb(Object(r),!0).forEach(function(n){W5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function W5(e,t,r){return(t=K5(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function K5(e){var t=U5(e,"string");return typeof t=="symbol"?t:t+""}function U5(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var H5=e=>{var{viewBox:t,position:r,offset:n=0,parentViewBox:o}=e,{x:i,y:a,height:s,upperWidth:l,lowerWidth:c}=lp(t),u=i,f=i+(l-c)/2,p=(u+f)/2,v=(l+c)/2,g=u+l/2,m=s>=0?1:-1,h=m*n,y=m>0?"end":"start",x=m>0?"start":"end",w=l>=0?1:-1,P=w*n,O=w>0?"end":"start",S=w>0?"start":"end",E=o;if(r==="top"){var C={x:u+l/2,y:a-h,horizontalAnchor:"middle",verticalAnchor:y};return E&&(C.height=Math.max(a-E.y,0),C.width=l),C}if(r==="bottom"){var j={x:f+c/2,y:a+s+h,horizontalAnchor:"middle",verticalAnchor:x};return E&&(j.height=Math.max(E.y+E.height-(a+s),0),j.width=c),j}if(r==="left"){var D={x:p-P,y:a+s/2,horizontalAnchor:O,verticalAnchor:"middle"};return E&&(D.width=Math.max(D.x-E.x,0),D.height=s),D}if(r==="right"){var R={x:p+v+P,y:a+s/2,horizontalAnchor:S,verticalAnchor:"middle"};return E&&(R.width=Math.max(E.x+E.width-R.x,0),R.height=s),R}var _=E?{width:v,height:s}:{};return r==="insideLeft"?Yt({x:p+P,y:a+s/2,horizontalAnchor:S,verticalAnchor:"middle"},_):r==="insideRight"?Yt({x:p+v-P,y:a+s/2,horizontalAnchor:O,verticalAnchor:"middle"},_):r==="insideTop"?Yt({x:u+l/2,y:a+h,horizontalAnchor:"middle",verticalAnchor:x},_):r==="insideBottom"?Yt({x:f+c/2,y:a+s-h,horizontalAnchor:"middle",verticalAnchor:y},_):r==="insideTopLeft"?Yt({x:u+P,y:a+h,horizontalAnchor:S,verticalAnchor:x},_):r==="insideTopRight"?Yt({x:u+l-P,y:a+h,horizontalAnchor:O,verticalAnchor:x},_):r==="insideBottomLeft"?Yt({x:f+P,y:a+s-h,horizontalAnchor:S,verticalAnchor:y},_):r==="insideBottomRight"?Yt({x:f+c-P,y:a+s-h,horizontalAnchor:O,verticalAnchor:y},_):r&&typeof r=="object"&&(q(r.x)||Cn(r.x))&&(q(r.y)||Cn(r.y))?Yt({x:i+nt(r.x,v),y:a+nt(r.y,s),horizontalAnchor:"end",verticalAnchor:"end"},_):Yt({x:g,y:a+s/2,horizontalAnchor:"middle",verticalAnchor:"middle"},_)},G5=["labelRef"],q5=["content"];function Zb(e,t){if(e==null)return{};var r,n,o=Y5(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Y5(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Jb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Uo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Jb(Object(r),!0).forEach(function(n){X5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function X5(e,t,r){return(t=Z5(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Z5(e){var t=J5(e,"string");return typeof t=="symbol"?t:t+""}function J5(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function dr(){return dr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},dr.apply(null,arguments)}var eC=A.createContext(null),Q5=e=>{var{x:t,y:r,upperWidth:n,lowerWidth:o,width:i,height:a,children:s}=e,l=A.useMemo(()=>({x:t,y:r,upperWidth:n,lowerWidth:o,width:i,height:a}),[t,r,n,o,i,a]);return d.createElement(eC.Provider,{value:l},s)},tC=()=>{var e=A.useContext(eC),t=yl();return e||(t?lp(t):void 0)},e3=A.createContext(null),t3=()=>{var e=A.useContext(e3),t=J(KO);return e||t},r3=e=>{var{value:t,formatter:r}=e,n=_e(e.children)?t:e.children;return typeof r=="function"?r(n):n},Cv=e=>e!=null&&typeof e=="function",n3=(e,t)=>{var r=He(t-e),n=Math.min(Math.abs(t-e),360);return r*n},o3=(e,t,r,n,o)=>{var{offset:i,className:a}=e,{cx:s,cy:l,innerRadius:c,outerRadius:u,startAngle:f,endAngle:p,clockWise:v}=o,g=(c+u)/2,m=n3(f,p),h=m>=0?1:-1,y,x;switch(t){case"insideStart":y=f+h*i,x=v;break;case"insideEnd":y=p-h*i,x=!v;break;case"end":y=p+h*i,x=v;break;default:throw new Error("Unsupported position ".concat(t))}x=m<=0?x:!x;var w=Ie(s,l,g,y),P=Ie(s,l,g,y+(x?1:-1)*359),O="M".concat(w.x,",").concat(w.y,`
99
+ A`).concat(g,",").concat(g,",0,1,").concat(x?0:1,`,
100
+ `).concat(P.x,",").concat(P.y),S=_e(e.id)?Yo("recharts-radial-line-"):e.id;return d.createElement("text",dr({},n,{dominantBaseline:"central",className:fe("recharts-radial-bar-label",a)}),d.createElement("defs",null,d.createElement("path",{id:S,d:O})),d.createElement("textPath",{xlinkHref:"#".concat(S)},r))},i3=(e,t,r)=>{var{cx:n,cy:o,innerRadius:i,outerRadius:a,startAngle:s,endAngle:l}=e,c=(s+l)/2;if(r==="outside"){var{x:u,y:f}=Ie(n,o,a+t,c);return{x:u,y:f,textAnchor:u>=n?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:n,y:o,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:n,y:o,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:n,y:o,textAnchor:"middle",verticalAnchor:"end"};var p=(i+a)/2,{x:v,y:g}=Ie(n,o,p,c);return{x:v,y:g,textAnchor:"middle",verticalAnchor:"middle"}},Ba=e=>e!=null&&"cx"in e&&q(e.cx),a3={angle:0,offset:5,zIndex:De.label,position:"middle",textBreakAll:!1};function s3(e){if(!Ba(e))return e;var{cx:t,cy:r,outerRadius:n}=e,o=n*2;return{x:t-n,y:r-n,width:o,upperWidth:o,lowerWidth:o,height:o}}function Fr(e){var t=$e(e,a3),{viewBox:r,parentViewBox:n,position:o,value:i,children:a,content:s,className:l="",textBreakAll:c,labelRef:u}=t,f=t3(),p=tC(),v=o==="center"?p:f??p,g,m,h;r==null?g=v:Ba(r)?g=r:g=lp(r);var y=s3(g);if(!g||_e(i)&&_e(a)&&!A.isValidElement(s)&&typeof s!="function")return null;var x=Uo(Uo({},t),{},{viewBox:g});if(A.isValidElement(s)){var{labelRef:w}=x,P=Zb(x,G5);return A.cloneElement(s,P)}if(typeof s=="function"){var{content:O}=x,S=Zb(x,q5);if(m=A.createElement(s,S),A.isValidElement(m))return m}else m=r3(t);var E=ft(t);if(Ba(g)){if(o==="insideStart"||o==="insideEnd"||o==="end")return o3(t,o,m,E,g);h=i3(g,t.offset,t.position)}else{if(!y)return null;var C=H5({viewBox:y,position:o,offset:t.offset,parentViewBox:Ba(n)?void 0:n});h=Uo(Uo({x:C.x,y:C.y,textAnchor:C.horizontalAnchor,verticalAnchor:C.verticalAnchor},C.width!==void 0?{width:C.width}:{}),C.height!==void 0?{height:C.height}:{})}return d.createElement(yt,{zIndex:t.zIndex},d.createElement(Wl,dr({ref:u,className:fe("recharts-label",l)},E,h,{textAnchor:L5(E.textAnchor)?E.textAnchor:h.textAnchor,breakAll:c}),m))}Fr.displayName="Label";var l3=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?d.createElement(Fr,dr({key:"label-implicit"},n)):or(e)?d.createElement(Fr,dr({key:"label-implicit",value:e},n)):A.isValidElement(e)?e.type===Fr?A.cloneElement(e,Uo({key:"label-implicit"},n)):d.createElement(Fr,dr({key:"label-implicit",content:e},n)):Cv(e)?d.createElement(Fr,dr({key:"label-implicit",content:e},n)):e&&typeof e=="object"?d.createElement(Fr,dr({},e,{key:"label-implicit"},n)):null};function c3(e){var{label:t,labelRef:r}=e,n=tC();return l3(t,n,r)||null}var qu={},Yu={},Qb;function u3(){return Qb||(Qb=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r[r.length-1]}e.last=t})(Yu)),Yu}var Xu={},ex;function f3(){return ex||(ex=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Array.isArray(r)?r:Array.from(r)}e.toArray=t})(Xu)),Xu}var tx;function d3(){return tx||(tx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=u3(),r=f3(),n=Xd();function o(i){if(n.isArrayLike(i))return t.last(r.toArray(i))}e.last=o})(qu)),qu}var Zu,rx;function p3(){return rx||(rx=1,Zu=d3().last),Zu}var v3=p3();const m3=Zr(v3);var h3=["valueAccessor"],g3=["dataKey","clockWise","id","textBreakAll","zIndex"];function ks(){return ks=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ks.apply(null,arguments)}function nx(e,t){if(e==null)return{};var r,n,o=y3(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function y3(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var b3=e=>Array.isArray(e.value)?m3(e.value):e.value,rC=A.createContext(void 0),nC=rC.Provider,oC=A.createContext(void 0),x3=oC.Provider;function w3(){return A.useContext(rC)}function P3(){return A.useContext(oC)}function Va(e){var{valueAccessor:t=b3}=e,r=nx(e,h3),{dataKey:n,clockWise:o,id:i,textBreakAll:a,zIndex:s}=r,l=nx(r,g3),c=w3(),u=P3(),f=c||u;return!f||!f.length?null:d.createElement(yt,{zIndex:s??De.label},d.createElement(Ge,{className:"recharts-label-list"},f.map((p,v)=>{var g,m=_e(n)?t(p,v):be(p.payload,n),h=_e(i)?{}:{id:"".concat(i,"-").concat(v)};return d.createElement(Fr,ks({key:"label-".concat(v)},ft(p),l,h,{fill:(g=r.fill)!==null&&g!==void 0?g:p.fill,parentViewBox:p.parentViewBox,value:m,textBreakAll:a,viewBox:p.viewBox,index:v,zIndex:0}))})))}Va.displayName="LabelList";function Av(e){var{label:t}=e;return t?t===!0?d.createElement(Va,{key:"labelList-implicit"}):d.isValidElement(t)||Cv(t)?d.createElement(Va,{key:"labelList-implicit",content:t}):typeof t=="object"?d.createElement(Va,ks({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function ld(){return ld=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ld.apply(null,arguments)}var iC=e=>{var{cx:t,cy:r,r:n,className:o}=e,i=fe("recharts-dot",o);return q(t)&&q(r)&&q(n)?d.createElement("circle",ld({},Ct(e),Yd(e),{className:i,cx:t,cy:r,r:n})):null},aC=e=>e.graphicalItems.polarItems,S3=M([Te,Di],qp),Kl=M([aC,Ne,S3],Yp),O3=M([Kl],Xp),Ul=M([O3,Ml],Zp),E3=M([Ul,Ne,Kl],Qp);M([Ul,Ne,Kl],(e,t,r)=>r.length>0?e.flatMap(n=>r.flatMap(o=>{var i,a=be(n,(i=t.dataKey)!==null&&i!==void 0?i:o.dataKey);return{value:a,errorDomain:[]}})).filter(Boolean):t?.dataKey!=null?e.map(n=>({value:be(n,t.dataKey),errorDomain:[]})):e.map(n=>({value:n,errorDomain:[]})));var ox=()=>{},C3=M([Ul,Ne,Kl,Fl,Te],nv),A3=M([Ne,tv,rv,ox,C3,ox,ve,Te],ov),sC=M([Ne,ve,Ul,E3,Ii,Te,A3],iv),_3=M([sC,So,en],lv),T3=M([Ne,sC,_3,Te],uv);M([en,T3],HO);var M3={radiusAxis:{},angleAxis:{}},lC=gt({name:"polarAxis",initialState:M3,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:IQ,removeRadiusAxis:DQ,addAngleAxis:RQ,removeAngleAxis:$Q}=lC.actions,j3=lC.reducer;function cC(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}function ix(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ax(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ix(Object(r),!0).forEach(function(n){k3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ix(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function k3(e,t,r){return(t=N3(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function N3(e){var t=I3(e,"string");return typeof t=="symbol"?t:t+""}function I3(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var D3=(e,t)=>t,_v=M([aC,D3],(e,t)=>e.filter(r=>r.type==="pie").find(r=>r.id===t)),R3=[],Tv=(e,t,r)=>r?.length===0?R3:r,uC=M([Ml,_v,Tv],(e,t,r)=>{var{chartData:n}=e;if(t!=null){var o;if(t?.data!=null&&t.data.length>0?o=t.data:o=n,(!o||!o.length)&&r!=null&&(o=r.map(i=>ax(ax({},t.presentationProps),i.props))),o!=null)return o}}),$3=M([uC,_v,Tv],(e,t,r)=>{if(!(e==null||t==null))return e.map((n,o)=>{var i,a=be(n,t.nameKey,t.name),s;return r!=null&&(i=r[o])!==null&&i!==void 0&&(i=i.props)!==null&&i!==void 0&&i.fill?s=r[o].props.fill:typeof n=="object"&&n!=null&&"fill"in n?s=n.fill:s=t.fill,{value:yo(a,t.dataKey),color:s,payload:n,type:t.legendType}})}),L3=M([uC,_v,Tv,ze],(e,t,r,n)=>{if(!(t==null||e==null))return z4({offset:n,pieSettings:t,displayedData:e,cells:r})}),Ca={exports:{}},ge={};var sx;function F3(){if(sx)return ge;sx=1;var e=60103,t=60106,r=60107,n=60108,o=60114,i=60109,a=60110,s=60112,l=60113,c=60120,u=60115,f=60116,p=60121,v=60122,g=60117,m=60129,h=60131;if(typeof Symbol=="function"&&Symbol.for){var y=Symbol.for;e=y("react.element"),t=y("react.portal"),r=y("react.fragment"),n=y("react.strict_mode"),o=y("react.profiler"),i=y("react.provider"),a=y("react.context"),s=y("react.forward_ref"),l=y("react.suspense"),c=y("react.suspense_list"),u=y("react.memo"),f=y("react.lazy"),p=y("react.block"),v=y("react.server.block"),g=y("react.fundamental"),m=y("react.debug_trace_mode"),h=y("react.legacy_hidden")}function x(k){if(typeof k=="object"&&k!==null){var I=k.$$typeof;switch(I){case e:switch(k=k.type,k){case r:case o:case n:case l:case c:return k;default:switch(k=k&&k.$$typeof,k){case a:case s:case f:case u:case i:return k;default:return I}}case t:return I}}}var w=i,P=e,O=s,S=r,E=f,C=u,j=t,D=o,R=n,_=l;return ge.ContextConsumer=a,ge.ContextProvider=w,ge.Element=P,ge.ForwardRef=O,ge.Fragment=S,ge.Lazy=E,ge.Memo=C,ge.Portal=j,ge.Profiler=D,ge.StrictMode=R,ge.Suspense=_,ge.isAsyncMode=function(){return!1},ge.isConcurrentMode=function(){return!1},ge.isContextConsumer=function(k){return x(k)===a},ge.isContextProvider=function(k){return x(k)===i},ge.isElement=function(k){return typeof k=="object"&&k!==null&&k.$$typeof===e},ge.isForwardRef=function(k){return x(k)===s},ge.isFragment=function(k){return x(k)===r},ge.isLazy=function(k){return x(k)===f},ge.isMemo=function(k){return x(k)===u},ge.isPortal=function(k){return x(k)===t},ge.isProfiler=function(k){return x(k)===o},ge.isStrictMode=function(k){return x(k)===n},ge.isSuspense=function(k){return x(k)===l},ge.isValidElementType=function(k){return typeof k=="string"||typeof k=="function"||k===r||k===o||k===m||k===n||k===l||k===c||k===h||typeof k=="object"&&k!==null&&(k.$$typeof===f||k.$$typeof===u||k.$$typeof===i||k.$$typeof===a||k.$$typeof===s||k.$$typeof===g||k.$$typeof===p||k[0]===v)},ge.typeOf=x,ge}var ye={};var lx;function z3(){return lx||(lx=1,process.env.NODE_ENV!=="production"&&(function(){var e=60103,t=60106,r=60107,n=60108,o=60114,i=60109,a=60110,s=60112,l=60113,c=60120,u=60115,f=60116,p=60121,v=60122,g=60117,m=60129,h=60131;if(typeof Symbol=="function"&&Symbol.for){var y=Symbol.for;e=y("react.element"),t=y("react.portal"),r=y("react.fragment"),n=y("react.strict_mode"),o=y("react.profiler"),i=y("react.provider"),a=y("react.context"),s=y("react.forward_ref"),l=y("react.suspense"),c=y("react.suspense_list"),u=y("react.memo"),f=y("react.lazy"),p=y("react.block"),v=y("react.server.block"),g=y("react.fundamental"),y("react.scope"),y("react.opaque.id"),m=y("react.debug_trace_mode"),y("react.offscreen"),h=y("react.legacy_hidden")}var x=!1;function w(F){return!!(typeof F=="string"||typeof F=="function"||F===r||F===o||F===m||F===n||F===l||F===c||F===h||x||typeof F=="object"&&F!==null&&(F.$$typeof===f||F.$$typeof===u||F.$$typeof===i||F.$$typeof===a||F.$$typeof===s||F.$$typeof===g||F.$$typeof===p||F[0]===v))}function P(F){if(typeof F=="object"&&F!==null){var L=F.$$typeof;switch(L){case e:var de=F.type;switch(de){case r:case o:case n:case l:case c:return de;default:var se=de&&de.$$typeof;switch(se){case a:case s:case f:case u:case i:return se;default:return L}}case t:return L}}}var O=a,S=i,E=e,C=s,j=r,D=f,R=u,_=t,k=o,I=n,V=l,z=!1,K=!1;function T(F){return z||(z=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function N(F){return K||(K=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function G(F){return P(F)===a}function Q(F){return P(F)===i}function te(F){return typeof F=="object"&&F!==null&&F.$$typeof===e}function ne(F){return P(F)===s}function re(F){return P(F)===r}function le(F){return P(F)===f}function Oe(F){return P(F)===u}function W(F){return P(F)===t}function ue(F){return P(F)===o}function $(F){return P(F)===n}function H(F){return P(F)===l}ye.ContextConsumer=O,ye.ContextProvider=S,ye.Element=E,ye.ForwardRef=C,ye.Fragment=j,ye.Lazy=D,ye.Memo=R,ye.Portal=_,ye.Profiler=k,ye.StrictMode=I,ye.Suspense=V,ye.isAsyncMode=T,ye.isConcurrentMode=N,ye.isContextConsumer=G,ye.isContextProvider=Q,ye.isElement=te,ye.isForwardRef=ne,ye.isFragment=re,ye.isLazy=le,ye.isMemo=Oe,ye.isPortal=W,ye.isProfiler=ue,ye.isStrictMode=$,ye.isSuspense=H,ye.isValidElementType=w,ye.typeOf=P})()),ye}var cx;function B3(){return cx||(cx=1,process.env.NODE_ENV==="production"?Ca.exports=F3():Ca.exports=z3()),Ca.exports}var V3=B3(),ux=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",fx=null,Ju=null,fC=e=>{if(e===fx&&Array.isArray(Ju))return Ju;var t=[];return A.Children.forEach(e,r=>{_e(r)||(V3.isFragment(r)?t=t.concat(fC(r.props.children)):t.push(r))}),Ju=t,fx=e,t};function Mv(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(o=>ux(o)):n=[ux(t)],fC(e).forEach(o=>{var i=En(o,"type.displayName")||En(o,"type.name");i&&n.indexOf(i)!==-1&&r.push(o)}),r}var dC=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0,Qu={},dx;function W3(){return dx||(dx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){if(typeof r!="object"||r==null)return!1;if(Object.getPrototypeOf(r)===null)return!0;if(Object.prototype.toString.call(r)!=="[object Object]"){const o=r[Symbol.toStringTag];return o==null||!Object.getOwnPropertyDescriptor(r,Symbol.toStringTag)?.writable?!1:r.toString()===`[object ${o}]`}let n=r;for(;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(r)===n}e.isPlainObject=t})(Qu)),Qu}var ef,px;function K3(){return px||(px=1,ef=W3().isPlainObject),ef}var U3=K3();const H3=Zr(U3);var vx,mx,hx,gx,yx;function bx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function xx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bx(Object(r),!0).forEach(function(n){G3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function G3(e,t,r){return(t=q3(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function q3(e){var t=Y3(e,"string");return typeof t=="symbol"?t:t+""}function Y3(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ns(){return Ns=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ns.apply(null,arguments)}function Bo(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var wx=(e,t,r,n,o)=>{var i=r-n,a;return a=je(vx||(vx=Bo(["M ",",",""])),e,t),a+=je(mx||(mx=Bo(["L ",",",""])),e+r,t),a+=je(hx||(hx=Bo(["L ",",",""])),e+r-i/2,t+o),a+=je(gx||(gx=Bo(["L ",",",""])),e+r-i/2-n,t+o),a+=je(yx||(yx=Bo(["L ",","," Z"])),e,t),a},X3={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Z3=e=>{var t=$e(e,X3),{x:r,y:n,upperWidth:o,lowerWidth:i,height:a,className:s}=t,{animationEasing:l,animationDuration:c,animationBegin:u,isUpdateAnimationActive:f}=t,p=A.useRef(null),[v,g]=A.useState(-1),m=A.useRef(o),h=A.useRef(i),y=A.useRef(a),x=A.useRef(r),w=A.useRef(n),P=Ti(e,"trapezoid-");if(A.useEffect(()=>{if(p.current&&p.current.getTotalLength)try{var I=p.current.getTotalLength();I&&g(I)}catch{}},[]),r!==+r||n!==+n||o!==+o||i!==+i||a!==+a||o===0&&i===0||a===0)return null;var O=fe("recharts-trapezoid",s);if(!f)return d.createElement("g",null,d.createElement("path",Ns({},ft(t),{className:O,d:wx(r,n,o,i,a)})));var S=m.current,E=h.current,C=y.current,j=x.current,D=w.current,R="0px ".concat(v===-1?1:v,"px"),_="".concat(v,"px 0px"),k=RS(["strokeDasharray"],c,l);return d.createElement(_i,{animationId:P,key:P,canBegin:v>0,duration:c,easing:l,isActive:f,begin:u},I=>{var V=Ce(S,o,I),z=Ce(E,i,I),K=Ce(C,a,I),T=Ce(j,r,I),N=Ce(D,n,I);p.current&&(m.current=V,h.current=z,y.current=K,x.current=T,w.current=N);var G=I>0?{transition:k,strokeDasharray:_}:{strokeDasharray:R};return d.createElement("path",Ns({},ft(t),{className:O,d:wx(T,N,V,z,K),ref:p,style:xx(xx({},G),t.style)}))})},J3=["option","shapeType","activeClassName"];function Q3(e,t){if(e==null)return{};var r,n,o=e4(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function e4(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Px(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Is(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Px(Object(r),!0).forEach(function(n){t4(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Px(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function t4(e,t,r){return(t=r4(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function r4(e){var t=n4(e,"string");return typeof t=="symbol"?t:t+""}function n4(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function o4(e,t){return Is(Is({},t),e)}function i4(e,t){return e==="symbols"}function Sx(e){var{shapeType:t,elementProps:r}=e;switch(t){case"rectangle":return d.createElement(zS,r);case"trapezoid":return d.createElement(Z3,r);case"sector":return d.createElement(KS,r);case"symbols":if(i4(t))return d.createElement(qd,r);break;case"curve":return d.createElement(pp,r);default:return null}}function a4(e){return A.isValidElement(e)?e.props:e}function jv(e){var{option:t,shapeType:r,activeClassName:n="recharts-active-shape"}=e,o=Q3(e,J3),i;if(A.isValidElement(t))i=A.cloneElement(t,Is(Is({},o),a4(t)));else if(typeof t=="function")i=t(o,o.index);else if(H3(t)&&typeof t!="boolean"){var a=o4(t,o);i=d.createElement(Sx,{shapeType:r,elementProps:a})}else{var s=o;i=d.createElement(Sx,{shapeType:r,elementProps:s})}return o.isActive?d.createElement(Ge,{className:n},i):i}var kv=(e,t,r)=>{var n=Pe();return(o,i)=>a=>{e?.(o,i,a),n(PE({activeIndex:String(i),activeDataKey:t,activeCoordinate:o.tooltipPosition,activeGraphicalItemId:r}))}},Nv=e=>{var t=Pe();return(r,n)=>o=>{e?.(r,n,o),t(sK())}},Iv=(e,t,r)=>{var n=Pe();return(o,i)=>a=>{e?.(o,i,a),n(lK({activeIndex:String(i),activeDataKey:t,activeCoordinate:o.tooltipPosition,activeGraphicalItemId:r}))}};function Dv(e){var{tooltipEntrySettings:t}=e,r=Pe(),n=at(),o=A.useRef(null);return A.useLayoutEffect(()=>{n||(o.current===null?r(nK(t)):o.current!==t&&r(oK({prev:o.current,next:t})),o.current=t)},[t,r,n]),A.useLayoutEffect(()=>()=>{o.current&&(r(iK(o.current)),o.current=null)},[r]),null}function pC(e){var{legendPayload:t}=e,r=Pe(),n=at(),o=A.useRef(null);return A.useLayoutEffect(()=>{n||(o.current===null?r(kS(t)):o.current!==t&&r(NS({prev:o.current,next:t})),o.current=t)},[r,n,t]),A.useLayoutEffect(()=>()=>{o.current&&(r(IS(o.current)),o.current=null)},[r]),null}function s4(e){var{legendPayload:t}=e,r=Pe(),n=J(ve),o=A.useRef(null);return A.useLayoutEffect(()=>{n!=="centric"&&n!=="radial"||(o.current===null?r(kS(t)):o.current!==t&&r(NS({prev:o.current,next:t})),o.current=t)},[r,n,t]),A.useLayoutEffect(()=>()=>{o.current&&(r(IS(o.current)),o.current=null)},[r]),null}var tf,l4=()=>{var[e]=d.useState(()=>Yo("uid-"));return e},c4=(tf=d.useId)!==null&&tf!==void 0?tf:l4;function u4(e,t){var r=c4();return t||(e?"".concat(e,"-").concat(r):r)}var f4=A.createContext(void 0),Rv=e=>{var{id:t,type:r,children:n}=e,o=u4("recharts-".concat(r),t);return d.createElement(f4.Provider,{value:o},n(o))},d4={cartesianItems:[],polarItems:[]},vC=gt({name:"graphicalItems",initialState:d4,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:Ee()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:r,next:n}=t.payload,o=zt(e).cartesianItems.indexOf(r);o>-1&&(e.cartesianItems[o]=n)},prepare:Ee()},removeCartesianGraphicalItem:{reducer(e,t){var r=zt(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},prepare:Ee()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:Ee()},removePolarGraphicalItem:{reducer(e,t){var r=zt(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)},prepare:Ee()}}}),{addCartesianGraphicalItem:p4,replaceCartesianGraphicalItem:v4,removeCartesianGraphicalItem:m4,addPolarGraphicalItem:h4,removePolarGraphicalItem:g4}=vC.actions,y4=vC.reducer,b4=e=>{var t=Pe(),r=A.useRef(null);return A.useLayoutEffect(()=>{r.current===null?t(p4(e)):r.current!==e&&t(v4({prev:r.current,next:e})),r.current=e},[t,e]),A.useLayoutEffect(()=>()=>{r.current&&(t(m4(r.current)),r.current=null)},[t]),null},mC=A.memo(b4);function x4(e){var t=Pe();return A.useLayoutEffect(()=>(t(h4(e)),()=>{t(g4(e))}),[t,e]),null}var w4=["key"],P4=["onMouseEnter","onClick","onMouseLeave"],S4=["id"],O4=["id"];function Ox(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ke(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ox(Object(r),!0).forEach(function(n){E4(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ox(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function E4(e,t,r){return(t=C4(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function C4(e){var t=A4(e,"string");return typeof t=="symbol"?t:t+""}function A4(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qr(){return qr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},qr.apply(null,arguments)}function Hl(e,t){if(e==null)return{};var r,n,o=_4(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function _4(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function T4(e){var t=A.useMemo(()=>Mv(e.children,Bi),[e.children]),r=J(n=>$3(n,e.id,t));return r==null?null:d.createElement(s4,{legendPayload:r})}var M4=d.memo(e=>{var{dataKey:t,nameKey:r,sectors:n,stroke:o,strokeWidth:i,fill:a,name:s,hide:l,tooltipType:c,id:u}=e,f={dataDefinedOnItem:n.map(p=>p.tooltipPayload),getPosition:p=>{var v;return(v=n[Number(p)])===null||v===void 0?void 0:v.tooltipPosition},settings:{stroke:o,strokeWidth:i,fill:a,dataKey:t,nameKey:r,name:yo(s,t),hide:l,type:c,color:a,unit:"",graphicalItemId:u}};return d.createElement(Dv,{tooltipEntrySettings:f})}),j4=(e,t)=>e>t?"start":e<t?"end":"middle",k4=(e,t,r)=>nt(typeof t=="function"?t(e):t,r,r*.8),N4=(e,t,r)=>{var{top:n,left:o,width:i,height:a}=t,s=BS(i,a),l=o+nt(e.cx,i,i/2),c=n+nt(e.cy,a,a/2),u=nt(e.innerRadius,s,0),f=k4(r,e.outerRadius,s),p=e.maxRadius||Math.sqrt(i*i+a*a)/2;return{cx:l,cy:c,innerRadius:u,outerRadius:f,maxRadius:p}},I4=(e,t)=>{var r=He(t-e),n=Math.min(Math.abs(t-e),360);return r*n},D4=(e,t)=>{if(d.isValidElement(e))return d.cloneElement(e,t);if(typeof e=="function")return e(t);var r=fe("recharts-pie-label-line",typeof e!="boolean"?e.className:""),{key:n}=t,o=Hl(t,w4);return d.createElement(pp,qr({},o,{type:"linear",className:r}))},R4=(e,t,r)=>{if(d.isValidElement(e))return d.cloneElement(e,t);var n=r;if(typeof e=="function"&&(n=e(t),d.isValidElement(n)))return n;var o=fe("recharts-pie-label-text",cC(e));return d.createElement(Wl,qr({},t,{alignmentBaseline:"middle",className:o}),n)};function $4(e){var{sectors:t,props:r,showLabels:n}=e,{label:o,labelLine:i,dataKey:a}=r;if(!n||!o||!t)return null;var s=Ct(r),l=Sn(o),c=Sn(i),u=typeof o=="object"&&"offsetRadius"in o&&typeof o.offsetRadius=="number"&&o.offsetRadius||20,f=t.map((p,v)=>{var g=(p.startAngle+p.endAngle)/2,m=Ie(p.cx,p.cy,p.outerRadius+u,g),h=ke(ke(ke(ke({},s),p),{},{stroke:"none"},l),{},{index:v,textAnchor:j4(m.x,p.cx)},m),y=ke(ke(ke(ke({},s),p),{},{fill:"none",stroke:p.fill},c),{},{index:v,points:[Ie(p.cx,p.cy,p.outerRadius,g),m],key:"line"});return d.createElement(yt,{zIndex:De.label,key:"label-".concat(p.startAngle,"-").concat(p.endAngle,"-").concat(p.midAngle,"-").concat(v)},d.createElement(Ge,null,i&&D4(i,y),R4(o,h,be(p,a))))});return d.createElement(Ge,{className:"recharts-pie-labels"},f)}function L4(e){var{sectors:t,props:r,showLabels:n}=e,{label:o}=r;return typeof o=="object"&&o!=null&&"position"in o?d.createElement(Av,{label:o}):d.createElement($4,{sectors:t,props:r,showLabels:n})}function F4(e){var{sectors:t,activeShape:r,inactiveShape:n,allOtherPieProps:o,shape:i,id:a}=e,s=J(Gr),l=J(bv),c=J(GK),{onMouseEnter:u,onClick:f,onMouseLeave:p}=o,v=Hl(o,P4),g=kv(u,o.dataKey,a),m=Nv(p),h=Iv(f,o.dataKey,a);return t==null||t.length===0?null:d.createElement(d.Fragment,null,t.map((y,x)=>{if(y?.startAngle===0&&y?.endAngle===0&&t.length!==1)return null;var w=c==null||c===a,P=String(x)===s&&(l==null||o.dataKey===l)&&w,O=s?n:null,S=r&&P?r:O,E=ke(ke({},y),{},{stroke:y.stroke,tabIndex:-1,[gS]:x,[yS]:a});return d.createElement(Ge,qr({key:"sector-".concat(y?.startAngle,"-").concat(y?.endAngle,"-").concat(y.midAngle,"-").concat(x),tabIndex:-1,className:"recharts-pie-sector"},xi(v,y,x),{onMouseEnter:g(y,x),onMouseLeave:m(y,x),onClick:h(y,x)}),d.createElement(jv,qr({option:i??S,index:x,shapeType:"sector",isActive:P},E)))}))}function z4(e){var t,{pieSettings:r,displayedData:n,cells:o,offset:i}=e,{cornerRadius:a,startAngle:s,endAngle:l,dataKey:c,nameKey:u,tooltipType:f}=r,p=Math.abs(r.minAngle),v=I4(s,l),g=Math.abs(v),m=n.length<=1?0:(t=r.paddingAngle)!==null&&t!==void 0?t:0,h=n.filter(S=>be(S,c,0)!==0).length,y=(g>=360?h:h-1)*m,x=g-h*p-y,w=n.reduce((S,E)=>{var C=be(E,c,0);return S+(q(C)?C:0)},0),P;if(w>0){var O;P=n.map((S,E)=>{var C=be(S,c,0),j=be(S,u,E),D=N4(r,i,S),R=(q(C)?C:0)/w,_,k=ke(ke({},S),o&&o[E]&&o[E].props);E?_=O.endAngle+He(v)*m*(C!==0?1:0):_=s;var I=_+He(v)*((C!==0?p:0)+R*x),V=(_+I)/2,z=(D.innerRadius+D.outerRadius)/2,K=[{name:j,value:C,payload:k,dataKey:c,type:f,graphicalItemId:r.id}],T=Ie(D.cx,D.cy,z,V);return O=ke(ke(ke(ke({},r.presentationProps),{},{percent:R,cornerRadius:typeof a=="string"?parseFloat(a):a,name:j,tooltipPayload:K,midAngle:V,middleRadius:z,tooltipPosition:T},k),D),{},{value:C,dataKey:c,startAngle:_,endAngle:I,payload:k,paddingAngle:He(v)*m}),O})}return P}function B4(e){var{showLabels:t,sectors:r,children:n}=e,o=A.useMemo(()=>!t||!r?[]:r.map(i=>({value:i.value,payload:i.payload,clockWise:!1,parentViewBox:void 0,viewBox:{cx:i.cx,cy:i.cy,innerRadius:i.innerRadius,outerRadius:i.outerRadius,startAngle:i.startAngle,endAngle:i.endAngle,clockWise:!1},fill:i.fill})),[r,t]);return d.createElement(x3,{value:t?o:void 0},n)}function V4(e){var{props:t,previousSectorsRef:r,id:n}=e,{sectors:o,isAnimationActive:i,animationBegin:a,animationDuration:s,animationEasing:l,activeShape:c,inactiveShape:u,onAnimationStart:f,onAnimationEnd:p}=t,v=Ti(t,"recharts-pie-"),g=r.current,[m,h]=A.useState(!1),y=A.useCallback(()=>{typeof p=="function"&&p(),h(!1)},[p]),x=A.useCallback(()=>{typeof f=="function"&&f(),h(!0)},[f]);return d.createElement(B4,{showLabels:!m,sectors:o},d.createElement(_i,{animationId:v,begin:a,duration:s,isActive:i,easing:l,onAnimationStart:x,onAnimationEnd:y,key:v},w=>{var P,O=[],S=o&&o[0],E=(P=S?.startAngle)!==null&&P!==void 0?P:0;return o?.forEach((C,j)=>{var D=g&&g[j],R=j>0?En(C,"paddingAngle",0):0;if(D){var _=Ce(D.endAngle-D.startAngle,C.endAngle-C.startAngle,w),k=ke(ke({},C),{},{startAngle:E+R,endAngle:E+_+R});O.push(k),E=k.endAngle}else{var{endAngle:I,startAngle:V}=C,z=Ce(0,I-V,w),K=ke(ke({},C),{},{startAngle:E+R,endAngle:E+z+R});O.push(K),E=K.endAngle}}),r.current=O,d.createElement(Ge,null,d.createElement(F4,{sectors:O,activeShape:c,inactiveShape:u,allOtherPieProps:t,shape:t.shape,id:n}))}),d.createElement(L4,{showLabels:!m,sectors:o,props:t}),t.children)}var W4={animationBegin:400,animationDuration:1500,animationEasing:"ease",cx:"50%",cy:"50%",dataKey:"value",endAngle:360,fill:"#808080",hide:!1,innerRadius:0,isAnimationActive:"auto",label:!1,labelLine:!0,legendType:"rect",minAngle:0,nameKey:"name",outerRadius:"80%",paddingAngle:0,rootTabIndex:0,startAngle:0,stroke:"#fff",zIndex:De.area};function K4(e){var{id:t}=e,r=Hl(e,S4),{hide:n,className:o,rootTabIndex:i}=e,a=A.useMemo(()=>Mv(e.children,Bi),[e.children]),s=J(u=>L3(u,t,a)),l=A.useRef(null),c=fe("recharts-pie",o);return n||s==null?(l.current=null,d.createElement(Ge,{tabIndex:i,className:c})):d.createElement(yt,{zIndex:e.zIndex},d.createElement(M4,{dataKey:e.dataKey,nameKey:e.nameKey,sectors:s,stroke:e.stroke,strokeWidth:e.strokeWidth,fill:e.fill,name:e.name,hide:e.hide,tooltipType:e.tooltipType,id:t}),d.createElement(Ge,{tabIndex:i,className:c},d.createElement(V4,{props:ke(ke({},r),{},{sectors:s}),previousSectorsRef:l,id:t})))}function hC(e){var t=$e(e,W4),{id:r}=t,n=Hl(t,O4),o=Ct(n);return d.createElement(Rv,{id:r,type:"pie"},i=>d.createElement(d.Fragment,null,d.createElement(x4,{type:"pie",id:i,data:n.data,dataKey:n.dataKey,hide:n.hide,angleAxisId:0,radiusAxisId:0,name:n.name,nameKey:n.nameKey,tooltipType:n.tooltipType,legendType:n.legendType,fill:n.fill,cx:n.cx,cy:n.cy,startAngle:n.startAngle,endAngle:n.endAngle,paddingAngle:n.paddingAngle,minAngle:n.minAngle,innerRadius:n.innerRadius,outerRadius:n.outerRadius,cornerRadius:n.cornerRadius,presentationProps:o,maxRadius:t.maxRadius}),d.createElement(T4,qr({},n,{id:i})),d.createElement(K4,qr({},n,{id:i}))))}hC.displayName="Pie";var U4=["points"];function Ex(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function rf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ex(Object(r),!0).forEach(function(n){H4(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ex(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function H4(e,t,r){return(t=G4(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function G4(e){var t=q4(e,"string");return typeof t=="symbol"?t:t+""}function q4(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ds(){return Ds=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ds.apply(null,arguments)}function Y4(e,t){if(e==null)return{};var r,n,o=X4(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function X4(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Z4(e){var{option:t,dotProps:r,className:n}=e;if(A.isValidElement(t))return A.cloneElement(t,r);if(typeof t=="function")return t(r);var o=fe(n,typeof t!="boolean"?t.className:""),i=r??{},{points:a}=i,s=Y4(i,U4);return d.createElement(iC,Ds({},s,{className:o}))}function J4(e,t){return e==null?!1:t?!0:e.length===1}function Q4(e){var{points:t,dot:r,className:n,dotClassName:o,dataKey:i,baseProps:a,needClip:s,clipPathId:l,zIndex:c=De.scatter}=e;if(!J4(t,r))return null;var u=dC(r),f=qI(r),p=t.map((g,m)=>{var h,y,x=rf(rf(rf({r:3},a),f),{},{index:m,cx:(h=g.x)!==null&&h!==void 0?h:void 0,cy:(y=g.y)!==null&&y!==void 0?y:void 0,dataKey:i,value:g.value,payload:g.payload,points:t});return d.createElement(Z4,{key:"dot-".concat(m),option:r,dotProps:x,className:o})}),v={};return s&&l!=null&&(v.clipPath="url(#clipPath-".concat(u?"":"dots-").concat(l,")")),d.createElement(yt,{zIndex:c},d.createElement(Ge,Ds({className:n},v),p))}function Cx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Ax(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Cx(Object(r),!0).forEach(function(n){eH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function eH(e,t,r){return(t=tH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tH(e){var t=rH(e,"string");return typeof t=="symbol"?t:t+""}function rH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var gC=0,nH={xAxis:{},yAxis:{},zAxis:{}},yC=gt({name:"cartesianAxis",initialState:nH,reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:Ee()},replaceXAxis:{reducer(e,t){var{prev:r,next:n}=t.payload;e.xAxis[r.id]!==void 0&&(r.id!==n.id&&delete e.xAxis[r.id],e.xAxis[n.id]=n)},prepare:Ee()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:Ee()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:Ee()},replaceYAxis:{reducer(e,t){var{prev:r,next:n}=t.payload;e.yAxis[r.id]!==void 0&&(r.id!==n.id&&delete e.yAxis[r.id],e.yAxis[n.id]=n)},prepare:Ee()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:Ee()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:Ee()},replaceZAxis:{reducer(e,t){var{prev:r,next:n}=t.payload;e.zAxis[r.id]!==void 0&&(r.id!==n.id&&delete e.zAxis[r.id],e.zAxis[n.id]=n)},prepare:Ee()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:Ee()},updateYAxisWidth(e,t){var{id:r,width:n}=t.payload,o=e.yAxis[r];if(o){var i,a=o.widthHistory||[];if(a.length===3&&a[0]===a[2]&&n===a[1]&&n!==o.width&&Math.abs(n-((i=a[0])!==null&&i!==void 0?i:0))<=1)return;var s=[...a,n].slice(-3);e.yAxis[r]=Ax(Ax({},o),{},{width:n,widthHistory:s})}}}}),{addXAxis:oH,replaceXAxis:iH,removeXAxis:aH,addYAxis:sH,replaceYAxis:lH,removeYAxis:cH,addZAxis:LQ,replaceZAxis:FQ,removeZAxis:zQ,updateYAxisWidth:uH}=yC.actions,fH=yC.reducer,dH=M([ze],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),pH=M([dH,_r,Tr],(e,t,r)=>{if(!(!e||t==null||r==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,r-e.top-e.bottom)}}),$v=()=>J(pH),vH=()=>J(JK);function _x(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function nf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_x(Object(r),!0).forEach(function(n){mH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_x(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mH(e,t,r){return(t=hH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hH(e){var t=gH(e,"string");return typeof t=="symbol"?t:t+""}function gH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var yH=e=>{var{point:t,childIndex:r,mainColor:n,activeDot:o,dataKey:i,clipPath:a}=e;if(o===!1||t.x==null||t.y==null)return null;var s={index:r,dataKey:i,cx:t.x,cy:t.y,r:4,fill:n??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},l=nf(nf(nf({},s),Sn(o)),Yd(o)),c;return A.isValidElement(o)?c=A.cloneElement(o,l):typeof o=="function"?c=o(l):c=d.createElement(iC,l),d.createElement(Ge,{className:"recharts-active-dot",clipPath:a},c)};function bH(e){var{points:t,mainColor:r,activeDot:n,itemDataKey:o,clipPath:i,zIndex:a=De.activeDot}=e,s=J(Gr),l=vH();if(t==null||l==null)return null;var c=t.find(u=>l.includes(u.payload));return _e(c)?null:d.createElement(yt,{zIndex:a},d.createElement(yH,{point:c,childIndex:Number(s),mainColor:r,dataKey:o,activeDot:n,clipPath:i}))}var Tx=(e,t,r)=>{var n=r??e;if(!_e(n))return nt(n,t,0)},xH=(e,t,r)=>{var n={},o=e.filter(Il),i=e.filter(c=>c.stackId==null),a=o.reduce((c,u)=>{var f=c[u.stackId];return f==null&&(f=[]),f.push(u),c[u.stackId]=f,c},n),s=Object.entries(a).map(c=>{var u,[f,p]=c,v=p.map(m=>m.dataKey),g=Tx(t,r,(u=p[0])===null||u===void 0?void 0:u.barSize);return{stackId:f,dataKeys:v,barSize:g}}),l=i.map(c=>{var u=[c.dataKey].filter(p=>p!=null),f=Tx(t,r,c.barSize);return{stackId:void 0,dataKeys:u,barSize:f}});return[...s,...l]};function Mx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Aa(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Mx(Object(r),!0).forEach(function(n){wH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function wH(e,t,r){return(t=PH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function PH(e){var t=SH(e,"string");return typeof t=="symbol"?t:t+""}function SH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function OH(e,t,r,n,o){var i,a=n.length;if(!(a<1)){var s=nt(e,r,0,!0),l,c=[];if(ce((i=n[0])===null||i===void 0?void 0:i.barSize)){var u=!1,f=r/a,p=n.reduce((x,w)=>x+(w.barSize||0),0);p+=(a-1)*s,p>=r&&(p-=(a-1)*s,s=0),p>=r&&f>0&&(u=!0,f*=.9,p=a*f);var v=(r-p)/2>>0,g={offset:v-s,size:0};l=n.reduce((x,w)=>{var P,O={stackId:w.stackId,dataKeys:w.dataKeys,position:{offset:g.offset+g.size+s,size:u?f:(P=w.barSize)!==null&&P!==void 0?P:0}},S=[...x,O];return g=O.position,S},c)}else{var m=nt(t,r,0,!0);r-2*m-(a-1)*s<=0&&(s=0);var h=(r-2*m-(a-1)*s)/a;h>1&&(h>>=0);var y=ce(o)?Math.min(h,o):h;l=n.reduce((x,w,P)=>[...x,{stackId:w.stackId,dataKeys:w.dataKeys,position:{offset:m+(h+s)*P+(h-y)/2,size:y}}],c)}return l}}var EH=(e,t,r,n,o,i,a)=>{var s=_e(a)?t:a,l=OH(r,n,o!==i?o:i,e,s);return o!==i&&l!=null&&(l=l.map(c=>Aa(Aa({},c),{},{position:Aa(Aa({},c.position),{},{offset:c.position.offset-o/2})}))),l},CH=(e,t)=>{var r=Hp(t);if(!(!e||r==null||t==null)){var{stackId:n}=t;if(n!=null){var o=e[n];if(o){var{stackedData:i}=o;if(i)return i.find(a=>a.key===r)}}}},AH=(e,t)=>{if(!(e==null||t==null)){var r=e.find(n=>n.stackId===t.stackId&&t.dataKey!=null&&n.dataKeys.includes(t.dataKey));if(r!=null)return r.position}};function _H(e,t){return e&&typeof e=="object"&&"zIndex"in e&&typeof e.zIndex=="number"&&ce(e.zIndex)?e.zIndex:t}var bC=e=>{var{chartData:t}=e,r=Pe(),n=at();return A.useEffect(()=>n?()=>{}:(r(Db(t)),()=>{r(Db(void 0))}),[t,r,n]),null},jx={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},xC=gt({name:"brush",initialState:jx,reducers:{setBrushSettings(e,t){return t.payload==null?jx:t.payload}}}),{setBrushSettings:BQ}=xC.actions,TH=xC.reducer;function MH(e){return(e%180+180)%180}var jH=function(t){var{width:r,height:n}=t,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=MH(o),a=i*Math.PI/180,s=Math.atan(n/r),l=a>s&&a<Math.PI-s?n/Math.sin(a):r/Math.cos(a);return Math.abs(l)},kH={dots:[],areas:[],lines:[]},wC=gt({name:"referenceElements",initialState:kH,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=zt(e).dots.findIndex(n=>n===t.payload);r!==-1&&e.dots.splice(r,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var r=zt(e).areas.findIndex(n=>n===t.payload);r!==-1&&e.areas.splice(r,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var r=zt(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),{addDot:VQ,removeDot:WQ,addArea:KQ,removeArea:UQ,addLine:HQ,removeLine:GQ}=wC.actions,NH=wC.reducer,IH=A.createContext(void 0),DH=e=>{var{children:t}=e,[r]=A.useState("".concat(Yo("recharts"),"-clip")),n=$v();if(n==null)return null;var{x:o,y:i,width:a,height:s}=n;return d.createElement(IH.Provider,{value:r},d.createElement("defs",null,d.createElement("clipPath",{id:r},d.createElement("rect",{x:o,y:i,height:s,width:a}))),t)};function PC(e,t){if(t<1)return[];if(t===1)return e;for(var r=[],n=0;n<e.length;n+=t){var o=e[n];o!==void 0&&r.push(o)}return r}function RH(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return jH(n,r)}function $H(e,t,r){var n=r==="width",{x:o,y:i,width:a,height:s}=e;return t===1?{start:n?o:i,end:n?o+a:i+s}:{start:n?o+a:i+s,end:n?o:i}}function ci(e,t,r,n,o){if(e*t<e*n||e*t>e*o)return!1;var i=r();return e*(t-e*i/2-n)>=0&&e*(t+e*i/2-o)<=0}function LH(e,t){return PC(e,t+1)}function FH(e,t,r,n,o){for(var i=(n||[]).slice(),{start:a,end:s}=t,l=0,c=1,u=a,f=function(){var g=n?.[l];if(g===void 0)return{v:PC(n,c)};var m=l,h,y=()=>(h===void 0&&(h=r(g,m)),h),x=g.coordinate,w=l===0||ci(e,x,y,u,s);w||(l=0,u=a,c+=1),w&&(u=x+e*(y()/2+o),l+=c)},p;c<=i.length;)if(p=f(),p)return p.v;return[]}function zH(e,t,r,n,o){var i=(n||[]).slice(),a=i.length;if(a===0)return[];for(var{start:s,end:l}=t,c=1;c<=a;c++){for(var u=(a-1)%c,f=s,p=!0,v=function(){var P=n[m];if(P==null)return 0;var O=m,S,E=()=>(S===void 0&&(S=r(P,O)),S),C=P.coordinate,j=m===u||ci(e,C,E,f,l);if(!j)return p=!1,1;j&&(f=C+e*(E()/2+o))},g,m=u;m<a&&(g=v(),!(g!==0&&g===1));m+=c);if(p){for(var h=[],y=u;y<a;y+=c){var x=n[y];x!=null&&h.push(x)}return h}}return[]}function kx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function tt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kx(Object(r),!0).forEach(function(n){BH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function BH(e,t,r){return(t=VH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function VH(e){var t=WH(e,"string");return typeof t=="symbol"?t:t+""}function WH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function KH(e,t,r,n,o){for(var i=(n||[]).slice(),a=i.length,{start:s}=t,{end:l}=t,c=function(p){var v=i[p];if(v==null)return 1;var g=v,m,h=()=>(m===void 0&&(m=r(v,p)),m);if(p===a-1){var y=e*(g.coordinate+e*h()/2-l);i[p]=g=tt(tt({},g),{},{tickCoord:y>0?g.coordinate-y*e:g.coordinate})}else i[p]=g=tt(tt({},g),{},{tickCoord:g.coordinate});if(g.tickCoord!=null){var x=ci(e,g.tickCoord,h,s,l);x&&(l=g.tickCoord-e*(h()/2+o),i[p]=tt(tt({},g),{},{isShow:!0}))}},u=a-1;u>=0;u--)c(u);return i}function UH(e,t,r,n,o,i){var a=(n||[]).slice(),s=a.length,{start:l,end:c}=t;if(i){var u=n[s-1];if(u!=null){var f=r(u,s-1),p=e*(u.coordinate+e*f/2-c);if(a[s-1]=u=tt(tt({},u),{},{tickCoord:p>0?u.coordinate-p*e:u.coordinate}),u.tickCoord!=null){var v=ci(e,u.tickCoord,()=>f,l,c);v&&(c=u.tickCoord-e*(f/2+o),a[s-1]=tt(tt({},u),{},{isShow:!0}))}}}for(var g=i?s-1:s,m=function(x){var w=a[x];if(w==null)return 1;var P=w,O,S=()=>(O===void 0&&(O=r(w,x)),O);if(x===0){var E=e*(P.coordinate-e*S()/2-l);a[x]=P=tt(tt({},P),{},{tickCoord:E<0?P.coordinate-E*e:P.coordinate})}else a[x]=P=tt(tt({},P),{},{tickCoord:P.coordinate});if(P.tickCoord!=null){var C=ci(e,P.tickCoord,S,l,c);C&&(l=P.tickCoord+e*(S()/2+o),a[x]=tt(tt({},P),{},{isShow:!0}))}},h=0;h<g;h++)m(h);return a}function Lv(e,t,r){var{tick:n,ticks:o,viewBox:i,minTickGap:a,orientation:s,interval:l,tickFormatter:c,unit:u,angle:f}=e;if(!o||!o.length||!n)return[];if(q(l)||Sl.isSsr){var p;return(p=LH(o,q(l)?l:0))!==null&&p!==void 0?p:[]}var v=[],g=s==="top"||s==="bottom"?"width":"height",m=u&&g==="width"?qo(u,{fontSize:t,letterSpacing:r}):{width:0,height:0},h=(O,S)=>{var E=typeof c=="function"?c(O.value,S):O.value;return g==="width"?RH(qo(E,{fontSize:t,letterSpacing:r}),m,f):qo(E,{fontSize:t,letterSpacing:r})[g]},y=o[0],x=o[1],w=o.length>=2&&y!=null&&x!=null?He(x.coordinate-y.coordinate):1,P=$H(i,w,g);return l==="equidistantPreserveStart"?FH(w,P,h,o,a):l==="equidistantPreserveEnd"?zH(w,P,h,o,a):(l==="preserveStart"||l==="preserveStartEnd"?v=UH(w,P,h,o,a,l==="preserveStartEnd"):v=KH(w,P,h,o,a),v.filter(O=>O.isShow))}var HH=e=>{var{ticks:t,label:r,labelGapWithTick:n=5,tickSize:o=0,tickMargin:i=0}=e,a=0;if(t){Array.from(t).forEach(u=>{if(u){var f=u.getBoundingClientRect();f.width>a&&(a=f.width)}});var s=r?r.getBoundingClientRect().width:0,l=o+i,c=a+l+s+(r?n:0);return Math.round(c)}return 0},GH=["axisLine","width","height","className","hide","ticks","axisType"];function qH(e,t){if(e==null)return{};var r,n,o=YH(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function YH(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function jn(){return jn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},jn.apply(null,arguments)}function Nx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Me(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Nx(Object(r),!0).forEach(function(n){XH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Nx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function XH(e,t,r){return(t=ZH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ZH(e){var t=JH(e,"string");return typeof t=="symbol"?t:t+""}function JH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var hr={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:De.axis};function QH(e){var{x:t,y:r,width:n,height:o,orientation:i,mirror:a,axisLine:s,otherSvgProps:l}=e;if(!s)return null;var c=Me(Me(Me({},l),Ct(s)),{},{fill:"none"});if(i==="top"||i==="bottom"){var u=+(i==="top"&&!a||i==="bottom"&&a);c=Me(Me({},c),{},{x1:t,y1:r+u*o,x2:t+n,y2:r+u*o})}else{var f=+(i==="left"&&!a||i==="right"&&a);c=Me(Me({},c),{},{x1:t+f*n,y1:r,x2:t+f*n,y2:r+o})}return d.createElement("line",jn({},c,{className:fe("recharts-cartesian-axis-line",En(s,"className"))}))}function eG(e,t,r,n,o,i,a,s,l){var c,u,f,p,v,g,m=s?-1:1,h=e.tickSize||a,y=q(e.tickCoord)?e.tickCoord:e.coordinate;switch(i){case"top":c=u=e.coordinate,p=r+ +!s*o,f=p-m*h,g=f-m*l,v=y;break;case"left":f=p=e.coordinate,u=t+ +!s*n,c=u-m*h,v=c-m*l,g=y;break;case"right":f=p=e.coordinate,u=t+ +s*n,c=u+m*h,v=c+m*l,g=y;break;default:c=u=e.coordinate,p=r+ +s*o,f=p+m*h,g=f+m*l,v=y;break}return{line:{x1:c,y1:f,x2:u,y2:p},tick:{x:v,y:g}}}function tG(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function rG(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function nG(e){var{option:t,tickProps:r,value:n}=e,o,i=fe(r.className,"recharts-cartesian-axis-tick-value");if(d.isValidElement(t))o=d.cloneElement(t,Me(Me({},r),{},{className:i}));else if(typeof t=="function")o=t(Me(Me({},r),{},{className:i}));else{var a="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(a=fe(a,cC(t))),o=d.createElement(Wl,jn({},r,{className:a}),n)}return o}var oG=A.forwardRef((e,t)=>{var{ticks:r=[],tick:n,tickLine:o,stroke:i,tickFormatter:a,unit:s,padding:l,tickTextProps:c,orientation:u,mirror:f,x:p,y:v,width:g,height:m,tickSize:h,tickMargin:y,fontSize:x,letterSpacing:w,getTicksConfig:P,events:O,axisType:S}=e,E=Lv(Me(Me({},P),{},{ticks:r}),x,w),C=tG(u,f),j=rG(u,f),D=Ct(P),R=Sn(n),_={};typeof o=="object"&&(_=o);var k=Me(Me({},D),{},{fill:"none"},_),I=E.map(K=>Me({entry:K},eG(K,p,v,g,m,u,h,f,y))),V=I.map(K=>{var{entry:T,line:N}=K;return d.createElement(Ge,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(T.value,"-").concat(T.coordinate,"-").concat(T.tickCoord)},o&&d.createElement("line",jn({},k,N,{className:fe("recharts-cartesian-axis-tick-line",En(o,"className"))})))}),z=I.map((K,T)=>{var N,G,{entry:Q,tick:te}=K,ne=Me(Me(Me(Me({verticalAnchor:j},D),{},{textAnchor:C,stroke:"none",fill:i},te),{},{index:T,payload:Q,visibleTicksCount:E.length,tickFormatter:a,padding:l},c),{},{angle:(N=(G=c?.angle)!==null&&G!==void 0?G:D.angle)!==null&&N!==void 0?N:0}),re=Me(Me({},ne),R);return d.createElement(Ge,jn({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(Q.value,"-").concat(Q.coordinate,"-").concat(Q.tickCoord)},xi(O,Q,T)),n&&d.createElement(nG,{option:n,tickProps:re,value:"".concat(typeof a=="function"?a(Q.value,T):Q.value).concat(s||"")}))});return d.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(S,"-ticks")},z.length>0&&d.createElement(yt,{zIndex:De.label},d.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(S,"-tick-labels"),ref:t},z)),V.length>0&&d.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(S,"-tick-lines")},V))}),iG=A.forwardRef((e,t)=>{var{axisLine:r,width:n,height:o,className:i,hide:a,ticks:s,axisType:l}=e,c=qH(e,GH),[u,f]=A.useState(""),[p,v]=A.useState(""),g=A.useRef(null);A.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var h;return HH({ticks:g.current,label:(h=e.labelRef)===null||h===void 0?void 0:h.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var m=A.useCallback(h=>{if(h){var y=h.getElementsByClassName("recharts-cartesian-axis-tick-value");g.current=y;var x=y[0];if(x){var w=window.getComputedStyle(x),P=w.fontSize,O=w.letterSpacing;(P!==u||O!==p)&&(f(P),v(O))}}},[u,p]);return a||n!=null&&n<=0||o!=null&&o<=0?null:d.createElement(yt,{zIndex:e.zIndex},d.createElement(Ge,{className:fe("recharts-cartesian-axis",i)},d.createElement(QH,{x:e.x,y:e.y,width:n,height:o,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:Ct(e)}),d.createElement(oG,{ref:m,axisType:l,events:c,fontSize:u,getTicksConfig:e,height:e.height,letterSpacing:p,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:s,unit:e.unit,width:e.width,x:e.x,y:e.y}),d.createElement(Q5,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},d.createElement(c3,{label:e.label,labelRef:e.labelRef}),e.children)))}),Fv=d.forwardRef((e,t)=>{var r=$e(e,hr);return d.createElement(iG,jn({},r,{ref:t}))});Fv.displayName="CartesianAxis";var aG=["x1","y1","x2","y2","key"],sG=["offset"],lG=["xAxisId","yAxisId"],cG=["xAxisId","yAxisId"];function Ix(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function rt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ix(Object(r),!0).forEach(function(n){uG(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ix(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function uG(e,t,r){return(t=fG(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fG(e){var t=dG(e,"string");return typeof t=="symbol"?t:t+""}function dG(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hn(){return hn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},hn.apply(null,arguments)}function Rs(e,t){if(e==null)return{};var r,n,o=pG(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function pG(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var vG=e=>{var{fill:t}=e;if(!t||t==="none")return null;var{fillOpacity:r,x:n,y:o,width:i,height:a,ry:s}=e;return d.createElement("rect",{x:n,y:o,ry:s,width:i,height:a,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function SC(e){var{option:t,lineItemProps:r}=e,n;if(d.isValidElement(t))n=d.cloneElement(t,r);else if(typeof t=="function")n=t(r);else{var o,{x1:i,y1:a,x2:s,y2:l,key:c}=r,u=Rs(r,aG),f=(o=Ct(u))!==null&&o!==void 0?o:{},{offset:p}=f,v=Rs(f,sG);n=d.createElement("line",hn({},v,{x1:i,y1:a,x2:s,y2:l,fill:"none",key:c}))}return n}function mG(e){var{x:t,width:r,horizontal:n=!0,horizontalPoints:o}=e;if(!n||!o||!o.length)return null;var{xAxisId:i,yAxisId:a}=e,s=Rs(e,lG),l=o.map((c,u)=>{var f=rt(rt({},s),{},{x1:t,y1:c,x2:t+r,y2:c,key:"line-".concat(u),index:u});return d.createElement(SC,{key:"line-".concat(u),option:n,lineItemProps:f})});return d.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function hG(e){var{y:t,height:r,vertical:n=!0,verticalPoints:o}=e;if(!n||!o||!o.length)return null;var{xAxisId:i,yAxisId:a}=e,s=Rs(e,cG),l=o.map((c,u)=>{var f=rt(rt({},s),{},{x1:c,y1:t,x2:c,y2:t+r,key:"line-".concat(u),index:u});return d.createElement(SC,{option:n,lineItemProps:f,key:"line-".concat(u)})});return d.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function gG(e){var{horizontalFill:t,fillOpacity:r,x:n,y:o,width:i,height:a,horizontalPoints:s,horizontal:l=!0}=e;if(!l||!t||!t.length||s==null)return null;var c=s.map(f=>Math.round(f+o-o)).sort((f,p)=>f-p);o!==c[0]&&c.unshift(0);var u=c.map((f,p)=>{var v=c[p+1],g=v==null,m=g?o+a-f:v-f;if(m<=0)return null;var h=p%t.length;return d.createElement("rect",{key:"react-".concat(p),y:f,x:n,height:m,width:i,stroke:"none",fill:t[h],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return d.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},u)}function yG(e){var{vertical:t=!0,verticalFill:r,fillOpacity:n,x:o,y:i,width:a,height:s,verticalPoints:l}=e;if(!t||!r||!r.length)return null;var c=l.map(f=>Math.round(f+o-o)).sort((f,p)=>f-p);o!==c[0]&&c.unshift(0);var u=c.map((f,p)=>{var v=c[p+1],g=v==null,m=g?o+a-f:v-f;if(m<=0)return null;var h=p%r.length;return d.createElement("rect",{key:"react-".concat(p),x:f,y:i,width:m,height:s,stroke:"none",fill:r[h],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return d.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},u)}var bG=(e,t)=>{var{xAxis:r,width:n,height:o,offset:i}=e;return vS(Lv(rt(rt(rt({},hr),r),{},{ticks:mS(r),viewBox:{x:0,y:0,width:n,height:o}})),i.left,i.left+i.width,t)},xG=(e,t)=>{var{yAxis:r,width:n,height:o,offset:i}=e;return vS(Lv(rt(rt(rt({},hr),r),{},{ticks:mS(r),viewBox:{x:0,y:0,width:n,height:o}})),i.top,i.top+i.height,t)},wG={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:De.grid};function zv(e){var t=cp(),r=up(),n=PS(),o=rt(rt({},$e(e,wG)),{},{x:q(e.x)?e.x:n.left,y:q(e.y)?e.y:n.top,width:q(e.width)?e.width:n.width,height:q(e.height)?e.height:n.height}),{xAxisId:i,yAxisId:a,x:s,y:l,width:c,height:u,syncWithTicks:f,horizontalValues:p,verticalValues:v}=o,g=at(),m=J(j=>Sb(j,"xAxis",i,g)),h=J(j=>Sb(j,"yAxis",a,g));if(!ir(c)||!ir(u)||!q(s)||!q(l))return null;var y=o.verticalCoordinatesGenerator||bG,x=o.horizontalCoordinatesGenerator||xG,{horizontalPoints:w,verticalPoints:P}=o;if((!w||!w.length)&&typeof x=="function"){var O=p&&p.length,S=x({yAxis:h?rt(rt({},h),{},{ticks:O?p:h.ticks}):void 0,width:t??c,height:r??u,offset:n},O?!0:f);ls(Array.isArray(S),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof S,"]")),Array.isArray(S)&&(w=S)}if((!P||!P.length)&&typeof y=="function"){var E=v&&v.length,C=y({xAxis:m?rt(rt({},m),{},{ticks:E?v:m.ticks}):void 0,width:t??c,height:r??u,offset:n},E?!0:f);ls(Array.isArray(C),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof C,"]")),Array.isArray(C)&&(P=C)}return d.createElement(yt,{zIndex:o.zIndex},d.createElement("g",{className:"recharts-cartesian-grid"},d.createElement(vG,{fill:o.fill,fillOpacity:o.fillOpacity,x:o.x,y:o.y,width:o.width,height:o.height,ry:o.ry}),d.createElement(gG,hn({},o,{horizontalPoints:w})),d.createElement(yG,hn({},o,{verticalPoints:P})),d.createElement(mG,hn({},o,{offset:n,horizontalPoints:w,xAxis:m,yAxis:h})),d.createElement(hG,hn({},o,{offset:n,verticalPoints:P,xAxis:m,yAxis:h}))))}zv.displayName="CartesianGrid";var PG={},OC=gt({name:"errorBars",initialState:PG,reducers:{addErrorBar:(e,t)=>{var{itemId:r,errorBar:n}=t.payload;e[r]||(e[r]=[]),e[r].push(n)},replaceErrorBar:(e,t)=>{var{itemId:r,prev:n,next:o}=t.payload;e[r]&&(e[r]=e[r].map(i=>i.dataKey===n.dataKey&&i.direction===n.direction?o:i))},removeErrorBar:(e,t)=>{var{itemId:r,errorBar:n}=t.payload;e[r]&&(e[r]=e[r].filter(o=>o.dataKey!==n.dataKey||o.direction!==n.direction))}}}),{addErrorBar:qQ,replaceErrorBar:YQ,removeErrorBar:XQ}=OC.actions,SG=OC.reducer,OG=["children"];function EG(e,t){if(e==null)return{};var r,n,o=CG(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function CG(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var AG={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},_G=A.createContext(AG);function EC(e){var{children:t}=e,r=EG(e,OG);return d.createElement(_G.Provider,{value:r},t)}function Bv(e,t){var r,n,o=J(c=>kr(c,e)),i=J(c=>Nr(c,t)),a=(r=o?.allowDataOverflow)!==null&&r!==void 0?r:We.allowDataOverflow,s=(n=i?.allowDataOverflow)!==null&&n!==void 0?n:Ke.allowDataOverflow,l=a||s;return{needClip:l,needClipX:a,needClipY:s}}function CC(e){var{xAxisId:t,yAxisId:r,clipPathId:n}=e,o=$v(),{needClipX:i,needClipY:a,needClip:s}=Bv(t,r);if(!s||!o)return null;var{x:l,y:c,width:u,height:f}=o;return d.createElement("clipPath",{id:"clipPath-".concat(n)},d.createElement("rect",{x:i?l:l-u/2,y:a?c:c-f/2,width:i?u:u*2,height:a?f:f*2}))}var AC=(e,t,r,n)=>Hr(e,"xAxis",t,n),_C=(e,t,r,n)=>Ur(e,"xAxis",t,n),TC=(e,t,r,n)=>Hr(e,"yAxis",r,n),MC=(e,t,r,n)=>Ur(e,"yAxis",r,n),TG=M([ve,AC,TC,_C,MC],(e,t,r,n,o)=>Ar(e,"xAxis")?ao(t,n,!1):ao(r,o,!1)),MG=(e,t,r,n,o)=>o;function jG(e){return e.type==="line"}var kG=M([$l,MG],(e,t)=>e.filter(jG).find(r=>r.id===t)),NG=M([ve,AC,TC,_C,MC,kG,TG,$p],(e,t,r,n,o,i,a,s)=>{var{chartData:l,dataStartIndex:c,dataEndIndex:u}=s;if(!(i==null||t==null||r==null||n==null||o==null||n.length===0||o.length===0||a==null||e!=="horizontal"&&e!=="vertical")){var{dataKey:f,data:p}=i,v;if(p!=null&&p.length>0?v=p:v=l?.slice(c,u+1),v!=null)return wq({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:o,dataKey:f,bandSize:a,displayedData:v})}});function IG(e){var t=Sn(e),r=3,n=2;if(t!=null){var{r:o,strokeWidth:i}=t,a=Number(o),s=Number(i);return(Number.isNaN(a)||a<0)&&(a=r),(Number.isNaN(s)||s<0)&&(s=n),{r:a,strokeWidth:s}}return{r,strokeWidth:n}}var _a={exports:{}},of={};var Dx;function DG(){if(Dx)return of;Dx=1;var e=A;function t(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}var r=typeof Object.is=="function"?Object.is:t,n=e.useSyncExternalStore,o=e.useRef,i=e.useEffect,a=e.useMemo,s=e.useDebugValue;return of.useSyncExternalStoreWithSelector=function(l,c,u,f,p){var v=o(null);if(v.current===null){var g={hasValue:!1,value:null};v.current=g}else g=v.current;v=a(function(){function h(O){if(!y){if(y=!0,x=O,O=f(O),p!==void 0&&g.hasValue){var S=g.value;if(p(S,O))return w=S}return w=O}if(S=w,r(x,O))return S;var E=f(O);return p!==void 0&&p(S,E)?(x=O,S):(x=O,w=E)}var y=!1,x,w,P=u===void 0?null:u;return[function(){return h(c())},P===null?void 0:function(){return h(P())}]},[c,u,f,p]);var m=n(l,v[0],v[1]);return i(function(){g.hasValue=!0,g.value=m},[m]),s(m),m},of}var af={};var Rx;function RG(){return Rx||(Rx=1,process.env.NODE_ENV!=="production"&&(function(){function e(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=A,r=typeof Object.is=="function"?Object.is:e,n=t.useSyncExternalStore,o=t.useRef,i=t.useEffect,a=t.useMemo,s=t.useDebugValue;af.useSyncExternalStoreWithSelector=function(l,c,u,f,p){var v=o(null);if(v.current===null){var g={hasValue:!1,value:null};v.current=g}else g=v.current;v=a(function(){function h(O){if(!y){if(y=!0,x=O,O=f(O),p!==void 0&&g.hasValue){var S=g.value;if(p(S,O))return w=S}return w=O}if(S=w,r(x,O))return S;var E=f(O);return p!==void 0&&p(S,E)?(x=O,S):(x=O,w=E)}var y=!1,x,w,P=u===void 0?null:u;return[function(){return h(c())},P===null?void 0:function(){return h(P())}]},[c,u,f,p]);var m=n(l,v[0],v[1]);return i(function(){g.hasValue=!0,g.value=m},[m]),s(m),m},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),af}var $x;function $G(){return $x||($x=1,process.env.NODE_ENV==="production"?_a.exports=DG():_a.exports=RG()),_a.exports}$G();function LG(e){e()}function FG(){let e=null,t=null;return{clear(){e=null,t=null},notify(){LG(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const o=t={callback:r,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){!n||e===null||(n=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var Lx={notify(){},get:()=>[]};function zG(e,t){let r,n=Lx,o=0,i=!1;function a(m){u();const h=n.subscribe(m);let y=!1;return()=>{y||(y=!0,h(),f())}}function s(){n.notify()}function l(){g.onStateChange&&g.onStateChange()}function c(){return i}function u(){o++,r||(r=e.subscribe(l),n=FG())}function f(){o--,r&&o===0&&(r(),r=void 0,n.clear(),n=Lx)}function p(){i||(i=!0,u())}function v(){i&&(i=!1,f())}const g={addNestedSub:a,notifyNestedSubs:s,handleChangeWrapper:l,isSubscribed:c,trySubscribe:p,tryUnsubscribe:v,getListeners:()=>n};return g}var BG=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",VG=BG(),WG=()=>typeof navigator<"u"&&navigator.product==="ReactNative",KG=WG(),UG=()=>VG||KG?d.useLayoutEffect:d.useEffect,HG=UG();function Fx(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function GG(e,t){if(Fx(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let o=0;o<r.length;o++)if(!Object.prototype.hasOwnProperty.call(t,r[o])||!Fx(e[r[o]],t[r[o]]))return!1;return!0}var qG=Symbol.for("react-redux-context"),YG=typeof globalThis<"u"?globalThis:{};function XG(){if(!d.createContext)return{};const e=YG[qG]??=new Map;let t=e.get(d.createContext);return t||(t=d.createContext(null),process.env.NODE_ENV!=="production"&&(t.displayName="ReactRedux"),e.set(d.createContext,t)),t}var ZG=XG();function JG(e){const{children:t,context:r,serverState:n,store:o}=e,i=d.useMemo(()=>{const l=zG(o),c={store:o,subscription:l,getServerState:n?()=>n:void 0};if(process.env.NODE_ENV==="production")return c;{const{identityFunctionCheck:u="once",stabilityCheck:f="once"}=e;return Object.assign(c,{stabilityCheck:f,identityFunctionCheck:u})}},[o,n]),a=d.useMemo(()=>o.getState(),[o]);HG(()=>{const{subscription:l}=i;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),a!==o.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[i,a]);const s=r||ZG;return d.createElement(s.Provider,{value:i},t)}var QG=JG,eq=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius"]);function tq(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function Gl(e,t){var r=new Set([...Object.keys(e),...Object.keys(t)]);for(var n of r)if(eq.has(n)){if(e[n]==null&&t[n]==null)continue;if(!GG(e[n],t[n]))return!1}else if(!tq(e[n],t[n]))return!1;return!0}var rq=["id"],nq=["type","layout","connectNulls","needClip","shape"],oq=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function ui(){return ui=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ui.apply(null,arguments)}function zx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Xt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zx(Object(r),!0).forEach(function(n){iq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function iq(e,t,r){return(t=aq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function aq(e){var t=sq(e,"string");return typeof t=="symbol"?t:t+""}function sq(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Vv(e,t){if(e==null)return{};var r,n,o=lq(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function lq(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var cq=e=>{var{dataKey:t,name:r,stroke:n,legendType:o,hide:i}=e;return[{inactive:i,dataKey:t,type:o,color:n,value:yo(r,t),payload:e}]},uq=d.memo(e=>{var{dataKey:t,data:r,stroke:n,strokeWidth:o,fill:i,name:a,hide:s,unit:l,tooltipType:c,id:u}=e,f={dataDefinedOnItem:r,getPosition:$n,settings:{stroke:n,strokeWidth:o,fill:i,dataKey:t,nameKey:void 0,name:yo(a,t),hide:s,type:c,color:n,unit:l,graphicalItemId:u}};return d.createElement(Dv,{tooltipEntrySettings:f})}),jC=(e,t)=>"".concat(t,"px ").concat(e-t,"px");function fq(e,t){for(var r=e.length%2!==0?[...e,0]:e,n=[],o=0;o<t;++o)n=[...n,...r];return n}var dq=(e,t,r)=>{var n=r.reduce((v,g)=>v+g);if(!n)return jC(t,e);for(var o=Math.floor(e/n),i=e%n,a=t-e,s=[],l=0,c=0;l<r.length;c+=(u=r[l])!==null&&u!==void 0?u:0,++l){var u,f=r[l];if(f!=null&&c+f>i){s=[...r.slice(0,l),i-c];break}}var p=s.length%2===0?[0,a]:[a];return[...fq(r,o),...s,...p].map(v=>"".concat(v,"px")).join(", ")};function pq(e){var{clipPathId:t,points:r,props:n}=e,{dot:o,dataKey:i,needClip:a}=n,{id:s}=n,l=Vv(n,rq),c=Ct(l);return d.createElement(Q4,{points:r,dot:o,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:i,baseProps:c,needClip:a,clipPathId:t})}function vq(e){var{showLabels:t,children:r,points:n}=e,o=A.useMemo(()=>n?.map(i=>{var a,s,l={x:(a=i.x)!==null&&a!==void 0?a:0,y:(s=i.y)!==null&&s!==void 0?s:0,width:0,lowerWidth:0,upperWidth:0,height:0};return Xt(Xt({},l),{},{value:i.value,payload:i.payload,viewBox:l,parentViewBox:void 0,fill:void 0})}),[n]);return d.createElement(nC,{value:t?o:void 0},r)}function Bx(e){var{clipPathId:t,pathRef:r,points:n,strokeDasharray:o,props:i}=e,{type:a,layout:s,connectNulls:l,needClip:c,shape:u}=i,f=Vv(i,nq),p=Xt(Xt({},ft(f)),{},{fill:"none",className:"recharts-line-curve",clipPath:c?"url(#clipPath-".concat(t,")"):void 0,points:n,type:a,layout:s,connectNulls:l,strokeDasharray:o??i.strokeDasharray});return d.createElement(d.Fragment,null,n?.length>1&&d.createElement(jv,ui({shapeType:"curve",option:u},p,{pathRef:r})),d.createElement(pq,{points:n,clipPathId:t,props:i}))}function mq(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function hq(e){var{clipPathId:t,props:r,pathRef:n,previousPointsRef:o,longestAnimatedLengthRef:i}=e,{points:a,strokeDasharray:s,isAnimationActive:l,animationBegin:c,animationDuration:u,animationEasing:f,animateNewValues:p,width:v,height:g,onAnimationEnd:m,onAnimationStart:h}=r,y=o.current,x=Ti(a,"recharts-line-"),w=A.useRef(x),[P,O]=A.useState(!1),S=!P,E=A.useCallback(()=>{typeof m=="function"&&m(),O(!1)},[m]),C=A.useCallback(()=>{typeof h=="function"&&h(),O(!0)},[h]),j=mq(n.current),D=A.useRef(0);w.current!==x&&(D.current=i.current,w.current=x);var R=D.current;return d.createElement(vq,{points:a,showLabels:S},r.children,d.createElement(_i,{animationId:x,begin:c,duration:u,isActive:l,easing:f,onAnimationEnd:E,onAnimationStart:C,key:x},_=>{var k=Ce(R,j+R,_),I=Math.min(k,j),V;if(l)if(s){var z="".concat(s).split(/[,\s]+/gim).map(N=>parseFloat(N));V=dq(I,j,z)}else V=jC(j,I);else V=s==null?void 0:String(s);if(_>0&&j>0&&(o.current=a,i.current=Math.max(i.current,I)),y){var K=y.length/a.length,T=_===1?a:a.map((N,G)=>{var Q=Math.floor(G*K);if(y[Q]){var te=y[Q];return Xt(Xt({},N),{},{x:Ce(te.x,N.x,_),y:Ce(te.y,N.y,_)})}return p?Xt(Xt({},N),{},{x:Ce(v*2,N.x,_),y:Ce(g/2,N.y,_)}):Xt(Xt({},N),{},{x:N.x,y:N.y})});return o.current=T,d.createElement(Bx,{props:r,points:T,clipPathId:t,pathRef:n,strokeDasharray:V})}return d.createElement(Bx,{props:r,points:a,clipPathId:t,pathRef:n,strokeDasharray:V})}),d.createElement(Av,{label:r.label}))}function gq(e){var{clipPathId:t,props:r}=e,n=A.useRef(null),o=A.useRef(0),i=A.useRef(null);return d.createElement(hq,{props:r,clipPathId:t,previousPointsRef:n,longestAnimatedLengthRef:o,pathRef:i})}var yq=(e,t)=>{var r,n;return{x:(r=e.x)!==null&&r!==void 0?r:void 0,y:(n=e.y)!==null&&n!==void 0?n:void 0,value:e.value,errorVal:be(e.payload,t)}};class bq extends A.Component{render(){var{hide:t,dot:r,points:n,className:o,xAxisId:i,yAxisId:a,top:s,left:l,width:c,height:u,id:f,needClip:p,zIndex:v}=this.props;if(t)return null;var g=fe("recharts-line",o),m=f,{r:h,strokeWidth:y}=IG(r),x=dC(r),w=h*2+y,P=p?"url(#clipPath-".concat(x?"":"dots-").concat(m,")"):void 0;return d.createElement(yt,{zIndex:v},d.createElement(Ge,{className:g},p&&d.createElement("defs",null,d.createElement(CC,{clipPathId:m,xAxisId:i,yAxisId:a}),!x&&d.createElement("clipPath",{id:"clipPath-dots-".concat(m)},d.createElement("rect",{x:l-w/2,y:s-w/2,width:c+w,height:u+w}))),d.createElement(EC,{xAxisId:i,yAxisId:a,data:n,dataPointFormatter:yq,errorBarOffset:0},d.createElement(gq,{props:this.props,clipPathId:m}))),d.createElement(bH,{activeDot:this.props.activeDot,points:n,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:P}))}}var kC={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:De.line,type:"linear"};function xq(e){var t=$e(e,kC),{activeDot:r,animateNewValues:n,animationBegin:o,animationDuration:i,animationEasing:a,connectNulls:s,dot:l,hide:c,isAnimationActive:u,label:f,legendType:p,xAxisId:v,yAxisId:g,id:m}=t,h=Vv(t,oq),{needClip:y}=Bv(v,g),x=$v(),w=Ln(),P=at(),O=J(D=>NG(D,v,g,P,m));if(w!=="horizontal"&&w!=="vertical"||O==null||x==null)return null;var{height:S,width:E,x:C,y:j}=x;return d.createElement(bq,ui({},h,{id:m,connectNulls:s,dot:l,activeDot:r,animateNewValues:n,animationBegin:o,animationDuration:i,animationEasing:a,isAnimationActive:u,hide:c,label:f,legendType:p,xAxisId:v,yAxisId:g,points:O,layout:w,height:S,width:E,left:C,top:j,needClip:y}))}function wq(e){var{layout:t,xAxis:r,yAxis:n,xAxisTicks:o,yAxisTicks:i,dataKey:a,bandSize:s,displayedData:l}=e;return l.map((c,u)=>{var f=be(c,a);if(t==="horizontal"){var p=xg({axis:r,ticks:o,bandSize:s,entry:c,index:u}),v=_e(f)?null:n.scale.map(f);return{x:p,y:v??null,value:f,payload:c}}var g=_e(f)?null:r.scale.map(f),m=xg({axis:n,ticks:i,bandSize:s,entry:c,index:u});return g==null||m==null?null:{x:g,y:m,value:f,payload:c}}).filter(Boolean)}function Pq(e){var t=$e(e,kC),r=at();return d.createElement(Rv,{id:t.id,type:"line"},n=>d.createElement(d.Fragment,null,d.createElement(pC,{legendPayload:cq(t)}),d.createElement(uq,{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:n}),d.createElement(mC,{type:"line",id:n,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:r}),d.createElement(xq,ui({},t,{id:n}))))}var NC=d.memo(Pq,Gl);NC.displayName="Line";function Bn(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(o=>o.id===t))===null||n===void 0?void 0:n.xAxisId)!==null&&r!==void 0?r:gC}function Vn(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(o=>o.id===t))===null||n===void 0?void 0:n.yAxisId)!==null&&r!==void 0?r:gC}var Sq=process.env.NODE_ENV==="production",sf="Invariant failed";function Oq(e,t){if(Sq)throw new Error(sf);var r=typeof t=="function"?t():t,n=r?"".concat(sf,": ").concat(r):sf;throw new Error(n)}function cd(){return cd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},cd.apply(null,arguments)}function $s(e){return d.createElement(jv,cd({shapeType:"rectangle",activeClassName:"recharts-active-bar"},e))}var Eq=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(n,o)=>{if(q(t))return t;var i=q(n)||_e(n);return i?t(n,o):(i||Oq(!1,"minPointSize callback function received a value with type of ".concat(typeof n,". Currently only numbers or null/undefined are supported.")),r)}},Cq=(e,t,r)=>r,Aq=(e,t)=>t,Vi=M([$l,Aq],(e,t)=>e.filter(r=>r.type==="bar").find(r=>r.id===t)),_q=M([Vi],e=>e?.maxBarSize),Tq=(e,t,r,n)=>n,Mq=M([ve,$l,Bn,Vn,Cq],(e,t,r,n,o)=>t.filter(i=>e==="horizontal"?i.xAxisId===r:i.yAxisId===n).filter(i=>i.isPanorama===o).filter(i=>i.hide===!1).filter(i=>i.type==="bar")),jq=(e,t,r)=>{var n=ve(e),o=Bn(e,t),i=Vn(e,t);if(!(o==null||i==null))return n==="horizontal"?rd(e,"yAxis",i,r):rd(e,"xAxis",o,r)},kq=(e,t)=>{var r=ve(e),n=Bn(e,t),o=Vn(e,t);if(!(n==null||o==null))return r==="horizontal"?Pb(e,"xAxis",n):Pb(e,"yAxis",o)},Nq=M([Mq,GV,kq],xH),Iq=(e,t,r)=>{var n,o,i=Vi(e,t);if(i==null)return 0;var a=Bn(e,t),s=Vn(e,t);if(a==null||s==null)return 0;var l=ve(e),c=RO(e),{maxBarSize:u}=i,f=_e(u)?c:u,p,v;return l==="horizontal"?(p=Hr(e,"xAxis",a,r),v=Ur(e,"xAxis",a,r)):(p=Hr(e,"yAxis",s,r),v=Ur(e,"yAxis",s,r)),(n=(o=ao(p,v,!0))!==null&&o!==void 0?o:f)!==null&&n!==void 0?n:0},IC=(e,t,r)=>{var n=ve(e),o=Bn(e,t),i=Vn(e,t);if(!(o==null||i==null)){var a,s;return n==="horizontal"?(a=Hr(e,"xAxis",o,r),s=Ur(e,"xAxis",o,r)):(a=Hr(e,"yAxis",i,r),s=Ur(e,"yAxis",i,r)),ao(a,s)}},Dq=M([Nq,RO,HV,$O,Iq,IC,_q],EH),Rq=(e,t,r)=>{var n=Bn(e,t);if(n!=null)return Hr(e,"xAxis",n,r)},$q=(e,t,r)=>{var n=Vn(e,t);if(n!=null)return Hr(e,"yAxis",n,r)},Lq=(e,t,r)=>{var n=Bn(e,t);if(n!=null)return Ur(e,"xAxis",n,r)},Fq=(e,t,r)=>{var n=Vn(e,t);if(n!=null)return Ur(e,"yAxis",n,r)},zq=M([Dq,Vi],AH),Bq=M([jq,Vi],CH),Vq=M([ze,ip,Rq,$q,Lq,Fq,zq,ve,LV,IC,Bq,Vi,Tq],(e,t,r,n,o,i,a,s,l,c,u,f,p)=>{var{chartData:v,dataStartIndex:g,dataEndIndex:m}=l;if(!(f==null||a==null||t==null||s!=="horizontal"&&s!=="vertical"||r==null||n==null||o==null||i==null||c==null)){var{data:h}=f,y;if(h!=null&&h.length>0?y=h:y=v?.slice(g,m+1),y!=null)return h6({layout:s,barSettings:f,pos:a,parentViewBox:t,bandSize:c,xAxis:r,yAxis:n,xAxisTicks:o,yAxisTicks:i,stackedData:u,displayedData:y,offset:e,cells:p,dataStartIndex:g})}}),Wq=["index"];function ud(){return ud=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ud.apply(null,arguments)}function Kq(e,t){if(e==null)return{};var r,n,o=Uq(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Uq(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var DC=A.createContext(void 0),Hq=e=>{var t=A.useContext(DC);if(t!=null)return t.stackId;if(e!=null)return j2(e)},Gq=(e,t)=>"recharts-bar-stack-clip-path-".concat(e,"-").concat(t),qq=e=>{var t=A.useContext(DC);if(t!=null){var{stackId:r}=t;return"url(#".concat(Gq(r,e),")")}},RC=e=>{var{index:t}=e,r=Kq(e,Wq),n=qq(t);return d.createElement(Ge,ud({className:"recharts-bar-stack-layer",clipPath:n},r))},Yq=["onMouseEnter","onMouseLeave","onClick"],Xq=["value","background","tooltipPosition"],Zq=["id"],Jq=["onMouseEnter","onClick","onMouseLeave"];function Sr(){return Sr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Sr.apply(null,arguments)}function Vx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ct(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Vx(Object(r),!0).forEach(function(n){Qq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Qq(e,t,r){return(t=e6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function e6(e){var t=t6(e,"string");return typeof t=="symbol"?t:t+""}function t6(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ls(e,t){if(e==null)return{};var r,n,o=r6(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function r6(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var n6=e=>{var{dataKey:t,name:r,fill:n,legendType:o,hide:i}=e;return[{inactive:i,dataKey:t,type:o,color:n,value:yo(r,t),payload:e}]},o6=d.memo(e=>{var{dataKey:t,stroke:r,strokeWidth:n,fill:o,name:i,hide:a,unit:s,tooltipType:l,id:c}=e,u={dataDefinedOnItem:void 0,getPosition:$n,settings:{stroke:r,strokeWidth:n,fill:o,dataKey:t,nameKey:void 0,name:yo(i,t),hide:a,type:l,color:o,unit:s,graphicalItemId:c}};return d.createElement(Dv,{tooltipEntrySettings:u})});function i6(e){var t=J(Gr),{data:r,dataKey:n,background:o,allOtherBarProps:i}=e,{onMouseEnter:a,onMouseLeave:s,onClick:l}=i,c=Ls(i,Yq),u=kv(a,n,i.id),f=Nv(s),p=Iv(l,n,i.id);if(!o||r==null)return null;var v=Sn(o);return d.createElement(yt,{zIndex:_H(o,De.barBackground)},r.map((g,m)=>{var{value:h,background:y,tooltipPosition:x}=g,w=Ls(g,Xq);if(!y)return null;var P=u(g,m),O=f(g,m),S=p(g,m),E=ct(ct(ct(ct(ct({option:o,isActive:String(m)===t},w),{},{fill:"#eee"},y),v),xi(c,g,m)),{},{onMouseEnter:P,onMouseLeave:O,onClick:S,dataKey:n,index:m,className:"recharts-bar-background-rectangle"});return d.createElement($s,Sr({key:"background-bar-".concat(m)},E))}))}function a6(e){var{showLabels:t,children:r,rects:n}=e,o=n?.map(i=>{var a={x:i.x,y:i.y,width:i.width,lowerWidth:i.width,upperWidth:i.width,height:i.height};return ct(ct({},a),{},{value:i.value,payload:i.payload,parentViewBox:i.parentViewBox,viewBox:a,fill:i.fill})});return d.createElement(nC,{value:t?o:void 0},r)}function s6(e){var{shape:t,activeBar:r,baseProps:n,entry:o,index:i,dataKey:a}=e,s=J(Gr),l=J(bv),c=r&&String(i)===s&&(l==null||a===l),u=c?r:t;return c?d.createElement(yt,{zIndex:De.activeBar},d.createElement(RC,{index:i},d.createElement($s,Sr({},n,{name:String(n.name)},o,{isActive:c,option:u,index:i,dataKey:a})))):d.createElement($s,Sr({},n,{name:String(n.name)},o,{isActive:c,option:u,index:i,dataKey:a}))}function l6(e){var{shape:t,baseProps:r,entry:n,index:o,dataKey:i}=e;return d.createElement($s,Sr({},r,{name:String(r.name)},n,{isActive:!1,option:t,index:o,dataKey:i}))}function c6(e){var t,{data:r,props:n}=e,o=(t=Ct(n))!==null&&t!==void 0?t:{},{id:i}=o,a=Ls(o,Zq),{shape:s,dataKey:l,activeBar:c}=n,{onMouseEnter:u,onClick:f,onMouseLeave:p}=n,v=Ls(n,Jq),g=kv(u,l,i),m=Nv(p),h=Iv(f,l,i);return r?d.createElement(d.Fragment,null,r.map((y,x)=>d.createElement(RC,Sr({index:x,key:"rectangle-".concat(y?.x,"-").concat(y?.y,"-").concat(y?.value,"-").concat(x),className:"recharts-bar-rectangle"},xi(v,y,x),{onMouseEnter:g(y,x),onMouseLeave:m(y,x),onClick:h(y,x)}),c?d.createElement(s6,{shape:s,activeBar:c,baseProps:a,entry:y,index:x,dataKey:l}):d.createElement(l6,{shape:s,baseProps:a,entry:y,index:x,dataKey:l})))):null}function u6(e){var{props:t,previousRectanglesRef:r}=e,{data:n,layout:o,isAnimationActive:i,animationBegin:a,animationDuration:s,animationEasing:l,onAnimationEnd:c,onAnimationStart:u}=t,f=r.current,p=Ti(t,"recharts-bar-"),[v,g]=A.useState(!1),m=!v,h=A.useCallback(()=>{typeof c=="function"&&c(),g(!1)},[c]),y=A.useCallback(()=>{typeof u=="function"&&u(),g(!0)},[u]);return d.createElement(a6,{showLabels:m,rects:n},d.createElement(_i,{animationId:p,begin:a,duration:s,isActive:i,easing:l,onAnimationEnd:h,onAnimationStart:y,key:p},x=>{var w=x===1?n:n?.map((P,O)=>{var S=f&&f[O];if(S)return ct(ct({},P),{},{x:Ce(S.x,P.x,x),y:Ce(S.y,P.y,x),width:Ce(S.width,P.width,x),height:Ce(S.height,P.height,x)});if(o==="horizontal"){var E=Ce(0,P.height,x),C=Ce(P.stackedBarStart,P.y,x);return ct(ct({},P),{},{y:C,height:E})}var j=Ce(0,P.width,x),D=Ce(P.stackedBarStart,P.x,x);return ct(ct({},P),{},{width:j,x:D})});return x>0&&(r.current=w??null),w==null?null:d.createElement(Ge,null,d.createElement(c6,{props:t,data:w}))}),d.createElement(Av,{label:t.label}),t.children)}function f6(e){var t=A.useRef(null);return d.createElement(u6,{previousRectanglesRef:t,props:e})}var $C=0,d6=(e,t)=>{var r=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:r,errorVal:be(e,t)}};class p6 extends A.PureComponent{render(){var{hide:t,data:r,dataKey:n,className:o,xAxisId:i,yAxisId:a,needClip:s,background:l,id:c}=this.props;if(t||r==null)return null;var u=fe("recharts-bar",o),f=c;return d.createElement(Ge,{className:u,id:c},s&&d.createElement("defs",null,d.createElement(CC,{clipPathId:f,xAxisId:i,yAxisId:a})),d.createElement(Ge,{className:"recharts-bar-rectangles",clipPath:s?"url(#clipPath-".concat(f,")"):void 0},d.createElement(i6,{data:r,dataKey:n,background:l,allOtherBarProps:this.props}),d.createElement(f6,this.props)))}}var v6={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",background:!1,hide:!1,isAnimationActive:"auto",label:!1,legendType:"rect",minPointSize:$C,xAxisId:0,yAxisId:0,zIndex:De.bar};function m6(e){var{xAxisId:t,yAxisId:r,hide:n,legendType:o,minPointSize:i,activeBar:a,animationBegin:s,animationDuration:l,animationEasing:c,isAnimationActive:u}=e,{needClip:f}=Bv(t,r),p=Ln(),v=at(),g=Mv(e.children,Bi),m=J(x=>Vq(x,e.id,v,g));if(p!=="vertical"&&p!=="horizontal")return null;var h,y=m?.[0];return y==null||y.height==null||y.width==null?h=0:h=p==="vertical"?y.height/2:y.width/2,d.createElement(EC,{xAxisId:t,yAxisId:r,data:m,dataPointFormatter:d6,errorBarOffset:h},d.createElement(p6,Sr({},e,{layout:p,needClip:f,data:m,xAxisId:t,yAxisId:r,hide:n,legendType:o,minPointSize:i,activeBar:a,animationBegin:s,animationDuration:l,animationEasing:c,isAnimationActive:u})))}function h6(e){var{layout:t,barSettings:{dataKey:r,minPointSize:n},pos:o,bandSize:i,xAxis:a,yAxis:s,xAxisTicks:l,yAxisTicks:c,stackedData:u,displayedData:f,offset:p,cells:v,parentViewBox:g,dataStartIndex:m}=e,h=t==="horizontal"?s:a,y=u?h.scale.domain():null,x=k2({numericAxis:h}),w=h.scale.map(x);return f.map((P,O)=>{var S,E,C,j,D,R;if(u){var _=u[O+m];if(_==null)return null;S=C2(_,y)}else S=be(P,r),Array.isArray(S)||(S=[x,S]);var k=Eq(n,$C)(S[1],O);if(t==="horizontal"){var I,V=s.scale.map(S[0]),z=s.scale.map(S[1]);if(V==null||z==null)return null;E=wg({axis:a,ticks:l,bandSize:i,offset:o.offset,entry:P,index:O}),C=(I=z??V)!==null&&I!==void 0?I:void 0,j=o.size;var K=V-z;if(D=nr(K)?0:K,R={x:E,y:p.top,width:j,height:p.height},Math.abs(k)>0&&Math.abs(D)<Math.abs(k)){var T=He(D||k)*(Math.abs(k)-Math.abs(D));C-=T,D+=T}}else{var N=a.scale.map(S[0]),G=a.scale.map(S[1]);if(N==null||G==null)return null;if(E=N,C=wg({axis:s,ticks:c,bandSize:i,offset:o.offset,entry:P,index:O}),j=G-N,D=o.size,R={x:p.left,y:C,width:p.width,height:D},Math.abs(k)>0&&Math.abs(j)<Math.abs(k)){var Q=He(j||k)*(Math.abs(k)-Math.abs(j));j+=Q}}if(E==null||C==null||j==null||D==null)return null;var te=ct(ct({},P),{},{stackedBarStart:w,x:E,y:C,width:j,height:D,value:u?S:S[1],payload:P,background:R,tooltipPosition:{x:E+j/2,y:C+D/2},parentViewBox:g},v&&v[O]&&v[O].props);return te}).filter(Boolean)}function g6(e){var t=$e(e,v6),r=Hq(t.stackId),n=at();return d.createElement(Rv,{id:t.id,type:"bar"},o=>d.createElement(d.Fragment,null,d.createElement(pC,{legendPayload:n6(t)}),d.createElement(o6,{dataKey:t.dataKey,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:o}),d.createElement(mC,{type:"bar",id:o,data:void 0,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,stackId:r,hide:t.hide,barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize,isPanorama:n}),d.createElement(yt,{zIndex:t.zIndex},d.createElement(m6,Sr({},t,{id:o})))))}var LC=d.memo(g6,Gl);LC.displayName="Bar";var y6=["domain","range"],b6=["domain","range"];function Wx(e,t){if(e==null)return{};var r,n,o=x6(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function x6(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Kx(e,t){return e===t?!0:Array.isArray(e)&&e.length===2&&Array.isArray(t)&&t.length===2?e[0]===t[0]&&e[1]===t[1]:!1}function FC(e,t){if(e===t)return!0;var{domain:r,range:n}=e,o=Wx(e,y6),{domain:i,range:a}=t,s=Wx(t,b6);return!Kx(r,i)||!Kx(n,a)?!1:Gl(o,s)}var w6=["type"],P6=["dangerouslySetInnerHTML","ticks","scale"],S6=["id","scale"];function fd(){return fd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},fd.apply(null,arguments)}function Ux(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Hx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ux(Object(r),!0).forEach(function(n){O6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ux(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function O6(e,t,r){return(t=E6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function E6(e){var t=C6(e,"string");return typeof t=="symbol"?t:t+""}function C6(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function dd(e,t){if(e==null)return{};var r,n,o=A6(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function A6(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function _6(e){var t=Pe(),r=A.useRef(null),n=SS(),{type:o}=e,i=dd(e,w6),a=kl(n,"xAxis",o),s=A.useMemo(()=>{if(a!=null)return Hx(Hx({},i),{},{type:a})},[i,a]);return A.useLayoutEffect(()=>{s!=null&&(r.current===null?t(oH(s)):r.current!==s&&t(iH({prev:r.current,next:s})),r.current=s)},[s,t]),A.useLayoutEffect(()=>()=>{r.current&&(t(aH(r.current)),r.current=null)},[t]),null}var T6=e=>{var{xAxisId:t,className:r}=e,n=J(ip),o=at(),i="xAxis",a=J(y=>hE(y,i,t,o)),s=J(y=>dE(y,t)),l=J(y=>GW(y,t)),c=J(y=>GO(y,t));if(s==null||l==null||c==null)return null;var{dangerouslySetInnerHTML:u,ticks:f,scale:p}=e,v=dd(e,P6),{id:g,scale:m}=c,h=dd(c,S6);return d.createElement(Fv,fd({},v,h,{x:l.x,y:l.y,width:s.width,height:s.height,className:fe("recharts-".concat(i," ").concat(i),r),viewBox:n,ticks:a,axisType:i}))},M6={allowDataOverflow:We.allowDataOverflow,allowDecimals:We.allowDecimals,allowDuplicatedCategory:We.allowDuplicatedCategory,angle:We.angle,axisLine:hr.axisLine,height:We.height,hide:!1,includeHidden:We.includeHidden,interval:We.interval,label:!1,minTickGap:We.minTickGap,mirror:We.mirror,orientation:We.orientation,padding:We.padding,reversed:We.reversed,scale:We.scale,tick:We.tick,tickCount:We.tickCount,tickLine:hr.tickLine,tickSize:hr.tickSize,type:We.type,xAxisId:0},j6=e=>{var t=$e(e,M6);return d.createElement(d.Fragment,null,d.createElement(_6,{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}),d.createElement(T6,t))},Fs=d.memo(j6,FC);Fs.displayName="XAxis";var k6=["type"],N6=["dangerouslySetInnerHTML","ticks","scale"],I6=["id","scale"];function pd(){return pd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},pd.apply(null,arguments)}function Gx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function qx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Gx(Object(r),!0).forEach(function(n){D6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function D6(e,t,r){return(t=R6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function R6(e){var t=$6(e,"string");return typeof t=="symbol"?t:t+""}function $6(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vd(e,t){if(e==null)return{};var r,n,o=L6(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function L6(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function F6(e){var t=Pe(),r=A.useRef(null),n=SS(),{type:o}=e,i=vd(e,k6),a=kl(n,"yAxis",o),s=A.useMemo(()=>{if(a!=null)return qx(qx({},i),{},{type:a})},[a,i]);return A.useLayoutEffect(()=>{s!=null&&(r.current===null?t(sH(s)):r.current!==s&&t(lH({prev:r.current,next:s})),r.current=s)},[s,t]),A.useLayoutEffect(()=>()=>{r.current&&(t(cH(r.current)),r.current=null)},[t]),null}function z6(e){var{yAxisId:t,className:r,width:n,label:o}=e,i=A.useRef(null),a=A.useRef(null),s=J(ip),l=at(),c=Pe(),u="yAxis",f=J(S=>pE(S,t)),p=J(S=>YW(S,t)),v=J(S=>hE(S,u,t,l)),g=J(S=>qO(S,t));if(A.useLayoutEffect(()=>{if(!(n!=="auto"||!f||Cv(o)||A.isValidElement(o)||g==null)){var S=i.current;if(S){var E=S.getCalculatedWidth();Math.round(f.width)!==Math.round(E)&&c(uH({id:t,width:E}))}}},[v,f,c,o,t,n,g]),f==null||p==null||g==null)return null;var{dangerouslySetInnerHTML:m,ticks:h,scale:y}=e,x=vd(e,N6),{id:w,scale:P}=g,O=vd(g,I6);return d.createElement(Fv,pd({},x,O,{ref:i,labelRef:a,x:p.x,y:p.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:f.width,height:f.height,className:fe("recharts-".concat(u," ").concat(u),r),viewBox:s,ticks:v,axisType:u}))}var B6={allowDataOverflow:Ke.allowDataOverflow,allowDecimals:Ke.allowDecimals,allowDuplicatedCategory:Ke.allowDuplicatedCategory,angle:Ke.angle,axisLine:hr.axisLine,hide:!1,includeHidden:Ke.includeHidden,interval:Ke.interval,label:!1,minTickGap:Ke.minTickGap,mirror:Ke.mirror,orientation:Ke.orientation,padding:Ke.padding,reversed:Ke.reversed,scale:Ke.scale,tick:Ke.tick,tickCount:Ke.tickCount,tickLine:hr.tickLine,tickSize:hr.tickSize,type:Ke.type,width:Ke.width,yAxisId:0},V6=e=>{var t=$e(e,B6);return d.createElement(d.Fragment,null,d.createElement(F6,{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}),d.createElement(z6,t))},zs=d.memo(V6,FC);zs.displayName="YAxis";var W6=(e,t)=>t,Wv=M([W6,ve,KO,Ye,NE,Ir,fU,ze],yU),Kv=e=>{var t=e.currentTarget.getBoundingClientRect(),r=t.width/e.currentTarget.offsetWidth,n=t.height/e.currentTarget.offsetHeight;return{chartX:Math.round((e.clientX-t.left)/r),chartY:Math.round((e.clientY-t.top)/n)}},zC=It("mouseClick"),BC=Oi();BC.startListening({actionCreator:zC,effect:(e,t)=>{var r=e.payload,n=Wv(t.getState(),Kv(r));n?.activeIndex!=null&&t.dispatch(cK({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var md=It("mouseMove"),VC=Oi(),Ta=null;VC.startListening({actionCreator:md,effect:(e,t)=>{var r=e.payload;Ta!==null&&cancelAnimationFrame(Ta);var n=Kv(r);Ta=requestAnimationFrame(()=>{var o=t.getState(),i=pv(o,o.tooltip.settings.shared);if(i==="axis"){var a=Wv(o,n);a?.activeIndex!=null?t.dispatch(OE({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate})):t.dispatch(SE())}Ta=null})}});function K6(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":e==="children"&&typeof t=="object"&&t!==null?"<<CHILDREN>>":t}var Yx={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},WC=gt({name:"rootProps",initialState:Yx,reducers:{updateOptions:(e,t)=>{var r;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(r=t.payload.barGap)!==null&&r!==void 0?r:Yx.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}}}),U6=WC.reducer,{updateOptions:H6}=WC.actions,G6=null,q6={updatePolarOptions:(e,t)=>t.payload},KC=gt({name:"polarOptions",initialState:G6,reducers:q6}),{updatePolarOptions:Y6}=KC.actions,X6=KC.reducer,UC=It("keyDown"),HC=It("focus"),Uv=Oi();Uv.startListening({actionCreator:UC,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:o}=r.tooltip,i=e.payload;if(!(i!=="ArrowRight"&&i!=="ArrowLeft"&&i!=="Enter")){var a=vv(o,Ao(r),$i(r),Fi(r)),s=a==null?-1:Number(a);if(!(!Number.isFinite(s)||s<0)){var l=Ir(r);if(i==="Enter"){var c=js(r,"axis","hover",String(o.index));t.dispatch(od({active:!o.active,activeIndex:o.index,activeCoordinate:c}));return}var u=QW(r),f=u==="left-to-right"?1:-1,p=i==="ArrowRight"?1:-1,v=s+p*f;if(!(l==null||v>=l.length||v<0)){var g=js(r,"axis","hover",String(v));t.dispatch(od({active:!0,activeIndex:v.toString(),activeCoordinate:g}))}}}}}});Uv.startListening({actionCreator:HC,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:o}=r.tooltip;if(!o.active&&o.index==null){var i="0",a=js(r,"axis","hover",String(i));t.dispatch(od({active:!0,activeIndex:i,activeCoordinate:a}))}}}});var Mt=It("externalEvent"),GC=Oi(),lf=new Map;GC.startListening({actionCreator:Mt,effect:(e,t)=>{var{handler:r,reactEvent:n}=e.payload;if(r!=null){n.persist();var o=n.type,i=lf.get(o);i!==void 0&&cancelAnimationFrame(i);var a=requestAnimationFrame(()=>{try{var s=t.getState(),l={activeCoordinate:YK(s),activeDataKey:bv(s),activeIndex:Gr(s),activeLabel:RE(s),activeTooltipIndex:Gr(s),isTooltipActive:XK(s)};r(l,n)}finally{lf.delete(o)}});lf.set(o,a)}}});var Z6=M([Eo],e=>e.tooltipItemPayloads),J6=M([Z6,(e,t)=>t,(e,t,r)=>r],(e,t,r)=>{if(t!=null){var n=e.find(i=>i.settings.graphicalItemId===r);if(n!=null){var{getPosition:o}=n;if(o!=null)return o(t)}}}),qC=It("touchMove"),YC=Oi();YC.startListening({actionCreator:qC,effect:(e,t)=>{var r=e.payload;if(!(r.touches==null||r.touches.length===0)){var n=t.getState(),o=pv(n,n.tooltip.settings.shared);if(o==="axis"){var i=r.touches[0];if(i==null)return;var a=Wv(n,Kv({clientX:i.clientX,clientY:i.clientY,currentTarget:r.currentTarget}));a?.activeIndex!=null&&t.dispatch(OE({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate}))}else if(o==="item"){var s,l=r.touches[0];if(document.elementFromPoint==null||l==null)return;var c=document.elementFromPoint(l.clientX,l.clientY);if(!c||!c.getAttribute)return;var u=c.getAttribute(gS),f=(s=c.getAttribute(yS))!==null&&s!==void 0?s:void 0,p=Co(n).find(m=>m.id===f);if(u==null||p==null||f==null)return;var{dataKey:v}=p,g=J6(n,u,f);t.dispatch(PE({activeDataKey:v,activeIndex:u,activeCoordinate:g,activeGraphicalItemId:f}))}}}});var Q6=DP({brush:TH,cartesianAxis:fH,chartData:YU,errorBars:SG,graphicalItems:y4,layout:w2,legend:TL,options:KU,polarAxis:j3,polarOptions:X6,referenceElements:NH,rootProps:U6,tooltip:uK,zIndex:kU}),e8=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return H$({reducer:Q6,preloadedState:t,middleware:n=>{var o;return n({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((o="es6")!==null&&o!==void 0?o:"")}).concat([BC.middleware,VC.middleware,Uv.middleware,GC.middleware,YC.middleware])},enhancers:n=>{var o=n;return typeof n=="function"&&(o=n()),o.concat(eS({type:"raf"}))},devTools:{serialize:{replacer:K6},name:"recharts-".concat(r)}})};function XC(e){var{preloadedState:t,children:r,reduxStoreName:n}=e,o=at(),i=A.useRef(null);if(o)return r;i.current==null&&(i.current=e8(t,n));var a=Jd;return d.createElement(QG,{context:a,store:i.current},r)}function t8(e){var{layout:t,margin:r}=e,n=Pe(),o=at();return A.useEffect(()=>{o||(n(y2(t)),n(g2(r)))},[n,o,t,r]),null}var ZC=A.memo(t8,Gl);function JC(e){var t=Pe();return A.useEffect(()=>{t(H6(e))},[t,e]),null}function Xx(e){var{zIndex:t,isPanorama:r}=e,n=A.useRef(null),o=Pe();return A.useLayoutEffect(()=>(n.current&&o(MU({zIndex:t,element:n.current,isPanorama:r})),()=>{o(jU({zIndex:t,isPanorama:r}))}),[o,t,r]),d.createElement("g",{tabIndex:-1,ref:n})}function Zx(e){var{children:t,isPanorama:r}=e,n=J(xU);if(!n||n.length===0)return t;var o=n.filter(a=>a<0),i=n.filter(a=>a>0);return d.createElement(d.Fragment,null,o.map(a=>d.createElement(Xx,{key:a,zIndex:a,isPanorama:r})),t,i.map(a=>d.createElement(Xx,{key:a,zIndex:a,isPanorama:r})))}var r8=["children"];function n8(e,t){if(e==null)return{};var r,n,o=o8(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function o8(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Bs(){return Bs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Bs.apply(null,arguments)}var i8={width:"100%",height:"100%",display:"block"},a8=A.forwardRef((e,t)=>{var r=cp(),n=up(),o=DS();if(!ir(r)||!ir(n))return null;var{children:i,otherAttributes:a,title:s,desc:l}=e,c,u;return a!=null&&(typeof a.tabIndex=="number"?c=a.tabIndex:c=o?0:void 0,typeof a.role=="string"?u=a.role:u=o?"application":void 0),d.createElement(Bd,Bs({},a,{title:s,desc:l,role:u,tabIndex:c,width:r,height:n,style:i8,ref:t}),i)}),s8=e=>{var{children:t}=e,r=J(gl);if(!r)return null;var{width:n,height:o,y:i,x:a}=r;return d.createElement(Bd,{width:n,height:o,x:a,y:i},t)},Jx=A.forwardRef((e,t)=>{var{children:r}=e,n=n8(e,r8),o=at();return o?d.createElement(s8,null,d.createElement(Zx,{isPanorama:!0},r)):d.createElement(a8,Bs({ref:t},n),d.createElement(Zx,{isPanorama:!1},r))});function l8(){var e=Pe(),[t,r]=A.useState(null),n=J(L2);return A.useEffect(()=>{if(t!=null){var o=t.getBoundingClientRect(),i=o.width/t.offsetWidth;ce(i)&&i!==n&&e(x2(i))}},[t,e,n]),r}function Qx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function c8(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Qx(Object(r),!0).forEach(function(n){u8(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function u8(e,t,r){return(t=f8(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f8(e){var t=d8(e,"string");return typeof t=="symbol"?t:t+""}function d8(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Wr(){return Wr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Wr.apply(null,arguments)}var p8=()=>(o5(),null);function Vs(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var v8=A.forwardRef((e,t)=>{var r,n,o=A.useRef(null),[i,a]=A.useState({containerWidth:Vs((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:Vs((n=e.style)===null||n===void 0?void 0:n.height)}),s=A.useCallback((c,u)=>{a(f=>{var p=Math.round(c),v=Math.round(u);return f.containerWidth===p&&f.containerHeight===v?f:{containerWidth:p,containerHeight:v}})},[]),l=A.useCallback(c=>{if(typeof t=="function"&&t(c),c!=null&&typeof ResizeObserver<"u"){var{width:u,height:f}=c.getBoundingClientRect();s(u,f);var p=g=>{var m=g[0];if(m!=null){var{width:h,height:y}=m.contentRect;s(h,y)}},v=new ResizeObserver(p);v.observe(c),o.current=v}},[t,s]);return A.useEffect(()=>()=>{var c=o.current;c?.disconnect()},[s]),d.createElement(d.Fragment,null,d.createElement(Ci,{width:i.containerWidth,height:i.containerHeight}),d.createElement("div",Wr({ref:l},e)))}),m8=A.forwardRef((e,t)=>{var{width:r,height:n}=e,[o,i]=A.useState({containerWidth:Vs(r),containerHeight:Vs(n)}),a=A.useCallback((l,c)=>{i(u=>{var f=Math.round(l),p=Math.round(c);return u.containerWidth===f&&u.containerHeight===p?u:{containerWidth:f,containerHeight:p}})},[]),s=A.useCallback(l=>{if(typeof t=="function"&&t(l),l!=null){var{width:c,height:u}=l.getBoundingClientRect();a(c,u)}},[t,a]);return d.createElement(d.Fragment,null,d.createElement(Ci,{width:o.containerWidth,height:o.containerHeight}),d.createElement("div",Wr({ref:s},e)))}),h8=A.forwardRef((e,t)=>{var{width:r,height:n}=e;return d.createElement(d.Fragment,null,d.createElement(Ci,{width:r,height:n}),d.createElement("div",Wr({ref:t},e)))}),g8=A.forwardRef((e,t)=>{var{width:r,height:n}=e;return typeof r=="string"||typeof n=="string"?d.createElement(m8,Wr({},e,{ref:t})):typeof r=="number"&&typeof n=="number"?d.createElement(h8,Wr({},e,{width:r,height:n,ref:t})):d.createElement(d.Fragment,null,d.createElement(Ci,{width:r,height:n}),d.createElement("div",Wr({ref:t},e)))});function y8(e){return e?v8:g8}var b8=A.forwardRef((e,t)=>{var{children:r,className:n,height:o,onClick:i,onContextMenu:a,onDoubleClick:s,onMouseDown:l,onMouseEnter:c,onMouseLeave:u,onMouseMove:f,onMouseUp:p,onTouchEnd:v,onTouchMove:g,onTouchStart:m,style:h,width:y,responsive:x,dispatchTouchEvents:w=!0}=e,P=A.useRef(null),O=Pe(),[S,E]=A.useState(null),[C,j]=A.useState(null),D=l8(),R=ap(),_=R?.width>0?R.width:y,k=R?.height>0?R.height:o,I=A.useCallback($=>{D($),typeof t=="function"&&t($),E($),j($),$!=null&&(P.current=$)},[D,t,E,j]),V=A.useCallback($=>{O(zC($)),O(Mt({handler:i,reactEvent:$}))},[O,i]),z=A.useCallback($=>{O(md($)),O(Mt({handler:c,reactEvent:$}))},[O,c]),K=A.useCallback($=>{O(SE()),O(Mt({handler:u,reactEvent:$}))},[O,u]),T=A.useCallback($=>{O(md($)),O(Mt({handler:f,reactEvent:$}))},[O,f]),N=A.useCallback(()=>{O(HC())},[O]),G=A.useCallback($=>{O(UC($.key))},[O]),Q=A.useCallback($=>{O(Mt({handler:a,reactEvent:$}))},[O,a]),te=A.useCallback($=>{O(Mt({handler:s,reactEvent:$}))},[O,s]),ne=A.useCallback($=>{O(Mt({handler:l,reactEvent:$}))},[O,l]),re=A.useCallback($=>{O(Mt({handler:p,reactEvent:$}))},[O,p]),le=A.useCallback($=>{O(Mt({handler:m,reactEvent:$}))},[O,m]),Oe=A.useCallback($=>{w&&O(qC($)),O(Mt({handler:g,reactEvent:$}))},[O,w,g]),W=A.useCallback($=>{O(Mt({handler:v,reactEvent:$}))},[O,v]),ue=y8(x);return d.createElement(WE.Provider,{value:S},d.createElement(Z0.Provider,{value:C},d.createElement(ue,{width:_??h?.width,height:k??h?.height,className:fe("recharts-wrapper",n),style:c8({position:"relative",cursor:"default",width:_,height:k},h),onClick:V,onContextMenu:Q,onDoubleClick:te,onFocus:N,onKeyDown:G,onMouseDown:ne,onMouseEnter:z,onMouseLeave:K,onMouseMove:T,onMouseUp:re,onTouchEnd:W,onTouchMove:Oe,onTouchStart:le,ref:I},d.createElement(p8,null),r)))}),x8=["width","height","responsive","children","className","style","compact","title","desc"];function w8(e,t){if(e==null)return{};var r,n,o=P8(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function P8(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var QC=A.forwardRef((e,t)=>{var{width:r,height:n,responsive:o,children:i,className:a,style:s,compact:l,title:c,desc:u}=e,f=w8(e,x8),p=Ct(f);return l?d.createElement(d.Fragment,null,d.createElement(Ci,{width:r,height:n}),d.createElement(Jx,{otherAttributes:p,title:c,desc:u},i)):d.createElement(b8,{className:a,style:s,width:r,height:n,responsive:o??!1,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},d.createElement(Jx,{otherAttributes:p,title:c,desc:u,ref:t},d.createElement(DH,null,i)))});function hd(){return hd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},hd.apply(null,arguments)}var S8={top:5,right:5,bottom:5,left:5},O8={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:S8,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},e1=A.forwardRef(function(t,r){var n,o=$e(t.categoricalChartProps,O8),{chartName:i,defaultTooltipEventType:a,validateTooltipEventTypes:s,tooltipPayloadSearcher:l,categoricalChartProps:c}=t,u={chartName:i,defaultTooltipEventType:a,validateTooltipEventTypes:s,tooltipPayloadSearcher:l,eventEmitter:void 0};return d.createElement(XC,{preloadedState:{options:u},reduxStoreName:(n=c.id)!==null&&n!==void 0?n:i},d.createElement(bC,{chartData:c.data}),d.createElement(ZC,{layout:o.layout,margin:o.margin}),d.createElement(JC,{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}),d.createElement(QC,hd({},o,{ref:r})))}),E8=["axis"],C8=A.forwardRef((e,t)=>d.createElement(e1,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:E8,tooltipPayloadSearcher:Ov,categoricalChartProps:e,ref:t})),A8=["axis","item"],_8=A.forwardRef((e,t)=>d.createElement(e1,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:A8,tooltipPayloadSearcher:Ov,categoricalChartProps:e,ref:t}));function T8(e){var t=Pe();return A.useEffect(()=>{t(Y6(e))},[t,e]),null}var M8=["layout"];function gd(){return gd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gd.apply(null,arguments)}function j8(e,t){if(e==null)return{};var r,n,o=k8(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function k8(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var N8={top:5,right:5,bottom:5,left:5},t1={accessibilityLayer:!0,stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:N8,reverseStackOrder:!1,syncMethod:"index",layout:"radial",responsive:!1,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},I8=A.forwardRef(function(t,r){var n,o=$e(t.categoricalChartProps,t1),{layout:i}=o,a=j8(o,M8),{chartName:s,defaultTooltipEventType:l,validateTooltipEventTypes:c,tooltipPayloadSearcher:u}=t,f={chartName:s,defaultTooltipEventType:l,validateTooltipEventTypes:c,tooltipPayloadSearcher:u,eventEmitter:void 0};return d.createElement(XC,{preloadedState:{options:f},reduxStoreName:(n=o.id)!==null&&n!==void 0?n:s},d.createElement(bC,{chartData:o.data}),d.createElement(ZC,{layout:i,margin:o.margin}),d.createElement(JC,{baseValue:void 0,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}),d.createElement(T8,{cx:o.cx,cy:o.cy,startAngle:o.startAngle,endAngle:o.endAngle,innerRadius:o.innerRadius,outerRadius:o.outerRadius}),d.createElement(QC,gd({},a,{ref:r})))});function ew(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function tw(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ew(Object(r),!0).forEach(function(n){D8(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ew(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function D8(e,t,r){return(t=R8(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function R8(e){var t=$8(e,"string");return typeof t=="symbol"?t:t+""}function $8(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var L8=["item"],F8=tw(tw({},t1),{},{layout:"centric",startAngle:0,endAngle:360}),z8=A.forwardRef((e,t)=>{var r=$e(e,F8);return d.createElement(I8,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:L8,tooltipPayloadSearcher:Ov,categoricalChartProps:r,ref:t})});const r1=ie("text-small font-sans tracking-[-0.05em]",{variants:{size:{sm:"h-48",default:"h-72",lg:"h-96"}},defaultVariants:{size:"default"}}),Ma=["var(--color-sunflower)","var(--color-electric-blue)","var(--color-cool-purple)","var(--color-deep-blue)","var(--color-warm-purple)"],n1=d.forwardRef(({className:e,size:t,data:r,series:n,showGrid:o=!0,showLegend:i=!0,showTooltip:a=!0,xAxisLabel:s,yAxisLabel:l,radius:c=0,stacked:u=!1,layout:f="horizontal",...p},v)=>{const g=d.useMemo(()=>{if(n)return n;const h=r[0];return h?Object.keys(h).filter(x=>x!=="label"&&typeof h[x]=="number").map((x,w)=>({key:x,name:x.charAt(0).toUpperCase()+x.slice(1),color:Ma[w%Ma.length]})):[]},[r,n]),m=f==="vertical";return b.jsx("div",{ref:v,className:B(r1({size:t,className:e})),role:"img",...p,children:b.jsx(sp,{width:"100%",height:"100%",minWidth:100,minHeight:100,children:b.jsxs(_8,{data:r,layout:f,margin:{top:5,right:30,left:l?20:0,bottom:s?20:5},children:[o&&b.jsx(zv,{strokeDasharray:"3 3",stroke:"var(--color-border)",vertical:!m,horizontal:m}),m?b.jsxs(b.Fragment,{children:[b.jsx(Fs,{type:"number",stroke:"var(--color-secondary)",fontSize:12,tickLine:!1,axisLine:{stroke:"var(--color-primary)"},label:s?{value:s,position:"insideBottom",offset:-10,fill:"var(--color-secondary)",fontSize:12}:void 0}),b.jsx(zs,{type:"category",dataKey:"label",stroke:"var(--color-secondary)",fontSize:12,tickLine:!1,axisLine:{stroke:"var(--color-primary)"},label:l?{value:l,angle:-90,position:"insideLeft",fill:"var(--color-secondary)",fontSize:12}:void 0})]}):b.jsxs(b.Fragment,{children:[b.jsx(Fs,{dataKey:"label",stroke:"var(--color-secondary)",fontSize:12,tickLine:!1,axisLine:{stroke:"var(--color-primary)"},label:s?{value:s,position:"insideBottom",offset:-10,fill:"var(--color-secondary)",fontSize:12}:void 0}),b.jsx(zs,{stroke:"var(--color-secondary)",fontSize:12,tickLine:!1,axisLine:{stroke:"var(--color-primary)"},label:l?{value:l,angle:-90,position:"insideLeft",fill:"var(--color-secondary)",fontSize:12}:void 0})]}),a&&b.jsx(Ev,{contentStyle:{backgroundColor:"var(--color-white)",border:"1px solid var(--color-border)",borderRadius:"4px",fontFamily:"var(--font-sans)",fontSize:"14px",color:"var(--color-primary)"},labelStyle:{color:"var(--color-secondary)",fontWeight:400},cursor:{fill:"rgba(0, 0, 0, 0.05)"}}),i&&b.jsx(Pl,{wrapperStyle:{fontFamily:"var(--font-sans)",fontSize:"14px",color:"var(--color-secondary)"}}),g.map((h,y)=>b.jsx(LC,{dataKey:h.key,name:h.name,fill:h.color||Ma[y%Ma.length],radius:c,stackId:u?"stack":void 0},h.key))]})})})});n1.displayName="BarChart";const o1=ie("text-small flex items-center font-sans",{variants:{size:{sm:"text-label gap-1.5",default:"text-small gap-2",lg:"text-body gap-2.5"}},defaultVariants:{size:"default"}}),yd=ie("focus-visible:ring-sunflower inline-flex items-center transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",{variants:{isCurrentPage:{true:"cursor-default text-black",false:"text-quaternary hover:text-primary"}},defaultVariants:{isCurrentPage:!1}}),i1=d.forwardRef(({className:e,size:t,separator:r=b.jsx(Hv,{}),children:n,...o},i)=>{const a=d.Children.toArray(n).filter(d.isValidElement);return b.jsx("nav",{ref:i,"aria-label":"Breadcrumb",...o,children:b.jsx("ol",{className:B(o1({size:t,className:e})),children:a.map((s,l)=>b.jsxs("li",{className:"inline-flex items-center gap-2",children:[s,l<a.length-1&&r]},l))})})});i1.displayName="Breadcrumbs";const a1=d.forwardRef(({className:e,asChild:t=!1,isCurrentPage:r=!1,...n},o)=>{if(r)return b.jsx("span",{className:B(yd({isCurrentPage:!0,className:e})),"aria-current":"page",children:n.children});const i=t?Ut:"a";return b.jsx(i,{ref:o,className:B(yd({isCurrentPage:!1,className:e})),...n})});a1.displayName="BreadcrumbItem";const Hv=d.forwardRef(({className:e,children:t,...r},n)=>b.jsx("span",{ref:n,role:"presentation","aria-hidden":"true",className:B("text-tertiary",e),...r,children:t??b.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",children:b.jsx("path",{d:"M6 12L10 8L6 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}));Hv.displayName="BreadcrumbSeparator";const s1=ie("focus-visible:ring-sunflower rounded transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",{variants:{variant:{default:"",elevated:"shadow",ghost:""},padding:{none:"p-0",sm:"p-4",default:"p-6",lg:"p-8"},bg:{card:"bg-card",main:"bg-main",alt:"bg-alt",contrast:"bg-contrast",transparent:"bg-transparent",sunflower:"bg-sunflower","sunflower-hover":"bg-sunflower-hover","lemon-meringue":"bg-lemon-meringue",vanilla:"bg-vanilla",eggshell:"bg-eggshell","warm-purple":"bg-warm-purple","cool-purple":"bg-cool-purple","electric-blue":"bg-electric-blue","deep-blue":"bg-deep-blue",error:"bg-error"}},defaultVariants:{variant:"default",padding:"default",bg:"alt"}}),l1=d.forwardRef(({className:e,variant:t,padding:r,bg:n,asChild:o=!1,...i},a)=>{const s=o?Ut:"div";return b.jsx(s,{className:B(s1({variant:t,padding:r,bg:n,className:e})),ref:a,...i})});l1.displayName="Card";function ql(e){const t=d.useRef({value:e,previous:e});return d.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Yl(e){const[t,r]=d.useState(void 0);return et(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;a=c.inlineSize,s=c.blockSize}else a=e.offsetWidth,s=e.offsetHeight;r({width:a,height:s})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Xl="Checkbox",[B8]=it(Xl),[V8,Gv]=B8(Xl);function W8(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:o,disabled:i,form:a,name:s,onCheckedChange:l,required:c,value:u="on",internal_do_not_use_render:f}=e,[p,v]=Et({prop:r,defaultProp:o??!1,onChange:l,caller:Xl}),[g,m]=d.useState(null),[h,y]=d.useState(null),x=d.useRef(!1),w=g?!!a||!!g.closest("form"):!0,P={checked:p,disabled:i,setChecked:v,control:g,setControl:m,name:s,form:a,value:u,hasConsumerStoppedPropagationRef:x,required:c,defaultChecked:Kr(o)?!1:o,isFormControl:w,bubbleInput:h,setBubbleInput:y};return b.jsx(V8,{scope:t,...P,children:K8(f)?f(P):n})}var c1="CheckboxTrigger",u1=d.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},o)=>{const{control:i,value:a,disabled:s,checked:l,required:c,setControl:u,setChecked:f,hasConsumerStoppedPropagationRef:p,isFormControl:v,bubbleInput:g}=Gv(c1,e),m=oe(o,u),h=d.useRef(l);return d.useEffect(()=>{const y=i?.form;if(y){const x=()=>f(h.current);return y.addEventListener("reset",x),()=>y.removeEventListener("reset",x)}},[i,f]),b.jsx(ee.button,{type:"button",role:"checkbox","aria-checked":Kr(l)?"mixed":l,"aria-required":c,"data-state":h1(l),"data-disabled":s?"":void 0,disabled:s,value:a,...n,ref:m,onKeyDown:U(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:U(r,y=>{f(x=>Kr(x)?!0:!x),g&&v&&(p.current=y.isPropagationStopped(),p.current||y.stopPropagation())})})});u1.displayName=c1;var f1=d.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:o,defaultChecked:i,required:a,disabled:s,value:l,onCheckedChange:c,form:u,...f}=e;return b.jsx(W8,{__scopeCheckbox:r,checked:o,defaultChecked:i,disabled:s,required:a,onCheckedChange:c,name:n,form:u,value:l,internal_do_not_use_render:({isFormControl:p})=>b.jsxs(b.Fragment,{children:[b.jsx(u1,{...f,ref:t,__scopeCheckbox:r}),p&&b.jsx(m1,{__scopeCheckbox:r})]})})});f1.displayName=Xl;var d1="CheckboxIndicator",p1=d.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...o}=e,i=Gv(d1,r);return b.jsx(pt,{present:n||Kr(i.checked)||i.checked===!0,children:b.jsx(ee.span,{"data-state":h1(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});p1.displayName=d1;var v1="CheckboxBubbleInput",m1=d.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:o,checked:i,defaultChecked:a,required:s,disabled:l,name:c,value:u,form:f,bubbleInput:p,setBubbleInput:v}=Gv(v1,e),g=oe(r,v),m=ql(i),h=Yl(n);d.useEffect(()=>{const x=p;if(!x)return;const w=window.HTMLInputElement.prototype,O=Object.getOwnPropertyDescriptor(w,"checked").set,S=!o.current;if(m!==i&&O){const E=new Event("click",{bubbles:S});x.indeterminate=Kr(i),O.call(x,Kr(i)?!1:i),x.dispatchEvent(E)}},[p,m,i,o]);const y=d.useRef(Kr(i)?!1:i);return b.jsx(ee.input,{type:"checkbox","aria-hidden":!0,defaultChecked:a??y.current,required:s,disabled:l,name:c,value:u,form:f,...t,tabIndex:-1,ref:g,style:{...t.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});m1.displayName=v1;function K8(e){return typeof e=="function"}function Kr(e){return e==="indeterminate"}function h1(e){return Kr(e)?"indeterminate":e?"checked":"unchecked"}const g1=d.forwardRef(({className:e,...t},r)=>b.jsx(f1,{ref:r,className:B("border-border bg-card peer h-5 w-5 shrink-0 rounded border transition-colors","focus-visible:ring-sunflower focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none","disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:border-sunflower data-[state=checked]:bg-sunflower data-[state=checked]:text-primary",e),...t,children:b.jsx(p1,{className:B("flex items-center justify-center text-current"),children:b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",className:"h-3.5 w-3.5",children:b.jsx("polyline",{points:"20 6 9 17 4 12"})})})}));g1.displayName="Checkbox";function rw(e){const t=U8(e),r=d.forwardRef((n,o)=>{const{children:i,...a}=n,s=d.Children.toArray(i),l=s.find(G8);if(l){const c=l.props.children,u=s.map(f=>f===l?d.Children.count(c)>1?d.Children.only(null):d.isValidElement(c)?c.props.children:null:f);return b.jsx(t,{...a,ref:o,children:d.isValidElement(c)?d.cloneElement(c,void 0,u):null})}return b.jsx(t,{...a,ref:o,children:i})});return r.displayName=`${e}.Slot`,r}function U8(e){const t=d.forwardRef((r,n)=>{const{children:o,...i}=r;if(d.isValidElement(o)){const a=Y8(o),s=q8(i,o.props);return o.type!==d.Fragment&&(s.ref=n?lr(n,a):a),d.cloneElement(o,s)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var H8=Symbol("radix.slottable");function G8(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===H8}function q8(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...s)=>{const l=i(...s);return o(...s),l}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}function Y8(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function Zl(e){const t=e+"CollectionProvider",[r,n]=it(t),[o,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),a=m=>{const{scope:h,children:y}=m,x=A.useRef(null),w=A.useRef(new Map).current;return b.jsx(o,{scope:h,itemMap:w,collectionRef:x,children:y})};a.displayName=t;const s=e+"CollectionSlot",l=rw(s),c=A.forwardRef((m,h)=>{const{scope:y,children:x}=m,w=i(s,y),P=oe(h,w.collectionRef);return b.jsx(l,{ref:P,children:x})});c.displayName=s;const u=e+"CollectionItemSlot",f="data-radix-collection-item",p=rw(u),v=A.forwardRef((m,h)=>{const{scope:y,children:x,...w}=m,P=A.useRef(null),O=oe(h,P),S=i(u,y);return A.useEffect(()=>(S.itemMap.set(P,{ref:P,...w}),()=>{S.itemMap.delete(P)})),b.jsx(p,{[f]:"",ref:O,children:x})});v.displayName=u;function g(m){const h=i(e+"CollectionConsumer",m);return A.useCallback(()=>{const x=h.collectionRef.current;if(!x)return[];const w=Array.from(x.querySelectorAll(`[${f}]`));return Array.from(h.itemMap.values()).sort((S,E)=>w.indexOf(S.ref.current)-w.indexOf(E.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:c,ItemSlot:v},g,n]}var X8=d.createContext(void 0);function Jl(e){const t=d.useContext(X8);return e||t||"ltr"}const Z8=["top","right","bottom","left"],Yr=Math.min,bt=Math.max,Ws=Math.round,ja=Math.floor,rr=e=>({x:e,y:e}),J8={left:"right",right:"left",bottom:"top",top:"bottom"},Q8={start:"end",end:"start"};function bd(e,t,r){return bt(e,Yr(t,r))}function Or(e,t){return typeof e=="function"?e(t):e}function Er(e){return e.split("-")[0]}function _o(e){return e.split("-")[1]}function qv(e){return e==="x"?"y":"x"}function Yv(e){return e==="y"?"height":"width"}const eY=new Set(["top","bottom"]);function er(e){return eY.has(Er(e))?"y":"x"}function Xv(e){return qv(er(e))}function tY(e,t,r){r===void 0&&(r=!1);const n=_o(e),o=Xv(e),i=Yv(o);let a=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Ks(a)),[a,Ks(a)]}function rY(e){const t=Ks(e);return[xd(e),t,xd(t)]}function xd(e){return e.replace(/start|end/g,t=>Q8[t])}const nw=["left","right"],ow=["right","left"],nY=["top","bottom"],oY=["bottom","top"];function iY(e,t,r){switch(e){case"top":case"bottom":return r?t?ow:nw:t?nw:ow;case"left":case"right":return t?nY:oY;default:return[]}}function aY(e,t,r,n){const o=_o(e);let i=iY(Er(e),r==="start",n);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(xd)))),i}function Ks(e){return e.replace(/left|right|bottom|top/g,t=>J8[t])}function sY(e){return{top:0,right:0,bottom:0,left:0,...e}}function y1(e){return typeof e!="number"?sY(e):{top:e,right:e,bottom:e,left:e}}function Us(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function iw(e,t,r){let{reference:n,floating:o}=e;const i=er(t),a=Xv(t),s=Yv(a),l=Er(t),c=i==="y",u=n.x+n.width/2-o.width/2,f=n.y+n.height/2-o.height/2,p=n[s]/2-o[s]/2;let v;switch(l){case"top":v={x:u,y:n.y-o.height};break;case"bottom":v={x:u,y:n.y+n.height};break;case"right":v={x:n.x+n.width,y:f};break;case"left":v={x:n.x-o.width,y:f};break;default:v={x:n.x,y:n.y}}switch(_o(t)){case"start":v[a]-=p*(r&&c?-1:1);break;case"end":v[a]+=p*(r&&c?-1:1);break}return v}async function lY(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:p=!1,padding:v=0}=Or(t,e),g=y1(v),h=s[p?f==="floating"?"reference":"floating":f],y=Us(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(h)))==null||r?h:h.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),x=f==="floating"?{x:n,y:o,width:a.floating.width,height:a.floating.height}:a.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),P=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},O=Us(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:w,strategy:l}):x);return{top:(y.top-O.top+g.top)/P.y,bottom:(O.bottom-y.bottom+g.bottom)/P.y,left:(y.left-O.left+g.left)/P.x,right:(O.right-y.right+g.right)/P.x}}const cY=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,s=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=iw(c,n,l),p=n,v={},g=0;for(let h=0;h<s.length;h++){var m;const{name:y,fn:x}=s[h],{x:w,y:P,data:O,reset:S}=await x({x:u,y:f,initialPlacement:n,placement:p,strategy:o,middlewareData:v,rects:c,platform:{...a,detectOverflow:(m=a.detectOverflow)!=null?m:lY},elements:{reference:e,floating:t}});u=w??u,f=P??f,v={...v,[y]:{...v[y],...O}},S&&g<=50&&(g++,typeof S=="object"&&(S.placement&&(p=S.placement),S.rects&&(c=S.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:u,y:f}=iw(c,p,l)),h=-1)}return{x:u,y:f,placement:p,strategy:o,middlewareData:v}},uY=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=Or(e,t)||{};if(c==null)return{};const f=y1(u),p={x:r,y:n},v=Xv(o),g=Yv(v),m=await a.getDimensions(c),h=v==="y",y=h?"top":"left",x=h?"bottom":"right",w=h?"clientHeight":"clientWidth",P=i.reference[g]+i.reference[v]-p[v]-i.floating[g],O=p[v]-i.reference[v],S=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let E=S?S[w]:0;(!E||!await(a.isElement==null?void 0:a.isElement(S)))&&(E=s.floating[w]||i.floating[g]);const C=P/2-O/2,j=E/2-m[g]/2-1,D=Yr(f[y],j),R=Yr(f[x],j),_=D,k=E-m[g]-R,I=E/2-m[g]/2+C,V=bd(_,I,k),z=!l.arrow&&_o(o)!=null&&I!==V&&i.reference[g]/2-(I<_?D:R)-m[g]/2<0,K=z?I<_?I-_:I-k:0;return{[v]:p[v]+K,data:{[v]:V,centerOffset:I-V-K,...z&&{alignmentOffset:K}},reset:z}}}),fY=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...h}=Or(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const y=Er(o),x=er(s),w=Er(s)===s,P=await(l.isRTL==null?void 0:l.isRTL(c.floating)),O=p||(w||!m?[Ks(s)]:rY(s)),S=g!=="none";!p&&S&&O.push(...aY(s,m,g,P));const E=[s,...O],C=await l.detectOverflow(t,h),j=[];let D=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&j.push(C[y]),f){const I=tY(o,a,P);j.push(C[I[0]],C[I[1]])}if(D=[...D,{placement:o,overflows:j}],!j.every(I=>I<=0)){var R,_;const I=(((R=i.flip)==null?void 0:R.index)||0)+1,V=E[I];if(V&&(!(f==="alignment"?x!==er(V):!1)||D.every(T=>er(T.placement)===x?T.overflows[0]>0:!0)))return{data:{index:I,overflows:D},reset:{placement:V}};let z=(_=D.filter(K=>K.overflows[0]<=0).sort((K,T)=>K.overflows[1]-T.overflows[1])[0])==null?void 0:_.placement;if(!z)switch(v){case"bestFit":{var k;const K=(k=D.filter(T=>{if(S){const N=er(T.placement);return N===x||N==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(N=>N>0).reduce((N,G)=>N+G,0)]).sort((T,N)=>T[1]-N[1])[0])==null?void 0:k[0];K&&(z=K);break}case"initialPlacement":z=s;break}if(o!==z)return{reset:{placement:z}}}return{}}}};function aw(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function sw(e){return Z8.some(t=>e[t]>=0)}const dY=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:o="referenceHidden",...i}=Or(e,t);switch(o){case"referenceHidden":{const a=await n.detectOverflow(t,{...i,elementContext:"reference"}),s=aw(a,r.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:sw(s)}}}case"escaped":{const a=await n.detectOverflow(t,{...i,altBoundary:!0}),s=aw(a,r.floating);return{data:{escapedOffsets:s,escaped:sw(s)}}}default:return{}}}}},b1=new Set(["left","top"]);async function pY(e,t){const{placement:r,platform:n,elements:o}=e,i=await(n.isRTL==null?void 0:n.isRTL(o.floating)),a=Er(r),s=_o(r),l=er(r)==="y",c=b1.has(a)?-1:1,u=i&&l?-1:1,f=Or(t,e);let{mainAxis:p,crossAxis:v,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof g=="number"&&(v=s==="end"?g*-1:g),l?{x:v*u,y:p*c}:{x:p*c,y:v*u}}const vY=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await pY(t,e);return a===((r=s.offset)==null?void 0:r.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},mY=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o,platform:i}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:l={fn:y=>{let{x,y:w}=y;return{x,y:w}}},...c}=Or(e,t),u={x:r,y:n},f=await i.detectOverflow(t,c),p=er(Er(o)),v=qv(p);let g=u[v],m=u[p];if(a){const y=v==="y"?"top":"left",x=v==="y"?"bottom":"right",w=g+f[y],P=g-f[x];g=bd(w,g,P)}if(s){const y=p==="y"?"top":"left",x=p==="y"?"bottom":"right",w=m+f[y],P=m-f[x];m=bd(w,m,P)}const h=l.fn({...t,[v]:g,[p]:m});return{...h,data:{x:h.x-r,y:h.y-n,enabled:{[v]:a,[p]:s}}}}}},hY=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=Or(e,t),u={x:r,y:n},f=er(o),p=qv(f);let v=u[p],g=u[f];const m=Or(s,t),h=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const w=p==="y"?"height":"width",P=i.reference[p]-i.floating[w]+h.mainAxis,O=i.reference[p]+i.reference[w]-h.mainAxis;v<P?v=P:v>O&&(v=O)}if(c){var y,x;const w=p==="y"?"width":"height",P=b1.has(Er(o)),O=i.reference[f]-i.floating[w]+(P&&((y=a.offset)==null?void 0:y[f])||0)+(P?0:h.crossAxis),S=i.reference[f]+i.reference[w]+(P?0:((x=a.offset)==null?void 0:x[f])||0)-(P?h.crossAxis:0);g<O?g=O:g>S&&(g=S)}return{[p]:v,[f]:g}}}},gY=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...c}=Or(e,t),u=await a.detectOverflow(t,c),f=Er(o),p=_o(o),v=er(o)==="y",{width:g,height:m}=i.floating;let h,y;f==="top"||f==="bottom"?(h=f,y=p===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(y=f,h=p==="end"?"top":"bottom");const x=m-u.top-u.bottom,w=g-u.left-u.right,P=Yr(m-u[h],x),O=Yr(g-u[y],w),S=!t.middlewareData.shift;let E=P,C=O;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(C=w),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(E=x),S&&!p){const D=bt(u.left,0),R=bt(u.right,0),_=bt(u.top,0),k=bt(u.bottom,0);v?C=g-2*(D!==0||R!==0?D+R:bt(u.left,u.right)):E=m-2*(_!==0||k!==0?_+k:bt(u.top,u.bottom))}await l({...t,availableWidth:C,availableHeight:E});const j=await a.getDimensions(s.floating);return g!==j.width||m!==j.height?{reset:{rects:!0}}:{}}}};function Ql(){return typeof window<"u"}function To(e){return x1(e)?(e.nodeName||"").toLowerCase():"#document"}function Ot(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function cr(e){var t;return(t=(x1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function x1(e){return Ql()?e instanceof Node||e instanceof Ot(e).Node:!1}function Vt(e){return Ql()?e instanceof Element||e instanceof Ot(e).Element:!1}function sr(e){return Ql()?e instanceof HTMLElement||e instanceof Ot(e).HTMLElement:!1}function lw(e){return!Ql()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ot(e).ShadowRoot}const yY=new Set(["inline","contents"]);function Wi(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=Wt(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!yY.has(o)}const bY=new Set(["table","td","th"]);function xY(e){return bY.has(To(e))}const wY=[":popover-open",":modal"];function ec(e){return wY.some(t=>{try{return e.matches(t)}catch{return!1}})}const PY=["transform","translate","scale","rotate","perspective"],SY=["transform","translate","scale","rotate","perspective","filter"],OY=["paint","layout","strict","content"];function Zv(e){const t=Jv(),r=Vt(e)?Wt(e):e;return PY.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||SY.some(n=>(r.willChange||"").includes(n))||OY.some(n=>(r.contain||"").includes(n))}function EY(e){let t=Xr(e);for(;sr(t)&&!po(t);){if(Zv(t))return t;if(ec(t))return null;t=Xr(t)}return null}function Jv(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const CY=new Set(["html","body","#document"]);function po(e){return CY.has(To(e))}function Wt(e){return Ot(e).getComputedStyle(e)}function tc(e){return Vt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Xr(e){if(To(e)==="html")return e;const t=e.assignedSlot||e.parentNode||lw(e)&&e.host||cr(e);return lw(t)?t.host:t}function w1(e){const t=Xr(e);return po(t)?e.ownerDocument?e.ownerDocument.body:e.body:sr(t)&&Wi(t)?t:w1(t)}function fi(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=w1(e),i=o===((n=e.ownerDocument)==null?void 0:n.body),a=Ot(o);if(i){const s=wd(a);return t.concat(a,a.visualViewport||[],Wi(o)?o:[],s&&r?fi(s):[])}return t.concat(o,fi(o,[],r))}function wd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function P1(e){const t=Wt(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=sr(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,s=Ws(r)!==i||Ws(n)!==a;return s&&(r=i,n=a),{width:r,height:n,$:s}}function Qv(e){return Vt(e)?e:e.contextElement}function oo(e){const t=Qv(e);if(!sr(t))return rr(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=P1(t);let a=(i?Ws(r.width):r.width)/n,s=(i?Ws(r.height):r.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const AY=rr(0);function S1(e){const t=Ot(e);return!Jv()||!t.visualViewport?AY:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _Y(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Ot(e)?!1:t}function kn(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),i=Qv(e);let a=rr(1);t&&(n?Vt(n)&&(a=oo(n)):a=oo(e));const s=_Y(i,r,n)?S1(i):rr(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,f=o.height/a.y;if(i){const p=Ot(i),v=n&&Vt(n)?Ot(n):n;let g=p,m=wd(g);for(;m&&n&&v!==g;){const h=oo(m),y=m.getBoundingClientRect(),x=Wt(m),w=y.left+(m.clientLeft+parseFloat(x.paddingLeft))*h.x,P=y.top+(m.clientTop+parseFloat(x.paddingTop))*h.y;l*=h.x,c*=h.y,u*=h.x,f*=h.y,l+=w,c+=P,g=Ot(m),m=wd(g)}}return Us({width:u,height:f,x:l,y:c})}function rc(e,t){const r=tc(e).scrollLeft;return t?t.left+r:kn(cr(e)).left+r}function O1(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-rc(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function TY(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i=o==="fixed",a=cr(n),s=t?ec(t.floating):!1;if(n===a||s&&i)return r;let l={scrollLeft:0,scrollTop:0},c=rr(1);const u=rr(0),f=sr(n);if((f||!f&&!i)&&((To(n)!=="body"||Wi(a))&&(l=tc(n)),sr(n))){const v=kn(n);c=oo(n),u.x=v.x+n.clientLeft,u.y=v.y+n.clientTop}const p=a&&!f&&!i?O1(a,l):rr(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:r.y*c.y-l.scrollTop*c.y+u.y+p.y}}function MY(e){return Array.from(e.getClientRects())}function jY(e){const t=cr(e),r=tc(e),n=e.ownerDocument.body,o=bt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=bt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+rc(e);const s=-r.scrollTop;return Wt(n).direction==="rtl"&&(a+=bt(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:a,y:s}}const cw=25;function kY(e,t){const r=Ot(e),n=cr(e),o=r.visualViewport;let i=n.clientWidth,a=n.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const u=Jv();(!u||u&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}const c=rc(n);if(c<=0){const u=n.ownerDocument,f=u.body,p=getComputedStyle(f),v=u.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,g=Math.abs(n.clientWidth-f.clientWidth-v);g<=cw&&(i-=g)}else c<=cw&&(i+=c);return{width:i,height:a,x:s,y:l}}const NY=new Set(["absolute","fixed"]);function IY(e,t){const r=kn(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=sr(e)?oo(e):rr(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=o*i.x,c=n*i.y;return{width:a,height:s,x:l,y:c}}function uw(e,t,r){let n;if(t==="viewport")n=kY(e,r);else if(t==="document")n=jY(cr(e));else if(Vt(t))n=IY(t,r);else{const o=S1(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Us(n)}function E1(e,t){const r=Xr(e);return r===t||!Vt(r)||po(r)?!1:Wt(r).position==="fixed"||E1(r,t)}function DY(e,t){const r=t.get(e);if(r)return r;let n=fi(e,[],!1).filter(s=>Vt(s)&&To(s)!=="body"),o=null;const i=Wt(e).position==="fixed";let a=i?Xr(e):e;for(;Vt(a)&&!po(a);){const s=Wt(a),l=Zv(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&NY.has(o.position)||Wi(a)&&!l&&E1(e,a))?n=n.filter(u=>u!==a):o=s,a=Xr(a)}return t.set(e,n),n}function RY(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const a=[...r==="clippingAncestors"?ec(t)?[]:DY(t,this._c):[].concat(r),n],s=a[0],l=a.reduce((c,u)=>{const f=uw(t,u,o);return c.top=bt(f.top,c.top),c.right=Yr(f.right,c.right),c.bottom=Yr(f.bottom,c.bottom),c.left=bt(f.left,c.left),c},uw(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function $Y(e){const{width:t,height:r}=P1(e);return{width:t,height:r}}function LY(e,t,r){const n=sr(t),o=cr(t),i=r==="fixed",a=kn(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=rr(0);function c(){l.x=rc(o)}if(n||!n&&!i)if((To(t)!=="body"||Wi(o))&&(s=tc(t)),n){const v=kn(t,!0,i,t);l.x=v.x+t.clientLeft,l.y=v.y+t.clientTop}else o&&c();i&&!n&&o&&c();const u=o&&!n&&!i?O1(o,s):rr(0),f=a.left+s.scrollLeft-l.x-u.x,p=a.top+s.scrollTop-l.y-u.y;return{x:f,y:p,width:a.width,height:a.height}}function cf(e){return Wt(e).position==="static"}function fw(e,t){if(!sr(e)||Wt(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return cr(e)===r&&(r=r.ownerDocument.body),r}function C1(e,t){const r=Ot(e);if(ec(e))return r;if(!sr(e)){let o=Xr(e);for(;o&&!po(o);){if(Vt(o)&&!cf(o))return o;o=Xr(o)}return r}let n=fw(e,t);for(;n&&xY(n)&&cf(n);)n=fw(n,t);return n&&po(n)&&cf(n)&&!Zv(n)?r:n||EY(e)||r}const FY=async function(e){const t=this.getOffsetParent||C1,r=this.getDimensions,n=await r(e.floating);return{reference:LY(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function zY(e){return Wt(e).direction==="rtl"}const BY={convertOffsetParentRelativeRectToViewportRelativeRect:TY,getDocumentElement:cr,getClippingRect:RY,getOffsetParent:C1,getElementRects:FY,getClientRects:MY,getDimensions:$Y,getScale:oo,isElement:Vt,isRTL:zY};function A1(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function VY(e,t){let r=null,n;const o=cr(e);function i(){var s;clearTimeout(n),(s=r)==null||s.disconnect(),r=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:f,width:p,height:v}=c;if(s||t(),!p||!v)return;const g=ja(f),m=ja(o.clientWidth-(u+p)),h=ja(o.clientHeight-(f+v)),y=ja(u),w={rootMargin:-g+"px "+-m+"px "+-h+"px "+-y+"px",threshold:bt(0,Yr(1,l))||1};let P=!0;function O(S){const E=S[0].intersectionRatio;if(E!==l){if(!P)return a();E?a(!1,E):n=setTimeout(()=>{a(!1,1e-7)},1e3)}E===1&&!A1(c,e.getBoundingClientRect())&&a(),P=!1}try{r=new IntersectionObserver(O,{...w,root:o.ownerDocument})}catch{r=new IntersectionObserver(O,w)}r.observe(e)}return a(!0),i}function WY(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=Qv(e),u=o||i?[...c?fi(c):[],...fi(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",r,{passive:!0}),i&&y.addEventListener("resize",r)});const f=c&&s?VY(c,r):null;let p=-1,v=null;a&&(v=new ResizeObserver(y=>{let[x]=y;x&&x.target===c&&v&&(v.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=v)==null||w.observe(t)})),r()}),c&&!l&&v.observe(c),v.observe(t));let g,m=l?kn(e):null;l&&h();function h(){const y=kn(e);m&&!A1(m,y)&&r(),m=y,g=requestAnimationFrame(h)}return r(),()=>{var y;u.forEach(x=>{o&&x.removeEventListener("scroll",r),i&&x.removeEventListener("resize",r)}),f?.(),(y=v)==null||y.disconnect(),v=null,l&&cancelAnimationFrame(g)}}const KY=vY,UY=mY,HY=fY,GY=gY,qY=dY,dw=uY,YY=hY,XY=(e,t,r)=>{const n=new Map,o={platform:BY,...r},i={...o.platform,_c:n};return cY(e,t,{...o,platform:i})};var ZY=typeof document<"u",JY=function(){},Wa=ZY?A.useLayoutEffect:JY;function Hs(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Hs(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const i=o[n];if(!(i==="_owner"&&e.$$typeof)&&!Hs(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function _1(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function pw(e,t){const r=_1(e);return Math.round(t*r)/r}function uf(e){const t=d.useRef(e);return Wa(()=>{t.current=e}),t}function QY(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,f]=d.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,v]=d.useState(n);Hs(p,n)||v(n);const[g,m]=d.useState(null),[h,y]=d.useState(null),x=d.useCallback(T=>{T!==S.current&&(S.current=T,m(T))},[]),w=d.useCallback(T=>{T!==E.current&&(E.current=T,y(T))},[]),P=i||g,O=a||h,S=d.useRef(null),E=d.useRef(null),C=d.useRef(u),j=l!=null,D=uf(l),R=uf(o),_=uf(c),k=d.useCallback(()=>{if(!S.current||!E.current)return;const T={placement:t,strategy:r,middleware:p};R.current&&(T.platform=R.current),XY(S.current,E.current,T).then(N=>{const G={...N,isPositioned:_.current!==!1};I.current&&!Hs(C.current,G)&&(C.current=G,hi.flushSync(()=>{f(G)}))})},[p,t,r,R,_]);Wa(()=>{c===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,f(T=>({...T,isPositioned:!1})))},[c]);const I=d.useRef(!1);Wa(()=>(I.current=!0,()=>{I.current=!1}),[]),Wa(()=>{if(P&&(S.current=P),O&&(E.current=O),P&&O){if(D.current)return D.current(P,O,k);k()}},[P,O,k,D,j]);const V=d.useMemo(()=>({reference:S,floating:E,setReference:x,setFloating:w}),[x,w]),z=d.useMemo(()=>({reference:P,floating:O}),[P,O]),K=d.useMemo(()=>{const T={position:r,left:0,top:0};if(!z.floating)return T;const N=pw(z.floating,u.x),G=pw(z.floating,u.y);return s?{...T,transform:"translate("+N+"px, "+G+"px)",..._1(z.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:N,top:G}},[r,s,z.floating,u.x,u.y]);return d.useMemo(()=>({...u,update:k,refs:V,elements:z,floatingStyles:K}),[u,k,V,z,K])}const e9=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?dw({element:n.current,padding:o}).fn(r):{}:n?dw({element:n,padding:o}).fn(r):{}}}},t9=(e,t)=>({...KY(e),options:[e,t]}),r9=(e,t)=>({...UY(e),options:[e,t]}),n9=(e,t)=>({...YY(e),options:[e,t]}),o9=(e,t)=>({...HY(e),options:[e,t]}),i9=(e,t)=>({...GY(e),options:[e,t]}),a9=(e,t)=>({...qY(e),options:[e,t]}),s9=(e,t)=>({...e9(e),options:[e,t]});var l9="Arrow",T1=d.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...i}=e;return b.jsx(ee.svg,{...i,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:b.jsx("polygon",{points:"0,0 30,0 15,10"})})});T1.displayName=l9;var c9=T1,em="Popper",[M1,tn]=it(em),[u9,j1]=M1(em),k1=e=>{const{__scopePopper:t,children:r}=e,[n,o]=d.useState(null);return b.jsx(u9,{scope:t,anchor:n,onAnchorChange:o,children:r})};k1.displayName=em;var N1="PopperAnchor",I1=d.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,i=j1(N1,r),a=d.useRef(null),s=oe(t,a),l=d.useRef(null);return d.useEffect(()=>{const c=l.current;l.current=n?.current||a.current,c!==l.current&&i.onAnchorChange(l.current)}),n?null:b.jsx(ee.div,{...o,ref:s})});I1.displayName=N1;var tm="PopperContent",[f9,d9]=M1(tm),D1=d.forwardRef((e,t)=>{const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:i="center",alignOffset:a=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:v="optimized",onPlaced:g,...m}=e,h=j1(tm,r),[y,x]=d.useState(null),w=oe(t,W=>x(W)),[P,O]=d.useState(null),S=Yl(P),E=S?.width??0,C=S?.height??0,j=n+(i!=="center"?"-"+i:""),D=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},R=Array.isArray(c)?c:[c],_=R.length>0,k={padding:D,boundary:R.filter(v9),altBoundary:_},{refs:I,floatingStyles:V,placement:z,isPositioned:K,middlewareData:T}=QY({strategy:"fixed",placement:j,whileElementsMounted:(...W)=>WY(...W,{animationFrame:v==="always"}),elements:{reference:h.anchor},middleware:[t9({mainAxis:o+C,alignmentAxis:a}),l&&r9({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?n9():void 0,...k}),l&&o9({...k}),i9({...k,apply:({elements:W,rects:ue,availableWidth:$,availableHeight:H})=>{const{width:F,height:L}=ue.reference,de=W.floating.style;de.setProperty("--radix-popper-available-width",`${$}px`),de.setProperty("--radix-popper-available-height",`${H}px`),de.setProperty("--radix-popper-anchor-width",`${F}px`),de.setProperty("--radix-popper-anchor-height",`${L}px`)}}),P&&s9({element:P,padding:s}),m9({arrowWidth:E,arrowHeight:C}),p&&a9({strategy:"referenceHidden",...k})]}),[N,G]=L1(z),Q=ot(g);et(()=>{K&&Q?.()},[K,Q]);const te=T.arrow?.x,ne=T.arrow?.y,re=T.arrow?.centerOffset!==0,[le,Oe]=d.useState();return et(()=>{y&&Oe(window.getComputedStyle(y).zIndex)},[y]),b.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:K?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:le,"--radix-popper-transform-origin":[T.transformOrigin?.x,T.transformOrigin?.y].join(" "),...T.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:b.jsx(f9,{scope:r,placedSide:N,onArrowChange:O,arrowX:te,arrowY:ne,shouldHideArrow:re,children:b.jsx(ee.div,{"data-side":N,"data-align":G,...m,ref:w,style:{...m.style,animation:K?void 0:"none"}})})})});D1.displayName=tm;var R1="PopperArrow",p9={top:"bottom",right:"left",bottom:"top",left:"right"},$1=d.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,i=d9(R1,n),a=p9[i.placedSide];return b.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:b.jsx(c9,{...o,ref:r,style:{...o.style,display:"block"}})})});$1.displayName=R1;function v9(e){return e!==null}var m9=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:o}=t,a=o.arrow?.centerOffset!==0,s=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[c,u]=L1(r),f={start:"0%",center:"50%",end:"100%"}[u],p=(o.arrow?.x??0)+s/2,v=(o.arrow?.y??0)+l/2;let g="",m="";return c==="bottom"?(g=a?f:`${p}px`,m=`${-l}px`):c==="top"?(g=a?f:`${p}px`,m=`${n.floating.height+l}px`):c==="right"?(g=`${-l}px`,m=a?f:`${v}px`):c==="left"&&(g=`${n.floating.width+l}px`,m=a?f:`${v}px`),{data:{x:g,y:m}}}});function L1(e){const[t,r="center"]=e.split("-");return[t,r]}var Ki=k1,Ui=I1,nc=D1,oc=$1,ff="rovingFocusGroup.onEntryFocus",h9={bubbles:!1,cancelable:!0},Hi="RovingFocusGroup",[Pd,F1,g9]=Zl(Hi),[y9,ic]=it(Hi,[g9]),[b9,x9]=y9(Hi),z1=d.forwardRef((e,t)=>b.jsx(Pd.Provider,{scope:e.__scopeRovingFocusGroup,children:b.jsx(Pd.Slot,{scope:e.__scopeRovingFocusGroup,children:b.jsx(w9,{...e,ref:t})})}));z1.displayName=Hi;var w9=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...f}=e,p=d.useRef(null),v=oe(t,p),g=Jl(i),[m,h]=Et({prop:a,defaultProp:s??null,onChange:l,caller:Hi}),[y,x]=d.useState(!1),w=ot(c),P=F1(r),O=d.useRef(!1),[S,E]=d.useState(0);return d.useEffect(()=>{const C=p.current;if(C)return C.addEventListener(ff,w),()=>C.removeEventListener(ff,w)},[w]),b.jsx(b9,{scope:r,orientation:n,dir:g,loop:o,currentTabStopId:m,onItemFocus:d.useCallback(C=>h(C),[h]),onItemShiftTab:d.useCallback(()=>x(!0),[]),onFocusableItemAdd:d.useCallback(()=>E(C=>C+1),[]),onFocusableItemRemove:d.useCallback(()=>E(C=>C-1),[]),children:b.jsx(ee.div,{tabIndex:y||S===0?-1:0,"data-orientation":n,...f,ref:v,style:{outline:"none",...e.style},onMouseDown:U(e.onMouseDown,()=>{O.current=!0}),onFocus:U(e.onFocus,C=>{const j=!O.current;if(C.target===C.currentTarget&&j&&!y){const D=new CustomEvent(ff,h9);if(C.currentTarget.dispatchEvent(D),!D.defaultPrevented){const R=P().filter(z=>z.focusable),_=R.find(z=>z.active),k=R.find(z=>z.id===m),V=[_,k,...R].filter(Boolean).map(z=>z.ref.current);W1(V,u)}}O.current=!1}),onBlur:U(e.onBlur,()=>x(!1))})})}),B1="RovingFocusGroupItem",V1=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:i,children:a,...s}=e,l=St(),c=i||l,u=x9(B1,r),f=u.currentTabStopId===c,p=F1(r),{onFocusableItemAdd:v,onFocusableItemRemove:g,currentTabStopId:m}=u;return d.useEffect(()=>{if(n)return v(),()=>g()},[n,v,g]),b.jsx(Pd.ItemSlot,{scope:r,id:c,focusable:n,active:o,children:b.jsx(ee.span,{tabIndex:f?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:U(e.onMouseDown,h=>{n?u.onItemFocus(c):h.preventDefault()}),onFocus:U(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:U(e.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){u.onItemShiftTab();return}if(h.target!==h.currentTarget)return;const y=O9(h,u.orientation,u.dir);if(y!==void 0){if(h.metaKey||h.ctrlKey||h.altKey||h.shiftKey)return;h.preventDefault();let w=p().filter(P=>P.focusable).map(P=>P.ref.current);if(y==="last")w.reverse();else if(y==="prev"||y==="next"){y==="prev"&&w.reverse();const P=w.indexOf(h.currentTarget);w=u.loop?E9(w,P+1):w.slice(P+1)}setTimeout(()=>W1(w))}}),children:typeof a=="function"?a({isCurrentTabStop:f,hasTabStop:m!=null}):a})})});V1.displayName=B1;var P9={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function S9(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function O9(e,t,r){const n=S9(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return P9[n]}function W1(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function E9(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var K1=z1,U1=V1;function C9(e){const t=A9(e),r=d.forwardRef((n,o)=>{const{children:i,...a}=n,s=d.Children.toArray(i),l=s.find(T9);if(l){const c=l.props.children,u=s.map(f=>f===l?d.Children.count(c)>1?d.Children.only(null):d.isValidElement(c)?c.props.children:null:f);return b.jsx(t,{...a,ref:o,children:d.isValidElement(c)?d.cloneElement(c,void 0,u):null})}return b.jsx(t,{...a,ref:o,children:i})});return r.displayName=`${e}.Slot`,r}function A9(e){const t=d.forwardRef((r,n)=>{const{children:o,...i}=r;if(d.isValidElement(o)){const a=j9(o),s=M9(i,o.props);return o.type!==d.Fragment&&(s.ref=n?lr(n,a):a),d.cloneElement(o,s)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var _9=Symbol("radix.slottable");function T9(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===_9}function M9(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...s)=>{const l=i(...s);return o(...s),l}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}function j9(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Sd=["Enter"," "],k9=["ArrowDown","PageUp","Home"],H1=["ArrowUp","PageDown","End"],N9=[...k9,...H1],I9={ltr:[...Sd,"ArrowRight"],rtl:[...Sd,"ArrowLeft"]},D9={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Gi="Menu",[di,R9,$9]=Zl(Gi),[Wn,ac]=it(Gi,[$9,tn,ic]),qi=tn(),G1=ic(),[q1,rn]=Wn(Gi),[L9,Yi]=Wn(Gi),Y1=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:o,onOpenChange:i,modal:a=!0}=e,s=qi(t),[l,c]=d.useState(null),u=d.useRef(!1),f=ot(i),p=Jl(o);return d.useEffect(()=>{const v=()=>{u.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>u.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),b.jsx(Ki,{...s,children:b.jsx(q1,{scope:t,open:r,onOpenChange:f,content:l,onContentChange:c,children:b.jsx(L9,{scope:t,onClose:d.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:u,dir:p,modal:a,children:n})})})};Y1.displayName=Gi;var F9="MenuAnchor",rm=d.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,o=qi(r);return b.jsx(Ui,{...o,...n,ref:t})});rm.displayName=F9;var nm="MenuPortal",[z9,X1]=Wn(nm,{forceMount:void 0}),Z1=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:o}=e,i=rn(nm,t);return b.jsx(z9,{scope:t,forceMount:r,children:b.jsx(pt,{present:r||i.open,children:b.jsx(Rn,{asChild:!0,container:o,children:n})})})};Z1.displayName=nm;var Nt="MenuContent",[B9,om]=Wn(Nt),J1=d.forwardRef((e,t)=>{const r=X1(Nt,e.__scopeMenu),{forceMount:n=r.forceMount,...o}=e,i=rn(Nt,e.__scopeMenu),a=Yi(Nt,e.__scopeMenu);return b.jsx(di.Provider,{scope:e.__scopeMenu,children:b.jsx(pt,{present:n||i.open,children:b.jsx(di.Slot,{scope:e.__scopeMenu,children:a.modal?b.jsx(V9,{...o,ref:t}):b.jsx(W9,{...o,ref:t})})})})}),V9=d.forwardRef((e,t)=>{const r=rn(Nt,e.__scopeMenu),n=d.useRef(null),o=oe(t,n);return d.useEffect(()=>{const i=n.current;if(i)return Js(i)},[]),b.jsx(im,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:U(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),W9=d.forwardRef((e,t)=>{const r=rn(Nt,e.__scopeMenu);return b.jsx(im,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),K9=C9("MenuContent.ScrollLock"),im=d.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEntryFocus:l,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:p,onDismiss:v,disableOutsideScroll:g,...m}=e,h=rn(Nt,r),y=Yi(Nt,r),x=qi(r),w=G1(r),P=R9(r),[O,S]=d.useState(null),E=d.useRef(null),C=oe(t,E,h.onContentChange),j=d.useRef(0),D=d.useRef(""),R=d.useRef(0),_=d.useRef(null),k=d.useRef("right"),I=d.useRef(0),V=g?yi:d.Fragment,z=g?{as:K9,allowPinchZoom:!0}:void 0,K=N=>{const G=D.current+N,Q=P().filter(W=>!W.disabled),te=document.activeElement,ne=Q.find(W=>W.ref.current===te)?.textValue,re=Q.map(W=>W.textValue),le=rX(re,G,ne),Oe=Q.find(W=>W.textValue===le)?.ref.current;(function W(ue){D.current=ue,window.clearTimeout(j.current),ue!==""&&(j.current=window.setTimeout(()=>W(""),1e3))})(G),Oe&&setTimeout(()=>Oe.focus())};d.useEffect(()=>()=>window.clearTimeout(j.current),[]),Xs();const T=d.useCallback(N=>k.current===_.current?.side&&oX(N,_.current?.area),[]);return b.jsx(B9,{scope:r,searchRef:D,onItemEnter:d.useCallback(N=>{T(N)&&N.preventDefault()},[T]),onItemLeave:d.useCallback(N=>{T(N)||(E.current?.focus(),S(null))},[T]),onTriggerLeave:d.useCallback(N=>{T(N)&&N.preventDefault()},[T]),pointerGraceTimerRef:R,onPointerGraceIntentChange:d.useCallback(N=>{_.current=N},[]),children:b.jsx(V,{...z,children:b.jsx(gi,{asChild:!0,trapped:o,onMountAutoFocus:U(i,N=>{N.preventDefault(),E.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:b.jsx(Dn,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:p,onDismiss:v,children:b.jsx(K1,{asChild:!0,...w,dir:y.dir,orientation:"vertical",loop:n,currentTabStopId:O,onCurrentTabStopIdChange:S,onEntryFocus:U(l,N=>{y.isUsingKeyboardRef.current||N.preventDefault()}),preventScrollOnEntryFocus:!0,children:b.jsx(nc,{role:"menu","aria-orientation":"vertical","data-state":mA(h.open),"data-radix-menu-content":"",dir:y.dir,...x,...m,ref:C,style:{outline:"none",...m.style},onKeyDown:U(m.onKeyDown,N=>{const Q=N.target.closest("[data-radix-menu-content]")===N.currentTarget,te=N.ctrlKey||N.altKey||N.metaKey,ne=N.key.length===1;Q&&(N.key==="Tab"&&N.preventDefault(),!te&&ne&&K(N.key));const re=E.current;if(N.target!==re||!N9.includes(N.key))return;N.preventDefault();const Oe=P().filter(W=>!W.disabled).map(W=>W.ref.current);H1.includes(N.key)&&Oe.reverse(),eX(Oe)}),onBlur:U(e.onBlur,N=>{N.currentTarget.contains(N.target)||(window.clearTimeout(j.current),D.current="")}),onPointerMove:U(e.onPointerMove,pi(N=>{const G=N.target,Q=I.current!==N.clientX;if(N.currentTarget.contains(G)&&Q){const te=N.clientX>I.current?"right":"left";k.current=te,I.current=N.clientX}}))})})})})})})});J1.displayName=Nt;var U9="MenuGroup",am=d.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return b.jsx(ee.div,{role:"group",...n,ref:t})});am.displayName=U9;var H9="MenuLabel",Q1=d.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return b.jsx(ee.div,{...n,ref:t})});Q1.displayName=H9;var Gs="MenuItem",vw="menu.itemSelect",sc=d.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...o}=e,i=d.useRef(null),a=Yi(Gs,e.__scopeMenu),s=om(Gs,e.__scopeMenu),l=oe(t,i),c=d.useRef(!1),u=()=>{const f=i.current;if(!r&&f){const p=new CustomEvent(vw,{bubbles:!0,cancelable:!0});f.addEventListener(vw,v=>n?.(v),{once:!0}),Id(f,p),p.defaultPrevented?c.current=!1:a.onClose()}};return b.jsx(eA,{...o,ref:l,disabled:r,onClick:U(e.onClick,u),onPointerDown:f=>{e.onPointerDown?.(f),c.current=!0},onPointerUp:U(e.onPointerUp,f=>{c.current||f.currentTarget?.click()}),onKeyDown:U(e.onKeyDown,f=>{const p=s.searchRef.current!=="";r||p&&f.key===" "||Sd.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});sc.displayName=Gs;var eA=d.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:o,...i}=e,a=om(Gs,r),s=G1(r),l=d.useRef(null),c=oe(t,l),[u,f]=d.useState(!1),[p,v]=d.useState("");return d.useEffect(()=>{const g=l.current;g&&v((g.textContent??"").trim())},[i.children]),b.jsx(di.ItemSlot,{scope:r,disabled:n,textValue:o??p,children:b.jsx(U1,{asChild:!0,...s,focusable:!n,children:b.jsx(ee.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...i,ref:c,onPointerMove:U(e.onPointerMove,pi(g=>{n?a.onItemLeave(g):(a.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:U(e.onPointerLeave,pi(g=>a.onItemLeave(g))),onFocus:U(e.onFocus,()=>f(!0)),onBlur:U(e.onBlur,()=>f(!1))})})})}),G9="MenuCheckboxItem",tA=d.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...o}=e;return b.jsx(aA,{scope:e.__scopeMenu,checked:r,children:b.jsx(sc,{role:"menuitemcheckbox","aria-checked":qs(r)?"mixed":r,...o,ref:t,"data-state":cm(r),onSelect:U(o.onSelect,()=>n?.(qs(r)?!0:!r),{checkForDefaultPrevented:!1})})})});tA.displayName=G9;var rA="MenuRadioGroup",[q9,Y9]=Wn(rA,{value:void 0,onValueChange:()=>{}}),nA=d.forwardRef((e,t)=>{const{value:r,onValueChange:n,...o}=e,i=ot(n);return b.jsx(q9,{scope:e.__scopeMenu,value:r,onValueChange:i,children:b.jsx(am,{...o,ref:t})})});nA.displayName=rA;var oA="MenuRadioItem",iA=d.forwardRef((e,t)=>{const{value:r,...n}=e,o=Y9(oA,e.__scopeMenu),i=r===o.value;return b.jsx(aA,{scope:e.__scopeMenu,checked:i,children:b.jsx(sc,{role:"menuitemradio","aria-checked":i,...n,ref:t,"data-state":cm(i),onSelect:U(n.onSelect,()=>o.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});iA.displayName=oA;var sm="MenuItemIndicator",[aA,X9]=Wn(sm,{checked:!1}),sA=d.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...o}=e,i=X9(sm,r);return b.jsx(pt,{present:n||qs(i.checked)||i.checked===!0,children:b.jsx(ee.span,{...o,ref:t,"data-state":cm(i.checked)})})});sA.displayName=sm;var Z9="MenuSeparator",lA=d.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return b.jsx(ee.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});lA.displayName=Z9;var J9="MenuArrow",cA=d.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,o=qi(r);return b.jsx(oc,{...o,...n,ref:t})});cA.displayName=J9;var lm="MenuSub",[Q9,uA]=Wn(lm),fA=e=>{const{__scopeMenu:t,children:r,open:n=!1,onOpenChange:o}=e,i=rn(lm,t),a=qi(t),[s,l]=d.useState(null),[c,u]=d.useState(null),f=ot(o);return d.useEffect(()=>(i.open===!1&&f(!1),()=>f(!1)),[i.open,f]),b.jsx(Ki,{...a,children:b.jsx(q1,{scope:t,open:n,onOpenChange:f,content:c,onContentChange:u,children:b.jsx(Q9,{scope:t,contentId:St(),triggerId:St(),trigger:s,onTriggerChange:l,children:r})})})};fA.displayName=lm;var Ho="MenuSubTrigger",dA=d.forwardRef((e,t)=>{const r=rn(Ho,e.__scopeMenu),n=Yi(Ho,e.__scopeMenu),o=uA(Ho,e.__scopeMenu),i=om(Ho,e.__scopeMenu),a=d.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:l}=i,c={__scopeMenu:e.__scopeMenu},u=d.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return d.useEffect(()=>u,[u]),d.useEffect(()=>{const f=s.current;return()=>{window.clearTimeout(f),l(null)}},[s,l]),b.jsx(rm,{asChild:!0,...c,children:b.jsx(eA,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":o.contentId,"data-state":mA(r.open),...e,ref:lr(t,o.onTriggerChange),onClick:f=>{e.onClick?.(f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:U(e.onPointerMove,pi(f=>{i.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!r.open&&!a.current&&(i.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{r.onOpenChange(!0),u()},100))})),onPointerLeave:U(e.onPointerLeave,pi(f=>{u();const p=r.content?.getBoundingClientRect();if(p){const v=r.content?.dataset.side,g=v==="right",m=g?-5:5,h=p[g?"left":"right"],y=p[g?"right":"left"];i.onPointerGraceIntentChange({area:[{x:f.clientX+m,y:f.clientY},{x:h,y:p.top},{x:y,y:p.top},{x:y,y:p.bottom},{x:h,y:p.bottom}],side:v}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(f),f.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:U(e.onKeyDown,f=>{const p=i.searchRef.current!=="";e.disabled||p&&f.key===" "||I9[n.dir].includes(f.key)&&(r.onOpenChange(!0),r.content?.focus(),f.preventDefault())})})})});dA.displayName=Ho;var pA="MenuSubContent",vA=d.forwardRef((e,t)=>{const r=X1(Nt,e.__scopeMenu),{forceMount:n=r.forceMount,...o}=e,i=rn(Nt,e.__scopeMenu),a=Yi(Nt,e.__scopeMenu),s=uA(pA,e.__scopeMenu),l=d.useRef(null),c=oe(t,l);return b.jsx(di.Provider,{scope:e.__scopeMenu,children:b.jsx(pt,{present:n||i.open,children:b.jsx(di.Slot,{scope:e.__scopeMenu,children:b.jsx(im,{id:s.contentId,"aria-labelledby":s.triggerId,...o,ref:c,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{a.isUsingKeyboardRef.current&&l.current?.focus(),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:U(e.onFocusOutside,u=>{u.target!==s.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:U(e.onEscapeKeyDown,u=>{a.onClose(),u.preventDefault()}),onKeyDown:U(e.onKeyDown,u=>{const f=u.currentTarget.contains(u.target),p=D9[a.dir].includes(u.key);f&&p&&(i.onOpenChange(!1),s.trigger?.focus(),u.preventDefault())})})})})})});vA.displayName=pA;function mA(e){return e?"open":"closed"}function qs(e){return e==="indeterminate"}function cm(e){return qs(e)?"indeterminate":e?"checked":"unchecked"}function eX(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function tX(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function rX(e,t,r){const o=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,i=r?e.indexOf(r):-1;let a=tX(e,Math.max(i,0));o.length===1&&(a=a.filter(c=>c!==r));const l=a.find(c=>c.toLowerCase().startsWith(o.toLowerCase()));return l!==r?l:void 0}function nX(e,t){const{x:r,y:n}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const s=t[i],l=t[a],c=s.x,u=s.y,f=l.x,p=l.y;u>n!=p>n&&r<(f-c)*(n-u)/(p-u)+c&&(o=!o)}return o}function oX(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return nX(r,t)}function pi(e){return t=>t.pointerType==="mouse"?e(t):void 0}var hA=Y1,gA=rm,yA=Z1,bA=J1,xA=am,wA=Q1,PA=sc,SA=tA,OA=nA,EA=iA,CA=sA,AA=lA,_A=cA,TA=fA,MA=dA,jA=vA,um="ContextMenu",[iX]=it(um,[ac]),st=ac(),[aX,kA]=iX(um),NA=e=>{const{__scopeContextMenu:t,children:r,onOpenChange:n,dir:o,modal:i=!0}=e,[a,s]=d.useState(!1),l=st(t),c=ot(n),u=d.useCallback(f=>{s(f),c(f)},[c]);return b.jsx(aX,{scope:t,open:a,onOpenChange:u,modal:i,children:b.jsx(hA,{...l,dir:o,open:a,onOpenChange:u,modal:i,children:r})})};NA.displayName=um;var IA="ContextMenuTrigger",DA=d.forwardRef((e,t)=>{const{__scopeContextMenu:r,disabled:n=!1,...o}=e,i=kA(IA,r),a=st(r),s=d.useRef({x:0,y:0}),l=d.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...s.current})}),c=d.useRef(0),u=d.useCallback(()=>window.clearTimeout(c.current),[]),f=p=>{s.current={x:p.clientX,y:p.clientY},i.onOpenChange(!0)};return d.useEffect(()=>u,[u]),d.useEffect(()=>{n&&u()},[n,u]),b.jsxs(b.Fragment,{children:[b.jsx(gA,{...a,virtualRef:l}),b.jsx(ee.span,{"data-state":i.open?"open":"closed","data-disabled":n?"":void 0,...o,ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:n?e.onContextMenu:U(e.onContextMenu,p=>{u(),f(p),p.preventDefault()}),onPointerDown:n?e.onPointerDown:U(e.onPointerDown,ka(p=>{u(),c.current=window.setTimeout(()=>f(p),700)})),onPointerMove:n?e.onPointerMove:U(e.onPointerMove,ka(u)),onPointerCancel:n?e.onPointerCancel:U(e.onPointerCancel,ka(u)),onPointerUp:n?e.onPointerUp:U(e.onPointerUp,ka(u))})]})});DA.displayName=IA;var sX="ContextMenuPortal",RA=e=>{const{__scopeContextMenu:t,...r}=e,n=st(t);return b.jsx(yA,{...n,...r})};RA.displayName=sX;var $A="ContextMenuContent",LA=d.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,o=kA($A,r),i=st(r),a=d.useRef(!1);return b.jsx(bA,{...i,...n,ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),!s.defaultPrevented&&a.current&&s.preventDefault(),a.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),!s.defaultPrevented&&!o.modal&&(a.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});LA.displayName=$A;var lX="ContextMenuGroup",FA=d.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,o=st(r);return b.jsx(xA,{...o,...n,ref:t})});FA.displayName=lX;var cX="ContextMenuLabel",zA=d.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,o=st(r);return b.jsx(wA,{...o,...n,ref:t})});zA.displayName=cX;var uX="ContextMenuItem",BA=d.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,o=st(r);return b.jsx(PA,{...o,...n,ref:t})});BA.displayName=uX;var fX="ContextMenuCheckboxItem",VA=d.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,o=st(r);return b.jsx(SA,{...o,...n,ref:t})});VA.displayName=fX;var dX="ContextMenuRadioGroup",WA=d.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,o=st(r);return b.jsx(OA,{...o,...n,ref:t})});WA.displayName=dX;var pX="ContextMenuRadioItem",KA=d.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,o=st(r);return b.jsx(EA,{...o,...n,ref:t})});KA.displayName=pX;var vX="ContextMenuItemIndicator",UA=d.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,o=st(r);return b.jsx(CA,{...o,...n,ref:t})});UA.displayName=vX;var mX="ContextMenuSeparator",HA=d.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,o=st(r);return b.jsx(AA,{...o,...n,ref:t})});HA.displayName=mX;var hX="ContextMenuArrow",gX=d.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,o=st(r);return b.jsx(_A,{...o,...n,ref:t})});gX.displayName=hX;var GA="ContextMenuSub",qA=e=>{const{__scopeContextMenu:t,children:r,onOpenChange:n,open:o,defaultOpen:i}=e,a=st(t),[s,l]=Et({prop:o,defaultProp:i??!1,onChange:n,caller:GA});return b.jsx(TA,{...a,open:s,onOpenChange:l,children:r})};qA.displayName=GA;var yX="ContextMenuSubTrigger",YA=d.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,o=st(r);return b.jsx(MA,{...o,...n,ref:t})});YA.displayName=yX;var bX="ContextMenuSubContent",XA=d.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,o=st(r);return b.jsx(jA,{...o,...n,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});XA.displayName=bX;function ka(e){return t=>t.pointerType!=="mouse"?e(t):void 0}var xX=NA,wX=DA,PX=RA,SX=LA,OX=FA,EX=zA,CX=BA,AX=VA,_X=WA,TX=KA,ZA=UA,MX=HA,jX=qA,kX=YA,NX=XA;const IX=xX,DX=wX,RX=OX,JA=PX,$X=jX,LX=_X,QA=d.forwardRef(({className:e,inset:t,children:r,...n},o)=>b.jsxs(kX,{ref:o,className:B("text-body flex cursor-default items-center rounded-sm px-2 py-1.5 outline-none select-none","focus:bg-vanilla focus:text-primary","data-[state=open]:bg-vanilla data-[state=open]:text-primary",t&&"pl-8",e),...n,children:[r,b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"ml-auto h-4 w-4",children:b.jsx("path",{d:"m9 18 6-6-6-6"})})]}));QA.displayName="ContextMenuSubTrigger";const e_=d.forwardRef(({className:e,...t},r)=>b.jsx(NX,{ref:r,className:B("border-border bg-card text-primary z-50 min-w-32 overflow-hidden rounded-md border p-1 font-sans shadow-lg","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-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",e),...t}));e_.displayName="ContextMenuSubContent";const t_=d.forwardRef(({className:e,...t},r)=>b.jsx(JA,{children:b.jsx(SX,{ref:r,className:B("border-border bg-card text-primary z-50 min-w-32 overflow-hidden rounded-md border p-1 font-sans shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-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",e),...t})}));t_.displayName="ContextMenuContent";const r_=d.forwardRef(({className:e,inset:t,...r},n)=>b.jsx(CX,{ref:n,className:B("text-body relative flex cursor-default items-center rounded-sm px-2 py-1.5 outline-none select-none","focus:bg-vanilla focus:text-primary","data-disabled:pointer-events-none data-disabled:opacity-50",t&&"pl-8",e),...r}));r_.displayName="ContextMenuItem";const n_=d.forwardRef(({className:e,children:t,checked:r,...n},o)=>b.jsxs(AX,{ref:o,className:B("text-body relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 outline-none select-none","focus:bg-vanilla focus:text-primary","data-disabled:pointer-events-none data-disabled:opacity-50",e),checked:r,...n,children:[b.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:b.jsx(ZA,{children:b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:b.jsx("path",{d:"M20 6 9 17l-5-5"})})})}),t]}));n_.displayName="ContextMenuCheckboxItem";const o_=d.forwardRef(({className:e,children:t,...r},n)=>b.jsxs(TX,{ref:n,className:B("text-body relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 outline-none select-none","focus:bg-vanilla focus:text-primary","data-disabled:pointer-events-none data-disabled:opacity-50",e),...r,children:[b.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:b.jsx(ZA,{children:b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-2 w-2 fill-current",children:b.jsx("circle",{cx:"12",cy:"12",r:"10"})})})}),t]}));o_.displayName="ContextMenuRadioItem";const i_=d.forwardRef(({className:e,inset:t,...r},n)=>b.jsx(EX,{ref:n,className:B("text-small text-primary px-2 py-1.5",t&&"pl-8",e),...r}));i_.displayName="ContextMenuLabel";const a_=d.forwardRef(({className:e,...t},r)=>b.jsx(MX,{ref:r,className:B("bg-border -mx-1 my-1 h-px",e),...t}));a_.displayName="ContextMenuSeparator";const s_=d.forwardRef(({className:e,...t},r)=>b.jsx("span",{ref:r,className:B("text-small text-tertiary ml-auto tracking-widest",e),...t}));s_.displayName="ContextMenuShortcut";function FX(e){const t=zX(e),r=d.forwardRef((n,o)=>{const{children:i,...a}=n,s=d.Children.toArray(i),l=s.find(VX);if(l){const c=l.props.children,u=s.map(f=>f===l?d.Children.count(c)>1?d.Children.only(null):d.isValidElement(c)?c.props.children:null:f);return b.jsx(t,{...a,ref:o,children:d.isValidElement(c)?d.cloneElement(c,void 0,u):null})}return b.jsx(t,{...a,ref:o,children:i})});return r.displayName=`${e}.Slot`,r}function zX(e){const t=d.forwardRef((r,n)=>{const{children:o,...i}=r;if(d.isValidElement(o)){const a=KX(o),s=WX(i,o.props);return o.type!==d.Fragment&&(s.ref=n?lr(n,a):a),d.cloneElement(o,s)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var BX=Symbol("radix.slottable");function VX(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===BX}function WX(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...s)=>{const l=i(...s);return o(...s),l}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}function KX(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var lc="Popover",[l_]=it(lc,[tn]),Xi=tn(),[UX,nn]=l_(lc),c_=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:i,modal:a=!1}=e,s=Xi(t),l=d.useRef(null),[c,u]=d.useState(!1),[f,p]=Et({prop:n,defaultProp:o??!1,onChange:i,caller:lc});return b.jsx(Ki,{...s,children:b.jsx(UX,{scope:t,contentId:St(),triggerRef:l,open:f,onOpenChange:p,onOpenToggle:d.useCallback(()=>p(v=>!v),[p]),hasCustomAnchor:c,onCustomAnchorAdd:d.useCallback(()=>u(!0),[]),onCustomAnchorRemove:d.useCallback(()=>u(!1),[]),modal:a,children:r})})};c_.displayName=lc;var u_="PopoverAnchor",HX=d.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=nn(u_,r),i=Xi(r),{onCustomAnchorAdd:a,onCustomAnchorRemove:s}=o;return d.useEffect(()=>(a(),()=>s()),[a,s]),b.jsx(Ui,{...i,...n,ref:t})});HX.displayName=u_;var f_="PopoverTrigger",d_=d.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=nn(f_,r),i=Xi(r),a=oe(t,o.triggerRef),s=b.jsx(ee.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":g_(o.open),...n,ref:a,onClick:U(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?s:b.jsx(Ui,{asChild:!0,...i,children:s})});d_.displayName=f_;var fm="PopoverPortal",[GX,qX]=l_(fm,{forceMount:void 0}),p_=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,i=nn(fm,t);return b.jsx(GX,{scope:t,forceMount:r,children:b.jsx(pt,{present:r||i.open,children:b.jsx(Rn,{asChild:!0,container:o,children:n})})})};p_.displayName=fm;var vo="PopoverContent",v_=d.forwardRef((e,t)=>{const r=qX(vo,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,i=nn(vo,e.__scopePopover);return b.jsx(pt,{present:n||i.open,children:i.modal?b.jsx(XX,{...o,ref:t}):b.jsx(ZX,{...o,ref:t})})});v_.displayName=vo;var YX=FX("PopoverContent.RemoveScroll"),XX=d.forwardRef((e,t)=>{const r=nn(vo,e.__scopePopover),n=d.useRef(null),o=oe(t,n),i=d.useRef(!1);return d.useEffect(()=>{const a=n.current;if(a)return Js(a)},[]),b.jsx(yi,{as:YX,allowPinchZoom:!0,children:b.jsx(m_,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:U(e.onCloseAutoFocus,a=>{a.preventDefault(),i.current||r.triggerRef.current?.focus()}),onPointerDownOutside:U(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0,c=s.button===2||l;i.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:U(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),ZX=d.forwardRef((e,t)=>{const r=nn(vo,e.__scopePopover),n=d.useRef(!1),o=d.useRef(!1);return b.jsx(m_,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),i.defaultPrevented||(n.current||r.triggerRef.current?.focus(),i.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=i.target;r.triggerRef.current?.contains(a)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),m_=d.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,...f}=e,p=nn(vo,r),v=Xi(r);return Xs(),b.jsx(gi,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i,children:b.jsx(Dn,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>p.onOpenChange(!1),children:b.jsx(nc,{"data-state":g_(p.open),role:"dialog",id:p.contentId,...v,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),h_="PopoverClose",JX=d.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=nn(h_,r);return b.jsx(ee.button,{type:"button",...n,ref:t,onClick:U(e.onClick,()=>o.onOpenChange(!1))})});JX.displayName=h_;var QX="PopoverArrow",e7=d.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=Xi(r);return b.jsx(oc,{...o,...n,ref:t})});e7.displayName=QX;function g_(e){return e?"open":"closed"}var y_=c_,b_=d_,x_=p_,w_=v_;const P_=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();const t7=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const r7=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase());const mw=e=>{const t=r7(e);return t.charAt(0).toUpperCase()+t.slice(1)};var n7={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"};const o7=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const i7=A.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:i,iconNode:a,...s},l)=>A.createElement("svg",{ref:l,...n7,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:P_("lucide",o),...!i&&!o7(s)&&{"aria-hidden":"true"},...s},[...a.map(([c,u])=>A.createElement(c,u)),...Array.isArray(i)?i:[i]]));const Mo=(e,t)=>{const r=A.forwardRef(({className:n,...o},i)=>A.createElement(i7,{ref:i,iconNode:t,className:P_(`lucide-${t7(mw(e))}`,`lucide-${e}`,n),...o}));return r.displayName=mw(e),r};const a7=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],S_=Mo("calendar",a7);const s7=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],O_=Mo("chevron-left",s7);const l7=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],E_=Mo("chevron-right",l7);const c7=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],u7=Mo("clock",c7);const f7=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],d7=Mo("ellipsis",f7);const p7=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],C_=Mo("x",p7),v7=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],hw=["January","February","March","April","May","June","July","August","September","October","November","December"];function gw(e,t){return new Date(e,t+1,0).getDate()}function m7(e,t){return new Date(e,t,1).getDay()}function A_(e,t){return e?e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate():!1}function h7(e){return A_(new Date,e)}function yw(e,t="yyyy-MM-dd"){if(!e)return"";const r=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0"),o=e.getFullYear();return t.replace("yyyy",String(o)).replace("MM",r).replace("dd",n)}const __=ie(["bg-card text-body text-primary placeholder:text-tertiary","flex h-10 w-full items-center justify-between rounded-md border px-3 py-2","font-sans transition-colors","focus-visible:ring-sunflower focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none","disabled:cursor-not-allowed disabled:opacity-50"],{variants:{variant:{default:"border-border",error:"border-error"}},defaultVariants:{variant:"default"}}),T_=ie(["inline-flex h-9 w-9 items-center justify-center rounded-full text-sm","transition-colors focus-visible:outline-none","focus-visible:ring-sunflower focus-visible:ring-2 focus-visible:ring-offset-1"],{variants:{state:{default:"hover:bg-sunflower text-primary",selected:"bg-sunflower text-primary font-medium",today:"hover:bg-sunflower border-sunflower text-primary border",disabled:"text-tertiary cursor-not-allowed opacity-50",outside:"text-tertiary opacity-50"}},defaultVariants:{state:"default"}}),M_=d.forwardRef(({value:e,onChange:t,placeholder:r="Select a date",format:n="MM/dd/yyyy",minDate:o,maxDate:i,disabled:a=!1,variant:s,className:l,id:c,name:u,"aria-label":f,"aria-describedby":p},v)=>{const[g,m]=d.useState(!1),[h,y]=d.useState(()=>e||new Date),x=h.getFullYear(),w=h.getMonth(),P=gw(x,w),O=m7(x,w),S=d.useMemo(()=>{const _=[],k=w===0?11:w-1,I=w===0?x-1:x,V=gw(I,k);for(let N=O-1;N>=0;N--)_.push({date:new Date(I,k,V-N),isOutside:!0});for(let N=1;N<=P;N++)_.push({date:new Date(x,w,N),isOutside:!1});const z=42-_.length,K=w===11?0:w+1,T=w===11?x+1:x;for(let N=1;N<=z;N++)_.push({date:new Date(T,K,N),isOutside:!0});return _},[x,w,P,O]),E=()=>{y(new Date(x,w-1,1))},C=()=>{y(new Date(x,w+1,1))},j=_=>{t?.(_),m(!1)},D=_=>!!(o&&_<new Date(o.setHours(0,0,0,0))||i&&_>new Date(i.setHours(23,59,59,999))),R=(_,k)=>D(_)?"disabled":k?"outside":e&&A_(e,_)?"selected":h7(_)?"today":"default";return d.useEffect(()=>{e&&y(e)},[e]),b.jsxs(y_,{open:g,onOpenChange:m,children:[b.jsx(b_,{asChild:!0,children:b.jsxs("button",{ref:v,id:c,type:"button",disabled:a,className:B(__({variant:s}),l),"aria-label":f||"Choose date","aria-describedby":p,"aria-haspopup":"dialog","aria-expanded":g,children:[b.jsx("span",{className:B("truncate",!e&&"text-tertiary"),children:e?yw(e,n):r}),b.jsx(S_,{className:"text-tertiary h-4 w-4 shrink-0"}),u&&b.jsx("input",{type:"hidden",name:u,value:e?yw(e,"yyyy-MM-dd"):""})]})}),b.jsx(x_,{children:b.jsxs(w_,{className:B("bg-main border-border z-50 w-auto rounded-lg border p-4 shadow-lg","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2","data-[side=top]:slide-in-from-bottom-2"),sideOffset:4,align:"start",children:[b.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[b.jsx("button",{type:"button",onClick:E,className:B("hover:bg-alt focus-visible:ring-sunflower inline-flex h-8 w-8 items-center justify-center rounded-full","transition-colors focus-visible:ring-2 focus-visible:outline-none"),"aria-label":"Previous month",children:b.jsx(O_,{className:"h-4 w-4"})}),b.jsxs("span",{className:"text-primary text-sm font-medium",children:[hw[w]," ",x]}),b.jsx("button",{type:"button",onClick:C,className:B("hover:bg-alt focus-visible:ring-sunflower inline-flex h-8 w-8 items-center justify-center rounded-full","transition-colors focus-visible:ring-2 focus-visible:outline-none"),"aria-label":"Next month",children:b.jsx(E_,{className:"h-4 w-4"})})]}),b.jsx("div",{className:"mb-2 grid grid-cols-7 gap-1",children:v7.map(_=>b.jsx("div",{className:"text-tertiary text-center text-xs font-medium",children:_},_))}),b.jsx("div",{className:"grid grid-cols-7 gap-1",role:"grid","aria-label":`${hw[w]} ${x}`,children:S.map(({date:_,isOutside:k},I)=>{const V=R(_,k),z=V==="disabled";return b.jsx("button",{type:"button",onClick:()=>!z&&j(_),disabled:z,className:T_({state:V}),"aria-label":_.toLocaleDateString("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric"}),"aria-selected":V==="selected",tabIndex:k?-1:0,children:_.getDate()},I)})}),b.jsx("div",{className:"border-border mt-4 border-t pt-4",children:b.jsx("button",{type:"button",onClick:()=>j(new Date),className:B("text-sunflower hover:text-sunflower-hover w-full text-center text-sm font-medium","transition-colors focus-visible:underline focus-visible:outline-none"),children:"Today"})})]})})]})});M_.displayName="DatePicker";const g7=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],bw=["January","February","March","April","May","June","July","August","September","October","November","December"];function xw(e,t){return new Date(e,t+1,0).getDate()}function y7(e,t){return new Date(e,t,1).getDay()}function j_(e,t){return e?e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate():!1}function b7(e){return j_(new Date,e)}function x7(e,t="yyyy-MM-dd",r=!0){if(!e)return"";const n=String(e.getMonth()+1).padStart(2,"0"),o=String(e.getDate()).padStart(2,"0"),i=e.getFullYear(),a=e.getHours(),s=a%12||12,l=r?String(a).padStart(2,"0"):String(s).padStart(2,"0"),c=String(e.getMinutes()).padStart(2,"0"),u=a>=12?"PM":"AM";return t.replace("yyyy",String(i)).replace("MM",n).replace("dd",o).replace("HH",String(a).padStart(2,"0")).replace("hh",l).replace("mm",c).replace("a",u)}function ww(e){const t=e.match(/^(\d{1,2}):(\d{2})$/);return t&&t[1]&&t[2]?{hours:Math.min(23,Math.max(0,parseInt(t[1],10))),minutes:Math.min(59,Math.max(0,parseInt(t[2],10)))}:{hours:0,minutes:0}}const k_=ie(["bg-card text-body text-primary placeholder:text-tertiary","flex h-10 w-full items-center justify-between rounded-md border px-3 py-2","font-sans transition-colors","focus-visible:ring-sunflower focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none","disabled:cursor-not-allowed disabled:opacity-50"],{variants:{variant:{default:"border-border",error:"border-error"}},defaultVariants:{variant:"default"}}),N_=ie(["inline-flex h-9 w-9 items-center justify-center rounded-full text-sm","transition-colors focus-visible:outline-none","focus-visible:ring-sunflower focus-visible:ring-2 focus-visible:ring-offset-1"],{variants:{state:{default:"hover:bg-sunflower text-primary",selected:"bg-sunflower text-primary font-medium",today:"hover:bg-sunflower border-sunflower text-primary border",disabled:"text-tertiary cursor-not-allowed opacity-50",outside:"text-tertiary opacity-50"}},defaultVariants:{state:"default"}}),I_=d.forwardRef(({value:e,onChange:t,placeholder:r="Select date and time",format:n="yyyy-MM-dd HH:mm",minDate:o,maxDate:i,disabled:a=!1,variant:s,className:l,id:c,name:u,use24Hour:f=!0,minuteStep:p=1,"aria-label":v,"aria-describedby":g},m)=>{const[h,y]=d.useState(!1),[x,w]=d.useState(()=>e||new Date),[P,O]=d.useState(()=>e?`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`:"12:00"),S=x.getFullYear(),E=x.getMonth(),C=xw(S,E),j=y7(S,E),D=d.useMemo(()=>{const T=[],N=E===0?11:E-1,G=E===0?S-1:S,Q=xw(G,N);for(let le=j-1;le>=0;le--)T.push({date:new Date(G,N,Q-le),isOutside:!0});for(let le=1;le<=C;le++)T.push({date:new Date(S,E,le),isOutside:!1});const te=42-T.length,ne=E===11?0:E+1,re=E===11?S+1:S;for(let le=1;le<=te;le++)T.push({date:new Date(re,ne,le),isOutside:!0});return T},[S,E,C,j]),R=()=>{w(new Date(S,E-1,1))},_=()=>{w(new Date(S,E+1,1))},k=T=>{const{hours:N,minutes:G}=ww(P),Q=new Date(T.getFullYear(),T.getMonth(),T.getDate(),N,G);t?.(Q)},I=T=>{const N=T.target.value;if(O(N),e){const{hours:G,minutes:Q}=ww(N),te=new Date(e);te.setHours(G,Q),t?.(te)}},V=()=>{const T=new Date;O(`${String(T.getHours()).padStart(2,"0")}:${String(T.getMinutes()).padStart(2,"0")}`),t?.(T),y(!1)},z=T=>!!(o&&T<new Date(o.setHours(0,0,0,0))||i&&T>new Date(i.setHours(23,59,59,999))),K=(T,N)=>z(T)?"disabled":N?"outside":e&&j_(e,T)?"selected":b7(T)?"today":"default";return d.useEffect(()=>{e&&(w(e),O(`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`))},[e]),b.jsxs(y_,{open:h,onOpenChange:y,children:[b.jsx(b_,{asChild:!0,children:b.jsxs("button",{ref:m,id:c,type:"button",disabled:a,className:B(k_({variant:s}),l),"aria-label":v||"Choose date and time","aria-describedby":g,"aria-haspopup":"dialog","aria-expanded":h,children:[b.jsx("span",{className:B("truncate",!e&&"text-tertiary"),children:e?x7(e,n,f):r}),b.jsxs("div",{className:"flex items-center gap-1",children:[b.jsx(u7,{className:"text-tertiary h-4 w-4 shrink-0"}),b.jsx(S_,{className:"text-tertiary h-4 w-4 shrink-0"})]}),u&&b.jsx("input",{type:"hidden",name:u,value:e?e.toISOString():""})]})}),b.jsx(x_,{children:b.jsxs(w_,{className:B("bg-main border-border z-50 w-auto rounded-lg border p-4 shadow-lg","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2","data-[side=top]:slide-in-from-bottom-2"),sideOffset:4,align:"start",children:[b.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[b.jsx("button",{type:"button",onClick:R,className:B("hover:bg-alt focus-visible:ring-sunflower inline-flex h-8 w-8 items-center justify-center rounded-full","transition-colors focus-visible:ring-2 focus-visible:outline-none"),"aria-label":"Previous month",children:b.jsx(O_,{className:"h-4 w-4"})}),b.jsxs("span",{className:"text-primary text-sm font-medium",children:[bw[E]," ",S]}),b.jsx("button",{type:"button",onClick:_,className:B("hover:bg-alt focus-visible:ring-sunflower inline-flex h-8 w-8 items-center justify-center rounded-full","transition-colors focus-visible:ring-2 focus-visible:outline-none"),"aria-label":"Next month",children:b.jsx(E_,{className:"h-4 w-4"})})]}),b.jsx("div",{className:"mb-2 grid grid-cols-7 gap-1",children:g7.map(T=>b.jsx("div",{className:"text-tertiary text-center text-xs font-medium",children:T},T))}),b.jsx("div",{className:"grid grid-cols-7 gap-1",role:"grid","aria-label":`${bw[E]} ${S}`,children:D.map(({date:T,isOutside:N},G)=>{const Q=K(T,N),te=Q==="disabled";return b.jsx("button",{type:"button",onClick:()=>!te&&k(T),disabled:te,className:N_({state:Q}),"aria-label":T.toLocaleDateString("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric"}),"aria-selected":Q==="selected",tabIndex:N?-1:0,children:T.getDate()},G)})}),b.jsx("div",{className:"border-border mt-4 border-t pt-4",children:b.jsxs("div",{className:"flex items-center gap-3",children:[b.jsx("label",{htmlFor:"time-input",className:"text-secondary text-sm font-medium",children:"Time"}),b.jsx("input",{id:"time-input",type:"time",value:P,onChange:I,step:p*60,className:B("bg-card text-body text-primary border-border rounded-md border px-2 py-1","focus-visible:ring-sunflower focus-visible:ring-2 focus-visible:outline-none"),"aria-label":"Select time"})]})}),b.jsx("div",{className:"border-border mt-4 border-t pt-4",children:b.jsx("button",{type:"button",onClick:V,className:B("text-sunflower hover:text-sunflower-hover w-full text-center text-sm font-medium","transition-colors focus-visible:underline focus-visible:outline-none"),children:"Now"})})]})})]})});I_.displayName="DateTimePicker";const D_=ie("bg-border shrink-0",{variants:{orientation:{horizontal:"h-px w-full",vertical:"h-full w-px"}},defaultVariants:{orientation:"horizontal"}}),R_=d.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},o)=>{const i=t??"horizontal";return b.jsx("div",{ref:o,role:r?"none":"separator","aria-orientation":r?void 0:i,className:B(D_({orientation:i,className:e})),...n})});R_.displayName="Divider";var cc="DropdownMenu",[w7]=it(cc,[ac]),lt=ac(),[P7,$_]=w7(cc),L_=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:o,defaultOpen:i,onOpenChange:a,modal:s=!0}=e,l=lt(t),c=d.useRef(null),[u,f]=Et({prop:o,defaultProp:i??!1,onChange:a,caller:cc});return b.jsx(P7,{scope:t,triggerId:St(),triggerRef:c,contentId:St(),open:u,onOpenChange:f,onOpenToggle:d.useCallback(()=>f(p=>!p),[f]),modal:s,children:b.jsx(hA,{...l,open:u,onOpenChange:f,dir:n,modal:s,children:r})})};L_.displayName=cc;var F_="DropdownMenuTrigger",z_=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...o}=e,i=$_(F_,r),a=lt(r);return b.jsx(gA,{asChild:!0,...a,children:b.jsx(ee.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...o,ref:lr(t,i.triggerRef),onPointerDown:U(e.onPointerDown,s=>{!n&&s.button===0&&s.ctrlKey===!1&&(i.onOpenToggle(),i.open||s.preventDefault())}),onKeyDown:U(e.onKeyDown,s=>{n||(["Enter"," "].includes(s.key)&&i.onOpenToggle(),s.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});z_.displayName=F_;var S7="DropdownMenuPortal",B_=e=>{const{__scopeDropdownMenu:t,...r}=e,n=lt(t);return b.jsx(yA,{...n,...r})};B_.displayName=S7;var V_="DropdownMenuContent",W_=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=$_(V_,r),i=lt(r),a=d.useRef(!1);return b.jsx(bA,{id:o.contentId,"aria-labelledby":o.triggerId,...i,...n,ref:t,onCloseAutoFocus:U(e.onCloseAutoFocus,s=>{a.current||o.triggerRef.current?.focus(),a.current=!1,s.preventDefault()}),onInteractOutside:U(e.onInteractOutside,s=>{const l=s.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,u=l.button===2||c;(!o.modal||u)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});W_.displayName=V_;var O7="DropdownMenuGroup",K_=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=lt(r);return b.jsx(xA,{...o,...n,ref:t})});K_.displayName=O7;var E7="DropdownMenuLabel",U_=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=lt(r);return b.jsx(wA,{...o,...n,ref:t})});U_.displayName=E7;var C7="DropdownMenuItem",H_=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=lt(r);return b.jsx(PA,{...o,...n,ref:t})});H_.displayName=C7;var A7="DropdownMenuCheckboxItem",G_=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=lt(r);return b.jsx(SA,{...o,...n,ref:t})});G_.displayName=A7;var _7="DropdownMenuRadioGroup",q_=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=lt(r);return b.jsx(OA,{...o,...n,ref:t})});q_.displayName=_7;var T7="DropdownMenuRadioItem",Y_=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=lt(r);return b.jsx(EA,{...o,...n,ref:t})});Y_.displayName=T7;var M7="DropdownMenuItemIndicator",X_=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=lt(r);return b.jsx(CA,{...o,...n,ref:t})});X_.displayName=M7;var j7="DropdownMenuSeparator",Z_=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=lt(r);return b.jsx(AA,{...o,...n,ref:t})});Z_.displayName=j7;var k7="DropdownMenuArrow",N7=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=lt(r);return b.jsx(_A,{...o,...n,ref:t})});N7.displayName=k7;var I7=e=>{const{__scopeDropdownMenu:t,children:r,open:n,onOpenChange:o,defaultOpen:i}=e,a=lt(t),[s,l]=Et({prop:n,defaultProp:i??!1,onChange:o,caller:"DropdownMenuSub"});return b.jsx(TA,{...a,open:s,onOpenChange:l,children:r})},D7="DropdownMenuSubTrigger",J_=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=lt(r);return b.jsx(MA,{...o,...n,ref:t})});J_.displayName=D7;var R7="DropdownMenuSubContent",Q_=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=lt(r);return b.jsx(jA,{...o,...n,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Q_.displayName=R7;var $7=L_,eT=z_,L7=B_,F7=W_,z7=K_,B7=U_,V7=H_,W7=G_,K7=q_,U7=Y_,tT=X_,H7=Z_,G7=I7,q7=J_,Y7=Q_;const X7=$7,Z7=eT,J7=z7,rT=L7,Q7=G7,eZ=K7,nT=d.forwardRef(({className:e,inset:t,children:r,...n},o)=>b.jsxs(q7,{ref:o,className:B("text-body flex cursor-default items-center rounded-sm px-2 py-1.5 outline-none select-none","focus:bg-vanilla focus:text-primary","data-[state=open]:bg-vanilla data-[state=open]:text-primary",t&&"pl-8",e),...n,children:[r,b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"ml-auto h-4 w-4",children:b.jsx("path",{d:"m9 18 6-6-6-6"})})]}));nT.displayName="DropdownMenuSubTrigger";const oT=d.forwardRef(({className:e,...t},r)=>b.jsx(Y7,{ref:r,className:B("border-border bg-card text-primary z-50 min-w-32 overflow-hidden rounded-md border p-1 font-sans shadow-lg","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-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",e),...t}));oT.displayName="DropdownMenuSubContent";const iT=d.forwardRef(({className:e,sideOffset:t=4,...r},n)=>b.jsx(rT,{children:b.jsx(F7,{ref:n,sideOffset:t,className:B("border-border bg-card text-primary z-50 min-w-32 overflow-hidden rounded-md border p-1 font-sans shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-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",e),...r})}));iT.displayName="DropdownMenuContent";const aT=d.forwardRef(({className:e,inset:t,...r},n)=>b.jsx(V7,{ref:n,className:B("text-body relative flex cursor-default items-center rounded-sm px-2 py-1.5 outline-none select-none","focus:bg-vanilla focus:text-primary","data-disabled:pointer-events-none data-disabled:opacity-50",t&&"pl-8",e),...r}));aT.displayName="DropdownMenuItem";const sT=d.forwardRef(({className:e,children:t,checked:r,...n},o)=>b.jsxs(W7,{ref:o,className:B("text-body relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 outline-none select-none","focus:bg-vanilla focus:text-primary","data-disabled:pointer-events-none data-disabled:opacity-50",e),checked:r,...n,children:[b.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:b.jsx(tT,{children:b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:b.jsx("path",{d:"M20 6 9 17l-5-5"})})})}),t]}));sT.displayName="DropdownMenuCheckboxItem";const lT=d.forwardRef(({className:e,children:t,...r},n)=>b.jsxs(U7,{ref:n,className:B("text-body relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 outline-none select-none","focus:bg-vanilla focus:text-primary","data-disabled:pointer-events-none data-disabled:opacity-50",e),...r,children:[b.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:b.jsx(tT,{children:b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-2 w-2 fill-current",children:b.jsx("circle",{cx:"12",cy:"12",r:"10"})})})}),t]}));lT.displayName="DropdownMenuRadioItem";const cT=d.forwardRef(({className:e,inset:t,...r},n)=>b.jsx(B7,{ref:n,className:B("text-small text-primary px-2 py-1.5",t&&"pl-8",e),...r}));cT.displayName="DropdownMenuLabel";const uT=d.forwardRef(({className:e,...t},r)=>b.jsx(H7,{ref:r,className:B("bg-border -mx-1 my-1 h-px",e),...t}));uT.displayName="DropdownMenuSeparator";const fT=d.forwardRef(({className:e,...t},r)=>b.jsx("span",{ref:r,className:B("text-small text-tertiary ml-auto tracking-widest",e),...t}));fT.displayName="DropdownMenuShortcut";const dT=d.forwardRef(({className:e,iconSize:t="default",...r},n)=>{const o={sm:"h-4 w-4",default:"h-5 w-5",lg:"h-6 w-6"},i={sm:"h-7 w-7",default:"h-8 w-8",lg:"h-10 w-10"};return b.jsxs(eT,{ref:n,className:B("text-secondary inline-flex items-center justify-center rounded-md transition-colors","hover:bg-vanilla hover:text-primary","focus-visible:ring-sunflower focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none","disabled:pointer-events-none disabled:opacity-50",i[t],e),...r,children:[b.jsx(d7,{className:o[t]}),b.jsx("span",{className:"sr-only",children:"Open menu"})]})});dT.displayName="ActionsMenuButton";const pT=ie("font-mono text-xs leading-5 font-normal tracking-[1.2px] uppercase",{variants:{variant:{default:"text-primary",primary:"text-primary",secondary:"text-secondary"},size:{default:"text-xs",sm:"text-[10px]",lg:"text-sm"}},defaultVariants:{variant:"default",size:"default"}}),vT=d.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},i)=>{const a=n?Ut:"span";return b.jsx(a,{className:B(pT({variant:t,size:r,className:e})),ref:i,...o})});vT.displayName="Eyebrow";var tZ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],rZ=tZ.reduce((e,t)=>{const r=R0(`Primitive.${t}`),n=d.forwardRef((o,i)=>{const{asChild:a,...s}=o,l=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(l,{...s,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),nZ="Label",mT=d.forwardRef((e,t)=>b.jsx(rZ.label,{...e,ref:t,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));mT.displayName=nZ;var oZ=mT;const hT=ie("text-tertiary font-sans font-normal peer-disabled:cursor-not-allowed peer-disabled:opacity-50",{variants:{size:{default:"text-small",sm:"text-label"}},defaultVariants:{size:"default"}}),dm=d.forwardRef(({className:e,size:t,...r},n)=>b.jsx(oZ,{ref:n,className:B(hT({size:t}),e),...r}));dm.displayName="Label";const pm=d.forwardRef(({className:e,variant:t="default",children:r,...n},o)=>r?b.jsx("p",{ref:o,className:B("text-descriptive font-sans text-sm",t==="default"?"text-tertiary":"text-error",e),...n,children:r}):null);pm.displayName="FormMessage";const gT=d.forwardRef(({className:e,label:t,labelSize:r,hint:n,error:o,htmlFor:i,children:a,...s},l)=>{const c=i?`${i}-message`:void 0;return b.jsxs("div",{ref:l,className:B("flex flex-col gap-1.5",e),...s,children:[t&&b.jsx(dm,{htmlFor:i,size:r,children:t}),a,(n||o)&&b.jsx(pm,{id:c,variant:o?"error":"default",role:o?"alert":void 0,children:o||n})]})});gT.displayName="FormField";const iZ=ie("grid",{variants:{cols:{1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",12:"grid-cols-12"},gap:{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},justify:{start:"justify-items-start",center:"justify-items-center",end:"justify-items-end",stretch:"justify-items-stretch"}},defaultVariants:{cols:1,gap:"md",align:"stretch",justify:"stretch"}}),aZ={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",12:"grid-cols-12"},sZ={none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},lZ={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},cZ={start:"justify-items-start",center:"justify-items-center",end:"justify-items-end",stretch:"justify-items-stretch"};function gn(e,t,r){if(!e)return r?t[r]:"";if(typeof e=="object"){const n=[];return e.base!==void 0?n.push(t[e.base]):r&&n.push(t[r]),e.sm!==void 0&&n.push(`sm:${t[e.sm].split(":").pop()}`),e.md!==void 0&&n.push(`md:${t[e.md].split(":").pop()}`),e.lg!==void 0&&n.push(`lg:${t[e.lg].split(":").pop()}`),e.xl!==void 0&&n.push(`xl:${t[e.xl].split(":").pop()}`),e["2xl"]!==void 0&&n.push(`2xl:${t[e["2xl"]].split(":").pop()}`),n.join(" ")}return t[e]}const yT=d.forwardRef(({className:e,cols:t,gap:r,align:n,justify:o,asChild:i=!1,...a},s)=>{const l=i?Ut:"div",c=gn(t,aZ,1),u=gn(r,sZ,"md"),f=gn(n,lZ,"stretch"),p=gn(o,cZ,"stretch");return b.jsx(l,{className:B("grid",c,u,f,p,e),ref:s,...a})});yT.displayName="Grid";const uZ=ie("",{variants:{colSpan:{1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12",full:"col-span-full"},rowSpan:{1:"row-span-1",2:"row-span-2",3:"row-span-3",4:"row-span-4",5:"row-span-5",6:"row-span-6",full:"row-span-full"},colStart:{1:"col-start-1",2:"col-start-2",3:"col-start-3",4:"col-start-4",5:"col-start-5",6:"col-start-6",7:"col-start-7",8:"col-start-8",9:"col-start-9",10:"col-start-10",11:"col-start-11",12:"col-start-12",auto:"col-start-auto"}},defaultVariants:{}}),fZ={1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12",full:"col-span-full"},dZ={1:"row-span-1",2:"row-span-2",3:"row-span-3",4:"row-span-4",5:"row-span-5",6:"row-span-6",full:"row-span-full"},pZ={1:"col-start-1",2:"col-start-2",3:"col-start-3",4:"col-start-4",5:"col-start-5",6:"col-start-6",7:"col-start-7",8:"col-start-8",9:"col-start-9",10:"col-start-10",11:"col-start-11",12:"col-start-12",auto:"col-start-auto"},bT=d.forwardRef(({className:e,colSpan:t,rowSpan:r,colStart:n,asChild:o=!1,...i},a)=>{const s=o?Ut:"div",l=gn(t,fZ),c=gn(r,dZ),u=gn(n,pZ);return b.jsx(s,{className:B(l,c,u,e),ref:a,...i})});bT.displayName="GridItem";const xT=ie("text-primary font-normal",{variants:{level:{hero:"font-display text-hero",h1:"text-h1 font-sans font-normal",h2:"text-h2 font-sans font-normal",h3:"text-h3 font-sans font-normal",h4:"text-h4 font-sans font-normal"}},defaultVariants:{level:"h1"}}),vZ={hero:"h1",h1:"h1",h2:"h2",h3:"h3",h4:"h4"},wT=d.forwardRef(({className:e,level:t="h1",as:r,asChild:n=!1,...o},i)=>{const a=r??vZ[t??"h1"],s=n?Ut:a;return b.jsx(s,{className:B(xT({level:t,className:e})),ref:i,...o})});wT.displayName="Heading";const PT=ie("bg-card text-body text-primary placeholder:text-tertiary flex h-10 w-full rounded-md border px-3 py-2 font-sans transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",{variants:{variant:{default:"border-border focus-visible:ring-sunflower",error:"border-error focus-visible:ring-error"}},defaultVariants:{variant:"default"}}),ST=d.forwardRef(({className:e,variant:t,type:r="text",...n},o)=>b.jsx("input",{type:r,className:B(PT({variant:t}),e),ref:o,...n}));ST.displayName="Input";const OT=ie("text-small font-sans tracking-[-0.05em]",{variants:{size:{sm:"h-48",default:"h-72",lg:"h-96"}},defaultVariants:{size:"default"}}),Na=["var(--color-sunflower)","var(--color-electric-blue)","var(--color-cool-purple)","var(--color-deep-blue)","var(--color-warm-purple)"],ET=d.forwardRef(({className:e,size:t,data:r,series:n,showGrid:o=!0,showLegend:i=!0,showTooltip:a=!0,xAxisLabel:s,yAxisLabel:l,strokeWidth:c=2,curved:u=!0,showDots:f=!0,...p},v)=>{const g=d.useMemo(()=>{if(n)return n;const m=r[0];return m?Object.keys(m).filter(y=>y!=="label"&&typeof m[y]=="number").map((y,x)=>({key:y,name:y.charAt(0).toUpperCase()+y.slice(1),color:Na[x%Na.length]})):[]},[r,n]);return b.jsx("div",{ref:v,className:B(OT({size:t,className:e})),role:"img",...p,children:b.jsx(sp,{width:"100%",height:"100%",minWidth:100,minHeight:100,children:b.jsxs(C8,{data:r,margin:{top:5,right:30,left:l?20:0,bottom:s?20:5},children:[o&&b.jsx(zv,{strokeDasharray:"3 3",stroke:"var(--color-border)",vertical:!1}),b.jsx(Fs,{dataKey:"label",stroke:"var(--color-secondary)",fontSize:12,tickLine:!1,axisLine:{stroke:"var(--color-primary)"},label:s?{value:s,position:"insideBottom",offset:-10,fill:"var(--color-secondary)",fontSize:12}:void 0}),b.jsx(zs,{stroke:"var(--color-secondary)",fontSize:12,tickLine:!1,axisLine:{stroke:"var(--color-primary)"},label:l?{value:l,angle:-90,position:"insideLeft",fill:"var(--color-secondary)",fontSize:12}:void 0}),a&&b.jsx(Ev,{contentStyle:{backgroundColor:"var(--color-white)",border:"1px solid var(--color-border)",borderRadius:"4px",fontFamily:"var(--font-sans)",fontSize:"14px",color:"var(--color-primary)"},labelStyle:{color:"var(--color-secondary)",fontWeight:400}}),i&&b.jsx(Pl,{wrapperStyle:{fontFamily:"var(--font-sans)",fontSize:"14px",color:"var(--color-secondary)"}}),g.map((m,h)=>b.jsx(NC,{type:u?"monotone":"linear",dataKey:m.key,name:m.name,stroke:m.color||Na[h%Na.length],strokeWidth:c,dot:f,activeDot:f?{r:6}:!1},m.key))]})})})});ET.displayName="LineChart";const CT=ie("focus-visible:ring-sunflower inline-flex items-center font-sans transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",{variants:{variant:{default:"text-primary hover:text-secondary underline underline-offset-4",muted:"text-secondary hover:text-primary underline underline-offset-4",nav:"text-primary hover:text-secondary no-underline hover:underline hover:underline-offset-4"},size:{sm:"text-small",default:"text-body",lg:"text-body font-medium"}},defaultVariants:{variant:"default",size:"default"}}),AT=d.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},i)=>{const a=n?Ut:"a";return b.jsx(a,{className:B(CT({variant:t,size:r,className:e})),ref:i,...o})});AT.displayName="Link";const mZ=t0,hZ=r0,_T=n0,gZ=el,vm=d.forwardRef(({className:e,...t},r)=>b.jsx(o0,{ref:r,className:B("fixed inset-0 z-50 bg-black/50","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","duration-200",e),...t}));vm.displayName="ModalOverlay";const TT=ie(["fixed top-1/2 left-1/2 z-50 -translate-x-1/2 -translate-y-1/2","bg-main grid w-full gap-4 p-6 shadow-lg","max-h-[85vh] overflow-y-auto","border-border rounded-lg border","focus-visible:ring-sunflower focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%]","data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]","duration-200"],{variants:{size:{sm:"max-w-[400px]",default:"max-w-[500px]",lg:"max-w-[640px]",full:"max-w-[95vw]"}},defaultVariants:{size:"default"}}),MT=d.forwardRef(({className:e,children:t,size:r,showCloseButton:n=!0,...o},i)=>b.jsxs(_T,{children:[b.jsx(vm,{}),b.jsxs(i0,{ref:i,className:B(TT({size:r}),e),...o,children:[t,n&&b.jsxs(el,{className:B("absolute top-4 right-4 rounded-sm opacity-70","ring-offset-main transition-opacity","hover:opacity-100","focus:ring-sunflower focus:ring-2 focus:ring-offset-2 focus:outline-none","disabled:pointer-events-none","data-[state=open]:bg-alt data-[state=open]:text-secondary"),children:[b.jsx(C_,{className:"h-4 w-4"}),b.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));MT.displayName="ModalContent";const jT=d.forwardRef(({className:e,...t},r)=>b.jsx("div",{ref:r,className:B("flex flex-col space-y-1.5 text-center sm:text-left",e),...t}));jT.displayName="ModalHeader";const kT=d.forwardRef(({className:e,...t},r)=>b.jsx("div",{ref:r,className:B("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t}));kT.displayName="ModalFooter";const NT=d.forwardRef(({className:e,...t},r)=>b.jsx(a0,{ref:r,className:B("text-primary text-lg leading-none tracking-tight",e),...t}));NT.displayName="ModalTitle";const IT=d.forwardRef(({className:e,...t},r)=>b.jsx(s0,{ref:r,className:B("text-secondary text-sm",e),...t}));IT.displayName="ModalDescription";const DT=ie("text-small font-sans tracking-[-0.05em]",{variants:{size:{sm:"h-48",default:"h-72",lg:"h-96"}},defaultVariants:{size:"default"}}),Pw=["var(--color-sunflower)","var(--color-electric-blue)","var(--color-cool-purple)","var(--color-deep-blue)","var(--color-warm-purple)"],RT=d.forwardRef(({className:e,size:t,data:r,showLegend:n=!0,showTooltip:o=!0,innerRadius:i=0,outerRadius:a="80%",paddingAngle:s=0,showLabels:l=!1,startAngle:c=90,endAngle:u=-270,...f},p)=>{const v=d.useMemo(()=>r.reduce((m,h)=>m+h.value,0),[r]),g=d.useCallback(m=>{const{cx:h=0,cy:y=0,midAngle:x=0,percent:w=0}=m,P=m.innerRadius??0,O=m.outerRadius??0,S=Math.PI/180,E=P+(O-P)*.5,C=h+E*Math.cos(-x*S),j=y+E*Math.sin(-x*S);return b.jsx("text",{x:C,y:j,fill:"var(--color-white)",textAnchor:"middle",dominantBaseline:"central",style:{fontSize:"12px",fontFamily:"var(--font-sans)",fontWeight:500},children:`${(w*100).toFixed(0)}%`})},[]);return b.jsx("div",{ref:p,className:B(DT({size:t,className:e})),role:"img",...f,children:b.jsx(sp,{width:"100%",height:"100%",minWidth:100,minHeight:100,children:b.jsxs(z8,{children:[o&&b.jsx(Ev,{contentStyle:{backgroundColor:"var(--color-white)",border:"1px solid var(--color-border)",borderRadius:"4px",fontFamily:"var(--font-sans)",fontSize:"14px",color:"var(--color-primary)"},labelStyle:{color:"var(--color-secondary)",fontWeight:400},formatter:(m,h)=>[`${m} (${v>0?(Number(m)/v*100).toFixed(1):0}%)`,h]}),n&&b.jsx(Pl,{wrapperStyle:{fontFamily:"var(--font-sans)",fontSize:"14px",color:"var(--color-secondary)"}}),b.jsx(hC,{data:r,cx:"50%",cy:"50%",innerRadius:i,outerRadius:a,paddingAngle:s,dataKey:"value",nameKey:"name",startAngle:c,endAngle:u,label:l?g:!1,labelLine:!1,children:r.map((m,h)=>b.jsx(Bi,{fill:m.color||Pw[h%Pw.length]},`cell-${m.name}-${h}`))})]})})})});RT.displayName="PieChart";const $T=ie("bg-border relative w-full overflow-hidden rounded-full",{variants:{size:{sm:"h-1",default:"h-2",lg:"h-3",xl:"h-4"}},defaultVariants:{size:"default"}}),LT=ie("h-full transition-all duration-300 ease-out",{variants:{variant:{default:"bg-sunflower",muted:"bg-secondary",success:"bg-electric-blue"},animated:{true:"animate-pulse",false:""}},defaultVariants:{variant:"default",animated:!1}}),FT=d.forwardRef(({className:e,value:t=0,max:r=100,size:n,variant:o,animated:i,label:a="Progress",indeterminate:s=!1,...l},c)=>{const u=Math.min(Math.max(t/r*100,0),100);return b.jsx("div",{ref:c,role:"progressbar","aria-valuenow":s?void 0:t,"aria-valuemin":0,"aria-valuemax":r,"aria-label":a,className:B($T({size:n,className:e})),...l,children:b.jsx("div",{className:B(LT({variant:o,animated:i}),s&&"animate-progress-indeterminate"),style:{width:s?"50%":`${u}%`}})})});FT.displayName="ProgressIndicator";var mm="Radio",[yZ,zT]=it(mm),[bZ,xZ]=yZ(mm),BT=d.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:o=!1,required:i,disabled:a,value:s="on",onCheck:l,form:c,...u}=e,[f,p]=d.useState(null),v=oe(t,h=>p(h)),g=d.useRef(!1),m=f?c||!!f.closest("form"):!0;return b.jsxs(bZ,{scope:r,checked:o,disabled:a,children:[b.jsx(ee.button,{type:"button",role:"radio","aria-checked":o,"data-state":UT(o),"data-disabled":a?"":void 0,disabled:a,value:s,...u,ref:v,onClick:U(e.onClick,h=>{o||l?.(),m&&(g.current=h.isPropagationStopped(),g.current||h.stopPropagation())})}),m&&b.jsx(KT,{control:f,bubbles:!g.current,name:n,value:s,checked:o,required:i,disabled:a,form:c,style:{transform:"translateX(-100%)"}})]})});BT.displayName=mm;var VT="RadioIndicator",WT=d.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...o}=e,i=xZ(VT,r);return b.jsx(pt,{present:n||i.checked,children:b.jsx(ee.span,{"data-state":UT(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t})})});WT.displayName=VT;var wZ="RadioBubbleInput",KT=d.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:n=!0,...o},i)=>{const a=d.useRef(null),s=oe(a,i),l=ql(r),c=Yl(t);return d.useEffect(()=>{const u=a.current;if(!u)return;const f=window.HTMLInputElement.prototype,v=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==r&&v){const g=new Event("click",{bubbles:n});v.call(u,r),u.dispatchEvent(g)}},[l,r,n]),b.jsx(ee.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:s,style:{...o.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});KT.displayName=wZ;function UT(e){return e?"checked":"unchecked"}var PZ=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],uc="RadioGroup",[SZ]=it(uc,[ic,zT]),HT=ic(),GT=zT(),[OZ,EZ]=SZ(uc),qT=d.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:o,value:i,required:a=!1,disabled:s=!1,orientation:l,dir:c,loop:u=!0,onValueChange:f,...p}=e,v=HT(r),g=Jl(c),[m,h]=Et({prop:i,defaultProp:o??null,onChange:f,caller:uc});return b.jsx(OZ,{scope:r,name:n,required:a,disabled:s,value:m,onValueChange:h,children:b.jsx(K1,{asChild:!0,...v,orientation:l,dir:g,loop:u,children:b.jsx(ee.div,{role:"radiogroup","aria-required":a,"aria-orientation":l,"data-disabled":s?"":void 0,dir:g,...p,ref:t})})})});qT.displayName=uc;var YT="RadioGroupItem",XT=d.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...o}=e,i=EZ(YT,r),a=i.disabled||n,s=HT(r),l=GT(r),c=d.useRef(null),u=oe(t,c),f=i.value===o.value,p=d.useRef(!1);return d.useEffect(()=>{const v=m=>{PZ.includes(m.key)&&(p.current=!0)},g=()=>p.current=!1;return document.addEventListener("keydown",v),document.addEventListener("keyup",g),()=>{document.removeEventListener("keydown",v),document.removeEventListener("keyup",g)}},[]),b.jsx(U1,{asChild:!0,...s,focusable:!a,active:f,children:b.jsx(BT,{disabled:a,required:i.required,checked:f,...l,...o,name:i.name,ref:u,onCheck:()=>i.onValueChange(o.value),onKeyDown:U(v=>{v.key==="Enter"&&v.preventDefault()}),onFocus:U(o.onFocus,()=>{p.current&&c.current?.click()})})})});XT.displayName=YT;var CZ="RadioGroupIndicator",ZT=d.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,o=GT(r);return b.jsx(WT,{...o,...n,ref:t})});ZT.displayName=CZ;var AZ=qT,_Z=XT,TZ=ZT;const JT=d.forwardRef(({className:e,...t},r)=>b.jsx(AZ,{className:B("grid gap-2",e),...t,ref:r}));JT.displayName="RadioGroup";const QT=d.forwardRef(({className:e,...t},r)=>b.jsx(_Z,{ref:r,className:B("border-border bg-card aspect-square h-5 w-5 rounded-full border transition-colors","focus-visible:ring-sunflower focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none","disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:border-sunflower",e),...t,children:b.jsx(TZ,{className:"flex items-center justify-center",children:b.jsx("span",{className:"bg-sunflower h-2.5 w-2.5 rounded-full"})})}));QT.displayName="RadioGroupItem";function Sw(e,[t,r]){return Math.min(r,Math.max(t,e))}function MZ(e){const t=jZ(e),r=d.forwardRef((n,o)=>{const{children:i,...a}=n,s=d.Children.toArray(i),l=s.find(NZ);if(l){const c=l.props.children,u=s.map(f=>f===l?d.Children.count(c)>1?d.Children.only(null):d.isValidElement(c)?c.props.children:null:f);return b.jsx(t,{...a,ref:o,children:d.isValidElement(c)?d.cloneElement(c,void 0,u):null})}return b.jsx(t,{...a,ref:o,children:i})});return r.displayName=`${e}.Slot`,r}function jZ(e){const t=d.forwardRef((r,n)=>{const{children:o,...i}=r;if(d.isValidElement(o)){const a=DZ(o),s=IZ(i,o.props);return o.type!==d.Fragment&&(s.ref=n?lr(n,a):a),d.cloneElement(o,s)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var kZ=Symbol("radix.slottable");function NZ(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===kZ}function IZ(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...s)=>{const l=i(...s);return o(...s),l}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}function DZ(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var eM=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),RZ="VisuallyHidden",fc=d.forwardRef((e,t)=>b.jsx(ee.span,{...e,ref:t,style:{...eM,...e.style}}));fc.displayName=RZ;var $Z=fc,LZ=[" ","Enter","ArrowUp","ArrowDown"],FZ=[" ","Enter"],Nn="Select",[dc,pc,zZ]=Zl(Nn),[jo]=it(Nn,[zZ,tn]),vc=tn(),[BZ,on]=jo(Nn),[VZ,WZ]=jo(Nn),tM=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:o,onOpenChange:i,value:a,defaultValue:s,onValueChange:l,dir:c,name:u,autoComplete:f,disabled:p,required:v,form:g}=e,m=vc(t),[h,y]=d.useState(null),[x,w]=d.useState(null),[P,O]=d.useState(!1),S=Jl(c),[E,C]=Et({prop:n,defaultProp:o??!1,onChange:i,caller:Nn}),[j,D]=Et({prop:a,defaultProp:s,onChange:l,caller:Nn}),R=d.useRef(null),_=h?g||!!h.closest("form"):!0,[k,I]=d.useState(new Set),V=Array.from(k).map(z=>z.props.value).join(";");return b.jsx(Ki,{...m,children:b.jsxs(BZ,{required:v,scope:t,trigger:h,onTriggerChange:y,valueNode:x,onValueNodeChange:w,valueNodeHasChildren:P,onValueNodeHasChildrenChange:O,contentId:St(),value:j,onValueChange:D,open:E,onOpenChange:C,dir:S,triggerPointerDownPosRef:R,disabled:p,children:[b.jsx(dc.Provider,{scope:t,children:b.jsx(VZ,{scope:e.__scopeSelect,onNativeOptionAdd:d.useCallback(z=>{I(K=>new Set(K).add(z))},[]),onNativeOptionRemove:d.useCallback(z=>{I(K=>{const T=new Set(K);return T.delete(z),T})},[]),children:r})}),_?b.jsxs(CM,{"aria-hidden":!0,required:v,tabIndex:-1,name:u,autoComplete:f,value:j,onChange:z=>D(z.target.value),disabled:p,form:g,children:[j===void 0?b.jsx("option",{value:""}):null,Array.from(k)]},V):null]})})};tM.displayName=Nn;var rM="SelectTrigger",nM=d.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...o}=e,i=vc(r),a=on(rM,r),s=a.disabled||n,l=oe(t,a.onTriggerChange),c=pc(r),u=d.useRef("touch"),[f,p,v]=_M(m=>{const h=c().filter(w=>!w.disabled),y=h.find(w=>w.value===a.value),x=TM(h,m,y);x!==void 0&&a.onValueChange(x.value)}),g=m=>{s||(a.onOpenChange(!0),v()),m&&(a.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return b.jsx(Ui,{asChild:!0,...i,children:b.jsx(ee.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":AM(a.value)?"":void 0,...o,ref:l,onClick:U(o.onClick,m=>{m.currentTarget.focus(),u.current!=="mouse"&&g(m)}),onPointerDown:U(o.onPointerDown,m=>{u.current=m.pointerType;const h=m.target;h.hasPointerCapture(m.pointerId)&&h.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(g(m),m.preventDefault())}),onKeyDown:U(o.onKeyDown,m=>{const h=f.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&p(m.key),!(h&&m.key===" ")&&LZ.includes(m.key)&&(g(),m.preventDefault())})})})});nM.displayName=rM;var oM="SelectValue",iM=d.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,children:i,placeholder:a="",...s}=e,l=on(oM,r),{onValueNodeHasChildrenChange:c}=l,u=i!==void 0,f=oe(t,l.onValueNodeChange);return et(()=>{c(u)},[c,u]),b.jsx(ee.span,{...s,ref:f,style:{pointerEvents:"none"},children:AM(l.value)?b.jsx(b.Fragment,{children:a}):i})});iM.displayName=oM;var KZ="SelectIcon",aM=d.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...o}=e;return b.jsx(ee.span,{"aria-hidden":!0,...o,ref:t,children:n||"▼"})});aM.displayName=KZ;var UZ="SelectPortal",sM=e=>b.jsx(Rn,{asChild:!0,...e});sM.displayName=UZ;var In="SelectContent",lM=d.forwardRef((e,t)=>{const r=on(In,e.__scopeSelect),[n,o]=d.useState();if(et(()=>{o(new DocumentFragment)},[]),!r.open){const i=n;return i?hi.createPortal(b.jsx(cM,{scope:e.__scopeSelect,children:b.jsx(dc.Slot,{scope:e.__scopeSelect,children:b.jsx("div",{children:e.children})})}),i):null}return b.jsx(uM,{...e,ref:t})});lM.displayName=In;var Lt=10,[cM,an]=jo(In),HZ="SelectContentImpl",GZ=MZ("SelectContent.RemoveScroll"),uM=d.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:a,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:f,collisionBoundary:p,collisionPadding:v,sticky:g,hideWhenDetached:m,avoidCollisions:h,...y}=e,x=on(In,r),[w,P]=d.useState(null),[O,S]=d.useState(null),E=oe(t,W=>P(W)),[C,j]=d.useState(null),[D,R]=d.useState(null),_=pc(r),[k,I]=d.useState(!1),V=d.useRef(!1);d.useEffect(()=>{if(w)return Js(w)},[w]),Xs();const z=d.useCallback(W=>{const[ue,...$]=_().map(L=>L.ref.current),[H]=$.slice(-1),F=document.activeElement;for(const L of W)if(L===F||(L?.scrollIntoView({block:"nearest"}),L===ue&&O&&(O.scrollTop=0),L===H&&O&&(O.scrollTop=O.scrollHeight),L?.focus(),document.activeElement!==F))return},[_,O]),K=d.useCallback(()=>z([C,w]),[z,C,w]);d.useEffect(()=>{k&&K()},[k,K]);const{onOpenChange:T,triggerPointerDownPosRef:N}=x;d.useEffect(()=>{if(w){let W={x:0,y:0};const ue=H=>{W={x:Math.abs(Math.round(H.pageX)-(N.current?.x??0)),y:Math.abs(Math.round(H.pageY)-(N.current?.y??0))}},$=H=>{W.x<=10&&W.y<=10?H.preventDefault():w.contains(H.target)||T(!1),document.removeEventListener("pointermove",ue),N.current=null};return N.current!==null&&(document.addEventListener("pointermove",ue),document.addEventListener("pointerup",$,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ue),document.removeEventListener("pointerup",$,{capture:!0})}}},[w,T,N]),d.useEffect(()=>{const W=()=>T(!1);return window.addEventListener("blur",W),window.addEventListener("resize",W),()=>{window.removeEventListener("blur",W),window.removeEventListener("resize",W)}},[T]);const[G,Q]=_M(W=>{const ue=_().filter(F=>!F.disabled),$=ue.find(F=>F.ref.current===document.activeElement),H=TM(ue,W,$);H&&setTimeout(()=>H.ref.current.focus())}),te=d.useCallback((W,ue,$)=>{const H=!V.current&&!$;(x.value!==void 0&&x.value===ue||H)&&(j(W),H&&(V.current=!0))},[x.value]),ne=d.useCallback(()=>w?.focus(),[w]),re=d.useCallback((W,ue,$)=>{const H=!V.current&&!$;(x.value!==void 0&&x.value===ue||H)&&R(W)},[x.value]),le=n==="popper"?Od:fM,Oe=le===Od?{side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:f,collisionBoundary:p,collisionPadding:v,sticky:g,hideWhenDetached:m,avoidCollisions:h}:{};return b.jsx(cM,{scope:r,content:w,viewport:O,onViewportChange:S,itemRefCallback:te,selectedItem:C,onItemLeave:ne,itemTextRefCallback:re,focusSelectedItem:K,selectedItemText:D,position:n,isPositioned:k,searchRef:G,children:b.jsx(yi,{as:GZ,allowPinchZoom:!0,children:b.jsx(gi,{asChild:!0,trapped:x.open,onMountAutoFocus:W=>{W.preventDefault()},onUnmountAutoFocus:U(o,W=>{x.trigger?.focus({preventScroll:!0}),W.preventDefault()}),children:b.jsx(Dn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:W=>W.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:b.jsx(le,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:W=>W.preventDefault(),...y,...Oe,onPlaced:()=>I(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:U(y.onKeyDown,W=>{const ue=W.ctrlKey||W.altKey||W.metaKey;if(W.key==="Tab"&&W.preventDefault(),!ue&&W.key.length===1&&Q(W.key),["ArrowUp","ArrowDown","Home","End"].includes(W.key)){let H=_().filter(F=>!F.disabled).map(F=>F.ref.current);if(["ArrowUp","End"].includes(W.key)&&(H=H.slice().reverse()),["ArrowUp","ArrowDown"].includes(W.key)){const F=W.target,L=H.indexOf(F);H=H.slice(L+1)}setTimeout(()=>z(H)),W.preventDefault()}})})})})})})});uM.displayName=HZ;var qZ="SelectItemAlignedPosition",fM=d.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...o}=e,i=on(In,r),a=an(In,r),[s,l]=d.useState(null),[c,u]=d.useState(null),f=oe(t,E=>u(E)),p=pc(r),v=d.useRef(!1),g=d.useRef(!0),{viewport:m,selectedItem:h,selectedItemText:y,focusSelectedItem:x}=a,w=d.useCallback(()=>{if(i.trigger&&i.valueNode&&s&&c&&m&&h&&y){const E=i.trigger.getBoundingClientRect(),C=c.getBoundingClientRect(),j=i.valueNode.getBoundingClientRect(),D=y.getBoundingClientRect();if(i.dir!=="rtl"){const F=D.left-C.left,L=j.left-F,de=E.left-L,se=E.width+de,Xe=Math.max(se,C.width),Ze=window.innerWidth-Lt,$t=Sw(L,[Lt,Math.max(Lt,Ze-Xe)]);s.style.minWidth=se+"px",s.style.left=$t+"px"}else{const F=C.right-D.right,L=window.innerWidth-j.right-F,de=window.innerWidth-E.right-L,se=E.width+de,Xe=Math.max(se,C.width),Ze=window.innerWidth-Lt,$t=Sw(L,[Lt,Math.max(Lt,Ze-Xe)]);s.style.minWidth=se+"px",s.style.right=$t+"px"}const R=p(),_=window.innerHeight-Lt*2,k=m.scrollHeight,I=window.getComputedStyle(c),V=parseInt(I.borderTopWidth,10),z=parseInt(I.paddingTop,10),K=parseInt(I.borderBottomWidth,10),T=parseInt(I.paddingBottom,10),N=V+z+k+T+K,G=Math.min(h.offsetHeight*5,N),Q=window.getComputedStyle(m),te=parseInt(Q.paddingTop,10),ne=parseInt(Q.paddingBottom,10),re=E.top+E.height/2-Lt,le=_-re,Oe=h.offsetHeight/2,W=h.offsetTop+Oe,ue=V+z+W,$=N-ue;if(ue<=re){const F=R.length>0&&h===R[R.length-1].ref.current;s.style.bottom="0px";const L=c.clientHeight-m.offsetTop-m.offsetHeight,de=Math.max(le,Oe+(F?ne:0)+L+K),se=ue+de;s.style.height=se+"px"}else{const F=R.length>0&&h===R[0].ref.current;s.style.top="0px";const de=Math.max(re,V+m.offsetTop+(F?te:0)+Oe)+$;s.style.height=de+"px",m.scrollTop=ue-re+m.offsetTop}s.style.margin=`${Lt}px 0`,s.style.minHeight=G+"px",s.style.maxHeight=_+"px",n?.(),requestAnimationFrame(()=>v.current=!0)}},[p,i.trigger,i.valueNode,s,c,m,h,y,i.dir,n]);et(()=>w(),[w]);const[P,O]=d.useState();et(()=>{c&&O(window.getComputedStyle(c).zIndex)},[c]);const S=d.useCallback(E=>{E&&g.current===!0&&(w(),x?.(),g.current=!1)},[w,x]);return b.jsx(XZ,{scope:r,contentWrapper:s,shouldExpandOnScrollRef:v,onScrollButtonChange:S,children:b.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:P},children:b.jsx(ee.div,{...o,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});fM.displayName=qZ;var YZ="SelectPopperPosition",Od=d.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:o=Lt,...i}=e,a=vc(r);return b.jsx(nc,{...a,...i,ref:t,align:n,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Od.displayName=YZ;var[XZ,hm]=jo(In,{}),Ed="SelectViewport",dM=d.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...o}=e,i=an(Ed,r),a=hm(Ed,r),s=oe(t,i.onViewportChange),l=d.useRef(0);return b.jsxs(b.Fragment,{children:[b.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),b.jsx(dc.Slot,{scope:r,children:b.jsx(ee.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:U(o.onScroll,c=>{const u=c.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:p}=a;if(p?.current&&f){const v=Math.abs(l.current-u.scrollTop);if(v>0){const g=window.innerHeight-Lt*2,m=parseFloat(f.style.minHeight),h=parseFloat(f.style.height),y=Math.max(m,h);if(y<g){const x=y+v,w=Math.min(g,x),P=x-w;f.style.height=w+"px",f.style.bottom==="0px"&&(u.scrollTop=P>0?P:0,f.style.justifyContent="flex-end")}}}l.current=u.scrollTop})})})]})});dM.displayName=Ed;var pM="SelectGroup",[ZZ,JZ]=jo(pM),vM=d.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=St();return b.jsx(ZZ,{scope:r,id:o,children:b.jsx(ee.div,{role:"group","aria-labelledby":o,...n,ref:t})})});vM.displayName=pM;var mM="SelectLabel",hM=d.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=JZ(mM,r);return b.jsx(ee.div,{id:o.id,...n,ref:t})});hM.displayName=mM;var Ys="SelectItem",[QZ,gM]=jo(Ys),yM=d.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:o=!1,textValue:i,...a}=e,s=on(Ys,r),l=an(Ys,r),c=s.value===n,[u,f]=d.useState(i??""),[p,v]=d.useState(!1),g=oe(t,x=>l.itemRefCallback?.(x,n,o)),m=St(),h=d.useRef("touch"),y=()=>{o||(s.onValueChange(n),s.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return b.jsx(QZ,{scope:r,value:n,disabled:o,textId:m,isSelected:c,onItemTextChange:d.useCallback(x=>{f(w=>w||(x?.textContent??"").trim())},[]),children:b.jsx(dc.ItemSlot,{scope:r,value:n,disabled:o,textValue:u,children:b.jsx(ee.div,{role:"option","aria-labelledby":m,"data-highlighted":p?"":void 0,"aria-selected":c&&p,"data-state":c?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...a,ref:g,onFocus:U(a.onFocus,()=>v(!0)),onBlur:U(a.onBlur,()=>v(!1)),onClick:U(a.onClick,()=>{h.current!=="mouse"&&y()}),onPointerUp:U(a.onPointerUp,()=>{h.current==="mouse"&&y()}),onPointerDown:U(a.onPointerDown,x=>{h.current=x.pointerType}),onPointerMove:U(a.onPointerMove,x=>{h.current=x.pointerType,o?l.onItemLeave?.():h.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:U(a.onPointerLeave,x=>{x.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:U(a.onKeyDown,x=>{l.searchRef?.current!==""&&x.key===" "||(FZ.includes(x.key)&&y(),x.key===" "&&x.preventDefault())})})})})});yM.displayName=Ys;var Go="SelectItemText",bM=d.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,...i}=e,a=on(Go,r),s=an(Go,r),l=gM(Go,r),c=WZ(Go,r),[u,f]=d.useState(null),p=oe(t,y=>f(y),l.onItemTextChange,y=>s.itemTextRefCallback?.(y,l.value,l.disabled)),v=u?.textContent,g=d.useMemo(()=>b.jsx("option",{value:l.value,disabled:l.disabled,children:v},l.value),[l.disabled,l.value,v]),{onNativeOptionAdd:m,onNativeOptionRemove:h}=c;return et(()=>(m(g),()=>h(g)),[m,h,g]),b.jsxs(b.Fragment,{children:[b.jsx(ee.span,{id:l.textId,...i,ref:p}),l.isSelected&&a.valueNode&&!a.valueNodeHasChildren?hi.createPortal(i.children,a.valueNode):null]})});bM.displayName=Go;var xM="SelectItemIndicator",wM=d.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return gM(xM,r).isSelected?b.jsx(ee.span,{"aria-hidden":!0,...n,ref:t}):null});wM.displayName=xM;var Cd="SelectScrollUpButton",PM=d.forwardRef((e,t)=>{const r=an(Cd,e.__scopeSelect),n=hm(Cd,e.__scopeSelect),[o,i]=d.useState(!1),a=oe(t,n.onScrollButtonChange);return et(()=>{if(r.viewport&&r.isPositioned){let s=function(){const c=l.scrollTop>0;i(c)};const l=r.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[r.viewport,r.isPositioned]),o?b.jsx(OM,{...e,ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=r;s&&l&&(s.scrollTop=s.scrollTop-l.offsetHeight)}}):null});PM.displayName=Cd;var Ad="SelectScrollDownButton",SM=d.forwardRef((e,t)=>{const r=an(Ad,e.__scopeSelect),n=hm(Ad,e.__scopeSelect),[o,i]=d.useState(!1),a=oe(t,n.onScrollButtonChange);return et(()=>{if(r.viewport&&r.isPositioned){let s=function(){const c=l.scrollHeight-l.clientHeight,u=Math.ceil(l.scrollTop)<c;i(u)};const l=r.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[r.viewport,r.isPositioned]),o?b.jsx(OM,{...e,ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=r;s&&l&&(s.scrollTop=s.scrollTop+l.offsetHeight)}}):null});SM.displayName=Ad;var OM=d.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...o}=e,i=an("SelectScrollButton",r),a=d.useRef(null),s=pc(r),l=d.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return d.useEffect(()=>()=>l(),[l]),et(()=>{s().find(u=>u.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[s]),b.jsx(ee.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:U(o.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(n,50))}),onPointerMove:U(o.onPointerMove,()=>{i.onItemLeave?.(),a.current===null&&(a.current=window.setInterval(n,50))}),onPointerLeave:U(o.onPointerLeave,()=>{l()})})}),eJ="SelectSeparator",EM=d.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return b.jsx(ee.div,{"aria-hidden":!0,...n,ref:t})});EM.displayName=eJ;var _d="SelectArrow",tJ=d.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=vc(r),i=on(_d,r),a=an(_d,r);return i.open&&a.position==="popper"?b.jsx(oc,{...o,...n,ref:t}):null});tJ.displayName=_d;var rJ="SelectBubbleInput",CM=d.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const o=d.useRef(null),i=oe(n,o),a=ql(t);return d.useEffect(()=>{const s=o.current;if(!s)return;const l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==t&&u){const f=new Event("change",{bubbles:!0});u.call(s,t),s.dispatchEvent(f)}},[a,t]),b.jsx(ee.select,{...r,style:{...eM,...r.style},ref:i,defaultValue:t})});CM.displayName=rJ;function AM(e){return e===""||e===void 0}function _M(e){const t=ot(e),r=d.useRef(""),n=d.useRef(0),o=d.useCallback(a=>{const s=r.current+a;t(s),(function l(c){r.current=c,window.clearTimeout(n.current),c!==""&&(n.current=window.setTimeout(()=>l(""),1e3))})(s)},[t]),i=d.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return d.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,o,i]}function TM(e,t,r){const o=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,i=r?e.indexOf(r):-1;let a=nJ(e,Math.max(i,0));o.length===1&&(a=a.filter(c=>c!==r));const l=a.find(c=>c.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==r?l:void 0}function nJ(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var oJ=tM,iJ=nM,aJ=iM,sJ=aM,lJ=sM,cJ=lM,uJ=dM,fJ=vM,dJ=hM,pJ=yM,vJ=bM,mJ=wM,hJ=PM,gJ=SM,yJ=EM;const bJ=oJ,xJ=fJ,wJ=aJ,MM=d.forwardRef(({className:e,children:t,variant:r="default",...n},o)=>b.jsxs(iJ,{ref:o,className:B("bg-card text-body text-primary flex h-10 w-full items-center justify-between rounded-md border px-3 py-2 font-sans transition-colors","placeholder:text-tertiary","focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none","disabled:cursor-not-allowed disabled:opacity-50","[&>span]:line-clamp-1",r==="default"?"border-border focus-visible:ring-sunflower":"border-error focus-visible:ring-error",e),...n,children:[t,b.jsx(sJ,{asChild:!0,children:b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4 opacity-50",children:b.jsx("path",{d:"m6 9 6 6 6-6"})})})]}));MM.displayName="SelectTrigger";const gm=d.forwardRef(({className:e,...t},r)=>b.jsx(hJ,{ref:r,className:B("flex cursor-default items-center justify-center py-1",e),...t,children:b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:b.jsx("path",{d:"m18 15-6-6-6 6"})})}));gm.displayName="SelectScrollUpButton";const ym=d.forwardRef(({className:e,...t},r)=>b.jsx(gJ,{ref:r,className:B("flex cursor-default items-center justify-center py-1",e),...t,children:b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:b.jsx("path",{d:"m6 9 6 6 6-6"})})}));ym.displayName="SelectScrollDownButton";const jM=d.forwardRef(({className:e,children:t,position:r="popper",...n},o)=>b.jsx(lJ,{children:b.jsxs(cJ,{ref:o,className:B("border-border bg-card text-primary relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md border font-sans shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-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",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...n,children:[b.jsx(gm,{}),b.jsx(uJ,{className:B("p-1",r==="popper"&&"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)"),children:t}),b.jsx(ym,{})]})}));jM.displayName="SelectContent";const kM=d.forwardRef(({className:e,...t},r)=>b.jsx(dJ,{ref:r,className:B("text-small text-tertiary py-1.5 pr-2 pl-8 font-normal",e),...t}));kM.displayName="SelectLabel";const NM=d.forwardRef(({className:e,children:t,...r},n)=>b.jsxs(pJ,{ref:n,className:B("text-body relative flex w-full cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 outline-none select-none","focus:bg-vanilla focus:text-primary","data-disabled:pointer-events-none data-disabled:opacity-50",e),...r,children:[b.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:b.jsx(mJ,{children:b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:b.jsx("polyline",{points:"20 6 9 17 4 12"})})})}),b.jsx(vJ,{children:t})]}));NM.displayName="SelectItem";const IM=d.forwardRef(({className:e,...t},r)=>b.jsx(yJ,{ref:r,className:B("bg-border -mx-1 my-1 h-px",e),...t}));IM.displayName="SelectSeparator";const DM=ie("bg-contrast animate-pulse",{variants:{variant:{default:"rounded-md",circular:"rounded-full",text:"rounded"}},defaultVariants:{variant:"default"}}),RM=d.forwardRef(({className:e,variant:t,width:r,height:n,style:o,...i},a)=>{const s={...o,...r!==void 0&&{width:typeof r=="number"?`${r}px`:r},...n!==void 0&&{height:typeof n=="number"?`${n}px`:n}};return b.jsx("div",{ref:a,"aria-hidden":"true",className:B(DM({variant:t,className:e})),style:s,...i})});RM.displayName="Skeleton";const $M=ie("inline-block animate-spin rounded-full border-solid border-current border-r-transparent motion-reduce:animate-[spin_1.5s_linear_infinite]",{variants:{variant:{default:"text-sunflower",muted:"text-secondary",inverted:"text-white"},size:{sm:"h-4 w-4 border-2",default:"h-6 w-6 border-2",lg:"h-8 w-8 border-3",xl:"h-12 w-12 border-4"}},defaultVariants:{variant:"default",size:"default"}}),LM=d.forwardRef(({className:e,variant:t,size:r,label:n="Loading",...o},i)=>b.jsx("span",{ref:i,role:"status","aria-label":n,className:B($M({variant:t,size:r,className:e})),...o,children:b.jsx("span",{className:"sr-only",children:n})}));LM.displayName="Spinner";const FM=ie("flex",{variants:{direction:{vertical:"flex-col",horizontal:"flex-row"},gap:{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},wrap:{nowrap:"flex-nowrap",wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse"}},defaultVariants:{direction:"vertical",gap:"md",align:"stretch",justify:"start",wrap:"nowrap"}}),zM=d.forwardRef(({className:e,direction:t,gap:r,align:n,justify:o,wrap:i,asChild:a=!1,...s},l)=>{const c=a?Ut:"div";return b.jsx(c,{className:B(FM({direction:t,gap:r,align:n,justify:o,wrap:i,className:e})),ref:l,...s})});zM.displayName="Stack";var mc="Switch",[PJ]=it(mc),[SJ,OJ]=PJ(mc),BM=d.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:o,defaultChecked:i,required:a,disabled:s,value:l="on",onCheckedChange:c,form:u,...f}=e,[p,v]=d.useState(null),g=oe(t,w=>v(w)),m=d.useRef(!1),h=p?u||!!p.closest("form"):!0,[y,x]=Et({prop:o,defaultProp:i??!1,onChange:c,caller:mc});return b.jsxs(SJ,{scope:r,checked:y,disabled:s,children:[b.jsx(ee.button,{type:"button",role:"switch","aria-checked":y,"aria-required":a,"data-state":UM(y),"data-disabled":s?"":void 0,disabled:s,value:l,...f,ref:g,onClick:U(e.onClick,w=>{x(P=>!P),h&&(m.current=w.isPropagationStopped(),m.current||w.stopPropagation())})}),h&&b.jsx(KM,{control:p,bubbles:!m.current,name:n,value:l,checked:y,required:a,disabled:s,form:u,style:{transform:"translateX(-100%)"}})]})});BM.displayName=mc;var VM="SwitchThumb",WM=d.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,o=OJ(VM,r);return b.jsx(ee.span,{"data-state":UM(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})});WM.displayName=VM;var EJ="SwitchBubbleInput",KM=d.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...o},i)=>{const a=d.useRef(null),s=oe(a,i),l=ql(r),c=Yl(t);return d.useEffect(()=>{const u=a.current;if(!u)return;const f=window.HTMLInputElement.prototype,v=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==r&&v){const g=new Event("click",{bubbles:n});v.call(u,r),u.dispatchEvent(g)}},[l,r,n]),b.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:s,style:{...o.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});KM.displayName=EJ;function UM(e){return e?"checked":"unchecked"}var CJ=BM,AJ=WM;const HM=d.forwardRef(({className:e,...t},r)=>b.jsx(CJ,{className:B("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors","focus-visible:ring-sunflower focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none","disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:bg-sunflower data-[state=unchecked]:bg-contrast",e),...t,ref:r,children:b.jsx(AJ,{className:B("pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform","data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));HM.displayName="Switch";const GM=ie("text-body w-full caption-bottom border-collapse font-sans",{variants:{variant:{default:"border-separate border-spacing-0",striped:"border-separate border-spacing-0"},size:{default:"",compact:""}},defaultVariants:{variant:"default",size:"default"}}),_J=ie("border-border bg-alt border-b",{variants:{},defaultVariants:{}}),TJ=ie("",{variants:{},defaultVariants:{}}),MJ=ie("transition-colors",{variants:{variant:{default:"border-border hover:bg-alt/50 border-b",striped:"border-border even:bg-alt/30 hover:bg-alt border-b"}},defaultVariants:{variant:"default"}}),jJ=ie("text-small text-primary text-left align-middle font-sans font-normal [&:has([role=checkbox])]:pr-0",{variants:{sortable:{true:"hover:bg-contrast cursor-pointer select-none",false:""},size:{default:"h-12 px-4",compact:"h-8 px-2"}},defaultVariants:{sortable:!1,size:"default"}}),kJ=ie("text-secondary align-middle [&:has([role=checkbox])]:pr-0",{variants:{size:{default:"p-4",compact:"p-2"}},defaultVariants:{size:"default"}}),bm=d.createContext({size:"default"}),qM=d.forwardRef(({className:e,variant:t,size:r="default",...n},o)=>b.jsx(bm.Provider,{value:{size:r??"default"},children:b.jsx("div",{className:"relative w-full overflow-auto",children:b.jsx("table",{ref:o,className:B(GM({variant:t,size:r}),e),...n})})}));qM.displayName="Table";const YM=d.forwardRef(({className:e,...t},r)=>b.jsx("thead",{ref:r,className:B(_J(),e),...t}));YM.displayName="TableHeader";const XM=d.forwardRef(({className:e,...t},r)=>b.jsx("tbody",{ref:r,className:B(TJ(),e),...t}));XM.displayName="TableBody";const ZM=d.forwardRef(({className:e,...t},r)=>b.jsx("tfoot",{ref:r,className:B("border-border bg-alt text-primary border-t font-normal",e),...t}));ZM.displayName="TableFooter";const JM=d.forwardRef(({className:e,variant:t,...r},n)=>b.jsx("tr",{ref:n,className:B(MJ({variant:t}),e),...r}));JM.displayName="TableRow";const QM=d.forwardRef(({className:e,children:t,sortable:r=!1,sortDirection:n=null,onSort:o,...i},a)=>{const{size:s}=d.useContext(bm),l=()=>{r&&o&&o()},c=u=>{r&&o&&(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),o())};return b.jsx("th",{ref:a,className:B(jJ({sortable:r,size:s}),e),onClick:l,onKeyDown:c,tabIndex:r?0:void 0,role:r?"button":void 0,"aria-sort":n==="asc"?"ascending":n==="desc"?"descending":void 0,...i,children:b.jsxs("div",{className:"flex items-center gap-2",children:[t,r&&b.jsxs("span",{className:"inline-flex flex-col","aria-hidden":"true",children:[b.jsx("svg",{className:B("h-3 w-3 transition-opacity",n==="asc"?"opacity-100":"opacity-30"),fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:b.jsx("path",{d:"M7 15l5-5 5 5"})}),b.jsx("svg",{className:B("-mt-1 h-3 w-3 transition-opacity",n==="desc"?"opacity-100":"opacity-30"),fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:b.jsx("path",{d:"M7 9l5 5 5-5"})})]})]})})});QM.displayName="TableHead";const ej=d.forwardRef(({className:e,...t},r)=>{const{size:n}=d.useContext(bm);return b.jsx("td",{ref:r,className:B(kJ({size:n}),e),...t})});ej.displayName="TableCell";const tj=d.forwardRef(({className:e,...t},r)=>b.jsx("caption",{ref:r,className:B("text-small text-tertiary mt-4",e),...t}));tj.displayName="TableCaption";function NJ({data:e,initialSortKey:t=null,initialSortDirection:r="asc"}){const[n,o]=d.useState(t),[i,a]=d.useState(r),s=d.useCallback(c=>{o(u=>u===c?(a(f=>f==="asc"?"desc":f==="desc"?(o(null),null):"asc"),u):(a("asc"),c))},[]);return{sortedData:d.useMemo(()=>!n||!i?e:[...e].sort((c,u)=>{const f=c[n],p=u[n];if(f===p)return 0;let v=0;return typeof f=="string"&&typeof p=="string"?v=f.localeCompare(p):typeof f=="number"&&typeof p=="number"?v=f-p:v=String(f).localeCompare(String(p)),i==="asc"?v:-v}),[e,n,i]),sortKey:n,sortDirection:i,handleSort:s}}function IJ({data:e,filterKeys:t}){const[r,n]=d.useState("");return{filteredData:d.useMemo(()=>{if(!r.trim())return e;const i=r.toLowerCase();return e.filter(a=>t&&t.length>0?t.some(s=>String(a[s]).toLowerCase().includes(i)):Object.values(a).some(s=>String(s).toLowerCase().includes(i)))},[e,r,t]),filterValue:r,setFilterValue:n}}const rj=d.createContext(null);function nj(){const e=d.useContext(rj);if(!e)throw new Error("Tab components must be used within a Tabs component");return e}const oj=d.forwardRef(({className:e,defaultValue:t="",value:r,onValueChange:n,children:o,...i},a)=>{const[s,l]=d.useState(t),c=r!==void 0?r:s,u=d.useCallback(f=>{r===void 0&&l(f),n?.(f)},[r,n]);return b.jsx(rj.Provider,{value:{activeTab:c,setActiveTab:u},children:b.jsx("div",{ref:a,className:B("w-full",e),...i,children:o})})});oj.displayName="Tabs";const ij=ie("text-body inline-flex items-center font-sans transition-colors",{variants:{variant:{default:"border-border gap-1 border-b",pills:"rounded-pill bg-alt gap-2 p-1"}},defaultVariants:{variant:"default"}}),aj=d.forwardRef(({className:e,variant:t,...r},n)=>b.jsx("div",{ref:n,role:"tablist",className:B(ij({variant:t,className:e})),...r}));aj.displayName="TabList";const sj=ie("focus-visible:ring-sunflower inline-flex items-center justify-center font-sans font-normal whitespace-nowrap transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"text-secondary hover:text-primary data-[state=active]:border-sunflower data-[state=active]:text-primary border-b-2 border-transparent px-4 py-2",pills:"rounded-pill text-secondary hover:text-primary data-[state=active]:bg-card data-[state=active]:text-primary px-4 py-1.5 data-[state=active]:shadow-sm"},size:{sm:"text-small",default:"text-body",lg:"text-body font-medium"}},defaultVariants:{variant:"default",size:"default"}}),lj=d.forwardRef(({className:e,variant:t,size:r,value:n,...o},i)=>{const{activeTab:a,setActiveTab:s}=nj(),l=a===n;return b.jsx("button",{ref:i,role:"tab",type:"button","aria-selected":l,"data-state":l?"active":"inactive",onClick:()=>s(n),className:B(sj({variant:t,size:r,className:e})),...o})});lj.displayName="TabTrigger";const cj=ie("font-sans",{variants:{size:{sm:"text-small mt-3",default:"text-body mt-4",lg:"text-body mt-6"}},defaultVariants:{size:"default"}}),uj=d.forwardRef(({className:e,size:t,value:r,...n},o)=>{const{activeTab:i}=nj(),a=i===r;return a?b.jsx("div",{ref:o,role:"tabpanel","data-state":a?"active":"inactive",className:B(cj({size:t,className:e})),...n}):null});uj.displayName="TabContent";const fj=ie("font-sans",{variants:{variant:{lead:"text-lead text-primary","semi-lead":"text-semi-lead text-secondary","body-lg":"text-body-lg text-secondary",body:"text-body text-secondary",descriptive:"text-descriptive text-secondary",label:"text-label text-tertiary","label-sm":"text-label-sm text-tertiary"},weight:{regular:"font-normal",medium:"font-medium"}},defaultVariants:{variant:"body",weight:"regular"}}),dj=d.forwardRef(({className:e,variant:t="body",weight:r="regular",as:n="p",asChild:o=!1,...i},a)=>{const s=o?Ut:n;return b.jsx(s,{className:B(fj({variant:t,weight:r,className:e})),ref:a,...i})});dj.displayName="Text";const pj=ie("bg-card text-body text-primary placeholder:text-tertiary flex min-h-[80px] w-full rounded-md border px-3 py-2 font-sans transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",{variants:{variant:{default:"border-border focus-visible:ring-sunflower",error:"border-error focus-visible:ring-error"},resize:{none:"resize-none",vertical:"resize-y",horizontal:"resize-x",both:"resize"}},defaultVariants:{variant:"default",resize:"vertical"}}),vj=d.forwardRef(({className:e,variant:t,resize:r,...n},o)=>b.jsx("textarea",{className:B(pj({variant:t,resize:r}),e),ref:o,...n}));vj.displayName="Textarea";var xm="ToastProvider",[wm,DJ,RJ]=Zl("Toast"),[mj]=it("Toast",[RJ]),[$J,hc]=mj(xm),hj=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,l]=d.useState(null),[c,u]=d.useState(0),f=d.useRef(!1),p=d.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${xm}\`. Expected non-empty \`string\`.`),b.jsx(wm.Provider,{scope:t,children:b.jsx($J,{scope:t,label:r,duration:n,swipeDirection:o,swipeThreshold:i,toastCount:c,viewport:s,onViewportChange:l,onToastAdd:d.useCallback(()=>u(v=>v+1),[]),onToastRemove:d.useCallback(()=>u(v=>v-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:p,children:a})})};hj.displayName=xm;var gj="ToastViewport",LJ=["F8"],Td="toast.viewportPause",Md="toast.viewportResume",yj=d.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=LJ,label:o="Notifications ({hotkey})",...i}=e,a=hc(gj,r),s=DJ(r),l=d.useRef(null),c=d.useRef(null),u=d.useRef(null),f=d.useRef(null),p=oe(t,f,a.onViewportChange),v=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),g=a.toastCount>0;d.useEffect(()=>{const h=y=>{n.length!==0&&n.every(w=>y[w]||y.code===w)&&f.current?.focus()};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[n]),d.useEffect(()=>{const h=l.current,y=f.current;if(g&&h&&y){const x=()=>{if(!a.isClosePausedRef.current){const S=new CustomEvent(Td);y.dispatchEvent(S),a.isClosePausedRef.current=!0}},w=()=>{if(a.isClosePausedRef.current){const S=new CustomEvent(Md);y.dispatchEvent(S),a.isClosePausedRef.current=!1}},P=S=>{!h.contains(S.relatedTarget)&&w()},O=()=>{h.contains(document.activeElement)||w()};return h.addEventListener("focusin",x),h.addEventListener("focusout",P),h.addEventListener("pointermove",x),h.addEventListener("pointerleave",O),window.addEventListener("blur",x),window.addEventListener("focus",w),()=>{h.removeEventListener("focusin",x),h.removeEventListener("focusout",P),h.removeEventListener("pointermove",x),h.removeEventListener("pointerleave",O),window.removeEventListener("blur",x),window.removeEventListener("focus",w)}}},[g,a.isClosePausedRef]);const m=d.useCallback(({tabbingDirection:h})=>{const x=s().map(w=>{const P=w.ref.current,O=[P,...ZJ(P)];return h==="forwards"?O:O.reverse()});return(h==="forwards"?x.reverse():x).flat()},[s]);return d.useEffect(()=>{const h=f.current;if(h){const y=x=>{const w=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!w){const O=document.activeElement,S=x.shiftKey;if(x.target===h&&S){c.current?.focus();return}const j=m({tabbingDirection:S?"backwards":"forwards"}),D=j.findIndex(R=>R===O);df(j.slice(D+1))?x.preventDefault():S?c.current?.focus():u.current?.focus()}};return h.addEventListener("keydown",y),()=>h.removeEventListener("keydown",y)}},[s,m]),b.jsxs(mk,{ref:l,role:"region","aria-label":o.replace("{hotkey}",v),tabIndex:-1,style:{pointerEvents:g?void 0:"none"},children:[g&&b.jsx(jd,{ref:c,onFocusFromOutsideViewport:()=>{const h=m({tabbingDirection:"forwards"});df(h)}}),b.jsx(wm.Slot,{scope:r,children:b.jsx(ee.ol,{tabIndex:-1,...i,ref:p})}),g&&b.jsx(jd,{ref:u,onFocusFromOutsideViewport:()=>{const h=m({tabbingDirection:"backwards"});df(h)}})]})});yj.displayName=gj;var bj="ToastFocusProxy",jd=d.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...o}=e,i=hc(bj,r);return b.jsx(fc,{tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:a=>{const s=a.relatedTarget;!i.viewport?.contains(s)&&n()}})});jd.displayName=bj;var Zi="Toast",FJ="toast.swipeStart",zJ="toast.swipeMove",BJ="toast.swipeCancel",VJ="toast.swipeEnd",xj=d.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:o,onOpenChange:i,...a}=e,[s,l]=Et({prop:n,defaultProp:o??!0,onChange:i,caller:Zi});return b.jsx(pt,{present:r||s,children:b.jsx(UJ,{open:s,...a,ref:t,onClose:()=>l(!1),onPause:ot(e.onPause),onResume:ot(e.onResume),onSwipeStart:U(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:U(e.onSwipeMove,c=>{const{x:u,y:f}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:U(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:U(e.onSwipeEnd,c=>{const{x:u,y:f}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),l(!1)})})})});xj.displayName=Zi;var[WJ,KJ]=mj(Zi,{onClose(){}}),UJ=d.forwardRef((e,t)=>{const{__scopeToast:r,type:n="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:s,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:f,onSwipeCancel:p,onSwipeEnd:v,...g}=e,m=hc(Zi,r),[h,y]=d.useState(null),x=oe(t,I=>y(I)),w=d.useRef(null),P=d.useRef(null),O=o||m.duration,S=d.useRef(0),E=d.useRef(O),C=d.useRef(0),{onToastAdd:j,onToastRemove:D}=m,R=ot(()=>{h?.contains(document.activeElement)&&m.viewport?.focus(),a()}),_=d.useCallback(I=>{!I||I===1/0||(window.clearTimeout(C.current),S.current=new Date().getTime(),C.current=window.setTimeout(R,I))},[R]);d.useEffect(()=>{const I=m.viewport;if(I){const V=()=>{_(E.current),c?.()},z=()=>{const K=new Date().getTime()-S.current;E.current=E.current-K,window.clearTimeout(C.current),l?.()};return I.addEventListener(Td,z),I.addEventListener(Md,V),()=>{I.removeEventListener(Td,z),I.removeEventListener(Md,V)}}},[m.viewport,O,l,c,_]),d.useEffect(()=>{i&&!m.isClosePausedRef.current&&_(O)},[i,O,m.isClosePausedRef,_]),d.useEffect(()=>(j(),()=>D()),[j,D]);const k=d.useMemo(()=>h?Aj(h):null,[h]);return m.viewport?b.jsxs(b.Fragment,{children:[k&&b.jsx(HJ,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite",children:k}),b.jsx(WJ,{scope:r,onClose:R,children:hi.createPortal(b.jsx(wm.ItemSlot,{scope:r,children:b.jsx(vk,{asChild:!0,onEscapeKeyDown:U(s,()=>{m.isFocusedToastEscapeKeyDownRef.current||R(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:b.jsx(ee.li,{tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":m.swipeDirection,...g,ref:x,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:U(e.onKeyDown,I=>{I.key==="Escape"&&(s?.(I.nativeEvent),I.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,R()))}),onPointerDown:U(e.onPointerDown,I=>{I.button===0&&(w.current={x:I.clientX,y:I.clientY})}),onPointerMove:U(e.onPointerMove,I=>{if(!w.current)return;const V=I.clientX-w.current.x,z=I.clientY-w.current.y,K=!!P.current,T=["left","right"].includes(m.swipeDirection),N=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,G=T?N(0,V):0,Q=T?0:N(0,z),te=I.pointerType==="touch"?10:2,ne={x:G,y:Q},re={originalEvent:I,delta:ne};K?(P.current=ne,Ia(zJ,f,re,{discrete:!1})):Ow(ne,m.swipeDirection,te)?(P.current=ne,Ia(FJ,u,re,{discrete:!1}),I.target.setPointerCapture(I.pointerId)):(Math.abs(V)>te||Math.abs(z)>te)&&(w.current=null)}),onPointerUp:U(e.onPointerUp,I=>{const V=P.current,z=I.target;if(z.hasPointerCapture(I.pointerId)&&z.releasePointerCapture(I.pointerId),P.current=null,w.current=null,V){const K=I.currentTarget,T={originalEvent:I,delta:V};Ow(V,m.swipeDirection,m.swipeThreshold)?Ia(VJ,v,T,{discrete:!0}):Ia(BJ,p,T,{discrete:!0}),K.addEventListener("click",N=>N.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),HJ=e=>{const{__scopeToast:t,children:r,...n}=e,o=hc(Zi,t),[i,a]=d.useState(!1),[s,l]=d.useState(!1);return YJ(()=>a(!0)),d.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:b.jsx(Rn,{asChild:!0,children:b.jsx(fc,{...n,children:i&&b.jsxs(b.Fragment,{children:[o.label," ",r]})})})},GJ="ToastTitle",wj=d.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return b.jsx(ee.div,{...n,ref:t})});wj.displayName=GJ;var qJ="ToastDescription",Pj=d.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return b.jsx(ee.div,{...n,ref:t})});Pj.displayName=qJ;var Sj="ToastAction",Oj=d.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?b.jsx(Cj,{altText:r,asChild:!0,children:b.jsx(Pm,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Sj}\`. Expected non-empty \`string\`.`),null)});Oj.displayName=Sj;var Ej="ToastClose",Pm=d.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,o=KJ(Ej,r);return b.jsx(Cj,{asChild:!0,children:b.jsx(ee.button,{type:"button",...n,ref:t,onClick:U(e.onClick,o.onClose)})})});Pm.displayName=Ej;var Cj=d.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...o}=e;return b.jsx(ee.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...o,ref:t})});function Aj(e){const t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),XJ(n)){const o=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const a=n.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...Aj(n))}}),t}function Ia(e,t,r,{discrete:n}){const o=r.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?Id(o,i):o.dispatchEvent(i)}var Ow=(e,t,r=0)=>{const n=Math.abs(e.x),o=Math.abs(e.y),i=n>o;return t==="left"||t==="right"?i&&n>r:!i&&o>r};function YJ(e=()=>{}){const t=ot(e);et(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function XJ(e){return e.nodeType===e.ELEMENT_NODE}function ZJ(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function df(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var JJ=hj,QJ=yj,eQ=xj,tQ=wj,rQ=Pj,nQ=Oj,oQ=Pm;const iQ=JJ,_j=d.forwardRef(({className:e,...t},r)=>b.jsx(QJ,{ref:r,className:B("fixed top-0 z-100 flex max-h-screen w-full flex-col-reverse p-4 sm:top-auto sm:right-0 sm:bottom-0 sm:flex-col md:max-w-105",e),...t}));_j.displayName="ToastViewport";const Tj=ie(["group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-lg border p-4 shadow-lg transition-all","data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none","data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out","data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full"],{variants:{variant:{default:"border-border bg-main text-primary",success:"border-sunflower/30 bg-eggshell text-primary [&>svg]:text-sunflower",error:"border-error/30 bg-main text-primary [&>svg]:text-error",warning:"border-sunflower/50 bg-vanilla text-primary [&>svg]:text-sunflower",info:"border-electric-blue/30 bg-main text-primary [&>svg]:text-electric-blue"}},defaultVariants:{variant:"default"}}),Mj=d.forwardRef(({className:e,variant:t,...r},n)=>b.jsx(eQ,{ref:n,className:B(Tj({variant:t}),e),...r}));Mj.displayName="Toast";const jj=d.forwardRef(({className:e,...t},r)=>b.jsx(nQ,{ref:r,className:B("rounded-pill border-border inline-flex h-8 shrink-0 items-center justify-center border bg-transparent px-3 text-sm font-medium","ring-offset-main transition-colors","hover:bg-alt","focus:ring-sunflower focus:ring-2 focus:ring-offset-2 focus:outline-none","disabled:pointer-events-none disabled:opacity-50","group-[.error]:border-error/30 group-[.error]:hover:border-error/50 group-[.error]:hover:bg-error/10 group-[.error]:focus:ring-error",e),...t}));jj.displayName="ToastAction";const kj=d.forwardRef(({className:e,...t},r)=>b.jsxs(oQ,{ref:r,className:B("text-secondary absolute top-2 right-2 rounded-sm p-1 opacity-0 transition-opacity","hover:text-primary","focus:ring-sunflower focus:opacity-100 focus:ring-2 focus:outline-none","group-hover:opacity-100","group-[.error]:text-error/70 group-[.error]:hover:text-error group-[.error]:focus:ring-error group-[.error]:focus:ring-offset-error",e),"toast-close":"",...t,children:[b.jsx(C_,{className:"h-4 w-4"}),b.jsx("span",{className:"sr-only",children:"Close"})]}));kj.displayName="ToastClose";const Nj=d.forwardRef(({className:e,...t},r)=>b.jsx(tQ,{ref:r,className:B("text-sm",e),...t}));Nj.displayName="ToastTitle";const Ij=d.forwardRef(({className:e,...t},r)=>b.jsx(rQ,{ref:r,className:B("text-secondary text-sm",e),...t}));Ij.displayName="ToastDescription";var aQ=Symbol("radix.slottable");function sQ(e){const t=({children:r})=>b.jsx(b.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=aQ,t}var[gc]=it("Tooltip",[tn]),yc=tn(),Dj="TooltipProvider",lQ=700,kd="tooltip.open",[cQ,Sm]=gc(Dj),Rj=e=>{const{__scopeTooltip:t,delayDuration:r=lQ,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:i}=e,a=d.useRef(!0),s=d.useRef(!1),l=d.useRef(0);return d.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),b.jsx(cQ,{scope:t,isOpenDelayedRef:a,delayDuration:r,onOpen:d.useCallback(()=>{window.clearTimeout(l.current),a.current=!1},[]),onClose:d.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.current=!0,n)},[n]),isPointerInTransitRef:s,onPointerInTransitChange:d.useCallback(c=>{s.current=c},[]),disableHoverableContent:o,children:i})};Rj.displayName=Dj;var vi="Tooltip",[uQ,Ji]=gc(vi),$j=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o,onOpenChange:i,disableHoverableContent:a,delayDuration:s}=e,l=Sm(vi,e.__scopeTooltip),c=yc(t),[u,f]=d.useState(null),p=St(),v=d.useRef(0),g=a??l.disableHoverableContent,m=s??l.delayDuration,h=d.useRef(!1),[y,x]=Et({prop:n,defaultProp:o??!1,onChange:E=>{E?(l.onOpen(),document.dispatchEvent(new CustomEvent(kd))):l.onClose(),i?.(E)},caller:vi}),w=d.useMemo(()=>y?h.current?"delayed-open":"instant-open":"closed",[y]),P=d.useCallback(()=>{window.clearTimeout(v.current),v.current=0,h.current=!1,x(!0)},[x]),O=d.useCallback(()=>{window.clearTimeout(v.current),v.current=0,x(!1)},[x]),S=d.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{h.current=!0,x(!0),v.current=0},m)},[m,x]);return d.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),b.jsx(Ki,{...c,children:b.jsx(uQ,{scope:t,contentId:p,open:y,stateAttribute:w,trigger:u,onTriggerChange:f,onTriggerEnter:d.useCallback(()=>{l.isOpenDelayedRef.current?S():P()},[l.isOpenDelayedRef,S,P]),onTriggerLeave:d.useCallback(()=>{g?O():(window.clearTimeout(v.current),v.current=0)},[O,g]),onOpen:P,onClose:O,disableHoverableContent:g,children:r})})};$j.displayName=vi;var Nd="TooltipTrigger",Lj=d.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Ji(Nd,r),i=Sm(Nd,r),a=yc(r),s=d.useRef(null),l=oe(t,s,o.onTriggerChange),c=d.useRef(!1),u=d.useRef(!1),f=d.useCallback(()=>c.current=!1,[]);return d.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),b.jsx(Ui,{asChild:!0,...a,children:b.jsx(ee.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:l,onPointerMove:U(e.onPointerMove,p=>{p.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),u.current=!0)}),onPointerLeave:U(e.onPointerLeave,()=>{o.onTriggerLeave(),u.current=!1}),onPointerDown:U(e.onPointerDown,()=>{o.open&&o.onClose(),c.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:U(e.onFocus,()=>{c.current||o.onOpen()}),onBlur:U(e.onBlur,o.onClose),onClick:U(e.onClick,o.onClose)})})});Lj.displayName=Nd;var Om="TooltipPortal",[fQ,dQ]=gc(Om,{forceMount:void 0}),Fj=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,i=Ji(Om,t);return b.jsx(fQ,{scope:t,forceMount:r,children:b.jsx(pt,{present:r||i.open,children:b.jsx(Rn,{asChild:!0,container:o,children:n})})})};Fj.displayName=Om;var mo="TooltipContent",zj=d.forwardRef((e,t)=>{const r=dQ(mo,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...i}=e,a=Ji(mo,e.__scopeTooltip);return b.jsx(pt,{present:n||a.open,children:a.disableHoverableContent?b.jsx(Bj,{side:o,...i,ref:t}):b.jsx(pQ,{side:o,...i,ref:t})})}),pQ=d.forwardRef((e,t)=>{const r=Ji(mo,e.__scopeTooltip),n=Sm(mo,e.__scopeTooltip),o=d.useRef(null),i=oe(t,o),[a,s]=d.useState(null),{trigger:l,onClose:c}=r,u=o.current,{onPointerInTransitChange:f}=n,p=d.useCallback(()=>{s(null),f(!1)},[f]),v=d.useCallback((g,m)=>{const h=g.currentTarget,y={x:g.clientX,y:g.clientY},x=gQ(y,h.getBoundingClientRect()),w=yQ(y,x),P=bQ(m.getBoundingClientRect()),O=wQ([...w,...P]);s(O),f(!0)},[f]);return d.useEffect(()=>()=>p(),[p]),d.useEffect(()=>{if(l&&u){const g=h=>v(h,u),m=h=>v(h,l);return l.addEventListener("pointerleave",g),u.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",g),u.removeEventListener("pointerleave",m)}}},[l,u,v,p]),d.useEffect(()=>{if(a){const g=m=>{const h=m.target,y={x:m.clientX,y:m.clientY},x=l?.contains(h)||u?.contains(h),w=!xQ(y,a);x?p():w&&(p(),c())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,u,a,c,p]),b.jsx(Bj,{...e,ref:i})}),[vQ,mQ]=gc(vi,{isInside:!1}),hQ=sQ("TooltipContent"),Bj=d.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...s}=e,l=Ji(mo,r),c=yc(r),{onClose:u}=l;return d.useEffect(()=>(document.addEventListener(kd,u),()=>document.removeEventListener(kd,u)),[u]),d.useEffect(()=>{if(l.trigger){const f=p=>{p.target?.contains(l.trigger)&&u()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,u]),b.jsx(Dn,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:u,children:b.jsxs(nc,{"data-state":l.stateAttribute,...c,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[b.jsx(hQ,{children:n}),b.jsx(vQ,{scope:r,isInside:!0,children:b.jsx($Z,{id:l.contentId,role:"tooltip",children:o||n})})]})})});zj.displayName=mo;var Vj="TooltipArrow",Wj=d.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=yc(r);return mQ(Vj,r).isInside?null:b.jsx(oc,{...o,...n,ref:t})});Wj.displayName=Vj;function gQ(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,o,i)){case i:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function yQ(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function bQ(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function xQ(e,t){const{x:r,y:n}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const s=t[i],l=t[a],c=s.x,u=s.y,f=l.x,p=l.y;u>n!=p>n&&r<(f-c)*(n-u)/(p-u)+c&&(o=!o)}return o}function wQ(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),PQ(t)}function PQ(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const i=r[r.length-1],a=r[r.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var SQ=Rj,OQ=$j,EQ=Lj,CQ=Fj,AQ=zj,_Q=Wj;const TQ=SQ,MQ=OQ,jQ=EQ,Kj=CQ,Em=d.forwardRef(({className:e,...t},r)=>b.jsx(_Q,{ref:r,className:B("fill-primary",e),...t}));Em.displayName="TooltipArrow";const Uj=ie(["z-50 overflow-hidden rounded-md px-3 py-1.5 font-sans shadow-md","animate-in fade-in-0 zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","data-[side=bottom]:slide-in-from-top-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"],{variants:{variant:{default:"bg-primary text-small text-white",light:"bg-card text-primary text-small border-border border"}},defaultVariants:{variant:"default"}}),Hj=d.forwardRef(({className:e,variant:t,sideOffset:r=4,showArrow:n=!1,children:o,...i},a)=>b.jsx(Kj,{children:b.jsxs(AQ,{ref:a,sideOffset:r,className:B(Uj({variant:t,className:e})),...i,children:[o,n&&b.jsx(Em,{className:t==="light"?"fill-card":"fill-primary"})]})}));Hj.displayName="TooltipContent";exports.ActionsMenuButton=dT;exports.AlertDialog=WI;exports.AlertDialogAction=U0;exports.AlertDialogCancel=H0;exports.AlertDialogContent=z0;exports.AlertDialogDescription=K0;exports.AlertDialogFooter=V0;exports.AlertDialogHeader=B0;exports.AlertDialogOverlay=Fd;exports.AlertDialogPortal=L0;exports.AlertDialogTitle=W0;exports.AlertDialogTrigger=KI;exports.Badge=q0;exports.BarChart=n1;exports.BreadcrumbItem=a1;exports.BreadcrumbSeparator=Hv;exports.Breadcrumbs=i1;exports.Button=$0;exports.Card=l1;exports.Checkbox=g1;exports.ContextMenu=IX;exports.ContextMenuCheckboxItem=n_;exports.ContextMenuContent=t_;exports.ContextMenuGroup=RX;exports.ContextMenuItem=r_;exports.ContextMenuLabel=i_;exports.ContextMenuPortal=JA;exports.ContextMenuRadioGroup=LX;exports.ContextMenuRadioItem=o_;exports.ContextMenuSeparator=a_;exports.ContextMenuShortcut=s_;exports.ContextMenuSub=$X;exports.ContextMenuSubContent=e_;exports.ContextMenuSubTrigger=QA;exports.ContextMenuTrigger=DX;exports.DatePicker=M_;exports.DateTimePicker=I_;exports.Divider=R_;exports.DropdownMenu=X7;exports.DropdownMenuCheckboxItem=sT;exports.DropdownMenuContent=iT;exports.DropdownMenuGroup=J7;exports.DropdownMenuItem=aT;exports.DropdownMenuLabel=cT;exports.DropdownMenuPortal=rT;exports.DropdownMenuRadioGroup=eZ;exports.DropdownMenuRadioItem=lT;exports.DropdownMenuSeparator=uT;exports.DropdownMenuShortcut=fT;exports.DropdownMenuSub=Q7;exports.DropdownMenuSubContent=oT;exports.DropdownMenuSubTrigger=nT;exports.DropdownMenuTrigger=Z7;exports.Eyebrow=vT;exports.FormField=gT;exports.FormMessage=pm;exports.Grid=yT;exports.GridItem=bT;exports.Heading=wT;exports.Input=ST;exports.Label=dm;exports.LineChart=ET;exports.Link=AT;exports.Modal=mZ;exports.ModalClose=gZ;exports.ModalContent=MT;exports.ModalDescription=IT;exports.ModalFooter=kT;exports.ModalHeader=jT;exports.ModalOverlay=vm;exports.ModalPortal=_T;exports.ModalTitle=NT;exports.ModalTrigger=hZ;exports.PieChart=RT;exports.ProgressIndicator=FT;exports.RadioGroup=JT;exports.RadioGroupItem=QT;exports.Select=bJ;exports.SelectContent=jM;exports.SelectGroup=xJ;exports.SelectItem=NM;exports.SelectLabel=kM;exports.SelectScrollDownButton=ym;exports.SelectScrollUpButton=gm;exports.SelectSeparator=IM;exports.SelectTrigger=MM;exports.SelectValue=wJ;exports.Skeleton=RM;exports.Spinner=LM;exports.Stack=zM;exports.Switch=HM;exports.TabContent=uj;exports.TabList=aj;exports.TabTrigger=lj;exports.Table=qM;exports.TableBody=XM;exports.TableCaption=tj;exports.TableCell=ej;exports.TableFooter=ZM;exports.TableHead=QM;exports.TableHeader=YM;exports.TableRow=JM;exports.Tabs=oj;exports.Text=dj;exports.Textarea=vj;exports.Toast=Mj;exports.ToastAction=jj;exports.ToastClose=kj;exports.ToastDescription=Ij;exports.ToastProvider=iQ;exports.ToastTitle=Nj;exports.ToastViewport=_j;exports.Tooltip=MQ;exports.TooltipArrow=Em;exports.TooltipContent=Hj;exports.TooltipPortal=Kj;exports.TooltipProvider=TQ;exports.TooltipTrigger=jQ;exports.alertDialogContentVariants=F0;exports.badgeVariants=G0;exports.barChartVariants=r1;exports.breadcrumbItemVariants=yd;exports.breadcrumbsVariants=o1;exports.buttonVariants=tl;exports.calendarDayVariants=T_;exports.cardVariants=s1;exports.cn=B;exports.datePickerTriggerVariants=__;exports.dateTimePickerCalendarDayVariants=N_;exports.dateTimePickerTriggerVariants=k_;exports.dividerVariants=D_;exports.eyebrowVariants=pT;exports.gridItemVariants=uZ;exports.gridVariants=iZ;exports.headingVariants=xT;exports.inputVariants=PT;exports.labelVariants=hT;exports.lineChartVariants=OT;exports.linkVariants=CT;exports.modalContentVariants=TT;exports.pieChartVariants=DT;exports.progressBarVariants=LT;exports.progressIndicatorVariants=$T;exports.skeletonVariants=DM;exports.spinnerVariants=$M;exports.stackVariants=FM;exports.tabContentVariants=cj;exports.tabListVariants=ij;exports.tabTriggerVariants=sj;exports.tableVariants=GM;exports.textVariants=fj;exports.textareaVariants=pj;exports.toastVariants=Tj;exports.tooltipContentVariants=Uj;exports.useFilterableTable=IJ;exports.useSortableTable=NJ;