uilab-core 0.0.2 → 0.1.1

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.
Files changed (128) hide show
  1. package/README.md +1 -2
  2. package/dist/components/accordion.d.ts +8 -0
  3. package/dist/components/accordion.d.ts.map +1 -0
  4. package/dist/components/alert-dialog.d.ts +15 -0
  5. package/dist/components/alert-dialog.d.ts.map +1 -0
  6. package/dist/components/alert.d.ts +10 -0
  7. package/dist/components/alert.d.ts.map +1 -0
  8. package/dist/components/aspect-ratio.d.ts +4 -0
  9. package/dist/components/aspect-ratio.d.ts.map +1 -0
  10. package/dist/components/avatar.d.ts +7 -0
  11. package/dist/components/avatar.d.ts.map +1 -0
  12. package/dist/components/badge.d.ts +10 -0
  13. package/dist/components/badge.d.ts.map +1 -0
  14. package/dist/components/breadcrumb.d.ts +12 -0
  15. package/dist/components/breadcrumb.d.ts.map +1 -0
  16. package/dist/components/button-group.d.ts +12 -0
  17. package/dist/components/button-group.d.ts.map +1 -0
  18. package/dist/components/button.d.ts +11 -0
  19. package/dist/components/button.d.ts.map +1 -0
  20. package/dist/components/calendar.d.ts +9 -0
  21. package/dist/components/calendar.d.ts.map +1 -0
  22. package/dist/components/card.d.ts +10 -0
  23. package/dist/components/card.d.ts.map +1 -0
  24. package/dist/components/carousel.d.ts +20 -0
  25. package/dist/components/carousel.d.ts.map +1 -0
  26. package/dist/components/chart.d.ts +41 -0
  27. package/dist/components/chart.d.ts.map +1 -0
  28. package/dist/components/checkbox.d.ts +5 -0
  29. package/dist/components/checkbox.d.ts.map +1 -0
  30. package/dist/components/collapsible.d.ts +6 -0
  31. package/dist/components/collapsible.d.ts.map +1 -0
  32. package/dist/components/command.d.ts +19 -0
  33. package/dist/components/command.d.ts.map +1 -0
  34. package/dist/components/context-menu.d.ts +26 -0
  35. package/dist/components/context-menu.d.ts.map +1 -0
  36. package/dist/components/dialog.d.ts +16 -0
  37. package/dist/components/dialog.d.ts.map +1 -0
  38. package/dist/components/drawer.d.ts +14 -0
  39. package/dist/components/drawer.d.ts.map +1 -0
  40. package/dist/components/dropdown-menu.d.ts +26 -0
  41. package/dist/components/dropdown-menu.d.ts.map +1 -0
  42. package/dist/components/empty.d.ts +12 -0
  43. package/dist/components/empty.d.ts.map +1 -0
  44. package/dist/components/field.d.ts +25 -0
  45. package/dist/components/field.d.ts.map +1 -0
  46. package/dist/components/form.d.ts +25 -0
  47. package/dist/components/form.d.ts.map +1 -0
  48. package/dist/components/hover-card.d.ts +7 -0
  49. package/dist/components/hover-card.d.ts.map +1 -0
  50. package/dist/components/index.d.ts +54 -0
  51. package/dist/components/index.d.ts.map +1 -0
  52. package/dist/components/input-group.d.ts +17 -0
  53. package/dist/components/input-group.d.ts.map +1 -0
  54. package/dist/components/input-otp.d.ts +12 -0
  55. package/dist/components/input-otp.d.ts.map +1 -0
  56. package/dist/components/input.d.ts +4 -0
  57. package/dist/components/input.d.ts.map +1 -0
  58. package/dist/components/item.d.ts +24 -0
  59. package/dist/components/item.d.ts.map +1 -0
  60. package/dist/components/kbd.d.ts +4 -0
  61. package/dist/components/kbd.d.ts.map +1 -0
  62. package/dist/components/label.d.ts +5 -0
  63. package/dist/components/label.d.ts.map +1 -0
  64. package/dist/components/menubar.d.ts +27 -0
  65. package/dist/components/menubar.d.ts.map +1 -0
  66. package/dist/components/navigation-menu.d.ts +15 -0
  67. package/dist/components/navigation-menu.d.ts.map +1 -0
  68. package/dist/components/pagination.d.ts +14 -0
  69. package/dist/components/pagination.d.ts.map +1 -0
  70. package/dist/components/popover.d.ts +8 -0
  71. package/dist/components/popover.d.ts.map +1 -0
  72. package/dist/components/progress.d.ts +5 -0
  73. package/dist/components/progress.d.ts.map +1 -0
  74. package/dist/components/radio-group.d.ts +6 -0
  75. package/dist/components/radio-group.d.ts.map +1 -0
  76. package/dist/components/resizable.d.ts +9 -0
  77. package/dist/components/resizable.d.ts.map +1 -0
  78. package/dist/components/scroll-area.d.ts +6 -0
  79. package/dist/components/scroll-area.d.ts.map +1 -0
  80. package/dist/components/select.d.ts +16 -0
  81. package/dist/components/select.d.ts.map +1 -0
  82. package/dist/components/separator.d.ts +5 -0
  83. package/dist/components/separator.d.ts.map +1 -0
  84. package/dist/components/sheet.d.ts +14 -0
  85. package/dist/components/sheet.d.ts.map +1 -0
  86. package/dist/components/sidebar.d.ts +70 -0
  87. package/dist/components/sidebar.d.ts.map +1 -0
  88. package/dist/components/skeleton.d.ts +3 -0
  89. package/dist/components/skeleton.d.ts.map +1 -0
  90. package/dist/components/slider.d.ts +5 -0
  91. package/dist/components/slider.d.ts.map +1 -0
  92. package/dist/components/sonner.d.ts +4 -0
  93. package/dist/components/sonner.d.ts.map +1 -0
  94. package/dist/components/spinner.d.ts +3 -0
  95. package/dist/components/spinner.d.ts.map +1 -0
  96. package/dist/components/switch.d.ts +5 -0
  97. package/dist/components/switch.d.ts.map +1 -0
  98. package/dist/components/table.d.ts +11 -0
  99. package/dist/components/table.d.ts.map +1 -0
  100. package/dist/components/tabs.d.ts +8 -0
  101. package/dist/components/tabs.d.ts.map +1 -0
  102. package/dist/components/textarea.d.ts +4 -0
  103. package/dist/components/textarea.d.ts.map +1 -0
  104. package/dist/components/toggle-group.d.ts +8 -0
  105. package/dist/components/toggle-group.d.ts.map +1 -0
  106. package/dist/components/toggle.d.ts +10 -0
  107. package/dist/components/toggle.d.ts.map +1 -0
  108. package/dist/components/tooltip.d.ts +8 -0
  109. package/dist/components/tooltip.d.ts.map +1 -0
  110. package/dist/hooks/index.d.ts +2 -0
  111. package/dist/hooks/index.d.ts.map +1 -0
  112. package/dist/hooks/use-is-mobile.d.ts +2 -0
  113. package/dist/hooks/use-is-mobile.d.ts.map +1 -0
  114. package/dist/hooks/use-mobile.d.ts +2 -0
  115. package/dist/hooks/use-mobile.d.ts.map +1 -0
  116. package/dist/index.cjs +20 -0
  117. package/dist/index.cjs.map +1 -0
  118. package/dist/index.d.ts +629 -0
  119. package/dist/index.d.ts.map +1 -0
  120. package/dist/index.js +20 -0
  121. package/dist/index.js.map +1 -0
  122. package/dist/lib/index.d.ts +2 -0
  123. package/dist/lib/index.d.ts.map +1 -0
  124. package/dist/lib/utils.d.ts +3 -0
  125. package/dist/lib/utils.d.ts.map +1 -0
  126. package/dist/styles.css +1 -0
  127. package/dist/theme.css +1 -0
  128. package/package.json +70 -35
package/dist/index.js ADDED
@@ -0,0 +1,20 @@
1
+ import{jsx as e,Fragment as t,jsxs as n}from"react/jsx-runtime";import*as r from"react";import o,{useState as a,createContext as i,useContext as s,useCallback as l,useRef as c,useLayoutEffect as u,useEffect as d,useMemo as f,isValidElement as p,forwardRef as m,PureComponent as h,useImperativeHandle as g,cloneElement as v,createElement as y}from"react";import*as b from"react-dom";import w,{createPortal as x}from"react-dom";import{ChevronDownIcon as k,ChevronRight as N,MoreHorizontal as S,ChevronLeftIcon as C,ChevronRightIcon as _,ArrowLeft as M,ArrowRight as E,CheckIcon as O,XIcon as D,SearchIcon as P,CircleIcon as T,MinusIcon as A,MoreHorizontalIcon as R,GripVerticalIcon as I,ChevronUpIcon as j,PanelLeftIcon as z,Loader2Icon as L}from"lucide-react";import{FormProvider as F,useFormContext as B,useFormState as $,Controller as W}from"react-hook-form";function H(t,n=[]){let o=[];const a=()=>{const e=o.map(e=>r.createContext(e));return function(n){const o=n?.[t]||e;return r.useMemo(()=>({[`__scope${t}`]:{...n,[t]:o}}),[n,o])}};return a.scopeName=t,[function(n,a){const i=r.createContext(a),s=o.length;o=[...o,a];const l=n=>{const{scope:o,children:a,...l}=n,c=o?.[t]?.[s]||i,u=r.useMemo(()=>l,Object.values(l));return e(c.Provider,{value:u,children:a})};return l.displayName=n+"Provider",[l,function(e,o){const l=o?.[t]?.[s]||i,c=r.useContext(l);if(c)return c;if(void 0!==a)return a;throw new Error(`\`${e}\` must be used within \`${n}\``)}]},U(a,...n)]}function U(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){const o=n.reduce((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]}),{});return r.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function V(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Y(...e){return t=>{let n=!1;const r=e.map(e=>{const r=V(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():V(e[t],null)}}}}function K(...e){return r.useCallback(Y(...e),e)}function q(t){const n=X(t),o=r.forwardRef((t,o)=>{const{children:a,...i}=t,s=r.Children.toArray(a),l=s.find(J);if(l){const t=l.props.children,a=s.map(e=>e===l?r.Children.count(t)>1?r.Children.only(null):r.isValidElement(t)?t.props.children:null:e);return e(n,{...i,ref:o,children:r.isValidElement(t)?r.cloneElement(t,void 0,a):null})}return e(n,{...i,ref:o,children:a})});return o.displayName=`${t}.Slot`,o}var G=q("Slot");function X(e){const t=r.forwardRef((e,t)=>{const{children:n,...o}=e;if(r.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n),a=function(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}(o,n.props);return n.type!==r.Fragment&&(a.ref=t?Y(t,e):e),r.cloneElement(n,a)}return r.Children.count(n)>1?r.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Z=Symbol("radix.slottable");function Q(n){const r=({children:n})=>e(t,{children:n});return r.displayName=`${n}.Slottable`,r.__radixId=Z,r}function J(e){return r.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Z}function ee(t){const n=t+"CollectionProvider",[r,a]=H(n),[i,s]=r(n,{collectionRef:{current:null},itemMap:new Map}),l=t=>{const{scope:n,children:r}=t,a=o.useRef(null),s=o.useRef(new Map).current;return e(i,{scope:n,itemMap:s,collectionRef:a,children:r})};l.displayName=n;const c=t+"CollectionSlot",u=q(c),d=o.forwardRef((t,n)=>{const{scope:r,children:o}=t,a=K(n,s(c,r).collectionRef);return e(u,{ref:a,children:o})});d.displayName=c;const f=t+"CollectionItemSlot",p="data-radix-collection-item",m=q(f),h=o.forwardRef((t,n)=>{const{scope:r,children:a,...i}=t,l=o.useRef(null),c=K(n,l),u=s(f,r);return o.useEffect(()=>(u.itemMap.set(l,{ref:l,...i}),()=>{u.itemMap.delete(l)})),e(m,{[p]:"",ref:c,children:a})});return h.displayName=f,[{Provider:l,Slot:d,ItemSlot:h},function(e){const n=s(t+"CollectionConsumer",e),r=o.useCallback(()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${p}]`)),r=Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current));return r},[n.collectionRef,n.itemMap]);return r},a]}function te(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}var ne=globalThis?.document?r.useLayoutEffect:()=>{},re=r[" useInsertionEffect ".trim().toString()]||ne;function oe({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[a,i,s]=function({defaultProp:e,onChange:t}){const[n,o]=r.useState(e),a=r.useRef(n),i=r.useRef(t);return re(()=>{i.current=t},[t]),r.useEffect(()=>{a.current!==n&&(i.current?.(n),a.current=n)},[n,a]),[n,o,i]}({defaultProp:t,onChange:n}),l=void 0!==e,c=l?e:a;{const t=r.useRef(void 0!==e);r.useEffect(()=>{const e=t.current;if(e!==l){const t=e?"controlled":"uncontrolled",n=l?"controlled":"uncontrolled";console.warn(`${o} is changing from ${t} to ${n}. 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.`)}t.current=l},[l,o])}const u=r.useCallback(t=>{if(l){const n=function(e){return"function"==typeof e}(t)?t(e):t;n!==e&&s.current?.(n)}else i(t)},[l,e,i,s]);return[c,u]}var ae=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,n)=>{const o=q(`Primitive.${n}`),a=r.forwardRef((t,r)=>{const{asChild:a,...i}=t,s=a?o:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),e(s,{...i,ref:r})});return a.displayName=`Primitive.${n}`,{...t,[n]:a}},{});function ie(e,t){e&&b.flushSync(()=>e.dispatchEvent(t))}var se=e=>{const{present:t,children:n}=e,o=function(e){const[t,n]=r.useState(),o=r.useRef(null),a=r.useRef(e),i=r.useRef("none"),s=e?"mounted":"unmounted",[l,c]=function(e,t){return r.useReducer((e,n)=>t[e][n]??e,e)}(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return r.useEffect(()=>{const e=le(o.current);i.current="mounted"===l?e:"none"},[l]),ne(()=>{const t=o.current,n=a.current;if(n!==e){const r=i.current,o=le(t);if(e)c("MOUNT");else if("none"===o||"none"===t?.display)c("UNMOUNT");else{c(n&&r!==o?"ANIMATION_OUT":"UNMOUNT")}a.current=e}},[e,c]),ne(()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,r=r=>{const i=le(o.current).includes(CSS.escape(r.animationName));if(r.target===t&&i&&(c("ANIMATION_END"),!a.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout(()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)})}},s=e=>{e.target===t&&(i.current=le(o.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",r),t.addEventListener("animationend",r),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",r),t.removeEventListener("animationend",r)}}c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:r.useCallback(e=>{o.current=e?getComputedStyle(e):null,n(e)},[])}}(t),a="function"==typeof n?n({present:o.isPresent}):r.Children.only(n),i=K(o.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(a));return"function"==typeof n||o.isPresent?r.cloneElement(a,{ref:i}):null};function le(e){return e?.animationName||"none"}se.displayName="Presence";var ce=r[" useId ".trim().toString()]||(()=>{}),ue=0;function de(e){const[t,n]=r.useState(ce());return ne(()=>{n(e=>e??String(ue++))},[e]),t?`radix-${t}`:""}var fe="Collapsible",[pe,me]=H(fe),[he,ge]=pe(fe),ve=r.forwardRef((t,n)=>{const{__scopeCollapsible:o,open:a,defaultOpen:i,disabled:s,onOpenChange:l,...c}=t,[u,d]=oe({prop:a,defaultProp:i??!1,onChange:l,caller:fe});return e(he,{scope:o,disabled:s,contentId:de(),open:u,onOpenToggle:r.useCallback(()=>d(e=>!e),[d]),children:e(ae.div,{"data-state":Ne(u),"data-disabled":s?"":void 0,...c,ref:n})})});ve.displayName=fe;var ye="CollapsibleTrigger",be=r.forwardRef((t,n)=>{const{__scopeCollapsible:r,...o}=t,a=ge(ye,r);return e(ae.button,{type:"button","aria-controls":a.contentId,"aria-expanded":a.open||!1,"data-state":Ne(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...o,ref:n,onClick:te(t.onClick,a.onOpenToggle)})});be.displayName=ye;var we="CollapsibleContent",xe=r.forwardRef((t,n)=>{const{forceMount:r,...o}=t,a=ge(we,t.__scopeCollapsible);return e(se,{present:r||a.open,children:({present:t})=>e(ke,{...o,ref:n,present:t})})});xe.displayName=we;var ke=r.forwardRef((t,n)=>{const{__scopeCollapsible:o,present:a,children:i,...s}=t,l=ge(we,o),[c,u]=r.useState(a),d=r.useRef(null),f=K(n,d),p=r.useRef(0),m=p.current,h=r.useRef(0),g=h.current,v=l.open||c,y=r.useRef(v),b=r.useRef(void 0);return r.useEffect(()=>{const e=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(e)},[]),ne(()=>{const e=d.current;if(e){b.current=b.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";const t=e.getBoundingClientRect();p.current=t.height,h.current=t.width,y.current||(e.style.transitionDuration=b.current.transitionDuration,e.style.animationName=b.current.animationName),u(a)}},[l.open,a]),e(ae.div,{"data-state":Ne(l.open),"data-disabled":l.disabled?"":void 0,id:l.contentId,hidden:!v,...s,ref:f,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...t.style},children:v&&i})});function Ne(e){return e?"open":"closed"}var Se=ve,Ce=be,_e=xe,Me=r.createContext(void 0);function Ee(e){const t=r.useContext(Me);return e||t||"ltr"}var Oe="Accordion",De=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Pe,Te,Ae]=ee(Oe),[Re]=H(Oe,[Ae,me]),Ie=me(),je=o.forwardRef((t,n)=>{const{type:r,...o}=t,a=o,i=o;return e(Pe.Provider,{scope:t.__scopeAccordion,children:"multiple"===r?e(We,{...i,ref:n}):e($e,{...a,ref:n})})});je.displayName=Oe;var[ze,Le]=Re(Oe),[Fe,Be]=Re(Oe,{collapsible:!1}),$e=o.forwardRef((t,n)=>{const{value:r,defaultValue:a,onValueChange:i=()=>{},collapsible:s=!1,...l}=t,[c,u]=oe({prop:r,defaultProp:a??"",onChange:i,caller:Oe});return e(ze,{scope:t.__scopeAccordion,value:o.useMemo(()=>c?[c]:[],[c]),onItemOpen:u,onItemClose:o.useCallback(()=>s&&u(""),[s,u]),children:e(Fe,{scope:t.__scopeAccordion,collapsible:s,children:e(Ve,{...l,ref:n})})})}),We=o.forwardRef((t,n)=>{const{value:r,defaultValue:a,onValueChange:i=()=>{},...s}=t,[l,c]=oe({prop:r,defaultProp:a??[],onChange:i,caller:Oe}),u=o.useCallback(e=>c((t=[])=>[...t,e]),[c]),d=o.useCallback(e=>c((t=[])=>t.filter(t=>t!==e)),[c]);return e(ze,{scope:t.__scopeAccordion,value:l,onItemOpen:u,onItemClose:d,children:e(Fe,{scope:t.__scopeAccordion,collapsible:!0,children:e(Ve,{...s,ref:n})})})}),[He,Ue]=Re(Oe),Ve=o.forwardRef((t,n)=>{const{__scopeAccordion:r,disabled:a,dir:i,orientation:s="vertical",...l}=t,c=K(o.useRef(null),n),u=Te(r),d="ltr"===Ee(i),f=te(t.onKeyDown,e=>{if(!De.includes(e.key))return;const t=e.target,n=u().filter(e=>!e.ref.current?.disabled),r=n.findIndex(e=>e.ref.current===t),o=n.length;if(-1===r)return;e.preventDefault();let a=r;const i=o-1,l=()=>{a=r+1,a>i&&(a=0)},c=()=>{a=r-1,a<0&&(a=i)};switch(e.key){case"Home":a=0;break;case"End":a=i;break;case"ArrowRight":"horizontal"===s&&(d?l():c());break;case"ArrowDown":"vertical"===s&&l();break;case"ArrowLeft":"horizontal"===s&&(d?c():l());break;case"ArrowUp":"vertical"===s&&c()}const f=a%o;n[f].ref.current?.focus()});return e(He,{scope:r,disabled:a,direction:i,orientation:s,children:e(Pe.Slot,{scope:r,children:e(ae.div,{...l,"data-orientation":s,ref:c,onKeyDown:a?void 0:f})})})}),Ye="AccordionItem",[Ke,qe]=Re(Ye),Ge=o.forwardRef((t,n)=>{const{__scopeAccordion:r,value:o,...a}=t,i=Ue(Ye,r),s=Le(Ye,r),l=Ie(r),c=de(),u=o&&s.value.includes(o)||!1,d=i.disabled||t.disabled;return e(Ke,{scope:r,open:u,disabled:d,triggerId:c,children:e(Se,{"data-orientation":i.orientation,"data-state":nt(u),...l,...a,ref:n,disabled:d,open:u,onOpenChange:e=>{e?s.onItemOpen(o):s.onItemClose(o)}})})});Ge.displayName=Ye;var Xe="AccordionHeader",Ze=o.forwardRef((t,n)=>{const{__scopeAccordion:r,...o}=t,a=Ue(Oe,r),i=qe(Xe,r);return e(ae.h3,{"data-orientation":a.orientation,"data-state":nt(i.open),"data-disabled":i.disabled?"":void 0,...o,ref:n})});Ze.displayName=Xe;var Qe="AccordionTrigger",Je=o.forwardRef((t,n)=>{const{__scopeAccordion:r,...o}=t,a=Ue(Oe,r),i=qe(Qe,r),s=Be(Qe,r),l=Ie(r);return e(Pe.ItemSlot,{scope:r,children:e(Ce,{"aria-disabled":i.open&&!s.collapsible||void 0,"data-orientation":a.orientation,id:i.triggerId,...l,...o,ref:n})})});Je.displayName=Qe;var et="AccordionContent",tt=o.forwardRef((t,n)=>{const{__scopeAccordion:r,...o}=t,a=Ue(Oe,r),i=qe(et,r),s=Ie(r);return e(_e,{role:"region","aria-labelledby":i.triggerId,"data-orientation":a.orientation,...s,...o,ref:n,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...t.style}})});function nt(e){return e?"open":"closed"}tt.displayName=et;var rt=je,ot=Ge,at=Ze,it=Je,st=tt;function lt(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=lt(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ct(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=lt(e))&&(r&&(r+=" "),r+=t);return r}const ut=e=>{const t=mt(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{const n=e.split("-");return""===n[0]&&1!==n.length&&n.shift(),dt(n,t)||pt(e)},getConflictingClassGroupIds:(e,t)=>{const o=n[e]||[];return t&&r[e]?[...o,...r[e]]:o}}},dt=(e,t)=>{if(0===e.length)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?dt(e.slice(1),r):void 0;if(o)return o;if(0===t.validators.length)return;const a=e.join("-");return t.validators.find(({validator:e})=>e(a))?.classGroupId},ft=/^\[(.+)\]$/,pt=e=>{if(ft.test(e)){const t=ft.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},mt=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const e in n)ht(n[e],r,e,t);return r},ht=(e,t,n,r)=>{e.forEach(e=>{if("string"==typeof e){return void((""===e?t:gt(t,e)).classGroupId=n)}if("function"==typeof e)return vt(e)?void ht(e(r),t,n,r):void t.validators.push({validator:e,classGroupId:n});Object.entries(e).forEach(([e,o])=>{ht(o,gt(t,e),n,r)})})},gt=(e,t)=>{let n=e;return t.split("-").forEach(e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)}),n},vt=e=>e.isThemeGetter,yt=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(o,a)=>{n.set(o,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);return void 0!==t?t:void 0!==(t=r.get(e))?(o(e,t),t):void 0},set(e,t){n.has(e)?n.set(e,t):o(e,t)}}},bt=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=e=>{const t=[];let n,r=0,o=0,a=0;for(let i=0;i<e.length;i++){let s=e[i];if(0===r&&0===o){if(":"===s){t.push(e.slice(a,i)),a=i+1;continue}if("/"===s){n=i;continue}}"["===s?r++:"]"===s?r--:"("===s?o++:")"===s&&o--}const i=0===t.length?e:e.substring(a),s=wt(i);return{modifiers:t,hasImportantModifier:s!==i,baseClassName:s,maybePostfixModifierPosition:n&&n>a?n-a:void 0}};if(t){const e=t+":",n=r;r=t=>t.startsWith(e)?n(t.substring(e.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:t,maybePostfixModifierPosition:void 0}}if(n){const e=r;r=t=>n({className:t,parseClassName:e})}return r},wt=e=>e.endsWith("!")?e.substring(0,e.length-1):e.startsWith("!")?e.substring(1):e,xt=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(e=>[e,!0]));return e=>{if(e.length<=1)return e;const n=[];let r=[];return e.forEach(e=>{"["===e[0]||t[e]?(n.push(...r.sort(),e),r=[]):r.push(e)}),n.push(...r.sort()),n}},kt=/\s+/;function Nt(){let e,t,n=0,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=St(e))&&(r&&(r+=" "),r+=t);return r}const St=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=St(e[r]))&&(n&&(n+=" "),n+=t);return n};function Ct(e,...t){let n,r,o,a=function(s){const l=t.reduce((e,t)=>t(e),e());return n=(e=>({cache:yt(e.cacheSize),parseClassName:bt(e),sortModifiers:xt(e),...ut(e)}))(l),r=n.cache.get,o=n.cache.set,a=i,i(s)};function i(e){const t=r(e);if(t)return t;const a=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:a}=t,i=[],s=e.trim().split(kt);let l="";for(let e=s.length-1;e>=0;e-=1){const t=s[e],{isExternal:c,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(c){l=t+(l.length>0?" "+l:l);continue}let m=!!p,h=r(m?f.substring(0,p):f);if(!h){if(!m){l=t+(l.length>0?" "+l:l);continue}if(h=r(f),!h){l=t+(l.length>0?" "+l:l);continue}m=!1}const g=a(u).join(":"),v=d?g+"!":g,y=v+h;if(i.includes(y))continue;i.push(y);const b=o(h,m);for(let e=0;e<b.length;++e){const t=b[e];i.push(v+t)}l=t+(l.length>0?" "+l:l)}return l})(e,n);return o(e,a),a}return function(){return a(Nt.apply(null,arguments))}}const _t=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},Mt=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Et=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Ot=/^\d+\/\d+$/,Dt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Pt=/\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$/,Tt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,At=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Rt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,It=e=>Ot.test(e),jt=e=>!!e&&!Number.isNaN(Number(e)),zt=e=>!!e&&Number.isInteger(Number(e)),Lt=e=>e.endsWith("%")&&jt(e.slice(0,-1)),Ft=e=>Dt.test(e),Bt=()=>!0,$t=e=>Pt.test(e)&&!Tt.test(e),Wt=()=>!1,Ht=e=>At.test(e),Ut=e=>Rt.test(e),Vt=e=>!Kt(e)&&!Jt(e),Yt=e=>sn(e,dn,Wt),Kt=e=>Mt.test(e),qt=e=>sn(e,fn,$t),Gt=e=>sn(e,pn,jt),Xt=e=>sn(e,cn,Wt),Zt=e=>sn(e,un,Ut),Qt=e=>sn(e,hn,Ht),Jt=e=>Et.test(e),en=e=>ln(e,fn),tn=e=>ln(e,mn),nn=e=>ln(e,cn),rn=e=>ln(e,dn),on=e=>ln(e,un),an=e=>ln(e,hn,!0),sn=(e,t,n)=>{const r=Mt.exec(e);return!!r&&(r[1]?t(r[1]):n(r[2]))},ln=(e,t,n=!1)=>{const r=Et.exec(e);return!!r&&(r[1]?t(r[1]):n)},cn=e=>"position"===e||"percentage"===e,un=e=>"image"===e||"url"===e,dn=e=>"length"===e||"size"===e||"bg-size"===e,fn=e=>"length"===e,pn=e=>"number"===e,mn=e=>"family-name"===e,hn=e=>"shadow"===e,gn=Ct(()=>{const e=_t("color"),t=_t("font"),n=_t("text"),r=_t("font-weight"),o=_t("tracking"),a=_t("leading"),i=_t("breakpoint"),s=_t("container"),l=_t("spacing"),c=_t("radius"),u=_t("shadow"),d=_t("inset-shadow"),f=_t("text-shadow"),p=_t("drop-shadow"),m=_t("blur"),h=_t("perspective"),g=_t("aspect"),v=_t("ease"),y=_t("animate"),b=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",Jt,Kt],w=()=>[Jt,Kt,l],x=()=>[It,"full","auto",...w()],k=()=>[zt,"none","subgrid",Jt,Kt],N=()=>["auto",{span:["full",zt,Jt,Kt]},zt,Jt,Kt],S=()=>[zt,"auto",Jt,Kt],C=()=>["auto","min","max","fr",Jt,Kt],_=()=>["auto",...w()],M=()=>[It,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...w()],E=()=>[e,Jt,Kt],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",nn,Xt,{position:[Jt,Kt]}],D=()=>["auto","cover","contain",rn,Yt,{size:[Jt,Kt]}],P=()=>[Lt,en,qt],T=()=>["","none","full",c,Jt,Kt],A=()=>["",jt,en,qt],R=()=>[jt,Lt,nn,Xt],I=()=>["","none",m,Jt,Kt],j=()=>["none",jt,Jt,Kt],z=()=>["none",jt,Jt,Kt],L=()=>[jt,Jt,Kt],F=()=>[It,"full",...w()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ft],breakpoint:[Ft],color:[Bt],container:[Ft],"drop-shadow":[Ft],ease:["in","out","in-out"],font:[Vt],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ft],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ft],shadow:[Ft],spacing:["px",jt],text:[Ft],"text-shadow":[Ft],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",It,Kt,Jt,g]}],container:["container"],columns:[{columns:[jt,Kt,Jt,s]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:b()}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:x()}],"inset-x":[{"inset-x":x()}],"inset-y":[{"inset-y":x()}],start:[{start:x()}],end:[{end:x()}],top:[{top:x()}],right:[{right:x()}],bottom:[{bottom:x()}],left:[{left:x()}],visibility:["visible","invisible","collapse"],z:[{z:[zt,"auto",Jt,Kt]}],basis:[{basis:[It,"full","auto",s,...w()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[jt,It,"auto","initial","none",Kt]}],grow:[{grow:["",jt,Jt,Kt]}],shrink:[{shrink:["",jt,Jt,Kt]}],order:[{order:[zt,"first","last","none",Jt,Kt]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:N()}],"col-start":[{"col-start":S()}],"col-end":[{"col-end":S()}],"grid-rows":[{"grid-rows":k()}],"row-start-end":[{row:N()}],"row-start":[{"row-start":S()}],"row-end":[{"row-end":S()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":C()}],"auto-rows":[{"auto-rows":C()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{items:["start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"align-self":[{self:["auto","start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:_()}],mx:[{mx:_()}],my:[{my:_()}],ms:[{ms:_()}],me:[{me:_()}],mt:[{mt:_()}],mr:[{mr:_()}],mb:[{mb:_()}],ml:[{ml:_()}],"space-x":[{"space-x":w()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":w()}],"space-y-reverse":["space-y-reverse"],size:[{size:M()}],w:[{w:[s,"screen",...M()]}],"min-w":[{"min-w":[s,"screen","none",...M()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[i]},...M()]}],h:[{h:["screen","lh",...M()]}],"min-h":[{"min-h":["screen","lh","none",...M()]}],"max-h":[{"max-h":["screen","lh",...M()]}],"font-size":[{text:["base",n,en,qt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Jt,Gt]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Lt,Kt]}],"font-family":[{font:[tn,Kt,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,Jt,Kt]}],"line-clamp":[{"line-clamp":[jt,"none",Jt,Gt]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":["none",Jt,Kt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Jt,Kt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:E()}],"text-color":[{text:E()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[jt,"from-font","auto",Jt,qt]}],"text-decoration-color":[{decoration:E()}],"underline-offset":[{"underline-offset":[jt,"auto",Jt,Kt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:w()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Jt,Kt]}],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",Jt,Kt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:O()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:D()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},zt,Jt,Kt],radial:["",Jt,Kt],conic:[zt,Jt,Kt]},on,Zt]}],"bg-color":[{bg:E()}],"gradient-from-pos":[{from:P()}],"gradient-via-pos":[{via:P()}],"gradient-to-pos":[{to:P()}],"gradient-from":[{from:E()}],"gradient-via":[{via:E()}],"gradient-to":[{to:E()}],rounded:[{rounded:T()}],"rounded-s":[{"rounded-s":T()}],"rounded-e":[{"rounded-e":T()}],"rounded-t":[{"rounded-t":T()}],"rounded-r":[{"rounded-r":T()}],"rounded-b":[{"rounded-b":T()}],"rounded-l":[{"rounded-l":T()}],"rounded-ss":[{"rounded-ss":T()}],"rounded-se":[{"rounded-se":T()}],"rounded-ee":[{"rounded-ee":T()}],"rounded-es":[{"rounded-es":T()}],"rounded-tl":[{"rounded-tl":T()}],"rounded-tr":[{"rounded-tr":T()}],"rounded-br":[{"rounded-br":T()}],"rounded-bl":[{"rounded-bl":T()}],"border-w":[{border:A()}],"border-w-x":[{"border-x":A()}],"border-w-y":[{"border-y":A()}],"border-w-s":[{"border-s":A()}],"border-w-e":[{"border-e":A()}],"border-w-t":[{"border-t":A()}],"border-w-r":[{"border-r":A()}],"border-w-b":[{"border-b":A()}],"border-w-l":[{"border-l":A()}],"divide-x":[{"divide-x":A()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":A()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{divide:["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{border:E()}],"border-color-x":[{"border-x":E()}],"border-color-y":[{"border-y":E()}],"border-color-s":[{"border-s":E()}],"border-color-e":[{"border-e":E()}],"border-color-t":[{"border-t":E()}],"border-color-r":[{"border-r":E()}],"border-color-b":[{"border-b":E()}],"border-color-l":[{"border-l":E()}],"divide-color":[{divide:E()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[jt,Jt,Kt]}],"outline-w":[{outline:["",jt,en,qt]}],"outline-color":[{outline:E()}],shadow:[{shadow:["","none",u,an,Qt]}],"shadow-color":[{shadow:E()}],"inset-shadow":[{"inset-shadow":["none",d,an,Qt]}],"inset-shadow-color":[{"inset-shadow":E()}],"ring-w":[{ring:A()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:E()}],"ring-offset-w":[{"ring-offset":[jt,qt]}],"ring-offset-color":[{"ring-offset":E()}],"inset-ring-w":[{"inset-ring":A()}],"inset-ring-color":[{"inset-ring":E()}],"text-shadow":[{"text-shadow":["none",f,an,Qt]}],"text-shadow-color":[{"text-shadow":E()}],opacity:[{opacity:[jt,Jt,Kt]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[jt]}],"mask-image-linear-from-pos":[{"mask-linear-from":R()}],"mask-image-linear-to-pos":[{"mask-linear-to":R()}],"mask-image-linear-from-color":[{"mask-linear-from":E()}],"mask-image-linear-to-color":[{"mask-linear-to":E()}],"mask-image-t-from-pos":[{"mask-t-from":R()}],"mask-image-t-to-pos":[{"mask-t-to":R()}],"mask-image-t-from-color":[{"mask-t-from":E()}],"mask-image-t-to-color":[{"mask-t-to":E()}],"mask-image-r-from-pos":[{"mask-r-from":R()}],"mask-image-r-to-pos":[{"mask-r-to":R()}],"mask-image-r-from-color":[{"mask-r-from":E()}],"mask-image-r-to-color":[{"mask-r-to":E()}],"mask-image-b-from-pos":[{"mask-b-from":R()}],"mask-image-b-to-pos":[{"mask-b-to":R()}],"mask-image-b-from-color":[{"mask-b-from":E()}],"mask-image-b-to-color":[{"mask-b-to":E()}],"mask-image-l-from-pos":[{"mask-l-from":R()}],"mask-image-l-to-pos":[{"mask-l-to":R()}],"mask-image-l-from-color":[{"mask-l-from":E()}],"mask-image-l-to-color":[{"mask-l-to":E()}],"mask-image-x-from-pos":[{"mask-x-from":R()}],"mask-image-x-to-pos":[{"mask-x-to":R()}],"mask-image-x-from-color":[{"mask-x-from":E()}],"mask-image-x-to-color":[{"mask-x-to":E()}],"mask-image-y-from-pos":[{"mask-y-from":R()}],"mask-image-y-to-pos":[{"mask-y-to":R()}],"mask-image-y-from-color":[{"mask-y-from":E()}],"mask-image-y-to-color":[{"mask-y-to":E()}],"mask-image-radial":[{"mask-radial":[Jt,Kt]}],"mask-image-radial-from-pos":[{"mask-radial-from":R()}],"mask-image-radial-to-pos":[{"mask-radial-to":R()}],"mask-image-radial-from-color":[{"mask-radial-from":E()}],"mask-image-radial-to-color":[{"mask-radial-to":E()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[jt]}],"mask-image-conic-from-pos":[{"mask-conic-from":R()}],"mask-image-conic-to-pos":[{"mask-conic-to":R()}],"mask-image-conic-from-color":[{"mask-conic-from":E()}],"mask-image-conic-to-color":[{"mask-conic-to":E()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:O()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:D()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Jt,Kt]}],filter:[{filter:["","none",Jt,Kt]}],blur:[{blur:I()}],brightness:[{brightness:[jt,Jt,Kt]}],contrast:[{contrast:[jt,Jt,Kt]}],"drop-shadow":[{"drop-shadow":["","none",p,an,Qt]}],"drop-shadow-color":[{"drop-shadow":E()}],grayscale:[{grayscale:["",jt,Jt,Kt]}],"hue-rotate":[{"hue-rotate":[jt,Jt,Kt]}],invert:[{invert:["",jt,Jt,Kt]}],saturate:[{saturate:[jt,Jt,Kt]}],sepia:[{sepia:["",jt,Jt,Kt]}],"backdrop-filter":[{"backdrop-filter":["","none",Jt,Kt]}],"backdrop-blur":[{"backdrop-blur":I()}],"backdrop-brightness":[{"backdrop-brightness":[jt,Jt,Kt]}],"backdrop-contrast":[{"backdrop-contrast":[jt,Jt,Kt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",jt,Jt,Kt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[jt,Jt,Kt]}],"backdrop-invert":[{"backdrop-invert":["",jt,Jt,Kt]}],"backdrop-opacity":[{"backdrop-opacity":[jt,Jt,Kt]}],"backdrop-saturate":[{"backdrop-saturate":[jt,Jt,Kt]}],"backdrop-sepia":[{"backdrop-sepia":["",jt,Jt,Kt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Jt,Kt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[jt,"initial",Jt,Kt]}],ease:[{ease:["linear","initial",v,Jt,Kt]}],delay:[{delay:[jt,Jt,Kt]}],animate:[{animate:["none",y,Jt,Kt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,Jt,Kt]}],"perspective-origin":[{"perspective-origin":b()}],rotate:[{rotate:j()}],"rotate-x":[{"rotate-x":j()}],"rotate-y":[{"rotate-y":j()}],"rotate-z":[{"rotate-z":j()}],scale:[{scale:z()}],"scale-x":[{"scale-x":z()}],"scale-y":[{"scale-y":z()}],"scale-z":[{"scale-z":z()}],"scale-3d":["scale-3d"],skew:[{skew:L()}],"skew-x":[{"skew-x":L()}],"skew-y":[{"skew-y":L()}],transform:[{transform:[Jt,Kt,"","none","gpu","cpu"]}],"transform-origin":[{origin:b()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:F()}],"translate-x":[{"translate-x":F()}],"translate-y":[{"translate-y":F()}],"translate-z":[{"translate-z":F()}],"translate-none":["translate-none"],accent:[{accent:E()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:E()}],"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",Jt,Kt]}],"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":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"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",Jt,Kt]}],fill:[{fill:["none",...E()]}],"stroke-w":[{stroke:[jt,en,qt,Gt]}],stroke:[{stroke:["none",...E()]}],"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"]}});function vn(...e){return gn(ct(e))}function yn({...t}){return e(rt,{"data-slot":"accordion",...t})}function bn({className:t,...n}){return e(ot,{"data-slot":"accordion-item",className:vn("border-b last:border-b-0",t),...n})}function wn({className:t,children:r,...o}){return e(at,{className:"flex",children:n(it,{"data-slot":"accordion-trigger",className:vn("focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium outline-none transition-all hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",t),...o,children:[r,e(k,{className:"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200"})]})})}function xn({className:t,children:n,...r}){return e(st,{"data-slot":"accordion-content",className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",...r,children:e("div",{className:vn("pb-4 pt-0",t),children:n})})}const kn=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,Nn=ct,Sn=(e,t)=>n=>{var r;if(null==(null==t?void 0:t.variants))return Nn(e,null==n?void 0:n.class,null==n?void 0:n.className);const{variants:o,defaultVariants:a}=t,i=Object.keys(o).map(e=>{const t=null==n?void 0:n[e],r=null==a?void 0:a[e];if(null===t)return null;const i=kn(t)||kn(r);return o[e][i]}),s=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e},{}),l=null==t||null===(r=t.compoundVariants)||void 0===r?void 0:r.reduce((e,t)=>{let{class:n,className:r,...o}=t;return Object.entries(o).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...a,...s}[t]):{...a,...s}[t]===n})?[...e,n,r]:e},[]);return Nn(e,i,l,null==n?void 0:n.class,null==n?void 0:n.className)},Cn=Sn("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function _n({className:t,variant:n,...r}){return e("div",{"data-slot":"alert",role:"alert",className:vn(Cn({variant:n}),t),...r})}function Mn({className:t,...n}){return e("div",{"data-slot":"alert-title",className:vn("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",t),...n})}function En({className:t,...n}){return e("div",{"data-slot":"alert-description",className:vn("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",t),...n})}function On(e){const t=r.useRef(e);return r.useEffect(()=>{t.current=e}),r.useMemo(()=>(...e)=>t.current?.(...e),[])}var Dn,Pn="dismissableLayer.update",Tn="dismissableLayer.pointerDownOutside",An="dismissableLayer.focusOutside",Rn=r.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),In=r.forwardRef((t,n)=>{const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:l,onDismiss:c,...u}=t,d=r.useContext(Rn),[f,p]=r.useState(null),m=f?.ownerDocument??globalThis?.document,[,h]=r.useState({}),g=K(n,e=>p(e)),v=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=v.indexOf(y),w=f?v.indexOf(f):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,k=w>=b,N=function(e,t=globalThis?.document){const n=On(e),o=r.useRef(!1),a=r.useRef(()=>{});return r.useEffect(()=>{const e=e=>{if(e.target&&!o.current){let r=function(){Ln(Tn,n,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",a.current),a.current=r,t.addEventListener("click",a.current,{once:!0})):r()}else t.removeEventListener("click",a.current);o.current=!1},r=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(r),t.removeEventListener("pointerdown",e),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}(e=>{const t=e.target,n=[...d.branches].some(e=>e.contains(t));k&&!n&&(i?.(e),l?.(e),e.defaultPrevented||c?.())},m),S=function(e,t=globalThis?.document){const n=On(e),o=r.useRef(!1);return r.useEffect(()=>{const e=e=>{if(e.target&&!o.current){Ln(An,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}(e=>{const t=e.target;[...d.branches].some(e=>e.contains(t))||(s?.(e),l?.(e),e.defaultPrevented||c?.())},m);return function(e,t=globalThis?.document){const n=On(e);r.useEffect(()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[n,t])}(e=>{w===d.layers.size-1&&(a?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))},m),r.useEffect(()=>{if(f)return o&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(Dn=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),zn(),()=>{o&&1===d.layersWithOutsidePointerEventsDisabled.size&&(m.body.style.pointerEvents=Dn)}},[f,m,o,d]),r.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),zn())},[f,d]),r.useEffect(()=>{const e=()=>h({});return document.addEventListener(Pn,e),()=>document.removeEventListener(Pn,e)},[]),e(ae.div,{...u,ref:g,style:{pointerEvents:x?k?"auto":"none":void 0,...t.style},onFocusCapture:te(t.onFocusCapture,S.onFocusCapture),onBlurCapture:te(t.onBlurCapture,S.onBlurCapture),onPointerDownCapture:te(t.onPointerDownCapture,N.onPointerDownCapture)})});In.displayName="DismissableLayer";var jn=r.forwardRef((t,n)=>{const o=r.useContext(Rn),a=r.useRef(null),i=K(n,a);return r.useEffect(()=>{const e=a.current;if(e)return o.branches.add(e),()=>{o.branches.delete(e)}},[o.branches]),e(ae.div,{...t,ref:i})});function zn(){const e=new CustomEvent(Pn);document.dispatchEvent(e)}function Ln(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?ie(o,a):o.dispatchEvent(a)}jn.displayName="DismissableLayerBranch";var Fn="focusScope.autoFocusOnMount",Bn="focusScope.autoFocusOnUnmount",$n={bubbles:!1,cancelable:!0},Wn=r.forwardRef((t,n)=>{const{loop:o=!1,trapped:a=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...l}=t,[c,u]=r.useState(null),d=On(i),f=On(s),p=r.useRef(null),m=K(n,e=>u(e)),h=r.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;r.useEffect(()=>{if(a){let e=function(e){if(h.paused||!c)return;const t=e.target;c.contains(t)?p.current=t:Yn(p.current,{select:!0})},t=function(e){if(h.paused||!c)return;const t=e.relatedTarget;null!==t&&(c.contains(t)||Yn(p.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&Yn(c)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return c&&r.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[a,c,h.paused]),r.useEffect(()=>{if(c){Kn.add(h);const t=document.activeElement;if(!c.contains(t)){const n=new CustomEvent(Fn,$n);c.addEventListener(Fn,d),c.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Yn(r,{select:t}),document.activeElement!==n)return}((e=Hn(c),e.filter(e=>"A"!==e.tagName)),{select:!0}),document.activeElement===t&&Yn(c))}return()=>{c.removeEventListener(Fn,d),setTimeout(()=>{const e=new CustomEvent(Bn,$n);c.addEventListener(Bn,f),c.dispatchEvent(e),e.defaultPrevented||Yn(t??document.body,{select:!0}),c.removeEventListener(Bn,f),Kn.remove(h)},0)}}var e},[c,d,f,h]);const g=r.useCallback(e=>{if(!o&&!a)return;if(h.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[r,a]=function(e){const t=Hn(e),n=Un(t,e),r=Un(t.reverse(),e);return[n,r]}(t);r&&a?e.shiftKey||n!==a?e.shiftKey&&n===r&&(e.preventDefault(),o&&Yn(a,{select:!0})):(e.preventDefault(),o&&Yn(r,{select:!0})):n===t&&e.preventDefault()}},[o,a,h.paused]);return e(ae.div,{tabIndex:-1,...l,ref:m,onKeyDown:g})});function Hn(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Un(e,t){for(const n of e)if(!Vn(n,{upTo:t}))return n}function Vn(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function Yn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}Wn.displayName="FocusScope";var Kn=function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=qn(e,t),e.unshift(t)},remove(t){e=qn(e,t),e[0]?.resume()}}}();function qn(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var Gn=r.forwardRef((t,n)=>{const{container:o,...a}=t,[i,s]=r.useState(!1);ne(()=>s(!0),[]);const l=o||i&&globalThis?.document?.body;return l?w.createPortal(e(ae.div,{...a,ref:n}),l):null});Gn.displayName="Portal";var Xn=0;function Zn(){r.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Qn()),document.body.insertAdjacentElement("beforeend",e[1]??Qn()),Xn++,()=>{1===Xn&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),Xn--}},[])}function Qn(){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 Jn=function(){return Jn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Jn.apply(this,arguments)};function er(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}"function"==typeof SuppressedError&&SuppressedError;var tr="right-scroll-bar-position",nr="width-before-scroll-bar";function rr(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var or="undefined"!=typeof window?r.useLayoutEffect:r.useEffect,ar=new WeakMap;function ir(e,t){var n,r,o,i=(n=null,r=function(t){return e.forEach(function(e){return rr(e,t)})},(o=a(function(){return{value:n,callback:r,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}})[0]).callback=r,o.facade);return or(function(){var t=ar.get(i);if(t){var n=new Set(t),r=new Set(e),o=i.current;n.forEach(function(e){r.has(e)||rr(e,null)}),r.forEach(function(e){n.has(e)||rr(e,o)})}ar.set(i,e)},[e]),i}function sr(e){return e}var lr=function(e){var t=e.sideCar,n=er(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return r.createElement(o,Jn({},n))};lr.isSideCarExport=!0;var cr=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=sr);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter(function(e){return e!==o})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},i=function(){return Promise.resolve().then(a)};i(),n={push:function(e){t.push(e),i()},filter:function(e){return t=t.filter(e),n}}}};return o}(null);return t.options=Jn({async:!0,ssr:!1},e),t}(),ur=function(){},dr=r.forwardRef(function(e,t){var n=r.useRef(null),o=r.useState({onScrollCapture:ur,onWheelCapture:ur,onTouchMoveCapture:ur}),a=o[0],i=o[1],s=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,v=e.allowPinchZoom,y=e.as,b=void 0===y?"div":y,w=e.gapMode,x=er(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=p,N=ir([n,t]),S=Jn(Jn({},x),a);return r.createElement(r.Fragment,null,d&&r.createElement(k,{sideCar:cr,removeScrollBar:u,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:i,allowPinchZoom:!!v,lockRef:n,gapMode:w}),s?r.cloneElement(r.Children.only(l),Jn(Jn({},S),{ref:N})):r.createElement(b,Jn({},S,{className:c,ref:N}),l))});dr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},dr.classNames={fullWidth:nr,zeroRight:tr};function fr(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var pr=function(){var e=0,t=null;return{add:function(n){var r,o;0==e&&(t=fr())&&(o=n,(r=t).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},mr=function(){var e,t=(e=pr(),function(t,n){r.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])});return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}},hr={left:0,top:0,right:0,gap:0},gr=function(e){return parseInt(e||"",10)||0},vr=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return hr;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[gr(n),gr(r),gr(o)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},yr=mr(),br="data-scroll-locked",wr=function(e,t,n,r){var o=e.left,a=e.top,i=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body[").concat(br,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(a,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(tr," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(nr," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(tr," .").concat(tr," {\n right: 0 ").concat(r,";\n }\n \n .").concat(nr," .").concat(nr," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(br,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},xr=function(){var e=parseInt(document.body.getAttribute(br)||"0",10);return isFinite(e)?e:0},kr=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,a=void 0===o?"margin":o;r.useEffect(function(){return document.body.setAttribute(br,(xr()+1).toString()),function(){var e=xr()-1;e<=0?document.body.removeAttribute(br):document.body.setAttribute(br,e.toString())}},[]);var i=r.useMemo(function(){return vr(a)},[a]);return r.createElement(yr,{styles:wr(i,!t,a,n?"":"!important")})},Nr=!1;if("undefined"!=typeof window)try{var Sr=Object.defineProperty({},"passive",{get:function(){return Nr=!0,!0}});window.addEventListener("test",Sr,Sr),window.removeEventListener("test",Sr,Sr)}catch(e){Nr=!1}var Cr=!!Nr&&{passive:!1},_r=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},Mr=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),Er(e,r)){var o=Or(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Er=function(e,t){return"v"===e?function(e){return _r(e,"overflowY")}(t):function(e){return _r(e,"overflowX")}(t)},Or=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},Dr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Pr=function(e){return[e.deltaX,e.deltaY]},Tr=function(e){return e&&"current"in e?e.current:e},Ar=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Rr=0,Ir=[];function jr(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var zr,Lr=(zr=function(e){var t=r.useRef([]),n=r.useRef([0,0]),o=r.useRef(),a=r.useState(Rr++)[0],i=r.useState(mr)[0],s=r.useRef(e);r.useEffect(function(){s.current=e},[e]),r.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var t=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([e.lockRef.current],(e.shards||[]).map(Tr),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var l=r.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!s.current.allowPinchZoom;var r,a=Dr(e),i=n.current,l="deltaX"in e?e.deltaX:i[0]-a[0],c="deltaY"in e?e.deltaY:i[1]-a[1],u=e.target,d=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var f=Mr(d,u);if(!f)return!0;if(f?r=d:(r="v"===d?"h":"v",f=Mr(d,u)),!f)return!1;if(!o.current&&"changedTouches"in e&&(l||c)&&(o.current=r),!r)return!0;var p=o.current||r;return function(e,t,n,r){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=o*r,i=n.target,s=t.contains(i),l=!1,c=a>0,u=0,d=0;do{if(!i)break;var f=Or(e,i),p=f[0],m=f[1]-f[2]-o*p;(p||m)&&Er(e,i)&&(u+=m,d+=p);var h=i.parentNode;i=h&&h.nodeType===Node.DOCUMENT_FRAGMENT_NODE?h.host:h}while(!s&&i!==document.body||s&&(t.contains(i)||t===i));return(c&&Math.abs(u)<1||!c&&Math.abs(d)<1)&&(l=!0),l}(p,t,e,"h"===p?l:c)},[]),c=r.useCallback(function(e){var n=e;if(Ir.length&&Ir[Ir.length-1]===i){var r="deltaY"in n?Pr(n):Dr(n),o=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&function(e,t){return e[0]===t[0]&&e[1]===t[1]}(e.delta,r)})[0];if(o&&o.should)n.cancelable&&n.preventDefault();else if(!o){var a=(s.current.shards||[]).map(Tr).filter(Boolean).filter(function(e){return e.contains(n.target)});(a.length>0?l(n,a[0]):!s.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),u=r.useCallback(function(e,n,r,o){var a={name:e,delta:n,target:r,should:o,shadowParent:jr(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),d=r.useCallback(function(e){n.current=Dr(e),o.current=void 0},[]),f=r.useCallback(function(t){u(t.type,Pr(t),t.target,l(t,e.lockRef.current))},[]),p=r.useCallback(function(t){u(t.type,Dr(t),t.target,l(t,e.lockRef.current))},[]);r.useEffect(function(){return Ir.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",c,Cr),document.addEventListener("touchmove",c,Cr),document.addEventListener("touchstart",d,Cr),function(){Ir=Ir.filter(function(e){return e!==i}),document.removeEventListener("wheel",c,Cr),document.removeEventListener("touchmove",c,Cr),document.removeEventListener("touchstart",d,Cr)}},[]);var m=e.removeScrollBar,h=e.inert;return r.createElement(r.Fragment,null,h?r.createElement(i,{styles:Ar(a)}):null,m?r.createElement(kr,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},cr.useMedium(zr),lr),Fr=r.forwardRef(function(e,t){return r.createElement(dr,Jn({},e,{ref:t,sideCar:Lr}))});Fr.classNames=dr.classNames;var Br=new WeakMap,$r=new WeakMap,Wr={},Hr=0,Ur=function(e){return e&&(e.host||Ur(e.parentNode))},Vr=function(e,t,n,r){var o=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Ur(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(e){return Boolean(e)})}(t,Array.isArray(e)?e:[e]);Wr[n]||(Wr[n]=new WeakMap);var a=Wr[n],i=[],s=new Set,l=new Set(o),c=function(e){e&&!s.has(e)&&(s.add(e),c(e.parentNode))};o.forEach(c);var u=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,l=(Br.get(e)||0)+1,c=(a.get(e)||0)+1;Br.set(e,l),a.set(e,c),i.push(e),1===l&&o&&$r.set(e,!0),1===c&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return u(t),s.clear(),Hr++,function(){i.forEach(function(e){var t=Br.get(e)-1,o=a.get(e)-1;Br.set(e,t),a.set(e,o),t||($r.has(e)||e.removeAttribute(r),$r.delete(e)),o||e.removeAttribute(n)}),--Hr||(Br=new WeakMap,Br=new WeakMap,$r=new WeakMap,Wr={})}},Yr=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Vr(r,o,n,"aria-hidden")):function(){return null}},Kr="Dialog",[qr,Gr]=H(Kr),[Xr,Zr]=qr(Kr),Qr=t=>{const{__scopeDialog:n,children:o,open:a,defaultOpen:i,onOpenChange:s,modal:l=!0}=t,c=r.useRef(null),u=r.useRef(null),[d,f]=oe({prop:a,defaultProp:i??!1,onChange:s,caller:Kr});return e(Xr,{scope:n,triggerRef:c,contentRef:u,contentId:de(),titleId:de(),descriptionId:de(),open:d,onOpenChange:f,onOpenToggle:r.useCallback(()=>f(e=>!e),[f]),modal:l,children:o})};Qr.displayName=Kr;var Jr="DialogTrigger",eo=r.forwardRef((t,n)=>{const{__scopeDialog:r,...o}=t,a=Zr(Jr,r),i=K(n,a.triggerRef);return e(ae.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":xo(a.open),...o,ref:i,onClick:te(t.onClick,a.onOpenToggle)})});eo.displayName=Jr;var to="DialogPortal",[no,ro]=qr(to,{forceMount:void 0}),oo=t=>{const{__scopeDialog:n,forceMount:o,children:a,container:i}=t,s=Zr(to,n);return e(no,{scope:n,forceMount:o,children:r.Children.map(a,t=>e(se,{present:o||s.open,children:e(Gn,{asChild:!0,container:i,children:t})}))})};oo.displayName=to;var ao="DialogOverlay",io=r.forwardRef((t,n)=>{const r=ro(ao,t.__scopeDialog),{forceMount:o=r.forceMount,...a}=t,i=Zr(ao,t.__scopeDialog);return i.modal?e(se,{present:o||i.open,children:e(lo,{...a,ref:n})}):null});io.displayName=ao;var so=q("DialogOverlay.RemoveScroll"),lo=r.forwardRef((t,n)=>{const{__scopeDialog:r,...o}=t,a=Zr(ao,r);return e(Fr,{as:so,allowPinchZoom:!0,shards:[a.contentRef],children:e(ae.div,{"data-state":xo(a.open),...o,ref:n,style:{pointerEvents:"auto",...o.style}})})}),co="DialogContent",uo=r.forwardRef((t,n)=>{const r=ro(co,t.__scopeDialog),{forceMount:o=r.forceMount,...a}=t,i=Zr(co,t.__scopeDialog);return e(se,{present:o||i.open,children:i.modal?e(fo,{...a,ref:n}):e(po,{...a,ref:n})})});uo.displayName=co;var fo=r.forwardRef((t,n)=>{const o=Zr(co,t.__scopeDialog),a=r.useRef(null),i=K(n,o.contentRef,a);return r.useEffect(()=>{const e=a.current;if(e)return Yr(e)},[]),e(mo,{...t,ref:i,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:te(t.onCloseAutoFocus,e=>{e.preventDefault(),o.triggerRef.current?.focus()}),onPointerDownOutside:te(t.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:te(t.onFocusOutside,e=>e.preventDefault())})}),po=r.forwardRef((t,n)=>{const o=Zr(co,t.__scopeDialog),a=r.useRef(!1),i=r.useRef(!1);return e(mo,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(a.current||o.triggerRef.current?.focus(),e.preventDefault()),a.current=!1,i.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(a.current=!0,"pointerdown"===e.detail.originalEvent.type&&(i.current=!0));const n=e.target,r=o.triggerRef.current?.contains(n);r&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&i.current&&e.preventDefault()}})}),mo=r.forwardRef((o,a)=>{const{__scopeDialog:i,trapFocus:s,onOpenAutoFocus:l,onCloseAutoFocus:c,...u}=o,d=Zr(co,i),f=r.useRef(null),p=K(a,f);return Zn(),n(t,{children:[e(Wn,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:l,onUnmountAutoFocus:c,children:e(In,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":xo(d.open),...u,ref:p,onDismiss:()=>d.onOpenChange(!1)})}),n(t,{children:[e(Co,{titleId:d.titleId}),e(_o,{contentRef:f,descriptionId:d.descriptionId})]})]})}),ho="DialogTitle",go=r.forwardRef((t,n)=>{const{__scopeDialog:r,...o}=t,a=Zr(ho,r);return e(ae.h2,{id:a.titleId,...o,ref:n})});go.displayName=ho;var vo="DialogDescription",yo=r.forwardRef((t,n)=>{const{__scopeDialog:r,...o}=t,a=Zr(vo,r);return e(ae.p,{id:a.descriptionId,...o,ref:n})});yo.displayName=vo;var bo="DialogClose",wo=r.forwardRef((t,n)=>{const{__scopeDialog:r,...o}=t,a=Zr(bo,r);return e(ae.button,{type:"button",...o,ref:n,onClick:te(t.onClick,()=>a.onOpenChange(!1))})});function xo(e){return e?"open":"closed"}wo.displayName=bo;var ko="DialogTitleWarning",[No,So]=function(t,n){const o=r.createContext(n),a=t=>{const{children:n,...a}=t,i=r.useMemo(()=>a,Object.values(a));return e(o.Provider,{value:i,children:n})};return a.displayName=t+"Provider",[a,function(e){const a=r.useContext(o);if(a)return a;if(void 0!==n)return n;throw new Error(`\`${e}\` must be used within \`${t}\``)}]}(ko,{contentName:co,titleName:ho,docsSlug:"dialog"}),Co=({titleId:e})=>{const t=So(ko),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return r.useEffect(()=>{if(e){document.getElementById(e)||console.error(n)}},[n,e]),null},_o=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${So("DialogDescriptionWarning").contentName}}.`;return r.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");if(t&&r){document.getElementById(t)||console.warn(n)}},[n,e,t]),null},Mo=Qr,Eo=eo,Oo=oo,Do=io,Po=uo,To=go,Ao=yo,Ro=wo,Io="AlertDialog",[jo]=H(Io,[Gr]),zo=Gr(),Lo=t=>{const{__scopeAlertDialog:n,...r}=t,o=zo(n);return e(Mo,{...o,...r,modal:!0})};Lo.displayName=Io;var Fo=r.forwardRef((t,n)=>{const{__scopeAlertDialog:r,...o}=t,a=zo(r);return e(Eo,{...a,...o,ref:n})});Fo.displayName="AlertDialogTrigger";var Bo=t=>{const{__scopeAlertDialog:n,...r}=t,o=zo(n);return e(Oo,{...o,...r})};Bo.displayName="AlertDialogPortal";var $o=r.forwardRef((t,n)=>{const{__scopeAlertDialog:r,...o}=t,a=zo(r);return e(Do,{...a,...o,ref:n})});$o.displayName="AlertDialogOverlay";var Wo="AlertDialogContent",[Ho,Uo]=jo(Wo),Vo=Q("AlertDialogContent"),Yo=r.forwardRef((t,o)=>{const{__scopeAlertDialog:a,children:i,...s}=t,l=zo(a),c=r.useRef(null),u=K(o,c),d=r.useRef(null);return e(No,{contentName:Wo,titleName:Ko,docsSlug:"alert-dialog",children:e(Ho,{scope:a,cancelRef:d,children:n(Po,{role:"alertdialog",...l,...s,ref:u,onOpenAutoFocus:te(s.onOpenAutoFocus,e=>{e.preventDefault(),d.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:[e(Vo,{children:i}),e(ea,{contentRef:c})]})})})});Yo.displayName=Wo;var Ko="AlertDialogTitle",qo=r.forwardRef((t,n)=>{const{__scopeAlertDialog:r,...o}=t,a=zo(r);return e(To,{...a,...o,ref:n})});qo.displayName=Ko;var Go="AlertDialogDescription",Xo=r.forwardRef((t,n)=>{const{__scopeAlertDialog:r,...o}=t,a=zo(r);return e(Ao,{...a,...o,ref:n})});Xo.displayName=Go;var Zo=r.forwardRef((t,n)=>{const{__scopeAlertDialog:r,...o}=t,a=zo(r);return e(Ro,{...a,...o,ref:n})});Zo.displayName="AlertDialogAction";var Qo="AlertDialogCancel",Jo=r.forwardRef((t,n)=>{const{__scopeAlertDialog:r,...o}=t,{cancelRef:a}=Uo(Qo,r),i=zo(r),s=K(n,a);return e(Ro,{...i,...o,ref:s})});Jo.displayName=Qo;var ea=({contentRef:e})=>{const t=`\`${Wo}\` requires a description for the component to be accessible for screen reader users.\n\nYou can add a description to the \`${Wo}\` by passing a \`${Go}\` component as a child, which also benefits sighted users by adding visible context to the dialog.\n\nAlternatively, 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 \`${Wo}\`. 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.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return r.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},ta=Lo,na=Fo,ra=Bo,oa=$o,aa=Yo,ia=Zo,sa=Jo,la=qo,ca=Xo;const ua=Sn("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function da({className:t,variant:n,size:r,asChild:o=!1,...a}){return e(o?G:"button",{"data-slot":"button",className:vn(ua({variant:n,size:r,className:t})),...a})}function fa({...t}){return e(ta,{"data-slot":"alert-dialog",...t})}function pa({...t}){return e(na,{"data-slot":"alert-dialog-trigger",...t})}function ma({...t}){return e(ra,{"data-slot":"alert-dialog-portal",...t})}function ha({className:t,...n}){return e(oa,{"data-slot":"alert-dialog-overlay",className:vn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...n})}function ga({className:t,...r}){return n(ma,{children:[e(ha,{}),e(aa,{"data-slot":"alert-dialog-content",className:vn("bg-background 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 fixed left-[50%] top-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t),...r})]})}function va({className:t,...n}){return e("div",{"data-slot":"alert-dialog-header",className:vn("flex flex-col gap-2 text-center sm:text-left",t),...n})}function ya({className:t,...n}){return e("div",{"data-slot":"alert-dialog-footer",className:vn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...n})}function ba({className:t,...n}){return e(la,{"data-slot":"alert-dialog-title",className:vn("text-lg font-semibold",t),...n})}function wa({className:t,...n}){return e(ca,{"data-slot":"alert-dialog-description",className:vn("text-muted-foreground text-sm",t),...n})}function xa({className:t,...n}){return e(ia,{className:vn(ua(),t),...n})}function ka({className:t,...n}){return e(sa,{className:vn(ua({variant:"outline"}),t),...n})}var Na=r.forwardRef((t,n)=>{const{ratio:r=1,style:o,...a}=t;return e("div",{style:{position:"relative",width:"100%",paddingBottom:100/r+"%"},"data-radix-aspect-ratio-wrapper":"",children:e(ae.div,{...a,ref:n,style:{...o,position:"absolute",top:0,right:0,bottom:0,left:0}})})});Na.displayName="AspectRatio";var Sa=Na;function Ca({...t}){return e(Sa,{"data-slot":"aspect-ratio",...t})}function _a(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ma,Ea={exports:{}},Oa={};var Da,Pa,Ta={};
2
+ /**
3
+ * @license React
4
+ * use-sync-external-store-shim.development.js
5
+ *
6
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
7
+ *
8
+ * This source code is licensed under the MIT license found in the
9
+ * LICENSE file in the root directory of this source tree.
10
+ */function Aa(){return Pa||(Pa=1,"production"===process.env.NODE_ENV?Ea.exports=function(){if(Ma)return Oa;Ma=1;var e=o,t="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},n=e.useState,r=e.useEffect,a=e.useLayoutEffect,i=e.useDebugValue;function s(e){var n=e.getSnapshot;e=e.value;try{var r=n();return!t(e,r)}catch(e){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var o=t(),l=n({inst:{value:o,getSnapshot:t}}),c=l[0].inst,u=l[1];return a(function(){c.value=o,c.getSnapshot=t,s(c)&&u({inst:c})},[e,o,t]),r(function(){return s(c)&&u({inst:c}),e(function(){s(c)&&u({inst:c})})},[e]),i(o),o};return Oa.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:l,Oa}():Ea.exports=(Da||(Da=1,"production"!==process.env.NODE_ENV&&function(){function e(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!n(e,r)}catch(e){return!0}}"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=o,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=t.useState,a=t.useEffect,i=t.useLayoutEffect,s=t.useDebugValue,l=!1,c=!1,u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(o,u){l||void 0===t.startTransition||(l=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var d=u();if(!c){var f=u();n(d,f)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),c=!0)}var p=(f=r({inst:{value:d,getSnapshot:u}}))[0].inst,m=f[1];return i(function(){p.value=d,p.getSnapshot=u,e(p)&&m({inst:p})},[o,d,u]),a(function(){return e(p)&&m({inst:p}),o(function(){e(p)&&m({inst:p})})},[o]),s(d),d};Ta.useSyncExternalStore=void 0!==t.useSyncExternalStore?t.useSyncExternalStore:u,"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Ta)),Ea.exports}var Ra=Aa();function Ia(){return()=>{}}var ja="Avatar",[za]=H(ja),[La,Fa]=za(ja),Ba=r.forwardRef((t,n)=>{const{__scopeAvatar:o,...a}=t,[i,s]=r.useState("idle");return e(La,{scope:o,imageLoadingStatus:i,onImageLoadingStatusChange:s,children:e(ae.span,{...a,ref:n})})});Ba.displayName=ja;var $a="AvatarImage",Wa=r.forwardRef((t,n)=>{const{__scopeAvatar:o,src:a,onLoadingStatusChange:i=()=>{},...s}=t,l=Fa($a,o),c=function(e,{referrerPolicy:t,crossOrigin:n}){const o=Ra.useSyncExternalStore(Ia,()=>!0,()=>!1),a=r.useRef(null),i=o?(a.current||(a.current=new window.Image),a.current):null,[s,l]=r.useState(()=>Va(i,e));return ne(()=>{l(Va(i,e))},[i,e]),ne(()=>{const e=e=>()=>{l(e)};if(!i)return;const r=e("loaded"),o=e("error");return i.addEventListener("load",r),i.addEventListener("error",o),t&&(i.referrerPolicy=t),"string"==typeof n&&(i.crossOrigin=n),()=>{i.removeEventListener("load",r),i.removeEventListener("error",o)}},[i,n,t]),s}(a,s),u=On(e=>{i(e),l.onImageLoadingStatusChange(e)});return ne(()=>{"idle"!==c&&u(c)},[c,u]),"loaded"===c?e(ae.img,{...s,ref:n,src:a}):null});Wa.displayName=$a;var Ha="AvatarFallback",Ua=r.forwardRef((t,n)=>{const{__scopeAvatar:o,delayMs:a,...i}=t,s=Fa(Ha,o),[l,c]=r.useState(void 0===a);return r.useEffect(()=>{if(void 0!==a){const e=window.setTimeout(()=>c(!0),a);return()=>window.clearTimeout(e)}},[a]),l&&"loaded"!==s.imageLoadingStatus?e(ae.span,{...i,ref:n}):null});function Va(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}Ua.displayName=Ha;var Ya=Ba,Ka=Wa,qa=Ua;function Ga({className:t,...n}){return e(Ya,{"data-slot":"avatar",className:vn("relative flex size-8 shrink-0 overflow-hidden rounded-full",t),...n})}function Xa({className:t,...n}){return e(Ka,{"data-slot":"avatar-image",className:vn("aspect-square size-full",t),...n})}function Za({className:t,...n}){return e(qa,{"data-slot":"avatar-fallback",className:vn("bg-muted flex size-full items-center justify-center rounded-full",t),...n})}const Qa=Sn("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function Ja({className:t,variant:n,asChild:r=!1,...o}){return e(r?G:"span",{"data-slot":"badge",className:vn(Qa({variant:n}),t),...o})}function ei({...t}){return e("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",...t})}function ti({className:t,...n}){return e("ol",{"data-slot":"breadcrumb-list",className:vn("text-muted-foreground flex flex-wrap items-center gap-1.5 break-words text-sm sm:gap-2.5",t),...n})}function ni({className:t,...n}){return e("li",{"data-slot":"breadcrumb-item",className:vn("inline-flex items-center gap-1.5",t),...n})}function ri({asChild:t,className:n,...r}){return e(t?G:"a",{"data-slot":"breadcrumb-link",className:vn("hover:text-foreground transition-colors",n),...r})}function oi({className:t,...n}){return e("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:vn("text-foreground font-normal",t),...n})}function ai({children:t,className:n,...r}){return e("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:vn("[&>svg]:size-3.5",n),...r,children:t??e(N,{})})}function ii({className:t,...r}){return n("span",{"data-slot":"breadcrumb-ellipsis",role:"presentation","aria-hidden":"true",className:vn("flex size-9 items-center justify-center",t),...r,children:[e(S,{className:"size-4"}),e("span",{className:"sr-only",children:"More"})]})}var si="horizontal",li=["horizontal","vertical"],ci=r.forwardRef((t,n)=>{const{decorative:r,orientation:o=si,...a}=t,i=function(e){return li.includes(e)}(o)?o:si,s=r?{role:"none"}:{"aria-orientation":"vertical"===i?i:void 0,role:"separator"};return e(ae.div,{"data-orientation":i,...s,...a,ref:n})});ci.displayName="Separator";var ui=ci;function di({className:t,orientation:n="horizontal",decorative:r=!0,...o}){return e(ui,{"data-slot":"separator",decorative:r,orientation:n,className:vn("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=vertical]:h-full data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px",t),...o})}const fi=Sn("flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md has-[>[data-slot=button-group]]:gap-2",{variants:{orientation:{horizontal:"[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",vertical:"flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none"}},defaultVariants:{orientation:"horizontal"}});function pi({className:t,orientation:n,...r}){return e("div",{role:"group","data-slot":"button-group","data-orientation":n,className:vn(fi({orientation:n}),t),...r})}function mi({className:t,asChild:n=!1,...r}){return e(n?G:"div",{className:vn("bg-muted shadow-xs flex items-center gap-2 rounded-md border px-4 text-sm font-medium [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none",t),...r})}function hi({className:t,orientation:n="vertical",...r}){return e(di,{"data-slot":"button-group-separator",orientation:n,className:vn("bg-input relative !m-0 self-stretch data-[orientation=vertical]:h-auto",t),...r})}const gi={},vi={};function yi(e,t){try{const n=(gi[e]||=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format)(t).split("GMT")[1];return n in vi?vi[n]:wi(n,n.split(":"))}catch{if(e in vi)return vi[e];const t=e?.match(bi);return t?wi(e,t.slice(1)):NaN}}const bi=/([+-]\d\d):?(\d\d)?/;function wi(e,t){const n=+(t[0]||0),r=+(t[1]||0),o=+(t[2]||0)/60;return vi[e]=60*n+r>0?60*n+r+o:60*n-r-o}class xi extends Date{constructor(...e){super(),e.length>1&&"string"==typeof e[e.length-1]&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(yi(this.timeZone,this))?this.setTime(NaN):e.length?"number"==typeof e[0]&&(1===e.length||2===e.length&&"number"!=typeof e[1])?this.setTime(e[0]):"string"==typeof e[0]?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),Si(this),Ni(this)):this.setTime(Date.now())}static tz(e,...t){return t.length?new xi(...t,e):new xi(Date.now(),e)}withTimeZone(e){return new xi(+this,e)}getTimezoneOffset(){const e=-yi(this.timeZone,this);return e>0?Math.floor(e):Math.ceil(e)}setTime(e){return Date.prototype.setTime.apply(this,arguments),Ni(this),+this}[Symbol.for("constructDateFrom")](e){return new xi(+new Date(e),this.timeZone)}}const ki=/^(get|set)(?!UTC)/;function Ni(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(60*-yi(e.timeZone,e)))}function Si(e){const t=yi(e.timeZone,e),n=t>0?Math.floor(t):Math.ceil(t),r=new Date(+e);r.setUTCHours(r.getUTCHours()-1);const o=-new Date(+e).getTimezoneOffset(),a=o- -new Date(+r).getTimezoneOffset(),i=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();a&&i&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+a);const s=o-n;s&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+s);const l=new Date(+e);l.setUTCSeconds(0);const c=o>0?l.getSeconds():(l.getSeconds()-60)%60,u=Math.round(-60*yi(e.timeZone,e))%60;(u||c)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+u),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+u+c));const d=yi(e.timeZone,e),f=d>0?Math.floor(d):Math.ceil(d),p=-new Date(+e).getTimezoneOffset()-f-s;if(f!==n&&p){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+p);const t=yi(e.timeZone,e),n=f-(t>0?Math.floor(t):Math.ceil(t));n&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+n),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+n))}}Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!ki.test(e))return;const t=e.replace(ki,"$1UTC");xi.prototype[t]&&(e.startsWith("get")?xi.prototype[e]=function(){return this.internal[t]()}:(xi.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),function(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()),Si(e)}(this),+this},xi.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Ni(this),+this}))});class Ci extends xi{static tz(e,...t){return t.length?new Ci(...t,e):new Ci(Date.now(),e)}toISOString(){const[e,t,n]=this.tzComponents(),r=`${e}${t}:${n}`;return this.internal.toISOString().slice(0,-1)+r}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[e,t,n,r]=this.internal.toUTCString().split(" ");return`${e?.slice(0,-1)} ${n} ${t} ${r}`}toTimeString(){const e=this.internal.toUTCString().split(" ")[4],[t,n,r]=this.tzComponents();return`${e} GMT${t}${n}${r} (${function(e,t,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(" ")}(this.timeZone,this)})`}toLocaleString(e,t){return Date.prototype.toLocaleString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleDateString(e,t){return Date.prototype.toLocaleDateString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleTimeString(e,t){return Date.prototype.toLocaleTimeString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}tzComponents(){const e=this.getTimezoneOffset();return[e>0?"-":"+",String(Math.floor(Math.abs(e)/60)).padStart(2,"0"),String(Math.abs(e)%60).padStart(2,"0")]}withTimeZone(e){return new Ci(+this,e)}[Symbol.for("constructDateFrom")](e){return new Ci(+new Date(e),this.timeZone)}}const _i=6048e5,Mi=Symbol.for("constructDateFrom");function Ei(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&Mi in e?e[Mi](t):e instanceof Date?new e.constructor(t):new Date(t)}function Oi(e,t){return Ei(t||e,e)}function Di(e,t,n){const r=Oi(e,n?.in);return isNaN(t)?Ei(e,NaN):t?(r.setDate(r.getDate()+t),r):r}function Pi(e,t,n){const r=Oi(e,n?.in);if(isNaN(t))return Ei(e,NaN);if(!t)return r;const o=r.getDate(),a=Ei(e,r.getTime());a.setMonth(r.getMonth()+t+1,0);return o>=a.getDate()?a:(r.setFullYear(a.getFullYear(),a.getMonth(),o),r)}let Ti={};function Ai(){return Ti}function Ri(e,t){const n=Ai(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Oi(e,t?.in),a=o.getDay(),i=(a<r?7:0)+a-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function Ii(e,t){return Ri(e,{...t,weekStartsOn:1})}function ji(e,t){const n=Oi(e,t?.in),r=n.getFullYear(),o=Ei(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=Ii(o),i=Ei(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const s=Ii(i);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function zi(e){const t=Oi(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Li(e,...t){const n=Ei.bind(null,t.find(e=>"object"==typeof e));return t.map(n)}function Fi(e,t){const n=Oi(e,t?.in);return n.setHours(0,0,0,0),n}function Bi(e,t,n){const[r,o]=Li(0,e,t),a=Fi(r),i=Fi(o),s=+a-zi(a),l=+i-zi(i);return Math.round((s-l)/864e5)}function $i(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}function Wi(e,t){const[n,r]=Li(0,t.start,t.end);return{start:n,end:r}}function Hi(e,t){const n=Oi(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Ui(e,t){const n=Ai(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Oi(e,t?.in),a=o.getDay(),i=6+(a<r?-7:0)-(a-r);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}const Vi={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"}};function Yi(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Ki={date:Yi({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Yi({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Yi({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},qi={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Gi(e){return(t,n)=>{let r;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,o=n?.width?String(n.width):t;r=e.formattingValues[o]||e.formattingValues[t]}else{const t=e.defaultWidth,o=n?.width?String(n.width):e.defaultWidth;r=e.values[o]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}const Xi={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Gi({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Gi({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Gi({values:{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"]},defaultWidth:"wide"}),day:Gi({values:{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"]},defaultWidth:"wide"}),dayPeriod:Gi({values:{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"}},defaultWidth:"wide",formattingValues:{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"}},defaultFormattingWidth:"wide"})};function Zi(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;const i=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n;return}(s,e=>e.test(i)):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n;return}(s,e=>e.test(i));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;return{value:c,rest:t.slice(i.length)}}}const Qi={ordinalNumber:(Ji={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const n=e.match(Ji.matchPattern);if(!n)return null;const r=n[0],o=e.match(Ji.parsePattern);if(!o)return null;let a=Ji.valueCallback?Ji.valueCallback(o[0]):o[0];return a=t.valueCallback?t.valueCallback(a):a,{value:a,rest:e.slice(r.length)}}),era:Zi({matchPatterns:{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},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Zi({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:Zi({matchPatterns:{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},defaultMatchWidth:"wide",parsePatterns:{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]},defaultParseWidth:"any"}),day:Zi({matchPatterns:{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},defaultMatchWidth:"wide",parsePatterns:{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]},defaultParseWidth:"any"}),dayPeriod:Zi({matchPatterns:{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},defaultMatchWidth:"any",parsePatterns:{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}},defaultParseWidth:"any"})};var Ji;const es={code:"en-US",formatDistance:(e,t,n)=>{let r;const o=Vi[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:Ki,formatRelative:(e,t,n,r)=>qi[e],localize:Xi,match:Qi,options:{weekStartsOn:0,firstWeekContainsDate:1}};function ts(e,t){const n=Oi(e,t?.in),r=+Ii(n)-+function(e,t){const n=ji(e,t),r=Ei(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Ii(r)}(n);return Math.round(r/_i)+1}function ns(e,t){const n=Oi(e,t?.in),r=n.getFullYear(),o=Ai(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,i=Ei(t?.in||e,0);i.setFullYear(r+1,0,a),i.setHours(0,0,0,0);const s=Ri(i,t),l=Ei(t?.in||e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const c=Ri(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function rs(e,t){const n=Oi(e,t?.in),r=+Ri(n,t)-+function(e,t){const n=Ai(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=ns(e,t),a=Ei(t?.in||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),Ri(a,t)}(n,t);return Math.round(r/_i)+1}function os(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const as={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return os("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):os(n+1,2)},d:(e,t)=>os(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>os(e.getHours()%12||12,t.length),H:(e,t)=>os(e.getHours(),t.length),m:(e,t)=>os(e.getMinutes(),t.length),s:(e,t)=>os(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return os(Math.trunc(r*Math.pow(10,n-3)),t.length)}},is="midnight",ss="noon",ls="morning",cs="afternoon",us="evening",ds="night",fs={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:"year"})}return as.y(e,t)},Y:function(e,t,n,r){const o=ns(e,r),a=o>0?o:1-o;if("YY"===t){return os(a%100,2)}return"Yo"===t?n.ordinalNumber(a,{unit:"year"}):os(a,t.length)},R:function(e,t){return os(ji(e),t.length)},u:function(e,t){return os(e.getFullYear(),t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return os(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return os(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return as.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return os(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=rs(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):os(o,t.length)},I:function(e,t,n){const r=ts(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):os(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):as.d(e,t)},D:function(e,t,n){const r=function(e,t){const n=Oi(e,t?.in);return Bi(n,Hi(n))+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):os(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return os(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return os(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return os(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(o=12===r?ss:0===r?is:r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(o=r>=17?us:r>=12?cs:r>=4?ls:ds,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return as.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):as.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):os(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):os(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):as.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):as.s(e,t)},S:function(e,t){return as.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return ms(r);case"XXXX":case"XX":return hs(r);default:return hs(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return ms(r);case"xxxx":case"xx":return hs(r);default:return hs(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+ps(r,":");default:return"GMT"+hs(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+ps(r,":");default:return"GMT"+hs(r,":")}},t:function(e,t,n){return os(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return os(+e,t.length)}};function ps(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),a=r%60;return 0===a?n+String(o):n+String(o)+t+os(a,2)}function ms(e,t){if(e%60==0){return(e>0?"-":"+")+os(Math.abs(e)/60,2)}return hs(e,t)}function hs(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+os(Math.trunc(r/60),2)+t+os(r%60,2)}const gs=(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"})}},vs=(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"})}},ys={p:vs,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return gs(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;default:a=t.dateTime({width:"full"})}return a.replace("{{date}}",gs(r,t)).replace("{{time}}",vs(o,t))}},bs=/^D+$/,ws=/^Y+$/,xs=["D","DD","YY","YYYY"];const ks=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ns=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ss=/^'([^]*?)'?$/,Cs=/''/g,_s=/[a-zA-Z]/;function Ms(e,t,n){const r=Ai(),o=n?.locale??r.locale??es,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=Oi(e,n?.in);if(!function(e){return!(!$i(e)&&"number"!=typeof e||isNaN(+Oi(e)))}(s))throw new RangeError("Invalid time value");let l=t.match(Ns).map(e=>{const t=e[0];if("p"===t||"P"===t){return(0,ys[t])(e,o.formatLong)}return e}).join("").match(ks).map(e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:Es(e)};if(fs[t])return{isToken:!0,value:e};if(t.match(_s))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const c={firstWeekContainsDate:a,weekStartsOn:i,locale:o};return l.map(r=>{if(!r.isToken)return r.value;const a=r.value;(!n?.useAdditionalWeekYearTokens&&function(e){return ws.test(e)}(a)||!n?.useAdditionalDayOfYearTokens&&function(e){return bs.test(e)}(a))&&function(e,t,n){const r=function(e,t,n){const r="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,n);if(console.warn(r),xs.includes(e))throw new RangeError(r)}(a,t,String(e));return(0,fs[a[0]])(s,a,o.localize,c)}).join("")}function Es(e){const t=e.match(Ss);return t?t[1].replace(Cs,"'"):e}function Os(e,t,n){const r=Oi(e,n?.in),o=r.getFullYear(),a=r.getDate(),i=Ei(e,0);i.setFullYear(o,t,15),i.setHours(0,0,0,0);const s=function(e,t){const n=Oi(e,t?.in),r=n.getFullYear(),o=n.getMonth(),a=Ei(n,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}(i);return r.setMonth(t,Math.min(a,s)),r}function Ds(e,t){const n=t.startOfMonth(e),r=n.getDay();return 1===r?n:0===r?t.addDays(n,-6):t.addDays(n,-1*(r-1))}class Ps{constructor(e,t){this.Date=Date,this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?Ci.tz(this.options.timeZone):new this.Date,this.newDate=(e,t,n)=>this.overrides?.newDate?this.overrides.newDate(e,t,n):this.options.timeZone?new Ci(e,t,n,this.options.timeZone):new Date(e,t,n),this.addDays=(e,t)=>this.overrides?.addDays?this.overrides.addDays(e,t):Di(e,t),this.addMonths=(e,t)=>this.overrides?.addMonths?this.overrides.addMonths(e,t):Pi(e,t),this.addWeeks=(e,t)=>this.overrides?.addWeeks?this.overrides.addWeeks(e,t):function(e,t,n){return Di(e,7*t,n)}(e,t),this.addYears=(e,t)=>this.overrides?.addYears?this.overrides.addYears(e,t):function(e,t,n){return Pi(e,12*t,n)}(e,t),this.differenceInCalendarDays=(e,t)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(e,t):Bi(e,t),this.differenceInCalendarMonths=(e,t)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(e,t):function(e,t){const[n,r]=Li(0,e,t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}(e,t),this.eachMonthOfInterval=e=>this.overrides?.eachMonthOfInterval?this.overrides.eachMonthOfInterval(e):function(e){const{start:t,end:n}=Wi(0,e);let r=+t>+n;const o=r?+t:+n,a=r?n:t;a.setHours(0,0,0,0),a.setDate(1);const i=[];for(;+a<=o;)i.push(Ei(t,a)),a.setMonth(a.getMonth()+1);return r?i.reverse():i}(e),this.eachYearOfInterval=e=>{const t=this.overrides?.eachYearOfInterval?this.overrides.eachYearOfInterval(e):function(e){const{start:t,end:n}=Wi(0,e);let r=+t>+n;const o=r?+t:+n,a=r?n:t;a.setHours(0,0,0,0),a.setMonth(0,1);const i=[];for(;+a<=o;)i.push(Ei(t,a)),a.setFullYear(a.getFullYear()+1);return r?i.reverse():i}(e),n=new Set(t.map(e=>this.getYear(e)));if(n.size===t.length)return t;const r=[];return n.forEach(e=>{r.push(new Date(e,0,1))}),r},this.endOfBroadcastWeek=e=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(e):function(e,t){const n=Ds(e,t),r=function(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,1-r),a=t.addDays(o,34);return t.getMonth(e)===t.getMonth(a)?5:4}(e,t);return t.addDays(n,7*r-1)}(e,this),this.endOfISOWeek=e=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(e):function(e,t){return Ui(e,{...t,weekStartsOn:1})}(e),this.endOfMonth=e=>this.overrides?.endOfMonth?this.overrides.endOfMonth(e):function(e,t){const n=Oi(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}(e),this.endOfWeek=(e,t)=>this.overrides?.endOfWeek?this.overrides.endOfWeek(e,t):Ui(e,this.options),this.endOfYear=e=>this.overrides?.endOfYear?this.overrides.endOfYear(e):function(e,t){const n=Oi(e,t?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}(e),this.format=(e,t,n)=>{const r=this.overrides?.format?this.overrides.format(e,t,this.options):Ms(e,t,this.options);return this.options.numerals&&"latn"!==this.options.numerals?this.replaceDigits(r):r},this.getISOWeek=e=>this.overrides?.getISOWeek?this.overrides.getISOWeek(e):ts(e),this.getMonth=(e,t)=>this.overrides?.getMonth?this.overrides.getMonth(e,this.options):function(e,t){return Oi(e,t?.in).getMonth()}(e,this.options),this.getYear=(e,t)=>this.overrides?.getYear?this.overrides.getYear(e,this.options):function(e,t){return Oi(e,t?.in).getFullYear()}(e,this.options),this.getWeek=(e,t)=>this.overrides?.getWeek?this.overrides.getWeek(e,this.options):rs(e,this.options),this.isAfter=(e,t)=>this.overrides?.isAfter?this.overrides.isAfter(e,t):function(e,t){return+Oi(e)>+Oi(t)}(e,t),this.isBefore=(e,t)=>this.overrides?.isBefore?this.overrides.isBefore(e,t):function(e,t){return+Oi(e)<+Oi(t)}(e,t),this.isDate=e=>this.overrides?.isDate?this.overrides.isDate(e):$i(e),this.isSameDay=(e,t)=>this.overrides?.isSameDay?this.overrides.isSameDay(e,t):function(e,t){const[n,r]=Li(0,e,t);return+Fi(n)===+Fi(r)}(e,t),this.isSameMonth=(e,t)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(e,t):function(e,t){const[n,r]=Li(0,e,t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}(e,t),this.isSameYear=(e,t)=>this.overrides?.isSameYear?this.overrides.isSameYear(e,t):function(e,t){const[n,r]=Li(0,e,t);return n.getFullYear()===r.getFullYear()}(e,t),this.max=e=>this.overrides?.max?this.overrides.max(e):function(e,t){let n,r=t?.in;return e.forEach(e=>{r||"object"!=typeof e||(r=Ei.bind(null,e));const t=Oi(e,r);(!n||n<t||isNaN(+t))&&(n=t)}),Ei(r,n||NaN)}(e),this.min=e=>this.overrides?.min?this.overrides.min(e):function(e,t){let n,r=t?.in;return e.forEach(e=>{r||"object"!=typeof e||(r=Ei.bind(null,e));const t=Oi(e,r);(!n||n>t||isNaN(+t))&&(n=t)}),Ei(r,n||NaN)}(e),this.setMonth=(e,t)=>this.overrides?.setMonth?this.overrides.setMonth(e,t):Os(e,t),this.setYear=(e,t)=>this.overrides?.setYear?this.overrides.setYear(e,t):function(e,t,n){const r=Oi(e,n?.in);return isNaN(+r)?Ei(e,NaN):(r.setFullYear(t),r)}(e,t),this.startOfBroadcastWeek=(e,t)=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(e,this):Ds(e,this),this.startOfDay=e=>this.overrides?.startOfDay?this.overrides.startOfDay(e):Fi(e),this.startOfISOWeek=e=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(e):Ii(e),this.startOfMonth=e=>this.overrides?.startOfMonth?this.overrides.startOfMonth(e):function(e,t){const n=Oi(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}(e),this.startOfWeek=(e,t)=>this.overrides?.startOfWeek?this.overrides.startOfWeek(e,this.options):Ri(e,this.options),this.startOfYear=e=>this.overrides?.startOfYear?this.overrides.startOfYear(e):Hi(e),this.options={locale:es,...e},this.overrides=t}getDigitMap(){const{numerals:e="latn"}=this.options,t=new Intl.NumberFormat("en-US",{numberingSystem:e}),n={};for(let e=0;e<10;e++)n[e.toString()]=t.format(e);return n}replaceDigits(e){const t=this.getDigitMap();return e.replace(/\d/g,e=>t[e]||e)}formatNumber(e){return this.replaceDigits(e.toString())}getMonthYearOrder(){const e=this.options.locale?.code;return e&&Ps.yearFirstLocales.has(e)?"year-first":"month-first"}formatMonthYear(e){const{locale:t,timeZone:n,numerals:r}=this.options,o=t?.code;if(o&&Ps.yearFirstLocales.has(o))try{const t=new Intl.DateTimeFormat(o,{month:"long",year:"numeric",timeZone:n,numberingSystem:r});return t.format(e)}catch{}const a="year-first"===this.getMonthYearOrder()?"y LLLL":"LLLL y";return this.format(e,a)}}Ps.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 Ts=new Ps;class As{constructor(e,t,n=Ts){this.date=e,this.displayMonth=t,this.outside=Boolean(t&&!n.isSameMonth(e,t)),this.dateLib=n}isEqualTo(e){return this.dateLib.isSameDay(e.date,this.date)&&this.dateLib.isSameMonth(e.displayMonth,this.displayMonth)}}class Rs{constructor(e,t){this.date=e,this.weeks=t}}class Is{constructor(e,t){this.days=t,this.weekNumber=e}}var js,zs,Ls,Fs;!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"}(js||(js={})),function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"}(zs||(zs={})),function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"}(Ls||(Ls={})),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"}(Fs||(Fs={}));const Bs=i(void 0);function $s(){const e=s(Bs);if(void 0===e)throw new Error("useDayPicker() must be used within a custom component.");return e}var Ws=Object.freeze({__proto__:null,Button:function(e){return o.createElement("button",{...e})},CaptionLabel:function(e){return o.createElement("span",{...e})},Chevron:function(e){const{size:t=24,orientation:n="left",className:r}=e;return o.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},"up"===n&&o.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),"down"===n&&o.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),"left"===n&&o.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),"right"===n&&o.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))},Day:function(e){const{day:t,modifiers:n,...r}=e;return o.createElement("td",{...r})},DayButton:function(e){const{day:t,modifiers:n,...r}=e,a=o.useRef(null);return o.useEffect(()=>{n.focused&&a.current?.focus()},[n.focused]),o.createElement("button",{ref:a,...r})},Dropdown:function(e){const{options:t,className:n,components:r,classNames:a,...i}=e,s=[a[js.Dropdown],n].join(" "),l=t?.find(({value:e})=>e===i.value);return o.createElement("span",{"data-disabled":i.disabled,className:a[js.DropdownRoot]},o.createElement(r.Select,{className:s,...i},t?.map(({value:e,label:t,disabled:n})=>o.createElement(r.Option,{key:e,value:e,disabled:n},t))),o.createElement("span",{className:a[js.CaptionLabel],"aria-hidden":!0},l?.label,o.createElement(r.Chevron,{orientation:"down",size:18,className:a[js.Chevron]})))},DropdownNav:function(e){return o.createElement("div",{...e})},Footer:function(e){return o.createElement("div",{...e})},Month:function(e){const{calendarMonth:t,displayIndex:n,...r}=e;return o.createElement("div",{...r},e.children)},MonthCaption:function(e){const{calendarMonth:t,displayIndex:n,...r}=e;return o.createElement("div",{...r})},MonthGrid:function(e){return o.createElement("table",{...e})},Months:function(e){return o.createElement("div",{...e})},MonthsDropdown:function(e){const{components:t}=$s();return o.createElement(t.Dropdown,{...e})},Nav:function(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:a,...i}=e,{components:s,classNames:c,labels:{labelPrevious:u,labelNext:d}}=$s(),f=l(e=>{a&&n?.(e)},[a,n]),p=l(e=>{r&&t?.(e)},[r,t]);return o.createElement("nav",{...i},o.createElement(s.PreviousMonthButton,{type:"button",className:c[js.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":!r||void 0,"aria-label":u(r),onClick:p},o.createElement(s.Chevron,{disabled:!r||void 0,className:c[js.Chevron],orientation:"left"})),o.createElement(s.NextMonthButton,{type:"button",className:c[js.NextMonthButton],tabIndex:a?void 0:-1,"aria-disabled":!a||void 0,"aria-label":d(a),onClick:f},o.createElement(s.Chevron,{disabled:!a||void 0,orientation:"right",className:c[js.Chevron]})))},NextMonthButton:function(e){const{components:t}=$s();return o.createElement(t.Button,{...e})},Option:function(e){return o.createElement("option",{...e})},PreviousMonthButton:function(e){const{components:t}=$s();return o.createElement(t.Button,{...e})},Root:function(e){const{rootRef:t,...n}=e;return o.createElement("div",{...n,ref:t})},Select:function(e){return o.createElement("select",{...e})},Week:function(e){const{week:t,...n}=e;return o.createElement("tr",{...n})},WeekNumber:function(e){const{week:t,...n}=e;return o.createElement("th",{...n})},WeekNumberHeader:function(e){return o.createElement("th",{...e})},Weekday:function(e){return o.createElement("th",{...e})},Weekdays:function(e){return o.createElement("thead",{"aria-hidden":!0},o.createElement("tr",{...e}))},Weeks:function(e){return o.createElement("tbody",{...e})},YearsDropdown:function(e){const{components:t}=$s();return o.createElement(t.Dropdown,{...e})}});function Hs(e,t,n=!1,r=Ts){let{from:o,to:a}=e;const{differenceInCalendarDays:i,isSameDay:s}=r;if(o&&a){i(a,o)<0&&([o,a]=[a,o]);return i(t,o)>=(n?1:0)&&i(a,t)>=(n?1:0)}return!n&&a?s(a,t):!(n||!o)&&s(o,t)}function Us(e){return Boolean(e&&"object"==typeof e&&"before"in e&&"after"in e)}function Vs(e){return Boolean(e&&"object"==typeof e&&"from"in e)}function Ys(e){return Boolean(e&&"object"==typeof e&&"after"in e)}function Ks(e){return Boolean(e&&"object"==typeof e&&"before"in e)}function qs(e){return Boolean(e&&"object"==typeof e&&"dayOfWeek"in e)}function Gs(e,t){return Array.isArray(e)&&e.every(t.isDate)}function Xs(e,t,n=Ts){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:a,isAfter:i}=n;return r.some(t=>{if("boolean"==typeof t)return t;if(n.isDate(t))return o(e,t);if(Gs(t,n))return t.includes(e);if(Vs(t))return Hs(t,e,!1,n);if(qs(t))return Array.isArray(t.dayOfWeek)?t.dayOfWeek.includes(e.getDay()):t.dayOfWeek===e.getDay();if(Us(t)){const n=a(t.before,e)>0,r=a(t.after,e)<0;return i(t.before,t.after)?r&&n:n||r}return Ys(t)?a(e,t.after)>0:Ks(t)?a(t.before,e)>0:"function"==typeof t&&t(e)})}function Zs(e){return{...Ws,...e}}function Qs(){const e={};for(const t in js)e[js[t]]=`rdp-${js[t]}`;for(const t in zs)e[zs[t]]=`rdp-${zs[t]}`;for(const t in Ls)e[Ls[t]]=`rdp-${Ls[t]}`;for(const t in Fs)e[Fs[t]]=`rdp-${Fs[t]}`;return e}function Js(e,t,n){return(n??new Ps(t)).formatMonthYear(e)}const el=Js;function tl(e,t=Ts){return t.format(e,"yyyy")}const nl=tl;var rl=Object.freeze({__proto__:null,formatCaption:Js,formatDay:function(e,t,n){return(n??new Ps(t)).format(e,"d")},formatMonthCaption:el,formatMonthDropdown:function(e,t=Ts){return t.format(e,"LLLL")},formatWeekNumber:function(e,t=Ts){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)},formatWeekNumberHeader:function(){return""},formatWeekdayName:function(e,t,n){return(n??new Ps(t)).format(e,"cccccc")},formatYearCaption:nl,formatYearDropdown:tl});function ol(e,t,n,r,o){const{startOfMonth:a,startOfYear:i,endOfYear:s,eachMonthOfInterval:l,getMonth:c}=o;return l({start:i(e),end:s(e)}).map(e=>{const i=r.formatMonthDropdown(e,o);return{value:c(e),label:i,disabled:t&&e<a(t)||n&&e>a(n)||!1}})}function al(e,t,n,r,o=!1){if(!e)return;if(!t)return;const{startOfYear:a,endOfYear:i,eachYearOfInterval:s,getYear:l}=r,c=s({start:a(e),end:i(t)});return o&&c.reverse(),c.map(e=>{const t=n.formatYearDropdown(e,r);return{value:l(e),label:t,disabled:!1}})}function il(e,t,n,r){let o=(r??new Ps(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const sl=il;function ll(e,t,n){return(n??new Ps(t)).formatMonthYear(e)}const cl=ll;var ul=Object.freeze({__proto__:null,labelCaption:cl,labelDay:sl,labelDayButton:il,labelGrid:ll,labelGridcell:function(e,t,n,r){let o=(r??new Ps(n)).format(e,"PPPP");return t?.today&&(o=`Today, ${o}`),o},labelMonthDropdown:function(e){return"Choose the Month"},labelNav:function(){return""},labelNext:function(e){return"Go to the Next Month"},labelPrevious:function(e){return"Go to the Previous Month"},labelWeekNumber:function(e,t){return`Week ${e}`},labelWeekNumberHeader:function(e){return"Week Number"},labelWeekday:function(e,t,n){return(n??new Ps(t)).format(e,"cccc")},labelYearDropdown:function(e){return"Choose the Year"}});const dl=e=>e instanceof HTMLElement?e:null,fl=e=>[...e.querySelectorAll("[data-animated-month]")??[]],pl=e=>dl(e.querySelector("[data-animated-caption]")),ml=e=>dl(e.querySelector("[data-animated-weeks]"));function hl(e,t,{classNames:n,months:r,focused:o,dateLib:a}){const i=c(null),s=c(r),l=c(!1);u(()=>{const c=s.current;if(s.current=r,!(t&&e.current&&e.current instanceof HTMLElement&&0!==r.length&&0!==c.length&&r.length===c.length))return;const u=a.isSameMonth(r[0].date,c[0].date),d=a.isAfter(r[0].date,c[0].date),f=d?n[Fs.caption_after_enter]:n[Fs.caption_before_enter],p=d?n[Fs.weeks_after_enter]:n[Fs.weeks_before_enter],m=i.current,h=e.current.cloneNode(!0);if(h instanceof HTMLElement){fl(h).forEach(e=>{if(!(e instanceof HTMLElement))return;const t=dl(e.querySelector("[data-animated-month]"));t&&e.contains(t)&&e.removeChild(t);const n=pl(e);n&&n.classList.remove(f);const r=ml(e);r&&r.classList.remove(p)}),i.current=h}else i.current=null;if(l.current||u||o)return;const g=m instanceof HTMLElement?fl(m):[],v=fl(e.current);if(v?.every(e=>e instanceof HTMLElement)&&g&&g.every(e=>e instanceof HTMLElement)){l.current=!0,e.current.style.isolation="isolate";const t=(y=e.current,dl(y.querySelector("[data-animated-nav]")));t&&(t.style.zIndex="1"),v.forEach((r,o)=>{const a=g[o];if(!a)return;r.style.position="relative",r.style.overflow="hidden";const i=pl(r);i&&i.classList.add(f);const s=ml(r);s&&s.classList.add(p);const c=()=>{l.current=!1,e.current&&(e.current.style.isolation=""),t&&(t.style.zIndex=""),i&&i.classList.remove(f),s&&s.classList.remove(p),r.style.position="",r.style.overflow="",r.contains(a)&&r.removeChild(a)};a.style.pointerEvents="none",a.style.position="absolute",a.style.overflow="hidden",a.setAttribute("aria-hidden","true");const u=(e=>dl(e.querySelector("[data-animated-weekdays]")))(a);u&&(u.style.opacity="0");const m=pl(a);m&&(m.classList.add(d?n[Fs.caption_before_exit]:n[Fs.caption_after_exit]),m.addEventListener("animationend",c));const h=ml(a);h&&h.classList.add(d?n[Fs.weeks_before_exit]:n[Fs.weeks_after_exit]),r.insertBefore(a,r.firstChild)})}var y})}function gl(e,t,n,r){const{month:o,defaultMonth:a,today:i=r.today(),numberOfMonths:s=1}=e;let l=o||a||i;const{differenceInCalendarMonths:c,addMonths:u,startOfMonth:d}=r;if(n&&c(n,l)<s-1){l=u(n,-1*(s-1))}return t&&c(l,t)<0&&(l=t),d(l)}function vl(e,t){const[n,r]=a(e);return[void 0===t?n:t,r]}function yl(e,t){const[n,r]=function(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:a,startOfMonth:i,endOfMonth:s,addYears:l,endOfYear:c,newDate:u,today:d}=t,{fromYear:f,toYear:p,fromMonth:m,toMonth:h}=e;!n&&m&&(n=m),!n&&f&&(n=t.newDate(f,0,1)),!r&&h&&(r=h),!r&&p&&(r=u(p,11,31));const g="dropdown"===e.captionLayout||"dropdown-years"===e.captionLayout;return n?n=i(n):f?n=u(f,0,1):!n&&g&&(n=o(l(e.today??d(),-100))),r?r=s(r):p?r=u(p,11,31):!r&&g&&(r=c(e.today??d())),[n?a(n):n,r?a(r):r]}(e,t),{startOfMonth:o,endOfMonth:a}=t,i=gl(e,n,r,t),[s,l]=vl(i,e.month?i:void 0);d(()=>{const o=gl(e,n,r,t);l(o)},[e.timeZone]);const c=function(e,t,n,r){const{numberOfMonths:o=1}=n,a=[];for(let n=0;n<o;n++){const o=r.addMonths(e,n);if(t&&o>t)break;a.push(o)}return a}(s,r,e,t),u=function(e,t,n,r){const o=e[0],a=e[e.length-1],{ISOWeek:i,fixedWeeks:s,broadcastCalendar:l}=n??{},{addDays:c,differenceInCalendarDays:u,differenceInCalendarMonths:d,endOfBroadcastWeek:f,endOfISOWeek:p,endOfMonth:m,endOfWeek:h,isAfter:g,startOfBroadcastWeek:v,startOfISOWeek:y,startOfWeek:b}=r,w=l?v(o,r):i?y(o):b(o),x=u(l?f(a):i?p(m(a)):h(m(a)),w),k=d(a,o)+1,N=[];for(let e=0;e<=x;e++){const n=c(w,e);if(t&&g(n,t))break;N.push(n)}const S=(l?35:42)*k;if(s&&N.length<S){const e=S-N.length;for(let t=0;t<e;t++){const e=c(N[N.length-1],1);N.push(e)}}return N}(c,e.endMonth?a(e.endMonth):void 0,e,t),f=function(e,t,n,r){const{addDays:o,endOfBroadcastWeek:a,endOfISOWeek:i,endOfMonth:s,endOfWeek:l,getISOWeek:c,getWeek:u,startOfBroadcastWeek:d,startOfISOWeek:f,startOfWeek:p}=r,m=e.reduce((e,m)=>{const h=n.broadcastCalendar?d(m,r):n.ISOWeek?f(m):p(m),g=n.broadcastCalendar?a(m):n.ISOWeek?i(s(m)):l(s(m)),v=t.filter(e=>e>=h&&e<=g),y=n.broadcastCalendar?35:42;if(n.fixedWeeks&&v.length<y){const e=t.filter(e=>{const t=y-v.length;return e>g&&e<=o(g,t)});v.push(...e)}const b=v.reduce((e,t)=>{const o=n.ISOWeek?c(t):u(t),a=e.find(e=>e.weekNumber===o),i=new As(t,m,r);return a?a.days.push(i):e.push(new Is(o,[i])),e},[]),w=new Rs(m,b);return e.push(w),e},[]);return n.reverseMonths?m.reverse():m}(c,u,e,t),p=function(e){return e.reduce((e,t)=>e.concat(t.weeks.slice()),[].slice())}(f),m=function(e){const t=[];return e.reduce((e,n)=>{const r=n.weeks.reduce((e,t)=>e.concat(t.days.slice()),t.slice());return e.concat(r.slice())},t.slice())}(f),h=function(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a}=n,{startOfMonth:i,addMonths:s,differenceInCalendarMonths:l}=r,c=o?a??1:1,u=i(e);return t&&l(u,t)<=0?void 0:s(u,-c)}(s,n,e,t),g=function(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a=1}=n,{startOfMonth:i,addMonths:s,differenceInCalendarMonths:l}=r,c=o?a:1,u=i(e);return t&&l(t,e)<a?void 0:s(u,c)}(s,r,e,t),{disableNavigation:v,onMonthChange:y}=e,b=e=>{if(v)return;let t=o(e);n&&t<o(n)&&(t=o(n)),r&&t>o(r)&&(t=o(r)),l(t),y?.(t)};return{months:f,weeks:p,days:m,navStart:n,navEnd:r,previousMonth:h,nextMonth:g,goToMonth:b,goToDay:e=>{(e=>p.some(t=>t.days.some(t=>t.isEqualTo(e))))(e)||b(e.date)}}}var bl;function wl(e){return!e[zs.disabled]&&!e[zs.hidden]&&!e[zs.outside]}function xl(e,t,n,r,o,a,i,s=0){if(s>365)return;const l=function(e,t,n,r,o,a,i){const{ISOWeek:s,broadcastCalendar:l}=a,{addDays:c,addMonths:u,addWeeks:d,addYears:f,endOfBroadcastWeek:p,endOfISOWeek:m,endOfWeek:h,max:g,min:v,startOfBroadcastWeek:y,startOfISOWeek:b,startOfWeek:w}=i,x={day:c,week:d,month:u,year:f,startOfWeek:e=>l?y(e,i):s?b(e):w(e),endOfWeek:e=>l?p(e):s?m(e):h(e)};let k=x[e](n,"after"===t?1:-1);return"before"===t&&r?k=g([r,k]):"after"===t&&o&&(k=v([o,k])),k}(e,t,n.date,r,o,a,i),c=Boolean(a.disabled&&Xs(l,a.disabled,i)),u=Boolean(a.hidden&&Xs(l,a.hidden,i)),d=new As(l,l,i);return c||u?xl(e,t,d,r,o,a,i,s+1):d}function kl(e,t,n,r,o){const{autoFocus:i}=e,[s,l]=a(),c=function(e,t,n,r){let o,a=-1;for(const i of e){const e=t(i);wl(e)&&(e[zs.focused]&&a<bl.FocusedModifier?(o=i,a=bl.FocusedModifier):r?.isEqualTo(i)&&a<bl.LastFocused?(o=i,a=bl.LastFocused):n(i.date)&&a<bl.Selected?(o=i,a=bl.Selected):e[zs.today]&&a<bl.Today&&(o=i,a=bl.Today))}return o||(o=e.find(e=>wl(t(e)))),o}(t.days,n,r||(()=>!1),s),[u,d]=a(i?c:void 0);return{isFocusTarget:e=>Boolean(c?.isEqualTo(e)),setFocused:d,focused:u,blur:()=>{l(u),d(void 0)},moveFocus:(n,r)=>{if(!u)return;const a=xl(n,r,u,t.navStart,t.navEnd,e,o);if(a){if(e.disableNavigation){if(!t.days.some(e=>e.isEqualTo(a)))return}t.goToDay(a),d(a)}}}}function Nl(e,t,n=Ts){return Hs(e,t.from,!1,n)||Hs(e,t.to,!1,n)||Hs(t,e.from,!1,n)||Hs(t,e.to,!1,n)}function Sl(e,t,n=Ts){const r=Array.isArray(t)?t:[t],o=r.filter(e=>"function"!=typeof e).some(t=>{if("boolean"==typeof t)return t;if(n.isDate(t))return Hs(e,t,!1,n);if(Gs(t,n))return t.some(t=>Hs(e,t,!1,n));if(Vs(t))return!(!t.from||!t.to)&&Nl(e,{from:t.from,to:t.to},n);if(qs(t))return function(e,t,n=Ts){const r=Array.isArray(t)?t:[t];let o=e.from;const a=n.differenceInCalendarDays(e.to,e.from),i=Math.min(a,6);for(let e=0;e<=i;e++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}(e,t.dayOfWeek,n);if(Us(t)){return n.isAfter(t.before,t.after)?Nl(e,{from:n.addDays(t.after,1),to:n.addDays(t.before,-1)},n):Xs(e.from,t,n)||Xs(e.to,t,n)}return!(!Ys(t)&&!Ks(t))&&(Xs(e.from,t,n)||Xs(e.to,t,n))});if(o)return!0;const a=r.filter(e=>"function"==typeof e);if(a.length){let t=e.from;const r=n.differenceInCalendarDays(e.to,e.from);for(let e=0;e<=r;e++){if(a.some(e=>e(t)))return!0;t=n.addDays(t,1)}}return!1}function Cl(e,t){const{disabled:n,excludeDisabled:r,selected:o,required:a,onSelect:i}=e,[s,l]=vl(o,i?o:void 0),c=i?o:s;return{selected:c,select:(o,s,u)=>{const{min:d,max:f}=e,p=o?function(e,t,n=0,r=0,o=!1,a=Ts){const{from:i,to:s}=t||{},{isSameDay:l,isAfter:c,isBefore:u}=a;let d;if(i||s){if(i&&!s)d=l(i,e)?0===n?{from:i,to:e}:o?{from:i,to:void 0}:void 0:u(e,i)?{from:e,to:i}:{from:i,to:e};else if(i&&s)if(l(i,e)&&l(s,e))d=o?{from:i,to:s}:void 0;else if(l(i,e))d={from:i,to:n>0?void 0:e};else if(l(s,e))d={from:e,to:n>0?void 0:e};else if(u(e,i))d={from:e,to:s};else if(c(e,i))d={from:i,to:e};else{if(!c(e,s))throw new Error("Invalid range");d={from:i,to:e}}}else d={from:e,to:n>0?void 0:e};if(d?.from&&d?.to){const t=a.differenceInCalendarDays(d.to,d.from);(r>0&&t>r||n>1&&t<n)&&(d={from:e,to:void 0})}return d}(o,c,d,f,a,t):void 0;return r&&n&&p?.from&&p.to&&Sl({from:p.from,to:p.to},n,t)&&(p.from=o,p.to=void 0),i||l(p),i?.(p,o,s,u),p},isSelected:e=>c&&Hs(c,e,!1,t)}}function _l(e,t){const n=function(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=vl(n,o?n:void 0),s=o?n:a,{isSameDay:l}=t;return{selected:s,select:(e,t,n)=>{let a=e;return!r&&s&&s&&l(e,s)&&(a=void 0),o||i(a),o?.(a,e,t,n),a},isSelected:e=>!!s&&l(s,e)}}(e,t),r=function(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=vl(n,o?n:void 0),s=o?n:a,{isSameDay:l}=t,c=e=>s?.some(t=>l(t,e))??!1,{min:u,max:d}=e;return{selected:s,select:(e,t,n)=>{let a=[...s??[]];if(c(e)){if(s?.length===u)return;if(r&&1===s?.length)return;a=s?.filter(t=>!l(t,e))}else a=s?.length===d?[e]:[...a,e];return o||i(a),o?.(a,e,t,n),a},isSelected:c}}(e,t),o=Cl(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function Ml(e){let t=e;t.timeZone&&(t={...e},t.today&&(t.today=new Ci(t.today,t.timeZone)),t.month&&(t.month=new Ci(t.month,t.timeZone)),t.defaultMonth&&(t.defaultMonth=new Ci(t.defaultMonth,t.timeZone)),t.startMonth&&(t.startMonth=new Ci(t.startMonth,t.timeZone)),t.endMonth&&(t.endMonth=new Ci(t.endMonth,t.timeZone)),"single"===t.mode&&t.selected?t.selected=new Ci(t.selected,t.timeZone):"multiple"===t.mode&&t.selected?t.selected=t.selected?.map(e=>new Ci(e,t.timeZone)):"range"===t.mode&&t.selected&&(t.selected={from:t.selected.from?new Ci(t.selected.from,t.timeZone):void 0,to:t.selected.to?new Ci(t.selected.to,t.timeZone):void 0}));const{components:n,formatters:r,labels:a,dateLib:i,locale:s,classNames:u}=f(()=>{const e={...es,...t.locale};return{dateLib:new Ps({locale:e,weekStartsOn:t.broadcastCalendar?1:t.weekStartsOn,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},t.dateLib),components:Zs(t.components),formatters:(n=t.formatters,n?.formatMonthCaption&&!n.formatCaption&&(n.formatCaption=n.formatMonthCaption),n?.formatYearCaption&&!n.formatYearDropdown&&(n.formatYearDropdown=n.formatYearCaption),{...rl,...n}),labels:{...ul,...t.labels},locale:e,classNames:{...Qs(),...t.classNames}};var n},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.components,t.formatters,t.labels,t.classNames]),{captionLayout:d,mode:p,navLayout:m,numberOfMonths:h=1,onDayBlur:g,onDayClick:v,onDayFocus:y,onDayKeyDown:b,onDayMouseEnter:w,onDayMouseLeave:x,onNextClick:k,onPrevClick:N,showWeekNumber:S,styles:C}=t,{formatCaption:_,formatDay:M,formatMonthDropdown:E,formatWeekNumber:O,formatWeekNumberHeader:D,formatWeekdayName:P,formatYearDropdown:T}=r,A=yl(t,i),{days:R,months:I,navStart:j,navEnd:z,previousMonth:L,nextMonth:F,goToMonth:B}=A,$=function(e,t,n,r,o){const{disabled:a,hidden:i,modifiers:s,showOutsideDays:l,broadcastCalendar:c,today:u}=t,{isSameDay:d,isSameMonth:f,startOfMonth:p,isBefore:m,endOfMonth:h,isAfter:g}=o,v=n&&p(n),y=r&&h(r),b={[zs.focused]:[],[zs.outside]:[],[zs.disabled]:[],[zs.hidden]:[],[zs.today]:[]},w={};for(const t of e){const{date:e,displayMonth:n}=t,r=Boolean(n&&!f(e,n)),p=Boolean(v&&m(e,v)),h=Boolean(y&&g(e,y)),x=Boolean(a&&Xs(e,a,o)),k=Boolean(i&&Xs(e,i,o))||p||h||!c&&!l&&r||c&&!1===l&&r,N=d(e,u??o.today());r&&b.outside.push(t),x&&b.disabled.push(t),k&&b.hidden.push(t),N&&b.today.push(t),s&&Object.keys(s).forEach(n=>{const r=s?.[n];r&&Xs(e,r,o)&&(w[n]?w[n].push(t):w[n]=[t])})}return e=>{const t={[zs.focused]:!1,[zs.disabled]:!1,[zs.hidden]:!1,[zs.outside]:!1,[zs.today]:!1},n={};for(const n in b){const r=b[n];t[n]=r.some(t=>t===e)}for(const t in w)n[t]=w[t].some(t=>t===e);return{...t,...n}}}(R,t,j,z,i),{isSelected:W,select:H,selected:U}=_l(t,i)??{},{blur:V,focused:Y,isFocusTarget:K,moveFocus:q,setFocused:G}=kl(t,A,$,W??(()=>!1),i),{labelDayButton:X,labelGridcell:Z,labelGrid:Q,labelMonthDropdown:J,labelNav:ee,labelPrevious:te,labelNext:ne,labelWeekday:re,labelWeekNumber:oe,labelWeekNumberHeader:ae,labelYearDropdown:ie}=a,se=f(()=>function(e,t){const n=e.today(),r=t?e.startOfISOWeek(n):e.startOfWeek(n),o=[];for(let t=0;t<7;t++){const n=e.addDays(r,t);o.push(n)}return o}(i,t.ISOWeek),[i,t.ISOWeek]),le=void 0!==p||void 0!==v,ce=l(()=>{L&&(B(L),N?.(L))},[L,B,N]),ue=l(()=>{F&&(B(F),k?.(F))},[B,F,k]),de=l((e,t)=>n=>{n.preventDefault(),n.stopPropagation(),G(e),H?.(e.date,t,n),v?.(e.date,t,n)},[H,v,G]),fe=l((e,t)=>n=>{G(e),y?.(e.date,t,n)},[y,G]),pe=l((e,t)=>n=>{V(),g?.(e.date,t,n)},[V,g]),me=l((e,n)=>r=>{const o={ArrowLeft:[r.shiftKey?"month":"day","rtl"===t.dir?"after":"before"],ArrowRight:[r.shiftKey?"month":"day","rtl"===t.dir?"before":"after"],ArrowDown:[r.shiftKey?"year":"week","after"],ArrowUp:[r.shiftKey?"year":"week","before"],PageUp:[r.shiftKey?"year":"month","before"],PageDown:[r.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(o[r.key]){r.preventDefault(),r.stopPropagation();const[e,t]=o[r.key];q(e,t)}b?.(e.date,n,r)},[q,b,t.dir]),he=l((e,t)=>n=>{w?.(e.date,t,n)},[w]),ge=l((e,t)=>n=>{x?.(e.date,t,n)},[x]),ve=l(e=>t=>{const n=Number(t.target.value),r=i.setMonth(i.startOfMonth(e),n);B(r)},[i,B]),ye=l(e=>t=>{const n=Number(t.target.value),r=i.setYear(i.startOfMonth(e),n);B(r)},[i,B]),{className:be,style:we}=f(()=>({className:[u[js.Root],t.className].filter(Boolean).join(" "),style:{...C?.[js.Root],...t.style}}),[u,t.className,t.style,C]),xe=function(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(([e,n])=>{e.startsWith("data-")&&(t[e]=n)}),t}(t),ke=c(null);hl(ke,Boolean(t.animate),{classNames:u,months:I,focused:Y,dateLib:i});const Ne={dayPickerProps:t,selected:U,select:H,isSelected:W,months:I,nextMonth:F,previousMonth:L,goToMonth:B,getModifiers:$,components:n,classNames:u,styles:C,labels:a,formatters:r};return o.createElement(Bs.Provider,{value:Ne},o.createElement(n.Root,{rootRef:t.animate?ke:void 0,className:be,style:we,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"],...xe},o.createElement(n.Months,{className:u[js.Months],style:C?.[js.Months]},!t.hideNavigation&&!m&&o.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:u[js.Nav],style:C?.[js.Nav],"aria-label":ee(),onPreviousClick:ce,onNextClick:ue,previousMonth:L,nextMonth:F}),I.map((e,a)=>o.createElement(n.Month,{"data-animated-month":t.animate?"true":void 0,className:u[js.Month],style:C?.[js.Month],key:a,displayIndex:a,calendarMonth:e},"around"===m&&!t.hideNavigation&&0===a&&o.createElement(n.PreviousMonthButton,{type:"button",className:u[js.PreviousMonthButton],tabIndex:L?void 0:-1,"aria-disabled":!L||void 0,"aria-label":te(L),onClick:ce,"data-animated-button":t.animate?"true":void 0},o.createElement(n.Chevron,{disabled:!L||void 0,className:u[js.Chevron],orientation:"rtl"===t.dir?"right":"left"})),o.createElement(n.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:u[js.MonthCaption],style:C?.[js.MonthCaption],calendarMonth:e,displayIndex:a},d?.startsWith("dropdown")?o.createElement(n.DropdownNav,{className:u[js.Dropdowns],style:C?.[js.Dropdowns]},(()=>{const a="dropdown"===d||"dropdown-months"===d?o.createElement(n.MonthsDropdown,{key:"month",className:u[js.MonthsDropdown],"aria-label":J(),classNames:u,components:n,disabled:Boolean(t.disableNavigation),onChange:ve(e.date),options:ol(e.date,j,z,r,i),style:C?.[js.Dropdown],value:i.getMonth(e.date)}):o.createElement("span",{key:"month"},E(e.date,i)),s="dropdown"===d||"dropdown-years"===d?o.createElement(n.YearsDropdown,{key:"year",className:u[js.YearsDropdown],"aria-label":ie(i.options),classNames:u,components:n,disabled:Boolean(t.disableNavigation),onChange:ye(e.date),options:al(j,z,r,i,Boolean(t.reverseYears)),style:C?.[js.Dropdown],value:i.getYear(e.date)}):o.createElement("span",{key:"year"},T(e.date,i));return"year-first"===i.getMonthYearOrder()?[s,a]:[a,s]})(),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.date,i.options,i))):o.createElement(n.CaptionLabel,{className:u[js.CaptionLabel],role:"status","aria-live":"polite"},_(e.date,i.options,i))),"around"===m&&!t.hideNavigation&&a===h-1&&o.createElement(n.NextMonthButton,{type:"button",className:u[js.NextMonthButton],tabIndex:F?void 0:-1,"aria-disabled":!F||void 0,"aria-label":ne(F),onClick:ue,"data-animated-button":t.animate?"true":void 0},o.createElement(n.Chevron,{disabled:!F||void 0,className:u[js.Chevron],orientation:"rtl"===t.dir?"left":"right"})),a===h-1&&"after"===m&&!t.hideNavigation&&o.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:u[js.Nav],style:C?.[js.Nav],"aria-label":ee(),onPreviousClick:ce,onNextClick:ue,previousMonth:L,nextMonth:F}),o.createElement(n.MonthGrid,{role:"grid","aria-multiselectable":"multiple"===p||"range"===p,"aria-label":Q(e.date,i.options,i)||void 0,className:u[js.MonthGrid],style:C?.[js.MonthGrid]},!t.hideWeekdays&&o.createElement(n.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:u[js.Weekdays],style:C?.[js.Weekdays]},S&&o.createElement(n.WeekNumberHeader,{"aria-label":ae(i.options),className:u[js.WeekNumberHeader],style:C?.[js.WeekNumberHeader],scope:"col"},D()),se.map(e=>o.createElement(n.Weekday,{"aria-label":re(e,i.options,i),className:u[js.Weekday],key:String(e),style:C?.[js.Weekday],scope:"col"},P(e,i.options,i)))),o.createElement(n.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:u[js.Weeks],style:C?.[js.Weeks]},e.weeks.map(e=>o.createElement(n.Week,{className:u[js.Week],key:e.weekNumber,style:C?.[js.Week],week:e},S&&o.createElement(n.WeekNumber,{week:e,style:C?.[js.WeekNumber],"aria-label":oe(e.weekNumber,{locale:s}),className:u[js.WeekNumber],scope:"row",role:"rowheader"},O(e.weekNumber,i)),e.days.map(e=>{const{date:r}=e,a=$(e);if(a[zs.focused]=!a.hidden&&Boolean(Y?.isEqualTo(e)),a[Ls.selected]=W?.(r)||a.selected,Vs(U)){const{from:e,to:t}=U;a[Ls.range_start]=Boolean(e&&t&&i.isSameDay(r,e)),a[Ls.range_end]=Boolean(e&&t&&i.isSameDay(r,t)),a[Ls.range_middle]=Hs(U,r,!0,i)}const s=function(e,t={},n={}){let r={...t?.[js.Day]};return Object.entries(e).filter(([,e])=>!0===e).forEach(([e])=>{r={...r,...n?.[e]}}),r}(a,C,t.modifiersStyles),l=function(e,t,n={}){return Object.entries(e).filter(([,e])=>!0===e).reduce((e,[r])=>(n[r]?e.push(n[r]):t[zs[r]]?e.push(t[zs[r]]):t[Ls[r]]&&e.push(t[Ls[r]]),e),[t[js.Day]])}(a,u,t.modifiersClassNames),c=le||a.hidden?void 0:Z(r,a,i.options,i);return o.createElement(n.Day,{key:`${i.format(r,"yyyy-MM-dd")}_${i.format(e.displayMonth,"yyyy-MM")}`,day:e,modifiers:a,className:l.join(" "),style:s,role:"gridcell","aria-selected":a.selected||void 0,"aria-label":c,"data-day":i.format(r,"yyyy-MM-dd"),"data-month":e.outside?i.format(r,"yyyy-MM"):void 0,"data-selected":a.selected||void 0,"data-disabled":a.disabled||void 0,"data-hidden":a.hidden||void 0,"data-outside":e.outside||void 0,"data-focused":a.focused||void 0,"data-today":a.today||void 0},!a.hidden&&le?o.createElement(n.DayButton,{className:u[js.DayButton],style:C?.[js.DayButton],type:"button",day:e,modifiers:a,disabled:a.disabled||void 0,tabIndex:K(e)?0:-1,"aria-label":X(r,a,i.options,i),onClick:de(e,a),onBlur:pe(e,a),onFocus:fe(e,a),onKeyDown:me(e,a),onMouseEnter:he(e,a),onMouseLeave:ge(e,a)},M(r,i.options,i)):!a.hidden&&M(e.date,i.options,i))})))))))),t.footer&&o.createElement(n.Footer,{className:u[js.Footer],style:C?.[js.Footer],role:"status","aria-live":"polite"},t.footer)))}function El({className:t,classNames:n,showOutsideDays:r=!0,captionLayout:o="label",buttonVariant:a="ghost",formatters:i,components:s,...l}){const c=Qs();return e(Ml,{showOutsideDays:r,className:vn("bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,t),captionLayout:o,formatters:{formatMonthDropdown:e=>e.toLocaleString("default",{month:"short"}),...i},classNames:{root:vn("w-fit",c.root),months:vn("flex gap-4 flex-col md:flex-row relative",c.months),month:vn("flex flex-col w-full gap-4",c.month),nav:vn("flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between",c.nav),button_previous:vn(ua({variant:a}),"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",c.button_previous),button_next:vn(ua({variant:a}),"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",c.button_next),month_caption:vn("flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)",c.month_caption),dropdowns:vn("w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5",c.dropdowns),dropdown_root:vn("relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md",c.dropdown_root),dropdown:vn("absolute bg-popover inset-0 opacity-0",c.dropdown),caption_label:vn("select-none font-medium","label"===o?"text-sm":"rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5",c.caption_label),table:"w-full border-collapse",weekdays:vn("flex",c.weekdays),weekday:vn("text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none",c.weekday),week:vn("flex w-full mt-2",c.week),week_number_header:vn("select-none w-(--cell-size)",c.week_number_header),week_number:vn("text-[0.8rem] select-none text-muted-foreground",c.week_number),day:vn("relative w-full h-full p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none",c.day),range_start:vn("rounded-l-md bg-accent",c.range_start),range_middle:vn("rounded-none",c.range_middle),range_end:vn("rounded-r-md bg-accent",c.range_end),today:vn("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",c.today),outside:vn("text-muted-foreground aria-selected:text-muted-foreground",c.outside),disabled:vn("text-muted-foreground opacity-50",c.disabled),hidden:vn("invisible",c.hidden),...n},components:{Root:({className:t,rootRef:n,...r})=>e("div",{"data-slot":"calendar",ref:n,className:vn(t),...r}),Chevron:({className:t,orientation:n,...r})=>e("left"===n?C:"right"===n?_:k,{className:vn("size-4",t),...r}),DayButton:Ol,WeekNumber:({children:t,...n})=>e("td",{...n,children:e("div",{className:"size-(--cell-size) flex items-center justify-center text-center",children:t})}),...s},...l})}function Ol({className:t,day:n,modifiers:o,...a}){const i=Qs(),s=r.useRef(null);return r.useEffect(()=>{o.focused&&s.current?.focus()},[o.focused]),e(da,{ref:s,variant:"ghost",size:"icon","data-day":n.date.toLocaleDateString(),"data-selected-single":o.selected&&!o.range_start&&!o.range_end&&!o.range_middle,"data-range-start":o.range_start,"data-range-end":o.range_end,"data-range-middle":o.range_middle,className:vn("data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground min-w-(--cell-size) flex aspect-square size-auto w-full flex-col gap-1 font-normal leading-none data-[range-end=true]:rounded-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-start=true]:rounded-l-md group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] [&>span]:text-xs [&>span]:opacity-70",i.day,t),...a})}function Dl({className:t,...n}){return e("div",{"data-slot":"card",className:vn("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",t),...n})}function Pl({className:t,...n}){return e("div",{"data-slot":"card-header",className:vn("@container/card-header has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6 grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6",t),...n})}function Tl({className:t,...n}){return e("div",{"data-slot":"card-title",className:vn("font-semibold leading-none",t),...n})}function Al({className:t,...n}){return e("div",{"data-slot":"card-description",className:vn("text-muted-foreground text-sm",t),...n})}function Rl({className:t,...n}){return e("div",{"data-slot":"card-action",className:vn("col-start-2 row-span-2 row-start-1 self-start justify-self-end",t),...n})}function Il({className:t,...n}){return e("div",{"data-slot":"card-content",className:vn("px-6",t),...n})}function jl({className:t,...n}){return e("div",{"data-slot":"card-footer",className:vn("[.border-t]:pt-6 flex items-center px-6",t),...n})}function zl(e){return function(e){return"[object Object]"===Object.prototype.toString.call(e)}(e)||Array.isArray(e)}function Ll(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;return JSON.stringify(Object.keys(e.breakpoints||{}))===JSON.stringify(Object.keys(t.breakpoints||{}))&&n.every(n=>{const r=e[n],o=t[n];return"function"==typeof r?`${r}`==`${o}`:zl(r)&&zl(o)?Ll(r,o):r===o})}function Fl(e){return e.concat().sort((e,t)=>e.name>t.name?1:-1).map(e=>e.options)}function Bl(e){return"number"==typeof e}function $l(e){return"string"==typeof e}function Wl(e){return"boolean"==typeof e}function Hl(e){return"[object Object]"===Object.prototype.toString.call(e)}function Ul(e){return Math.abs(e)}function Vl(e){return Math.sign(e)}function Yl(e,t){return Ul(e-t)}function Kl(e){return Ql(e).map(Number)}function ql(e){return e[Gl(e)]}function Gl(e){return Math.max(0,e.length-1)}function Xl(e,t){return t===Gl(e)}function Zl(e,t=0){return Array.from(Array(e),(e,n)=>t+n)}function Ql(e){return Object.keys(e)}function Jl(e,t){return[e,t].reduce((e,t)=>(Ql(t).forEach(n=>{const r=e[n],o=t[n],a=Hl(r)&&Hl(o);e[n]=a?Jl(r,o):o}),e),{})}function ec(e,t){return void 0!==t.MouseEvent&&e instanceof t.MouseEvent}function tc(){let e=[];const t={add:function(n,r,o,a={passive:!0}){let i;if("addEventListener"in n)n.addEventListener(r,o,a),i=()=>n.removeEventListener(r,o,a);else{const e=n;e.addListener(o),i=()=>e.removeListener(o)}return e.push(i),t},clear:function(){e=e.filter(e=>e())}};return t}function nc(e,t,n,r){const o=tc(),a=1e3/60;let i=null,s=0,l=0;function c(e){if(!l)return;i||(i=e,n(),n());const o=e-i;for(i=e,s+=o;s>=a;)n(),s-=a;r(s/a),l&&(l=t.requestAnimationFrame(c))}function u(){t.cancelAnimationFrame(l),i=null,s=0,l=0}return{init:function(){o.add(e,"visibilitychange",()=>{e.hidden&&(i=null,s=0)})},destroy:function(){u(),o.clear()},start:function(){l||(l=t.requestAnimationFrame(c))},stop:u,update:n,render:r}}function rc(e=0,t=0){const n=Ul(e-t);function r(t){return t<e}function o(e){return e>t}function a(e){return r(e)||o(e)}return{length:n,max:t,min:e,constrain:function(n){return a(n)?r(n)?e:t:n},reachedAny:a,reachedMax:o,reachedMin:r,removeOffset:function(e){return n?e-n*Math.ceil((e-t)/n):e}}}function oc(e,t,n){const{constrain:r}=rc(0,e),o=e+1;let a=i(t);function i(e){return n?Ul((o+e)%o):r(e)}function s(){return a}function l(){return oc(e,s(),n)}const c={get:s,set:function(e){return a=i(e),c},add:function(e){return l().set(s()+e)},clone:l};return c}function ac(e,t,n,r,o,a,i,s,l,c,u,d,f,p,m,h,g,v,y){const{cross:b,direction:w}=e,x=["INPUT","SELECT","TEXTAREA"],k={passive:!1},N=tc(),S=tc(),C=rc(50,225).constrain(p.measure(20)),_={mouse:300,touch:400},M={mouse:500,touch:600},E=m?43:25;let O=!1,D=0,P=0,T=!1,A=!1,R=!1,I=!1;function j(e){if(!ec(e,r)&&e.touches.length>=2)return z(e);const t=a.readPoint(e),n=a.readPoint(e,b),i=Yl(t,D),l=Yl(n,P);if(!A&&!I){if(!e.cancelable)return z(e);if(A=i>l,!A)return z(e)}const u=a.pointerMove(e);i>h&&(R=!0),c.useFriction(.3).useDuration(.75),s.start(),o.add(w(u)),e.preventDefault()}function z(e){const t=u.byDistance(0,!1).index!==d.get(),n=a.pointerUp(e)*(m?M:_)[I?"mouse":"touch"],r=function(e,t){const n=d.add(-1*Vl(e)),r=u.byDistance(e,!m).distance;return m||Ul(e)<C?r:g&&t?.5*r:u.byIndex(n.get(),0).distance}(w(n),t),o=function(e,t){if(0===e||0===t)return 0;if(Ul(e)<=Ul(t))return 0;const n=Yl(Ul(e),Ul(t));return Ul(n/e)}(n,r),i=E-10*o,s=v+o/50;A=!1,T=!1,S.clear(),c.useDuration(i).useFriction(s),l.distance(r,!m),I=!1,f.emit("pointerUp")}function L(e){R&&(e.stopPropagation(),e.preventDefault(),R=!1)}return{init:function(e){if(!y)return;function s(s){(Wl(y)||y(e,s))&&function(e){const s=ec(e,r);if(I=s,R=m&&s&&!e.buttons&&O,O=Yl(o.get(),i.get())>=2,s&&0!==e.button)return;if(function(e){const t=e.nodeName||"";return x.includes(t)}(e.target))return;T=!0,a.pointerDown(e),c.useFriction(0).useDuration(0),o.set(i),function(){const e=I?n:t;S.add(e,"touchmove",j,k).add(e,"touchend",z).add(e,"mousemove",j,k).add(e,"mouseup",z)}(),D=a.readPoint(e),P=a.readPoint(e,b),f.emit("pointerDown")}(s)}const l=t;N.add(l,"dragstart",e=>e.preventDefault(),k).add(l,"touchmove",()=>{},k).add(l,"touchend",()=>{}).add(l,"touchstart",s).add(l,"mousedown",s).add(l,"touchcancel",z).add(l,"contextmenu",z).add(l,"click",L,!0)},destroy:function(){N.clear(),S.clear()},pointerDown:function(){return T}}}function ic(e,t){let n,r;function o(e){return e.timeStamp}function a(n,r){const o="client"+("x"===(r||e.scroll)?"X":"Y");return(ec(n,t)?n:n.touches[0])[o]}return{pointerDown:function(e){return n=e,r=e,a(e)},pointerMove:function(e){const t=a(e)-a(r),i=o(e)-o(n)>170;return r=e,i&&(n=e),t},pointerUp:function(e){if(!n||!r)return 0;const t=a(r)-a(n),i=o(e)-o(n),s=o(e)-o(r)>170,l=t/i;return i&&!s&&Ul(l)>.1?l:0},readPoint:a}}function sc(e,t,n,r,o,a,i){const s=[e].concat(r);let l,c,u=[],d=!1;function f(e){return o.measureSize(i.measure(e))}return{init:function(o){a&&(c=f(e),u=r.map(f),l=new ResizeObserver(n=>{(Wl(a)||a(o,n))&&function(n){for(const a of n){if(d)return;const n=a.target===e,i=r.indexOf(a.target),s=n?c:u[i];if(Ul(f(n?e:r[i])-s)>=.5){o.reInit(),t.emit("resize");break}}}(n)}),n.requestAnimationFrame(()=>{s.forEach(e=>l.observe(e))}))},destroy:function(){d=!0,l&&l.disconnect()}}}function lc(e,t,n,r,o){const a=o.measure(10),i=o.measure(50),s=rc(.1,.99);let l=!1;function c(){return!l&&(!!e.reachedAny(n.get())&&!!e.reachedAny(t.get()))}return{shouldConstrain:c,constrain:function(o){if(!c())return;const l=e.reachedMin(t.get())?"min":"max",u=Ul(e[l]-t.get()),d=n.get()-t.get(),f=s.constrain(u/i);n.subtract(d*f),!o&&Ul(d)<a&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())},toggleActive:function(e){l=!e}}}function cc(e,t,n,r){const o=t.min+.1,a=t.max+.1,{reachedMin:i,reachedMax:s}=rc(o,a);return{loop:function(t){if(!function(e){return 1===e?s(n.get()):-1===e&&i(n.get())}(t))return;const o=e*(-1*t);r.forEach(e=>e.add(o))}}}function uc(e,t,n,r,o){const{reachedAny:a,removeOffset:i,constrain:s}=r;function l(e){return e.concat().sort((e,t)=>Ul(e)-Ul(t))[0]}function c(t,r){const o=[t,t+n,t-n];if(!e)return t;if(!r)return l(o);const a=o.filter(e=>Vl(e)===r);return a.length?l(a):ql(o)-n}const u={byDistance:function(n,r){const l=o.get()+n,{index:u,distance:d}=function(n){const r=e?i(n):s(n),o=t.map((e,t)=>({diff:c(e-r,0),index:t})).sort((e,t)=>Ul(e.diff)-Ul(t.diff)),{index:a}=o[0];return{index:a,distance:r}}(l),f=!e&&a(l);return!r||f?{index:u,distance:n}:{index:u,distance:n+c(t[u]-d,0)}},byIndex:function(e,n){return{index:e,distance:c(t[e]-o.get(),n)}},shortcut:c};return u}function dc(e,t,n,r,o,a,i,s){const l={passive:!0,capture:!0};let c=0;function u(e){"Tab"===e.code&&(c=(new Date).getTime())}const d={init:function(d){s&&(a.add(document,"keydown",u,!1),t.forEach((t,u)=>{a.add(t,"focus",t=>{(Wl(s)||s(d,t))&&function(t){if((new Date).getTime()-c>10)return;i.emit("slideFocusStart"),e.scrollLeft=0;const a=n.findIndex(e=>e.includes(t));Bl(a)&&(o.useDuration(0),r.index(a,0),i.emit("slideFocus"))}(u)},l)}))}};return d}function fc(e){let t=e;function n(e){return Bl(e)?e:e.get()}return{get:function(){return t},set:function(e){t=n(e)},add:function(e){t+=n(e)},subtract:function(e){t-=n(e)}}}function pc(e,t){const n="x"===e.scroll?function(e){return`translate3d(${e}px,0px,0px)`}:function(e){return`translate3d(0px,${e}px,0px)`},r=t.style;let o=null,a=!1;return{clear:function(){a||(r.transform="",t.getAttribute("style")||t.removeAttribute("style"))},to:function(t){if(a)return;const i=(s=e.direction(t),Math.round(100*s)/100);var s;i!==o&&(r.transform=n(i),o=i)},toggleActive:function(e){a=!e}}}function mc(e,t,n,r,o,a,i,s,l){const c=Kl(o),u=Kl(o).reverse(),d=function(){const e=i[0];return m(p(u,e),n,!1)}().concat(function(){const e=t-i[0]-1;return m(p(c,e),-n,!0)}());function f(e,t){return e.reduce((e,t)=>e-o[t],t)}function p(e,t){return e.reduce((e,n)=>f(e,t)>0?e.concat([n]):e,[])}function m(o,i,c){const u=function(e){return a.map((n,o)=>({start:n-r[o]+.5+e,end:n+t-.5+e}))}(i);return o.map(t=>{const r=c?0:-n,o=c?n:0,a=c?"end":"start",i=u[t][a];return{index:t,loopPoint:i,slideLocation:fc(-1),translate:pc(e,l[t]),target:()=>s.get()>i?r:o}})}const h={canLoop:function(){return d.every(({index:e})=>f(c.filter(t=>t!==e),t)<=.1)},clear:function(){d.forEach(e=>e.translate.clear())},loop:function(){d.forEach(e=>{const{target:t,translate:n,slideLocation:r}=e,o=t();o!==r.get()&&(n.to(o),r.set(o))})},loopPoints:d};return h}function hc(e,t,n){let r,o=!1;return{init:function(a){n&&(r=new MutationObserver(e=>{o||(Wl(n)||n(a,e))&&function(e){for(const n of e)if("childList"===n.type){a.reInit(),t.emit("slidesChanged");break}}(e)}),r.observe(e,{childList:!0}))},destroy:function(){r&&r.disconnect(),o=!0}}}function gc(e,t,n,r){const o={};let a,i=null,s=null,l=!1;const c={init:function(){a=new IntersectionObserver(e=>{l||(e.forEach(e=>{const n=t.indexOf(e.target);o[n]=e}),i=null,s=null,n.emit("slidesInView"))},{root:e.parentElement,threshold:r}),t.forEach(e=>a.observe(e))},destroy:function(){a&&a.disconnect(),l=!0},get:function(e=!0){if(e&&i)return i;if(!e&&s)return s;const t=function(e){return Ql(o).reduce((t,n)=>{const r=parseInt(n),{isIntersecting:a}=o[r];return(e&&a||!e&&!a)&&t.push(r),t},[])}(e);return e&&(i=t),e||(s=t),t}};return c}function vc(e,t,n,r,o,a,i,s,l){const{startEdge:c,endEdge:u,direction:d}=e,f=Bl(n);const p={groupSlides:function(e){return f?function(e,t){return Kl(e).filter(e=>e%t===0).map(n=>e.slice(n,n+t))}(e,n):function(e){return e.length?Kl(e).reduce((n,f,p)=>{const m=ql(n)||0,h=0===m,g=f===Gl(e),v=o[c]-a[m][c],y=o[c]-a[f][u],b=!r&&h?d(i):0,w=Ul(y-(!r&&g?d(s):0)-(v+b));return p&&w>t+l&&n.push(f),g&&n.push(e.length),n},[]).map((t,n,r)=>{const o=Math.max(r[n-1]||0);return e.slice(o,t)}):[]}(e)}};return p}function yc(e,t,n,r,o,a,i){const{align:s,axis:l,direction:c,startIndex:u,loop:d,duration:f,dragFree:p,dragThreshold:m,inViewThreshold:h,slidesToScroll:g,skipSnaps:v,containScroll:y,watchResize:b,watchSlides:w,watchDrag:x,watchFocus:k}=a,N={measure:function(e){const{offsetTop:t,offsetLeft:n,offsetWidth:r,offsetHeight:o}=e;return{top:t,right:n+r,bottom:t+o,left:n,width:r,height:o}}},S=N.measure(t),C=n.map(N.measure),_=function(e,t){const n="rtl"===t,r="y"===e,o=!r&&n?-1:1;return{scroll:r?"y":"x",cross:r?"x":"y",startEdge:r?"top":n?"right":"left",endEdge:r?"bottom":n?"left":"right",measureSize:function(e){const{height:t,width:n}=e;return r?t:n},direction:function(e){return e*o}}}(l,c),M=_.measureSize(S),E=function(e){return{measure:function(t){return e*(t/100)}}}(M),O=function(e,t){const n={start:function(){return 0},center:function(e){return r(e)/2},end:r};function r(e){return t-e}const o={measure:function(r,o){return $l(e)?n[e](r):e(t,r,o)}};return o}(s,M),D=!d&&!!y,P=d||!!y,{slideSizes:T,slideSizesWithGaps:A,startGap:R,endGap:I}=function(e,t,n,r,o,a){const{measureSize:i,startEdge:s,endEdge:l}=e,c=n[0]&&o,u=function(){if(!c)return 0;const e=n[0];return Ul(t[s]-e[s])}(),d=function(){if(!c)return 0;const e=a.getComputedStyle(ql(r));return parseFloat(e.getPropertyValue(`margin-${l}`))}(),f=n.map(i),p=n.map((e,t,n)=>{const r=!t,o=Xl(n,t);return r?f[t]+u:o?f[t]+d:n[t+1][s]-e[s]}).map(Ul);return{slideSizes:f,slideSizesWithGaps:p,startGap:u,endGap:d}}(_,S,C,n,P,o),j=vc(_,M,g,d,S,C,R,I,2),{snaps:z,snapsAligned:L}=function(e,t,n,r,o){const{startEdge:a,endEdge:i}=e,{groupSlides:s}=o,l=s(r).map(e=>ql(e)[i]-e[0][a]).map(Ul).map(t.measure),c=r.map(e=>n[a]-e[a]).map(e=>-Ul(e)),u=s(c).map(e=>e[0]).map((e,t)=>e+l[t]);return{snaps:c,snapsAligned:u}}(_,O,S,C,j),F=-ql(z)+ql(A),{snapsContained:B,scrollContainLimit:$}=function(e,t,n,r,o){const a=rc(-t+e,0),i=n.map((e,t)=>{const{min:r,max:o}=a,i=a.constrain(e),s=!t,l=Xl(n,t);return s?o:l||c(r,i)?r:c(o,i)?o:i}).map(e=>parseFloat(e.toFixed(3))),s=function(){const e=i[0],t=ql(i);return rc(i.lastIndexOf(e),i.indexOf(t)+1)}(),l=function(){if(t<=e+o)return[a.max];if("keepSnaps"===r)return i;const{min:n,max:l}=s;return i.slice(n,l)}();function c(e,t){return Yl(e,t)<=1}return{snapsContained:l,scrollContainLimit:s}}(M,F,L,y,2),W=D?B:L,{limit:H}=function(e,t,n){const r=t[0];return{limit:rc(n?r-e:ql(t),r)}}(F,W,d),U=oc(Gl(W),u,d),V=U.clone(),Y=Kl(n),K=nc(r,o,()=>(({dragHandler:e,scrollBody:t,scrollBounds:n,options:{loop:r}})=>{r||n.constrain(e.pointerDown()),t.seek()})(se),e=>(({scrollBody:e,translate:t,location:n,offsetLocation:r,previousLocation:o,scrollLooper:a,slideLooper:i,dragHandler:s,animation:l,eventHandler:c,scrollBounds:u,options:{loop:d}},f)=>{const p=e.settled(),m=!u.shouldConstrain(),h=d?p:p&&m,g=h&&!s.pointerDown();g&&l.stop();const v=n.get()*f+o.get()*(1-f);r.set(v),d&&(a.loop(e.direction()),i.loop()),t.to(r.get()),g&&c.emit("settle"),h||c.emit("scroll")})(se,e)),q=W[U.get()],G=fc(q),X=fc(q),Z=fc(q),Q=fc(q),J=function(e,t,n,r,o,a){let i=0,s=0,l=o,c=a,u=e.get(),d=0;function f(e){return l=e,m}function p(e){return c=e,m}const m={direction:function(){return s},duration:function(){return l},velocity:function(){return i},seek:function(){const t=r.get()-e.get();let o=0;return l?(n.set(e),i+=t/l,i*=c,u+=i,e.add(i),o=u-d):(i=0,n.set(r),e.set(r),o=t),s=Vl(o),d=u,m},settled:function(){return Ul(r.get()-t.get())<.001},useBaseFriction:function(){return p(a)},useBaseDuration:function(){return f(o)},useFriction:p,useDuration:f};return m}(G,Z,X,Q,f,.68),ee=uc(d,W,F,H,Q),te=function(e,t,n,r,o,a,i){function s(o){const s=o.distance,l=o.index!==t.get();a.add(s),s&&(r.duration()?e.start():(e.update(),e.render(1),e.update())),l&&(n.set(t.get()),t.set(o.index),i.emit("select"))}return{distance:function(e,t){s(o.byDistance(e,t))},index:function(e,n){const r=t.clone().set(e);s(o.byIndex(r.get(),n))}}}(K,U,V,J,ee,Q,i),ne=function(e){const{max:t,length:n}=e;return{get:function(e){return n?(e-t)/-n:0}}}(H),re=tc(),oe=gc(t,n,i,h),{slideRegistry:ae}=function(e,t,n,r,o,a){const{groupSlides:i}=o,{min:s,max:l}=r,c=function(){const r=i(a),o=!e||"keepSnaps"===t;return 1===n.length?[a]:o?r:r.slice(s,l).map((e,t,n)=>{const r=!t,o=Xl(n,t);return r?Zl(ql(n[0])+1):o?Zl(Gl(a)-ql(n)[0]+1,ql(n)[0]):e})}();return{slideRegistry:c}}(D,y,W,$,j,Y),ie=dc(e,n,ae,te,J,re,i,k),se={ownerDocument:r,ownerWindow:o,eventHandler:i,containerRect:S,slideRects:C,animation:K,axis:_,dragHandler:ac(_,e,r,o,Q,ic(_,o),G,K,te,J,ee,U,i,E,p,m,v,.68,x),eventStore:re,percentOfView:E,index:U,indexPrevious:V,limit:H,location:G,offsetLocation:Z,previousLocation:X,options:a,resizeHandler:sc(t,i,o,n,_,b,N),scrollBody:J,scrollBounds:lc(H,Z,Q,J,E),scrollLooper:cc(F,H,Z,[G,Z,X,Q]),scrollProgress:ne,scrollSnapList:W.map(ne.get),scrollSnaps:W,scrollTarget:ee,scrollTo:te,slideLooper:mc(_,M,F,T,A,z,W,Z,n),slideFocus:ie,slidesHandler:hc(t,i,w),slidesInView:oe,slideIndexes:Y,slideRegistry:ae,slidesToScroll:j,target:Q,translate:pc(_,t)};return se}!function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"}(bl||(bl={}));const bc={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function wc(e){function t(e,t){return Jl(e,t||{})}const n={mergeOptions:t,optionsAtMedia:function(n){const r=n.breakpoints||{},o=Ql(r).filter(t=>e.matchMedia(t).matches).map(e=>r[e]).reduce((e,n)=>t(e,n),{});return t(n,o)},optionsMediaQueries:function(t){return t.map(e=>Ql(e.breakpoints||{})).reduce((e,t)=>e.concat(t),[]).map(e.matchMedia)}};return n}function xc(e,t,n){const r=e.ownerDocument,o=r.defaultView,a=wc(o),i=function(e){let t=[];const n={init:function(n,r){return t=r.filter(({options:t})=>!1!==e.optionsAtMedia(t).active),t.forEach(t=>t.init(n,e)),r.reduce((e,t)=>Object.assign(e,{[t.name]:t}),{})},destroy:function(){t=t.filter(e=>e.destroy())}};return n}(a),s=tc(),l=function(){let e,t={};function n(e){return t[e]||[]}const r={init:function(t){e=t},emit:function(t){return n(t).forEach(n=>n(e,t)),r},off:function(e,o){return t[e]=n(e).filter(e=>e!==o),r},on:function(e,o){return t[e]=n(e).concat([o]),r},clear:function(){t={}}};return r}(),{mergeOptions:c,optionsAtMedia:u,optionsMediaQueries:d}=a,{on:f,off:p,emit:m}=l,h=_;let g,v,y,b,w=!1,x=c(bc,xc.globalOptions),k=c(x),N=[];function S(t){const n=yc(e,y,b,r,o,t,l);if(t.loop&&!n.slideLooper.canLoop()){return S(Object.assign({},t,{loop:!1}))}return n}function C(t,n){w||(x=c(x,t),k=u(x),N=n||N,function(){const{container:t,slides:n}=k,r=$l(t)?e.querySelector(t):t;y=r||e.children[0];const o=$l(n)?y.querySelectorAll(n):n;b=[].slice.call(o||y.children)}(),g=S(k),d([x,...N.map(({options:e})=>e)]).forEach(e=>s.add(e,"change",_)),k.active&&(g.translate.to(g.location.get()),g.animation.init(),g.slidesInView.init(),g.slideFocus.init(D),g.eventHandler.init(D),g.resizeHandler.init(D),g.slidesHandler.init(D),g.options.loop&&g.slideLooper.loop(),y.offsetParent&&b.length&&g.dragHandler.init(D),v=i.init(D,N)))}function _(e,t){const n=O();M(),C(c({startIndex:n},e),t),l.emit("reInit")}function M(){g.dragHandler.destroy(),g.eventStore.clear(),g.translate.clear(),g.slideLooper.clear(),g.resizeHandler.destroy(),g.slidesHandler.destroy(),g.slidesInView.destroy(),g.animation.destroy(),i.destroy(),s.clear()}function E(e,t,n){k.active&&!w&&(g.scrollBody.useBaseFriction().useDuration(!0===t?0:k.duration),g.scrollTo.index(e,n||0))}function O(){return g.index.get()}const D={canScrollNext:function(){return g.index.add(1).get()!==O()},canScrollPrev:function(){return g.index.add(-1).get()!==O()},containerNode:function(){return y},internalEngine:function(){return g},destroy:function(){w||(w=!0,s.clear(),M(),l.emit("destroy"),l.clear())},off:p,on:f,emit:m,plugins:function(){return v},previousScrollSnap:function(){return g.indexPrevious.get()},reInit:h,rootNode:function(){return e},scrollNext:function(e){E(g.index.add(1).get(),e,-1)},scrollPrev:function(e){E(g.index.add(-1).get(),e,1)},scrollProgress:function(){return g.scrollProgress.get(g.offsetLocation.get())},scrollSnapList:function(){return g.scrollSnapList},scrollTo:E,selectedScrollSnap:O,slideNodes:function(){return b},slidesInView:function(){return g.slidesInView.get()},slidesNotInView:function(){return g.slidesInView.get(!1)}};return C(t,n),setTimeout(()=>l.emit("init"),0),D}function kc(e={},t=[]){const n=c(e),r=c(t),[o,i]=a(),[s,u]=a(),f=l(()=>{o&&o.reInit(n.current,r.current)},[o]);return d(()=>{Ll(n.current,e)||(n.current=e,f())},[e,f]),d(()=>{(function(e,t){if(e.length!==t.length)return!1;const n=Fl(e),r=Fl(t);return n.every((e,t)=>Ll(e,r[t]))})(r.current,t)||(r.current=t,f())},[t,f]),d(()=>{if("undefined"!=typeof window&&window.document&&window.document.createElement&&s){xc.globalOptions=kc.globalOptions;const e=xc(s,n.current,r.current);return i(e),()=>e.destroy()}i(void 0)},[s,i]),[u,o]}xc.globalOptions=void 0,kc.globalOptions=void 0;const Nc=r.createContext(null);function Sc(){const e=r.useContext(Nc);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}function Cc({orientation:t="horizontal",opts:n,setApi:o,plugins:a,className:i,children:s,...l}){const[c,u]=kc({...n,axis:"horizontal"===t?"x":"y"},a),[d,f]=r.useState(!1),[p,m]=r.useState(!1),h=r.useCallback(e=>{e&&(f(e.canScrollPrev()),m(e.canScrollNext()))},[]),g=r.useCallback(()=>{u?.scrollPrev()},[u]),v=r.useCallback(()=>{u?.scrollNext()},[u]),y=r.useCallback(e=>{"ArrowLeft"===e.key?(e.preventDefault(),g()):"ArrowRight"===e.key&&(e.preventDefault(),v())},[g,v]);return r.useEffect(()=>{u&&o&&o(u)},[u,o]),r.useEffect(()=>{if(u)return h(u),u.on("reInit",h),u.on("select",h),()=>{u?.off("select",h)}},[u,h]),e(Nc.Provider,{value:{carouselRef:c,api:u,opts:n,orientation:t||("y"===n?.axis?"vertical":"horizontal"),scrollPrev:g,scrollNext:v,canScrollPrev:d,canScrollNext:p},children:e("div",{onKeyDownCapture:y,className:vn("relative",i),role:"region","aria-roledescription":"carousel","data-slot":"carousel",...l,children:s})})}function _c({className:t,...n}){const{carouselRef:r,orientation:o}=Sc();return e("div",{ref:r,className:"overflow-hidden","data-slot":"carousel-content",children:e("div",{className:vn("flex","horizontal"===o?"-ml-4":"-mt-4 flex-col",t),...n})})}function Mc({className:t,...n}){const{orientation:r}=Sc();return e("div",{role:"group","aria-roledescription":"slide","data-slot":"carousel-item",className:vn("min-w-0 shrink-0 grow-0 basis-full","horizontal"===r?"pl-4":"pt-4",t),...n})}function Ec({className:t,variant:r="outline",size:o="icon",...a}){const{orientation:i,scrollPrev:s,canScrollPrev:l}=Sc();return n(da,{"data-slot":"carousel-previous",variant:r,size:o,className:vn("absolute size-8 rounded-full","horizontal"===i?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",t),disabled:!l,onClick:s,...a,children:[e(M,{}),e("span",{className:"sr-only",children:"Previous slide"})]})}function Oc({className:t,variant:r="outline",size:o="icon",...a}){const{orientation:i,scrollNext:s,canScrollNext:l}=Sc();return n(da,{"data-slot":"carousel-next",variant:r,size:o,className:vn("absolute size-8 rounded-full","horizontal"===i?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",t),disabled:!l,onClick:s,...a,children:[e(E,{}),e("span",{className:"sr-only",children:"Next slide"})]})}var Dc=["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 Pc(e){return"string"==typeof e&&Dc.includes(e)}var Tc=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"];function Ac(e){return"string"==typeof e&&Tc.includes(e)}function Rc(e){return"string"==typeof e&&e.startsWith("data-")}function Ic(e){var t=Object.entries(e).filter(e=>{var[t]=e;return Ac(t)||Rc(t)});return Object.fromEntries(t)}function jc(e){var t=Object.entries(e).filter(e=>{var[t]=e;return Ac(t)||Rc(t)||Pc(t)});return Object.fromEntries(t)}var zc=["children","width","height","viewBox","className","style","title","desc"];function Lc(){return Lc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lc.apply(null,arguments)}var Fc=m((e,t)=>{var{children:n,width:o,height:a,viewBox:i,className:s,style:l,title:c,desc:u}=e,d=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,zc),f=i||{width:o,height:a,x:0,y:0},p=ct("recharts-surface",s);return r.createElement("svg",Lc({},jc(d),{className:p,width:o,height:a,style:l,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height),ref:t}),r.createElement("title",null,c),r.createElement("desc",null,u),n)}),Bc=i(null);function $c(e){return function(){return e}}const Wc=Math.cos,Hc=Math.sin,Uc=Math.sqrt,Vc=Math.PI,Yc=2*Vc,Kc=Math.PI,qc=2*Kc,Gc=1e-6,Xc=qc-Gc;function Zc(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}class Qc{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?Zc:function(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Zc;const n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,o,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+o},${this._y1=+a}`}arcTo(e,t,n,r,o){if(e=+e,t=+t,n=+n,r=+r,(o=+o)<0)throw new Error(`negative radius: ${o}`);let a=this._x1,i=this._y1,s=n-e,l=r-t,c=a-e,u=i-t,d=c*c+u*u;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(d>Gc)if(Math.abs(u*s-l*c)>Gc&&o){let f=n-a,p=r-i,m=s*s+l*l,h=f*f+p*p,g=Math.sqrt(m),v=Math.sqrt(d),y=o*Math.tan((Kc-Math.acos((m+d-h)/(2*g*v)))/2),b=y/v,w=y/g;Math.abs(b-1)>Gc&&this._append`L${e+b*c},${t+b*u}`,this._append`A${o},${o},0,0,${+(u*f>c*p)},${this._x1=e+w*s},${this._y1=t+w*l}`}else this._append`L${this._x1=e},${this._y1=t}`;else;}arc(e,t,n,r,o,a){if(e=+e,t=+t,a=!!a,(n=+n)<0)throw new Error(`negative radius: ${n}`);let i=n*Math.cos(r),s=n*Math.sin(r),l=e+i,c=t+s,u=1^a,d=a?r-o:o-r;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Gc||Math.abs(this._y1-c)>Gc)&&this._append`L${l},${c}`,n&&(d<0&&(d=d%qc+qc),d>Xc?this._append`A${n},${n},0,1,${u},${e-i},${t-s}A${n},${n},0,1,${u},${this._x1=l},${this._y1=c}`:d>Gc&&this._append`A${n},${n},0,${+(d>=Kc)},${u},${this._x1=e+n*Math.cos(o)},${this._y1=t+n*Math.sin(o)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function Jc(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{const e=Math.floor(n);if(!(e>=0))throw new RangeError(`invalid digits: ${n}`);t=e}return e},()=>new Qc(t)}function eu(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function tu(e){this._context=e}function nu(e){return new tu(e)}function ru(e){return e[0]}function ou(e){return e[1]}function au(e,t){var n=$c(!0),r=null,o=nu,a=null,i=Jc(s);function s(s){var l,c,u,d=(s=eu(s)).length,f=!1;for(null==r&&(a=o(u=i())),l=0;l<=d;++l)!(l<d&&n(c=s[l],l,s))===f&&((f=!f)?a.lineStart():a.lineEnd()),f&&a.point(+e(c,l,s),+t(c,l,s));if(u)return a=null,u+""||null}return e="function"==typeof e?e:void 0===e?ru:$c(e),t="function"==typeof t?t:void 0===t?ou:$c(t),s.x=function(t){return arguments.length?(e="function"==typeof t?t:$c(+t),s):e},s.y=function(e){return arguments.length?(t="function"==typeof e?e:$c(+e),s):t},s.defined=function(e){return arguments.length?(n="function"==typeof e?e:$c(!!e),s):n},s.curve=function(e){return arguments.length?(o=e,null!=r&&(a=o(r)),s):o},s.context=function(e){return arguments.length?(null==e?r=a=null:a=o(r=e),s):r},s}function iu(e,t,n){var r=null,o=$c(!0),a=null,i=nu,s=null,l=Jc(c);function c(c){var u,d,f,p,m,h=(c=eu(c)).length,g=!1,v=new Array(h),y=new Array(h);for(null==a&&(s=i(m=l())),u=0;u<=h;++u){if(!(u<h&&o(p=c[u],u,c))===g)if(g=!g)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(v[f],y[f]);s.lineEnd(),s.areaEnd()}g&&(v[u]=+e(p,u,c),y[u]=+t(p,u,c),s.point(r?+r(p,u,c):v[u],n?+n(p,u,c):y[u]))}if(m)return s=null,m+""||null}function u(){return au().defined(o).curve(i).context(a)}return e="function"==typeof e?e:void 0===e?ru:$c(+e),t="function"==typeof t?t:$c(void 0===t?0:+t),n="function"==typeof n?n:void 0===n?ou:$c(+n),c.x=function(t){return arguments.length?(e="function"==typeof t?t:$c(+t),r=null,c):e},c.x0=function(t){return arguments.length?(e="function"==typeof t?t:$c(+t),c):e},c.x1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:$c(+e),c):r},c.y=function(e){return arguments.length?(t="function"==typeof e?e:$c(+e),n=null,c):t},c.y0=function(e){return arguments.length?(t="function"==typeof e?e:$c(+e),c):t},c.y1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:$c(+e),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(e){return arguments.length?(o="function"==typeof e?e:$c(!!e),c):o},c.curve=function(e){return arguments.length?(i=e,null!=a&&(s=i(a)),c):i},c.context=function(e){return arguments.length?(null==e?a=s=null:s=i(a=e),c):a},c}tu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};class su{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}}var lu={draw(e,t){const n=Uc(t/Vc);e.moveTo(n,0),e.arc(0,0,n,0,Yc)}},cu={draw(e,t){const n=Uc(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}};const uu=Uc(1/3),du=2*uu;var fu={draw(e,t){const n=Uc(t/du),r=n*uu;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},pu={draw(e,t){const n=Uc(t),r=-n/2;e.rect(r,r,n,n)}};const mu=Hc(Vc/10)/Hc(7*Vc/10),hu=Hc(Yc/10)*mu,gu=-Wc(Yc/10)*mu;var vu={draw(e,t){const n=Uc(.8908130915292852*t),r=hu*n,o=gu*n;e.moveTo(0,-n),e.lineTo(r,o);for(let t=1;t<5;++t){const a=Yc*t/5,i=Wc(a),s=Hc(a);e.lineTo(s*n,-i*n),e.lineTo(i*r-s*o,s*r+i*o)}e.closePath()}};const yu=Uc(3);var bu={draw(e,t){const n=-Uc(t/(3*yu));e.moveTo(0,2*n),e.lineTo(-yu*n,-n),e.lineTo(yu*n,-n),e.closePath()}};const wu=-.5,xu=Uc(3)/2,ku=1/Uc(12),Nu=3*(ku/2+1);var Su={draw(e,t){const n=Uc(t/Nu),r=n/2,o=n*ku,a=r,i=n*ku+n,s=-a,l=i;e.moveTo(r,o),e.lineTo(a,i),e.lineTo(s,l),e.lineTo(wu*r-xu*o,xu*r+wu*o),e.lineTo(wu*a-xu*i,xu*a+wu*i),e.lineTo(wu*s-xu*l,xu*s+wu*l),e.lineTo(wu*r+xu*o,wu*o-xu*r),e.lineTo(wu*a+xu*i,wu*i-xu*a),e.lineTo(wu*s+xu*l,wu*l-xu*s),e.closePath()}};function Cu(){}function _u(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function Mu(e){this._context=e}function Eu(e){this._context=e}function Ou(e){this._context=e}function Du(e){this._context=e}function Pu(e){return e<0?-1:1}function Tu(e,t,n){var r=e._x1-e._x0,o=t-e._x1,a=(e._y1-e._y0)/(r||o<0&&-0),i=(n-e._y1)/(o||r<0&&-0),s=(a*o+i*r)/(r+o);return(Pu(a)+Pu(i))*Math.min(Math.abs(a),Math.abs(i),.5*Math.abs(s))||0}function Au(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Ru(e,t,n){var r=e._x0,o=e._y0,a=e._x1,i=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,o+s*t,a-s,i-s*n,a,i)}function Iu(e){this._context=e}function ju(e){this._context=new zu(e)}function zu(e){this._context=e}function Lu(e){this._context=e}function Fu(e){var t,n,r=e.length-1,o=new Array(r),a=new Array(r),i=new Array(r);for(o[0]=0,a[0]=2,i[0]=e[0]+2*e[1],t=1;t<r-1;++t)o[t]=1,a[t]=4,i[t]=4*e[t]+2*e[t+1];for(o[r-1]=2,a[r-1]=7,i[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=o[t]/a[t-1],a[t]-=n,i[t]-=n*i[t-1];for(o[r-1]=i[r-1]/a[r-1],t=r-2;t>=0;--t)o[t]=(i[t]-o[t+1])/a[t];for(a[r-1]=(e[r]+o[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-o[t+1];return[o,a]}function Bu(e,t){this._context=e,this._t=t}function $u(e,t){if((o=e.length)>1)for(var n,r,o,a=1,i=e[t[0]],s=i.length;a<o;++a)for(r=i,i=e[t[a]],n=0;n<s;++n)i[n][1]+=i[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function Wu(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function Hu(e,t){return e[t]}function Uu(e){const t=[];return t.key=e,t}Mu.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:_u(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:_u(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},Eu.prototype={areaStart:Cu,areaEnd:Cu,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:_u(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},Ou.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:_u(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},Du.prototype={areaStart:Cu,areaEnd:Cu,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))}},Iu.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:Ru(this,this._t0,Au(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Ru(this,Au(this,n=Tu(this,e,t)),n);break;default:Ru(this,this._t0,n=Tu(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(ju.prototype=Object.create(Iu.prototype)).point=function(e,t){Iu.prototype.point.call(this,t,e)},zu.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,o,a){this._context.bezierCurveTo(t,e,r,n,a,o)}},Lu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=Fu(e),o=Fu(t),a=0,i=1;i<n;++a,++i)this._context.bezierCurveTo(r[0][a],o[0][a],r[1][a],o[1][a],e[i],t[i]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},Bu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};var Vu,Yu={},Ku={};function qu(){return Vu||(Vu=1,e=Ku,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isUnsafeProperty=function(e){return"__proto__"===e}),Ku;var e}var Gu,Xu={};function Zu(){return Gu||(Gu=1,e=Xu,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isDeepKey=function(e){switch(typeof e){case"number":case"symbol":return!1;case"string":return e.includes(".")||e.includes("[")||e.includes("]")}}),Xu;var e}var Qu,Ju={};function ed(){return Qu||(Qu=1,e=Ju,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.toKey=function(e){return"string"==typeof e||"symbol"==typeof e?e:Object.is(e?.valueOf?.(),-0)?"-0":String(e)}),Ju;var e}var td,nd,rd,od,ad,id={},sd={};function ld(){return td||(td=1,e=sd,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.toString=function e(t){if(null==t)return"";if("string"==typeof t)return t;if(Array.isArray(t))return t.map(e).join(",");const n=String(t);return"0"===n&&Object.is(Number(t),-0)?"-0":n}),sd;var e}function cd(){return nd||(nd=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ld(),n=ed();e.toPath=function(e){if(Array.isArray(e))return e.map(n.toKey);if("symbol"==typeof e)return[e];const r=[],o=(e=t.toString(e)).length;if(0===o)return r;let a=0,i="",s="",l=!1;for(46===e.charCodeAt(0)&&(r.push(""),a++);a<o;){const t=e[a];s?"\\"===t&&a+1<o?(a++,i+=e[a]):t===s?s="":i+=t:l?'"'===t||"'"===t?s=t:"]"===t?(l=!1,r.push(i),i=""):i+=t:"["===t?(l=!0,i&&(r.push(i),i="")):"."===t?i&&(r.push(i),i=""):i+=t,a++}return i&&r.push(i),r}}(id)),id}function ud(){return rd||(rd=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=qu(),n=Zu(),r=ed(),o=cd();e.get=function e(a,i,s){if(null==a)return s;switch(typeof i){case"string":{if(t.isUnsafeProperty(i))return s;const r=a[i];return void 0===r?n.isDeepKey(i)?e(a,o.toPath(i),s):s:r}case"number":case"symbol":{"number"==typeof i&&(i=r.toKey(i));const e=a[i];return void 0===e?s:e}default:{if(Array.isArray(i))return function(e,n,r){if(0===n.length)return r;let o=e;for(let e=0;e<n.length;e++){if(null==o)return r;if(t.isUnsafeProperty(n[e]))return r;o=o[n[e]]}if(void 0===o)return r;return o}(a,i,s);if(i=Object.is(i?.valueOf(),-0)?"-0":String(i),t.isUnsafeProperty(i))return s;const e=a[i];return void 0===e?s:e}}}}(Yu)),Yu}function dd(){return ad?od:(ad=1,od=ud().get)}var fd=_a(dd()),pd=e=>0===e?0:e>0?1:-1,md=e=>"number"==typeof e&&e!=+e,hd=e=>"string"==typeof e&&e.indexOf("%")===e.length-1,gd=e=>("number"==typeof e||e instanceof Number)&&!md(e),vd=e=>gd(e)||"string"==typeof e,yd=0,bd=e=>{var t=++yd;return"".concat(e||"").concat(t)},wd=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!gd(e)&&"string"!=typeof e)return r;if(hd(e)){if(null==t)return r;var a=e.indexOf("%");n=t*parseFloat(e.slice(0,a))/100}else n=+e;return md(n)&&(n=r),o&&null!=t&&n>t&&(n=t),n},xd=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++){if(n[e[r]])return!0;n[e[r]]=!0}return!1};function kd(e,t,n){return gd(e)&&gd(t)?e+n*(t-e):t}var Nd=e=>null==e,Sd=e=>Nd(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1)),Cd=["type","size","sizeType"];function _d(){return _d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_d.apply(null,arguments)}function Md(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ed(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Md(Object(n),!0).forEach(function(t){Od(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Md(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Od(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Dd={symbolCircle:lu,symbolCross:cu,symbolDiamond:fu,symbolSquare:pu,symbolStar:vu,symbolTriangle:bu,symbolWye:Su},Pd=Math.PI/180,Td=e=>{var{type:t="circle",size:n=64,sizeType:o="area"}=e,a=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Cd),i=Ed(Ed({},a),{},{type:t,size:n,sizeType:o}),s="circle";"string"==typeof t&&(s=t);var{className:l,cx:c,cy:u}=i,d=jc(i);return c===+c&&u===+u&&n===+n?r.createElement("path",_d({},d,{className:ct("recharts-symbols",l),transform:"translate(".concat(c,", ").concat(u,")"),d:(()=>{var e=(e=>{var t="symbol".concat(Sd(e));return Dd[t]||lu})(s),t=function(e,t){let n=null,r=Jc(o);function o(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return e="function"==typeof e?e:$c(e||lu),t="function"==typeof t?t:$c(void 0===t?64:+t),o.type=function(t){return arguments.length?(e="function"==typeof t?t:$c(t),o):e},o.size=function(e){return arguments.length?(t="function"==typeof e?e:$c(+e),o):t},o.context=function(e){return arguments.length?(n=null==e?null:e,o):n},o}().type(e).size(((e,t,n)=>{if("area"===t)return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return.5*e*e/Math.sqrt(3);case"square":return e*e;case"star":var r=18*Pd;return 1.25*e*e*(Math.tan(r)-Math.tan(2*r)*Math.tan(r)**2);case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}})(n,o,s)),r=t();if(null!==r)return r})()})):null};Td.registerSymbol=(e,t)=>{Dd["symbol".concat(Sd(e))]=t};function Ad(){return Ad=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ad.apply(null,arguments)}function Rd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Id(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var jd=32;class zd extends h{renderIcon(e,t){var{inactiveColor:n}=this.props,o=16,a=jd/6,i=jd/3,s=e.inactive?n:e.color,l=null!=t?t:e.type;if("none"===l)return null;if("plainline"===l)return r.createElement("line",{strokeWidth:4,fill:"none",stroke:s,strokeDasharray:e.payload.strokeDasharray,x1:0,y1:o,x2:jd,y2:o,className:"recharts-legend-icon"});if("line"===l)return r.createElement("path",{strokeWidth:4,fill:"none",stroke:s,d:"M0,".concat(o,"h").concat(i,"\n A").concat(a,",").concat(a,",0,1,1,").concat(2*i,",").concat(o,"\n H").concat(jd,"M").concat(2*i,",").concat(o,"\n A").concat(a,",").concat(a,",0,1,1,").concat(i,",").concat(o),className:"recharts-legend-icon"});if("rect"===l)return r.createElement("path",{stroke:"none",fill:s,d:"M0,".concat(4,"h").concat(jd,"v").concat(24,"h").concat(-32,"z"),className:"recharts-legend-icon"});if(r.isValidElement(e.legendIcon)){var c=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Rd(Object(n),!0).forEach(function(t){Id(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rd(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},e);return delete c.legendIcon,r.cloneElement(e.legendIcon,c)}return r.createElement(Td,{fill:s,cx:o,cy:o,size:jd,sizeType:"diameter",type:l})}renderItems(){var{payload:e,iconSize:t,layout:n,formatter:o,inactiveColor:a,iconType:i}=this.props,s={x:0,y:0,width:jd,height:jd},l={display:"horizontal"===n?"inline-block":"block",marginRight:10},c={display:"inline-block",verticalAlign:"middle",marginRight:4};return e.map((e,n)=>{var u=e.formatter||o,d=ct({"recharts-legend-item":!0,["legend-item-".concat(n)]:!0,inactive:e.inactive});if("none"===e.type)return null;var f=e.inactive?a:e.color,p=u?u(e.value,e,n):e.value;return r.createElement("li",Ad({className:d,style:l,key:"legend-item-".concat(n)},((e,t,n)=>{if(null===e||"object"!=typeof e&&"function"!=typeof e)return null;var r=null;return Object.keys(e).forEach(o=>{var a=e[o];Pc(o)&&"function"==typeof a&&(r||(r={}),r[o]=((e,t,n)=>r=>(e(t,n,r),null))(a,t,n))}),r})(this.props,e,n)),r.createElement(Fc,{width:t,height:t,viewBox:s,style:c,"aria-label":"".concat(p," legend icon")},this.renderIcon(e,i)),r.createElement("span",{className:"recharts-legend-item-text",style:{color:f}},p))})}render(){var{payload:e,layout:t,align:n}=this.props;if(!e||!e.length)return null;var o={padding:0,margin:0,textAlign:"horizontal"===t?n:"left"};return r.createElement("ul",{className:"recharts-default-legend",style:o},this.renderItems())}}Id(zd,"displayName","Legend"),Id(zd,"defaultProps",{align:"center",iconSize:14,inactiveColor:"#ccc",layout:"horizontal",verticalAlign:"middle"});var Ld,Fd={},Bd={};function $d(){return Ld||(Ld=1,e=Bd,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.uniqBy=function(e,t){const n=new Map;for(let r=0;r<e.length;r++){const o=e[r],a=t(o);n.has(a)||n.set(a,o)}return Array.from(n.values())}),Bd;var e}var Wd,Hd={};function Ud(){return Wd||(Wd=1,e=Hd,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.identity=function(e){return e}),Hd;var e}var Vd,Yd,Kd={},qd={},Gd={};function Xd(){return Vd||(Vd=1,e=Gd,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isLength=function(e){return Number.isSafeInteger(e)&&e>=0}),Gd;var e}function Zd(){return Yd||(Yd=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Xd();e.isArrayLike=function(e){return null!=e&&"function"!=typeof e&&t.isLength(e.length)}}(qd)),qd}var Qd,Jd,ef={};function tf(){return Qd||(Qd=1,e=ef,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isObjectLike=function(e){return"object"==typeof e&&null!==e}),ef;var e}function nf(){return Jd||(Jd=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Zd(),n=tf();e.isArrayLikeObject=function(e){return n.isObjectLike(e)&&t.isArrayLike(e)}}(Kd)),Kd}var rf,of={},af={};function sf(){return rf||(rf=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ud();e.property=function(e){return function(n){return t.get(n,e)}}}(af)),af}var lf,cf={},uf={},df={},ff={};function pf(){return lf||(lf=1,e=ff,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isObject=function(e){return null!==e&&("object"==typeof e||"function"==typeof e)}),ff;var e}var mf,hf={};function gf(){return mf||(mf=1,e=hf,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isPrimitive=function(e){return null==e||"object"!=typeof e&&"function"!=typeof e}),hf;var e}var vf,yf,bf,wf={};function xf(){return vf||(vf=1,e=wf,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.eq=function(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}),wf;var e}function kf(){return yf||(yf=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Nf(),n=pf(),r=gf(),o=xf();function a(e,t,l,c){if(t===e)return!0;switch(typeof t){case"object":return function(e,t,n,o){if(null==t)return!0;if(Array.isArray(t))return i(e,t,n,o);if(t instanceof Map)return function(e,t,n,r){if(0===t.size)return!0;if(!(e instanceof Map))return!1;for(const[o,a]of t.entries()){if(!1===n(e.get(o),a,o,e,t,r))return!1}return!0}(e,t,n,o);if(t instanceof Set)return s(e,t,n,o);const a=Object.keys(t);if(null==e)return 0===a.length;if(0===a.length)return!0;if(o&&o.has(t))return o.get(t)===e;o&&o.set(t,e);try{for(let i=0;i<a.length;i++){const s=a[i];if(!r.isPrimitive(e)&&!(s in e))return!1;if(void 0===t[s]&&void 0!==e[s])return!1;if(null===t[s]&&null!==e[s])return!1;if(!n(e[s],t[s],s,e,t,o))return!1}return!0}finally{o&&o.delete(t)}}(e,t,l,c);case"function":return Object.keys(t).length>0?a(e,{...t},l,c):o.eq(e,t);default:return n.isObject(e)?"string"!=typeof t||""===t:o.eq(e,t)}}function i(e,t,n,r){if(0===t.length)return!0;if(!Array.isArray(e))return!1;const o=new Set;for(let a=0;a<t.length;a++){const i=t[a];let s=!1;for(let l=0;l<e.length;l++){if(o.has(l))continue;let c=!1;if(n(e[l],i,a,e,t,r)&&(c=!0),c){o.add(l),s=!0;break}}if(!s)return!1}return!0}function s(e,t,n,r){return 0===t.size||e instanceof Set&&i([...e],[...t],n,r)}e.isMatchWith=function(e,n,r){return"function"!=typeof r?t.isMatch(e,n):a(e,n,function e(t,n,o,i,s,l){const c=r(t,n,o,i,s,l);return void 0!==c?Boolean(c):a(t,n,e,l)},new Map)},e.isSetMatch=s}(df)),df}function Nf(){return bf||(bf=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=kf();e.isMatch=function(e,n){return t.isMatchWith(e,n,()=>{})}}(uf)),uf}var Sf,Cf={},_f={},Mf={};function Ef(){return Sf||(Sf=1,e=Mf,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.getSymbols=function(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}),Mf;var e}var Of,Df={};function Pf(){return Of||(Of=1,e=Df,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.getTag=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}),Df;var e}var Tf,Af={};function Rf(){return Tf||(Tf=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});e.argumentsTag="[object Arguments]",e.arrayBufferTag="[object ArrayBuffer]",e.arrayTag="[object Array]",e.bigInt64ArrayTag="[object BigInt64Array]",e.bigUint64ArrayTag="[object BigUint64Array]",e.booleanTag="[object Boolean]",e.dataViewTag="[object DataView]",e.dateTag="[object Date]",e.errorTag="[object Error]",e.float32ArrayTag="[object Float32Array]",e.float64ArrayTag="[object Float64Array]",e.functionTag="[object Function]",e.int16ArrayTag="[object Int16Array]",e.int32ArrayTag="[object Int32Array]",e.int8ArrayTag="[object Int8Array]",e.mapTag="[object Map]",e.numberTag="[object Number]",e.objectTag="[object Object]",e.regexpTag="[object RegExp]",e.setTag="[object Set]",e.stringTag="[object String]",e.symbolTag="[object Symbol]",e.uint16ArrayTag="[object Uint16Array]",e.uint32ArrayTag="[object Uint32Array]",e.uint8ArrayTag="[object Uint8Array]",e.uint8ClampedArrayTag="[object Uint8ClampedArray]"}(Af)),Af}var If,jf,zf,Lf,Ff={};function Bf(){return If||(If=1,e=Ff,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isTypedArray=function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}),Ff;var e}function $f(){return jf||(jf=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ef(),n=Pf(),r=Rf(),o=gf(),a=Bf();function i(e,t,l,c=new Map,u=void 0){const d=u?.(e,t,l,c);if(void 0!==d)return d;if(o.isPrimitive(e))return e;if(c.has(e))return c.get(e);if(Array.isArray(e)){const t=new Array(e.length);c.set(e,t);for(let n=0;n<e.length;n++)t[n]=i(e[n],n,l,c,u);return Object.hasOwn(e,"index")&&(t.index=e.index),Object.hasOwn(e,"input")&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){const t=new Map;c.set(e,t);for(const[n,r]of e)t.set(n,i(r,n,l,c,u));return t}if(e instanceof Set){const t=new Set;c.set(e,t);for(const n of e)t.add(i(n,void 0,l,c,u));return t}if("undefined"!=typeof Buffer&&Buffer.isBuffer(e))return e.subarray();if(a.isTypedArray(e)){const t=new(Object.getPrototypeOf(e).constructor)(e.length);c.set(e,t);for(let n=0;n<e.length;n++)t[n]=i(e[n],n,l,c,u);return t}if(e instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return c.set(e,t),s(t,e,l,c,u),t}if("undefined"!=typeof File&&e instanceof File){const t=new File([e],e.name,{type:e.type});return c.set(e,t),s(t,e,l,c,u),t}if("undefined"!=typeof Blob&&e instanceof Blob){const t=new Blob([e],{type:e.type});return c.set(e,t),s(t,e,l,c,u),t}if(e instanceof Error){const t=new e.constructor;return c.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,s(t,e,l,c,u),t}if(e instanceof Boolean){const t=new Boolean(e.valueOf());return c.set(e,t),s(t,e,l,c,u),t}if(e instanceof Number){const t=new Number(e.valueOf());return c.set(e,t),s(t,e,l,c,u),t}if(e instanceof String){const t=new String(e.valueOf());return c.set(e,t),s(t,e,l,c,u),t}if("object"==typeof e&&function(e){switch(n.getTag(e)){case r.argumentsTag:case r.arrayTag:case r.arrayBufferTag:case r.dataViewTag:case r.booleanTag:case r.dateTag:case r.float32ArrayTag:case r.float64ArrayTag:case r.int8ArrayTag:case r.int16ArrayTag:case r.int32ArrayTag:case r.mapTag:case r.numberTag:case r.objectTag:case r.regexpTag:case r.setTag:case r.stringTag:case r.symbolTag:case r.uint8ArrayTag:case r.uint8ClampedArrayTag:case r.uint16ArrayTag:case r.uint32ArrayTag:return!0;default:return!1}}(e)){const t=Object.create(Object.getPrototypeOf(e));return c.set(e,t),s(t,e,l,c,u),t}return e}function s(e,n,r=e,o,a){const s=[...Object.keys(n),...t.getSymbols(n)];for(let t=0;t<s.length;t++){const l=s[t],c=Object.getOwnPropertyDescriptor(e,l);(null==c||c.writable)&&(e[l]=i(n[l],l,r,o,a))}}e.cloneDeepWith=function(e,t){return i(e,void 0,e,new Map,t)},e.cloneDeepWithImpl=i,e.copyProperties=s}(_f)),_f}function Wf(){return zf||(zf=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=$f();e.cloneDeep=function(e){return t.cloneDeepWithImpl(e,void 0,e,new Map,void 0)}}(Cf)),Cf}function Hf(){return Lf||(Lf=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Nf(),n=Wf();e.matches=function(e){return e=n.cloneDeep(e),n=>t.isMatch(n,e)}}(cf)),cf}var Uf,Vf,Yf={},Kf={},qf={};function Gf(){return Uf||(Uf=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=$f(),n=Rf();e.cloneDeepWith=function(e,r){return t.cloneDeepWith(e,(o,a,i,s)=>{const l=r?.(o,a,i,s);if(void 0!==l)return l;if("object"==typeof e)switch(Object.prototype.toString.call(e)){case n.numberTag:case n.stringTag:case n.booleanTag:{const n=new e.constructor(e?.valueOf());return t.copyProperties(n,e),n}case n.argumentsTag:{const n={};return t.copyProperties(n,e),n.length=e.length,n[Symbol.iterator]=e[Symbol.iterator],n}default:return}})}}(qf)),qf}function Xf(){return Vf||(Vf=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Gf();e.cloneDeep=function(e){return t.cloneDeepWith(e)}}(Kf)),Kf}var Zf,Qf={},Jf={};function ep(){return Zf||(Zf=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;e.isIndex=function(e,n=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e<n;case"symbol":return!1;case"string":return t.test(e)}}}(Jf)),Jf}var tp,np,rp,op,ap,ip,sp,lp={};function cp(){return tp||(tp=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Pf();e.isArguments=function(e){return null!==e&&"object"==typeof e&&"[object Arguments]"===t.getTag(e)}}(lp)),lp}function up(){return np||(np=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Zu(),n=ep(),r=cp(),o=cd();e.has=function(e,a){let i;if(i=Array.isArray(a)?a:"string"==typeof a&&t.isDeepKey(a)&&null==e?.[a]?o.toPath(a):[a],0===i.length)return!1;let s=e;for(let e=0;e<i.length;e++){const t=i[e];if(null==s||!Object.hasOwn(s,t)){if(!((Array.isArray(s)||r.isArguments(s))&&n.isIndex(t)&&t<s.length))return!1}s=s[t]}return!0}}(Qf)),Qf}function dp(){return rp||(rp=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Nf(),n=ed(),r=Xf(),o=ud(),a=up();e.matchesProperty=function(e,i){switch(typeof e){case"object":Object.is(e?.valueOf(),-0)&&(e="-0");break;case"number":e=n.toKey(e)}return i=r.cloneDeep(i),function(n){const r=o.get(n,e);return void 0===r?a.has(n,e):void 0===i?void 0===r:t.isMatch(r,i)}}}(Yf)),Yf}function fp(){return op||(op=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ud(),n=sf(),r=Hf(),o=dp();e.iteratee=function(e){if(null==e)return t.identity;switch(typeof e){case"function":return e;case"object":return Array.isArray(e)&&2===e.length?o.matchesProperty(e[0],e[1]):r.matches(e);case"string":case"symbol":case"number":return n.property(e)}}}(of)),of}function pp(){return ap||(ap=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=$d(),n=Ud(),r=nf(),o=fp();e.uniqBy=function(e,a=n.identity){return r.isArrayLikeObject(e)?t.uniqBy(Array.from(e),o.iteratee(a)):[]}}(Fd)),Fd}function mp(){return sp?ip:(sp=1,ip=pp().uniqBy)}var hp=_a(mp());function gp(e,t,n){return!0===t?hp(e,n):"function"==typeof t?hp(e,t):e}var vp,yp={exports:{}},bp={};var wp,xp,kp={};
11
+ /**
12
+ * @license React
13
+ * use-sync-external-store-shim/with-selector.development.js
14
+ *
15
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
16
+ *
17
+ * This source code is licensed under the MIT license found in the
18
+ * LICENSE file in the root directory of this source tree.
19
+ */var Np=(xp||(xp=1,"production"===process.env.NODE_ENV?yp.exports=function(){if(vp)return bp;vp=1;var e=o,t=Aa(),n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=t.useSyncExternalStore,a=e.useRef,i=e.useEffect,s=e.useMemo,l=e.useDebugValue;return bp.useSyncExternalStoreWithSelector=function(e,t,o,c,u){var d=a(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=s(function(){function e(e){if(!i){if(i=!0,r=e,e=c(e),void 0!==u&&f.hasValue){var t=f.value;if(u(t,e))return a=t}return a=e}if(t=a,n(r,e))return t;var o=c(e);return void 0!==u&&u(t,o)?(r=e,t):(r=e,a=o)}var r,a,i=!1,s=void 0===o?null:o;return[function(){return e(t())},null===s?void 0:function(){return e(s())}]},[t,o,c,u]);var p=r(e,d[0],d[1]);return i(function(){f.hasValue=!0,f.value=p},[p]),l(p),p},bp}():yp.exports=(wp||(wp=1,"production"!==process.env.NODE_ENV&&function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var e=o,t=Aa(),n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=t.useSyncExternalStore,a=e.useRef,i=e.useEffect,s=e.useMemo,l=e.useDebugValue;kp.useSyncExternalStoreWithSelector=function(e,t,o,c,u){var d=a(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=s(function(){function e(e){if(!i){if(i=!0,r=e,e=c(e),void 0!==u&&f.hasValue){var t=f.value;if(u(t,e))return a=t}return a=e}if(t=a,n(r,e))return t;var o=c(e);return void 0!==u&&u(t,o)?(r=e,t):(r=e,a=o)}var r,a,i=!1,s=void 0===o?null:o;return[function(){return e(t())},null===s?void 0:function(){return e(s())}]},[t,o,c,u]);var p=r(e,d[0],d[1]);return i(function(){f.hasValue=!0,f.value=p},[p]),l(p),p},"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),kp)),yp.exports),Sp=i(null),Cp=e=>e,_p=()=>{var e=s(Sp);return e?e.store.dispatch:Cp},Mp=()=>{},Ep=()=>Mp,Op=(e,t)=>e===t;function Dp(e){var t=s(Sp);return Np.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:Ep,t?t.store.getState:Mp,t?t.store.getState:Mp,t?e:Mp,Op)}var Pp=(e,t,n)=>{if(1===t.length&&t[0]===n){let t=!1;try{const n={};e(n)===n&&(t=!0)}catch{}if(t){let e;try{throw new Error}catch(t){({stack:e}=t)}console.warn("The result function returned its own inputs without modification. e.g\n`createSelector([state => state.todos], todos => todos)`\nThis could lead to inefficient memoization and unnecessary re-renders.\nEnsure transformation logic is in the result function, and extraction logic is in the input selectors.",{stack:e})}}},Tp=(e,t,n)=>{const{memoize:r,memoizeOptions:o}=t,{inputSelectorResults:a,inputSelectorResultsCopy:i}=e,s=r(()=>({}),...o);if(!(s.apply(null,a)===s.apply(null,i))){let e;try{throw new Error}catch(t){({stack:e}=t)}console.warn("An input selector returned a different result when passed same arguments.\nThis means your output selector will likely run more frequently than intended.\nAvoid returning a new reference inside your input selector, e.g.\n`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)`",{arguments:n,firstInputs:a,secondInputs:i,stack:e})}},Ap={inputStabilityCheck:"once",identityFunctionCheck:"once"};var Rp=e=>Array.isArray(e)?e:[e];function Ip(e){const t=Array.isArray(e[0])?e[0]:e;return function(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(e=>"function"==typeof e)){const n=e.map(e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e).join(", ");throw new TypeError(`${t}[${n}]`)}}(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function jp(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var zp="undefined"!=typeof WeakRef?WeakRef:class{constructor(e){this.value=e}deref(){return this.value}};function Lp(){return{s:0,v:void 0,o:null,p:null}}function Fp(e,t={}){let n={s:0,v:void 0,o:null,p:null};const{resultEqualityCheck:r}=t;let o,a=0;function i(){let t=n;const{length:i}=arguments;for(let e=0,n=i;e<n;e++){const n=arguments[e];if("function"==typeof n||"object"==typeof n&&null!==n){let e=t.o;null===e&&(t.o=e=new WeakMap);const r=e.get(n);void 0===r?(t=Lp(),e.set(n,t)):t=r}else{let e=t.p;null===e&&(t.p=e=new Map);const r=e.get(n);void 0===r?(t=Lp(),e.set(n,t)):t=r}}const s=t;let l;if(1===t.s)l=t.v;else if(l=e.apply(null,arguments),a++,r){const e=o?.deref?.()??o;null!=e&&r(e,l)&&(l=e,0!==a&&a--);o="object"==typeof l&&null!==l||"function"==typeof l?new zp(l):l}return s.s=1,s.v=l,l}return i.clearCache=()=>{n={s:0,v:void 0,o:null,p:null},i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function Bp(e,...t){const n="function"==typeof e?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t,r=0,o=0,a={},i=e.pop();"object"==typeof i&&(a=i,i=e.pop()),function(e,t="expected a function, instead received "+typeof e){if("function"!=typeof e)throw new TypeError(t)}(i,`createSelector expects an output function after the inputs, but received: [${typeof i}]`);const s={...n,...a},{memoize:l,memoizeOptions:c=[],argsMemoize:u=Fp,argsMemoizeOptions:d=[],devModeChecks:f={}}=s,p=Rp(c),m=Rp(d),h=Ip(e),g=l(function(){return r++,i.apply(null,arguments)},...p);let v=!0;const y=u(function(){o++;const e=jp(h,arguments);if(t=g.apply(null,e),"production"!==process.env.NODE_ENV){const{identityFunctionCheck:n,inputStabilityCheck:r}=((e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...Ap,...t};return{identityFunctionCheck:{shouldRun:"always"===n||"once"===n&&e,run:Pp},inputStabilityCheck:{shouldRun:"always"===r||"once"===r&&e,run:Tp}}})(v,f);if(n.shouldRun&&n.run(i,e,t),r.shouldRun){const t=jp(h,arguments);r.run({inputSelectorResults:e,inputSelectorResultsCopy:t},{memoize:l,memoizeOptions:p},arguments)}v&&(v=!1)}return t},...m);return Object.assign(y,{resultFunc:i,memoizedResultFunc:g,dependencies:h,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>t,recomputations:()=>r,resetRecomputations:()=>{r=0},memoize:l,argsMemoize:u})};return Object.assign(r,{withTypes:()=>r}),r}var $p,Wp=Bp(Fp),Hp=Object.assign((e,t=Wp)=>{!function(e,t="expected an object, instead received "+typeof e){if("object"!=typeof e)throw new TypeError(t)}(e,"createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);const n=Object.keys(e),r=t(n.map(t=>e[t]),(...e)=>e.reduce((e,t,r)=>(e[n[r]]=t,e),{}));return r},{withTypes:()=>Hp}),Up={},Vp={},Yp={};function Kp(){return $p||($p=1,function(e){function t(e){return"symbol"==typeof e?1:null===e?2:void 0===e?3:e!=e?4:0}Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});e.compareValues=(e,n,r)=>{if(e!==n){const o=t(e),a=t(n);if(o===a&&0===o){if(e<n)return"desc"===r?1:-1;if(e>n)return"desc"===r?-1:1}return"desc"===r?a-o:o-a}return 0}}(Yp)),Yp}var qp,Gp,Xp,Zp={},Qp={};function Jp(){return qp||(qp=1,e=Qp,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isSymbol=function(e){return"symbol"==typeof e||e instanceof Symbol}),Qp;var e}function em(){return Gp||(Gp=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Jp(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;e.isKey=function(e,o){return!Array.isArray(e)&&(!("number"!=typeof e&&"boolean"!=typeof e&&null!=e&&!t.isSymbol(e))||("string"==typeof e&&(r.test(e)||!n.test(e))||null!=o&&Object.hasOwn(o,e)))}}(Zp)),Zp}function tm(){return Xp||(Xp=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Kp(),n=em(),r=cd();e.orderBy=function(e,o,a,i){if(null==e)return[];a=i?void 0:a,Array.isArray(e)||(e=Object.values(e)),Array.isArray(o)||(o=null==o?[null]:[o]),0===o.length&&(o=[null]),Array.isArray(a)||(a=null==a?[]:[a]),a=a.map(e=>String(e));const s=(e,t)=>{let n=e;for(let e=0;e<t.length&&null!=n;++e)n=n[t[e]];return n},l=o.map(e=>(Array.isArray(e)&&1===e.length&&(e=e[0]),null==e||"function"==typeof e||Array.isArray(e)||n.isKey(e)?e:{key:e,path:r.toPath(e)})),c=e.map(e=>({original:e,criteria:l.map(t=>((e,t)=>null==t||null==e?t:"object"==typeof e&&"key"in e?Object.hasOwn(t,e.key)?t[e.key]:s(t,e.path):"function"==typeof e?e(t):Array.isArray(e)?s(t,e):"object"==typeof t?t[e]:t)(t,e))}));return c.slice().sort((e,n)=>{for(let r=0;r<l.length;r++){const o=t.compareValues(e.criteria[r],n.criteria[r],a[r]);if(0!==o)return o}return 0}).map(e=>e.original)}}(Vp)),Vp}var nm,rm={};function om(){return nm||(nm=1,e=rm,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.flatten=function(e,t=1){const n=[],r=Math.floor(t),o=(e,t)=>{for(let a=0;a<e.length;a++){const i=e[a];Array.isArray(i)&&t<r?o(i,t+1):n.push(i)}};return o(e,0),n}),rm;var e}var am,im,sm,lm,cm={};function um(){return am||(am=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ep(),n=Zd(),r=pf(),o=xf();e.isIterateeCall=function(e,a,i){return!!r.isObject(i)&&(!!("number"==typeof a&&n.isArrayLike(i)&&t.isIndex(a)&&a<i.length||"string"==typeof a&&a in i)&&o.eq(i[a],e))}}(cm)),cm}function dm(){return im||(im=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=tm(),n=om(),r=um();e.sortBy=function(e,...o){const a=o.length;return a>1&&r.isIterateeCall(e,o[0],o[1])?o=[]:a>2&&r.isIterateeCall(o[0],o[1],o[2])&&(o=[o[0]]),t.orderBy(e,n.flatten(o),["asc"])}}(Up)),Up}function fm(){return lm?sm:(lm=1,sm=dm().sortBy)}var pm=_a(fm()),mm=e=>e.legend.settings,hm=Wp([e=>e.legend.payload,mm],(e,t)=>{var{itemSorter:n}=t,r=e.flat(1);return n?pm(r,n):r});function gm(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],[t,n]=a({height:0,left:0,top:0,width:0}),r=l(e=>{if(null!=e){var r=e.getBoundingClientRect(),o={height:r.height,left:r.left,top:r.top,width:r.width};(Math.abs(o.height-t.height)>1||Math.abs(o.left-t.left)>1||Math.abs(o.top-t.top)>1||Math.abs(o.width-t.width)>1)&&n({height:o.height,left:o.left,top:o.top,width:o.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,r]}function vm(e){return function(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}(e)&&"type"in e&&"string"==typeof e.type}var ym=Symbol.for("immer-nothing"),bm=Symbol.for("immer-draftable"),wm=Symbol.for("immer-state"),xm="production"!==process.env.NODE_ENV?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function km(e,...t){if("production"!==process.env.NODE_ENV){const n=xm[e],r="function"==typeof n?n.apply(null,t):n;throw new Error(`[Immer] ${r}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Nm=Object.getPrototypeOf;function Sm(e){return!!e&&!!e[wm]}function Cm(e){return!!e&&(Mm(e)||Array.isArray(e)||!!e[bm]||!!e.constructor?.[bm]||Tm(e)||Am(e))}var _m=Object.prototype.constructor.toString();function Mm(e){if(!e||"object"!=typeof e)return!1;const t=Nm(e);if(null===t)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===_m}function Em(e,t){0===Om(e)?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Om(e){const t=e[wm];return t?t.type_:Array.isArray(e)?1:Tm(e)?2:Am(e)?3:0}function Dm(e,t){return 2===Om(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Pm(e,t,n){const r=Om(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function Tm(e){return e instanceof Map}function Am(e){return e instanceof Set}function Rm(e){return e.copy_||e.base_}function Im(e,t){if(Tm(e))return new Map(e);if(Am(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=Mm(e);if(!0===t||"class_only"===t&&!n){const t=Object.getOwnPropertyDescriptors(e);delete t[wm];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){const o=n[r],a=t[o];!1===a.writable&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(t[o]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[o]})}return Object.create(Nm(e),t)}{const t=Nm(e);if(null!==t&&n)return{...e};const r=Object.create(t);return Object.assign(r,e)}}function jm(e,t=!1){return Lm(e)||Sm(e)||!Cm(e)||(Om(e)>1&&Object.defineProperties(e,{set:{value:zm},add:{value:zm},clear:{value:zm},delete:{value:zm}}),Object.freeze(e),t&&Object.values(e).forEach(e=>jm(e,!0))),e}function zm(){km(2)}function Lm(e){return Object.isFrozen(e)}var Fm,Bm={};function $m(e){const t=Bm[e];return t||km(0,e),t}function Wm(){return Fm}function Hm(e,t){t&&($m("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Um(e){Vm(e),e.drafts_.forEach(Km),e.drafts_=null}function Vm(e){e===Fm&&(Fm=e.parent_)}function Ym(e){return Fm={drafts_:[],parent_:Fm,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Km(e){const t=e[wm];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function qm(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[wm].modified_&&(Um(t),km(4)),Cm(e)&&(e=Gm(t,e),t.parent_||Zm(t,e)),t.patches_&&$m("Patches").generateReplacementPatches_(n[wm].base_,e,t.patches_,t.inversePatches_)):e=Gm(t,n,[]),Um(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ym?e:void 0}function Gm(e,t,n){if(Lm(t))return t;const r=t[wm];if(!r)return Em(t,(o,a)=>Xm(e,r,t,o,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Zm(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const t=r.copy_;let o=t,a=!1;3===r.type_&&(o=new Set(t),t.clear(),a=!0),Em(o,(o,i)=>Xm(e,r,t,o,i,n,a)),Zm(e,t,!1),n&&e.patches_&&$m("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Xm(e,t,n,r,o,a,i){if("production"!==process.env.NODE_ENV&&o===n&&km(5),Sm(o)){const i=Gm(e,o,a&&t&&3!==t.type_&&!Dm(t.assigned_,r)?a.concat(r):void 0);if(Pm(n,r,i),!Sm(i))return;e.canAutoFreeze_=!1}else i&&n.add(o);if(Cm(o)&&!Lm(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Gm(e,o),t&&t.scope_.parent_||"symbol"==typeof r||!(Tm(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))||Zm(e,o)}}function Zm(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&jm(t,n)}var Qm={get(e,t){if(t===wm)return e;const n=Rm(e);if(!Dm(n,t))return function(e,t,n){const r=th(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}(e,n,t);const r=n[t];return e.finalized_||!Cm(r)?r:r===eh(e.base_,t)?(rh(e),e.copy_[t]=oh(r,e)):r},has:(e,t)=>t in Rm(e),ownKeys:e=>Reflect.ownKeys(Rm(e)),set(e,t,n){const r=th(Rm(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=eh(Rm(e),t),o=r?.[wm];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(n,r)&&(void 0!==n||Dm(e.base_,t)))return!0;rh(e),nh(e)}return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==eh(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,rh(e),nh(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=Rm(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty(){km(11)},getPrototypeOf:e=>Nm(e.base_),setPrototypeOf(){km(12)}},Jm={};function eh(e,t){const n=e[wm];return(n?Rm(n):e)[t]}function th(e,t){if(!(t in e))return;let n=Nm(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Nm(n)}}function nh(e){e.modified_||(e.modified_=!0,e.parent_&&nh(e.parent_))}function rh(e){e.copy_||(e.copy_=Im(e.base_,e.scope_.immer_.useStrictShallowCopy_))}Em(Qm,(e,t)=>{Jm[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Jm.deleteProperty=function(e,t){return"production"!==process.env.NODE_ENV&&isNaN(parseInt(t))&&km(13),Jm.set.call(this,e,t,void 0)},Jm.set=function(e,t,n){return"production"!==process.env.NODE_ENV&&"length"!==t&&isNaN(parseInt(t))&&km(14),Qm.set.call(this,e[0],t,n,e[0])};function oh(e,t){const n=Tm(e)?$m("MapSet").proxyMap_(e,t):Am(e)?$m("MapSet").proxySet_(e,t):function(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Wm(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,a=Qm;n&&(o=[r],a=Jm);const{revoke:i,proxy:s}=Proxy.revocable(o,a);return r.draft_=s,r.revoke_=i,s}(e,t);return(t?t.scope_:Wm()).drafts_.push(n),n}function ah(e){return Sm(e)||km(10,e),ih(e)}function ih(e){if(!Cm(e)||Lm(e))return e;const t=e[wm];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Im(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Im(e,!0);return Em(n,(e,t)=>{Pm(n,e,ih(t))}),t&&(t.finalized_=!1),n}var sh=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){const n=t;t=e;const r=this;return function(e=n,...o){return r.produce(e,e=>t.call(this,e,...o))}}let r;if("function"!=typeof t&&km(6),void 0!==n&&"function"!=typeof n&&km(7),Cm(e)){const o=Ym(this),a=oh(e,void 0);let i=!0;try{r=t(a),i=!1}finally{i?Um(o):Vm(o)}return Hm(o,n),qm(r,o)}if(!e||"object"!=typeof e){if(r=t(e),void 0===r&&(r=e),r===ym&&(r=void 0),this.autoFreeze_&&jm(r,!0),n){const t=[],o=[];$m("Patches").generateReplacementPatches_(e,r,t,o),n(t,o)}return r}km(1,e)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;const o=this.produce(e,t,(e,t)=>{n=e,r=t});return[o,n,r]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Cm(e)||km(8),Sm(e)&&(e=ah(e));const t=Ym(this),n=oh(e,void 0);return n[wm].isManual_=!0,Vm(t),n}finishDraft(e,t){const n=e&&e[wm];n&&n.isManual_||km(9);const{scope_:r}=n;return Hm(r,t),qm(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=$m("Patches").applyPatches_;return Sm(e)?r(e,t):this.produce(e,e=>r(e,t))}},lh=sh.produce;function ch(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw new Error("production"===process.env.NODE_ENV?xh(0):"prepareAction did not return an object");return{type:e,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>vm(t)&&t.type===e,n}function uh(e){return Cm(e)?lh(e,()=>{}):e}function dh(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}var fh="RTK_autoBatch",ph=()=>e=>({payload:e,meta:{[fh]:!0}});function mh(e){const t={},n=[];let r;const o={addCase(e,a){if("production"!==process.env.NODE_ENV){if(n.length>0)throw new Error("production"===process.env.NODE_ENV?xh(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(r)throw new Error("production"===process.env.NODE_ENV?xh(27):"`builder.addCase` should only be called before calling `builder.addDefaultCase`")}const i="string"==typeof e?e:e.type;if(!i)throw new Error("production"===process.env.NODE_ENV?xh(28):"`builder.addCase` cannot be called with an empty action type");if(i in t)throw new Error("production"===process.env.NODE_ENV?xh(29):`\`builder.addCase\` cannot be called with two reducers for the same action type '${i}'`);return t[i]=a,o},addAsyncThunk(e,a){if("production"!==process.env.NODE_ENV&&r)throw new Error("production"===process.env.NODE_ENV?xh(43):"`builder.addAsyncThunk` should only be called before calling `builder.addDefaultCase`");return a.pending&&(t[e.pending.type]=a.pending),a.rejected&&(t[e.rejected.type]=a.rejected),a.fulfilled&&(t[e.fulfilled.type]=a.fulfilled),a.settled&&n.push({matcher:e.settled,reducer:a.settled}),o},addMatcher(e,t){if("production"!==process.env.NODE_ENV&&r)throw new Error("production"===process.env.NODE_ENV?xh(30):"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return n.push({matcher:e,reducer:t}),o},addDefaultCase(e){if("production"!==process.env.NODE_ENV&&r)throw new Error("production"===process.env.NODE_ENV?xh(31):"`builder.addDefaultCase` can only be called once");return r=e,o}};return e(o),[t,n,r]}var hh=Symbol.for("rtk-slice-createasyncthunk");function gh(e,t){return`${e}/${t}`}function vh({creators:e}={}){const t=e?.asyncThunk?.[hh];return function(e){const{name:n,reducerPath:r=n}=e;if(!n)throw new Error("production"===process.env.NODE_ENV?xh(11):"`name` is a required option for createSlice");"undefined"!=typeof process&&"development"===process.env.NODE_ENV&&void 0===e.initialState&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");const o=("function"==typeof e.reducers?e.reducers(function(){function e(e,t){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer:e=>Object.assign({[e.name]:(...t)=>e(...t)}[e.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(e,t)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}),asyncThunk:e}}()):e.reducers)||{},a=Object.keys(o),i={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(e,t){const n="string"==typeof e?e:e.type;if(!n)throw new Error("production"===process.env.NODE_ENV?xh(12):"`context.addCase` cannot be called with an empty action type");if(n in i.sliceCaseReducersByType)throw new Error("production"===process.env.NODE_ENV?xh(13):"`context.addCase` cannot be called with two reducers for the same action type: "+n);return i.sliceCaseReducersByType[n]=t,s},addMatcher:(e,t)=>(i.sliceMatchers.push({matcher:e,reducer:t}),s),exposeAction:(e,t)=>(i.actionCreators[e]=t,s),exposeCaseReducer:(e,t)=>(i.sliceCaseReducersByName[e]=t,s)};function l(){if("production"!==process.env.NODE_ENV&&"object"==typeof e.extraReducers)throw new Error("production"===process.env.NODE_ENV?xh(14):"The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");const[t={},n=[],r]="function"==typeof e.extraReducers?mh(e.extraReducers):[e.extraReducers],o={...t,...i.sliceCaseReducersByType};return function(e,t){if("production"!==process.env.NODE_ENV&&"object"==typeof t)throw new Error("production"===process.env.NODE_ENV?xh(8):"The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");let n,[r,o,a]=mh(t);if(function(e){return"function"==typeof e}(e))n=()=>uh(e());else{const t=uh(e);n=()=>t}function i(e=n(),t){let i=[r[t.type],...o.filter(({matcher:e})=>e(t)).map(({reducer:e})=>e)];return 0===i.filter(e=>!!e).length&&(i=[a]),i.reduce((e,n)=>{if(n){if(Sm(e)){const r=n(e,t);return void 0===r?e:r}if(Cm(e))return lh(e,e=>n(e,t));{const r=n(e,t);if(void 0===r){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}}return e},e)}return i.getInitialState=n,i}(e.initialState,e=>{for(let t in o)e.addCase(t,o[t]);for(let t of i.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)})}a.forEach(r=>{const a=o[r],i={reducerName:r,type:gh(n,r),createNotation:"function"==typeof e.reducers};!function(e){return"asyncThunk"===e._reducerDefinitionType}(a)?function({type:e,reducerName:t,createNotation:n},r,o){let a,i;if("reducer"in r){if(n&&!function(e){return"reducerWithPrepare"===e._reducerDefinitionType}(r))throw new Error("production"===process.env.NODE_ENV?xh(17):"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");a=r.reducer,i=r.prepare}else a=r;o.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,i?ch(e,i):ch(e))}(i,a,s):function({type:e,reducerName:t},n,r,o){if(!o)throw new Error("production"===process.env.NODE_ENV?xh(18):"Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");const{payloadCreator:a,fulfilled:i,pending:s,rejected:l,settled:c,options:u}=n,d=o(e,a,u);r.exposeAction(t,d),i&&r.addCase(d.fulfilled,i);s&&r.addCase(d.pending,s);l&&r.addCase(d.rejected,l);c&&r.addMatcher(d.settled,c);r.exposeCaseReducer(t,{fulfilled:i||wh,pending:s||wh,rejected:l||wh,settled:c||wh})}(i,a,s,t)});const c=e=>e,u=new Map,d=new WeakMap;let f;function p(e,t){return f||(f=l()),f(e,t)}function m(){return f||(f=l()),f.getInitialState()}function h(t,n=!1){function r(e){let o=e[t];if(void 0===o)if(n)o=dh(d,r,m);else if("production"!==process.env.NODE_ENV)throw new Error("production"===process.env.NODE_ENV?xh(15):"selectSlice returned undefined for an uninjected slice reducer");return o}function o(t=c){const r=dh(u,n,()=>new WeakMap);return dh(r,t,()=>{const r={};for(const[o,a]of Object.entries(e.selectors??{}))r[o]=yh(a,t,()=>dh(d,t,m),n);return r})}return{reducerPath:t,getSelectors:o,get selectors(){return o(r)},selectSlice:r}}const g={name:n,reducer:p,actions:i.actionCreators,caseReducers:i.sliceCaseReducersByName,getInitialState:m,...h(r),injectInto(e,{reducerPath:t,...n}={}){const o=t??r;return e.inject({reducerPath:o,reducer:p},n),{...g,...h(o,!0)}}};return g}}function yh(e,t,n,r){function o(o,...a){let i=t(o);if(void 0===i)if(r)i=n();else if("production"!==process.env.NODE_ENV)throw new Error("production"===process.env.NODE_ENV?xh(16):"selectState returned undefined for an uninjected slice reducer");return e(i,...a)}return o.unwrapped=e,o}var bh=vh();function wh(){}function xh(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 kh=Math.PI/180,Nh=(e,t,n,r)=>({x:e+Math.cos(-kh*r)*n,y:t+Math.sin(-kh*r)*n});function Sh(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function Ch(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ch(Object(n),!0).forEach(function(t){Mh(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ch(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Mh(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Eh(e,t,n){return Nd(e)||Nd(t)?n:vd(t)?fd(e,t,n):"function"==typeof t?t(e):n}var Oh=(e,t)=>"horizontal"===e&&"xAxis"===t||"vertical"===e&&"yAxis"===t||"centric"===e&&"angleAxis"===t||"radial"===e&&"radiusAxis"===t,Dh=1e-4,Ph={sign:e=>{var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var o=0,a=0,i=0;i<t;++i){var s=md(e[i][n][1])?e[i][n][0]:e[i][n][1];s>=0?(e[i][n][0]=o,e[i][n][1]=o+s,o=e[i][n][1]):(e[i][n][0]=a,e[i][n][1]=a+s,a=e[i][n][1])}},expand:function(e,t){if((r=e.length)>0){for(var n,r,o,a=0,i=e[0].length;a<i;++a){for(o=n=0;n<r;++n)o+=e[n][a][1]||0;if(o)for(n=0;n<r;++n)e[n][a][1]/=o}$u(e,t)}},none:$u,silhouette:function(e,t){if((n=e.length)>0){for(var n,r=0,o=e[t[0]],a=o.length;r<a;++r){for(var i=0,s=0;i<n;++i)s+=e[i][r][1]||0;o[r][1]+=o[r][0]=-s/2}$u(e,t)}},wiggle:function(e,t){if((o=e.length)>0&&(r=(n=e[t[0]]).length)>0){for(var n,r,o,a=0,i=1;i<r;++i){for(var s=0,l=0,c=0;s<o;++s){for(var u=e[t[s]],d=u[i][1]||0,f=(d-(u[i-1][1]||0))/2,p=0;p<s;++p){var m=e[t[p]];f+=(m[i][1]||0)-(m[i-1][1]||0)}l+=d,c+=f*d}n[i-1][1]+=n[i-1][0]=a,l&&(a-=c/l)}n[i-1][1]+=n[i-1][0]=a,$u(e,t)}},positive:e=>{var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var o=0,a=0;a<t;++a){var i=md(e[a][n][1])?e[a][n][0]:e[a][n][1];i>=0?(e[a][n][0]=o,e[a][n][1]=o+i,o=e[a][n][1]):(e[a][n][0]=0,e[a][n][1]=0)}}},Th=(e,t,n)=>{var r=Ph[n],o=function(){var e=$c([]),t=Wu,n=$u,r=Hu;function o(o){var a,i,s=Array.from(e.apply(this,arguments),Uu),l=s.length,c=-1;for(const e of o)for(a=0,++c;a<l;++a)(s[a][c]=[0,+r(e,s[a].key,c,o)]).data=e;for(a=0,i=eu(t(s));a<l;++a)s[i[a]].index=a;return n(s,i),s}return o.keys=function(t){return arguments.length?(e="function"==typeof t?t:$c(Array.from(t)),o):e},o.value=function(e){return arguments.length?(r="function"==typeof e?e:$c(+e),o):r},o.order=function(e){return arguments.length?(t=null==e?Wu:"function"==typeof e?e:$c(Array.from(e)),o):t},o.offset=function(e){return arguments.length?(n=null==e?$u:e,o):n},o}().keys(t).value((e,t)=>+Eh(e,t,0)).order(Wu).offset(r);return o(e)},Ah=(e,t,n)=>{var r;if(null!=e)return r=Object.keys(e).reduce((r,o)=>{var a=e[o],{stackedData:i}=a,s=i.reduce((e,r)=>{var o,a=Sh(r,t,n),i=(o=a.flat(2).filter(gd),[Math.min(...o),Math.max(...o)]);return[Math.min(e[0],i[0]),Math.max(e[1],i[1])]},[1/0,-1/0]);return[Math.min(s[0],r[0]),Math.max(s[1],r[1])]},[1/0,-1/0]),[r[0]===1/0?0:r[0],r[1]===-1/0?0:r[1]]},Rh=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Ih=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/;function jh(e){var{tooltipEntrySettings:t,dataKey:n,payload:r,value:o,name:a}=e;return _h(_h({},t),{},{dataKey:n,payload:r,value:o,name:a})}var zh=e=>e.layout.width,Lh=e=>e.layout.height,Fh=e=>e.layout.margin,Bh=Wp(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),$h=Wp(e=>e.cartesianAxis.yAxis,e=>Object.values(e));function Wh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Hh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wh(Object(n),!0).forEach(function(t){Uh(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Uh(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Vh=Wp([zh,Lh,Fh,e=>e.brush.height,function(e){return $h(e).reduce((e,t)=>"left"!==t.orientation||t.mirror||t.hide?e:e+("number"==typeof t.width?t.width:60),0)},function(e){return $h(e).reduce((e,t)=>"right"!==t.orientation||t.mirror||t.hide?e:e+("number"==typeof t.width?t.width:60),0)},function(e){return Bh(e).reduce((e,t)=>"top"!==t.orientation||t.mirror||t.hide?e:e+t.height,0)},function(e){return Bh(e).reduce((e,t)=>"bottom"!==t.orientation||t.mirror||t.hide?e:e+t.height,0)},mm,e=>e.legend.size],(e,t,n,r,o,a,i,s,l,c)=>{var u={left:(n.left||0)+o,right:(n.right||0)+a},d=Hh(Hh({},{top:(n.top||0)+i,bottom:(n.bottom||0)+s}),u),f=d.bottom;d.bottom+=r,d=((e,t,n)=>{if(t&&n){var{width:r,height:o}=n,{align:a,verticalAlign:i,layout:s}=t;if(("vertical"===s||"horizontal"===s&&"middle"===i)&&"center"!==a&&gd(e[a]))return _h(_h({},e),{},{[a]:e[a]+(r||0)});if(("horizontal"===s||"vertical"===s&&"center"===a)&&"middle"!==i&&gd(e[i]))return _h(_h({},e),{},{[i]:e[i]+(o||0)})}return e})(d,l,c);var p=e-d.left-d.right,m=t-d.top-d.bottom;return Hh(Hh({brushBottom:f},d),{},{width:Math.max(p,0),height:Math.max(m,0)})}),Yh=Wp(Vh,e=>({x:e.left,y:e.top,width:e.width,height:e.height}));Wp(zh,Lh,(e,t)=>({x:0,y:0,width:e,height:t}));var Kh,qh,Gh,Xh,Zh,Qh=i(null),Jh=e=>e.brush,eg=Wp([Jh,Vh,Fh],(e,t,n)=>({height:e.height,x:gd(e.x)?e.x:t.left,y:gd(e.y)?e.y:t.top+t.height+t.brushBottom-((null==n?void 0:n.bottom)||0),width:gd(e.width)?e.width:t.width})),tg={},ng={},rg={};function og(){return Kh||(Kh=1,e=rg,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.debounce=function(e,t,{signal:n,edges:r}={}){let o,a=null;const i=null!=r&&r.includes("leading"),s=null==r||r.includes("trailing"),l=()=>{null!==a&&(e.apply(o,a),o=void 0,a=null)};let c=null;const u=()=>{null!=c&&clearTimeout(c),c=setTimeout(()=>{c=null,s&&l(),d()},t)},d=()=>{null!==c&&(clearTimeout(c),c=null),o=void 0,a=null},f=function(...e){if(n?.aborted)return;o=this,a=e;const t=null==c;u(),i&&t&&l()};return f.schedule=u,f.cancel=d,f.flush=()=>{l()},n?.addEventListener("abort",d,{once:!0}),f}),rg;var e}function ag(){return qh||(qh=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=og();e.debounce=function(e,n=0,r={}){"object"!=typeof r&&(r={});const{leading:o=!1,trailing:a=!0,maxWait:i}=r,s=Array(2);let l;o&&(s[0]="leading"),a&&(s[1]="trailing");let c=null;const u=t.debounce(function(...t){l=e.apply(this,t),c=null},n,{edges:s}),d=function(...t){return null!=i&&(null===c&&(c=Date.now()),Date.now()-c>=i)?(l=e.apply(this,t),c=Date.now(),u.cancel(),u.schedule(),l):(u.apply(this,t),l)};return d.cancel=u.cancel,d.flush=()=>(u.flush(),l),d}}(ng)),ng}function ig(){return Gh||(Gh=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ag();e.throttle=function(e,n=0,r={}){const{leading:o=!0,trailing:a=!0}=r;return t.debounce(e,n,{leading:o,maxWait:n,trailing:a})}}(tg)),tg}function sg(){return Zh?Xh:(Zh=1,Xh=ig().throttle)}var lg=_a(sg()),cg="production"!==process.env.NODE_ENV,ug=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];if(cg&&"undefined"!=typeof console&&console.warn&&(void 0===t&&console.warn("LogUtils requires an error message argument"),!e))if(void 0===t)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var a=0;console.warn(t.replace(/%s/g,()=>r[a++]))}},dg=(e,t,n)=>{var{width:r="100%",height:o="100%",aspect:a,maxHeight:i}=n,s=hd(r)?e:Number(r),l=hd(o)?t:Number(o);return a&&a>0&&(s?l=s/a:l&&(s=l*a),i&&l>i&&(l=i)),{calculatedWidth:s,calculatedHeight:l}},fg={width:0,height:0,overflow:"visible"},pg={width:0,overflowX:"visible"},mg={height:0,overflowY:"visible"},hg={},gg=e=>{var{width:t,height:n}=e,r=hd(t),o=hd(n);return r&&o?fg:r?pg:o?mg:hg};function vg(e){return Number.isFinite(e)}function yg(e){return"number"==typeof e&&e>0&&Number.isFinite(e)}function bg(){return bg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bg.apply(null,arguments)}function wg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function xg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wg(Object(n),!0).forEach(function(t){kg(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wg(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function kg(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ng=i({width:-1,height:-1});function Sg(e){var{children:t,width:n,height:o}=e,a=f(()=>({width:n,height:o}),[n,o]);return n<=0||o<=0?null:r.createElement(Ng.Provider,{value:a},t)}var Cg=m((e,t)=>{var{aspect:n,initialDimension:o={width:-1,height:-1},width:i,height:s,minWidth:u=0,minHeight:f,maxHeight:p,children:m,debounce:h=0,id:v,className:y,onResize:b,style:w={}}=e,x=c(null),k=c();k.current=b,g(t,()=>x.current);var[N,S]=a({containerWidth:o.width,containerHeight:o.height}),C=l((e,t)=>{S(n=>{var r=Math.round(e),o=Math.round(t);return n.containerWidth===r&&n.containerHeight===o?n:{containerWidth:r,containerHeight:o}})},[]);d(()=>{var e=e=>{var t,{width:n,height:r}=e[0].contentRect;C(n,r),null===(t=k.current)||void 0===t||t.call(k,n,r)};h>0&&(e=lg(e,h,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),{width:n,height:r}=x.current.getBoundingClientRect();return C(n,r),t.observe(x.current),()=>{t.disconnect()}},[C,h]);var{containerWidth:_,containerHeight:M}=N;ug(!n||n>0,"The aspect(%s) must be greater than zero.",n);var{calculatedWidth:E,calculatedHeight:O}=dg(_,M,{width:i,height:s,aspect:n,maxHeight:p});return ug(E>0||O>0,"The width(%s) and height(%s) of chart should be greater than 0,\n please check the style of container, or the props width(%s) and height(%s),\n or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the\n height and width.",E,O,i,s,u,f,n),r.createElement("div",{id:v?"".concat(v):void 0,className:ct("recharts-responsive-container",y),style:xg(xg({},w),{},{width:i,height:s,minWidth:u,minHeight:f,maxHeight:p}),ref:x},r.createElement("div",{style:gg({width:i,height:s})},r.createElement(Sg,{width:E,height:O},m)))}),_g=m((e,t)=>{var n=s(Ng);if(yg(n.width)&&yg(n.height))return e.children;var{width:o,height:a}=function(e){var{width:t,height:n,aspect:r}=e,o=t,a=n;return void 0===o&&void 0===a?(o="100%",a="100%"):void 0===o?o=r&&r>0?void 0:"100%":void 0===a&&(a=r&&r>0?void 0:"100%"),{width:o,height:a}}({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:i,calculatedHeight:l}=dg(void 0,void 0,{width:o,height:a,aspect:e.aspect,maxHeight:e.maxHeight});return gd(i)&&gd(l)?r.createElement(Sg,{width:i,height:l},e.children):r.createElement(Cg,bg({},e,{width:o,height:a,ref:t}))}),Mg=()=>{var e,t=null!=s(Qh),n=Dp(Yh),r=Dp(eg),o=null===(e=Dp(Jh))||void 0===e?void 0:e.padding;return t&&r&&o?{width:r.width-o.left-o.right,height:r.height-o.top-o.bottom,x:o.left,y:o.top}:n},Eg={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},Og=e=>e.layout.layoutType,Dg=bh({name:"legend",initialState:{settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(t.payload)},prepare:ph()},removeLegendPayload:{reducer(e,t){var n=ah(e).payload.indexOf(t.payload);n>-1&&e.payload.splice(n,1)},prepare:ph()}}}),{setLegendSize:Pg,setLegendSettings:Tg,addLegendPayload:Ag,removeLegendPayload:Rg}=Dg.actions,Ig=["contextPayload"];function jg(){return jg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jg.apply(null,arguments)}function zg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Lg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zg(Object(n),!0).forEach(function(t){Fg(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zg(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Fg(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bg(e){return e.value}function $g(e){var{contextPayload:t}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Ig),o=gp(t,e.payloadUniqBy,Bg),a=Lg(Lg({},n),{},{payload:o});return r.isValidElement(e.content)?r.cloneElement(e.content,a):"function"==typeof e.content?r.createElement(e.content,a):r.createElement(zd,a)}function Wg(e){var t=_p();return d(()=>{t(Tg(e))},[t,e]),null}function Hg(e){var t=_p();return d(()=>(t(Pg(e)),()=>{t(Pg({width:0,height:0}))}),[t,e]),null}function Ug(e){var t=Dp(hm),n=s(Bc),o=Dp(e=>e.layout.margin),{width:a,height:i,wrapperStyle:l,portal:c}=e,[u,d]=gm([t]),f=Dp(zh),p=Dp(Lh);if(null==f||null==p)return null;var m=f-(o.left||0)-(o.right||0),h=Vg.getWidthOrHeight(e.layout,i,a,m),g=c?l:Lg(Lg({position:"absolute",width:(null==h?void 0:h.width)||a||"auto",height:(null==h?void 0:h.height)||i||"auto"},function(e,t,n,r,o,a){var i,s,{layout:l,align:c,verticalAlign:u}=t;return e&&(void 0!==e.left&&null!==e.left||void 0!==e.right&&null!==e.right)||(i="center"===c&&"vertical"===l?{left:((r||0)-a.width)/2}:"right"===c?{right:n&&n.right||0}:{left:n&&n.left||0}),e&&(void 0!==e.top&&null!==e.top||void 0!==e.bottom&&null!==e.bottom)||(s="middle"===u?{top:((o||0)-a.height)/2}:"bottom"===u?{bottom:n&&n.bottom||0}:{top:n&&n.top||0}),Lg(Lg({},i),s)}(l,e,o,f,p,u)),l),v=null!=c?c:n;if(null==v)return null;var y=r.createElement("div",{className:"recharts-legend-wrapper",style:g,ref:d},r.createElement(Wg,{layout:e.layout,align:e.align,verticalAlign:e.verticalAlign,itemSorter:e.itemSorter}),r.createElement(Hg,{width:u.width,height:u.height}),r.createElement($g,jg({},e,h,{margin:o,chartWidth:f,chartHeight:p,contextPayload:t})));return x(y,v)}class Vg extends h{static getWidthOrHeight(e,t,n,r){return"vertical"===e&&gd(t)?{height:t}:"horizontal"===e?{width:n||r}:null}render(){return r.createElement(Ug,this.props)}}function Yg(){return Yg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yg.apply(null,arguments)}function Kg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function qg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Kg(Object(n),!0).forEach(function(t){Gg(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kg(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Gg(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xg(e){return Array.isArray(e)&&vd(e[0])&&vd(e[1])?e.join(" ~ "):e}Fg(Vg,"displayName","Legend"),Fg(Vg,"defaultProps",{align:"center",iconSize:14,itemSorter:"value",layout:"horizontal",verticalAlign:"bottom"});var Zg=e=>{var{separator:t=" : ",contentStyle:n={},itemStyle:o={},labelStyle:a={},payload:i,formatter:s,itemSorter:l,wrapperClassName:c,labelClassName:u,label:d,labelFormatter:f,accessibilityLayer:p=!1}=e,m=qg({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},n),h=qg({margin:0},a),g=!Nd(d),v=g?d:"",y=ct("recharts-default-tooltip",c),b=ct("recharts-tooltip-label",u);g&&f&&null!=i&&(v=f(d,i));var w=p?{role:"status","aria-live":"assertive"}:{};return r.createElement("div",Yg({className:y,style:m},w),r.createElement("p",{className:b,style:h},r.isValidElement(v)?v:"".concat(v)),(()=>{if(i&&i.length){var e=(l?pm(i,l):i).map((e,n)=>{if("none"===e.type)return null;var a=e.formatter||s||Xg,{value:l,name:c}=e,u=l,d=c;if(a){var f=a(l,c,e,n,i);if(Array.isArray(f))[u,d]=f;else{if(null==f)return null;u=f}}var p=qg({display:"block",paddingTop:4,paddingBottom:4,color:e.color||"#000"},o);return r.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(n),style:p},vd(d)?r.createElement("span",{className:"recharts-tooltip-item-name"},d):null,vd(d)?r.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,r.createElement("span",{className:"recharts-tooltip-item-value"},u),r.createElement("span",{className:"recharts-tooltip-item-unit"},e.unit||""))});return r.createElement("ul",{className:"recharts-tooltip-item-list",style:{padding:0,margin:0}},e)}return null})())},Qg="recharts-tooltip-wrapper",Jg={visibility:"hidden"};function ev(e){var{coordinate:t,translateX:n,translateY:r}=e;return ct(Qg,{["".concat(Qg,"-right")]:gd(n)&&t&&gd(t.x)&&n>=t.x,["".concat(Qg,"-left")]:gd(n)&&t&&gd(t.x)&&n<t.x,["".concat(Qg,"-bottom")]:gd(r)&&t&&gd(t.y)&&r>=t.y,["".concat(Qg,"-top")]:gd(r)&&t&&gd(t.y)&&r<t.y})}function tv(e){var{allowEscapeViewBox:t,coordinate:n,key:r,offsetTopLeft:o,position:a,reverseDirection:i,tooltipDimension:s,viewBox:l,viewBoxDimension:c}=e;if(a&&gd(a[r]))return a[r];var u=n[r]-s-(o>0?o:0),d=n[r]+o;if(t[r])return i[r]?u:d;var f=l[r];return null==f?0:i[r]?u<f?Math.max(d,f):Math.max(u,f):null==c?0:d+s>f+c?Math.max(u,f):Math.max(d,f)}function nv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function rv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nv(Object(n),!0).forEach(function(t){ov(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nv(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ov(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class av extends h{constructor(){super(...arguments),ov(this,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}),ov(this,"handleKeyDown",e=>{var t,n,r,o;"Escape"===e.key&&this.setState({dismissed:!0,dismissedAtCoordinate:{x:null!==(t=null===(n=this.props.coordinate)||void 0===n?void 0:n.x)&&void 0!==t?t:0,y:null!==(r=null===(o=this.props.coordinate)||void 0===o?void 0:o.y)&&void 0!==r?r:0}})})}componentDidMount(){document.addEventListener("keydown",this.handleKeyDown)}componentWillUnmount(){document.removeEventListener("keydown",this.handleKeyDown)}componentDidUpdate(){var e,t;this.state.dismissed&&((null===(e=this.props.coordinate)||void 0===e?void 0:e.x)===this.state.dismissedAtCoordinate.x&&(null===(t=this.props.coordinate)||void 0===t?void 0:t.y)===this.state.dismissedAtCoordinate.y||(this.state.dismissed=!1))}render(){var{active:e,allowEscapeViewBox:t,animationDuration:n,animationEasing:o,children:a,coordinate:i,hasPayload:s,isAnimationActive:l,offset:c,position:u,reverseDirection:d,useTranslate3d:f,viewBox:p,wrapperStyle:m,lastBoundingBox:h,innerRef:g,hasPortalFromProps:v}=this.props,{cssClasses:y,cssProperties:b}=function(e){var t,n,r,{allowEscapeViewBox:o,coordinate:a,offsetTopLeft:i,position:s,reverseDirection:l,tooltipBox:c,useTranslate3d:u,viewBox:d}=e;return t=c.height>0&&c.width>0&&a?function(e){var{translateX:t,translateY:n,useTranslate3d:r}=e;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}({translateX:n=tv({allowEscapeViewBox:o,coordinate:a,key:"x",offsetTopLeft:i,position:s,reverseDirection:l,tooltipDimension:c.width,viewBox:d,viewBoxDimension:d.width}),translateY:r=tv({allowEscapeViewBox:o,coordinate:a,key:"y",offsetTopLeft:i,position:s,reverseDirection:l,tooltipDimension:c.height,viewBox:d,viewBoxDimension:d.height}),useTranslate3d:u}):Jg,{cssProperties:t,cssClasses:ev({translateX:n,translateY:r,coordinate:a})}}({allowEscapeViewBox:t,coordinate:i,offsetTopLeft:c,position:u,reverseDirection:d,tooltipBox:{height:h.height,width:h.width},useTranslate3d:f,viewBox:p}),w=v?{}:rv(rv({transition:l&&e?"transform ".concat(n,"ms ").concat(o):void 0},b),{},{pointerEvents:"none",visibility:!this.state.dismissed&&e&&s?"visible":"hidden",position:"absolute",top:0,left:0}),x=rv(rv({},w),{},{visibility:!this.state.dismissed&&e&&s?"visible":"hidden"},m);return r.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:y,style:x,ref:g},a)}}var iv=!("undefined"!=typeof window&&window.document&&Boolean(window.document.createElement)&&window.setTimeout);function sv(){return sv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sv.apply(null,arguments)}function lv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function cv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lv(Object(n),!0).forEach(function(t){uv(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lv(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function uv(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var dv={curveBasisClosed:function(e){return new Eu(e)},curveBasisOpen:function(e){return new Ou(e)},curveBasis:function(e){return new Mu(e)},curveBumpX:function(e){return new su(e,!0)},curveBumpY:function(e){return new su(e,!1)},curveLinearClosed:function(e){return new Du(e)},curveLinear:nu,curveMonotoneX:function(e){return new Iu(e)},curveMonotoneY:function(e){return new ju(e)},curveNatural:function(e){return new Lu(e)},curveStep:function(e){return new Bu(e,.5)},curveStepAfter:function(e){return new Bu(e,1)},curveStepBefore:function(e){return new Bu(e,0)}},fv=e=>vg(e.x)&&vg(e.y),pv=e=>e.x,mv=e=>e.y,hv=e=>{var t,{type:n="linear",points:r=[],baseLine:o,layout:a,connectNulls:i=!1}=e,s=((e,t)=>{if("function"==typeof e)return e;var n="curve".concat(Sd(e));return"curveMonotone"!==n&&"curveBump"!==n||!t?dv[n]||nu:dv["".concat(n).concat("vertical"===t?"Y":"X")]})(n,a),l=i?r.filter(fv):r;if(Array.isArray(o)){var c=i?o.filter(e=>fv(e)):o,u=l.map((e,t)=>cv(cv({},e),{},{base:c[t]}));return(t="vertical"===a?iu().y(mv).x1(pv).x0(e=>e.base.x):iu().x(pv).y1(mv).y0(e=>e.base.y)).defined(fv).curve(s),t(u)}return(t="vertical"===a&&gd(o)?iu().y(mv).x1(pv).x0(o):gd(o)?iu().x(pv).y1(mv).y0(o):au().x(pv).y(mv)).defined(fv).curve(s),t(l)},gv=e=>{var{className:t,points:n,path:o,pathRef:a}=e;if(!(n&&n.length||o))return null;var i=n&&n.length?hv(e):o;return r.createElement("path",sv({},Ic(e),(e=>{if(!e||"function"==typeof e||"boolean"==typeof e)return null;var t=e;if(p(e)&&(t=e.props),"object"!=typeof t&&"function"!=typeof t)return null;var n={};return Object.keys(t).forEach(e=>{Pc(e)&&(n[e]=n=>t[e](t,n))}),n})(e),{className:ct("recharts-curve",t),d:null===i?void 0:i,ref:a}))},vv=["x","y","top","left","width","height","className"];function yv(){return yv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yv.apply(null,arguments)}function bv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function wv(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xv=(e,t,n,r,o,a)=>"M".concat(e,",").concat(o,"v").concat(r,"M").concat(a,",").concat(t,"h").concat(n),kv=e=>{var{x:t=0,y:n=0,top:o=0,left:a=0,width:i=0,height:s=0,className:l}=e,c=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,vv),u=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bv(Object(n),!0).forEach(function(t){wv(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bv(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({x:t,y:n,top:o,left:a,width:i,height:s},c);return gd(t)&&gd(n)&&gd(i)&&gd(s)&&gd(o)&&gd(a)?r.createElement("path",yv({},jc(u),{className:ct("recharts-cross",l),d:xv(t,n,i,s,o,a)})):null};function Nv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Sv(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cv(e,t){var n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Nv(Object(n),!0).forEach(function(t){Sv(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nv(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},e),r=t;return Object.keys(t).reduce((e,t)=>(void 0===e[t]&&void 0!==r[t]&&(e[t]=r[t]),e),n)}function _v(){}function Mv(e){return null!=e}function Ev(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ov(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ev(Object(n),!0).forEach(function(t){Dv(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ev(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Dv(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Pv=(e,t)=>Object.keys(t).reduce((n,r)=>Ov(Ov({},n),{},{[r]:e(r,t[r])}),{});function Tv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Av(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tv(Object(n),!0).forEach(function(t){Rv(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tv(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Rv(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Iv=(e,t,n)=>e+(t-e)*n,jv=e=>{var{from:t,to:n}=e;return t!==n},zv=(e,t,n)=>{var r=Pv((t,n)=>{if(jv(n)){var[r,o]=e(n.from,n.to,n.velocity);return Av(Av({},n),{},{from:r,velocity:o})}return n},t);return n<1?Pv((e,t)=>jv(t)?Av(Av({},t),{},{velocity:Iv(t.velocity,r[e].velocity,n),from:Iv(t.from,r[e].from,n)}):t,t):zv(e,r,n-1)};function Lv(e,t,n,r,o,a){var i,s=r.reduce((n,r)=>Av(Av({},n),{},{[r]:{from:e[r],velocity:0,to:t[r]}}),{}),l=null,c=r=>{i||(i=r);var u=(r-i)/n.dt;s=zv(n,s,u),o(Av(Av(Av({},e),t),Pv((e,t)=>t.from,s))),i=r,Object.values(s).filter(jv).length&&(l=a.setTimeout(c))};return()=>(l=a.setTimeout(c),()=>{l()})}var Fv=(e,t,n,r,o,a)=>{var i,s,l=(i=e,s=t,[Object.keys(i),Object.keys(s)].reduce((e,t)=>e.filter(e=>t.includes(e))));return!0===n.isStepper?Lv(e,t,n,l,o,a):function(e,t,n,r,o,a,i){var s,l=null,c=o.reduce((n,r)=>Av(Av({},n),{},{[r]:[e[r],t[r]]}),{}),u=o=>{s||(s=o);var d=(o-s)/r,f=Pv((e,t)=>Iv(...t,n(d)),c);if(a(Av(Av(Av({},e),t),f)),d<1)l=i.setTimeout(u);else{var p=Pv((e,t)=>Iv(...t,n(1)),c);a(Av(Av(Av({},e),t),p))}};return()=>(l=i.setTimeout(u),()=>{l()})}(e,t,n,r,l,o,a)},Bv=1e-4,$v=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],Wv=(e,t)=>e.map((e,n)=>e*t**n).reduce((e,t)=>e+t),Hv=(e,t)=>n=>{var r=$v(e,t);return Wv(r,n)},Uv=function(){for(var e,t,n,r,o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];if(1===a.length)switch(a[0]){case"linear":[e,n,t,r]=[0,0,1,1];break;case"ease":[e,n,t,r]=[.25,.1,.25,1];break;case"ease-in":[e,n,t,r]=[.42,0,1,1];break;case"ease-out":[e,n,t,r]=[.42,0,.58,1];break;case"ease-in-out":[e,n,t,r]=[0,0,.58,1];break;default:var s=a[0].split("(");"cubic-bezier"===s[0]&&4===s[1].split(")")[0].split(",").length&&([e,n,t,r]=s[1].split(")")[0].split(",").map(e=>parseFloat(e)))}else 4===a.length&&([e,n,t,r]=a);var l,c,u=Hv(e,t),d=Hv(n,r),f=(l=e,c=t,e=>{var t=[...$v(l,c).map((e,t)=>e*t).slice(1),0];return Wv(t,e)}),p=e=>e>1?1:e<0?0:e,m=e=>{for(var t=e>1?1:e,n=t,r=0;r<8;++r){var o=u(n)-t,a=f(n);if(Math.abs(o-t)<Bv||a<Bv)return d(n);n=p(n-o/a)}return d(n)};return m.isStepper=!1,m},Vv=e=>{if("string"==typeof e)switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return Uv(e);case"spring":return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{stiff:t=100,damping:n=8,dt:r=17}=e,o=(e,o,a)=>{var i=a+(-(e-o)*t-a*n)*r/1e3,s=a*r/1e3+e;return Math.abs(s-o)<Bv&&Math.abs(i)<Bv?[o,0]:[s,i]};return o.isStepper=!0,o.dt=r,o}();default:if("cubic-bezier"===e.split("(")[0])return Uv(e)}return"function"==typeof e?e:null};class Yv{setTimeout(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=performance.now(),r=null,o=a=>{a-n>=t?e(a):"function"==typeof requestAnimationFrame&&(r=requestAnimationFrame(o))};return r=requestAnimationFrame(o),()=>{cancelAnimationFrame(r)}}}function Kv(){return function(e){var t=()=>null,n=!1,r=null,o=a=>{if(!n){if(Array.isArray(a)){if(!a.length)return;var i=a,[s,...l]=i;return"number"==typeof s?void(r=e.setTimeout(o.bind(null,l),s)):(o(s),void(r=e.setTimeout(o.bind(null,l))))}"string"==typeof a&&t(a),"object"==typeof a&&t(a),"function"==typeof a&&a()}};return{stop:()=>{n=!0},start:e=>{n=!1,r&&(r(),r=null),o(e)},subscribe:e=>(t=e,()=>{t=()=>null}),getTimeoutController:()=>e}}(new Yv)}var qv=i(Kv);var Gv={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},Xv={t:0},Zv={t:1};function Qv(e){var t,n,r,o=Cv(e,Gv),{isActive:i,canBegin:l,duration:u,easing:p,begin:m,onAnimationEnd:h,onAnimationStart:g,children:v}=o,y=(t=o.animationId,n=o.animationManager,r=s(qv),f(()=>null!=n?n:r(t),[t,n,r])),[b,w]=a(i?Xv:Zv),x=c(null);return d(()=>{i||w(Zv)},[i]),d(()=>{if(!i||!l)return _v;var e=Fv(Xv,Zv,Vv(p),u,w,y.getTimeoutController());return y.start([g,m,()=>{x.current=e()},u,h]),()=>{y.stop(),x.current&&x.current(),h()}},[i,l,u,p,m,g,h,y]),v(b.t)}var Jv=["radius"],ey=["radius"];function ty(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ny(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ty(Object(n),!0).forEach(function(t){ry(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ty(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ry(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oy(){return oy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},oy.apply(null,arguments)}function ay(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var iy=(e,t,n,r,o)=>{var a,i=Math.min(Math.abs(n)/2,Math.abs(r)/2),s=r>=0?1:-1,l=n>=0?1:-1,c=r>=0&&n>=0||r<0&&n<0?1:0;if(i>0&&o instanceof Array){for(var u=[0,0,0,0],d=0;d<4;d++)u[d]=o[d]>i?i:o[d];a="M".concat(e,",").concat(t+s*u[0]),u[0]>0&&(a+="A ".concat(u[0],",").concat(u[0],",0,0,").concat(c,",").concat(e+l*u[0],",").concat(t)),a+="L ".concat(e+n-l*u[1],",").concat(t),u[1]>0&&(a+="A ".concat(u[1],",").concat(u[1],",0,0,").concat(c,",\n ").concat(e+n,",").concat(t+s*u[1])),a+="L ".concat(e+n,",").concat(t+r-s*u[2]),u[2]>0&&(a+="A ".concat(u[2],",").concat(u[2],",0,0,").concat(c,",\n ").concat(e+n-l*u[2],",").concat(t+r)),a+="L ".concat(e+l*u[3],",").concat(t+r),u[3]>0&&(a+="A ".concat(u[3],",").concat(u[3],",0,0,").concat(c,",\n ").concat(e,",").concat(t+r-s*u[3])),a+="Z"}else if(i>0&&o===+o&&o>0){var f=Math.min(i,o);a="M ".concat(e,",").concat(t+s*f,"\n A ").concat(f,",").concat(f,",0,0,").concat(c,",").concat(e+l*f,",").concat(t,"\n L ").concat(e+n-l*f,",").concat(t,"\n A ").concat(f,",").concat(f,",0,0,").concat(c,",").concat(e+n,",").concat(t+s*f,"\n L ").concat(e+n,",").concat(t+r-s*f,"\n A ").concat(f,",").concat(f,",0,0,").concat(c,",").concat(e+n-l*f,",").concat(t+r,"\n L ").concat(e+l*f,",").concat(t+r,"\n A ").concat(f,",").concat(f,",0,0,").concat(c,",").concat(e,",").concat(t+r-s*f," Z")}else a="M ".concat(e,",").concat(t," h ").concat(n," v ").concat(r," h ").concat(-n," Z");return a},sy={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},ly=e=>{var t=Cv(e,sy),n=c(null),[o,i]=a(-1);d(()=>{if(n.current&&n.current.getTotalLength)try{var e=n.current.getTotalLength();e&&i(e)}catch(e){}},[]);var{x:s,y:l,width:u,height:p,radius:m,className:h}=t,{animationEasing:g,animationDuration:v,animationBegin:y,isAnimationActive:b,isUpdateAnimationActive:w}=t,x=c(u),k=c(p),N=c(s),S=c(l),C=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"animation-",n=c(bd(t)),r=c(e);return r.current!==e&&(n.current=bd(t),r.current=e),n.current}(f(()=>({x:s,y:l,width:u,height:p,radius:m}),[s,l,u,p,m]),"rectangle-");if(s!==+s||l!==+l||u!==+u||p!==+p||0===u||0===p)return null;var _=ct("recharts-rectangle",h);if(!w){var M=jc(t),{radius:E}=M,O=ay(M,Jv);return r.createElement("path",oy({},O,{radius:"number"==typeof m?m:void 0,className:_,d:iy(s,l,u,p,m)}))}var D=x.current,P=k.current,T=N.current,A=S.current,R="0px ".concat(-1===o?1:o,"px"),I="".concat(o,"px 0px"),j=((e,t,n)=>e.map(e=>{return"".concat((r=e,r.replace(/([A-Z])/g,e=>"-".concat(e.toLowerCase())))," ").concat(t,"ms ").concat(n);var r}).join(","))(["strokeDasharray"],v,"string"==typeof g?g:void 0);return r.createElement(Qv,{animationId:C,key:C,canBegin:o>0,duration:v,easing:g,isActive:w,begin:y},e=>{var o,a=kd(D,u,e),i=kd(P,p,e),c=kd(T,s,e),d=kd(A,l,e);n.current&&(x.current=a,k.current=i,N.current=c,S.current=d),o=b?e>0?{transition:j,strokeDasharray:I}:{strokeDasharray:R}:{strokeDasharray:I};var f=jc(t),{radius:h}=f,g=ay(f,ey);return r.createElement("path",oy({},g,{radius:"number"==typeof m?m:void 0,className:_,d:iy(c,d,a,i,m),ref:n,style:ny(ny({},o),t.style)}))})};function cy(e){var{cx:t,cy:n,radius:r,startAngle:o,endAngle:a}=e;return{points:[Nh(t,n,r,o),Nh(t,n,r,a)],cx:t,cy:n,radius:r,startAngle:o,endAngle:a}}function uy(){return uy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uy.apply(null,arguments)}var dy=e=>{var{cx:t,cy:n,radius:r,angle:o,sign:a,isExternal:i,cornerRadius:s,cornerIsExternal:l}=e,c=s*(i?1:-1)+r,u=Math.asin(s/c)/kh,d=l?o:o+a*u,f=l?o-a*u:o;return{center:Nh(t,n,c,d),circleTangency:Nh(t,n,r,d),lineTangency:Nh(t,n,c*Math.cos(u*kh),f),theta:u}},fy=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:o,startAngle:a,endAngle:i}=e,s=((e,t)=>pd(t-e)*Math.min(Math.abs(t-e),359.999))(a,i),l=a+s,c=Nh(t,n,o,a),u=Nh(t,n,o,l),d="M ".concat(c.x,",").concat(c.y,"\n A ").concat(o,",").concat(o,",0,\n ").concat(+(Math.abs(s)>180),",").concat(+(a>l),",\n ").concat(u.x,",").concat(u.y,"\n ");if(r>0){var f=Nh(t,n,r,a),p=Nh(t,n,r,l);d+="L ".concat(p.x,",").concat(p.y,"\n A ").concat(r,",").concat(r,",0,\n ").concat(+(Math.abs(s)>180),",").concat(+(a<=l),",\n ").concat(f.x,",").concat(f.y," Z")}else d+="L ".concat(t,",").concat(n," Z");return d},py={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},my=e=>{var t=Cv(e,py),{cx:n,cy:o,innerRadius:a,outerRadius:i,cornerRadius:s,forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:d,className:f}=t;if(i<a||u===d)return null;var p,m=ct("recharts-sector",f),h=i-a,g=wd(s,h,0,!0);return p=g>0&&Math.abs(u-d)<360?(e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:o,cornerRadius:a,forceCornerRadius:i,cornerIsExternal:s,startAngle:l,endAngle:c}=e,u=pd(c-l),{circleTangency:d,lineTangency:f,theta:p}=dy({cx:t,cy:n,radius:o,angle:l,sign:u,cornerRadius:a,cornerIsExternal:s}),{circleTangency:m,lineTangency:h,theta:g}=dy({cx:t,cy:n,radius:o,angle:c,sign:-u,cornerRadius:a,cornerIsExternal:s}),v=s?Math.abs(l-c):Math.abs(l-c)-p-g;if(v<0)return i?"M ".concat(f.x,",").concat(f.y,"\n a").concat(a,",").concat(a,",0,0,1,").concat(2*a,",0\n a").concat(a,",").concat(a,",0,0,1,").concat(2*-a,",0\n "):fy({cx:t,cy:n,innerRadius:r,outerRadius:o,startAngle:l,endAngle:c});var y="M ".concat(f.x,",").concat(f.y,"\n A").concat(a,",").concat(a,",0,0,").concat(+(u<0),",").concat(d.x,",").concat(d.y,"\n A").concat(o,",").concat(o,",0,").concat(+(v>180),",").concat(+(u<0),",").concat(m.x,",").concat(m.y,"\n A").concat(a,",").concat(a,",0,0,").concat(+(u<0),",").concat(h.x,",").concat(h.y,"\n ");if(r>0){var{circleTangency:b,lineTangency:w,theta:x}=dy({cx:t,cy:n,radius:r,angle:l,sign:u,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),{circleTangency:k,lineTangency:N,theta:S}=dy({cx:t,cy:n,radius:r,angle:c,sign:-u,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),C=s?Math.abs(l-c):Math.abs(l-c)-x-S;if(C<0&&0===a)return"".concat(y,"L").concat(t,",").concat(n,"Z");y+="L".concat(N.x,",").concat(N.y,"\n A").concat(a,",").concat(a,",0,0,").concat(+(u<0),",").concat(k.x,",").concat(k.y,"\n A").concat(r,",").concat(r,",0,").concat(+(C>180),",").concat(+(u>0),",").concat(b.x,",").concat(b.y,"\n A").concat(a,",").concat(a,",0,0,").concat(+(u<0),",").concat(w.x,",").concat(w.y,"Z")}else y+="L".concat(t,",").concat(n,"Z");return y})({cx:n,cy:o,innerRadius:a,outerRadius:i,cornerRadius:Math.min(g,h/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:d}):fy({cx:n,cy:o,innerRadius:a,outerRadius:i,startAngle:u,endAngle:d}),r.createElement("path",uy({},jc(t),{className:m,d:p}))};function hy(e,t,n){var r,o,a,i;if("horizontal"===e)a=r=t.x,o=n.top,i=n.top+n.height;else if("vertical"===e)i=o=t.y,r=n.left,a=n.left+n.width;else if(null!=t.cx&&null!=t.cy){if("centric"!==e)return cy(t);var{cx:s,cy:l,innerRadius:c,outerRadius:u,angle:d}=t,f=Nh(s,l,c,d),p=Nh(s,l,u,d);r=f.x,o=f.y,a=p.x,i=p.y}return[{x:r,y:o},{x:a,y:i}]}var gy,vy,yy,by,wy,xy={},ky={},Ny={};function Sy(){return gy||(gy=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Jp();e.toNumber=function(e){return t.isSymbol(e)?NaN:Number(e)}}(Ny)),Ny}function Cy(){return vy||(vy=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Sy();e.toFinite=function(e){if(!e)return 0===e?e:0;if((e=t.toNumber(e))===1/0||e===-1/0){return(e<0?-1:1)*Number.MAX_VALUE}return e==e?e:0}}(ky)),ky}function _y(){return yy||(yy=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=um(),n=Cy();e.range=function(e,r,o){o&&"number"!=typeof o&&t.isIterateeCall(e,r,o)&&(r=o=void 0),e=n.toFinite(e),void 0===r?(r=e,e=0):r=n.toFinite(r),o=void 0===o?e<r?1:-1:n.toFinite(o);const a=Math.max(Math.ceil((r-e)/(o||1)),0),i=new Array(a);for(let t=0;t<a;t++)i[t]=e,e+=o;return i}}(xy)),xy}function My(){return wy?by:(wy=1,by=_y().range)}var Ey=_a(My());function Oy(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Dy(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Py(e){let t,n,r;function o(e,r,o=0,a=e.length){if(o<a){if(0!==t(r,r))return a;do{const t=o+a>>>1;n(e[t],r)<0?o=t+1:a=t}while(o<a)}return o}return 2!==e.length?(t=Oy,n=(t,n)=>Oy(e(t),n),r=(t,n)=>e(t)-n):(t=e===Oy||e===Dy?e:Ty,n=e,r=e),{left:o,center:function(e,t,n=0,a=e.length){const i=o(e,t,n,a-1);return i>n&&r(e[i-1],t)>-r(e[i],t)?i-1:i},right:function(e,r,o=0,a=e.length){if(o<a){if(0!==t(r,r))return a;do{const t=o+a>>>1;n(e[t],r)<=0?o=t+1:a=t}while(o<a)}return o}}}function Ty(){return 0}function Ay(e){return null===e?NaN:+e}const Ry=Py(Oy).right;Py(Ay).center;class Iy extends Map{constructor(e,t=zy){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(jy(this,e))}has(e){return super.has(jy(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){const r=t(n);e.has(r)&&(n=e.get(r),e.delete(r));return n}(this,e))}}function jy({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function zy(e){return null!==e&&"object"==typeof e?e.valueOf():e}function Ly(e,t){return(null==e||!(e>=e))-(null==t||!(t>=t))||(e<t?-1:e>t?1:0)}const Fy=Math.sqrt(50),By=Math.sqrt(10),$y=Math.sqrt(2);function Wy(e,t,n){const r=(t-e)/Math.max(0,n),o=Math.floor(Math.log10(r)),a=r/Math.pow(10,o),i=a>=Fy?10:a>=By?5:a>=$y?2:1;let s,l,c;return o<0?(c=Math.pow(10,-o)/i,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)*i,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?Wy(e,t,2*n):[s,l,c]}function Hy(e,t,n){if(!((n=+n)>0))return[];if((e=+e)===(t=+t))return[e];const r=t<e,[o,a,i]=r?Wy(t,e,n):Wy(e,t,n);if(!(a>=o))return[];const s=a-o+1,l=new Array(s);if(r)if(i<0)for(let e=0;e<s;++e)l[e]=(a-e)/-i;else for(let e=0;e<s;++e)l[e]=(a-e)*i;else if(i<0)for(let e=0;e<s;++e)l[e]=(o+e)/-i;else for(let e=0;e<s;++e)l[e]=(o+e)*i;return l}function Uy(e,t,n){return Wy(e=+e,t=+t,n=+n)[2]}function Vy(e,t,n){n=+n;const r=(t=+t)<(e=+e),o=r?Uy(t,e,n):Uy(e,t,n);return(r?-1:1)*(o<0?1/-o:o)}function Yy(e,t){let n;for(const t of e)null!=t&&(n<t||void 0===n&&t>=t)&&(n=t);return n}function Ky(e,t){let n;for(const t of e)null!=t&&(n>t||void 0===n&&t>=t)&&(n=t);return n}function qy(e,t,n=0,r=1/0,o){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(o=void 0===o?Ly:function(e=Oy){if(e===Oy)return Ly;if("function"!=typeof e)throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||0===r?r:(0===e(n,n))-(0===e(t,t))}}(o);r>n;){if(r-n>600){const a=r-n+1,i=t-n+1,s=Math.log(a),l=.5*Math.exp(2*s/3),c=.5*Math.sqrt(s*l*(a-l)/a)*(i-a/2<0?-1:1);qy(e,t,Math.max(n,Math.floor(t-i*l/a+c)),Math.min(r,Math.floor(t+(a-i)*l/a+c)),o)}const a=e[t];let i=n,s=r;for(Gy(e,n,t),o(e[r],a)>0&&Gy(e,n,r);i<s;){for(Gy(e,i,s),++i,--s;o(e[i],a)<0;)++i;for(;o(e[s],a)>0;)--s}0===o(e[n],a)?Gy(e,n,s):(++s,Gy(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function Gy(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Xy(e,t,n=Ay){if((r=e.length)&&!isNaN(t=+t)){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,o=(r-1)*t,a=Math.floor(o),i=+n(e[a],a,e);return i+(+n(e[a+1],a+1,e)-i)*(o-a)}}function Zy(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function Qy(e,t){switch(arguments.length){case 0:break;case 1:"function"==typeof e?this.interpolator(e):this.range(e);break;default:this.domain(e),"function"==typeof t?this.interpolator(t):this.range(t)}return this}const Jy=Symbol("implicit");function eb(){var e=new Iy,t=[],n=[],r=Jy;function o(o){let a=e.get(o);if(void 0===a){if(r!==Jy)return r;e.set(o,a=t.push(o)-1)}return n[a%n.length]}return o.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new Iy;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return o},o.range=function(e){return arguments.length?(n=Array.from(e),o):n.slice()},o.unknown=function(e){return arguments.length?(r=e,o):r},o.copy=function(){return eb(t,n).unknown(r)},Zy.apply(o,arguments),o}function tb(){var e,t,n=eb().unknown(void 0),r=n.domain,o=n.range,a=0,i=1,s=!1,l=0,c=0,u=.5;function d(){var n=r().length,d=i<a,f=d?i:a,p=d?a:i;e=(p-f)/Math.max(1,n-l+2*c),s&&(e=Math.floor(e)),f+=(p-f-e*(n-l))*u,t=e*(1-l),s&&(f=Math.round(f),t=Math.round(t));var m=function(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n;for(var r=-1,o=0|Math.max(0,Math.ceil((t-e)/n)),a=new Array(o);++r<o;)a[r]=e+r*n;return a}(n).map(function(t){return f+e*t});return o(d?m.reverse():m)}return delete n.unknown,n.domain=function(e){return arguments.length?(r(e),d()):r()},n.range=function(e){return arguments.length?([a,i]=e,a=+a,i=+i,d()):[a,i]},n.rangeRound=function(e){return[a,i]=e,a=+a,i=+i,s=!0,d()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(s=!!e,d()):s},n.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),d()):l},n.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),d()):l},n.paddingOuter=function(e){return arguments.length?(c=+e,d()):c},n.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},n.copy=function(){return tb(r(),[a,i]).round(s).paddingInner(l).paddingOuter(c).align(u)},Zy.apply(d(),arguments)}function nb(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return nb(t())},e}function rb(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function ob(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function ab(){}var ib=.7,sb=1/ib,lb="\\s*([+-]?\\d+)\\s*",cb="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ub="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",db=/^#([0-9a-f]{3,8})$/,fb=new RegExp(`^rgb\\(${lb},${lb},${lb}\\)$`),pb=new RegExp(`^rgb\\(${ub},${ub},${ub}\\)$`),mb=new RegExp(`^rgba\\(${lb},${lb},${lb},${cb}\\)$`),hb=new RegExp(`^rgba\\(${ub},${ub},${ub},${cb}\\)$`),gb=new RegExp(`^hsl\\(${cb},${ub},${ub}\\)$`),vb=new RegExp(`^hsla\\(${cb},${ub},${ub},${cb}\\)$`),yb={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function bb(){return this.rgb().formatHex()}function wb(){return this.rgb().formatRgb()}function xb(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=db.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?kb(t):3===n?new Cb(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Nb(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Nb(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=fb.exec(e))?new Cb(t[1],t[2],t[3],1):(t=pb.exec(e))?new Cb(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=mb.exec(e))?Nb(t[1],t[2],t[3],t[4]):(t=hb.exec(e))?Nb(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=gb.exec(e))?Pb(t[1],t[2]/100,t[3]/100,1):(t=vb.exec(e))?Pb(t[1],t[2]/100,t[3]/100,t[4]):yb.hasOwnProperty(e)?kb(yb[e]):"transparent"===e?new Cb(NaN,NaN,NaN,0):null}function kb(e){return new Cb(e>>16&255,e>>8&255,255&e,1)}function Nb(e,t,n,r){return r<=0&&(e=t=n=NaN),new Cb(e,t,n,r)}function Sb(e,t,n,r){return 1===arguments.length?((o=e)instanceof ab||(o=xb(o)),o?new Cb((o=o.rgb()).r,o.g,o.b,o.opacity):new Cb):new Cb(e,t,n,null==r?1:r);var o}function Cb(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function _b(){return`#${Db(this.r)}${Db(this.g)}${Db(this.b)}`}function Mb(){const e=Eb(this.opacity);return`${1===e?"rgb(":"rgba("}${Ob(this.r)}, ${Ob(this.g)}, ${Ob(this.b)}${1===e?")":`, ${e})`}`}function Eb(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ob(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Db(e){return((e=Ob(e))<16?"0":"")+e.toString(16)}function Pb(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ab(e,t,n,r)}function Tb(e){if(e instanceof Ab)return new Ab(e.h,e.s,e.l,e.opacity);if(e instanceof ab||(e=xb(e)),!e)return new Ab;if(e instanceof Ab)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),a=Math.max(t,n,r),i=NaN,s=a-o,l=(a+o)/2;return s?(i=t===a?(n-r)/s+6*(n<r):n===a?(r-t)/s+2:(t-n)/s+4,s/=l<.5?a+o:2-a-o,i*=60):s=l>0&&l<1?0:i,new Ab(i,s,l,e.opacity)}function Ab(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Rb(e){return(e=(e||0)%360)<0?e+360:e}function Ib(e){return Math.max(0,Math.min(1,e||0))}function jb(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}rb(ab,xb,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:bb,formatHex:bb,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Tb(this).formatHsl()},formatRgb:wb,toString:wb}),rb(Cb,Sb,ob(ab,{brighter(e){return e=null==e?sb:Math.pow(sb,e),new Cb(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?ib:Math.pow(ib,e),new Cb(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Cb(Ob(this.r),Ob(this.g),Ob(this.b),Eb(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:_b,formatHex:_b,formatHex8:function(){return`#${Db(this.r)}${Db(this.g)}${Db(this.b)}${Db(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Mb,toString:Mb})),rb(Ab,function(e,t,n,r){return 1===arguments.length?Tb(e):new Ab(e,t,n,null==r?1:r)},ob(ab,{brighter(e){return e=null==e?sb:Math.pow(sb,e),new Ab(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?ib:Math.pow(ib,e),new Ab(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new Cb(jb(e>=240?e-240:e+120,o,r),jb(e,o,r),jb(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new Ab(Rb(this.h),Ib(this.s),Ib(this.l),Eb(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=Eb(this.opacity);return`${1===e?"hsl(":"hsla("}${Rb(this.h)}, ${100*Ib(this.s)}%, ${100*Ib(this.l)}%${1===e?")":`, ${e})`}`}}));var zb=e=>()=>e;function Lb(e){return 1===(e=+e)?Fb:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):zb(isNaN(t)?n:t)}}function Fb(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):zb(isNaN(e)?t:e)}var Bb=function e(t){var n=Lb(t);function r(e,t){var r=n((e=Sb(e)).r,(t=Sb(t)).r),o=n(e.g,t.g),a=n(e.b,t.b),i=Fb(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=a(t),e.opacity=i(t),e+""}}return r.gamma=e,r}(1);function $b(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,o=t.slice();return function(a){for(n=0;n<r;++n)o[n]=e[n]*(1-a)+t[n]*a;return o}}function Wb(e,t){var n,r=t?t.length:0,o=e?Math.min(r,e.length):0,a=new Array(o),i=new Array(r);for(n=0;n<o;++n)a[n]=Gb(e[n],t[n]);for(;n<r;++n)i[n]=t[n];return function(e){for(n=0;n<o;++n)i[n]=a[n](e);return i}}function Hb(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Ub(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Vb(e,t){var n,r={},o={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=Gb(e[n],t[n]):o[n]=t[n];return function(e){for(n in r)o[n]=r[n](e);return o}}var Yb=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Kb=new RegExp(Yb.source,"g");function qb(e,t){var n,r,o,a=Yb.lastIndex=Kb.lastIndex=0,i=-1,s=[],l=[];for(e+="",t+="";(n=Yb.exec(e))&&(r=Kb.exec(t));)(o=r.index)>a&&(o=t.slice(a,o),s[i]?s[i]+=o:s[++i]=o),(n=n[0])===(r=r[0])?s[i]?s[i]+=r:s[++i]=r:(s[++i]=null,l.push({i:i,x:Ub(n,r)})),a=Kb.lastIndex;return a<t.length&&(o=t.slice(a),s[i]?s[i]+=o:s[++i]=o),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function Gb(e,t){var n,r=typeof t;return null==t||"boolean"===r?zb(t):("number"===r?Ub:"string"===r?(n=xb(t))?(t=n,Bb):qb:t instanceof xb?Bb:t instanceof Date?Hb:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?$b:Array.isArray(t)?Wb:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?Vb:Ub)(e,t)}function Xb(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function Zb(e,t){void 0===t&&(t=e,e=Gb);for(var n=0,r=t.length-1,o=t[0],a=new Array(r<0?0:r);n<r;)a[n]=e(o,o=t[++n]);return function(e){var t=Math.max(0,Math.min(r-1,Math.floor(e*=r)));return a[t](e-t)}}function Qb(e){return+e}var Jb=[0,1];function ew(e){return e}function tw(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function nw(e,t,n){var r=e[0],o=e[1],a=t[0],i=t[1];return o<r?(r=tw(o,r),a=n(i,a)):(r=tw(r,o),a=n(a,i)),function(e){return a(r(e))}}function rw(e,t,n){var r=Math.min(e.length,t.length)-1,o=new Array(r),a=new Array(r),i=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++i<r;)o[i]=tw(e[i],e[i+1]),a[i]=n(t[i],t[i+1]);return function(t){var n=Ry(e,t,1,r)-1;return a[n](o[n](t))}}function ow(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function aw(){var e,t,n,r,o,a,i=Jb,s=Jb,l=Gb,c=ew;function u(){var e=Math.min(i.length,s.length);return c!==ew&&(c=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(i[0],i[e-1])),r=e>2?rw:nw,o=a=null,d}function d(t){return null==t||isNaN(t=+t)?n:(o||(o=r(i.map(e),s,l)))(e(c(t)))}return d.invert=function(n){return c(t((a||(a=r(s,i.map(e),Ub)))(n)))},d.domain=function(e){return arguments.length?(i=Array.from(e,Qb),u()):i.slice()},d.range=function(e){return arguments.length?(s=Array.from(e),u()):s.slice()},d.rangeRound=function(e){return s=Array.from(e),l=Xb,u()},d.clamp=function(e){return arguments.length?(c=!!e||ew,u()):c!==ew},d.interpolate=function(e){return arguments.length?(l=e,u()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,u()}}function iw(){return aw()(ew,ew)}function sw(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function lw(e){return(e=sw(Math.abs(e)))?e[1]:NaN}var cw,uw=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function dw(e){if(!(t=uw.exec(e)))throw new Error("invalid format: "+e);var t;return new fw({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function fw(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function pw(e,t){var n=sw(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}dw.prototype=fw.prototype,fw.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var mw={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>pw(100*e,t),r:pw,s:function(e,t){var n=sw(e,t);if(!n)return e+"";var r=n[0],o=n[1],a=o-(cw=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,i=r.length;return a===i?r:a>i?r+new Array(a-i+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+sw(e,Math.max(0,t+a-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function hw(e){return e}var gw,vw,yw,bw=Array.prototype.map,ww=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function xw(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?hw:(t=bw.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var o=e.length,a=[],i=0,s=t[0],l=0;o>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),a.push(e.substring(o-=s,o+s)),!((l+=s+1)>r));)s=t[i=(i+1)%t.length];return a.reverse().join(n)}),o=void 0===e.currency?"":e.currency[0]+"",a=void 0===e.currency?"":e.currency[1]+"",i=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?hw:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(bw.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"−":e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function d(e){var t=(e=dw(e)).fill,n=e.align,d=e.sign,f=e.symbol,p=e.zero,m=e.width,h=e.comma,g=e.precision,v=e.trim,y=e.type;"n"===y?(h=!0,y="g"):mw[y]||(void 0===g&&(g=12),v=!0,y="g"),(p||"0"===t&&"="===n)&&(p=!0,t="0",n="=");var b="$"===f?o:"#"===f&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",w="$"===f?a:/[%p]/.test(y)?l:"",x=mw[y],k=/[defgprs%]/.test(y);function N(e){var o,a,l,f=b,N=w;if("c"===y)N=x(e)+N,e="";else{var S=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:x(Math.abs(e),g),v&&(e=function(e){e:for(var t,n=e.length,r=1,o=-1;r<n;++r)switch(e[r]){case".":o=t=r;break;case"0":0===o&&(o=r),t=r;break;default:if(!+e[r])break e;o>0&&(o=0)}return o>0?e.slice(0,o)+e.slice(t+1):e}(e)),S&&0===+e&&"+"!==d&&(S=!1),f=(S?"("===d?d:c:"-"===d||"("===d?"":d)+f,N=("s"===y?ww[8+cw/3]:"")+N+(S&&"("===d?")":""),k)for(o=-1,a=e.length;++o<a;)if(48>(l=e.charCodeAt(o))||l>57){N=(46===l?i+e.slice(o+1):e.slice(o))+N,e=e.slice(0,o);break}}h&&!p&&(e=r(e,1/0));var C=f.length+e.length+N.length,_=C<m?new Array(m-C+1).join(t):"";switch(h&&p&&(e=r(_+e,_.length?m-N.length:1/0),_=""),n){case"<":e=f+e+N+_;break;case"=":e=f+_+e+N;break;case"^":e=_.slice(0,C=_.length>>1)+f+e+N+_.slice(C);break;default:e=_+f+e+N}return s(e)}return g=void 0===g?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),N.toString=function(){return e+""},N}return{format:d,formatPrefix:function(e,t){var n=d(((e=dw(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(lw(t)/3))),o=Math.pow(10,-r),a=ww[8+r/3];return function(e){return n(o*e)+a}}}}function kw(e,t,n,r){var o,a=Vy(e,t,n);switch((r=dw(null==r?",f":r)).type){case"s":var i=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(o=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(lw(t)/3)))-lw(Math.abs(e)))}(a,i))||(r.precision=o),yw(r,i);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(o=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,lw(t)-lw(e))+1}(a,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=o-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(o=function(e){return Math.max(0,-lw(Math.abs(e)))}(a))||(r.precision=o-2*("%"===r.type))}return vw(r)}function Nw(e){var t=e.domain;return e.ticks=function(e){var n=t();return Hy(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return kw(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,o,a=t(),i=0,s=a.length-1,l=a[i],c=a[s],u=10;for(c<l&&(o=l,l=c,c=o,o=i,i=s,s=o);u-- >0;){if((o=Uy(l,c,n))===r)return a[i]=l,a[s]=c,t(a);if(o>0)l=Math.floor(l/o)*o,c=Math.ceil(c/o)*o;else{if(!(o<0))break;l=Math.ceil(l*o)/o,c=Math.floor(c*o)/o}r=o}return e},e}function Sw(e,t){var n,r=0,o=(e=e.slice()).length-1,a=e[r],i=e[o];return i<a&&(n=r,r=o,o=n,n=a,a=i,i=n),e[r]=t.floor(a),e[o]=t.ceil(i),e}function Cw(e){return Math.log(e)}function _w(e){return Math.exp(e)}function Mw(e){return-Math.log(-e)}function Ew(e){return-Math.exp(-e)}function Ow(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Dw(e){return(t,n)=>-e(-t,n)}function Pw(e){const t=e(Cw,_w),n=t.domain;let r,o,a=10;function i(){return r=function(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}(a),o=function(e){return 10===e?Ow:e===Math.E?Math.exp:t=>Math.pow(e,t)}(a),n()[0]<0?(r=Dw(r),o=Dw(o),e(Mw,Ew)):e(Cw,_w),t}return t.base=function(e){return arguments.length?(a=+e,i()):a},t.domain=function(e){return arguments.length?(n(e),i()):n()},t.ticks=e=>{const t=n();let i=t[0],s=t[t.length-1];const l=s<i;l&&([i,s]=[s,i]);let c,u,d=r(i),f=r(s);const p=null==e?10:+e;let m=[];if(!(a%1)&&f-d<p){if(d=Math.floor(d),f=Math.ceil(f),i>0){for(;d<=f;++d)for(c=1;c<a;++c)if(u=d<0?c/o(-d):c*o(d),!(u<i)){if(u>s)break;m.push(u)}}else for(;d<=f;++d)for(c=a-1;c>=1;--c)if(u=d>0?c/o(-d):c*o(d),!(u<i)){if(u>s)break;m.push(u)}2*m.length<p&&(m=Hy(i,s,p))}else m=Hy(d,f,Math.min(f-d,p)).map(o);return l?m.reverse():m},t.tickFormat=(e,n)=>{if(null==e&&(e=10),null==n&&(n=10===a?"s":","),"function"!=typeof n&&(a%1||null!=(n=dw(n)).precision||(n.trim=!0),n=vw(n)),e===1/0)return n;const i=Math.max(1,a*e/t.ticks().length);return e=>{let t=e/o(Math.round(r(e)));return t*a<a-.5&&(t*=a),t<=i?n(e):""}},t.nice=()=>n(Sw(n(),{floor:e=>o(Math.floor(r(e))),ceil:e=>o(Math.ceil(r(e)))})),t}function Tw(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Aw(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Rw(e){var t=1,n=e(Tw(t),Aw(t));return n.constant=function(n){return arguments.length?e(Tw(t=+n),Aw(t)):t},Nw(n)}function Iw(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function jw(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function zw(e){return e<0?-e*e:e*e}function Lw(e){var t=e(ew,ew),n=1;return t.exponent=function(t){return arguments.length?1===(n=+t)?e(ew,ew):.5===n?e(jw,zw):e(Iw(n),Iw(1/n)):n},Nw(t)}function Fw(){var e=Lw(aw());return e.copy=function(){return ow(e,Fw()).exponent(e.exponent())},Zy.apply(e,arguments),e}function Bw(e){return Math.sign(e)*e*e}gw=xw({thousands:",",grouping:[3],currency:["$",""]}),vw=gw.format,yw=gw.formatPrefix;const $w=new Date,Ww=new Date;function Hw(e,t,n,r){function o(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return o.floor=t=>(e(t=new Date(+t)),t),o.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),o.round=e=>{const t=o(e),n=o.ceil(e);return e-t<n-e?t:n},o.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),o.range=(n,r,a)=>{const i=[];if(n=o.ceil(n),a=null==a?1:Math.floor(a),!(n<r&&a>0))return i;let s;do{i.push(s=new Date(+n)),t(n,a),e(n)}while(s<n&&n<r);return i},o.filter=n=>Hw(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(o.count=(t,r)=>($w.setTime(+t),Ww.setTime(+r),e($w),e(Ww),Math.floor(n($w,Ww))),o.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?o.filter(r?t=>r(t)%e===0:t=>o.count(0,t)%e===0):o:null)),o}const Uw=Hw(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Uw.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?Hw(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Uw:null),Uw.range;const Vw=1e3,Yw=6e4,Kw=36e5,qw=864e5,Gw=6048e5,Xw=2592e6,Zw=31536e6,Qw=Hw(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Vw)},(e,t)=>(t-e)/Vw,e=>e.getUTCSeconds());Qw.range;const Jw=Hw(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Vw)},(e,t)=>{e.setTime(+e+t*Yw)},(e,t)=>(t-e)/Yw,e=>e.getMinutes());Jw.range;const ex=Hw(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Yw)},(e,t)=>(t-e)/Yw,e=>e.getUTCMinutes());ex.range;const tx=Hw(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Vw-e.getMinutes()*Yw)},(e,t)=>{e.setTime(+e+t*Kw)},(e,t)=>(t-e)/Kw,e=>e.getHours());tx.range;const nx=Hw(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Kw)},(e,t)=>(t-e)/Kw,e=>e.getUTCHours());nx.range;const rx=Hw(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Yw)/qw,e=>e.getDate()-1);rx.range;const ox=Hw(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/qw,e=>e.getUTCDate()-1);ox.range;const ax=Hw(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/qw,e=>Math.floor(e/qw));function ix(e){return Hw(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+7*t)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Yw)/Gw)}ax.range;const sx=ix(0),lx=ix(1),cx=ix(2),ux=ix(3),dx=ix(4),fx=ix(5),px=ix(6);function mx(e){return Hw(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)},(e,t)=>(t-e)/Gw)}sx.range,lx.range,cx.range,ux.range,dx.range,fx.range,px.range;const hx=mx(0),gx=mx(1),vx=mx(2),yx=mx(3),bx=mx(4),wx=mx(5),xx=mx(6);hx.range,gx.range,vx.range,yx.range,bx.range,wx.range,xx.range;const kx=Hw(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear()),e=>e.getMonth());kx.range;const Nx=Hw(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear()),e=>e.getUTCMonth());Nx.range;const Sx=Hw(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());Sx.every=e=>isFinite(e=Math.floor(e))&&e>0?Hw(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}):null,Sx.range;const Cx=Hw(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());function _x(e,t,n,r,o,a){const i=[[Qw,1,Vw],[Qw,5,5e3],[Qw,15,15e3],[Qw,30,3e4],[a,1,Yw],[a,5,3e5],[a,15,9e5],[a,30,18e5],[o,1,Kw],[o,3,108e5],[o,6,216e5],[o,12,432e5],[r,1,qw],[r,2,1728e5],[n,1,Gw],[t,1,Xw],[t,3,7776e6],[e,1,Zw]];function s(t,n,r){const o=Math.abs(n-t)/r,a=Py(([,,e])=>e).right(i,o);if(a===i.length)return e.every(Vy(t/Zw,n/Zw,r));if(0===a)return Uw.every(Math.max(Vy(t,n,r),1));const[s,l]=i[o/i[a-1][2]<i[a][2]/o?a-1:a];return s.every(l)}return[function(e,t,n){const r=t<e;r&&([e,t]=[t,e]);const o=n&&"function"==typeof n.range?n:s(e,t,n),a=o?o.range(e,+t+1):[];return r?a.reverse():a},s]}Cx.every=e=>isFinite(e=Math.floor(e))&&e>0?Hw(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null,Cx.range;const[Mx,Ex]=_x(Cx,Nx,hx,ax,nx,ex),[Ox,Dx]=_x(Sx,kx,sx,rx,tx,Jw);function Px(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 Tx(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 Ax(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}var Rx,Ix,jx,zx={"-":"",_:" ",0:"0"},Lx=/^\s*\d+/,Fx=/^%/,Bx=/[\\^$*+?|[\]().{}]/g;function $x(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",a=o.length;return r+(a<n?new Array(n-a+1).join(t)+o:o)}function Wx(e){return e.replace(Bx,"\\$&")}function Hx(e){return new RegExp("^(?:"+e.map(Wx).join("|")+")","i")}function Ux(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function Vx(e,t,n){var r=Lx.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Yx(e,t,n){var r=Lx.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Kx(e,t,n){var r=Lx.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function qx(e,t,n){var r=Lx.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Gx(e,t,n){var r=Lx.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Xx(e,t,n){var r=Lx.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Zx(e,t,n){var r=Lx.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Qx(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Jx(e,t,n){var r=Lx.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function ek(e,t,n){var r=Lx.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function tk(e,t,n){var r=Lx.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function nk(e,t,n){var r=Lx.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function rk(e,t,n){var r=Lx.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function ok(e,t,n){var r=Lx.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function ak(e,t,n){var r=Lx.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function ik(e,t,n){var r=Lx.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function sk(e,t,n){var r=Lx.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function lk(e,t,n){var r=Fx.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function ck(e,t,n){var r=Lx.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function uk(e,t,n){var r=Lx.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function dk(e,t){return $x(e.getDate(),t,2)}function fk(e,t){return $x(e.getHours(),t,2)}function pk(e,t){return $x(e.getHours()%12||12,t,2)}function mk(e,t){return $x(1+rx.count(Sx(e),e),t,3)}function hk(e,t){return $x(e.getMilliseconds(),t,3)}function gk(e,t){return hk(e,t)+"000"}function vk(e,t){return $x(e.getMonth()+1,t,2)}function yk(e,t){return $x(e.getMinutes(),t,2)}function bk(e,t){return $x(e.getSeconds(),t,2)}function wk(e){var t=e.getDay();return 0===t?7:t}function xk(e,t){return $x(sx.count(Sx(e)-1,e),t,2)}function kk(e){var t=e.getDay();return t>=4||0===t?dx(e):dx.ceil(e)}function Nk(e,t){return e=kk(e),$x(dx.count(Sx(e),e)+(4===Sx(e).getDay()),t,2)}function Sk(e){return e.getDay()}function Ck(e,t){return $x(lx.count(Sx(e)-1,e),t,2)}function _k(e,t){return $x(e.getFullYear()%100,t,2)}function Mk(e,t){return $x((e=kk(e)).getFullYear()%100,t,2)}function Ek(e,t){return $x(e.getFullYear()%1e4,t,4)}function Ok(e,t){var n=e.getDay();return $x((e=n>=4||0===n?dx(e):dx.ceil(e)).getFullYear()%1e4,t,4)}function Dk(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+$x(t/60|0,"0",2)+$x(t%60,"0",2)}function Pk(e,t){return $x(e.getUTCDate(),t,2)}function Tk(e,t){return $x(e.getUTCHours(),t,2)}function Ak(e,t){return $x(e.getUTCHours()%12||12,t,2)}function Rk(e,t){return $x(1+ox.count(Cx(e),e),t,3)}function Ik(e,t){return $x(e.getUTCMilliseconds(),t,3)}function jk(e,t){return Ik(e,t)+"000"}function zk(e,t){return $x(e.getUTCMonth()+1,t,2)}function Lk(e,t){return $x(e.getUTCMinutes(),t,2)}function Fk(e,t){return $x(e.getUTCSeconds(),t,2)}function Bk(e){var t=e.getUTCDay();return 0===t?7:t}function $k(e,t){return $x(hx.count(Cx(e)-1,e),t,2)}function Wk(e){var t=e.getUTCDay();return t>=4||0===t?bx(e):bx.ceil(e)}function Hk(e,t){return e=Wk(e),$x(bx.count(Cx(e),e)+(4===Cx(e).getUTCDay()),t,2)}function Uk(e){return e.getUTCDay()}function Vk(e,t){return $x(gx.count(Cx(e)-1,e),t,2)}function Yk(e,t){return $x(e.getUTCFullYear()%100,t,2)}function Kk(e,t){return $x((e=Wk(e)).getUTCFullYear()%100,t,2)}function qk(e,t){return $x(e.getUTCFullYear()%1e4,t,4)}function Gk(e,t){var n=e.getUTCDay();return $x((e=n>=4||0===n?bx(e):bx.ceil(e)).getUTCFullYear()%1e4,t,4)}function Xk(){return"+0000"}function Zk(){return"%"}function Qk(e){return+e}function Jk(e){return Math.floor(+e/1e3)}function eN(e){return new Date(e)}function tN(e){return e instanceof Date?+e:+new Date(+e)}function nN(e,t,n,r,o,a,i,s,l,c){var u=iw(),d=u.invert,f=u.domain,p=c(".%L"),m=c(":%S"),h=c("%I:%M"),g=c("%I %p"),v=c("%a %d"),y=c("%b %d"),b=c("%B"),w=c("%Y");function x(e){return(l(e)<e?p:s(e)<e?m:i(e)<e?h:a(e)<e?g:r(e)<e?o(e)<e?v:y:n(e)<e?b:w)(e)}return u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?f(Array.from(e,tN)):f().map(eN)},u.ticks=function(t){var n=f();return e(n[0],n[n.length-1],null==t?10:t)},u.tickFormat=function(e,t){return null==t?x:c(t)},u.nice=function(e){var n=f();return e&&"function"==typeof e.range||(e=t(n[0],n[n.length-1],null==e?10:e)),e?f(Sw(n,e)):u},u.copy=function(){return ow(u,nN(e,t,n,r,o,a,i,s,l,c))},u}function rN(){var e,t,n,r,o,a=0,i=1,s=ew,l=!1;function c(t){return null==t||isNaN(t=+t)?o:s(0===n?.5:(t=(r(t)-e)*n,l?Math.max(0,Math.min(1,t)):t))}function u(e){return function(t){var n,r;return arguments.length?([n,r]=t,s=e(n,r),c):[s(0),s(1)]}}return c.domain=function(o){return arguments.length?([a,i]=o,e=r(a=+a),t=r(i=+i),n=e===t?0:1/(t-e),c):[a,i]},c.clamp=function(e){return arguments.length?(l=!!e,c):l},c.interpolator=function(e){return arguments.length?(s=e,c):s},c.range=u(Gb),c.rangeRound=u(Xb),c.unknown=function(e){return arguments.length?(o=e,c):o},function(o){return r=o,e=o(a),t=o(i),n=e===t?0:1/(t-e),c}}function oN(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function aN(){var e=Lw(rN());return e.copy=function(){return oN(e,aN()).exponent(e.exponent())},Qy.apply(e,arguments)}function iN(){var e,t,n,r,o,a,i,s=0,l=.5,c=1,u=1,d=ew,f=!1;function p(e){return isNaN(e=+e)?i:(e=.5+((e=+a(e))-t)*(u*e<u*t?r:o),d(f?Math.max(0,Math.min(1,e)):e))}function m(e){return function(t){var n,r,o;return arguments.length?([n,r,o]=t,d=Zb(e,[n,r,o]),p):[d(0),d(.5),d(1)]}}return p.domain=function(i){return arguments.length?([s,l,c]=i,e=a(s=+s),t=a(l=+l),n=a(c=+c),r=e===t?0:.5/(t-e),o=t===n?0:.5/(n-t),u=t<e?-1:1,p):[s,l,c]},p.clamp=function(e){return arguments.length?(f=!!e,p):f},p.interpolator=function(e){return arguments.length?(d=e,p):d},p.range=m(Gb),p.rangeRound=m(Xb),p.unknown=function(e){return arguments.length?(i=e,p):i},function(i){return a=i,e=i(s),t=i(l),n=i(c),r=e===t?0:.5/(t-e),o=t===n?0:.5/(n-t),u=t<e?-1:1,p}}function sN(){var e=Lw(iN());return e.copy=function(){return oN(e,sN()).exponent(e.exponent())},Qy.apply(e,arguments)}!function(e){Rx=function(e){var t=e.dateTime,n=e.date,r=e.time,o=e.periods,a=e.days,i=e.shortDays,s=e.months,l=e.shortMonths,c=Hx(o),u=Ux(o),d=Hx(a),f=Ux(a),p=Hx(i),m=Ux(i),h=Hx(s),g=Ux(s),v=Hx(l),y=Ux(l),b={a:function(e){return i[e.getDay()]},A:function(e){return a[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:dk,e:dk,f:gk,g:Mk,G:Ok,H:fk,I:pk,j:mk,L:hk,m:vk,M:yk,p:function(e){return o[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:Qk,s:Jk,S:bk,u:wk,U:xk,V:Nk,w:Sk,W:Ck,x:null,X:null,y:_k,Y:Ek,Z:Dk,"%":Zk},w={a:function(e){return i[e.getUTCDay()]},A:function(e){return a[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:Pk,e:Pk,f:jk,g:Kk,G:Gk,H:Tk,I:Ak,j:Rk,L:Ik,m:zk,M:Lk,p:function(e){return o[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:Qk,s:Jk,S:Fk,u:Bk,U:$k,V:Hk,w:Uk,W:Vk,x:null,X:null,y:Yk,Y:qk,Z:Xk,"%":Zk},x={a:function(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=v.exec(t.slice(n));return r?(e.m=y.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return S(e,t,n,r)},d:tk,e:tk,f:sk,g:Zx,G:Xx,H:rk,I:rk,j:nk,L:ik,m:ek,M:ok,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1},q:Jx,Q:ck,s:uk,S:ak,u:Yx,U:Kx,V:qx,w:Vx,W:Gx,x:function(e,t,r){return S(e,n,t,r)},X:function(e,t,n){return S(e,r,t,n)},y:Zx,Y:Xx,Z:Qx,"%":lk};function k(e,t){return function(n){var r,o,a,i=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===e.charCodeAt(s)&&(i.push(e.slice(l,s)),null!=(o=zx[r=e.charAt(++s)])?r=e.charAt(++s):o="e"===r?" ":"0",(a=t[r])&&(r=a(n,o)),i.push(r),l=s+1);return i.push(e.slice(l,s)),i.join("")}}function N(e,t){return function(n){var r,o,a=Ax(1900,void 0,1);if(S(a,e,n+="",0)!=n.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(t&&!("Z"in a)&&(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(o=(r=Tx(Ax(a.y,0,1))).getUTCDay(),r=o>4||0===o?gx.ceil(r):gx(r),r=ox.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(o=(r=Px(Ax(a.y,0,1))).getDay(),r=o>4||0===o?lx.ceil(r):lx(r),r=rx.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),o="Z"in a?Tx(Ax(a.y,0,1)).getUTCDay():Px(Ax(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(o+5)%7:a.w+7*a.U-(o+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,Tx(a)):Px(a)}}function S(e,t,n,r){for(var o,a,i=0,s=t.length,l=n.length;i<s;){if(r>=l)return-1;if(37===(o=t.charCodeAt(i++))){if(o=t.charAt(i++),!(a=x[o in zx?t.charAt(i++):o])||(r=a(e,n,r))<0)return-1}else if(o!=n.charCodeAt(r++))return-1}return r}return b.x=k(n,b),b.X=k(r,b),b.c=k(t,b),w.x=k(n,w),w.X=k(r,w),w.c=k(t,w),{format:function(e){var t=k(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=N(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=k(e+="",w);return t.toString=function(){return e},t},utcParse:function(e){var t=N(e+="",!0);return t.toString=function(){return e},t}}}(e),Ix=Rx.format,Rx.parse,jx=Rx.utcFormat,Rx.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var lN=Object.freeze({__proto__:null,scaleBand:tb,scaleDiverging:function e(){var t=Nw(iN()(ew));return t.copy=function(){return oN(t,e())},Qy.apply(t,arguments)},scaleDivergingLog:function e(){var t=Pw(iN()).domain([.1,1,10]);return t.copy=function(){return oN(t,e()).base(t.base())},Qy.apply(t,arguments)},scaleDivergingPow:sN,scaleDivergingSqrt:function(){return sN.apply(null,arguments).exponent(.5)},scaleDivergingSymlog:function e(){var t=Rw(iN());return t.copy=function(){return oN(t,e()).constant(t.constant())},Qy.apply(t,arguments)},scaleIdentity:function e(t){var n;function r(e){return null==e||isNaN(e=+e)?n:e}return r.invert=r,r.domain=r.range=function(e){return arguments.length?(t=Array.from(e,Qb),r):t.slice()},r.unknown=function(e){return arguments.length?(n=e,r):n},r.copy=function(){return e(t).unknown(n)},t=arguments.length?Array.from(t,Qb):[0,1],Nw(r)},scaleImplicit:Jy,scaleLinear:function e(){var t=iw();return t.copy=function(){return ow(t,e())},Zy.apply(t,arguments),Nw(t)},scaleLog:function e(){const t=Pw(aw()).domain([1,10]);return t.copy=()=>ow(t,e()).base(t.base()),Zy.apply(t,arguments),t},scaleOrdinal:eb,scalePoint:function(){return nb(tb.apply(null,arguments).paddingInner(1))},scalePow:Fw,scaleQuantile:function e(){var t,n=[],r=[],o=[];function a(){var e=0,t=Math.max(1,r.length);for(o=new Array(t-1);++e<t;)o[e-1]=Xy(n,e/t);return i}function i(e){return null==e||isNaN(e=+e)?t:r[Ry(o,e)]}return i.invertExtent=function(e){var t=r.indexOf(e);return t<0?[NaN,NaN]:[t>0?o[t-1]:n[0],t<o.length?o[t]:n[n.length-1]]},i.domain=function(e){if(!arguments.length)return n.slice();n=[];for(let t of e)null==t||isNaN(t=+t)||n.push(t);return n.sort(Oy),a()},i.range=function(e){return arguments.length?(r=Array.from(e),a()):r.slice()},i.unknown=function(e){return arguments.length?(t=e,i):t},i.quantiles=function(){return o.slice()},i.copy=function(){return e().domain(n).range(r).unknown(t)},Zy.apply(i,arguments)},scaleQuantize:function e(){var t,n=0,r=1,o=1,a=[.5],i=[0,1];function s(e){return null!=e&&e<=e?i[Ry(a,e,0,o)]:t}function l(){var e=-1;for(a=new Array(o);++e<o;)a[e]=((e+1)*r-(e-o)*n)/(o+1);return s}return s.domain=function(e){return arguments.length?([n,r]=e,n=+n,r=+r,l()):[n,r]},s.range=function(e){return arguments.length?(o=(i=Array.from(e)).length-1,l()):i.slice()},s.invertExtent=function(e){var t=i.indexOf(e);return t<0?[NaN,NaN]:t<1?[n,a[0]]:t>=o?[a[o-1],r]:[a[t-1],a[t]]},s.unknown=function(e){return arguments.length?(t=e,s):s},s.thresholds=function(){return a.slice()},s.copy=function(){return e().domain([n,r]).range(i).unknown(t)},Zy.apply(Nw(s),arguments)},scaleRadial:function e(){var t,n=iw(),r=[0,1],o=!1;function a(e){var r=function(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}(n(e));return isNaN(r)?t:o?Math.round(r):r}return a.invert=function(e){return n.invert(Bw(e))},a.domain=function(e){return arguments.length?(n.domain(e),a):n.domain()},a.range=function(e){return arguments.length?(n.range((r=Array.from(e,Qb)).map(Bw)),a):r.slice()},a.rangeRound=function(e){return a.range(e).round(!0)},a.round=function(e){return arguments.length?(o=!!e,a):o},a.clamp=function(e){return arguments.length?(n.clamp(e),a):n.clamp()},a.unknown=function(e){return arguments.length?(t=e,a):t},a.copy=function(){return e(n.domain(),r).round(o).clamp(n.clamp()).unknown(t)},Zy.apply(a,arguments),Nw(a)},scaleSequential:function e(){var t=Nw(rN()(ew));return t.copy=function(){return oN(t,e())},Qy.apply(t,arguments)},scaleSequentialLog:function e(){var t=Pw(rN()).domain([1,10]);return t.copy=function(){return oN(t,e()).base(t.base())},Qy.apply(t,arguments)},scaleSequentialPow:aN,scaleSequentialQuantile:function e(){var t=[],n=ew;function r(e){if(null!=e&&!isNaN(e=+e))return n((Ry(t,e,1)-1)/(t.length-1))}return r.domain=function(e){if(!arguments.length)return t.slice();t=[];for(let n of e)null==n||isNaN(n=+n)||t.push(n);return t.sort(Oy),r},r.interpolator=function(e){return arguments.length?(n=e,r):n},r.range=function(){return t.map((e,r)=>n(r/(t.length-1)))},r.quantiles=function(e){return Array.from({length:e+1},(n,r)=>function(e,t){if((n=(e=Float64Array.from(function*(e){for(let t of e)null!=t&&(t=+t)>=t&&(yield t)}(e))).length)&&!isNaN(t=+t)){if(t<=0||n<2)return Ky(e);if(t>=1)return Yy(e);var n,r=(n-1)*t,o=Math.floor(r),a=Yy(qy(e,o).subarray(0,o+1));return a+(Ky(e.subarray(o+1))-a)*(r-o)}}(t,r/e))},r.copy=function(){return e(n).domain(t)},Qy.apply(r,arguments)},scaleSequentialSqrt:function(){return aN.apply(null,arguments).exponent(.5)},scaleSequentialSymlog:function e(){var t=Rw(rN());return t.copy=function(){return oN(t,e()).constant(t.constant())},Qy.apply(t,arguments)},scaleSqrt:function(){return Fw.apply(null,arguments).exponent(.5)},scaleSymlog:function e(){var t=Rw(aw());return t.copy=function(){return ow(t,e()).constant(t.constant())},Zy.apply(t,arguments)},scaleThreshold:function e(){var t,n=[.5],r=[0,1],o=1;function a(e){return null!=e&&e<=e?r[Ry(n,e,0,o)]:t}return a.domain=function(e){return arguments.length?(n=Array.from(e),o=Math.min(n.length,r.length-1),a):n.slice()},a.range=function(e){return arguments.length?(r=Array.from(e),o=Math.min(n.length,r.length-1),a):r.slice()},a.invertExtent=function(e){var t=r.indexOf(e);return[n[t-1],n[t]]},a.unknown=function(e){return arguments.length?(t=e,a):t},a.copy=function(){return e().domain(n).range(r).unknown(t)},Zy.apply(a,arguments)},scaleTime:function(){return Zy.apply(nN(Ox,Dx,Sx,kx,sx,rx,tx,Jw,Qw,Ix).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},scaleUtc:function(){return Zy.apply(nN(Mx,Ex,Cx,Nx,hx,ox,nx,ex,Qw,jx).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)},tickFormat:kw}),cN=e=>e.chartData,uN=Wp([cN],e=>{var t=null!=e.chartData?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),dN=(e,t,n,r)=>r?uN(e):cN(e);function fN(e){if(Array.isArray(e)&&2===e.length){var[t,n]=e;if(vg(t)&&vg(n))return!0}return!1}function pN(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function mN(e,t){if(t&&"function"!=typeof e&&Array.isArray(e)&&2===e.length){var n,r,[o,a]=e;if(vg(o))n=o;else if("function"==typeof o)return;if(vg(a))r=a;else if("function"==typeof a)return;var i=[n,r];if(fN(i))return i}}var hN,gN=1e9,vN=!0,yN="[DecimalError] ",bN=yN+"Invalid argument: ",wN=yN+"Exponent out of range: ",xN=Math.floor,kN=Math.pow,NN=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,SN=1e7,CN=9007199254740991,_N=xN(1286742750677284.5),MN={};function EN(e,t){var n,r,o,a,i,s,l,c,u=e.constructor,d=u.precision;if(!e.s||!t.s)return t.s||(t=new u(e)),vN?LN(t,d):t;if(l=e.d,c=t.d,i=e.e,o=t.e,l=l.slice(),a=i-o){for(a<0?(r=l,a=-a,s=c.length):(r=c,o=i,s=l.length),a>(s=(i=Math.ceil(d/7))>s?i+1:s+1)&&(a=s,r.length=1),r.reverse();a--;)r.push(0);r.reverse()}for((s=l.length)-(a=c.length)<0&&(a=s,r=c,c=l,l=r),n=0;a;)n=(l[--a]=l[a]+c[a]+n)/SN|0,l[a]%=SN;for(n&&(l.unshift(n),++o),s=l.length;0==l[--s];)l.pop();return t.d=l,t.e=o,vN?LN(t,d):t}function ON(e,t,n){if(e!==~~e||e<t||e>n)throw Error(bN+e)}function DN(e){var t,n,r,o=e.length-1,a="",i=e[0];if(o>0){for(a+=i,t=1;t<o;t++)(n=7-(r=e[t]+"").length)&&(a+=IN(n)),a+=r;(n=7-(r=(i=e[t])+"").length)&&(a+=IN(n))}else if(0===i)return"0";for(;i%10==0;)i/=10;return a+i}MN.absoluteValue=MN.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e},MN.comparedTo=MN.cmp=function(e){var t,n,r,o,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(t=0,n=(r=a.d.length)<(o=e.d.length)?r:o;t<n;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return r===o?0:r>o^a.s<0?1:-1},MN.decimalPlaces=MN.dp=function(){var e=this,t=e.d.length-1,n=7*(t-e.e);if(t=e.d[t])for(;t%10==0;t/=10)n--;return n<0?0:n},MN.dividedBy=MN.div=function(e){return PN(this,new this.constructor(e))},MN.dividedToIntegerBy=MN.idiv=function(e){var t=this.constructor;return LN(PN(this,new t(e),0,1),t.precision)},MN.equals=MN.eq=function(e){return!this.cmp(e)},MN.exponent=function(){return AN(this)},MN.greaterThan=MN.gt=function(e){return this.cmp(e)>0},MN.greaterThanOrEqualTo=MN.gte=function(e){return this.cmp(e)>=0},MN.isInteger=MN.isint=function(){return this.e>this.d.length-2},MN.isNegative=MN.isneg=function(){return this.s<0},MN.isPositive=MN.ispos=function(){return this.s>0},MN.isZero=function(){return 0===this.s},MN.lessThan=MN.lt=function(e){return this.cmp(e)<0},MN.lessThanOrEqualTo=MN.lte=function(e){return this.cmp(e)<1},MN.logarithm=MN.log=function(e){var t,n=this,r=n.constructor,o=r.precision,a=o+5;if(void 0===e)e=new r(10);else if((e=new r(e)).s<1||e.eq(hN))throw Error(yN+"NaN");if(n.s<1)throw Error(yN+(n.s?"NaN":"-Infinity"));return n.eq(hN)?new r(0):(vN=!1,t=PN(jN(n,a),jN(e,a),a),vN=!0,LN(t,o))},MN.minus=MN.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?FN(t,e):EN(t,(e.s=-e.s,e))},MN.modulo=MN.mod=function(e){var t,n=this,r=n.constructor,o=r.precision;if(!(e=new r(e)).s)throw Error(yN+"NaN");return n.s?(vN=!1,t=PN(n,e,0,1).times(e),vN=!0,n.minus(t)):LN(new r(n),o)},MN.naturalExponential=MN.exp=function(){return TN(this)},MN.naturalLogarithm=MN.ln=function(){return jN(this)},MN.negated=MN.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},MN.plus=MN.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?EN(t,e):FN(t,(e.s=-e.s,e))},MN.precision=MN.sd=function(e){var t,n,r,o=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(bN+e);if(t=AN(o)+1,n=7*(r=o.d.length-1)+1,r=o.d[r]){for(;r%10==0;r/=10)n--;for(r=o.d[0];r>=10;r/=10)n++}return e&&t>n?t:n},MN.squareRoot=MN.sqrt=function(){var e,t,n,r,o,a,i,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(yN+"NaN")}for(e=AN(s),vN=!1,0==(o=Math.sqrt(+s))||o==1/0?(((t=DN(s.d)).length+e)%2==0&&(t+="0"),o=Math.sqrt(t),e=xN((e+1)/2)-(e<0||e%2),r=new l(t=o==1/0?"5e"+e:(t=o.toExponential()).slice(0,t.indexOf("e")+1)+e)):r=new l(o.toString()),o=i=(n=l.precision)+3;;)if(r=(a=r).plus(PN(s,a,i+2)).times(.5),DN(a.d).slice(0,i)===(t=DN(r.d)).slice(0,i)){if(t=t.slice(i-3,i+1),o==i&&"4999"==t){if(LN(a,n+1,0),a.times(a).eq(s)){r=a;break}}else if("9999"!=t)break;i+=4}return vN=!0,LN(r,n)},MN.times=MN.mul=function(e){var t,n,r,o,a,i,s,l,c,u=this,d=u.constructor,f=u.d,p=(e=new d(e)).d;if(!u.s||!e.s)return new d(0);for(e.s*=u.s,n=u.e+e.e,(l=f.length)<(c=p.length)&&(a=f,f=p,p=a,i=l,l=c,c=i),a=[],r=i=l+c;r--;)a.push(0);for(r=c;--r>=0;){for(t=0,o=l+r;o>r;)s=a[o]+p[r]*f[o-r-1]+t,a[o--]=s%SN|0,t=s/SN|0;a[o]=(a[o]+t)%SN|0}for(;!a[--i];)a.pop();return t?++n:a.shift(),e.d=a,e.e=n,vN?LN(e,d.precision):e},MN.toDecimalPlaces=MN.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),void 0===e?n:(ON(e,0,gN),void 0===t?t=r.rounding:ON(t,0,8),LN(n,e+AN(n)+1,t))},MN.toExponential=function(e,t){var n,r=this,o=r.constructor;return void 0===e?n=BN(r,!0):(ON(e,0,gN),void 0===t?t=o.rounding:ON(t,0,8),n=BN(r=LN(new o(r),e+1,t),!0,e+1)),n},MN.toFixed=function(e,t){var n,r,o=this,a=o.constructor;return void 0===e?BN(o):(ON(e,0,gN),void 0===t?t=a.rounding:ON(t,0,8),n=BN((r=LN(new a(o),e+AN(o)+1,t)).abs(),!1,e+AN(r)+1),o.isneg()&&!o.isZero()?"-"+n:n)},MN.toInteger=MN.toint=function(){var e=this,t=e.constructor;return LN(new t(e),AN(e)+1,t.rounding)},MN.toNumber=function(){return+this},MN.toPower=MN.pow=function(e){var t,n,r,o,a,i,s=this,l=s.constructor,c=+(e=new l(e));if(!e.s)return new l(hN);if(!(s=new l(s)).s){if(e.s<1)throw Error(yN+"Infinity");return s}if(s.eq(hN))return s;if(r=l.precision,e.eq(hN))return LN(s,r);if(i=(t=e.e)>=(n=e.d.length-1),a=s.s,i){if((n=c<0?-c:c)<=CN){for(o=new l(hN),t=Math.ceil(r/7+4),vN=!1;n%2&&$N((o=o.times(s)).d,t),0!==(n=xN(n/2));)$N((s=s.times(s)).d,t);return vN=!0,e.s<0?new l(hN).div(o):LN(o,r)}}else if(a<0)throw Error(yN+"NaN");return a=a<0&&1&e.d[Math.max(t,n)]?-1:1,s.s=1,vN=!1,o=e.times(jN(s,r+12)),vN=!0,(o=TN(o)).s=a,o},MN.toPrecision=function(e,t){var n,r,o=this,a=o.constructor;return void 0===e?r=BN(o,(n=AN(o))<=a.toExpNeg||n>=a.toExpPos):(ON(e,1,gN),void 0===t?t=a.rounding:ON(t,0,8),r=BN(o=LN(new a(o),e,t),e<=(n=AN(o))||n<=a.toExpNeg,e)),r},MN.toSignificantDigits=MN.tosd=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(ON(e,1,gN),void 0===t?t=n.rounding:ON(t,0,8)),LN(new n(this),e,t)},MN.toString=MN.valueOf=MN.val=MN.toJSON=MN[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=AN(e),n=e.constructor;return BN(e,t<=n.toExpNeg||t>=n.toExpPos)};var PN=function(){function e(e,t){var n,r=0,o=e.length;for(e=e.slice();o--;)n=e[o]*t+r,e[o]=n%SN|0,r=n/SN|0;return r&&e.unshift(r),e}function t(e,t,n,r){var o,a;if(n!=r)a=n>r?1:-1;else for(o=a=0;o<n;o++)if(e[o]!=t[o]){a=e[o]>t[o]?1:-1;break}return a}function n(e,t,n){for(var r=0;n--;)e[n]-=r,r=e[n]<t[n]?1:0,e[n]=r*SN+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,o,a,i){var s,l,c,u,d,f,p,m,h,g,v,y,b,w,x,k,N,S,C=r.constructor,_=r.s==o.s?1:-1,M=r.d,E=o.d;if(!r.s)return new C(r);if(!o.s)throw Error(yN+"Division by zero");for(l=r.e-o.e,N=E.length,x=M.length,m=(p=new C(_)).d=[],c=0;E[c]==(M[c]||0);)++c;if(E[c]>(M[c]||0)&&--l,(y=null==a?a=C.precision:i?a+(AN(r)-AN(o))+1:a)<0)return new C(0);if(y=y/7+2|0,c=0,1==N)for(u=0,E=E[0],y++;(c<x||u)&&y--;c++)b=u*SN+(M[c]||0),m[c]=b/E|0,u=b%E|0;else{for((u=SN/(E[0]+1)|0)>1&&(E=e(E,u),M=e(M,u),N=E.length,x=M.length),w=N,g=(h=M.slice(0,N)).length;g<N;)h[g++]=0;(S=E.slice()).unshift(0),k=E[0],E[1]>=SN/2&&++k;do{u=0,(s=t(E,h,N,g))<0?(v=h[0],N!=g&&(v=v*SN+(h[1]||0)),(u=v/k|0)>1?(u>=SN&&(u=SN-1),1==(s=t(d=e(E,u),h,f=d.length,g=h.length))&&(u--,n(d,N<f?S:E,f))):(0==u&&(s=u=1),d=E.slice()),(f=d.length)<g&&d.unshift(0),n(h,d,g),-1==s&&(s=t(E,h,N,g=h.length))<1&&(u++,n(h,N<g?S:E,g)),g=h.length):0===s&&(u++,h=[0]),m[c++]=u,s&&h[0]?h[g++]=M[w]||0:(h=[M[w]],g=1)}while((w++<x||void 0!==h[0])&&y--)}return m[0]||m.shift(),p.e=l,LN(p,i?a+AN(p)+1:a)}}();function TN(e,t){var n,r,o,a,i,s=0,l=0,c=e.constructor,u=c.precision;if(AN(e)>16)throw Error(wN+AN(e));if(!e.s)return new c(hN);for(vN=!1,i=u,a=new c(.03125);e.abs().gte(.1);)e=e.times(a),l+=5;for(i+=Math.log(kN(2,l))/Math.LN10*2+5|0,n=r=o=new c(hN),c.precision=i;;){if(r=LN(r.times(e),i),n=n.times(++s),DN((a=o.plus(PN(r,n,i))).d).slice(0,i)===DN(o.d).slice(0,i)){for(;l--;)o=LN(o.times(o),i);return c.precision=u,null==t?(vN=!0,LN(o,u)):o}o=a}}function AN(e){for(var t=7*e.e,n=e.d[0];n>=10;n/=10)t++;return t}function RN(e,t,n){if(t>e.LN10.sd())throw vN=!0,n&&(e.precision=n),Error(yN+"LN10 precision limit exceeded");return LN(new e(e.LN10),t)}function IN(e){for(var t="";e--;)t+="0";return t}function jN(e,t){var n,r,o,a,i,s,l,c,u,d=1,f=e,p=f.d,m=f.constructor,h=m.precision;if(f.s<1)throw Error(yN+(f.s?"NaN":"-Infinity"));if(f.eq(hN))return new m(0);if(null==t?(vN=!1,c=h):c=t,f.eq(10))return null==t&&(vN=!0),RN(m,c);if(c+=10,m.precision=c,r=(n=DN(p)).charAt(0),a=AN(f),!(Math.abs(a)<15e14))return l=RN(m,c+2,h).times(a+""),f=jN(new m(r+"."+n.slice(1)),c-10).plus(l),m.precision=h,null==t?(vN=!0,LN(f,h)):f;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=DN((f=f.times(e)).d)).charAt(0),d++;for(a=AN(f),r>1?(f=new m("0."+n),a++):f=new m(r+"."+n.slice(1)),s=i=f=PN(f.minus(hN),f.plus(hN),c),u=LN(f.times(f),c),o=3;;){if(i=LN(i.times(u),c),DN((l=s.plus(PN(i,new m(o),c))).d).slice(0,c)===DN(s.d).slice(0,c))return s=s.times(2),0!==a&&(s=s.plus(RN(m,c+2,h).times(a+""))),s=PN(s,new m(d),c),m.precision=h,null==t?(vN=!0,LN(s,h)):s;s=l,o+=2}}function zN(e,t){var n,r,o;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);)++r;for(o=t.length;48===t.charCodeAt(o-1);)--o;if(t=t.slice(r,o)){if(o-=r,n=n-r-1,e.e=xN(n/7),e.d=[],r=(n+1)%7,n<0&&(r+=7),r<o){for(r&&e.d.push(+t.slice(0,r)),o-=7;r<o;)e.d.push(+t.slice(r,r+=7));r=7-(t=t.slice(r)).length}else r-=o;for(;r--;)t+="0";if(e.d.push(+t),vN&&(e.e>_N||e.e<-_N))throw Error(wN+n)}else e.s=0,e.e=0,e.d=[0];return e}function LN(e,t,n){var r,o,a,i,s,l,c,u,d=e.d;for(i=1,a=d[0];a>=10;a/=10)i++;if((r=t-i)<0)r+=7,o=t,c=d[u=0];else{if((u=Math.ceil((r+1)/7))>=(a=d.length))return e;for(c=a=d[u],i=1;a>=10;a/=10)i++;o=(r%=7)-7+i}if(void 0!==n&&(s=c/(a=kN(10,i-o-1))%10|0,l=t<0||void 0!==d[u+1]||c%a,l=n<4?(s||l)&&(0==n||n==(e.s<0?3:2)):s>5||5==s&&(4==n||l||6==n&&(r>0?o>0?c/kN(10,i-o):0:d[u-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return l?(a=AN(e),d.length=1,t=t-a-1,d[0]=kN(10,(7-t%7)%7),e.e=xN(-t/7)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(0==r?(d.length=u,a=1,u--):(d.length=u+1,a=kN(10,7-r),d[u]=o>0?(c/kN(10,i-o)%kN(10,o)|0)*a:0),l)for(;;){if(0==u){(d[0]+=a)==SN&&(d[0]=1,++e.e);break}if(d[u]+=a,d[u]!=SN)break;d[u--]=0,a=1}for(r=d.length;0===d[--r];)d.pop();if(vN&&(e.e>_N||e.e<-_N))throw Error(wN+AN(e));return e}function FN(e,t){var n,r,o,a,i,s,l,c,u,d,f=e.constructor,p=f.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new f(e),vN?LN(t,p):t;if(l=e.d,d=t.d,r=t.e,c=e.e,l=l.slice(),i=c-r){for((u=i<0)?(n=l,i=-i,s=d.length):(n=d,r=c,s=l.length),i>(o=Math.max(Math.ceil(p/7),s)+2)&&(i=o,n.length=1),n.reverse(),o=i;o--;)n.push(0);n.reverse()}else{for((u=(o=l.length)<(s=d.length))&&(s=o),o=0;o<s;o++)if(l[o]!=d[o]){u=l[o]<d[o];break}i=0}for(u&&(n=l,l=d,d=n,t.s=-t.s),s=l.length,o=d.length-s;o>0;--o)l[s++]=0;for(o=d.length;o>i;){if(l[--o]<d[o]){for(a=o;a&&0===l[--a];)l[a]=SN-1;--l[a],l[o]+=SN}l[o]-=d[o]}for(;0===l[--s];)l.pop();for(;0===l[0];l.shift())--r;return l[0]?(t.d=l,t.e=r,vN?LN(t,p):t):new f(0)}function BN(e,t,n){var r,o=AN(e),a=DN(e.d),i=a.length;return t?(n&&(r=n-i)>0?a=a.charAt(0)+"."+a.slice(1)+IN(r):i>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(o<0?"e":"e+")+o):o<0?(a="0."+IN(-o-1)+a,n&&(r=n-i)>0&&(a+=IN(r))):o>=i?(a+=IN(o+1-i),n&&(r=n-o-1)>0&&(a=a+"."+IN(r))):((r=o+1)<i&&(a=a.slice(0,r)+"."+a.slice(r)),n&&(r=n-i)>0&&(o+1===i&&(a+="."),a+=IN(r))),e.s<0?"-"+a:a}function $N(e,t){if(e.length>t)return e.length=t,!0}function WN(e){if(!e||"object"!=typeof e)throw Error(yN+"Object expected");var t,n,r,o=["precision",1,gN,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<o.length;t+=3)if(void 0!==(r=e[n=o[t]])){if(!(xN(r)===r&&r>=o[t+1]&&r<=o[t+2]))throw Error(bN+n+": "+r);this[n]=r}if(void 0!==(r=e[n="LN10"])){if(r!=Math.LN10)throw Error(bN+n+": "+r);this[n]=new this(r)}return this}var HN=function e(t){var n,r,o;function a(e){var t=this;if(!(t instanceof a))return new a(e);if(t.constructor=a,e instanceof a)return t.s=e.s,t.e=e.e,void(t.d=(e=e.d)?e.slice():e);if("number"==typeof e){if(0*e!=0)throw Error(bN+e);if(e>0)t.s=1;else{if(!(e<0))return t.s=0,t.e=0,void(t.d=[0]);e=-e,t.s=-1}return e===~~e&&e<1e7?(t.e=0,void(t.d=[e])):zN(t,e.toString())}if("string"!=typeof e)throw Error(bN+e);if(45===e.charCodeAt(0)?(e=e.slice(1),t.s=-1):t.s=1,!NN.test(e))throw Error(bN+e);zN(t,e)}if(a.prototype=MN,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=e,a.config=a.set=WN,void 0===t&&(t={}),t)for(o=["precision","rounding","toExpNeg","toExpPos","LN10"],n=0;n<o.length;)t.hasOwnProperty(r=o[n++])||(t[r]=this[r]);return a.config(t),a}({precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"});hN=new HN(1);var UN=HN,VN=e=>e,YN={},KN=e=>e===YN,qN=e=>function t(){return 0===arguments.length||1===arguments.length&&KN(arguments.length<=0?void 0:arguments[0])?t:e(...arguments)},GN=(e,t)=>1===e?t:qN(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var a=r.filter(e=>e!==YN).length;return a>=e?t(...r):GN(e-a,qN(function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];var a=r.map(e=>KN(e)?n.shift():e);return t(...a,...n)}))}),XN=e=>GN(e.length,e),ZN=(e,t)=>{for(var n=[],r=e;r<t;++r)n[r-e]=r;return n},QN=XN((e,t)=>Array.isArray(t)?t.map(e):Object.keys(t).map(e=>t[e]).map(e)),JN=e=>Array.isArray(e)?e.reverse():e.split("").reverse().join(""),eS=e=>{var t=null,n=null;return function(){for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return t&&o.every((e,n)=>{var r;return e===(null===(r=t)||void 0===r?void 0:r[n])})?n:(t=o,n=e(...o))}};function tS(e){return 0===e?1:Math.floor(new UN(e).abs().log(10).toNumber())+1}function nS(e,t,n){for(var r=new UN(e),o=0,a=[];r.lt(t)&&o<1e5;)a.push(r.toNumber()),r=r.add(n),o++;return a}XN((e,t,n)=>{var r=+e;return r+n*(+t-r)}),XN((e,t,n)=>{var r=t-+e;return(n-e)/(r=r||1/0)}),XN((e,t,n)=>{var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});var rS=e=>{var[t,n]=e,[r,o]=[t,n];return t>n&&([r,o]=[n,t]),[r,o]},oS=(e,t,n)=>{if(e.lte(0))return new UN(0);var r=tS(e.toNumber()),o=new UN(10).pow(r),a=e.div(o),i=1!==r?.05:.1,s=new UN(Math.ceil(a.div(i).toNumber())).add(n).mul(i).mul(o);return new UN(t?s.toNumber():Math.ceil(s.toNumber()))},aS=(e,t,n)=>{var r=new UN(1),o=new UN(e);if(!o.isint()&&n){var a=Math.abs(e);a<1?(r=new UN(10).pow(tS(e)-1),o=new UN(Math.floor(o.div(r).toNumber())).mul(r)):a>1&&(o=new UN(Math.floor(e)))}else 0===e?o=new UN(Math.floor((t-1)/2)):n||(o=new UN(Math.floor(e)));var i=Math.floor((t-1)/2),s=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!t.length)return VN;var r=t.reverse(),o=r[0],a=r.slice(1);return function(){return a.reduce((e,t)=>t(e),o(...arguments))}}(QN(e=>o.add(new UN(e-i).mul(r)).toNumber()),ZN);return s(0,t)},iS=function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new UN(0),tickMin:new UN(0),tickMax:new UN(0)};var a,i=oS(new UN(t).sub(e).div(n-1),r,o);a=e<=0&&t>=0?new UN(0):(a=new UN(e).add(t).div(2)).sub(new UN(a).mod(i));var s=Math.ceil(a.sub(e).div(i).toNumber()),l=Math.ceil(new UN(t).sub(a).div(i).toNumber()),c=s+l+1;return c>n?iS(e,t,n,r,o+1):(c<n&&(l=t>0?l+(n-c):l,s=t>0?s:s+(n-c)),{step:i,tickMin:a.sub(new UN(s).mul(i)),tickMax:a.add(new UN(l).mul(i))})};var sS=eS(function(e){var[t,n]=e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=Math.max(r,2),[i,s]=rS([t,n]);if(i===-1/0||s===1/0){var l=s===1/0?[i,...ZN(0,r-1).map(()=>1/0)]:[...ZN(0,r-1).map(()=>-1/0),s];return t>n?JN(l):l}if(i===s)return aS(i,r,o);var{step:c,tickMin:u,tickMax:d}=iS(i,s,a,o,0),f=nS(u,d.add(new UN(.1).mul(c)),c);return t>n?JN(f):f}),lS=eS(function(e,t){var[n,r]=e,o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],[a,i]=rS([n,r]);if(a===-1/0||i===1/0)return[n,r];if(a===i)return[a];var s=Math.max(t,2),l=oS(new UN(i).sub(a).div(s-1),o,0),c=[...nS(new UN(a),new UN(i),l),i];return!1===o&&(c=c.map(e=>Math.round(e))),n>r?JN(c):c}),cS=e=>e.rootProps.stackOffset,uS=e=>e.options.chartName,dS=e=>e.rootProps.syncId,fS=e=>e.rootProps.syncMethod,pS=e=>e.options.eventEmitter,mS=0,hS="auto",gS=!0,vS=!1,yS=!0,bS=0,wS="auto",xS=!0,kS=5,NS=(e,t)=>{if(e&&t)return null!=e&&e.reversed?[t[1],t[0]]:t},SS={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:mS,includeHidden:!1,name:void 0,reversed:!1,scale:hS,tick:gS,tickCount:void 0,ticks:void 0,type:"category",unit:void 0},CS={allowDataOverflow:vS,allowDecimals:!1,allowDuplicatedCategory:yS,dataKey:void 0,domain:void 0,id:bS,includeHidden:!1,name:void 0,reversed:!1,scale:wS,tick:xS,tickCount:kS,ticks:void 0,type:"number",unit:void 0},_S={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,dataKey:void 0,domain:void 0,id:mS,includeHidden:!1,name:void 0,reversed:!1,scale:hS,tick:gS,tickCount:void 0,ticks:void 0,type:"number",unit:void 0},MS={allowDataOverflow:vS,allowDecimals:!1,allowDuplicatedCategory:yS,dataKey:void 0,domain:void 0,id:bS,includeHidden:!1,name:void 0,reversed:!1,scale:wS,tick:xS,tickCount:kS,ticks:void 0,type:"category",unit:void 0},ES=(e,t)=>null!=e.polarAxis.angleAxis[t]?e.polarAxis.angleAxis[t]:"radial"===e.layout.layoutType?_S:SS,OS=(e,t)=>null!=e.polarAxis.radiusAxis[t]?e.polarAxis.radiusAxis[t]:"radial"===e.layout.layoutType?MS:CS,DS=e=>e.polarOptions,PS=Wp([zh,Lh,Vh],function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(e-(n.left||0)-(n.right||0)),Math.abs(t-(n.top||0)-(n.bottom||0)))/2}),TS=Wp([DS,PS],(e,t)=>{if(null!=e)return wd(e.innerRadius,t,0)}),AS=Wp([DS,PS],(e,t)=>{if(null!=e)return wd(e.outerRadius,t,.8*t)}),RS=Wp([DS],e=>{if(null==e)return[0,0];var{startAngle:t,endAngle:n}=e;return[t,n]});Wp([ES,RS],NS);var IS=Wp([PS,TS,AS],(e,t,n)=>{if(null!=e&&null!=t&&null!=n)return[t,n]});Wp([OS,IS],NS),Wp([Og,DS,TS,AS,zh,Lh],(e,t,n,r,o,a)=>{if(("centric"===e||"radial"===e)&&null!=t&&null!=n&&null!=r){var{cx:i,cy:s,startAngle:l,endAngle:c}=t;return{cx:wd(i,o,o/2),cy:wd(s,a,a/2),innerRadius:n,outerRadius:r,startAngle:l,endAngle:c,clockWise:!1}}});var jS=(e,t)=>t,zS=(e,t,n)=>n;function LS(e){return null==e?void 0:e.id}var FS=e=>{var t=Og(e);return"horizontal"===t?"xAxis":"vertical"===t?"yAxis":"centric"===t?"angleAxis":"radiusAxis"},BS=e=>e.tooltip.settings.axisId,$S=e=>{var t=FS(e),n=BS(e);return oC(e,t,n)},WS=Wp([$S],e=>null==e?void 0:e.dataKey);function HS(e,t,n){var{chartData:r=[]}=t,{allowDuplicatedCategory:o,dataKey:a}=n,i=new Map;return e.forEach(e=>{var t,n=null!==(t=e.data)&&void 0!==t?t:r;if(null!=n&&0!==n.length){var s=LS(e);n.forEach((t,n)=>{var r,l=null==a||o?n:String(Eh(t,a,null)),c=Eh(t,e.dataKey,0);r=i.has(l)?i.get(l):{},Object.assign(r,{[s]:c}),i.set(l,r)})}}),Array.from(i.values())}function US(e){return null!=e.stackId&&null!=e.dataKey}var VS=(e,t)=>e===t||null!=e&&null!=t&&(e[0]===t[0]&&e[1]===t[1]);function YS(e,t){return!(!Array.isArray(e)||!Array.isArray(t)||0!==e.length||0!==t.length)||e===t}function KS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function qS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?KS(Object(n),!0).forEach(function(t){GS(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KS(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function GS(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var XS=[0,"auto"],ZS={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},QS=(e,t)=>{var n=((e,t)=>e.cartesianAxis.xAxis[t])(e,t);return null==n?ZS:n},JS={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:XS,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:60},eC=(e,t)=>{var n=((e,t)=>e.cartesianAxis.yAxis[t])(e,t);return null==n?JS:n},tC={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:""},nC=(e,t)=>{var n=e.cartesianAxis.zAxis[t];return null==n?tC:n},rC=(e,t,n)=>{switch(t){case"xAxis":return QS(e,n);case"yAxis":return eC(e,n);case"zAxis":return nC(e,n);case"angleAxis":return ES(e,n);case"radiusAxis":return OS(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},oC=(e,t,n)=>{switch(t){case"xAxis":return QS(e,n);case"yAxis":return eC(e,n);case"angleAxis":return ES(e,n);case"radiusAxis":return OS(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},aC=e=>e.graphicalItems.cartesianItems.some(e=>"bar"===e.type)||e.graphicalItems.polarItems.some(e=>"radialBar"===e.type);function iC(e,t){return n=>{switch(e){case"xAxis":return"xAxisId"in n&&n.xAxisId===t;case"yAxis":return"yAxisId"in n&&n.yAxisId===t;case"zAxis":return"zAxisId"in n&&n.zAxisId===t;case"angleAxis":return"angleAxisId"in n&&n.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in n&&n.radiusAxisId===t;default:return!1}}}var sC=Wp([jS,zS],iC),lC=(e,t,n)=>e.filter(n).filter(e=>!0===(null==t?void 0:t.includeHidden)||!e.hide),cC=Wp([e=>e.graphicalItems.cartesianItems,rC,sC],lC,{memoizeOptions:{resultEqualityCheck:YS}}),uC=Wp([cC],e=>e.filter(e=>"area"===e.type||"bar"===e.type).filter(US)),dC=e=>e.filter(e=>!("stackId"in e)||void 0===e.stackId),fC=Wp([cC],dC),pC=e=>e.map(e=>e.data).filter(Boolean).flat(1),mC=Wp([cC],pC,{memoizeOptions:{resultEqualityCheck:YS}}),hC=(e,t)=>{var{chartData:n=[],dataStartIndex:r,dataEndIndex:o}=t;return e.length>0?e:n.slice(r,o+1)},gC=Wp([mC,dN],hC),vC=(e,t,n)=>null!=(null==t?void 0:t.dataKey)?e.map(e=>({value:Eh(e,t.dataKey)})):n.length>0?n.map(e=>e.dataKey).flatMap(t=>e.map(e=>({value:Eh(e,t)}))):e.map(e=>({value:e})),yC=Wp([gC,rC,cC],vC);function bC(e,t){switch(e){case"xAxis":return"x"===t.direction;case"yAxis":return"y"===t.direction;default:return!1}}function wC(e){if(vd(e)||e instanceof Date){var t=Number(e);if(vg(t))return t}}function xC(e){if(Array.isArray(e)){var t=[wC(e[0]),wC(e[1])];return fN(t)?t:void 0}var n=wC(e);if(null!=n)return[n,n]}function kC(e){return e.map(wC).filter(Mv)}var NC=Wp([uC,dN,$S],HS),SC=(e,t,n)=>{var r=t.reduce((e,t)=>(null==t.stackId||(null==e[t.stackId]&&(e[t.stackId]=[]),e[t.stackId].push(t)),e),{});return Object.fromEntries(Object.entries(r).map(t=>{var[r,o]=t,a=o.map(LS);return[r,{stackedData:Th(e,a,n),graphicalItems:o}]}))},CC=Wp([NC,uC,cS],SC),_C=(e,t,n,r)=>{var{dataStartIndex:o,dataEndIndex:a}=t;if(null==r&&"zAxis"!==n){var i=Ah(e,o,a);if(null==i||0!==i[0]||0!==i[1])return i}},MC=Wp([rC],e=>e.allowDataOverflow),EC=e=>{var t;if(null==e||!("domain"in e))return XS;if(null!=e.domain)return e.domain;if(null!=e.ticks){if("number"===e.type){var n=kC(e.ticks);return[Math.min(...n),Math.max(...n)]}if("category"===e.type)return e.ticks.map(String)}return null!==(t=null==e?void 0:e.domain)&&void 0!==t?t:XS},OC=Wp([rC],EC),DC=Wp([OC,MC],mN),PC=Wp([CC,cN,jS,DC],_C,{memoizeOptions:{resultEqualityCheck:VS}}),TC=e=>e.errorBars,AC=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.filter(Boolean);if(0!==r.length){var o=r.flat();return[Math.min(...o),Math.max(...o)]}},RC=(e,t,n,r,o)=>{var a,i;if(n.length>0&&e.forEach(e=>{n.forEach(n=>{var s,l,c=null===(s=r[n.id])||void 0===s?void 0:s.filter(e=>bC(o,e)),u=Eh(e,null!==(l=t.dataKey)&&void 0!==l?l:n.dataKey),d=function(e,t,n){return!n||"number"!=typeof t||md(t)?[]:n.length?kC(n.flatMap(n=>{var r,o,a=Eh(e,n.dataKey);if(Array.isArray(a)?[r,o]=a:r=o=a,vg(r)&&vg(o))return[t-r,t+o]})):[]}(e,u,c);if(d.length>=2){var f=Math.min(...d),p=Math.max(...d);(null==a||f<a)&&(a=f),(null==i||p>i)&&(i=p)}var m=xC(u);null!=m&&(a=null==a?m[0]:Math.min(a,m[0]),i=null==i?m[1]:Math.max(i,m[1]))})}),null!=(null==t?void 0:t.dataKey)&&e.forEach(e=>{var n=xC(Eh(e,t.dataKey));null!=n&&(a=null==a?n[0]:Math.min(a,n[0]),i=null==i?n[1]:Math.max(i,n[1]))}),vg(a)&&vg(i))return[a,i]},IC=Wp([gC,rC,fC,TC,jS],RC,{memoizeOptions:{resultEqualityCheck:VS}});function jC(e){var{value:t}=e;if(vd(t)||t instanceof Date)return t}var zC=e=>e.referenceElements.dots,LC=(e,t,n)=>e.filter(e=>"extendDomain"===e.ifOverflow).filter(e=>"xAxis"===t?e.xAxisId===n:e.yAxisId===n),FC=Wp([zC,jS,zS],LC),BC=e=>e.referenceElements.areas,$C=Wp([BC,jS,zS],LC),WC=e=>e.referenceElements.lines,HC=Wp([WC,jS,zS],LC),UC=(e,t)=>{var n=kC(e.map(e=>"xAxis"===t?e.x:e.y));if(0!==n.length)return[Math.min(...n),Math.max(...n)]},VC=Wp(FC,jS,UC),YC=(e,t)=>{var n=kC(e.flatMap(e=>["xAxis"===t?e.x1:e.y1,"xAxis"===t?e.x2:e.y2]));if(0!==n.length)return[Math.min(...n),Math.max(...n)]},KC=Wp([$C,jS],YC),qC=(e,t)=>{var n=kC(e.map(e=>"xAxis"===t?e.x:e.y));if(0!==n.length)return[Math.min(...n),Math.max(...n)]},GC=Wp(HC,jS,qC),XC=Wp(VC,GC,KC,(e,t,n)=>AC(e,n,t)),ZC=(e,t,n,r,o,a,i,s)=>null!=n?n:function(e,t,n){if(n||null!=t){if("function"==typeof e&&null!=t)try{var r=e(t,n);if(fN(r))return pN(r,t,n)}catch(e){}if(Array.isArray(e)&&2===e.length){var o,a,[i,s]=e;if("auto"===i)null!=t&&(o=Math.min(...t));else if(gd(i))o=i;else if("function"==typeof i)try{null!=t&&(o=i(null==t?void 0:t[0]))}catch(e){}else if("string"==typeof i&&Rh.test(i)){var l=Rh.exec(i);if(null==l||null==t)o=void 0;else{var c=+l[1];o=t[0]-c}}else o=null==t?void 0:t[0];if("auto"===s)null!=t&&(a=Math.max(...t));else if(gd(s))a=s;else if("function"==typeof s)try{null!=t&&(a=s(null==t?void 0:t[1]))}catch(e){}else if("string"==typeof s&&Ih.test(s)){var u=Ih.exec(s);if(null==u||null==t)a=void 0;else{var d=+u[1];a=t[1]+d}}else a=null==t?void 0:t[1];var f=[o,a];if(fN(f))return null==t?f:pN(f,t,n)}}}(t,"vertical"===i&&"xAxis"===s||"horizontal"===i&&"yAxis"===s?AC(r,a,o):AC(a,o),e.allowDataOverflow),QC=Wp([rC,OC,DC,PC,IC,XC,Og,jS],ZC,{memoizeOptions:{resultEqualityCheck:VS}}),JC=[0,1],e_=(e,t,n,r,o,a,i)=>{if(null!=e&&null!=n&&0!==n.length||void 0!==i){var{dataKey:s,type:l}=e,c=Oh(t,a);return c&&null==s?Ey(0,n.length):"category"===l?((e,t,n)=>{var r=e.map(jC).filter(e=>null!=e);return n&&(null==t.dataKey||t.allowDuplicatedCategory&&xd(r))?Ey(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))})(r,e,c):"expand"===o?JC:i}},t_=Wp([rC,Og,gC,yC,cS,jS,QC],e_),n_=(e,t,n,r,o)=>{if(null!=e){var{scale:a,type:i}=e;if("auto"===a)return"radial"===t&&"radiusAxis"===o?"band":"radial"===t&&"angleAxis"===o?"linear":"category"===i&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?"point":"category"===i?"band":"linear";if("string"==typeof a){var s="scale".concat(Sd(a));return s in lN?s:"point"}}},r_=Wp([rC,Og,aC,uS,jS],n_);function o_(e,t,n,r){if(null!=n&&null!=r){if("function"==typeof e.scale)return e.scale.copy().domain(n).range(r);var o=function(e){if(null!=e){if(e in lN)return lN[e]();var t="scale".concat(Sd(e));return t in lN?lN[t]():void 0}}(t);if(null!=o){var a=o.domain(n).range(r);return(e=>{var t=e.domain();if(t&&!(t.length<=2)){var n=t.length,r=e.range(),o=Math.min(r[0],r[1])-Dh,a=Math.max(r[0],r[1])+Dh,i=e(t[0]),s=e(t[n-1]);(i<o||i>a||s<o||s>a)&&e.domain([t[0],t[n-1]])}})(a),a}}}var a_=(e,t,n)=>{var r=EC(t);if("auto"===n||"linear"===n)return null!=t&&t.tickCount&&Array.isArray(r)&&("auto"===r[0]||"auto"===r[1])&&fN(e)?sS(e,t.tickCount,t.allowDecimals):null!=t&&t.tickCount&&"number"===t.type&&fN(e)?lS(e,t.tickCount,t.allowDecimals):void 0},i_=Wp([t_,oC,r_],a_),s_=(e,t,n,r)=>{if("angleAxis"!==r&&"number"===(null==e?void 0:e.type)&&fN(t)&&Array.isArray(n)&&n.length>0){var o=t[0],a=n[0],i=t[1],s=n[n.length-1];return[Math.min(o,a),Math.max(i,s)]}return t},l_=Wp([rC,t_,i_,jS],s_),c_=Wp(yC,rC,(e,t)=>{if(t&&"number"===t.type){var n=1/0,r=Array.from(kC(e.map(e=>e.value))).sort((e,t)=>e-t);if(r.length<2)return 1/0;var o=r[r.length-1]-r[0];if(0===o)return 1/0;for(var a=0;a<r.length-1;a++){var i=r[a+1]-r[a];n=Math.min(n,i)}return n/o}}),u_=Wp(c_,Og,e=>e.rootProps.barCategoryGap,Vh,(e,t,n,r)=>r,(e,t,n,r,o)=>{if(!vg(e))return 0;var a="vertical"===t?r.height:r.width;if("gap"===o)return e*a/2;if("no-gap"===o){var i=wd(n,e*a),s=e*a/2;return s-i-(s-i)/a*i}return 0}),d_=Wp(QS,(e,t)=>{var n=QS(e,t);return null==n||"string"!=typeof n.padding?0:u_(e,"xAxis",t,n.padding)},(e,t)=>{var n,r;if(null==e)return{left:0,right:0};var{padding:o}=e;return"string"==typeof o?{left:t,right:t}:{left:(null!==(n=o.left)&&void 0!==n?n:0)+t,right:(null!==(r=o.right)&&void 0!==r?r:0)+t}}),f_=Wp(eC,(e,t)=>{var n=eC(e,t);return null==n||"string"!=typeof n.padding?0:u_(e,"yAxis",t,n.padding)},(e,t)=>{var n,r;if(null==e)return{top:0,bottom:0};var{padding:o}=e;return"string"==typeof o?{top:t,bottom:t}:{top:(null!==(n=o.top)&&void 0!==n?n:0)+t,bottom:(null!==(r=o.bottom)&&void 0!==r?r:0)+t}}),p_=Wp([Vh,d_,eg,Jh,(e,t,n)=>n],(e,t,n,r,o)=>{var{padding:a}=r;return o?[a.left,n.width-a.right]:[e.left+t.left,e.left+e.width-t.right]}),m_=Wp([Vh,Og,f_,eg,Jh,(e,t,n)=>n],(e,t,n,r,o,a)=>{var{padding:i}=o;return a?[r.height-i.bottom,i.top]:"horizontal"===t?[e.top+e.height-n.bottom,e.top+n.top]:[e.top+n.top,e.top+e.height-n.bottom]}),h_=(e,t,n,r)=>{var o;switch(t){case"xAxis":return p_(e,n,r);case"yAxis":return m_(e,n,r);case"zAxis":return null===(o=nC(e,n))||void 0===o?void 0:o.range;case"angleAxis":return RS(e);case"radiusAxis":return IS(e,n);default:return}},g_=Wp([rC,h_],NS),v_=Wp([rC,r_,l_,g_],o_);function y_(e,t){return e.id<t.id?-1:e.id>t.id?1:0}Wp([cC,TC,jS],(e,t,n)=>e.flatMap(e=>t[e.id]).filter(Boolean).filter(e=>bC(n,e)));var b_=(e,t)=>t,w_=(e,t,n)=>n,x_=Wp(Bh,b_,w_,(e,t,n)=>e.filter(e=>e.orientation===t).filter(e=>e.mirror===n).sort(y_)),k_=Wp($h,b_,w_,(e,t,n)=>e.filter(e=>e.orientation===t).filter(e=>e.mirror===n).sort(y_)),N_=(e,t)=>({width:e.width,height:t.height});Wp(Vh,QS,N_);var S_=Wp(Lh,Vh,x_,b_,w_,(e,t,n,r,o)=>{var a,i={};return n.forEach(n=>{var s=N_(t,n);null==a&&(a=((e,t,n)=>{switch(t){case"top":return e.top;case"bottom":return n-e.bottom;default:return 0}})(t,r,e));var l="top"===r&&!o||"bottom"===r&&o;i[n.id]=a-Number(l)*s.height,a+=(l?-1:1)*s.height}),i}),C_=Wp(zh,Vh,k_,b_,w_,(e,t,n,r,o)=>{var a,i={};return n.forEach(n=>{var s=((e,t)=>({width:"number"==typeof t.width?t.width:60,height:e.height}))(t,n);null==a&&(a=((e,t,n)=>{switch(t){case"left":return e.left;case"right":return n-e.right;default:return 0}})(t,r,e));var l="left"===r&&!o||"right"===r&&o;i[n.id]=a-Number(l)*s.width,a+=(l?-1:1)*s.width}),i});Wp([Vh,QS,(e,t)=>{var n=QS(e,t);if(null!=n)return S_(e,n.orientation,n.mirror)},(e,t)=>t],(e,t,n,r)=>{if(null!=t){var o=null==n?void 0:n[r];return null==o?{x:e.left,y:0}:{x:e.left,y:o}}});Wp([Vh,eC,(e,t)=>{var n=eC(e,t);if(null!=n)return C_(e,n.orientation,n.mirror)},(e,t)=>t],(e,t,n,r)=>{if(null!=t){var o=null==n?void 0:n[r];return null==o?{x:0,y:e.top}:{x:o,y:e.top}}}),Wp(Vh,eC,(e,t)=>({width:"number"==typeof t.width?t.width:60,height:e.height}));var __=(e,t,n,r)=>{if(null!=n){var{allowDuplicatedCategory:o,type:a,dataKey:i}=n,s=Oh(e,r),l=t.map(e=>e.value);return i&&s&&"category"===a&&o&&xd(l)?l:void 0}},M_=Wp([Og,yC,rC,jS],__),E_=(e,t,n,r)=>{if(null!=n&&null!=n.dataKey){var{type:o,scale:a}=n;return!Oh(e,r)||"number"!==o&&"auto"===a?void 0:t.map(e=>e.value)}},O_=Wp([Og,yC,oC,jS],E_);Wp([Og,(e,t,n)=>{switch(t){case"xAxis":return QS(e,n);case"yAxis":return eC(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},r_,v_,M_,O_,h_,i_,jS],(e,t,n,r,o,a,i,s,l)=>{if(null==t)return null;var c=Oh(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:a,duplicateDomain:o,isCategorical:c,niceTicks:s,range:i,realScaleType:n,scale:r}});Wp([Og,oC,r_,v_,i_,h_,M_,O_,jS],(e,t,n,r,o,a,i,s,l)=>{if(null!=t&&null!=r){var c=Oh(e,l),{type:u,ticks:d,tickCount:f}=t,p="scaleBand"===n&&"function"==typeof r.bandwidth?r.bandwidth()/2:2,m="category"===u&&r.bandwidth?r.bandwidth()/p:0;m="angleAxis"===l&&null!=a&&a.length>=2?2*pd(a[0]-a[1])*m:m;var h=d||o;if(h){var g=h.map((e,t)=>{var n=i?i.indexOf(e):e;return{index:t,coordinate:r(n)+m,value:e,offset:m}});return g.filter(e=>!md(e.coordinate))}return c&&s?s.map((e,t)=>({coordinate:r(e)+m,value:e,index:t,offset:m})):r.ticks?r.ticks(f).map(e=>({coordinate:r(e)+m,value:e,offset:m})):r.domain().map((e,t)=>({coordinate:r(e)+m,value:i?i[e]:e,index:t,offset:m}))}});Wp([Og,oC,v_,h_,M_,O_,jS],(e,t,n,r,o,a,i)=>{if(null!=t&&null!=n&&null!=r&&r[0]!==r[1]){var s=Oh(e,i),{tickCount:l}=t,c=0;return c="angleAxis"===i&&(null==r?void 0:r.length)>=2?2*pd(r[0]-r[1])*c:c,s&&a?a.map((e,t)=>({coordinate:n(e)+c,value:e,index:t,offset:c})):n.ticks?n.ticks(l).map(e=>({coordinate:n(e)+c,value:e,offset:c})):n.domain().map((e,t)=>({coordinate:n(e)+c,value:o?o[e]:e,index:t,offset:c}))}}),Wp(rC,v_,(e,t)=>{if(null!=e&&null!=t)return qS(qS({},e),{},{scale:t})});var D_=Wp([rC,r_,t_,g_],o_);Wp((e,t,n)=>nC(e,n),D_,(e,t)=>{if(null!=e&&null!=t)return qS(qS({},e),{},{scale:t})}),Wp([Og,Bh,$h],(e,t,n)=>{switch(e){case"horizontal":return t.some(e=>e.reversed)?"right-to-left":"left-to-right";case"vertical":return n.some(e=>e.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}});var P_=e=>e.options.defaultTooltipEventType,T_=e=>e.options.validateTooltipEventTypes;function A_(e,t,n){if(null==e)return t;var r=e?"axis":"item";return null==n?t:n.includes(r)?r:t}function R_(e){return Dp(t=>function(e,t){return A_(t,P_(e),T_(e))}(t,e))}var I_=(e,t)=>{var n,r=Number(t);if(!md(r)&&null!=t)return r>=0?null==e||null===(n=e[r])||void 0===n?void 0:n.value:void 0},j_={active:!1,index:null,dataKey:void 0,coordinate:void 0},z_=bh({name:"tooltip",initialState:{itemInteraction:{click:j_,hover:j_},axisInteraction:{click:j_,hover:j_},keyboardInteraction:j_,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:ph()},removeTooltipEntrySettings:{reducer(e,t){var n=ah(e).tooltipItemPayloads.indexOf(t.payload);n>-1&&e.tooltipItemPayloads.splice(n,1)},prepare:ph()},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.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.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,e.keyboardInteraction.dataKey=t.payload.activeDataKey}}}),{addTooltipEntrySettings:L_,removeTooltipEntrySettings:F_,setTooltipSettingsState:B_,setActiveMouseOverItemIndex:$_,mouseLeaveItem:W_,mouseLeaveChart:H_,setActiveClickItemIndex:U_,setMouseOverAxisIndex:V_,setMouseClickAxisIndex:Y_,setSyncInteraction:K_,setKeyboardInteraction:q_}=z_.actions;function G_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function X_(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?G_(Object(n),!0).forEach(function(t){Z_(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G_(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Z_(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Q_=(e,t,n,r)=>{if(null==t)return j_;var o=function(e,t,n){return"axis"===t?"click"===n?e.axisInteraction.click:e.axisInteraction.hover:"click"===n?e.itemInteraction.click:e.itemInteraction.hover}(e,t,n);if(null==o)return j_;if(o.active)return o;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&null!=e.syncInteraction.index)return e.syncInteraction;var a=!0===e.settings.active;if(null!=o.index){if(a)return X_(X_({},o),{},{active:!0})}else if(null!=r)return{active:!0,coordinate:void 0,dataKey:void 0,index:r};return X_(X_({},j_),{},{coordinate:o.coordinate})},J_=(e,t)=>{var n=null==e?void 0:e.index;if(null==n)return null;var r=Number(n);if(!vg(r))return n;var o=1/0;return t.length>0&&(o=t.length-1),String(Math.max(0,Math.min(r,o)))},eM=(e,t,n,r,o,a,i,s)=>{if(null!=a&&null!=s){var l=i[0],c=null==l?void 0:s(l.positions,a);if(null!=c)return c;var u=null==o?void 0:o[Number(a)];if(u)return"horizontal"===n?{x:u.coordinate,y:(r.top+t)/2}:{x:(r.left+e)/2,y:u.coordinate}}},tM=(e,t,n,r)=>{return"axis"===t?e.tooltipItemPayloads:0===e.tooltipItemPayloads.length?[]:null==(o="hover"===n?e.itemInteraction.hover.dataKey:e.itemInteraction.click.dataKey)&&null!=r?[e.tooltipItemPayloads[0]]:e.tooltipItemPayloads.filter(e=>{var t;return(null===(t=e.settings)||void 0===t?void 0:t.dataKey)===o});var o},nM=e=>e.options.tooltipPayloadSearcher,rM=e=>e.tooltip;function oM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function aM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oM(Object(n),!0).forEach(function(t){iM(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function iM(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var sM=(e,t,n,r,o,a,i)=>{if(null!=t&&null!=a){var{chartData:s,computedData:l,dataStartIndex:c,dataEndIndex:u}=n;return e.reduce((e,n)=>{var d,f,p,{dataDefinedOnItem:m,settings:h}=n,g=function(e,t){return null!=e?e:t}(m,s),v=Array.isArray(g)?Sh(g,c,u):g,y=null!==(d=null==h?void 0:h.dataKey)&&void 0!==d?d:r,b=null==h?void 0:h.nameKey;(f=r&&Array.isArray(v)&&!Array.isArray(v[0])&&"axis"===i?function(e,t,n){if(e&&e.length)return e.find(e=>e&&("function"==typeof t?t(e):fd(e,t))===n)}(v,r,o):a(v,t,l,b),Array.isArray(f))?f.forEach(t=>{var n=aM(aM({},h),{},{name:t.name,unit:t.unit,color:void 0,fill:void 0});e.push(jh({tooltipEntrySettings:n,dataKey:t.dataKey,payload:t.payload,value:Eh(t.payload,t.dataKey),name:t.name}))}):e.push(jh({tooltipEntrySettings:h,dataKey:y,payload:f,value:Eh(f,y),name:null!==(p=Eh(f,b))&&void 0!==p?p:null==h?void 0:h.name}));return e},[])}},lM=Wp([$S,Og,aC,uS,FS],n_),cM=Wp([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),uM=Wp([FS,BS],iC),dM=Wp([cM,$S,uM],lC,{memoizeOptions:{resultEqualityCheck:YS}}),fM=Wp([dM],e=>e.filter(US)),pM=Wp([dM],pC,{memoizeOptions:{resultEqualityCheck:YS}}),mM=Wp([pM,cN],hC),hM=Wp([fM,cN,$S],HS),gM=Wp([mM,$S,dM],vC),vM=Wp([$S],EC),yM=Wp([$S],e=>e.allowDataOverflow),bM=Wp([vM,yM],mN),wM=Wp([dM],e=>e.filter(US)),xM=Wp([hM,wM,cS],SC),kM=Wp([xM,cN,FS,bM],_C),NM=Wp([dM],dC),SM=Wp([mM,$S,NM,TC,FS],RC,{memoizeOptions:{resultEqualityCheck:VS}}),CM=Wp([zC,FS,BS],LC),_M=Wp([CM,FS],UC),MM=Wp([BC,FS,BS],LC),EM=Wp([MM,FS],YC),OM=Wp([WC,FS,BS],LC),DM=Wp([OM,FS],qC),PM=Wp([_M,DM,EM],AC),TM=Wp([$S,vM,bM,kM,SM,PM,Og,FS],ZC),AM=Wp([$S,Og,mM,gM,cS,FS,TM],e_),RM=Wp([AM,$S,lM],a_),IM=Wp([$S,AM,RM,FS],s_),jM=e=>{var t=FS(e),n=BS(e);return h_(e,t,n,!1)},zM=Wp([$S,jM],NS),LM=Wp([$S,lM,IM,zM],o_),FM=Wp([Og,gM,$S,FS],__),BM=Wp([Og,gM,$S,FS],E_),$M=Wp([Og,$S,lM,LM,jM,FM,BM,FS],(e,t,n,r,o,a,i,s)=>{if(t){var{type:l}=t,c=Oh(e,s);if(r){var u="scaleBand"===n&&r.bandwidth?r.bandwidth()/2:2,d="category"===l&&r.bandwidth?r.bandwidth()/u:0;return d="angleAxis"===s&&null!=o&&(null==o?void 0:o.length)>=2?2*pd(o[0]-o[1])*d:d,c&&i?i.map((e,t)=>({coordinate:r(e)+d,value:e,index:t,offset:d})):r.domain().map((e,t)=>({coordinate:r(e)+d,value:a?a[e]:e,index:t,offset:d}))}}}),WM=Wp([P_,T_,e=>e.tooltip.settings],(e,t,n)=>A_(n.shared,e,t)),HM=e=>e.tooltip.settings.trigger,UM=e=>e.tooltip.settings.defaultIndex,VM=Wp([rM,WM,HM,UM],Q_),YM=Wp([VM,mM],J_),KM=Wp([$M,YM],I_);Wp([VM],e=>{if(e)return e.dataKey});var qM=Wp([rM,WM,HM,UM],tM),GM=Wp([zh,Lh,Og,Vh,$M,UM,qM,nM],eM);Wp([VM,GM],(e,t)=>null!=e&&e.coordinate?e.coordinate:t),Wp([VM],e=>e.active);var XM=Wp([qM,YM,cN,WS,KM,nM,WM],sM);function ZM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function QM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ZM(Object(n),!0).forEach(function(t){JM(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function JM(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Wp([XM],e=>{if(null!=e){var t=e.map(e=>e.payload).filter(e=>null!=e);return Array.from(new Set(t))}});var eE=()=>{var e=Dp($S),t=Dp($M),n=Dp(LM);return((e,t)=>{if(e&&e.scale&&e.scale.bandwidth)return e.scale.bandwidth();if(e&&t&&t.length>=2){for(var n=pm(t,e=>e.coordinate),r=1/0,o=1,a=n.length;o<a;o++){var i=n[o],s=n[o-1];r=Math.min((i.coordinate||0)-(s.coordinate||0),r)}return r===1/0?0:r}return 0})(QM(QM({},e),{},{scale:n}),t)},tE=(e,t)=>t,nE=(e,t,n)=>n,rE=(e,t,n,r)=>r;Wp($M,e=>pm(e,e=>e.coordinate));var oE=Wp([rM,tE,nE,rE],Q_),aE=Wp([oE,mM],J_),iE=Wp([rM,tE,nE,rE],tM),sE=Wp([zh,Lh,Og,Vh,$M,rE,iE,nM],eM),lE=Wp([oE,sE],(e,t)=>{var n;return null!==(n=e.coordinate)&&void 0!==n?n:t}),cE=Wp($M,aE,I_),uE=Wp([iE,aE,cN,WS,cE,nM,tE],sM),dE=Wp([oE],e=>({isActive:e.active,activeIndex:e.index}));function fE(){return fE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fE.apply(null,arguments)}function pE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function mE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pE(Object(n),!0).forEach(function(t){hE(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pE(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function hE(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gE(e){var t,n,{coordinate:r,payload:o,index:a,offset:i,tooltipAxisBandSize:s,layout:l,cursor:c,tooltipEventType:u,chartName:d}=e,f=r,m=o,h=a;if(!c||!f||"ScatterChart"!==d&&"axis"!==u)return null;if("ScatterChart"===d)t=f,n=kv;else if("BarChart"===d)t=function(e,t,n,r){var o=r/2;return{stroke:"none",fill:"#ccc",x:"horizontal"===e?t.x-o:n.left+.5,y:"horizontal"===e?n.top+.5:t.y-o,width:"horizontal"===e?r:n.width-1,height:"horizontal"===e?n.height-1:r}}(l,f,i,s),n=ly;else if("radial"===l){var{cx:g,cy:b,radius:w,startAngle:x,endAngle:k}=cy(f);t={cx:g,cy:b,startAngle:x,endAngle:k,innerRadius:w,outerRadius:w},n=my}else t={points:hy(l,f,i)},n=gv;var N,S="object"==typeof c&&"className"in c?c.className:void 0,C=mE(mE(mE(mE({stroke:"#ccc",pointerEvents:"none"},i),t),null==(N=c)?null:p(N)&&"object"==typeof N.props&&null!==N.props?Ic(N.props):"object"!=typeof N||Array.isArray(N)?null:Ic(N)),{},{payload:m,payloadIndex:h,className:ct("recharts-tooltip-cursor",S)});return p(c)?v(c,C):y(n,C)}function vE(e){var t,n=eE(),o=null!==(t=Dp(Vh))&&void 0!==t?t:Eg,a=Dp(Og),i=Dp(uS);return r.createElement(gE,fE({},e,{coordinate:e.coordinate,index:e.index,payload:e.payload,offset:o,layout:a,tooltipAxisBandSize:n,chartName:i}))}var yE,bE=i(null),wE={exports:{}};var xE=(yE||(yE=1,function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function a(e,t,r,a,i){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new o(r,a||e,i),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function i(e,t){0===--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,o=[];if(0===this._eventsCount)return o;for(r in e=this._events)t.call(e,r)&&o.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var o=0,a=r.length,i=new Array(a);o<a;o++)i[o]=r[o].fn;return i},s.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},s.prototype.emit=function(e,t,r,o,a,i){var s=n?n+e:e;if(!this._events[s])return!1;var l,c,u=this._events[s],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,r),!0;case 4:return u.fn.call(u.context,t,r,o),!0;case 5:return u.fn.call(u.context,t,r,o,a),!0;case 6:return u.fn.call(u.context,t,r,o,a,i),!0}for(c=1,l=new Array(d-1);c<d;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var f,p=u.length;for(c=0;c<p;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),d){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,r);break;case 4:u[c].fn.call(u[c].context,t,r,o);break;default:if(!l)for(f=1,l=new Array(d-1);f<d;f++)l[f-1]=arguments[f];u[c].fn.apply(u[c].context,l)}}return!0},s.prototype.on=function(e,t,n){return a(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return a(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,o){var a=n?n+e:e;if(!this._events[a])return this;if(!t)return i(this,a),this;var s=this._events[a];if(s.fn)s.fn!==t||o&&!s.once||r&&s.context!==r||i(this,a);else{for(var l=0,c=[],u=s.length;l<u;l++)(s[l].fn!==t||o&&!s[l].once||r&&s[l].context!==r)&&c.push(s[l]);c.length?this._events[a]=1===c.length?c[0]:c:i(this,a)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&i(this,t)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s}(wE)),wE.exports),kE=new(_a(xE));function NE(e){return e.tooltip.syncInteraction}function SE(e,t,n,r,o,a){var i=Dp(n=>((e,t,n)=>{if(null!=t){var r=rM(e);return"axis"===t?"hover"===n?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:"hover"===n?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}})(n,e,t)),s=Dp(pS),l=Dp(dS),c=Dp(fS),u=Dp(NE),f=null==u?void 0:u.active,p=Mg();d(()=>{if(!f&&null!=l&&null!=s){var e=K_({active:a,coordinate:n,dataKey:i,index:o,label:"number"==typeof r?String(r):r,sourceViewBox:p});kE.emit("recharts.syncEvent.tooltip",l,e,s)}},[f,n,i,o,r,s,l,c,a,p])}function CE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?CE(Object(n),!0).forEach(function(t){ME(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CE(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ME(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EE(e){return e.dataKey}var OE=[],DE={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,isAnimationActive:!iv,itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};const PE={light:"",dark:".dark"},TE=r.createContext(null);function AE(){const e=r.useContext(TE);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}function RE({id:t,className:o,children:a,config:i,...s}){const l=r.useId(),c=`chart-${t||l.replace(/:/g,"")}`;return e(TE.Provider,{value:{config:i},children:n("div",{"data-slot":"chart","data-chart":c,className:vn("[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-surface]:outline-hidden flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-sector[stroke='#fff']]:stroke-transparent",o),...s,children:[e(IE,{id:c,config:i}),e(_g,{children:a})]})})}const IE=({id:t,config:n})=>{const r=Object.entries(n).filter(([,e])=>e.theme||e.color);return r.length?e("style",{dangerouslySetInnerHTML:{__html:Object.entries(PE).map(([e,n])=>`\n${n} [data-chart=${t}] {\n${r.map(([t,n])=>{const r=n.theme?.[e]||n.color;return r?` --color-${t}: ${r};`:null}).join("\n")}\n}\n`).join("\n")}}):null},jE=function(e){var t=Cv(e,DE),{active:n,allowEscapeViewBox:o,animationDuration:a,animationEasing:i,content:l,filterNull:c,isAnimationActive:u,offset:f,payloadUniqBy:p,position:m,reverseDirection:h,useTranslate3d:g,wrapperStyle:v,cursor:y,shared:b,trigger:w,defaultIndex:k,portal:N,axisId:S}=t,C=_p(),_="number"==typeof k?String(k):k;d(()=>{C(B_({shared:b,trigger:w,axisId:S,active:n,defaultIndex:_}))},[C,b,w,S,n,_]);var M=Mg(),E=Dp(e=>e.rootProps.accessibilityLayer),O=R_(b),{activeIndex:D,isActive:P}=Dp(e=>dE(e,O,w,_)),T=Dp(e=>uE(e,O,w,_)),A=Dp(e=>cE(e,O,w,_)),R=Dp(e=>lE(e,O,w,_)),I=T,j=s(bE),z=null!=n?n:P,[L,F]=gm([I,z]),B="axis"===O?A:void 0;SE(O,w,R,B,D,z);var $=null!=N?N:j;if(null==$)return null;var W=null!=I?I:OE;z||(W=OE),c&&W.length&&(W=gp(I.filter(e=>null!=e.value&&(!0!==e.hide||t.includeHidden)),p,EE));var H=W.length>0,U=r.createElement(av,{allowEscapeViewBox:o,animationDuration:a,animationEasing:i,isAnimationActive:u,active:z,coordinate:R,hasPayload:H,offset:f,position:m,reverseDirection:h,useTranslate3d:g,viewBox:M,wrapperStyle:v,lastBoundingBox:L,innerRef:F,hasPortalFromProps:Boolean(N)},function(e,t){return r.isValidElement(e)?r.cloneElement(e,t):"function"==typeof e?r.createElement(e,t):r.createElement(Zg,t)}(l,_E(_E({},t),{},{payload:W,label:B,active:z,coordinate:R,accessibilityLayer:E})));return r.createElement(r.Fragment,null,x(U,$),z&&r.createElement(vE,{cursor:y,tooltipEventType:O,coordinate:R,payload:I,index:D}))};function zE({active:o,payload:a,className:i,indicator:s="dot",hideLabel:l=!1,hideIndicator:c=!1,label:u,labelFormatter:d,labelClassName:f,formatter:p,color:m,nameKey:h,labelKey:g}){const{config:v}=AE(),y=r.useMemo(()=>{if(l||!a?.length)return null;const[t]=a,n=BE(v,t,`${g||t?.dataKey||t?.name||"value"}`),r=g||"string"!=typeof u?n?.label:v[u]?.label||u;return d?e("div",{className:vn("font-medium",f),children:d(r,a)}):r?e("div",{className:vn("font-medium",f),children:r}):null},[u,d,a,l,f,v,g]);if(!o||!a?.length)return null;const b=1===a.length&&"dot"!==s;return n("div",{className:vn("border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl",i),children:[b?null:y,e("div",{className:"grid gap-1.5",children:a.filter(e=>"none"!==e.type).map((r,o)=>{const a=`${h||r.name||r.dataKey||"value"}`,i=BE(v,r,a),l=m||r.payload.fill||r.color;return e("div",{className:vn("[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5","dot"===s&&"items-center"),children:p&&void 0!==r?.value&&r.name?p(r.value,r.name,r,o,r.payload):n(t,{children:[i?.icon?e(i.icon,{}):!c&&e("div",{className:vn("border-(--color-border) bg-(--color-bg) shrink-0 rounded-[2px]",{"h-2.5 w-2.5":"dot"===s,"w-1":"line"===s,"w-0 border-[1.5px] border-dashed bg-transparent":"dashed"===s,"my-0.5":b&&"dashed"===s}),style:{"--color-bg":l,"--color-border":l}}),n("div",{className:vn("flex flex-1 justify-between leading-none",b?"items-end":"items-center"),children:[n("div",{className:"grid gap-1.5",children:[b?y:null,e("span",{className:"text-muted-foreground",children:i?.label||r.name})]}),r.value&&e("span",{className:"text-foreground font-mono font-medium tabular-nums",children:r.value.toLocaleString()})]})]})},r.dataKey)})})]})}const LE=Vg;function FE({className:t,hideIcon:r=!1,payload:o,verticalAlign:a="bottom",nameKey:i}){const{config:s}=AE();return o?.length?e("div",{className:vn("flex items-center justify-center gap-4","top"===a?"pb-3":"pt-3",t),children:o.filter(e=>"none"!==e.type).map(t=>{const o=`${i||t.dataKey||"value"}`,a=BE(s,t,o);return n("div",{className:vn("[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3"),children:[a?.icon&&!r?e(a.icon,{}):e("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:t.color}}),a?.label]},t.value)})}):null}function BE(e,t,n){if("object"!=typeof t||null===t)return;const r="payload"in t&&"object"==typeof t.payload&&null!==t.payload?t.payload:void 0;let o=n;return n in t&&"string"==typeof t[n]?o=t[n]:r&&n in r&&"string"==typeof r[n]&&(o=r[n]),o in e?e[o]:e[n]}function $E(e){const t=r.useRef({value:e,previous:e});return r.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function WE(e){const[t,n]=r.useState(void 0);return ne(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver(t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let o,a;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,a=t.blockSize}else o=e.offsetWidth,a=e.offsetHeight;n({width:o,height:a})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t}var HE="Checkbox",[UE]=H(HE),[VE,YE]=UE(HE);function KE(t){const{__scopeCheckbox:n,checked:o,children:a,defaultChecked:i,disabled:s,form:l,name:c,onCheckedChange:u,required:d,value:f="on",internal_do_not_use_render:p}=t,[m,h]=oe({prop:o,defaultProp:i??!1,onChange:u,caller:HE}),[g,v]=r.useState(null),[y,b]=r.useState(null),w=r.useRef(!1),x=!g||(!!l||!!g.closest("form")),k={checked:m,disabled:s,setChecked:h,control:g,setControl:v,name:c,form:l,value:f,hasConsumerStoppedPropagationRef:w,required:d,defaultChecked:!nO(i)&&i,isFormControl:x,bubbleInput:y,setBubbleInput:b};return e(VE,{scope:n,...k,children:tO(p)?p(k):a})}var qE="CheckboxTrigger",GE=r.forwardRef(({__scopeCheckbox:t,onKeyDown:n,onClick:o,...a},i)=>{const{control:s,value:l,disabled:c,checked:u,required:d,setControl:f,setChecked:p,hasConsumerStoppedPropagationRef:m,isFormControl:h,bubbleInput:g}=YE(qE,t),v=K(i,f),y=r.useRef(u);return r.useEffect(()=>{const e=s?.form;if(e){const t=()=>p(y.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[s,p]),e(ae.button,{type:"button",role:"checkbox","aria-checked":nO(u)?"mixed":u,"aria-required":d,"data-state":rO(u),"data-disabled":c?"":void 0,disabled:c,value:l,...a,ref:v,onKeyDown:te(n,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:te(o,e=>{p(e=>!!nO(e)||!e),g&&h&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())})})});GE.displayName=qE;var XE=r.forwardRef((r,o)=>{const{__scopeCheckbox:a,name:i,checked:s,defaultChecked:l,required:c,disabled:u,value:d,onCheckedChange:f,form:p,...m}=r;return e(KE,{__scopeCheckbox:a,checked:s,defaultChecked:l,disabled:u,required:c,onCheckedChange:f,name:i,form:p,value:d,internal_do_not_use_render:({isFormControl:r})=>n(t,{children:[e(GE,{...m,ref:o,__scopeCheckbox:a}),r&&e(eO,{__scopeCheckbox:a})]})})});XE.displayName=HE;var ZE="CheckboxIndicator",QE=r.forwardRef((t,n)=>{const{__scopeCheckbox:r,forceMount:o,...a}=t,i=YE(ZE,r);return e(se,{present:o||nO(i.checked)||!0===i.checked,children:e(ae.span,{"data-state":rO(i.checked),"data-disabled":i.disabled?"":void 0,...a,ref:n,style:{pointerEvents:"none",...t.style}})})});QE.displayName=ZE;var JE="CheckboxBubbleInput",eO=r.forwardRef(({__scopeCheckbox:t,...n},o)=>{const{control:a,hasConsumerStoppedPropagationRef:i,checked:s,defaultChecked:l,required:c,disabled:u,name:d,value:f,form:p,bubbleInput:m,setBubbleInput:h}=YE(JE,t),g=K(o,h),v=$E(s),y=WE(a);r.useEffect(()=>{const e=m;if(!e)return;const t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set,r=!i.current;if(v!==s&&n){const t=new Event("click",{bubbles:r});e.indeterminate=nO(s),n.call(e,!nO(s)&&s),e.dispatchEvent(t)}},[m,v,s,i]);const b=r.useRef(!nO(s)&&s);return e(ae.input,{type:"checkbox","aria-hidden":!0,defaultChecked:l??b.current,required:c,disabled:u,name:d,value:f,form:p,...n,tabIndex:-1,ref:g,style:{...n.style,...y,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});function tO(e){return"function"==typeof e}function nO(e){return"indeterminate"===e}function rO(e){return nO(e)?"indeterminate":e?"checked":"unchecked"}function oO({className:t,...n}){return e(XE,{"data-slot":"checkbox",className:vn("border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive shadow-xs peer size-4 shrink-0 rounded-[4px] border outline-none transition-shadow focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),...n,children:e(QE,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:e(O,{className:"size-3.5"})})})}function aO({...t}){return e(Se,{"data-slot":"collapsible",...t})}function iO({...t}){return e(be,{"data-slot":"collapsible-trigger",...t})}function sO({...t}){return e(xe,{"data-slot":"collapsible-content",...t})}eO.displayName=JE;var lO=.999,cO=/[\\\/_+.#"@\[\(\{&]/,uO=/[\\\/_+.#"@\[\(\{&]/g,dO=/[\s-]/,fO=/[\s-]/g;function pO(e,t,n,r,o,a,i){if(a===t.length)return o===e.length?1:.99;var s=`${o},${a}`;if(void 0!==i[s])return i[s];for(var l,c,u,d,f=r.charAt(a),p=n.indexOf(f,o),m=0;p>=0;)(l=pO(e,t,n,r,p+1,a+1,i))>m&&(p===o?l*=1:cO.test(e.charAt(p-1))?(l*=.8,(u=e.slice(o,p-1).match(uO))&&o>0&&(l*=Math.pow(lO,u.length))):dO.test(e.charAt(p-1))?(l*=.9,(d=e.slice(o,p-1).match(fO))&&o>0&&(l*=Math.pow(lO,d.length))):(l*=.17,o>0&&(l*=Math.pow(lO,p-o))),e.charAt(p)!==t.charAt(a)&&(l*=.9999)),(l<.1&&n.charAt(p-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(p-1)!==r.charAt(a))&&(.1*(c=pO(e,t,n,r,p+1,a+2,i))>l&&(l=.1*c)),l>m&&(m=l),p=n.indexOf(f,p+1);return i[s]=m,m}function mO(e){return e.toLowerCase().replace(fO," ")}function hO(e,t,n){return pO(e=n&&n.length>0?""+(e+" "+n.join(" ")):e,t,mO(e),mO(t),0,0,{})}var gO='[cmdk-group=""]',vO='[cmdk-group-items=""]',yO='[cmdk-item=""]',bO=`${yO}:not([aria-disabled="true"])`,wO="cmdk-item-select",xO="data-value",kO=(e,t,n)=>hO(e,t,n),NO=r.createContext(void 0),SO=()=>r.useContext(NO),CO=r.createContext(void 0),_O=()=>r.useContext(CO),MO=r.createContext(void 0),EO=r.forwardRef((e,t)=>{let n=WO(()=>{var t,n;return{search:"",value:null!=(n=null!=(t=e.value)?t:e.defaultValue)?n:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),o=WO(()=>new Set),a=WO(()=>new Map),i=WO(()=>new Map),s=WO(()=>new Set),l=BO(e),{label:c,children:u,value:d,onValueChange:f,filter:p,shouldFilter:m,loop:h,disablePointerSelection:g=!1,vimBindings:v=!0,...y}=e,b=de(),w=de(),x=de(),k=r.useRef(null),N=VO();$O(()=>{if(void 0!==d){let e=d.trim();n.current.value=e,S.emit()}},[d]),$O(()=>{N(6,D)},[]);let S=r.useMemo(()=>({subscribe:e=>(s.current.add(e),()=>s.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var o,a,i,s;if(!Object.is(n.current[e],t)){if(n.current[e]=t,"search"===e)O(),M(),N(1,E);else if("value"===e){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let e=document.getElementById(x);e?e.focus():null==(o=document.getElementById(b))||o.focus()}if(N(7,()=>{var e;n.current.selectedItemId=null==(e=P())?void 0:e.id,S.emit()}),r||N(5,D),void 0!==(null==(a=l.current)?void 0:a.value)){let e=null!=t?t:"";return void(null==(s=(i=l.current).onValueChange)||s.call(i,e))}}S.emit()}},emit:()=>{s.current.forEach(e=>e())}}),[]),C=r.useMemo(()=>({value:(e,t,r)=>{var o;t!==(null==(o=i.current.get(e))?void 0:o.value)&&(i.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,_(t,r)),N(2,()=>{M(),S.emit()}))},item:(e,t)=>(o.current.add(e),t&&(a.current.has(t)?a.current.get(t).add(e):a.current.set(t,new Set([e]))),N(3,()=>{O(),M(),n.current.value||E(),S.emit()}),()=>{i.current.delete(e),o.current.delete(e),n.current.filtered.items.delete(e);let t=P();N(4,()=>{O(),(null==t?void 0:t.getAttribute("id"))===e&&E(),S.emit()})}),group:e=>(a.current.has(e)||a.current.set(e,new Set),()=>{i.current.delete(e),a.current.delete(e)}),filter:()=>l.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:b,inputId:x,labelId:w,listInnerRef:k}),[]);function _(e,t){var r,o;let a=null!=(o=null==(r=l.current)?void 0:r.filter)?o:kO;return e?a(e,n.current.search,t):0}function M(){if(!n.current.search||!1===l.current.shouldFilter)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=a.current.get(n),o=0;r.forEach(t=>{let n=e.get(t);o=Math.max(n,o)}),t.push([n,o])});let r=k.current;T().sort((t,n)=>{var r,o;let a=t.getAttribute("id"),i=n.getAttribute("id");return(null!=(r=e.get(i))?r:0)-(null!=(o=e.get(a))?o:0)}).forEach(e=>{let t=e.closest(vO);t?t.appendChild(e.parentElement===t?e:e.closest(`${vO} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${vO} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{var t;let n=null==(t=k.current)?void 0:t.querySelector(`${gO}[${xO}="${encodeURIComponent(e[0])}"]`);null==n||n.parentElement.appendChild(n)})}function E(){let e=T().find(e=>"true"!==e.getAttribute("aria-disabled")),t=null==e?void 0:e.getAttribute(xO);S.setState("value",t||void 0)}function O(){var e,t,r,s;if(!n.current.search||!1===l.current.shouldFilter)return void(n.current.filtered.count=o.current.size);n.current.filtered.groups=new Set;let c=0;for(let a of o.current){let o=_(null!=(t=null==(e=i.current.get(a))?void 0:e.value)?t:"",null!=(s=null==(r=i.current.get(a))?void 0:r.keywords)?s:[]);n.current.filtered.items.set(a,o),o>0&&c++}for(let[e,t]of a.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=c}function D(){var e,t,n;let r=P();r&&((null==(e=r.parentElement)?void 0:e.firstChild)===r&&(null==(n=null==(t=r.closest(gO))?void 0:t.querySelector('[cmdk-group-heading=""]'))||n.scrollIntoView({block:"nearest"})),r.scrollIntoView({block:"nearest"}))}function P(){var e;return null==(e=k.current)?void 0:e.querySelector(`${yO}[aria-selected="true"]`)}function T(){var e;return Array.from((null==(e=k.current)?void 0:e.querySelectorAll(bO))||[])}function A(e){let t=T()[e];t&&S.setState("value",t.getAttribute(xO))}function R(e){var t;let n=P(),r=T(),o=r.findIndex(e=>e===n),a=r[o+e];null!=(t=l.current)&&t.loop&&(a=o+e<0?r[r.length-1]:o+e===r.length?r[0]:r[o+e]),a&&S.setState("value",a.getAttribute(xO))}function I(e){let t,n=P(),r=null==n?void 0:n.closest(gO);for(;r&&!t;)r=e>0?LO(r,gO):FO(r,gO),t=null==r?void 0:r.querySelector(bO);t?S.setState("value",t.getAttribute(xO)):R(e)}let j=()=>A(T().length-1),z=e=>{e.preventDefault(),e.metaKey?j():e.altKey?I(1):R(1)},L=e=>{e.preventDefault(),e.metaKey?A(0):e.altKey?I(-1):R(-1)};return r.createElement(ae.div,{ref:t,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:e=>{var t;null==(t=y.onKeyDown)||t.call(y,e);let n=e.nativeEvent.isComposing||229===e.keyCode;if(!e.defaultPrevented&&!n)switch(e.key){case"n":case"j":v&&e.ctrlKey&&z(e);break;case"ArrowDown":z(e);break;case"p":case"k":v&&e.ctrlKey&&L(e);break;case"ArrowUp":L(e);break;case"Home":e.preventDefault(),A(0);break;case"End":e.preventDefault(),j();break;case"Enter":{e.preventDefault();let t=P();if(t){let e=new Event(wO);t.dispatchEvent(e)}}}}},r.createElement("label",{"cmdk-label":"",htmlFor:C.inputId,id:C.labelId,style:KO},c),YO(e,e=>r.createElement(CO.Provider,{value:S},r.createElement(NO.Provider,{value:C},e))))}),OO=r.forwardRef((e,t)=>{var n,o;let a=de(),i=r.useRef(null),s=r.useContext(MO),l=SO(),c=BO(e),u=null!=(o=null==(n=c.current)?void 0:n.forceMount)?o:null==s?void 0:s.forceMount;$O(()=>{if(!u)return l.item(a,null==s?void 0:s.id)},[u]);let d=UO(a,i,[e.value,e.children,i],e.keywords),f=_O(),p=HO(e=>e.value&&e.value===d.current),m=HO(e=>!(!u&&!1!==l.filter())||(!e.search||e.filtered.items.get(a)>0));function h(){var e,t;g(),null==(t=(e=c.current).onSelect)||t.call(e,d.current)}function g(){f.setState("value",d.current,!0)}if(r.useEffect(()=>{let t=i.current;if(t&&!e.disabled)return t.addEventListener(wO,h),()=>t.removeEventListener(wO,h)},[m,e.onSelect,e.disabled]),!m)return null;let{disabled:v,value:y,onSelect:b,forceMount:w,keywords:x,...k}=e;return r.createElement(ae.div,{ref:Y(i,t),...k,id:a,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!p,"data-disabled":!!v,"data-selected":!!p,onPointerMove:v||l.getDisablePointerSelection()?void 0:g,onClick:v?void 0:h},e.children)}),DO=r.forwardRef((e,t)=>{let{heading:n,children:o,forceMount:a,...i}=e,s=de(),l=r.useRef(null),c=r.useRef(null),u=de(),d=SO(),f=HO(e=>!(!a&&!1!==d.filter())||(!e.search||e.filtered.groups.has(s)));$O(()=>d.group(s),[]),UO(s,l,[e.value,e.heading,c]);let p=r.useMemo(()=>({id:s,forceMount:a}),[a]);return r.createElement(ae.div,{ref:Y(l,t),...i,"cmdk-group":"",role:"presentation",hidden:!f||void 0},n&&r.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),YO(e,e=>r.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},r.createElement(MO.Provider,{value:p},e))))}),PO=r.forwardRef((e,t)=>{let{alwaysRender:n,...o}=e,a=r.useRef(null),i=HO(e=>!e.search);return n||i?r.createElement(ae.div,{ref:Y(a,t),...o,"cmdk-separator":"",role:"separator"}):null}),TO=r.forwardRef((e,t)=>{let{onValueChange:n,...o}=e,a=null!=e.value,i=_O(),s=HO(e=>e.search),l=HO(e=>e.selectedItemId),c=SO();return r.useEffect(()=>{null!=e.value&&i.setState("search",e.value)},[e.value]),r.createElement(ae.input,{ref:t,...o,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":l,id:c.inputId,type:"text",value:a?e.value:s,onChange:e=>{a||i.setState("search",e.target.value),null==n||n(e.target.value)}})}),AO=r.forwardRef((e,t)=>{let{children:n,label:o="Suggestions",...a}=e,i=r.useRef(null),s=r.useRef(null),l=HO(e=>e.selectedItemId),c=SO();return r.useEffect(()=>{if(s.current&&i.current){let e,t=s.current,n=i.current,r=new ResizeObserver(()=>{e=requestAnimationFrame(()=>{let e=t.offsetHeight;n.style.setProperty("--cmdk-list-height",e.toFixed(1)+"px")})});return r.observe(t),()=>{cancelAnimationFrame(e),r.unobserve(t)}}},[]),r.createElement(ae.div,{ref:Y(i,t),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":o,id:c.listId},YO(e,e=>r.createElement("div",{ref:Y(s,c.listInnerRef),"cmdk-list-sizer":""},e)))}),RO=r.forwardRef((e,t)=>{let{open:n,onOpenChange:o,overlayClassName:a,contentClassName:i,container:s,...l}=e;return r.createElement(Mo,{open:n,onOpenChange:o},r.createElement(Oo,{container:s},r.createElement(Do,{"cmdk-overlay":"",className:a}),r.createElement(Po,{"aria-label":e.label,"cmdk-dialog":"",className:i},r.createElement(EO,{ref:t,...l}))))}),IO=r.forwardRef((e,t)=>HO(e=>0===e.filtered.count)?r.createElement(ae.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),jO=r.forwardRef((e,t)=>{let{progress:n,children:o,label:a="Loading...",...i}=e;return r.createElement(ae.div,{ref:t,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},YO(e,e=>r.createElement("div",{"aria-hidden":!0},e)))}),zO=Object.assign(EO,{List:AO,Item:OO,Input:TO,Group:DO,Separator:PO,Dialog:RO,Empty:IO,Loading:jO});function LO(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function FO(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function BO(e){let t=r.useRef(e);return $O(()=>{t.current=e}),t}var $O="undefined"==typeof window?r.useEffect:r.useLayoutEffect;function WO(e){let t=r.useRef();return void 0===t.current&&(t.current=e()),t}function HO(e){let t=_O(),n=()=>e(t.snapshot());return r.useSyncExternalStore(t.subscribe,n,n)}function UO(e,t,n,o=[]){let a=r.useRef(),i=SO();return $O(()=>{var r;let s=(()=>{var e;for(let t of n){if("string"==typeof t)return t.trim();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim():a.current}})(),l=o.map(e=>e.trim());i.value(e,s,l),null==(r=t.current)||r.setAttribute(xO,s),a.current=s}),a}var VO=()=>{let[e,t]=r.useState(),n=WO(()=>new Map);return $O(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function YO({asChild:e,children:t},n){return e&&r.isValidElement(t)?r.cloneElement(function(e){let t=e.type;return"function"==typeof t?t(e.props):"render"in t?t.render(e.props):e}(t),{ref:t.ref},n(t.props.children)):n(t)}var KO={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function qO({...t}){return e(Mo,{"data-slot":"dialog",...t})}function GO({...t}){return e(Eo,{"data-slot":"dialog-trigger",...t})}function XO({...t}){return e(Oo,{"data-slot":"dialog-portal",...t})}function ZO({...t}){return e(Ro,{"data-slot":"dialog-close",...t})}function QO({className:t,...n}){return e(Do,{"data-slot":"dialog-overlay",className:vn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...n})}function JO({className:t,children:r,showCloseButton:o=!0,...a}){return n(XO,{"data-slot":"dialog-portal",children:[e(QO,{}),n(Po,{"data-slot":"dialog-content",className:vn("bg-background 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 fixed left-[50%] top-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t),...a,children:[r,o&&n(Ro,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground rounded-xs focus:outline-hidden absolute right-4 top-4 opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",children:[e(D,{}),e("span",{className:"sr-only",children:"Close"})]})]})]})}function eD({className:t,...n}){return e("div",{"data-slot":"dialog-header",className:vn("flex flex-col gap-2 text-center sm:text-left",t),...n})}function tD({className:t,...n}){return e("div",{"data-slot":"dialog-footer",className:vn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...n})}function nD({className:t,...n}){return e(To,{"data-slot":"dialog-title",className:vn("text-lg font-semibold leading-none",t),...n})}function rD({className:t,...n}){return e(Ao,{"data-slot":"dialog-description",className:vn("text-muted-foreground text-sm",t),...n})}function oD({className:t,...n}){return e(zO,{"data-slot":"command",className:vn("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),...n})}function aD({title:t="Command Palette",description:r="Search for a command to run...",children:o,className:a,showCloseButton:i=!0,...s}){return n(qO,{...s,children:[n(eD,{className:"sr-only",children:[e(nD,{children:t}),e(rD,{children:r})]}),e(JO,{className:vn("overflow-hidden p-0",a),showCloseButton:i,children:e(oD,{className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:o})})]})}function iD({className:t,...r}){return n("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[e(P,{className:"size-4 shrink-0 opacity-50"}),e(zO.Input,{"data-slot":"command-input",className:vn("placeholder:text-muted-foreground outline-hidden flex h-10 w-full rounded-md bg-transparent py-3 text-sm disabled:cursor-not-allowed disabled:opacity-50",t),...r})]})}function sD({className:t,...n}){return e(zO.List,{"data-slot":"command-list",className:vn("max-h-[300px] scroll-py-1 overflow-y-auto overflow-x-hidden",t),...n})}function lD({...t}){return e(zO.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t})}function cD({className:t,...n}){return e(zO.Group,{"data-slot":"command-group",className:vn("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),...n})}function uD({className:t,...n}){return e(zO.Separator,{"data-slot":"command-separator",className:vn("bg-border -mx-1 h-px",t),...n})}function dD({className:t,...n}){return e(zO.Item,{"data-slot":"command-item",className:vn("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground outline-hidden relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",t),...n})}function fD({className:t,...n}){return e("span",{"data-slot":"command-shortcut",className:vn("text-muted-foreground ml-auto text-xs tracking-widest",t),...n})}const pD=["top","right","bottom","left"],mD=Math.min,hD=Math.max,gD=Math.round,vD=Math.floor,yD=e=>({x:e,y:e}),bD={left:"right",right:"left",bottom:"top",top:"bottom"},wD={start:"end",end:"start"};function xD(e,t,n){return hD(e,mD(t,n))}function kD(e,t){return"function"==typeof e?e(t):e}function ND(e){return e.split("-")[0]}function SD(e){return e.split("-")[1]}function CD(e){return"x"===e?"y":"x"}function _D(e){return"y"===e?"height":"width"}const MD=new Set(["top","bottom"]);function ED(e){return MD.has(ND(e))?"y":"x"}function OD(e){return CD(ED(e))}function DD(e){return e.replace(/start|end/g,e=>wD[e])}const PD=["left","right"],TD=["right","left"],AD=["top","bottom"],RD=["bottom","top"];function ID(e,t,n,r){const o=SD(e);let a=function(e,t,n){switch(e){case"top":case"bottom":return n?t?TD:PD:t?PD:TD;case"left":case"right":return t?AD:RD;default:return[]}}(ND(e),"start"===n,r);return o&&(a=a.map(e=>e+"-"+o),t&&(a=a.concat(a.map(DD)))),a}function jD(e){return e.replace(/left|right|bottom|top/g,e=>bD[e])}function zD(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function LD(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function FD(e,t,n){let{reference:r,floating:o}=e;const a=ED(t),i=OD(t),s=_D(i),l=ND(t),c="y"===a,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[s]/2-o[s]/2;let p;switch(l){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(SD(t)){case"start":p[i]-=f*(n&&c?-1:1);break;case"end":p[i]+=f*(n&&c?-1:1)}return p}async function BD(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:a,rects:i,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=kD(t,e),m=zD(p),h=s[f?"floating"===d?"reference":"floating":d],g=LD(await a.getClippingRect({element:null==(n=await(null==a.isElement?void 0:a.isElement(h)))||n?h:h.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),v="floating"===d?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,y=await(null==a.getOffsetParent?void 0:a.getOffsetParent(s.floating)),b=await(null==a.isElement?void 0:a.isElement(y))&&await(null==a.getScale?void 0:a.getScale(y))||{x:1,y:1},w=LD(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:y,strategy:l}):v);return{top:(g.top-w.top+m.top)/b.y,bottom:(w.bottom-g.bottom+m.bottom)/b.y,left:(g.left-w.left+m.left)/b.x,right:(w.right-g.right+m.right)/b.x}}function $D(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function WD(e){return pD.some(t=>e[t]>=0)}const HD=new Set(["left","top"]);function UD(){return"undefined"!=typeof window}function VD(e){return qD(e)?(e.nodeName||"").toLowerCase():"#document"}function YD(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function KD(e){var t;return null==(t=(qD(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function qD(e){return!!UD()&&(e instanceof Node||e instanceof YD(e).Node)}function GD(e){return!!UD()&&(e instanceof Element||e instanceof YD(e).Element)}function XD(e){return!!UD()&&(e instanceof HTMLElement||e instanceof YD(e).HTMLElement)}function ZD(e){return!(!UD()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof YD(e).ShadowRoot)}const QD=new Set(["inline","contents"]);function JD(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=dP(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!QD.has(o)}const eP=new Set(["table","td","th"]);function tP(e){return eP.has(VD(e))}const nP=[":popover-open",":modal"];function rP(e){return nP.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const oP=["transform","translate","scale","rotate","perspective"],aP=["transform","translate","scale","rotate","perspective","filter"],iP=["paint","layout","strict","content"];function sP(e){const t=lP(),n=GD(e)?dP(e):e;return oP.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||aP.some(e=>(n.willChange||"").includes(e))||iP.some(e=>(n.contain||"").includes(e))}function lP(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const cP=new Set(["html","body","#document"]);function uP(e){return cP.has(VD(e))}function dP(e){return YD(e).getComputedStyle(e)}function fP(e){return GD(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function pP(e){if("html"===VD(e))return e;const t=e.assignedSlot||e.parentNode||ZD(e)&&e.host||KD(e);return ZD(t)?t.host:t}function mP(e){const t=pP(e);return uP(t)?e.ownerDocument?e.ownerDocument.body:e.body:XD(t)&&JD(t)?t:mP(t)}function hP(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=mP(e),a=o===(null==(r=e.ownerDocument)?void 0:r.body),i=YD(o);if(a){const e=gP(i);return t.concat(i,i.visualViewport||[],JD(o)?o:[],e&&n?hP(e):[])}return t.concat(o,hP(o,[],n))}function gP(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function vP(e){const t=dP(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=XD(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,s=gD(n)!==a||gD(r)!==i;return s&&(n=a,r=i),{width:n,height:r,$:s}}function yP(e){return GD(e)?e:e.contextElement}function bP(e){const t=yP(e);if(!XD(t))return yD(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=vP(t);let i=(a?gD(n.width):n.width)/r,s=(a?gD(n.height):n.height)/o;return i&&Number.isFinite(i)||(i=1),s&&Number.isFinite(s)||(s=1),{x:i,y:s}}const wP=yD(0);function xP(e){const t=YD(e);return lP()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:wP}function kP(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),a=yP(e);let i=yD(1);t&&(r?GD(r)&&(i=bP(r)):i=bP(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==YD(e))&&t}(a,n,r)?xP(a):yD(0);let l=(o.left+s.x)/i.x,c=(o.top+s.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(a){const e=YD(a),t=r&&GD(r)?YD(r):r;let n=e,o=gP(n);for(;o&&r&&t!==n;){const e=bP(o),t=o.getBoundingClientRect(),r=dP(o),a=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=a,c+=i,n=YD(o),o=gP(n)}}return LD({width:u,height:d,x:l,y:c})}function NP(e,t){const n=fP(e).scrollLeft;return t?t.left+n:kP(KD(e)).left+n}function SP(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-NP(e,n),y:n.top+t.scrollTop}}const CP=new Set(["absolute","fixed"]);function _P(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=YD(e),r=KD(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,s=0,l=0;if(o){a=o.width,i=o.height;const e=lP();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}const c=NP(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(r.clientWidth-t.clientWidth-o);i<=25&&(a-=i)}else c<=25&&(a+=c);return{width:a,height:i,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=KD(e),n=fP(e),r=e.ownerDocument.body,o=hD(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=hD(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+NP(e);const s=-n.scrollTop;return"rtl"===dP(r).direction&&(i+=hD(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:s}}(KD(e));else if(GD(t))r=function(e,t){const n=kP(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=XD(e)?bP(e):yD(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:o*a.x,y:r*a.y}}(t,n);else{const n=xP(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return LD(r)}function MP(e,t){const n=pP(e);return!(n===t||!GD(n)||uP(n))&&("fixed"===dP(n).position||MP(n,t))}function EP(e,t,n){const r=XD(t),o=KD(t),a="fixed"===n,i=kP(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const l=yD(0);function c(){l.x=NP(o)}if(r||!r&&!a)if(("body"!==VD(t)||JD(o))&&(s=fP(t)),r){const e=kP(t,!0,a,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&c();a&&!r&&o&&c();const u=!o||r||a?yD(0):SP(o,s);return{x:i.left+s.scrollLeft-l.x-u.x,y:i.top+s.scrollTop-l.y-u.y,width:i.width,height:i.height}}function OP(e){return"static"===dP(e).position}function DP(e,t){if(!XD(e)||"fixed"===dP(e).position)return null;if(t)return t(e);let n=e.offsetParent;return KD(e)===n&&(n=n.ownerDocument.body),n}function PP(e,t){const n=YD(e);if(rP(e))return n;if(!XD(e)){let t=pP(e);for(;t&&!uP(t);){if(GD(t)&&!OP(t))return t;t=pP(t)}return n}let r=DP(e,t);for(;r&&tP(r)&&OP(r);)r=DP(r,t);return r&&uP(r)&&OP(r)&&!sP(r)?n:r||function(e){let t=pP(e);for(;XD(t)&&!uP(t);){if(sP(t))return t;if(rP(t))return null;t=pP(t)}return null}(e)||n}const TP={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a="fixed"===o,i=KD(r),s=!!t&&rP(t.floating);if(r===i||s&&a)return n;let l={scrollLeft:0,scrollTop:0},c=yD(1);const u=yD(0),d=XD(r);if((d||!d&&!a)&&(("body"!==VD(r)||JD(i))&&(l=fP(r)),XD(r))){const e=kP(r);c=bP(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const f=!i||d||a?yD(0):SP(i,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}},getDocumentElement:KD,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a="clippingAncestors"===n?rP(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=hP(e,[],!1).filter(e=>GD(e)&&"body"!==VD(e)),o=null;const a="fixed"===dP(e).position;let i=a?pP(e):e;for(;GD(i)&&!uP(i);){const t=dP(i),n=sP(i);n||"fixed"!==t.position||(o=null),(a?!n&&!o:!n&&"static"===t.position&&o&&CP.has(o.position)||JD(i)&&!n&&MP(e,i))?r=r.filter(e=>e!==i):o=t,i=pP(i)}return t.set(e,r),r}(t,this._c):[].concat(n),i=[...a,r],s=i[0],l=i.reduce((e,n)=>{const r=_P(t,n,o);return e.top=hD(r.top,e.top),e.right=mD(r.right,e.right),e.bottom=mD(r.bottom,e.bottom),e.left=hD(r.left,e.left),e},_P(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:PP,getElementRects:async function(e){const t=this.getOffsetParent||PP,n=this.getDimensions,r=await n(e.floating);return{reference:EP(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=vP(e);return{width:t,height:n}},getScale:bP,isElement:GD,isRTL:function(e){return"rtl"===dP(e).direction}};function AP(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function RP(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=yP(e),u=o||a?[...c?hP(c):[],...hP(t)]:[];u.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),a&&e.addEventListener("resize",n)});const d=c&&s?function(e,t){let n,r=null;const o=KD(e);function a(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function i(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),a();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(s||t(),!f||!p)return;const m={rootMargin:-vD(d)+"px "+-vD(o.clientWidth-(u+f))+"px "+-vD(o.clientHeight-(d+p))+"px "+-vD(u)+"px",threshold:hD(0,mD(1,l))||1};let h=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!h)return i();r?i(!1,r):n=setTimeout(()=>{i(!1,1e-7)},1e3)}1!==r||AP(c,e.getBoundingClientRect())||i(),h=!1}try{r=new IntersectionObserver(g,{...m,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,m)}r.observe(e)}(!0),a}(c,n):null;let f,p=-1,m=null;i&&(m=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(t)})),n()}),c&&!l&&m.observe(c),m.observe(t));let h=l?kP(e):null;return l&&function t(){const r=kP(e);h&&!AP(h,r)&&n();h=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach(e=>{o&&e.removeEventListener("scroll",n),a&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=m)||e.disconnect(),m=null,l&&cancelAnimationFrame(f)}}const IP=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:i,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,a=await(null==r.isRTL?void 0:r.isRTL(o.floating)),i=ND(n),s=SD(n),l="y"===ED(n),c=HD.has(i)?-1:1,u=a&&l?-1:1,d=kD(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof m&&(p="end"===s?-1*m:m),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(t,e);return i===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:i}}}}},jP=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=kD(e,t),c={x:n,y:r},u=await BD(t,l),d=ED(ND(o)),f=CD(d);let p=c[f],m=c[d];if(a){const e="y"===f?"bottom":"right";p=xD(p+u["y"===f?"top":"left"],p,p-u[e])}if(i){const e="y"===d?"bottom":"right";m=xD(m+u["y"===d?"top":"left"],m,m-u[e])}const h=s.fn({...t,[f]:p,[d]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[f]:a,[d]:i}}}}}},zP=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:i,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...g}=kD(e,t);if(null!=(n=a.arrow)&&n.alignmentOffset)return{};const v=ND(o),y=ED(s),b=ND(s)===s,w=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=f||(b||!h?[jD(s)]:function(e){const t=jD(e);return[DD(e),t,DD(t)]}(s)),k="none"!==m;!f&&k&&x.push(...ID(s,h,m,w));const N=[s,...x],S=await BD(t,g),C=[];let _=(null==(r=a.flip)?void 0:r.overflows)||[];if(u&&C.push(S[v]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=SD(e),o=OD(e),a=_D(o);let i="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=jD(i)),[i,jD(i)]}(o,i,w);C.push(S[e[0]],S[e[1]])}if(_=[..._,{placement:o,overflows:C}],!C.every(e=>e<=0)){var M,E;const e=((null==(M=a.flip)?void 0:M.index)||0)+1,t=N[e];if(t){if(!("alignment"===d&&y!==ED(t))||_.every(e=>ED(e.placement)!==y||e.overflows[0]>0))return{data:{index:e,overflows:_},reset:{placement:t}}}let n=null==(E=_.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:E.placement;if(!n)switch(p){case"bestFit":{var O;const e=null==(O=_.filter(e=>{if(k){const t=ED(e.placement);return t===y||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:O[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},LP=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:i,elements:s}=t,{apply:l=()=>{},...c}=kD(e,t),u=await BD(t,c),d=ND(o),f=SD(o),p="y"===ED(o),{width:m,height:h}=a.floating;let g,v;"top"===d||"bottom"===d?(g=d,v=f===(await(null==i.isRTL?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(v=d,g="end"===f?"top":"bottom");const y=h-u.top-u.bottom,b=m-u.left-u.right,w=mD(h-u[g],y),x=mD(m-u[v],b),k=!t.middlewareData.shift;let N=w,S=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(S=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(N=y),k&&!f){const e=hD(u.left,0),t=hD(u.right,0),n=hD(u.top,0),r=hD(u.bottom,0);p?S=m-2*(0!==e||0!==t?e+t:hD(u.left,u.right)):N=h-2*(0!==n||0!==r?n+r:hD(u.top,u.bottom))}await l({...t,availableWidth:S,availableHeight:N});const C=await i.getDimensions(s.floating);return m!==C.width||h!==C.height?{reset:{rects:!0}}:{}}}},FP=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=kD(e,t);switch(r){case"referenceHidden":{const e=$D(await BD(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:WD(e)}}}case"escaped":{const e=$D(await BD(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:WD(e)}}}default:return{}}}}},BP=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:i,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=kD(e,t)||{};if(null==c)return{};const d=zD(u),f={x:n,y:r},p=OD(o),m=_D(p),h=await i.getDimensions(c),g="y"===p,v=g?"top":"left",y=g?"bottom":"right",b=g?"clientHeight":"clientWidth",w=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],k=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c));let N=k?k[b]:0;N&&await(null==i.isElement?void 0:i.isElement(k))||(N=s.floating[b]||a.floating[m]);const S=w/2-x/2,C=N/2-h[m]/2-1,_=mD(d[v],C),M=mD(d[y],C),E=_,O=N-h[m]-M,D=N/2-h[m]/2+S,P=xD(E,D,O),T=!l.arrow&&null!=SD(o)&&D!==P&&a.reference[m]/2-(D<E?_:M)-h[m]/2<0,A=T?D<E?D-E:D-O:0;return{[p]:f[p]+A,data:{[p]:P,centerOffset:D-P-A,...T&&{alignmentOffset:A}},reset:T}}}),$P=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:i}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=kD(e,t),u={x:n,y:r},d=ED(o),f=CD(d);let p=u[f],m=u[d];const h=kD(s,t),g="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){const e="y"===f?"height":"width",t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(c){var v,y;const e="y"===f?"width":"height",t=HD.has(ND(o)),n=a.reference[d]-a.floating[e]+(t&&(null==(v=i.offset)?void 0:v[d])||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:(null==(y=i.offset)?void 0:y[d])||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},WP=(e,t,n)=>{const r=new Map,o={platform:TP,...n},a={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,s=a.filter(Boolean),l=await(null==i.isRTL?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=FD(c,r,l),f=r,p={},m=0;for(let n=0;n<s.length;n++){const{name:a,fn:h}=s[n],{x:g,y:v,data:y,reset:b}=await h({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:c,platform:i,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=v?v:d,p={...p,[a]:{...p[a],...y}},b&&m<=50&&(m++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(c=!0===b.rects?await i.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:d}=FD(c,f,l))),n=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}})(e,t,{...o,platform:a})};var HP="undefined"!=typeof document?u:function(){};function UP(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!UP(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!UP(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function VP(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function YP(e,t){const n=VP(e);return Math.round(t*n)/n}function KP(e){const t=r.useRef(e);return HP(()=>{t.current=e}),t}const qP=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?BP({element:n.current,padding:r}).fn(t):{}:n?BP({element:n,padding:r}).fn(t):{};var o}}),GP=(e,t)=>({...IP(e),options:[e,t]}),XP=(e,t)=>({...jP(e),options:[e,t]}),ZP=(e,t)=>({...$P(e),options:[e,t]}),QP=(e,t)=>({...zP(e),options:[e,t]}),JP=(e,t)=>({...LP(e),options:[e,t]}),eT=(e,t)=>({...FP(e),options:[e,t]}),tT=(e,t)=>({...qP(e),options:[e,t]});var nT=r.forwardRef((t,n)=>{const{children:r,width:o=10,height:a=5,...i}=t;return e(ae.svg,{...i,ref:n,width:o,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:e("polygon",{points:"0,0 30,0 15,10"})})});nT.displayName="Arrow";var rT=nT,oT="Popper",[aT,iT]=H(oT),[sT,lT]=aT(oT),cT=t=>{const{__scopePopper:n,children:o}=t,[a,i]=r.useState(null);return e(sT,{scope:n,anchor:a,onAnchorChange:i,children:o})};cT.displayName=oT;var uT="PopperAnchor",dT=r.forwardRef((t,n)=>{const{__scopePopper:o,virtualRef:a,...i}=t,s=lT(uT,o),l=r.useRef(null),c=K(n,l),u=r.useRef(null);return r.useEffect(()=>{const e=u.current;u.current=a?.current||l.current,e!==u.current&&s.onAnchorChange(u.current)}),a?null:e(ae.div,{...i,ref:c})});dT.displayName=uT;var fT="PopperContent",[pT,mT]=aT(fT),hT=r.forwardRef((t,n)=>{const{__scopePopper:o,side:a="bottom",sideOffset:i=0,align:s="center",alignOffset:l=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:m=!1,updatePositionStrategy:h="optimized",onPlaced:g,...v}=t,y=lT(fT,o),[w,x]=r.useState(null),k=K(n,e=>x(e)),[N,S]=r.useState(null),C=WE(N),_=C?.width??0,M=C?.height??0,E=a+("center"!==s?"-"+s:""),O="number"==typeof f?f:{top:0,right:0,bottom:0,left:0,...f},D=Array.isArray(d)?d:[d],P=D.length>0,T={padding:O,boundary:D.filter(bT),altBoundary:P},{refs:A,floatingStyles:R,placement:I,isPositioned:j,middlewareData:z}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:a,elements:{reference:i,floating:s}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,f]=r.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=r.useState(o);UP(p,o)||m(o);const[h,g]=r.useState(null),[v,y]=r.useState(null),w=r.useCallback(e=>{e!==S.current&&(S.current=e,g(e))},[]),x=r.useCallback(e=>{e!==C.current&&(C.current=e,y(e))},[]),k=i||h,N=s||v,S=r.useRef(null),C=r.useRef(null),_=r.useRef(d),M=null!=c,E=KP(c),O=KP(a),D=KP(u),P=r.useCallback(()=>{if(!S.current||!C.current)return;const e={placement:t,strategy:n,middleware:p};O.current&&(e.platform=O.current),WP(S.current,C.current,e).then(e=>{const t={...e,isPositioned:!1!==D.current};T.current&&!UP(_.current,t)&&(_.current=t,b.flushSync(()=>{f(t)}))})},[p,t,n,O,D]);HP(()=>{!1===u&&_.current.isPositioned&&(_.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[u]);const T=r.useRef(!1);HP(()=>(T.current=!0,()=>{T.current=!1}),[]),HP(()=>{if(k&&(S.current=k),N&&(C.current=N),k&&N){if(E.current)return E.current(k,N,P);P()}},[k,N,P,E,M]);const A=r.useMemo(()=>({reference:S,floating:C,setReference:w,setFloating:x}),[w,x]),R=r.useMemo(()=>({reference:k,floating:N}),[k,N]),I=r.useMemo(()=>{const e={position:n,left:0,top:0};if(!R.floating)return e;const t=YP(R.floating,d.x),r=YP(R.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...VP(R.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,l,R.floating,d.x,d.y]);return r.useMemo(()=>({...d,update:P,refs:A,elements:R,floatingStyles:I}),[d,P,A,R,I])}({strategy:"fixed",placement:E,whileElementsMounted:(...e)=>RP(...e,{animationFrame:"always"===h}),elements:{reference:y.anchor},middleware:[GP({mainAxis:i+M,alignmentAxis:l}),u&&XP({mainAxis:!0,crossAxis:!1,limiter:"partial"===p?ZP():void 0,...T}),u&&QP({...T}),JP({...T,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:a}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${r}px`),i.setProperty("--radix-popper-anchor-width",`${o}px`),i.setProperty("--radix-popper-anchor-height",`${a}px`)}}),N&&tT({element:N,padding:c}),wT({arrowWidth:_,arrowHeight:M}),m&&eT({strategy:"referenceHidden",...T})]}),[L,F]=xT(I),B=On(g);ne(()=>{j&&B?.()},[j,B]);const $=z.arrow?.x,W=z.arrow?.y,H=0!==z.arrow?.centerOffset,[U,V]=r.useState();return ne(()=>{w&&V(window.getComputedStyle(w).zIndex)},[w]),e("div",{ref:A.setFloating,"data-radix-popper-content-wrapper":"",style:{...R,transform:j?R.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:U,"--radix-popper-transform-origin":[z.transformOrigin?.x,z.transformOrigin?.y].join(" "),...z.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:e(pT,{scope:o,placedSide:L,onArrowChange:S,arrowX:$,arrowY:W,shouldHideArrow:H,children:e(ae.div,{"data-side":L,"data-align":F,...v,ref:k,style:{...v.style,animation:j?void 0:"none"}})})})});hT.displayName=fT;var gT="PopperArrow",vT={top:"bottom",right:"left",bottom:"top",left:"right"},yT=r.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=mT(gT,r),i=vT[a.placedSide];return e("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:e(rT,{...o,ref:n,style:{...o.style,display:"block"}})})});function bT(e){return null!==e}yT.displayName=gT;var wT=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,a=0!==o.arrow?.centerOffset,i=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[l,c]=xT(n),u={start:"0%",center:"50%",end:"100%"}[c],d=(o.arrow?.x??0)+i/2,f=(o.arrow?.y??0)+s/2;let p="",m="";return"bottom"===l?(p=a?u:`${d}px`,m=-s+"px"):"top"===l?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):"right"===l?(p=-s+"px",m=a?u:`${f}px`):"left"===l&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function xT(e){const[t,n="center"]=e.split("-");return[t,n]}var kT=cT,NT=dT,ST=hT,CT=yT,_T="rovingFocusGroup.onEntryFocus",MT={bubbles:!1,cancelable:!0},ET="RovingFocusGroup",[OT,DT,PT]=ee(ET),[TT,AT]=H(ET,[PT]),[RT,IT]=TT(ET),jT=r.forwardRef((t,n)=>e(OT.Provider,{scope:t.__scopeRovingFocusGroup,children:e(OT.Slot,{scope:t.__scopeRovingFocusGroup,children:e(zT,{...t,ref:n})})}));jT.displayName=ET;var zT=r.forwardRef((t,n)=>{const{__scopeRovingFocusGroup:o,orientation:a,loop:i=!1,dir:s,currentTabStopId:l,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...p}=t,m=r.useRef(null),h=K(n,m),g=Ee(s),[v,y]=oe({prop:l,defaultProp:c??null,onChange:u,caller:ET}),[b,w]=r.useState(!1),x=On(d),k=DT(o),N=r.useRef(!1),[S,C]=r.useState(0);return r.useEffect(()=>{const e=m.current;if(e)return e.addEventListener(_T,x),()=>e.removeEventListener(_T,x)},[x]),e(RT,{scope:o,orientation:a,dir:g,loop:i,currentTabStopId:v,onItemFocus:r.useCallback(e=>y(e),[y]),onItemShiftTab:r.useCallback(()=>w(!0),[]),onFocusableItemAdd:r.useCallback(()=>C(e=>e+1),[]),onFocusableItemRemove:r.useCallback(()=>C(e=>e-1),[]),children:e(ae.div,{tabIndex:b||0===S?-1:0,"data-orientation":a,...p,ref:h,style:{outline:"none",...t.style},onMouseDown:te(t.onMouseDown,()=>{N.current=!0}),onFocus:te(t.onFocus,e=>{const t=!N.current;if(e.target===e.currentTarget&&t&&!b){const t=new CustomEvent(_T,MT);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=k().filter(e=>e.focusable);$T([e.find(e=>e.active),e.find(e=>e.id===v),...e].filter(Boolean).map(e=>e.ref.current),f)}}N.current=!1}),onBlur:te(t.onBlur,()=>w(!1))})})}),LT="RovingFocusGroupItem",FT=r.forwardRef((t,n)=>{const{__scopeRovingFocusGroup:o,focusable:a=!0,active:i=!1,tabStopId:s,children:l,...c}=t,u=de(),d=s||u,f=IT(LT,o),p=f.currentTabStopId===d,m=DT(o),{onFocusableItemAdd:h,onFocusableItemRemove:g,currentTabStopId:v}=f;return r.useEffect(()=>{if(a)return h(),()=>g()},[a,h,g]),e(OT.ItemSlot,{scope:o,id:d,focusable:a,active:i,children:e(ae.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...c,ref:n,onMouseDown:te(t.onMouseDown,e=>{a?f.onItemFocus(d):e.preventDefault()}),onFocus:te(t.onFocus,()=>f.onItemFocus(d)),onKeyDown:te(t.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void f.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:BT[r]}(e,f.orientation,f.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=m().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)n.reverse();else if("prev"===t||"next"===t){"prev"===t&&n.reverse();const r=n.indexOf(e.currentTarget);n=f.loop?function(e,t){return e.map((n,r)=>e[(t+r)%e.length])}(n,r+1):n.slice(r+1)}setTimeout(()=>$T(n))}}),children:"function"==typeof l?l({isCurrentTabStop:p,hasTabStop:null!=v}):l})})});FT.displayName=LT;var BT={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function $T(e,t=!1){const n=document.activeElement;for(const r of e){if(r===n)return;if(r.focus({preventScroll:t}),document.activeElement!==n)return}}var WT=jT,HT=FT,UT=["Enter"," "],VT=["ArrowUp","PageDown","End"],YT=["ArrowDown","PageUp","Home",...VT],KT={ltr:[...UT,"ArrowRight"],rtl:[...UT,"ArrowLeft"]},qT={ltr:["ArrowLeft"],rtl:["ArrowRight"]},GT="Menu",[XT,ZT,QT]=ee(GT),[JT,eA]=H(GT,[QT,iT,AT]),tA=iT(),nA=AT(),[rA,oA]=JT(GT),[aA,iA]=JT(GT),sA=t=>{const{__scopeMenu:n,open:o=!1,children:a,dir:i,onOpenChange:s,modal:l=!0}=t,c=tA(n),[u,d]=r.useState(null),f=r.useRef(!1),p=On(s),m=Ee(i);return r.useEffect(()=>{const e=()=>{f.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>f.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}},[]),e(kT,{...c,children:e(rA,{scope:n,open:o,onOpenChange:p,content:u,onContentChange:d,children:e(aA,{scope:n,onClose:r.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:m,modal:l,children:a})})})};sA.displayName=GT;var lA=r.forwardRef((t,n)=>{const{__scopeMenu:r,...o}=t,a=tA(r);return e(NT,{...a,...o,ref:n})});lA.displayName="MenuAnchor";var cA="MenuPortal",[uA,dA]=JT(cA,{forceMount:void 0}),fA=t=>{const{__scopeMenu:n,forceMount:r,children:o,container:a}=t,i=oA(cA,n);return e(uA,{scope:n,forceMount:r,children:e(se,{present:r||i.open,children:e(Gn,{asChild:!0,container:a,children:o})})})};fA.displayName=cA;var pA="MenuContent",[mA,hA]=JT(pA),gA=r.forwardRef((t,n)=>{const r=dA(pA,t.__scopeMenu),{forceMount:o=r.forceMount,...a}=t,i=oA(pA,t.__scopeMenu),s=iA(pA,t.__scopeMenu);return e(XT.Provider,{scope:t.__scopeMenu,children:e(se,{present:o||i.open,children:e(XT.Slot,{scope:t.__scopeMenu,children:s.modal?e(vA,{...a,ref:n}):e(yA,{...a,ref:n})})})})}),vA=r.forwardRef((t,n)=>{const o=oA(pA,t.__scopeMenu),a=r.useRef(null),i=K(n,a);return r.useEffect(()=>{const e=a.current;if(e)return Yr(e)},[]),e(wA,{...t,ref:i,trapFocus:o.open,disableOutsidePointerEvents:o.open,disableOutsideScroll:!0,onFocusOutside:te(t.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>o.onOpenChange(!1)})}),yA=r.forwardRef((t,n)=>{const r=oA(pA,t.__scopeMenu);return e(wA,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),bA=q("MenuContent.ScrollLock"),wA=r.forwardRef((t,n)=>{const{__scopeMenu:o,loop:a=!1,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:l,disableOutsidePointerEvents:c,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:m,onDismiss:h,disableOutsideScroll:g,...v}=t,y=oA(pA,o),b=iA(pA,o),w=tA(o),x=nA(o),k=ZT(o),[N,S]=r.useState(null),C=r.useRef(null),_=K(n,C,y.onContentChange),M=r.useRef(0),E=r.useRef(""),O=r.useRef(0),D=r.useRef(null),P=r.useRef("right"),T=r.useRef(0),A=g?Fr:r.Fragment,R=g?{as:bA,allowPinchZoom:!0}:void 0,I=e=>{const t=E.current+e,n=k().filter(e=>!e.disabled),r=document.activeElement,o=n.find(e=>e.ref.current===r)?.textValue,a=function(e,t,n){const r=t.length>1&&Array.from(t).every(e=>e===t[0]),o=r?t[0]:t,a=n?e.indexOf(n):-1;let i=function(e,t){return e.map((n,r)=>e[(t+r)%e.length])}(e,Math.max(a,0));1===o.length&&(i=i.filter(e=>e!==n));const s=i.find(e=>e.toLowerCase().startsWith(o.toLowerCase()));return s!==n?s:void 0}(n.map(e=>e.textValue),t,o),i=n.find(e=>e.textValue===a)?.ref.current;!function e(t){E.current=t,window.clearTimeout(M.current),""!==t&&(M.current=window.setTimeout(()=>e(""),1e3))}(t),i&&setTimeout(()=>i.focus())};r.useEffect(()=>()=>window.clearTimeout(M.current),[]),Zn();const j=r.useCallback(e=>P.current===D.current?.side&&function(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return function(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){const i=t[e],s=t[a],l=i.x,c=i.y,u=s.x,d=s.y;c>r!=d>r&&n<(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}(n,t)}(e,D.current?.area),[]);return e(mA,{scope:o,searchRef:E,onItemEnter:r.useCallback(e=>{j(e)&&e.preventDefault()},[j]),onItemLeave:r.useCallback(e=>{j(e)||(C.current?.focus(),S(null))},[j]),onTriggerLeave:r.useCallback(e=>{j(e)&&e.preventDefault()},[j]),pointerGraceTimerRef:O,onPointerGraceIntentChange:r.useCallback(e=>{D.current=e},[]),children:e(A,{...R,children:e(Wn,{asChild:!0,trapped:i,onMountAutoFocus:te(s,e=>{e.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:e(In,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:m,onDismiss:h,children:e(WT,{asChild:!0,...x,dir:b.dir,orientation:"vertical",loop:a,currentTabStopId:N,onCurrentTabStopIdChange:S,onEntryFocus:te(u,e=>{b.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:e(ST,{role:"menu","aria-orientation":"vertical","data-state":qA(y.open),"data-radix-menu-content":"",dir:b.dir,...w,...v,ref:_,style:{outline:"none",...v.style},onKeyDown:te(v.onKeyDown,e=>{const t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!n&&r&&I(e.key));const o=C.current;if(e.target!==o)return;if(!YT.includes(e.key))return;e.preventDefault();const a=k().filter(e=>!e.disabled).map(e=>e.ref.current);VT.includes(e.key)&&a.reverse(),function(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}(a)}),onBlur:te(t.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(M.current),E.current="")}),onPointerMove:te(t.onPointerMove,ZA(e=>{const t=e.target,n=T.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>T.current?"right":"left";P.current=t,T.current=e.clientX}}))})})})})})})});gA.displayName=pA;var xA=r.forwardRef((t,n)=>{const{__scopeMenu:r,...o}=t;return e(ae.div,{role:"group",...o,ref:n})});xA.displayName="MenuGroup";var kA=r.forwardRef((t,n)=>{const{__scopeMenu:r,...o}=t;return e(ae.div,{...o,ref:n})});kA.displayName="MenuLabel";var NA="MenuItem",SA="menu.itemSelect",CA=r.forwardRef((t,n)=>{const{disabled:o=!1,onSelect:a,...i}=t,s=r.useRef(null),l=iA(NA,t.__scopeMenu),c=hA(NA,t.__scopeMenu),u=K(n,s),d=r.useRef(!1);return e(_A,{...i,ref:u,disabled:o,onClick:te(t.onClick,()=>{const e=s.current;if(!o&&e){const t=new CustomEvent(SA,{bubbles:!0,cancelable:!0});e.addEventListener(SA,e=>a?.(e),{once:!0}),ie(e,t),t.defaultPrevented?d.current=!1:l.onClose()}}),onPointerDown:e=>{t.onPointerDown?.(e),d.current=!0},onPointerUp:te(t.onPointerUp,e=>{d.current||e.currentTarget?.click()}),onKeyDown:te(t.onKeyDown,e=>{const t=""!==c.searchRef.current;o||t&&" "===e.key||UT.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});CA.displayName=NA;var _A=r.forwardRef((t,n)=>{const{__scopeMenu:o,disabled:a=!1,textValue:i,...s}=t,l=hA(NA,o),c=nA(o),u=r.useRef(null),d=K(n,u),[f,p]=r.useState(!1),[m,h]=r.useState("");return r.useEffect(()=>{const e=u.current;e&&h((e.textContent??"").trim())},[s.children]),e(XT.ItemSlot,{scope:o,disabled:a,textValue:i??m,children:e(HT,{asChild:!0,...c,focusable:!a,children:e(ae.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":a||void 0,"data-disabled":a?"":void 0,...s,ref:d,onPointerMove:te(t.onPointerMove,ZA(e=>{if(a)l.onItemLeave(e);else if(l.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus({preventScroll:!0})}})),onPointerLeave:te(t.onPointerLeave,ZA(e=>l.onItemLeave(e))),onFocus:te(t.onFocus,()=>p(!0)),onBlur:te(t.onBlur,()=>p(!1))})})})}),MA=r.forwardRef((t,n)=>{const{checked:r=!1,onCheckedChange:o,...a}=t;return e(IA,{scope:t.__scopeMenu,checked:r,children:e(CA,{role:"menuitemcheckbox","aria-checked":GA(r)?"mixed":r,...a,ref:n,"data-state":XA(r),onSelect:te(a.onSelect,()=>o?.(!!GA(r)||!r),{checkForDefaultPrevented:!1})})})});MA.displayName="MenuCheckboxItem";var EA="MenuRadioGroup",[OA,DA]=JT(EA,{value:void 0,onValueChange:()=>{}}),PA=r.forwardRef((t,n)=>{const{value:r,onValueChange:o,...a}=t,i=On(o);return e(OA,{scope:t.__scopeMenu,value:r,onValueChange:i,children:e(xA,{...a,ref:n})})});PA.displayName=EA;var TA="MenuRadioItem",AA=r.forwardRef((t,n)=>{const{value:r,...o}=t,a=DA(TA,t.__scopeMenu),i=r===a.value;return e(IA,{scope:t.__scopeMenu,checked:i,children:e(CA,{role:"menuitemradio","aria-checked":i,...o,ref:n,"data-state":XA(i),onSelect:te(o.onSelect,()=>a.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});AA.displayName=TA;var RA="MenuItemIndicator",[IA,jA]=JT(RA,{checked:!1}),zA=r.forwardRef((t,n)=>{const{__scopeMenu:r,forceMount:o,...a}=t,i=jA(RA,r);return e(se,{present:o||GA(i.checked)||!0===i.checked,children:e(ae.span,{...a,ref:n,"data-state":XA(i.checked)})})});zA.displayName=RA;var LA=r.forwardRef((t,n)=>{const{__scopeMenu:r,...o}=t;return e(ae.div,{role:"separator","aria-orientation":"horizontal",...o,ref:n})});LA.displayName="MenuSeparator";var FA=r.forwardRef((t,n)=>{const{__scopeMenu:r,...o}=t,a=tA(r);return e(CT,{...a,...o,ref:n})});FA.displayName="MenuArrow";var BA="MenuSub",[$A,WA]=JT(BA),HA=t=>{const{__scopeMenu:n,children:o,open:a=!1,onOpenChange:i}=t,s=oA(BA,n),l=tA(n),[c,u]=r.useState(null),[d,f]=r.useState(null),p=On(i);return r.useEffect(()=>(!1===s.open&&p(!1),()=>p(!1)),[s.open,p]),e(kT,{...l,children:e(rA,{scope:n,open:a,onOpenChange:p,content:d,onContentChange:f,children:e($A,{scope:n,contentId:de(),triggerId:de(),trigger:c,onTriggerChange:u,children:o})})})};HA.displayName=BA;var UA="MenuSubTrigger",VA=r.forwardRef((t,n)=>{const o=oA(UA,t.__scopeMenu),a=iA(UA,t.__scopeMenu),i=WA(UA,t.__scopeMenu),s=hA(UA,t.__scopeMenu),l=r.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:u}=s,d={__scopeMenu:t.__scopeMenu},f=r.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return r.useEffect(()=>f,[f]),r.useEffect(()=>{const e=c.current;return()=>{window.clearTimeout(e),u(null)}},[c,u]),e(lA,{asChild:!0,...d,children:e(_A,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":i.contentId,"data-state":qA(o.open),...t,ref:Y(n,i.onTriggerChange),onClick:e=>{t.onClick?.(e),t.disabled||e.defaultPrevented||(e.currentTarget.focus(),o.open||o.onOpenChange(!0))},onPointerMove:te(t.onPointerMove,ZA(e=>{s.onItemEnter(e),e.defaultPrevented||t.disabled||o.open||l.current||(s.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{o.onOpenChange(!0),f()},100))})),onPointerLeave:te(t.onPointerLeave,ZA(e=>{f();const t=o.content?.getBoundingClientRect();if(t){const n=o.content?.dataset.side,r="right"===n,a=r?-5:5,i=t[r?"left":"right"],l=t[r?"right":"left"];s.onPointerGraceIntentChange({area:[{x:e.clientX+a,y:e.clientY},{x:i,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:i,y:t.bottom}],side:n}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(e),e.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:te(t.onKeyDown,e=>{const n=""!==s.searchRef.current;t.disabled||n&&" "===e.key||KT[a.dir].includes(e.key)&&(o.onOpenChange(!0),o.content?.focus(),e.preventDefault())})})})});VA.displayName=UA;var YA="MenuSubContent",KA=r.forwardRef((t,n)=>{const o=dA(pA,t.__scopeMenu),{forceMount:a=o.forceMount,...i}=t,s=oA(pA,t.__scopeMenu),l=iA(pA,t.__scopeMenu),c=WA(YA,t.__scopeMenu),u=r.useRef(null),d=K(n,u);return e(XT.Provider,{scope:t.__scopeMenu,children:e(se,{present:a||s.open,children:e(XT.Slot,{scope:t.__scopeMenu,children:e(wA,{id:c.contentId,"aria-labelledby":c.triggerId,...i,ref:d,align:"start",side:"rtl"===l.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{l.isUsingKeyboardRef.current&&u.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:te(t.onFocusOutside,e=>{e.target!==c.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:te(t.onEscapeKeyDown,e=>{l.onClose(),e.preventDefault()}),onKeyDown:te(t.onKeyDown,e=>{const t=e.currentTarget.contains(e.target),n=qT[l.dir].includes(e.key);t&&n&&(s.onOpenChange(!1),c.trigger?.focus(),e.preventDefault())})})})})})});function qA(e){return e?"open":"closed"}function GA(e){return"indeterminate"===e}function XA(e){return GA(e)?"indeterminate":e?"checked":"unchecked"}function ZA(e){return t=>"mouse"===t.pointerType?e(t):void 0}KA.displayName=YA;var QA=sA,JA=lA,eR=fA,tR=gA,nR=xA,rR=kA,oR=CA,aR=MA,iR=PA,sR=AA,lR=zA,cR=LA,uR=FA,dR=HA,fR=VA,pR=KA,mR="ContextMenu",[hR]=H(mR,[eA]),gR=eA(),[vR,yR]=hR(mR),bR=t=>{const{__scopeContextMenu:n,children:o,onOpenChange:a,dir:i,modal:s=!0}=t,[l,c]=r.useState(!1),u=gR(n),d=On(a),f=r.useCallback(e=>{c(e),d(e)},[d]);return e(vR,{scope:n,open:l,onOpenChange:f,modal:s,children:e(QA,{...u,dir:i,open:l,onOpenChange:f,modal:s,children:o})})};bR.displayName=mR;var wR="ContextMenuTrigger",xR=r.forwardRef((o,a)=>{const{__scopeContextMenu:i,disabled:s=!1,...l}=o,c=yR(wR,i),u=gR(i),d=r.useRef({x:0,y:0}),f=r.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...d.current})}),p=r.useRef(0),m=r.useCallback(()=>window.clearTimeout(p.current),[]),h=e=>{d.current={x:e.clientX,y:e.clientY},c.onOpenChange(!0)};return r.useEffect(()=>m,[m]),r.useEffect(()=>{s&&m()},[s,m]),n(t,{children:[e(JA,{...u,virtualRef:f}),e(ae.span,{"data-state":c.open?"open":"closed","data-disabled":s?"":void 0,...l,ref:a,style:{WebkitTouchCallout:"none",...o.style},onContextMenu:s?o.onContextMenu:te(o.onContextMenu,e=>{m(),h(e),e.preventDefault()}),onPointerDown:s?o.onPointerDown:te(o.onPointerDown,LR(e=>{m(),p.current=window.setTimeout(()=>h(e),700)})),onPointerMove:s?o.onPointerMove:te(o.onPointerMove,LR(m)),onPointerCancel:s?o.onPointerCancel:te(o.onPointerCancel,LR(m)),onPointerUp:s?o.onPointerUp:te(o.onPointerUp,LR(m))})]})});xR.displayName=wR;var kR=t=>{const{__scopeContextMenu:n,...r}=t,o=gR(n);return e(eR,{...o,...r})};kR.displayName="ContextMenuPortal";var NR="ContextMenuContent",SR=r.forwardRef((t,n)=>{const{__scopeContextMenu:o,...a}=t,i=yR(NR,o),s=gR(o),l=r.useRef(!1);return e(tR,{...s,...a,ref:n,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),!e.defaultPrevented&&l.current&&e.preventDefault(),l.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||i.modal||(l.current=!0)},style:{...t.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)"}})});SR.displayName=NR;var CR=r.forwardRef((t,n)=>{const{__scopeContextMenu:r,...o}=t,a=gR(r);return e(nR,{...a,...o,ref:n})});CR.displayName="ContextMenuGroup";var _R=r.forwardRef((t,n)=>{const{__scopeContextMenu:r,...o}=t,a=gR(r);return e(rR,{...a,...o,ref:n})});_R.displayName="ContextMenuLabel";var MR=r.forwardRef((t,n)=>{const{__scopeContextMenu:r,...o}=t,a=gR(r);return e(oR,{...a,...o,ref:n})});MR.displayName="ContextMenuItem";var ER=r.forwardRef((t,n)=>{const{__scopeContextMenu:r,...o}=t,a=gR(r);return e(aR,{...a,...o,ref:n})});ER.displayName="ContextMenuCheckboxItem";var OR=r.forwardRef((t,n)=>{const{__scopeContextMenu:r,...o}=t,a=gR(r);return e(iR,{...a,...o,ref:n})});OR.displayName="ContextMenuRadioGroup";var DR=r.forwardRef((t,n)=>{const{__scopeContextMenu:r,...o}=t,a=gR(r);return e(sR,{...a,...o,ref:n})});DR.displayName="ContextMenuRadioItem";var PR=r.forwardRef((t,n)=>{const{__scopeContextMenu:r,...o}=t,a=gR(r);return e(lR,{...a,...o,ref:n})});PR.displayName="ContextMenuItemIndicator";var TR=r.forwardRef((t,n)=>{const{__scopeContextMenu:r,...o}=t,a=gR(r);return e(cR,{...a,...o,ref:n})});TR.displayName="ContextMenuSeparator";var AR=r.forwardRef((t,n)=>{const{__scopeContextMenu:r,...o}=t,a=gR(r);return e(uR,{...a,...o,ref:n})});AR.displayName="ContextMenuArrow";var RR="ContextMenuSub",IR=t=>{const{__scopeContextMenu:n,children:r,onOpenChange:o,open:a,defaultOpen:i}=t,s=gR(n),[l,c]=oe({prop:a,defaultProp:i??!1,onChange:o,caller:RR});return e(dR,{...s,open:l,onOpenChange:c,children:r})};IR.displayName=RR;var jR=r.forwardRef((t,n)=>{const{__scopeContextMenu:r,...o}=t,a=gR(r);return e(fR,{...a,...o,ref:n})});jR.displayName="ContextMenuSubTrigger";var zR=r.forwardRef((t,n)=>{const{__scopeContextMenu:r,...o}=t,a=gR(r);return e(pR,{...a,...o,ref:n,style:{...t.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)"}})});function LR(e){return t=>"mouse"!==t.pointerType?e(t):void 0}zR.displayName="ContextMenuSubContent";var FR=bR,BR=xR,$R=kR,WR=SR,HR=CR,UR=_R,VR=MR,YR=ER,KR=OR,qR=DR,GR=PR,XR=TR,ZR=IR,QR=jR,JR=zR;function eI({...t}){return e(FR,{"data-slot":"context-menu",...t})}function tI({...t}){return e(BR,{"data-slot":"context-menu-trigger",...t})}function nI({...t}){return e(HR,{"data-slot":"context-menu-group",...t})}function rI({...t}){return e($R,{"data-slot":"context-menu-portal",...t})}function oI({...t}){return e(ZR,{"data-slot":"context-menu-sub",...t})}function aI({...t}){return e(KR,{"data-slot":"context-menu-radio-group",...t})}function iI({className:t,inset:r,children:o,...a}){return n(QR,{"data-slot":"context-menu-sub-trigger","data-inset":r,className:vn("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground outline-hidden flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm data-[inset]:pl-8 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",t),...a,children:[o,e(_,{className:"ml-auto"})]})}function sI({className:t,...n}){return e(JR,{"data-slot":"context-menu-sub-content",className:vn("bg-popover text-popover-foreground 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 origin-(--radix-context-menu-content-transform-origin) z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-lg",t),...n})}function lI({className:t,...n}){return e($R,{children:e(WR,{"data-slot":"context-menu-content",className:vn("bg-popover text-popover-foreground 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 max-h-(--radix-context-menu-content-available-height) origin-(--radix-context-menu-content-transform-origin) z-50 min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border p-1 shadow-md",t),...n})})}function cI({className:t,inset:n,variant:r="default",...o}){return e(VR,{"data-slot":"context-menu-item","data-inset":n,"data-variant":r,className:vn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground outline-hidden relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm data-[disabled]:pointer-events-none data-[inset]:pl-8 data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",t),...o})}function uI({className:t,children:r,checked:o,...a}){return n(YR,{"data-slot":"context-menu-checkbox-item",className:vn("focus:bg-accent focus:text-accent-foreground outline-hidden relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pl-8 pr-2 text-sm data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",t),checked:o,...a,children:[e("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:e(GR,{children:e(O,{className:"size-4"})})}),r]})}function dI({className:t,children:r,...o}){return n(qR,{"data-slot":"context-menu-radio-item",className:vn("focus:bg-accent focus:text-accent-foreground outline-hidden relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pl-8 pr-2 text-sm data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",t),...o,children:[e("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:e(GR,{children:e(T,{className:"size-2 fill-current"})})}),r]})}function fI({className:t,inset:n,...r}){return e(UR,{"data-slot":"context-menu-label","data-inset":n,className:vn("text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),...r})}function pI({className:t,...n}){return e(XR,{"data-slot":"context-menu-separator",className:vn("bg-border -mx-1 my-1 h-px",t),...n})}function mI({className:t,...n}){return e("span",{"data-slot":"context-menu-shortcut",className:vn("text-muted-foreground ml-auto text-xs tracking-widest",t),...n})}const hI=o.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),gI=()=>{const e=o.useContext(hI);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};function vI(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function yI(){return wI(/^iPad/)||wI(/^Mac/)&&navigator.maxTouchPoints>1}function bI(){return wI(/^iPhone/)||yI()}function wI(e){return"undefined"!=typeof window&&null!=window.navigator?e.test(window.navigator.platform):void 0}!function(e){if("undefined"==typeof document)return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}("[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(\n[data-state=closed]\n){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}");const xI="undefined"!=typeof window?u:d;function kI(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}const NI="undefined"!=typeof document&&window.visualViewport;function SI(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function CI(e){for(SI(e)&&(e=e.parentElement);e&&!SI(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const _I=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let MI,EI=0;function OI(e={}){let{isDisabled:t}=e;xI(()=>{if(!t)return EI++,1===EI&&bI()&&(MI=function(){let e,t=0,n=n=>{e=CI(n.target),e===document.documentElement&&e===document.body||(t=n.changedTouches[0].pageY)},r=n=>{if(!e||e===document.documentElement||e===document.body)return void n.preventDefault();let r=n.changedTouches[0].pageY,o=e.scrollTop,a=e.scrollHeight-e.clientHeight;0!==a&&((o<=0&&r>t||o>=a&&r<t)&&n.preventDefault(),t=r)},o=e=>{let t=e.target;TI(t)&&t!==document.activeElement&&(e.preventDefault(),t.style.transform="translateY(-2000px)",t.focus(),requestAnimationFrame(()=>{t.style.transform=""}))},a=e=>{let t=e.target;TI(t)&&(t.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{t.style.transform="",NI&&(NI.height<window.innerHeight?requestAnimationFrame(()=>{PI(t)}):NI.addEventListener("resize",()=>PI(t),{once:!0}))}))},i=()=>{window.scrollTo(0,0)},s=window.pageXOffset,l=window.pageYOffset,c=kI(function(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}(document.documentElement,"paddingRight",window.innerWidth-document.documentElement.clientWidth+"px"));window.scrollTo(0,0);let u=kI(DI(document,"touchstart",n,{passive:!1,capture:!0}),DI(document,"touchmove",r,{passive:!1,capture:!0}),DI(document,"touchend",o,{passive:!1,capture:!0}),DI(document,"focus",a,!0),DI(window,"scroll",i));return()=>{c(),u(),window.scrollTo(s,l)}}()),()=>{EI--,0===EI&&(null==MI||MI())}},[t])}function DI(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function PI(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let t=CI(e);if(t!==document.documentElement&&t!==document.body&&t!==e){let n=t.getBoundingClientRect().top,r=e.getBoundingClientRect().top;e.getBoundingClientRect().bottom>t.getBoundingClientRect().bottom+24&&(t.scrollTop+=r-n)}e=t.parentElement}}function TI(e){return e instanceof HTMLInputElement&&!_I.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function AI(...e){return r.useCallback(function(...e){return t=>e.forEach(e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t))}(...e),e)}const RI=new WeakMap;function II(e,t,n=!1){if(!(e&&e instanceof HTMLElement))return;let r={};Object.entries(t).forEach(([t,n])=>{t.startsWith("--")?e.style.setProperty(t,n):(r[t]=e.style[t],e.style[t]=n)}),n||RI.set(e,r)}const jI=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function zI(e,t){if(!e)return null;const n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform;let o=r.match(/^matrix3d\((.+)\)$/);return o?parseFloat(o[1].split(", ")[jI(t)?13:12]):(o=r.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[jI(t)?5:4]):null)}function LI(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}const FI={DURATION:.5,EASE:[.32,.72,0,1]},BI=16,$I="vaul-dragging";function WI(e){const t=o.useRef(e);return o.useEffect(()=>{t.current=e}),o.useMemo(()=>(...e)=>null==t.current?void 0:t.current.call(t,...e),[])}function HI({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,a]=function({defaultProp:e,onChange:t}){const n=o.useState(e),[r]=n,a=o.useRef(r),i=WI(t);return o.useEffect(()=>{a.current!==r&&(i(r),a.current=r)},[r,a,i]),n}({defaultProp:t,onChange:n}),i=void 0!==e,s=i?e:r,l=WI(n),c=o.useCallback(t=>{if(i){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else a(t)},[i,e,a,l]);return[s,c]}let UI=null;const VI=o.forwardRef(function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:a,shouldFade:i,isOpen:s,modal:l,shouldAnimate:c}=gI(),u=AI(t,n),d=r&&r.length>0;if(!l)return null;const f=o.useCallback(e=>a(e),[a]);return o.createElement(Do,{onMouseUp:f,ref:u,"data-vaul-overlay":"","data-vaul-snap-points":s&&d?"true":"false","data-vaul-snap-points-overlay":s&&i?"true":"false","data-vaul-animate":(null==c?void 0:c.current)?"true":"false",...e})});VI.displayName="Drawer.Overlay";const YI=o.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},a){const{drawerRef:i,onPress:s,onRelease:l,onDrag:c,keyboardIsOpen:u,snapPointsOffset:d,activeSnapPointIndex:p,modal:m,isOpen:h,direction:g,snapPoints:v,container:y,handleOnly:b,shouldAnimate:w,autoFocus:x}=gI(),[k,N]=o.useState(!1),S=AI(a,i),C=o.useRef(null),_=o.useRef(null),M=o.useRef(!1),E=v&&v.length>0;!function(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:a}=gI(),i=o.useRef(null),s=f(()=>document.body.style.backgroundColor,[]);function l(){return(window.innerWidth-26)/window.innerWidth}o.useEffect(()=>{if(t&&n){i.current&&clearTimeout(i.current);const t=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!t)return;r&&!a&&LI(document.body,{background:"black"}),LI(t,{transformOrigin:jI(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${FI.DURATION}s`,transitionTimingFunction:`cubic-bezier(${FI.EASE.join(",")})`});const n=LI(t,{borderRadius:"8px",overflow:"hidden",...jI(e)?{transform:`scale(${l()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${l()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{n(),i.current=window.setTimeout(()=>{s?document.body.style.background=s:document.body.style.removeProperty("background")},1e3*FI.DURATION)}}},[t,n,s])}();function O(e){C.current=null,M.current=!1,l(e)}return o.useEffect(()=>{E&&window.requestAnimationFrame(()=>{N(!0)})},[]),o.createElement(Po,{"data-vaul-drawer-direction":g,"data-vaul-drawer":"","data-vaul-delayed-snap-points":k?"true":"false","data-vaul-snap-points":h&&E?"true":"false","data-vaul-custom-container":y?"true":"false","data-vaul-animate":(null==w?void 0:w.current)?"true":"false",...r,ref:S,style:d&&d.length>0?{"--snap-point-height":`${d[null!=p?p:0]}px`,...t}:t,onPointerDown:e=>{b||(null==r.onPointerDown||r.onPointerDown.call(r,e),C.current={x:e.pageX,y:e.pageY},s(e))},onOpenAutoFocus:e=>{null==n||n(e),x||e.preventDefault()},onPointerDownOutside:t=>{null==e||e(t),m&&!t.defaultPrevented?u.current&&(u.current=!1):t.preventDefault()},onFocusOutside:e=>{m||e.preventDefault()},onPointerMove:e=>{if(_.current=e,b)return;if(null==r.onPointerMove||r.onPointerMove.call(r,e),!C.current)return;const t=e.pageY-C.current.y,n=e.pageX-C.current.x,o="touch"===e.pointerType?10:2,a=((e,t,n=0)=>{if(M.current)return!0;const r=Math.abs(e.y),o=Math.abs(e.x),a=o>r,i=["bottom","right"].includes(t)?1:-1;if("left"===t||"right"===t){if(!(e.x*i<0)&&o>=0&&o<=n)return a}else if(!(e.y*i<0)&&r>=0&&r<=n)return!a;return M.current=!0,!0})({x:n,y:t},g,o);a?c(e):(Math.abs(n)>o||Math.abs(t)>o)&&(C.current=null)},onPointerUp:e=>{null==r.onPointerUp||r.onPointerUp.call(r,e),C.current=null,M.current=!1,l(e)},onPointerOut:e=>{null==r.onPointerOut||r.onPointerOut.call(r,e),O(_.current)},onContextMenu:e=>{null==r.onContextMenu||r.onContextMenu.call(r,e),_.current&&O(_.current)}})});YI.displayName="Drawer.Content";const KI=o.forwardRef(function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:a,isDragging:i,snapPoints:s,activeSnapPoint:l,setActiveSnapPoint:c,dismissible:u,handleOnly:d,isOpen:f,onPress:p,onDrag:m}=gI(),h=o.useRef(null),g=o.useRef(!1);function v(){h.current&&window.clearTimeout(h.current),g.current=!1}return o.createElement("div",{onClick:function(){g.current?v():window.setTimeout(()=>{!function(){if(i||e||g.current)return void v();if(v(),!s||0===s.length)return void(u||a());if(l===s[s.length-1]&&u)return void a();const t=s.findIndex(e=>e===l);if(-1===t)return;const n=s[t+1];c(n)}()},120)},onPointerCancel:v,onPointerDown:e=>{d&&p(e),h.current=window.setTimeout(()=>{g.current=!0},250)},onPointerMove:e=>{d&&m(e)},ref:r,"data-vaul-drawer-visible":f?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},o.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});KI.displayName="Drawer.Handle";const qI={Root:function({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:a,snapPoints:i,shouldScaleBackground:s=!1,setBackgroundColorOnScale:l=!0,closeThreshold:c=.25,scrollLockTimeout:u=100,dismissible:d=!0,handleOnly:f=!1,fadeFromIndex:p=i&&i.length-1,activeSnapPoint:m,setActiveSnapPoint:h,fixed:g,modal:v=!0,onClose:y,nested:b,noBodyStyles:w=!1,direction:x="bottom",defaultOpen:k=!1,disablePreventScroll:N=!0,snapToSequentialPoint:S=!1,preventScrollRestoration:C=!1,repositionInputs:_=!0,onAnimationEnd:M,container:E,autoFocus:O=!1}){var D,P;const[T=!1,A]=HI({defaultProp:k,prop:e,onChange:e=>{null==t||t(e),e||b||ue(),setTimeout(()=>{null==M||M(e)},1e3*FI.DURATION),e&&!v&&"undefined"!=typeof window&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),e||(document.body.style.pointerEvents="auto")}}),[R,I]=o.useState(!1),[j,z]=o.useState(!1),[L,F]=o.useState(!1),B=o.useRef(null),$=o.useRef(null),W=o.useRef(null),H=o.useRef(null),U=o.useRef(null),V=o.useRef(!1),Y=o.useRef(null),K=o.useRef(0),q=o.useRef(!1),G=o.useRef(!k),X=o.useRef(0),Z=o.useRef(null),Q=o.useRef((null==(D=Z.current)?void 0:D.getBoundingClientRect().height)||0),J=o.useRef((null==(P=Z.current)?void 0:P.getBoundingClientRect().width)||0),ee=o.useRef(0),te=o.useCallback(e=>{i&&e===ie.length-1&&($.current=new Date)},[]),{activeSnapPoint:ne,activeSnapPointIndex:re,setActiveSnapPoint:oe,onRelease:ae,snapPointsOffset:ie,onDrag:se,shouldFade:le,getPercentageDragged:ce}=function({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:a,fadeFromIndex:i,onSnapPointChange:s,direction:l="bottom",container:c,snapToSequentialPoint:u}){const[d,f]=HI({prop:e,defaultProp:null==n?void 0:n[0],onChange:t}),[p,m]=o.useState("undefined"!=typeof window?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);o.useEffect(()=>{function e(){m({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);const h=o.useMemo(()=>d===(null==n?void 0:n[n.length-1])||null,[n,d]),g=o.useMemo(()=>{var e;return null!=(e=null==n?void 0:n.findIndex(e=>e===d))?e:null},[n,d]),v=n&&n.length>0&&(i||0===i)&&!Number.isNaN(i)&&n[i]===d||!n,y=o.useMemo(()=>{const e=c?{width:c.getBoundingClientRect().width,height:c.getBoundingClientRect().height}:"undefined"!=typeof window?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var t;return null!=(t=null==n?void 0:n.map(t=>{const n="string"==typeof t;let r=0;if(n&&(r=parseInt(t,10)),jI(l)){const o=n?r:p?t*e.height:0;return p?"bottom"===l?e.height-o:-e.height+o:o}const o=n?r:p?t*e.width:0;return p?"right"===l?e.width-o:-e.width+o:o}))?t:[]},[n,p,c]),b=o.useMemo(()=>null!==g?null==y?void 0:y[g]:null,[y,g]),w=o.useCallback(e=>{var t;const o=null!=(t=null==y?void 0:y.findIndex(t=>t===e))?t:null;s(o),II(r.current,{transition:`transform ${FI.DURATION}s cubic-bezier(${FI.EASE.join(",")})`,transform:jI(l)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`}),y&&o!==y.length-1&&void 0!==i&&o!==i&&o<i?II(a.current,{transition:`opacity ${FI.DURATION}s cubic-bezier(${FI.EASE.join(",")})`,opacity:"0"}):II(a.current,{transition:`opacity ${FI.DURATION}s cubic-bezier(${FI.EASE.join(",")})`,opacity:"1"}),f(null==n?void 0:n[Math.max(o,0)])},[r.current,n,y,i,a,f]);return o.useEffect(()=>{if(d||e){var t;const r=null!=(t=null==n?void 0:n.findIndex(t=>t===e||t===d))?t:-1;y&&-1!==r&&"number"==typeof y[r]&&w(y[r])}},[d,e,n,y,w]),{isLastSnapPoint:h,activeSnapPoint:d,shouldFade:v,getPercentageDragged:function(e,t){if(!n||"number"!=typeof g||!y||void 0===i)return null;const r=g===i-1;if(g>=i&&t)return 0;if(r&&!t)return 1;if(!v&&!r)return null;const o=r?g+1:g-1,a=r?y[o]-y[o-1]:y[o+1]-y[o],s=e/Math.abs(a);return r?1-s:s},setActiveSnapPoint:f,activeSnapPointIndex:g,onRelease:function({draggedDistance:e,closeDrawer:t,velocity:r,dismissible:o}){if(void 0===i)return;const s="bottom"===l||"right"===l?(null!=b?b:0)-e:(null!=b?b:0)+e,c=0===g,d=e>0;if(g===i-1&&II(a.current,{transition:`opacity ${FI.DURATION}s cubic-bezier(${FI.EASE.join(",")})`}),!u&&r>2&&!d)return void(o?t():w(y[0]));if(!u&&r>2&&d&&y&&n)return void w(y[n.length-1]);const f=null==y?void 0:y.reduce((e,t)=>"number"!=typeof e||"number"!=typeof t?e:Math.abs(t-s)<Math.abs(e-s)?t:e),p=jI(l)?window.innerHeight:window.innerWidth;if(r>.4&&Math.abs(e)<.4*p){const e=d?1:-1;if(e>0&&h&&n)return void w(y[n.length-1]);if(c&&e<0&&o&&t(),null===g)return;return void w(y[g+e])}w(f)},onDrag:function({draggedDistance:e}){if(null===b)return;const t="bottom"===l||"right"===l?b-e:b+e;("bottom"===l||"right"===l)&&t<y[y.length-1]||("top"===l||"left"===l)&&t>y[y.length-1]||II(r.current,{transform:jI(l)?`translate3d(0, ${t}px, 0)`:`translate3d(${t}px, 0, 0)`})},snapPointsOffset:y}}({snapPoints:i,activeSnapPointProp:m,setActiveSnapPointProp:h,drawerRef:Z,fadeFromIndex:p,overlayRef:B,onSnapPointChange:te,direction:x,container:E,snapToSequentialPoint:S});OI({isDisabled:!T||j||!v||L||!R||!_||!N});const{restorePositionSetting:ue}=function({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:a,noBodyStyles:i}){const[s,l]=o.useState(()=>"undefined"!=typeof window?window.location.href:""),c=o.useRef(0),u=o.useCallback(()=>{if(vI()&&null===UI&&e&&!i){UI={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:e,innerHeight:t}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:-c.current+"px",left:-e+"px",right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const e=t-window.innerHeight;e&&c.current>=t&&(document.body.style.top=-(c.current+e)+"px")}),300)}},[e]),d=o.useCallback(()=>{if(vI()&&null!==UI&&!i){const e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);Object.assign(document.body.style,UI),window.requestAnimationFrame(()=>{a&&s!==window.location.href?l(window.location.href):window.scrollTo(t,e)}),UI=null}},[s]);return o.useEffect(()=>{function e(){c.current=window.scrollY}return e(),window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}},[]),o.useEffect(()=>{if(t)return()=>{"undefined"!=typeof document&&(document.querySelector("[data-vaul-drawer]")||d())}},[t,d]),o.useEffect(()=>{!n&&r&&(e?(!window.matchMedia("(display-mode: standalone)").matches&&u(),t||window.setTimeout(()=>{d()},500)):d())},[e,r,s,t,n,u,d]),{restorePositionSetting:d}}({isOpen:T,modal:v,nested:null!=b&&b,hasBeenOpened:R,preventScrollRestoration:C,noBodyStyles:w});function de(){return(window.innerWidth-26)/window.innerWidth}function fe(e,t){var n;let r=e;const o=null==(n=window.getSelection())?void 0:n.toString(),a=Z.current?zI(Z.current,x):null,i=new Date;if("SELECT"===r.tagName)return!1;if(r.hasAttribute("data-vaul-no-drag")||r.closest("[data-vaul-no-drag]"))return!1;if("right"===x||"left"===x)return!0;if($.current&&i.getTime()-$.current.getTime()<500)return!1;if(null!==a&&("bottom"===x?a>0:a<0))return!0;if(o&&o.length>0)return!1;if(U.current&&i.getTime()-U.current.getTime()<u&&0===a)return U.current=i,!1;if(t)return U.current=i,!1;for(;r;){if(r.scrollHeight>r.clientHeight){if(0!==r.scrollTop)return U.current=new Date,!1;if("dialog"===r.getAttribute("role"))return!0}r=r.parentNode}return!0}function pe(e){!function(){if(!j||!Z.current)return;Z.current.classList.remove($I),V.current=!1,z(!1),H.current=new Date}(),null==y||y(),e||A(!1),setTimeout(()=>{i&&oe(i[0])},1e3*FI.DURATION)}function me(){if(!Z.current)return;const e=document.querySelector("[data-vaul-drawer-wrapper]"),t=zI(Z.current,x);II(Z.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${FI.DURATION}s cubic-bezier(${FI.EASE.join(",")})`}),II(B.current,{transition:`opacity ${FI.DURATION}s cubic-bezier(${FI.EASE.join(",")})`,opacity:"1"}),s&&t&&t>0&&T&&II(e,{borderRadius:"8px",overflow:"hidden",...jI(x)?{transform:`scale(${de()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${de()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${FI.DURATION}s`,transitionTimingFunction:`cubic-bezier(${FI.EASE.join(",")})`},!0)}return o.useEffect(()=>{window.requestAnimationFrame(()=>{G.current=!0})},[]),o.useEffect(()=>{var e;function t(){if(!Z.current||!_)return;if(TI(document.activeElement)||q.current){var e;const t=(null==(e=window.visualViewport)?void 0:e.height)||0,n=window.innerHeight;let r=n-t;const o=Z.current.getBoundingClientRect().height||0,a=o>.8*n;ee.current||(ee.current=o);const s=Z.current.getBoundingClientRect().top;if(Math.abs(X.current-r)>60&&(q.current=!q.current),i&&i.length>0&&ie&&re){r+=ie[re]||0}if(X.current=r,o>t||q.current){const e=Z.current.getBoundingClientRect().height;let n=e;e>t&&(n=t-(a?s:26)),Z.current.style.height=g?e-Math.max(r,0)+"px":`${Math.max(n,t-s)}px`}else(function(){const e=navigator.userAgent;return"undefined"!=typeof window&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))})()||(Z.current.style.height=`${ee.current}px`);i&&i.length>0&&!q.current?Z.current.style.bottom="0px":Z.current.style.bottom=`${Math.max(r,0)}px`}}return null==(e=window.visualViewport)||e.addEventListener("resize",t),()=>{var e;return null==(e=window.visualViewport)?void 0:e.removeEventListener("resize",t)}},[re,i,ie]),o.useEffect(()=>(T&&(II(document.documentElement,{scrollBehavior:"auto"}),$.current=new Date),()=>{!function(e,t){if(!(e&&e instanceof HTMLElement))return;let n=RI.get(e);n&&(e.style[t]=n[t])}(document.documentElement,"scrollBehavior")}),[T]),o.useEffect(()=>{v||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[v]),o.createElement(Mo,{defaultOpen:k,onOpenChange:e=>{(d||e)&&(e?I(!0):pe(!0),A(e))},open:T},o.createElement(hI.Provider,{value:{activeSnapPoint:ne,snapPoints:i,setActiveSnapPoint:oe,drawerRef:Z,overlayRef:B,onOpenChange:t,onPress:function(e){var t,n;(d||i)&&(Z.current&&!Z.current.contains(e.target)||(Q.current=(null==(t=Z.current)?void 0:t.getBoundingClientRect().height)||0,J.current=(null==(n=Z.current)?void 0:n.getBoundingClientRect().width)||0,z(!0),W.current=new Date,bI()&&window.addEventListener("touchend",()=>V.current=!1,{once:!0}),e.target.setPointerCapture(e.pointerId),K.current=jI(x)?e.pageY:e.pageX))},onRelease:function(e){if(!j||!Z.current)return;Z.current.classList.remove($I),V.current=!1,z(!1),H.current=new Date;const t=zI(Z.current,x);if(!e||!fe(e.target,!1)||!t||Number.isNaN(t))return;if(null===W.current)return;const n=H.current.getTime()-W.current.getTime(),r=K.current-(jI(x)?e.pageY:e.pageX),o=Math.abs(r)/n;if(o>.05&&(F(!0),setTimeout(()=>{F(!1)},200)),i){return ae({draggedDistance:r*("bottom"===x||"right"===x?1:-1),closeDrawer:pe,velocity:o,dismissible:d}),void(null==a||a(e,!0))}if("bottom"===x||"right"===x?r>0:r<0)return me(),void(null==a||a(e,!0));if(o>.4)return pe(),void(null==a||a(e,!1));var s;const l=Math.min(null!=(s=Z.current.getBoundingClientRect().height)?s:0,window.innerHeight);var u;const f=Math.min(null!=(u=Z.current.getBoundingClientRect().width)?u:0,window.innerWidth),p="left"===x||"right"===x;if(Math.abs(t)>=(p?f:l)*c)return pe(),void(null==a||a(e,!1));null==a||a(e,!0),me()},onDrag:function(e){var t;if(Z.current&&j){const n="bottom"===x||"right"===x?1:-1,o=(K.current-(jI(x)?e.pageY:e.pageX))*n,a=o>0,l=i&&!d&&!a;if(l&&0===re)return;const c=Math.abs(o),u=document.querySelector("[data-vaul-drawer-wrapper]");let f=c/("bottom"===x||"top"===x?Q.current:J.current);const m=ce(c,a);if(null!==m&&(f=m),l&&f>=1)return;if(!V.current&&!fe(e.target,a))return;if(Z.current.classList.add($I),V.current=!0,II(Z.current,{transition:"none"}),II(B.current,{transition:"none"}),i&&se({draggedDistance:o}),a&&!i){const e=(t=o,8*(Math.log(t+1)-2)),r=Math.min(-1*e,0)*n;return void II(Z.current,{transform:jI(x)?`translate3d(0, ${r}px, 0)`:`translate3d(${r}px, 0, 0)`})}const h=1-f;if((le||p&&re===p-1)&&(null==r||r(e,f),II(B.current,{opacity:`${h}`,transition:"none"},!0)),u&&B.current&&s){const e=Math.min(de()+f*(1-de()),1),t=8-8*f,n=Math.max(0,14-14*f);II(u,{borderRadius:`${t}px`,transform:jI(x)?`scale(${e}) translate3d(0, ${n}px, 0)`:`scale(${e}) translate3d(${n}px, 0, 0)`,transition:"none"},!0)}if(!i){const e=c*n;II(Z.current,{transform:jI(x)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}}},dismissible:d,shouldAnimate:G,handleOnly:f,isOpen:T,isDragging:j,shouldFade:le,closeDrawer:pe,onNestedDrag:function(e,t){if(t<0)return;const n=(window.innerWidth-BI)/window.innerWidth,r=n+t*(1-n),o=t*BI-16;II(Z.current,{transform:jI(x)?`scale(${r}) translate3d(0, ${o}px, 0)`:`scale(${r}) translate3d(${o}px, 0, 0)`,transition:"none"})},onNestedOpenChange:function(e){const t=e?(window.innerWidth-BI)/window.innerWidth:1,n=e?-16:0;Y.current&&window.clearTimeout(Y.current),II(Z.current,{transition:`transform ${FI.DURATION}s cubic-bezier(${FI.EASE.join(",")})`,transform:jI(x)?`scale(${t}) translate3d(0, ${n}px, 0)`:`scale(${t}) translate3d(${n}px, 0, 0)`}),!e&&Z.current&&(Y.current=setTimeout(()=>{const e=zI(Z.current,x);II(Z.current,{transition:"none",transform:jI(x)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})},500))},onNestedRelease:function(e,t){const n=jI(x)?window.innerHeight:window.innerWidth,r=t?(n-BI)/n:1,o=t?-16:0;t&&II(Z.current,{transition:`transform ${FI.DURATION}s cubic-bezier(${FI.EASE.join(",")})`,transform:jI(x)?`scale(${r}) translate3d(0, ${o}px, 0)`:`scale(${r}) translate3d(${o}px, 0, 0)`})},keyboardIsOpen:q,modal:v,snapPointsOffset:ie,activeSnapPointIndex:re,direction:x,shouldScaleBackground:s,setBackgroundColorOnScale:l,noBodyStyles:w,container:E,autoFocus:O}},n))},Content:YI,Overlay:VI,Trigger:Eo,Portal:function(e){const t=gI(),{container:n=t.container,...r}=e;return o.createElement(Oo,{container:n,...r})},Close:Ro,Title:To,Description:Ao};function GI({...t}){return e(qI.Root,{"data-slot":"drawer",...t})}function XI({...t}){return e(qI.Trigger,{"data-slot":"drawer-trigger",...t})}function ZI({...t}){return e(qI.Portal,{"data-slot":"drawer-portal",...t})}function QI({...t}){return e(qI.Close,{"data-slot":"drawer-close",...t})}function JI({className:t,...n}){return e(qI.Overlay,{"data-slot":"drawer-overlay",className:vn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...n})}function ej({className:t,children:r,...o}){return n(ZI,{"data-slot":"drawer-portal",children:[e(JI,{}),n(qI.Content,{"data-slot":"drawer-content",className:vn("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",t),...o,children:[e("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),r]})]})}function tj({className:t,...n}){return e("div",{"data-slot":"drawer-header",className:vn("flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left",t),...n})}function nj({className:t,...n}){return e("div",{"data-slot":"drawer-footer",className:vn("mt-auto flex flex-col gap-2 p-4",t),...n})}function rj({className:t,...n}){return e(qI.Title,{"data-slot":"drawer-title",className:vn("text-foreground font-semibold",t),...n})}function oj({className:t,...n}){return e(qI.Description,{"data-slot":"drawer-description",className:vn("text-muted-foreground text-sm",t),...n})}var aj="DropdownMenu",[ij]=H(aj,[eA]),sj=eA(),[lj,cj]=ij(aj),uj=t=>{const{__scopeDropdownMenu:n,children:o,dir:a,open:i,defaultOpen:s,onOpenChange:l,modal:c=!0}=t,u=sj(n),d=r.useRef(null),[f,p]=oe({prop:i,defaultProp:s??!1,onChange:l,caller:aj});return e(lj,{scope:n,triggerId:de(),triggerRef:d,contentId:de(),open:f,onOpenChange:p,onOpenToggle:r.useCallback(()=>p(e=>!e),[p]),modal:c,children:e(QA,{...u,open:f,onOpenChange:p,dir:a,modal:c,children:o})})};uj.displayName=aj;var dj="DropdownMenuTrigger",fj=r.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,disabled:o=!1,...a}=t,i=cj(dj,r),s=sj(r);return e(JA,{asChild:!0,...s,children:e(ae.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":o?"":void 0,disabled:o,...a,ref:Y(n,i.triggerRef),onPointerDown:te(t.onPointerDown,e=>{o||0!==e.button||!1!==e.ctrlKey||(i.onOpenToggle(),i.open||e.preventDefault())}),onKeyDown:te(t.onKeyDown,e=>{o||(["Enter"," "].includes(e.key)&&i.onOpenToggle(),"ArrowDown"===e.key&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())})})})});fj.displayName=dj;var pj=t=>{const{__scopeDropdownMenu:n,...r}=t,o=sj(n);return e(eR,{...o,...r})};pj.displayName="DropdownMenuPortal";var mj="DropdownMenuContent",hj=r.forwardRef((t,n)=>{const{__scopeDropdownMenu:o,...a}=t,i=cj(mj,o),s=sj(o),l=r.useRef(!1);return e(tR,{id:i.contentId,"aria-labelledby":i.triggerId,...s,...a,ref:n,onCloseAutoFocus:te(t.onCloseAutoFocus,e=>{l.current||i.triggerRef.current?.focus(),l.current=!1,e.preventDefault()}),onInteractOutside:te(t.onInteractOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;i.modal&&!r||(l.current=!0)}),style:{...t.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)"}})});hj.displayName=mj;var gj=r.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,a=sj(r);return e(nR,{...a,...o,ref:n})});gj.displayName="DropdownMenuGroup";var vj=r.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,a=sj(r);return e(rR,{...a,...o,ref:n})});vj.displayName="DropdownMenuLabel";var yj=r.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,a=sj(r);return e(oR,{...a,...o,ref:n})});yj.displayName="DropdownMenuItem";var bj=r.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,a=sj(r);return e(aR,{...a,...o,ref:n})});bj.displayName="DropdownMenuCheckboxItem";var wj=r.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,a=sj(r);return e(iR,{...a,...o,ref:n})});wj.displayName="DropdownMenuRadioGroup";var xj=r.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,a=sj(r);return e(sR,{...a,...o,ref:n})});xj.displayName="DropdownMenuRadioItem";var kj=r.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,a=sj(r);return e(lR,{...a,...o,ref:n})});kj.displayName="DropdownMenuItemIndicator";var Nj=r.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,a=sj(r);return e(cR,{...a,...o,ref:n})});Nj.displayName="DropdownMenuSeparator";var Sj=r.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,a=sj(r);return e(uR,{...a,...o,ref:n})});Sj.displayName="DropdownMenuArrow";var Cj=r.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,a=sj(r);return e(fR,{...a,...o,ref:n})});Cj.displayName="DropdownMenuSubTrigger";var _j=r.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,a=sj(r);return e(pR,{...a,...o,ref:n,style:{...t.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)"}})});_j.displayName="DropdownMenuSubContent";var Mj=uj,Ej=fj,Oj=pj,Dj=hj,Pj=gj,Tj=vj,Aj=yj,Rj=bj,Ij=wj,jj=xj,zj=kj,Lj=Nj,Fj=t=>{const{__scopeDropdownMenu:n,children:r,open:o,onOpenChange:a,defaultOpen:i}=t,s=sj(n),[l,c]=oe({prop:o,defaultProp:i??!1,onChange:a,caller:"DropdownMenuSub"});return e(dR,{...s,open:l,onOpenChange:c,children:r})},Bj=Cj,$j=_j;function Wj({...t}){return e(Mj,{"data-slot":"dropdown-menu",...t})}function Hj({...t}){return e(Oj,{"data-slot":"dropdown-menu-portal",...t})}function Uj({...t}){return e(Ej,{"data-slot":"dropdown-menu-trigger",...t})}function Vj({className:t,sideOffset:n=4,...r}){return e(Oj,{children:e(Dj,{"data-slot":"dropdown-menu-content",sideOffset:n,className:vn("bg-popover text-popover-foreground 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 max-h-(--radix-dropdown-menu-content-available-height) origin-(--radix-dropdown-menu-content-transform-origin) z-50 min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border p-1 shadow-md",t),...r})})}function Yj({...t}){return e(Pj,{"data-slot":"dropdown-menu-group",...t})}function Kj({className:t,inset:n,variant:r="default",...o}){return e(Aj,{"data-slot":"dropdown-menu-item","data-inset":n,"data-variant":r,className:vn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground outline-hidden relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm data-[disabled]:pointer-events-none data-[inset]:pl-8 data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",t),...o})}function qj({className:t,children:r,checked:o,...a}){return n(Rj,{"data-slot":"dropdown-menu-checkbox-item",className:vn("focus:bg-accent focus:text-accent-foreground outline-hidden relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pl-8 pr-2 text-sm data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",t),checked:o,...a,children:[e("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:e(zj,{children:e(O,{className:"size-4"})})}),r]})}function Gj({...t}){return e(Ij,{"data-slot":"dropdown-menu-radio-group",...t})}function Xj({className:t,children:r,...o}){return n(jj,{"data-slot":"dropdown-menu-radio-item",className:vn("focus:bg-accent focus:text-accent-foreground outline-hidden relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pl-8 pr-2 text-sm data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",t),...o,children:[e("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:e(zj,{children:e(T,{className:"size-2 fill-current"})})}),r]})}function Zj({className:t,inset:n,...r}){return e(Tj,{"data-slot":"dropdown-menu-label","data-inset":n,className:vn("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),...r})}function Qj({className:t,...n}){return e(Lj,{"data-slot":"dropdown-menu-separator",className:vn("bg-border -mx-1 my-1 h-px",t),...n})}function Jj({className:t,...n}){return e("span",{"data-slot":"dropdown-menu-shortcut",className:vn("text-muted-foreground ml-auto text-xs tracking-widest",t),...n})}function ez({...t}){return e(Fj,{"data-slot":"dropdown-menu-sub",...t})}function tz({className:t,inset:r,children:o,...a}){return n(Bj,{"data-slot":"dropdown-menu-sub-trigger","data-inset":r,className:vn("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground outline-hidden flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm data-[inset]:pl-8 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",t),...a,children:[o,e(_,{className:"ml-auto size-4"})]})}function nz({className:t,...n}){return e($j,{"data-slot":"dropdown-menu-sub-content",className:vn("bg-popover text-popover-foreground 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 origin-(--radix-dropdown-menu-content-transform-origin) z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-lg",t),...n})}function rz({className:t,...n}){return e("div",{"data-slot":"empty",className:vn("flex min-w-0 flex-1 flex-col items-center justify-center gap-6 text-balance rounded-lg border-dashed p-6 text-center md:p-12",t),...n})}function oz({className:t,...n}){return e("div",{"data-slot":"empty-header",className:vn("flex max-w-sm flex-col items-center gap-2 text-center",t),...n})}const az=Sn("flex shrink-0 items-center justify-center mb-2 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",icon:"bg-muted text-foreground flex size-10 shrink-0 items-center justify-center rounded-lg [&_svg:not([class*='size-'])]:size-6"}},defaultVariants:{variant:"default"}});function iz({className:t,variant:n="default",...r}){return e("div",{"data-slot":"empty-icon","data-variant":n,className:vn(az({variant:n,className:t})),...r})}function sz({className:t,...n}){return e("div",{"data-slot":"empty-title",className:vn("text-lg font-medium tracking-tight",t),...n})}function lz({className:t,...n}){return e("div",{"data-slot":"empty-description",className:vn("text-muted-foreground [&>a:hover]:text-primary text-sm/relaxed [&>a]:underline [&>a]:underline-offset-4",t),...n})}function cz({className:t,...n}){return e("div",{"data-slot":"empty-content",className:vn("flex w-full min-w-0 max-w-sm flex-col items-center gap-4 text-balance text-sm",t),...n})}var uz=r.forwardRef((t,n)=>e(ae.label,{...t,ref:n,onMouseDown:e=>{e.target.closest("button, input, select, textarea")||(t.onMouseDown?.(e),!e.defaultPrevented&&e.detail>1&&e.preventDefault())}}));uz.displayName="Label";var dz=uz;function fz({className:t,...n}){return e(dz,{"data-slot":"label",className:vn("flex select-none items-center gap-2 text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-50 group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50",t),...n})}function pz({className:t,...n}){return e("fieldset",{"data-slot":"field-set",className:vn("flex flex-col gap-6","has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",t),...n})}function mz({className:t,variant:n="legend",...r}){return e("legend",{"data-slot":"field-legend","data-variant":n,className:vn("mb-3 font-medium","data-[variant=legend]:text-base","data-[variant=label]:text-sm",t),...r})}function hz({className:t,...n}){return e("div",{"data-slot":"field-group",className:vn("group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4",t),...n})}const gz=Sn("group/field flex w-full gap-3 data-[invalid=true]:text-destructive",{variants:{orientation:{vertical:["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],horizontal:["flex-row items-center","[&>[data-slot=field-label]]:flex-auto","has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"],responsive:["flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto","@md/field-group:[&>[data-slot=field-label]]:flex-auto","@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"]}},defaultVariants:{orientation:"vertical"}});function vz({className:t,orientation:n="vertical",...r}){return e("div",{role:"group","data-slot":"field","data-orientation":n,className:vn(gz({orientation:n}),t),...r})}function yz({className:t,...n}){return e("div",{"data-slot":"field-content",className:vn("group/field-content flex flex-1 flex-col gap-1.5 leading-snug",t),...n})}function bz({className:t,...n}){return e(fz,{"data-slot":"field-label",className:vn("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4","has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10",t),...n})}function wz({className:t,...n}){return e("div",{"data-slot":"field-label",className:vn("flex w-fit items-center gap-2 text-sm font-medium leading-snug group-data-[disabled=true]/field:opacity-50",t),...n})}function xz({className:t,...n}){return e("p",{"data-slot":"field-description",className:vn("text-muted-foreground text-sm font-normal leading-normal group-has-[[data-orientation=horizontal]]/field:text-balance","nth-last-2:-mt-1 last:mt-0 [[data-variant=legend]+&]:-mt-1.5","[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",t),...n})}function kz({children:t,className:r,...o}){return n("div",{"data-slot":"field-separator","data-content":!!t,className:vn("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",r),...o,children:[e(di,{className:"absolute inset-0 top-1/2"}),t&&e("span",{className:"bg-background text-muted-foreground relative mx-auto block w-fit px-2","data-slot":"field-separator-content",children:t})]})}function Nz({className:t,children:n,errors:r,...o}){const a=f(()=>n||(r?1===r?.length&&r[0]?.message?r[0].message:e("ul",{className:"ml-4 flex list-disc flex-col gap-1",children:r.map((t,n)=>t?.message&&e("li",{children:t.message},n))}):null),[n,r]);return a?e("div",{role:"alert","data-slot":"field-error",className:vn("text-destructive text-sm font-normal",t),...o,children:a}):null}const Sz=F,Cz=r.createContext({}),_z=({...t})=>e(Cz.Provider,{value:{name:t.name},children:e(W,{...t})}),Mz=()=>{const e=r.useContext(Cz),t=r.useContext(Ez),{getFieldState:n}=B(),o=$({name:e.name}),a=n(e.name,o);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=t;return{id:i,name:e.name,formItemId:`${i}-form-item`,formDescriptionId:`${i}-form-item-description`,formMessageId:`${i}-form-item-message`,...a}},Ez=r.createContext({});function Oz({className:t,...n}){const o=r.useId();return e(Ez.Provider,{value:{id:o},children:e("div",{"data-slot":"form-item",className:vn("grid gap-2",t),...n})})}function Dz({className:t,...n}){const{error:r,formItemId:o}=Mz();return e(fz,{"data-slot":"form-label","data-error":!!r,className:vn("data-[error=true]:text-destructive",t),htmlFor:o,...n})}function Pz({...t}){const{error:n,formItemId:r,formDescriptionId:o,formMessageId:a}=Mz();return e(G,{"data-slot":"form-control",id:r,"aria-describedby":n?`${o} ${a}`:`${o}`,"aria-invalid":!!n,...t})}function Tz({className:t,...n}){const{formDescriptionId:r}=Mz();return e("p",{"data-slot":"form-description",id:r,className:vn("text-muted-foreground text-sm",t),...n})}function Az({className:t,...n}){const{error:r,formMessageId:o}=Mz(),a=r?String(r?.message??""):n.children;return a?e("p",{"data-slot":"form-message",id:o,className:vn("text-destructive text-sm",t),...n,children:a}):null}var Rz,Iz="HoverCard",[jz]=H(Iz,[iT]),zz=iT(),[Lz,Fz]=jz(Iz),Bz=t=>{const{__scopeHoverCard:n,children:o,open:a,defaultOpen:i,onOpenChange:s,openDelay:l=700,closeDelay:c=300}=t,u=zz(n),d=r.useRef(0),f=r.useRef(0),p=r.useRef(!1),m=r.useRef(!1),[h,g]=oe({prop:a,defaultProp:i??!1,onChange:s,caller:Iz}),v=r.useCallback(()=>{clearTimeout(f.current),d.current=window.setTimeout(()=>g(!0),l)},[l,g]),y=r.useCallback(()=>{clearTimeout(d.current),p.current||m.current||(f.current=window.setTimeout(()=>g(!1),c))},[c,g]),b=r.useCallback(()=>g(!1),[g]);return r.useEffect(()=>()=>{clearTimeout(d.current),clearTimeout(f.current)},[]),e(Lz,{scope:n,open:h,onOpenChange:g,onOpen:v,onClose:y,onDismiss:b,hasSelectionRef:p,isPointerDownOnContentRef:m,children:e(kT,{...u,children:o})})};Bz.displayName=Iz;var $z="HoverCardTrigger",Wz=r.forwardRef((t,n)=>{const{__scopeHoverCard:r,...o}=t,a=Fz($z,r),i=zz(r);return e(NT,{asChild:!0,...i,children:e(ae.a,{"data-state":a.open?"open":"closed",...o,ref:n,onPointerEnter:te(t.onPointerEnter,Zz(a.onOpen)),onPointerLeave:te(t.onPointerLeave,Zz(a.onClose)),onFocus:te(t.onFocus,a.onOpen),onBlur:te(t.onBlur,a.onClose),onTouchStart:te(t.onTouchStart,e=>e.preventDefault())})})});Wz.displayName=$z;var Hz="HoverCardPortal",[Uz,Vz]=jz(Hz,{forceMount:void 0}),Yz=t=>{const{__scopeHoverCard:n,forceMount:r,children:o,container:a}=t,i=Fz(Hz,n);return e(Uz,{scope:n,forceMount:r,children:e(se,{present:r||i.open,children:e(Gn,{asChild:!0,container:a,children:o})})})};Yz.displayName=Hz;var Kz="HoverCardContent",qz=r.forwardRef((t,n)=>{const r=Vz(Kz,t.__scopeHoverCard),{forceMount:o=r.forceMount,...a}=t,i=Fz(Kz,t.__scopeHoverCard);return e(se,{present:o||i.open,children:e(Gz,{"data-state":i.open?"open":"closed",...a,onPointerEnter:te(t.onPointerEnter,Zz(i.onOpen)),onPointerLeave:te(t.onPointerLeave,Zz(i.onClose)),ref:n})})});qz.displayName=Kz;var Gz=r.forwardRef((t,n)=>{const{__scopeHoverCard:o,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:l,...c}=t,u=Fz(Kz,o),d=zz(o),f=r.useRef(null),p=K(n,f),[m,h]=r.useState(!1);return r.useEffect(()=>{if(m){const e=document.body;return Rz=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect="none",e.style.webkitUserSelect="none",()=>{e.style.userSelect=Rz,e.style.webkitUserSelect=Rz}}},[m]),r.useEffect(()=>{if(f.current){const e=()=>{h(!1),u.isPointerDownOnContentRef.current=!1,setTimeout(()=>{""!==document.getSelection()?.toString()&&(u.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",e),()=>{document.removeEventListener("pointerup",e),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!1}}},[u.isPointerDownOnContentRef,u.hasSelectionRef]),r.useEffect(()=>{if(f.current){(function(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t})(f.current).forEach(e=>e.setAttribute("tabindex","-1"))}}),e(In,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:l,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:te(s,e=>{e.preventDefault()}),onDismiss:u.onDismiss,children:e(ST,{...d,...c,onPointerDown:te(c.onPointerDown,e=>{e.currentTarget.contains(e.target)&&h(!0),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!0}),ref:p,style:{...c.style,userSelect:m?"text":void 0,WebkitUserSelect:m?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),Xz=r.forwardRef((t,n)=>{const{__scopeHoverCard:r,...o}=t,a=zz(r);return e(CT,{...a,...o,ref:n})});function Zz(e){return t=>"touch"===t.pointerType?void 0:e()}Xz.displayName="HoverCardArrow";var Qz=Bz,Jz=Wz,eL=Yz,tL=qz;function nL({...t}){return e(Qz,{"data-slot":"hover-card",...t})}function rL({...t}){return e(Jz,{"data-slot":"hover-card-trigger",...t})}function oL({className:t,align:n="center",sideOffset:r=4,...o}){return e(eL,{"data-slot":"hover-card-portal",children:e(tL,{"data-slot":"hover-card-content",align:n,sideOffset:r,className:vn("bg-popover text-popover-foreground 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 origin-(--radix-hover-card-content-transform-origin) outline-hidden z-50 w-64 rounded-md border p-4 shadow-md",t),...o})})}function aL({className:t,type:n,...r}){return e("input",{type:n,"data-slot":"input",className:vn("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input shadow-xs h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base outline-none transition-[color,box-shadow] file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",t),...r})}function iL({className:t,...n}){return e("textarea",{"data-slot":"textarea",className:vn("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 field-sizing-content shadow-xs flex min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base outline-none transition-[color,box-shadow] focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),...n})}function sL({className:t,...n}){return e("div",{"data-slot":"input-group",role:"group",className:vn("group/input-group border-input dark:bg-input/30 shadow-xs relative flex w-full items-center rounded-md border outline-none transition-[color,box-shadow]","h-9 min-w-0 has-[>textarea]:h-auto","has-[>[data-align=inline-start]]:[&>input]:pl-2","has-[>[data-align=inline-end]]:[&>input]:pr-2","has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3","has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3","has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]","has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40",t),...n})}const lL=Sn("text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none [&>svg:not([class*='size-'])]:size-4 [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[disabled=true]/input-group:opacity-50",{variants:{align:{"inline-start":"order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]","inline-end":"order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]","block-start":"order-first w-full justify-start px-3 pt-3 [.border-b]:pb-3 group-has-[>input]/input-group:pt-2.5","block-end":"order-last w-full justify-start px-3 pb-3 [.border-t]:pt-3 group-has-[>input]/input-group:pb-2.5"}},defaultVariants:{align:"inline-start"}});function cL({className:t,align:n="inline-start",...r}){return e("div",{role:"group","data-slot":"input-group-addon","data-align":n,className:vn(lL({align:n}),t),onClick:e=>{e.target.closest("button")||e.currentTarget.parentElement?.querySelector("input")?.focus()},...r})}const uL=Sn("text-sm shadow-none flex gap-2 items-center",{variants:{size:{xs:"h-6 gap-1 px-2 rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-3.5 has-[>svg]:px-2",sm:"h-8 px-2.5 gap-1.5 rounded-md has-[>svg]:px-2.5","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});function dL({className:t,type:n="button",variant:r="ghost",size:o="xs",...a}){return e(da,{type:n,"data-size":o,variant:r,className:vn(uL({size:o}),t),...a})}function fL({className:t,...n}){return e("span",{className:vn("text-muted-foreground flex items-center gap-2 text-sm [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none",t),...n})}function pL({className:t,...n}){return e(aL,{"data-slot":"input-group-control",className:vn("flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent",t),...n})}function mL({className:t,...n}){return e(iL,{"data-slot":"input-group-control",className:vn("flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent",t),...n})}var hL=Object.defineProperty,gL=Object.defineProperties,vL=Object.getOwnPropertyDescriptors,yL=Object.getOwnPropertySymbols,bL=Object.prototype.hasOwnProperty,wL=Object.prototype.propertyIsEnumerable,xL=(e,t,n)=>t in e?hL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var kL=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");var NL=r.createContext({}),SL=r.forwardRef((e,t)=>{var n,o,a,i,s,l=e,{value:c,onChange:u,maxLength:d,textAlign:f="left",pattern:p,placeholder:m,inputMode:h="numeric",onComplete:g,pushPasswordManagerStrategy:v="increase-width",pasteTransformer:y,containerClassName:b,noScriptCSSFallback:w=_L,render:x,children:k}=l,N=((e,t)=>{var n={};for(var r in e)bL.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&yL)for(var r of yL(e))t.indexOf(r)<0&&wL.call(e,r)&&(n[r]=e[r]);return n})(l,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]);let[S,C]=r.useState("string"==typeof N.defaultValue?N.defaultValue:""),_=null!=c?c:S,M=function(e){let t=r.useRef();return r.useEffect(()=>{t.current=e}),t.current}(_),E=r.useCallback(e=>{null==u||u(e),C(e)},[u]),O=r.useMemo(()=>p?"string"==typeof p?new RegExp(p):p:null,[p]),D=r.useRef(null),P=r.useRef(null),T=r.useRef({value:_,onChange:E,isIOS:"undefined"!=typeof window&&(null==(o=null==(n=null==window?void 0:window.CSS)?void 0:n.supports)?void 0:o.call(n,"-webkit-touch-callout","none"))}),A=r.useRef({prev:[null==(a=D.current)?void 0:a.selectionStart,null==(i=D.current)?void 0:i.selectionEnd,null==(s=D.current)?void 0:s.selectionDirection]});r.useImperativeHandle(t,()=>D.current,[]),r.useEffect(()=>{let e=D.current,t=P.current;if(!e||!t)return;function n(){if(document.activeElement!==e)return F(null),void $(null);let t,n=e.selectionStart,r=e.selectionEnd,o=e.selectionDirection,a=e.maxLength,i=e.value,s=A.current.prev,l=-1,c=-1;if(0!==i.length&&null!==n&&null!==r){let e=n===r,o=n===i.length&&i.length<a;if(e&&!o){let e=n;if(0===e)l=0,c=1,t="forward";else if(e===a)l=e-1,c=e,t="backward";else if(a>1&&i.length>1){let n=0;if(null!==s[0]&&null!==s[1]){t=e<s[1]?"backward":"forward";let r=s[0]===s[1]&&s[0]<a;"backward"===t&&!r&&(n=-1)}l=n+e,c=n+e+1}}-1!==l&&-1!==c&&l!==c&&D.current.setSelectionRange(l,c,t)}let u=-1!==l?l:n,d=-1!==c?c:r,f=null!=t?t:o;F(u),$(d),A.current.prev=[u,d,f]}if(T.current.value!==e.value&&T.current.onChange(e.value),A.current.prev=[e.selectionStart,e.selectionEnd,e.selectionDirection],document.addEventListener("selectionchange",n,{capture:!0}),n(),document.activeElement===e&&z(!0),!document.getElementById("input-otp-style")){let e=document.createElement("style");if(e.id="input-otp-style",document.head.appendChild(e),e.sheet){let t="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";CL(e.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),CL(e.sheet,`[data-input-otp]:autofill { ${t} }`),CL(e.sheet,`[data-input-otp]:-webkit-autofill { ${t} }`),CL(e.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),CL(e.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let r=()=>{t&&t.style.setProperty("--root-height",`${e.clientHeight}px`)};r();let o=new ResizeObserver(r);return o.observe(e),()=>{document.removeEventListener("selectionchange",n,{capture:!0}),o.disconnect()}},[]);let[R,I]=r.useState(!1),[j,z]=r.useState(!1),[L,F]=r.useState(null),[B,$]=r.useState(null);r.useEffect(()=>{!function(e){setTimeout(e,0),setTimeout(e,10),setTimeout(e,50)}(()=>{var e,t,n,r;null==(e=D.current)||e.dispatchEvent(new Event("input"));let o=null==(t=D.current)?void 0:t.selectionStart,a=null==(n=D.current)?void 0:n.selectionEnd,i=null==(r=D.current)?void 0:r.selectionDirection;null!==o&&null!==a&&(F(o),$(a),A.current.prev=[o,a,i])})},[_,j]),r.useEffect(()=>{void 0!==M&&_!==M&&M.length<d&&_.length===d&&(null==g||g(_))},[d,g,M,_]);let W=function({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:o}){let[a,i]=r.useState(!1),[s,l]=r.useState(!1),[c,u]=r.useState(!1),d=r.useMemo(()=>"none"!==n&&("increase-width"===n||"experimental-no-flickering"===n)&&a&&s,[a,s,n]),f=r.useCallback(()=>{let r=e.current,o=t.current;if(!r||!o||c||"none"===n)return;let a=r,s=a.getBoundingClientRect().left+a.offsetWidth-18,l=a.getBoundingClientRect().top+a.offsetHeight/2;0===document.querySelectorAll(kL).length&&document.elementFromPoint(s,l)===r||(i(!0),u(!0))},[e,t,c,n]);return r.useEffect(()=>{let t=e.current;if(!t||"none"===n)return;function r(){let e=window.innerWidth-t.getBoundingClientRect().right;l(e>=40)}r();let o=setInterval(r,1e3);return()=>{clearInterval(o)}},[e,n]),r.useEffect(()=>{let e=o||document.activeElement===t.current;if("none"===n||!e)return;let r=setTimeout(f,0),a=setTimeout(f,2e3),i=setTimeout(f,5e3),s=setTimeout(()=>{u(!0)},6e3);return()=>{clearTimeout(r),clearTimeout(a),clearTimeout(i),clearTimeout(s)}},[t,o,n,f]),{hasPWMBadge:a,willPushPWMBadge:d,PWM_BADGE_SPACE_WIDTH:"40px"}}({containerRef:P,inputRef:D,pushPasswordManagerStrategy:v,isFocused:j}),H=r.useCallback(e=>{let t=e.currentTarget.value.slice(0,d);t.length>0&&O&&!O.test(t)?e.preventDefault():("string"==typeof M&&t.length<M.length&&document.dispatchEvent(new Event("selectionchange")),E(t))},[d,E,M,O]),U=r.useCallback(()=>{var e;if(D.current){let t=Math.min(D.current.value.length,d-1),n=D.current.value.length;null==(e=D.current)||e.setSelectionRange(t,n),F(t),$(n)}z(!0)},[d]),V=r.useCallback(e=>{var t,n;let r=D.current;if(!(y||T.current.isIOS&&e.clipboardData&&r))return;let o=e.clipboardData.getData("text/plain"),a=y?y(o):o;e.preventDefault();let i=null==(t=D.current)?void 0:t.selectionStart,s=null==(n=D.current)?void 0:n.selectionEnd,l=(i!==s?_.slice(0,i)+a+_.slice(s):_.slice(0,i)+a+_.slice(i)).slice(0,d);if(l.length>0&&O&&!O.test(l))return;r.value=l,E(l);let c=Math.min(l.length,d-1),u=l.length;r.setSelectionRange(c,u),F(c),$(u)},[d,E,O,_]),Y=r.useMemo(()=>({position:"relative",cursor:N.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[N.disabled]),K=r.useMemo(()=>({position:"absolute",inset:0,width:W.willPushPWMBadge?`calc(100% + ${W.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:W.willPushPWMBadge?`inset(0 ${W.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:f,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[W.PWM_BADGE_SPACE_WIDTH,W.willPushPWMBadge,f]),q=r.useMemo(()=>r.createElement("input",((e,t)=>gL(e,vL(t)))(((e,t)=>{for(var n in t||(t={}))bL.call(t,n)&&xL(e,n,t[n]);if(yL)for(var n of yL(t))wL.call(t,n)&&xL(e,n,t[n]);return e})({autoComplete:N.autoComplete||"one-time-code"},N),{"data-input-otp":!0,"data-input-otp-placeholder-shown":0===_.length||void 0,"data-input-otp-mss":L,"data-input-otp-mse":B,inputMode:h,pattern:null==O?void 0:O.source,"aria-placeholder":m,style:K,maxLength:d,value:_,ref:D,onPaste:e=>{var t;V(e),null==(t=N.onPaste)||t.call(N,e)},onChange:H,onMouseOver:e=>{var t;I(!0),null==(t=N.onMouseOver)||t.call(N,e)},onMouseLeave:e=>{var t;I(!1),null==(t=N.onMouseLeave)||t.call(N,e)},onFocus:e=>{var t;U(),null==(t=N.onFocus)||t.call(N,e)},onBlur:e=>{var t;z(!1),null==(t=N.onBlur)||t.call(N,e)}})),[H,U,V,h,K,d,B,L,N,null==O?void 0:O.source,_]),G=r.useMemo(()=>({slots:Array.from({length:d}).map((e,t)=>{var n;let r=j&&null!==L&&null!==B&&(L===B&&t===L||t>=L&&t<B),o=void 0!==_[t]?_[t]:null;return{char:o,placeholderChar:void 0!==_[0]?null:null!=(n=null==m?void 0:m[t])?n:null,isActive:r,hasFakeCaret:r&&null===o}}),isFocused:j,isHovering:!N.disabled&&R}),[j,R,d,B,L,N.disabled,_]),X=r.useMemo(()=>x?x(G):r.createElement(NL.Provider,{value:G},k),[k,G,x]);return r.createElement(r.Fragment,null,null!==w&&r.createElement("noscript",null,r.createElement("style",null,w)),r.createElement("div",{ref:P,"data-input-otp-container":!0,style:Y,className:b},X,r.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},q)))});function CL(e,t){try{e.insertRule(t)}catch(e){console.error("input-otp could not insert CSS rule:",t)}}SL.displayName="Input";var _L="\n[data-input-otp] {\n --nojs-bg: white !important;\n --nojs-fg: black !important;\n\n background-color: var(--nojs-bg) !important;\n color: var(--nojs-fg) !important;\n caret-color: var(--nojs-fg) !important;\n letter-spacing: .25em !important;\n text-align: center !important;\n border: 1px solid var(--nojs-fg) !important;\n border-radius: 4px !important;\n width: 100% !important;\n}\n@media (prefers-color-scheme: dark) {\n [data-input-otp] {\n --nojs-bg: black !important;\n --nojs-fg: white !important;\n }\n}";function ML({className:t,containerClassName:n,...r}){return e(SL,{"data-slot":"input-otp",containerClassName:vn("flex items-center gap-2 has-disabled:opacity-50",n),className:vn("disabled:cursor-not-allowed",t),...r})}function EL({className:t,...n}){return e("div",{"data-slot":"input-otp-group",className:vn("flex items-center",t),...n})}function OL({index:t,className:o,...a}){const i=r.useContext(NL),{char:s,hasFakeCaret:l,isActive:c}=i?.slots[t]??{};return n("div",{"data-slot":"input-otp-slot","data-active":c,className:vn("data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input shadow-xs relative flex h-9 w-9 items-center justify-center border-y border-r text-sm outline-none transition-all first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]",o),...a,children:[s,l&&e("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:e("div",{className:"animate-caret-blink bg-foreground h-4 w-px duration-1000"})})]})}function DL({...t}){return e("div",{"data-slot":"input-otp-separator",role:"separator",...t,children:e(A,{})})}function PL({className:t,...n}){return e("div",{role:"list","data-slot":"item-group",className:vn("group/item-group flex flex-col",t),...n})}function TL({className:t,...n}){return e(di,{"data-slot":"item-separator",orientation:"horizontal",className:vn("my-0",t),...n})}const AL=Sn("group/item flex items-center border border-transparent text-sm rounded-md transition-colors [a]:hover:bg-accent/50 [a]:transition-colors duration-100 flex-wrap outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",{variants:{variant:{default:"bg-transparent",outline:"border-border",muted:"bg-muted/50"},size:{default:"p-4 gap-4 ",sm:"py-3 px-4 gap-2.5"}},defaultVariants:{variant:"default",size:"default"}});function RL({className:t,variant:n="default",size:r="default",asChild:o=!1,...a}){return e(o?G:"div",{"data-slot":"item","data-variant":n,"data-size":r,className:vn(AL({variant:n,size:r,className:t})),...a})}const IL=Sn("flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none group-has-[[data-slot=item-description]]/item:translate-y-0.5",{variants:{variant:{default:"bg-transparent",icon:"size-8 border rounded-sm bg-muted [&_svg:not([class*='size-'])]:size-4",image:"size-10 rounded-sm overflow-hidden [&_img]:size-full [&_img]:object-cover"}},defaultVariants:{variant:"default"}});function jL({className:t,variant:n="default",...r}){return e("div",{"data-slot":"item-media","data-variant":n,className:vn(IL({variant:n,className:t})),...r})}function zL({className:t,...n}){return e("div",{"data-slot":"item-content",className:vn("flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none",t),...n})}function LL({className:t,...n}){return e("div",{"data-slot":"item-title",className:vn("flex w-fit items-center gap-2 text-sm font-medium leading-snug",t),...n})}function FL({className:t,...n}){return e("p",{"data-slot":"item-description",className:vn("text-muted-foreground line-clamp-2 text-balance text-sm font-normal leading-normal","[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",t),...n})}function BL({className:t,...n}){return e("div",{"data-slot":"item-actions",className:vn("flex items-center gap-2",t),...n})}function $L({className:t,...n}){return e("div",{"data-slot":"item-header",className:vn("flex basis-full items-center justify-between gap-2",t),...n})}function WL({className:t,...n}){return e("div",{"data-slot":"item-footer",className:vn("flex basis-full items-center justify-between gap-2",t),...n})}function HL({className:t,...n}){return e("kbd",{"data-slot":"kbd",className:vn("bg-muted text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 select-none items-center justify-center gap-1 rounded-sm px-1 font-sans text-xs font-medium","[&_svg:not([class*='size-'])]:size-3","[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10",t),...n})}function UL({className:t,...n}){return e("kbd",{"data-slot":"kbd-group",className:vn("inline-flex items-center gap-1",t),...n})}var VL="Menubar",[YL,KL,qL]=ee(VL),[GL]=H(VL,[qL,AT]),XL=eA(),ZL=AT(),[QL,JL]=GL(VL),eF=r.forwardRef((t,n)=>{const{__scopeMenubar:o,value:a,onValueChange:i,defaultValue:s,loop:l=!0,dir:c,...u}=t,d=Ee(c),f=ZL(o),[p,m]=oe({prop:a,onChange:i,defaultProp:s??"",caller:VL}),[h,g]=r.useState(null);return e(QL,{scope:o,value:p,onMenuOpen:r.useCallback(e=>{m(e),g(e)},[m]),onMenuClose:r.useCallback(()=>m(""),[m]),onMenuToggle:r.useCallback(e=>{m(t=>t?"":e),g(e)},[m]),dir:d,loop:l,children:e(YL.Provider,{scope:o,children:e(YL.Slot,{scope:o,children:e(WT,{asChild:!0,...f,orientation:"horizontal",loop:l,dir:d,currentTabStopId:h,onCurrentTabStopIdChange:g,children:e(ae.div,{role:"menubar",...u,ref:n})})})})})});eF.displayName=VL;var tF="MenubarMenu",[nF,rF]=GL(tF),oF=t=>{const{__scopeMenubar:n,value:o,...a}=t,i=de(),s=o||i||"LEGACY_REACT_AUTO_VALUE",l=JL(tF,n),c=XL(n),u=r.useRef(null),d=r.useRef(!1),f=l.value===s;return r.useEffect(()=>{f||(d.current=!1)},[f]),e(nF,{scope:n,value:s,triggerId:de(),triggerRef:u,contentId:de(),wasKeyboardTriggerOpenRef:d,children:e(QA,{...c,open:f,onOpenChange:e=>{e||l.onMenuClose()},modal:!1,dir:l.dir,...a})})};oF.displayName=tF;var aF="MenubarTrigger",iF=r.forwardRef((t,n)=>{const{__scopeMenubar:o,disabled:a=!1,...i}=t,s=ZL(o),l=XL(o),c=JL(aF,o),u=rF(aF,o),d=r.useRef(null),f=K(n,d,u.triggerRef),[p,m]=r.useState(!1),h=c.value===u.value;return e(YL.ItemSlot,{scope:o,value:u.value,disabled:a,children:e(HT,{asChild:!0,...s,focusable:!a,tabStopId:u.value,children:e(JA,{asChild:!0,...l,children:e(ae.button,{type:"button",role:"menuitem",id:u.triggerId,"aria-haspopup":"menu","aria-expanded":h,"aria-controls":h?u.contentId:void 0,"data-highlighted":p?"":void 0,"data-state":h?"open":"closed","data-disabled":a?"":void 0,disabled:a,...i,ref:f,onPointerDown:te(t.onPointerDown,e=>{a||0!==e.button||!1!==e.ctrlKey||(c.onMenuOpen(u.value),h||e.preventDefault())}),onPointerEnter:te(t.onPointerEnter,()=>{Boolean(c.value)&&!h&&(c.onMenuOpen(u.value),d.current?.focus())}),onKeyDown:te(t.onKeyDown,e=>{a||(["Enter"," "].includes(e.key)&&c.onMenuToggle(u.value),"ArrowDown"===e.key&&c.onMenuOpen(u.value),["Enter"," ","ArrowDown"].includes(e.key)&&(u.wasKeyboardTriggerOpenRef.current=!0,e.preventDefault()))}),onFocus:te(t.onFocus,()=>m(!0)),onBlur:te(t.onBlur,()=>m(!1))})})})})});iF.displayName=aF;var sF=t=>{const{__scopeMenubar:n,...r}=t,o=XL(n);return e(eR,{...o,...r})};sF.displayName="MenubarPortal";var lF="MenubarContent",cF=r.forwardRef((t,n)=>{const{__scopeMenubar:o,align:a="start",...i}=t,s=XL(o),l=JL(lF,o),c=rF(lF,o),u=KL(o),d=r.useRef(!1);return e(tR,{id:c.contentId,"aria-labelledby":c.triggerId,"data-radix-menubar-content":"",...s,...i,ref:n,align:a,onCloseAutoFocus:te(t.onCloseAutoFocus,e=>{Boolean(l.value)||d.current||c.triggerRef.current?.focus(),d.current=!1,e.preventDefault()}),onFocusOutside:te(t.onFocusOutside,e=>{const t=e.target;u().some(e=>e.ref.current?.contains(t))&&e.preventDefault()}),onInteractOutside:te(t.onInteractOutside,()=>{d.current=!0}),onEntryFocus:e=>{c.wasKeyboardTriggerOpenRef.current||e.preventDefault()},onKeyDown:te(t.onKeyDown,e=>{if(["ArrowRight","ArrowLeft"].includes(e.key)){const t=e.target,n=t.hasAttribute("data-radix-menubar-subtrigger"),r=t.closest("[data-radix-menubar-content]")!==e.currentTarget,o=("rtl"===l.dir?"ArrowRight":"ArrowLeft")===e.key;if(!o&&n)return;if(r&&o)return;let a=u().filter(e=>!e.disabled).map(e=>e.value);o&&a.reverse();const i=a.indexOf(c.value);a=l.loop?function(e,t){return e.map((n,r)=>e[(t+r)%e.length])}(a,i+1):a.slice(i+1);const[s]=a;s&&l.onMenuOpen(s)}},{checkForDefaultPrevented:!1}),style:{...t.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}})});cF.displayName=lF;var uF=r.forwardRef((t,n)=>{const{__scopeMenubar:r,...o}=t,a=XL(r);return e(nR,{...a,...o,ref:n})});uF.displayName="MenubarGroup";var dF=r.forwardRef((t,n)=>{const{__scopeMenubar:r,...o}=t,a=XL(r);return e(rR,{...a,...o,ref:n})});dF.displayName="MenubarLabel";var fF=r.forwardRef((t,n)=>{const{__scopeMenubar:r,...o}=t,a=XL(r);return e(oR,{...a,...o,ref:n})});fF.displayName="MenubarItem";var pF=r.forwardRef((t,n)=>{const{__scopeMenubar:r,...o}=t,a=XL(r);return e(aR,{...a,...o,ref:n})});pF.displayName="MenubarCheckboxItem";var mF=r.forwardRef((t,n)=>{const{__scopeMenubar:r,...o}=t,a=XL(r);return e(iR,{...a,...o,ref:n})});mF.displayName="MenubarRadioGroup";var hF=r.forwardRef((t,n)=>{const{__scopeMenubar:r,...o}=t,a=XL(r);return e(sR,{...a,...o,ref:n})});hF.displayName="MenubarRadioItem";var gF=r.forwardRef((t,n)=>{const{__scopeMenubar:r,...o}=t,a=XL(r);return e(lR,{...a,...o,ref:n})});gF.displayName="MenubarItemIndicator";var vF=r.forwardRef((t,n)=>{const{__scopeMenubar:r,...o}=t,a=XL(r);return e(cR,{...a,...o,ref:n})});vF.displayName="MenubarSeparator";var yF=r.forwardRef((t,n)=>{const{__scopeMenubar:r,...o}=t,a=XL(r);return e(uR,{...a,...o,ref:n})});yF.displayName="MenubarArrow";var bF="MenubarSub",wF=t=>{const{__scopeMenubar:n,children:r,open:o,onOpenChange:a,defaultOpen:i}=t,s=XL(n),[l,c]=oe({prop:o,defaultProp:i??!1,onChange:a,caller:bF});return e(dR,{...s,open:l,onOpenChange:c,children:r})};wF.displayName=bF;var xF=r.forwardRef((t,n)=>{const{__scopeMenubar:r,...o}=t,a=XL(r);return e(fR,{"data-radix-menubar-subtrigger":"",...a,...o,ref:n})});xF.displayName="MenubarSubTrigger";var kF=r.forwardRef((t,n)=>{const{__scopeMenubar:r,...o}=t,a=XL(r);return e(pR,{...a,"data-radix-menubar-content":"",...o,ref:n,style:{...t.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}})});kF.displayName="MenubarSubContent";var NF=eF,SF=oF,CF=iF,_F=sF,MF=cF,EF=uF,OF=dF,DF=fF,PF=pF,TF=mF,AF=hF,RF=gF,IF=vF,jF=wF,zF=xF,LF=kF;function FF({className:t,...n}){return e(NF,{"data-slot":"menubar",className:vn("bg-background shadow-xs flex h-9 items-center gap-1 rounded-md border p-1",t),...n})}function BF({...t}){return e(SF,{"data-slot":"menubar-menu",...t})}function $F({...t}){return e(EF,{"data-slot":"menubar-group",...t})}function WF({...t}){return e(_F,{"data-slot":"menubar-portal",...t})}function HF({...t}){return e(TF,{"data-slot":"menubar-radio-group",...t})}function UF({className:t,...n}){return e(CF,{"data-slot":"menubar-trigger",className:vn("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground outline-hidden flex select-none items-center rounded-sm px-2 py-1 text-sm font-medium",t),...n})}function VF({className:t,align:n="start",alignOffset:r=-4,sideOffset:o=8,...a}){return e(WF,{children:e(MF,{"data-slot":"menubar-content",align:n,alignOffset:r,sideOffset:o,className:vn("bg-popover text-popover-foreground data-[state=open]:animate-in 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 origin-(--radix-menubar-content-transform-origin) z-50 min-w-[12rem] overflow-hidden rounded-md border p-1 shadow-md",t),...a})})}function YF({className:t,inset:n,variant:r="default",...o}){return e(DF,{"data-slot":"menubar-item","data-inset":n,"data-variant":r,className:vn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground outline-hidden relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm data-[disabled]:pointer-events-none data-[inset]:pl-8 data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",t),...o})}function KF({className:t,children:r,checked:o,...a}){return n(PF,{"data-slot":"menubar-checkbox-item",className:vn("focus:bg-accent focus:text-accent-foreground rounded-xs outline-hidden relative flex cursor-default select-none items-center gap-2 py-1.5 pl-8 pr-2 text-sm data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",t),checked:o,...a,children:[e("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:e(RF,{children:e(O,{className:"size-4"})})}),r]})}function qF({className:t,children:r,...o}){return n(AF,{"data-slot":"menubar-radio-item",className:vn("focus:bg-accent focus:text-accent-foreground rounded-xs outline-hidden relative flex cursor-default select-none items-center gap-2 py-1.5 pl-8 pr-2 text-sm data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",t),...o,children:[e("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:e(RF,{children:e(T,{className:"size-2 fill-current"})})}),r]})}function GF({className:t,inset:n,...r}){return e(OF,{"data-slot":"menubar-label","data-inset":n,className:vn("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),...r})}function XF({className:t,...n}){return e(IF,{"data-slot":"menubar-separator",className:vn("bg-border -mx-1 my-1 h-px",t),...n})}function ZF({className:t,...n}){return e("span",{"data-slot":"menubar-shortcut",className:vn("text-muted-foreground ml-auto text-xs tracking-widest",t),...n})}function QF({...t}){return e(jF,{"data-slot":"menubar-sub",...t})}function JF({className:t,inset:r,children:o,...a}){return n(zF,{"data-slot":"menubar-sub-trigger","data-inset":r,className:vn("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[inset]:pl-8",t),...a,children:[o,e(_,{className:"ml-auto h-4 w-4"})]})}function eB({className:t,...n}){return e(LF,{"data-slot":"menubar-sub-content",className:vn("bg-popover text-popover-foreground 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 origin-(--radix-menubar-content-transform-origin) z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-lg",t),...n})}var tB=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"}),nB=r.forwardRef((t,n)=>e(ae.span,{...t,ref:n,style:{...tB,...t.style}}));nB.displayName="VisuallyHidden";var rB=nB,oB="NavigationMenu",[aB,iB,sB]=ee(oB),[lB,cB,uB]=ee(oB),[dB]=H(oB,[sB,uB]),[fB,pB]=dB(oB),[mB,hB]=dB(oB),gB=r.forwardRef((t,n)=>{const{__scopeNavigationMenu:o,value:a,onValueChange:i,defaultValue:s,delayDuration:l=200,skipDelayDuration:c=300,orientation:u="horizontal",dir:d,...f}=t,[p,m]=r.useState(null),h=K(n,e=>m(e)),g=Ee(d),v=r.useRef(0),y=r.useRef(0),b=r.useRef(0),[w,x]=r.useState(!0),[k,N]=oe({prop:a,onChange:e=>{const t=c>0;""!==e?(window.clearTimeout(b.current),t&&x(!1)):(window.clearTimeout(b.current),b.current=window.setTimeout(()=>x(!0),c)),i?.(e)},defaultProp:s??"",caller:oB}),S=r.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>N(""),150)},[N]),C=r.useCallback(e=>{window.clearTimeout(y.current),N(e)},[N]),_=r.useCallback(e=>{k===e?window.clearTimeout(y.current):v.current=window.setTimeout(()=>{window.clearTimeout(y.current),N(e)},l)},[k,N,l]);return r.useEffect(()=>()=>{window.clearTimeout(v.current),window.clearTimeout(y.current),window.clearTimeout(b.current)},[]),e(bB,{scope:o,isRootMenu:!0,value:k,dir:g,orientation:u,rootNavigationMenu:p,onTriggerEnter:e=>{window.clearTimeout(v.current),w?_(e):C(e)},onTriggerLeave:()=>{window.clearTimeout(v.current),S()},onContentEnter:()=>window.clearTimeout(y.current),onContentLeave:S,onItemSelect:e=>{N(t=>t===e?"":e)},onItemDismiss:()=>N(""),children:e(ae.nav,{"aria-label":"Main","data-orientation":u,dir:g,...f,ref:h})})});gB.displayName=oB;var vB="NavigationMenuSub",yB=r.forwardRef((t,n)=>{const{__scopeNavigationMenu:r,value:o,onValueChange:a,defaultValue:i,orientation:s="horizontal",...l}=t,c=pB(vB,r),[u,d]=oe({prop:o,onChange:a,defaultProp:i??"",caller:vB});return e(bB,{scope:r,isRootMenu:!1,value:u,dir:c.dir,orientation:s,rootNavigationMenu:c.rootNavigationMenu,onTriggerEnter:e=>d(e),onItemSelect:e=>d(e),onItemDismiss:()=>d(""),children:e(ae.div,{"data-orientation":s,...l,ref:n})})});yB.displayName=vB;var bB=t=>{const{scope:n,isRootMenu:o,rootNavigationMenu:a,dir:i,orientation:s,children:l,value:c,onItemSelect:u,onItemDismiss:d,onTriggerEnter:f,onTriggerLeave:p,onContentEnter:m,onContentLeave:h}=t,[g,v]=r.useState(null),[y,b]=r.useState(new Map),[w,x]=r.useState(null);return e(fB,{scope:n,isRootMenu:o,rootNavigationMenu:a,value:c,previousValue:$E(c),baseId:de(),dir:i,orientation:s,viewport:g,onViewportChange:v,indicatorTrack:w,onIndicatorTrackChange:x,onTriggerEnter:On(f),onTriggerLeave:On(p),onContentEnter:On(m),onContentLeave:On(h),onItemSelect:On(u),onItemDismiss:On(d),onViewportContentChange:r.useCallback((e,t)=>{b(n=>(n.set(e,t),new Map(n)))},[]),onViewportContentRemove:r.useCallback(e=>{b(t=>t.has(e)?(t.delete(e),new Map(t)):t)},[]),children:e(aB.Provider,{scope:n,children:e(mB,{scope:n,items:y,children:l})})})},wB="NavigationMenuList",xB=r.forwardRef((t,n)=>{const{__scopeNavigationMenu:r,...o}=t,a=pB(wB,r),i=e(ae.ul,{"data-orientation":a.orientation,...o,ref:n});return e(ae.div,{style:{position:"relative"},ref:a.onIndicatorTrackChange,children:e(aB.Slot,{scope:r,children:a.isRootMenu?e($B,{asChild:!0,children:i}):i})})});xB.displayName=wB;var kB="NavigationMenuItem",[NB,SB]=dB(kB),CB=r.forwardRef((t,n)=>{const{__scopeNavigationMenu:o,value:a,...i}=t,s=de(),l=a||s||"LEGACY_REACT_AUTO_VALUE",c=r.useRef(null),u=r.useRef(null),d=r.useRef(null),f=r.useRef(()=>{}),p=r.useRef(!1),m=r.useCallback((e="start")=>{if(c.current){f.current();const t=UB(c.current);t.length&&VB("start"===e?t:t.reverse())}},[]),h=r.useCallback(()=>{if(c.current){const e=UB(c.current);e.length&&(f.current=function(e){return e.forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}),()=>{e.forEach(e=>{const t=e.dataset.tabindex;e.setAttribute("tabindex",t)})}}(e))}},[]);return e(NB,{scope:o,value:l,triggerRef:u,contentRef:c,focusProxyRef:d,wasEscapeCloseRef:p,onEntryKeyDown:m,onFocusProxyEnter:m,onRootContentClose:h,onContentFocusOutside:h,children:e(ae.li,{...i,ref:n})})});CB.displayName=kB;var _B="NavigationMenuTrigger",MB=r.forwardRef((o,a)=>{const{__scopeNavigationMenu:i,disabled:s,...l}=o,c=pB(_B,o.__scopeNavigationMenu),u=SB(_B,o.__scopeNavigationMenu),d=r.useRef(null),f=K(d,u.triggerRef,a),p=qB(c.baseId,u.value),m=GB(c.baseId,u.value),h=r.useRef(!1),g=r.useRef(!1),v=u.value===c.value;return n(t,{children:[e(aB.ItemSlot,{scope:i,value:u.value,children:e(HB,{asChild:!0,children:e(ae.button,{id:p,disabled:s,"data-disabled":s?"":void 0,"data-state":KB(v),"aria-expanded":v,"aria-controls":m,...l,ref:f,onPointerEnter:te(o.onPointerEnter,()=>{g.current=!1,u.wasEscapeCloseRef.current=!1}),onPointerMove:te(o.onPointerMove,XB(()=>{s||g.current||u.wasEscapeCloseRef.current||h.current||(c.onTriggerEnter(u.value),h.current=!0)})),onPointerLeave:te(o.onPointerLeave,XB(()=>{s||(c.onTriggerLeave(),h.current=!1)})),onClick:te(o.onClick,()=>{c.onItemSelect(u.value),g.current=v}),onKeyDown:te(o.onKeyDown,e=>{const t={horizontal:"ArrowDown",vertical:"rtl"===c.dir?"ArrowLeft":"ArrowRight"}[c.orientation];v&&e.key===t&&(u.onEntryKeyDown(),e.preventDefault())})})})}),v&&n(t,{children:[e(rB,{"aria-hidden":!0,tabIndex:0,ref:u.focusProxyRef,onFocus:e=>{const t=u.contentRef.current,n=e.relatedTarget,r=n===d.current,o=t?.contains(n);!r&&o||u.onFocusProxyEnter(r?"start":"end")}}),c.viewport&&e("span",{"aria-owns":m})]})]})});MB.displayName=_B;var EB="navigationMenu.linkSelect",OB=r.forwardRef((t,n)=>{const{__scopeNavigationMenu:r,active:o,onSelect:a,...i}=t;return e(HB,{asChild:!0,children:e(ae.a,{"data-active":o?"":void 0,"aria-current":o?"page":void 0,...i,ref:n,onClick:te(t.onClick,e=>{const t=e.target,n=new CustomEvent(EB,{bubbles:!0,cancelable:!0});if(t.addEventListener(EB,e=>a?.(e),{once:!0}),ie(t,n),!n.defaultPrevented&&!e.metaKey){ie(t,new CustomEvent(jB,{bubbles:!0,cancelable:!0}))}},{checkForDefaultPrevented:!1})})})});OB.displayName="NavigationMenuLink";var DB="NavigationMenuIndicator",PB=r.forwardRef((t,n)=>{const{forceMount:r,...o}=t,a=pB(DB,t.__scopeNavigationMenu),i=Boolean(a.value);return a.indicatorTrack?w.createPortal(e(se,{present:r||i,children:e(TB,{...o,ref:n})}),a.indicatorTrack):null});PB.displayName=DB;var TB=r.forwardRef((t,n)=>{const{__scopeNavigationMenu:o,...a}=t,i=pB(DB,o),s=iB(o),[l,c]=r.useState(null),[u,d]=r.useState(null),f="horizontal"===i.orientation,p=Boolean(i.value);r.useEffect(()=>{const e=s(),t=e.find(e=>e.value===i.value)?.ref.current;t&&c(t)},[s,i.value]);const m=()=>{l&&d({size:f?l.offsetWidth:l.offsetHeight,offset:f?l.offsetLeft:l.offsetTop})};return YB(l,m),YB(i.indicatorTrack,m),u?e(ae.div,{"aria-hidden":!0,"data-state":p?"visible":"hidden","data-orientation":i.orientation,...a,ref:n,style:{position:"absolute",...f?{left:0,width:u.size+"px",transform:`translateX(${u.offset}px)`}:{top:0,height:u.size+"px",transform:`translateY(${u.offset}px)`},...a.style}}):null}),AB="NavigationMenuContent",RB=r.forwardRef((t,n)=>{const{forceMount:r,...o}=t,a=pB(AB,t.__scopeNavigationMenu),i=SB(AB,t.__scopeNavigationMenu),s=K(i.contentRef,n),l=i.value===a.value,c={value:i.value,triggerRef:i.triggerRef,focusProxyRef:i.focusProxyRef,wasEscapeCloseRef:i.wasEscapeCloseRef,onContentFocusOutside:i.onContentFocusOutside,onRootContentClose:i.onRootContentClose,...o};return a.viewport?e(IB,{forceMount:r,...c,ref:s}):e(se,{present:r||l,children:e(zB,{"data-state":KB(l),...c,ref:s,onPointerEnter:te(t.onPointerEnter,a.onContentEnter),onPointerLeave:te(t.onPointerLeave,XB(a.onContentLeave)),style:{pointerEvents:!l&&a.isRootMenu?"none":void 0,...c.style}})})});RB.displayName=AB;var IB=r.forwardRef((e,t)=>{const n=pB(AB,e.__scopeNavigationMenu),{onViewportContentChange:r,onViewportContentRemove:o}=n;return ne(()=>{r(e.value,{ref:t,...e})},[e,t,r]),ne(()=>()=>o(e.value),[e.value,o]),null}),jB="navigationMenu.rootContentDismiss",zB=r.forwardRef((t,n)=>{const{__scopeNavigationMenu:o,value:a,triggerRef:i,focusProxyRef:s,wasEscapeCloseRef:l,onRootContentClose:c,onContentFocusOutside:u,...d}=t,f=pB(AB,o),p=r.useRef(null),m=K(p,n),h=qB(f.baseId,a),g=GB(f.baseId,a),v=iB(o),y=r.useRef(null),{onItemDismiss:b}=f;r.useEffect(()=>{const e=p.current;if(f.isRootMenu&&e){const t=()=>{b(),c(),e.contains(document.activeElement)&&i.current?.focus()};return e.addEventListener(jB,t),()=>e.removeEventListener(jB,t)}},[f.isRootMenu,t.value,i,b,c]);const w=r.useMemo(()=>{const e=v().map(e=>e.value);"rtl"===f.dir&&e.reverse();const t=e.indexOf(f.value),n=e.indexOf(f.previousValue),r=a===f.value,o=n===e.indexOf(a);if(!r&&!o)return y.current;const i=(()=>{if(t!==n){if(r&&-1!==n)return t>n?"from-end":"from-start";if(o&&-1!==t)return t>n?"to-start":"to-end"}return null})();return y.current=i,i},[f.previousValue,f.value,f.dir,v,a]);return e($B,{asChild:!0,children:e(In,{id:g,"aria-labelledby":h,"data-motion":w,"data-orientation":f.orientation,...d,ref:m,disableOutsidePointerEvents:!1,onDismiss:()=>{const e=new Event(jB,{bubbles:!0,cancelable:!0});p.current?.dispatchEvent(e)},onFocusOutside:te(t.onFocusOutside,e=>{u();const t=e.target;f.rootNavigationMenu?.contains(t)&&e.preventDefault()}),onPointerDownOutside:te(t.onPointerDownOutside,e=>{const t=e.target,n=v().some(e=>e.ref.current?.contains(t)),r=f.isRootMenu&&f.viewport?.contains(t);(n||r||!f.isRootMenu)&&e.preventDefault()}),onKeyDown:te(t.onKeyDown,e=>{const t=e.altKey||e.ctrlKey||e.metaKey;if("Tab"===e.key&&!t){const t=UB(e.currentTarget),n=document.activeElement,r=t.findIndex(e=>e===n);VB(e.shiftKey?t.slice(0,r).reverse():t.slice(r+1,t.length))?e.preventDefault():s.current?.focus()}}),onEscapeKeyDown:te(t.onEscapeKeyDown,e=>{l.current=!0})})})}),LB="NavigationMenuViewport",FB=r.forwardRef((t,n)=>{const{forceMount:r,...o}=t,a=pB(LB,t.__scopeNavigationMenu),i=Boolean(a.value);return e(se,{present:r||i,children:e(BB,{...o,ref:n})})});FB.displayName=LB;var BB=r.forwardRef((t,n)=>{const{__scopeNavigationMenu:o,children:a,...i}=t,s=pB(LB,o),l=K(n,s.onViewportChange),c=hB(AB,t.__scopeNavigationMenu),[u,d]=r.useState(null),[f,p]=r.useState(null),m=u?u?.width+"px":void 0,h=u?u?.height+"px":void 0,g=Boolean(s.value),v=g?s.value:s.previousValue;return YB(f,()=>{f&&d({width:f.offsetWidth,height:f.offsetHeight})}),e(ae.div,{"data-state":KB(g),"data-orientation":s.orientation,...i,ref:l,style:{pointerEvents:!g&&s.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":m,"--radix-navigation-menu-viewport-height":h,...i.style},onPointerEnter:te(t.onPointerEnter,s.onContentEnter),onPointerLeave:te(t.onPointerLeave,XB(s.onContentLeave)),children:Array.from(c.items).map(([t,{ref:n,forceMount:r,...o}])=>{const a=v===t;return e(se,{present:r||a,children:e(zB,{...o,ref:Y(n,e=>{a&&e&&p(e)})})},t)})})}),$B=r.forwardRef((t,n)=>{const{__scopeNavigationMenu:r,...o}=t,a=pB("FocusGroup",r);return e(lB.Provider,{scope:r,children:e(lB.Slot,{scope:r,children:e(ae.div,{dir:a.dir,...o,ref:n})})})}),WB=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],HB=r.forwardRef((t,n)=>{const{__scopeNavigationMenu:r,...o}=t,a=cB(r),i=pB("FocusGroupItem",r);return e(lB.ItemSlot,{scope:r,children:e(ae.button,{...o,ref:n,onKeyDown:te(t.onKeyDown,e=>{if(["Home","End",...WB].includes(e.key)){let t=a().map(e=>e.ref.current);if(["rtl"===i.dir?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(e.key)&&t.reverse(),WB.includes(e.key)){const n=t.indexOf(e.currentTarget);t=t.slice(n+1)}setTimeout(()=>VB(t)),e.preventDefault()}})})})});function UB(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function VB(e){const t=document.activeElement;return e.some(e=>e===t||(e.focus(),document.activeElement!==t))}function YB(e,t){const n=On(t);ne(()=>{let t=0;if(e){const r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}function KB(e){return e?"open":"closed"}function qB(e,t){return`${e}-trigger-${t}`}function GB(e,t){return`${e}-content-${t}`}function XB(e){return t=>"mouse"===t.pointerType?e(t):void 0}var ZB=gB,QB=xB,JB=CB,e$=MB,t$=OB,n$=PB,r$=RB,o$=FB;function a$({className:t,children:r,viewport:o=!0,...a}){return n(ZB,{"data-slot":"navigation-menu","data-viewport":o,className:vn("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",t),...a,children:[r,o&&e(d$,{})]})}function i$({className:t,...n}){return e(QB,{"data-slot":"navigation-menu-list",className:vn("group flex flex-1 list-none items-center justify-center gap-1",t),...n})}function s$({className:t,...n}){return e(JB,{"data-slot":"navigation-menu-item",className:vn("relative",t),...n})}const l$=Sn("group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=open]:hover:bg-accent data-[state=open]:text-accent-foreground data-[state=open]:focus:bg-accent data-[state=open]:bg-accent/50 focus-visible:ring-ring/50 outline-none transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1");function c$({className:t,children:r,...o}){return n(e$,{"data-slot":"navigation-menu-trigger",className:vn(l$(),"group",t),...o,children:[r," ",e(k,{className:"relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180","aria-hidden":"true"})]})}function u$({className:t,...n}){return e(r$,{"data-slot":"navigation-menu-content",className:vn("data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 left-0 top-0 w-full p-2 pr-2.5 md:absolute md:w-auto","group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:duration-200",t),...n})}function d$({className:t,...n}){return e("div",{className:vn("absolute left-0 top-full isolate z-50 flex justify-center"),children:e(o$,{"data-slot":"navigation-menu-viewport",className:vn("origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border shadow md:w-[var(--radix-navigation-menu-viewport-width)]",t),...n})})}function f$({className:t,...n}){return e(t$,{"data-slot":"navigation-menu-link",className:vn("data-[active=true]:focus:bg-accent data-[active=true]:hover:bg-accent data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-ring/50 [&_svg:not([class*='text-'])]:text-muted-foreground flex flex-col gap-1 rounded-sm p-2 text-sm outline-none transition-all focus-visible:outline-1 focus-visible:ring-[3px] [&_svg:not([class*='size-'])]:size-4",t),...n})}function p$({className:t,...n}){return e(n$,{"data-slot":"navigation-menu-indicator",className:vn("data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden",t),...n,children:e("div",{className:"bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md"})})}function m$({className:t,...n}){return e("nav",{role:"navigation","aria-label":"pagination","data-slot":"pagination",className:vn("mx-auto flex w-full justify-center",t),...n})}function h$({className:t,...n}){return e("ul",{"data-slot":"pagination-content",className:vn("flex flex-row items-center gap-1",t),...n})}function g$({...t}){return e("li",{"data-slot":"pagination-item",...t})}function v$({className:t,isActive:n,size:r="icon",...o}){return e("a",{"aria-current":n?"page":void 0,"data-slot":"pagination-link","data-active":n,className:vn(ua({variant:n?"outline":"ghost",size:r}),t),...o})}function y$({className:t,...r}){return n(v$,{"aria-label":"Go to previous page",size:"default",className:vn("gap-1 px-2.5 sm:pl-2.5",t),...r,children:[e(C,{}),e("span",{className:"hidden sm:block",children:"Previous"})]})}function b$({className:t,...r}){return n(v$,{"aria-label":"Go to next page",size:"default",className:vn("gap-1 px-2.5 sm:pr-2.5",t),...r,children:[e("span",{className:"hidden sm:block",children:"Next"}),e(_,{})]})}function w$({className:t,...r}){return n("span",{"aria-hidden":!0,"data-slot":"pagination-ellipsis",className:vn("flex size-9 items-center justify-center",t),...r,children:[e(R,{className:"size-4"}),e("span",{className:"sr-only",children:"More pages"})]})}var x$="Popover",[k$]=H(x$,[iT]),N$=iT(),[S$,C$]=k$(x$),_$=t=>{const{__scopePopover:n,children:o,open:a,defaultOpen:i,onOpenChange:s,modal:l=!1}=t,c=N$(n),u=r.useRef(null),[d,f]=r.useState(!1),[p,m]=oe({prop:a,defaultProp:i??!1,onChange:s,caller:x$});return e(kT,{...c,children:e(S$,{scope:n,contentId:de(),triggerRef:u,open:p,onOpenChange:m,onOpenToggle:r.useCallback(()=>m(e=>!e),[m]),hasCustomAnchor:d,onCustomAnchorAdd:r.useCallback(()=>f(!0),[]),onCustomAnchorRemove:r.useCallback(()=>f(!1),[]),modal:l,children:o})})};_$.displayName=x$;var M$="PopoverAnchor",E$=r.forwardRef((t,n)=>{const{__scopePopover:o,...a}=t,i=C$(M$,o),s=N$(o),{onCustomAnchorAdd:l,onCustomAnchorRemove:c}=i;return r.useEffect(()=>(l(),()=>c()),[l,c]),e(NT,{...s,...a,ref:n})});E$.displayName=M$;var O$="PopoverTrigger",D$=r.forwardRef((t,n)=>{const{__scopePopover:r,...o}=t,a=C$(O$,r),i=N$(r),s=K(n,a.triggerRef),l=e(ae.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":U$(a.open),...o,ref:s,onClick:te(t.onClick,a.onOpenToggle)});return a.hasCustomAnchor?l:e(NT,{asChild:!0,...i,children:l})});D$.displayName=O$;var P$="PopoverPortal",[T$,A$]=k$(P$,{forceMount:void 0}),R$=t=>{const{__scopePopover:n,forceMount:r,children:o,container:a}=t,i=C$(P$,n);return e(T$,{scope:n,forceMount:r,children:e(se,{present:r||i.open,children:e(Gn,{asChild:!0,container:a,children:o})})})};R$.displayName=P$;var I$="PopoverContent",j$=r.forwardRef((t,n)=>{const r=A$(I$,t.__scopePopover),{forceMount:o=r.forceMount,...a}=t,i=C$(I$,t.__scopePopover);return e(se,{present:o||i.open,children:i.modal?e(L$,{...a,ref:n}):e(F$,{...a,ref:n})})});j$.displayName=I$;var z$=q("PopoverContent.RemoveScroll"),L$=r.forwardRef((t,n)=>{const o=C$(I$,t.__scopePopover),a=r.useRef(null),i=K(n,a),s=r.useRef(!1);return r.useEffect(()=>{const e=a.current;if(e)return Yr(e)},[]),e(Fr,{as:z$,allowPinchZoom:!0,children:e(B$,{...t,ref:i,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:te(t.onCloseAutoFocus,e=>{e.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:te(t.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;s.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:te(t.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),F$=r.forwardRef((t,n)=>{const o=C$(I$,t.__scopePopover),a=r.useRef(!1),i=r.useRef(!1);return e(B$,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(a.current||o.triggerRef.current?.focus(),e.preventDefault()),a.current=!1,i.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(a.current=!0,"pointerdown"===e.detail.originalEvent.type&&(i.current=!0));const n=e.target,r=o.triggerRef.current?.contains(n);r&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&i.current&&e.preventDefault()}})}),B$=r.forwardRef((t,n)=>{const{__scopePopover:r,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:d,...f}=t,p=C$(I$,r),m=N$(r);return Zn(),e(Wn,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:a,onUnmountAutoFocus:i,children:e(In,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:d,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1),children:e(ST,{"data-state":U$(p.open),role:"dialog",id:p.contentId,...m,...f,ref:n,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),$$="PopoverClose",W$=r.forwardRef((t,n)=>{const{__scopePopover:r,...o}=t,a=C$($$,r);return e(ae.button,{type:"button",...o,ref:n,onClick:te(t.onClick,()=>a.onOpenChange(!1))})});W$.displayName=$$;var H$=r.forwardRef((t,n)=>{const{__scopePopover:r,...o}=t,a=N$(r);return e(CT,{...a,...o,ref:n})});function U$(e){return e?"open":"closed"}H$.displayName="PopoverArrow";var V$=_$,Y$=E$,K$=D$,q$=R$,G$=j$;function X$({...t}){return e(V$,{"data-slot":"popover",...t})}function Z$({...t}){return e(K$,{"data-slot":"popover-trigger",...t})}function Q$({className:t,align:n="center",sideOffset:r=4,...o}){return e(q$,{children:e(G$,{"data-slot":"popover-content",align:n,sideOffset:r,className:vn("bg-popover text-popover-foreground 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 origin-(--radix-popover-content-transform-origin) outline-hidden z-50 w-72 rounded-md border p-4 shadow-md",t),...o})})}function J$({...t}){return e(Y$,{"data-slot":"popover-anchor",...t})}var eW="Progress",tW=100,[nW]=H(eW),[rW,oW]=nW(eW),aW=r.forwardRef((t,n)=>{const{__scopeProgress:r,value:o=null,max:a,getValueLabel:i=lW,...s}=t;!a&&0!==a||dW(a)||console.error(`Invalid prop \`max\` of value \`${`${a}`}\` supplied to \`${"Progress"}\`. Only numbers greater than 0 are valid max values. Defaulting to \`100\`.`);const l=dW(a)?a:tW;null===o||fW(o,l)||console.error(function(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:\n - a positive number\n - less than the value passed to \`max\` (or 100 if no \`max\` prop is set)\n - \`null\` or \`undefined\` if the progress is indeterminate.\n\nDefaulting to \`null\`.`}(`${o}`,"Progress"));const c=fW(o,l)?o:null,u=uW(c)?i(c,l):void 0;return e(rW,{scope:r,value:c,max:l,children:e(ae.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":uW(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":cW(c,l),"data-value":c??void 0,"data-max":l,...s,ref:n})})});aW.displayName=eW;var iW="ProgressIndicator",sW=r.forwardRef((t,n)=>{const{__scopeProgress:r,...o}=t,a=oW(iW,r);return e(ae.div,{"data-state":cW(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...o,ref:n})});function lW(e,t){return`${Math.round(e/t*100)}%`}function cW(e,t){return null==e?"indeterminate":e===t?"complete":"loading"}function uW(e){return"number"==typeof e}function dW(e){return uW(e)&&!isNaN(e)&&e>0}function fW(e,t){return uW(e)&&!isNaN(e)&&e<=t&&e>=0}sW.displayName=iW;var pW=aW,mW=sW;function hW({className:t,value:n,...r}){return e(pW,{"data-slot":"progress",className:vn("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",t),...r,children:e(mW,{"data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all",style:{transform:`translateX(-${100-(n||0)}%)`}})})}var gW="Radio",[vW,yW]=H(gW),[bW,wW]=vW(gW),xW=r.forwardRef((t,o)=>{const{__scopeRadio:a,name:i,checked:s=!1,required:l,disabled:c,value:u="on",onCheck:d,form:f,...p}=t,[m,h]=r.useState(null),g=K(o,e=>h(e)),v=r.useRef(!1),y=!m||(f||!!m.closest("form"));return n(bW,{scope:a,checked:s,disabled:c,children:[e(ae.button,{type:"button",role:"radio","aria-checked":s,"data-state":CW(s),"data-disabled":c?"":void 0,disabled:c,value:u,...p,ref:g,onClick:te(t.onClick,e=>{s||d?.(),y&&(v.current=e.isPropagationStopped(),v.current||e.stopPropagation())})}),y&&e(SW,{control:m,bubbles:!v.current,name:i,value:u,checked:s,required:l,disabled:c,form:f,style:{transform:"translateX(-100%)"}})]})});xW.displayName=gW;var kW="RadioIndicator",NW=r.forwardRef((t,n)=>{const{__scopeRadio:r,forceMount:o,...a}=t,i=wW(kW,r);return e(se,{present:o||i.checked,children:e(ae.span,{"data-state":CW(i.checked),"data-disabled":i.disabled?"":void 0,...a,ref:n})})});NW.displayName=kW;var SW=r.forwardRef(({__scopeRadio:t,control:n,checked:o,bubbles:a=!0,...i},s)=>{const l=r.useRef(null),c=K(l,s),u=$E(o),d=WE(n);return r.useEffect(()=>{const e=l.current;if(!e)return;const t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(u!==o&&n){const t=new Event("click",{bubbles:a});n.call(e,o),e.dispatchEvent(t)}},[u,o,a]),e(ae.input,{type:"radio","aria-hidden":!0,defaultChecked:o,...i,tabIndex:-1,ref:c,style:{...i.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function CW(e){return e?"checked":"unchecked"}SW.displayName="RadioBubbleInput";var _W=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],MW="RadioGroup",[EW]=H(MW,[AT,yW]),OW=AT(),DW=yW(),[PW,TW]=EW(MW),AW=r.forwardRef((t,n)=>{const{__scopeRadioGroup:r,name:o,defaultValue:a,value:i,required:s=!1,disabled:l=!1,orientation:c,dir:u,loop:d=!0,onValueChange:f,...p}=t,m=OW(r),h=Ee(u),[g,v]=oe({prop:i,defaultProp:a??null,onChange:f,caller:MW});return e(PW,{scope:r,name:o,required:s,disabled:l,value:g,onValueChange:v,children:e(WT,{asChild:!0,...m,orientation:c,dir:h,loop:d,children:e(ae.div,{role:"radiogroup","aria-required":s,"aria-orientation":c,"data-disabled":l?"":void 0,dir:h,...p,ref:n})})})});AW.displayName=MW;var RW="RadioGroupItem",IW=r.forwardRef((t,n)=>{const{__scopeRadioGroup:o,disabled:a,...i}=t,s=TW(RW,o),l=s.disabled||a,c=OW(o),u=DW(o),d=r.useRef(null),f=K(n,d),p=s.value===i.value,m=r.useRef(!1);return r.useEffect(()=>{const e=e=>{_W.includes(e.key)&&(m.current=!0)},t=()=>m.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}},[]),e(HT,{asChild:!0,...c,focusable:!l,active:p,children:e(xW,{disabled:l,required:s.required,checked:p,...u,...i,name:s.name,ref:f,onCheck:()=>s.onValueChange(i.value),onKeyDown:te(e=>{"Enter"===e.key&&e.preventDefault()}),onFocus:te(i.onFocus,()=>{m.current&&d.current?.click()})})})});IW.displayName=RW;var jW=r.forwardRef((t,n)=>{const{__scopeRadioGroup:r,...o}=t,a=DW(r);return e(NW,{...a,...o,ref:n})});jW.displayName="RadioGroupIndicator";var zW=AW,LW=IW,FW=jW;function BW({className:t,...n}){return e(zW,{"data-slot":"radio-group",className:vn("grid gap-3",t),...n})}function $W({className:t,...n}){return e(LW,{"data-slot":"radio-group-item",className:vn("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 shadow-xs aspect-square size-4 shrink-0 rounded-full border outline-none transition-[color,box-shadow] focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),...n,children:e(FW,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:e(T,{className:"fill-primary absolute left-1/2 top-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}const WW="undefined"!=typeof window,HW=i(null);HW.displayName="PanelGroupContext";const UW="data-panel-group",VW="data-panel-group-direction",YW="data-panel-group-id",KW="data-panel",qW="data-panel-collapsible",GW="data-panel-id",XW="data-panel-size",ZW="data-resize-handle",QW="data-resize-handle-active",JW="data-panel-resize-handle-enabled",eH="data-panel-resize-handle-id",tH="data-resize-handle-state",nH=WW?u:()=>{},rH=r["useId".toString()],oH="function"==typeof rH?rH:()=>null;let aH=0;function iH(e=null){const t=oH(),n=c(e||t||null);return null===n.current&&(n.current=""+aH++),null!=e?e:n.current}function sH({children:e,className:t="",collapsedSize:n,collapsible:r,defaultSize:o,forwardedRef:a,id:i,maxSize:l,minSize:u,onCollapse:d,onExpand:f,onResize:p,order:m,style:h,tagName:v="div",...b}){const w=s(HW);if(null===w)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:x,expandPanel:k,getPanelSize:N,getPanelStyle:S,groupId:C,isPanelCollapsed:_,reevaluatePanelConstraints:M,registerPanel:E,resizePanel:O,unregisterPanel:D}=w,P=iH(i),T=c({callbacks:{onCollapse:d,onExpand:f,onResize:p},constraints:{collapsedSize:n,collapsible:r,defaultSize:o,maxSize:l,minSize:u},id:P,idIsFromProps:void 0!==i,order:m});c({didLogMissingDefaultSizeWarning:!1}),nH(()=>{const{callbacks:e,constraints:t}=T.current,a={...t};T.current.id=P,T.current.idIsFromProps=void 0!==i,T.current.order=m,e.onCollapse=d,e.onExpand=f,e.onResize=p,t.collapsedSize=n,t.collapsible=r,t.defaultSize=o,t.maxSize=l,t.minSize=u,a.collapsedSize===t.collapsedSize&&a.collapsible===t.collapsible&&a.maxSize===t.maxSize&&a.minSize===t.minSize||M(T.current,a)}),nH(()=>{const e=T.current;return E(e),()=>{D(e)}},[m,P,E,D]),g(a,()=>({collapse:()=>{x(T.current)},expand:e=>{k(T.current,e)},getId:()=>P,getSize:()=>N(T.current),isCollapsed:()=>_(T.current),isExpanded:()=>!_(T.current),resize:e=>{O(T.current,e)}}),[x,k,N,_,P,O]);const A=S(T.current,o);return y(v,{...b,children:e,className:t,id:P,style:{...A,...h},[YW]:C,[KW]:"",[qW]:r||void 0,[GW]:P,[XW]:parseFloat(""+A.flexGrow).toFixed(1)})}const lH=m((e,t)=>y(sH,{...e,forwardedRef:t}));sH.displayName="Panel",lH.displayName="forwardRef(Panel)";let cH=null,uH=-1,dH=null;function fH(e,t,n){var r,o;const a=function(e,t){const n=0!==(t&_H),r=0!==(t&MH);if(t){if(0!==(t&SH))return n?"se-resize":r?"ne-resize":"e-resize";if(0!==(t&CH))return n?"sw-resize":r?"nw-resize":"w-resize";if(n)return"s-resize";if(r)return"n-resize"}switch(e){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}(e,t);if(cH!==a){var i;if(cH=a,null===dH&&(dH=document.createElement("style"),document.head.appendChild(dH)),uH>=0)null===(i=dH.sheet)||void 0===i||i.removeRule(uH);uH=null!==(r=null===(o=dH.sheet)||void 0===o?void 0:o.insertRule(`*{cursor: ${a} !important;}`))&&void 0!==r?r:-1}}function pH(e){return"keydown"===e.type}function mH(e){return e.type.startsWith("pointer")}function hH(e){return e.type.startsWith("mouse")}function gH(e){if(mH(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(hH(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function vH(e,t,n){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}const yH=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function bH(e){const t=getComputedStyle(e);return"fixed"===t.position||(!("auto"===t.zIndex||"static"===t.position&&!function(e){var t;const n=getComputedStyle(null!==(t=NH(e))&&void 0!==t?t:e).display;return"flex"===n||"inline-flex"===n}(e))||(+t.opacity<1||("transform"in t&&"none"!==t.transform||("webkitTransform"in t&&"none"!==t.webkitTransform||("mixBlendMode"in t&&"normal"!==t.mixBlendMode||("filter"in t&&"none"!==t.filter||("webkitFilter"in t&&"none"!==t.webkitFilter||("isolation"in t&&"isolate"===t.isolation||(!!yH.test(t.willChange)||"touch"===t.webkitOverflowScrolling)))))))))}function wH(e){let t=e.length;for(;t--;){const n=e[t];if(UH(n,"Missing node"),bH(n))return n}return null}function xH(e){return e&&Number(getComputedStyle(e).zIndex)||0}function kH(e){const t=[];for(;e;)t.push(e),e=NH(e);return t}function NH(e){const{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}const SH=1,CH=2,_H=4,MH=8,EH="coarse"===function(){if("function"==typeof matchMedia)return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}();let OH=[],DH=!1,PH=new Map,TH=new Map;const AH=new Set;function RH(e){const{target:t}=e,{x:n,y:r}=gH(e);DH=!0,LH({target:t,x:n,y:r}),WH(),OH.length>0&&(HH("down",e),BH(),e.preventDefault(),zH(t)||e.stopImmediatePropagation())}function IH(e){const{x:t,y:n}=gH(e);if(DH&&"pointerleave"!==e.type&&0===e.buttons&&(DH=!1,HH("up",e)),!DH){const{target:r}=e;LH({target:r,x:t,y:n})}HH("move",e),BH(),OH.length>0&&e.preventDefault()}function jH(e){const{target:t}=e,{x:n,y:r}=gH(e);TH.clear(),DH=!1,OH.length>0&&(e.preventDefault(),zH(t)||e.stopImmediatePropagation()),HH("up",e),LH({target:t,x:n,y:r}),BH(),WH()}function zH(e){let t=e;for(;t;){if(t.hasAttribute(ZW))return!0;t=t.parentElement}return!1}function LH({target:e,x:t,y:n}){OH.splice(0);let r=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(r=e),AH.forEach(e=>{const{element:o,hitAreaMargins:a}=e,i=o.getBoundingClientRect(),{bottom:s,left:l,right:c,top:u}=i,d=EH?a.coarse:a.fine;if(t>=l-d&&t<=c+d&&n>=u-d&&n<=s+d){if(null!==r&&document.contains(r)&&o!==r&&!o.contains(r)&&!r.contains(o)&&function(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:kH(e),b:kH(t)};let r;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),r=e;UH(r,"Stacking order can only be calculated for elements with a common ancestor");const o=xH(wH(n.a)),a=xH(wH(n.b));if(o===a){const e=r.childNodes,t={a:n.a.at(-1),b:n.b.at(-1)};let o=e.length;for(;o--;){const n=e[o];if(n===t.a)return 1;if(n===t.b)return-1}}return Math.sign(o-a)}(r,o)>0){let e=r,t=!1;for(;e&&!e.contains(o);){if(vH(e.getBoundingClientRect(),i)){t=!0;break}e=e.parentElement}if(t)return}OH.push(e)}})}function FH(e,t){TH.set(e,t)}function BH(){let e=!1,t=!1;OH.forEach(n=>{const{direction:r}=n;"horizontal"===r?e=!0:t=!0});let n=0;TH.forEach(e=>{n|=e}),e&&t?fH("intersection",n):e?fH("horizontal",n):t?fH("vertical",n):null!==dH&&(document.head.removeChild(dH),cH=null,dH=null,uH=-1)}let $H;function WH(){var e;null===(e=$H)||void 0===e||e.abort(),$H=new AbortController;const t={capture:!0,signal:$H.signal};AH.size&&(DH?(OH.length>0&&PH.forEach((e,n)=>{const{body:r}=n;e>0&&(r.addEventListener("contextmenu",jH,t),r.addEventListener("pointerleave",IH,t),r.addEventListener("pointermove",IH,t))}),PH.forEach((e,n)=>{const{body:r}=n;r.addEventListener("pointerup",jH,t),r.addEventListener("pointercancel",jH,t)})):PH.forEach((e,n)=>{const{body:r}=n;e>0&&(r.addEventListener("pointerdown",RH,t),r.addEventListener("pointermove",IH,t))}))}function HH(e,t){AH.forEach(n=>{const{setResizeHandlerState:r}=n,o=OH.includes(n);r(e,o,t)})}function UH(e,t){if(!e)throw console.error(t),Error(t)}function VH(e,t,n=10){return e.toFixed(n)===t.toFixed(n)?0:e>t?1:-1}function YH(e,t,n=10){return 0===VH(e,t,n)}function KH(e,t,n){return 0===VH(e,t,n)}function qH({panelConstraints:e,panelIndex:t,size:n}){const r=e[t];UH(null!=r,`Panel constraints not found for index ${t}`);let{collapsedSize:o=0,collapsible:a,maxSize:i=100,minSize:s=0}=r;if(VH(n,s)<0)if(a){n=VH(n,(o+s)/2)<0?o:s}else n=s;return n=Math.min(i,n),n=parseFloat(n.toFixed(10))}function GH({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:o,trigger:a}){if(KH(e,0))return t;const i=[...t],[s,l]=r;UH(null!=s,"Invalid first pivot index"),UH(null!=l,"Invalid second pivot index");let c=0;if("keyboard"===a){{const r=e<0?l:s,o=n[r];UH(o,`Panel constraints not found for index ${r}`);const{collapsedSize:a=0,collapsible:i,minSize:c=0}=o;if(i){const n=t[r];if(UH(null!=n,`Previous layout not found for panel index ${r}`),KH(n,a)){const t=c-n;VH(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}{const r=e<0?s:l,o=n[r];UH(o,`No panel constraints found for index ${r}`);const{collapsedSize:a=0,collapsible:i,minSize:c=0}=o;if(i){const n=t[r];if(UH(null!=n,`Previous layout not found for panel index ${r}`),KH(n,c)){const t=n-a;VH(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}}{const r=e<0?1:-1;let o=e<0?l:s,a=0;for(;;){const e=t[o];UH(null!=e,`Previous layout not found for panel index ${o}`);if(a+=qH({panelConstraints:n,panelIndex:o,size:100})-e,o+=r,o<0||o>=n.length)break}const i=Math.min(Math.abs(e),Math.abs(a));e=e<0?0-i:i}{let r=e<0?s:l;for(;r>=0&&r<n.length;){const o=Math.abs(e)-Math.abs(c),a=t[r];UH(null!=a,`Previous layout not found for panel index ${r}`);const s=qH({panelConstraints:n,panelIndex:r,size:a-o});if(!KH(a,s)&&(c+=a-s,i[r]=s,c.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?r--:r++}}if(function(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!KH(e[r],t[r],n))return!1;return!0}(o,i))return o;{const r=e<0?l:s,o=t[r];UH(null!=o,`Previous layout not found for panel index ${r}`);const a=o+c,u=qH({panelConstraints:n,panelIndex:r,size:a});if(i[r]=u,!KH(u,a)){let t=a-u;let r=e<0?l:s;for(;r>=0&&r<n.length;){const o=i[r];UH(null!=o,`Previous layout not found for panel index ${r}`);const a=qH({panelConstraints:n,panelIndex:r,size:o+t});if(KH(o,a)||(t-=a-o,i[r]=a),KH(t,0))break;e>0?r--:r++}}}const u=i.reduce((e,t)=>t+e,0);return KH(u,100)?i:o}function XH({layout:e,panelsArray:t,pivotIndices:n}){let r=0,o=100,a=0,i=0;const s=n[0];UH(null!=s,"No pivot index found"),t.forEach((e,t)=>{const{constraints:n}=e,{maxSize:l=100,minSize:c=0}=n;t===s?(r=c,o=l):(a+=c,i+=l)});return{valueMax:Math.min(o,100-a),valueMin:Math.max(r,100-i),valueNow:e[s]}}function ZH(e,t=document){return Array.from(t.querySelectorAll(`[${eH}][data-panel-group-id="${e}"]`))}function QH(e,t,n=document){const r=ZH(e,n).findIndex(e=>e.getAttribute(eH)===t);return null!=r?r:null}function JH(e,t,n){const r=QH(e,t,n);return null!=r?[r,r+1]:[-1,-1]}function eU(e,t=document){if(((n=t)instanceof HTMLElement||"object"==typeof n&&null!==n&&"tagName"in n&&"getAttribute"in n)&&t.dataset.panelGroupId==e)return t;var n;const r=t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`);return r||null}function tU(e,t=document){const n=t.querySelector(`[${eH}="${e}"]`);return n||null}function nU({committedValuesRef:e,eagerValuesRef:t,groupId:n,layout:r,panelDataArray:o,panelGroupElement:a,setLayout:i}){c({didWarnAboutMissingResizeHandle:!1}),nH(()=>{if(!a)return;const e=ZH(n,a);for(let t=0;t<o.length-1;t++){const{valueMax:n,valueMin:a,valueNow:i}=XH({layout:r,panelsArray:o,pivotIndices:[t,t+1]}),s=e[t];if(null==s);else{const e=o[t];UH(e,`No panel data found for index "${t}"`),s.setAttribute("aria-controls",e.id),s.setAttribute("aria-valuemax",""+Math.round(n)),s.setAttribute("aria-valuemin",""+Math.round(a)),s.setAttribute("aria-valuenow",null!=i?""+Math.round(i):"")}}return()=>{e.forEach((e,t)=>{e.removeAttribute("aria-controls"),e.removeAttribute("aria-valuemax"),e.removeAttribute("aria-valuemin"),e.removeAttribute("aria-valuenow")})}},[n,r,o,a]),d(()=>{if(!a)return;const e=t.current;UH(e,"Eager values not found");const{panelDataArray:o}=e;UH(null!=eU(n,a),`No group found for id "${n}"`);const s=ZH(n,a);UH(s,`No resize handles found for group id "${n}"`);const l=s.map(e=>{const t=e.getAttribute(eH);UH(t,"Resize handle element has no handle id attribute");const[s,l]=function(e,t,n,r=document){var o,a,i,s;const l=tU(t,r),c=ZH(e,r),u=l?c.indexOf(l):-1;return[null!==(o=null===(a=n[u])||void 0===a?void 0:a.id)&&void 0!==o?o:null,null!==(i=null===(s=n[u+1])||void 0===s?void 0:s.id)&&void 0!==i?i:null]}(n,t,o,a);if(null==s||null==l)return()=>{};const c=e=>{if(!e.defaultPrevented)switch(e.key){case"Enter":{e.preventDefault();const l=o.findIndex(e=>e.id===s);if(l>=0){const e=o[l];UH(e,`No panel data found for index ${l}`);const s=r[l],{collapsedSize:c=0,collapsible:u,minSize:d=0}=e.constraints;if(null!=s&&u){const e=GH({delta:KH(s,c)?d-c:c-s,initialLayout:r,panelConstraints:o.map(e=>e.constraints),pivotIndices:JH(n,t,a),prevLayout:r,trigger:"keyboard"});r!==e&&i(e)}}break}}};return e.addEventListener("keydown",c),()=>{e.removeEventListener("keydown",c)}});return()=>{l.forEach(e=>e())}},[a,e,t,n,r,o,i])}function rU(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function oU(e,t){const n="horizontal"===e,{x:r,y:o}=gH(t);return n?r:o}function aU(e,t,n,r,o,a){if(pH(e)){const t="horizontal"===n;let r=0;r=e.shiftKey?100:null!=o?o:10;let a=0;switch(e.key){case"ArrowDown":a=t?0:r;break;case"ArrowLeft":a=t?-r:0;break;case"ArrowRight":a=t?r:0;break;case"ArrowUp":a=t?0:-r;break;case"End":a=100;break;case"Home":a=-100}return a}return null==r?0:function(e,t,n,r,o){const a="horizontal"===n,i=tU(t,o);UH(i,`No resize handle element found for id "${t}"`);const s=i.getAttribute(YW);UH(s,"Resize handle element has no group id attribute");let{initialCursorPosition:l}=r;const c=oU(n,e),u=eU(s,o);UH(u,`No group element found for id "${s}"`);const d=u.getBoundingClientRect();return(c-l)/(a?d.width:d.height)*100}(e,t,n,r,a)}function iU(e,t,n){t.forEach((t,r)=>{const o=e[r];UH(o,`Panel data not found for index ${r}`);const{callbacks:a,constraints:i,id:s}=o,{collapsedSize:l=0,collapsible:c}=i,u=n[s];if(null==u||t!==u){n[s]=t;const{onCollapse:e,onExpand:r,onResize:o}=a;o&&o(t,u),c&&(e||r)&&(!r||null!=u&&!YH(u,l)||YH(t,l)||r(),!e||null!=u&&YH(u,l)||!YH(t,l)||e())}})}function sU(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function lU(e){try{if("undefined"==typeof localStorage)throw new Error("localStorage not supported in this environment");e.getItem=e=>localStorage.getItem(e),e.setItem=(e,t)=>{localStorage.setItem(e,t)}}catch(t){console.error(t),e.getItem=()=>null,e.setItem=()=>{}}}function cU(e){return`react-resizable-panels:${e}`}function uU(e){return e.map(e=>{const{constraints:t,id:n,idIsFromProps:r,order:o}=e;return r?n:o?`${o}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(",")}function dU(e,t){try{const n=cU(e),r=t.getItem(n);if(r){const e=JSON.parse(r);if("object"==typeof e&&null!=e)return e}}catch(e){}return null}function fU(e,t,n,r,o){var a;const i=cU(e),s=uU(t),l=null!==(a=dU(e,o))&&void 0!==a?a:{};l[s]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{o.setItem(i,JSON.stringify(l))}catch(e){console.error(e)}}function pU({layout:e,panelConstraints:t}){const n=[...e],r=n.reduce((e,t)=>e+t,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(e=>`${e}%`).join(", ")}`);if(!KH(r,100)&&n.length>0)for(let e=0;e<t.length;e++){const t=n[e];UH(null!=t,`No layout data found for index ${e}`);const o=100/r*t;n[e]=o}let o=0;for(let e=0;e<t.length;e++){const r=n[e];UH(null!=r,`No layout data found for index ${e}`);const a=qH({panelConstraints:t,panelIndex:e,size:r});r!=a&&(o+=r-a,n[e]=a)}if(!KH(o,0))for(let e=0;e<t.length;e++){const r=n[e];UH(null!=r,`No layout data found for index ${e}`);const a=qH({panelConstraints:t,panelIndex:e,size:r+o});if(r!==a&&(o-=a-r,n[e]=a,KH(o,0)))break}return n}const mU={getItem:e=>(lU(mU),mU.getItem(e)),setItem:(e,t)=>{lU(mU),mU.setItem(e,t)}},hU={};function gU({autoSaveId:e=null,children:t,className:n="",direction:r,forwardedRef:o,id:i=null,onLayout:s=null,keyboardResizeBy:u=null,storage:p=mU,style:m,tagName:h="div",...v}){const b=iH(i),w=c(null),[x,k]=a(null),[N,S]=a([]),C=function(){const[e,t]=a(0);return l(()=>t(e=>e+1),[])}(),_=c({}),M=c(new Map),E=c(0),O=c({autoSaveId:e,direction:r,dragState:x,id:b,keyboardResizeBy:u,onLayout:s,storage:p}),D=c({layout:N,panelDataArray:[],panelDataArrayChanged:!1});c({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),g(o,()=>({getId:()=>O.current.id,getLayout:()=>{const{layout:e}=D.current;return e},setLayout:e=>{const{onLayout:t}=O.current,{layout:n,panelDataArray:r}=D.current,o=pU({layout:e,panelConstraints:r.map(e=>e.constraints)});rU(n,o)||(S(o),D.current.layout=o,t&&t(o),iU(r,o,_.current))}}),[]),nH(()=>{O.current.autoSaveId=e,O.current.direction=r,O.current.dragState=x,O.current.id=b,O.current.onLayout=s,O.current.storage=p}),nU({committedValuesRef:O,eagerValuesRef:D,groupId:b,layout:N,panelDataArray:D.current.panelDataArray,setLayout:S,panelGroupElement:w.current}),d(()=>{const{panelDataArray:t}=D.current;if(e){if(0===N.length||N.length!==t.length)return;let n=hU[e];null==n&&(n=function(e,t=10){let n=null;return(...r)=>{null!==n&&clearTimeout(n),n=setTimeout(()=>{e(...r)},t)}}(fU,100),hU[e]=n);const r=[...t],o=new Map(M.current);n(e,r,o,N,p)}},[e,N,p]),d(()=>{});const P=l(e=>{const{onLayout:t}=O.current,{layout:n,panelDataArray:r}=D.current;if(e.constraints.collapsible){const o=r.map(e=>e.constraints),{collapsedSize:a=0,panelSize:i,pivotIndices:s}=bU(r,e,n);if(UH(null!=i,`Panel size not found for panel "${e.id}"`),!YH(i,a)){M.current.set(e.id,i);const l=GH({delta:yU(r,e)===r.length-1?i-a:a-i,initialLayout:n,panelConstraints:o,pivotIndices:s,prevLayout:n,trigger:"imperative-api"});sU(n,l)||(S(l),D.current.layout=l,t&&t(l),iU(r,l,_.current))}}},[]),T=l((e,t)=>{const{onLayout:n}=O.current,{layout:r,panelDataArray:o}=D.current;if(e.constraints.collapsible){const a=o.map(e=>e.constraints),{collapsedSize:i=0,panelSize:s=0,minSize:l=0,pivotIndices:c}=bU(o,e,r),u=null!=t?t:l;if(YH(s,i)){const t=M.current.get(e.id),i=null!=t&&t>=u?t:u,l=GH({delta:yU(o,e)===o.length-1?s-i:i-s,initialLayout:r,panelConstraints:a,pivotIndices:c,prevLayout:r,trigger:"imperative-api"});sU(r,l)||(S(l),D.current.layout=l,n&&n(l),iU(o,l,_.current))}}},[]),A=l(e=>{const{layout:t,panelDataArray:n}=D.current,{panelSize:r}=bU(n,e,t);return UH(null!=r,`Panel size not found for panel "${e.id}"`),r},[]),R=l((e,t)=>{const{panelDataArray:n}=D.current,r=yU(n,e);return function({defaultSize:e,dragState:t,layout:n,panelData:r,panelIndex:o,precision:a=3}){const i=n[o];let s;return s=null==i?null!=e?e.toFixed(a):"1":1===r.length?"1":i.toFixed(a),{flexBasis:0,flexGrow:s,flexShrink:1,overflow:"hidden",pointerEvents:null!==t?"none":void 0}}({defaultSize:t,dragState:x,layout:N,panelData:n,panelIndex:r})},[x,N]),I=l(e=>{const{layout:t,panelDataArray:n}=D.current,{collapsedSize:r=0,collapsible:o,panelSize:a}=bU(n,e,t);return UH(null!=a,`Panel size not found for panel "${e.id}"`),!0===o&&YH(a,r)},[]),j=l(e=>{const{layout:t,panelDataArray:n}=D.current,{collapsedSize:r=0,collapsible:o,panelSize:a}=bU(n,e,t);return UH(null!=a,`Panel size not found for panel "${e.id}"`),!o||VH(a,r)>0},[]),z=l(e=>{const{panelDataArray:t}=D.current;t.push(e),t.sort((e,t)=>{const n=e.order,r=t.order;return null==n&&null==r?0:null==n?-1:null==r?1:n-r}),D.current.panelDataArrayChanged=!0,C()},[C]);nH(()=>{if(D.current.panelDataArrayChanged){D.current.panelDataArrayChanged=!1;const{autoSaveId:e,onLayout:t,storage:n}=O.current,{layout:r,panelDataArray:o}=D.current;let a=null;if(e){const t=function(e,t,n){var r,o;return null!==(o=(null!==(r=dU(e,n))&&void 0!==r?r:{})[uU(t)])&&void 0!==o?o:null}(e,o,n);t&&(M.current=new Map(Object.entries(t.expandToSizes)),a=t.layout)}null==a&&(a=function({panelDataArray:e}){const t=Array(e.length),n=e.map(e=>e.constraints);let r=0,o=100;for(let a=0;a<e.length;a++){const e=n[a];UH(e,`Panel constraints not found for index ${a}`);const{defaultSize:i}=e;null!=i&&(r++,t[a]=i,o-=i)}for(let a=0;a<e.length;a++){const i=n[a];UH(i,`Panel constraints not found for index ${a}`);const{defaultSize:s}=i;if(null!=s)continue;const l=o/(e.length-r);r++,t[a]=l,o-=l}return t}({panelDataArray:o}));const i=pU({layout:a,panelConstraints:o.map(e=>e.constraints)});rU(r,i)||(S(i),D.current.layout=i,t&&t(i),iU(o,i,_.current))}}),nH(()=>{const e=D.current;return()=>{e.layout=[]}},[]);const L=l(e=>{let t=!1;const n=w.current;if(n){"rtl"===window.getComputedStyle(n,null).getPropertyValue("direction")&&(t=!0)}return function(n){n.preventDefault();const r=w.current;if(!r)return()=>null;const{direction:o,dragState:a,id:i,keyboardResizeBy:s,onLayout:l}=O.current,{layout:c,panelDataArray:u}=D.current,{initialLayout:d}=null!=a?a:{},f=JH(i,e,r);let p=aU(n,e,o,a,s,r);const m="horizontal"===o;m&&t&&(p=-p);const h=GH({delta:p,initialLayout:null!=d?d:c,panelConstraints:u.map(e=>e.constraints),pivotIndices:f,prevLayout:c,trigger:pH(n)?"keyboard":"mouse-or-touch"}),g=!sU(c,h);(mH(n)||hH(n))&&E.current!=p&&(E.current=p,FH(e,g||0===p?0:m?p<0?SH:CH:p<0?_H:MH)),g&&(S(h),D.current.layout=h,l&&l(h),iU(u,h,_.current))}},[]),F=l((e,t)=>{const{onLayout:n}=O.current,{layout:r,panelDataArray:o}=D.current,a=o.map(e=>e.constraints),{panelSize:i,pivotIndices:s}=bU(o,e,r);UH(null!=i,`Panel size not found for panel "${e.id}"`);const l=GH({delta:yU(o,e)===o.length-1?i-t:t-i,initialLayout:r,panelConstraints:a,pivotIndices:s,prevLayout:r,trigger:"imperative-api"});sU(r,l)||(S(l),D.current.layout=l,n&&n(l),iU(o,l,_.current))},[]),B=l((e,t)=>{const{layout:n,panelDataArray:r}=D.current,{collapsedSize:o=0,collapsible:a}=t,{collapsedSize:i=0,collapsible:s,maxSize:l=100,minSize:c=0}=e.constraints,{panelSize:u}=bU(r,e,n);null!=u&&(a&&s&&YH(u,o)?YH(o,i)||F(e,i):u<c?F(e,c):u>l&&F(e,l))},[F]),$=l((e,t)=>{const{direction:n}=O.current,{layout:r}=D.current;if(!w.current)return;const o=tU(e,w.current);UH(o,`Drag handle element not found for id "${e}"`);const a=oU(n,t);k({dragHandleId:e,dragHandleRect:o.getBoundingClientRect(),initialCursorPosition:a,initialLayout:r})},[]),W=l(()=>{k(null)},[]),H=l(e=>{const{panelDataArray:t}=D.current,n=yU(t,e);n>=0&&(t.splice(n,1),delete _.current[e.id],D.current.panelDataArrayChanged=!0,C())},[C]),U=f(()=>({collapsePanel:P,direction:r,dragState:x,expandPanel:T,getPanelSize:A,getPanelStyle:R,groupId:b,isPanelCollapsed:I,isPanelExpanded:j,reevaluatePanelConstraints:B,registerPanel:z,registerResizeHandle:L,resizePanel:F,startDragging:$,stopDragging:W,unregisterPanel:H,panelGroupElement:w.current}),[P,x,r,T,A,R,b,I,j,B,z,L,F,$,W,H]),V={display:"flex",flexDirection:"horizontal"===r?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return y(HW.Provider,{value:U},y(h,{...v,children:t,className:n,id:i,ref:w,style:{...V,...m},[UW]:"",[VW]:r,[YW]:b}))}const vU=m((e,t)=>y(gU,{...e,forwardedRef:t}));function yU(e,t){return e.findIndex(e=>e===t||e.id===t.id)}function bU(e,t,n){const r=yU(e,t),o=r===e.length-1?[r-1,r]:[r,r+1],a=n[r];return{...t.constraints,panelSize:a,pivotIndices:o}}function wU({children:e=null,className:t="",disabled:n=!1,hitAreaMargins:r,id:o,onBlur:i,onClick:l,onDragging:u,onFocus:f,onPointerDown:p,onPointerUp:m,style:h={},tabIndex:g=0,tagName:v="div",...b}){var w,x;const k=c(null),N=c({onClick:l,onDragging:u,onPointerDown:p,onPointerUp:m});d(()=>{N.current.onClick=l,N.current.onDragging=u,N.current.onPointerDown=p,N.current.onPointerUp=m});const S=s(HW);if(null===S)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:C,groupId:_,registerResizeHandle:M,startDragging:E,stopDragging:O,panelGroupElement:D}=S,P=iH(o),[T,A]=a("inactive"),[R,I]=a(!1),[j,z]=a(null),L=c({state:T});nH(()=>{L.current.state=T}),d(()=>{if(n)z(null);else{const e=M(P);z(()=>e)}},[n,P,M]);const F=null!==(w=null==r?void 0:r.coarse)&&void 0!==w?w:15,B=null!==(x=null==r?void 0:r.fine)&&void 0!==x?x:5;d(()=>{if(n||null==j)return;const e=k.current;UH(e,"Element ref not attached");let t=!1;return function(e,t,n,r,o){var a;const{ownerDocument:i}=t,s={direction:n,element:t,hitAreaMargins:r,setResizeHandlerState:o},l=null!==(a=PH.get(i))&&void 0!==a?a:0;return PH.set(i,l+1),AH.add(s),WH(),function(){var t;TH.delete(e),AH.delete(s);const n=null!==(t=PH.get(i))&&void 0!==t?t:1;if(PH.set(i,n-1),WH(),1===n&&PH.delete(i),OH.includes(s)){const e=OH.indexOf(s);e>=0&&OH.splice(e,1),BH(),o("up",!0,null)}}}(P,e,C,{coarse:F,fine:B},(e,n,r)=>{if(n)switch(e){case"down":{A("drag"),t=!1,UH(r,'Expected event to be defined for "down" action'),E(P,r);const{onDragging:e,onPointerDown:n}=N.current;null==e||e(!0),null==n||n();break}case"move":{const{state:e}=L.current;t=!0,"drag"!==e&&A("hover"),UH(r,'Expected event to be defined for "move" action'),j(r);break}case"up":{A("hover"),O();const{onClick:e,onDragging:n,onPointerUp:r}=N.current;null==n||n(!1),null==r||r(),t||null==e||e();break}}else A("inactive")})},[F,C,n,B,M,P,j,E,O]),function({disabled:e,handleId:t,resizeHandler:n,panelGroupElement:r}){d(()=>{if(e||null==n||null==r)return;const o=tU(t,r);if(null==o)return;const a=e=>{if(!e.defaultPrevented)switch(e.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":e.preventDefault(),n(e);break;case"F6":{e.preventDefault();const n=o.getAttribute(YW);UH(n,`No group element found for id "${n}"`);const a=ZH(n,r),i=QH(n,t,r);UH(null!==i,`No resize element found for id "${t}"`),a[e.shiftKey?i>0?i-1:a.length-1:i+1<a.length?i+1:0].focus();break}}};return o.addEventListener("keydown",a),()=>{o.removeEventListener("keydown",a)}},[r,e,t,n])}({disabled:n,handleId:P,resizeHandler:j,panelGroupElement:D});return y(v,{...b,children:e,className:t,id:o,onBlur:()=>{I(!1),null==i||i()},onFocus:()=>{I(!0),null==f||f()},ref:k,role:"separator",style:{touchAction:"none",userSelect:"none",...h},tabIndex:g,[VW]:C,[YW]:_,[ZW]:"",[QW]:"drag"===T?"pointer":R?"keyboard":void 0,[JW]:!n,[eH]:P,[tH]:T})}function xU({className:t,...n}){return e(vU,{"data-slot":"resizable-panel-group",className:vn("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),...n})}function kU({...t}){return e(lH,{"data-slot":"resizable-panel",...t})}function NU({withHandle:t,className:n,...r}){return e(wU,{"data-slot":"resizable-handle",className:vn("bg-border focus-visible:ring-ring focus-visible:outline-hidden relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",n),...r,children:t&&e("div",{className:"bg-border rounded-xs z-10 flex h-4 w-3 items-center justify-center border",children:e(I,{className:"size-2.5"})})})}function SU(e,[t,n]){return Math.min(n,Math.max(t,e))}gU.displayName="PanelGroup",vU.displayName="forwardRef(PanelGroup)",wU.displayName="PanelResizeHandle";var CU="ScrollArea",[_U]=H(CU),[MU,EU]=_U(CU),OU=r.forwardRef((t,n)=>{const{__scopeScrollArea:o,type:a="hover",dir:i,scrollHideDelay:s=600,...l}=t,[c,u]=r.useState(null),[d,f]=r.useState(null),[p,m]=r.useState(null),[h,g]=r.useState(null),[v,y]=r.useState(null),[b,w]=r.useState(0),[x,k]=r.useState(0),[N,S]=r.useState(!1),[C,_]=r.useState(!1),M=K(n,e=>u(e)),E=Ee(i);return e(MU,{scope:o,type:a,dir:E,scrollHideDelay:s,scrollArea:c,viewport:d,onViewportChange:f,content:p,onContentChange:m,scrollbarX:h,onScrollbarXChange:g,scrollbarXEnabled:N,onScrollbarXEnabledChange:S,scrollbarY:v,onScrollbarYChange:y,scrollbarYEnabled:C,onScrollbarYEnabledChange:_,onCornerWidthChange:w,onCornerHeightChange:k,children:e(ae.div,{dir:E,...l,ref:M,style:{position:"relative","--radix-scroll-area-corner-width":b+"px","--radix-scroll-area-corner-height":x+"px",...t.style}})})});OU.displayName=CU;var DU="ScrollAreaViewport",PU=r.forwardRef((o,a)=>{const{__scopeScrollArea:i,children:s,nonce:l,...c}=o,u=EU(DU,i),d=K(a,r.useRef(null),u.onViewportChange);return n(t,{children:[e("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:l}),e(ae.div,{"data-radix-scroll-area-viewport":"",...c,ref:d,style:{overflowX:u.scrollbarXEnabled?"scroll":"hidden",overflowY:u.scrollbarYEnabled?"scroll":"hidden",...o.style},children:e("div",{ref:u.onContentChange,style:{minWidth:"100%",display:"table"},children:s})})]})});PU.displayName=DU;var TU="ScrollAreaScrollbar",AU=r.forwardRef((t,n)=>{const{forceMount:o,...a}=t,i=EU(TU,t.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:l}=i,c="horizontal"===t.orientation;return r.useEffect(()=>(c?s(!0):l(!0),()=>{c?s(!1):l(!1)}),[c,s,l]),"hover"===i.type?e(RU,{...a,ref:n,forceMount:o}):"scroll"===i.type?e(IU,{...a,ref:n,forceMount:o}):"auto"===i.type?e(jU,{...a,ref:n,forceMount:o}):"always"===i.type?e(zU,{...a,ref:n}):null});AU.displayName=TU;var RU=r.forwardRef((t,n)=>{const{forceMount:o,...a}=t,i=EU(TU,t.__scopeScrollArea),[s,l]=r.useState(!1);return r.useEffect(()=>{const e=i.scrollArea;let t=0;if(e){const n=()=>{window.clearTimeout(t),l(!0)},r=()=>{t=window.setTimeout(()=>l(!1),i.scrollHideDelay)};return e.addEventListener("pointerenter",n),e.addEventListener("pointerleave",r),()=>{window.clearTimeout(t),e.removeEventListener("pointerenter",n),e.removeEventListener("pointerleave",r)}}},[i.scrollArea,i.scrollHideDelay]),e(se,{present:o||s,children:e(jU,{"data-state":s?"visible":"hidden",...a,ref:n})})}),IU=r.forwardRef((t,n)=>{const{forceMount:o,...a}=t,i=EU(TU,t.__scopeScrollArea),s="horizontal"===t.orientation,l=nV(()=>u("SCROLL_END"),100),[c,u]=function(e,t){return r.useReducer((e,n)=>t[e][n]??e,e)}("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return r.useEffect(()=>{if("idle"===c){const e=window.setTimeout(()=>u("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(e)}},[c,i.scrollHideDelay,u]),r.useEffect(()=>{const e=i.viewport,t=s?"scrollLeft":"scrollTop";if(e){let n=e[t];const r=()=>{const r=e[t];n!==r&&(u("SCROLL"),l()),n=r};return e.addEventListener("scroll",r),()=>e.removeEventListener("scroll",r)}},[i.viewport,s,u,l]),e(se,{present:o||"hidden"!==c,children:e(zU,{"data-state":"hidden"===c?"hidden":"visible",...a,ref:n,onPointerEnter:te(t.onPointerEnter,()=>u("POINTER_ENTER")),onPointerLeave:te(t.onPointerLeave,()=>u("POINTER_LEAVE"))})})}),jU=r.forwardRef((t,n)=>{const o=EU(TU,t.__scopeScrollArea),{forceMount:a,...i}=t,[s,l]=r.useState(!1),c="horizontal"===t.orientation,u=nV(()=>{if(o.viewport){const e=o.viewport.offsetWidth<o.viewport.scrollWidth,t=o.viewport.offsetHeight<o.viewport.scrollHeight;l(c?e:t)}},10);return rV(o.viewport,u),rV(o.content,u),e(se,{present:a||s,children:e(zU,{"data-state":s?"visible":"hidden",...i,ref:n})})}),zU=r.forwardRef((t,n)=>{const{orientation:o="vertical",...a}=t,i=EU(TU,t.__scopeScrollArea),s=r.useRef(null),l=r.useRef(0),[c,u]=r.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=XU(c.viewport,c.content),f={...a,sizes:c,onSizesChange:u,hasThumb:Boolean(d>0&&d<1),onThumbChange:e=>s.current=e,onThumbPointerUp:()=>l.current=0,onThumbPointerDown:e=>l.current=e};function p(e,t){return function(e,t,n,r="ltr"){const o=ZU(n),a=o/2,i=t||a,s=o-i,l=n.scrollbar.paddingStart+i,c=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d="ltr"===r?[0,u]:[-1*u,0],f=JU([l,c],d);return f(e)}(e,l.current,c,t)}return"horizontal"===o?e(LU,{...f,ref:n,onThumbPositionChange:()=>{if(i.viewport&&s.current){const e=QU(i.viewport.scrollLeft,c,i.dir);s.current.style.transform=`translate3d(${e}px, 0, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollLeft=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollLeft=p(e,i.dir))}}):"vertical"===o?e(FU,{...f,ref:n,onThumbPositionChange:()=>{if(i.viewport&&s.current){const e=QU(i.viewport.scrollTop,c);s.current.style.transform=`translate3d(0, ${e}px, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollTop=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollTop=p(e))}}):null}),LU=r.forwardRef((t,n)=>{const{sizes:o,onSizesChange:a,...i}=t,s=EU(TU,t.__scopeScrollArea),[l,c]=r.useState(),u=r.useRef(null),d=K(n,u,s.onScrollbarXChange);return r.useEffect(()=>{u.current&&c(getComputedStyle(u.current))},[u]),e(WU,{"data-orientation":"horizontal",...i,ref:d,sizes:o,style:{bottom:0,left:"rtl"===s.dir?"var(--radix-scroll-area-corner-width)":0,right:"ltr"===s.dir?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":ZU(o)+"px",...t.style},onThumbPointerDown:e=>t.onThumbPointerDown(e.x),onDragScroll:e=>t.onDragScroll(e.x),onWheelScroll:(e,n)=>{if(s.viewport){const r=s.viewport.scrollLeft+e.deltaX;t.onWheelScroll(r),eV(r,n)&&e.preventDefault()}},onResize:()=>{u.current&&s.viewport&&l&&a({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:u.current.clientWidth,paddingStart:GU(l.paddingLeft),paddingEnd:GU(l.paddingRight)}})}})}),FU=r.forwardRef((t,n)=>{const{sizes:o,onSizesChange:a,...i}=t,s=EU(TU,t.__scopeScrollArea),[l,c]=r.useState(),u=r.useRef(null),d=K(n,u,s.onScrollbarYChange);return r.useEffect(()=>{u.current&&c(getComputedStyle(u.current))},[u]),e(WU,{"data-orientation":"vertical",...i,ref:d,sizes:o,style:{top:0,right:"ltr"===s.dir?0:void 0,left:"rtl"===s.dir?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":ZU(o)+"px",...t.style},onThumbPointerDown:e=>t.onThumbPointerDown(e.y),onDragScroll:e=>t.onDragScroll(e.y),onWheelScroll:(e,n)=>{if(s.viewport){const r=s.viewport.scrollTop+e.deltaY;t.onWheelScroll(r),eV(r,n)&&e.preventDefault()}},onResize:()=>{u.current&&s.viewport&&l&&a({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:u.current.clientHeight,paddingStart:GU(l.paddingTop),paddingEnd:GU(l.paddingBottom)}})}})}),[BU,$U]=_U(TU),WU=r.forwardRef((t,n)=>{const{__scopeScrollArea:o,sizes:a,hasThumb:i,onThumbChange:s,onThumbPointerUp:l,onThumbPointerDown:c,onThumbPositionChange:u,onDragScroll:d,onWheelScroll:f,onResize:p,...m}=t,h=EU(TU,o),[g,v]=r.useState(null),y=K(n,e=>v(e)),b=r.useRef(null),w=r.useRef(""),x=h.viewport,k=a.content-a.viewport,N=On(f),S=On(u),C=nV(p,10);function _(e){if(b.current){const t=e.clientX-b.current.left,n=e.clientY-b.current.top;d({x:t,y:n})}}return r.useEffect(()=>{const e=e=>{const t=e.target,n=g?.contains(t);n&&N(e,k)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})},[x,g,k,N]),r.useEffect(S,[a,S]),rV(g,C),rV(h.content,C),e(BU,{scope:o,scrollbar:g,hasThumb:i,onThumbChange:On(s),onThumbPointerUp:On(l),onThumbPositionChange:S,onThumbPointerDown:On(c),children:e(ae.div,{...m,ref:y,style:{position:"absolute",...m.style},onPointerDown:te(t.onPointerDown,e=>{if(0===e.button){e.target.setPointerCapture(e.pointerId),b.current=g.getBoundingClientRect(),w.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",h.viewport&&(h.viewport.style.scrollBehavior="auto"),_(e)}}),onPointerMove:te(t.onPointerMove,_),onPointerUp:te(t.onPointerUp,e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=w.current,h.viewport&&(h.viewport.style.scrollBehavior=""),b.current=null})})})}),HU="ScrollAreaThumb",UU=r.forwardRef((t,n)=>{const{forceMount:r,...o}=t,a=$U(HU,t.__scopeScrollArea);return e(se,{present:r||a.hasThumb,children:e(VU,{ref:n,...o})})}),VU=r.forwardRef((t,n)=>{const{__scopeScrollArea:o,style:a,...i}=t,s=EU(HU,o),l=$U(HU,o),{onThumbPositionChange:c}=l,u=K(n,e=>l.onThumbChange(e)),d=r.useRef(void 0),f=nV(()=>{d.current&&(d.current(),d.current=void 0)},100);return r.useEffect(()=>{const e=s.viewport;if(e){const t=()=>{if(f(),!d.current){const t=tV(e,c);d.current=t,c()}};return c(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}},[s.viewport,f,c]),e(ae.div,{"data-state":l.hasThumb?"visible":"hidden",...i,ref:u,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...a},onPointerDownCapture:te(t.onPointerDownCapture,e=>{const t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;l.onThumbPointerDown({x:n,y:r})}),onPointerUp:te(t.onPointerUp,l.onThumbPointerUp)})});UU.displayName=HU;var YU="ScrollAreaCorner",KU=r.forwardRef((t,n)=>{const r=EU(YU,t.__scopeScrollArea),o=Boolean(r.scrollbarX&&r.scrollbarY);return"scroll"!==r.type&&o?e(qU,{...t,ref:n}):null});KU.displayName=YU;var qU=r.forwardRef((t,n)=>{const{__scopeScrollArea:o,...a}=t,i=EU(YU,o),[s,l]=r.useState(0),[c,u]=r.useState(0),d=Boolean(s&&c);return rV(i.scrollbarX,()=>{const e=i.scrollbarX?.offsetHeight||0;i.onCornerHeightChange(e),u(e)}),rV(i.scrollbarY,()=>{const e=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(e),l(e)}),d?e(ae.div,{...a,ref:n,style:{width:s,height:c,position:"absolute",right:"ltr"===i.dir?0:void 0,left:"rtl"===i.dir?0:void 0,bottom:0,...t.style}}):null});function GU(e){return e?parseInt(e,10):0}function XU(e,t){const n=e/t;return isNaN(n)?0:n}function ZU(e){const t=XU(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function QU(e,t,n="ltr"){const r=ZU(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-o,i=t.content-t.viewport,s=a-r,l=SU(e,"ltr"===n?[0,i]:[-1*i,0]);return JU([0,i],[0,s])(l)}function JU(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function eV(e,t){return e>0&&e<t}var tV=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const a={left:e.scrollLeft,top:e.scrollTop},i=n.left!==a.left,s=n.top!==a.top;(i||s)&&t(),n=a,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function nV(e,t){const n=On(e),o=r.useRef(0);return r.useEffect(()=>()=>window.clearTimeout(o.current),[]),r.useCallback(()=>{window.clearTimeout(o.current),o.current=window.setTimeout(n,t)},[n,t])}function rV(e,t){const n=On(t);ne(()=>{let t=0;if(e){const r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}var oV=OU,aV=PU,iV=KU;function sV({className:t,children:r,...o}){return n(oV,{"data-slot":"scroll-area",className:vn("relative",t),...o,children:[e(aV,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] outline-none transition-[color,box-shadow] focus-visible:outline-1 focus-visible:ring-[3px]",children:r}),e(lV,{}),e(iV,{})]})}function lV({className:t,orientation:n="vertical",...r}){return e(AU,{"data-slot":"scroll-area-scrollbar",orientation:n,className:vn("flex touch-none select-none p-px transition-colors","vertical"===n&&"h-full w-2.5 border-l border-l-transparent","horizontal"===n&&"h-2.5 flex-col border-t border-t-transparent",t),...r,children:e(UU,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}var cV=[" ","Enter","ArrowUp","ArrowDown"],uV=[" ","Enter"],dV="Select",[fV,pV,mV]=ee(dV),[hV]=H(dV,[mV,iT]),gV=iT(),[vV,yV]=hV(dV),[bV,wV]=hV(dV),xV=t=>{const{__scopeSelect:o,children:a,open:i,defaultOpen:s,onOpenChange:l,value:c,defaultValue:u,onValueChange:d,dir:f,name:p,autoComplete:m,disabled:h,required:g,form:v}=t,y=gV(o),[b,w]=r.useState(null),[x,k]=r.useState(null),[N,S]=r.useState(!1),C=Ee(f),[_,M]=oe({prop:i,defaultProp:s??!1,onChange:l,caller:dV}),[E,O]=oe({prop:c,defaultProp:u,onChange:d,caller:dV}),D=r.useRef(null),P=!b||(v||!!b.closest("form")),[T,A]=r.useState(new Set),R=Array.from(T).map(e=>e.props.value).join(";");return e(kT,{...y,children:n(vV,{required:g,scope:o,trigger:b,onTriggerChange:w,valueNode:x,onValueNodeChange:k,valueNodeHasChildren:N,onValueNodeHasChildrenChange:S,contentId:de(),value:E,onValueChange:O,open:_,onOpenChange:M,dir:C,triggerPointerDownPosRef:D,disabled:h,children:[e(fV.Provider,{scope:o,children:e(bV,{scope:t.__scopeSelect,onNativeOptionAdd:r.useCallback(e=>{A(t=>new Set(t).add(e))},[]),onNativeOptionRemove:r.useCallback(e=>{A(t=>{const n=new Set(t);return n.delete(e),n})},[]),children:a})}),P?n(cY,{"aria-hidden":!0,required:g,tabIndex:-1,name:p,autoComplete:m,value:E,onChange:e=>O(e.target.value),disabled:h,form:v,children:[void 0===E?e("option",{value:""}):null,Array.from(T)]},R):null]})})};xV.displayName=dV;var kV="SelectTrigger",NV=r.forwardRef((t,n)=>{const{__scopeSelect:o,disabled:a=!1,...i}=t,s=gV(o),l=yV(kV,o),c=l.disabled||a,u=K(n,l.onTriggerChange),d=pV(o),f=r.useRef("touch"),[p,m,h]=dY(e=>{const t=d().filter(e=>!e.disabled),n=t.find(e=>e.value===l.value),r=fY(t,e,n);void 0!==r&&l.onValueChange(r.value)}),g=e=>{c||(l.onOpenChange(!0),h()),e&&(l.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return e(NT,{asChild:!0,...s,children:e(ae.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":uY(l.value)?"":void 0,...i,ref:u,onClick:te(i.onClick,e=>{e.currentTarget.focus(),"mouse"!==f.current&&g(e)}),onPointerDown:te(i.onPointerDown,e=>{f.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(g(e),e.preventDefault())}),onKeyDown:te(i.onKeyDown,e=>{const t=""!==p.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||m(e.key),t&&" "===e.key||cV.includes(e.key)&&(g(),e.preventDefault())})})})});NV.displayName=kV;var SV="SelectValue",CV=r.forwardRef((n,r)=>{const{__scopeSelect:o,className:a,style:i,children:s,placeholder:l="",...c}=n,u=yV(SV,o),{onValueNodeHasChildrenChange:d}=u,f=void 0!==s,p=K(r,u.onValueNodeChange);return ne(()=>{d(f)},[d,f]),e(ae.span,{...c,ref:p,style:{pointerEvents:"none"},children:uY(u.value)?e(t,{children:l}):s})});CV.displayName=SV;var _V=r.forwardRef((t,n)=>{const{__scopeSelect:r,children:o,...a}=t;return e(ae.span,{"aria-hidden":!0,...a,ref:n,children:o||"▼"})});_V.displayName="SelectIcon";var MV=t=>e(Gn,{asChild:!0,...t});MV.displayName="SelectPortal";var EV="SelectContent",OV=r.forwardRef((t,n)=>{const o=yV(EV,t.__scopeSelect),[a,i]=r.useState();if(ne(()=>{i(new DocumentFragment)},[]),!o.open){const n=a;return n?b.createPortal(e(PV,{scope:t.__scopeSelect,children:e(fV.Slot,{scope:t.__scopeSelect,children:e("div",{children:t.children})})}),n):null}return e(RV,{...t,ref:n})});OV.displayName=EV;var DV=10,[PV,TV]=hV(EV),AV=q("SelectContent.RemoveScroll"),RV=r.forwardRef((t,n)=>{const{__scopeSelect:o,position:a="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:l,side:c,sideOffset:u,align:d,alignOffset:f,arrowPadding:p,collisionBoundary:m,collisionPadding:h,sticky:g,hideWhenDetached:v,avoidCollisions:y,...b}=t,w=yV(EV,o),[x,k]=r.useState(null),[N,S]=r.useState(null),C=K(n,e=>k(e)),[_,M]=r.useState(null),[E,O]=r.useState(null),D=pV(o),[P,T]=r.useState(!1),A=r.useRef(!1);r.useEffect(()=>{if(x)return Yr(x)},[x]),Zn();const R=r.useCallback(e=>{const[t,...n]=D().map(e=>e.ref.current),[r]=n.slice(-1),o=document.activeElement;for(const n of e){if(n===o)return;if(n?.scrollIntoView({block:"nearest"}),n===t&&N&&(N.scrollTop=0),n===r&&N&&(N.scrollTop=N.scrollHeight),n?.focus(),document.activeElement!==o)return}},[D,N]),I=r.useCallback(()=>R([_,x]),[R,_,x]);r.useEffect(()=>{P&&I()},[P,I]);const{onOpenChange:j,triggerPointerDownPosRef:z}=w;r.useEffect(()=>{if(x){let e={x:0,y:0};const t=t=>{e={x:Math.abs(Math.round(t.pageX)-(z.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(z.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():x.contains(n.target)||j(!1),document.removeEventListener("pointermove",t),z.current=null};return null!==z.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[x,j,z]),r.useEffect(()=>{const e=()=>j(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[j]);const[L,F]=dY(e=>{const t=D().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),r=fY(t,e,n);r&&setTimeout(()=>r.ref.current.focus())}),B=r.useCallback((e,t,n)=>{const r=!A.current&&!n;(void 0!==w.value&&w.value===t||r)&&(M(e),r&&(A.current=!0))},[w.value]),$=r.useCallback(()=>x?.focus(),[x]),W=r.useCallback((e,t,n)=>{const r=!A.current&&!n;(void 0!==w.value&&w.value===t||r)&&O(e)},[w.value]),H="popper"===a?jV:IV,U=H===jV?{side:c,sideOffset:u,align:d,alignOffset:f,arrowPadding:p,collisionBoundary:m,collisionPadding:h,sticky:g,hideWhenDetached:v,avoidCollisions:y}:{};return e(PV,{scope:o,content:x,viewport:N,onViewportChange:S,itemRefCallback:B,selectedItem:_,onItemLeave:$,itemTextRefCallback:W,focusSelectedItem:I,selectedItemText:E,position:a,isPositioned:P,searchRef:L,children:e(Fr,{as:AV,allowPinchZoom:!0,children:e(Wn,{asChild:!0,trapped:w.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:te(i,e=>{w.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:e(In,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:e(H,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:e=>e.preventDefault(),...b,...U,onPlaced:()=>T(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:te(b.onKeyDown,e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||F(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=D().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>R(t)),e.preventDefault()}})})})})})})});RV.displayName="SelectContentImpl";var IV=r.forwardRef((t,n)=>{const{__scopeSelect:o,onPlaced:a,...i}=t,s=yV(EV,o),l=TV(EV,o),[c,u]=r.useState(null),[d,f]=r.useState(null),p=K(n,e=>f(e)),m=pV(o),h=r.useRef(!1),g=r.useRef(!0),{viewport:v,selectedItem:y,selectedItemText:b,focusSelectedItem:w}=l,x=r.useCallback(()=>{if(s.trigger&&s.valueNode&&c&&d&&v&&y&&b){const e=s.trigger.getBoundingClientRect(),t=d.getBoundingClientRect(),n=s.valueNode.getBoundingClientRect(),r=b.getBoundingClientRect();if("rtl"!==s.dir){const o=r.left-t.left,a=n.left-o,i=e.left-a,s=e.width+i,l=Math.max(s,t.width),u=window.innerWidth-DV,d=SU(a,[DV,Math.max(DV,u-l)]);c.style.minWidth=s+"px",c.style.left=d+"px"}else{const o=t.right-r.right,a=window.innerWidth-n.right-o,i=window.innerWidth-e.right-a,s=e.width+i,l=Math.max(s,t.width),u=window.innerWidth-DV,d=SU(a,[DV,Math.max(DV,u-l)]);c.style.minWidth=s+"px",c.style.right=d+"px"}const o=m(),i=window.innerHeight-2*DV,l=v.scrollHeight,u=window.getComputedStyle(d),f=parseInt(u.borderTopWidth,10),p=parseInt(u.paddingTop,10),g=parseInt(u.borderBottomWidth,10),w=f+p+l+parseInt(u.paddingBottom,10)+g,x=Math.min(5*y.offsetHeight,w),k=window.getComputedStyle(v),N=parseInt(k.paddingTop,10),S=parseInt(k.paddingBottom,10),C=e.top+e.height/2-DV,_=i-C,M=y.offsetHeight/2,E=f+p+(y.offsetTop+M),O=w-E;if(E<=C){const e=o.length>0&&y===o[o.length-1].ref.current;c.style.bottom="0px";const t=d.clientHeight-v.offsetTop-v.offsetHeight,n=E+Math.max(_,M+(e?S:0)+t+g);c.style.height=n+"px"}else{const e=o.length>0&&y===o[0].ref.current;c.style.top="0px";const t=Math.max(C,f+v.offsetTop+(e?N:0)+M)+O;c.style.height=t+"px",v.scrollTop=E-C+v.offsetTop}c.style.margin=`${DV}px 0`,c.style.minHeight=x+"px",c.style.maxHeight=i+"px",a?.(),requestAnimationFrame(()=>h.current=!0)}},[m,s.trigger,s.valueNode,c,d,v,y,b,s.dir,a]);ne(()=>x(),[x]);const[k,N]=r.useState();ne(()=>{d&&N(window.getComputedStyle(d).zIndex)},[d]);const S=r.useCallback(e=>{e&&!0===g.current&&(x(),w?.(),g.current=!1)},[x,w]);return e(zV,{scope:o,contentWrapper:c,shouldExpandOnScrollRef:h,onScrollButtonChange:S,children:e("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:e(ae.div,{...i,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});IV.displayName="SelectItemAlignedPosition";var jV=r.forwardRef((t,n)=>{const{__scopeSelect:r,align:o="start",collisionPadding:a=DV,...i}=t,s=gV(r);return e(ST,{...s,...i,ref:n,align:o,collisionPadding:a,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)"}})});jV.displayName="SelectPopperPosition";var[zV,LV]=hV(EV,{}),FV="SelectViewport",BV=r.forwardRef((o,a)=>{const{__scopeSelect:i,nonce:s,...l}=o,c=TV(FV,i),u=LV(FV,i),d=K(a,c.onViewportChange),f=r.useRef(0);return n(t,{children:[e("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:s}),e(fV.Slot,{scope:i,children:e(ae.div,{"data-radix-select-viewport":"",role:"presentation",...l,ref:d,style:{position:"relative",flex:1,overflow:"hidden auto",...l.style},onScroll:te(l.onScroll,e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=u;if(r?.current&&n){const e=Math.abs(f.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*DV,o=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),i=Math.max(o,a);if(i<r){const o=i+e,a=Math.min(r,o),s=o-a;n.style.height=a+"px","0px"===n.style.bottom&&(t.scrollTop=s>0?s:0,n.style.justifyContent="flex-end")}}}f.current=t.scrollTop})})})]})});BV.displayName=FV;var $V="SelectGroup",[WV,HV]=hV($V),UV=r.forwardRef((t,n)=>{const{__scopeSelect:r,...o}=t,a=de();return e(WV,{scope:r,id:a,children:e(ae.div,{role:"group","aria-labelledby":a,...o,ref:n})})});UV.displayName=$V;var VV="SelectLabel",YV=r.forwardRef((t,n)=>{const{__scopeSelect:r,...o}=t,a=HV(VV,r);return e(ae.div,{id:a.id,...o,ref:n})});YV.displayName=VV;var KV="SelectItem",[qV,GV]=hV(KV),XV=r.forwardRef((t,n)=>{const{__scopeSelect:o,value:a,disabled:i=!1,textValue:s,...l}=t,c=yV(KV,o),u=TV(KV,o),d=c.value===a,[f,p]=r.useState(s??""),[m,h]=r.useState(!1),g=K(n,e=>u.itemRefCallback?.(e,a,i)),v=de(),y=r.useRef("touch"),b=()=>{i||(c.onValueChange(a),c.onOpenChange(!1))};if(""===a)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 e(qV,{scope:o,value:a,disabled:i,textId:v,isSelected:d,onItemTextChange:r.useCallback(e=>{p(t=>t||(e?.textContent??"").trim())},[]),children:e(fV.ItemSlot,{scope:o,value:a,disabled:i,textValue:f,children:e(ae.div,{role:"option","aria-labelledby":v,"data-highlighted":m?"":void 0,"aria-selected":d&&m,"data-state":d?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...l,ref:g,onFocus:te(l.onFocus,()=>h(!0)),onBlur:te(l.onBlur,()=>h(!1)),onClick:te(l.onClick,()=>{"mouse"!==y.current&&b()}),onPointerUp:te(l.onPointerUp,()=>{"mouse"===y.current&&b()}),onPointerDown:te(l.onPointerDown,e=>{y.current=e.pointerType}),onPointerMove:te(l.onPointerMove,e=>{y.current=e.pointerType,i?u.onItemLeave?.():"mouse"===y.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:te(l.onPointerLeave,e=>{e.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:te(l.onKeyDown,e=>{""!==u.searchRef?.current&&" "===e.key||(uV.includes(e.key)&&b()," "===e.key&&e.preventDefault())})})})})});XV.displayName=KV;var ZV="SelectItemText",QV=r.forwardRef((o,a)=>{const{__scopeSelect:i,className:s,style:l,...c}=o,u=yV(ZV,i),d=TV(ZV,i),f=GV(ZV,i),p=wV(ZV,i),[m,h]=r.useState(null),g=K(a,e=>h(e),f.onItemTextChange,e=>d.itemTextRefCallback?.(e,f.value,f.disabled)),v=m?.textContent,y=r.useMemo(()=>e("option",{value:f.value,disabled:f.disabled,children:v},f.value),[f.disabled,f.value,v]),{onNativeOptionAdd:w,onNativeOptionRemove:x}=p;return ne(()=>(w(y),()=>x(y)),[w,x,y]),n(t,{children:[e(ae.span,{id:f.textId,...c,ref:g}),f.isSelected&&u.valueNode&&!u.valueNodeHasChildren?b.createPortal(c.children,u.valueNode):null]})});QV.displayName=ZV;var JV="SelectItemIndicator",eY=r.forwardRef((t,n)=>{const{__scopeSelect:r,...o}=t;return GV(JV,r).isSelected?e(ae.span,{"aria-hidden":!0,...o,ref:n}):null});eY.displayName=JV;var tY="SelectScrollUpButton",nY=r.forwardRef((t,n)=>{const o=TV(tY,t.__scopeSelect),a=LV(tY,t.__scopeSelect),[i,s]=r.useState(!1),l=K(n,a.onScrollButtonChange);return ne(()=>{if(o.viewport&&o.isPositioned){let e=function(){const e=t.scrollTop>0;s(e)};const t=o.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[o.viewport,o.isPositioned]),i?e(aY,{...t,ref:l,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=o;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});nY.displayName=tY;var rY="SelectScrollDownButton",oY=r.forwardRef((t,n)=>{const o=TV(rY,t.__scopeSelect),a=LV(rY,t.__scopeSelect),[i,s]=r.useState(!1),l=K(n,a.onScrollButtonChange);return ne(()=>{if(o.viewport&&o.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;s(n)};const t=o.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[o.viewport,o.isPositioned]),i?e(aY,{...t,ref:l,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=o;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});oY.displayName=rY;var aY=r.forwardRef((t,n)=>{const{__scopeSelect:o,onAutoScroll:a,...i}=t,s=TV("SelectScrollButton",o),l=r.useRef(null),c=pV(o),u=r.useCallback(()=>{null!==l.current&&(window.clearInterval(l.current),l.current=null)},[]);return r.useEffect(()=>()=>u(),[u]),ne(()=>{const e=c().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[c]),e(ae.div,{"aria-hidden":!0,...i,ref:n,style:{flexShrink:0,...i.style},onPointerDown:te(i.onPointerDown,()=>{null===l.current&&(l.current=window.setInterval(a,50))}),onPointerMove:te(i.onPointerMove,()=>{s.onItemLeave?.(),null===l.current&&(l.current=window.setInterval(a,50))}),onPointerLeave:te(i.onPointerLeave,()=>{u()})})}),iY=r.forwardRef((t,n)=>{const{__scopeSelect:r,...o}=t;return e(ae.div,{"aria-hidden":!0,...o,ref:n})});iY.displayName="SelectSeparator";var sY="SelectArrow",lY=r.forwardRef((t,n)=>{const{__scopeSelect:r,...o}=t,a=gV(r),i=yV(sY,r),s=TV(sY,r);return i.open&&"popper"===s.position?e(CT,{...a,...o,ref:n}):null});lY.displayName=sY;var cY=r.forwardRef(({__scopeSelect:t,value:n,...o},a)=>{const i=r.useRef(null),s=K(a,i),l=$E(n);return r.useEffect(()=>{const e=i.current;if(!e)return;const t=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(l!==n&&r){const t=new Event("change",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}},[l,n]),e(ae.select,{...o,style:{...tB,...o.style},ref:s,defaultValue:n})});function uY(e){return""===e||void 0===e}function dY(e){const t=On(e),n=r.useRef(""),o=r.useRef(0),a=r.useCallback(e=>{const r=n.current+e;t(r),function e(t){n.current=t,window.clearTimeout(o.current),""!==t&&(o.current=window.setTimeout(()=>e(""),1e3))}(r)},[t]),i=r.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return r.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,a,i]}function fY(e,t,n){const r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=function(e,t){return e.map((n,r)=>e[(t+r)%e.length])}(e,Math.max(o,0));1===r.length&&(a=a.filter(e=>e!==n));const i=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return i!==n?i:void 0}cY.displayName="SelectBubbleInput";var pY=xV,mY=NV,hY=CV,gY=_V,vY=MV,yY=OV,bY=BV,wY=UV,xY=YV,kY=XV,NY=QV,SY=eY,CY=nY,_Y=oY,MY=iY;function EY({...t}){return e(pY,{"data-slot":"select",...t})}function OY({...t}){return e(wY,{"data-slot":"select-group",...t})}function DY({...t}){return e(hY,{"data-slot":"select-value",...t})}function PY({className:t,size:r="default",children:o,...a}){return n(mY,{"data-slot":"select-trigger","data-size":r,className:vn("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 shadow-xs flex w-fit items-center justify-between gap-2 whitespace-nowrap rounded-md border bg-transparent px-3 py-2 text-sm outline-none transition-[color,box-shadow] focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",t),...a,children:[o,e(gY,{asChild:!0,children:e(k,{className:"size-4 opacity-50"})})]})}function TY({className:t,children:r,position:o="popper",align:a="center",...i}){return e(vY,{children:n(yY,{"data-slot":"select-content",className:vn("bg-popover text-popover-foreground 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 max-h-(--radix-select-content-available-height) origin-(--radix-select-content-transform-origin) relative z-50 min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border shadow-md","popper"===o&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:o,align:a,...i,children:[e(jY,{}),e(bY,{className:vn("p-1","popper"===o&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:r}),e(zY,{})]})})}function AY({className:t,...n}){return e(xY,{"data-slot":"select-label",className:vn("text-muted-foreground px-2 py-1.5 text-xs",t),...n})}function RY({className:t,children:r,...o}){return n(kY,{"data-slot":"select-item",className:vn("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground outline-hidden *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 relative flex w-full cursor-default select-none items-center gap-2 rounded-sm py-1.5 pl-2 pr-8 text-sm data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",t),...o,children:[e("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:e(SY,{children:e(O,{className:"size-4"})})}),e(NY,{children:r})]})}function IY({className:t,...n}){return e(MY,{"data-slot":"select-separator",className:vn("bg-border pointer-events-none -mx-1 my-1 h-px",t),...n})}function jY({className:t,...n}){return e(CY,{"data-slot":"select-scroll-up-button",className:vn("flex cursor-default items-center justify-center py-1",t),...n,children:e(j,{className:"size-4"})})}function zY({className:t,...n}){return e(_Y,{"data-slot":"select-scroll-down-button",className:vn("flex cursor-default items-center justify-center py-1",t),...n,children:e(k,{className:"size-4"})})}function LY({...t}){return e(Mo,{"data-slot":"sheet",...t})}function FY({...t}){return e(Eo,{"data-slot":"sheet-trigger",...t})}function BY({...t}){return e(Ro,{"data-slot":"sheet-close",...t})}function $Y({...t}){return e(Oo,{"data-slot":"sheet-portal",...t})}function WY({className:t,...n}){return e(Do,{"data-slot":"sheet-overlay",className:vn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...n})}function HY({className:t,children:r,side:o="right",...a}){return n($Y,{children:[e(WY,{}),n(Po,{"data-slot":"sheet-content",className:vn("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500","right"===o&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm","left"===o&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm","top"===o&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b","bottom"===o&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",t),...a,children:[r,n(Ro,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary rounded-xs focus:outline-hidden absolute right-4 top-4 opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none",children:[e(D,{className:"size-4"}),e("span",{className:"sr-only",children:"Close"})]})]})]})}function UY({className:t,...n}){return e("div",{"data-slot":"sheet-header",className:vn("flex flex-col gap-1.5 p-4",t),...n})}function VY({className:t,...n}){return e("div",{"data-slot":"sheet-footer",className:vn("mt-auto flex flex-col gap-2 p-4",t),...n})}function YY({className:t,...n}){return e(To,{"data-slot":"sheet-title",className:vn("text-foreground font-semibold",t),...n})}function KY({className:t,...n}){return e(Ao,{"data-slot":"sheet-description",className:vn("text-muted-foreground text-sm",t),...n})}function qY({className:t,...n}){return e("div",{"data-slot":"skeleton",className:vn("bg-accent animate-pulse rounded-md",t),...n})}var[GY]=H("Tooltip",[iT]),XY=iT(),ZY="TooltipProvider",QY=700,JY="tooltip.open",[eK,tK]=GY(ZY),nK=t=>{const{__scopeTooltip:n,delayDuration:o=QY,skipDelayDuration:a=300,disableHoverableContent:i=!1,children:s}=t,l=r.useRef(!0),c=r.useRef(!1),u=r.useRef(0);return r.useEffect(()=>{const e=u.current;return()=>window.clearTimeout(e)},[]),e(eK,{scope:n,isOpenDelayedRef:l,delayDuration:o,onOpen:r.useCallback(()=>{window.clearTimeout(u.current),l.current=!1},[]),onClose:r.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>l.current=!0,a)},[a]),isPointerInTransitRef:c,onPointerInTransitChange:r.useCallback(e=>{c.current=e},[]),disableHoverableContent:i,children:s})};nK.displayName=ZY;var rK="Tooltip",[oK,aK]=GY(rK),iK=t=>{const{__scopeTooltip:n,children:o,open:a,defaultOpen:i,onOpenChange:s,disableHoverableContent:l,delayDuration:c}=t,u=tK(rK,t.__scopeTooltip),d=XY(n),[f,p]=r.useState(null),m=de(),h=r.useRef(0),g=l??u.disableHoverableContent,v=c??u.delayDuration,y=r.useRef(!1),[b,w]=oe({prop:a,defaultProp:i??!1,onChange:e=>{e?(u.onOpen(),document.dispatchEvent(new CustomEvent(JY))):u.onClose(),s?.(e)},caller:rK}),x=r.useMemo(()=>b?y.current?"delayed-open":"instant-open":"closed",[b]),k=r.useCallback(()=>{window.clearTimeout(h.current),h.current=0,y.current=!1,w(!0)},[w]),N=r.useCallback(()=>{window.clearTimeout(h.current),h.current=0,w(!1)},[w]),S=r.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{y.current=!0,w(!0),h.current=0},v)},[v,w]);return r.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),e(kT,{...d,children:e(oK,{scope:n,contentId:m,open:b,stateAttribute:x,trigger:f,onTriggerChange:p,onTriggerEnter:r.useCallback(()=>{u.isOpenDelayedRef.current?S():k()},[u.isOpenDelayedRef,S,k]),onTriggerLeave:r.useCallback(()=>{g?N():(window.clearTimeout(h.current),h.current=0)},[N,g]),onOpen:k,onClose:N,disableHoverableContent:g,children:o})})};iK.displayName=rK;var sK="TooltipTrigger",lK=r.forwardRef((t,n)=>{const{__scopeTooltip:o,...a}=t,i=aK(sK,o),s=tK(sK,o),l=XY(o),c=K(n,r.useRef(null),i.onTriggerChange),u=r.useRef(!1),d=r.useRef(!1),f=r.useCallback(()=>u.current=!1,[]);return r.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),e(NT,{asChild:!0,...l,children:e(ae.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...a,ref:c,onPointerMove:te(t.onPointerMove,e=>{"touch"!==e.pointerType&&(d.current||s.isPointerInTransitRef.current||(i.onTriggerEnter(),d.current=!0))}),onPointerLeave:te(t.onPointerLeave,()=>{i.onTriggerLeave(),d.current=!1}),onPointerDown:te(t.onPointerDown,()=>{i.open&&i.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:te(t.onFocus,()=>{u.current||i.onOpen()}),onBlur:te(t.onBlur,i.onClose),onClick:te(t.onClick,i.onClose)})})});lK.displayName=sK;var cK="TooltipPortal",[uK,dK]=GY(cK,{forceMount:void 0}),fK=t=>{const{__scopeTooltip:n,forceMount:r,children:o,container:a}=t,i=aK(cK,n);return e(uK,{scope:n,forceMount:r,children:e(se,{present:r||i.open,children:e(Gn,{asChild:!0,container:a,children:o})})})};fK.displayName=cK;var pK="TooltipContent",mK=r.forwardRef((t,n)=>{const r=dK(pK,t.__scopeTooltip),{forceMount:o=r.forceMount,side:a="top",...i}=t,s=aK(pK,t.__scopeTooltip);return e(se,{present:o||s.open,children:s.disableHoverableContent?e(bK,{side:a,...i,ref:n}):e(hK,{side:a,...i,ref:n})})}),hK=r.forwardRef((t,n)=>{const o=aK(pK,t.__scopeTooltip),a=tK(pK,t.__scopeTooltip),i=r.useRef(null),s=K(n,i),[l,c]=r.useState(null),{trigger:u,onClose:d}=o,f=i.current,{onPointerInTransitChange:p}=a,m=r.useCallback(()=>{c(null),p(!1)},[p]),h=r.useCallback((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},o=function(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}(r,n.getBoundingClientRect()),a=function(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}(r,o),i=function(e){const t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0),function(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const r=e[n];for(;t.length>=2;){const e=t[t.length-1],n=t[t.length-2];if(!((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x)))break;t.pop()}t.push(r)}t.pop();const n=[];for(let t=e.length-1;t>=0;t--){const r=e[t];for(;n.length>=2;){const e=n[n.length-1],t=n[n.length-2];if(!((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x)))break;n.pop()}n.push(r)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}(t)}([...a,...function(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}(t.getBoundingClientRect())]);c(i),p(!0)},[p]);return r.useEffect(()=>()=>m(),[m]),r.useEffect(()=>{if(u&&f){const e=e=>h(e,f),t=e=>h(e,u);return u.addEventListener("pointerleave",e),f.addEventListener("pointerleave",t),()=>{u.removeEventListener("pointerleave",e),f.removeEventListener("pointerleave",t)}}},[u,f,h,m]),r.useEffect(()=>{if(l){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=u?.contains(t)||f?.contains(t),o=!function(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){const i=t[e],s=t[a],l=i.x,c=i.y,u=s.x,d=s.y;c>r!=d>r&&n<(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}(n,l);r?m():o&&(m(),d())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[u,f,l,d,m]),e(bK,{...t,ref:s})}),[gK,vK]=GY(rK,{isInside:!1}),yK=Q("TooltipContent"),bK=r.forwardRef((t,o)=>{const{__scopeTooltip:a,children:i,"aria-label":s,onEscapeKeyDown:l,onPointerDownOutside:c,...u}=t,d=aK(pK,a),f=XY(a),{onClose:p}=d;return r.useEffect(()=>(document.addEventListener(JY,p),()=>document.removeEventListener(JY,p)),[p]),r.useEffect(()=>{if(d.trigger){const e=e=>{const t=e.target;t?.contains(d.trigger)&&p()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[d.trigger,p]),e(In,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:e=>e.preventDefault(),onDismiss:p,children:n(ST,{"data-state":d.stateAttribute,...f,...u,ref:o,style:{...u.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:[e(yK,{children:i}),e(gK,{scope:a,isInside:!0,children:e(rB,{id:d.contentId,role:"tooltip",children:s||i})})]})})});mK.displayName=pK;var wK="TooltipArrow",xK=r.forwardRef((t,n)=>{const{__scopeTooltip:r,...o}=t,a=XY(r);return vK(wK,r).isInside?null:e(CT,{...a,...o,ref:n})});xK.displayName=wK;var kK=nK,NK=iK,SK=lK,CK=fK,_K=mK,MK=xK;function EK({delayDuration:t=0,...n}){return e(kK,{"data-slot":"tooltip-provider",delayDuration:t,...n})}function OK({...t}){return e(EK,{children:e(NK,{"data-slot":"tooltip",...t})})}function DK({...t}){return e(SK,{"data-slot":"tooltip-trigger",...t})}function PK({className:t,sideOffset:r=0,children:o,...a}){return e(CK,{children:n(_K,{"data-slot":"tooltip-content",sideOffset:r,className:vn("bg-foreground text-background 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 origin-(--radix-tooltip-content-transform-origin) z-50 w-fit text-balance rounded-md px-3 py-1.5 text-xs",t),...a,children:[o,e(MK,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const TK=r.createContext(null);function AK(){const e=r.useContext(TK);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function RK({defaultOpen:t=!0,open:n,onOpenChange:o,className:a,style:i,children:s,...l}){const c=function(){const[e,t]=r.useState(void 0);return r.useEffect(()=>{const e=window.matchMedia("(max-width: 767px)"),n=()=>{t(window.innerWidth<768)};return e.addEventListener("change",n),t(window.innerWidth<768),()=>e.removeEventListener("change",n)},[]),!!e}(),[u,d]=r.useState(!1),[f,p]=r.useState(t),m=n??f,h=r.useCallback(e=>{const t="function"==typeof e?e(m):e;o?o(t):p(t),document.cookie=`sidebar_state=${t}; path=/; max-age=604800`},[o,m]),g=r.useCallback(()=>c?d(e=>!e):h(e=>!e),[c,h,d]);r.useEffect(()=>{const e=e=>{"b"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),g())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[g]);const v=m?"expanded":"collapsed",y=r.useMemo(()=>({state:v,open:m,setOpen:h,isMobile:c,openMobile:u,setOpenMobile:d,toggleSidebar:g}),[v,m,h,c,u,d,g]);return e(TK.Provider,{value:y,children:e(EK,{delayDuration:0,children:e("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":"16rem","--sidebar-width-icon":"3rem",...i},className:vn("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",a),...l,children:s})})})}function IK({side:t="left",variant:r="sidebar",collapsible:o="offcanvas",className:a,children:i,...s}){const{isMobile:l,state:c,openMobile:u,setOpenMobile:d}=AK();return"none"===o?e("div",{"data-slot":"sidebar",className:vn("bg-sidebar text-sidebar-foreground w-(--sidebar-width) flex h-full flex-col",a),...s,children:i}):l?e(LY,{open:u,onOpenChange:d,...s,children:n(HY,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":"18rem"},side:t,children:[n(UY,{className:"sr-only",children:[e(YY,{children:"Sidebar"}),e(KY,{children:"Displays the mobile sidebar."})]}),e("div",{className:"flex h-full w-full flex-col",children:i})]})}):n("div",{className:"text-sidebar-foreground group peer hidden md:block","data-state":c,"data-collapsible":"collapsed"===c?o:"","data-variant":r,"data-side":t,"data-slot":"sidebar",children:[e("div",{"data-slot":"sidebar-gap",className:vn("w-(--sidebar-width) relative bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180","floating"===r||"inset"===r?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),e("div",{"data-slot":"sidebar-container",className:vn("w-(--sidebar-width) fixed inset-y-0 z-10 hidden h-svh transition-[left,right,width] duration-200 ease-linear md:flex","left"===t?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]","floating"===r||"inset"===r?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",a),...s,children:e("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:i})})]})}function jK({className:t,onClick:r,...o}){const{toggleSidebar:a}=AK();return n(da,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:vn("size-7",t),onClick:e=>{r?.(e),a()},...o,children:[e(z,{}),e("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function zK({className:t,...n}){const{toggleSidebar:r}=AK();return e("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:vn("hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",t),...n})}function LK({className:t,...n}){return e("main",{"data-slot":"sidebar-inset",className:vn("bg-background relative flex w-full flex-1 flex-col","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm",t),...n})}function FK({className:t,...n}){return e(aL,{"data-slot":"sidebar-input","data-sidebar":"input",className:vn("bg-background h-8 w-full shadow-none",t),...n})}function BK({className:t,...n}){return e("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:vn("flex flex-col gap-2 p-2",t),...n})}function $K({className:t,...n}){return e("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:vn("flex flex-col gap-2 p-2",t),...n})}function WK({className:t,...n}){return e(di,{"data-slot":"sidebar-separator","data-sidebar":"separator",className:vn("bg-sidebar-border mx-2 w-auto",t),...n})}function HK({className:t,...n}){return e("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:vn("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t),...n})}function UK({className:t,...n}){return e("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:vn("relative flex w-full min-w-0 flex-col p-2",t),...n})}function VK({className:t,asChild:n=!1,...r}){return e(n?G:"div",{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:vn("text-sidebar-foreground/70 ring-sidebar-ring outline-hidden flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",t),...r})}function YK({className:t,asChild:n=!1,...r}){return e(n?G:"button",{"data-slot":"sidebar-group-action","data-sidebar":"group-action",className:vn("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground outline-hidden absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","group-data-[collapsible=icon]:hidden",t),...r})}function KK({className:t,...n}){return e("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:vn("w-full text-sm",t),...n})}function qK({className:t,...n}){return e("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:vn("flex w-full min-w-0 flex-col gap-1",t),...n})}function GK({className:t,...n}){return e("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:vn("group/menu-item relative",t),...n})}const XK=Sn("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function ZK({asChild:t=!1,isActive:r=!1,variant:o="default",size:a="default",tooltip:i,className:s,...l}){const c=t?G:"button",{isMobile:u,state:d}=AK(),f=e(c,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":a,"data-active":r,className:vn(XK({variant:o,size:a}),s),...l});return i?("string"==typeof i&&(i={children:i}),n(OK,{children:[e(DK,{asChild:!0,children:f}),e(PK,{side:"right",align:"center",hidden:"collapsed"!==d||u,...i})]})):f}function QK({className:t,asChild:n=!1,showOnHover:r=!1,...o}){return e(n?G:"button",{"data-slot":"sidebar-menu-action","data-sidebar":"menu-action",className:vn("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground outline-hidden absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",r&&"peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0",t),...o})}function JK({className:t,...n}){return e("div",{"data-slot":"sidebar-menu-badge","data-sidebar":"menu-badge",className:vn("text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",t),...n})}function eq({className:t,showIcon:o=!1,...a}){const i=r.useMemo(()=>`${Math.floor(40*Math.random())+50}%`,[]);return n("div",{"data-slot":"sidebar-menu-skeleton","data-sidebar":"menu-skeleton",className:vn("flex h-8 items-center gap-2 rounded-md px-2",t),...a,children:[o&&e(qY,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),e(qY,{className:"max-w-(--skeleton-width) h-4 flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":i}})]})}function tq({className:t,...n}){return e("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:vn("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",t),...n})}function nq({className:t,...n}){return e("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:vn("group/menu-sub-item relative",t),...n})}function rq({asChild:t=!1,size:n="md",isActive:r=!1,className:o,...a}){return e(t?G:"a",{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button","data-size":n,"data-active":r,className:vn("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground outline-hidden flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground","sm"===n&&"text-xs","md"===n&&"text-sm","group-data-[collapsible=icon]:hidden",o),...a})}var oq=["PageUp","PageDown"],aq=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],iq={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},sq="Slider",[lq,cq,uq]=ee(sq),[dq]=H(sq,[uq]),[fq,pq]=dq(sq),mq=r.forwardRef((t,n)=>{const{name:o,min:a=0,max:i=100,step:s=1,orientation:l="horizontal",disabled:c=!1,minStepsBetweenThumbs:u=0,defaultValue:d=[a],value:f,onValueChange:p=()=>{},onValueCommit:m=()=>{},inverted:h=!1,form:g,...v}=t,y=r.useRef(new Set),b=r.useRef(0),w="horizontal"===l?vq:yq,[x=[],k]=oe({prop:f,defaultProp:d,onChange:e=>{const t=[...y.current];t[b.current]?.focus(),p(e)}}),N=r.useRef(x);function S(e,t,{commit:n}={commit:!1}){const r=function(e){return(String(e).split(".")[1]||"").length}(s),o=function(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}(Math.round((e-a)/s)*s+a,r),l=SU(o,[a,i]);k((e=[])=>{const r=function(e=[],t,n){const r=[...e];return r[n]=t,r.sort((e,t)=>e-t)}(e,l,t);if(function(e,t){if(t>0){const n=function(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}(e);return Math.min(...n)>=t}return!0}(r,u*s)){b.current=r.indexOf(l);const t=String(r)!==String(e);return t&&n&&m(r),t?r:e}return e})}return e(fq,{scope:t.__scopeSlider,name:o,disabled:c,min:a,max:i,valueIndexToChangeRef:b,thumbs:y.current,values:x,orientation:l,form:g,children:e(lq.Provider,{scope:t.__scopeSlider,children:e(lq.Slot,{scope:t.__scopeSlider,children:e(w,{"aria-disabled":c,"data-disabled":c?"":void 0,...v,ref:n,onPointerDown:te(v.onPointerDown,()=>{c||(N.current=x)}),min:a,max:i,inverted:h,onSlideStart:c?void 0:function(e){const t=function(e,t){if(1===e.length)return 0;const n=e.map(e=>Math.abs(e-t)),r=Math.min(...n);return n.indexOf(r)}(x,e);S(e,t)},onSlideMove:c?void 0:function(e){S(e,b.current)},onSlideEnd:c?void 0:function(){const e=N.current[b.current];x[b.current]!==e&&m(x)},onHomeKeyDown:()=>!c&&S(a,0,{commit:!0}),onEndKeyDown:()=>!c&&S(i,x.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!c){const n=oq.includes(e.key)||e.shiftKey&&aq.includes(e.key)?10:1,r=b.current;S(x[r]+s*n*t,r,{commit:!0})}}})})})})});mq.displayName=sq;var[hq,gq]=dq(sq,{startEdge:"left",endEdge:"right",size:"width",direction:1}),vq=r.forwardRef((t,n)=>{const{min:o,max:a,dir:i,inverted:s,onSlideStart:l,onSlideMove:c,onSlideEnd:u,onStepKeyDown:d,...f}=t,[p,m]=r.useState(null),h=K(n,e=>m(e)),g=r.useRef(void 0),v=Ee(i),y="ltr"===v,b=y&&!s||!y&&s;function w(e){const t=g.current||p.getBoundingClientRect(),n=Oq([0,t.width],b?[o,a]:[a,o]);return g.current=t,n(e-t.left)}return e(hq,{scope:t.__scopeSlider,startEdge:b?"left":"right",endEdge:b?"right":"left",direction:b?1:-1,size:"width",children:e(bq,{dir:v,"data-orientation":"horizontal",...f,ref:h,style:{...f.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{const t=w(e.clientX);l?.(t)},onSlideMove:e=>{const t=w(e.clientX);c?.(t)},onSlideEnd:()=>{g.current=void 0,u?.()},onStepKeyDown:e=>{const t=iq[b?"from-left":"from-right"].includes(e.key);d?.({event:e,direction:t?-1:1})}})})}),yq=r.forwardRef((t,n)=>{const{min:o,max:a,inverted:i,onSlideStart:s,onSlideMove:l,onSlideEnd:c,onStepKeyDown:u,...d}=t,f=r.useRef(null),p=K(n,f),m=r.useRef(void 0),h=!i;function g(e){const t=m.current||f.current.getBoundingClientRect(),n=Oq([0,t.height],h?[a,o]:[o,a]);return m.current=t,n(e-t.top)}return e(hq,{scope:t.__scopeSlider,startEdge:h?"bottom":"top",endEdge:h?"top":"bottom",size:"height",direction:h?1:-1,children:e(bq,{"data-orientation":"vertical",...d,ref:p,style:{...d.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{const t=g(e.clientY);s?.(t)},onSlideMove:e=>{const t=g(e.clientY);l?.(t)},onSlideEnd:()=>{m.current=void 0,c?.()},onStepKeyDown:e=>{const t=iq[h?"from-bottom":"from-top"].includes(e.key);u?.({event:e,direction:t?-1:1})}})})}),bq=r.forwardRef((t,n)=>{const{__scopeSlider:r,onSlideStart:o,onSlideMove:a,onSlideEnd:i,onHomeKeyDown:s,onEndKeyDown:l,onStepKeyDown:c,...u}=t,d=pq(sq,r);return e(ae.span,{...u,ref:n,onKeyDown:te(t.onKeyDown,e=>{"Home"===e.key?(s(e),e.preventDefault()):"End"===e.key?(l(e),e.preventDefault()):oq.concat(aq).includes(e.key)&&(c(e),e.preventDefault())}),onPointerDown:te(t.onPointerDown,e=>{const t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),d.thumbs.has(t)?t.focus():o(e)}),onPointerMove:te(t.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&a(e)}),onPointerUp:te(t.onPointerUp,e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),i(e))})})}),wq="SliderTrack",xq=r.forwardRef((t,n)=>{const{__scopeSlider:r,...o}=t,a=pq(wq,r);return e(ae.span,{"data-disabled":a.disabled?"":void 0,"data-orientation":a.orientation,...o,ref:n})});xq.displayName=wq;var kq="SliderRange",Nq=r.forwardRef((t,n)=>{const{__scopeSlider:o,...a}=t,i=pq(kq,o),s=gq(kq,o),l=K(n,r.useRef(null)),c=i.values.length,u=i.values.map(e=>Eq(e,i.min,i.max)),d=c>1?Math.min(...u):0,f=100-Math.max(...u);return e(ae.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,...a,ref:l,style:{...t.style,[s.startEdge]:d+"%",[s.endEdge]:f+"%"}})});Nq.displayName=kq;var Sq="SliderThumb",Cq=r.forwardRef((t,n)=>{const o=cq(t.__scopeSlider),[a,i]=r.useState(null),s=K(n,e=>i(e)),l=r.useMemo(()=>a?o().findIndex(e=>e.ref.current===a):-1,[o,a]);return e(_q,{...t,ref:s,index:l})}),_q=r.forwardRef((t,o)=>{const{__scopeSlider:a,index:i,name:s,...l}=t,c=pq(Sq,a),u=gq(Sq,a),[d,f]=r.useState(null),p=K(o,e=>f(e)),m=!d||(c.form||!!d.closest("form")),h=WE(d),g=c.values[i],v=void 0===g?0:Eq(g,c.min,c.max),y=function(e,t){return t>2?`Value ${e+1} of ${t}`:2===t?["Minimum","Maximum"][e]:void 0}(i,c.values.length),b=h?.[u.size],w=b?function(e,t,n){const r=e/2,o=Oq([0,50],[0,r]);return(r-o(t)*n)*n}(b,v,u.direction):0;return r.useEffect(()=>{if(d)return c.thumbs.add(d),()=>{c.thumbs.delete(d)}},[d,c.thumbs]),n("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[u.startEdge]:`calc(${v}% + ${w}px)`},children:[e(lq.ItemSlot,{scope:t.__scopeSlider,children:e(ae.span,{role:"slider","aria-label":t["aria-label"]||y,"aria-valuemin":c.min,"aria-valuenow":g,"aria-valuemax":c.max,"aria-orientation":c.orientation,"data-orientation":c.orientation,"data-disabled":c.disabled?"":void 0,tabIndex:c.disabled?void 0:0,...l,ref:p,style:void 0===g?{display:"none"}:t.style,onFocus:te(t.onFocus,()=>{c.valueIndexToChangeRef.current=i})})}),m&&e(Mq,{name:s??(c.name?c.name+(c.values.length>1?"[]":""):void 0),form:c.form,value:g},i)]})});Cq.displayName=Sq;var Mq=r.forwardRef(({__scopeSlider:t,value:n,...o},a)=>{const i=r.useRef(null),s=K(i,a),l=$E(n);return r.useEffect(()=>{const e=i.current;if(!e)return;const t=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(l!==n&&r){const t=new Event("input",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}},[l,n]),e(ae.input,{style:{display:"none"},...o,ref:s,defaultValue:n})});function Eq(e,t,n){return SU(100/(n-t)*(e-t),[0,100])}function Oq(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}Mq.displayName="RadioBubbleInput";var Dq=mq,Pq=xq,Tq=Nq,Aq=Cq;function Rq({className:t,defaultValue:o,value:a,min:i=0,max:s=100,...l}){const c=r.useMemo(()=>Array.isArray(a)?a:Array.isArray(o)?o:[i,s],[a,o,i,s]);return n(Dq,{"data-slot":"slider",defaultValue:o,value:a,min:i,max:s,className:vn("relative flex w-full touch-none select-none items-center data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col data-[disabled]:opacity-50",t),...l,children:[e(Pq,{"data-slot":"slider-track",className:vn("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=vertical]:h-full data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-1.5"),children:e(Tq,{"data-slot":"slider-range",className:vn("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:c.length},(t,n)=>e(Aq,{"data-slot":"slider-thumb",className:"border-primary ring-ring/50 focus-visible:outline-hidden block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 disabled:pointer-events-none disabled:opacity-50"},n))]})}var Iq=(e,t,n,r,o,a,i,s)=>{let l=document.documentElement,c=["light","dark"];function u(t){(Array.isArray(e)?e:[e]).forEach(e=>{let n="class"===e,r=n&&a?o.map(e=>a[e]||e):o;n?(l.classList.remove(...r),l.classList.add(a&&a[t]?a[t]:t)):l.setAttribute(e,t)}),function(e){s&&c.includes(e)&&(l.style.colorScheme=e)}(t)}if(r)u(r);else try{let e=localStorage.getItem(t)||n;u(i&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e)}catch(e){}},jq=r.createContext(void 0),zq={setTheme:e=>{},themes:[]};r.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:o,enableColorScheme:a,defaultTheme:i,value:s,themes:l,nonce:c,scriptProps:u})=>{let d=JSON.stringify([n,t,i,e,l,s,o,a]).slice(1,-1);return r.createElement("script",{...u,suppressHydrationWarning:!0,nonce:"undefined"==typeof window?c:"",dangerouslySetInnerHTML:{__html:`(${Iq.toString()})(${d})`}})});const Lq=Array(12).fill(0),Fq=({visible:e,className:t})=>o.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},o.createElement("div",{className:"sonner-spinner"},Lq.map((e,t)=>o.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${t}`})))),Bq=o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},o.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),$q=o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},o.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Wq=o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},o.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Hq=o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},o.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Uq=o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},o.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),o.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}));let Vq=1;const Yq=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;const{message:n,...r}=e,o="number"==typeof(null==e?void 0:e.id)||(null==(t=e.id)?void 0:t.length)>0?e.id:Vq++,a=this.toasts.find(e=>e.id===o),i=void 0===e.dismissible||e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),a?this.toasts=this.toasts.map(t=>t.id===o?(this.publish({...t,...e,id:o,title:n}),{...t,...e,id:o,dismissible:i,title:n}):t):this.addToast({title:n,...r,dismissible:i,id:o}),o},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;void 0!==t.loading&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:"function"!=typeof t.description?t.description:void 0}));const r=Promise.resolve(e instanceof Function?e():e);let a,i=void 0!==n;const s=r.then(async e=>{a=["resolve",e];if(o.isValidElement(e))i=!1,this.create({id:n,type:"default",message:e});else if(Kq(e)&&!e.ok){i=!1;const r="function"==typeof t.error?await t.error(`HTTP error! status: ${e.status}`):t.error,a="function"==typeof t.description?await t.description(`HTTP error! status: ${e.status}`):t.description,s="object"==typeof r&&!o.isValidElement(r)?r:{message:r};this.create({id:n,type:"error",description:a,...s})}else if(e instanceof Error){i=!1;const r="function"==typeof t.error?await t.error(e):t.error,a="function"==typeof t.description?await t.description(e):t.description,s="object"==typeof r&&!o.isValidElement(r)?r:{message:r};this.create({id:n,type:"error",description:a,...s})}else if(void 0!==t.success){i=!1;const r="function"==typeof t.success?await t.success(e):t.success,a="function"==typeof t.description?await t.description(e):t.description,s="object"==typeof r&&!o.isValidElement(r)?r:{message:r};this.create({id:n,type:"success",description:a,...s})}}).catch(async e=>{if(a=["reject",e],void 0!==t.error){i=!1;const r="function"==typeof t.error?await t.error(e):t.error,a="function"==typeof t.description?await t.description(e):t.description,s="object"==typeof r&&!o.isValidElement(r)?r:{message:r};this.create({id:n,type:"error",description:a,...s})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),null==t.finally||t.finally.call(t)}),l=()=>new Promise((e,t)=>s.then(()=>"reject"===a[0]?t(a[1]):e(a[1])).catch(t));return"string"!=typeof n&&"number"!=typeof n?{unwrap:l}:Object.assign(n,{unwrap:l})},this.custom=(e,t)=>{const n=(null==t?void 0:t.id)||Vq++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Kq=e=>e&&"object"==typeof e&&"ok"in e&&"boolean"==typeof e.ok&&"status"in e&&"number"==typeof e.status,qq=(e,t)=>{const n=(null==t?void 0:t.id)||Vq++;return Yq.addToast({title:e,...t,id:n}),n};function Gq(e){return void 0!==e.label}Object.assign(qq,{success:Yq.success,info:Yq.info,warning:Yq.warning,error:Yq.error,custom:Yq.custom,message:Yq.message,promise:Yq.promise,dismiss:Yq.dismiss,loading:Yq.loading},{getHistory:()=>Yq.toasts,getToasts:()=>Yq.getActiveToasts()}),function(e){if("undefined"==typeof document)return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");const Xq=3,Zq=14;function Qq(...e){return e.filter(Boolean).join(" ")}const Jq=e=>{var t,n,r,a,i,s,l,c,u;const{invert:d,toast:f,unstyled:p,interacting:m,setHeights:h,visibleToasts:g,heights:v,index:y,toasts:b,expanded:w,removeToast:x,defaultRichColors:k,closeButton:N,style:S,cancelButtonStyle:C,actionButtonStyle:_,className:M="",descriptionClassName:E="",duration:O,position:D,gap:P,expandByDefault:T,classNames:A,icons:R,closeButtonAriaLabel:I="Close toast"}=e,[j,z]=o.useState(null),[L,F]=o.useState(null),[B,$]=o.useState(!1),[W,H]=o.useState(!1),[U,V]=o.useState(!1),[Y,K]=o.useState(!1),[q,G]=o.useState(!1),[X,Z]=o.useState(0),[Q,J]=o.useState(0),ee=o.useRef(f.duration||O||4e3),te=o.useRef(null),ne=o.useRef(null),re=0===y,oe=y+1<=g,ae=f.type,ie=!1!==f.dismissible,se=f.className||"",le=f.descriptionClassName||"",ce=o.useMemo(()=>v.findIndex(e=>e.toastId===f.id)||0,[v,f.id]),ue=o.useMemo(()=>{var e;return null!=(e=f.closeButton)?e:N},[f.closeButton,N]),de=o.useMemo(()=>f.duration||O||4e3,[f.duration,O]),fe=o.useRef(0),pe=o.useRef(0),me=o.useRef(0),he=o.useRef(null),[ge,ve]=D.split("-"),ye=o.useMemo(()=>v.reduce((e,t,n)=>n>=ce?e:e+t.height,0),[v,ce]),be=(()=>{const[e,t]=o.useState(document.hidden);return o.useEffect(()=>{const e=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",e),()=>window.removeEventListener("visibilitychange",e)},[]),e})(),we=f.invert||d,xe="loading"===ae;pe.current=o.useMemo(()=>ce*P+ye,[ce,ye]),o.useEffect(()=>{ee.current=de},[de]),o.useEffect(()=>{$(!0)},[]),o.useEffect(()=>{const e=ne.current;if(e){const t=e.getBoundingClientRect().height;return J(t),h(e=>[{toastId:f.id,height:t,position:f.position},...e]),()=>h(e=>e.filter(e=>e.toastId!==f.id))}},[h,f.id]),o.useLayoutEffect(()=>{if(!B)return;const e=ne.current,t=e.style.height;e.style.height="auto";const n=e.getBoundingClientRect().height;e.style.height=t,J(n),h(e=>e.find(e=>e.toastId===f.id)?e.map(e=>e.toastId===f.id?{...e,height:n}:e):[{toastId:f.id,height:n,position:f.position},...e])},[B,f.title,f.description,h,f.id,f.jsx,f.action,f.cancel]);const ke=o.useCallback(()=>{H(!0),Z(pe.current),h(e=>e.filter(e=>e.toastId!==f.id)),setTimeout(()=>{x(f)},200)},[f,x,h,pe]);o.useEffect(()=>{if(f.promise&&"loading"===ae||f.duration===1/0||"loading"===f.type)return;let e;return w||m||be?(()=>{if(me.current<fe.current){const e=(new Date).getTime()-fe.current;ee.current=ee.current-e}me.current=(new Date).getTime()})():ee.current!==1/0&&(fe.current=(new Date).getTime(),e=setTimeout(()=>{null==f.onAutoClose||f.onAutoClose.call(f,f),ke()},ee.current)),()=>clearTimeout(e)},[w,m,f,ae,be,ke]),o.useEffect(()=>{f.delete&&(ke(),null==f.onDismiss||f.onDismiss.call(f,f))},[ke,f.delete]);const Ne=f.icon||(null==R?void 0:R[ae])||(e=>{switch(e){case"success":return Bq;case"info":return Wq;case"warning":return $q;case"error":return Hq;default:return null}})(ae);var Se,Ce;return o.createElement("li",{tabIndex:0,ref:ne,className:Qq(M,se,null==A?void 0:A.toast,null==f||null==(t=f.classNames)?void 0:t.toast,null==A?void 0:A.default,null==A?void 0:A[ae],null==f||null==(n=f.classNames)?void 0:n[ae]),"data-sonner-toast":"","data-rich-colors":null!=(Se=f.richColors)?Se:k,"data-styled":!Boolean(f.jsx||f.unstyled||p),"data-mounted":B,"data-promise":Boolean(f.promise),"data-swiped":q,"data-removed":W,"data-visible":oe,"data-y-position":ge,"data-x-position":ve,"data-index":y,"data-front":re,"data-swiping":U,"data-dismissible":ie,"data-type":ae,"data-invert":we,"data-swipe-out":Y,"data-swipe-direction":L,"data-expanded":Boolean(w||T&&B),"data-testid":f.testId,style:{"--index":y,"--toasts-before":y,"--z-index":b.length-y,"--offset":`${W?X:pe.current}px`,"--initial-height":T?"auto":`${Q}px`,...S,...f.style},onDragEnd:()=>{V(!1),z(null),he.current=null},onPointerDown:e=>{2!==e.button&&!xe&&ie&&(te.current=new Date,Z(pe.current),e.target.setPointerCapture(e.pointerId),"BUTTON"!==e.target.tagName&&(V(!0),he.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{var e,t,n;if(Y||!ie)return;he.current=null;const r=Number((null==(e=ne.current)?void 0:e.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),o=Number((null==(t=ne.current)?void 0:t.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),a=(new Date).getTime()-(null==(n=te.current)?void 0:n.getTime()),i="x"===j?r:o,s=Math.abs(i)/a;if(Math.abs(i)>=45||s>.11)return Z(pe.current),null==f.onDismiss||f.onDismiss.call(f,f),F("x"===j?r>0?"right":"left":o>0?"down":"up"),ke(),void K(!0);var l,c;null==(l=ne.current)||l.style.setProperty("--swipe-amount-x","0px"),null==(c=ne.current)||c.style.setProperty("--swipe-amount-y","0px"),G(!1),V(!1),z(null)},onPointerMove:t=>{var n,r,o;if(!he.current||!ie)return;if((null==(n=window.getSelection())?void 0:n.toString().length)>0)return;const a=t.clientY-he.current.y,i=t.clientX-he.current.x;var s;const l=null!=(s=e.swipeDirections)?s:function(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}(D);!j&&(Math.abs(i)>1||Math.abs(a)>1)&&z(Math.abs(i)>Math.abs(a)?"x":"y");let c={x:0,y:0};const u=e=>1/(1.5+Math.abs(e)/20);if("y"===j){if(l.includes("top")||l.includes("bottom"))if(l.includes("top")&&a<0||l.includes("bottom")&&a>0)c.y=a;else{const e=a*u(a);c.y=Math.abs(e)<Math.abs(a)?e:a}}else if("x"===j&&(l.includes("left")||l.includes("right")))if(l.includes("left")&&i<0||l.includes("right")&&i>0)c.x=i;else{const e=i*u(i);c.x=Math.abs(e)<Math.abs(i)?e:i}(Math.abs(c.x)>0||Math.abs(c.y)>0)&&G(!0),null==(r=ne.current)||r.style.setProperty("--swipe-amount-x",`${c.x}px`),null==(o=ne.current)||o.style.setProperty("--swipe-amount-y",`${c.y}px`)}},ue&&!f.jsx&&"loading"!==ae?o.createElement("button",{"aria-label":I,"data-disabled":xe,"data-close-button":!0,onClick:xe||!ie?()=>{}:()=>{ke(),null==f.onDismiss||f.onDismiss.call(f,f)},className:Qq(null==A?void 0:A.closeButton,null==f||null==(r=f.classNames)?void 0:r.closeButton)},null!=(Ce=null==R?void 0:R.close)?Ce:Uq):null,(ae||f.icon||f.promise)&&null!==f.icon&&(null!==(null==R?void 0:R[ae])||f.icon)?o.createElement("div",{"data-icon":"",className:Qq(null==A?void 0:A.icon,null==f||null==(a=f.classNames)?void 0:a.icon)},f.promise||"loading"===f.type&&!f.icon?f.icon||function(){var e,t;return(null==R?void 0:R.loading)?o.createElement("div",{className:Qq(null==A?void 0:A.loader,null==f||null==(t=f.classNames)?void 0:t.loader,"sonner-loader"),"data-visible":"loading"===ae},R.loading):o.createElement(Fq,{className:Qq(null==A?void 0:A.loader,null==f||null==(e=f.classNames)?void 0:e.loader),visible:"loading"===ae})}():null,"loading"!==f.type?Ne:null):null,o.createElement("div",{"data-content":"",className:Qq(null==A?void 0:A.content,null==f||null==(i=f.classNames)?void 0:i.content)},o.createElement("div",{"data-title":"",className:Qq(null==A?void 0:A.title,null==f||null==(s=f.classNames)?void 0:s.title)},f.jsx?f.jsx:"function"==typeof f.title?f.title():f.title),f.description?o.createElement("div",{"data-description":"",className:Qq(E,le,null==A?void 0:A.description,null==f||null==(l=f.classNames)?void 0:l.description)},"function"==typeof f.description?f.description():f.description):null),o.isValidElement(f.cancel)?f.cancel:f.cancel&&Gq(f.cancel)?o.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||C,onClick:e=>{Gq(f.cancel)&&ie&&(null==f.cancel.onClick||f.cancel.onClick.call(f.cancel,e),ke())},className:Qq(null==A?void 0:A.cancelButton,null==f||null==(c=f.classNames)?void 0:c.cancelButton)},f.cancel.label):null,o.isValidElement(f.action)?f.action:f.action&&Gq(f.action)?o.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||_,onClick:e=>{Gq(f.action)&&(null==f.action.onClick||f.action.onClick.call(f.action,e),e.defaultPrevented||ke())},className:Qq(null==A?void 0:A.actionButton,null==f||null==(u=f.classNames)?void 0:u.actionButton)},f.action.label):null)};function eG(){if("undefined"==typeof window)return"ltr";if("undefined"==typeof document)return"ltr";const e=document.documentElement.getAttribute("dir");return"auto"!==e&&e?e:window.getComputedStyle(document.documentElement).direction}function tG(e,t){const n={};return[e,t].forEach((e,t)=>{const r=1===t,o=r?"--mobile-offset":"--offset",a=r?"16px":"24px";function i(e){["top","right","bottom","left"].forEach(t=>{n[`${o}-${t}`]="number"==typeof e?`${e}px`:e})}"number"==typeof e||"string"==typeof e?i(e):"object"==typeof e?["top","right","bottom","left"].forEach(t=>{void 0===e[t]?n[`${o}-${t}`]=a:n[`${o}-${t}`]="number"==typeof e[t]?`${e[t]}px`:e[t]}):i(a)}),n}const nG=o.forwardRef(function(e,t){const{id:n,invert:r,position:a="bottom-right",hotkey:i=["altKey","KeyT"],expand:s,closeButton:l,className:c,offset:u,mobileOffset:d,theme:f="light",richColors:p,duration:m,style:h,visibleToasts:g=Xq,toastOptions:v,dir:y=eG(),gap:b=Zq,icons:x,containerAriaLabel:k="Notifications"}=e,[N,S]=o.useState([]),C=o.useMemo(()=>n?N.filter(e=>e.toasterId===n):N.filter(e=>!e.toasterId),[N,n]),_=o.useMemo(()=>Array.from(new Set([a].concat(C.filter(e=>e.position).map(e=>e.position)))),[C,a]),[M,E]=o.useState([]),[O,D]=o.useState(!1),[P,T]=o.useState(!1),[A,R]=o.useState("system"!==f?f:"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),I=o.useRef(null),j=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),z=o.useRef(null),L=o.useRef(!1),F=o.useCallback(e=>{S(t=>{var n;return(null==(n=t.find(t=>t.id===e.id))?void 0:n.delete)||Yq.dismiss(e.id),t.filter(({id:t})=>t!==e.id)})},[]);return o.useEffect(()=>Yq.subscribe(e=>{e.dismiss?requestAnimationFrame(()=>{S(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))}):setTimeout(()=>{w.flushSync(()=>{S(t=>{const n=t.findIndex(t=>t.id===e.id);return-1!==n?[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]:[e,...t]})})})}),[N]),o.useEffect(()=>{if("system"!==f)return void R(f);if("system"===f&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?R("dark"):R("light")),"undefined"==typeof window)return;const e=window.matchMedia("(prefers-color-scheme: dark)");try{e.addEventListener("change",({matches:e})=>{R(e?"dark":"light")})}catch(t){e.addListener(({matches:e})=>{try{R(e?"dark":"light")}catch(e){console.error(e)}})}},[f]),o.useEffect(()=>{N.length<=1&&D(!1)},[N]),o.useEffect(()=>{const e=e=>{var t;var n;i.every(t=>e[t]||e.code===t)&&(D(!0),null==(n=I.current)||n.focus());"Escape"!==e.code||document.activeElement!==I.current&&!(null==(t=I.current)?void 0:t.contains(document.activeElement))||D(!1)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[i]),o.useEffect(()=>{if(I.current)return()=>{z.current&&(z.current.focus({preventScroll:!0}),z.current=null,L.current=!1)}},[I.current]),o.createElement("section",{ref:t,"aria-label":`${k} ${j}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},_.map((t,n)=>{var a;const[i,f]=t.split("-");return C.length?o.createElement("ol",{key:t,dir:"auto"===y?eG():y,tabIndex:-1,ref:I,className:c,"data-sonner-toaster":!0,"data-sonner-theme":A,"data-y-position":i,"data-x-position":f,style:{"--front-toast-height":`${(null==(a=M[0])?void 0:a.height)||0}px`,"--width":"356px","--gap":`${b}px`,...h,...tG(u,d)},onBlur:e=>{L.current&&!e.currentTarget.contains(e.relatedTarget)&&(L.current=!1,z.current&&(z.current.focus({preventScroll:!0}),z.current=null))},onFocus:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||L.current||(L.current=!0,z.current=e.relatedTarget)},onMouseEnter:()=>D(!0),onMouseMove:()=>D(!0),onMouseLeave:()=>{P||D(!1)},onDragEnd:()=>D(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||T(!0)},onPointerUp:()=>T(!1)},C.filter(e=>!e.position&&0===n||e.position===t).map((n,a)=>{var i,c;return o.createElement(Jq,{key:n.id,icons:x,index:a,toast:n,defaultRichColors:p,duration:null!=(i=null==v?void 0:v.duration)?i:m,className:null==v?void 0:v.className,descriptionClassName:null==v?void 0:v.descriptionClassName,invert:r,visibleToasts:g,closeButton:null!=(c=null==v?void 0:v.closeButton)?c:l,interacting:P,position:t,style:null==v?void 0:v.style,unstyled:null==v?void 0:v.unstyled,classNames:null==v?void 0:v.classNames,cancelButtonStyle:null==v?void 0:v.cancelButtonStyle,actionButtonStyle:null==v?void 0:v.actionButtonStyle,closeButtonAriaLabel:null==v?void 0:v.closeButtonAriaLabel,removeToast:F,toasts:C.filter(e=>e.position==n.position),heights:M.filter(e=>e.position==n.position),setHeights:E,expandByDefault:s,gap:b,expanded:O,swipeDirections:e.swipeDirections})})):null}))}),rG=({...t})=>{const{theme:n="system"}=null!=(o=r.useContext(jq))?o:zq;var o;return e(nG,{theme:n,className:"toaster group",style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},...t})};function oG({className:t,...n}){return e(L,{role:"status","aria-label":"Loading",className:vn("size-4 animate-spin",t),...n})}var aG="Switch",[iG]=H(aG),[sG,lG]=iG(aG),cG=r.forwardRef((t,o)=>{const{__scopeSwitch:a,name:i,checked:s,defaultChecked:l,required:c,disabled:u,value:d="on",onCheckedChange:f,form:p,...m}=t,[h,g]=r.useState(null),v=K(o,e=>g(e)),y=r.useRef(!1),b=!h||(p||!!h.closest("form")),[w,x]=oe({prop:s,defaultProp:l??!1,onChange:f,caller:aG});return n(sG,{scope:a,checked:w,disabled:u,children:[e(ae.button,{type:"button",role:"switch","aria-checked":w,"aria-required":c,"data-state":pG(w),"data-disabled":u?"":void 0,disabled:u,value:d,...m,ref:v,onClick:te(t.onClick,e=>{x(e=>!e),b&&(y.current=e.isPropagationStopped(),y.current||e.stopPropagation())})}),b&&e(fG,{control:h,bubbles:!y.current,name:i,value:d,checked:w,required:c,disabled:u,form:p,style:{transform:"translateX(-100%)"}})]})});cG.displayName=aG;var uG="SwitchThumb",dG=r.forwardRef((t,n)=>{const{__scopeSwitch:r,...o}=t,a=lG(uG,r);return e(ae.span,{"data-state":pG(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:n})});dG.displayName=uG;var fG=r.forwardRef(({__scopeSwitch:t,control:n,checked:o,bubbles:a=!0,...i},s)=>{const l=r.useRef(null),c=K(l,s),u=$E(o),d=WE(n);return r.useEffect(()=>{const e=l.current;if(!e)return;const t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(u!==o&&n){const t=new Event("click",{bubbles:a});n.call(e,o),e.dispatchEvent(t)}},[u,o,a]),e("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o,...i,tabIndex:-1,ref:c,style:{...i.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function pG(e){return e?"checked":"unchecked"}fG.displayName="SwitchBubbleInput";var mG=cG,hG=dG;function gG({className:t,...n}){return e(mG,{"data-slot":"switch",className:vn("data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 shadow-xs peer inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent outline-none transition-all focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),...n,children:e(hG,{"data-slot":"switch-thumb",className:vn("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}function vG({className:t,...n}){return e("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:e("table",{"data-slot":"table",className:vn("w-full caption-bottom text-sm",t),...n})})}function yG({className:t,...n}){return e("thead",{"data-slot":"table-header",className:vn("[&_tr]:border-b",t),...n})}function bG({className:t,...n}){return e("tbody",{"data-slot":"table-body",className:vn("[&_tr:last-child]:border-0",t),...n})}function wG({className:t,...n}){return e("tfoot",{"data-slot":"table-footer",className:vn("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",t),...n})}function xG({className:t,...n}){return e("tr",{"data-slot":"table-row",className:vn("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",t),...n})}function kG({className:t,...n}){return e("th",{"data-slot":"table-head",className:vn("text-foreground h-10 whitespace-nowrap px-2 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),...n})}function NG({className:t,...n}){return e("td",{"data-slot":"table-cell",className:vn("whitespace-nowrap p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),...n})}function SG({className:t,...n}){return e("caption",{"data-slot":"table-caption",className:vn("text-muted-foreground mt-4 text-sm",t),...n})}var CG="Tabs",[_G]=H(CG,[AT]),MG=AT(),[EG,OG]=_G(CG),DG=r.forwardRef((t,n)=>{const{__scopeTabs:r,value:o,onValueChange:a,defaultValue:i,orientation:s="horizontal",dir:l,activationMode:c="automatic",...u}=t,d=Ee(l),[f,p]=oe({prop:o,onChange:a,defaultProp:i??"",caller:CG});return e(EG,{scope:r,baseId:de(),value:f,onValueChange:p,orientation:s,dir:d,activationMode:c,children:e(ae.div,{dir:d,"data-orientation":s,...u,ref:n})})});DG.displayName=CG;var PG="TabsList",TG=r.forwardRef((t,n)=>{const{__scopeTabs:r,loop:o=!0,...a}=t,i=OG(PG,r),s=MG(r);return e(WT,{asChild:!0,...s,orientation:i.orientation,dir:i.dir,loop:o,children:e(ae.div,{role:"tablist","aria-orientation":i.orientation,...a,ref:n})})});TG.displayName=PG;var AG="TabsTrigger",RG=r.forwardRef((t,n)=>{const{__scopeTabs:r,value:o,disabled:a=!1,...i}=t,s=OG(AG,r),l=MG(r),c=zG(s.baseId,o),u=LG(s.baseId,o),d=o===s.value;return e(HT,{asChild:!0,...l,focusable:!a,active:d,children:e(ae.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:c,...i,ref:n,onMouseDown:te(t.onMouseDown,e=>{a||0!==e.button||!1!==e.ctrlKey?e.preventDefault():s.onValueChange(o)}),onKeyDown:te(t.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&s.onValueChange(o)}),onFocus:te(t.onFocus,()=>{const e="manual"!==s.activationMode;d||a||!e||s.onValueChange(o)})})})});RG.displayName=AG;var IG="TabsContent",jG=r.forwardRef((t,n)=>{const{__scopeTabs:o,value:a,forceMount:i,children:s,...l}=t,c=OG(IG,o),u=zG(c.baseId,a),d=LG(c.baseId,a),f=a===c.value,p=r.useRef(f);return r.useEffect(()=>{const e=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(e)},[]),e(se,{present:i||f,children:({present:r})=>e(ae.div,{"data-state":f?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":u,hidden:!r,id:d,tabIndex:0,...l,ref:n,style:{...t.style,animationDuration:p.current?"0s":void 0},children:r&&s})})});function zG(e,t){return`${e}-trigger-${t}`}function LG(e,t){return`${e}-content-${t}`}jG.displayName=IG;var FG=DG,BG=TG,$G=RG,WG=jG;function HG({className:t,...n}){return e(FG,{"data-slot":"tabs",className:vn("flex flex-col gap-2",t),...n})}function UG({className:t,...n}){return e(BG,{"data-slot":"tabs-list",className:vn("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",t),...n})}function VG({className:t,...n}){return e($G,{"data-slot":"tabs-trigger",className:vn("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 whitespace-nowrap rounded-md border border-transparent px-2 py-1 text-sm font-medium transition-[color,box-shadow] focus-visible:outline-1 focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",t),...n})}function YG({className:t,...n}){return e(WG,{"data-slot":"tabs-content",className:vn("flex-1 outline-none",t),...n})}var KG="Toggle",qG=r.forwardRef((t,n)=>{const{pressed:r,defaultPressed:o,onPressedChange:a,...i}=t,[s,l]=oe({prop:r,onChange:a,defaultProp:o??!1,caller:KG});return e(ae.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":t.disabled?"":void 0,...i,ref:n,onClick:te(t.onClick,()=>{t.disabled||l(!s)})})});qG.displayName=KG;var GG=qG,XG="ToggleGroup",[ZG]=H(XG,[AT]),QG=AT(),JG=o.forwardRef((t,n)=>{const{type:r,...o}=t;if("single"===r){return e(nX,{...o,ref:n})}if("multiple"===r){return e(rX,{...o,ref:n})}throw new Error(`Missing prop \`type\` expected on \`${XG}\``)});JG.displayName=XG;var[eX,tX]=ZG(XG),nX=o.forwardRef((t,n)=>{const{value:r,defaultValue:a,onValueChange:i=()=>{},...s}=t,[l,c]=oe({prop:r,defaultProp:a??"",onChange:i,caller:XG});return e(eX,{scope:t.__scopeToggleGroup,type:"single",value:o.useMemo(()=>l?[l]:[],[l]),onItemActivate:c,onItemDeactivate:o.useCallback(()=>c(""),[c]),children:e(iX,{...s,ref:n})})}),rX=o.forwardRef((t,n)=>{const{value:r,defaultValue:a,onValueChange:i=()=>{},...s}=t,[l,c]=oe({prop:r,defaultProp:a??[],onChange:i,caller:XG}),u=o.useCallback(e=>c((t=[])=>[...t,e]),[c]),d=o.useCallback(e=>c((t=[])=>t.filter(t=>t!==e)),[c]);return e(eX,{scope:t.__scopeToggleGroup,type:"multiple",value:l,onItemActivate:u,onItemDeactivate:d,children:e(iX,{...s,ref:n})})});JG.displayName=XG;var[oX,aX]=ZG(XG),iX=o.forwardRef((t,n)=>{const{__scopeToggleGroup:r,disabled:o=!1,rovingFocus:a=!0,orientation:i,dir:s,loop:l=!0,...c}=t,u=QG(r),d=Ee(s),f={role:"group",dir:d,...c};return e(oX,{scope:r,rovingFocus:a,disabled:o,children:a?e(WT,{asChild:!0,...u,orientation:i,dir:d,loop:l,children:e(ae.div,{...f,ref:n})}):e(ae.div,{...f,ref:n})})}),sX="ToggleGroupItem",lX=o.forwardRef((t,n)=>{const r=tX(sX,t.__scopeToggleGroup),a=aX(sX,t.__scopeToggleGroup),i=QG(t.__scopeToggleGroup),s=r.value.includes(t.value),l=a.disabled||t.disabled,c={...t,pressed:s,disabled:l},u=o.useRef(null);return a.rovingFocus?e(HT,{asChild:!0,...i,focusable:!l,active:s,ref:u,children:e(cX,{...c,ref:n})}):e(cX,{...c,ref:n})});lX.displayName=sX;var cX=o.forwardRef((t,n)=>{const{__scopeToggleGroup:r,value:o,...a}=t,i=tX(sX,r),s={role:"radio","aria-checked":t.pressed,"aria-pressed":void 0},l="single"===i.type?s:void 0;return e(qG,{...l,...a,ref:n,onPressedChange:e=>{e?i.onItemActivate(o):i.onItemDeactivate(o)}})}),uX=JG,dX=lX;const fX=Sn("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}});function pX({className:t,variant:n,size:r,...o}){return e(GG,{"data-slot":"toggle",className:vn(fX({variant:n,size:r,className:t})),...o})}const mX=r.createContext({size:"default",variant:"default"});function hX({className:t,variant:n,size:r,children:o,...a}){return e(uX,{"data-slot":"toggle-group","data-variant":n,"data-size":r,className:vn("group/toggle-group data-[variant=outline]:shadow-xs flex w-fit items-center rounded-md",t),...a,children:e(mX.Provider,{value:{variant:n,size:r},children:o})})}function gX({className:t,children:n,variant:o,size:a,...i}){const s=r.useContext(mX);return e(dX,{"data-slot":"toggle-group-item","data-variant":s.variant||o,"data-size":s.size||a,className:vn(fX({variant:s.variant||o,size:s.size||a}),"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",t),...i,children:n})}function vX(){const[e,t]=a(void 0);return d(()=>{const e=window.matchMedia("(max-width: 767px)"),n=()=>{t(window.innerWidth<768)};return e.addEventListener("change",n),t(window.innerWidth<768),()=>e.removeEventListener("change",n)},[]),!!e}export{yn as Accordion,xn as AccordionContent,bn as AccordionItem,wn as AccordionTrigger,_n as Alert,En as AlertDescription,fa as AlertDialog,xa as AlertDialogAction,ka as AlertDialogCancel,ga as AlertDialogContent,wa as AlertDialogDescription,ya as AlertDialogFooter,va as AlertDialogHeader,ha as AlertDialogOverlay,ma as AlertDialogPortal,ba as AlertDialogTitle,pa as AlertDialogTrigger,Mn as AlertTitle,Ca as AspectRatio,Ga as Avatar,Za as AvatarFallback,Xa as AvatarImage,Ja as Badge,ei as Breadcrumb,ii as BreadcrumbEllipsis,ni as BreadcrumbItem,ri as BreadcrumbLink,ti as BreadcrumbList,oi as BreadcrumbPage,ai as BreadcrumbSeparator,da as Button,pi as ButtonGroup,hi as ButtonGroupSeparator,mi as ButtonGroupText,El as Calendar,Ol as CalendarDayButton,Dl as Card,Rl as CardAction,Il as CardContent,Al as CardDescription,jl as CardFooter,Pl as CardHeader,Tl as CardTitle,Cc as Carousel,_c as CarouselContent,Mc as CarouselItem,Oc as CarouselNext,Ec as CarouselPrevious,RE as ChartContainer,LE as ChartLegend,FE as ChartLegendContent,IE as ChartStyle,jE as ChartTooltip,zE as ChartTooltipContent,oO as Checkbox,aO as Collapsible,sO as CollapsibleContent,iO as CollapsibleTrigger,oD as Command,aD as CommandDialog,lD as CommandEmpty,cD as CommandGroup,iD as CommandInput,dD as CommandItem,sD as CommandList,uD as CommandSeparator,fD as CommandShortcut,eI as ContextMenu,uI as ContextMenuCheckboxItem,lI as ContextMenuContent,nI as ContextMenuGroup,cI as ContextMenuItem,fI as ContextMenuLabel,rI as ContextMenuPortal,aI as ContextMenuRadioGroup,dI as ContextMenuRadioItem,pI as ContextMenuSeparator,mI as ContextMenuShortcut,oI as ContextMenuSub,sI as ContextMenuSubContent,iI as ContextMenuSubTrigger,tI as ContextMenuTrigger,qO as Dialog,ZO as DialogClose,JO as DialogContent,rD as DialogDescription,tD as DialogFooter,eD as DialogHeader,QO as DialogOverlay,XO as DialogPortal,nD as DialogTitle,GO as DialogTrigger,GI as Drawer,QI as DrawerClose,ej as DrawerContent,oj as DrawerDescription,nj as DrawerFooter,tj as DrawerHeader,JI as DrawerOverlay,ZI as DrawerPortal,rj as DrawerTitle,XI as DrawerTrigger,Wj as DropdownMenu,qj as DropdownMenuCheckboxItem,Vj as DropdownMenuContent,Yj as DropdownMenuGroup,Kj as DropdownMenuItem,Zj as DropdownMenuLabel,Hj as DropdownMenuPortal,Gj as DropdownMenuRadioGroup,Xj as DropdownMenuRadioItem,Qj as DropdownMenuSeparator,Jj as DropdownMenuShortcut,ez as DropdownMenuSub,nz as DropdownMenuSubContent,tz as DropdownMenuSubTrigger,Uj as DropdownMenuTrigger,rz as Empty,cz as EmptyContent,lz as EmptyDescription,oz as EmptyHeader,iz as EmptyMedia,sz as EmptyTitle,vz as Field,yz as FieldContent,xz as FieldDescription,Nz as FieldError,hz as FieldGroup,bz as FieldLabel,mz as FieldLegend,kz as FieldSeparator,pz as FieldSet,wz as FieldTitle,Sz as Form,Pz as FormControl,Tz as FormDescription,_z as FormField,Oz as FormItem,Dz as FormLabel,Az as FormMessage,nL as HoverCard,oL as HoverCardContent,rL as HoverCardTrigger,aL as Input,sL as InputGroup,cL as InputGroupAddon,dL as InputGroupButton,pL as InputGroupInput,fL as InputGroupText,mL as InputGroupTextarea,ML as InputOTP,EL as InputOTPGroup,DL as InputOTPSeparator,OL as InputOTPSlot,RL as Item,BL as ItemActions,zL as ItemContent,FL as ItemDescription,WL as ItemFooter,PL as ItemGroup,$L as ItemHeader,jL as ItemMedia,TL as ItemSeparator,LL as ItemTitle,HL as Kbd,UL as KbdGroup,fz as Label,FF as Menubar,KF as MenubarCheckboxItem,VF as MenubarContent,$F as MenubarGroup,YF as MenubarItem,GF as MenubarLabel,BF as MenubarMenu,WF as MenubarPortal,HF as MenubarRadioGroup,qF as MenubarRadioItem,XF as MenubarSeparator,ZF as MenubarShortcut,QF as MenubarSub,eB as MenubarSubContent,JF as MenubarSubTrigger,UF as MenubarTrigger,a$ as NavigationMenu,u$ as NavigationMenuContent,p$ as NavigationMenuIndicator,s$ as NavigationMenuItem,f$ as NavigationMenuLink,i$ as NavigationMenuList,c$ as NavigationMenuTrigger,d$ as NavigationMenuViewport,m$ as Pagination,h$ as PaginationContent,w$ as PaginationEllipsis,g$ as PaginationItem,v$ as PaginationLink,b$ as PaginationNext,y$ as PaginationPrevious,X$ as Popover,J$ as PopoverAnchor,Q$ as PopoverContent,Z$ as PopoverTrigger,hW as Progress,BW as RadioGroup,$W as RadioGroupItem,NU as ResizableHandle,kU as ResizablePanel,xU as ResizablePanelGroup,sV as ScrollArea,lV as ScrollBar,EY as Select,TY as SelectContent,OY as SelectGroup,RY as SelectItem,AY as SelectLabel,zY as SelectScrollDownButton,jY as SelectScrollUpButton,IY as SelectSeparator,PY as SelectTrigger,DY as SelectValue,di as Separator,LY as Sheet,BY as SheetClose,HY as SheetContent,KY as SheetDescription,VY as SheetFooter,UY as SheetHeader,YY as SheetTitle,FY as SheetTrigger,IK as Sidebar,HK as SidebarContent,$K as SidebarFooter,UK as SidebarGroup,YK as SidebarGroupAction,KK as SidebarGroupContent,VK as SidebarGroupLabel,BK as SidebarHeader,FK as SidebarInput,LK as SidebarInset,qK as SidebarMenu,QK as SidebarMenuAction,JK as SidebarMenuBadge,ZK as SidebarMenuButton,GK as SidebarMenuItem,eq as SidebarMenuSkeleton,tq as SidebarMenuSub,rq as SidebarMenuSubButton,nq as SidebarMenuSubItem,RK as SidebarProvider,zK as SidebarRail,WK as SidebarSeparator,jK as SidebarTrigger,qY as Skeleton,Rq as Slider,oG as Spinner,gG as Switch,vG as Table,bG as TableBody,SG as TableCaption,NG as TableCell,wG as TableFooter,kG as TableHead,yG as TableHeader,xG as TableRow,HG as Tabs,YG as TabsContent,UG as TabsList,VG as TabsTrigger,iL as Textarea,rG as Toaster,pX as Toggle,hX as ToggleGroup,gX as ToggleGroupItem,OK as Tooltip,PK as TooltipContent,EK as TooltipProvider,DK as TooltipTrigger,Qa as badgeVariants,fi as buttonGroupVariants,ua as buttonVariants,vn as cn,l$ as navigationMenuTriggerStyle,fX as toggleVariants,Mz as useFormField,vX as useIsMobile,AK as useSidebar};
20
+ //# sourceMappingURL=index.js.map