@engrate/components 0.1.26 → 0.1.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react/jsx-runtime"),O=require("react"),is=require("react-dom");function NO(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 p=NO(O),as=NO(is);function xB(e,t){const r=p.createContext(t),n=i=>{const{children:a,...s}=i,l=p.useMemo(()=>s,Object.values(s));return b.jsx(r.Provider,{value:l,children:a})};n.displayName=e+"Provider";function o(i){const a=p.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=p.createContext(a),l=r.length;r=[...r,a];const c=d=>{const{scope:f,children:h,...v}=d,m=f?.[e]?.[l]||s,g=p.useMemo(()=>v,Object.values(v));return b.jsx(m.Provider,{value:g,children:h})};c.displayName=i+"Provider";function u(d,f){const h=f?.[e]?.[l]||s,v=p.useContext(h);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const o=()=>{const i=r.map(a=>p.createContext(a));return function(s){const l=s?.[e]||i;return p.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[n,wB(o,...t)]}function wB(...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 d=l(i)[`__scope${c}`];return{...s,...d}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}function cx(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Hr(...e){return t=>{let r=!1;const n=e.map(o=>{const i=cx(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():cx(e[o],null)}}}}function ie(...e){return p.useCallback(Hr(...e),e)}function ux(e){const t=SB(e),r=p.forwardRef((n,o)=>{const{children:i,...a}=n,s=p.Children.toArray(i),l=s.find(CB);if(l){const c=l.props.children,u=s.map(d=>d===l?p.Children.count(c)>1?p.Children.only(null):p.isValidElement(c)?c.props.children:null:d);return b.jsx(t,{...a,ref:o,children:p.isValidElement(c)?p.cloneElement(c,void 0,u):null})}return b.jsx(t,{...a,ref:o,children:i})});return r.displayName=`${e}.Slot`,r}function SB(e){const t=p.forwardRef((r,n)=>{const{children:o,...i}=r;if(p.isValidElement(o)){const a=EB(o),s=OB(i,o.props);return o.type!==p.Fragment&&(s.ref=n?Hr(n,a):a),p.cloneElement(o,s)}return p.Children.count(o)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var PB=Symbol("radix.slottable");function CB(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===PB}function OB(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 EB(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 Ri(e){const t=e+"CollectionProvider",[r,n]=it(t),[o,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),a=m=>{const{scope:g,children:y}=m,x=O.useRef(null),w=O.useRef(new Map).current;return b.jsx(o,{scope:g,itemMap:w,collectionRef:x,children:y})};a.displayName=t;const s=e+"CollectionSlot",l=ux(s),c=O.forwardRef((m,g)=>{const{scope:y,children:x}=m,w=i(s,y),S=ie(g,w.collectionRef);return b.jsx(l,{ref:S,children:x})});c.displayName=s;const u=e+"CollectionItemSlot",d="data-radix-collection-item",f=ux(u),h=O.forwardRef((m,g)=>{const{scope:y,children:x,...w}=m,S=O.useRef(null),P=ie(g,S),C=i(u,y);return O.useEffect(()=>(C.itemMap.set(S,{ref:S,...w}),()=>{C.itemMap.delete(S)})),b.jsx(f,{[d]:"",ref:P,children:x})});h.displayName=u;function v(m){const g=i(e+"CollectionConsumer",m);return O.useCallback(()=>{const x=g.collectionRef.current;if(!x)return[];const w=Array.from(x.querySelectorAll(`[${d}]`));return Array.from(g.itemMap.values()).sort((C,E)=>w.indexOf(C.ref.current)-w.indexOf(E.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:a,Slot:c,ItemSlot:h},v,n]}function U(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),r===!1||!o.defaultPrevented)return t?.(o)}}var pt=globalThis?.document?p.useLayoutEffect:()=>{},AB=p[" useInsertionEffect ".trim().toString()]||pt;function xt({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,i,a]=TB({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:o;{const u=p.useRef(e!==void 0);p.useEffect(()=>{const d=u.current;d!==s&&console.warn(`${n} is changing from ${d?"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=p.useCallback(u=>{if(s){const d=MB(u)?u(e):u;d!==e&&a.current?.(d)}else i(u)},[s,e,i,a]);return[l,c]}function TB({defaultProp:e,onChange:t}){const[r,n]=p.useState(e),o=p.useRef(r),i=p.useRef(t);return AB(()=>{i.current=t},[t]),p.useEffect(()=>{o.current!==r&&(i.current?.(r),o.current=r)},[r,o]),[r,n,i]}function MB(e){return typeof e=="function"}function kB(e){const t=DB(e),r=p.forwardRef((n,o)=>{const{children:i,...a}=n,s=p.Children.toArray(i),l=s.find(NB);if(l){const c=l.props.children,u=s.map(d=>d===l?p.Children.count(c)>1?p.Children.only(null):p.isValidElement(c)?c.props.children:null:d);return b.jsx(t,{...a,ref:o,children:p.isValidElement(c)?p.cloneElement(c,void 0,u):null})}return b.jsx(t,{...a,ref:o,children:i})});return r.displayName=`${e}.Slot`,r}function DB(e){const t=p.forwardRef((r,n)=>{const{children:o,...i}=r;if(p.isValidElement(o)){const a=IB(o),s=jB(i,o.props);return o.type!==p.Fragment&&(s.ref=n?Hr(n,a):a),p.cloneElement(o,s)}return p.Children.count(o)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var _B=Symbol("radix.slottable");function NB(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===_B}function jB(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 IB(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 RB=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ee=RB.reduce((e,t)=>{const r=kB(`Primitive.${t}`),n=p.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 vv(e,t){e&&as.flushSync(()=>e.dispatchEvent(t))}function LB(e,t){return p.useReducer((r,n)=>t[r][n]??r,e)}var At=e=>{const{present:t,children:r}=e,n=$B(t),o=typeof r=="function"?r({present:n.isPresent}):p.Children.only(r),i=ie(n.ref,VB(o));return typeof r=="function"||n.isPresent?p.cloneElement(o,{ref:i}):null};At.displayName="Presence";function $B(e){const[t,r]=p.useState(),n=p.useRef(null),o=p.useRef(e),i=p.useRef("none"),a=e?"mounted":"unmounted",[s,l]=LB(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const c=tl(n.current);i.current=s==="mounted"?c:"none"},[s]),pt(()=>{const c=n.current,u=o.current;if(u!==e){const f=i.current,h=tl(c);e?l("MOUNT"):h==="none"||c?.display==="none"?l("UNMOUNT"):l(u&&f!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),pt(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=h=>{const m=tl(n.current).includes(CSS.escape(h.animationName));if(h.target===t&&m&&(l("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},f=h=>{h.target===t&&(i.current=tl(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:p.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function tl(e){return e?.animationName||"none"}function VB(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 FB=p[" useId ".trim().toString()]||(()=>{}),BB=0;function It(e){const[t,r]=p.useState(FB());return pt(()=>{r(n=>n??String(BB++))},[e]),e||(t?`radix-${t}`:"")}var xu="Collapsible",[WB,jO]=it(xu),[zB,gv]=WB(xu),IO=p.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:i,onOpenChange:a,...s}=e,[l,c]=xt({prop:n,defaultProp:o??!1,onChange:a,caller:xu});return b.jsx(zB,{scope:r,disabled:i,contentId:It(),open:l,onOpenToggle:p.useCallback(()=>c(u=>!u),[c]),children:b.jsx(ee.div,{"data-state":bv(l),"data-disabled":i?"":void 0,...s,ref:t})})});IO.displayName=xu;var RO="CollapsibleTrigger",LO=p.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,o=gv(RO,r);return b.jsx(ee.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":bv(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...n,ref:t,onClick:U(e.onClick,o.onOpenToggle)})});LO.displayName=RO;var yv="CollapsibleContent",$O=p.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=gv(yv,e.__scopeCollapsible);return b.jsx(At,{present:r||o.open,children:({present:i})=>b.jsx(KB,{...n,ref:t,present:i})})});$O.displayName=yv;var KB=p.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:o,...i}=e,a=gv(yv,r),[s,l]=p.useState(n),c=p.useRef(null),u=ie(t,c),d=p.useRef(0),f=d.current,h=p.useRef(0),v=h.current,m=a.open||s,g=p.useRef(m),y=p.useRef(void 0);return p.useEffect(()=>{const x=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(x)},[]),pt(()=>{const x=c.current;if(x){y.current=y.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const w=x.getBoundingClientRect();d.current=w.height,h.current=w.width,g.current||(x.style.transitionDuration=y.current.transitionDuration,x.style.animationName=y.current.animationName),l(n)}},[a.open,n]),b.jsx(ee.div,{"data-state":bv(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!m,...i,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...e.style},children:m&&o})});function bv(e){return e?"open":"closed"}var VO=IO,FO=LO,BO=$O,UB=p.createContext(void 0);function Li(e){const t=p.useContext(UB);return e||t||"ltr"}var Pr="Accordion",HB=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[xv,GB,YB]=Ri(Pr),[wu]=it(Pr,[YB,jO]),wv=jO(),WO=O.forwardRef((e,t)=>{const{type:r,...n}=e,o=n,i=n;return b.jsx(xv.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?b.jsx(QB,{...i,ref:t}):b.jsx(ZB,{...o,ref:t})})});WO.displayName=Pr;var[zO,qB]=wu(Pr),[KO,XB]=wu(Pr,{collapsible:!1}),ZB=O.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},collapsible:i=!1,...a}=e,[s,l]=xt({prop:r,defaultProp:n??"",onChange:o,caller:Pr});return b.jsx(zO,{scope:e.__scopeAccordion,value:O.useMemo(()=>s?[s]:[],[s]),onItemOpen:l,onItemClose:O.useCallback(()=>i&&l(""),[i,l]),children:b.jsx(KO,{scope:e.__scopeAccordion,collapsible:i,children:b.jsx(UO,{...a,ref:t})})})}),QB=O.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...i}=e,[a,s]=xt({prop:r,defaultProp:n??[],onChange:o,caller:Pr}),l=O.useCallback(u=>s((d=[])=>[...d,u]),[s]),c=O.useCallback(u=>s((d=[])=>d.filter(f=>f!==u)),[s]);return b.jsx(zO,{scope:e.__scopeAccordion,value:a,onItemOpen:l,onItemClose:c,children:b.jsx(KO,{scope:e.__scopeAccordion,collapsible:!0,children:b.jsx(UO,{...i,ref:t})})})}),[JB,Su]=wu(Pr),UO=O.forwardRef((e,t)=>{const{__scopeAccordion:r,disabled:n,dir:o,orientation:i="vertical",...a}=e,s=O.useRef(null),l=ie(s,t),c=GB(r),d=Li(o)==="ltr",f=U(e.onKeyDown,h=>{if(!HB.includes(h.key))return;const v=h.target,m=c().filter(A=>!A.ref.current?.disabled),g=m.findIndex(A=>A.ref.current===v),y=m.length;if(g===-1)return;h.preventDefault();let x=g;const w=0,S=y-1,P=()=>{x=g+1,x>S&&(x=w)},C=()=>{x=g-1,x<w&&(x=S)};switch(h.key){case"Home":x=w;break;case"End":x=S;break;case"ArrowRight":i==="horizontal"&&(d?P():C());break;case"ArrowDown":i==="vertical"&&P();break;case"ArrowLeft":i==="horizontal"&&(d?C():P());break;case"ArrowUp":i==="vertical"&&C();break}const E=x%y;m[E].ref.current?.focus()});return b.jsx(JB,{scope:r,disabled:n,direction:o,orientation:i,children:b.jsx(xv.Slot,{scope:r,children:b.jsx(ee.div,{...a,"data-orientation":i,ref:l,onKeyDown:n?void 0:f})})})}),nc="AccordionItem",[eW,Sv]=wu(nc),HO=O.forwardRef((e,t)=>{const{__scopeAccordion:r,value:n,...o}=e,i=Su(nc,r),a=qB(nc,r),s=wv(r),l=It(),c=n&&a.value.includes(n)||!1,u=i.disabled||e.disabled;return b.jsx(eW,{scope:r,open:c,disabled:u,triggerId:l,children:b.jsx(VO,{"data-orientation":i.orientation,"data-state":QO(c),...s,...o,ref:t,disabled:u,open:c,onOpenChange:d=>{d?a.onItemOpen(n):a.onItemClose(n)}})})});HO.displayName=nc;var GO="AccordionHeader",YO=O.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=Su(Pr,r),i=Sv(GO,r);return b.jsx(ee.h3,{"data-orientation":o.orientation,"data-state":QO(i.open),"data-disabled":i.disabled?"":void 0,...n,ref:t})});YO.displayName=GO;var bh="AccordionTrigger",qO=O.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=Su(Pr,r),i=Sv(bh,r),a=XB(bh,r),s=wv(r);return b.jsx(xv.ItemSlot,{scope:r,children:b.jsx(FO,{"aria-disabled":i.open&&!a.collapsible||void 0,"data-orientation":o.orientation,id:i.triggerId,...s,...n,ref:t})})});qO.displayName=bh;var XO="AccordionContent",ZO=O.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=Su(Pr,r),i=Sv(XO,r),a=wv(r);return b.jsx(BO,{role:"region","aria-labelledby":i.triggerId,"data-orientation":o.orientation,...a,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});ZO.displayName=XO;function QO(e){return e?"open":"closed"}var tW=WO,rW=HO,nW=YO,oW=qO,iW=ZO;function JO(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=JO(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function ve(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=JO(e))&&(n&&(n+=" "),n+=t);return n}const dx=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,fx=ve,te=(e,t)=>r=>{var n;if(t?.variants==null)return fx(e,r?.class,r?.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(c=>{const u=r?.[c],d=i?.[c];if(u===null)return null;const f=dx(u)||dx(d);return o[c][f]}),s=r&&Object.entries(r).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,u)=>{let{class:d,className:f,...h}=u;return Object.entries(h).every(v=>{let[m,g]=v;return Array.isArray(g)?g.includes({...i,...s}[m]):{...i,...s}[m]===g})?[...c,d,f]:c},[]);return fx(e,a,l,r?.class,r?.className)};const eE=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();const aW=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const sW=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase());const px=e=>{const t=sW(e);return t.charAt(0).toUpperCase()+t.slice(1)};var lW={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 cW=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const uW=O.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:i,iconNode:a,...s},l)=>O.createElement("svg",{ref:l,...lW,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:eE("lucide",o),...!i&&!cW(s)&&{"aria-hidden":"true"},...s},[...a.map(([c,u])=>O.createElement(c,u)),...Array.isArray(i)?i:[i]]));const Hn=(e,t)=>{const r=O.forwardRef(({className:n,...o},i)=>O.createElement(uW,{ref:i,iconNode:t,className:eE(`lucide-${aW(px(e))}`,`lucide-${e}`,n),...o}));return r.displayName=px(e),r};const dW=[["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"}]],Pv=Hn("calendar",dW);const fW=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],tE=Hn("check",fW);const pW=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],rE=Hn("chevron-down",pW);const hW=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Cv=Hn("chevron-left",hW);const mW=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ov=Hn("chevron-right",mW);const vW=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],gW=Hn("clock",vW);const yW=[["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"}]],nE=Hn("ellipsis",yW);const bW=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],oE=Hn("x",bW),xW=(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},wW=(e,t)=>({classGroupId:e,validator:t}),iE=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),oc="-",hx=[],SW="arbitrary..",PW=e=>{const t=OW(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return CW(a);const s=a.split(oc),l=s[0]===""&&s.length>1?1:0;return aE(s,l,t)},getConflictingClassGroupIds:(a,s)=>{if(s){const l=n[a],c=r[a];return l?c?xW(c,l):l:c||hx}return r[a]||hx}}},aE=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const o=e[t],i=r.nextPart.get(o);if(i){const c=aE(e,t+1,i);if(c)return c}const a=r.validators;if(a===null)return;const s=t===0?e.join(oc):e.slice(t).join(oc),l=a.length;for(let c=0;c<l;c++){const u=a[c];if(u.validator(s))return u.classGroupId}},CW=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?SW+n:void 0})(),OW=e=>{const{theme:t,classGroups:r}=e;return EW(r,t)},EW=(e,t)=>{const r=iE();for(const n in e){const o=e[n];Ev(o,r,n,t)}return r},Ev=(e,t,r,n)=>{const o=e.length;for(let i=0;i<o;i++){const a=e[i];AW(a,t,r,n)}},AW=(e,t,r,n)=>{if(typeof e=="string"){TW(e,t,r);return}if(typeof e=="function"){MW(e,t,r,n);return}kW(e,t,r,n)},TW=(e,t,r)=>{const n=e===""?t:sE(t,e);n.classGroupId=r},MW=(e,t,r,n)=>{if(DW(e)){Ev(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(wW(r,e))},kW=(e,t,r,n)=>{const o=Object.entries(e),i=o.length;for(let a=0;a<i;a++){const[s,l]=o[a];Ev(l,sE(t,s),r,n)}},sE=(e,t)=>{let r=e;const n=t.split(oc),o=n.length;for(let i=0;i<o;i++){const a=n[i];let s=r.nextPart.get(a);s||(s=iE(),r.nextPart.set(a,s)),r=s}return r},DW=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,_W=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)}}},xh="!",mx=":",NW=[],vx=(e,t,r,n,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:o}),jW=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 g=o[m];if(a===0&&s===0){if(g===mx){i.push(o.slice(l,m)),l=m+1;continue}if(g==="/"){c=m;continue}}g==="["?a++:g==="]"?a--:g==="("?s++:g===")"&&s--}const d=i.length===0?o:o.slice(l);let f=d,h=!1;d.endsWith(xh)?(f=d.slice(0,-1),h=!0):d.startsWith(xh)&&(f=d.slice(1),h=!0);const v=c&&c>l?c-l:void 0;return vx(i,h,f,v)};if(t){const o=t+mx,i=n;n=a=>a.startsWith(o)?i(a.slice(o.length)):vx(NW,!1,a,void 0,!0)}if(r){const o=n;n=i=>r({className:i,parseClassName:o})}return n},IW=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}},RW=e=>({cache:_W(e.cacheSize),parseClassName:jW(e),sortModifiers:IW(e),...PW(e)}),LW=/\s+/,$W=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(LW);let l="";for(let c=s.length-1;c>=0;c-=1){const u=s[c],{isExternal:d,modifiers:f,hasImportantModifier:h,baseClassName:v,maybePostfixModifierPosition:m}=r(u);if(d){l=u+(l.length>0?" "+l:l);continue}let g=!!m,y=n(g?v.substring(0,m):v);if(!y){if(!g){l=u+(l.length>0?" "+l:l);continue}if(y=n(v),!y){l=u+(l.length>0?" "+l:l);continue}g=!1}const x=f.length===0?"":f.length===1?f[0]:i(f).join(":"),w=h?x+xh:x,S=w+y;if(a.indexOf(S)>-1)continue;a.push(S);const P=o(y,g);for(let C=0;C<P.length;++C){const E=P[C];a.push(w+E)}l=u+(l.length>0?" "+l:l)}return l},VW=(...e)=>{let t=0,r,n,o="";for(;t<e.length;)(r=e[t++])&&(n=lE(r))&&(o&&(o+=" "),o+=n);return o},lE=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=lE(e[n]))&&(r&&(r+=" "),r+=t);return r},gx=(e,...t)=>{let r,n,o,i;const a=l=>{const c=t.reduce((u,d)=>d(u),e());return r=RW(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=$W(l,r);return o(l,u),u};return i=a,(...l)=>i(VW(...l))},FW=[],rt=e=>{const t=r=>r[e]||FW;return t.isThemeGetter=!0,t},cE=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,uE=/^\((?:(\w[\w-]*):)?(.+)\)$/i,BW=/^\d+\/\d+$/,WW=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zW=/\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$/,KW=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,UW=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,HW=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Zo=e=>BW.test(e),de=e=>!!e&&!Number.isNaN(Number(e)),On=e=>!!e&&Number.isInteger(Number(e)),nf=e=>e.endsWith("%")&&de(e.slice(0,-1)),qr=e=>WW.test(e),GW=()=>!0,YW=e=>zW.test(e)&&!KW.test(e),dE=()=>!1,qW=e=>UW.test(e),XW=e=>HW.test(e),ZW=e=>!X(e)&&!Z(e),QW=e=>$i(e,hE,dE),X=e=>cE.test(e),no=e=>$i(e,mE,YW),of=e=>$i(e,nz,de),yx=e=>$i(e,fE,dE),JW=e=>$i(e,pE,XW),rl=e=>$i(e,vE,qW),Z=e=>uE.test(e),ia=e=>Vi(e,mE),ez=e=>Vi(e,oz),bx=e=>Vi(e,fE),tz=e=>Vi(e,hE),rz=e=>Vi(e,pE),nl=e=>Vi(e,vE,!0),$i=(e,t,r)=>{const n=cE.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Vi=(e,t,r=!1)=>{const n=uE.exec(e);return n?n[1]?t(n[1]):r:!1},fE=e=>e==="position"||e==="percentage",pE=e=>e==="image"||e==="url",hE=e=>e==="length"||e==="size"||e==="bg-size",mE=e=>e==="length",nz=e=>e==="number",oz=e=>e==="family-name",vE=e=>e==="shadow",xx=()=>{const e=rt("color"),t=rt("font"),r=rt("text"),n=rt("font-weight"),o=rt("tracking"),i=rt("leading"),a=rt("breakpoint"),s=rt("container"),l=rt("spacing"),c=rt("radius"),u=rt("shadow"),d=rt("inset-shadow"),f=rt("text-shadow"),h=rt("drop-shadow"),v=rt("blur"),m=rt("perspective"),g=rt("aspect"),y=rt("ease"),x=rt("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"],P=()=>[...S(),Z,X],C=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],A=()=>[Z,X,l],T=()=>[Zo,"full","auto",...A()],M=()=>[On,"none","subgrid",Z,X],_=()=>["auto",{span:["full",On,Z,X]},On,Z,X],k=()=>[On,"auto",Z,X],N=()=>["auto","min","max","fr",Z,X],R=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],z=()=>["start","end","center","stretch","center-safe","end-safe"],B=()=>["auto",...A()],F=()=>[Zo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...A()],j=()=>[e,Z,X],L=()=>[...S(),bx,yx,{position:[Z,X]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],re=()=>["auto","cover","contain",tz,QW,{size:[Z,X]}],le=()=>[nf,ia,no],ae=()=>["","none","full",c,Z,X],oe=()=>["",de,ia,no],Se=()=>["solid","dashed","dotted","double"],Me=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],K=()=>[de,nf,bx,yx],fe=()=>["","none",v,Z,X],$=()=>["none",de,Z,X],G=()=>["none",de,Z,X],W=()=>[de,Z,X],V=()=>[Zo,"full",...A()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[qr],breakpoint:[qr],color:[GW],container:[qr],"drop-shadow":[qr],ease:["in","out","in-out"],font:[ZW],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[qr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[qr],shadow:[qr],spacing:["px",de],text:[qr],"text-shadow":[qr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Zo,X,Z,g]}],container:["container"],columns:[{columns:[de,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:P()}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{start:T()}],end:[{end:T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:["visible","invisible","collapse"],z:[{z:[On,"auto",Z,X]}],basis:[{basis:[Zo,"full","auto",s,...A()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[de,Zo,"auto","initial","none",X]}],grow:[{grow:["",de,Z,X]}],shrink:[{shrink:["",de,Z,X]}],order:[{order:[On,"first","last","none",Z,X]}],"grid-cols":[{"grid-cols":M()}],"col-start-end":[{col:_()}],"col-start":[{"col-start":k()}],"col-end":[{"col-end":k()}],"grid-rows":[{"grid-rows":M()}],"row-start-end":[{row:_()}],"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":N()}],"auto-rows":[{"auto-rows":N()}],gap:[{gap:A()}],"gap-x":[{"gap-x":A()}],"gap-y":[{"gap-y":A()}],"justify-content":[{justify:[...R(),"normal"]}],"justify-items":[{"justify-items":[...z(),"normal"]}],"justify-self":[{"justify-self":["auto",...z()]}],"align-content":[{content:["normal",...R()]}],"align-items":[{items:[...z(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...z(),{baseline:["","last"]}]}],"place-content":[{"place-content":R()}],"place-items":[{"place-items":[...z(),"baseline"]}],"place-self":[{"place-self":["auto",...z()]}],p:[{p:A()}],px:[{px:A()}],py:[{py:A()}],ps:[{ps:A()}],pe:[{pe:A()}],pt:[{pt:A()}],pr:[{pr:A()}],pb:[{pb:A()}],pl:[{pl:A()}],m:[{m:B()}],mx:[{mx:B()}],my:[{my:B()}],ms:[{ms:B()}],me:[{me:B()}],mt:[{mt:B()}],mr:[{mr:B()}],mb:[{mb:B()}],ml:[{ml:B()}],"space-x":[{"space-x":A()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":A()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],w:[{w:[s,"screen",...F()]}],"min-w":[{"min-w":[s,"screen","none",...F()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh",...F()]}],"font-size":[{text:["base",r,ia,no]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Z,of]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",nf,X]}],"font-family":[{font:[ez,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":[de,"none",Z,of]}],leading:[{leading:[i,...A()]}],"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:j()}],"text-color":[{text:j()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Se(),"wavy"]}],"text-decoration-thickness":[{decoration:[de,"from-font","auto",Z,no]}],"text-decoration-color":[{decoration:j()}],"underline-offset":[{"underline-offset":[de,"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:A()}],"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:L()}],"bg-repeat":[{bg:H()}],"bg-size":[{bg:re()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},On,Z,X],radial:["",Z,X],conic:[On,Z,X]},rz,JW]}],"bg-color":[{bg:j()}],"gradient-from-pos":[{from:le()}],"gradient-via-pos":[{via:le()}],"gradient-to-pos":[{to:le()}],"gradient-from":[{from:j()}],"gradient-via":[{via:j()}],"gradient-to":[{to:j()}],rounded:[{rounded:ae()}],"rounded-s":[{"rounded-s":ae()}],"rounded-e":[{"rounded-e":ae()}],"rounded-t":[{"rounded-t":ae()}],"rounded-r":[{"rounded-r":ae()}],"rounded-b":[{"rounded-b":ae()}],"rounded-l":[{"rounded-l":ae()}],"rounded-ss":[{"rounded-ss":ae()}],"rounded-se":[{"rounded-se":ae()}],"rounded-ee":[{"rounded-ee":ae()}],"rounded-es":[{"rounded-es":ae()}],"rounded-tl":[{"rounded-tl":ae()}],"rounded-tr":[{"rounded-tr":ae()}],"rounded-br":[{"rounded-br":ae()}],"rounded-bl":[{"rounded-bl":ae()}],"border-w":[{border:oe()}],"border-w-x":[{"border-x":oe()}],"border-w-y":[{"border-y":oe()}],"border-w-s":[{"border-s":oe()}],"border-w-e":[{"border-e":oe()}],"border-w-t":[{"border-t":oe()}],"border-w-r":[{"border-r":oe()}],"border-w-b":[{"border-b":oe()}],"border-w-l":[{"border-l":oe()}],"divide-x":[{"divide-x":oe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":oe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Se(),"hidden","none"]}],"divide-style":[{divide:[...Se(),"hidden","none"]}],"border-color":[{border:j()}],"border-color-x":[{"border-x":j()}],"border-color-y":[{"border-y":j()}],"border-color-s":[{"border-s":j()}],"border-color-e":[{"border-e":j()}],"border-color-t":[{"border-t":j()}],"border-color-r":[{"border-r":j()}],"border-color-b":[{"border-b":j()}],"border-color-l":[{"border-l":j()}],"divide-color":[{divide:j()}],"outline-style":[{outline:[...Se(),"none","hidden"]}],"outline-offset":[{"outline-offset":[de,Z,X]}],"outline-w":[{outline:["",de,ia,no]}],"outline-color":[{outline:j()}],shadow:[{shadow:["","none",u,nl,rl]}],"shadow-color":[{shadow:j()}],"inset-shadow":[{"inset-shadow":["none",d,nl,rl]}],"inset-shadow-color":[{"inset-shadow":j()}],"ring-w":[{ring:oe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:j()}],"ring-offset-w":[{"ring-offset":[de,no]}],"ring-offset-color":[{"ring-offset":j()}],"inset-ring-w":[{"inset-ring":oe()}],"inset-ring-color":[{"inset-ring":j()}],"text-shadow":[{"text-shadow":["none",f,nl,rl]}],"text-shadow-color":[{"text-shadow":j()}],opacity:[{opacity:[de,Z,X]}],"mix-blend":[{"mix-blend":[...Me(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Me()}],"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":[de]}],"mask-image-linear-from-pos":[{"mask-linear-from":K()}],"mask-image-linear-to-pos":[{"mask-linear-to":K()}],"mask-image-linear-from-color":[{"mask-linear-from":j()}],"mask-image-linear-to-color":[{"mask-linear-to":j()}],"mask-image-t-from-pos":[{"mask-t-from":K()}],"mask-image-t-to-pos":[{"mask-t-to":K()}],"mask-image-t-from-color":[{"mask-t-from":j()}],"mask-image-t-to-color":[{"mask-t-to":j()}],"mask-image-r-from-pos":[{"mask-r-from":K()}],"mask-image-r-to-pos":[{"mask-r-to":K()}],"mask-image-r-from-color":[{"mask-r-from":j()}],"mask-image-r-to-color":[{"mask-r-to":j()}],"mask-image-b-from-pos":[{"mask-b-from":K()}],"mask-image-b-to-pos":[{"mask-b-to":K()}],"mask-image-b-from-color":[{"mask-b-from":j()}],"mask-image-b-to-color":[{"mask-b-to":j()}],"mask-image-l-from-pos":[{"mask-l-from":K()}],"mask-image-l-to-pos":[{"mask-l-to":K()}],"mask-image-l-from-color":[{"mask-l-from":j()}],"mask-image-l-to-color":[{"mask-l-to":j()}],"mask-image-x-from-pos":[{"mask-x-from":K()}],"mask-image-x-to-pos":[{"mask-x-to":K()}],"mask-image-x-from-color":[{"mask-x-from":j()}],"mask-image-x-to-color":[{"mask-x-to":j()}],"mask-image-y-from-pos":[{"mask-y-from":K()}],"mask-image-y-to-pos":[{"mask-y-to":K()}],"mask-image-y-from-color":[{"mask-y-from":j()}],"mask-image-y-to-color":[{"mask-y-to":j()}],"mask-image-radial":[{"mask-radial":[Z,X]}],"mask-image-radial-from-pos":[{"mask-radial-from":K()}],"mask-image-radial-to-pos":[{"mask-radial-to":K()}],"mask-image-radial-from-color":[{"mask-radial-from":j()}],"mask-image-radial-to-color":[{"mask-radial-to":j()}],"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":[de]}],"mask-image-conic-from-pos":[{"mask-conic-from":K()}],"mask-image-conic-to-pos":[{"mask-conic-to":K()}],"mask-image-conic-from-color":[{"mask-conic-from":j()}],"mask-image-conic-to-color":[{"mask-conic-to":j()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:re()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Z,X]}],filter:[{filter:["","none",Z,X]}],blur:[{blur:fe()}],brightness:[{brightness:[de,Z,X]}],contrast:[{contrast:[de,Z,X]}],"drop-shadow":[{"drop-shadow":["","none",h,nl,rl]}],"drop-shadow-color":[{"drop-shadow":j()}],grayscale:[{grayscale:["",de,Z,X]}],"hue-rotate":[{"hue-rotate":[de,Z,X]}],invert:[{invert:["",de,Z,X]}],saturate:[{saturate:[de,Z,X]}],sepia:[{sepia:["",de,Z,X]}],"backdrop-filter":[{"backdrop-filter":["","none",Z,X]}],"backdrop-blur":[{"backdrop-blur":fe()}],"backdrop-brightness":[{"backdrop-brightness":[de,Z,X]}],"backdrop-contrast":[{"backdrop-contrast":[de,Z,X]}],"backdrop-grayscale":[{"backdrop-grayscale":["",de,Z,X]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[de,Z,X]}],"backdrop-invert":[{"backdrop-invert":["",de,Z,X]}],"backdrop-opacity":[{"backdrop-opacity":[de,Z,X]}],"backdrop-saturate":[{"backdrop-saturate":[de,Z,X]}],"backdrop-sepia":[{"backdrop-sepia":["",de,Z,X]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":A()}],"border-spacing-x":[{"border-spacing-x":A()}],"border-spacing-y":[{"border-spacing-y":A()}],"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:[de,"initial",Z,X]}],ease:[{ease:["linear","initial",y,Z,X]}],delay:[{delay:[de,Z,X]}],animate:[{animate:["none",x,Z,X]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,Z,X]}],"perspective-origin":[{"perspective-origin":P()}],rotate:[{rotate:$()}],"rotate-x":[{"rotate-x":$()}],"rotate-y":[{"rotate-y":$()}],"rotate-z":[{"rotate-z":$()}],scale:[{scale:G()}],"scale-x":[{"scale-x":G()}],"scale-y":[{"scale-y":G()}],"scale-z":[{"scale-z":G()}],"scale-3d":["scale-3d"],skew:[{skew:W()}],"skew-x":[{"skew-x":W()}],"skew-y":[{"skew-y":W()}],transform:[{transform:[Z,X,"","none","gpu","cpu"]}],"transform-origin":[{origin:P()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:V()}],"translate-x":[{"translate-x":V()}],"translate-y":[{"translate-y":V()}],"translate-z":[{"translate-z":V()}],"translate-none":["translate-none"],accent:[{accent:j()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:j()}],"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":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"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",...j()]}],"stroke-w":[{stroke:[de,ia,no,of]}],stroke:[{stroke:["none",...j()]}],"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"]}},iz=(e,{cacheSize:t,prefix:r,experimentalParseClassName:n,extend:o={},override:i={}})=>(ya(e,"cacheSize",t),ya(e,"prefix",r),ya(e,"experimentalParseClassName",n),ol(e.theme,i.theme),ol(e.classGroups,i.classGroups),ol(e.conflictingClassGroups,i.conflictingClassGroups),ol(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),ya(e,"orderSensitiveModifiers",i.orderSensitiveModifiers),il(e.theme,o.theme),il(e.classGroups,o.classGroups),il(e.conflictingClassGroups,o.conflictingClassGroups),il(e.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),gE(e,o,"orderSensitiveModifiers"),e),ya=(e,t,r)=>{r!==void 0&&(e[t]=r)},ol=(e,t)=>{if(t)for(const r in t)ya(e,r,t[r])},il=(e,t)=>{if(t)for(const r in t)gE(e,t,r)},gE=(e,t,r)=>{const n=t[r];n!==void 0&&(e[r]=e[r]?e[r].concat(n):n)},az=(e,...t)=>typeof e=="function"?gx(xx,e,...t):gx(()=>iz(xx(),e),...t),sz=az({extend:{classGroups:{"font-size":[{text:["hero","h1","h2","h3","h4","lead","semi-lead","body-lg","body","body-sm","descriptive","small","label","label-sm"]}]}}});function D(...e){return sz(ve(e))}const yE=te("w-full",{variants:{variant:{default:"",bordered:"border-border rounded-lg border"}},defaultVariants:{variant:"default"}}),bE=p.forwardRef(({className:e,variant:t,...r},n)=>b.jsx(tW,{ref:n,className:D(yE({variant:t}),e),...r}));bE.displayName="Accordion";const xE=p.forwardRef(({className:e,...t},r)=>b.jsx(rW,{ref:r,className:D("border-border border-b last:border-b-0",e),...t}));xE.displayName="AccordionItem";const wE=te(["flex flex-1 items-center justify-between py-4 text-left font-sans font-normal transition-all","text-primary hover:underline","focus-visible:ring-sunflower focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none","[&[data-state=open]>svg]:rotate-180"],{variants:{size:{sm:"text-small py-3",default:"text-body py-4",lg:"text-lead py-5"}},defaultVariants:{size:"default"}}),SE=p.forwardRef(({className:e,children:t,size:r,...n},o)=>b.jsx(nW,{className:"flex",children:b.jsxs(oW,{ref:o,className:D(wE({size:r}),e),...n,children:[t,b.jsx(rE,{className:"text-secondary h-4 w-4 shrink-0 transition-transform duration-200"})]})}));SE.displayName="AccordionTrigger";const PE=p.forwardRef(({className:e,children:t,...r},n)=>b.jsx(iW,{ref:n,className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",...r,children:b.jsx("div",{className:D("text-secondary pt-0 pb-4",e),children:t})}));PE.displayName="AccordionContent";function Et(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...r)=>t.current?.(...r),[])}function lz(e,t=globalThis?.document){const r=Et(e);p.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 cz="DismissableLayer",wh="dismissableLayer.update",uz="dismissableLayer.pointerDownOutside",dz="dismissableLayer.focusOutside",wx,CE=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Fo=p.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,c=p.useContext(CE),[u,d]=p.useState(null),f=u?.ownerDocument??globalThis?.document,[,h]=p.useState({}),v=ie(t,E=>d(E)),m=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(g),x=u?m.indexOf(u):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,S=x>=y,P=pz(E=>{const A=E.target,T=[...c.branches].some(M=>M.contains(A));!S||T||(o?.(E),a?.(E),E.defaultPrevented||s?.())},f),C=hz(E=>{const A=E.target;[...c.branches].some(M=>M.contains(A))||(i?.(E),a?.(E),E.defaultPrevented||s?.())},f);return lz(E=>{x===c.layers.size-1&&(n?.(E),!E.defaultPrevented&&s&&(E.preventDefault(),s()))},f),p.useEffect(()=>{if(u)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(wx=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),Sx(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=wx)}},[u,f,r,c]),p.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),Sx())},[u,c]),p.useEffect(()=>{const E=()=>h({});return document.addEventListener(wh,E),()=>document.removeEventListener(wh,E)},[]),b.jsx(ee.div,{...l,ref:v,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:U(e.onFocusCapture,C.onFocusCapture),onBlurCapture:U(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:U(e.onPointerDownCapture,P.onPointerDownCapture)})});Fo.displayName=cz;var fz="DismissableLayerBranch",OE=p.forwardRef((e,t)=>{const r=p.useContext(CE),n=p.useRef(null),o=ie(t,n);return p.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})});OE.displayName=fz;function pz(e,t=globalThis?.document){const r=Et(e),n=p.useRef(!1),o=p.useRef(()=>{});return p.useEffect(()=>{const i=s=>{if(s.target&&!n.current){let l=function(){EE(uz,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 hz(e,t=globalThis?.document){const r=Et(e),n=p.useRef(!1);return p.useEffect(()=>{const o=i=>{i.target&&!n.current&&EE(dz,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 Sx(){const e=new CustomEvent(wh);document.dispatchEvent(e)}function EE(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?vv(o,i):o.dispatchEvent(i)}var mz=Fo,vz=OE,af="focusScope.autoFocusOnMount",sf="focusScope.autoFocusOnUnmount",Px={bubbles:!1,cancelable:!0},gz="FocusScope",ss=p.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,l]=p.useState(null),c=Et(o),u=Et(i),d=p.useRef(null),f=ie(t,m=>l(m)),h=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(n){let m=function(w){if(h.paused||!s)return;const S=w.target;s.contains(S)?d.current=S:An(d.current,{select:!0})},g=function(w){if(h.paused||!s)return;const S=w.relatedTarget;S!==null&&(s.contains(S)||An(d.current,{select:!0}))},y=function(w){if(document.activeElement===document.body)for(const P of w)P.removedNodes.length>0&&An(s)};document.addEventListener("focusin",m),document.addEventListener("focusout",g);const x=new MutationObserver(y);return s&&x.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",g),x.disconnect()}}},[n,s,h.paused]),p.useEffect(()=>{if(s){Ox.add(h);const m=document.activeElement;if(!s.contains(m)){const y=new CustomEvent(af,Px);s.addEventListener(af,c),s.dispatchEvent(y),y.defaultPrevented||(yz(Pz(AE(s)),{select:!0}),document.activeElement===m&&An(s))}return()=>{s.removeEventListener(af,c),setTimeout(()=>{const y=new CustomEvent(sf,Px);s.addEventListener(sf,u),s.dispatchEvent(y),y.defaultPrevented||An(m??document.body,{select:!0}),s.removeEventListener(sf,u),Ox.remove(h)},0)}}},[s,c,u,h]);const v=p.useCallback(m=>{if(!r&&!n||h.paused)return;const g=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(g&&y){const x=m.currentTarget,[w,S]=bz(x);w&&S?!m.shiftKey&&y===S?(m.preventDefault(),r&&An(w,{select:!0})):m.shiftKey&&y===w&&(m.preventDefault(),r&&An(S,{select:!0})):y===x&&m.preventDefault()}},[r,n,h.paused]);return b.jsx(ee.div,{tabIndex:-1,...a,ref:f,onKeyDown:v})});ss.displayName=gz;function yz(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(An(n,{select:t}),document.activeElement!==r)return}function bz(e){const t=AE(e),r=Cx(t,e),n=Cx(t.reverse(),e);return[r,n]}function AE(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 Cx(e,t){for(const r of e)if(!xz(r,{upTo:t}))return r}function xz(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 wz(e){return e instanceof HTMLInputElement&&"select"in e}function An(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&wz(e)&&t&&e.select()}}var Ox=Sz();function Sz(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=Ex(e,t),e.unshift(t)},remove(t){e=Ex(e,t),e[0]?.resume()}}}function Ex(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Pz(e){return e.filter(t=>t.tagName!=="A")}var Cz="Portal",Bo=p.forwardRef((e,t)=>{const{container:r,...n}=e,[o,i]=p.useState(!1);pt(()=>i(!0),[]);const a=r||o&&globalThis?.document?.body;return a?is.createPortal(b.jsx(ee.div,{...n,ref:t}),a):null});Bo.displayName=Cz;var lf=0;function Pu(){p.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ax()),document.body.insertAdjacentElement("beforeend",e[1]??Ax()),lf++,()=>{lf===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),lf--}},[])}function Ax(){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 _r=function(){return _r=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},_r.apply(this,arguments)};function TE(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 Oz(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 Bl="right-scroll-bar-position",Wl="width-before-scroll-bar",Ez="with-scroll-bars-hidden",Az="--removed-body-scroll-bar-size";function cf(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Tz(e,t){var r=O.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 Mz=typeof window<"u"?p.useLayoutEffect:p.useEffect,Tx=new WeakMap;function kz(e,t){var r=Tz(null,function(n){return e.forEach(function(o){return cf(o,n)})});return Mz(function(){var n=Tx.get(r);if(n){var o=new Set(n),i=new Set(e),a=r.current;o.forEach(function(s){i.has(s)||cf(s,null)}),i.forEach(function(s){o.has(s)||cf(s,a)})}Tx.set(r,e)},[e]),r}function Dz(e){return e}function _z(e,t){t===void 0&&(t=Dz);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 Nz(e){e===void 0&&(e={});var t=_z(null);return t.options=_r({async:!0,ssr:!1},e),t}var ME=function(e){var t=e.sideCar,r=TE(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 p.createElement(n,_r({},r))};ME.isSideCarExport=!0;function jz(e,t){return e.useMedium(t),ME}var kE=Nz(),uf=function(){},Cu=p.forwardRef(function(e,t){var r=p.useRef(null),n=p.useState({onScrollCapture:uf,onWheelCapture:uf,onTouchMoveCapture:uf}),o=n[0],i=n[1],a=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,h=e.noRelative,v=e.noIsolation,m=e.inert,g=e.allowPinchZoom,y=e.as,x=y===void 0?"div":y,w=e.gapMode,S=TE(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=f,C=kz([r,t]),E=_r(_r({},S),o);return p.createElement(p.Fragment,null,u&&p.createElement(P,{sideCar:kE,removeScrollBar:c,shards:d,noRelative:h,noIsolation:v,inert:m,setCallbacks:i,allowPinchZoom:!!g,lockRef:r,gapMode:w}),a?p.cloneElement(p.Children.only(s),_r(_r({},E),{ref:C})):p.createElement(x,_r({},E,{className:l,ref:C}),s))});Cu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Cu.classNames={fullWidth:Wl,zeroRight:Bl};var Iz=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Rz(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Iz();return t&&e.setAttribute("nonce",t),e}function Lz(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function $z(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Vz=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Rz())&&(Lz(t,r),$z(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Fz=function(){var e=Vz();return function(t,r){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},DE=function(){var e=Fz(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},Bz={left:0,top:0,right:0,gap:0},df=function(e){return parseInt(e||"",10)||0},Wz=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[df(r),df(n),df(o)]},zz=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Bz;var t=Wz(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])}},Kz=DE(),yi="data-scroll-locked",Uz=function(e,t,r,n){var o=e.left,i=e.top,a=e.right,s=e.gap;return r===void 0&&(r="margin"),`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react/jsx-runtime"),O=require("react"),is=require("react-dom");function NO(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 p=NO(O),as=NO(is);function xB(e,t){const r=p.createContext(t),n=i=>{const{children:a,...s}=i,l=p.useMemo(()=>s,Object.values(s));return b.jsx(r.Provider,{value:l,children:a})};n.displayName=e+"Provider";function o(i){const a=p.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=p.createContext(a),l=r.length;r=[...r,a];const c=d=>{const{scope:f,children:h,...v}=d,m=f?.[e]?.[l]||s,g=p.useMemo(()=>v,Object.values(v));return b.jsx(m.Provider,{value:g,children:h})};c.displayName=i+"Provider";function u(d,f){const h=f?.[e]?.[l]||s,v=p.useContext(h);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const o=()=>{const i=r.map(a=>p.createContext(a));return function(s){const l=s?.[e]||i;return p.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[n,wB(o,...t)]}function wB(...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 d=l(i)[`__scope${c}`];return{...s,...d}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}function cx(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Hr(...e){return t=>{let r=!1;const n=e.map(o=>{const i=cx(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():cx(e[o],null)}}}}function ie(...e){return p.useCallback(Hr(...e),e)}function ux(e){const t=SB(e),r=p.forwardRef((n,o)=>{const{children:i,...a}=n,s=p.Children.toArray(i),l=s.find(CB);if(l){const c=l.props.children,u=s.map(d=>d===l?p.Children.count(c)>1?p.Children.only(null):p.isValidElement(c)?c.props.children:null:d);return b.jsx(t,{...a,ref:o,children:p.isValidElement(c)?p.cloneElement(c,void 0,u):null})}return b.jsx(t,{...a,ref:o,children:i})});return r.displayName=`${e}.Slot`,r}function SB(e){const t=p.forwardRef((r,n)=>{const{children:o,...i}=r;if(p.isValidElement(o)){const a=EB(o),s=OB(i,o.props);return o.type!==p.Fragment&&(s.ref=n?Hr(n,a):a),p.cloneElement(o,s)}return p.Children.count(o)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var PB=Symbol("radix.slottable");function CB(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===PB}function OB(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 EB(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 Ri(e){const t=e+"CollectionProvider",[r,n]=it(t),[o,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),a=m=>{const{scope:g,children:y}=m,x=O.useRef(null),w=O.useRef(new Map).current;return b.jsx(o,{scope:g,itemMap:w,collectionRef:x,children:y})};a.displayName=t;const s=e+"CollectionSlot",l=ux(s),c=O.forwardRef((m,g)=>{const{scope:y,children:x}=m,w=i(s,y),S=ie(g,w.collectionRef);return b.jsx(l,{ref:S,children:x})});c.displayName=s;const u=e+"CollectionItemSlot",d="data-radix-collection-item",f=ux(u),h=O.forwardRef((m,g)=>{const{scope:y,children:x,...w}=m,S=O.useRef(null),P=ie(g,S),C=i(u,y);return O.useEffect(()=>(C.itemMap.set(S,{ref:S,...w}),()=>{C.itemMap.delete(S)})),b.jsx(f,{[d]:"",ref:P,children:x})});h.displayName=u;function v(m){const g=i(e+"CollectionConsumer",m);return O.useCallback(()=>{const x=g.collectionRef.current;if(!x)return[];const w=Array.from(x.querySelectorAll(`[${d}]`));return Array.from(g.itemMap.values()).sort((C,E)=>w.indexOf(C.ref.current)-w.indexOf(E.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:a,Slot:c,ItemSlot:h},v,n]}function U(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),r===!1||!o.defaultPrevented)return t?.(o)}}var pt=globalThis?.document?p.useLayoutEffect:()=>{},AB=p[" useInsertionEffect ".trim().toString()]||pt;function xt({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,i,a]=TB({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:o;{const u=p.useRef(e!==void 0);p.useEffect(()=>{const d=u.current;d!==s&&console.warn(`${n} is changing from ${d?"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=p.useCallback(u=>{if(s){const d=MB(u)?u(e):u;d!==e&&a.current?.(d)}else i(u)},[s,e,i,a]);return[l,c]}function TB({defaultProp:e,onChange:t}){const[r,n]=p.useState(e),o=p.useRef(r),i=p.useRef(t);return AB(()=>{i.current=t},[t]),p.useEffect(()=>{o.current!==r&&(i.current?.(r),o.current=r)},[r,o]),[r,n,i]}function MB(e){return typeof e=="function"}function kB(e){const t=DB(e),r=p.forwardRef((n,o)=>{const{children:i,...a}=n,s=p.Children.toArray(i),l=s.find(NB);if(l){const c=l.props.children,u=s.map(d=>d===l?p.Children.count(c)>1?p.Children.only(null):p.isValidElement(c)?c.props.children:null:d);return b.jsx(t,{...a,ref:o,children:p.isValidElement(c)?p.cloneElement(c,void 0,u):null})}return b.jsx(t,{...a,ref:o,children:i})});return r.displayName=`${e}.Slot`,r}function DB(e){const t=p.forwardRef((r,n)=>{const{children:o,...i}=r;if(p.isValidElement(o)){const a=IB(o),s=jB(i,o.props);return o.type!==p.Fragment&&(s.ref=n?Hr(n,a):a),p.cloneElement(o,s)}return p.Children.count(o)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var _B=Symbol("radix.slottable");function NB(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===_B}function jB(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 IB(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 RB=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ee=RB.reduce((e,t)=>{const r=kB(`Primitive.${t}`),n=p.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 gv(e,t){e&&as.flushSync(()=>e.dispatchEvent(t))}function LB(e,t){return p.useReducer((r,n)=>t[r][n]??r,e)}var At=e=>{const{present:t,children:r}=e,n=$B(t),o=typeof r=="function"?r({present:n.isPresent}):p.Children.only(r),i=ie(n.ref,VB(o));return typeof r=="function"||n.isPresent?p.cloneElement(o,{ref:i}):null};At.displayName="Presence";function $B(e){const[t,r]=p.useState(),n=p.useRef(null),o=p.useRef(e),i=p.useRef("none"),a=e?"mounted":"unmounted",[s,l]=LB(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const c=tl(n.current);i.current=s==="mounted"?c:"none"},[s]),pt(()=>{const c=n.current,u=o.current;if(u!==e){const f=i.current,h=tl(c);e?l("MOUNT"):h==="none"||c?.display==="none"?l("UNMOUNT"):l(u&&f!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),pt(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=h=>{const m=tl(n.current).includes(CSS.escape(h.animationName));if(h.target===t&&m&&(l("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},f=h=>{h.target===t&&(i.current=tl(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:p.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function tl(e){return e?.animationName||"none"}function VB(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 FB=p[" useId ".trim().toString()]||(()=>{}),BB=0;function It(e){const[t,r]=p.useState(FB());return pt(()=>{r(n=>n??String(BB++))},[e]),e||(t?`radix-${t}`:"")}var xu="Collapsible",[WB,jO]=it(xu),[zB,yv]=WB(xu),IO=p.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:i,onOpenChange:a,...s}=e,[l,c]=xt({prop:n,defaultProp:o??!1,onChange:a,caller:xu});return b.jsx(zB,{scope:r,disabled:i,contentId:It(),open:l,onOpenToggle:p.useCallback(()=>c(u=>!u),[c]),children:b.jsx(ee.div,{"data-state":xv(l),"data-disabled":i?"":void 0,...s,ref:t})})});IO.displayName=xu;var RO="CollapsibleTrigger",LO=p.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,o=yv(RO,r);return b.jsx(ee.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":xv(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...n,ref:t,onClick:U(e.onClick,o.onOpenToggle)})});LO.displayName=RO;var bv="CollapsibleContent",$O=p.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=yv(bv,e.__scopeCollapsible);return b.jsx(At,{present:r||o.open,children:({present:i})=>b.jsx(KB,{...n,ref:t,present:i})})});$O.displayName=bv;var KB=p.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:o,...i}=e,a=yv(bv,r),[s,l]=p.useState(n),c=p.useRef(null),u=ie(t,c),d=p.useRef(0),f=d.current,h=p.useRef(0),v=h.current,m=a.open||s,g=p.useRef(m),y=p.useRef(void 0);return p.useEffect(()=>{const x=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(x)},[]),pt(()=>{const x=c.current;if(x){y.current=y.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const w=x.getBoundingClientRect();d.current=w.height,h.current=w.width,g.current||(x.style.transitionDuration=y.current.transitionDuration,x.style.animationName=y.current.animationName),l(n)}},[a.open,n]),b.jsx(ee.div,{"data-state":xv(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!m,...i,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...e.style},children:m&&o})});function xv(e){return e?"open":"closed"}var VO=IO,FO=LO,BO=$O,UB=p.createContext(void 0);function Li(e){const t=p.useContext(UB);return e||t||"ltr"}var Pr="Accordion",HB=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[wv,GB,YB]=Ri(Pr),[wu]=it(Pr,[YB,jO]),Sv=jO(),WO=O.forwardRef((e,t)=>{const{type:r,...n}=e,o=n,i=n;return b.jsx(wv.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?b.jsx(QB,{...i,ref:t}):b.jsx(ZB,{...o,ref:t})})});WO.displayName=Pr;var[zO,qB]=wu(Pr),[KO,XB]=wu(Pr,{collapsible:!1}),ZB=O.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},collapsible:i=!1,...a}=e,[s,l]=xt({prop:r,defaultProp:n??"",onChange:o,caller:Pr});return b.jsx(zO,{scope:e.__scopeAccordion,value:O.useMemo(()=>s?[s]:[],[s]),onItemOpen:l,onItemClose:O.useCallback(()=>i&&l(""),[i,l]),children:b.jsx(KO,{scope:e.__scopeAccordion,collapsible:i,children:b.jsx(UO,{...a,ref:t})})})}),QB=O.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...i}=e,[a,s]=xt({prop:r,defaultProp:n??[],onChange:o,caller:Pr}),l=O.useCallback(u=>s((d=[])=>[...d,u]),[s]),c=O.useCallback(u=>s((d=[])=>d.filter(f=>f!==u)),[s]);return b.jsx(zO,{scope:e.__scopeAccordion,value:a,onItemOpen:l,onItemClose:c,children:b.jsx(KO,{scope:e.__scopeAccordion,collapsible:!0,children:b.jsx(UO,{...i,ref:t})})})}),[JB,Su]=wu(Pr),UO=O.forwardRef((e,t)=>{const{__scopeAccordion:r,disabled:n,dir:o,orientation:i="vertical",...a}=e,s=O.useRef(null),l=ie(s,t),c=GB(r),d=Li(o)==="ltr",f=U(e.onKeyDown,h=>{if(!HB.includes(h.key))return;const v=h.target,m=c().filter(A=>!A.ref.current?.disabled),g=m.findIndex(A=>A.ref.current===v),y=m.length;if(g===-1)return;h.preventDefault();let x=g;const w=0,S=y-1,P=()=>{x=g+1,x>S&&(x=w)},C=()=>{x=g-1,x<w&&(x=S)};switch(h.key){case"Home":x=w;break;case"End":x=S;break;case"ArrowRight":i==="horizontal"&&(d?P():C());break;case"ArrowDown":i==="vertical"&&P();break;case"ArrowLeft":i==="horizontal"&&(d?C():P());break;case"ArrowUp":i==="vertical"&&C();break}const E=x%y;m[E].ref.current?.focus()});return b.jsx(JB,{scope:r,disabled:n,direction:o,orientation:i,children:b.jsx(wv.Slot,{scope:r,children:b.jsx(ee.div,{...a,"data-orientation":i,ref:l,onKeyDown:n?void 0:f})})})}),nc="AccordionItem",[eW,Pv]=wu(nc),HO=O.forwardRef((e,t)=>{const{__scopeAccordion:r,value:n,...o}=e,i=Su(nc,r),a=qB(nc,r),s=Sv(r),l=It(),c=n&&a.value.includes(n)||!1,u=i.disabled||e.disabled;return b.jsx(eW,{scope:r,open:c,disabled:u,triggerId:l,children:b.jsx(VO,{"data-orientation":i.orientation,"data-state":QO(c),...s,...o,ref:t,disabled:u,open:c,onOpenChange:d=>{d?a.onItemOpen(n):a.onItemClose(n)}})})});HO.displayName=nc;var GO="AccordionHeader",YO=O.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=Su(Pr,r),i=Pv(GO,r);return b.jsx(ee.h3,{"data-orientation":o.orientation,"data-state":QO(i.open),"data-disabled":i.disabled?"":void 0,...n,ref:t})});YO.displayName=GO;var xh="AccordionTrigger",qO=O.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=Su(Pr,r),i=Pv(xh,r),a=XB(xh,r),s=Sv(r);return b.jsx(wv.ItemSlot,{scope:r,children:b.jsx(FO,{"aria-disabled":i.open&&!a.collapsible||void 0,"data-orientation":o.orientation,id:i.triggerId,...s,...n,ref:t})})});qO.displayName=xh;var XO="AccordionContent",ZO=O.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=Su(Pr,r),i=Pv(XO,r),a=Sv(r);return b.jsx(BO,{role:"region","aria-labelledby":i.triggerId,"data-orientation":o.orientation,...a,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});ZO.displayName=XO;function QO(e){return e?"open":"closed"}var tW=WO,rW=HO,nW=YO,oW=qO,iW=ZO;function JO(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=JO(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function ve(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=JO(e))&&(n&&(n+=" "),n+=t);return n}const dx=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,fx=ve,te=(e,t)=>r=>{var n;if(t?.variants==null)return fx(e,r?.class,r?.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(c=>{const u=r?.[c],d=i?.[c];if(u===null)return null;const f=dx(u)||dx(d);return o[c][f]}),s=r&&Object.entries(r).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,u)=>{let{class:d,className:f,...h}=u;return Object.entries(h).every(v=>{let[m,g]=v;return Array.isArray(g)?g.includes({...i,...s}[m]):{...i,...s}[m]===g})?[...c,d,f]:c},[]);return fx(e,a,l,r?.class,r?.className)};const eE=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();const aW=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const sW=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase());const px=e=>{const t=sW(e);return t.charAt(0).toUpperCase()+t.slice(1)};var lW={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 cW=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const uW=O.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:i,iconNode:a,...s},l)=>O.createElement("svg",{ref:l,...lW,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:eE("lucide",o),...!i&&!cW(s)&&{"aria-hidden":"true"},...s},[...a.map(([c,u])=>O.createElement(c,u)),...Array.isArray(i)?i:[i]]));const Hn=(e,t)=>{const r=O.forwardRef(({className:n,...o},i)=>O.createElement(uW,{ref:i,iconNode:t,className:eE(`lucide-${aW(px(e))}`,`lucide-${e}`,n),...o}));return r.displayName=px(e),r};const dW=[["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"}]],Cv=Hn("calendar",dW);const fW=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],tE=Hn("check",fW);const pW=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],rE=Hn("chevron-down",pW);const hW=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Ov=Hn("chevron-left",hW);const mW=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ev=Hn("chevron-right",mW);const vW=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],gW=Hn("clock",vW);const yW=[["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"}]],nE=Hn("ellipsis",yW);const bW=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],oE=Hn("x",bW),xW=(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},wW=(e,t)=>({classGroupId:e,validator:t}),iE=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),oc="-",hx=[],SW="arbitrary..",PW=e=>{const t=OW(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return CW(a);const s=a.split(oc),l=s[0]===""&&s.length>1?1:0;return aE(s,l,t)},getConflictingClassGroupIds:(a,s)=>{if(s){const l=n[a],c=r[a];return l?c?xW(c,l):l:c||hx}return r[a]||hx}}},aE=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const o=e[t],i=r.nextPart.get(o);if(i){const c=aE(e,t+1,i);if(c)return c}const a=r.validators;if(a===null)return;const s=t===0?e.join(oc):e.slice(t).join(oc),l=a.length;for(let c=0;c<l;c++){const u=a[c];if(u.validator(s))return u.classGroupId}},CW=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?SW+n:void 0})(),OW=e=>{const{theme:t,classGroups:r}=e;return EW(r,t)},EW=(e,t)=>{const r=iE();for(const n in e){const o=e[n];Av(o,r,n,t)}return r},Av=(e,t,r,n)=>{const o=e.length;for(let i=0;i<o;i++){const a=e[i];AW(a,t,r,n)}},AW=(e,t,r,n)=>{if(typeof e=="string"){TW(e,t,r);return}if(typeof e=="function"){MW(e,t,r,n);return}kW(e,t,r,n)},TW=(e,t,r)=>{const n=e===""?t:sE(t,e);n.classGroupId=r},MW=(e,t,r,n)=>{if(DW(e)){Av(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(wW(r,e))},kW=(e,t,r,n)=>{const o=Object.entries(e),i=o.length;for(let a=0;a<i;a++){const[s,l]=o[a];Av(l,sE(t,s),r,n)}},sE=(e,t)=>{let r=e;const n=t.split(oc),o=n.length;for(let i=0;i<o;i++){const a=n[i];let s=r.nextPart.get(a);s||(s=iE(),r.nextPart.set(a,s)),r=s}return r},DW=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,_W=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)}}},wh="!",mx=":",NW=[],vx=(e,t,r,n,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:o}),jW=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 g=o[m];if(a===0&&s===0){if(g===mx){i.push(o.slice(l,m)),l=m+1;continue}if(g==="/"){c=m;continue}}g==="["?a++:g==="]"?a--:g==="("?s++:g===")"&&s--}const d=i.length===0?o:o.slice(l);let f=d,h=!1;d.endsWith(wh)?(f=d.slice(0,-1),h=!0):d.startsWith(wh)&&(f=d.slice(1),h=!0);const v=c&&c>l?c-l:void 0;return vx(i,h,f,v)};if(t){const o=t+mx,i=n;n=a=>a.startsWith(o)?i(a.slice(o.length)):vx(NW,!1,a,void 0,!0)}if(r){const o=n;n=i=>r({className:i,parseClassName:o})}return n},IW=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}},RW=e=>({cache:_W(e.cacheSize),parseClassName:jW(e),sortModifiers:IW(e),...PW(e)}),LW=/\s+/,$W=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(LW);let l="";for(let c=s.length-1;c>=0;c-=1){const u=s[c],{isExternal:d,modifiers:f,hasImportantModifier:h,baseClassName:v,maybePostfixModifierPosition:m}=r(u);if(d){l=u+(l.length>0?" "+l:l);continue}let g=!!m,y=n(g?v.substring(0,m):v);if(!y){if(!g){l=u+(l.length>0?" "+l:l);continue}if(y=n(v),!y){l=u+(l.length>0?" "+l:l);continue}g=!1}const x=f.length===0?"":f.length===1?f[0]:i(f).join(":"),w=h?x+wh:x,S=w+y;if(a.indexOf(S)>-1)continue;a.push(S);const P=o(y,g);for(let C=0;C<P.length;++C){const E=P[C];a.push(w+E)}l=u+(l.length>0?" "+l:l)}return l},VW=(...e)=>{let t=0,r,n,o="";for(;t<e.length;)(r=e[t++])&&(n=lE(r))&&(o&&(o+=" "),o+=n);return o},lE=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=lE(e[n]))&&(r&&(r+=" "),r+=t);return r},gx=(e,...t)=>{let r,n,o,i;const a=l=>{const c=t.reduce((u,d)=>d(u),e());return r=RW(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=$W(l,r);return o(l,u),u};return i=a,(...l)=>i(VW(...l))},FW=[],rt=e=>{const t=r=>r[e]||FW;return t.isThemeGetter=!0,t},cE=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,uE=/^\((?:(\w[\w-]*):)?(.+)\)$/i,BW=/^\d+\/\d+$/,WW=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zW=/\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$/,KW=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,UW=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,HW=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Zo=e=>BW.test(e),de=e=>!!e&&!Number.isNaN(Number(e)),On=e=>!!e&&Number.isInteger(Number(e)),of=e=>e.endsWith("%")&&de(e.slice(0,-1)),qr=e=>WW.test(e),GW=()=>!0,YW=e=>zW.test(e)&&!KW.test(e),dE=()=>!1,qW=e=>UW.test(e),XW=e=>HW.test(e),ZW=e=>!X(e)&&!Z(e),QW=e=>$i(e,hE,dE),X=e=>cE.test(e),no=e=>$i(e,mE,YW),af=e=>$i(e,nz,de),yx=e=>$i(e,fE,dE),JW=e=>$i(e,pE,XW),rl=e=>$i(e,vE,qW),Z=e=>uE.test(e),ia=e=>Vi(e,mE),ez=e=>Vi(e,oz),bx=e=>Vi(e,fE),tz=e=>Vi(e,hE),rz=e=>Vi(e,pE),nl=e=>Vi(e,vE,!0),$i=(e,t,r)=>{const n=cE.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Vi=(e,t,r=!1)=>{const n=uE.exec(e);return n?n[1]?t(n[1]):r:!1},fE=e=>e==="position"||e==="percentage",pE=e=>e==="image"||e==="url",hE=e=>e==="length"||e==="size"||e==="bg-size",mE=e=>e==="length",nz=e=>e==="number",oz=e=>e==="family-name",vE=e=>e==="shadow",xx=()=>{const e=rt("color"),t=rt("font"),r=rt("text"),n=rt("font-weight"),o=rt("tracking"),i=rt("leading"),a=rt("breakpoint"),s=rt("container"),l=rt("spacing"),c=rt("radius"),u=rt("shadow"),d=rt("inset-shadow"),f=rt("text-shadow"),h=rt("drop-shadow"),v=rt("blur"),m=rt("perspective"),g=rt("aspect"),y=rt("ease"),x=rt("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"],P=()=>[...S(),Z,X],C=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],A=()=>[Z,X,l],T=()=>[Zo,"full","auto",...A()],M=()=>[On,"none","subgrid",Z,X],_=()=>["auto",{span:["full",On,Z,X]},On,Z,X],k=()=>[On,"auto",Z,X],N=()=>["auto","min","max","fr",Z,X],R=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],z=()=>["start","end","center","stretch","center-safe","end-safe"],B=()=>["auto",...A()],F=()=>[Zo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...A()],j=()=>[e,Z,X],L=()=>[...S(),bx,yx,{position:[Z,X]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],re=()=>["auto","cover","contain",tz,QW,{size:[Z,X]}],le=()=>[of,ia,no],ae=()=>["","none","full",c,Z,X],oe=()=>["",de,ia,no],Se=()=>["solid","dashed","dotted","double"],Me=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],K=()=>[de,of,bx,yx],fe=()=>["","none",v,Z,X],$=()=>["none",de,Z,X],G=()=>["none",de,Z,X],W=()=>[de,Z,X],V=()=>[Zo,"full",...A()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[qr],breakpoint:[qr],color:[GW],container:[qr],"drop-shadow":[qr],ease:["in","out","in-out"],font:[ZW],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[qr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[qr],shadow:[qr],spacing:["px",de],text:[qr],"text-shadow":[qr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Zo,X,Z,g]}],container:["container"],columns:[{columns:[de,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:P()}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{start:T()}],end:[{end:T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:["visible","invisible","collapse"],z:[{z:[On,"auto",Z,X]}],basis:[{basis:[Zo,"full","auto",s,...A()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[de,Zo,"auto","initial","none",X]}],grow:[{grow:["",de,Z,X]}],shrink:[{shrink:["",de,Z,X]}],order:[{order:[On,"first","last","none",Z,X]}],"grid-cols":[{"grid-cols":M()}],"col-start-end":[{col:_()}],"col-start":[{"col-start":k()}],"col-end":[{"col-end":k()}],"grid-rows":[{"grid-rows":M()}],"row-start-end":[{row:_()}],"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":N()}],"auto-rows":[{"auto-rows":N()}],gap:[{gap:A()}],"gap-x":[{"gap-x":A()}],"gap-y":[{"gap-y":A()}],"justify-content":[{justify:[...R(),"normal"]}],"justify-items":[{"justify-items":[...z(),"normal"]}],"justify-self":[{"justify-self":["auto",...z()]}],"align-content":[{content:["normal",...R()]}],"align-items":[{items:[...z(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...z(),{baseline:["","last"]}]}],"place-content":[{"place-content":R()}],"place-items":[{"place-items":[...z(),"baseline"]}],"place-self":[{"place-self":["auto",...z()]}],p:[{p:A()}],px:[{px:A()}],py:[{py:A()}],ps:[{ps:A()}],pe:[{pe:A()}],pt:[{pt:A()}],pr:[{pr:A()}],pb:[{pb:A()}],pl:[{pl:A()}],m:[{m:B()}],mx:[{mx:B()}],my:[{my:B()}],ms:[{ms:B()}],me:[{me:B()}],mt:[{mt:B()}],mr:[{mr:B()}],mb:[{mb:B()}],ml:[{ml:B()}],"space-x":[{"space-x":A()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":A()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],w:[{w:[s,"screen",...F()]}],"min-w":[{"min-w":[s,"screen","none",...F()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh",...F()]}],"font-size":[{text:["base",r,ia,no]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Z,af]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",of,X]}],"font-family":[{font:[ez,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":[de,"none",Z,af]}],leading:[{leading:[i,...A()]}],"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:j()}],"text-color":[{text:j()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Se(),"wavy"]}],"text-decoration-thickness":[{decoration:[de,"from-font","auto",Z,no]}],"text-decoration-color":[{decoration:j()}],"underline-offset":[{"underline-offset":[de,"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:A()}],"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:L()}],"bg-repeat":[{bg:H()}],"bg-size":[{bg:re()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},On,Z,X],radial:["",Z,X],conic:[On,Z,X]},rz,JW]}],"bg-color":[{bg:j()}],"gradient-from-pos":[{from:le()}],"gradient-via-pos":[{via:le()}],"gradient-to-pos":[{to:le()}],"gradient-from":[{from:j()}],"gradient-via":[{via:j()}],"gradient-to":[{to:j()}],rounded:[{rounded:ae()}],"rounded-s":[{"rounded-s":ae()}],"rounded-e":[{"rounded-e":ae()}],"rounded-t":[{"rounded-t":ae()}],"rounded-r":[{"rounded-r":ae()}],"rounded-b":[{"rounded-b":ae()}],"rounded-l":[{"rounded-l":ae()}],"rounded-ss":[{"rounded-ss":ae()}],"rounded-se":[{"rounded-se":ae()}],"rounded-ee":[{"rounded-ee":ae()}],"rounded-es":[{"rounded-es":ae()}],"rounded-tl":[{"rounded-tl":ae()}],"rounded-tr":[{"rounded-tr":ae()}],"rounded-br":[{"rounded-br":ae()}],"rounded-bl":[{"rounded-bl":ae()}],"border-w":[{border:oe()}],"border-w-x":[{"border-x":oe()}],"border-w-y":[{"border-y":oe()}],"border-w-s":[{"border-s":oe()}],"border-w-e":[{"border-e":oe()}],"border-w-t":[{"border-t":oe()}],"border-w-r":[{"border-r":oe()}],"border-w-b":[{"border-b":oe()}],"border-w-l":[{"border-l":oe()}],"divide-x":[{"divide-x":oe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":oe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Se(),"hidden","none"]}],"divide-style":[{divide:[...Se(),"hidden","none"]}],"border-color":[{border:j()}],"border-color-x":[{"border-x":j()}],"border-color-y":[{"border-y":j()}],"border-color-s":[{"border-s":j()}],"border-color-e":[{"border-e":j()}],"border-color-t":[{"border-t":j()}],"border-color-r":[{"border-r":j()}],"border-color-b":[{"border-b":j()}],"border-color-l":[{"border-l":j()}],"divide-color":[{divide:j()}],"outline-style":[{outline:[...Se(),"none","hidden"]}],"outline-offset":[{"outline-offset":[de,Z,X]}],"outline-w":[{outline:["",de,ia,no]}],"outline-color":[{outline:j()}],shadow:[{shadow:["","none",u,nl,rl]}],"shadow-color":[{shadow:j()}],"inset-shadow":[{"inset-shadow":["none",d,nl,rl]}],"inset-shadow-color":[{"inset-shadow":j()}],"ring-w":[{ring:oe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:j()}],"ring-offset-w":[{"ring-offset":[de,no]}],"ring-offset-color":[{"ring-offset":j()}],"inset-ring-w":[{"inset-ring":oe()}],"inset-ring-color":[{"inset-ring":j()}],"text-shadow":[{"text-shadow":["none",f,nl,rl]}],"text-shadow-color":[{"text-shadow":j()}],opacity:[{opacity:[de,Z,X]}],"mix-blend":[{"mix-blend":[...Me(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Me()}],"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":[de]}],"mask-image-linear-from-pos":[{"mask-linear-from":K()}],"mask-image-linear-to-pos":[{"mask-linear-to":K()}],"mask-image-linear-from-color":[{"mask-linear-from":j()}],"mask-image-linear-to-color":[{"mask-linear-to":j()}],"mask-image-t-from-pos":[{"mask-t-from":K()}],"mask-image-t-to-pos":[{"mask-t-to":K()}],"mask-image-t-from-color":[{"mask-t-from":j()}],"mask-image-t-to-color":[{"mask-t-to":j()}],"mask-image-r-from-pos":[{"mask-r-from":K()}],"mask-image-r-to-pos":[{"mask-r-to":K()}],"mask-image-r-from-color":[{"mask-r-from":j()}],"mask-image-r-to-color":[{"mask-r-to":j()}],"mask-image-b-from-pos":[{"mask-b-from":K()}],"mask-image-b-to-pos":[{"mask-b-to":K()}],"mask-image-b-from-color":[{"mask-b-from":j()}],"mask-image-b-to-color":[{"mask-b-to":j()}],"mask-image-l-from-pos":[{"mask-l-from":K()}],"mask-image-l-to-pos":[{"mask-l-to":K()}],"mask-image-l-from-color":[{"mask-l-from":j()}],"mask-image-l-to-color":[{"mask-l-to":j()}],"mask-image-x-from-pos":[{"mask-x-from":K()}],"mask-image-x-to-pos":[{"mask-x-to":K()}],"mask-image-x-from-color":[{"mask-x-from":j()}],"mask-image-x-to-color":[{"mask-x-to":j()}],"mask-image-y-from-pos":[{"mask-y-from":K()}],"mask-image-y-to-pos":[{"mask-y-to":K()}],"mask-image-y-from-color":[{"mask-y-from":j()}],"mask-image-y-to-color":[{"mask-y-to":j()}],"mask-image-radial":[{"mask-radial":[Z,X]}],"mask-image-radial-from-pos":[{"mask-radial-from":K()}],"mask-image-radial-to-pos":[{"mask-radial-to":K()}],"mask-image-radial-from-color":[{"mask-radial-from":j()}],"mask-image-radial-to-color":[{"mask-radial-to":j()}],"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":[de]}],"mask-image-conic-from-pos":[{"mask-conic-from":K()}],"mask-image-conic-to-pos":[{"mask-conic-to":K()}],"mask-image-conic-from-color":[{"mask-conic-from":j()}],"mask-image-conic-to-color":[{"mask-conic-to":j()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:re()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Z,X]}],filter:[{filter:["","none",Z,X]}],blur:[{blur:fe()}],brightness:[{brightness:[de,Z,X]}],contrast:[{contrast:[de,Z,X]}],"drop-shadow":[{"drop-shadow":["","none",h,nl,rl]}],"drop-shadow-color":[{"drop-shadow":j()}],grayscale:[{grayscale:["",de,Z,X]}],"hue-rotate":[{"hue-rotate":[de,Z,X]}],invert:[{invert:["",de,Z,X]}],saturate:[{saturate:[de,Z,X]}],sepia:[{sepia:["",de,Z,X]}],"backdrop-filter":[{"backdrop-filter":["","none",Z,X]}],"backdrop-blur":[{"backdrop-blur":fe()}],"backdrop-brightness":[{"backdrop-brightness":[de,Z,X]}],"backdrop-contrast":[{"backdrop-contrast":[de,Z,X]}],"backdrop-grayscale":[{"backdrop-grayscale":["",de,Z,X]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[de,Z,X]}],"backdrop-invert":[{"backdrop-invert":["",de,Z,X]}],"backdrop-opacity":[{"backdrop-opacity":[de,Z,X]}],"backdrop-saturate":[{"backdrop-saturate":[de,Z,X]}],"backdrop-sepia":[{"backdrop-sepia":["",de,Z,X]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":A()}],"border-spacing-x":[{"border-spacing-x":A()}],"border-spacing-y":[{"border-spacing-y":A()}],"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:[de,"initial",Z,X]}],ease:[{ease:["linear","initial",y,Z,X]}],delay:[{delay:[de,Z,X]}],animate:[{animate:["none",x,Z,X]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,Z,X]}],"perspective-origin":[{"perspective-origin":P()}],rotate:[{rotate:$()}],"rotate-x":[{"rotate-x":$()}],"rotate-y":[{"rotate-y":$()}],"rotate-z":[{"rotate-z":$()}],scale:[{scale:G()}],"scale-x":[{"scale-x":G()}],"scale-y":[{"scale-y":G()}],"scale-z":[{"scale-z":G()}],"scale-3d":["scale-3d"],skew:[{skew:W()}],"skew-x":[{"skew-x":W()}],"skew-y":[{"skew-y":W()}],transform:[{transform:[Z,X,"","none","gpu","cpu"]}],"transform-origin":[{origin:P()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:V()}],"translate-x":[{"translate-x":V()}],"translate-y":[{"translate-y":V()}],"translate-z":[{"translate-z":V()}],"translate-none":["translate-none"],accent:[{accent:j()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:j()}],"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":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"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",...j()]}],"stroke-w":[{stroke:[de,ia,no,af]}],stroke:[{stroke:["none",...j()]}],"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"]}},iz=(e,{cacheSize:t,prefix:r,experimentalParseClassName:n,extend:o={},override:i={}})=>(ya(e,"cacheSize",t),ya(e,"prefix",r),ya(e,"experimentalParseClassName",n),ol(e.theme,i.theme),ol(e.classGroups,i.classGroups),ol(e.conflictingClassGroups,i.conflictingClassGroups),ol(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),ya(e,"orderSensitiveModifiers",i.orderSensitiveModifiers),il(e.theme,o.theme),il(e.classGroups,o.classGroups),il(e.conflictingClassGroups,o.conflictingClassGroups),il(e.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),gE(e,o,"orderSensitiveModifiers"),e),ya=(e,t,r)=>{r!==void 0&&(e[t]=r)},ol=(e,t)=>{if(t)for(const r in t)ya(e,r,t[r])},il=(e,t)=>{if(t)for(const r in t)gE(e,t,r)},gE=(e,t,r)=>{const n=t[r];n!==void 0&&(e[r]=e[r]?e[r].concat(n):n)},az=(e,...t)=>typeof e=="function"?gx(xx,e,...t):gx(()=>iz(xx(),e),...t),sz=az({extend:{classGroups:{"font-size":[{text:["hero","h1","h2","h3","h4","lead","semi-lead","body-lg","body","body-sm","descriptive","small","label","label-sm"]}]}}});function D(...e){return sz(ve(e))}const yE=te("w-full",{variants:{variant:{default:"",bordered:"border-border rounded-lg border"}},defaultVariants:{variant:"default"}}),bE=p.forwardRef(({className:e,variant:t,...r},n)=>b.jsx(tW,{ref:n,className:D(yE({variant:t}),e),...r}));bE.displayName="Accordion";const xE=p.forwardRef(({className:e,...t},r)=>b.jsx(rW,{ref:r,className:D("border-border border-b last:border-b-0",e),...t}));xE.displayName="AccordionItem";const wE=te(["flex flex-1 items-center justify-between py-4 text-left font-sans font-normal transition-all","text-primary hover:underline","focus-visible:ring-sunflower focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none","[&[data-state=open]>svg]:rotate-180"],{variants:{size:{sm:"text-small py-3",default:"text-body py-4",lg:"text-lead py-5"}},defaultVariants:{size:"default"}}),SE=p.forwardRef(({className:e,children:t,size:r,...n},o)=>b.jsx(nW,{className:"flex",children:b.jsxs(oW,{ref:o,className:D(wE({size:r}),e),...n,children:[t,b.jsx(rE,{className:"text-secondary h-4 w-4 shrink-0 transition-transform duration-200"})]})}));SE.displayName="AccordionTrigger";const PE=p.forwardRef(({className:e,children:t,...r},n)=>b.jsx(iW,{ref:n,className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",...r,children:b.jsx("div",{className:D("text-secondary pt-0 pb-4",e),children:t})}));PE.displayName="AccordionContent";function Et(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...r)=>t.current?.(...r),[])}function lz(e,t=globalThis?.document){const r=Et(e);p.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 cz="DismissableLayer",Sh="dismissableLayer.update",uz="dismissableLayer.pointerDownOutside",dz="dismissableLayer.focusOutside",wx,CE=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Fo=p.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,c=p.useContext(CE),[u,d]=p.useState(null),f=u?.ownerDocument??globalThis?.document,[,h]=p.useState({}),v=ie(t,E=>d(E)),m=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(g),x=u?m.indexOf(u):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,S=x>=y,P=pz(E=>{const A=E.target,T=[...c.branches].some(M=>M.contains(A));!S||T||(o?.(E),a?.(E),E.defaultPrevented||s?.())},f),C=hz(E=>{const A=E.target;[...c.branches].some(M=>M.contains(A))||(i?.(E),a?.(E),E.defaultPrevented||s?.())},f);return lz(E=>{x===c.layers.size-1&&(n?.(E),!E.defaultPrevented&&s&&(E.preventDefault(),s()))},f),p.useEffect(()=>{if(u)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(wx=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),Sx(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=wx)}},[u,f,r,c]),p.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),Sx())},[u,c]),p.useEffect(()=>{const E=()=>h({});return document.addEventListener(Sh,E),()=>document.removeEventListener(Sh,E)},[]),b.jsx(ee.div,{...l,ref:v,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:U(e.onFocusCapture,C.onFocusCapture),onBlurCapture:U(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:U(e.onPointerDownCapture,P.onPointerDownCapture)})});Fo.displayName=cz;var fz="DismissableLayerBranch",OE=p.forwardRef((e,t)=>{const r=p.useContext(CE),n=p.useRef(null),o=ie(t,n);return p.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})});OE.displayName=fz;function pz(e,t=globalThis?.document){const r=Et(e),n=p.useRef(!1),o=p.useRef(()=>{});return p.useEffect(()=>{const i=s=>{if(s.target&&!n.current){let l=function(){EE(uz,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 hz(e,t=globalThis?.document){const r=Et(e),n=p.useRef(!1);return p.useEffect(()=>{const o=i=>{i.target&&!n.current&&EE(dz,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 Sx(){const e=new CustomEvent(Sh);document.dispatchEvent(e)}function EE(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?gv(o,i):o.dispatchEvent(i)}var mz=Fo,vz=OE,sf="focusScope.autoFocusOnMount",lf="focusScope.autoFocusOnUnmount",Px={bubbles:!1,cancelable:!0},gz="FocusScope",ss=p.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,l]=p.useState(null),c=Et(o),u=Et(i),d=p.useRef(null),f=ie(t,m=>l(m)),h=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(n){let m=function(w){if(h.paused||!s)return;const S=w.target;s.contains(S)?d.current=S:An(d.current,{select:!0})},g=function(w){if(h.paused||!s)return;const S=w.relatedTarget;S!==null&&(s.contains(S)||An(d.current,{select:!0}))},y=function(w){if(document.activeElement===document.body)for(const P of w)P.removedNodes.length>0&&An(s)};document.addEventListener("focusin",m),document.addEventListener("focusout",g);const x=new MutationObserver(y);return s&&x.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",g),x.disconnect()}}},[n,s,h.paused]),p.useEffect(()=>{if(s){Ox.add(h);const m=document.activeElement;if(!s.contains(m)){const y=new CustomEvent(sf,Px);s.addEventListener(sf,c),s.dispatchEvent(y),y.defaultPrevented||(yz(Pz(AE(s)),{select:!0}),document.activeElement===m&&An(s))}return()=>{s.removeEventListener(sf,c),setTimeout(()=>{const y=new CustomEvent(lf,Px);s.addEventListener(lf,u),s.dispatchEvent(y),y.defaultPrevented||An(m??document.body,{select:!0}),s.removeEventListener(lf,u),Ox.remove(h)},0)}}},[s,c,u,h]);const v=p.useCallback(m=>{if(!r&&!n||h.paused)return;const g=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(g&&y){const x=m.currentTarget,[w,S]=bz(x);w&&S?!m.shiftKey&&y===S?(m.preventDefault(),r&&An(w,{select:!0})):m.shiftKey&&y===w&&(m.preventDefault(),r&&An(S,{select:!0})):y===x&&m.preventDefault()}},[r,n,h.paused]);return b.jsx(ee.div,{tabIndex:-1,...a,ref:f,onKeyDown:v})});ss.displayName=gz;function yz(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(An(n,{select:t}),document.activeElement!==r)return}function bz(e){const t=AE(e),r=Cx(t,e),n=Cx(t.reverse(),e);return[r,n]}function AE(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 Cx(e,t){for(const r of e)if(!xz(r,{upTo:t}))return r}function xz(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 wz(e){return e instanceof HTMLInputElement&&"select"in e}function An(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&wz(e)&&t&&e.select()}}var Ox=Sz();function Sz(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=Ex(e,t),e.unshift(t)},remove(t){e=Ex(e,t),e[0]?.resume()}}}function Ex(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Pz(e){return e.filter(t=>t.tagName!=="A")}var Cz="Portal",Bo=p.forwardRef((e,t)=>{const{container:r,...n}=e,[o,i]=p.useState(!1);pt(()=>i(!0),[]);const a=r||o&&globalThis?.document?.body;return a?is.createPortal(b.jsx(ee.div,{...n,ref:t}),a):null});Bo.displayName=Cz;var cf=0;function Pu(){p.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ax()),document.body.insertAdjacentElement("beforeend",e[1]??Ax()),cf++,()=>{cf===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),cf--}},[])}function Ax(){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 _r=function(){return _r=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},_r.apply(this,arguments)};function TE(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 Oz(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 Bl="right-scroll-bar-position",Wl="width-before-scroll-bar",Ez="with-scroll-bars-hidden",Az="--removed-body-scroll-bar-size";function uf(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Tz(e,t){var r=O.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 Mz=typeof window<"u"?p.useLayoutEffect:p.useEffect,Tx=new WeakMap;function kz(e,t){var r=Tz(null,function(n){return e.forEach(function(o){return uf(o,n)})});return Mz(function(){var n=Tx.get(r);if(n){var o=new Set(n),i=new Set(e),a=r.current;o.forEach(function(s){i.has(s)||uf(s,null)}),i.forEach(function(s){o.has(s)||uf(s,a)})}Tx.set(r,e)},[e]),r}function Dz(e){return e}function _z(e,t){t===void 0&&(t=Dz);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 Nz(e){e===void 0&&(e={});var t=_z(null);return t.options=_r({async:!0,ssr:!1},e),t}var ME=function(e){var t=e.sideCar,r=TE(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 p.createElement(n,_r({},r))};ME.isSideCarExport=!0;function jz(e,t){return e.useMedium(t),ME}var kE=Nz(),df=function(){},Cu=p.forwardRef(function(e,t){var r=p.useRef(null),n=p.useState({onScrollCapture:df,onWheelCapture:df,onTouchMoveCapture:df}),o=n[0],i=n[1],a=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,h=e.noRelative,v=e.noIsolation,m=e.inert,g=e.allowPinchZoom,y=e.as,x=y===void 0?"div":y,w=e.gapMode,S=TE(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=f,C=kz([r,t]),E=_r(_r({},S),o);return p.createElement(p.Fragment,null,u&&p.createElement(P,{sideCar:kE,removeScrollBar:c,shards:d,noRelative:h,noIsolation:v,inert:m,setCallbacks:i,allowPinchZoom:!!g,lockRef:r,gapMode:w}),a?p.cloneElement(p.Children.only(s),_r(_r({},E),{ref:C})):p.createElement(x,_r({},E,{className:l,ref:C}),s))});Cu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Cu.classNames={fullWidth:Wl,zeroRight:Bl};var Iz=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Rz(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Iz();return t&&e.setAttribute("nonce",t),e}function Lz(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function $z(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Vz=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Rz())&&(Lz(t,r),$z(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Fz=function(){var e=Vz();return function(t,r){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},DE=function(){var e=Fz(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},Bz={left:0,top:0,right:0,gap:0},ff=function(e){return parseInt(e||"",10)||0},Wz=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[ff(r),ff(n),ff(o)]},zz=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Bz;var t=Wz(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])}},Kz=DE(),yi="data-scroll-locked",Uz=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
2
  .`.concat(Ez,` {
3
3
  overflow: hidden `).concat(n,`;
4
4
  padding-right: `).concat(s,"px ").concat(n,`;
@@ -35,10 +35,10 @@
35
35
  body[`).concat(yi,`] {
36
36
  `).concat(Az,": ").concat(s,`px;
37
37
  }
38
- `)},Mx=function(){var e=parseInt(document.body.getAttribute(yi)||"0",10);return isFinite(e)?e:0},Hz=function(){p.useEffect(function(){return document.body.setAttribute(yi,(Mx()+1).toString()),function(){var e=Mx()-1;e<=0?document.body.removeAttribute(yi):document.body.setAttribute(yi,e.toString())}},[])},Gz=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;Hz();var i=p.useMemo(function(){return zz(o)},[o]);return p.createElement(Kz,{styles:Uz(i,!t,o,r?"":"!important")})},Sh=!1;if(typeof window<"u")try{var al=Object.defineProperty({},"passive",{get:function(){return Sh=!0,!0}});window.addEventListener("test",al,al),window.removeEventListener("test",al,al)}catch{Sh=!1}var Qo=Sh?{passive:!1}:!1,Yz=function(e){return e.tagName==="TEXTAREA"},_E=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Yz(e)&&r[t]==="visible")},qz=function(e){return _E(e,"overflowY")},Xz=function(e){return _E(e,"overflowX")},kx=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=NE(e,n);if(o){var i=jE(e,n),a=i[1],s=i[2];if(a>s)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Zz=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},Qz=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},NE=function(e,t){return e==="v"?qz(t):Xz(t)},jE=function(e,t){return e==="v"?Zz(t):Qz(t)},Jz=function(e,t){return e==="h"&&t==="rtl"?-1:1},e3=function(e,t,r,n,o){var i=Jz(e,window.getComputedStyle(t).direction),a=i*n,s=r.target,l=t.contains(s),c=!1,u=a>0,d=0,f=0;do{if(!s)break;var h=jE(e,s),v=h[0],m=h[1],g=h[2],y=m-g-i*v;(v||y)&&NE(e,s)&&(d+=y,f+=v);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(d)<1||!u&&Math.abs(f)<1)&&(c=!0),c},sl=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Dx=function(e){return[e.deltaX,e.deltaY]},_x=function(e){return e&&"current"in e?e.current:e},t3=function(e,t){return e[0]===t[0]&&e[1]===t[1]},r3=function(e){return`
38
+ `)},Mx=function(){var e=parseInt(document.body.getAttribute(yi)||"0",10);return isFinite(e)?e:0},Hz=function(){p.useEffect(function(){return document.body.setAttribute(yi,(Mx()+1).toString()),function(){var e=Mx()-1;e<=0?document.body.removeAttribute(yi):document.body.setAttribute(yi,e.toString())}},[])},Gz=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;Hz();var i=p.useMemo(function(){return zz(o)},[o]);return p.createElement(Kz,{styles:Uz(i,!t,o,r?"":"!important")})},Ph=!1;if(typeof window<"u")try{var al=Object.defineProperty({},"passive",{get:function(){return Ph=!0,!0}});window.addEventListener("test",al,al),window.removeEventListener("test",al,al)}catch{Ph=!1}var Qo=Ph?{passive:!1}:!1,Yz=function(e){return e.tagName==="TEXTAREA"},_E=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Yz(e)&&r[t]==="visible")},qz=function(e){return _E(e,"overflowY")},Xz=function(e){return _E(e,"overflowX")},kx=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=NE(e,n);if(o){var i=jE(e,n),a=i[1],s=i[2];if(a>s)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Zz=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},Qz=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},NE=function(e,t){return e==="v"?qz(t):Xz(t)},jE=function(e,t){return e==="v"?Zz(t):Qz(t)},Jz=function(e,t){return e==="h"&&t==="rtl"?-1:1},e3=function(e,t,r,n,o){var i=Jz(e,window.getComputedStyle(t).direction),a=i*n,s=r.target,l=t.contains(s),c=!1,u=a>0,d=0,f=0;do{if(!s)break;var h=jE(e,s),v=h[0],m=h[1],g=h[2],y=m-g-i*v;(v||y)&&NE(e,s)&&(d+=y,f+=v);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(d)<1||!u&&Math.abs(f)<1)&&(c=!0),c},sl=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Dx=function(e){return[e.deltaX,e.deltaY]},_x=function(e){return e&&"current"in e?e.current:e},t3=function(e,t){return e[0]===t[0]&&e[1]===t[1]},r3=function(e){return`
39
39
  .block-interactivity-`.concat(e,` {pointer-events: none;}
40
40
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
41
- `)},n3=0,Jo=[];function o3(e){var t=p.useRef([]),r=p.useRef([0,0]),n=p.useRef(),o=p.useState(n3++)[0],i=p.useState(DE)[0],a=p.useRef(e);p.useEffect(function(){a.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=Oz([e.lockRef.current],(e.shards||[]).map(_x),!0).filter(Boolean);return m.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=p.useCallback(function(m,g){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!a.current.allowPinchZoom;var y=sl(m),x=r.current,w="deltaX"in m?m.deltaX:x[0]-y[0],S="deltaY"in m?m.deltaY:x[1]-y[1],P,C=m.target,E=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in m&&E==="h"&&C.type==="range")return!1;var A=window.getSelection(),T=A&&A.anchorNode,M=T?T===C||T.contains(C):!1;if(M)return!1;var _=kx(E,C);if(!_)return!0;if(_?P=E:(P=E==="v"?"h":"v",_=kx(E,C)),!_)return!1;if(!n.current&&"changedTouches"in m&&(w||S)&&(n.current=P),!P)return!0;var k=n.current||P;return e3(k,g,m,k==="h"?w:S)},[]),l=p.useCallback(function(m){var g=m;if(!(!Jo.length||Jo[Jo.length-1]!==i)){var y="deltaY"in g?Dx(g):sl(g),x=t.current.filter(function(P){return P.name===g.type&&(P.target===g.target||g.target===P.shadowParent)&&t3(P.delta,y)})[0];if(x&&x.should){g.cancelable&&g.preventDefault();return}if(!x){var w=(a.current.shards||[]).map(_x).filter(Boolean).filter(function(P){return P.contains(g.target)}),S=w.length>0?s(g,w[0]):!a.current.noIsolation;S&&g.cancelable&&g.preventDefault()}}},[]),c=p.useCallback(function(m,g,y,x){var w={name:m,delta:g,target:y,should:x,shadowParent:i3(y)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),u=p.useCallback(function(m){r.current=sl(m),n.current=void 0},[]),d=p.useCallback(function(m){c(m.type,Dx(m),m.target,s(m,e.lockRef.current))},[]),f=p.useCallback(function(m){c(m.type,sl(m),m.target,s(m,e.lockRef.current))},[]);p.useEffect(function(){return Jo.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,Qo),document.addEventListener("touchmove",l,Qo),document.addEventListener("touchstart",u,Qo),function(){Jo=Jo.filter(function(m){return m!==i}),document.removeEventListener("wheel",l,Qo),document.removeEventListener("touchmove",l,Qo),document.removeEventListener("touchstart",u,Qo)}},[]);var h=e.removeScrollBar,v=e.inert;return p.createElement(p.Fragment,null,v?p.createElement(i,{styles:r3(o)}):null,h?p.createElement(Gz,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function i3(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const a3=jz(kE,o3);var ls=p.forwardRef(function(e,t){return p.createElement(Cu,_r({},e,{ref:t,sideCar:a3}))});ls.classNames=Cu.classNames;var s3=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ei=new WeakMap,ll=new WeakMap,cl={},ff=0,IE=function(e){return e&&(e.host||IE(e.parentNode))},l3=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=IE(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})},c3=function(e,t,r,n){var o=l3(t,Array.isArray(e)?e:[e]);cl[r]||(cl[r]=new WeakMap);var i=cl[r],a=[],s=new Set,l=new Set(o),c=function(d){!d||s.has(d)||(s.add(d),c(d.parentNode))};o.forEach(c);var u=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(f){if(s.has(f))u(f);else try{var h=f.getAttribute(n),v=h!==null&&h!=="false",m=(ei.get(f)||0)+1,g=(i.get(f)||0)+1;ei.set(f,m),i.set(f,g),a.push(f),m===1&&v&&ll.set(f,!0),g===1&&f.setAttribute(r,"true"),v||f.setAttribute(n,"true")}catch(y){console.error("aria-hidden: cannot operate on ",f,y)}})};return u(t),s.clear(),ff++,function(){a.forEach(function(d){var f=ei.get(d)-1,h=i.get(d)-1;ei.set(d,f),i.set(d,h),f||(ll.has(d)||d.removeAttribute(n),ll.delete(d)),h||d.removeAttribute(r)}),ff--,ff||(ei=new WeakMap,ei=new WeakMap,ll=new WeakMap,cl={})}},Ou=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=s3(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),c3(n,o,r,"aria-hidden")):function(){return null}};function u3(e){const t=d3(e),r=p.forwardRef((n,o)=>{const{children:i,...a}=n,s=p.Children.toArray(i),l=s.find(p3);if(l){const c=l.props.children,u=s.map(d=>d===l?p.Children.count(c)>1?p.Children.only(null):p.isValidElement(c)?c.props.children:null:d);return b.jsx(t,{...a,ref:o,children:p.isValidElement(c)?p.cloneElement(c,void 0,u):null})}return b.jsx(t,{...a,ref:o,children:i})});return r.displayName=`${e}.Slot`,r}function d3(e){const t=p.forwardRef((r,n)=>{const{children:o,...i}=r;if(p.isValidElement(o)){const a=m3(o),s=h3(i,o.props);return o.type!==p.Fragment&&(s.ref=n?Hr(n,a):a),p.cloneElement(o,s)}return p.Children.count(o)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var f3=Symbol("radix.slottable");function p3(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===f3}function h3(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 m3(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 Eu="Dialog",[RE,LE]=it(Eu),[v3,Cr]=RE(Eu),$E=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=p.useRef(null),l=p.useRef(null),[c,u]=xt({prop:n,defaultProp:o??!1,onChange:i,caller:Eu});return b.jsx(v3,{scope:t,triggerRef:s,contentRef:l,contentId:It(),titleId:It(),descriptionId:It(),open:c,onOpenChange:u,onOpenToggle:p.useCallback(()=>u(d=>!d),[u]),modal:a,children:r})};$E.displayName=Eu;var VE="DialogTrigger",FE=p.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Cr(VE,r),i=ie(t,o.triggerRef);return b.jsx(ee.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Mv(o.open),...n,ref:i,onClick:U(e.onClick,o.onOpenToggle)})});FE.displayName=VE;var Av="DialogPortal",[g3,BE]=RE(Av,{forceMount:void 0}),WE=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:o}=e,i=Cr(Av,t);return b.jsx(g3,{scope:t,forceMount:r,children:p.Children.map(n,a=>b.jsx(At,{present:r||i.open,children:b.jsx(Bo,{asChild:!0,container:o,children:a})}))})};WE.displayName=Av;var ic="DialogOverlay",zE=p.forwardRef((e,t)=>{const r=BE(ic,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=Cr(ic,e.__scopeDialog);return i.modal?b.jsx(At,{present:n||i.open,children:b.jsx(b3,{...o,ref:t})}):null});zE.displayName=ic;var y3=u3("DialogOverlay.RemoveScroll"),b3=p.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Cr(ic,r);return b.jsx(ls,{as:y3,allowPinchZoom:!0,shards:[o.contentRef],children:b.jsx(ee.div,{"data-state":Mv(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),Ao="DialogContent",KE=p.forwardRef((e,t)=>{const r=BE(Ao,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=Cr(Ao,e.__scopeDialog);return b.jsx(At,{present:n||i.open,children:i.modal?b.jsx(x3,{...o,ref:t}):b.jsx(w3,{...o,ref:t})})});KE.displayName=Ao;var x3=p.forwardRef((e,t)=>{const r=Cr(Ao,e.__scopeDialog),n=p.useRef(null),o=ie(t,r.contentRef,n);return p.useEffect(()=>{const i=n.current;if(i)return Ou(i)},[]),b.jsx(UE,{...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())})}),w3=p.forwardRef((e,t)=>{const r=Cr(Ao,e.__scopeDialog),n=p.useRef(!1),o=p.useRef(!1);return b.jsx(UE,{...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()}})}),UE=p.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=Cr(Ao,r),l=p.useRef(null),c=ie(t,l);return Pu(),b.jsxs(b.Fragment,{children:[b.jsx(ss,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i,children:b.jsx(Fo,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Mv(s.open),...a,ref:c,onDismiss:()=>s.onOpenChange(!1)})}),b.jsxs(b.Fragment,{children:[b.jsx(P3,{titleId:s.titleId}),b.jsx(O3,{contentRef:l,descriptionId:s.descriptionId})]})]})}),Tv="DialogTitle",HE=p.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Cr(Tv,r);return b.jsx(ee.h2,{id:o.titleId,...n,ref:t})});HE.displayName=Tv;var GE="DialogDescription",YE=p.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Cr(GE,r);return b.jsx(ee.p,{id:o.descriptionId,...n,ref:t})});YE.displayName=GE;var qE="DialogClose",XE=p.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Cr(qE,r);return b.jsx(ee.button,{type:"button",...n,ref:t,onClick:U(e.onClick,()=>o.onOpenChange(!1))})});XE.displayName=qE;function Mv(e){return e?"open":"closed"}var ZE="DialogTitleWarning",[S3,QE]=xB(ZE,{contentName:Ao,titleName:Tv,docsSlug:"dialog"}),P3=({titleId:e})=>{const t=QE(ZE),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
41
+ `)},n3=0,Jo=[];function o3(e){var t=p.useRef([]),r=p.useRef([0,0]),n=p.useRef(),o=p.useState(n3++)[0],i=p.useState(DE)[0],a=p.useRef(e);p.useEffect(function(){a.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=Oz([e.lockRef.current],(e.shards||[]).map(_x),!0).filter(Boolean);return m.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=p.useCallback(function(m,g){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!a.current.allowPinchZoom;var y=sl(m),x=r.current,w="deltaX"in m?m.deltaX:x[0]-y[0],S="deltaY"in m?m.deltaY:x[1]-y[1],P,C=m.target,E=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in m&&E==="h"&&C.type==="range")return!1;var A=window.getSelection(),T=A&&A.anchorNode,M=T?T===C||T.contains(C):!1;if(M)return!1;var _=kx(E,C);if(!_)return!0;if(_?P=E:(P=E==="v"?"h":"v",_=kx(E,C)),!_)return!1;if(!n.current&&"changedTouches"in m&&(w||S)&&(n.current=P),!P)return!0;var k=n.current||P;return e3(k,g,m,k==="h"?w:S)},[]),l=p.useCallback(function(m){var g=m;if(!(!Jo.length||Jo[Jo.length-1]!==i)){var y="deltaY"in g?Dx(g):sl(g),x=t.current.filter(function(P){return P.name===g.type&&(P.target===g.target||g.target===P.shadowParent)&&t3(P.delta,y)})[0];if(x&&x.should){g.cancelable&&g.preventDefault();return}if(!x){var w=(a.current.shards||[]).map(_x).filter(Boolean).filter(function(P){return P.contains(g.target)}),S=w.length>0?s(g,w[0]):!a.current.noIsolation;S&&g.cancelable&&g.preventDefault()}}},[]),c=p.useCallback(function(m,g,y,x){var w={name:m,delta:g,target:y,should:x,shadowParent:i3(y)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),u=p.useCallback(function(m){r.current=sl(m),n.current=void 0},[]),d=p.useCallback(function(m){c(m.type,Dx(m),m.target,s(m,e.lockRef.current))},[]),f=p.useCallback(function(m){c(m.type,sl(m),m.target,s(m,e.lockRef.current))},[]);p.useEffect(function(){return Jo.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,Qo),document.addEventListener("touchmove",l,Qo),document.addEventListener("touchstart",u,Qo),function(){Jo=Jo.filter(function(m){return m!==i}),document.removeEventListener("wheel",l,Qo),document.removeEventListener("touchmove",l,Qo),document.removeEventListener("touchstart",u,Qo)}},[]);var h=e.removeScrollBar,v=e.inert;return p.createElement(p.Fragment,null,v?p.createElement(i,{styles:r3(o)}):null,h?p.createElement(Gz,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function i3(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const a3=jz(kE,o3);var ls=p.forwardRef(function(e,t){return p.createElement(Cu,_r({},e,{ref:t,sideCar:a3}))});ls.classNames=Cu.classNames;var s3=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ei=new WeakMap,ll=new WeakMap,cl={},pf=0,IE=function(e){return e&&(e.host||IE(e.parentNode))},l3=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=IE(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})},c3=function(e,t,r,n){var o=l3(t,Array.isArray(e)?e:[e]);cl[r]||(cl[r]=new WeakMap);var i=cl[r],a=[],s=new Set,l=new Set(o),c=function(d){!d||s.has(d)||(s.add(d),c(d.parentNode))};o.forEach(c);var u=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(f){if(s.has(f))u(f);else try{var h=f.getAttribute(n),v=h!==null&&h!=="false",m=(ei.get(f)||0)+1,g=(i.get(f)||0)+1;ei.set(f,m),i.set(f,g),a.push(f),m===1&&v&&ll.set(f,!0),g===1&&f.setAttribute(r,"true"),v||f.setAttribute(n,"true")}catch(y){console.error("aria-hidden: cannot operate on ",f,y)}})};return u(t),s.clear(),pf++,function(){a.forEach(function(d){var f=ei.get(d)-1,h=i.get(d)-1;ei.set(d,f),i.set(d,h),f||(ll.has(d)||d.removeAttribute(n),ll.delete(d)),h||d.removeAttribute(r)}),pf--,pf||(ei=new WeakMap,ei=new WeakMap,ll=new WeakMap,cl={})}},Ou=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=s3(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),c3(n,o,r,"aria-hidden")):function(){return null}};function u3(e){const t=d3(e),r=p.forwardRef((n,o)=>{const{children:i,...a}=n,s=p.Children.toArray(i),l=s.find(p3);if(l){const c=l.props.children,u=s.map(d=>d===l?p.Children.count(c)>1?p.Children.only(null):p.isValidElement(c)?c.props.children:null:d);return b.jsx(t,{...a,ref:o,children:p.isValidElement(c)?p.cloneElement(c,void 0,u):null})}return b.jsx(t,{...a,ref:o,children:i})});return r.displayName=`${e}.Slot`,r}function d3(e){const t=p.forwardRef((r,n)=>{const{children:o,...i}=r;if(p.isValidElement(o)){const a=m3(o),s=h3(i,o.props);return o.type!==p.Fragment&&(s.ref=n?Hr(n,a):a),p.cloneElement(o,s)}return p.Children.count(o)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var f3=Symbol("radix.slottable");function p3(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===f3}function h3(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 m3(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 Eu="Dialog",[RE,LE]=it(Eu),[v3,Cr]=RE(Eu),$E=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=p.useRef(null),l=p.useRef(null),[c,u]=xt({prop:n,defaultProp:o??!1,onChange:i,caller:Eu});return b.jsx(v3,{scope:t,triggerRef:s,contentRef:l,contentId:It(),titleId:It(),descriptionId:It(),open:c,onOpenChange:u,onOpenToggle:p.useCallback(()=>u(d=>!d),[u]),modal:a,children:r})};$E.displayName=Eu;var VE="DialogTrigger",FE=p.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Cr(VE,r),i=ie(t,o.triggerRef);return b.jsx(ee.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":kv(o.open),...n,ref:i,onClick:U(e.onClick,o.onOpenToggle)})});FE.displayName=VE;var Tv="DialogPortal",[g3,BE]=RE(Tv,{forceMount:void 0}),WE=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:o}=e,i=Cr(Tv,t);return b.jsx(g3,{scope:t,forceMount:r,children:p.Children.map(n,a=>b.jsx(At,{present:r||i.open,children:b.jsx(Bo,{asChild:!0,container:o,children:a})}))})};WE.displayName=Tv;var ic="DialogOverlay",zE=p.forwardRef((e,t)=>{const r=BE(ic,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=Cr(ic,e.__scopeDialog);return i.modal?b.jsx(At,{present:n||i.open,children:b.jsx(b3,{...o,ref:t})}):null});zE.displayName=ic;var y3=u3("DialogOverlay.RemoveScroll"),b3=p.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Cr(ic,r);return b.jsx(ls,{as:y3,allowPinchZoom:!0,shards:[o.contentRef],children:b.jsx(ee.div,{"data-state":kv(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),Ao="DialogContent",KE=p.forwardRef((e,t)=>{const r=BE(Ao,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=Cr(Ao,e.__scopeDialog);return b.jsx(At,{present:n||i.open,children:i.modal?b.jsx(x3,{...o,ref:t}):b.jsx(w3,{...o,ref:t})})});KE.displayName=Ao;var x3=p.forwardRef((e,t)=>{const r=Cr(Ao,e.__scopeDialog),n=p.useRef(null),o=ie(t,r.contentRef,n);return p.useEffect(()=>{const i=n.current;if(i)return Ou(i)},[]),b.jsx(UE,{...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())})}),w3=p.forwardRef((e,t)=>{const r=Cr(Ao,e.__scopeDialog),n=p.useRef(!1),o=p.useRef(!1);return b.jsx(UE,{...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()}})}),UE=p.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=Cr(Ao,r),l=p.useRef(null),c=ie(t,l);return Pu(),b.jsxs(b.Fragment,{children:[b.jsx(ss,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i,children:b.jsx(Fo,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":kv(s.open),...a,ref:c,onDismiss:()=>s.onOpenChange(!1)})}),b.jsxs(b.Fragment,{children:[b.jsx(P3,{titleId:s.titleId}),b.jsx(O3,{contentRef:l,descriptionId:s.descriptionId})]})]})}),Mv="DialogTitle",HE=p.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Cr(Mv,r);return b.jsx(ee.h2,{id:o.titleId,...n,ref:t})});HE.displayName=Mv;var GE="DialogDescription",YE=p.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Cr(GE,r);return b.jsx(ee.p,{id:o.descriptionId,...n,ref:t})});YE.displayName=GE;var qE="DialogClose",XE=p.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Cr(qE,r);return b.jsx(ee.button,{type:"button",...n,ref:t,onClick:U(e.onClick,()=>o.onOpenChange(!1))})});XE.displayName=qE;function kv(e){return e?"open":"closed"}var ZE="DialogTitleWarning",[S3,QE]=xB(ZE,{contentName:Ao,titleName:Mv,docsSlug:"dialog"}),P3=({titleId:e})=>{const t=QE(ZE),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
 
@@ -48,27 +48,27 @@ You can add a description to the \`${bi}\` by passing a \`${hA}\` component as a
48
48
 
49
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 \`${bi}\`. 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 p.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},L3=sA,$3=lA,V3=cA,F3=uA,B3=dA,W3=vA,z3=yA,K3=pA,U3=mA,H3=Symbol.for("react.lazy"),ac=p[" use ".trim().toString()];function G3(e){return typeof e=="object"&&e!==null&&"then"in e}function bA(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===H3&&"_payload"in e&&G3(e._payload)}function xA(e){const t=Y3(e),r=p.forwardRef((n,o)=>{let{children:i,...a}=n;bA(i)&&typeof ac=="function"&&(i=ac(i._payload));const s=p.Children.toArray(i),l=s.find(X3);if(l){const c=l.props.children,u=s.map(d=>d===l?p.Children.count(c)>1?p.Children.only(null):p.isValidElement(c)?c.props.children:null:d);return b.jsx(t,{...a,ref:o,children:p.isValidElement(c)?p.cloneElement(c,void 0,u):null})}return b.jsx(t,{...a,ref:o,children:i})});return r.displayName=`${e}.Slot`,r}var Ie=xA("Slot");function Y3(e){const t=p.forwardRef((r,n)=>{let{children:o,...i}=r;if(bA(o)&&typeof ac=="function"&&(o=ac(o._payload)),p.isValidElement(o)){const a=Q3(o),s=Z3(i,o.props);return o.type!==p.Fragment&&(s.ref=n?Hr(n,a):a),p.cloneElement(o,s)}return p.Children.count(o)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var q3=Symbol("radix.slottable");function X3(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===q3}function Z3(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 Q3(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 Tu=te("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-alt text-primary active:bg-contrast hover:bg-main border",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"}}),kv=p.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},i)=>{const a=n?Ie:"button";return b.jsx(a,{className:D(Tu({variant:t,size:r,className:e})),ref:i,...o})});kv.displayName="Button";const J3=L3,e5=$3,wA=V3,Dv=p.forwardRef(({className:e,...t},r)=>b.jsx(F3,{ref:r,className:D("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}));Dv.displayName="AlertDialogOverlay";const SA=te(["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"}}),PA=p.forwardRef(({className:e,size:t,...r},n)=>b.jsxs(wA,{children:[b.jsx(Dv,{}),b.jsx(B3,{ref:n,className:D(SA({size:t}),e),...r})]}));PA.displayName="AlertDialogContent";const CA=p.forwardRef(({className:e,...t},r)=>b.jsx("div",{ref:r,className:D("flex flex-col space-y-2 text-center sm:text-left",e),...t}));CA.displayName="AlertDialogHeader";const OA=p.forwardRef(({className:e,...t},r)=>b.jsx("div",{ref:r,className:D("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t}));OA.displayName="AlertDialogFooter";const EA=p.forwardRef(({className:e,...t},r)=>b.jsx(K3,{ref:r,className:D("text-primary text-lg leading-none tracking-tight",e),...t}));EA.displayName="AlertDialogTitle";const AA=p.forwardRef(({className:e,...t},r)=>b.jsx(U3,{ref:r,className:D("text-secondary text-sm",e),...t}));AA.displayName="AlertDialogDescription";const TA=p.forwardRef(({className:e,variant:t="primary",size:r="default",...n},o)=>b.jsx(W3,{ref:o,className:D(Tu({variant:t,size:r}),e),...n}));TA.displayName="AlertDialogAction";const MA=p.forwardRef(({className:e,variant:t="secondary",size:r="default",...n},o)=>b.jsx(z3,{ref:o,className:D(Tu({variant:t,size:r}),"mt-2 sm:mt-0",e),...n}));MA.displayName="AlertDialogCancel";const kA=te("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"}}),DA=p.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},i)=>{const a=n?Ie:"span";return b.jsx(a,{className:D(kA({variant:t,size:r,className:e})),ref:i,...o})});DA.displayName="Badge";const _A=te("text-small relative flex w-full items-center gap-3 px-4 py-3 font-sans transition-colors",{variants:{variant:{info:"bg-electric-blue text-white",success:"bg-sunflower text-primary",warning:"bg-lemon-meringue text-primary",error:"bg-error text-white",neutral:"bg-alt text-primary border-border border"},align:{left:"justify-start text-left",center:"justify-center text-center"}},defaultVariants:{variant:"info",align:"center"}}),NA=p.forwardRef(({className:e,variant:t,align:r,asChild:n=!1,icon:o,action:i,onDismiss:a,children:s,...l},c)=>{const u=n?Ie:"div";return b.jsxs(u,{role:"alert",className:D(_A({variant:t,align:r,className:e})),ref:c,...l,children:[o&&b.jsx("span",{className:"shrink-0",children:o}),b.jsx("span",{className:"flex-1",children:s}),i&&b.jsx("span",{className:"shrink-0",children:i}),a&&b.jsx("button",{type:"button",onClick:a,className:"hover:bg-primary/10 focus-visible:ring-sunflower -mr-1 shrink-0 rounded p-1 transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none","aria-label":"Dismiss banner",children:b.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[b.jsx("path",{d:"M18 6 6 18"}),b.jsx("path",{d:"m6 6 12 12"})]})})]})});NA.displayName="Banner";var t5=["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 _v(e){if(typeof e!="string")return!1;var t=t5;return t.includes(e)}var r5=["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"],n5=new Set(r5);function jA(e){return typeof e!="string"?!1:n5.has(e)}function IA(e){return typeof e=="string"&&e.startsWith("data-")}function Zt(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(jA(r)||IA(r))&&(t[r]=e[r]);return t}function To(e){if(e==null)return null;if(O.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return Zt(t)}return typeof e=="object"&&!Array.isArray(e)?Zt(e):null}function Rt(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(jA(r)||IA(r)||_v(r))&&(t[r]=e[r]);return t}function o5(e){return e==null?null:O.isValidElement(e)?Rt(e.props):typeof e=="object"&&!Array.isArray(e)?Rt(e):null}var i5=["children","width","height","viewBox","className","style","title","desc"];function Ph(){return Ph=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},Ph.apply(null,arguments)}function a5(e,t){if(e==null)return{};var r,n,o=s5(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 s5(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 Nv=O.forwardRef((e,t)=>{var{children:r,width:n,height:o,viewBox:i,className:a,style:s,title:l,desc:c}=e,u=a5(e,i5),d=i||{width:n,height:o,x:0,y:0},f=ve("recharts-surface",a);return p.createElement("svg",Ph({},Rt(u),{className:f,width:n,height:o,style:s,viewBox:"".concat(d.x," ").concat(d.y," ").concat(d.width," ").concat(d.height),ref:t}),p.createElement("title",null,l),p.createElement("desc",null,c),r)}),l5=["children","className"];function Ch(){return Ch=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},Ch.apply(null,arguments)}function c5(e,t){if(e==null)return{};var r,n,o=u5(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 u5(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 ht=p.forwardRef((e,t)=>{var{children:r,className:n}=e,o=c5(e,l5),i=ve("recharts-layer",n);return p.createElement("g",Ch({className:i},Rt(o),{ref:t}),r)}),RA=O.createContext(null),d5=()=>O.useContext(RA);function De(e){return function(){return e}}const LA=Math.cos,sc=Math.sin,Or=Math.sqrt,lc=Math.PI,Mu=2*lc,Oh=Math.PI,Eh=2*Oh,so=1e-6,f5=Eh-so;function $A(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function p5(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return $A;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 h5{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?$A:p5(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,d=s-r,f=u*u+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(f>so)if(!(Math.abs(d*l-c*u)>so)||!i)this._append`L${this._x1=t},${this._y1=r}`;else{let h=n-a,v=o-s,m=l*l+c*c,g=h*h+v*v,y=Math.sqrt(m),x=Math.sqrt(f),w=i*Math.tan((Oh-Math.acos((m+f-g)/(2*y*x)))/2),S=w/x,P=w/y;Math.abs(S-1)>so&&this._append`L${t+S*u},${r+S*d}`,this._append`A${i},${i},0,0,${+(d*h>u*v)},${this._x1=t+P*l},${this._y1=r+P*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,d=1^a,f=a?o-i:i-o;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>so||Math.abs(this._y1-u)>so)&&this._append`L${c},${u}`,n&&(f<0&&(f=f%Eh+Eh),f>f5?this._append`A${n},${n},0,1,${d},${t-s},${r-l}A${n},${n},0,1,${d},${this._x1=c},${this._y1=u}`:f>so&&this._append`A${n},${n},0,${+(f>=Oh)},${d},${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 jv(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 h5(t)}function Iv(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function VA(e){this._context=e}VA.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 ku(e){return new VA(e)}function FA(e){return e[0]}function BA(e){return e[1]}function WA(e,t){var r=De(!0),n=null,o=ku,i=null,a=jv(s);e=typeof e=="function"?e:e===void 0?FA:De(e),t=typeof t=="function"?t:t===void 0?BA:De(t);function s(l){var c,u=(l=Iv(l)).length,d,f=!1,h;for(n==null&&(i=o(h=a())),c=0;c<=u;++c)!(c<u&&r(d=l[c],c,l))===f&&((f=!f)?i.lineStart():i.lineEnd()),f&&i.point(+e(d,c,l),+t(d,c,l));if(h)return i=null,h+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:De(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:De(+l),s):t},s.defined=function(l){return arguments.length?(r=typeof l=="function"?l:De(!!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 ul(e,t,r){var n=null,o=De(!0),i=null,a=ku,s=null,l=jv(c);e=typeof e=="function"?e:e===void 0?FA:De(+e),t=typeof t=="function"?t:De(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?BA:De(+r);function c(d){var f,h,v,m=(d=Iv(d)).length,g,y=!1,x,w=new Array(m),S=new Array(m);for(i==null&&(s=a(x=l())),f=0;f<=m;++f){if(!(f<m&&o(g=d[f],f,d))===y)if(y=!y)h=f,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),v=f-1;v>=h;--v)s.point(w[v],S[v]);s.lineEnd(),s.areaEnd()}y&&(w[f]=+e(g,f,d),S[f]=+t(g,f,d),s.point(n?+n(g,f,d):w[f],r?+r(g,f,d):S[f]))}if(x)return s=null,x+""||null}function u(){return WA().defined(o).curve(a).context(i)}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:De(+d),n=null,c):e},c.x0=function(d){return arguments.length?(e=typeof d=="function"?d:De(+d),c):e},c.x1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:De(+d),c):n},c.y=function(d){return arguments.length?(t=typeof d=="function"?d:De(+d),r=null,c):t},c.y0=function(d){return arguments.length?(t=typeof d=="function"?d:De(+d),c):t},c.y1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:De(+d),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(d){return arguments.length?(o=typeof d=="function"?d:De(!!d),c):o},c.curve=function(d){return arguments.length?(a=d,i!=null&&(s=a(i)),c):a},c.context=function(d){return arguments.length?(d==null?i=s=null:s=a(i=d),c):i},c}class zA{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 m5(e){return new zA(e,!0)}function v5(e){return new zA(e,!1)}const Rv={draw(e,t){const r=Or(t/lc);e.moveTo(r,0),e.arc(0,0,r,0,Mu)}},g5={draw(e,t){const r=Or(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()}},KA=Or(1/3),y5=KA*2,b5={draw(e,t){const r=Or(t/y5),n=r*KA;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},x5={draw(e,t){const r=Or(t),n=-r/2;e.rect(n,n,r,r)}},w5=.8908130915292852,UA=sc(lc/10)/sc(7*lc/10),S5=sc(Mu/10)*UA,P5=-LA(Mu/10)*UA,C5={draw(e,t){const r=Or(t*w5),n=S5*r,o=P5*r;e.moveTo(0,-r),e.lineTo(n,o);for(let i=1;i<5;++i){const a=Mu*i/5,s=LA(a),l=sc(a);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*o,l*n+s*o)}e.closePath()}},pf=Or(3),O5={draw(e,t){const r=-Or(t/(pf*3));e.moveTo(0,r*2),e.lineTo(-pf*r,-r),e.lineTo(pf*r,-r),e.closePath()}},er=-.5,tr=Or(3)/2,Ah=1/Or(12),E5=(Ah/2+1)*3,A5={draw(e,t){const r=Or(t/E5),n=r/2,o=r*Ah,i=n,a=r*Ah+r,s=-i,l=a;e.moveTo(n,o),e.lineTo(i,a),e.lineTo(s,l),e.lineTo(er*n-tr*o,tr*n+er*o),e.lineTo(er*i-tr*a,tr*i+er*a),e.lineTo(er*s-tr*l,tr*s+er*l),e.lineTo(er*n+tr*o,er*o-tr*n),e.lineTo(er*i+tr*a,er*a-tr*i),e.lineTo(er*s+tr*l,er*l-tr*s),e.closePath()}};function T5(e,t){let r=null,n=jv(o);e=typeof e=="function"?e:De(e||Rv),t=typeof t=="function"?t:De(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:De(i),o):e},o.size=function(i){return arguments.length?(t=typeof i=="function"?i:De(+i),o):t},o.context=function(i){return arguments.length?(r=i??null,o):r},o}function cc(){}function uc(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 HA(e){this._context=e}HA.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:uc(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:uc(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function M5(e){return new HA(e)}function GA(e){this._context=e}GA.prototype={areaStart:cc,areaEnd:cc,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:uc(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function k5(e){return new GA(e)}function YA(e){this._context=e}YA.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:uc(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function D5(e){return new YA(e)}function qA(e){this._context=e}qA.prototype={areaStart:cc,areaEnd:cc,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 _5(e){return new qA(e)}function Nx(e){return e<0?-1:1}function jx(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(Nx(i)+Nx(a))*Math.min(Math.abs(i),Math.abs(a),.5*Math.abs(s))||0}function Ix(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function hf(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 dc(e){this._context=e}dc.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:hf(this,this._t0,Ix(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,hf(this,Ix(this,r=jx(this,e,t)),r);break;default:hf(this,this._t0,r=jx(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function XA(e){this._context=new ZA(e)}(XA.prototype=Object.create(dc.prototype)).point=function(e,t){dc.prototype.point.call(this,t,e)};function ZA(e){this._context=e}ZA.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 N5(e){return new dc(e)}function j5(e){return new XA(e)}function QA(e){this._context=e}QA.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=Rx(e),o=Rx(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 Rx(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 I5(e){return new QA(e)}function Du(e,t){this._context=e,this._t=t}Du.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 R5(e){return new Du(e,.5)}function L5(e){return new Du(e,0)}function $5(e){return new Du(e,1)}function Mo(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 Th(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function V5(e,t){return e[t]}function F5(e){const t=[];return t.key=e,t}function B5(){var e=De([]),t=Th,r=Mo,n=V5;function o(i){var a=Array.from(e.apply(this,arguments),F5),s,l=a.length,c=-1,u;for(const d of i)for(s=0,++c;s<l;++s)(a[s][c]=[0,+n(d,a[s].key,c,i)]).data=d;for(s=0,u=Iv(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:De(Array.from(i)),o):e},o.value=function(i){return arguments.length?(n=typeof i=="function"?i:De(+i),o):n},o.order=function(i){return arguments.length?(t=i==null?Th:typeof i=="function"?i:De(Array.from(i)),o):t},o.offset=function(i){return arguments.length?(r=i??Mo,o):r},o}function W5(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}Mo(e,t)}}function z5(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}Mo(e,t)}}function K5(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]],d=u[n][1]||0,f=u[n-1][1]||0,h=(d-f)/2,v=0;v<s;++v){var m=e[t[v]],g=m[n][1]||0,y=m[n-1][1]||0;h+=g-y}l+=d,c+=h*d}o[n-1][1]+=o[n-1][0]=r,l&&(r-=c/l)}o[n-1][1]+=o[n-1][0]=r,Mo(e,t)}}function Gn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var mf={},vf={},Lx;function U5(){return Lx||(Lx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==="__proto__"}e.isUnsafeProperty=t})(vf)),vf}var gf={},$x;function JA(){return $x||($x=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})(gf)),gf}var yf={},Vx;function Lv(){return Vx||(Vx=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})(yf)),yf}var bf={},xf={},Fx;function H5(){return Fx||(Fx=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})(xf)),xf}var Bx;function $v(){return Bx||(Bx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=H5(),r=Lv();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 d=o[s];c?d==="\\"&&s+1<a?(s++,l+=o[s]):d===c?c="":l+=d:u?d==='"'||d==="'"?c=d:d==="]"?(u=!1,i.push(l),l=""):l+=d:d==="["?(u=!0,l&&(i.push(l),l="")):d==="."?l&&(i.push(l),l=""):l+=d,s++}return l&&i.push(l),i}e.toPath=n})(bf)),bf}var Wx;function Vv(){return Wx||(Wx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=U5(),r=JA(),n=Lv(),o=$v();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 d=0;d<l.length;d++){if(u==null||t.isUnsafeProperty(l[d]))return c;u=u[l[d]]}return u===void 0?c:u}e.get=i})(mf)),mf}var wf,zx;function G5(){return zx||(zx=1,wf=Vv().get),wf}var Y5=G5();const ko=Gn(Y5);var q5=4;function Nn(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:q5,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function Ue(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+Nn(s)+i:o+i},"")}var ft=e=>e===0?0:e>0?1:-1,Fr=e=>typeof e=="number"&&e!=+e,Do=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,Y=e=>(typeof e=="number"||e instanceof Number)&&!Fr(e),Br=e=>Y(e)||typeof e=="string",X5=0,Da=e=>{var t=++X5;return"".concat(e||"").concat(t)},Ot=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(!Y(t)&&typeof t!="string")return n;var i;if(Do(t)){if(r==null)return n;var a=t.indexOf("%");i=r*parseFloat(t.slice(0,a))/100}else i=+t;return Fr(i)&&(i=n),o&&r!=null&&i>r&&(i=r),i},eT=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 Le(e,t,r){return Y(e)&&Y(t)?Nn(e+r*(t-e)):t}function tT(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):ko(n,t))===r)}var We=e=>e===null||typeof e>"u",cs=e=>We(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function Vt(e){return e!=null}function Wo(){}var Z5=["type","size","sizeType"];function Mh(){return Mh=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},Mh.apply(null,arguments)}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 Ux(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){Q5(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 Q5(e,t,r){return(t=J5(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function J5(e){var t=e4(e,"string");return typeof t=="symbol"?t:t+""}function e4(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 t4(e,t){if(e==null)return{};var r,n,o=r4(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 r4(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 rT={symbolCircle:Rv,symbolCross:g5,symbolDiamond:b5,symbolSquare:x5,symbolStar:C5,symbolTriangle:O5,symbolWye:A5},n4=Math.PI/180,o4=e=>{var t="symbol".concat(cs(e));return rT[t]||Rv},i4=(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*n4;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}},a4=(e,t)=>{rT["symbol".concat(cs(e))]=t},Fv=e=>{var{type:t="circle",size:r=64,sizeType:n="area"}=e,o=t4(e,Z5),i=Ux(Ux({},o),{},{type:t,size:r,sizeType:n}),a="circle";typeof t=="string"&&(a=t);var s=()=>{var f=o4(a),h=T5().type(f).size(i4(r,n,a)),v=h();if(v!==null)return v},{className:l,cx:c,cy:u}=i,d=Rt(i);return Y(c)&&Y(u)&&Y(r)?p.createElement("path",Mh({},d,{className:ve("recharts-symbols",l),transform:"translate(".concat(c,", ").concat(u,")"),d:s()})):null};Fv.registerSymbol=a4;var nT=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,Bv=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(O.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(o=>{_v(o)&&(n[o]=(i=>r[o](r,i)))}),n},s4=(e,t,r)=>n=>(e(t,r,n),null),us=(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];_v(o)&&typeof i=="function"&&(n||(n={}),n[o]=s4(i,t,r))}),n};function Hx(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 l4(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Hx(Object(r),!0).forEach(function(n){c4(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Hx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function c4(e,t,r){return(t=u4(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u4(e){var t=d4(e,"string");return typeof t=="symbol"?t:t+""}function d4(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 et(e,t){var r=l4({},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 fc(){return fc=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},fc.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 f4(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){p4(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 p4(e,t,r){return(t=h4(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h4(e){var t=m4(e,"string");return typeof t=="symbol"?t:t+""}function m4(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 nr=32,v4={align:"center",iconSize:14,inactiveColor:"#ccc",layout:"horizontal",verticalAlign:"middle"};function g4(e){var{data:t,iconType:r,inactiveColor:n}=e,o=nr/2,i=nr/6,a=nr/3,s=t.inactive?n:t.color,l=r??t.type;if(l==="none")return null;if(l==="plainline"){var c;return p.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:nr,y2:o,className:"recharts-legend-icon"})}if(l==="line")return p.createElement("path",{strokeWidth:4,fill:"none",stroke:s,d:"M0,".concat(o,"h").concat(a,`
51
+ For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return p.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},L3=sA,$3=lA,V3=cA,F3=uA,B3=dA,W3=vA,z3=yA,K3=pA,U3=mA,H3=Symbol.for("react.lazy"),ac=p[" use ".trim().toString()];function G3(e){return typeof e=="object"&&e!==null&&"then"in e}function bA(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===H3&&"_payload"in e&&G3(e._payload)}function xA(e){const t=Y3(e),r=p.forwardRef((n,o)=>{let{children:i,...a}=n;bA(i)&&typeof ac=="function"&&(i=ac(i._payload));const s=p.Children.toArray(i),l=s.find(X3);if(l){const c=l.props.children,u=s.map(d=>d===l?p.Children.count(c)>1?p.Children.only(null):p.isValidElement(c)?c.props.children:null:d);return b.jsx(t,{...a,ref:o,children:p.isValidElement(c)?p.cloneElement(c,void 0,u):null})}return b.jsx(t,{...a,ref:o,children:i})});return r.displayName=`${e}.Slot`,r}var Ie=xA("Slot");function Y3(e){const t=p.forwardRef((r,n)=>{let{children:o,...i}=r;if(bA(o)&&typeof ac=="function"&&(o=ac(o._payload)),p.isValidElement(o)){const a=Q3(o),s=Z3(i,o.props);return o.type!==p.Fragment&&(s.ref=n?Hr(n,a):a),p.cloneElement(o,s)}return p.Children.count(o)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var q3=Symbol("radix.slottable");function X3(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===q3}function Z3(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 Q3(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 Tu=te("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-alt text-primary active:bg-contrast hover:bg-main border",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"}}),Dv=p.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},i)=>{const a=n?Ie:"button";return b.jsx(a,{className:D(Tu({variant:t,size:r,className:e})),ref:i,...o})});Dv.displayName="Button";const J3=L3,e5=$3,wA=V3,_v=p.forwardRef(({className:e,...t},r)=>b.jsx(F3,{ref:r,className:D("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}));_v.displayName="AlertDialogOverlay";const SA=te(["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"}}),PA=p.forwardRef(({className:e,size:t,...r},n)=>b.jsxs(wA,{children:[b.jsx(_v,{}),b.jsx(B3,{ref:n,className:D(SA({size:t}),e),...r})]}));PA.displayName="AlertDialogContent";const CA=p.forwardRef(({className:e,...t},r)=>b.jsx("div",{ref:r,className:D("flex flex-col space-y-2 text-center sm:text-left",e),...t}));CA.displayName="AlertDialogHeader";const OA=p.forwardRef(({className:e,...t},r)=>b.jsx("div",{ref:r,className:D("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t}));OA.displayName="AlertDialogFooter";const EA=p.forwardRef(({className:e,...t},r)=>b.jsx(K3,{ref:r,className:D("text-primary text-lg leading-none tracking-tight",e),...t}));EA.displayName="AlertDialogTitle";const AA=p.forwardRef(({className:e,...t},r)=>b.jsx(U3,{ref:r,className:D("text-secondary text-sm",e),...t}));AA.displayName="AlertDialogDescription";const TA=p.forwardRef(({className:e,variant:t="primary",size:r="default",...n},o)=>b.jsx(W3,{ref:o,className:D(Tu({variant:t,size:r}),e),...n}));TA.displayName="AlertDialogAction";const MA=p.forwardRef(({className:e,variant:t="secondary",size:r="default",...n},o)=>b.jsx(z3,{ref:o,className:D(Tu({variant:t,size:r}),"mt-2 sm:mt-0",e),...n}));MA.displayName="AlertDialogCancel";const kA=te("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"}}),DA=p.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},i)=>{const a=n?Ie:"span";return b.jsx(a,{className:D(kA({variant:t,size:r,className:e})),ref:i,...o})});DA.displayName="Badge";const _A=te("text-small relative flex w-full items-center gap-3 px-4 py-3 font-sans transition-colors",{variants:{variant:{info:"bg-electric-blue text-white",success:"bg-sunflower text-primary",warning:"bg-lemon-meringue text-primary",error:"bg-error text-white",neutral:"bg-alt text-primary border-border border"},align:{left:"justify-start text-left",center:"justify-center text-center"}},defaultVariants:{variant:"info",align:"center"}}),NA=p.forwardRef(({className:e,variant:t,align:r,asChild:n=!1,icon:o,action:i,onDismiss:a,children:s,...l},c)=>{const u=n?Ie:"div";return b.jsxs(u,{role:"alert",className:D(_A({variant:t,align:r,className:e})),ref:c,...l,children:[o&&b.jsx("span",{className:"shrink-0",children:o}),b.jsx("span",{className:"flex-1",children:s}),i&&b.jsx("span",{className:"shrink-0",children:i}),a&&b.jsx("button",{type:"button",onClick:a,className:"hover:bg-primary/10 focus-visible:ring-sunflower -mr-1 shrink-0 rounded p-1 transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none","aria-label":"Dismiss banner",children:b.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[b.jsx("path",{d:"M18 6 6 18"}),b.jsx("path",{d:"m6 6 12 12"})]})})]})});NA.displayName="Banner";var t5=["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 Nv(e){if(typeof e!="string")return!1;var t=t5;return t.includes(e)}var r5=["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"],n5=new Set(r5);function jA(e){return typeof e!="string"?!1:n5.has(e)}function IA(e){return typeof e=="string"&&e.startsWith("data-")}function Zt(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(jA(r)||IA(r))&&(t[r]=e[r]);return t}function To(e){if(e==null)return null;if(O.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return Zt(t)}return typeof e=="object"&&!Array.isArray(e)?Zt(e):null}function Rt(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(jA(r)||IA(r)||Nv(r))&&(t[r]=e[r]);return t}function o5(e){return e==null?null:O.isValidElement(e)?Rt(e.props):typeof e=="object"&&!Array.isArray(e)?Rt(e):null}var i5=["children","width","height","viewBox","className","style","title","desc"];function Ch(){return Ch=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},Ch.apply(null,arguments)}function a5(e,t){if(e==null)return{};var r,n,o=s5(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 s5(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 jv=O.forwardRef((e,t)=>{var{children:r,width:n,height:o,viewBox:i,className:a,style:s,title:l,desc:c}=e,u=a5(e,i5),d=i||{width:n,height:o,x:0,y:0},f=ve("recharts-surface",a);return p.createElement("svg",Ch({},Rt(u),{className:f,width:n,height:o,style:s,viewBox:"".concat(d.x," ").concat(d.y," ").concat(d.width," ").concat(d.height),ref:t}),p.createElement("title",null,l),p.createElement("desc",null,c),r)}),l5=["children","className"];function Oh(){return Oh=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},Oh.apply(null,arguments)}function c5(e,t){if(e==null)return{};var r,n,o=u5(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 u5(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 ht=p.forwardRef((e,t)=>{var{children:r,className:n}=e,o=c5(e,l5),i=ve("recharts-layer",n);return p.createElement("g",Oh({className:i},Rt(o),{ref:t}),r)}),RA=O.createContext(null),d5=()=>O.useContext(RA);function De(e){return function(){return e}}const LA=Math.cos,sc=Math.sin,Or=Math.sqrt,lc=Math.PI,Mu=2*lc,Eh=Math.PI,Ah=2*Eh,so=1e-6,f5=Ah-so;function $A(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function p5(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return $A;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 h5{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?$A:p5(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,d=s-r,f=u*u+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(f>so)if(!(Math.abs(d*l-c*u)>so)||!i)this._append`L${this._x1=t},${this._y1=r}`;else{let h=n-a,v=o-s,m=l*l+c*c,g=h*h+v*v,y=Math.sqrt(m),x=Math.sqrt(f),w=i*Math.tan((Eh-Math.acos((m+f-g)/(2*y*x)))/2),S=w/x,P=w/y;Math.abs(S-1)>so&&this._append`L${t+S*u},${r+S*d}`,this._append`A${i},${i},0,0,${+(d*h>u*v)},${this._x1=t+P*l},${this._y1=r+P*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,d=1^a,f=a?o-i:i-o;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>so||Math.abs(this._y1-u)>so)&&this._append`L${c},${u}`,n&&(f<0&&(f=f%Ah+Ah),f>f5?this._append`A${n},${n},0,1,${d},${t-s},${r-l}A${n},${n},0,1,${d},${this._x1=c},${this._y1=u}`:f>so&&this._append`A${n},${n},0,${+(f>=Eh)},${d},${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 Iv(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 h5(t)}function Rv(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function VA(e){this._context=e}VA.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 ku(e){return new VA(e)}function FA(e){return e[0]}function BA(e){return e[1]}function WA(e,t){var r=De(!0),n=null,o=ku,i=null,a=Iv(s);e=typeof e=="function"?e:e===void 0?FA:De(e),t=typeof t=="function"?t:t===void 0?BA:De(t);function s(l){var c,u=(l=Rv(l)).length,d,f=!1,h;for(n==null&&(i=o(h=a())),c=0;c<=u;++c)!(c<u&&r(d=l[c],c,l))===f&&((f=!f)?i.lineStart():i.lineEnd()),f&&i.point(+e(d,c,l),+t(d,c,l));if(h)return i=null,h+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:De(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:De(+l),s):t},s.defined=function(l){return arguments.length?(r=typeof l=="function"?l:De(!!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 ul(e,t,r){var n=null,o=De(!0),i=null,a=ku,s=null,l=Iv(c);e=typeof e=="function"?e:e===void 0?FA:De(+e),t=typeof t=="function"?t:De(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?BA:De(+r);function c(d){var f,h,v,m=(d=Rv(d)).length,g,y=!1,x,w=new Array(m),S=new Array(m);for(i==null&&(s=a(x=l())),f=0;f<=m;++f){if(!(f<m&&o(g=d[f],f,d))===y)if(y=!y)h=f,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),v=f-1;v>=h;--v)s.point(w[v],S[v]);s.lineEnd(),s.areaEnd()}y&&(w[f]=+e(g,f,d),S[f]=+t(g,f,d),s.point(n?+n(g,f,d):w[f],r?+r(g,f,d):S[f]))}if(x)return s=null,x+""||null}function u(){return WA().defined(o).curve(a).context(i)}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:De(+d),n=null,c):e},c.x0=function(d){return arguments.length?(e=typeof d=="function"?d:De(+d),c):e},c.x1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:De(+d),c):n},c.y=function(d){return arguments.length?(t=typeof d=="function"?d:De(+d),r=null,c):t},c.y0=function(d){return arguments.length?(t=typeof d=="function"?d:De(+d),c):t},c.y1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:De(+d),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(d){return arguments.length?(o=typeof d=="function"?d:De(!!d),c):o},c.curve=function(d){return arguments.length?(a=d,i!=null&&(s=a(i)),c):a},c.context=function(d){return arguments.length?(d==null?i=s=null:s=a(i=d),c):i},c}class zA{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 m5(e){return new zA(e,!0)}function v5(e){return new zA(e,!1)}const Lv={draw(e,t){const r=Or(t/lc);e.moveTo(r,0),e.arc(0,0,r,0,Mu)}},g5={draw(e,t){const r=Or(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()}},KA=Or(1/3),y5=KA*2,b5={draw(e,t){const r=Or(t/y5),n=r*KA;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},x5={draw(e,t){const r=Or(t),n=-r/2;e.rect(n,n,r,r)}},w5=.8908130915292852,UA=sc(lc/10)/sc(7*lc/10),S5=sc(Mu/10)*UA,P5=-LA(Mu/10)*UA,C5={draw(e,t){const r=Or(t*w5),n=S5*r,o=P5*r;e.moveTo(0,-r),e.lineTo(n,o);for(let i=1;i<5;++i){const a=Mu*i/5,s=LA(a),l=sc(a);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*o,l*n+s*o)}e.closePath()}},hf=Or(3),O5={draw(e,t){const r=-Or(t/(hf*3));e.moveTo(0,r*2),e.lineTo(-hf*r,-r),e.lineTo(hf*r,-r),e.closePath()}},er=-.5,tr=Or(3)/2,Th=1/Or(12),E5=(Th/2+1)*3,A5={draw(e,t){const r=Or(t/E5),n=r/2,o=r*Th,i=n,a=r*Th+r,s=-i,l=a;e.moveTo(n,o),e.lineTo(i,a),e.lineTo(s,l),e.lineTo(er*n-tr*o,tr*n+er*o),e.lineTo(er*i-tr*a,tr*i+er*a),e.lineTo(er*s-tr*l,tr*s+er*l),e.lineTo(er*n+tr*o,er*o-tr*n),e.lineTo(er*i+tr*a,er*a-tr*i),e.lineTo(er*s+tr*l,er*l-tr*s),e.closePath()}};function T5(e,t){let r=null,n=Iv(o);e=typeof e=="function"?e:De(e||Lv),t=typeof t=="function"?t:De(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:De(i),o):e},o.size=function(i){return arguments.length?(t=typeof i=="function"?i:De(+i),o):t},o.context=function(i){return arguments.length?(r=i??null,o):r},o}function cc(){}function uc(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 HA(e){this._context=e}HA.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:uc(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:uc(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function M5(e){return new HA(e)}function GA(e){this._context=e}GA.prototype={areaStart:cc,areaEnd:cc,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:uc(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function k5(e){return new GA(e)}function YA(e){this._context=e}YA.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:uc(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function D5(e){return new YA(e)}function qA(e){this._context=e}qA.prototype={areaStart:cc,areaEnd:cc,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 _5(e){return new qA(e)}function Nx(e){return e<0?-1:1}function jx(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(Nx(i)+Nx(a))*Math.min(Math.abs(i),Math.abs(a),.5*Math.abs(s))||0}function Ix(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function mf(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 dc(e){this._context=e}dc.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:mf(this,this._t0,Ix(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,mf(this,Ix(this,r=jx(this,e,t)),r);break;default:mf(this,this._t0,r=jx(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function XA(e){this._context=new ZA(e)}(XA.prototype=Object.create(dc.prototype)).point=function(e,t){dc.prototype.point.call(this,t,e)};function ZA(e){this._context=e}ZA.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 N5(e){return new dc(e)}function j5(e){return new XA(e)}function QA(e){this._context=e}QA.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=Rx(e),o=Rx(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 Rx(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 I5(e){return new QA(e)}function Du(e,t){this._context=e,this._t=t}Du.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 R5(e){return new Du(e,.5)}function L5(e){return new Du(e,0)}function $5(e){return new Du(e,1)}function Mo(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 Mh(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function V5(e,t){return e[t]}function F5(e){const t=[];return t.key=e,t}function B5(){var e=De([]),t=Mh,r=Mo,n=V5;function o(i){var a=Array.from(e.apply(this,arguments),F5),s,l=a.length,c=-1,u;for(const d of i)for(s=0,++c;s<l;++s)(a[s][c]=[0,+n(d,a[s].key,c,i)]).data=d;for(s=0,u=Rv(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:De(Array.from(i)),o):e},o.value=function(i){return arguments.length?(n=typeof i=="function"?i:De(+i),o):n},o.order=function(i){return arguments.length?(t=i==null?Mh:typeof i=="function"?i:De(Array.from(i)),o):t},o.offset=function(i){return arguments.length?(r=i??Mo,o):r},o}function W5(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}Mo(e,t)}}function z5(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}Mo(e,t)}}function K5(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]],d=u[n][1]||0,f=u[n-1][1]||0,h=(d-f)/2,v=0;v<s;++v){var m=e[t[v]],g=m[n][1]||0,y=m[n-1][1]||0;h+=g-y}l+=d,c+=h*d}o[n-1][1]+=o[n-1][0]=r,l&&(r-=c/l)}o[n-1][1]+=o[n-1][0]=r,Mo(e,t)}}function Gn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vf={},gf={},Lx;function U5(){return Lx||(Lx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==="__proto__"}e.isUnsafeProperty=t})(gf)),gf}var yf={},$x;function JA(){return $x||($x=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})(yf)),yf}var bf={},Vx;function $v(){return Vx||(Vx=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})(bf)),bf}var xf={},wf={},Fx;function H5(){return Fx||(Fx=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})(wf)),wf}var Bx;function Vv(){return Bx||(Bx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=H5(),r=$v();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 d=o[s];c?d==="\\"&&s+1<a?(s++,l+=o[s]):d===c?c="":l+=d:u?d==='"'||d==="'"?c=d:d==="]"?(u=!1,i.push(l),l=""):l+=d:d==="["?(u=!0,l&&(i.push(l),l="")):d==="."?l&&(i.push(l),l=""):l+=d,s++}return l&&i.push(l),i}e.toPath=n})(xf)),xf}var Wx;function Fv(){return Wx||(Wx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=U5(),r=JA(),n=$v(),o=Vv();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 d=0;d<l.length;d++){if(u==null||t.isUnsafeProperty(l[d]))return c;u=u[l[d]]}return u===void 0?c:u}e.get=i})(vf)),vf}var Sf,zx;function G5(){return zx||(zx=1,Sf=Fv().get),Sf}var Y5=G5();const ko=Gn(Y5);var q5=4;function Nn(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:q5,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function Ue(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+Nn(s)+i:o+i},"")}var ft=e=>e===0?0:e>0?1:-1,Fr=e=>typeof e=="number"&&e!=+e,Do=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,Y=e=>(typeof e=="number"||e instanceof Number)&&!Fr(e),Br=e=>Y(e)||typeof e=="string",X5=0,Da=e=>{var t=++X5;return"".concat(e||"").concat(t)},Ot=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(!Y(t)&&typeof t!="string")return n;var i;if(Do(t)){if(r==null)return n;var a=t.indexOf("%");i=r*parseFloat(t.slice(0,a))/100}else i=+t;return Fr(i)&&(i=n),o&&r!=null&&i>r&&(i=r),i},eT=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 Le(e,t,r){return Y(e)&&Y(t)?Nn(e+r*(t-e)):t}function tT(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):ko(n,t))===r)}var We=e=>e===null||typeof e>"u",cs=e=>We(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function Vt(e){return e!=null}function Wo(){}var Z5=["type","size","sizeType"];function kh(){return kh=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},kh.apply(null,arguments)}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 Ux(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){Q5(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 Q5(e,t,r){return(t=J5(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function J5(e){var t=e4(e,"string");return typeof t=="symbol"?t:t+""}function e4(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 t4(e,t){if(e==null)return{};var r,n,o=r4(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 r4(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 rT={symbolCircle:Lv,symbolCross:g5,symbolDiamond:b5,symbolSquare:x5,symbolStar:C5,symbolTriangle:O5,symbolWye:A5},n4=Math.PI/180,o4=e=>{var t="symbol".concat(cs(e));return rT[t]||Lv},i4=(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*n4;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}},a4=(e,t)=>{rT["symbol".concat(cs(e))]=t},Bv=e=>{var{type:t="circle",size:r=64,sizeType:n="area"}=e,o=t4(e,Z5),i=Ux(Ux({},o),{},{type:t,size:r,sizeType:n}),a="circle";typeof t=="string"&&(a=t);var s=()=>{var f=o4(a),h=T5().type(f).size(i4(r,n,a)),v=h();if(v!==null)return v},{className:l,cx:c,cy:u}=i,d=Rt(i);return Y(c)&&Y(u)&&Y(r)?p.createElement("path",kh({},d,{className:ve("recharts-symbols",l),transform:"translate(".concat(c,", ").concat(u,")"),d:s()})):null};Bv.registerSymbol=a4;var nT=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,Wv=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(O.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(o=>{Nv(o)&&(n[o]=(i=>r[o](r,i)))}),n},s4=(e,t,r)=>n=>(e(t,r,n),null),us=(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];Nv(o)&&typeof i=="function"&&(n||(n={}),n[o]=s4(i,t,r))}),n};function Hx(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 l4(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Hx(Object(r),!0).forEach(function(n){c4(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Hx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function c4(e,t,r){return(t=u4(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u4(e){var t=d4(e,"string");return typeof t=="symbol"?t:t+""}function d4(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 et(e,t){var r=l4({},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 fc(){return fc=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},fc.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 f4(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){p4(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 p4(e,t,r){return(t=h4(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h4(e){var t=m4(e,"string");return typeof t=="symbol"?t:t+""}function m4(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 nr=32,v4={align:"center",iconSize:14,inactiveColor:"#ccc",layout:"horizontal",verticalAlign:"middle"};function g4(e){var{data:t,iconType:r,inactiveColor:n}=e,o=nr/2,i=nr/6,a=nr/3,s=t.inactive?n:t.color,l=r??t.type;if(l==="none")return null;if(l==="plainline"){var c;return p.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:nr,y2:o,className:"recharts-legend-icon"})}if(l==="line")return p.createElement("path",{strokeWidth:4,fill:"none",stroke:s,d:"M0,".concat(o,"h").concat(a,`
52
52
  A`).concat(i,",").concat(i,",0,1,1,").concat(2*a,",").concat(o,`
53
53
  H`).concat(nr,"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 p.createElement("path",{stroke:"none",fill:s,d:"M0,".concat(nr/8,"h").concat(nr,"v").concat(nr*3/4,"h").concat(-nr,"z"),className:"recharts-legend-icon"});if(p.isValidElement(t.legendIcon)){var u=f4({},t);return delete u.legendIcon,p.cloneElement(t.legendIcon,u)}return p.createElement(Fv,{fill:s,cx:o,cy:o,size:nr,sizeType:"diameter",type:l})}function y4(e){var{payload:t,iconSize:r,layout:n,formatter:o,inactiveColor:i,iconType:a}=e,s={x:0,y:0,width:nr,height:nr},l={display:n==="horizontal"?"inline-block":"block",marginRight:10},c={display:"inline-block",verticalAlign:"middle",marginRight:4};return t.map((u,d)=>{var f=u.formatter||o,h=ve({"recharts-legend-item":!0,["legend-item-".concat(d)]:!0,inactive:u.inactive});if(u.type==="none")return null;var v=u.inactive?i:u.color,m=f?f(u.value,u,d):u.value;return p.createElement("li",fc({className:h,style:l,key:"legend-item-".concat(d)},us(e,u,d)),p.createElement(Nv,{width:r,height:r,viewBox:s,style:c,"aria-label":"".concat(m," legend icon")},p.createElement(g4,{data:u,iconType:a,inactiveColor:i})),p.createElement("span",{className:"recharts-legend-item-text",style:{color:v}},m))})}var b4=e=>{var t=et(e,v4),{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 p.createElement("ul",{className:"recharts-default-legend",style:i},p.createElement(y4,fc({},t,{payload:r})))},Sf={},Pf={},Yx;function x4(){return Yx||(Yx=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})(Pf)),Pf}var Cf={},qx;function w4(){return qx||(qx=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})(Cf)),Cf}var Of={},Xx;function oT(){return Xx||(Xx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r}e.identity=t})(Of)),Of}var Ef={},Af={},Tf={},Zx;function S4(){return Zx||(Zx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Number.isSafeInteger(r)&&r>=0}e.isLength=t})(Tf)),Tf}var Qx;function Wv(){return Qx||(Qx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=S4();function r(n){return n!=null&&typeof n!="function"&&t.isLength(n.length)}e.isArrayLike=r})(Af)),Af}var Mf={},Jx;function P4(){return Jx||(Jx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="object"&&r!==null}e.isObjectLike=t})(Mf)),Mf}var ew;function C4(){return ew||(ew=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Wv(),r=P4();function n(o){return r.isObjectLike(o)&&t.isArrayLike(o)}e.isArrayLikeObject=n})(Ef)),Ef}var kf={},Df={},tw;function O4(){return tw||(tw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Vv();function r(n){return function(o){return t.get(o,n)}}e.property=r})(Df)),Df}var _f={},Nf={},jf={},If={},rw;function iT(){return rw||(rw=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})(If)),If}var Rf={},nw;function aT(){return nw||(nw=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})(Rf)),Rf}var Lf={},ow;function sT(){return ow||(ow=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})(Lf)),Lf}var iw;function E4(){return iw||(iw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=iT(),r=aT(),n=sT();function o(u,d,f){return typeof f!="function"?o(u,d,()=>{}):i(u,d,function h(v,m,g,y,x,w){const S=f(v,m,g,y,x,w);return S!==void 0?!!S:i(v,m,h,w)},new Map)}function i(u,d,f,h){if(d===u)return!0;switch(typeof d){case"object":return a(u,d,f,h);case"function":return Object.keys(d).length>0?i(u,{...d},f,h):n.isEqualsSameValueZero(u,d);default:return t.isObject(u)?typeof d=="string"?d==="":!0:n.isEqualsSameValueZero(u,d)}}function a(u,d,f,h){if(d==null)return!0;if(Array.isArray(d))return l(u,d,f,h);if(d instanceof Map)return s(u,d,f,h);if(d instanceof Set)return c(u,d,f,h);const v=Object.keys(d);if(u==null||r.isPrimitive(u))return v.length===0;if(v.length===0)return!0;if(h?.has(d))return h.get(d)===u;h?.set(d,u);try{for(let m=0;m<v.length;m++){const g=v[m];if(!r.isPrimitive(u)&&!(g in u)||d[g]===void 0&&u[g]!==void 0||d[g]===null&&u[g]!==null||!f(u[g],d[g],g,u,d,h))return!1}return!0}finally{h?.delete(d)}}function s(u,d,f,h){if(d.size===0)return!0;if(!(u instanceof Map))return!1;for(const[v,m]of d.entries()){const g=u.get(v);if(f(g,m,v,u,d,h)===!1)return!1}return!0}function l(u,d,f,h){if(d.length===0)return!0;if(!Array.isArray(u))return!1;const v=new Set;for(let m=0;m<d.length;m++){const g=d[m];let y=!1;for(let x=0;x<u.length;x++){if(v.has(x))continue;const w=u[x];let S=!1;if(f(w,g,m,u,d,h)&&(S=!0),S){v.add(x),y=!0;break}}if(!y)return!1}return!0}function c(u,d,f,h){return d.size===0?!0:u instanceof Set?l([...u],[...d],f,h):!1}e.isMatchWith=o,e.isSetMatch=c})(jf)),jf}var aw;function lT(){return aw||(aw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=E4();function r(n,o){return t.isMatchWith(n,o,()=>{})}e.isMatch=r})(Nf)),Nf}var $f={},Vf={},Ff={},sw;function A4(){return sw||(sw=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})(Ff)),Ff}var Bf={},lw;function zv(){return lw||(lw=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})(Bf)),Bf}var Wf={},cw;function cT(){return cw||(cw=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]",d="[object Function]",f="[object ArrayBuffer]",h="[object Object]",v="[object Error]",m="[object DataView]",g="[object Uint8Array]",y="[object Uint8ClampedArray]",x="[object Uint16Array]",w="[object Uint32Array]",S="[object BigUint64Array]",P="[object Int8Array]",C="[object Int16Array]",E="[object Int32Array]",A="[object BigInt64Array]",T="[object Float32Array]",M="[object Float64Array]";e.argumentsTag=i,e.arrayBufferTag=f,e.arrayTag=u,e.bigInt64ArrayTag=A,e.bigUint64ArrayTag=S,e.booleanTag=o,e.dataViewTag=m,e.dateTag=s,e.errorTag=v,e.float32ArrayTag=T,e.float64ArrayTag=M,e.functionTag=d,e.int16ArrayTag=C,e.int32ArrayTag=E,e.int8ArrayTag=P,e.mapTag=l,e.numberTag=n,e.objectTag=h,e.regexpTag=t,e.setTag=c,e.stringTag=r,e.symbolTag=a,e.uint16ArrayTag=x,e.uint32ArrayTag=w,e.uint8ArrayTag=g,e.uint8ClampedArrayTag=y})(Wf)),Wf}var zf={},uw;function T4(){return uw||(uw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}e.isTypedArray=t})(zf)),zf}var dw;function uT(){return dw||(dw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=A4(),r=zv(),n=cT(),o=aT(),i=T4();function a(u,d){return s(u,void 0,u,new Map,d)}function s(u,d,f,h=new Map,v=void 0){const m=v?.(u,d,f,h);if(m!==void 0)return m;if(o.isPrimitive(u))return u;if(h.has(u))return h.get(u);if(Array.isArray(u)){const g=new Array(u.length);h.set(u,g);for(let y=0;y<u.length;y++)g[y]=s(u[y],y,f,h,v);return Object.hasOwn(u,"index")&&(g.index=u.index),Object.hasOwn(u,"input")&&(g.input=u.input),g}if(u instanceof Date)return new Date(u.getTime());if(u instanceof RegExp){const g=new RegExp(u.source,u.flags);return g.lastIndex=u.lastIndex,g}if(u instanceof Map){const g=new Map;h.set(u,g);for(const[y,x]of u)g.set(y,s(x,y,f,h,v));return g}if(u instanceof Set){const g=new Set;h.set(u,g);for(const y of u)g.add(s(y,void 0,f,h,v));return g}if(typeof Buffer<"u"&&Buffer.isBuffer(u))return u.subarray();if(i.isTypedArray(u)){const g=new(Object.getPrototypeOf(u)).constructor(u.length);h.set(u,g);for(let y=0;y<u.length;y++)g[y]=s(u[y],y,f,h,v);return g}if(u instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&u instanceof SharedArrayBuffer)return u.slice(0);if(u instanceof DataView){const g=new DataView(u.buffer.slice(0),u.byteOffset,u.byteLength);return h.set(u,g),l(g,u,f,h,v),g}if(typeof File<"u"&&u instanceof File){const g=new File([u],u.name,{type:u.type});return h.set(u,g),l(g,u,f,h,v),g}if(typeof Blob<"u"&&u instanceof Blob){const g=new Blob([u],{type:u.type});return h.set(u,g),l(g,u,f,h,v),g}if(u instanceof Error){const g=new u.constructor;return h.set(u,g),g.message=u.message,g.name=u.name,g.stack=u.stack,g.cause=u.cause,l(g,u,f,h,v),g}if(u instanceof Boolean){const g=new Boolean(u.valueOf());return h.set(u,g),l(g,u,f,h,v),g}if(u instanceof Number){const g=new Number(u.valueOf());return h.set(u,g),l(g,u,f,h,v),g}if(u instanceof String){const g=new String(u.valueOf());return h.set(u,g),l(g,u,f,h,v),g}if(typeof u=="object"&&c(u)){const g=Object.create(Object.getPrototypeOf(u));return h.set(u,g),l(g,u,f,h,v),g}return u}function l(u,d,f=u,h,v){const m=[...Object.keys(d),...t.getSymbols(d)];for(let g=0;g<m.length;g++){const y=m[g],x=Object.getOwnPropertyDescriptor(u,y);(x==null||x.writable)&&(u[y]=s(d[y],y,f,h,v))}}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})(Vf)),Vf}var fw;function M4(){return fw||(fw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=uT();function r(n){return t.cloneDeepWithImpl(n,void 0,n,new Map,void 0)}e.cloneDeep=r})($f)),$f}var pw;function k4(){return pw||(pw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=lT(),r=M4();function n(o){return o=r.cloneDeep(o),i=>t.isMatch(i,o)}e.matches=n})(_f)),_f}var Kf={},Uf={},Hf={},hw;function D4(){return hw||(hw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=uT(),r=zv(),n=cT();function o(i,a){return t.cloneDeepWith(i,(s,l,c,u)=>{const d=a?.(s,l,c,u);if(d!==void 0)return d;if(typeof i=="object"){if(r.getTag(i)===n.objectTag&&typeof i.constructor!="function"){const f={};return u.set(i,f),t.copyProperties(f,i,c,u),f}switch(Object.prototype.toString.call(i)){case n.numberTag:case n.stringTag:case n.booleanTag:{const f=new i.constructor(i?.valueOf());return t.copyProperties(f,i),f}case n.argumentsTag:{const f={};return t.copyProperties(f,i),f.length=i.length,f[Symbol.iterator]=i[Symbol.iterator],f}default:return}}})}e.cloneDeepWith=o})(Hf)),Hf}var mw;function _4(){return mw||(mw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=D4();function r(n){return t.cloneDeepWith(n)}e.cloneDeep=r})(Uf)),Uf}var Gf={},Yf={},vw;function dT(){return vw||(vw=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})(Yf)),Yf}var qf={},gw;function N4(){return gw||(gw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=zv();function r(n){return n!==null&&typeof n=="object"&&t.getTag(n)==="[object Arguments]"}e.isArguments=r})(qf)),qf}var yw;function j4(){return yw||(yw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=JA(),r=dT(),n=N4(),o=$v();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 d=l[u];if((c==null||!Object.hasOwn(c,d))&&!((Array.isArray(c)||n.isArguments(c))&&r.isIndex(d)&&d<c.length))return!1;c=c[d]}return!0}e.has=i})(Gf)),Gf}var bw;function I4(){return bw||(bw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=lT(),r=Lv(),n=_4(),o=Vv(),i=j4();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})(Kf)),Kf}var xw;function R4(){return xw||(xw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=oT(),r=O4(),n=k4(),o=I4();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})(kf)),kf}var ww;function L4(){return ww||(ww=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=x4(),r=w4(),n=oT(),o=C4(),i=R4();function a(s,l=n.identity){return o.isArrayLikeObject(s)?t.uniqBy(Array.from(s),r.ary(i.iteratee(l),1)):[]}e.uniqBy=a})(Sf)),Sf}var Xf,Sw;function $4(){return Sw||(Sw=1,Xf=L4().uniqBy),Xf}var V4=$4();const Pw=Gn(V4);function fT(e,t,r){return t===!0?Pw(e,r):typeof t=="function"?Pw(e,t):e}var dl={exports:{}},Zf={},fl={exports:{}},Qf={};var Cw;function F4(){if(Cw)return Qf;Cw=1;var e=O;function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(d,f){var h=f(),v=n({inst:{value:h,getSnapshot:f}}),m=v[0].inst,g=v[1];return i(function(){m.value=h,m.getSnapshot=f,l(m)&&g({inst:m})},[d,h,f]),o(function(){return l(m)&&g({inst:m}),d(function(){l(m)&&g({inst:m})})},[d]),a(h),h}function l(d){var f=d.getSnapshot;d=d.value;try{var h=f();return!r(d,h)}catch{return!0}}function c(d,f){return f()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:s;return Qf.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,Qf}var Jf={};var Ow;function B4(){return Ow||(Ow=1,process.env.NODE_ENV!=="production"&&(function(){function e(h,v){return h===v&&(h!==0||1/h===1/v)||h!==h&&v!==v}function t(h,v){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=v();if(!d){var g=v();i(m,g)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}g=a({inst:{value:m,getSnapshot:v}});var y=g[0].inst,x=g[1];return l(function(){y.value=m,y.getSnapshot=v,r(y)&&x({inst:y})},[h,m,v]),s(function(){return r(y)&&x({inst:y}),h(function(){r(y)&&x({inst:y})})},[h]),c(m),m}function r(h){var v=h.getSnapshot;h=h.value;try{var m=v();return!i(h,m)}catch{return!0}}function n(h,v){return v()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=O,i=typeof Object.is=="function"?Object.is:e,a=o.useState,s=o.useEffect,l=o.useLayoutEffect,c=o.useDebugValue,u=!1,d=!1,f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?n:t;Jf.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:f,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Jf}var Ew;function pT(){return Ew||(Ew=1,process.env.NODE_ENV==="production"?fl.exports=F4():fl.exports=B4()),fl.exports}var Aw;function W4(){if(Aw)return Zf;Aw=1;var e=O,t=pT();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 Zf.useSyncExternalStoreWithSelector=function(c,u,d,f,h){var v=i(null);if(v.current===null){var m={hasValue:!1,value:null};v.current=m}else m=v.current;v=s(function(){function y(C){if(!x){if(x=!0,w=C,C=f(C),h!==void 0&&m.hasValue){var E=m.value;if(h(E,C))return S=E}return S=C}if(E=S,n(w,C))return E;var A=f(C);return h!==void 0&&h(E,A)?(w=C,E):(w=C,S=A)}var x=!1,w,S,P=d===void 0?null:d;return[function(){return y(u())},P===null?void 0:function(){return y(P())}]},[u,d,f,h]);var g=o(c,v[0],v[1]);return a(function(){m.hasValue=!0,m.value=g},[g]),l(g),g},Zf}var ep={};var Tw;function z4(){return Tw||(Tw=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=O,r=pT(),n=typeof Object.is=="function"?Object.is:e,o=r.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;ep.useSyncExternalStoreWithSelector=function(c,u,d,f,h){var v=i(null);if(v.current===null){var m={hasValue:!1,value:null};v.current=m}else m=v.current;v=s(function(){function y(C){if(!x){if(x=!0,w=C,C=f(C),h!==void 0&&m.hasValue){var E=m.value;if(h(E,C))return S=E}return S=C}if(E=S,n(w,C))return E;var A=f(C);return h!==void 0&&h(E,A)?(w=C,E):(w=C,S=A)}var x=!1,w,S,P=d===void 0?null:d;return[function(){return y(u())},P===null?void 0:function(){return y(P())}]},[u,d,f,h]);var g=o(c,v[0],v[1]);return a(function(){m.hasValue=!0,m.value=g},[g]),l(g),g},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),ep}var Mw;function K4(){return Mw||(Mw=1,process.env.NODE_ENV==="production"?dl.exports=W4():dl.exports=z4()),dl.exports}var U4=K4(),Kv=O.createContext(null),H4=e=>e,Ne=()=>{var e=O.useContext(Kv);return e?e.store.dispatch:H4},zl=()=>{},G4=()=>zl,Y4=(e,t)=>e===t;function J(e){var t=O.useContext(Kv),r=O.useMemo(()=>t?n=>{if(n!=null)return e(n)}:zl,[t,e]);return U4.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:G4,t?t.store.getState:zl,t?t.store.getState:zl,r,Y4)}var q4=(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
54
+ A`).concat(i,",").concat(i,",0,1,1,").concat(a,",").concat(o),className:"recharts-legend-icon"});if(l==="rect")return p.createElement("path",{stroke:"none",fill:s,d:"M0,".concat(nr/8,"h").concat(nr,"v").concat(nr*3/4,"h").concat(-nr,"z"),className:"recharts-legend-icon"});if(p.isValidElement(t.legendIcon)){var u=f4({},t);return delete u.legendIcon,p.cloneElement(t.legendIcon,u)}return p.createElement(Bv,{fill:s,cx:o,cy:o,size:nr,sizeType:"diameter",type:l})}function y4(e){var{payload:t,iconSize:r,layout:n,formatter:o,inactiveColor:i,iconType:a}=e,s={x:0,y:0,width:nr,height:nr},l={display:n==="horizontal"?"inline-block":"block",marginRight:10},c={display:"inline-block",verticalAlign:"middle",marginRight:4};return t.map((u,d)=>{var f=u.formatter||o,h=ve({"recharts-legend-item":!0,["legend-item-".concat(d)]:!0,inactive:u.inactive});if(u.type==="none")return null;var v=u.inactive?i:u.color,m=f?f(u.value,u,d):u.value;return p.createElement("li",fc({className:h,style:l,key:"legend-item-".concat(d)},us(e,u,d)),p.createElement(jv,{width:r,height:r,viewBox:s,style:c,"aria-label":"".concat(m," legend icon")},p.createElement(g4,{data:u,iconType:a,inactiveColor:i})),p.createElement("span",{className:"recharts-legend-item-text",style:{color:v}},m))})}var b4=e=>{var t=et(e,v4),{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 p.createElement("ul",{className:"recharts-default-legend",style:i},p.createElement(y4,fc({},t,{payload:r})))},Pf={},Cf={},Yx;function x4(){return Yx||(Yx=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})(Cf)),Cf}var Of={},qx;function w4(){return qx||(qx=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})(Of)),Of}var Ef={},Xx;function oT(){return Xx||(Xx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r}e.identity=t})(Ef)),Ef}var Af={},Tf={},Mf={},Zx;function S4(){return Zx||(Zx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Number.isSafeInteger(r)&&r>=0}e.isLength=t})(Mf)),Mf}var Qx;function zv(){return Qx||(Qx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=S4();function r(n){return n!=null&&typeof n!="function"&&t.isLength(n.length)}e.isArrayLike=r})(Tf)),Tf}var kf={},Jx;function P4(){return Jx||(Jx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="object"&&r!==null}e.isObjectLike=t})(kf)),kf}var ew;function C4(){return ew||(ew=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=zv(),r=P4();function n(o){return r.isObjectLike(o)&&t.isArrayLike(o)}e.isArrayLikeObject=n})(Af)),Af}var Df={},_f={},tw;function O4(){return tw||(tw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Fv();function r(n){return function(o){return t.get(o,n)}}e.property=r})(_f)),_f}var Nf={},jf={},If={},Rf={},rw;function iT(){return rw||(rw=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})(Rf)),Rf}var Lf={},nw;function aT(){return nw||(nw=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})(Lf)),Lf}var $f={},ow;function sT(){return ow||(ow=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})($f)),$f}var iw;function E4(){return iw||(iw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=iT(),r=aT(),n=sT();function o(u,d,f){return typeof f!="function"?o(u,d,()=>{}):i(u,d,function h(v,m,g,y,x,w){const S=f(v,m,g,y,x,w);return S!==void 0?!!S:i(v,m,h,w)},new Map)}function i(u,d,f,h){if(d===u)return!0;switch(typeof d){case"object":return a(u,d,f,h);case"function":return Object.keys(d).length>0?i(u,{...d},f,h):n.isEqualsSameValueZero(u,d);default:return t.isObject(u)?typeof d=="string"?d==="":!0:n.isEqualsSameValueZero(u,d)}}function a(u,d,f,h){if(d==null)return!0;if(Array.isArray(d))return l(u,d,f,h);if(d instanceof Map)return s(u,d,f,h);if(d instanceof Set)return c(u,d,f,h);const v=Object.keys(d);if(u==null||r.isPrimitive(u))return v.length===0;if(v.length===0)return!0;if(h?.has(d))return h.get(d)===u;h?.set(d,u);try{for(let m=0;m<v.length;m++){const g=v[m];if(!r.isPrimitive(u)&&!(g in u)||d[g]===void 0&&u[g]!==void 0||d[g]===null&&u[g]!==null||!f(u[g],d[g],g,u,d,h))return!1}return!0}finally{h?.delete(d)}}function s(u,d,f,h){if(d.size===0)return!0;if(!(u instanceof Map))return!1;for(const[v,m]of d.entries()){const g=u.get(v);if(f(g,m,v,u,d,h)===!1)return!1}return!0}function l(u,d,f,h){if(d.length===0)return!0;if(!Array.isArray(u))return!1;const v=new Set;for(let m=0;m<d.length;m++){const g=d[m];let y=!1;for(let x=0;x<u.length;x++){if(v.has(x))continue;const w=u[x];let S=!1;if(f(w,g,m,u,d,h)&&(S=!0),S){v.add(x),y=!0;break}}if(!y)return!1}return!0}function c(u,d,f,h){return d.size===0?!0:u instanceof Set?l([...u],[...d],f,h):!1}e.isMatchWith=o,e.isSetMatch=c})(If)),If}var aw;function lT(){return aw||(aw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=E4();function r(n,o){return t.isMatchWith(n,o,()=>{})}e.isMatch=r})(jf)),jf}var Vf={},Ff={},Bf={},sw;function A4(){return sw||(sw=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})(Bf)),Bf}var Wf={},lw;function Kv(){return lw||(lw=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})(Wf)),Wf}var zf={},cw;function cT(){return cw||(cw=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]",d="[object Function]",f="[object ArrayBuffer]",h="[object Object]",v="[object Error]",m="[object DataView]",g="[object Uint8Array]",y="[object Uint8ClampedArray]",x="[object Uint16Array]",w="[object Uint32Array]",S="[object BigUint64Array]",P="[object Int8Array]",C="[object Int16Array]",E="[object Int32Array]",A="[object BigInt64Array]",T="[object Float32Array]",M="[object Float64Array]";e.argumentsTag=i,e.arrayBufferTag=f,e.arrayTag=u,e.bigInt64ArrayTag=A,e.bigUint64ArrayTag=S,e.booleanTag=o,e.dataViewTag=m,e.dateTag=s,e.errorTag=v,e.float32ArrayTag=T,e.float64ArrayTag=M,e.functionTag=d,e.int16ArrayTag=C,e.int32ArrayTag=E,e.int8ArrayTag=P,e.mapTag=l,e.numberTag=n,e.objectTag=h,e.regexpTag=t,e.setTag=c,e.stringTag=r,e.symbolTag=a,e.uint16ArrayTag=x,e.uint32ArrayTag=w,e.uint8ArrayTag=g,e.uint8ClampedArrayTag=y})(zf)),zf}var Kf={},uw;function T4(){return uw||(uw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}e.isTypedArray=t})(Kf)),Kf}var dw;function uT(){return dw||(dw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=A4(),r=Kv(),n=cT(),o=aT(),i=T4();function a(u,d){return s(u,void 0,u,new Map,d)}function s(u,d,f,h=new Map,v=void 0){const m=v?.(u,d,f,h);if(m!==void 0)return m;if(o.isPrimitive(u))return u;if(h.has(u))return h.get(u);if(Array.isArray(u)){const g=new Array(u.length);h.set(u,g);for(let y=0;y<u.length;y++)g[y]=s(u[y],y,f,h,v);return Object.hasOwn(u,"index")&&(g.index=u.index),Object.hasOwn(u,"input")&&(g.input=u.input),g}if(u instanceof Date)return new Date(u.getTime());if(u instanceof RegExp){const g=new RegExp(u.source,u.flags);return g.lastIndex=u.lastIndex,g}if(u instanceof Map){const g=new Map;h.set(u,g);for(const[y,x]of u)g.set(y,s(x,y,f,h,v));return g}if(u instanceof Set){const g=new Set;h.set(u,g);for(const y of u)g.add(s(y,void 0,f,h,v));return g}if(typeof Buffer<"u"&&Buffer.isBuffer(u))return u.subarray();if(i.isTypedArray(u)){const g=new(Object.getPrototypeOf(u)).constructor(u.length);h.set(u,g);for(let y=0;y<u.length;y++)g[y]=s(u[y],y,f,h,v);return g}if(u instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&u instanceof SharedArrayBuffer)return u.slice(0);if(u instanceof DataView){const g=new DataView(u.buffer.slice(0),u.byteOffset,u.byteLength);return h.set(u,g),l(g,u,f,h,v),g}if(typeof File<"u"&&u instanceof File){const g=new File([u],u.name,{type:u.type});return h.set(u,g),l(g,u,f,h,v),g}if(typeof Blob<"u"&&u instanceof Blob){const g=new Blob([u],{type:u.type});return h.set(u,g),l(g,u,f,h,v),g}if(u instanceof Error){const g=new u.constructor;return h.set(u,g),g.message=u.message,g.name=u.name,g.stack=u.stack,g.cause=u.cause,l(g,u,f,h,v),g}if(u instanceof Boolean){const g=new Boolean(u.valueOf());return h.set(u,g),l(g,u,f,h,v),g}if(u instanceof Number){const g=new Number(u.valueOf());return h.set(u,g),l(g,u,f,h,v),g}if(u instanceof String){const g=new String(u.valueOf());return h.set(u,g),l(g,u,f,h,v),g}if(typeof u=="object"&&c(u)){const g=Object.create(Object.getPrototypeOf(u));return h.set(u,g),l(g,u,f,h,v),g}return u}function l(u,d,f=u,h,v){const m=[...Object.keys(d),...t.getSymbols(d)];for(let g=0;g<m.length;g++){const y=m[g],x=Object.getOwnPropertyDescriptor(u,y);(x==null||x.writable)&&(u[y]=s(d[y],y,f,h,v))}}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})(Ff)),Ff}var fw;function M4(){return fw||(fw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=uT();function r(n){return t.cloneDeepWithImpl(n,void 0,n,new Map,void 0)}e.cloneDeep=r})(Vf)),Vf}var pw;function k4(){return pw||(pw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=lT(),r=M4();function n(o){return o=r.cloneDeep(o),i=>t.isMatch(i,o)}e.matches=n})(Nf)),Nf}var Uf={},Hf={},Gf={},hw;function D4(){return hw||(hw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=uT(),r=Kv(),n=cT();function o(i,a){return t.cloneDeepWith(i,(s,l,c,u)=>{const d=a?.(s,l,c,u);if(d!==void 0)return d;if(typeof i=="object"){if(r.getTag(i)===n.objectTag&&typeof i.constructor!="function"){const f={};return u.set(i,f),t.copyProperties(f,i,c,u),f}switch(Object.prototype.toString.call(i)){case n.numberTag:case n.stringTag:case n.booleanTag:{const f=new i.constructor(i?.valueOf());return t.copyProperties(f,i),f}case n.argumentsTag:{const f={};return t.copyProperties(f,i),f.length=i.length,f[Symbol.iterator]=i[Symbol.iterator],f}default:return}}})}e.cloneDeepWith=o})(Gf)),Gf}var mw;function _4(){return mw||(mw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=D4();function r(n){return t.cloneDeepWith(n)}e.cloneDeep=r})(Hf)),Hf}var Yf={},qf={},vw;function dT(){return vw||(vw=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})(qf)),qf}var Xf={},gw;function N4(){return gw||(gw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Kv();function r(n){return n!==null&&typeof n=="object"&&t.getTag(n)==="[object Arguments]"}e.isArguments=r})(Xf)),Xf}var yw;function j4(){return yw||(yw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=JA(),r=dT(),n=N4(),o=Vv();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 d=l[u];if((c==null||!Object.hasOwn(c,d))&&!((Array.isArray(c)||n.isArguments(c))&&r.isIndex(d)&&d<c.length))return!1;c=c[d]}return!0}e.has=i})(Yf)),Yf}var bw;function I4(){return bw||(bw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=lT(),r=$v(),n=_4(),o=Fv(),i=j4();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})(Uf)),Uf}var xw;function R4(){return xw||(xw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=oT(),r=O4(),n=k4(),o=I4();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})(Df)),Df}var ww;function L4(){return ww||(ww=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=x4(),r=w4(),n=oT(),o=C4(),i=R4();function a(s,l=n.identity){return o.isArrayLikeObject(s)?t.uniqBy(Array.from(s),r.ary(i.iteratee(l),1)):[]}e.uniqBy=a})(Pf)),Pf}var Zf,Sw;function $4(){return Sw||(Sw=1,Zf=L4().uniqBy),Zf}var V4=$4();const Pw=Gn(V4);function fT(e,t,r){return t===!0?Pw(e,r):typeof t=="function"?Pw(e,t):e}var dl={exports:{}},Qf={},fl={exports:{}},Jf={};var Cw;function F4(){if(Cw)return Jf;Cw=1;var e=O;function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(d,f){var h=f(),v=n({inst:{value:h,getSnapshot:f}}),m=v[0].inst,g=v[1];return i(function(){m.value=h,m.getSnapshot=f,l(m)&&g({inst:m})},[d,h,f]),o(function(){return l(m)&&g({inst:m}),d(function(){l(m)&&g({inst:m})})},[d]),a(h),h}function l(d){var f=d.getSnapshot;d=d.value;try{var h=f();return!r(d,h)}catch{return!0}}function c(d,f){return f()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:s;return Jf.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,Jf}var ep={};var Ow;function B4(){return Ow||(Ow=1,process.env.NODE_ENV!=="production"&&(function(){function e(h,v){return h===v&&(h!==0||1/h===1/v)||h!==h&&v!==v}function t(h,v){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=v();if(!d){var g=v();i(m,g)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}g=a({inst:{value:m,getSnapshot:v}});var y=g[0].inst,x=g[1];return l(function(){y.value=m,y.getSnapshot=v,r(y)&&x({inst:y})},[h,m,v]),s(function(){return r(y)&&x({inst:y}),h(function(){r(y)&&x({inst:y})})},[h]),c(m),m}function r(h){var v=h.getSnapshot;h=h.value;try{var m=v();return!i(h,m)}catch{return!0}}function n(h,v){return v()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=O,i=typeof Object.is=="function"?Object.is:e,a=o.useState,s=o.useEffect,l=o.useLayoutEffect,c=o.useDebugValue,u=!1,d=!1,f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?n:t;ep.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:f,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),ep}var Ew;function pT(){return Ew||(Ew=1,process.env.NODE_ENV==="production"?fl.exports=F4():fl.exports=B4()),fl.exports}var Aw;function W4(){if(Aw)return Qf;Aw=1;var e=O,t=pT();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 Qf.useSyncExternalStoreWithSelector=function(c,u,d,f,h){var v=i(null);if(v.current===null){var m={hasValue:!1,value:null};v.current=m}else m=v.current;v=s(function(){function y(C){if(!x){if(x=!0,w=C,C=f(C),h!==void 0&&m.hasValue){var E=m.value;if(h(E,C))return S=E}return S=C}if(E=S,n(w,C))return E;var A=f(C);return h!==void 0&&h(E,A)?(w=C,E):(w=C,S=A)}var x=!1,w,S,P=d===void 0?null:d;return[function(){return y(u())},P===null?void 0:function(){return y(P())}]},[u,d,f,h]);var g=o(c,v[0],v[1]);return a(function(){m.hasValue=!0,m.value=g},[g]),l(g),g},Qf}var tp={};var Tw;function z4(){return Tw||(Tw=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=O,r=pT(),n=typeof Object.is=="function"?Object.is:e,o=r.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;tp.useSyncExternalStoreWithSelector=function(c,u,d,f,h){var v=i(null);if(v.current===null){var m={hasValue:!1,value:null};v.current=m}else m=v.current;v=s(function(){function y(C){if(!x){if(x=!0,w=C,C=f(C),h!==void 0&&m.hasValue){var E=m.value;if(h(E,C))return S=E}return S=C}if(E=S,n(w,C))return E;var A=f(C);return h!==void 0&&h(E,A)?(w=C,E):(w=C,S=A)}var x=!1,w,S,P=d===void 0?null:d;return[function(){return y(u())},P===null?void 0:function(){return y(P())}]},[u,d,f,h]);var g=o(c,v[0],v[1]);return a(function(){m.hasValue=!0,m.value=g},[g]),l(g),g},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),tp}var Mw;function K4(){return Mw||(Mw=1,process.env.NODE_ENV==="production"?dl.exports=W4():dl.exports=z4()),dl.exports}var U4=K4(),Uv=O.createContext(null),H4=e=>e,Ne=()=>{var e=O.useContext(Uv);return e?e.store.dispatch:H4},zl=()=>{},G4=()=>zl,Y4=(e,t)=>e===t;function J(e){var t=O.useContext(Uv),r=O.useMemo(()=>t?n=>{if(n!=null)return e(n)}:zl,[t,e]);return U4.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:G4,t?t.store.getState:zl,t?t.store.getState:zl,r,Y4)}var q4=(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
55
  \`createSelector([state => state.todos], todos => todos)\`
56
56
  This could lead to inefficient memoization and unnecessary re-renders.
57
57
  Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:o})}}},X4=(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
58
  This means your output selector will likely run more frequently than intended.
59
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})}},Z4={inputStabilityCheck:"once",identityFunctionCheck:"once"};function Q4(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function J4(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function eK(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 kw=e=>Array.isArray(e)?e:[e];function tK(e){const t=Array.isArray(e[0])?e[0]:e;return eK(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Dw(e,t){const r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var rK=(e,t)=>{const{identityFunctionCheck:r,inputStabilityCheck:n}={...Z4,...t};return{identityFunctionCheck:{shouldRun:r==="always"||r==="once"&&e,run:q4},inputStabilityCheck:{shouldRun:n==="always"||n==="once"&&e,run:X4}}},nK=class{constructor(e){this.value=e}deref(){return this.value}},oK=typeof WeakRef<"u"?WeakRef:nK,iK=0,_w=1;function pl(){return{s:iK,v:void 0,o:null,p:null}}function hT(e,t={}){let r=pl();const{resultEqualityCheck:n}=t;let o,i=0;function a(){let s=r;const{length:l}=arguments;for(let d=0,f=l;d<f;d++){const h=arguments[d];if(typeof h=="function"||typeof h=="object"&&h!==null){let v=s.o;v===null&&(s.o=v=new WeakMap);const m=v.get(h);m===void 0?(s=pl(),v.set(h,s)):s=m}else{let v=s.p;v===null&&(s.p=v=new Map);const m=v.get(h);m===void 0?(s=pl(),v.set(h,s)):s=m}}const c=s;let u;if(s.s===_w)u=s.v;else if(u=e.apply(null,arguments),i++,n){const d=o?.deref?.()??o;d!=null&&n(d,u)&&(u=d,i!==0&&i--),o=typeof u=="object"&&u!==null||typeof u=="function"?new oK(u):u}return c.s=_w,c.v=u,u}return a.clearCache=()=>{r=pl(),a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}function aK(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()),Q4(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...r,...l},{memoize:d,memoizeOptions:f=[],argsMemoize:h=hT,argsMemoizeOptions:v=[],devModeChecks:m={}}=u,g=kw(f),y=kw(v),x=tK(o),w=d(function(){return i++,c.apply(null,arguments)},...g);let S=!0;const P=h(function(){a++;const E=Dw(x,arguments);if(s=w.apply(null,E),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:A,inputStabilityCheck:T}=rK(S,m);if(A.shouldRun&&A.run(c,E,s),T.shouldRun){const M=Dw(x,arguments);T.run({inputSelectorResults:E,inputSelectorResultsCopy:M},{memoize:d,memoizeOptions:g},arguments)}S&&(S=!1)}return s},...y);return Object.assign(P,{resultFunc:c,memoizedResultFunc:w,dependencies:x,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>s,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:d,argsMemoize:h})};return Object.assign(n,{withTypes:()=>n}),n}var I=aK(hT),sK=Object.assign((e,t=I)=>{J4(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:()=>sK}),tp={},rp={},np={},Nw;function lK(){return Nw||(Nw=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})(np)),np}var op={},ip={},jw;function mT(){return jw||(jw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"||r instanceof Symbol}e.isSymbol=t})(ip)),ip}var Iw;function cK(){return Iw||(Iw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=mT(),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})(op)),op}var Rw;function uK(){return Rw||(Rw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=lK(),r=cK(),n=$v();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(h=>String(h));const c=(h,v)=>{let m=h;for(let g=0;g<v.length&&m!=null;++g)m=m[v[g]];return m},u=(h,v)=>v==null||h==null?v:typeof h=="object"&&"key"in h?Object.hasOwn(v,h.key)?v[h.key]:c(v,h.path):typeof h=="function"?h(v):Array.isArray(h)?c(v,h):typeof v=="object"?v[h]:v,d=a.map(h=>(Array.isArray(h)&&h.length===1&&(h=h[0]),h==null||typeof h=="function"||Array.isArray(h)||r.isKey(h)?h:{key:h,path:n.toPath(h)}));return i.map(h=>({original:h,criteria:d.map(v=>u(v,h))})).slice().sort((h,v)=>{for(let m=0;m<d.length;m++){const g=t.compareValues(h.criteria[m],v.criteria[m],s[m]);if(g!==0)return g}return 0}).map(h=>h.original)}e.orderBy=o})(rp)),rp}var ap={},Lw;function dK(){return Lw||(Lw=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})(ap)),ap}var sp={},$w;function vT(){return $w||($w=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=dT(),r=Wv(),n=iT(),o=sT();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})(sp)),sp}var Vw;function fK(){return Vw||(Vw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=uK(),r=dK(),n=vT();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})(tp)),tp}var lp,Fw;function pK(){return Fw||(Fw=1,lp=fK().sortBy),lp}var hK=pK();const _u=Gn(hK);var gT=e=>e.legend.settings,mK=e=>e.legend.size,vK=e=>e.legend.payload,gK=I([vK,gT],(e,t)=>{var{itemSorter:r}=t,n=e.flat(1);return r?_u(n,r):n});function yK(){return J(gK)}var hl=1;function yT(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,r]=O.useState({height:0,left:0,top:0,width:0}),n=O.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)>hl||Math.abs(a.left-t.left)>hl||Math.abs(a.top-t.top)>hl||Math.abs(a.width-t.width)>hl)&&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 gt(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 bK=typeof Symbol=="function"&&Symbol.observable||"@@observable",Bw=bK,cp=()=>Math.random().toString(36).substring(7).split("").join("."),xK={INIT:`@@redux/INIT${cp()}`,REPLACE:`@@redux/REPLACE${cp()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${cp()}`},So=xK;function ds(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 wK(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(CK(e))return"date";if(PK(e))return"error";const r=SK(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 SK(e){return typeof e.constructor=="function"?e.constructor.name:null}function PK(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function CK(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function Tn(e){let t=typeof e;return process.env.NODE_ENV!=="production"&&(t=wK(e)),t}function bT(e,t,r){if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?gt(2):`Expected the root reducer to be a function. Instead, received: '${Tn(e)}'`);if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?gt(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"?gt(1):`Expected the enhancer to be a function. Instead, received: '${Tn(r)}'`);return r(bT)(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((g,y)=>{a.set(y,g)}))}function u(){if(l)throw new Error(process.env.NODE_ENV==="production"?gt(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return o}function d(g){if(typeof g!="function")throw new Error(process.env.NODE_ENV==="production"?gt(4):`Expected the listener to be a function. Instead, received: '${Tn(g)}'`);if(l)throw new Error(process.env.NODE_ENV==="production"?gt(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,g),function(){if(y){if(l)throw new Error(process.env.NODE_ENV==="production"?gt(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 f(g){if(!ds(g))throw new Error(process.env.NODE_ENV==="production"?gt(7):`Actions must be plain objects. Instead, the actual type was: '${Tn(g)}'. 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 g.type>"u")throw new Error(process.env.NODE_ENV==="production"?gt(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(typeof g.type!="string")throw new Error(process.env.NODE_ENV==="production"?gt(17):`Action "type" property must be a string. Instead, the actual type was: '${Tn(g.type)}'. Value was: '${g.type}' (stringified)`);if(l)throw new Error(process.env.NODE_ENV==="production"?gt(9):"Reducers may not dispatch actions.");try{l=!0,o=n(o,g)}finally{l=!1}return(i=a).forEach(x=>{x()}),g}function h(g){if(typeof g!="function")throw new Error(process.env.NODE_ENV==="production"?gt(10):`Expected the nextReducer to be a function. Instead, received: '${Tn(g)}`);n=g,f({type:So.REPLACE})}function v(){const g=d;return{subscribe(y){if(typeof y!="object"||y===null)throw new Error(process.env.NODE_ENV==="production"?gt(11):`Expected the observer to be an object. Instead, received: '${Tn(y)}'`);function x(){const S=y;S.next&&S.next(u())}return x(),{unsubscribe:g(x)}},[Bw](){return this}}}return f({type:So.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:h,[Bw]:v}}function Ww(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function OK(e,t,r,n){const o=Object.keys(t),i=r&&r.type===So.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(!ds(e))return`The ${i} has unexpected type of "${Tn(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===So.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 EK(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:So.INIT})>"u")throw new Error(process.env.NODE_ENV==="production"?gt(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:So.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?gt(13):`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${So.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 xT(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"&&Ww(`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{EK(r)}catch(a){i=a}return function(s={},l){if(i)throw i;if(process.env.NODE_ENV!=="production"){const d=OK(s,r,l,o);d&&Ww(d)}let c=!1;const u={};for(let d=0;d<n.length;d++){const f=n[d],h=r[f],v=s[f],m=h(v,l);if(typeof m>"u"){const g=l&&l.type;throw new Error(process.env.NODE_ENV==="production"?gt(14):`When called with an action of type ${g?`"${String(g)}"`:"(unknown type)"}, the slice reducer for key "${f}" 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[f]=m,c=c||m!==v}return c=c||n.length!==Object.keys(s).length,c?u:s}}function pc(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function AK(...e){return t=>(r,n)=>{const o=t(r,n);let i=()=>{throw new Error(process.env.NODE_ENV==="production"?gt(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=pc(...s)(o.dispatch),{...o,dispatch:i}}}function Uv(e){return ds(e)&&"type"in e&&typeof e.type=="string"}var wT=Symbol.for("immer-nothing"),zw=Symbol.for("immer-draftable"),Lt=Symbol.for("immer-state"),TK=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 Gt(e,...t){if(process.env.NODE_ENV!=="production"){const r=TK[e],n=po(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 qt=Object,Ci=qt.getPrototypeOf,hc="constructor",Nu="prototype",kh="configurable",mc="enumerable",Kl="writable",_a="value",on=e=>!!e&&!!e[Lt];function xr(e){return e?ST(e)||Iu(e)||!!e[zw]||!!e[hc]?.[zw]||Ru(e)||Lu(e):!1}var MK=qt[Nu][hc].toString(),Kw=new WeakMap;function ST(e){if(!e||!Hv(e))return!1;const t=Ci(e);if(t===null||t===qt[Nu])return!0;const r=qt.hasOwnProperty.call(t,hc)&&t[hc];if(r===Object)return!0;if(!po(r))return!1;let n=Kw.get(r);return n===void 0&&(n=Function.toString.call(r),Kw.set(r,n)),n===MK}function ju(e,t,r=!0){fs(e)===0?(r?Reflect.ownKeys(e):qt.keys(e)).forEach(o=>{t(o,e[o],e)}):e.forEach((n,o)=>t(o,n,e))}function fs(e){const t=e[Lt];return t?t.type_:Iu(e)?1:Ru(e)?2:Lu(e)?3:0}var Uw=(e,t,r=fs(e))=>r===2?e.has(t):qt[Nu].hasOwnProperty.call(e,t),Dh=(e,t,r=fs(e))=>r===2?e.get(t):e[t],vc=(e,t,r,n=fs(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function kK(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Iu=Array.isArray,Ru=e=>e instanceof Map,Lu=e=>e instanceof Set,Hv=e=>typeof e=="object",po=e=>typeof e=="function",up=e=>typeof e=="boolean";function DK(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var Xr=e=>e.copy_||e.base_,Gv=e=>e.modified_?e.copy_:e.base_;function _h(e,t){if(Ru(e))return new Map(e);if(Lu(e))return new Set(e);if(Iu(e))return Array[Nu].slice.call(e);const r=ST(e);if(t===!0||t==="class_only"&&!r){const n=qt.getOwnPropertyDescriptors(e);delete n[Lt];let o=Reflect.ownKeys(n);for(let i=0;i<o.length;i++){const a=o[i],s=n[a];s[Kl]===!1&&(s[Kl]=!0,s[kh]=!0),(s.get||s.set)&&(n[a]={[kh]:!0,[Kl]:!0,[mc]:s[mc],[_a]:e[a]})}return qt.create(Ci(e),n)}else{const n=Ci(e);if(n!==null&&r)return{...e};const o=qt.create(n);return qt.assign(o,e)}}function Yv(e,t=!1){return $u(e)||on(e)||!xr(e)||(fs(e)>1&&qt.defineProperties(e,{set:ml,add:ml,clear:ml,delete:ml}),qt.freeze(e),t&&ju(e,(r,n)=>{Yv(n,!0)},!1)),e}function _K(){Gt(2)}var ml={[_a]:_K};function $u(e){return e===null||!Hv(e)?!0:qt.isFrozen(e)}var gc="MapSet",Nh="Patches",Hw="ArrayMethods",PT={};function _o(e){const t=PT[e];return t||Gt(0,e),t}var Gw=e=>!!PT[e],Na,CT=()=>Na,NK=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Gw(gc)?_o(gc):void 0,arrayMethodsPlugin_:Gw(Hw)?_o(Hw):void 0});function Yw(e,t){t&&(e.patchPlugin_=_o(Nh),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function jh(e){Ih(e),e.drafts_.forEach(jK),e.drafts_=null}function Ih(e){e===Na&&(Na=e.parent_)}var qw=e=>Na=NK(Na,e);function jK(e){const t=e[Lt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Xw(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[Lt].modified_&&(jh(t),Gt(4)),xr(e)&&(e=Zw(t,e));const{patchPlugin_:o}=t;o&&o.generateReplacementPatches_(r[Lt].base_,e,t)}else e=Zw(t,r);return IK(t,e,!0),jh(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==wT?e:void 0}function Zw(e,t){if($u(t))return t;const r=t[Lt];if(!r)return yc(t,e.handledSet_,e);if(!Vu(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);AT(r,e)}return r.copy_}function IK(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Yv(t,r)}function OT(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Vu=(e,t)=>e.scope_===t,RK=[];function ET(e,t,r,n){const o=Xr(e),i=e.type_;if(n!==void 0&&Dh(o,n,i)===t){vc(o,n,r,i);return}if(!e.draftLocations_){const s=e.draftLocations_=new Map;ju(o,(l,c)=>{if(on(c)){const u=s.get(c)||[];u.push(l),s.set(c,u)}})}const a=e.draftLocations_.get(t)??RK;for(const s of a)vc(o,s,r,i)}function LK(e,t,r){e.callbacks_.push(function(o){const i=t;if(!i||!Vu(i,o))return;o.mapSetPlugin_?.fixSetContents(i);const a=Gv(i);ET(e,i.draft_??i,a,r),AT(i,o)})}function AT(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)}OT(e)}}function $K(e,t,r){const{scope_:n}=e;if(on(r)){const o=r[Lt];Vu(o,n)&&o.callbacks_.push(function(){Ul(e);const a=Gv(o);ET(e,r,a,t)})}else xr(r)&&e.callbacks_.push(function(){const i=Xr(e);e.type_===3?i.has(r)&&yc(r,n.handledSet_,n):Dh(i,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&yc(Dh(e.copy_,t,e.type_),n.handledSet_,n)})}function yc(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||on(e)||t.has(e)||!xr(e)||$u(e)||(t.add(e),ju(e,(n,o)=>{if(on(o)){const i=o[Lt];if(Vu(i,r)){const a=Gv(i);vc(e,n,a,e.type_),OT(i)}}else xr(o)&&yc(o,t,r)})),e}function VK(e,t){const r=Iu(e),n={type_:r?1:0,scope_:t?t.scope_:CT(),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=bc;r&&(o=[n],i=ja);const{revoke:a,proxy:s}=Proxy.revocable(o,i);return n.draft_=s,n.revoke_=a,[s,n]}var bc={get(e,t){if(t===Lt)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=Xr(e);if(!Uw(o,t,e.type_))return FK(e,o,t);const i=o[t];if(e.finalized_||!xr(i)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&DK(t))return i;if(i===dp(e.base_,t)){Ul(e);const a=e.type_===1?+t:t,s=Lh(e.scope_,i,e,a);return e.copy_[a]=s}return i},has(e,t){return t in Xr(e)},ownKeys(e){return Reflect.ownKeys(Xr(e))},set(e,t,r){const n=TT(Xr(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const o=dp(Xr(e),t),i=o?.[Lt];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(kK(r,o)&&(r!==void 0||Uw(e.base_,t,e.type_)))return!0;Ul(e),Rh(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),$K(e,t,r)),!0},deleteProperty(e,t){return Ul(e),dp(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Rh(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Xr(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[Kl]:!0,[kh]:e.type_!==1||t!=="length",[mc]:n[mc],[_a]:r[t]}},defineProperty(){Gt(11)},getPrototypeOf(e){return Ci(e.base_)},setPrototypeOf(){Gt(12)}},ja={};for(let e in bc){let t=bc[e];ja[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}ja.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&Gt(13),ja.set.call(this,e,t,void 0)};ja.set=function(e,t,r){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&Gt(14),bc.set.call(this,e[0],t,r,e[0])};function dp(e,t){const r=e[Lt];return(r?Xr(r):e)[t]}function FK(e,t,r){const n=TT(t,r);return n?_a in n?n[_a]:n.get?.call(e.draft_):void 0}function TT(e,t){if(!(t in e))return;let r=Ci(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Ci(r)}}function Rh(e){e.modified_||(e.modified_=!0,e.parent_&&Rh(e.parent_))}function Ul(e){e.copy_||(e.assigned_=new Map,e.copy_=_h(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var BK=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(r,n,o)=>{if(po(r)&&!po(n)){const a=n;n=r;const s=this;return function(c=a,...u){return s.produce(c,d=>n.call(this,d,...u))}}po(n)||Gt(6),o!==void 0&&!po(o)&&Gt(7);let i;if(xr(r)){const a=qw(this),s=Lh(a,r,void 0);let l=!0;try{i=n(s),l=!1}finally{l?jh(a):Ih(a)}return Yw(a,o),Xw(i,a)}else if(!r||!Hv(r)){if(i=n(r),i===void 0&&(i=r),i===wT&&(i=void 0),this.autoFreeze_&&Yv(i,!0),o){const a=[],s=[];_o(Nh).generateReplacementPatches_(r,i,{patches_:a,inversePatches_:s}),o(a,s)}return i}else Gt(1,r)},this.produceWithPatches=(r,n)=>{if(po(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]},up(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),up(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),up(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){xr(t)||Gt(8),on(t)&&(t=br(t));const r=qw(this),n=Lh(r,t,void 0);return n[Lt].isManual_=!0,Ih(r),n}finishDraft(t,r){const n=t&&t[Lt];(!n||!n.isManual_)&&Gt(9);const{scope_:o}=n;return Yw(o,r),Xw(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=_o(Nh).applyPatches_;return on(t)?o(t,r):this.produce(t,i=>o(i,r))}};function Lh(e,t,r,n){const[o,i]=Ru(t)?_o(gc).proxyMap_(t,r):Lu(t)?_o(gc).proxySet_(t,r):VK(t,r);return(r?.scope_??CT()).drafts_.push(o),i.callbacks_=r?.callbacks_??[],i.key_=n,r&&n!==void 0?LK(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 br(e){return on(e)||Gt(10,e),MT(e)}function MT(e){if(!xr(e)||$u(e))return e;const t=e[Lt];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=_h(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=_h(e,!0);return ju(r,(o,i)=>{vc(r,o,MT(i))},n),t&&(t.finalized_=!1),r}var WK=new BK,kT=WK.produce;function DT(e){return({dispatch:r,getState:n})=>o=>i=>typeof i=="function"?i(r,n,e):o(i)}var zK=DT(),KK=DT,UK=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?pc:pc.apply(null,arguments)},HK=e=>e&&typeof e.match=="function";function ur(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(process.env.NODE_ENV==="production"?xe(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=>Uv(n)&&n.type===e,r}function GK(e){return typeof e=="function"&&"type"in e&&HK(e)}function YK(e){const t=e?`${e}`.split("/"):[],r=t[t.length-1]||"actionCreator";return`Detected an action creator with type "${e||"unknown"}" being dispatched.
60
+ \`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:r,firstInputs:i,secondInputs:a,stack:c})}},Z4={inputStabilityCheck:"once",identityFunctionCheck:"once"};function Q4(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function J4(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function eK(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 kw=e=>Array.isArray(e)?e:[e];function tK(e){const t=Array.isArray(e[0])?e[0]:e;return eK(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Dw(e,t){const r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var rK=(e,t)=>{const{identityFunctionCheck:r,inputStabilityCheck:n}={...Z4,...t};return{identityFunctionCheck:{shouldRun:r==="always"||r==="once"&&e,run:q4},inputStabilityCheck:{shouldRun:n==="always"||n==="once"&&e,run:X4}}},nK=class{constructor(e){this.value=e}deref(){return this.value}},oK=typeof WeakRef<"u"?WeakRef:nK,iK=0,_w=1;function pl(){return{s:iK,v:void 0,o:null,p:null}}function hT(e,t={}){let r=pl();const{resultEqualityCheck:n}=t;let o,i=0;function a(){let s=r;const{length:l}=arguments;for(let d=0,f=l;d<f;d++){const h=arguments[d];if(typeof h=="function"||typeof h=="object"&&h!==null){let v=s.o;v===null&&(s.o=v=new WeakMap);const m=v.get(h);m===void 0?(s=pl(),v.set(h,s)):s=m}else{let v=s.p;v===null&&(s.p=v=new Map);const m=v.get(h);m===void 0?(s=pl(),v.set(h,s)):s=m}}const c=s;let u;if(s.s===_w)u=s.v;else if(u=e.apply(null,arguments),i++,n){const d=o?.deref?.()??o;d!=null&&n(d,u)&&(u=d,i!==0&&i--),o=typeof u=="object"&&u!==null||typeof u=="function"?new oK(u):u}return c.s=_w,c.v=u,u}return a.clearCache=()=>{r=pl(),a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}function aK(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()),Q4(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...r,...l},{memoize:d,memoizeOptions:f=[],argsMemoize:h=hT,argsMemoizeOptions:v=[],devModeChecks:m={}}=u,g=kw(f),y=kw(v),x=tK(o),w=d(function(){return i++,c.apply(null,arguments)},...g);let S=!0;const P=h(function(){a++;const E=Dw(x,arguments);if(s=w.apply(null,E),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:A,inputStabilityCheck:T}=rK(S,m);if(A.shouldRun&&A.run(c,E,s),T.shouldRun){const M=Dw(x,arguments);T.run({inputSelectorResults:E,inputSelectorResultsCopy:M},{memoize:d,memoizeOptions:g},arguments)}S&&(S=!1)}return s},...y);return Object.assign(P,{resultFunc:c,memoizedResultFunc:w,dependencies:x,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>s,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:d,argsMemoize:h})};return Object.assign(n,{withTypes:()=>n}),n}var I=aK(hT),sK=Object.assign((e,t=I)=>{J4(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:()=>sK}),rp={},np={},op={},Nw;function lK(){return Nw||(Nw=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})(op)),op}var ip={},ap={},jw;function mT(){return jw||(jw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"||r instanceof Symbol}e.isSymbol=t})(ap)),ap}var Iw;function cK(){return Iw||(Iw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=mT(),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})(ip)),ip}var Rw;function uK(){return Rw||(Rw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=lK(),r=cK(),n=Vv();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(h=>String(h));const c=(h,v)=>{let m=h;for(let g=0;g<v.length&&m!=null;++g)m=m[v[g]];return m},u=(h,v)=>v==null||h==null?v:typeof h=="object"&&"key"in h?Object.hasOwn(v,h.key)?v[h.key]:c(v,h.path):typeof h=="function"?h(v):Array.isArray(h)?c(v,h):typeof v=="object"?v[h]:v,d=a.map(h=>(Array.isArray(h)&&h.length===1&&(h=h[0]),h==null||typeof h=="function"||Array.isArray(h)||r.isKey(h)?h:{key:h,path:n.toPath(h)}));return i.map(h=>({original:h,criteria:d.map(v=>u(v,h))})).slice().sort((h,v)=>{for(let m=0;m<d.length;m++){const g=t.compareValues(h.criteria[m],v.criteria[m],s[m]);if(g!==0)return g}return 0}).map(h=>h.original)}e.orderBy=o})(np)),np}var sp={},Lw;function dK(){return Lw||(Lw=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})(sp)),sp}var lp={},$w;function vT(){return $w||($w=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=dT(),r=zv(),n=iT(),o=sT();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})(lp)),lp}var Vw;function fK(){return Vw||(Vw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=uK(),r=dK(),n=vT();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})(rp)),rp}var cp,Fw;function pK(){return Fw||(Fw=1,cp=fK().sortBy),cp}var hK=pK();const _u=Gn(hK);var gT=e=>e.legend.settings,mK=e=>e.legend.size,vK=e=>e.legend.payload,gK=I([vK,gT],(e,t)=>{var{itemSorter:r}=t,n=e.flat(1);return r?_u(n,r):n});function yK(){return J(gK)}var hl=1;function yT(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,r]=O.useState({height:0,left:0,top:0,width:0}),n=O.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)>hl||Math.abs(a.left-t.left)>hl||Math.abs(a.top-t.top)>hl||Math.abs(a.width-t.width)>hl)&&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 gt(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 bK=typeof Symbol=="function"&&Symbol.observable||"@@observable",Bw=bK,up=()=>Math.random().toString(36).substring(7).split("").join("."),xK={INIT:`@@redux/INIT${up()}`,REPLACE:`@@redux/REPLACE${up()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${up()}`},So=xK;function ds(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 wK(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(CK(e))return"date";if(PK(e))return"error";const r=SK(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 SK(e){return typeof e.constructor=="function"?e.constructor.name:null}function PK(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function CK(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function Tn(e){let t=typeof e;return process.env.NODE_ENV!=="production"&&(t=wK(e)),t}function bT(e,t,r){if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?gt(2):`Expected the root reducer to be a function. Instead, received: '${Tn(e)}'`);if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?gt(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"?gt(1):`Expected the enhancer to be a function. Instead, received: '${Tn(r)}'`);return r(bT)(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((g,y)=>{a.set(y,g)}))}function u(){if(l)throw new Error(process.env.NODE_ENV==="production"?gt(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return o}function d(g){if(typeof g!="function")throw new Error(process.env.NODE_ENV==="production"?gt(4):`Expected the listener to be a function. Instead, received: '${Tn(g)}'`);if(l)throw new Error(process.env.NODE_ENV==="production"?gt(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,g),function(){if(y){if(l)throw new Error(process.env.NODE_ENV==="production"?gt(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 f(g){if(!ds(g))throw new Error(process.env.NODE_ENV==="production"?gt(7):`Actions must be plain objects. Instead, the actual type was: '${Tn(g)}'. 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 g.type>"u")throw new Error(process.env.NODE_ENV==="production"?gt(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(typeof g.type!="string")throw new Error(process.env.NODE_ENV==="production"?gt(17):`Action "type" property must be a string. Instead, the actual type was: '${Tn(g.type)}'. Value was: '${g.type}' (stringified)`);if(l)throw new Error(process.env.NODE_ENV==="production"?gt(9):"Reducers may not dispatch actions.");try{l=!0,o=n(o,g)}finally{l=!1}return(i=a).forEach(x=>{x()}),g}function h(g){if(typeof g!="function")throw new Error(process.env.NODE_ENV==="production"?gt(10):`Expected the nextReducer to be a function. Instead, received: '${Tn(g)}`);n=g,f({type:So.REPLACE})}function v(){const g=d;return{subscribe(y){if(typeof y!="object"||y===null)throw new Error(process.env.NODE_ENV==="production"?gt(11):`Expected the observer to be an object. Instead, received: '${Tn(y)}'`);function x(){const S=y;S.next&&S.next(u())}return x(),{unsubscribe:g(x)}},[Bw](){return this}}}return f({type:So.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:h,[Bw]:v}}function Ww(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function OK(e,t,r,n){const o=Object.keys(t),i=r&&r.type===So.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(!ds(e))return`The ${i} has unexpected type of "${Tn(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===So.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 EK(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:So.INIT})>"u")throw new Error(process.env.NODE_ENV==="production"?gt(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:So.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?gt(13):`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${So.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 xT(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"&&Ww(`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{EK(r)}catch(a){i=a}return function(s={},l){if(i)throw i;if(process.env.NODE_ENV!=="production"){const d=OK(s,r,l,o);d&&Ww(d)}let c=!1;const u={};for(let d=0;d<n.length;d++){const f=n[d],h=r[f],v=s[f],m=h(v,l);if(typeof m>"u"){const g=l&&l.type;throw new Error(process.env.NODE_ENV==="production"?gt(14):`When called with an action of type ${g?`"${String(g)}"`:"(unknown type)"}, the slice reducer for key "${f}" 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[f]=m,c=c||m!==v}return c=c||n.length!==Object.keys(s).length,c?u:s}}function pc(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function AK(...e){return t=>(r,n)=>{const o=t(r,n);let i=()=>{throw new Error(process.env.NODE_ENV==="production"?gt(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=pc(...s)(o.dispatch),{...o,dispatch:i}}}function Hv(e){return ds(e)&&"type"in e&&typeof e.type=="string"}var wT=Symbol.for("immer-nothing"),zw=Symbol.for("immer-draftable"),Lt=Symbol.for("immer-state"),TK=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 Gt(e,...t){if(process.env.NODE_ENV!=="production"){const r=TK[e],n=po(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 qt=Object,Ci=qt.getPrototypeOf,hc="constructor",Nu="prototype",Dh="configurable",mc="enumerable",Kl="writable",_a="value",on=e=>!!e&&!!e[Lt];function xr(e){return e?ST(e)||Iu(e)||!!e[zw]||!!e[hc]?.[zw]||Ru(e)||Lu(e):!1}var MK=qt[Nu][hc].toString(),Kw=new WeakMap;function ST(e){if(!e||!Gv(e))return!1;const t=Ci(e);if(t===null||t===qt[Nu])return!0;const r=qt.hasOwnProperty.call(t,hc)&&t[hc];if(r===Object)return!0;if(!po(r))return!1;let n=Kw.get(r);return n===void 0&&(n=Function.toString.call(r),Kw.set(r,n)),n===MK}function ju(e,t,r=!0){fs(e)===0?(r?Reflect.ownKeys(e):qt.keys(e)).forEach(o=>{t(o,e[o],e)}):e.forEach((n,o)=>t(o,n,e))}function fs(e){const t=e[Lt];return t?t.type_:Iu(e)?1:Ru(e)?2:Lu(e)?3:0}var Uw=(e,t,r=fs(e))=>r===2?e.has(t):qt[Nu].hasOwnProperty.call(e,t),_h=(e,t,r=fs(e))=>r===2?e.get(t):e[t],vc=(e,t,r,n=fs(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function kK(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Iu=Array.isArray,Ru=e=>e instanceof Map,Lu=e=>e instanceof Set,Gv=e=>typeof e=="object",po=e=>typeof e=="function",dp=e=>typeof e=="boolean";function DK(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var Xr=e=>e.copy_||e.base_,Yv=e=>e.modified_?e.copy_:e.base_;function Nh(e,t){if(Ru(e))return new Map(e);if(Lu(e))return new Set(e);if(Iu(e))return Array[Nu].slice.call(e);const r=ST(e);if(t===!0||t==="class_only"&&!r){const n=qt.getOwnPropertyDescriptors(e);delete n[Lt];let o=Reflect.ownKeys(n);for(let i=0;i<o.length;i++){const a=o[i],s=n[a];s[Kl]===!1&&(s[Kl]=!0,s[Dh]=!0),(s.get||s.set)&&(n[a]={[Dh]:!0,[Kl]:!0,[mc]:s[mc],[_a]:e[a]})}return qt.create(Ci(e),n)}else{const n=Ci(e);if(n!==null&&r)return{...e};const o=qt.create(n);return qt.assign(o,e)}}function qv(e,t=!1){return $u(e)||on(e)||!xr(e)||(fs(e)>1&&qt.defineProperties(e,{set:ml,add:ml,clear:ml,delete:ml}),qt.freeze(e),t&&ju(e,(r,n)=>{qv(n,!0)},!1)),e}function _K(){Gt(2)}var ml={[_a]:_K};function $u(e){return e===null||!Gv(e)?!0:qt.isFrozen(e)}var gc="MapSet",jh="Patches",Hw="ArrayMethods",PT={};function _o(e){const t=PT[e];return t||Gt(0,e),t}var Gw=e=>!!PT[e],Na,CT=()=>Na,NK=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Gw(gc)?_o(gc):void 0,arrayMethodsPlugin_:Gw(Hw)?_o(Hw):void 0});function Yw(e,t){t&&(e.patchPlugin_=_o(jh),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ih(e){Rh(e),e.drafts_.forEach(jK),e.drafts_=null}function Rh(e){e===Na&&(Na=e.parent_)}var qw=e=>Na=NK(Na,e);function jK(e){const t=e[Lt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Xw(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[Lt].modified_&&(Ih(t),Gt(4)),xr(e)&&(e=Zw(t,e));const{patchPlugin_:o}=t;o&&o.generateReplacementPatches_(r[Lt].base_,e,t)}else e=Zw(t,r);return IK(t,e,!0),Ih(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==wT?e:void 0}function Zw(e,t){if($u(t))return t;const r=t[Lt];if(!r)return yc(t,e.handledSet_,e);if(!Vu(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);AT(r,e)}return r.copy_}function IK(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&qv(t,r)}function OT(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Vu=(e,t)=>e.scope_===t,RK=[];function ET(e,t,r,n){const o=Xr(e),i=e.type_;if(n!==void 0&&_h(o,n,i)===t){vc(o,n,r,i);return}if(!e.draftLocations_){const s=e.draftLocations_=new Map;ju(o,(l,c)=>{if(on(c)){const u=s.get(c)||[];u.push(l),s.set(c,u)}})}const a=e.draftLocations_.get(t)??RK;for(const s of a)vc(o,s,r,i)}function LK(e,t,r){e.callbacks_.push(function(o){const i=t;if(!i||!Vu(i,o))return;o.mapSetPlugin_?.fixSetContents(i);const a=Yv(i);ET(e,i.draft_??i,a,r),AT(i,o)})}function AT(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)}OT(e)}}function $K(e,t,r){const{scope_:n}=e;if(on(r)){const o=r[Lt];Vu(o,n)&&o.callbacks_.push(function(){Ul(e);const a=Yv(o);ET(e,r,a,t)})}else xr(r)&&e.callbacks_.push(function(){const i=Xr(e);e.type_===3?i.has(r)&&yc(r,n.handledSet_,n):_h(i,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&yc(_h(e.copy_,t,e.type_),n.handledSet_,n)})}function yc(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||on(e)||t.has(e)||!xr(e)||$u(e)||(t.add(e),ju(e,(n,o)=>{if(on(o)){const i=o[Lt];if(Vu(i,r)){const a=Yv(i);vc(e,n,a,e.type_),OT(i)}}else xr(o)&&yc(o,t,r)})),e}function VK(e,t){const r=Iu(e),n={type_:r?1:0,scope_:t?t.scope_:CT(),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=bc;r&&(o=[n],i=ja);const{revoke:a,proxy:s}=Proxy.revocable(o,i);return n.draft_=s,n.revoke_=a,[s,n]}var bc={get(e,t){if(t===Lt)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=Xr(e);if(!Uw(o,t,e.type_))return FK(e,o,t);const i=o[t];if(e.finalized_||!xr(i)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&DK(t))return i;if(i===fp(e.base_,t)){Ul(e);const a=e.type_===1?+t:t,s=$h(e.scope_,i,e,a);return e.copy_[a]=s}return i},has(e,t){return t in Xr(e)},ownKeys(e){return Reflect.ownKeys(Xr(e))},set(e,t,r){const n=TT(Xr(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const o=fp(Xr(e),t),i=o?.[Lt];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(kK(r,o)&&(r!==void 0||Uw(e.base_,t,e.type_)))return!0;Ul(e),Lh(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),$K(e,t,r)),!0},deleteProperty(e,t){return Ul(e),fp(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Lh(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Xr(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[Kl]:!0,[Dh]:e.type_!==1||t!=="length",[mc]:n[mc],[_a]:r[t]}},defineProperty(){Gt(11)},getPrototypeOf(e){return Ci(e.base_)},setPrototypeOf(){Gt(12)}},ja={};for(let e in bc){let t=bc[e];ja[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}ja.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&Gt(13),ja.set.call(this,e,t,void 0)};ja.set=function(e,t,r){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&Gt(14),bc.set.call(this,e[0],t,r,e[0])};function fp(e,t){const r=e[Lt];return(r?Xr(r):e)[t]}function FK(e,t,r){const n=TT(t,r);return n?_a in n?n[_a]:n.get?.call(e.draft_):void 0}function TT(e,t){if(!(t in e))return;let r=Ci(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Ci(r)}}function Lh(e){e.modified_||(e.modified_=!0,e.parent_&&Lh(e.parent_))}function Ul(e){e.copy_||(e.assigned_=new Map,e.copy_=Nh(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var BK=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(r,n,o)=>{if(po(r)&&!po(n)){const a=n;n=r;const s=this;return function(c=a,...u){return s.produce(c,d=>n.call(this,d,...u))}}po(n)||Gt(6),o!==void 0&&!po(o)&&Gt(7);let i;if(xr(r)){const a=qw(this),s=$h(a,r,void 0);let l=!0;try{i=n(s),l=!1}finally{l?Ih(a):Rh(a)}return Yw(a,o),Xw(i,a)}else if(!r||!Gv(r)){if(i=n(r),i===void 0&&(i=r),i===wT&&(i=void 0),this.autoFreeze_&&qv(i,!0),o){const a=[],s=[];_o(jh).generateReplacementPatches_(r,i,{patches_:a,inversePatches_:s}),o(a,s)}return i}else Gt(1,r)},this.produceWithPatches=(r,n)=>{if(po(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]},dp(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),dp(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),dp(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){xr(t)||Gt(8),on(t)&&(t=br(t));const r=qw(this),n=$h(r,t,void 0);return n[Lt].isManual_=!0,Rh(r),n}finishDraft(t,r){const n=t&&t[Lt];(!n||!n.isManual_)&&Gt(9);const{scope_:o}=n;return Yw(o,r),Xw(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=_o(jh).applyPatches_;return on(t)?o(t,r):this.produce(t,i=>o(i,r))}};function $h(e,t,r,n){const[o,i]=Ru(t)?_o(gc).proxyMap_(t,r):Lu(t)?_o(gc).proxySet_(t,r):VK(t,r);return(r?.scope_??CT()).drafts_.push(o),i.callbacks_=r?.callbacks_??[],i.key_=n,r&&n!==void 0?LK(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 br(e){return on(e)||Gt(10,e),MT(e)}function MT(e){if(!xr(e)||$u(e))return e;const t=e[Lt];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Nh(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Nh(e,!0);return ju(r,(o,i)=>{vc(r,o,MT(i))},n),t&&(t.finalized_=!1),r}var WK=new BK,kT=WK.produce;function DT(e){return({dispatch:r,getState:n})=>o=>i=>typeof i=="function"?i(r,n,e):o(i)}var zK=DT(),KK=DT,UK=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?pc:pc.apply(null,arguments)},HK=e=>e&&typeof e.match=="function";function ur(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(process.env.NODE_ENV==="production"?xe(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=>Hv(n)&&n.type===e,r}function GK(e){return typeof e=="function"&&"type"in e&&HK(e)}function YK(e){const t=e?`${e}`.split("/"):[],r=t[t.length-1]||"actionCreator";return`Detected an action creator with type "${e||"unknown"}" being dispatched.
61
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 qK(e={}){if(process.env.NODE_ENV==="production")return()=>r=>n=>r(n);const{isActionCreator:t=GK}=e;return()=>r=>n=>(t(n)&&console.warn(YK(n.type)),r(n))}function _T(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
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 NT=class ba extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,ba.prototype)}static get[Symbol.species](){return ba}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new ba(...t[0].concat(this)):new ba(...t.concat(this))}};function Qw(e){return xr(e)?kT(e,()=>{}):e}function vl(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function XK(e){return typeof e!="object"||e==null||Object.isFrozen(e)}function ZK(e,t,r){const n=jT(e,t,r);return{detectMutations(){return IT(e,t,n,r)}}}function jT(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]=jT(e,t,r[s],l))}}return i}function IT(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 d=i?i+"."+u:u;if(c&&t.some(v=>v instanceof RegExp?v.test(d):d===v))continue;const f=IT(e,t,r.children[u],n[u],s,d);if(f.wasMutated)return f}return{wasMutated:!1}}function QK(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(d,f){return c[0]===f?"[Circular ~]":"[Circular ~."+u.slice(0,c.indexOf(f)).join(".")+"]"}),function(d,f){if(c.length>0){var h=c.indexOf(this);~h?c.splice(h+1):c.push(this),~h?u.splice(h,1/0,d):u.push(d),~c.indexOf(f)&&(f=l.call(this,d,f))}else c.push(f);return s==null?f:s.call(this,d,f)}},{isImmutable:n=XK,ignoredPaths:o,warnAfter:i=32}=e;const a=ZK.bind(null,n,o);return({getState:s})=>{let l=s(),c=a(l),u;return d=>f=>{const h=_T(i,"ImmutableStateInvariantMiddleware");h.measureTime(()=>{if(l=s(),u=c.detectMutations(),c=a(l),u.wasMutated)throw new Error(process.env.NODE_ENV==="production"?xe(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 v=d(f);return h.measureTime(()=>{if(l=s(),u=c.detectMutations(),c=a(l),u.wasMutated)throw new Error(process.env.NODE_ENV==="production"?xe(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(f)}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)}),h.warnIfExceeded(),v}}}}function RT(e){const t=typeof e;return e==null||t==="string"||t==="boolean"||t==="number"||Array.isArray(e)||ds(e)}function $h(e,t="",r=RT,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 d=t?t+"."+c:c;if(!(l&&o.some(h=>h instanceof RegExp?h.test(d):d===h))){if(!r(u))return{keyPath:d,value:u};if(typeof u=="object"&&(a=$h(u,d,r,n,o,i),a))return a}}return i&&LT(e)&&i.add(e),!1}function LT(e){if(!Object.isFrozen(e))return!1;for(const t of Object.values(e))if(!(typeof t!="object"||t===null)&&!LT(t))return!1;return!0}function JK(e={}){if(process.env.NODE_ENV==="production")return()=>t=>r=>t(r);{const{isSerializable:t=RT,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 d=>f=>h=>{if(!Uv(h))return f(h);const v=f(h),m=_T(a,"SerializableStateInvariantMiddleware");return!l&&!(n.length&&n.indexOf(h.type)!==-1)&&m.measureTime(()=>{const g=$h(h,"",t,r,o,u);if(g){const{keyPath:y,value:x}=g;console.error(`A non-serializable value was detected in an action, in the path: \`${y}\`. Value:`,x,`
63
+ It is disabled in production builds, so you don't need to worry about that.`)}}}var NT=class ba extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,ba.prototype)}static get[Symbol.species](){return ba}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new ba(...t[0].concat(this)):new ba(...t.concat(this))}};function Qw(e){return xr(e)?kT(e,()=>{}):e}function vl(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function XK(e){return typeof e!="object"||e==null||Object.isFrozen(e)}function ZK(e,t,r){const n=jT(e,t,r);return{detectMutations(){return IT(e,t,n,r)}}}function jT(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]=jT(e,t,r[s],l))}}return i}function IT(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 d=i?i+"."+u:u;if(c&&t.some(v=>v instanceof RegExp?v.test(d):d===v))continue;const f=IT(e,t,r.children[u],n[u],s,d);if(f.wasMutated)return f}return{wasMutated:!1}}function QK(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(d,f){return c[0]===f?"[Circular ~]":"[Circular ~."+u.slice(0,c.indexOf(f)).join(".")+"]"}),function(d,f){if(c.length>0){var h=c.indexOf(this);~h?c.splice(h+1):c.push(this),~h?u.splice(h,1/0,d):u.push(d),~c.indexOf(f)&&(f=l.call(this,d,f))}else c.push(f);return s==null?f:s.call(this,d,f)}},{isImmutable:n=XK,ignoredPaths:o,warnAfter:i=32}=e;const a=ZK.bind(null,n,o);return({getState:s})=>{let l=s(),c=a(l),u;return d=>f=>{const h=_T(i,"ImmutableStateInvariantMiddleware");h.measureTime(()=>{if(l=s(),u=c.detectMutations(),c=a(l),u.wasMutated)throw new Error(process.env.NODE_ENV==="production"?xe(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 v=d(f);return h.measureTime(()=>{if(l=s(),u=c.detectMutations(),c=a(l),u.wasMutated)throw new Error(process.env.NODE_ENV==="production"?xe(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(f)}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)}),h.warnIfExceeded(),v}}}}function RT(e){const t=typeof e;return e==null||t==="string"||t==="boolean"||t==="number"||Array.isArray(e)||ds(e)}function Vh(e,t="",r=RT,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 d=t?t+"."+c:c;if(!(l&&o.some(h=>h instanceof RegExp?h.test(d):d===h))){if(!r(u))return{keyPath:d,value:u};if(typeof u=="object"&&(a=Vh(u,d,r,n,o,i),a))return a}}return i&&LT(e)&&i.add(e),!1}function LT(e){if(!Object.isFrozen(e))return!1;for(const t of Object.values(e))if(!(typeof t!="object"||t===null)&&!LT(t))return!1;return!0}function JK(e={}){if(process.env.NODE_ENV==="production")return()=>t=>r=>t(r);{const{isSerializable:t=RT,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 d=>f=>h=>{if(!Hv(h))return f(h);const v=f(h),m=_T(a,"SerializableStateInvariantMiddleware");return!l&&!(n.length&&n.indexOf(h.type)!==-1)&&m.measureTime(()=>{const g=Vh(h,"",t,r,o,u);if(g){const{keyPath:y,value:x}=g;console.error(`A non-serializable value was detected in an action, in the path: \`${y}\`. Value:`,x,`
64
64
  Take a look at the logic that dispatched this action: `,h,`
65
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 g=d.getState(),y=$h(g,"",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,`
66
+ (To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)`)}}),s||(m.measureTime(()=>{const g=d.getState(),y=Vh(g,"",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
67
  Take a look at the reducer(s) handling this action type: ${h.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()),v}}}function gl(e){return typeof e=="boolean"}var eU=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=t??{};let a=new NT;if(r&&(gl(r)?a.push(zK):a.push(KK(r.extraArgument))),process.env.NODE_ENV!=="production"){if(n){let s={};gl(n)||(s=n),a.unshift(QK(s))}if(o){let s={};gl(o)||(s=o),a.push(JK(s))}if(i){let s={};gl(i)||(s=i),a.unshift(qK(s))}}return a},$T="RTK_autoBatch",Re=()=>e=>({payload:e,meta:{[$T]:!0}}),Jw=e=>t=>{setTimeout(t,e)},VT=(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:Jw(10):e.type==="callback"?e.queueNotification:Jw(e.timeout),c=()=>{a=!1,i&&(i=!1,s.forEach(u=>u()))};return Object.assign({},n,{subscribe(u){const d=()=>o&&u(),f=n.subscribe(d);return s.add(u),()=>{f(),s.delete(u)}},dispatch(u){try{return o=!u?.meta?.[$T],i=!o,i&&(a||(a=!0,l(c))),n.dispatch(u)}finally{o=!0}}})},tU=e=>function(r){const{autoBatch:n=!0}=r??{};let o=new NT(e);return n&&o.push(VT(typeof n=="object"?n:void 0)),o};function rU(e){const t=eU(),{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(ds(r))l=xT(r);else throw new Error(process.env.NODE_ENV==="production"?xe(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"?xe(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"?xe(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"?xe(4):"each middleware provided to configureStore must be a function");if(process.env.NODE_ENV!=="production"&&i){let m=new Set;c.forEach(g=>{if(m.has(g))throw new Error(process.env.NODE_ENV==="production"?xe(42):"Duplicate middleware references found when creating the store. Ensure that each middleware is only included once.");m.add(g)})}let u=pc;o&&(u=UK({trace:process.env.NODE_ENV!=="production",...typeof o=="object"&&o}));const d=AK(...c),f=tU(d);if(process.env.NODE_ENV!=="production"&&s&&typeof s!="function")throw new Error(process.env.NODE_ENV==="production"?xe(5):"`enhancers` field must be a callback");let h=typeof s=="function"?s(f):f();if(process.env.NODE_ENV!=="production"&&!Array.isArray(h))throw new Error(process.env.NODE_ENV==="production"?xe(6):"`enhancers` callback must return an array");if(process.env.NODE_ENV!=="production"&&h.some(m=>typeof m!="function"))throw new Error(process.env.NODE_ENV==="production"?xe(7):"each enhancer provided to configureStore must be a function");process.env.NODE_ENV!=="production"&&c.length&&!h.includes(d)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");const v=u(...h);return bT(l,a,v)}function FT(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"?xe(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(n)throw new Error(process.env.NODE_ENV==="production"?xe(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"?xe(28):"`builder.addCase` cannot be called with an empty action type");if(s in t)throw new Error(process.env.NODE_ENV==="production"?xe(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"?xe(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"?xe(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"?xe(31):"`builder.addDefaultCase` can only be called once");return n=i,o}};return e(o),[t,r,n]}function nU(e){return typeof e=="function"}function oU(e,t){if(process.env.NODE_ENV!=="production"&&typeof t=="object")throw new Error(process.env.NODE_ENV==="production"?xe(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]=FT(t),i;if(nU(e))i=()=>Qw(e());else{const s=Qw(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,d)=>{if(d)if(on(u)){const h=d(u,l);return h===void 0?u:h}else{if(xr(u))return kT(u,f=>d(f,l));{const f=d(u,l);if(f===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return f}}return u},s)}return a.getInitialState=i,a}var iU="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",aU=(e=21)=>{let t="",r=e;for(;r--;)t+=iU[Math.random()*64|0];return t},sU=Symbol.for("rtk-slice-createasyncthunk");function lU(e,t){return`${e}/${t}`}function cU({creators:e}={}){const t=e?.asyncThunk?.[sU];return function(n){const{name:o,reducerPath:i=o}=n;if(!o)throw new Error(process.env.NODE_ENV==="production"?xe(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(dU()):n.reducers)||{},s=Object.keys(a),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(w,S){const P=typeof w=="string"?w:w.type;if(!P)throw new Error(process.env.NODE_ENV==="production"?xe(12):"`context.addCase` cannot be called with an empty action type");if(P in l.sliceCaseReducersByType)throw new Error(process.env.NODE_ENV==="production"?xe(13):"`context.addCase` cannot be called with two reducers for the same action type: "+P);return l.sliceCaseReducersByType[P]=S,c},addMatcher(w,S){return l.sliceMatchers.push({matcher:w,reducer:S}),c},exposeAction(w,S){return l.actionCreators[w]=S,c},exposeCaseReducer(w,S){return l.sliceCaseReducersByName[w]=S,c}};s.forEach(w=>{const S=a[w],P={reducerName:w,type:lU(o,w),createNotation:typeof n.reducers=="function"};pU(S)?mU(P,S,c,t):fU(P,S,c)});function u(){if(process.env.NODE_ENV!=="production"&&typeof n.extraReducers=="object")throw new Error(process.env.NODE_ENV==="production"?xe(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={},S=[],P=void 0]=typeof n.extraReducers=="function"?FT(n.extraReducers):[n.extraReducers],C={...w,...l.sliceCaseReducersByType};return oU(n.initialState,E=>{for(let A in C)E.addCase(A,C[A]);for(let A of l.sliceMatchers)E.addMatcher(A.matcher,A.reducer);for(let A of S)E.addMatcher(A.matcher,A.reducer);P&&E.addDefaultCase(P)})}const d=w=>w,f=new Map,h=new WeakMap;let v;function m(w,S){return v||(v=u()),v(w,S)}function g(){return v||(v=u()),v.getInitialState()}function y(w,S=!1){function P(E){let A=E[w];if(typeof A>"u"){if(S)A=vl(h,P,g);else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?xe(15):"selectSlice returned undefined for an uninjected slice reducer")}return A}function C(E=d){const A=vl(f,S,()=>new WeakMap);return vl(A,E,()=>{const T={};for(const[M,_]of Object.entries(n.selectors??{}))T[M]=uU(_,E,()=>vl(h,E,g),S);return T})}return{reducerPath:w,getSelectors:C,get selectors(){return C(P)},selectSlice:P}}const x={name:o,reducer:m,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:g,...y(i),injectInto(w,{reducerPath:S,...P}={}){const C=S??i;return w.inject({reducerPath:C,reducer:m},P),{...x,...y(C,!0)}}};return x}}function uU(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"?xe(16):"selectState returned undefined for an uninjected slice reducer")}return e(s,...a)}return o.unwrapped=e,o}var Bt=cU();function dU(){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 fU({type:e,reducerName:t,createNotation:r},n,o){let i,a;if("reducer"in n){if(r&&!hU(n))throw new Error(process.env.NODE_ENV==="production"?xe(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?ur(e,a):ur(e))}function pU(e){return e._reducerDefinitionType==="asyncThunk"}function hU(e){return e._reducerDefinitionType==="reducerWithPrepare"}function mU({type:e,reducerName:t},r,n,o){if(!o)throw new Error(process.env.NODE_ENV==="production"?xe(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,d=o(e,i,u);n.exposeAction(t,d),a&&n.addCase(d.fulfilled,a),s&&n.addCase(d.pending,s),l&&n.addCase(d.rejected,l),c&&n.addMatcher(d.settled,c),n.exposeCaseReducer(t,{fulfilled:a||yl,pending:s||yl,rejected:l||yl,settled:c||yl})}function yl(){}var vU="task",BT="listener",WT="completed",qv="cancelled",gU=`task-${qv}`,yU=`task-${WT}`,Vh=`${BT}-${qv}`,bU=`${BT}-${WT}`,Fu=class{constructor(e){this.code=e,this.message=`${vU} ${qv} (reason: ${e})`}name="TaskAbortError";message},Xv=(e,t)=>{if(typeof e!="function")throw new TypeError(process.env.NODE_ENV==="production"?xe(32):`${t} is not a function`)},xc=()=>{},zT=(e,t=xc)=>(e.catch(t),e),KT=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Po=e=>{if(e.aborted)throw new Fu(e.reason)};function UT(e,t){let r=xc;return new Promise((n,o)=>{const i=()=>o(new Fu(e.reason));if(e.aborted){i();return}r=KT(e,i),t.finally(()=>r()).then(n,o)}).finally(()=>{r=xc})}var xU=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof Fu?"cancelled":"rejected",error:r}}finally{t?.()}},wc=e=>t=>zT(UT(e,t).then(r=>(Po(e),r))),HT=e=>{const t=wc(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:xi}=Object,e0={},ps="listenerMiddleware",wU=(e,t)=>{const r=n=>KT(e,()=>n.abort(e.reason));return(n,o)=>{Xv(n,"taskExecutor");const i=new AbortController;r(i);const a=xU(async()=>{Po(e),Po(i.signal);const s=await n({pause:wc(i.signal),delay:HT(i.signal),signal:i.signal});return Po(i.signal),s},()=>i.abort(yU));return o?.autoJoin&&t.push(a.catch(xc)),{result:wc(e)(a),cancel(){i.abort(gU)}}}},SU=(e,t)=>{const r=async(n,o)=>{Po(t);let i=()=>{};const s=[new Promise((l,c)=>{let u=e({predicate:n,effect:(d,f)=>{f.unsubscribe(),l([d,f.getState(),f.getOriginalState()])}});i=()=>{u(),c()}})];o!=null&&s.push(new Promise(l=>setTimeout(l,o,null)));try{const l=await UT(t,Promise.race(s));return Po(t),l}finally{i()}};return(n,o)=>zT(r(n,o))},GT=e=>{let{type:t,actionCreator:r,matcher:n,predicate:o,effect:i}=e;if(t)o=ur(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"?xe(21):"Creating or removing a listener requires one of the known fields for matching an action");return Xv(i,"options.listener"),{predicate:o,type:t,effect:i}},YT=xi(e=>{const{type:t,predicate:r,effect:n}=GT(e);return{id:aU(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(process.env.NODE_ENV==="production"?xe(22):"Unsubscribe not initialized")}}},{withTypes:()=>YT}),t0=(e,t)=>{const{type:r,effect:n,predicate:o}=GT(t);return Array.from(e.values()).find(i=>(typeof r=="string"?i.type===r:i.predicate===o)&&i.effect===n)},Fh=e=>{e.pending.forEach(t=>{t.abort(Vh)})},PU=(e,t)=>()=>{for(const r of t.keys())Fh(r);e.clear()},r0=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},qT=xi(ur(`${ps}/add`),{withTypes:()=>qT}),CU=ur(`${ps}/removeAll`),XT=xi(ur(`${ps}/remove`),{withTypes:()=>XT}),OU=(...e)=>{console.error(`${ps}/error`,...e)},hs=(e={})=>{const t=new Map,r=new Map,n=h=>{const v=r.get(h)??0;r.set(h,v+1)},o=h=>{const v=r.get(h)??1;v===1?r.delete(h):r.set(h,v-1)},{extra:i,onError:a=OU}=e;Xv(a,"onError");const s=h=>(h.unsubscribe=()=>t.delete(h.id),t.set(h.id,h),v=>{h.unsubscribe(),v?.cancelActive&&Fh(h)}),l=h=>{const v=t0(t,h)??YT(h);return s(v)};xi(l,{withTypes:()=>l});const c=h=>{const v=t0(t,h);return v&&(v.unsubscribe(),h.cancelActive&&Fh(v)),!!v};xi(c,{withTypes:()=>c});const u=async(h,v,m,g)=>{const y=new AbortController,x=SU(l,y.signal),w=[];try{h.pending.add(y),n(h),await Promise.resolve(h.effect(v,xi({},m,{getOriginalState:g,condition:(S,P)=>x(S,P).then(Boolean),take:x,delay:HT(y.signal),pause:wc(y.signal),extra:i,signal:y.signal,fork:wU(y.signal,w),unsubscribe:h.unsubscribe,subscribe:()=>{t.set(h.id,h)},cancelActiveListeners:()=>{h.pending.forEach((S,P,C)=>{S!==y&&(S.abort(Vh),C.delete(S))})},cancel:()=>{y.abort(Vh),h.pending.delete(y)},throwIfCancelled:()=>{Po(y.signal)}})))}catch(S){S instanceof Fu||r0(a,S,{raisedBy:"effect"})}finally{await Promise.all(w),y.abort(bU),o(h),h.pending.delete(y)}},d=PU(t,r);return{middleware:h=>v=>m=>{if(!Uv(m))return v(m);if(qT.match(m))return l(m.payload);if(CU.match(m)){d();return}if(XT.match(m))return c(m.payload);let g=h.getState();const y=()=>{if(g===e0)throw new Error(process.env.NODE_ENV==="production"?xe(23):`${ps}: getOriginalState can only be called synchronously`);return g};let x;try{if(x=v(m),t.size>0){const w=h.getState(),S=Array.from(t.values());for(const P of S){let C=!1;try{C=P.predicate(m,w,g)}catch(E){C=!1,r0(a,E,{raisedBy:"predicate"})}C&&u(P,m,h,y)}}}finally{g=e0}return x},startListening:l,stopListening:c,clearListeners:d}};function xe(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 EU={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},ZT=Bt({name:"chartLayout",initialState:EU,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:AU,setLayout:TU,setChartSize:MU,setScale:kU}=ZT.actions,DU=ZT.reducer;function QT(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function pe(e){return Number.isFinite(e)}function Wr(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function n0(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 ci(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?n0(Object(r),!0).forEach(function(n){_U(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _U(e,t,r){return(t=NU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function NU(e){var t=jU(e,"string");return typeof t=="symbol"?t:t+""}function jU(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 Ae(e,t,r){return We(e)||We(t)?r:Br(t)?ko(e,t,r):typeof t=="function"?t(e):r}var IU=(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"&&Y(e[i]))return ci(ci({},e),{},{[i]:e[i]+(n||0)});if((s==="horizontal"||s==="vertical"&&i==="center")&&a!=="middle"&&Y(e[a]))return ci(ci({},e),{},{[a]:e[a]+(o||0)})}return e},gn=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",JT=(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},eM=(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:d,niceTicks:f,axisType:h}=e;if(!a)return null;var v=s==="scaleBand"&&a.bandwidth?a.bandwidth()/2:2,m=o==="category"&&a.bandwidth?a.bandwidth()/v:0;if(m=h==="angleAxis"&&i&&i.length>=2?ft(i[0]-i[1])*2*m:m,d||f){var g=(d||f||[]).map((y,x)=>{var w=n?n.indexOf(y):y,S=a.map(w);return pe(S)?{coordinate:S+m,value:y,offset:m,index:x}:null}).filter(Vt);return g}return l&&c?c.map((y,x)=>{var w=a.map(y);return pe(w)?{coordinate:w+m,value:y,index:x,offset:m}:null}).filter(Vt):a.ticks&&u!=null?a.ticks(u).map((y,x)=>{var w=a.map(y);return pe(w)?{coordinate:w+m,value:y,index:x,offset:m}:null}).filter(Vt):a.domain().map((y,x)=>{var w=a.map(y);return pe(w)?{coordinate:w+m,value:n?n[y]:y,index:x,offset:m}:null}).filter(Vt)},RU=(e,t)=>{if(!t||t.length!==2||!Y(t[0])||!Y(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(!Y(e[0])||e[0]<r)&&(o[0]=r),(!Y(e[1])||e[1]>n)&&(o[1]=n),o[0]>n&&(o[0]=n),o[1]<r&&(o[1]=r),o},LU=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],d=c[0],f=Fr(u)?d:u;f>=0?(c[0]=i,i+=f,c[1]=i):(c[0]=a,a+=f,c[1]=a)}}}},$U=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=Fr(l[1])?l[0]:l[1];c>=0?(l[0]=i,i+=c,l[1]=i):(l[0]=0,l[1]=0)}}}},VU={sign:LU,expand:W5,none:Mo,silhouette:z5,wiggle:K5,positive:$U},FU=(e,t,r)=>{var n,o=(n=VU[r])!==null&&n!==void 0?n:Mo,i=B5().keys(t).value((s,l)=>Number(Ae(s,l,0))).order(Th).offset(o),a=i(e);return a.forEach((s,l)=>{s.forEach((c,u)=>{var d=Ae(e[u],t[l],0);Array.isArray(d)&&d.length===2&&Y(d[0])&&Y(d[1])&&(c[0]=d[0],c[1]=d[1])})}),a};function BU(e){return e==null?void 0:String(e)}function o0(e){var{axis:t,ticks:r,bandSize:n,entry:o,index:i,dataKey:a}=e;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!We(o[t.dataKey])){var s=tT(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=Ae(o,We(a)?t.dataKey:a),c=t.scale.map(l);return Y(c)?c:null}var i0=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=Ae(i,t.dataKey,t.scale.domain()[a]);if(We(s))return null;var l=t.scale.map(s);return Y(l)?l-o/2+n:null},WU=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]},zU=e=>{var t=e.flat(2).filter(Y);return[Math.min(...t),Math.max(...t)]},KU=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],UU=(e,t,r)=>{if(e!=null)return KU(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=QT(c,t,r),d=zU(u);return!pe(d[0])||!pe(d[1])?l:[Math.min(l[0],d[0]),Math.max(l[1],d[1])]},[1/0,-1/0]);return[Math.min(s[0],n[0]),Math.max(s[1],n[1])]},[1/0,-1/0]))},a0=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,s0=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Oi=(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=_u(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 l0(e){var{tooltipEntrySettings:t,dataKey:r,payload:n,value:o,name:i}=e;return ci(ci({},t),{},{dataKey:r,payload:n,value:o,name:i})}function Fi(e,t){if(e)return String(e);if(typeof t=="string")return t}var HU=(e,t)=>{if(t==="horizontal")return e.chartX;if(t==="vertical")return e.chartY},GU=(e,t)=>t==="centric"?e.angle:e.radius,yn=e=>e.layout.width,bn=e=>e.layout.height,YU=e=>e.layout.scale,tM=e=>e.layout.margin,Bu=I(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Wu=I(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),rM="data-recharts-item-index",nM="data-recharts-item-id",ms=60;function c0(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 bl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?c0(Object(r),!0).forEach(function(n){qU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qU(e,t,r){return(t=XU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function XU(e){var t=ZU(e,"string");return typeof t=="symbol"?t:t+""}function ZU(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 QU=e=>e.brush.height;function JU(e){var t=Wu(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var o=typeof n.width=="number"?n.width:ms;return r+o}return r},0)}function eH(e){var t=Wu(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var o=typeof n.width=="number"?n.width:ms;return r+o}return r},0)}function tH(e){var t=Bu(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function rH(e){var t=Bu(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var at=I([yn,bn,tM,QU,JU,eH,tH,rH,gT,mK],(e,t,r,n,o,i,a,s,l,c)=>{var u={left:(r.left||0)+o,right:(r.right||0)+i},d={top:(r.top||0)+a,bottom:(r.bottom||0)+s},f=bl(bl({},d),u),h=f.bottom;f.bottom+=n,f=IU(f,l,c);var v=e-f.left-f.right,m=t-f.top-f.bottom;return bl(bl({brushBottom:h},f),{},{width:Math.max(v,0),height:Math.max(m,0)})}),nH=I(at,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),Zv=I(yn,bn,(e,t)=>({x:0,y:0,width:e,height:t})),oH=O.createContext(null),Tt=()=>O.useContext(oH)!=null,zu=e=>e.brush,Ku=I([zu,at,tM],(e,t,r)=>({height:e.height,x:Y(e.x)?e.x:t.left,y:Y(e.y)?e.y:t.top+t.height+t.brushBottom-(r?.bottom||0),width:Y(e.width)?e.width:t.width})),fp={},pp={},hp={},u0;function iH(){return u0||(u0=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)},d=()=>{c&&u(),m()};let f=null;const h=()=>{f!=null&&clearTimeout(f),f=setTimeout(()=>{f=null,d()},n)},v=()=>{f!==null&&(clearTimeout(f),f=null)},m=()=>{v(),a=void 0,s=null},g=()=>{u()},y=function(...x){if(o?.aborted)return;a=this,s=x;const w=f==null;h(),l&&w&&u()};return y.schedule=h,y.cancel=m,y.flush=g,o?.addEventListener("abort",m,{once:!0}),y}e.debounce=t})(hp)),hp}var d0;function aH(){return d0||(d0=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=iH();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,d=null;const f=t.debounce(function(...m){u=n.apply(this,m),d=null},o,{edges:c}),h=function(...m){return l!=null&&(d===null&&(d=Date.now()),Date.now()-d>=l)?(u=n.apply(this,m),d=Date.now(),f.cancel(),f.schedule(),u):(f.apply(this,m),u)},v=()=>(f.flush(),u);return h.cancel=f.cancel,h.flush=v,h}e.debounce=r})(pp)),pp}var f0;function sH(){return f0||(f0=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=aH();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})(fp)),fp}var mp,p0;function lH(){return p0||(p0=1,mp=sH().throttle),mp}var cH=lH();const uH=Gn(cH);var Sc=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++]))}},Nr={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},oM=(e,t,r)=>{var{width:n=Nr.width,height:o=Nr.height,aspect:i,maxHeight:a}=r,s=Do(n)?e:Number(n),l=Do(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}},dH={width:0,height:0,overflow:"visible"},fH={width:0,overflowX:"visible"},pH={height:0,overflowY:"visible"},hH={},mH=e=>{var{width:t,height:r}=e,n=Do(t),o=Do(r);return n&&o?dH:n?fH:o?pH:hH};function vH(e){var{width:t,height:r,aspect:n}=e,o=t,i=r;return o===void 0&&i===void 0?(o=Nr.width,i=Nr.height):o===void 0?o=n&&n>0?void 0:Nr.width:i===void 0&&(i=n&&n>0?void 0:Nr.height),{width:o,height:i}}function Bh(){return Bh=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},Bh.apply(null,arguments)}function h0(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 m0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?h0(Object(r),!0).forEach(function(n){gH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function gH(e,t,r){return(t=yH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yH(e){var t=bH(e,"string");return typeof t=="symbol"?t:t+""}function bH(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 iM=O.createContext(Nr.initialDimension);function xH(e){return Wr(e.width)&&Wr(e.height)}function aM(e){var{children:t,width:r,height:n}=e,o=O.useMemo(()=>({width:r,height:n}),[r,n]);return xH(o)?p.createElement(iM.Provider,{value:o},t):null}var Qv=()=>O.useContext(iM),wH=O.forwardRef((e,t)=>{var{aspect:r,initialDimension:n=Nr.initialDimension,width:o,height:i,minWidth:a=Nr.minWidth,minHeight:s,maxHeight:l,children:c,debounce:u=Nr.debounce,id:d,className:f,onResize:h,style:v={}}=e,m=O.useRef(null),g=O.useRef();g.current=h,O.useImperativeHandle(t,()=>m.current);var[y,x]=O.useState({containerWidth:n.width,containerHeight:n.height}),w=O.useCallback((A,T)=>{x(M=>{var _=Math.round(A),k=Math.round(T);return M.containerWidth===_&&M.containerHeight===k?M:{containerWidth:_,containerHeight:k}})},[]);O.useEffect(()=>{if(m.current==null||typeof ResizeObserver>"u")return Wo;var A=k=>{var N,R=k[0];if(R!=null){var{width:z,height:B}=R.contentRect;w(z,B),(N=g.current)===null||N===void 0||N.call(g,z,B)}};u>0&&(A=uH(A,u,{trailing:!0,leading:!1}));var T=new ResizeObserver(A),{width:M,height:_}=m.current.getBoundingClientRect();return w(M,_),T.observe(m.current),()=>{T.disconnect()}},[w,u]);var{containerWidth:S,containerHeight:P}=y;Sc(!r||r>0,"The aspect(%s) must be greater than zero.",r);var{calculatedWidth:C,calculatedHeight:E}=oM(S,P,{width:o,height:i,aspect:r,maxHeight:l});return Sc(C!=null&&C>0||E!=null&&E>0,`The width(%s) and height(%s) of chart should be greater than 0,
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()),v}}}function gl(e){return typeof e=="boolean"}var eU=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=t??{};let a=new NT;if(r&&(gl(r)?a.push(zK):a.push(KK(r.extraArgument))),process.env.NODE_ENV!=="production"){if(n){let s={};gl(n)||(s=n),a.unshift(QK(s))}if(o){let s={};gl(o)||(s=o),a.push(JK(s))}if(i){let s={};gl(i)||(s=i),a.unshift(qK(s))}}return a},$T="RTK_autoBatch",Re=()=>e=>({payload:e,meta:{[$T]:!0}}),Jw=e=>t=>{setTimeout(t,e)},VT=(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:Jw(10):e.type==="callback"?e.queueNotification:Jw(e.timeout),c=()=>{a=!1,i&&(i=!1,s.forEach(u=>u()))};return Object.assign({},n,{subscribe(u){const d=()=>o&&u(),f=n.subscribe(d);return s.add(u),()=>{f(),s.delete(u)}},dispatch(u){try{return o=!u?.meta?.[$T],i=!o,i&&(a||(a=!0,l(c))),n.dispatch(u)}finally{o=!0}}})},tU=e=>function(r){const{autoBatch:n=!0}=r??{};let o=new NT(e);return n&&o.push(VT(typeof n=="object"?n:void 0)),o};function rU(e){const t=eU(),{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(ds(r))l=xT(r);else throw new Error(process.env.NODE_ENV==="production"?xe(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"?xe(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"?xe(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"?xe(4):"each middleware provided to configureStore must be a function");if(process.env.NODE_ENV!=="production"&&i){let m=new Set;c.forEach(g=>{if(m.has(g))throw new Error(process.env.NODE_ENV==="production"?xe(42):"Duplicate middleware references found when creating the store. Ensure that each middleware is only included once.");m.add(g)})}let u=pc;o&&(u=UK({trace:process.env.NODE_ENV!=="production",...typeof o=="object"&&o}));const d=AK(...c),f=tU(d);if(process.env.NODE_ENV!=="production"&&s&&typeof s!="function")throw new Error(process.env.NODE_ENV==="production"?xe(5):"`enhancers` field must be a callback");let h=typeof s=="function"?s(f):f();if(process.env.NODE_ENV!=="production"&&!Array.isArray(h))throw new Error(process.env.NODE_ENV==="production"?xe(6):"`enhancers` callback must return an array");if(process.env.NODE_ENV!=="production"&&h.some(m=>typeof m!="function"))throw new Error(process.env.NODE_ENV==="production"?xe(7):"each enhancer provided to configureStore must be a function");process.env.NODE_ENV!=="production"&&c.length&&!h.includes(d)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");const v=u(...h);return bT(l,a,v)}function FT(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"?xe(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(n)throw new Error(process.env.NODE_ENV==="production"?xe(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"?xe(28):"`builder.addCase` cannot be called with an empty action type");if(s in t)throw new Error(process.env.NODE_ENV==="production"?xe(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"?xe(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"?xe(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"?xe(31):"`builder.addDefaultCase` can only be called once");return n=i,o}};return e(o),[t,r,n]}function nU(e){return typeof e=="function"}function oU(e,t){if(process.env.NODE_ENV!=="production"&&typeof t=="object")throw new Error(process.env.NODE_ENV==="production"?xe(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]=FT(t),i;if(nU(e))i=()=>Qw(e());else{const s=Qw(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,d)=>{if(d)if(on(u)){const h=d(u,l);return h===void 0?u:h}else{if(xr(u))return kT(u,f=>d(f,l));{const f=d(u,l);if(f===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return f}}return u},s)}return a.getInitialState=i,a}var iU="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",aU=(e=21)=>{let t="",r=e;for(;r--;)t+=iU[Math.random()*64|0];return t},sU=Symbol.for("rtk-slice-createasyncthunk");function lU(e,t){return`${e}/${t}`}function cU({creators:e}={}){const t=e?.asyncThunk?.[sU];return function(n){const{name:o,reducerPath:i=o}=n;if(!o)throw new Error(process.env.NODE_ENV==="production"?xe(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(dU()):n.reducers)||{},s=Object.keys(a),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(w,S){const P=typeof w=="string"?w:w.type;if(!P)throw new Error(process.env.NODE_ENV==="production"?xe(12):"`context.addCase` cannot be called with an empty action type");if(P in l.sliceCaseReducersByType)throw new Error(process.env.NODE_ENV==="production"?xe(13):"`context.addCase` cannot be called with two reducers for the same action type: "+P);return l.sliceCaseReducersByType[P]=S,c},addMatcher(w,S){return l.sliceMatchers.push({matcher:w,reducer:S}),c},exposeAction(w,S){return l.actionCreators[w]=S,c},exposeCaseReducer(w,S){return l.sliceCaseReducersByName[w]=S,c}};s.forEach(w=>{const S=a[w],P={reducerName:w,type:lU(o,w),createNotation:typeof n.reducers=="function"};pU(S)?mU(P,S,c,t):fU(P,S,c)});function u(){if(process.env.NODE_ENV!=="production"&&typeof n.extraReducers=="object")throw new Error(process.env.NODE_ENV==="production"?xe(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={},S=[],P=void 0]=typeof n.extraReducers=="function"?FT(n.extraReducers):[n.extraReducers],C={...w,...l.sliceCaseReducersByType};return oU(n.initialState,E=>{for(let A in C)E.addCase(A,C[A]);for(let A of l.sliceMatchers)E.addMatcher(A.matcher,A.reducer);for(let A of S)E.addMatcher(A.matcher,A.reducer);P&&E.addDefaultCase(P)})}const d=w=>w,f=new Map,h=new WeakMap;let v;function m(w,S){return v||(v=u()),v(w,S)}function g(){return v||(v=u()),v.getInitialState()}function y(w,S=!1){function P(E){let A=E[w];if(typeof A>"u"){if(S)A=vl(h,P,g);else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?xe(15):"selectSlice returned undefined for an uninjected slice reducer")}return A}function C(E=d){const A=vl(f,S,()=>new WeakMap);return vl(A,E,()=>{const T={};for(const[M,_]of Object.entries(n.selectors??{}))T[M]=uU(_,E,()=>vl(h,E,g),S);return T})}return{reducerPath:w,getSelectors:C,get selectors(){return C(P)},selectSlice:P}}const x={name:o,reducer:m,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:g,...y(i),injectInto(w,{reducerPath:S,...P}={}){const C=S??i;return w.inject({reducerPath:C,reducer:m},P),{...x,...y(C,!0)}}};return x}}function uU(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"?xe(16):"selectState returned undefined for an uninjected slice reducer")}return e(s,...a)}return o.unwrapped=e,o}var Bt=cU();function dU(){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 fU({type:e,reducerName:t,createNotation:r},n,o){let i,a;if("reducer"in n){if(r&&!hU(n))throw new Error(process.env.NODE_ENV==="production"?xe(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?ur(e,a):ur(e))}function pU(e){return e._reducerDefinitionType==="asyncThunk"}function hU(e){return e._reducerDefinitionType==="reducerWithPrepare"}function mU({type:e,reducerName:t},r,n,o){if(!o)throw new Error(process.env.NODE_ENV==="production"?xe(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,d=o(e,i,u);n.exposeAction(t,d),a&&n.addCase(d.fulfilled,a),s&&n.addCase(d.pending,s),l&&n.addCase(d.rejected,l),c&&n.addMatcher(d.settled,c),n.exposeCaseReducer(t,{fulfilled:a||yl,pending:s||yl,rejected:l||yl,settled:c||yl})}function yl(){}var vU="task",BT="listener",WT="completed",Xv="cancelled",gU=`task-${Xv}`,yU=`task-${WT}`,Fh=`${BT}-${Xv}`,bU=`${BT}-${WT}`,Fu=class{constructor(e){this.code=e,this.message=`${vU} ${Xv} (reason: ${e})`}name="TaskAbortError";message},Zv=(e,t)=>{if(typeof e!="function")throw new TypeError(process.env.NODE_ENV==="production"?xe(32):`${t} is not a function`)},xc=()=>{},zT=(e,t=xc)=>(e.catch(t),e),KT=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Po=e=>{if(e.aborted)throw new Fu(e.reason)};function UT(e,t){let r=xc;return new Promise((n,o)=>{const i=()=>o(new Fu(e.reason));if(e.aborted){i();return}r=KT(e,i),t.finally(()=>r()).then(n,o)}).finally(()=>{r=xc})}var xU=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof Fu?"cancelled":"rejected",error:r}}finally{t?.()}},wc=e=>t=>zT(UT(e,t).then(r=>(Po(e),r))),HT=e=>{const t=wc(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:xi}=Object,e0={},ps="listenerMiddleware",wU=(e,t)=>{const r=n=>KT(e,()=>n.abort(e.reason));return(n,o)=>{Zv(n,"taskExecutor");const i=new AbortController;r(i);const a=xU(async()=>{Po(e),Po(i.signal);const s=await n({pause:wc(i.signal),delay:HT(i.signal),signal:i.signal});return Po(i.signal),s},()=>i.abort(yU));return o?.autoJoin&&t.push(a.catch(xc)),{result:wc(e)(a),cancel(){i.abort(gU)}}}},SU=(e,t)=>{const r=async(n,o)=>{Po(t);let i=()=>{};const s=[new Promise((l,c)=>{let u=e({predicate:n,effect:(d,f)=>{f.unsubscribe(),l([d,f.getState(),f.getOriginalState()])}});i=()=>{u(),c()}})];o!=null&&s.push(new Promise(l=>setTimeout(l,o,null)));try{const l=await UT(t,Promise.race(s));return Po(t),l}finally{i()}};return(n,o)=>zT(r(n,o))},GT=e=>{let{type:t,actionCreator:r,matcher:n,predicate:o,effect:i}=e;if(t)o=ur(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"?xe(21):"Creating or removing a listener requires one of the known fields for matching an action");return Zv(i,"options.listener"),{predicate:o,type:t,effect:i}},YT=xi(e=>{const{type:t,predicate:r,effect:n}=GT(e);return{id:aU(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(process.env.NODE_ENV==="production"?xe(22):"Unsubscribe not initialized")}}},{withTypes:()=>YT}),t0=(e,t)=>{const{type:r,effect:n,predicate:o}=GT(t);return Array.from(e.values()).find(i=>(typeof r=="string"?i.type===r:i.predicate===o)&&i.effect===n)},Bh=e=>{e.pending.forEach(t=>{t.abort(Fh)})},PU=(e,t)=>()=>{for(const r of t.keys())Bh(r);e.clear()},r0=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},qT=xi(ur(`${ps}/add`),{withTypes:()=>qT}),CU=ur(`${ps}/removeAll`),XT=xi(ur(`${ps}/remove`),{withTypes:()=>XT}),OU=(...e)=>{console.error(`${ps}/error`,...e)},hs=(e={})=>{const t=new Map,r=new Map,n=h=>{const v=r.get(h)??0;r.set(h,v+1)},o=h=>{const v=r.get(h)??1;v===1?r.delete(h):r.set(h,v-1)},{extra:i,onError:a=OU}=e;Zv(a,"onError");const s=h=>(h.unsubscribe=()=>t.delete(h.id),t.set(h.id,h),v=>{h.unsubscribe(),v?.cancelActive&&Bh(h)}),l=h=>{const v=t0(t,h)??YT(h);return s(v)};xi(l,{withTypes:()=>l});const c=h=>{const v=t0(t,h);return v&&(v.unsubscribe(),h.cancelActive&&Bh(v)),!!v};xi(c,{withTypes:()=>c});const u=async(h,v,m,g)=>{const y=new AbortController,x=SU(l,y.signal),w=[];try{h.pending.add(y),n(h),await Promise.resolve(h.effect(v,xi({},m,{getOriginalState:g,condition:(S,P)=>x(S,P).then(Boolean),take:x,delay:HT(y.signal),pause:wc(y.signal),extra:i,signal:y.signal,fork:wU(y.signal,w),unsubscribe:h.unsubscribe,subscribe:()=>{t.set(h.id,h)},cancelActiveListeners:()=>{h.pending.forEach((S,P,C)=>{S!==y&&(S.abort(Fh),C.delete(S))})},cancel:()=>{y.abort(Fh),h.pending.delete(y)},throwIfCancelled:()=>{Po(y.signal)}})))}catch(S){S instanceof Fu||r0(a,S,{raisedBy:"effect"})}finally{await Promise.all(w),y.abort(bU),o(h),h.pending.delete(y)}},d=PU(t,r);return{middleware:h=>v=>m=>{if(!Hv(m))return v(m);if(qT.match(m))return l(m.payload);if(CU.match(m)){d();return}if(XT.match(m))return c(m.payload);let g=h.getState();const y=()=>{if(g===e0)throw new Error(process.env.NODE_ENV==="production"?xe(23):`${ps}: getOriginalState can only be called synchronously`);return g};let x;try{if(x=v(m),t.size>0){const w=h.getState(),S=Array.from(t.values());for(const P of S){let C=!1;try{C=P.predicate(m,w,g)}catch(E){C=!1,r0(a,E,{raisedBy:"predicate"})}C&&u(P,m,h,y)}}}finally{g=e0}return x},startListening:l,stopListening:c,clearListeners:d}};function xe(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 EU={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},ZT=Bt({name:"chartLayout",initialState:EU,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:AU,setLayout:TU,setChartSize:MU,setScale:kU}=ZT.actions,DU=ZT.reducer;function QT(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function pe(e){return Number.isFinite(e)}function Wr(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function n0(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 ci(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?n0(Object(r),!0).forEach(function(n){_U(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _U(e,t,r){return(t=NU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function NU(e){var t=jU(e,"string");return typeof t=="symbol"?t:t+""}function jU(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 Ae(e,t,r){return We(e)||We(t)?r:Br(t)?ko(e,t,r):typeof t=="function"?t(e):r}var IU=(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"&&Y(e[i]))return ci(ci({},e),{},{[i]:e[i]+(n||0)});if((s==="horizontal"||s==="vertical"&&i==="center")&&a!=="middle"&&Y(e[a]))return ci(ci({},e),{},{[a]:e[a]+(o||0)})}return e},gn=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",JT=(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},eM=(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:d,niceTicks:f,axisType:h}=e;if(!a)return null;var v=s==="scaleBand"&&a.bandwidth?a.bandwidth()/2:2,m=o==="category"&&a.bandwidth?a.bandwidth()/v:0;if(m=h==="angleAxis"&&i&&i.length>=2?ft(i[0]-i[1])*2*m:m,d||f){var g=(d||f||[]).map((y,x)=>{var w=n?n.indexOf(y):y,S=a.map(w);return pe(S)?{coordinate:S+m,value:y,offset:m,index:x}:null}).filter(Vt);return g}return l&&c?c.map((y,x)=>{var w=a.map(y);return pe(w)?{coordinate:w+m,value:y,index:x,offset:m}:null}).filter(Vt):a.ticks&&u!=null?a.ticks(u).map((y,x)=>{var w=a.map(y);return pe(w)?{coordinate:w+m,value:y,index:x,offset:m}:null}).filter(Vt):a.domain().map((y,x)=>{var w=a.map(y);return pe(w)?{coordinate:w+m,value:n?n[y]:y,index:x,offset:m}:null}).filter(Vt)},RU=(e,t)=>{if(!t||t.length!==2||!Y(t[0])||!Y(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(!Y(e[0])||e[0]<r)&&(o[0]=r),(!Y(e[1])||e[1]>n)&&(o[1]=n),o[0]>n&&(o[0]=n),o[1]<r&&(o[1]=r),o},LU=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],d=c[0],f=Fr(u)?d:u;f>=0?(c[0]=i,i+=f,c[1]=i):(c[0]=a,a+=f,c[1]=a)}}}},$U=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=Fr(l[1])?l[0]:l[1];c>=0?(l[0]=i,i+=c,l[1]=i):(l[0]=0,l[1]=0)}}}},VU={sign:LU,expand:W5,none:Mo,silhouette:z5,wiggle:K5,positive:$U},FU=(e,t,r)=>{var n,o=(n=VU[r])!==null&&n!==void 0?n:Mo,i=B5().keys(t).value((s,l)=>Number(Ae(s,l,0))).order(Mh).offset(o),a=i(e);return a.forEach((s,l)=>{s.forEach((c,u)=>{var d=Ae(e[u],t[l],0);Array.isArray(d)&&d.length===2&&Y(d[0])&&Y(d[1])&&(c[0]=d[0],c[1]=d[1])})}),a};function BU(e){return e==null?void 0:String(e)}function o0(e){var{axis:t,ticks:r,bandSize:n,entry:o,index:i,dataKey:a}=e;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!We(o[t.dataKey])){var s=tT(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=Ae(o,We(a)?t.dataKey:a),c=t.scale.map(l);return Y(c)?c:null}var i0=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=Ae(i,t.dataKey,t.scale.domain()[a]);if(We(s))return null;var l=t.scale.map(s);return Y(l)?l-o/2+n:null},WU=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]},zU=e=>{var t=e.flat(2).filter(Y);return[Math.min(...t),Math.max(...t)]},KU=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],UU=(e,t,r)=>{if(e!=null)return KU(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=QT(c,t,r),d=zU(u);return!pe(d[0])||!pe(d[1])?l:[Math.min(l[0],d[0]),Math.max(l[1],d[1])]},[1/0,-1/0]);return[Math.min(s[0],n[0]),Math.max(s[1],n[1])]},[1/0,-1/0]))},a0=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,s0=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Oi=(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=_u(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 l0(e){var{tooltipEntrySettings:t,dataKey:r,payload:n,value:o,name:i}=e;return ci(ci({},t),{},{dataKey:r,payload:n,value:o,name:i})}function Fi(e,t){if(e)return String(e);if(typeof t=="string")return t}var HU=(e,t)=>{if(t==="horizontal")return e.chartX;if(t==="vertical")return e.chartY},GU=(e,t)=>t==="centric"?e.angle:e.radius,yn=e=>e.layout.width,bn=e=>e.layout.height,YU=e=>e.layout.scale,tM=e=>e.layout.margin,Bu=I(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Wu=I(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),rM="data-recharts-item-index",nM="data-recharts-item-id",ms=60;function c0(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 bl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?c0(Object(r),!0).forEach(function(n){qU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qU(e,t,r){return(t=XU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function XU(e){var t=ZU(e,"string");return typeof t=="symbol"?t:t+""}function ZU(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 QU=e=>e.brush.height;function JU(e){var t=Wu(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var o=typeof n.width=="number"?n.width:ms;return r+o}return r},0)}function eH(e){var t=Wu(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var o=typeof n.width=="number"?n.width:ms;return r+o}return r},0)}function tH(e){var t=Bu(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function rH(e){var t=Bu(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var at=I([yn,bn,tM,QU,JU,eH,tH,rH,gT,mK],(e,t,r,n,o,i,a,s,l,c)=>{var u={left:(r.left||0)+o,right:(r.right||0)+i},d={top:(r.top||0)+a,bottom:(r.bottom||0)+s},f=bl(bl({},d),u),h=f.bottom;f.bottom+=n,f=IU(f,l,c);var v=e-f.left-f.right,m=t-f.top-f.bottom;return bl(bl({brushBottom:h},f),{},{width:Math.max(v,0),height:Math.max(m,0)})}),nH=I(at,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),Qv=I(yn,bn,(e,t)=>({x:0,y:0,width:e,height:t})),oH=O.createContext(null),Tt=()=>O.useContext(oH)!=null,zu=e=>e.brush,Ku=I([zu,at,tM],(e,t,r)=>({height:e.height,x:Y(e.x)?e.x:t.left,y:Y(e.y)?e.y:t.top+t.height+t.brushBottom-(r?.bottom||0),width:Y(e.width)?e.width:t.width})),pp={},hp={},mp={},u0;function iH(){return u0||(u0=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)},d=()=>{c&&u(),m()};let f=null;const h=()=>{f!=null&&clearTimeout(f),f=setTimeout(()=>{f=null,d()},n)},v=()=>{f!==null&&(clearTimeout(f),f=null)},m=()=>{v(),a=void 0,s=null},g=()=>{u()},y=function(...x){if(o?.aborted)return;a=this,s=x;const w=f==null;h(),l&&w&&u()};return y.schedule=h,y.cancel=m,y.flush=g,o?.addEventListener("abort",m,{once:!0}),y}e.debounce=t})(mp)),mp}var d0;function aH(){return d0||(d0=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=iH();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,d=null;const f=t.debounce(function(...m){u=n.apply(this,m),d=null},o,{edges:c}),h=function(...m){return l!=null&&(d===null&&(d=Date.now()),Date.now()-d>=l)?(u=n.apply(this,m),d=Date.now(),f.cancel(),f.schedule(),u):(f.apply(this,m),u)},v=()=>(f.flush(),u);return h.cancel=f.cancel,h.flush=v,h}e.debounce=r})(hp)),hp}var f0;function sH(){return f0||(f0=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=aH();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})(pp)),pp}var vp,p0;function lH(){return p0||(p0=1,vp=sH().throttle),vp}var cH=lH();const uH=Gn(cH);var Sc=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++]))}},Nr={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},oM=(e,t,r)=>{var{width:n=Nr.width,height:o=Nr.height,aspect:i,maxHeight:a}=r,s=Do(n)?e:Number(n),l=Do(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}},dH={width:0,height:0,overflow:"visible"},fH={width:0,overflowX:"visible"},pH={height:0,overflowY:"visible"},hH={},mH=e=>{var{width:t,height:r}=e,n=Do(t),o=Do(r);return n&&o?dH:n?fH:o?pH:hH};function vH(e){var{width:t,height:r,aspect:n}=e,o=t,i=r;return o===void 0&&i===void 0?(o=Nr.width,i=Nr.height):o===void 0?o=n&&n>0?void 0:Nr.width:i===void 0&&(i=n&&n>0?void 0:Nr.height),{width:o,height:i}}function Wh(){return Wh=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},Wh.apply(null,arguments)}function h0(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 m0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?h0(Object(r),!0).forEach(function(n){gH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function gH(e,t,r){return(t=yH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yH(e){var t=bH(e,"string");return typeof t=="symbol"?t:t+""}function bH(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 iM=O.createContext(Nr.initialDimension);function xH(e){return Wr(e.width)&&Wr(e.height)}function aM(e){var{children:t,width:r,height:n}=e,o=O.useMemo(()=>({width:r,height:n}),[r,n]);return xH(o)?p.createElement(iM.Provider,{value:o},t):null}var Jv=()=>O.useContext(iM),wH=O.forwardRef((e,t)=>{var{aspect:r,initialDimension:n=Nr.initialDimension,width:o,height:i,minWidth:a=Nr.minWidth,minHeight:s,maxHeight:l,children:c,debounce:u=Nr.debounce,id:d,className:f,onResize:h,style:v={}}=e,m=O.useRef(null),g=O.useRef();g.current=h,O.useImperativeHandle(t,()=>m.current);var[y,x]=O.useState({containerWidth:n.width,containerHeight:n.height}),w=O.useCallback((A,T)=>{x(M=>{var _=Math.round(A),k=Math.round(T);return M.containerWidth===_&&M.containerHeight===k?M:{containerWidth:_,containerHeight:k}})},[]);O.useEffect(()=>{if(m.current==null||typeof ResizeObserver>"u")return Wo;var A=k=>{var N,R=k[0];if(R!=null){var{width:z,height:B}=R.contentRect;w(z,B),(N=g.current)===null||N===void 0||N.call(g,z,B)}};u>0&&(A=uH(A,u,{trailing:!0,leading:!1}));var T=new ResizeObserver(A),{width:M,height:_}=m.current.getBoundingClientRect();return w(M,_),T.observe(m.current),()=>{T.disconnect()}},[w,u]);var{containerWidth:S,containerHeight:P}=y;Sc(!r||r>0,"The aspect(%s) must be greater than zero.",r);var{calculatedWidth:C,calculatedHeight:E}=oM(S,P,{width:o,height:i,aspect:r,maxHeight:l});return Sc(C!=null&&C>0||E!=null&&E>0,`The width(%s) and height(%s) of chart should be greater than 0,
69
69
  please check the style of container, or the props width(%s) and height(%s),
70
70
  or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
71
- height and width.`,C,E,o,i,a,s,r),p.createElement("div",{id:d?"".concat(d):void 0,className:ve("recharts-responsive-container",f),style:m0(m0({},v),{},{width:o,height:i,minWidth:a,minHeight:s,maxHeight:l}),ref:m},p.createElement("div",{style:mH({width:o,height:i})},p.createElement(aM,{width:C,height:E},c)))}),Jv=O.forwardRef((e,t)=>{var r=Qv();if(Wr(r.width)&&Wr(r.height))return e.children;var{width:n,height:o}=vH({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:i,calculatedHeight:a}=oM(void 0,void 0,{width:n,height:o,aspect:e.aspect,maxHeight:e.maxHeight});return Y(i)&&Y(a)?p.createElement(aM,{width:i,height:a},e.children):p.createElement(wH,Bh({},e,{width:n,height:o,ref:t}))});function eg(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 Uu=()=>{var e,t=Tt(),r=J(nH),n=J(Ku),o=(e=J(zu))===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}},SH={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},sM=()=>{var e;return(e=J(at))!==null&&e!==void 0?e:SH},tg=()=>J(yn),rg=()=>J(bn),PH=()=>J(e=>e.layout.margin),ye=e=>e.layout.layoutType,zo=()=>J(ye),lM=()=>{var e=zo();if(e==="horizontal"||e==="vertical")return e},cM=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},CH=()=>{var e=zo();return e!==void 0},vs=e=>{var t=Ne(),r=Tt(),{width:n,height:o}=e,i=Qv(),a=n,s=o;return i&&(a=i.width>0?i.width:n,s=i.height>0?i.height:o),O.useEffect(()=>{!r&&Wr(a)&&Wr(s)&&t(MU({width:a,height:s}))},[t,r,a,s]),null},uM=Symbol.for("immer-nothing"),v0=Symbol.for("immer-draftable"),Qt=Symbol.for("immer-state"),OH=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 $t(e,...t){if(process.env.NODE_ENV!=="production"){const r=OH[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 Ia=Object.getPrototypeOf;function Ei(e){return!!e&&!!e[Qt]}function No(e){return e?dM(e)||Array.isArray(e)||!!e[v0]||!!e.constructor?.[v0]||gs(e)||Gu(e):!1}var EH=Object.prototype.constructor.toString(),g0=new WeakMap;function dM(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=g0.get(r);return n===void 0&&(n=Function.toString.call(r),g0.set(r,n)),n===EH}function Pc(e,t,r=!0){Hu(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 Hu(e){const t=e[Qt];return t?t.type_:Array.isArray(e)?1:gs(e)?2:Gu(e)?3:0}function Wh(e,t){return Hu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function fM(e,t,r){const n=Hu(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function AH(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function gs(e){return e instanceof Map}function Gu(e){return e instanceof Set}function lo(e){return e.copy_||e.base_}function zh(e,t){if(gs(e))return new Map(e);if(Gu(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=dM(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[Qt];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(Ia(e),n)}else{const n=Ia(e);if(n!==null&&r)return{...e};const o=Object.create(n);return Object.assign(o,e)}}function ng(e,t=!1){return Yu(e)||Ei(e)||!No(e)||(Hu(e)>1&&Object.defineProperties(e,{set:xl,add:xl,clear:xl,delete:xl}),Object.freeze(e),t&&Object.values(e).forEach(r=>ng(r,!0))),e}function TH(){$t(2)}var xl={value:TH};function Yu(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var MH={};function jo(e){const t=MH[e];return t||$t(0,e),t}var Ra;function pM(){return Ra}function kH(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function y0(e,t){t&&(jo("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Kh(e){Uh(e),e.drafts_.forEach(DH),e.drafts_=null}function Uh(e){e===Ra&&(Ra=e.parent_)}function b0(e){return Ra=kH(Ra,e)}function DH(e){const t=e[Qt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function x0(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[Qt].modified_&&(Kh(t),$t(4)),No(e)&&(e=Cc(t,e),t.parent_||Oc(t,e)),t.patches_&&jo("Patches").generateReplacementPatches_(r[Qt].base_,e,t.patches_,t.inversePatches_)):e=Cc(t,r,[]),Kh(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==uM?e:void 0}function Cc(e,t,r){if(Yu(t))return t;const n=e.immer_.shouldUseStrictIteration(),o=t[Qt];if(!o)return Pc(t,(i,a)=>w0(e,o,t,i,a,r),n),t;if(o.scope_!==e)return t;if(!o.modified_)return Oc(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),Pc(a,(l,c)=>w0(e,o,i,l,c,r,s),n),Oc(e,i,!1),r&&e.patches_&&jo("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function w0(e,t,r,n,o,i,a){if(o==null||typeof o!="object"&&!a)return;const s=Yu(o);if(!(s&&!a)){if(process.env.NODE_ENV!=="production"&&o===r&&$t(5),Ei(o)){const l=i&&t&&t.type_!==3&&!Wh(t.assigned_,n)?i.concat(n):void 0,c=Cc(e,o,l);if(fM(r,n,c),Ei(c))e.canAutoFreeze_=!1;else return}else a&&r.add(o);if(No(o)&&!s){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===o&&s)return;Cc(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(gs(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&Oc(e,o)}}}function Oc(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ng(t,r)}function _H(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:pM(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=n,i=og;r&&(o=[n],i=La);const{revoke:a,proxy:s}=Proxy.revocable(o,i);return n.draft_=s,n.revoke_=a,s}var og={get(e,t){if(t===Qt)return e;const r=lo(e);if(!Wh(r,t))return NH(e,r,t);const n=r[t];return e.finalized_||!No(n)?n:n===vp(e.base_,t)?(gp(e),e.copy_[t]=Gh(n,e)):n},has(e,t){return t in lo(e)},ownKeys(e){return Reflect.ownKeys(lo(e))},set(e,t,r){const n=hM(lo(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const o=vp(lo(e),t),i=o?.[Qt];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(AH(r,o)&&(r!==void 0||Wh(e.base_,t)))return!0;gp(e),Hh(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 vp(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,gp(e),Hh(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=lo(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){$t(11)},getPrototypeOf(e){return Ia(e.base_)},setPrototypeOf(){$t(12)}},La={};Pc(og,(e,t)=>{La[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});La.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&$t(13),La.set.call(this,e,t,void 0)};La.set=function(e,t,r){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&$t(14),og.set.call(this,e[0],t,r,e[0])};function vp(e,t){const r=e[Qt];return(r?lo(r):e)[t]}function NH(e,t,r){const n=hM(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function hM(e,t){if(!(t in e))return;let r=Ia(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Ia(r)}}function Hh(e){e.modified_||(e.modified_=!0,e.parent_&&Hh(e.parent_))}function gp(e){e.copy_||(e.copy_=zh(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var jH=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"&&$t(6),n!==void 0&&typeof n!="function"&&$t(7);let o;if(No(t)){const i=b0(this),a=Gh(t,void 0);let s=!0;try{o=r(a),s=!1}finally{s?Kh(i):Uh(i)}return y0(i,n),x0(o,i)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===uM&&(o=void 0),this.autoFreeze_&&ng(o,!0),n){const i=[],a=[];jo("Patches").generateReplacementPatches_(t,o,i,a),n(i,a)}return o}else $t(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){No(e)||$t(8),Ei(e)&&(e=IH(e));const t=b0(this),r=Gh(e,void 0);return r[Qt].isManual_=!0,Uh(t),r}finishDraft(e,t){const r=e&&e[Qt];(!r||!r.isManual_)&&$t(9);const{scope_:n}=r;return y0(n,t),x0(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=jo("Patches").applyPatches_;return Ei(e)?n(e,t):this.produce(e,o=>n(o,t))}};function Gh(e,t){const r=gs(e)?jo("MapSet").proxyMap_(e,t):Gu(e)?jo("MapSet").proxySet_(e,t):_H(e,t);return(t?t.scope_:pM()).drafts_.push(r),r}function IH(e){return Ei(e)||$t(10,e),mM(e)}function mM(e){if(!No(e)||Yu(e))return e;const t=e[Qt];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=zh(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=zh(e,!0);return Pc(r,(o,i)=>{fM(r,o,mM(i))},n),t&&(t.finalized_=!1),r}var RH=new jH;RH.produce;var LH={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},vM=Bt({name:"legend",initialState:LH,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:Re()},replaceLegendPayload:{reducer(e,t){var{prev:r,next:n}=t.payload,o=br(e).payload.indexOf(r);o>-1&&(e.payload[o]=n)},prepare:Re()},removeLegendPayload:{reducer(e,t){var r=br(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:Re()}}}),{setLegendSize:S0,setLegendSettings:$H,addLegendPayload:gM,replaceLegendPayload:yM,removeLegendPayload:bM}=vM.actions,VH=vM.reducer,FH=["contextPayload"];function Yh(){return Yh=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},Yh.apply(null,arguments)}function P0(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 Ai(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?P0(Object(r),!0).forEach(function(n){BH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function BH(e,t,r){return(t=WH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function WH(e){var t=zH(e,"string");return typeof t=="symbol"?t:t+""}function zH(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){if(e==null)return{};var r,n,o=UH(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 UH(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 HH(e){return e.value}function GH(e){var{contextPayload:t}=e,r=KH(e,FH),n=fT(t,e.payloadUniqBy,HH),o=Ai(Ai({},r),{},{payload:n});return p.isValidElement(e.content)?p.cloneElement(e.content,o):typeof e.content=="function"?p.createElement(e.content,o):p.createElement(b4,o)}function YH(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}),Ai(Ai({},c),u)}function qH(e){var t=Ne();return O.useEffect(()=>{t($H(e))},[t,e]),null}function XH(e){var t=Ne();return O.useEffect(()=>(t(S0(e)),()=>{t(S0({width:0,height:0}))}),[t,e]),null}function ZH(e,t,r,n){return e==="vertical"&&t!=null?{height:t}:e==="horizontal"?{width:r||n}:null}var QH={align:"center",iconSize:14,inactiveColor:"#ccc",itemSorter:"value",layout:"horizontal",verticalAlign:"bottom"};function qu(e){var t=et(e,QH),r=yK(),n=d5(),o=PH(),{width:i,height:a,wrapperStyle:s,portal:l}=t,[c,u]=yT([r]),d=tg(),f=rg();if(d==null||f==null)return null;var h=d-(o?.left||0)-(o?.right||0),v=ZH(t.layout,a,i,h),m=l?s:Ai(Ai({position:"absolute",width:v?.width||i||"auto",height:v?.height||a||"auto"},YH(s,t,o,d,f,c)),s),g=l??n;if(g==null||r==null)return null;var y=p.createElement("div",{className:"recharts-legend-wrapper",style:m,ref:u},p.createElement(qH,{layout:t.layout,align:t.align,verticalAlign:t.verticalAlign,itemSorter:t.itemSorter}),!l&&p.createElement(XH,{width:c.width,height:c.height}),p.createElement(GH,Yh({},t,v,{margin:o,chartWidth:d,chartHeight:f,contextPayload:r})));return is.createPortal(y,g)}qu.displayName="Legend";function qh(){return qh=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},qh.apply(null,arguments)}function C0(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?C0(Object(r),!0).forEach(function(n){JH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function JH(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 r6(e){return Array.isArray(e)&&Br(e[0])&&Br(e[1])?e.join(" ~ "):e}var ti={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},n6=e=>{var{separator:t=ti.separator,contentStyle:r,itemStyle:n,labelStyle:o=ti.labelStyle,payload:i,formatter:a,itemSorter:s,wrapperClassName:l,labelClassName:c,label:u,labelFormatter:d,accessibilityLayer:f=ti.accessibilityLayer}=e,h=()=>{if(i&&i.length){var P={padding:0,margin:0},C=(s?_u(i,s):i).map((E,A)=>{if(E.type==="none")return null;var T=E.formatter||a||r6,{value:M,name:_}=E,k=M,N=_;if(T){var R=T(M,_,E,A,i);if(Array.isArray(R))[k,N]=R;else if(R!=null)k=R;else return null}var z=aa(aa({},ti.itemStyle),{},{color:E.color||ti.itemStyle.color},n);return p.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(A),style:z},Br(N)?p.createElement("span",{className:"recharts-tooltip-item-name"},N):null,Br(N)?p.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,p.createElement("span",{className:"recharts-tooltip-item-value"},k),p.createElement("span",{className:"recharts-tooltip-item-unit"},E.unit||""))});return p.createElement("ul",{className:"recharts-tooltip-item-list",style:P},C)}return null},v=aa(aa({},ti.contentStyle),r),m=aa({margin:0},o),g=!We(u),y=g?u:"",x=ve("recharts-default-tooltip",l),w=ve("recharts-tooltip-label",c);g&&d&&i!==void 0&&i!==null&&(y=d(u,i));var S=f?{role:"status","aria-live":"assertive"}:{};return p.createElement("div",qh({className:x,style:v},S),p.createElement("p",{className:w,style:m},p.isValidElement(y)?y:"".concat(y)),h())},sa="recharts-tooltip-wrapper",o6={visibility:"hidden"};function i6(e){var{coordinate:t,translateX:r,translateY:n}=e;return ve(sa,{["".concat(sa,"-right")]:Y(r)&&t&&Y(t.x)&&r>=t.x,["".concat(sa,"-left")]:Y(r)&&t&&Y(t.x)&&r<t.x,["".concat(sa,"-bottom")]:Y(n)&&t&&Y(t.y)&&n>=t.y,["".concat(sa,"-top")]:Y(n)&&t&&Y(t.y)&&n<t.y})}function O0(e){var{allowEscapeViewBox:t,coordinate:r,key:n,offset:o,position:i,reverseDirection:a,tooltipDimension:s,viewBox:l,viewBoxDimension:c}=e;if(i&&Y(i[n]))return i[n];var u=r[n]-s-(o>0?o:0),d=r[n]+o;if(t[n])return a[n]?u:d;var f=l[n];if(f==null)return 0;if(a[n]){var h=u,v=f;return h<v?Math.max(d,f):Math.max(u,f)}if(c==null)return 0;var m=d+s,g=f+c;return m>g?Math.max(u,f):Math.max(d,f)}function a6(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 s6(e){var{allowEscapeViewBox:t,coordinate:r,offsetTop:n,offsetLeft:o,position:i,reverseDirection:a,tooltipBox:s,useTranslate3d:l,viewBox:c}=e,u,d,f;return s.height>0&&s.width>0&&r?(d=O0({allowEscapeViewBox:t,coordinate:r,key:"x",offset:o,position:i,reverseDirection:a,tooltipDimension:s.width,viewBox:c,viewBoxDimension:c.width}),f=O0({allowEscapeViewBox:t,coordinate:r,key:"y",offset:n,position:i,reverseDirection:a,tooltipDimension:s.height,viewBox:c,viewBoxDimension:c.height}),u=a6({translateX:d,translateY:f,useTranslate3d:l})):u=o6,{cssProperties:u,cssClasses:i6({translateX:d,translateY:f,coordinate:r})}}function E0(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 wl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?E0(Object(r),!0).forEach(function(n){Xh(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Xh(e,t,r){return(t=l6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l6(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)}class u6 extends O.PureComponent{constructor(){super(...arguments),Xh(this,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}),Xh(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:d,useTranslate3d:f,viewBox:h,wrapperStyle:v,lastBoundingBox:m,innerRef:g,hasPortalFromProps:y}=this.props,x=typeof c=="number"?c:c.x,w=typeof c=="number"?c:c.y,{cssClasses:S,cssProperties:P}=s6({allowEscapeViewBox:r,coordinate:a,offsetLeft:x,offsetTop:w,position:u,reverseDirection:d,tooltipBox:{height:m.height,width:m.width},useTranslate3d:f,viewBox:h}),C=y?{}:wl(wl({transition:l&&t?"transform ".concat(n,"ms ").concat(o):void 0},P),{},{pointerEvents:"none",visibility:!this.state.dismissed&&t&&s?"visible":"hidden",position:"absolute",top:0,left:0}),E=wl(wl({},C),{},{visibility:!this.state.dismissed&&t&&s?"visible":"hidden"},v);return p.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:S,style:E,ref:g},i)}}var xM=()=>{var e;return(e=J(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function Zh(){return Zh=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},Zh.apply(null,arguments)}function A0(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 T0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?A0(Object(r),!0).forEach(function(n){d6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):A0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function d6(e,t,r){return(t=f6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f6(e){var t=p6(e,"string");return typeof t=="symbol"?t:t+""}function p6(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 M0={curveBasisClosed:k5,curveBasisOpen:D5,curveBasis:M5,curveBumpX:m5,curveBumpY:v5,curveLinearClosed:_5,curveLinear:ku,curveMonotoneX:N5,curveMonotoneY:j5,curveNatural:I5,curveStep:R5,curveStepAfter:$5,curveStepBefore:L5},Ec=e=>pe(e.x)&&pe(e.y),k0=e=>e.base!=null&&Ec(e.base)&&Ec(e),la=e=>e.x,ca=e=>e.y,h6=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(cs(e));if((r==="curveMonotone"||r==="curveBump")&&t){var n=M0["".concat(r).concat(t==="vertical"?"Y":"X")];if(n)return n}return M0[r]||ku},D0={connectNulls:!1,type:"linear"},m6=e=>{var{type:t=D0.type,points:r=[],baseLine:n,layout:o,connectNulls:i=D0.connectNulls}=e,a=h6(t,o),s=i?r.filter(Ec):r;if(Array.isArray(n)){var l,c=r.map((v,m)=>T0(T0({},v),{},{base:n[m]}));o==="vertical"?l=ul().y(ca).x1(la).x0(v=>v.base.x):l=ul().x(la).y1(ca).y0(v=>v.base.y);var u=l.defined(k0).curve(a),d=i?c.filter(k0):c;return u(d)}var f;o==="vertical"&&Y(n)?f=ul().y(ca).x1(la).x0(n):Y(n)?f=ul().x(la).y1(ca).y0(n):f=WA().x(la).y(ca);var h=f.defined(Ec).curve(a);return h(s)},ig=e=>{var{className:t,points:r,path:n,pathRef:o}=e,i=zo();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?m6(a):n;return p.createElement("path",Zh({},Zt(e),Bv(e),{className:ve("recharts-curve",t),d:s===null?void 0:s,ref:o}))},v6=["x","y","top","left","width","height","className"];function Qh(){return Qh=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},Qh.apply(null,arguments)}function _0(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 g6(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_0(Object(r),!0).forEach(function(n){y6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function y6(e,t,r){return(t=b6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function b6(e){var t=x6(e,"string");return typeof t=="symbol"?t:t+""}function x6(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 w6(e,t){if(e==null)return{};var r,n,o=S6(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 S6(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 P6=(e,t,r,n,o,i)=>"M".concat(e,",").concat(o,"v").concat(n,"M").concat(i,",").concat(t,"h").concat(r),C6=e=>{var{x:t=0,y:r=0,top:n=0,left:o=0,width:i=0,height:a=0,className:s}=e,l=w6(e,v6),c=g6({x:t,y:r,top:n,left:o,width:i,height:a},l);return!Y(t)||!Y(r)||!Y(i)||!Y(a)||!Y(n)||!Y(o)?null:p.createElement("path",Qh({},Rt(c),{className:ve("recharts-cross",s),d:P6(t,r,i,a,n,o)}))};function O6(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 N0(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 j0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?N0(Object(r),!0).forEach(function(n){E6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):N0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function E6(e,t,r){return(t=A6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function A6(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)}var M6=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),wM=(e,t,r)=>e.map(n=>"".concat(M6(n)," ").concat(t,"ms ").concat(r)).join(","),k6=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((r,n)=>r.filter(o=>n.includes(o))),$a=(e,t)=>Object.keys(t).reduce((r,n)=>j0(j0({},r),{},{[n]:e(n,t[n])}),{});function I0(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 ot(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?I0(Object(r),!0).forEach(function(n){D6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):I0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function D6(e,t,r){return(t=_6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _6(e){var t=N6(e,"string");return typeof t=="symbol"?t:t+""}function N6(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 Ac=(e,t,r)=>e+(t-e)*r,Jh=e=>{var{from:t,to:r}=e;return t!==r},SM=(e,t,r)=>{var n=$a((o,i)=>{if(Jh(i)){var[a,s]=e(i.from,i.to,i.velocity);return ot(ot({},i),{},{from:a,velocity:s})}return i},t);return r<1?$a((o,i)=>Jh(i)&&n[o]!=null?ot(ot({},i),{},{velocity:Ac(i.velocity,n[o].velocity,r),from:Ac(i.from,n[o].from,r)}):i,t):SM(e,n,r-1)};function j6(e,t,r,n,o,i){var a,s=n.reduce((f,h)=>ot(ot({},f),{},{[h]:{from:e[h],velocity:0,to:t[h]}}),{}),l=()=>$a((f,h)=>h.from,s),c=()=>!Object.values(s).filter(Jh).length,u=null,d=f=>{a||(a=f);var h=f-a,v=h/r.dt;s=SM(r,s,v),o(ot(ot(ot({},e),t),l())),a=f,c()||(u=i.setTimeout(d))};return()=>(u=i.setTimeout(d),()=>{var f;(f=u)===null||f===void 0||f()})}function I6(e,t,r,n,o,i,a){var s=null,l=o.reduce((d,f)=>{var h=e[f],v=t[f];return h==null||v==null?d:ot(ot({},d),{},{[f]:[h,v]})},{}),c,u=d=>{c||(c=d);var f=(d-c)/n,h=$a((m,g)=>Ac(...g,r(f)),l);if(i(ot(ot(ot({},e),t),h)),f<1)s=a.setTimeout(u);else{var v=$a((m,g)=>Ac(...g,r(1)),l);i(ot(ot(ot({},e),t),v))}};return()=>(s=a.setTimeout(u),()=>{var d;(d=s)===null||d===void 0||d()})}const R6=(e,t,r,n,o,i)=>{var a=k6(e,t);return r==null?()=>(o(ot(ot({},e),t)),()=>{}):r.isStepper===!0?j6(e,t,r,a,o,i):I6(e,t,r,n,a,o,i)};var Tc=1e-4,PM=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],CM=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),R0=(e,t)=>r=>{var n=PM(e,t);return CM(n,r)},L6=(e,t)=>r=>{var n=PM(e,t),o=[...n.map((i,a)=>i*a).slice(1),0];return CM(o,r)},$6=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]]},V6=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=$6(r[0]);if(o)return o}}return r.length===4?r:[0,0,1,1]},F6=(e,t,r,n)=>{var o=R0(e,r),i=R0(t,n),a=L6(e,r),s=c=>c>1?1:c<0?0:c,l=c=>{for(var u=c>1?1:c,d=u,f=0;f<8;++f){var h=o(d)-u,v=a(d);if(Math.abs(h-u)<Tc||v<Tc)return i(d);d=s(d-h/v)}return i(d)};return l.isStepper=!1,l},L0=function(){return F6(...V6(...arguments))},B6=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,d=l+(c-u)*o/1e3,f=l*o/1e3+a;return Math.abs(f-s)<Tc&&Math.abs(d)<Tc?[s,0]:[f,d]};return i.isStepper=!0,i.dt=o,i},W6=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return L0(e);case"spring":return B6();default:if(e.split("(")[0]==="cubic-bezier")return L0(e)}return typeof e=="function"?e:null};function z6(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 K6{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 U6(){return z6(new K6)}var H6=O.createContext(U6);function G6(e,t){var r=O.useContext(H6);return O.useMemo(()=>t??r(e),[e,t,r])}var Y6=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),Xu={isSsr:Y6()},q6={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},$0={t:0},yp={t:1};function ys(e){var t=et(e,q6),{isActive:r,canBegin:n,duration:o,easing:i,begin:a,onAnimationEnd:s,onAnimationStart:l,children:c}=t,u=r==="auto"?!Xu.isSsr:r,d=G6(t.animationId,t.animationManager),[f,h]=O.useState(u?$0:yp),v=O.useRef(null);return O.useEffect(()=>{u||h(yp)},[u]),O.useEffect(()=>{if(!u||!n)return Wo;var m=R6($0,yp,W6(i),o,h,d.getTimeoutController()),g=()=>{v.current=m()};return d.start([l,a,g,o,s]),()=>{d.stop(),v.current&&v.current(),s()}},[u,n,o,i,a,l,s,d]),c(f.t)}function bs(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=O.useRef(Da(t)),n=O.useRef(e);return n.current!==e&&(r.current=Da(t),n.current=e),r.current}var X6=["radius"],Z6=["radius"],V0,F0,B0,W0,z0,K0,U0,H0,G0,Y0;function q0(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 X0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?q0(Object(r),!0).forEach(function(n){Q6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):q0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Q6(e,t,r){return(t=J6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function J6(e){var t=eG(e,"string");return typeof t=="symbol"?t:t+""}function eG(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 Mc(){return Mc=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},Mc.apply(null,arguments)}function Z0(e,t){if(e==null)return{};var r,n,o=tG(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 tG(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 Er(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Q0=(e,t,r,n,o)=>{var i=Nn(r),a=Nn(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,d;if(s>0&&Array.isArray(o)){for(var f=[0,0,0,0],h=0,v=4;h<v;h++){var m,g=(m=o[h])!==null&&m!==void 0?m:0;f[h]=g>s?s:g}d=Ue(V0||(V0=Er(["M",",",""])),e,t+l*f[0]),f[0]>0&&(d+=Ue(F0||(F0=Er(["A ",",",",0,0,",",",",",""])),f[0],f[0],u,e+c*f[0],t)),d+=Ue(B0||(B0=Er(["L ",",",""])),e+r-c*f[1],t),f[1]>0&&(d+=Ue(W0||(W0=Er(["A ",",",",0,0,",`,
71
+ height and width.`,C,E,o,i,a,s,r),p.createElement("div",{id:d?"".concat(d):void 0,className:ve("recharts-responsive-container",f),style:m0(m0({},v),{},{width:o,height:i,minWidth:a,minHeight:s,maxHeight:l}),ref:m},p.createElement("div",{style:mH({width:o,height:i})},p.createElement(aM,{width:C,height:E},c)))}),eg=O.forwardRef((e,t)=>{var r=Jv();if(Wr(r.width)&&Wr(r.height))return e.children;var{width:n,height:o}=vH({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:i,calculatedHeight:a}=oM(void 0,void 0,{width:n,height:o,aspect:e.aspect,maxHeight:e.maxHeight});return Y(i)&&Y(a)?p.createElement(aM,{width:i,height:a},e.children):p.createElement(wH,Wh({},e,{width:n,height:o,ref:t}))});function tg(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 Uu=()=>{var e,t=Tt(),r=J(nH),n=J(Ku),o=(e=J(zu))===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}},SH={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},sM=()=>{var e;return(e=J(at))!==null&&e!==void 0?e:SH},rg=()=>J(yn),ng=()=>J(bn),PH=()=>J(e=>e.layout.margin),ye=e=>e.layout.layoutType,zo=()=>J(ye),lM=()=>{var e=zo();if(e==="horizontal"||e==="vertical")return e},cM=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},CH=()=>{var e=zo();return e!==void 0},vs=e=>{var t=Ne(),r=Tt(),{width:n,height:o}=e,i=Jv(),a=n,s=o;return i&&(a=i.width>0?i.width:n,s=i.height>0?i.height:o),O.useEffect(()=>{!r&&Wr(a)&&Wr(s)&&t(MU({width:a,height:s}))},[t,r,a,s]),null},uM=Symbol.for("immer-nothing"),v0=Symbol.for("immer-draftable"),Qt=Symbol.for("immer-state"),OH=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 $t(e,...t){if(process.env.NODE_ENV!=="production"){const r=OH[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 Ia=Object.getPrototypeOf;function Ei(e){return!!e&&!!e[Qt]}function No(e){return e?dM(e)||Array.isArray(e)||!!e[v0]||!!e.constructor?.[v0]||gs(e)||Gu(e):!1}var EH=Object.prototype.constructor.toString(),g0=new WeakMap;function dM(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=g0.get(r);return n===void 0&&(n=Function.toString.call(r),g0.set(r,n)),n===EH}function Pc(e,t,r=!0){Hu(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 Hu(e){const t=e[Qt];return t?t.type_:Array.isArray(e)?1:gs(e)?2:Gu(e)?3:0}function zh(e,t){return Hu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function fM(e,t,r){const n=Hu(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function AH(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function gs(e){return e instanceof Map}function Gu(e){return e instanceof Set}function lo(e){return e.copy_||e.base_}function Kh(e,t){if(gs(e))return new Map(e);if(Gu(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=dM(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[Qt];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(Ia(e),n)}else{const n=Ia(e);if(n!==null&&r)return{...e};const o=Object.create(n);return Object.assign(o,e)}}function og(e,t=!1){return Yu(e)||Ei(e)||!No(e)||(Hu(e)>1&&Object.defineProperties(e,{set:xl,add:xl,clear:xl,delete:xl}),Object.freeze(e),t&&Object.values(e).forEach(r=>og(r,!0))),e}function TH(){$t(2)}var xl={value:TH};function Yu(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var MH={};function jo(e){const t=MH[e];return t||$t(0,e),t}var Ra;function pM(){return Ra}function kH(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function y0(e,t){t&&(jo("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Uh(e){Hh(e),e.drafts_.forEach(DH),e.drafts_=null}function Hh(e){e===Ra&&(Ra=e.parent_)}function b0(e){return Ra=kH(Ra,e)}function DH(e){const t=e[Qt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function x0(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[Qt].modified_&&(Uh(t),$t(4)),No(e)&&(e=Cc(t,e),t.parent_||Oc(t,e)),t.patches_&&jo("Patches").generateReplacementPatches_(r[Qt].base_,e,t.patches_,t.inversePatches_)):e=Cc(t,r,[]),Uh(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==uM?e:void 0}function Cc(e,t,r){if(Yu(t))return t;const n=e.immer_.shouldUseStrictIteration(),o=t[Qt];if(!o)return Pc(t,(i,a)=>w0(e,o,t,i,a,r),n),t;if(o.scope_!==e)return t;if(!o.modified_)return Oc(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),Pc(a,(l,c)=>w0(e,o,i,l,c,r,s),n),Oc(e,i,!1),r&&e.patches_&&jo("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function w0(e,t,r,n,o,i,a){if(o==null||typeof o!="object"&&!a)return;const s=Yu(o);if(!(s&&!a)){if(process.env.NODE_ENV!=="production"&&o===r&&$t(5),Ei(o)){const l=i&&t&&t.type_!==3&&!zh(t.assigned_,n)?i.concat(n):void 0,c=Cc(e,o,l);if(fM(r,n,c),Ei(c))e.canAutoFreeze_=!1;else return}else a&&r.add(o);if(No(o)&&!s){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===o&&s)return;Cc(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(gs(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&Oc(e,o)}}}function Oc(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&og(t,r)}function _H(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:pM(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=n,i=ig;r&&(o=[n],i=La);const{revoke:a,proxy:s}=Proxy.revocable(o,i);return n.draft_=s,n.revoke_=a,s}var ig={get(e,t){if(t===Qt)return e;const r=lo(e);if(!zh(r,t))return NH(e,r,t);const n=r[t];return e.finalized_||!No(n)?n:n===gp(e.base_,t)?(yp(e),e.copy_[t]=Yh(n,e)):n},has(e,t){return t in lo(e)},ownKeys(e){return Reflect.ownKeys(lo(e))},set(e,t,r){const n=hM(lo(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const o=gp(lo(e),t),i=o?.[Qt];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(AH(r,o)&&(r!==void 0||zh(e.base_,t)))return!0;yp(e),Gh(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 gp(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,yp(e),Gh(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=lo(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){$t(11)},getPrototypeOf(e){return Ia(e.base_)},setPrototypeOf(){$t(12)}},La={};Pc(ig,(e,t)=>{La[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});La.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&$t(13),La.set.call(this,e,t,void 0)};La.set=function(e,t,r){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&$t(14),ig.set.call(this,e[0],t,r,e[0])};function gp(e,t){const r=e[Qt];return(r?lo(r):e)[t]}function NH(e,t,r){const n=hM(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function hM(e,t){if(!(t in e))return;let r=Ia(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Ia(r)}}function Gh(e){e.modified_||(e.modified_=!0,e.parent_&&Gh(e.parent_))}function yp(e){e.copy_||(e.copy_=Kh(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var jH=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"&&$t(6),n!==void 0&&typeof n!="function"&&$t(7);let o;if(No(t)){const i=b0(this),a=Yh(t,void 0);let s=!0;try{o=r(a),s=!1}finally{s?Uh(i):Hh(i)}return y0(i,n),x0(o,i)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===uM&&(o=void 0),this.autoFreeze_&&og(o,!0),n){const i=[],a=[];jo("Patches").generateReplacementPatches_(t,o,i,a),n(i,a)}return o}else $t(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){No(e)||$t(8),Ei(e)&&(e=IH(e));const t=b0(this),r=Yh(e,void 0);return r[Qt].isManual_=!0,Hh(t),r}finishDraft(e,t){const r=e&&e[Qt];(!r||!r.isManual_)&&$t(9);const{scope_:n}=r;return y0(n,t),x0(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=jo("Patches").applyPatches_;return Ei(e)?n(e,t):this.produce(e,o=>n(o,t))}};function Yh(e,t){const r=gs(e)?jo("MapSet").proxyMap_(e,t):Gu(e)?jo("MapSet").proxySet_(e,t):_H(e,t);return(t?t.scope_:pM()).drafts_.push(r),r}function IH(e){return Ei(e)||$t(10,e),mM(e)}function mM(e){if(!No(e)||Yu(e))return e;const t=e[Qt];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Kh(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Kh(e,!0);return Pc(r,(o,i)=>{fM(r,o,mM(i))},n),t&&(t.finalized_=!1),r}var RH=new jH;RH.produce;var LH={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},vM=Bt({name:"legend",initialState:LH,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:Re()},replaceLegendPayload:{reducer(e,t){var{prev:r,next:n}=t.payload,o=br(e).payload.indexOf(r);o>-1&&(e.payload[o]=n)},prepare:Re()},removeLegendPayload:{reducer(e,t){var r=br(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:Re()}}}),{setLegendSize:S0,setLegendSettings:$H,addLegendPayload:gM,replaceLegendPayload:yM,removeLegendPayload:bM}=vM.actions,VH=vM.reducer,FH=["contextPayload"];function qh(){return qh=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},qh.apply(null,arguments)}function P0(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 Ai(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?P0(Object(r),!0).forEach(function(n){BH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function BH(e,t,r){return(t=WH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function WH(e){var t=zH(e,"string");return typeof t=="symbol"?t:t+""}function zH(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){if(e==null)return{};var r,n,o=UH(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 UH(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 HH(e){return e.value}function GH(e){var{contextPayload:t}=e,r=KH(e,FH),n=fT(t,e.payloadUniqBy,HH),o=Ai(Ai({},r),{},{payload:n});return p.isValidElement(e.content)?p.cloneElement(e.content,o):typeof e.content=="function"?p.createElement(e.content,o):p.createElement(b4,o)}function YH(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}),Ai(Ai({},c),u)}function qH(e){var t=Ne();return O.useEffect(()=>{t($H(e))},[t,e]),null}function XH(e){var t=Ne();return O.useEffect(()=>(t(S0(e)),()=>{t(S0({width:0,height:0}))}),[t,e]),null}function ZH(e,t,r,n){return e==="vertical"&&t!=null?{height:t}:e==="horizontal"?{width:r||n}:null}var QH={align:"center",iconSize:14,inactiveColor:"#ccc",itemSorter:"value",layout:"horizontal",verticalAlign:"bottom"};function qu(e){var t=et(e,QH),r=yK(),n=d5(),o=PH(),{width:i,height:a,wrapperStyle:s,portal:l}=t,[c,u]=yT([r]),d=rg(),f=ng();if(d==null||f==null)return null;var h=d-(o?.left||0)-(o?.right||0),v=ZH(t.layout,a,i,h),m=l?s:Ai(Ai({position:"absolute",width:v?.width||i||"auto",height:v?.height||a||"auto"},YH(s,t,o,d,f,c)),s),g=l??n;if(g==null||r==null)return null;var y=p.createElement("div",{className:"recharts-legend-wrapper",style:m,ref:u},p.createElement(qH,{layout:t.layout,align:t.align,verticalAlign:t.verticalAlign,itemSorter:t.itemSorter}),!l&&p.createElement(XH,{width:c.width,height:c.height}),p.createElement(GH,qh({},t,v,{margin:o,chartWidth:d,chartHeight:f,contextPayload:r})));return is.createPortal(y,g)}qu.displayName="Legend";function Xh(){return Xh=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},Xh.apply(null,arguments)}function C0(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?C0(Object(r),!0).forEach(function(n){JH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function JH(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 r6(e){return Array.isArray(e)&&Br(e[0])&&Br(e[1])?e.join(" ~ "):e}var ti={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},n6=e=>{var{separator:t=ti.separator,contentStyle:r,itemStyle:n,labelStyle:o=ti.labelStyle,payload:i,formatter:a,itemSorter:s,wrapperClassName:l,labelClassName:c,label:u,labelFormatter:d,accessibilityLayer:f=ti.accessibilityLayer}=e,h=()=>{if(i&&i.length){var P={padding:0,margin:0},C=(s?_u(i,s):i).map((E,A)=>{if(E.type==="none")return null;var T=E.formatter||a||r6,{value:M,name:_}=E,k=M,N=_;if(T){var R=T(M,_,E,A,i);if(Array.isArray(R))[k,N]=R;else if(R!=null)k=R;else return null}var z=aa(aa({},ti.itemStyle),{},{color:E.color||ti.itemStyle.color},n);return p.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(A),style:z},Br(N)?p.createElement("span",{className:"recharts-tooltip-item-name"},N):null,Br(N)?p.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,p.createElement("span",{className:"recharts-tooltip-item-value"},k),p.createElement("span",{className:"recharts-tooltip-item-unit"},E.unit||""))});return p.createElement("ul",{className:"recharts-tooltip-item-list",style:P},C)}return null},v=aa(aa({},ti.contentStyle),r),m=aa({margin:0},o),g=!We(u),y=g?u:"",x=ve("recharts-default-tooltip",l),w=ve("recharts-tooltip-label",c);g&&d&&i!==void 0&&i!==null&&(y=d(u,i));var S=f?{role:"status","aria-live":"assertive"}:{};return p.createElement("div",Xh({className:x,style:v},S),p.createElement("p",{className:w,style:m},p.isValidElement(y)?y:"".concat(y)),h())},sa="recharts-tooltip-wrapper",o6={visibility:"hidden"};function i6(e){var{coordinate:t,translateX:r,translateY:n}=e;return ve(sa,{["".concat(sa,"-right")]:Y(r)&&t&&Y(t.x)&&r>=t.x,["".concat(sa,"-left")]:Y(r)&&t&&Y(t.x)&&r<t.x,["".concat(sa,"-bottom")]:Y(n)&&t&&Y(t.y)&&n>=t.y,["".concat(sa,"-top")]:Y(n)&&t&&Y(t.y)&&n<t.y})}function O0(e){var{allowEscapeViewBox:t,coordinate:r,key:n,offset:o,position:i,reverseDirection:a,tooltipDimension:s,viewBox:l,viewBoxDimension:c}=e;if(i&&Y(i[n]))return i[n];var u=r[n]-s-(o>0?o:0),d=r[n]+o;if(t[n])return a[n]?u:d;var f=l[n];if(f==null)return 0;if(a[n]){var h=u,v=f;return h<v?Math.max(d,f):Math.max(u,f)}if(c==null)return 0;var m=d+s,g=f+c;return m>g?Math.max(u,f):Math.max(d,f)}function a6(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 s6(e){var{allowEscapeViewBox:t,coordinate:r,offsetTop:n,offsetLeft:o,position:i,reverseDirection:a,tooltipBox:s,useTranslate3d:l,viewBox:c}=e,u,d,f;return s.height>0&&s.width>0&&r?(d=O0({allowEscapeViewBox:t,coordinate:r,key:"x",offset:o,position:i,reverseDirection:a,tooltipDimension:s.width,viewBox:c,viewBoxDimension:c.width}),f=O0({allowEscapeViewBox:t,coordinate:r,key:"y",offset:n,position:i,reverseDirection:a,tooltipDimension:s.height,viewBox:c,viewBoxDimension:c.height}),u=a6({translateX:d,translateY:f,useTranslate3d:l})):u=o6,{cssProperties:u,cssClasses:i6({translateX:d,translateY:f,coordinate:r})}}function E0(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 wl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?E0(Object(r),!0).forEach(function(n){Zh(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Zh(e,t,r){return(t=l6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l6(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)}class u6 extends O.PureComponent{constructor(){super(...arguments),Zh(this,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}),Zh(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:d,useTranslate3d:f,viewBox:h,wrapperStyle:v,lastBoundingBox:m,innerRef:g,hasPortalFromProps:y}=this.props,x=typeof c=="number"?c:c.x,w=typeof c=="number"?c:c.y,{cssClasses:S,cssProperties:P}=s6({allowEscapeViewBox:r,coordinate:a,offsetLeft:x,offsetTop:w,position:u,reverseDirection:d,tooltipBox:{height:m.height,width:m.width},useTranslate3d:f,viewBox:h}),C=y?{}:wl(wl({transition:l&&t?"transform ".concat(n,"ms ").concat(o):void 0},P),{},{pointerEvents:"none",visibility:!this.state.dismissed&&t&&s?"visible":"hidden",position:"absolute",top:0,left:0}),E=wl(wl({},C),{},{visibility:!this.state.dismissed&&t&&s?"visible":"hidden"},v);return p.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:S,style:E,ref:g},i)}}var xM=()=>{var e;return(e=J(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function Qh(){return Qh=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},Qh.apply(null,arguments)}function A0(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 T0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?A0(Object(r),!0).forEach(function(n){d6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):A0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function d6(e,t,r){return(t=f6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f6(e){var t=p6(e,"string");return typeof t=="symbol"?t:t+""}function p6(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 M0={curveBasisClosed:k5,curveBasisOpen:D5,curveBasis:M5,curveBumpX:m5,curveBumpY:v5,curveLinearClosed:_5,curveLinear:ku,curveMonotoneX:N5,curveMonotoneY:j5,curveNatural:I5,curveStep:R5,curveStepAfter:$5,curveStepBefore:L5},Ec=e=>pe(e.x)&&pe(e.y),k0=e=>e.base!=null&&Ec(e.base)&&Ec(e),la=e=>e.x,ca=e=>e.y,h6=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(cs(e));if((r==="curveMonotone"||r==="curveBump")&&t){var n=M0["".concat(r).concat(t==="vertical"?"Y":"X")];if(n)return n}return M0[r]||ku},D0={connectNulls:!1,type:"linear"},m6=e=>{var{type:t=D0.type,points:r=[],baseLine:n,layout:o,connectNulls:i=D0.connectNulls}=e,a=h6(t,o),s=i?r.filter(Ec):r;if(Array.isArray(n)){var l,c=r.map((v,m)=>T0(T0({},v),{},{base:n[m]}));o==="vertical"?l=ul().y(ca).x1(la).x0(v=>v.base.x):l=ul().x(la).y1(ca).y0(v=>v.base.y);var u=l.defined(k0).curve(a),d=i?c.filter(k0):c;return u(d)}var f;o==="vertical"&&Y(n)?f=ul().y(ca).x1(la).x0(n):Y(n)?f=ul().x(la).y1(ca).y0(n):f=WA().x(la).y(ca);var h=f.defined(Ec).curve(a);return h(s)},ag=e=>{var{className:t,points:r,path:n,pathRef:o}=e,i=zo();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?m6(a):n;return p.createElement("path",Qh({},Zt(e),Wv(e),{className:ve("recharts-curve",t),d:s===null?void 0:s,ref:o}))},v6=["x","y","top","left","width","height","className"];function Jh(){return Jh=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},Jh.apply(null,arguments)}function _0(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 g6(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_0(Object(r),!0).forEach(function(n){y6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function y6(e,t,r){return(t=b6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function b6(e){var t=x6(e,"string");return typeof t=="symbol"?t:t+""}function x6(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 w6(e,t){if(e==null)return{};var r,n,o=S6(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 S6(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 P6=(e,t,r,n,o,i)=>"M".concat(e,",").concat(o,"v").concat(n,"M").concat(i,",").concat(t,"h").concat(r),C6=e=>{var{x:t=0,y:r=0,top:n=0,left:o=0,width:i=0,height:a=0,className:s}=e,l=w6(e,v6),c=g6({x:t,y:r,top:n,left:o,width:i,height:a},l);return!Y(t)||!Y(r)||!Y(i)||!Y(a)||!Y(n)||!Y(o)?null:p.createElement("path",Jh({},Rt(c),{className:ve("recharts-cross",s),d:P6(t,r,i,a,n,o)}))};function O6(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 N0(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 j0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?N0(Object(r),!0).forEach(function(n){E6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):N0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function E6(e,t,r){return(t=A6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function A6(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)}var M6=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),wM=(e,t,r)=>e.map(n=>"".concat(M6(n)," ").concat(t,"ms ").concat(r)).join(","),k6=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((r,n)=>r.filter(o=>n.includes(o))),$a=(e,t)=>Object.keys(t).reduce((r,n)=>j0(j0({},r),{},{[n]:e(n,t[n])}),{});function I0(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 ot(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?I0(Object(r),!0).forEach(function(n){D6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):I0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function D6(e,t,r){return(t=_6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _6(e){var t=N6(e,"string");return typeof t=="symbol"?t:t+""}function N6(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 Ac=(e,t,r)=>e+(t-e)*r,em=e=>{var{from:t,to:r}=e;return t!==r},SM=(e,t,r)=>{var n=$a((o,i)=>{if(em(i)){var[a,s]=e(i.from,i.to,i.velocity);return ot(ot({},i),{},{from:a,velocity:s})}return i},t);return r<1?$a((o,i)=>em(i)&&n[o]!=null?ot(ot({},i),{},{velocity:Ac(i.velocity,n[o].velocity,r),from:Ac(i.from,n[o].from,r)}):i,t):SM(e,n,r-1)};function j6(e,t,r,n,o,i){var a,s=n.reduce((f,h)=>ot(ot({},f),{},{[h]:{from:e[h],velocity:0,to:t[h]}}),{}),l=()=>$a((f,h)=>h.from,s),c=()=>!Object.values(s).filter(em).length,u=null,d=f=>{a||(a=f);var h=f-a,v=h/r.dt;s=SM(r,s,v),o(ot(ot(ot({},e),t),l())),a=f,c()||(u=i.setTimeout(d))};return()=>(u=i.setTimeout(d),()=>{var f;(f=u)===null||f===void 0||f()})}function I6(e,t,r,n,o,i,a){var s=null,l=o.reduce((d,f)=>{var h=e[f],v=t[f];return h==null||v==null?d:ot(ot({},d),{},{[f]:[h,v]})},{}),c,u=d=>{c||(c=d);var f=(d-c)/n,h=$a((m,g)=>Ac(...g,r(f)),l);if(i(ot(ot(ot({},e),t),h)),f<1)s=a.setTimeout(u);else{var v=$a((m,g)=>Ac(...g,r(1)),l);i(ot(ot(ot({},e),t),v))}};return()=>(s=a.setTimeout(u),()=>{var d;(d=s)===null||d===void 0||d()})}const R6=(e,t,r,n,o,i)=>{var a=k6(e,t);return r==null?()=>(o(ot(ot({},e),t)),()=>{}):r.isStepper===!0?j6(e,t,r,a,o,i):I6(e,t,r,n,a,o,i)};var Tc=1e-4,PM=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],CM=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),R0=(e,t)=>r=>{var n=PM(e,t);return CM(n,r)},L6=(e,t)=>r=>{var n=PM(e,t),o=[...n.map((i,a)=>i*a).slice(1),0];return CM(o,r)},$6=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]]},V6=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=$6(r[0]);if(o)return o}}return r.length===4?r:[0,0,1,1]},F6=(e,t,r,n)=>{var o=R0(e,r),i=R0(t,n),a=L6(e,r),s=c=>c>1?1:c<0?0:c,l=c=>{for(var u=c>1?1:c,d=u,f=0;f<8;++f){var h=o(d)-u,v=a(d);if(Math.abs(h-u)<Tc||v<Tc)return i(d);d=s(d-h/v)}return i(d)};return l.isStepper=!1,l},L0=function(){return F6(...V6(...arguments))},B6=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,d=l+(c-u)*o/1e3,f=l*o/1e3+a;return Math.abs(f-s)<Tc&&Math.abs(d)<Tc?[s,0]:[f,d]};return i.isStepper=!0,i.dt=o,i},W6=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return L0(e);case"spring":return B6();default:if(e.split("(")[0]==="cubic-bezier")return L0(e)}return typeof e=="function"?e:null};function z6(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 K6{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 U6(){return z6(new K6)}var H6=O.createContext(U6);function G6(e,t){var r=O.useContext(H6);return O.useMemo(()=>t??r(e),[e,t,r])}var Y6=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),Xu={isSsr:Y6()},q6={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},$0={t:0},bp={t:1};function ys(e){var t=et(e,q6),{isActive:r,canBegin:n,duration:o,easing:i,begin:a,onAnimationEnd:s,onAnimationStart:l,children:c}=t,u=r==="auto"?!Xu.isSsr:r,d=G6(t.animationId,t.animationManager),[f,h]=O.useState(u?$0:bp),v=O.useRef(null);return O.useEffect(()=>{u||h(bp)},[u]),O.useEffect(()=>{if(!u||!n)return Wo;var m=R6($0,bp,W6(i),o,h,d.getTimeoutController()),g=()=>{v.current=m()};return d.start([l,a,g,o,s]),()=>{d.stop(),v.current&&v.current(),s()}},[u,n,o,i,a,l,s,d]),c(f.t)}function bs(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=O.useRef(Da(t)),n=O.useRef(e);return n.current!==e&&(r.current=Da(t),n.current=e),r.current}var X6=["radius"],Z6=["radius"],V0,F0,B0,W0,z0,K0,U0,H0,G0,Y0;function q0(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 X0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?q0(Object(r),!0).forEach(function(n){Q6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):q0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Q6(e,t,r){return(t=J6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function J6(e){var t=eG(e,"string");return typeof t=="symbol"?t:t+""}function eG(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 Mc(){return Mc=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},Mc.apply(null,arguments)}function Z0(e,t){if(e==null)return{};var r,n,o=tG(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 tG(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 Er(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Q0=(e,t,r,n,o)=>{var i=Nn(r),a=Nn(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,d;if(s>0&&Array.isArray(o)){for(var f=[0,0,0,0],h=0,v=4;h<v;h++){var m,g=(m=o[h])!==null&&m!==void 0?m:0;f[h]=g>s?s:g}d=Ue(V0||(V0=Er(["M",",",""])),e,t+l*f[0]),f[0]>0&&(d+=Ue(F0||(F0=Er(["A ",",",",0,0,",",",",",""])),f[0],f[0],u,e+c*f[0],t)),d+=Ue(B0||(B0=Er(["L ",",",""])),e+r-c*f[1],t),f[1]>0&&(d+=Ue(W0||(W0=Er(["A ",",",",0,0,",`,
72
72
  `,",",""])),f[1],f[1],u,e+r,t+l*f[1])),d+=Ue(z0||(z0=Er(["L ",",",""])),e+r,t+n-l*f[2]),f[2]>0&&(d+=Ue(K0||(K0=Er(["A ",",",",0,0,",`,
73
73
  `,",",""])),f[2],f[2],u,e+r-c*f[2],t+n)),d+=Ue(U0||(U0=Er(["L ",",",""])),e+c*f[3],t+n),f[3]>0&&(d+=Ue(H0||(H0=Er(["A ",",",",0,0,",`,
74
74
  `,",",""])),f[3],f[3],u,e,t+n-l*f[3])),d+="Z"}else if(s>0&&o===+o&&o>0){var y=Math.min(s,o);d=Ue(G0||(G0=Er(["M ",",",`
@@ -78,7 +78,7 @@ Take a look at the reducer(s) handling this action type: ${h.type}.
78
78
  L `,",",`
79
79
  A `,",",",0,0,",",",",",`
80
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 d=Ue(Y0||(Y0=Er(["M ",","," h "," v "," h "," Z"])),e,t,r,n,-r);return d},J0={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},OM=e=>{var t=et(e,J0),r=O.useRef(null),[n,o]=O.useState(-1);O.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var F=r.current.getTotalLength();F&&o(F)}catch{}},[]);var{x:i,y:a,width:s,height:l,radius:c,className:u}=t,{animationEasing:d,animationDuration:f,animationBegin:h,isAnimationActive:v,isUpdateAnimationActive:m}=t,g=O.useRef(s),y=O.useRef(l),x=O.useRef(i),w=O.useRef(a),S=O.useMemo(()=>({x:i,y:a,width:s,height:l,radius:c}),[i,a,s,l,c]),P=bs(S,"rectangle-");if(i!==+i||a!==+a||s!==+s||l!==+l||s===0||l===0)return null;var C=ve("recharts-rectangle",u);if(!m){var E=Rt(t),{radius:A}=E,T=Z0(E,X6);return p.createElement("path",Mc({},T,{x:Nn(i),y:Nn(a),width:Nn(s),height:Nn(l),radius:typeof c=="number"?c:void 0,className:C,d:Q0(i,a,s,l,c)}))}var M=g.current,_=y.current,k=x.current,N=w.current,R="0px ".concat(n===-1?1:n,"px"),z="".concat(n,"px 0px"),B=wM(["strokeDasharray"],f,typeof d=="string"?d:J0.animationEasing);return p.createElement(ys,{animationId:P,key:P,canBegin:n>0,duration:f,easing:d,isActive:m,begin:h},F=>{var j=Le(M,s,F),L=Le(_,l,F),H=Le(k,i,F),re=Le(N,a,F);r.current&&(g.current=j,y.current=L,x.current=H,w.current=re);var le;v?F>0?le={transition:B,strokeDasharray:z}:le={strokeDasharray:R}:le={strokeDasharray:z};var ae=Rt(t),{radius:oe}=ae,Se=Z0(ae,Z6);return p.createElement("path",Mc({},Se,{radius:typeof c=="number"?c:void 0,className:C,d:Q0(H,re,j,L,c),ref:r,style:X0(X0({},le),t.style)}))})};function eS(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?eS(Object(r),!0).forEach(function(n){rG(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rG(e,t,r){return(t=nG(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nG(e){var t=oG(e,"string");return typeof t=="symbol"?t:t+""}function oG(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 kc=Math.PI/180,iG=e=>e*180/Math.PI,Xe=(e,t,r,n)=>({x:e+Math.cos(-kc*n)*r,y:t+Math.sin(-kc*n)*r}),EM=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},aG=(e,t)=>{var{x:r,y:n}=e,{x:o,y:i}=t;return Math.sqrt((r-o)**2+(n-i)**2)},sG=(e,t)=>{var{x:r,y:n}=e,{cx:o,cy:i}=t,a=aG({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:iG(l),angleInRadian:l}},lG=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}},cG=(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},uG=(e,t)=>{var{chartX:r,chartY:n}=e,{radius:o,angle:i}=sG({x:r,y:n},t),{innerRadius:a,outerRadius:s}=t;if(o<a||o>s||o===0)return null;var{startAngle:l,endAngle:c}=lG(t),u=i,d;if(l<=c){for(;u>c;)u-=360;for(;u<l;)u+=360;d=u>=l&&u<=c}else{for(;u>l;)u-=360;for(;u<c;)u+=360;d=u>=c&&u<=l}return d?tS(tS({},t),{},{radius:o,angle:cG(u,t)}):null};function AM(e){var{cx:t,cy:r,radius:n,startAngle:o,endAngle:i}=e,a=Xe(t,r,n,o),s=Xe(t,r,n,i);return{points:[a,s],cx:t,cy:r,radius:n,startAngle:o,endAngle:i}}var rS,nS,oS,iS,aS,sS,lS;function em(){return em=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},em.apply(null,arguments)}function ho(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var dG=(e,t)=>{var r=ft(t-e),n=Math.min(Math.abs(t-e),359.999);return r*n},Sl=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)/kc,d=l?o:o+i*u,f=Xe(t,r,c,d),h=Xe(t,r,n,d),v=l?o-i*u:o,m=Xe(t,r,c*Math.cos(u*kc),v);return{center:f,circleTangency:h,lineTangency:m,theta:u}},TM=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:o,startAngle:i,endAngle:a}=e,s=dG(i,a),l=i+s,c=Xe(t,r,o,i),u=Xe(t,r,o,l),d=Ue(rS||(rS=ho(["M ",",",`
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 d=Ue(Y0||(Y0=Er(["M ",","," h "," v "," h "," Z"])),e,t,r,n,-r);return d},J0={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},OM=e=>{var t=et(e,J0),r=O.useRef(null),[n,o]=O.useState(-1);O.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var F=r.current.getTotalLength();F&&o(F)}catch{}},[]);var{x:i,y:a,width:s,height:l,radius:c,className:u}=t,{animationEasing:d,animationDuration:f,animationBegin:h,isAnimationActive:v,isUpdateAnimationActive:m}=t,g=O.useRef(s),y=O.useRef(l),x=O.useRef(i),w=O.useRef(a),S=O.useMemo(()=>({x:i,y:a,width:s,height:l,radius:c}),[i,a,s,l,c]),P=bs(S,"rectangle-");if(i!==+i||a!==+a||s!==+s||l!==+l||s===0||l===0)return null;var C=ve("recharts-rectangle",u);if(!m){var E=Rt(t),{radius:A}=E,T=Z0(E,X6);return p.createElement("path",Mc({},T,{x:Nn(i),y:Nn(a),width:Nn(s),height:Nn(l),radius:typeof c=="number"?c:void 0,className:C,d:Q0(i,a,s,l,c)}))}var M=g.current,_=y.current,k=x.current,N=w.current,R="0px ".concat(n===-1?1:n,"px"),z="".concat(n,"px 0px"),B=wM(["strokeDasharray"],f,typeof d=="string"?d:J0.animationEasing);return p.createElement(ys,{animationId:P,key:P,canBegin:n>0,duration:f,easing:d,isActive:m,begin:h},F=>{var j=Le(M,s,F),L=Le(_,l,F),H=Le(k,i,F),re=Le(N,a,F);r.current&&(g.current=j,y.current=L,x.current=H,w.current=re);var le;v?F>0?le={transition:B,strokeDasharray:z}:le={strokeDasharray:R}:le={strokeDasharray:z};var ae=Rt(t),{radius:oe}=ae,Se=Z0(ae,Z6);return p.createElement("path",Mc({},Se,{radius:typeof c=="number"?c:void 0,className:C,d:Q0(H,re,j,L,c),ref:r,style:X0(X0({},le),t.style)}))})};function eS(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?eS(Object(r),!0).forEach(function(n){rG(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rG(e,t,r){return(t=nG(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nG(e){var t=oG(e,"string");return typeof t=="symbol"?t:t+""}function oG(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 kc=Math.PI/180,iG=e=>e*180/Math.PI,Xe=(e,t,r,n)=>({x:e+Math.cos(-kc*n)*r,y:t+Math.sin(-kc*n)*r}),EM=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},aG=(e,t)=>{var{x:r,y:n}=e,{x:o,y:i}=t;return Math.sqrt((r-o)**2+(n-i)**2)},sG=(e,t)=>{var{x:r,y:n}=e,{cx:o,cy:i}=t,a=aG({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:iG(l),angleInRadian:l}},lG=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}},cG=(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},uG=(e,t)=>{var{chartX:r,chartY:n}=e,{radius:o,angle:i}=sG({x:r,y:n},t),{innerRadius:a,outerRadius:s}=t;if(o<a||o>s||o===0)return null;var{startAngle:l,endAngle:c}=lG(t),u=i,d;if(l<=c){for(;u>c;)u-=360;for(;u<l;)u+=360;d=u>=l&&u<=c}else{for(;u>l;)u-=360;for(;u<c;)u+=360;d=u>=c&&u<=l}return d?tS(tS({},t),{},{radius:o,angle:cG(u,t)}):null};function AM(e){var{cx:t,cy:r,radius:n,startAngle:o,endAngle:i}=e,a=Xe(t,r,n,o),s=Xe(t,r,n,i);return{points:[a,s],cx:t,cy:r,radius:n,startAngle:o,endAngle:i}}var rS,nS,oS,iS,aS,sS,lS;function tm(){return tm=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},tm.apply(null,arguments)}function ho(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var dG=(e,t)=>{var r=ft(t-e),n=Math.min(Math.abs(t-e),359.999);return r*n},Sl=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)/kc,d=l?o:o+i*u,f=Xe(t,r,c,d),h=Xe(t,r,n,d),v=l?o-i*u:o,m=Xe(t,r,c*Math.cos(u*kc),v);return{center:f,circleTangency:h,lineTangency:m,theta:u}},TM=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:o,startAngle:i,endAngle:a}=e,s=dG(i,a),l=i+s,c=Xe(t,r,o,i),u=Xe(t,r,o,l),d=Ue(rS||(rS=ho(["M ",",",`
82
82
  A `,",",`,0,
83
83
  `,",",`,
84
84
  `,",",`
@@ -95,9 +95,9 @@ Take a look at the reducer(s) handling this action type: ${h.type}.
95
95
  `])),f.x,f.y,i,i,+(u<0),d.x,d.y,o,o,+(y>180),+(u<0),v.x,v.y,i,i,+(u<0),m.x,m.y);if(n>0){var{circleTangency:w,lineTangency:S,theta:P}=Sl({cx:t,cy:r,radius:n,angle:l,sign:u,isExternal:!0,cornerRadius:i,cornerIsExternal:s}),{circleTangency:C,lineTangency:E,theta:A}=Sl({cx:t,cy:r,radius:n,angle:c,sign:-u,isExternal:!0,cornerRadius:i,cornerIsExternal:s}),T=s?Math.abs(l-c):Math.abs(l-c)-P-A;if(T<0&&i===0)return"".concat(x,"L").concat(t,",").concat(r,"Z");x+=Ue(sS||(sS=ho(["L",",",`
96
96
  A`,",",",0,0,",",",",",`
97
97
  A`,",",",0,",",",",",",",`
98
- A`,",",",0,0,",",",",","Z"])),E.x,E.y,i,i,+(u<0),C.x,C.y,n,n,+(T>180),+(u>0),w.x,w.y,i,i,+(u<0),S.x,S.y)}else x+=Ue(lS||(lS=ho(["L",",","Z"])),t,r);return x},pG={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},MM=e=>{var t=et(e,pG),{cx:r,cy:n,innerRadius:o,outerRadius:i,cornerRadius:a,forceCornerRadius:s,cornerIsExternal:l,startAngle:c,endAngle:u,className:d}=t;if(i<o||c===u)return null;var f=ve("recharts-sector",d),h=i-o,v=Ot(a,h,0,!0),m;return v>0&&Math.abs(c-u)<360?m=fG({cx:r,cy:n,innerRadius:o,outerRadius:i,cornerRadius:Math.min(v,h/2),forceCornerRadius:s,cornerIsExternal:l,startAngle:c,endAngle:u}):m=TM({cx:r,cy:n,innerRadius:o,outerRadius:i,startAngle:c,endAngle:u}),p.createElement("path",em({},Rt(t),{className:f,d:m}))};function hG(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(nT(t)){if(e==="centric"){var{cx:n,cy:o,innerRadius:i,outerRadius:a,angle:s}=t,l=Xe(n,o,i,s),c=Xe(n,o,a,s);return[{x:l.x,y:l.y},{x:c.x,y:c.y}]}return AM(t)}}var bp={},xp={},wp={},cS;function mG(){return cS||(cS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=mT();function r(n){return t.isSymbol(n)?NaN:Number(n)}e.toNumber=r})(wp)),wp}var uS;function vG(){return uS||(uS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=mG();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})(xp)),xp}var dS;function gG(){return dS||(dS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=vT(),r=vG();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})(bp)),bp}var Sp,fS;function yG(){return fS||(fS=1,Sp=gG().range),Sp}var bG=yG();const kM=Gn(bG);function In(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function xG(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function ag(e){let t,r,n;e.length!==2?(t=In,r=(s,l)=>In(e(s),l),n=(s,l)=>e(s)-l):(t=e===In||e===xG?e:wG,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 d=c+u>>>1;r(s[d],l)<0?c=d+1:u=d}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 d=c+u>>>1;r(s[d],l)<=0?c=d+1:u=d}while(c<u)}return c}function a(s,l,c=0,u=s.length){const d=o(s,l,c,u-1);return d>c&&n(s[d-1],l)>-n(s[d],l)?d-1:d}return{left:o,center:a,right:i}}function wG(){return 0}function DM(e){return e===null?NaN:+e}function*SG(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const PG=ag(In),xs=PG.right;ag(DM).center;class pS extends Map{constructor(t,r=EG){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(hS(this,t))}has(t){return super.has(hS(this,t))}set(t,r){return super.set(CG(this,t),r)}delete(t){return super.delete(OG(this,t))}}function hS({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function CG({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function OG({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function EG(e){return e!==null&&typeof e=="object"?e.valueOf():e}function AG(e=In){if(e===In)return _M;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 _M(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const TG=Math.sqrt(50),MG=Math.sqrt(10),kG=Math.sqrt(2);function Dc(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>=TG?10:i>=MG?5:i>=kG?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?Dc(e,t,r*2):[s,l,c]}function tm(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?Dc(t,e,r):Dc(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 rm(e,t,r){return t=+t,e=+e,r=+r,Dc(e,t,r)[2]}function nm(e,t,r){t=+t,e=+e,r=+r;const n=t<e,o=n?rm(t,e,r):rm(e,t,r);return(n?-1:1)*(o<0?1/-o:o)}function mS(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function vS(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function NM(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?_M:AG(o);n>r;){if(n-r>600){const l=n-r+1,c=t-r+1,u=Math.log(l),d=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*d*(l-d)/l)*(c-l/2<0?-1:1),h=Math.max(r,Math.floor(t-c*d/l+f)),v=Math.min(n,Math.floor(t+(l-c)*d/l+f));NM(e,t,h,v,o)}const i=e[t];let a=r,s=n;for(ua(e,r,t),o(e[n],i)>0&&ua(e,r,n);a<s;){for(ua(e,a,s),++a,--s;o(e[a],i)<0;)++a;for(;o(e[s],i)>0;)--s}o(e[r],i)===0?ua(e,r,s):(++s,ua(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function ua(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function DG(e,t,r){if(e=Float64Array.from(SG(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return vS(e);if(t>=1)return mS(e);var n,o=(n-1)*t,i=Math.floor(o),a=mS(NM(e,i).subarray(0,i+1)),s=vS(e.subarray(i+1));return a+(s-a)*(o-i)}}function _G(e,t,r=DM){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 NG(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 fr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function xn(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 om=Symbol("implicit");function sg(){var e=new pS,t=[],r=[],n=om;function o(i){let a=e.get(i);if(a===void 0){if(n!==om)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 pS;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 sg(t,r).unknown(n)},fr.apply(o,arguments),o}function lg(){var e=sg().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 d(){var f=t().length,h=o<n,v=h?o:n,m=h?n:o;i=(m-v)/Math.max(1,f-l+c*2),s&&(i=Math.floor(i)),v+=(m-v-i*(f-l))*u,a=i*(1-l),s&&(v=Math.round(v),a=Math.round(a));var g=NG(f).map(function(y){return v+i*y});return r(h?g.reverse():g)}return e.domain=function(f){return arguments.length?(t(f),d()):t()},e.range=function(f){return arguments.length?([n,o]=f,n=+n,o=+o,d()):[n,o]},e.rangeRound=function(f){return[n,o]=f,n=+n,o=+o,s=!0,d()},e.bandwidth=function(){return a},e.step=function(){return i},e.round=function(f){return arguments.length?(s=!!f,d()):s},e.padding=function(f){return arguments.length?(l=Math.min(1,c=+f),d()):l},e.paddingInner=function(f){return arguments.length?(l=Math.min(1,f),d()):l},e.paddingOuter=function(f){return arguments.length?(c=+f,d()):c},e.align=function(f){return arguments.length?(u=Math.max(0,Math.min(1,f)),d()):u},e.copy=function(){return lg(t(),[n,o]).round(s).paddingInner(l).paddingOuter(c).align(u)},fr.apply(d(),arguments)}function jM(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return jM(t())},e}function jG(){return jM(lg.apply(null,arguments).paddingInner(1))}function cg(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function IM(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function ws(){}var Va=.7,_c=1/Va,wi="\\s*([+-]?\\d+)\\s*",Fa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Lr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",IG=/^#([0-9a-f]{3,8})$/,RG=new RegExp(`^rgb\\(${wi},${wi},${wi}\\)$`),LG=new RegExp(`^rgb\\(${Lr},${Lr},${Lr}\\)$`),$G=new RegExp(`^rgba\\(${wi},${wi},${wi},${Fa}\\)$`),VG=new RegExp(`^rgba\\(${Lr},${Lr},${Lr},${Fa}\\)$`),FG=new RegExp(`^hsl\\(${Fa},${Lr},${Lr}\\)$`),BG=new RegExp(`^hsla\\(${Fa},${Lr},${Lr},${Fa}\\)$`),gS={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};cg(ws,Ba,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:yS,formatHex:yS,formatHex8:WG,formatHsl:zG,formatRgb:bS,toString:bS});function yS(){return this.rgb().formatHex()}function WG(){return this.rgb().formatHex8()}function zG(){return RM(this).formatHsl()}function bS(){return this.rgb().formatRgb()}function Ba(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=IG.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?xS(t):r===3?new Ft(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Pl(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Pl(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=RG.exec(e))?new Ft(t[1],t[2],t[3],1):(t=LG.exec(e))?new Ft(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=$G.exec(e))?Pl(t[1],t[2],t[3],t[4]):(t=VG.exec(e))?Pl(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=FG.exec(e))?PS(t[1],t[2]/100,t[3]/100,1):(t=BG.exec(e))?PS(t[1],t[2]/100,t[3]/100,t[4]):gS.hasOwnProperty(e)?xS(gS[e]):e==="transparent"?new Ft(NaN,NaN,NaN,0):null}function xS(e){return new Ft(e>>16&255,e>>8&255,e&255,1)}function Pl(e,t,r,n){return n<=0&&(e=t=r=NaN),new Ft(e,t,r,n)}function KG(e){return e instanceof ws||(e=Ba(e)),e?(e=e.rgb(),new Ft(e.r,e.g,e.b,e.opacity)):new Ft}function im(e,t,r,n){return arguments.length===1?KG(e):new Ft(e,t,r,n??1)}function Ft(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}cg(Ft,im,IM(ws,{brighter(e){return e=e==null?_c:Math.pow(_c,e),new Ft(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Va:Math.pow(Va,e),new Ft(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ft(Co(this.r),Co(this.g),Co(this.b),Nc(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:wS,formatHex:wS,formatHex8:UG,formatRgb:SS,toString:SS}));function wS(){return`#${mo(this.r)}${mo(this.g)}${mo(this.b)}`}function UG(){return`#${mo(this.r)}${mo(this.g)}${mo(this.b)}${mo((isNaN(this.opacity)?1:this.opacity)*255)}`}function SS(){const e=Nc(this.opacity);return`${e===1?"rgb(":"rgba("}${Co(this.r)}, ${Co(this.g)}, ${Co(this.b)}${e===1?")":`, ${e})`}`}function Nc(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Co(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function mo(e){return e=Co(e),(e<16?"0":"")+e.toString(16)}function PS(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new gr(e,t,r,n)}function RM(e){if(e instanceof gr)return new gr(e.h,e.s,e.l,e.opacity);if(e instanceof ws||(e=Ba(e)),!e)return new gr;if(e instanceof gr)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 gr(a,s,l,e.opacity)}function HG(e,t,r,n){return arguments.length===1?RM(e):new gr(e,t,r,n??1)}function gr(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}cg(gr,HG,IM(ws,{brighter(e){return e=e==null?_c:Math.pow(_c,e),new gr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Va:Math.pow(Va,e),new gr(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 Ft(Pp(e>=240?e-240:e+120,o,n),Pp(e,o,n),Pp(e<120?e+240:e-120,o,n),this.opacity)},clamp(){return new gr(CS(this.h),Cl(this.s),Cl(this.l),Nc(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=Nc(this.opacity);return`${e===1?"hsl(":"hsla("}${CS(this.h)}, ${Cl(this.s)*100}%, ${Cl(this.l)*100}%${e===1?")":`, ${e})`}`}}));function CS(e){return e=(e||0)%360,e<0?e+360:e}function Cl(e){return Math.max(0,Math.min(1,e||0))}function Pp(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 ug=e=>()=>e;function GG(e,t){return function(r){return e+r*t}}function YG(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 qG(e){return(e=+e)==1?LM:function(t,r){return r-t?YG(t,r,e):ug(isNaN(t)?r:t)}}function LM(e,t){var r=t-e;return r?GG(e,r):ug(isNaN(e)?t:e)}const OS=(function e(t){var r=qG(t);function n(o,i){var a=r((o=im(o)).r,(i=im(i)).r),s=r(o.g,i.g),l=r(o.b,i.b),c=LM(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 XG(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 ZG(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function QG(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]=Bi(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 JG(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function jc(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function eY(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]=Bi(e[o],t[o]):n[o]=t[o];return function(i){for(o in r)n[o]=r[o](i);return n}}var am=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Cp=new RegExp(am.source,"g");function tY(e){return function(){return e}}function rY(e){return function(t){return e(t)+""}}function nY(e,t){var r=am.lastIndex=Cp.lastIndex=0,n,o,i,a=-1,s=[],l=[];for(e=e+"",t=t+"";(n=am.exec(e))&&(o=Cp.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:jc(n,o)})),r=Cp.lastIndex;return r<t.length&&(i=t.slice(r),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?rY(l[0].x):tY(t):(t=l.length,function(c){for(var u=0,d;u<t;++u)s[(d=l[u]).i]=d.x(c);return s.join("")})}function Bi(e,t){var r=typeof t,n;return t==null||r==="boolean"?ug(t):(r==="number"?jc:r==="string"?(n=Ba(t))?(t=n,OS):nY:t instanceof Ba?OS:t instanceof Date?JG:ZG(t)?XG:Array.isArray(t)?QG:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?eY:jc)(e,t)}function dg(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function oY(e,t){t===void 0&&(t=e,e=Bi);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 iY(e){return function(){return e}}function Ic(e){return+e}var ES=[0,1];function _t(e){return e}function sm(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:iY(isNaN(t)?NaN:.5)}function aY(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function sY(e,t,r){var n=e[0],o=e[1],i=t[0],a=t[1];return o<n?(n=sm(o,n),i=r(a,i)):(n=sm(n,o),i=r(i,a)),function(s){return i(n(s))}}function lY(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]=sm(e[a],e[a+1]),i[a]=r(t[a],t[a+1]);return function(s){var l=xs(e,s,1,n)-1;return i[l](o[l](s))}}function Ss(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Zu(){var e=ES,t=ES,r=Bi,n,o,i,a=_t,s,l,c;function u(){var f=Math.min(e.length,t.length);return a!==_t&&(a=aY(e[0],e[f-1])),s=f>2?lY:sY,l=c=null,d}function d(f){return f==null||isNaN(f=+f)?i:(l||(l=s(e.map(n),t,r)))(n(a(f)))}return d.invert=function(f){return a(o((c||(c=s(t,e.map(n),jc)))(f)))},d.domain=function(f){return arguments.length?(e=Array.from(f,Ic),u()):e.slice()},d.range=function(f){return arguments.length?(t=Array.from(f),u()):t.slice()},d.rangeRound=function(f){return t=Array.from(f),r=dg,u()},d.clamp=function(f){return arguments.length?(a=f?!0:_t,u()):a!==_t},d.interpolate=function(f){return arguments.length?(r=f,u()):r},d.unknown=function(f){return arguments.length?(i=f,d):i},function(f,h){return n=f,o=h,u()}}function fg(){return Zu()(_t,_t)}function cY(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Rc(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 Ti(e){return e=Rc(Math.abs(e)),e?e[1]:NaN}function uY(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 dY(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var fY=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Wa(e){if(!(t=fY.exec(e)))throw new Error("invalid format: "+e);var t;return new pg({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]})}Wa.prototype=pg.prototype;function pg(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+""}pg.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 pY(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 Lc;function hY(e,t){var r=Rc(e,t);if(!r)return Lc=void 0,e.toPrecision(t);var n=r[0],o=r[1],i=o-(Lc=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")+Rc(e,Math.max(0,t+i-1))[0]}function AS(e,t){var r=Rc(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 TS={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:cY,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)=>AS(e*100,t),r:AS,s:hY,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function MS(e){return e}var kS=Array.prototype.map,DS=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function mY(e){var t=e.grouping===void 0||e.thousands===void 0?MS:uY(kS.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?MS:dY(kS.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(d,f){d=Wa(d);var h=d.fill,v=d.align,m=d.sign,g=d.symbol,y=d.zero,x=d.width,w=d.comma,S=d.precision,P=d.trim,C=d.type;C==="n"?(w=!0,C="g"):TS[C]||(S===void 0&&(S=12),P=!0,C="g"),(y||h==="0"&&v==="=")&&(y=!0,h="0",v="=");var E=(f&&f.prefix!==void 0?f.prefix:"")+(g==="$"?r:g==="#"&&/[boxX]/.test(C)?"0"+C.toLowerCase():""),A=(g==="$"?n:/[%p]/.test(C)?a:"")+(f&&f.suffix!==void 0?f.suffix:""),T=TS[C],M=/[defgprs%]/.test(C);S=S===void 0?6:/[gprs]/.test(C)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function _(k){var N=E,R=A,z,B,F;if(C==="c")R=T(k)+R,k="";else{k=+k;var j=k<0||1/k<0;if(k=isNaN(k)?l:T(Math.abs(k),S),P&&(k=pY(k)),j&&+k==0&&m!=="+"&&(j=!1),N=(j?m==="("?m:s:m==="-"||m==="("?"":m)+N,R=(C==="s"&&!isNaN(k)&&Lc!==void 0?DS[8+Lc/3]:"")+R+(j&&m==="("?")":""),M){for(z=-1,B=k.length;++z<B;)if(F=k.charCodeAt(z),48>F||F>57){R=(F===46?o+k.slice(z+1):k.slice(z))+R,k=k.slice(0,z);break}}}w&&!y&&(k=t(k,1/0));var L=N.length+k.length+R.length,H=L<x?new Array(x-L+1).join(h):"";switch(w&&y&&(k=t(H+k,H.length?x-R.length:1/0),H=""),v){case"<":k=N+k+R+H;break;case"=":k=N+H+k+R;break;case"^":k=H.slice(0,L=H.length>>1)+N+k+R+H.slice(L);break;default:k=H+N+k+R;break}return i(k)}return _.toString=function(){return d+""},_}function u(d,f){var h=Math.max(-8,Math.min(8,Math.floor(Ti(f)/3)))*3,v=Math.pow(10,-h),m=c((d=Wa(d),d.type="f",d),{suffix:DS[8+h/3]});return function(g){return m(v*g)}}return{format:c,formatPrefix:u}}var Ol,hg,$M;vY({thousands:",",grouping:[3],currency:["$",""]});function vY(e){return Ol=mY(e),hg=Ol.format,$M=Ol.formatPrefix,Ol}function gY(e){return Math.max(0,-Ti(Math.abs(e)))}function yY(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ti(t)/3)))*3-Ti(Math.abs(e)))}function bY(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Ti(t)-Ti(e))+1}function VM(e,t,r,n){var o=nm(e,t,r),i;switch(n=Wa(n??",f"),n.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(i=yY(o,a))&&(n.precision=i),$M(n,a)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(i=bY(o,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=i-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(i=gY(o))&&(n.precision=i-(n.type==="%")*2);break}}return hg(n)}function Yn(e){var t=e.domain;return e.ticks=function(r){var n=t();return tm(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var o=t();return VM(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=rm(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 FM(){var e=fg();return e.copy=function(){return Ss(e,FM())},fr.apply(e,arguments),Yn(e)}function BM(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,Ic),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return BM(e).unknown(t)},e=arguments.length?Array.from(e,Ic):[0,1],Yn(r)}function WM(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 _S(e){return Math.log(e)}function NS(e){return Math.exp(e)}function xY(e){return-Math.log(-e)}function wY(e){return-Math.exp(-e)}function SY(e){return isFinite(e)?+("1e"+e):e<0?0:e}function PY(e){return e===10?SY:e===Math.E?Math.exp:t=>Math.pow(e,t)}function CY(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 jS(e){return(t,r)=>-e(-t,r)}function mg(e){const t=e(_S,NS),r=t.domain;let n=10,o,i;function a(){return o=CY(n),i=PY(n),r()[0]<0?(o=jS(o),i=jS(i),e(xY,wY)):e(_S,NS),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 d=u<c;d&&([c,u]=[u,c]);let f=o(c),h=o(u),v,m;const g=s==null?10:+s;let y=[];if(!(n%1)&&h-f<g){if(f=Math.floor(f),h=Math.ceil(h),c>0){for(;f<=h;++f)for(v=1;v<n;++v)if(m=f<0?v/i(-f):v*i(f),!(m<c)){if(m>u)break;y.push(m)}}else for(;f<=h;++f)for(v=n-1;v>=1;--v)if(m=f>0?v/i(-f):v*i(f),!(m<c)){if(m>u)break;y.push(m)}y.length*2<g&&(y=tm(c,u,g))}else y=tm(f,h,Math.min(h-f,g)).map(i);return d?y.reverse():y},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=Wa(l)).precision==null&&(l.trim=!0),l=hg(l)),s===1/0)return l;const c=Math.max(1,n*s/t.ticks().length);return u=>{let d=u/i(Math.round(o(u)));return d*n<n-.5&&(d*=n),d<=c?l(u):""}},t.nice=()=>r(WM(r(),{floor:s=>i(Math.floor(o(s))),ceil:s=>i(Math.ceil(o(s)))})),t}function zM(){const e=mg(Zu()).domain([1,10]);return e.copy=()=>Ss(e,zM()).base(e.base()),fr.apply(e,arguments),e}function IS(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function RS(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function vg(e){var t=1,r=e(IS(t),RS(t));return r.constant=function(n){return arguments.length?e(IS(t=+n),RS(t)):t},Yn(r)}function KM(){var e=vg(Zu());return e.copy=function(){return Ss(e,KM()).constant(e.constant())},fr.apply(e,arguments)}function LS(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function OY(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function EY(e){return e<0?-e*e:e*e}function gg(e){var t=e(_t,_t),r=1;function n(){return r===1?e(_t,_t):r===.5?e(OY,EY):e(LS(r),LS(1/r))}return t.exponent=function(o){return arguments.length?(r=+o,n()):r},Yn(t)}function yg(){var e=gg(Zu());return e.copy=function(){return Ss(e,yg()).exponent(e.exponent())},fr.apply(e,arguments),e}function AY(){return yg.apply(null,arguments).exponent(.5)}function $S(e){return Math.sign(e)*e*e}function TY(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function UM(){var e=fg(),t=[0,1],r=!1,n;function o(i){var a=TY(e(i));return isNaN(a)?n:r?Math.round(a):a}return o.invert=function(i){return e.invert($S(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,Ic)).map($S)),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 UM(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},fr.apply(o,arguments),Yn(o)}function HM(){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]=_G(e,a/s);return i}function i(a){return a==null||isNaN(a=+a)?n:t[xs(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(In),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 HM().domain(e).range(t).unknown(n)},fr.apply(i,arguments)}function GM(){var e=0,t=1,r=1,n=[.5],o=[0,1],i;function a(l){return l!=null&&l<=l?o[xs(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 GM().domain([e,t]).range(o).unknown(i)},fr.apply(Yn(a),arguments)}function YM(){var e=[.5],t=[0,1],r,n=1;function o(i){return i!=null&&i<=i?t[xs(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 YM().domain(e).range(t).unknown(r)},fr.apply(o,arguments)}const Op=new Date,Ep=new Date;function st(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=>st(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)=>(Op.setTime(+i),Ep.setTime(+a),e(Op),e(Ep),Math.floor(r(Op,Ep))),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 $c=st(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);$c.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?st(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):$c);$c.range;const Qr=1e3,ir=Qr*60,Jr=ir*60,an=Jr*24,bg=an*7,VS=an*30,Ap=an*365,vo=st(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Qr)},(e,t)=>(t-e)/Qr,e=>e.getUTCSeconds());vo.range;const xg=st(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Qr)},(e,t)=>{e.setTime(+e+t*ir)},(e,t)=>(t-e)/ir,e=>e.getMinutes());xg.range;const wg=st(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*ir)},(e,t)=>(t-e)/ir,e=>e.getUTCMinutes());wg.range;const Sg=st(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Qr-e.getMinutes()*ir)},(e,t)=>{e.setTime(+e+t*Jr)},(e,t)=>(t-e)/Jr,e=>e.getHours());Sg.range;const Pg=st(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Jr)},(e,t)=>(t-e)/Jr,e=>e.getUTCHours());Pg.range;const Ps=st(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ir)/an,e=>e.getDate()-1);Ps.range;const Qu=st(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/an,e=>e.getUTCDate()-1);Qu.range;const qM=st(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/an,e=>Math.floor(e/an));qM.range;function Ko(e){return st(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())*ir)/bg)}const Ju=Ko(0),Vc=Ko(1),MY=Ko(2),kY=Ko(3),Mi=Ko(4),DY=Ko(5),_Y=Ko(6);Ju.range;Vc.range;MY.range;kY.range;Mi.range;DY.range;_Y.range;function Uo(e){return st(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)/bg)}const ed=Uo(0),Fc=Uo(1),NY=Uo(2),jY=Uo(3),ki=Uo(4),IY=Uo(5),RY=Uo(6);ed.range;Fc.range;NY.range;jY.range;ki.range;IY.range;RY.range;const Cg=st(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());Cg.range;const Og=st(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());Og.range;const sn=st(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());sn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:st(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)});sn.range;const ln=st(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());ln.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:st(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)});ln.range;function XM(e,t,r,n,o,i){const a=[[vo,1,Qr],[vo,5,5*Qr],[vo,15,15*Qr],[vo,30,30*Qr],[i,1,ir],[i,5,5*ir],[i,15,15*ir],[i,30,30*ir],[o,1,Jr],[o,3,3*Jr],[o,6,6*Jr],[o,12,12*Jr],[n,1,an],[n,2,2*an],[r,1,bg],[t,1,VS],[t,3,3*VS],[e,1,Ap]];function s(c,u,d){const f=u<c;f&&([c,u]=[u,c]);const h=d&&typeof d.range=="function"?d:l(c,u,d),v=h?h.range(c,+u+1):[];return f?v.reverse():v}function l(c,u,d){const f=Math.abs(u-c)/d,h=ag(([,,g])=>g).right(a,f);if(h===a.length)return e.every(nm(c/Ap,u/Ap,d));if(h===0)return $c.every(Math.max(nm(c,u,d),1));const[v,m]=a[f/a[h-1][2]<a[h][2]/f?h-1:h];return v.every(m)}return[s,l]}const[LY,$Y]=XM(ln,Og,ed,qM,Pg,wg),[VY,FY]=XM(sn,Cg,Ju,Ps,Sg,xg);function Tp(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 Mp(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 da(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function BY(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=fa(o),u=pa(o),d=fa(i),f=pa(i),h=fa(a),v=pa(a),m=fa(s),g=pa(s),y=fa(l),x=pa(l),w={a:F,A:j,b:L,B:H,c:null,d:US,e:US,f:u8,g:x8,G:S8,H:s8,I:l8,j:c8,L:ZM,m:d8,M:f8,p:re,q:le,Q:YS,s:qS,S:p8,u:h8,U:m8,V:v8,w:g8,W:y8,x:null,X:null,y:b8,Y:w8,Z:P8,"%":GS},S={a:ae,A:oe,b:Se,B:Me,c:null,d:HS,e:HS,f:A8,g:L8,G:V8,H:C8,I:O8,j:E8,L:JM,m:T8,M:M8,p:K,q:fe,Q:YS,s:qS,S:k8,u:D8,U:_8,V:N8,w:j8,W:I8,x:null,X:null,y:R8,Y:$8,Z:F8,"%":GS},P={a:M,A:_,b:k,B:N,c:R,d:zS,e:zS,f:n8,g:WS,G:BS,H:KS,I:KS,j:JY,L:r8,m:QY,M:e8,p:T,q:ZY,Q:i8,s:a8,S:t8,u:HY,U:GY,V:YY,w:UY,W:qY,x:z,X:B,y:WS,Y:BS,Z:XY,"%":o8};w.x=C(r,w),w.X=C(n,w),w.c=C(t,w),S.x=C(r,S),S.X=C(n,S),S.c=C(t,S);function C($,G){return function(W){var V=[],he=-1,ue=0,Ye=$.length,tt,zt,el;for(W instanceof Date||(W=new Date(+W));++he<Ye;)$.charCodeAt(he)===37&&(V.push($.slice(ue,he)),(zt=FS[tt=$.charAt(++he)])!=null?tt=$.charAt(++he):zt=tt==="e"?" ":"0",(el=G[tt])&&(tt=el(W,zt)),V.push(tt),ue=he+1);return V.push($.slice(ue,he)),V.join("")}}function E($,G){return function(W){var V=da(1900,void 0,1),he=A(V,$,W+="",0),ue,Ye;if(he!=W.length)return null;if("Q"in V)return new Date(V.Q);if("s"in V)return new Date(V.s*1e3+("L"in V?V.L:0));if(G&&!("Z"in V)&&(V.Z=0),"p"in V&&(V.H=V.H%12+V.p*12),V.m===void 0&&(V.m="q"in V?V.q:0),"V"in V){if(V.V<1||V.V>53)return null;"w"in V||(V.w=1),"Z"in V?(ue=Mp(da(V.y,0,1)),Ye=ue.getUTCDay(),ue=Ye>4||Ye===0?Fc.ceil(ue):Fc(ue),ue=Qu.offset(ue,(V.V-1)*7),V.y=ue.getUTCFullYear(),V.m=ue.getUTCMonth(),V.d=ue.getUTCDate()+(V.w+6)%7):(ue=Tp(da(V.y,0,1)),Ye=ue.getDay(),ue=Ye>4||Ye===0?Vc.ceil(ue):Vc(ue),ue=Ps.offset(ue,(V.V-1)*7),V.y=ue.getFullYear(),V.m=ue.getMonth(),V.d=ue.getDate()+(V.w+6)%7)}else("W"in V||"U"in V)&&("w"in V||(V.w="u"in V?V.u%7:"W"in V?1:0),Ye="Z"in V?Mp(da(V.y,0,1)).getUTCDay():Tp(da(V.y,0,1)).getDay(),V.m=0,V.d="W"in V?(V.w+6)%7+V.W*7-(Ye+5)%7:V.w+V.U*7-(Ye+6)%7);return"Z"in V?(V.H+=V.Z/100|0,V.M+=V.Z%100,Mp(V)):Tp(V)}}function A($,G,W,V){for(var he=0,ue=G.length,Ye=W.length,tt,zt;he<ue;){if(V>=Ye)return-1;if(tt=G.charCodeAt(he++),tt===37){if(tt=G.charAt(he++),zt=P[tt in FS?G.charAt(he++):tt],!zt||(V=zt($,W,V))<0)return-1}else if(tt!=W.charCodeAt(V++))return-1}return V}function T($,G,W){var V=c.exec(G.slice(W));return V?($.p=u.get(V[0].toLowerCase()),W+V[0].length):-1}function M($,G,W){var V=h.exec(G.slice(W));return V?($.w=v.get(V[0].toLowerCase()),W+V[0].length):-1}function _($,G,W){var V=d.exec(G.slice(W));return V?($.w=f.get(V[0].toLowerCase()),W+V[0].length):-1}function k($,G,W){var V=y.exec(G.slice(W));return V?($.m=x.get(V[0].toLowerCase()),W+V[0].length):-1}function N($,G,W){var V=m.exec(G.slice(W));return V?($.m=g.get(V[0].toLowerCase()),W+V[0].length):-1}function R($,G,W){return A($,t,G,W)}function z($,G,W){return A($,r,G,W)}function B($,G,W){return A($,n,G,W)}function F($){return a[$.getDay()]}function j($){return i[$.getDay()]}function L($){return l[$.getMonth()]}function H($){return s[$.getMonth()]}function re($){return o[+($.getHours()>=12)]}function le($){return 1+~~($.getMonth()/3)}function ae($){return a[$.getUTCDay()]}function oe($){return i[$.getUTCDay()]}function Se($){return l[$.getUTCMonth()]}function Me($){return s[$.getUTCMonth()]}function K($){return o[+($.getUTCHours()>=12)]}function fe($){return 1+~~($.getUTCMonth()/3)}return{format:function($){var G=C($+="",w);return G.toString=function(){return $},G},parse:function($){var G=E($+="",!1);return G.toString=function(){return $},G},utcFormat:function($){var G=C($+="",S);return G.toString=function(){return $},G},utcParse:function($){var G=E($+="",!0);return G.toString=function(){return $},G}}}var FS={"-":"",_:" ",0:"0"},mt=/^\s*\d+/,WY=/^%/,zY=/[\\^$*+?|[\]().{}]/g;function ge(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 KY(e){return e.replace(zY,"\\$&")}function fa(e){return new RegExp("^(?:"+e.map(KY).join("|")+")","i")}function pa(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function UY(e,t,r){var n=mt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function HY(e,t,r){var n=mt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function GY(e,t,r){var n=mt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function YY(e,t,r){var n=mt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function qY(e,t,r){var n=mt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function BS(e,t,r){var n=mt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function WS(e,t,r){var n=mt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function XY(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 ZY(e,t,r){var n=mt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function QY(e,t,r){var n=mt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function zS(e,t,r){var n=mt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function JY(e,t,r){var n=mt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function KS(e,t,r){var n=mt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function e8(e,t,r){var n=mt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function t8(e,t,r){var n=mt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function r8(e,t,r){var n=mt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function n8(e,t,r){var n=mt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function o8(e,t,r){var n=WY.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function i8(e,t,r){var n=mt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function a8(e,t,r){var n=mt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function US(e,t){return ge(e.getDate(),t,2)}function s8(e,t){return ge(e.getHours(),t,2)}function l8(e,t){return ge(e.getHours()%12||12,t,2)}function c8(e,t){return ge(1+Ps.count(sn(e),e),t,3)}function ZM(e,t){return ge(e.getMilliseconds(),t,3)}function u8(e,t){return ZM(e,t)+"000"}function d8(e,t){return ge(e.getMonth()+1,t,2)}function f8(e,t){return ge(e.getMinutes(),t,2)}function p8(e,t){return ge(e.getSeconds(),t,2)}function h8(e){var t=e.getDay();return t===0?7:t}function m8(e,t){return ge(Ju.count(sn(e)-1,e),t,2)}function QM(e){var t=e.getDay();return t>=4||t===0?Mi(e):Mi.ceil(e)}function v8(e,t){return e=QM(e),ge(Mi.count(sn(e),e)+(sn(e).getDay()===4),t,2)}function g8(e){return e.getDay()}function y8(e,t){return ge(Vc.count(sn(e)-1,e),t,2)}function b8(e,t){return ge(e.getFullYear()%100,t,2)}function x8(e,t){return e=QM(e),ge(e.getFullYear()%100,t,2)}function w8(e,t){return ge(e.getFullYear()%1e4,t,4)}function S8(e,t){var r=e.getDay();return e=r>=4||r===0?Mi(e):Mi.ceil(e),ge(e.getFullYear()%1e4,t,4)}function P8(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ge(t/60|0,"0",2)+ge(t%60,"0",2)}function HS(e,t){return ge(e.getUTCDate(),t,2)}function C8(e,t){return ge(e.getUTCHours(),t,2)}function O8(e,t){return ge(e.getUTCHours()%12||12,t,2)}function E8(e,t){return ge(1+Qu.count(ln(e),e),t,3)}function JM(e,t){return ge(e.getUTCMilliseconds(),t,3)}function A8(e,t){return JM(e,t)+"000"}function T8(e,t){return ge(e.getUTCMonth()+1,t,2)}function M8(e,t){return ge(e.getUTCMinutes(),t,2)}function k8(e,t){return ge(e.getUTCSeconds(),t,2)}function D8(e){var t=e.getUTCDay();return t===0?7:t}function _8(e,t){return ge(ed.count(ln(e)-1,e),t,2)}function ek(e){var t=e.getUTCDay();return t>=4||t===0?ki(e):ki.ceil(e)}function N8(e,t){return e=ek(e),ge(ki.count(ln(e),e)+(ln(e).getUTCDay()===4),t,2)}function j8(e){return e.getUTCDay()}function I8(e,t){return ge(Fc.count(ln(e)-1,e),t,2)}function R8(e,t){return ge(e.getUTCFullYear()%100,t,2)}function L8(e,t){return e=ek(e),ge(e.getUTCFullYear()%100,t,2)}function $8(e,t){return ge(e.getUTCFullYear()%1e4,t,4)}function V8(e,t){var r=e.getUTCDay();return e=r>=4||r===0?ki(e):ki.ceil(e),ge(e.getUTCFullYear()%1e4,t,4)}function F8(){return"+0000"}function GS(){return"%"}function YS(e){return+e}function qS(e){return Math.floor(+e/1e3)}var ri,tk,rk;B8({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 B8(e){return ri=BY(e),tk=ri.format,ri.parse,rk=ri.utcFormat,ri.utcParse,ri}function W8(e){return new Date(e)}function z8(e){return e instanceof Date?+e:+new Date(+e)}function Eg(e,t,r,n,o,i,a,s,l,c){var u=fg(),d=u.invert,f=u.domain,h=c(".%L"),v=c(":%S"),m=c("%I:%M"),g=c("%I %p"),y=c("%a %d"),x=c("%b %d"),w=c("%B"),S=c("%Y");function P(C){return(l(C)<C?h:s(C)<C?v:a(C)<C?m:i(C)<C?g:n(C)<C?o(C)<C?y:x:r(C)<C?w:S)(C)}return u.invert=function(C){return new Date(d(C))},u.domain=function(C){return arguments.length?f(Array.from(C,z8)):f().map(W8)},u.ticks=function(C){var E=f();return e(E[0],E[E.length-1],C??10)},u.tickFormat=function(C,E){return E==null?P:c(E)},u.nice=function(C){var E=f();return(!C||typeof C.range!="function")&&(C=t(E[0],E[E.length-1],C??10)),C?f(WM(E,C)):u},u.copy=function(){return Ss(u,Eg(e,t,r,n,o,i,a,s,l,c))},u}function K8(){return fr.apply(Eg(VY,FY,sn,Cg,Ju,Ps,Sg,xg,vo,tk).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function U8(){return fr.apply(Eg(LY,$Y,ln,Og,ed,Qu,Pg,wg,vo,rk).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function td(){var e=0,t=1,r,n,o,i,a=_t,s=!1,l;function c(d){return d==null||isNaN(d=+d)?l:a(o===0?.5:(d=(i(d)-r)*o,s?Math.max(0,Math.min(1,d)):d))}c.domain=function(d){return arguments.length?([e,t]=d,r=i(e=+e),n=i(t=+t),o=r===n?0:1/(n-r),c):[e,t]},c.clamp=function(d){return arguments.length?(s=!!d,c):s},c.interpolator=function(d){return arguments.length?(a=d,c):a};function u(d){return function(f){var h,v;return arguments.length?([h,v]=f,a=d(h,v),c):[a(0),a(1)]}}return c.range=u(Bi),c.rangeRound=u(dg),c.unknown=function(d){return arguments.length?(l=d,c):l},function(d){return i=d,r=d(e),n=d(t),o=r===n?0:1/(n-r),c}}function qn(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function nk(){var e=Yn(td()(_t));return e.copy=function(){return qn(e,nk())},xn.apply(e,arguments)}function ok(){var e=mg(td()).domain([1,10]);return e.copy=function(){return qn(e,ok()).base(e.base())},xn.apply(e,arguments)}function ik(){var e=vg(td());return e.copy=function(){return qn(e,ik()).constant(e.constant())},xn.apply(e,arguments)}function Ag(){var e=gg(td());return e.copy=function(){return qn(e,Ag()).exponent(e.exponent())},xn.apply(e,arguments)}function H8(){return Ag.apply(null,arguments).exponent(.5)}function ak(){var e=[],t=_t;function r(n){if(n!=null&&!isNaN(n=+n))return t((xs(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(In),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)=>DG(e,i/n))},r.copy=function(){return ak(t).domain(e)},xn.apply(r,arguments)}function rd(){var e=0,t=.5,r=1,n=1,o,i,a,s,l,c=_t,u,d=!1,f;function h(m){return isNaN(m=+m)?f:(m=.5+((m=+u(m))-i)*(n*m<n*i?s:l),c(d?Math.max(0,Math.min(1,m)):m))}h.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,h):[e,t,r]},h.clamp=function(m){return arguments.length?(d=!!m,h):d},h.interpolator=function(m){return arguments.length?(c=m,h):c};function v(m){return function(g){var y,x,w;return arguments.length?([y,x,w]=g,c=oY(m,[y,x,w]),h):[c(0),c(.5),c(1)]}}return h.range=v(Bi),h.rangeRound=v(dg),h.unknown=function(m){return arguments.length?(f=m,h):f},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,h}}function sk(){var e=Yn(rd()(_t));return e.copy=function(){return qn(e,sk())},xn.apply(e,arguments)}function lk(){var e=mg(rd()).domain([.1,1,10]);return e.copy=function(){return qn(e,lk()).base(e.base())},xn.apply(e,arguments)}function ck(){var e=vg(rd());return e.copy=function(){return qn(e,ck()).constant(e.constant())},xn.apply(e,arguments)}function Tg(){var e=gg(rd());return e.copy=function(){return qn(e,Tg()).exponent(e.exponent())},xn.apply(e,arguments)}function G8(){return Tg.apply(null,arguments).exponent(.5)}const xa=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:lg,scaleDiverging:sk,scaleDivergingLog:lk,scaleDivergingPow:Tg,scaleDivergingSqrt:G8,scaleDivergingSymlog:ck,scaleIdentity:BM,scaleImplicit:om,scaleLinear:FM,scaleLog:zM,scaleOrdinal:sg,scalePoint:jG,scalePow:yg,scaleQuantile:HM,scaleQuantize:GM,scaleRadial:UM,scaleSequential:nk,scaleSequentialLog:ok,scaleSequentialPow:Ag,scaleSequentialQuantile:ak,scaleSequentialSqrt:H8,scaleSequentialSymlog:ik,scaleSqrt:AY,scaleSymlog:KM,scaleThreshold:YM,scaleTime:K8,scaleUtc:U8,tickFormat:VM},Symbol.toStringTag,{value:"Module"}));var wn=e=>e.chartData,nd=I([wn],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),Mg=(e,t,r,n)=>n?nd(e):wn(e),Y8=(e,t,r)=>r?nd(e):wn(e);function cn(e){if(Array.isArray(e)&&e.length===2){var[t,r]=e;if(pe(t)&&pe(r))return!0}return!1}function XS(e,t,r){return r?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function uk(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[r,n]=e,o,i;if(pe(r))o=r;else if(typeof r=="function")return;if(pe(n))i=n;else if(typeof n=="function")return;var a=[o,i];if(cn(a))return a}}function q8(e,t,r){if(!(!r&&t==null)){if(typeof e=="function"&&t!=null)try{var n=e(t,r);if(cn(n))return XS(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(Y(o))a=o;else if(typeof o=="function")try{t!=null&&(a=o(t?.[0]))}catch{}else if(typeof o=="string"&&a0.test(o)){var l=a0.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(Y(i))s=i;else if(typeof i=="function")try{t!=null&&(s=i(t?.[1]))}catch{}else if(typeof i=="string"&&s0.test(i)){var u=s0.exec(i);if(u==null||u[1]==null||t==null)s=void 0;else{var d=+u[1];s=t[1]+d}}else s=t?.[1];var f=[a,s];if(cn(f))return t==null?f:XS(f,t,r)}}}var Wi=1e9,X8={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Dg,$e=!0,dr="[DecimalError] ",Oo=dr+"Invalid argument: ",kg=dr+"Exponent out of range: ",zi=Math.floor,co=Math.pow,Z8=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Yt,dt=1e7,je=7,dk=9007199254740991,Bc=zi(dk/je),q={};q.absoluteValue=q.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};q.comparedTo=q.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};q.decimalPlaces=q.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*je;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};q.dividedBy=q.div=function(e){return rn(this,new this.constructor(e))};q.dividedToIntegerBy=q.idiv=function(e){var t=this,r=t.constructor;return ke(rn(t,new r(e),0,1),r.precision)};q.equals=q.eq=function(e){return!this.cmp(e)};q.exponent=function(){return Qe(this)};q.greaterThan=q.gt=function(e){return this.cmp(e)>0};q.greaterThanOrEqualTo=q.gte=function(e){return this.cmp(e)>=0};q.isInteger=q.isint=function(){return this.e>this.d.length-2};q.isNegative=q.isneg=function(){return this.s<0};q.isPositive=q.ispos=function(){return this.s>0};q.isZero=function(){return this.s===0};q.lessThan=q.lt=function(e){return this.cmp(e)<0};q.lessThanOrEqualTo=q.lte=function(e){return this.cmp(e)<1};q.logarithm=q.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(Yt))throw Error(dr+"NaN");if(r.s<1)throw Error(dr+(r.s?"NaN":"-Infinity"));return r.eq(Yt)?new n(0):($e=!1,t=rn(za(r,i),za(e,i),i),$e=!0,ke(t,o))};q.minus=q.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?hk(t,e):fk(t,(e.s=-e.s,e))};q.modulo=q.mod=function(e){var t,r=this,n=r.constructor,o=n.precision;if(e=new n(e),!e.s)throw Error(dr+"NaN");return r.s?($e=!1,t=rn(r,e,0,1).times(e),$e=!0,r.minus(t)):ke(new n(r),o)};q.naturalExponential=q.exp=function(){return pk(this)};q.naturalLogarithm=q.ln=function(){return za(this)};q.negated=q.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};q.plus=q.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?fk(t,e):hk(t,(e.s=-e.s,e))};q.precision=q.sd=function(e){var t,r,n,o=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Oo+e);if(t=Qe(o)+1,n=o.d.length-1,r=n*je+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};q.squareRoot=q.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(dr+"NaN")}for(e=Qe(s),$e=!1,o=Math.sqrt(+s),o==0||o==1/0?(t=jr(s.d),(t.length+e)%2==0&&(t+="0"),o=Math.sqrt(t),e=zi((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(rn(s,i,a+2)).times(.5),jr(i.d).slice(0,a)===(t=jr(n.d)).slice(0,a)){if(t=t.slice(a-3,a+1),o==a&&t=="4999"){if(ke(i,r+1,0),i.times(i).eq(s)){n=i;break}}else if(t!="9999")break;a+=4}return $e=!0,ke(n,r)};q.times=q.mul=function(e){var t,r,n,o,i,a,s,l,c,u=this,d=u.constructor,f=u.d,h=(e=new d(e)).d;if(!u.s||!e.s)return new d(0);for(e.s*=u.s,r=u.e+e.e,l=f.length,c=h.length,l<c&&(i=f,f=h,h=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]+h[n]*f[o-n-1]+t,i[o--]=s%dt|0,t=s/dt|0;i[o]=(i[o]+t)%dt|0}for(;!i[--a];)i.pop();return t?++r:i.shift(),e.d=i,e.e=r,$e?ke(e,d.precision):e};q.toDecimalPlaces=q.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(zr(e,0,Wi),t===void 0?t=n.rounding:zr(t,0,8),ke(r,e+Qe(r)+1,t))};q.toExponential=function(e,t){var r,n=this,o=n.constructor;return e===void 0?r=Io(n,!0):(zr(e,0,Wi),t===void 0?t=o.rounding:zr(t,0,8),n=ke(new o(n),e+1,t),r=Io(n,!0,e+1)),r};q.toFixed=function(e,t){var r,n,o=this,i=o.constructor;return e===void 0?Io(o):(zr(e,0,Wi),t===void 0?t=i.rounding:zr(t,0,8),n=ke(new i(o),e+Qe(o)+1,t),r=Io(n.abs(),!1,e+Qe(n)+1),o.isneg()&&!o.isZero()?"-"+r:r)};q.toInteger=q.toint=function(){var e=this,t=e.constructor;return ke(new t(e),Qe(e)+1,t.rounding)};q.toNumber=function(){return+this};q.toPower=q.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(Yt);if(s=new l(s),!s.s){if(e.s<1)throw Error(dr+"Infinity");return s}if(s.eq(Yt))return s;if(n=l.precision,e.eq(Yt))return ke(s,n);if(t=e.e,r=e.d.length-1,a=t>=r,i=s.s,a){if((r=u<0?-u:u)<=dk){for(o=new l(Yt),t=Math.ceil(n/je+4),$e=!1;r%2&&(o=o.times(s),QS(o.d,t)),r=zi(r/2),r!==0;)s=s.times(s),QS(s.d,t);return $e=!0,e.s<0?new l(Yt).div(o):ke(o,n)}}else if(i<0)throw Error(dr+"NaN");return i=i<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,$e=!1,o=e.times(za(s,n+c)),$e=!0,o=pk(o),o.s=i,o};q.toPrecision=function(e,t){var r,n,o=this,i=o.constructor;return e===void 0?(r=Qe(o),n=Io(o,r<=i.toExpNeg||r>=i.toExpPos)):(zr(e,1,Wi),t===void 0?t=i.rounding:zr(t,0,8),o=ke(new i(o),e,t),r=Qe(o),n=Io(o,e<=r||r<=i.toExpNeg,e)),n};q.toSignificantDigits=q.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(zr(e,1,Wi),t===void 0?t=n.rounding:zr(t,0,8)),ke(new n(r),e,t)};q.toString=q.valueOf=q.val=q.toJSON=q[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Qe(e),r=e.constructor;return Io(e,t<=r.toExpNeg||t>=r.toExpPos)};function fk(e,t){var r,n,o,i,a,s,l,c,u=e.constructor,d=u.precision;if(!e.s||!t.s)return t.s||(t=new u(e)),$e?ke(t,d):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(d/je),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)/dt|0,l[i]%=dt;for(r&&(l.unshift(r),++o),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=o,$e?ke(t,d):t}function zr(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Oo+e)}function jr(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=je-n.length,r&&(i+=kn(r)),i+=n;a=e[t],n=a+"",r=je-n.length,r&&(i+=kn(r))}else if(a===0)return"0";for(;a%10===0;)a/=10;return i+a}var rn=(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%dt|0,a=i/dt|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*dt+n[i]-o[i];for(;!n[0]&&n.length>1;)n.shift()}return function(n,o,i,a){var s,l,c,u,d,f,h,v,m,g,y,x,w,S,P,C,E,A,T=n.constructor,M=n.s==o.s?1:-1,_=n.d,k=o.d;if(!n.s)return new T(n);if(!o.s)throw Error(dr+"Division by zero");for(l=n.e-o.e,E=k.length,P=_.length,h=new T(M),v=h.d=[],c=0;k[c]==(_[c]||0);)++c;if(k[c]>(_[c]||0)&&--l,i==null?x=i=T.precision:a?x=i+(Qe(n)-Qe(o))+1:x=i,x<0)return new T(0);if(x=x/je+2|0,c=0,E==1)for(u=0,k=k[0],x++;(c<P||u)&&x--;c++)w=u*dt+(_[c]||0),v[c]=w/k|0,u=w%k|0;else{for(u=dt/(k[0]+1)|0,u>1&&(k=e(k,u),_=e(_,u),E=k.length,P=_.length),S=E,m=_.slice(0,E),g=m.length;g<E;)m[g++]=0;A=k.slice(),A.unshift(0),C=k[0],k[1]>=dt/2&&++C;do u=0,s=t(k,m,E,g),s<0?(y=m[0],E!=g&&(y=y*dt+(m[1]||0)),u=y/C|0,u>1?(u>=dt&&(u=dt-1),d=e(k,u),f=d.length,g=m.length,s=t(d,m,f,g),s==1&&(u--,r(d,E<f?A:k,f))):(u==0&&(s=u=1),d=k.slice()),f=d.length,f<g&&d.unshift(0),r(m,d,g),s==-1&&(g=m.length,s=t(k,m,E,g),s<1&&(u++,r(m,E<g?A:k,g))),g=m.length):s===0&&(u++,m=[0]),v[c++]=u,s&&m[0]?m[g++]=_[S]||0:(m=[_[S]],g=1);while((S++<P||m[0]!==void 0)&&x--)}return v[0]||v.shift(),h.e=l,ke(h,a?i+Qe(h)+1:i)}})();function pk(e,t){var r,n,o,i,a,s,l=0,c=0,u=e.constructor,d=u.precision;if(Qe(e)>16)throw Error(kg+Qe(e));if(!e.s)return new u(Yt);for($e=!1,s=d,a=new u(.03125);e.abs().gte(.1);)e=e.times(a),c+=5;for(n=Math.log(co(2,c))/Math.LN10*2+5|0,s+=n,r=o=i=new u(Yt),u.precision=s;;){if(o=ke(o.times(e),s),r=r.times(++l),a=i.plus(rn(o,r,s)),jr(a.d).slice(0,s)===jr(i.d).slice(0,s)){for(;c--;)i=ke(i.times(i),s);return u.precision=d,t==null?($e=!0,ke(i,d)):i}i=a}}function Qe(e){for(var t=e.e*je,r=e.d[0];r>=10;r/=10)t++;return t}function kp(e,t,r){if(t>e.LN10.sd())throw $e=!0,r&&(e.precision=r),Error(dr+"LN10 precision limit exceeded");return ke(new e(e.LN10),t)}function kn(e){for(var t="";e--;)t+="0";return t}function za(e,t){var r,n,o,i,a,s,l,c,u,d=1,f=10,h=e,v=h.d,m=h.constructor,g=m.precision;if(h.s<1)throw Error(dr+(h.s?"NaN":"-Infinity"));if(h.eq(Yt))return new m(0);if(t==null?($e=!1,c=g):c=t,h.eq(10))return t==null&&($e=!0),kp(m,c);if(c+=f,m.precision=c,r=jr(v),n=r.charAt(0),i=Qe(h),Math.abs(i)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)h=h.times(e),r=jr(h.d),n=r.charAt(0),d++;i=Qe(h),n>1?(h=new m("0."+r),i++):h=new m(n+"."+r.slice(1))}else return l=kp(m,c+2,g).times(i+""),h=za(new m(n+"."+r.slice(1)),c-f).plus(l),m.precision=g,t==null?($e=!0,ke(h,g)):h;for(s=a=h=rn(h.minus(Yt),h.plus(Yt),c),u=ke(h.times(h),c),o=3;;){if(a=ke(a.times(u),c),l=s.plus(rn(a,new m(o),c)),jr(l.d).slice(0,c)===jr(s.d).slice(0,c))return s=s.times(2),i!==0&&(s=s.plus(kp(m,c+2,g).times(i+""))),s=rn(s,new m(d),c),m.precision=g,t==null?($e=!0,ke(s,g)):s;s=l,o+=2}}function ZS(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=zi(r/je),e.d=[],n=(r+1)%je,r<0&&(n+=je),n<o){for(n&&e.d.push(+t.slice(0,n)),o-=je;n<o;)e.d.push(+t.slice(n,n+=je));t=t.slice(n),n=je-t.length}else n-=o;for(;n--;)t+="0";if(e.d.push(+t),$e&&(e.e>Bc||e.e<-Bc))throw Error(kg+r)}else e.s=0,e.e=0,e.d=[0];return e}function ke(e,t,r){var n,o,i,a,s,l,c,u,d=e.d;for(a=1,i=d[0];i>=10;i/=10)a++;if(n=t-a,n<0)n+=je,o=t,c=d[u=0];else{if(u=Math.ceil((n+1)/je),i=d.length,u>=i)return e;for(c=i=d[u],a=1;i>=10;i/=10)a++;n%=je,o=n-je+a}if(r!==void 0&&(i=co(10,a-o-1),s=c/i%10|0,l=t<0||d[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/co(10,a-o):0:d[u-1])%10&1||r==(e.s<0?8:7))),t<1||!d[0])return l?(i=Qe(e),d.length=1,t=t-i-1,d[0]=co(10,(je-t%je)%je),e.e=zi(-t/je)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(n==0?(d.length=u,i=1,u--):(d.length=u+1,i=co(10,je-n),d[u]=o>0?(c/co(10,a-o)%co(10,o)|0)*i:0),l)for(;;)if(u==0){(d[0]+=i)==dt&&(d[0]=1,++e.e);break}else{if(d[u]+=i,d[u]!=dt)break;d[u--]=0,i=1}for(n=d.length;d[--n]===0;)d.pop();if($e&&(e.e>Bc||e.e<-Bc))throw Error(kg+Qe(e));return e}function hk(e,t){var r,n,o,i,a,s,l,c,u,d,f=e.constructor,h=f.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new f(e),$e?ke(t,h):t;if(l=e.d,d=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=d.length):(r=d,n=c,s=l.length),o=Math.max(Math.ceil(h/je),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=d.length,u=o<s,u&&(s=o),o=0;o<s;o++)if(l[o]!=d[o]){u=l[o]<d[o];break}a=0}for(u&&(r=l,l=d,d=r,t.s=-t.s),s=l.length,o=d.length-s;o>0;--o)l[s++]=0;for(o=d.length;o>a;){if(l[--o]<d[o]){for(i=o;i&&l[--i]===0;)l[i]=dt-1;--l[i],l[o]+=dt}l[o]-=d[o]}for(;l[--s]===0;)l.pop();for(;l[0]===0;l.shift())--n;return l[0]?(t.d=l,t.e=n,$e?ke(t,h):t):new f(0)}function Io(e,t,r){var n,o=Qe(e),i=jr(e.d),a=i.length;return t?(r&&(n=r-a)>0?i=i.charAt(0)+"."+i.slice(1)+kn(n):a>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(o<0?"e":"e+")+o):o<0?(i="0."+kn(-o-1)+i,r&&(n=r-a)>0&&(i+=kn(n))):o>=a?(i+=kn(o+1-a),r&&(n=r-o-1)>0&&(i=i+"."+kn(n))):((n=o+1)<a&&(i=i.slice(0,n)+"."+i.slice(n)),r&&(n=r-a)>0&&(o+1===a&&(i+="."),i+=kn(n))),e.s<0?"-"+i:i}function QS(e,t){if(e.length>t)return e.length=t,!0}function mk(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(Oo+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 ZS(a,i.toString())}else if(typeof i!="string")throw Error(Oo+i);if(i.charCodeAt(0)===45?(i=i.slice(1),a.s=-1):a.s=1,Z8.test(i))ZS(a,i);else throw Error(Oo+i)}if(o.prototype=q,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=mk,o.config=o.set=Q8,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 Q8(e){if(!e||typeof e!="object")throw Error(dr+"Object expected");var t,r,n,o=["precision",1,Wi,"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(zi(n)===n&&n>=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(Oo+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Oo+r+": "+n);return this}var Dg=mk(X8);Yt=new Dg(1);const Ce=Dg;function vk(e){var t;return e===0?t=1:t=Math.floor(new Ce(e).abs().log(10).toNumber())+1,t}function gk(e,t,r){for(var n=new Ce(e),o=0,i=[];n.lt(t)&&o<1e5;)i.push(n.toNumber()),n=n.add(r),o++;return i}var yk=e=>{var[t,r]=e,[n,o]=[t,r];return t>r&&([n,o]=[r,t]),[n,o]},bk=(e,t,r)=>{if(e.lte(0))return new Ce(0);var n=vk(e.toNumber()),o=new Ce(10).pow(n),i=e.div(o),a=n!==1?.05:.1,s=new Ce(Math.ceil(i.div(a).toNumber())).add(r).mul(a),l=s.mul(o);return t?new Ce(l.toNumber()):new Ce(Math.ceil(l.toNumber()))},J8=(e,t,r)=>{var n=new Ce(1),o=new Ce(e);if(!o.isint()&&r){var i=Math.abs(e);i<1?(n=new Ce(10).pow(vk(e)-1),o=new Ce(Math.floor(o.div(n).toNumber())).mul(n)):i>1&&(o=new Ce(Math.floor(e)))}else e===0?o=new Ce(Math.floor((t-1)/2)):r||(o=new Ce(Math.floor(e)));for(var a=Math.floor((t-1)/2),s=[],l=0;l<t;l++)s.push(o.add(new Ce(l-a).mul(n)).toNumber());return s},xk=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 Ce(0),tickMin:new Ce(0),tickMax:new Ce(0)};var a=bk(new Ce(r).sub(t).div(n-1),o,i),s;t<=0&&r>=0?s=new Ce(0):(s=new Ce(t).add(r).div(2),s=s.sub(new Ce(s).mod(a)));var l=Math.ceil(s.sub(t).div(a).toNumber()),c=Math.ceil(new Ce(r).sub(s).div(a).toNumber()),u=l+c+1;return u>n?xk(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 Ce(l).mul(a)),tickMax:s.add(new Ce(c).mul(a))})},eq=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]=yk([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 J8(s,o,i);var{step:u,tickMin:d,tickMax:f}=xk(s,l,a,i,0),h=gk(d,f.add(new Ce(.1).mul(u)),u);return r>n?h.reverse():h},tq=function(t,r){var[n,o]=t,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,[a,s]=yk([n,o]);if(a===-1/0||s===1/0)return[n,o];if(a===s)return[a];var l=Math.max(r,2),c=bk(new Ce(s).sub(a).div(l-1),i,0),u=[...gk(new Ce(a),new Ce(s),c),s];return i===!1&&(u=u.map(d=>Math.round(d))),n>o?u.reverse():u},wk=e=>e.rootProps.maxBarSize,rq=e=>e.rootProps.barGap,Sk=e=>e.rootProps.barCategoryGap,nq=e=>e.rootProps.barSize,Cs=e=>e.rootProps.stackOffset,Pk=e=>e.rootProps.reverseStackOrder,_g=e=>e.options.chartName,Ng=e=>e.rootProps.syncId,Ck=e=>e.rootProps.syncMethod,jg=e=>e.options.eventEmitter,Ze={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},oo={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},Ar={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},od=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function id(e,t,r){if(r!=="auto")return r;if(e!=null)return gn(e,t)?"category":"number"}function JS(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 Wc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?JS(Object(r),!0).forEach(function(n){oq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):JS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function oq(e,t,r){return(t=iq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iq(e){var t=aq(e,"string");return typeof t=="symbol"?t:t+""}function aq(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 eP={allowDataOverflow:oo.allowDataOverflow,allowDecimals:oo.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:oo.angleAxisId,includeHidden:!1,name:void 0,reversed:oo.reversed,scale:oo.scale,tick:oo.tick,tickCount:void 0,ticks:void 0,type:oo.type,unit:void 0},tP={allowDataOverflow:Ar.allowDataOverflow,allowDecimals:Ar.allowDecimals,allowDuplicatedCategory:Ar.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Ar.radiusAxisId,includeHidden:Ar.includeHidden,name:void 0,reversed:Ar.reversed,scale:Ar.scale,tick:Ar.tick,tickCount:Ar.tickCount,ticks:void 0,type:Ar.type,unit:void 0},sq=(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},Ig=I([sq,cM],(e,t)=>{var r;if(e!=null)return e;var n=(r=id(t,"angleAxis",eP.type))!==null&&r!==void 0?r:"category";return Wc(Wc({},eP),{},{type:n})}),lq=(e,t)=>e.polarAxis.radiusAxis[t],Rg=I([lq,cM],(e,t)=>{var r;if(e!=null)return e;var n=(r=id(t,"radiusAxis",tP.type))!==null&&r!==void 0?r:"category";return Wc(Wc({},tP),{},{type:n})}),ad=e=>e.polarOptions,Lg=I([yn,bn,at],EM),Ok=I([ad,Lg],(e,t)=>{if(e!=null)return Ot(e.innerRadius,t,0)}),Ek=I([ad,Lg],(e,t)=>{if(e!=null)return Ot(e.outerRadius,t,t*.8)}),cq=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:r}=e;return[t,r]},Ak=I([ad],cq);I([Ig,Ak],od);var Tk=I([Lg,Ok,Ek],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});I([Rg,Tk],od);var Mk=I([ye,ad,Ok,Ek,yn,bn],(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:Ot(a,o,o/2),cy:Ot(s,i,i/2),innerRadius:r,outerRadius:n,startAngle:l,endAngle:c,clockWise:!1}}}),ze=(e,t)=>t,Os=(e,t,r)=>r;function $g(e){return e?.id}function kk(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=$g(s);c.forEach((d,f)=>{var h=i==null||o?f:String(Ae(d,i,null)),v=Ae(d,s.dataKey,0),m;a.has(h)?m=a.get(h):m={},Object.assign(m,{[u]:v}),a.set(h,m)})}}),Array.from(a.values())}function sd(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var ld=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function cd(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function uq(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 vt=e=>{var t=ye(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},Ki=e=>e.tooltip.settings.axisId;function dq(e){if(e in xa)return xa[e]();var t="scale".concat(cs(e));if(t in xa)return xa[t]()}function rP(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 nP(e,t,r){if(typeof e=="function")return rP(e.copy().domain(t).range(r));if(e!=null){var n=dq(e);if(n!=null)return n.domain(t).range(r),rP(n)}}var Dk=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!cn(t)){for(var r,n,o=0;o<t.length;o++){var i=t[o];pe(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 oP(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 zc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?oP(Object(r),!0).forEach(function(n){fq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function fq(e,t,r){return(t=pq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pq(e){var t=hq(e,"string");return typeof t=="symbol"?t:t+""}function hq(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 lm=[0,"auto"],ct={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},_k=(e,t)=>e.cartesianAxis.xAxis[t],Sn=(e,t)=>{var r=_k(e,t);return r??ct},ut={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:lm,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:ms},Nk=(e,t)=>e.cartesianAxis.yAxis[t],Pn=(e,t)=>{var r=Nk(e,t);return r??ut},mq={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:""},Vg=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??mq},Ge=(e,t,r)=>{switch(t){case"xAxis":return Sn(e,r);case"yAxis":return Pn(e,r);case"zAxis":return Vg(e,r);case"angleAxis":return Ig(e,r);case"radiusAxis":return Rg(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},vq=(e,t,r)=>{switch(t){case"xAxis":return Sn(e,r);case"yAxis":return Pn(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},Ui=(e,t,r)=>{switch(t){case"xAxis":return Sn(e,r);case"yAxis":return Pn(e,r);case"angleAxis":return Ig(e,r);case"radiusAxis":return Rg(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},jk=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function Fg(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 ud=e=>e.graphicalItems.cartesianItems,gq=I([ze,Os],Fg),Bg=(e,t,r)=>e.filter(r).filter(n=>t?.includeHidden===!0?!0:!n.hide),Es=I([ud,Ge,gq],Bg,{memoizeOptions:{resultEqualityCheck:cd}}),Ik=I([Es],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(sd)),Rk=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),yq=I([Es],Rk),Wg=e=>e.map(t=>t.data).filter(Boolean).flat(1),bq=I([Es],Wg,{memoizeOptions:{resultEqualityCheck:cd}}),zg=(e,t)=>{var{chartData:r=[],dataStartIndex:n,dataEndIndex:o}=t;return e.length>0?e:r.slice(n,o+1)},Kg=I([bq,Mg],zg),Ug=(e,t,r)=>t?.dataKey!=null?e.map(n=>({value:Ae(n,t.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(o=>({value:Ae(o,n)}))):e.map(n=>({value:n})),dd=I([Kg,Ge,Es],Ug);function Lk(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function Hl(e){if(Br(e)||e instanceof Date){var t=Number(e);if(pe(t))return t}}function iP(e){if(Array.isArray(e)){var t=[Hl(e[0]),Hl(e[1])];return cn(t)?t:void 0}var r=Hl(e);if(r!=null)return[r,r]}function un(e){return e.map(Hl).filter(Vt)}function xq(e,t,r){return!r||typeof t!="number"||Fr(t)?[]:r.length?un(r.flatMap(n=>{var o=Ae(e,n.dataKey),i,a;if(Array.isArray(o)?[i,a]=o:i=a=o,!(!pe(i)||!pe(a)))return[t-i,t+a]})):[]}var lt=e=>{var t=vt(e),r=Ki(e);return Ui(e,t,r)},As=I([lt],e=>e?.dataKey),wq=I([Ik,Mg,lt],kk),$k=(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($g);return[s,{stackedData:FU(e,u,r),graphicalItems:c}]}))},cm=I([wq,Ik,Cs,Pk],$k),Vk=(e,t,r,n)=>{var{dataStartIndex:o,dataEndIndex:i}=t;if(n==null&&r!=="zAxis"){var a=UU(e,o,i);if(!(a!=null&&a[0]===0&&a[1]===0))return a}},Sq=I([Ge],e=>e.allowDataOverflow),Hg=e=>{var t;if(e==null||!("domain"in e))return lm;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var r=un(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:lm},Gg=I([Ge],Hg),Yg=I([Gg,Sq],uk),Pq=I([cm,wn,ze,Yg],Vk,{memoizeOptions:{resultEqualityCheck:ld}}),fd=e=>e.errorBars,Cq=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>Lk(r,n)),Kc=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]}},qg=(e,t,r,n,o)=>{var i,a;if(r.length>0&&e.forEach(s=>{r.forEach(l=>{var c,u,d=(c=n[l.id])===null||c===void 0?void 0:c.filter(y=>Lk(o,y)),f=Ae(s,(u=t.dataKey)!==null&&u!==void 0?u:l.dataKey),h=xq(s,f,d);if(h.length>=2){var v=Math.min(...h),m=Math.max(...h);(i==null||v<i)&&(i=v),(a==null||m>a)&&(a=m)}var g=iP(f);g!=null&&(i=i==null?g[0]:Math.min(i,g[0]),a=a==null?g[1]:Math.max(a,g[1]))})}),t?.dataKey!=null&&e.forEach(s=>{var l=iP(Ae(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]))}),pe(i)&&pe(a))return[i,a]},Oq=I([Kg,Ge,yq,fd,ze],qg,{memoizeOptions:{resultEqualityCheck:ld}});function Eq(e){var{value:t}=e;if(Br(t)||t instanceof Date)return t}var Aq=(e,t,r)=>{var n=e.map(Eq).filter(o=>o!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&eT(n))?kM(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},Fk=e=>e.referenceElements.dots,Hi=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),Tq=I([Fk,ze,Os],Hi),Bk=e=>e.referenceElements.areas,Mq=I([Bk,ze,Os],Hi),Wk=e=>e.referenceElements.lines,kq=I([Wk,ze,Os],Hi),zk=(e,t)=>{if(e!=null){var r=un(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},Dq=I(Tq,ze,zk),Kk=(e,t)=>{if(e!=null){var r=un(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)]}},_q=I([Mq,ze],Kk);function Nq(e){var t;if(e.x!=null)return un([e.x]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.x);return r==null||r.length===0?[]:un(r)}function jq(e){var t;if(e.y!=null)return un([e.y]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.y);return r==null||r.length===0?[]:un(r)}var Uk=(e,t)=>{if(e!=null){var r=e.flatMap(n=>t==="xAxis"?Nq(n):jq(n));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},Iq=I([kq,ze],Uk),Rq=I(Dq,Iq,_q,(e,t,r)=>Kc(e,r,t)),Xg=(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?Kc(n,i,o):Kc(i,o);return q8(t,c,e.allowDataOverflow)},Lq=I([Ge,Gg,Yg,Pq,Oq,Rq,ye,ze],Xg,{memoizeOptions:{resultEqualityCheck:ld}}),$q=[0,1],Zg=(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=gn(t,i);if(c&&s==null){var u;return kM(0,(u=r?.length)!==null&&u!==void 0?u:0)}return l==="category"?Aq(n,e,c):o==="expand"?$q:a}},Qg=I([Ge,ye,Kg,dd,Cs,ze,Lq],Zg);function Vq(e){return e in xa}var Hk=(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(cs(n));return Vq(i)?i:"point"}}},Xn=I([Ge,jk,_g],Hk);function Jg(e,t,r,n){if(!(r==null||n==null))return typeof e.scale=="function"?nP(e.scale,r,n):nP(t,r,n)}var ey=(e,t,r)=>{var n=Hg(t);if(!(r!=="auto"&&r!=="linear")){if(t!=null&&t.tickCount&&Array.isArray(n)&&(n[0]==="auto"||n[1]==="auto")&&cn(e))return eq(e,t.tickCount,t.allowDecimals);if(t!=null&&t.tickCount&&t.type==="number"&&cn(e))return tq(e,t.tickCount,t.allowDecimals)}},ty=I([Qg,Ui,Xn],ey),ry=(e,t,r,n)=>{if(n!=="angleAxis"&&e?.type==="number"&&cn(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},Fq=I([Ge,Qg,ty,ze],ry),Bq=I(dd,Ge,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(un(e.map(d=>d.value))).sort((d,f)=>d-f),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}}),Gk=I(Bq,ye,Sk,at,(e,t,r,n,o)=>o,(e,t,r,n,o)=>{if(!pe(e))return 0;var i=t==="vertical"?n.height:n.width;if(o==="gap")return e*i/2;if(o==="no-gap"){var a=Ot(r,e*i),s=e*i/2;return s-a-(s-a)/i*a}return 0}),Wq=(e,t,r)=>{var n=Sn(e,t);return n==null||typeof n.padding!="string"?0:Gk(e,"xAxis",t,r,n.padding)},zq=(e,t,r)=>{var n=Pn(e,t);return n==null||typeof n.padding!="string"?0:Gk(e,"yAxis",t,r,n.padding)},Kq=I(Sn,Wq,(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}}),Uq=I(Pn,zq,(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}}),Hq=I([at,Kq,Ku,zu,(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]}),Gq=I([at,ye,Uq,Ku,zu,(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]}),Ts=(e,t,r,n)=>{var o;switch(t){case"xAxis":return Hq(e,r,n);case"yAxis":return Gq(e,r,n);case"zAxis":return(o=Vg(e,r))===null||o===void 0?void 0:o.range;case"angleAxis":return Ak(e);case"radiusAxis":return Tk(e,r);default:return}},Yk=I([Ge,Ts],od),Yq=I([Xn,Fq],Dk),pd=I([Ge,Xn,Yq,Yk],Jg);I([Es,fd,ze],Cq);function qk(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var hd=(e,t)=>t,md=(e,t,r)=>r,qq=I(Bu,hd,md,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(qk)),Xq=I(Wu,hd,md,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(qk)),Xk=(e,t)=>({width:e.width,height:t.height}),Zq=(e,t)=>{var r=typeof t.width=="number"?t.width:ms;return{width:r,height:e.height}},Zk=I(at,Sn,Xk),Qq=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},Jq=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},e9=I(bn,at,qq,hd,md,(e,t,r,n,o)=>{var i={},a;return r.forEach(s=>{var l=Xk(t,s);a==null&&(a=Qq(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}),t9=I(yn,at,Xq,hd,md,(e,t,r,n,o)=>{var i={},a;return r.forEach(s=>{var l=Zq(t,s);a==null&&(a=Jq(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}),r9=(e,t)=>{var r=Sn(e,t);if(r!=null)return e9(e,r.orientation,r.mirror)},n9=I([at,Sn,r9,(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}}}),o9=(e,t)=>{var r=Pn(e,t);if(r!=null)return t9(e,r.orientation,r.mirror)},i9=I([at,Pn,o9,(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}}}),Qk=I(at,Pn,(e,t)=>{var r=typeof t.width=="number"?t.width:ms;return{width:r,height:e.height}}),aP=(e,t,r)=>{switch(t){case"xAxis":return Zk(e,r).width;case"yAxis":return Qk(e,r).height;default:return}},Jk=(e,t,r,n)=>{if(r!=null){var{allowDuplicatedCategory:o,type:i,dataKey:a}=r,s=gn(e,n),l=t.map(c=>c.value);if(a&&s&&i==="category"&&o&&eT(l))return l}},ny=I([ye,dd,Ge,ze],Jk),eD=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var{type:o,scale:i}=r,a=gn(e,n);if(a&&(o==="number"||i!=="auto"))return t.map(s=>s.value)}},oy=I([ye,dd,Ui,ze],eD),sP=I([ye,vq,Xn,pd,ny,oy,Ts,ty,ze],(e,t,r,n,o,i,a,s,l)=>{if(t!=null){var c=gn(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}}}),a9=(e,t,r,n,o,i,a,s,l)=>{if(!(t==null||n==null)){var c=gn(e,l),{type:u,ticks:d,tickCount:f}=t,h=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,v=u==="category"&&n.bandwidth?n.bandwidth()/h:0;v=l==="angleAxis"&&i!=null&&i.length>=2?ft(i[0]-i[1])*2*v:v;var m=d||o;return m?m.map((g,y)=>{var x=a?a.indexOf(g):g,w=n.map(x);return pe(w)?{index:y,coordinate:w+v,value:g,offset:v}:null}).filter(Vt):c&&s?s.map((g,y)=>{var x=n.map(g);return pe(x)?{coordinate:x+v,value:g,index:y,offset:v}:null}).filter(Vt):n.ticks?n.ticks(f).map((g,y)=>{var x=n.map(g);return pe(x)?{coordinate:x+v,value:g,index:y,offset:v}:null}).filter(Vt):n.domain().map((g,y)=>{var x=n.map(g);return pe(x)?{coordinate:x+v,value:a?a[g]:g,index:y,offset:v}:null}).filter(Vt)}},tD=I([ye,Ui,Xn,pd,ty,Ts,ny,oy,ze],a9),s9=(e,t,r,n,o,i,a)=>{if(!(t==null||r==null||n==null||n[0]===n[1])){var s=gn(e,a),{tickCount:l}=t,c=0;return c=a==="angleAxis"&&n?.length>=2?ft(n[0]-n[1])*2*c:c,s&&i?i.map((u,d)=>{var f=r.map(u);return pe(f)?{coordinate:f+c,value:u,index:d,offset:c}:null}).filter(Vt):r.ticks?r.ticks(l).map((u,d)=>{var f=r.map(u);return pe(f)?{coordinate:f+c,value:u,index:d,offset:c}:null}).filter(Vt):r.domain().map((u,d)=>{var f=r.map(u);return pe(f)?{coordinate:f+c,value:o?o[u]:u,index:d,offset:c}:null}).filter(Vt)}},$n=I([ye,Ui,pd,Ts,ny,oy,ze],s9),Vn=I(Ge,pd,(e,t)=>{if(!(e==null||t==null))return zc(zc({},e),{},{scale:t})}),l9=I([Ge,Xn,Qg,Yk],Jg);I((e,t,r)=>Vg(e,r),l9,(e,t)=>{if(!(e==null||t==null))return zc(zc({},e),{},{scale:t})});var c9=I([ye,Bu,Wu],(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}}),rD=e=>e.options.defaultTooltipEventType,nD=e=>e.options.validateTooltipEventTypes;function oD(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function iy(e,t){var r=rD(e),n=nD(e);return oD(t,r,n)}function u9(e){return J(t=>iy(t,e))}var iD=(e,t)=>{var r,n=Number(t);if(!(Fr(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},d9=e=>e.tooltip.settings,_n={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},f9={itemInteraction:{click:_n,hover:_n},axisInteraction:{click:_n,hover:_n},keyboardInteraction:_n,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}},aD=Bt({name:"tooltip",initialState:f9,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:Re()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:r,next:n}=t.payload,o=br(e).tooltipItemPayloads.indexOf(r);o>-1&&(e.tooltipItemPayloads[o]=n)},prepare:Re()},removeTooltipEntrySettings:{reducer(e,t){var r=br(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:Re()},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:p9,replaceTooltipEntrySettings:h9,removeTooltipEntrySettings:m9,setTooltipSettingsState:v9,setActiveMouseOverItemIndex:sD,mouseLeaveItem:g9,mouseLeaveChart:lD,setActiveClickItemIndex:y9,setMouseOverAxisIndex:cD,setMouseClickAxisIndex:b9,setSyncInteraction:um,setKeyboardInteraction:dm}=aD.actions,x9=aD.reducer;function lP(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 El(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lP(Object(r),!0).forEach(function(n){w9(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function w9(e,t,r){return(t=S9(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function S9(e){var t=P9(e,"string");return typeof t=="symbol"?t:t+""}function P9(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 C9(e,t,r){return t==="axis"?r==="click"?e.axisInteraction.click:e.axisInteraction.hover:r==="click"?e.itemInteraction.click:e.itemInteraction.hover}function O9(e){return e.index!=null}var uD=(e,t,r,n)=>{if(t==null)return _n;var o=C9(e,t,r);if(o==null)return _n;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(O9(o)){if(i)return El(El({},o),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n,graphicalItemId:void 0};return El(El({},_n),{},{coordinate:o.coordinate})};function E9(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 A9(e,t){var r=E9(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 T9(e,t,r){if(r==null||t==null)return!0;var n=Ae(e,t);return n==null||!cn(r)?!0:A9(n,r)}var ay=(e,t,r,n)=>{var o=e?.index;if(o==null)return null;var i=Number(o);if(!pe(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||T9(c,r,n)?String(l):null},dD=(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}}},fD=(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})},pD=e=>e.options.tooltipPayloadSearcher,Gi=e=>e.tooltip;function cP(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 uP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cP(Object(r),!0).forEach(function(n){M9(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function M9(e,t,r){return(t=k9(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function k9(e){var t=D9(e,"string");return typeof t=="symbol"?t:t+""}function D9(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 _9(e,t){return e??t}var hD=(e,t,r,n,o,i,a)=>{if(!(t==null||i==null)){var{chartData:s,computedData:l,dataStartIndex:c,dataEndIndex:u}=r,d=[];return e.reduce((f,h)=>{var v,{dataDefinedOnItem:m,settings:g}=h,y=_9(m,s),x=Array.isArray(y)?QT(y,c,u):y,w=(v=g?.dataKey)!==null&&v!==void 0?v:n,S=g?.nameKey,P;if(n&&Array.isArray(x)&&!Array.isArray(x[0])&&a==="axis"?P=tT(x,n,o):P=i(x,t,l,S),Array.isArray(P))P.forEach(E=>{var A=uP(uP({},g),{},{name:E.name,unit:E.unit,color:void 0,fill:void 0});f.push(l0({tooltipEntrySettings:A,dataKey:E.dataKey,payload:E.payload,value:Ae(E.payload,E.dataKey),name:E.name}))});else{var C;f.push(l0({tooltipEntrySettings:g,dataKey:w,payload:P,value:Ae(P,w),name:(C=Ae(P,S))!==null&&C!==void 0?C:g?.name}))}return f},d)}},sy=I([lt,jk,_g],Hk),N9=I([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),j9=I([vt,Ki],Fg),Yi=I([N9,lt,j9],Bg,{memoizeOptions:{resultEqualityCheck:cd}}),I9=I([Yi],e=>e.filter(sd)),R9=I([Yi],Wg,{memoizeOptions:{resultEqualityCheck:cd}}),qi=I([R9,wn],zg),L9=I([I9,wn,lt],kk),ly=I([qi,lt,Yi],Ug),mD=I([lt],Hg),$9=I([lt],e=>e.allowDataOverflow),vD=I([mD,$9],uk),V9=I([Yi],e=>e.filter(sd)),F9=I([L9,V9,Cs,Pk],$k),B9=I([F9,wn,vt,vD],Vk),W9=I([Yi],Rk),z9=I([qi,lt,W9,fd,vt],qg,{memoizeOptions:{resultEqualityCheck:ld}}),K9=I([Fk,vt,Ki],Hi),U9=I([K9,vt],zk),H9=I([Bk,vt,Ki],Hi),G9=I([H9,vt],Kk),Y9=I([Wk,vt,Ki],Hi),q9=I([Y9,vt],Uk),X9=I([U9,q9,G9],Kc),Z9=I([lt,mD,vD,B9,z9,X9,ye,vt],Xg),Ms=I([lt,ye,qi,ly,Cs,vt,Z9],Zg),Q9=I([Ms,lt,sy],ey),J9=I([lt,Ms,Q9,vt],ry),gD=e=>{var t=vt(e),r=Ki(e),n=!1;return Ts(e,t,r,n)},yD=I([lt,gD],od),bD=I([lt,sy,J9,yD],Jg),e7=I([ye,ly,lt,vt],Jk),t7=I([ye,ly,lt,vt],eD),r7=(e,t,r,n,o,i,a,s)=>{if(t){var{type:l}=t,c=gn(e,s);if(n){var u=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,d=l==="category"&&n.bandwidth?n.bandwidth()/u:0;return d=s==="angleAxis"&&o!=null&&o?.length>=2?ft(o[0]-o[1])*2*d:d,c&&a?a.map((f,h)=>{var v=n.map(f);return pe(v)?{coordinate:v+d,value:f,index:h,offset:d}:null}).filter(Vt):n.domain().map((f,h)=>{var v=n.map(f);return pe(v)?{coordinate:v+d,value:i?i[f]:f,index:h,offset:d}:null}).filter(Vt)}}},Cn=I([ye,lt,sy,bD,gD,e7,t7,vt],r7),cy=I([rD,nD,d9],(e,t,r)=>oD(r.shared,e,t)),xD=e=>e.tooltip.settings.trigger,uy=e=>e.tooltip.settings.defaultIndex,ks=I([Gi,cy,xD,uy],uD),Fn=I([ks,qi,As,Ms],ay),wD=I([Cn,Fn],iD),dy=I([ks],e=>{if(e)return e.dataKey}),n7=I([ks],e=>{if(e)return e.graphicalItemId}),SD=I([Gi,cy,xD,uy],fD),o7=I([yn,bn,ye,at,Cn,uy,SD],dD),i7=I([ks,o7],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),a7=I([ks],e=>{var t;return(t=e?.active)!==null&&t!==void 0?t:!1}),s7=I([SD,Fn,wn,As,wD,pD,cy],hD),l7=I([s7],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});function dP(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 fP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dP(Object(r),!0).forEach(function(n){c7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function c7(e,t,r){return(t=u7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u7(e){var t=d7(e,"string");return typeof t=="symbol"?t:t+""}function d7(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 f7=()=>J(lt),p7=()=>{var e=f7(),t=J(Cn),r=J(bD);return Oi(!e||!r?void 0:fP(fP({},e),{},{scale:r}),t)};function pP(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 ni(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pP(Object(r),!0).forEach(function(n){h7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function h7(e,t,r){return(t=m7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m7(e){var t=v7(e,"string");return typeof t=="symbol"?t:t+""}function v7(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 g7=(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}},y7=(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 ni(ni(ni({},n),Xe(n.cx,n.cy,a,i)),{},{angle:i,radius:a})}var s=o.coordinate,{angle:l}=n;return ni(ni(ni({},n),Xe(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 b7(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 PD=(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,d,f,h=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,v=(u=r[s])===null||u===void 0?void 0:u.coordinate,m=s>=a-1?(d=r[0])===null||d===void 0?void 0:d.coordinate:(f=r[s+1])===null||f===void 0?void 0:f.coordinate,g=void 0;if(!(h==null||v==null||m==null))if(ft(v-h)!==ft(m-v)){var y=[];if(ft(m-v)===ft(o[1]-o[0])){g=m;var x=v+o[1]-o[0];y[0]=Math.min(x,(x+h)/2),y[1]=Math.max(x,(x+h)/2)}else{g=h;var w=m+o[1]-o[0];y[0]=Math.min(v,(w+v)/2),y[1]=Math.max(v,(w+v)/2)}var S=[Math.min(v,(g+v)/2),Math.max(v,(g+v)/2)];if(e>S[0]&&e<=S[1]||e>=y[0]&&e<=y[1]){var P;return(P=r[s])===null||P===void 0?void 0:P.index}}else{var C=Math.min(h,m),E=Math.max(h,m);if(e>(C+v)/2&&e<=(E+v)/2){var A;return(A=r[s])===null||A===void 0?void 0:A.index}}}else if(t)for(var T=0;T<a;T++){var M=t[T];if(M!=null){var _=t[T+1],k=t[T-1];if(T===0&&_!=null&&e<=(M.coordinate+_.coordinate)/2||T===a-1&&k!=null&&e>(M.coordinate+k.coordinate)/2||T>0&&T<a-1&&k!=null&&_!=null&&e>(M.coordinate+k.coordinate)/2&&e<=(M.coordinate+_.coordinate)/2)return M.index}}return-1},x7=()=>J(_g),fy=(e,t)=>t,CD=(e,t,r)=>r,py=(e,t,r,n)=>n,w7=I(Cn,e=>_u(e,t=>t.coordinate)),hy=I([Gi,fy,CD,py],uD),my=I([hy,qi,As,Ms],ay),S7=(e,t,r)=>{if(t!=null){var n=Gi(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},OD=I([Gi,fy,CD,py],fD),Uc=I([yn,bn,ye,at,Cn,py,OD],dD),P7=I([hy,Uc],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),ED=I([Cn,my],iD),C7=I([OD,my,wn,As,ED,pD,fy],hD),O7=I([hy,my],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),E7=(e,t,r,n,o,i,a)=>{if(!(!e||!r||!n||!o)&&b7(e,a)){var s=HU(e,t),l=PD(s,i,o,r,n),c=g7(t,o,l,e);return{activeIndex:String(l),activeCoordinate:c}}},A7=(e,t,r,n,o,i,a)=>{if(!(!e||!n||!o||!i||!r)){var s=uG(e,r);if(s){var l=GU(s,t),c=PD(l,a,i,n,o),u=y7(t,i,c,s);return{activeIndex:String(c),activeCoordinate:u}}}},T7=(e,t,r,n,o,i,a,s)=>{if(!(!e||!t||!n||!o||!i))return t==="horizontal"||t==="vertical"?E7(e,t,n,o,i,a,s):A7(e,t,r,n,o,i,a)},M7=I(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}}),k7=I(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(n=>parseInt(n,10)).concat(Object.values(Ze)),r=Array.from(new Set(t));return r.sort((n,o)=>n-o)},{memoizeOptions:{resultEqualityCheck:uq}});function hP(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 mP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hP(Object(r),!0).forEach(function(n){D7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function D7(e,t,r){return(t=_7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _7(e){var t=N7(e,"string");return typeof t=="symbol"?t:t+""}function N7(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 j7={},I7={zIndexMap:Object.values(Ze).reduce((e,t)=>mP(mP({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),j7)},R7=new Set(Object.values(Ze));function L7(e){return R7.has(e)}var AD=Bt({name:"zIndex",initialState:I7,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:Re()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]&&(e.zIndexMap[r].consumers-=1,e.zIndexMap[r].consumers<=0&&!L7(r)&&delete e.zIndexMap[r])},prepare:Re()},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:Re()},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:Re()}}}),{registerZIndexPortal:$7,unregisterZIndexPortal:V7,registerZIndexPortalElement:F7,unregisterZIndexPortalElement:B7}=AD.actions,W7=AD.reducer;function Wt(e){var{zIndex:t,children:r}=e,n=CH(),o=n&&t!==void 0&&t!==0,i=Tt(),a=Ne();O.useLayoutEffect(()=>o?(a($7({zIndex:t})),()=>{a(V7({zIndex:t}))}):Wo,[a,t,o]);var s=J(l=>M7(l,t,i));return o?s?is.createPortal(r,s):null:r}function fm(){return fm=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},fm.apply(null,arguments)}function vP(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 Al(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vP(Object(r),!0).forEach(function(n){z7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function z7(e,t,r){return(t=K7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function K7(e){var t=U7(e,"string");return typeof t=="symbol"?t:t+""}function U7(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 H7(e){var{cursor:t,cursorComp:r,cursorProps:n}=e;return O.isValidElement(t)?O.cloneElement(t,n):O.createElement(r,n)}function G7(e){var t,{coordinate:r,payload:n,index:o,offset:i,tooltipAxisBandSize:a,layout:s,cursor:l,tooltipEventType:c,chartName:u}=e,d=r,f=n,h=o;if(!l||!d||u!=="ScatterChart"&&c!=="axis")return null;var v,m,g;if(u==="ScatterChart")v=d,m=C6,g=Ze.cursorLine;else if(u==="BarChart")v=O6(s,d,i,a),m=OM,g=Ze.cursorRectangle;else if(s==="radial"&&nT(d)){var{cx:y,cy:x,radius:w,startAngle:S,endAngle:P}=AM(d);v={cx:y,cy:x,startAngle:S,endAngle:P,innerRadius:w,outerRadius:w},m=MM,g=Ze.cursorLine}else v={points:hG(s,d,i)},m=ig,g=Ze.cursorLine;var C=typeof l=="object"&&"className"in l?l.className:void 0,E=Al(Al(Al(Al({stroke:"#ccc",pointerEvents:"none"},i),v),To(l)),{},{payload:f,payloadIndex:h,className:ve("recharts-tooltip-cursor",C)});return p.createElement(Wt,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:g},p.createElement(H7,{cursor:l,cursorComp:m,cursorProps:E}))}function Y7(e){var t=p7(),r=sM(),n=zo(),o=x7();return t==null||r==null||n==null||o==null?null:p.createElement(G7,fm({},e,{offset:r,layout:n,tooltipAxisBandSize:t,chartName:o}))}var TD=O.createContext(null),q7=()=>O.useContext(TD),Dp={exports:{}},gP;function X7(){return gP||(gP=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,d,f){if(typeof u!="function")throw new TypeError("The listener must be a function");var h=new o(u,d||l,f),v=r?r+c:c;return l._events[v]?l._events[v].fn?l._events[v]=[l._events[v],h]:l._events[v].push(h):(l._events[v]=h,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,d;if(this._eventsCount===0)return c;for(d in u=this._events)t.call(u,d)&&c.push(r?d.slice(1):d);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(u)):c},s.prototype.listeners=function(c){var u=r?r+c:c,d=this._events[u];if(!d)return[];if(d.fn)return[d.fn];for(var f=0,h=d.length,v=new Array(h);f<h;f++)v[f]=d[f].fn;return v},s.prototype.listenerCount=function(c){var u=r?r+c:c,d=this._events[u];return d?d.fn?1:d.length:0},s.prototype.emit=function(c,u,d,f,h,v){var m=r?r+c:c;if(!this._events[m])return!1;var g=this._events[m],y=arguments.length,x,w;if(g.fn){switch(g.once&&this.removeListener(c,g.fn,void 0,!0),y){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,u),!0;case 3:return g.fn.call(g.context,u,d),!0;case 4:return g.fn.call(g.context,u,d,f),!0;case 5:return g.fn.call(g.context,u,d,f,h),!0;case 6:return g.fn.call(g.context,u,d,f,h,v),!0}for(w=1,x=new Array(y-1);w<y;w++)x[w-1]=arguments[w];g.fn.apply(g.context,x)}else{var S=g.length,P;for(w=0;w<S;w++)switch(g[w].once&&this.removeListener(c,g[w].fn,void 0,!0),y){case 1:g[w].fn.call(g[w].context);break;case 2:g[w].fn.call(g[w].context,u);break;case 3:g[w].fn.call(g[w].context,u,d);break;case 4:g[w].fn.call(g[w].context,u,d,f);break;default:if(!x)for(P=1,x=new Array(y-1);P<y;P++)x[P-1]=arguments[P];g[w].fn.apply(g[w].context,x)}}return!0},s.prototype.on=function(c,u,d){return i(this,c,u,d,!1)},s.prototype.once=function(c,u,d){return i(this,c,u,d,!0)},s.prototype.removeListener=function(c,u,d,f){var h=r?r+c:c;if(!this._events[h])return this;if(!u)return a(this,h),this;var v=this._events[h];if(v.fn)v.fn===u&&(!f||v.once)&&(!d||v.context===d)&&a(this,h);else{for(var m=0,g=[],y=v.length;m<y;m++)(v[m].fn!==u||f&&!v[m].once||d&&v[m].context!==d)&&g.push(v[m]);g.length?this._events[h]=g.length===1?g[0]:g:a(this,h)}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})(Dp)),Dp.exports}var Z7=X7();const Q7=Gn(Z7);var Ka=new Q7,pm="recharts.syncEvent.tooltip",yP="recharts.syncEvent.brush",vy=(e,t)=>{if(t&&Array.isArray(e)){var r=Number.parseInt(t,10);if(!Fr(r))return e[r]}},J7={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},MD=Bt({name:"options",initialState:J7,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),eX=MD.reducer,{createEventEmitter:tX}=MD.actions;function rX(e){return e.tooltip.syncInteraction}var nX={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},kD=Bt({name:"chartData",initialState:nX,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:bP,setDataStartEndIndexes:oX,setComputedData:Tye}=kD.actions,iX=kD.reducer,aX=["x","y"];function xP(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 oi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xP(Object(r),!0).forEach(function(n){sX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sX(e,t,r){return(t=lX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lX(e){var t=cX(e,"string");return typeof t=="symbol"?t:t+""}function cX(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 uX(e,t){if(e==null)return{};var r,n,o=dX(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 dX(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 fX(){var e=J(Ng),t=J(jg),r=Ne(),n=J(Ck),o=J(Cn),i=zo(),a=Uu(),s=J(l=>l.rootProps.className);O.useEffect(()=>{if(e==null)return Wo;var l=(c,u,d)=>{if(t!==d&&e===c){if(n==="index"){var f;if(a&&u!==null&&u!==void 0&&(f=u.payload)!==null&&f!==void 0&&f.coordinate&&u.payload.sourceViewBox){var h=u.payload.coordinate,{x:v,y:m}=h,g=uX(h,aX),{x:y,y:x,width:w,height:S}=u.payload.sourceViewBox,P=oi(oi({},g),{},{x:a.x+(w?(v-y)/w:0)*a.width,y:a.y+(S?(m-x)/S:0)*a.height});r(oi(oi({},u),{},{payload:oi(oi({},u.payload),{},{coordinate:P})}))}else r(u);return}if(o!=null){var C;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},A=n(o,E);C=o[A]}else n==="value"&&(C=o.find(B=>String(B.value)===u.payload.label));var{coordinate:T}=u.payload;if(C==null||u.payload.active===!1||T==null||a==null){r(um({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}var{x:M,y:_}=T,k=Math.min(M,a.x+a.width),N=Math.min(_,a.y+a.height),R={x:i==="horizontal"?C.coordinate:k,y:i==="horizontal"?N:C.coordinate},z=um({active:u.payload.active,coordinate:R,dataKey:u.payload.dataKey,index:String(C.index),label:u.payload.label,sourceViewBox:u.payload.sourceViewBox,graphicalItemId:u.payload.graphicalItemId});r(z)}}};return Ka.on(pm,l),()=>{Ka.off(pm,l)}},[s,r,t,e,n,o,i,a])}function pX(){var e=J(Ng),t=J(jg),r=Ne();O.useEffect(()=>{if(e==null)return Wo;var n=(o,i,a)=>{t!==a&&e===o&&r(oX(i))};return Ka.on(yP,n),()=>{Ka.off(yP,n)}},[r,t,e])}function hX(){var e=Ne();O.useEffect(()=>{e(tX())},[e]),fX(),pX()}function mX(e,t,r,n,o,i){var a=J(h=>S7(h,e,t)),s=J(jg),l=J(Ng),c=J(Ck),u=J(rX),d=u?.active,f=Uu();O.useEffect(()=>{if(!d&&l!=null&&s!=null){var h=um({active:i,coordinate:r,dataKey:a,index:o,label:typeof n=="number"?String(n):n,sourceViewBox:f,graphicalItemId:void 0});Ka.emit(pm,l,h,s)}},[d,r,a,o,n,s,l,c,i,f])}function wP(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 SP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wP(Object(r),!0).forEach(function(n){vX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vX(e,t,r){return(t=gX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gX(e){var t=yX(e,"string");return typeof t=="symbol"?t:t+""}function yX(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 bX(e){return e.dataKey}function xX(e,t){return p.isValidElement(e)?p.cloneElement(e,t):typeof e=="function"?p.createElement(e,t):p.createElement(n6,t)}var PP=[],wX={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 gy(e){var t,r,n=et(e,wX),{active:o,allowEscapeViewBox:i,animationDuration:a,animationEasing:s,content:l,filterNull:c,isAnimationActive:u,offset:d,payloadUniqBy:f,position:h,reverseDirection:v,useTranslate3d:m,wrapperStyle:g,cursor:y,shared:x,trigger:w,defaultIndex:S,portal:P,axisId:C}=n,E=Ne(),A=typeof S=="number"?String(S):S;O.useEffect(()=>{E(v9({shared:x,trigger:w,axisId:C,active:o,defaultIndex:A}))},[E,x,w,C,o,A]);var T=Uu(),M=xM(),_=u9(x),{activeIndex:k,isActive:N}=(t=J(K=>O7(K,_,w,A)))!==null&&t!==void 0?t:{},R=J(K=>C7(K,_,w,A)),z=J(K=>ED(K,_,w,A)),B=J(K=>P7(K,_,w,A)),F=R,j=q7(),L=(r=o??N)!==null&&r!==void 0?r:!1,[H,re]=yT([F,L]),le=_==="axis"?z:void 0;mX(_,w,B,le,k,L);var ae=P??j;if(ae==null||T==null||_==null)return null;var oe=F??PP;L||(oe=PP),c&&oe.length&&(oe=fT(oe.filter(K=>K.value!=null&&(K.hide!==!0||n.includeHidden)),f,bX));var Se=oe.length>0,Me=p.createElement(u6,{allowEscapeViewBox:i,animationDuration:a,animationEasing:s,isAnimationActive:u,active:L,coordinate:B,hasPayload:Se,offset:d,position:h,reverseDirection:v,useTranslate3d:m,viewBox:T,wrapperStyle:g,lastBoundingBox:H,innerRef:re,hasPortalFromProps:!!P},xX(l,SP(SP({},n),{},{payload:oe,label:le,active:L,activeIndex:k,coordinate:B,accessibilityLayer:M})));return p.createElement(p.Fragment,null,is.createPortal(Me,ae),L&&p.createElement(Y7,{cursor:y,tooltipEventType:_,coordinate:B,payload:oe,index:k}))}var Ds=e=>null;Ds.displayName="Cell";function SX(e,t,r){return(t=PX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function PX(e){var t=CX(e,"string");return typeof t=="symbol"?t:t+""}function CX(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 OX{constructor(t){SX(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 CP(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 EX(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?CP(Object(r),!0).forEach(function(n){AX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):CP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function AX(e,t,r){return(t=TX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function TX(e){var t=MX(e,"string");return typeof t=="symbol"?t:t+""}function MX(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 kX={cacheSize:2e3,enableCache:!0},DD=EX({},kX),OP=new OX(DD.cacheSize),DX={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},EP="recharts_measurement_span";function _X(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 AP=(e,t)=>{try{var r=document.getElementById(EP);r||(r=document.createElement("span"),r.setAttribute("id",EP),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,DX,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},Aa=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Xu.isSsr)return{width:0,height:0};if(!DD.enableCache)return AP(t,r);var n=_X(t,r),o=OP.get(n);if(o)return o;var i=AP(t,r);return OP.set(n,i),i},_D;function NX(e,t,r){return(t=jX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jX(e){var t=IX(e,"string");return typeof t=="symbol"?t:t+""}function IX(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 TP=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,MP=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,RX=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,LX=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,$X={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},VX=["cm","mm","pt","pc","in","Q","px"];function FX(e){return VX.includes(e)}var ui="NaN";function BX(e,t){return e*$X[t]}class bt{static parse(t){var r,[,n,o]=(r=LX.exec(t))!==null&&r!==void 0?r:[];return n==null?bt.NaN:new bt(parseFloat(n),o??"")}constructor(t,r){this.num=t,this.unit=r,this.num=t,this.unit=r,Fr(t)&&(this.unit=""),r!==""&&!RX.test(r)&&(this.num=NaN,this.unit=""),FX(r)&&(this.num=BX(t,r),this.unit="px")}add(t){return this.unit!==t.unit?new bt(NaN,""):new bt(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new bt(NaN,""):new bt(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new bt(NaN,""):new bt(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new bt(NaN,""):new bt(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return Fr(this.num)}}_D=bt;NX(bt,"NaN",new _D(NaN,""));function ND(e){if(e==null||e.includes(ui))return ui;for(var t=e;t.includes("*")||t.includes("/");){var r,[,n,o,i]=(r=TP.exec(t))!==null&&r!==void 0?r:[],a=bt.parse(n??""),s=bt.parse(i??""),l=o==="*"?a.multiply(s):a.divide(s);if(l.isNaN())return ui;t=t.replace(TP,l.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var c,[,u,d,f]=(c=MP.exec(t))!==null&&c!==void 0?c:[],h=bt.parse(u??""),v=bt.parse(f??""),m=d==="+"?h.add(v):h.subtract(v);if(m.isNaN())return ui;t=t.replace(MP,m.toString())}return t}var kP=/\(([^()]*)\)/;function WX(e){for(var t=e,r;(r=kP.exec(t))!=null;){var[,n]=r;t=t.replace(kP,ND(n))}return t}function zX(e){var t=e.replace(/\s+/g,"");return t=WX(t),t=ND(t),t}function KX(e){try{return zX(e)}catch{return ui}}function _p(e){var t=KX(e.slice(5,-1));return t===ui?"":t}var UX=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],HX=["dx","dy","angle","className","breakAll"];function hm(){return hm=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},hm.apply(null,arguments)}function DP(e,t){if(e==null)return{};var r,n,o=GX(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 GX(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 jD=/[ \f\n\r\t\v\u2028\u2029]+/,ID=e=>{var{children:t,breakAll:r,style:n}=e;try{var o=[];We(t)||(r?o=t.toString().split(""):o=t.toString().split(jD));var i=o.map(s=>({word:s,width:Aa(s,n).width})),a=r?0:Aa(" ",n).width;return{wordsWithComputedWidth:i,spaceWidth:a}}catch{return null}};function YX(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}var RD=(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},[]),LD=e=>e.reduce((t,r)=>t.width>r.width?t:r),qX="…",_P=(e,t,r,n,o,i,a,s)=>{var l=e.slice(0,t),c=ID({breakAll:r,style:n,children:l+qX});if(!c)return[!1,[]];var u=RD(c.wordsWithComputedWidth,i,a,s),d=u.length>o||LD(u).width>Number(i);return[d,u]},XX=(e,t,r,n,o)=>{var{maxLines:i,children:a,style:s,breakAll:l}=e,c=Y(i),u=String(a),d=RD(t,n,r,o);if(!c||o)return d;var f=d.length>i||LD(d).width>Number(n);if(!f)return d;for(var h=0,v=u.length-1,m=0,g;h<=v&&m<=u.length-1;){var y=Math.floor((h+v)/2),x=y-1,[w,S]=_P(u,x,l,s,i,n,r,o),[P]=_P(u,y,l,s,i,n,r,o);if(!w&&!P&&(h=y+1),w&&P&&(v=y-1),!w&&P){g=S;break}m++}return g||d},NP=e=>{var t=We(e)?[]:e.toString().split(jD);return[{words:t,width:void 0}]},ZX=e=>{var{width:t,scaleToFit:r,children:n,style:o,breakAll:i,maxLines:a}=e;if((t||r)&&!Xu.isSsr){var s,l,c=ID({breakAll:i,children:n,style:o});if(c){var{wordsWithComputedWidth:u,spaceWidth:d}=c;s=u,l=d}else return NP(n);return XX({breakAll:i,children:n,maxLines:a,style:o},s,l,t,!!r)}return NP(n)},$D="#808080",QX={angle:0,breakAll:!1,capHeight:"0.71em",fill:$D,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},vd=O.forwardRef((e,t)=>{var r=et(e,QX),{x:n,y:o,lineHeight:i,capHeight:a,fill:s,scaleToFit:l,textAnchor:c,verticalAnchor:u}=r,d=DP(r,UX),f=O.useMemo(()=>ZX({breakAll:d.breakAll,children:d.children,maxLines:d.maxLines,scaleToFit:l,style:d.style,width:d.width}),[d.breakAll,d.children,d.maxLines,l,d.style,d.width]),{dx:h,dy:v,angle:m,className:g,breakAll:y}=d,x=DP(d,HX);if(!Br(n)||!Br(o)||f.length===0)return null;var w=Number(n)+(Y(h)?h:0),S=Number(o)+(Y(v)?v:0);if(!pe(w)||!pe(S))return null;var P;switch(u){case"start":P=_p("calc(".concat(a,")"));break;case"middle":P=_p("calc(".concat((f.length-1)/2," * -").concat(i," + (").concat(a," / 2))"));break;default:P=_p("calc(".concat(f.length-1," * -").concat(i,")"));break}var C=[],E=f[0];if(l&&E!=null){var A=E.width,{width:T}=d;C.push("scale(".concat(Y(T)&&Y(A)?T/A:1,")"))}return m&&C.push("rotate(".concat(m,", ").concat(w,", ").concat(S,")")),C.length&&(x.transform=C.join(" ")),p.createElement("text",hm({},Rt(x),{ref:t,x:w,y:S,className:ve("recharts-text",g),textAnchor:c,fill:s.includes("url")?$D:s}),f.map((M,_)=>{var k=M.words.join(y?"":" ");return p.createElement("tspan",{x:w,dy:_===0?P:i,key:"".concat(k,"-").concat(_)},k)}))});vd.displayName="Text";function jP(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 Tr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jP(Object(r),!0).forEach(function(n){JX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function JX(e,t,r){return(t=eZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eZ(e){var t=tZ(e,"string");return typeof t=="symbol"?t:t+""}function tZ(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 rZ=e=>{var{viewBox:t,position:r,offset:n=0,parentViewBox:o}=e,{x:i,y:a,height:s,upperWidth:l,lowerWidth:c}=eg(t),u=i,d=i+(l-c)/2,f=(u+d)/2,h=(l+c)/2,v=u+l/2,m=s>=0?1:-1,g=m*n,y=m>0?"end":"start",x=m>0?"start":"end",w=l>=0?1:-1,S=w*n,P=w>0?"end":"start",C=w>0?"start":"end",E=o;if(r==="top"){var A={x:u+l/2,y:a-g,horizontalAnchor:"middle",verticalAnchor:y};return E&&(A.height=Math.max(a-E.y,0),A.width=l),A}if(r==="bottom"){var T={x:d+c/2,y:a+s+g,horizontalAnchor:"middle",verticalAnchor:x};return E&&(T.height=Math.max(E.y+E.height-(a+s),0),T.width=c),T}if(r==="left"){var M={x:f-S,y:a+s/2,horizontalAnchor:P,verticalAnchor:"middle"};return E&&(M.width=Math.max(M.x-E.x,0),M.height=s),M}if(r==="right"){var _={x:f+h+S,y:a+s/2,horizontalAnchor:C,verticalAnchor:"middle"};return E&&(_.width=Math.max(E.x+E.width-_.x,0),_.height=s),_}var k=E?{width:h,height:s}:{};return r==="insideLeft"?Tr({x:f+S,y:a+s/2,horizontalAnchor:C,verticalAnchor:"middle"},k):r==="insideRight"?Tr({x:f+h-S,y:a+s/2,horizontalAnchor:P,verticalAnchor:"middle"},k):r==="insideTop"?Tr({x:u+l/2,y:a+g,horizontalAnchor:"middle",verticalAnchor:x},k):r==="insideBottom"?Tr({x:d+c/2,y:a+s-g,horizontalAnchor:"middle",verticalAnchor:y},k):r==="insideTopLeft"?Tr({x:u+S,y:a+g,horizontalAnchor:C,verticalAnchor:x},k):r==="insideTopRight"?Tr({x:u+l-S,y:a+g,horizontalAnchor:P,verticalAnchor:x},k):r==="insideBottomLeft"?Tr({x:d+S,y:a+s-g,horizontalAnchor:C,verticalAnchor:y},k):r==="insideBottomRight"?Tr({x:d+c-S,y:a+s-g,horizontalAnchor:P,verticalAnchor:y},k):r&&typeof r=="object"&&(Y(r.x)||Do(r.x))&&(Y(r.y)||Do(r.y))?Tr({x:i+Ot(r.x,h),y:a+Ot(r.y,s),horizontalAnchor:"end",verticalAnchor:"end"},k):Tr({x:v,y:a+s/2,horizontalAnchor:"middle",verticalAnchor:"middle"},k)},nZ=["labelRef"],oZ=["content"];function IP(e,t){if(e==null)return{};var r,n,o=iZ(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 iZ(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 RP(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 wa(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?RP(Object(r),!0).forEach(function(n){aZ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):RP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function aZ(e,t,r){return(t=sZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sZ(e){var t=lZ(e,"string");return typeof t=="symbol"?t:t+""}function lZ(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 Zr(){return Zr=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},Zr.apply(null,arguments)}var VD=O.createContext(null),cZ=e=>{var{x:t,y:r,upperWidth:n,lowerWidth:o,width:i,height:a,children:s}=e,l=O.useMemo(()=>({x:t,y:r,upperWidth:n,lowerWidth:o,width:i,height:a}),[t,r,n,o,i,a]);return p.createElement(VD.Provider,{value:l},s)},FD=()=>{var e=O.useContext(VD),t=Uu();return e||(t?eg(t):void 0)},uZ=O.createContext(null),dZ=()=>{var e=O.useContext(uZ),t=J(Mk);return e||t},fZ=e=>{var{value:t,formatter:r}=e,n=We(e.children)?t:e.children;return typeof r=="function"?r(n):n},yy=e=>e!=null&&typeof e=="function",pZ=(e,t)=>{var r=ft(t-e),n=Math.min(Math.abs(t-e),360);return r*n},hZ=(e,t,r,n,o)=>{var{offset:i,className:a}=e,{cx:s,cy:l,innerRadius:c,outerRadius:u,startAngle:d,endAngle:f,clockWise:h}=o,v=(c+u)/2,m=pZ(d,f),g=m>=0?1:-1,y,x;switch(t){case"insideStart":y=d+g*i,x=h;break;case"insideEnd":y=f-g*i,x=!h;break;case"end":y=f+g*i,x=h;break;default:throw new Error("Unsupported position ".concat(t))}x=m<=0?x:!x;var w=Xe(s,l,v,y),S=Xe(s,l,v,y+(x?1:-1)*359),P="M".concat(w.x,",").concat(w.y,`
98
+ A`,",",",0,0,",",",",","Z"])),E.x,E.y,i,i,+(u<0),C.x,C.y,n,n,+(T>180),+(u>0),w.x,w.y,i,i,+(u<0),S.x,S.y)}else x+=Ue(lS||(lS=ho(["L",",","Z"])),t,r);return x},pG={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},MM=e=>{var t=et(e,pG),{cx:r,cy:n,innerRadius:o,outerRadius:i,cornerRadius:a,forceCornerRadius:s,cornerIsExternal:l,startAngle:c,endAngle:u,className:d}=t;if(i<o||c===u)return null;var f=ve("recharts-sector",d),h=i-o,v=Ot(a,h,0,!0),m;return v>0&&Math.abs(c-u)<360?m=fG({cx:r,cy:n,innerRadius:o,outerRadius:i,cornerRadius:Math.min(v,h/2),forceCornerRadius:s,cornerIsExternal:l,startAngle:c,endAngle:u}):m=TM({cx:r,cy:n,innerRadius:o,outerRadius:i,startAngle:c,endAngle:u}),p.createElement("path",tm({},Rt(t),{className:f,d:m}))};function hG(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(nT(t)){if(e==="centric"){var{cx:n,cy:o,innerRadius:i,outerRadius:a,angle:s}=t,l=Xe(n,o,i,s),c=Xe(n,o,a,s);return[{x:l.x,y:l.y},{x:c.x,y:c.y}]}return AM(t)}}var xp={},wp={},Sp={},cS;function mG(){return cS||(cS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=mT();function r(n){return t.isSymbol(n)?NaN:Number(n)}e.toNumber=r})(Sp)),Sp}var uS;function vG(){return uS||(uS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=mG();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})(wp)),wp}var dS;function gG(){return dS||(dS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=vT(),r=vG();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})(xp)),xp}var Pp,fS;function yG(){return fS||(fS=1,Pp=gG().range),Pp}var bG=yG();const kM=Gn(bG);function In(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function xG(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function sg(e){let t,r,n;e.length!==2?(t=In,r=(s,l)=>In(e(s),l),n=(s,l)=>e(s)-l):(t=e===In||e===xG?e:wG,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 d=c+u>>>1;r(s[d],l)<0?c=d+1:u=d}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 d=c+u>>>1;r(s[d],l)<=0?c=d+1:u=d}while(c<u)}return c}function a(s,l,c=0,u=s.length){const d=o(s,l,c,u-1);return d>c&&n(s[d-1],l)>-n(s[d],l)?d-1:d}return{left:o,center:a,right:i}}function wG(){return 0}function DM(e){return e===null?NaN:+e}function*SG(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const PG=sg(In),xs=PG.right;sg(DM).center;class pS extends Map{constructor(t,r=EG){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(hS(this,t))}has(t){return super.has(hS(this,t))}set(t,r){return super.set(CG(this,t),r)}delete(t){return super.delete(OG(this,t))}}function hS({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function CG({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function OG({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function EG(e){return e!==null&&typeof e=="object"?e.valueOf():e}function AG(e=In){if(e===In)return _M;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 _M(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const TG=Math.sqrt(50),MG=Math.sqrt(10),kG=Math.sqrt(2);function Dc(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>=TG?10:i>=MG?5:i>=kG?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?Dc(e,t,r*2):[s,l,c]}function rm(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?Dc(t,e,r):Dc(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 nm(e,t,r){return t=+t,e=+e,r=+r,Dc(e,t,r)[2]}function om(e,t,r){t=+t,e=+e,r=+r;const n=t<e,o=n?nm(t,e,r):nm(e,t,r);return(n?-1:1)*(o<0?1/-o:o)}function mS(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function vS(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function NM(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?_M:AG(o);n>r;){if(n-r>600){const l=n-r+1,c=t-r+1,u=Math.log(l),d=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*d*(l-d)/l)*(c-l/2<0?-1:1),h=Math.max(r,Math.floor(t-c*d/l+f)),v=Math.min(n,Math.floor(t+(l-c)*d/l+f));NM(e,t,h,v,o)}const i=e[t];let a=r,s=n;for(ua(e,r,t),o(e[n],i)>0&&ua(e,r,n);a<s;){for(ua(e,a,s),++a,--s;o(e[a],i)<0;)++a;for(;o(e[s],i)>0;)--s}o(e[r],i)===0?ua(e,r,s):(++s,ua(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function ua(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function DG(e,t,r){if(e=Float64Array.from(SG(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return vS(e);if(t>=1)return mS(e);var n,o=(n-1)*t,i=Math.floor(o),a=mS(NM(e,i).subarray(0,i+1)),s=vS(e.subarray(i+1));return a+(s-a)*(o-i)}}function _G(e,t,r=DM){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 NG(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 fr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function xn(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 im=Symbol("implicit");function lg(){var e=new pS,t=[],r=[],n=im;function o(i){let a=e.get(i);if(a===void 0){if(n!==im)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 pS;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 lg(t,r).unknown(n)},fr.apply(o,arguments),o}function cg(){var e=lg().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 d(){var f=t().length,h=o<n,v=h?o:n,m=h?n:o;i=(m-v)/Math.max(1,f-l+c*2),s&&(i=Math.floor(i)),v+=(m-v-i*(f-l))*u,a=i*(1-l),s&&(v=Math.round(v),a=Math.round(a));var g=NG(f).map(function(y){return v+i*y});return r(h?g.reverse():g)}return e.domain=function(f){return arguments.length?(t(f),d()):t()},e.range=function(f){return arguments.length?([n,o]=f,n=+n,o=+o,d()):[n,o]},e.rangeRound=function(f){return[n,o]=f,n=+n,o=+o,s=!0,d()},e.bandwidth=function(){return a},e.step=function(){return i},e.round=function(f){return arguments.length?(s=!!f,d()):s},e.padding=function(f){return arguments.length?(l=Math.min(1,c=+f),d()):l},e.paddingInner=function(f){return arguments.length?(l=Math.min(1,f),d()):l},e.paddingOuter=function(f){return arguments.length?(c=+f,d()):c},e.align=function(f){return arguments.length?(u=Math.max(0,Math.min(1,f)),d()):u},e.copy=function(){return cg(t(),[n,o]).round(s).paddingInner(l).paddingOuter(c).align(u)},fr.apply(d(),arguments)}function jM(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return jM(t())},e}function jG(){return jM(cg.apply(null,arguments).paddingInner(1))}function ug(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function IM(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function ws(){}var Va=.7,_c=1/Va,wi="\\s*([+-]?\\d+)\\s*",Fa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Lr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",IG=/^#([0-9a-f]{3,8})$/,RG=new RegExp(`^rgb\\(${wi},${wi},${wi}\\)$`),LG=new RegExp(`^rgb\\(${Lr},${Lr},${Lr}\\)$`),$G=new RegExp(`^rgba\\(${wi},${wi},${wi},${Fa}\\)$`),VG=new RegExp(`^rgba\\(${Lr},${Lr},${Lr},${Fa}\\)$`),FG=new RegExp(`^hsl\\(${Fa},${Lr},${Lr}\\)$`),BG=new RegExp(`^hsla\\(${Fa},${Lr},${Lr},${Fa}\\)$`),gS={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};ug(ws,Ba,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:yS,formatHex:yS,formatHex8:WG,formatHsl:zG,formatRgb:bS,toString:bS});function yS(){return this.rgb().formatHex()}function WG(){return this.rgb().formatHex8()}function zG(){return RM(this).formatHsl()}function bS(){return this.rgb().formatRgb()}function Ba(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=IG.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?xS(t):r===3?new Ft(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Pl(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Pl(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=RG.exec(e))?new Ft(t[1],t[2],t[3],1):(t=LG.exec(e))?new Ft(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=$G.exec(e))?Pl(t[1],t[2],t[3],t[4]):(t=VG.exec(e))?Pl(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=FG.exec(e))?PS(t[1],t[2]/100,t[3]/100,1):(t=BG.exec(e))?PS(t[1],t[2]/100,t[3]/100,t[4]):gS.hasOwnProperty(e)?xS(gS[e]):e==="transparent"?new Ft(NaN,NaN,NaN,0):null}function xS(e){return new Ft(e>>16&255,e>>8&255,e&255,1)}function Pl(e,t,r,n){return n<=0&&(e=t=r=NaN),new Ft(e,t,r,n)}function KG(e){return e instanceof ws||(e=Ba(e)),e?(e=e.rgb(),new Ft(e.r,e.g,e.b,e.opacity)):new Ft}function am(e,t,r,n){return arguments.length===1?KG(e):new Ft(e,t,r,n??1)}function Ft(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}ug(Ft,am,IM(ws,{brighter(e){return e=e==null?_c:Math.pow(_c,e),new Ft(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Va:Math.pow(Va,e),new Ft(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ft(Co(this.r),Co(this.g),Co(this.b),Nc(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:wS,formatHex:wS,formatHex8:UG,formatRgb:SS,toString:SS}));function wS(){return`#${mo(this.r)}${mo(this.g)}${mo(this.b)}`}function UG(){return`#${mo(this.r)}${mo(this.g)}${mo(this.b)}${mo((isNaN(this.opacity)?1:this.opacity)*255)}`}function SS(){const e=Nc(this.opacity);return`${e===1?"rgb(":"rgba("}${Co(this.r)}, ${Co(this.g)}, ${Co(this.b)}${e===1?")":`, ${e})`}`}function Nc(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Co(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function mo(e){return e=Co(e),(e<16?"0":"")+e.toString(16)}function PS(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new gr(e,t,r,n)}function RM(e){if(e instanceof gr)return new gr(e.h,e.s,e.l,e.opacity);if(e instanceof ws||(e=Ba(e)),!e)return new gr;if(e instanceof gr)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 gr(a,s,l,e.opacity)}function HG(e,t,r,n){return arguments.length===1?RM(e):new gr(e,t,r,n??1)}function gr(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}ug(gr,HG,IM(ws,{brighter(e){return e=e==null?_c:Math.pow(_c,e),new gr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Va:Math.pow(Va,e),new gr(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 Ft(Cp(e>=240?e-240:e+120,o,n),Cp(e,o,n),Cp(e<120?e+240:e-120,o,n),this.opacity)},clamp(){return new gr(CS(this.h),Cl(this.s),Cl(this.l),Nc(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=Nc(this.opacity);return`${e===1?"hsl(":"hsla("}${CS(this.h)}, ${Cl(this.s)*100}%, ${Cl(this.l)*100}%${e===1?")":`, ${e})`}`}}));function CS(e){return e=(e||0)%360,e<0?e+360:e}function Cl(e){return Math.max(0,Math.min(1,e||0))}function Cp(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 dg=e=>()=>e;function GG(e,t){return function(r){return e+r*t}}function YG(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 qG(e){return(e=+e)==1?LM:function(t,r){return r-t?YG(t,r,e):dg(isNaN(t)?r:t)}}function LM(e,t){var r=t-e;return r?GG(e,r):dg(isNaN(e)?t:e)}const OS=(function e(t){var r=qG(t);function n(o,i){var a=r((o=am(o)).r,(i=am(i)).r),s=r(o.g,i.g),l=r(o.b,i.b),c=LM(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 XG(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 ZG(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function QG(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]=Bi(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 JG(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function jc(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function eY(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]=Bi(e[o],t[o]):n[o]=t[o];return function(i){for(o in r)n[o]=r[o](i);return n}}var sm=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Op=new RegExp(sm.source,"g");function tY(e){return function(){return e}}function rY(e){return function(t){return e(t)+""}}function nY(e,t){var r=sm.lastIndex=Op.lastIndex=0,n,o,i,a=-1,s=[],l=[];for(e=e+"",t=t+"";(n=sm.exec(e))&&(o=Op.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:jc(n,o)})),r=Op.lastIndex;return r<t.length&&(i=t.slice(r),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?rY(l[0].x):tY(t):(t=l.length,function(c){for(var u=0,d;u<t;++u)s[(d=l[u]).i]=d.x(c);return s.join("")})}function Bi(e,t){var r=typeof t,n;return t==null||r==="boolean"?dg(t):(r==="number"?jc:r==="string"?(n=Ba(t))?(t=n,OS):nY:t instanceof Ba?OS:t instanceof Date?JG:ZG(t)?XG:Array.isArray(t)?QG:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?eY:jc)(e,t)}function fg(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function oY(e,t){t===void 0&&(t=e,e=Bi);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 iY(e){return function(){return e}}function Ic(e){return+e}var ES=[0,1];function _t(e){return e}function lm(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:iY(isNaN(t)?NaN:.5)}function aY(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function sY(e,t,r){var n=e[0],o=e[1],i=t[0],a=t[1];return o<n?(n=lm(o,n),i=r(a,i)):(n=lm(n,o),i=r(i,a)),function(s){return i(n(s))}}function lY(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]=lm(e[a],e[a+1]),i[a]=r(t[a],t[a+1]);return function(s){var l=xs(e,s,1,n)-1;return i[l](o[l](s))}}function Ss(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Zu(){var e=ES,t=ES,r=Bi,n,o,i,a=_t,s,l,c;function u(){var f=Math.min(e.length,t.length);return a!==_t&&(a=aY(e[0],e[f-1])),s=f>2?lY:sY,l=c=null,d}function d(f){return f==null||isNaN(f=+f)?i:(l||(l=s(e.map(n),t,r)))(n(a(f)))}return d.invert=function(f){return a(o((c||(c=s(t,e.map(n),jc)))(f)))},d.domain=function(f){return arguments.length?(e=Array.from(f,Ic),u()):e.slice()},d.range=function(f){return arguments.length?(t=Array.from(f),u()):t.slice()},d.rangeRound=function(f){return t=Array.from(f),r=fg,u()},d.clamp=function(f){return arguments.length?(a=f?!0:_t,u()):a!==_t},d.interpolate=function(f){return arguments.length?(r=f,u()):r},d.unknown=function(f){return arguments.length?(i=f,d):i},function(f,h){return n=f,o=h,u()}}function pg(){return Zu()(_t,_t)}function cY(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Rc(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 Ti(e){return e=Rc(Math.abs(e)),e?e[1]:NaN}function uY(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 dY(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var fY=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Wa(e){if(!(t=fY.exec(e)))throw new Error("invalid format: "+e);var t;return new hg({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]})}Wa.prototype=hg.prototype;function hg(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+""}hg.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 pY(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 Lc;function hY(e,t){var r=Rc(e,t);if(!r)return Lc=void 0,e.toPrecision(t);var n=r[0],o=r[1],i=o-(Lc=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")+Rc(e,Math.max(0,t+i-1))[0]}function AS(e,t){var r=Rc(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 TS={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:cY,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)=>AS(e*100,t),r:AS,s:hY,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function MS(e){return e}var kS=Array.prototype.map,DS=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function mY(e){var t=e.grouping===void 0||e.thousands===void 0?MS:uY(kS.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?MS:dY(kS.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(d,f){d=Wa(d);var h=d.fill,v=d.align,m=d.sign,g=d.symbol,y=d.zero,x=d.width,w=d.comma,S=d.precision,P=d.trim,C=d.type;C==="n"?(w=!0,C="g"):TS[C]||(S===void 0&&(S=12),P=!0,C="g"),(y||h==="0"&&v==="=")&&(y=!0,h="0",v="=");var E=(f&&f.prefix!==void 0?f.prefix:"")+(g==="$"?r:g==="#"&&/[boxX]/.test(C)?"0"+C.toLowerCase():""),A=(g==="$"?n:/[%p]/.test(C)?a:"")+(f&&f.suffix!==void 0?f.suffix:""),T=TS[C],M=/[defgprs%]/.test(C);S=S===void 0?6:/[gprs]/.test(C)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function _(k){var N=E,R=A,z,B,F;if(C==="c")R=T(k)+R,k="";else{k=+k;var j=k<0||1/k<0;if(k=isNaN(k)?l:T(Math.abs(k),S),P&&(k=pY(k)),j&&+k==0&&m!=="+"&&(j=!1),N=(j?m==="("?m:s:m==="-"||m==="("?"":m)+N,R=(C==="s"&&!isNaN(k)&&Lc!==void 0?DS[8+Lc/3]:"")+R+(j&&m==="("?")":""),M){for(z=-1,B=k.length;++z<B;)if(F=k.charCodeAt(z),48>F||F>57){R=(F===46?o+k.slice(z+1):k.slice(z))+R,k=k.slice(0,z);break}}}w&&!y&&(k=t(k,1/0));var L=N.length+k.length+R.length,H=L<x?new Array(x-L+1).join(h):"";switch(w&&y&&(k=t(H+k,H.length?x-R.length:1/0),H=""),v){case"<":k=N+k+R+H;break;case"=":k=N+H+k+R;break;case"^":k=H.slice(0,L=H.length>>1)+N+k+R+H.slice(L);break;default:k=H+N+k+R;break}return i(k)}return _.toString=function(){return d+""},_}function u(d,f){var h=Math.max(-8,Math.min(8,Math.floor(Ti(f)/3)))*3,v=Math.pow(10,-h),m=c((d=Wa(d),d.type="f",d),{suffix:DS[8+h/3]});return function(g){return m(v*g)}}return{format:c,formatPrefix:u}}var Ol,mg,$M;vY({thousands:",",grouping:[3],currency:["$",""]});function vY(e){return Ol=mY(e),mg=Ol.format,$M=Ol.formatPrefix,Ol}function gY(e){return Math.max(0,-Ti(Math.abs(e)))}function yY(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ti(t)/3)))*3-Ti(Math.abs(e)))}function bY(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Ti(t)-Ti(e))+1}function VM(e,t,r,n){var o=om(e,t,r),i;switch(n=Wa(n??",f"),n.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(i=yY(o,a))&&(n.precision=i),$M(n,a)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(i=bY(o,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=i-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(i=gY(o))&&(n.precision=i-(n.type==="%")*2);break}}return mg(n)}function Yn(e){var t=e.domain;return e.ticks=function(r){var n=t();return rm(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var o=t();return VM(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=nm(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 FM(){var e=pg();return e.copy=function(){return Ss(e,FM())},fr.apply(e,arguments),Yn(e)}function BM(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,Ic),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return BM(e).unknown(t)},e=arguments.length?Array.from(e,Ic):[0,1],Yn(r)}function WM(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 _S(e){return Math.log(e)}function NS(e){return Math.exp(e)}function xY(e){return-Math.log(-e)}function wY(e){return-Math.exp(-e)}function SY(e){return isFinite(e)?+("1e"+e):e<0?0:e}function PY(e){return e===10?SY:e===Math.E?Math.exp:t=>Math.pow(e,t)}function CY(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 jS(e){return(t,r)=>-e(-t,r)}function vg(e){const t=e(_S,NS),r=t.domain;let n=10,o,i;function a(){return o=CY(n),i=PY(n),r()[0]<0?(o=jS(o),i=jS(i),e(xY,wY)):e(_S,NS),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 d=u<c;d&&([c,u]=[u,c]);let f=o(c),h=o(u),v,m;const g=s==null?10:+s;let y=[];if(!(n%1)&&h-f<g){if(f=Math.floor(f),h=Math.ceil(h),c>0){for(;f<=h;++f)for(v=1;v<n;++v)if(m=f<0?v/i(-f):v*i(f),!(m<c)){if(m>u)break;y.push(m)}}else for(;f<=h;++f)for(v=n-1;v>=1;--v)if(m=f>0?v/i(-f):v*i(f),!(m<c)){if(m>u)break;y.push(m)}y.length*2<g&&(y=rm(c,u,g))}else y=rm(f,h,Math.min(h-f,g)).map(i);return d?y.reverse():y},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=Wa(l)).precision==null&&(l.trim=!0),l=mg(l)),s===1/0)return l;const c=Math.max(1,n*s/t.ticks().length);return u=>{let d=u/i(Math.round(o(u)));return d*n<n-.5&&(d*=n),d<=c?l(u):""}},t.nice=()=>r(WM(r(),{floor:s=>i(Math.floor(o(s))),ceil:s=>i(Math.ceil(o(s)))})),t}function zM(){const e=vg(Zu()).domain([1,10]);return e.copy=()=>Ss(e,zM()).base(e.base()),fr.apply(e,arguments),e}function IS(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function RS(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function gg(e){var t=1,r=e(IS(t),RS(t));return r.constant=function(n){return arguments.length?e(IS(t=+n),RS(t)):t},Yn(r)}function KM(){var e=gg(Zu());return e.copy=function(){return Ss(e,KM()).constant(e.constant())},fr.apply(e,arguments)}function LS(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function OY(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function EY(e){return e<0?-e*e:e*e}function yg(e){var t=e(_t,_t),r=1;function n(){return r===1?e(_t,_t):r===.5?e(OY,EY):e(LS(r),LS(1/r))}return t.exponent=function(o){return arguments.length?(r=+o,n()):r},Yn(t)}function bg(){var e=yg(Zu());return e.copy=function(){return Ss(e,bg()).exponent(e.exponent())},fr.apply(e,arguments),e}function AY(){return bg.apply(null,arguments).exponent(.5)}function $S(e){return Math.sign(e)*e*e}function TY(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function UM(){var e=pg(),t=[0,1],r=!1,n;function o(i){var a=TY(e(i));return isNaN(a)?n:r?Math.round(a):a}return o.invert=function(i){return e.invert($S(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,Ic)).map($S)),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 UM(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},fr.apply(o,arguments),Yn(o)}function HM(){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]=_G(e,a/s);return i}function i(a){return a==null||isNaN(a=+a)?n:t[xs(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(In),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 HM().domain(e).range(t).unknown(n)},fr.apply(i,arguments)}function GM(){var e=0,t=1,r=1,n=[.5],o=[0,1],i;function a(l){return l!=null&&l<=l?o[xs(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 GM().domain([e,t]).range(o).unknown(i)},fr.apply(Yn(a),arguments)}function YM(){var e=[.5],t=[0,1],r,n=1;function o(i){return i!=null&&i<=i?t[xs(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 YM().domain(e).range(t).unknown(r)},fr.apply(o,arguments)}const Ep=new Date,Ap=new Date;function st(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=>st(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)=>(Ep.setTime(+i),Ap.setTime(+a),e(Ep),e(Ap),Math.floor(r(Ep,Ap))),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 $c=st(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);$c.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?st(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):$c);$c.range;const Qr=1e3,ir=Qr*60,Jr=ir*60,an=Jr*24,xg=an*7,VS=an*30,Tp=an*365,vo=st(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Qr)},(e,t)=>(t-e)/Qr,e=>e.getUTCSeconds());vo.range;const wg=st(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Qr)},(e,t)=>{e.setTime(+e+t*ir)},(e,t)=>(t-e)/ir,e=>e.getMinutes());wg.range;const Sg=st(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*ir)},(e,t)=>(t-e)/ir,e=>e.getUTCMinutes());Sg.range;const Pg=st(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Qr-e.getMinutes()*ir)},(e,t)=>{e.setTime(+e+t*Jr)},(e,t)=>(t-e)/Jr,e=>e.getHours());Pg.range;const Cg=st(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Jr)},(e,t)=>(t-e)/Jr,e=>e.getUTCHours());Cg.range;const Ps=st(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ir)/an,e=>e.getDate()-1);Ps.range;const Qu=st(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/an,e=>e.getUTCDate()-1);Qu.range;const qM=st(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/an,e=>Math.floor(e/an));qM.range;function Ko(e){return st(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())*ir)/xg)}const Ju=Ko(0),Vc=Ko(1),MY=Ko(2),kY=Ko(3),Mi=Ko(4),DY=Ko(5),_Y=Ko(6);Ju.range;Vc.range;MY.range;kY.range;Mi.range;DY.range;_Y.range;function Uo(e){return st(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)/xg)}const ed=Uo(0),Fc=Uo(1),NY=Uo(2),jY=Uo(3),ki=Uo(4),IY=Uo(5),RY=Uo(6);ed.range;Fc.range;NY.range;jY.range;ki.range;IY.range;RY.range;const Og=st(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());Og.range;const Eg=st(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());Eg.range;const sn=st(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());sn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:st(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)});sn.range;const ln=st(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());ln.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:st(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)});ln.range;function XM(e,t,r,n,o,i){const a=[[vo,1,Qr],[vo,5,5*Qr],[vo,15,15*Qr],[vo,30,30*Qr],[i,1,ir],[i,5,5*ir],[i,15,15*ir],[i,30,30*ir],[o,1,Jr],[o,3,3*Jr],[o,6,6*Jr],[o,12,12*Jr],[n,1,an],[n,2,2*an],[r,1,xg],[t,1,VS],[t,3,3*VS],[e,1,Tp]];function s(c,u,d){const f=u<c;f&&([c,u]=[u,c]);const h=d&&typeof d.range=="function"?d:l(c,u,d),v=h?h.range(c,+u+1):[];return f?v.reverse():v}function l(c,u,d){const f=Math.abs(u-c)/d,h=sg(([,,g])=>g).right(a,f);if(h===a.length)return e.every(om(c/Tp,u/Tp,d));if(h===0)return $c.every(Math.max(om(c,u,d),1));const[v,m]=a[f/a[h-1][2]<a[h][2]/f?h-1:h];return v.every(m)}return[s,l]}const[LY,$Y]=XM(ln,Eg,ed,qM,Cg,Sg),[VY,FY]=XM(sn,Og,Ju,Ps,Pg,wg);function Mp(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 kp(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 da(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function BY(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=fa(o),u=pa(o),d=fa(i),f=pa(i),h=fa(a),v=pa(a),m=fa(s),g=pa(s),y=fa(l),x=pa(l),w={a:F,A:j,b:L,B:H,c:null,d:US,e:US,f:u8,g:x8,G:S8,H:s8,I:l8,j:c8,L:ZM,m:d8,M:f8,p:re,q:le,Q:YS,s:qS,S:p8,u:h8,U:m8,V:v8,w:g8,W:y8,x:null,X:null,y:b8,Y:w8,Z:P8,"%":GS},S={a:ae,A:oe,b:Se,B:Me,c:null,d:HS,e:HS,f:A8,g:L8,G:V8,H:C8,I:O8,j:E8,L:JM,m:T8,M:M8,p:K,q:fe,Q:YS,s:qS,S:k8,u:D8,U:_8,V:N8,w:j8,W:I8,x:null,X:null,y:R8,Y:$8,Z:F8,"%":GS},P={a:M,A:_,b:k,B:N,c:R,d:zS,e:zS,f:n8,g:WS,G:BS,H:KS,I:KS,j:JY,L:r8,m:QY,M:e8,p:T,q:ZY,Q:i8,s:a8,S:t8,u:HY,U:GY,V:YY,w:UY,W:qY,x:z,X:B,y:WS,Y:BS,Z:XY,"%":o8};w.x=C(r,w),w.X=C(n,w),w.c=C(t,w),S.x=C(r,S),S.X=C(n,S),S.c=C(t,S);function C($,G){return function(W){var V=[],he=-1,ue=0,Ye=$.length,tt,zt,el;for(W instanceof Date||(W=new Date(+W));++he<Ye;)$.charCodeAt(he)===37&&(V.push($.slice(ue,he)),(zt=FS[tt=$.charAt(++he)])!=null?tt=$.charAt(++he):zt=tt==="e"?" ":"0",(el=G[tt])&&(tt=el(W,zt)),V.push(tt),ue=he+1);return V.push($.slice(ue,he)),V.join("")}}function E($,G){return function(W){var V=da(1900,void 0,1),he=A(V,$,W+="",0),ue,Ye;if(he!=W.length)return null;if("Q"in V)return new Date(V.Q);if("s"in V)return new Date(V.s*1e3+("L"in V?V.L:0));if(G&&!("Z"in V)&&(V.Z=0),"p"in V&&(V.H=V.H%12+V.p*12),V.m===void 0&&(V.m="q"in V?V.q:0),"V"in V){if(V.V<1||V.V>53)return null;"w"in V||(V.w=1),"Z"in V?(ue=kp(da(V.y,0,1)),Ye=ue.getUTCDay(),ue=Ye>4||Ye===0?Fc.ceil(ue):Fc(ue),ue=Qu.offset(ue,(V.V-1)*7),V.y=ue.getUTCFullYear(),V.m=ue.getUTCMonth(),V.d=ue.getUTCDate()+(V.w+6)%7):(ue=Mp(da(V.y,0,1)),Ye=ue.getDay(),ue=Ye>4||Ye===0?Vc.ceil(ue):Vc(ue),ue=Ps.offset(ue,(V.V-1)*7),V.y=ue.getFullYear(),V.m=ue.getMonth(),V.d=ue.getDate()+(V.w+6)%7)}else("W"in V||"U"in V)&&("w"in V||(V.w="u"in V?V.u%7:"W"in V?1:0),Ye="Z"in V?kp(da(V.y,0,1)).getUTCDay():Mp(da(V.y,0,1)).getDay(),V.m=0,V.d="W"in V?(V.w+6)%7+V.W*7-(Ye+5)%7:V.w+V.U*7-(Ye+6)%7);return"Z"in V?(V.H+=V.Z/100|0,V.M+=V.Z%100,kp(V)):Mp(V)}}function A($,G,W,V){for(var he=0,ue=G.length,Ye=W.length,tt,zt;he<ue;){if(V>=Ye)return-1;if(tt=G.charCodeAt(he++),tt===37){if(tt=G.charAt(he++),zt=P[tt in FS?G.charAt(he++):tt],!zt||(V=zt($,W,V))<0)return-1}else if(tt!=W.charCodeAt(V++))return-1}return V}function T($,G,W){var V=c.exec(G.slice(W));return V?($.p=u.get(V[0].toLowerCase()),W+V[0].length):-1}function M($,G,W){var V=h.exec(G.slice(W));return V?($.w=v.get(V[0].toLowerCase()),W+V[0].length):-1}function _($,G,W){var V=d.exec(G.slice(W));return V?($.w=f.get(V[0].toLowerCase()),W+V[0].length):-1}function k($,G,W){var V=y.exec(G.slice(W));return V?($.m=x.get(V[0].toLowerCase()),W+V[0].length):-1}function N($,G,W){var V=m.exec(G.slice(W));return V?($.m=g.get(V[0].toLowerCase()),W+V[0].length):-1}function R($,G,W){return A($,t,G,W)}function z($,G,W){return A($,r,G,W)}function B($,G,W){return A($,n,G,W)}function F($){return a[$.getDay()]}function j($){return i[$.getDay()]}function L($){return l[$.getMonth()]}function H($){return s[$.getMonth()]}function re($){return o[+($.getHours()>=12)]}function le($){return 1+~~($.getMonth()/3)}function ae($){return a[$.getUTCDay()]}function oe($){return i[$.getUTCDay()]}function Se($){return l[$.getUTCMonth()]}function Me($){return s[$.getUTCMonth()]}function K($){return o[+($.getUTCHours()>=12)]}function fe($){return 1+~~($.getUTCMonth()/3)}return{format:function($){var G=C($+="",w);return G.toString=function(){return $},G},parse:function($){var G=E($+="",!1);return G.toString=function(){return $},G},utcFormat:function($){var G=C($+="",S);return G.toString=function(){return $},G},utcParse:function($){var G=E($+="",!0);return G.toString=function(){return $},G}}}var FS={"-":"",_:" ",0:"0"},mt=/^\s*\d+/,WY=/^%/,zY=/[\\^$*+?|[\]().{}]/g;function ge(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 KY(e){return e.replace(zY,"\\$&")}function fa(e){return new RegExp("^(?:"+e.map(KY).join("|")+")","i")}function pa(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function UY(e,t,r){var n=mt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function HY(e,t,r){var n=mt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function GY(e,t,r){var n=mt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function YY(e,t,r){var n=mt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function qY(e,t,r){var n=mt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function BS(e,t,r){var n=mt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function WS(e,t,r){var n=mt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function XY(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 ZY(e,t,r){var n=mt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function QY(e,t,r){var n=mt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function zS(e,t,r){var n=mt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function JY(e,t,r){var n=mt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function KS(e,t,r){var n=mt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function e8(e,t,r){var n=mt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function t8(e,t,r){var n=mt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function r8(e,t,r){var n=mt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function n8(e,t,r){var n=mt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function o8(e,t,r){var n=WY.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function i8(e,t,r){var n=mt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function a8(e,t,r){var n=mt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function US(e,t){return ge(e.getDate(),t,2)}function s8(e,t){return ge(e.getHours(),t,2)}function l8(e,t){return ge(e.getHours()%12||12,t,2)}function c8(e,t){return ge(1+Ps.count(sn(e),e),t,3)}function ZM(e,t){return ge(e.getMilliseconds(),t,3)}function u8(e,t){return ZM(e,t)+"000"}function d8(e,t){return ge(e.getMonth()+1,t,2)}function f8(e,t){return ge(e.getMinutes(),t,2)}function p8(e,t){return ge(e.getSeconds(),t,2)}function h8(e){var t=e.getDay();return t===0?7:t}function m8(e,t){return ge(Ju.count(sn(e)-1,e),t,2)}function QM(e){var t=e.getDay();return t>=4||t===0?Mi(e):Mi.ceil(e)}function v8(e,t){return e=QM(e),ge(Mi.count(sn(e),e)+(sn(e).getDay()===4),t,2)}function g8(e){return e.getDay()}function y8(e,t){return ge(Vc.count(sn(e)-1,e),t,2)}function b8(e,t){return ge(e.getFullYear()%100,t,2)}function x8(e,t){return e=QM(e),ge(e.getFullYear()%100,t,2)}function w8(e,t){return ge(e.getFullYear()%1e4,t,4)}function S8(e,t){var r=e.getDay();return e=r>=4||r===0?Mi(e):Mi.ceil(e),ge(e.getFullYear()%1e4,t,4)}function P8(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ge(t/60|0,"0",2)+ge(t%60,"0",2)}function HS(e,t){return ge(e.getUTCDate(),t,2)}function C8(e,t){return ge(e.getUTCHours(),t,2)}function O8(e,t){return ge(e.getUTCHours()%12||12,t,2)}function E8(e,t){return ge(1+Qu.count(ln(e),e),t,3)}function JM(e,t){return ge(e.getUTCMilliseconds(),t,3)}function A8(e,t){return JM(e,t)+"000"}function T8(e,t){return ge(e.getUTCMonth()+1,t,2)}function M8(e,t){return ge(e.getUTCMinutes(),t,2)}function k8(e,t){return ge(e.getUTCSeconds(),t,2)}function D8(e){var t=e.getUTCDay();return t===0?7:t}function _8(e,t){return ge(ed.count(ln(e)-1,e),t,2)}function ek(e){var t=e.getUTCDay();return t>=4||t===0?ki(e):ki.ceil(e)}function N8(e,t){return e=ek(e),ge(ki.count(ln(e),e)+(ln(e).getUTCDay()===4),t,2)}function j8(e){return e.getUTCDay()}function I8(e,t){return ge(Fc.count(ln(e)-1,e),t,2)}function R8(e,t){return ge(e.getUTCFullYear()%100,t,2)}function L8(e,t){return e=ek(e),ge(e.getUTCFullYear()%100,t,2)}function $8(e,t){return ge(e.getUTCFullYear()%1e4,t,4)}function V8(e,t){var r=e.getUTCDay();return e=r>=4||r===0?ki(e):ki.ceil(e),ge(e.getUTCFullYear()%1e4,t,4)}function F8(){return"+0000"}function GS(){return"%"}function YS(e){return+e}function qS(e){return Math.floor(+e/1e3)}var ri,tk,rk;B8({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 B8(e){return ri=BY(e),tk=ri.format,ri.parse,rk=ri.utcFormat,ri.utcParse,ri}function W8(e){return new Date(e)}function z8(e){return e instanceof Date?+e:+new Date(+e)}function Ag(e,t,r,n,o,i,a,s,l,c){var u=pg(),d=u.invert,f=u.domain,h=c(".%L"),v=c(":%S"),m=c("%I:%M"),g=c("%I %p"),y=c("%a %d"),x=c("%b %d"),w=c("%B"),S=c("%Y");function P(C){return(l(C)<C?h:s(C)<C?v:a(C)<C?m:i(C)<C?g:n(C)<C?o(C)<C?y:x:r(C)<C?w:S)(C)}return u.invert=function(C){return new Date(d(C))},u.domain=function(C){return arguments.length?f(Array.from(C,z8)):f().map(W8)},u.ticks=function(C){var E=f();return e(E[0],E[E.length-1],C??10)},u.tickFormat=function(C,E){return E==null?P:c(E)},u.nice=function(C){var E=f();return(!C||typeof C.range!="function")&&(C=t(E[0],E[E.length-1],C??10)),C?f(WM(E,C)):u},u.copy=function(){return Ss(u,Ag(e,t,r,n,o,i,a,s,l,c))},u}function K8(){return fr.apply(Ag(VY,FY,sn,Og,Ju,Ps,Pg,wg,vo,tk).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function U8(){return fr.apply(Ag(LY,$Y,ln,Eg,ed,Qu,Cg,Sg,vo,rk).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function td(){var e=0,t=1,r,n,o,i,a=_t,s=!1,l;function c(d){return d==null||isNaN(d=+d)?l:a(o===0?.5:(d=(i(d)-r)*o,s?Math.max(0,Math.min(1,d)):d))}c.domain=function(d){return arguments.length?([e,t]=d,r=i(e=+e),n=i(t=+t),o=r===n?0:1/(n-r),c):[e,t]},c.clamp=function(d){return arguments.length?(s=!!d,c):s},c.interpolator=function(d){return arguments.length?(a=d,c):a};function u(d){return function(f){var h,v;return arguments.length?([h,v]=f,a=d(h,v),c):[a(0),a(1)]}}return c.range=u(Bi),c.rangeRound=u(fg),c.unknown=function(d){return arguments.length?(l=d,c):l},function(d){return i=d,r=d(e),n=d(t),o=r===n?0:1/(n-r),c}}function qn(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function nk(){var e=Yn(td()(_t));return e.copy=function(){return qn(e,nk())},xn.apply(e,arguments)}function ok(){var e=vg(td()).domain([1,10]);return e.copy=function(){return qn(e,ok()).base(e.base())},xn.apply(e,arguments)}function ik(){var e=gg(td());return e.copy=function(){return qn(e,ik()).constant(e.constant())},xn.apply(e,arguments)}function Tg(){var e=yg(td());return e.copy=function(){return qn(e,Tg()).exponent(e.exponent())},xn.apply(e,arguments)}function H8(){return Tg.apply(null,arguments).exponent(.5)}function ak(){var e=[],t=_t;function r(n){if(n!=null&&!isNaN(n=+n))return t((xs(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(In),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)=>DG(e,i/n))},r.copy=function(){return ak(t).domain(e)},xn.apply(r,arguments)}function rd(){var e=0,t=.5,r=1,n=1,o,i,a,s,l,c=_t,u,d=!1,f;function h(m){return isNaN(m=+m)?f:(m=.5+((m=+u(m))-i)*(n*m<n*i?s:l),c(d?Math.max(0,Math.min(1,m)):m))}h.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,h):[e,t,r]},h.clamp=function(m){return arguments.length?(d=!!m,h):d},h.interpolator=function(m){return arguments.length?(c=m,h):c};function v(m){return function(g){var y,x,w;return arguments.length?([y,x,w]=g,c=oY(m,[y,x,w]),h):[c(0),c(.5),c(1)]}}return h.range=v(Bi),h.rangeRound=v(fg),h.unknown=function(m){return arguments.length?(f=m,h):f},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,h}}function sk(){var e=Yn(rd()(_t));return e.copy=function(){return qn(e,sk())},xn.apply(e,arguments)}function lk(){var e=vg(rd()).domain([.1,1,10]);return e.copy=function(){return qn(e,lk()).base(e.base())},xn.apply(e,arguments)}function ck(){var e=gg(rd());return e.copy=function(){return qn(e,ck()).constant(e.constant())},xn.apply(e,arguments)}function Mg(){var e=yg(rd());return e.copy=function(){return qn(e,Mg()).exponent(e.exponent())},xn.apply(e,arguments)}function G8(){return Mg.apply(null,arguments).exponent(.5)}const xa=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:cg,scaleDiverging:sk,scaleDivergingLog:lk,scaleDivergingPow:Mg,scaleDivergingSqrt:G8,scaleDivergingSymlog:ck,scaleIdentity:BM,scaleImplicit:im,scaleLinear:FM,scaleLog:zM,scaleOrdinal:lg,scalePoint:jG,scalePow:bg,scaleQuantile:HM,scaleQuantize:GM,scaleRadial:UM,scaleSequential:nk,scaleSequentialLog:ok,scaleSequentialPow:Tg,scaleSequentialQuantile:ak,scaleSequentialSqrt:H8,scaleSequentialSymlog:ik,scaleSqrt:AY,scaleSymlog:KM,scaleThreshold:YM,scaleTime:K8,scaleUtc:U8,tickFormat:VM},Symbol.toStringTag,{value:"Module"}));var wn=e=>e.chartData,nd=I([wn],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),kg=(e,t,r,n)=>n?nd(e):wn(e),Y8=(e,t,r)=>r?nd(e):wn(e);function cn(e){if(Array.isArray(e)&&e.length===2){var[t,r]=e;if(pe(t)&&pe(r))return!0}return!1}function XS(e,t,r){return r?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function uk(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[r,n]=e,o,i;if(pe(r))o=r;else if(typeof r=="function")return;if(pe(n))i=n;else if(typeof n=="function")return;var a=[o,i];if(cn(a))return a}}function q8(e,t,r){if(!(!r&&t==null)){if(typeof e=="function"&&t!=null)try{var n=e(t,r);if(cn(n))return XS(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(Y(o))a=o;else if(typeof o=="function")try{t!=null&&(a=o(t?.[0]))}catch{}else if(typeof o=="string"&&a0.test(o)){var l=a0.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(Y(i))s=i;else if(typeof i=="function")try{t!=null&&(s=i(t?.[1]))}catch{}else if(typeof i=="string"&&s0.test(i)){var u=s0.exec(i);if(u==null||u[1]==null||t==null)s=void 0;else{var d=+u[1];s=t[1]+d}}else s=t?.[1];var f=[a,s];if(cn(f))return t==null?f:XS(f,t,r)}}}var Wi=1e9,X8={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},_g,$e=!0,dr="[DecimalError] ",Oo=dr+"Invalid argument: ",Dg=dr+"Exponent out of range: ",zi=Math.floor,co=Math.pow,Z8=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Yt,dt=1e7,je=7,dk=9007199254740991,Bc=zi(dk/je),q={};q.absoluteValue=q.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};q.comparedTo=q.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};q.decimalPlaces=q.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*je;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};q.dividedBy=q.div=function(e){return rn(this,new this.constructor(e))};q.dividedToIntegerBy=q.idiv=function(e){var t=this,r=t.constructor;return ke(rn(t,new r(e),0,1),r.precision)};q.equals=q.eq=function(e){return!this.cmp(e)};q.exponent=function(){return Qe(this)};q.greaterThan=q.gt=function(e){return this.cmp(e)>0};q.greaterThanOrEqualTo=q.gte=function(e){return this.cmp(e)>=0};q.isInteger=q.isint=function(){return this.e>this.d.length-2};q.isNegative=q.isneg=function(){return this.s<0};q.isPositive=q.ispos=function(){return this.s>0};q.isZero=function(){return this.s===0};q.lessThan=q.lt=function(e){return this.cmp(e)<0};q.lessThanOrEqualTo=q.lte=function(e){return this.cmp(e)<1};q.logarithm=q.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(Yt))throw Error(dr+"NaN");if(r.s<1)throw Error(dr+(r.s?"NaN":"-Infinity"));return r.eq(Yt)?new n(0):($e=!1,t=rn(za(r,i),za(e,i),i),$e=!0,ke(t,o))};q.minus=q.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?hk(t,e):fk(t,(e.s=-e.s,e))};q.modulo=q.mod=function(e){var t,r=this,n=r.constructor,o=n.precision;if(e=new n(e),!e.s)throw Error(dr+"NaN");return r.s?($e=!1,t=rn(r,e,0,1).times(e),$e=!0,r.minus(t)):ke(new n(r),o)};q.naturalExponential=q.exp=function(){return pk(this)};q.naturalLogarithm=q.ln=function(){return za(this)};q.negated=q.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};q.plus=q.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?fk(t,e):hk(t,(e.s=-e.s,e))};q.precision=q.sd=function(e){var t,r,n,o=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Oo+e);if(t=Qe(o)+1,n=o.d.length-1,r=n*je+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};q.squareRoot=q.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(dr+"NaN")}for(e=Qe(s),$e=!1,o=Math.sqrt(+s),o==0||o==1/0?(t=jr(s.d),(t.length+e)%2==0&&(t+="0"),o=Math.sqrt(t),e=zi((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(rn(s,i,a+2)).times(.5),jr(i.d).slice(0,a)===(t=jr(n.d)).slice(0,a)){if(t=t.slice(a-3,a+1),o==a&&t=="4999"){if(ke(i,r+1,0),i.times(i).eq(s)){n=i;break}}else if(t!="9999")break;a+=4}return $e=!0,ke(n,r)};q.times=q.mul=function(e){var t,r,n,o,i,a,s,l,c,u=this,d=u.constructor,f=u.d,h=(e=new d(e)).d;if(!u.s||!e.s)return new d(0);for(e.s*=u.s,r=u.e+e.e,l=f.length,c=h.length,l<c&&(i=f,f=h,h=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]+h[n]*f[o-n-1]+t,i[o--]=s%dt|0,t=s/dt|0;i[o]=(i[o]+t)%dt|0}for(;!i[--a];)i.pop();return t?++r:i.shift(),e.d=i,e.e=r,$e?ke(e,d.precision):e};q.toDecimalPlaces=q.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(zr(e,0,Wi),t===void 0?t=n.rounding:zr(t,0,8),ke(r,e+Qe(r)+1,t))};q.toExponential=function(e,t){var r,n=this,o=n.constructor;return e===void 0?r=Io(n,!0):(zr(e,0,Wi),t===void 0?t=o.rounding:zr(t,0,8),n=ke(new o(n),e+1,t),r=Io(n,!0,e+1)),r};q.toFixed=function(e,t){var r,n,o=this,i=o.constructor;return e===void 0?Io(o):(zr(e,0,Wi),t===void 0?t=i.rounding:zr(t,0,8),n=ke(new i(o),e+Qe(o)+1,t),r=Io(n.abs(),!1,e+Qe(n)+1),o.isneg()&&!o.isZero()?"-"+r:r)};q.toInteger=q.toint=function(){var e=this,t=e.constructor;return ke(new t(e),Qe(e)+1,t.rounding)};q.toNumber=function(){return+this};q.toPower=q.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(Yt);if(s=new l(s),!s.s){if(e.s<1)throw Error(dr+"Infinity");return s}if(s.eq(Yt))return s;if(n=l.precision,e.eq(Yt))return ke(s,n);if(t=e.e,r=e.d.length-1,a=t>=r,i=s.s,a){if((r=u<0?-u:u)<=dk){for(o=new l(Yt),t=Math.ceil(n/je+4),$e=!1;r%2&&(o=o.times(s),QS(o.d,t)),r=zi(r/2),r!==0;)s=s.times(s),QS(s.d,t);return $e=!0,e.s<0?new l(Yt).div(o):ke(o,n)}}else if(i<0)throw Error(dr+"NaN");return i=i<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,$e=!1,o=e.times(za(s,n+c)),$e=!0,o=pk(o),o.s=i,o};q.toPrecision=function(e,t){var r,n,o=this,i=o.constructor;return e===void 0?(r=Qe(o),n=Io(o,r<=i.toExpNeg||r>=i.toExpPos)):(zr(e,1,Wi),t===void 0?t=i.rounding:zr(t,0,8),o=ke(new i(o),e,t),r=Qe(o),n=Io(o,e<=r||r<=i.toExpNeg,e)),n};q.toSignificantDigits=q.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(zr(e,1,Wi),t===void 0?t=n.rounding:zr(t,0,8)),ke(new n(r),e,t)};q.toString=q.valueOf=q.val=q.toJSON=q[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Qe(e),r=e.constructor;return Io(e,t<=r.toExpNeg||t>=r.toExpPos)};function fk(e,t){var r,n,o,i,a,s,l,c,u=e.constructor,d=u.precision;if(!e.s||!t.s)return t.s||(t=new u(e)),$e?ke(t,d):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(d/je),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)/dt|0,l[i]%=dt;for(r&&(l.unshift(r),++o),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=o,$e?ke(t,d):t}function zr(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Oo+e)}function jr(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=je-n.length,r&&(i+=kn(r)),i+=n;a=e[t],n=a+"",r=je-n.length,r&&(i+=kn(r))}else if(a===0)return"0";for(;a%10===0;)a/=10;return i+a}var rn=(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%dt|0,a=i/dt|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*dt+n[i]-o[i];for(;!n[0]&&n.length>1;)n.shift()}return function(n,o,i,a){var s,l,c,u,d,f,h,v,m,g,y,x,w,S,P,C,E,A,T=n.constructor,M=n.s==o.s?1:-1,_=n.d,k=o.d;if(!n.s)return new T(n);if(!o.s)throw Error(dr+"Division by zero");for(l=n.e-o.e,E=k.length,P=_.length,h=new T(M),v=h.d=[],c=0;k[c]==(_[c]||0);)++c;if(k[c]>(_[c]||0)&&--l,i==null?x=i=T.precision:a?x=i+(Qe(n)-Qe(o))+1:x=i,x<0)return new T(0);if(x=x/je+2|0,c=0,E==1)for(u=0,k=k[0],x++;(c<P||u)&&x--;c++)w=u*dt+(_[c]||0),v[c]=w/k|0,u=w%k|0;else{for(u=dt/(k[0]+1)|0,u>1&&(k=e(k,u),_=e(_,u),E=k.length,P=_.length),S=E,m=_.slice(0,E),g=m.length;g<E;)m[g++]=0;A=k.slice(),A.unshift(0),C=k[0],k[1]>=dt/2&&++C;do u=0,s=t(k,m,E,g),s<0?(y=m[0],E!=g&&(y=y*dt+(m[1]||0)),u=y/C|0,u>1?(u>=dt&&(u=dt-1),d=e(k,u),f=d.length,g=m.length,s=t(d,m,f,g),s==1&&(u--,r(d,E<f?A:k,f))):(u==0&&(s=u=1),d=k.slice()),f=d.length,f<g&&d.unshift(0),r(m,d,g),s==-1&&(g=m.length,s=t(k,m,E,g),s<1&&(u++,r(m,E<g?A:k,g))),g=m.length):s===0&&(u++,m=[0]),v[c++]=u,s&&m[0]?m[g++]=_[S]||0:(m=[_[S]],g=1);while((S++<P||m[0]!==void 0)&&x--)}return v[0]||v.shift(),h.e=l,ke(h,a?i+Qe(h)+1:i)}})();function pk(e,t){var r,n,o,i,a,s,l=0,c=0,u=e.constructor,d=u.precision;if(Qe(e)>16)throw Error(Dg+Qe(e));if(!e.s)return new u(Yt);for($e=!1,s=d,a=new u(.03125);e.abs().gte(.1);)e=e.times(a),c+=5;for(n=Math.log(co(2,c))/Math.LN10*2+5|0,s+=n,r=o=i=new u(Yt),u.precision=s;;){if(o=ke(o.times(e),s),r=r.times(++l),a=i.plus(rn(o,r,s)),jr(a.d).slice(0,s)===jr(i.d).slice(0,s)){for(;c--;)i=ke(i.times(i),s);return u.precision=d,t==null?($e=!0,ke(i,d)):i}i=a}}function Qe(e){for(var t=e.e*je,r=e.d[0];r>=10;r/=10)t++;return t}function Dp(e,t,r){if(t>e.LN10.sd())throw $e=!0,r&&(e.precision=r),Error(dr+"LN10 precision limit exceeded");return ke(new e(e.LN10),t)}function kn(e){for(var t="";e--;)t+="0";return t}function za(e,t){var r,n,o,i,a,s,l,c,u,d=1,f=10,h=e,v=h.d,m=h.constructor,g=m.precision;if(h.s<1)throw Error(dr+(h.s?"NaN":"-Infinity"));if(h.eq(Yt))return new m(0);if(t==null?($e=!1,c=g):c=t,h.eq(10))return t==null&&($e=!0),Dp(m,c);if(c+=f,m.precision=c,r=jr(v),n=r.charAt(0),i=Qe(h),Math.abs(i)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)h=h.times(e),r=jr(h.d),n=r.charAt(0),d++;i=Qe(h),n>1?(h=new m("0."+r),i++):h=new m(n+"."+r.slice(1))}else return l=Dp(m,c+2,g).times(i+""),h=za(new m(n+"."+r.slice(1)),c-f).plus(l),m.precision=g,t==null?($e=!0,ke(h,g)):h;for(s=a=h=rn(h.minus(Yt),h.plus(Yt),c),u=ke(h.times(h),c),o=3;;){if(a=ke(a.times(u),c),l=s.plus(rn(a,new m(o),c)),jr(l.d).slice(0,c)===jr(s.d).slice(0,c))return s=s.times(2),i!==0&&(s=s.plus(Dp(m,c+2,g).times(i+""))),s=rn(s,new m(d),c),m.precision=g,t==null?($e=!0,ke(s,g)):s;s=l,o+=2}}function ZS(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=zi(r/je),e.d=[],n=(r+1)%je,r<0&&(n+=je),n<o){for(n&&e.d.push(+t.slice(0,n)),o-=je;n<o;)e.d.push(+t.slice(n,n+=je));t=t.slice(n),n=je-t.length}else n-=o;for(;n--;)t+="0";if(e.d.push(+t),$e&&(e.e>Bc||e.e<-Bc))throw Error(Dg+r)}else e.s=0,e.e=0,e.d=[0];return e}function ke(e,t,r){var n,o,i,a,s,l,c,u,d=e.d;for(a=1,i=d[0];i>=10;i/=10)a++;if(n=t-a,n<0)n+=je,o=t,c=d[u=0];else{if(u=Math.ceil((n+1)/je),i=d.length,u>=i)return e;for(c=i=d[u],a=1;i>=10;i/=10)a++;n%=je,o=n-je+a}if(r!==void 0&&(i=co(10,a-o-1),s=c/i%10|0,l=t<0||d[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/co(10,a-o):0:d[u-1])%10&1||r==(e.s<0?8:7))),t<1||!d[0])return l?(i=Qe(e),d.length=1,t=t-i-1,d[0]=co(10,(je-t%je)%je),e.e=zi(-t/je)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(n==0?(d.length=u,i=1,u--):(d.length=u+1,i=co(10,je-n),d[u]=o>0?(c/co(10,a-o)%co(10,o)|0)*i:0),l)for(;;)if(u==0){(d[0]+=i)==dt&&(d[0]=1,++e.e);break}else{if(d[u]+=i,d[u]!=dt)break;d[u--]=0,i=1}for(n=d.length;d[--n]===0;)d.pop();if($e&&(e.e>Bc||e.e<-Bc))throw Error(Dg+Qe(e));return e}function hk(e,t){var r,n,o,i,a,s,l,c,u,d,f=e.constructor,h=f.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new f(e),$e?ke(t,h):t;if(l=e.d,d=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=d.length):(r=d,n=c,s=l.length),o=Math.max(Math.ceil(h/je),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=d.length,u=o<s,u&&(s=o),o=0;o<s;o++)if(l[o]!=d[o]){u=l[o]<d[o];break}a=0}for(u&&(r=l,l=d,d=r,t.s=-t.s),s=l.length,o=d.length-s;o>0;--o)l[s++]=0;for(o=d.length;o>a;){if(l[--o]<d[o]){for(i=o;i&&l[--i]===0;)l[i]=dt-1;--l[i],l[o]+=dt}l[o]-=d[o]}for(;l[--s]===0;)l.pop();for(;l[0]===0;l.shift())--n;return l[0]?(t.d=l,t.e=n,$e?ke(t,h):t):new f(0)}function Io(e,t,r){var n,o=Qe(e),i=jr(e.d),a=i.length;return t?(r&&(n=r-a)>0?i=i.charAt(0)+"."+i.slice(1)+kn(n):a>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(o<0?"e":"e+")+o):o<0?(i="0."+kn(-o-1)+i,r&&(n=r-a)>0&&(i+=kn(n))):o>=a?(i+=kn(o+1-a),r&&(n=r-o-1)>0&&(i=i+"."+kn(n))):((n=o+1)<a&&(i=i.slice(0,n)+"."+i.slice(n)),r&&(n=r-a)>0&&(o+1===a&&(i+="."),i+=kn(n))),e.s<0?"-"+i:i}function QS(e,t){if(e.length>t)return e.length=t,!0}function mk(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(Oo+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 ZS(a,i.toString())}else if(typeof i!="string")throw Error(Oo+i);if(i.charCodeAt(0)===45?(i=i.slice(1),a.s=-1):a.s=1,Z8.test(i))ZS(a,i);else throw Error(Oo+i)}if(o.prototype=q,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=mk,o.config=o.set=Q8,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 Q8(e){if(!e||typeof e!="object")throw Error(dr+"Object expected");var t,r,n,o=["precision",1,Wi,"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(zi(n)===n&&n>=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(Oo+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Oo+r+": "+n);return this}var _g=mk(X8);Yt=new _g(1);const Ce=_g;function vk(e){var t;return e===0?t=1:t=Math.floor(new Ce(e).abs().log(10).toNumber())+1,t}function gk(e,t,r){for(var n=new Ce(e),o=0,i=[];n.lt(t)&&o<1e5;)i.push(n.toNumber()),n=n.add(r),o++;return i}var yk=e=>{var[t,r]=e,[n,o]=[t,r];return t>r&&([n,o]=[r,t]),[n,o]},bk=(e,t,r)=>{if(e.lte(0))return new Ce(0);var n=vk(e.toNumber()),o=new Ce(10).pow(n),i=e.div(o),a=n!==1?.05:.1,s=new Ce(Math.ceil(i.div(a).toNumber())).add(r).mul(a),l=s.mul(o);return t?new Ce(l.toNumber()):new Ce(Math.ceil(l.toNumber()))},J8=(e,t,r)=>{var n=new Ce(1),o=new Ce(e);if(!o.isint()&&r){var i=Math.abs(e);i<1?(n=new Ce(10).pow(vk(e)-1),o=new Ce(Math.floor(o.div(n).toNumber())).mul(n)):i>1&&(o=new Ce(Math.floor(e)))}else e===0?o=new Ce(Math.floor((t-1)/2)):r||(o=new Ce(Math.floor(e)));for(var a=Math.floor((t-1)/2),s=[],l=0;l<t;l++)s.push(o.add(new Ce(l-a).mul(n)).toNumber());return s},xk=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 Ce(0),tickMin:new Ce(0),tickMax:new Ce(0)};var a=bk(new Ce(r).sub(t).div(n-1),o,i),s;t<=0&&r>=0?s=new Ce(0):(s=new Ce(t).add(r).div(2),s=s.sub(new Ce(s).mod(a)));var l=Math.ceil(s.sub(t).div(a).toNumber()),c=Math.ceil(new Ce(r).sub(s).div(a).toNumber()),u=l+c+1;return u>n?xk(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 Ce(l).mul(a)),tickMax:s.add(new Ce(c).mul(a))})},eq=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]=yk([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 J8(s,o,i);var{step:u,tickMin:d,tickMax:f}=xk(s,l,a,i,0),h=gk(d,f.add(new Ce(.1).mul(u)),u);return r>n?h.reverse():h},tq=function(t,r){var[n,o]=t,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,[a,s]=yk([n,o]);if(a===-1/0||s===1/0)return[n,o];if(a===s)return[a];var l=Math.max(r,2),c=bk(new Ce(s).sub(a).div(l-1),i,0),u=[...gk(new Ce(a),new Ce(s),c),s];return i===!1&&(u=u.map(d=>Math.round(d))),n>o?u.reverse():u},wk=e=>e.rootProps.maxBarSize,rq=e=>e.rootProps.barGap,Sk=e=>e.rootProps.barCategoryGap,nq=e=>e.rootProps.barSize,Cs=e=>e.rootProps.stackOffset,Pk=e=>e.rootProps.reverseStackOrder,Ng=e=>e.options.chartName,jg=e=>e.rootProps.syncId,Ck=e=>e.rootProps.syncMethod,Ig=e=>e.options.eventEmitter,Ze={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},oo={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},Ar={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},od=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function id(e,t,r){if(r!=="auto")return r;if(e!=null)return gn(e,t)?"category":"number"}function JS(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 Wc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?JS(Object(r),!0).forEach(function(n){oq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):JS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function oq(e,t,r){return(t=iq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iq(e){var t=aq(e,"string");return typeof t=="symbol"?t:t+""}function aq(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 eP={allowDataOverflow:oo.allowDataOverflow,allowDecimals:oo.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:oo.angleAxisId,includeHidden:!1,name:void 0,reversed:oo.reversed,scale:oo.scale,tick:oo.tick,tickCount:void 0,ticks:void 0,type:oo.type,unit:void 0},tP={allowDataOverflow:Ar.allowDataOverflow,allowDecimals:Ar.allowDecimals,allowDuplicatedCategory:Ar.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Ar.radiusAxisId,includeHidden:Ar.includeHidden,name:void 0,reversed:Ar.reversed,scale:Ar.scale,tick:Ar.tick,tickCount:Ar.tickCount,ticks:void 0,type:Ar.type,unit:void 0},sq=(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},Rg=I([sq,cM],(e,t)=>{var r;if(e!=null)return e;var n=(r=id(t,"angleAxis",eP.type))!==null&&r!==void 0?r:"category";return Wc(Wc({},eP),{},{type:n})}),lq=(e,t)=>e.polarAxis.radiusAxis[t],Lg=I([lq,cM],(e,t)=>{var r;if(e!=null)return e;var n=(r=id(t,"radiusAxis",tP.type))!==null&&r!==void 0?r:"category";return Wc(Wc({},tP),{},{type:n})}),ad=e=>e.polarOptions,$g=I([yn,bn,at],EM),Ok=I([ad,$g],(e,t)=>{if(e!=null)return Ot(e.innerRadius,t,0)}),Ek=I([ad,$g],(e,t)=>{if(e!=null)return Ot(e.outerRadius,t,t*.8)}),cq=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:r}=e;return[t,r]},Ak=I([ad],cq);I([Rg,Ak],od);var Tk=I([$g,Ok,Ek],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});I([Lg,Tk],od);var Mk=I([ye,ad,Ok,Ek,yn,bn],(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:Ot(a,o,o/2),cy:Ot(s,i,i/2),innerRadius:r,outerRadius:n,startAngle:l,endAngle:c,clockWise:!1}}}),ze=(e,t)=>t,Os=(e,t,r)=>r;function Vg(e){return e?.id}function kk(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=Vg(s);c.forEach((d,f)=>{var h=i==null||o?f:String(Ae(d,i,null)),v=Ae(d,s.dataKey,0),m;a.has(h)?m=a.get(h):m={},Object.assign(m,{[u]:v}),a.set(h,m)})}}),Array.from(a.values())}function sd(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var ld=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function cd(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function uq(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 vt=e=>{var t=ye(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},Ki=e=>e.tooltip.settings.axisId;function dq(e){if(e in xa)return xa[e]();var t="scale".concat(cs(e));if(t in xa)return xa[t]()}function rP(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 nP(e,t,r){if(typeof e=="function")return rP(e.copy().domain(t).range(r));if(e!=null){var n=dq(e);if(n!=null)return n.domain(t).range(r),rP(n)}}var Dk=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!cn(t)){for(var r,n,o=0;o<t.length;o++){var i=t[o];pe(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 oP(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 zc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?oP(Object(r),!0).forEach(function(n){fq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function fq(e,t,r){return(t=pq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pq(e){var t=hq(e,"string");return typeof t=="symbol"?t:t+""}function hq(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 cm=[0,"auto"],ct={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},_k=(e,t)=>e.cartesianAxis.xAxis[t],Sn=(e,t)=>{var r=_k(e,t);return r??ct},ut={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:cm,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:ms},Nk=(e,t)=>e.cartesianAxis.yAxis[t],Pn=(e,t)=>{var r=Nk(e,t);return r??ut},mq={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:""},Fg=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??mq},Ge=(e,t,r)=>{switch(t){case"xAxis":return Sn(e,r);case"yAxis":return Pn(e,r);case"zAxis":return Fg(e,r);case"angleAxis":return Rg(e,r);case"radiusAxis":return Lg(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},vq=(e,t,r)=>{switch(t){case"xAxis":return Sn(e,r);case"yAxis":return Pn(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},Ui=(e,t,r)=>{switch(t){case"xAxis":return Sn(e,r);case"yAxis":return Pn(e,r);case"angleAxis":return Rg(e,r);case"radiusAxis":return Lg(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},jk=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function Bg(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 ud=e=>e.graphicalItems.cartesianItems,gq=I([ze,Os],Bg),Wg=(e,t,r)=>e.filter(r).filter(n=>t?.includeHidden===!0?!0:!n.hide),Es=I([ud,Ge,gq],Wg,{memoizeOptions:{resultEqualityCheck:cd}}),Ik=I([Es],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(sd)),Rk=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),yq=I([Es],Rk),zg=e=>e.map(t=>t.data).filter(Boolean).flat(1),bq=I([Es],zg,{memoizeOptions:{resultEqualityCheck:cd}}),Kg=(e,t)=>{var{chartData:r=[],dataStartIndex:n,dataEndIndex:o}=t;return e.length>0?e:r.slice(n,o+1)},Ug=I([bq,kg],Kg),Hg=(e,t,r)=>t?.dataKey!=null?e.map(n=>({value:Ae(n,t.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(o=>({value:Ae(o,n)}))):e.map(n=>({value:n})),dd=I([Ug,Ge,Es],Hg);function Lk(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function Hl(e){if(Br(e)||e instanceof Date){var t=Number(e);if(pe(t))return t}}function iP(e){if(Array.isArray(e)){var t=[Hl(e[0]),Hl(e[1])];return cn(t)?t:void 0}var r=Hl(e);if(r!=null)return[r,r]}function un(e){return e.map(Hl).filter(Vt)}function xq(e,t,r){return!r||typeof t!="number"||Fr(t)?[]:r.length?un(r.flatMap(n=>{var o=Ae(e,n.dataKey),i,a;if(Array.isArray(o)?[i,a]=o:i=a=o,!(!pe(i)||!pe(a)))return[t-i,t+a]})):[]}var lt=e=>{var t=vt(e),r=Ki(e);return Ui(e,t,r)},As=I([lt],e=>e?.dataKey),wq=I([Ik,kg,lt],kk),$k=(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(Vg);return[s,{stackedData:FU(e,u,r),graphicalItems:c}]}))},um=I([wq,Ik,Cs,Pk],$k),Vk=(e,t,r,n)=>{var{dataStartIndex:o,dataEndIndex:i}=t;if(n==null&&r!=="zAxis"){var a=UU(e,o,i);if(!(a!=null&&a[0]===0&&a[1]===0))return a}},Sq=I([Ge],e=>e.allowDataOverflow),Gg=e=>{var t;if(e==null||!("domain"in e))return cm;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var r=un(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:cm},Yg=I([Ge],Gg),qg=I([Yg,Sq],uk),Pq=I([um,wn,ze,qg],Vk,{memoizeOptions:{resultEqualityCheck:ld}}),fd=e=>e.errorBars,Cq=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>Lk(r,n)),Kc=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]}},Xg=(e,t,r,n,o)=>{var i,a;if(r.length>0&&e.forEach(s=>{r.forEach(l=>{var c,u,d=(c=n[l.id])===null||c===void 0?void 0:c.filter(y=>Lk(o,y)),f=Ae(s,(u=t.dataKey)!==null&&u!==void 0?u:l.dataKey),h=xq(s,f,d);if(h.length>=2){var v=Math.min(...h),m=Math.max(...h);(i==null||v<i)&&(i=v),(a==null||m>a)&&(a=m)}var g=iP(f);g!=null&&(i=i==null?g[0]:Math.min(i,g[0]),a=a==null?g[1]:Math.max(a,g[1]))})}),t?.dataKey!=null&&e.forEach(s=>{var l=iP(Ae(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]))}),pe(i)&&pe(a))return[i,a]},Oq=I([Ug,Ge,yq,fd,ze],Xg,{memoizeOptions:{resultEqualityCheck:ld}});function Eq(e){var{value:t}=e;if(Br(t)||t instanceof Date)return t}var Aq=(e,t,r)=>{var n=e.map(Eq).filter(o=>o!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&eT(n))?kM(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},Fk=e=>e.referenceElements.dots,Hi=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),Tq=I([Fk,ze,Os],Hi),Bk=e=>e.referenceElements.areas,Mq=I([Bk,ze,Os],Hi),Wk=e=>e.referenceElements.lines,kq=I([Wk,ze,Os],Hi),zk=(e,t)=>{if(e!=null){var r=un(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},Dq=I(Tq,ze,zk),Kk=(e,t)=>{if(e!=null){var r=un(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)]}},_q=I([Mq,ze],Kk);function Nq(e){var t;if(e.x!=null)return un([e.x]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.x);return r==null||r.length===0?[]:un(r)}function jq(e){var t;if(e.y!=null)return un([e.y]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.y);return r==null||r.length===0?[]:un(r)}var Uk=(e,t)=>{if(e!=null){var r=e.flatMap(n=>t==="xAxis"?Nq(n):jq(n));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},Iq=I([kq,ze],Uk),Rq=I(Dq,Iq,_q,(e,t,r)=>Kc(e,r,t)),Zg=(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?Kc(n,i,o):Kc(i,o);return q8(t,c,e.allowDataOverflow)},Lq=I([Ge,Yg,qg,Pq,Oq,Rq,ye,ze],Zg,{memoizeOptions:{resultEqualityCheck:ld}}),$q=[0,1],Qg=(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=gn(t,i);if(c&&s==null){var u;return kM(0,(u=r?.length)!==null&&u!==void 0?u:0)}return l==="category"?Aq(n,e,c):o==="expand"?$q:a}},Jg=I([Ge,ye,Ug,dd,Cs,ze,Lq],Qg);function Vq(e){return e in xa}var Hk=(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(cs(n));return Vq(i)?i:"point"}}},Xn=I([Ge,jk,Ng],Hk);function ey(e,t,r,n){if(!(r==null||n==null))return typeof e.scale=="function"?nP(e.scale,r,n):nP(t,r,n)}var ty=(e,t,r)=>{var n=Gg(t);if(!(r!=="auto"&&r!=="linear")){if(t!=null&&t.tickCount&&Array.isArray(n)&&(n[0]==="auto"||n[1]==="auto")&&cn(e))return eq(e,t.tickCount,t.allowDecimals);if(t!=null&&t.tickCount&&t.type==="number"&&cn(e))return tq(e,t.tickCount,t.allowDecimals)}},ry=I([Jg,Ui,Xn],ty),ny=(e,t,r,n)=>{if(n!=="angleAxis"&&e?.type==="number"&&cn(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},Fq=I([Ge,Jg,ry,ze],ny),Bq=I(dd,Ge,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(un(e.map(d=>d.value))).sort((d,f)=>d-f),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}}),Gk=I(Bq,ye,Sk,at,(e,t,r,n,o)=>o,(e,t,r,n,o)=>{if(!pe(e))return 0;var i=t==="vertical"?n.height:n.width;if(o==="gap")return e*i/2;if(o==="no-gap"){var a=Ot(r,e*i),s=e*i/2;return s-a-(s-a)/i*a}return 0}),Wq=(e,t,r)=>{var n=Sn(e,t);return n==null||typeof n.padding!="string"?0:Gk(e,"xAxis",t,r,n.padding)},zq=(e,t,r)=>{var n=Pn(e,t);return n==null||typeof n.padding!="string"?0:Gk(e,"yAxis",t,r,n.padding)},Kq=I(Sn,Wq,(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}}),Uq=I(Pn,zq,(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}}),Hq=I([at,Kq,Ku,zu,(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]}),Gq=I([at,ye,Uq,Ku,zu,(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]}),Ts=(e,t,r,n)=>{var o;switch(t){case"xAxis":return Hq(e,r,n);case"yAxis":return Gq(e,r,n);case"zAxis":return(o=Fg(e,r))===null||o===void 0?void 0:o.range;case"angleAxis":return Ak(e);case"radiusAxis":return Tk(e,r);default:return}},Yk=I([Ge,Ts],od),Yq=I([Xn,Fq],Dk),pd=I([Ge,Xn,Yq,Yk],ey);I([Es,fd,ze],Cq);function qk(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var hd=(e,t)=>t,md=(e,t,r)=>r,qq=I(Bu,hd,md,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(qk)),Xq=I(Wu,hd,md,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(qk)),Xk=(e,t)=>({width:e.width,height:t.height}),Zq=(e,t)=>{var r=typeof t.width=="number"?t.width:ms;return{width:r,height:e.height}},Zk=I(at,Sn,Xk),Qq=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},Jq=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},e9=I(bn,at,qq,hd,md,(e,t,r,n,o)=>{var i={},a;return r.forEach(s=>{var l=Xk(t,s);a==null&&(a=Qq(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}),t9=I(yn,at,Xq,hd,md,(e,t,r,n,o)=>{var i={},a;return r.forEach(s=>{var l=Zq(t,s);a==null&&(a=Jq(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}),r9=(e,t)=>{var r=Sn(e,t);if(r!=null)return e9(e,r.orientation,r.mirror)},n9=I([at,Sn,r9,(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}}}),o9=(e,t)=>{var r=Pn(e,t);if(r!=null)return t9(e,r.orientation,r.mirror)},i9=I([at,Pn,o9,(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}}}),Qk=I(at,Pn,(e,t)=>{var r=typeof t.width=="number"?t.width:ms;return{width:r,height:e.height}}),aP=(e,t,r)=>{switch(t){case"xAxis":return Zk(e,r).width;case"yAxis":return Qk(e,r).height;default:return}},Jk=(e,t,r,n)=>{if(r!=null){var{allowDuplicatedCategory:o,type:i,dataKey:a}=r,s=gn(e,n),l=t.map(c=>c.value);if(a&&s&&i==="category"&&o&&eT(l))return l}},oy=I([ye,dd,Ge,ze],Jk),eD=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var{type:o,scale:i}=r,a=gn(e,n);if(a&&(o==="number"||i!=="auto"))return t.map(s=>s.value)}},iy=I([ye,dd,Ui,ze],eD),sP=I([ye,vq,Xn,pd,oy,iy,Ts,ry,ze],(e,t,r,n,o,i,a,s,l)=>{if(t!=null){var c=gn(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}}}),a9=(e,t,r,n,o,i,a,s,l)=>{if(!(t==null||n==null)){var c=gn(e,l),{type:u,ticks:d,tickCount:f}=t,h=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,v=u==="category"&&n.bandwidth?n.bandwidth()/h:0;v=l==="angleAxis"&&i!=null&&i.length>=2?ft(i[0]-i[1])*2*v:v;var m=d||o;return m?m.map((g,y)=>{var x=a?a.indexOf(g):g,w=n.map(x);return pe(w)?{index:y,coordinate:w+v,value:g,offset:v}:null}).filter(Vt):c&&s?s.map((g,y)=>{var x=n.map(g);return pe(x)?{coordinate:x+v,value:g,index:y,offset:v}:null}).filter(Vt):n.ticks?n.ticks(f).map((g,y)=>{var x=n.map(g);return pe(x)?{coordinate:x+v,value:g,index:y,offset:v}:null}).filter(Vt):n.domain().map((g,y)=>{var x=n.map(g);return pe(x)?{coordinate:x+v,value:a?a[g]:g,index:y,offset:v}:null}).filter(Vt)}},tD=I([ye,Ui,Xn,pd,ry,Ts,oy,iy,ze],a9),s9=(e,t,r,n,o,i,a)=>{if(!(t==null||r==null||n==null||n[0]===n[1])){var s=gn(e,a),{tickCount:l}=t,c=0;return c=a==="angleAxis"&&n?.length>=2?ft(n[0]-n[1])*2*c:c,s&&i?i.map((u,d)=>{var f=r.map(u);return pe(f)?{coordinate:f+c,value:u,index:d,offset:c}:null}).filter(Vt):r.ticks?r.ticks(l).map((u,d)=>{var f=r.map(u);return pe(f)?{coordinate:f+c,value:u,index:d,offset:c}:null}).filter(Vt):r.domain().map((u,d)=>{var f=r.map(u);return pe(f)?{coordinate:f+c,value:o?o[u]:u,index:d,offset:c}:null}).filter(Vt)}},$n=I([ye,Ui,pd,Ts,oy,iy,ze],s9),Vn=I(Ge,pd,(e,t)=>{if(!(e==null||t==null))return zc(zc({},e),{},{scale:t})}),l9=I([Ge,Xn,Jg,Yk],ey);I((e,t,r)=>Fg(e,r),l9,(e,t)=>{if(!(e==null||t==null))return zc(zc({},e),{},{scale:t})});var c9=I([ye,Bu,Wu],(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}}),rD=e=>e.options.defaultTooltipEventType,nD=e=>e.options.validateTooltipEventTypes;function oD(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function ay(e,t){var r=rD(e),n=nD(e);return oD(t,r,n)}function u9(e){return J(t=>ay(t,e))}var iD=(e,t)=>{var r,n=Number(t);if(!(Fr(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},d9=e=>e.tooltip.settings,_n={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},f9={itemInteraction:{click:_n,hover:_n},axisInteraction:{click:_n,hover:_n},keyboardInteraction:_n,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}},aD=Bt({name:"tooltip",initialState:f9,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:Re()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:r,next:n}=t.payload,o=br(e).tooltipItemPayloads.indexOf(r);o>-1&&(e.tooltipItemPayloads[o]=n)},prepare:Re()},removeTooltipEntrySettings:{reducer(e,t){var r=br(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:Re()},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:p9,replaceTooltipEntrySettings:h9,removeTooltipEntrySettings:m9,setTooltipSettingsState:v9,setActiveMouseOverItemIndex:sD,mouseLeaveItem:g9,mouseLeaveChart:lD,setActiveClickItemIndex:y9,setMouseOverAxisIndex:cD,setMouseClickAxisIndex:b9,setSyncInteraction:dm,setKeyboardInteraction:fm}=aD.actions,x9=aD.reducer;function lP(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 El(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lP(Object(r),!0).forEach(function(n){w9(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function w9(e,t,r){return(t=S9(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function S9(e){var t=P9(e,"string");return typeof t=="symbol"?t:t+""}function P9(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 C9(e,t,r){return t==="axis"?r==="click"?e.axisInteraction.click:e.axisInteraction.hover:r==="click"?e.itemInteraction.click:e.itemInteraction.hover}function O9(e){return e.index!=null}var uD=(e,t,r,n)=>{if(t==null)return _n;var o=C9(e,t,r);if(o==null)return _n;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(O9(o)){if(i)return El(El({},o),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n,graphicalItemId:void 0};return El(El({},_n),{},{coordinate:o.coordinate})};function E9(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 A9(e,t){var r=E9(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 T9(e,t,r){if(r==null||t==null)return!0;var n=Ae(e,t);return n==null||!cn(r)?!0:A9(n,r)}var sy=(e,t,r,n)=>{var o=e?.index;if(o==null)return null;var i=Number(o);if(!pe(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||T9(c,r,n)?String(l):null},dD=(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}}},fD=(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})},pD=e=>e.options.tooltipPayloadSearcher,Gi=e=>e.tooltip;function cP(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 uP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cP(Object(r),!0).forEach(function(n){M9(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function M9(e,t,r){return(t=k9(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function k9(e){var t=D9(e,"string");return typeof t=="symbol"?t:t+""}function D9(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 _9(e,t){return e??t}var hD=(e,t,r,n,o,i,a)=>{if(!(t==null||i==null)){var{chartData:s,computedData:l,dataStartIndex:c,dataEndIndex:u}=r,d=[];return e.reduce((f,h)=>{var v,{dataDefinedOnItem:m,settings:g}=h,y=_9(m,s),x=Array.isArray(y)?QT(y,c,u):y,w=(v=g?.dataKey)!==null&&v!==void 0?v:n,S=g?.nameKey,P;if(n&&Array.isArray(x)&&!Array.isArray(x[0])&&a==="axis"?P=tT(x,n,o):P=i(x,t,l,S),Array.isArray(P))P.forEach(E=>{var A=uP(uP({},g),{},{name:E.name,unit:E.unit,color:void 0,fill:void 0});f.push(l0({tooltipEntrySettings:A,dataKey:E.dataKey,payload:E.payload,value:Ae(E.payload,E.dataKey),name:E.name}))});else{var C;f.push(l0({tooltipEntrySettings:g,dataKey:w,payload:P,value:Ae(P,w),name:(C=Ae(P,S))!==null&&C!==void 0?C:g?.name}))}return f},d)}},ly=I([lt,jk,Ng],Hk),N9=I([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),j9=I([vt,Ki],Bg),Yi=I([N9,lt,j9],Wg,{memoizeOptions:{resultEqualityCheck:cd}}),I9=I([Yi],e=>e.filter(sd)),R9=I([Yi],zg,{memoizeOptions:{resultEqualityCheck:cd}}),qi=I([R9,wn],Kg),L9=I([I9,wn,lt],kk),cy=I([qi,lt,Yi],Hg),mD=I([lt],Gg),$9=I([lt],e=>e.allowDataOverflow),vD=I([mD,$9],uk),V9=I([Yi],e=>e.filter(sd)),F9=I([L9,V9,Cs,Pk],$k),B9=I([F9,wn,vt,vD],Vk),W9=I([Yi],Rk),z9=I([qi,lt,W9,fd,vt],Xg,{memoizeOptions:{resultEqualityCheck:ld}}),K9=I([Fk,vt,Ki],Hi),U9=I([K9,vt],zk),H9=I([Bk,vt,Ki],Hi),G9=I([H9,vt],Kk),Y9=I([Wk,vt,Ki],Hi),q9=I([Y9,vt],Uk),X9=I([U9,q9,G9],Kc),Z9=I([lt,mD,vD,B9,z9,X9,ye,vt],Zg),Ms=I([lt,ye,qi,cy,Cs,vt,Z9],Qg),Q9=I([Ms,lt,ly],ty),J9=I([lt,Ms,Q9,vt],ny),gD=e=>{var t=vt(e),r=Ki(e),n=!1;return Ts(e,t,r,n)},yD=I([lt,gD],od),bD=I([lt,ly,J9,yD],ey),e7=I([ye,cy,lt,vt],Jk),t7=I([ye,cy,lt,vt],eD),r7=(e,t,r,n,o,i,a,s)=>{if(t){var{type:l}=t,c=gn(e,s);if(n){var u=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,d=l==="category"&&n.bandwidth?n.bandwidth()/u:0;return d=s==="angleAxis"&&o!=null&&o?.length>=2?ft(o[0]-o[1])*2*d:d,c&&a?a.map((f,h)=>{var v=n.map(f);return pe(v)?{coordinate:v+d,value:f,index:h,offset:d}:null}).filter(Vt):n.domain().map((f,h)=>{var v=n.map(f);return pe(v)?{coordinate:v+d,value:i?i[f]:f,index:h,offset:d}:null}).filter(Vt)}}},Cn=I([ye,lt,ly,bD,gD,e7,t7,vt],r7),uy=I([rD,nD,d9],(e,t,r)=>oD(r.shared,e,t)),xD=e=>e.tooltip.settings.trigger,dy=e=>e.tooltip.settings.defaultIndex,ks=I([Gi,uy,xD,dy],uD),Fn=I([ks,qi,As,Ms],sy),wD=I([Cn,Fn],iD),fy=I([ks],e=>{if(e)return e.dataKey}),n7=I([ks],e=>{if(e)return e.graphicalItemId}),SD=I([Gi,uy,xD,dy],fD),o7=I([yn,bn,ye,at,Cn,dy,SD],dD),i7=I([ks,o7],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),a7=I([ks],e=>{var t;return(t=e?.active)!==null&&t!==void 0?t:!1}),s7=I([SD,Fn,wn,As,wD,pD,uy],hD),l7=I([s7],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});function dP(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 fP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dP(Object(r),!0).forEach(function(n){c7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function c7(e,t,r){return(t=u7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u7(e){var t=d7(e,"string");return typeof t=="symbol"?t:t+""}function d7(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 f7=()=>J(lt),p7=()=>{var e=f7(),t=J(Cn),r=J(bD);return Oi(!e||!r?void 0:fP(fP({},e),{},{scale:r}),t)};function pP(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 ni(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pP(Object(r),!0).forEach(function(n){h7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function h7(e,t,r){return(t=m7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m7(e){var t=v7(e,"string");return typeof t=="symbol"?t:t+""}function v7(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 g7=(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}},y7=(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 ni(ni(ni({},n),Xe(n.cx,n.cy,a,i)),{},{angle:i,radius:a})}var s=o.coordinate,{angle:l}=n;return ni(ni(ni({},n),Xe(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 b7(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 PD=(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,d,f,h=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,v=(u=r[s])===null||u===void 0?void 0:u.coordinate,m=s>=a-1?(d=r[0])===null||d===void 0?void 0:d.coordinate:(f=r[s+1])===null||f===void 0?void 0:f.coordinate,g=void 0;if(!(h==null||v==null||m==null))if(ft(v-h)!==ft(m-v)){var y=[];if(ft(m-v)===ft(o[1]-o[0])){g=m;var x=v+o[1]-o[0];y[0]=Math.min(x,(x+h)/2),y[1]=Math.max(x,(x+h)/2)}else{g=h;var w=m+o[1]-o[0];y[0]=Math.min(v,(w+v)/2),y[1]=Math.max(v,(w+v)/2)}var S=[Math.min(v,(g+v)/2),Math.max(v,(g+v)/2)];if(e>S[0]&&e<=S[1]||e>=y[0]&&e<=y[1]){var P;return(P=r[s])===null||P===void 0?void 0:P.index}}else{var C=Math.min(h,m),E=Math.max(h,m);if(e>(C+v)/2&&e<=(E+v)/2){var A;return(A=r[s])===null||A===void 0?void 0:A.index}}}else if(t)for(var T=0;T<a;T++){var M=t[T];if(M!=null){var _=t[T+1],k=t[T-1];if(T===0&&_!=null&&e<=(M.coordinate+_.coordinate)/2||T===a-1&&k!=null&&e>(M.coordinate+k.coordinate)/2||T>0&&T<a-1&&k!=null&&_!=null&&e>(M.coordinate+k.coordinate)/2&&e<=(M.coordinate+_.coordinate)/2)return M.index}}return-1},x7=()=>J(Ng),py=(e,t)=>t,CD=(e,t,r)=>r,hy=(e,t,r,n)=>n,w7=I(Cn,e=>_u(e,t=>t.coordinate)),my=I([Gi,py,CD,hy],uD),vy=I([my,qi,As,Ms],sy),S7=(e,t,r)=>{if(t!=null){var n=Gi(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},OD=I([Gi,py,CD,hy],fD),Uc=I([yn,bn,ye,at,Cn,hy,OD],dD),P7=I([my,Uc],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),ED=I([Cn,vy],iD),C7=I([OD,vy,wn,As,ED,pD,py],hD),O7=I([my,vy],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),E7=(e,t,r,n,o,i,a)=>{if(!(!e||!r||!n||!o)&&b7(e,a)){var s=HU(e,t),l=PD(s,i,o,r,n),c=g7(t,o,l,e);return{activeIndex:String(l),activeCoordinate:c}}},A7=(e,t,r,n,o,i,a)=>{if(!(!e||!n||!o||!i||!r)){var s=uG(e,r);if(s){var l=GU(s,t),c=PD(l,a,i,n,o),u=y7(t,i,c,s);return{activeIndex:String(c),activeCoordinate:u}}}},T7=(e,t,r,n,o,i,a,s)=>{if(!(!e||!t||!n||!o||!i))return t==="horizontal"||t==="vertical"?E7(e,t,n,o,i,a,s):A7(e,t,r,n,o,i,a)},M7=I(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}}),k7=I(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(n=>parseInt(n,10)).concat(Object.values(Ze)),r=Array.from(new Set(t));return r.sort((n,o)=>n-o)},{memoizeOptions:{resultEqualityCheck:uq}});function hP(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 mP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hP(Object(r),!0).forEach(function(n){D7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function D7(e,t,r){return(t=_7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _7(e){var t=N7(e,"string");return typeof t=="symbol"?t:t+""}function N7(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 j7={},I7={zIndexMap:Object.values(Ze).reduce((e,t)=>mP(mP({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),j7)},R7=new Set(Object.values(Ze));function L7(e){return R7.has(e)}var AD=Bt({name:"zIndex",initialState:I7,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:Re()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]&&(e.zIndexMap[r].consumers-=1,e.zIndexMap[r].consumers<=0&&!L7(r)&&delete e.zIndexMap[r])},prepare:Re()},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:Re()},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:Re()}}}),{registerZIndexPortal:$7,unregisterZIndexPortal:V7,registerZIndexPortalElement:F7,unregisterZIndexPortalElement:B7}=AD.actions,W7=AD.reducer;function Wt(e){var{zIndex:t,children:r}=e,n=CH(),o=n&&t!==void 0&&t!==0,i=Tt(),a=Ne();O.useLayoutEffect(()=>o?(a($7({zIndex:t})),()=>{a(V7({zIndex:t}))}):Wo,[a,t,o]);var s=J(l=>M7(l,t,i));return o?s?is.createPortal(r,s):null:r}function pm(){return pm=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},pm.apply(null,arguments)}function vP(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 Al(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vP(Object(r),!0).forEach(function(n){z7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function z7(e,t,r){return(t=K7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function K7(e){var t=U7(e,"string");return typeof t=="symbol"?t:t+""}function U7(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 H7(e){var{cursor:t,cursorComp:r,cursorProps:n}=e;return O.isValidElement(t)?O.cloneElement(t,n):O.createElement(r,n)}function G7(e){var t,{coordinate:r,payload:n,index:o,offset:i,tooltipAxisBandSize:a,layout:s,cursor:l,tooltipEventType:c,chartName:u}=e,d=r,f=n,h=o;if(!l||!d||u!=="ScatterChart"&&c!=="axis")return null;var v,m,g;if(u==="ScatterChart")v=d,m=C6,g=Ze.cursorLine;else if(u==="BarChart")v=O6(s,d,i,a),m=OM,g=Ze.cursorRectangle;else if(s==="radial"&&nT(d)){var{cx:y,cy:x,radius:w,startAngle:S,endAngle:P}=AM(d);v={cx:y,cy:x,startAngle:S,endAngle:P,innerRadius:w,outerRadius:w},m=MM,g=Ze.cursorLine}else v={points:hG(s,d,i)},m=ag,g=Ze.cursorLine;var C=typeof l=="object"&&"className"in l?l.className:void 0,E=Al(Al(Al(Al({stroke:"#ccc",pointerEvents:"none"},i),v),To(l)),{},{payload:f,payloadIndex:h,className:ve("recharts-tooltip-cursor",C)});return p.createElement(Wt,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:g},p.createElement(H7,{cursor:l,cursorComp:m,cursorProps:E}))}function Y7(e){var t=p7(),r=sM(),n=zo(),o=x7();return t==null||r==null||n==null||o==null?null:p.createElement(G7,pm({},e,{offset:r,layout:n,tooltipAxisBandSize:t,chartName:o}))}var TD=O.createContext(null),q7=()=>O.useContext(TD),_p={exports:{}},gP;function X7(){return gP||(gP=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,d,f){if(typeof u!="function")throw new TypeError("The listener must be a function");var h=new o(u,d||l,f),v=r?r+c:c;return l._events[v]?l._events[v].fn?l._events[v]=[l._events[v],h]:l._events[v].push(h):(l._events[v]=h,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,d;if(this._eventsCount===0)return c;for(d in u=this._events)t.call(u,d)&&c.push(r?d.slice(1):d);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(u)):c},s.prototype.listeners=function(c){var u=r?r+c:c,d=this._events[u];if(!d)return[];if(d.fn)return[d.fn];for(var f=0,h=d.length,v=new Array(h);f<h;f++)v[f]=d[f].fn;return v},s.prototype.listenerCount=function(c){var u=r?r+c:c,d=this._events[u];return d?d.fn?1:d.length:0},s.prototype.emit=function(c,u,d,f,h,v){var m=r?r+c:c;if(!this._events[m])return!1;var g=this._events[m],y=arguments.length,x,w;if(g.fn){switch(g.once&&this.removeListener(c,g.fn,void 0,!0),y){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,u),!0;case 3:return g.fn.call(g.context,u,d),!0;case 4:return g.fn.call(g.context,u,d,f),!0;case 5:return g.fn.call(g.context,u,d,f,h),!0;case 6:return g.fn.call(g.context,u,d,f,h,v),!0}for(w=1,x=new Array(y-1);w<y;w++)x[w-1]=arguments[w];g.fn.apply(g.context,x)}else{var S=g.length,P;for(w=0;w<S;w++)switch(g[w].once&&this.removeListener(c,g[w].fn,void 0,!0),y){case 1:g[w].fn.call(g[w].context);break;case 2:g[w].fn.call(g[w].context,u);break;case 3:g[w].fn.call(g[w].context,u,d);break;case 4:g[w].fn.call(g[w].context,u,d,f);break;default:if(!x)for(P=1,x=new Array(y-1);P<y;P++)x[P-1]=arguments[P];g[w].fn.apply(g[w].context,x)}}return!0},s.prototype.on=function(c,u,d){return i(this,c,u,d,!1)},s.prototype.once=function(c,u,d){return i(this,c,u,d,!0)},s.prototype.removeListener=function(c,u,d,f){var h=r?r+c:c;if(!this._events[h])return this;if(!u)return a(this,h),this;var v=this._events[h];if(v.fn)v.fn===u&&(!f||v.once)&&(!d||v.context===d)&&a(this,h);else{for(var m=0,g=[],y=v.length;m<y;m++)(v[m].fn!==u||f&&!v[m].once||d&&v[m].context!==d)&&g.push(v[m]);g.length?this._events[h]=g.length===1?g[0]:g:a(this,h)}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})(_p)),_p.exports}var Z7=X7();const Q7=Gn(Z7);var Ka=new Q7,hm="recharts.syncEvent.tooltip",yP="recharts.syncEvent.brush",gy=(e,t)=>{if(t&&Array.isArray(e)){var r=Number.parseInt(t,10);if(!Fr(r))return e[r]}},J7={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},MD=Bt({name:"options",initialState:J7,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),eX=MD.reducer,{createEventEmitter:tX}=MD.actions;function rX(e){return e.tooltip.syncInteraction}var nX={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},kD=Bt({name:"chartData",initialState:nX,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:bP,setDataStartEndIndexes:oX,setComputedData:Tye}=kD.actions,iX=kD.reducer,aX=["x","y"];function xP(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 oi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xP(Object(r),!0).forEach(function(n){sX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sX(e,t,r){return(t=lX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lX(e){var t=cX(e,"string");return typeof t=="symbol"?t:t+""}function cX(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 uX(e,t){if(e==null)return{};var r,n,o=dX(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 dX(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 fX(){var e=J(jg),t=J(Ig),r=Ne(),n=J(Ck),o=J(Cn),i=zo(),a=Uu(),s=J(l=>l.rootProps.className);O.useEffect(()=>{if(e==null)return Wo;var l=(c,u,d)=>{if(t!==d&&e===c){if(n==="index"){var f;if(a&&u!==null&&u!==void 0&&(f=u.payload)!==null&&f!==void 0&&f.coordinate&&u.payload.sourceViewBox){var h=u.payload.coordinate,{x:v,y:m}=h,g=uX(h,aX),{x:y,y:x,width:w,height:S}=u.payload.sourceViewBox,P=oi(oi({},g),{},{x:a.x+(w?(v-y)/w:0)*a.width,y:a.y+(S?(m-x)/S:0)*a.height});r(oi(oi({},u),{},{payload:oi(oi({},u.payload),{},{coordinate:P})}))}else r(u);return}if(o!=null){var C;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},A=n(o,E);C=o[A]}else n==="value"&&(C=o.find(B=>String(B.value)===u.payload.label));var{coordinate:T}=u.payload;if(C==null||u.payload.active===!1||T==null||a==null){r(dm({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}var{x:M,y:_}=T,k=Math.min(M,a.x+a.width),N=Math.min(_,a.y+a.height),R={x:i==="horizontal"?C.coordinate:k,y:i==="horizontal"?N:C.coordinate},z=dm({active:u.payload.active,coordinate:R,dataKey:u.payload.dataKey,index:String(C.index),label:u.payload.label,sourceViewBox:u.payload.sourceViewBox,graphicalItemId:u.payload.graphicalItemId});r(z)}}};return Ka.on(hm,l),()=>{Ka.off(hm,l)}},[s,r,t,e,n,o,i,a])}function pX(){var e=J(jg),t=J(Ig),r=Ne();O.useEffect(()=>{if(e==null)return Wo;var n=(o,i,a)=>{t!==a&&e===o&&r(oX(i))};return Ka.on(yP,n),()=>{Ka.off(yP,n)}},[r,t,e])}function hX(){var e=Ne();O.useEffect(()=>{e(tX())},[e]),fX(),pX()}function mX(e,t,r,n,o,i){var a=J(h=>S7(h,e,t)),s=J(Ig),l=J(jg),c=J(Ck),u=J(rX),d=u?.active,f=Uu();O.useEffect(()=>{if(!d&&l!=null&&s!=null){var h=dm({active:i,coordinate:r,dataKey:a,index:o,label:typeof n=="number"?String(n):n,sourceViewBox:f,graphicalItemId:void 0});Ka.emit(hm,l,h,s)}},[d,r,a,o,n,s,l,c,i,f])}function wP(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 SP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wP(Object(r),!0).forEach(function(n){vX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vX(e,t,r){return(t=gX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gX(e){var t=yX(e,"string");return typeof t=="symbol"?t:t+""}function yX(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 bX(e){return e.dataKey}function xX(e,t){return p.isValidElement(e)?p.cloneElement(e,t):typeof e=="function"?p.createElement(e,t):p.createElement(n6,t)}var PP=[],wX={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 yy(e){var t,r,n=et(e,wX),{active:o,allowEscapeViewBox:i,animationDuration:a,animationEasing:s,content:l,filterNull:c,isAnimationActive:u,offset:d,payloadUniqBy:f,position:h,reverseDirection:v,useTranslate3d:m,wrapperStyle:g,cursor:y,shared:x,trigger:w,defaultIndex:S,portal:P,axisId:C}=n,E=Ne(),A=typeof S=="number"?String(S):S;O.useEffect(()=>{E(v9({shared:x,trigger:w,axisId:C,active:o,defaultIndex:A}))},[E,x,w,C,o,A]);var T=Uu(),M=xM(),_=u9(x),{activeIndex:k,isActive:N}=(t=J(K=>O7(K,_,w,A)))!==null&&t!==void 0?t:{},R=J(K=>C7(K,_,w,A)),z=J(K=>ED(K,_,w,A)),B=J(K=>P7(K,_,w,A)),F=R,j=q7(),L=(r=o??N)!==null&&r!==void 0?r:!1,[H,re]=yT([F,L]),le=_==="axis"?z:void 0;mX(_,w,B,le,k,L);var ae=P??j;if(ae==null||T==null||_==null)return null;var oe=F??PP;L||(oe=PP),c&&oe.length&&(oe=fT(oe.filter(K=>K.value!=null&&(K.hide!==!0||n.includeHidden)),f,bX));var Se=oe.length>0,Me=p.createElement(u6,{allowEscapeViewBox:i,animationDuration:a,animationEasing:s,isAnimationActive:u,active:L,coordinate:B,hasPayload:Se,offset:d,position:h,reverseDirection:v,useTranslate3d:m,viewBox:T,wrapperStyle:g,lastBoundingBox:H,innerRef:re,hasPortalFromProps:!!P},xX(l,SP(SP({},n),{},{payload:oe,label:le,active:L,activeIndex:k,coordinate:B,accessibilityLayer:M})));return p.createElement(p.Fragment,null,is.createPortal(Me,ae),L&&p.createElement(Y7,{cursor:y,tooltipEventType:_,coordinate:B,payload:oe,index:k}))}var Ds=e=>null;Ds.displayName="Cell";function SX(e,t,r){return(t=PX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function PX(e){var t=CX(e,"string");return typeof t=="symbol"?t:t+""}function CX(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 OX{constructor(t){SX(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 CP(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 EX(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?CP(Object(r),!0).forEach(function(n){AX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):CP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function AX(e,t,r){return(t=TX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function TX(e){var t=MX(e,"string");return typeof t=="symbol"?t:t+""}function MX(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 kX={cacheSize:2e3,enableCache:!0},DD=EX({},kX),OP=new OX(DD.cacheSize),DX={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},EP="recharts_measurement_span";function _X(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 AP=(e,t)=>{try{var r=document.getElementById(EP);r||(r=document.createElement("span"),r.setAttribute("id",EP),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,DX,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},Aa=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Xu.isSsr)return{width:0,height:0};if(!DD.enableCache)return AP(t,r);var n=_X(t,r),o=OP.get(n);if(o)return o;var i=AP(t,r);return OP.set(n,i),i},_D;function NX(e,t,r){return(t=jX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jX(e){var t=IX(e,"string");return typeof t=="symbol"?t:t+""}function IX(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 TP=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,MP=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,RX=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,LX=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,$X={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},VX=["cm","mm","pt","pc","in","Q","px"];function FX(e){return VX.includes(e)}var ui="NaN";function BX(e,t){return e*$X[t]}class bt{static parse(t){var r,[,n,o]=(r=LX.exec(t))!==null&&r!==void 0?r:[];return n==null?bt.NaN:new bt(parseFloat(n),o??"")}constructor(t,r){this.num=t,this.unit=r,this.num=t,this.unit=r,Fr(t)&&(this.unit=""),r!==""&&!RX.test(r)&&(this.num=NaN,this.unit=""),FX(r)&&(this.num=BX(t,r),this.unit="px")}add(t){return this.unit!==t.unit?new bt(NaN,""):new bt(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new bt(NaN,""):new bt(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new bt(NaN,""):new bt(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new bt(NaN,""):new bt(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return Fr(this.num)}}_D=bt;NX(bt,"NaN",new _D(NaN,""));function ND(e){if(e==null||e.includes(ui))return ui;for(var t=e;t.includes("*")||t.includes("/");){var r,[,n,o,i]=(r=TP.exec(t))!==null&&r!==void 0?r:[],a=bt.parse(n??""),s=bt.parse(i??""),l=o==="*"?a.multiply(s):a.divide(s);if(l.isNaN())return ui;t=t.replace(TP,l.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var c,[,u,d,f]=(c=MP.exec(t))!==null&&c!==void 0?c:[],h=bt.parse(u??""),v=bt.parse(f??""),m=d==="+"?h.add(v):h.subtract(v);if(m.isNaN())return ui;t=t.replace(MP,m.toString())}return t}var kP=/\(([^()]*)\)/;function WX(e){for(var t=e,r;(r=kP.exec(t))!=null;){var[,n]=r;t=t.replace(kP,ND(n))}return t}function zX(e){var t=e.replace(/\s+/g,"");return t=WX(t),t=ND(t),t}function KX(e){try{return zX(e)}catch{return ui}}function Np(e){var t=KX(e.slice(5,-1));return t===ui?"":t}var UX=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],HX=["dx","dy","angle","className","breakAll"];function mm(){return mm=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},mm.apply(null,arguments)}function DP(e,t){if(e==null)return{};var r,n,o=GX(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 GX(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 jD=/[ \f\n\r\t\v\u2028\u2029]+/,ID=e=>{var{children:t,breakAll:r,style:n}=e;try{var o=[];We(t)||(r?o=t.toString().split(""):o=t.toString().split(jD));var i=o.map(s=>({word:s,width:Aa(s,n).width})),a=r?0:Aa(" ",n).width;return{wordsWithComputedWidth:i,spaceWidth:a}}catch{return null}};function YX(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}var RD=(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},[]),LD=e=>e.reduce((t,r)=>t.width>r.width?t:r),qX="…",_P=(e,t,r,n,o,i,a,s)=>{var l=e.slice(0,t),c=ID({breakAll:r,style:n,children:l+qX});if(!c)return[!1,[]];var u=RD(c.wordsWithComputedWidth,i,a,s),d=u.length>o||LD(u).width>Number(i);return[d,u]},XX=(e,t,r,n,o)=>{var{maxLines:i,children:a,style:s,breakAll:l}=e,c=Y(i),u=String(a),d=RD(t,n,r,o);if(!c||o)return d;var f=d.length>i||LD(d).width>Number(n);if(!f)return d;for(var h=0,v=u.length-1,m=0,g;h<=v&&m<=u.length-1;){var y=Math.floor((h+v)/2),x=y-1,[w,S]=_P(u,x,l,s,i,n,r,o),[P]=_P(u,y,l,s,i,n,r,o);if(!w&&!P&&(h=y+1),w&&P&&(v=y-1),!w&&P){g=S;break}m++}return g||d},NP=e=>{var t=We(e)?[]:e.toString().split(jD);return[{words:t,width:void 0}]},ZX=e=>{var{width:t,scaleToFit:r,children:n,style:o,breakAll:i,maxLines:a}=e;if((t||r)&&!Xu.isSsr){var s,l,c=ID({breakAll:i,children:n,style:o});if(c){var{wordsWithComputedWidth:u,spaceWidth:d}=c;s=u,l=d}else return NP(n);return XX({breakAll:i,children:n,maxLines:a,style:o},s,l,t,!!r)}return NP(n)},$D="#808080",QX={angle:0,breakAll:!1,capHeight:"0.71em",fill:$D,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},vd=O.forwardRef((e,t)=>{var r=et(e,QX),{x:n,y:o,lineHeight:i,capHeight:a,fill:s,scaleToFit:l,textAnchor:c,verticalAnchor:u}=r,d=DP(r,UX),f=O.useMemo(()=>ZX({breakAll:d.breakAll,children:d.children,maxLines:d.maxLines,scaleToFit:l,style:d.style,width:d.width}),[d.breakAll,d.children,d.maxLines,l,d.style,d.width]),{dx:h,dy:v,angle:m,className:g,breakAll:y}=d,x=DP(d,HX);if(!Br(n)||!Br(o)||f.length===0)return null;var w=Number(n)+(Y(h)?h:0),S=Number(o)+(Y(v)?v:0);if(!pe(w)||!pe(S))return null;var P;switch(u){case"start":P=Np("calc(".concat(a,")"));break;case"middle":P=Np("calc(".concat((f.length-1)/2," * -").concat(i," + (").concat(a," / 2))"));break;default:P=Np("calc(".concat(f.length-1," * -").concat(i,")"));break}var C=[],E=f[0];if(l&&E!=null){var A=E.width,{width:T}=d;C.push("scale(".concat(Y(T)&&Y(A)?T/A:1,")"))}return m&&C.push("rotate(".concat(m,", ").concat(w,", ").concat(S,")")),C.length&&(x.transform=C.join(" ")),p.createElement("text",mm({},Rt(x),{ref:t,x:w,y:S,className:ve("recharts-text",g),textAnchor:c,fill:s.includes("url")?$D:s}),f.map((M,_)=>{var k=M.words.join(y?"":" ");return p.createElement("tspan",{x:w,dy:_===0?P:i,key:"".concat(k,"-").concat(_)},k)}))});vd.displayName="Text";function jP(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 Tr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jP(Object(r),!0).forEach(function(n){JX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function JX(e,t,r){return(t=eZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eZ(e){var t=tZ(e,"string");return typeof t=="symbol"?t:t+""}function tZ(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 rZ=e=>{var{viewBox:t,position:r,offset:n=0,parentViewBox:o}=e,{x:i,y:a,height:s,upperWidth:l,lowerWidth:c}=tg(t),u=i,d=i+(l-c)/2,f=(u+d)/2,h=(l+c)/2,v=u+l/2,m=s>=0?1:-1,g=m*n,y=m>0?"end":"start",x=m>0?"start":"end",w=l>=0?1:-1,S=w*n,P=w>0?"end":"start",C=w>0?"start":"end",E=o;if(r==="top"){var A={x:u+l/2,y:a-g,horizontalAnchor:"middle",verticalAnchor:y};return E&&(A.height=Math.max(a-E.y,0),A.width=l),A}if(r==="bottom"){var T={x:d+c/2,y:a+s+g,horizontalAnchor:"middle",verticalAnchor:x};return E&&(T.height=Math.max(E.y+E.height-(a+s),0),T.width=c),T}if(r==="left"){var M={x:f-S,y:a+s/2,horizontalAnchor:P,verticalAnchor:"middle"};return E&&(M.width=Math.max(M.x-E.x,0),M.height=s),M}if(r==="right"){var _={x:f+h+S,y:a+s/2,horizontalAnchor:C,verticalAnchor:"middle"};return E&&(_.width=Math.max(E.x+E.width-_.x,0),_.height=s),_}var k=E?{width:h,height:s}:{};return r==="insideLeft"?Tr({x:f+S,y:a+s/2,horizontalAnchor:C,verticalAnchor:"middle"},k):r==="insideRight"?Tr({x:f+h-S,y:a+s/2,horizontalAnchor:P,verticalAnchor:"middle"},k):r==="insideTop"?Tr({x:u+l/2,y:a+g,horizontalAnchor:"middle",verticalAnchor:x},k):r==="insideBottom"?Tr({x:d+c/2,y:a+s-g,horizontalAnchor:"middle",verticalAnchor:y},k):r==="insideTopLeft"?Tr({x:u+S,y:a+g,horizontalAnchor:C,verticalAnchor:x},k):r==="insideTopRight"?Tr({x:u+l-S,y:a+g,horizontalAnchor:P,verticalAnchor:x},k):r==="insideBottomLeft"?Tr({x:d+S,y:a+s-g,horizontalAnchor:C,verticalAnchor:y},k):r==="insideBottomRight"?Tr({x:d+c-S,y:a+s-g,horizontalAnchor:P,verticalAnchor:y},k):r&&typeof r=="object"&&(Y(r.x)||Do(r.x))&&(Y(r.y)||Do(r.y))?Tr({x:i+Ot(r.x,h),y:a+Ot(r.y,s),horizontalAnchor:"end",verticalAnchor:"end"},k):Tr({x:v,y:a+s/2,horizontalAnchor:"middle",verticalAnchor:"middle"},k)},nZ=["labelRef"],oZ=["content"];function IP(e,t){if(e==null)return{};var r,n,o=iZ(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 iZ(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 RP(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 wa(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?RP(Object(r),!0).forEach(function(n){aZ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):RP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function aZ(e,t,r){return(t=sZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sZ(e){var t=lZ(e,"string");return typeof t=="symbol"?t:t+""}function lZ(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 Zr(){return Zr=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},Zr.apply(null,arguments)}var VD=O.createContext(null),cZ=e=>{var{x:t,y:r,upperWidth:n,lowerWidth:o,width:i,height:a,children:s}=e,l=O.useMemo(()=>({x:t,y:r,upperWidth:n,lowerWidth:o,width:i,height:a}),[t,r,n,o,i,a]);return p.createElement(VD.Provider,{value:l},s)},FD=()=>{var e=O.useContext(VD),t=Uu();return e||(t?tg(t):void 0)},uZ=O.createContext(null),dZ=()=>{var e=O.useContext(uZ),t=J(Mk);return e||t},fZ=e=>{var{value:t,formatter:r}=e,n=We(e.children)?t:e.children;return typeof r=="function"?r(n):n},by=e=>e!=null&&typeof e=="function",pZ=(e,t)=>{var r=ft(t-e),n=Math.min(Math.abs(t-e),360);return r*n},hZ=(e,t,r,n,o)=>{var{offset:i,className:a}=e,{cx:s,cy:l,innerRadius:c,outerRadius:u,startAngle:d,endAngle:f,clockWise:h}=o,v=(c+u)/2,m=pZ(d,f),g=m>=0?1:-1,y,x;switch(t){case"insideStart":y=d+g*i,x=h;break;case"insideEnd":y=f-g*i,x=!h;break;case"end":y=f+g*i,x=h;break;default:throw new Error("Unsupported position ".concat(t))}x=m<=0?x:!x;var w=Xe(s,l,v,y),S=Xe(s,l,v,y+(x?1:-1)*359),P="M".concat(w.x,",").concat(w.y,`
99
99
  A`).concat(v,",").concat(v,",0,1,").concat(x?0:1,`,
100
- `).concat(S.x,",").concat(S.y),C=We(e.id)?Da("recharts-radial-line-"):e.id;return p.createElement("text",Zr({},n,{dominantBaseline:"central",className:ve("recharts-radial-bar-label",a)}),p.createElement("defs",null,p.createElement("path",{id:C,d:P})),p.createElement("textPath",{xlinkHref:"#".concat(C)},r))},mZ=(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:d}=Xe(n,o,a+t,c);return{x:u,y:d,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 f=(i+a)/2,{x:h,y:v}=Xe(n,o,f,c);return{x:h,y:v,textAnchor:"middle",verticalAnchor:"middle"}},Gl=e=>e!=null&&"cx"in e&&Y(e.cx),vZ={angle:0,offset:5,zIndex:Ze.label,position:"middle",textBreakAll:!1};function gZ(e){if(!Gl(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 Dn(e){var t=et(e,vZ),{viewBox:r,parentViewBox:n,position:o,value:i,children:a,content:s,className:l="",textBreakAll:c,labelRef:u}=t,d=dZ(),f=FD(),h=o==="center"?f:d??f,v,m,g;r==null?v=h:Gl(r)?v=r:v=eg(r);var y=gZ(v);if(!v||We(i)&&We(a)&&!O.isValidElement(s)&&typeof s!="function")return null;var x=wa(wa({},t),{},{viewBox:v});if(O.isValidElement(s)){var{labelRef:w}=x,S=IP(x,nZ);return O.cloneElement(s,S)}if(typeof s=="function"){var{content:P}=x,C=IP(x,oZ);if(m=O.createElement(s,C),O.isValidElement(m))return m}else m=fZ(t);var E=Rt(t);if(Gl(v)){if(o==="insideStart"||o==="insideEnd"||o==="end")return hZ(t,o,m,E,v);g=mZ(v,t.offset,t.position)}else{if(!y)return null;var A=rZ({viewBox:y,position:o,offset:t.offset,parentViewBox:Gl(n)?void 0:n});g=wa(wa({x:A.x,y:A.y,textAnchor:A.horizontalAnchor,verticalAnchor:A.verticalAnchor},A.width!==void 0?{width:A.width}:{}),A.height!==void 0?{height:A.height}:{})}return p.createElement(Wt,{zIndex:t.zIndex},p.createElement(vd,Zr({ref:u,className:ve("recharts-label",l)},E,g,{textAnchor:YX(E.textAnchor)?E.textAnchor:g.textAnchor,breakAll:c}),m))}Dn.displayName="Label";var yZ=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?p.createElement(Dn,Zr({key:"label-implicit"},n)):Br(e)?p.createElement(Dn,Zr({key:"label-implicit",value:e},n)):O.isValidElement(e)?e.type===Dn?O.cloneElement(e,wa({key:"label-implicit"},n)):p.createElement(Dn,Zr({key:"label-implicit",content:e},n)):yy(e)?p.createElement(Dn,Zr({key:"label-implicit",content:e},n)):e&&typeof e=="object"?p.createElement(Dn,Zr({},e,{key:"label-implicit"},n)):null};function bZ(e){var{label:t,labelRef:r}=e,n=FD();return yZ(t,n,r)||null}var Np={},jp={},LP;function xZ(){return LP||(LP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r[r.length-1]}e.last=t})(jp)),jp}var Ip={},$P;function wZ(){return $P||($P=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Array.isArray(r)?r:Array.from(r)}e.toArray=t})(Ip)),Ip}var VP;function SZ(){return VP||(VP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=xZ(),r=wZ(),n=Wv();function o(i){if(n.isArrayLike(i))return t.last(r.toArray(i))}e.last=o})(Np)),Np}var Rp,FP;function PZ(){return FP||(FP=1,Rp=SZ().last),Rp}var CZ=PZ();const OZ=Gn(CZ);var EZ=["valueAccessor"],AZ=["dataKey","clockWise","id","textBreakAll","zIndex"];function Hc(){return Hc=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},Hc.apply(null,arguments)}function BP(e,t){if(e==null)return{};var r,n,o=TZ(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 TZ(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 MZ=e=>Array.isArray(e.value)?OZ(e.value):e.value,BD=O.createContext(void 0),WD=BD.Provider,zD=O.createContext(void 0),kZ=zD.Provider;function DZ(){return O.useContext(BD)}function _Z(){return O.useContext(zD)}function Yl(e){var{valueAccessor:t=MZ}=e,r=BP(e,EZ),{dataKey:n,clockWise:o,id:i,textBreakAll:a,zIndex:s}=r,l=BP(r,AZ),c=DZ(),u=_Z(),d=c||u;return!d||!d.length?null:p.createElement(Wt,{zIndex:s??Ze.label},p.createElement(ht,{className:"recharts-label-list"},d.map((f,h)=>{var v,m=We(n)?t(f,h):Ae(f.payload,n),g=We(i)?{}:{id:"".concat(i,"-").concat(h)};return p.createElement(Dn,Hc({key:"label-".concat(h)},Rt(f),l,g,{fill:(v=r.fill)!==null&&v!==void 0?v:f.fill,parentViewBox:f.parentViewBox,value:m,textBreakAll:a,viewBox:f.viewBox,index:h,zIndex:0}))})))}Yl.displayName="LabelList";function by(e){var{label:t}=e;return t?t===!0?p.createElement(Yl,{key:"labelList-implicit"}):p.isValidElement(t)||yy(t)?p.createElement(Yl,{key:"labelList-implicit",content:t}):typeof t=="object"?p.createElement(Yl,Hc({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function mm(){return mm=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},mm.apply(null,arguments)}var KD=e=>{var{cx:t,cy:r,r:n,className:o}=e,i=ve("recharts-dot",o);return Y(t)&&Y(r)&&Y(n)?p.createElement("circle",mm({},Zt(e),Bv(e),{className:i,cx:t,cy:r,r:n})):null},UD=e=>e.graphicalItems.polarItems,NZ=I([ze,Os],Fg),gd=I([UD,Ge,NZ],Bg),jZ=I([gd],Wg),yd=I([jZ,nd],zg),IZ=I([yd,Ge,gd],Ug);I([yd,Ge,gd],(e,t,r)=>r.length>0?e.flatMap(n=>r.flatMap(o=>{var i,a=Ae(n,(i=t.dataKey)!==null&&i!==void 0?i:o.dataKey);return{value:a,errorDomain:[]}})).filter(Boolean):t?.dataKey!=null?e.map(n=>({value:Ae(n,t.dataKey),errorDomain:[]})):e.map(n=>({value:n,errorDomain:[]})));var WP=()=>{},RZ=I([yd,Ge,gd,fd,ze],qg),LZ=I([Ge,Gg,Yg,WP,RZ,WP,ye,ze],Xg),HD=I([Ge,ye,yd,IZ,Cs,ze,LZ],Zg),$Z=I([HD,Ui,Xn],ey),VZ=I([Ge,HD,$Z,ze],ry);I([Xn,VZ],Dk);var FZ={radiusAxis:{},angleAxis:{}},GD=Bt({name:"polarAxis",initialState:FZ,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:Mye,removeRadiusAxis:kye,addAngleAxis:Dye,removeAngleAxis:_ye}=GD.actions,BZ=GD.reducer;function YD(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}function zP(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 KP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zP(Object(r),!0).forEach(function(n){WZ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function WZ(e,t,r){return(t=zZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zZ(e){var t=KZ(e,"string");return typeof t=="symbol"?t:t+""}function KZ(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 UZ=(e,t)=>t,xy=I([UD,UZ],(e,t)=>e.filter(r=>r.type==="pie").find(r=>r.id===t)),HZ=[],wy=(e,t,r)=>r?.length===0?HZ:r,qD=I([nd,xy,wy],(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=>KP(KP({},t.presentationProps),i.props))),o!=null)return o}}),GZ=I([qD,xy,wy],(e,t,r)=>{if(!(e==null||t==null))return e.map((n,o)=>{var i,a=Ae(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:Fi(a,t.dataKey),color:s,payload:n,type:t.legendType}})}),YZ=I([qD,xy,wy,at],(e,t,r,n)=>{if(!(t==null||e==null))return XQ({offset:n,pieSettings:t,displayedData:e,cells:r})}),Tl={exports:{}},Oe={};var UP;function qZ(){if(UP)return Oe;UP=1;var e=60103,t=60106,r=60107,n=60108,o=60114,i=60109,a=60110,s=60112,l=60113,c=60120,u=60115,d=60116,f=60121,h=60122,v=60117,m=60129,g=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"),d=y("react.lazy"),f=y("react.block"),h=y("react.server.block"),v=y("react.fundamental"),m=y("react.debug_trace_mode"),g=y("react.legacy_hidden")}function x(N){if(typeof N=="object"&&N!==null){var R=N.$$typeof;switch(R){case e:switch(N=N.type,N){case r:case o:case n:case l:case c:return N;default:switch(N=N&&N.$$typeof,N){case a:case s:case d:case u:case i:return N;default:return R}}case t:return R}}}var w=i,S=e,P=s,C=r,E=d,A=u,T=t,M=o,_=n,k=l;return Oe.ContextConsumer=a,Oe.ContextProvider=w,Oe.Element=S,Oe.ForwardRef=P,Oe.Fragment=C,Oe.Lazy=E,Oe.Memo=A,Oe.Portal=T,Oe.Profiler=M,Oe.StrictMode=_,Oe.Suspense=k,Oe.isAsyncMode=function(){return!1},Oe.isConcurrentMode=function(){return!1},Oe.isContextConsumer=function(N){return x(N)===a},Oe.isContextProvider=function(N){return x(N)===i},Oe.isElement=function(N){return typeof N=="object"&&N!==null&&N.$$typeof===e},Oe.isForwardRef=function(N){return x(N)===s},Oe.isFragment=function(N){return x(N)===r},Oe.isLazy=function(N){return x(N)===d},Oe.isMemo=function(N){return x(N)===u},Oe.isPortal=function(N){return x(N)===t},Oe.isProfiler=function(N){return x(N)===o},Oe.isStrictMode=function(N){return x(N)===n},Oe.isSuspense=function(N){return x(N)===l},Oe.isValidElementType=function(N){return typeof N=="string"||typeof N=="function"||N===r||N===o||N===m||N===n||N===l||N===c||N===g||typeof N=="object"&&N!==null&&(N.$$typeof===d||N.$$typeof===u||N.$$typeof===i||N.$$typeof===a||N.$$typeof===s||N.$$typeof===v||N.$$typeof===f||N[0]===h)},Oe.typeOf=x,Oe}var Ee={};var HP;function XZ(){return HP||(HP=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,d=60116,f=60121,h=60122,v=60117,m=60129,g=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"),d=y("react.lazy"),f=y("react.block"),h=y("react.server.block"),v=y("react.fundamental"),y("react.scope"),y("react.opaque.id"),m=y("react.debug_trace_mode"),y("react.offscreen"),g=y("react.legacy_hidden")}var x=!1;function w(W){return!!(typeof W=="string"||typeof W=="function"||W===r||W===o||W===m||W===n||W===l||W===c||W===g||x||typeof W=="object"&&W!==null&&(W.$$typeof===d||W.$$typeof===u||W.$$typeof===i||W.$$typeof===a||W.$$typeof===s||W.$$typeof===v||W.$$typeof===f||W[0]===h))}function S(W){if(typeof W=="object"&&W!==null){var V=W.$$typeof;switch(V){case e:var he=W.type;switch(he){case r:case o:case n:case l:case c:return he;default:var ue=he&&he.$$typeof;switch(ue){case a:case s:case d:case u:case i:return ue;default:return V}}case t:return V}}}var P=a,C=i,E=e,A=s,T=r,M=d,_=u,k=t,N=o,R=n,z=l,B=!1,F=!1;function j(W){return B||(B=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function L(W){return F||(F=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function H(W){return S(W)===a}function re(W){return S(W)===i}function le(W){return typeof W=="object"&&W!==null&&W.$$typeof===e}function ae(W){return S(W)===s}function oe(W){return S(W)===r}function Se(W){return S(W)===d}function Me(W){return S(W)===u}function K(W){return S(W)===t}function fe(W){return S(W)===o}function $(W){return S(W)===n}function G(W){return S(W)===l}Ee.ContextConsumer=P,Ee.ContextProvider=C,Ee.Element=E,Ee.ForwardRef=A,Ee.Fragment=T,Ee.Lazy=M,Ee.Memo=_,Ee.Portal=k,Ee.Profiler=N,Ee.StrictMode=R,Ee.Suspense=z,Ee.isAsyncMode=j,Ee.isConcurrentMode=L,Ee.isContextConsumer=H,Ee.isContextProvider=re,Ee.isElement=le,Ee.isForwardRef=ae,Ee.isFragment=oe,Ee.isLazy=Se,Ee.isMemo=Me,Ee.isPortal=K,Ee.isProfiler=fe,Ee.isStrictMode=$,Ee.isSuspense=G,Ee.isValidElementType=w,Ee.typeOf=S})()),Ee}var GP;function ZZ(){return GP||(GP=1,process.env.NODE_ENV==="production"?Tl.exports=qZ():Tl.exports=XZ()),Tl.exports}var QZ=ZZ(),YP=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",qP=null,Lp=null,XD=e=>{if(e===qP&&Array.isArray(Lp))return Lp;var t=[];return O.Children.forEach(e,r=>{We(r)||(QZ.isFragment(r)?t=t.concat(XD(r.props.children)):t.push(r))}),Lp=t,qP=e,t};function Sy(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(o=>YP(o)):n=[YP(t)],XD(e).forEach(o=>{var i=ko(o,"type.displayName")||ko(o,"type.name");i&&n.indexOf(i)!==-1&&r.push(o)}),r}var ZD=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0,$p={},XP;function JZ(){return XP||(XP=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})($p)),$p}var Vp,ZP;function eQ(){return ZP||(ZP=1,Vp=JZ().isPlainObject),Vp}var tQ=eQ();const rQ=Gn(tQ);var QP,JP,eC,tC,rC;function nC(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 oC(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nC(Object(r),!0).forEach(function(n){nQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nQ(e,t,r){return(t=oQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oQ(e){var t=iQ(e,"string");return typeof t=="symbol"?t:t+""}function iQ(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 Gc(){return Gc=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},Gc.apply(null,arguments)}function ha(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var iC=(e,t,r,n,o)=>{var i=r-n,a;return a=Ue(QP||(QP=ha(["M ",",",""])),e,t),a+=Ue(JP||(JP=ha(["L ",",",""])),e+r,t),a+=Ue(eC||(eC=ha(["L ",",",""])),e+r-i/2,t+o),a+=Ue(tC||(tC=ha(["L ",",",""])),e+r-i/2-n,t+o),a+=Ue(rC||(rC=ha(["L ",","," Z"])),e,t),a},aQ={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},sQ=e=>{var t=et(e,aQ),{x:r,y:n,upperWidth:o,lowerWidth:i,height:a,className:s}=t,{animationEasing:l,animationDuration:c,animationBegin:u,isUpdateAnimationActive:d}=t,f=O.useRef(null),[h,v]=O.useState(-1),m=O.useRef(o),g=O.useRef(i),y=O.useRef(a),x=O.useRef(r),w=O.useRef(n),S=bs(e,"trapezoid-");if(O.useEffect(()=>{if(f.current&&f.current.getTotalLength)try{var R=f.current.getTotalLength();R&&v(R)}catch{}},[]),r!==+r||n!==+n||o!==+o||i!==+i||a!==+a||o===0&&i===0||a===0)return null;var P=ve("recharts-trapezoid",s);if(!d)return p.createElement("g",null,p.createElement("path",Gc({},Rt(t),{className:P,d:iC(r,n,o,i,a)})));var C=m.current,E=g.current,A=y.current,T=x.current,M=w.current,_="0px ".concat(h===-1?1:h,"px"),k="".concat(h,"px 0px"),N=wM(["strokeDasharray"],c,l);return p.createElement(ys,{animationId:S,key:S,canBegin:h>0,duration:c,easing:l,isActive:d,begin:u},R=>{var z=Le(C,o,R),B=Le(E,i,R),F=Le(A,a,R),j=Le(T,r,R),L=Le(M,n,R);f.current&&(m.current=z,g.current=B,y.current=F,x.current=j,w.current=L);var H=R>0?{transition:N,strokeDasharray:k}:{strokeDasharray:_};return p.createElement("path",Gc({},Rt(t),{className:P,d:iC(j,L,z,B,F),ref:f,style:oC(oC({},H),t.style)}))})},lQ=["option","shapeType","activeClassName"];function cQ(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}function aC(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 Yc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?aC(Object(r),!0).forEach(function(n){dQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):aC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function dQ(e,t,r){return(t=fQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fQ(e){var t=pQ(e,"string");return typeof t=="symbol"?t:t+""}function pQ(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 hQ(e,t){return Yc(Yc({},t),e)}function mQ(e,t){return e==="symbols"}function sC(e){var{shapeType:t,elementProps:r}=e;switch(t){case"rectangle":return p.createElement(OM,r);case"trapezoid":return p.createElement(sQ,r);case"sector":return p.createElement(MM,r);case"symbols":if(mQ(t))return p.createElement(Fv,r);break;case"curve":return p.createElement(ig,r);default:return null}}function vQ(e){return O.isValidElement(e)?e.props:e}function Py(e){var{option:t,shapeType:r,activeClassName:n="recharts-active-shape"}=e,o=cQ(e,lQ),i;if(O.isValidElement(t))i=O.cloneElement(t,Yc(Yc({},o),vQ(t)));else if(typeof t=="function")i=t(o,o.index);else if(rQ(t)&&typeof t!="boolean"){var a=hQ(t,o);i=p.createElement(sC,{shapeType:r,elementProps:a})}else{var s=o;i=p.createElement(sC,{shapeType:r,elementProps:s})}return o.isActive?p.createElement(ht,{className:n},i):i}var Cy=(e,t,r)=>{var n=Ne();return(o,i)=>a=>{e?.(o,i,a),n(sD({activeIndex:String(i),activeDataKey:t,activeCoordinate:o.tooltipPosition,activeGraphicalItemId:r}))}},Oy=e=>{var t=Ne();return(r,n)=>o=>{e?.(r,n,o),t(g9())}},Ey=(e,t,r)=>{var n=Ne();return(o,i)=>a=>{e?.(o,i,a),n(y9({activeIndex:String(i),activeDataKey:t,activeCoordinate:o.tooltipPosition,activeGraphicalItemId:r}))}};function Ay(e){var{tooltipEntrySettings:t}=e,r=Ne(),n=Tt(),o=O.useRef(null);return O.useLayoutEffect(()=>{n||(o.current===null?r(p9(t)):o.current!==t&&r(h9({prev:o.current,next:t})),o.current=t)},[t,r,n]),O.useLayoutEffect(()=>()=>{o.current&&(r(m9(o.current)),o.current=null)},[r]),null}function QD(e){var{legendPayload:t}=e,r=Ne(),n=Tt(),o=O.useRef(null);return O.useLayoutEffect(()=>{n||(o.current===null?r(gM(t)):o.current!==t&&r(yM({prev:o.current,next:t})),o.current=t)},[r,n,t]),O.useLayoutEffect(()=>()=>{o.current&&(r(bM(o.current)),o.current=null)},[r]),null}function gQ(e){var{legendPayload:t}=e,r=Ne(),n=J(ye),o=O.useRef(null);return O.useLayoutEffect(()=>{n!=="centric"&&n!=="radial"||(o.current===null?r(gM(t)):o.current!==t&&r(yM({prev:o.current,next:t})),o.current=t)},[r,n,t]),O.useLayoutEffect(()=>()=>{o.current&&(r(bM(o.current)),o.current=null)},[r]),null}var Fp,yQ=()=>{var[e]=p.useState(()=>Da("uid-"));return e},bQ=(Fp=p.useId)!==null&&Fp!==void 0?Fp:yQ;function xQ(e,t){var r=bQ();return t||(e?"".concat(e,"-").concat(r):r)}var wQ=O.createContext(void 0),Ty=e=>{var{id:t,type:r,children:n}=e,o=xQ("recharts-".concat(r),t);return p.createElement(wQ.Provider,{value:o},n(o))},SQ={cartesianItems:[],polarItems:[]},JD=Bt({name:"graphicalItems",initialState:SQ,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:Re()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:r,next:n}=t.payload,o=br(e).cartesianItems.indexOf(r);o>-1&&(e.cartesianItems[o]=n)},prepare:Re()},removeCartesianGraphicalItem:{reducer(e,t){var r=br(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},prepare:Re()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:Re()},removePolarGraphicalItem:{reducer(e,t){var r=br(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)},prepare:Re()}}}),{addCartesianGraphicalItem:PQ,replaceCartesianGraphicalItem:CQ,removeCartesianGraphicalItem:OQ,addPolarGraphicalItem:EQ,removePolarGraphicalItem:AQ}=JD.actions,TQ=JD.reducer,MQ=e=>{var t=Ne(),r=O.useRef(null);return O.useLayoutEffect(()=>{r.current===null?t(PQ(e)):r.current!==e&&t(CQ({prev:r.current,next:e})),r.current=e},[t,e]),O.useLayoutEffect(()=>()=>{r.current&&(t(OQ(r.current)),r.current=null)},[t]),null},e_=O.memo(MQ);function kQ(e){var t=Ne();return O.useLayoutEffect(()=>(t(EQ(e)),()=>{t(AQ(e))}),[t,e]),null}var DQ=["key"],_Q=["onMouseEnter","onClick","onMouseLeave"],NQ=["id"],jQ=["id"];function lC(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 He(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lC(Object(r),!0).forEach(function(n){IQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function IQ(e,t,r){return(t=RQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function RQ(e){var t=LQ(e,"string");return typeof t=="symbol"?t:t+""}function LQ(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 Bn(){return Bn=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},Bn.apply(null,arguments)}function bd(e,t){if(e==null)return{};var r,n,o=$Q(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 $Q(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 VQ(e){var t=O.useMemo(()=>Sy(e.children,Ds),[e.children]),r=J(n=>GZ(n,e.id,t));return r==null?null:p.createElement(gQ,{legendPayload:r})}var FQ=p.memo(e=>{var{dataKey:t,nameKey:r,sectors:n,stroke:o,strokeWidth:i,fill:a,name:s,hide:l,tooltipType:c,id:u}=e,d={dataDefinedOnItem:n.map(f=>f.tooltipPayload),getPosition:f=>{var h;return(h=n[Number(f)])===null||h===void 0?void 0:h.tooltipPosition},settings:{stroke:o,strokeWidth:i,fill:a,dataKey:t,nameKey:r,name:Fi(s,t),hide:l,type:c,color:a,unit:"",graphicalItemId:u}};return p.createElement(Ay,{tooltipEntrySettings:d})}),BQ=(e,t)=>e>t?"start":e<t?"end":"middle",WQ=(e,t,r)=>Ot(typeof t=="function"?t(e):t,r,r*.8),zQ=(e,t,r)=>{var{top:n,left:o,width:i,height:a}=t,s=EM(i,a),l=o+Ot(e.cx,i,i/2),c=n+Ot(e.cy,a,a/2),u=Ot(e.innerRadius,s,0),d=WQ(r,e.outerRadius,s),f=e.maxRadius||Math.sqrt(i*i+a*a)/2;return{cx:l,cy:c,innerRadius:u,outerRadius:d,maxRadius:f}},KQ=(e,t)=>{var r=ft(t-e),n=Math.min(Math.abs(t-e),360);return r*n},UQ=(e,t)=>{if(p.isValidElement(e))return p.cloneElement(e,t);if(typeof e=="function")return e(t);var r=ve("recharts-pie-label-line",typeof e!="boolean"?e.className:""),{key:n}=t,o=bd(t,DQ);return p.createElement(ig,Bn({},o,{type:"linear",className:r}))},HQ=(e,t,r)=>{if(p.isValidElement(e))return p.cloneElement(e,t);var n=r;if(typeof e=="function"&&(n=e(t),p.isValidElement(n)))return n;var o=ve("recharts-pie-label-text",YD(e));return p.createElement(vd,Bn({},t,{alignmentBaseline:"middle",className:o}),n)};function GQ(e){var{sectors:t,props:r,showLabels:n}=e,{label:o,labelLine:i,dataKey:a}=r;if(!n||!o||!t)return null;var s=Zt(r),l=To(o),c=To(i),u=typeof o=="object"&&"offsetRadius"in o&&typeof o.offsetRadius=="number"&&o.offsetRadius||20,d=t.map((f,h)=>{var v=(f.startAngle+f.endAngle)/2,m=Xe(f.cx,f.cy,f.outerRadius+u,v),g=He(He(He(He({},s),f),{},{stroke:"none"},l),{},{index:h,textAnchor:BQ(m.x,f.cx)},m),y=He(He(He(He({},s),f),{},{fill:"none",stroke:f.fill},c),{},{index:h,points:[Xe(f.cx,f.cy,f.outerRadius,v),m],key:"line"});return p.createElement(Wt,{zIndex:Ze.label,key:"label-".concat(f.startAngle,"-").concat(f.endAngle,"-").concat(f.midAngle,"-").concat(h)},p.createElement(ht,null,i&&UQ(i,y),HQ(o,g,Ae(f,a))))});return p.createElement(ht,{className:"recharts-pie-labels"},d)}function YQ(e){var{sectors:t,props:r,showLabels:n}=e,{label:o}=r;return typeof o=="object"&&o!=null&&"position"in o?p.createElement(by,{label:o}):p.createElement(GQ,{sectors:t,props:r,showLabels:n})}function qQ(e){var{sectors:t,activeShape:r,inactiveShape:n,allOtherPieProps:o,shape:i,id:a}=e,s=J(Fn),l=J(dy),c=J(n7),{onMouseEnter:u,onClick:d,onMouseLeave:f}=o,h=bd(o,_Q),v=Cy(u,o.dataKey,a),m=Oy(f),g=Ey(d,o.dataKey,a);return t==null||t.length===0?null:p.createElement(p.Fragment,null,t.map((y,x)=>{if(y?.startAngle===0&&y?.endAngle===0&&t.length!==1)return null;var w=c==null||c===a,S=String(x)===s&&(l==null||o.dataKey===l)&&w,P=s?n:null,C=r&&S?r:P,E=He(He({},y),{},{stroke:y.stroke,tabIndex:-1,[rM]:x,[nM]:a});return p.createElement(ht,Bn({key:"sector-".concat(y?.startAngle,"-").concat(y?.endAngle,"-").concat(y.midAngle,"-").concat(x),tabIndex:-1,className:"recharts-pie-sector"},us(h,y,x),{onMouseEnter:v(y,x),onMouseLeave:m(y,x),onClick:g(y,x)}),p.createElement(Py,Bn({option:i??C,index:x,shapeType:"sector",isActive:S},E)))}))}function XQ(e){var t,{pieSettings:r,displayedData:n,cells:o,offset:i}=e,{cornerRadius:a,startAngle:s,endAngle:l,dataKey:c,nameKey:u,tooltipType:d}=r,f=Math.abs(r.minAngle),h=KQ(s,l),v=Math.abs(h),m=n.length<=1?0:(t=r.paddingAngle)!==null&&t!==void 0?t:0,g=n.filter(C=>Ae(C,c,0)!==0).length,y=(v>=360?g:g-1)*m,x=v-g*f-y,w=n.reduce((C,E)=>{var A=Ae(E,c,0);return C+(Y(A)?A:0)},0),S;if(w>0){var P;S=n.map((C,E)=>{var A=Ae(C,c,0),T=Ae(C,u,E),M=zQ(r,i,C),_=(Y(A)?A:0)/w,k,N=He(He({},C),o&&o[E]&&o[E].props);E?k=P.endAngle+ft(h)*m*(A!==0?1:0):k=s;var R=k+ft(h)*((A!==0?f:0)+_*x),z=(k+R)/2,B=(M.innerRadius+M.outerRadius)/2,F=[{name:T,value:A,payload:N,dataKey:c,type:d,graphicalItemId:r.id}],j=Xe(M.cx,M.cy,B,z);return P=He(He(He(He({},r.presentationProps),{},{percent:_,cornerRadius:typeof a=="string"?parseFloat(a):a,name:T,tooltipPayload:F,midAngle:z,middleRadius:B,tooltipPosition:j},N),M),{},{value:A,dataKey:c,startAngle:k,endAngle:R,payload:N,paddingAngle:ft(h)*m}),P})}return S}function ZQ(e){var{showLabels:t,sectors:r,children:n}=e,o=O.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 p.createElement(kZ,{value:t?o:void 0},n)}function QQ(e){var{props:t,previousSectorsRef:r,id:n}=e,{sectors:o,isAnimationActive:i,animationBegin:a,animationDuration:s,animationEasing:l,activeShape:c,inactiveShape:u,onAnimationStart:d,onAnimationEnd:f}=t,h=bs(t,"recharts-pie-"),v=r.current,[m,g]=O.useState(!1),y=O.useCallback(()=>{typeof f=="function"&&f(),g(!1)},[f]),x=O.useCallback(()=>{typeof d=="function"&&d(),g(!0)},[d]);return p.createElement(ZQ,{showLabels:!m,sectors:o},p.createElement(ys,{animationId:h,begin:a,duration:s,isActive:i,easing:l,onAnimationStart:x,onAnimationEnd:y,key:h},w=>{var S,P=[],C=o&&o[0],E=(S=C?.startAngle)!==null&&S!==void 0?S:0;return o?.forEach((A,T)=>{var M=v&&v[T],_=T>0?ko(A,"paddingAngle",0):0;if(M){var k=Le(M.endAngle-M.startAngle,A.endAngle-A.startAngle,w),N=He(He({},A),{},{startAngle:E+_,endAngle:E+k+_});P.push(N),E=N.endAngle}else{var{endAngle:R,startAngle:z}=A,B=Le(0,R-z,w),F=He(He({},A),{},{startAngle:E+_,endAngle:E+B+_});P.push(F),E=F.endAngle}}),r.current=P,p.createElement(ht,null,p.createElement(qQ,{sectors:P,activeShape:c,inactiveShape:u,allOtherPieProps:t,shape:t.shape,id:n}))}),p.createElement(YQ,{showLabels:!m,sectors:o,props:t}),t.children)}var JQ={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:Ze.area};function eJ(e){var{id:t}=e,r=bd(e,NQ),{hide:n,className:o,rootTabIndex:i}=e,a=O.useMemo(()=>Sy(e.children,Ds),[e.children]),s=J(u=>YZ(u,t,a)),l=O.useRef(null),c=ve("recharts-pie",o);return n||s==null?(l.current=null,p.createElement(ht,{tabIndex:i,className:c})):p.createElement(Wt,{zIndex:e.zIndex},p.createElement(FQ,{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}),p.createElement(ht,{tabIndex:i,className:c},p.createElement(QQ,{props:He(He({},r),{},{sectors:s}),previousSectorsRef:l,id:t})))}function t_(e){var t=et(e,JQ),{id:r}=t,n=bd(t,jQ),o=Zt(n);return p.createElement(Ty,{id:r,type:"pie"},i=>p.createElement(p.Fragment,null,p.createElement(kQ,{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}),p.createElement(VQ,Bn({},n,{id:i})),p.createElement(eJ,Bn({},n,{id:i}))))}t_.displayName="Pie";var tJ=["points"];function cC(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 Bp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cC(Object(r),!0).forEach(function(n){rJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rJ(e,t,r){return(t=nJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nJ(e){var t=oJ(e,"string");return typeof t=="symbol"?t:t+""}function oJ(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 qc(){return qc=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},qc.apply(null,arguments)}function iJ(e,t){if(e==null)return{};var r,n,o=aJ(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 aJ(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 sJ(e){var{option:t,dotProps:r,className:n}=e;if(O.isValidElement(t))return O.cloneElement(t,r);if(typeof t=="function")return t(r);var o=ve(n,typeof t!="boolean"?t.className:""),i=r??{},{points:a}=i,s=iJ(i,tJ);return p.createElement(KD,qc({},s,{className:o}))}function lJ(e,t){return e==null?!1:t?!0:e.length===1}function cJ(e){var{points:t,dot:r,className:n,dotClassName:o,dataKey:i,baseProps:a,needClip:s,clipPathId:l,zIndex:c=Ze.scatter}=e;if(!lJ(t,r))return null;var u=ZD(r),d=o5(r),f=t.map((v,m)=>{var g,y,x=Bp(Bp(Bp({r:3},a),d),{},{index:m,cx:(g=v.x)!==null&&g!==void 0?g:void 0,cy:(y=v.y)!==null&&y!==void 0?y:void 0,dataKey:i,value:v.value,payload:v.payload,points:t});return p.createElement(sJ,{key:"dot-".concat(m),option:r,dotProps:x,className:o})}),h={};return s&&l!=null&&(h.clipPath="url(#clipPath-".concat(u?"":"dots-").concat(l,")")),p.createElement(Wt,{zIndex:c},p.createElement(ht,qc({className:n},h),f))}function uC(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 dC(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uC(Object(r),!0).forEach(function(n){uJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function uJ(e,t,r){return(t=dJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dJ(e){var t=fJ(e,"string");return typeof t=="symbol"?t:t+""}function fJ(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 r_=0,pJ={xAxis:{},yAxis:{},zAxis:{}},n_=Bt({name:"cartesianAxis",initialState:pJ,reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:Re()},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:Re()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:Re()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:Re()},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:Re()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:Re()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:Re()},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:Re()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:Re()},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]=dC(dC({},o),{},{width:n,widthHistory:s})}}}}),{addXAxis:hJ,replaceXAxis:mJ,removeXAxis:vJ,addYAxis:gJ,replaceYAxis:yJ,removeYAxis:bJ,addZAxis:Nye,replaceZAxis:jye,removeZAxis:Iye,updateYAxisWidth:xJ}=n_.actions,wJ=n_.reducer,SJ=I([at],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),PJ=I([SJ,yn,bn],(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)}}),My=()=>J(PJ),CJ=()=>J(l7);function fC(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 Wp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fC(Object(r),!0).forEach(function(n){OJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function OJ(e,t,r){return(t=EJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function EJ(e){var t=AJ(e,"string");return typeof t=="symbol"?t:t+""}function AJ(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 TJ=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=Wp(Wp(Wp({},s),To(o)),Bv(o)),c;return O.isValidElement(o)?c=O.cloneElement(o,l):typeof o=="function"?c=o(l):c=p.createElement(KD,l),p.createElement(ht,{className:"recharts-active-dot",clipPath:a},c)};function MJ(e){var{points:t,mainColor:r,activeDot:n,itemDataKey:o,clipPath:i,zIndex:a=Ze.activeDot}=e,s=J(Fn),l=CJ();if(t==null||l==null)return null;var c=t.find(u=>l.includes(u.payload));return We(c)?null:p.createElement(Wt,{zIndex:a},p.createElement(TJ,{point:c,childIndex:Number(s),mainColor:r,dataKey:o,activeDot:n,clipPath:i}))}var pC=(e,t,r)=>{var n=r??e;if(!We(n))return Ot(n,t,0)},kJ=(e,t,r)=>{var n={},o=e.filter(sd),i=e.filter(c=>c.stackId==null),a=o.reduce((c,u)=>{var d=c[u.stackId];return d==null&&(d=[]),d.push(u),c[u.stackId]=d,c},n),s=Object.entries(a).map(c=>{var u,[d,f]=c,h=f.map(m=>m.dataKey),v=pC(t,r,(u=f[0])===null||u===void 0?void 0:u.barSize);return{stackId:d,dataKeys:h,barSize:v}}),l=i.map(c=>{var u=[c.dataKey].filter(f=>f!=null),d=pC(t,r,c.barSize);return{stackId:void 0,dataKeys:u,barSize:d}});return[...s,...l]};function hC(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 Ml(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hC(Object(r),!0).forEach(function(n){DJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function DJ(e,t,r){return(t=_J(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _J(e){var t=NJ(e,"string");return typeof t=="symbol"?t:t+""}function NJ(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 jJ(e,t,r,n,o){var i,a=n.length;if(!(a<1)){var s=Ot(e,r,0,!0),l,c=[];if(pe((i=n[0])===null||i===void 0?void 0:i.barSize)){var u=!1,d=r/a,f=n.reduce((x,w)=>x+(w.barSize||0),0);f+=(a-1)*s,f>=r&&(f-=(a-1)*s,s=0),f>=r&&d>0&&(u=!0,d*=.9,f=a*d);var h=(r-f)/2>>0,v={offset:h-s,size:0};l=n.reduce((x,w)=>{var S,P={stackId:w.stackId,dataKeys:w.dataKeys,position:{offset:v.offset+v.size+s,size:u?d:(S=w.barSize)!==null&&S!==void 0?S:0}},C=[...x,P];return v=P.position,C},c)}else{var m=Ot(t,r,0,!0);r-2*m-(a-1)*s<=0&&(s=0);var g=(r-2*m-(a-1)*s)/a;g>1&&(g>>=0);var y=pe(o)?Math.min(g,o):g;l=n.reduce((x,w,S)=>[...x,{stackId:w.stackId,dataKeys:w.dataKeys,position:{offset:m+(g+s)*S+(g-y)/2,size:y}}],c)}return l}}var IJ=(e,t,r,n,o,i,a)=>{var s=We(a)?t:a,l=jJ(r,n,o!==i?o:i,e,s);return o!==i&&l!=null&&(l=l.map(c=>Ml(Ml({},c),{},{position:Ml(Ml({},c.position),{},{offset:c.position.offset-o/2})}))),l},RJ=(e,t)=>{var r=$g(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)}}}},LJ=(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 $J(e,t){return e&&typeof e=="object"&&"zIndex"in e&&typeof e.zIndex=="number"&&pe(e.zIndex)?e.zIndex:t}var o_=e=>{var{chartData:t}=e,r=Ne(),n=Tt();return O.useEffect(()=>n?()=>{}:(r(bP(t)),()=>{r(bP(void 0))}),[t,r,n]),null},mC={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},i_=Bt({name:"brush",initialState:mC,reducers:{setBrushSettings(e,t){return t.payload==null?mC:t.payload}}}),{setBrushSettings:Rye}=i_.actions,VJ=i_.reducer;function FJ(e){return(e%180+180)%180}var BJ=function(t){var{width:r,height:n}=t,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=FJ(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)},WJ={dots:[],areas:[],lines:[]},a_=Bt({name:"referenceElements",initialState:WJ,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=br(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=br(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=br(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),{addDot:Lye,removeDot:$ye,addArea:Vye,removeArea:Fye,addLine:Bye,removeLine:Wye}=a_.actions,zJ=a_.reducer,KJ=O.createContext(void 0),UJ=e=>{var{children:t}=e,[r]=O.useState("".concat(Da("recharts"),"-clip")),n=My();if(n==null)return null;var{x:o,y:i,width:a,height:s}=n;return p.createElement(KJ.Provider,{value:r},p.createElement("defs",null,p.createElement("clipPath",{id:r},p.createElement("rect",{x:o,y:i,height:s,width:a}))),t)};function s_(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 HJ(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return BJ(n,r)}function GJ(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 Ua(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 YJ(e,t){return s_(e,t+1)}function qJ(e,t,r,n,o){for(var i=(n||[]).slice(),{start:a,end:s}=t,l=0,c=1,u=a,d=function(){var v=n?.[l];if(v===void 0)return{v:s_(n,c)};var m=l,g,y=()=>(g===void 0&&(g=r(v,m)),g),x=v.coordinate,w=l===0||Ua(e,x,y,u,s);w||(l=0,u=a,c+=1),w&&(u=x+e*(y()/2+o),l+=c)},f;c<=i.length;)if(f=d(),f)return f.v;return[]}function XJ(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,d=s,f=!0,h=function(){var S=n[m];if(S==null)return 0;var P=m,C,E=()=>(C===void 0&&(C=r(S,P)),C),A=S.coordinate,T=m===u||Ua(e,A,E,d,l);if(!T)return f=!1,1;T&&(d=A+e*(E()/2+o))},v,m=u;m<a&&(v=h(),!(v!==0&&v===1));m+=c);if(f){for(var g=[],y=u;y<a;y+=c){var x=n[y];x!=null&&g.push(x)}return g}}return[]}function vC(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 wt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vC(Object(r),!0).forEach(function(n){ZJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ZJ(e,t,r){return(t=QJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function QJ(e){var t=JJ(e,"string");return typeof t=="symbol"?t:t+""}function JJ(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 eee(e,t,r,n,o){for(var i=(n||[]).slice(),a=i.length,{start:s}=t,{end:l}=t,c=function(f){var h=i[f];if(h==null)return 1;var v=h,m,g=()=>(m===void 0&&(m=r(h,f)),m);if(f===a-1){var y=e*(v.coordinate+e*g()/2-l);i[f]=v=wt(wt({},v),{},{tickCoord:y>0?v.coordinate-y*e:v.coordinate})}else i[f]=v=wt(wt({},v),{},{tickCoord:v.coordinate});if(v.tickCoord!=null){var x=Ua(e,v.tickCoord,g,s,l);x&&(l=v.tickCoord-e*(g()/2+o),i[f]=wt(wt({},v),{},{isShow:!0}))}},u=a-1;u>=0;u--)c(u);return i}function tee(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 d=r(u,s-1),f=e*(u.coordinate+e*d/2-c);if(a[s-1]=u=wt(wt({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate}),u.tickCoord!=null){var h=Ua(e,u.tickCoord,()=>d,l,c);h&&(c=u.tickCoord-e*(d/2+o),a[s-1]=wt(wt({},u),{},{isShow:!0}))}}}for(var v=i?s-1:s,m=function(x){var w=a[x];if(w==null)return 1;var S=w,P,C=()=>(P===void 0&&(P=r(w,x)),P);if(x===0){var E=e*(S.coordinate-e*C()/2-l);a[x]=S=wt(wt({},S),{},{tickCoord:E<0?S.coordinate-E*e:S.coordinate})}else a[x]=S=wt(wt({},S),{},{tickCoord:S.coordinate});if(S.tickCoord!=null){var A=Ua(e,S.tickCoord,C,l,c);A&&(l=S.tickCoord+e*(C()/2+o),a[x]=wt(wt({},S),{},{isShow:!0}))}},g=0;g<v;g++)m(g);return a}function ky(e,t,r){var{tick:n,ticks:o,viewBox:i,minTickGap:a,orientation:s,interval:l,tickFormatter:c,unit:u,angle:d}=e;if(!o||!o.length||!n)return[];if(Y(l)||Xu.isSsr){var f;return(f=YJ(o,Y(l)?l:0))!==null&&f!==void 0?f:[]}var h=[],v=s==="top"||s==="bottom"?"width":"height",m=u&&v==="width"?Aa(u,{fontSize:t,letterSpacing:r}):{width:0,height:0},g=(P,C)=>{var E=typeof c=="function"?c(P.value,C):P.value;return v==="width"?HJ(Aa(E,{fontSize:t,letterSpacing:r}),m,d):Aa(E,{fontSize:t,letterSpacing:r})[v]},y=o[0],x=o[1],w=o.length>=2&&y!=null&&x!=null?ft(x.coordinate-y.coordinate):1,S=GJ(i,w,v);return l==="equidistantPreserveStart"?qJ(w,S,g,o,a):l==="equidistantPreserveEnd"?XJ(w,S,g,o,a):(l==="preserveStart"||l==="preserveStartEnd"?h=tee(w,S,g,o,a,l==="preserveStartEnd"):h=eee(w,S,g,o,a),h.filter(P=>P.isShow))}var ree=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 d=u.getBoundingClientRect();d.width>a&&(a=d.width)}});var s=r?r.getBoundingClientRect().width:0,l=o+i,c=a+l+s+(r?n:0);return Math.round(c)}return 0},nee=["axisLine","width","height","className","hide","ticks","axisType"];function oee(e,t){if(e==null)return{};var r,n,o=iee(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 iee(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 Ro(){return Ro=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},Ro.apply(null,arguments)}function gC(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?gC(Object(r),!0).forEach(function(n){aee(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function aee(e,t,r){return(t=see(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function see(e){var t=lee(e,"string");return typeof t=="symbol"?t:t+""}function lee(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 nn={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:Ze.axis};function cee(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=Ke(Ke(Ke({},l),Zt(s)),{},{fill:"none"});if(i==="top"||i==="bottom"){var u=+(i==="top"&&!a||i==="bottom"&&a);c=Ke(Ke({},c),{},{x1:t,y1:r+u*o,x2:t+n,y2:r+u*o})}else{var d=+(i==="left"&&!a||i==="right"&&a);c=Ke(Ke({},c),{},{x1:t+d*n,y1:r,x2:t+d*n,y2:r+o})}return p.createElement("line",Ro({},c,{className:ve("recharts-cartesian-axis-line",ko(s,"className"))}))}function uee(e,t,r,n,o,i,a,s,l){var c,u,d,f,h,v,m=s?-1:1,g=e.tickSize||a,y=Y(e.tickCoord)?e.tickCoord:e.coordinate;switch(i){case"top":c=u=e.coordinate,f=r+ +!s*o,d=f-m*g,v=d-m*l,h=y;break;case"left":d=f=e.coordinate,u=t+ +!s*n,c=u-m*g,h=c-m*l,v=y;break;case"right":d=f=e.coordinate,u=t+ +s*n,c=u+m*g,h=c+m*l,v=y;break;default:c=u=e.coordinate,f=r+ +s*o,d=f+m*g,v=d+m*l,h=y;break}return{line:{x1:c,y1:d,x2:u,y2:f},tick:{x:h,y:v}}}function dee(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function fee(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function pee(e){var{option:t,tickProps:r,value:n}=e,o,i=ve(r.className,"recharts-cartesian-axis-tick-value");if(p.isValidElement(t))o=p.cloneElement(t,Ke(Ke({},r),{},{className:i}));else if(typeof t=="function")o=t(Ke(Ke({},r),{},{className:i}));else{var a="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(a=ve(a,YD(t))),o=p.createElement(vd,Ro({},r,{className:a}),n)}return o}var hee=O.forwardRef((e,t)=>{var{ticks:r=[],tick:n,tickLine:o,stroke:i,tickFormatter:a,unit:s,padding:l,tickTextProps:c,orientation:u,mirror:d,x:f,y:h,width:v,height:m,tickSize:g,tickMargin:y,fontSize:x,letterSpacing:w,getTicksConfig:S,events:P,axisType:C}=e,E=ky(Ke(Ke({},S),{},{ticks:r}),x,w),A=dee(u,d),T=fee(u,d),M=Zt(S),_=To(n),k={};typeof o=="object"&&(k=o);var N=Ke(Ke({},M),{},{fill:"none"},k),R=E.map(F=>Ke({entry:F},uee(F,f,h,v,m,u,g,d,y))),z=R.map(F=>{var{entry:j,line:L}=F;return p.createElement(ht,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(j.value,"-").concat(j.coordinate,"-").concat(j.tickCoord)},o&&p.createElement("line",Ro({},N,L,{className:ve("recharts-cartesian-axis-tick-line",ko(o,"className"))})))}),B=R.map((F,j)=>{var L,H,{entry:re,tick:le}=F,ae=Ke(Ke(Ke(Ke({verticalAnchor:T},M),{},{textAnchor:A,stroke:"none",fill:i},le),{},{index:j,payload:re,visibleTicksCount:E.length,tickFormatter:a,padding:l},c),{},{angle:(L=(H=c?.angle)!==null&&H!==void 0?H:M.angle)!==null&&L!==void 0?L:0}),oe=Ke(Ke({},ae),_);return p.createElement(ht,Ro({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(re.value,"-").concat(re.coordinate,"-").concat(re.tickCoord)},us(P,re,j)),n&&p.createElement(pee,{option:n,tickProps:oe,value:"".concat(typeof a=="function"?a(re.value,j):re.value).concat(s||"")}))});return p.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(C,"-ticks")},B.length>0&&p.createElement(Wt,{zIndex:Ze.label},p.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(C,"-tick-labels"),ref:t},B)),z.length>0&&p.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(C,"-tick-lines")},z))}),mee=O.forwardRef((e,t)=>{var{axisLine:r,width:n,height:o,className:i,hide:a,ticks:s,axisType:l}=e,c=oee(e,nee),[u,d]=O.useState(""),[f,h]=O.useState(""),v=O.useRef(null);O.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var g;return ree({ticks:v.current,label:(g=e.labelRef)===null||g===void 0?void 0:g.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var m=O.useCallback(g=>{if(g){var y=g.getElementsByClassName("recharts-cartesian-axis-tick-value");v.current=y;var x=y[0];if(x){var w=window.getComputedStyle(x),S=w.fontSize,P=w.letterSpacing;(S!==u||P!==f)&&(d(S),h(P))}}},[u,f]);return a||n!=null&&n<=0||o!=null&&o<=0?null:p.createElement(Wt,{zIndex:e.zIndex},p.createElement(ht,{className:ve("recharts-cartesian-axis",i)},p.createElement(cee,{x:e.x,y:e.y,width:n,height:o,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:Zt(e)}),p.createElement(hee,{ref:m,axisType:l,events:c,fontSize:u,getTicksConfig:e,height:e.height,letterSpacing:f,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}),p.createElement(cZ,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},p.createElement(bZ,{label:e.label,labelRef:e.labelRef}),e.children)))}),Dy=p.forwardRef((e,t)=>{var r=et(e,nn);return p.createElement(mee,Ro({},r,{ref:t}))});Dy.displayName="CartesianAxis";var vee=["x1","y1","x2","y2","key"],gee=["offset"],yee=["xAxisId","yAxisId"],bee=["xAxisId","yAxisId"];function yC(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 Pt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yC(Object(r),!0).forEach(function(n){xee(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function xee(e,t,r){return(t=wee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wee(e){var t=See(e,"string");return typeof t=="symbol"?t:t+""}function See(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 go(){return go=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},go.apply(null,arguments)}function Xc(e,t){if(e==null)return{};var r,n,o=Pee(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 Pee(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 Cee=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 p.createElement("rect",{x:n,y:o,ry:s,width:i,height:a,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function l_(e){var{option:t,lineItemProps:r}=e,n;if(p.isValidElement(t))n=p.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=Xc(r,vee),d=(o=Zt(u))!==null&&o!==void 0?o:{},{offset:f}=d,h=Xc(d,gee);n=p.createElement("line",go({},h,{x1:i,y1:a,x2:s,y2:l,fill:"none",key:c}))}return n}function Oee(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=Xc(e,yee),l=o.map((c,u)=>{var d=Pt(Pt({},s),{},{x1:t,y1:c,x2:t+r,y2:c,key:"line-".concat(u),index:u});return p.createElement(l_,{key:"line-".concat(u),option:n,lineItemProps:d})});return p.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function Eee(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=Xc(e,bee),l=o.map((c,u)=>{var d=Pt(Pt({},s),{},{x1:c,y1:t,x2:c,y2:t+r,key:"line-".concat(u),index:u});return p.createElement(l_,{option:n,lineItemProps:d,key:"line-".concat(u)})});return p.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function Aee(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(d=>Math.round(d+o-o)).sort((d,f)=>d-f);o!==c[0]&&c.unshift(0);var u=c.map((d,f)=>{var h=c[f+1],v=h==null,m=v?o+a-d:h-d;if(m<=0)return null;var g=f%t.length;return p.createElement("rect",{key:"react-".concat(f),y:d,x:n,height:m,width:i,stroke:"none",fill:t[g],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return p.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},u)}function Tee(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(d=>Math.round(d+o-o)).sort((d,f)=>d-f);o!==c[0]&&c.unshift(0);var u=c.map((d,f)=>{var h=c[f+1],v=h==null,m=v?o+a-d:h-d;if(m<=0)return null;var g=f%r.length;return p.createElement("rect",{key:"react-".concat(f),x:d,y:i,width:m,height:s,stroke:"none",fill:r[g],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return p.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},u)}var Mee=(e,t)=>{var{xAxis:r,width:n,height:o,offset:i}=e;return JT(ky(Pt(Pt(Pt({},nn),r),{},{ticks:eM(r),viewBox:{x:0,y:0,width:n,height:o}})),i.left,i.left+i.width,t)},kee=(e,t)=>{var{yAxis:r,width:n,height:o,offset:i}=e;return JT(ky(Pt(Pt(Pt({},nn),r),{},{ticks:eM(r),viewBox:{x:0,y:0,width:n,height:o}})),i.top,i.top+i.height,t)},Dee={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:Ze.grid};function _y(e){var t=tg(),r=rg(),n=sM(),o=Pt(Pt({},et(e,Dee)),{},{x:Y(e.x)?e.x:n.left,y:Y(e.y)?e.y:n.top,width:Y(e.width)?e.width:n.width,height:Y(e.height)?e.height:n.height}),{xAxisId:i,yAxisId:a,x:s,y:l,width:c,height:u,syncWithTicks:d,horizontalValues:f,verticalValues:h}=o,v=Tt(),m=J(T=>sP(T,"xAxis",i,v)),g=J(T=>sP(T,"yAxis",a,v));if(!Wr(c)||!Wr(u)||!Y(s)||!Y(l))return null;var y=o.verticalCoordinatesGenerator||Mee,x=o.horizontalCoordinatesGenerator||kee,{horizontalPoints:w,verticalPoints:S}=o;if((!w||!w.length)&&typeof x=="function"){var P=f&&f.length,C=x({yAxis:g?Pt(Pt({},g),{},{ticks:P?f:g.ticks}):void 0,width:t??c,height:r??u,offset:n},P?!0:d);Sc(Array.isArray(C),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof C,"]")),Array.isArray(C)&&(w=C)}if((!S||!S.length)&&typeof y=="function"){var E=h&&h.length,A=y({xAxis:m?Pt(Pt({},m),{},{ticks:E?h:m.ticks}):void 0,width:t??c,height:r??u,offset:n},E?!0:d);Sc(Array.isArray(A),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof A,"]")),Array.isArray(A)&&(S=A)}return p.createElement(Wt,{zIndex:o.zIndex},p.createElement("g",{className:"recharts-cartesian-grid"},p.createElement(Cee,{fill:o.fill,fillOpacity:o.fillOpacity,x:o.x,y:o.y,width:o.width,height:o.height,ry:o.ry}),p.createElement(Aee,go({},o,{horizontalPoints:w})),p.createElement(Tee,go({},o,{verticalPoints:S})),p.createElement(Oee,go({},o,{offset:n,horizontalPoints:w,xAxis:m,yAxis:g})),p.createElement(Eee,go({},o,{offset:n,verticalPoints:S,xAxis:m,yAxis:g}))))}_y.displayName="CartesianGrid";var _ee={},c_=Bt({name:"errorBars",initialState:_ee,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:zye,replaceErrorBar:Kye,removeErrorBar:Uye}=c_.actions,Nee=c_.reducer,jee=["children"];function Iee(e,t){if(e==null)return{};var r,n,o=Ree(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 Ree(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 Lee={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},$ee=O.createContext(Lee);function u_(e){var{children:t}=e,r=Iee(e,jee);return p.createElement($ee.Provider,{value:r},t)}function Ny(e,t){var r,n,o=J(c=>Sn(c,e)),i=J(c=>Pn(c,t)),a=(r=o?.allowDataOverflow)!==null&&r!==void 0?r:ct.allowDataOverflow,s=(n=i?.allowDataOverflow)!==null&&n!==void 0?n:ut.allowDataOverflow,l=a||s;return{needClip:l,needClipX:a,needClipY:s}}function d_(e){var{xAxisId:t,yAxisId:r,clipPathId:n}=e,o=My(),{needClipX:i,needClipY:a,needClip:s}=Ny(t,r);if(!s||!o)return null;var{x:l,y:c,width:u,height:d}=o;return p.createElement("clipPath",{id:"clipPath-".concat(n)},p.createElement("rect",{x:i?l:l-u/2,y:a?c:c-d/2,width:i?u:u*2,height:a?d:d*2}))}var f_=(e,t,r,n)=>Vn(e,"xAxis",t,n),p_=(e,t,r,n)=>$n(e,"xAxis",t,n),h_=(e,t,r,n)=>Vn(e,"yAxis",r,n),m_=(e,t,r,n)=>$n(e,"yAxis",r,n),Vee=I([ye,f_,h_,p_,m_],(e,t,r,n,o)=>gn(e,"xAxis")?Oi(t,n,!1):Oi(r,o,!1)),Fee=(e,t,r,n,o)=>o;function Bee(e){return e.type==="line"}var Wee=I([ud,Fee],(e,t)=>e.filter(Bee).find(r=>r.id===t)),zee=I([ye,f_,h_,p_,m_,Wee,Vee,Mg],(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:d,data:f}=i,h;if(f!=null&&f.length>0?h=f:h=l?.slice(c,u+1),h!=null)return Dte({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:o,dataKey:d,bandSize:a,displayedData:h})}});function Kee(e){var t=To(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 kl={exports:{}},zp={};var bC;function Uee(){if(bC)return zp;bC=1;var e=O;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 zp.useSyncExternalStoreWithSelector=function(l,c,u,d,f){var h=o(null);if(h.current===null){var v={hasValue:!1,value:null};h.current=v}else v=h.current;h=a(function(){function g(P){if(!y){if(y=!0,x=P,P=d(P),f!==void 0&&v.hasValue){var C=v.value;if(f(C,P))return w=C}return w=P}if(C=w,r(x,P))return C;var E=d(P);return f!==void 0&&f(C,E)?(x=P,C):(x=P,w=E)}var y=!1,x,w,S=u===void 0?null:u;return[function(){return g(c())},S===null?void 0:function(){return g(S())}]},[c,u,d,f]);var m=n(l,h[0],h[1]);return i(function(){v.hasValue=!0,v.value=m},[m]),s(m),m},zp}var Kp={};var xC;function Hee(){return xC||(xC=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=O,r=typeof Object.is=="function"?Object.is:e,n=t.useSyncExternalStore,o=t.useRef,i=t.useEffect,a=t.useMemo,s=t.useDebugValue;Kp.useSyncExternalStoreWithSelector=function(l,c,u,d,f){var h=o(null);if(h.current===null){var v={hasValue:!1,value:null};h.current=v}else v=h.current;h=a(function(){function g(P){if(!y){if(y=!0,x=P,P=d(P),f!==void 0&&v.hasValue){var C=v.value;if(f(C,P))return w=C}return w=P}if(C=w,r(x,P))return C;var E=d(P);return f!==void 0&&f(C,E)?(x=P,C):(x=P,w=E)}var y=!1,x,w,S=u===void 0?null:u;return[function(){return g(c())},S===null?void 0:function(){return g(S())}]},[c,u,d,f]);var m=n(l,h[0],h[1]);return i(function(){v.hasValue=!0,v.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())})()),Kp}var wC;function Gee(){return wC||(wC=1,process.env.NODE_ENV==="production"?kl.exports=Uee():kl.exports=Hee()),kl.exports}Gee();function Yee(e){e()}function qee(){let e=null,t=null;return{clear(){e=null,t=null},notify(){Yee(()=>{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 SC={notify(){},get:()=>[]};function Xee(e,t){let r,n=SC,o=0,i=!1;function a(m){u();const g=n.subscribe(m);let y=!1;return()=>{y||(y=!0,g(),d())}}function s(){n.notify()}function l(){v.onStateChange&&v.onStateChange()}function c(){return i}function u(){o++,r||(r=e.subscribe(l),n=qee())}function d(){o--,r&&o===0&&(r(),r=void 0,n.clear(),n=SC)}function f(){i||(i=!0,u())}function h(){i&&(i=!1,d())}const v={addNestedSub:a,notifyNestedSubs:s,handleChangeWrapper:l,isSubscribed:c,trySubscribe:f,tryUnsubscribe:h,getListeners:()=>n};return v}var Zee=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Qee=Zee(),Jee=()=>typeof navigator<"u"&&navigator.product==="ReactNative",ete=Jee(),tte=()=>Qee||ete?p.useLayoutEffect:p.useEffect,rte=tte();function PC(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function nte(e,t){if(PC(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])||!PC(e[r[o]],t[r[o]]))return!1;return!0}var ote=Symbol.for("react-redux-context"),ite=typeof globalThis<"u"?globalThis:{};function ate(){if(!p.createContext)return{};const e=ite[ote]??=new Map;let t=e.get(p.createContext);return t||(t=p.createContext(null),process.env.NODE_ENV!=="production"&&(t.displayName="ReactRedux"),e.set(p.createContext,t)),t}var ste=ate();function lte(e){const{children:t,context:r,serverState:n,store:o}=e,i=p.useMemo(()=>{const l=Xee(o),c={store:o,subscription:l,getServerState:n?()=>n:void 0};if(process.env.NODE_ENV==="production")return c;{const{identityFunctionCheck:u="once",stabilityCheck:d="once"}=e;return Object.assign(c,{stabilityCheck:d,identityFunctionCheck:u})}},[o,n]),a=p.useMemo(()=>o.getState(),[o]);rte(()=>{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||ste;return p.createElement(s.Provider,{value:i},t)}var cte=lte,ute=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius"]);function dte(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function xd(e,t){var r=new Set([...Object.keys(e),...Object.keys(t)]);for(var n of r)if(ute.has(n)){if(e[n]==null&&t[n]==null)continue;if(!nte(e[n],t[n]))return!1}else if(!dte(e[n],t[n]))return!1;return!0}var fte=["id"],pte=["type","layout","connectNulls","needClip","shape"],hte=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function Ha(){return Ha=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},Ha.apply(null,arguments)}function CC(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 Dr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?CC(Object(r),!0).forEach(function(n){mte(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):CC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mte(e,t,r){return(t=vte(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vte(e){var t=gte(e,"string");return typeof t=="symbol"?t:t+""}function gte(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 jy(e,t){if(e==null)return{};var r,n,o=yte(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 yte(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 bte=e=>{var{dataKey:t,name:r,stroke:n,legendType:o,hide:i}=e;return[{inactive:i,dataKey:t,type:o,color:n,value:Fi(r,t),payload:e}]},xte=p.memo(e=>{var{dataKey:t,data:r,stroke:n,strokeWidth:o,fill:i,name:a,hide:s,unit:l,tooltipType:c,id:u}=e,d={dataDefinedOnItem:r,getPosition:Wo,settings:{stroke:n,strokeWidth:o,fill:i,dataKey:t,nameKey:void 0,name:Fi(a,t),hide:s,type:c,color:n,unit:l,graphicalItemId:u}};return p.createElement(Ay,{tooltipEntrySettings:d})}),v_=(e,t)=>"".concat(t,"px ").concat(e-t,"px");function wte(e,t){for(var r=e.length%2!==0?[...e,0]:e,n=[],o=0;o<t;++o)n=[...n,...r];return n}var Ste=(e,t,r)=>{var n=r.reduce((h,v)=>h+v);if(!n)return v_(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,d=r[l];if(d!=null&&c+d>i){s=[...r.slice(0,l),i-c];break}}var f=s.length%2===0?[0,a]:[a];return[...wte(r,o),...s,...f].map(h=>"".concat(h,"px")).join(", ")};function Pte(e){var{clipPathId:t,points:r,props:n}=e,{dot:o,dataKey:i,needClip:a}=n,{id:s}=n,l=jy(n,fte),c=Zt(l);return p.createElement(cJ,{points:r,dot:o,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:i,baseProps:c,needClip:a,clipPathId:t})}function Cte(e){var{showLabels:t,children:r,points:n}=e,o=O.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 Dr(Dr({},l),{},{value:i.value,payload:i.payload,viewBox:l,parentViewBox:void 0,fill:void 0})}),[n]);return p.createElement(WD,{value:t?o:void 0},r)}function OC(e){var{clipPathId:t,pathRef:r,points:n,strokeDasharray:o,props:i}=e,{type:a,layout:s,connectNulls:l,needClip:c,shape:u}=i,d=jy(i,pte),f=Dr(Dr({},Rt(d)),{},{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 p.createElement(p.Fragment,null,n?.length>1&&p.createElement(Py,Ha({shapeType:"curve",option:u},f,{pathRef:r})),p.createElement(Pte,{points:n,clipPathId:t,props:i}))}function Ote(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function Ete(e){var{clipPathId:t,props:r,pathRef:n,previousPointsRef:o,longestAnimatedLengthRef:i}=e,{points:a,strokeDasharray:s,isAnimationActive:l,animationBegin:c,animationDuration:u,animationEasing:d,animateNewValues:f,width:h,height:v,onAnimationEnd:m,onAnimationStart:g}=r,y=o.current,x=bs(a,"recharts-line-"),w=O.useRef(x),[S,P]=O.useState(!1),C=!S,E=O.useCallback(()=>{typeof m=="function"&&m(),P(!1)},[m]),A=O.useCallback(()=>{typeof g=="function"&&g(),P(!0)},[g]),T=Ote(n.current),M=O.useRef(0);w.current!==x&&(M.current=i.current,w.current=x);var _=M.current;return p.createElement(Cte,{points:a,showLabels:C},r.children,p.createElement(ys,{animationId:x,begin:c,duration:u,isActive:l,easing:d,onAnimationEnd:E,onAnimationStart:A,key:x},k=>{var N=Le(_,T+_,k),R=Math.min(N,T),z;if(l)if(s){var B="".concat(s).split(/[,\s]+/gim).map(L=>parseFloat(L));z=Ste(R,T,B)}else z=v_(T,R);else z=s==null?void 0:String(s);if(k>0&&T>0&&(o.current=a,i.current=Math.max(i.current,R)),y){var F=y.length/a.length,j=k===1?a:a.map((L,H)=>{var re=Math.floor(H*F);if(y[re]){var le=y[re];return Dr(Dr({},L),{},{x:Le(le.x,L.x,k),y:Le(le.y,L.y,k)})}return f?Dr(Dr({},L),{},{x:Le(h*2,L.x,k),y:Le(v/2,L.y,k)}):Dr(Dr({},L),{},{x:L.x,y:L.y})});return o.current=j,p.createElement(OC,{props:r,points:j,clipPathId:t,pathRef:n,strokeDasharray:z})}return p.createElement(OC,{props:r,points:a,clipPathId:t,pathRef:n,strokeDasharray:z})}),p.createElement(by,{label:r.label}))}function Ate(e){var{clipPathId:t,props:r}=e,n=O.useRef(null),o=O.useRef(0),i=O.useRef(null);return p.createElement(Ete,{props:r,clipPathId:t,previousPointsRef:n,longestAnimatedLengthRef:o,pathRef:i})}var Tte=(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:Ae(e.payload,t)}};class Mte extends O.Component{render(){var{hide:t,dot:r,points:n,className:o,xAxisId:i,yAxisId:a,top:s,left:l,width:c,height:u,id:d,needClip:f,zIndex:h}=this.props;if(t)return null;var v=ve("recharts-line",o),m=d,{r:g,strokeWidth:y}=Kee(r),x=ZD(r),w=g*2+y,S=f?"url(#clipPath-".concat(x?"":"dots-").concat(m,")"):void 0;return p.createElement(Wt,{zIndex:h},p.createElement(ht,{className:v},f&&p.createElement("defs",null,p.createElement(d_,{clipPathId:m,xAxisId:i,yAxisId:a}),!x&&p.createElement("clipPath",{id:"clipPath-dots-".concat(m)},p.createElement("rect",{x:l-w/2,y:s-w/2,width:c+w,height:u+w}))),p.createElement(u_,{xAxisId:i,yAxisId:a,data:n,dataPointFormatter:Tte,errorBarOffset:0},p.createElement(Ate,{props:this.props,clipPathId:m}))),p.createElement(MJ,{activeDot:this.props.activeDot,points:n,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:S}))}}var g_={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:Ze.line,type:"linear"};function kte(e){var t=et(e,g_),{activeDot:r,animateNewValues:n,animationBegin:o,animationDuration:i,animationEasing:a,connectNulls:s,dot:l,hide:c,isAnimationActive:u,label:d,legendType:f,xAxisId:h,yAxisId:v,id:m}=t,g=jy(t,hte),{needClip:y}=Ny(h,v),x=My(),w=zo(),S=Tt(),P=J(M=>zee(M,h,v,S,m));if(w!=="horizontal"&&w!=="vertical"||P==null||x==null)return null;var{height:C,width:E,x:A,y:T}=x;return p.createElement(Mte,Ha({},g,{id:m,connectNulls:s,dot:l,activeDot:r,animateNewValues:n,animationBegin:o,animationDuration:i,animationEasing:a,isAnimationActive:u,hide:c,label:d,legendType:f,xAxisId:h,yAxisId:v,points:P,layout:w,height:C,width:E,left:A,top:T,needClip:y}))}function Dte(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 d=Ae(c,a);if(t==="horizontal"){var f=o0({axis:r,ticks:o,bandSize:s,entry:c,index:u}),h=We(d)?null:n.scale.map(d);return{x:f,y:h??null,value:d,payload:c}}var v=We(d)?null:r.scale.map(d),m=o0({axis:n,ticks:i,bandSize:s,entry:c,index:u});return v==null||m==null?null:{x:v,y:m,value:d,payload:c}}).filter(Boolean)}function _te(e){var t=et(e,g_),r=Tt();return p.createElement(Ty,{id:t.id,type:"line"},n=>p.createElement(p.Fragment,null,p.createElement(QD,{legendPayload:bte(t)}),p.createElement(xte,{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}),p.createElement(e_,{type:"line",id:n,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:r}),p.createElement(kte,Ha({},t,{id:n}))))}var y_=p.memo(_te,xd);y_.displayName="Line";function Ho(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:r_}function Go(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:r_}var Nte=process.env.NODE_ENV==="production",Up="Invariant failed";function jte(e,t){if(Nte)throw new Error(Up);var r=typeof t=="function"?t():t,n=r?"".concat(Up,": ").concat(r):Up;throw new Error(n)}function vm(){return vm=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},vm.apply(null,arguments)}function Zc(e){return p.createElement(Py,vm({shapeType:"rectangle",activeClassName:"recharts-active-bar"},e))}var Ite=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(n,o)=>{if(Y(t))return t;var i=Y(n)||We(n);return i?t(n,o):(i||jte(!1,"minPointSize callback function received a value with type of ".concat(typeof n,". Currently only numbers or null/undefined are supported.")),r)}},Rte=(e,t,r)=>r,Lte=(e,t)=>t,_s=I([ud,Lte],(e,t)=>e.filter(r=>r.type==="bar").find(r=>r.id===t)),$te=I([_s],e=>e?.maxBarSize),Vte=(e,t,r,n)=>n,Fte=I([ye,ud,Ho,Go,Rte],(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")),Bte=(e,t,r)=>{var n=ye(e),o=Ho(e,t),i=Go(e,t);if(!(o==null||i==null))return n==="horizontal"?cm(e,"yAxis",i,r):cm(e,"xAxis",o,r)},Wte=(e,t)=>{var r=ye(e),n=Ho(e,t),o=Go(e,t);if(!(n==null||o==null))return r==="horizontal"?aP(e,"xAxis",n):aP(e,"yAxis",o)},zte=I([Fte,nq,Wte],kJ),Kte=(e,t,r)=>{var n,o,i=_s(e,t);if(i==null)return 0;var a=Ho(e,t),s=Go(e,t);if(a==null||s==null)return 0;var l=ye(e),c=wk(e),{maxBarSize:u}=i,d=We(u)?c:u,f,h;return l==="horizontal"?(f=Vn(e,"xAxis",a,r),h=$n(e,"xAxis",a,r)):(f=Vn(e,"yAxis",s,r),h=$n(e,"yAxis",s,r)),(n=(o=Oi(f,h,!0))!==null&&o!==void 0?o:d)!==null&&n!==void 0?n:0},b_=(e,t,r)=>{var n=ye(e),o=Ho(e,t),i=Go(e,t);if(!(o==null||i==null)){var a,s;return n==="horizontal"?(a=Vn(e,"xAxis",o,r),s=$n(e,"xAxis",o,r)):(a=Vn(e,"yAxis",i,r),s=$n(e,"yAxis",i,r)),Oi(a,s)}},Ute=I([zte,wk,rq,Sk,Kte,b_,$te],IJ),Hte=(e,t,r)=>{var n=Ho(e,t);if(n!=null)return Vn(e,"xAxis",n,r)},Gte=(e,t,r)=>{var n=Go(e,t);if(n!=null)return Vn(e,"yAxis",n,r)},Yte=(e,t,r)=>{var n=Ho(e,t);if(n!=null)return $n(e,"xAxis",n,r)},qte=(e,t,r)=>{var n=Go(e,t);if(n!=null)return $n(e,"yAxis",n,r)},Xte=I([Ute,_s],LJ),Zte=I([Bte,_s],RJ),Qte=I([at,Zv,Hte,Gte,Yte,qte,Xte,ye,Y8,b_,Zte,_s,Vte],(e,t,r,n,o,i,a,s,l,c,u,d,f)=>{var{chartData:h,dataStartIndex:v,dataEndIndex:m}=l;if(!(d==null||a==null||t==null||s!=="horizontal"&&s!=="vertical"||r==null||n==null||o==null||i==null||c==null)){var{data:g}=d,y;if(g!=null&&g.length>0?y=g:y=h?.slice(v,m+1),y!=null)return Ere({layout:s,barSettings:d,pos:a,parentViewBox:t,bandSize:c,xAxis:r,yAxis:n,xAxisTicks:o,yAxisTicks:i,stackedData:u,displayedData:y,offset:e,cells:f,dataStartIndex:v})}}),Jte=["index"];function gm(){return gm=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},gm.apply(null,arguments)}function ere(e,t){if(e==null)return{};var r,n,o=tre(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 tre(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 x_=O.createContext(void 0),rre=e=>{var t=O.useContext(x_);if(t!=null)return t.stackId;if(e!=null)return BU(e)},nre=(e,t)=>"recharts-bar-stack-clip-path-".concat(e,"-").concat(t),ore=e=>{var t=O.useContext(x_);if(t!=null){var{stackId:r}=t;return"url(#".concat(nre(r,e),")")}},w_=e=>{var{index:t}=e,r=ere(e,Jte),n=ore(t);return p.createElement(ht,gm({className:"recharts-bar-stack-layer",clipPath:n},r))},ire=["onMouseEnter","onMouseLeave","onClick"],are=["value","background","tooltipPosition"],sre=["id"],lre=["onMouseEnter","onClick","onMouseLeave"];function dn(){return dn=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},dn.apply(null,arguments)}function EC(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 Dt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?EC(Object(r),!0).forEach(function(n){cre(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):EC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function cre(e,t,r){return(t=ure(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ure(e){var t=dre(e,"string");return typeof t=="symbol"?t:t+""}function dre(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 Qc(e,t){if(e==null)return{};var r,n,o=fre(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 fre(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 pre=e=>{var{dataKey:t,name:r,fill:n,legendType:o,hide:i}=e;return[{inactive:i,dataKey:t,type:o,color:n,value:Fi(r,t),payload:e}]},hre=p.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:Wo,settings:{stroke:r,strokeWidth:n,fill:o,dataKey:t,nameKey:void 0,name:Fi(i,t),hide:a,type:l,color:o,unit:s,graphicalItemId:c}};return p.createElement(Ay,{tooltipEntrySettings:u})});function mre(e){var t=J(Fn),{data:r,dataKey:n,background:o,allOtherBarProps:i}=e,{onMouseEnter:a,onMouseLeave:s,onClick:l}=i,c=Qc(i,ire),u=Cy(a,n,i.id),d=Oy(s),f=Ey(l,n,i.id);if(!o||r==null)return null;var h=To(o);return p.createElement(Wt,{zIndex:$J(o,Ze.barBackground)},r.map((v,m)=>{var{value:g,background:y,tooltipPosition:x}=v,w=Qc(v,are);if(!y)return null;var S=u(v,m),P=d(v,m),C=f(v,m),E=Dt(Dt(Dt(Dt(Dt({option:o,isActive:String(m)===t},w),{},{fill:"#eee"},y),h),us(c,v,m)),{},{onMouseEnter:S,onMouseLeave:P,onClick:C,dataKey:n,index:m,className:"recharts-bar-background-rectangle"});return p.createElement(Zc,dn({key:"background-bar-".concat(m)},E))}))}function vre(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 Dt(Dt({},a),{},{value:i.value,payload:i.payload,parentViewBox:i.parentViewBox,viewBox:a,fill:i.fill})});return p.createElement(WD,{value:t?o:void 0},r)}function gre(e){var{shape:t,activeBar:r,baseProps:n,entry:o,index:i,dataKey:a}=e,s=J(Fn),l=J(dy),c=r&&String(i)===s&&(l==null||a===l),u=c?r:t;return c?p.createElement(Wt,{zIndex:Ze.activeBar},p.createElement(w_,{index:i},p.createElement(Zc,dn({},n,{name:String(n.name)},o,{isActive:c,option:u,index:i,dataKey:a})))):p.createElement(Zc,dn({},n,{name:String(n.name)},o,{isActive:c,option:u,index:i,dataKey:a}))}function yre(e){var{shape:t,baseProps:r,entry:n,index:o,dataKey:i}=e;return p.createElement(Zc,dn({},r,{name:String(r.name)},n,{isActive:!1,option:t,index:o,dataKey:i}))}function bre(e){var t,{data:r,props:n}=e,o=(t=Zt(n))!==null&&t!==void 0?t:{},{id:i}=o,a=Qc(o,sre),{shape:s,dataKey:l,activeBar:c}=n,{onMouseEnter:u,onClick:d,onMouseLeave:f}=n,h=Qc(n,lre),v=Cy(u,l,i),m=Oy(f),g=Ey(d,l,i);return r?p.createElement(p.Fragment,null,r.map((y,x)=>p.createElement(w_,dn({index:x,key:"rectangle-".concat(y?.x,"-").concat(y?.y,"-").concat(y?.value,"-").concat(x),className:"recharts-bar-rectangle"},us(h,y,x),{onMouseEnter:v(y,x),onMouseLeave:m(y,x),onClick:g(y,x)}),c?p.createElement(gre,{shape:s,activeBar:c,baseProps:a,entry:y,index:x,dataKey:l}):p.createElement(yre,{shape:s,baseProps:a,entry:y,index:x,dataKey:l})))):null}function xre(e){var{props:t,previousRectanglesRef:r}=e,{data:n,layout:o,isAnimationActive:i,animationBegin:a,animationDuration:s,animationEasing:l,onAnimationEnd:c,onAnimationStart:u}=t,d=r.current,f=bs(t,"recharts-bar-"),[h,v]=O.useState(!1),m=!h,g=O.useCallback(()=>{typeof c=="function"&&c(),v(!1)},[c]),y=O.useCallback(()=>{typeof u=="function"&&u(),v(!0)},[u]);return p.createElement(vre,{showLabels:m,rects:n},p.createElement(ys,{animationId:f,begin:a,duration:s,isActive:i,easing:l,onAnimationEnd:g,onAnimationStart:y,key:f},x=>{var w=x===1?n:n?.map((S,P)=>{var C=d&&d[P];if(C)return Dt(Dt({},S),{},{x:Le(C.x,S.x,x),y:Le(C.y,S.y,x),width:Le(C.width,S.width,x),height:Le(C.height,S.height,x)});if(o==="horizontal"){var E=Le(0,S.height,x),A=Le(S.stackedBarStart,S.y,x);return Dt(Dt({},S),{},{y:A,height:E})}var T=Le(0,S.width,x),M=Le(S.stackedBarStart,S.x,x);return Dt(Dt({},S),{},{width:T,x:M})});return x>0&&(r.current=w??null),w==null?null:p.createElement(ht,null,p.createElement(bre,{props:t,data:w}))}),p.createElement(by,{label:t.label}),t.children)}function wre(e){var t=O.useRef(null);return p.createElement(xre,{previousRectanglesRef:t,props:e})}var S_=0,Sre=(e,t)=>{var r=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:r,errorVal:Ae(e,t)}};class Pre extends O.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=ve("recharts-bar",o),d=c;return p.createElement(ht,{className:u,id:c},s&&p.createElement("defs",null,p.createElement(d_,{clipPathId:d,xAxisId:i,yAxisId:a})),p.createElement(ht,{className:"recharts-bar-rectangles",clipPath:s?"url(#clipPath-".concat(d,")"):void 0},p.createElement(mre,{data:r,dataKey:n,background:l,allOtherBarProps:this.props}),p.createElement(wre,this.props)))}}var Cre={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",background:!1,hide:!1,isAnimationActive:"auto",label:!1,legendType:"rect",minPointSize:S_,xAxisId:0,yAxisId:0,zIndex:Ze.bar};function Ore(e){var{xAxisId:t,yAxisId:r,hide:n,legendType:o,minPointSize:i,activeBar:a,animationBegin:s,animationDuration:l,animationEasing:c,isAnimationActive:u}=e,{needClip:d}=Ny(t,r),f=zo(),h=Tt(),v=Sy(e.children,Ds),m=J(x=>Qte(x,e.id,h,v));if(f!=="vertical"&&f!=="horizontal")return null;var g,y=m?.[0];return y==null||y.height==null||y.width==null?g=0:g=f==="vertical"?y.height/2:y.width/2,p.createElement(u_,{xAxisId:t,yAxisId:r,data:m,dataPointFormatter:Sre,errorBarOffset:g},p.createElement(Pre,dn({},e,{layout:f,needClip:d,data:m,xAxisId:t,yAxisId:r,hide:n,legendType:o,minPointSize:i,activeBar:a,animationBegin:s,animationDuration:l,animationEasing:c,isAnimationActive:u})))}function Ere(e){var{layout:t,barSettings:{dataKey:r,minPointSize:n},pos:o,bandSize:i,xAxis:a,yAxis:s,xAxisTicks:l,yAxisTicks:c,stackedData:u,displayedData:d,offset:f,cells:h,parentViewBox:v,dataStartIndex:m}=e,g=t==="horizontal"?s:a,y=u?g.scale.domain():null,x=WU({numericAxis:g}),w=g.scale.map(x);return d.map((S,P)=>{var C,E,A,T,M,_;if(u){var k=u[P+m];if(k==null)return null;C=RU(k,y)}else C=Ae(S,r),Array.isArray(C)||(C=[x,C]);var N=Ite(n,S_)(C[1],P);if(t==="horizontal"){var R,z=s.scale.map(C[0]),B=s.scale.map(C[1]);if(z==null||B==null)return null;E=i0({axis:a,ticks:l,bandSize:i,offset:o.offset,entry:S,index:P}),A=(R=B??z)!==null&&R!==void 0?R:void 0,T=o.size;var F=z-B;if(M=Fr(F)?0:F,_={x:E,y:f.top,width:T,height:f.height},Math.abs(N)>0&&Math.abs(M)<Math.abs(N)){var j=ft(M||N)*(Math.abs(N)-Math.abs(M));A-=j,M+=j}}else{var L=a.scale.map(C[0]),H=a.scale.map(C[1]);if(L==null||H==null)return null;if(E=L,A=i0({axis:s,ticks:c,bandSize:i,offset:o.offset,entry:S,index:P}),T=H-L,M=o.size,_={x:f.left,y:A,width:f.width,height:M},Math.abs(N)>0&&Math.abs(T)<Math.abs(N)){var re=ft(T||N)*(Math.abs(N)-Math.abs(T));T+=re}}if(E==null||A==null||T==null||M==null)return null;var le=Dt(Dt({},S),{},{stackedBarStart:w,x:E,y:A,width:T,height:M,value:u?C:C[1],payload:S,background:_,tooltipPosition:{x:E+T/2,y:A+M/2},parentViewBox:v},h&&h[P]&&h[P].props);return le}).filter(Boolean)}function Are(e){var t=et(e,Cre),r=rre(t.stackId),n=Tt();return p.createElement(Ty,{id:t.id,type:"bar"},o=>p.createElement(p.Fragment,null,p.createElement(QD,{legendPayload:pre(t)}),p.createElement(hre,{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}),p.createElement(e_,{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}),p.createElement(Wt,{zIndex:t.zIndex},p.createElement(Ore,dn({},t,{id:o})))))}var P_=p.memo(Are,xd);P_.displayName="Bar";var Tre=["domain","range"],Mre=["domain","range"];function AC(e,t){if(e==null)return{};var r,n,o=kre(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 kre(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 TC(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 C_(e,t){if(e===t)return!0;var{domain:r,range:n}=e,o=AC(e,Tre),{domain:i,range:a}=t,s=AC(t,Mre);return!TC(r,i)||!TC(n,a)?!1:xd(o,s)}var Dre=["type"],_re=["dangerouslySetInnerHTML","ticks","scale"],Nre=["id","scale"];function ym(){return ym=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},ym.apply(null,arguments)}function MC(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 kC(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?MC(Object(r),!0).forEach(function(n){jre(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):MC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jre(e,t,r){return(t=Ire(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ire(e){var t=Rre(e,"string");return typeof t=="symbol"?t:t+""}function Rre(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 bm(e,t){if(e==null)return{};var r,n,o=Lre(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 Lre(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 $re(e){var t=Ne(),r=O.useRef(null),n=lM(),{type:o}=e,i=bm(e,Dre),a=id(n,"xAxis",o),s=O.useMemo(()=>{if(a!=null)return kC(kC({},i),{},{type:a})},[i,a]);return O.useLayoutEffect(()=>{s!=null&&(r.current===null?t(hJ(s)):r.current!==s&&t(mJ({prev:r.current,next:s})),r.current=s)},[s,t]),O.useLayoutEffect(()=>()=>{r.current&&(t(vJ(r.current)),r.current=null)},[t]),null}var Vre=e=>{var{xAxisId:t,className:r}=e,n=J(Zv),o=Tt(),i="xAxis",a=J(y=>tD(y,i,t,o)),s=J(y=>Zk(y,t)),l=J(y=>n9(y,t)),c=J(y=>_k(y,t));if(s==null||l==null||c==null)return null;var{dangerouslySetInnerHTML:u,ticks:d,scale:f}=e,h=bm(e,_re),{id:v,scale:m}=c,g=bm(c,Nre);return p.createElement(Dy,ym({},h,g,{x:l.x,y:l.y,width:s.width,height:s.height,className:ve("recharts-".concat(i," ").concat(i),r),viewBox:n,ticks:a,axisType:i}))},Fre={allowDataOverflow:ct.allowDataOverflow,allowDecimals:ct.allowDecimals,allowDuplicatedCategory:ct.allowDuplicatedCategory,angle:ct.angle,axisLine:nn.axisLine,height:ct.height,hide:!1,includeHidden:ct.includeHidden,interval:ct.interval,label:!1,minTickGap:ct.minTickGap,mirror:ct.mirror,orientation:ct.orientation,padding:ct.padding,reversed:ct.reversed,scale:ct.scale,tick:ct.tick,tickCount:ct.tickCount,tickLine:nn.tickLine,tickSize:nn.tickSize,type:ct.type,xAxisId:0},Bre=e=>{var t=et(e,Fre);return p.createElement(p.Fragment,null,p.createElement($re,{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}),p.createElement(Vre,t))},Jc=p.memo(Bre,C_);Jc.displayName="XAxis";var Wre=["type"],zre=["dangerouslySetInnerHTML","ticks","scale"],Kre=["id","scale"];function xm(){return xm=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},xm.apply(null,arguments)}function DC(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 _C(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?DC(Object(r),!0).forEach(function(n){Ure(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):DC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ure(e,t,r){return(t=Hre(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hre(e){var t=Gre(e,"string");return typeof t=="symbol"?t:t+""}function Gre(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 wm(e,t){if(e==null)return{};var r,n,o=Yre(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 Yre(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 qre(e){var t=Ne(),r=O.useRef(null),n=lM(),{type:o}=e,i=wm(e,Wre),a=id(n,"yAxis",o),s=O.useMemo(()=>{if(a!=null)return _C(_C({},i),{},{type:a})},[a,i]);return O.useLayoutEffect(()=>{s!=null&&(r.current===null?t(gJ(s)):r.current!==s&&t(yJ({prev:r.current,next:s})),r.current=s)},[s,t]),O.useLayoutEffect(()=>()=>{r.current&&(t(bJ(r.current)),r.current=null)},[t]),null}function Xre(e){var{yAxisId:t,className:r,width:n,label:o}=e,i=O.useRef(null),a=O.useRef(null),s=J(Zv),l=Tt(),c=Ne(),u="yAxis",d=J(C=>Qk(C,t)),f=J(C=>i9(C,t)),h=J(C=>tD(C,u,t,l)),v=J(C=>Nk(C,t));if(O.useLayoutEffect(()=>{if(!(n!=="auto"||!d||yy(o)||O.isValidElement(o)||v==null)){var C=i.current;if(C){var E=C.getCalculatedWidth();Math.round(d.width)!==Math.round(E)&&c(xJ({id:t,width:E}))}}},[h,d,c,o,t,n,v]),d==null||f==null||v==null)return null;var{dangerouslySetInnerHTML:m,ticks:g,scale:y}=e,x=wm(e,zre),{id:w,scale:S}=v,P=wm(v,Kre);return p.createElement(Dy,xm({},x,P,{ref:i,labelRef:a,x:f.x,y:f.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:d.width,height:d.height,className:ve("recharts-".concat(u," ").concat(u),r),viewBox:s,ticks:h,axisType:u}))}var Zre={allowDataOverflow:ut.allowDataOverflow,allowDecimals:ut.allowDecimals,allowDuplicatedCategory:ut.allowDuplicatedCategory,angle:ut.angle,axisLine:nn.axisLine,hide:!1,includeHidden:ut.includeHidden,interval:ut.interval,label:!1,minTickGap:ut.minTickGap,mirror:ut.mirror,orientation:ut.orientation,padding:ut.padding,reversed:ut.reversed,scale:ut.scale,tick:ut.tick,tickCount:ut.tickCount,tickLine:nn.tickLine,tickSize:nn.tickSize,type:ut.type,width:ut.width,yAxisId:0},Qre=e=>{var t=et(e,Zre);return p.createElement(p.Fragment,null,p.createElement(qre,{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}),p.createElement(Xre,t))},eu=p.memo(Qre,C_);eu.displayName="YAxis";var Jre=(e,t)=>t,Iy=I([Jre,ye,Mk,vt,yD,Cn,w7,at],T7),Ry=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)}},O_=ur("mouseClick"),E_=hs();E_.startListening({actionCreator:O_,effect:(e,t)=>{var r=e.payload,n=Iy(t.getState(),Ry(r));n?.activeIndex!=null&&t.dispatch(b9({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var Sm=ur("mouseMove"),A_=hs(),Dl=null;A_.startListening({actionCreator:Sm,effect:(e,t)=>{var r=e.payload;Dl!==null&&cancelAnimationFrame(Dl);var n=Ry(r);Dl=requestAnimationFrame(()=>{var o=t.getState(),i=iy(o,o.tooltip.settings.shared);if(i==="axis"){var a=Iy(o,n);a?.activeIndex!=null?t.dispatch(cD({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate})):t.dispatch(lD())}Dl=null})}});function ene(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 NC={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},T_=Bt({name:"rootProps",initialState:NC,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:NC.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}}}),tne=T_.reducer,{updateOptions:rne}=T_.actions,nne=null,one={updatePolarOptions:(e,t)=>t.payload},M_=Bt({name:"polarOptions",initialState:nne,reducers:one}),{updatePolarOptions:ine}=M_.actions,ane=M_.reducer,k_=ur("keyDown"),D_=ur("focus"),Ly=hs();Ly.startListening({actionCreator:k_,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=ay(o,qi(r),As(r),Ms(r)),s=a==null?-1:Number(a);if(!(!Number.isFinite(s)||s<0)){var l=Cn(r);if(i==="Enter"){var c=Uc(r,"axis","hover",String(o.index));t.dispatch(dm({active:!o.active,activeIndex:o.index,activeCoordinate:c}));return}var u=c9(r),d=u==="left-to-right"?1:-1,f=i==="ArrowRight"?1:-1,h=s+f*d;if(!(l==null||h>=l.length||h<0)){var v=Uc(r,"axis","hover",String(h));t.dispatch(dm({active:!0,activeIndex:h.toString(),activeCoordinate:v}))}}}}}});Ly.startListening({actionCreator:D_,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=Uc(r,"axis","hover",String(i));t.dispatch(dm({active:!0,activeIndex:i,activeCoordinate:a}))}}}});var rr=ur("externalEvent"),__=hs(),Hp=new Map;__.startListening({actionCreator:rr,effect:(e,t)=>{var{handler:r,reactEvent:n}=e.payload;if(r!=null){n.persist();var o=n.type,i=Hp.get(o);i!==void 0&&cancelAnimationFrame(i);var a=requestAnimationFrame(()=>{try{var s=t.getState(),l={activeCoordinate:i7(s),activeDataKey:dy(s),activeIndex:Fn(s),activeLabel:wD(s),activeTooltipIndex:Fn(s),isTooltipActive:a7(s)};r(l,n)}finally{Hp.delete(o)}});Hp.set(o,a)}}});var sne=I([Gi],e=>e.tooltipItemPayloads),lne=I([sne,(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)}}}),N_=ur("touchMove"),j_=hs();j_.startListening({actionCreator:N_,effect:(e,t)=>{var r=e.payload;if(!(r.touches==null||r.touches.length===0)){var n=t.getState(),o=iy(n,n.tooltip.settings.shared);if(o==="axis"){var i=r.touches[0];if(i==null)return;var a=Iy(n,Ry({clientX:i.clientX,clientY:i.clientY,currentTarget:r.currentTarget}));a?.activeIndex!=null&&t.dispatch(cD({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(rM),d=(s=c.getAttribute(nM))!==null&&s!==void 0?s:void 0,f=Yi(n).find(m=>m.id===d);if(u==null||f==null||d==null)return;var{dataKey:h}=f,v=lne(n,u,d);t.dispatch(sD({activeDataKey:h,activeIndex:u,activeCoordinate:v,activeGraphicalItemId:d}))}}}});var cne=xT({brush:VJ,cartesianAxis:wJ,chartData:iX,errorBars:Nee,graphicalItems:TQ,layout:DU,legend:VH,options:eX,polarAxis:BZ,polarOptions:ane,referenceElements:zJ,rootProps:tne,tooltip:x9,zIndex:W7}),une=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return rU({reducer:cne,preloadedState:t,middleware:n=>{var o;return n({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((o="es6")!==null&&o!==void 0?o:"")}).concat([E_.middleware,A_.middleware,Ly.middleware,__.middleware,j_.middleware])},enhancers:n=>{var o=n;return typeof n=="function"&&(o=n()),o.concat(VT({type:"raf"}))},devTools:{serialize:{replacer:ene},name:"recharts-".concat(r)}})};function I_(e){var{preloadedState:t,children:r,reduxStoreName:n}=e,o=Tt(),i=O.useRef(null);if(o)return r;i.current==null&&(i.current=une(t,n));var a=Kv;return p.createElement(cte,{context:a,store:i.current},r)}function dne(e){var{layout:t,margin:r}=e,n=Ne(),o=Tt();return O.useEffect(()=>{o||(n(TU(t)),n(AU(r)))},[n,o,t,r]),null}var R_=O.memo(dne,xd);function L_(e){var t=Ne();return O.useEffect(()=>{t(rne(e))},[t,e]),null}function jC(e){var{zIndex:t,isPanorama:r}=e,n=O.useRef(null),o=Ne();return O.useLayoutEffect(()=>(n.current&&o(F7({zIndex:t,element:n.current,isPanorama:r})),()=>{o(B7({zIndex:t,isPanorama:r}))}),[o,t,r]),p.createElement("g",{tabIndex:-1,ref:n})}function IC(e){var{children:t,isPanorama:r}=e,n=J(k7);if(!n||n.length===0)return t;var o=n.filter(a=>a<0),i=n.filter(a=>a>0);return p.createElement(p.Fragment,null,o.map(a=>p.createElement(jC,{key:a,zIndex:a,isPanorama:r})),t,i.map(a=>p.createElement(jC,{key:a,zIndex:a,isPanorama:r})))}var fne=["children"];function pne(e,t){if(e==null)return{};var r,n,o=hne(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 hne(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 tu(){return tu=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},tu.apply(null,arguments)}var mne={width:"100%",height:"100%",display:"block"},vne=O.forwardRef((e,t)=>{var r=tg(),n=rg(),o=xM();if(!Wr(r)||!Wr(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),p.createElement(Nv,tu({},a,{title:s,desc:l,role:u,tabIndex:c,width:r,height:n,style:mne,ref:t}),i)}),gne=e=>{var{children:t}=e,r=J(Ku);if(!r)return null;var{width:n,height:o,y:i,x:a}=r;return p.createElement(Nv,{width:n,height:o,x:a,y:i},t)},RC=O.forwardRef((e,t)=>{var{children:r}=e,n=pne(e,fne),o=Tt();return o?p.createElement(gne,null,p.createElement(IC,{isPanorama:!0},r)):p.createElement(vne,tu({ref:t},n),p.createElement(IC,{isPanorama:!1},r))});function yne(){var e=Ne(),[t,r]=O.useState(null),n=J(YU);return O.useEffect(()=>{if(t!=null){var o=t.getBoundingClientRect(),i=o.width/t.offsetWidth;pe(i)&&i!==n&&e(kU(i))}},[t,e,n]),r}function LC(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 bne(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?LC(Object(r),!0).forEach(function(n){xne(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):LC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function xne(e,t,r){return(t=wne(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wne(e){var t=Sne(e,"string");return typeof t=="symbol"?t:t+""}function Sne(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 Rn(){return Rn=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},Rn.apply(null,arguments)}var Pne=()=>(hX(),null);function ru(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var Cne=O.forwardRef((e,t)=>{var r,n,o=O.useRef(null),[i,a]=O.useState({containerWidth:ru((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:ru((n=e.style)===null||n===void 0?void 0:n.height)}),s=O.useCallback((c,u)=>{a(d=>{var f=Math.round(c),h=Math.round(u);return d.containerWidth===f&&d.containerHeight===h?d:{containerWidth:f,containerHeight:h}})},[]),l=O.useCallback(c=>{if(typeof t=="function"&&t(c),c!=null&&typeof ResizeObserver<"u"){var{width:u,height:d}=c.getBoundingClientRect();s(u,d);var f=v=>{var m=v[0];if(m!=null){var{width:g,height:y}=m.contentRect;s(g,y)}},h=new ResizeObserver(f);h.observe(c),o.current=h}},[t,s]);return O.useEffect(()=>()=>{var c=o.current;c?.disconnect()},[s]),p.createElement(p.Fragment,null,p.createElement(vs,{width:i.containerWidth,height:i.containerHeight}),p.createElement("div",Rn({ref:l},e)))}),One=O.forwardRef((e,t)=>{var{width:r,height:n}=e,[o,i]=O.useState({containerWidth:ru(r),containerHeight:ru(n)}),a=O.useCallback((l,c)=>{i(u=>{var d=Math.round(l),f=Math.round(c);return u.containerWidth===d&&u.containerHeight===f?u:{containerWidth:d,containerHeight:f}})},[]),s=O.useCallback(l=>{if(typeof t=="function"&&t(l),l!=null){var{width:c,height:u}=l.getBoundingClientRect();a(c,u)}},[t,a]);return p.createElement(p.Fragment,null,p.createElement(vs,{width:o.containerWidth,height:o.containerHeight}),p.createElement("div",Rn({ref:s},e)))}),Ene=O.forwardRef((e,t)=>{var{width:r,height:n}=e;return p.createElement(p.Fragment,null,p.createElement(vs,{width:r,height:n}),p.createElement("div",Rn({ref:t},e)))}),Ane=O.forwardRef((e,t)=>{var{width:r,height:n}=e;return typeof r=="string"||typeof n=="string"?p.createElement(One,Rn({},e,{ref:t})):typeof r=="number"&&typeof n=="number"?p.createElement(Ene,Rn({},e,{width:r,height:n,ref:t})):p.createElement(p.Fragment,null,p.createElement(vs,{width:r,height:n}),p.createElement("div",Rn({ref:t},e)))});function Tne(e){return e?Cne:Ane}var Mne=O.forwardRef((e,t)=>{var{children:r,className:n,height:o,onClick:i,onContextMenu:a,onDoubleClick:s,onMouseDown:l,onMouseEnter:c,onMouseLeave:u,onMouseMove:d,onMouseUp:f,onTouchEnd:h,onTouchMove:v,onTouchStart:m,style:g,width:y,responsive:x,dispatchTouchEvents:w=!0}=e,S=O.useRef(null),P=Ne(),[C,E]=O.useState(null),[A,T]=O.useState(null),M=yne(),_=Qv(),k=_?.width>0?_.width:y,N=_?.height>0?_.height:o,R=O.useCallback($=>{M($),typeof t=="function"&&t($),E($),T($),$!=null&&(S.current=$)},[M,t,E,T]),z=O.useCallback($=>{P(O_($)),P(rr({handler:i,reactEvent:$}))},[P,i]),B=O.useCallback($=>{P(Sm($)),P(rr({handler:c,reactEvent:$}))},[P,c]),F=O.useCallback($=>{P(lD()),P(rr({handler:u,reactEvent:$}))},[P,u]),j=O.useCallback($=>{P(Sm($)),P(rr({handler:d,reactEvent:$}))},[P,d]),L=O.useCallback(()=>{P(D_())},[P]),H=O.useCallback($=>{P(k_($.key))},[P]),re=O.useCallback($=>{P(rr({handler:a,reactEvent:$}))},[P,a]),le=O.useCallback($=>{P(rr({handler:s,reactEvent:$}))},[P,s]),ae=O.useCallback($=>{P(rr({handler:l,reactEvent:$}))},[P,l]),oe=O.useCallback($=>{P(rr({handler:f,reactEvent:$}))},[P,f]),Se=O.useCallback($=>{P(rr({handler:m,reactEvent:$}))},[P,m]),Me=O.useCallback($=>{w&&P(N_($)),P(rr({handler:v,reactEvent:$}))},[P,w,v]),K=O.useCallback($=>{P(rr({handler:h,reactEvent:$}))},[P,h]),fe=Tne(x);return p.createElement(TD.Provider,{value:C},p.createElement(RA.Provider,{value:A},p.createElement(fe,{width:k??g?.width,height:N??g?.height,className:ve("recharts-wrapper",n),style:bne({position:"relative",cursor:"default",width:k,height:N},g),onClick:z,onContextMenu:re,onDoubleClick:le,onFocus:L,onKeyDown:H,onMouseDown:ae,onMouseEnter:B,onMouseLeave:F,onMouseMove:j,onMouseUp:oe,onTouchEnd:K,onTouchMove:Me,onTouchStart:Se,ref:R},p.createElement(Pne,null),r)))}),kne=["width","height","responsive","children","className","style","compact","title","desc"];function Dne(e,t){if(e==null)return{};var r,n,o=_ne(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 _ne(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 $_=O.forwardRef((e,t)=>{var{width:r,height:n,responsive:o,children:i,className:a,style:s,compact:l,title:c,desc:u}=e,d=Dne(e,kne),f=Zt(d);return l?p.createElement(p.Fragment,null,p.createElement(vs,{width:r,height:n}),p.createElement(RC,{otherAttributes:f,title:c,desc:u},i)):p.createElement(Mne,{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},p.createElement(RC,{otherAttributes:f,title:c,desc:u,ref:t},p.createElement(UJ,null,i)))});function Pm(){return Pm=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},Pm.apply(null,arguments)}var Nne={top:5,right:5,bottom:5,left:5},jne={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:Nne,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},V_=O.forwardRef(function(t,r){var n,o=et(t.categoricalChartProps,jne),{chartName:i,defaultTooltipEventType:a,validateTooltipEventTypes:s,tooltipPayloadSearcher:l,categoricalChartProps:c}=t,u={chartName:i,defaultTooltipEventType:a,validateTooltipEventTypes:s,tooltipPayloadSearcher:l,eventEmitter:void 0};return p.createElement(I_,{preloadedState:{options:u},reduxStoreName:(n=c.id)!==null&&n!==void 0?n:i},p.createElement(o_,{chartData:c.data}),p.createElement(R_,{layout:o.layout,margin:o.margin}),p.createElement(L_,{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}),p.createElement($_,Pm({},o,{ref:r})))}),Ine=["axis"],Rne=O.forwardRef((e,t)=>p.createElement(V_,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:Ine,tooltipPayloadSearcher:vy,categoricalChartProps:e,ref:t})),Lne=["axis","item"],$ne=O.forwardRef((e,t)=>p.createElement(V_,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:Lne,tooltipPayloadSearcher:vy,categoricalChartProps:e,ref:t}));function Vne(e){var t=Ne();return O.useEffect(()=>{t(ine(e))},[t,e]),null}var Fne=["layout"];function Cm(){return Cm=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},Cm.apply(null,arguments)}function Bne(e,t){if(e==null)return{};var r,n,o=Wne(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 Wne(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 zne={top:5,right:5,bottom:5,left:5},F_={accessibilityLayer:!0,stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:zne,reverseStackOrder:!1,syncMethod:"index",layout:"radial",responsive:!1,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},Kne=O.forwardRef(function(t,r){var n,o=et(t.categoricalChartProps,F_),{layout:i}=o,a=Bne(o,Fne),{chartName:s,defaultTooltipEventType:l,validateTooltipEventTypes:c,tooltipPayloadSearcher:u}=t,d={chartName:s,defaultTooltipEventType:l,validateTooltipEventTypes:c,tooltipPayloadSearcher:u,eventEmitter:void 0};return p.createElement(I_,{preloadedState:{options:d},reduxStoreName:(n=o.id)!==null&&n!==void 0?n:s},p.createElement(o_,{chartData:o.data}),p.createElement(R_,{layout:i,margin:o.margin}),p.createElement(L_,{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}),p.createElement(Vne,{cx:o.cx,cy:o.cy,startAngle:o.startAngle,endAngle:o.endAngle,innerRadius:o.innerRadius,outerRadius:o.outerRadius}),p.createElement($_,Cm({},a,{ref:r})))});function $C(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 VC(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$C(Object(r),!0).forEach(function(n){Une(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$C(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Une(e,t,r){return(t=Hne(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hne(e){var t=Gne(e,"string");return typeof t=="symbol"?t:t+""}function Gne(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 Yne=["item"],qne=VC(VC({},F_),{},{layout:"centric",startAngle:0,endAngle:360}),Xne=O.forwardRef((e,t)=>{var r=et(e,qne);return p.createElement(Kne,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:Yne,tooltipPayloadSearcher:vy,categoricalChartProps:r,ref:t})});const B_=te("text-small font-sans tracking-[-0.05em]",{variants:{size:{sm:"h-48",default:"h-72",lg:"h-96"}},defaultVariants:{size:"default"}}),_l=["var(--color-sunflower)","var(--color-electric-blue)","var(--color-cool-purple)","var(--color-deep-blue)","var(--color-warm-purple)"],W_=p.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:d="horizontal",...f},h)=>{const v=p.useMemo(()=>{if(n)return n;const g=r[0];return g?Object.keys(g).filter(x=>x!=="label"&&typeof g[x]=="number").map((x,w)=>({key:x,name:x.charAt(0).toUpperCase()+x.slice(1),color:_l[w%_l.length]})):[]},[r,n]),m=d==="vertical";return b.jsx("div",{ref:h,className:D(B_({size:t,className:e})),role:"img",...f,children:b.jsx(Jv,{width:"100%",height:"100%",minWidth:100,minHeight:100,children:b.jsxs($ne,{data:r,layout:d,margin:{top:5,right:30,left:l?20:0,bottom:s?20:5},children:[o&&b.jsx(_y,{strokeDasharray:"3 3",stroke:"var(--color-border)",vertical:!m,horizontal:m}),m?b.jsxs(b.Fragment,{children:[b.jsx(Jc,{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(eu,{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(Jc,{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(eu,{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(gy,{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},itemStyle:{color:"var(--color-secondary)"},cursor:{fill:"rgba(0, 0, 0, 0.05)"}}),i&&b.jsx(qu,{wrapperStyle:{fontFamily:"var(--font-sans)",fontSize:"14px"},formatter:g=>b.jsx("span",{style:{color:"var(--color-secondary)"},children:g})}),v.map((g,y)=>b.jsx(P_,{dataKey:g.key,name:g.name,fill:g.color||_l[y%_l.length],radius:c,stackId:u?"stack":void 0},g.key))]})})})});W_.displayName="BarChart";const z_=te("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"}}),Om=te("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}}),K_=p.forwardRef(({className:e,size:t,separator:r=b.jsx($y,{}),children:n,...o},i)=>{const a=p.Children.toArray(n).filter(p.isValidElement);return b.jsx("nav",{ref:i,"aria-label":"Breadcrumb",...o,children:b.jsx("ol",{className:D(z_({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))})})});K_.displayName="Breadcrumbs";const U_=p.forwardRef(({className:e,asChild:t=!1,isCurrentPage:r=!1,...n},o)=>{if(r)return b.jsx("span",{className:D(Om({isCurrentPage:!0,className:e})),"aria-current":"page",children:n.children});const i=t?Ie:"a";return b.jsx(i,{ref:o,className:D(Om({isCurrentPage:!1,className:e})),...n})});U_.displayName="BreadcrumbItem";const $y=p.forwardRef(({className:e,children:t,...r},n)=>b.jsx("span",{ref:n,role:"presentation","aria-hidden":"true",className:D("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"})})}));$y.displayName="BreadcrumbSeparator";function Zne(e,t,r="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:r}).format(t).split(/\s/g).slice(2).join(" ")}const Qne={},Sa={};function yo(e,t){try{const n=(Qne[e]||=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format)(t).split("GMT")[1];return n in Sa?Sa[n]:FC(n,n.split(":"))}catch{if(e in Sa)return Sa[e];const r=e?.match(Jne);return r?FC(e,r.slice(1)):NaN}}const Jne=/([+-]\d\d):?(\d\d)?/;function FC(e,t){const r=+(t[0]||0),n=+(t[1]||0),o=+(t[2]||0)/60;return Sa[e]=r*60+n>0?r*60+n+o:r*60-n-o}class Ir extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(yo(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),H_(this),Em(this)):this.setTime(Date.now())}static tz(t,...r){return r.length?new Ir(...r,t):new Ir(Date.now(),t)}withTimeZone(t){return new Ir(+this,t)}getTimezoneOffset(){const t=-yo(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),Em(this),+this}[Symbol.for("constructDateFrom")](t){return new Ir(+new Date(t),this.timeZone)}}const BC=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!BC.test(e))return;const t=e.replace(BC,"$1UTC");Ir.prototype[t]&&(e.startsWith("get")?Ir.prototype[e]=function(){return this.internal[t]()}:(Ir.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),eoe(this),+this},Ir.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Em(this),+this}))});function Em(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-yo(e.timeZone,e)*60))}function eoe(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),H_(e)}function H_(e){const t=yo(e.timeZone,e),r=t>0?Math.floor(t):Math.ceil(t),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);const o=-new Date(+e).getTimezoneOffset(),i=-new Date(+n).getTimezoneOffset(),a=o-i,s=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();a&&s&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+a);const l=o-r;l&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+l);const c=new Date(+e);c.setUTCSeconds(0);const u=o>0?c.getSeconds():(c.getSeconds()-60)%60,d=Math.round(-(yo(e.timeZone,e)*60))%60;(d||u)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+d),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+d+u));const f=yo(e.timeZone,e),h=f>0?Math.floor(f):Math.ceil(f),m=-new Date(+e).getTimezoneOffset()-h,g=h!==r,y=m-l;if(g&&y){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+y);const x=yo(e.timeZone,e),w=x>0?Math.floor(x):Math.ceil(x),S=h-w;S&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+S),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+S))}}class St extends Ir{static tz(t,...r){return r.length?new St(...r,t):new St(Date.now(),t)}toISOString(){const[t,r,n]=this.tzComponents(),o=`${t}${r}:${n}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,r,n,o]=this.internal.toUTCString().split(" ");return`${t?.slice(0,-1)} ${n} ${r} ${o}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[r,n,o]=this.tzComponents();return`${t} GMT${r}${n}${o} (${Zne(this.timeZone,this)})`}toLocaleString(t,r){return Date.prototype.toLocaleString.call(this,t,{...r,timeZone:r?.timeZone||this.timeZone})}toLocaleDateString(t,r){return Date.prototype.toLocaleDateString.call(this,t,{...r,timeZone:r?.timeZone||this.timeZone})}toLocaleTimeString(t,r){return Date.prototype.toLocaleTimeString.call(this,t,{...r,timeZone:r?.timeZone||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),r=t>0?"-":"+",n=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),o=String(Math.abs(t)%60).padStart(2,"0");return[r,n,o]}withTimeZone(t){return new St(+this,t)}[Symbol.for("constructDateFrom")](t){return new St(+new Date(t),this.timeZone)}}const G_=6048e5,toe=864e5,WC=Symbol.for("constructDateFrom");function Je(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&WC in e?e[WC](t):e instanceof Date?new e.constructor(t):new Date(t)}function Te(e,t){return Je(t||e,e)}function Y_(e,t,r){const n=Te(e,r?.in);return isNaN(t)?Je(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function q_(e,t,r){const n=Te(e,r?.in);if(isNaN(t))return Je(e,NaN);if(!t)return n;const o=n.getDate(),i=Je(e,n.getTime());i.setMonth(n.getMonth()+t+1,0);const a=i.getDate();return o>=a?i:(n.setFullYear(i.getFullYear(),i.getMonth(),o),n)}let roe={};function Ns(){return roe}function Di(e,t){const r=Ns(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,o=Te(e,t?.in),i=o.getDay(),a=(i<n?7:0)+i-n;return o.setDate(o.getDate()-a),o.setHours(0,0,0,0),o}function Ga(e,t){return Di(e,{...t,weekStartsOn:1})}function X_(e,t){const r=Te(e,t?.in),n=r.getFullYear(),o=Je(r,0);o.setFullYear(n+1,0,4),o.setHours(0,0,0,0);const i=Ga(o),a=Je(r,0);a.setFullYear(n,0,4),a.setHours(0,0,0,0);const s=Ga(a);return r.getTime()>=i.getTime()?n+1:r.getTime()>=s.getTime()?n:n-1}function zC(e){const t=Te(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function Xi(e,...t){const r=Je.bind(null,t.find(n=>typeof n=="object"));return t.map(r)}function Ya(e,t){const r=Te(e,t?.in);return r.setHours(0,0,0,0),r}function Vy(e,t,r){const[n,o]=Xi(r?.in,e,t),i=Ya(n),a=Ya(o),s=+i-zC(i),l=+a-zC(a);return Math.round((s-l)/toe)}function noe(e,t){const r=X_(e,t),n=Je(e,0);return n.setFullYear(r,0,4),n.setHours(0,0,0,0),Ga(n)}function ooe(e,t,r){return Y_(e,t*7,r)}function ioe(e,t,r){return q_(e,t*12,r)}function aoe(e,t){let r,n=t?.in;return e.forEach(o=>{!n&&typeof o=="object"&&(n=Je.bind(null,o));const i=Te(o,n);(!r||r<i||isNaN(+i))&&(r=i)}),Je(n,r||NaN)}function soe(e,t){let r,n=t?.in;return e.forEach(o=>{!n&&typeof o=="object"&&(n=Je.bind(null,o));const i=Te(o,n);(!r||r>i||isNaN(+i))&&(r=i)}),Je(n,r||NaN)}function loe(e,t,r){const[n,o]=Xi(r?.in,e,t);return+Ya(n)==+Ya(o)}function Z_(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function coe(e){return!(!Z_(e)&&typeof e!="number"||isNaN(+Te(e)))}function Q_(e,t,r){const[n,o]=Xi(r?.in,e,t),i=n.getFullYear()-o.getFullYear(),a=n.getMonth()-o.getMonth();return i*12+a}function uoe(e,t){const r=Te(e,t?.in),n=r.getMonth();return r.setFullYear(r.getFullYear(),n+1,0),r.setHours(23,59,59,999),r}function J_(e,t){const[r,n]=Xi(e,t.start,t.end);return{start:r,end:n}}function doe(e,t){const{start:r,end:n}=J_(t?.in,e);let o=+r>+n;const i=o?+r:+n,a=o?n:r;a.setHours(0,0,0,0),a.setDate(1);let s=1;const l=[];for(;+a<=i;)l.push(Je(r,a)),a.setMonth(a.getMonth()+s);return o?l.reverse():l}function foe(e,t){const r=Te(e,t?.in);return r.setDate(1),r.setHours(0,0,0,0),r}function poe(e,t){const r=Te(e,t?.in),n=r.getFullYear();return r.setFullYear(n+1,0,0),r.setHours(23,59,59,999),r}function eN(e,t){const r=Te(e,t?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}function hoe(e,t){const{start:r,end:n}=J_(t?.in,e);let o=+r>+n;const i=o?+r:+n,a=o?n:r;a.setHours(0,0,0,0),a.setMonth(0,1);let s=1;const l=[];for(;+a<=i;)l.push(Je(r,a)),a.setFullYear(a.getFullYear()+s);return o?l.reverse():l}function tN(e,t){const r=Ns(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,o=Te(e,t?.in),i=o.getDay(),a=(i<n?-7:0)+6-(i-n);return o.setDate(o.getDate()+a),o.setHours(23,59,59,999),o}function moe(e,t){return tN(e,{...t,weekStartsOn:1})}const voe={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},goe=(e,t,r)=>{let n;const o=voe[e];return typeof o=="string"?n=o:t===1?n=o.one:n=o.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function Gp(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const yoe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},boe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},xoe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},woe={date:Gp({formats:yoe,defaultWidth:"full"}),time:Gp({formats:boe,defaultWidth:"full"}),dateTime:Gp({formats:xoe,defaultWidth:"full"})},Soe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Poe=(e,t,r,n)=>Soe[e];function ma(e){return(t,r)=>{const n=r?.context?String(r.context):"standalone";let o;if(n==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=r?.width?String(r.width):a;o=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=r?.width?String(r.width):e.defaultWidth;o=e.values[s]||e.values[a]}const i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}const Coe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Ooe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Eoe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Aoe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Toe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Moe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},koe=(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},Doe={ordinalNumber:koe,era:ma({values:Coe,defaultWidth:"wide"}),quarter:ma({values:Ooe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ma({values:Eoe,defaultWidth:"wide"}),day:ma({values:Aoe,defaultWidth:"wide"}),dayPeriod:ma({values:Toe,defaultWidth:"wide",formattingValues:Moe,defaultFormattingWidth:"wide"})};function va(e){return(t,r={})=>{const n=r.width,o=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const a=i[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?Noe(s,d=>d.test(a)):_oe(s,d=>d.test(a));let c;c=e.valueCallback?e.valueCallback(l):l,c=r.valueCallback?r.valueCallback(c):c;const u=t.slice(a.length);return{value:c,rest:u}}}function _oe(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function Noe(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function joe(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const o=n[0],i=t.match(e.parsePattern);if(!i)return null;let a=e.valueCallback?e.valueCallback(i[0]):i[0];a=r.valueCallback?r.valueCallback(a):a;const s=t.slice(o.length);return{value:a,rest:s}}}const Ioe=/^(\d+)(th|st|nd|rd)?/i,Roe=/\d+/i,Loe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},$oe={any:[/^b/i,/^(a|c)/i]},Voe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Foe={any:[/1/i,/2/i,/3/i,/4/i]},Boe={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Woe={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},zoe={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Koe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Uoe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Hoe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Goe={ordinalNumber:joe({matchPattern:Ioe,parsePattern:Roe,valueCallback:e=>parseInt(e,10)}),era:va({matchPatterns:Loe,defaultMatchWidth:"wide",parsePatterns:$oe,defaultParseWidth:"any"}),quarter:va({matchPatterns:Voe,defaultMatchWidth:"wide",parsePatterns:Foe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:va({matchPatterns:Boe,defaultMatchWidth:"wide",parsePatterns:Woe,defaultParseWidth:"any"}),day:va({matchPatterns:zoe,defaultMatchWidth:"wide",parsePatterns:Koe,defaultParseWidth:"any"}),dayPeriod:va({matchPatterns:Uoe,defaultMatchWidth:"any",parsePatterns:Hoe,defaultParseWidth:"any"})},si={code:"en-US",formatDistance:goe,formatLong:woe,formatRelative:Poe,localize:Doe,match:Goe,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Yoe(e,t){const r=Te(e,t?.in);return Vy(r,eN(r))+1}function Fy(e,t){const r=Te(e,t?.in),n=+Ga(r)-+noe(r);return Math.round(n/G_)+1}function rN(e,t){const r=Te(e,t?.in),n=r.getFullYear(),o=Ns(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=Je(t?.in||e,0);a.setFullYear(n+1,0,i),a.setHours(0,0,0,0);const s=Di(a,t),l=Je(t?.in||e,0);l.setFullYear(n,0,i),l.setHours(0,0,0,0);const c=Di(l,t);return+r>=+s?n+1:+r>=+c?n:n-1}function qoe(e,t){const r=Ns(),n=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=rN(e,t),i=Je(t?.in||e,0);return i.setFullYear(o,0,n),i.setHours(0,0,0,0),Di(i,t)}function By(e,t){const r=Te(e,t?.in),n=+Di(r,t)-+qoe(r,t);return Math.round(n/G_)+1}function Pe(e,t){const r=e<0?"-":"",n=Math.abs(e).toString().padStart(t,"0");return r+n}const En={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return Pe(t==="yy"?n%100:n,t.length)},M(e,t){const r=e.getMonth();return t==="M"?String(r+1):Pe(r+1,2)},d(e,t){return Pe(e.getDate(),t.length)},a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return r==="am"?"a.m.":"p.m."}},h(e,t){return Pe(e.getHours()%12||12,t.length)},H(e,t){return Pe(e.getHours(),t.length)},m(e,t){return Pe(e.getMinutes(),t.length)},s(e,t){return Pe(e.getSeconds(),t.length)},S(e,t){const r=t.length,n=e.getMilliseconds(),o=Math.trunc(n*Math.pow(10,r-3));return Pe(o,t.length)}},ii={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},KC={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){const n=e.getFullYear(),o=n>0?n:1-n;return r.ordinalNumber(o,{unit:"year"})}return En.y(e,t)},Y:function(e,t,r,n){const o=rN(e,n),i=o>0?o:1-o;if(t==="YY"){const a=i%100;return Pe(a,2)}return t==="Yo"?r.ordinalNumber(i,{unit:"year"}):Pe(i,t.length)},R:function(e,t){const r=X_(e);return Pe(r,t.length)},u:function(e,t){const r=e.getFullYear();return Pe(r,t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return Pe(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return Pe(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return En.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return Pe(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const o=By(e,n);return t==="wo"?r.ordinalNumber(o,{unit:"week"}):Pe(o,t.length)},I:function(e,t,r){const n=Fy(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):Pe(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):En.d(e,t)},D:function(e,t,r){const n=Yoe(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):Pe(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const o=e.getDay(),i=(o-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Pe(i,2);case"eo":return r.ordinalNumber(i,{unit:"day"});case"eee":return r.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(o,{width:"short",context:"formatting"});default:return r.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const o=e.getDay(),i=(o-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Pe(i,t.length);case"co":return r.ordinalNumber(i,{unit:"day"});case"ccc":return r.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(o,{width:"narrow",context:"standalone"});case"cccccc":return r.day(o,{width:"short",context:"standalone"});default:return r.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),o=n===0?7:n;switch(t){case"i":return String(o);case"ii":return Pe(o,t.length);case"io":return r.ordinalNumber(o,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(o,{width:"narrow",context:"formatting"});default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let o;switch(n===12?o=ii.noon:n===0?o=ii.midnight:o=n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(o,{width:"narrow",context:"formatting"});default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let o;switch(n>=17?o=ii.evening:n>=12?o=ii.afternoon:n>=4?o=ii.morning:o=ii.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(o,{width:"narrow",context:"formatting"});default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let n=e.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return En.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):En.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):Pe(n,t.length)},k:function(e,t,r){let n=e.getHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):Pe(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):En.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):En.s(e,t)},S:function(e,t){return En.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return HC(n);case"XXXX":case"XX":return uo(n);default:return uo(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return HC(n);case"xxxx":case"xx":return uo(n);default:return uo(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+UC(n,":");default:return"GMT"+uo(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+UC(n,":");default:return"GMT"+uo(n,":")}},t:function(e,t,r){const n=Math.trunc(+e/1e3);return Pe(n,t.length)},T:function(e,t,r){return Pe(+e,t.length)}};function UC(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),o=Math.trunc(n/60),i=n%60;return i===0?r+String(o):r+String(o)+t+Pe(i,2)}function HC(e,t){return e%60===0?(e>0?"-":"+")+Pe(Math.abs(e)/60,2):uo(e,t)}function uo(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),o=Pe(Math.trunc(n/60),2),i=Pe(n%60,2);return r+o+t+i}const GC=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},nN=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},Xoe=(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],o=r[2];if(!o)return GC(e,t);let i;switch(n){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",GC(n,t)).replace("{{time}}",nN(o,t))},Zoe={p:nN,P:Xoe},Qoe=/^D+$/,Joe=/^Y+$/,eie=["D","DD","YY","YYYY"];function tie(e){return Qoe.test(e)}function rie(e){return Joe.test(e)}function nie(e,t,r){const n=oie(e,t,r);if(console.warn(n),eie.includes(e))throw new RangeError(n)}function oie(e,t,r){const n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const iie=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,aie=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,sie=/^'([^]*?)'?$/,lie=/''/g,cie=/[a-zA-Z]/;function Pa(e,t,r){const n=Ns(),o=r?.locale??n.locale??si,i=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,a=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,s=Te(e,r?.in);if(!coe(s))throw new RangeError("Invalid time value");let l=t.match(aie).map(u=>{const d=u[0];if(d==="p"||d==="P"){const f=Zoe[d];return f(u,o.formatLong)}return u}).join("").match(iie).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const d=u[0];if(d==="'")return{isToken:!1,value:uie(u)};if(KC[d])return{isToken:!0,value:u};if(d.match(cie))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:u}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const c={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return l.map(u=>{if(!u.isToken)return u.value;const d=u.value;(!r?.useAdditionalWeekYearTokens&&rie(d)||!r?.useAdditionalDayOfYearTokens&&tie(d))&&nie(d,t,String(e));const f=KC[d[0]];return f(s,d,o.localize,c)}).join("")}function uie(e){const t=e.match(sie);return t?t[1].replace(lie,"'"):e}function die(e,t){const r=Te(e,t?.in),n=r.getFullYear(),o=r.getMonth(),i=Je(r,0);return i.setFullYear(n,o+1,0),i.setHours(0,0,0,0),i.getDate()}function fie(e,t){return Te(e,t?.in).getMonth()}function pie(e,t){return Te(e,t?.in).getFullYear()}function hie(e,t){return+Te(e)>+Te(t)}function mie(e,t){return+Te(e)<+Te(t)}function vie(e,t,r){const[n,o]=Xi(r?.in,e,t);return n.getFullYear()===o.getFullYear()&&n.getMonth()===o.getMonth()}function gie(e,t,r){const[n,o]=Xi(r?.in,e,t);return n.getFullYear()===o.getFullYear()}function yie(e,t,r){const n=Te(e,r?.in),o=n.getFullYear(),i=n.getDate(),a=Je(e,0);a.setFullYear(o,t,15),a.setHours(0,0,0,0);const s=die(a);return n.setMonth(t,Math.min(i,s)),n}function bie(e,t,r){const n=Te(e,r?.in);return isNaN(+n)?Je(e,NaN):(n.setFullYear(t),n)}const YC=5,xie=4;function wie(e,t){const r=t.startOfMonth(e),n=r.getDay()>0?r.getDay():7,o=t.addDays(e,-n+1),i=t.addDays(o,YC*7-1);return t.getMonth(e)===t.getMonth(i)?YC:xie}function oN(e,t){const r=t.startOfMonth(e),n=r.getDay();return n===1?r:n===0?t.addDays(r,-6):t.addDays(r,-1*(n-1))}function Sie(e,t){const r=oN(e,t),n=wie(e,t);return t.addDays(r,n*7-1)}const iN={...si,labels:{labelDayButton:(e,t,r,n)=>{let o;n&&typeof n.format=="function"?o=n.format.bind(n):o=(a,s)=>Pa(a,s,{locale:si,...r});let i=o(e,"PPPP");return t.today&&(i=`Today, ${i}`),t.selected&&(i=`${i}, selected`),i},labelMonthDropdown:"Choose the Month",labelNext:"Go to the Next Month",labelPrevious:"Go to the Previous Month",labelWeekNumber:e=>`Week ${e}`,labelYearDropdown:"Choose the Year",labelGrid:(e,t,r)=>{let n;return r&&typeof r.format=="function"?n=r.format.bind(r):n=(o,i)=>Pa(o,i,{locale:si,...t}),n(e,"LLLL yyyy")},labelGridcell:(e,t,r,n)=>{let o;n&&typeof n.format=="function"?o=n.format.bind(n):o=(a,s)=>Pa(a,s,{locale:si,...r});let i=o(e,"PPPP");return t?.today&&(i=`Today, ${i}`),i},labelNav:"Navigation bar",labelWeekNumberHeader:"Week Number",labelWeekday:(e,t,r)=>{let n;return r&&typeof r.format=="function"?n=r.format.bind(r):n=(o,i)=>Pa(o,i,{locale:si,...t}),n(e,"cccc")}}};class Jt{constructor(t,r){this.Date=Date,this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?St.tz(this.options.timeZone):new this.Date,this.newDate=(n,o,i)=>this.overrides?.newDate?this.overrides.newDate(n,o,i):this.options.timeZone?new St(n,o,i,this.options.timeZone):new Date(n,o,i),this.addDays=(n,o)=>this.overrides?.addDays?this.overrides.addDays(n,o):Y_(n,o),this.addMonths=(n,o)=>this.overrides?.addMonths?this.overrides.addMonths(n,o):q_(n,o),this.addWeeks=(n,o)=>this.overrides?.addWeeks?this.overrides.addWeeks(n,o):ooe(n,o),this.addYears=(n,o)=>this.overrides?.addYears?this.overrides.addYears(n,o):ioe(n,o),this.differenceInCalendarDays=(n,o)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(n,o):Vy(n,o),this.differenceInCalendarMonths=(n,o)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(n,o):Q_(n,o),this.eachMonthOfInterval=n=>this.overrides?.eachMonthOfInterval?this.overrides.eachMonthOfInterval(n):doe(n),this.eachYearOfInterval=n=>{const o=this.overrides?.eachYearOfInterval?this.overrides.eachYearOfInterval(n):hoe(n),i=new Set(o.map(s=>this.getYear(s)));if(i.size===o.length)return o;const a=[];return i.forEach(s=>{a.push(new Date(s,0,1))}),a},this.endOfBroadcastWeek=n=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(n):Sie(n,this),this.endOfISOWeek=n=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(n):moe(n),this.endOfMonth=n=>this.overrides?.endOfMonth?this.overrides.endOfMonth(n):uoe(n),this.endOfWeek=(n,o)=>this.overrides?.endOfWeek?this.overrides.endOfWeek(n,o):tN(n,this.options),this.endOfYear=n=>this.overrides?.endOfYear?this.overrides.endOfYear(n):poe(n),this.format=(n,o,i)=>{const a=this.overrides?.format?this.overrides.format(n,o,this.options):Pa(n,o,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(a):a},this.getISOWeek=n=>this.overrides?.getISOWeek?this.overrides.getISOWeek(n):Fy(n),this.getMonth=(n,o)=>this.overrides?.getMonth?this.overrides.getMonth(n,this.options):fie(n,this.options),this.getYear=(n,o)=>this.overrides?.getYear?this.overrides.getYear(n,this.options):pie(n,this.options),this.getWeek=(n,o)=>this.overrides?.getWeek?this.overrides.getWeek(n,this.options):By(n,this.options),this.isAfter=(n,o)=>this.overrides?.isAfter?this.overrides.isAfter(n,o):hie(n,o),this.isBefore=(n,o)=>this.overrides?.isBefore?this.overrides.isBefore(n,o):mie(n,o),this.isDate=n=>this.overrides?.isDate?this.overrides.isDate(n):Z_(n),this.isSameDay=(n,o)=>this.overrides?.isSameDay?this.overrides.isSameDay(n,o):loe(n,o),this.isSameMonth=(n,o)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(n,o):vie(n,o),this.isSameYear=(n,o)=>this.overrides?.isSameYear?this.overrides.isSameYear(n,o):gie(n,o),this.max=n=>this.overrides?.max?this.overrides.max(n):aoe(n),this.min=n=>this.overrides?.min?this.overrides.min(n):soe(n),this.setMonth=(n,o)=>this.overrides?.setMonth?this.overrides.setMonth(n,o):yie(n,o),this.setYear=(n,o)=>this.overrides?.setYear?this.overrides.setYear(n,o):bie(n,o),this.startOfBroadcastWeek=(n,o)=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(n,this):oN(n,this),this.startOfDay=n=>this.overrides?.startOfDay?this.overrides.startOfDay(n):Ya(n),this.startOfISOWeek=n=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(n):Ga(n),this.startOfMonth=n=>this.overrides?.startOfMonth?this.overrides.startOfMonth(n):foe(n),this.startOfWeek=(n,o)=>this.overrides?.startOfWeek?this.overrides.startOfWeek(n,this.options):Di(n,this.options),this.startOfYear=n=>this.overrides?.startOfYear?this.overrides.startOfYear(n):eN(n),this.options={locale:iN,...t},this.overrides=r}getDigitMap(){const{numerals:t="latn"}=this.options,r=new Intl.NumberFormat("en-US",{numberingSystem:t}),n={};for(let o=0;o<10;o++)n[o.toString()]=r.format(o);return n}replaceDigits(t){const r=this.getDigitMap();return t.replace(/\d/g,n=>r[n]||n)}formatNumber(t){return this.replaceDigits(t.toString())}getMonthYearOrder(){const t=this.options.locale?.code;return t&&Jt.yearFirstLocales.has(t)?"year-first":"month-first"}formatMonthYear(t){const{locale:r,timeZone:n,numerals:o}=this.options,i=r?.code;if(i&&Jt.yearFirstLocales.has(i))try{return new Intl.DateTimeFormat(i,{month:"long",year:"numeric",timeZone:n,numberingSystem:o}).format(t)}catch{}const a=this.getMonthYearOrder()==="year-first"?"y LLLL":"LLLL y";return this.format(t,a)}}Jt.yearFirstLocales=new Set(["eu","hu","ja","ja-Hira","ja-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mn","mn-MN","zh","zh-CN","zh-HK","zh-TW"]);const Gr=new Jt;class aN{constructor(t,r,n=Gr){this.date=t,this.displayMonth=r,this.outside=!!(r&&!n.isSameMonth(t,r)),this.dateLib=n,this.isoDate=n.format(t,"yyyy-MM-dd"),this.displayMonthId=n.format(r,"yyyy-MM"),this.dateMonthId=n.format(t,"yyyy-MM")}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class Pie{constructor(t,r){this.date=t,this.weeks=r}}class Cie{constructor(t,r){this.days=r,this.weekNumber=t}}function Oie(e){return O.createElement("button",{...e})}function Eie(e){return O.createElement("span",{...e})}function Aie(e){const{size:t=24,orientation:r="left",className:n}=e;return O.createElement("svg",{className:n,width:t,height:t,viewBox:"0 0 24 24"},r==="up"&&O.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),r==="down"&&O.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),r==="left"&&O.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),r==="right"&&O.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function Tie(e){const{day:t,modifiers:r,...n}=e;return O.createElement("td",{...n})}function Mie(e){const{day:t,modifiers:r,...n}=e,o=O.useRef(null);return O.useEffect(()=>{r.focused&&o.current?.focus()},[r.focused]),O.createElement("button",{ref:o,...n})}var ne;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(ne||(ne={}));var Fe;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(Fe||(Fe={}));var yr;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(yr||(yr={}));var Ut;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(Ut||(Ut={}));function kie(e){const{options:t,className:r,components:n,classNames:o,...i}=e,a=[o[ne.Dropdown],r].join(" "),s=t?.find(({value:l})=>l===i.value);return O.createElement("span",{"data-disabled":i.disabled,className:o[ne.DropdownRoot]},O.createElement(n.Select,{className:a,...i},t?.map(({value:l,label:c,disabled:u})=>O.createElement(n.Option,{key:l,value:l,disabled:u},c))),O.createElement("span",{className:o[ne.CaptionLabel],"aria-hidden":!0},s?.label,O.createElement(n.Chevron,{orientation:"down",size:18,className:o[ne.Chevron]})))}function Die(e){return O.createElement("div",{...e})}function _ie(e){return O.createElement("div",{...e})}function Nie(e){const{calendarMonth:t,displayIndex:r,...n}=e;return O.createElement("div",{...n},e.children)}function jie(e){const{calendarMonth:t,displayIndex:r,...n}=e;return O.createElement("div",{...n})}function Iie(e){return O.createElement("table",{...e})}function Rie(e){return O.createElement("div",{...e})}const sN=O.createContext(void 0);function js(){const e=O.useContext(sN);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function Lie(e){const{components:t}=js();return O.createElement(t.Dropdown,{...e})}function $ie(e){const{onPreviousClick:t,onNextClick:r,previousMonth:n,nextMonth:o,...i}=e,{components:a,classNames:s,labels:{labelPrevious:l,labelNext:c}}=js(),u=O.useCallback(f=>{o&&r?.(f)},[o,r]),d=O.useCallback(f=>{n&&t?.(f)},[n,t]);return O.createElement("nav",{...i},O.createElement(a.PreviousMonthButton,{type:"button",className:s[ne.PreviousMonthButton],tabIndex:n?void 0:-1,"aria-disabled":n?void 0:!0,"aria-label":l(n),onClick:d},O.createElement(a.Chevron,{disabled:n?void 0:!0,className:s[ne.Chevron],orientation:"left"})),O.createElement(a.NextMonthButton,{type:"button",className:s[ne.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":c(o),onClick:u},O.createElement(a.Chevron,{disabled:o?void 0:!0,orientation:"right",className:s[ne.Chevron]})))}function Vie(e){const{components:t}=js();return O.createElement(t.Button,{...e})}function Fie(e){return O.createElement("option",{...e})}function Bie(e){const{components:t}=js();return O.createElement(t.Button,{...e})}function Wie(e){const{rootRef:t,...r}=e;return O.createElement("div",{...r,ref:t})}function zie(e){return O.createElement("select",{...e})}function Kie(e){const{week:t,...r}=e;return O.createElement("tr",{...r})}function Uie(e){return O.createElement("th",{...e})}function Hie(e){return O.createElement("thead",{"aria-hidden":!0},O.createElement("tr",{...e}))}function Gie(e){const{week:t,...r}=e;return O.createElement("th",{...r})}function Yie(e){return O.createElement("th",{...e})}function qie(e){return O.createElement("tbody",{...e})}function Xie(e){const{components:t}=js();return O.createElement(t.Dropdown,{...e})}const Zie=Object.freeze(Object.defineProperty({__proto__:null,Button:Oie,CaptionLabel:Eie,Chevron:Aie,Day:Tie,DayButton:Mie,Dropdown:kie,DropdownNav:Die,Footer:_ie,Month:Nie,MonthCaption:jie,MonthGrid:Iie,Months:Rie,MonthsDropdown:Lie,Nav:$ie,NextMonthButton:Vie,Option:Fie,PreviousMonthButton:Bie,Root:Wie,Select:zie,Week:Kie,WeekNumber:Gie,WeekNumberHeader:Yie,Weekday:Uie,Weekdays:Hie,Weeks:qie,YearsDropdown:Xie},Symbol.toStringTag,{value:"Module"}));function en(e,t,r=!1,n=Gr){let{from:o,to:i}=e;const{differenceInCalendarDays:a,isSameDay:s}=n;return o&&i?(a(i,o)<0&&([o,i]=[i,o]),a(t,o)>=(r?1:0)&&a(i,t)>=(r?1:0)):!r&&i?s(i,t):!r&&o?s(o,t):!1}function Wy(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function wd(e){return!!(e&&typeof e=="object"&&"from"in e)}function zy(e){return!!(e&&typeof e=="object"&&"after"in e)}function Ky(e){return!!(e&&typeof e=="object"&&"before"in e)}function lN(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function cN(e,t){return Array.isArray(e)&&e.every(t.isDate)}function tn(e,t,r=Gr){const n=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:i,isAfter:a}=r;return n.some(s=>{if(typeof s=="boolean")return s;if(r.isDate(s))return o(e,s);if(cN(s,r))return s.some(l=>o(e,l));if(wd(s))return en(s,e,!1,r);if(lN(s))return Array.isArray(s.dayOfWeek)?s.dayOfWeek.includes(e.getDay()):s.dayOfWeek===e.getDay();if(Wy(s)){const l=i(s.before,e),c=i(s.after,e),u=l>0,d=c<0;return a(s.before,s.after)?d&&u:u||d}return zy(s)?i(e,s.after)>0:Ky(s)?i(s.before,e)>0:typeof s=="function"?s(e):!1})}function Qie(e,t,r,n,o){const{disabled:i,hidden:a,modifiers:s,showOutsideDays:l,broadcastCalendar:c,today:u=o.today()}=t,{isSameDay:d,isSameMonth:f,startOfMonth:h,isBefore:v,endOfMonth:m,isAfter:g}=o,y=r&&h(r),x=n&&m(n),w={[Fe.focused]:[],[Fe.outside]:[],[Fe.disabled]:[],[Fe.hidden]:[],[Fe.today]:[]},S={};for(const P of e){const{date:C,displayMonth:E}=P,A=!!(E&&!f(C,E)),T=!!(y&&v(C,y)),M=!!(x&&g(C,x)),_=!!(i&&tn(C,i,o)),k=!!(a&&tn(C,a,o))||T||M||!c&&!l&&A||c&&l===!1&&A,N=d(C,u);A&&w.outside.push(P),_&&w.disabled.push(P),k&&w.hidden.push(P),N&&w.today.push(P),s&&Object.keys(s).forEach(R=>{const z=s?.[R];z&&tn(C,z,o)&&(S[R]?S[R].push(P):S[R]=[P])})}return P=>{const C={[Fe.focused]:!1,[Fe.disabled]:!1,[Fe.hidden]:!1,[Fe.outside]:!1,[Fe.today]:!1},E={};for(const A in w){const T=w[A];C[A]=T.some(M=>M===P)}for(const A in S)E[A]=S[A].some(T=>T===P);return{...C,...E}}}function Jie(e,t,r={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[i])=>(r[i]?o.push(r[i]):t[Fe[i]]?o.push(t[Fe[i]]):t[yr[i]]&&o.push(t[yr[i]]),o),[t[ne.Day]])}function eae(e){return{...Zie,...e}}function tae(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([r,n])=>{r.startsWith("data-")&&(t[r]=n)}),t}function uN(){const e={};for(const t in ne)e[ne[t]]=`rdp-${ne[t]}`;for(const t in Fe)e[Fe[t]]=`rdp-${Fe[t]}`;for(const t in yr)e[yr[t]]=`rdp-${yr[t]}`;for(const t in Ut)e[Ut[t]]=`rdp-${Ut[t]}`;return e}function dN(e,t,r){return(r??new Jt(t)).formatMonthYear(e)}const rae=dN;function nae(e,t,r){return(r??new Jt(t)).format(e,"d")}function oae(e,t=Gr){return t.format(e,"LLLL")}function iae(e,t,r){return(r??new Jt(t)).format(e,"cccccc")}function aae(e,t=Gr){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function sae(){return""}function fN(e,t=Gr){return t.format(e,"yyyy")}const lae=fN,cae=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:dN,formatDay:nae,formatMonthCaption:rae,formatMonthDropdown:oae,formatWeekNumber:aae,formatWeekNumberHeader:sae,formatWeekdayName:iae,formatYearCaption:lae,formatYearDropdown:fN},Symbol.toStringTag,{value:"Module"}));function uae(e){return e?.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e?.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...cae,...e}}function Uy(e,t,r,n){let o=(n??new Jt(r)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const dae=Uy;function Hy(e,t,r){return(r??new Jt(t)).formatMonthYear(e)}const fae=Hy;function pN(e,t,r,n){let o=(n??new Jt(r)).format(e,"PPPP");return t?.today&&(o=`Today, ${o}`),o}function hN(e){return"Choose the Month"}function mN(){return""}const pae="Go to the Next Month";function vN(e,t){return pae}function gN(e){return"Go to the Previous Month"}function yN(e,t,r){return(r??new Jt(t)).format(e,"cccc")}function bN(e,t){return`Week ${e}`}function xN(e){return"Week Number"}function wN(e){return"Choose the Year"}const hae=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:fae,labelDay:dae,labelDayButton:Uy,labelGrid:Hy,labelGridcell:pN,labelMonthDropdown:hN,labelNav:mN,labelNext:vN,labelPrevious:gN,labelWeekNumber:bN,labelWeekNumberHeader:xN,labelWeekday:yN,labelYearDropdown:wN},Symbol.toStringTag,{value:"Module"})),pr=(e,t,r)=>t||(r?typeof r=="function"?r:(...n)=>r:e);function mae(e,t){const r=t.locale?.labels??{};return{...hae,...e??{},labelDayButton:pr(Uy,e?.labelDayButton,r.labelDayButton),labelMonthDropdown:pr(hN,e?.labelMonthDropdown,r.labelMonthDropdown),labelNext:pr(vN,e?.labelNext,r.labelNext),labelPrevious:pr(gN,e?.labelPrevious,r.labelPrevious),labelWeekNumber:pr(bN,e?.labelWeekNumber,r.labelWeekNumber),labelYearDropdown:pr(wN,e?.labelYearDropdown,r.labelYearDropdown),labelGrid:pr(Hy,e?.labelGrid,r.labelGrid),labelGridcell:pr(pN,e?.labelGridcell,r.labelGridcell),labelNav:pr(mN,e?.labelNav,r.labelNav),labelWeekNumberHeader:pr(xN,e?.labelWeekNumberHeader,r.labelWeekNumberHeader),labelWeekday:pr(yN,e?.labelWeekday,r.labelWeekday)}}function vae(e,t,r,n,o){const{startOfMonth:i,startOfYear:a,endOfYear:s,eachMonthOfInterval:l,getMonth:c}=o;return l({start:a(e),end:s(e)}).map(f=>{const h=n.formatMonthDropdown(f,o),v=c(f),m=t&&f<i(t)||r&&f>i(r)||!1;return{value:v,label:h,disabled:m}})}function gae(e,t={},r={}){let n={...t?.[ne.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{n={...n,...r?.[o]}}),n}function yae(e,t,r,n){const o=n??e.today(),i=r?e.startOfBroadcastWeek(o,e):t?e.startOfISOWeek(o):e.startOfWeek(o),a=[];for(let s=0;s<7;s++){const l=e.addDays(i,s);a.push(l)}return a}function bae(e,t,r,n,o=!1){if(!e||!t)return;const{startOfYear:i,endOfYear:a,eachYearOfInterval:s,getYear:l}=n,c=i(e),u=a(t),d=s({start:c,end:u});return o&&d.reverse(),d.map(f=>{const h=r.formatYearDropdown(f,n);return{value:l(f),label:h,disabled:!1}})}function xae(e,t={}){const{weekStartsOn:r,locale:n}=t,o=r??n?.options?.weekStartsOn??0,i=s=>{const l=typeof s=="number"||typeof s=="string"?new Date(s):s;return new St(l.getFullYear(),l.getMonth(),l.getDate(),12,0,0,e)},a=s=>{const l=i(s);return new Date(l.getFullYear(),l.getMonth(),l.getDate(),0,0,0,0)};return{today:()=>i(St.tz(e)),newDate:(s,l,c)=>new St(s,l,c,12,0,0,e),startOfDay:s=>i(s),startOfWeek:(s,l)=>{const c=i(s),u=l?.weekStartsOn??o,d=(c.getDay()-u+7)%7;return c.setDate(c.getDate()-d),c},startOfISOWeek:s=>{const l=i(s),c=(l.getDay()-1+7)%7;return l.setDate(l.getDate()-c),l},startOfMonth:s=>{const l=i(s);return l.setDate(1),l},startOfYear:s=>{const l=i(s);return l.setMonth(0,1),l},endOfWeek:(s,l)=>{const c=i(s),f=(((l?.weekStartsOn??o)+6)%7-c.getDay()+7)%7;return c.setDate(c.getDate()+f),c},endOfISOWeek:s=>{const l=i(s),c=(7-l.getDay())%7;return l.setDate(l.getDate()+c),l},endOfMonth:s=>{const l=i(s);return l.setMonth(l.getMonth()+1,0),l},endOfYear:s=>{const l=i(s);return l.setMonth(11,31),l},eachMonthOfInterval:s=>{const l=i(s.start),c=i(s.end),u=[],d=new St(l.getFullYear(),l.getMonth(),1,12,0,0,e),f=c.getFullYear()*12+c.getMonth();for(;d.getFullYear()*12+d.getMonth()<=f;)u.push(new St(d,e)),d.setMonth(d.getMonth()+1,1);return u},addDays:(s,l)=>{const c=i(s);return c.setDate(c.getDate()+l),c},addWeeks:(s,l)=>{const c=i(s);return c.setDate(c.getDate()+l*7),c},addMonths:(s,l)=>{const c=i(s);return c.setMonth(c.getMonth()+l),c},addYears:(s,l)=>{const c=i(s);return c.setFullYear(c.getFullYear()+l),c},eachYearOfInterval:s=>{const l=i(s.start),c=i(s.end),u=[],d=new St(l.getFullYear(),0,1,12,0,0,e);for(;d.getFullYear()<=c.getFullYear();)u.push(new St(d,e)),d.setFullYear(d.getFullYear()+1,0,1);return u},getWeek:(s,l)=>{const c=a(s);return By(c,{weekStartsOn:l?.weekStartsOn??o,firstWeekContainsDate:l?.firstWeekContainsDate??n?.options?.firstWeekContainsDate??1})},getISOWeek:s=>{const l=a(s);return Fy(l)},differenceInCalendarDays:(s,l)=>{const c=a(s),u=a(l);return Vy(c,u)},differenceInCalendarMonths:(s,l)=>{const c=a(s),u=a(l);return Q_(c,u)}}}const Is=e=>e instanceof HTMLElement?e:null,Yp=e=>[...e.querySelectorAll("[data-animated-month]")??[]],wae=e=>Is(e.querySelector("[data-animated-month]")),qp=e=>Is(e.querySelector("[data-animated-caption]")),Xp=e=>Is(e.querySelector("[data-animated-weeks]")),Sae=e=>Is(e.querySelector("[data-animated-nav]")),Pae=e=>Is(e.querySelector("[data-animated-weekdays]"));function Cae(e,t,{classNames:r,months:n,focused:o,dateLib:i}){const a=O.useRef(null),s=O.useRef(n),l=O.useRef(!1);O.useLayoutEffect(()=>{const c=s.current;if(s.current=n,!t||!e.current||!(e.current instanceof HTMLElement)||n.length===0||c.length===0||n.length!==c.length)return;const u=i.isSameMonth(n[0].date,c[0].date),d=i.isAfter(n[0].date,c[0].date),f=d?r[Ut.caption_after_enter]:r[Ut.caption_before_enter],h=d?r[Ut.weeks_after_enter]:r[Ut.weeks_before_enter],v=a.current,m=e.current.cloneNode(!0);if(m instanceof HTMLElement?(Yp(m).forEach(w=>{if(!(w instanceof HTMLElement))return;const S=wae(w);S&&w.contains(S)&&w.removeChild(S);const P=qp(w);P&&P.classList.remove(f);const C=Xp(w);C&&C.classList.remove(h)}),a.current=m):a.current=null,l.current||u||o)return;const g=v instanceof HTMLElement?Yp(v):[],y=Yp(e.current);if(y?.every(x=>x instanceof HTMLElement)&&g&&g.every(x=>x instanceof HTMLElement)){l.current=!0,e.current.style.isolation="isolate";const x=Sae(e.current);x&&(x.style.zIndex="1"),y.forEach((w,S)=>{const P=g[S];if(!P)return;w.style.position="relative",w.style.overflow="hidden";const C=qp(w);C&&C.classList.add(f);const E=Xp(w);E&&E.classList.add(h);const A=()=>{l.current=!1,e.current&&(e.current.style.isolation=""),x&&(x.style.zIndex=""),C&&C.classList.remove(f),E&&E.classList.remove(h),w.style.position="",w.style.overflow="",w.contains(P)&&w.removeChild(P)};P.style.pointerEvents="none",P.style.position="absolute",P.style.overflow="hidden",P.setAttribute("aria-hidden","true");const T=Pae(P);T&&(T.style.opacity="0");const M=qp(P);M&&(M.classList.add(d?r[Ut.caption_before_exit]:r[Ut.caption_after_exit]),M.addEventListener("animationend",A));const _=Xp(P);_&&_.classList.add(d?r[Ut.weeks_before_exit]:r[Ut.weeks_after_exit]),w.insertBefore(P,w.firstChild)})}})}function Oae(e,t,r,n){const o=e[0],i=e[e.length-1],{ISOWeek:a,fixedWeeks:s,broadcastCalendar:l}=r??{},{addDays:c,differenceInCalendarDays:u,differenceInCalendarMonths:d,endOfBroadcastWeek:f,endOfISOWeek:h,endOfMonth:v,endOfWeek:m,isAfter:g,startOfBroadcastWeek:y,startOfISOWeek:x,startOfWeek:w}=n,S=l?y(o,n):a?x(o):w(o),P=l?f(i):a?h(v(i)):m(v(i)),C=t&&(l?f(t):a?h(t):m(t)),E=C&&g(P,C)?C:P,A=u(E,S),T=d(i,o)+1,M=[];for(let N=0;N<=A;N++){const R=c(S,N);M.push(R)}const k=(l?35:42)*T;if(s&&M.length<k){const N=k-M.length;for(let R=0;R<N;R++){const z=c(M[M.length-1],1);M.push(z)}}return M}function Eae(e){const t=[];return e.reduce((r,n)=>{const o=n.weeks.reduce((i,a)=>i.concat(a.days.slice()),t.slice());return r.concat(o.slice())},t.slice())}function Aae(e,t,r,n){const{numberOfMonths:o=1}=r,i=[];for(let a=0;a<o;a++){const s=n.addMonths(e,a);if(t&&s>t)break;i.push(s)}return i}function qC(e,t,r,n){const{month:o,defaultMonth:i,today:a=n.today(),numberOfMonths:s=1}=e;let l=o||i||a;const{differenceInCalendarMonths:c,addMonths:u,startOfMonth:d}=n;if(r&&c(r,l)<s-1){const f=-1*(s-1);l=u(r,f)}return t&&c(l,t)<0&&(l=t),d(l)}function Tae(e,t,r,n){const{addDays:o,endOfBroadcastWeek:i,endOfISOWeek:a,endOfMonth:s,endOfWeek:l,getISOWeek:c,getWeek:u,startOfBroadcastWeek:d,startOfISOWeek:f,startOfWeek:h}=n,v=e.reduce((m,g)=>{const y=r.broadcastCalendar?d(g,n):r.ISOWeek?f(g):h(g),x=r.broadcastCalendar?i(g):r.ISOWeek?a(s(g)):l(s(g)),w=t.filter(E=>E>=y&&E<=x),S=r.broadcastCalendar?35:42;if(r.fixedWeeks&&w.length<S){const E=t.filter(A=>{const T=S-w.length;return A>x&&A<=o(x,T)});w.push(...E)}const P=w.reduce((E,A)=>{const T=r.ISOWeek?c(A):u(A),M=E.find(k=>k.weekNumber===T),_=new aN(A,g,n);return M?M.days.push(_):E.push(new Cie(T,[_])),E},[]),C=new Pie(g,P);return m.push(C),m},[]);return r.reverseMonths?v.reverse():v}function Mae(e,t){let{startMonth:r,endMonth:n}=e;const{startOfYear:o,startOfDay:i,startOfMonth:a,endOfMonth:s,addYears:l,endOfYear:c,newDate:u,today:d}=t,{fromYear:f,toYear:h,fromMonth:v,toMonth:m}=e;!r&&v&&(r=v),!r&&f&&(r=t.newDate(f,0,1)),!n&&m&&(n=m),!n&&h&&(n=u(h,11,31));const g=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return r?r=a(r):f?r=u(f,0,1):!r&&g&&(r=o(l(e.today??d(),-100))),n?n=s(n):h?n=u(h,11,31):!n&&g&&(n=c(e.today??d())),[r&&i(r),n&&i(n)]}function kae(e,t,r,n){if(r.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:i=1}=r,{startOfMonth:a,addMonths:s,differenceInCalendarMonths:l}=n,c=o?i:1,u=a(e);if(!t)return s(u,c);if(!(l(t,e)<i))return s(u,c)}function Dae(e,t,r,n){if(r.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:i}=r,{startOfMonth:a,addMonths:s,differenceInCalendarMonths:l}=n,c=o?i??1:1,u=a(e);if(!t)return s(u,-c);if(!(l(u,t)<=0))return s(u,-c)}function _ae(e){const t=[];return e.reduce((r,n)=>r.concat(n.weeks.slice()),t.slice())}function Sd(e,t){const[r,n]=O.useState(e);return[t===void 0?r:t,n]}function Nae(e,t){const[r,n]=Mae(e,t),{startOfMonth:o,endOfMonth:i}=t,a=qC(e,r,n,t),[s,l]=Sd(a,e.month?a:void 0);O.useEffect(()=>{const S=qC(e,r,n,t);l(S)},[e.timeZone]);const{months:c,weeks:u,days:d,previousMonth:f,nextMonth:h}=O.useMemo(()=>{const S=Aae(s,n,{numberOfMonths:e.numberOfMonths},t),P=Oae(S,e.endMonth?i(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),C=Tae(S,P,{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t),E=_ae(C),A=Eae(C),T=Dae(s,r,e,t),M=kae(s,n,e,t);return{months:C,weeks:E,days:A,previousMonth:T,nextMonth:M}},[t,s.getTime(),n?.getTime(),r?.getTime(),e.disableNavigation,e.broadcastCalendar,e.endMonth?.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:v,onMonthChange:m}=e,g=S=>u.some(P=>P.days.some(C=>C.isEqualTo(S))),y=S=>{if(v)return;let P=o(S);r&&P<o(r)&&(P=o(r)),n&&P>o(n)&&(P=o(n)),l(P),m?.(P)};return{months:c,weeks:u,days:d,navStart:r,navEnd:n,previousMonth:f,nextMonth:h,goToMonth:y,goToDay:S=>{g(S)||y(S.date)}}}var Mr;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(Mr||(Mr={}));function XC(e){return!e[Fe.disabled]&&!e[Fe.hidden]&&!e[Fe.outside]}function jae(e,t,r,n){let o,i=-1;for(const a of e){const s=t(a);XC(s)&&(s[Fe.focused]&&i<Mr.FocusedModifier?(o=a,i=Mr.FocusedModifier):n?.isEqualTo(a)&&i<Mr.LastFocused?(o=a,i=Mr.LastFocused):r(a.date)&&i<Mr.Selected?(o=a,i=Mr.Selected):s[Fe.today]&&i<Mr.Today&&(o=a,i=Mr.Today))}return o||(o=e.find(a=>XC(t(a)))),o}function Iae(e,t,r,n,o,i,a){const{ISOWeek:s,broadcastCalendar:l}=i,{addDays:c,addMonths:u,addWeeks:d,addYears:f,endOfBroadcastWeek:h,endOfISOWeek:v,endOfWeek:m,max:g,min:y,startOfBroadcastWeek:x,startOfISOWeek:w,startOfWeek:S}=a;let C={day:c,week:d,month:u,year:f,startOfWeek:E=>l?x(E,a):s?w(E):S(E),endOfWeek:E=>l?h(E):s?v(E):m(E)}[e](r,t==="after"?1:-1);return t==="before"&&n?C=g([n,C]):t==="after"&&o&&(C=y([o,C])),C}function SN(e,t,r,n,o,i,a,s=0){if(s>365)return;const l=Iae(e,t,r.date,n,o,i,a),c=!!(i.disabled&&tn(l,i.disabled,a)),u=!!(i.hidden&&tn(l,i.hidden,a)),d=l,f=new aN(l,d,a);return!c&&!u?f:SN(e,t,f,n,o,i,a,s+1)}function Rae(e,t,r,n,o){const{autoFocus:i}=e,[a,s]=O.useState(),l=jae(t.days,r,n||(()=>!1),a),[c,u]=O.useState(i?l:void 0);return{isFocusTarget:m=>!!l?.isEqualTo(m),setFocused:u,focused:c,blur:()=>{s(c),u(void 0)},moveFocus:(m,g)=>{if(!c)return;const y=SN(m,g,c,t.navStart,t.navEnd,e,o);y&&(e.disableNavigation&&!t.days.some(w=>w.isEqualTo(y))||(t.goToDay(y),u(y)))}}}function Lae(e,t){const{selected:r,required:n,onSelect:o}=e,[i,a]=Sd(r,o?r:void 0),s=o?r:i,{isSameDay:l}=t,c=h=>s?.some(v=>l(v,h))??!1,{min:u,max:d}=e;return{selected:s,select:(h,v,m)=>{let g=[...s??[]];if(c(h)){if(s?.length===u||n&&s?.length===1)return;g=s?.filter(y=>!l(y,h))}else s?.length===d?g=[h]:g=[...g,h];return o||a(g),o?.(g,h,v,m),g},isSelected:c}}function $ae(e,t,r=0,n=0,o=!1,i=Gr){const{from:a,to:s}=t||{},{isSameDay:l,isAfter:c,isBefore:u}=i;let d;if(!a&&!s)d={from:e,to:r>0?void 0:e};else if(a&&!s)l(a,e)?r===0?d={from:a,to:e}:o?d={from:a,to:void 0}:d=void 0:u(e,a)?d={from:e,to:a}:d={from:a,to:e};else if(a&&s)if(l(a,e)&&l(s,e))o?d={from:a,to:s}:d=void 0;else if(l(a,e))d={from:a,to:r>0?void 0:e};else if(l(s,e))d={from:e,to:r>0?void 0:e};else if(u(e,a))d={from:e,to:s};else if(c(e,a))d={from:a,to:e};else if(c(e,s))d={from:a,to:e};else throw new Error("Invalid range");if(d?.from&&d?.to){const f=i.differenceInCalendarDays(d.to,d.from);n>0&&f>n?d={from:e,to:void 0}:r>1&&f<r&&(d={from:e,to:void 0})}return d}function Vae(e,t,r=Gr){const n=Array.isArray(t)?t:[t];let o=e.from;const i=r.differenceInCalendarDays(e.to,e.from),a=Math.min(i,6);for(let s=0;s<=a;s++){if(n.includes(o.getDay()))return!0;o=r.addDays(o,1)}return!1}function ZC(e,t,r=Gr){return en(e,t.from,!1,r)||en(e,t.to,!1,r)||en(t,e.from,!1,r)||en(t,e.to,!1,r)}function Fae(e,t,r=Gr){const n=Array.isArray(t)?t:[t];if(n.filter(s=>typeof s!="function").some(s=>typeof s=="boolean"?s:r.isDate(s)?en(e,s,!1,r):cN(s,r)?s.some(l=>en(e,l,!1,r)):wd(s)?s.from&&s.to?ZC(e,{from:s.from,to:s.to},r):!1:lN(s)?Vae(e,s.dayOfWeek,r):Wy(s)?r.isAfter(s.before,s.after)?ZC(e,{from:r.addDays(s.after,1),to:r.addDays(s.before,-1)},r):tn(e.from,s,r)||tn(e.to,s,r):zy(s)||Ky(s)?tn(e.from,s,r)||tn(e.to,s,r):!1))return!0;const a=n.filter(s=>typeof s=="function");if(a.length){let s=e.from;const l=r.differenceInCalendarDays(e.to,e.from);for(let c=0;c<=l;c++){if(a.some(u=>u(s)))return!0;s=r.addDays(s,1)}}return!1}function Bae(e,t){const{disabled:r,excludeDisabled:n,selected:o,required:i,onSelect:a}=e,[s,l]=Sd(o,a?o:void 0),c=a?o:s;return{selected:c,select:(f,h,v)=>{const{min:m,max:g}=e,y=f?$ae(f,c,m,g,i,t):void 0;return n&&r&&y?.from&&y.to&&Fae({from:y.from,to:y.to},r,t)&&(y.from=f,y.to=void 0),a||l(y),a?.(y,f,h,v),y},isSelected:f=>c&&en(c,f,!1,t)}}function Wae(e,t){const{selected:r,required:n,onSelect:o}=e,[i,a]=Sd(r,o?r:void 0),s=o?r:i,{isSameDay:l}=t;return{selected:s,select:(d,f,h)=>{let v=d;return!n&&s&&s&&l(d,s)&&(v=void 0),o||a(v),o?.(v,d,f,h),v},isSelected:d=>s?l(s,d):!1}}function zae(e,t){const r=Wae(e,t),n=Lae(e,t),o=Bae(e,t);switch(e.mode){case"single":return r;case"multiple":return n;case"range":return o;default:return}}function or(e,t){return e instanceof St&&e.timeZone===t?e:new St(e,t)}function ai(e,t,r){return or(e,t)}function QC(e,t,r){return typeof e=="boolean"||typeof e=="function"?e:e instanceof Date?ai(e,t):Array.isArray(e)?e.map(n=>n instanceof Date?ai(n,t):n):wd(e)?{...e,from:e.from?or(e.from,t):e.from,to:e.to?or(e.to,t):e.to}:Wy(e)?{before:ai(e.before,t),after:ai(e.after,t)}:zy(e)?{after:ai(e.after,t)}:Ky(e)?{before:ai(e.before,t)}:e}function Zp(e,t,r){return e&&(Array.isArray(e)?e.map(n=>QC(n,t)):QC(e,t))}function Kae(e){let t=e;const r=t.timeZone;if(r&&(t={...e,timeZone:r},t.today&&(t.today=or(t.today,r)),t.month&&(t.month=or(t.month,r)),t.defaultMonth&&(t.defaultMonth=or(t.defaultMonth,r)),t.startMonth&&(t.startMonth=or(t.startMonth,r)),t.endMonth&&(t.endMonth=or(t.endMonth,r)),t.mode==="single"&&t.selected?t.selected=or(t.selected,r):t.mode==="multiple"&&t.selected?t.selected=t.selected?.map(ce=>or(ce,r)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?or(t.selected.from,r):t.selected.from,to:t.selected.to?or(t.selected.to,r):t.selected.to}),t.disabled!==void 0&&(t.disabled=Zp(t.disabled,r)),t.hidden!==void 0&&(t.hidden=Zp(t.hidden,r)),t.modifiers)){const ce={};Object.keys(t.modifiers).forEach(we=>{ce[we]=Zp(t.modifiers?.[we],r)}),t.modifiers=ce}const{components:n,formatters:o,labels:i,dateLib:a,locale:s,classNames:l}=O.useMemo(()=>{const ce={...iN,...t.locale},we=t.broadcastCalendar?1:t.weekStartsOn,se=t.noonSafe&&t.timeZone?xae(t.timeZone,{weekStartsOn:we,locale:ce}):void 0,be=t.dateLib&&se?{...se,...t.dateLib}:t.dateLib??se,Kt=new Jt({locale:ce,weekStartsOn:we,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},be);return{dateLib:Kt,components:eae(t.components),formatters:uae(t.formatters),labels:mae(t.labels,Kt.options),locale:ce,classNames:{...uN(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.noonSafe,t.components,t.formatters,t.labels,t.classNames]);t.today||(t={...t,today:a.today()});const{captionLayout:c,mode:u,navLayout:d,numberOfMonths:f=1,onDayBlur:h,onDayClick:v,onDayFocus:m,onDayKeyDown:g,onDayMouseEnter:y,onDayMouseLeave:x,onNextClick:w,onPrevClick:S,showWeekNumber:P,styles:C}=t,{formatCaption:E,formatDay:A,formatMonthDropdown:T,formatWeekNumber:M,formatWeekNumberHeader:_,formatWeekdayName:k,formatYearDropdown:N}=o,R=Nae(t,a),{days:z,months:B,navStart:F,navEnd:j,previousMonth:L,nextMonth:H,goToMonth:re}=R,le=Qie(z,t,F,j,a),{isSelected:ae,select:oe,selected:Se}=zae(t,a)??{},{blur:Me,focused:K,isFocusTarget:fe,moveFocus:$,setFocused:G}=Rae(t,R,le,ae??(()=>!1),a),{labelDayButton:W,labelGridcell:V,labelGrid:he,labelMonthDropdown:ue,labelNav:Ye,labelPrevious:tt,labelNext:zt,labelWeekday:el,labelWeekNumber:tB,labelWeekNumberHeader:rB,labelYearDropdown:nB}=i,oB=O.useMemo(()=>yae(a,t.ISOWeek,t.broadcastCalendar,t.today),[a,t.ISOWeek,t.broadcastCalendar,t.today]),sx=u!==void 0||v!==void 0,Jd=O.useCallback(()=>{L&&(re(L),S?.(L))},[L,re,S]),ef=O.useCallback(()=>{H&&(re(H),w?.(H))},[re,H,w]),iB=O.useCallback((ce,we)=>se=>{se.preventDefault(),se.stopPropagation(),G(ce),!we.disabled&&(oe?.(ce.date,we,se),v?.(ce.date,we,se))},[oe,v,G]),aB=O.useCallback((ce,we)=>se=>{G(ce),m?.(ce.date,we,se)},[m,G]),sB=O.useCallback((ce,we)=>se=>{Me(),h?.(ce.date,we,se)},[Me,h]),lB=O.useCallback((ce,we)=>se=>{const be={ArrowLeft:[se.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[se.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[se.shiftKey?"year":"week","after"],ArrowUp:[se.shiftKey?"year":"week","before"],PageUp:[se.shiftKey?"year":"month","before"],PageDown:[se.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(be[se.key]){se.preventDefault(),se.stopPropagation();const[Kt,me]=be[se.key];$(Kt,me)}g?.(ce.date,we,se)},[$,g,t.dir]),cB=O.useCallback((ce,we)=>se=>{y?.(ce.date,we,se)},[y]),uB=O.useCallback((ce,we)=>se=>{x?.(ce.date,we,se)},[x]),dB=O.useCallback(ce=>we=>{const se=Number(we.target.value),be=a.setMonth(a.startOfMonth(ce),se);re(be)},[a,re]),fB=O.useCallback(ce=>we=>{const se=Number(we.target.value),be=a.setYear(a.startOfMonth(ce),se);re(be)},[a,re]),{className:pB,style:hB}=O.useMemo(()=>({className:[l[ne.Root],t.className].filter(Boolean).join(" "),style:{...C?.[ne.Root],...t.style}}),[l,t.className,t.style,C]),mB=tae(t),lx=O.useRef(null);Cae(lx,!!t.animate,{classNames:l,months:B,focused:K,dateLib:a});const vB={dayPickerProps:t,selected:Se,select:oe,isSelected:ae,months:B,nextMonth:H,previousMonth:L,goToMonth:re,getModifiers:le,components:n,classNames:l,styles:C,labels:i,formatters:o};return O.createElement(sN.Provider,{value:vB},O.createElement(n.Root,{rootRef:t.animate?lx:void 0,className:pB,style:hB,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],"aria-labelledby":t["aria-labelledby"],...mB},O.createElement(n.Months,{className:l[ne.Months],style:C?.[ne.Months]},!t.hideNavigation&&!d&&O.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:l[ne.Nav],style:C?.[ne.Nav],"aria-label":Ye(),onPreviousClick:Jd,onNextClick:ef,previousMonth:L,nextMonth:H}),B.map((ce,we)=>O.createElement(n.Month,{"data-animated-month":t.animate?"true":void 0,className:l[ne.Month],style:C?.[ne.Month],key:we,displayIndex:we,calendarMonth:ce},d==="around"&&!t.hideNavigation&&we===0&&O.createElement(n.PreviousMonthButton,{type:"button",className:l[ne.PreviousMonthButton],tabIndex:L?void 0:-1,"aria-disabled":L?void 0:!0,"aria-label":tt(L),onClick:Jd,"data-animated-button":t.animate?"true":void 0},O.createElement(n.Chevron,{disabled:L?void 0:!0,className:l[ne.Chevron],orientation:t.dir==="rtl"?"right":"left"})),O.createElement(n.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:l[ne.MonthCaption],style:C?.[ne.MonthCaption],calendarMonth:ce,displayIndex:we},c?.startsWith("dropdown")?O.createElement(n.DropdownNav,{className:l[ne.Dropdowns],style:C?.[ne.Dropdowns]},(()=>{const se=c==="dropdown"||c==="dropdown-months"?O.createElement(n.MonthsDropdown,{key:"month",className:l[ne.MonthsDropdown],"aria-label":ue(),classNames:l,components:n,disabled:!!t.disableNavigation,onChange:dB(ce.date),options:vae(ce.date,F,j,o,a),style:C?.[ne.Dropdown],value:a.getMonth(ce.date)}):O.createElement("span",{key:"month"},T(ce.date,a)),be=c==="dropdown"||c==="dropdown-years"?O.createElement(n.YearsDropdown,{key:"year",className:l[ne.YearsDropdown],"aria-label":nB(a.options),classNames:l,components:n,disabled:!!t.disableNavigation,onChange:fB(ce.date),options:bae(F,j,o,a,!!t.reverseYears),style:C?.[ne.Dropdown],value:a.getYear(ce.date)}):O.createElement("span",{key:"year"},N(ce.date,a));return a.getMonthYearOrder()==="year-first"?[be,se]:[se,be]})(),O.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},E(ce.date,a.options,a))):O.createElement(n.CaptionLabel,{className:l[ne.CaptionLabel],role:"status","aria-live":"polite"},E(ce.date,a.options,a))),d==="around"&&!t.hideNavigation&&we===f-1&&O.createElement(n.NextMonthButton,{type:"button",className:l[ne.NextMonthButton],tabIndex:H?void 0:-1,"aria-disabled":H?void 0:!0,"aria-label":zt(H),onClick:ef,"data-animated-button":t.animate?"true":void 0},O.createElement(n.Chevron,{disabled:H?void 0:!0,className:l[ne.Chevron],orientation:t.dir==="rtl"?"left":"right"})),we===f-1&&d==="after"&&!t.hideNavigation&&O.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:l[ne.Nav],style:C?.[ne.Nav],"aria-label":Ye(),onPreviousClick:Jd,onNextClick:ef,previousMonth:L,nextMonth:H}),O.createElement(n.MonthGrid,{role:"grid","aria-multiselectable":u==="multiple"||u==="range","aria-label":he(ce.date,a.options,a)||void 0,className:l[ne.MonthGrid],style:C?.[ne.MonthGrid]},!t.hideWeekdays&&O.createElement(n.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:l[ne.Weekdays],style:C?.[ne.Weekdays]},P&&O.createElement(n.WeekNumberHeader,{"aria-label":rB(a.options),className:l[ne.WeekNumberHeader],style:C?.[ne.WeekNumberHeader],scope:"col"},_()),oB.map(se=>O.createElement(n.Weekday,{"aria-label":el(se,a.options,a),className:l[ne.Weekday],key:String(se),style:C?.[ne.Weekday],scope:"col"},k(se,a.options,a)))),O.createElement(n.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:l[ne.Weeks],style:C?.[ne.Weeks]},ce.weeks.map(se=>O.createElement(n.Week,{className:l[ne.Week],key:se.weekNumber,style:C?.[ne.Week],week:se},P&&O.createElement(n.WeekNumber,{week:se,style:C?.[ne.WeekNumber],"aria-label":tB(se.weekNumber,{locale:s}),className:l[ne.WeekNumber],scope:"row",role:"rowheader"},M(se.weekNumber,a)),se.days.map(be=>{const{date:Kt}=be,me=le(be);if(me[Fe.focused]=!me.hidden&&!!K?.isEqualTo(be),me[yr.selected]=ae?.(Kt)||me.selected,wd(Se)){const{from:tf,to:rf}=Se;me[yr.range_start]=!!(tf&&rf&&a.isSameDay(Kt,tf)),me[yr.range_end]=!!(tf&&rf&&a.isSameDay(Kt,rf)),me[yr.range_middle]=en(Se,Kt,!0,a)}const gB=gae(me,C,t.modifiersStyles),yB=Jie(me,l,t.modifiersClassNames),bB=!sx&&!me.hidden?V(Kt,me,a.options,a):void 0;return O.createElement(n.Day,{key:`${be.isoDate}_${be.displayMonthId}`,day:be,modifiers:me,className:yB.join(" "),style:gB,role:"gridcell","aria-selected":me.selected||void 0,"aria-label":bB,"data-day":be.isoDate,"data-month":be.outside?be.dateMonthId:void 0,"data-selected":me.selected||void 0,"data-disabled":me.disabled||void 0,"data-hidden":me.hidden||void 0,"data-outside":be.outside||void 0,"data-focused":me.focused||void 0,"data-today":me.today||void 0},!me.hidden&&sx?O.createElement(n.DayButton,{className:l[ne.DayButton],style:C?.[ne.DayButton],type:"button",day:be,modifiers:me,disabled:!me.focused&&me.disabled||void 0,"aria-disabled":me.focused&&me.disabled||void 0,tabIndex:fe(be)?0:-1,"aria-label":W(Kt,me,a.options,a),onClick:iB(be,me),onBlur:sB(be,me),onFocus:aB(be,me),onKeyDown:lB(be,me),onMouseEnter:cB(be,me),onMouseLeave:uB(be,me)},A(Kt,a.options,a)):!me.hidden&&A(be.date,a.options,a))})))))))),t.footer&&O.createElement(n.Footer,{className:l[ne.Footer],style:C?.[ne.Footer],role:"status","aria-live":"polite"},t.footer)))}function Rs({className:e,classNames:t,components:r,...n}){const o=uN();return b.jsx(Kae,{showOutsideDays:!0,fixedWeeks:!0,className:D("font-sans",e),classNames:{root:D(o.root),months:D("relative flex flex-row gap-4",o.months),month:D(o.month),month_caption:D("flex h-9 items-center justify-center",o.month_caption),caption_label:D("text-primary text-sm font-medium",o.caption_label),nav:D("absolute inset-x-0 top-0 z-10 flex h-9 items-center justify-between px-0.5"),button_previous:D("hover:bg-alt focus-visible:ring-sunflower inline-flex h-7 w-7 items-center justify-center rounded-full","transition-colors focus-visible:ring-2 focus-visible:outline-none"),button_next:D("hover:bg-alt focus-visible:ring-sunflower inline-flex h-7 w-7 items-center justify-center rounded-full","transition-colors focus-visible:ring-2 focus-visible:outline-none"),weekday:D("text-tertiary w-9 text-center text-xs font-medium",o.weekday),weekdays:D(o.weekdays),week:D(o.week),day:D("relative p-0 text-center",o.day),day_button:D("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","hover:bg-sunflower text-primary",o.day_button),today:D("[&>button]:border-sunflower [&>button]:border",o.today),selected:D("[&>button]:bg-sunflower [&>button]:text-primary [&>button]:hover:bg-sunflower [&>button]:font-medium",o.selected),range_start:D("[&>button]:bg-sunflower [&>button]:text-primary [&>button]:rounded-full [&>button]:font-medium","bg-lemon-meringue rounded-l-full",o.range_start),range_middle:D("bg-lemon-meringue [&>button]:text-primary [&>button]:hover:bg-sunflower/30 [&>button]:rounded-none [&>button]:bg-transparent","rounded-none",o.range_middle),range_end:D("[&>button]:bg-sunflower [&>button]:text-primary [&>button]:rounded-full [&>button]:font-medium","bg-lemon-meringue rounded-r-full",o.range_end),outside:D("[&>button]:text-tertiary [&>button]:opacity-50",o.outside),disabled:D("[&>button]:text-tertiary [&>button]:cursor-not-allowed [&>button]:opacity-50 [&>button]:hover:bg-transparent",o.disabled),hidden:D("invisible",o.hidden),...t},components:{Chevron:({orientation:i,...a})=>{const s=i==="left"?Cv:Ov;return b.jsx(s,{className:"h-4 w-4",...a})},...r},...n})}Rs.displayName="Calendar";const io=["relative","before:content-['']","before:absolute","before:inset-y-0","before:left-0","before:w-[3px]","before:z-20","before:rounded-l","before:bg-[linear-gradient(to_bottom,var(--card-accent-color)_0%,transparent_60%)]"].join(" "),PN=te("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-6",default:"p-8",lg:"p-10"},bg:{default:"bg-card",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"},accent:{none:"",border:`${io} [--card-accent-color:var(--color-border)]`,sunflower:`${io} [--card-accent-color:var(--color-sunflower)]`,"warm-purple":`${io} [--card-accent-color:var(--color-warm-purple)]`,"cool-purple":`${io} [--card-accent-color:var(--color-cool-purple)]`,"electric-blue":`${io} [--card-accent-color:var(--color-electric-blue)]`,"deep-blue":`${io} [--card-accent-color:var(--color-deep-blue)]`,error:`${io} [--card-accent-color:var(--color-error)]`}},defaultVariants:{variant:"default",padding:"default",bg:"default",accent:"none"}}),CN=p.forwardRef(({className:e,variant:t,padding:r,bg:n,accent:o,asChild:i=!1,...a},s)=>{const l=i?Ie:"div";return b.jsx(l,{className:D(PN({variant:t,padding:r,bg:n,accent:o,className:e})),ref:s,...a})});CN.displayName="Card";function Ls(e){const t=p.useRef({value:e,previous:e});return p.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function $s(e){const[t,r]=p.useState(void 0);return pt(()=>{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 Pd="Checkbox",[Uae]=it(Pd),[Hae,Gy]=Uae(Pd);function Gae(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:d}=e,[f,h]=xt({prop:r,defaultProp:o??!1,onChange:l,caller:Pd}),[v,m]=p.useState(null),[g,y]=p.useState(null),x=p.useRef(!1),w=v?!!a||!!v.closest("form"):!0,S={checked:f,disabled:i,setChecked:h,control:v,setControl:m,name:s,form:a,value:u,hasConsumerStoppedPropagationRef:x,required:c,defaultChecked:Ln(o)?!1:o,isFormControl:w,bubbleInput:g,setBubbleInput:y};return b.jsx(Hae,{scope:t,...S,children:Yae(d)?d(S):n})}var ON="CheckboxTrigger",EN=p.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},o)=>{const{control:i,value:a,disabled:s,checked:l,required:c,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:h,bubbleInput:v}=Gy(ON,e),m=ie(o,u),g=p.useRef(l);return p.useEffect(()=>{const y=i?.form;if(y){const x=()=>d(g.current);return y.addEventListener("reset",x),()=>y.removeEventListener("reset",x)}},[i,d]),b.jsx(ee.button,{type:"button",role:"checkbox","aria-checked":Ln(l)?"mixed":l,"aria-required":c,"data-state":_N(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=>{d(x=>Ln(x)?!0:!x),v&&h&&(f.current=y.isPropagationStopped(),f.current||y.stopPropagation())})})});EN.displayName=ON;var AN=p.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:o,defaultChecked:i,required:a,disabled:s,value:l,onCheckedChange:c,form:u,...d}=e;return b.jsx(Gae,{__scopeCheckbox:r,checked:o,defaultChecked:i,disabled:s,required:a,onCheckedChange:c,name:n,form:u,value:l,internal_do_not_use_render:({isFormControl:f})=>b.jsxs(b.Fragment,{children:[b.jsx(EN,{...d,ref:t,__scopeCheckbox:r}),f&&b.jsx(DN,{__scopeCheckbox:r})]})})});AN.displayName=Pd;var TN="CheckboxIndicator",MN=p.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...o}=e,i=Gy(TN,r);return b.jsx(At,{present:n||Ln(i.checked)||i.checked===!0,children:b.jsx(ee.span,{"data-state":_N(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});MN.displayName=TN;var kN="CheckboxBubbleInput",DN=p.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:o,checked:i,defaultChecked:a,required:s,disabled:l,name:c,value:u,form:d,bubbleInput:f,setBubbleInput:h}=Gy(kN,e),v=ie(r,h),m=Ls(i),g=$s(n);p.useEffect(()=>{const x=f;if(!x)return;const w=window.HTMLInputElement.prototype,P=Object.getOwnPropertyDescriptor(w,"checked").set,C=!o.current;if(m!==i&&P){const E=new Event("click",{bubbles:C});x.indeterminate=Ln(i),P.call(x,Ln(i)?!1:i),x.dispatchEvent(E)}},[f,m,i,o]);const y=p.useRef(Ln(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:d,...t,tabIndex:-1,ref:v,style:{...t.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});DN.displayName=kN;function Yae(e){return typeof e=="function"}function Ln(e){return e==="indeterminate"}function _N(e){return Ln(e)?"indeterminate":e?"checked":"unchecked"}const NN=p.forwardRef(({className:e,...t},r)=>b.jsx(AN,{ref:r,className:D("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(MN,{className:D("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"})})})}));NN.displayName="Checkbox";const qae=["top","right","bottom","left"],Wn=Math.min,Ht=Math.max,nu=Math.round,Nl=Math.floor,$r=e=>({x:e,y:e}),Xae={left:"right",right:"left",bottom:"top",top:"bottom"},Zae={start:"end",end:"start"};function Am(e,t,r){return Ht(e,Wn(t,r))}function fn(e,t){return typeof e=="function"?e(t):e}function pn(e){return e.split("-")[0]}function Zi(e){return e.split("-")[1]}function Yy(e){return e==="x"?"y":"x"}function qy(e){return e==="y"?"height":"width"}const Qae=new Set(["top","bottom"]);function Rr(e){return Qae.has(pn(e))?"y":"x"}function Xy(e){return Yy(Rr(e))}function Jae(e,t,r){r===void 0&&(r=!1);const n=Zi(e),o=Xy(e),i=qy(o);let a=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=ou(a)),[a,ou(a)]}function ese(e){const t=ou(e);return[Tm(e),t,Tm(t)]}function Tm(e){return e.replace(/start|end/g,t=>Zae[t])}const JC=["left","right"],e1=["right","left"],tse=["top","bottom"],rse=["bottom","top"];function nse(e,t,r){switch(e){case"top":case"bottom":return r?t?e1:JC:t?JC:e1;case"left":case"right":return t?tse:rse;default:return[]}}function ose(e,t,r,n){const o=Zi(e);let i=nse(pn(e),r==="start",n);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Tm)))),i}function ou(e){return e.replace(/left|right|bottom|top/g,t=>Xae[t])}function ise(e){return{top:0,right:0,bottom:0,left:0,...e}}function jN(e){return typeof e!="number"?ise(e):{top:e,right:e,bottom:e,left:e}}function iu(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 t1(e,t,r){let{reference:n,floating:o}=e;const i=Rr(t),a=Xy(t),s=qy(a),l=pn(t),c=i==="y",u=n.x+n.width/2-o.width/2,d=n.y+n.height/2-o.height/2,f=n[s]/2-o[s]/2;let h;switch(l){case"top":h={x:u,y:n.y-o.height};break;case"bottom":h={x:u,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:d};break;case"left":h={x:n.x-o.width,y:d};break;default:h={x:n.x,y:n.y}}switch(Zi(t)){case"start":h[a]-=f*(r&&c?-1:1);break;case"end":h[a]+=f*(r&&c?-1:1);break}return h}async function ase(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:d="floating",altBoundary:f=!1,padding:h=0}=fn(t,e),v=jN(h),g=s[f?d==="floating"?"reference":"floating":d],y=iu(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(g)))==null||r?g:g.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),x=d==="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)),S=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},P=iu(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:w,strategy:l}):x);return{top:(y.top-P.top+v.top)/S.y,bottom:(P.bottom-y.bottom+v.bottom)/S.y,left:(y.left-P.left+v.left)/S.x,right:(P.right-y.right+v.right)/S.x}}const sse=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:d}=t1(c,n,l),f=n,h={},v=0;for(let g=0;g<s.length;g++){var m;const{name:y,fn:x}=s[g],{x:w,y:S,data:P,reset:C}=await x({x:u,y:d,initialPlacement:n,placement:f,strategy:o,middlewareData:h,rects:c,platform:{...a,detectOverflow:(m=a.detectOverflow)!=null?m:ase},elements:{reference:e,floating:t}});u=w??u,d=S??d,h={...h,[y]:{...h[y],...P}},C&&v<=50&&(v++,typeof C=="object"&&(C.placement&&(f=C.placement),C.rects&&(c=C.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:u,y:d}=t1(c,f,l)),g=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:h}},lse=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}=fn(e,t)||{};if(c==null)return{};const d=jN(u),f={x:r,y:n},h=Xy(o),v=qy(h),m=await a.getDimensions(c),g=h==="y",y=g?"top":"left",x=g?"bottom":"right",w=g?"clientHeight":"clientWidth",S=i.reference[v]+i.reference[h]-f[h]-i.floating[v],P=f[h]-i.reference[h],C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let E=C?C[w]:0;(!E||!await(a.isElement==null?void 0:a.isElement(C)))&&(E=s.floating[w]||i.floating[v]);const A=S/2-P/2,T=E/2-m[v]/2-1,M=Wn(d[y],T),_=Wn(d[x],T),k=M,N=E-m[v]-_,R=E/2-m[v]/2+A,z=Am(k,R,N),B=!l.arrow&&Zi(o)!=null&&R!==z&&i.reference[v]/2-(R<k?M:_)-m[v]/2<0,F=B?R<k?R-k:R-N:0;return{[h]:f[h]+F,data:{[h]:z,centerOffset:R-z-F,...B&&{alignmentOffset:F}},reset:B}}}),cse=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:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:m=!0,...g}=fn(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const y=pn(o),x=Rr(s),w=pn(s)===s,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),P=f||(w||!m?[ou(s)]:ese(s)),C=v!=="none";!f&&C&&P.push(...ose(s,m,v,S));const E=[s,...P],A=await l.detectOverflow(t,g),T=[];let M=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&T.push(A[y]),d){const R=Jae(o,a,S);T.push(A[R[0]],A[R[1]])}if(M=[...M,{placement:o,overflows:T}],!T.every(R=>R<=0)){var _,k;const R=(((_=i.flip)==null?void 0:_.index)||0)+1,z=E[R];if(z&&(!(d==="alignment"?x!==Rr(z):!1)||M.every(j=>Rr(j.placement)===x?j.overflows[0]>0:!0)))return{data:{index:R,overflows:M},reset:{placement:z}};let B=(k=M.filter(F=>F.overflows[0]<=0).sort((F,j)=>F.overflows[1]-j.overflows[1])[0])==null?void 0:k.placement;if(!B)switch(h){case"bestFit":{var N;const F=(N=M.filter(j=>{if(C){const L=Rr(j.placement);return L===x||L==="y"}return!0}).map(j=>[j.placement,j.overflows.filter(L=>L>0).reduce((L,H)=>L+H,0)]).sort((j,L)=>j[1]-L[1])[0])==null?void 0:N[0];F&&(B=F);break}case"initialPlacement":B=s;break}if(o!==B)return{reset:{placement:B}}}return{}}}};function r1(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function n1(e){return qae.some(t=>e[t]>=0)}const use=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:o="referenceHidden",...i}=fn(e,t);switch(o){case"referenceHidden":{const a=await n.detectOverflow(t,{...i,elementContext:"reference"}),s=r1(a,r.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:n1(s)}}}case"escaped":{const a=await n.detectOverflow(t,{...i,altBoundary:!0}),s=r1(a,r.floating);return{data:{escapedOffsets:s,escaped:n1(s)}}}default:return{}}}}},IN=new Set(["left","top"]);async function dse(e,t){const{placement:r,platform:n,elements:o}=e,i=await(n.isRTL==null?void 0:n.isRTL(o.floating)),a=pn(r),s=Zi(r),l=Rr(r)==="y",c=IN.has(a)?-1:1,u=i&&l?-1:1,d=fn(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:v}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof v=="number"&&(h=s==="end"?v*-1:v),l?{x:h*u,y:f*c}:{x:f*c,y:h*u}}const fse=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 dse(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}}}}},pse=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}=fn(e,t),u={x:r,y:n},d=await i.detectOverflow(t,c),f=Rr(pn(o)),h=Yy(f);let v=u[h],m=u[f];if(a){const y=h==="y"?"top":"left",x=h==="y"?"bottom":"right",w=v+d[y],S=v-d[x];v=Am(w,v,S)}if(s){const y=f==="y"?"top":"left",x=f==="y"?"bottom":"right",w=m+d[y],S=m-d[x];m=Am(w,m,S)}const g=l.fn({...t,[h]:v,[f]:m});return{...g,data:{x:g.x-r,y:g.y-n,enabled:{[h]:a,[f]:s}}}}}},hse=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}=fn(e,t),u={x:r,y:n},d=Rr(o),f=Yy(d);let h=u[f],v=u[d];const m=fn(s,t),g=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const w=f==="y"?"height":"width",S=i.reference[f]-i.floating[w]+g.mainAxis,P=i.reference[f]+i.reference[w]-g.mainAxis;h<S?h=S:h>P&&(h=P)}if(c){var y,x;const w=f==="y"?"width":"height",S=IN.has(pn(o)),P=i.reference[d]-i.floating[w]+(S&&((y=a.offset)==null?void 0:y[d])||0)+(S?0:g.crossAxis),C=i.reference[d]+i.reference[w]+(S?0:((x=a.offset)==null?void 0:x[d])||0)-(S?g.crossAxis:0);v<P?v=P:v>C&&(v=C)}return{[f]:h,[d]:v}}}},mse=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}=fn(e,t),u=await a.detectOverflow(t,c),d=pn(o),f=Zi(o),h=Rr(o)==="y",{width:v,height:m}=i.floating;let g,y;d==="top"||d==="bottom"?(g=d,y=f===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(y=d,g=f==="end"?"top":"bottom");const x=m-u.top-u.bottom,w=v-u.left-u.right,S=Wn(m-u[g],x),P=Wn(v-u[y],w),C=!t.middlewareData.shift;let E=S,A=P;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(A=w),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(E=x),C&&!f){const M=Ht(u.left,0),_=Ht(u.right,0),k=Ht(u.top,0),N=Ht(u.bottom,0);h?A=v-2*(M!==0||_!==0?M+_:Ht(u.left,u.right)):E=m-2*(k!==0||N!==0?k+N:Ht(u.top,u.bottom))}await l({...t,availableWidth:A,availableHeight:E});const T=await a.getDimensions(s.floating);return v!==T.width||m!==T.height?{reset:{rects:!0}}:{}}}};function Cd(){return typeof window<"u"}function Qi(e){return RN(e)?(e.nodeName||"").toLowerCase():"#document"}function Xt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Yr(e){var t;return(t=(RN(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function RN(e){return Cd()?e instanceof Node||e instanceof Xt(e).Node:!1}function wr(e){return Cd()?e instanceof Element||e instanceof Xt(e).Element:!1}function Kr(e){return Cd()?e instanceof HTMLElement||e instanceof Xt(e).HTMLElement:!1}function o1(e){return!Cd()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Xt(e).ShadowRoot}const vse=new Set(["inline","contents"]);function Vs(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=Sr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!vse.has(o)}const gse=new Set(["table","td","th"]);function yse(e){return gse.has(Qi(e))}const bse=[":popover-open",":modal"];function Od(e){return bse.some(t=>{try{return e.matches(t)}catch{return!1}})}const xse=["transform","translate","scale","rotate","perspective"],wse=["transform","translate","scale","rotate","perspective","filter"],Sse=["paint","layout","strict","content"];function Zy(e){const t=Qy(),r=wr(e)?Sr(e):e;return xse.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)||wse.some(n=>(r.willChange||"").includes(n))||Sse.some(n=>(r.contain||"").includes(n))}function Pse(e){let t=zn(e);for(;Kr(t)&&!_i(t);){if(Zy(t))return t;if(Od(t))return null;t=zn(t)}return null}function Qy(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Cse=new Set(["html","body","#document"]);function _i(e){return Cse.has(Qi(e))}function Sr(e){return Xt(e).getComputedStyle(e)}function Ed(e){return wr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function zn(e){if(Qi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||o1(e)&&e.host||Yr(e);return o1(t)?t.host:t}function LN(e){const t=zn(e);return _i(t)?e.ownerDocument?e.ownerDocument.body:e.body:Kr(t)&&Vs(t)?t:LN(t)}function qa(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=LN(e),i=o===((n=e.ownerDocument)==null?void 0:n.body),a=Xt(o);if(i){const s=Mm(a);return t.concat(a,a.visualViewport||[],Vs(o)?o:[],s&&r?qa(s):[])}return t.concat(o,qa(o,[],r))}function Mm(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function $N(e){const t=Sr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=Kr(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,s=nu(r)!==i||nu(n)!==a;return s&&(r=i,n=a),{width:r,height:n,$:s}}function Jy(e){return wr(e)?e:e.contextElement}function Si(e){const t=Jy(e);if(!Kr(t))return $r(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=$N(t);let a=(i?nu(r.width):r.width)/n,s=(i?nu(r.height):r.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const Ose=$r(0);function VN(e){const t=Xt(e);return!Qy()||!t.visualViewport?Ose:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ese(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Xt(e)?!1:t}function Lo(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),i=Jy(e);let a=$r(1);t&&(n?wr(n)&&(a=Si(n)):a=Si(e));const s=Ese(i,r,n)?VN(i):$r(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const f=Xt(i),h=n&&wr(n)?Xt(n):n;let v=f,m=Mm(v);for(;m&&n&&h!==v;){const g=Si(m),y=m.getBoundingClientRect(),x=Sr(m),w=y.left+(m.clientLeft+parseFloat(x.paddingLeft))*g.x,S=y.top+(m.clientTop+parseFloat(x.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,d*=g.y,l+=w,c+=S,v=Xt(m),m=Mm(v)}}return iu({width:u,height:d,x:l,y:c})}function Ad(e,t){const r=Ed(e).scrollLeft;return t?t.left+r:Lo(Yr(e)).left+r}function FN(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Ad(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function Ase(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i=o==="fixed",a=Yr(n),s=t?Od(t.floating):!1;if(n===a||s&&i)return r;let l={scrollLeft:0,scrollTop:0},c=$r(1);const u=$r(0),d=Kr(n);if((d||!d&&!i)&&((Qi(n)!=="body"||Vs(a))&&(l=Ed(n)),Kr(n))){const h=Lo(n);c=Si(n),u.x=h.x+n.clientLeft,u.y=h.y+n.clientTop}const f=a&&!d&&!i?FN(a,l):$r(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:r.y*c.y-l.scrollTop*c.y+u.y+f.y}}function Tse(e){return Array.from(e.getClientRects())}function Mse(e){const t=Yr(e),r=Ed(e),n=e.ownerDocument.body,o=Ht(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Ht(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+Ad(e);const s=-r.scrollTop;return Sr(n).direction==="rtl"&&(a+=Ht(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:a,y:s}}const i1=25;function kse(e,t){const r=Xt(e),n=Yr(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=Qy();(!u||u&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}const c=Ad(n);if(c<=0){const u=n.ownerDocument,d=u.body,f=getComputedStyle(d),h=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,v=Math.abs(n.clientWidth-d.clientWidth-h);v<=i1&&(i-=v)}else c<=i1&&(i+=c);return{width:i,height:a,x:s,y:l}}const Dse=new Set(["absolute","fixed"]);function _se(e,t){const r=Lo(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=Kr(e)?Si(e):$r(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 a1(e,t,r){let n;if(t==="viewport")n=kse(e,r);else if(t==="document")n=Mse(Yr(e));else if(wr(t))n=_se(t,r);else{const o=VN(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return iu(n)}function BN(e,t){const r=zn(e);return r===t||!wr(r)||_i(r)?!1:Sr(r).position==="fixed"||BN(r,t)}function Nse(e,t){const r=t.get(e);if(r)return r;let n=qa(e,[],!1).filter(s=>wr(s)&&Qi(s)!=="body"),o=null;const i=Sr(e).position==="fixed";let a=i?zn(e):e;for(;wr(a)&&!_i(a);){const s=Sr(a),l=Zy(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&Dse.has(o.position)||Vs(a)&&!l&&BN(e,a))?n=n.filter(u=>u!==a):o=s,a=zn(a)}return t.set(e,n),n}function jse(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const a=[...r==="clippingAncestors"?Od(t)?[]:Nse(t,this._c):[].concat(r),n],s=a[0],l=a.reduce((c,u)=>{const d=a1(t,u,o);return c.top=Ht(d.top,c.top),c.right=Wn(d.right,c.right),c.bottom=Wn(d.bottom,c.bottom),c.left=Ht(d.left,c.left),c},a1(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Ise(e){const{width:t,height:r}=$N(e);return{width:t,height:r}}function Rse(e,t,r){const n=Kr(t),o=Yr(t),i=r==="fixed",a=Lo(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=$r(0);function c(){l.x=Ad(o)}if(n||!n&&!i)if((Qi(t)!=="body"||Vs(o))&&(s=Ed(t)),n){const h=Lo(t,!0,i,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else o&&c();i&&!n&&o&&c();const u=o&&!n&&!i?FN(o,s):$r(0),d=a.left+s.scrollLeft-l.x-u.x,f=a.top+s.scrollTop-l.y-u.y;return{x:d,y:f,width:a.width,height:a.height}}function Qp(e){return Sr(e).position==="static"}function s1(e,t){if(!Kr(e)||Sr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Yr(e)===r&&(r=r.ownerDocument.body),r}function WN(e,t){const r=Xt(e);if(Od(e))return r;if(!Kr(e)){let o=zn(e);for(;o&&!_i(o);){if(wr(o)&&!Qp(o))return o;o=zn(o)}return r}let n=s1(e,t);for(;n&&yse(n)&&Qp(n);)n=s1(n,t);return n&&_i(n)&&Qp(n)&&!Zy(n)?r:n||Pse(e)||r}const Lse=async function(e){const t=this.getOffsetParent||WN,r=this.getDimensions,n=await r(e.floating);return{reference:Rse(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function $se(e){return Sr(e).direction==="rtl"}const Vse={convertOffsetParentRelativeRectToViewportRelativeRect:Ase,getDocumentElement:Yr,getClippingRect:jse,getOffsetParent:WN,getElementRects:Lse,getClientRects:Tse,getDimensions:Ise,getScale:Si,isElement:wr,isRTL:$se};function zN(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Fse(e,t){let r=null,n;const o=Yr(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:d,width:f,height:h}=c;if(s||t(),!f||!h)return;const v=Nl(d),m=Nl(o.clientWidth-(u+f)),g=Nl(o.clientHeight-(d+h)),y=Nl(u),w={rootMargin:-v+"px "+-m+"px "+-g+"px "+-y+"px",threshold:Ht(0,Wn(1,l))||1};let S=!0;function P(C){const E=C[0].intersectionRatio;if(E!==l){if(!S)return a();E?a(!1,E):n=setTimeout(()=>{a(!1,1e-7)},1e3)}E===1&&!zN(c,e.getBoundingClientRect())&&a(),S=!1}try{r=new IntersectionObserver(P,{...w,root:o.ownerDocument})}catch{r=new IntersectionObserver(P,w)}r.observe(e)}return a(!0),i}function Bse(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=Jy(e),u=o||i?[...c?qa(c):[],...qa(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",r,{passive:!0}),i&&y.addEventListener("resize",r)});const d=c&&s?Fse(c,r):null;let f=-1,h=null;a&&(h=new ResizeObserver(y=>{let[x]=y;x&&x.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(t)})),r()}),c&&!l&&h.observe(c),h.observe(t));let v,m=l?Lo(e):null;l&&g();function g(){const y=Lo(e);m&&!zN(m,y)&&r(),m=y,v=requestAnimationFrame(g)}return r(),()=>{var y;u.forEach(x=>{o&&x.removeEventListener("scroll",r),i&&x.removeEventListener("resize",r)}),d?.(),(y=h)==null||y.disconnect(),h=null,l&&cancelAnimationFrame(v)}}const Wse=fse,zse=pse,Kse=cse,Use=mse,Hse=use,l1=lse,Gse=hse,Yse=(e,t,r)=>{const n=new Map,o={platform:Vse,...r},i={...o.platform,_c:n};return sse(e,t,{...o,platform:i})};var qse=typeof document<"u",Xse=function(){},ql=qse?O.useLayoutEffect:Xse;function au(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(!au(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)&&!au(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function KN(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function c1(e,t){const r=KN(e);return Math.round(t*r)/r}function Jp(e){const t=p.useRef(e);return ql(()=>{t.current=e}),t}function Zse(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,d]=p.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=p.useState(n);au(f,n)||h(n);const[v,m]=p.useState(null),[g,y]=p.useState(null),x=p.useCallback(j=>{j!==C.current&&(C.current=j,m(j))},[]),w=p.useCallback(j=>{j!==E.current&&(E.current=j,y(j))},[]),S=i||v,P=a||g,C=p.useRef(null),E=p.useRef(null),A=p.useRef(u),T=l!=null,M=Jp(l),_=Jp(o),k=Jp(c),N=p.useCallback(()=>{if(!C.current||!E.current)return;const j={placement:t,strategy:r,middleware:f};_.current&&(j.platform=_.current),Yse(C.current,E.current,j).then(L=>{const H={...L,isPositioned:k.current!==!1};R.current&&!au(A.current,H)&&(A.current=H,as.flushSync(()=>{d(H)}))})},[f,t,r,_,k]);ql(()=>{c===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,d(j=>({...j,isPositioned:!1})))},[c]);const R=p.useRef(!1);ql(()=>(R.current=!0,()=>{R.current=!1}),[]),ql(()=>{if(S&&(C.current=S),P&&(E.current=P),S&&P){if(M.current)return M.current(S,P,N);N()}},[S,P,N,M,T]);const z=p.useMemo(()=>({reference:C,floating:E,setReference:x,setFloating:w}),[x,w]),B=p.useMemo(()=>({reference:S,floating:P}),[S,P]),F=p.useMemo(()=>{const j={position:r,left:0,top:0};if(!B.floating)return j;const L=c1(B.floating,u.x),H=c1(B.floating,u.y);return s?{...j,transform:"translate("+L+"px, "+H+"px)",...KN(B.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:L,top:H}},[r,s,B.floating,u.x,u.y]);return p.useMemo(()=>({...u,update:N,refs:z,elements:B,floatingStyles:F}),[u,N,z,B,F])}const Qse=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?l1({element:n.current,padding:o}).fn(r):{}:n?l1({element:n,padding:o}).fn(r):{}}}},Jse=(e,t)=>({...Wse(e),options:[e,t]}),ele=(e,t)=>({...zse(e),options:[e,t]}),tle=(e,t)=>({...Gse(e),options:[e,t]}),rle=(e,t)=>({...Kse(e),options:[e,t]}),nle=(e,t)=>({...Use(e),options:[e,t]}),ole=(e,t)=>({...Hse(e),options:[e,t]}),ile=(e,t)=>({...Qse(e),options:[e,t]});var ale="Arrow",UN=p.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"})})});UN.displayName=ale;var sle=UN,eb="Popper",[HN,Zn]=it(eb),[lle,GN]=HN(eb),YN=e=>{const{__scopePopper:t,children:r}=e,[n,o]=p.useState(null);return b.jsx(lle,{scope:t,anchor:n,onAnchorChange:o,children:r})};YN.displayName=eb;var qN="PopperAnchor",XN=p.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,i=GN(qN,r),a=p.useRef(null),s=ie(t,a),l=p.useRef(null);return p.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})});XN.displayName=qN;var tb="PopperContent",[cle,ule]=HN(tb),ZN=p.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:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:h="optimized",onPlaced:v,...m}=e,g=GN(tb,r),[y,x]=p.useState(null),w=ie(t,K=>x(K)),[S,P]=p.useState(null),C=$s(S),E=C?.width??0,A=C?.height??0,T=n+(i!=="center"?"-"+i:""),M=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},_=Array.isArray(c)?c:[c],k=_.length>0,N={padding:M,boundary:_.filter(fle),altBoundary:k},{refs:R,floatingStyles:z,placement:B,isPositioned:F,middlewareData:j}=Zse({strategy:"fixed",placement:T,whileElementsMounted:(...K)=>Bse(...K,{animationFrame:h==="always"}),elements:{reference:g.anchor},middleware:[Jse({mainAxis:o+A,alignmentAxis:a}),l&&ele({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?tle():void 0,...N}),l&&rle({...N}),nle({...N,apply:({elements:K,rects:fe,availableWidth:$,availableHeight:G})=>{const{width:W,height:V}=fe.reference,he=K.floating.style;he.setProperty("--radix-popper-available-width",`${$}px`),he.setProperty("--radix-popper-available-height",`${G}px`),he.setProperty("--radix-popper-anchor-width",`${W}px`),he.setProperty("--radix-popper-anchor-height",`${V}px`)}}),S&&ile({element:S,padding:s}),ple({arrowWidth:E,arrowHeight:A}),f&&ole({strategy:"referenceHidden",...N})]}),[L,H]=ej(B),re=Et(v);pt(()=>{F&&re?.()},[F,re]);const le=j.arrow?.x,ae=j.arrow?.y,oe=j.arrow?.centerOffset!==0,[Se,Me]=p.useState();return pt(()=>{y&&Me(window.getComputedStyle(y).zIndex)},[y]),b.jsx("div",{ref:R.setFloating,"data-radix-popper-content-wrapper":"",style:{...z,transform:F?z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Se,"--radix-popper-transform-origin":[j.transformOrigin?.x,j.transformOrigin?.y].join(" "),...j.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:b.jsx(cle,{scope:r,placedSide:L,onArrowChange:P,arrowX:le,arrowY:ae,shouldHideArrow:oe,children:b.jsx(ee.div,{"data-side":L,"data-align":H,...m,ref:w,style:{...m.style,animation:F?void 0:"none"}})})})});ZN.displayName=tb;var QN="PopperArrow",dle={top:"bottom",right:"left",bottom:"top",left:"right"},JN=p.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,i=ule(QN,n),a=dle[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(sle,{...o,ref:r,style:{...o.style,display:"block"}})})});JN.displayName=QN;function fle(e){return e!==null}var ple=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]=ej(r),d={start:"0%",center:"50%",end:"100%"}[u],f=(o.arrow?.x??0)+s/2,h=(o.arrow?.y??0)+l/2;let v="",m="";return c==="bottom"?(v=a?d:`${f}px`,m=`${-l}px`):c==="top"?(v=a?d:`${f}px`,m=`${n.floating.height+l}px`):c==="right"?(v=`${-l}px`,m=a?d:`${h}px`):c==="left"&&(v=`${n.floating.width+l}px`,m=a?d:`${h}px`),{data:{x:v,y:m}}}});function ej(e){const[t,r="center"]=e.split("-");return[t,r]}var Fs=YN,Bs=XN,Td=ZN,Md=JN,eh="rovingFocusGroup.onEntryFocus",hle={bubbles:!1,cancelable:!0},Ws="RovingFocusGroup",[km,tj,mle]=Ri(Ws),[vle,kd]=it(Ws,[mle]),[gle,yle]=vle(Ws),rj=p.forwardRef((e,t)=>b.jsx(km.Provider,{scope:e.__scopeRovingFocusGroup,children:b.jsx(km.Slot,{scope:e.__scopeRovingFocusGroup,children:b.jsx(ble,{...e,ref:t})})}));rj.displayName=Ws;var ble=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...d}=e,f=p.useRef(null),h=ie(t,f),v=Li(i),[m,g]=xt({prop:a,defaultProp:s??null,onChange:l,caller:Ws}),[y,x]=p.useState(!1),w=Et(c),S=tj(r),P=p.useRef(!1),[C,E]=p.useState(0);return p.useEffect(()=>{const A=f.current;if(A)return A.addEventListener(eh,w),()=>A.removeEventListener(eh,w)},[w]),b.jsx(gle,{scope:r,orientation:n,dir:v,loop:o,currentTabStopId:m,onItemFocus:p.useCallback(A=>g(A),[g]),onItemShiftTab:p.useCallback(()=>x(!0),[]),onFocusableItemAdd:p.useCallback(()=>E(A=>A+1),[]),onFocusableItemRemove:p.useCallback(()=>E(A=>A-1),[]),children:b.jsx(ee.div,{tabIndex:y||C===0?-1:0,"data-orientation":n,...d,ref:h,style:{outline:"none",...e.style},onMouseDown:U(e.onMouseDown,()=>{P.current=!0}),onFocus:U(e.onFocus,A=>{const T=!P.current;if(A.target===A.currentTarget&&T&&!y){const M=new CustomEvent(eh,hle);if(A.currentTarget.dispatchEvent(M),!M.defaultPrevented){const _=S().filter(B=>B.focusable),k=_.find(B=>B.active),N=_.find(B=>B.id===m),z=[k,N,..._].filter(Boolean).map(B=>B.ref.current);ij(z,u)}}P.current=!1}),onBlur:U(e.onBlur,()=>x(!1))})})}),nj="RovingFocusGroupItem",oj=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:i,children:a,...s}=e,l=It(),c=i||l,u=yle(nj,r),d=u.currentTabStopId===c,f=tj(r),{onFocusableItemAdd:h,onFocusableItemRemove:v,currentTabStopId:m}=u;return p.useEffect(()=>{if(n)return h(),()=>v()},[n,h,v]),b.jsx(km.ItemSlot,{scope:r,id:c,focusable:n,active:o,children:b.jsx(ee.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:U(e.onMouseDown,g=>{n?u.onItemFocus(c):g.preventDefault()}),onFocus:U(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:U(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){u.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const y=Sle(g,u.orientation,u.dir);if(y!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let w=f().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(g.currentTarget);w=u.loop?Ple(w,S+1):w.slice(S+1)}setTimeout(()=>ij(w))}}),children:typeof a=="function"?a({isCurrentTabStop:d,hasTabStop:m!=null}):a})})});oj.displayName=nj;var xle={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function wle(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Sle(e,t,r){const n=wle(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return xle[n]}function ij(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function Ple(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var aj=rj,sj=oj;function Cle(e){const t=Ole(e),r=p.forwardRef((n,o)=>{const{children:i,...a}=n,s=p.Children.toArray(i),l=s.find(Ale);if(l){const c=l.props.children,u=s.map(d=>d===l?p.Children.count(c)>1?p.Children.only(null):p.isValidElement(c)?c.props.children:null:d);return b.jsx(t,{...a,ref:o,children:p.isValidElement(c)?p.cloneElement(c,void 0,u):null})}return b.jsx(t,{...a,ref:o,children:i})});return r.displayName=`${e}.Slot`,r}function Ole(e){const t=p.forwardRef((r,n)=>{const{children:o,...i}=r;if(p.isValidElement(o)){const a=Mle(o),s=Tle(i,o.props);return o.type!==p.Fragment&&(s.ref=n?Hr(n,a):a),p.cloneElement(o,s)}return p.Children.count(o)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ele=Symbol("radix.slottable");function Ale(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ele}function Tle(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 Mle(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 Dm=["Enter"," "],kle=["ArrowDown","PageUp","Home"],lj=["ArrowUp","PageDown","End"],Dle=[...kle,...lj],_le={ltr:[...Dm,"ArrowRight"],rtl:[...Dm,"ArrowLeft"]},Nle={ltr:["ArrowLeft"],rtl:["ArrowRight"]},zs="Menu",[Xa,jle,Ile]=Ri(zs),[Yo,Dd]=it(zs,[Ile,Zn,kd]),Ks=Zn(),cj=kd(),[uj,Qn]=Yo(zs),[Rle,Us]=Yo(zs),dj=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:o,onOpenChange:i,modal:a=!0}=e,s=Ks(t),[l,c]=p.useState(null),u=p.useRef(!1),d=Et(i),f=Li(o);return p.useEffect(()=>{const h=()=>{u.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>u.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),b.jsx(Fs,{...s,children:b.jsx(uj,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:c,children:b.jsx(Rle,{scope:t,onClose:p.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:a,children:n})})})};dj.displayName=zs;var Lle="MenuAnchor",rb=p.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,o=Ks(r);return b.jsx(Bs,{...o,...n,ref:t})});rb.displayName=Lle;var nb="MenuPortal",[$le,fj]=Yo(nb,{forceMount:void 0}),pj=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:o}=e,i=Qn(nb,t);return b.jsx($le,{scope:t,forceMount:r,children:b.jsx(At,{present:r||i.open,children:b.jsx(Bo,{asChild:!0,container:o,children:n})})})};pj.displayName=nb;var sr="MenuContent",[Vle,ob]=Yo(sr),hj=p.forwardRef((e,t)=>{const r=fj(sr,e.__scopeMenu),{forceMount:n=r.forceMount,...o}=e,i=Qn(sr,e.__scopeMenu),a=Us(sr,e.__scopeMenu);return b.jsx(Xa.Provider,{scope:e.__scopeMenu,children:b.jsx(At,{present:n||i.open,children:b.jsx(Xa.Slot,{scope:e.__scopeMenu,children:a.modal?b.jsx(Fle,{...o,ref:t}):b.jsx(Ble,{...o,ref:t})})})})}),Fle=p.forwardRef((e,t)=>{const r=Qn(sr,e.__scopeMenu),n=p.useRef(null),o=ie(t,n);return p.useEffect(()=>{const i=n.current;if(i)return Ou(i)},[]),b.jsx(ib,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:U(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),Ble=p.forwardRef((e,t)=>{const r=Qn(sr,e.__scopeMenu);return b.jsx(ib,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),Wle=Cle("MenuContent.ScrollLock"),ib=p.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEntryFocus:l,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:h,disableOutsideScroll:v,...m}=e,g=Qn(sr,r),y=Us(sr,r),x=Ks(r),w=cj(r),S=jle(r),[P,C]=p.useState(null),E=p.useRef(null),A=ie(t,E,g.onContentChange),T=p.useRef(0),M=p.useRef(""),_=p.useRef(0),k=p.useRef(null),N=p.useRef("right"),R=p.useRef(0),z=v?ls:p.Fragment,B=v?{as:Wle,allowPinchZoom:!0}:void 0,F=L=>{const H=M.current+L,re=S().filter(K=>!K.disabled),le=document.activeElement,ae=re.find(K=>K.ref.current===le)?.textValue,oe=re.map(K=>K.textValue),Se=ece(oe,H,ae),Me=re.find(K=>K.textValue===Se)?.ref.current;(function K(fe){M.current=fe,window.clearTimeout(T.current),fe!==""&&(T.current=window.setTimeout(()=>K(""),1e3))})(H),Me&&setTimeout(()=>Me.focus())};p.useEffect(()=>()=>window.clearTimeout(T.current),[]),Pu();const j=p.useCallback(L=>N.current===k.current?.side&&rce(L,k.current?.area),[]);return b.jsx(Vle,{scope:r,searchRef:M,onItemEnter:p.useCallback(L=>{j(L)&&L.preventDefault()},[j]),onItemLeave:p.useCallback(L=>{j(L)||(E.current?.focus(),C(null))},[j]),onTriggerLeave:p.useCallback(L=>{j(L)&&L.preventDefault()},[j]),pointerGraceTimerRef:_,onPointerGraceIntentChange:p.useCallback(L=>{k.current=L},[]),children:b.jsx(z,{...B,children:b.jsx(ss,{asChild:!0,trapped:o,onMountAutoFocus:U(i,L=>{L.preventDefault(),E.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:b.jsx(Fo,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:h,children:b.jsx(aj,{asChild:!0,...w,dir:y.dir,orientation:"vertical",loop:n,currentTabStopId:P,onCurrentTabStopIdChange:C,onEntryFocus:U(l,L=>{y.isUsingKeyboardRef.current||L.preventDefault()}),preventScrollOnEntryFocus:!0,children:b.jsx(Td,{role:"menu","aria-orientation":"vertical","data-state":Dj(g.open),"data-radix-menu-content":"",dir:y.dir,...x,...m,ref:A,style:{outline:"none",...m.style},onKeyDown:U(m.onKeyDown,L=>{const re=L.target.closest("[data-radix-menu-content]")===L.currentTarget,le=L.ctrlKey||L.altKey||L.metaKey,ae=L.key.length===1;re&&(L.key==="Tab"&&L.preventDefault(),!le&&ae&&F(L.key));const oe=E.current;if(L.target!==oe||!Dle.includes(L.key))return;L.preventDefault();const Me=S().filter(K=>!K.disabled).map(K=>K.ref.current);lj.includes(L.key)&&Me.reverse(),Qle(Me)}),onBlur:U(e.onBlur,L=>{L.currentTarget.contains(L.target)||(window.clearTimeout(T.current),M.current="")}),onPointerMove:U(e.onPointerMove,Za(L=>{const H=L.target,re=R.current!==L.clientX;if(L.currentTarget.contains(H)&&re){const le=L.clientX>R.current?"right":"left";N.current=le,R.current=L.clientX}}))})})})})})})});hj.displayName=sr;var zle="MenuGroup",ab=p.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return b.jsx(ee.div,{role:"group",...n,ref:t})});ab.displayName=zle;var Kle="MenuLabel",mj=p.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return b.jsx(ee.div,{...n,ref:t})});mj.displayName=Kle;var su="MenuItem",u1="menu.itemSelect",_d=p.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...o}=e,i=p.useRef(null),a=Us(su,e.__scopeMenu),s=ob(su,e.__scopeMenu),l=ie(t,i),c=p.useRef(!1),u=()=>{const d=i.current;if(!r&&d){const f=new CustomEvent(u1,{bubbles:!0,cancelable:!0});d.addEventListener(u1,h=>n?.(h),{once:!0}),vv(d,f),f.defaultPrevented?c.current=!1:a.onClose()}};return b.jsx(vj,{...o,ref:l,disabled:r,onClick:U(e.onClick,u),onPointerDown:d=>{e.onPointerDown?.(d),c.current=!0},onPointerUp:U(e.onPointerUp,d=>{c.current||d.currentTarget?.click()}),onKeyDown:U(e.onKeyDown,d=>{const f=s.searchRef.current!=="";r||f&&d.key===" "||Dm.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});_d.displayName=su;var vj=p.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:o,...i}=e,a=ob(su,r),s=cj(r),l=p.useRef(null),c=ie(t,l),[u,d]=p.useState(!1),[f,h]=p.useState("");return p.useEffect(()=>{const v=l.current;v&&h((v.textContent??"").trim())},[i.children]),b.jsx(Xa.ItemSlot,{scope:r,disabled:n,textValue:o??f,children:b.jsx(sj,{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,Za(v=>{n?a.onItemLeave(v):(a.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:U(e.onPointerLeave,Za(v=>a.onItemLeave(v))),onFocus:U(e.onFocus,()=>d(!0)),onBlur:U(e.onBlur,()=>d(!1))})})})}),Ule="MenuCheckboxItem",gj=p.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...o}=e;return b.jsx(Sj,{scope:e.__scopeMenu,checked:r,children:b.jsx(_d,{role:"menuitemcheckbox","aria-checked":lu(r)?"mixed":r,...o,ref:t,"data-state":cb(r),onSelect:U(o.onSelect,()=>n?.(lu(r)?!0:!r),{checkForDefaultPrevented:!1})})})});gj.displayName=Ule;var yj="MenuRadioGroup",[Hle,Gle]=Yo(yj,{value:void 0,onValueChange:()=>{}}),bj=p.forwardRef((e,t)=>{const{value:r,onValueChange:n,...o}=e,i=Et(n);return b.jsx(Hle,{scope:e.__scopeMenu,value:r,onValueChange:i,children:b.jsx(ab,{...o,ref:t})})});bj.displayName=yj;var xj="MenuRadioItem",wj=p.forwardRef((e,t)=>{const{value:r,...n}=e,o=Gle(xj,e.__scopeMenu),i=r===o.value;return b.jsx(Sj,{scope:e.__scopeMenu,checked:i,children:b.jsx(_d,{role:"menuitemradio","aria-checked":i,...n,ref:t,"data-state":cb(i),onSelect:U(n.onSelect,()=>o.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});wj.displayName=xj;var sb="MenuItemIndicator",[Sj,Yle]=Yo(sb,{checked:!1}),Pj=p.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...o}=e,i=Yle(sb,r);return b.jsx(At,{present:n||lu(i.checked)||i.checked===!0,children:b.jsx(ee.span,{...o,ref:t,"data-state":cb(i.checked)})})});Pj.displayName=sb;var qle="MenuSeparator",Cj=p.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return b.jsx(ee.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});Cj.displayName=qle;var Xle="MenuArrow",Oj=p.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,o=Ks(r);return b.jsx(Md,{...o,...n,ref:t})});Oj.displayName=Xle;var lb="MenuSub",[Zle,Ej]=Yo(lb),Aj=e=>{const{__scopeMenu:t,children:r,open:n=!1,onOpenChange:o}=e,i=Qn(lb,t),a=Ks(t),[s,l]=p.useState(null),[c,u]=p.useState(null),d=Et(o);return p.useEffect(()=>(i.open===!1&&d(!1),()=>d(!1)),[i.open,d]),b.jsx(Fs,{...a,children:b.jsx(uj,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:u,children:b.jsx(Zle,{scope:t,contentId:It(),triggerId:It(),trigger:s,onTriggerChange:l,children:r})})})};Aj.displayName=lb;var Ca="MenuSubTrigger",Tj=p.forwardRef((e,t)=>{const r=Qn(Ca,e.__scopeMenu),n=Us(Ca,e.__scopeMenu),o=Ej(Ca,e.__scopeMenu),i=ob(Ca,e.__scopeMenu),a=p.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:l}=i,c={__scopeMenu:e.__scopeMenu},u=p.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return p.useEffect(()=>u,[u]),p.useEffect(()=>{const d=s.current;return()=>{window.clearTimeout(d),l(null)}},[s,l]),b.jsx(rb,{asChild:!0,...c,children:b.jsx(vj,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":o.contentId,"data-state":Dj(r.open),...e,ref:Hr(t,o.onTriggerChange),onClick:d=>{e.onClick?.(d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:U(e.onPointerMove,Za(d=>{i.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!r.open&&!a.current&&(i.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{r.onOpenChange(!0),u()},100))})),onPointerLeave:U(e.onPointerLeave,Za(d=>{u();const f=r.content?.getBoundingClientRect();if(f){const h=r.content?.dataset.side,v=h==="right",m=v?-5:5,g=f[v?"left":"right"],y=f[v?"right":"left"];i.onPointerGraceIntentChange({area:[{x:d.clientX+m,y:d.clientY},{x:g,y:f.top},{x:y,y:f.top},{x:y,y:f.bottom},{x:g,y:f.bottom}],side:h}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(d),d.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:U(e.onKeyDown,d=>{const f=i.searchRef.current!=="";e.disabled||f&&d.key===" "||_le[n.dir].includes(d.key)&&(r.onOpenChange(!0),r.content?.focus(),d.preventDefault())})})})});Tj.displayName=Ca;var Mj="MenuSubContent",kj=p.forwardRef((e,t)=>{const r=fj(sr,e.__scopeMenu),{forceMount:n=r.forceMount,...o}=e,i=Qn(sr,e.__scopeMenu),a=Us(sr,e.__scopeMenu),s=Ej(Mj,e.__scopeMenu),l=p.useRef(null),c=ie(t,l);return b.jsx(Xa.Provider,{scope:e.__scopeMenu,children:b.jsx(At,{present:n||i.open,children:b.jsx(Xa.Slot,{scope:e.__scopeMenu,children:b.jsx(ib,{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 d=u.currentTarget.contains(u.target),f=Nle[a.dir].includes(u.key);d&&f&&(i.onOpenChange(!1),s.trigger?.focus(),u.preventDefault())})})})})})});kj.displayName=Mj;function Dj(e){return e?"open":"closed"}function lu(e){return e==="indeterminate"}function cb(e){return lu(e)?"indeterminate":e?"checked":"unchecked"}function Qle(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function Jle(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function ece(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=Jle(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 tce(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,d=l.x,f=l.y;u>n!=f>n&&r<(d-c)*(n-u)/(f-u)+c&&(o=!o)}return o}function rce(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return tce(r,t)}function Za(e){return t=>t.pointerType==="mouse"?e(t):void 0}var _j=dj,Nj=rb,jj=pj,Ij=hj,Rj=ab,Lj=mj,$j=_d,Vj=gj,Fj=bj,Bj=wj,Wj=Pj,zj=Cj,Kj=Oj,Uj=Aj,Hj=Tj,Gj=kj,ub="ContextMenu",[nce]=it(ub,[Dd]),Mt=Dd(),[oce,Yj]=nce(ub),qj=e=>{const{__scopeContextMenu:t,children:r,onOpenChange:n,dir:o,modal:i=!0}=e,[a,s]=p.useState(!1),l=Mt(t),c=Et(n),u=p.useCallback(d=>{s(d),c(d)},[c]);return b.jsx(oce,{scope:t,open:a,onOpenChange:u,modal:i,children:b.jsx(_j,{...l,dir:o,open:a,onOpenChange:u,modal:i,children:r})})};qj.displayName=ub;var Xj="ContextMenuTrigger",Zj=p.forwardRef((e,t)=>{const{__scopeContextMenu:r,disabled:n=!1,...o}=e,i=Yj(Xj,r),a=Mt(r),s=p.useRef({x:0,y:0}),l=p.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...s.current})}),c=p.useRef(0),u=p.useCallback(()=>window.clearTimeout(c.current),[]),d=f=>{s.current={x:f.clientX,y:f.clientY},i.onOpenChange(!0)};return p.useEffect(()=>u,[u]),p.useEffect(()=>{n&&u()},[n,u]),b.jsxs(b.Fragment,{children:[b.jsx(Nj,{...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,f=>{u(),d(f),f.preventDefault()}),onPointerDown:n?e.onPointerDown:U(e.onPointerDown,jl(f=>{u(),c.current=window.setTimeout(()=>d(f),700)})),onPointerMove:n?e.onPointerMove:U(e.onPointerMove,jl(u)),onPointerCancel:n?e.onPointerCancel:U(e.onPointerCancel,jl(u)),onPointerUp:n?e.onPointerUp:U(e.onPointerUp,jl(u))})]})});Zj.displayName=Xj;var ice="ContextMenuPortal",Qj=e=>{const{__scopeContextMenu:t,...r}=e,n=Mt(t);return b.jsx(jj,{...n,...r})};Qj.displayName=ice;var Jj="ContextMenuContent",eI=p.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,o=Yj(Jj,r),i=Mt(r),a=p.useRef(!1);return b.jsx(Ij,{...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)"}})});eI.displayName=Jj;var ace="ContextMenuGroup",tI=p.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,o=Mt(r);return b.jsx(Rj,{...o,...n,ref:t})});tI.displayName=ace;var sce="ContextMenuLabel",rI=p.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,o=Mt(r);return b.jsx(Lj,{...o,...n,ref:t})});rI.displayName=sce;var lce="ContextMenuItem",nI=p.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,o=Mt(r);return b.jsx($j,{...o,...n,ref:t})});nI.displayName=lce;var cce="ContextMenuCheckboxItem",oI=p.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,o=Mt(r);return b.jsx(Vj,{...o,...n,ref:t})});oI.displayName=cce;var uce="ContextMenuRadioGroup",iI=p.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,o=Mt(r);return b.jsx(Fj,{...o,...n,ref:t})});iI.displayName=uce;var dce="ContextMenuRadioItem",aI=p.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,o=Mt(r);return b.jsx(Bj,{...o,...n,ref:t})});aI.displayName=dce;var fce="ContextMenuItemIndicator",sI=p.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,o=Mt(r);return b.jsx(Wj,{...o,...n,ref:t})});sI.displayName=fce;var pce="ContextMenuSeparator",lI=p.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,o=Mt(r);return b.jsx(zj,{...o,...n,ref:t})});lI.displayName=pce;var hce="ContextMenuArrow",mce=p.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,o=Mt(r);return b.jsx(Kj,{...o,...n,ref:t})});mce.displayName=hce;var cI="ContextMenuSub",uI=e=>{const{__scopeContextMenu:t,children:r,onOpenChange:n,open:o,defaultOpen:i}=e,a=Mt(t),[s,l]=xt({prop:o,defaultProp:i??!1,onChange:n,caller:cI});return b.jsx(Uj,{...a,open:s,onOpenChange:l,children:r})};uI.displayName=cI;var vce="ContextMenuSubTrigger",dI=p.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,o=Mt(r);return b.jsx(Hj,{...o,...n,ref:t})});dI.displayName=vce;var gce="ContextMenuSubContent",fI=p.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,o=Mt(r);return b.jsx(Gj,{...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)"}})});fI.displayName=gce;function jl(e){return t=>t.pointerType!=="mouse"?e(t):void 0}var yce=qj,bce=Zj,xce=Qj,wce=eI,Sce=tI,Pce=rI,Cce=nI,Oce=oI,Ece=iI,Ace=aI,pI=sI,Tce=lI,Mce=uI,kce=dI,Dce=fI;const _ce=yce,Nce=bce,jce=Sce,hI=xce,Ice=Mce,Rce=Ece,mI=p.forwardRef(({className:e,inset:t,children:r,...n},o)=>b.jsxs(kce,{ref:o,className:D("text-body-sm 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"})})]}));mI.displayName="ContextMenuSubTrigger";const vI=p.forwardRef(({className:e,...t},r)=>b.jsx(Dce,{ref:r,className:D("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}));vI.displayName="ContextMenuSubContent";const gI=p.forwardRef(({className:e,...t},r)=>b.jsx(hI,{children:b.jsx(wce,{ref:r,className:D("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})}));gI.displayName="ContextMenuContent";const yI=p.forwardRef(({className:e,inset:t,...r},n)=>b.jsx(Cce,{ref:n,className:D("text-body-sm 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}));yI.displayName="ContextMenuItem";const bI=p.forwardRef(({className:e,children:t,checked:r,...n},o)=>b.jsxs(Oce,{ref:o,className:D("text-body-sm 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(pI,{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]}));bI.displayName="ContextMenuCheckboxItem";const xI=p.forwardRef(({className:e,children:t,...r},n)=>b.jsxs(Ace,{ref:n,className:D("text-body-sm 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(pI,{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]}));xI.displayName="ContextMenuRadioItem";const wI=p.forwardRef(({className:e,inset:t,...r},n)=>b.jsx(Pce,{ref:n,className:D("text-small text-primary px-2 py-1.5",t&&"pl-8",e),...r}));wI.displayName="ContextMenuLabel";const SI=p.forwardRef(({className:e,...t},r)=>b.jsx(Tce,{ref:r,className:D("bg-border -mx-1 my-1 h-px",e),...t}));SI.displayName="ContextMenuSeparator";const PI=p.forwardRef(({className:e,...t},r)=>b.jsx("span",{ref:r,className:D("text-small text-tertiary ml-auto tracking-widest",e),...t}));PI.displayName="ContextMenuShortcut";function Lce(e){const t=$ce(e),r=p.forwardRef((n,o)=>{const{children:i,...a}=n,s=p.Children.toArray(i),l=s.find(Fce);if(l){const c=l.props.children,u=s.map(d=>d===l?p.Children.count(c)>1?p.Children.only(null):p.isValidElement(c)?c.props.children:null:d);return b.jsx(t,{...a,ref:o,children:p.isValidElement(c)?p.cloneElement(c,void 0,u):null})}return b.jsx(t,{...a,ref:o,children:i})});return r.displayName=`${e}.Slot`,r}function $ce(e){const t=p.forwardRef((r,n)=>{const{children:o,...i}=r;if(p.isValidElement(o)){const a=Wce(o),s=Bce(i,o.props);return o.type!==p.Fragment&&(s.ref=n?Hr(n,a):a),p.cloneElement(o,s)}return p.Children.count(o)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Vce=Symbol("radix.slottable");function Fce(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Vce}function Bce(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 Wce(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 Nd="Popover",[CI]=it(Nd,[Zn]),Hs=Zn(),[zce,Jn]=CI(Nd),OI=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:i,modal:a=!1}=e,s=Hs(t),l=p.useRef(null),[c,u]=p.useState(!1),[d,f]=xt({prop:n,defaultProp:o??!1,onChange:i,caller:Nd});return b.jsx(Fs,{...s,children:b.jsx(zce,{scope:t,contentId:It(),triggerRef:l,open:d,onOpenChange:f,onOpenToggle:p.useCallback(()=>f(h=>!h),[f]),hasCustomAnchor:c,onCustomAnchorAdd:p.useCallback(()=>u(!0),[]),onCustomAnchorRemove:p.useCallback(()=>u(!1),[]),modal:a,children:r})})};OI.displayName=Nd;var EI="PopoverAnchor",Kce=p.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=Jn(EI,r),i=Hs(r),{onCustomAnchorAdd:a,onCustomAnchorRemove:s}=o;return p.useEffect(()=>(a(),()=>s()),[a,s]),b.jsx(Bs,{...i,...n,ref:t})});Kce.displayName=EI;var AI="PopoverTrigger",TI=p.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=Jn(AI,r),i=Hs(r),a=ie(t,o.triggerRef),s=b.jsx(ee.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":NI(o.open),...n,ref:a,onClick:U(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?s:b.jsx(Bs,{asChild:!0,...i,children:s})});TI.displayName=AI;var db="PopoverPortal",[Uce,Hce]=CI(db,{forceMount:void 0}),MI=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,i=Jn(db,t);return b.jsx(Uce,{scope:t,forceMount:r,children:b.jsx(At,{present:r||i.open,children:b.jsx(Bo,{asChild:!0,container:o,children:n})})})};MI.displayName=db;var Ni="PopoverContent",kI=p.forwardRef((e,t)=>{const r=Hce(Ni,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,i=Jn(Ni,e.__scopePopover);return b.jsx(At,{present:n||i.open,children:i.modal?b.jsx(Yce,{...o,ref:t}):b.jsx(qce,{...o,ref:t})})});kI.displayName=Ni;var Gce=Lce("PopoverContent.RemoveScroll"),Yce=p.forwardRef((e,t)=>{const r=Jn(Ni,e.__scopePopover),n=p.useRef(null),o=ie(t,n),i=p.useRef(!1);return p.useEffect(()=>{const a=n.current;if(a)return Ou(a)},[]),b.jsx(ls,{as:Gce,allowPinchZoom:!0,children:b.jsx(DI,{...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})})})}),qce=p.forwardRef((e,t)=>{const r=Jn(Ni,e.__scopePopover),n=p.useRef(!1),o=p.useRef(!1);return b.jsx(DI,{...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()}})}),DI=p.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,...d}=e,f=Jn(Ni,r),h=Hs(r);return Pu(),b.jsx(ss,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i,children:b.jsx(Fo,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>f.onOpenChange(!1),children:b.jsx(Td,{"data-state":NI(f.open),role:"dialog",id:f.contentId,...h,...d,ref:t,style:{...d.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)"}})})})}),_I="PopoverClose",Xce=p.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=Jn(_I,r);return b.jsx(ee.button,{type:"button",...n,ref:t,onClick:U(e.onClick,()=>o.onOpenChange(!1))})});Xce.displayName=_I;var Zce="PopoverArrow",Qce=p.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=Hs(r);return b.jsx(Md,{...o,...n,ref:t})});Qce.displayName=Zce;function NI(e){return e?"open":"closed"}var jd=OI,Id=TI,Rd=MI,Ld=kI;function d1(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 jI=te(["bg-card text-body-sm text-primary placeholder:text-tertiary","flex h-8 w-full items-center justify-between rounded-md border px-3 py-1","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"}}),II=p.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":d,"aria-describedby":f},h)=>{const[v,m]=p.useState(!1),[g,y]=p.useState(e||new Date),x=p.useMemo(()=>{const P=[];return o&&P.push({before:o}),i&&P.push({after:i}),P.length>0?P:void 0},[o,i]),w=P=>{t?.(P??null),P&&m(!1)},S=()=>{t?.(new Date),m(!1)};return p.useEffect(()=>{e&&y(e)},[e]),b.jsxs(jd,{open:v,onOpenChange:m,children:[b.jsx(Id,{asChild:!0,children:b.jsxs("button",{ref:h,id:c,type:"button",disabled:a,className:D(jI({variant:s}),l),"aria-label":d||"Choose date","aria-describedby":f,"aria-haspopup":"dialog","aria-expanded":v,children:[b.jsx("span",{className:D("truncate",!e&&"text-tertiary"),children:e?d1(e,n):r}),b.jsx(Pv,{className:"text-tertiary h-4 w-4 shrink-0"}),u&&b.jsx("input",{type:"hidden",name:u,value:e?d1(e,"yyyy-MM-dd"):""})]})}),b.jsx(Rd,{children:b.jsxs(Ld,{className:D("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.jsx(Rs,{mode:"single",selected:e??void 0,onSelect:w,month:g,onMonthChange:y,disabled:x}),b.jsx("div",{className:"border-border mt-4 border-t pt-4",children:b.jsx("button",{type:"button",onClick:S,className:D("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"})})]})})]})});II.displayName="DatePicker";function cu(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)}function Jce(e,t){if(!e?.from)return"";const r=cu(e.from,t);if(!e.to)return`${r} – ...`;const n=cu(e.to,t);return`${r} – ${n}`}const RI=te(["bg-card text-body-sm text-primary placeholder:text-tertiary","flex h-8 w-full items-center justify-between rounded-md border px-3 py-1","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"}}),LI=p.forwardRef(({value:e,onChange:t,placeholder:r="Select date range",format:n="MM/dd/yyyy",minDate:o,maxDate:i,disabled:a=!1,numberOfMonths:s=2,variant:l,className:c,id:u,name:d,"aria-label":f,"aria-describedby":h},v)=>{const[m,g]=p.useState(!1),[y,x]=p.useState(e?.from||new Date),w=p.useMemo(()=>{const E=[];return o&&E.push({before:o}),i&&E.push({after:i}),E.length>0?E:void 0},[o,i]),S=E=>{t?.(E)},P=()=>{const E=new Date;t?.({from:E,to:E})},C=()=>{t?.(void 0)};return p.useEffect(()=>{e?.from&&x(e.from)},[e?.from]),b.jsxs(jd,{open:m,onOpenChange:g,children:[b.jsx(Id,{asChild:!0,children:b.jsxs("button",{ref:v,id:u,type:"button",disabled:a,className:D(RI({variant:l}),c),"aria-label":f||"Choose date range","aria-describedby":h,"aria-haspopup":"dialog","aria-expanded":m,children:[b.jsx("span",{className:D("truncate",!e?.from&&"text-tertiary"),children:e?.from?Jce(e,n):r}),b.jsx(Pv,{className:"text-tertiary h-4 w-4 shrink-0"}),d&&b.jsx("input",{type:"hidden",name:d,value:e?.from?`${cu(e.from,"yyyy-MM-dd")}/${cu(e.to,"yyyy-MM-dd")}`:""})]})}),b.jsx(Rd,{children:b.jsxs(Ld,{className:D("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.jsx(Rs,{mode:"range",selected:e,onSelect:S,month:y,onMonthChange:x,numberOfMonths:s,disabled:w}),b.jsxs("div",{className:"border-border mt-4 flex items-center justify-between border-t pt-4",children:[b.jsx("button",{type:"button",onClick:C,className:D("text-tertiary hover:text-secondary text-sm","transition-colors focus-visible:underline focus-visible:outline-none"),children:"Clear"}),b.jsx("button",{type:"button",onClick:P,className:D("text-sunflower hover:text-sunflower-hover text-sm font-medium","transition-colors focus-visible:underline focus-visible:outline-none"),children:"Today"})]})]})})]})});LI.displayName="DateRangePicker";function eue(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 f1(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 $I=te(["bg-card text-body-sm text-primary placeholder:text-tertiary","flex h-8 w-full items-center justify-between rounded-md border px-3 py-1","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"}}),VI=p.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:d=!0,minuteStep:f=1,"aria-label":h,"aria-describedby":v},m)=>{const[g,y]=p.useState(!1),[x,w]=p.useState(e||new Date),[S,P]=p.useState(()=>e?`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`:"12:00"),C=p.useMemo(()=>{const M=[];return o&&M.push({before:o}),i&&M.push({after:i}),M.length>0?M:void 0},[o,i]),E=M=>{if(!M)return;const{hours:_,minutes:k}=f1(S),N=new Date(M.getFullYear(),M.getMonth(),M.getDate(),_,k);t?.(N)},A=M=>{const _=M.target.value;if(P(_),e){const{hours:k,minutes:N}=f1(_),R=new Date(e);R.setHours(k,N),t?.(R)}},T=()=>{const M=new Date;P(`${String(M.getHours()).padStart(2,"0")}:${String(M.getMinutes()).padStart(2,"0")}`),t?.(M),y(!1)};return p.useEffect(()=>{e&&(w(e),P(`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`))},[e]),b.jsxs(jd,{open:g,onOpenChange:y,children:[b.jsx(Id,{asChild:!0,children:b.jsxs("button",{ref:m,id:c,type:"button",disabled:a,className:D($I({variant:s}),l),"aria-label":h||"Choose date and time","aria-describedby":v,"aria-haspopup":"dialog","aria-expanded":g,children:[b.jsx("span",{className:D("truncate",!e&&"text-tertiary"),children:e?eue(e,n,d):r}),b.jsxs("div",{className:"flex items-center gap-1",children:[b.jsx(gW,{className:"text-tertiary h-4 w-4 shrink-0"}),b.jsx(Pv,{className:"text-tertiary h-4 w-4 shrink-0"})]}),u&&b.jsx("input",{type:"hidden",name:u,value:e?e.toISOString():""})]})}),b.jsx(Rd,{children:b.jsxs(Ld,{className:D("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.jsx(Rs,{mode:"single",selected:e??void 0,onSelect:E,month:x,onMonthChange:w,disabled:C}),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:S,onChange:A,step:f*60,className:D("bg-card text-body-sm text-primary placeholder:text-body-sm 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:T,className:D("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"})})]})})]})});VI.displayName="DateTimePicker";const FI=te("bg-border shrink-0",{variants:{orientation:{horizontal:"h-px w-full",vertical:"h-full w-px"}},defaultVariants:{orientation:"horizontal"}}),BI=p.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:D(FI({orientation:i,className:e})),...n})});BI.displayName="Divider";var $d="DropdownMenu",[tue]=it($d,[Dd]),kt=Dd(),[rue,WI]=tue($d),zI=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:o,defaultOpen:i,onOpenChange:a,modal:s=!0}=e,l=kt(t),c=p.useRef(null),[u,d]=xt({prop:o,defaultProp:i??!1,onChange:a,caller:$d});return b.jsx(rue,{scope:t,triggerId:It(),triggerRef:c,contentId:It(),open:u,onOpenChange:d,onOpenToggle:p.useCallback(()=>d(f=>!f),[d]),modal:s,children:b.jsx(_j,{...l,open:u,onOpenChange:d,dir:n,modal:s,children:r})})};zI.displayName=$d;var KI="DropdownMenuTrigger",UI=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...o}=e,i=WI(KI,r),a=kt(r);return b.jsx(Nj,{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:Hr(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())})})})});UI.displayName=KI;var nue="DropdownMenuPortal",HI=e=>{const{__scopeDropdownMenu:t,...r}=e,n=kt(t);return b.jsx(jj,{...n,...r})};HI.displayName=nue;var GI="DropdownMenuContent",YI=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=WI(GI,r),i=kt(r),a=p.useRef(!1);return b.jsx(Ij,{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)"}})});YI.displayName=GI;var oue="DropdownMenuGroup",qI=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=kt(r);return b.jsx(Rj,{...o,...n,ref:t})});qI.displayName=oue;var iue="DropdownMenuLabel",XI=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=kt(r);return b.jsx(Lj,{...o,...n,ref:t})});XI.displayName=iue;var aue="DropdownMenuItem",ZI=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=kt(r);return b.jsx($j,{...o,...n,ref:t})});ZI.displayName=aue;var sue="DropdownMenuCheckboxItem",QI=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=kt(r);return b.jsx(Vj,{...o,...n,ref:t})});QI.displayName=sue;var lue="DropdownMenuRadioGroup",JI=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=kt(r);return b.jsx(Fj,{...o,...n,ref:t})});JI.displayName=lue;var cue="DropdownMenuRadioItem",eR=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=kt(r);return b.jsx(Bj,{...o,...n,ref:t})});eR.displayName=cue;var uue="DropdownMenuItemIndicator",tR=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=kt(r);return b.jsx(Wj,{...o,...n,ref:t})});tR.displayName=uue;var due="DropdownMenuSeparator",rR=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=kt(r);return b.jsx(zj,{...o,...n,ref:t})});rR.displayName=due;var fue="DropdownMenuArrow",pue=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=kt(r);return b.jsx(Kj,{...o,...n,ref:t})});pue.displayName=fue;var hue=e=>{const{__scopeDropdownMenu:t,children:r,open:n,onOpenChange:o,defaultOpen:i}=e,a=kt(t),[s,l]=xt({prop:n,defaultProp:i??!1,onChange:o,caller:"DropdownMenuSub"});return b.jsx(Uj,{...a,open:s,onOpenChange:l,children:r})},mue="DropdownMenuSubTrigger",nR=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=kt(r);return b.jsx(Hj,{...o,...n,ref:t})});nR.displayName=mue;var vue="DropdownMenuSubContent",oR=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=kt(r);return b.jsx(Gj,{...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)"}})});oR.displayName=vue;var gue=zI,iR=UI,yue=HI,bue=YI,xue=qI,wue=XI,Sue=ZI,Pue=QI,Cue=JI,Oue=eR,aR=tR,Eue=rR,Aue=hue,Tue=nR,Mue=oR;const kue=gue,Due=iR,_ue=xue,sR=yue,Nue=Aue,jue=Cue,lR=p.forwardRef(({className:e,inset:t,children:r,...n},o)=>b.jsxs(Tue,{ref:o,className:D("text-body-sm 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"})})]}));lR.displayName="DropdownMenuSubTrigger";const cR=p.forwardRef(({className:e,...t},r)=>b.jsx(Mue,{ref:r,className:D("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}));cR.displayName="DropdownMenuSubContent";const uR=p.forwardRef(({className:e,sideOffset:t=4,...r},n)=>b.jsx(sR,{children:b.jsx(bue,{ref:n,sideOffset:t,className:D("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})}));uR.displayName="DropdownMenuContent";const dR=p.forwardRef(({className:e,inset:t,...r},n)=>b.jsx(Sue,{ref:n,className:D("text-body-sm 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}));dR.displayName="DropdownMenuItem";const fR=p.forwardRef(({className:e,children:t,checked:r,...n},o)=>b.jsxs(Pue,{ref:o,className:D("text-body-sm 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(aR,{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]}));fR.displayName="DropdownMenuCheckboxItem";const pR=p.forwardRef(({className:e,children:t,...r},n)=>b.jsxs(Oue,{ref:n,className:D("text-body-sm 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(aR,{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]}));pR.displayName="DropdownMenuRadioItem";const hR=p.forwardRef(({className:e,inset:t,...r},n)=>b.jsx(wue,{ref:n,className:D("text-small text-primary px-2 py-1.5",t&&"pl-8",e),...r}));hR.displayName="DropdownMenuLabel";const mR=p.forwardRef(({className:e,...t},r)=>b.jsx(Eue,{ref:r,className:D("bg-border -mx-1 my-1 h-px",e),...t}));mR.displayName="DropdownMenuSeparator";const vR=p.forwardRef(({className:e,...t},r)=>b.jsx("span",{ref:r,className:D("text-small text-tertiary ml-auto tracking-widest",e),...t}));vR.displayName="DropdownMenuShortcut";const gR=p.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(iR,{ref:n,className:D("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(nE,{className:o[t]}),b.jsx("span",{className:"sr-only",children:"Open menu"})]})});gR.displayName="ActionsMenuButton";const yR=te("inline-block",{variants:{size:{xs:"h-3",sm:"h-4",md:"h-5",lg:"h-6",xl:"h-8"}},defaultVariants:{size:"md"}});function Iue(e){if(!e)return"";if(e===!0)return"hidden";const t=[];return e.base===!0&&t.push("hidden"),e.sm===!1&&t.push("sm:block"),e.sm===!0&&t.push("sm:hidden"),e.md===!1&&t.push("md:block"),e.md===!0&&t.push("md:hidden"),e.lg===!1&&t.push("lg:block"),e.lg===!0&&t.push("lg:hidden"),e.xl===!1&&t.push("xl:block"),e.xl===!0&&t.push("xl:hidden"),e["2xl"]===!1&&t.push("2xl:block"),e["2xl"]===!0&&t.push("2xl:hidden"),t.join(" ")}const bR=p.forwardRef(({className:e,size:t,compact:r,...n},o)=>{const i=Iue(r),a=r!==!0;return b.jsx("svg",{ref:o,viewBox:"0 0 179.96 38.58",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:D(yR({size:t,className:e})),"aria-label":"Engrate",role:"img",...n,children:b.jsx("g",{id:"engrate-logo",children:b.jsxs("g",{children:[a&&b.jsxs("g",{className:i,children:[b.jsx("path",{fill:"var(--color-primary)",d:"M57.65,27.3c3.61,0,4.09-.62,4.14-3.96.09-5.72.18-11.88.18-18.22,0-3.34-.53-3.96-3.87-3.96V.27h21.21l.92,5.02h-.7c-2.02-2.51-3.26-3.96-7.39-3.96h-3.79c-2.2,0-2.6.22-2.6,1.76v9.59h4.53c3.78,0,4.14-.57,4.8-3.83h.97v9.59h-.97c-.48-3.43-1.23-4.27-4.4-4.27h-4.93v11.09c0,1.5.66,1.85,2.82,1.85h5.81c4.18,0,5.02-.79,7.83-5.5h.84c-.44,1.14-1.14,4.89-1.5,6.56h-23.9v-.88Z"}),b.jsx("path",{fill:"var(--color-primary)",d:"M84.6,27.47c2.38,0,2.9-.62,2.9-3.96v-8.23c0-1.01-.22-1.19-1.06-1.72-.35-.22-.53-.31-.53-.57,0-.35.26-.48.75-.75,1.5-.92,2.68-1.67,3.26-1.67.22,0,.48.13.48.53v1.8c1.19-.79,2.99-2.07,5.85-2.07,2.6,0,6.03.97,6.03,6.12v6.56c0,3.34.53,3.96,2.6,3.96v.7h-8.27v-.7c2.07,0,2.6-.62,2.6-3.96v-5.81c0-3.57-1.54-5.37-4.58-5.37-1.8,0-3.34,1.36-4.05,2.2v8.98c0,3.34.53,3.96,2.68,3.96v.7h-8.67v-.7Z"}),b.jsx("path",{fill:"var(--color-primary)",d:"M113.68,23.49c-.97,0-1.5-.09-1.98-.22-1.14.79-2.6,1.36-2.6,2.38,0,1.23,1.36,1.5,9.07,1.85,3.17.13,4.49,1.5,4.49,3.83,0,5.72-5.59,7.26-10.52,7.26-3.35,0-7.7-.79-7.7-3.7,0-2.07,1.5-3.12,5.02-4.88-1.8-.88-3.04-2.38-3.04-3.65,0-1.41,2.11-2.07,4.09-3.56-2.46-1.06-4.09-2.95-4.09-5.77,0-3.83,2.86-6.16,6.91-6.16,2.77,0,5.15,1.06,5.99,1.06.92,0,2.2-.53,3.43-.53,1.01,0,1.5.26,1.5.92,0,.75-.53,1.19-1.41,1.19s-1.36-.53-2.07-.53c-.62,0-.97.35-.97.92,0,1.19.57,1.41.57,3.48,0,3.61-3.34,6.12-6.69,6.12M113.5,37.7c3.57,0,6.95-1.58,6.95-4.8,0-1.85-1.54-2.6-9.33-2.6-1.72.66-3.61,1.98-3.61,4.05,0,2.2,2.73,3.34,5.99,3.34M113.02,11.74c-2.33,0-3.78,2.07-3.78,5.06,0,3.26,1.54,5.81,4.53,5.81,2.33,0,3.78-1.5,3.78-4.31,0-3.7-1.54-6.56-4.53-6.56"}),b.jsx("path",{fill:"var(--color-primary)",d:"M124.99,27.47c2.11,0,2.64-.62,2.64-3.96v-7.83c0-1.06-.22-1.5-1.06-1.89-.62-.31-.84-.35-.84-.62,0-.35.35-.48,2.02-1.23,1.94-.84,2.02-1.36,2.51-1.36.31,0,.44.18.44.48v1.45c0,.35.18.53.44.53.4,0,2.6-2.2,4.84-2.2,1.19,0,1.94.53,1.94,1.54,0,.79-.48,1.5-2.02,1.5-.57,0-1.63-.13-2.42-.13-1.58,0-2.77.79-2.77,3.17v7.22c0,2.73.48,3.26,2.73,3.34v.7h-8.45v-.7Z"}),b.jsx("path",{fill:"var(--color-primary)",d:"M148.71,15.68c0-3.04-1.14-3.79-2.99-3.79-4.05,0-2.38,4.53-4.97,4.53-.75,0-1.28-.4-1.28-1.19,0-1.63,3.96-4.4,7.35-4.4,2.95,0,4.97,1.5,4.97,5.28v9.64c0,1.01.62,1.28,1.1,1.28.66,0,1.1-.26,1.54-.66l.44.48c-.62.97-2.11,1.67-3.43,1.67s-2.64-.97-2.73-2.6c-2.07,1.89-4.09,2.6-5.77,2.6-2.51,0-4.27-1.5-4.27-3.43,0-3.04,2.51-3.92,7.66-5.24l2.38-.62v-3.56ZM148.71,19.95l-1.76.44c-3.3.84-5.02,1.85-5.02,3.7,0,1.63.92,2.95,2.91,2.95,1.41,0,2.68-.88,3.87-1.8v-5.28Z"}),b.jsx("path",{fill:"var(--color-primary)",d:"M165.13,12.68h-3.08c-1.8,0-2.42.44-2.42,3.17v8.49c0,1.94,1.19,2.68,2.82,2.68,1.23,0,2.24-.22,3.08-.35v.88c-1.23.44-2.46.97-4.45.97-3.65,0-4.53-2.29-4.53-4.4v-9.77c0-1.45-.09-1.58-.53-1.76-.35-.13-1.41-.18-1.41-.62,0-.31.4-.62.75-.97,2.95-2.99,3.34-3.61,3.79-3.61.26,0,.48.13.48.7v3.08h5.5v1.5Z"}),b.jsx("path",{fill:"var(--color-primary)",d:"M168.16,17.08c-.18.66-.31,1.41-.31,2.6,0,3.92,2.38,7.35,6.47,7.35,1.76,0,3.17-.62,5.11-1.94l.53.7c-1.98,1.58-3.92,2.99-6.78,2.99-5.24,0-8.41-4.49-8.41-8.36,0-5.55,3.87-9.33,8.49-9.33,3.7,0,6.6,3.04,6.6,5.77,0,.18-.13.22-.44.22h-11.27ZM176.79,16.03c-.18-2.38-1.72-4.05-3.96-4.05-2.55,0-3.96,2.07-4.45,4.05h8.41Z"})]}),b.jsxs("g",{children:[b.jsx("path",{fill:"var(--color-sunflower)",d:"M.2,15.44l6.3,12.07c.18.34.59.34.77,0l6.3-12.07c.26-.5.27-1.12.03-1.63L7.28.28c-.17-.37-.62-.37-.79,0L.17,13.8c-.24.51-.23,1.14.03,1.63"}),b.jsx("path",{fill:"var(--color-sunflower)",d:"M12.25,15.44l6.3,12.07c.18.34.59.34.77,0l6.3-12.07c.26-.5.27-1.12.03-1.63L19.33.28c-.17-.37-.62-.37-.79,0l-6.32,13.53c-.24.51-.23,1.14.03,1.63"}),b.jsx("path",{fill:"var(--color-sunflower)",d:"M24.31,15.44l6.3,12.07c.18.34.59.34.77,0l6.3-12.07c.26-.5.27-1.12.03-1.63L31.39.28c-.17-.37-.62-.37-.79,0l-6.32,13.53c-.24.51-.23,1.14.03,1.63"})]})]})})})});bR.displayName="EngrateLogo";const xR=te("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"}}),wR=p.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},i)=>{const a=n?Ie:"span";return b.jsx(a,{className:D(xR({variant:t,size:r,className:e})),ref:i,...o})});wR.displayName="Eyebrow";const SR=te("w-full font-sans",{variants:{variant:{default:"border-border border-t bg-white",filled:"bg-main border-border border-t",dark:"bg-primary text-white"},size:{sm:"px-4 py-6",default:"px-6 py-10",lg:"px-8 py-16"}},defaultVariants:{variant:"default",size:"default"}}),PR=p.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},i)=>{const a=n?Ie:"footer";return b.jsx(a,{ref:i,className:D(SR({variant:t,size:r,className:e})),...o})});PR.displayName="Footer";const CR=p.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const o=t?Ie:"div";return b.jsx(o,{ref:n,className:D("grid grid-cols-2 gap-8 md:grid-cols-3 lg:grid-cols-4",e),...r})});CR.displayName="FooterContent";const OR=p.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const o=t?Ie:"div";return b.jsx(o,{ref:n,className:D("flex flex-col gap-3",e),...r})});OR.displayName="FooterSection";const ER=p.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const o=t?Ie:"h3";return b.jsx(o,{ref:n,className:D("text-small font-medium",e),...r})});ER.displayName="FooterHeading";const AR=p.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const o=t?Ie:"nav";return b.jsx(o,{ref:n,className:D("text-small text-secondary flex flex-col gap-2",e),...r})});AR.displayName="FooterLinks";const TR=p.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const o=t?Ie:"div";return b.jsx(o,{ref:n,className:D("border-border mt-8 flex flex-col items-center justify-between gap-4 border-t pt-8 sm:flex-row",e),...r})});TR.displayName="FooterBottom";const MR=p.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const o=t?Ie:"p";return b.jsx(o,{ref:n,className:D("text-small text-secondary",e),...r})});MR.displayName="FooterCopyright";const fb=p.forwardRef(({className:e,variant:t="default",children:r,...n},o)=>r?b.jsx("p",{ref:o,className:D("text-descriptive font-sans text-sm",t==="default"?"text-tertiary":"text-error",e),...n,children:r}):null);fb.displayName="FormMessage";var Rue=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Lue=Rue.reduce((e,t)=>{const r=xA(`Primitive.${t}`),n=p.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}},{}),$ue="Label",kR=p.forwardRef((e,t)=>b.jsx(Lue.label,{...e,ref:t,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));kR.displayName=$ue;var Vue=kR;const DR=te("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"}}),pb=p.forwardRef(({className:e,size:t,...r},n)=>b.jsx(Vue,{ref:n,className:D(DR({size:t}),e),...r}));pb.displayName="Label";const _R=p.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:D("flex flex-col gap-1.5",e),...s,children:[t&&b.jsx(pb,{htmlFor:i,size:r,children:t}),a,(n||o)&&b.jsx(fb,{id:c,variant:o?"error":"default",role:o?"alert":void 0,children:o||n})]})});_R.displayName="FormField";const Fue=te("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"}}),Bue={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"},Wue={none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},zue={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},Kue={start:"justify-items-start",center:"justify-items-center",end:"justify-items-end",stretch:"justify-items-stretch"};function bo(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 NR=p.forwardRef(({className:e,cols:t,gap:r,align:n,justify:o,as:i="div",asChild:a=!1,...s},l)=>{const c=a?Ie:i,u=bo(t,Bue,1),d=bo(r,Wue,"md"),f=bo(n,zue,"stretch"),h=bo(o,Kue,"stretch");return b.jsx(c,{className:D("grid",u,d,f,h,e),ref:l,...s})});NR.displayName="Grid";const Uue=te("",{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:{}}),Hue={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"},Gue={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"},Yue={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"},jR=p.forwardRef(({className:e,colSpan:t,rowSpan:r,colStart:n,as:o="div",asChild:i=!1,...a},s)=>{const l=i?Ie:o,c=bo(t,Hue),u=bo(r,Gue),d=bo(n,Yue);return b.jsx(l,{className:D(c,u,d,e),ref:s,...a})});jR.displayName="GridItem";const IR=te("flex w-full items-center justify-between font-sans",{variants:{variant:{default:"border-border border-b bg-white",transparent:"bg-transparent",filled:"bg-main border-border border-b"},size:{sm:"h-12 px-4",default:"h-16 px-6",lg:"h-20 px-8"},sticky:{true:"sticky top-0 z-50",false:""}},defaultVariants:{variant:"default",size:"default",sticky:!1}}),RR=p.forwardRef(({className:e,variant:t,size:r,sticky:n,asChild:o=!1,...i},a)=>{const s=o?Ie:"header";return b.jsx(s,{ref:a,className:D(IR({variant:t,size:r,sticky:n,className:e})),...i})});RR.displayName="Header";const LR=p.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const o=t?Ie:"div";return b.jsx(o,{ref:n,className:D("flex shrink-0 items-center",e),...r})});LR.displayName="HeaderLogo";const $R=p.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const o=t?Ie:"nav";return b.jsx(o,{ref:n,className:D("flex items-center gap-6",e),...r})});$R.displayName="HeaderNav";const VR=p.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const o=t?Ie:"div";return b.jsx(o,{ref:n,className:D("flex shrink-0 items-center gap-3",e),...r})});VR.displayName="HeaderActions";const FR=te("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"}}),que={hero:"h1",h1:"h1",h2:"h2",h3:"h3",h4:"h4"},hb=p.forwardRef(({className:e,level:t="h1",as:r,asChild:n=!1,...o},i)=>{const a=r??que[t??"h1"],s=n?Ie:a;return b.jsx(s,{className:D(FR({level:t,className:e})),ref:i,...o})});hb.displayName="Heading";const BR=te("bg-card text-body-sm text-primary placeholder:text-tertiary placeholder:text-body-sm flex h-8 w-full rounded-md border px-3 py-1 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"}}),WR=p.forwardRef(({className:e,variant:t,type:r="text",...n},o)=>b.jsx("input",{type:r,className:D(BR({variant:t}),e),ref:o,...n}));WR.displayName="Input";const zR=te("text-small font-sans tracking-[-0.05em]",{variants:{size:{sm:"h-48",default:"h-72",lg:"h-96"}},defaultVariants:{size:"default"}}),Il=["var(--color-sunflower)","var(--color-electric-blue)","var(--color-cool-purple)","var(--color-deep-blue)","var(--color-warm-purple)"],KR=p.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:d=!0,...f},h)=>{const v=p.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:Il[x%Il.length]})):[]},[r,n]);return b.jsx("div",{ref:h,className:D(zR({size:t,className:e})),role:"img",...f,children:b.jsx(Jv,{width:"100%",height:"100%",minWidth:100,minHeight:100,children:b.jsxs(Rne,{data:r,margin:{top:5,right:30,left:l?20:0,bottom:s?20:5},children:[o&&b.jsx(_y,{strokeDasharray:"3 3",stroke:"var(--color-border)",vertical:!1}),b.jsx(Jc,{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(eu,{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(gy,{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},itemStyle:{color:"var(--color-secondary)"}}),i&&b.jsx(qu,{wrapperStyle:{fontFamily:"var(--font-sans)",fontSize:"14px"},formatter:m=>b.jsx("span",{style:{color:"var(--color-secondary)"},children:m})}),v.map((m,g)=>b.jsx(y_,{type:u?"monotone":"linear",dataKey:m.key,name:m.name,stroke:m.color||Il[g%Il.length],strokeWidth:c,dot:d,activeDot:d?{r:6}:!1},m.key))]})})})});KR.displayName="LineChart";const UR=te("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"}}),HR=p.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},i)=>{const a=n?Ie:"a";return b.jsx(a,{className:D(UR({variant:t,size:r,className:e})),ref:i,...o})});HR.displayName="Link";const mb=O.createContext({});function vb(e){const t=O.useRef(null);return t.current===null&&(t.current=e()),t.current}const GR=typeof window<"u",YR=GR?O.useLayoutEffect:O.useEffect,Vd=O.createContext(null);function gb(e,t){e.indexOf(t)===-1&&e.push(t)}function uu(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}const Ur=(e,t,r)=>r>t?t:r<e?e:r;function _m(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Ji=()=>{},hn=()=>{};typeof process<"u"&&process.env?.NODE_ENV!=="production"&&(Ji=(e,t,r)=>{!e&&typeof console<"u"&&console.warn(_m(t,r))},hn=(e,t,r)=>{if(!e)throw new Error(_m(t,r))});const mn={},qR=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function XR(e){return typeof e=="object"&&e!==null}const ZR=e=>/^0[^.\s]+$/u.test(e);function yb(e){let t;return()=>(t===void 0&&(t=e()),t)}const lr=e=>e,Xue=(e,t)=>r=>t(e(r)),Gs=(...e)=>e.reduce(Xue),Qa=(e,t,r)=>{const n=t-e;return n===0?1:(r-e)/n};class bb{constructor(){this.subscriptions=[]}add(t){return gb(this.subscriptions,t),()=>uu(this.subscriptions,t)}notify(t,r,n){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,r,n);else for(let i=0;i<o;i++){const a=this.subscriptions[i];a&&a(t,r,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const cr=e=>e*1e3,ar=e=>e/1e3;function QR(e,t){return t?e*(1e3/t):0}const p1=new Set;function xb(e,t,r){e||p1.has(t)||(console.warn(_m(t,r)),p1.add(t))}const JR=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,Zue=1e-7,Que=12;function Jue(e,t,r,n,o){let i,a,s=0;do a=t+(r-t)/2,i=JR(a,n,o)-e,i>0?r=a:t=a;while(Math.abs(i)>Zue&&++s<Que);return a}function Ys(e,t,r,n){if(e===t&&r===n)return lr;const o=i=>Jue(i,0,1,e,r);return i=>i===0||i===1?i:JR(o(i),t,n)}const e2=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,t2=e=>t=>1-e(1-t),r2=Ys(.33,1.53,.69,.99),wb=t2(r2),n2=e2(wb),o2=e=>(e*=2)<1?.5*wb(e):.5*(2-Math.pow(2,-10*(e-1))),Sb=e=>1-Math.sin(Math.acos(e)),i2=t2(Sb),a2=e2(Sb),ede=Ys(.42,0,1,1),tde=Ys(0,0,.58,1),s2=Ys(.42,0,.58,1),rde=e=>Array.isArray(e)&&typeof e[0]!="number",l2=e=>Array.isArray(e)&&typeof e[0]=="number",h1={linear:lr,easeIn:ede,easeInOut:s2,easeOut:tde,circIn:Sb,circInOut:a2,circOut:i2,backIn:wb,backInOut:n2,backOut:r2,anticipate:o2},nde=e=>typeof e=="string",m1=e=>{if(l2(e)){hn(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,r,n,o]=e;return Ys(t,r,n,o)}else if(nde(e))return hn(h1[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),h1[e];return e},Rl=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function ode(e,t){let r=new Set,n=new Set,o=!1,i=!1;const a=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function l(u){a.has(u)&&(c.schedule(u),e()),u(s)}const c={schedule:(u,d=!1,f=!1)=>{const v=f&&o?r:n;return d&&a.add(u),v.has(u)||v.add(u),u},cancel:u=>{n.delete(u),a.delete(u)},process:u=>{if(s=u,o){i=!0;return}o=!0,[r,n]=[n,r],r.forEach(l),r.clear(),o=!1,i&&(i=!1,c.process(u))}};return c}const ide=40;function c2(e,t){let r=!1,n=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>r=!0,a=Rl.reduce((w,S)=>(w[S]=ode(i),w),{}),{setup:s,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:h,postRender:v}=a,m=()=>{const w=mn.useManualTiming?o.timestamp:performance.now();r=!1,mn.useManualTiming||(o.delta=n?1e3/60:Math.max(Math.min(w-o.timestamp,ide),1)),o.timestamp=w,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),h.process(o),v.process(o),o.isProcessing=!1,r&&t&&(n=!1,e(m))},g=()=>{r=!0,n=!0,o.isProcessing||e(m)};return{schedule:Rl.reduce((w,S)=>{const P=a[S];return w[S]=(C,E=!1,A=!1)=>(r||g(),P.schedule(C,E,A)),w},{}),cancel:w=>{for(let S=0;S<Rl.length;S++)a[Rl[S]].cancel(w)},state:o,steps:a}}const{schedule:_e,cancel:Kn,state:yt,steps:th}=c2(typeof requestAnimationFrame<"u"?requestAnimationFrame:lr,!0);let Xl;function ade(){Xl=void 0}const Nt={now:()=>(Xl===void 0&&Nt.set(yt.isProcessing||mn.useManualTiming?yt.timestamp:performance.now()),Xl),set:e=>{Xl=e,queueMicrotask(ade)}},u2=e=>t=>typeof t=="string"&&t.startsWith(e),d2=u2("--"),sde=u2("var(--"),Pb=e=>sde(e)?lde.test(e.split("/*")[0].trim()):!1,lde=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function v1(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const ea={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ja={...ea,transform:e=>Ur(0,1,e)},Ll={...ea,default:1},Ta=e=>Math.round(e*1e5)/1e5,Cb=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function cde(e){return e==null}const ude=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ob=(e,t)=>r=>!!(typeof r=="string"&&ude.test(r)&&r.startsWith(e)||t&&!cde(r)&&Object.prototype.hasOwnProperty.call(r,t)),f2=(e,t,r)=>n=>{if(typeof n!="string")return n;const[o,i,a,s]=n.match(Cb);return{[e]:parseFloat(o),[t]:parseFloat(i),[r]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},dde=e=>Ur(0,255,e),rh={...ea,transform:e=>Math.round(dde(e))},xo={test:Ob("rgb","red"),parse:f2("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+rh.transform(e)+", "+rh.transform(t)+", "+rh.transform(r)+", "+Ta(Ja.transform(n))+")"};function fde(e){let t="",r="",n="",o="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),o=e.substring(4,5),t+=t,r+=r,n+=n,o+=o),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:o?parseInt(o,16)/255:1}}const Nm={test:Ob("#"),parse:fde,transform:xo.transform},qs=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Mn=qs("deg"),Vr=qs("%"),Q=qs("px"),pde=qs("vh"),hde=qs("vw"),g1={...Vr,parse:e=>Vr.parse(e)/100,transform:e=>Vr.transform(e*100)},di={test:Ob("hsl","hue"),parse:f2("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+Vr.transform(Ta(t))+", "+Vr.transform(Ta(r))+", "+Ta(Ja.transform(n))+")"},qe={test:e=>xo.test(e)||Nm.test(e)||di.test(e),parse:e=>xo.test(e)?xo.parse(e):di.test(e)?di.parse(e):Nm.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?xo.transform(e):di.transform(e),getAnimatableNone:e=>{const t=qe.parse(e);return t.alpha=0,qe.transform(t)}},mde=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function vde(e){return isNaN(e)&&typeof e=="string"&&(e.match(Cb)?.length||0)+(e.match(mde)?.length||0)>0}const p2="number",h2="color",gde="var",yde="var(",y1="${}",bde=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function es(e){const t=e.toString(),r=[],n={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace(bde,l=>(qe.test(l)?(n.color.push(i),o.push(h2),r.push(qe.parse(l))):l.startsWith(yde)?(n.var.push(i),o.push(gde),r.push(l)):(n.number.push(i),o.push(p2),r.push(parseFloat(l))),++i,y1)).split(y1);return{values:r,split:s,indexes:n,types:o}}function m2(e){return es(e).values}function v2(e){const{split:t,types:r}=es(e),n=t.length;return o=>{let i="";for(let a=0;a<n;a++)if(i+=t[a],o[a]!==void 0){const s=r[a];s===p2?i+=Ta(o[a]):s===h2?i+=qe.transform(o[a]):i+=o[a]}return i}}const xde=e=>typeof e=="number"?0:qe.test(e)?qe.getAnimatableNone(e):e;function wde(e){const t=m2(e);return v2(e)(t.map(xde))}const Un={test:vde,parse:m2,createTransformer:v2,getAnimatableNone:wde};function nh(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function Sde({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let o=0,i=0,a=0;if(!t)o=i=a=r;else{const s=r<.5?r*(1+t):r+t-r*t,l=2*r-s;o=nh(l,s,e+1/3),i=nh(l,s,e),a=nh(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:n}}function du(e,t){return r=>r>0?t:e}const Be=(e,t,r)=>e+(t-e)*r,oh=(e,t,r)=>{const n=e*e,o=r*(t*t-n)+n;return o<0?0:Math.sqrt(o)},Pde=[Nm,xo,di],Cde=e=>Pde.find(t=>t.test(e));function b1(e){const t=Cde(e);if(Ji(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let r=t.parse(e);return t===di&&(r=Sde(r)),r}const x1=(e,t)=>{const r=b1(e),n=b1(t);if(!r||!n)return du(e,t);const o={...r};return i=>(o.red=oh(r.red,n.red,i),o.green=oh(r.green,n.green,i),o.blue=oh(r.blue,n.blue,i),o.alpha=Be(r.alpha,n.alpha,i),xo.transform(o))},jm=new Set(["none","hidden"]);function Ode(e,t){return jm.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function Ede(e,t){return r=>Be(e,t,r)}function Eb(e){return typeof e=="number"?Ede:typeof e=="string"?Pb(e)?du:qe.test(e)?x1:Mde:Array.isArray(e)?g2:typeof e=="object"?qe.test(e)?x1:Ade:du}function g2(e,t){const r=[...e],n=r.length,o=e.map((i,a)=>Eb(i)(i,t[a]));return i=>{for(let a=0;a<n;a++)r[a]=o[a](i);return r}}function Ade(e,t){const r={...e,...t},n={};for(const o in r)e[o]!==void 0&&t[o]!==void 0&&(n[o]=Eb(e[o])(e[o],t[o]));return o=>{for(const i in n)r[i]=n[i](o);return r}}function Tde(e,t){const r=[],n={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const i=t.types[o],a=e.indexes[i][n[i]],s=e.values[a]??0;r[o]=s,n[i]++}return r}const Mde=(e,t)=>{const r=Un.createTransformer(t),n=es(e),o=es(t);return n.indexes.var.length===o.indexes.var.length&&n.indexes.color.length===o.indexes.color.length&&n.indexes.number.length>=o.indexes.number.length?jm.has(e)&&!o.values.length||jm.has(t)&&!n.values.length?Ode(e,t):Gs(g2(Tde(n,o),o.values),r):(Ji(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),du(e,t))};function y2(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?Be(e,t,r):Eb(e)(e,t)}const kde=e=>{const t=({timestamp:r})=>e(r);return{start:(r=!0)=>_e.update(t,r),stop:()=>Kn(t),now:()=>yt.isProcessing?yt.timestamp:Nt.now()}},b2=(e,t,r=10)=>{let n="";const o=Math.max(Math.round(t/r),2);for(let i=0;i<o;i++)n+=Math.round(e(i/(o-1))*1e4)/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},fu=2e4;function Ab(e){let t=0;const r=50;let n=e.next(t);for(;!n.done&&t<fu;)t+=r,n=e.next(t);return t>=fu?1/0:t}function Dde(e,t=100,r){const n=r({...e,keyframes:[0,t]}),o=Math.min(Ab(n),fu);return{type:"keyframes",ease:i=>n.next(o*i).value/t,duration:ar(o)}}const _de=5;function x2(e,t,r){const n=Math.max(t-_de,0);return QR(r-e(n),t-n)}const Ve={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},ih=.001;function Nde({duration:e=Ve.duration,bounce:t=Ve.bounce,velocity:r=Ve.velocity,mass:n=Ve.mass}){let o,i;Ji(e<=cr(Ve.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-t;a=Ur(Ve.minDamping,Ve.maxDamping,a),e=Ur(Ve.minDuration,Ve.maxDuration,ar(e)),a<1?(o=c=>{const u=c*a,d=u*e,f=u-r,h=Im(c,a),v=Math.exp(-d);return ih-f/h*v},i=c=>{const d=c*a*e,f=d*r+r,h=Math.pow(a,2)*Math.pow(c,2)*e,v=Math.exp(-d),m=Im(Math.pow(c,2),a);return(-o(c)+ih>0?-1:1)*((f-h)*v)/m}):(o=c=>{const u=Math.exp(-c*e),d=(c-r)*e+1;return-ih+u*d},i=c=>{const u=Math.exp(-c*e),d=(r-c)*(e*e);return u*d});const s=5/e,l=Ide(o,i,s);if(e=cr(e),isNaN(l))return{stiffness:Ve.stiffness,damping:Ve.damping,duration:e};{const c=Math.pow(l,2)*n;return{stiffness:c,damping:a*2*Math.sqrt(n*c),duration:e}}}const jde=12;function Ide(e,t,r){let n=r;for(let o=1;o<jde;o++)n=n-e(n)/t(n);return n}function Im(e,t){return e*Math.sqrt(1-t*t)}const Rde=["duration","bounce"],Lde=["stiffness","damping","mass"];function w1(e,t){return t.some(r=>e[r]!==void 0)}function $de(e){let t={velocity:Ve.velocity,stiffness:Ve.stiffness,damping:Ve.damping,mass:Ve.mass,isResolvedFromDuration:!1,...e};if(!w1(e,Lde)&&w1(e,Rde))if(e.visualDuration){const r=e.visualDuration,n=2*Math.PI/(r*1.2),o=n*n,i=2*Ur(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:Ve.mass,stiffness:o,damping:i}}else{const r=Nde(e);t={...t,...r,mass:Ve.mass},t.isResolvedFromDuration=!0}return t}function pu(e=Ve.visualDuration,t=Ve.bounce){const r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:n,restDelta:o}=r;const i=r.keyframes[0],a=r.keyframes[r.keyframes.length-1],s={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:h}=$de({...r,velocity:-ar(r.velocity||0)}),v=f||0,m=c/(2*Math.sqrt(l*u)),g=a-i,y=ar(Math.sqrt(l/u)),x=Math.abs(g)<5;n||(n=x?Ve.restSpeed.granular:Ve.restSpeed.default),o||(o=x?Ve.restDelta.granular:Ve.restDelta.default);let w;if(m<1){const P=Im(y,m);w=C=>{const E=Math.exp(-m*y*C);return a-E*((v+m*y*g)/P*Math.sin(P*C)+g*Math.cos(P*C))}}else if(m===1)w=P=>a-Math.exp(-y*P)*(g+(v+y*g)*P);else{const P=y*Math.sqrt(m*m-1);w=C=>{const E=Math.exp(-m*y*C),A=Math.min(P*C,300);return a-E*((v+m*y*g)*Math.sinh(A)+P*g*Math.cosh(A))/P}}const S={calculatedDuration:h&&d||null,next:P=>{const C=w(P);if(h)s.done=P>=d;else{let E=P===0?v:0;m<1&&(E=P===0?cr(v):x2(w,P,C));const A=Math.abs(E)<=n,T=Math.abs(a-C)<=o;s.done=A&&T}return s.value=s.done?a:C,s},toString:()=>{const P=Math.min(Ab(S),fu),C=b2(E=>S.next(P*E).value,P,30);return P+"ms "+C},toTransition:()=>{}};return S}pu.applyToOptions=e=>{const t=Dde(e,100,pu);return e.ease=t.ease,e.duration=cr(t.duration),e.type="keyframes",e};function Rm({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:s,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},h=A=>s!==void 0&&A<s||l!==void 0&&A>l,v=A=>s===void 0?l:l===void 0||Math.abs(s-A)<Math.abs(l-A)?s:l;let m=r*t;const g=d+m,y=a===void 0?g:a(g);y!==g&&(m=y-d);const x=A=>-m*Math.exp(-A/n),w=A=>y+x(A),S=A=>{const T=x(A),M=w(A);f.done=Math.abs(T)<=c,f.value=f.done?y:M};let P,C;const E=A=>{h(f.value)&&(P=A,C=pu({keyframes:[f.value,v(f.value)],velocity:x2(w,A,f.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return E(0),{calculatedDuration:null,next:A=>{let T=!1;return!C&&P===void 0&&(T=!0,S(A),E(A)),P!==void 0&&A>=P?C.next(A-P):(!T&&S(A),f)}}}function Vde(e,t,r){const n=[],o=r||mn.mix||y2,i=e.length-1;for(let a=0;a<i;a++){let s=o(e[a],e[a+1]);if(t){const l=Array.isArray(t)?t[a]||lr:t;s=Gs(l,s)}n.push(s)}return n}function Fde(e,t,{clamp:r=!0,ease:n,mixer:o}={}){const i=e.length;if(hn(i===t.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=Vde(t,n,o),l=s.length,c=u=>{if(a&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=Qa(e[d],e[d+1],u);return s[d](f)};return r?u=>c(Ur(e[0],e[i-1],u)):c}function Bde(e,t){const r=e[e.length-1];for(let n=1;n<=t;n++){const o=Qa(0,t,n);e.push(Be(r,1,o))}}function Wde(e){const t=[0];return Bde(t,e.length-1),t}function zde(e,t){return e.map(r=>r*t)}function Kde(e,t){return e.map(()=>t||s2).splice(0,e.length-1)}function fi({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){const o=rde(n)?n.map(m1):m1(n),i={done:!1,value:t[0]},a=zde(r&&r.length===t.length?r:Wde(t),e),s=Fde(a,t,{ease:Array.isArray(o)?o:Kde(t,o)});return{calculatedDuration:e,next:l=>(i.value=s(l),i.done=l>=e,i)}}const Ude=e=>e!==null;function Tb(e,{repeat:t,repeatType:r="loop"},n,o=1){const i=e.filter(Ude),s=o<0||t&&r!=="loop"&&t%2===1?0:i.length-1;return!s||n===void 0?i[s]:n}const Hde={decay:Rm,inertia:Rm,tween:fi,keyframes:fi,spring:pu};function w2(e){typeof e.type=="string"&&(e.type=Hde[e.type])}class Mb{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,r){return this.finished.then(t,r)}}const Gde=e=>e/100;class kb extends Mb{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:r}=this.options;r&&r.updatedAt!==Nt.now()&&this.tick(Nt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;w2(t);const{type:r=fi,repeat:n=0,repeatDelay:o=0,repeatType:i,velocity:a=0}=t;let{keyframes:s}=t;const l=r||fi;process.env.NODE_ENV!=="production"&&l!==fi&&hn(s.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${s}`,"spring-two-frames"),l!==fi&&typeof s[0]!="number"&&(this.mixKeyframes=Gs(Gde,y2(s[0],s[1])),s=[0,100]);const c=l({...t,keyframes:s});i==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...s].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=Ab(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+o,this.totalDuration=this.resolvedDuration*(n+1)-o,this.generator=c}updateTime(t){const r=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r}tick(t,r=!1){const{generator:n,totalDuration:o,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:s,calculatedDuration:l}=this;if(this.startTime===null)return n.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:f,repeatDelay:h,type:v,onUpdate:m,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),r?this.currentTime=t:this.updateTime(t);const y=this.currentTime-c*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?y<0:y>o;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let w=this.currentTime,S=n;if(d){const A=Math.min(this.currentTime,o)/s;let T=Math.floor(A),M=A%1;!M&&A>=1&&(M=1),M===1&&T--,T=Math.min(T,d+1),T%2&&(f==="reverse"?(M=1-M,h&&(M-=h/s)):f==="mirror"&&(S=a)),w=Ur(0,1,M)*s}const P=x?{done:!1,value:u[0]}:S.next(w);i&&(P.value=i(P.value));let{done:C}=P;!x&&l!==null&&(C=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return E&&v!==Rm&&(P.value=Tb(u,this.options,g,this.speed)),m&&m(P.value),E&&this.finish(),P}then(t,r){return this.finished.then(t,r)}get duration(){return ar(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ar(t)}get time(){return ar(this.currentTime)}set time(t){t=cr(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Nt.now());const r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=ar(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=kde,startTime:r}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();const n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=r??n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Nt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function Yde(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const wo=e=>e*180/Math.PI,Lm=e=>{const t=wo(Math.atan2(e[1],e[0]));return $m(t)},qde={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Lm,rotateZ:Lm,skewX:e=>wo(Math.atan(e[1])),skewY:e=>wo(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},$m=e=>(e=e%360,e<0&&(e+=360),e),S1=Lm,P1=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),C1=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Xde={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:P1,scaleY:C1,scale:e=>(P1(e)+C1(e))/2,rotateX:e=>$m(wo(Math.atan2(e[6],e[5]))),rotateY:e=>$m(wo(Math.atan2(-e[2],e[0]))),rotateZ:S1,rotate:S1,skewX:e=>wo(Math.atan(e[4])),skewY:e=>wo(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Vm(e){return e.includes("scale")?1:0}function Fm(e,t){if(!e||e==="none")return Vm(t);const r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,o;if(r)n=Xde,o=r;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=qde,o=s}if(!o)return Vm(t);const i=n[t],a=o[1].split(",").map(Qde);return typeof i=="function"?i(a):a[i]}const Zde=(e,t)=>{const{transform:r="none"}=getComputedStyle(e);return Fm(r,t)};function Qde(e){return parseFloat(e.trim())}const ta=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ra=new Set(ta),O1=e=>e===ea||e===Q,Jde=new Set(["x","y","z"]),efe=ta.filter(e=>!Jde.has(e));function tfe(e){const t=[];return efe.forEach(r=>{const n=e.getValue(r);n!==void 0&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t}const jn={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Fm(t,"x"),y:(e,{transform:t})=>Fm(t,"y")};jn.translateX=jn.x;jn.translateY=jn.y;const Eo=new Set;let Bm=!1,Wm=!1,zm=!1;function S2(){if(Wm){const e=Array.from(Eo).filter(n=>n.needsMeasurement),t=new Set(e.map(n=>n.element)),r=new Map;t.forEach(n=>{const o=tfe(n);o.length&&(r.set(n,o),n.render())}),e.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();const o=r.get(n);o&&o.forEach(([i,a])=>{n.getValue(i)?.set(a)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}Wm=!1,Bm=!1,Eo.forEach(e=>e.complete(zm)),Eo.clear()}function P2(){Eo.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Wm=!0)})}function rfe(){zm=!0,P2(),S2(),zm=!1}class Db{constructor(t,r,n,o,i,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=n,this.motionValue=o,this.element=i,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(Eo.add(this),Bm||(Bm=!0,_e.read(P2),_e.resolveKeyframes(S2))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:r,element:n,motionValue:o}=this;if(t[0]===null){const i=o?.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(n&&r){const s=n.readValue(r,a);s!=null&&(t[0]=s)}t[0]===void 0&&(t[0]=a),o&&i===void 0&&o.set(t[0])}Yde(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Eo.delete(this)}cancel(){this.state==="scheduled"&&(Eo.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const nfe=e=>e.startsWith("--");function ofe(e,t,r){nfe(t)?e.style.setProperty(t,r):e.style[t]=r}const ife=yb(()=>window.ScrollTimeline!==void 0),afe={};function sfe(e,t){const r=yb(e);return()=>afe[t]??r()}const C2=sfe(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Oa=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`,E1={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Oa([0,.65,.55,1]),circOut:Oa([.55,0,1,.45]),backIn:Oa([.31,.01,.66,-.59]),backOut:Oa([.33,1.53,.69,.99])};function O2(e,t){if(e)return typeof e=="function"?C2()?b2(e,t):"ease-out":l2(e)?Oa(e):Array.isArray(e)?e.map(r=>O2(r,t)||E1.easeOut):E1[e]}function lfe(e,t,r,{delay:n=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:s="easeOut",times:l}={},c=void 0){const u={[t]:r};l&&(u.offset=l);const d=O2(s,o);Array.isArray(d)&&(u.easing=d);const f={delay:n,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),e.animate(u,f)}function E2(e){return typeof e=="function"&&"applyToOptions"in e}function cfe({type:e,...t}){return E2(e)&&C2()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class A2 extends Mb{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:r,name:n,keyframes:o,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:s,onComplete:l}=t;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=t,hn(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=cfe(t);this.animation=lfe(r,n,o,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=Tb(o,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(u):ofe(r,n,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return ar(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ar(t)}get time(){return ar(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=cr(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&ife()?(this.animation.timeline=t,lr):r(this)}}const T2={anticipate:o2,backInOut:n2,circInOut:a2};function ufe(e){return e in T2}function dfe(e){typeof e.ease=="string"&&ufe(e.ease)&&(e.ease=T2[e.ease])}const ah=10;class ffe extends A2{constructor(t){dfe(t),w2(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:r,onUpdate:n,onComplete:o,element:i,...a}=this.options;if(!r)return;if(t!==void 0){r.set(t);return}const s=new kb({...a,autoplay:!1}),l=Math.max(ah,Nt.now()-this.startTime),c=Ur(0,ah,l-ah);r.setWithVelocity(s.sample(Math.max(0,l-c)).value,s.sample(l).value,c),s.stop()}}const A1=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Un.test(e)||e==="0")&&!e.startsWith("url("));function pfe(e){const t=e[0];if(e.length===1)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}function hfe(e,t,r,n){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],a=A1(o,t),s=A1(i,t);return Ji(a===s,`You are trying to animate ${t} from "${o}" to "${i}". "${a?i:o}" is not an animatable value.`,"value-not-animatable"),!a||!s?!1:pfe(e)||(r==="spring"||E2(r))&&n}function Km(e){e.duration=0,e.type="keyframes"}const mfe=new Set(["opacity","clipPath","filter","transform"]),vfe=yb(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function gfe(e){const{motionValue:t,name:r,repeatDelay:n,repeatType:o,damping:i,type:a}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return vfe()&&r&&mfe.has(r)&&(r!=="transform"||!c)&&!l&&!n&&o!=="mirror"&&i!==0&&a!=="inertia"}const yfe=40;class bfe extends Mb{constructor({autoplay:t=!0,delay:r=0,type:n="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:a="loop",keyframes:s,name:l,motionValue:c,element:u,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Nt.now();const f={autoplay:t,delay:r,type:n,repeat:o,repeatDelay:i,repeatType:a,name:l,motionValue:c,element:u,...d},h=u?.KeyframeResolver||Db;this.keyframeResolver=new h(s,(v,m,g)=>this.onKeyframesResolved(v,m,f,!g),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,r,n,o){this.keyframeResolver=void 0;const{name:i,type:a,velocity:s,delay:l,isHandoff:c,onUpdate:u}=n;this.resolvedAt=Nt.now(),hfe(t,i,a,s)||((mn.instantAnimations||!l)&&u?.(Tb(t,n,r)),t[0]=t[t.length-1],Km(n),n.repeat=0);const f={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>yfe?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...n,keyframes:t},h=!c&&gfe(f),v=f.motionValue?.owner?.current,m=h?new ffe({...f,element:v}):new kb(f);m.finished.then(()=>{this.notifyFinished()}).catch(lr),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(t,r){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),rfe()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function M2(e,t,r,n=0,o=1){const i=Array.from(e).sort((c,u)=>c.sortNodePosition(u)).indexOf(t),a=e.size,s=(a-1)*n;return typeof r=="function"?r(i,a):o===1?i*n:s-i*n}const xfe=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function wfe(e){const t=xfe.exec(e);if(!t)return[,];const[,r,n,o]=t;return[`--${r??n}`,o]}const Sfe=4;function k2(e,t,r=1){hn(r<=Sfe,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[n,o]=wfe(e);if(!n)return;const i=window.getComputedStyle(t).getPropertyValue(n);if(i){const a=i.trim();return qR(a)?parseFloat(a):a}return Pb(o)?k2(o,t,r+1):o}const Pfe={type:"spring",stiffness:500,damping:25,restSpeed:10},Cfe=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Ofe={type:"keyframes",duration:.8},Efe={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Afe=(e,{keyframes:t})=>t.length>2?Ofe:ra.has(e)?e.startsWith("scale")?Cfe(t[1]):Pfe:Efe,Tfe=e=>e!==null;function Mfe(e,{repeat:t,repeatType:r="loop"},n){const o=e.filter(Tfe),i=t&&r!=="loop"&&t%2===1?0:o.length-1;return o[i]}function D2(e,t){if(e?.inherit&&t){const{inherit:r,...n}=e;return{...t,...n}}return e}function _b(e,t){const r=e?.[t]??e?.default??e;return r!==e?D2(r,e):r}function kfe({when:e,delay:t,delayChildren:r,staggerChildren:n,staggerDirection:o,repeat:i,repeatType:a,repeatDelay:s,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const Nb=(e,t,r,n={},o,i)=>a=>{const s=_b(n,e)||{},l=s.delay||n.delay||0;let{elapsed:c=0}=n;c=c-cr(l);const u={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:f=>{t.set(f),s.onUpdate&&s.onUpdate(f)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:i?void 0:o};kfe(s)||Object.assign(u,Afe(e,u)),u.duration&&(u.duration=cr(u.duration)),u.repeatDelay&&(u.repeatDelay=cr(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Km(u),u.delay===0&&(d=!0)),(mn.instantAnimations||mn.skipAnimations||o?.shouldSkipAnimations)&&(d=!0,Km(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!i&&t.get()!==void 0){const f=Mfe(u.keyframes,s);if(f!==void 0){_e.update(()=>{u.onUpdate(f),u.onComplete()});return}}return s.isSync?new kb(u):new bfe(u)};function T1(e){const t=[{},{}];return e?.values.forEach((r,n)=>{t[0][n]=r.get(),t[1][n]=r.getVelocity()}),t}function jb(e,t,r,n){if(typeof t=="function"){const[o,i]=T1(n);t=t(r!==void 0?r:e.custom,o,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,i]=T1(n);t=t(r!==void 0?r:e.custom,o,i)}return t}function Pi(e,t,r){const n=e.getProps();return jb(n,t,r!==void 0?r:n.custom,e)}const _2=new Set(["width","height","top","left","right","bottom",...ta]),M1=30,Dfe=e=>!isNaN(parseFloat(e));class _fe{constructor(t,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{const o=Nt.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}setCurrent(t){this.current=t,this.updatedAt=Nt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Dfe(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&xb(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new bb);const n=this.events[t].add(r);return t==="change"?()=>{n(),_e.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,r,n){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Nt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>M1)return 0;const r=Math.min(this.updatedAt-this.prevUpdatedAt,M1);return QR(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ji(e,t){return new _fe(e,t)}const Um=e=>Array.isArray(e);function Nfe(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,ji(r))}function jfe(e){return Um(e)?e[e.length-1]||0:e}function Ife(e,t){const r=Pi(e,t);let{transitionEnd:n={},transition:o={},...i}=r||{};i={...i,...n};for(const a in i){const s=jfe(i[a]);Nfe(e,a,s)}}const Ct=e=>!!(e&&e.getVelocity);function Rfe(e){return!!(Ct(e)&&e.add)}function Hm(e,t){const r=e.getValue("willChange");if(Rfe(r))return r.add(t);if(!r&&mn.WillChange){const n=new mn.WillChange("auto");e.addValue("willChange",n),n.add(t)}}function Ib(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Lfe="framerAppearId",N2="data-"+Ib(Lfe);function j2(e){return e.props[N2]}function $fe({protectedKeys:e,needsAnimating:t},r){const n=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,n}function I2(e,t,{delay:r=0,transitionOverride:n,type:o}={}){let{transition:i,transitionEnd:a,...s}=t;const l=e.getDefaultTransition();i=i?D2(i,l):l;const c=i?.reduceMotion;n&&(i=n);const u=[],d=o&&e.animationState&&e.animationState.getState()[o];for(const f in s){const h=e.getValue(f,e.latestValues[f]??null),v=s[f];if(v===void 0||d&&$fe(d,f))continue;const m={delay:r,..._b(i||{},f)},g=h.get();if(g!==void 0&&!h.isAnimating&&!Array.isArray(v)&&v===g&&!m.velocity)continue;let y=!1;if(window.MotionHandoffAnimation){const S=j2(e);if(S){const P=window.MotionHandoffAnimation(S,f,_e);P!==null&&(m.startTime=P,y=!0)}}Hm(e,f);const x=c??e.shouldReduceMotion;h.start(Nb(f,h,v,x&&_2.has(f)?{type:!1}:m,e,y));const w=h.animation;w&&u.push(w)}if(a){const f=()=>_e.update(()=>{a&&Ife(e,a)});u.length?Promise.all(u).then(f):f()}return u}function Gm(e,t,r={}){const n=Pi(e,t,r.type==="exit"?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=n||{};r.transitionOverride&&(o=r.transitionOverride);const i=n?()=>Promise.all(I2(e,n,r)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:d}=o;return Vfe(e,t,l,c,u,d,r)}:()=>Promise.resolve(),{when:s}=o;if(s){const[l,c]=s==="beforeChildren"?[i,a]:[a,i];return l().then(()=>c())}else return Promise.all([i(),a(r.delay)])}function Vfe(e,t,r=0,n=0,o=0,i=1,a){const s=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),s.push(Gm(l,t,{...a,delay:r+(typeof n=="function"?0:n)+M2(e.variantChildren,l,n,o,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}function Ffe(e,t,r={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){const o=t.map(i=>Gm(e,i,r));n=Promise.all(o)}else if(typeof t=="string")n=Gm(e,t,r);else{const o=typeof t=="function"?Pi(e,t,r.custom):t;n=Promise.all(I2(e,o,r))}return n.then(()=>{e.notify("AnimationComplete",t)})}const Bfe={test:e=>e==="auto",parse:e=>e},R2=e=>t=>t.test(e),L2=[ea,Q,Vr,Mn,hde,pde,Bfe],k1=e=>L2.find(R2(e));function Wfe(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||ZR(e):!0}const zfe=new Set(["brightness","contrast","saturate","opacity"]);function Kfe(e){const[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[n]=r.match(Cb)||[];if(!n)return e;const o=r.replace(n,"");let i=zfe.has(t)?1:0;return n!==r&&(i*=100),t+"("+i+o+")"}const Ufe=/\b([a-z-]*)\(.*?\)/gu,Ym={...Un,getAnimatableNone:e=>{const t=e.match(Ufe);return t?t.map(Kfe).join(" "):e}},D1={...ea,transform:Math.round},Hfe={rotate:Mn,rotateX:Mn,rotateY:Mn,rotateZ:Mn,scale:Ll,scaleX:Ll,scaleY:Ll,scaleZ:Ll,skew:Mn,skewX:Mn,skewY:Mn,distance:Q,translateX:Q,translateY:Q,translateZ:Q,x:Q,y:Q,z:Q,perspective:Q,transformPerspective:Q,opacity:Ja,originX:g1,originY:g1,originZ:Q},Rb={borderWidth:Q,borderTopWidth:Q,borderRightWidth:Q,borderBottomWidth:Q,borderLeftWidth:Q,borderRadius:Q,borderTopLeftRadius:Q,borderTopRightRadius:Q,borderBottomRightRadius:Q,borderBottomLeftRadius:Q,width:Q,maxWidth:Q,height:Q,maxHeight:Q,top:Q,right:Q,bottom:Q,left:Q,inset:Q,insetBlock:Q,insetBlockStart:Q,insetBlockEnd:Q,insetInline:Q,insetInlineStart:Q,insetInlineEnd:Q,padding:Q,paddingTop:Q,paddingRight:Q,paddingBottom:Q,paddingLeft:Q,paddingBlock:Q,paddingBlockStart:Q,paddingBlockEnd:Q,paddingInline:Q,paddingInlineStart:Q,paddingInlineEnd:Q,margin:Q,marginTop:Q,marginRight:Q,marginBottom:Q,marginLeft:Q,marginBlock:Q,marginBlockStart:Q,marginBlockEnd:Q,marginInline:Q,marginInlineStart:Q,marginInlineEnd:Q,fontSize:Q,backgroundPositionX:Q,backgroundPositionY:Q,...Hfe,zIndex:D1,fillOpacity:Ja,strokeOpacity:Ja,numOctaves:D1},Gfe={...Rb,color:qe,backgroundColor:qe,outlineColor:qe,fill:qe,stroke:qe,borderColor:qe,borderTopColor:qe,borderRightColor:qe,borderBottomColor:qe,borderLeftColor:qe,filter:Ym,WebkitFilter:Ym},$2=e=>Gfe[e];function V2(e,t){let r=$2(e);return r!==Ym&&(r=Un),r.getAnimatableNone?r.getAnimatableNone(t):void 0}const Yfe=new Set(["auto","none","0"]);function qfe(e,t,r){let n=0,o;for(;n<e.length&&!o;){const i=e[n];typeof i=="string"&&!Yfe.has(i)&&es(i).values.length&&(o=e[n]),n++}if(o&&r)for(const i of t)e[i]=V2(r,o)}class Xfe extends Db{constructor(t,r,n,o,i){super(t,r,n,o,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:r,name:n}=this;if(!r||!r.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let d=t[u];if(typeof d=="string"&&(d=d.trim(),Pb(d))){const f=k2(d,r.current);f!==void 0&&(t[u]=f),u===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!_2.has(n)||t.length!==2)return;const[o,i]=t,a=k1(o),s=k1(i),l=v1(o),c=v1(i);if(l!==c&&jn[n]){this.needsMeasurement=!0;return}if(a!==s)if(O1(a)&&O1(s))for(let u=0;u<t.length;u++){const d=t[u];typeof d=="string"&&(t[u]=parseFloat(d))}else jn[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:r}=this,n=[];for(let o=0;o<t.length;o++)(t[o]===null||Wfe(t[o]))&&n.push(o);n.length&&qfe(t,n,r)}measureInitialState(){const{element:t,unresolvedKeyframes:r,name:n}=this;if(!t||!t.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=jn[n](t.measureViewportBox(),window.getComputedStyle(t.current)),r[0]=this.measuredOrigin;const o=r[r.length-1];o!==void 0&&t.getValue(n,o).jump(o,!1)}measureEndState(){const{element:t,name:r,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const o=t.getValue(r);o&&o.jump(this.measuredOrigin,!1);const i=n.length-1,a=n[i];n[i]=jn[r](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([s,l])=>{t.getValue(s).set(l)}),this.resolveNoneKeyframes()}}const Zfe=new Set(["opacity","clipPath","filter","transform"]);function F2(e,t,r){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let n=document;const o=r?.[e]??n.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e).filter(n=>n!=null)}const B2=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function qm(e){return XR(e)&&"offsetHeight"in e}const{schedule:Lb}=c2(queueMicrotask,!1),mr={x:!1,y:!1};function W2(){return mr.x||mr.y}function Qfe(e){return e==="x"||e==="y"?mr[e]?null:(mr[e]=!0,()=>{mr[e]=!1}):mr.x||mr.y?null:(mr.x=mr.y=!0,()=>{mr.x=mr.y=!1})}function z2(e,t){const r=F2(e),n=new AbortController,o={passive:!0,...t,signal:n.signal};return[r,o,()=>n.abort()]}function Jfe(e){return!(e.pointerType==="touch"||W2())}function epe(e,t,r={}){const[n,o,i]=z2(e,r);return n.forEach(a=>{let s=!1,l=!1,c;const u=()=>{a.removeEventListener("pointerleave",v)},d=g=>{c&&(c(g),c=void 0),u()},f=g=>{s=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=!1,d(g))},h=()=>{s=!0,window.addEventListener("pointerup",f,o),window.addEventListener("pointercancel",f,o)},v=g=>{if(g.pointerType!=="touch"){if(s){l=!0;return}d(g)}},m=g=>{if(!Jfe(g))return;l=!1;const y=t(a,g);typeof y=="function"&&(c=y,a.addEventListener("pointerleave",v,o))};a.addEventListener("pointerenter",m,o),a.addEventListener("pointerdown",h,o)}),i}const K2=(e,t)=>t?e===t?!0:K2(e,t.parentElement):!1,$b=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,tpe=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function rpe(e){return tpe.has(e.tagName)||e.isContentEditable===!0}const npe=new Set(["INPUT","SELECT","TEXTAREA"]);function ope(e){return npe.has(e.tagName)||e.isContentEditable===!0}const Zl=new WeakSet;function _1(e){return t=>{t.key==="Enter"&&e(t)}}function sh(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const ipe=(e,t)=>{const r=e.currentTarget;if(!r)return;const n=_1(()=>{if(Zl.has(r))return;sh(r,"down");const o=_1(()=>{sh(r,"up")}),i=()=>sh(r,"cancel");r.addEventListener("keyup",o,t),r.addEventListener("blur",i,t)});r.addEventListener("keydown",n,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",n),t)};function N1(e){return $b(e)&&!W2()}const j1=new WeakSet;function ape(e,t,r={}){const[n,o,i]=z2(e,r),a=s=>{const l=s.currentTarget;if(!N1(s)||j1.has(s))return;Zl.add(l),r.stopPropagation&&j1.add(s);const c=t(l,s),u=(h,v)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),Zl.has(l)&&Zl.delete(l),N1(h)&&typeof c=="function"&&c(h,{success:v})},d=h=>{u(h,l===window||l===document||r.useGlobalTarget||K2(l,h.target))},f=h=>{u(h,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",f,o)};return n.forEach(s=>{(r.useGlobalTarget?window:s).addEventListener("pointerdown",a,o),qm(s)&&(s.addEventListener("focus",c=>ipe(c,o)),!rpe(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),i}function Vb(e){return XR(e)&&"ownerSVGElement"in e}const Ql=new WeakMap;let Jl;const U2=(e,t,r)=>(n,o)=>o&&o[0]?o[0][e+"Size"]:Vb(n)&&"getBBox"in n?n.getBBox()[t]:n[r],spe=U2("inline","width","offsetWidth"),lpe=U2("block","height","offsetHeight");function cpe({target:e,borderBoxSize:t}){Ql.get(e)?.forEach(r=>{r(e,{get width(){return spe(e,t)},get height(){return lpe(e,t)}})})}function upe(e){e.forEach(cpe)}function dpe(){typeof ResizeObserver>"u"||(Jl=new ResizeObserver(upe))}function fpe(e,t){Jl||dpe();const r=F2(e);return r.forEach(n=>{let o=Ql.get(n);o||(o=new Set,Ql.set(n,o)),o.add(t),Jl?.observe(n)}),()=>{r.forEach(n=>{const o=Ql.get(n);o?.delete(t),o?.size||Jl?.unobserve(n)})}}const ec=new Set;let pi;function ppe(){pi=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};ec.forEach(t=>t(e))},window.addEventListener("resize",pi)}function hpe(e){return ec.add(e),pi||ppe(),()=>{ec.delete(e),!ec.size&&typeof pi=="function"&&(window.removeEventListener("resize",pi),pi=void 0)}}function I1(e,t){return typeof e=="function"?hpe(e):fpe(e,t)}function mpe(e){return Vb(e)&&e.tagName==="svg"}const vpe=[...L2,qe,Un],gpe=e=>vpe.find(R2(e)),R1=()=>({translate:0,scale:1,origin:0,originPoint:0}),hi=()=>({x:R1(),y:R1()}),L1=()=>({min:0,max:0}),nt=()=>({x:L1(),y:L1()}),ype=new WeakMap;function Fd(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function ts(e){return typeof e=="string"||Array.isArray(e)}const Fb=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Bb=["initial",...Fb];function Bd(e){return Fd(e.animate)||Bb.some(t=>ts(e[t]))}function H2(e){return!!(Bd(e)||e.variants)}function bpe(e,t,r){for(const n in t){const o=t[n],i=r[n];if(Ct(o))e.addValue(n,o);else if(Ct(i))e.addValue(n,ji(o,{owner:e}));else if(i!==o)if(e.hasValue(n)){const a=e.getValue(n);a.liveStyle===!0?a.jump(o):a.hasAnimated||a.set(o)}else{const a=e.getStaticValue(n);e.addValue(n,ji(a!==void 0?a:o,{owner:e}))}}for(const n in r)t[n]===void 0&&e.removeValue(n);return t}const Xm={current:null},G2={current:!1},xpe=typeof window<"u";function wpe(){if(G2.current=!0,!!xpe)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Xm.current=e.matches;e.addEventListener("change",t),t()}else Xm.current=!1}const $1=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let hu={};function Y2(e){hu=e}function Spe(){return hu}class Ppe{scrapeMotionValuesFromProps(t,r,n){return{}}constructor({parent:t,props:r,presenceContext:n,reducedMotionConfig:o,skipAnimations:i,blockInitialAnimation:a,visualState:s},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Db,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=Nt.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,_e.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=s;this.latestValues=c,this.baseTarget={...c},this.initialValues=r.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=r,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.skipAnimationsConfig=i,this.options=l,this.blockInitialAnimation=!!a,this.isControllingVariants=Bd(r),this.isVariantNode=H2(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(r,{},this);for(const h in f){const v=f[h];c[h]!==void 0&&Ct(v)&&v.set(c[h])}}mount(t){if(this.hasBeenMounted)for(const r in this.initialValues)this.values.get(r)?.jump(this.initialValues[r]),this.latestValues[r]=this.initialValues[r];this.current=t,ype.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,n)=>this.bindToMotionValue(n,r)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(G2.current||wpe(),this.shouldReduceMotion=Xm.current),process.env.NODE_ENV!=="production"&&xb(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Kn(this.notifyUpdate),Kn(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const r=this.features[t];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,r){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),r.accelerate&&Zfe.has(t)&&this.current instanceof HTMLElement){const{factory:a,keyframes:s,times:l,ease:c,duration:u}=r.accelerate,d=new A2({element:this.current,name:t,keyframes:s,times:l,ease:c,duration:cr(u)}),f=a(d);this.valueSubscriptions.set(t,()=>{f(),d.cancel()});return}const n=ra.has(t);n&&this.onBindTransform&&this.onBindTransform();const o=r.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&_e.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{o(),i&&i(),r.owner&&r.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in hu){const r=hu[t];if(!r)continue;const{isEnabled:n,Feature:o}=r;if(!this.features[t]&&o&&n(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):nt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let n=0;n<$1.length;n++){const o=$1[n];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,a=t[i];a&&(this.propEventSubscriptions[o]=this.on(o,a))}this.prevMotionValues=bpe(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(t),()=>r.variantChildren.delete(t)}addValue(t,r){const n=this.values.get(t);r!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,r),this.values.set(t,r),this.latestValues[t]=r.get())}removeValue(t){this.values.delete(t);const r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&r!==void 0&&(n=ji(r===null?void 0:r,{owner:this}),this.addValue(t,n)),n}readValue(t,r){let n=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return n!=null&&(typeof n=="string"&&(qR(n)||ZR(n))?n=parseFloat(n):!gpe(n)&&Un.test(r)&&(n=V2(t,r)),this.setBaseTarget(t,Ct(n)?n.get():n)),Ct(n)?n.get():n}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){const{initial:r}=this.props;let n;if(typeof r=="string"||typeof r=="object"){const i=jb(this.props,r,this.presenceContext?.custom);i&&(n=i[t])}if(r&&n!==void 0)return n;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Ct(o)?o:this.initialValues[t]!==void 0&&n===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new bb),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}scheduleRenderMicrotask(){Lb.render(this.render)}}class q2 extends Ppe{constructor(){super(...arguments),this.KeyframeResolver=Xfe}sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){const n=t.style;return n?n[r]:void 0}removeValueFromRenderState(t,{vars:r,style:n}){delete r[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ct(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}}class eo{constructor(t){this.isMounted=!1,this.node=t}update(){}}function X2({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function Cpe({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Ope(e,t){if(!t)return e;const r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function lh(e){return e===void 0||e===1}function Zm({scale:e,scaleX:t,scaleY:r}){return!lh(e)||!lh(t)||!lh(r)}function fo(e){return Zm(e)||Z2(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Z2(e){return V1(e.x)||V1(e.y)}function V1(e){return e&&e!=="0%"}function mu(e,t,r){const n=e-r,o=t*n;return r+o}function F1(e,t,r,n,o){return o!==void 0&&(e=mu(e,o,n)),mu(e,r,n)+t}function Qm(e,t=0,r=1,n,o){e.min=F1(e.min,t,r,n,o),e.max=F1(e.max,t,r,n,o)}function Q2(e,{x:t,y:r}){Qm(e.x,t.translate,t.scale,t.originPoint),Qm(e.y,r.translate,r.scale,r.originPoint)}const B1=.999999999999,W1=1.0000000000001;function Epe(e,t,r,n=!1){const o=r.length;if(!o)return;t.x=t.y=1;let i,a;for(let s=0;s<o;s++){i=r[s],a=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(n&&i.options.layoutScroll&&i.scroll&&i!==i.root&&vi(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Q2(e,a)),n&&fo(i.latestValues)&&vi(e,i.latestValues))}t.x<W1&&t.x>B1&&(t.x=1),t.y<W1&&t.y>B1&&(t.y=1)}function mi(e,t){e.min=e.min+t,e.max=e.max+t}function z1(e,t,r,n,o=.5){const i=Be(e.min,e.max,o);Qm(e,t,r,i,n)}function vi(e,t){z1(e.x,t.x,t.scaleX,t.scale,t.originX),z1(e.y,t.y,t.scaleY,t.scale,t.originY)}function J2(e,t){return X2(Ope(e.getBoundingClientRect(),t))}function Ape(e,t,r){const n=J2(e,r),{scroll:o}=t;return o&&(mi(n.x,o.offset.x),mi(n.y,o.offset.y)),n}const Tpe={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Mpe=ta.length;function kpe(e,t,r){let n="",o=!0;for(let i=0;i<Mpe;i++){const a=ta[i],s=e[a];if(s===void 0)continue;let l=!0;if(typeof s=="number")l=s===(a.startsWith("scale")?1:0);else{const c=parseFloat(s);l=a.startsWith("scale")?c===1:c===0}if(!l||r){const c=B2(s,Rb[a]);if(!l){o=!1;const u=Tpe[a]||a;n+=`${u}(${c}) `}r&&(t[a]=c)}}return n=n.trim(),r?n=r(t,o?"":n):o&&(n="none"),n}function Wb(e,t,r){const{style:n,vars:o,transformOrigin:i}=e;let a=!1,s=!1;for(const l in t){const c=t[l];if(ra.has(l)){a=!0;continue}else if(d2(l)){o[l]=c;continue}else{const u=B2(c,Rb[l]);l.startsWith("origin")?(s=!0,i[l]=u):n[l]=u}}if(t.transform||(a||r?n.transform=kpe(t,e.transform,r):n.transform&&(n.transform="none")),s){const{originX:l="50%",originY:c="50%",originZ:u=0}=i;n.transformOrigin=`${l} ${c} ${u}`}}function eL(e,{style:t,vars:r},n,o){const i=e.style;let a;for(a in t)i[a]=t[a];o?.applyProjectionStyles(i,n);for(a in r)i.setProperty(a,r[a])}function K1(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ga={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Q.test(e))e=parseFloat(e);else return e;const r=K1(e,t.target.x),n=K1(e,t.target.y);return`${r}% ${n}%`}},Dpe={correct:(e,{treeScale:t,projectionDelta:r})=>{const n=e,o=Un.parse(e);if(o.length>5)return n;const i=Un.createTransformer(e),a=typeof o[0]!="number"?1:0,s=r.x.scale*t.x,l=r.y.scale*t.y;o[0+a]/=s,o[1+a]/=l;const c=Be(s,l,.5);return typeof o[2+a]=="number"&&(o[2+a]/=c),typeof o[3+a]=="number"&&(o[3+a]/=c),i(o)}},Jm={borderRadius:{...ga,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ga,borderTopRightRadius:ga,borderBottomLeftRadius:ga,borderBottomRightRadius:ga,boxShadow:Dpe};function tL(e,{layout:t,layoutId:r}){return ra.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!Jm[e]||e==="opacity")}function zb(e,t,r){const n=e.style,o=t?.style,i={};if(!n)return i;for(const a in n)(Ct(n[a])||o&&Ct(o[a])||tL(a,e)||r?.getValue(a)?.liveStyle!==void 0)&&(i[a]=n[a]);return i}function _pe(e){return window.getComputedStyle(e)}class Npe extends q2{constructor(){super(...arguments),this.type="html",this.renderInstance=eL}readValueFromInstance(t,r){if(ra.has(r))return this.projection?.isProjecting?Vm(r):Zde(t,r);{const n=_pe(t),o=(d2(r)?n.getPropertyValue(r):n[r])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:r}){return J2(t,r)}build(t,r,n){Wb(t,r,n.transformTemplate)}scrapeMotionValuesFromProps(t,r,n){return zb(t,r,n)}}const jpe={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ipe={offset:"strokeDashoffset",array:"strokeDasharray"};function Rpe(e,t,r=1,n=0,o=!0){e.pathLength=1;const i=o?jpe:Ipe;e[i.offset]=`${-n}`,e[i.array]=`${t} ${r}`}const Lpe=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function rL(e,{attrX:t,attrY:r,attrScale:n,pathLength:o,pathSpacing:i=1,pathOffset:a=0,...s},l,c,u){if(Wb(e,s,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??"fill-box",delete d.transformBox);for(const h of Lpe)d[h]!==void 0&&(f[h]=d[h],delete d[h]);t!==void 0&&(d.x=t),r!==void 0&&(d.y=r),n!==void 0&&(d.scale=n),o!==void 0&&Rpe(d,o,i,a,!1)}const nL=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),oL=e=>typeof e=="string"&&e.toLowerCase()==="svg";function $pe(e,t,r,n){eL(e,t,void 0,n);for(const o in t.attrs)e.setAttribute(nL.has(o)?o:Ib(o),t.attrs[o])}function iL(e,t,r){const n=zb(e,t,r);for(const o in e)if(Ct(e[o])||Ct(t[o])){const i=ta.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;n[i]=e[o]}return n}class Vpe extends q2{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=nt}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(ra.has(r)){const n=$2(r);return n&&n.default||0}return r=nL.has(r)?r:Ib(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,n){return iL(t,r,n)}build(t,r,n){rL(t,r,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,r,n,o){$pe(t,r,n,o)}mount(t){this.isSVGTag=oL(t.tagName),super.mount(t)}}const Fpe=Bb.length;function aL(e){if(!e)return;if(!e.isControllingVariants){const r=e.parent?aL(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}const t={};for(let r=0;r<Fpe;r++){const n=Bb[r],o=e.props[n];(ts(o)||o===!1)&&(t[n]=o)}return t}function sL(e,t){if(!Array.isArray(t))return!1;const r=t.length;if(r!==e.length)return!1;for(let n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}const Bpe=[...Fb].reverse(),Wpe=Fb.length;function zpe(e){return t=>Promise.all(t.map(({animation:r,options:n})=>Ffe(e,r,n)))}function Kpe(e){let t=zpe(e),r=U1(),n=!0;const o=l=>(c,u)=>{const d=Pi(e,u,l==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:f,transitionEnd:h,...v}=d;c={...c,...v,...h}}return c};function i(l){t=l(e)}function a(l){const{props:c}=e,u=aL(e.parent)||{},d=[],f=new Set;let h={},v=1/0;for(let g=0;g<Wpe;g++){const y=Bpe[g],x=r[y],w=c[y]!==void 0?c[y]:u[y],S=ts(w),P=y===l?x.isActive:null;P===!1&&(v=g);let C=w===u[y]&&w!==c[y]&&S;if(C&&n&&e.manuallyAnimateOnMount&&(C=!1),x.protectedKeys={...h},!x.isActive&&P===null||!w&&!x.prevProp||Fd(w)||typeof w=="boolean")continue;if(y==="exit"&&x.isActive&&P!==!0){x.prevResolvedValues&&(h={...h,...x.prevResolvedValues});continue}const E=Upe(x.prevProp,w);let A=E||y===l&&x.isActive&&!C&&S||g>v&&S,T=!1;const M=Array.isArray(w)?w:[w];let _=M.reduce(o(y),{});P===!1&&(_={});const{prevResolvedValues:k={}}=x,N={...k,..._},R=F=>{A=!0,f.has(F)&&(T=!0,f.delete(F)),x.needsAnimating[F]=!0;const j=e.getValue(F);j&&(j.liveStyle=!1)};for(const F in N){const j=_[F],L=k[F];if(h.hasOwnProperty(F))continue;let H=!1;Um(j)&&Um(L)?H=!sL(j,L):H=j!==L,H?j!=null?R(F):f.add(F):j!==void 0&&f.has(F)?R(F):x.protectedKeys[F]=!0}x.prevProp=w,x.prevResolvedValues=_,x.isActive&&(h={...h,..._}),n&&e.blockInitialAnimation&&(A=!1);const z=C&&E;A&&(!z||T)&&d.push(...M.map(F=>{const j={type:y};if(typeof F=="string"&&n&&!z&&e.manuallyAnimateOnMount&&e.parent){const{parent:L}=e,H=Pi(L,F);if(L.enteringChildren&&H){const{delayChildren:re}=H.transition||{};j.delay=M2(L.enteringChildren,e,re)}}return{animation:F,options:j}}))}if(f.size){const g={};if(typeof c.initial!="boolean"){const y=Pi(e,Array.isArray(c.initial)?c.initial[0]:c.initial);y&&y.transition&&(g.transition=y.transition)}f.forEach(y=>{const x=e.getBaseTarget(y),w=e.getValue(y);w&&(w.liveStyle=!0),g[y]=x??null}),d.push({animation:g})}let m=!!d.length;return n&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(m=!1),n=!1,m?t(d):Promise.resolve()}function s(l,c){if(r[l].isActive===c)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(l,c)),r[l].isActive=c;const u=a(l);for(const d in r)r[d].protectedKeys={};return u}return{animateChanges:a,setActive:s,setAnimateFunction:i,getState:()=>r,reset:()=>{r=U1()}}}function Upe(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!sL(t,e):!1}function ao(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function U1(){return{animate:ao(!0),whileInView:ao(),whileHover:ao(),whileTap:ao(),whileDrag:ao(),whileFocus:ao(),exit:ao()}}function H1(e,t){e.min=t.min,e.max=t.max}function hr(e,t){H1(e.x,t.x),H1(e.y,t.y)}function G1(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const lL=1e-4,Hpe=1-lL,Gpe=1+lL,cL=.01,Ype=0-cL,qpe=0+cL;function jt(e){return e.max-e.min}function Xpe(e,t,r){return Math.abs(e-t)<=r}function Y1(e,t,r,n=.5){e.origin=n,e.originPoint=Be(t.min,t.max,e.origin),e.scale=jt(r)/jt(t),e.translate=Be(r.min,r.max,e.origin)-e.originPoint,(e.scale>=Hpe&&e.scale<=Gpe||isNaN(e.scale))&&(e.scale=1),(e.translate>=Ype&&e.translate<=qpe||isNaN(e.translate))&&(e.translate=0)}function Ma(e,t,r,n){Y1(e.x,t.x,r.x,n?n.originX:void 0),Y1(e.y,t.y,r.y,n?n.originY:void 0)}function q1(e,t,r){e.min=r.min+t.min,e.max=e.min+jt(t)}function Zpe(e,t,r){q1(e.x,t.x,r.x),q1(e.y,t.y,r.y)}function X1(e,t,r){e.min=t.min-r.min,e.max=e.min+jt(t)}function vu(e,t,r){X1(e.x,t.x,r.x),X1(e.y,t.y,r.y)}function Z1(e,t,r,n,o){return e-=t,e=mu(e,1/r,n),o!==void 0&&(e=mu(e,1/o,n)),e}function Qpe(e,t=0,r=1,n=.5,o,i=e,a=e){if(Vr.test(t)&&(t=parseFloat(t),t=Be(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=Be(i.min,i.max,n);e===i&&(s-=t),e.min=Z1(e.min,t,r,s,o),e.max=Z1(e.max,t,r,s,o)}function Q1(e,t,[r,n,o],i,a){Qpe(e,t[r],t[n],t[o],t.scale,i,a)}const Jpe=["x","scaleX","originX"],ehe=["y","scaleY","originY"];function J1(e,t,r,n){Q1(e.x,t,Jpe,r?r.x:void 0,n?n.x:void 0),Q1(e.y,t,ehe,r?r.y:void 0,n?n.y:void 0)}function eO(e){return e.translate===0&&e.scale===1}function uL(e){return eO(e.x)&&eO(e.y)}function tO(e,t){return e.min===t.min&&e.max===t.max}function the(e,t){return tO(e.x,t.x)&&tO(e.y,t.y)}function rO(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function dL(e,t){return rO(e.x,t.x)&&rO(e.y,t.y)}function nO(e){return jt(e.x)/jt(e.y)}function oO(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function kr(e){return[e("x"),e("y")]}function rhe(e,t,r){let n="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=r?.z||0;if((o||i||a)&&(n=`translate3d(${o}px, ${i}px, ${a}px) `),(t.x!==1||t.y!==1)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),r){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:h,skewY:v}=r;c&&(n=`perspective(${c}px) ${n}`),u&&(n+=`rotate(${u}deg) `),d&&(n+=`rotateX(${d}deg) `),f&&(n+=`rotateY(${f}deg) `),h&&(n+=`skewX(${h}deg) `),v&&(n+=`skewY(${v}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return(s!==1||l!==1)&&(n+=`scale(${s}, ${l})`),n||"none"}const fL=["TopLeft","TopRight","BottomLeft","BottomRight"],nhe=fL.length,iO=e=>typeof e=="string"?parseFloat(e):e,aO=e=>typeof e=="number"||Q.test(e);function ohe(e,t,r,n,o,i){o?(e.opacity=Be(0,r.opacity??1,ihe(n)),e.opacityExit=Be(t.opacity??1,0,ahe(n))):i&&(e.opacity=Be(t.opacity??1,r.opacity??1,n));for(let a=0;a<nhe;a++){const s=`border${fL[a]}Radius`;let l=sO(t,s),c=sO(r,s);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||aO(l)===aO(c)?(e[s]=Math.max(Be(iO(l),iO(c),n),0),(Vr.test(c)||Vr.test(l))&&(e[s]+="%")):e[s]=c}(t.rotate||r.rotate)&&(e.rotate=Be(t.rotate||0,r.rotate||0,n))}function sO(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const ihe=pL(0,.5,i2),ahe=pL(.5,.95,lr);function pL(e,t,r){return n=>n<e?0:n>t?1:r(Qa(e,t,n))}function she(e,t,r){const n=Ct(e)?e:ji(e);return n.start(Nb("",n,t,r)),n.animation}function rs(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r)}const lhe=(e,t)=>e.depth-t.depth;class che{constructor(){this.children=[],this.isDirty=!1}add(t){gb(this.children,t),this.isDirty=!0}remove(t){uu(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(lhe),this.isDirty=!1,this.children.forEach(t)}}function uhe(e,t){const r=Nt.now(),n=({timestamp:o})=>{const i=o-r;i>=t&&(Kn(n),e(i-t))};return _e.setup(n,!0),()=>Kn(n)}function tc(e){return Ct(e)?e.get():e}class dhe{constructor(){this.members=[]}add(t){gb(this.members,t);for(let r=this.members.length-1;r>=0;r--){const n=this.members[r];if(n===t||n===this.lead||n===this.prevLead)continue;const o=n.instance;o&&o.isConnected===!1&&n.isPresent!==!1&&!n.snapshot&&uu(this.members,n)}t.scheduleRender()}remove(t){if(uu(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){const r=this.members.findIndex(o=>t===o);if(r===0)return!1;let n;for(let o=r;o>=0;o--){const i=this.members[o],a=i.instance;if(i.isPresent!==!1&&(!a||a.isConnected!==!1)){n=i;break}}return n?(this.promote(n),!0):!1}promote(t,r){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender();const o=n.options.layoutDependency,i=t.options.layoutDependency;if(!(o!==void 0&&i!==void 0&&o===i)){const l=n.instance;l&&l.isConnected===!1&&!n.snapshot||(t.resumeFrom=n,r&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0))}const{crossfade:s}=t.options;s===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:r,resumingFrom:n}=t;r.onExitComplete&&r.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const rc={hasAnimatedSinceResize:!0,hasEverUpdated:!1},ch=["","X","Y","Z"],fhe=1e3;let phe=0;function uh(e,t,r,n){const{latestValues:o}=t;o[e]&&(r[e]=o[e],t.setStaticValue(e,0),n&&(n[e]=0))}function hL(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const r=j2(t);if(window.MotionHasOptimisedAnimation(r,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",_e,!(o||i))}const{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&hL(n)}function mL({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:o}){return class{constructor(a={},s=t?.()){this.id=phe++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(vhe),this.nodes.forEach(xhe),this.nodes.forEach(whe),this.nodes.forEach(ghe)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new che)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new bb),this.eventHandlers.get(a).add(s)}notifyListeners(a,...s){const l=this.eventHandlers.get(a);l&&l.notify(...s)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=Vb(a)&&!mpe(a),this.instance=a;const{layoutId:s,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||s)&&(this.isLayoutDirty=!0),e){let u,d=0;const f=()=>this.root.updateBlockedByResize=!1;_e.read(()=>{d=window.innerWidth}),e(a,()=>{const h=window.innerWidth;h!==d&&(d=h,this.root.updateBlockedByResize=!0,u&&u(),u=uhe(f,250),rc.hasAnimatedSinceResize&&(rc.hasAnimatedSinceResize=!1,this.nodes.forEach(uO)))})}s&&this.root.registerSharedNode(s,this),this.options.animate!==!1&&c&&(s||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||c.getDefaultTransition()||Ehe,{onLayoutAnimationStart:m,onLayoutAnimationComplete:g}=c.getProps(),y=!this.targetLayout||!dL(this.targetLayout,h),x=!d&&f;if(this.options.layoutRoot||this.resumeFrom||x||d&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={..._b(v,"layout"),onPlay:m,onComplete:g};(c.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(u,x)}else d||uO(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Kn(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(She),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&hL(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:s,layout:l}=this.options;if(s===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(lO);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(cO);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(bhe),this.nodes.forEach(hhe),this.nodes.forEach(mhe)):this.nodes.forEach(cO),this.clearAllSnapshots();const s=Nt.now();yt.delta=Ur(0,1e3/60,s-yt.timestamp),yt.timestamp=s,yt.isProcessing=!0,th.update.process(yt),th.preRender.process(yt),th.render.process(yt),yt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Lb.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(yhe),this.sharedNodes.forEach(Phe)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,_e.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){_e.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!jt(this.snapshot.measuredBox.x)&&!jt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=nt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(s=!1),s&&this.instance){const l=n(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:l,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!uL(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;a&&this.instance&&(s||fo(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const s=this.measurePageBox();let l=this.removeElementScroll(s);return a&&(l=this.removeTransform(l)),Ahe(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return nt();const s=a.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(The))){const{scroll:c}=this.root;c&&(mi(s.x,c.offset.x),mi(s.y,c.offset.y))}return s}removeElementScroll(a){const s=nt();if(hr(s,a),this.scroll?.wasRoot)return s;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:d}=c;c!==this.root&&u&&d.layoutScroll&&(u.wasRoot&&hr(s,a),mi(s.x,u.offset.x),mi(s.y,u.offset.y))}return s}applyTransform(a,s=!1){const l=nt();hr(l,a);for(let c=0;c<this.path.length;c++){const u=this.path[c];!s&&u.options.layoutScroll&&u.scroll&&u!==u.root&&vi(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),fo(u.latestValues)&&vi(l,u.latestValues)}return fo(this.latestValues)&&vi(l,this.latestValues),l}removeTransform(a){const s=nt();hr(s,a);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!fo(c.latestValues))continue;Zm(c.latestValues)&&c.updateSnapshot();const u=nt(),d=c.measurePageBox();hr(u,d),J1(s,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return fo(this.latestValues)&&J1(s,this.latestValues),s}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==yt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){const s=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=s.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=s.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=s.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==s;if(!(a||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!this.layout||!(u||d))return;this.resolvedRelativeTargetAt=yt.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=nt(),this.targetWithTransforms=nt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Zpe(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):hr(this.target,this.layout.layoutBox),Q2(this.target,this.targetDelta)):hr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Zm(this.parent.latestValues)||Z2(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(a,s,l){this.relativeParent=a,this.linkedParentVersion=a.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=nt(),this.relativeTargetOrigin=nt(),vu(this.relativeTargetOrigin,s,l),hr(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const a=this.getLead(),s=!!this.resumingFrom||this!==a;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),s&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===yt.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;hr(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;Epe(this.layoutCorrected,this.treeScale,this.path,s),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=nt());const{target:h}=a;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(G1(this.prevProjectionDelta.x,this.projectionDelta.x),G1(this.prevProjectionDelta.y,this.projectionDelta.y)),Ma(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!oO(this.projectionDelta.x,this.prevProjectionDelta.x)||!oO(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){if(this.options.visualElement?.scheduleRender(),a){const s=this.getStack();s&&s.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=hi(),this.projectionDelta=hi(),this.projectionDeltaWithTransform=hi()}setAnimationOrigin(a,s=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=hi();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const f=nt(),h=l?l.source:void 0,v=this.layout?this.layout.source:void 0,m=h!==v,g=this.getStack(),y=!g||g.members.length<=1,x=!!(m&&!y&&this.options.crossfade===!0&&!this.path.some(Ohe));this.animationProgress=0;let w;this.mixTargetDelta=S=>{const P=S/1e3;dO(d.x,a.x,P),dO(d.y,a.y,P),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(vu(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Che(this.relativeTarget,this.relativeTargetOrigin,f,P),w&&the(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=nt()),hr(w,this.relativeTarget)),m&&(this.animationValues=u,ohe(u,c,this.latestValues,P,x,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Kn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=_e.update(()=>{rc.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=ji(0)),this.currentAnimation=she(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:s=>{this.mixTargetDelta(s),a.onUpdate&&a.onUpdate(s)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(fhe),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:c,latestValues:u}=a;if(!(!s||!l||!c)){if(this!==a&&this.layout&&c&&vL(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||nt();const d=jt(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+d;const f=jt(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+f}hr(s,l),vi(s,u),Ma(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new dhe),this.sharedNodes.get(a).add(s);const c=s.options.initialPromotionConfig;s.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(s):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){const{layoutId:a}=this.options;return a?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:a}=this.options;return a?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:l}=a;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(s=!0),!s)return;const c={};l.z&&uh("z",a,c,this.animationValues);for(let u=0;u<ch.length;u++)uh(`rotate${ch[u]}`,a,c,this.animationValues),uh(`skew${ch[u]}`,a,c,this.animationValues);a.render();for(const u in c)a.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);a.scheduleRender()}applyProjectionStyles(a,s){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=tc(s?.pointerEvents)||"",a.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=tc(s?.pointerEvents)||""),this.hasProjected&&!fo(this.latestValues)&&(a.transform=l?l({},""):"none",this.hasProjected=!1);return}a.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=rhe(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),a.transform=d;const{x:f,y:h}=this.projectionDelta;a.transformOrigin=`${f.origin*100}% ${h.origin*100}% 0`,c.animationValues?a.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:a.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const v in Jm){if(u[v]===void 0)continue;const{correct:m,applyTo:g,isCSSVariable:y}=Jm[v],x=d==="none"?u[v]:m(u[v],c);if(g){const w=g.length;for(let S=0;S<w;S++)a[g[S]]=x}else y?this.options.visualElement.renderState.vars[v]=x:a[v]=x}this.options.layoutId&&(a.pointerEvents=c===this?tc(s?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>a.currentAnimation?.stop()),this.root.nodes.forEach(lO),this.root.sharedNodes.clear()}}}function hhe(e){e.updateLayout()}function mhe(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:n}=e.layout,{animationType:o}=e.options,i=t.source!==e.layout.source;o==="size"?kr(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],f=jt(d);d.min=r[u].min,d.max=d.min+f}):vL(o,t.layoutBox,r)&&kr(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],f=jt(r[u]);d.max=d.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+f)});const a=hi();Ma(a,r,t.layoutBox);const s=hi();i?Ma(s,e.applyTransform(n,!0),t.measuredBox):Ma(s,r,t.layoutBox);const l=!uL(a);let c=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:d,layout:f}=u;if(d&&f){const h=nt();vu(h,t.layoutBox,d.layoutBox);const v=nt();vu(v,r,f.layoutBox),dL(h,v)||(c=!0),u.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=h,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:s,layoutDelta:a,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function vhe(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function ghe(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function yhe(e){e.clearSnapshot()}function lO(e){e.clearMeasurements()}function cO(e){e.isLayoutDirty=!1}function bhe(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function uO(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function xhe(e){e.resolveTargetDelta()}function whe(e){e.calcProjection()}function She(e){e.resetSkewAndRotation()}function Phe(e){e.removeLeadSnapshot()}function dO(e,t,r){e.translate=Be(t.translate,0,r),e.scale=Be(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function fO(e,t,r,n){e.min=Be(t.min,r.min,n),e.max=Be(t.max,r.max,n)}function Che(e,t,r,n){fO(e.x,t.x,r.x,n),fO(e.y,t.y,r.y,n)}function Ohe(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Ehe={duration:.45,ease:[.4,0,.1,1]},pO=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),hO=pO("applewebkit/")&&!pO("chrome/")?Math.round:lr;function mO(e){e.min=hO(e.min),e.max=hO(e.max)}function Ahe(e){mO(e.x),mO(e.y)}function vL(e,t,r){return e==="position"||e==="preserve-aspect"&&!Xpe(nO(t),nO(r),.2)}function The(e){return e!==e.root&&e.scroll?.wasRoot}const Mhe=mL({attachResizeListener:(e,t)=>rs(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),dh={current:void 0},gL=mL({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!dh.current){const e=new Mhe({});e.mount(window),e.setOptions({layoutScroll:!0}),dh.current=e}return dh.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Kb=O.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function vO(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function khe(...e){return t=>{let r=!1;const n=e.map(o=>{const i=vO(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():vO(e[o],null)}}}}function Dhe(...e){return p.useCallback(khe(...e),e)}class _he extends p.Component{getSnapshotBeforeUpdate(t){const r=this.props.childRef.current;if(r&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const n=r.offsetParent,o=qm(n)&&n.offsetWidth||0,i=qm(n)&&n.offsetHeight||0,a=this.props.sizeRef.current;a.height=r.offsetHeight||0,a.width=r.offsetWidth||0,a.top=r.offsetTop,a.left=r.offsetLeft,a.right=o-a.width-a.left,a.bottom=i-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}}function Nhe({children:e,isPresent:t,anchorX:r,anchorY:n,root:o,pop:i}){const a=O.useId(),s=O.useRef(null),l=O.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:c}=O.useContext(Kb),u=e.props?.ref??e?.ref,d=Dhe(s,u);return O.useInsertionEffect(()=>{const{width:f,height:h,top:v,left:m,right:g,bottom:y}=l.current;if(t||i===!1||!s.current||!f||!h)return;const x=r==="left"?`left: ${m}`:`right: ${g}`,w=n==="bottom"?`bottom: ${y}`:`top: ${v}`;s.current.dataset.motionPopId=a;const S=document.createElement("style");c&&(S.nonce=c);const P=o??document.head;return P.appendChild(S),S.sheet&&S.sheet.insertRule(`
100
+ `).concat(S.x,",").concat(S.y),C=We(e.id)?Da("recharts-radial-line-"):e.id;return p.createElement("text",Zr({},n,{dominantBaseline:"central",className:ve("recharts-radial-bar-label",a)}),p.createElement("defs",null,p.createElement("path",{id:C,d:P})),p.createElement("textPath",{xlinkHref:"#".concat(C)},r))},mZ=(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:d}=Xe(n,o,a+t,c);return{x:u,y:d,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 f=(i+a)/2,{x:h,y:v}=Xe(n,o,f,c);return{x:h,y:v,textAnchor:"middle",verticalAnchor:"middle"}},Gl=e=>e!=null&&"cx"in e&&Y(e.cx),vZ={angle:0,offset:5,zIndex:Ze.label,position:"middle",textBreakAll:!1};function gZ(e){if(!Gl(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 Dn(e){var t=et(e,vZ),{viewBox:r,parentViewBox:n,position:o,value:i,children:a,content:s,className:l="",textBreakAll:c,labelRef:u}=t,d=dZ(),f=FD(),h=o==="center"?f:d??f,v,m,g;r==null?v=h:Gl(r)?v=r:v=tg(r);var y=gZ(v);if(!v||We(i)&&We(a)&&!O.isValidElement(s)&&typeof s!="function")return null;var x=wa(wa({},t),{},{viewBox:v});if(O.isValidElement(s)){var{labelRef:w}=x,S=IP(x,nZ);return O.cloneElement(s,S)}if(typeof s=="function"){var{content:P}=x,C=IP(x,oZ);if(m=O.createElement(s,C),O.isValidElement(m))return m}else m=fZ(t);var E=Rt(t);if(Gl(v)){if(o==="insideStart"||o==="insideEnd"||o==="end")return hZ(t,o,m,E,v);g=mZ(v,t.offset,t.position)}else{if(!y)return null;var A=rZ({viewBox:y,position:o,offset:t.offset,parentViewBox:Gl(n)?void 0:n});g=wa(wa({x:A.x,y:A.y,textAnchor:A.horizontalAnchor,verticalAnchor:A.verticalAnchor},A.width!==void 0?{width:A.width}:{}),A.height!==void 0?{height:A.height}:{})}return p.createElement(Wt,{zIndex:t.zIndex},p.createElement(vd,Zr({ref:u,className:ve("recharts-label",l)},E,g,{textAnchor:YX(E.textAnchor)?E.textAnchor:g.textAnchor,breakAll:c}),m))}Dn.displayName="Label";var yZ=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?p.createElement(Dn,Zr({key:"label-implicit"},n)):Br(e)?p.createElement(Dn,Zr({key:"label-implicit",value:e},n)):O.isValidElement(e)?e.type===Dn?O.cloneElement(e,wa({key:"label-implicit"},n)):p.createElement(Dn,Zr({key:"label-implicit",content:e},n)):by(e)?p.createElement(Dn,Zr({key:"label-implicit",content:e},n)):e&&typeof e=="object"?p.createElement(Dn,Zr({},e,{key:"label-implicit"},n)):null};function bZ(e){var{label:t,labelRef:r}=e,n=FD();return yZ(t,n,r)||null}var jp={},Ip={},LP;function xZ(){return LP||(LP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r[r.length-1]}e.last=t})(Ip)),Ip}var Rp={},$P;function wZ(){return $P||($P=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Array.isArray(r)?r:Array.from(r)}e.toArray=t})(Rp)),Rp}var VP;function SZ(){return VP||(VP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=xZ(),r=wZ(),n=zv();function o(i){if(n.isArrayLike(i))return t.last(r.toArray(i))}e.last=o})(jp)),jp}var Lp,FP;function PZ(){return FP||(FP=1,Lp=SZ().last),Lp}var CZ=PZ();const OZ=Gn(CZ);var EZ=["valueAccessor"],AZ=["dataKey","clockWise","id","textBreakAll","zIndex"];function Hc(){return Hc=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},Hc.apply(null,arguments)}function BP(e,t){if(e==null)return{};var r,n,o=TZ(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 TZ(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 MZ=e=>Array.isArray(e.value)?OZ(e.value):e.value,BD=O.createContext(void 0),WD=BD.Provider,zD=O.createContext(void 0),kZ=zD.Provider;function DZ(){return O.useContext(BD)}function _Z(){return O.useContext(zD)}function Yl(e){var{valueAccessor:t=MZ}=e,r=BP(e,EZ),{dataKey:n,clockWise:o,id:i,textBreakAll:a,zIndex:s}=r,l=BP(r,AZ),c=DZ(),u=_Z(),d=c||u;return!d||!d.length?null:p.createElement(Wt,{zIndex:s??Ze.label},p.createElement(ht,{className:"recharts-label-list"},d.map((f,h)=>{var v,m=We(n)?t(f,h):Ae(f.payload,n),g=We(i)?{}:{id:"".concat(i,"-").concat(h)};return p.createElement(Dn,Hc({key:"label-".concat(h)},Rt(f),l,g,{fill:(v=r.fill)!==null&&v!==void 0?v:f.fill,parentViewBox:f.parentViewBox,value:m,textBreakAll:a,viewBox:f.viewBox,index:h,zIndex:0}))})))}Yl.displayName="LabelList";function xy(e){var{label:t}=e;return t?t===!0?p.createElement(Yl,{key:"labelList-implicit"}):p.isValidElement(t)||by(t)?p.createElement(Yl,{key:"labelList-implicit",content:t}):typeof t=="object"?p.createElement(Yl,Hc({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function vm(){return vm=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},vm.apply(null,arguments)}var KD=e=>{var{cx:t,cy:r,r:n,className:o}=e,i=ve("recharts-dot",o);return Y(t)&&Y(r)&&Y(n)?p.createElement("circle",vm({},Zt(e),Wv(e),{className:i,cx:t,cy:r,r:n})):null},UD=e=>e.graphicalItems.polarItems,NZ=I([ze,Os],Bg),gd=I([UD,Ge,NZ],Wg),jZ=I([gd],zg),yd=I([jZ,nd],Kg),IZ=I([yd,Ge,gd],Hg);I([yd,Ge,gd],(e,t,r)=>r.length>0?e.flatMap(n=>r.flatMap(o=>{var i,a=Ae(n,(i=t.dataKey)!==null&&i!==void 0?i:o.dataKey);return{value:a,errorDomain:[]}})).filter(Boolean):t?.dataKey!=null?e.map(n=>({value:Ae(n,t.dataKey),errorDomain:[]})):e.map(n=>({value:n,errorDomain:[]})));var WP=()=>{},RZ=I([yd,Ge,gd,fd,ze],Xg),LZ=I([Ge,Yg,qg,WP,RZ,WP,ye,ze],Zg),HD=I([Ge,ye,yd,IZ,Cs,ze,LZ],Qg),$Z=I([HD,Ui,Xn],ty),VZ=I([Ge,HD,$Z,ze],ny);I([Xn,VZ],Dk);var FZ={radiusAxis:{},angleAxis:{}},GD=Bt({name:"polarAxis",initialState:FZ,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:Mye,removeRadiusAxis:kye,addAngleAxis:Dye,removeAngleAxis:_ye}=GD.actions,BZ=GD.reducer;function YD(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}function zP(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 KP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zP(Object(r),!0).forEach(function(n){WZ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function WZ(e,t,r){return(t=zZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zZ(e){var t=KZ(e,"string");return typeof t=="symbol"?t:t+""}function KZ(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 UZ=(e,t)=>t,wy=I([UD,UZ],(e,t)=>e.filter(r=>r.type==="pie").find(r=>r.id===t)),HZ=[],Sy=(e,t,r)=>r?.length===0?HZ:r,qD=I([nd,wy,Sy],(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=>KP(KP({},t.presentationProps),i.props))),o!=null)return o}}),GZ=I([qD,wy,Sy],(e,t,r)=>{if(!(e==null||t==null))return e.map((n,o)=>{var i,a=Ae(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:Fi(a,t.dataKey),color:s,payload:n,type:t.legendType}})}),YZ=I([qD,wy,Sy,at],(e,t,r,n)=>{if(!(t==null||e==null))return XQ({offset:n,pieSettings:t,displayedData:e,cells:r})}),Tl={exports:{}},Oe={};var UP;function qZ(){if(UP)return Oe;UP=1;var e=60103,t=60106,r=60107,n=60108,o=60114,i=60109,a=60110,s=60112,l=60113,c=60120,u=60115,d=60116,f=60121,h=60122,v=60117,m=60129,g=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"),d=y("react.lazy"),f=y("react.block"),h=y("react.server.block"),v=y("react.fundamental"),m=y("react.debug_trace_mode"),g=y("react.legacy_hidden")}function x(N){if(typeof N=="object"&&N!==null){var R=N.$$typeof;switch(R){case e:switch(N=N.type,N){case r:case o:case n:case l:case c:return N;default:switch(N=N&&N.$$typeof,N){case a:case s:case d:case u:case i:return N;default:return R}}case t:return R}}}var w=i,S=e,P=s,C=r,E=d,A=u,T=t,M=o,_=n,k=l;return Oe.ContextConsumer=a,Oe.ContextProvider=w,Oe.Element=S,Oe.ForwardRef=P,Oe.Fragment=C,Oe.Lazy=E,Oe.Memo=A,Oe.Portal=T,Oe.Profiler=M,Oe.StrictMode=_,Oe.Suspense=k,Oe.isAsyncMode=function(){return!1},Oe.isConcurrentMode=function(){return!1},Oe.isContextConsumer=function(N){return x(N)===a},Oe.isContextProvider=function(N){return x(N)===i},Oe.isElement=function(N){return typeof N=="object"&&N!==null&&N.$$typeof===e},Oe.isForwardRef=function(N){return x(N)===s},Oe.isFragment=function(N){return x(N)===r},Oe.isLazy=function(N){return x(N)===d},Oe.isMemo=function(N){return x(N)===u},Oe.isPortal=function(N){return x(N)===t},Oe.isProfiler=function(N){return x(N)===o},Oe.isStrictMode=function(N){return x(N)===n},Oe.isSuspense=function(N){return x(N)===l},Oe.isValidElementType=function(N){return typeof N=="string"||typeof N=="function"||N===r||N===o||N===m||N===n||N===l||N===c||N===g||typeof N=="object"&&N!==null&&(N.$$typeof===d||N.$$typeof===u||N.$$typeof===i||N.$$typeof===a||N.$$typeof===s||N.$$typeof===v||N.$$typeof===f||N[0]===h)},Oe.typeOf=x,Oe}var Ee={};var HP;function XZ(){return HP||(HP=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,d=60116,f=60121,h=60122,v=60117,m=60129,g=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"),d=y("react.lazy"),f=y("react.block"),h=y("react.server.block"),v=y("react.fundamental"),y("react.scope"),y("react.opaque.id"),m=y("react.debug_trace_mode"),y("react.offscreen"),g=y("react.legacy_hidden")}var x=!1;function w(W){return!!(typeof W=="string"||typeof W=="function"||W===r||W===o||W===m||W===n||W===l||W===c||W===g||x||typeof W=="object"&&W!==null&&(W.$$typeof===d||W.$$typeof===u||W.$$typeof===i||W.$$typeof===a||W.$$typeof===s||W.$$typeof===v||W.$$typeof===f||W[0]===h))}function S(W){if(typeof W=="object"&&W!==null){var V=W.$$typeof;switch(V){case e:var he=W.type;switch(he){case r:case o:case n:case l:case c:return he;default:var ue=he&&he.$$typeof;switch(ue){case a:case s:case d:case u:case i:return ue;default:return V}}case t:return V}}}var P=a,C=i,E=e,A=s,T=r,M=d,_=u,k=t,N=o,R=n,z=l,B=!1,F=!1;function j(W){return B||(B=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function L(W){return F||(F=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function H(W){return S(W)===a}function re(W){return S(W)===i}function le(W){return typeof W=="object"&&W!==null&&W.$$typeof===e}function ae(W){return S(W)===s}function oe(W){return S(W)===r}function Se(W){return S(W)===d}function Me(W){return S(W)===u}function K(W){return S(W)===t}function fe(W){return S(W)===o}function $(W){return S(W)===n}function G(W){return S(W)===l}Ee.ContextConsumer=P,Ee.ContextProvider=C,Ee.Element=E,Ee.ForwardRef=A,Ee.Fragment=T,Ee.Lazy=M,Ee.Memo=_,Ee.Portal=k,Ee.Profiler=N,Ee.StrictMode=R,Ee.Suspense=z,Ee.isAsyncMode=j,Ee.isConcurrentMode=L,Ee.isContextConsumer=H,Ee.isContextProvider=re,Ee.isElement=le,Ee.isForwardRef=ae,Ee.isFragment=oe,Ee.isLazy=Se,Ee.isMemo=Me,Ee.isPortal=K,Ee.isProfiler=fe,Ee.isStrictMode=$,Ee.isSuspense=G,Ee.isValidElementType=w,Ee.typeOf=S})()),Ee}var GP;function ZZ(){return GP||(GP=1,process.env.NODE_ENV==="production"?Tl.exports=qZ():Tl.exports=XZ()),Tl.exports}var QZ=ZZ(),YP=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",qP=null,$p=null,XD=e=>{if(e===qP&&Array.isArray($p))return $p;var t=[];return O.Children.forEach(e,r=>{We(r)||(QZ.isFragment(r)?t=t.concat(XD(r.props.children)):t.push(r))}),$p=t,qP=e,t};function Py(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(o=>YP(o)):n=[YP(t)],XD(e).forEach(o=>{var i=ko(o,"type.displayName")||ko(o,"type.name");i&&n.indexOf(i)!==-1&&r.push(o)}),r}var ZD=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0,Vp={},XP;function JZ(){return XP||(XP=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})(Vp)),Vp}var Fp,ZP;function eQ(){return ZP||(ZP=1,Fp=JZ().isPlainObject),Fp}var tQ=eQ();const rQ=Gn(tQ);var QP,JP,eC,tC,rC;function nC(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 oC(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nC(Object(r),!0).forEach(function(n){nQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nQ(e,t,r){return(t=oQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oQ(e){var t=iQ(e,"string");return typeof t=="symbol"?t:t+""}function iQ(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 Gc(){return Gc=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},Gc.apply(null,arguments)}function ha(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var iC=(e,t,r,n,o)=>{var i=r-n,a;return a=Ue(QP||(QP=ha(["M ",",",""])),e,t),a+=Ue(JP||(JP=ha(["L ",",",""])),e+r,t),a+=Ue(eC||(eC=ha(["L ",",",""])),e+r-i/2,t+o),a+=Ue(tC||(tC=ha(["L ",",",""])),e+r-i/2-n,t+o),a+=Ue(rC||(rC=ha(["L ",","," Z"])),e,t),a},aQ={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},sQ=e=>{var t=et(e,aQ),{x:r,y:n,upperWidth:o,lowerWidth:i,height:a,className:s}=t,{animationEasing:l,animationDuration:c,animationBegin:u,isUpdateAnimationActive:d}=t,f=O.useRef(null),[h,v]=O.useState(-1),m=O.useRef(o),g=O.useRef(i),y=O.useRef(a),x=O.useRef(r),w=O.useRef(n),S=bs(e,"trapezoid-");if(O.useEffect(()=>{if(f.current&&f.current.getTotalLength)try{var R=f.current.getTotalLength();R&&v(R)}catch{}},[]),r!==+r||n!==+n||o!==+o||i!==+i||a!==+a||o===0&&i===0||a===0)return null;var P=ve("recharts-trapezoid",s);if(!d)return p.createElement("g",null,p.createElement("path",Gc({},Rt(t),{className:P,d:iC(r,n,o,i,a)})));var C=m.current,E=g.current,A=y.current,T=x.current,M=w.current,_="0px ".concat(h===-1?1:h,"px"),k="".concat(h,"px 0px"),N=wM(["strokeDasharray"],c,l);return p.createElement(ys,{animationId:S,key:S,canBegin:h>0,duration:c,easing:l,isActive:d,begin:u},R=>{var z=Le(C,o,R),B=Le(E,i,R),F=Le(A,a,R),j=Le(T,r,R),L=Le(M,n,R);f.current&&(m.current=z,g.current=B,y.current=F,x.current=j,w.current=L);var H=R>0?{transition:N,strokeDasharray:k}:{strokeDasharray:_};return p.createElement("path",Gc({},Rt(t),{className:P,d:iC(j,L,z,B,F),ref:f,style:oC(oC({},H),t.style)}))})},lQ=["option","shapeType","activeClassName"];function cQ(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}function aC(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 Yc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?aC(Object(r),!0).forEach(function(n){dQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):aC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function dQ(e,t,r){return(t=fQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fQ(e){var t=pQ(e,"string");return typeof t=="symbol"?t:t+""}function pQ(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 hQ(e,t){return Yc(Yc({},t),e)}function mQ(e,t){return e==="symbols"}function sC(e){var{shapeType:t,elementProps:r}=e;switch(t){case"rectangle":return p.createElement(OM,r);case"trapezoid":return p.createElement(sQ,r);case"sector":return p.createElement(MM,r);case"symbols":if(mQ(t))return p.createElement(Bv,r);break;case"curve":return p.createElement(ag,r);default:return null}}function vQ(e){return O.isValidElement(e)?e.props:e}function Cy(e){var{option:t,shapeType:r,activeClassName:n="recharts-active-shape"}=e,o=cQ(e,lQ),i;if(O.isValidElement(t))i=O.cloneElement(t,Yc(Yc({},o),vQ(t)));else if(typeof t=="function")i=t(o,o.index);else if(rQ(t)&&typeof t!="boolean"){var a=hQ(t,o);i=p.createElement(sC,{shapeType:r,elementProps:a})}else{var s=o;i=p.createElement(sC,{shapeType:r,elementProps:s})}return o.isActive?p.createElement(ht,{className:n},i):i}var Oy=(e,t,r)=>{var n=Ne();return(o,i)=>a=>{e?.(o,i,a),n(sD({activeIndex:String(i),activeDataKey:t,activeCoordinate:o.tooltipPosition,activeGraphicalItemId:r}))}},Ey=e=>{var t=Ne();return(r,n)=>o=>{e?.(r,n,o),t(g9())}},Ay=(e,t,r)=>{var n=Ne();return(o,i)=>a=>{e?.(o,i,a),n(y9({activeIndex:String(i),activeDataKey:t,activeCoordinate:o.tooltipPosition,activeGraphicalItemId:r}))}};function Ty(e){var{tooltipEntrySettings:t}=e,r=Ne(),n=Tt(),o=O.useRef(null);return O.useLayoutEffect(()=>{n||(o.current===null?r(p9(t)):o.current!==t&&r(h9({prev:o.current,next:t})),o.current=t)},[t,r,n]),O.useLayoutEffect(()=>()=>{o.current&&(r(m9(o.current)),o.current=null)},[r]),null}function QD(e){var{legendPayload:t}=e,r=Ne(),n=Tt(),o=O.useRef(null);return O.useLayoutEffect(()=>{n||(o.current===null?r(gM(t)):o.current!==t&&r(yM({prev:o.current,next:t})),o.current=t)},[r,n,t]),O.useLayoutEffect(()=>()=>{o.current&&(r(bM(o.current)),o.current=null)},[r]),null}function gQ(e){var{legendPayload:t}=e,r=Ne(),n=J(ye),o=O.useRef(null);return O.useLayoutEffect(()=>{n!=="centric"&&n!=="radial"||(o.current===null?r(gM(t)):o.current!==t&&r(yM({prev:o.current,next:t})),o.current=t)},[r,n,t]),O.useLayoutEffect(()=>()=>{o.current&&(r(bM(o.current)),o.current=null)},[r]),null}var Bp,yQ=()=>{var[e]=p.useState(()=>Da("uid-"));return e},bQ=(Bp=p.useId)!==null&&Bp!==void 0?Bp:yQ;function xQ(e,t){var r=bQ();return t||(e?"".concat(e,"-").concat(r):r)}var wQ=O.createContext(void 0),My=e=>{var{id:t,type:r,children:n}=e,o=xQ("recharts-".concat(r),t);return p.createElement(wQ.Provider,{value:o},n(o))},SQ={cartesianItems:[],polarItems:[]},JD=Bt({name:"graphicalItems",initialState:SQ,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:Re()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:r,next:n}=t.payload,o=br(e).cartesianItems.indexOf(r);o>-1&&(e.cartesianItems[o]=n)},prepare:Re()},removeCartesianGraphicalItem:{reducer(e,t){var r=br(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},prepare:Re()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:Re()},removePolarGraphicalItem:{reducer(e,t){var r=br(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)},prepare:Re()}}}),{addCartesianGraphicalItem:PQ,replaceCartesianGraphicalItem:CQ,removeCartesianGraphicalItem:OQ,addPolarGraphicalItem:EQ,removePolarGraphicalItem:AQ}=JD.actions,TQ=JD.reducer,MQ=e=>{var t=Ne(),r=O.useRef(null);return O.useLayoutEffect(()=>{r.current===null?t(PQ(e)):r.current!==e&&t(CQ({prev:r.current,next:e})),r.current=e},[t,e]),O.useLayoutEffect(()=>()=>{r.current&&(t(OQ(r.current)),r.current=null)},[t]),null},e_=O.memo(MQ);function kQ(e){var t=Ne();return O.useLayoutEffect(()=>(t(EQ(e)),()=>{t(AQ(e))}),[t,e]),null}var DQ=["key"],_Q=["onMouseEnter","onClick","onMouseLeave"],NQ=["id"],jQ=["id"];function lC(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 He(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lC(Object(r),!0).forEach(function(n){IQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function IQ(e,t,r){return(t=RQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function RQ(e){var t=LQ(e,"string");return typeof t=="symbol"?t:t+""}function LQ(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 Bn(){return Bn=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},Bn.apply(null,arguments)}function bd(e,t){if(e==null)return{};var r,n,o=$Q(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 $Q(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 VQ(e){var t=O.useMemo(()=>Py(e.children,Ds),[e.children]),r=J(n=>GZ(n,e.id,t));return r==null?null:p.createElement(gQ,{legendPayload:r})}var FQ=p.memo(e=>{var{dataKey:t,nameKey:r,sectors:n,stroke:o,strokeWidth:i,fill:a,name:s,hide:l,tooltipType:c,id:u}=e,d={dataDefinedOnItem:n.map(f=>f.tooltipPayload),getPosition:f=>{var h;return(h=n[Number(f)])===null||h===void 0?void 0:h.tooltipPosition},settings:{stroke:o,strokeWidth:i,fill:a,dataKey:t,nameKey:r,name:Fi(s,t),hide:l,type:c,color:a,unit:"",graphicalItemId:u}};return p.createElement(Ty,{tooltipEntrySettings:d})}),BQ=(e,t)=>e>t?"start":e<t?"end":"middle",WQ=(e,t,r)=>Ot(typeof t=="function"?t(e):t,r,r*.8),zQ=(e,t,r)=>{var{top:n,left:o,width:i,height:a}=t,s=EM(i,a),l=o+Ot(e.cx,i,i/2),c=n+Ot(e.cy,a,a/2),u=Ot(e.innerRadius,s,0),d=WQ(r,e.outerRadius,s),f=e.maxRadius||Math.sqrt(i*i+a*a)/2;return{cx:l,cy:c,innerRadius:u,outerRadius:d,maxRadius:f}},KQ=(e,t)=>{var r=ft(t-e),n=Math.min(Math.abs(t-e),360);return r*n},UQ=(e,t)=>{if(p.isValidElement(e))return p.cloneElement(e,t);if(typeof e=="function")return e(t);var r=ve("recharts-pie-label-line",typeof e!="boolean"?e.className:""),{key:n}=t,o=bd(t,DQ);return p.createElement(ag,Bn({},o,{type:"linear",className:r}))},HQ=(e,t,r)=>{if(p.isValidElement(e))return p.cloneElement(e,t);var n=r;if(typeof e=="function"&&(n=e(t),p.isValidElement(n)))return n;var o=ve("recharts-pie-label-text",YD(e));return p.createElement(vd,Bn({},t,{alignmentBaseline:"middle",className:o}),n)};function GQ(e){var{sectors:t,props:r,showLabels:n}=e,{label:o,labelLine:i,dataKey:a}=r;if(!n||!o||!t)return null;var s=Zt(r),l=To(o),c=To(i),u=typeof o=="object"&&"offsetRadius"in o&&typeof o.offsetRadius=="number"&&o.offsetRadius||20,d=t.map((f,h)=>{var v=(f.startAngle+f.endAngle)/2,m=Xe(f.cx,f.cy,f.outerRadius+u,v),g=He(He(He(He({},s),f),{},{stroke:"none"},l),{},{index:h,textAnchor:BQ(m.x,f.cx)},m),y=He(He(He(He({},s),f),{},{fill:"none",stroke:f.fill},c),{},{index:h,points:[Xe(f.cx,f.cy,f.outerRadius,v),m],key:"line"});return p.createElement(Wt,{zIndex:Ze.label,key:"label-".concat(f.startAngle,"-").concat(f.endAngle,"-").concat(f.midAngle,"-").concat(h)},p.createElement(ht,null,i&&UQ(i,y),HQ(o,g,Ae(f,a))))});return p.createElement(ht,{className:"recharts-pie-labels"},d)}function YQ(e){var{sectors:t,props:r,showLabels:n}=e,{label:o}=r;return typeof o=="object"&&o!=null&&"position"in o?p.createElement(xy,{label:o}):p.createElement(GQ,{sectors:t,props:r,showLabels:n})}function qQ(e){var{sectors:t,activeShape:r,inactiveShape:n,allOtherPieProps:o,shape:i,id:a}=e,s=J(Fn),l=J(fy),c=J(n7),{onMouseEnter:u,onClick:d,onMouseLeave:f}=o,h=bd(o,_Q),v=Oy(u,o.dataKey,a),m=Ey(f),g=Ay(d,o.dataKey,a);return t==null||t.length===0?null:p.createElement(p.Fragment,null,t.map((y,x)=>{if(y?.startAngle===0&&y?.endAngle===0&&t.length!==1)return null;var w=c==null||c===a,S=String(x)===s&&(l==null||o.dataKey===l)&&w,P=s?n:null,C=r&&S?r:P,E=He(He({},y),{},{stroke:y.stroke,tabIndex:-1,[rM]:x,[nM]:a});return p.createElement(ht,Bn({key:"sector-".concat(y?.startAngle,"-").concat(y?.endAngle,"-").concat(y.midAngle,"-").concat(x),tabIndex:-1,className:"recharts-pie-sector"},us(h,y,x),{onMouseEnter:v(y,x),onMouseLeave:m(y,x),onClick:g(y,x)}),p.createElement(Cy,Bn({option:i??C,index:x,shapeType:"sector",isActive:S},E)))}))}function XQ(e){var t,{pieSettings:r,displayedData:n,cells:o,offset:i}=e,{cornerRadius:a,startAngle:s,endAngle:l,dataKey:c,nameKey:u,tooltipType:d}=r,f=Math.abs(r.minAngle),h=KQ(s,l),v=Math.abs(h),m=n.length<=1?0:(t=r.paddingAngle)!==null&&t!==void 0?t:0,g=n.filter(C=>Ae(C,c,0)!==0).length,y=(v>=360?g:g-1)*m,x=v-g*f-y,w=n.reduce((C,E)=>{var A=Ae(E,c,0);return C+(Y(A)?A:0)},0),S;if(w>0){var P;S=n.map((C,E)=>{var A=Ae(C,c,0),T=Ae(C,u,E),M=zQ(r,i,C),_=(Y(A)?A:0)/w,k,N=He(He({},C),o&&o[E]&&o[E].props);E?k=P.endAngle+ft(h)*m*(A!==0?1:0):k=s;var R=k+ft(h)*((A!==0?f:0)+_*x),z=(k+R)/2,B=(M.innerRadius+M.outerRadius)/2,F=[{name:T,value:A,payload:N,dataKey:c,type:d,graphicalItemId:r.id}],j=Xe(M.cx,M.cy,B,z);return P=He(He(He(He({},r.presentationProps),{},{percent:_,cornerRadius:typeof a=="string"?parseFloat(a):a,name:T,tooltipPayload:F,midAngle:z,middleRadius:B,tooltipPosition:j},N),M),{},{value:A,dataKey:c,startAngle:k,endAngle:R,payload:N,paddingAngle:ft(h)*m}),P})}return S}function ZQ(e){var{showLabels:t,sectors:r,children:n}=e,o=O.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 p.createElement(kZ,{value:t?o:void 0},n)}function QQ(e){var{props:t,previousSectorsRef:r,id:n}=e,{sectors:o,isAnimationActive:i,animationBegin:a,animationDuration:s,animationEasing:l,activeShape:c,inactiveShape:u,onAnimationStart:d,onAnimationEnd:f}=t,h=bs(t,"recharts-pie-"),v=r.current,[m,g]=O.useState(!1),y=O.useCallback(()=>{typeof f=="function"&&f(),g(!1)},[f]),x=O.useCallback(()=>{typeof d=="function"&&d(),g(!0)},[d]);return p.createElement(ZQ,{showLabels:!m,sectors:o},p.createElement(ys,{animationId:h,begin:a,duration:s,isActive:i,easing:l,onAnimationStart:x,onAnimationEnd:y,key:h},w=>{var S,P=[],C=o&&o[0],E=(S=C?.startAngle)!==null&&S!==void 0?S:0;return o?.forEach((A,T)=>{var M=v&&v[T],_=T>0?ko(A,"paddingAngle",0):0;if(M){var k=Le(M.endAngle-M.startAngle,A.endAngle-A.startAngle,w),N=He(He({},A),{},{startAngle:E+_,endAngle:E+k+_});P.push(N),E=N.endAngle}else{var{endAngle:R,startAngle:z}=A,B=Le(0,R-z,w),F=He(He({},A),{},{startAngle:E+_,endAngle:E+B+_});P.push(F),E=F.endAngle}}),r.current=P,p.createElement(ht,null,p.createElement(qQ,{sectors:P,activeShape:c,inactiveShape:u,allOtherPieProps:t,shape:t.shape,id:n}))}),p.createElement(YQ,{showLabels:!m,sectors:o,props:t}),t.children)}var JQ={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:Ze.area};function eJ(e){var{id:t}=e,r=bd(e,NQ),{hide:n,className:o,rootTabIndex:i}=e,a=O.useMemo(()=>Py(e.children,Ds),[e.children]),s=J(u=>YZ(u,t,a)),l=O.useRef(null),c=ve("recharts-pie",o);return n||s==null?(l.current=null,p.createElement(ht,{tabIndex:i,className:c})):p.createElement(Wt,{zIndex:e.zIndex},p.createElement(FQ,{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}),p.createElement(ht,{tabIndex:i,className:c},p.createElement(QQ,{props:He(He({},r),{},{sectors:s}),previousSectorsRef:l,id:t})))}function t_(e){var t=et(e,JQ),{id:r}=t,n=bd(t,jQ),o=Zt(n);return p.createElement(My,{id:r,type:"pie"},i=>p.createElement(p.Fragment,null,p.createElement(kQ,{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}),p.createElement(VQ,Bn({},n,{id:i})),p.createElement(eJ,Bn({},n,{id:i}))))}t_.displayName="Pie";var tJ=["points"];function cC(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 Wp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cC(Object(r),!0).forEach(function(n){rJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rJ(e,t,r){return(t=nJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nJ(e){var t=oJ(e,"string");return typeof t=="symbol"?t:t+""}function oJ(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 qc(){return qc=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},qc.apply(null,arguments)}function iJ(e,t){if(e==null)return{};var r,n,o=aJ(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 aJ(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 sJ(e){var{option:t,dotProps:r,className:n}=e;if(O.isValidElement(t))return O.cloneElement(t,r);if(typeof t=="function")return t(r);var o=ve(n,typeof t!="boolean"?t.className:""),i=r??{},{points:a}=i,s=iJ(i,tJ);return p.createElement(KD,qc({},s,{className:o}))}function lJ(e,t){return e==null?!1:t?!0:e.length===1}function cJ(e){var{points:t,dot:r,className:n,dotClassName:o,dataKey:i,baseProps:a,needClip:s,clipPathId:l,zIndex:c=Ze.scatter}=e;if(!lJ(t,r))return null;var u=ZD(r),d=o5(r),f=t.map((v,m)=>{var g,y,x=Wp(Wp(Wp({r:3},a),d),{},{index:m,cx:(g=v.x)!==null&&g!==void 0?g:void 0,cy:(y=v.y)!==null&&y!==void 0?y:void 0,dataKey:i,value:v.value,payload:v.payload,points:t});return p.createElement(sJ,{key:"dot-".concat(m),option:r,dotProps:x,className:o})}),h={};return s&&l!=null&&(h.clipPath="url(#clipPath-".concat(u?"":"dots-").concat(l,")")),p.createElement(Wt,{zIndex:c},p.createElement(ht,qc({className:n},h),f))}function uC(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 dC(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uC(Object(r),!0).forEach(function(n){uJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function uJ(e,t,r){return(t=dJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dJ(e){var t=fJ(e,"string");return typeof t=="symbol"?t:t+""}function fJ(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 r_=0,pJ={xAxis:{},yAxis:{},zAxis:{}},n_=Bt({name:"cartesianAxis",initialState:pJ,reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:Re()},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:Re()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:Re()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:Re()},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:Re()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:Re()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:Re()},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:Re()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:Re()},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]=dC(dC({},o),{},{width:n,widthHistory:s})}}}}),{addXAxis:hJ,replaceXAxis:mJ,removeXAxis:vJ,addYAxis:gJ,replaceYAxis:yJ,removeYAxis:bJ,addZAxis:Nye,replaceZAxis:jye,removeZAxis:Iye,updateYAxisWidth:xJ}=n_.actions,wJ=n_.reducer,SJ=I([at],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),PJ=I([SJ,yn,bn],(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)}}),ky=()=>J(PJ),CJ=()=>J(l7);function fC(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 zp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fC(Object(r),!0).forEach(function(n){OJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function OJ(e,t,r){return(t=EJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function EJ(e){var t=AJ(e,"string");return typeof t=="symbol"?t:t+""}function AJ(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 TJ=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=zp(zp(zp({},s),To(o)),Wv(o)),c;return O.isValidElement(o)?c=O.cloneElement(o,l):typeof o=="function"?c=o(l):c=p.createElement(KD,l),p.createElement(ht,{className:"recharts-active-dot",clipPath:a},c)};function MJ(e){var{points:t,mainColor:r,activeDot:n,itemDataKey:o,clipPath:i,zIndex:a=Ze.activeDot}=e,s=J(Fn),l=CJ();if(t==null||l==null)return null;var c=t.find(u=>l.includes(u.payload));return We(c)?null:p.createElement(Wt,{zIndex:a},p.createElement(TJ,{point:c,childIndex:Number(s),mainColor:r,dataKey:o,activeDot:n,clipPath:i}))}var pC=(e,t,r)=>{var n=r??e;if(!We(n))return Ot(n,t,0)},kJ=(e,t,r)=>{var n={},o=e.filter(sd),i=e.filter(c=>c.stackId==null),a=o.reduce((c,u)=>{var d=c[u.stackId];return d==null&&(d=[]),d.push(u),c[u.stackId]=d,c},n),s=Object.entries(a).map(c=>{var u,[d,f]=c,h=f.map(m=>m.dataKey),v=pC(t,r,(u=f[0])===null||u===void 0?void 0:u.barSize);return{stackId:d,dataKeys:h,barSize:v}}),l=i.map(c=>{var u=[c.dataKey].filter(f=>f!=null),d=pC(t,r,c.barSize);return{stackId:void 0,dataKeys:u,barSize:d}});return[...s,...l]};function hC(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 Ml(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hC(Object(r),!0).forEach(function(n){DJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function DJ(e,t,r){return(t=_J(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _J(e){var t=NJ(e,"string");return typeof t=="symbol"?t:t+""}function NJ(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 jJ(e,t,r,n,o){var i,a=n.length;if(!(a<1)){var s=Ot(e,r,0,!0),l,c=[];if(pe((i=n[0])===null||i===void 0?void 0:i.barSize)){var u=!1,d=r/a,f=n.reduce((x,w)=>x+(w.barSize||0),0);f+=(a-1)*s,f>=r&&(f-=(a-1)*s,s=0),f>=r&&d>0&&(u=!0,d*=.9,f=a*d);var h=(r-f)/2>>0,v={offset:h-s,size:0};l=n.reduce((x,w)=>{var S,P={stackId:w.stackId,dataKeys:w.dataKeys,position:{offset:v.offset+v.size+s,size:u?d:(S=w.barSize)!==null&&S!==void 0?S:0}},C=[...x,P];return v=P.position,C},c)}else{var m=Ot(t,r,0,!0);r-2*m-(a-1)*s<=0&&(s=0);var g=(r-2*m-(a-1)*s)/a;g>1&&(g>>=0);var y=pe(o)?Math.min(g,o):g;l=n.reduce((x,w,S)=>[...x,{stackId:w.stackId,dataKeys:w.dataKeys,position:{offset:m+(g+s)*S+(g-y)/2,size:y}}],c)}return l}}var IJ=(e,t,r,n,o,i,a)=>{var s=We(a)?t:a,l=jJ(r,n,o!==i?o:i,e,s);return o!==i&&l!=null&&(l=l.map(c=>Ml(Ml({},c),{},{position:Ml(Ml({},c.position),{},{offset:c.position.offset-o/2})}))),l},RJ=(e,t)=>{var r=Vg(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)}}}},LJ=(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 $J(e,t){return e&&typeof e=="object"&&"zIndex"in e&&typeof e.zIndex=="number"&&pe(e.zIndex)?e.zIndex:t}var o_=e=>{var{chartData:t}=e,r=Ne(),n=Tt();return O.useEffect(()=>n?()=>{}:(r(bP(t)),()=>{r(bP(void 0))}),[t,r,n]),null},mC={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},i_=Bt({name:"brush",initialState:mC,reducers:{setBrushSettings(e,t){return t.payload==null?mC:t.payload}}}),{setBrushSettings:Rye}=i_.actions,VJ=i_.reducer;function FJ(e){return(e%180+180)%180}var BJ=function(t){var{width:r,height:n}=t,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=FJ(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)},WJ={dots:[],areas:[],lines:[]},a_=Bt({name:"referenceElements",initialState:WJ,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=br(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=br(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=br(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),{addDot:Lye,removeDot:$ye,addArea:Vye,removeArea:Fye,addLine:Bye,removeLine:Wye}=a_.actions,zJ=a_.reducer,KJ=O.createContext(void 0),UJ=e=>{var{children:t}=e,[r]=O.useState("".concat(Da("recharts"),"-clip")),n=ky();if(n==null)return null;var{x:o,y:i,width:a,height:s}=n;return p.createElement(KJ.Provider,{value:r},p.createElement("defs",null,p.createElement("clipPath",{id:r},p.createElement("rect",{x:o,y:i,height:s,width:a}))),t)};function s_(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 HJ(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return BJ(n,r)}function GJ(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 Ua(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 YJ(e,t){return s_(e,t+1)}function qJ(e,t,r,n,o){for(var i=(n||[]).slice(),{start:a,end:s}=t,l=0,c=1,u=a,d=function(){var v=n?.[l];if(v===void 0)return{v:s_(n,c)};var m=l,g,y=()=>(g===void 0&&(g=r(v,m)),g),x=v.coordinate,w=l===0||Ua(e,x,y,u,s);w||(l=0,u=a,c+=1),w&&(u=x+e*(y()/2+o),l+=c)},f;c<=i.length;)if(f=d(),f)return f.v;return[]}function XJ(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,d=s,f=!0,h=function(){var S=n[m];if(S==null)return 0;var P=m,C,E=()=>(C===void 0&&(C=r(S,P)),C),A=S.coordinate,T=m===u||Ua(e,A,E,d,l);if(!T)return f=!1,1;T&&(d=A+e*(E()/2+o))},v,m=u;m<a&&(v=h(),!(v!==0&&v===1));m+=c);if(f){for(var g=[],y=u;y<a;y+=c){var x=n[y];x!=null&&g.push(x)}return g}}return[]}function vC(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 wt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vC(Object(r),!0).forEach(function(n){ZJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ZJ(e,t,r){return(t=QJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function QJ(e){var t=JJ(e,"string");return typeof t=="symbol"?t:t+""}function JJ(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 eee(e,t,r,n,o){for(var i=(n||[]).slice(),a=i.length,{start:s}=t,{end:l}=t,c=function(f){var h=i[f];if(h==null)return 1;var v=h,m,g=()=>(m===void 0&&(m=r(h,f)),m);if(f===a-1){var y=e*(v.coordinate+e*g()/2-l);i[f]=v=wt(wt({},v),{},{tickCoord:y>0?v.coordinate-y*e:v.coordinate})}else i[f]=v=wt(wt({},v),{},{tickCoord:v.coordinate});if(v.tickCoord!=null){var x=Ua(e,v.tickCoord,g,s,l);x&&(l=v.tickCoord-e*(g()/2+o),i[f]=wt(wt({},v),{},{isShow:!0}))}},u=a-1;u>=0;u--)c(u);return i}function tee(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 d=r(u,s-1),f=e*(u.coordinate+e*d/2-c);if(a[s-1]=u=wt(wt({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate}),u.tickCoord!=null){var h=Ua(e,u.tickCoord,()=>d,l,c);h&&(c=u.tickCoord-e*(d/2+o),a[s-1]=wt(wt({},u),{},{isShow:!0}))}}}for(var v=i?s-1:s,m=function(x){var w=a[x];if(w==null)return 1;var S=w,P,C=()=>(P===void 0&&(P=r(w,x)),P);if(x===0){var E=e*(S.coordinate-e*C()/2-l);a[x]=S=wt(wt({},S),{},{tickCoord:E<0?S.coordinate-E*e:S.coordinate})}else a[x]=S=wt(wt({},S),{},{tickCoord:S.coordinate});if(S.tickCoord!=null){var A=Ua(e,S.tickCoord,C,l,c);A&&(l=S.tickCoord+e*(C()/2+o),a[x]=wt(wt({},S),{},{isShow:!0}))}},g=0;g<v;g++)m(g);return a}function Dy(e,t,r){var{tick:n,ticks:o,viewBox:i,minTickGap:a,orientation:s,interval:l,tickFormatter:c,unit:u,angle:d}=e;if(!o||!o.length||!n)return[];if(Y(l)||Xu.isSsr){var f;return(f=YJ(o,Y(l)?l:0))!==null&&f!==void 0?f:[]}var h=[],v=s==="top"||s==="bottom"?"width":"height",m=u&&v==="width"?Aa(u,{fontSize:t,letterSpacing:r}):{width:0,height:0},g=(P,C)=>{var E=typeof c=="function"?c(P.value,C):P.value;return v==="width"?HJ(Aa(E,{fontSize:t,letterSpacing:r}),m,d):Aa(E,{fontSize:t,letterSpacing:r})[v]},y=o[0],x=o[1],w=o.length>=2&&y!=null&&x!=null?ft(x.coordinate-y.coordinate):1,S=GJ(i,w,v);return l==="equidistantPreserveStart"?qJ(w,S,g,o,a):l==="equidistantPreserveEnd"?XJ(w,S,g,o,a):(l==="preserveStart"||l==="preserveStartEnd"?h=tee(w,S,g,o,a,l==="preserveStartEnd"):h=eee(w,S,g,o,a),h.filter(P=>P.isShow))}var ree=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 d=u.getBoundingClientRect();d.width>a&&(a=d.width)}});var s=r?r.getBoundingClientRect().width:0,l=o+i,c=a+l+s+(r?n:0);return Math.round(c)}return 0},nee=["axisLine","width","height","className","hide","ticks","axisType"];function oee(e,t){if(e==null)return{};var r,n,o=iee(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 iee(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 Ro(){return Ro=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},Ro.apply(null,arguments)}function gC(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?gC(Object(r),!0).forEach(function(n){aee(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function aee(e,t,r){return(t=see(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function see(e){var t=lee(e,"string");return typeof t=="symbol"?t:t+""}function lee(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 nn={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:Ze.axis};function cee(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=Ke(Ke(Ke({},l),Zt(s)),{},{fill:"none"});if(i==="top"||i==="bottom"){var u=+(i==="top"&&!a||i==="bottom"&&a);c=Ke(Ke({},c),{},{x1:t,y1:r+u*o,x2:t+n,y2:r+u*o})}else{var d=+(i==="left"&&!a||i==="right"&&a);c=Ke(Ke({},c),{},{x1:t+d*n,y1:r,x2:t+d*n,y2:r+o})}return p.createElement("line",Ro({},c,{className:ve("recharts-cartesian-axis-line",ko(s,"className"))}))}function uee(e,t,r,n,o,i,a,s,l){var c,u,d,f,h,v,m=s?-1:1,g=e.tickSize||a,y=Y(e.tickCoord)?e.tickCoord:e.coordinate;switch(i){case"top":c=u=e.coordinate,f=r+ +!s*o,d=f-m*g,v=d-m*l,h=y;break;case"left":d=f=e.coordinate,u=t+ +!s*n,c=u-m*g,h=c-m*l,v=y;break;case"right":d=f=e.coordinate,u=t+ +s*n,c=u+m*g,h=c+m*l,v=y;break;default:c=u=e.coordinate,f=r+ +s*o,d=f+m*g,v=d+m*l,h=y;break}return{line:{x1:c,y1:d,x2:u,y2:f},tick:{x:h,y:v}}}function dee(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function fee(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function pee(e){var{option:t,tickProps:r,value:n}=e,o,i=ve(r.className,"recharts-cartesian-axis-tick-value");if(p.isValidElement(t))o=p.cloneElement(t,Ke(Ke({},r),{},{className:i}));else if(typeof t=="function")o=t(Ke(Ke({},r),{},{className:i}));else{var a="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(a=ve(a,YD(t))),o=p.createElement(vd,Ro({},r,{className:a}),n)}return o}var hee=O.forwardRef((e,t)=>{var{ticks:r=[],tick:n,tickLine:o,stroke:i,tickFormatter:a,unit:s,padding:l,tickTextProps:c,orientation:u,mirror:d,x:f,y:h,width:v,height:m,tickSize:g,tickMargin:y,fontSize:x,letterSpacing:w,getTicksConfig:S,events:P,axisType:C}=e,E=Dy(Ke(Ke({},S),{},{ticks:r}),x,w),A=dee(u,d),T=fee(u,d),M=Zt(S),_=To(n),k={};typeof o=="object"&&(k=o);var N=Ke(Ke({},M),{},{fill:"none"},k),R=E.map(F=>Ke({entry:F},uee(F,f,h,v,m,u,g,d,y))),z=R.map(F=>{var{entry:j,line:L}=F;return p.createElement(ht,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(j.value,"-").concat(j.coordinate,"-").concat(j.tickCoord)},o&&p.createElement("line",Ro({},N,L,{className:ve("recharts-cartesian-axis-tick-line",ko(o,"className"))})))}),B=R.map((F,j)=>{var L,H,{entry:re,tick:le}=F,ae=Ke(Ke(Ke(Ke({verticalAnchor:T},M),{},{textAnchor:A,stroke:"none",fill:i},le),{},{index:j,payload:re,visibleTicksCount:E.length,tickFormatter:a,padding:l},c),{},{angle:(L=(H=c?.angle)!==null&&H!==void 0?H:M.angle)!==null&&L!==void 0?L:0}),oe=Ke(Ke({},ae),_);return p.createElement(ht,Ro({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(re.value,"-").concat(re.coordinate,"-").concat(re.tickCoord)},us(P,re,j)),n&&p.createElement(pee,{option:n,tickProps:oe,value:"".concat(typeof a=="function"?a(re.value,j):re.value).concat(s||"")}))});return p.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(C,"-ticks")},B.length>0&&p.createElement(Wt,{zIndex:Ze.label},p.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(C,"-tick-labels"),ref:t},B)),z.length>0&&p.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(C,"-tick-lines")},z))}),mee=O.forwardRef((e,t)=>{var{axisLine:r,width:n,height:o,className:i,hide:a,ticks:s,axisType:l}=e,c=oee(e,nee),[u,d]=O.useState(""),[f,h]=O.useState(""),v=O.useRef(null);O.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var g;return ree({ticks:v.current,label:(g=e.labelRef)===null||g===void 0?void 0:g.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var m=O.useCallback(g=>{if(g){var y=g.getElementsByClassName("recharts-cartesian-axis-tick-value");v.current=y;var x=y[0];if(x){var w=window.getComputedStyle(x),S=w.fontSize,P=w.letterSpacing;(S!==u||P!==f)&&(d(S),h(P))}}},[u,f]);return a||n!=null&&n<=0||o!=null&&o<=0?null:p.createElement(Wt,{zIndex:e.zIndex},p.createElement(ht,{className:ve("recharts-cartesian-axis",i)},p.createElement(cee,{x:e.x,y:e.y,width:n,height:o,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:Zt(e)}),p.createElement(hee,{ref:m,axisType:l,events:c,fontSize:u,getTicksConfig:e,height:e.height,letterSpacing:f,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}),p.createElement(cZ,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},p.createElement(bZ,{label:e.label,labelRef:e.labelRef}),e.children)))}),_y=p.forwardRef((e,t)=>{var r=et(e,nn);return p.createElement(mee,Ro({},r,{ref:t}))});_y.displayName="CartesianAxis";var vee=["x1","y1","x2","y2","key"],gee=["offset"],yee=["xAxisId","yAxisId"],bee=["xAxisId","yAxisId"];function yC(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 Pt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yC(Object(r),!0).forEach(function(n){xee(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function xee(e,t,r){return(t=wee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wee(e){var t=See(e,"string");return typeof t=="symbol"?t:t+""}function See(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 go(){return go=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},go.apply(null,arguments)}function Xc(e,t){if(e==null)return{};var r,n,o=Pee(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 Pee(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 Cee=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 p.createElement("rect",{x:n,y:o,ry:s,width:i,height:a,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function l_(e){var{option:t,lineItemProps:r}=e,n;if(p.isValidElement(t))n=p.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=Xc(r,vee),d=(o=Zt(u))!==null&&o!==void 0?o:{},{offset:f}=d,h=Xc(d,gee);n=p.createElement("line",go({},h,{x1:i,y1:a,x2:s,y2:l,fill:"none",key:c}))}return n}function Oee(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=Xc(e,yee),l=o.map((c,u)=>{var d=Pt(Pt({},s),{},{x1:t,y1:c,x2:t+r,y2:c,key:"line-".concat(u),index:u});return p.createElement(l_,{key:"line-".concat(u),option:n,lineItemProps:d})});return p.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function Eee(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=Xc(e,bee),l=o.map((c,u)=>{var d=Pt(Pt({},s),{},{x1:c,y1:t,x2:c,y2:t+r,key:"line-".concat(u),index:u});return p.createElement(l_,{option:n,lineItemProps:d,key:"line-".concat(u)})});return p.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function Aee(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(d=>Math.round(d+o-o)).sort((d,f)=>d-f);o!==c[0]&&c.unshift(0);var u=c.map((d,f)=>{var h=c[f+1],v=h==null,m=v?o+a-d:h-d;if(m<=0)return null;var g=f%t.length;return p.createElement("rect",{key:"react-".concat(f),y:d,x:n,height:m,width:i,stroke:"none",fill:t[g],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return p.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},u)}function Tee(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(d=>Math.round(d+o-o)).sort((d,f)=>d-f);o!==c[0]&&c.unshift(0);var u=c.map((d,f)=>{var h=c[f+1],v=h==null,m=v?o+a-d:h-d;if(m<=0)return null;var g=f%r.length;return p.createElement("rect",{key:"react-".concat(f),x:d,y:i,width:m,height:s,stroke:"none",fill:r[g],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return p.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},u)}var Mee=(e,t)=>{var{xAxis:r,width:n,height:o,offset:i}=e;return JT(Dy(Pt(Pt(Pt({},nn),r),{},{ticks:eM(r),viewBox:{x:0,y:0,width:n,height:o}})),i.left,i.left+i.width,t)},kee=(e,t)=>{var{yAxis:r,width:n,height:o,offset:i}=e;return JT(Dy(Pt(Pt(Pt({},nn),r),{},{ticks:eM(r),viewBox:{x:0,y:0,width:n,height:o}})),i.top,i.top+i.height,t)},Dee={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:Ze.grid};function Ny(e){var t=rg(),r=ng(),n=sM(),o=Pt(Pt({},et(e,Dee)),{},{x:Y(e.x)?e.x:n.left,y:Y(e.y)?e.y:n.top,width:Y(e.width)?e.width:n.width,height:Y(e.height)?e.height:n.height}),{xAxisId:i,yAxisId:a,x:s,y:l,width:c,height:u,syncWithTicks:d,horizontalValues:f,verticalValues:h}=o,v=Tt(),m=J(T=>sP(T,"xAxis",i,v)),g=J(T=>sP(T,"yAxis",a,v));if(!Wr(c)||!Wr(u)||!Y(s)||!Y(l))return null;var y=o.verticalCoordinatesGenerator||Mee,x=o.horizontalCoordinatesGenerator||kee,{horizontalPoints:w,verticalPoints:S}=o;if((!w||!w.length)&&typeof x=="function"){var P=f&&f.length,C=x({yAxis:g?Pt(Pt({},g),{},{ticks:P?f:g.ticks}):void 0,width:t??c,height:r??u,offset:n},P?!0:d);Sc(Array.isArray(C),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof C,"]")),Array.isArray(C)&&(w=C)}if((!S||!S.length)&&typeof y=="function"){var E=h&&h.length,A=y({xAxis:m?Pt(Pt({},m),{},{ticks:E?h:m.ticks}):void 0,width:t??c,height:r??u,offset:n},E?!0:d);Sc(Array.isArray(A),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof A,"]")),Array.isArray(A)&&(S=A)}return p.createElement(Wt,{zIndex:o.zIndex},p.createElement("g",{className:"recharts-cartesian-grid"},p.createElement(Cee,{fill:o.fill,fillOpacity:o.fillOpacity,x:o.x,y:o.y,width:o.width,height:o.height,ry:o.ry}),p.createElement(Aee,go({},o,{horizontalPoints:w})),p.createElement(Tee,go({},o,{verticalPoints:S})),p.createElement(Oee,go({},o,{offset:n,horizontalPoints:w,xAxis:m,yAxis:g})),p.createElement(Eee,go({},o,{offset:n,verticalPoints:S,xAxis:m,yAxis:g}))))}Ny.displayName="CartesianGrid";var _ee={},c_=Bt({name:"errorBars",initialState:_ee,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:zye,replaceErrorBar:Kye,removeErrorBar:Uye}=c_.actions,Nee=c_.reducer,jee=["children"];function Iee(e,t){if(e==null)return{};var r,n,o=Ree(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 Ree(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 Lee={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},$ee=O.createContext(Lee);function u_(e){var{children:t}=e,r=Iee(e,jee);return p.createElement($ee.Provider,{value:r},t)}function jy(e,t){var r,n,o=J(c=>Sn(c,e)),i=J(c=>Pn(c,t)),a=(r=o?.allowDataOverflow)!==null&&r!==void 0?r:ct.allowDataOverflow,s=(n=i?.allowDataOverflow)!==null&&n!==void 0?n:ut.allowDataOverflow,l=a||s;return{needClip:l,needClipX:a,needClipY:s}}function d_(e){var{xAxisId:t,yAxisId:r,clipPathId:n}=e,o=ky(),{needClipX:i,needClipY:a,needClip:s}=jy(t,r);if(!s||!o)return null;var{x:l,y:c,width:u,height:d}=o;return p.createElement("clipPath",{id:"clipPath-".concat(n)},p.createElement("rect",{x:i?l:l-u/2,y:a?c:c-d/2,width:i?u:u*2,height:a?d:d*2}))}var f_=(e,t,r,n)=>Vn(e,"xAxis",t,n),p_=(e,t,r,n)=>$n(e,"xAxis",t,n),h_=(e,t,r,n)=>Vn(e,"yAxis",r,n),m_=(e,t,r,n)=>$n(e,"yAxis",r,n),Vee=I([ye,f_,h_,p_,m_],(e,t,r,n,o)=>gn(e,"xAxis")?Oi(t,n,!1):Oi(r,o,!1)),Fee=(e,t,r,n,o)=>o;function Bee(e){return e.type==="line"}var Wee=I([ud,Fee],(e,t)=>e.filter(Bee).find(r=>r.id===t)),zee=I([ye,f_,h_,p_,m_,Wee,Vee,kg],(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:d,data:f}=i,h;if(f!=null&&f.length>0?h=f:h=l?.slice(c,u+1),h!=null)return Dte({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:o,dataKey:d,bandSize:a,displayedData:h})}});function Kee(e){var t=To(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 kl={exports:{}},Kp={};var bC;function Uee(){if(bC)return Kp;bC=1;var e=O;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 Kp.useSyncExternalStoreWithSelector=function(l,c,u,d,f){var h=o(null);if(h.current===null){var v={hasValue:!1,value:null};h.current=v}else v=h.current;h=a(function(){function g(P){if(!y){if(y=!0,x=P,P=d(P),f!==void 0&&v.hasValue){var C=v.value;if(f(C,P))return w=C}return w=P}if(C=w,r(x,P))return C;var E=d(P);return f!==void 0&&f(C,E)?(x=P,C):(x=P,w=E)}var y=!1,x,w,S=u===void 0?null:u;return[function(){return g(c())},S===null?void 0:function(){return g(S())}]},[c,u,d,f]);var m=n(l,h[0],h[1]);return i(function(){v.hasValue=!0,v.value=m},[m]),s(m),m},Kp}var Up={};var xC;function Hee(){return xC||(xC=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=O,r=typeof Object.is=="function"?Object.is:e,n=t.useSyncExternalStore,o=t.useRef,i=t.useEffect,a=t.useMemo,s=t.useDebugValue;Up.useSyncExternalStoreWithSelector=function(l,c,u,d,f){var h=o(null);if(h.current===null){var v={hasValue:!1,value:null};h.current=v}else v=h.current;h=a(function(){function g(P){if(!y){if(y=!0,x=P,P=d(P),f!==void 0&&v.hasValue){var C=v.value;if(f(C,P))return w=C}return w=P}if(C=w,r(x,P))return C;var E=d(P);return f!==void 0&&f(C,E)?(x=P,C):(x=P,w=E)}var y=!1,x,w,S=u===void 0?null:u;return[function(){return g(c())},S===null?void 0:function(){return g(S())}]},[c,u,d,f]);var m=n(l,h[0],h[1]);return i(function(){v.hasValue=!0,v.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())})()),Up}var wC;function Gee(){return wC||(wC=1,process.env.NODE_ENV==="production"?kl.exports=Uee():kl.exports=Hee()),kl.exports}Gee();function Yee(e){e()}function qee(){let e=null,t=null;return{clear(){e=null,t=null},notify(){Yee(()=>{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 SC={notify(){},get:()=>[]};function Xee(e,t){let r,n=SC,o=0,i=!1;function a(m){u();const g=n.subscribe(m);let y=!1;return()=>{y||(y=!0,g(),d())}}function s(){n.notify()}function l(){v.onStateChange&&v.onStateChange()}function c(){return i}function u(){o++,r||(r=e.subscribe(l),n=qee())}function d(){o--,r&&o===0&&(r(),r=void 0,n.clear(),n=SC)}function f(){i||(i=!0,u())}function h(){i&&(i=!1,d())}const v={addNestedSub:a,notifyNestedSubs:s,handleChangeWrapper:l,isSubscribed:c,trySubscribe:f,tryUnsubscribe:h,getListeners:()=>n};return v}var Zee=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Qee=Zee(),Jee=()=>typeof navigator<"u"&&navigator.product==="ReactNative",ete=Jee(),tte=()=>Qee||ete?p.useLayoutEffect:p.useEffect,rte=tte();function PC(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function nte(e,t){if(PC(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])||!PC(e[r[o]],t[r[o]]))return!1;return!0}var ote=Symbol.for("react-redux-context"),ite=typeof globalThis<"u"?globalThis:{};function ate(){if(!p.createContext)return{};const e=ite[ote]??=new Map;let t=e.get(p.createContext);return t||(t=p.createContext(null),process.env.NODE_ENV!=="production"&&(t.displayName="ReactRedux"),e.set(p.createContext,t)),t}var ste=ate();function lte(e){const{children:t,context:r,serverState:n,store:o}=e,i=p.useMemo(()=>{const l=Xee(o),c={store:o,subscription:l,getServerState:n?()=>n:void 0};if(process.env.NODE_ENV==="production")return c;{const{identityFunctionCheck:u="once",stabilityCheck:d="once"}=e;return Object.assign(c,{stabilityCheck:d,identityFunctionCheck:u})}},[o,n]),a=p.useMemo(()=>o.getState(),[o]);rte(()=>{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||ste;return p.createElement(s.Provider,{value:i},t)}var cte=lte,ute=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius"]);function dte(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function xd(e,t){var r=new Set([...Object.keys(e),...Object.keys(t)]);for(var n of r)if(ute.has(n)){if(e[n]==null&&t[n]==null)continue;if(!nte(e[n],t[n]))return!1}else if(!dte(e[n],t[n]))return!1;return!0}var fte=["id"],pte=["type","layout","connectNulls","needClip","shape"],hte=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function Ha(){return Ha=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},Ha.apply(null,arguments)}function CC(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 Dr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?CC(Object(r),!0).forEach(function(n){mte(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):CC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mte(e,t,r){return(t=vte(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vte(e){var t=gte(e,"string");return typeof t=="symbol"?t:t+""}function gte(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 Iy(e,t){if(e==null)return{};var r,n,o=yte(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 yte(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 bte=e=>{var{dataKey:t,name:r,stroke:n,legendType:o,hide:i}=e;return[{inactive:i,dataKey:t,type:o,color:n,value:Fi(r,t),payload:e}]},xte=p.memo(e=>{var{dataKey:t,data:r,stroke:n,strokeWidth:o,fill:i,name:a,hide:s,unit:l,tooltipType:c,id:u}=e,d={dataDefinedOnItem:r,getPosition:Wo,settings:{stroke:n,strokeWidth:o,fill:i,dataKey:t,nameKey:void 0,name:Fi(a,t),hide:s,type:c,color:n,unit:l,graphicalItemId:u}};return p.createElement(Ty,{tooltipEntrySettings:d})}),v_=(e,t)=>"".concat(t,"px ").concat(e-t,"px");function wte(e,t){for(var r=e.length%2!==0?[...e,0]:e,n=[],o=0;o<t;++o)n=[...n,...r];return n}var Ste=(e,t,r)=>{var n=r.reduce((h,v)=>h+v);if(!n)return v_(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,d=r[l];if(d!=null&&c+d>i){s=[...r.slice(0,l),i-c];break}}var f=s.length%2===0?[0,a]:[a];return[...wte(r,o),...s,...f].map(h=>"".concat(h,"px")).join(", ")};function Pte(e){var{clipPathId:t,points:r,props:n}=e,{dot:o,dataKey:i,needClip:a}=n,{id:s}=n,l=Iy(n,fte),c=Zt(l);return p.createElement(cJ,{points:r,dot:o,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:i,baseProps:c,needClip:a,clipPathId:t})}function Cte(e){var{showLabels:t,children:r,points:n}=e,o=O.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 Dr(Dr({},l),{},{value:i.value,payload:i.payload,viewBox:l,parentViewBox:void 0,fill:void 0})}),[n]);return p.createElement(WD,{value:t?o:void 0},r)}function OC(e){var{clipPathId:t,pathRef:r,points:n,strokeDasharray:o,props:i}=e,{type:a,layout:s,connectNulls:l,needClip:c,shape:u}=i,d=Iy(i,pte),f=Dr(Dr({},Rt(d)),{},{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 p.createElement(p.Fragment,null,n?.length>1&&p.createElement(Cy,Ha({shapeType:"curve",option:u},f,{pathRef:r})),p.createElement(Pte,{points:n,clipPathId:t,props:i}))}function Ote(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function Ete(e){var{clipPathId:t,props:r,pathRef:n,previousPointsRef:o,longestAnimatedLengthRef:i}=e,{points:a,strokeDasharray:s,isAnimationActive:l,animationBegin:c,animationDuration:u,animationEasing:d,animateNewValues:f,width:h,height:v,onAnimationEnd:m,onAnimationStart:g}=r,y=o.current,x=bs(a,"recharts-line-"),w=O.useRef(x),[S,P]=O.useState(!1),C=!S,E=O.useCallback(()=>{typeof m=="function"&&m(),P(!1)},[m]),A=O.useCallback(()=>{typeof g=="function"&&g(),P(!0)},[g]),T=Ote(n.current),M=O.useRef(0);w.current!==x&&(M.current=i.current,w.current=x);var _=M.current;return p.createElement(Cte,{points:a,showLabels:C},r.children,p.createElement(ys,{animationId:x,begin:c,duration:u,isActive:l,easing:d,onAnimationEnd:E,onAnimationStart:A,key:x},k=>{var N=Le(_,T+_,k),R=Math.min(N,T),z;if(l)if(s){var B="".concat(s).split(/[,\s]+/gim).map(L=>parseFloat(L));z=Ste(R,T,B)}else z=v_(T,R);else z=s==null?void 0:String(s);if(k>0&&T>0&&(o.current=a,i.current=Math.max(i.current,R)),y){var F=y.length/a.length,j=k===1?a:a.map((L,H)=>{var re=Math.floor(H*F);if(y[re]){var le=y[re];return Dr(Dr({},L),{},{x:Le(le.x,L.x,k),y:Le(le.y,L.y,k)})}return f?Dr(Dr({},L),{},{x:Le(h*2,L.x,k),y:Le(v/2,L.y,k)}):Dr(Dr({},L),{},{x:L.x,y:L.y})});return o.current=j,p.createElement(OC,{props:r,points:j,clipPathId:t,pathRef:n,strokeDasharray:z})}return p.createElement(OC,{props:r,points:a,clipPathId:t,pathRef:n,strokeDasharray:z})}),p.createElement(xy,{label:r.label}))}function Ate(e){var{clipPathId:t,props:r}=e,n=O.useRef(null),o=O.useRef(0),i=O.useRef(null);return p.createElement(Ete,{props:r,clipPathId:t,previousPointsRef:n,longestAnimatedLengthRef:o,pathRef:i})}var Tte=(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:Ae(e.payload,t)}};class Mte extends O.Component{render(){var{hide:t,dot:r,points:n,className:o,xAxisId:i,yAxisId:a,top:s,left:l,width:c,height:u,id:d,needClip:f,zIndex:h}=this.props;if(t)return null;var v=ve("recharts-line",o),m=d,{r:g,strokeWidth:y}=Kee(r),x=ZD(r),w=g*2+y,S=f?"url(#clipPath-".concat(x?"":"dots-").concat(m,")"):void 0;return p.createElement(Wt,{zIndex:h},p.createElement(ht,{className:v},f&&p.createElement("defs",null,p.createElement(d_,{clipPathId:m,xAxisId:i,yAxisId:a}),!x&&p.createElement("clipPath",{id:"clipPath-dots-".concat(m)},p.createElement("rect",{x:l-w/2,y:s-w/2,width:c+w,height:u+w}))),p.createElement(u_,{xAxisId:i,yAxisId:a,data:n,dataPointFormatter:Tte,errorBarOffset:0},p.createElement(Ate,{props:this.props,clipPathId:m}))),p.createElement(MJ,{activeDot:this.props.activeDot,points:n,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:S}))}}var g_={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:Ze.line,type:"linear"};function kte(e){var t=et(e,g_),{activeDot:r,animateNewValues:n,animationBegin:o,animationDuration:i,animationEasing:a,connectNulls:s,dot:l,hide:c,isAnimationActive:u,label:d,legendType:f,xAxisId:h,yAxisId:v,id:m}=t,g=Iy(t,hte),{needClip:y}=jy(h,v),x=ky(),w=zo(),S=Tt(),P=J(M=>zee(M,h,v,S,m));if(w!=="horizontal"&&w!=="vertical"||P==null||x==null)return null;var{height:C,width:E,x:A,y:T}=x;return p.createElement(Mte,Ha({},g,{id:m,connectNulls:s,dot:l,activeDot:r,animateNewValues:n,animationBegin:o,animationDuration:i,animationEasing:a,isAnimationActive:u,hide:c,label:d,legendType:f,xAxisId:h,yAxisId:v,points:P,layout:w,height:C,width:E,left:A,top:T,needClip:y}))}function Dte(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 d=Ae(c,a);if(t==="horizontal"){var f=o0({axis:r,ticks:o,bandSize:s,entry:c,index:u}),h=We(d)?null:n.scale.map(d);return{x:f,y:h??null,value:d,payload:c}}var v=We(d)?null:r.scale.map(d),m=o0({axis:n,ticks:i,bandSize:s,entry:c,index:u});return v==null||m==null?null:{x:v,y:m,value:d,payload:c}}).filter(Boolean)}function _te(e){var t=et(e,g_),r=Tt();return p.createElement(My,{id:t.id,type:"line"},n=>p.createElement(p.Fragment,null,p.createElement(QD,{legendPayload:bte(t)}),p.createElement(xte,{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}),p.createElement(e_,{type:"line",id:n,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:r}),p.createElement(kte,Ha({},t,{id:n}))))}var y_=p.memo(_te,xd);y_.displayName="Line";function Ho(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:r_}function Go(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:r_}var Nte=process.env.NODE_ENV==="production",Hp="Invariant failed";function jte(e,t){if(Nte)throw new Error(Hp);var r=typeof t=="function"?t():t,n=r?"".concat(Hp,": ").concat(r):Hp;throw new Error(n)}function gm(){return gm=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},gm.apply(null,arguments)}function Zc(e){return p.createElement(Cy,gm({shapeType:"rectangle",activeClassName:"recharts-active-bar"},e))}var Ite=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(n,o)=>{if(Y(t))return t;var i=Y(n)||We(n);return i?t(n,o):(i||jte(!1,"minPointSize callback function received a value with type of ".concat(typeof n,". Currently only numbers or null/undefined are supported.")),r)}},Rte=(e,t,r)=>r,Lte=(e,t)=>t,_s=I([ud,Lte],(e,t)=>e.filter(r=>r.type==="bar").find(r=>r.id===t)),$te=I([_s],e=>e?.maxBarSize),Vte=(e,t,r,n)=>n,Fte=I([ye,ud,Ho,Go,Rte],(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")),Bte=(e,t,r)=>{var n=ye(e),o=Ho(e,t),i=Go(e,t);if(!(o==null||i==null))return n==="horizontal"?um(e,"yAxis",i,r):um(e,"xAxis",o,r)},Wte=(e,t)=>{var r=ye(e),n=Ho(e,t),o=Go(e,t);if(!(n==null||o==null))return r==="horizontal"?aP(e,"xAxis",n):aP(e,"yAxis",o)},zte=I([Fte,nq,Wte],kJ),Kte=(e,t,r)=>{var n,o,i=_s(e,t);if(i==null)return 0;var a=Ho(e,t),s=Go(e,t);if(a==null||s==null)return 0;var l=ye(e),c=wk(e),{maxBarSize:u}=i,d=We(u)?c:u,f,h;return l==="horizontal"?(f=Vn(e,"xAxis",a,r),h=$n(e,"xAxis",a,r)):(f=Vn(e,"yAxis",s,r),h=$n(e,"yAxis",s,r)),(n=(o=Oi(f,h,!0))!==null&&o!==void 0?o:d)!==null&&n!==void 0?n:0},b_=(e,t,r)=>{var n=ye(e),o=Ho(e,t),i=Go(e,t);if(!(o==null||i==null)){var a,s;return n==="horizontal"?(a=Vn(e,"xAxis",o,r),s=$n(e,"xAxis",o,r)):(a=Vn(e,"yAxis",i,r),s=$n(e,"yAxis",i,r)),Oi(a,s)}},Ute=I([zte,wk,rq,Sk,Kte,b_,$te],IJ),Hte=(e,t,r)=>{var n=Ho(e,t);if(n!=null)return Vn(e,"xAxis",n,r)},Gte=(e,t,r)=>{var n=Go(e,t);if(n!=null)return Vn(e,"yAxis",n,r)},Yte=(e,t,r)=>{var n=Ho(e,t);if(n!=null)return $n(e,"xAxis",n,r)},qte=(e,t,r)=>{var n=Go(e,t);if(n!=null)return $n(e,"yAxis",n,r)},Xte=I([Ute,_s],LJ),Zte=I([Bte,_s],RJ),Qte=I([at,Qv,Hte,Gte,Yte,qte,Xte,ye,Y8,b_,Zte,_s,Vte],(e,t,r,n,o,i,a,s,l,c,u,d,f)=>{var{chartData:h,dataStartIndex:v,dataEndIndex:m}=l;if(!(d==null||a==null||t==null||s!=="horizontal"&&s!=="vertical"||r==null||n==null||o==null||i==null||c==null)){var{data:g}=d,y;if(g!=null&&g.length>0?y=g:y=h?.slice(v,m+1),y!=null)return Ere({layout:s,barSettings:d,pos:a,parentViewBox:t,bandSize:c,xAxis:r,yAxis:n,xAxisTicks:o,yAxisTicks:i,stackedData:u,displayedData:y,offset:e,cells:f,dataStartIndex:v})}}),Jte=["index"];function ym(){return ym=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},ym.apply(null,arguments)}function ere(e,t){if(e==null)return{};var r,n,o=tre(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 tre(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 x_=O.createContext(void 0),rre=e=>{var t=O.useContext(x_);if(t!=null)return t.stackId;if(e!=null)return BU(e)},nre=(e,t)=>"recharts-bar-stack-clip-path-".concat(e,"-").concat(t),ore=e=>{var t=O.useContext(x_);if(t!=null){var{stackId:r}=t;return"url(#".concat(nre(r,e),")")}},w_=e=>{var{index:t}=e,r=ere(e,Jte),n=ore(t);return p.createElement(ht,ym({className:"recharts-bar-stack-layer",clipPath:n},r))},ire=["onMouseEnter","onMouseLeave","onClick"],are=["value","background","tooltipPosition"],sre=["id"],lre=["onMouseEnter","onClick","onMouseLeave"];function dn(){return dn=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},dn.apply(null,arguments)}function EC(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 Dt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?EC(Object(r),!0).forEach(function(n){cre(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):EC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function cre(e,t,r){return(t=ure(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ure(e){var t=dre(e,"string");return typeof t=="symbol"?t:t+""}function dre(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 Qc(e,t){if(e==null)return{};var r,n,o=fre(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 fre(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 pre=e=>{var{dataKey:t,name:r,fill:n,legendType:o,hide:i}=e;return[{inactive:i,dataKey:t,type:o,color:n,value:Fi(r,t),payload:e}]},hre=p.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:Wo,settings:{stroke:r,strokeWidth:n,fill:o,dataKey:t,nameKey:void 0,name:Fi(i,t),hide:a,type:l,color:o,unit:s,graphicalItemId:c}};return p.createElement(Ty,{tooltipEntrySettings:u})});function mre(e){var t=J(Fn),{data:r,dataKey:n,background:o,allOtherBarProps:i}=e,{onMouseEnter:a,onMouseLeave:s,onClick:l}=i,c=Qc(i,ire),u=Oy(a,n,i.id),d=Ey(s),f=Ay(l,n,i.id);if(!o||r==null)return null;var h=To(o);return p.createElement(Wt,{zIndex:$J(o,Ze.barBackground)},r.map((v,m)=>{var{value:g,background:y,tooltipPosition:x}=v,w=Qc(v,are);if(!y)return null;var S=u(v,m),P=d(v,m),C=f(v,m),E=Dt(Dt(Dt(Dt(Dt({option:o,isActive:String(m)===t},w),{},{fill:"#eee"},y),h),us(c,v,m)),{},{onMouseEnter:S,onMouseLeave:P,onClick:C,dataKey:n,index:m,className:"recharts-bar-background-rectangle"});return p.createElement(Zc,dn({key:"background-bar-".concat(m)},E))}))}function vre(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 Dt(Dt({},a),{},{value:i.value,payload:i.payload,parentViewBox:i.parentViewBox,viewBox:a,fill:i.fill})});return p.createElement(WD,{value:t?o:void 0},r)}function gre(e){var{shape:t,activeBar:r,baseProps:n,entry:o,index:i,dataKey:a}=e,s=J(Fn),l=J(fy),c=r&&String(i)===s&&(l==null||a===l),u=c?r:t;return c?p.createElement(Wt,{zIndex:Ze.activeBar},p.createElement(w_,{index:i},p.createElement(Zc,dn({},n,{name:String(n.name)},o,{isActive:c,option:u,index:i,dataKey:a})))):p.createElement(Zc,dn({},n,{name:String(n.name)},o,{isActive:c,option:u,index:i,dataKey:a}))}function yre(e){var{shape:t,baseProps:r,entry:n,index:o,dataKey:i}=e;return p.createElement(Zc,dn({},r,{name:String(r.name)},n,{isActive:!1,option:t,index:o,dataKey:i}))}function bre(e){var t,{data:r,props:n}=e,o=(t=Zt(n))!==null&&t!==void 0?t:{},{id:i}=o,a=Qc(o,sre),{shape:s,dataKey:l,activeBar:c}=n,{onMouseEnter:u,onClick:d,onMouseLeave:f}=n,h=Qc(n,lre),v=Oy(u,l,i),m=Ey(f),g=Ay(d,l,i);return r?p.createElement(p.Fragment,null,r.map((y,x)=>p.createElement(w_,dn({index:x,key:"rectangle-".concat(y?.x,"-").concat(y?.y,"-").concat(y?.value,"-").concat(x),className:"recharts-bar-rectangle"},us(h,y,x),{onMouseEnter:v(y,x),onMouseLeave:m(y,x),onClick:g(y,x)}),c?p.createElement(gre,{shape:s,activeBar:c,baseProps:a,entry:y,index:x,dataKey:l}):p.createElement(yre,{shape:s,baseProps:a,entry:y,index:x,dataKey:l})))):null}function xre(e){var{props:t,previousRectanglesRef:r}=e,{data:n,layout:o,isAnimationActive:i,animationBegin:a,animationDuration:s,animationEasing:l,onAnimationEnd:c,onAnimationStart:u}=t,d=r.current,f=bs(t,"recharts-bar-"),[h,v]=O.useState(!1),m=!h,g=O.useCallback(()=>{typeof c=="function"&&c(),v(!1)},[c]),y=O.useCallback(()=>{typeof u=="function"&&u(),v(!0)},[u]);return p.createElement(vre,{showLabels:m,rects:n},p.createElement(ys,{animationId:f,begin:a,duration:s,isActive:i,easing:l,onAnimationEnd:g,onAnimationStart:y,key:f},x=>{var w=x===1?n:n?.map((S,P)=>{var C=d&&d[P];if(C)return Dt(Dt({},S),{},{x:Le(C.x,S.x,x),y:Le(C.y,S.y,x),width:Le(C.width,S.width,x),height:Le(C.height,S.height,x)});if(o==="horizontal"){var E=Le(0,S.height,x),A=Le(S.stackedBarStart,S.y,x);return Dt(Dt({},S),{},{y:A,height:E})}var T=Le(0,S.width,x),M=Le(S.stackedBarStart,S.x,x);return Dt(Dt({},S),{},{width:T,x:M})});return x>0&&(r.current=w??null),w==null?null:p.createElement(ht,null,p.createElement(bre,{props:t,data:w}))}),p.createElement(xy,{label:t.label}),t.children)}function wre(e){var t=O.useRef(null);return p.createElement(xre,{previousRectanglesRef:t,props:e})}var S_=0,Sre=(e,t)=>{var r=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:r,errorVal:Ae(e,t)}};class Pre extends O.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=ve("recharts-bar",o),d=c;return p.createElement(ht,{className:u,id:c},s&&p.createElement("defs",null,p.createElement(d_,{clipPathId:d,xAxisId:i,yAxisId:a})),p.createElement(ht,{className:"recharts-bar-rectangles",clipPath:s?"url(#clipPath-".concat(d,")"):void 0},p.createElement(mre,{data:r,dataKey:n,background:l,allOtherBarProps:this.props}),p.createElement(wre,this.props)))}}var Cre={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",background:!1,hide:!1,isAnimationActive:"auto",label:!1,legendType:"rect",minPointSize:S_,xAxisId:0,yAxisId:0,zIndex:Ze.bar};function Ore(e){var{xAxisId:t,yAxisId:r,hide:n,legendType:o,minPointSize:i,activeBar:a,animationBegin:s,animationDuration:l,animationEasing:c,isAnimationActive:u}=e,{needClip:d}=jy(t,r),f=zo(),h=Tt(),v=Py(e.children,Ds),m=J(x=>Qte(x,e.id,h,v));if(f!=="vertical"&&f!=="horizontal")return null;var g,y=m?.[0];return y==null||y.height==null||y.width==null?g=0:g=f==="vertical"?y.height/2:y.width/2,p.createElement(u_,{xAxisId:t,yAxisId:r,data:m,dataPointFormatter:Sre,errorBarOffset:g},p.createElement(Pre,dn({},e,{layout:f,needClip:d,data:m,xAxisId:t,yAxisId:r,hide:n,legendType:o,minPointSize:i,activeBar:a,animationBegin:s,animationDuration:l,animationEasing:c,isAnimationActive:u})))}function Ere(e){var{layout:t,barSettings:{dataKey:r,minPointSize:n},pos:o,bandSize:i,xAxis:a,yAxis:s,xAxisTicks:l,yAxisTicks:c,stackedData:u,displayedData:d,offset:f,cells:h,parentViewBox:v,dataStartIndex:m}=e,g=t==="horizontal"?s:a,y=u?g.scale.domain():null,x=WU({numericAxis:g}),w=g.scale.map(x);return d.map((S,P)=>{var C,E,A,T,M,_;if(u){var k=u[P+m];if(k==null)return null;C=RU(k,y)}else C=Ae(S,r),Array.isArray(C)||(C=[x,C]);var N=Ite(n,S_)(C[1],P);if(t==="horizontal"){var R,z=s.scale.map(C[0]),B=s.scale.map(C[1]);if(z==null||B==null)return null;E=i0({axis:a,ticks:l,bandSize:i,offset:o.offset,entry:S,index:P}),A=(R=B??z)!==null&&R!==void 0?R:void 0,T=o.size;var F=z-B;if(M=Fr(F)?0:F,_={x:E,y:f.top,width:T,height:f.height},Math.abs(N)>0&&Math.abs(M)<Math.abs(N)){var j=ft(M||N)*(Math.abs(N)-Math.abs(M));A-=j,M+=j}}else{var L=a.scale.map(C[0]),H=a.scale.map(C[1]);if(L==null||H==null)return null;if(E=L,A=i0({axis:s,ticks:c,bandSize:i,offset:o.offset,entry:S,index:P}),T=H-L,M=o.size,_={x:f.left,y:A,width:f.width,height:M},Math.abs(N)>0&&Math.abs(T)<Math.abs(N)){var re=ft(T||N)*(Math.abs(N)-Math.abs(T));T+=re}}if(E==null||A==null||T==null||M==null)return null;var le=Dt(Dt({},S),{},{stackedBarStart:w,x:E,y:A,width:T,height:M,value:u?C:C[1],payload:S,background:_,tooltipPosition:{x:E+T/2,y:A+M/2},parentViewBox:v},h&&h[P]&&h[P].props);return le}).filter(Boolean)}function Are(e){var t=et(e,Cre),r=rre(t.stackId),n=Tt();return p.createElement(My,{id:t.id,type:"bar"},o=>p.createElement(p.Fragment,null,p.createElement(QD,{legendPayload:pre(t)}),p.createElement(hre,{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}),p.createElement(e_,{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}),p.createElement(Wt,{zIndex:t.zIndex},p.createElement(Ore,dn({},t,{id:o})))))}var P_=p.memo(Are,xd);P_.displayName="Bar";var Tre=["domain","range"],Mre=["domain","range"];function AC(e,t){if(e==null)return{};var r,n,o=kre(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 kre(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 TC(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 C_(e,t){if(e===t)return!0;var{domain:r,range:n}=e,o=AC(e,Tre),{domain:i,range:a}=t,s=AC(t,Mre);return!TC(r,i)||!TC(n,a)?!1:xd(o,s)}var Dre=["type"],_re=["dangerouslySetInnerHTML","ticks","scale"],Nre=["id","scale"];function bm(){return bm=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},bm.apply(null,arguments)}function MC(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 kC(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?MC(Object(r),!0).forEach(function(n){jre(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):MC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jre(e,t,r){return(t=Ire(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ire(e){var t=Rre(e,"string");return typeof t=="symbol"?t:t+""}function Rre(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 xm(e,t){if(e==null)return{};var r,n,o=Lre(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 Lre(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 $re(e){var t=Ne(),r=O.useRef(null),n=lM(),{type:o}=e,i=xm(e,Dre),a=id(n,"xAxis",o),s=O.useMemo(()=>{if(a!=null)return kC(kC({},i),{},{type:a})},[i,a]);return O.useLayoutEffect(()=>{s!=null&&(r.current===null?t(hJ(s)):r.current!==s&&t(mJ({prev:r.current,next:s})),r.current=s)},[s,t]),O.useLayoutEffect(()=>()=>{r.current&&(t(vJ(r.current)),r.current=null)},[t]),null}var Vre=e=>{var{xAxisId:t,className:r}=e,n=J(Qv),o=Tt(),i="xAxis",a=J(y=>tD(y,i,t,o)),s=J(y=>Zk(y,t)),l=J(y=>n9(y,t)),c=J(y=>_k(y,t));if(s==null||l==null||c==null)return null;var{dangerouslySetInnerHTML:u,ticks:d,scale:f}=e,h=xm(e,_re),{id:v,scale:m}=c,g=xm(c,Nre);return p.createElement(_y,bm({},h,g,{x:l.x,y:l.y,width:s.width,height:s.height,className:ve("recharts-".concat(i," ").concat(i),r),viewBox:n,ticks:a,axisType:i}))},Fre={allowDataOverflow:ct.allowDataOverflow,allowDecimals:ct.allowDecimals,allowDuplicatedCategory:ct.allowDuplicatedCategory,angle:ct.angle,axisLine:nn.axisLine,height:ct.height,hide:!1,includeHidden:ct.includeHidden,interval:ct.interval,label:!1,minTickGap:ct.minTickGap,mirror:ct.mirror,orientation:ct.orientation,padding:ct.padding,reversed:ct.reversed,scale:ct.scale,tick:ct.tick,tickCount:ct.tickCount,tickLine:nn.tickLine,tickSize:nn.tickSize,type:ct.type,xAxisId:0},Bre=e=>{var t=et(e,Fre);return p.createElement(p.Fragment,null,p.createElement($re,{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}),p.createElement(Vre,t))},Jc=p.memo(Bre,C_);Jc.displayName="XAxis";var Wre=["type"],zre=["dangerouslySetInnerHTML","ticks","scale"],Kre=["id","scale"];function wm(){return wm=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},wm.apply(null,arguments)}function DC(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 _C(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?DC(Object(r),!0).forEach(function(n){Ure(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):DC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ure(e,t,r){return(t=Hre(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hre(e){var t=Gre(e,"string");return typeof t=="symbol"?t:t+""}function Gre(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 Sm(e,t){if(e==null)return{};var r,n,o=Yre(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 Yre(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 qre(e){var t=Ne(),r=O.useRef(null),n=lM(),{type:o}=e,i=Sm(e,Wre),a=id(n,"yAxis",o),s=O.useMemo(()=>{if(a!=null)return _C(_C({},i),{},{type:a})},[a,i]);return O.useLayoutEffect(()=>{s!=null&&(r.current===null?t(gJ(s)):r.current!==s&&t(yJ({prev:r.current,next:s})),r.current=s)},[s,t]),O.useLayoutEffect(()=>()=>{r.current&&(t(bJ(r.current)),r.current=null)},[t]),null}function Xre(e){var{yAxisId:t,className:r,width:n,label:o}=e,i=O.useRef(null),a=O.useRef(null),s=J(Qv),l=Tt(),c=Ne(),u="yAxis",d=J(C=>Qk(C,t)),f=J(C=>i9(C,t)),h=J(C=>tD(C,u,t,l)),v=J(C=>Nk(C,t));if(O.useLayoutEffect(()=>{if(!(n!=="auto"||!d||by(o)||O.isValidElement(o)||v==null)){var C=i.current;if(C){var E=C.getCalculatedWidth();Math.round(d.width)!==Math.round(E)&&c(xJ({id:t,width:E}))}}},[h,d,c,o,t,n,v]),d==null||f==null||v==null)return null;var{dangerouslySetInnerHTML:m,ticks:g,scale:y}=e,x=Sm(e,zre),{id:w,scale:S}=v,P=Sm(v,Kre);return p.createElement(_y,wm({},x,P,{ref:i,labelRef:a,x:f.x,y:f.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:d.width,height:d.height,className:ve("recharts-".concat(u," ").concat(u),r),viewBox:s,ticks:h,axisType:u}))}var Zre={allowDataOverflow:ut.allowDataOverflow,allowDecimals:ut.allowDecimals,allowDuplicatedCategory:ut.allowDuplicatedCategory,angle:ut.angle,axisLine:nn.axisLine,hide:!1,includeHidden:ut.includeHidden,interval:ut.interval,label:!1,minTickGap:ut.minTickGap,mirror:ut.mirror,orientation:ut.orientation,padding:ut.padding,reversed:ut.reversed,scale:ut.scale,tick:ut.tick,tickCount:ut.tickCount,tickLine:nn.tickLine,tickSize:nn.tickSize,type:ut.type,width:ut.width,yAxisId:0},Qre=e=>{var t=et(e,Zre);return p.createElement(p.Fragment,null,p.createElement(qre,{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}),p.createElement(Xre,t))},eu=p.memo(Qre,C_);eu.displayName="YAxis";var Jre=(e,t)=>t,Ry=I([Jre,ye,Mk,vt,yD,Cn,w7,at],T7),Ly=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)}},O_=ur("mouseClick"),E_=hs();E_.startListening({actionCreator:O_,effect:(e,t)=>{var r=e.payload,n=Ry(t.getState(),Ly(r));n?.activeIndex!=null&&t.dispatch(b9({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var Pm=ur("mouseMove"),A_=hs(),Dl=null;A_.startListening({actionCreator:Pm,effect:(e,t)=>{var r=e.payload;Dl!==null&&cancelAnimationFrame(Dl);var n=Ly(r);Dl=requestAnimationFrame(()=>{var o=t.getState(),i=ay(o,o.tooltip.settings.shared);if(i==="axis"){var a=Ry(o,n);a?.activeIndex!=null?t.dispatch(cD({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate})):t.dispatch(lD())}Dl=null})}});function ene(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 NC={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},T_=Bt({name:"rootProps",initialState:NC,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:NC.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}}}),tne=T_.reducer,{updateOptions:rne}=T_.actions,nne=null,one={updatePolarOptions:(e,t)=>t.payload},M_=Bt({name:"polarOptions",initialState:nne,reducers:one}),{updatePolarOptions:ine}=M_.actions,ane=M_.reducer,k_=ur("keyDown"),D_=ur("focus"),$y=hs();$y.startListening({actionCreator:k_,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=sy(o,qi(r),As(r),Ms(r)),s=a==null?-1:Number(a);if(!(!Number.isFinite(s)||s<0)){var l=Cn(r);if(i==="Enter"){var c=Uc(r,"axis","hover",String(o.index));t.dispatch(fm({active:!o.active,activeIndex:o.index,activeCoordinate:c}));return}var u=c9(r),d=u==="left-to-right"?1:-1,f=i==="ArrowRight"?1:-1,h=s+f*d;if(!(l==null||h>=l.length||h<0)){var v=Uc(r,"axis","hover",String(h));t.dispatch(fm({active:!0,activeIndex:h.toString(),activeCoordinate:v}))}}}}}});$y.startListening({actionCreator:D_,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=Uc(r,"axis","hover",String(i));t.dispatch(fm({active:!0,activeIndex:i,activeCoordinate:a}))}}}});var rr=ur("externalEvent"),__=hs(),Gp=new Map;__.startListening({actionCreator:rr,effect:(e,t)=>{var{handler:r,reactEvent:n}=e.payload;if(r!=null){n.persist();var o=n.type,i=Gp.get(o);i!==void 0&&cancelAnimationFrame(i);var a=requestAnimationFrame(()=>{try{var s=t.getState(),l={activeCoordinate:i7(s),activeDataKey:fy(s),activeIndex:Fn(s),activeLabel:wD(s),activeTooltipIndex:Fn(s),isTooltipActive:a7(s)};r(l,n)}finally{Gp.delete(o)}});Gp.set(o,a)}}});var sne=I([Gi],e=>e.tooltipItemPayloads),lne=I([sne,(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)}}}),N_=ur("touchMove"),j_=hs();j_.startListening({actionCreator:N_,effect:(e,t)=>{var r=e.payload;if(!(r.touches==null||r.touches.length===0)){var n=t.getState(),o=ay(n,n.tooltip.settings.shared);if(o==="axis"){var i=r.touches[0];if(i==null)return;var a=Ry(n,Ly({clientX:i.clientX,clientY:i.clientY,currentTarget:r.currentTarget}));a?.activeIndex!=null&&t.dispatch(cD({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(rM),d=(s=c.getAttribute(nM))!==null&&s!==void 0?s:void 0,f=Yi(n).find(m=>m.id===d);if(u==null||f==null||d==null)return;var{dataKey:h}=f,v=lne(n,u,d);t.dispatch(sD({activeDataKey:h,activeIndex:u,activeCoordinate:v,activeGraphicalItemId:d}))}}}});var cne=xT({brush:VJ,cartesianAxis:wJ,chartData:iX,errorBars:Nee,graphicalItems:TQ,layout:DU,legend:VH,options:eX,polarAxis:BZ,polarOptions:ane,referenceElements:zJ,rootProps:tne,tooltip:x9,zIndex:W7}),une=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return rU({reducer:cne,preloadedState:t,middleware:n=>{var o;return n({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((o="es6")!==null&&o!==void 0?o:"")}).concat([E_.middleware,A_.middleware,$y.middleware,__.middleware,j_.middleware])},enhancers:n=>{var o=n;return typeof n=="function"&&(o=n()),o.concat(VT({type:"raf"}))},devTools:{serialize:{replacer:ene},name:"recharts-".concat(r)}})};function I_(e){var{preloadedState:t,children:r,reduxStoreName:n}=e,o=Tt(),i=O.useRef(null);if(o)return r;i.current==null&&(i.current=une(t,n));var a=Uv;return p.createElement(cte,{context:a,store:i.current},r)}function dne(e){var{layout:t,margin:r}=e,n=Ne(),o=Tt();return O.useEffect(()=>{o||(n(TU(t)),n(AU(r)))},[n,o,t,r]),null}var R_=O.memo(dne,xd);function L_(e){var t=Ne();return O.useEffect(()=>{t(rne(e))},[t,e]),null}function jC(e){var{zIndex:t,isPanorama:r}=e,n=O.useRef(null),o=Ne();return O.useLayoutEffect(()=>(n.current&&o(F7({zIndex:t,element:n.current,isPanorama:r})),()=>{o(B7({zIndex:t,isPanorama:r}))}),[o,t,r]),p.createElement("g",{tabIndex:-1,ref:n})}function IC(e){var{children:t,isPanorama:r}=e,n=J(k7);if(!n||n.length===0)return t;var o=n.filter(a=>a<0),i=n.filter(a=>a>0);return p.createElement(p.Fragment,null,o.map(a=>p.createElement(jC,{key:a,zIndex:a,isPanorama:r})),t,i.map(a=>p.createElement(jC,{key:a,zIndex:a,isPanorama:r})))}var fne=["children"];function pne(e,t){if(e==null)return{};var r,n,o=hne(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 hne(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 tu(){return tu=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},tu.apply(null,arguments)}var mne={width:"100%",height:"100%",display:"block"},vne=O.forwardRef((e,t)=>{var r=rg(),n=ng(),o=xM();if(!Wr(r)||!Wr(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),p.createElement(jv,tu({},a,{title:s,desc:l,role:u,tabIndex:c,width:r,height:n,style:mne,ref:t}),i)}),gne=e=>{var{children:t}=e,r=J(Ku);if(!r)return null;var{width:n,height:o,y:i,x:a}=r;return p.createElement(jv,{width:n,height:o,x:a,y:i},t)},RC=O.forwardRef((e,t)=>{var{children:r}=e,n=pne(e,fne),o=Tt();return o?p.createElement(gne,null,p.createElement(IC,{isPanorama:!0},r)):p.createElement(vne,tu({ref:t},n),p.createElement(IC,{isPanorama:!1},r))});function yne(){var e=Ne(),[t,r]=O.useState(null),n=J(YU);return O.useEffect(()=>{if(t!=null){var o=t.getBoundingClientRect(),i=o.width/t.offsetWidth;pe(i)&&i!==n&&e(kU(i))}},[t,e,n]),r}function LC(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 bne(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?LC(Object(r),!0).forEach(function(n){xne(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):LC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function xne(e,t,r){return(t=wne(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wne(e){var t=Sne(e,"string");return typeof t=="symbol"?t:t+""}function Sne(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 Rn(){return Rn=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},Rn.apply(null,arguments)}var Pne=()=>(hX(),null);function ru(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var Cne=O.forwardRef((e,t)=>{var r,n,o=O.useRef(null),[i,a]=O.useState({containerWidth:ru((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:ru((n=e.style)===null||n===void 0?void 0:n.height)}),s=O.useCallback((c,u)=>{a(d=>{var f=Math.round(c),h=Math.round(u);return d.containerWidth===f&&d.containerHeight===h?d:{containerWidth:f,containerHeight:h}})},[]),l=O.useCallback(c=>{if(typeof t=="function"&&t(c),c!=null&&typeof ResizeObserver<"u"){var{width:u,height:d}=c.getBoundingClientRect();s(u,d);var f=v=>{var m=v[0];if(m!=null){var{width:g,height:y}=m.contentRect;s(g,y)}},h=new ResizeObserver(f);h.observe(c),o.current=h}},[t,s]);return O.useEffect(()=>()=>{var c=o.current;c?.disconnect()},[s]),p.createElement(p.Fragment,null,p.createElement(vs,{width:i.containerWidth,height:i.containerHeight}),p.createElement("div",Rn({ref:l},e)))}),One=O.forwardRef((e,t)=>{var{width:r,height:n}=e,[o,i]=O.useState({containerWidth:ru(r),containerHeight:ru(n)}),a=O.useCallback((l,c)=>{i(u=>{var d=Math.round(l),f=Math.round(c);return u.containerWidth===d&&u.containerHeight===f?u:{containerWidth:d,containerHeight:f}})},[]),s=O.useCallback(l=>{if(typeof t=="function"&&t(l),l!=null){var{width:c,height:u}=l.getBoundingClientRect();a(c,u)}},[t,a]);return p.createElement(p.Fragment,null,p.createElement(vs,{width:o.containerWidth,height:o.containerHeight}),p.createElement("div",Rn({ref:s},e)))}),Ene=O.forwardRef((e,t)=>{var{width:r,height:n}=e;return p.createElement(p.Fragment,null,p.createElement(vs,{width:r,height:n}),p.createElement("div",Rn({ref:t},e)))}),Ane=O.forwardRef((e,t)=>{var{width:r,height:n}=e;return typeof r=="string"||typeof n=="string"?p.createElement(One,Rn({},e,{ref:t})):typeof r=="number"&&typeof n=="number"?p.createElement(Ene,Rn({},e,{width:r,height:n,ref:t})):p.createElement(p.Fragment,null,p.createElement(vs,{width:r,height:n}),p.createElement("div",Rn({ref:t},e)))});function Tne(e){return e?Cne:Ane}var Mne=O.forwardRef((e,t)=>{var{children:r,className:n,height:o,onClick:i,onContextMenu:a,onDoubleClick:s,onMouseDown:l,onMouseEnter:c,onMouseLeave:u,onMouseMove:d,onMouseUp:f,onTouchEnd:h,onTouchMove:v,onTouchStart:m,style:g,width:y,responsive:x,dispatchTouchEvents:w=!0}=e,S=O.useRef(null),P=Ne(),[C,E]=O.useState(null),[A,T]=O.useState(null),M=yne(),_=Jv(),k=_?.width>0?_.width:y,N=_?.height>0?_.height:o,R=O.useCallback($=>{M($),typeof t=="function"&&t($),E($),T($),$!=null&&(S.current=$)},[M,t,E,T]),z=O.useCallback($=>{P(O_($)),P(rr({handler:i,reactEvent:$}))},[P,i]),B=O.useCallback($=>{P(Pm($)),P(rr({handler:c,reactEvent:$}))},[P,c]),F=O.useCallback($=>{P(lD()),P(rr({handler:u,reactEvent:$}))},[P,u]),j=O.useCallback($=>{P(Pm($)),P(rr({handler:d,reactEvent:$}))},[P,d]),L=O.useCallback(()=>{P(D_())},[P]),H=O.useCallback($=>{P(k_($.key))},[P]),re=O.useCallback($=>{P(rr({handler:a,reactEvent:$}))},[P,a]),le=O.useCallback($=>{P(rr({handler:s,reactEvent:$}))},[P,s]),ae=O.useCallback($=>{P(rr({handler:l,reactEvent:$}))},[P,l]),oe=O.useCallback($=>{P(rr({handler:f,reactEvent:$}))},[P,f]),Se=O.useCallback($=>{P(rr({handler:m,reactEvent:$}))},[P,m]),Me=O.useCallback($=>{w&&P(N_($)),P(rr({handler:v,reactEvent:$}))},[P,w,v]),K=O.useCallback($=>{P(rr({handler:h,reactEvent:$}))},[P,h]),fe=Tne(x);return p.createElement(TD.Provider,{value:C},p.createElement(RA.Provider,{value:A},p.createElement(fe,{width:k??g?.width,height:N??g?.height,className:ve("recharts-wrapper",n),style:bne({position:"relative",cursor:"default",width:k,height:N},g),onClick:z,onContextMenu:re,onDoubleClick:le,onFocus:L,onKeyDown:H,onMouseDown:ae,onMouseEnter:B,onMouseLeave:F,onMouseMove:j,onMouseUp:oe,onTouchEnd:K,onTouchMove:Me,onTouchStart:Se,ref:R},p.createElement(Pne,null),r)))}),kne=["width","height","responsive","children","className","style","compact","title","desc"];function Dne(e,t){if(e==null)return{};var r,n,o=_ne(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 _ne(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 $_=O.forwardRef((e,t)=>{var{width:r,height:n,responsive:o,children:i,className:a,style:s,compact:l,title:c,desc:u}=e,d=Dne(e,kne),f=Zt(d);return l?p.createElement(p.Fragment,null,p.createElement(vs,{width:r,height:n}),p.createElement(RC,{otherAttributes:f,title:c,desc:u},i)):p.createElement(Mne,{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},p.createElement(RC,{otherAttributes:f,title:c,desc:u,ref:t},p.createElement(UJ,null,i)))});function Cm(){return Cm=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},Cm.apply(null,arguments)}var Nne={top:5,right:5,bottom:5,left:5},jne={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:Nne,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},V_=O.forwardRef(function(t,r){var n,o=et(t.categoricalChartProps,jne),{chartName:i,defaultTooltipEventType:a,validateTooltipEventTypes:s,tooltipPayloadSearcher:l,categoricalChartProps:c}=t,u={chartName:i,defaultTooltipEventType:a,validateTooltipEventTypes:s,tooltipPayloadSearcher:l,eventEmitter:void 0};return p.createElement(I_,{preloadedState:{options:u},reduxStoreName:(n=c.id)!==null&&n!==void 0?n:i},p.createElement(o_,{chartData:c.data}),p.createElement(R_,{layout:o.layout,margin:o.margin}),p.createElement(L_,{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}),p.createElement($_,Cm({},o,{ref:r})))}),Ine=["axis"],Rne=O.forwardRef((e,t)=>p.createElement(V_,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:Ine,tooltipPayloadSearcher:gy,categoricalChartProps:e,ref:t})),Lne=["axis","item"],$ne=O.forwardRef((e,t)=>p.createElement(V_,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:Lne,tooltipPayloadSearcher:gy,categoricalChartProps:e,ref:t}));function Vne(e){var t=Ne();return O.useEffect(()=>{t(ine(e))},[t,e]),null}var Fne=["layout"];function Om(){return Om=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},Om.apply(null,arguments)}function Bne(e,t){if(e==null)return{};var r,n,o=Wne(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 Wne(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 zne={top:5,right:5,bottom:5,left:5},F_={accessibilityLayer:!0,stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:zne,reverseStackOrder:!1,syncMethod:"index",layout:"radial",responsive:!1,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},Kne=O.forwardRef(function(t,r){var n,o=et(t.categoricalChartProps,F_),{layout:i}=o,a=Bne(o,Fne),{chartName:s,defaultTooltipEventType:l,validateTooltipEventTypes:c,tooltipPayloadSearcher:u}=t,d={chartName:s,defaultTooltipEventType:l,validateTooltipEventTypes:c,tooltipPayloadSearcher:u,eventEmitter:void 0};return p.createElement(I_,{preloadedState:{options:d},reduxStoreName:(n=o.id)!==null&&n!==void 0?n:s},p.createElement(o_,{chartData:o.data}),p.createElement(R_,{layout:i,margin:o.margin}),p.createElement(L_,{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}),p.createElement(Vne,{cx:o.cx,cy:o.cy,startAngle:o.startAngle,endAngle:o.endAngle,innerRadius:o.innerRadius,outerRadius:o.outerRadius}),p.createElement($_,Om({},a,{ref:r})))});function $C(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 VC(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$C(Object(r),!0).forEach(function(n){Une(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$C(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Une(e,t,r){return(t=Hne(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hne(e){var t=Gne(e,"string");return typeof t=="symbol"?t:t+""}function Gne(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 Yne=["item"],qne=VC(VC({},F_),{},{layout:"centric",startAngle:0,endAngle:360}),Xne=O.forwardRef((e,t)=>{var r=et(e,qne);return p.createElement(Kne,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:Yne,tooltipPayloadSearcher:gy,categoricalChartProps:r,ref:t})});const B_=te("text-small font-sans tracking-[-0.05em]",{variants:{size:{sm:"h-48",default:"h-72",lg:"h-96"}},defaultVariants:{size:"default"}}),_l=["var(--color-sunflower)","var(--color-electric-blue)","var(--color-cool-purple)","var(--color-deep-blue)","var(--color-warm-purple)"],W_=p.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:d="horizontal",...f},h)=>{const v=p.useMemo(()=>{if(n)return n;const g=r[0];return g?Object.keys(g).filter(x=>x!=="label"&&typeof g[x]=="number").map((x,w)=>({key:x,name:x.charAt(0).toUpperCase()+x.slice(1),color:_l[w%_l.length]})):[]},[r,n]),m=d==="vertical";return b.jsx("div",{ref:h,className:D(B_({size:t,className:e})),role:"img",...f,children:b.jsx(eg,{width:"100%",height:"100%",minWidth:100,minHeight:100,children:b.jsxs($ne,{data:r,layout:d,margin:{top:5,right:30,left:l?20:0,bottom:s?20:5},children:[o&&b.jsx(Ny,{strokeDasharray:"3 3",stroke:"var(--color-border)",vertical:!m,horizontal:m}),m?b.jsxs(b.Fragment,{children:[b.jsx(Jc,{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(eu,{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(Jc,{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(eu,{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(yy,{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},itemStyle:{color:"var(--color-secondary)"},cursor:{fill:"rgba(0, 0, 0, 0.05)"}}),i&&b.jsx(qu,{wrapperStyle:{fontFamily:"var(--font-sans)",fontSize:"14px"},formatter:g=>b.jsx("span",{style:{color:"var(--color-secondary)"},children:g})}),v.map((g,y)=>b.jsx(P_,{dataKey:g.key,name:g.name,fill:g.color||_l[y%_l.length],radius:c,stackId:u?"stack":void 0},g.key))]})})})});W_.displayName="BarChart";const z_=te("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"}}),Em=te("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}}),K_=p.forwardRef(({className:e,size:t,separator:r=b.jsx(Vy,{}),children:n,...o},i)=>{const a=p.Children.toArray(n).filter(p.isValidElement);return b.jsx("nav",{ref:i,"aria-label":"Breadcrumb",...o,children:b.jsx("ol",{className:D(z_({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))})})});K_.displayName="Breadcrumbs";const U_=p.forwardRef(({className:e,asChild:t=!1,isCurrentPage:r=!1,...n},o)=>{if(r)return b.jsx("span",{className:D(Em({isCurrentPage:!0,className:e})),"aria-current":"page",children:n.children});const i=t?Ie:"a";return b.jsx(i,{ref:o,className:D(Em({isCurrentPage:!1,className:e})),...n})});U_.displayName="BreadcrumbItem";const Vy=p.forwardRef(({className:e,children:t,...r},n)=>b.jsx("span",{ref:n,role:"presentation","aria-hidden":"true",className:D("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"})})}));Vy.displayName="BreadcrumbSeparator";function Zne(e,t,r="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:r}).format(t).split(/\s/g).slice(2).join(" ")}const Qne={},Sa={};function yo(e,t){try{const n=(Qne[e]||=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format)(t).split("GMT")[1];return n in Sa?Sa[n]:FC(n,n.split(":"))}catch{if(e in Sa)return Sa[e];const r=e?.match(Jne);return r?FC(e,r.slice(1)):NaN}}const Jne=/([+-]\d\d):?(\d\d)?/;function FC(e,t){const r=+(t[0]||0),n=+(t[1]||0),o=+(t[2]||0)/60;return Sa[e]=r*60+n>0?r*60+n+o:r*60-n-o}class Ir extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(yo(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),H_(this),Am(this)):this.setTime(Date.now())}static tz(t,...r){return r.length?new Ir(...r,t):new Ir(Date.now(),t)}withTimeZone(t){return new Ir(+this,t)}getTimezoneOffset(){const t=-yo(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),Am(this),+this}[Symbol.for("constructDateFrom")](t){return new Ir(+new Date(t),this.timeZone)}}const BC=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!BC.test(e))return;const t=e.replace(BC,"$1UTC");Ir.prototype[t]&&(e.startsWith("get")?Ir.prototype[e]=function(){return this.internal[t]()}:(Ir.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),eoe(this),+this},Ir.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Am(this),+this}))});function Am(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-yo(e.timeZone,e)*60))}function eoe(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),H_(e)}function H_(e){const t=yo(e.timeZone,e),r=t>0?Math.floor(t):Math.ceil(t),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);const o=-new Date(+e).getTimezoneOffset(),i=-new Date(+n).getTimezoneOffset(),a=o-i,s=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();a&&s&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+a);const l=o-r;l&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+l);const c=new Date(+e);c.setUTCSeconds(0);const u=o>0?c.getSeconds():(c.getSeconds()-60)%60,d=Math.round(-(yo(e.timeZone,e)*60))%60;(d||u)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+d),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+d+u));const f=yo(e.timeZone,e),h=f>0?Math.floor(f):Math.ceil(f),m=-new Date(+e).getTimezoneOffset()-h,g=h!==r,y=m-l;if(g&&y){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+y);const x=yo(e.timeZone,e),w=x>0?Math.floor(x):Math.ceil(x),S=h-w;S&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+S),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+S))}}class St extends Ir{static tz(t,...r){return r.length?new St(...r,t):new St(Date.now(),t)}toISOString(){const[t,r,n]=this.tzComponents(),o=`${t}${r}:${n}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,r,n,o]=this.internal.toUTCString().split(" ");return`${t?.slice(0,-1)} ${n} ${r} ${o}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[r,n,o]=this.tzComponents();return`${t} GMT${r}${n}${o} (${Zne(this.timeZone,this)})`}toLocaleString(t,r){return Date.prototype.toLocaleString.call(this,t,{...r,timeZone:r?.timeZone||this.timeZone})}toLocaleDateString(t,r){return Date.prototype.toLocaleDateString.call(this,t,{...r,timeZone:r?.timeZone||this.timeZone})}toLocaleTimeString(t,r){return Date.prototype.toLocaleTimeString.call(this,t,{...r,timeZone:r?.timeZone||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),r=t>0?"-":"+",n=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),o=String(Math.abs(t)%60).padStart(2,"0");return[r,n,o]}withTimeZone(t){return new St(+this,t)}[Symbol.for("constructDateFrom")](t){return new St(+new Date(t),this.timeZone)}}const G_=6048e5,toe=864e5,WC=Symbol.for("constructDateFrom");function Je(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&WC in e?e[WC](t):e instanceof Date?new e.constructor(t):new Date(t)}function Te(e,t){return Je(t||e,e)}function Y_(e,t,r){const n=Te(e,r?.in);return isNaN(t)?Je(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function q_(e,t,r){const n=Te(e,r?.in);if(isNaN(t))return Je(e,NaN);if(!t)return n;const o=n.getDate(),i=Je(e,n.getTime());i.setMonth(n.getMonth()+t+1,0);const a=i.getDate();return o>=a?i:(n.setFullYear(i.getFullYear(),i.getMonth(),o),n)}let roe={};function Ns(){return roe}function Di(e,t){const r=Ns(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,o=Te(e,t?.in),i=o.getDay(),a=(i<n?7:0)+i-n;return o.setDate(o.getDate()-a),o.setHours(0,0,0,0),o}function Ga(e,t){return Di(e,{...t,weekStartsOn:1})}function X_(e,t){const r=Te(e,t?.in),n=r.getFullYear(),o=Je(r,0);o.setFullYear(n+1,0,4),o.setHours(0,0,0,0);const i=Ga(o),a=Je(r,0);a.setFullYear(n,0,4),a.setHours(0,0,0,0);const s=Ga(a);return r.getTime()>=i.getTime()?n+1:r.getTime()>=s.getTime()?n:n-1}function zC(e){const t=Te(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function Xi(e,...t){const r=Je.bind(null,t.find(n=>typeof n=="object"));return t.map(r)}function Ya(e,t){const r=Te(e,t?.in);return r.setHours(0,0,0,0),r}function Fy(e,t,r){const[n,o]=Xi(r?.in,e,t),i=Ya(n),a=Ya(o),s=+i-zC(i),l=+a-zC(a);return Math.round((s-l)/toe)}function noe(e,t){const r=X_(e,t),n=Je(e,0);return n.setFullYear(r,0,4),n.setHours(0,0,0,0),Ga(n)}function ooe(e,t,r){return Y_(e,t*7,r)}function ioe(e,t,r){return q_(e,t*12,r)}function aoe(e,t){let r,n=t?.in;return e.forEach(o=>{!n&&typeof o=="object"&&(n=Je.bind(null,o));const i=Te(o,n);(!r||r<i||isNaN(+i))&&(r=i)}),Je(n,r||NaN)}function soe(e,t){let r,n=t?.in;return e.forEach(o=>{!n&&typeof o=="object"&&(n=Je.bind(null,o));const i=Te(o,n);(!r||r>i||isNaN(+i))&&(r=i)}),Je(n,r||NaN)}function loe(e,t,r){const[n,o]=Xi(r?.in,e,t);return+Ya(n)==+Ya(o)}function Z_(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function coe(e){return!(!Z_(e)&&typeof e!="number"||isNaN(+Te(e)))}function Q_(e,t,r){const[n,o]=Xi(r?.in,e,t),i=n.getFullYear()-o.getFullYear(),a=n.getMonth()-o.getMonth();return i*12+a}function uoe(e,t){const r=Te(e,t?.in),n=r.getMonth();return r.setFullYear(r.getFullYear(),n+1,0),r.setHours(23,59,59,999),r}function J_(e,t){const[r,n]=Xi(e,t.start,t.end);return{start:r,end:n}}function doe(e,t){const{start:r,end:n}=J_(t?.in,e);let o=+r>+n;const i=o?+r:+n,a=o?n:r;a.setHours(0,0,0,0),a.setDate(1);let s=1;const l=[];for(;+a<=i;)l.push(Je(r,a)),a.setMonth(a.getMonth()+s);return o?l.reverse():l}function foe(e,t){const r=Te(e,t?.in);return r.setDate(1),r.setHours(0,0,0,0),r}function poe(e,t){const r=Te(e,t?.in),n=r.getFullYear();return r.setFullYear(n+1,0,0),r.setHours(23,59,59,999),r}function eN(e,t){const r=Te(e,t?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}function hoe(e,t){const{start:r,end:n}=J_(t?.in,e);let o=+r>+n;const i=o?+r:+n,a=o?n:r;a.setHours(0,0,0,0),a.setMonth(0,1);let s=1;const l=[];for(;+a<=i;)l.push(Je(r,a)),a.setFullYear(a.getFullYear()+s);return o?l.reverse():l}function tN(e,t){const r=Ns(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,o=Te(e,t?.in),i=o.getDay(),a=(i<n?-7:0)+6-(i-n);return o.setDate(o.getDate()+a),o.setHours(23,59,59,999),o}function moe(e,t){return tN(e,{...t,weekStartsOn:1})}const voe={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},goe=(e,t,r)=>{let n;const o=voe[e];return typeof o=="string"?n=o:t===1?n=o.one:n=o.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function Yp(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const yoe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},boe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},xoe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},woe={date:Yp({formats:yoe,defaultWidth:"full"}),time:Yp({formats:boe,defaultWidth:"full"}),dateTime:Yp({formats:xoe,defaultWidth:"full"})},Soe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Poe=(e,t,r,n)=>Soe[e];function ma(e){return(t,r)=>{const n=r?.context?String(r.context):"standalone";let o;if(n==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=r?.width?String(r.width):a;o=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=r?.width?String(r.width):e.defaultWidth;o=e.values[s]||e.values[a]}const i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}const Coe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Ooe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Eoe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Aoe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Toe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Moe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},koe=(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},Doe={ordinalNumber:koe,era:ma({values:Coe,defaultWidth:"wide"}),quarter:ma({values:Ooe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ma({values:Eoe,defaultWidth:"wide"}),day:ma({values:Aoe,defaultWidth:"wide"}),dayPeriod:ma({values:Toe,defaultWidth:"wide",formattingValues:Moe,defaultFormattingWidth:"wide"})};function va(e){return(t,r={})=>{const n=r.width,o=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const a=i[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?Noe(s,d=>d.test(a)):_oe(s,d=>d.test(a));let c;c=e.valueCallback?e.valueCallback(l):l,c=r.valueCallback?r.valueCallback(c):c;const u=t.slice(a.length);return{value:c,rest:u}}}function _oe(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function Noe(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function joe(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const o=n[0],i=t.match(e.parsePattern);if(!i)return null;let a=e.valueCallback?e.valueCallback(i[0]):i[0];a=r.valueCallback?r.valueCallback(a):a;const s=t.slice(o.length);return{value:a,rest:s}}}const Ioe=/^(\d+)(th|st|nd|rd)?/i,Roe=/\d+/i,Loe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},$oe={any:[/^b/i,/^(a|c)/i]},Voe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Foe={any:[/1/i,/2/i,/3/i,/4/i]},Boe={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Woe={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},zoe={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Koe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Uoe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Hoe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Goe={ordinalNumber:joe({matchPattern:Ioe,parsePattern:Roe,valueCallback:e=>parseInt(e,10)}),era:va({matchPatterns:Loe,defaultMatchWidth:"wide",parsePatterns:$oe,defaultParseWidth:"any"}),quarter:va({matchPatterns:Voe,defaultMatchWidth:"wide",parsePatterns:Foe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:va({matchPatterns:Boe,defaultMatchWidth:"wide",parsePatterns:Woe,defaultParseWidth:"any"}),day:va({matchPatterns:zoe,defaultMatchWidth:"wide",parsePatterns:Koe,defaultParseWidth:"any"}),dayPeriod:va({matchPatterns:Uoe,defaultMatchWidth:"any",parsePatterns:Hoe,defaultParseWidth:"any"})},si={code:"en-US",formatDistance:goe,formatLong:woe,formatRelative:Poe,localize:Doe,match:Goe,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Yoe(e,t){const r=Te(e,t?.in);return Fy(r,eN(r))+1}function By(e,t){const r=Te(e,t?.in),n=+Ga(r)-+noe(r);return Math.round(n/G_)+1}function rN(e,t){const r=Te(e,t?.in),n=r.getFullYear(),o=Ns(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=Je(t?.in||e,0);a.setFullYear(n+1,0,i),a.setHours(0,0,0,0);const s=Di(a,t),l=Je(t?.in||e,0);l.setFullYear(n,0,i),l.setHours(0,0,0,0);const c=Di(l,t);return+r>=+s?n+1:+r>=+c?n:n-1}function qoe(e,t){const r=Ns(),n=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=rN(e,t),i=Je(t?.in||e,0);return i.setFullYear(o,0,n),i.setHours(0,0,0,0),Di(i,t)}function Wy(e,t){const r=Te(e,t?.in),n=+Di(r,t)-+qoe(r,t);return Math.round(n/G_)+1}function Pe(e,t){const r=e<0?"-":"",n=Math.abs(e).toString().padStart(t,"0");return r+n}const En={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return Pe(t==="yy"?n%100:n,t.length)},M(e,t){const r=e.getMonth();return t==="M"?String(r+1):Pe(r+1,2)},d(e,t){return Pe(e.getDate(),t.length)},a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return r==="am"?"a.m.":"p.m."}},h(e,t){return Pe(e.getHours()%12||12,t.length)},H(e,t){return Pe(e.getHours(),t.length)},m(e,t){return Pe(e.getMinutes(),t.length)},s(e,t){return Pe(e.getSeconds(),t.length)},S(e,t){const r=t.length,n=e.getMilliseconds(),o=Math.trunc(n*Math.pow(10,r-3));return Pe(o,t.length)}},ii={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},KC={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){const n=e.getFullYear(),o=n>0?n:1-n;return r.ordinalNumber(o,{unit:"year"})}return En.y(e,t)},Y:function(e,t,r,n){const o=rN(e,n),i=o>0?o:1-o;if(t==="YY"){const a=i%100;return Pe(a,2)}return t==="Yo"?r.ordinalNumber(i,{unit:"year"}):Pe(i,t.length)},R:function(e,t){const r=X_(e);return Pe(r,t.length)},u:function(e,t){const r=e.getFullYear();return Pe(r,t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return Pe(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return Pe(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return En.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return Pe(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const o=Wy(e,n);return t==="wo"?r.ordinalNumber(o,{unit:"week"}):Pe(o,t.length)},I:function(e,t,r){const n=By(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):Pe(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):En.d(e,t)},D:function(e,t,r){const n=Yoe(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):Pe(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const o=e.getDay(),i=(o-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Pe(i,2);case"eo":return r.ordinalNumber(i,{unit:"day"});case"eee":return r.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(o,{width:"short",context:"formatting"});default:return r.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const o=e.getDay(),i=(o-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Pe(i,t.length);case"co":return r.ordinalNumber(i,{unit:"day"});case"ccc":return r.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(o,{width:"narrow",context:"standalone"});case"cccccc":return r.day(o,{width:"short",context:"standalone"});default:return r.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),o=n===0?7:n;switch(t){case"i":return String(o);case"ii":return Pe(o,t.length);case"io":return r.ordinalNumber(o,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(o,{width:"narrow",context:"formatting"});default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let o;switch(n===12?o=ii.noon:n===0?o=ii.midnight:o=n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(o,{width:"narrow",context:"formatting"});default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let o;switch(n>=17?o=ii.evening:n>=12?o=ii.afternoon:n>=4?o=ii.morning:o=ii.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(o,{width:"narrow",context:"formatting"});default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let n=e.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return En.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):En.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):Pe(n,t.length)},k:function(e,t,r){let n=e.getHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):Pe(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):En.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):En.s(e,t)},S:function(e,t){return En.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return HC(n);case"XXXX":case"XX":return uo(n);default:return uo(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return HC(n);case"xxxx":case"xx":return uo(n);default:return uo(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+UC(n,":");default:return"GMT"+uo(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+UC(n,":");default:return"GMT"+uo(n,":")}},t:function(e,t,r){const n=Math.trunc(+e/1e3);return Pe(n,t.length)},T:function(e,t,r){return Pe(+e,t.length)}};function UC(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),o=Math.trunc(n/60),i=n%60;return i===0?r+String(o):r+String(o)+t+Pe(i,2)}function HC(e,t){return e%60===0?(e>0?"-":"+")+Pe(Math.abs(e)/60,2):uo(e,t)}function uo(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),o=Pe(Math.trunc(n/60),2),i=Pe(n%60,2);return r+o+t+i}const GC=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},nN=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},Xoe=(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],o=r[2];if(!o)return GC(e,t);let i;switch(n){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",GC(n,t)).replace("{{time}}",nN(o,t))},Zoe={p:nN,P:Xoe},Qoe=/^D+$/,Joe=/^Y+$/,eie=["D","DD","YY","YYYY"];function tie(e){return Qoe.test(e)}function rie(e){return Joe.test(e)}function nie(e,t,r){const n=oie(e,t,r);if(console.warn(n),eie.includes(e))throw new RangeError(n)}function oie(e,t,r){const n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const iie=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,aie=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,sie=/^'([^]*?)'?$/,lie=/''/g,cie=/[a-zA-Z]/;function Pa(e,t,r){const n=Ns(),o=r?.locale??n.locale??si,i=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,a=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,s=Te(e,r?.in);if(!coe(s))throw new RangeError("Invalid time value");let l=t.match(aie).map(u=>{const d=u[0];if(d==="p"||d==="P"){const f=Zoe[d];return f(u,o.formatLong)}return u}).join("").match(iie).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const d=u[0];if(d==="'")return{isToken:!1,value:uie(u)};if(KC[d])return{isToken:!0,value:u};if(d.match(cie))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:u}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const c={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return l.map(u=>{if(!u.isToken)return u.value;const d=u.value;(!r?.useAdditionalWeekYearTokens&&rie(d)||!r?.useAdditionalDayOfYearTokens&&tie(d))&&nie(d,t,String(e));const f=KC[d[0]];return f(s,d,o.localize,c)}).join("")}function uie(e){const t=e.match(sie);return t?t[1].replace(lie,"'"):e}function die(e,t){const r=Te(e,t?.in),n=r.getFullYear(),o=r.getMonth(),i=Je(r,0);return i.setFullYear(n,o+1,0),i.setHours(0,0,0,0),i.getDate()}function fie(e,t){return Te(e,t?.in).getMonth()}function pie(e,t){return Te(e,t?.in).getFullYear()}function hie(e,t){return+Te(e)>+Te(t)}function mie(e,t){return+Te(e)<+Te(t)}function vie(e,t,r){const[n,o]=Xi(r?.in,e,t);return n.getFullYear()===o.getFullYear()&&n.getMonth()===o.getMonth()}function gie(e,t,r){const[n,o]=Xi(r?.in,e,t);return n.getFullYear()===o.getFullYear()}function yie(e,t,r){const n=Te(e,r?.in),o=n.getFullYear(),i=n.getDate(),a=Je(e,0);a.setFullYear(o,t,15),a.setHours(0,0,0,0);const s=die(a);return n.setMonth(t,Math.min(i,s)),n}function bie(e,t,r){const n=Te(e,r?.in);return isNaN(+n)?Je(e,NaN):(n.setFullYear(t),n)}const YC=5,xie=4;function wie(e,t){const r=t.startOfMonth(e),n=r.getDay()>0?r.getDay():7,o=t.addDays(e,-n+1),i=t.addDays(o,YC*7-1);return t.getMonth(e)===t.getMonth(i)?YC:xie}function oN(e,t){const r=t.startOfMonth(e),n=r.getDay();return n===1?r:n===0?t.addDays(r,-6):t.addDays(r,-1*(n-1))}function Sie(e,t){const r=oN(e,t),n=wie(e,t);return t.addDays(r,n*7-1)}const iN={...si,labels:{labelDayButton:(e,t,r,n)=>{let o;n&&typeof n.format=="function"?o=n.format.bind(n):o=(a,s)=>Pa(a,s,{locale:si,...r});let i=o(e,"PPPP");return t.today&&(i=`Today, ${i}`),t.selected&&(i=`${i}, selected`),i},labelMonthDropdown:"Choose the Month",labelNext:"Go to the Next Month",labelPrevious:"Go to the Previous Month",labelWeekNumber:e=>`Week ${e}`,labelYearDropdown:"Choose the Year",labelGrid:(e,t,r)=>{let n;return r&&typeof r.format=="function"?n=r.format.bind(r):n=(o,i)=>Pa(o,i,{locale:si,...t}),n(e,"LLLL yyyy")},labelGridcell:(e,t,r,n)=>{let o;n&&typeof n.format=="function"?o=n.format.bind(n):o=(a,s)=>Pa(a,s,{locale:si,...r});let i=o(e,"PPPP");return t?.today&&(i=`Today, ${i}`),i},labelNav:"Navigation bar",labelWeekNumberHeader:"Week Number",labelWeekday:(e,t,r)=>{let n;return r&&typeof r.format=="function"?n=r.format.bind(r):n=(o,i)=>Pa(o,i,{locale:si,...t}),n(e,"cccc")}}};class Jt{constructor(t,r){this.Date=Date,this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?St.tz(this.options.timeZone):new this.Date,this.newDate=(n,o,i)=>this.overrides?.newDate?this.overrides.newDate(n,o,i):this.options.timeZone?new St(n,o,i,this.options.timeZone):new Date(n,o,i),this.addDays=(n,o)=>this.overrides?.addDays?this.overrides.addDays(n,o):Y_(n,o),this.addMonths=(n,o)=>this.overrides?.addMonths?this.overrides.addMonths(n,o):q_(n,o),this.addWeeks=(n,o)=>this.overrides?.addWeeks?this.overrides.addWeeks(n,o):ooe(n,o),this.addYears=(n,o)=>this.overrides?.addYears?this.overrides.addYears(n,o):ioe(n,o),this.differenceInCalendarDays=(n,o)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(n,o):Fy(n,o),this.differenceInCalendarMonths=(n,o)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(n,o):Q_(n,o),this.eachMonthOfInterval=n=>this.overrides?.eachMonthOfInterval?this.overrides.eachMonthOfInterval(n):doe(n),this.eachYearOfInterval=n=>{const o=this.overrides?.eachYearOfInterval?this.overrides.eachYearOfInterval(n):hoe(n),i=new Set(o.map(s=>this.getYear(s)));if(i.size===o.length)return o;const a=[];return i.forEach(s=>{a.push(new Date(s,0,1))}),a},this.endOfBroadcastWeek=n=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(n):Sie(n,this),this.endOfISOWeek=n=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(n):moe(n),this.endOfMonth=n=>this.overrides?.endOfMonth?this.overrides.endOfMonth(n):uoe(n),this.endOfWeek=(n,o)=>this.overrides?.endOfWeek?this.overrides.endOfWeek(n,o):tN(n,this.options),this.endOfYear=n=>this.overrides?.endOfYear?this.overrides.endOfYear(n):poe(n),this.format=(n,o,i)=>{const a=this.overrides?.format?this.overrides.format(n,o,this.options):Pa(n,o,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(a):a},this.getISOWeek=n=>this.overrides?.getISOWeek?this.overrides.getISOWeek(n):By(n),this.getMonth=(n,o)=>this.overrides?.getMonth?this.overrides.getMonth(n,this.options):fie(n,this.options),this.getYear=(n,o)=>this.overrides?.getYear?this.overrides.getYear(n,this.options):pie(n,this.options),this.getWeek=(n,o)=>this.overrides?.getWeek?this.overrides.getWeek(n,this.options):Wy(n,this.options),this.isAfter=(n,o)=>this.overrides?.isAfter?this.overrides.isAfter(n,o):hie(n,o),this.isBefore=(n,o)=>this.overrides?.isBefore?this.overrides.isBefore(n,o):mie(n,o),this.isDate=n=>this.overrides?.isDate?this.overrides.isDate(n):Z_(n),this.isSameDay=(n,o)=>this.overrides?.isSameDay?this.overrides.isSameDay(n,o):loe(n,o),this.isSameMonth=(n,o)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(n,o):vie(n,o),this.isSameYear=(n,o)=>this.overrides?.isSameYear?this.overrides.isSameYear(n,o):gie(n,o),this.max=n=>this.overrides?.max?this.overrides.max(n):aoe(n),this.min=n=>this.overrides?.min?this.overrides.min(n):soe(n),this.setMonth=(n,o)=>this.overrides?.setMonth?this.overrides.setMonth(n,o):yie(n,o),this.setYear=(n,o)=>this.overrides?.setYear?this.overrides.setYear(n,o):bie(n,o),this.startOfBroadcastWeek=(n,o)=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(n,this):oN(n,this),this.startOfDay=n=>this.overrides?.startOfDay?this.overrides.startOfDay(n):Ya(n),this.startOfISOWeek=n=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(n):Ga(n),this.startOfMonth=n=>this.overrides?.startOfMonth?this.overrides.startOfMonth(n):foe(n),this.startOfWeek=(n,o)=>this.overrides?.startOfWeek?this.overrides.startOfWeek(n,this.options):Di(n,this.options),this.startOfYear=n=>this.overrides?.startOfYear?this.overrides.startOfYear(n):eN(n),this.options={locale:iN,...t},this.overrides=r}getDigitMap(){const{numerals:t="latn"}=this.options,r=new Intl.NumberFormat("en-US",{numberingSystem:t}),n={};for(let o=0;o<10;o++)n[o.toString()]=r.format(o);return n}replaceDigits(t){const r=this.getDigitMap();return t.replace(/\d/g,n=>r[n]||n)}formatNumber(t){return this.replaceDigits(t.toString())}getMonthYearOrder(){const t=this.options.locale?.code;return t&&Jt.yearFirstLocales.has(t)?"year-first":"month-first"}formatMonthYear(t){const{locale:r,timeZone:n,numerals:o}=this.options,i=r?.code;if(i&&Jt.yearFirstLocales.has(i))try{return new Intl.DateTimeFormat(i,{month:"long",year:"numeric",timeZone:n,numberingSystem:o}).format(t)}catch{}const a=this.getMonthYearOrder()==="year-first"?"y LLLL":"LLLL y";return this.format(t,a)}}Jt.yearFirstLocales=new Set(["eu","hu","ja","ja-Hira","ja-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mn","mn-MN","zh","zh-CN","zh-HK","zh-TW"]);const Gr=new Jt;class aN{constructor(t,r,n=Gr){this.date=t,this.displayMonth=r,this.outside=!!(r&&!n.isSameMonth(t,r)),this.dateLib=n,this.isoDate=n.format(t,"yyyy-MM-dd"),this.displayMonthId=n.format(r,"yyyy-MM"),this.dateMonthId=n.format(t,"yyyy-MM")}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class Pie{constructor(t,r){this.date=t,this.weeks=r}}class Cie{constructor(t,r){this.days=r,this.weekNumber=t}}function Oie(e){return O.createElement("button",{...e})}function Eie(e){return O.createElement("span",{...e})}function Aie(e){const{size:t=24,orientation:r="left",className:n}=e;return O.createElement("svg",{className:n,width:t,height:t,viewBox:"0 0 24 24"},r==="up"&&O.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),r==="down"&&O.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),r==="left"&&O.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),r==="right"&&O.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function Tie(e){const{day:t,modifiers:r,...n}=e;return O.createElement("td",{...n})}function Mie(e){const{day:t,modifiers:r,...n}=e,o=O.useRef(null);return O.useEffect(()=>{r.focused&&o.current?.focus()},[r.focused]),O.createElement("button",{ref:o,...n})}var ne;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(ne||(ne={}));var Fe;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(Fe||(Fe={}));var yr;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(yr||(yr={}));var Ut;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(Ut||(Ut={}));function kie(e){const{options:t,className:r,components:n,classNames:o,...i}=e,a=[o[ne.Dropdown],r].join(" "),s=t?.find(({value:l})=>l===i.value);return O.createElement("span",{"data-disabled":i.disabled,className:o[ne.DropdownRoot]},O.createElement(n.Select,{className:a,...i},t?.map(({value:l,label:c,disabled:u})=>O.createElement(n.Option,{key:l,value:l,disabled:u},c))),O.createElement("span",{className:o[ne.CaptionLabel],"aria-hidden":!0},s?.label,O.createElement(n.Chevron,{orientation:"down",size:18,className:o[ne.Chevron]})))}function Die(e){return O.createElement("div",{...e})}function _ie(e){return O.createElement("div",{...e})}function Nie(e){const{calendarMonth:t,displayIndex:r,...n}=e;return O.createElement("div",{...n},e.children)}function jie(e){const{calendarMonth:t,displayIndex:r,...n}=e;return O.createElement("div",{...n})}function Iie(e){return O.createElement("table",{...e})}function Rie(e){return O.createElement("div",{...e})}const sN=O.createContext(void 0);function js(){const e=O.useContext(sN);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function Lie(e){const{components:t}=js();return O.createElement(t.Dropdown,{...e})}function $ie(e){const{onPreviousClick:t,onNextClick:r,previousMonth:n,nextMonth:o,...i}=e,{components:a,classNames:s,labels:{labelPrevious:l,labelNext:c}}=js(),u=O.useCallback(f=>{o&&r?.(f)},[o,r]),d=O.useCallback(f=>{n&&t?.(f)},[n,t]);return O.createElement("nav",{...i},O.createElement(a.PreviousMonthButton,{type:"button",className:s[ne.PreviousMonthButton],tabIndex:n?void 0:-1,"aria-disabled":n?void 0:!0,"aria-label":l(n),onClick:d},O.createElement(a.Chevron,{disabled:n?void 0:!0,className:s[ne.Chevron],orientation:"left"})),O.createElement(a.NextMonthButton,{type:"button",className:s[ne.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":c(o),onClick:u},O.createElement(a.Chevron,{disabled:o?void 0:!0,orientation:"right",className:s[ne.Chevron]})))}function Vie(e){const{components:t}=js();return O.createElement(t.Button,{...e})}function Fie(e){return O.createElement("option",{...e})}function Bie(e){const{components:t}=js();return O.createElement(t.Button,{...e})}function Wie(e){const{rootRef:t,...r}=e;return O.createElement("div",{...r,ref:t})}function zie(e){return O.createElement("select",{...e})}function Kie(e){const{week:t,...r}=e;return O.createElement("tr",{...r})}function Uie(e){return O.createElement("th",{...e})}function Hie(e){return O.createElement("thead",{"aria-hidden":!0},O.createElement("tr",{...e}))}function Gie(e){const{week:t,...r}=e;return O.createElement("th",{...r})}function Yie(e){return O.createElement("th",{...e})}function qie(e){return O.createElement("tbody",{...e})}function Xie(e){const{components:t}=js();return O.createElement(t.Dropdown,{...e})}const Zie=Object.freeze(Object.defineProperty({__proto__:null,Button:Oie,CaptionLabel:Eie,Chevron:Aie,Day:Tie,DayButton:Mie,Dropdown:kie,DropdownNav:Die,Footer:_ie,Month:Nie,MonthCaption:jie,MonthGrid:Iie,Months:Rie,MonthsDropdown:Lie,Nav:$ie,NextMonthButton:Vie,Option:Fie,PreviousMonthButton:Bie,Root:Wie,Select:zie,Week:Kie,WeekNumber:Gie,WeekNumberHeader:Yie,Weekday:Uie,Weekdays:Hie,Weeks:qie,YearsDropdown:Xie},Symbol.toStringTag,{value:"Module"}));function en(e,t,r=!1,n=Gr){let{from:o,to:i}=e;const{differenceInCalendarDays:a,isSameDay:s}=n;return o&&i?(a(i,o)<0&&([o,i]=[i,o]),a(t,o)>=(r?1:0)&&a(i,t)>=(r?1:0)):!r&&i?s(i,t):!r&&o?s(o,t):!1}function zy(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function wd(e){return!!(e&&typeof e=="object"&&"from"in e)}function Ky(e){return!!(e&&typeof e=="object"&&"after"in e)}function Uy(e){return!!(e&&typeof e=="object"&&"before"in e)}function lN(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function cN(e,t){return Array.isArray(e)&&e.every(t.isDate)}function tn(e,t,r=Gr){const n=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:i,isAfter:a}=r;return n.some(s=>{if(typeof s=="boolean")return s;if(r.isDate(s))return o(e,s);if(cN(s,r))return s.some(l=>o(e,l));if(wd(s))return en(s,e,!1,r);if(lN(s))return Array.isArray(s.dayOfWeek)?s.dayOfWeek.includes(e.getDay()):s.dayOfWeek===e.getDay();if(zy(s)){const l=i(s.before,e),c=i(s.after,e),u=l>0,d=c<0;return a(s.before,s.after)?d&&u:u||d}return Ky(s)?i(e,s.after)>0:Uy(s)?i(s.before,e)>0:typeof s=="function"?s(e):!1})}function Qie(e,t,r,n,o){const{disabled:i,hidden:a,modifiers:s,showOutsideDays:l,broadcastCalendar:c,today:u=o.today()}=t,{isSameDay:d,isSameMonth:f,startOfMonth:h,isBefore:v,endOfMonth:m,isAfter:g}=o,y=r&&h(r),x=n&&m(n),w={[Fe.focused]:[],[Fe.outside]:[],[Fe.disabled]:[],[Fe.hidden]:[],[Fe.today]:[]},S={};for(const P of e){const{date:C,displayMonth:E}=P,A=!!(E&&!f(C,E)),T=!!(y&&v(C,y)),M=!!(x&&g(C,x)),_=!!(i&&tn(C,i,o)),k=!!(a&&tn(C,a,o))||T||M||!c&&!l&&A||c&&l===!1&&A,N=d(C,u);A&&w.outside.push(P),_&&w.disabled.push(P),k&&w.hidden.push(P),N&&w.today.push(P),s&&Object.keys(s).forEach(R=>{const z=s?.[R];z&&tn(C,z,o)&&(S[R]?S[R].push(P):S[R]=[P])})}return P=>{const C={[Fe.focused]:!1,[Fe.disabled]:!1,[Fe.hidden]:!1,[Fe.outside]:!1,[Fe.today]:!1},E={};for(const A in w){const T=w[A];C[A]=T.some(M=>M===P)}for(const A in S)E[A]=S[A].some(T=>T===P);return{...C,...E}}}function Jie(e,t,r={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[i])=>(r[i]?o.push(r[i]):t[Fe[i]]?o.push(t[Fe[i]]):t[yr[i]]&&o.push(t[yr[i]]),o),[t[ne.Day]])}function eae(e){return{...Zie,...e}}function tae(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([r,n])=>{r.startsWith("data-")&&(t[r]=n)}),t}function uN(){const e={};for(const t in ne)e[ne[t]]=`rdp-${ne[t]}`;for(const t in Fe)e[Fe[t]]=`rdp-${Fe[t]}`;for(const t in yr)e[yr[t]]=`rdp-${yr[t]}`;for(const t in Ut)e[Ut[t]]=`rdp-${Ut[t]}`;return e}function dN(e,t,r){return(r??new Jt(t)).formatMonthYear(e)}const rae=dN;function nae(e,t,r){return(r??new Jt(t)).format(e,"d")}function oae(e,t=Gr){return t.format(e,"LLLL")}function iae(e,t,r){return(r??new Jt(t)).format(e,"cccccc")}function aae(e,t=Gr){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function sae(){return""}function fN(e,t=Gr){return t.format(e,"yyyy")}const lae=fN,cae=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:dN,formatDay:nae,formatMonthCaption:rae,formatMonthDropdown:oae,formatWeekNumber:aae,formatWeekNumberHeader:sae,formatWeekdayName:iae,formatYearCaption:lae,formatYearDropdown:fN},Symbol.toStringTag,{value:"Module"}));function uae(e){return e?.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e?.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...cae,...e}}function Hy(e,t,r,n){let o=(n??new Jt(r)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const dae=Hy;function Gy(e,t,r){return(r??new Jt(t)).formatMonthYear(e)}const fae=Gy;function pN(e,t,r,n){let o=(n??new Jt(r)).format(e,"PPPP");return t?.today&&(o=`Today, ${o}`),o}function hN(e){return"Choose the Month"}function mN(){return""}const pae="Go to the Next Month";function vN(e,t){return pae}function gN(e){return"Go to the Previous Month"}function yN(e,t,r){return(r??new Jt(t)).format(e,"cccc")}function bN(e,t){return`Week ${e}`}function xN(e){return"Week Number"}function wN(e){return"Choose the Year"}const hae=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:fae,labelDay:dae,labelDayButton:Hy,labelGrid:Gy,labelGridcell:pN,labelMonthDropdown:hN,labelNav:mN,labelNext:vN,labelPrevious:gN,labelWeekNumber:bN,labelWeekNumberHeader:xN,labelWeekday:yN,labelYearDropdown:wN},Symbol.toStringTag,{value:"Module"})),pr=(e,t,r)=>t||(r?typeof r=="function"?r:(...n)=>r:e);function mae(e,t){const r=t.locale?.labels??{};return{...hae,...e??{},labelDayButton:pr(Hy,e?.labelDayButton,r.labelDayButton),labelMonthDropdown:pr(hN,e?.labelMonthDropdown,r.labelMonthDropdown),labelNext:pr(vN,e?.labelNext,r.labelNext),labelPrevious:pr(gN,e?.labelPrevious,r.labelPrevious),labelWeekNumber:pr(bN,e?.labelWeekNumber,r.labelWeekNumber),labelYearDropdown:pr(wN,e?.labelYearDropdown,r.labelYearDropdown),labelGrid:pr(Gy,e?.labelGrid,r.labelGrid),labelGridcell:pr(pN,e?.labelGridcell,r.labelGridcell),labelNav:pr(mN,e?.labelNav,r.labelNav),labelWeekNumberHeader:pr(xN,e?.labelWeekNumberHeader,r.labelWeekNumberHeader),labelWeekday:pr(yN,e?.labelWeekday,r.labelWeekday)}}function vae(e,t,r,n,o){const{startOfMonth:i,startOfYear:a,endOfYear:s,eachMonthOfInterval:l,getMonth:c}=o;return l({start:a(e),end:s(e)}).map(f=>{const h=n.formatMonthDropdown(f,o),v=c(f),m=t&&f<i(t)||r&&f>i(r)||!1;return{value:v,label:h,disabled:m}})}function gae(e,t={},r={}){let n={...t?.[ne.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{n={...n,...r?.[o]}}),n}function yae(e,t,r,n){const o=n??e.today(),i=r?e.startOfBroadcastWeek(o,e):t?e.startOfISOWeek(o):e.startOfWeek(o),a=[];for(let s=0;s<7;s++){const l=e.addDays(i,s);a.push(l)}return a}function bae(e,t,r,n,o=!1){if(!e||!t)return;const{startOfYear:i,endOfYear:a,eachYearOfInterval:s,getYear:l}=n,c=i(e),u=a(t),d=s({start:c,end:u});return o&&d.reverse(),d.map(f=>{const h=r.formatYearDropdown(f,n);return{value:l(f),label:h,disabled:!1}})}function xae(e,t={}){const{weekStartsOn:r,locale:n}=t,o=r??n?.options?.weekStartsOn??0,i=s=>{const l=typeof s=="number"||typeof s=="string"?new Date(s):s;return new St(l.getFullYear(),l.getMonth(),l.getDate(),12,0,0,e)},a=s=>{const l=i(s);return new Date(l.getFullYear(),l.getMonth(),l.getDate(),0,0,0,0)};return{today:()=>i(St.tz(e)),newDate:(s,l,c)=>new St(s,l,c,12,0,0,e),startOfDay:s=>i(s),startOfWeek:(s,l)=>{const c=i(s),u=l?.weekStartsOn??o,d=(c.getDay()-u+7)%7;return c.setDate(c.getDate()-d),c},startOfISOWeek:s=>{const l=i(s),c=(l.getDay()-1+7)%7;return l.setDate(l.getDate()-c),l},startOfMonth:s=>{const l=i(s);return l.setDate(1),l},startOfYear:s=>{const l=i(s);return l.setMonth(0,1),l},endOfWeek:(s,l)=>{const c=i(s),f=(((l?.weekStartsOn??o)+6)%7-c.getDay()+7)%7;return c.setDate(c.getDate()+f),c},endOfISOWeek:s=>{const l=i(s),c=(7-l.getDay())%7;return l.setDate(l.getDate()+c),l},endOfMonth:s=>{const l=i(s);return l.setMonth(l.getMonth()+1,0),l},endOfYear:s=>{const l=i(s);return l.setMonth(11,31),l},eachMonthOfInterval:s=>{const l=i(s.start),c=i(s.end),u=[],d=new St(l.getFullYear(),l.getMonth(),1,12,0,0,e),f=c.getFullYear()*12+c.getMonth();for(;d.getFullYear()*12+d.getMonth()<=f;)u.push(new St(d,e)),d.setMonth(d.getMonth()+1,1);return u},addDays:(s,l)=>{const c=i(s);return c.setDate(c.getDate()+l),c},addWeeks:(s,l)=>{const c=i(s);return c.setDate(c.getDate()+l*7),c},addMonths:(s,l)=>{const c=i(s);return c.setMonth(c.getMonth()+l),c},addYears:(s,l)=>{const c=i(s);return c.setFullYear(c.getFullYear()+l),c},eachYearOfInterval:s=>{const l=i(s.start),c=i(s.end),u=[],d=new St(l.getFullYear(),0,1,12,0,0,e);for(;d.getFullYear()<=c.getFullYear();)u.push(new St(d,e)),d.setFullYear(d.getFullYear()+1,0,1);return u},getWeek:(s,l)=>{const c=a(s);return Wy(c,{weekStartsOn:l?.weekStartsOn??o,firstWeekContainsDate:l?.firstWeekContainsDate??n?.options?.firstWeekContainsDate??1})},getISOWeek:s=>{const l=a(s);return By(l)},differenceInCalendarDays:(s,l)=>{const c=a(s),u=a(l);return Fy(c,u)},differenceInCalendarMonths:(s,l)=>{const c=a(s),u=a(l);return Q_(c,u)}}}const Is=e=>e instanceof HTMLElement?e:null,qp=e=>[...e.querySelectorAll("[data-animated-month]")??[]],wae=e=>Is(e.querySelector("[data-animated-month]")),Xp=e=>Is(e.querySelector("[data-animated-caption]")),Zp=e=>Is(e.querySelector("[data-animated-weeks]")),Sae=e=>Is(e.querySelector("[data-animated-nav]")),Pae=e=>Is(e.querySelector("[data-animated-weekdays]"));function Cae(e,t,{classNames:r,months:n,focused:o,dateLib:i}){const a=O.useRef(null),s=O.useRef(n),l=O.useRef(!1);O.useLayoutEffect(()=>{const c=s.current;if(s.current=n,!t||!e.current||!(e.current instanceof HTMLElement)||n.length===0||c.length===0||n.length!==c.length)return;const u=i.isSameMonth(n[0].date,c[0].date),d=i.isAfter(n[0].date,c[0].date),f=d?r[Ut.caption_after_enter]:r[Ut.caption_before_enter],h=d?r[Ut.weeks_after_enter]:r[Ut.weeks_before_enter],v=a.current,m=e.current.cloneNode(!0);if(m instanceof HTMLElement?(qp(m).forEach(w=>{if(!(w instanceof HTMLElement))return;const S=wae(w);S&&w.contains(S)&&w.removeChild(S);const P=Xp(w);P&&P.classList.remove(f);const C=Zp(w);C&&C.classList.remove(h)}),a.current=m):a.current=null,l.current||u||o)return;const g=v instanceof HTMLElement?qp(v):[],y=qp(e.current);if(y?.every(x=>x instanceof HTMLElement)&&g&&g.every(x=>x instanceof HTMLElement)){l.current=!0,e.current.style.isolation="isolate";const x=Sae(e.current);x&&(x.style.zIndex="1"),y.forEach((w,S)=>{const P=g[S];if(!P)return;w.style.position="relative",w.style.overflow="hidden";const C=Xp(w);C&&C.classList.add(f);const E=Zp(w);E&&E.classList.add(h);const A=()=>{l.current=!1,e.current&&(e.current.style.isolation=""),x&&(x.style.zIndex=""),C&&C.classList.remove(f),E&&E.classList.remove(h),w.style.position="",w.style.overflow="",w.contains(P)&&w.removeChild(P)};P.style.pointerEvents="none",P.style.position="absolute",P.style.overflow="hidden",P.setAttribute("aria-hidden","true");const T=Pae(P);T&&(T.style.opacity="0");const M=Xp(P);M&&(M.classList.add(d?r[Ut.caption_before_exit]:r[Ut.caption_after_exit]),M.addEventListener("animationend",A));const _=Zp(P);_&&_.classList.add(d?r[Ut.weeks_before_exit]:r[Ut.weeks_after_exit]),w.insertBefore(P,w.firstChild)})}})}function Oae(e,t,r,n){const o=e[0],i=e[e.length-1],{ISOWeek:a,fixedWeeks:s,broadcastCalendar:l}=r??{},{addDays:c,differenceInCalendarDays:u,differenceInCalendarMonths:d,endOfBroadcastWeek:f,endOfISOWeek:h,endOfMonth:v,endOfWeek:m,isAfter:g,startOfBroadcastWeek:y,startOfISOWeek:x,startOfWeek:w}=n,S=l?y(o,n):a?x(o):w(o),P=l?f(i):a?h(v(i)):m(v(i)),C=t&&(l?f(t):a?h(t):m(t)),E=C&&g(P,C)?C:P,A=u(E,S),T=d(i,o)+1,M=[];for(let N=0;N<=A;N++){const R=c(S,N);M.push(R)}const k=(l?35:42)*T;if(s&&M.length<k){const N=k-M.length;for(let R=0;R<N;R++){const z=c(M[M.length-1],1);M.push(z)}}return M}function Eae(e){const t=[];return e.reduce((r,n)=>{const o=n.weeks.reduce((i,a)=>i.concat(a.days.slice()),t.slice());return r.concat(o.slice())},t.slice())}function Aae(e,t,r,n){const{numberOfMonths:o=1}=r,i=[];for(let a=0;a<o;a++){const s=n.addMonths(e,a);if(t&&s>t)break;i.push(s)}return i}function qC(e,t,r,n){const{month:o,defaultMonth:i,today:a=n.today(),numberOfMonths:s=1}=e;let l=o||i||a;const{differenceInCalendarMonths:c,addMonths:u,startOfMonth:d}=n;if(r&&c(r,l)<s-1){const f=-1*(s-1);l=u(r,f)}return t&&c(l,t)<0&&(l=t),d(l)}function Tae(e,t,r,n){const{addDays:o,endOfBroadcastWeek:i,endOfISOWeek:a,endOfMonth:s,endOfWeek:l,getISOWeek:c,getWeek:u,startOfBroadcastWeek:d,startOfISOWeek:f,startOfWeek:h}=n,v=e.reduce((m,g)=>{const y=r.broadcastCalendar?d(g,n):r.ISOWeek?f(g):h(g),x=r.broadcastCalendar?i(g):r.ISOWeek?a(s(g)):l(s(g)),w=t.filter(E=>E>=y&&E<=x),S=r.broadcastCalendar?35:42;if(r.fixedWeeks&&w.length<S){const E=t.filter(A=>{const T=S-w.length;return A>x&&A<=o(x,T)});w.push(...E)}const P=w.reduce((E,A)=>{const T=r.ISOWeek?c(A):u(A),M=E.find(k=>k.weekNumber===T),_=new aN(A,g,n);return M?M.days.push(_):E.push(new Cie(T,[_])),E},[]),C=new Pie(g,P);return m.push(C),m},[]);return r.reverseMonths?v.reverse():v}function Mae(e,t){let{startMonth:r,endMonth:n}=e;const{startOfYear:o,startOfDay:i,startOfMonth:a,endOfMonth:s,addYears:l,endOfYear:c,newDate:u,today:d}=t,{fromYear:f,toYear:h,fromMonth:v,toMonth:m}=e;!r&&v&&(r=v),!r&&f&&(r=t.newDate(f,0,1)),!n&&m&&(n=m),!n&&h&&(n=u(h,11,31));const g=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return r?r=a(r):f?r=u(f,0,1):!r&&g&&(r=o(l(e.today??d(),-100))),n?n=s(n):h?n=u(h,11,31):!n&&g&&(n=c(e.today??d())),[r&&i(r),n&&i(n)]}function kae(e,t,r,n){if(r.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:i=1}=r,{startOfMonth:a,addMonths:s,differenceInCalendarMonths:l}=n,c=o?i:1,u=a(e);if(!t)return s(u,c);if(!(l(t,e)<i))return s(u,c)}function Dae(e,t,r,n){if(r.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:i}=r,{startOfMonth:a,addMonths:s,differenceInCalendarMonths:l}=n,c=o?i??1:1,u=a(e);if(!t)return s(u,-c);if(!(l(u,t)<=0))return s(u,-c)}function _ae(e){const t=[];return e.reduce((r,n)=>r.concat(n.weeks.slice()),t.slice())}function Sd(e,t){const[r,n]=O.useState(e);return[t===void 0?r:t,n]}function Nae(e,t){const[r,n]=Mae(e,t),{startOfMonth:o,endOfMonth:i}=t,a=qC(e,r,n,t),[s,l]=Sd(a,e.month?a:void 0);O.useEffect(()=>{const S=qC(e,r,n,t);l(S)},[e.timeZone]);const{months:c,weeks:u,days:d,previousMonth:f,nextMonth:h}=O.useMemo(()=>{const S=Aae(s,n,{numberOfMonths:e.numberOfMonths},t),P=Oae(S,e.endMonth?i(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),C=Tae(S,P,{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t),E=_ae(C),A=Eae(C),T=Dae(s,r,e,t),M=kae(s,n,e,t);return{months:C,weeks:E,days:A,previousMonth:T,nextMonth:M}},[t,s.getTime(),n?.getTime(),r?.getTime(),e.disableNavigation,e.broadcastCalendar,e.endMonth?.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:v,onMonthChange:m}=e,g=S=>u.some(P=>P.days.some(C=>C.isEqualTo(S))),y=S=>{if(v)return;let P=o(S);r&&P<o(r)&&(P=o(r)),n&&P>o(n)&&(P=o(n)),l(P),m?.(P)};return{months:c,weeks:u,days:d,navStart:r,navEnd:n,previousMonth:f,nextMonth:h,goToMonth:y,goToDay:S=>{g(S)||y(S.date)}}}var Mr;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(Mr||(Mr={}));function XC(e){return!e[Fe.disabled]&&!e[Fe.hidden]&&!e[Fe.outside]}function jae(e,t,r,n){let o,i=-1;for(const a of e){const s=t(a);XC(s)&&(s[Fe.focused]&&i<Mr.FocusedModifier?(o=a,i=Mr.FocusedModifier):n?.isEqualTo(a)&&i<Mr.LastFocused?(o=a,i=Mr.LastFocused):r(a.date)&&i<Mr.Selected?(o=a,i=Mr.Selected):s[Fe.today]&&i<Mr.Today&&(o=a,i=Mr.Today))}return o||(o=e.find(a=>XC(t(a)))),o}function Iae(e,t,r,n,o,i,a){const{ISOWeek:s,broadcastCalendar:l}=i,{addDays:c,addMonths:u,addWeeks:d,addYears:f,endOfBroadcastWeek:h,endOfISOWeek:v,endOfWeek:m,max:g,min:y,startOfBroadcastWeek:x,startOfISOWeek:w,startOfWeek:S}=a;let C={day:c,week:d,month:u,year:f,startOfWeek:E=>l?x(E,a):s?w(E):S(E),endOfWeek:E=>l?h(E):s?v(E):m(E)}[e](r,t==="after"?1:-1);return t==="before"&&n?C=g([n,C]):t==="after"&&o&&(C=y([o,C])),C}function SN(e,t,r,n,o,i,a,s=0){if(s>365)return;const l=Iae(e,t,r.date,n,o,i,a),c=!!(i.disabled&&tn(l,i.disabled,a)),u=!!(i.hidden&&tn(l,i.hidden,a)),d=l,f=new aN(l,d,a);return!c&&!u?f:SN(e,t,f,n,o,i,a,s+1)}function Rae(e,t,r,n,o){const{autoFocus:i}=e,[a,s]=O.useState(),l=jae(t.days,r,n||(()=>!1),a),[c,u]=O.useState(i?l:void 0);return{isFocusTarget:m=>!!l?.isEqualTo(m),setFocused:u,focused:c,blur:()=>{s(c),u(void 0)},moveFocus:(m,g)=>{if(!c)return;const y=SN(m,g,c,t.navStart,t.navEnd,e,o);y&&(e.disableNavigation&&!t.days.some(w=>w.isEqualTo(y))||(t.goToDay(y),u(y)))}}}function Lae(e,t){const{selected:r,required:n,onSelect:o}=e,[i,a]=Sd(r,o?r:void 0),s=o?r:i,{isSameDay:l}=t,c=h=>s?.some(v=>l(v,h))??!1,{min:u,max:d}=e;return{selected:s,select:(h,v,m)=>{let g=[...s??[]];if(c(h)){if(s?.length===u||n&&s?.length===1)return;g=s?.filter(y=>!l(y,h))}else s?.length===d?g=[h]:g=[...g,h];return o||a(g),o?.(g,h,v,m),g},isSelected:c}}function $ae(e,t,r=0,n=0,o=!1,i=Gr){const{from:a,to:s}=t||{},{isSameDay:l,isAfter:c,isBefore:u}=i;let d;if(!a&&!s)d={from:e,to:r>0?void 0:e};else if(a&&!s)l(a,e)?r===0?d={from:a,to:e}:o?d={from:a,to:void 0}:d=void 0:u(e,a)?d={from:e,to:a}:d={from:a,to:e};else if(a&&s)if(l(a,e)&&l(s,e))o?d={from:a,to:s}:d=void 0;else if(l(a,e))d={from:a,to:r>0?void 0:e};else if(l(s,e))d={from:e,to:r>0?void 0:e};else if(u(e,a))d={from:e,to:s};else if(c(e,a))d={from:a,to:e};else if(c(e,s))d={from:a,to:e};else throw new Error("Invalid range");if(d?.from&&d?.to){const f=i.differenceInCalendarDays(d.to,d.from);n>0&&f>n?d={from:e,to:void 0}:r>1&&f<r&&(d={from:e,to:void 0})}return d}function Vae(e,t,r=Gr){const n=Array.isArray(t)?t:[t];let o=e.from;const i=r.differenceInCalendarDays(e.to,e.from),a=Math.min(i,6);for(let s=0;s<=a;s++){if(n.includes(o.getDay()))return!0;o=r.addDays(o,1)}return!1}function ZC(e,t,r=Gr){return en(e,t.from,!1,r)||en(e,t.to,!1,r)||en(t,e.from,!1,r)||en(t,e.to,!1,r)}function Fae(e,t,r=Gr){const n=Array.isArray(t)?t:[t];if(n.filter(s=>typeof s!="function").some(s=>typeof s=="boolean"?s:r.isDate(s)?en(e,s,!1,r):cN(s,r)?s.some(l=>en(e,l,!1,r)):wd(s)?s.from&&s.to?ZC(e,{from:s.from,to:s.to},r):!1:lN(s)?Vae(e,s.dayOfWeek,r):zy(s)?r.isAfter(s.before,s.after)?ZC(e,{from:r.addDays(s.after,1),to:r.addDays(s.before,-1)},r):tn(e.from,s,r)||tn(e.to,s,r):Ky(s)||Uy(s)?tn(e.from,s,r)||tn(e.to,s,r):!1))return!0;const a=n.filter(s=>typeof s=="function");if(a.length){let s=e.from;const l=r.differenceInCalendarDays(e.to,e.from);for(let c=0;c<=l;c++){if(a.some(u=>u(s)))return!0;s=r.addDays(s,1)}}return!1}function Bae(e,t){const{disabled:r,excludeDisabled:n,selected:o,required:i,onSelect:a}=e,[s,l]=Sd(o,a?o:void 0),c=a?o:s;return{selected:c,select:(f,h,v)=>{const{min:m,max:g}=e,y=f?$ae(f,c,m,g,i,t):void 0;return n&&r&&y?.from&&y.to&&Fae({from:y.from,to:y.to},r,t)&&(y.from=f,y.to=void 0),a||l(y),a?.(y,f,h,v),y},isSelected:f=>c&&en(c,f,!1,t)}}function Wae(e,t){const{selected:r,required:n,onSelect:o}=e,[i,a]=Sd(r,o?r:void 0),s=o?r:i,{isSameDay:l}=t;return{selected:s,select:(d,f,h)=>{let v=d;return!n&&s&&s&&l(d,s)&&(v=void 0),o||a(v),o?.(v,d,f,h),v},isSelected:d=>s?l(s,d):!1}}function zae(e,t){const r=Wae(e,t),n=Lae(e,t),o=Bae(e,t);switch(e.mode){case"single":return r;case"multiple":return n;case"range":return o;default:return}}function or(e,t){return e instanceof St&&e.timeZone===t?e:new St(e,t)}function ai(e,t,r){return or(e,t)}function QC(e,t,r){return typeof e=="boolean"||typeof e=="function"?e:e instanceof Date?ai(e,t):Array.isArray(e)?e.map(n=>n instanceof Date?ai(n,t):n):wd(e)?{...e,from:e.from?or(e.from,t):e.from,to:e.to?or(e.to,t):e.to}:zy(e)?{before:ai(e.before,t),after:ai(e.after,t)}:Ky(e)?{after:ai(e.after,t)}:Uy(e)?{before:ai(e.before,t)}:e}function Qp(e,t,r){return e&&(Array.isArray(e)?e.map(n=>QC(n,t)):QC(e,t))}function Kae(e){let t=e;const r=t.timeZone;if(r&&(t={...e,timeZone:r},t.today&&(t.today=or(t.today,r)),t.month&&(t.month=or(t.month,r)),t.defaultMonth&&(t.defaultMonth=or(t.defaultMonth,r)),t.startMonth&&(t.startMonth=or(t.startMonth,r)),t.endMonth&&(t.endMonth=or(t.endMonth,r)),t.mode==="single"&&t.selected?t.selected=or(t.selected,r):t.mode==="multiple"&&t.selected?t.selected=t.selected?.map(ce=>or(ce,r)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?or(t.selected.from,r):t.selected.from,to:t.selected.to?or(t.selected.to,r):t.selected.to}),t.disabled!==void 0&&(t.disabled=Qp(t.disabled,r)),t.hidden!==void 0&&(t.hidden=Qp(t.hidden,r)),t.modifiers)){const ce={};Object.keys(t.modifiers).forEach(we=>{ce[we]=Qp(t.modifiers?.[we],r)}),t.modifiers=ce}const{components:n,formatters:o,labels:i,dateLib:a,locale:s,classNames:l}=O.useMemo(()=>{const ce={...iN,...t.locale},we=t.broadcastCalendar?1:t.weekStartsOn,se=t.noonSafe&&t.timeZone?xae(t.timeZone,{weekStartsOn:we,locale:ce}):void 0,be=t.dateLib&&se?{...se,...t.dateLib}:t.dateLib??se,Kt=new Jt({locale:ce,weekStartsOn:we,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},be);return{dateLib:Kt,components:eae(t.components),formatters:uae(t.formatters),labels:mae(t.labels,Kt.options),locale:ce,classNames:{...uN(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.noonSafe,t.components,t.formatters,t.labels,t.classNames]);t.today||(t={...t,today:a.today()});const{captionLayout:c,mode:u,navLayout:d,numberOfMonths:f=1,onDayBlur:h,onDayClick:v,onDayFocus:m,onDayKeyDown:g,onDayMouseEnter:y,onDayMouseLeave:x,onNextClick:w,onPrevClick:S,showWeekNumber:P,styles:C}=t,{formatCaption:E,formatDay:A,formatMonthDropdown:T,formatWeekNumber:M,formatWeekNumberHeader:_,formatWeekdayName:k,formatYearDropdown:N}=o,R=Nae(t,a),{days:z,months:B,navStart:F,navEnd:j,previousMonth:L,nextMonth:H,goToMonth:re}=R,le=Qie(z,t,F,j,a),{isSelected:ae,select:oe,selected:Se}=zae(t,a)??{},{blur:Me,focused:K,isFocusTarget:fe,moveFocus:$,setFocused:G}=Rae(t,R,le,ae??(()=>!1),a),{labelDayButton:W,labelGridcell:V,labelGrid:he,labelMonthDropdown:ue,labelNav:Ye,labelPrevious:tt,labelNext:zt,labelWeekday:el,labelWeekNumber:tB,labelWeekNumberHeader:rB,labelYearDropdown:nB}=i,oB=O.useMemo(()=>yae(a,t.ISOWeek,t.broadcastCalendar,t.today),[a,t.ISOWeek,t.broadcastCalendar,t.today]),sx=u!==void 0||v!==void 0,ef=O.useCallback(()=>{L&&(re(L),S?.(L))},[L,re,S]),tf=O.useCallback(()=>{H&&(re(H),w?.(H))},[re,H,w]),iB=O.useCallback((ce,we)=>se=>{se.preventDefault(),se.stopPropagation(),G(ce),!we.disabled&&(oe?.(ce.date,we,se),v?.(ce.date,we,se))},[oe,v,G]),aB=O.useCallback((ce,we)=>se=>{G(ce),m?.(ce.date,we,se)},[m,G]),sB=O.useCallback((ce,we)=>se=>{Me(),h?.(ce.date,we,se)},[Me,h]),lB=O.useCallback((ce,we)=>se=>{const be={ArrowLeft:[se.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[se.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[se.shiftKey?"year":"week","after"],ArrowUp:[se.shiftKey?"year":"week","before"],PageUp:[se.shiftKey?"year":"month","before"],PageDown:[se.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(be[se.key]){se.preventDefault(),se.stopPropagation();const[Kt,me]=be[se.key];$(Kt,me)}g?.(ce.date,we,se)},[$,g,t.dir]),cB=O.useCallback((ce,we)=>se=>{y?.(ce.date,we,se)},[y]),uB=O.useCallback((ce,we)=>se=>{x?.(ce.date,we,se)},[x]),dB=O.useCallback(ce=>we=>{const se=Number(we.target.value),be=a.setMonth(a.startOfMonth(ce),se);re(be)},[a,re]),fB=O.useCallback(ce=>we=>{const se=Number(we.target.value),be=a.setYear(a.startOfMonth(ce),se);re(be)},[a,re]),{className:pB,style:hB}=O.useMemo(()=>({className:[l[ne.Root],t.className].filter(Boolean).join(" "),style:{...C?.[ne.Root],...t.style}}),[l,t.className,t.style,C]),mB=tae(t),lx=O.useRef(null);Cae(lx,!!t.animate,{classNames:l,months:B,focused:K,dateLib:a});const vB={dayPickerProps:t,selected:Se,select:oe,isSelected:ae,months:B,nextMonth:H,previousMonth:L,goToMonth:re,getModifiers:le,components:n,classNames:l,styles:C,labels:i,formatters:o};return O.createElement(sN.Provider,{value:vB},O.createElement(n.Root,{rootRef:t.animate?lx:void 0,className:pB,style:hB,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],"aria-labelledby":t["aria-labelledby"],...mB},O.createElement(n.Months,{className:l[ne.Months],style:C?.[ne.Months]},!t.hideNavigation&&!d&&O.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:l[ne.Nav],style:C?.[ne.Nav],"aria-label":Ye(),onPreviousClick:ef,onNextClick:tf,previousMonth:L,nextMonth:H}),B.map((ce,we)=>O.createElement(n.Month,{"data-animated-month":t.animate?"true":void 0,className:l[ne.Month],style:C?.[ne.Month],key:we,displayIndex:we,calendarMonth:ce},d==="around"&&!t.hideNavigation&&we===0&&O.createElement(n.PreviousMonthButton,{type:"button",className:l[ne.PreviousMonthButton],tabIndex:L?void 0:-1,"aria-disabled":L?void 0:!0,"aria-label":tt(L),onClick:ef,"data-animated-button":t.animate?"true":void 0},O.createElement(n.Chevron,{disabled:L?void 0:!0,className:l[ne.Chevron],orientation:t.dir==="rtl"?"right":"left"})),O.createElement(n.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:l[ne.MonthCaption],style:C?.[ne.MonthCaption],calendarMonth:ce,displayIndex:we},c?.startsWith("dropdown")?O.createElement(n.DropdownNav,{className:l[ne.Dropdowns],style:C?.[ne.Dropdowns]},(()=>{const se=c==="dropdown"||c==="dropdown-months"?O.createElement(n.MonthsDropdown,{key:"month",className:l[ne.MonthsDropdown],"aria-label":ue(),classNames:l,components:n,disabled:!!t.disableNavigation,onChange:dB(ce.date),options:vae(ce.date,F,j,o,a),style:C?.[ne.Dropdown],value:a.getMonth(ce.date)}):O.createElement("span",{key:"month"},T(ce.date,a)),be=c==="dropdown"||c==="dropdown-years"?O.createElement(n.YearsDropdown,{key:"year",className:l[ne.YearsDropdown],"aria-label":nB(a.options),classNames:l,components:n,disabled:!!t.disableNavigation,onChange:fB(ce.date),options:bae(F,j,o,a,!!t.reverseYears),style:C?.[ne.Dropdown],value:a.getYear(ce.date)}):O.createElement("span",{key:"year"},N(ce.date,a));return a.getMonthYearOrder()==="year-first"?[be,se]:[se,be]})(),O.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},E(ce.date,a.options,a))):O.createElement(n.CaptionLabel,{className:l[ne.CaptionLabel],role:"status","aria-live":"polite"},E(ce.date,a.options,a))),d==="around"&&!t.hideNavigation&&we===f-1&&O.createElement(n.NextMonthButton,{type:"button",className:l[ne.NextMonthButton],tabIndex:H?void 0:-1,"aria-disabled":H?void 0:!0,"aria-label":zt(H),onClick:tf,"data-animated-button":t.animate?"true":void 0},O.createElement(n.Chevron,{disabled:H?void 0:!0,className:l[ne.Chevron],orientation:t.dir==="rtl"?"left":"right"})),we===f-1&&d==="after"&&!t.hideNavigation&&O.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:l[ne.Nav],style:C?.[ne.Nav],"aria-label":Ye(),onPreviousClick:ef,onNextClick:tf,previousMonth:L,nextMonth:H}),O.createElement(n.MonthGrid,{role:"grid","aria-multiselectable":u==="multiple"||u==="range","aria-label":he(ce.date,a.options,a)||void 0,className:l[ne.MonthGrid],style:C?.[ne.MonthGrid]},!t.hideWeekdays&&O.createElement(n.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:l[ne.Weekdays],style:C?.[ne.Weekdays]},P&&O.createElement(n.WeekNumberHeader,{"aria-label":rB(a.options),className:l[ne.WeekNumberHeader],style:C?.[ne.WeekNumberHeader],scope:"col"},_()),oB.map(se=>O.createElement(n.Weekday,{"aria-label":el(se,a.options,a),className:l[ne.Weekday],key:String(se),style:C?.[ne.Weekday],scope:"col"},k(se,a.options,a)))),O.createElement(n.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:l[ne.Weeks],style:C?.[ne.Weeks]},ce.weeks.map(se=>O.createElement(n.Week,{className:l[ne.Week],key:se.weekNumber,style:C?.[ne.Week],week:se},P&&O.createElement(n.WeekNumber,{week:se,style:C?.[ne.WeekNumber],"aria-label":tB(se.weekNumber,{locale:s}),className:l[ne.WeekNumber],scope:"row",role:"rowheader"},M(se.weekNumber,a)),se.days.map(be=>{const{date:Kt}=be,me=le(be);if(me[Fe.focused]=!me.hidden&&!!K?.isEqualTo(be),me[yr.selected]=ae?.(Kt)||me.selected,wd(Se)){const{from:rf,to:nf}=Se;me[yr.range_start]=!!(rf&&nf&&a.isSameDay(Kt,rf)),me[yr.range_end]=!!(rf&&nf&&a.isSameDay(Kt,nf)),me[yr.range_middle]=en(Se,Kt,!0,a)}const gB=gae(me,C,t.modifiersStyles),yB=Jie(me,l,t.modifiersClassNames),bB=!sx&&!me.hidden?V(Kt,me,a.options,a):void 0;return O.createElement(n.Day,{key:`${be.isoDate}_${be.displayMonthId}`,day:be,modifiers:me,className:yB.join(" "),style:gB,role:"gridcell","aria-selected":me.selected||void 0,"aria-label":bB,"data-day":be.isoDate,"data-month":be.outside?be.dateMonthId:void 0,"data-selected":me.selected||void 0,"data-disabled":me.disabled||void 0,"data-hidden":me.hidden||void 0,"data-outside":be.outside||void 0,"data-focused":me.focused||void 0,"data-today":me.today||void 0},!me.hidden&&sx?O.createElement(n.DayButton,{className:l[ne.DayButton],style:C?.[ne.DayButton],type:"button",day:be,modifiers:me,disabled:!me.focused&&me.disabled||void 0,"aria-disabled":me.focused&&me.disabled||void 0,tabIndex:fe(be)?0:-1,"aria-label":W(Kt,me,a.options,a),onClick:iB(be,me),onBlur:sB(be,me),onFocus:aB(be,me),onKeyDown:lB(be,me),onMouseEnter:cB(be,me),onMouseLeave:uB(be,me)},A(Kt,a.options,a)):!me.hidden&&A(be.date,a.options,a))})))))))),t.footer&&O.createElement(n.Footer,{className:l[ne.Footer],style:C?.[ne.Footer],role:"status","aria-live":"polite"},t.footer)))}function Rs({className:e,classNames:t,components:r,...n}){const o=uN();return b.jsx(Kae,{showOutsideDays:!0,fixedWeeks:!0,className:D("font-sans",e),classNames:{root:D(o.root),months:D("relative flex flex-row gap-4",o.months),month:D(o.month),month_caption:D("flex h-9 items-center justify-center",o.month_caption),caption_label:D("text-primary text-sm font-medium",o.caption_label),nav:D("absolute inset-x-0 top-0 z-10 flex h-9 items-center justify-between px-0.5"),button_previous:D("hover:bg-alt focus-visible:ring-sunflower inline-flex h-7 w-7 items-center justify-center rounded-full","transition-colors focus-visible:ring-2 focus-visible:outline-none"),button_next:D("hover:bg-alt focus-visible:ring-sunflower inline-flex h-7 w-7 items-center justify-center rounded-full","transition-colors focus-visible:ring-2 focus-visible:outline-none"),weekday:D("text-tertiary w-9 text-center text-xs font-medium",o.weekday),weekdays:D(o.weekdays),week:D(o.week),day:D("relative p-0 text-center",o.day),day_button:D("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","hover:bg-sunflower text-primary",o.day_button),today:D("[&>button]:border-sunflower [&>button]:border",o.today),selected:D("[&>button]:bg-sunflower [&>button]:text-primary [&>button]:hover:bg-sunflower [&>button]:font-medium",o.selected),range_start:D("[&>button]:bg-sunflower [&>button]:text-primary [&>button]:rounded-full [&>button]:font-medium","bg-lemon-meringue rounded-l-full",o.range_start),range_middle:D("bg-lemon-meringue [&>button]:text-primary [&>button]:hover:bg-sunflower/30 [&>button]:rounded-none [&>button]:bg-transparent","rounded-none",o.range_middle),range_end:D("[&>button]:bg-sunflower [&>button]:text-primary [&>button]:rounded-full [&>button]:font-medium","bg-lemon-meringue rounded-r-full",o.range_end),outside:D("[&>button]:text-tertiary [&>button]:opacity-50",o.outside),disabled:D("[&>button]:text-tertiary [&>button]:cursor-not-allowed [&>button]:opacity-50 [&>button]:hover:bg-transparent",o.disabled),hidden:D("invisible",o.hidden),...t},components:{Chevron:({orientation:i,...a})=>{const s=i==="left"?Ov:Ev;return b.jsx(s,{className:"h-4 w-4",...a})},...r},...n})}Rs.displayName="Calendar";const io=["relative","before:content-['']","before:absolute","before:inset-y-0","before:left-0","before:w-[3px]","before:z-20","before:rounded-l","before:bg-[linear-gradient(to_bottom,var(--card-accent-color)_0%,transparent_60%)]"].join(" "),PN=te("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-6",default:"p-8",lg:"p-10"},bg:{default:"bg-card",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"},accent:{none:"",border:`${io} [--card-accent-color:var(--color-border)]`,sunflower:`${io} [--card-accent-color:var(--color-sunflower)]`,"warm-purple":`${io} [--card-accent-color:var(--color-warm-purple)]`,"cool-purple":`${io} [--card-accent-color:var(--color-cool-purple)]`,"electric-blue":`${io} [--card-accent-color:var(--color-electric-blue)]`,"deep-blue":`${io} [--card-accent-color:var(--color-deep-blue)]`,error:`${io} [--card-accent-color:var(--color-error)]`}},defaultVariants:{variant:"default",padding:"default",bg:"default",accent:"none"}}),CN=p.forwardRef(({className:e,variant:t,padding:r,bg:n,accent:o,asChild:i=!1,...a},s)=>{const l=i?Ie:"div";return b.jsx(l,{className:D(PN({variant:t,padding:r,bg:n,accent:o,className:e})),ref:s,...a})});CN.displayName="Card";function Ls(e){const t=p.useRef({value:e,previous:e});return p.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function $s(e){const[t,r]=p.useState(void 0);return pt(()=>{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 Pd="Checkbox",[Uae]=it(Pd),[Hae,Yy]=Uae(Pd);function Gae(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:d}=e,[f,h]=xt({prop:r,defaultProp:o??!1,onChange:l,caller:Pd}),[v,m]=p.useState(null),[g,y]=p.useState(null),x=p.useRef(!1),w=v?!!a||!!v.closest("form"):!0,S={checked:f,disabled:i,setChecked:h,control:v,setControl:m,name:s,form:a,value:u,hasConsumerStoppedPropagationRef:x,required:c,defaultChecked:Ln(o)?!1:o,isFormControl:w,bubbleInput:g,setBubbleInput:y};return b.jsx(Hae,{scope:t,...S,children:Yae(d)?d(S):n})}var ON="CheckboxTrigger",EN=p.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},o)=>{const{control:i,value:a,disabled:s,checked:l,required:c,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:h,bubbleInput:v}=Yy(ON,e),m=ie(o,u),g=p.useRef(l);return p.useEffect(()=>{const y=i?.form;if(y){const x=()=>d(g.current);return y.addEventListener("reset",x),()=>y.removeEventListener("reset",x)}},[i,d]),b.jsx(ee.button,{type:"button",role:"checkbox","aria-checked":Ln(l)?"mixed":l,"aria-required":c,"data-state":_N(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=>{d(x=>Ln(x)?!0:!x),v&&h&&(f.current=y.isPropagationStopped(),f.current||y.stopPropagation())})})});EN.displayName=ON;var AN=p.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:o,defaultChecked:i,required:a,disabled:s,value:l,onCheckedChange:c,form:u,...d}=e;return b.jsx(Gae,{__scopeCheckbox:r,checked:o,defaultChecked:i,disabled:s,required:a,onCheckedChange:c,name:n,form:u,value:l,internal_do_not_use_render:({isFormControl:f})=>b.jsxs(b.Fragment,{children:[b.jsx(EN,{...d,ref:t,__scopeCheckbox:r}),f&&b.jsx(DN,{__scopeCheckbox:r})]})})});AN.displayName=Pd;var TN="CheckboxIndicator",MN=p.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...o}=e,i=Yy(TN,r);return b.jsx(At,{present:n||Ln(i.checked)||i.checked===!0,children:b.jsx(ee.span,{"data-state":_N(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});MN.displayName=TN;var kN="CheckboxBubbleInput",DN=p.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:o,checked:i,defaultChecked:a,required:s,disabled:l,name:c,value:u,form:d,bubbleInput:f,setBubbleInput:h}=Yy(kN,e),v=ie(r,h),m=Ls(i),g=$s(n);p.useEffect(()=>{const x=f;if(!x)return;const w=window.HTMLInputElement.prototype,P=Object.getOwnPropertyDescriptor(w,"checked").set,C=!o.current;if(m!==i&&P){const E=new Event("click",{bubbles:C});x.indeterminate=Ln(i),P.call(x,Ln(i)?!1:i),x.dispatchEvent(E)}},[f,m,i,o]);const y=p.useRef(Ln(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:d,...t,tabIndex:-1,ref:v,style:{...t.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});DN.displayName=kN;function Yae(e){return typeof e=="function"}function Ln(e){return e==="indeterminate"}function _N(e){return Ln(e)?"indeterminate":e?"checked":"unchecked"}const NN=p.forwardRef(({className:e,...t},r)=>b.jsx(AN,{ref:r,className:D("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(MN,{className:D("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"})})})}));NN.displayName="Checkbox";const qae=["top","right","bottom","left"],Wn=Math.min,Ht=Math.max,nu=Math.round,Nl=Math.floor,$r=e=>({x:e,y:e}),Xae={left:"right",right:"left",bottom:"top",top:"bottom"},Zae={start:"end",end:"start"};function Tm(e,t,r){return Ht(e,Wn(t,r))}function fn(e,t){return typeof e=="function"?e(t):e}function pn(e){return e.split("-")[0]}function Zi(e){return e.split("-")[1]}function qy(e){return e==="x"?"y":"x"}function Xy(e){return e==="y"?"height":"width"}const Qae=new Set(["top","bottom"]);function Rr(e){return Qae.has(pn(e))?"y":"x"}function Zy(e){return qy(Rr(e))}function Jae(e,t,r){r===void 0&&(r=!1);const n=Zi(e),o=Zy(e),i=Xy(o);let a=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=ou(a)),[a,ou(a)]}function ese(e){const t=ou(e);return[Mm(e),t,Mm(t)]}function Mm(e){return e.replace(/start|end/g,t=>Zae[t])}const JC=["left","right"],e1=["right","left"],tse=["top","bottom"],rse=["bottom","top"];function nse(e,t,r){switch(e){case"top":case"bottom":return r?t?e1:JC:t?JC:e1;case"left":case"right":return t?tse:rse;default:return[]}}function ose(e,t,r,n){const o=Zi(e);let i=nse(pn(e),r==="start",n);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Mm)))),i}function ou(e){return e.replace(/left|right|bottom|top/g,t=>Xae[t])}function ise(e){return{top:0,right:0,bottom:0,left:0,...e}}function jN(e){return typeof e!="number"?ise(e):{top:e,right:e,bottom:e,left:e}}function iu(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 t1(e,t,r){let{reference:n,floating:o}=e;const i=Rr(t),a=Zy(t),s=Xy(a),l=pn(t),c=i==="y",u=n.x+n.width/2-o.width/2,d=n.y+n.height/2-o.height/2,f=n[s]/2-o[s]/2;let h;switch(l){case"top":h={x:u,y:n.y-o.height};break;case"bottom":h={x:u,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:d};break;case"left":h={x:n.x-o.width,y:d};break;default:h={x:n.x,y:n.y}}switch(Zi(t)){case"start":h[a]-=f*(r&&c?-1:1);break;case"end":h[a]+=f*(r&&c?-1:1);break}return h}async function ase(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:d="floating",altBoundary:f=!1,padding:h=0}=fn(t,e),v=jN(h),g=s[f?d==="floating"?"reference":"floating":d],y=iu(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(g)))==null||r?g:g.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),x=d==="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)),S=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},P=iu(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:w,strategy:l}):x);return{top:(y.top-P.top+v.top)/S.y,bottom:(P.bottom-y.bottom+v.bottom)/S.y,left:(y.left-P.left+v.left)/S.x,right:(P.right-y.right+v.right)/S.x}}const sse=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:d}=t1(c,n,l),f=n,h={},v=0;for(let g=0;g<s.length;g++){var m;const{name:y,fn:x}=s[g],{x:w,y:S,data:P,reset:C}=await x({x:u,y:d,initialPlacement:n,placement:f,strategy:o,middlewareData:h,rects:c,platform:{...a,detectOverflow:(m=a.detectOverflow)!=null?m:ase},elements:{reference:e,floating:t}});u=w??u,d=S??d,h={...h,[y]:{...h[y],...P}},C&&v<=50&&(v++,typeof C=="object"&&(C.placement&&(f=C.placement),C.rects&&(c=C.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:u,y:d}=t1(c,f,l)),g=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:h}},lse=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}=fn(e,t)||{};if(c==null)return{};const d=jN(u),f={x:r,y:n},h=Zy(o),v=Xy(h),m=await a.getDimensions(c),g=h==="y",y=g?"top":"left",x=g?"bottom":"right",w=g?"clientHeight":"clientWidth",S=i.reference[v]+i.reference[h]-f[h]-i.floating[v],P=f[h]-i.reference[h],C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let E=C?C[w]:0;(!E||!await(a.isElement==null?void 0:a.isElement(C)))&&(E=s.floating[w]||i.floating[v]);const A=S/2-P/2,T=E/2-m[v]/2-1,M=Wn(d[y],T),_=Wn(d[x],T),k=M,N=E-m[v]-_,R=E/2-m[v]/2+A,z=Tm(k,R,N),B=!l.arrow&&Zi(o)!=null&&R!==z&&i.reference[v]/2-(R<k?M:_)-m[v]/2<0,F=B?R<k?R-k:R-N:0;return{[h]:f[h]+F,data:{[h]:z,centerOffset:R-z-F,...B&&{alignmentOffset:F}},reset:B}}}),cse=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:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:m=!0,...g}=fn(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const y=pn(o),x=Rr(s),w=pn(s)===s,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),P=f||(w||!m?[ou(s)]:ese(s)),C=v!=="none";!f&&C&&P.push(...ose(s,m,v,S));const E=[s,...P],A=await l.detectOverflow(t,g),T=[];let M=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&T.push(A[y]),d){const R=Jae(o,a,S);T.push(A[R[0]],A[R[1]])}if(M=[...M,{placement:o,overflows:T}],!T.every(R=>R<=0)){var _,k;const R=(((_=i.flip)==null?void 0:_.index)||0)+1,z=E[R];if(z&&(!(d==="alignment"?x!==Rr(z):!1)||M.every(j=>Rr(j.placement)===x?j.overflows[0]>0:!0)))return{data:{index:R,overflows:M},reset:{placement:z}};let B=(k=M.filter(F=>F.overflows[0]<=0).sort((F,j)=>F.overflows[1]-j.overflows[1])[0])==null?void 0:k.placement;if(!B)switch(h){case"bestFit":{var N;const F=(N=M.filter(j=>{if(C){const L=Rr(j.placement);return L===x||L==="y"}return!0}).map(j=>[j.placement,j.overflows.filter(L=>L>0).reduce((L,H)=>L+H,0)]).sort((j,L)=>j[1]-L[1])[0])==null?void 0:N[0];F&&(B=F);break}case"initialPlacement":B=s;break}if(o!==B)return{reset:{placement:B}}}return{}}}};function r1(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function n1(e){return qae.some(t=>e[t]>=0)}const use=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:o="referenceHidden",...i}=fn(e,t);switch(o){case"referenceHidden":{const a=await n.detectOverflow(t,{...i,elementContext:"reference"}),s=r1(a,r.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:n1(s)}}}case"escaped":{const a=await n.detectOverflow(t,{...i,altBoundary:!0}),s=r1(a,r.floating);return{data:{escapedOffsets:s,escaped:n1(s)}}}default:return{}}}}},IN=new Set(["left","top"]);async function dse(e,t){const{placement:r,platform:n,elements:o}=e,i=await(n.isRTL==null?void 0:n.isRTL(o.floating)),a=pn(r),s=Zi(r),l=Rr(r)==="y",c=IN.has(a)?-1:1,u=i&&l?-1:1,d=fn(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:v}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof v=="number"&&(h=s==="end"?v*-1:v),l?{x:h*u,y:f*c}:{x:f*c,y:h*u}}const fse=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 dse(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}}}}},pse=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}=fn(e,t),u={x:r,y:n},d=await i.detectOverflow(t,c),f=Rr(pn(o)),h=qy(f);let v=u[h],m=u[f];if(a){const y=h==="y"?"top":"left",x=h==="y"?"bottom":"right",w=v+d[y],S=v-d[x];v=Tm(w,v,S)}if(s){const y=f==="y"?"top":"left",x=f==="y"?"bottom":"right",w=m+d[y],S=m-d[x];m=Tm(w,m,S)}const g=l.fn({...t,[h]:v,[f]:m});return{...g,data:{x:g.x-r,y:g.y-n,enabled:{[h]:a,[f]:s}}}}}},hse=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}=fn(e,t),u={x:r,y:n},d=Rr(o),f=qy(d);let h=u[f],v=u[d];const m=fn(s,t),g=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const w=f==="y"?"height":"width",S=i.reference[f]-i.floating[w]+g.mainAxis,P=i.reference[f]+i.reference[w]-g.mainAxis;h<S?h=S:h>P&&(h=P)}if(c){var y,x;const w=f==="y"?"width":"height",S=IN.has(pn(o)),P=i.reference[d]-i.floating[w]+(S&&((y=a.offset)==null?void 0:y[d])||0)+(S?0:g.crossAxis),C=i.reference[d]+i.reference[w]+(S?0:((x=a.offset)==null?void 0:x[d])||0)-(S?g.crossAxis:0);v<P?v=P:v>C&&(v=C)}return{[f]:h,[d]:v}}}},mse=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}=fn(e,t),u=await a.detectOverflow(t,c),d=pn(o),f=Zi(o),h=Rr(o)==="y",{width:v,height:m}=i.floating;let g,y;d==="top"||d==="bottom"?(g=d,y=f===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(y=d,g=f==="end"?"top":"bottom");const x=m-u.top-u.bottom,w=v-u.left-u.right,S=Wn(m-u[g],x),P=Wn(v-u[y],w),C=!t.middlewareData.shift;let E=S,A=P;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(A=w),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(E=x),C&&!f){const M=Ht(u.left,0),_=Ht(u.right,0),k=Ht(u.top,0),N=Ht(u.bottom,0);h?A=v-2*(M!==0||_!==0?M+_:Ht(u.left,u.right)):E=m-2*(k!==0||N!==0?k+N:Ht(u.top,u.bottom))}await l({...t,availableWidth:A,availableHeight:E});const T=await a.getDimensions(s.floating);return v!==T.width||m!==T.height?{reset:{rects:!0}}:{}}}};function Cd(){return typeof window<"u"}function Qi(e){return RN(e)?(e.nodeName||"").toLowerCase():"#document"}function Xt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Yr(e){var t;return(t=(RN(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function RN(e){return Cd()?e instanceof Node||e instanceof Xt(e).Node:!1}function wr(e){return Cd()?e instanceof Element||e instanceof Xt(e).Element:!1}function Kr(e){return Cd()?e instanceof HTMLElement||e instanceof Xt(e).HTMLElement:!1}function o1(e){return!Cd()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Xt(e).ShadowRoot}const vse=new Set(["inline","contents"]);function Vs(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=Sr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!vse.has(o)}const gse=new Set(["table","td","th"]);function yse(e){return gse.has(Qi(e))}const bse=[":popover-open",":modal"];function Od(e){return bse.some(t=>{try{return e.matches(t)}catch{return!1}})}const xse=["transform","translate","scale","rotate","perspective"],wse=["transform","translate","scale","rotate","perspective","filter"],Sse=["paint","layout","strict","content"];function Qy(e){const t=Jy(),r=wr(e)?Sr(e):e;return xse.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)||wse.some(n=>(r.willChange||"").includes(n))||Sse.some(n=>(r.contain||"").includes(n))}function Pse(e){let t=zn(e);for(;Kr(t)&&!_i(t);){if(Qy(t))return t;if(Od(t))return null;t=zn(t)}return null}function Jy(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Cse=new Set(["html","body","#document"]);function _i(e){return Cse.has(Qi(e))}function Sr(e){return Xt(e).getComputedStyle(e)}function Ed(e){return wr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function zn(e){if(Qi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||o1(e)&&e.host||Yr(e);return o1(t)?t.host:t}function LN(e){const t=zn(e);return _i(t)?e.ownerDocument?e.ownerDocument.body:e.body:Kr(t)&&Vs(t)?t:LN(t)}function qa(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=LN(e),i=o===((n=e.ownerDocument)==null?void 0:n.body),a=Xt(o);if(i){const s=km(a);return t.concat(a,a.visualViewport||[],Vs(o)?o:[],s&&r?qa(s):[])}return t.concat(o,qa(o,[],r))}function km(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function $N(e){const t=Sr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=Kr(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,s=nu(r)!==i||nu(n)!==a;return s&&(r=i,n=a),{width:r,height:n,$:s}}function eb(e){return wr(e)?e:e.contextElement}function Si(e){const t=eb(e);if(!Kr(t))return $r(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=$N(t);let a=(i?nu(r.width):r.width)/n,s=(i?nu(r.height):r.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const Ose=$r(0);function VN(e){const t=Xt(e);return!Jy()||!t.visualViewport?Ose:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ese(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Xt(e)?!1:t}function Lo(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),i=eb(e);let a=$r(1);t&&(n?wr(n)&&(a=Si(n)):a=Si(e));const s=Ese(i,r,n)?VN(i):$r(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const f=Xt(i),h=n&&wr(n)?Xt(n):n;let v=f,m=km(v);for(;m&&n&&h!==v;){const g=Si(m),y=m.getBoundingClientRect(),x=Sr(m),w=y.left+(m.clientLeft+parseFloat(x.paddingLeft))*g.x,S=y.top+(m.clientTop+parseFloat(x.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,d*=g.y,l+=w,c+=S,v=Xt(m),m=km(v)}}return iu({width:u,height:d,x:l,y:c})}function Ad(e,t){const r=Ed(e).scrollLeft;return t?t.left+r:Lo(Yr(e)).left+r}function FN(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Ad(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function Ase(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i=o==="fixed",a=Yr(n),s=t?Od(t.floating):!1;if(n===a||s&&i)return r;let l={scrollLeft:0,scrollTop:0},c=$r(1);const u=$r(0),d=Kr(n);if((d||!d&&!i)&&((Qi(n)!=="body"||Vs(a))&&(l=Ed(n)),Kr(n))){const h=Lo(n);c=Si(n),u.x=h.x+n.clientLeft,u.y=h.y+n.clientTop}const f=a&&!d&&!i?FN(a,l):$r(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:r.y*c.y-l.scrollTop*c.y+u.y+f.y}}function Tse(e){return Array.from(e.getClientRects())}function Mse(e){const t=Yr(e),r=Ed(e),n=e.ownerDocument.body,o=Ht(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Ht(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+Ad(e);const s=-r.scrollTop;return Sr(n).direction==="rtl"&&(a+=Ht(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:a,y:s}}const i1=25;function kse(e,t){const r=Xt(e),n=Yr(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=Jy();(!u||u&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}const c=Ad(n);if(c<=0){const u=n.ownerDocument,d=u.body,f=getComputedStyle(d),h=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,v=Math.abs(n.clientWidth-d.clientWidth-h);v<=i1&&(i-=v)}else c<=i1&&(i+=c);return{width:i,height:a,x:s,y:l}}const Dse=new Set(["absolute","fixed"]);function _se(e,t){const r=Lo(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=Kr(e)?Si(e):$r(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 a1(e,t,r){let n;if(t==="viewport")n=kse(e,r);else if(t==="document")n=Mse(Yr(e));else if(wr(t))n=_se(t,r);else{const o=VN(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return iu(n)}function BN(e,t){const r=zn(e);return r===t||!wr(r)||_i(r)?!1:Sr(r).position==="fixed"||BN(r,t)}function Nse(e,t){const r=t.get(e);if(r)return r;let n=qa(e,[],!1).filter(s=>wr(s)&&Qi(s)!=="body"),o=null;const i=Sr(e).position==="fixed";let a=i?zn(e):e;for(;wr(a)&&!_i(a);){const s=Sr(a),l=Qy(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&Dse.has(o.position)||Vs(a)&&!l&&BN(e,a))?n=n.filter(u=>u!==a):o=s,a=zn(a)}return t.set(e,n),n}function jse(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const a=[...r==="clippingAncestors"?Od(t)?[]:Nse(t,this._c):[].concat(r),n],s=a[0],l=a.reduce((c,u)=>{const d=a1(t,u,o);return c.top=Ht(d.top,c.top),c.right=Wn(d.right,c.right),c.bottom=Wn(d.bottom,c.bottom),c.left=Ht(d.left,c.left),c},a1(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Ise(e){const{width:t,height:r}=$N(e);return{width:t,height:r}}function Rse(e,t,r){const n=Kr(t),o=Yr(t),i=r==="fixed",a=Lo(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=$r(0);function c(){l.x=Ad(o)}if(n||!n&&!i)if((Qi(t)!=="body"||Vs(o))&&(s=Ed(t)),n){const h=Lo(t,!0,i,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else o&&c();i&&!n&&o&&c();const u=o&&!n&&!i?FN(o,s):$r(0),d=a.left+s.scrollLeft-l.x-u.x,f=a.top+s.scrollTop-l.y-u.y;return{x:d,y:f,width:a.width,height:a.height}}function Jp(e){return Sr(e).position==="static"}function s1(e,t){if(!Kr(e)||Sr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Yr(e)===r&&(r=r.ownerDocument.body),r}function WN(e,t){const r=Xt(e);if(Od(e))return r;if(!Kr(e)){let o=zn(e);for(;o&&!_i(o);){if(wr(o)&&!Jp(o))return o;o=zn(o)}return r}let n=s1(e,t);for(;n&&yse(n)&&Jp(n);)n=s1(n,t);return n&&_i(n)&&Jp(n)&&!Qy(n)?r:n||Pse(e)||r}const Lse=async function(e){const t=this.getOffsetParent||WN,r=this.getDimensions,n=await r(e.floating);return{reference:Rse(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function $se(e){return Sr(e).direction==="rtl"}const Vse={convertOffsetParentRelativeRectToViewportRelativeRect:Ase,getDocumentElement:Yr,getClippingRect:jse,getOffsetParent:WN,getElementRects:Lse,getClientRects:Tse,getDimensions:Ise,getScale:Si,isElement:wr,isRTL:$se};function zN(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Fse(e,t){let r=null,n;const o=Yr(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:d,width:f,height:h}=c;if(s||t(),!f||!h)return;const v=Nl(d),m=Nl(o.clientWidth-(u+f)),g=Nl(o.clientHeight-(d+h)),y=Nl(u),w={rootMargin:-v+"px "+-m+"px "+-g+"px "+-y+"px",threshold:Ht(0,Wn(1,l))||1};let S=!0;function P(C){const E=C[0].intersectionRatio;if(E!==l){if(!S)return a();E?a(!1,E):n=setTimeout(()=>{a(!1,1e-7)},1e3)}E===1&&!zN(c,e.getBoundingClientRect())&&a(),S=!1}try{r=new IntersectionObserver(P,{...w,root:o.ownerDocument})}catch{r=new IntersectionObserver(P,w)}r.observe(e)}return a(!0),i}function Bse(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=eb(e),u=o||i?[...c?qa(c):[],...qa(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",r,{passive:!0}),i&&y.addEventListener("resize",r)});const d=c&&s?Fse(c,r):null;let f=-1,h=null;a&&(h=new ResizeObserver(y=>{let[x]=y;x&&x.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(t)})),r()}),c&&!l&&h.observe(c),h.observe(t));let v,m=l?Lo(e):null;l&&g();function g(){const y=Lo(e);m&&!zN(m,y)&&r(),m=y,v=requestAnimationFrame(g)}return r(),()=>{var y;u.forEach(x=>{o&&x.removeEventListener("scroll",r),i&&x.removeEventListener("resize",r)}),d?.(),(y=h)==null||y.disconnect(),h=null,l&&cancelAnimationFrame(v)}}const Wse=fse,zse=pse,Kse=cse,Use=mse,Hse=use,l1=lse,Gse=hse,Yse=(e,t,r)=>{const n=new Map,o={platform:Vse,...r},i={...o.platform,_c:n};return sse(e,t,{...o,platform:i})};var qse=typeof document<"u",Xse=function(){},ql=qse?O.useLayoutEffect:Xse;function au(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(!au(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)&&!au(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function KN(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function c1(e,t){const r=KN(e);return Math.round(t*r)/r}function eh(e){const t=p.useRef(e);return ql(()=>{t.current=e}),t}function Zse(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,d]=p.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=p.useState(n);au(f,n)||h(n);const[v,m]=p.useState(null),[g,y]=p.useState(null),x=p.useCallback(j=>{j!==C.current&&(C.current=j,m(j))},[]),w=p.useCallback(j=>{j!==E.current&&(E.current=j,y(j))},[]),S=i||v,P=a||g,C=p.useRef(null),E=p.useRef(null),A=p.useRef(u),T=l!=null,M=eh(l),_=eh(o),k=eh(c),N=p.useCallback(()=>{if(!C.current||!E.current)return;const j={placement:t,strategy:r,middleware:f};_.current&&(j.platform=_.current),Yse(C.current,E.current,j).then(L=>{const H={...L,isPositioned:k.current!==!1};R.current&&!au(A.current,H)&&(A.current=H,as.flushSync(()=>{d(H)}))})},[f,t,r,_,k]);ql(()=>{c===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,d(j=>({...j,isPositioned:!1})))},[c]);const R=p.useRef(!1);ql(()=>(R.current=!0,()=>{R.current=!1}),[]),ql(()=>{if(S&&(C.current=S),P&&(E.current=P),S&&P){if(M.current)return M.current(S,P,N);N()}},[S,P,N,M,T]);const z=p.useMemo(()=>({reference:C,floating:E,setReference:x,setFloating:w}),[x,w]),B=p.useMemo(()=>({reference:S,floating:P}),[S,P]),F=p.useMemo(()=>{const j={position:r,left:0,top:0};if(!B.floating)return j;const L=c1(B.floating,u.x),H=c1(B.floating,u.y);return s?{...j,transform:"translate("+L+"px, "+H+"px)",...KN(B.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:L,top:H}},[r,s,B.floating,u.x,u.y]);return p.useMemo(()=>({...u,update:N,refs:z,elements:B,floatingStyles:F}),[u,N,z,B,F])}const Qse=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?l1({element:n.current,padding:o}).fn(r):{}:n?l1({element:n,padding:o}).fn(r):{}}}},Jse=(e,t)=>({...Wse(e),options:[e,t]}),ele=(e,t)=>({...zse(e),options:[e,t]}),tle=(e,t)=>({...Gse(e),options:[e,t]}),rle=(e,t)=>({...Kse(e),options:[e,t]}),nle=(e,t)=>({...Use(e),options:[e,t]}),ole=(e,t)=>({...Hse(e),options:[e,t]}),ile=(e,t)=>({...Qse(e),options:[e,t]});var ale="Arrow",UN=p.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"})})});UN.displayName=ale;var sle=UN,tb="Popper",[HN,Zn]=it(tb),[lle,GN]=HN(tb),YN=e=>{const{__scopePopper:t,children:r}=e,[n,o]=p.useState(null);return b.jsx(lle,{scope:t,anchor:n,onAnchorChange:o,children:r})};YN.displayName=tb;var qN="PopperAnchor",XN=p.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,i=GN(qN,r),a=p.useRef(null),s=ie(t,a),l=p.useRef(null);return p.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})});XN.displayName=qN;var rb="PopperContent",[cle,ule]=HN(rb),ZN=p.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:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:h="optimized",onPlaced:v,...m}=e,g=GN(rb,r),[y,x]=p.useState(null),w=ie(t,K=>x(K)),[S,P]=p.useState(null),C=$s(S),E=C?.width??0,A=C?.height??0,T=n+(i!=="center"?"-"+i:""),M=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},_=Array.isArray(c)?c:[c],k=_.length>0,N={padding:M,boundary:_.filter(fle),altBoundary:k},{refs:R,floatingStyles:z,placement:B,isPositioned:F,middlewareData:j}=Zse({strategy:"fixed",placement:T,whileElementsMounted:(...K)=>Bse(...K,{animationFrame:h==="always"}),elements:{reference:g.anchor},middleware:[Jse({mainAxis:o+A,alignmentAxis:a}),l&&ele({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?tle():void 0,...N}),l&&rle({...N}),nle({...N,apply:({elements:K,rects:fe,availableWidth:$,availableHeight:G})=>{const{width:W,height:V}=fe.reference,he=K.floating.style;he.setProperty("--radix-popper-available-width",`${$}px`),he.setProperty("--radix-popper-available-height",`${G}px`),he.setProperty("--radix-popper-anchor-width",`${W}px`),he.setProperty("--radix-popper-anchor-height",`${V}px`)}}),S&&ile({element:S,padding:s}),ple({arrowWidth:E,arrowHeight:A}),f&&ole({strategy:"referenceHidden",...N})]}),[L,H]=ej(B),re=Et(v);pt(()=>{F&&re?.()},[F,re]);const le=j.arrow?.x,ae=j.arrow?.y,oe=j.arrow?.centerOffset!==0,[Se,Me]=p.useState();return pt(()=>{y&&Me(window.getComputedStyle(y).zIndex)},[y]),b.jsx("div",{ref:R.setFloating,"data-radix-popper-content-wrapper":"",style:{...z,transform:F?z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Se,"--radix-popper-transform-origin":[j.transformOrigin?.x,j.transformOrigin?.y].join(" "),...j.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:b.jsx(cle,{scope:r,placedSide:L,onArrowChange:P,arrowX:le,arrowY:ae,shouldHideArrow:oe,children:b.jsx(ee.div,{"data-side":L,"data-align":H,...m,ref:w,style:{...m.style,animation:F?void 0:"none"}})})})});ZN.displayName=rb;var QN="PopperArrow",dle={top:"bottom",right:"left",bottom:"top",left:"right"},JN=p.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,i=ule(QN,n),a=dle[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(sle,{...o,ref:r,style:{...o.style,display:"block"}})})});JN.displayName=QN;function fle(e){return e!==null}var ple=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]=ej(r),d={start:"0%",center:"50%",end:"100%"}[u],f=(o.arrow?.x??0)+s/2,h=(o.arrow?.y??0)+l/2;let v="",m="";return c==="bottom"?(v=a?d:`${f}px`,m=`${-l}px`):c==="top"?(v=a?d:`${f}px`,m=`${n.floating.height+l}px`):c==="right"?(v=`${-l}px`,m=a?d:`${h}px`):c==="left"&&(v=`${n.floating.width+l}px`,m=a?d:`${h}px`),{data:{x:v,y:m}}}});function ej(e){const[t,r="center"]=e.split("-");return[t,r]}var Fs=YN,Bs=XN,Td=ZN,Md=JN,th="rovingFocusGroup.onEntryFocus",hle={bubbles:!1,cancelable:!0},Ws="RovingFocusGroup",[Dm,tj,mle]=Ri(Ws),[vle,kd]=it(Ws,[mle]),[gle,yle]=vle(Ws),rj=p.forwardRef((e,t)=>b.jsx(Dm.Provider,{scope:e.__scopeRovingFocusGroup,children:b.jsx(Dm.Slot,{scope:e.__scopeRovingFocusGroup,children:b.jsx(ble,{...e,ref:t})})}));rj.displayName=Ws;var ble=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...d}=e,f=p.useRef(null),h=ie(t,f),v=Li(i),[m,g]=xt({prop:a,defaultProp:s??null,onChange:l,caller:Ws}),[y,x]=p.useState(!1),w=Et(c),S=tj(r),P=p.useRef(!1),[C,E]=p.useState(0);return p.useEffect(()=>{const A=f.current;if(A)return A.addEventListener(th,w),()=>A.removeEventListener(th,w)},[w]),b.jsx(gle,{scope:r,orientation:n,dir:v,loop:o,currentTabStopId:m,onItemFocus:p.useCallback(A=>g(A),[g]),onItemShiftTab:p.useCallback(()=>x(!0),[]),onFocusableItemAdd:p.useCallback(()=>E(A=>A+1),[]),onFocusableItemRemove:p.useCallback(()=>E(A=>A-1),[]),children:b.jsx(ee.div,{tabIndex:y||C===0?-1:0,"data-orientation":n,...d,ref:h,style:{outline:"none",...e.style},onMouseDown:U(e.onMouseDown,()=>{P.current=!0}),onFocus:U(e.onFocus,A=>{const T=!P.current;if(A.target===A.currentTarget&&T&&!y){const M=new CustomEvent(th,hle);if(A.currentTarget.dispatchEvent(M),!M.defaultPrevented){const _=S().filter(B=>B.focusable),k=_.find(B=>B.active),N=_.find(B=>B.id===m),z=[k,N,..._].filter(Boolean).map(B=>B.ref.current);ij(z,u)}}P.current=!1}),onBlur:U(e.onBlur,()=>x(!1))})})}),nj="RovingFocusGroupItem",oj=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:i,children:a,...s}=e,l=It(),c=i||l,u=yle(nj,r),d=u.currentTabStopId===c,f=tj(r),{onFocusableItemAdd:h,onFocusableItemRemove:v,currentTabStopId:m}=u;return p.useEffect(()=>{if(n)return h(),()=>v()},[n,h,v]),b.jsx(Dm.ItemSlot,{scope:r,id:c,focusable:n,active:o,children:b.jsx(ee.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:U(e.onMouseDown,g=>{n?u.onItemFocus(c):g.preventDefault()}),onFocus:U(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:U(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){u.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const y=Sle(g,u.orientation,u.dir);if(y!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let w=f().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(g.currentTarget);w=u.loop?Ple(w,S+1):w.slice(S+1)}setTimeout(()=>ij(w))}}),children:typeof a=="function"?a({isCurrentTabStop:d,hasTabStop:m!=null}):a})})});oj.displayName=nj;var xle={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function wle(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Sle(e,t,r){const n=wle(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return xle[n]}function ij(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function Ple(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var aj=rj,sj=oj;function Cle(e){const t=Ole(e),r=p.forwardRef((n,o)=>{const{children:i,...a}=n,s=p.Children.toArray(i),l=s.find(Ale);if(l){const c=l.props.children,u=s.map(d=>d===l?p.Children.count(c)>1?p.Children.only(null):p.isValidElement(c)?c.props.children:null:d);return b.jsx(t,{...a,ref:o,children:p.isValidElement(c)?p.cloneElement(c,void 0,u):null})}return b.jsx(t,{...a,ref:o,children:i})});return r.displayName=`${e}.Slot`,r}function Ole(e){const t=p.forwardRef((r,n)=>{const{children:o,...i}=r;if(p.isValidElement(o)){const a=Mle(o),s=Tle(i,o.props);return o.type!==p.Fragment&&(s.ref=n?Hr(n,a):a),p.cloneElement(o,s)}return p.Children.count(o)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ele=Symbol("radix.slottable");function Ale(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ele}function Tle(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 Mle(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 _m=["Enter"," "],kle=["ArrowDown","PageUp","Home"],lj=["ArrowUp","PageDown","End"],Dle=[...kle,...lj],_le={ltr:[..._m,"ArrowRight"],rtl:[..._m,"ArrowLeft"]},Nle={ltr:["ArrowLeft"],rtl:["ArrowRight"]},zs="Menu",[Xa,jle,Ile]=Ri(zs),[Yo,Dd]=it(zs,[Ile,Zn,kd]),Ks=Zn(),cj=kd(),[uj,Qn]=Yo(zs),[Rle,Us]=Yo(zs),dj=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:o,onOpenChange:i,modal:a=!0}=e,s=Ks(t),[l,c]=p.useState(null),u=p.useRef(!1),d=Et(i),f=Li(o);return p.useEffect(()=>{const h=()=>{u.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>u.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),b.jsx(Fs,{...s,children:b.jsx(uj,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:c,children:b.jsx(Rle,{scope:t,onClose:p.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:a,children:n})})})};dj.displayName=zs;var Lle="MenuAnchor",nb=p.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,o=Ks(r);return b.jsx(Bs,{...o,...n,ref:t})});nb.displayName=Lle;var ob="MenuPortal",[$le,fj]=Yo(ob,{forceMount:void 0}),pj=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:o}=e,i=Qn(ob,t);return b.jsx($le,{scope:t,forceMount:r,children:b.jsx(At,{present:r||i.open,children:b.jsx(Bo,{asChild:!0,container:o,children:n})})})};pj.displayName=ob;var sr="MenuContent",[Vle,ib]=Yo(sr),hj=p.forwardRef((e,t)=>{const r=fj(sr,e.__scopeMenu),{forceMount:n=r.forceMount,...o}=e,i=Qn(sr,e.__scopeMenu),a=Us(sr,e.__scopeMenu);return b.jsx(Xa.Provider,{scope:e.__scopeMenu,children:b.jsx(At,{present:n||i.open,children:b.jsx(Xa.Slot,{scope:e.__scopeMenu,children:a.modal?b.jsx(Fle,{...o,ref:t}):b.jsx(Ble,{...o,ref:t})})})})}),Fle=p.forwardRef((e,t)=>{const r=Qn(sr,e.__scopeMenu),n=p.useRef(null),o=ie(t,n);return p.useEffect(()=>{const i=n.current;if(i)return Ou(i)},[]),b.jsx(ab,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:U(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),Ble=p.forwardRef((e,t)=>{const r=Qn(sr,e.__scopeMenu);return b.jsx(ab,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),Wle=Cle("MenuContent.ScrollLock"),ab=p.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEntryFocus:l,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:h,disableOutsideScroll:v,...m}=e,g=Qn(sr,r),y=Us(sr,r),x=Ks(r),w=cj(r),S=jle(r),[P,C]=p.useState(null),E=p.useRef(null),A=ie(t,E,g.onContentChange),T=p.useRef(0),M=p.useRef(""),_=p.useRef(0),k=p.useRef(null),N=p.useRef("right"),R=p.useRef(0),z=v?ls:p.Fragment,B=v?{as:Wle,allowPinchZoom:!0}:void 0,F=L=>{const H=M.current+L,re=S().filter(K=>!K.disabled),le=document.activeElement,ae=re.find(K=>K.ref.current===le)?.textValue,oe=re.map(K=>K.textValue),Se=ece(oe,H,ae),Me=re.find(K=>K.textValue===Se)?.ref.current;(function K(fe){M.current=fe,window.clearTimeout(T.current),fe!==""&&(T.current=window.setTimeout(()=>K(""),1e3))})(H),Me&&setTimeout(()=>Me.focus())};p.useEffect(()=>()=>window.clearTimeout(T.current),[]),Pu();const j=p.useCallback(L=>N.current===k.current?.side&&rce(L,k.current?.area),[]);return b.jsx(Vle,{scope:r,searchRef:M,onItemEnter:p.useCallback(L=>{j(L)&&L.preventDefault()},[j]),onItemLeave:p.useCallback(L=>{j(L)||(E.current?.focus(),C(null))},[j]),onTriggerLeave:p.useCallback(L=>{j(L)&&L.preventDefault()},[j]),pointerGraceTimerRef:_,onPointerGraceIntentChange:p.useCallback(L=>{k.current=L},[]),children:b.jsx(z,{...B,children:b.jsx(ss,{asChild:!0,trapped:o,onMountAutoFocus:U(i,L=>{L.preventDefault(),E.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:b.jsx(Fo,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:h,children:b.jsx(aj,{asChild:!0,...w,dir:y.dir,orientation:"vertical",loop:n,currentTabStopId:P,onCurrentTabStopIdChange:C,onEntryFocus:U(l,L=>{y.isUsingKeyboardRef.current||L.preventDefault()}),preventScrollOnEntryFocus:!0,children:b.jsx(Td,{role:"menu","aria-orientation":"vertical","data-state":Dj(g.open),"data-radix-menu-content":"",dir:y.dir,...x,...m,ref:A,style:{outline:"none",...m.style},onKeyDown:U(m.onKeyDown,L=>{const re=L.target.closest("[data-radix-menu-content]")===L.currentTarget,le=L.ctrlKey||L.altKey||L.metaKey,ae=L.key.length===1;re&&(L.key==="Tab"&&L.preventDefault(),!le&&ae&&F(L.key));const oe=E.current;if(L.target!==oe||!Dle.includes(L.key))return;L.preventDefault();const Me=S().filter(K=>!K.disabled).map(K=>K.ref.current);lj.includes(L.key)&&Me.reverse(),Qle(Me)}),onBlur:U(e.onBlur,L=>{L.currentTarget.contains(L.target)||(window.clearTimeout(T.current),M.current="")}),onPointerMove:U(e.onPointerMove,Za(L=>{const H=L.target,re=R.current!==L.clientX;if(L.currentTarget.contains(H)&&re){const le=L.clientX>R.current?"right":"left";N.current=le,R.current=L.clientX}}))})})})})})})});hj.displayName=sr;var zle="MenuGroup",sb=p.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return b.jsx(ee.div,{role:"group",...n,ref:t})});sb.displayName=zle;var Kle="MenuLabel",mj=p.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return b.jsx(ee.div,{...n,ref:t})});mj.displayName=Kle;var su="MenuItem",u1="menu.itemSelect",_d=p.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...o}=e,i=p.useRef(null),a=Us(su,e.__scopeMenu),s=ib(su,e.__scopeMenu),l=ie(t,i),c=p.useRef(!1),u=()=>{const d=i.current;if(!r&&d){const f=new CustomEvent(u1,{bubbles:!0,cancelable:!0});d.addEventListener(u1,h=>n?.(h),{once:!0}),gv(d,f),f.defaultPrevented?c.current=!1:a.onClose()}};return b.jsx(vj,{...o,ref:l,disabled:r,onClick:U(e.onClick,u),onPointerDown:d=>{e.onPointerDown?.(d),c.current=!0},onPointerUp:U(e.onPointerUp,d=>{c.current||d.currentTarget?.click()}),onKeyDown:U(e.onKeyDown,d=>{const f=s.searchRef.current!=="";r||f&&d.key===" "||_m.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});_d.displayName=su;var vj=p.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:o,...i}=e,a=ib(su,r),s=cj(r),l=p.useRef(null),c=ie(t,l),[u,d]=p.useState(!1),[f,h]=p.useState("");return p.useEffect(()=>{const v=l.current;v&&h((v.textContent??"").trim())},[i.children]),b.jsx(Xa.ItemSlot,{scope:r,disabled:n,textValue:o??f,children:b.jsx(sj,{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,Za(v=>{n?a.onItemLeave(v):(a.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:U(e.onPointerLeave,Za(v=>a.onItemLeave(v))),onFocus:U(e.onFocus,()=>d(!0)),onBlur:U(e.onBlur,()=>d(!1))})})})}),Ule="MenuCheckboxItem",gj=p.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...o}=e;return b.jsx(Sj,{scope:e.__scopeMenu,checked:r,children:b.jsx(_d,{role:"menuitemcheckbox","aria-checked":lu(r)?"mixed":r,...o,ref:t,"data-state":ub(r),onSelect:U(o.onSelect,()=>n?.(lu(r)?!0:!r),{checkForDefaultPrevented:!1})})})});gj.displayName=Ule;var yj="MenuRadioGroup",[Hle,Gle]=Yo(yj,{value:void 0,onValueChange:()=>{}}),bj=p.forwardRef((e,t)=>{const{value:r,onValueChange:n,...o}=e,i=Et(n);return b.jsx(Hle,{scope:e.__scopeMenu,value:r,onValueChange:i,children:b.jsx(sb,{...o,ref:t})})});bj.displayName=yj;var xj="MenuRadioItem",wj=p.forwardRef((e,t)=>{const{value:r,...n}=e,o=Gle(xj,e.__scopeMenu),i=r===o.value;return b.jsx(Sj,{scope:e.__scopeMenu,checked:i,children:b.jsx(_d,{role:"menuitemradio","aria-checked":i,...n,ref:t,"data-state":ub(i),onSelect:U(n.onSelect,()=>o.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});wj.displayName=xj;var lb="MenuItemIndicator",[Sj,Yle]=Yo(lb,{checked:!1}),Pj=p.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...o}=e,i=Yle(lb,r);return b.jsx(At,{present:n||lu(i.checked)||i.checked===!0,children:b.jsx(ee.span,{...o,ref:t,"data-state":ub(i.checked)})})});Pj.displayName=lb;var qle="MenuSeparator",Cj=p.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return b.jsx(ee.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});Cj.displayName=qle;var Xle="MenuArrow",Oj=p.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,o=Ks(r);return b.jsx(Md,{...o,...n,ref:t})});Oj.displayName=Xle;var cb="MenuSub",[Zle,Ej]=Yo(cb),Aj=e=>{const{__scopeMenu:t,children:r,open:n=!1,onOpenChange:o}=e,i=Qn(cb,t),a=Ks(t),[s,l]=p.useState(null),[c,u]=p.useState(null),d=Et(o);return p.useEffect(()=>(i.open===!1&&d(!1),()=>d(!1)),[i.open,d]),b.jsx(Fs,{...a,children:b.jsx(uj,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:u,children:b.jsx(Zle,{scope:t,contentId:It(),triggerId:It(),trigger:s,onTriggerChange:l,children:r})})})};Aj.displayName=cb;var Ca="MenuSubTrigger",Tj=p.forwardRef((e,t)=>{const r=Qn(Ca,e.__scopeMenu),n=Us(Ca,e.__scopeMenu),o=Ej(Ca,e.__scopeMenu),i=ib(Ca,e.__scopeMenu),a=p.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:l}=i,c={__scopeMenu:e.__scopeMenu},u=p.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return p.useEffect(()=>u,[u]),p.useEffect(()=>{const d=s.current;return()=>{window.clearTimeout(d),l(null)}},[s,l]),b.jsx(nb,{asChild:!0,...c,children:b.jsx(vj,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":o.contentId,"data-state":Dj(r.open),...e,ref:Hr(t,o.onTriggerChange),onClick:d=>{e.onClick?.(d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:U(e.onPointerMove,Za(d=>{i.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!r.open&&!a.current&&(i.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{r.onOpenChange(!0),u()},100))})),onPointerLeave:U(e.onPointerLeave,Za(d=>{u();const f=r.content?.getBoundingClientRect();if(f){const h=r.content?.dataset.side,v=h==="right",m=v?-5:5,g=f[v?"left":"right"],y=f[v?"right":"left"];i.onPointerGraceIntentChange({area:[{x:d.clientX+m,y:d.clientY},{x:g,y:f.top},{x:y,y:f.top},{x:y,y:f.bottom},{x:g,y:f.bottom}],side:h}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(d),d.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:U(e.onKeyDown,d=>{const f=i.searchRef.current!=="";e.disabled||f&&d.key===" "||_le[n.dir].includes(d.key)&&(r.onOpenChange(!0),r.content?.focus(),d.preventDefault())})})})});Tj.displayName=Ca;var Mj="MenuSubContent",kj=p.forwardRef((e,t)=>{const r=fj(sr,e.__scopeMenu),{forceMount:n=r.forceMount,...o}=e,i=Qn(sr,e.__scopeMenu),a=Us(sr,e.__scopeMenu),s=Ej(Mj,e.__scopeMenu),l=p.useRef(null),c=ie(t,l);return b.jsx(Xa.Provider,{scope:e.__scopeMenu,children:b.jsx(At,{present:n||i.open,children:b.jsx(Xa.Slot,{scope:e.__scopeMenu,children:b.jsx(ab,{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 d=u.currentTarget.contains(u.target),f=Nle[a.dir].includes(u.key);d&&f&&(i.onOpenChange(!1),s.trigger?.focus(),u.preventDefault())})})})})})});kj.displayName=Mj;function Dj(e){return e?"open":"closed"}function lu(e){return e==="indeterminate"}function ub(e){return lu(e)?"indeterminate":e?"checked":"unchecked"}function Qle(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function Jle(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function ece(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=Jle(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 tce(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,d=l.x,f=l.y;u>n!=f>n&&r<(d-c)*(n-u)/(f-u)+c&&(o=!o)}return o}function rce(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return tce(r,t)}function Za(e){return t=>t.pointerType==="mouse"?e(t):void 0}var _j=dj,Nj=nb,jj=pj,Ij=hj,Rj=sb,Lj=mj,$j=_d,Vj=gj,Fj=bj,Bj=wj,Wj=Pj,zj=Cj,Kj=Oj,Uj=Aj,Hj=Tj,Gj=kj,db="ContextMenu",[nce]=it(db,[Dd]),Mt=Dd(),[oce,Yj]=nce(db),qj=e=>{const{__scopeContextMenu:t,children:r,onOpenChange:n,dir:o,modal:i=!0}=e,[a,s]=p.useState(!1),l=Mt(t),c=Et(n),u=p.useCallback(d=>{s(d),c(d)},[c]);return b.jsx(oce,{scope:t,open:a,onOpenChange:u,modal:i,children:b.jsx(_j,{...l,dir:o,open:a,onOpenChange:u,modal:i,children:r})})};qj.displayName=db;var Xj="ContextMenuTrigger",Zj=p.forwardRef((e,t)=>{const{__scopeContextMenu:r,disabled:n=!1,...o}=e,i=Yj(Xj,r),a=Mt(r),s=p.useRef({x:0,y:0}),l=p.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...s.current})}),c=p.useRef(0),u=p.useCallback(()=>window.clearTimeout(c.current),[]),d=f=>{s.current={x:f.clientX,y:f.clientY},i.onOpenChange(!0)};return p.useEffect(()=>u,[u]),p.useEffect(()=>{n&&u()},[n,u]),b.jsxs(b.Fragment,{children:[b.jsx(Nj,{...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,f=>{u(),d(f),f.preventDefault()}),onPointerDown:n?e.onPointerDown:U(e.onPointerDown,jl(f=>{u(),c.current=window.setTimeout(()=>d(f),700)})),onPointerMove:n?e.onPointerMove:U(e.onPointerMove,jl(u)),onPointerCancel:n?e.onPointerCancel:U(e.onPointerCancel,jl(u)),onPointerUp:n?e.onPointerUp:U(e.onPointerUp,jl(u))})]})});Zj.displayName=Xj;var ice="ContextMenuPortal",Qj=e=>{const{__scopeContextMenu:t,...r}=e,n=Mt(t);return b.jsx(jj,{...n,...r})};Qj.displayName=ice;var Jj="ContextMenuContent",eI=p.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,o=Yj(Jj,r),i=Mt(r),a=p.useRef(!1);return b.jsx(Ij,{...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)"}})});eI.displayName=Jj;var ace="ContextMenuGroup",tI=p.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,o=Mt(r);return b.jsx(Rj,{...o,...n,ref:t})});tI.displayName=ace;var sce="ContextMenuLabel",rI=p.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,o=Mt(r);return b.jsx(Lj,{...o,...n,ref:t})});rI.displayName=sce;var lce="ContextMenuItem",nI=p.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,o=Mt(r);return b.jsx($j,{...o,...n,ref:t})});nI.displayName=lce;var cce="ContextMenuCheckboxItem",oI=p.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,o=Mt(r);return b.jsx(Vj,{...o,...n,ref:t})});oI.displayName=cce;var uce="ContextMenuRadioGroup",iI=p.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,o=Mt(r);return b.jsx(Fj,{...o,...n,ref:t})});iI.displayName=uce;var dce="ContextMenuRadioItem",aI=p.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,o=Mt(r);return b.jsx(Bj,{...o,...n,ref:t})});aI.displayName=dce;var fce="ContextMenuItemIndicator",sI=p.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,o=Mt(r);return b.jsx(Wj,{...o,...n,ref:t})});sI.displayName=fce;var pce="ContextMenuSeparator",lI=p.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,o=Mt(r);return b.jsx(zj,{...o,...n,ref:t})});lI.displayName=pce;var hce="ContextMenuArrow",mce=p.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,o=Mt(r);return b.jsx(Kj,{...o,...n,ref:t})});mce.displayName=hce;var cI="ContextMenuSub",uI=e=>{const{__scopeContextMenu:t,children:r,onOpenChange:n,open:o,defaultOpen:i}=e,a=Mt(t),[s,l]=xt({prop:o,defaultProp:i??!1,onChange:n,caller:cI});return b.jsx(Uj,{...a,open:s,onOpenChange:l,children:r})};uI.displayName=cI;var vce="ContextMenuSubTrigger",dI=p.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,o=Mt(r);return b.jsx(Hj,{...o,...n,ref:t})});dI.displayName=vce;var gce="ContextMenuSubContent",fI=p.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,o=Mt(r);return b.jsx(Gj,{...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)"}})});fI.displayName=gce;function jl(e){return t=>t.pointerType!=="mouse"?e(t):void 0}var yce=qj,bce=Zj,xce=Qj,wce=eI,Sce=tI,Pce=rI,Cce=nI,Oce=oI,Ece=iI,Ace=aI,pI=sI,Tce=lI,Mce=uI,kce=dI,Dce=fI;const _ce=yce,Nce=bce,jce=Sce,hI=xce,Ice=Mce,Rce=Ece,mI=p.forwardRef(({className:e,inset:t,children:r,...n},o)=>b.jsxs(kce,{ref:o,className:D("text-body-sm 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"})})]}));mI.displayName="ContextMenuSubTrigger";const vI=p.forwardRef(({className:e,...t},r)=>b.jsx(Dce,{ref:r,className:D("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}));vI.displayName="ContextMenuSubContent";const gI=p.forwardRef(({className:e,...t},r)=>b.jsx(hI,{children:b.jsx(wce,{ref:r,className:D("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})}));gI.displayName="ContextMenuContent";const yI=p.forwardRef(({className:e,inset:t,...r},n)=>b.jsx(Cce,{ref:n,className:D("text-body-sm 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}));yI.displayName="ContextMenuItem";const bI=p.forwardRef(({className:e,children:t,checked:r,...n},o)=>b.jsxs(Oce,{ref:o,className:D("text-body-sm 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(pI,{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]}));bI.displayName="ContextMenuCheckboxItem";const xI=p.forwardRef(({className:e,children:t,...r},n)=>b.jsxs(Ace,{ref:n,className:D("text-body-sm 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(pI,{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]}));xI.displayName="ContextMenuRadioItem";const wI=p.forwardRef(({className:e,inset:t,...r},n)=>b.jsx(Pce,{ref:n,className:D("text-small text-primary px-2 py-1.5",t&&"pl-8",e),...r}));wI.displayName="ContextMenuLabel";const SI=p.forwardRef(({className:e,...t},r)=>b.jsx(Tce,{ref:r,className:D("bg-border -mx-1 my-1 h-px",e),...t}));SI.displayName="ContextMenuSeparator";const PI=p.forwardRef(({className:e,...t},r)=>b.jsx("span",{ref:r,className:D("text-small text-tertiary ml-auto tracking-widest",e),...t}));PI.displayName="ContextMenuShortcut";function Lce(e){const t=$ce(e),r=p.forwardRef((n,o)=>{const{children:i,...a}=n,s=p.Children.toArray(i),l=s.find(Fce);if(l){const c=l.props.children,u=s.map(d=>d===l?p.Children.count(c)>1?p.Children.only(null):p.isValidElement(c)?c.props.children:null:d);return b.jsx(t,{...a,ref:o,children:p.isValidElement(c)?p.cloneElement(c,void 0,u):null})}return b.jsx(t,{...a,ref:o,children:i})});return r.displayName=`${e}.Slot`,r}function $ce(e){const t=p.forwardRef((r,n)=>{const{children:o,...i}=r;if(p.isValidElement(o)){const a=Wce(o),s=Bce(i,o.props);return o.type!==p.Fragment&&(s.ref=n?Hr(n,a):a),p.cloneElement(o,s)}return p.Children.count(o)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Vce=Symbol("radix.slottable");function Fce(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Vce}function Bce(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 Wce(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 Nd="Popover",[CI]=it(Nd,[Zn]),Hs=Zn(),[zce,Jn]=CI(Nd),OI=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:i,modal:a=!1}=e,s=Hs(t),l=p.useRef(null),[c,u]=p.useState(!1),[d,f]=xt({prop:n,defaultProp:o??!1,onChange:i,caller:Nd});return b.jsx(Fs,{...s,children:b.jsx(zce,{scope:t,contentId:It(),triggerRef:l,open:d,onOpenChange:f,onOpenToggle:p.useCallback(()=>f(h=>!h),[f]),hasCustomAnchor:c,onCustomAnchorAdd:p.useCallback(()=>u(!0),[]),onCustomAnchorRemove:p.useCallback(()=>u(!1),[]),modal:a,children:r})})};OI.displayName=Nd;var EI="PopoverAnchor",Kce=p.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=Jn(EI,r),i=Hs(r),{onCustomAnchorAdd:a,onCustomAnchorRemove:s}=o;return p.useEffect(()=>(a(),()=>s()),[a,s]),b.jsx(Bs,{...i,...n,ref:t})});Kce.displayName=EI;var AI="PopoverTrigger",TI=p.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=Jn(AI,r),i=Hs(r),a=ie(t,o.triggerRef),s=b.jsx(ee.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":NI(o.open),...n,ref:a,onClick:U(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?s:b.jsx(Bs,{asChild:!0,...i,children:s})});TI.displayName=AI;var fb="PopoverPortal",[Uce,Hce]=CI(fb,{forceMount:void 0}),MI=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,i=Jn(fb,t);return b.jsx(Uce,{scope:t,forceMount:r,children:b.jsx(At,{present:r||i.open,children:b.jsx(Bo,{asChild:!0,container:o,children:n})})})};MI.displayName=fb;var Ni="PopoverContent",kI=p.forwardRef((e,t)=>{const r=Hce(Ni,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,i=Jn(Ni,e.__scopePopover);return b.jsx(At,{present:n||i.open,children:i.modal?b.jsx(Yce,{...o,ref:t}):b.jsx(qce,{...o,ref:t})})});kI.displayName=Ni;var Gce=Lce("PopoverContent.RemoveScroll"),Yce=p.forwardRef((e,t)=>{const r=Jn(Ni,e.__scopePopover),n=p.useRef(null),o=ie(t,n),i=p.useRef(!1);return p.useEffect(()=>{const a=n.current;if(a)return Ou(a)},[]),b.jsx(ls,{as:Gce,allowPinchZoom:!0,children:b.jsx(DI,{...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})})})}),qce=p.forwardRef((e,t)=>{const r=Jn(Ni,e.__scopePopover),n=p.useRef(!1),o=p.useRef(!1);return b.jsx(DI,{...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()}})}),DI=p.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,...d}=e,f=Jn(Ni,r),h=Hs(r);return Pu(),b.jsx(ss,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i,children:b.jsx(Fo,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>f.onOpenChange(!1),children:b.jsx(Td,{"data-state":NI(f.open),role:"dialog",id:f.contentId,...h,...d,ref:t,style:{...d.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)"}})})})}),_I="PopoverClose",Xce=p.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=Jn(_I,r);return b.jsx(ee.button,{type:"button",...n,ref:t,onClick:U(e.onClick,()=>o.onOpenChange(!1))})});Xce.displayName=_I;var Zce="PopoverArrow",Qce=p.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=Hs(r);return b.jsx(Md,{...o,...n,ref:t})});Qce.displayName=Zce;function NI(e){return e?"open":"closed"}var jd=OI,Id=TI,Rd=MI,Ld=kI;function d1(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 jI=te(["bg-card text-body-sm text-primary placeholder:text-tertiary","flex h-8 w-full items-center justify-between rounded-md border px-3 py-1","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"}}),II=p.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":d,"aria-describedby":f},h)=>{const[v,m]=p.useState(!1),[g,y]=p.useState(e||new Date),x=p.useMemo(()=>{const P=[];return o&&P.push({before:o}),i&&P.push({after:i}),P.length>0?P:void 0},[o,i]),w=P=>{t?.(P??null),P&&m(!1)},S=()=>{t?.(new Date),m(!1)};return p.useEffect(()=>{e&&y(e)},[e]),b.jsxs(jd,{open:v,onOpenChange:m,children:[b.jsx(Id,{asChild:!0,children:b.jsxs("button",{ref:h,id:c,type:"button",disabled:a,className:D(jI({variant:s}),l),"aria-label":d||"Choose date","aria-describedby":f,"aria-haspopup":"dialog","aria-expanded":v,children:[b.jsx("span",{className:D("truncate",!e&&"text-tertiary"),children:e?d1(e,n):r}),b.jsx(Cv,{className:"text-tertiary h-4 w-4 shrink-0"}),u&&b.jsx("input",{type:"hidden",name:u,value:e?d1(e,"yyyy-MM-dd"):""})]})}),b.jsx(Rd,{children:b.jsxs(Ld,{className:D("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.jsx(Rs,{mode:"single",selected:e??void 0,onSelect:w,month:g,onMonthChange:y,disabled:x}),b.jsx("div",{className:"border-border mt-4 border-t pt-4",children:b.jsx("button",{type:"button",onClick:S,className:D("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"})})]})})]})});II.displayName="DatePicker";function cu(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)}function Jce(e,t){if(!e?.from)return"";const r=cu(e.from,t);if(!e.to)return`${r} – ...`;const n=cu(e.to,t);return`${r} – ${n}`}const RI=te(["bg-card text-body-sm text-primary placeholder:text-tertiary","flex h-8 w-full items-center justify-between rounded-md border px-3 py-1","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"}}),LI=p.forwardRef(({value:e,onChange:t,placeholder:r="Select date range",format:n="MM/dd/yyyy",minDate:o,maxDate:i,disabled:a=!1,numberOfMonths:s=2,variant:l,className:c,id:u,name:d,"aria-label":f,"aria-describedby":h},v)=>{const[m,g]=p.useState(!1),[y,x]=p.useState(e?.from||new Date),w=p.useMemo(()=>{const E=[];return o&&E.push({before:o}),i&&E.push({after:i}),E.length>0?E:void 0},[o,i]),S=E=>{t?.(E)},P=()=>{const E=new Date;t?.({from:E,to:E})},C=()=>{t?.(void 0)};return p.useEffect(()=>{e?.from&&x(e.from)},[e?.from]),b.jsxs(jd,{open:m,onOpenChange:g,children:[b.jsx(Id,{asChild:!0,children:b.jsxs("button",{ref:v,id:u,type:"button",disabled:a,className:D(RI({variant:l}),c),"aria-label":f||"Choose date range","aria-describedby":h,"aria-haspopup":"dialog","aria-expanded":m,children:[b.jsx("span",{className:D("truncate",!e?.from&&"text-tertiary"),children:e?.from?Jce(e,n):r}),b.jsx(Cv,{className:"text-tertiary h-4 w-4 shrink-0"}),d&&b.jsx("input",{type:"hidden",name:d,value:e?.from?`${cu(e.from,"yyyy-MM-dd")}/${cu(e.to,"yyyy-MM-dd")}`:""})]})}),b.jsx(Rd,{children:b.jsxs(Ld,{className:D("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.jsx(Rs,{mode:"range",selected:e,onSelect:S,month:y,onMonthChange:x,numberOfMonths:s,disabled:w}),b.jsxs("div",{className:"border-border mt-4 flex items-center justify-between border-t pt-4",children:[b.jsx("button",{type:"button",onClick:C,className:D("text-tertiary hover:text-secondary text-sm","transition-colors focus-visible:underline focus-visible:outline-none"),children:"Clear"}),b.jsx("button",{type:"button",onClick:P,className:D("text-sunflower hover:text-sunflower-hover text-sm font-medium","transition-colors focus-visible:underline focus-visible:outline-none"),children:"Today"})]})]})})]})});LI.displayName="DateRangePicker";function eue(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 f1(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 $I=te(["bg-card text-body-sm text-primary placeholder:text-tertiary","flex h-8 w-full items-center justify-between rounded-md border px-3 py-1","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"}}),VI=p.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:d=!0,minuteStep:f=1,"aria-label":h,"aria-describedby":v},m)=>{const[g,y]=p.useState(!1),[x,w]=p.useState(e||new Date),[S,P]=p.useState(()=>e?`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`:"12:00"),C=p.useMemo(()=>{const M=[];return o&&M.push({before:o}),i&&M.push({after:i}),M.length>0?M:void 0},[o,i]),E=M=>{if(!M)return;const{hours:_,minutes:k}=f1(S),N=new Date(M.getFullYear(),M.getMonth(),M.getDate(),_,k);t?.(N)},A=M=>{const _=M.target.value;if(P(_),e){const{hours:k,minutes:N}=f1(_),R=new Date(e);R.setHours(k,N),t?.(R)}},T=()=>{const M=new Date;P(`${String(M.getHours()).padStart(2,"0")}:${String(M.getMinutes()).padStart(2,"0")}`),t?.(M),y(!1)};return p.useEffect(()=>{e&&(w(e),P(`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`))},[e]),b.jsxs(jd,{open:g,onOpenChange:y,children:[b.jsx(Id,{asChild:!0,children:b.jsxs("button",{ref:m,id:c,type:"button",disabled:a,className:D($I({variant:s}),l),"aria-label":h||"Choose date and time","aria-describedby":v,"aria-haspopup":"dialog","aria-expanded":g,children:[b.jsx("span",{className:D("truncate",!e&&"text-tertiary"),children:e?eue(e,n,d):r}),b.jsxs("div",{className:"flex items-center gap-1",children:[b.jsx(gW,{className:"text-tertiary h-4 w-4 shrink-0"}),b.jsx(Cv,{className:"text-tertiary h-4 w-4 shrink-0"})]}),u&&b.jsx("input",{type:"hidden",name:u,value:e?e.toISOString():""})]})}),b.jsx(Rd,{children:b.jsxs(Ld,{className:D("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.jsx(Rs,{mode:"single",selected:e??void 0,onSelect:E,month:x,onMonthChange:w,disabled:C}),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:S,onChange:A,step:f*60,className:D("bg-card text-body-sm text-primary placeholder:text-body-sm 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:T,className:D("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"})})]})})]})});VI.displayName="DateTimePicker";const FI=te("bg-border shrink-0",{variants:{orientation:{horizontal:"h-px w-full",vertical:"h-full w-px"}},defaultVariants:{orientation:"horizontal"}}),BI=p.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:D(FI({orientation:i,className:e})),...n})});BI.displayName="Divider";var $d="DropdownMenu",[tue]=it($d,[Dd]),kt=Dd(),[rue,WI]=tue($d),zI=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:o,defaultOpen:i,onOpenChange:a,modal:s=!0}=e,l=kt(t),c=p.useRef(null),[u,d]=xt({prop:o,defaultProp:i??!1,onChange:a,caller:$d});return b.jsx(rue,{scope:t,triggerId:It(),triggerRef:c,contentId:It(),open:u,onOpenChange:d,onOpenToggle:p.useCallback(()=>d(f=>!f),[d]),modal:s,children:b.jsx(_j,{...l,open:u,onOpenChange:d,dir:n,modal:s,children:r})})};zI.displayName=$d;var KI="DropdownMenuTrigger",UI=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...o}=e,i=WI(KI,r),a=kt(r);return b.jsx(Nj,{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:Hr(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())})})})});UI.displayName=KI;var nue="DropdownMenuPortal",HI=e=>{const{__scopeDropdownMenu:t,...r}=e,n=kt(t);return b.jsx(jj,{...n,...r})};HI.displayName=nue;var GI="DropdownMenuContent",YI=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=WI(GI,r),i=kt(r),a=p.useRef(!1);return b.jsx(Ij,{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)"}})});YI.displayName=GI;var oue="DropdownMenuGroup",qI=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=kt(r);return b.jsx(Rj,{...o,...n,ref:t})});qI.displayName=oue;var iue="DropdownMenuLabel",XI=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=kt(r);return b.jsx(Lj,{...o,...n,ref:t})});XI.displayName=iue;var aue="DropdownMenuItem",ZI=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=kt(r);return b.jsx($j,{...o,...n,ref:t})});ZI.displayName=aue;var sue="DropdownMenuCheckboxItem",QI=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=kt(r);return b.jsx(Vj,{...o,...n,ref:t})});QI.displayName=sue;var lue="DropdownMenuRadioGroup",JI=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=kt(r);return b.jsx(Fj,{...o,...n,ref:t})});JI.displayName=lue;var cue="DropdownMenuRadioItem",eR=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=kt(r);return b.jsx(Bj,{...o,...n,ref:t})});eR.displayName=cue;var uue="DropdownMenuItemIndicator",tR=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=kt(r);return b.jsx(Wj,{...o,...n,ref:t})});tR.displayName=uue;var due="DropdownMenuSeparator",rR=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=kt(r);return b.jsx(zj,{...o,...n,ref:t})});rR.displayName=due;var fue="DropdownMenuArrow",pue=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=kt(r);return b.jsx(Kj,{...o,...n,ref:t})});pue.displayName=fue;var hue=e=>{const{__scopeDropdownMenu:t,children:r,open:n,onOpenChange:o,defaultOpen:i}=e,a=kt(t),[s,l]=xt({prop:n,defaultProp:i??!1,onChange:o,caller:"DropdownMenuSub"});return b.jsx(Uj,{...a,open:s,onOpenChange:l,children:r})},mue="DropdownMenuSubTrigger",nR=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=kt(r);return b.jsx(Hj,{...o,...n,ref:t})});nR.displayName=mue;var vue="DropdownMenuSubContent",oR=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=kt(r);return b.jsx(Gj,{...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)"}})});oR.displayName=vue;var gue=zI,iR=UI,yue=HI,bue=YI,xue=qI,wue=XI,Sue=ZI,Pue=QI,Cue=JI,Oue=eR,aR=tR,Eue=rR,Aue=hue,Tue=nR,Mue=oR;const kue=gue,Due=iR,_ue=xue,sR=yue,Nue=Aue,jue=Cue,lR=p.forwardRef(({className:e,inset:t,children:r,...n},o)=>b.jsxs(Tue,{ref:o,className:D("text-body-sm 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"})})]}));lR.displayName="DropdownMenuSubTrigger";const cR=p.forwardRef(({className:e,...t},r)=>b.jsx(Mue,{ref:r,className:D("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}));cR.displayName="DropdownMenuSubContent";const uR=p.forwardRef(({className:e,sideOffset:t=4,...r},n)=>b.jsx(sR,{children:b.jsx(bue,{ref:n,sideOffset:t,className:D("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})}));uR.displayName="DropdownMenuContent";const dR=p.forwardRef(({className:e,inset:t,...r},n)=>b.jsx(Sue,{ref:n,className:D("text-body-sm 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}));dR.displayName="DropdownMenuItem";const fR=p.forwardRef(({className:e,children:t,checked:r,...n},o)=>b.jsxs(Pue,{ref:o,className:D("text-body-sm 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(aR,{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]}));fR.displayName="DropdownMenuCheckboxItem";const pR=p.forwardRef(({className:e,children:t,...r},n)=>b.jsxs(Oue,{ref:n,className:D("text-body-sm 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(aR,{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]}));pR.displayName="DropdownMenuRadioItem";const hR=p.forwardRef(({className:e,inset:t,...r},n)=>b.jsx(wue,{ref:n,className:D("text-small text-primary px-2 py-1.5",t&&"pl-8",e),...r}));hR.displayName="DropdownMenuLabel";const mR=p.forwardRef(({className:e,...t},r)=>b.jsx(Eue,{ref:r,className:D("bg-border -mx-1 my-1 h-px",e),...t}));mR.displayName="DropdownMenuSeparator";const vR=p.forwardRef(({className:e,...t},r)=>b.jsx("span",{ref:r,className:D("text-small text-tertiary ml-auto tracking-widest",e),...t}));vR.displayName="DropdownMenuShortcut";const gR=p.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(iR,{ref:n,className:D("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(nE,{className:o[t]}),b.jsx("span",{className:"sr-only",children:"Open menu"})]})});gR.displayName="ActionsMenuButton";const yR=te("inline-block",{variants:{size:{xs:"h-3",sm:"h-4",md:"h-5",lg:"h-6",xl:"h-8"}},defaultVariants:{size:"md"}});function Iue(e){if(!e)return"";if(e===!0)return"hidden";const t=[];return e.base===!0&&t.push("hidden"),e.sm===!1&&t.push("sm:block"),e.sm===!0&&t.push("sm:hidden"),e.md===!1&&t.push("md:block"),e.md===!0&&t.push("md:hidden"),e.lg===!1&&t.push("lg:block"),e.lg===!0&&t.push("lg:hidden"),e.xl===!1&&t.push("xl:block"),e.xl===!0&&t.push("xl:hidden"),e["2xl"]===!1&&t.push("2xl:block"),e["2xl"]===!0&&t.push("2xl:hidden"),t.join(" ")}const bR=p.forwardRef(({className:e,size:t,compact:r,...n},o)=>{const i=Iue(r),a=r!==!0;return b.jsx("svg",{ref:o,viewBox:"0 0 179.96 38.58",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:D(yR({size:t,className:e})),"aria-label":"Engrate",role:"img",...n,children:b.jsx("g",{id:"engrate-logo",children:b.jsxs("g",{children:[a&&b.jsxs("g",{className:i,children:[b.jsx("path",{fill:"var(--color-primary)",d:"M57.65,27.3c3.61,0,4.09-.62,4.14-3.96.09-5.72.18-11.88.18-18.22,0-3.34-.53-3.96-3.87-3.96V.27h21.21l.92,5.02h-.7c-2.02-2.51-3.26-3.96-7.39-3.96h-3.79c-2.2,0-2.6.22-2.6,1.76v9.59h4.53c3.78,0,4.14-.57,4.8-3.83h.97v9.59h-.97c-.48-3.43-1.23-4.27-4.4-4.27h-4.93v11.09c0,1.5.66,1.85,2.82,1.85h5.81c4.18,0,5.02-.79,7.83-5.5h.84c-.44,1.14-1.14,4.89-1.5,6.56h-23.9v-.88Z"}),b.jsx("path",{fill:"var(--color-primary)",d:"M84.6,27.47c2.38,0,2.9-.62,2.9-3.96v-8.23c0-1.01-.22-1.19-1.06-1.72-.35-.22-.53-.31-.53-.57,0-.35.26-.48.75-.75,1.5-.92,2.68-1.67,3.26-1.67.22,0,.48.13.48.53v1.8c1.19-.79,2.99-2.07,5.85-2.07,2.6,0,6.03.97,6.03,6.12v6.56c0,3.34.53,3.96,2.6,3.96v.7h-8.27v-.7c2.07,0,2.6-.62,2.6-3.96v-5.81c0-3.57-1.54-5.37-4.58-5.37-1.8,0-3.34,1.36-4.05,2.2v8.98c0,3.34.53,3.96,2.68,3.96v.7h-8.67v-.7Z"}),b.jsx("path",{fill:"var(--color-primary)",d:"M113.68,23.49c-.97,0-1.5-.09-1.98-.22-1.14.79-2.6,1.36-2.6,2.38,0,1.23,1.36,1.5,9.07,1.85,3.17.13,4.49,1.5,4.49,3.83,0,5.72-5.59,7.26-10.52,7.26-3.35,0-7.7-.79-7.7-3.7,0-2.07,1.5-3.12,5.02-4.88-1.8-.88-3.04-2.38-3.04-3.65,0-1.41,2.11-2.07,4.09-3.56-2.46-1.06-4.09-2.95-4.09-5.77,0-3.83,2.86-6.16,6.91-6.16,2.77,0,5.15,1.06,5.99,1.06.92,0,2.2-.53,3.43-.53,1.01,0,1.5.26,1.5.92,0,.75-.53,1.19-1.41,1.19s-1.36-.53-2.07-.53c-.62,0-.97.35-.97.92,0,1.19.57,1.41.57,3.48,0,3.61-3.34,6.12-6.69,6.12M113.5,37.7c3.57,0,6.95-1.58,6.95-4.8,0-1.85-1.54-2.6-9.33-2.6-1.72.66-3.61,1.98-3.61,4.05,0,2.2,2.73,3.34,5.99,3.34M113.02,11.74c-2.33,0-3.78,2.07-3.78,5.06,0,3.26,1.54,5.81,4.53,5.81,2.33,0,3.78-1.5,3.78-4.31,0-3.7-1.54-6.56-4.53-6.56"}),b.jsx("path",{fill:"var(--color-primary)",d:"M124.99,27.47c2.11,0,2.64-.62,2.64-3.96v-7.83c0-1.06-.22-1.5-1.06-1.89-.62-.31-.84-.35-.84-.62,0-.35.35-.48,2.02-1.23,1.94-.84,2.02-1.36,2.51-1.36.31,0,.44.18.44.48v1.45c0,.35.18.53.44.53.4,0,2.6-2.2,4.84-2.2,1.19,0,1.94.53,1.94,1.54,0,.79-.48,1.5-2.02,1.5-.57,0-1.63-.13-2.42-.13-1.58,0-2.77.79-2.77,3.17v7.22c0,2.73.48,3.26,2.73,3.34v.7h-8.45v-.7Z"}),b.jsx("path",{fill:"var(--color-primary)",d:"M148.71,15.68c0-3.04-1.14-3.79-2.99-3.79-4.05,0-2.38,4.53-4.97,4.53-.75,0-1.28-.4-1.28-1.19,0-1.63,3.96-4.4,7.35-4.4,2.95,0,4.97,1.5,4.97,5.28v9.64c0,1.01.62,1.28,1.1,1.28.66,0,1.1-.26,1.54-.66l.44.48c-.62.97-2.11,1.67-3.43,1.67s-2.64-.97-2.73-2.6c-2.07,1.89-4.09,2.6-5.77,2.6-2.51,0-4.27-1.5-4.27-3.43,0-3.04,2.51-3.92,7.66-5.24l2.38-.62v-3.56ZM148.71,19.95l-1.76.44c-3.3.84-5.02,1.85-5.02,3.7,0,1.63.92,2.95,2.91,2.95,1.41,0,2.68-.88,3.87-1.8v-5.28Z"}),b.jsx("path",{fill:"var(--color-primary)",d:"M165.13,12.68h-3.08c-1.8,0-2.42.44-2.42,3.17v8.49c0,1.94,1.19,2.68,2.82,2.68,1.23,0,2.24-.22,3.08-.35v.88c-1.23.44-2.46.97-4.45.97-3.65,0-4.53-2.29-4.53-4.4v-9.77c0-1.45-.09-1.58-.53-1.76-.35-.13-1.41-.18-1.41-.62,0-.31.4-.62.75-.97,2.95-2.99,3.34-3.61,3.79-3.61.26,0,.48.13.48.7v3.08h5.5v1.5Z"}),b.jsx("path",{fill:"var(--color-primary)",d:"M168.16,17.08c-.18.66-.31,1.41-.31,2.6,0,3.92,2.38,7.35,6.47,7.35,1.76,0,3.17-.62,5.11-1.94l.53.7c-1.98,1.58-3.92,2.99-6.78,2.99-5.24,0-8.41-4.49-8.41-8.36,0-5.55,3.87-9.33,8.49-9.33,3.7,0,6.6,3.04,6.6,5.77,0,.18-.13.22-.44.22h-11.27ZM176.79,16.03c-.18-2.38-1.72-4.05-3.96-4.05-2.55,0-3.96,2.07-4.45,4.05h8.41Z"})]}),b.jsxs("g",{children:[b.jsx("path",{fill:"var(--color-sunflower)",d:"M.2,15.44l6.3,12.07c.18.34.59.34.77,0l6.3-12.07c.26-.5.27-1.12.03-1.63L7.28.28c-.17-.37-.62-.37-.79,0L.17,13.8c-.24.51-.23,1.14.03,1.63"}),b.jsx("path",{fill:"var(--color-sunflower)",d:"M12.25,15.44l6.3,12.07c.18.34.59.34.77,0l6.3-12.07c.26-.5.27-1.12.03-1.63L19.33.28c-.17-.37-.62-.37-.79,0l-6.32,13.53c-.24.51-.23,1.14.03,1.63"}),b.jsx("path",{fill:"var(--color-sunflower)",d:"M24.31,15.44l6.3,12.07c.18.34.59.34.77,0l6.3-12.07c.26-.5.27-1.12.03-1.63L31.39.28c-.17-.37-.62-.37-.79,0l-6.32,13.53c-.24.51-.23,1.14.03,1.63"})]})]})})})});bR.displayName="EngrateLogo";const xR=te("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"}}),wR=p.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},i)=>{const a=n?Ie:"span";return b.jsx(a,{className:D(xR({variant:t,size:r,className:e})),ref:i,...o})});wR.displayName="Eyebrow";const SR=te("w-full font-sans",{variants:{variant:{default:"border-border border-t bg-white",filled:"bg-main border-border border-t",dark:"bg-primary text-white"},size:{sm:"px-4 py-6",default:"px-6 py-10",lg:"px-8 py-16"}},defaultVariants:{variant:"default",size:"default"}}),PR=p.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},i)=>{const a=n?Ie:"footer";return b.jsx(a,{ref:i,className:D(SR({variant:t,size:r,className:e})),...o})});PR.displayName="Footer";const CR=p.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const o=t?Ie:"div";return b.jsx(o,{ref:n,className:D("grid grid-cols-2 gap-8 md:grid-cols-3 lg:grid-cols-4",e),...r})});CR.displayName="FooterContent";const OR=p.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const o=t?Ie:"div";return b.jsx(o,{ref:n,className:D("flex flex-col gap-3",e),...r})});OR.displayName="FooterSection";const ER=p.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const o=t?Ie:"h3";return b.jsx(o,{ref:n,className:D("text-small font-medium",e),...r})});ER.displayName="FooterHeading";const AR=p.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const o=t?Ie:"nav";return b.jsx(o,{ref:n,className:D("text-small text-secondary flex flex-col gap-2",e),...r})});AR.displayName="FooterLinks";const TR=p.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const o=t?Ie:"div";return b.jsx(o,{ref:n,className:D("border-border mt-8 flex flex-col items-center justify-between gap-4 border-t pt-8 sm:flex-row",e),...r})});TR.displayName="FooterBottom";const MR=p.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const o=t?Ie:"p";return b.jsx(o,{ref:n,className:D("text-small text-secondary",e),...r})});MR.displayName="FooterCopyright";const pb=p.forwardRef(({className:e,variant:t="default",children:r,...n},o)=>r?b.jsx("p",{ref:o,className:D("text-descriptive font-sans text-sm",t==="default"?"text-tertiary":"text-error",e),...n,children:r}):null);pb.displayName="FormMessage";var Rue=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Lue=Rue.reduce((e,t)=>{const r=xA(`Primitive.${t}`),n=p.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}},{}),$ue="Label",kR=p.forwardRef((e,t)=>b.jsx(Lue.label,{...e,ref:t,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));kR.displayName=$ue;var Vue=kR;const DR=te("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"}}),hb=p.forwardRef(({className:e,size:t,...r},n)=>b.jsx(Vue,{ref:n,className:D(DR({size:t}),e),...r}));hb.displayName="Label";const _R=p.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:D("flex flex-col gap-1.5",e),...s,children:[t&&b.jsx(hb,{htmlFor:i,size:r,children:t}),a,(n||o)&&b.jsx(pb,{id:c,variant:o?"error":"default",role:o?"alert":void 0,children:o||n})]})});_R.displayName="FormField";const Fue=te("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"}}),Bue={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"},Wue={none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},zue={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},Kue={start:"justify-items-start",center:"justify-items-center",end:"justify-items-end",stretch:"justify-items-stretch"};function bo(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 NR=p.forwardRef(({className:e,cols:t,gap:r,align:n,justify:o,as:i="div",asChild:a=!1,...s},l)=>{const c=a?Ie:i,u=bo(t,Bue,1),d=bo(r,Wue,"md"),f=bo(n,zue,"stretch"),h=bo(o,Kue,"stretch");return b.jsx(c,{className:D("grid",u,d,f,h,e),ref:l,...s})});NR.displayName="Grid";const Uue=te("",{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:{}}),Hue={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"},Gue={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"},Yue={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"},jR=p.forwardRef(({className:e,colSpan:t,rowSpan:r,colStart:n,as:o="div",asChild:i=!1,...a},s)=>{const l=i?Ie:o,c=bo(t,Hue),u=bo(r,Gue),d=bo(n,Yue);return b.jsx(l,{className:D(c,u,d,e),ref:s,...a})});jR.displayName="GridItem";const IR=te("flex w-full items-center justify-between font-sans",{variants:{variant:{default:"border-border border-b bg-white",transparent:"bg-transparent",filled:"bg-main border-border border-b"},size:{sm:"h-12 px-4",default:"h-16 px-6",lg:"h-20 px-8"},sticky:{true:"sticky top-0 z-50",false:""}},defaultVariants:{variant:"default",size:"default",sticky:!1}}),RR=p.forwardRef(({className:e,variant:t,size:r,sticky:n,asChild:o=!1,...i},a)=>{const s=o?Ie:"header";return b.jsx(s,{ref:a,className:D(IR({variant:t,size:r,sticky:n,className:e})),...i})});RR.displayName="Header";const LR=p.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const o=t?Ie:"div";return b.jsx(o,{ref:n,className:D("flex shrink-0 items-center",e),...r})});LR.displayName="HeaderLogo";const $R=p.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const o=t?Ie:"nav";return b.jsx(o,{ref:n,className:D("flex items-center gap-6",e),...r})});$R.displayName="HeaderNav";const VR=p.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const o=t?Ie:"div";return b.jsx(o,{ref:n,className:D("flex shrink-0 items-center gap-3",e),...r})});VR.displayName="HeaderActions";const FR=te("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"}}),que={hero:"h1",h1:"h1",h2:"h2",h3:"h3",h4:"h4"},mb=p.forwardRef(({className:e,level:t="h1",as:r,asChild:n=!1,...o},i)=>{const a=r??que[t??"h1"],s=n?Ie:a;return b.jsx(s,{className:D(FR({level:t,className:e})),ref:i,...o})});mb.displayName="Heading";const BR=te("bg-card text-body-sm text-primary placeholder:text-tertiary placeholder:text-body-sm flex h-8 w-full rounded-md border px-3 py-1 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"}}),WR=p.forwardRef(({className:e,variant:t,type:r="text",...n},o)=>b.jsx("input",{type:r,className:D(BR({variant:t}),e),ref:o,...n}));WR.displayName="Input";const zR=te("text-small font-sans tracking-[-0.05em]",{variants:{size:{sm:"h-48",default:"h-72",lg:"h-96"}},defaultVariants:{size:"default"}}),Il=["var(--color-sunflower)","var(--color-electric-blue)","var(--color-cool-purple)","var(--color-deep-blue)","var(--color-warm-purple)"],KR=p.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:d=!0,...f},h)=>{const v=p.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:Il[x%Il.length]})):[]},[r,n]);return b.jsx("div",{ref:h,className:D(zR({size:t,className:e})),role:"img",...f,children:b.jsx(eg,{width:"100%",height:"100%",minWidth:100,minHeight:100,children:b.jsxs(Rne,{data:r,margin:{top:5,right:30,left:l?20:0,bottom:s?20:5},children:[o&&b.jsx(Ny,{strokeDasharray:"3 3",stroke:"var(--color-border)",vertical:!1}),b.jsx(Jc,{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(eu,{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(yy,{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},itemStyle:{color:"var(--color-secondary)"}}),i&&b.jsx(qu,{wrapperStyle:{fontFamily:"var(--font-sans)",fontSize:"14px"},formatter:m=>b.jsx("span",{style:{color:"var(--color-secondary)"},children:m})}),v.map((m,g)=>b.jsx(y_,{type:u?"monotone":"linear",dataKey:m.key,name:m.name,stroke:m.color||Il[g%Il.length],strokeWidth:c,dot:d,activeDot:d?{r:6}:!1},m.key))]})})})});KR.displayName="LineChart";const UR=te("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"}}),HR=p.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},i)=>{const a=n?Ie:"a";return b.jsx(a,{className:D(UR({variant:t,size:r,className:e})),ref:i,...o})});HR.displayName="Link";const vb=O.createContext({});function gb(e){const t=O.useRef(null);return t.current===null&&(t.current=e()),t.current}const GR=typeof window<"u",YR=GR?O.useLayoutEffect:O.useEffect,Vd=O.createContext(null);function yb(e,t){e.indexOf(t)===-1&&e.push(t)}function uu(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}const Ur=(e,t,r)=>r>t?t:r<e?e:r;function Nm(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Ji=()=>{},hn=()=>{};typeof process<"u"&&process.env?.NODE_ENV!=="production"&&(Ji=(e,t,r)=>{!e&&typeof console<"u"&&console.warn(Nm(t,r))},hn=(e,t,r)=>{if(!e)throw new Error(Nm(t,r))});const mn={},qR=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function XR(e){return typeof e=="object"&&e!==null}const ZR=e=>/^0[^.\s]+$/u.test(e);function bb(e){let t;return()=>(t===void 0&&(t=e()),t)}const lr=e=>e,Xue=(e,t)=>r=>t(e(r)),Gs=(...e)=>e.reduce(Xue),Qa=(e,t,r)=>{const n=t-e;return n===0?1:(r-e)/n};class xb{constructor(){this.subscriptions=[]}add(t){return yb(this.subscriptions,t),()=>uu(this.subscriptions,t)}notify(t,r,n){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,r,n);else for(let i=0;i<o;i++){const a=this.subscriptions[i];a&&a(t,r,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const cr=e=>e*1e3,ar=e=>e/1e3;function QR(e,t){return t?e*(1e3/t):0}const p1=new Set;function wb(e,t,r){e||p1.has(t)||(console.warn(Nm(t,r)),p1.add(t))}const JR=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,Zue=1e-7,Que=12;function Jue(e,t,r,n,o){let i,a,s=0;do a=t+(r-t)/2,i=JR(a,n,o)-e,i>0?r=a:t=a;while(Math.abs(i)>Zue&&++s<Que);return a}function Ys(e,t,r,n){if(e===t&&r===n)return lr;const o=i=>Jue(i,0,1,e,r);return i=>i===0||i===1?i:JR(o(i),t,n)}const e2=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,t2=e=>t=>1-e(1-t),r2=Ys(.33,1.53,.69,.99),Sb=t2(r2),n2=e2(Sb),o2=e=>(e*=2)<1?.5*Sb(e):.5*(2-Math.pow(2,-10*(e-1))),Pb=e=>1-Math.sin(Math.acos(e)),i2=t2(Pb),a2=e2(Pb),ede=Ys(.42,0,1,1),tde=Ys(0,0,.58,1),s2=Ys(.42,0,.58,1),rde=e=>Array.isArray(e)&&typeof e[0]!="number",l2=e=>Array.isArray(e)&&typeof e[0]=="number",h1={linear:lr,easeIn:ede,easeInOut:s2,easeOut:tde,circIn:Pb,circInOut:a2,circOut:i2,backIn:Sb,backInOut:n2,backOut:r2,anticipate:o2},nde=e=>typeof e=="string",m1=e=>{if(l2(e)){hn(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,r,n,o]=e;return Ys(t,r,n,o)}else if(nde(e))return hn(h1[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),h1[e];return e},Rl=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function ode(e,t){let r=new Set,n=new Set,o=!1,i=!1;const a=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function l(u){a.has(u)&&(c.schedule(u),e()),u(s)}const c={schedule:(u,d=!1,f=!1)=>{const v=f&&o?r:n;return d&&a.add(u),v.has(u)||v.add(u),u},cancel:u=>{n.delete(u),a.delete(u)},process:u=>{if(s=u,o){i=!0;return}o=!0,[r,n]=[n,r],r.forEach(l),r.clear(),o=!1,i&&(i=!1,c.process(u))}};return c}const ide=40;function c2(e,t){let r=!1,n=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>r=!0,a=Rl.reduce((w,S)=>(w[S]=ode(i),w),{}),{setup:s,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:h,postRender:v}=a,m=()=>{const w=mn.useManualTiming?o.timestamp:performance.now();r=!1,mn.useManualTiming||(o.delta=n?1e3/60:Math.max(Math.min(w-o.timestamp,ide),1)),o.timestamp=w,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),h.process(o),v.process(o),o.isProcessing=!1,r&&t&&(n=!1,e(m))},g=()=>{r=!0,n=!0,o.isProcessing||e(m)};return{schedule:Rl.reduce((w,S)=>{const P=a[S];return w[S]=(C,E=!1,A=!1)=>(r||g(),P.schedule(C,E,A)),w},{}),cancel:w=>{for(let S=0;S<Rl.length;S++)a[Rl[S]].cancel(w)},state:o,steps:a}}const{schedule:_e,cancel:Kn,state:yt,steps:rh}=c2(typeof requestAnimationFrame<"u"?requestAnimationFrame:lr,!0);let Xl;function ade(){Xl=void 0}const Nt={now:()=>(Xl===void 0&&Nt.set(yt.isProcessing||mn.useManualTiming?yt.timestamp:performance.now()),Xl),set:e=>{Xl=e,queueMicrotask(ade)}},u2=e=>t=>typeof t=="string"&&t.startsWith(e),d2=u2("--"),sde=u2("var(--"),Cb=e=>sde(e)?lde.test(e.split("/*")[0].trim()):!1,lde=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function v1(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const ea={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ja={...ea,transform:e=>Ur(0,1,e)},Ll={...ea,default:1},Ta=e=>Math.round(e*1e5)/1e5,Ob=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function cde(e){return e==null}const ude=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Eb=(e,t)=>r=>!!(typeof r=="string"&&ude.test(r)&&r.startsWith(e)||t&&!cde(r)&&Object.prototype.hasOwnProperty.call(r,t)),f2=(e,t,r)=>n=>{if(typeof n!="string")return n;const[o,i,a,s]=n.match(Ob);return{[e]:parseFloat(o),[t]:parseFloat(i),[r]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},dde=e=>Ur(0,255,e),nh={...ea,transform:e=>Math.round(dde(e))},xo={test:Eb("rgb","red"),parse:f2("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+nh.transform(e)+", "+nh.transform(t)+", "+nh.transform(r)+", "+Ta(Ja.transform(n))+")"};function fde(e){let t="",r="",n="",o="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),o=e.substring(4,5),t+=t,r+=r,n+=n,o+=o),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:o?parseInt(o,16)/255:1}}const jm={test:Eb("#"),parse:fde,transform:xo.transform},qs=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Mn=qs("deg"),Vr=qs("%"),Q=qs("px"),pde=qs("vh"),hde=qs("vw"),g1={...Vr,parse:e=>Vr.parse(e)/100,transform:e=>Vr.transform(e*100)},di={test:Eb("hsl","hue"),parse:f2("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+Vr.transform(Ta(t))+", "+Vr.transform(Ta(r))+", "+Ta(Ja.transform(n))+")"},qe={test:e=>xo.test(e)||jm.test(e)||di.test(e),parse:e=>xo.test(e)?xo.parse(e):di.test(e)?di.parse(e):jm.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?xo.transform(e):di.transform(e),getAnimatableNone:e=>{const t=qe.parse(e);return t.alpha=0,qe.transform(t)}},mde=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function vde(e){return isNaN(e)&&typeof e=="string"&&(e.match(Ob)?.length||0)+(e.match(mde)?.length||0)>0}const p2="number",h2="color",gde="var",yde="var(",y1="${}",bde=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function es(e){const t=e.toString(),r=[],n={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace(bde,l=>(qe.test(l)?(n.color.push(i),o.push(h2),r.push(qe.parse(l))):l.startsWith(yde)?(n.var.push(i),o.push(gde),r.push(l)):(n.number.push(i),o.push(p2),r.push(parseFloat(l))),++i,y1)).split(y1);return{values:r,split:s,indexes:n,types:o}}function m2(e){return es(e).values}function v2(e){const{split:t,types:r}=es(e),n=t.length;return o=>{let i="";for(let a=0;a<n;a++)if(i+=t[a],o[a]!==void 0){const s=r[a];s===p2?i+=Ta(o[a]):s===h2?i+=qe.transform(o[a]):i+=o[a]}return i}}const xde=e=>typeof e=="number"?0:qe.test(e)?qe.getAnimatableNone(e):e;function wde(e){const t=m2(e);return v2(e)(t.map(xde))}const Un={test:vde,parse:m2,createTransformer:v2,getAnimatableNone:wde};function oh(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function Sde({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let o=0,i=0,a=0;if(!t)o=i=a=r;else{const s=r<.5?r*(1+t):r+t-r*t,l=2*r-s;o=oh(l,s,e+1/3),i=oh(l,s,e),a=oh(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:n}}function du(e,t){return r=>r>0?t:e}const Be=(e,t,r)=>e+(t-e)*r,ih=(e,t,r)=>{const n=e*e,o=r*(t*t-n)+n;return o<0?0:Math.sqrt(o)},Pde=[jm,xo,di],Cde=e=>Pde.find(t=>t.test(e));function b1(e){const t=Cde(e);if(Ji(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let r=t.parse(e);return t===di&&(r=Sde(r)),r}const x1=(e,t)=>{const r=b1(e),n=b1(t);if(!r||!n)return du(e,t);const o={...r};return i=>(o.red=ih(r.red,n.red,i),o.green=ih(r.green,n.green,i),o.blue=ih(r.blue,n.blue,i),o.alpha=Be(r.alpha,n.alpha,i),xo.transform(o))},Im=new Set(["none","hidden"]);function Ode(e,t){return Im.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function Ede(e,t){return r=>Be(e,t,r)}function Ab(e){return typeof e=="number"?Ede:typeof e=="string"?Cb(e)?du:qe.test(e)?x1:Mde:Array.isArray(e)?g2:typeof e=="object"?qe.test(e)?x1:Ade:du}function g2(e,t){const r=[...e],n=r.length,o=e.map((i,a)=>Ab(i)(i,t[a]));return i=>{for(let a=0;a<n;a++)r[a]=o[a](i);return r}}function Ade(e,t){const r={...e,...t},n={};for(const o in r)e[o]!==void 0&&t[o]!==void 0&&(n[o]=Ab(e[o])(e[o],t[o]));return o=>{for(const i in n)r[i]=n[i](o);return r}}function Tde(e,t){const r=[],n={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const i=t.types[o],a=e.indexes[i][n[i]],s=e.values[a]??0;r[o]=s,n[i]++}return r}const Mde=(e,t)=>{const r=Un.createTransformer(t),n=es(e),o=es(t);return n.indexes.var.length===o.indexes.var.length&&n.indexes.color.length===o.indexes.color.length&&n.indexes.number.length>=o.indexes.number.length?Im.has(e)&&!o.values.length||Im.has(t)&&!n.values.length?Ode(e,t):Gs(g2(Tde(n,o),o.values),r):(Ji(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),du(e,t))};function y2(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?Be(e,t,r):Ab(e)(e,t)}const kde=e=>{const t=({timestamp:r})=>e(r);return{start:(r=!0)=>_e.update(t,r),stop:()=>Kn(t),now:()=>yt.isProcessing?yt.timestamp:Nt.now()}},b2=(e,t,r=10)=>{let n="";const o=Math.max(Math.round(t/r),2);for(let i=0;i<o;i++)n+=Math.round(e(i/(o-1))*1e4)/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},fu=2e4;function Tb(e){let t=0;const r=50;let n=e.next(t);for(;!n.done&&t<fu;)t+=r,n=e.next(t);return t>=fu?1/0:t}function Dde(e,t=100,r){const n=r({...e,keyframes:[0,t]}),o=Math.min(Tb(n),fu);return{type:"keyframes",ease:i=>n.next(o*i).value/t,duration:ar(o)}}const _de=5;function x2(e,t,r){const n=Math.max(t-_de,0);return QR(r-e(n),t-n)}const Ve={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},ah=.001;function Nde({duration:e=Ve.duration,bounce:t=Ve.bounce,velocity:r=Ve.velocity,mass:n=Ve.mass}){let o,i;Ji(e<=cr(Ve.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-t;a=Ur(Ve.minDamping,Ve.maxDamping,a),e=Ur(Ve.minDuration,Ve.maxDuration,ar(e)),a<1?(o=c=>{const u=c*a,d=u*e,f=u-r,h=Rm(c,a),v=Math.exp(-d);return ah-f/h*v},i=c=>{const d=c*a*e,f=d*r+r,h=Math.pow(a,2)*Math.pow(c,2)*e,v=Math.exp(-d),m=Rm(Math.pow(c,2),a);return(-o(c)+ah>0?-1:1)*((f-h)*v)/m}):(o=c=>{const u=Math.exp(-c*e),d=(c-r)*e+1;return-ah+u*d},i=c=>{const u=Math.exp(-c*e),d=(r-c)*(e*e);return u*d});const s=5/e,l=Ide(o,i,s);if(e=cr(e),isNaN(l))return{stiffness:Ve.stiffness,damping:Ve.damping,duration:e};{const c=Math.pow(l,2)*n;return{stiffness:c,damping:a*2*Math.sqrt(n*c),duration:e}}}const jde=12;function Ide(e,t,r){let n=r;for(let o=1;o<jde;o++)n=n-e(n)/t(n);return n}function Rm(e,t){return e*Math.sqrt(1-t*t)}const Rde=["duration","bounce"],Lde=["stiffness","damping","mass"];function w1(e,t){return t.some(r=>e[r]!==void 0)}function $de(e){let t={velocity:Ve.velocity,stiffness:Ve.stiffness,damping:Ve.damping,mass:Ve.mass,isResolvedFromDuration:!1,...e};if(!w1(e,Lde)&&w1(e,Rde))if(e.visualDuration){const r=e.visualDuration,n=2*Math.PI/(r*1.2),o=n*n,i=2*Ur(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:Ve.mass,stiffness:o,damping:i}}else{const r=Nde(e);t={...t,...r,mass:Ve.mass},t.isResolvedFromDuration=!0}return t}function pu(e=Ve.visualDuration,t=Ve.bounce){const r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:n,restDelta:o}=r;const i=r.keyframes[0],a=r.keyframes[r.keyframes.length-1],s={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:h}=$de({...r,velocity:-ar(r.velocity||0)}),v=f||0,m=c/(2*Math.sqrt(l*u)),g=a-i,y=ar(Math.sqrt(l/u)),x=Math.abs(g)<5;n||(n=x?Ve.restSpeed.granular:Ve.restSpeed.default),o||(o=x?Ve.restDelta.granular:Ve.restDelta.default);let w;if(m<1){const P=Rm(y,m);w=C=>{const E=Math.exp(-m*y*C);return a-E*((v+m*y*g)/P*Math.sin(P*C)+g*Math.cos(P*C))}}else if(m===1)w=P=>a-Math.exp(-y*P)*(g+(v+y*g)*P);else{const P=y*Math.sqrt(m*m-1);w=C=>{const E=Math.exp(-m*y*C),A=Math.min(P*C,300);return a-E*((v+m*y*g)*Math.sinh(A)+P*g*Math.cosh(A))/P}}const S={calculatedDuration:h&&d||null,next:P=>{const C=w(P);if(h)s.done=P>=d;else{let E=P===0?v:0;m<1&&(E=P===0?cr(v):x2(w,P,C));const A=Math.abs(E)<=n,T=Math.abs(a-C)<=o;s.done=A&&T}return s.value=s.done?a:C,s},toString:()=>{const P=Math.min(Tb(S),fu),C=b2(E=>S.next(P*E).value,P,30);return P+"ms "+C},toTransition:()=>{}};return S}pu.applyToOptions=e=>{const t=Dde(e,100,pu);return e.ease=t.ease,e.duration=cr(t.duration),e.type="keyframes",e};function Lm({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:s,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},h=A=>s!==void 0&&A<s||l!==void 0&&A>l,v=A=>s===void 0?l:l===void 0||Math.abs(s-A)<Math.abs(l-A)?s:l;let m=r*t;const g=d+m,y=a===void 0?g:a(g);y!==g&&(m=y-d);const x=A=>-m*Math.exp(-A/n),w=A=>y+x(A),S=A=>{const T=x(A),M=w(A);f.done=Math.abs(T)<=c,f.value=f.done?y:M};let P,C;const E=A=>{h(f.value)&&(P=A,C=pu({keyframes:[f.value,v(f.value)],velocity:x2(w,A,f.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return E(0),{calculatedDuration:null,next:A=>{let T=!1;return!C&&P===void 0&&(T=!0,S(A),E(A)),P!==void 0&&A>=P?C.next(A-P):(!T&&S(A),f)}}}function Vde(e,t,r){const n=[],o=r||mn.mix||y2,i=e.length-1;for(let a=0;a<i;a++){let s=o(e[a],e[a+1]);if(t){const l=Array.isArray(t)?t[a]||lr:t;s=Gs(l,s)}n.push(s)}return n}function Fde(e,t,{clamp:r=!0,ease:n,mixer:o}={}){const i=e.length;if(hn(i===t.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=Vde(t,n,o),l=s.length,c=u=>{if(a&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=Qa(e[d],e[d+1],u);return s[d](f)};return r?u=>c(Ur(e[0],e[i-1],u)):c}function Bde(e,t){const r=e[e.length-1];for(let n=1;n<=t;n++){const o=Qa(0,t,n);e.push(Be(r,1,o))}}function Wde(e){const t=[0];return Bde(t,e.length-1),t}function zde(e,t){return e.map(r=>r*t)}function Kde(e,t){return e.map(()=>t||s2).splice(0,e.length-1)}function fi({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){const o=rde(n)?n.map(m1):m1(n),i={done:!1,value:t[0]},a=zde(r&&r.length===t.length?r:Wde(t),e),s=Fde(a,t,{ease:Array.isArray(o)?o:Kde(t,o)});return{calculatedDuration:e,next:l=>(i.value=s(l),i.done=l>=e,i)}}const Ude=e=>e!==null;function Mb(e,{repeat:t,repeatType:r="loop"},n,o=1){const i=e.filter(Ude),s=o<0||t&&r!=="loop"&&t%2===1?0:i.length-1;return!s||n===void 0?i[s]:n}const Hde={decay:Lm,inertia:Lm,tween:fi,keyframes:fi,spring:pu};function w2(e){typeof e.type=="string"&&(e.type=Hde[e.type])}class kb{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,r){return this.finished.then(t,r)}}const Gde=e=>e/100;class Db extends kb{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:r}=this.options;r&&r.updatedAt!==Nt.now()&&this.tick(Nt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;w2(t);const{type:r=fi,repeat:n=0,repeatDelay:o=0,repeatType:i,velocity:a=0}=t;let{keyframes:s}=t;const l=r||fi;process.env.NODE_ENV!=="production"&&l!==fi&&hn(s.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${s}`,"spring-two-frames"),l!==fi&&typeof s[0]!="number"&&(this.mixKeyframes=Gs(Gde,y2(s[0],s[1])),s=[0,100]);const c=l({...t,keyframes:s});i==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...s].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=Tb(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+o,this.totalDuration=this.resolvedDuration*(n+1)-o,this.generator=c}updateTime(t){const r=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r}tick(t,r=!1){const{generator:n,totalDuration:o,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:s,calculatedDuration:l}=this;if(this.startTime===null)return n.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:f,repeatDelay:h,type:v,onUpdate:m,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),r?this.currentTime=t:this.updateTime(t);const y=this.currentTime-c*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?y<0:y>o;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let w=this.currentTime,S=n;if(d){const A=Math.min(this.currentTime,o)/s;let T=Math.floor(A),M=A%1;!M&&A>=1&&(M=1),M===1&&T--,T=Math.min(T,d+1),T%2&&(f==="reverse"?(M=1-M,h&&(M-=h/s)):f==="mirror"&&(S=a)),w=Ur(0,1,M)*s}const P=x?{done:!1,value:u[0]}:S.next(w);i&&(P.value=i(P.value));let{done:C}=P;!x&&l!==null&&(C=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return E&&v!==Lm&&(P.value=Mb(u,this.options,g,this.speed)),m&&m(P.value),E&&this.finish(),P}then(t,r){return this.finished.then(t,r)}get duration(){return ar(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ar(t)}get time(){return ar(this.currentTime)}set time(t){t=cr(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Nt.now());const r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=ar(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=kde,startTime:r}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();const n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=r??n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Nt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function Yde(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const wo=e=>e*180/Math.PI,$m=e=>{const t=wo(Math.atan2(e[1],e[0]));return Vm(t)},qde={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:$m,rotateZ:$m,skewX:e=>wo(Math.atan(e[1])),skewY:e=>wo(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Vm=e=>(e=e%360,e<0&&(e+=360),e),S1=$m,P1=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),C1=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Xde={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:P1,scaleY:C1,scale:e=>(P1(e)+C1(e))/2,rotateX:e=>Vm(wo(Math.atan2(e[6],e[5]))),rotateY:e=>Vm(wo(Math.atan2(-e[2],e[0]))),rotateZ:S1,rotate:S1,skewX:e=>wo(Math.atan(e[4])),skewY:e=>wo(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Fm(e){return e.includes("scale")?1:0}function Bm(e,t){if(!e||e==="none")return Fm(t);const r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,o;if(r)n=Xde,o=r;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=qde,o=s}if(!o)return Fm(t);const i=n[t],a=o[1].split(",").map(Qde);return typeof i=="function"?i(a):a[i]}const Zde=(e,t)=>{const{transform:r="none"}=getComputedStyle(e);return Bm(r,t)};function Qde(e){return parseFloat(e.trim())}const ta=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ra=new Set(ta),O1=e=>e===ea||e===Q,Jde=new Set(["x","y","z"]),efe=ta.filter(e=>!Jde.has(e));function tfe(e){const t=[];return efe.forEach(r=>{const n=e.getValue(r);n!==void 0&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t}const jn={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Bm(t,"x"),y:(e,{transform:t})=>Bm(t,"y")};jn.translateX=jn.x;jn.translateY=jn.y;const Eo=new Set;let Wm=!1,zm=!1,Km=!1;function S2(){if(zm){const e=Array.from(Eo).filter(n=>n.needsMeasurement),t=new Set(e.map(n=>n.element)),r=new Map;t.forEach(n=>{const o=tfe(n);o.length&&(r.set(n,o),n.render())}),e.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();const o=r.get(n);o&&o.forEach(([i,a])=>{n.getValue(i)?.set(a)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}zm=!1,Wm=!1,Eo.forEach(e=>e.complete(Km)),Eo.clear()}function P2(){Eo.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(zm=!0)})}function rfe(){Km=!0,P2(),S2(),Km=!1}class _b{constructor(t,r,n,o,i,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=n,this.motionValue=o,this.element=i,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(Eo.add(this),Wm||(Wm=!0,_e.read(P2),_e.resolveKeyframes(S2))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:r,element:n,motionValue:o}=this;if(t[0]===null){const i=o?.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(n&&r){const s=n.readValue(r,a);s!=null&&(t[0]=s)}t[0]===void 0&&(t[0]=a),o&&i===void 0&&o.set(t[0])}Yde(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Eo.delete(this)}cancel(){this.state==="scheduled"&&(Eo.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const nfe=e=>e.startsWith("--");function ofe(e,t,r){nfe(t)?e.style.setProperty(t,r):e.style[t]=r}const ife=bb(()=>window.ScrollTimeline!==void 0),afe={};function sfe(e,t){const r=bb(e);return()=>afe[t]??r()}const C2=sfe(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Oa=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`,E1={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Oa([0,.65,.55,1]),circOut:Oa([.55,0,1,.45]),backIn:Oa([.31,.01,.66,-.59]),backOut:Oa([.33,1.53,.69,.99])};function O2(e,t){if(e)return typeof e=="function"?C2()?b2(e,t):"ease-out":l2(e)?Oa(e):Array.isArray(e)?e.map(r=>O2(r,t)||E1.easeOut):E1[e]}function lfe(e,t,r,{delay:n=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:s="easeOut",times:l}={},c=void 0){const u={[t]:r};l&&(u.offset=l);const d=O2(s,o);Array.isArray(d)&&(u.easing=d);const f={delay:n,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),e.animate(u,f)}function E2(e){return typeof e=="function"&&"applyToOptions"in e}function cfe({type:e,...t}){return E2(e)&&C2()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class A2 extends kb{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:r,name:n,keyframes:o,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:s,onComplete:l}=t;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=t,hn(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=cfe(t);this.animation=lfe(r,n,o,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=Mb(o,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(u):ofe(r,n,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return ar(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ar(t)}get time(){return ar(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=cr(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&ife()?(this.animation.timeline=t,lr):r(this)}}const T2={anticipate:o2,backInOut:n2,circInOut:a2};function ufe(e){return e in T2}function dfe(e){typeof e.ease=="string"&&ufe(e.ease)&&(e.ease=T2[e.ease])}const sh=10;class ffe extends A2{constructor(t){dfe(t),w2(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:r,onUpdate:n,onComplete:o,element:i,...a}=this.options;if(!r)return;if(t!==void 0){r.set(t);return}const s=new Db({...a,autoplay:!1}),l=Math.max(sh,Nt.now()-this.startTime),c=Ur(0,sh,l-sh);r.setWithVelocity(s.sample(Math.max(0,l-c)).value,s.sample(l).value,c),s.stop()}}const A1=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Un.test(e)||e==="0")&&!e.startsWith("url("));function pfe(e){const t=e[0];if(e.length===1)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}function hfe(e,t,r,n){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],a=A1(o,t),s=A1(i,t);return Ji(a===s,`You are trying to animate ${t} from "${o}" to "${i}". "${a?i:o}" is not an animatable value.`,"value-not-animatable"),!a||!s?!1:pfe(e)||(r==="spring"||E2(r))&&n}function Um(e){e.duration=0,e.type="keyframes"}const mfe=new Set(["opacity","clipPath","filter","transform"]),vfe=bb(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function gfe(e){const{motionValue:t,name:r,repeatDelay:n,repeatType:o,damping:i,type:a}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return vfe()&&r&&mfe.has(r)&&(r!=="transform"||!c)&&!l&&!n&&o!=="mirror"&&i!==0&&a!=="inertia"}const yfe=40;class bfe extends kb{constructor({autoplay:t=!0,delay:r=0,type:n="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:a="loop",keyframes:s,name:l,motionValue:c,element:u,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Nt.now();const f={autoplay:t,delay:r,type:n,repeat:o,repeatDelay:i,repeatType:a,name:l,motionValue:c,element:u,...d},h=u?.KeyframeResolver||_b;this.keyframeResolver=new h(s,(v,m,g)=>this.onKeyframesResolved(v,m,f,!g),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,r,n,o){this.keyframeResolver=void 0;const{name:i,type:a,velocity:s,delay:l,isHandoff:c,onUpdate:u}=n;this.resolvedAt=Nt.now(),hfe(t,i,a,s)||((mn.instantAnimations||!l)&&u?.(Mb(t,n,r)),t[0]=t[t.length-1],Um(n),n.repeat=0);const f={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>yfe?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...n,keyframes:t},h=!c&&gfe(f),v=f.motionValue?.owner?.current,m=h?new ffe({...f,element:v}):new Db(f);m.finished.then(()=>{this.notifyFinished()}).catch(lr),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(t,r){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),rfe()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function M2(e,t,r,n=0,o=1){const i=Array.from(e).sort((c,u)=>c.sortNodePosition(u)).indexOf(t),a=e.size,s=(a-1)*n;return typeof r=="function"?r(i,a):o===1?i*n:s-i*n}const xfe=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function wfe(e){const t=xfe.exec(e);if(!t)return[,];const[,r,n,o]=t;return[`--${r??n}`,o]}const Sfe=4;function k2(e,t,r=1){hn(r<=Sfe,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[n,o]=wfe(e);if(!n)return;const i=window.getComputedStyle(t).getPropertyValue(n);if(i){const a=i.trim();return qR(a)?parseFloat(a):a}return Cb(o)?k2(o,t,r+1):o}const Pfe={type:"spring",stiffness:500,damping:25,restSpeed:10},Cfe=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Ofe={type:"keyframes",duration:.8},Efe={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Afe=(e,{keyframes:t})=>t.length>2?Ofe:ra.has(e)?e.startsWith("scale")?Cfe(t[1]):Pfe:Efe,Tfe=e=>e!==null;function Mfe(e,{repeat:t,repeatType:r="loop"},n){const o=e.filter(Tfe),i=t&&r!=="loop"&&t%2===1?0:o.length-1;return o[i]}function D2(e,t){if(e?.inherit&&t){const{inherit:r,...n}=e;return{...t,...n}}return e}function Nb(e,t){const r=e?.[t]??e?.default??e;return r!==e?D2(r,e):r}function kfe({when:e,delay:t,delayChildren:r,staggerChildren:n,staggerDirection:o,repeat:i,repeatType:a,repeatDelay:s,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const jb=(e,t,r,n={},o,i)=>a=>{const s=Nb(n,e)||{},l=s.delay||n.delay||0;let{elapsed:c=0}=n;c=c-cr(l);const u={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:f=>{t.set(f),s.onUpdate&&s.onUpdate(f)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:i?void 0:o};kfe(s)||Object.assign(u,Afe(e,u)),u.duration&&(u.duration=cr(u.duration)),u.repeatDelay&&(u.repeatDelay=cr(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Um(u),u.delay===0&&(d=!0)),(mn.instantAnimations||mn.skipAnimations||o?.shouldSkipAnimations)&&(d=!0,Um(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!i&&t.get()!==void 0){const f=Mfe(u.keyframes,s);if(f!==void 0){_e.update(()=>{u.onUpdate(f),u.onComplete()});return}}return s.isSync?new Db(u):new bfe(u)};function T1(e){const t=[{},{}];return e?.values.forEach((r,n)=>{t[0][n]=r.get(),t[1][n]=r.getVelocity()}),t}function Ib(e,t,r,n){if(typeof t=="function"){const[o,i]=T1(n);t=t(r!==void 0?r:e.custom,o,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,i]=T1(n);t=t(r!==void 0?r:e.custom,o,i)}return t}function Pi(e,t,r){const n=e.getProps();return Ib(n,t,r!==void 0?r:n.custom,e)}const _2=new Set(["width","height","top","left","right","bottom",...ta]),M1=30,Dfe=e=>!isNaN(parseFloat(e));class _fe{constructor(t,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{const o=Nt.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}setCurrent(t){this.current=t,this.updatedAt=Nt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Dfe(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&wb(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new xb);const n=this.events[t].add(r);return t==="change"?()=>{n(),_e.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,r,n){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Nt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>M1)return 0;const r=Math.min(this.updatedAt-this.prevUpdatedAt,M1);return QR(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ji(e,t){return new _fe(e,t)}const Hm=e=>Array.isArray(e);function Nfe(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,ji(r))}function jfe(e){return Hm(e)?e[e.length-1]||0:e}function Ife(e,t){const r=Pi(e,t);let{transitionEnd:n={},transition:o={},...i}=r||{};i={...i,...n};for(const a in i){const s=jfe(i[a]);Nfe(e,a,s)}}const Ct=e=>!!(e&&e.getVelocity);function Rfe(e){return!!(Ct(e)&&e.add)}function Gm(e,t){const r=e.getValue("willChange");if(Rfe(r))return r.add(t);if(!r&&mn.WillChange){const n=new mn.WillChange("auto");e.addValue("willChange",n),n.add(t)}}function Rb(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Lfe="framerAppearId",N2="data-"+Rb(Lfe);function j2(e){return e.props[N2]}function $fe({protectedKeys:e,needsAnimating:t},r){const n=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,n}function I2(e,t,{delay:r=0,transitionOverride:n,type:o}={}){let{transition:i,transitionEnd:a,...s}=t;const l=e.getDefaultTransition();i=i?D2(i,l):l;const c=i?.reduceMotion;n&&(i=n);const u=[],d=o&&e.animationState&&e.animationState.getState()[o];for(const f in s){const h=e.getValue(f,e.latestValues[f]??null),v=s[f];if(v===void 0||d&&$fe(d,f))continue;const m={delay:r,...Nb(i||{},f)},g=h.get();if(g!==void 0&&!h.isAnimating&&!Array.isArray(v)&&v===g&&!m.velocity)continue;let y=!1;if(window.MotionHandoffAnimation){const S=j2(e);if(S){const P=window.MotionHandoffAnimation(S,f,_e);P!==null&&(m.startTime=P,y=!0)}}Gm(e,f);const x=c??e.shouldReduceMotion;h.start(jb(f,h,v,x&&_2.has(f)?{type:!1}:m,e,y));const w=h.animation;w&&u.push(w)}if(a){const f=()=>_e.update(()=>{a&&Ife(e,a)});u.length?Promise.all(u).then(f):f()}return u}function Ym(e,t,r={}){const n=Pi(e,t,r.type==="exit"?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=n||{};r.transitionOverride&&(o=r.transitionOverride);const i=n?()=>Promise.all(I2(e,n,r)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:d}=o;return Vfe(e,t,l,c,u,d,r)}:()=>Promise.resolve(),{when:s}=o;if(s){const[l,c]=s==="beforeChildren"?[i,a]:[a,i];return l().then(()=>c())}else return Promise.all([i(),a(r.delay)])}function Vfe(e,t,r=0,n=0,o=0,i=1,a){const s=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),s.push(Ym(l,t,{...a,delay:r+(typeof n=="function"?0:n)+M2(e.variantChildren,l,n,o,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}function Ffe(e,t,r={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){const o=t.map(i=>Ym(e,i,r));n=Promise.all(o)}else if(typeof t=="string")n=Ym(e,t,r);else{const o=typeof t=="function"?Pi(e,t,r.custom):t;n=Promise.all(I2(e,o,r))}return n.then(()=>{e.notify("AnimationComplete",t)})}const Bfe={test:e=>e==="auto",parse:e=>e},R2=e=>t=>t.test(e),L2=[ea,Q,Vr,Mn,hde,pde,Bfe],k1=e=>L2.find(R2(e));function Wfe(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||ZR(e):!0}const zfe=new Set(["brightness","contrast","saturate","opacity"]);function Kfe(e){const[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[n]=r.match(Ob)||[];if(!n)return e;const o=r.replace(n,"");let i=zfe.has(t)?1:0;return n!==r&&(i*=100),t+"("+i+o+")"}const Ufe=/\b([a-z-]*)\(.*?\)/gu,qm={...Un,getAnimatableNone:e=>{const t=e.match(Ufe);return t?t.map(Kfe).join(" "):e}},D1={...ea,transform:Math.round},Hfe={rotate:Mn,rotateX:Mn,rotateY:Mn,rotateZ:Mn,scale:Ll,scaleX:Ll,scaleY:Ll,scaleZ:Ll,skew:Mn,skewX:Mn,skewY:Mn,distance:Q,translateX:Q,translateY:Q,translateZ:Q,x:Q,y:Q,z:Q,perspective:Q,transformPerspective:Q,opacity:Ja,originX:g1,originY:g1,originZ:Q},Lb={borderWidth:Q,borderTopWidth:Q,borderRightWidth:Q,borderBottomWidth:Q,borderLeftWidth:Q,borderRadius:Q,borderTopLeftRadius:Q,borderTopRightRadius:Q,borderBottomRightRadius:Q,borderBottomLeftRadius:Q,width:Q,maxWidth:Q,height:Q,maxHeight:Q,top:Q,right:Q,bottom:Q,left:Q,inset:Q,insetBlock:Q,insetBlockStart:Q,insetBlockEnd:Q,insetInline:Q,insetInlineStart:Q,insetInlineEnd:Q,padding:Q,paddingTop:Q,paddingRight:Q,paddingBottom:Q,paddingLeft:Q,paddingBlock:Q,paddingBlockStart:Q,paddingBlockEnd:Q,paddingInline:Q,paddingInlineStart:Q,paddingInlineEnd:Q,margin:Q,marginTop:Q,marginRight:Q,marginBottom:Q,marginLeft:Q,marginBlock:Q,marginBlockStart:Q,marginBlockEnd:Q,marginInline:Q,marginInlineStart:Q,marginInlineEnd:Q,fontSize:Q,backgroundPositionX:Q,backgroundPositionY:Q,...Hfe,zIndex:D1,fillOpacity:Ja,strokeOpacity:Ja,numOctaves:D1},Gfe={...Lb,color:qe,backgroundColor:qe,outlineColor:qe,fill:qe,stroke:qe,borderColor:qe,borderTopColor:qe,borderRightColor:qe,borderBottomColor:qe,borderLeftColor:qe,filter:qm,WebkitFilter:qm},$2=e=>Gfe[e];function V2(e,t){let r=$2(e);return r!==qm&&(r=Un),r.getAnimatableNone?r.getAnimatableNone(t):void 0}const Yfe=new Set(["auto","none","0"]);function qfe(e,t,r){let n=0,o;for(;n<e.length&&!o;){const i=e[n];typeof i=="string"&&!Yfe.has(i)&&es(i).values.length&&(o=e[n]),n++}if(o&&r)for(const i of t)e[i]=V2(r,o)}class Xfe extends _b{constructor(t,r,n,o,i){super(t,r,n,o,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:r,name:n}=this;if(!r||!r.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let d=t[u];if(typeof d=="string"&&(d=d.trim(),Cb(d))){const f=k2(d,r.current);f!==void 0&&(t[u]=f),u===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!_2.has(n)||t.length!==2)return;const[o,i]=t,a=k1(o),s=k1(i),l=v1(o),c=v1(i);if(l!==c&&jn[n]){this.needsMeasurement=!0;return}if(a!==s)if(O1(a)&&O1(s))for(let u=0;u<t.length;u++){const d=t[u];typeof d=="string"&&(t[u]=parseFloat(d))}else jn[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:r}=this,n=[];for(let o=0;o<t.length;o++)(t[o]===null||Wfe(t[o]))&&n.push(o);n.length&&qfe(t,n,r)}measureInitialState(){const{element:t,unresolvedKeyframes:r,name:n}=this;if(!t||!t.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=jn[n](t.measureViewportBox(),window.getComputedStyle(t.current)),r[0]=this.measuredOrigin;const o=r[r.length-1];o!==void 0&&t.getValue(n,o).jump(o,!1)}measureEndState(){const{element:t,name:r,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const o=t.getValue(r);o&&o.jump(this.measuredOrigin,!1);const i=n.length-1,a=n[i];n[i]=jn[r](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([s,l])=>{t.getValue(s).set(l)}),this.resolveNoneKeyframes()}}const Zfe=new Set(["opacity","clipPath","filter","transform"]);function F2(e,t,r){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let n=document;const o=r?.[e]??n.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e).filter(n=>n!=null)}const B2=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Xm(e){return XR(e)&&"offsetHeight"in e}const{schedule:$b}=c2(queueMicrotask,!1),mr={x:!1,y:!1};function W2(){return mr.x||mr.y}function Qfe(e){return e==="x"||e==="y"?mr[e]?null:(mr[e]=!0,()=>{mr[e]=!1}):mr.x||mr.y?null:(mr.x=mr.y=!0,()=>{mr.x=mr.y=!1})}function z2(e,t){const r=F2(e),n=new AbortController,o={passive:!0,...t,signal:n.signal};return[r,o,()=>n.abort()]}function Jfe(e){return!(e.pointerType==="touch"||W2())}function epe(e,t,r={}){const[n,o,i]=z2(e,r);return n.forEach(a=>{let s=!1,l=!1,c;const u=()=>{a.removeEventListener("pointerleave",v)},d=g=>{c&&(c(g),c=void 0),u()},f=g=>{s=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=!1,d(g))},h=()=>{s=!0,window.addEventListener("pointerup",f,o),window.addEventListener("pointercancel",f,o)},v=g=>{if(g.pointerType!=="touch"){if(s){l=!0;return}d(g)}},m=g=>{if(!Jfe(g))return;l=!1;const y=t(a,g);typeof y=="function"&&(c=y,a.addEventListener("pointerleave",v,o))};a.addEventListener("pointerenter",m,o),a.addEventListener("pointerdown",h,o)}),i}const K2=(e,t)=>t?e===t?!0:K2(e,t.parentElement):!1,Vb=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,tpe=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function rpe(e){return tpe.has(e.tagName)||e.isContentEditable===!0}const npe=new Set(["INPUT","SELECT","TEXTAREA"]);function ope(e){return npe.has(e.tagName)||e.isContentEditable===!0}const Zl=new WeakSet;function _1(e){return t=>{t.key==="Enter"&&e(t)}}function lh(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const ipe=(e,t)=>{const r=e.currentTarget;if(!r)return;const n=_1(()=>{if(Zl.has(r))return;lh(r,"down");const o=_1(()=>{lh(r,"up")}),i=()=>lh(r,"cancel");r.addEventListener("keyup",o,t),r.addEventListener("blur",i,t)});r.addEventListener("keydown",n,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",n),t)};function N1(e){return Vb(e)&&!W2()}const j1=new WeakSet;function ape(e,t,r={}){const[n,o,i]=z2(e,r),a=s=>{const l=s.currentTarget;if(!N1(s)||j1.has(s))return;Zl.add(l),r.stopPropagation&&j1.add(s);const c=t(l,s),u=(h,v)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),Zl.has(l)&&Zl.delete(l),N1(h)&&typeof c=="function"&&c(h,{success:v})},d=h=>{u(h,l===window||l===document||r.useGlobalTarget||K2(l,h.target))},f=h=>{u(h,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",f,o)};return n.forEach(s=>{(r.useGlobalTarget?window:s).addEventListener("pointerdown",a,o),Xm(s)&&(s.addEventListener("focus",c=>ipe(c,o)),!rpe(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),i}function Fb(e){return XR(e)&&"ownerSVGElement"in e}const Ql=new WeakMap;let Jl;const U2=(e,t,r)=>(n,o)=>o&&o[0]?o[0][e+"Size"]:Fb(n)&&"getBBox"in n?n.getBBox()[t]:n[r],spe=U2("inline","width","offsetWidth"),lpe=U2("block","height","offsetHeight");function cpe({target:e,borderBoxSize:t}){Ql.get(e)?.forEach(r=>{r(e,{get width(){return spe(e,t)},get height(){return lpe(e,t)}})})}function upe(e){e.forEach(cpe)}function dpe(){typeof ResizeObserver>"u"||(Jl=new ResizeObserver(upe))}function fpe(e,t){Jl||dpe();const r=F2(e);return r.forEach(n=>{let o=Ql.get(n);o||(o=new Set,Ql.set(n,o)),o.add(t),Jl?.observe(n)}),()=>{r.forEach(n=>{const o=Ql.get(n);o?.delete(t),o?.size||Jl?.unobserve(n)})}}const ec=new Set;let pi;function ppe(){pi=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};ec.forEach(t=>t(e))},window.addEventListener("resize",pi)}function hpe(e){return ec.add(e),pi||ppe(),()=>{ec.delete(e),!ec.size&&typeof pi=="function"&&(window.removeEventListener("resize",pi),pi=void 0)}}function I1(e,t){return typeof e=="function"?hpe(e):fpe(e,t)}function mpe(e){return Fb(e)&&e.tagName==="svg"}const vpe=[...L2,qe,Un],gpe=e=>vpe.find(R2(e)),R1=()=>({translate:0,scale:1,origin:0,originPoint:0}),hi=()=>({x:R1(),y:R1()}),L1=()=>({min:0,max:0}),nt=()=>({x:L1(),y:L1()}),ype=new WeakMap;function Fd(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function ts(e){return typeof e=="string"||Array.isArray(e)}const Bb=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Wb=["initial",...Bb];function Bd(e){return Fd(e.animate)||Wb.some(t=>ts(e[t]))}function H2(e){return!!(Bd(e)||e.variants)}function bpe(e,t,r){for(const n in t){const o=t[n],i=r[n];if(Ct(o))e.addValue(n,o);else if(Ct(i))e.addValue(n,ji(o,{owner:e}));else if(i!==o)if(e.hasValue(n)){const a=e.getValue(n);a.liveStyle===!0?a.jump(o):a.hasAnimated||a.set(o)}else{const a=e.getStaticValue(n);e.addValue(n,ji(a!==void 0?a:o,{owner:e}))}}for(const n in r)t[n]===void 0&&e.removeValue(n);return t}const Zm={current:null},G2={current:!1},xpe=typeof window<"u";function wpe(){if(G2.current=!0,!!xpe)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Zm.current=e.matches;e.addEventListener("change",t),t()}else Zm.current=!1}const $1=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let hu={};function Y2(e){hu=e}function Spe(){return hu}class Ppe{scrapeMotionValuesFromProps(t,r,n){return{}}constructor({parent:t,props:r,presenceContext:n,reducedMotionConfig:o,skipAnimations:i,blockInitialAnimation:a,visualState:s},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=_b,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=Nt.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,_e.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=s;this.latestValues=c,this.baseTarget={...c},this.initialValues=r.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=r,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.skipAnimationsConfig=i,this.options=l,this.blockInitialAnimation=!!a,this.isControllingVariants=Bd(r),this.isVariantNode=H2(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(r,{},this);for(const h in f){const v=f[h];c[h]!==void 0&&Ct(v)&&v.set(c[h])}}mount(t){if(this.hasBeenMounted)for(const r in this.initialValues)this.values.get(r)?.jump(this.initialValues[r]),this.latestValues[r]=this.initialValues[r];this.current=t,ype.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,n)=>this.bindToMotionValue(n,r)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(G2.current||wpe(),this.shouldReduceMotion=Zm.current),process.env.NODE_ENV!=="production"&&wb(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Kn(this.notifyUpdate),Kn(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const r=this.features[t];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,r){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),r.accelerate&&Zfe.has(t)&&this.current instanceof HTMLElement){const{factory:a,keyframes:s,times:l,ease:c,duration:u}=r.accelerate,d=new A2({element:this.current,name:t,keyframes:s,times:l,ease:c,duration:cr(u)}),f=a(d);this.valueSubscriptions.set(t,()=>{f(),d.cancel()});return}const n=ra.has(t);n&&this.onBindTransform&&this.onBindTransform();const o=r.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&_e.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{o(),i&&i(),r.owner&&r.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in hu){const r=hu[t];if(!r)continue;const{isEnabled:n,Feature:o}=r;if(!this.features[t]&&o&&n(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):nt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let n=0;n<$1.length;n++){const o=$1[n];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,a=t[i];a&&(this.propEventSubscriptions[o]=this.on(o,a))}this.prevMotionValues=bpe(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(t),()=>r.variantChildren.delete(t)}addValue(t,r){const n=this.values.get(t);r!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,r),this.values.set(t,r),this.latestValues[t]=r.get())}removeValue(t){this.values.delete(t);const r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&r!==void 0&&(n=ji(r===null?void 0:r,{owner:this}),this.addValue(t,n)),n}readValue(t,r){let n=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return n!=null&&(typeof n=="string"&&(qR(n)||ZR(n))?n=parseFloat(n):!gpe(n)&&Un.test(r)&&(n=V2(t,r)),this.setBaseTarget(t,Ct(n)?n.get():n)),Ct(n)?n.get():n}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){const{initial:r}=this.props;let n;if(typeof r=="string"||typeof r=="object"){const i=Ib(this.props,r,this.presenceContext?.custom);i&&(n=i[t])}if(r&&n!==void 0)return n;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Ct(o)?o:this.initialValues[t]!==void 0&&n===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new xb),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}scheduleRenderMicrotask(){$b.render(this.render)}}class q2 extends Ppe{constructor(){super(...arguments),this.KeyframeResolver=Xfe}sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){const n=t.style;return n?n[r]:void 0}removeValueFromRenderState(t,{vars:r,style:n}){delete r[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ct(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}}class eo{constructor(t){this.isMounted=!1,this.node=t}update(){}}function X2({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function Cpe({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Ope(e,t){if(!t)return e;const r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function ch(e){return e===void 0||e===1}function Qm({scale:e,scaleX:t,scaleY:r}){return!ch(e)||!ch(t)||!ch(r)}function fo(e){return Qm(e)||Z2(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Z2(e){return V1(e.x)||V1(e.y)}function V1(e){return e&&e!=="0%"}function mu(e,t,r){const n=e-r,o=t*n;return r+o}function F1(e,t,r,n,o){return o!==void 0&&(e=mu(e,o,n)),mu(e,r,n)+t}function Jm(e,t=0,r=1,n,o){e.min=F1(e.min,t,r,n,o),e.max=F1(e.max,t,r,n,o)}function Q2(e,{x:t,y:r}){Jm(e.x,t.translate,t.scale,t.originPoint),Jm(e.y,r.translate,r.scale,r.originPoint)}const B1=.999999999999,W1=1.0000000000001;function Epe(e,t,r,n=!1){const o=r.length;if(!o)return;t.x=t.y=1;let i,a;for(let s=0;s<o;s++){i=r[s],a=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(n&&i.options.layoutScroll&&i.scroll&&i!==i.root&&vi(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Q2(e,a)),n&&fo(i.latestValues)&&vi(e,i.latestValues))}t.x<W1&&t.x>B1&&(t.x=1),t.y<W1&&t.y>B1&&(t.y=1)}function mi(e,t){e.min=e.min+t,e.max=e.max+t}function z1(e,t,r,n,o=.5){const i=Be(e.min,e.max,o);Jm(e,t,r,i,n)}function vi(e,t){z1(e.x,t.x,t.scaleX,t.scale,t.originX),z1(e.y,t.y,t.scaleY,t.scale,t.originY)}function J2(e,t){return X2(Ope(e.getBoundingClientRect(),t))}function Ape(e,t,r){const n=J2(e,r),{scroll:o}=t;return o&&(mi(n.x,o.offset.x),mi(n.y,o.offset.y)),n}const Tpe={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Mpe=ta.length;function kpe(e,t,r){let n="",o=!0;for(let i=0;i<Mpe;i++){const a=ta[i],s=e[a];if(s===void 0)continue;let l=!0;if(typeof s=="number")l=s===(a.startsWith("scale")?1:0);else{const c=parseFloat(s);l=a.startsWith("scale")?c===1:c===0}if(!l||r){const c=B2(s,Lb[a]);if(!l){o=!1;const u=Tpe[a]||a;n+=`${u}(${c}) `}r&&(t[a]=c)}}return n=n.trim(),r?n=r(t,o?"":n):o&&(n="none"),n}function zb(e,t,r){const{style:n,vars:o,transformOrigin:i}=e;let a=!1,s=!1;for(const l in t){const c=t[l];if(ra.has(l)){a=!0;continue}else if(d2(l)){o[l]=c;continue}else{const u=B2(c,Lb[l]);l.startsWith("origin")?(s=!0,i[l]=u):n[l]=u}}if(t.transform||(a||r?n.transform=kpe(t,e.transform,r):n.transform&&(n.transform="none")),s){const{originX:l="50%",originY:c="50%",originZ:u=0}=i;n.transformOrigin=`${l} ${c} ${u}`}}function eL(e,{style:t,vars:r},n,o){const i=e.style;let a;for(a in t)i[a]=t[a];o?.applyProjectionStyles(i,n);for(a in r)i.setProperty(a,r[a])}function K1(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ga={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Q.test(e))e=parseFloat(e);else return e;const r=K1(e,t.target.x),n=K1(e,t.target.y);return`${r}% ${n}%`}},Dpe={correct:(e,{treeScale:t,projectionDelta:r})=>{const n=e,o=Un.parse(e);if(o.length>5)return n;const i=Un.createTransformer(e),a=typeof o[0]!="number"?1:0,s=r.x.scale*t.x,l=r.y.scale*t.y;o[0+a]/=s,o[1+a]/=l;const c=Be(s,l,.5);return typeof o[2+a]=="number"&&(o[2+a]/=c),typeof o[3+a]=="number"&&(o[3+a]/=c),i(o)}},ev={borderRadius:{...ga,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ga,borderTopRightRadius:ga,borderBottomLeftRadius:ga,borderBottomRightRadius:ga,boxShadow:Dpe};function tL(e,{layout:t,layoutId:r}){return ra.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!ev[e]||e==="opacity")}function Kb(e,t,r){const n=e.style,o=t?.style,i={};if(!n)return i;for(const a in n)(Ct(n[a])||o&&Ct(o[a])||tL(a,e)||r?.getValue(a)?.liveStyle!==void 0)&&(i[a]=n[a]);return i}function _pe(e){return window.getComputedStyle(e)}class Npe extends q2{constructor(){super(...arguments),this.type="html",this.renderInstance=eL}readValueFromInstance(t,r){if(ra.has(r))return this.projection?.isProjecting?Fm(r):Zde(t,r);{const n=_pe(t),o=(d2(r)?n.getPropertyValue(r):n[r])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:r}){return J2(t,r)}build(t,r,n){zb(t,r,n.transformTemplate)}scrapeMotionValuesFromProps(t,r,n){return Kb(t,r,n)}}const jpe={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ipe={offset:"strokeDashoffset",array:"strokeDasharray"};function Rpe(e,t,r=1,n=0,o=!0){e.pathLength=1;const i=o?jpe:Ipe;e[i.offset]=`${-n}`,e[i.array]=`${t} ${r}`}const Lpe=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function rL(e,{attrX:t,attrY:r,attrScale:n,pathLength:o,pathSpacing:i=1,pathOffset:a=0,...s},l,c,u){if(zb(e,s,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??"fill-box",delete d.transformBox);for(const h of Lpe)d[h]!==void 0&&(f[h]=d[h],delete d[h]);t!==void 0&&(d.x=t),r!==void 0&&(d.y=r),n!==void 0&&(d.scale=n),o!==void 0&&Rpe(d,o,i,a,!1)}const nL=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),oL=e=>typeof e=="string"&&e.toLowerCase()==="svg";function $pe(e,t,r,n){eL(e,t,void 0,n);for(const o in t.attrs)e.setAttribute(nL.has(o)?o:Rb(o),t.attrs[o])}function iL(e,t,r){const n=Kb(e,t,r);for(const o in e)if(Ct(e[o])||Ct(t[o])){const i=ta.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;n[i]=e[o]}return n}class Vpe extends q2{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=nt}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(ra.has(r)){const n=$2(r);return n&&n.default||0}return r=nL.has(r)?r:Rb(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,n){return iL(t,r,n)}build(t,r,n){rL(t,r,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,r,n,o){$pe(t,r,n,o)}mount(t){this.isSVGTag=oL(t.tagName),super.mount(t)}}const Fpe=Wb.length;function aL(e){if(!e)return;if(!e.isControllingVariants){const r=e.parent?aL(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}const t={};for(let r=0;r<Fpe;r++){const n=Wb[r],o=e.props[n];(ts(o)||o===!1)&&(t[n]=o)}return t}function sL(e,t){if(!Array.isArray(t))return!1;const r=t.length;if(r!==e.length)return!1;for(let n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}const Bpe=[...Bb].reverse(),Wpe=Bb.length;function zpe(e){return t=>Promise.all(t.map(({animation:r,options:n})=>Ffe(e,r,n)))}function Kpe(e){let t=zpe(e),r=U1(),n=!0;const o=l=>(c,u)=>{const d=Pi(e,u,l==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:f,transitionEnd:h,...v}=d;c={...c,...v,...h}}return c};function i(l){t=l(e)}function a(l){const{props:c}=e,u=aL(e.parent)||{},d=[],f=new Set;let h={},v=1/0;for(let g=0;g<Wpe;g++){const y=Bpe[g],x=r[y],w=c[y]!==void 0?c[y]:u[y],S=ts(w),P=y===l?x.isActive:null;P===!1&&(v=g);let C=w===u[y]&&w!==c[y]&&S;if(C&&n&&e.manuallyAnimateOnMount&&(C=!1),x.protectedKeys={...h},!x.isActive&&P===null||!w&&!x.prevProp||Fd(w)||typeof w=="boolean")continue;if(y==="exit"&&x.isActive&&P!==!0){x.prevResolvedValues&&(h={...h,...x.prevResolvedValues});continue}const E=Upe(x.prevProp,w);let A=E||y===l&&x.isActive&&!C&&S||g>v&&S,T=!1;const M=Array.isArray(w)?w:[w];let _=M.reduce(o(y),{});P===!1&&(_={});const{prevResolvedValues:k={}}=x,N={...k,..._},R=F=>{A=!0,f.has(F)&&(T=!0,f.delete(F)),x.needsAnimating[F]=!0;const j=e.getValue(F);j&&(j.liveStyle=!1)};for(const F in N){const j=_[F],L=k[F];if(h.hasOwnProperty(F))continue;let H=!1;Hm(j)&&Hm(L)?H=!sL(j,L):H=j!==L,H?j!=null?R(F):f.add(F):j!==void 0&&f.has(F)?R(F):x.protectedKeys[F]=!0}x.prevProp=w,x.prevResolvedValues=_,x.isActive&&(h={...h,..._}),n&&e.blockInitialAnimation&&(A=!1);const z=C&&E;A&&(!z||T)&&d.push(...M.map(F=>{const j={type:y};if(typeof F=="string"&&n&&!z&&e.manuallyAnimateOnMount&&e.parent){const{parent:L}=e,H=Pi(L,F);if(L.enteringChildren&&H){const{delayChildren:re}=H.transition||{};j.delay=M2(L.enteringChildren,e,re)}}return{animation:F,options:j}}))}if(f.size){const g={};if(typeof c.initial!="boolean"){const y=Pi(e,Array.isArray(c.initial)?c.initial[0]:c.initial);y&&y.transition&&(g.transition=y.transition)}f.forEach(y=>{const x=e.getBaseTarget(y),w=e.getValue(y);w&&(w.liveStyle=!0),g[y]=x??null}),d.push({animation:g})}let m=!!d.length;return n&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(m=!1),n=!1,m?t(d):Promise.resolve()}function s(l,c){if(r[l].isActive===c)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(l,c)),r[l].isActive=c;const u=a(l);for(const d in r)r[d].protectedKeys={};return u}return{animateChanges:a,setActive:s,setAnimateFunction:i,getState:()=>r,reset:()=>{r=U1()}}}function Upe(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!sL(t,e):!1}function ao(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function U1(){return{animate:ao(!0),whileInView:ao(),whileHover:ao(),whileTap:ao(),whileDrag:ao(),whileFocus:ao(),exit:ao()}}function H1(e,t){e.min=t.min,e.max=t.max}function hr(e,t){H1(e.x,t.x),H1(e.y,t.y)}function G1(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const lL=1e-4,Hpe=1-lL,Gpe=1+lL,cL=.01,Ype=0-cL,qpe=0+cL;function jt(e){return e.max-e.min}function Xpe(e,t,r){return Math.abs(e-t)<=r}function Y1(e,t,r,n=.5){e.origin=n,e.originPoint=Be(t.min,t.max,e.origin),e.scale=jt(r)/jt(t),e.translate=Be(r.min,r.max,e.origin)-e.originPoint,(e.scale>=Hpe&&e.scale<=Gpe||isNaN(e.scale))&&(e.scale=1),(e.translate>=Ype&&e.translate<=qpe||isNaN(e.translate))&&(e.translate=0)}function Ma(e,t,r,n){Y1(e.x,t.x,r.x,n?n.originX:void 0),Y1(e.y,t.y,r.y,n?n.originY:void 0)}function q1(e,t,r){e.min=r.min+t.min,e.max=e.min+jt(t)}function Zpe(e,t,r){q1(e.x,t.x,r.x),q1(e.y,t.y,r.y)}function X1(e,t,r){e.min=t.min-r.min,e.max=e.min+jt(t)}function vu(e,t,r){X1(e.x,t.x,r.x),X1(e.y,t.y,r.y)}function Z1(e,t,r,n,o){return e-=t,e=mu(e,1/r,n),o!==void 0&&(e=mu(e,1/o,n)),e}function Qpe(e,t=0,r=1,n=.5,o,i=e,a=e){if(Vr.test(t)&&(t=parseFloat(t),t=Be(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=Be(i.min,i.max,n);e===i&&(s-=t),e.min=Z1(e.min,t,r,s,o),e.max=Z1(e.max,t,r,s,o)}function Q1(e,t,[r,n,o],i,a){Qpe(e,t[r],t[n],t[o],t.scale,i,a)}const Jpe=["x","scaleX","originX"],ehe=["y","scaleY","originY"];function J1(e,t,r,n){Q1(e.x,t,Jpe,r?r.x:void 0,n?n.x:void 0),Q1(e.y,t,ehe,r?r.y:void 0,n?n.y:void 0)}function eO(e){return e.translate===0&&e.scale===1}function uL(e){return eO(e.x)&&eO(e.y)}function tO(e,t){return e.min===t.min&&e.max===t.max}function the(e,t){return tO(e.x,t.x)&&tO(e.y,t.y)}function rO(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function dL(e,t){return rO(e.x,t.x)&&rO(e.y,t.y)}function nO(e){return jt(e.x)/jt(e.y)}function oO(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function kr(e){return[e("x"),e("y")]}function rhe(e,t,r){let n="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=r?.z||0;if((o||i||a)&&(n=`translate3d(${o}px, ${i}px, ${a}px) `),(t.x!==1||t.y!==1)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),r){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:h,skewY:v}=r;c&&(n=`perspective(${c}px) ${n}`),u&&(n+=`rotate(${u}deg) `),d&&(n+=`rotateX(${d}deg) `),f&&(n+=`rotateY(${f}deg) `),h&&(n+=`skewX(${h}deg) `),v&&(n+=`skewY(${v}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return(s!==1||l!==1)&&(n+=`scale(${s}, ${l})`),n||"none"}const fL=["TopLeft","TopRight","BottomLeft","BottomRight"],nhe=fL.length,iO=e=>typeof e=="string"?parseFloat(e):e,aO=e=>typeof e=="number"||Q.test(e);function ohe(e,t,r,n,o,i){o?(e.opacity=Be(0,r.opacity??1,ihe(n)),e.opacityExit=Be(t.opacity??1,0,ahe(n))):i&&(e.opacity=Be(t.opacity??1,r.opacity??1,n));for(let a=0;a<nhe;a++){const s=`border${fL[a]}Radius`;let l=sO(t,s),c=sO(r,s);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||aO(l)===aO(c)?(e[s]=Math.max(Be(iO(l),iO(c),n),0),(Vr.test(c)||Vr.test(l))&&(e[s]+="%")):e[s]=c}(t.rotate||r.rotate)&&(e.rotate=Be(t.rotate||0,r.rotate||0,n))}function sO(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const ihe=pL(0,.5,i2),ahe=pL(.5,.95,lr);function pL(e,t,r){return n=>n<e?0:n>t?1:r(Qa(e,t,n))}function she(e,t,r){const n=Ct(e)?e:ji(e);return n.start(jb("",n,t,r)),n.animation}function rs(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r)}const lhe=(e,t)=>e.depth-t.depth;class che{constructor(){this.children=[],this.isDirty=!1}add(t){yb(this.children,t),this.isDirty=!0}remove(t){uu(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(lhe),this.isDirty=!1,this.children.forEach(t)}}function uhe(e,t){const r=Nt.now(),n=({timestamp:o})=>{const i=o-r;i>=t&&(Kn(n),e(i-t))};return _e.setup(n,!0),()=>Kn(n)}function tc(e){return Ct(e)?e.get():e}class dhe{constructor(){this.members=[]}add(t){yb(this.members,t);for(let r=this.members.length-1;r>=0;r--){const n=this.members[r];if(n===t||n===this.lead||n===this.prevLead)continue;const o=n.instance;o&&o.isConnected===!1&&n.isPresent!==!1&&!n.snapshot&&uu(this.members,n)}t.scheduleRender()}remove(t){if(uu(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){const r=this.members.findIndex(o=>t===o);if(r===0)return!1;let n;for(let o=r;o>=0;o--){const i=this.members[o],a=i.instance;if(i.isPresent!==!1&&(!a||a.isConnected!==!1)){n=i;break}}return n?(this.promote(n),!0):!1}promote(t,r){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender();const o=n.options.layoutDependency,i=t.options.layoutDependency;if(!(o!==void 0&&i!==void 0&&o===i)){const l=n.instance;l&&l.isConnected===!1&&!n.snapshot||(t.resumeFrom=n,r&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0))}const{crossfade:s}=t.options;s===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:r,resumingFrom:n}=t;r.onExitComplete&&r.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const rc={hasAnimatedSinceResize:!0,hasEverUpdated:!1},uh=["","X","Y","Z"],fhe=1e3;let phe=0;function dh(e,t,r,n){const{latestValues:o}=t;o[e]&&(r[e]=o[e],t.setStaticValue(e,0),n&&(n[e]=0))}function hL(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const r=j2(t);if(window.MotionHasOptimisedAnimation(r,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",_e,!(o||i))}const{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&hL(n)}function mL({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:o}){return class{constructor(a={},s=t?.()){this.id=phe++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(vhe),this.nodes.forEach(xhe),this.nodes.forEach(whe),this.nodes.forEach(ghe)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new che)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new xb),this.eventHandlers.get(a).add(s)}notifyListeners(a,...s){const l=this.eventHandlers.get(a);l&&l.notify(...s)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=Fb(a)&&!mpe(a),this.instance=a;const{layoutId:s,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||s)&&(this.isLayoutDirty=!0),e){let u,d=0;const f=()=>this.root.updateBlockedByResize=!1;_e.read(()=>{d=window.innerWidth}),e(a,()=>{const h=window.innerWidth;h!==d&&(d=h,this.root.updateBlockedByResize=!0,u&&u(),u=uhe(f,250),rc.hasAnimatedSinceResize&&(rc.hasAnimatedSinceResize=!1,this.nodes.forEach(uO)))})}s&&this.root.registerSharedNode(s,this),this.options.animate!==!1&&c&&(s||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||c.getDefaultTransition()||Ehe,{onLayoutAnimationStart:m,onLayoutAnimationComplete:g}=c.getProps(),y=!this.targetLayout||!dL(this.targetLayout,h),x=!d&&f;if(this.options.layoutRoot||this.resumeFrom||x||d&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...Nb(v,"layout"),onPlay:m,onComplete:g};(c.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(u,x)}else d||uO(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Kn(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(She),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&hL(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:s,layout:l}=this.options;if(s===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(lO);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(cO);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(bhe),this.nodes.forEach(hhe),this.nodes.forEach(mhe)):this.nodes.forEach(cO),this.clearAllSnapshots();const s=Nt.now();yt.delta=Ur(0,1e3/60,s-yt.timestamp),yt.timestamp=s,yt.isProcessing=!0,rh.update.process(yt),rh.preRender.process(yt),rh.render.process(yt),yt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,$b.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(yhe),this.sharedNodes.forEach(Phe)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,_e.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){_e.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!jt(this.snapshot.measuredBox.x)&&!jt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=nt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(s=!1),s&&this.instance){const l=n(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:l,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!uL(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;a&&this.instance&&(s||fo(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const s=this.measurePageBox();let l=this.removeElementScroll(s);return a&&(l=this.removeTransform(l)),Ahe(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return nt();const s=a.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(The))){const{scroll:c}=this.root;c&&(mi(s.x,c.offset.x),mi(s.y,c.offset.y))}return s}removeElementScroll(a){const s=nt();if(hr(s,a),this.scroll?.wasRoot)return s;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:d}=c;c!==this.root&&u&&d.layoutScroll&&(u.wasRoot&&hr(s,a),mi(s.x,u.offset.x),mi(s.y,u.offset.y))}return s}applyTransform(a,s=!1){const l=nt();hr(l,a);for(let c=0;c<this.path.length;c++){const u=this.path[c];!s&&u.options.layoutScroll&&u.scroll&&u!==u.root&&vi(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),fo(u.latestValues)&&vi(l,u.latestValues)}return fo(this.latestValues)&&vi(l,this.latestValues),l}removeTransform(a){const s=nt();hr(s,a);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!fo(c.latestValues))continue;Qm(c.latestValues)&&c.updateSnapshot();const u=nt(),d=c.measurePageBox();hr(u,d),J1(s,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return fo(this.latestValues)&&J1(s,this.latestValues),s}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==yt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){const s=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=s.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=s.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=s.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==s;if(!(a||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!this.layout||!(u||d))return;this.resolvedRelativeTargetAt=yt.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=nt(),this.targetWithTransforms=nt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Zpe(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):hr(this.target,this.layout.layoutBox),Q2(this.target,this.targetDelta)):hr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Qm(this.parent.latestValues)||Z2(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(a,s,l){this.relativeParent=a,this.linkedParentVersion=a.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=nt(),this.relativeTargetOrigin=nt(),vu(this.relativeTargetOrigin,s,l),hr(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const a=this.getLead(),s=!!this.resumingFrom||this!==a;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),s&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===yt.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;hr(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;Epe(this.layoutCorrected,this.treeScale,this.path,s),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=nt());const{target:h}=a;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(G1(this.prevProjectionDelta.x,this.projectionDelta.x),G1(this.prevProjectionDelta.y,this.projectionDelta.y)),Ma(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!oO(this.projectionDelta.x,this.prevProjectionDelta.x)||!oO(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){if(this.options.visualElement?.scheduleRender(),a){const s=this.getStack();s&&s.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=hi(),this.projectionDelta=hi(),this.projectionDeltaWithTransform=hi()}setAnimationOrigin(a,s=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=hi();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const f=nt(),h=l?l.source:void 0,v=this.layout?this.layout.source:void 0,m=h!==v,g=this.getStack(),y=!g||g.members.length<=1,x=!!(m&&!y&&this.options.crossfade===!0&&!this.path.some(Ohe));this.animationProgress=0;let w;this.mixTargetDelta=S=>{const P=S/1e3;dO(d.x,a.x,P),dO(d.y,a.y,P),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(vu(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Che(this.relativeTarget,this.relativeTargetOrigin,f,P),w&&the(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=nt()),hr(w,this.relativeTarget)),m&&(this.animationValues=u,ohe(u,c,this.latestValues,P,x,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Kn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=_e.update(()=>{rc.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=ji(0)),this.currentAnimation=she(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:s=>{this.mixTargetDelta(s),a.onUpdate&&a.onUpdate(s)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(fhe),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:c,latestValues:u}=a;if(!(!s||!l||!c)){if(this!==a&&this.layout&&c&&vL(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||nt();const d=jt(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+d;const f=jt(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+f}hr(s,l),vi(s,u),Ma(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new dhe),this.sharedNodes.get(a).add(s);const c=s.options.initialPromotionConfig;s.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(s):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){const{layoutId:a}=this.options;return a?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:a}=this.options;return a?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:l}=a;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(s=!0),!s)return;const c={};l.z&&dh("z",a,c,this.animationValues);for(let u=0;u<uh.length;u++)dh(`rotate${uh[u]}`,a,c,this.animationValues),dh(`skew${uh[u]}`,a,c,this.animationValues);a.render();for(const u in c)a.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);a.scheduleRender()}applyProjectionStyles(a,s){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=tc(s?.pointerEvents)||"",a.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=tc(s?.pointerEvents)||""),this.hasProjected&&!fo(this.latestValues)&&(a.transform=l?l({},""):"none",this.hasProjected=!1);return}a.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=rhe(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),a.transform=d;const{x:f,y:h}=this.projectionDelta;a.transformOrigin=`${f.origin*100}% ${h.origin*100}% 0`,c.animationValues?a.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:a.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const v in ev){if(u[v]===void 0)continue;const{correct:m,applyTo:g,isCSSVariable:y}=ev[v],x=d==="none"?u[v]:m(u[v],c);if(g){const w=g.length;for(let S=0;S<w;S++)a[g[S]]=x}else y?this.options.visualElement.renderState.vars[v]=x:a[v]=x}this.options.layoutId&&(a.pointerEvents=c===this?tc(s?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>a.currentAnimation?.stop()),this.root.nodes.forEach(lO),this.root.sharedNodes.clear()}}}function hhe(e){e.updateLayout()}function mhe(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:n}=e.layout,{animationType:o}=e.options,i=t.source!==e.layout.source;o==="size"?kr(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],f=jt(d);d.min=r[u].min,d.max=d.min+f}):vL(o,t.layoutBox,r)&&kr(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],f=jt(r[u]);d.max=d.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+f)});const a=hi();Ma(a,r,t.layoutBox);const s=hi();i?Ma(s,e.applyTransform(n,!0),t.measuredBox):Ma(s,r,t.layoutBox);const l=!uL(a);let c=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:d,layout:f}=u;if(d&&f){const h=nt();vu(h,t.layoutBox,d.layoutBox);const v=nt();vu(v,r,f.layoutBox),dL(h,v)||(c=!0),u.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=h,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:s,layoutDelta:a,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function vhe(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function ghe(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function yhe(e){e.clearSnapshot()}function lO(e){e.clearMeasurements()}function cO(e){e.isLayoutDirty=!1}function bhe(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function uO(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function xhe(e){e.resolveTargetDelta()}function whe(e){e.calcProjection()}function She(e){e.resetSkewAndRotation()}function Phe(e){e.removeLeadSnapshot()}function dO(e,t,r){e.translate=Be(t.translate,0,r),e.scale=Be(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function fO(e,t,r,n){e.min=Be(t.min,r.min,n),e.max=Be(t.max,r.max,n)}function Che(e,t,r,n){fO(e.x,t.x,r.x,n),fO(e.y,t.y,r.y,n)}function Ohe(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Ehe={duration:.45,ease:[.4,0,.1,1]},pO=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),hO=pO("applewebkit/")&&!pO("chrome/")?Math.round:lr;function mO(e){e.min=hO(e.min),e.max=hO(e.max)}function Ahe(e){mO(e.x),mO(e.y)}function vL(e,t,r){return e==="position"||e==="preserve-aspect"&&!Xpe(nO(t),nO(r),.2)}function The(e){return e!==e.root&&e.scroll?.wasRoot}const Mhe=mL({attachResizeListener:(e,t)=>rs(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),fh={current:void 0},gL=mL({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!fh.current){const e=new Mhe({});e.mount(window),e.setOptions({layoutScroll:!0}),fh.current=e}return fh.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Ub=O.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function vO(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function khe(...e){return t=>{let r=!1;const n=e.map(o=>{const i=vO(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():vO(e[o],null)}}}}function Dhe(...e){return p.useCallback(khe(...e),e)}class _he extends p.Component{getSnapshotBeforeUpdate(t){const r=this.props.childRef.current;if(r&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const n=r.offsetParent,o=Xm(n)&&n.offsetWidth||0,i=Xm(n)&&n.offsetHeight||0,a=this.props.sizeRef.current;a.height=r.offsetHeight||0,a.width=r.offsetWidth||0,a.top=r.offsetTop,a.left=r.offsetLeft,a.right=o-a.width-a.left,a.bottom=i-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}}function Nhe({children:e,isPresent:t,anchorX:r,anchorY:n,root:o,pop:i}){const a=O.useId(),s=O.useRef(null),l=O.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:c}=O.useContext(Ub),u=e.props?.ref??e?.ref,d=Dhe(s,u);return O.useInsertionEffect(()=>{const{width:f,height:h,top:v,left:m,right:g,bottom:y}=l.current;if(t||i===!1||!s.current||!f||!h)return;const x=r==="left"?`left: ${m}`:`right: ${g}`,w=n==="bottom"?`bottom: ${y}`:`top: ${v}`;s.current.dataset.motionPopId=a;const S=document.createElement("style");c&&(S.nonce=c);const P=o??document.head;return P.appendChild(S),S.sheet&&S.sheet.insertRule(`
101
101
  [data-motion-pop-id="${a}"] {
102
102
  position: absolute !important;
103
103
  width: ${f}px !important;
@@ -105,4 +105,4 @@ Take a look at the reducer(s) handling this action type: ${h.type}.
105
105
  ${x}px !important;
106
106
  ${w}px !important;
107
107
  }
108
- `),()=>{P.contains(S)&&P.removeChild(S)}},[t]),b.jsx(_he,{isPresent:t,childRef:s,sizeRef:l,pop:i,children:i===!1?e:p.cloneElement(e,{ref:d})})}const jhe=({children:e,initial:t,isPresent:r,onExitComplete:n,custom:o,presenceAffectsLayout:i,mode:a,anchorX:s,anchorY:l,root:c})=>{const u=vb(Ihe),d=O.useId();let f=!0,h=O.useMemo(()=>(f=!1,{id:d,initial:t,isPresent:r,custom:o,onExitComplete:v=>{u.set(v,!0);for(const m of u.values())if(!m)return;n&&n()},register:v=>(u.set(v,!1),()=>u.delete(v))}),[r,u,n]);return i&&f&&(h={...h}),O.useMemo(()=>{u.forEach((v,m)=>u.set(m,!1))},[r]),p.useEffect(()=>{!r&&!u.size&&n&&n()},[r]),e=b.jsx(Nhe,{pop:a==="popLayout",isPresent:r,anchorX:s,anchorY:l,root:c,children:e}),b.jsx(Vd.Provider,{value:h,children:e})};function Ihe(){return new Map}function yL(e=!0){const t=O.useContext(Vd);if(t===null)return[!0,null];const{isPresent:r,onExitComplete:n,register:o}=t,i=O.useId();O.useEffect(()=>{if(e)return o(i)},[e]);const a=O.useCallback(()=>e&&n&&n(i),[i,n,e]);return!r&&n?[!1,a]:[!0]}const $l=e=>e.key||"";function gO(e){const t=[];return O.Children.forEach(e,r=>{O.isValidElement(r)&&t.push(r)}),t}const Rhe=({children:e,custom:t,initial:r=!0,onExitComplete:n,presenceAffectsLayout:o=!0,mode:i="sync",propagate:a=!1,anchorX:s="left",anchorY:l="top",root:c})=>{const[u,d]=yL(a),f=O.useMemo(()=>gO(e),[e]),h=a&&!u?[]:f.map($l),v=O.useRef(!0),m=O.useRef(f),g=vb(()=>new Map),y=O.useRef(new Set),[x,w]=O.useState(f),[S,P]=O.useState(f);YR(()=>{v.current=!1,m.current=f;for(let A=0;A<S.length;A++){const T=$l(S[A]);h.includes(T)?(g.delete(T),y.current.delete(T)):g.get(T)!==!0&&g.set(T,!1)}},[S,h.length,h.join("-")]);const C=[];if(f!==x){let A=[...f];for(let T=0;T<S.length;T++){const M=S[T],_=$l(M);h.includes(_)||(A.splice(T,0,M),C.push(M))}return i==="wait"&&C.length&&(A=C),P(gO(A)),w(f),null}process.env.NODE_ENV!=="production"&&i==="wait"&&S.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:E}=O.useContext(mb);return b.jsx(b.Fragment,{children:S.map(A=>{const T=$l(A),M=a&&!u?!1:f===S||h.includes(T),_=()=>{if(y.current.has(T))return;if(y.current.add(T),g.has(T))g.set(T,!0);else return;let k=!0;g.forEach(N=>{N||(k=!1)}),k&&(E?.(),P(m.current),a&&d?.(),n&&n())};return b.jsx(jhe,{isPresent:M,initial:!v.current||r?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,root:c,onExitComplete:M?void 0:_,anchorX:s,anchorY:l,children:A},T)})})},bL=O.createContext({strict:!1}),yO={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let bO=!1;function Lhe(){if(bO)return;const e={};for(const t in yO)e[t]={isEnabled:r=>yO[t].some(n=>!!r[n])};Y2(e),bO=!0}function xL(){return Lhe(),Spe()}function $he(e){const t=xL();for(const r in e)t[r]={...t[r],...e[r]};Y2(t)}const Vhe=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function gu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Vhe.has(e)}let wL=e=>!gu(e);function Fhe(e){typeof e=="function"&&(wL=t=>t.startsWith("on")?!gu(t):e(t))}try{Fhe(require("@emotion/is-prop-valid").default)}catch{}function Bhe(e,t,r){const n={};for(const o in e)o==="values"&&typeof e.values=="object"||(wL(o)||r===!0&&gu(o)||!t&&!gu(o)||e.draggable&&o.startsWith("onDrag"))&&(n[o]=e[o]);return n}const Wd=O.createContext({});function Whe(e,t){if(Bd(e)){const{initial:r,animate:n}=e;return{initial:r===!1||ts(r)?r:void 0,animate:ts(n)?n:void 0}}return e.inherit!==!1?t:{}}function zhe(e){const{initial:t,animate:r}=Whe(e,O.useContext(Wd));return O.useMemo(()=>({initial:t,animate:r}),[xO(t),xO(r)])}function xO(e){return Array.isArray(e)?e.join(" "):e}const Ub=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function SL(e,t,r){for(const n in t)!Ct(t[n])&&!tL(n,r)&&(e[n]=t[n])}function Khe({transformTemplate:e},t){return O.useMemo(()=>{const r=Ub();return Wb(r,t,e),Object.assign({},r.vars,r.style)},[t])}function Uhe(e,t){const r=e.style||{},n={};return SL(n,r,e),Object.assign(n,Khe(e,t)),n}function Hhe(e,t){const r={},n=Uhe(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=n,r}const PL=()=>({...Ub(),attrs:{}});function Ghe(e,t,r,n){const o=O.useMemo(()=>{const i=PL();return rL(i,t,oL(n),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};SL(i,e.style,e),o.style={...i,...o.style}}return o}const Yhe=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Hb(e){return typeof e!="string"||e.includes("-")?!1:!!(Yhe.indexOf(e)>-1||/[A-Z]/u.test(e))}function qhe(e,t,r,{latestValues:n},o,i=!1,a){const l=(a??Hb(e)?Ghe:Hhe)(t,n,o,e),c=Bhe(t,typeof e=="string",i),u=e!==O.Fragment?{...c,...l,ref:r}:{},{children:d}=t,f=O.useMemo(()=>Ct(d)?d.get():d,[d]);return O.createElement(e,{...u,children:f})}function Xhe({scrapeMotionValuesFromProps:e,createRenderState:t},r,n,o){return{latestValues:Zhe(r,n,o,e),renderState:t()}}function Zhe(e,t,r,n){const o={},i=n(e,{});for(const f in i)o[f]=tc(i[f]);let{initial:a,animate:s}=e;const l=Bd(e),c=H2(e);t&&c&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let u=r?r.initial===!1:!1;u=u||a===!1;const d=u?s:a;if(d&&typeof d!="boolean"&&!Fd(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const v=jb(e,f[h]);if(v){const{transitionEnd:m,transition:g,...y}=v;for(const x in y){let w=y[x];if(Array.isArray(w)){const S=u?w.length-1:0;w=w[S]}w!==null&&(o[x]=w)}for(const x in m)o[x]=m[x]}}}return o}const CL=e=>(t,r)=>{const n=O.useContext(Wd),o=O.useContext(Vd),i=()=>Xhe(e,t,n,o);return r?i():vb(i)},Qhe=CL({scrapeMotionValuesFromProps:zb,createRenderState:Ub}),Jhe=CL({scrapeMotionValuesFromProps:iL,createRenderState:PL}),eme=Symbol.for("motionComponentSymbol");function tme(e,t,r){const n=O.useRef(r);O.useInsertionEffect(()=>{n.current=r});const o=O.useRef(null);return O.useCallback(i=>{i&&e.onMount?.(i),t&&(i?t.mount(i):t.unmount());const a=n.current;if(typeof a=="function")if(i){const s=a(i);typeof s=="function"&&(o.current=s)}else o.current?(o.current(),o.current=null):a(i);else a&&(a.current=i)},[t])}const OL=O.createContext({});function li(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function rme(e,t,r,n,o,i){const{visualElement:a}=O.useContext(Wd),s=O.useContext(bL),l=O.useContext(Vd),c=O.useContext(Kb),u=c.reducedMotion,d=c.skipAnimations,f=O.useRef(null),h=O.useRef(!1);n=n||s.renderer,!f.current&&n&&(f.current=n(e,{visualState:t,parent:a,props:r,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:i}),h.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const v=f.current,m=O.useContext(OL);v&&!v.projection&&o&&(v.type==="html"||v.type==="svg")&&nme(f.current,r,o,m);const g=O.useRef(!1);O.useInsertionEffect(()=>{v&&g.current&&v.update(r,l)});const y=r[N2],x=O.useRef(!!y&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return YR(()=>{h.current=!0,v&&(g.current=!0,window.MotionIsMounted=!0,v.updateFeatures(),v.scheduleRenderMicrotask(),x.current&&v.animationState&&v.animationState.animateChanges())}),O.useEffect(()=>{v&&(!x.current&&v.animationState&&v.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),x.current=!1),v.enteringChildren=void 0)}),v}function nme(e,t,r,n){const{layoutId:o,layout:i,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:EL(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||s&&li(s),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:n,crossfade:u,layoutScroll:l,layoutRoot:c})}function EL(e){if(e)return e.options.allowProjection!==!1?e.projection:EL(e.parent)}function fh(e,{forwardMotionProps:t=!1,type:r}={},n,o){n&&$he(n);const i=r?r==="svg":Hb(e),a=i?Jhe:Qhe;function s(c,u){let d;const f={...O.useContext(Kb),...c,layoutId:ome(c)},{isStatic:h}=f,v=zhe(c),m=a(c,h);if(!h&&GR){ime(f,n);const g=ame(f);d=g.MeasureLayout,v.visualElement=rme(e,m,f,o,g.ProjectionNode,i)}return b.jsxs(Wd.Provider,{value:v,children:[d&&v.visualElement?b.jsx(d,{visualElement:v.visualElement,...f}):null,qhe(e,c,tme(m,v.visualElement,u),m,h,t,i)]})}s.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=O.forwardRef(s);return l[eme]=e,l}function ome({layoutId:e}){const t=O.useContext(mb).id;return t&&e!==void 0?t+"-"+e:e}function ime(e,t){const r=O.useContext(bL).strict;if(process.env.NODE_ENV!=="production"&&t&&r){const n="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Ji(!1,n,"lazy-strict-mode"):hn(!1,n,"lazy-strict-mode")}}function ame(e){const t=xL(),{drag:r,layout:n}=t;if(!r&&!n)return{};const o={...r,...n};return{MeasureLayout:r?.isEnabled(e)||n?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function sme(e,t){if(typeof Proxy>"u")return fh;const r=new Map,n=(i,a)=>fh(i,a,e,t),o=(i,a)=>(process.env.NODE_ENV!=="production"&&xb(!1,"motion() is deprecated. Use motion.create() instead."),n(i,a));return new Proxy(o,{get:(i,a)=>a==="create"?n:(r.has(a)||r.set(a,fh(a,void 0,e,t)),r.get(a))})}const lme=(e,t)=>t.isSVG??Hb(e)?new Vpe(t):new Npe(t,{allowProjection:e!==O.Fragment});class cme extends eo{constructor(t){super(t),t.animationState||(t.animationState=Kpe(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Fd(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let ume=0;class dme extends eo{constructor(){super(...arguments),this.id=ume++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const o=this.node.animationState.setActive("exit",!t);r&&!t&&o.then(()=>{r(this.id)})}mount(){const{register:t,onExitComplete:r}=this.node.presenceContext||{};r&&r(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const fme={animation:{Feature:cme},exit:{Feature:dme}};function Xs(e){return{point:{x:e.pageX,y:e.pageY}}}const pme=e=>t=>$b(t)&&e(t,Xs(t));function ka(e,t,r,n){return rs(e,t,pme(r),n)}const AL=({current:e})=>e?e.ownerDocument.defaultView:null,wO=(e,t)=>Math.abs(e-t);function hme(e,t){const r=wO(e.x,t.x),n=wO(e.y,t.y);return Math.sqrt(r**2+n**2)}const SO=new Set(["auto","scroll"]);class TL{constructor(t,r,{transformPagePoint:n,contextWindow:o=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:s}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=h=>{this.handleScroll(h.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=hh(this.lastMoveEventInfo,this.history),v=this.startEvent!==null,m=hme(h.offset,{x:0,y:0})>=this.distanceThreshold;if(!v&&!m)return;const{point:g}=h,{timestamp:y}=yt;this.history.push({...g,timestamp:y});const{onStart:x,onMove:w}=this.handlers;v||(x&&x(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,h)},this.handlePointerMove=(h,v)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=ph(v,this.transformPagePoint),_e.update(this.updatePoint,!0)},this.handlePointerUp=(h,v)=>{this.end();const{onEnd:m,onSessionEnd:g,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=hh(h.type==="pointercancel"?this.lastMoveEventInfo:ph(v,this.transformPagePoint),this.history);this.startEvent&&m&&m(h,x),g&&g(h,x)},!$b(t))return;this.dragSnapToOrigin=i,this.handlers=r,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=o||window;const l=Xs(t),c=ph(l,this.transformPagePoint),{point:u}=c,{timestamp:d}=yt;this.history=[{...u,timestamp:d}];const{onSessionStart:f}=r;f&&f(t,hh(c,this.history)),this.removeListeners=Gs(ka(this.contextWindow,"pointermove",this.handlePointerMove),ka(this.contextWindow,"pointerup",this.handlePointerUp),ka(this.contextWindow,"pointercancel",this.handlePointerUp)),s&&this.startScrollTracking(s)}startScrollTracking(t){let r=t.parentElement;for(;r;){const n=getComputedStyle(r);(SO.has(n.overflowX)||SO.has(n.overflowY))&&this.scrollPositions.set(r,{x:r.scrollLeft,y:r.scrollTop}),r=r.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const r=this.scrollPositions.get(t);if(!r)return;const n=t===window,o=n?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:o.x-r.x,y:o.y-r.y};i.x===0&&i.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,o),_e.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Kn(this.updatePoint)}}function ph(e,t){return t?{point:t(e.point)}:e}function PO(e,t){return{x:e.x-t.x,y:e.y-t.y}}function hh({point:e},t){return{point:e,delta:PO(e,ML(t)),offset:PO(e,mme(t)),velocity:vme(t,.1)}}function mme(e){return e[0]}function ML(e){return e[e.length-1]}function vme(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null;const o=ML(e);for(;r>=0&&(n=e[r],!(o.timestamp-n.timestamp>cr(t)));)r--;if(!n)return{x:0,y:0};n===e[0]&&e.length>2&&o.timestamp-n.timestamp>cr(t)*2&&(n=e[1]);const i=ar(o.timestamp-n.timestamp);if(i===0)return{x:0,y:0};const a={x:(o.x-n.x)/i,y:(o.y-n.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function gme(e,{min:t,max:r},n){return t!==void 0&&e<t?e=n?Be(t,e,n.min):Math.max(e,t):r!==void 0&&e>r&&(e=n?Be(r,e,n.max):Math.min(e,r)),e}function CO(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function yme(e,{top:t,left:r,bottom:n,right:o}){return{x:CO(e.x,r,o),y:CO(e.y,t,n)}}function OO(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,n]=[n,r]),{min:r,max:n}}function bme(e,t){return{x:OO(e.x,t.x),y:OO(e.y,t.y)}}function xme(e,t){let r=.5;const n=jt(e),o=jt(t);return o>n?r=Qa(t.min,t.max-n,e.min):n>o&&(r=Qa(e.min,e.max-o,t.min)),Ur(0,1,r)}function wme(e,t){const r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}const ev=.35;function Sme(e=ev){return e===!1?e=0:e===!0&&(e=ev),{x:EO(e,"left","right"),y:EO(e,"top","bottom")}}function EO(e,t,r){return{min:AO(e,t),max:AO(e,r)}}function AO(e,t){return typeof e=="number"?e:e[t]||0}const Pme=new WeakMap;class Cme{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=nt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:r=!1,distanceThreshold:n}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const i=d=>{r&&this.snapToCursor(Xs(d).point),this.stopAnimation()},a=(d,f)=>{const{drag:h,dragPropagation:v,onDragStart:m}=this.getProps();if(h&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Qfe(h),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),kr(y=>{let x=this.getAxisMotionValue(y).get()||0;if(Vr.test(x)){const{projection:w}=this.visualElement;if(w&&w.layout){const S=w.layout.layoutBox[y];S&&(x=jt(S)*(parseFloat(x)/100))}}this.originPoint[y]=x}),m&&_e.update(()=>m(d,f),!1,!0),Hm(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},s=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:h,dragDirectionLock:v,onDirectionLock:m,onDrag:g}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:y}=f;if(v&&this.currentDirection===null){this.currentDirection=Eme(y),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),g&&_e.update(()=>g(d,f),!1,!0)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{const{dragSnapToOrigin:d}=this.getProps();(d||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new TL(t,{onSessionStart:i,onStart:a,onMove:s,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:n,contextWindow:AL(this.visualElement),element:this.visualElement.current})}stop(t,r){const n=t||this.latestPointerEvent,o=r||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!o||!n)return;const{velocity:a}=o;this.startAnimation(a);const{onDragEnd:s}=this.getProps();s&&_e.postRender(()=>s(n,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,r,n){const{drag:o}=this.getProps();if(!n||!Vl(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(a=gme(a,this.constraints[t],this.elastic[t])),i.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:r}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&li(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&n?this.constraints=yme(n.layoutBox,t):this.constraints=!1,this.elastic=Sme(r),o!==this.constraints&&!li(t)&&n&&this.constraints&&!this.hasMutatedConstraints&&kr(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=wme(n.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!li(t))return!1;const n=t.current;hn(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=Ape(n,o.root,this.visualElement.getTransformPagePoint());let a=bme(o.layout.layoutBox,i);if(r){const s=r(Cpe(a));this.hasMutatedConstraints=!!s,s&&(a=X2(s))}return a}startAnimation(t){const{drag:r,dragMomentum:n,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=kr(u=>{if(!Vl(u,r,this.currentDirection))return;let d=l&&l[u]||{};a&&(d={min:0,max:0});const f=o?200:1e6,h=o?40:1e7,v={type:"inertia",velocity:n?t[u]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,v)});return Promise.all(c).then(s)}startAxisValueAnimation(t,r){const n=this.getAxisMotionValue(t);return Hm(this.visualElement,t),n.start(Nb(t,n,0,r,this.visualElement,!1))}stopAnimation(){kr(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const r=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),o=n[r];return o||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){kr(r=>{const{drag:n}=this.getProps();if(!Vl(r,n,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(r);if(o&&o.layout){const{min:a,max:s}=o.layout.layoutBox[r],l=i.get()||0;i.set(t[r]-Be(a,s,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:r}=this.getProps(),{projection:n}=this.visualElement;if(!li(r)||!n||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};kr(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const l=s.get();o[a]=xme({min:l,max:l},this.constraints[a])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),kr(a=>{if(!Vl(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:c}=this.constraints[a];s.set(Be(l,c,o[a]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Pme.set(this.visualElement,this);const t=this.visualElement.current,r=ka(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps(),f=c.target,h=f!==t&&ope(f);u&&d&&!h&&this.start(c)});let n;const o=()=>{const{dragConstraints:c}=this.getProps();li(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),n||(n=Ome(t,c.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,a=i.addEventListener("measure",o);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),_e.read(o);const s=rs(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(kr(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=c[d].translate,f.set(f.get()+c[d].translate))}),this.visualElement.render())}));return()=>{s(),r(),a(),l&&l(),n&&n()}}getProps(){const t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:a=ev,dragMomentum:s=!0}=t;return{...t,drag:r,dragDirectionLock:n,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:s}}}function TO(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Ome(e,t,r){const n=I1(e,TO(r)),o=I1(t,TO(r));return()=>{n(),o()}}function Vl(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function Eme(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}class Ame extends eo{constructor(t){super(t),this.removeGroupControls=lr,this.removeListeners=lr,this.controls=new Cme(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||lr}update(){const{dragControls:t}=this.node.getProps(),{dragControls:r}=this.node.prevProps||{};t!==r&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const mh=e=>(t,r)=>{e&&_e.update(()=>e(t,r),!1,!0)};class Tme extends eo{constructor(){super(...arguments),this.removePointerDownListener=lr}onPointerDown(t){this.session=new TL(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:AL(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:r,onPan:n,onPanEnd:o}=this.node.getProps();return{onSessionStart:mh(t),onStart:mh(r),onMove:mh(n),onEnd:(i,a)=>{delete this.session,o&&_e.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=ka(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let vh=!1;class Mme extends O.Component{componentDidMount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:n,layoutId:o}=this.props,{projection:i}=t;i&&(r.group&&r.group.add(i),n&&n.register&&o&&n.register(i),vh&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),rc.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:r,visualElement:n,drag:o,isPresent:i}=this.props,{projection:a}=n;return a&&(a.isPresent=i,t.layoutDependency!==r&&a.setOptions({...a.options,layoutDependency:r}),vh=!0,o||t.layoutDependency!==r||r===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||_e.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Lb.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:o}=t;vh=!0,o&&(o.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(o),n&&n.deregister&&n.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function kL(e){const[t,r]=yL(),n=O.useContext(mb);return b.jsx(Mme,{...e,layoutGroup:n,switchLayoutGroup:O.useContext(OL),isPresent:t,safeToRemove:r})}const kme={pan:{Feature:Tme},drag:{Feature:Ame,ProjectionNode:gL,MeasureLayout:kL}};function MO(e,t,r){const{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover",r==="Start");const o="onHover"+r,i=n[o];i&&_e.postRender(()=>i(t,Xs(t)))}class Dme extends eo{mount(){const{current:t}=this.node;t&&(this.unmount=epe(t,(r,n)=>(MO(this.node,n,"Start"),o=>MO(this.node,o,"End"))))}unmount(){}}class _me extends eo{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Gs(rs(this.node.current,"focus",()=>this.onFocus()),rs(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function kO(e,t,r){const{props:n}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap",r==="Start");const o="onTap"+(r==="End"?"":r),i=n[o];i&&_e.postRender(()=>i(t,Xs(t)))}class Nme extends eo{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:r,propagate:n}=this.node.props;this.unmount=ape(t,(o,i)=>(kO(this.node,i,"Start"),(a,{success:s})=>kO(this.node,a,s?"End":"Cancel")),{useGlobalTarget:r,stopPropagation:n?.tap===!1})}unmount(){}}const tv=new WeakMap,gh=new WeakMap,jme=e=>{const t=tv.get(e.target);t&&t(e)},Ime=e=>{e.forEach(jme)};function Rme({root:e,...t}){const r=e||document;gh.has(r)||gh.set(r,{});const n=gh.get(r),o=JSON.stringify(t);return n[o]||(n[o]=new IntersectionObserver(Ime,{root:e,...t})),n[o]}function Lme(e,t,r){const n=Rme(t);return tv.set(e,r),n.observe(e),()=>{tv.delete(e),n.unobserve(e)}}const $me={some:0,all:1};class Vme extends eo{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:r,margin:n,amount:o="some",once:i}=t,a={root:r?r.current:void 0,rootMargin:n,threshold:typeof o=="number"?o:$me[o]},s=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return Lme(this.node.current,a,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:r}=this.node;["amount","margin","root"].some(Fme(t,r))&&this.startObserver()}unmount(){}}function Fme({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}const Bme={inView:{Feature:Vme},tap:{Feature:Nme},focus:{Feature:_me},hover:{Feature:Dme}},Wme={layout:{ProjectionNode:gL,MeasureLayout:kL}},zme={...fme,...Bme,...kme,...Wme},DL=sme(zme,lme),_L=te("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","body-sm":"text-body-sm 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"}}),qo=p.forwardRef(({className:e,variant:t="body",weight:r="regular",as:n="p",asChild:o=!1,...i},a)=>{const s=o?Ie:n;return b.jsx(s,{className:D(_L({variant:t,weight:r,className:e})),ref:a,...i})});qo.displayName="Text";const NL=p.createContext(!1),jL=({open:e,defaultOpen:t=!1,onOpenChange:r,children:n,...o})=>{const[i,a]=p.useState(t),s=e!==void 0,l=s?e:i,c=p.useCallback(u=>{s||a(u),r?.(u)},[s,r]);return b.jsx(NL.Provider,{value:l,children:b.jsx(JE,{open:l,onOpenChange:c,...o,children:n})})};jL.displayName="Modal";const Kme=eA,IL=tA,Ume=Au,Gb=p.forwardRef(({className:e,...t},r)=>b.jsx(rA,{ref:r,forceMount:!0,asChild:!0,...t,children:b.jsx(DL.div,{initial:{opacity:0,backdropFilter:"blur(0px)"},animate:{opacity:1,backdropFilter:"blur(4px)"},exit:{opacity:0,backdropFilter:"blur(0px)"},transition:{duration:.2},className:D("fixed inset-0 z-50 bg-black/20",e)})}));Gb.displayName="ModalOverlay";const RL=te(["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-8 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"],{variants:{size:{sm:"max-w-[400px]",default:"max-w-[500px]",lg:"max-w-[640px]",full:"max-w-[95vw]"}},defaultVariants:{size:"default"}}),LL=p.forwardRef(({className:e,children:t,size:r,showCloseButton:n=!0,...o},i)=>{const a=p.useContext(NL);return b.jsx(Rhe,{children:a&&b.jsxs(IL,{forceMount:!0,children:[b.jsx(Gb,{}),b.jsx(nA,{ref:i,forceMount:!0,asChild:!0,...o,children:b.jsxs(DL.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.2},className:D(RL({size:r}),e),children:[t,n&&b.jsx(Au,{asChild:!0,children:b.jsxs(kv,{variant:"ghost",size:"icon",className:"absolute top-6 right-6",children:[b.jsx(oE,{className:"h-4 w-4"}),b.jsx("span",{className:"sr-only",children:"Close"})]})})]})})]})})});LL.displayName="ModalContent";const $L=p.forwardRef(({className:e,...t},r)=>b.jsx("div",{ref:r,className:D("flex flex-col space-y-1.5 text-center sm:text-left",e),...t}));$L.displayName="ModalHeader";const VL=p.forwardRef(({className:e,...t},r)=>b.jsx("div",{ref:r,className:D("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t}));VL.displayName="ModalFooter";const FL=p.forwardRef(({className:e,children:t,...r},n)=>b.jsx(oA,{ref:n,asChild:!0,...r,children:b.jsx(hb,{level:"h3",className:e,children:t})}));FL.displayName="ModalTitle";const BL=p.forwardRef(({className:e,children:t,...r},n)=>b.jsx(iA,{ref:n,asChild:!0,...r,children:b.jsx(qo,{variant:"semi-lead",className:e,children:t})}));BL.displayName="ModalDescription";const WL=te("flex items-center justify-center gap-1 font-sans",{variants:{size:{sm:"text-small",default:"text-body",lg:"text-lead"}},defaultVariants:{size:"default"}}),zL=te("focus-visible:ring-sunflower inline-flex items-center justify-center font-sans font-normal 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-primary hover:bg-alt active:bg-contrast rounded-full",active:"bg-sunflower text-primary hover:bg-sunflower-hover rounded-full",ellipsis:"text-tertiary cursor-default"},size:{sm:"text-small h-7 w-7",default:"text-small h-9 w-9",lg:"text-body h-11 w-11"}},defaultVariants:{variant:"default",size:"default"}}),KL=p.forwardRef(({className:e,size:t,page:r,totalPages:n,onPageChange:o,siblingCount:i=1,...a},s)=>{const l=p.useMemo(()=>{const d=i*2+3+2;if(n<=d)return Array.from({length:n},(g,y)=>y+1);const f=Math.max(r-i,1),h=Math.min(r+i,n),v=f>2,m=h<n-1;if(!v&&m){const g=3+2*i;return[...Array.from({length:g},(x,w)=>w+1),"ellipsis-right",n]}if(v&&!m){const g=3+2*i;return[1,"ellipsis-left",...Array.from({length:g},(x,w)=>n-g+w+1)]}return v&&m?[1,"ellipsis-left",...Array.from({length:i*2+1},(y,x)=>f+x),"ellipsis-right",n]:Array.from({length:n},(g,y)=>y+1)},[r,n,i]),c=u=>{u>=1&&u<=n&&u!==r&&o?.(u)};return b.jsxs("nav",{ref:s,role:"navigation","aria-label":"Pagination",className:D(WL({size:t,className:e})),...a,children:[b.jsx(gi,{size:t,onClick:()=>c(r-1),disabled:r===1,"aria-label":"Go to previous page",children:b.jsx(Cv,{className:"h-4 w-4"})}),l.map(u=>typeof u=="string"?b.jsx(gi,{size:t,variant:"ellipsis",disabled:!0,"aria-hidden":!0,children:b.jsx(nE,{className:"h-4 w-4"})},u):b.jsx(gi,{size:t,variant:u===r?"active":"default",onClick:()=>c(u),"aria-label":`Go to page ${u}`,"aria-current":u===r?"page":void 0,children:u},u)),b.jsx(gi,{size:t,onClick:()=>c(r+1),disabled:r===n,"aria-label":"Go to next page",children:b.jsx(Ov,{className:"h-4 w-4"})})]})});KL.displayName="Pagination";const gi=p.forwardRef(({className:e,variant:t,size:r,...n},o)=>b.jsx("button",{ref:o,type:"button",className:D(zL({variant:t,size:r,className:e})),...n}));gi.displayName="PaginationItem";const UL=p.createContext(null);function Hme(){const e=p.useContext(UL);if(!e)throw new Error("PaginationDot must be used within a PaginationDots component");return e}const HL=te("inline-flex items-center justify-center font-sans",{variants:{size:{sm:"gap-1.5",default:"gap-2",lg:"gap-2.5"}},defaultVariants:{size:"default"}}),GL=p.forwardRef(({className:e,value:t,onValueChange:r,size:n="default",children:o,...i},a)=>b.jsx(UL.Provider,{value:{value:t,onValueChange:r,size:n??"default"},children:b.jsx("div",{ref:a,role:"group","aria-label":"Content navigation",className:D(HL({size:n}),e),...i,children:o})}));GL.displayName="PaginationDots";const YL=te("focus-visible:ring-sunflower rounded-full transition-all duration-300 ease-out focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",{variants:{size:{sm:"h-1.5",default:"h-2",lg:"h-2.5"},active:{true:"bg-sunflower",false:"bg-border hover:bg-quaternary"}},compoundVariants:[{size:"sm",active:!1,class:"w-1.5"},{size:"default",active:!1,class:"w-2"},{size:"lg",active:!1,class:"w-2.5"},{size:"sm",active:!0,class:"w-4"},{size:"default",active:!0,class:"w-6"},{size:"lg",active:!0,class:"w-8"}],defaultVariants:{size:"default",active:!1}}),qL=p.forwardRef(({className:e,index:t,...r},n)=>{const{value:o,onValueChange:i,size:a}=Hme(),s=t===o;return b.jsx("button",{ref:n,type:"button","aria-label":`Go to slide ${t+1}`,"aria-current":s?"true":void 0,onClick:()=>i?.(t),className:D(YL({size:a,active:s}),e),...r})});qL.displayName="PaginationDot";const XL=te("text-small font-sans tracking-[-0.05em]",{variants:{size:{sm:"h-48",default:"h-72",lg:"h-96"}},defaultVariants:{size:"default"}}),DO=["var(--color-sunflower)","var(--color-electric-blue)","var(--color-cool-purple)","var(--color-deep-blue)","var(--color-warm-purple)"],ZL=p.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,...d},f)=>{const h=p.useMemo(()=>r.reduce((m,g)=>m+g.value,0),[r]),v=p.useCallback(m=>{const{cx:g=0,cy:y=0,midAngle:x=0,percent:w=0}=m,S=m.innerRadius??0,P=m.outerRadius??0,C=Math.PI/180,E=S+(P-S)*.5,A=g+E*Math.cos(-x*C),T=y+E*Math.sin(-x*C);return b.jsx("text",{x:A,y:T,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:f,className:D(XL({size:t,className:e})),role:"img",...d,children:b.jsx(Jv,{width:"100%",height:"100%",minWidth:100,minHeight:100,children:b.jsxs(Xne,{children:[o&&b.jsx(gy,{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},itemStyle:{color:"var(--color-secondary)"},formatter:(m,g)=>[`${m} (${h>0?(Number(m)/h*100).toFixed(1):0}%)`,g]}),n&&b.jsx(qu,{wrapperStyle:{fontFamily:"var(--font-sans)",fontSize:"14px"},formatter:m=>b.jsx("span",{style:{color:"var(--color-secondary)"},children:m})}),b.jsx(t_,{data:r,cx:"50%",cy:"50%",innerRadius:i,outerRadius:a,paddingAngle:s,dataKey:"value",nameKey:"name",startAngle:c,endAngle:u,label:l?v:!1,labelLine:!1,children:r.map((m,g)=>b.jsx(Ds,{fill:m.color||DO[g%DO.length]},`cell-${m.name}-${g}`))})]})})})});ZL.displayName="PieChart";const QL=te("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"}}),JL=te("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}}),e$=p.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:D(QL({size:n,className:e})),...l,children:b.jsx("div",{className:D(JL({variant:o,animated:i}),s&&"animate-progress-indeterminate"),style:{width:s?"50%":`${u}%`}})})});e$.displayName="ProgressIndicator";var Yb="Radio",[Gme,t$]=it(Yb),[Yme,qme]=Gme(Yb),r$=p.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:o=!1,required:i,disabled:a,value:s="on",onCheck:l,form:c,...u}=e,[d,f]=p.useState(null),h=ie(t,g=>f(g)),v=p.useRef(!1),m=d?c||!!d.closest("form"):!0;return b.jsxs(Yme,{scope:r,checked:o,disabled:a,children:[b.jsx(ee.button,{type:"button",role:"radio","aria-checked":o,"data-state":a$(o),"data-disabled":a?"":void 0,disabled:a,value:s,...u,ref:h,onClick:U(e.onClick,g=>{o||l?.(),m&&(v.current=g.isPropagationStopped(),v.current||g.stopPropagation())})}),m&&b.jsx(i$,{control:d,bubbles:!v.current,name:n,value:s,checked:o,required:i,disabled:a,form:c,style:{transform:"translateX(-100%)"}})]})});r$.displayName=Yb;var n$="RadioIndicator",o$=p.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...o}=e,i=qme(n$,r);return b.jsx(At,{present:n||i.checked,children:b.jsx(ee.span,{"data-state":a$(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t})})});o$.displayName=n$;var Xme="RadioBubbleInput",i$=p.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:n=!0,...o},i)=>{const a=p.useRef(null),s=ie(a,i),l=Ls(r),c=$s(t);return p.useEffect(()=>{const u=a.current;if(!u)return;const d=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==r&&h){const v=new Event("click",{bubbles:n});h.call(u,r),u.dispatchEvent(v)}},[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}})});i$.displayName=Xme;function a$(e){return e?"checked":"unchecked"}var Zme=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],zd="RadioGroup",[Qme]=it(zd,[kd,t$]),s$=kd(),l$=t$(),[Jme,eve]=Qme(zd),c$=p.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:d,...f}=e,h=s$(r),v=Li(c),[m,g]=xt({prop:i,defaultProp:o??null,onChange:d,caller:zd});return b.jsx(Jme,{scope:r,name:n,required:a,disabled:s,value:m,onValueChange:g,children:b.jsx(aj,{asChild:!0,...h,orientation:l,dir:v,loop:u,children:b.jsx(ee.div,{role:"radiogroup","aria-required":a,"aria-orientation":l,"data-disabled":s?"":void 0,dir:v,...f,ref:t})})})});c$.displayName=zd;var u$="RadioGroupItem",d$=p.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...o}=e,i=eve(u$,r),a=i.disabled||n,s=s$(r),l=l$(r),c=p.useRef(null),u=ie(t,c),d=i.value===o.value,f=p.useRef(!1);return p.useEffect(()=>{const h=m=>{Zme.includes(m.key)&&(f.current=!0)},v=()=>f.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",v)}},[]),b.jsx(sj,{asChild:!0,...s,focusable:!a,active:d,children:b.jsx(r$,{disabled:a,required:i.required,checked:d,...l,...o,name:i.name,ref:u,onCheck:()=>i.onValueChange(o.value),onKeyDown:U(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:U(o.onFocus,()=>{f.current&&c.current?.click()})})})});d$.displayName=u$;var tve="RadioGroupIndicator",f$=p.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,o=l$(r);return b.jsx(o$,{...o,...n,ref:t})});f$.displayName=tve;var rve=c$,nve=d$,ove=f$;const p$=p.forwardRef(({className:e,...t},r)=>b.jsx(rve,{className:D("grid gap-2",e),...t,ref:r}));p$.displayName="RadioGroup";const h$=p.forwardRef(({className:e,...t},r)=>b.jsx(nve,{ref:r,className:D("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(ove,{className:"flex items-center justify-center",children:b.jsx("span",{className:"bg-sunflower h-2.5 w-2.5 rounded-full"})})}));h$.displayName="RadioGroupItem";function yu(e,[t,r]){return Math.min(r,Math.max(t,e))}function ive(e){const t=ave(e),r=p.forwardRef((n,o)=>{const{children:i,...a}=n,s=p.Children.toArray(i),l=s.find(lve);if(l){const c=l.props.children,u=s.map(d=>d===l?p.Children.count(c)>1?p.Children.only(null):p.isValidElement(c)?c.props.children:null:d);return b.jsx(t,{...a,ref:o,children:p.isValidElement(c)?p.cloneElement(c,void 0,u):null})}return b.jsx(t,{...a,ref:o,children:i})});return r.displayName=`${e}.Slot`,r}function ave(e){const t=p.forwardRef((r,n)=>{const{children:o,...i}=r;if(p.isValidElement(o)){const a=uve(o),s=cve(i,o.props);return o.type!==p.Fragment&&(s.ref=n?Hr(n,a):a),p.cloneElement(o,s)}return p.Children.count(o)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sve=Symbol("radix.slottable");function lve(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sve}function cve(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 uve(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 m$=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"}),dve="VisuallyHidden",Kd=p.forwardRef((e,t)=>b.jsx(ee.span,{...e,ref:t,style:{...m$,...e.style}}));Kd.displayName=dve;var fve=Kd,pve=[" ","Enter","ArrowUp","ArrowDown"],hve=[" ","Enter"],$o="Select",[Ud,Hd,mve]=Ri($o),[na]=it($o,[mve,Zn]),Gd=Zn(),[vve,to]=na($o),[gve,yve]=na($o),v$=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:o,onOpenChange:i,value:a,defaultValue:s,onValueChange:l,dir:c,name:u,autoComplete:d,disabled:f,required:h,form:v}=e,m=Gd(t),[g,y]=p.useState(null),[x,w]=p.useState(null),[S,P]=p.useState(!1),C=Li(c),[E,A]=xt({prop:n,defaultProp:o??!1,onChange:i,caller:$o}),[T,M]=xt({prop:a,defaultProp:s,onChange:l,caller:$o}),_=p.useRef(null),k=g?v||!!g.closest("form"):!0,[N,R]=p.useState(new Set),z=Array.from(N).map(B=>B.props.value).join(";");return b.jsx(Fs,{...m,children:b.jsxs(vve,{required:h,scope:t,trigger:g,onTriggerChange:y,valueNode:x,onValueNodeChange:w,valueNodeHasChildren:S,onValueNodeHasChildrenChange:P,contentId:It(),value:T,onValueChange:M,open:E,onOpenChange:A,dir:C,triggerPointerDownPosRef:_,disabled:f,children:[b.jsx(Ud.Provider,{scope:t,children:b.jsx(gve,{scope:e.__scopeSelect,onNativeOptionAdd:p.useCallback(B=>{R(F=>new Set(F).add(B))},[]),onNativeOptionRemove:p.useCallback(B=>{R(F=>{const j=new Set(F);return j.delete(B),j})},[]),children:r})}),k?b.jsxs(B$,{"aria-hidden":!0,required:h,tabIndex:-1,name:u,autoComplete:d,value:T,onChange:B=>M(B.target.value),disabled:f,form:v,children:[T===void 0?b.jsx("option",{value:""}):null,Array.from(N)]},z):null]})})};v$.displayName=$o;var g$="SelectTrigger",y$=p.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...o}=e,i=Gd(r),a=to(g$,r),s=a.disabled||n,l=ie(t,a.onTriggerChange),c=Hd(r),u=p.useRef("touch"),[d,f,h]=z$(m=>{const g=c().filter(w=>!w.disabled),y=g.find(w=>w.value===a.value),x=K$(g,m,y);x!==void 0&&a.onValueChange(x.value)}),v=m=>{s||(a.onOpenChange(!0),h()),m&&(a.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return b.jsx(Bs,{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":W$(a.value)?"":void 0,...o,ref:l,onClick:U(o.onClick,m=>{m.currentTarget.focus(),u.current!=="mouse"&&v(m)}),onPointerDown:U(o.onPointerDown,m=>{u.current=m.pointerType;const g=m.target;g.hasPointerCapture(m.pointerId)&&g.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(v(m),m.preventDefault())}),onKeyDown:U(o.onKeyDown,m=>{const g=d.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&f(m.key),!(g&&m.key===" ")&&pve.includes(m.key)&&(v(),m.preventDefault())})})})});y$.displayName=g$;var b$="SelectValue",x$=p.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,children:i,placeholder:a="",...s}=e,l=to(b$,r),{onValueNodeHasChildrenChange:c}=l,u=i!==void 0,d=ie(t,l.onValueNodeChange);return pt(()=>{c(u)},[c,u]),b.jsx(ee.span,{...s,ref:d,style:{pointerEvents:"none"},children:W$(l.value)?b.jsx(b.Fragment,{children:a}):i})});x$.displayName=b$;var bve="SelectIcon",w$=p.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...o}=e;return b.jsx(ee.span,{"aria-hidden":!0,...o,ref:t,children:n||"▼"})});w$.displayName=bve;var xve="SelectPortal",S$=e=>b.jsx(Bo,{asChild:!0,...e});S$.displayName=xve;var Vo="SelectContent",P$=p.forwardRef((e,t)=>{const r=to(Vo,e.__scopeSelect),[n,o]=p.useState();if(pt(()=>{o(new DocumentFragment)},[]),!r.open){const i=n;return i?as.createPortal(b.jsx(C$,{scope:e.__scopeSelect,children:b.jsx(Ud.Slot,{scope:e.__scopeSelect,children:b.jsx("div",{children:e.children})})}),i):null}return b.jsx(O$,{...e,ref:t})});P$.displayName=Vo;var vr=10,[C$,ro]=na(Vo),wve="SelectContentImpl",Sve=ive("SelectContent.RemoveScroll"),O$=p.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:d,collisionBoundary:f,collisionPadding:h,sticky:v,hideWhenDetached:m,avoidCollisions:g,...y}=e,x=to(Vo,r),[w,S]=p.useState(null),[P,C]=p.useState(null),E=ie(t,K=>S(K)),[A,T]=p.useState(null),[M,_]=p.useState(null),k=Hd(r),[N,R]=p.useState(!1),z=p.useRef(!1);p.useEffect(()=>{if(w)return Ou(w)},[w]),Pu();const B=p.useCallback(K=>{const[fe,...$]=k().map(V=>V.ref.current),[G]=$.slice(-1),W=document.activeElement;for(const V of K)if(V===W||(V?.scrollIntoView({block:"nearest"}),V===fe&&P&&(P.scrollTop=0),V===G&&P&&(P.scrollTop=P.scrollHeight),V?.focus(),document.activeElement!==W))return},[k,P]),F=p.useCallback(()=>B([A,w]),[B,A,w]);p.useEffect(()=>{N&&F()},[N,F]);const{onOpenChange:j,triggerPointerDownPosRef:L}=x;p.useEffect(()=>{if(w){let K={x:0,y:0};const fe=G=>{K={x:Math.abs(Math.round(G.pageX)-(L.current?.x??0)),y:Math.abs(Math.round(G.pageY)-(L.current?.y??0))}},$=G=>{K.x<=10&&K.y<=10?G.preventDefault():w.contains(G.target)||j(!1),document.removeEventListener("pointermove",fe),L.current=null};return L.current!==null&&(document.addEventListener("pointermove",fe),document.addEventListener("pointerup",$,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",fe),document.removeEventListener("pointerup",$,{capture:!0})}}},[w,j,L]),p.useEffect(()=>{const K=()=>j(!1);return window.addEventListener("blur",K),window.addEventListener("resize",K),()=>{window.removeEventListener("blur",K),window.removeEventListener("resize",K)}},[j]);const[H,re]=z$(K=>{const fe=k().filter(W=>!W.disabled),$=fe.find(W=>W.ref.current===document.activeElement),G=K$(fe,K,$);G&&setTimeout(()=>G.ref.current.focus())}),le=p.useCallback((K,fe,$)=>{const G=!z.current&&!$;(x.value!==void 0&&x.value===fe||G)&&(T(K),G&&(z.current=!0))},[x.value]),ae=p.useCallback(()=>w?.focus(),[w]),oe=p.useCallback((K,fe,$)=>{const G=!z.current&&!$;(x.value!==void 0&&x.value===fe||G)&&_(K)},[x.value]),Se=n==="popper"?rv:E$,Me=Se===rv?{side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:v,hideWhenDetached:m,avoidCollisions:g}:{};return b.jsx(C$,{scope:r,content:w,viewport:P,onViewportChange:C,itemRefCallback:le,selectedItem:A,onItemLeave:ae,itemTextRefCallback:oe,focusSelectedItem:F,selectedItemText:M,position:n,isPositioned:N,searchRef:H,children:b.jsx(ls,{as:Sve,allowPinchZoom:!0,children:b.jsx(ss,{asChild:!0,trapped:x.open,onMountAutoFocus:K=>{K.preventDefault()},onUnmountAutoFocus:U(o,K=>{x.trigger?.focus({preventScroll:!0}),K.preventDefault()}),children:b.jsx(Fo,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:K=>K.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:b.jsx(Se,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:K=>K.preventDefault(),...y,...Me,onPlaced:()=>R(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:U(y.onKeyDown,K=>{const fe=K.ctrlKey||K.altKey||K.metaKey;if(K.key==="Tab"&&K.preventDefault(),!fe&&K.key.length===1&&re(K.key),["ArrowUp","ArrowDown","Home","End"].includes(K.key)){let G=k().filter(W=>!W.disabled).map(W=>W.ref.current);if(["ArrowUp","End"].includes(K.key)&&(G=G.slice().reverse()),["ArrowUp","ArrowDown"].includes(K.key)){const W=K.target,V=G.indexOf(W);G=G.slice(V+1)}setTimeout(()=>B(G)),K.preventDefault()}})})})})})})});O$.displayName=wve;var Pve="SelectItemAlignedPosition",E$=p.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...o}=e,i=to(Vo,r),a=ro(Vo,r),[s,l]=p.useState(null),[c,u]=p.useState(null),d=ie(t,E=>u(E)),f=Hd(r),h=p.useRef(!1),v=p.useRef(!0),{viewport:m,selectedItem:g,selectedItemText:y,focusSelectedItem:x}=a,w=p.useCallback(()=>{if(i.trigger&&i.valueNode&&s&&c&&m&&g&&y){const E=i.trigger.getBoundingClientRect(),A=c.getBoundingClientRect(),T=i.valueNode.getBoundingClientRect(),M=y.getBoundingClientRect();if(i.dir!=="rtl"){const W=M.left-A.left,V=T.left-W,he=E.left-V,ue=E.width+he,Ye=Math.max(ue,A.width),tt=window.innerWidth-vr,zt=yu(V,[vr,Math.max(vr,tt-Ye)]);s.style.minWidth=ue+"px",s.style.left=zt+"px"}else{const W=A.right-M.right,V=window.innerWidth-T.right-W,he=window.innerWidth-E.right-V,ue=E.width+he,Ye=Math.max(ue,A.width),tt=window.innerWidth-vr,zt=yu(V,[vr,Math.max(vr,tt-Ye)]);s.style.minWidth=ue+"px",s.style.right=zt+"px"}const _=f(),k=window.innerHeight-vr*2,N=m.scrollHeight,R=window.getComputedStyle(c),z=parseInt(R.borderTopWidth,10),B=parseInt(R.paddingTop,10),F=parseInt(R.borderBottomWidth,10),j=parseInt(R.paddingBottom,10),L=z+B+N+j+F,H=Math.min(g.offsetHeight*5,L),re=window.getComputedStyle(m),le=parseInt(re.paddingTop,10),ae=parseInt(re.paddingBottom,10),oe=E.top+E.height/2-vr,Se=k-oe,Me=g.offsetHeight/2,K=g.offsetTop+Me,fe=z+B+K,$=L-fe;if(fe<=oe){const W=_.length>0&&g===_[_.length-1].ref.current;s.style.bottom="0px";const V=c.clientHeight-m.offsetTop-m.offsetHeight,he=Math.max(Se,Me+(W?ae:0)+V+F),ue=fe+he;s.style.height=ue+"px"}else{const W=_.length>0&&g===_[0].ref.current;s.style.top="0px";const he=Math.max(oe,z+m.offsetTop+(W?le:0)+Me)+$;s.style.height=he+"px",m.scrollTop=fe-oe+m.offsetTop}s.style.margin=`${vr}px 0`,s.style.minHeight=H+"px",s.style.maxHeight=k+"px",n?.(),requestAnimationFrame(()=>h.current=!0)}},[f,i.trigger,i.valueNode,s,c,m,g,y,i.dir,n]);pt(()=>w(),[w]);const[S,P]=p.useState();pt(()=>{c&&P(window.getComputedStyle(c).zIndex)},[c]);const C=p.useCallback(E=>{E&&v.current===!0&&(w(),x?.(),v.current=!1)},[w,x]);return b.jsx(Ove,{scope:r,contentWrapper:s,shouldExpandOnScrollRef:h,onScrollButtonChange:C,children:b.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:b.jsx(ee.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});E$.displayName=Pve;var Cve="SelectPopperPosition",rv=p.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:o=vr,...i}=e,a=Gd(r);return b.jsx(Td,{...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)"}})});rv.displayName=Cve;var[Ove,qb]=na(Vo,{}),nv="SelectViewport",A$=p.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...o}=e,i=ro(nv,r),a=qb(nv,r),s=ie(t,i.onViewportChange),l=p.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(Ud.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:d,shouldExpandOnScrollRef:f}=a;if(f?.current&&d){const h=Math.abs(l.current-u.scrollTop);if(h>0){const v=window.innerHeight-vr*2,m=parseFloat(d.style.minHeight),g=parseFloat(d.style.height),y=Math.max(m,g);if(y<v){const x=y+h,w=Math.min(v,x),S=x-w;d.style.height=w+"px",d.style.bottom==="0px"&&(u.scrollTop=S>0?S:0,d.style.justifyContent="flex-end")}}}l.current=u.scrollTop})})})]})});A$.displayName=nv;var T$="SelectGroup",[Eve,Ave]=na(T$),M$=p.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=It();return b.jsx(Eve,{scope:r,id:o,children:b.jsx(ee.div,{role:"group","aria-labelledby":o,...n,ref:t})})});M$.displayName=T$;var k$="SelectLabel",D$=p.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=Ave(k$,r);return b.jsx(ee.div,{id:o.id,...n,ref:t})});D$.displayName=k$;var bu="SelectItem",[Tve,_$]=na(bu),N$=p.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:o=!1,textValue:i,...a}=e,s=to(bu,r),l=ro(bu,r),c=s.value===n,[u,d]=p.useState(i??""),[f,h]=p.useState(!1),v=ie(t,x=>l.itemRefCallback?.(x,n,o)),m=It(),g=p.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(Tve,{scope:r,value:n,disabled:o,textId:m,isSelected:c,onItemTextChange:p.useCallback(x=>{d(w=>w||(x?.textContent??"").trim())},[]),children:b.jsx(Ud.ItemSlot,{scope:r,value:n,disabled:o,textValue:u,children:b.jsx(ee.div,{role:"option","aria-labelledby":m,"data-highlighted":f?"":void 0,"aria-selected":c&&f,"data-state":c?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...a,ref:v,onFocus:U(a.onFocus,()=>h(!0)),onBlur:U(a.onBlur,()=>h(!1)),onClick:U(a.onClick,()=>{g.current!=="mouse"&&y()}),onPointerUp:U(a.onPointerUp,()=>{g.current==="mouse"&&y()}),onPointerDown:U(a.onPointerDown,x=>{g.current=x.pointerType}),onPointerMove:U(a.onPointerMove,x=>{g.current=x.pointerType,o?l.onItemLeave?.():g.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===" "||(hve.includes(x.key)&&y(),x.key===" "&&x.preventDefault())})})})})});N$.displayName=bu;var Ea="SelectItemText",j$=p.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,...i}=e,a=to(Ea,r),s=ro(Ea,r),l=_$(Ea,r),c=yve(Ea,r),[u,d]=p.useState(null),f=ie(t,y=>d(y),l.onItemTextChange,y=>s.itemTextRefCallback?.(y,l.value,l.disabled)),h=u?.textContent,v=p.useMemo(()=>b.jsx("option",{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:m,onNativeOptionRemove:g}=c;return pt(()=>(m(v),()=>g(v)),[m,g,v]),b.jsxs(b.Fragment,{children:[b.jsx(ee.span,{id:l.textId,...i,ref:f}),l.isSelected&&a.valueNode&&!a.valueNodeHasChildren?as.createPortal(i.children,a.valueNode):null]})});j$.displayName=Ea;var I$="SelectItemIndicator",R$=p.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return _$(I$,r).isSelected?b.jsx(ee.span,{"aria-hidden":!0,...n,ref:t}):null});R$.displayName=I$;var ov="SelectScrollUpButton",L$=p.forwardRef((e,t)=>{const r=ro(ov,e.__scopeSelect),n=qb(ov,e.__scopeSelect),[o,i]=p.useState(!1),a=ie(t,n.onScrollButtonChange);return pt(()=>{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(V$,{...e,ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=r;s&&l&&(s.scrollTop=s.scrollTop-l.offsetHeight)}}):null});L$.displayName=ov;var iv="SelectScrollDownButton",$$=p.forwardRef((e,t)=>{const r=ro(iv,e.__scopeSelect),n=qb(iv,e.__scopeSelect),[o,i]=p.useState(!1),a=ie(t,n.onScrollButtonChange);return pt(()=>{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(V$,{...e,ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=r;s&&l&&(s.scrollTop=s.scrollTop+l.offsetHeight)}}):null});$$.displayName=iv;var V$=p.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...o}=e,i=ro("SelectScrollButton",r),a=p.useRef(null),s=Hd(r),l=p.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return p.useEffect(()=>()=>l(),[l]),pt(()=>{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()})})}),Mve="SelectSeparator",F$=p.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return b.jsx(ee.div,{"aria-hidden":!0,...n,ref:t})});F$.displayName=Mve;var av="SelectArrow",kve=p.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=Gd(r),i=to(av,r),a=ro(av,r);return i.open&&a.position==="popper"?b.jsx(Md,{...o,...n,ref:t}):null});kve.displayName=av;var Dve="SelectBubbleInput",B$=p.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const o=p.useRef(null),i=ie(n,o),a=Ls(t);return p.useEffect(()=>{const s=o.current;if(!s)return;const l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==t&&u){const d=new Event("change",{bubbles:!0});u.call(s,t),s.dispatchEvent(d)}},[a,t]),b.jsx(ee.select,{...r,style:{...m$,...r.style},ref:i,defaultValue:t})});B$.displayName=Dve;function W$(e){return e===""||e===void 0}function z$(e){const t=Et(e),r=p.useRef(""),n=p.useRef(0),o=p.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=p.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,o,i]}function K$(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=_ve(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 _ve(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Nve=v$,jve=y$,Ive=x$,Rve=w$,Lve=S$,$ve=P$,Vve=A$,Fve=M$,Bve=D$,Wve=N$,zve=j$,Kve=R$,Uve=L$,Hve=$$,Gve=F$;const Yve=Nve,qve=Fve,Xve=Ive,U$=p.forwardRef(({className:e,children:t,variant:r="default",...n},o)=>b.jsxs(jve,{ref:o,className:D("bg-card text-body-sm text-primary flex h-8 w-full items-center justify-between rounded-md border px-3 py-2 font-sans transition-colors","placeholder:text-tertiary placeholder:text-body-sm","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(Rve,{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"})})})]}));U$.displayName="SelectTrigger";const Xb=p.forwardRef(({className:e,...t},r)=>b.jsx(Uve,{ref:r,className:D("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"})})}));Xb.displayName="SelectScrollUpButton";const Zb=p.forwardRef(({className:e,...t},r)=>b.jsx(Hve,{ref:r,className:D("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"})})}));Zb.displayName="SelectScrollDownButton";const H$=p.forwardRef(({className:e,children:t,position:r="popper",...n},o)=>b.jsx(Lve,{children:b.jsxs($ve,{ref:o,className:D("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(Xb,{}),b.jsx(Vve,{className:D("p-1",r==="popper"&&"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)"),children:t}),b.jsx(Zb,{})]})}));H$.displayName="SelectContent";const G$=p.forwardRef(({className:e,...t},r)=>b.jsx(Bve,{ref:r,className:D("text-small text-tertiary py-1.5 pr-2 pl-8 font-normal",e),...t}));G$.displayName="SelectLabel";const Y$=p.forwardRef(({className:e,children:t,...r},n)=>b.jsxs(Wve,{ref:n,className:D("text-body-sm relative flex h-8 w-full cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 outline-none select-none","focus:bg-alt 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(Kve,{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(zve,{children:t})]}));Y$.displayName="SelectItem";const q$=p.forwardRef(({className:e,...t},r)=>b.jsx(Gve,{ref:r,className:D("bg-border -mx-1 my-1 h-px",e),...t}));q$.displayName="SelectSeparator";const X$=p.createContext(null);function Xo(){const e=p.useContext(X$);if(!e)throw new Error("Sidebar components must be used within a Sidebar");return e}const Z$=te(["border-border bg-alt flex h-dvh flex-col border-r transition-[width] duration-300 ease-in-out","focus-visible:ring-sunflower focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none"],{variants:{variant:{default:"",bordered:"border-border border"},width:{sm:"",default:"",lg:""}},defaultVariants:{variant:"default",width:"default"}}),Zve={sm:{expanded:"w-52",collapsed:"w-14"},default:{expanded:"w-64",collapsed:"w-16"},lg:{expanded:"w-72",collapsed:"w-20"}},Q$=p.forwardRef(({className:e,variant:t,width:r="default",defaultCollapsed:n=!1,collapsed:o,onCollapsedChange:i,collapsible:a=!0,autoCollapseMobile:s=!0,children:l,...c},u)=>{const[d,f]=p.useState(n),h=o!==void 0,v=h?o:d,m=p.useCallback(x=>{a&&(h||f(x),i?.(x))},[h,i,a]);p.useEffect(()=>{if(!s||!a||typeof window>"u"||!window.matchMedia)return;const x=window.matchMedia("(max-width: 768px)"),w=S=>{m(S.matches)};return w(x),x.addEventListener("change",w),()=>x.removeEventListener("change",w)},[s,a,m]);const g=p.useMemo(()=>({collapsed:v,setCollapsed:m,collapsible:a}),[v,m,a]),y=Zve[r||"default"];return b.jsx(X$.Provider,{value:g,children:b.jsx("aside",{ref:u,className:D(Z$({variant:t}),v?y.collapsed:y.expanded,e),"data-collapsed":v,...c,children:l})})});Q$.displayName="Sidebar";const J$=p.forwardRef(({className:e,...t},r)=>b.jsx("div",{ref:r,className:D("flex items-center gap-4 px-6 pt-6 pb-4",e),...t}));J$.displayName="SidebarHeader";const eV=p.forwardRef(({className:e,...t},r)=>b.jsx("div",{ref:r,className:D("flex-1 overflow-y-auto px-5 py-4",e),...t}));eV.displayName="SidebarContent";const tV=p.forwardRef(({className:e,...t},r)=>b.jsx("div",{ref:r,className:D("border-border mt-auto border-t px-5 py-5",e),...t}));tV.displayName="SidebarFooter";const rV=p.forwardRef(({className:e,...t},r)=>b.jsx("div",{ref:r,className:D("space-y-2 py-4",e),...t}));rV.displayName="SidebarGroup";const nV=p.forwardRef(({className:e,...t},r)=>{const{collapsed:n}=Xo();return n?null:b.jsx(qo,{variant:"label",ref:r,className:D("px-4 py-3 uppercase",e),...t})});nV.displayName="SidebarGroupLabel";const ns=te(["group text-small relative flex w-full cursor-pointer items-center gap-3 rounded-md px-4 py-3 font-sans font-normal","text-secondary hover:text-primary","focus-visible:ring-sunflower focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none"],{variants:{active:{true:"text-primary",false:""}},defaultVariants:{active:!1}}),oV=p.forwardRef(({className:e,active:t,icon:r,asChild:n=!1,children:o,...i},a)=>{const{collapsed:s}=Xo(),l=n?Ie:"button",c=b.jsx("span",{className:D("bg-sunflower absolute rounded-full transition-opacity",s?"right-1 bottom-0 left-1 h-0.75":"top-1 bottom-1 left-0 w-0.75",t?"opacity-100":"opacity-0 group-hover:opacity-100"),"aria-hidden":"true"}),u=b.jsxs(b.Fragment,{children:[c,r&&b.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:r}),!s&&b.jsx(qo,{variant:"body-sm",className:"truncate",children:o})]});return n?b.jsx(Ie,{ref:a,className:D(ns({active:t}),s&&"justify-center px-2",e),...i,children:p.isValidElement(o)?p.cloneElement(o,{children:b.jsxs(b.Fragment,{children:[c,r&&b.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:r}),!s&&b.jsx("span",{className:"truncate",children:o.props.children})]})}):o}):b.jsx(l,{ref:a,className:D(ns({active:t}),s&&"justify-center px-2",e),...i,children:u})});oV.displayName="SidebarItem";const iV=p.forwardRef(({className:e,...t},r)=>{const{collapsed:n,setCollapsed:o,collapsible:i}=Xo();return i?b.jsx("button",{ref:r,type:"button",className:D("text-small flex w-full items-center rounded-md p-2 font-sans font-normal","text-secondary hover:bg-vanilla hover:text-primary","focus-visible:ring-sunflower focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",e),onClick:()=>o(!n),"aria-label":n?"Expand sidebar":"Collapse sidebar",...t,children:n?b.jsx(Ov,{className:"h-5 w-5"}):b.jsx(Cv,{className:"h-5 w-5"})}):null});iV.displayName="SidebarTrigger";const aV=p.forwardRef(({className:e,...t},r)=>b.jsx("hr",{ref:r,className:D("border-border my-5 border-t",e),...t}));aV.displayName="SidebarSeparator";const sv=p.createContext(null);function sV(){const e=p.useContext(sv);if(!e)throw new Error("SidebarSub components must be used within a SidebarSub");return e}const lV=p.forwardRef(({className:e,defaultOpen:t=!1,open:r,onOpenChange:n,children:o,...i},a)=>{const[s,l]=p.useState(t),{collapsed:c}=Xo(),u=r!==void 0,d=u?r:s,f=p.useCallback(v=>{u||l(v),n?.(v)},[u,n]),h=p.useMemo(()=>({open:d,setOpen:f}),[d,f]);return c?b.jsx(sv.Provider,{value:h,children:b.jsx(jd,{open:d,onOpenChange:f,children:b.jsx("div",{ref:a,className:D("relative",e),...i,children:o})})}):b.jsx(sv.Provider,{value:h,children:b.jsx(VO,{open:d,onOpenChange:f,asChild:!0,children:b.jsx("div",{ref:a,className:e,...i,children:o})})})});lV.displayName="SidebarSub";const cV=p.forwardRef(({className:e,active:t,icon:r,children:n,...o},i)=>{const{collapsed:a}=Xo(),{open:s}=sV(),l=b.jsx("span",{className:D("bg-sunflower absolute rounded-full transition-opacity",a?"right-1 bottom-0 left-1 h-0.75":"top-1 bottom-1 left-0 w-0.75",t?"opacity-100":"opacity-0 group-hover:opacity-100"),"aria-hidden":"true"}),c=b.jsxs(b.Fragment,{children:[l,r&&b.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:r}),!a&&b.jsxs(b.Fragment,{children:[b.jsx(qo,{variant:"body-sm",className:"flex-1 truncate text-left",children:n}),b.jsx(rE,{className:D("h-4 w-4 shrink-0 transition-transform duration-200",s&&"rotate-180"),"aria-hidden":"true"})]})]});return a?b.jsx(Id,{asChild:!0,children:b.jsxs("button",{ref:i,type:"button",className:D(ns({active:t}),"justify-center px-2",e),...o,children:[l,r&&b.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:r})]})}):b.jsx(FO,{asChild:!0,children:b.jsx("button",{ref:i,type:"button",className:D(ns({active:t}),e),...o,children:c})})});cV.displayName="SidebarSubTrigger";const uV=p.forwardRef(({className:e,children:t,...r},n)=>{const{collapsed:o}=Xo();return o?b.jsx(Rd,{children:b.jsx(Ld,{ref:n,side:"right",align:"start",sideOffset:8,className:D("bg-card border-border z-50 min-w-[180px] rounded-md border p-2 shadow-md","data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","data-[side=right]:slide-in-from-left-2",e),...r,children:t})}):b.jsx(BO,{ref:n,className:D("overflow-hidden","data-[state=open]:animate-collapsible-down","data-[state=closed]:animate-collapsible-up",e),...r,children:b.jsx("div",{className:"space-y-1 pt-1 pl-8",children:t})})});uV.displayName="SidebarSubContent";const dV=te("bg-contrast animate-pulse",{variants:{variant:{default:"rounded-md",circular:"rounded-full",text:"rounded"}},defaultVariants:{variant:"default"}}),fV=p.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:D(dV({variant:t,className:e})),style:s,...i})});fV.displayName="Skeleton";var pV=["PageUp","PageDown"],hV=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],mV={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},oa="Slider",[lv,Qve,Jve]=Ri(oa),[vV]=it(oa,[Jve]),[ege,Yd]=vV(oa),gV=p.forwardRef((e,t)=>{const{name:r,min:n=0,max:o=100,step:i=1,orientation:a="horizontal",disabled:s=!1,minStepsBetweenThumbs:l=0,defaultValue:c=[n],value:u,onValueChange:d=()=>{},onValueCommit:f=()=>{},inverted:h=!1,form:v,...m}=e,g=p.useRef(new Set),y=p.useRef(0),w=a==="horizontal"?tge:rge,[S=[],P]=xt({prop:u,defaultProp:c,onChange:_=>{[...g.current][y.current]?.focus(),d(_)}}),C=p.useRef(S);function E(_){const k=sge(S,_);M(_,k)}function A(_){M(_,y.current)}function T(){const _=C.current[y.current];S[y.current]!==_&&f(S)}function M(_,k,{commit:N}={commit:!1}){const R=dge(i),z=fge(Math.round((_-n)/i)*i+n,R),B=yu(z,[n,o]);P((F=[])=>{const j=ige(F,B,k);if(uge(j,l*i)){y.current=j.indexOf(B);const L=String(j)!==String(F);return L&&N&&f(j),L?j:F}else return F})}return b.jsx(ege,{scope:e.__scopeSlider,name:r,disabled:s,min:n,max:o,valueIndexToChangeRef:y,thumbs:g.current,values:S,orientation:a,form:v,children:b.jsx(lv.Provider,{scope:e.__scopeSlider,children:b.jsx(lv.Slot,{scope:e.__scopeSlider,children:b.jsx(w,{"aria-disabled":s,"data-disabled":s?"":void 0,...m,ref:t,onPointerDown:U(m.onPointerDown,()=>{s||(C.current=S)}),min:n,max:o,inverted:h,onSlideStart:s?void 0:E,onSlideMove:s?void 0:A,onSlideEnd:s?void 0:T,onHomeKeyDown:()=>!s&&M(n,0,{commit:!0}),onEndKeyDown:()=>!s&&M(o,S.length-1,{commit:!0}),onStepKeyDown:({event:_,direction:k})=>{if(!s){const z=pV.includes(_.key)||_.shiftKey&&hV.includes(_.key)?10:1,B=y.current,F=S[B],j=i*z*k;M(F+j,B,{commit:!0})}}})})})})});gV.displayName=oa;var[yV,bV]=vV(oa,{startEdge:"left",endEdge:"right",size:"width",direction:1}),tge=p.forwardRef((e,t)=>{const{min:r,max:n,dir:o,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:l,onStepKeyDown:c,...u}=e,[d,f]=p.useState(null),h=ie(t,w=>f(w)),v=p.useRef(void 0),m=Li(o),g=m==="ltr",y=g&&!i||!g&&i;function x(w){const S=v.current||d.getBoundingClientRect(),P=[0,S.width],E=Qb(P,y?[r,n]:[n,r]);return v.current=S,E(w-S.left)}return b.jsx(yV,{scope:e.__scopeSlider,startEdge:y?"left":"right",endEdge:y?"right":"left",direction:y?1:-1,size:"width",children:b.jsx(xV,{dir:m,"data-orientation":"horizontal",...u,ref:h,style:{...u.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:w=>{const S=x(w.clientX);a?.(S)},onSlideMove:w=>{const S=x(w.clientX);s?.(S)},onSlideEnd:()=>{v.current=void 0,l?.()},onStepKeyDown:w=>{const P=mV[y?"from-left":"from-right"].includes(w.key);c?.({event:w,direction:P?-1:1})}})})}),rge=p.forwardRef((e,t)=>{const{min:r,max:n,inverted:o,onSlideStart:i,onSlideMove:a,onSlideEnd:s,onStepKeyDown:l,...c}=e,u=p.useRef(null),d=ie(t,u),f=p.useRef(void 0),h=!o;function v(m){const g=f.current||u.current.getBoundingClientRect(),y=[0,g.height],w=Qb(y,h?[n,r]:[r,n]);return f.current=g,w(m-g.top)}return b.jsx(yV,{scope:e.__scopeSlider,startEdge:h?"bottom":"top",endEdge:h?"top":"bottom",size:"height",direction:h?1:-1,children:b.jsx(xV,{"data-orientation":"vertical",...c,ref:d,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:m=>{const g=v(m.clientY);i?.(g)},onSlideMove:m=>{const g=v(m.clientY);a?.(g)},onSlideEnd:()=>{f.current=void 0,s?.()},onStepKeyDown:m=>{const y=mV[h?"from-bottom":"from-top"].includes(m.key);l?.({event:m,direction:y?-1:1})}})})}),xV=p.forwardRef((e,t)=>{const{__scopeSlider:r,onSlideStart:n,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:s,onStepKeyDown:l,...c}=e,u=Yd(oa,r);return b.jsx(ee.span,{...c,ref:t,onKeyDown:U(e.onKeyDown,d=>{d.key==="Home"?(a(d),d.preventDefault()):d.key==="End"?(s(d),d.preventDefault()):pV.concat(hV).includes(d.key)&&(l(d),d.preventDefault())}),onPointerDown:U(e.onPointerDown,d=>{const f=d.target;f.setPointerCapture(d.pointerId),d.preventDefault(),u.thumbs.has(f)?f.focus():n(d)}),onPointerMove:U(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&o(d)}),onPointerUp:U(e.onPointerUp,d=>{const f=d.target;f.hasPointerCapture(d.pointerId)&&(f.releasePointerCapture(d.pointerId),i(d))})})}),wV="SliderTrack",SV=p.forwardRef((e,t)=>{const{__scopeSlider:r,...n}=e,o=Yd(wV,r);return b.jsx(ee.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...n,ref:t})});SV.displayName=wV;var cv="SliderRange",PV=p.forwardRef((e,t)=>{const{__scopeSlider:r,...n}=e,o=Yd(cv,r),i=bV(cv,r),a=p.useRef(null),s=ie(t,a),l=o.values.length,c=o.values.map(f=>EV(f,o.min,o.max)),u=l>1?Math.min(...c):0,d=100-Math.max(...c);return b.jsx(ee.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...n,ref:s,style:{...e.style,[i.startEdge]:u+"%",[i.endEdge]:d+"%"}})});PV.displayName=cv;var uv="SliderThumb",CV=p.forwardRef((e,t)=>{const r=Qve(e.__scopeSlider),[n,o]=p.useState(null),i=ie(t,s=>o(s)),a=p.useMemo(()=>n?r().findIndex(s=>s.ref.current===n):-1,[r,n]);return b.jsx(nge,{...e,ref:i,index:a})}),nge=p.forwardRef((e,t)=>{const{__scopeSlider:r,index:n,name:o,...i}=e,a=Yd(uv,r),s=bV(uv,r),[l,c]=p.useState(null),u=ie(t,x=>c(x)),d=l?a.form||!!l.closest("form"):!0,f=$s(l),h=a.values[n],v=h===void 0?0:EV(h,a.min,a.max),m=age(n,a.values.length),g=f?.[s.size],y=g?lge(g,v,s.direction):0;return p.useEffect(()=>{if(l)return a.thumbs.add(l),()=>{a.thumbs.delete(l)}},[l,a.thumbs]),b.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${v}% + ${y}px)`},children:[b.jsx(lv.ItemSlot,{scope:e.__scopeSlider,children:b.jsx(ee.span,{role:"slider","aria-label":e["aria-label"]||m,"aria-valuemin":a.min,"aria-valuenow":h,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0,...i,ref:u,style:h===void 0?{display:"none"}:e.style,onFocus:U(e.onFocus,()=>{a.valueIndexToChangeRef.current=n})})}),d&&b.jsx(OV,{name:o??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:h},n)]})});CV.displayName=uv;var oge="RadioBubbleInput",OV=p.forwardRef(({__scopeSlider:e,value:t,...r},n)=>{const o=p.useRef(null),i=ie(o,n),a=Ls(t);return p.useEffect(()=>{const s=o.current;if(!s)return;const l=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==t&&u){const d=new Event("input",{bubbles:!0});u.call(s,t),s.dispatchEvent(d)}},[a,t]),b.jsx(ee.input,{style:{display:"none"},...r,ref:i,defaultValue:t})});OV.displayName=oge;function ige(e=[],t,r){const n=[...e];return n[r]=t,n.sort((o,i)=>o-i)}function EV(e,t,r){const i=100/(r-t)*(e-t);return yu(i,[0,100])}function age(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function sge(e,t){if(e.length===1)return 0;const r=e.map(o=>Math.abs(o-t)),n=Math.min(...r);return r.indexOf(n)}function lge(e,t,r){const n=e/2,i=Qb([0,50],[0,n]);return(n-i(t)*r)*r}function cge(e){return e.slice(0,-1).map((t,r)=>e[r+1]-t)}function uge(e,t){if(t>0){const r=cge(e);return Math.min(...r)>=t}return!0}function Qb(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function dge(e){return(String(e).split(".")[1]||"").length}function fge(e,t){const r=Math.pow(10,t);return Math.round(e*r)/r}var pge=gV,hge=SV,mge=PV,vge=CV;const AV=te("relative flex w-full touch-none items-center select-none",{variants:{size:{sm:"[--slider-thumb-size:theme(spacing.3)] [--slider-track-height:theme(spacing.1)]",default:"[--slider-thumb-size:theme(spacing.4)] [--slider-track-height:theme(spacing.2)]",lg:"[--slider-thumb-size:theme(spacing.5)] [--slider-track-height:theme(spacing.3)]"}},defaultVariants:{size:"default"}}),TV=p.forwardRef(({className:e,size:t,defaultValue:r=[0],value:n,"aria-label":o,"aria-labelledby":i,...a},s)=>{const l=n?.length??r?.length??1;return b.jsxs(pge,{ref:s,defaultValue:r,value:n,className:D(AV({size:t}),e),...a,children:[b.jsx(hge,{className:D("bg-border relative h-[var(--slider-track-height)] w-full grow overflow-hidden rounded-full"),children:b.jsx(mge,{className:"bg-sunflower absolute h-full"})}),Array.from({length:l}).map((c,u)=>b.jsx(vge,{"aria-label":o,"aria-labelledby":i,className:D("border-sunflower block h-[var(--slider-thumb-size)] w-[var(--slider-thumb-size)] rounded-full border-2 bg-white shadow-md transition-colors","focus-visible:ring-sunflower focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none","disabled:pointer-events-none disabled:opacity-50","hover:border-sunflower-hover")},u))]})});TV.displayName="Slider";const MV=te("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"}}),kV=p.forwardRef(({className:e,variant:t,size:r,label:n="Loading",...o},i)=>b.jsx("span",{ref:i,role:"status","aria-label":n,className:D(MV({variant:t,size:r,className:e})),...o,children:b.jsx("span",{className:"sr-only",children:n})}));kV.displayName="Spinner";const DV=te("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"}}),_V=p.forwardRef(({className:e,direction:t,gap:r,align:n,justify:o,wrap:i,as:a="div",asChild:s=!1,...l},c)=>{const u=s?Ie:a;return b.jsx(u,{className:D(DV({direction:t,gap:r,align:n,justify:o,wrap:i,className:e})),ref:c,...l})});_V.displayName="Stack";const NV=p.createContext(null);function Jb(){const e=p.useContext(NV);if(!e)throw new Error("Stepper components must be used within a Stepper");return e}const jV=p.createContext(null);function Zs(){const e=p.useContext(jV);if(!e)throw new Error("StepperItem child components must be used within a StepperItem");return e}const IV=te("flex",{variants:{orientation:{horizontal:"flex-row items-start",vertical:"flex-col"}},defaultVariants:{orientation:"horizontal"}}),RV=te("inline-flex items-center font-sans",{variants:{size:{sm:"gap-1",default:"gap-1.5",lg:"gap-2"}},defaultVariants:{size:"default"}}),LV=te("inline-flex shrink-0 items-center justify-center rounded-full transition-colors",{variants:{size:{sm:"h-5 w-5 text-[10px]",default:"h-6 w-6 text-[11px]",lg:"h-7 w-7 text-xs"}},defaultVariants:{size:"default"}}),$V=te("transition-colors",{variants:{size:{sm:"h-0.5 w-3",default:"h-0.5 w-4",lg:"h-0.5 w-5"}},defaultVariants:{size:"default"}}),VV=p.forwardRef(({className:e,variant:t="default",activeStep:r=1,orientation:n="horizontal",totalSteps:o,size:i,labels:a,onStepClick:s,children:l,...c},u)=>{const[d,f]=p.useState(0),h=p.useMemo(()=>({activeStep:r,orientation:n,totalSteps:d,setTotalSteps:f}),[r,n,d]);if(t==="mini"){const v=o??0,m=Array.from({length:v},(g,y)=>y+1);return b.jsx("div",{ref:u,role:"group","aria-label":"Progress",className:D(RV({size:i}),e),...c,children:m.map(g=>{const y=g<r?"completed":g===r?"active":"inactive",x=a?.[g-1]??`Step ${g}`,w=g===v;return b.jsxs(p.Fragment,{children:[b.jsx("button",{type:"button","aria-current":y==="active"?"step":void 0,"aria-label":x,"data-state":y,disabled:!s,onClick:()=>s?.(g),className:D(LV({size:i}),"focus-visible:ring-sunflower focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",s?"cursor-pointer":"cursor-default disabled:opacity-100",y==="completed"&&"bg-sunflower text-primary",y==="active"&&"border-sunflower text-primary border-2",y==="inactive"&&"border-border text-tertiary border-2"),children:y==="completed"?b.jsx(tE,{className:D(i==="sm"&&"h-2.5 w-2.5",i==="lg"&&"h-3.5 w-3.5",(!i||i==="default")&&"h-3 w-3"),strokeWidth:3}):g}),!w&&b.jsx("div",{"aria-hidden":"true",className:D($V({size:i}),g<r?"bg-sunflower":"bg-border")})]},g)})})}return b.jsx(NV.Provider,{value:h,children:b.jsxs("div",{ref:u,role:"group","aria-label":"Progress","data-orientation":n,className:D("w-full",e),...c,children:[b.jsx("div",{className:D(IV({orientation:n})),children:l}),n==="horizontal"&&d>0&&b.jsxs("div",{className:"text-tertiary text-body-sm mt-4 text-center font-sans",children:["Step ",Math.min(r,d)," of ",d]})]})})});VV.displayName="Stepper";const FV=te("group relative",{variants:{orientation:{horizontal:"flex flex-1 flex-col items-center",vertical:"flex flex-col"}},defaultVariants:{orientation:"horizontal"}}),BV=p.forwardRef(({className:e,step:t,children:r,...n},o)=>{const{activeStep:i,orientation:a,totalSteps:s,setTotalSteps:l}=Jb(),c=t<i?"completed":t===i?"active":"inactive";p.useEffect(()=>{l(f=>Math.max(f,t))},[t,l]);const u=t===s,d=p.useMemo(()=>({step:t,state:c,isLastStep:u}),[t,c,u]);return b.jsx(jV.Provider,{value:d,children:b.jsx("div",{ref:o,"data-state":c,"data-step":t,"data-orientation":a,className:D(FV({orientation:a}),e),...n,children:r})})});BV.displayName="StepperItem";const WV=te("focus-visible:ring-sunflower flex items-center gap-3 text-left font-sans transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50",{variants:{orientation:{horizontal:"flex-col items-center gap-2 text-center",vertical:"flex-row"}},defaultVariants:{orientation:"horizontal"}}),zV=p.forwardRef(({className:e,children:t,...r},n)=>{const{orientation:o}=Jb(),{state:i}=Zs();return b.jsx("button",{ref:n,type:"button","aria-current":i==="active"?"step":void 0,"data-state":i,className:D(WV({orientation:o}),e),...r,children:t})});zV.displayName="StepperTrigger";const KV=te("text-body-sm inline-flex shrink-0 items-center justify-center rounded-full font-sans transition-colors",{variants:{size:{sm:"h-7 w-7",default:"h-9 w-9",lg:"h-11 w-11"}},defaultVariants:{size:"default"}}),UV=p.forwardRef(({className:e,size:t,children:r,...n},o)=>{const{state:i,step:a}=Zs();return b.jsx("span",{ref:o,"data-state":i,className:D(KV({size:t}),i==="completed"&&"bg-sunflower text-primary",i==="active"&&"border-sunflower text-primary border-2",i==="inactive"&&"border-border text-tertiary border-2",e),"aria-hidden":"true",...n,children:i==="completed"?b.jsx(tE,{className:"h-4 w-4"}):r??a})});UV.displayName="StepperIndicator";const HV=p.forwardRef(({className:e,...t},r)=>{const{state:n}=Zs();return b.jsx("span",{ref:r,"data-state":n,className:D("text-body-sm font-sans font-medium tracking-tight",n==="inactive"?"text-tertiary":"text-primary",e),...t})});HV.displayName="StepperTitle";const GV=p.forwardRef(({className:e,...t},r)=>{const{state:n}=Zs();return b.jsx("p",{ref:r,"data-state":n,className:D("text-small font-sans",n==="inactive"?"text-quaternary":"text-secondary",e),...t})});GV.displayName="StepperDescription";const YV=te("transition-colors",{variants:{orientation:{horizontal:"absolute top-[17px] right-[calc(-50%_+_24px)] left-[calc(50%_+_24px)] h-0.5",vertical:"mt-1 mb-1 ml-4.5 min-h-8 w-0.5"}},defaultVariants:{orientation:"horizontal"}}),qV=p.forwardRef(({className:e,...t},r)=>{const{orientation:n}=Jb(),{state:o}=Zs();return b.jsx("div",{ref:r,role:"separator","data-state":o,"data-orientation":n,className:D(YV({orientation:n}),o==="completed"?"bg-sunflower":"bg-border",e),"aria-hidden":"true",...t})});qV.displayName="StepperSeparator";var qd="Switch",[gge]=it(qd),[yge,bge]=gge(qd),XV=p.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:o,defaultChecked:i,required:a,disabled:s,value:l="on",onCheckedChange:c,form:u,...d}=e,[f,h]=p.useState(null),v=ie(t,w=>h(w)),m=p.useRef(!1),g=f?u||!!f.closest("form"):!0,[y,x]=xt({prop:o,defaultProp:i??!1,onChange:c,caller:qd});return b.jsxs(yge,{scope:r,checked:y,disabled:s,children:[b.jsx(ee.button,{type:"button",role:"switch","aria-checked":y,"aria-required":a,"data-state":eF(y),"data-disabled":s?"":void 0,disabled:s,value:l,...d,ref:v,onClick:U(e.onClick,w=>{x(S=>!S),g&&(m.current=w.isPropagationStopped(),m.current||w.stopPropagation())})}),g&&b.jsx(JV,{control:f,bubbles:!m.current,name:n,value:l,checked:y,required:a,disabled:s,form:u,style:{transform:"translateX(-100%)"}})]})});XV.displayName=qd;var ZV="SwitchThumb",QV=p.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,o=bge(ZV,r);return b.jsx(ee.span,{"data-state":eF(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})});QV.displayName=ZV;var xge="SwitchBubbleInput",JV=p.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...o},i)=>{const a=p.useRef(null),s=ie(a,i),l=Ls(r),c=$s(t);return p.useEffect(()=>{const u=a.current;if(!u)return;const d=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==r&&h){const v=new Event("click",{bubbles:n});h.call(u,r),u.dispatchEvent(v)}},[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}})});JV.displayName=xge;function eF(e){return e?"checked":"unchecked"}var wge=XV,Sge=QV;const tF=p.forwardRef(({className:e,...t},r)=>b.jsx(wge,{className:D("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(Sge,{className:D("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")})}));tF.displayName="Switch";const rF=te("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"}}),Pge=te("border-border bg-alt border-b",{variants:{},defaultVariants:{}}),Cge=te("",{variants:{},defaultVariants:{}}),Oge=te("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"}}),Ege=te("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"}}),Age=te("text-secondary align-middle [&:has([role=checkbox])]:pr-0",{variants:{size:{default:"p-4",compact:"p-2"}},defaultVariants:{size:"default"}}),ex=p.createContext({size:"default"}),nF=p.forwardRef(({className:e,variant:t,size:r="default",...n},o)=>b.jsx(ex.Provider,{value:{size:r??"default"},children:b.jsx("div",{className:"relative w-full overflow-auto",children:b.jsx("table",{ref:o,className:D(rF({variant:t,size:r}),e),...n})})}));nF.displayName="Table";const oF=p.forwardRef(({className:e,...t},r)=>b.jsx("thead",{ref:r,className:D(Pge(),e),...t}));oF.displayName="TableHeader";const iF=p.forwardRef(({className:e,...t},r)=>b.jsx("tbody",{ref:r,className:D(Cge(),e),...t}));iF.displayName="TableBody";const aF=p.forwardRef(({className:e,...t},r)=>b.jsx("tfoot",{ref:r,className:D("border-border bg-alt text-primary border-t font-normal",e),...t}));aF.displayName="TableFooter";const sF=p.forwardRef(({className:e,variant:t,...r},n)=>b.jsx("tr",{ref:n,className:D(Oge({variant:t}),e),...r}));sF.displayName="TableRow";const lF=p.forwardRef(({className:e,children:t,sortable:r=!1,sortDirection:n=null,onSort:o,...i},a)=>{const{size:s}=p.useContext(ex),l=()=>{r&&o&&o()},c=u=>{r&&o&&(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),o())};return b.jsx("th",{ref:a,className:D(Ege({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:D("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:D("-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"})})]})]})})});lF.displayName="TableHead";const cF=p.forwardRef(({className:e,children:t,...r},n)=>{const{size:o}=p.useContext(ex);return b.jsx("td",{ref:n,className:D(Age({size:o}),e),...r,children:b.jsx(qo,{variant:"body-sm",as:"span",children:t})})});cF.displayName="TableCell";const uF=p.forwardRef(({className:e,...t},r)=>b.jsx("caption",{ref:r,className:D("text-small text-tertiary mt-4 text-left",e),...t}));uF.displayName="TableCaption";function Tge({data:e,initialSortKey:t=null,initialSortDirection:r="asc"}){const[n,o]=p.useState({key:t??null,direction:t?r??"asc":null}),i=p.useCallback(c=>{o(u=>u.key!==c?{key:c,direction:"asc"}:u.direction==="asc"?{key:c,direction:"desc"}:u.direction==="desc"?{key:null,direction:null}:{key:c,direction:"asc"})},[]),{key:a,direction:s}=n;return{sortedData:p.useMemo(()=>!a||!s?e:[...e].sort((c,u)=>{const d=c[a],f=u[a];if(d===f)return 0;let h=0;return typeof d=="string"&&typeof f=="string"?h=d.localeCompare(f):typeof d=="number"&&typeof f=="number"?h=d-f:h=String(d).localeCompare(String(f)),s==="asc"?h:-h}),[e,a,s]),sortKey:a,sortDirection:s,handleSort:i}}function Mge({data:e,filterKeys:t}){const[r,n]=p.useState("");return{filteredData:p.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 dF=p.createContext(null);function fF(){const e=p.useContext(dF);if(!e)throw new Error("Tab components must be used within a Tabs component");return e}const pF=p.forwardRef(({className:e,defaultValue:t="",value:r,onValueChange:n,children:o,...i},a)=>{const[s,l]=p.useState(t),c=p.useRef(new Map),u=r!==void 0?r:s,d=p.useCallback(h=>{r===void 0&&l(h),n?.(h)},[r,n]),f=p.useCallback((h,v)=>{v?c.current.set(h,v):c.current.delete(h)},[]);return b.jsx(dF.Provider,{value:{activeTab:u,setActiveTab:d,registerTrigger:f},children:b.jsx("div",{ref:a,className:D("w-full",e),...i,children:o})})});pF.displayName="Tabs";const hF=te("text-body inline-flex items-center font-sans transition-colors",{variants:{variant:{default:"border-border relative gap-1 border-b",pills:"rounded-pill bg-alt gap-2 p-1"}},defaultVariants:{variant:"default"}}),mF=p.createContext(null),vF=p.forwardRef(({className:e,variant:t,...r},n)=>{const o=p.useRef(null),[i,a]=p.useState(null),[s,l]=p.useState(!1),c=p.useRef(!1),u=p.useCallback(h=>{if(h&&o.current){const v=o.current.getBoundingClientRect();a({left:h.left-v.left,width:h.width}),c.current||(c.current=!0,l(!0))}},[]),d=p.useCallback(h=>{o.current=h,typeof n=="function"?n(h):n&&(n.current=h)},[n]),f=p.useMemo(()=>({variant:t??"default",setActiveRect:u}),[t,u]);return b.jsx(mF.Provider,{value:f,children:b.jsxs("div",{ref:d,role:"tablist",className:D(hF({variant:t,className:e})),...r,children:[r.children,t!=="pills"&&i&&b.jsx("span",{className:D("bg-sunflower pointer-events-none absolute bottom-0 h-0.5",s&&"transition-all duration-200 ease-out"),style:{left:i.left,width:i.width},"aria-hidden":"true"})]})})});vF.displayName="TabList";const gF=te("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]:text-primary 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"}}),yF=p.forwardRef(({className:e,variant:t,size:r,value:n,...o},i)=>{const{activeTab:a,setActiveTab:s}=fF(),l=p.useContext(mF),c=p.useRef(null),u=a===n,d=p.useCallback(f=>{c.current=f,typeof i=="function"?i(f):i&&(i.current=f)},[i]);return p.useEffect(()=>{if(u&&c.current&&l){const f=()=>{if(c.current){const h=c.current.getBoundingClientRect();l.setActiveRect({left:h.left,width:h.width})}};return f(),window.addEventListener("resize",f),()=>window.removeEventListener("resize",f)}},[u,l]),b.jsx("button",{ref:d,role:"tab",type:"button","aria-selected":u,"data-state":u?"active":"inactive",onClick:()=>s(n),className:D(gF({variant:t,size:r,className:e})),...o})});yF.displayName="TabTrigger";const bF=te("font-sans",{variants:{size:{sm:"text-small mt-3",default:"text-body mt-4",lg:"text-body mt-6"}},defaultVariants:{size:"default"}}),xF=p.forwardRef(({className:e,size:t,value:r,...n},o)=>{const{activeTab:i}=fF(),a=i===r;return a?b.jsx("div",{ref:o,role:"tabpanel","data-state":a?"active":"inactive",className:D(bF({size:t,className:e})),...n}):null});xF.displayName="TabContent";const wF=te("bg-card text-body-sm text-primary placeholder:text-tertiary placeholder:text-body-sm 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"}}),SF=p.forwardRef(({className:e,variant:t,resize:r,...n},o)=>b.jsx("textarea",{className:D(wF({variant:t,resize:r}),e),ref:o,...n}));SF.displayName="Textarea";var tx="ToastProvider",[rx,kge,Dge]=Ri("Toast"),[PF]=it("Toast",[Dge]),[_ge,Xd]=PF(tx),CF=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,l]=p.useState(null),[c,u]=p.useState(0),d=p.useRef(!1),f=p.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${tx}\`. Expected non-empty \`string\`.`),b.jsx(rx.Provider,{scope:t,children:b.jsx(_ge,{scope:t,label:r,duration:n,swipeDirection:o,swipeThreshold:i,toastCount:c,viewport:s,onViewportChange:l,onToastAdd:p.useCallback(()=>u(h=>h+1),[]),onToastRemove:p.useCallback(()=>u(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:a})})};CF.displayName=tx;var OF="ToastViewport",Nge=["F8"],dv="toast.viewportPause",fv="toast.viewportResume",EF=p.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=Nge,label:o="Notifications ({hotkey})",...i}=e,a=Xd(OF,r),s=kge(r),l=p.useRef(null),c=p.useRef(null),u=p.useRef(null),d=p.useRef(null),f=ie(t,d,a.onViewportChange),h=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),v=a.toastCount>0;p.useEffect(()=>{const g=y=>{n.length!==0&&n.every(w=>y[w]||y.code===w)&&d.current?.focus()};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[n]),p.useEffect(()=>{const g=l.current,y=d.current;if(v&&g&&y){const x=()=>{if(!a.isClosePausedRef.current){const C=new CustomEvent(dv);y.dispatchEvent(C),a.isClosePausedRef.current=!0}},w=()=>{if(a.isClosePausedRef.current){const C=new CustomEvent(fv);y.dispatchEvent(C),a.isClosePausedRef.current=!1}},S=C=>{!g.contains(C.relatedTarget)&&w()},P=()=>{g.contains(document.activeElement)||w()};return g.addEventListener("focusin",x),g.addEventListener("focusout",S),g.addEventListener("pointermove",x),g.addEventListener("pointerleave",P),window.addEventListener("blur",x),window.addEventListener("focus",w),()=>{g.removeEventListener("focusin",x),g.removeEventListener("focusout",S),g.removeEventListener("pointermove",x),g.removeEventListener("pointerleave",P),window.removeEventListener("blur",x),window.removeEventListener("focus",w)}}},[v,a.isClosePausedRef]);const m=p.useCallback(({tabbingDirection:g})=>{const x=s().map(w=>{const S=w.ref.current,P=[S,...Hge(S)];return g==="forwards"?P:P.reverse()});return(g==="forwards"?x.reverse():x).flat()},[s]);return p.useEffect(()=>{const g=d.current;if(g){const y=x=>{const w=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!w){const P=document.activeElement,C=x.shiftKey;if(x.target===g&&C){c.current?.focus();return}const T=m({tabbingDirection:C?"backwards":"forwards"}),M=T.findIndex(_=>_===P);yh(T.slice(M+1))?x.preventDefault():C?c.current?.focus():u.current?.focus()}};return g.addEventListener("keydown",y),()=>g.removeEventListener("keydown",y)}},[s,m]),b.jsxs(vz,{ref:l,role:"region","aria-label":o.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:v?void 0:"none"},children:[v&&b.jsx(pv,{ref:c,onFocusFromOutsideViewport:()=>{const g=m({tabbingDirection:"forwards"});yh(g)}}),b.jsx(rx.Slot,{scope:r,children:b.jsx(ee.ol,{tabIndex:-1,...i,ref:f})}),v&&b.jsx(pv,{ref:u,onFocusFromOutsideViewport:()=>{const g=m({tabbingDirection:"backwards"});yh(g)}})]})});EF.displayName=OF;var AF="ToastFocusProxy",pv=p.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...o}=e,i=Xd(AF,r);return b.jsx(Kd,{tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:a=>{const s=a.relatedTarget;!i.viewport?.contains(s)&&n()}})});pv.displayName=AF;var Qs="Toast",jge="toast.swipeStart",Ige="toast.swipeMove",Rge="toast.swipeCancel",Lge="toast.swipeEnd",TF=p.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:o,onOpenChange:i,...a}=e,[s,l]=xt({prop:n,defaultProp:o??!0,onChange:i,caller:Qs});return b.jsx(At,{present:r||s,children:b.jsx(Fge,{open:s,...a,ref:t,onClose:()=>l(!1),onPause:Et(e.onPause),onResume:Et(e.onResume),onSwipeStart:U(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:U(e.onSwipeMove,c=>{const{x:u,y:d}=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",`${d}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:d}=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",`${d}px`),l(!1)})})})});TF.displayName=Qs;var[$ge,Vge]=PF(Qs,{onClose(){}}),Fge=p.forwardRef((e,t)=>{const{__scopeToast:r,type:n="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:s,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:h,...v}=e,m=Xd(Qs,r),[g,y]=p.useState(null),x=ie(t,R=>y(R)),w=p.useRef(null),S=p.useRef(null),P=o||m.duration,C=p.useRef(0),E=p.useRef(P),A=p.useRef(0),{onToastAdd:T,onToastRemove:M}=m,_=Et(()=>{g?.contains(document.activeElement)&&m.viewport?.focus(),a()}),k=p.useCallback(R=>{!R||R===1/0||(window.clearTimeout(A.current),C.current=new Date().getTime(),A.current=window.setTimeout(_,R))},[_]);p.useEffect(()=>{const R=m.viewport;if(R){const z=()=>{k(E.current),c?.()},B=()=>{const F=new Date().getTime()-C.current;E.current=E.current-F,window.clearTimeout(A.current),l?.()};return R.addEventListener(dv,B),R.addEventListener(fv,z),()=>{R.removeEventListener(dv,B),R.removeEventListener(fv,z)}}},[m.viewport,P,l,c,k]),p.useEffect(()=>{i&&!m.isClosePausedRef.current&&k(P)},[i,P,m.isClosePausedRef,k]),p.useEffect(()=>(T(),()=>M()),[T,M]);const N=p.useMemo(()=>g?IF(g):null,[g]);return m.viewport?b.jsxs(b.Fragment,{children:[N&&b.jsx(Bge,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite",children:N}),b.jsx($ge,{scope:r,onClose:_,children:as.createPortal(b.jsx(rx.ItemSlot,{scope:r,children:b.jsx(mz,{asChild:!0,onEscapeKeyDown:U(s,()=>{m.isFocusedToastEscapeKeyDownRef.current||_(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:b.jsx(ee.li,{tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":m.swipeDirection,...v,ref:x,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:U(e.onKeyDown,R=>{R.key==="Escape"&&(s?.(R.nativeEvent),R.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,_()))}),onPointerDown:U(e.onPointerDown,R=>{R.button===0&&(w.current={x:R.clientX,y:R.clientY})}),onPointerMove:U(e.onPointerMove,R=>{if(!w.current)return;const z=R.clientX-w.current.x,B=R.clientY-w.current.y,F=!!S.current,j=["left","right"].includes(m.swipeDirection),L=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,H=j?L(0,z):0,re=j?0:L(0,B),le=R.pointerType==="touch"?10:2,ae={x:H,y:re},oe={originalEvent:R,delta:ae};F?(S.current=ae,Fl(Ige,d,oe,{discrete:!1})):_O(ae,m.swipeDirection,le)?(S.current=ae,Fl(jge,u,oe,{discrete:!1}),R.target.setPointerCapture(R.pointerId)):(Math.abs(z)>le||Math.abs(B)>le)&&(w.current=null)}),onPointerUp:U(e.onPointerUp,R=>{const z=S.current,B=R.target;if(B.hasPointerCapture(R.pointerId)&&B.releasePointerCapture(R.pointerId),S.current=null,w.current=null,z){const F=R.currentTarget,j={originalEvent:R,delta:z};_O(z,m.swipeDirection,m.swipeThreshold)?Fl(Lge,h,j,{discrete:!0}):Fl(Rge,f,j,{discrete:!0}),F.addEventListener("click",L=>L.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),Bge=e=>{const{__scopeToast:t,children:r,...n}=e,o=Xd(Qs,t),[i,a]=p.useState(!1),[s,l]=p.useState(!1);return Kge(()=>a(!0)),p.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:b.jsx(Bo,{asChild:!0,children:b.jsx(Kd,{...n,children:i&&b.jsxs(b.Fragment,{children:[o.label," ",r]})})})},Wge="ToastTitle",MF=p.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return b.jsx(ee.div,{...n,ref:t})});MF.displayName=Wge;var zge="ToastDescription",kF=p.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return b.jsx(ee.div,{...n,ref:t})});kF.displayName=zge;var DF="ToastAction",_F=p.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?b.jsx(jF,{altText:r,asChild:!0,children:b.jsx(nx,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${DF}\`. Expected non-empty \`string\`.`),null)});_F.displayName=DF;var NF="ToastClose",nx=p.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,o=Vge(NF,r);return b.jsx(jF,{asChild:!0,children:b.jsx(ee.button,{type:"button",...n,ref:t,onClick:U(e.onClick,o.onClose)})})});nx.displayName=NF;var jF=p.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 IF(e){const t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),Uge(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(...IF(n))}}),t}function Fl(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?vv(o,i):o.dispatchEvent(i)}var _O=(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 Kge(e=()=>{}){const t=Et(e);pt(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function Uge(e){return e.nodeType===e.ELEMENT_NODE}function Hge(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 yh(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var Gge=CF,Yge=EF,qge=TF,Xge=MF,Zge=kF,Qge=_F,Jge=nx;const eye=Gge,RF=p.forwardRef(({className:e,...t},r)=>b.jsx(Yge,{ref:r,className:D("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}));RF.displayName="ToastViewport";const LF=te(["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"}}),$F=p.forwardRef(({className:e,variant:t,...r},n)=>b.jsx(qge,{ref:n,className:D(LF({variant:t}),e),...r}));$F.displayName="Toast";const VF=p.forwardRef(({className:e,...t},r)=>b.jsx(Qge,{ref:r,className:D("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}));VF.displayName="ToastAction";const FF=p.forwardRef(({className:e,...t},r)=>b.jsxs(Jge,{ref:r,className:D("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(oE,{className:"h-4 w-4"}),b.jsx("span",{className:"sr-only",children:"Close"})]}));FF.displayName="ToastClose";const BF=p.forwardRef(({className:e,...t},r)=>b.jsx(Xge,{ref:r,className:D("text-sm",e),...t}));BF.displayName="ToastTitle";const WF=p.forwardRef(({className:e,...t},r)=>b.jsx(Zge,{ref:r,className:D("text-secondary text-sm",e),...t}));WF.displayName="ToastDescription";var tye=Symbol("radix.slottable");function rye(e){const t=({children:r})=>b.jsx(b.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=tye,t}var[Zd]=it("Tooltip",[Zn]),Qd=Zn(),zF="TooltipProvider",nye=700,hv="tooltip.open",[oye,ox]=Zd(zF),KF=e=>{const{__scopeTooltip:t,delayDuration:r=nye,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:i}=e,a=p.useRef(!0),s=p.useRef(!1),l=p.useRef(0);return p.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),b.jsx(oye,{scope:t,isOpenDelayedRef:a,delayDuration:r,onOpen:p.useCallback(()=>{window.clearTimeout(l.current),a.current=!1},[]),onClose:p.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.current=!0,n)},[n]),isPointerInTransitRef:s,onPointerInTransitChange:p.useCallback(c=>{s.current=c},[]),disableHoverableContent:o,children:i})};KF.displayName=zF;var os="Tooltip",[iye,Js]=Zd(os),UF=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o,onOpenChange:i,disableHoverableContent:a,delayDuration:s}=e,l=ox(os,e.__scopeTooltip),c=Qd(t),[u,d]=p.useState(null),f=It(),h=p.useRef(0),v=a??l.disableHoverableContent,m=s??l.delayDuration,g=p.useRef(!1),[y,x]=xt({prop:n,defaultProp:o??!1,onChange:E=>{E?(l.onOpen(),document.dispatchEvent(new CustomEvent(hv))):l.onClose(),i?.(E)},caller:os}),w=p.useMemo(()=>y?g.current?"delayed-open":"instant-open":"closed",[y]),S=p.useCallback(()=>{window.clearTimeout(h.current),h.current=0,g.current=!1,x(!0)},[x]),P=p.useCallback(()=>{window.clearTimeout(h.current),h.current=0,x(!1)},[x]),C=p.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{g.current=!0,x(!0),h.current=0},m)},[m,x]);return p.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),b.jsx(Fs,{...c,children:b.jsx(iye,{scope:t,contentId:f,open:y,stateAttribute:w,trigger:u,onTriggerChange:d,onTriggerEnter:p.useCallback(()=>{l.isOpenDelayedRef.current?C():S()},[l.isOpenDelayedRef,C,S]),onTriggerLeave:p.useCallback(()=>{v?P():(window.clearTimeout(h.current),h.current=0)},[P,v]),onOpen:S,onClose:P,disableHoverableContent:v,children:r})})};UF.displayName=os;var mv="TooltipTrigger",HF=p.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Js(mv,r),i=ox(mv,r),a=Qd(r),s=p.useRef(null),l=ie(t,s,o.onTriggerChange),c=p.useRef(!1),u=p.useRef(!1),d=p.useCallback(()=>c.current=!1,[]);return p.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),b.jsx(Bs,{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,f=>{f.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",d,{once:!0})}),onFocus:U(e.onFocus,()=>{c.current||o.onOpen()}),onBlur:U(e.onBlur,o.onClose),onClick:U(e.onClick,o.onClose)})})});HF.displayName=mv;var ix="TooltipPortal",[aye,sye]=Zd(ix,{forceMount:void 0}),GF=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,i=Js(ix,t);return b.jsx(aye,{scope:t,forceMount:r,children:b.jsx(At,{present:r||i.open,children:b.jsx(Bo,{asChild:!0,container:o,children:n})})})};GF.displayName=ix;var Ii="TooltipContent",YF=p.forwardRef((e,t)=>{const r=sye(Ii,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...i}=e,a=Js(Ii,e.__scopeTooltip);return b.jsx(At,{present:n||a.open,children:a.disableHoverableContent?b.jsx(qF,{side:o,...i,ref:t}):b.jsx(lye,{side:o,...i,ref:t})})}),lye=p.forwardRef((e,t)=>{const r=Js(Ii,e.__scopeTooltip),n=ox(Ii,e.__scopeTooltip),o=p.useRef(null),i=ie(t,o),[a,s]=p.useState(null),{trigger:l,onClose:c}=r,u=o.current,{onPointerInTransitChange:d}=n,f=p.useCallback(()=>{s(null),d(!1)},[d]),h=p.useCallback((v,m)=>{const g=v.currentTarget,y={x:v.clientX,y:v.clientY},x=fye(y,g.getBoundingClientRect()),w=pye(y,x),S=hye(m.getBoundingClientRect()),P=vye([...w,...S]);s(P),d(!0)},[d]);return p.useEffect(()=>()=>f(),[f]),p.useEffect(()=>{if(l&&u){const v=g=>h(g,u),m=g=>h(g,l);return l.addEventListener("pointerleave",v),u.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",v),u.removeEventListener("pointerleave",m)}}},[l,u,h,f]),p.useEffect(()=>{if(a){const v=m=>{const g=m.target,y={x:m.clientX,y:m.clientY},x=l?.contains(g)||u?.contains(g),w=!mye(y,a);x?f():w&&(f(),c())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[l,u,a,c,f]),b.jsx(qF,{...e,ref:i})}),[cye,uye]=Zd(os,{isInside:!1}),dye=rye("TooltipContent"),qF=p.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...s}=e,l=Js(Ii,r),c=Qd(r),{onClose:u}=l;return p.useEffect(()=>(document.addEventListener(hv,u),()=>document.removeEventListener(hv,u)),[u]),p.useEffect(()=>{if(l.trigger){const d=f=>{f.target?.contains(l.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,u]),b.jsx(Fo,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:u,children:b.jsxs(Td,{"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(dye,{children:n}),b.jsx(cye,{scope:r,isInside:!0,children:b.jsx(fve,{id:l.contentId,role:"tooltip",children:o||n})})]})})});YF.displayName=Ii;var XF="TooltipArrow",ZF=p.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Qd(r);return uye(XF,r).isInside?null:b.jsx(Md,{...o,...n,ref:t})});ZF.displayName=XF;function fye(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 pye(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 hye(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 mye(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,d=l.x,f=l.y;u>n!=f>n&&r<(d-c)*(n-u)/(f-u)+c&&(o=!o)}return o}function vye(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),gye(t)}function gye(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 yye=KF,bye=UF,xye=HF,wye=GF,Sye=YF,Pye=ZF;const Cye=yye,Oye=bye,Eye=xye,QF=wye,ax=p.forwardRef(({className:e,...t},r)=>b.jsx(Pye,{ref:r,className:D("fill-primary",e),...t}));ax.displayName="TooltipArrow";const JF=te(["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"}}),eB=p.forwardRef(({className:e,variant:t,sideOffset:r=4,showArrow:n=!1,children:o,...i},a)=>b.jsx(QF,{children:b.jsxs(Sye,{ref:a,sideOffset:r,className:D(JF({variant:t,className:e})),...i,children:[o,n&&b.jsx(ax,{className:t==="light"?"fill-card":"fill-primary"})]})}));eB.displayName="TooltipContent";exports.Accordion=bE;exports.AccordionContent=PE;exports.AccordionItem=xE;exports.AccordionTrigger=SE;exports.ActionsMenuButton=gR;exports.AlertDialog=J3;exports.AlertDialogAction=TA;exports.AlertDialogCancel=MA;exports.AlertDialogContent=PA;exports.AlertDialogDescription=AA;exports.AlertDialogFooter=OA;exports.AlertDialogHeader=CA;exports.AlertDialogOverlay=Dv;exports.AlertDialogPortal=wA;exports.AlertDialogTitle=EA;exports.AlertDialogTrigger=e5;exports.Badge=DA;exports.Banner=NA;exports.BarChart=W_;exports.BreadcrumbItem=U_;exports.BreadcrumbSeparator=$y;exports.Breadcrumbs=K_;exports.Button=kv;exports.Calendar=Rs;exports.Card=CN;exports.Checkbox=NN;exports.ContextMenu=_ce;exports.ContextMenuCheckboxItem=bI;exports.ContextMenuContent=gI;exports.ContextMenuGroup=jce;exports.ContextMenuItem=yI;exports.ContextMenuLabel=wI;exports.ContextMenuPortal=hI;exports.ContextMenuRadioGroup=Rce;exports.ContextMenuRadioItem=xI;exports.ContextMenuSeparator=SI;exports.ContextMenuShortcut=PI;exports.ContextMenuSub=Ice;exports.ContextMenuSubContent=vI;exports.ContextMenuSubTrigger=mI;exports.ContextMenuTrigger=Nce;exports.DatePicker=II;exports.DateRangePicker=LI;exports.DateTimePicker=VI;exports.Divider=BI;exports.DropdownMenu=kue;exports.DropdownMenuCheckboxItem=fR;exports.DropdownMenuContent=uR;exports.DropdownMenuGroup=_ue;exports.DropdownMenuItem=dR;exports.DropdownMenuLabel=hR;exports.DropdownMenuPortal=sR;exports.DropdownMenuRadioGroup=jue;exports.DropdownMenuRadioItem=pR;exports.DropdownMenuSeparator=mR;exports.DropdownMenuShortcut=vR;exports.DropdownMenuSub=Nue;exports.DropdownMenuSubContent=cR;exports.DropdownMenuSubTrigger=lR;exports.DropdownMenuTrigger=Due;exports.EngrateLogo=bR;exports.Eyebrow=wR;exports.Footer=PR;exports.FooterBottom=TR;exports.FooterContent=CR;exports.FooterCopyright=MR;exports.FooterHeading=ER;exports.FooterLinks=AR;exports.FooterSection=OR;exports.FormField=_R;exports.FormMessage=fb;exports.Grid=NR;exports.GridItem=jR;exports.Header=RR;exports.HeaderActions=VR;exports.HeaderLogo=LR;exports.HeaderNav=$R;exports.Heading=hb;exports.Input=WR;exports.Label=pb;exports.LineChart=KR;exports.Link=HR;exports.Modal=jL;exports.ModalClose=Ume;exports.ModalContent=LL;exports.ModalDescription=BL;exports.ModalFooter=VL;exports.ModalHeader=$L;exports.ModalOverlay=Gb;exports.ModalPortal=IL;exports.ModalTitle=FL;exports.ModalTrigger=Kme;exports.Pagination=KL;exports.PaginationDot=qL;exports.PaginationDots=GL;exports.PaginationItem=gi;exports.PieChart=ZL;exports.ProgressIndicator=e$;exports.RadioGroup=p$;exports.RadioGroupItem=h$;exports.Select=Yve;exports.SelectContent=H$;exports.SelectGroup=qve;exports.SelectItem=Y$;exports.SelectLabel=G$;exports.SelectScrollDownButton=Zb;exports.SelectScrollUpButton=Xb;exports.SelectSeparator=q$;exports.SelectTrigger=U$;exports.SelectValue=Xve;exports.Sidebar=Q$;exports.SidebarContent=eV;exports.SidebarFooter=tV;exports.SidebarGroup=rV;exports.SidebarGroupLabel=nV;exports.SidebarHeader=J$;exports.SidebarItem=oV;exports.SidebarSeparator=aV;exports.SidebarSub=lV;exports.SidebarSubContent=uV;exports.SidebarSubTrigger=cV;exports.SidebarTrigger=iV;exports.Skeleton=fV;exports.Slider=TV;exports.Spinner=kV;exports.Stack=_V;exports.Stepper=VV;exports.StepperDescription=GV;exports.StepperIndicator=UV;exports.StepperItem=BV;exports.StepperSeparator=qV;exports.StepperTitle=HV;exports.StepperTrigger=zV;exports.Switch=tF;exports.TabContent=xF;exports.TabList=vF;exports.TabTrigger=yF;exports.Table=nF;exports.TableBody=iF;exports.TableCaption=uF;exports.TableCell=cF;exports.TableFooter=aF;exports.TableHead=lF;exports.TableHeader=oF;exports.TableRow=sF;exports.Tabs=pF;exports.Text=qo;exports.Textarea=SF;exports.Toast=$F;exports.ToastAction=VF;exports.ToastClose=FF;exports.ToastDescription=WF;exports.ToastProvider=eye;exports.ToastTitle=BF;exports.ToastViewport=RF;exports.Tooltip=Oye;exports.TooltipArrow=ax;exports.TooltipContent=eB;exports.TooltipPortal=QF;exports.TooltipProvider=Cye;exports.TooltipTrigger=Eye;exports.accordionTriggerVariants=wE;exports.accordionVariants=yE;exports.alertDialogContentVariants=SA;exports.badgeVariants=kA;exports.bannerVariants=_A;exports.barChartVariants=B_;exports.breadcrumbItemVariants=Om;exports.breadcrumbsVariants=z_;exports.buttonVariants=Tu;exports.cardVariants=PN;exports.cn=D;exports.datePickerTriggerVariants=jI;exports.dateRangePickerTriggerVariants=RI;exports.dateTimePickerTriggerVariants=$I;exports.dividerVariants=FI;exports.engrateLogoVariants=yR;exports.eyebrowVariants=xR;exports.footerVariants=SR;exports.gridItemVariants=Uue;exports.gridVariants=Fue;exports.headerVariants=IR;exports.headingVariants=FR;exports.inputVariants=BR;exports.labelVariants=DR;exports.lineChartVariants=zR;exports.linkVariants=UR;exports.miniStepperIndicatorVariants=LV;exports.miniStepperSeparatorVariants=$V;exports.miniStepperVariants=RV;exports.modalContentVariants=RL;exports.paginationDotVariants=YL;exports.paginationDotsVariants=HL;exports.paginationItemVariants=zL;exports.paginationVariants=WL;exports.pieChartVariants=XL;exports.progressBarVariants=JL;exports.progressIndicatorVariants=QL;exports.sidebarItemVariants=ns;exports.sidebarVariants=Z$;exports.skeletonVariants=dV;exports.sliderVariants=AV;exports.spinnerVariants=MV;exports.stackVariants=DV;exports.stepperIndicatorVariants=KV;exports.stepperItemVariants=FV;exports.stepperSeparatorVariants=YV;exports.stepperTriggerVariants=WV;exports.stepperVariants=IV;exports.tabContentVariants=bF;exports.tabListVariants=hF;exports.tabTriggerVariants=gF;exports.tableVariants=rF;exports.textVariants=_L;exports.textareaVariants=wF;exports.toastVariants=LF;exports.tooltipContentVariants=JF;exports.useFilterableTable=Mge;exports.useSidebarContext=Xo;exports.useSidebarSubContext=sV;exports.useSortableTable=Tge;
108
+ `),()=>{P.contains(S)&&P.removeChild(S)}},[t]),b.jsx(_he,{isPresent:t,childRef:s,sizeRef:l,pop:i,children:i===!1?e:p.cloneElement(e,{ref:d})})}const jhe=({children:e,initial:t,isPresent:r,onExitComplete:n,custom:o,presenceAffectsLayout:i,mode:a,anchorX:s,anchorY:l,root:c})=>{const u=gb(Ihe),d=O.useId();let f=!0,h=O.useMemo(()=>(f=!1,{id:d,initial:t,isPresent:r,custom:o,onExitComplete:v=>{u.set(v,!0);for(const m of u.values())if(!m)return;n&&n()},register:v=>(u.set(v,!1),()=>u.delete(v))}),[r,u,n]);return i&&f&&(h={...h}),O.useMemo(()=>{u.forEach((v,m)=>u.set(m,!1))},[r]),p.useEffect(()=>{!r&&!u.size&&n&&n()},[r]),e=b.jsx(Nhe,{pop:a==="popLayout",isPresent:r,anchorX:s,anchorY:l,root:c,children:e}),b.jsx(Vd.Provider,{value:h,children:e})};function Ihe(){return new Map}function yL(e=!0){const t=O.useContext(Vd);if(t===null)return[!0,null];const{isPresent:r,onExitComplete:n,register:o}=t,i=O.useId();O.useEffect(()=>{if(e)return o(i)},[e]);const a=O.useCallback(()=>e&&n&&n(i),[i,n,e]);return!r&&n?[!1,a]:[!0]}const $l=e=>e.key||"";function gO(e){const t=[];return O.Children.forEach(e,r=>{O.isValidElement(r)&&t.push(r)}),t}const Rhe=({children:e,custom:t,initial:r=!0,onExitComplete:n,presenceAffectsLayout:o=!0,mode:i="sync",propagate:a=!1,anchorX:s="left",anchorY:l="top",root:c})=>{const[u,d]=yL(a),f=O.useMemo(()=>gO(e),[e]),h=a&&!u?[]:f.map($l),v=O.useRef(!0),m=O.useRef(f),g=gb(()=>new Map),y=O.useRef(new Set),[x,w]=O.useState(f),[S,P]=O.useState(f);YR(()=>{v.current=!1,m.current=f;for(let A=0;A<S.length;A++){const T=$l(S[A]);h.includes(T)?(g.delete(T),y.current.delete(T)):g.get(T)!==!0&&g.set(T,!1)}},[S,h.length,h.join("-")]);const C=[];if(f!==x){let A=[...f];for(let T=0;T<S.length;T++){const M=S[T],_=$l(M);h.includes(_)||(A.splice(T,0,M),C.push(M))}return i==="wait"&&C.length&&(A=C),P(gO(A)),w(f),null}process.env.NODE_ENV!=="production"&&i==="wait"&&S.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:E}=O.useContext(vb);return b.jsx(b.Fragment,{children:S.map(A=>{const T=$l(A),M=a&&!u?!1:f===S||h.includes(T),_=()=>{if(y.current.has(T))return;if(y.current.add(T),g.has(T))g.set(T,!0);else return;let k=!0;g.forEach(N=>{N||(k=!1)}),k&&(E?.(),P(m.current),a&&d?.(),n&&n())};return b.jsx(jhe,{isPresent:M,initial:!v.current||r?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,root:c,onExitComplete:M?void 0:_,anchorX:s,anchorY:l,children:A},T)})})},bL=O.createContext({strict:!1}),yO={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let bO=!1;function Lhe(){if(bO)return;const e={};for(const t in yO)e[t]={isEnabled:r=>yO[t].some(n=>!!r[n])};Y2(e),bO=!0}function xL(){return Lhe(),Spe()}function $he(e){const t=xL();for(const r in e)t[r]={...t[r],...e[r]};Y2(t)}const Vhe=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function gu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Vhe.has(e)}let wL=e=>!gu(e);function Fhe(e){typeof e=="function"&&(wL=t=>t.startsWith("on")?!gu(t):e(t))}try{Fhe(require("@emotion/is-prop-valid").default)}catch{}function Bhe(e,t,r){const n={};for(const o in e)o==="values"&&typeof e.values=="object"||(wL(o)||r===!0&&gu(o)||!t&&!gu(o)||e.draggable&&o.startsWith("onDrag"))&&(n[o]=e[o]);return n}const Wd=O.createContext({});function Whe(e,t){if(Bd(e)){const{initial:r,animate:n}=e;return{initial:r===!1||ts(r)?r:void 0,animate:ts(n)?n:void 0}}return e.inherit!==!1?t:{}}function zhe(e){const{initial:t,animate:r}=Whe(e,O.useContext(Wd));return O.useMemo(()=>({initial:t,animate:r}),[xO(t),xO(r)])}function xO(e){return Array.isArray(e)?e.join(" "):e}const Hb=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function SL(e,t,r){for(const n in t)!Ct(t[n])&&!tL(n,r)&&(e[n]=t[n])}function Khe({transformTemplate:e},t){return O.useMemo(()=>{const r=Hb();return zb(r,t,e),Object.assign({},r.vars,r.style)},[t])}function Uhe(e,t){const r=e.style||{},n={};return SL(n,r,e),Object.assign(n,Khe(e,t)),n}function Hhe(e,t){const r={},n=Uhe(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=n,r}const PL=()=>({...Hb(),attrs:{}});function Ghe(e,t,r,n){const o=O.useMemo(()=>{const i=PL();return rL(i,t,oL(n),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};SL(i,e.style,e),o.style={...i,...o.style}}return o}const Yhe=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Gb(e){return typeof e!="string"||e.includes("-")?!1:!!(Yhe.indexOf(e)>-1||/[A-Z]/u.test(e))}function qhe(e,t,r,{latestValues:n},o,i=!1,a){const l=(a??Gb(e)?Ghe:Hhe)(t,n,o,e),c=Bhe(t,typeof e=="string",i),u=e!==O.Fragment?{...c,...l,ref:r}:{},{children:d}=t,f=O.useMemo(()=>Ct(d)?d.get():d,[d]);return O.createElement(e,{...u,children:f})}function Xhe({scrapeMotionValuesFromProps:e,createRenderState:t},r,n,o){return{latestValues:Zhe(r,n,o,e),renderState:t()}}function Zhe(e,t,r,n){const o={},i=n(e,{});for(const f in i)o[f]=tc(i[f]);let{initial:a,animate:s}=e;const l=Bd(e),c=H2(e);t&&c&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let u=r?r.initial===!1:!1;u=u||a===!1;const d=u?s:a;if(d&&typeof d!="boolean"&&!Fd(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const v=Ib(e,f[h]);if(v){const{transitionEnd:m,transition:g,...y}=v;for(const x in y){let w=y[x];if(Array.isArray(w)){const S=u?w.length-1:0;w=w[S]}w!==null&&(o[x]=w)}for(const x in m)o[x]=m[x]}}}return o}const CL=e=>(t,r)=>{const n=O.useContext(Wd),o=O.useContext(Vd),i=()=>Xhe(e,t,n,o);return r?i():gb(i)},Qhe=CL({scrapeMotionValuesFromProps:Kb,createRenderState:Hb}),Jhe=CL({scrapeMotionValuesFromProps:iL,createRenderState:PL}),eme=Symbol.for("motionComponentSymbol");function tme(e,t,r){const n=O.useRef(r);O.useInsertionEffect(()=>{n.current=r});const o=O.useRef(null);return O.useCallback(i=>{i&&e.onMount?.(i),t&&(i?t.mount(i):t.unmount());const a=n.current;if(typeof a=="function")if(i){const s=a(i);typeof s=="function"&&(o.current=s)}else o.current?(o.current(),o.current=null):a(i);else a&&(a.current=i)},[t])}const OL=O.createContext({});function li(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function rme(e,t,r,n,o,i){const{visualElement:a}=O.useContext(Wd),s=O.useContext(bL),l=O.useContext(Vd),c=O.useContext(Ub),u=c.reducedMotion,d=c.skipAnimations,f=O.useRef(null),h=O.useRef(!1);n=n||s.renderer,!f.current&&n&&(f.current=n(e,{visualState:t,parent:a,props:r,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:i}),h.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const v=f.current,m=O.useContext(OL);v&&!v.projection&&o&&(v.type==="html"||v.type==="svg")&&nme(f.current,r,o,m);const g=O.useRef(!1);O.useInsertionEffect(()=>{v&&g.current&&v.update(r,l)});const y=r[N2],x=O.useRef(!!y&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return YR(()=>{h.current=!0,v&&(g.current=!0,window.MotionIsMounted=!0,v.updateFeatures(),v.scheduleRenderMicrotask(),x.current&&v.animationState&&v.animationState.animateChanges())}),O.useEffect(()=>{v&&(!x.current&&v.animationState&&v.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),x.current=!1),v.enteringChildren=void 0)}),v}function nme(e,t,r,n){const{layoutId:o,layout:i,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:EL(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||s&&li(s),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:n,crossfade:u,layoutScroll:l,layoutRoot:c})}function EL(e){if(e)return e.options.allowProjection!==!1?e.projection:EL(e.parent)}function ph(e,{forwardMotionProps:t=!1,type:r}={},n,o){n&&$he(n);const i=r?r==="svg":Gb(e),a=i?Jhe:Qhe;function s(c,u){let d;const f={...O.useContext(Ub),...c,layoutId:ome(c)},{isStatic:h}=f,v=zhe(c),m=a(c,h);if(!h&&GR){ime(f,n);const g=ame(f);d=g.MeasureLayout,v.visualElement=rme(e,m,f,o,g.ProjectionNode,i)}return b.jsxs(Wd.Provider,{value:v,children:[d&&v.visualElement?b.jsx(d,{visualElement:v.visualElement,...f}):null,qhe(e,c,tme(m,v.visualElement,u),m,h,t,i)]})}s.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=O.forwardRef(s);return l[eme]=e,l}function ome({layoutId:e}){const t=O.useContext(vb).id;return t&&e!==void 0?t+"-"+e:e}function ime(e,t){const r=O.useContext(bL).strict;if(process.env.NODE_ENV!=="production"&&t&&r){const n="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Ji(!1,n,"lazy-strict-mode"):hn(!1,n,"lazy-strict-mode")}}function ame(e){const t=xL(),{drag:r,layout:n}=t;if(!r&&!n)return{};const o={...r,...n};return{MeasureLayout:r?.isEnabled(e)||n?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function sme(e,t){if(typeof Proxy>"u")return ph;const r=new Map,n=(i,a)=>ph(i,a,e,t),o=(i,a)=>(process.env.NODE_ENV!=="production"&&wb(!1,"motion() is deprecated. Use motion.create() instead."),n(i,a));return new Proxy(o,{get:(i,a)=>a==="create"?n:(r.has(a)||r.set(a,ph(a,void 0,e,t)),r.get(a))})}const lme=(e,t)=>t.isSVG??Gb(e)?new Vpe(t):new Npe(t,{allowProjection:e!==O.Fragment});class cme extends eo{constructor(t){super(t),t.animationState||(t.animationState=Kpe(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Fd(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let ume=0;class dme extends eo{constructor(){super(...arguments),this.id=ume++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const o=this.node.animationState.setActive("exit",!t);r&&!t&&o.then(()=>{r(this.id)})}mount(){const{register:t,onExitComplete:r}=this.node.presenceContext||{};r&&r(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const fme={animation:{Feature:cme},exit:{Feature:dme}};function Xs(e){return{point:{x:e.pageX,y:e.pageY}}}const pme=e=>t=>Vb(t)&&e(t,Xs(t));function ka(e,t,r,n){return rs(e,t,pme(r),n)}const AL=({current:e})=>e?e.ownerDocument.defaultView:null,wO=(e,t)=>Math.abs(e-t);function hme(e,t){const r=wO(e.x,t.x),n=wO(e.y,t.y);return Math.sqrt(r**2+n**2)}const SO=new Set(["auto","scroll"]);class TL{constructor(t,r,{transformPagePoint:n,contextWindow:o=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:s}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=h=>{this.handleScroll(h.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=mh(this.lastMoveEventInfo,this.history),v=this.startEvent!==null,m=hme(h.offset,{x:0,y:0})>=this.distanceThreshold;if(!v&&!m)return;const{point:g}=h,{timestamp:y}=yt;this.history.push({...g,timestamp:y});const{onStart:x,onMove:w}=this.handlers;v||(x&&x(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,h)},this.handlePointerMove=(h,v)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=hh(v,this.transformPagePoint),_e.update(this.updatePoint,!0)},this.handlePointerUp=(h,v)=>{this.end();const{onEnd:m,onSessionEnd:g,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=mh(h.type==="pointercancel"?this.lastMoveEventInfo:hh(v,this.transformPagePoint),this.history);this.startEvent&&m&&m(h,x),g&&g(h,x)},!Vb(t))return;this.dragSnapToOrigin=i,this.handlers=r,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=o||window;const l=Xs(t),c=hh(l,this.transformPagePoint),{point:u}=c,{timestamp:d}=yt;this.history=[{...u,timestamp:d}];const{onSessionStart:f}=r;f&&f(t,mh(c,this.history)),this.removeListeners=Gs(ka(this.contextWindow,"pointermove",this.handlePointerMove),ka(this.contextWindow,"pointerup",this.handlePointerUp),ka(this.contextWindow,"pointercancel",this.handlePointerUp)),s&&this.startScrollTracking(s)}startScrollTracking(t){let r=t.parentElement;for(;r;){const n=getComputedStyle(r);(SO.has(n.overflowX)||SO.has(n.overflowY))&&this.scrollPositions.set(r,{x:r.scrollLeft,y:r.scrollTop}),r=r.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const r=this.scrollPositions.get(t);if(!r)return;const n=t===window,o=n?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:o.x-r.x,y:o.y-r.y};i.x===0&&i.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,o),_e.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Kn(this.updatePoint)}}function hh(e,t){return t?{point:t(e.point)}:e}function PO(e,t){return{x:e.x-t.x,y:e.y-t.y}}function mh({point:e},t){return{point:e,delta:PO(e,ML(t)),offset:PO(e,mme(t)),velocity:vme(t,.1)}}function mme(e){return e[0]}function ML(e){return e[e.length-1]}function vme(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null;const o=ML(e);for(;r>=0&&(n=e[r],!(o.timestamp-n.timestamp>cr(t)));)r--;if(!n)return{x:0,y:0};n===e[0]&&e.length>2&&o.timestamp-n.timestamp>cr(t)*2&&(n=e[1]);const i=ar(o.timestamp-n.timestamp);if(i===0)return{x:0,y:0};const a={x:(o.x-n.x)/i,y:(o.y-n.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function gme(e,{min:t,max:r},n){return t!==void 0&&e<t?e=n?Be(t,e,n.min):Math.max(e,t):r!==void 0&&e>r&&(e=n?Be(r,e,n.max):Math.min(e,r)),e}function CO(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function yme(e,{top:t,left:r,bottom:n,right:o}){return{x:CO(e.x,r,o),y:CO(e.y,t,n)}}function OO(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,n]=[n,r]),{min:r,max:n}}function bme(e,t){return{x:OO(e.x,t.x),y:OO(e.y,t.y)}}function xme(e,t){let r=.5;const n=jt(e),o=jt(t);return o>n?r=Qa(t.min,t.max-n,e.min):n>o&&(r=Qa(e.min,e.max-o,t.min)),Ur(0,1,r)}function wme(e,t){const r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}const tv=.35;function Sme(e=tv){return e===!1?e=0:e===!0&&(e=tv),{x:EO(e,"left","right"),y:EO(e,"top","bottom")}}function EO(e,t,r){return{min:AO(e,t),max:AO(e,r)}}function AO(e,t){return typeof e=="number"?e:e[t]||0}const Pme=new WeakMap;class Cme{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=nt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:r=!1,distanceThreshold:n}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const i=d=>{r&&this.snapToCursor(Xs(d).point),this.stopAnimation()},a=(d,f)=>{const{drag:h,dragPropagation:v,onDragStart:m}=this.getProps();if(h&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Qfe(h),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),kr(y=>{let x=this.getAxisMotionValue(y).get()||0;if(Vr.test(x)){const{projection:w}=this.visualElement;if(w&&w.layout){const S=w.layout.layoutBox[y];S&&(x=jt(S)*(parseFloat(x)/100))}}this.originPoint[y]=x}),m&&_e.update(()=>m(d,f),!1,!0),Gm(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},s=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:h,dragDirectionLock:v,onDirectionLock:m,onDrag:g}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:y}=f;if(v&&this.currentDirection===null){this.currentDirection=Eme(y),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),g&&_e.update(()=>g(d,f),!1,!0)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{const{dragSnapToOrigin:d}=this.getProps();(d||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new TL(t,{onSessionStart:i,onStart:a,onMove:s,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:n,contextWindow:AL(this.visualElement),element:this.visualElement.current})}stop(t,r){const n=t||this.latestPointerEvent,o=r||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!o||!n)return;const{velocity:a}=o;this.startAnimation(a);const{onDragEnd:s}=this.getProps();s&&_e.postRender(()=>s(n,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,r,n){const{drag:o}=this.getProps();if(!n||!Vl(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(a=gme(a,this.constraints[t],this.elastic[t])),i.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:r}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&li(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&n?this.constraints=yme(n.layoutBox,t):this.constraints=!1,this.elastic=Sme(r),o!==this.constraints&&!li(t)&&n&&this.constraints&&!this.hasMutatedConstraints&&kr(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=wme(n.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!li(t))return!1;const n=t.current;hn(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=Ape(n,o.root,this.visualElement.getTransformPagePoint());let a=bme(o.layout.layoutBox,i);if(r){const s=r(Cpe(a));this.hasMutatedConstraints=!!s,s&&(a=X2(s))}return a}startAnimation(t){const{drag:r,dragMomentum:n,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=kr(u=>{if(!Vl(u,r,this.currentDirection))return;let d=l&&l[u]||{};a&&(d={min:0,max:0});const f=o?200:1e6,h=o?40:1e7,v={type:"inertia",velocity:n?t[u]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,v)});return Promise.all(c).then(s)}startAxisValueAnimation(t,r){const n=this.getAxisMotionValue(t);return Gm(this.visualElement,t),n.start(jb(t,n,0,r,this.visualElement,!1))}stopAnimation(){kr(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const r=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),o=n[r];return o||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){kr(r=>{const{drag:n}=this.getProps();if(!Vl(r,n,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(r);if(o&&o.layout){const{min:a,max:s}=o.layout.layoutBox[r],l=i.get()||0;i.set(t[r]-Be(a,s,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:r}=this.getProps(),{projection:n}=this.visualElement;if(!li(r)||!n||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};kr(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const l=s.get();o[a]=xme({min:l,max:l},this.constraints[a])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),kr(a=>{if(!Vl(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:c}=this.constraints[a];s.set(Be(l,c,o[a]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Pme.set(this.visualElement,this);const t=this.visualElement.current,r=ka(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps(),f=c.target,h=f!==t&&ope(f);u&&d&&!h&&this.start(c)});let n;const o=()=>{const{dragConstraints:c}=this.getProps();li(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),n||(n=Ome(t,c.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,a=i.addEventListener("measure",o);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),_e.read(o);const s=rs(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(kr(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=c[d].translate,f.set(f.get()+c[d].translate))}),this.visualElement.render())}));return()=>{s(),r(),a(),l&&l(),n&&n()}}getProps(){const t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:a=tv,dragMomentum:s=!0}=t;return{...t,drag:r,dragDirectionLock:n,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:s}}}function TO(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Ome(e,t,r){const n=I1(e,TO(r)),o=I1(t,TO(r));return()=>{n(),o()}}function Vl(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function Eme(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}class Ame extends eo{constructor(t){super(t),this.removeGroupControls=lr,this.removeListeners=lr,this.controls=new Cme(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||lr}update(){const{dragControls:t}=this.node.getProps(),{dragControls:r}=this.node.prevProps||{};t!==r&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const vh=e=>(t,r)=>{e&&_e.update(()=>e(t,r),!1,!0)};class Tme extends eo{constructor(){super(...arguments),this.removePointerDownListener=lr}onPointerDown(t){this.session=new TL(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:AL(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:r,onPan:n,onPanEnd:o}=this.node.getProps();return{onSessionStart:vh(t),onStart:vh(r),onMove:vh(n),onEnd:(i,a)=>{delete this.session,o&&_e.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=ka(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let gh=!1;class Mme extends O.Component{componentDidMount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:n,layoutId:o}=this.props,{projection:i}=t;i&&(r.group&&r.group.add(i),n&&n.register&&o&&n.register(i),gh&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),rc.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:r,visualElement:n,drag:o,isPresent:i}=this.props,{projection:a}=n;return a&&(a.isPresent=i,t.layoutDependency!==r&&a.setOptions({...a.options,layoutDependency:r}),gh=!0,o||t.layoutDependency!==r||r===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||_e.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),$b.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:o}=t;gh=!0,o&&(o.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(o),n&&n.deregister&&n.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function kL(e){const[t,r]=yL(),n=O.useContext(vb);return b.jsx(Mme,{...e,layoutGroup:n,switchLayoutGroup:O.useContext(OL),isPresent:t,safeToRemove:r})}const kme={pan:{Feature:Tme},drag:{Feature:Ame,ProjectionNode:gL,MeasureLayout:kL}};function MO(e,t,r){const{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover",r==="Start");const o="onHover"+r,i=n[o];i&&_e.postRender(()=>i(t,Xs(t)))}class Dme extends eo{mount(){const{current:t}=this.node;t&&(this.unmount=epe(t,(r,n)=>(MO(this.node,n,"Start"),o=>MO(this.node,o,"End"))))}unmount(){}}class _me extends eo{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Gs(rs(this.node.current,"focus",()=>this.onFocus()),rs(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function kO(e,t,r){const{props:n}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap",r==="Start");const o="onTap"+(r==="End"?"":r),i=n[o];i&&_e.postRender(()=>i(t,Xs(t)))}class Nme extends eo{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:r,propagate:n}=this.node.props;this.unmount=ape(t,(o,i)=>(kO(this.node,i,"Start"),(a,{success:s})=>kO(this.node,a,s?"End":"Cancel")),{useGlobalTarget:r,stopPropagation:n?.tap===!1})}unmount(){}}const rv=new WeakMap,yh=new WeakMap,jme=e=>{const t=rv.get(e.target);t&&t(e)},Ime=e=>{e.forEach(jme)};function Rme({root:e,...t}){const r=e||document;yh.has(r)||yh.set(r,{});const n=yh.get(r),o=JSON.stringify(t);return n[o]||(n[o]=new IntersectionObserver(Ime,{root:e,...t})),n[o]}function Lme(e,t,r){const n=Rme(t);return rv.set(e,r),n.observe(e),()=>{rv.delete(e),n.unobserve(e)}}const $me={some:0,all:1};class Vme extends eo{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:r,margin:n,amount:o="some",once:i}=t,a={root:r?r.current:void 0,rootMargin:n,threshold:typeof o=="number"?o:$me[o]},s=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return Lme(this.node.current,a,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:r}=this.node;["amount","margin","root"].some(Fme(t,r))&&this.startObserver()}unmount(){}}function Fme({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}const Bme={inView:{Feature:Vme},tap:{Feature:Nme},focus:{Feature:_me},hover:{Feature:Dme}},Wme={layout:{ProjectionNode:gL,MeasureLayout:kL}},zme={...fme,...Bme,...kme,...Wme},DL=sme(zme,lme),_L=te("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","body-sm":"text-body-sm 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"}}),qo=p.forwardRef(({className:e,variant:t="body",weight:r="regular",as:n="p",asChild:o=!1,...i},a)=>{const s=o?Ie:n;return b.jsx(s,{className:D(_L({variant:t,weight:r,className:e})),ref:a,...i})});qo.displayName="Text";const NL=p.createContext(!1),jL=({open:e,defaultOpen:t=!1,onOpenChange:r,children:n,...o})=>{const[i,a]=p.useState(t),s=e!==void 0,l=s?e:i,c=p.useCallback(u=>{s||a(u),r?.(u)},[s,r]);return b.jsx(NL.Provider,{value:l,children:b.jsx(JE,{open:l,onOpenChange:c,...o,children:n})})};jL.displayName="Modal";const Kme=eA,IL=tA,Ume=Au,Yb=p.forwardRef(({className:e,...t},r)=>b.jsx(rA,{ref:r,forceMount:!0,asChild:!0,...t,children:b.jsx(DL.div,{initial:{opacity:0,backdropFilter:"blur(0px)"},animate:{opacity:1,backdropFilter:"blur(4px)"},exit:{opacity:0,backdropFilter:"blur(0px)"},transition:{duration:.2},className:D("fixed inset-0 z-50 bg-black/20",e)})}));Yb.displayName="ModalOverlay";const RL=te(["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-8 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"],{variants:{size:{sm:"max-w-[400px]",default:"max-w-[500px]",lg:"max-w-[640px]",full:"max-w-[95vw]"}},defaultVariants:{size:"default"}}),LL=p.forwardRef(({className:e,children:t,size:r,showCloseButton:n=!0,...o},i)=>{const a=p.useContext(NL);return b.jsx(Rhe,{children:a&&b.jsxs(IL,{forceMount:!0,children:[b.jsx(Yb,{}),b.jsx(nA,{ref:i,forceMount:!0,asChild:!0,...o,children:b.jsxs(DL.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.2},className:D(RL({size:r}),e),children:[t,n&&b.jsx(Au,{asChild:!0,children:b.jsxs(Dv,{variant:"ghost",size:"icon",className:"absolute top-6 right-6",children:[b.jsx(oE,{className:"h-4 w-4"}),b.jsx("span",{className:"sr-only",children:"Close"})]})})]})})]})})});LL.displayName="ModalContent";const $L=p.forwardRef(({className:e,...t},r)=>b.jsx("div",{ref:r,className:D("flex flex-col space-y-1.5 text-center sm:text-left",e),...t}));$L.displayName="ModalHeader";const VL=p.forwardRef(({className:e,...t},r)=>b.jsx("div",{ref:r,className:D("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t}));VL.displayName="ModalFooter";const FL=p.forwardRef(({className:e,children:t,...r},n)=>b.jsx(oA,{ref:n,asChild:!0,...r,children:b.jsx(mb,{level:"h3",className:e,children:t})}));FL.displayName="ModalTitle";const BL=p.forwardRef(({className:e,children:t,...r},n)=>b.jsx(iA,{ref:n,asChild:!0,...r,children:b.jsx(qo,{variant:"semi-lead",className:e,children:t})}));BL.displayName="ModalDescription";const WL=te("flex items-center justify-center gap-1 font-sans",{variants:{size:{sm:"text-small",default:"text-body",lg:"text-lead"}},defaultVariants:{size:"default"}}),zL=te("focus-visible:ring-sunflower inline-flex items-center justify-center font-sans font-normal 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-primary hover:bg-alt active:bg-contrast rounded-full",active:"bg-sunflower text-primary hover:bg-sunflower-hover rounded-full",ellipsis:"text-tertiary cursor-default"},size:{sm:"text-small h-7 w-7",default:"text-small h-9 w-9",lg:"text-body h-11 w-11"}},defaultVariants:{variant:"default",size:"default"}}),KL=p.forwardRef(({className:e,size:t,page:r,totalPages:n,onPageChange:o,siblingCount:i=1,...a},s)=>{const l=p.useMemo(()=>{const d=i*2+3+2;if(n<=d)return Array.from({length:n},(g,y)=>y+1);const f=Math.max(r-i,1),h=Math.min(r+i,n),v=f>2,m=h<n-1;if(!v&&m){const g=3+2*i;return[...Array.from({length:g},(x,w)=>w+1),"ellipsis-right",n]}if(v&&!m){const g=3+2*i;return[1,"ellipsis-left",...Array.from({length:g},(x,w)=>n-g+w+1)]}return v&&m?[1,"ellipsis-left",...Array.from({length:i*2+1},(y,x)=>f+x),"ellipsis-right",n]:Array.from({length:n},(g,y)=>y+1)},[r,n,i]),c=u=>{u>=1&&u<=n&&u!==r&&o?.(u)};return b.jsxs("nav",{ref:s,role:"navigation","aria-label":"Pagination",className:D(WL({size:t,className:e})),...a,children:[b.jsx(gi,{size:t,onClick:()=>c(r-1),disabled:r===1,"aria-label":"Go to previous page",children:b.jsx(Ov,{className:"h-4 w-4"})}),l.map(u=>typeof u=="string"?b.jsx(gi,{size:t,variant:"ellipsis",disabled:!0,"aria-hidden":!0,children:b.jsx(nE,{className:"h-4 w-4"})},u):b.jsx(gi,{size:t,variant:u===r?"active":"default",onClick:()=>c(u),"aria-label":`Go to page ${u}`,"aria-current":u===r?"page":void 0,children:u},u)),b.jsx(gi,{size:t,onClick:()=>c(r+1),disabled:r===n,"aria-label":"Go to next page",children:b.jsx(Ev,{className:"h-4 w-4"})})]})});KL.displayName="Pagination";const gi=p.forwardRef(({className:e,variant:t,size:r,...n},o)=>b.jsx("button",{ref:o,type:"button",className:D(zL({variant:t,size:r,className:e})),...n}));gi.displayName="PaginationItem";const UL=p.createContext(null);function Hme(){const e=p.useContext(UL);if(!e)throw new Error("PaginationDot must be used within a PaginationDots component");return e}const HL=te("inline-flex items-center justify-center font-sans",{variants:{size:{sm:"gap-1.5",default:"gap-2",lg:"gap-2.5"}},defaultVariants:{size:"default"}}),GL=p.forwardRef(({className:e,value:t,onValueChange:r,size:n="default",children:o,...i},a)=>b.jsx(UL.Provider,{value:{value:t,onValueChange:r,size:n??"default"},children:b.jsx("div",{ref:a,role:"group","aria-label":"Content navigation",className:D(HL({size:n}),e),...i,children:o})}));GL.displayName="PaginationDots";const YL=te("focus-visible:ring-sunflower rounded-full transition-all duration-300 ease-out focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",{variants:{size:{sm:"h-1.5",default:"h-2",lg:"h-2.5"},active:{true:"bg-sunflower",false:"bg-border hover:bg-quaternary"}},compoundVariants:[{size:"sm",active:!1,class:"w-1.5"},{size:"default",active:!1,class:"w-2"},{size:"lg",active:!1,class:"w-2.5"},{size:"sm",active:!0,class:"w-4"},{size:"default",active:!0,class:"w-6"},{size:"lg",active:!0,class:"w-8"}],defaultVariants:{size:"default",active:!1}}),qL=p.forwardRef(({className:e,index:t,...r},n)=>{const{value:o,onValueChange:i,size:a}=Hme(),s=t===o;return b.jsx("button",{ref:n,type:"button","aria-label":`Go to slide ${t+1}`,"aria-current":s?"true":void 0,onClick:()=>i?.(t),className:D(YL({size:a,active:s}),e),...r})});qL.displayName="PaginationDot";const XL=te("text-small font-sans tracking-[-0.05em]",{variants:{size:{sm:"h-48",default:"h-72",lg:"h-96"}},defaultVariants:{size:"default"}}),DO=["var(--color-sunflower)","var(--color-electric-blue)","var(--color-cool-purple)","var(--color-deep-blue)","var(--color-warm-purple)"],ZL=p.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,...d},f)=>{const h=p.useMemo(()=>r.reduce((m,g)=>m+g.value,0),[r]),v=p.useCallback(m=>{const{cx:g=0,cy:y=0,midAngle:x=0,percent:w=0}=m,S=m.innerRadius??0,P=m.outerRadius??0,C=Math.PI/180,E=S+(P-S)*.5,A=g+E*Math.cos(-x*C),T=y+E*Math.sin(-x*C);return b.jsx("text",{x:A,y:T,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:f,className:D(XL({size:t,className:e})),role:"img",...d,children:b.jsx(eg,{width:"100%",height:"100%",minWidth:100,minHeight:100,children:b.jsxs(Xne,{children:[o&&b.jsx(yy,{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},itemStyle:{color:"var(--color-secondary)"},formatter:(m,g)=>[`${m} (${h>0?(Number(m)/h*100).toFixed(1):0}%)`,g]}),n&&b.jsx(qu,{wrapperStyle:{fontFamily:"var(--font-sans)",fontSize:"14px"},formatter:m=>b.jsx("span",{style:{color:"var(--color-secondary)"},children:m})}),b.jsx(t_,{data:r,cx:"50%",cy:"50%",innerRadius:i,outerRadius:a,paddingAngle:s,dataKey:"value",nameKey:"name",startAngle:c,endAngle:u,label:l?v:!1,labelLine:!1,children:r.map((m,g)=>b.jsx(Ds,{fill:m.color||DO[g%DO.length]},`cell-${m.name}-${g}`))})]})})})});ZL.displayName="PieChart";const QL=te("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"}}),JL=te("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}}),e$=p.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:D(QL({size:n,className:e})),...l,children:b.jsx("div",{className:D(JL({variant:o,animated:i}),s&&"animate-progress-indeterminate"),style:{width:s?"50%":`${u}%`}})})});e$.displayName="ProgressIndicator";var qb="Radio",[Gme,t$]=it(qb),[Yme,qme]=Gme(qb),r$=p.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:o=!1,required:i,disabled:a,value:s="on",onCheck:l,form:c,...u}=e,[d,f]=p.useState(null),h=ie(t,g=>f(g)),v=p.useRef(!1),m=d?c||!!d.closest("form"):!0;return b.jsxs(Yme,{scope:r,checked:o,disabled:a,children:[b.jsx(ee.button,{type:"button",role:"radio","aria-checked":o,"data-state":a$(o),"data-disabled":a?"":void 0,disabled:a,value:s,...u,ref:h,onClick:U(e.onClick,g=>{o||l?.(),m&&(v.current=g.isPropagationStopped(),v.current||g.stopPropagation())})}),m&&b.jsx(i$,{control:d,bubbles:!v.current,name:n,value:s,checked:o,required:i,disabled:a,form:c,style:{transform:"translateX(-100%)"}})]})});r$.displayName=qb;var n$="RadioIndicator",o$=p.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...o}=e,i=qme(n$,r);return b.jsx(At,{present:n||i.checked,children:b.jsx(ee.span,{"data-state":a$(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t})})});o$.displayName=n$;var Xme="RadioBubbleInput",i$=p.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:n=!0,...o},i)=>{const a=p.useRef(null),s=ie(a,i),l=Ls(r),c=$s(t);return p.useEffect(()=>{const u=a.current;if(!u)return;const d=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==r&&h){const v=new Event("click",{bubbles:n});h.call(u,r),u.dispatchEvent(v)}},[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}})});i$.displayName=Xme;function a$(e){return e?"checked":"unchecked"}var Zme=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],zd="RadioGroup",[Qme]=it(zd,[kd,t$]),s$=kd(),l$=t$(),[Jme,eve]=Qme(zd),c$=p.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:d,...f}=e,h=s$(r),v=Li(c),[m,g]=xt({prop:i,defaultProp:o??null,onChange:d,caller:zd});return b.jsx(Jme,{scope:r,name:n,required:a,disabled:s,value:m,onValueChange:g,children:b.jsx(aj,{asChild:!0,...h,orientation:l,dir:v,loop:u,children:b.jsx(ee.div,{role:"radiogroup","aria-required":a,"aria-orientation":l,"data-disabled":s?"":void 0,dir:v,...f,ref:t})})})});c$.displayName=zd;var u$="RadioGroupItem",d$=p.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...o}=e,i=eve(u$,r),a=i.disabled||n,s=s$(r),l=l$(r),c=p.useRef(null),u=ie(t,c),d=i.value===o.value,f=p.useRef(!1);return p.useEffect(()=>{const h=m=>{Zme.includes(m.key)&&(f.current=!0)},v=()=>f.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",v)}},[]),b.jsx(sj,{asChild:!0,...s,focusable:!a,active:d,children:b.jsx(r$,{disabled:a,required:i.required,checked:d,...l,...o,name:i.name,ref:u,onCheck:()=>i.onValueChange(o.value),onKeyDown:U(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:U(o.onFocus,()=>{f.current&&c.current?.click()})})})});d$.displayName=u$;var tve="RadioGroupIndicator",f$=p.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,o=l$(r);return b.jsx(o$,{...o,...n,ref:t})});f$.displayName=tve;var rve=c$,nve=d$,ove=f$;const p$=p.forwardRef(({className:e,...t},r)=>b.jsx(rve,{className:D("grid gap-2",e),...t,ref:r}));p$.displayName="RadioGroup";const h$=p.forwardRef(({className:e,...t},r)=>b.jsx(nve,{ref:r,className:D("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(ove,{className:"flex items-center justify-center",children:b.jsx("span",{className:"bg-sunflower h-2.5 w-2.5 rounded-full"})})}));h$.displayName="RadioGroupItem";function yu(e,[t,r]){return Math.min(r,Math.max(t,e))}function ive(e){const t=ave(e),r=p.forwardRef((n,o)=>{const{children:i,...a}=n,s=p.Children.toArray(i),l=s.find(lve);if(l){const c=l.props.children,u=s.map(d=>d===l?p.Children.count(c)>1?p.Children.only(null):p.isValidElement(c)?c.props.children:null:d);return b.jsx(t,{...a,ref:o,children:p.isValidElement(c)?p.cloneElement(c,void 0,u):null})}return b.jsx(t,{...a,ref:o,children:i})});return r.displayName=`${e}.Slot`,r}function ave(e){const t=p.forwardRef((r,n)=>{const{children:o,...i}=r;if(p.isValidElement(o)){const a=uve(o),s=cve(i,o.props);return o.type!==p.Fragment&&(s.ref=n?Hr(n,a):a),p.cloneElement(o,s)}return p.Children.count(o)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sve=Symbol("radix.slottable");function lve(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sve}function cve(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 uve(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 m$=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"}),dve="VisuallyHidden",Kd=p.forwardRef((e,t)=>b.jsx(ee.span,{...e,ref:t,style:{...m$,...e.style}}));Kd.displayName=dve;var fve=Kd,pve=[" ","Enter","ArrowUp","ArrowDown"],hve=[" ","Enter"],$o="Select",[Ud,Hd,mve]=Ri($o),[na]=it($o,[mve,Zn]),Gd=Zn(),[vve,to]=na($o),[gve,yve]=na($o),v$=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:o,onOpenChange:i,value:a,defaultValue:s,onValueChange:l,dir:c,name:u,autoComplete:d,disabled:f,required:h,form:v}=e,m=Gd(t),[g,y]=p.useState(null),[x,w]=p.useState(null),[S,P]=p.useState(!1),C=Li(c),[E,A]=xt({prop:n,defaultProp:o??!1,onChange:i,caller:$o}),[T,M]=xt({prop:a,defaultProp:s,onChange:l,caller:$o}),_=p.useRef(null),k=g?v||!!g.closest("form"):!0,[N,R]=p.useState(new Set),z=Array.from(N).map(B=>B.props.value).join(";");return b.jsx(Fs,{...m,children:b.jsxs(vve,{required:h,scope:t,trigger:g,onTriggerChange:y,valueNode:x,onValueNodeChange:w,valueNodeHasChildren:S,onValueNodeHasChildrenChange:P,contentId:It(),value:T,onValueChange:M,open:E,onOpenChange:A,dir:C,triggerPointerDownPosRef:_,disabled:f,children:[b.jsx(Ud.Provider,{scope:t,children:b.jsx(gve,{scope:e.__scopeSelect,onNativeOptionAdd:p.useCallback(B=>{R(F=>new Set(F).add(B))},[]),onNativeOptionRemove:p.useCallback(B=>{R(F=>{const j=new Set(F);return j.delete(B),j})},[]),children:r})}),k?b.jsxs(B$,{"aria-hidden":!0,required:h,tabIndex:-1,name:u,autoComplete:d,value:T,onChange:B=>M(B.target.value),disabled:f,form:v,children:[T===void 0?b.jsx("option",{value:""}):null,Array.from(N)]},z):null]})})};v$.displayName=$o;var g$="SelectTrigger",y$=p.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...o}=e,i=Gd(r),a=to(g$,r),s=a.disabled||n,l=ie(t,a.onTriggerChange),c=Hd(r),u=p.useRef("touch"),[d,f,h]=z$(m=>{const g=c().filter(w=>!w.disabled),y=g.find(w=>w.value===a.value),x=K$(g,m,y);x!==void 0&&a.onValueChange(x.value)}),v=m=>{s||(a.onOpenChange(!0),h()),m&&(a.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return b.jsx(Bs,{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":W$(a.value)?"":void 0,...o,ref:l,onClick:U(o.onClick,m=>{m.currentTarget.focus(),u.current!=="mouse"&&v(m)}),onPointerDown:U(o.onPointerDown,m=>{u.current=m.pointerType;const g=m.target;g.hasPointerCapture(m.pointerId)&&g.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(v(m),m.preventDefault())}),onKeyDown:U(o.onKeyDown,m=>{const g=d.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&f(m.key),!(g&&m.key===" ")&&pve.includes(m.key)&&(v(),m.preventDefault())})})})});y$.displayName=g$;var b$="SelectValue",x$=p.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,children:i,placeholder:a="",...s}=e,l=to(b$,r),{onValueNodeHasChildrenChange:c}=l,u=i!==void 0,d=ie(t,l.onValueNodeChange);return pt(()=>{c(u)},[c,u]),b.jsx(ee.span,{...s,ref:d,style:{pointerEvents:"none"},children:W$(l.value)?b.jsx(b.Fragment,{children:a}):i})});x$.displayName=b$;var bve="SelectIcon",w$=p.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...o}=e;return b.jsx(ee.span,{"aria-hidden":!0,...o,ref:t,children:n||"▼"})});w$.displayName=bve;var xve="SelectPortal",S$=e=>b.jsx(Bo,{asChild:!0,...e});S$.displayName=xve;var Vo="SelectContent",P$=p.forwardRef((e,t)=>{const r=to(Vo,e.__scopeSelect),[n,o]=p.useState();if(pt(()=>{o(new DocumentFragment)},[]),!r.open){const i=n;return i?as.createPortal(b.jsx(C$,{scope:e.__scopeSelect,children:b.jsx(Ud.Slot,{scope:e.__scopeSelect,children:b.jsx("div",{children:e.children})})}),i):null}return b.jsx(O$,{...e,ref:t})});P$.displayName=Vo;var vr=10,[C$,ro]=na(Vo),wve="SelectContentImpl",Sve=ive("SelectContent.RemoveScroll"),O$=p.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:d,collisionBoundary:f,collisionPadding:h,sticky:v,hideWhenDetached:m,avoidCollisions:g,...y}=e,x=to(Vo,r),[w,S]=p.useState(null),[P,C]=p.useState(null),E=ie(t,K=>S(K)),[A,T]=p.useState(null),[M,_]=p.useState(null),k=Hd(r),[N,R]=p.useState(!1),z=p.useRef(!1);p.useEffect(()=>{if(w)return Ou(w)},[w]),Pu();const B=p.useCallback(K=>{const[fe,...$]=k().map(V=>V.ref.current),[G]=$.slice(-1),W=document.activeElement;for(const V of K)if(V===W||(V?.scrollIntoView({block:"nearest"}),V===fe&&P&&(P.scrollTop=0),V===G&&P&&(P.scrollTop=P.scrollHeight),V?.focus(),document.activeElement!==W))return},[k,P]),F=p.useCallback(()=>B([A,w]),[B,A,w]);p.useEffect(()=>{N&&F()},[N,F]);const{onOpenChange:j,triggerPointerDownPosRef:L}=x;p.useEffect(()=>{if(w){let K={x:0,y:0};const fe=G=>{K={x:Math.abs(Math.round(G.pageX)-(L.current?.x??0)),y:Math.abs(Math.round(G.pageY)-(L.current?.y??0))}},$=G=>{K.x<=10&&K.y<=10?G.preventDefault():w.contains(G.target)||j(!1),document.removeEventListener("pointermove",fe),L.current=null};return L.current!==null&&(document.addEventListener("pointermove",fe),document.addEventListener("pointerup",$,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",fe),document.removeEventListener("pointerup",$,{capture:!0})}}},[w,j,L]),p.useEffect(()=>{const K=()=>j(!1);return window.addEventListener("blur",K),window.addEventListener("resize",K),()=>{window.removeEventListener("blur",K),window.removeEventListener("resize",K)}},[j]);const[H,re]=z$(K=>{const fe=k().filter(W=>!W.disabled),$=fe.find(W=>W.ref.current===document.activeElement),G=K$(fe,K,$);G&&setTimeout(()=>G.ref.current.focus())}),le=p.useCallback((K,fe,$)=>{const G=!z.current&&!$;(x.value!==void 0&&x.value===fe||G)&&(T(K),G&&(z.current=!0))},[x.value]),ae=p.useCallback(()=>w?.focus(),[w]),oe=p.useCallback((K,fe,$)=>{const G=!z.current&&!$;(x.value!==void 0&&x.value===fe||G)&&_(K)},[x.value]),Se=n==="popper"?nv:E$,Me=Se===nv?{side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:v,hideWhenDetached:m,avoidCollisions:g}:{};return b.jsx(C$,{scope:r,content:w,viewport:P,onViewportChange:C,itemRefCallback:le,selectedItem:A,onItemLeave:ae,itemTextRefCallback:oe,focusSelectedItem:F,selectedItemText:M,position:n,isPositioned:N,searchRef:H,children:b.jsx(ls,{as:Sve,allowPinchZoom:!0,children:b.jsx(ss,{asChild:!0,trapped:x.open,onMountAutoFocus:K=>{K.preventDefault()},onUnmountAutoFocus:U(o,K=>{x.trigger?.focus({preventScroll:!0}),K.preventDefault()}),children:b.jsx(Fo,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:K=>K.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:b.jsx(Se,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:K=>K.preventDefault(),...y,...Me,onPlaced:()=>R(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:U(y.onKeyDown,K=>{const fe=K.ctrlKey||K.altKey||K.metaKey;if(K.key==="Tab"&&K.preventDefault(),!fe&&K.key.length===1&&re(K.key),["ArrowUp","ArrowDown","Home","End"].includes(K.key)){let G=k().filter(W=>!W.disabled).map(W=>W.ref.current);if(["ArrowUp","End"].includes(K.key)&&(G=G.slice().reverse()),["ArrowUp","ArrowDown"].includes(K.key)){const W=K.target,V=G.indexOf(W);G=G.slice(V+1)}setTimeout(()=>B(G)),K.preventDefault()}})})})})})})});O$.displayName=wve;var Pve="SelectItemAlignedPosition",E$=p.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...o}=e,i=to(Vo,r),a=ro(Vo,r),[s,l]=p.useState(null),[c,u]=p.useState(null),d=ie(t,E=>u(E)),f=Hd(r),h=p.useRef(!1),v=p.useRef(!0),{viewport:m,selectedItem:g,selectedItemText:y,focusSelectedItem:x}=a,w=p.useCallback(()=>{if(i.trigger&&i.valueNode&&s&&c&&m&&g&&y){const E=i.trigger.getBoundingClientRect(),A=c.getBoundingClientRect(),T=i.valueNode.getBoundingClientRect(),M=y.getBoundingClientRect();if(i.dir!=="rtl"){const W=M.left-A.left,V=T.left-W,he=E.left-V,ue=E.width+he,Ye=Math.max(ue,A.width),tt=window.innerWidth-vr,zt=yu(V,[vr,Math.max(vr,tt-Ye)]);s.style.minWidth=ue+"px",s.style.left=zt+"px"}else{const W=A.right-M.right,V=window.innerWidth-T.right-W,he=window.innerWidth-E.right-V,ue=E.width+he,Ye=Math.max(ue,A.width),tt=window.innerWidth-vr,zt=yu(V,[vr,Math.max(vr,tt-Ye)]);s.style.minWidth=ue+"px",s.style.right=zt+"px"}const _=f(),k=window.innerHeight-vr*2,N=m.scrollHeight,R=window.getComputedStyle(c),z=parseInt(R.borderTopWidth,10),B=parseInt(R.paddingTop,10),F=parseInt(R.borderBottomWidth,10),j=parseInt(R.paddingBottom,10),L=z+B+N+j+F,H=Math.min(g.offsetHeight*5,L),re=window.getComputedStyle(m),le=parseInt(re.paddingTop,10),ae=parseInt(re.paddingBottom,10),oe=E.top+E.height/2-vr,Se=k-oe,Me=g.offsetHeight/2,K=g.offsetTop+Me,fe=z+B+K,$=L-fe;if(fe<=oe){const W=_.length>0&&g===_[_.length-1].ref.current;s.style.bottom="0px";const V=c.clientHeight-m.offsetTop-m.offsetHeight,he=Math.max(Se,Me+(W?ae:0)+V+F),ue=fe+he;s.style.height=ue+"px"}else{const W=_.length>0&&g===_[0].ref.current;s.style.top="0px";const he=Math.max(oe,z+m.offsetTop+(W?le:0)+Me)+$;s.style.height=he+"px",m.scrollTop=fe-oe+m.offsetTop}s.style.margin=`${vr}px 0`,s.style.minHeight=H+"px",s.style.maxHeight=k+"px",n?.(),requestAnimationFrame(()=>h.current=!0)}},[f,i.trigger,i.valueNode,s,c,m,g,y,i.dir,n]);pt(()=>w(),[w]);const[S,P]=p.useState();pt(()=>{c&&P(window.getComputedStyle(c).zIndex)},[c]);const C=p.useCallback(E=>{E&&v.current===!0&&(w(),x?.(),v.current=!1)},[w,x]);return b.jsx(Ove,{scope:r,contentWrapper:s,shouldExpandOnScrollRef:h,onScrollButtonChange:C,children:b.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:b.jsx(ee.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});E$.displayName=Pve;var Cve="SelectPopperPosition",nv=p.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:o=vr,...i}=e,a=Gd(r);return b.jsx(Td,{...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)"}})});nv.displayName=Cve;var[Ove,Xb]=na(Vo,{}),ov="SelectViewport",A$=p.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...o}=e,i=ro(ov,r),a=Xb(ov,r),s=ie(t,i.onViewportChange),l=p.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(Ud.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:d,shouldExpandOnScrollRef:f}=a;if(f?.current&&d){const h=Math.abs(l.current-u.scrollTop);if(h>0){const v=window.innerHeight-vr*2,m=parseFloat(d.style.minHeight),g=parseFloat(d.style.height),y=Math.max(m,g);if(y<v){const x=y+h,w=Math.min(v,x),S=x-w;d.style.height=w+"px",d.style.bottom==="0px"&&(u.scrollTop=S>0?S:0,d.style.justifyContent="flex-end")}}}l.current=u.scrollTop})})})]})});A$.displayName=ov;var T$="SelectGroup",[Eve,Ave]=na(T$),M$=p.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=It();return b.jsx(Eve,{scope:r,id:o,children:b.jsx(ee.div,{role:"group","aria-labelledby":o,...n,ref:t})})});M$.displayName=T$;var k$="SelectLabel",D$=p.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=Ave(k$,r);return b.jsx(ee.div,{id:o.id,...n,ref:t})});D$.displayName=k$;var bu="SelectItem",[Tve,_$]=na(bu),N$=p.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:o=!1,textValue:i,...a}=e,s=to(bu,r),l=ro(bu,r),c=s.value===n,[u,d]=p.useState(i??""),[f,h]=p.useState(!1),v=ie(t,x=>l.itemRefCallback?.(x,n,o)),m=It(),g=p.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(Tve,{scope:r,value:n,disabled:o,textId:m,isSelected:c,onItemTextChange:p.useCallback(x=>{d(w=>w||(x?.textContent??"").trim())},[]),children:b.jsx(Ud.ItemSlot,{scope:r,value:n,disabled:o,textValue:u,children:b.jsx(ee.div,{role:"option","aria-labelledby":m,"data-highlighted":f?"":void 0,"aria-selected":c&&f,"data-state":c?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...a,ref:v,onFocus:U(a.onFocus,()=>h(!0)),onBlur:U(a.onBlur,()=>h(!1)),onClick:U(a.onClick,()=>{g.current!=="mouse"&&y()}),onPointerUp:U(a.onPointerUp,()=>{g.current==="mouse"&&y()}),onPointerDown:U(a.onPointerDown,x=>{g.current=x.pointerType}),onPointerMove:U(a.onPointerMove,x=>{g.current=x.pointerType,o?l.onItemLeave?.():g.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===" "||(hve.includes(x.key)&&y(),x.key===" "&&x.preventDefault())})})})})});N$.displayName=bu;var Ea="SelectItemText",j$=p.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,...i}=e,a=to(Ea,r),s=ro(Ea,r),l=_$(Ea,r),c=yve(Ea,r),[u,d]=p.useState(null),f=ie(t,y=>d(y),l.onItemTextChange,y=>s.itemTextRefCallback?.(y,l.value,l.disabled)),h=u?.textContent,v=p.useMemo(()=>b.jsx("option",{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:m,onNativeOptionRemove:g}=c;return pt(()=>(m(v),()=>g(v)),[m,g,v]),b.jsxs(b.Fragment,{children:[b.jsx(ee.span,{id:l.textId,...i,ref:f}),l.isSelected&&a.valueNode&&!a.valueNodeHasChildren?as.createPortal(i.children,a.valueNode):null]})});j$.displayName=Ea;var I$="SelectItemIndicator",R$=p.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return _$(I$,r).isSelected?b.jsx(ee.span,{"aria-hidden":!0,...n,ref:t}):null});R$.displayName=I$;var iv="SelectScrollUpButton",L$=p.forwardRef((e,t)=>{const r=ro(iv,e.__scopeSelect),n=Xb(iv,e.__scopeSelect),[o,i]=p.useState(!1),a=ie(t,n.onScrollButtonChange);return pt(()=>{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(V$,{...e,ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=r;s&&l&&(s.scrollTop=s.scrollTop-l.offsetHeight)}}):null});L$.displayName=iv;var av="SelectScrollDownButton",$$=p.forwardRef((e,t)=>{const r=ro(av,e.__scopeSelect),n=Xb(av,e.__scopeSelect),[o,i]=p.useState(!1),a=ie(t,n.onScrollButtonChange);return pt(()=>{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(V$,{...e,ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=r;s&&l&&(s.scrollTop=s.scrollTop+l.offsetHeight)}}):null});$$.displayName=av;var V$=p.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...o}=e,i=ro("SelectScrollButton",r),a=p.useRef(null),s=Hd(r),l=p.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return p.useEffect(()=>()=>l(),[l]),pt(()=>{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()})})}),Mve="SelectSeparator",F$=p.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return b.jsx(ee.div,{"aria-hidden":!0,...n,ref:t})});F$.displayName=Mve;var sv="SelectArrow",kve=p.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=Gd(r),i=to(sv,r),a=ro(sv,r);return i.open&&a.position==="popper"?b.jsx(Md,{...o,...n,ref:t}):null});kve.displayName=sv;var Dve="SelectBubbleInput",B$=p.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const o=p.useRef(null),i=ie(n,o),a=Ls(t);return p.useEffect(()=>{const s=o.current;if(!s)return;const l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==t&&u){const d=new Event("change",{bubbles:!0});u.call(s,t),s.dispatchEvent(d)}},[a,t]),b.jsx(ee.select,{...r,style:{...m$,...r.style},ref:i,defaultValue:t})});B$.displayName=Dve;function W$(e){return e===""||e===void 0}function z$(e){const t=Et(e),r=p.useRef(""),n=p.useRef(0),o=p.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=p.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,o,i]}function K$(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=_ve(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 _ve(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Nve=v$,jve=y$,Ive=x$,Rve=w$,Lve=S$,$ve=P$,Vve=A$,Fve=M$,Bve=D$,Wve=N$,zve=j$,Kve=R$,Uve=L$,Hve=$$,Gve=F$;const Yve=Nve,qve=Fve,Xve=Ive,U$=p.forwardRef(({className:e,children:t,variant:r="default",...n},o)=>b.jsxs(jve,{ref:o,className:D("bg-card text-body-sm text-primary flex h-8 w-full items-center justify-between rounded-md border px-3 py-2 font-sans transition-colors","placeholder:text-tertiary placeholder:text-body-sm","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(Rve,{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"})})})]}));U$.displayName="SelectTrigger";const Zb=p.forwardRef(({className:e,...t},r)=>b.jsx(Uve,{ref:r,className:D("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"})})}));Zb.displayName="SelectScrollUpButton";const Qb=p.forwardRef(({className:e,...t},r)=>b.jsx(Hve,{ref:r,className:D("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"})})}));Qb.displayName="SelectScrollDownButton";const H$=p.forwardRef(({className:e,children:t,position:r="popper",...n},o)=>b.jsx(Lve,{children:b.jsxs($ve,{ref:o,className:D("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(Zb,{}),b.jsx(Vve,{className:D("p-1",r==="popper"&&"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)"),children:t}),b.jsx(Qb,{})]})}));H$.displayName="SelectContent";const G$=p.forwardRef(({className:e,...t},r)=>b.jsx(Bve,{ref:r,className:D("text-small text-tertiary py-1.5 pr-2 pl-8 font-normal",e),...t}));G$.displayName="SelectLabel";const Y$=p.forwardRef(({className:e,children:t,...r},n)=>b.jsxs(Wve,{ref:n,className:D("text-body-sm relative flex h-8 w-full cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 outline-none select-none","focus:bg-alt 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(Kve,{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(zve,{children:t})]}));Y$.displayName="SelectItem";const q$=p.forwardRef(({className:e,...t},r)=>b.jsx(Gve,{ref:r,className:D("bg-border -mx-1 my-1 h-px",e),...t}));q$.displayName="SelectSeparator";const X$=p.createContext(null);function Xo(){const e=p.useContext(X$);if(!e)throw new Error("Sidebar components must be used within a Sidebar");return e}const Z$=te(["border-border bg-alt flex h-dvh flex-col border-r transition-[width] duration-300 ease-in-out","focus-visible:ring-sunflower focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none"],{variants:{variant:{default:"",bordered:"border-border border"},width:{sm:"",default:"",lg:""}},defaultVariants:{variant:"default",width:"default"}}),Zve={sm:{expanded:"w-52",collapsed:"w-14"},default:{expanded:"w-64",collapsed:"w-16"},lg:{expanded:"w-72",collapsed:"w-20"}},Q$=p.forwardRef(({className:e,variant:t,width:r="default",defaultCollapsed:n=!1,collapsed:o,onCollapsedChange:i,collapsible:a=!0,autoCollapseMobile:s=!0,children:l,...c},u)=>{const[d,f]=p.useState(n),h=o!==void 0,v=h?o:d,m=p.useCallback(x=>{a&&(h||f(x),i?.(x))},[h,i,a]);p.useEffect(()=>{if(!s||!a||typeof window>"u"||!window.matchMedia)return;const x=window.matchMedia("(max-width: 768px)"),w=S=>{m(S.matches)};return w(x),x.addEventListener("change",w),()=>x.removeEventListener("change",w)},[s,a,m]);const g=p.useMemo(()=>({collapsed:v,setCollapsed:m,collapsible:a}),[v,m,a]),y=Zve[r||"default"];return b.jsx(X$.Provider,{value:g,children:b.jsx("aside",{ref:u,className:D(Z$({variant:t}),v?y.collapsed:y.expanded,e),"data-collapsed":v,...c,children:l})})});Q$.displayName="Sidebar";const J$=p.forwardRef(({className:e,...t},r)=>b.jsx("div",{ref:r,className:D("flex items-center gap-4 px-6 pt-6 pb-4",e),...t}));J$.displayName="SidebarHeader";const eV=p.forwardRef(({className:e,...t},r)=>b.jsx("div",{ref:r,className:D("flex-1 overflow-y-auto px-5 py-4",e),...t}));eV.displayName="SidebarContent";const tV=p.forwardRef(({className:e,...t},r)=>b.jsx("div",{ref:r,className:D("border-border mt-auto border-t px-5 py-5",e),...t}));tV.displayName="SidebarFooter";const rV=p.forwardRef(({className:e,...t},r)=>b.jsx("div",{ref:r,className:D(e),...t}));rV.displayName="SidebarGroup";const nV=p.forwardRef(({className:e,...t},r)=>{const{collapsed:n}=Xo();return n?null:b.jsx(qo,{variant:"label",ref:r,className:D("px-4 py-3 uppercase",e),...t})});nV.displayName="SidebarGroupLabel";const ns=te(["group text-small relative flex w-full cursor-pointer items-center gap-3 rounded-md px-4 py-3 font-sans font-normal","text-secondary hover:text-primary","focus-visible:ring-sunflower focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none"],{variants:{active:{true:"text-primary",false:""}},defaultVariants:{active:!1}}),oV=p.forwardRef(({className:e,active:t,icon:r,asChild:n=!1,children:o,...i},a)=>{const{collapsed:s}=Xo(),l=n?Ie:"button",c=b.jsx("span",{className:D("bg-sunflower absolute rounded-full transition-opacity",s?"right-1 bottom-0 left-1 h-0.5":"top-1 bottom-1 left-0 w-0.5",t?"opacity-100":"opacity-0 group-hover:opacity-100"),"aria-hidden":"true"}),u=b.jsxs(b.Fragment,{children:[c,r&&b.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:r}),!s&&b.jsx(qo,{variant:"body-sm",className:"truncate",children:o})]});return n?b.jsx(Ie,{ref:a,className:D(ns({active:t}),s&&"justify-center px-2",e),...i,children:p.isValidElement(o)?p.cloneElement(o,{children:b.jsxs(b.Fragment,{children:[c,r&&b.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:r}),!s&&b.jsx("span",{className:"truncate",children:o.props.children})]})}):o}):b.jsx(l,{ref:a,className:D(ns({active:t}),s&&"justify-center px-2",e),...i,children:u})});oV.displayName="SidebarItem";const iV=p.forwardRef(({className:e,...t},r)=>{const{collapsed:n,setCollapsed:o,collapsible:i}=Xo();return i?b.jsx("button",{ref:r,type:"button",className:D("text-small flex w-full items-center rounded-md p-2 font-sans font-normal","text-secondary hover:bg-vanilla hover:text-primary","focus-visible:ring-sunflower focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",e),onClick:()=>o(!n),"aria-label":n?"Expand sidebar":"Collapse sidebar",...t,children:n?b.jsx(Ev,{className:"h-5 w-5"}):b.jsx(Ov,{className:"h-5 w-5"})}):null});iV.displayName="SidebarTrigger";const aV=p.forwardRef(({className:e,...t},r)=>b.jsx("hr",{ref:r,className:D("border-border my-5 border-t",e),...t}));aV.displayName="SidebarSeparator";const lv=p.createContext(null);function sV(){const e=p.useContext(lv);if(!e)throw new Error("SidebarSub components must be used within a SidebarSub");return e}const lV=p.forwardRef(({className:e,defaultOpen:t=!1,open:r,onOpenChange:n,children:o,...i},a)=>{const[s,l]=p.useState(t),{collapsed:c}=Xo(),u=r!==void 0,d=u?r:s,f=p.useCallback(v=>{u||l(v),n?.(v)},[u,n]),h=p.useMemo(()=>({open:d,setOpen:f}),[d,f]);return c?b.jsx(lv.Provider,{value:h,children:b.jsx(jd,{open:d,onOpenChange:f,children:b.jsx("div",{ref:a,className:D("relative",e),...i,children:o})})}):b.jsx(lv.Provider,{value:h,children:b.jsx(VO,{open:d,onOpenChange:f,asChild:!0,children:b.jsx("div",{ref:a,className:e,...i,children:o})})})});lV.displayName="SidebarSub";const cV=p.forwardRef(({className:e,active:t,icon:r,children:n,...o},i)=>{const{collapsed:a}=Xo(),{open:s}=sV(),l=b.jsx("span",{className:D("bg-sunflower absolute rounded-full transition-opacity",a?"right-1 bottom-0 left-1 h-0.5":"top-1 bottom-1 left-0 w-0.5",t?"opacity-100":"opacity-0 group-hover:opacity-100"),"aria-hidden":"true"}),c=b.jsxs(b.Fragment,{children:[l,r&&b.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:r}),!a&&b.jsxs(b.Fragment,{children:[b.jsx(qo,{variant:"body-sm",className:"flex-1 truncate text-left",children:n}),b.jsx(rE,{className:D("h-4 w-4 shrink-0 transition-transform duration-200",s&&"rotate-180"),"aria-hidden":"true"})]})]});return a?b.jsx(Id,{asChild:!0,children:b.jsxs("button",{ref:i,type:"button",className:D(ns({active:t}),"justify-center px-2",e),...o,children:[l,r&&b.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:r})]})}):b.jsx(FO,{asChild:!0,children:b.jsx("button",{ref:i,type:"button",className:D(ns({active:t}),e),...o,children:c})})});cV.displayName="SidebarSubTrigger";const uV=p.forwardRef(({className:e,children:t,...r},n)=>{const{collapsed:o}=Xo();return o?b.jsx(Rd,{children:b.jsx(Ld,{ref:n,side:"right",align:"start",sideOffset:8,className:D("bg-card border-border z-50 min-w-[180px] rounded-md border p-2 shadow-md","data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","data-[side=right]:slide-in-from-left-2",e),...r,children:t})}):b.jsx(BO,{ref:n,className:D("overflow-hidden","data-[state=open]:animate-collapsible-down","data-[state=closed]:animate-collapsible-up",e),...r,children:b.jsx("div",{className:"space-y-1 pt-1 pl-8",children:t})})});uV.displayName="SidebarSubContent";const dV=te("bg-contrast animate-pulse",{variants:{variant:{default:"rounded-md",circular:"rounded-full",text:"rounded"}},defaultVariants:{variant:"default"}}),fV=p.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:D(dV({variant:t,className:e})),style:s,...i})});fV.displayName="Skeleton";var pV=["PageUp","PageDown"],hV=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],mV={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},oa="Slider",[cv,Qve,Jve]=Ri(oa),[vV]=it(oa,[Jve]),[ege,Yd]=vV(oa),gV=p.forwardRef((e,t)=>{const{name:r,min:n=0,max:o=100,step:i=1,orientation:a="horizontal",disabled:s=!1,minStepsBetweenThumbs:l=0,defaultValue:c=[n],value:u,onValueChange:d=()=>{},onValueCommit:f=()=>{},inverted:h=!1,form:v,...m}=e,g=p.useRef(new Set),y=p.useRef(0),w=a==="horizontal"?tge:rge,[S=[],P]=xt({prop:u,defaultProp:c,onChange:_=>{[...g.current][y.current]?.focus(),d(_)}}),C=p.useRef(S);function E(_){const k=sge(S,_);M(_,k)}function A(_){M(_,y.current)}function T(){const _=C.current[y.current];S[y.current]!==_&&f(S)}function M(_,k,{commit:N}={commit:!1}){const R=dge(i),z=fge(Math.round((_-n)/i)*i+n,R),B=yu(z,[n,o]);P((F=[])=>{const j=ige(F,B,k);if(uge(j,l*i)){y.current=j.indexOf(B);const L=String(j)!==String(F);return L&&N&&f(j),L?j:F}else return F})}return b.jsx(ege,{scope:e.__scopeSlider,name:r,disabled:s,min:n,max:o,valueIndexToChangeRef:y,thumbs:g.current,values:S,orientation:a,form:v,children:b.jsx(cv.Provider,{scope:e.__scopeSlider,children:b.jsx(cv.Slot,{scope:e.__scopeSlider,children:b.jsx(w,{"aria-disabled":s,"data-disabled":s?"":void 0,...m,ref:t,onPointerDown:U(m.onPointerDown,()=>{s||(C.current=S)}),min:n,max:o,inverted:h,onSlideStart:s?void 0:E,onSlideMove:s?void 0:A,onSlideEnd:s?void 0:T,onHomeKeyDown:()=>!s&&M(n,0,{commit:!0}),onEndKeyDown:()=>!s&&M(o,S.length-1,{commit:!0}),onStepKeyDown:({event:_,direction:k})=>{if(!s){const z=pV.includes(_.key)||_.shiftKey&&hV.includes(_.key)?10:1,B=y.current,F=S[B],j=i*z*k;M(F+j,B,{commit:!0})}}})})})})});gV.displayName=oa;var[yV,bV]=vV(oa,{startEdge:"left",endEdge:"right",size:"width",direction:1}),tge=p.forwardRef((e,t)=>{const{min:r,max:n,dir:o,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:l,onStepKeyDown:c,...u}=e,[d,f]=p.useState(null),h=ie(t,w=>f(w)),v=p.useRef(void 0),m=Li(o),g=m==="ltr",y=g&&!i||!g&&i;function x(w){const S=v.current||d.getBoundingClientRect(),P=[0,S.width],E=Jb(P,y?[r,n]:[n,r]);return v.current=S,E(w-S.left)}return b.jsx(yV,{scope:e.__scopeSlider,startEdge:y?"left":"right",endEdge:y?"right":"left",direction:y?1:-1,size:"width",children:b.jsx(xV,{dir:m,"data-orientation":"horizontal",...u,ref:h,style:{...u.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:w=>{const S=x(w.clientX);a?.(S)},onSlideMove:w=>{const S=x(w.clientX);s?.(S)},onSlideEnd:()=>{v.current=void 0,l?.()},onStepKeyDown:w=>{const P=mV[y?"from-left":"from-right"].includes(w.key);c?.({event:w,direction:P?-1:1})}})})}),rge=p.forwardRef((e,t)=>{const{min:r,max:n,inverted:o,onSlideStart:i,onSlideMove:a,onSlideEnd:s,onStepKeyDown:l,...c}=e,u=p.useRef(null),d=ie(t,u),f=p.useRef(void 0),h=!o;function v(m){const g=f.current||u.current.getBoundingClientRect(),y=[0,g.height],w=Jb(y,h?[n,r]:[r,n]);return f.current=g,w(m-g.top)}return b.jsx(yV,{scope:e.__scopeSlider,startEdge:h?"bottom":"top",endEdge:h?"top":"bottom",size:"height",direction:h?1:-1,children:b.jsx(xV,{"data-orientation":"vertical",...c,ref:d,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:m=>{const g=v(m.clientY);i?.(g)},onSlideMove:m=>{const g=v(m.clientY);a?.(g)},onSlideEnd:()=>{f.current=void 0,s?.()},onStepKeyDown:m=>{const y=mV[h?"from-bottom":"from-top"].includes(m.key);l?.({event:m,direction:y?-1:1})}})})}),xV=p.forwardRef((e,t)=>{const{__scopeSlider:r,onSlideStart:n,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:s,onStepKeyDown:l,...c}=e,u=Yd(oa,r);return b.jsx(ee.span,{...c,ref:t,onKeyDown:U(e.onKeyDown,d=>{d.key==="Home"?(a(d),d.preventDefault()):d.key==="End"?(s(d),d.preventDefault()):pV.concat(hV).includes(d.key)&&(l(d),d.preventDefault())}),onPointerDown:U(e.onPointerDown,d=>{const f=d.target;f.setPointerCapture(d.pointerId),d.preventDefault(),u.thumbs.has(f)?f.focus():n(d)}),onPointerMove:U(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&o(d)}),onPointerUp:U(e.onPointerUp,d=>{const f=d.target;f.hasPointerCapture(d.pointerId)&&(f.releasePointerCapture(d.pointerId),i(d))})})}),wV="SliderTrack",SV=p.forwardRef((e,t)=>{const{__scopeSlider:r,...n}=e,o=Yd(wV,r);return b.jsx(ee.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...n,ref:t})});SV.displayName=wV;var uv="SliderRange",PV=p.forwardRef((e,t)=>{const{__scopeSlider:r,...n}=e,o=Yd(uv,r),i=bV(uv,r),a=p.useRef(null),s=ie(t,a),l=o.values.length,c=o.values.map(f=>EV(f,o.min,o.max)),u=l>1?Math.min(...c):0,d=100-Math.max(...c);return b.jsx(ee.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...n,ref:s,style:{...e.style,[i.startEdge]:u+"%",[i.endEdge]:d+"%"}})});PV.displayName=uv;var dv="SliderThumb",CV=p.forwardRef((e,t)=>{const r=Qve(e.__scopeSlider),[n,o]=p.useState(null),i=ie(t,s=>o(s)),a=p.useMemo(()=>n?r().findIndex(s=>s.ref.current===n):-1,[r,n]);return b.jsx(nge,{...e,ref:i,index:a})}),nge=p.forwardRef((e,t)=>{const{__scopeSlider:r,index:n,name:o,...i}=e,a=Yd(dv,r),s=bV(dv,r),[l,c]=p.useState(null),u=ie(t,x=>c(x)),d=l?a.form||!!l.closest("form"):!0,f=$s(l),h=a.values[n],v=h===void 0?0:EV(h,a.min,a.max),m=age(n,a.values.length),g=f?.[s.size],y=g?lge(g,v,s.direction):0;return p.useEffect(()=>{if(l)return a.thumbs.add(l),()=>{a.thumbs.delete(l)}},[l,a.thumbs]),b.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${v}% + ${y}px)`},children:[b.jsx(cv.ItemSlot,{scope:e.__scopeSlider,children:b.jsx(ee.span,{role:"slider","aria-label":e["aria-label"]||m,"aria-valuemin":a.min,"aria-valuenow":h,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0,...i,ref:u,style:h===void 0?{display:"none"}:e.style,onFocus:U(e.onFocus,()=>{a.valueIndexToChangeRef.current=n})})}),d&&b.jsx(OV,{name:o??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:h},n)]})});CV.displayName=dv;var oge="RadioBubbleInput",OV=p.forwardRef(({__scopeSlider:e,value:t,...r},n)=>{const o=p.useRef(null),i=ie(o,n),a=Ls(t);return p.useEffect(()=>{const s=o.current;if(!s)return;const l=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==t&&u){const d=new Event("input",{bubbles:!0});u.call(s,t),s.dispatchEvent(d)}},[a,t]),b.jsx(ee.input,{style:{display:"none"},...r,ref:i,defaultValue:t})});OV.displayName=oge;function ige(e=[],t,r){const n=[...e];return n[r]=t,n.sort((o,i)=>o-i)}function EV(e,t,r){const i=100/(r-t)*(e-t);return yu(i,[0,100])}function age(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function sge(e,t){if(e.length===1)return 0;const r=e.map(o=>Math.abs(o-t)),n=Math.min(...r);return r.indexOf(n)}function lge(e,t,r){const n=e/2,i=Jb([0,50],[0,n]);return(n-i(t)*r)*r}function cge(e){return e.slice(0,-1).map((t,r)=>e[r+1]-t)}function uge(e,t){if(t>0){const r=cge(e);return Math.min(...r)>=t}return!0}function Jb(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function dge(e){return(String(e).split(".")[1]||"").length}function fge(e,t){const r=Math.pow(10,t);return Math.round(e*r)/r}var pge=gV,hge=SV,mge=PV,vge=CV;const AV=te("relative flex w-full touch-none items-center select-none",{variants:{size:{sm:"[--slider-thumb-size:theme(spacing.3)] [--slider-track-height:theme(spacing.1)]",default:"[--slider-thumb-size:theme(spacing.4)] [--slider-track-height:theme(spacing.2)]",lg:"[--slider-thumb-size:theme(spacing.5)] [--slider-track-height:theme(spacing.3)]"}},defaultVariants:{size:"default"}}),TV=p.forwardRef(({className:e,size:t,defaultValue:r=[0],value:n,"aria-label":o,"aria-labelledby":i,...a},s)=>{const l=n?.length??r?.length??1;return b.jsxs(pge,{ref:s,defaultValue:r,value:n,className:D(AV({size:t}),e),...a,children:[b.jsx(hge,{className:D("bg-border relative h-[var(--slider-track-height)] w-full grow overflow-hidden rounded-full"),children:b.jsx(mge,{className:"bg-sunflower absolute h-full"})}),Array.from({length:l}).map((c,u)=>b.jsx(vge,{"aria-label":o,"aria-labelledby":i,className:D("border-sunflower block h-[var(--slider-thumb-size)] w-[var(--slider-thumb-size)] rounded-full border-2 bg-white shadow-md transition-colors","focus-visible:ring-sunflower focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none","disabled:pointer-events-none disabled:opacity-50","hover:border-sunflower-hover")},u))]})});TV.displayName="Slider";const MV=te("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"}}),kV=p.forwardRef(({className:e,variant:t,size:r,label:n="Loading",...o},i)=>b.jsx("span",{ref:i,role:"status","aria-label":n,className:D(MV({variant:t,size:r,className:e})),...o,children:b.jsx("span",{className:"sr-only",children:n})}));kV.displayName="Spinner";const DV=te("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"}}),_V=p.forwardRef(({className:e,direction:t,gap:r,align:n,justify:o,wrap:i,as:a="div",asChild:s=!1,...l},c)=>{const u=s?Ie:a;return b.jsx(u,{className:D(DV({direction:t,gap:r,align:n,justify:o,wrap:i,className:e})),ref:c,...l})});_V.displayName="Stack";const NV=p.createContext(null);function ex(){const e=p.useContext(NV);if(!e)throw new Error("Stepper components must be used within a Stepper");return e}const jV=p.createContext(null);function Zs(){const e=p.useContext(jV);if(!e)throw new Error("StepperItem child components must be used within a StepperItem");return e}const IV=te("flex",{variants:{orientation:{horizontal:"flex-row items-start",vertical:"flex-col"}},defaultVariants:{orientation:"horizontal"}}),RV=te("inline-flex items-center font-sans",{variants:{size:{sm:"gap-1",default:"gap-1.5",lg:"gap-2"}},defaultVariants:{size:"default"}}),LV=te("inline-flex shrink-0 items-center justify-center rounded-full transition-colors",{variants:{size:{sm:"h-5 w-5 text-[10px]",default:"h-6 w-6 text-[11px]",lg:"h-7 w-7 text-xs"}},defaultVariants:{size:"default"}}),$V=te("transition-colors",{variants:{size:{sm:"h-0.5 w-3",default:"h-0.5 w-4",lg:"h-0.5 w-5"}},defaultVariants:{size:"default"}}),VV=p.forwardRef(({className:e,variant:t="default",activeStep:r=1,orientation:n="horizontal",totalSteps:o,size:i,labels:a,onStepClick:s,children:l,...c},u)=>{const[d,f]=p.useState(0),h=p.useMemo(()=>({activeStep:r,orientation:n,totalSteps:d,setTotalSteps:f}),[r,n,d]);if(t==="mini"){const v=o??0,m=Array.from({length:v},(g,y)=>y+1);return b.jsx("div",{ref:u,role:"group","aria-label":"Progress",className:D(RV({size:i}),e),...c,children:m.map(g=>{const y=g<r?"completed":g===r?"active":"inactive",x=a?.[g-1]??`Step ${g}`,w=g===v;return b.jsxs(p.Fragment,{children:[b.jsx("button",{type:"button","aria-current":y==="active"?"step":void 0,"aria-label":x,"data-state":y,disabled:!s,onClick:()=>s?.(g),className:D(LV({size:i}),"focus-visible:ring-sunflower focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",s?"cursor-pointer":"cursor-default disabled:opacity-100",y==="completed"&&"bg-sunflower text-primary",y==="active"&&"border-sunflower text-primary border-2",y==="inactive"&&"border-border text-tertiary border-2"),children:y==="completed"?b.jsx(tE,{className:D(i==="sm"&&"h-2.5 w-2.5",i==="lg"&&"h-3.5 w-3.5",(!i||i==="default")&&"h-3 w-3"),strokeWidth:3}):g}),!w&&b.jsx("div",{"aria-hidden":"true",className:D($V({size:i}),g<r?"bg-sunflower":"bg-border")})]},g)})})}return b.jsx(NV.Provider,{value:h,children:b.jsxs("div",{ref:u,role:"group","aria-label":"Progress","data-orientation":n,className:D("w-full",e),...c,children:[b.jsx("div",{className:D(IV({orientation:n})),children:l}),n==="horizontal"&&d>0&&b.jsxs("div",{className:"text-tertiary text-body-sm mt-4 text-center font-sans",children:["Step ",Math.min(r,d)," of ",d]})]})})});VV.displayName="Stepper";const FV=te("group relative",{variants:{orientation:{horizontal:"flex flex-1 flex-col items-center",vertical:"flex flex-col"}},defaultVariants:{orientation:"horizontal"}}),BV=p.forwardRef(({className:e,step:t,children:r,...n},o)=>{const{activeStep:i,orientation:a,totalSteps:s,setTotalSteps:l}=ex(),c=t<i?"completed":t===i?"active":"inactive";p.useEffect(()=>{l(f=>Math.max(f,t))},[t,l]);const u=t===s,d=p.useMemo(()=>({step:t,state:c,isLastStep:u}),[t,c,u]);return b.jsx(jV.Provider,{value:d,children:b.jsx("div",{ref:o,"data-state":c,"data-step":t,"data-orientation":a,className:D(FV({orientation:a}),e),...n,children:r})})});BV.displayName="StepperItem";const WV=te("focus-visible:ring-sunflower flex items-center gap-3 text-left font-sans transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50",{variants:{orientation:{horizontal:"flex-col items-center gap-2 text-center",vertical:"flex-row"}},defaultVariants:{orientation:"horizontal"}}),zV=p.forwardRef(({className:e,children:t,...r},n)=>{const{orientation:o}=ex(),{state:i}=Zs();return b.jsx("button",{ref:n,type:"button","aria-current":i==="active"?"step":void 0,"data-state":i,className:D(WV({orientation:o}),e),...r,children:t})});zV.displayName="StepperTrigger";const KV=te("text-body-sm inline-flex shrink-0 items-center justify-center rounded-full font-sans transition-colors",{variants:{size:{sm:"h-7 w-7",default:"h-9 w-9",lg:"h-11 w-11"}},defaultVariants:{size:"default"}}),UV=p.forwardRef(({className:e,size:t,children:r,...n},o)=>{const{state:i,step:a}=Zs();return b.jsx("span",{ref:o,"data-state":i,className:D(KV({size:t}),i==="completed"&&"bg-sunflower text-primary",i==="active"&&"border-sunflower text-primary border-2",i==="inactive"&&"border-border text-tertiary border-2",e),"aria-hidden":"true",...n,children:i==="completed"?b.jsx(tE,{className:"h-4 w-4"}):r??a})});UV.displayName="StepperIndicator";const HV=p.forwardRef(({className:e,...t},r)=>{const{state:n}=Zs();return b.jsx("span",{ref:r,"data-state":n,className:D("text-body-sm font-sans font-medium tracking-tight",n==="inactive"?"text-tertiary":"text-primary",e),...t})});HV.displayName="StepperTitle";const GV=p.forwardRef(({className:e,...t},r)=>{const{state:n}=Zs();return b.jsx("p",{ref:r,"data-state":n,className:D("text-small font-sans",n==="inactive"?"text-quaternary":"text-secondary",e),...t})});GV.displayName="StepperDescription";const YV=te("transition-colors",{variants:{orientation:{horizontal:"absolute top-[17px] right-[calc(-50%_+_24px)] left-[calc(50%_+_24px)] h-0.5",vertical:"mt-1 mb-1 ml-4.5 min-h-8 w-0.5"}},defaultVariants:{orientation:"horizontal"}}),qV=p.forwardRef(({className:e,...t},r)=>{const{orientation:n}=ex(),{state:o}=Zs();return b.jsx("div",{ref:r,role:"separator","data-state":o,"data-orientation":n,className:D(YV({orientation:n}),o==="completed"?"bg-sunflower":"bg-border",e),"aria-hidden":"true",...t})});qV.displayName="StepperSeparator";var qd="Switch",[gge]=it(qd),[yge,bge]=gge(qd),XV=p.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:o,defaultChecked:i,required:a,disabled:s,value:l="on",onCheckedChange:c,form:u,...d}=e,[f,h]=p.useState(null),v=ie(t,w=>h(w)),m=p.useRef(!1),g=f?u||!!f.closest("form"):!0,[y,x]=xt({prop:o,defaultProp:i??!1,onChange:c,caller:qd});return b.jsxs(yge,{scope:r,checked:y,disabled:s,children:[b.jsx(ee.button,{type:"button",role:"switch","aria-checked":y,"aria-required":a,"data-state":eF(y),"data-disabled":s?"":void 0,disabled:s,value:l,...d,ref:v,onClick:U(e.onClick,w=>{x(S=>!S),g&&(m.current=w.isPropagationStopped(),m.current||w.stopPropagation())})}),g&&b.jsx(JV,{control:f,bubbles:!m.current,name:n,value:l,checked:y,required:a,disabled:s,form:u,style:{transform:"translateX(-100%)"}})]})});XV.displayName=qd;var ZV="SwitchThumb",QV=p.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,o=bge(ZV,r);return b.jsx(ee.span,{"data-state":eF(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})});QV.displayName=ZV;var xge="SwitchBubbleInput",JV=p.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...o},i)=>{const a=p.useRef(null),s=ie(a,i),l=Ls(r),c=$s(t);return p.useEffect(()=>{const u=a.current;if(!u)return;const d=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==r&&h){const v=new Event("click",{bubbles:n});h.call(u,r),u.dispatchEvent(v)}},[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}})});JV.displayName=xge;function eF(e){return e?"checked":"unchecked"}var wge=XV,Sge=QV;const tF=p.forwardRef(({className:e,...t},r)=>b.jsx(wge,{className:D("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(Sge,{className:D("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")})}));tF.displayName="Switch";const rF=te("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"}}),Pge=te("border-border bg-alt border-b",{variants:{},defaultVariants:{}}),Cge=te("",{variants:{},defaultVariants:{}}),Oge=te("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"}}),Ege=te("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"}}),Age=te("text-secondary align-middle [&:has([role=checkbox])]:pr-0",{variants:{size:{default:"p-4",compact:"p-2"}},defaultVariants:{size:"default"}}),Xd=p.createContext({size:"default",bordered:!1}),nF=p.forwardRef(({className:e,variant:t,size:r="default",bordered:n=!1,...o},i)=>b.jsx(Xd.Provider,{value:{size:r??"default",bordered:n},children:b.jsx("div",{className:"relative w-full overflow-auto",children:b.jsx("table",{ref:i,className:D(rF({variant:t,size:r}),e),...o})})}));nF.displayName="Table";const oF=p.forwardRef(({className:e,...t},r)=>b.jsx("thead",{ref:r,className:D(Pge(),e),...t}));oF.displayName="TableHeader";const iF=p.forwardRef(({className:e,...t},r)=>{const{bordered:n}=p.useContext(Xd);return b.jsx("tbody",{ref:r,className:D(Cge(),n&&"[&>tr:last-child>td]:border-b-0",e),...t})});iF.displayName="TableBody";const aF=p.forwardRef(({className:e,...t},r)=>b.jsx("tfoot",{ref:r,className:D("border-border bg-alt text-primary border-t font-normal",e),...t}));aF.displayName="TableFooter";const sF=p.forwardRef(({className:e,variant:t,...r},n)=>b.jsx("tr",{ref:n,className:D(Oge({variant:t}),e),...r}));sF.displayName="TableRow";const lF=p.forwardRef(({className:e,children:t,sortable:r=!1,sortDirection:n=null,onSort:o,...i},a)=>{const{size:s,bordered:l}=p.useContext(Xd),c=()=>{r&&o&&o()},u=d=>{r&&o&&(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),o())};return b.jsx("th",{ref:a,className:D(Ege({sortable:r,size:s}),l&&"border-border border-b",e),onClick:c,onKeyDown:u,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:D("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:D("-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"})})]})]})})});lF.displayName="TableHead";const cF=p.forwardRef(({className:e,children:t,...r},n)=>{const{size:o,bordered:i}=p.useContext(Xd);return b.jsx("td",{ref:n,className:D(Age({size:o}),i&&"border-border border-b",e),...r,children:b.jsx(qo,{variant:"body-sm",as:"span",children:t})})});cF.displayName="TableCell";const uF=p.forwardRef(({className:e,...t},r)=>b.jsx("caption",{ref:r,className:D("text-small text-tertiary mt-4 text-left",e),...t}));uF.displayName="TableCaption";function Tge({data:e,initialSortKey:t=null,initialSortDirection:r="asc"}){const[n,o]=p.useState({key:t??null,direction:t?r??"asc":null}),i=p.useCallback(c=>{o(u=>u.key!==c?{key:c,direction:"asc"}:u.direction==="asc"?{key:c,direction:"desc"}:u.direction==="desc"?{key:null,direction:null}:{key:c,direction:"asc"})},[]),{key:a,direction:s}=n;return{sortedData:p.useMemo(()=>!a||!s?e:[...e].sort((c,u)=>{const d=c[a],f=u[a];if(d===f)return 0;let h=0;return typeof d=="string"&&typeof f=="string"?h=d.localeCompare(f):typeof d=="number"&&typeof f=="number"?h=d-f:h=String(d).localeCompare(String(f)),s==="asc"?h:-h}),[e,a,s]),sortKey:a,sortDirection:s,handleSort:i}}function Mge({data:e,filterKeys:t}){const[r,n]=p.useState("");return{filteredData:p.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 dF=p.createContext(null);function fF(){const e=p.useContext(dF);if(!e)throw new Error("Tab components must be used within a Tabs component");return e}const pF=p.forwardRef(({className:e,defaultValue:t="",value:r,onValueChange:n,children:o,...i},a)=>{const[s,l]=p.useState(t),c=p.useRef(new Map),u=r!==void 0?r:s,d=p.useCallback(h=>{r===void 0&&l(h),n?.(h)},[r,n]),f=p.useCallback((h,v)=>{v?c.current.set(h,v):c.current.delete(h)},[]);return b.jsx(dF.Provider,{value:{activeTab:u,setActiveTab:d,registerTrigger:f},children:b.jsx("div",{ref:a,className:D("w-full",e),...i,children:o})})});pF.displayName="Tabs";const hF=te("text-body inline-flex items-center font-sans transition-colors",{variants:{variant:{default:"border-border relative gap-1 border-b",pills:"rounded-pill bg-alt gap-2 p-1"}},defaultVariants:{variant:"default"}}),mF=p.createContext(null),vF=p.forwardRef(({className:e,variant:t,...r},n)=>{const o=p.useRef(null),[i,a]=p.useState(null),[s,l]=p.useState(!1),c=p.useRef(!1),u=p.useCallback(h=>{if(h&&o.current){const v=o.current.getBoundingClientRect();a({left:h.left-v.left,width:h.width}),c.current||(c.current=!0,l(!0))}},[]),d=p.useCallback(h=>{o.current=h,typeof n=="function"?n(h):n&&(n.current=h)},[n]),f=p.useMemo(()=>({variant:t??"default",setActiveRect:u}),[t,u]);return b.jsx(mF.Provider,{value:f,children:b.jsxs("div",{ref:d,role:"tablist",className:D(hF({variant:t,className:e})),...r,children:[r.children,t!=="pills"&&i&&b.jsx("span",{className:D("bg-sunflower pointer-events-none absolute bottom-0 h-0.5",s&&"transition-all duration-200 ease-out"),style:{left:i.left,width:i.width},"aria-hidden":"true"})]})})});vF.displayName="TabList";const gF=te("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]:text-primary 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"}}),yF=p.forwardRef(({className:e,variant:t,size:r,value:n,...o},i)=>{const{activeTab:a,setActiveTab:s}=fF(),l=p.useContext(mF),c=p.useRef(null),u=a===n,d=p.useCallback(f=>{c.current=f,typeof i=="function"?i(f):i&&(i.current=f)},[i]);return p.useEffect(()=>{if(u&&c.current&&l){const f=()=>{if(c.current){const h=c.current.getBoundingClientRect();l.setActiveRect({left:h.left,width:h.width})}};return f(),window.addEventListener("resize",f),()=>window.removeEventListener("resize",f)}},[u,l]),b.jsx("button",{ref:d,role:"tab",type:"button","aria-selected":u,"data-state":u?"active":"inactive",onClick:()=>s(n),className:D(gF({variant:t,size:r,className:e})),...o})});yF.displayName="TabTrigger";const bF=te("font-sans",{variants:{size:{sm:"text-small mt-3",default:"text-body mt-4",lg:"text-body mt-6"}},defaultVariants:{size:"default"}}),xF=p.forwardRef(({className:e,size:t,value:r,...n},o)=>{const{activeTab:i}=fF(),a=i===r;return a?b.jsx("div",{ref:o,role:"tabpanel","data-state":a?"active":"inactive",className:D(bF({size:t,className:e})),...n}):null});xF.displayName="TabContent";const wF=te("bg-card text-body-sm text-primary placeholder:text-tertiary placeholder:text-body-sm 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"}}),SF=p.forwardRef(({className:e,variant:t,resize:r,...n},o)=>b.jsx("textarea",{className:D(wF({variant:t,resize:r}),e),ref:o,...n}));SF.displayName="Textarea";var tx="ToastProvider",[rx,kge,Dge]=Ri("Toast"),[PF]=it("Toast",[Dge]),[_ge,Zd]=PF(tx),CF=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,l]=p.useState(null),[c,u]=p.useState(0),d=p.useRef(!1),f=p.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${tx}\`. Expected non-empty \`string\`.`),b.jsx(rx.Provider,{scope:t,children:b.jsx(_ge,{scope:t,label:r,duration:n,swipeDirection:o,swipeThreshold:i,toastCount:c,viewport:s,onViewportChange:l,onToastAdd:p.useCallback(()=>u(h=>h+1),[]),onToastRemove:p.useCallback(()=>u(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:a})})};CF.displayName=tx;var OF="ToastViewport",Nge=["F8"],fv="toast.viewportPause",pv="toast.viewportResume",EF=p.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=Nge,label:o="Notifications ({hotkey})",...i}=e,a=Zd(OF,r),s=kge(r),l=p.useRef(null),c=p.useRef(null),u=p.useRef(null),d=p.useRef(null),f=ie(t,d,a.onViewportChange),h=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),v=a.toastCount>0;p.useEffect(()=>{const g=y=>{n.length!==0&&n.every(w=>y[w]||y.code===w)&&d.current?.focus()};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[n]),p.useEffect(()=>{const g=l.current,y=d.current;if(v&&g&&y){const x=()=>{if(!a.isClosePausedRef.current){const C=new CustomEvent(fv);y.dispatchEvent(C),a.isClosePausedRef.current=!0}},w=()=>{if(a.isClosePausedRef.current){const C=new CustomEvent(pv);y.dispatchEvent(C),a.isClosePausedRef.current=!1}},S=C=>{!g.contains(C.relatedTarget)&&w()},P=()=>{g.contains(document.activeElement)||w()};return g.addEventListener("focusin",x),g.addEventListener("focusout",S),g.addEventListener("pointermove",x),g.addEventListener("pointerleave",P),window.addEventListener("blur",x),window.addEventListener("focus",w),()=>{g.removeEventListener("focusin",x),g.removeEventListener("focusout",S),g.removeEventListener("pointermove",x),g.removeEventListener("pointerleave",P),window.removeEventListener("blur",x),window.removeEventListener("focus",w)}}},[v,a.isClosePausedRef]);const m=p.useCallback(({tabbingDirection:g})=>{const x=s().map(w=>{const S=w.ref.current,P=[S,...Hge(S)];return g==="forwards"?P:P.reverse()});return(g==="forwards"?x.reverse():x).flat()},[s]);return p.useEffect(()=>{const g=d.current;if(g){const y=x=>{const w=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!w){const P=document.activeElement,C=x.shiftKey;if(x.target===g&&C){c.current?.focus();return}const T=m({tabbingDirection:C?"backwards":"forwards"}),M=T.findIndex(_=>_===P);bh(T.slice(M+1))?x.preventDefault():C?c.current?.focus():u.current?.focus()}};return g.addEventListener("keydown",y),()=>g.removeEventListener("keydown",y)}},[s,m]),b.jsxs(vz,{ref:l,role:"region","aria-label":o.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:v?void 0:"none"},children:[v&&b.jsx(hv,{ref:c,onFocusFromOutsideViewport:()=>{const g=m({tabbingDirection:"forwards"});bh(g)}}),b.jsx(rx.Slot,{scope:r,children:b.jsx(ee.ol,{tabIndex:-1,...i,ref:f})}),v&&b.jsx(hv,{ref:u,onFocusFromOutsideViewport:()=>{const g=m({tabbingDirection:"backwards"});bh(g)}})]})});EF.displayName=OF;var AF="ToastFocusProxy",hv=p.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...o}=e,i=Zd(AF,r);return b.jsx(Kd,{tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:a=>{const s=a.relatedTarget;!i.viewport?.contains(s)&&n()}})});hv.displayName=AF;var Qs="Toast",jge="toast.swipeStart",Ige="toast.swipeMove",Rge="toast.swipeCancel",Lge="toast.swipeEnd",TF=p.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:o,onOpenChange:i,...a}=e,[s,l]=xt({prop:n,defaultProp:o??!0,onChange:i,caller:Qs});return b.jsx(At,{present:r||s,children:b.jsx(Fge,{open:s,...a,ref:t,onClose:()=>l(!1),onPause:Et(e.onPause),onResume:Et(e.onResume),onSwipeStart:U(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:U(e.onSwipeMove,c=>{const{x:u,y:d}=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",`${d}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:d}=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",`${d}px`),l(!1)})})})});TF.displayName=Qs;var[$ge,Vge]=PF(Qs,{onClose(){}}),Fge=p.forwardRef((e,t)=>{const{__scopeToast:r,type:n="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:s,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:h,...v}=e,m=Zd(Qs,r),[g,y]=p.useState(null),x=ie(t,R=>y(R)),w=p.useRef(null),S=p.useRef(null),P=o||m.duration,C=p.useRef(0),E=p.useRef(P),A=p.useRef(0),{onToastAdd:T,onToastRemove:M}=m,_=Et(()=>{g?.contains(document.activeElement)&&m.viewport?.focus(),a()}),k=p.useCallback(R=>{!R||R===1/0||(window.clearTimeout(A.current),C.current=new Date().getTime(),A.current=window.setTimeout(_,R))},[_]);p.useEffect(()=>{const R=m.viewport;if(R){const z=()=>{k(E.current),c?.()},B=()=>{const F=new Date().getTime()-C.current;E.current=E.current-F,window.clearTimeout(A.current),l?.()};return R.addEventListener(fv,B),R.addEventListener(pv,z),()=>{R.removeEventListener(fv,B),R.removeEventListener(pv,z)}}},[m.viewport,P,l,c,k]),p.useEffect(()=>{i&&!m.isClosePausedRef.current&&k(P)},[i,P,m.isClosePausedRef,k]),p.useEffect(()=>(T(),()=>M()),[T,M]);const N=p.useMemo(()=>g?IF(g):null,[g]);return m.viewport?b.jsxs(b.Fragment,{children:[N&&b.jsx(Bge,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite",children:N}),b.jsx($ge,{scope:r,onClose:_,children:as.createPortal(b.jsx(rx.ItemSlot,{scope:r,children:b.jsx(mz,{asChild:!0,onEscapeKeyDown:U(s,()=>{m.isFocusedToastEscapeKeyDownRef.current||_(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:b.jsx(ee.li,{tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":m.swipeDirection,...v,ref:x,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:U(e.onKeyDown,R=>{R.key==="Escape"&&(s?.(R.nativeEvent),R.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,_()))}),onPointerDown:U(e.onPointerDown,R=>{R.button===0&&(w.current={x:R.clientX,y:R.clientY})}),onPointerMove:U(e.onPointerMove,R=>{if(!w.current)return;const z=R.clientX-w.current.x,B=R.clientY-w.current.y,F=!!S.current,j=["left","right"].includes(m.swipeDirection),L=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,H=j?L(0,z):0,re=j?0:L(0,B),le=R.pointerType==="touch"?10:2,ae={x:H,y:re},oe={originalEvent:R,delta:ae};F?(S.current=ae,Fl(Ige,d,oe,{discrete:!1})):_O(ae,m.swipeDirection,le)?(S.current=ae,Fl(jge,u,oe,{discrete:!1}),R.target.setPointerCapture(R.pointerId)):(Math.abs(z)>le||Math.abs(B)>le)&&(w.current=null)}),onPointerUp:U(e.onPointerUp,R=>{const z=S.current,B=R.target;if(B.hasPointerCapture(R.pointerId)&&B.releasePointerCapture(R.pointerId),S.current=null,w.current=null,z){const F=R.currentTarget,j={originalEvent:R,delta:z};_O(z,m.swipeDirection,m.swipeThreshold)?Fl(Lge,h,j,{discrete:!0}):Fl(Rge,f,j,{discrete:!0}),F.addEventListener("click",L=>L.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),Bge=e=>{const{__scopeToast:t,children:r,...n}=e,o=Zd(Qs,t),[i,a]=p.useState(!1),[s,l]=p.useState(!1);return Kge(()=>a(!0)),p.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:b.jsx(Bo,{asChild:!0,children:b.jsx(Kd,{...n,children:i&&b.jsxs(b.Fragment,{children:[o.label," ",r]})})})},Wge="ToastTitle",MF=p.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return b.jsx(ee.div,{...n,ref:t})});MF.displayName=Wge;var zge="ToastDescription",kF=p.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return b.jsx(ee.div,{...n,ref:t})});kF.displayName=zge;var DF="ToastAction",_F=p.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?b.jsx(jF,{altText:r,asChild:!0,children:b.jsx(nx,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${DF}\`. Expected non-empty \`string\`.`),null)});_F.displayName=DF;var NF="ToastClose",nx=p.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,o=Vge(NF,r);return b.jsx(jF,{asChild:!0,children:b.jsx(ee.button,{type:"button",...n,ref:t,onClick:U(e.onClick,o.onClose)})})});nx.displayName=NF;var jF=p.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 IF(e){const t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),Uge(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(...IF(n))}}),t}function Fl(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?gv(o,i):o.dispatchEvent(i)}var _O=(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 Kge(e=()=>{}){const t=Et(e);pt(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function Uge(e){return e.nodeType===e.ELEMENT_NODE}function Hge(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 bh(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var Gge=CF,Yge=EF,qge=TF,Xge=MF,Zge=kF,Qge=_F,Jge=nx;const eye=Gge,RF=p.forwardRef(({className:e,...t},r)=>b.jsx(Yge,{ref:r,className:D("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}));RF.displayName="ToastViewport";const LF=te(["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"}}),$F=p.forwardRef(({className:e,variant:t,...r},n)=>b.jsx(qge,{ref:n,className:D(LF({variant:t}),e),...r}));$F.displayName="Toast";const VF=p.forwardRef(({className:e,...t},r)=>b.jsx(Qge,{ref:r,className:D("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}));VF.displayName="ToastAction";const FF=p.forwardRef(({className:e,...t},r)=>b.jsxs(Jge,{ref:r,className:D("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(oE,{className:"h-4 w-4"}),b.jsx("span",{className:"sr-only",children:"Close"})]}));FF.displayName="ToastClose";const BF=p.forwardRef(({className:e,...t},r)=>b.jsx(Xge,{ref:r,className:D("text-sm",e),...t}));BF.displayName="ToastTitle";const WF=p.forwardRef(({className:e,...t},r)=>b.jsx(Zge,{ref:r,className:D("text-secondary text-sm",e),...t}));WF.displayName="ToastDescription";var tye=Symbol("radix.slottable");function rye(e){const t=({children:r})=>b.jsx(b.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=tye,t}var[Qd]=it("Tooltip",[Zn]),Jd=Zn(),zF="TooltipProvider",nye=700,mv="tooltip.open",[oye,ox]=Qd(zF),KF=e=>{const{__scopeTooltip:t,delayDuration:r=nye,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:i}=e,a=p.useRef(!0),s=p.useRef(!1),l=p.useRef(0);return p.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),b.jsx(oye,{scope:t,isOpenDelayedRef:a,delayDuration:r,onOpen:p.useCallback(()=>{window.clearTimeout(l.current),a.current=!1},[]),onClose:p.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.current=!0,n)},[n]),isPointerInTransitRef:s,onPointerInTransitChange:p.useCallback(c=>{s.current=c},[]),disableHoverableContent:o,children:i})};KF.displayName=zF;var os="Tooltip",[iye,Js]=Qd(os),UF=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o,onOpenChange:i,disableHoverableContent:a,delayDuration:s}=e,l=ox(os,e.__scopeTooltip),c=Jd(t),[u,d]=p.useState(null),f=It(),h=p.useRef(0),v=a??l.disableHoverableContent,m=s??l.delayDuration,g=p.useRef(!1),[y,x]=xt({prop:n,defaultProp:o??!1,onChange:E=>{E?(l.onOpen(),document.dispatchEvent(new CustomEvent(mv))):l.onClose(),i?.(E)},caller:os}),w=p.useMemo(()=>y?g.current?"delayed-open":"instant-open":"closed",[y]),S=p.useCallback(()=>{window.clearTimeout(h.current),h.current=0,g.current=!1,x(!0)},[x]),P=p.useCallback(()=>{window.clearTimeout(h.current),h.current=0,x(!1)},[x]),C=p.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{g.current=!0,x(!0),h.current=0},m)},[m,x]);return p.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),b.jsx(Fs,{...c,children:b.jsx(iye,{scope:t,contentId:f,open:y,stateAttribute:w,trigger:u,onTriggerChange:d,onTriggerEnter:p.useCallback(()=>{l.isOpenDelayedRef.current?C():S()},[l.isOpenDelayedRef,C,S]),onTriggerLeave:p.useCallback(()=>{v?P():(window.clearTimeout(h.current),h.current=0)},[P,v]),onOpen:S,onClose:P,disableHoverableContent:v,children:r})})};UF.displayName=os;var vv="TooltipTrigger",HF=p.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Js(vv,r),i=ox(vv,r),a=Jd(r),s=p.useRef(null),l=ie(t,s,o.onTriggerChange),c=p.useRef(!1),u=p.useRef(!1),d=p.useCallback(()=>c.current=!1,[]);return p.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),b.jsx(Bs,{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,f=>{f.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",d,{once:!0})}),onFocus:U(e.onFocus,()=>{c.current||o.onOpen()}),onBlur:U(e.onBlur,o.onClose),onClick:U(e.onClick,o.onClose)})})});HF.displayName=vv;var ix="TooltipPortal",[aye,sye]=Qd(ix,{forceMount:void 0}),GF=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,i=Js(ix,t);return b.jsx(aye,{scope:t,forceMount:r,children:b.jsx(At,{present:r||i.open,children:b.jsx(Bo,{asChild:!0,container:o,children:n})})})};GF.displayName=ix;var Ii="TooltipContent",YF=p.forwardRef((e,t)=>{const r=sye(Ii,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...i}=e,a=Js(Ii,e.__scopeTooltip);return b.jsx(At,{present:n||a.open,children:a.disableHoverableContent?b.jsx(qF,{side:o,...i,ref:t}):b.jsx(lye,{side:o,...i,ref:t})})}),lye=p.forwardRef((e,t)=>{const r=Js(Ii,e.__scopeTooltip),n=ox(Ii,e.__scopeTooltip),o=p.useRef(null),i=ie(t,o),[a,s]=p.useState(null),{trigger:l,onClose:c}=r,u=o.current,{onPointerInTransitChange:d}=n,f=p.useCallback(()=>{s(null),d(!1)},[d]),h=p.useCallback((v,m)=>{const g=v.currentTarget,y={x:v.clientX,y:v.clientY},x=fye(y,g.getBoundingClientRect()),w=pye(y,x),S=hye(m.getBoundingClientRect()),P=vye([...w,...S]);s(P),d(!0)},[d]);return p.useEffect(()=>()=>f(),[f]),p.useEffect(()=>{if(l&&u){const v=g=>h(g,u),m=g=>h(g,l);return l.addEventListener("pointerleave",v),u.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",v),u.removeEventListener("pointerleave",m)}}},[l,u,h,f]),p.useEffect(()=>{if(a){const v=m=>{const g=m.target,y={x:m.clientX,y:m.clientY},x=l?.contains(g)||u?.contains(g),w=!mye(y,a);x?f():w&&(f(),c())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[l,u,a,c,f]),b.jsx(qF,{...e,ref:i})}),[cye,uye]=Qd(os,{isInside:!1}),dye=rye("TooltipContent"),qF=p.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...s}=e,l=Js(Ii,r),c=Jd(r),{onClose:u}=l;return p.useEffect(()=>(document.addEventListener(mv,u),()=>document.removeEventListener(mv,u)),[u]),p.useEffect(()=>{if(l.trigger){const d=f=>{f.target?.contains(l.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,u]),b.jsx(Fo,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:u,children:b.jsxs(Td,{"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(dye,{children:n}),b.jsx(cye,{scope:r,isInside:!0,children:b.jsx(fve,{id:l.contentId,role:"tooltip",children:o||n})})]})})});YF.displayName=Ii;var XF="TooltipArrow",ZF=p.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Jd(r);return uye(XF,r).isInside?null:b.jsx(Md,{...o,...n,ref:t})});ZF.displayName=XF;function fye(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 pye(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 hye(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 mye(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,d=l.x,f=l.y;u>n!=f>n&&r<(d-c)*(n-u)/(f-u)+c&&(o=!o)}return o}function vye(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),gye(t)}function gye(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 yye=KF,bye=UF,xye=HF,wye=GF,Sye=YF,Pye=ZF;const Cye=yye,Oye=bye,Eye=xye,QF=wye,ax=p.forwardRef(({className:e,...t},r)=>b.jsx(Pye,{ref:r,className:D("fill-primary",e),...t}));ax.displayName="TooltipArrow";const JF=te(["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"}}),eB=p.forwardRef(({className:e,variant:t,sideOffset:r=4,showArrow:n=!1,children:o,...i},a)=>b.jsx(QF,{children:b.jsxs(Sye,{ref:a,sideOffset:r,className:D(JF({variant:t,className:e})),...i,children:[o,n&&b.jsx(ax,{className:t==="light"?"fill-card":"fill-primary"})]})}));eB.displayName="TooltipContent";exports.Accordion=bE;exports.AccordionContent=PE;exports.AccordionItem=xE;exports.AccordionTrigger=SE;exports.ActionsMenuButton=gR;exports.AlertDialog=J3;exports.AlertDialogAction=TA;exports.AlertDialogCancel=MA;exports.AlertDialogContent=PA;exports.AlertDialogDescription=AA;exports.AlertDialogFooter=OA;exports.AlertDialogHeader=CA;exports.AlertDialogOverlay=_v;exports.AlertDialogPortal=wA;exports.AlertDialogTitle=EA;exports.AlertDialogTrigger=e5;exports.Badge=DA;exports.Banner=NA;exports.BarChart=W_;exports.BreadcrumbItem=U_;exports.BreadcrumbSeparator=Vy;exports.Breadcrumbs=K_;exports.Button=Dv;exports.Calendar=Rs;exports.Card=CN;exports.Checkbox=NN;exports.ContextMenu=_ce;exports.ContextMenuCheckboxItem=bI;exports.ContextMenuContent=gI;exports.ContextMenuGroup=jce;exports.ContextMenuItem=yI;exports.ContextMenuLabel=wI;exports.ContextMenuPortal=hI;exports.ContextMenuRadioGroup=Rce;exports.ContextMenuRadioItem=xI;exports.ContextMenuSeparator=SI;exports.ContextMenuShortcut=PI;exports.ContextMenuSub=Ice;exports.ContextMenuSubContent=vI;exports.ContextMenuSubTrigger=mI;exports.ContextMenuTrigger=Nce;exports.DatePicker=II;exports.DateRangePicker=LI;exports.DateTimePicker=VI;exports.Divider=BI;exports.DropdownMenu=kue;exports.DropdownMenuCheckboxItem=fR;exports.DropdownMenuContent=uR;exports.DropdownMenuGroup=_ue;exports.DropdownMenuItem=dR;exports.DropdownMenuLabel=hR;exports.DropdownMenuPortal=sR;exports.DropdownMenuRadioGroup=jue;exports.DropdownMenuRadioItem=pR;exports.DropdownMenuSeparator=mR;exports.DropdownMenuShortcut=vR;exports.DropdownMenuSub=Nue;exports.DropdownMenuSubContent=cR;exports.DropdownMenuSubTrigger=lR;exports.DropdownMenuTrigger=Due;exports.EngrateLogo=bR;exports.Eyebrow=wR;exports.Footer=PR;exports.FooterBottom=TR;exports.FooterContent=CR;exports.FooterCopyright=MR;exports.FooterHeading=ER;exports.FooterLinks=AR;exports.FooterSection=OR;exports.FormField=_R;exports.FormMessage=pb;exports.Grid=NR;exports.GridItem=jR;exports.Header=RR;exports.HeaderActions=VR;exports.HeaderLogo=LR;exports.HeaderNav=$R;exports.Heading=mb;exports.Input=WR;exports.Label=hb;exports.LineChart=KR;exports.Link=HR;exports.Modal=jL;exports.ModalClose=Ume;exports.ModalContent=LL;exports.ModalDescription=BL;exports.ModalFooter=VL;exports.ModalHeader=$L;exports.ModalOverlay=Yb;exports.ModalPortal=IL;exports.ModalTitle=FL;exports.ModalTrigger=Kme;exports.Pagination=KL;exports.PaginationDot=qL;exports.PaginationDots=GL;exports.PaginationItem=gi;exports.PieChart=ZL;exports.ProgressIndicator=e$;exports.RadioGroup=p$;exports.RadioGroupItem=h$;exports.Select=Yve;exports.SelectContent=H$;exports.SelectGroup=qve;exports.SelectItem=Y$;exports.SelectLabel=G$;exports.SelectScrollDownButton=Qb;exports.SelectScrollUpButton=Zb;exports.SelectSeparator=q$;exports.SelectTrigger=U$;exports.SelectValue=Xve;exports.Sidebar=Q$;exports.SidebarContent=eV;exports.SidebarFooter=tV;exports.SidebarGroup=rV;exports.SidebarGroupLabel=nV;exports.SidebarHeader=J$;exports.SidebarItem=oV;exports.SidebarSeparator=aV;exports.SidebarSub=lV;exports.SidebarSubContent=uV;exports.SidebarSubTrigger=cV;exports.SidebarTrigger=iV;exports.Skeleton=fV;exports.Slider=TV;exports.Spinner=kV;exports.Stack=_V;exports.Stepper=VV;exports.StepperDescription=GV;exports.StepperIndicator=UV;exports.StepperItem=BV;exports.StepperSeparator=qV;exports.StepperTitle=HV;exports.StepperTrigger=zV;exports.Switch=tF;exports.TabContent=xF;exports.TabList=vF;exports.TabTrigger=yF;exports.Table=nF;exports.TableBody=iF;exports.TableCaption=uF;exports.TableCell=cF;exports.TableFooter=aF;exports.TableHead=lF;exports.TableHeader=oF;exports.TableRow=sF;exports.Tabs=pF;exports.Text=qo;exports.Textarea=SF;exports.Toast=$F;exports.ToastAction=VF;exports.ToastClose=FF;exports.ToastDescription=WF;exports.ToastProvider=eye;exports.ToastTitle=BF;exports.ToastViewport=RF;exports.Tooltip=Oye;exports.TooltipArrow=ax;exports.TooltipContent=eB;exports.TooltipPortal=QF;exports.TooltipProvider=Cye;exports.TooltipTrigger=Eye;exports.accordionTriggerVariants=wE;exports.accordionVariants=yE;exports.alertDialogContentVariants=SA;exports.badgeVariants=kA;exports.bannerVariants=_A;exports.barChartVariants=B_;exports.breadcrumbItemVariants=Em;exports.breadcrumbsVariants=z_;exports.buttonVariants=Tu;exports.cardVariants=PN;exports.cn=D;exports.datePickerTriggerVariants=jI;exports.dateRangePickerTriggerVariants=RI;exports.dateTimePickerTriggerVariants=$I;exports.dividerVariants=FI;exports.engrateLogoVariants=yR;exports.eyebrowVariants=xR;exports.footerVariants=SR;exports.gridItemVariants=Uue;exports.gridVariants=Fue;exports.headerVariants=IR;exports.headingVariants=FR;exports.inputVariants=BR;exports.labelVariants=DR;exports.lineChartVariants=zR;exports.linkVariants=UR;exports.miniStepperIndicatorVariants=LV;exports.miniStepperSeparatorVariants=$V;exports.miniStepperVariants=RV;exports.modalContentVariants=RL;exports.paginationDotVariants=YL;exports.paginationDotsVariants=HL;exports.paginationItemVariants=zL;exports.paginationVariants=WL;exports.pieChartVariants=XL;exports.progressBarVariants=JL;exports.progressIndicatorVariants=QL;exports.sidebarItemVariants=ns;exports.sidebarVariants=Z$;exports.skeletonVariants=dV;exports.sliderVariants=AV;exports.spinnerVariants=MV;exports.stackVariants=DV;exports.stepperIndicatorVariants=KV;exports.stepperItemVariants=FV;exports.stepperSeparatorVariants=YV;exports.stepperTriggerVariants=WV;exports.stepperVariants=IV;exports.tabContentVariants=bF;exports.tabListVariants=hF;exports.tabTriggerVariants=gF;exports.tableVariants=rF;exports.textVariants=_L;exports.textareaVariants=wF;exports.toastVariants=LF;exports.tooltipContentVariants=JF;exports.useFilterableTable=Mge;exports.useSidebarContext=Xo;exports.useSidebarSubContext=sV;exports.useSortableTable=Tge;