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.cjs ADDED
@@ -0,0 +1,20 @@
1
+ "use strict";var e=require("react/jsx-runtime"),t=require("react"),n=require("react-dom"),r=require("lucide-react"),o=require("react-hook-form");function a(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}var i=a(t),s=a(n);function l(t,n=[]){let r=[];const o=()=>{const e=r.map(e=>i.createContext(e));return function(n){const r=n?.[t]||e;return i.useMemo(()=>({[`__scope${t}`]:{...n,[t]:r}}),[n,r])}};return o.scopeName=t,[function(n,o){const a=i.createContext(o),s=r.length;r=[...r,o];const l=n=>{const{scope:r,children:o,...l}=n,c=r?.[t]?.[s]||a,u=i.useMemo(()=>l,Object.values(l));return e.jsx(c.Provider,{value:u,children:o})};return l.displayName=n+"Provider",[l,function(e,r){const l=r?.[t]?.[s]||a,c=i.useContext(l);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${e}\` must be used within \`${n}\``)}]},c(o,...n)]}function c(...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 r=n.reduce((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]}),{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}function u(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function d(...e){return t=>{let n=!1;const r=e.map(e=>{const r=u(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():u(e[t],null)}}}}function f(...e){return i.useCallback(d(...e),e)}function p(t){const n=h(t),r=i.forwardRef((t,r)=>{const{children:o,...a}=t,s=i.Children.toArray(o),l=s.find(b);if(l){const t=l.props.children,o=s.map(e=>e===l?i.Children.count(t)>1?i.Children.only(null):i.isValidElement(t)?t.props.children:null:e);return e.jsx(n,{...a,ref:r,children:i.isValidElement(t)?i.cloneElement(t,void 0,o):null})}return e.jsx(n,{...a,ref:r,children:o})});return r.displayName=`${t}.Slot`,r}var m=p("Slot");function h(e){const t=i.forwardRef((e,t)=>{const{children:n,...r}=e;if(i.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),o=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}}(r,n.props);return n.type!==i.Fragment&&(o.ref=t?d(t,e):e),i.cloneElement(n,o)}return i.Children.count(n)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var g=Symbol("radix.slottable");function v(t){const n=({children:t})=>e.jsx(e.Fragment,{children:t});return n.displayName=`${t}.Slottable`,n.__radixId=g,n}function b(e){return i.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===g}function y(n){const r=n+"CollectionProvider",[o,a]=l(r),[i,s]=o(r,{collectionRef:{current:null},itemMap:new Map}),c=n=>{const{scope:r,children:o}=n,a=t.useRef(null),s=t.useRef(new Map).current;return e.jsx(i,{scope:r,itemMap:s,collectionRef:a,children:o})};c.displayName=r;const u=n+"CollectionSlot",d=p(u),m=t.forwardRef((t,n)=>{const{scope:r,children:o}=t,a=f(n,s(u,r).collectionRef);return e.jsx(d,{ref:a,children:o})});m.displayName=u;const h=n+"CollectionItemSlot",g="data-radix-collection-item",v=p(h),b=t.forwardRef((n,r)=>{const{scope:o,children:a,...i}=n,l=t.useRef(null),c=f(r,l),u=s(h,o);return t.useEffect(()=>(u.itemMap.set(l,{ref:l,...i}),()=>{u.itemMap.delete(l)})),e.jsx(v,{[g]:"",ref:c,children:a})});return b.displayName=h,[{Provider:c,Slot:m,ItemSlot:b},function(e){const r=s(n+"CollectionConsumer",e),o=t.useCallback(()=>{const e=r.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${g}]`)),n=Array.from(r.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current));return n},[r.collectionRef,r.itemMap]);return o},a]}function x(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}var w=globalThis?.document?i.useLayoutEffect:()=>{},k=i[" useInsertionEffect ".trim().toString()]||w;function C({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,s]=function({defaultProp:e,onChange:t}){const[n,r]=i.useState(e),o=i.useRef(n),a=i.useRef(t);return k(()=>{a.current=t},[t]),i.useEffect(()=>{o.current!==n&&(a.current?.(n),o.current=n)},[n,o]),[n,r,a]}({defaultProp:t,onChange:n}),l=void 0!==e,c=l?e:o;{const t=i.useRef(void 0!==e);i.useEffect(()=>{const e=t.current;if(e!==l){const t=e?"controlled":"uncontrolled",n=l?"controlled":"uncontrolled";console.warn(`${r} 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,r])}const u=i.useCallback(t=>{if(l){const n=function(e){return"function"==typeof e}(t)?t(e):t;n!==e&&s.current?.(n)}else a(t)},[l,e,a,s]);return[c,u]}var S=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,n)=>{const r=p(`Primitive.${n}`),o=i.forwardRef((t,o)=>{const{asChild:a,...i}=t,s=a?r:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),e.jsx(s,{...i,ref:o})});return o.displayName=`Primitive.${n}`,{...t,[n]:o}},{});function j(e,t){e&&s.flushSync(()=>e.dispatchEvent(t))}var N=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=i.useState(),r=i.useRef(null),o=i.useRef(e),a=i.useRef("none"),s=e?"mounted":"unmounted",[l,c]=function(e,t){return i.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 i.useEffect(()=>{const e=M(r.current);a.current="mounted"===l?e:"none"},[l]),w(()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,i=M(t);if(e)c("MOUNT");else if("none"===i||"none"===t?.display)c("UNMOUNT");else{c(n&&r!==i?"ANIMATION_OUT":"UNMOUNT")}o.current=e}},[e,c]),w(()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=a=>{const i=M(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&i&&(c("ANIMATION_END"),!o.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&&(a.current=M(r.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:i.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}(t),o="function"==typeof n?n({present:r.isPresent}):i.Children.only(n),a=f(r.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}(o));return"function"==typeof n||r.isPresent?i.cloneElement(o,{ref:a}):null};function M(e){return e?.animationName||"none"}N.displayName="Presence";var E=i[" useId ".trim().toString()]||(()=>{}),_=0;function O(e){const[t,n]=i.useState(E());return w(()=>{n(e=>e??String(_++))},[e]),t?`radix-${t}`:""}var D="Collapsible",[P,T]=l(D),[A,R]=P(D),I=i.forwardRef((t,n)=>{const{__scopeCollapsible:r,open:o,defaultOpen:a,disabled:s,onOpenChange:l,...c}=t,[u,d]=C({prop:o,defaultProp:a??!1,onChange:l,caller:D});return e.jsx(A,{scope:r,disabled:s,contentId:O(),open:u,onOpenToggle:i.useCallback(()=>d(e=>!e),[d]),children:e.jsx(S.div,{"data-state":W(u),"data-disabled":s?"":void 0,...c,ref:n})})});I.displayName=D;var z="CollapsibleTrigger",L=i.forwardRef((t,n)=>{const{__scopeCollapsible:r,...o}=t,a=R(z,r);return e.jsx(S.button,{type:"button","aria-controls":a.contentId,"aria-expanded":a.open||!1,"data-state":W(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...o,ref:n,onClick:x(t.onClick,a.onOpenToggle)})});L.displayName=z;var F="CollapsibleContent",B=i.forwardRef((t,n)=>{const{forceMount:r,...o}=t,a=R(F,t.__scopeCollapsible);return e.jsx(N,{present:r||a.open,children:({present:t})=>e.jsx($,{...o,ref:n,present:t})})});B.displayName=F;var $=i.forwardRef((t,n)=>{const{__scopeCollapsible:r,present:o,children:a,...s}=t,l=R(F,r),[c,u]=i.useState(o),d=i.useRef(null),p=f(n,d),m=i.useRef(0),h=m.current,g=i.useRef(0),v=g.current,b=l.open||c,y=i.useRef(b),x=i.useRef(void 0);return i.useEffect(()=>{const e=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(e)},[]),w(()=>{const e=d.current;if(e){x.current=x.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";const t=e.getBoundingClientRect();m.current=t.height,g.current=t.width,y.current||(e.style.transitionDuration=x.current.transitionDuration,e.style.animationName=x.current.animationName),u(o)}},[l.open,o]),e.jsx(S.div,{"data-state":W(l.open),"data-disabled":l.disabled?"":void 0,id:l.contentId,hidden:!b,...s,ref:p,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...t.style},children:b&&a})});function W(e){return e?"open":"closed"}var H=I,U=L,V=B,Y=i.createContext(void 0);function K(e){const t=i.useContext(Y);return e||t||"ltr"}var q="Accordion",G=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[X,Z,Q]=y(q),[J]=l(q,[Q,T]),ee=T(),te=t.forwardRef((t,n)=>{const{type:r,...o}=t,a=o,i=o;return e.jsx(X.Provider,{scope:t.__scopeAccordion,children:"multiple"===r?e.jsx(se,{...i,ref:n}):e.jsx(ie,{...a,ref:n})})});te.displayName=q;var[ne,re]=J(q),[oe,ae]=J(q,{collapsible:!1}),ie=t.forwardRef((n,r)=>{const{value:o,defaultValue:a,onValueChange:i=()=>{},collapsible:s=!1,...l}=n,[c,u]=C({prop:o,defaultProp:a??"",onChange:i,caller:q});return e.jsx(ne,{scope:n.__scopeAccordion,value:t.useMemo(()=>c?[c]:[],[c]),onItemOpen:u,onItemClose:t.useCallback(()=>s&&u(""),[s,u]),children:e.jsx(oe,{scope:n.__scopeAccordion,collapsible:s,children:e.jsx(ue,{...l,ref:r})})})}),se=t.forwardRef((n,r)=>{const{value:o,defaultValue:a,onValueChange:i=()=>{},...s}=n,[l,c]=C({prop:o,defaultProp:a??[],onChange:i,caller:q}),u=t.useCallback(e=>c((t=[])=>[...t,e]),[c]),d=t.useCallback(e=>c((t=[])=>t.filter(t=>t!==e)),[c]);return e.jsx(ne,{scope:n.__scopeAccordion,value:l,onItemOpen:u,onItemClose:d,children:e.jsx(oe,{scope:n.__scopeAccordion,collapsible:!0,children:e.jsx(ue,{...s,ref:r})})})}),[le,ce]=J(q),ue=t.forwardRef((n,r)=>{const{__scopeAccordion:o,disabled:a,dir:i,orientation:s="vertical",...l}=n,c=f(t.useRef(null),r),u=Z(o),d="ltr"===K(i),p=x(n.onKeyDown,e=>{if(!G.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.jsx(le,{scope:o,disabled:a,direction:i,orientation:s,children:e.jsx(X.Slot,{scope:o,children:e.jsx(S.div,{...l,"data-orientation":s,ref:c,onKeyDown:a?void 0:p})})})}),de="AccordionItem",[fe,pe]=J(de),me=t.forwardRef((t,n)=>{const{__scopeAccordion:r,value:o,...a}=t,i=ce(de,r),s=re(de,r),l=ee(r),c=O(),u=o&&s.value.includes(o)||!1,d=i.disabled||t.disabled;return e.jsx(fe,{scope:r,open:u,disabled:d,triggerId:c,children:e.jsx(H,{"data-orientation":i.orientation,"data-state":we(u),...l,...a,ref:n,disabled:d,open:u,onOpenChange:e=>{e?s.onItemOpen(o):s.onItemClose(o)}})})});me.displayName=de;var he="AccordionHeader",ge=t.forwardRef((t,n)=>{const{__scopeAccordion:r,...o}=t,a=ce(q,r),i=pe(he,r);return e.jsx(S.h3,{"data-orientation":a.orientation,"data-state":we(i.open),"data-disabled":i.disabled?"":void 0,...o,ref:n})});ge.displayName=he;var ve="AccordionTrigger",be=t.forwardRef((t,n)=>{const{__scopeAccordion:r,...o}=t,a=ce(q,r),i=pe(ve,r),s=ae(ve,r),l=ee(r);return e.jsx(X.ItemSlot,{scope:r,children:e.jsx(U,{"aria-disabled":i.open&&!s.collapsible||void 0,"data-orientation":a.orientation,id:i.triggerId,...l,...o,ref:n})})});be.displayName=ve;var ye="AccordionContent",xe=t.forwardRef((t,n)=>{const{__scopeAccordion:r,...o}=t,a=ce(q,r),i=pe(ye,r),s=ee(r);return e.jsx(V,{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 we(e){return e?"open":"closed"}xe.displayName=ye;var ke=te,Ce=me,Se=ge,je=be,Ne=xe;function Me(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=Me(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ee(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Me(e))&&(r&&(r+=" "),r+=t);return r}const _e=e=>{const t=Te(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{const n=e.split("-");return""===n[0]&&1!==n.length&&n.shift(),Oe(n,t)||Pe(e)},getConflictingClassGroupIds:(e,t)=>{const o=n[e]||[];return t&&r[e]?[...o,...r[e]]:o}}},Oe=(e,t)=>{if(0===e.length)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Oe(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},De=/^\[(.+)\]$/,Pe=e=>{if(De.test(e)){const t=De.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Te=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const e in n)Ae(n[e],r,e,t);return r},Ae=(e,t,n,r)=>{e.forEach(e=>{if("string"==typeof e){return void((""===e?t:Re(t,e)).classGroupId=n)}if("function"==typeof e)return Ie(e)?void Ae(e(r),t,n,r):void t.validators.push({validator:e,classGroupId:n});Object.entries(e).forEach(([e,o])=>{Ae(o,Re(t,e),n,r)})})},Re=(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},Ie=e=>e.isThemeGetter,ze=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)}}},Le=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=Fe(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},Fe=e=>e.endsWith("!")?e.substring(0,e.length-1):e.startsWith("!")?e.substring(1):e,Be=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}},$e=/\s+/;function We(){let e,t,n=0,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=He(e))&&(r&&(r+=" "),r+=t);return r}const He=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=He(e[r]))&&(n&&(n+=" "),n+=t);return n};function Ue(e,...t){let n,r,o,a=function(s){const l=t.reduce((e,t)=>t(e),e());return n=(e=>({cache:ze(e.cacheSize),parseClassName:Le(e),sortModifiers:Be(e),..._e(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($e);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,b=v+h;if(i.includes(b))continue;i.push(b);const y=o(h,m);for(let e=0;e<y.length;++e){const t=y[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(We.apply(null,arguments))}}const Ve=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},Ye=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ke=/^\((?:(\w[\w-]*):)?(.+)\)$/i,qe=/^\d+\/\d+$/,Ge=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Xe=/\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$/,Ze=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Qe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Je=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,et=e=>qe.test(e),tt=e=>!!e&&!Number.isNaN(Number(e)),nt=e=>!!e&&Number.isInteger(Number(e)),rt=e=>e.endsWith("%")&&tt(e.slice(0,-1)),ot=e=>Ge.test(e),at=()=>!0,it=e=>Xe.test(e)&&!Ze.test(e),st=()=>!1,lt=e=>Qe.test(e),ct=e=>Je.test(e),ut=e=>!ft(e)&&!bt(e),dt=e=>jt(e,_t,st),ft=e=>Ye.test(e),pt=e=>jt(e,Ot,it),mt=e=>jt(e,Dt,tt),ht=e=>jt(e,Mt,st),gt=e=>jt(e,Et,ct),vt=e=>jt(e,Tt,lt),bt=e=>Ke.test(e),yt=e=>Nt(e,Ot),xt=e=>Nt(e,Pt),wt=e=>Nt(e,Mt),kt=e=>Nt(e,_t),Ct=e=>Nt(e,Et),St=e=>Nt(e,Tt,!0),jt=(e,t,n)=>{const r=Ye.exec(e);return!!r&&(r[1]?t(r[1]):n(r[2]))},Nt=(e,t,n=!1)=>{const r=Ke.exec(e);return!!r&&(r[1]?t(r[1]):n)},Mt=e=>"position"===e||"percentage"===e,Et=e=>"image"===e||"url"===e,_t=e=>"length"===e||"size"===e||"bg-size"===e,Ot=e=>"length"===e,Dt=e=>"number"===e,Pt=e=>"family-name"===e,Tt=e=>"shadow"===e,At=Ue(()=>{const e=Ve("color"),t=Ve("font"),n=Ve("text"),r=Ve("font-weight"),o=Ve("tracking"),a=Ve("leading"),i=Ve("breakpoint"),s=Ve("container"),l=Ve("spacing"),c=Ve("radius"),u=Ve("shadow"),d=Ve("inset-shadow"),f=Ve("text-shadow"),p=Ve("drop-shadow"),m=Ve("blur"),h=Ve("perspective"),g=Ve("aspect"),v=Ve("ease"),b=Ve("animate"),y=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",bt,ft],x=()=>[bt,ft,l],w=()=>[et,"full","auto",...x()],k=()=>[nt,"none","subgrid",bt,ft],C=()=>["auto",{span:["full",nt,bt,ft]},nt,bt,ft],S=()=>[nt,"auto",bt,ft],j=()=>["auto","min","max","fr",bt,ft],N=()=>["auto",...x()],M=()=>[et,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...x()],E=()=>[e,bt,ft],_=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",wt,ht,{position:[bt,ft]}],O=()=>["auto","cover","contain",kt,dt,{size:[bt,ft]}],D=()=>[rt,yt,pt],P=()=>["","none","full",c,bt,ft],T=()=>["",tt,yt,pt],A=()=>[tt,rt,wt,ht],R=()=>["","none",m,bt,ft],I=()=>["none",tt,bt,ft],z=()=>["none",tt,bt,ft],L=()=>[tt,bt,ft],F=()=>[et,"full",...x()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ot],breakpoint:[ot],color:[at],container:[ot],"drop-shadow":[ot],ease:["in","out","in-out"],font:[ut],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ot],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ot],shadow:[ot],spacing:["px",tt],text:[ot],"text-shadow":[ot],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",et,ft,bt,g]}],container:["container"],columns:[{columns:[tt,ft,bt,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:y()}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:w()}],"inset-x":[{"inset-x":w()}],"inset-y":[{"inset-y":w()}],start:[{start:w()}],end:[{end:w()}],top:[{top:w()}],right:[{right:w()}],bottom:[{bottom:w()}],left:[{left:w()}],visibility:["visible","invisible","collapse"],z:[{z:[nt,"auto",bt,ft]}],basis:[{basis:[et,"full","auto",s,...x()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[tt,et,"auto","initial","none",ft]}],grow:[{grow:["",tt,bt,ft]}],shrink:[{shrink:["",tt,bt,ft]}],order:[{order:[nt,"first","last","none",bt,ft]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:C()}],"col-start":[{"col-start":S()}],"col-end":[{"col-end":S()}],"grid-rows":[{"grid-rows":k()}],"row-start-end":[{row:C()}],"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":j()}],"auto-rows":[{"auto-rows":j()}],gap:[{gap:x()}],"gap-x":[{"gap-x":x()}],"gap-y":[{"gap-y":x()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{items:["start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"align-self":[{self:["auto","start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],p:[{p:x()}],px:[{px:x()}],py:[{py:x()}],ps:[{ps:x()}],pe:[{pe:x()}],pt:[{pt:x()}],pr:[{pr:x()}],pb:[{pb:x()}],pl:[{pl:x()}],m:[{m:N()}],mx:[{mx:N()}],my:[{my:N()}],ms:[{ms:N()}],me:[{me:N()}],mt:[{mt:N()}],mr:[{mr:N()}],mb:[{mb:N()}],ml:[{ml:N()}],"space-x":[{"space-x":x()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":x()}],"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,yt,pt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,bt,mt]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",rt,ft]}],"font-family":[{font:[xt,ft,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,bt,ft]}],"line-clamp":[{"line-clamp":[tt,"none",bt,mt]}],leading:[{leading:[a,...x()]}],"list-image":[{"list-image":["none",bt,ft]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",bt,ft]}],"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:[tt,"from-font","auto",bt,pt]}],"text-decoration-color":[{decoration:E()}],"underline-offset":[{"underline-offset":[tt,"auto",bt,ft]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:x()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",bt,ft]}],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",bt,ft]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:_()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:O()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},nt,bt,ft],radial:["",bt,ft],conic:[nt,bt,ft]},Ct,gt]}],"bg-color":[{bg:E()}],"gradient-from-pos":[{from:D()}],"gradient-via-pos":[{via:D()}],"gradient-to-pos":[{to:D()}],"gradient-from":[{from:E()}],"gradient-via":[{via:E()}],"gradient-to":[{to:E()}],rounded:[{rounded:P()}],"rounded-s":[{"rounded-s":P()}],"rounded-e":[{"rounded-e":P()}],"rounded-t":[{"rounded-t":P()}],"rounded-r":[{"rounded-r":P()}],"rounded-b":[{"rounded-b":P()}],"rounded-l":[{"rounded-l":P()}],"rounded-ss":[{"rounded-ss":P()}],"rounded-se":[{"rounded-se":P()}],"rounded-ee":[{"rounded-ee":P()}],"rounded-es":[{"rounded-es":P()}],"rounded-tl":[{"rounded-tl":P()}],"rounded-tr":[{"rounded-tr":P()}],"rounded-br":[{"rounded-br":P()}],"rounded-bl":[{"rounded-bl":P()}],"border-w":[{border:T()}],"border-w-x":[{"border-x":T()}],"border-w-y":[{"border-y":T()}],"border-w-s":[{"border-s":T()}],"border-w-e":[{"border-e":T()}],"border-w-t":[{"border-t":T()}],"border-w-r":[{"border-r":T()}],"border-w-b":[{"border-b":T()}],"border-w-l":[{"border-l":T()}],"divide-x":[{"divide-x":T()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":T()}],"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":[tt,bt,ft]}],"outline-w":[{outline:["",tt,yt,pt]}],"outline-color":[{outline:E()}],shadow:[{shadow:["","none",u,St,vt]}],"shadow-color":[{shadow:E()}],"inset-shadow":[{"inset-shadow":["none",d,St,vt]}],"inset-shadow-color":[{"inset-shadow":E()}],"ring-w":[{ring:T()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:E()}],"ring-offset-w":[{"ring-offset":[tt,pt]}],"ring-offset-color":[{"ring-offset":E()}],"inset-ring-w":[{"inset-ring":T()}],"inset-ring-color":[{"inset-ring":E()}],"text-shadow":[{"text-shadow":["none",f,St,vt]}],"text-shadow-color":[{"text-shadow":E()}],opacity:[{opacity:[tt,bt,ft]}],"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":[tt]}],"mask-image-linear-from-pos":[{"mask-linear-from":A()}],"mask-image-linear-to-pos":[{"mask-linear-to":A()}],"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":A()}],"mask-image-t-to-pos":[{"mask-t-to":A()}],"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":A()}],"mask-image-r-to-pos":[{"mask-r-to":A()}],"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":A()}],"mask-image-b-to-pos":[{"mask-b-to":A()}],"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":A()}],"mask-image-l-to-pos":[{"mask-l-to":A()}],"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":A()}],"mask-image-x-to-pos":[{"mask-x-to":A()}],"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":A()}],"mask-image-y-to-pos":[{"mask-y-to":A()}],"mask-image-y-from-color":[{"mask-y-from":E()}],"mask-image-y-to-color":[{"mask-y-to":E()}],"mask-image-radial":[{"mask-radial":[bt,ft]}],"mask-image-radial-from-pos":[{"mask-radial-from":A()}],"mask-image-radial-to-pos":[{"mask-radial-to":A()}],"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":[tt]}],"mask-image-conic-from-pos":[{"mask-conic-from":A()}],"mask-image-conic-to-pos":[{"mask-conic-to":A()}],"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:_()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:O()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",bt,ft]}],filter:[{filter:["","none",bt,ft]}],blur:[{blur:R()}],brightness:[{brightness:[tt,bt,ft]}],contrast:[{contrast:[tt,bt,ft]}],"drop-shadow":[{"drop-shadow":["","none",p,St,vt]}],"drop-shadow-color":[{"drop-shadow":E()}],grayscale:[{grayscale:["",tt,bt,ft]}],"hue-rotate":[{"hue-rotate":[tt,bt,ft]}],invert:[{invert:["",tt,bt,ft]}],saturate:[{saturate:[tt,bt,ft]}],sepia:[{sepia:["",tt,bt,ft]}],"backdrop-filter":[{"backdrop-filter":["","none",bt,ft]}],"backdrop-blur":[{"backdrop-blur":R()}],"backdrop-brightness":[{"backdrop-brightness":[tt,bt,ft]}],"backdrop-contrast":[{"backdrop-contrast":[tt,bt,ft]}],"backdrop-grayscale":[{"backdrop-grayscale":["",tt,bt,ft]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[tt,bt,ft]}],"backdrop-invert":[{"backdrop-invert":["",tt,bt,ft]}],"backdrop-opacity":[{"backdrop-opacity":[tt,bt,ft]}],"backdrop-saturate":[{"backdrop-saturate":[tt,bt,ft]}],"backdrop-sepia":[{"backdrop-sepia":["",tt,bt,ft]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":x()}],"border-spacing-x":[{"border-spacing-x":x()}],"border-spacing-y":[{"border-spacing-y":x()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",bt,ft]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[tt,"initial",bt,ft]}],ease:[{ease:["linear","initial",v,bt,ft]}],delay:[{delay:[tt,bt,ft]}],animate:[{animate:["none",b,bt,ft]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,bt,ft]}],"perspective-origin":[{"perspective-origin":y()}],rotate:[{rotate:I()}],"rotate-x":[{"rotate-x":I()}],"rotate-y":[{"rotate-y":I()}],"rotate-z":[{"rotate-z":I()}],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:[bt,ft,"","none","gpu","cpu"]}],"transform-origin":[{origin:y()}],"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",bt,ft]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":x()}],"scroll-mx":[{"scroll-mx":x()}],"scroll-my":[{"scroll-my":x()}],"scroll-ms":[{"scroll-ms":x()}],"scroll-me":[{"scroll-me":x()}],"scroll-mt":[{"scroll-mt":x()}],"scroll-mr":[{"scroll-mr":x()}],"scroll-mb":[{"scroll-mb":x()}],"scroll-ml":[{"scroll-ml":x()}],"scroll-p":[{"scroll-p":x()}],"scroll-px":[{"scroll-px":x()}],"scroll-py":[{"scroll-py":x()}],"scroll-ps":[{"scroll-ps":x()}],"scroll-pe":[{"scroll-pe":x()}],"scroll-pt":[{"scroll-pt":x()}],"scroll-pr":[{"scroll-pr":x()}],"scroll-pb":[{"scroll-pb":x()}],"scroll-pl":[{"scroll-pl":x()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",bt,ft]}],fill:[{fill:["none",...E()]}],"stroke-w":[{stroke:[tt,yt,pt,mt]}],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 Rt(...e){return At(Ee(e))}const It=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,zt=Ee,Lt=(e,t)=>n=>{var r;if(null==(null==t?void 0:t.variants))return zt(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=It(t)||It(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 zt(e,i,l,null==n?void 0:n.class,null==n?void 0:n.className)},Ft=Lt("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 Bt(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...e)=>t.current?.(...e),[])}var $t,Wt="dismissableLayer.update",Ht="dismissableLayer.pointerDownOutside",Ut="dismissableLayer.focusOutside",Vt=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Yt=i.forwardRef((t,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,onDismiss:c,...u}=t,d=i.useContext(Vt),[p,m]=i.useState(null),h=p?.ownerDocument??globalThis?.document,[,g]=i.useState({}),v=f(n,e=>m(e)),b=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),w=b.indexOf(y),k=p?b.indexOf(p):-1,C=d.layersWithOutsidePointerEventsDisabled.size>0,j=k>=w,N=function(e,t=globalThis?.document){const n=Bt(e),r=i.useRef(!1),o=i.useRef(()=>{});return i.useEffect(()=>{const e=e=>{if(e.target&&!r.current){let r=function(){Gt(Ht,n,a,{discrete:!0})};const a={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}(e=>{const t=e.target,n=[...d.branches].some(e=>e.contains(t));j&&!n&&(a?.(e),l?.(e),e.defaultPrevented||c?.())},h),M=function(e,t=globalThis?.document){const n=Bt(e),r=i.useRef(!1);return i.useEffect(()=>{const e=e=>{if(e.target&&!r.current){Gt(Ut,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}(e=>{const t=e.target;[...d.branches].some(e=>e.contains(t))||(s?.(e),l?.(e),e.defaultPrevented||c?.())},h);return function(e,t=globalThis?.document){const n=Bt(e);i.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=>{k===d.layers.size-1&&(o?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))},h),i.useEffect(()=>{if(p)return r&&(0===d.layersWithOutsidePointerEventsDisabled.size&&($t=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(p)),d.layers.add(p),qt(),()=>{r&&1===d.layersWithOutsidePointerEventsDisabled.size&&(h.body.style.pointerEvents=$t)}},[p,h,r,d]),i.useEffect(()=>()=>{p&&(d.layers.delete(p),d.layersWithOutsidePointerEventsDisabled.delete(p),qt())},[p,d]),i.useEffect(()=>{const e=()=>g({});return document.addEventListener(Wt,e),()=>document.removeEventListener(Wt,e)},[]),e.jsx(S.div,{...u,ref:v,style:{pointerEvents:C?j?"auto":"none":void 0,...t.style},onFocusCapture:x(t.onFocusCapture,M.onFocusCapture),onBlurCapture:x(t.onBlurCapture,M.onBlurCapture),onPointerDownCapture:x(t.onPointerDownCapture,N.onPointerDownCapture)})});Yt.displayName="DismissableLayer";var Kt=i.forwardRef((t,n)=>{const r=i.useContext(Vt),o=i.useRef(null),a=f(n,o);return i.useEffect(()=>{const e=o.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}},[r.branches]),e.jsx(S.div,{...t,ref:a})});function qt(){const e=new CustomEvent(Wt);document.dispatchEvent(e)}function Gt(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?j(o,a):o.dispatchEvent(a)}Kt.displayName="DismissableLayerBranch";var Xt="focusScope.autoFocusOnMount",Zt="focusScope.autoFocusOnUnmount",Qt={bubbles:!1,cancelable:!0},Jt=i.forwardRef((t,n)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:a,onUnmountAutoFocus:s,...l}=t,[c,u]=i.useState(null),d=Bt(a),p=Bt(s),m=i.useRef(null),h=f(n,e=>u(e)),g=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(o){let e=function(e){if(g.paused||!c)return;const t=e.target;c.contains(t)?m.current=t:rn(m.current,{select:!0})},t=function(e){if(g.paused||!c)return;const t=e.relatedTarget;null!==t&&(c.contains(t)||rn(m.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&rn(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()}}},[o,c,g.paused]),i.useEffect(()=>{if(c){on.add(g);const t=document.activeElement;if(!c.contains(t)){const n=new CustomEvent(Xt,Qt);c.addEventListener(Xt,d),c.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(rn(r,{select:t}),document.activeElement!==n)return}((e=en(c),e.filter(e=>"A"!==e.tagName)),{select:!0}),document.activeElement===t&&rn(c))}return()=>{c.removeEventListener(Xt,d),setTimeout(()=>{const e=new CustomEvent(Zt,Qt);c.addEventListener(Zt,p),c.dispatchEvent(e),e.defaultPrevented||rn(t??document.body,{select:!0}),c.removeEventListener(Zt,p),on.remove(g)},0)}}var e},[c,d,p,g]);const v=i.useCallback(e=>{if(!r&&!o)return;if(g.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[o,a]=function(e){const t=en(e),n=tn(t,e),r=tn(t.reverse(),e);return[n,r]}(t);o&&a?e.shiftKey||n!==a?e.shiftKey&&n===o&&(e.preventDefault(),r&&rn(a,{select:!0})):(e.preventDefault(),r&&rn(o,{select:!0})):n===t&&e.preventDefault()}},[r,o,g.paused]);return e.jsx(S.div,{tabIndex:-1,...l,ref:h,onKeyDown:v})});function en(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 tn(e,t){for(const n of e)if(!nn(n,{upTo:t}))return n}function nn(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 rn(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()}}Jt.displayName="FocusScope";var on=function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=an(e,t),e.unshift(t)},remove(t){e=an(e,t),e[0]?.resume()}}}();function an(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var sn=i.forwardRef((t,r)=>{const{container:o,...a}=t,[s,l]=i.useState(!1);w(()=>l(!0),[]);const c=o||s&&globalThis?.document?.body;return c?n.createPortal(e.jsx(S.div,{...a,ref:r}),c):null});sn.displayName="Portal";var ln=0;function cn(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??un()),document.body.insertAdjacentElement("beforeend",e[1]??un()),ln++,()=>{1===ln&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),ln--}},[])}function un(){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 dn=function(){return dn=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},dn.apply(this,arguments)};function fn(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 pn="right-scroll-bar-position",mn="width-before-scroll-bar";function hn(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var gn="undefined"!=typeof window?i.useLayoutEffect:i.useEffect,vn=new WeakMap;function bn(e,n){var r,o,a,i=(r=null,o=function(t){return e.forEach(function(e){return hn(e,t)})},(a=t.useState(function(){return{value:r,callback:o,facade:{get current(){return a.value},set current(e){var t=a.value;t!==e&&(a.value=e,a.callback(e,t))}}}})[0]).callback=o,a.facade);return gn(function(){var t=vn.get(i);if(t){var n=new Set(t),r=new Set(e),o=i.current;n.forEach(function(e){r.has(e)||hn(e,null)}),r.forEach(function(e){n.has(e)||hn(e,o)})}vn.set(i,e)},[e]),i}function yn(e){return e}var xn=function(e){var t=e.sideCar,n=fn(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return i.createElement(r,dn({},n))};xn.isSideCarExport=!0;var wn=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=yn);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=dn({async:!0,ssr:!1},e),t}(),kn=function(){},Cn=i.forwardRef(function(e,t){var n=i.useRef(null),r=i.useState({onScrollCapture:kn,onWheelCapture:kn,onTouchMoveCapture:kn}),o=r[0],a=r[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,b=e.as,y=void 0===b?"div":b,x=e.gapMode,w=fn(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=p,C=bn([n,t]),S=dn(dn({},w),o);return i.createElement(i.Fragment,null,d&&i.createElement(k,{sideCar:wn,removeScrollBar:u,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!v,lockRef:n,gapMode:x}),s?i.cloneElement(i.Children.only(l),dn(dn({},S),{ref:C})):i.createElement(y,dn({},S,{className:c,ref:C}),l))});Cn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Cn.classNames={fullWidth:mn,zeroRight:pn};function Sn(){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 jn=function(){var e=0,t=null;return{add:function(n){var r,o;0==e&&(t=Sn())&&(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)}}},Nn=function(){var e,t=(e=jn(),function(t,n){i.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}},Mn={left:0,top:0,right:0,gap:0},En=function(e){return parseInt(e||"",10)||0},_n=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Mn;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[En(n),En(r),En(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])}},On=Nn(),Dn="data-scroll-locked",Pn=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(Dn,"] {\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(pn," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(mn," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(pn," .").concat(pn," {\n right: 0 ").concat(r,";\n }\n \n .").concat(mn," .").concat(mn," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(Dn,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},Tn=function(){var e=parseInt(document.body.getAttribute(Dn)||"0",10);return isFinite(e)?e:0},An=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;i.useEffect(function(){return document.body.setAttribute(Dn,(Tn()+1).toString()),function(){var e=Tn()-1;e<=0?document.body.removeAttribute(Dn):document.body.setAttribute(Dn,e.toString())}},[]);var a=i.useMemo(function(){return _n(o)},[o]);return i.createElement(On,{styles:Pn(a,!t,o,n?"":"!important")})},Rn=!1;if("undefined"!=typeof window)try{var In=Object.defineProperty({},"passive",{get:function(){return Rn=!0,!0}});window.addEventListener("test",In,In),window.removeEventListener("test",In,In)}catch(e){Rn=!1}var zn=!!Rn&&{passive:!1},Ln=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])},Fn=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),Bn(e,r)){var o=$n(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Bn=function(e,t){return"v"===e?function(e){return Ln(e,"overflowY")}(t):function(e){return Ln(e,"overflowX")}(t)},$n=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},Wn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Hn=function(e){return[e.deltaX,e.deltaY]},Un=function(e){return e&&"current"in e?e.current:e},Vn=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Yn=0,Kn=[];function qn(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Gn,Xn=(Gn=function(e){var t=i.useRef([]),n=i.useRef([0,0]),r=i.useRef(),o=i.useState(Yn++)[0],a=i.useState(Nn)[0],s=i.useRef(e);i.useEffect(function(){s.current=e},[e]),i.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));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(Un),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=i.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!s.current.allowPinchZoom;var o,a=Wn(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=Fn(d,u);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=Fn(d,u)),!f)return!1;if(!r.current&&"changedTouches"in e&&(l||c)&&(r.current=o),!o)return!0;var p=r.current||o;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=$n(e,i),p=f[0],m=f[1]-f[2]-o*p;(p||m)&&Bn(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=i.useCallback(function(e){var n=e;if(Kn.length&&Kn[Kn.length-1]===a){var r="deltaY"in n?Hn(n):Wn(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 i=(s.current.shards||[]).map(Un).filter(Boolean).filter(function(e){return e.contains(n.target)});(i.length>0?l(n,i[0]):!s.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),u=i.useCallback(function(e,n,r,o){var a={name:e,delta:n,target:r,should:o,shadowParent:qn(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),d=i.useCallback(function(e){n.current=Wn(e),r.current=void 0},[]),f=i.useCallback(function(t){u(t.type,Hn(t),t.target,l(t,e.lockRef.current))},[]),p=i.useCallback(function(t){u(t.type,Wn(t),t.target,l(t,e.lockRef.current))},[]);i.useEffect(function(){return Kn.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",c,zn),document.addEventListener("touchmove",c,zn),document.addEventListener("touchstart",d,zn),function(){Kn=Kn.filter(function(e){return e!==a}),document.removeEventListener("wheel",c,zn),document.removeEventListener("touchmove",c,zn),document.removeEventListener("touchstart",d,zn)}},[]);var m=e.removeScrollBar,h=e.inert;return i.createElement(i.Fragment,null,h?i.createElement(a,{styles:Vn(o)}):null,m?i.createElement(An,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},wn.useMedium(Gn),xn),Zn=i.forwardRef(function(e,t){return i.createElement(Cn,dn({},e,{ref:t,sideCar:Xn}))});Zn.classNames=Cn.classNames;var Qn=new WeakMap,Jn=new WeakMap,er={},tr=0,nr=function(e){return e&&(e.host||nr(e.parentNode))},rr=function(e,t,n,r){var o=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=nr(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]);er[n]||(er[n]=new WeakMap);var a=er[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=(Qn.get(e)||0)+1,c=(a.get(e)||0)+1;Qn.set(e,l),a.set(e,c),i.push(e),1===l&&o&&Jn.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(),tr++,function(){i.forEach(function(e){var t=Qn.get(e)-1,o=a.get(e)-1;Qn.set(e,t),a.set(e,o),t||(Jn.has(e)||e.removeAttribute(r),Jn.delete(e)),o||e.removeAttribute(n)}),--tr||(Qn=new WeakMap,Qn=new WeakMap,Jn=new WeakMap,er={})}},or=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"))),rr(r,o,n,"aria-hidden")):function(){return null}},ar="Dialog",[ir,sr]=l(ar),[lr,cr]=ir(ar),ur=t=>{const{__scopeDialog:n,children:r,open:o,defaultOpen:a,onOpenChange:s,modal:l=!0}=t,c=i.useRef(null),u=i.useRef(null),[d,f]=C({prop:o,defaultProp:a??!1,onChange:s,caller:ar});return e.jsx(lr,{scope:n,triggerRef:c,contentRef:u,contentId:O(),titleId:O(),descriptionId:O(),open:d,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(e=>!e),[f]),modal:l,children:r})};ur.displayName=ar;var dr="DialogTrigger",fr=i.forwardRef((t,n)=>{const{__scopeDialog:r,...o}=t,a=cr(dr,r),i=f(n,a.triggerRef);return e.jsx(S.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Pr(a.open),...o,ref:i,onClick:x(t.onClick,a.onOpenToggle)})});fr.displayName=dr;var pr="DialogPortal",[mr,hr]=ir(pr,{forceMount:void 0}),gr=t=>{const{__scopeDialog:n,forceMount:r,children:o,container:a}=t,s=cr(pr,n);return e.jsx(mr,{scope:n,forceMount:r,children:i.Children.map(o,t=>e.jsx(N,{present:r||s.open,children:e.jsx(sn,{asChild:!0,container:a,children:t})}))})};gr.displayName=pr;var vr="DialogOverlay",br=i.forwardRef((t,n)=>{const r=hr(vr,t.__scopeDialog),{forceMount:o=r.forceMount,...a}=t,i=cr(vr,t.__scopeDialog);return i.modal?e.jsx(N,{present:o||i.open,children:e.jsx(xr,{...a,ref:n})}):null});br.displayName=vr;var yr=p("DialogOverlay.RemoveScroll"),xr=i.forwardRef((t,n)=>{const{__scopeDialog:r,...o}=t,a=cr(vr,r);return e.jsx(Zn,{as:yr,allowPinchZoom:!0,shards:[a.contentRef],children:e.jsx(S.div,{"data-state":Pr(a.open),...o,ref:n,style:{pointerEvents:"auto",...o.style}})})}),wr="DialogContent",kr=i.forwardRef((t,n)=>{const r=hr(wr,t.__scopeDialog),{forceMount:o=r.forceMount,...a}=t,i=cr(wr,t.__scopeDialog);return e.jsx(N,{present:o||i.open,children:i.modal?e.jsx(Cr,{...a,ref:n}):e.jsx(Sr,{...a,ref:n})})});kr.displayName=wr;var Cr=i.forwardRef((t,n)=>{const r=cr(wr,t.__scopeDialog),o=i.useRef(null),a=f(n,r.contentRef,o);return i.useEffect(()=>{const e=o.current;if(e)return or(e)},[]),e.jsx(jr,{...t,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:x(t.onCloseAutoFocus,e=>{e.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:x(t.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:x(t.onFocusOutside,e=>e.preventDefault())})}),Sr=i.forwardRef((t,n)=>{const r=cr(wr,t.__scopeDialog),o=i.useRef(!1),a=i.useRef(!1);return e.jsx(jr,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(o.current||r.triggerRef.current?.focus(),e.preventDefault()),o.current=!1,a.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(a.current=!0));const n=e.target,i=r.triggerRef.current?.contains(n);i&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&a.current&&e.preventDefault()}})}),jr=i.forwardRef((t,n)=>{const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:s,...l}=t,c=cr(wr,r),u=i.useRef(null),d=f(n,u);return cn(),e.jsxs(e.Fragment,{children:[e.jsx(Jt,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:a,onUnmountAutoFocus:s,children:e.jsx(Yt,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":Pr(c.open),...l,ref:d,onDismiss:()=>c.onOpenChange(!1)})}),e.jsxs(e.Fragment,{children:[e.jsx(Ir,{titleId:c.titleId}),e.jsx(zr,{contentRef:u,descriptionId:c.descriptionId})]})]})}),Nr="DialogTitle",Mr=i.forwardRef((t,n)=>{const{__scopeDialog:r,...o}=t,a=cr(Nr,r);return e.jsx(S.h2,{id:a.titleId,...o,ref:n})});Mr.displayName=Nr;var Er="DialogDescription",_r=i.forwardRef((t,n)=>{const{__scopeDialog:r,...o}=t,a=cr(Er,r);return e.jsx(S.p,{id:a.descriptionId,...o,ref:n})});_r.displayName=Er;var Or="DialogClose",Dr=i.forwardRef((t,n)=>{const{__scopeDialog:r,...o}=t,a=cr(Or,r);return e.jsx(S.button,{type:"button",...o,ref:n,onClick:x(t.onClick,()=>a.onOpenChange(!1))})});function Pr(e){return e?"open":"closed"}Dr.displayName=Or;var Tr="DialogTitleWarning",[Ar,Rr]=function(t,n){const r=i.createContext(n),o=t=>{const{children:n,...o}=t,a=i.useMemo(()=>o,Object.values(o));return e.jsx(r.Provider,{value:a,children:n})};return o.displayName=t+"Provider",[o,function(e){const o=i.useContext(r);if(o)return o;if(void 0!==n)return n;throw new Error(`\`${e}\` must be used within \`${t}\``)}]}(Tr,{contentName:wr,titleName:Nr,docsSlug:"dialog"}),Ir=({titleId:e})=>{const t=Rr(Tr),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 i.useEffect(()=>{if(e){document.getElementById(e)||console.error(n)}},[n,e]),null},zr=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Rr("DialogDescriptionWarning").contentName}}.`;return i.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");if(t&&r){document.getElementById(t)||console.warn(n)}},[n,e,t]),null},Lr=ur,Fr=fr,Br=gr,$r=br,Wr=kr,Hr=Mr,Ur=_r,Vr=Dr,Yr="AlertDialog",[Kr]=l(Yr,[sr]),qr=sr(),Gr=t=>{const{__scopeAlertDialog:n,...r}=t,o=qr(n);return e.jsx(Lr,{...o,...r,modal:!0})};Gr.displayName=Yr;var Xr=i.forwardRef((t,n)=>{const{__scopeAlertDialog:r,...o}=t,a=qr(r);return e.jsx(Fr,{...a,...o,ref:n})});Xr.displayName="AlertDialogTrigger";var Zr=t=>{const{__scopeAlertDialog:n,...r}=t,o=qr(n);return e.jsx(Br,{...o,...r})};Zr.displayName="AlertDialogPortal";var Qr=i.forwardRef((t,n)=>{const{__scopeAlertDialog:r,...o}=t,a=qr(r);return e.jsx($r,{...a,...o,ref:n})});Qr.displayName="AlertDialogOverlay";var Jr="AlertDialogContent",[eo,to]=Kr(Jr),no=v("AlertDialogContent"),ro=i.forwardRef((t,n)=>{const{__scopeAlertDialog:r,children:o,...a}=t,s=qr(r),l=i.useRef(null),c=f(n,l),u=i.useRef(null);return e.jsx(Ar,{contentName:Jr,titleName:oo,docsSlug:"alert-dialog",children:e.jsx(eo,{scope:r,cancelRef:u,children:e.jsxs(Wr,{role:"alertdialog",...s,...a,ref:c,onOpenAutoFocus:x(a.onOpenAutoFocus,e=>{e.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:[e.jsx(no,{children:o}),e.jsx(fo,{contentRef:l})]})})})});ro.displayName=Jr;var oo="AlertDialogTitle",ao=i.forwardRef((t,n)=>{const{__scopeAlertDialog:r,...o}=t,a=qr(r);return e.jsx(Hr,{...a,...o,ref:n})});ao.displayName=oo;var io="AlertDialogDescription",so=i.forwardRef((t,n)=>{const{__scopeAlertDialog:r,...o}=t,a=qr(r);return e.jsx(Ur,{...a,...o,ref:n})});so.displayName=io;var lo=i.forwardRef((t,n)=>{const{__scopeAlertDialog:r,...o}=t,a=qr(r);return e.jsx(Vr,{...a,...o,ref:n})});lo.displayName="AlertDialogAction";var co="AlertDialogCancel",uo=i.forwardRef((t,n)=>{const{__scopeAlertDialog:r,...o}=t,{cancelRef:a}=to(co,r),i=qr(r),s=f(n,a);return e.jsx(Vr,{...i,...o,ref:s})});uo.displayName=co;var fo=({contentRef:e})=>{const t=`\`${Jr}\` requires a description for the component to be accessible for screen reader users.\n\nYou can add a description to the \`${Jr}\` by passing a \`${io}\` 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 \`${Jr}\`. 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 i.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},po=Gr,mo=Xr,ho=Zr,go=Qr,vo=ro,bo=lo,yo=uo,xo=ao,wo=so;const ko=Lt("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 Co({className:t,variant:n,size:r,asChild:o=!1,...a}){const i=o?m:"button";return e.jsx(i,{"data-slot":"button",className:Rt(ko({variant:n,size:r,className:t})),...a})}function So({...t}){return e.jsx(ho,{"data-slot":"alert-dialog-portal",...t})}function jo({className:t,...n}){return e.jsx(go,{"data-slot":"alert-dialog-overlay",className:Rt("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})}var No=i.forwardRef((t,n)=>{const{ratio:r=1,style:o,...a}=t;return e.jsx("div",{style:{position:"relative",width:"100%",paddingBottom:100/r+"%"},"data-radix-aspect-ratio-wrapper":"",children:e.jsx(S.div,{...a,ref:n,style:{...o,position:"absolute",top:0,right:0,bottom:0,left:0}})})});No.displayName="AspectRatio";var Mo=No;function Eo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _o,Oo={exports:{}},Do={};var Po,To,Ao={};
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 Ro(){return To||(To=1,"production"===process.env.NODE_ENV?Oo.exports=function(){if(_o)return Do;_o=1;var e=t,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=e.useState,o=e.useEffect,a=e.useLayoutEffect,i=e.useDebugValue;function s(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!n(e,r)}catch(e){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),l=r({inst:{value:n,getSnapshot:t}}),c=l[0].inst,u=l[1];return a(function(){c.value=n,c.getSnapshot=t,s(c)&&u({inst:c})},[e,n,t]),o(function(){return s(c)&&u({inst:c}),e(function(){s(c)&&u({inst:c})})},[e]),i(n),n};return Do.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:l,Do}():Oo.exports=(Po||(Po=1,"production"!==process.env.NODE_ENV&&function(){function e(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch(e){return!0}}"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var n=t,r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useState,a=n.useEffect,i=n.useLayoutEffect,s=n.useDebugValue,l=!1,c=!1,u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(t,u){l||void 0===n.startTransition||(l=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var d=u();if(!c){var f=u();r(d,f)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),c=!0)}var p=(f=o({inst:{value:d,getSnapshot:u}}))[0].inst,m=f[1];return i(function(){p.value=d,p.getSnapshot=u,e(p)&&m({inst:p})},[t,d,u]),a(function(){return e(p)&&m({inst:p}),t(function(){e(p)&&m({inst:p})})},[t]),s(d),d};Ao.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:u,"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Ao)),Oo.exports}var Io=Ro();function zo(){return()=>{}}var Lo="Avatar",[Fo]=l(Lo),[Bo,$o]=Fo(Lo),Wo=i.forwardRef((t,n)=>{const{__scopeAvatar:r,...o}=t,[a,s]=i.useState("idle");return e.jsx(Bo,{scope:r,imageLoadingStatus:a,onImageLoadingStatusChange:s,children:e.jsx(S.span,{...o,ref:n})})});Wo.displayName=Lo;var Ho="AvatarImage",Uo=i.forwardRef((t,n)=>{const{__scopeAvatar:r,src:o,onLoadingStatusChange:a=()=>{},...s}=t,l=$o(Ho,r),c=function(e,{referrerPolicy:t,crossOrigin:n}){const r=Io.useSyncExternalStore(zo,()=>!0,()=>!1),o=i.useRef(null),a=r?(o.current||(o.current=new window.Image),o.current):null,[s,l]=i.useState(()=>Ko(a,e));return w(()=>{l(Ko(a,e))},[a,e]),w(()=>{const e=e=>()=>{l(e)};if(!a)return;const r=e("loaded"),o=e("error");return a.addEventListener("load",r),a.addEventListener("error",o),t&&(a.referrerPolicy=t),"string"==typeof n&&(a.crossOrigin=n),()=>{a.removeEventListener("load",r),a.removeEventListener("error",o)}},[a,n,t]),s}(o,s),u=Bt(e=>{a(e),l.onImageLoadingStatusChange(e)});return w(()=>{"idle"!==c&&u(c)},[c,u]),"loaded"===c?e.jsx(S.img,{...s,ref:n,src:o}):null});Uo.displayName=Ho;var Vo="AvatarFallback",Yo=i.forwardRef((t,n)=>{const{__scopeAvatar:r,delayMs:o,...a}=t,s=$o(Vo,r),[l,c]=i.useState(void 0===o);return i.useEffect(()=>{if(void 0!==o){const e=window.setTimeout(()=>c(!0),o);return()=>window.clearTimeout(e)}},[o]),l&&"loaded"!==s.imageLoadingStatus?e.jsx(S.span,{...a,ref:n}):null});function Ko(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}Yo.displayName=Vo;var qo=Wo,Go=Uo,Xo=Yo;const Zo=Lt("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"}});var Qo="horizontal",Jo=["horizontal","vertical"],ea=i.forwardRef((t,n)=>{const{decorative:r,orientation:o=Qo,...a}=t,i=function(e){return Jo.includes(e)}(o)?o:Qo,s=r?{role:"none"}:{"aria-orientation":"vertical"===i?i:void 0,role:"separator"};return e.jsx(S.div,{"data-orientation":i,...s,...a,ref:n})});ea.displayName="Separator";var ta=ea;function na({className:t,orientation:n="horizontal",decorative:r=!0,...o}){return e.jsx(ta,{"data-slot":"separator",decorative:r,orientation:n,className:Rt("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 ra=Lt("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"}});const oa={},aa={};function ia(e,t){try{const n=(oa[e]||=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format)(t).split("GMT")[1];return n in aa?aa[n]:la(n,n.split(":"))}catch{if(e in aa)return aa[e];const t=e?.match(sa);return t?la(e,t.slice(1)):NaN}}const sa=/([+-]\d\d):?(\d\d)?/;function la(e,t){const n=+(t[0]||0),r=+(t[1]||0),o=+(t[2]||0)/60;return aa[e]=60*n+r>0?60*n+r+o:60*n-r-o}class ca extends Date{constructor(...e){super(),e.length>1&&"string"==typeof e[e.length-1]&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(ia(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)),fa(this),da(this)):this.setTime(Date.now())}static tz(e,...t){return t.length?new ca(...t,e):new ca(Date.now(),e)}withTimeZone(e){return new ca(+this,e)}getTimezoneOffset(){const e=-ia(this.timeZone,this);return e>0?Math.floor(e):Math.ceil(e)}setTime(e){return Date.prototype.setTime.apply(this,arguments),da(this),+this}[Symbol.for("constructDateFrom")](e){return new ca(+new Date(e),this.timeZone)}}const ua=/^(get|set)(?!UTC)/;function da(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(60*-ia(e.timeZone,e)))}function fa(e){const t=ia(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*ia(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=ia(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=ia(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(!ua.test(e))return;const t=e.replace(ua,"$1UTC");ca.prototype[t]&&(e.startsWith("get")?ca.prototype[e]=function(){return this.internal[t]()}:(ca.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()),fa(e)}(this),+this},ca.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),da(this),+this}))});class pa extends ca{static tz(e,...t){return t.length?new pa(...t,e):new pa(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 pa(+this,e)}[Symbol.for("constructDateFrom")](e){return new pa(+new Date(e),this.timeZone)}}const ma=6048e5,ha=Symbol.for("constructDateFrom");function ga(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&ha in e?e[ha](t):e instanceof Date?new e.constructor(t):new Date(t)}function va(e,t){return ga(t||e,e)}function ba(e,t,n){const r=va(e,n?.in);return isNaN(t)?ga(e,NaN):t?(r.setDate(r.getDate()+t),r):r}function ya(e,t,n){const r=va(e,n?.in);if(isNaN(t))return ga(e,NaN);if(!t)return r;const o=r.getDate(),a=ga(e,r.getTime());a.setMonth(r.getMonth()+t+1,0);return o>=a.getDate()?a:(r.setFullYear(a.getFullYear(),a.getMonth(),o),r)}let xa={};function wa(){return xa}function ka(e,t){const n=wa(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=va(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 Ca(e,t){return ka(e,{...t,weekStartsOn:1})}function Sa(e,t){const n=va(e,t?.in),r=n.getFullYear(),o=ga(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=Ca(o),i=ga(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const s=Ca(i);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function ja(e){const t=va(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 Na(e,...t){const n=ga.bind(null,t.find(e=>"object"==typeof e));return t.map(n)}function Ma(e,t){const n=va(e,t?.in);return n.setHours(0,0,0,0),n}function Ea(e,t,n){const[r,o]=Na(0,e,t),a=Ma(r),i=Ma(o),s=+a-ja(a),l=+i-ja(i);return Math.round((s-l)/864e5)}function _a(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}function Oa(e,t){const[n,r]=Na(0,t.start,t.end);return{start:n,end:r}}function Da(e,t){const n=va(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Pa(e,t){const n=wa(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=va(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 Ta={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 Aa(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Ra={date:Aa({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Aa({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:Aa({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Ia={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function za(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 La={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:za({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:za({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:za({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:za({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:za({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 Fa(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 Ba={ordinalNumber:($a={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const n=e.match($a.matchPattern);if(!n)return null;const r=n[0],o=e.match($a.parsePattern);if(!o)return null;let a=$a.valueCallback?$a.valueCallback(o[0]):o[0];return a=t.valueCallback?t.valueCallback(a):a,{value:a,rest:e.slice(r.length)}}),era:Fa({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:Fa({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:Fa({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:Fa({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:Fa({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 $a;const Wa={code:"en-US",formatDistance:(e,t,n)=>{let r;const o=Ta[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:Ra,formatRelative:(e,t,n,r)=>Ia[e],localize:La,match:Ba,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Ha(e,t){const n=va(e,t?.in),r=+Ca(n)-+function(e,t){const n=Sa(e,t),r=ga(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Ca(r)}(n);return Math.round(r/ma)+1}function Ua(e,t){const n=va(e,t?.in),r=n.getFullYear(),o=wa(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,i=ga(t?.in||e,0);i.setFullYear(r+1,0,a),i.setHours(0,0,0,0);const s=ka(i,t),l=ga(t?.in||e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const c=ka(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function Va(e,t){const n=va(e,t?.in),r=+ka(n,t)-+function(e,t){const n=wa(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=Ua(e,t),a=ga(t?.in||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),ka(a,t)}(n,t);return Math.round(r/ma)+1}function Ya(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const Ka={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Ya("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):Ya(n+1,2)},d:(e,t)=>Ya(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)=>Ya(e.getHours()%12||12,t.length),H:(e,t)=>Ya(e.getHours(),t.length),m:(e,t)=>Ya(e.getMinutes(),t.length),s:(e,t)=>Ya(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return Ya(Math.trunc(r*Math.pow(10,n-3)),t.length)}},qa="midnight",Ga="noon",Xa="morning",Za="afternoon",Qa="evening",Ja="night",ei={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 Ka.y(e,t)},Y:function(e,t,n,r){const o=Ua(e,r),a=o>0?o:1-o;if("YY"===t){return Ya(a%100,2)}return"Yo"===t?n.ordinalNumber(a,{unit:"year"}):Ya(a,t.length)},R:function(e,t){return Ya(Sa(e),t.length)},u:function(e,t){return Ya(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 Ya(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 Ya(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 Ka.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 Ya(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=Va(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):Ya(o,t.length)},I:function(e,t,n){const r=Ha(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):Ya(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):Ka.d(e,t)},D:function(e,t,n){const r=function(e,t){const n=va(e,t?.in);return Ea(n,Da(n))+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):Ya(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 Ya(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 Ya(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 Ya(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?Ga:0===r?qa: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?Qa:r>=12?Za:r>=4?Xa:Ja,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 Ka.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):Ka.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):Ya(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):Ya(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ka.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Ka.s(e,t)},S:function(e,t){return Ka.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return ni(r);case"XXXX":case"XX":return ri(r);default:return ri(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return ni(r);case"xxxx":case"xx":return ri(r);default:return ri(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+ti(r,":");default:return"GMT"+ri(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+ti(r,":");default:return"GMT"+ri(r,":")}},t:function(e,t,n){return Ya(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return Ya(+e,t.length)}};function ti(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+Ya(a,2)}function ni(e,t){if(e%60==0){return(e>0?"-":"+")+Ya(Math.abs(e)/60,2)}return ri(e,t)}function ri(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+Ya(Math.trunc(r/60),2)+t+Ya(r%60,2)}const oi=(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"})}},ai=(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"})}},ii={p:ai,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return oi(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}}",oi(r,t)).replace("{{time}}",ai(o,t))}},si=/^D+$/,li=/^Y+$/,ci=["D","DD","YY","YYYY"];const ui=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,di=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,fi=/^'([^]*?)'?$/,pi=/''/g,mi=/[a-zA-Z]/;function hi(e,t,n){const r=wa(),o=n?.locale??r.locale??Wa,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=va(e,n?.in);if(!function(e){return!(!_a(e)&&"number"!=typeof e||isNaN(+va(e)))}(s))throw new RangeError("Invalid time value");let l=t.match(di).map(e=>{const t=e[0];if("p"===t||"P"===t){return(0,ii[t])(e,o.formatLong)}return e}).join("").match(ui).map(e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:gi(e)};if(ei[t])return{isToken:!0,value:e};if(t.match(mi))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 li.test(e)}(a)||!n?.useAdditionalDayOfYearTokens&&function(e){return si.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),ci.includes(e))throw new RangeError(r)}(a,t,String(e));return(0,ei[a[0]])(s,a,o.localize,c)}).join("")}function gi(e){const t=e.match(fi);return t?t[1].replace(pi,"'"):e}function vi(e,t,n){const r=va(e,n?.in),o=r.getFullYear(),a=r.getDate(),i=ga(e,0);i.setFullYear(o,t,15),i.setHours(0,0,0,0);const s=function(e,t){const n=va(e,t?.in),r=n.getFullYear(),o=n.getMonth(),a=ga(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 bi(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 yi{constructor(e,t){this.Date=Date,this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?pa.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 pa(e,t,n,this.options.timeZone):new Date(e,t,n),this.addDays=(e,t)=>this.overrides?.addDays?this.overrides.addDays(e,t):ba(e,t),this.addMonths=(e,t)=>this.overrides?.addMonths?this.overrides.addMonths(e,t):ya(e,t),this.addWeeks=(e,t)=>this.overrides?.addWeeks?this.overrides.addWeeks(e,t):function(e,t,n){return ba(e,7*t,n)}(e,t),this.addYears=(e,t)=>this.overrides?.addYears?this.overrides.addYears(e,t):function(e,t,n){return ya(e,12*t,n)}(e,t),this.differenceInCalendarDays=(e,t)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(e,t):Ea(e,t),this.differenceInCalendarMonths=(e,t)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(e,t):function(e,t){const[n,r]=Na(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}=Oa(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(ga(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}=Oa(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(ga(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=bi(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 Pa(e,{...t,weekStartsOn:1})}(e),this.endOfMonth=e=>this.overrides?.endOfMonth?this.overrides.endOfMonth(e):function(e,t){const n=va(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):Pa(e,this.options),this.endOfYear=e=>this.overrides?.endOfYear?this.overrides.endOfYear(e):function(e,t){const n=va(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):hi(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):Ha(e),this.getMonth=(e,t)=>this.overrides?.getMonth?this.overrides.getMonth(e,this.options):function(e,t){return va(e,t?.in).getMonth()}(e,this.options),this.getYear=(e,t)=>this.overrides?.getYear?this.overrides.getYear(e,this.options):function(e,t){return va(e,t?.in).getFullYear()}(e,this.options),this.getWeek=(e,t)=>this.overrides?.getWeek?this.overrides.getWeek(e,this.options):Va(e,this.options),this.isAfter=(e,t)=>this.overrides?.isAfter?this.overrides.isAfter(e,t):function(e,t){return+va(e)>+va(t)}(e,t),this.isBefore=(e,t)=>this.overrides?.isBefore?this.overrides.isBefore(e,t):function(e,t){return+va(e)<+va(t)}(e,t),this.isDate=e=>this.overrides?.isDate?this.overrides.isDate(e):_a(e),this.isSameDay=(e,t)=>this.overrides?.isSameDay?this.overrides.isSameDay(e,t):function(e,t){const[n,r]=Na(0,e,t);return+Ma(n)===+Ma(r)}(e,t),this.isSameMonth=(e,t)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(e,t):function(e,t){const[n,r]=Na(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]=Na(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=ga.bind(null,e));const t=va(e,r);(!n||n<t||isNaN(+t))&&(n=t)}),ga(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=ga.bind(null,e));const t=va(e,r);(!n||n>t||isNaN(+t))&&(n=t)}),ga(r,n||NaN)}(e),this.setMonth=(e,t)=>this.overrides?.setMonth?this.overrides.setMonth(e,t):vi(e,t),this.setYear=(e,t)=>this.overrides?.setYear?this.overrides.setYear(e,t):function(e,t,n){const r=va(e,n?.in);return isNaN(+r)?ga(e,NaN):(r.setFullYear(t),r)}(e,t),this.startOfBroadcastWeek=(e,t)=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(e,this):bi(e,this),this.startOfDay=e=>this.overrides?.startOfDay?this.overrides.startOfDay(e):Ma(e),this.startOfISOWeek=e=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(e):Ca(e),this.startOfMonth=e=>this.overrides?.startOfMonth?this.overrides.startOfMonth(e):function(e,t){const n=va(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):ka(e,this.options),this.startOfYear=e=>this.overrides?.startOfYear?this.overrides.startOfYear(e):Da(e),this.options={locale:Wa,...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&&yi.yearFirstLocales.has(e)?"year-first":"month-first"}formatMonthYear(e){const{locale:t,timeZone:n,numerals:r}=this.options,o=t?.code;if(o&&yi.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)}}yi.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 xi=new yi;class wi{constructor(e,t,n=xi){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 ki{constructor(e,t){this.date=e,this.weeks=t}}class Ci{constructor(e,t){this.days=t,this.weekNumber=e}}var Si,ji,Ni,Mi;!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"}(Si||(Si={})),function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"}(ji||(ji={})),function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"}(Ni||(Ni={})),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"}(Mi||(Mi={}));const Ei=t.createContext(void 0);function _i(){const e=t.useContext(Ei);if(void 0===e)throw new Error("useDayPicker() must be used within a custom component.");return e}var Oi=Object.freeze({__proto__:null,Button:function(e){return t.createElement("button",{...e})},CaptionLabel:function(e){return t.createElement("span",{...e})},Chevron:function(e){const{size:n=24,orientation:r="left",className:o}=e;return t.createElement("svg",{className:o,width:n,height:n,viewBox:"0 0 24 24"},"up"===r&&t.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),"down"===r&&t.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),"left"===r&&t.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),"right"===r&&t.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:n,modifiers:r,...o}=e;return t.createElement("td",{...o})},DayButton:function(e){const{day:n,modifiers:r,...o}=e,a=t.useRef(null);return t.useEffect(()=>{r.focused&&a.current?.focus()},[r.focused]),t.createElement("button",{ref:a,...o})},Dropdown:function(e){const{options:n,className:r,components:o,classNames:a,...i}=e,s=[a[Si.Dropdown],r].join(" "),l=n?.find(({value:e})=>e===i.value);return t.createElement("span",{"data-disabled":i.disabled,className:a[Si.DropdownRoot]},t.createElement(o.Select,{className:s,...i},n?.map(({value:e,label:n,disabled:r})=>t.createElement(o.Option,{key:e,value:e,disabled:r},n))),t.createElement("span",{className:a[Si.CaptionLabel],"aria-hidden":!0},l?.label,t.createElement(o.Chevron,{orientation:"down",size:18,className:a[Si.Chevron]})))},DropdownNav:function(e){return t.createElement("div",{...e})},Footer:function(e){return t.createElement("div",{...e})},Month:function(e){const{calendarMonth:n,displayIndex:r,...o}=e;return t.createElement("div",{...o},e.children)},MonthCaption:function(e){const{calendarMonth:n,displayIndex:r,...o}=e;return t.createElement("div",{...o})},MonthGrid:function(e){return t.createElement("table",{...e})},Months:function(e){return t.createElement("div",{...e})},MonthsDropdown:function(e){const{components:n}=_i();return t.createElement(n.Dropdown,{...e})},Nav:function(e){const{onPreviousClick:n,onNextClick:r,previousMonth:o,nextMonth:a,...i}=e,{components:s,classNames:l,labels:{labelPrevious:c,labelNext:u}}=_i(),d=t.useCallback(e=>{a&&r?.(e)},[a,r]),f=t.useCallback(e=>{o&&n?.(e)},[o,n]);return t.createElement("nav",{...i},t.createElement(s.PreviousMonthButton,{type:"button",className:l[Si.PreviousMonthButton],tabIndex:o?void 0:-1,"aria-disabled":!o||void 0,"aria-label":c(o),onClick:f},t.createElement(s.Chevron,{disabled:!o||void 0,className:l[Si.Chevron],orientation:"left"})),t.createElement(s.NextMonthButton,{type:"button",className:l[Si.NextMonthButton],tabIndex:a?void 0:-1,"aria-disabled":!a||void 0,"aria-label":u(a),onClick:d},t.createElement(s.Chevron,{disabled:!a||void 0,orientation:"right",className:l[Si.Chevron]})))},NextMonthButton:function(e){const{components:n}=_i();return t.createElement(n.Button,{...e})},Option:function(e){return t.createElement("option",{...e})},PreviousMonthButton:function(e){const{components:n}=_i();return t.createElement(n.Button,{...e})},Root:function(e){const{rootRef:n,...r}=e;return t.createElement("div",{...r,ref:n})},Select:function(e){return t.createElement("select",{...e})},Week:function(e){const{week:n,...r}=e;return t.createElement("tr",{...r})},WeekNumber:function(e){const{week:n,...r}=e;return t.createElement("th",{...r})},WeekNumberHeader:function(e){return t.createElement("th",{...e})},Weekday:function(e){return t.createElement("th",{...e})},Weekdays:function(e){return t.createElement("thead",{"aria-hidden":!0},t.createElement("tr",{...e}))},Weeks:function(e){return t.createElement("tbody",{...e})},YearsDropdown:function(e){const{components:n}=_i();return t.createElement(n.Dropdown,{...e})}});function Di(e,t,n=!1,r=xi){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 Pi(e){return Boolean(e&&"object"==typeof e&&"before"in e&&"after"in e)}function Ti(e){return Boolean(e&&"object"==typeof e&&"from"in e)}function Ai(e){return Boolean(e&&"object"==typeof e&&"after"in e)}function Ri(e){return Boolean(e&&"object"==typeof e&&"before"in e)}function Ii(e){return Boolean(e&&"object"==typeof e&&"dayOfWeek"in e)}function zi(e,t){return Array.isArray(e)&&e.every(t.isDate)}function Li(e,t,n=xi){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(zi(t,n))return t.includes(e);if(Ti(t))return Di(t,e,!1,n);if(Ii(t))return Array.isArray(t.dayOfWeek)?t.dayOfWeek.includes(e.getDay()):t.dayOfWeek===e.getDay();if(Pi(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 Ai(t)?a(e,t.after)>0:Ri(t)?a(t.before,e)>0:"function"==typeof t&&t(e)})}function Fi(e){return{...Oi,...e}}function Bi(){const e={};for(const t in Si)e[Si[t]]=`rdp-${Si[t]}`;for(const t in ji)e[ji[t]]=`rdp-${ji[t]}`;for(const t in Ni)e[Ni[t]]=`rdp-${Ni[t]}`;for(const t in Mi)e[Mi[t]]=`rdp-${Mi[t]}`;return e}function $i(e,t,n){return(n??new yi(t)).formatMonthYear(e)}const Wi=$i;function Hi(e,t=xi){return t.format(e,"yyyy")}const Ui=Hi;var Vi=Object.freeze({__proto__:null,formatCaption:$i,formatDay:function(e,t,n){return(n??new yi(t)).format(e,"d")},formatMonthCaption:Wi,formatMonthDropdown:function(e,t=xi){return t.format(e,"LLLL")},formatWeekNumber:function(e,t=xi){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)},formatWeekNumberHeader:function(){return""},formatWeekdayName:function(e,t,n){return(n??new yi(t)).format(e,"cccccc")},formatYearCaption:Ui,formatYearDropdown:Hi});function Yi(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 Ki(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 qi(e,t,n,r){let o=(r??new yi(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const Gi=qi;function Xi(e,t,n){return(n??new yi(t)).formatMonthYear(e)}const Zi=Xi;var Qi=Object.freeze({__proto__:null,labelCaption:Zi,labelDay:Gi,labelDayButton:qi,labelGrid:Xi,labelGridcell:function(e,t,n,r){let o=(r??new yi(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 yi(t)).format(e,"cccc")},labelYearDropdown:function(e){return"Choose the Year"}});const Ji=e=>e instanceof HTMLElement?e:null,es=e=>[...e.querySelectorAll("[data-animated-month]")??[]],ts=e=>Ji(e.querySelector("[data-animated-caption]")),ns=e=>Ji(e.querySelector("[data-animated-weeks]"));function rs(e,n,{classNames:r,months:o,focused:a,dateLib:i}){const s=t.useRef(null),l=t.useRef(o),c=t.useRef(!1);t.useLayoutEffect(()=>{const t=l.current;if(l.current=o,!(n&&e.current&&e.current instanceof HTMLElement&&0!==o.length&&0!==t.length&&o.length===t.length))return;const u=i.isSameMonth(o[0].date,t[0].date),d=i.isAfter(o[0].date,t[0].date),f=d?r[Mi.caption_after_enter]:r[Mi.caption_before_enter],p=d?r[Mi.weeks_after_enter]:r[Mi.weeks_before_enter],m=s.current,h=e.current.cloneNode(!0);if(h instanceof HTMLElement){es(h).forEach(e=>{if(!(e instanceof HTMLElement))return;const t=Ji(e.querySelector("[data-animated-month]"));t&&e.contains(t)&&e.removeChild(t);const n=ts(e);n&&n.classList.remove(f);const r=ns(e);r&&r.classList.remove(p)}),s.current=h}else s.current=null;if(c.current||u||a)return;const g=m instanceof HTMLElement?es(m):[],v=es(e.current);if(v?.every(e=>e instanceof HTMLElement)&&g&&g.every(e=>e instanceof HTMLElement)){c.current=!0,e.current.style.isolation="isolate";const t=(b=e.current,Ji(b.querySelector("[data-animated-nav]")));t&&(t.style.zIndex="1"),v.forEach((n,o)=>{const a=g[o];if(!a)return;n.style.position="relative",n.style.overflow="hidden";const i=ts(n);i&&i.classList.add(f);const s=ns(n);s&&s.classList.add(p);const l=()=>{c.current=!1,e.current&&(e.current.style.isolation=""),t&&(t.style.zIndex=""),i&&i.classList.remove(f),s&&s.classList.remove(p),n.style.position="",n.style.overflow="",n.contains(a)&&n.removeChild(a)};a.style.pointerEvents="none",a.style.position="absolute",a.style.overflow="hidden",a.setAttribute("aria-hidden","true");const u=(e=>Ji(e.querySelector("[data-animated-weekdays]")))(a);u&&(u.style.opacity="0");const m=ts(a);m&&(m.classList.add(d?r[Mi.caption_before_exit]:r[Mi.caption_after_exit]),m.addEventListener("animationend",l));const h=ns(a);h&&h.classList.add(d?r[Mi.weeks_before_exit]:r[Mi.weeks_after_exit]),n.insertBefore(a,n.firstChild)})}var b})}function os(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 as(e,n){const[r,o]=t.useState(e);return[void 0===n?r:n,o]}function is(e,n){const[r,o]=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,n),{startOfMonth:a,endOfMonth:i}=n,s=os(e,r,o,n),[l,c]=as(s,e.month?s:void 0);t.useEffect(()=>{const t=os(e,r,o,n);c(t)},[e.timeZone]);const u=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}(l,o,e,n),d=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:b,startOfWeek:y}=r,x=l?v(o,r):i?b(o):y(o),w=u(l?f(a):i?p(m(a)):h(m(a)),x),k=d(a,o)+1,C=[];for(let e=0;e<=w;e++){const n=c(x,e);if(t&&g(n,t))break;C.push(n)}const S=(l?35:42)*k;if(s&&C.length<S){const e=S-C.length;for(let t=0;t<e;t++){const e=c(C[C.length-1],1);C.push(e)}}return C}(u,e.endMonth?i(e.endMonth):void 0,e,n),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),b=n.broadcastCalendar?35:42;if(n.fixedWeeks&&v.length<b){const e=t.filter(e=>{const t=b-v.length;return e>g&&e<=o(g,t)});v.push(...e)}const y=v.reduce((e,t)=>{const o=n.ISOWeek?c(t):u(t),a=e.find(e=>e.weekNumber===o),i=new wi(t,m,r);return a?a.days.push(i):e.push(new Ci(o,[i])),e},[]),x=new ki(m,y);return e.push(x),e},[]);return n.reverseMonths?m.reverse():m}(u,d,e,n),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)}(l,r,e,n),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)}(l,o,e,n),{disableNavigation:v,onMonthChange:b}=e,y=e=>{if(v)return;let t=a(e);r&&t<a(r)&&(t=a(r)),o&&t>a(o)&&(t=a(o)),c(t),b?.(t)};return{months:f,weeks:p,days:m,navStart:r,navEnd:o,previousMonth:h,nextMonth:g,goToMonth:y,goToDay:e=>{(e=>p.some(t=>t.days.some(t=>t.isEqualTo(e))))(e)||y(e.date)}}}var ss;function ls(e){return!e[ji.disabled]&&!e[ji.hidden]&&!e[ji.outside]}function cs(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:b,startOfISOWeek:y,startOfWeek:x}=i,w={day:c,week:d,month:u,year:f,startOfWeek:e=>l?b(e,i):s?y(e):x(e),endOfWeek:e=>l?p(e):s?m(e):h(e)};let k=w[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&&Li(l,a.disabled,i)),u=Boolean(a.hidden&&Li(l,a.hidden,i)),d=new wi(l,l,i);return c||u?cs(e,t,d,r,o,a,i,s+1):d}function us(e,n,r,o,a){const{autoFocus:i}=e,[s,l]=t.useState(),c=function(e,t,n,r){let o,a=-1;for(const i of e){const e=t(i);ls(e)&&(e[ji.focused]&&a<ss.FocusedModifier?(o=i,a=ss.FocusedModifier):r?.isEqualTo(i)&&a<ss.LastFocused?(o=i,a=ss.LastFocused):n(i.date)&&a<ss.Selected?(o=i,a=ss.Selected):e[ji.today]&&a<ss.Today&&(o=i,a=ss.Today))}return o||(o=e.find(e=>ls(t(e)))),o}(n.days,r,o||(()=>!1),s),[u,d]=t.useState(i?c:void 0);return{isFocusTarget:e=>Boolean(c?.isEqualTo(e)),setFocused:d,focused:u,blur:()=>{l(u),d(void 0)},moveFocus:(t,r)=>{if(!u)return;const o=cs(t,r,u,n.navStart,n.navEnd,e,a);if(o){if(e.disableNavigation){if(!n.days.some(e=>e.isEqualTo(o)))return}n.goToDay(o),d(o)}}}}function ds(e,t,n=xi){return Di(e,t.from,!1,n)||Di(e,t.to,!1,n)||Di(t,e.from,!1,n)||Di(t,e.to,!1,n)}function fs(e,t,n=xi){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 Di(e,t,!1,n);if(zi(t,n))return t.some(t=>Di(e,t,!1,n));if(Ti(t))return!(!t.from||!t.to)&&ds(e,{from:t.from,to:t.to},n);if(Ii(t))return function(e,t,n=xi){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(Pi(t)){return n.isAfter(t.before,t.after)?ds(e,{from:n.addDays(t.after,1),to:n.addDays(t.before,-1)},n):Li(e.from,t,n)||Li(e.to,t,n)}return!(!Ai(t)&&!Ri(t))&&(Li(e.from,t,n)||Li(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 ps(e,t){const{disabled:n,excludeDisabled:r,selected:o,required:a,onSelect:i}=e,[s,l]=as(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=xi){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&&fs({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&&Di(c,e,!1,t)}}function ms(e,t){const n=function(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=as(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]=as(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=ps(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function hs(e){let n=e;n.timeZone&&(n={...e},n.today&&(n.today=new pa(n.today,n.timeZone)),n.month&&(n.month=new pa(n.month,n.timeZone)),n.defaultMonth&&(n.defaultMonth=new pa(n.defaultMonth,n.timeZone)),n.startMonth&&(n.startMonth=new pa(n.startMonth,n.timeZone)),n.endMonth&&(n.endMonth=new pa(n.endMonth,n.timeZone)),"single"===n.mode&&n.selected?n.selected=new pa(n.selected,n.timeZone):"multiple"===n.mode&&n.selected?n.selected=n.selected?.map(e=>new pa(e,n.timeZone)):"range"===n.mode&&n.selected&&(n.selected={from:n.selected.from?new pa(n.selected.from,n.timeZone):void 0,to:n.selected.to?new pa(n.selected.to,n.timeZone):void 0}));const{components:r,formatters:o,labels:a,dateLib:i,locale:s,classNames:l}=t.useMemo(()=>{const e={...Wa,...n.locale};return{dateLib:new yi({locale:e,weekStartsOn:n.broadcastCalendar?1:n.weekStartsOn,firstWeekContainsDate:n.firstWeekContainsDate,useAdditionalWeekYearTokens:n.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:n.useAdditionalDayOfYearTokens,timeZone:n.timeZone,numerals:n.numerals},n.dateLib),components:Fi(n.components),formatters:(t=n.formatters,t?.formatMonthCaption&&!t.formatCaption&&(t.formatCaption=t.formatMonthCaption),t?.formatYearCaption&&!t.formatYearDropdown&&(t.formatYearDropdown=t.formatYearCaption),{...Vi,...t}),labels:{...Qi,...n.labels},locale:e,classNames:{...Bi(),...n.classNames}};var t},[n.locale,n.broadcastCalendar,n.weekStartsOn,n.firstWeekContainsDate,n.useAdditionalWeekYearTokens,n.useAdditionalDayOfYearTokens,n.timeZone,n.numerals,n.dateLib,n.components,n.formatters,n.labels,n.classNames]),{captionLayout:c,mode:u,navLayout:d,numberOfMonths:f=1,onDayBlur:p,onDayClick:m,onDayFocus:h,onDayKeyDown:g,onDayMouseEnter:v,onDayMouseLeave:b,onNextClick:y,onPrevClick:x,showWeekNumber:w,styles:k}=n,{formatCaption:C,formatDay:S,formatMonthDropdown:j,formatWeekNumber:N,formatWeekNumberHeader:M,formatWeekdayName:E,formatYearDropdown:_}=o,O=is(n,i),{days:D,months:P,navStart:T,navEnd:A,previousMonth:R,nextMonth:I,goToMonth:z}=O,L=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),b=r&&h(r),y={[ji.focused]:[],[ji.outside]:[],[ji.disabled]:[],[ji.hidden]:[],[ji.today]:[]},x={};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(b&&g(e,b)),w=Boolean(a&&Li(e,a,o)),k=Boolean(i&&Li(e,i,o))||p||h||!c&&!l&&r||c&&!1===l&&r,C=d(e,u??o.today());r&&y.outside.push(t),w&&y.disabled.push(t),k&&y.hidden.push(t),C&&y.today.push(t),s&&Object.keys(s).forEach(n=>{const r=s?.[n];r&&Li(e,r,o)&&(x[n]?x[n].push(t):x[n]=[t])})}return e=>{const t={[ji.focused]:!1,[ji.disabled]:!1,[ji.hidden]:!1,[ji.outside]:!1,[ji.today]:!1},n={};for(const n in y){const r=y[n];t[n]=r.some(t=>t===e)}for(const t in x)n[t]=x[t].some(t=>t===e);return{...t,...n}}}(D,n,T,A,i),{isSelected:F,select:B,selected:$}=ms(n,i)??{},{blur:W,focused:H,isFocusTarget:U,moveFocus:V,setFocused:Y}=us(n,O,L,F??(()=>!1),i),{labelDayButton:K,labelGridcell:q,labelGrid:G,labelMonthDropdown:X,labelNav:Z,labelPrevious:Q,labelNext:J,labelWeekday:ee,labelWeekNumber:te,labelWeekNumberHeader:ne,labelYearDropdown:re}=a,oe=t.useMemo(()=>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,n.ISOWeek),[i,n.ISOWeek]),ae=void 0!==u||void 0!==m,ie=t.useCallback(()=>{R&&(z(R),x?.(R))},[R,z,x]),se=t.useCallback(()=>{I&&(z(I),y?.(I))},[z,I,y]),le=t.useCallback((e,t)=>n=>{n.preventDefault(),n.stopPropagation(),Y(e),B?.(e.date,t,n),m?.(e.date,t,n)},[B,m,Y]),ce=t.useCallback((e,t)=>n=>{Y(e),h?.(e.date,t,n)},[h,Y]),ue=t.useCallback((e,t)=>n=>{W(),p?.(e.date,t,n)},[W,p]),de=t.useCallback((e,t)=>r=>{const o={ArrowLeft:[r.shiftKey?"month":"day","rtl"===n.dir?"after":"before"],ArrowRight:[r.shiftKey?"month":"day","rtl"===n.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];V(e,t)}g?.(e.date,t,r)},[V,g,n.dir]),fe=t.useCallback((e,t)=>n=>{v?.(e.date,t,n)},[v]),pe=t.useCallback((e,t)=>n=>{b?.(e.date,t,n)},[b]),me=t.useCallback(e=>t=>{const n=Number(t.target.value),r=i.setMonth(i.startOfMonth(e),n);z(r)},[i,z]),he=t.useCallback(e=>t=>{const n=Number(t.target.value),r=i.setYear(i.startOfMonth(e),n);z(r)},[i,z]),{className:ge,style:ve}=t.useMemo(()=>({className:[l[Si.Root],n.className].filter(Boolean).join(" "),style:{...k?.[Si.Root],...n.style}}),[l,n.className,n.style,k]),be=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}(n),ye=t.useRef(null);rs(ye,Boolean(n.animate),{classNames:l,months:P,focused:H,dateLib:i});const xe={dayPickerProps:n,selected:$,select:B,isSelected:F,months:P,nextMonth:I,previousMonth:R,goToMonth:z,getModifiers:L,components:r,classNames:l,styles:k,labels:a,formatters:o};return t.createElement(Ei.Provider,{value:xe},t.createElement(r.Root,{rootRef:n.animate?ye:void 0,className:ge,style:ve,dir:n.dir,id:n.id,lang:n.lang,nonce:n.nonce,title:n.title,role:n.role,"aria-label":n["aria-label"],"aria-labelledby":n["aria-labelledby"],...be},t.createElement(r.Months,{className:l[Si.Months],style:k?.[Si.Months]},!n.hideNavigation&&!d&&t.createElement(r.Nav,{"data-animated-nav":n.animate?"true":void 0,className:l[Si.Nav],style:k?.[Si.Nav],"aria-label":Z(),onPreviousClick:ie,onNextClick:se,previousMonth:R,nextMonth:I}),P.map((e,a)=>t.createElement(r.Month,{"data-animated-month":n.animate?"true":void 0,className:l[Si.Month],style:k?.[Si.Month],key:a,displayIndex:a,calendarMonth:e},"around"===d&&!n.hideNavigation&&0===a&&t.createElement(r.PreviousMonthButton,{type:"button",className:l[Si.PreviousMonthButton],tabIndex:R?void 0:-1,"aria-disabled":!R||void 0,"aria-label":Q(R),onClick:ie,"data-animated-button":n.animate?"true":void 0},t.createElement(r.Chevron,{disabled:!R||void 0,className:l[Si.Chevron],orientation:"rtl"===n.dir?"right":"left"})),t.createElement(r.MonthCaption,{"data-animated-caption":n.animate?"true":void 0,className:l[Si.MonthCaption],style:k?.[Si.MonthCaption],calendarMonth:e,displayIndex:a},c?.startsWith("dropdown")?t.createElement(r.DropdownNav,{className:l[Si.Dropdowns],style:k?.[Si.Dropdowns]},(()=>{const a="dropdown"===c||"dropdown-months"===c?t.createElement(r.MonthsDropdown,{key:"month",className:l[Si.MonthsDropdown],"aria-label":X(),classNames:l,components:r,disabled:Boolean(n.disableNavigation),onChange:me(e.date),options:Yi(e.date,T,A,o,i),style:k?.[Si.Dropdown],value:i.getMonth(e.date)}):t.createElement("span",{key:"month"},j(e.date,i)),s="dropdown"===c||"dropdown-years"===c?t.createElement(r.YearsDropdown,{key:"year",className:l[Si.YearsDropdown],"aria-label":re(i.options),classNames:l,components:r,disabled:Boolean(n.disableNavigation),onChange:he(e.date),options:Ki(T,A,o,i,Boolean(n.reverseYears)),style:k?.[Si.Dropdown],value:i.getYear(e.date)}):t.createElement("span",{key:"year"},_(e.date,i));return"year-first"===i.getMonthYearOrder()?[s,a]:[a,s]})(),t.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"}},C(e.date,i.options,i))):t.createElement(r.CaptionLabel,{className:l[Si.CaptionLabel],role:"status","aria-live":"polite"},C(e.date,i.options,i))),"around"===d&&!n.hideNavigation&&a===f-1&&t.createElement(r.NextMonthButton,{type:"button",className:l[Si.NextMonthButton],tabIndex:I?void 0:-1,"aria-disabled":!I||void 0,"aria-label":J(I),onClick:se,"data-animated-button":n.animate?"true":void 0},t.createElement(r.Chevron,{disabled:!I||void 0,className:l[Si.Chevron],orientation:"rtl"===n.dir?"left":"right"})),a===f-1&&"after"===d&&!n.hideNavigation&&t.createElement(r.Nav,{"data-animated-nav":n.animate?"true":void 0,className:l[Si.Nav],style:k?.[Si.Nav],"aria-label":Z(),onPreviousClick:ie,onNextClick:se,previousMonth:R,nextMonth:I}),t.createElement(r.MonthGrid,{role:"grid","aria-multiselectable":"multiple"===u||"range"===u,"aria-label":G(e.date,i.options,i)||void 0,className:l[Si.MonthGrid],style:k?.[Si.MonthGrid]},!n.hideWeekdays&&t.createElement(r.Weekdays,{"data-animated-weekdays":n.animate?"true":void 0,className:l[Si.Weekdays],style:k?.[Si.Weekdays]},w&&t.createElement(r.WeekNumberHeader,{"aria-label":ne(i.options),className:l[Si.WeekNumberHeader],style:k?.[Si.WeekNumberHeader],scope:"col"},M()),oe.map(e=>t.createElement(r.Weekday,{"aria-label":ee(e,i.options,i),className:l[Si.Weekday],key:String(e),style:k?.[Si.Weekday],scope:"col"},E(e,i.options,i)))),t.createElement(r.Weeks,{"data-animated-weeks":n.animate?"true":void 0,className:l[Si.Weeks],style:k?.[Si.Weeks]},e.weeks.map(e=>t.createElement(r.Week,{className:l[Si.Week],key:e.weekNumber,style:k?.[Si.Week],week:e},w&&t.createElement(r.WeekNumber,{week:e,style:k?.[Si.WeekNumber],"aria-label":te(e.weekNumber,{locale:s}),className:l[Si.WeekNumber],scope:"row",role:"rowheader"},N(e.weekNumber,i)),e.days.map(e=>{const{date:o}=e,a=L(e);if(a[ji.focused]=!a.hidden&&Boolean(H?.isEqualTo(e)),a[Ni.selected]=F?.(o)||a.selected,Ti($)){const{from:e,to:t}=$;a[Ni.range_start]=Boolean(e&&t&&i.isSameDay(o,e)),a[Ni.range_end]=Boolean(e&&t&&i.isSameDay(o,t)),a[Ni.range_middle]=Di($,o,!0,i)}const s=function(e,t={},n={}){let r={...t?.[Si.Day]};return Object.entries(e).filter(([,e])=>!0===e).forEach(([e])=>{r={...r,...n?.[e]}}),r}(a,k,n.modifiersStyles),c=function(e,t,n={}){return Object.entries(e).filter(([,e])=>!0===e).reduce((e,[r])=>(n[r]?e.push(n[r]):t[ji[r]]?e.push(t[ji[r]]):t[Ni[r]]&&e.push(t[Ni[r]]),e),[t[Si.Day]])}(a,l,n.modifiersClassNames),u=ae||a.hidden?void 0:q(o,a,i.options,i);return t.createElement(r.Day,{key:`${i.format(o,"yyyy-MM-dd")}_${i.format(e.displayMonth,"yyyy-MM")}`,day:e,modifiers:a,className:c.join(" "),style:s,role:"gridcell","aria-selected":a.selected||void 0,"aria-label":u,"data-day":i.format(o,"yyyy-MM-dd"),"data-month":e.outside?i.format(o,"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&&ae?t.createElement(r.DayButton,{className:l[Si.DayButton],style:k?.[Si.DayButton],type:"button",day:e,modifiers:a,disabled:a.disabled||void 0,tabIndex:U(e)?0:-1,"aria-label":K(o,a,i.options,i),onClick:le(e,a),onBlur:ue(e,a),onFocus:ce(e,a),onKeyDown:de(e,a),onMouseEnter:fe(e,a),onMouseLeave:pe(e,a)},S(o,i.options,i)):!a.hidden&&S(e.date,i.options,i))})))))))),n.footer&&t.createElement(r.Footer,{className:l[Si.Footer],style:k?.[Si.Footer],role:"status","aria-live":"polite"},n.footer)))}function gs({className:t,day:n,modifiers:r,...o}){const a=Bi(),s=i.useRef(null);return i.useEffect(()=>{r.focused&&s.current?.focus()},[r.focused]),e.jsx(Co,{ref:s,variant:"ghost",size:"icon","data-day":n.date.toLocaleDateString(),"data-selected-single":r.selected&&!r.range_start&&!r.range_end&&!r.range_middle,"data-range-start":r.range_start,"data-range-end":r.range_end,"data-range-middle":r.range_middle,className:Rt("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",a.day,t),...o})}function vs(e){return function(e){return"[object Object]"===Object.prototype.toString.call(e)}(e)||Array.isArray(e)}function bs(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}`:vs(r)&&vs(o)?bs(r,o):r===o})}function ys(e){return e.concat().sort((e,t)=>e.name>t.name?1:-1).map(e=>e.options)}function xs(e){return"number"==typeof e}function ws(e){return"string"==typeof e}function ks(e){return"boolean"==typeof e}function Cs(e){return"[object Object]"===Object.prototype.toString.call(e)}function Ss(e){return Math.abs(e)}function js(e){return Math.sign(e)}function Ns(e,t){return Ss(e-t)}function Ms(e){return Ps(e).map(Number)}function Es(e){return e[_s(e)]}function _s(e){return Math.max(0,e.length-1)}function Os(e,t){return t===_s(e)}function Ds(e,t=0){return Array.from(Array(e),(e,n)=>t+n)}function Ps(e){return Object.keys(e)}function Ts(e,t){return[e,t].reduce((e,t)=>(Ps(t).forEach(n=>{const r=e[n],o=t[n],a=Cs(r)&&Cs(o);e[n]=a?Ts(r,o):o}),e),{})}function As(e,t){return void 0!==t.MouseEvent&&e instanceof t.MouseEvent}function Rs(){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 Is(e,t,n,r){const o=Rs(),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 zs(e=0,t=0){const n=Ss(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 Ls(e,t,n){const{constrain:r}=zs(0,e),o=e+1;let a=i(t);function i(e){return n?Ss((o+e)%o):r(e)}function s(){return a}function l(){return Ls(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 Fs(e,t,n,r,o,a,i,s,l,c,u,d,f,p,m,h,g,v,b){const{cross:y,direction:x}=e,w=["INPUT","SELECT","TEXTAREA"],k={passive:!1},C=Rs(),S=Rs(),j=zs(50,225).constrain(p.measure(20)),N={mouse:300,touch:400},M={mouse:500,touch:600},E=m?43:25;let _=!1,O=0,D=0,P=!1,T=!1,A=!1,R=!1;function I(e){if(!As(e,r)&&e.touches.length>=2)return z(e);const t=a.readPoint(e),n=a.readPoint(e,y),i=Ns(t,O),l=Ns(n,D);if(!T&&!R){if(!e.cancelable)return z(e);if(T=i>l,!T)return z(e)}const u=a.pointerMove(e);i>h&&(A=!0),c.useFriction(.3).useDuration(.75),s.start(),o.add(x(u)),e.preventDefault()}function z(e){const t=u.byDistance(0,!1).index!==d.get(),n=a.pointerUp(e)*(m?M:N)[R?"mouse":"touch"],r=function(e,t){const n=d.add(-1*js(e)),r=u.byDistance(e,!m).distance;return m||Ss(e)<j?r:g&&t?.5*r:u.byIndex(n.get(),0).distance}(x(n),t),o=function(e,t){if(0===e||0===t)return 0;if(Ss(e)<=Ss(t))return 0;const n=Ns(Ss(e),Ss(t));return Ss(n/e)}(n,r),i=E-10*o,s=v+o/50;T=!1,P=!1,S.clear(),c.useDuration(i).useFriction(s),l.distance(r,!m),R=!1,f.emit("pointerUp")}function L(e){A&&(e.stopPropagation(),e.preventDefault(),A=!1)}return{init:function(e){if(!b)return;function s(s){(ks(b)||b(e,s))&&function(e){const s=As(e,r);if(R=s,A=m&&s&&!e.buttons&&_,_=Ns(o.get(),i.get())>=2,s&&0!==e.button)return;if(function(e){const t=e.nodeName||"";return w.includes(t)}(e.target))return;P=!0,a.pointerDown(e),c.useFriction(0).useDuration(0),o.set(i),function(){const e=R?n:t;S.add(e,"touchmove",I,k).add(e,"touchend",z).add(e,"mousemove",I,k).add(e,"mouseup",z)}(),O=a.readPoint(e),D=a.readPoint(e,y),f.emit("pointerDown")}(s)}const l=t;C.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(){C.clear(),S.clear()},pointerDown:function(){return P}}}function Bs(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(As(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&&Ss(l)>.1?l:0},readPoint:a}}function $s(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=>{(ks(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(Ss(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 Ws(e,t,n,r,o){const a=o.measure(10),i=o.measure(50),s=zs(.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=Ss(e[l]-t.get()),d=n.get()-t.get(),f=s.constrain(u/i);n.subtract(d*f),!o&&Ss(d)<a&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())},toggleActive:function(e){l=!e}}}function Hs(e,t,n,r){const o=t.min+.1,a=t.max+.1,{reachedMin:i,reachedMax:s}=zs(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 Us(e,t,n,r,o){const{reachedAny:a,removeOffset:i,constrain:s}=r;function l(e){return e.concat().sort((e,t)=>Ss(e)-Ss(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=>js(e)===r);return a.length?l(a):Es(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)=>Ss(e.diff)-Ss(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 Vs(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=>{(ks(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));xs(a)&&(o.useDuration(0),r.index(a,0),i.emit("slideFocus"))}(u)},l)}))}};return d}function Ys(e){let t=e;function n(e){return xs(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 Ks(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 qs(e,t,n,r,o,a,i,s,l){const c=Ms(o),u=Ms(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:Ys(-1),translate:Ks(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 Gs(e,t,n){let r,o=!1;return{init:function(a){n&&(r=new MutationObserver(e=>{o||(ks(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 Xs(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 Ps(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 Zs(e,t,n,r,o,a,i,s,l){const{startEdge:c,endEdge:u,direction:d}=e,f=xs(n);const p={groupSlides:function(e){return f?function(e,t){return Ms(e).filter(e=>e%t===0).map(n=>e.slice(n,n+t))}(e,n):function(e){return e.length?Ms(e).reduce((n,f,p)=>{const m=Es(n)||0,h=0===m,g=f===_s(e),v=o[c]-a[m][c],b=o[c]-a[f][u],y=!r&&h?d(i):0,x=Ss(b-(!r&&g?d(s):0)-(v+y));return p&&x>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 Qs(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:b,watchResize:y,watchSlides:x,watchDrag:w,watchFocus:k}=a,C={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=C.measure(t),j=n.map(C.measure),N=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=N.measureSize(S),E=function(e){return{measure:function(t){return e*(t/100)}}}(M),_=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 ws(e)?n[e](r):e(t,r,o)}};return o}(s,M),O=!d&&!!b,D=d||!!b,{slideSizes:P,slideSizesWithGaps:T,startGap:A,endGap:R}=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 Ss(t[s]-e[s])}(),d=function(){if(!c)return 0;const e=a.getComputedStyle(Es(r));return parseFloat(e.getPropertyValue(`margin-${l}`))}(),f=n.map(i),p=n.map((e,t,n)=>{const r=!t,o=Os(n,t);return r?f[t]+u:o?f[t]+d:n[t+1][s]-e[s]}).map(Ss);return{slideSizes:f,slideSizesWithGaps:p,startGap:u,endGap:d}}(N,S,j,n,D,o),I=Zs(N,M,g,d,S,j,A,R,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=>Es(e)[i]-e[0][a]).map(Ss).map(t.measure),c=r.map(e=>n[a]-e[a]).map(e=>-Ss(e)),u=s(c).map(e=>e[0]).map((e,t)=>e+l[t]);return{snaps:c,snapsAligned:u}}(N,_,S,j,I),F=-Es(z)+Es(T),{snapsContained:B,scrollContainLimit:$}=function(e,t,n,r,o){const a=zs(-t+e,0),i=n.map((e,t)=>{const{min:r,max:o}=a,i=a.constrain(e),s=!t,l=Os(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=Es(i);return zs(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 Ns(e,t)<=1}return{snapsContained:l,scrollContainLimit:s}}(M,F,L,b,2),W=O?B:L,{limit:H}=function(e,t,n){const r=t[0];return{limit:zs(n?r-e:Es(t),r)}}(F,W,d),U=Ls(_s(W),u,d),V=U.clone(),Y=Ms(n),K=Is(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=Ys(q),X=Ys(q),Z=Ys(q),Q=Ys(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=js(o),d=u,m},settled:function(){return Ss(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=Us(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=Rs(),oe=Xs(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=Os(n,t);return r?Ds(Es(n[0])+1):o?Ds(_s(a)-Es(n)[0]+1,Es(n)[0]):e})}();return{slideRegistry:c}}(O,b,W,$,I,Y),ie=Vs(e,n,ae,te,J,re,i,k),se={ownerDocument:r,ownerWindow:o,eventHandler:i,containerRect:S,slideRects:j,animation:K,axis:N,dragHandler:Fs(N,e,r,o,Q,Bs(N,o),G,K,te,J,ee,U,i,E,p,m,v,.68,w),eventStore:re,percentOfView:E,index:U,indexPrevious:V,limit:H,location:G,offsetLocation:Z,previousLocation:X,options:a,resizeHandler:$s(t,i,o,n,N,y,C),scrollBody:J,scrollBounds:Ws(H,Z,Q,J,E),scrollLooper:Hs(F,H,Z,[G,Z,X,Q]),scrollProgress:ne,scrollSnapList:W.map(ne.get),scrollSnaps:W,scrollTarget:ee,scrollTo:te,slideLooper:qs(N,M,F,P,T,z,W,Z,n),slideFocus:ie,slidesHandler:Gs(t,i,x),slidesInView:oe,slideIndexes:Y,slideRegistry:ae,slidesToScroll:I,target:Q,translate:Ks(N,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"}(ss||(ss={}));const Js={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 el(e){function t(e,t){return Ts(e,t||{})}const n={mergeOptions:t,optionsAtMedia:function(n){const r=n.breakpoints||{},o=Ps(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=>Ps(e.breakpoints||{})).reduce((e,t)=>e.concat(t),[]).map(e.matchMedia)}};return n}function tl(e,t,n){const r=e.ownerDocument,o=r.defaultView,a=el(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=Rs(),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=N;let g,v,b,y,x=!1,w=c(Js,tl.globalOptions),k=c(w),C=[];function S(t){const n=Qs(e,b,y,r,o,t,l);if(t.loop&&!n.slideLooper.canLoop()){return S(Object.assign({},t,{loop:!1}))}return n}function j(t,n){x||(w=c(w,t),k=u(w),C=n||C,function(){const{container:t,slides:n}=k,r=ws(t)?e.querySelector(t):t;b=r||e.children[0];const o=ws(n)?b.querySelectorAll(n):n;y=[].slice.call(o||b.children)}(),g=S(k),d([w,...C.map(({options:e})=>e)]).forEach(e=>s.add(e,"change",N)),k.active&&(g.translate.to(g.location.get()),g.animation.init(),g.slidesInView.init(),g.slideFocus.init(O),g.eventHandler.init(O),g.resizeHandler.init(O),g.slidesHandler.init(O),g.options.loop&&g.slideLooper.loop(),b.offsetParent&&y.length&&g.dragHandler.init(O),v=i.init(O,C)))}function N(e,t){const n=_();M(),j(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&&!x&&(g.scrollBody.useBaseFriction().useDuration(!0===t?0:k.duration),g.scrollTo.index(e,n||0))}function _(){return g.index.get()}const O={canScrollNext:function(){return g.index.add(1).get()!==_()},canScrollPrev:function(){return g.index.add(-1).get()!==_()},containerNode:function(){return b},internalEngine:function(){return g},destroy:function(){x||(x=!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:_,slideNodes:function(){return y},slidesInView:function(){return g.slidesInView.get()},slidesNotInView:function(){return g.slidesInView.get(!1)}};return j(t,n),setTimeout(()=>l.emit("init"),0),O}function nl(e={},n=[]){const r=t.useRef(e),o=t.useRef(n),[a,i]=t.useState(),[s,l]=t.useState(),c=t.useCallback(()=>{a&&a.reInit(r.current,o.current)},[a]);return t.useEffect(()=>{bs(r.current,e)||(r.current=e,c())},[e,c]),t.useEffect(()=>{(function(e,t){if(e.length!==t.length)return!1;const n=ys(e),r=ys(t);return n.every((e,t)=>bs(e,r[t]))})(o.current,n)||(o.current=n,c())},[n,c]),t.useEffect(()=>{if("undefined"!=typeof window&&window.document&&window.document.createElement&&s){tl.globalOptions=nl.globalOptions;const e=tl(s,r.current,o.current);return i(e),()=>e.destroy()}i(void 0)},[s,i]),[l,a]}tl.globalOptions=void 0,nl.globalOptions=void 0;const rl=i.createContext(null);function ol(){const e=i.useContext(rl);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var al=["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 il(e){return"string"==typeof e&&al.includes(e)}var sl=["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 ll(e){return"string"==typeof e&&sl.includes(e)}function cl(e){return"string"==typeof e&&e.startsWith("data-")}function ul(e){var t=Object.entries(e).filter(e=>{var[t]=e;return ll(t)||cl(t)});return Object.fromEntries(t)}function dl(e){var t=Object.entries(e).filter(e=>{var[t]=e;return ll(t)||cl(t)||il(t)});return Object.fromEntries(t)}var fl=["children","width","height","viewBox","className","style","title","desc"];function pl(){return pl=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},pl.apply(null,arguments)}var ml=t.forwardRef((e,t)=>{var{children:n,width:r,height:o,viewBox:a,className:s,style:l,title:c,desc:u}=e,d=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var 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,fl),f=a||{width:r,height:o,x:0,y:0},p=Ee("recharts-surface",s);return i.createElement("svg",pl({},dl(d),{className:p,width:r,height:o,style:l,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height),ref:t}),i.createElement("title",null,c),i.createElement("desc",null,u),n)}),hl=t.createContext(null);function gl(e){return function(){return e}}const vl=Math.cos,bl=Math.sin,yl=Math.sqrt,xl=Math.PI,wl=2*xl,kl=Math.PI,Cl=2*kl,Sl=1e-6,jl=Cl-Sl;function Nl(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}class Ml{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?Nl:function(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Nl;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>Sl)if(Math.abs(u*s-l*c)>Sl&&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),b=o*Math.tan((kl-Math.acos((m+d-h)/(2*g*v)))/2),y=b/v,x=b/g;Math.abs(y-1)>Sl&&this._append`L${e+y*c},${t+y*u}`,this._append`A${o},${o},0,0,${+(u*f>c*p)},${this._x1=e+x*s},${this._y1=t+x*l}`}else this._append`L${this._x1=e},${this._y1=t}`;else;}arc(e,t,n,r,o,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)>Sl||Math.abs(this._y1-c)>Sl)&&this._append`L${l},${c}`,n&&(d<0&&(d=d%Cl+Cl),d>jl?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>Sl&&this._append`A${n},${n},0,${+(d>=kl)},${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 El(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 Ml(t)}function _l(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function Ol(e){this._context=e}function Dl(e){return new Ol(e)}function Pl(e){return e[0]}function Tl(e){return e[1]}function Al(e,t){var n=gl(!0),r=null,o=Dl,a=null,i=El(s);function s(s){var l,c,u,d=(s=_l(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?Pl:gl(e),t="function"==typeof t?t:void 0===t?Tl:gl(t),s.x=function(t){return arguments.length?(e="function"==typeof t?t:gl(+t),s):e},s.y=function(e){return arguments.length?(t="function"==typeof e?e:gl(+e),s):t},s.defined=function(e){return arguments.length?(n="function"==typeof e?e:gl(!!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 Rl(e,t,n){var r=null,o=gl(!0),a=null,i=Dl,s=null,l=El(c);function c(c){var u,d,f,p,m,h=(c=_l(c)).length,g=!1,v=new Array(h),b=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],b[f]);s.lineEnd(),s.areaEnd()}g&&(v[u]=+e(p,u,c),b[u]=+t(p,u,c),s.point(r?+r(p,u,c):v[u],n?+n(p,u,c):b[u]))}if(m)return s=null,m+""||null}function u(){return Al().defined(o).curve(i).context(a)}return e="function"==typeof e?e:void 0===e?Pl:gl(+e),t="function"==typeof t?t:gl(void 0===t?0:+t),n="function"==typeof n?n:void 0===n?Tl:gl(+n),c.x=function(t){return arguments.length?(e="function"==typeof t?t:gl(+t),r=null,c):e},c.x0=function(t){return arguments.length?(e="function"==typeof t?t:gl(+t),c):e},c.x1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:gl(+e),c):r},c.y=function(e){return arguments.length?(t="function"==typeof e?e:gl(+e),n=null,c):t},c.y0=function(e){return arguments.length?(t="function"==typeof e?e:gl(+e),c):t},c.y1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:gl(+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:gl(!!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}Ol.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 Il{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 zl={draw(e,t){const n=yl(t/xl);e.moveTo(n,0),e.arc(0,0,n,0,wl)}},Ll={draw(e,t){const n=yl(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 Fl=yl(1/3),Bl=2*Fl;var $l={draw(e,t){const n=yl(t/Bl),r=n*Fl;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Wl={draw(e,t){const n=yl(t),r=-n/2;e.rect(r,r,n,n)}};const Hl=bl(xl/10)/bl(7*xl/10),Ul=bl(wl/10)*Hl,Vl=-vl(wl/10)*Hl;var Yl={draw(e,t){const n=yl(.8908130915292852*t),r=Ul*n,o=Vl*n;e.moveTo(0,-n),e.lineTo(r,o);for(let t=1;t<5;++t){const a=wl*t/5,i=vl(a),s=bl(a);e.lineTo(s*n,-i*n),e.lineTo(i*r-s*o,s*r+i*o)}e.closePath()}};const Kl=yl(3);var ql={draw(e,t){const n=-yl(t/(3*Kl));e.moveTo(0,2*n),e.lineTo(-Kl*n,-n),e.lineTo(Kl*n,-n),e.closePath()}};const Gl=-.5,Xl=yl(3)/2,Zl=1/yl(12),Ql=3*(Zl/2+1);var Jl={draw(e,t){const n=yl(t/Ql),r=n/2,o=n*Zl,a=r,i=n*Zl+n,s=-a,l=i;e.moveTo(r,o),e.lineTo(a,i),e.lineTo(s,l),e.lineTo(Gl*r-Xl*o,Xl*r+Gl*o),e.lineTo(Gl*a-Xl*i,Xl*a+Gl*i),e.lineTo(Gl*s-Xl*l,Xl*s+Gl*l),e.lineTo(Gl*r+Xl*o,Gl*o-Xl*r),e.lineTo(Gl*a+Xl*i,Gl*i-Xl*a),e.lineTo(Gl*s+Xl*l,Gl*l-Xl*s),e.closePath()}};function ec(){}function tc(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 nc(e){this._context=e}function rc(e){this._context=e}function oc(e){this._context=e}function ac(e){this._context=e}function ic(e){return e<0?-1:1}function sc(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(ic(a)+ic(i))*Math.min(Math.abs(a),Math.abs(i),.5*Math.abs(s))||0}function lc(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function cc(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 uc(e){this._context=e}function dc(e){this._context=new fc(e)}function fc(e){this._context=e}function pc(e){this._context=e}function mc(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 hc(e,t){this._context=e,this._t=t}function gc(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 vc(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function bc(e,t){return e[t]}function yc(e){const t=[];return t.key=e,t}nc.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:tc(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:tc(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},rc.prototype={areaStart:ec,areaEnd:ec,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:tc(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},oc.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:tc(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},ac.prototype={areaStart:ec,areaEnd:ec,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))}},uc.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:cc(this,this._t0,lc(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,cc(this,lc(this,n=sc(this,e,t)),n);break;default:cc(this,this._t0,n=sc(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(dc.prototype=Object.create(uc.prototype)).point=function(e,t){uc.prototype.point.call(this,t,e)},fc.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)}},pc.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=mc(e),o=mc(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)}},hc.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 xc,wc={},kc={};function Cc(){return xc||(xc=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isUnsafeProperty=function(e){return"__proto__"===e}}(kc)),kc}var Sc,jc={};function Nc(){return Sc||(Sc=1,function(e){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("]")}}}(jc)),jc}var Mc,Ec={};function _c(){return Mc||(Mc=1,function(e){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)}}(Ec)),Ec}var Oc,Dc,Pc,Tc,Ac,Rc={},Ic={};function zc(){return Oc||(Oc=1,function(e){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}}(Ic)),Ic}function Lc(){return Dc||(Dc=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=zc(),n=_c();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}}(Rc)),Rc}function Fc(){return Pc||(Pc=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Cc(),n=Nc(),r=_c(),o=Lc();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}}}}(wc)),wc}function Bc(){return Ac?Tc:(Ac=1,Tc=Fc().get)}var $c=Eo(Bc()),Wc=e=>0===e?0:e>0?1:-1,Hc=e=>"number"==typeof e&&e!=+e,Uc=e=>"string"==typeof e&&e.indexOf("%")===e.length-1,Vc=e=>("number"==typeof e||e instanceof Number)&&!Hc(e),Yc=e=>Vc(e)||"string"==typeof e,Kc=0,qc=e=>{var t=++Kc;return"".concat(e||"").concat(t)},Gc=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(!Vc(e)&&"string"!=typeof e)return r;if(Uc(e)){if(null==t)return r;var a=e.indexOf("%");n=t*parseFloat(e.slice(0,a))/100}else n=+e;return Hc(n)&&(n=r),o&&null!=t&&n>t&&(n=t),n},Xc=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 Zc(e,t,n){return Vc(e)&&Vc(t)?e+n*(t-e):t}var Qc=e=>null==e,Jc=e=>Qc(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1)),eu=["type","size","sizeType"];function tu(){return tu=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},tu.apply(null,arguments)}function nu(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 ru(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nu(Object(n),!0).forEach(function(t){ou(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nu(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ou(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var au={symbolCircle:zl,symbolCross:Ll,symbolDiamond:$l,symbolSquare:Wl,symbolStar:Yl,symbolTriangle:ql,symbolWye:Jl},iu=Math.PI/180,su=e=>{var{type:t="circle",size:n=64,sizeType:r="area"}=e,o=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var 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,eu),a=ru(ru({},o),{},{type:t,size:n,sizeType:r}),s="circle";"string"==typeof t&&(s=t);var{className:l,cx:c,cy:u}=a,d=dl(a);return c===+c&&u===+u&&n===+n?i.createElement("path",tu({},d,{className:Ee("recharts-symbols",l),transform:"translate(".concat(c,", ").concat(u,")"),d:(()=>{var e=(e=>{var t="symbol".concat(Jc(e));return au[t]||zl})(s),t=function(e,t){let n=null,r=El(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:gl(e||zl),t="function"==typeof t?t:gl(void 0===t?64:+t),o.type=function(t){return arguments.length?(e="function"==typeof t?t:gl(t),o):e},o.size=function(e){return arguments.length?(t="function"==typeof e?e:gl(+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*iu;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,r,s)),o=t();if(null!==o)return o})()})):null};su.registerSymbol=(e,t)=>{au["symbol".concat(Jc(e))]=t};function lu(){return lu=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},lu.apply(null,arguments)}function cu(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 uu(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 du=32;class fu extends t.PureComponent{renderIcon(e,t){var{inactiveColor:n}=this.props,r=16,o=du/6,a=du/3,s=e.inactive?n:e.color,l=null!=t?t:e.type;if("none"===l)return null;if("plainline"===l)return i.createElement("line",{strokeWidth:4,fill:"none",stroke:s,strokeDasharray:e.payload.strokeDasharray,x1:0,y1:r,x2:du,y2:r,className:"recharts-legend-icon"});if("line"===l)return i.createElement("path",{strokeWidth:4,fill:"none",stroke:s,d:"M0,".concat(r,"h").concat(a,"\n A").concat(o,",").concat(o,",0,1,1,").concat(2*a,",").concat(r,"\n H").concat(du,"M").concat(2*a,",").concat(r,"\n A").concat(o,",").concat(o,",0,1,1,").concat(a,",").concat(r),className:"recharts-legend-icon"});if("rect"===l)return i.createElement("path",{stroke:"none",fill:s,d:"M0,".concat(4,"h").concat(du,"v").concat(24,"h").concat(-32,"z"),className:"recharts-legend-icon"});if(i.isValidElement(e.legendIcon)){var c=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cu(Object(n),!0).forEach(function(t){uu(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cu(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},e);return delete c.legendIcon,i.cloneElement(e.legendIcon,c)}return i.createElement(su,{fill:s,cx:r,cy:r,size:du,sizeType:"diameter",type:l})}renderItems(){var{payload:e,iconSize:t,layout:n,formatter:r,inactiveColor:o,iconType:a}=this.props,s={x:0,y:0,width:du,height:du},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||r,d=Ee({"recharts-legend-item":!0,["legend-item-".concat(n)]:!0,inactive:e.inactive});if("none"===e.type)return null;var f=e.inactive?o:e.color,p=u?u(e.value,e,n):e.value;return i.createElement("li",lu({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];il(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)),i.createElement(ml,{width:t,height:t,viewBox:s,style:c,"aria-label":"".concat(p," legend icon")},this.renderIcon(e,a)),i.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 r={padding:0,margin:0,textAlign:"horizontal"===t?n:"left"};return i.createElement("ul",{className:"recharts-default-legend",style:r},this.renderItems())}}uu(fu,"displayName","Legend"),uu(fu,"defaultProps",{align:"center",iconSize:14,inactiveColor:"#ccc",layout:"horizontal",verticalAlign:"middle"});var pu,mu={},hu={};function gu(){return pu||(pu=1,function(e){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())}}(hu)),hu}var vu,bu={};function yu(){return vu||(vu=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.identity=function(e){return e}}(bu)),bu}var xu,wu,ku={},Cu={},Su={};function ju(){return xu||(xu=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isLength=function(e){return Number.isSafeInteger(e)&&e>=0}}(Su)),Su}function Nu(){return wu||(wu=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ju();e.isArrayLike=function(e){return null!=e&&"function"!=typeof e&&t.isLength(e.length)}}(Cu)),Cu}var Mu,Eu,_u={};function Ou(){return Mu||(Mu=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isObjectLike=function(e){return"object"==typeof e&&null!==e}}(_u)),_u}function Du(){return Eu||(Eu=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Nu(),n=Ou();e.isArrayLikeObject=function(e){return n.isObjectLike(e)&&t.isArrayLike(e)}}(ku)),ku}var Pu,Tu={},Au={};function Ru(){return Pu||(Pu=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Fc();e.property=function(e){return function(n){return t.get(n,e)}}}(Au)),Au}var Iu,zu={},Lu={},Fu={},Bu={};function $u(){return Iu||(Iu=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isObject=function(e){return null!==e&&("object"==typeof e||"function"==typeof e)}}(Bu)),Bu}var Wu,Hu={};function Uu(){return Wu||(Wu=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isPrimitive=function(e){return null==e||"object"!=typeof e&&"function"!=typeof e}}(Hu)),Hu}var Vu,Yu,Ku,qu={};function Gu(){return Vu||(Vu=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.eq=function(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}}(qu)),qu}function Xu(){return Yu||(Yu=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Zu(),n=$u(),r=Uu(),o=Gu();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}(Fu)),Fu}function Zu(){return Ku||(Ku=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Xu();e.isMatch=function(e,n){return t.isMatchWith(e,n,()=>{})}}(Lu)),Lu}var Qu,Ju={},ed={},td={};function nd(){return Qu||(Qu=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.getSymbols=function(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}}(td)),td}var rd,od={};function ad(){return rd||(rd=1,function(e){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)}}(od)),od}var id,sd={};function ld(){return id||(id=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]"}(sd)),sd}var cd,ud,dd,fd,pd={};function md(){return cd||(cd=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isTypedArray=function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}}(pd)),pd}function hd(){return ud||(ud=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=nd(),n=ad(),r=ld(),o=Uu(),a=md();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}(ed)),ed}function gd(){return dd||(dd=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=hd();e.cloneDeep=function(e){return t.cloneDeepWithImpl(e,void 0,e,new Map,void 0)}}(Ju)),Ju}function vd(){return fd||(fd=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Zu(),n=gd();e.matches=function(e){return e=n.cloneDeep(e),n=>t.isMatch(n,e)}}(zu)),zu}var bd,yd,xd={},wd={},kd={};function Cd(){return bd||(bd=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=hd(),n=ld();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}})}}(kd)),kd}function Sd(){return yd||(yd=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Cd();e.cloneDeep=function(e){return t.cloneDeepWith(e)}}(wd)),wd}var jd,Nd={},Md={};function Ed(){return jd||(jd=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)}}}(Md)),Md}var _d,Od,Dd,Pd,Td,Ad,Rd,Id={};function zd(){return _d||(_d=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ad();e.isArguments=function(e){return null!==e&&"object"==typeof e&&"[object Arguments]"===t.getTag(e)}}(Id)),Id}function Ld(){return Od||(Od=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Nc(),n=Ed(),r=zd(),o=Lc();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}}(Nd)),Nd}function Fd(){return Dd||(Dd=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Zu(),n=_c(),r=Sd(),o=Fc(),a=Ld();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)}}}(xd)),xd}function Bd(){return Pd||(Pd=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=yu(),n=Ru(),r=vd(),o=Fd();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)}}}(Tu)),Tu}function $d(){return Td||(Td=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=gu(),n=yu(),r=Du(),o=Bd();e.uniqBy=function(e,a=n.identity){return r.isArrayLikeObject(e)?t.uniqBy(Array.from(e),o.iteratee(a)):[]}}(mu)),mu}function Wd(){return Rd?Ad:(Rd=1,Ad=$d().uniqBy)}var Hd=Eo(Wd());function Ud(e,t,n){return!0===t?Hd(e,n):"function"==typeof t?Hd(e,t):e}var Vd,Yd={exports:{}},Kd={};var qd,Gd,Xd={};
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 Zd=(Gd||(Gd=1,"production"===process.env.NODE_ENV?Yd.exports=function(){if(Vd)return Kd;Vd=1;var e=t,n=Ro(),r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useSyncExternalStore,a=e.useRef,i=e.useEffect,s=e.useMemo,l=e.useDebugValue;return Kd.useSyncExternalStoreWithSelector=function(e,t,n,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,o=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,r(o,e))return t;var n=c(e);return void 0!==u&&u(t,n)?(o=e,t):(o=e,a=n)}var o,a,i=!1,s=void 0===n?null:n;return[function(){return e(t())},null===s?void 0:function(){return e(s())}]},[t,n,c,u]);var p=o(e,d[0],d[1]);return i(function(){f.hasValue=!0,f.value=p},[p]),l(p),p},Kd}():Yd.exports=(qd||(qd=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=t,n=Ro(),r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useSyncExternalStore,a=e.useRef,i=e.useEffect,s=e.useMemo,l=e.useDebugValue;Xd.useSyncExternalStoreWithSelector=function(e,t,n,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,o=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,r(o,e))return t;var n=c(e);return void 0!==u&&u(t,n)?(o=e,t):(o=e,a=n)}var o,a,i=!1,s=void 0===n?null:n;return[function(){return e(t())},null===s?void 0:function(){return e(s())}]},[t,n,c,u]);var p=o(e,d[0],d[1]);return 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())}()),Xd)),Yd.exports),Qd=t.createContext(null),Jd=e=>e,ef=()=>{var e=t.useContext(Qd);return e?e.store.dispatch:Jd},tf=()=>{},nf=()=>tf,rf=(e,t)=>e===t;function of(e){var n=t.useContext(Qd);return Zd.useSyncExternalStoreWithSelector(n?n.subscription.addNestedSub:nf,n?n.store.getState:tf,n?n.store.getState:tf,n?e:tf,rf)}var af=(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})}}},sf=(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})}},lf={inputStabilityCheck:"once",identityFunctionCheck:"once"};var cf=e=>Array.isArray(e)?e:[e];function uf(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 df(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var ff="undefined"!=typeof WeakRef?WeakRef:class{constructor(e){this.value=e}deref(){return this.value}};function pf(){return{s:0,v:void 0,o:null,p:null}}function mf(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=pf(),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=pf(),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 ff(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 hf(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=mf,argsMemoizeOptions:d=[],devModeChecks:f={}}=s,p=cf(c),m=cf(d),h=uf(e),g=l(function(){return r++,i.apply(null,arguments)},...p);let v=!0;const b=u(function(){o++;const e=df(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}={...lf,...t};return{identityFunctionCheck:{shouldRun:"always"===n||"once"===n&&e,run:af},inputStabilityCheck:{shouldRun:"always"===r||"once"===r&&e,run:sf}}})(v,f);if(n.shouldRun&&n.run(i,e,t),r.shouldRun){const t=df(h,arguments);r.run({inputSelectorResults:e,inputSelectorResultsCopy:t},{memoize:l,memoizeOptions:p},arguments)}v&&(v=!1)}return t},...m);return Object.assign(b,{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 gf,vf=hf(mf),bf=Object.assign((e,t=vf)=>{!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:()=>bf}),yf={},xf={},wf={};function kf(){return gf||(gf=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}}(wf)),wf}var Cf,Sf,jf,Nf={},Mf={};function Ef(){return Cf||(Cf=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isSymbol=function(e){return"symbol"==typeof e||e instanceof Symbol}}(Mf)),Mf}function _f(){return Sf||(Sf=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ef(),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)))}}(Nf)),Nf}function Of(){return jf||(jf=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=kf(),n=_f(),r=Lc();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)}}(xf)),xf}var Df,Pf={};function Tf(){return Df||(Df=1,function(e){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}}(Pf)),Pf}var Af,Rf,If,zf,Lf={};function Ff(){return Af||(Af=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ed(),n=Nu(),r=$u(),o=Gu();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))}}(Lf)),Lf}function Bf(){return Rf||(Rf=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Of(),n=Tf(),r=Ff();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"])}}(yf)),yf}function $f(){return zf?If:(zf=1,If=Bf().sortBy)}var Wf=Eo($f()),Hf=e=>e.legend.settings,Uf=vf([e=>e.legend.payload,Hf],(e,t)=>{var{itemSorter:n}=t,r=e.flat(1);return n?Wf(r,n):r});function Vf(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],[n,r]=t.useState({height:0,left:0,top:0,width:0}),o=t.useCallback(e=>{if(null!=e){var t=e.getBoundingClientRect(),o={height:t.height,left:t.left,top:t.top,width:t.width};(Math.abs(o.height-n.height)>1||Math.abs(o.left-n.left)>1||Math.abs(o.top-n.top)>1||Math.abs(o.width-n.width)>1)&&r({height:o.height,left:o.left,top:o.top,width:o.width})}},[n.width,n.height,n.top,n.left,...e]);return[n,o]}function Yf(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 Kf=Symbol.for("immer-nothing"),qf=Symbol.for("immer-draftable"),Gf=Symbol.for("immer-state"),Xf="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 Zf(e,...t){if("production"!==process.env.NODE_ENV){const n=Xf[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 Qf=Object.getPrototypeOf;function Jf(e){return!!e&&!!e[Gf]}function ep(e){return!!e&&(np(e)||Array.isArray(e)||!!e[qf]||!!e.constructor?.[qf]||sp(e)||lp(e))}var tp=Object.prototype.constructor.toString();function np(e){if(!e||"object"!=typeof e)return!1;const t=Qf(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)===tp}function rp(e,t){0===op(e)?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function op(e){const t=e[Gf];return t?t.type_:Array.isArray(e)?1:sp(e)?2:lp(e)?3:0}function ap(e,t){return 2===op(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function ip(e,t,n){const r=op(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function sp(e){return e instanceof Map}function lp(e){return e instanceof Set}function cp(e){return e.copy_||e.base_}function up(e,t){if(sp(e))return new Map(e);if(lp(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=np(e);if(!0===t||"class_only"===t&&!n){const t=Object.getOwnPropertyDescriptors(e);delete t[Gf];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(Qf(e),t)}{const t=Qf(e);if(null!==t&&n)return{...e};const r=Object.create(t);return Object.assign(r,e)}}function dp(e,t=!1){return pp(e)||Jf(e)||!ep(e)||(op(e)>1&&Object.defineProperties(e,{set:{value:fp},add:{value:fp},clear:{value:fp},delete:{value:fp}}),Object.freeze(e),t&&Object.values(e).forEach(e=>dp(e,!0))),e}function fp(){Zf(2)}function pp(e){return Object.isFrozen(e)}var mp,hp={};function gp(e){const t=hp[e];return t||Zf(0,e),t}function vp(){return mp}function bp(e,t){t&&(gp("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function yp(e){xp(e),e.drafts_.forEach(kp),e.drafts_=null}function xp(e){e===mp&&(mp=e.parent_)}function wp(e){return mp={drafts_:[],parent_:mp,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function kp(e){const t=e[Gf];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function Cp(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[Gf].modified_&&(yp(t),Zf(4)),ep(e)&&(e=Sp(t,e),t.parent_||Np(t,e)),t.patches_&&gp("Patches").generateReplacementPatches_(n[Gf].base_,e,t.patches_,t.inversePatches_)):e=Sp(t,n,[]),yp(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Kf?e:void 0}function Sp(e,t,n){if(pp(t))return t;const r=t[Gf];if(!r)return rp(t,(o,a)=>jp(e,r,t,o,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Np(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),rp(o,(o,i)=>jp(e,r,t,o,i,n,a)),Np(e,t,!1),n&&e.patches_&&gp("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function jp(e,t,n,r,o,a,i){if("production"!==process.env.NODE_ENV&&o===n&&Zf(5),Jf(o)){const i=Sp(e,o,a&&t&&3!==t.type_&&!ap(t.assigned_,r)?a.concat(r):void 0);if(ip(n,r,i),!Jf(i))return;e.canAutoFreeze_=!1}else i&&n.add(o);if(ep(o)&&!pp(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Sp(e,o),t&&t.scope_.parent_||"symbol"==typeof r||!(sp(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))||Np(e,o)}}function Np(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&dp(t,n)}var Mp={get(e,t){if(t===Gf)return e;const n=cp(e);if(!ap(n,t))return function(e,t,n){const r=Op(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_||!ep(r)?r:r===_p(e.base_,t)?(Pp(e),e.copy_[t]=Tp(r,e)):r},has:(e,t)=>t in cp(e),ownKeys:e=>Reflect.ownKeys(cp(e)),set(e,t,n){const r=Op(cp(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=_p(cp(e),t),o=r?.[Gf];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||ap(e.base_,t)))return!0;Pp(e),Dp(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!==_p(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,Pp(e),Dp(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=cp(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty(){Zf(11)},getPrototypeOf:e=>Qf(e.base_),setPrototypeOf(){Zf(12)}},Ep={};function _p(e,t){const n=e[Gf];return(n?cp(n):e)[t]}function Op(e,t){if(!(t in e))return;let n=Qf(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Qf(n)}}function Dp(e){e.modified_||(e.modified_=!0,e.parent_&&Dp(e.parent_))}function Pp(e){e.copy_||(e.copy_=up(e.base_,e.scope_.immer_.useStrictShallowCopy_))}rp(Mp,(e,t)=>{Ep[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Ep.deleteProperty=function(e,t){return"production"!==process.env.NODE_ENV&&isNaN(parseInt(t))&&Zf(13),Ep.set.call(this,e,t,void 0)},Ep.set=function(e,t,n){return"production"!==process.env.NODE_ENV&&"length"!==t&&isNaN(parseInt(t))&&Zf(14),Mp.set.call(this,e[0],t,n,e[0])};function Tp(e,t){const n=sp(e)?gp("MapSet").proxyMap_(e,t):lp(e)?gp("MapSet").proxySet_(e,t):function(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:vp(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,a=Mp;n&&(o=[r],a=Ep);const{revoke:i,proxy:s}=Proxy.revocable(o,a);return r.draft_=s,r.revoke_=i,s}(e,t);return(t?t.scope_:vp()).drafts_.push(n),n}function Ap(e){return Jf(e)||Zf(10,e),Rp(e)}function Rp(e){if(!ep(e)||pp(e))return e;const t=e[Gf];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=up(e,t.scope_.immer_.useStrictShallowCopy_)}else n=up(e,!0);return rp(n,(e,t)=>{ip(n,e,Rp(t))}),t&&(t.finalized_=!1),n}var Ip=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&&Zf(6),void 0!==n&&"function"!=typeof n&&Zf(7),ep(e)){const o=wp(this),a=Tp(e,void 0);let i=!0;try{r=t(a),i=!1}finally{i?yp(o):xp(o)}return bp(o,n),Cp(r,o)}if(!e||"object"!=typeof e){if(r=t(e),void 0===r&&(r=e),r===Kf&&(r=void 0),this.autoFreeze_&&dp(r,!0),n){const t=[],o=[];gp("Patches").generateReplacementPatches_(e,r,t,o),n(t,o)}return r}Zf(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){ep(e)||Zf(8),Jf(e)&&(e=Ap(e));const t=wp(this),n=Tp(e,void 0);return n[Gf].isManual_=!0,xp(t),n}finishDraft(e,t){const n=e&&e[Gf];n&&n.isManual_||Zf(9);const{scope_:r}=n;return bp(r,t),Cp(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=gp("Patches").applyPatches_;return Jf(e)?r(e,t):this.produce(e,e=>r(e,t))}},zp=Ip.produce;function Lp(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw new Error("production"===process.env.NODE_ENV?Xp(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=>Yf(t)&&t.type===e,n}function Fp(e){return ep(e)?zp(e,()=>{}):e}function Bp(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}var $p="RTK_autoBatch",Wp=()=>e=>({payload:e,meta:{[$p]:!0}});function Hp(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?Xp(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(r)throw new Error("production"===process.env.NODE_ENV?Xp(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?Xp(28):"`builder.addCase` cannot be called with an empty action type");if(i in t)throw new Error("production"===process.env.NODE_ENV?Xp(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?Xp(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?Xp(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?Xp(31):"`builder.addDefaultCase` can only be called once");return r=e,o}};return e(o),[t,n,r]}var Up=Symbol.for("rtk-slice-createasyncthunk");function Vp(e,t){return`${e}/${t}`}function Yp({creators:e}={}){const t=e?.asyncThunk?.[Up];return function(e){const{name:n,reducerPath:r=n}=e;if(!n)throw new Error("production"===process.env.NODE_ENV?Xp(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?Xp(12):"`context.addCase` cannot be called with an empty action type");if(n in i.sliceCaseReducersByType)throw new Error("production"===process.env.NODE_ENV?Xp(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?Xp(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?Hp(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?Xp(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]=Hp(t);if(function(e){return"function"==typeof e}(e))n=()=>Fp(e());else{const t=Fp(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(Jf(e)){const r=n(e,t);return void 0===r?e:r}if(ep(e))return zp(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:Vp(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?Xp(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?Lp(e,i):Lp(e))}(i,a,s):function({type:e,reducerName:t},n,r,o){if(!o)throw new Error("production"===process.env.NODE_ENV?Xp(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||Gp,pending:s||Gp,rejected:l||Gp,settled:c||Gp})}(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=Bp(d,r,m);else if("production"!==process.env.NODE_ENV)throw new Error("production"===process.env.NODE_ENV?Xp(15):"selectSlice returned undefined for an uninjected slice reducer");return o}function o(t=c){const r=Bp(u,n,()=>new WeakMap);return Bp(r,t,()=>{const r={};for(const[o,a]of Object.entries(e.selectors??{}))r[o]=Kp(a,t,()=>Bp(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 Kp(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?Xp(16):"selectState returned undefined for an uninjected slice reducer");return e(i,...a)}return o.unwrapped=e,o}var qp=Yp();function Gp(){}function Xp(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 Zp=Math.PI/180,Qp=(e,t,n,r)=>({x:e+Math.cos(-Zp*r)*n,y:t+Math.sin(-Zp*r)*n});function Jp(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function em(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 tm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?em(Object(n),!0).forEach(function(t){nm(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):em(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function nm(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 rm(e,t,n){return Qc(e)||Qc(t)?n:Yc(t)?$c(e,t,n):"function"==typeof t?t(e):n}var om=(e,t)=>"horizontal"===e&&"xAxis"===t||"vertical"===e&&"yAxis"===t||"centric"===e&&"angleAxis"===t||"radial"===e&&"radiusAxis"===t,am=1e-4,im={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=Hc(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}gc(e,t)}},none:gc,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}gc(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,gc(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=Hc(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)}}},sm=(e,t,n)=>{var r=im[n],o=function(){var e=gl([]),t=vc,n=gc,r=bc;function o(o){var a,i,s=Array.from(e.apply(this,arguments),yc),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=_l(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:gl(Array.from(t)),o):e},o.value=function(e){return arguments.length?(r="function"==typeof e?e:gl(+e),o):r},o.order=function(e){return arguments.length?(t=null==e?vc:"function"==typeof e?e:gl(Array.from(e)),o):t},o.offset=function(e){return arguments.length?(n=null==e?gc:e,o):n},o}().keys(t).value((e,t)=>+rm(e,t,0)).order(vc).offset(r);return o(e)},lm=(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=Jp(r,t,n),i=(o=a.flat(2).filter(Vc),[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]]},cm=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,um=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/;function dm(e){var{tooltipEntrySettings:t,dataKey:n,payload:r,value:o,name:a}=e;return tm(tm({},t),{},{dataKey:n,payload:r,value:o,name:a})}var fm=e=>e.layout.width,pm=e=>e.layout.height,mm=e=>e.layout.margin,hm=vf(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),gm=vf(e=>e.cartesianAxis.yAxis,e=>Object.values(e));function vm(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 bm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vm(Object(n),!0).forEach(function(t){ym(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vm(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ym(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 xm=vf([fm,pm,mm,e=>e.brush.height,function(e){return gm(e).reduce((e,t)=>"left"!==t.orientation||t.mirror||t.hide?e:e+("number"==typeof t.width?t.width:60),0)},function(e){return gm(e).reduce((e,t)=>"right"!==t.orientation||t.mirror||t.hide?e:e+("number"==typeof t.width?t.width:60),0)},function(e){return hm(e).reduce((e,t)=>"top"!==t.orientation||t.mirror||t.hide?e:e+t.height,0)},function(e){return hm(e).reduce((e,t)=>"bottom"!==t.orientation||t.mirror||t.hide?e:e+t.height,0)},Hf,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=bm(bm({},{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&&Vc(e[a]))return tm(tm({},e),{},{[a]:e[a]+(r||0)});if(("horizontal"===s||"vertical"===s&&"center"===a)&&"middle"!==i&&Vc(e[i]))return tm(tm({},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 bm(bm({brushBottom:f},d),{},{width:Math.max(p,0),height:Math.max(m,0)})}),wm=vf(xm,e=>({x:e.left,y:e.top,width:e.width,height:e.height}));vf(fm,pm,(e,t)=>({x:0,y:0,width:e,height:t}));var km,Cm,Sm,jm,Nm,Mm=t.createContext(null),Em=e=>e.brush,_m=vf([Em,xm,mm],(e,t,n)=>({height:e.height,x:Vc(e.x)?e.x:t.left,y:Vc(e.y)?e.y:t.top+t.height+t.brushBottom-((null==n?void 0:n.bottom)||0),width:Vc(e.width)?e.width:t.width})),Om={},Dm={},Pm={};function Tm(){return km||(km=1,function(e){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}}(Pm)),Pm}function Am(){return Cm||(Cm=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Tm();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}}(Dm)),Dm}function Rm(){return Sm||(Sm=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Am();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})}}(Om)),Om}function Im(){return Nm?jm:(Nm=1,jm=Rm().throttle)}var zm=Eo(Im()),Lm="production"!==process.env.NODE_ENV,Fm=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(Lm&&"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++]))}},Bm=(e,t,n)=>{var{width:r="100%",height:o="100%",aspect:a,maxHeight:i}=n,s=Uc(r)?e:Number(r),l=Uc(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}},$m={width:0,height:0,overflow:"visible"},Wm={width:0,overflowX:"visible"},Hm={height:0,overflowY:"visible"},Um={},Vm=e=>{var{width:t,height:n}=e,r=Uc(t),o=Uc(n);return r&&o?$m:r?Wm:o?Hm:Um};function Ym(e){return Number.isFinite(e)}function Km(e){return"number"==typeof e&&e>0&&Number.isFinite(e)}function qm(){return qm=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},qm.apply(null,arguments)}function Gm(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 Xm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gm(Object(n),!0).forEach(function(t){Zm(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gm(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Zm(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 Qm=t.createContext({width:-1,height:-1});function Jm(e){var{children:n,width:r,height:o}=e,a=t.useMemo(()=>({width:r,height:o}),[r,o]);return r<=0||o<=0?null:i.createElement(Qm.Provider,{value:a},n)}var eh=t.forwardRef((e,n)=>{var{aspect:r,initialDimension:o={width:-1,height:-1},width:a,height:s,minWidth:l=0,minHeight:c,maxHeight:u,children:d,debounce:f=0,id:p,className:m,onResize:h,style:g={}}=e,v=t.useRef(null),b=t.useRef();b.current=h,t.useImperativeHandle(n,()=>v.current);var[y,x]=t.useState({containerWidth:o.width,containerHeight:o.height}),w=t.useCallback((e,t)=>{x(n=>{var r=Math.round(e),o=Math.round(t);return n.containerWidth===r&&n.containerHeight===o?n:{containerWidth:r,containerHeight:o}})},[]);t.useEffect(()=>{var e=e=>{var t,{width:n,height:r}=e[0].contentRect;w(n,r),null===(t=b.current)||void 0===t||t.call(b,n,r)};f>0&&(e=zm(e,f,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),{width:n,height:r}=v.current.getBoundingClientRect();return w(n,r),t.observe(v.current),()=>{t.disconnect()}},[w,f]);var{containerWidth:k,containerHeight:C}=y;Fm(!r||r>0,"The aspect(%s) must be greater than zero.",r);var{calculatedWidth:S,calculatedHeight:j}=Bm(k,C,{width:a,height:s,aspect:r,maxHeight:u});return Fm(S>0||j>0,"The width(%s) and height(%s) of chart should be greater than 0,\n please check the style of container, or the props width(%s) and height(%s),\n or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the\n height and width.",S,j,a,s,l,c,r),i.createElement("div",{id:p?"".concat(p):void 0,className:Ee("recharts-responsive-container",m),style:Xm(Xm({},g),{},{width:a,height:s,minWidth:l,minHeight:c,maxHeight:u}),ref:v},i.createElement("div",{style:Vm({width:a,height:s})},i.createElement(Jm,{width:S,height:j},d)))}),th=t.forwardRef((e,n)=>{var r=t.useContext(Qm);if(Km(r.width)&&Km(r.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:s,calculatedHeight:l}=Bm(void 0,void 0,{width:o,height:a,aspect:e.aspect,maxHeight:e.maxHeight});return Vc(s)&&Vc(l)?i.createElement(Jm,{width:s,height:l},e.children):i.createElement(eh,qm({},e,{width:o,height:a,ref:n}))}),nh=()=>{var e,n=null!=t.useContext(Mm),r=of(wm),o=of(_m),a=null===(e=of(Em))||void 0===e?void 0:e.padding;return n&&o&&a?{width:o.width-a.left-a.right,height:o.height-a.top-a.bottom,x:a.left,y:a.top}:r},rh={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},oh=e=>e.layout.layoutType,ah=qp({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:Wp()},removeLegendPayload:{reducer(e,t){var n=Ap(e).payload.indexOf(t.payload);n>-1&&e.payload.splice(n,1)},prepare:Wp()}}}),{setLegendSize:ih,setLegendSettings:sh,addLegendPayload:lh,removeLegendPayload:ch}=ah.actions,uh=["contextPayload"];function dh(){return dh=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},dh.apply(null,arguments)}function fh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ph(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fh(Object(n),!0).forEach(function(t){mh(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fh(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 hh(e){return e.value}function gh(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,uh),r=Ud(t,e.payloadUniqBy,hh),o=ph(ph({},n),{},{payload:r});return i.isValidElement(e.content)?i.cloneElement(e.content,o):"function"==typeof e.content?i.createElement(e.content,o):i.createElement(fu,o)}function vh(e){var n=ef();return t.useEffect(()=>{n(sh(e))},[n,e]),null}function bh(e){var n=ef();return t.useEffect(()=>(n(ih(e)),()=>{n(ih({width:0,height:0}))}),[n,e]),null}function yh(e){var r=of(Uf),o=t.useContext(hl),a=of(e=>e.layout.margin),{width:s,height:l,wrapperStyle:c,portal:u}=e,[d,f]=Vf([r]),p=of(fm),m=of(pm);if(null==p||null==m)return null;var h=p-(a.left||0)-(a.right||0),g=xh.getWidthOrHeight(e.layout,l,s,h),v=u?c:ph(ph({position:"absolute",width:(null==g?void 0:g.width)||s||"auto",height:(null==g?void 0:g.height)||l||"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}),ph(ph({},i),s)}(c,e,a,p,m,d)),c),b=null!=u?u:o;if(null==b)return null;var y=i.createElement("div",{className:"recharts-legend-wrapper",style:v,ref:f},i.createElement(vh,{layout:e.layout,align:e.align,verticalAlign:e.verticalAlign,itemSorter:e.itemSorter}),i.createElement(bh,{width:d.width,height:d.height}),i.createElement(gh,dh({},e,g,{margin:a,chartWidth:p,chartHeight:m,contextPayload:r})));return n.createPortal(y,b)}class xh extends t.PureComponent{static getWidthOrHeight(e,t,n,r){return"vertical"===e&&Vc(t)?{height:t}:"horizontal"===e?{width:n||r}:null}render(){return i.createElement(yh,this.props)}}function wh(){return wh=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},wh.apply(null,arguments)}function kh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ch(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kh(Object(n),!0).forEach(function(t){Sh(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Sh(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 jh(e){return Array.isArray(e)&&Yc(e[0])&&Yc(e[1])?e.join(" ~ "):e}mh(xh,"displayName","Legend"),mh(xh,"defaultProps",{align:"center",iconSize:14,itemSorter:"value",layout:"horizontal",verticalAlign:"bottom"});var Nh=e=>{var{separator:t=" : ",contentStyle:n={},itemStyle:r={},labelStyle:o={},payload:a,formatter:s,itemSorter:l,wrapperClassName:c,labelClassName:u,label:d,labelFormatter:f,accessibilityLayer:p=!1}=e,m=Ch({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},n),h=Ch({margin:0},o),g=!Qc(d),v=g?d:"",b=Ee("recharts-default-tooltip",c),y=Ee("recharts-tooltip-label",u);g&&f&&null!=a&&(v=f(d,a));var x=p?{role:"status","aria-live":"assertive"}:{};return i.createElement("div",wh({className:b,style:m},x),i.createElement("p",{className:y,style:h},i.isValidElement(v)?v:"".concat(v)),(()=>{if(a&&a.length){var e=(l?Wf(a,l):a).map((e,n)=>{if("none"===e.type)return null;var o=e.formatter||s||jh,{value:l,name:c}=e,u=l,d=c;if(o){var f=o(l,c,e,n,a);if(Array.isArray(f))[u,d]=f;else{if(null==f)return null;u=f}}var p=Ch({display:"block",paddingTop:4,paddingBottom:4,color:e.color||"#000"},r);return i.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(n),style:p},Yc(d)?i.createElement("span",{className:"recharts-tooltip-item-name"},d):null,Yc(d)?i.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,i.createElement("span",{className:"recharts-tooltip-item-value"},u),i.createElement("span",{className:"recharts-tooltip-item-unit"},e.unit||""))});return i.createElement("ul",{className:"recharts-tooltip-item-list",style:{padding:0,margin:0}},e)}return null})())},Mh="recharts-tooltip-wrapper",Eh={visibility:"hidden"};function _h(e){var{coordinate:t,translateX:n,translateY:r}=e;return Ee(Mh,{["".concat(Mh,"-right")]:Vc(n)&&t&&Vc(t.x)&&n>=t.x,["".concat(Mh,"-left")]:Vc(n)&&t&&Vc(t.x)&&n<t.x,["".concat(Mh,"-bottom")]:Vc(r)&&t&&Vc(t.y)&&r>=t.y,["".concat(Mh,"-top")]:Vc(r)&&t&&Vc(t.y)&&r<t.y})}function Oh(e){var{allowEscapeViewBox:t,coordinate:n,key:r,offsetTopLeft:o,position:a,reverseDirection:i,tooltipDimension:s,viewBox:l,viewBoxDimension:c}=e;if(a&&Vc(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 Dh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ph(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dh(Object(n),!0).forEach(function(t){Th(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Th(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 Ah extends t.PureComponent{constructor(){super(...arguments),Th(this,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}),Th(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:r,children:o,coordinate:a,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:b,cssProperties:y}=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=Oh({allowEscapeViewBox:o,coordinate:a,key:"x",offsetTopLeft:i,position:s,reverseDirection:l,tooltipDimension:c.width,viewBox:d,viewBoxDimension:d.width}),translateY:r=Oh({allowEscapeViewBox:o,coordinate:a,key:"y",offsetTopLeft:i,position:s,reverseDirection:l,tooltipDimension:c.height,viewBox:d,viewBoxDimension:d.height}),useTranslate3d:u}):Eh,{cssProperties:t,cssClasses:_h({translateX:n,translateY:r,coordinate:a})}}({allowEscapeViewBox:t,coordinate:a,offsetTopLeft:c,position:u,reverseDirection:d,tooltipBox:{height:h.height,width:h.width},useTranslate3d:f,viewBox:p}),x=v?{}:Ph(Ph({transition:l&&e?"transform ".concat(n,"ms ").concat(r):void 0},y),{},{pointerEvents:"none",visibility:!this.state.dismissed&&e&&s?"visible":"hidden",position:"absolute",top:0,left:0}),w=Ph(Ph({},x),{},{visibility:!this.state.dismissed&&e&&s?"visible":"hidden"},m);return i.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:b,style:w,ref:g},o)}}var Rh=!("undefined"!=typeof window&&window.document&&Boolean(window.document.createElement)&&window.setTimeout);function Ih(){return Ih=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},Ih.apply(null,arguments)}function zh(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 Lh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zh(Object(n),!0).forEach(function(t){Fh(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Fh(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 Bh={curveBasisClosed:function(e){return new rc(e)},curveBasisOpen:function(e){return new oc(e)},curveBasis:function(e){return new nc(e)},curveBumpX:function(e){return new Il(e,!0)},curveBumpY:function(e){return new Il(e,!1)},curveLinearClosed:function(e){return new ac(e)},curveLinear:Dl,curveMonotoneX:function(e){return new uc(e)},curveMonotoneY:function(e){return new dc(e)},curveNatural:function(e){return new pc(e)},curveStep:function(e){return new hc(e,.5)},curveStepAfter:function(e){return new hc(e,1)},curveStepBefore:function(e){return new hc(e,0)}},$h=e=>Ym(e.x)&&Ym(e.y),Wh=e=>e.x,Hh=e=>e.y,Uh=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(Jc(e));return"curveMonotone"!==n&&"curveBump"!==n||!t?Bh[n]||Dl:Bh["".concat(n).concat("vertical"===t?"Y":"X")]})(n,a),l=i?r.filter($h):r;if(Array.isArray(o)){var c=i?o.filter(e=>$h(e)):o,u=l.map((e,t)=>Lh(Lh({},e),{},{base:c[t]}));return(t="vertical"===a?Rl().y(Hh).x1(Wh).x0(e=>e.base.x):Rl().x(Wh).y1(Hh).y0(e=>e.base.y)).defined($h).curve(s),t(u)}return(t="vertical"===a&&Vc(o)?Rl().y(Hh).x1(Wh).x0(o):Vc(o)?Rl().x(Wh).y1(Hh).y0(o):Al().x(Wh).y(Hh)).defined($h).curve(s),t(l)},Vh=e=>{var{className:n,points:r,path:o,pathRef:a}=e;if(!(r&&r.length||o))return null;var s=r&&r.length?Uh(e):o;return i.createElement("path",Ih({},ul(e),(e=>{if(!e||"function"==typeof e||"boolean"==typeof e)return null;var n=e;if(t.isValidElement(e)&&(n=e.props),"object"!=typeof n&&"function"!=typeof n)return null;var r={};return Object.keys(n).forEach(e=>{il(e)&&(r[e]=t=>n[e](n,t))}),r})(e),{className:Ee("recharts-curve",n),d:null===s?void 0:s,ref:a}))},Yh=["x","y","top","left","width","height","className"];function Kh(){return Kh=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},Kh.apply(null,arguments)}function qh(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 Gh(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 Xh=(e,t,n,r,o,a)=>"M".concat(e,",").concat(o,"v").concat(r,"M").concat(a,",").concat(t,"h").concat(n),Zh=e=>{var{x:t=0,y:n=0,top:r=0,left:o=0,width:a=0,height:s=0,className:l}=e,c=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var 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,Yh),u=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qh(Object(n),!0).forEach(function(t){Gh(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({x:t,y:n,top:r,left:o,width:a,height:s},c);return Vc(t)&&Vc(n)&&Vc(a)&&Vc(s)&&Vc(r)&&Vc(o)?i.createElement("path",Kh({},dl(u),{className:Ee("recharts-cross",l),d:Xh(t,n,a,s,r,o)})):null};function Qh(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 Jh(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 eg(e,t){var n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qh(Object(n),!0).forEach(function(t){Jh(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qh(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 tg(){}function ng(e){return null!=e}function rg(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 og(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rg(Object(n),!0).forEach(function(t){ag(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rg(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ag(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 ig=(e,t)=>Object.keys(t).reduce((n,r)=>og(og({},n),{},{[r]:e(r,t[r])}),{});function sg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function lg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sg(Object(n),!0).forEach(function(t){cg(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sg(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function cg(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 ug=(e,t,n)=>e+(t-e)*n,dg=e=>{var{from:t,to:n}=e;return t!==n},fg=(e,t,n)=>{var r=ig((t,n)=>{if(dg(n)){var[r,o]=e(n.from,n.to,n.velocity);return lg(lg({},n),{},{from:r,velocity:o})}return n},t);return n<1?ig((e,t)=>dg(t)?lg(lg({},t),{},{velocity:ug(t.velocity,r[e].velocity,n),from:ug(t.from,r[e].from,n)}):t,t):fg(e,r,n-1)};function pg(e,t,n,r,o,a){var i,s=r.reduce((n,r)=>lg(lg({},n),{},{[r]:{from:e[r],velocity:0,to:t[r]}}),{}),l=null,c=r=>{i||(i=r);var u=(r-i)/n.dt;s=fg(n,s,u),o(lg(lg(lg({},e),t),ig((e,t)=>t.from,s))),i=r,Object.values(s).filter(dg).length&&(l=a.setTimeout(c))};return()=>(l=a.setTimeout(c),()=>{l()})}var mg=(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?pg(e,t,n,l,o,a):function(e,t,n,r,o,a,i){var s,l=null,c=o.reduce((n,r)=>lg(lg({},n),{},{[r]:[e[r],t[r]]}),{}),u=o=>{s||(s=o);var d=(o-s)/r,f=ig((e,t)=>ug(...t,n(d)),c);if(a(lg(lg(lg({},e),t),f)),d<1)l=i.setTimeout(u);else{var p=ig((e,t)=>ug(...t,n(1)),c);a(lg(lg(lg({},e),t),p))}};return()=>(l=i.setTimeout(u),()=>{l()})}(e,t,n,r,l,o,a)},hg=1e-4,gg=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],vg=(e,t)=>e.map((e,n)=>e*t**n).reduce((e,t)=>e+t),bg=(e,t)=>n=>{var r=gg(e,t);return vg(r,n)},yg=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=bg(e,t),d=bg(n,r),f=(l=e,c=t,e=>{var t=[...gg(l,c).map((e,t)=>e*t).slice(1),0];return vg(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)<hg||a<hg)return d(n);n=p(n-o/a)}return d(n)};return m.isStepper=!1,m},xg=e=>{if("string"==typeof e)switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return yg(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)<hg&&Math.abs(i)<hg?[o,0]:[s,i]};return o.isStepper=!0,o.dt=r,o}();default:if("cubic-bezier"===e.split("(")[0])return yg(e)}return"function"==typeof e?e:null};class wg{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 kg(){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 wg)}var Cg=t.createContext(kg);var Sg={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},jg={t:0},Ng={t:1};function Mg(e){var n,r,o,a=eg(e,Sg),{isActive:i,canBegin:s,duration:l,easing:c,begin:u,onAnimationEnd:d,onAnimationStart:f,children:p}=a,m=(n=a.animationId,r=a.animationManager,o=t.useContext(Cg),t.useMemo(()=>null!=r?r:o(n),[n,r,o])),[h,g]=t.useState(i?jg:Ng),v=t.useRef(null);return t.useEffect(()=>{i||g(Ng)},[i]),t.useEffect(()=>{if(!i||!s)return tg;var e=mg(jg,Ng,xg(c),l,g,m.getTimeoutController());return m.start([f,u,()=>{v.current=e()},l,d]),()=>{m.stop(),v.current&&v.current(),d()}},[i,s,l,c,u,f,d,m]),p(h.t)}var Eg=["radius"],_g=["radius"];function Og(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 Dg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Og(Object(n),!0).forEach(function(t){Pg(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Og(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Pg(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tg(){return Tg=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},Tg.apply(null,arguments)}function Ag(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var 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 Rg=(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},Ig={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},zg=e=>{var n=eg(e,Ig),r=t.useRef(null),[o,a]=t.useState(-1);t.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var e=r.current.getTotalLength();e&&a(e)}catch(e){}},[]);var{x:s,y:l,width:c,height:u,radius:d,className:f}=n,{animationEasing:p,animationDuration:m,animationBegin:h,isAnimationActive:g,isUpdateAnimationActive:v}=n,b=t.useRef(c),y=t.useRef(u),x=t.useRef(s),w=t.useRef(l),k=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"animation-",r=t.useRef(qc(n)),o=t.useRef(e);return o.current!==e&&(r.current=qc(n),o.current=e),r.current}(t.useMemo(()=>({x:s,y:l,width:c,height:u,radius:d}),[s,l,c,u,d]),"rectangle-");if(s!==+s||l!==+l||c!==+c||u!==+u||0===c||0===u)return null;var C=Ee("recharts-rectangle",f);if(!v){var S=dl(n),{radius:j}=S,N=Ag(S,Eg);return i.createElement("path",Tg({},N,{radius:"number"==typeof d?d:void 0,className:C,d:Rg(s,l,c,u,d)}))}var M=b.current,E=y.current,_=x.current,O=w.current,D="0px ".concat(-1===o?1:o,"px"),P="".concat(o,"px 0px"),T=((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"],m,"string"==typeof p?p:void 0);return i.createElement(Mg,{animationId:k,key:k,canBegin:o>0,duration:m,easing:p,isActive:v,begin:h},e=>{var t,o=Zc(M,c,e),a=Zc(E,u,e),f=Zc(_,s,e),p=Zc(O,l,e);r.current&&(b.current=o,y.current=a,x.current=f,w.current=p),t=g?e>0?{transition:T,strokeDasharray:P}:{strokeDasharray:D}:{strokeDasharray:P};var m=dl(n),{radius:h}=m,v=Ag(m,_g);return i.createElement("path",Tg({},v,{radius:"number"==typeof d?d:void 0,className:C,d:Rg(f,p,o,a,d),ref:r,style:Dg(Dg({},t),n.style)}))})};function Lg(e){var{cx:t,cy:n,radius:r,startAngle:o,endAngle:a}=e;return{points:[Qp(t,n,r,o),Qp(t,n,r,a)],cx:t,cy:n,radius:r,startAngle:o,endAngle:a}}function Fg(){return Fg=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},Fg.apply(null,arguments)}var Bg=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)/Zp,d=l?o:o+a*u,f=l?o-a*u:o;return{center:Qp(t,n,c,d),circleTangency:Qp(t,n,r,d),lineTangency:Qp(t,n,c*Math.cos(u*Zp),f),theta:u}},$g=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:o,startAngle:a,endAngle:i}=e,s=((e,t)=>Wc(t-e)*Math.min(Math.abs(t-e),359.999))(a,i),l=a+s,c=Qp(t,n,o,a),u=Qp(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=Qp(t,n,r,a),p=Qp(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},Wg={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},Hg=e=>{var t=eg(e,Wg),{cx:n,cy:r,innerRadius:o,outerRadius:a,cornerRadius:s,forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:d,className:f}=t;if(a<o||u===d)return null;var p,m=Ee("recharts-sector",f),h=a-o,g=Gc(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=Wc(c-l),{circleTangency:d,lineTangency:f,theta:p}=Bg({cx:t,cy:n,radius:o,angle:l,sign:u,cornerRadius:a,cornerIsExternal:s}),{circleTangency:m,lineTangency:h,theta:g}=Bg({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 "):$g({cx:t,cy:n,innerRadius:r,outerRadius:o,startAngle:l,endAngle:c});var b="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:y,lineTangency:x,theta:w}=Bg({cx:t,cy:n,radius:r,angle:l,sign:u,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),{circleTangency:k,lineTangency:C,theta:S}=Bg({cx:t,cy:n,radius:r,angle:c,sign:-u,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),j=s?Math.abs(l-c):Math.abs(l-c)-w-S;if(j<0&&0===a)return"".concat(b,"L").concat(t,",").concat(n,"Z");b+="L".concat(C.x,",").concat(C.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(+(j>180),",").concat(+(u>0),",").concat(y.x,",").concat(y.y,"\n A").concat(a,",").concat(a,",0,0,").concat(+(u<0),",").concat(x.x,",").concat(x.y,"Z")}else b+="L".concat(t,",").concat(n,"Z");return b})({cx:n,cy:r,innerRadius:o,outerRadius:a,cornerRadius:Math.min(g,h/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:d}):$g({cx:n,cy:r,innerRadius:o,outerRadius:a,startAngle:u,endAngle:d}),i.createElement("path",Fg({},dl(t),{className:m,d:p}))};function Ug(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 Lg(t);var{cx:s,cy:l,innerRadius:c,outerRadius:u,angle:d}=t,f=Qp(s,l,c,d),p=Qp(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 Vg,Yg,Kg,qg,Gg,Xg={},Zg={},Qg={};function Jg(){return Vg||(Vg=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ef();e.toNumber=function(e){return t.isSymbol(e)?NaN:Number(e)}}(Qg)),Qg}function ev(){return Yg||(Yg=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Jg();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}}(Zg)),Zg}function tv(){return Kg||(Kg=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ff(),n=ev();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}}(Xg)),Xg}function nv(){return Gg?qg:(Gg=1,qg=tv().range)}var rv=Eo(nv());function ov(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function av(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function iv(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=ov,n=(t,n)=>ov(e(t),n),r=(t,n)=>e(t)-n):(t=e===ov||e===av?e:sv,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 sv(){return 0}function lv(e){return null===e?NaN:+e}const cv=iv(ov).right;iv(lv).center;class uv extends Map{constructor(e,t=fv){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(dv(this,e))}has(e){return super.has(dv(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 dv({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function fv(e){return null!==e&&"object"==typeof e?e.valueOf():e}function pv(e,t){return(null==e||!(e>=e))-(null==t||!(t>=t))||(e<t?-1:e>t?1:0)}const mv=Math.sqrt(50),hv=Math.sqrt(10),gv=Math.sqrt(2);function vv(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>=mv?10:a>=hv?5:a>=gv?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?vv(e,t,2*n):[s,l,c]}function bv(e,t,n){if(!((n=+n)>0))return[];if((e=+e)===(t=+t))return[e];const r=t<e,[o,a,i]=r?vv(t,e,n):vv(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 yv(e,t,n){return vv(e=+e,t=+t,n=+n)[2]}function xv(e,t,n){n=+n;const r=(t=+t)<(e=+e),o=r?yv(t,e,n):yv(e,t,n);return(r?-1:1)*(o<0?1/-o:o)}function wv(e,t){let n;for(const t of e)null!=t&&(n<t||void 0===n&&t>=t)&&(n=t);return n}function kv(e,t){let n;for(const t of e)null!=t&&(n>t||void 0===n&&t>=t)&&(n=t);return n}function Cv(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?pv:function(e=ov){if(e===ov)return pv;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);Cv(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(Sv(e,n,t),o(e[r],a)>0&&Sv(e,n,r);i<s;){for(Sv(e,i,s),++i,--s;o(e[i],a)<0;)++i;for(;o(e[s],a)>0;)--s}0===o(e[n],a)?Sv(e,n,s):(++s,Sv(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function Sv(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function jv(e,t,n=lv){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 Nv(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function Mv(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 Ev=Symbol("implicit");function _v(){var e=new uv,t=[],n=[],r=Ev;function o(o){let a=e.get(o);if(void 0===a){if(r!==Ev)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 uv;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 _v(t,n).unknown(r)},Nv.apply(o,arguments),o}function Ov(){var e,t,n=_v().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 Ov(r(),[a,i]).round(s).paddingInner(l).paddingOuter(c).align(u)},Nv.apply(d(),arguments)}function Dv(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Dv(t())},e}function Pv(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Tv(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Av(){}var Rv=.7,Iv=1/Rv,zv="\\s*([+-]?\\d+)\\s*",Lv="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Fv="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Bv=/^#([0-9a-f]{3,8})$/,$v=new RegExp(`^rgb\\(${zv},${zv},${zv}\\)$`),Wv=new RegExp(`^rgb\\(${Fv},${Fv},${Fv}\\)$`),Hv=new RegExp(`^rgba\\(${zv},${zv},${zv},${Lv}\\)$`),Uv=new RegExp(`^rgba\\(${Fv},${Fv},${Fv},${Lv}\\)$`),Vv=new RegExp(`^hsl\\(${Lv},${Fv},${Fv}\\)$`),Yv=new RegExp(`^hsla\\(${Lv},${Fv},${Fv},${Lv}\\)$`),Kv={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 qv(){return this.rgb().formatHex()}function Gv(){return this.rgb().formatRgb()}function Xv(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Bv.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Zv(t):3===n?new eb(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Qv(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Qv(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=$v.exec(e))?new eb(t[1],t[2],t[3],1):(t=Wv.exec(e))?new eb(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Hv.exec(e))?Qv(t[1],t[2],t[3],t[4]):(t=Uv.exec(e))?Qv(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Vv.exec(e))?ib(t[1],t[2]/100,t[3]/100,1):(t=Yv.exec(e))?ib(t[1],t[2]/100,t[3]/100,t[4]):Kv.hasOwnProperty(e)?Zv(Kv[e]):"transparent"===e?new eb(NaN,NaN,NaN,0):null}function Zv(e){return new eb(e>>16&255,e>>8&255,255&e,1)}function Qv(e,t,n,r){return r<=0&&(e=t=n=NaN),new eb(e,t,n,r)}function Jv(e,t,n,r){return 1===arguments.length?((o=e)instanceof Av||(o=Xv(o)),o?new eb((o=o.rgb()).r,o.g,o.b,o.opacity):new eb):new eb(e,t,n,null==r?1:r);var o}function eb(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function tb(){return`#${ab(this.r)}${ab(this.g)}${ab(this.b)}`}function nb(){const e=rb(this.opacity);return`${1===e?"rgb(":"rgba("}${ob(this.r)}, ${ob(this.g)}, ${ob(this.b)}${1===e?")":`, ${e})`}`}function rb(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 ab(e){return((e=ob(e))<16?"0":"")+e.toString(16)}function ib(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new lb(e,t,n,r)}function sb(e){if(e instanceof lb)return new lb(e.h,e.s,e.l,e.opacity);if(e instanceof Av||(e=Xv(e)),!e)return new lb;if(e instanceof lb)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 lb(i,s,l,e.opacity)}function lb(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function cb(e){return(e=(e||0)%360)<0?e+360:e}function ub(e){return Math.max(0,Math.min(1,e||0))}function db(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Pv(Av,Xv,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:qv,formatHex:qv,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return sb(this).formatHsl()},formatRgb:Gv,toString:Gv}),Pv(eb,Jv,Tv(Av,{brighter(e){return e=null==e?Iv:Math.pow(Iv,e),new eb(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?Rv:Math.pow(Rv,e),new eb(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new eb(ob(this.r),ob(this.g),ob(this.b),rb(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:tb,formatHex:tb,formatHex8:function(){return`#${ab(this.r)}${ab(this.g)}${ab(this.b)}${ab(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:nb,toString:nb})),Pv(lb,function(e,t,n,r){return 1===arguments.length?sb(e):new lb(e,t,n,null==r?1:r)},Tv(Av,{brighter(e){return e=null==e?Iv:Math.pow(Iv,e),new lb(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Rv:Math.pow(Rv,e),new lb(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 eb(db(e>=240?e-240:e+120,o,r),db(e,o,r),db(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new lb(cb(this.h),ub(this.s),ub(this.l),rb(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=rb(this.opacity);return`${1===e?"hsl(":"hsla("}${cb(this.h)}, ${100*ub(this.s)}%, ${100*ub(this.l)}%${1===e?")":`, ${e})`}`}}));var fb=e=>()=>e;function pb(e){return 1===(e=+e)?mb: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):fb(isNaN(t)?n:t)}}function mb(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):fb(isNaN(e)?t:e)}var hb=function e(t){var n=pb(t);function r(e,t){var r=n((e=Jv(e)).r,(t=Jv(t)).r),o=n(e.g,t.g),a=n(e.b,t.b),i=mb(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 gb(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 vb(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]=Sb(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 bb(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function yb(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function xb(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]=Sb(e[n],t[n]):o[n]=t[n];return function(e){for(n in r)o[n]=r[n](e);return o}}var wb=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,kb=new RegExp(wb.source,"g");function Cb(e,t){var n,r,o,a=wb.lastIndex=kb.lastIndex=0,i=-1,s=[],l=[];for(e+="",t+="";(n=wb.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:yb(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 Sb(e,t){var n,r=typeof t;return null==t||"boolean"===r?fb(t):("number"===r?yb:"string"===r?(n=Xv(t))?(t=n,hb):Cb:t instanceof Xv?hb:t instanceof Date?bb:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?gb:Array.isArray(t)?vb:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?xb:yb)(e,t)}function jb(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function Nb(e,t){void 0===t&&(t=e,e=Sb);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 Mb(e){return+e}var Eb=[0,1];function _b(e){return e}function Ob(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function Db(e,t,n){var r=e[0],o=e[1],a=t[0],i=t[1];return o<r?(r=Ob(o,r),a=n(i,a)):(r=Ob(r,o),a=n(a,i)),function(e){return a(r(e))}}function Pb(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]=Ob(e[i],e[i+1]),a[i]=n(t[i],t[i+1]);return function(t){var n=cv(e,t,1,r)-1;return a[n](o[n](t))}}function Tb(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Ab(){var e,t,n,r,o,a,i=Eb,s=Eb,l=Sb,c=_b;function u(){var e=Math.min(i.length,s.length);return c!==_b&&(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?Pb:Db,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),yb)))(n)))},d.domain=function(e){return arguments.length?(i=Array.from(e,Mb),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=jb,u()},d.clamp=function(e){return arguments.length?(c=!!e||_b,u()):c!==_b},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 Rb(){return Ab()(_b,_b)}function Ib(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 zb(e){return(e=Ib(Math.abs(e)))?e[1]:NaN}var Lb,Fb=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Bb(e){if(!(t=Fb.exec(e)))throw new Error("invalid format: "+e);var t;return new $b({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 $b(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 Wb(e,t){var n=Ib(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")}Bb.prototype=$b.prototype,$b.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 Hb={"%":(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)=>Wb(100*e,t),r:Wb,s:function(e,t){var n=Ib(e,t);if(!n)return e+"";var r=n[0],o=n[1],a=o-(Lb=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")+Ib(e,Math.max(0,t+a-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Ub(e){return e}var Vb,Yb,Kb,qb=Array.prototype.map,Gb=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Xb(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?Ub:(t=qb.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?Ub:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(qb.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=Bb(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,b=e.type;"n"===b?(h=!0,b="g"):Hb[b]||(void 0===g&&(g=12),v=!0,b="g"),(p||"0"===t&&"="===n)&&(p=!0,t="0",n="=");var y="$"===f?o:"#"===f&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",x="$"===f?a:/[%p]/.test(b)?l:"",w=Hb[b],k=/[defgprs%]/.test(b);function C(e){var o,a,l,f=y,C=x;if("c"===b)C=w(e)+C,e="";else{var S=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:w(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,C=("s"===b?Gb[8+Lb/3]:"")+C+(S&&"("===d?")":""),k)for(o=-1,a=e.length;++o<a;)if(48>(l=e.charCodeAt(o))||l>57){C=(46===l?i+e.slice(o+1):e.slice(o))+C,e=e.slice(0,o);break}}h&&!p&&(e=r(e,1/0));var j=f.length+e.length+C.length,N=j<m?new Array(m-j+1).join(t):"";switch(h&&p&&(e=r(N+e,N.length?m-C.length:1/0),N=""),n){case"<":e=f+e+C+N;break;case"=":e=f+N+e+C;break;case"^":e=N.slice(0,j=N.length>>1)+f+e+C+N.slice(j);break;default:e=N+f+e+C}return s(e)}return g=void 0===g?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),C.toString=function(){return e+""},C}return{format:d,formatPrefix:function(e,t){var n=d(((e=Bb(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(zb(t)/3))),o=Math.pow(10,-r),a=Gb[8+r/3];return function(e){return n(o*e)+a}}}}function Zb(e,t,n,r){var o,a=xv(e,t,n);switch((r=Bb(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(zb(t)/3)))-zb(Math.abs(e)))}(a,i))||(r.precision=o),Kb(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,zb(t)-zb(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,-zb(Math.abs(e)))}(a))||(r.precision=o-2*("%"===r.type))}return Yb(r)}function Qb(e){var t=e.domain;return e.ticks=function(e){var n=t();return bv(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return Zb(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=yv(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 Jb(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 ey(e){return Math.log(e)}function ty(e){return Math.exp(e)}function ny(e){return-Math.log(-e)}function ry(e){return-Math.exp(-e)}function oy(e){return isFinite(e)?+("1e"+e):e<0?0:e}function ay(e){return(t,n)=>-e(-t,n)}function iy(e){const t=e(ey,ty),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?oy:e===Math.E?Math.exp:t=>Math.pow(e,t)}(a),n()[0]<0?(r=ay(r),o=ay(o),e(ny,ry)):e(ey,ty),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=bv(i,s,p))}else m=bv(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=Bb(n)).precision||(n.trim=!0),n=Yb(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(Jb(n(),{floor:e=>o(Math.floor(r(e))),ceil:e=>o(Math.ceil(r(e)))})),t}function sy(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function ly(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function cy(e){var t=1,n=e(sy(t),ly(t));return n.constant=function(n){return arguments.length?e(sy(t=+n),ly(t)):t},Qb(n)}function uy(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function dy(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function fy(e){return e<0?-e*e:e*e}function py(e){var t=e(_b,_b),n=1;return t.exponent=function(t){return arguments.length?1===(n=+t)?e(_b,_b):.5===n?e(dy,fy):e(uy(n),uy(1/n)):n},Qb(t)}function my(){var e=py(Ab());return e.copy=function(){return Tb(e,my()).exponent(e.exponent())},Nv.apply(e,arguments),e}function hy(e){return Math.sign(e)*e*e}Vb=Xb({thousands:",",grouping:[3],currency:["$",""]}),Yb=Vb.format,Kb=Vb.formatPrefix;const gy=new Date,vy=new Date;function by(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=>by(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)=>(gy.setTime(+t),vy.setTime(+r),e(gy),e(vy),Math.floor(n(gy,vy))),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 yy=by(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);yy.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?by(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):yy:null),yy.range;const xy=1e3,wy=6e4,ky=36e5,Cy=864e5,Sy=6048e5,jy=2592e6,Ny=31536e6,My=by(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*xy)},(e,t)=>(t-e)/xy,e=>e.getUTCSeconds());My.range;const Ey=by(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*xy)},(e,t)=>{e.setTime(+e+t*wy)},(e,t)=>(t-e)/wy,e=>e.getMinutes());Ey.range;const _y=by(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*wy)},(e,t)=>(t-e)/wy,e=>e.getUTCMinutes());_y.range;const Oy=by(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*xy-e.getMinutes()*wy)},(e,t)=>{e.setTime(+e+t*ky)},(e,t)=>(t-e)/ky,e=>e.getHours());Oy.range;const Dy=by(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ky)},(e,t)=>(t-e)/ky,e=>e.getUTCHours());Dy.range;const Py=by(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*wy)/Cy,e=>e.getDate()-1);Py.range;const Ty=by(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Cy,e=>e.getUTCDate()-1);Ty.range;const Ay=by(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Cy,e=>Math.floor(e/Cy));function Ry(e){return by(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())*wy)/Sy)}Ay.range;const Iy=Ry(0),zy=Ry(1),Ly=Ry(2),Fy=Ry(3),By=Ry(4),$y=Ry(5),Wy=Ry(6);function Hy(e){return by(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)/Sy)}Iy.range,zy.range,Ly.range,Fy.range,By.range,$y.range,Wy.range;const Uy=Hy(0),Vy=Hy(1),Yy=Hy(2),Ky=Hy(3),qy=Hy(4),Gy=Hy(5),Xy=Hy(6);Uy.range,Vy.range,Yy.range,Ky.range,qy.range,Gy.range,Xy.range;const Zy=by(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());Zy.range;const Qy=by(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());Qy.range;const Jy=by(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());Jy.every=e=>isFinite(e=Math.floor(e))&&e>0?by(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,Jy.range;const ex=by(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 tx(e,t,n,r,o,a){const i=[[My,1,xy],[My,5,5e3],[My,15,15e3],[My,30,3e4],[a,1,wy],[a,5,3e5],[a,15,9e5],[a,30,18e5],[o,1,ky],[o,3,108e5],[o,6,216e5],[o,12,432e5],[r,1,Cy],[r,2,1728e5],[n,1,Sy],[t,1,jy],[t,3,7776e6],[e,1,Ny]];function s(t,n,r){const o=Math.abs(n-t)/r,a=iv(([,,e])=>e).right(i,o);if(a===i.length)return e.every(xv(t/Ny,n/Ny,r));if(0===a)return yy.every(Math.max(xv(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]}ex.every=e=>isFinite(e=Math.floor(e))&&e>0?by(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,ex.range;const[nx,rx]=tx(ex,Qy,Uy,Ay,Dy,_y),[ox,ax]=tx(Jy,Zy,Iy,Py,Oy,Ey);function ix(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 sx(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 lx(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}var cx,ux,dx,fx={"-":"",_:" ",0:"0"},px=/^\s*\d+/,mx=/^%/,hx=/[\\^$*+?|[\]().{}]/g;function gx(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 vx(e){return e.replace(hx,"\\$&")}function bx(e){return new RegExp("^(?:"+e.map(vx).join("|")+")","i")}function yx(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function xx(e,t,n){var r=px.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function wx(e,t,n){var r=px.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function kx(e,t,n){var r=px.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Cx(e,t,n){var r=px.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Sx(e,t,n){var r=px.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function jx(e,t,n){var r=px.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Nx(e,t,n){var r=px.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Mx(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 Ex(e,t,n){var r=px.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function _x(e,t,n){var r=px.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Ox(e,t,n){var r=px.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Dx(e,t,n){var r=px.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Px(e,t,n){var r=px.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Tx(e,t,n){var r=px.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Ax(e,t,n){var r=px.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Rx(e,t,n){var r=px.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Ix(e,t,n){var r=px.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function zx(e,t,n){var r=mx.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Lx(e,t,n){var r=px.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Fx(e,t,n){var r=px.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Bx(e,t){return gx(e.getDate(),t,2)}function $x(e,t){return gx(e.getHours(),t,2)}function Wx(e,t){return gx(e.getHours()%12||12,t,2)}function Hx(e,t){return gx(1+Py.count(Jy(e),e),t,3)}function Ux(e,t){return gx(e.getMilliseconds(),t,3)}function Vx(e,t){return Ux(e,t)+"000"}function Yx(e,t){return gx(e.getMonth()+1,t,2)}function Kx(e,t){return gx(e.getMinutes(),t,2)}function qx(e,t){return gx(e.getSeconds(),t,2)}function Gx(e){var t=e.getDay();return 0===t?7:t}function Xx(e,t){return gx(Iy.count(Jy(e)-1,e),t,2)}function Zx(e){var t=e.getDay();return t>=4||0===t?By(e):By.ceil(e)}function Qx(e,t){return e=Zx(e),gx(By.count(Jy(e),e)+(4===Jy(e).getDay()),t,2)}function Jx(e){return e.getDay()}function ew(e,t){return gx(zy.count(Jy(e)-1,e),t,2)}function tw(e,t){return gx(e.getFullYear()%100,t,2)}function nw(e,t){return gx((e=Zx(e)).getFullYear()%100,t,2)}function rw(e,t){return gx(e.getFullYear()%1e4,t,4)}function ow(e,t){var n=e.getDay();return gx((e=n>=4||0===n?By(e):By.ceil(e)).getFullYear()%1e4,t,4)}function aw(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+gx(t/60|0,"0",2)+gx(t%60,"0",2)}function iw(e,t){return gx(e.getUTCDate(),t,2)}function sw(e,t){return gx(e.getUTCHours(),t,2)}function lw(e,t){return gx(e.getUTCHours()%12||12,t,2)}function cw(e,t){return gx(1+Ty.count(ex(e),e),t,3)}function uw(e,t){return gx(e.getUTCMilliseconds(),t,3)}function dw(e,t){return uw(e,t)+"000"}function fw(e,t){return gx(e.getUTCMonth()+1,t,2)}function pw(e,t){return gx(e.getUTCMinutes(),t,2)}function mw(e,t){return gx(e.getUTCSeconds(),t,2)}function hw(e){var t=e.getUTCDay();return 0===t?7:t}function gw(e,t){return gx(Uy.count(ex(e)-1,e),t,2)}function vw(e){var t=e.getUTCDay();return t>=4||0===t?qy(e):qy.ceil(e)}function bw(e,t){return e=vw(e),gx(qy.count(ex(e),e)+(4===ex(e).getUTCDay()),t,2)}function yw(e){return e.getUTCDay()}function xw(e,t){return gx(Vy.count(ex(e)-1,e),t,2)}function ww(e,t){return gx(e.getUTCFullYear()%100,t,2)}function kw(e,t){return gx((e=vw(e)).getUTCFullYear()%100,t,2)}function Cw(e,t){return gx(e.getUTCFullYear()%1e4,t,4)}function Sw(e,t){var n=e.getUTCDay();return gx((e=n>=4||0===n?qy(e):qy.ceil(e)).getUTCFullYear()%1e4,t,4)}function jw(){return"+0000"}function Nw(){return"%"}function Mw(e){return+e}function Ew(e){return Math.floor(+e/1e3)}function _w(e){return new Date(e)}function Ow(e){return e instanceof Date?+e:+new Date(+e)}function Dw(e,t,n,r,o,a,i,s,l,c){var u=Rb(),d=u.invert,f=u.domain,p=c(".%L"),m=c(":%S"),h=c("%I:%M"),g=c("%I %p"),v=c("%a %d"),b=c("%b %d"),y=c("%B"),x=c("%Y");function w(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:b:n(e)<e?y:x)(e)}return u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?f(Array.from(e,Ow)):f().map(_w)},u.ticks=function(t){var n=f();return e(n[0],n[n.length-1],null==t?10:t)},u.tickFormat=function(e,t){return null==t?w:c(t)},u.nice=function(e){var n=f();return e&&"function"==typeof e.range||(e=t(n[0],n[n.length-1],null==e?10:e)),e?f(Jb(n,e)):u},u.copy=function(){return Tb(u,Dw(e,t,n,r,o,a,i,s,l,c))},u}function Pw(){var e,t,n,r,o,a=0,i=1,s=_b,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(Sb),c.rangeRound=u(jb),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 Tw(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Aw(){var e=py(Pw());return e.copy=function(){return Tw(e,Aw()).exponent(e.exponent())},Mv.apply(e,arguments)}function Rw(){var e,t,n,r,o,a,i,s=0,l=.5,c=1,u=1,d=_b,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=Nb(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(Sb),p.rangeRound=m(jb),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 Iw(){var e=py(Rw());return e.copy=function(){return Tw(e,Iw()).exponent(e.exponent())},Mv.apply(e,arguments)}!function(e){cx=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=bx(o),u=yx(o),d=bx(a),f=yx(a),p=bx(i),m=yx(i),h=bx(s),g=yx(s),v=bx(l),b=yx(l),y={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:Bx,e:Bx,f:Vx,g:nw,G:ow,H:$x,I:Wx,j:Hx,L:Ux,m:Yx,M:Kx,p:function(e){return o[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:Mw,s:Ew,S:qx,u:Gx,U:Xx,V:Qx,w:Jx,W:ew,x:null,X:null,y:tw,Y:rw,Z:aw,"%":Nw},x={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:iw,e:iw,f:dw,g:kw,G:Sw,H:sw,I:lw,j:cw,L:uw,m:fw,M:pw,p:function(e){return o[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:Mw,s:Ew,S:mw,u:hw,U:gw,V:bw,w:yw,W:xw,x:null,X:null,y:ww,Y:Cw,Z:jw,"%":Nw},w={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=b.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:Ox,e:Ox,f:Ix,g:Nx,G:jx,H:Px,I:Px,j:Dx,L:Rx,m:_x,M:Tx,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:Ex,Q:Lx,s:Fx,S:Ax,u:wx,U:kx,V:Cx,w:xx,W:Sx,x:function(e,t,r){return S(e,n,t,r)},X:function(e,t,n){return S(e,r,t,n)},y:Nx,Y:jx,Z:Mx,"%":zx};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=fx[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 C(e,t){return function(n){var r,o,a=lx(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=sx(lx(a.y,0,1))).getUTCDay(),r=o>4||0===o?Vy.ceil(r):Vy(r),r=Ty.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(o=(r=ix(lx(a.y,0,1))).getDay(),r=o>4||0===o?zy.ceil(r):zy(r),r=Py.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?sx(lx(a.y,0,1)).getUTCDay():ix(lx(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,sx(a)):ix(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=w[o in fx?t.charAt(i++):o])||(r=a(e,n,r))<0)return-1}else if(o!=n.charCodeAt(r++))return-1}return r}return y.x=k(n,y),y.X=k(r,y),y.c=k(t,y),x.x=k(n,x),x.X=k(r,x),x.c=k(t,x),{format:function(e){var t=k(e+="",y);return t.toString=function(){return e},t},parse:function(e){var t=C(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=k(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+="",!0);return t.toString=function(){return e},t}}}(e),ux=cx.format,cx.parse,dx=cx.utcFormat,cx.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 zw=Object.freeze({__proto__:null,scaleBand:Ov,scaleDiverging:function e(){var t=Qb(Rw()(_b));return t.copy=function(){return Tw(t,e())},Mv.apply(t,arguments)},scaleDivergingLog:function e(){var t=iy(Rw()).domain([.1,1,10]);return t.copy=function(){return Tw(t,e()).base(t.base())},Mv.apply(t,arguments)},scaleDivergingPow:Iw,scaleDivergingSqrt:function(){return Iw.apply(null,arguments).exponent(.5)},scaleDivergingSymlog:function e(){var t=cy(Rw());return t.copy=function(){return Tw(t,e()).constant(t.constant())},Mv.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,Mb),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,Mb):[0,1],Qb(r)},scaleImplicit:Ev,scaleLinear:function e(){var t=Rb();return t.copy=function(){return Tb(t,e())},Nv.apply(t,arguments),Qb(t)},scaleLog:function e(){const t=iy(Ab()).domain([1,10]);return t.copy=()=>Tb(t,e()).base(t.base()),Nv.apply(t,arguments),t},scaleOrdinal:_v,scalePoint:function(){return Dv(Ov.apply(null,arguments).paddingInner(1))},scalePow:my,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]=jv(n,e/t);return i}function i(e){return null==e||isNaN(e=+e)?t:r[cv(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(ov),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)},Nv.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[cv(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)},Nv.apply(Qb(s),arguments)},scaleRadial:function e(){var t,n=Rb(),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(hy(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,Mb)).map(hy)),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)},Nv.apply(a,arguments),Qb(a)},scaleSequential:function e(){var t=Qb(Pw()(_b));return t.copy=function(){return Tw(t,e())},Mv.apply(t,arguments)},scaleSequentialLog:function e(){var t=iy(Pw()).domain([1,10]);return t.copy=function(){return Tw(t,e()).base(t.base())},Mv.apply(t,arguments)},scaleSequentialPow:Aw,scaleSequentialQuantile:function e(){var t=[],n=_b;function r(e){if(null!=e&&!isNaN(e=+e))return n((cv(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(ov),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 kv(e);if(t>=1)return wv(e);var n,r=(n-1)*t,o=Math.floor(r),a=wv(Cv(e,o).subarray(0,o+1));return a+(kv(e.subarray(o+1))-a)*(r-o)}}(t,r/e))},r.copy=function(){return e(n).domain(t)},Mv.apply(r,arguments)},scaleSequentialSqrt:function(){return Aw.apply(null,arguments).exponent(.5)},scaleSequentialSymlog:function e(){var t=cy(Pw());return t.copy=function(){return Tw(t,e()).constant(t.constant())},Mv.apply(t,arguments)},scaleSqrt:function(){return my.apply(null,arguments).exponent(.5)},scaleSymlog:function e(){var t=cy(Ab());return t.copy=function(){return Tb(t,e()).constant(t.constant())},Nv.apply(t,arguments)},scaleThreshold:function e(){var t,n=[.5],r=[0,1],o=1;function a(e){return null!=e&&e<=e?r[cv(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)},Nv.apply(a,arguments)},scaleTime:function(){return Nv.apply(Dw(ox,ax,Jy,Zy,Iy,Py,Oy,Ey,My,ux).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},scaleUtc:function(){return Nv.apply(Dw(nx,rx,ex,Qy,Uy,Ty,Dy,_y,My,dx).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)},tickFormat:Zb}),Lw=e=>e.chartData,Fw=vf([Lw],e=>{var t=null!=e.chartData?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),Bw=(e,t,n,r)=>r?Fw(e):Lw(e);function $w(e){if(Array.isArray(e)&&2===e.length){var[t,n]=e;if(Ym(t)&&Ym(n))return!0}return!1}function Ww(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function Hw(e,t){if(t&&"function"!=typeof e&&Array.isArray(e)&&2===e.length){var n,r,[o,a]=e;if(Ym(o))n=o;else if("function"==typeof o)return;if(Ym(a))r=a;else if("function"==typeof a)return;var i=[n,r];if($w(i))return i}}var Uw,Vw=1e9,Yw=!0,Kw="[DecimalError] ",qw=Kw+"Invalid argument: ",Gw=Kw+"Exponent out of range: ",Xw=Math.floor,Zw=Math.pow,Qw=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Jw=1e7,ek=9007199254740991,tk=Xw(1286742750677284.5),nk={};function rk(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)),Yw?pk(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)/Jw|0,l[a]%=Jw;for(n&&(l.unshift(n),++o),s=l.length;0==l[--s];)l.pop();return t.d=l,t.e=o,Yw?pk(t,d):t}function ok(e,t,n){if(e!==~~e||e<t||e>n)throw Error(qw+e)}function ak(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+=uk(n)),a+=r;(n=7-(r=(i=e[t])+"").length)&&(a+=uk(n))}else if(0===i)return"0";for(;i%10==0;)i/=10;return a+i}nk.absoluteValue=nk.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e},nk.comparedTo=nk.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},nk.decimalPlaces=nk.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},nk.dividedBy=nk.div=function(e){return ik(this,new this.constructor(e))},nk.dividedToIntegerBy=nk.idiv=function(e){var t=this.constructor;return pk(ik(this,new t(e),0,1),t.precision)},nk.equals=nk.eq=function(e){return!this.cmp(e)},nk.exponent=function(){return lk(this)},nk.greaterThan=nk.gt=function(e){return this.cmp(e)>0},nk.greaterThanOrEqualTo=nk.gte=function(e){return this.cmp(e)>=0},nk.isInteger=nk.isint=function(){return this.e>this.d.length-2},nk.isNegative=nk.isneg=function(){return this.s<0},nk.isPositive=nk.ispos=function(){return this.s>0},nk.isZero=function(){return 0===this.s},nk.lessThan=nk.lt=function(e){return this.cmp(e)<0},nk.lessThanOrEqualTo=nk.lte=function(e){return this.cmp(e)<1},nk.logarithm=nk.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(Uw))throw Error(Kw+"NaN");if(n.s<1)throw Error(Kw+(n.s?"NaN":"-Infinity"));return n.eq(Uw)?new r(0):(Yw=!1,t=ik(dk(n,a),dk(e,a),a),Yw=!0,pk(t,o))},nk.minus=nk.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?mk(t,e):rk(t,(e.s=-e.s,e))},nk.modulo=nk.mod=function(e){var t,n=this,r=n.constructor,o=r.precision;if(!(e=new r(e)).s)throw Error(Kw+"NaN");return n.s?(Yw=!1,t=ik(n,e,0,1).times(e),Yw=!0,n.minus(t)):pk(new r(n),o)},nk.naturalExponential=nk.exp=function(){return sk(this)},nk.naturalLogarithm=nk.ln=function(){return dk(this)},nk.negated=nk.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},nk.plus=nk.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?rk(t,e):mk(t,(e.s=-e.s,e))},nk.precision=nk.sd=function(e){var t,n,r,o=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(qw+e);if(t=lk(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},nk.squareRoot=nk.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(Kw+"NaN")}for(e=lk(s),Yw=!1,0==(o=Math.sqrt(+s))||o==1/0?(((t=ak(s.d)).length+e)%2==0&&(t+="0"),o=Math.sqrt(t),e=Xw((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(ik(s,a,i+2)).times(.5),ak(a.d).slice(0,i)===(t=ak(r.d)).slice(0,i)){if(t=t.slice(i-3,i+1),o==i&&"4999"==t){if(pk(a,n+1,0),a.times(a).eq(s)){r=a;break}}else if("9999"!=t)break;i+=4}return Yw=!0,pk(r,n)},nk.times=nk.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%Jw|0,t=s/Jw|0;a[o]=(a[o]+t)%Jw|0}for(;!a[--i];)a.pop();return t?++n:a.shift(),e.d=a,e.e=n,Yw?pk(e,d.precision):e},nk.toDecimalPlaces=nk.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),void 0===e?n:(ok(e,0,Vw),void 0===t?t=r.rounding:ok(t,0,8),pk(n,e+lk(n)+1,t))},nk.toExponential=function(e,t){var n,r=this,o=r.constructor;return void 0===e?n=hk(r,!0):(ok(e,0,Vw),void 0===t?t=o.rounding:ok(t,0,8),n=hk(r=pk(new o(r),e+1,t),!0,e+1)),n},nk.toFixed=function(e,t){var n,r,o=this,a=o.constructor;return void 0===e?hk(o):(ok(e,0,Vw),void 0===t?t=a.rounding:ok(t,0,8),n=hk((r=pk(new a(o),e+lk(o)+1,t)).abs(),!1,e+lk(r)+1),o.isneg()&&!o.isZero()?"-"+n:n)},nk.toInteger=nk.toint=function(){var e=this,t=e.constructor;return pk(new t(e),lk(e)+1,t.rounding)},nk.toNumber=function(){return+this},nk.toPower=nk.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(Uw);if(!(s=new l(s)).s){if(e.s<1)throw Error(Kw+"Infinity");return s}if(s.eq(Uw))return s;if(r=l.precision,e.eq(Uw))return pk(s,r);if(i=(t=e.e)>=(n=e.d.length-1),a=s.s,i){if((n=c<0?-c:c)<=ek){for(o=new l(Uw),t=Math.ceil(r/7+4),Yw=!1;n%2&&gk((o=o.times(s)).d,t),0!==(n=Xw(n/2));)gk((s=s.times(s)).d,t);return Yw=!0,e.s<0?new l(Uw).div(o):pk(o,r)}}else if(a<0)throw Error(Kw+"NaN");return a=a<0&&1&e.d[Math.max(t,n)]?-1:1,s.s=1,Yw=!1,o=e.times(dk(s,r+12)),Yw=!0,(o=sk(o)).s=a,o},nk.toPrecision=function(e,t){var n,r,o=this,a=o.constructor;return void 0===e?r=hk(o,(n=lk(o))<=a.toExpNeg||n>=a.toExpPos):(ok(e,1,Vw),void 0===t?t=a.rounding:ok(t,0,8),r=hk(o=pk(new a(o),e,t),e<=(n=lk(o))||n<=a.toExpNeg,e)),r},nk.toSignificantDigits=nk.tosd=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(ok(e,1,Vw),void 0===t?t=n.rounding:ok(t,0,8)),pk(new n(this),e,t)},nk.toString=nk.valueOf=nk.val=nk.toJSON=nk[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=lk(e),n=e.constructor;return hk(e,t<=n.toExpNeg||t>=n.toExpPos)};var ik=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%Jw|0,r=n/Jw|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*Jw+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,b,y,x,w,k,C,S,j=r.constructor,N=r.s==o.s?1:-1,M=r.d,E=o.d;if(!r.s)return new j(r);if(!o.s)throw Error(Kw+"Division by zero");for(l=r.e-o.e,C=E.length,w=M.length,m=(p=new j(N)).d=[],c=0;E[c]==(M[c]||0);)++c;if(E[c]>(M[c]||0)&&--l,(b=null==a?a=j.precision:i?a+(lk(r)-lk(o))+1:a)<0)return new j(0);if(b=b/7+2|0,c=0,1==C)for(u=0,E=E[0],b++;(c<w||u)&&b--;c++)y=u*Jw+(M[c]||0),m[c]=y/E|0,u=y%E|0;else{for((u=Jw/(E[0]+1)|0)>1&&(E=e(E,u),M=e(M,u),C=E.length,w=M.length),x=C,g=(h=M.slice(0,C)).length;g<C;)h[g++]=0;(S=E.slice()).unshift(0),k=E[0],E[1]>=Jw/2&&++k;do{u=0,(s=t(E,h,C,g))<0?(v=h[0],C!=g&&(v=v*Jw+(h[1]||0)),(u=v/k|0)>1?(u>=Jw&&(u=Jw-1),1==(s=t(d=e(E,u),h,f=d.length,g=h.length))&&(u--,n(d,C<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,C,g=h.length))<1&&(u++,n(h,C<g?S:E,g)),g=h.length):0===s&&(u++,h=[0]),m[c++]=u,s&&h[0]?h[g++]=M[x]||0:(h=[M[x]],g=1)}while((x++<w||void 0!==h[0])&&b--)}return m[0]||m.shift(),p.e=l,pk(p,i?a+lk(p)+1:a)}}();function sk(e,t){var n,r,o,a,i,s=0,l=0,c=e.constructor,u=c.precision;if(lk(e)>16)throw Error(Gw+lk(e));if(!e.s)return new c(Uw);for(Yw=!1,i=u,a=new c(.03125);e.abs().gte(.1);)e=e.times(a),l+=5;for(i+=Math.log(Zw(2,l))/Math.LN10*2+5|0,n=r=o=new c(Uw),c.precision=i;;){if(r=pk(r.times(e),i),n=n.times(++s),ak((a=o.plus(ik(r,n,i))).d).slice(0,i)===ak(o.d).slice(0,i)){for(;l--;)o=pk(o.times(o),i);return c.precision=u,null==t?(Yw=!0,pk(o,u)):o}o=a}}function lk(e){for(var t=7*e.e,n=e.d[0];n>=10;n/=10)t++;return t}function ck(e,t,n){if(t>e.LN10.sd())throw Yw=!0,n&&(e.precision=n),Error(Kw+"LN10 precision limit exceeded");return pk(new e(e.LN10),t)}function uk(e){for(var t="";e--;)t+="0";return t}function dk(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(Kw+(f.s?"NaN":"-Infinity"));if(f.eq(Uw))return new m(0);if(null==t?(Yw=!1,c=h):c=t,f.eq(10))return null==t&&(Yw=!0),ck(m,c);if(c+=10,m.precision=c,r=(n=ak(p)).charAt(0),a=lk(f),!(Math.abs(a)<15e14))return l=ck(m,c+2,h).times(a+""),f=dk(new m(r+"."+n.slice(1)),c-10).plus(l),m.precision=h,null==t?(Yw=!0,pk(f,h)):f;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=ak((f=f.times(e)).d)).charAt(0),d++;for(a=lk(f),r>1?(f=new m("0."+n),a++):f=new m(r+"."+n.slice(1)),s=i=f=ik(f.minus(Uw),f.plus(Uw),c),u=pk(f.times(f),c),o=3;;){if(i=pk(i.times(u),c),ak((l=s.plus(ik(i,new m(o),c))).d).slice(0,c)===ak(s.d).slice(0,c))return s=s.times(2),0!==a&&(s=s.plus(ck(m,c+2,h).times(a+""))),s=ik(s,new m(d),c),m.precision=h,null==t?(Yw=!0,pk(s,h)):s;s=l,o+=2}}function fk(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=Xw(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),Yw&&(e.e>tk||e.e<-tk))throw Error(Gw+n)}else e.s=0,e.e=0,e.d=[0];return e}function pk(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=Zw(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/Zw(10,i-o):0:d[u-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return l?(a=lk(e),d.length=1,t=t-a-1,d[0]=Zw(10,(7-t%7)%7),e.e=Xw(-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=Zw(10,7-r),d[u]=o>0?(c/Zw(10,i-o)%Zw(10,o)|0)*a:0),l)for(;;){if(0==u){(d[0]+=a)==Jw&&(d[0]=1,++e.e);break}if(d[u]+=a,d[u]!=Jw)break;d[u--]=0,a=1}for(r=d.length;0===d[--r];)d.pop();if(Yw&&(e.e>tk||e.e<-tk))throw Error(Gw+lk(e));return e}function mk(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),Yw?pk(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]=Jw-1;--l[a],l[o]+=Jw}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,Yw?pk(t,p):t):new f(0)}function hk(e,t,n){var r,o=lk(e),a=ak(e.d),i=a.length;return t?(n&&(r=n-i)>0?a=a.charAt(0)+"."+a.slice(1)+uk(r):i>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(o<0?"e":"e+")+o):o<0?(a="0."+uk(-o-1)+a,n&&(r=n-i)>0&&(a+=uk(r))):o>=i?(a+=uk(o+1-i),n&&(r=n-o-1)>0&&(a=a+"."+uk(r))):((r=o+1)<i&&(a=a.slice(0,r)+"."+a.slice(r)),n&&(r=n-i)>0&&(o+1===i&&(a+="."),a+=uk(r))),e.s<0?"-"+a:a}function gk(e,t){if(e.length>t)return e.length=t,!0}function vk(e){if(!e||"object"!=typeof e)throw Error(Kw+"Object expected");var t,n,r,o=["precision",1,Vw,"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(!(Xw(r)===r&&r>=o[t+1]&&r<=o[t+2]))throw Error(qw+n+": "+r);this[n]=r}if(void 0!==(r=e[n="LN10"])){if(r!=Math.LN10)throw Error(qw+n+": "+r);this[n]=new this(r)}return this}var bk=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(qw+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])):fk(t,e.toString())}if("string"!=typeof e)throw Error(qw+e);if(45===e.charCodeAt(0)?(e=e.slice(1),t.s=-1):t.s=1,!Qw.test(e))throw Error(qw+e);fk(t,e)}if(a.prototype=nk,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=vk,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"});Uw=new bk(1);var yk=bk,xk=e=>e,wk={},kk=e=>e===wk,Ck=e=>function t(){return 0===arguments.length||1===arguments.length&&kk(arguments.length<=0?void 0:arguments[0])?t:e(...arguments)},Sk=(e,t)=>1===e?t:Ck(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!==wk).length;return a>=e?t(...r):Sk(e-a,Ck(function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];var a=r.map(e=>kk(e)?n.shift():e);return t(...a,...n)}))}),jk=e=>Sk(e.length,e),Nk=(e,t)=>{for(var n=[],r=e;r<t;++r)n[r-e]=r;return n},Mk=jk((e,t)=>Array.isArray(t)?t.map(e):Object.keys(t).map(e=>t[e]).map(e)),Ek=e=>Array.isArray(e)?e.reverse():e.split("").reverse().join(""),_k=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 Ok(e){return 0===e?1:Math.floor(new yk(e).abs().log(10).toNumber())+1}function Dk(e,t,n){for(var r=new yk(e),o=0,a=[];r.lt(t)&&o<1e5;)a.push(r.toNumber()),r=r.add(n),o++;return a}jk((e,t,n)=>{var r=+e;return r+n*(+t-r)}),jk((e,t,n)=>{var r=t-+e;return(n-e)/(r=r||1/0)}),jk((e,t,n)=>{var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});var Pk=e=>{var[t,n]=e,[r,o]=[t,n];return t>n&&([r,o]=[n,t]),[r,o]},Tk=(e,t,n)=>{if(e.lte(0))return new yk(0);var r=Ok(e.toNumber()),o=new yk(10).pow(r),a=e.div(o),i=1!==r?.05:.1,s=new yk(Math.ceil(a.div(i).toNumber())).add(n).mul(i).mul(o);return new yk(t?s.toNumber():Math.ceil(s.toNumber()))},Ak=(e,t,n)=>{var r=new yk(1),o=new yk(e);if(!o.isint()&&n){var a=Math.abs(e);a<1?(r=new yk(10).pow(Ok(e)-1),o=new yk(Math.floor(o.div(r).toNumber())).mul(r)):a>1&&(o=new yk(Math.floor(e)))}else 0===e?o=new yk(Math.floor((t-1)/2)):n||(o=new yk(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 xk;var r=t.reverse(),o=r[0],a=r.slice(1);return function(){return a.reduce((e,t)=>t(e),o(...arguments))}}(Mk(e=>o.add(new yk(e-i).mul(r)).toNumber()),Nk);return s(0,t)},Rk=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 yk(0),tickMin:new yk(0),tickMax:new yk(0)};var a,i=Tk(new yk(t).sub(e).div(n-1),r,o);a=e<=0&&t>=0?new yk(0):(a=new yk(e).add(t).div(2)).sub(new yk(a).mod(i));var s=Math.ceil(a.sub(e).div(i).toNumber()),l=Math.ceil(new yk(t).sub(a).div(i).toNumber()),c=s+l+1;return c>n?Rk(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 yk(s).mul(i)),tickMax:a.add(new yk(l).mul(i))})};var Ik=_k(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]=Pk([t,n]);if(i===-1/0||s===1/0){var l=s===1/0?[i,...Nk(0,r-1).map(()=>1/0)]:[...Nk(0,r-1).map(()=>-1/0),s];return t>n?Ek(l):l}if(i===s)return Ak(i,r,o);var{step:c,tickMin:u,tickMax:d}=Rk(i,s,a,o,0),f=Dk(u,d.add(new yk(.1).mul(c)),c);return t>n?Ek(f):f}),zk=_k(function(e,t){var[n,r]=e,o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],[a,i]=Pk([n,r]);if(a===-1/0||i===1/0)return[n,r];if(a===i)return[a];var s=Math.max(t,2),l=Tk(new yk(i).sub(a).div(s-1),o,0),c=[...Dk(new yk(a),new yk(i),l),i];return!1===o&&(c=c.map(e=>Math.round(e))),n>r?Ek(c):c}),Lk=e=>e.rootProps.stackOffset,Fk=e=>e.options.chartName,Bk=e=>e.rootProps.syncId,$k=e=>e.rootProps.syncMethod,Wk=e=>e.options.eventEmitter,Hk=0,Uk="auto",Vk=!0,Yk=!1,Kk=!0,qk=0,Gk="auto",Xk=!0,Zk=5,Qk=(e,t)=>{if(e&&t)return null!=e&&e.reversed?[t[1],t[0]]:t},Jk={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:Hk,includeHidden:!1,name:void 0,reversed:!1,scale:Uk,tick:Vk,tickCount:void 0,ticks:void 0,type:"category",unit:void 0},eC={allowDataOverflow:Yk,allowDecimals:!1,allowDuplicatedCategory:Kk,dataKey:void 0,domain:void 0,id:qk,includeHidden:!1,name:void 0,reversed:!1,scale:Gk,tick:Xk,tickCount:Zk,ticks:void 0,type:"number",unit:void 0},tC={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,dataKey:void 0,domain:void 0,id:Hk,includeHidden:!1,name:void 0,reversed:!1,scale:Uk,tick:Vk,tickCount:void 0,ticks:void 0,type:"number",unit:void 0},nC={allowDataOverflow:Yk,allowDecimals:!1,allowDuplicatedCategory:Kk,dataKey:void 0,domain:void 0,id:qk,includeHidden:!1,name:void 0,reversed:!1,scale:Gk,tick:Xk,tickCount:Zk,ticks:void 0,type:"category",unit:void 0},rC=(e,t)=>null!=e.polarAxis.angleAxis[t]?e.polarAxis.angleAxis[t]:"radial"===e.layout.layoutType?tC:Jk,oC=(e,t)=>null!=e.polarAxis.radiusAxis[t]?e.polarAxis.radiusAxis[t]:"radial"===e.layout.layoutType?nC:eC,aC=e=>e.polarOptions,iC=vf([fm,pm,xm],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}),sC=vf([aC,iC],(e,t)=>{if(null!=e)return Gc(e.innerRadius,t,0)}),lC=vf([aC,iC],(e,t)=>{if(null!=e)return Gc(e.outerRadius,t,.8*t)}),cC=vf([aC],e=>{if(null==e)return[0,0];var{startAngle:t,endAngle:n}=e;return[t,n]});vf([rC,cC],Qk);var uC=vf([iC,sC,lC],(e,t,n)=>{if(null!=e&&null!=t&&null!=n)return[t,n]});vf([oC,uC],Qk),vf([oh,aC,sC,lC,fm,pm],(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:Gc(i,o,o/2),cy:Gc(s,a,a/2),innerRadius:n,outerRadius:r,startAngle:l,endAngle:c,clockWise:!1}}});var dC=(e,t)=>t,fC=(e,t,n)=>n;function pC(e){return null==e?void 0:e.id}var mC=e=>{var t=oh(e);return"horizontal"===t?"xAxis":"vertical"===t?"yAxis":"centric"===t?"angleAxis":"radiusAxis"},hC=e=>e.tooltip.settings.axisId,gC=e=>{var t=mC(e),n=hC(e);return TC(e,t,n)},vC=vf([gC],e=>null==e?void 0:e.dataKey);function bC(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=pC(e);n.forEach((t,n)=>{var r,l=null==a||o?n:String(rm(t,a,null)),c=rm(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 yC(e){return null!=e.stackId&&null!=e.dataKey}var xC=(e,t)=>e===t||null!=e&&null!=t&&(e[0]===t[0]&&e[1]===t[1]);function wC(e,t){return!(!Array.isArray(e)||!Array.isArray(t)||0!==e.length||0!==t.length)||e===t}function kC(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 CC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kC(Object(n),!0).forEach(function(t){SC(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kC(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function SC(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var jC=[0,"auto"],NC={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},MC=(e,t)=>{var n=((e,t)=>e.cartesianAxis.xAxis[t])(e,t);return null==n?NC:n},EC={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:jC,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},_C=(e,t)=>{var n=((e,t)=>e.cartesianAxis.yAxis[t])(e,t);return null==n?EC:n},OC={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:""},DC=(e,t)=>{var n=e.cartesianAxis.zAxis[t];return null==n?OC:n},PC=(e,t,n)=>{switch(t){case"xAxis":return MC(e,n);case"yAxis":return _C(e,n);case"zAxis":return DC(e,n);case"angleAxis":return rC(e,n);case"radiusAxis":return oC(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},TC=(e,t,n)=>{switch(t){case"xAxis":return MC(e,n);case"yAxis":return _C(e,n);case"angleAxis":return rC(e,n);case"radiusAxis":return oC(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 RC(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 IC=vf([dC,fC],RC),zC=(e,t,n)=>e.filter(n).filter(e=>!0===(null==t?void 0:t.includeHidden)||!e.hide),LC=vf([e=>e.graphicalItems.cartesianItems,PC,IC],zC,{memoizeOptions:{resultEqualityCheck:wC}}),FC=vf([LC],e=>e.filter(e=>"area"===e.type||"bar"===e.type).filter(yC)),BC=e=>e.filter(e=>!("stackId"in e)||void 0===e.stackId),$C=vf([LC],BC),WC=e=>e.map(e=>e.data).filter(Boolean).flat(1),HC=vf([LC],WC,{memoizeOptions:{resultEqualityCheck:wC}}),UC=(e,t)=>{var{chartData:n=[],dataStartIndex:r,dataEndIndex:o}=t;return e.length>0?e:n.slice(r,o+1)},VC=vf([HC,Bw],UC),YC=(e,t,n)=>null!=(null==t?void 0:t.dataKey)?e.map(e=>({value:rm(e,t.dataKey)})):n.length>0?n.map(e=>e.dataKey).flatMap(t=>e.map(e=>({value:rm(e,t)}))):e.map(e=>({value:e})),KC=vf([VC,PC,LC],YC);function qC(e,t){switch(e){case"xAxis":return"x"===t.direction;case"yAxis":return"y"===t.direction;default:return!1}}function GC(e){if(Yc(e)||e instanceof Date){var t=Number(e);if(Ym(t))return t}}function XC(e){if(Array.isArray(e)){var t=[GC(e[0]),GC(e[1])];return $w(t)?t:void 0}var n=GC(e);if(null!=n)return[n,n]}function ZC(e){return e.map(GC).filter(ng)}var QC=vf([FC,Bw,gC],bC),JC=(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(pC);return[r,{stackedData:sm(e,a,n),graphicalItems:o}]}))},eS=vf([QC,FC,Lk],JC),tS=(e,t,n,r)=>{var{dataStartIndex:o,dataEndIndex:a}=t;if(null==r&&"zAxis"!==n){var i=lm(e,o,a);if(null==i||0!==i[0]||0!==i[1])return i}},nS=vf([PC],e=>e.allowDataOverflow),rS=e=>{var t;if(null==e||!("domain"in e))return jC;if(null!=e.domain)return e.domain;if(null!=e.ticks){if("number"===e.type){var n=ZC(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:jC},oS=vf([PC],rS),aS=vf([oS,nS],Hw),iS=vf([eS,Lw,dC,aS],tS,{memoizeOptions:{resultEqualityCheck:xC}}),sS=e=>e.errorBars,lS=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)]}},cS=(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=>qC(o,e)),u=rm(e,null!==(l=t.dataKey)&&void 0!==l?l:n.dataKey),d=function(e,t,n){return!n||"number"!=typeof t||Hc(t)?[]:n.length?ZC(n.flatMap(n=>{var r,o,a=rm(e,n.dataKey);if(Array.isArray(a)?[r,o]=a:r=o=a,Ym(r)&&Ym(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(rm(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]))}),Ym(a)&&Ym(i))return[a,i]},uS=vf([VC,PC,$C,sS,dC],cS,{memoizeOptions:{resultEqualityCheck:xC}});function dS(e){var{value:t}=e;if(Yc(t)||t instanceof Date)return t}var fS=e=>e.referenceElements.dots,pS=(e,t,n)=>e.filter(e=>"extendDomain"===e.ifOverflow).filter(e=>"xAxis"===t?e.xAxisId===n:e.yAxisId===n),mS=vf([fS,dC,fC],pS),hS=e=>e.referenceElements.areas,gS=vf([hS,dC,fC],pS),vS=e=>e.referenceElements.lines,bS=vf([vS,dC,fC],pS),yS=(e,t)=>{var n=ZC(e.map(e=>"xAxis"===t?e.x:e.y));if(0!==n.length)return[Math.min(...n),Math.max(...n)]},xS=vf(mS,dC,yS),wS=(e,t)=>{var n=ZC(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)]},kS=vf([gS,dC],wS),CS=(e,t)=>{var n=ZC(e.map(e=>"xAxis"===t?e.x:e.y));if(0!==n.length)return[Math.min(...n),Math.max(...n)]},SS=vf(bS,dC,CS),jS=vf(xS,SS,kS,(e,t,n)=>lS(e,n,t)),NS=(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($w(r))return Ww(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(Vc(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&&cm.test(i)){var l=cm.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(Vc(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&&um.test(s)){var u=um.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($w(f))return null==t?f:Ww(f,t,n)}}}(t,"vertical"===i&&"xAxis"===s||"horizontal"===i&&"yAxis"===s?lS(r,a,o):lS(a,o),e.allowDataOverflow),MS=vf([PC,oS,aS,iS,uS,jS,oh,dC],NS,{memoizeOptions:{resultEqualityCheck:xC}}),ES=[0,1],_S=(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=om(t,a);return c&&null==s?rv(0,n.length):"category"===l?((e,t,n)=>{var r=e.map(dS).filter(e=>null!=e);return n&&(null==t.dataKey||t.allowDuplicatedCategory&&Xc(r))?rv(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))})(r,e,c):"expand"===o?ES:i}},OS=vf([PC,oh,VC,KC,Lk,dC,MS],_S),DS=(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(Jc(a));return s in zw?s:"point"}}},PS=vf([PC,oh,AC,Fk,dC],DS);function TS(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 zw)return zw[e]();var t="scale".concat(Jc(e));return t in zw?zw[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])-am,a=Math.max(r[0],r[1])+am,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 AS=(e,t,n)=>{var r=rS(t);if("auto"===n||"linear"===n)return null!=t&&t.tickCount&&Array.isArray(r)&&("auto"===r[0]||"auto"===r[1])&&$w(e)?Ik(e,t.tickCount,t.allowDecimals):null!=t&&t.tickCount&&"number"===t.type&&$w(e)?zk(e,t.tickCount,t.allowDecimals):void 0},RS=vf([OS,TC,PS],AS),IS=(e,t,n,r)=>{if("angleAxis"!==r&&"number"===(null==e?void 0:e.type)&&$w(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},zS=vf([PC,OS,RS,dC],IS),LS=vf(KC,PC,(e,t)=>{if(t&&"number"===t.type){var n=1/0,r=Array.from(ZC(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}}),FS=vf(LS,oh,e=>e.rootProps.barCategoryGap,xm,(e,t,n,r)=>r,(e,t,n,r,o)=>{if(!Ym(e))return 0;var a="vertical"===t?r.height:r.width;if("gap"===o)return e*a/2;if("no-gap"===o){var i=Gc(n,e*a),s=e*a/2;return s-i-(s-i)/a*i}return 0}),BS=vf(MC,(e,t)=>{var n=MC(e,t);return null==n||"string"!=typeof n.padding?0:FS(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}}),$S=vf(_C,(e,t)=>{var n=_C(e,t);return null==n||"string"!=typeof n.padding?0:FS(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}}),WS=vf([xm,BS,_m,Em,(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]}),HS=vf([xm,oh,$S,_m,Em,(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]}),US=(e,t,n,r)=>{var o;switch(t){case"xAxis":return WS(e,n,r);case"yAxis":return HS(e,n,r);case"zAxis":return null===(o=DC(e,n))||void 0===o?void 0:o.range;case"angleAxis":return cC(e);case"radiusAxis":return uC(e,n);default:return}},VS=vf([PC,US],Qk),YS=vf([PC,PS,zS,VS],TS);function KS(e,t){return e.id<t.id?-1:e.id>t.id?1:0}vf([LC,sS,dC],(e,t,n)=>e.flatMap(e=>t[e.id]).filter(Boolean).filter(e=>qC(n,e)));var qS=(e,t)=>t,GS=(e,t,n)=>n,XS=vf(hm,qS,GS,(e,t,n)=>e.filter(e=>e.orientation===t).filter(e=>e.mirror===n).sort(KS)),ZS=vf(gm,qS,GS,(e,t,n)=>e.filter(e=>e.orientation===t).filter(e=>e.mirror===n).sort(KS)),QS=(e,t)=>({width:e.width,height:t.height});vf(xm,MC,QS);var JS=vf(pm,xm,XS,qS,GS,(e,t,n,r,o)=>{var a,i={};return n.forEach(n=>{var s=QS(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}),ej=vf(fm,xm,ZS,qS,GS,(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});vf([xm,MC,(e,t)=>{var n=MC(e,t);if(null!=n)return JS(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}}});vf([xm,_C,(e,t)=>{var n=_C(e,t);if(null!=n)return ej(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}}}),vf(xm,_C,(e,t)=>({width:"number"==typeof t.width?t.width:60,height:e.height}));var tj=(e,t,n,r)=>{if(null!=n){var{allowDuplicatedCategory:o,type:a,dataKey:i}=n,s=om(e,r),l=t.map(e=>e.value);return i&&s&&"category"===a&&o&&Xc(l)?l:void 0}},nj=vf([oh,KC,PC,dC],tj),rj=(e,t,n,r)=>{if(null!=n&&null!=n.dataKey){var{type:o,scale:a}=n;return!om(e,r)||"number"!==o&&"auto"===a?void 0:t.map(e=>e.value)}},oj=vf([oh,KC,TC,dC],rj);vf([oh,(e,t,n)=>{switch(t){case"xAxis":return MC(e,n);case"yAxis":return _C(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},PS,YS,nj,oj,US,RS,dC],(e,t,n,r,o,a,i,s,l)=>{if(null==t)return null;var c=om(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}});vf([oh,TC,PS,YS,RS,US,nj,oj,dC],(e,t,n,r,o,a,i,s,l)=>{if(null!=t&&null!=r){var c=om(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*Wc(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=>!Hc(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}))}});vf([oh,TC,YS,US,nj,oj,dC],(e,t,n,r,o,a,i)=>{if(null!=t&&null!=n&&null!=r&&r[0]!==r[1]){var s=om(e,i),{tickCount:l}=t,c=0;return c="angleAxis"===i&&(null==r?void 0:r.length)>=2?2*Wc(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}))}}),vf(PC,YS,(e,t)=>{if(null!=e&&null!=t)return CC(CC({},e),{},{scale:t})});var aj=vf([PC,PS,OS,VS],TS);vf((e,t,n)=>DC(e,n),aj,(e,t)=>{if(null!=e&&null!=t)return CC(CC({},e),{},{scale:t})}),vf([oh,hm,gm],(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 ij=e=>e.options.defaultTooltipEventType,sj=e=>e.options.validateTooltipEventTypes;function lj(e,t,n){if(null==e)return t;var r=e?"axis":"item";return null==n?t:n.includes(r)?r:t}function cj(e){return of(t=>function(e,t){return lj(t,ij(e),sj(e))}(t,e))}var uj=(e,t)=>{var n,r=Number(t);if(!Hc(r)&&null!=t)return r>=0?null==e||null===(n=e[r])||void 0===n?void 0:n.value:void 0},dj={active:!1,index:null,dataKey:void 0,coordinate:void 0},fj=qp({name:"tooltip",initialState:{itemInteraction:{click:dj,hover:dj},axisInteraction:{click:dj,hover:dj},keyboardInteraction:dj,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:Wp()},removeTooltipEntrySettings:{reducer(e,t){var n=Ap(e).tooltipItemPayloads.indexOf(t.payload);n>-1&&e.tooltipItemPayloads.splice(n,1)},prepare:Wp()},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:pj,removeTooltipEntrySettings:mj,setTooltipSettingsState:hj,setActiveMouseOverItemIndex:gj,mouseLeaveItem:vj,mouseLeaveChart:bj,setActiveClickItemIndex:yj,setMouseOverAxisIndex:xj,setMouseClickAxisIndex:wj,setSyncInteraction:kj,setKeyboardInteraction:Cj}=fj.actions;function Sj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function jj(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Sj(Object(n),!0).forEach(function(t){Nj(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sj(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Nj(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 Mj=(e,t,n,r)=>{if(null==t)return dj;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 dj;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 jj(jj({},o),{},{active:!0})}else if(null!=r)return{active:!0,coordinate:void 0,dataKey:void 0,index:r};return jj(jj({},dj),{},{coordinate:o.coordinate})},Ej=(e,t)=>{var n=null==e?void 0:e.index;if(null==n)return null;var r=Number(n);if(!Ym(r))return n;var o=1/0;return t.length>0&&(o=t.length-1),String(Math.max(0,Math.min(r,o)))},_j=(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}}},Oj=(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},Dj=e=>e.options.tooltipPayloadSearcher,Pj=e=>e.tooltip;function Tj(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 Aj(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tj(Object(n),!0).forEach(function(t){Rj(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tj(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Rj(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 Ij=(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)?Jp(g,c,u):g,b=null!==(d=null==h?void 0:h.dataKey)&&void 0!==d?d:r,y=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):$c(e,t))===n)}(v,r,o):a(v,t,l,y),Array.isArray(f))?f.forEach(t=>{var n=Aj(Aj({},h),{},{name:t.name,unit:t.unit,color:void 0,fill:void 0});e.push(dm({tooltipEntrySettings:n,dataKey:t.dataKey,payload:t.payload,value:rm(t.payload,t.dataKey),name:t.name}))}):e.push(dm({tooltipEntrySettings:h,dataKey:b,payload:f,value:rm(f,b),name:null!==(p=rm(f,y))&&void 0!==p?p:null==h?void 0:h.name}));return e},[])}},zj=vf([gC,oh,AC,Fk,mC],DS),Lj=vf([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),Fj=vf([mC,hC],RC),Bj=vf([Lj,gC,Fj],zC,{memoizeOptions:{resultEqualityCheck:wC}}),$j=vf([Bj],e=>e.filter(yC)),Wj=vf([Bj],WC,{memoizeOptions:{resultEqualityCheck:wC}}),Hj=vf([Wj,Lw],UC),Uj=vf([$j,Lw,gC],bC),Vj=vf([Hj,gC,Bj],YC),Yj=vf([gC],rS),Kj=vf([gC],e=>e.allowDataOverflow),qj=vf([Yj,Kj],Hw),Gj=vf([Bj],e=>e.filter(yC)),Xj=vf([Uj,Gj,Lk],JC),Zj=vf([Xj,Lw,mC,qj],tS),Qj=vf([Bj],BC),Jj=vf([Hj,gC,Qj,sS,mC],cS,{memoizeOptions:{resultEqualityCheck:xC}}),eN=vf([fS,mC,hC],pS),tN=vf([eN,mC],yS),nN=vf([hS,mC,hC],pS),rN=vf([nN,mC],wS),oN=vf([vS,mC,hC],pS),aN=vf([oN,mC],CS),iN=vf([tN,aN,rN],lS),sN=vf([gC,Yj,qj,Zj,Jj,iN,oh,mC],NS),lN=vf([gC,oh,Hj,Vj,Lk,mC,sN],_S),cN=vf([lN,gC,zj],AS),uN=vf([gC,lN,cN,mC],IS),dN=e=>{var t=mC(e),n=hC(e);return US(e,t,n,!1)},fN=vf([gC,dN],Qk),pN=vf([gC,zj,uN,fN],TS),mN=vf([oh,Vj,gC,mC],tj),hN=vf([oh,Vj,gC,mC],rj),gN=vf([oh,gC,zj,pN,dN,mN,hN,mC],(e,t,n,r,o,a,i,s)=>{if(t){var{type:l}=t,c=om(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*Wc(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}))}}}),vN=vf([ij,sj,e=>e.tooltip.settings],(e,t,n)=>lj(n.shared,e,t)),bN=e=>e.tooltip.settings.trigger,yN=e=>e.tooltip.settings.defaultIndex,xN=vf([Pj,vN,bN,yN],Mj),wN=vf([xN,Hj],Ej),kN=vf([gN,wN],uj);vf([xN],e=>{if(e)return e.dataKey});var CN=vf([Pj,vN,bN,yN],Oj),SN=vf([fm,pm,oh,xm,gN,yN,CN,Dj],_j);vf([xN,SN],(e,t)=>null!=e&&e.coordinate?e.coordinate:t),vf([xN],e=>e.active);var jN=vf([CN,wN,Lw,vC,kN,Dj,vN],Ij);function NN(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 MN(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?NN(Object(n),!0).forEach(function(t){EN(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function EN(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}vf([jN],e=>{if(null!=e){var t=e.map(e=>e.payload).filter(e=>null!=e);return Array.from(new Set(t))}});var _N=()=>{var e=of(gC),t=of(gN),n=of(pN);return((e,t)=>{if(e&&e.scale&&e.scale.bandwidth)return e.scale.bandwidth();if(e&&t&&t.length>=2){for(var n=Wf(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})(MN(MN({},e),{},{scale:n}),t)},ON=(e,t)=>t,DN=(e,t,n)=>n,PN=(e,t,n,r)=>r;vf(gN,e=>Wf(e,e=>e.coordinate));var TN=vf([Pj,ON,DN,PN],Mj),AN=vf([TN,Hj],Ej),RN=vf([Pj,ON,DN,PN],Oj),IN=vf([fm,pm,oh,xm,gN,PN,RN,Dj],_j),zN=vf([TN,IN],(e,t)=>{var n;return null!==(n=e.coordinate)&&void 0!==n?n:t}),LN=vf(gN,AN,uj),FN=vf([RN,AN,Lw,vC,LN,Dj,ON],Ij),BN=vf([TN],e=>({isActive:e.active,activeIndex:e.index}));function $N(){return $N=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},$N.apply(null,arguments)}function WN(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 HN(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?WN(Object(n),!0).forEach(function(t){UN(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function UN(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 VN(e){var n,r,{coordinate:o,payload:a,index:i,offset:s,tooltipAxisBandSize:l,layout:c,cursor:u,tooltipEventType:d,chartName:f}=e,p=o,m=a,h=i;if(!u||!p||"ScatterChart"!==f&&"axis"!==d)return null;if("ScatterChart"===f)n=p,r=Zh;else if("BarChart"===f)n=function(e,t,n,r){var o=r/2;return{stroke:"none",fill:"#ccc",x:"horizontal"===e?t.x-o:n.left+.5,y:"horizontal"===e?n.top+.5:t.y-o,width:"horizontal"===e?r:n.width-1,height:"horizontal"===e?n.height-1:r}}(c,p,s,l),r=zg;else if("radial"===c){var{cx:g,cy:v,radius:b,startAngle:y,endAngle:x}=Lg(p);n={cx:g,cy:v,startAngle:y,endAngle:x,innerRadius:b,outerRadius:b},r=Hg}else n={points:Ug(c,p,s)},r=Vh;var w,k="object"==typeof u&&"className"in u?u.className:void 0,C=HN(HN(HN(HN({stroke:"#ccc",pointerEvents:"none"},s),n),null==(w=u)?null:t.isValidElement(w)&&"object"==typeof w.props&&null!==w.props?ul(w.props):"object"!=typeof w||Array.isArray(w)?null:ul(w)),{},{payload:m,payloadIndex:h,className:Ee("recharts-tooltip-cursor",k)});return t.isValidElement(u)?t.cloneElement(u,C):t.createElement(r,C)}function YN(e){var t,n=_N(),r=null!==(t=of(xm))&&void 0!==t?t:rh,o=of(oh),a=of(Fk);return i.createElement(VN,$N({},e,{coordinate:e.coordinate,index:e.index,payload:e.payload,offset:r,layout:o,tooltipAxisBandSize:n,chartName:a}))}var KN,qN=t.createContext(null),GN={exports:{}};var XN=(KN||(KN=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}(GN)),GN.exports),ZN=new(Eo(XN));function QN(e){return e.tooltip.syncInteraction}function JN(e,n,r,o,a,i){var s=of(t=>((e,t,n)=>{if(null!=t){var r=Pj(e);return"axis"===t?"hover"===n?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:"hover"===n?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}})(t,e,n)),l=of(Wk),c=of(Bk),u=of($k),d=of(QN),f=null==d?void 0:d.active,p=nh();t.useEffect(()=>{if(!f&&null!=c&&null!=l){var e=kj({active:i,coordinate:r,dataKey:s,index:a,label:"number"==typeof o?String(o):o,sourceViewBox:p});ZN.emit("recharts.syncEvent.tooltip",c,e,l)}},[f,r,s,a,o,l,c,u,i,p])}function eM(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 tM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eM(Object(n),!0).forEach(function(t){nM(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function nM(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 rM(e){return e.dataKey}var oM=[],aM={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,isAnimationActive:!Rh,itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};const iM={light:"",dark:".dark"},sM=i.createContext(null);function lM(){const e=i.useContext(sM);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}const cM=({id:t,config:n})=>{const r=Object.entries(n).filter(([,e])=>e.theme||e.color);return r.length?e.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(iM).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},uM=function(e){var r=eg(e,aM),{active:o,allowEscapeViewBox:a,animationDuration:s,animationEasing:l,content:c,filterNull:u,isAnimationActive:d,offset:f,payloadUniqBy:p,position:m,reverseDirection:h,useTranslate3d:g,wrapperStyle:v,cursor:b,shared:y,trigger:x,defaultIndex:w,portal:k,axisId:C}=r,S=ef(),j="number"==typeof w?String(w):w;t.useEffect(()=>{S(hj({shared:y,trigger:x,axisId:C,active:o,defaultIndex:j}))},[S,y,x,C,o,j]);var N=nh(),M=of(e=>e.rootProps.accessibilityLayer),E=cj(y),{activeIndex:_,isActive:O}=of(e=>BN(e,E,x,j)),D=of(e=>FN(e,E,x,j)),P=of(e=>LN(e,E,x,j)),T=of(e=>zN(e,E,x,j)),A=D,R=t.useContext(qN),I=null!=o?o:O,[z,L]=Vf([A,I]),F="axis"===E?P:void 0;JN(E,x,T,F,_,I);var B=null!=k?k:R;if(null==B)return null;var $=null!=A?A:oM;I||($=oM),u&&$.length&&($=Ud(A.filter(e=>null!=e.value&&(!0!==e.hide||r.includeHidden)),p,rM));var W=$.length>0,H=i.createElement(Ah,{allowEscapeViewBox:a,animationDuration:s,animationEasing:l,isAnimationActive:d,active:I,coordinate:T,hasPayload:W,offset:f,position:m,reverseDirection:h,useTranslate3d:g,viewBox:N,wrapperStyle:v,lastBoundingBox:z,innerRef:L,hasPortalFromProps:Boolean(k)},function(e,t){return i.isValidElement(e)?i.cloneElement(e,t):"function"==typeof e?i.createElement(e,t):i.createElement(Nh,t)}(c,tM(tM({},r),{},{payload:$,label:F,active:I,coordinate:T,accessibilityLayer:M})));return i.createElement(i.Fragment,null,n.createPortal(H,B),I&&i.createElement(YN,{cursor:b,tooltipEventType:E,coordinate:T,payload:A,index:_}))};const dM=xh;function fM(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 pM(e){const t=i.useRef({value:e,previous:e});return i.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function mM(e){const[t,n]=i.useState(void 0);return w(()=>{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 hM="Checkbox",[gM]=l(hM),[vM,bM]=gM(hM);function yM(t){const{__scopeCheckbox:n,checked:r,children:o,defaultChecked:a,disabled:s,form:l,name:c,onCheckedChange:u,required:d,value:f="on",internal_do_not_use_render:p}=t,[m,h]=C({prop:r,defaultProp:a??!1,onChange:u,caller:hM}),[g,v]=i.useState(null),[b,y]=i.useState(null),x=i.useRef(!1),w=!g||(!!l||!!g.closest("form")),k={checked:m,disabled:s,setChecked:h,control:g,setControl:v,name:c,form:l,value:f,hasConsumerStoppedPropagationRef:x,required:d,defaultChecked:!EM(a)&&a,isFormControl:w,bubbleInput:b,setBubbleInput:y};return e.jsx(vM,{scope:n,...k,children:MM(p)?p(k):o})}var xM="CheckboxTrigger",wM=i.forwardRef(({__scopeCheckbox:t,onKeyDown:n,onClick:r,...o},a)=>{const{control:s,value:l,disabled:c,checked:u,required:d,setControl:p,setChecked:m,hasConsumerStoppedPropagationRef:h,isFormControl:g,bubbleInput:v}=bM(xM,t),b=f(a,p),y=i.useRef(u);return i.useEffect(()=>{const e=s?.form;if(e){const t=()=>m(y.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[s,m]),e.jsx(S.button,{type:"button",role:"checkbox","aria-checked":EM(u)?"mixed":u,"aria-required":d,"data-state":_M(u),"data-disabled":c?"":void 0,disabled:c,value:l,...o,ref:b,onKeyDown:x(n,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:x(r,e=>{m(e=>!!EM(e)||!e),v&&g&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())})})});wM.displayName=xM;var kM=i.forwardRef((t,n)=>{const{__scopeCheckbox:r,name:o,checked:a,defaultChecked:i,required:s,disabled:l,value:c,onCheckedChange:u,form:d,...f}=t;return e.jsx(yM,{__scopeCheckbox:r,checked:a,defaultChecked:i,disabled:l,required:s,onCheckedChange:u,name:o,form:d,value:c,internal_do_not_use_render:({isFormControl:t})=>e.jsxs(e.Fragment,{children:[e.jsx(wM,{...f,ref:n,__scopeCheckbox:r}),t&&e.jsx(NM,{__scopeCheckbox:r})]})})});kM.displayName=hM;var CM="CheckboxIndicator",SM=i.forwardRef((t,n)=>{const{__scopeCheckbox:r,forceMount:o,...a}=t,i=bM(CM,r);return e.jsx(N,{present:o||EM(i.checked)||!0===i.checked,children:e.jsx(S.span,{"data-state":_M(i.checked),"data-disabled":i.disabled?"":void 0,...a,ref:n,style:{pointerEvents:"none",...t.style}})})});SM.displayName=CM;var jM="CheckboxBubbleInput",NM=i.forwardRef(({__scopeCheckbox:t,...n},r)=>{const{control:o,hasConsumerStoppedPropagationRef:a,checked:s,defaultChecked:l,required:c,disabled:u,name:d,value:p,form:m,bubbleInput:h,setBubbleInput:g}=bM(jM,t),v=f(r,g),b=pM(s),y=mM(o);i.useEffect(()=>{const e=h;if(!e)return;const t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set,r=!a.current;if(b!==s&&n){const t=new Event("click",{bubbles:r});e.indeterminate=EM(s),n.call(e,!EM(s)&&s),e.dispatchEvent(t)}},[h,b,s,a]);const x=i.useRef(!EM(s)&&s);return e.jsx(S.input,{type:"checkbox","aria-hidden":!0,defaultChecked:l??x.current,required:c,disabled:u,name:d,value:p,form:m,...n,tabIndex:-1,ref:v,style:{...n.style,...y,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});function MM(e){return"function"==typeof e}function EM(e){return"indeterminate"===e}function _M(e){return EM(e)?"indeterminate":e?"checked":"unchecked"}NM.displayName=jM;var OM=.999,DM=/[\\\/_+.#"@\[\(\{&]/,PM=/[\\\/_+.#"@\[\(\{&]/g,TM=/[\s-]/,AM=/[\s-]/g;function RM(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=RM(e,t,n,r,p+1,a+1,i))>m&&(p===o?l*=1:DM.test(e.charAt(p-1))?(l*=.8,(u=e.slice(o,p-1).match(PM))&&o>0&&(l*=Math.pow(OM,u.length))):TM.test(e.charAt(p-1))?(l*=.9,(d=e.slice(o,p-1).match(AM))&&o>0&&(l*=Math.pow(OM,d.length))):(l*=.17,o>0&&(l*=Math.pow(OM,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=RM(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 IM(e){return e.toLowerCase().replace(AM," ")}function zM(e,t,n){return RM(e=n&&n.length>0?""+(e+" "+n.join(" ")):e,t,IM(e),IM(t),0,0,{})}var LM='[cmdk-group=""]',FM='[cmdk-group-items=""]',BM='[cmdk-item=""]',$M=`${BM}:not([aria-disabled="true"])`,WM="cmdk-item-select",HM="data-value",UM=(e,t,n)=>zM(e,t,n),VM=i.createContext(void 0),YM=()=>i.useContext(VM),KM=i.createContext(void 0),qM=()=>i.useContext(KM),GM=i.createContext(void 0),XM=i.forwardRef((e,t)=>{let n=uE(()=>{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}}}),r=uE(()=>new Set),o=uE(()=>new Map),a=uE(()=>new Map),s=uE(()=>new Set),l=lE(e),{label:c,children:u,value:d,onValueChange:f,filter:p,shouldFilter:m,loop:h,disablePointerSelection:g=!1,vimBindings:v=!0,...b}=e,y=O(),x=O(),w=O(),k=i.useRef(null),C=pE();cE(()=>{if(void 0!==d){let e=d.trim();n.current.value=e,j.emit()}},[d]),cE(()=>{C(6,P)},[]);let j=i.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)D(),E(),C(1,_);else if("value"===e){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let e=document.getElementById(w);e?e.focus():null==(o=document.getElementById(y))||o.focus()}if(C(7,()=>{var e;n.current.selectedItemId=null==(e=T())?void 0:e.id,j.emit()}),r||C(5,P),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))}}j.emit()}},emit:()=>{s.current.forEach(e=>e())}}),[]),N=i.useMemo(()=>({value:(e,t,r)=>{var o;t!==(null==(o=a.current.get(e))?void 0:o.value)&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,M(t,r)),C(2,()=>{E(),j.emit()}))},item:(e,t)=>(r.current.add(e),t&&(o.current.has(t)?o.current.get(t).add(e):o.current.set(t,new Set([e]))),C(3,()=>{D(),E(),n.current.value||_(),j.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=T();C(4,()=>{D(),(null==t?void 0:t.getAttribute("id"))===e&&_(),j.emit()})}),group:e=>(o.current.has(e)||o.current.set(e,new Set),()=>{a.current.delete(e),o.current.delete(e)}),filter:()=>l.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:y,inputId:w,labelId:x,listInnerRef:k}),[]);function M(e,t){var r,o;let a=null!=(o=null==(r=l.current)?void 0:r.filter)?o:UM;return e?a(e,n.current.search,t):0}function E(){if(!n.current.search||!1===l.current.shouldFilter)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=o.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=k.current;A().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(FM);t?t.appendChild(e.parentElement===t?e:e.closest(`${FM} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${FM} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{var t;let n=null==(t=k.current)?void 0:t.querySelector(`${LM}[${HM}="${encodeURIComponent(e[0])}"]`);null==n||n.parentElement.appendChild(n)})}function _(){let e=A().find(e=>"true"!==e.getAttribute("aria-disabled")),t=null==e?void 0:e.getAttribute(HM);j.setState("value",t||void 0)}function D(){var e,t,i,s;if(!n.current.search||!1===l.current.shouldFilter)return void(n.current.filtered.count=r.current.size);n.current.filtered.groups=new Set;let c=0;for(let o of r.current){let r=M(null!=(t=null==(e=a.current.get(o))?void 0:e.value)?t:"",null!=(s=null==(i=a.current.get(o))?void 0:i.keywords)?s:[]);n.current.filtered.items.set(o,r),r>0&&c++}for(let[e,t]of o.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 P(){var e,t,n;let r=T();r&&((null==(e=r.parentElement)?void 0:e.firstChild)===r&&(null==(n=null==(t=r.closest(LM))?void 0:t.querySelector('[cmdk-group-heading=""]'))||n.scrollIntoView({block:"nearest"})),r.scrollIntoView({block:"nearest"}))}function T(){var e;return null==(e=k.current)?void 0:e.querySelector(`${BM}[aria-selected="true"]`)}function A(){var e;return Array.from((null==(e=k.current)?void 0:e.querySelectorAll($M))||[])}function R(e){let t=A()[e];t&&j.setState("value",t.getAttribute(HM))}function I(e){var t;let n=T(),r=A(),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&&j.setState("value",a.getAttribute(HM))}function z(e){let t,n=T(),r=null==n?void 0:n.closest(LM);for(;r&&!t;)r=e>0?iE(r,LM):sE(r,LM),t=null==r?void 0:r.querySelector($M);t?j.setState("value",t.getAttribute(HM)):I(e)}let L=()=>R(A().length-1),F=e=>{e.preventDefault(),e.metaKey?L():e.altKey?z(1):I(1)},B=e=>{e.preventDefault(),e.metaKey?R(0):e.altKey?z(-1):I(-1)};return i.createElement(S.div,{ref:t,tabIndex:-1,...b,"cmdk-root":"",onKeyDown:e=>{var t;null==(t=b.onKeyDown)||t.call(b,e);let n=e.nativeEvent.isComposing||229===e.keyCode;if(!e.defaultPrevented&&!n)switch(e.key){case"n":case"j":v&&e.ctrlKey&&F(e);break;case"ArrowDown":F(e);break;case"p":case"k":v&&e.ctrlKey&&B(e);break;case"ArrowUp":B(e);break;case"Home":e.preventDefault(),R(0);break;case"End":e.preventDefault(),L();break;case"Enter":{e.preventDefault();let t=T();if(t){let e=new Event(WM);t.dispatchEvent(e)}}}}},i.createElement("label",{"cmdk-label":"",htmlFor:N.inputId,id:N.labelId,style:hE},c),mE(e,e=>i.createElement(KM.Provider,{value:j},i.createElement(VM.Provider,{value:N},e))))}),ZM=i.forwardRef((e,t)=>{var n,r;let o=O(),a=i.useRef(null),s=i.useContext(GM),l=YM(),c=lE(e),u=null!=(r=null==(n=c.current)?void 0:n.forceMount)?r:null==s?void 0:s.forceMount;cE(()=>{if(!u)return l.item(o,null==s?void 0:s.id)},[u]);let f=fE(o,a,[e.value,e.children,a],e.keywords),p=qM(),m=dE(e=>e.value&&e.value===f.current),h=dE(e=>!(!u&&!1!==l.filter())||(!e.search||e.filtered.items.get(o)>0));function g(){var e,t;v(),null==(t=(e=c.current).onSelect)||t.call(e,f.current)}function v(){p.setState("value",f.current,!0)}if(i.useEffect(()=>{let t=a.current;if(t&&!e.disabled)return t.addEventListener(WM,g),()=>t.removeEventListener(WM,g)},[h,e.onSelect,e.disabled]),!h)return null;let{disabled:b,value:y,onSelect:x,forceMount:w,keywords:k,...C}=e;return i.createElement(S.div,{ref:d(a,t),...C,id:o,"cmdk-item":"",role:"option","aria-disabled":!!b,"aria-selected":!!m,"data-disabled":!!b,"data-selected":!!m,onPointerMove:b||l.getDisablePointerSelection()?void 0:v,onClick:b?void 0:g},e.children)}),QM=i.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,s=O(),l=i.useRef(null),c=i.useRef(null),u=O(),f=YM(),p=dE(e=>!(!o&&!1!==f.filter())||(!e.search||e.filtered.groups.has(s)));cE(()=>f.group(s),[]),fE(s,l,[e.value,e.heading,c]);let m=i.useMemo(()=>({id:s,forceMount:o}),[o]);return i.createElement(S.div,{ref:d(l,t),...a,"cmdk-group":"",role:"presentation",hidden:!p||void 0},n&&i.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),mE(e,e=>i.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},i.createElement(GM.Provider,{value:m},e))))}),JM=i.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=i.useRef(null),a=dE(e=>!e.search);return n||a?i.createElement(S.div,{ref:d(o,t),...r,"cmdk-separator":"",role:"separator"}):null}),eE=i.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=null!=e.value,a=qM(),s=dE(e=>e.search),l=dE(e=>e.selectedItemId),c=YM();return i.useEffect(()=>{null!=e.value&&a.setState("search",e.value)},[e.value]),i.createElement(S.input,{ref:t,...r,"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:o?e.value:s,onChange:e=>{o||a.setState("search",e.target.value),null==n||n(e.target.value)}})}),tE=i.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=i.useRef(null),s=i.useRef(null),l=dE(e=>e.selectedItemId),c=YM();return i.useEffect(()=>{if(s.current&&a.current){let e,t=s.current,n=a.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)}}},[]),i.createElement(S.div,{ref:d(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":r,id:c.listId},mE(e,e=>i.createElement("div",{ref:d(s,c.listInnerRef),"cmdk-list-sizer":""},e)))}),nE=i.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:s,...l}=e;return i.createElement(Lr,{open:n,onOpenChange:r},i.createElement(Br,{container:s},i.createElement($r,{"cmdk-overlay":"",className:o}),i.createElement(Wr,{"aria-label":e.label,"cmdk-dialog":"",className:a},i.createElement(XM,{ref:t,...l}))))}),rE=i.forwardRef((e,t)=>dE(e=>0===e.filtered.count)?i.createElement(S.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),oE=i.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return i.createElement(S.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},mE(e,e=>i.createElement("div",{"aria-hidden":!0},e)))}),aE=Object.assign(XM,{List:tE,Item:ZM,Input:eE,Group:QM,Separator:JM,Dialog:nE,Empty:rE,Loading:oE});function iE(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function sE(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function lE(e){let t=i.useRef(e);return cE(()=>{t.current=e}),t}var cE="undefined"==typeof window?i.useEffect:i.useLayoutEffect;function uE(e){let t=i.useRef();return void 0===t.current&&(t.current=e()),t}function dE(e){let t=qM(),n=()=>e(t.snapshot());return i.useSyncExternalStore(t.subscribe,n,n)}function fE(e,t,n,r=[]){let o=i.useRef(),a=YM();return cE(()=>{var i;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():o.current}})(),l=r.map(e=>e.trim());a.value(e,s,l),null==(i=t.current)||i.setAttribute(HM,s),o.current=s}),o}var pE=()=>{let[e,t]=i.useState(),n=uE(()=>new Map);return cE(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function mE({asChild:e,children:t},n){return e&&i.isValidElement(t)?i.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 hE={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function gE({...t}){return e.jsx(Lr,{"data-slot":"dialog",...t})}function vE({...t}){return e.jsx(Br,{"data-slot":"dialog-portal",...t})}function bE({className:t,...n}){return e.jsx($r,{"data-slot":"dialog-overlay",className:Rt("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 yE({className:t,children:n,showCloseButton:o=!0,...a}){return e.jsxs(vE,{"data-slot":"dialog-portal",children:[e.jsx(bE,{}),e.jsxs(Wr,{"data-slot":"dialog-content",className:Rt("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:[n,o&&e.jsxs(Vr,{"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.jsx(r.XIcon,{}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function xE({className:t,...n}){return e.jsx("div",{"data-slot":"dialog-header",className:Rt("flex flex-col gap-2 text-center sm:text-left",t),...n})}function wE({className:t,...n}){return e.jsx(Hr,{"data-slot":"dialog-title",className:Rt("text-lg font-semibold leading-none",t),...n})}function kE({className:t,...n}){return e.jsx(Ur,{"data-slot":"dialog-description",className:Rt("text-muted-foreground text-sm",t),...n})}function CE({className:t,...n}){return e.jsx(aE,{"data-slot":"command",className:Rt("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),...n})}const SE=["top","right","bottom","left"],jE=Math.min,NE=Math.max,ME=Math.round,EE=Math.floor,_E=e=>({x:e,y:e}),OE={left:"right",right:"left",bottom:"top",top:"bottom"},DE={start:"end",end:"start"};function PE(e,t,n){return NE(e,jE(t,n))}function TE(e,t){return"function"==typeof e?e(t):e}function AE(e){return e.split("-")[0]}function RE(e){return e.split("-")[1]}function IE(e){return"x"===e?"y":"x"}function zE(e){return"y"===e?"height":"width"}const LE=new Set(["top","bottom"]);function FE(e){return LE.has(AE(e))?"y":"x"}function BE(e){return IE(FE(e))}function $E(e){return e.replace(/start|end/g,e=>DE[e])}const WE=["left","right"],HE=["right","left"],UE=["top","bottom"],VE=["bottom","top"];function YE(e,t,n,r){const o=RE(e);let a=function(e,t,n){switch(e){case"top":case"bottom":return n?t?HE:WE:t?WE:HE;case"left":case"right":return t?UE:VE;default:return[]}}(AE(e),"start"===n,r);return o&&(a=a.map(e=>e+"-"+o),t&&(a=a.concat(a.map($E)))),a}function KE(e){return e.replace(/left|right|bottom|top/g,e=>OE[e])}function qE(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 GE(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 XE(e,t,n){let{reference:r,floating:o}=e;const a=FE(t),i=BE(t),s=zE(i),l=AE(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(RE(t)){case"start":p[i]-=f*(n&&c?-1:1);break;case"end":p[i]+=f*(n&&c?-1:1)}return p}async function ZE(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}=TE(t,e),m=qE(p),h=s[f?"floating"===d?"reference":"floating":d],g=GE(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,b=await(null==a.getOffsetParent?void 0:a.getOffsetParent(s.floating)),y=await(null==a.isElement?void 0:a.isElement(b))&&await(null==a.getScale?void 0:a.getScale(b))||{x:1,y:1},x=GE(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:b,strategy:l}):v);return{top:(g.top-x.top+m.top)/y.y,bottom:(x.bottom-g.bottom+m.bottom)/y.y,left:(g.left-x.left+m.left)/y.x,right:(x.right-g.right+m.right)/y.x}}function QE(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function JE(e){return SE.some(t=>e[t]>=0)}const e_=new Set(["left","top"]);function t_(){return"undefined"!=typeof window}function n_(e){return a_(e)?(e.nodeName||"").toLowerCase():"#document"}function r_(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function o_(e){var t;return null==(t=(a_(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function a_(e){return!!t_()&&(e instanceof Node||e instanceof r_(e).Node)}function i_(e){return!!t_()&&(e instanceof Element||e instanceof r_(e).Element)}function s_(e){return!!t_()&&(e instanceof HTMLElement||e instanceof r_(e).HTMLElement)}function l_(e){return!(!t_()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof r_(e).ShadowRoot)}const c_=new Set(["inline","contents"]);function u_(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=k_(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!c_.has(o)}const d_=new Set(["table","td","th"]);function f_(e){return d_.has(n_(e))}const p_=[":popover-open",":modal"];function m_(e){return p_.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const h_=["transform","translate","scale","rotate","perspective"],g_=["transform","translate","scale","rotate","perspective","filter"],v_=["paint","layout","strict","content"];function b_(e){const t=y_(),n=i_(e)?k_(e):e;return h_.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||g_.some(e=>(n.willChange||"").includes(e))||v_.some(e=>(n.contain||"").includes(e))}function y_(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const x_=new Set(["html","body","#document"]);function w_(e){return x_.has(n_(e))}function k_(e){return r_(e).getComputedStyle(e)}function C_(e){return i_(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function S_(e){if("html"===n_(e))return e;const t=e.assignedSlot||e.parentNode||l_(e)&&e.host||o_(e);return l_(t)?t.host:t}function j_(e){const t=S_(e);return w_(t)?e.ownerDocument?e.ownerDocument.body:e.body:s_(t)&&u_(t)?t:j_(t)}function N_(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=j_(e),a=o===(null==(r=e.ownerDocument)?void 0:r.body),i=r_(o);if(a){const e=M_(i);return t.concat(i,i.visualViewport||[],u_(o)?o:[],e&&n?N_(e):[])}return t.concat(o,N_(o,[],n))}function M_(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function E_(e){const t=k_(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=s_(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,s=ME(n)!==a||ME(r)!==i;return s&&(n=a,r=i),{width:n,height:r,$:s}}function __(e){return i_(e)?e:e.contextElement}function O_(e){const t=__(e);if(!s_(t))return _E(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=E_(t);let i=(a?ME(n.width):n.width)/r,s=(a?ME(n.height):n.height)/o;return i&&Number.isFinite(i)||(i=1),s&&Number.isFinite(s)||(s=1),{x:i,y:s}}const D_=_E(0);function P_(e){const t=r_(e);return y_()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:D_}function T_(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),a=__(e);let i=_E(1);t&&(r?i_(r)&&(i=O_(r)):i=O_(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==r_(e))&&t}(a,n,r)?P_(a):_E(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=r_(a),t=r&&i_(r)?r_(r):r;let n=e,o=M_(n);for(;o&&r&&t!==n;){const e=O_(o),t=o.getBoundingClientRect(),r=k_(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=r_(o),o=M_(n)}}return GE({width:u,height:d,x:l,y:c})}function A_(e,t){const n=C_(e).scrollLeft;return t?t.left+n:T_(o_(e)).left+n}function R_(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-A_(e,n),y:n.top+t.scrollTop}}const I_=new Set(["absolute","fixed"]);function z_(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=r_(e),r=o_(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=y_();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}const c=A_(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=o_(e),n=C_(e),r=e.ownerDocument.body,o=NE(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=NE(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+A_(e);const s=-n.scrollTop;return"rtl"===k_(r).direction&&(i+=NE(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:s}}(o_(e));else if(i_(t))r=function(e,t){const n=T_(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=s_(e)?O_(e):_E(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=P_(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return GE(r)}function L_(e,t){const n=S_(e);return!(n===t||!i_(n)||w_(n))&&("fixed"===k_(n).position||L_(n,t))}function F_(e,t,n){const r=s_(t),o=o_(t),a="fixed"===n,i=T_(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const l=_E(0);function c(){l.x=A_(o)}if(r||!r&&!a)if(("body"!==n_(t)||u_(o))&&(s=C_(t)),r){const e=T_(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?_E(0):R_(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 B_(e){return"static"===k_(e).position}function $_(e,t){if(!s_(e)||"fixed"===k_(e).position)return null;if(t)return t(e);let n=e.offsetParent;return o_(e)===n&&(n=n.ownerDocument.body),n}function W_(e,t){const n=r_(e);if(m_(e))return n;if(!s_(e)){let t=S_(e);for(;t&&!w_(t);){if(i_(t)&&!B_(t))return t;t=S_(t)}return n}let r=$_(e,t);for(;r&&f_(r)&&B_(r);)r=$_(r,t);return r&&w_(r)&&B_(r)&&!b_(r)?n:r||function(e){let t=S_(e);for(;s_(t)&&!w_(t);){if(b_(t))return t;if(m_(t))return null;t=S_(t)}return null}(e)||n}const H_={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a="fixed"===o,i=o_(r),s=!!t&&m_(t.floating);if(r===i||s&&a)return n;let l={scrollLeft:0,scrollTop:0},c=_E(1);const u=_E(0),d=s_(r);if((d||!d&&!a)&&(("body"!==n_(r)||u_(i))&&(l=C_(r)),s_(r))){const e=T_(r);c=O_(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const f=!i||d||a?_E(0):R_(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:o_,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a="clippingAncestors"===n?m_(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=N_(e,[],!1).filter(e=>i_(e)&&"body"!==n_(e)),o=null;const a="fixed"===k_(e).position;let i=a?S_(e):e;for(;i_(i)&&!w_(i);){const t=k_(i),n=b_(i);n||"fixed"!==t.position||(o=null),(a?!n&&!o:!n&&"static"===t.position&&o&&I_.has(o.position)||u_(i)&&!n&&L_(e,i))?r=r.filter(e=>e!==i):o=t,i=S_(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=z_(t,n,o);return e.top=NE(r.top,e.top),e.right=jE(r.right,e.right),e.bottom=jE(r.bottom,e.bottom),e.left=NE(r.left,e.left),e},z_(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:W_,getElementRects:async function(e){const t=this.getOffsetParent||W_,n=this.getDimensions,r=await n(e.floating);return{reference:F_(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}=E_(e);return{width:t,height:n}},getScale:O_,isElement:i_,isRTL:function(e){return"rtl"===k_(e).direction}};function U_(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function V_(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=__(e),u=o||a?[...c?N_(c):[],...N_(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=o_(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:-EE(d)+"px "+-EE(o.clientWidth-(u+f))+"px "+-EE(o.clientHeight-(d+p))+"px "+-EE(u)+"px",threshold:NE(0,jE(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||U_(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?T_(e):null;return l&&function t(){const r=T_(e);h&&!U_(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 Y_=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=AE(n),s=RE(n),l="y"===FE(n),c=e_.has(i)?-1:1,u=a&&l?-1:1,d=TE(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}}}}},K_=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}=TE(e,t),c={x:n,y:r},u=await ZE(t,l),d=FE(AE(o)),f=IE(d);let p=c[f],m=c[d];if(a){const e="y"===f?"bottom":"right";p=PE(p+u["y"===f?"top":"left"],p,p-u[e])}if(i){const e="y"===d?"bottom":"right";m=PE(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}}}}}},q_=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}=TE(e,t);if(null!=(n=a.arrow)&&n.alignmentOffset)return{};const v=AE(o),b=FE(s),y=AE(s)===s,x=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=f||(y||!h?[KE(s)]:function(e){const t=KE(e);return[$E(e),t,$E(t)]}(s)),k="none"!==m;!f&&k&&w.push(...YE(s,h,m,x));const C=[s,...w],S=await ZE(t,g),j=[];let N=(null==(r=a.flip)?void 0:r.overflows)||[];if(u&&j.push(S[v]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=RE(e),o=BE(e),a=zE(o);let i="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=KE(i)),[i,KE(i)]}(o,i,x);j.push(S[e[0]],S[e[1]])}if(N=[...N,{placement:o,overflows:j}],!j.every(e=>e<=0)){var M,E;const e=((null==(M=a.flip)?void 0:M.index)||0)+1,t=C[e];if(t){if(!("alignment"===d&&b!==FE(t))||N.every(e=>FE(e.placement)!==b||e.overflows[0]>0))return{data:{index:e,overflows:N},reset:{placement:t}}}let n=null==(E=N.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 _;const e=null==(_=N.filter(e=>{if(k){const t=FE(e.placement);return t===b||"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:_[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},G_=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}=TE(e,t),u=await ZE(t,c),d=AE(o),f=RE(o),p="y"===FE(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 b=h-u.top-u.bottom,y=m-u.left-u.right,x=jE(h-u[g],b),w=jE(m-u[v],y),k=!t.middlewareData.shift;let C=x,S=w;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(S=y),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(C=b),k&&!f){const e=NE(u.left,0),t=NE(u.right,0),n=NE(u.top,0),r=NE(u.bottom,0);p?S=m-2*(0!==e||0!==t?e+t:NE(u.left,u.right)):C=h-2*(0!==n||0!==r?n+r:NE(u.top,u.bottom))}await l({...t,availableWidth:S,availableHeight:C});const j=await i.getDimensions(s.floating);return m!==j.width||h!==j.height?{reset:{rects:!0}}:{}}}},X_=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=TE(e,t);switch(r){case"referenceHidden":{const e=QE(await ZE(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:JE(e)}}}case"escaped":{const e=QE(await ZE(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:JE(e)}}}default:return{}}}}},Z_=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}=TE(e,t)||{};if(null==c)return{};const d=qE(u),f={x:n,y:r},p=BE(o),m=zE(p),h=await i.getDimensions(c),g="y"===p,v=g?"top":"left",b=g?"bottom":"right",y=g?"clientHeight":"clientWidth",x=a.reference[m]+a.reference[p]-f[p]-a.floating[m],w=f[p]-a.reference[p],k=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c));let C=k?k[y]:0;C&&await(null==i.isElement?void 0:i.isElement(k))||(C=s.floating[y]||a.floating[m]);const S=x/2-w/2,j=C/2-h[m]/2-1,N=jE(d[v],j),M=jE(d[b],j),E=N,_=C-h[m]-M,O=C/2-h[m]/2+S,D=PE(E,O,_),P=!l.arrow&&null!=RE(o)&&O!==D&&a.reference[m]/2-(O<E?N:M)-h[m]/2<0,T=P?O<E?O-E:O-_:0;return{[p]:f[p]+T,data:{[p]:D,centerOffset:O-D-T,...P&&{alignmentOffset:T}},reset:P}}}),Q_=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}=TE(e,t),u={x:n,y:r},d=FE(o),f=IE(d);let p=u[f],m=u[d];const h=TE(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,b;const e="y"===f?"width":"height",t=e_.has(AE(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==(b=i.offset)?void 0:b[d])||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},J_=(e,t,n)=>{const r=new Map,o={platform:H_,...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}=XE(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:b,reset:y}=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],...b}},y&&m<=50&&(m++,"object"==typeof y&&(y.placement&&(f=y.placement),y.rects&&(c=!0===y.rects?await i.getElementRects({reference:e,floating:t,strategy:o}):y.rects),({x:u,y:d}=XE(c,f,l))),n=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}})(e,t,{...o,platform:a})};var eO="undefined"!=typeof document?t.useLayoutEffect:function(){};function tO(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(!tO(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)&&!tO(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function nO(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function rO(e,t){const n=nO(e);return Math.round(t*n)/n}function oO(e){const t=i.useRef(e);return eO(()=>{t.current=e}),t}const aO=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?Z_({element:n.current,padding:r}).fn(t):{}:n?Z_({element:n,padding:r}).fn(t):{};var o}}),iO=(e,t)=>({...Y_(e),options:[e,t]}),sO=(e,t)=>({...K_(e),options:[e,t]}),lO=(e,t)=>({...Q_(e),options:[e,t]}),cO=(e,t)=>({...q_(e),options:[e,t]}),uO=(e,t)=>({...G_(e),options:[e,t]}),dO=(e,t)=>({...X_(e),options:[e,t]}),fO=(e,t)=>({...aO(e),options:[e,t]});var pO=i.forwardRef((t,n)=>{const{children:r,width:o=10,height:a=5,...i}=t;return e.jsx(S.svg,{...i,ref:n,width:o,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:e.jsx("polygon",{points:"0,0 30,0 15,10"})})});pO.displayName="Arrow";var mO=pO,hO="Popper",[gO,vO]=l(hO),[bO,yO]=gO(hO),xO=t=>{const{__scopePopper:n,children:r}=t,[o,a]=i.useState(null);return e.jsx(bO,{scope:n,anchor:o,onAnchorChange:a,children:r})};xO.displayName=hO;var wO="PopperAnchor",kO=i.forwardRef((t,n)=>{const{__scopePopper:r,virtualRef:o,...a}=t,s=yO(wO,r),l=i.useRef(null),c=f(n,l),u=i.useRef(null);return i.useEffect(()=>{const e=u.current;u.current=o?.current||l.current,e!==u.current&&s.onAnchorChange(u.current)}),o?null:e.jsx(S.div,{...a,ref:c})});kO.displayName=wO;var CO="PopperContent",[SO,jO]=gO(CO),NO=i.forwardRef((t,n)=>{const{__scopePopper:r,side:o="bottom",sideOffset:a=0,align:l="center",alignOffset:c=0,arrowPadding:u=0,avoidCollisions:d=!0,collisionBoundary:p=[],collisionPadding:m=0,sticky:h="partial",hideWhenDetached:g=!1,updatePositionStrategy:v="optimized",onPlaced:b,...y}=t,x=yO(CO,r),[k,C]=i.useState(null),j=f(n,e=>C(e)),[N,M]=i.useState(null),E=mM(N),_=E?.width??0,O=E?.height??0,D=o+("center"!==l?"-"+l:""),P="number"==typeof m?m:{top:0,right:0,bottom:0,left:0,...m},T=Array.isArray(p)?p:[p],A=T.length>0,R={padding:P,boundary:T.filter(OO),altBoundary:A},{refs:I,floatingStyles:z,placement:L,isPositioned:F,middlewareData:B}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:l}={},transform:c=!0,whileElementsMounted:u,open:d}=e,[f,p]=i.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=i.useState(r);tO(m,r)||h(r);const[g,v]=i.useState(null),[b,y]=i.useState(null),x=i.useCallback(e=>{e!==S.current&&(S.current=e,v(e))},[]),w=i.useCallback(e=>{e!==j.current&&(j.current=e,y(e))},[]),k=a||g,C=l||b,S=i.useRef(null),j=i.useRef(null),N=i.useRef(f),M=null!=u,E=oO(u),_=oO(o),O=oO(d),D=i.useCallback(()=>{if(!S.current||!j.current)return;const e={placement:t,strategy:n,middleware:m};_.current&&(e.platform=_.current),J_(S.current,j.current,e).then(e=>{const t={...e,isPositioned:!1!==O.current};P.current&&!tO(N.current,t)&&(N.current=t,s.flushSync(()=>{p(t)}))})},[m,t,n,_,O]);eO(()=>{!1===d&&N.current.isPositioned&&(N.current.isPositioned=!1,p(e=>({...e,isPositioned:!1})))},[d]);const P=i.useRef(!1);eO(()=>(P.current=!0,()=>{P.current=!1}),[]),eO(()=>{if(k&&(S.current=k),C&&(j.current=C),k&&C){if(E.current)return E.current(k,C,D);D()}},[k,C,D,E,M]);const T=i.useMemo(()=>({reference:S,floating:j,setReference:x,setFloating:w}),[x,w]),A=i.useMemo(()=>({reference:k,floating:C}),[k,C]),R=i.useMemo(()=>{const e={position:n,left:0,top:0};if(!A.floating)return e;const t=rO(A.floating,f.x),r=rO(A.floating,f.y);return c?{...e,transform:"translate("+t+"px, "+r+"px)",...nO(A.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,c,A.floating,f.x,f.y]);return i.useMemo(()=>({...f,update:D,refs:T,elements:A,floatingStyles:R}),[f,D,T,A,R])}({strategy:"fixed",placement:D,whileElementsMounted:(...e)=>V_(...e,{animationFrame:"always"===v}),elements:{reference:x.anchor},middleware:[iO({mainAxis:a+O,alignmentAxis:c}),d&&sO({mainAxis:!0,crossAxis:!1,limiter:"partial"===h?lO():void 0,...R}),d&&cO({...R}),uO({...R,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&&fO({element:N,padding:u}),DO({arrowWidth:_,arrowHeight:O}),g&&dO({strategy:"referenceHidden",...R})]}),[$,W]=PO(L),H=Bt(b);w(()=>{F&&H?.()},[F,H]);const U=B.arrow?.x,V=B.arrow?.y,Y=0!==B.arrow?.centerOffset,[K,q]=i.useState();return w(()=>{k&&q(window.getComputedStyle(k).zIndex)},[k]),e.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...z,transform:F?z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:K,"--radix-popper-transform-origin":[B.transformOrigin?.x,B.transformOrigin?.y].join(" "),...B.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:e.jsx(SO,{scope:r,placedSide:$,onArrowChange:M,arrowX:U,arrowY:V,shouldHideArrow:Y,children:e.jsx(S.div,{"data-side":$,"data-align":W,...y,ref:j,style:{...y.style,animation:F?void 0:"none"}})})})});NO.displayName=CO;var MO="PopperArrow",EO={top:"bottom",right:"left",bottom:"top",left:"right"},_O=i.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=jO(MO,r),i=EO[a.placedSide];return e.jsx("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.jsx(mO,{...o,ref:n,style:{...o.style,display:"block"}})})});function OO(e){return null!==e}_O.displayName=MO;var DO=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]=PO(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 PO(e){const[t,n="center"]=e.split("-");return[t,n]}var TO=xO,AO=kO,RO=NO,IO=_O,zO="rovingFocusGroup.onEntryFocus",LO={bubbles:!1,cancelable:!0},FO="RovingFocusGroup",[BO,$O,WO]=y(FO),[HO,UO]=l(FO,[WO]),[VO,YO]=HO(FO),KO=i.forwardRef((t,n)=>e.jsx(BO.Provider,{scope:t.__scopeRovingFocusGroup,children:e.jsx(BO.Slot,{scope:t.__scopeRovingFocusGroup,children:e.jsx(qO,{...t,ref:n})})}));KO.displayName=FO;var qO=i.forwardRef((t,n)=>{const{__scopeRovingFocusGroup:r,orientation:o,loop:a=!1,dir:s,currentTabStopId:l,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:p=!1,...m}=t,h=i.useRef(null),g=f(n,h),v=K(s),[b,y]=C({prop:l,defaultProp:c??null,onChange:u,caller:FO}),[w,k]=i.useState(!1),j=Bt(d),N=$O(r),M=i.useRef(!1),[E,_]=i.useState(0);return i.useEffect(()=>{const e=h.current;if(e)return e.addEventListener(zO,j),()=>e.removeEventListener(zO,j)},[j]),e.jsx(VO,{scope:r,orientation:o,dir:v,loop:a,currentTabStopId:b,onItemFocus:i.useCallback(e=>y(e),[y]),onItemShiftTab:i.useCallback(()=>k(!0),[]),onFocusableItemAdd:i.useCallback(()=>_(e=>e+1),[]),onFocusableItemRemove:i.useCallback(()=>_(e=>e-1),[]),children:e.jsx(S.div,{tabIndex:w||0===E?-1:0,"data-orientation":o,...m,ref:g,style:{outline:"none",...t.style},onMouseDown:x(t.onMouseDown,()=>{M.current=!0}),onFocus:x(t.onFocus,e=>{const t=!M.current;if(e.target===e.currentTarget&&t&&!w){const t=new CustomEvent(zO,LO);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=N().filter(e=>e.focusable);QO([e.find(e=>e.active),e.find(e=>e.id===b),...e].filter(Boolean).map(e=>e.ref.current),p)}}M.current=!1}),onBlur:x(t.onBlur,()=>k(!1))})})}),GO="RovingFocusGroupItem",XO=i.forwardRef((t,n)=>{const{__scopeRovingFocusGroup:r,focusable:o=!0,active:a=!1,tabStopId:s,children:l,...c}=t,u=O(),d=s||u,f=YO(GO,r),p=f.currentTabStopId===d,m=$O(r),{onFocusableItemAdd:h,onFocusableItemRemove:g,currentTabStopId:v}=f;return i.useEffect(()=>{if(o)return h(),()=>g()},[o,h,g]),e.jsx(BO.ItemSlot,{scope:r,id:d,focusable:o,active:a,children:e.jsx(S.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...c,ref:n,onMouseDown:x(t.onMouseDown,e=>{o?f.onItemFocus(d):e.preventDefault()}),onFocus:x(t.onFocus,()=>f.onItemFocus(d)),onKeyDown:x(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:ZO[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(()=>QO(n))}}),children:"function"==typeof l?l({isCurrentTabStop:p,hasTabStop:null!=v}):l})})});XO.displayName=GO;var ZO={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function QO(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 JO=KO,eD=XO,tD=["Enter"," "],nD=["ArrowUp","PageDown","End"],rD=["ArrowDown","PageUp","Home",...nD],oD={ltr:[...tD,"ArrowRight"],rtl:[...tD,"ArrowLeft"]},aD={ltr:["ArrowLeft"],rtl:["ArrowRight"]},iD="Menu",[sD,lD,cD]=y(iD),[uD,dD]=l(iD,[cD,vO,UO]),fD=vO(),pD=UO(),[mD,hD]=uD(iD),[gD,vD]=uD(iD),bD=t=>{const{__scopeMenu:n,open:r=!1,children:o,dir:a,onOpenChange:s,modal:l=!0}=t,c=fD(n),[u,d]=i.useState(null),f=i.useRef(!1),p=Bt(s),m=K(a);return i.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.jsx(TO,{...c,children:e.jsx(mD,{scope:n,open:r,onOpenChange:p,content:u,onContentChange:d,children:e.jsx(gD,{scope:n,onClose:i.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:m,modal:l,children:o})})})};bD.displayName=iD;var yD=i.forwardRef((t,n)=>{const{__scopeMenu:r,...o}=t,a=fD(r);return e.jsx(AO,{...a,...o,ref:n})});yD.displayName="MenuAnchor";var xD="MenuPortal",[wD,kD]=uD(xD,{forceMount:void 0}),CD=t=>{const{__scopeMenu:n,forceMount:r,children:o,container:a}=t,i=hD(xD,n);return e.jsx(wD,{scope:n,forceMount:r,children:e.jsx(N,{present:r||i.open,children:e.jsx(sn,{asChild:!0,container:a,children:o})})})};CD.displayName=xD;var SD="MenuContent",[jD,ND]=uD(SD),MD=i.forwardRef((t,n)=>{const r=kD(SD,t.__scopeMenu),{forceMount:o=r.forceMount,...a}=t,i=hD(SD,t.__scopeMenu),s=vD(SD,t.__scopeMenu);return e.jsx(sD.Provider,{scope:t.__scopeMenu,children:e.jsx(N,{present:o||i.open,children:e.jsx(sD.Slot,{scope:t.__scopeMenu,children:s.modal?e.jsx(ED,{...a,ref:n}):e.jsx(_D,{...a,ref:n})})})})}),ED=i.forwardRef((t,n)=>{const r=hD(SD,t.__scopeMenu),o=i.useRef(null),a=f(n,o);return i.useEffect(()=>{const e=o.current;if(e)return or(e)},[]),e.jsx(DD,{...t,ref:a,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:x(t.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),_D=i.forwardRef((t,n)=>{const r=hD(SD,t.__scopeMenu);return e.jsx(DD,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),OD=p("MenuContent.ScrollLock"),DD=i.forwardRef((t,n)=>{const{__scopeMenu:r,loop:o=!1,trapFocus:a,onOpenAutoFocus:s,onCloseAutoFocus:l,disableOutsidePointerEvents:c,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:p,onFocusOutside:m,onInteractOutside:h,onDismiss:g,disableOutsideScroll:v,...b}=t,y=hD(SD,r),w=vD(SD,r),k=fD(r),C=pD(r),S=lD(r),[j,N]=i.useState(null),M=i.useRef(null),E=f(n,M,y.onContentChange),_=i.useRef(0),O=i.useRef(""),D=i.useRef(0),P=i.useRef(null),T=i.useRef("right"),A=i.useRef(0),R=v?Zn:i.Fragment,I=v?{as:OD,allowPinchZoom:!0}:void 0,z=e=>{const t=O.current+e,n=S().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){O.current=t,window.clearTimeout(_.current),""!==t&&(_.current=window.setTimeout(()=>e(""),1e3))}(t),i&&setTimeout(()=>i.focus())};i.useEffect(()=>()=>window.clearTimeout(_.current),[]),cn();const L=i.useCallback(e=>T.current===P.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,P.current?.area),[]);return e.jsx(jD,{scope:r,searchRef:O,onItemEnter:i.useCallback(e=>{L(e)&&e.preventDefault()},[L]),onItemLeave:i.useCallback(e=>{L(e)||(M.current?.focus(),N(null))},[L]),onTriggerLeave:i.useCallback(e=>{L(e)&&e.preventDefault()},[L]),pointerGraceTimerRef:D,onPointerGraceIntentChange:i.useCallback(e=>{P.current=e},[]),children:e.jsx(R,{...I,children:e.jsx(Jt,{asChild:!0,trapped:a,onMountAutoFocus:x(s,e=>{e.preventDefault(),M.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:e.jsx(Yt,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:d,onPointerDownOutside:p,onFocusOutside:m,onInteractOutside:h,onDismiss:g,children:e.jsx(JO,{asChild:!0,...C,dir:w.dir,orientation:"vertical",loop:o,currentTabStopId:j,onCurrentTabStopIdChange:N,onEntryFocus:x(u,e=>{w.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:e.jsx(RO,{role:"menu","aria-orientation":"vertical","data-state":aP(y.open),"data-radix-menu-content":"",dir:w.dir,...k,...b,ref:E,style:{outline:"none",...b.style},onKeyDown:x(b.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&&z(e.key));const o=M.current;if(e.target!==o)return;if(!rD.includes(e.key))return;e.preventDefault();const a=S().filter(e=>!e.disabled).map(e=>e.ref.current);nD.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:x(t.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(_.current),O.current="")}),onPointerMove:x(t.onPointerMove,lP(e=>{const t=e.target,n=A.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>A.current?"right":"left";T.current=t,A.current=e.clientX}}))})})})})})})});MD.displayName=SD;var PD=i.forwardRef((t,n)=>{const{__scopeMenu:r,...o}=t;return e.jsx(S.div,{role:"group",...o,ref:n})});PD.displayName="MenuGroup";var TD=i.forwardRef((t,n)=>{const{__scopeMenu:r,...o}=t;return e.jsx(S.div,{...o,ref:n})});TD.displayName="MenuLabel";var AD="MenuItem",RD="menu.itemSelect",ID=i.forwardRef((t,n)=>{const{disabled:r=!1,onSelect:o,...a}=t,s=i.useRef(null),l=vD(AD,t.__scopeMenu),c=ND(AD,t.__scopeMenu),u=f(n,s),d=i.useRef(!1);return e.jsx(zD,{...a,ref:u,disabled:r,onClick:x(t.onClick,()=>{const e=s.current;if(!r&&e){const t=new CustomEvent(RD,{bubbles:!0,cancelable:!0});e.addEventListener(RD,e=>o?.(e),{once:!0}),j(e,t),t.defaultPrevented?d.current=!1:l.onClose()}}),onPointerDown:e=>{t.onPointerDown?.(e),d.current=!0},onPointerUp:x(t.onPointerUp,e=>{d.current||e.currentTarget?.click()}),onKeyDown:x(t.onKeyDown,e=>{const t=""!==c.searchRef.current;r||t&&" "===e.key||tD.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});ID.displayName=AD;var zD=i.forwardRef((t,n)=>{const{__scopeMenu:r,disabled:o=!1,textValue:a,...s}=t,l=ND(AD,r),c=pD(r),u=i.useRef(null),d=f(n,u),[p,m]=i.useState(!1),[h,g]=i.useState("");return i.useEffect(()=>{const e=u.current;e&&g((e.textContent??"").trim())},[s.children]),e.jsx(sD.ItemSlot,{scope:r,disabled:o,textValue:a??h,children:e.jsx(eD,{asChild:!0,...c,focusable:!o,children:e.jsx(S.div,{role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...s,ref:d,onPointerMove:x(t.onPointerMove,lP(e=>{if(o)l.onItemLeave(e);else if(l.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus({preventScroll:!0})}})),onPointerLeave:x(t.onPointerLeave,lP(e=>l.onItemLeave(e))),onFocus:x(t.onFocus,()=>m(!0)),onBlur:x(t.onBlur,()=>m(!1))})})})}),LD=i.forwardRef((t,n)=>{const{checked:r=!1,onCheckedChange:o,...a}=t;return e.jsx(YD,{scope:t.__scopeMenu,checked:r,children:e.jsx(ID,{role:"menuitemcheckbox","aria-checked":iP(r)?"mixed":r,...a,ref:n,"data-state":sP(r),onSelect:x(a.onSelect,()=>o?.(!!iP(r)||!r),{checkForDefaultPrevented:!1})})})});LD.displayName="MenuCheckboxItem";var FD="MenuRadioGroup",[BD,$D]=uD(FD,{value:void 0,onValueChange:()=>{}}),WD=i.forwardRef((t,n)=>{const{value:r,onValueChange:o,...a}=t,i=Bt(o);return e.jsx(BD,{scope:t.__scopeMenu,value:r,onValueChange:i,children:e.jsx(PD,{...a,ref:n})})});WD.displayName=FD;var HD="MenuRadioItem",UD=i.forwardRef((t,n)=>{const{value:r,...o}=t,a=$D(HD,t.__scopeMenu),i=r===a.value;return e.jsx(YD,{scope:t.__scopeMenu,checked:i,children:e.jsx(ID,{role:"menuitemradio","aria-checked":i,...o,ref:n,"data-state":sP(i),onSelect:x(o.onSelect,()=>a.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});UD.displayName=HD;var VD="MenuItemIndicator",[YD,KD]=uD(VD,{checked:!1}),qD=i.forwardRef((t,n)=>{const{__scopeMenu:r,forceMount:o,...a}=t,i=KD(VD,r);return e.jsx(N,{present:o||iP(i.checked)||!0===i.checked,children:e.jsx(S.span,{...a,ref:n,"data-state":sP(i.checked)})})});qD.displayName=VD;var GD=i.forwardRef((t,n)=>{const{__scopeMenu:r,...o}=t;return e.jsx(S.div,{role:"separator","aria-orientation":"horizontal",...o,ref:n})});GD.displayName="MenuSeparator";var XD=i.forwardRef((t,n)=>{const{__scopeMenu:r,...o}=t,a=fD(r);return e.jsx(IO,{...a,...o,ref:n})});XD.displayName="MenuArrow";var ZD="MenuSub",[QD,JD]=uD(ZD),eP=t=>{const{__scopeMenu:n,children:r,open:o=!1,onOpenChange:a}=t,s=hD(ZD,n),l=fD(n),[c,u]=i.useState(null),[d,f]=i.useState(null),p=Bt(a);return i.useEffect(()=>(!1===s.open&&p(!1),()=>p(!1)),[s.open,p]),e.jsx(TO,{...l,children:e.jsx(mD,{scope:n,open:o,onOpenChange:p,content:d,onContentChange:f,children:e.jsx(QD,{scope:n,contentId:O(),triggerId:O(),trigger:c,onTriggerChange:u,children:r})})})};eP.displayName=ZD;var tP="MenuSubTrigger",nP=i.forwardRef((t,n)=>{const r=hD(tP,t.__scopeMenu),o=vD(tP,t.__scopeMenu),a=JD(tP,t.__scopeMenu),s=ND(tP,t.__scopeMenu),l=i.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:u}=s,f={__scopeMenu:t.__scopeMenu},p=i.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return i.useEffect(()=>p,[p]),i.useEffect(()=>{const e=c.current;return()=>{window.clearTimeout(e),u(null)}},[c,u]),e.jsx(yD,{asChild:!0,...f,children:e.jsx(zD,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":a.contentId,"data-state":aP(r.open),...t,ref:d(n,a.onTriggerChange),onClick:e=>{t.onClick?.(e),t.disabled||e.defaultPrevented||(e.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:x(t.onPointerMove,lP(e=>{s.onItemEnter(e),e.defaultPrevented||t.disabled||r.open||l.current||(s.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{r.onOpenChange(!0),p()},100))})),onPointerLeave:x(t.onPointerLeave,lP(e=>{p();const t=r.content?.getBoundingClientRect();if(t){const n=r.content?.dataset.side,o="right"===n,a=o?-5:5,i=t[o?"left":"right"],l=t[o?"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:x(t.onKeyDown,e=>{const n=""!==s.searchRef.current;t.disabled||n&&" "===e.key||oD[o.dir].includes(e.key)&&(r.onOpenChange(!0),r.content?.focus(),e.preventDefault())})})})});nP.displayName=tP;var rP="MenuSubContent",oP=i.forwardRef((t,n)=>{const r=kD(SD,t.__scopeMenu),{forceMount:o=r.forceMount,...a}=t,s=hD(SD,t.__scopeMenu),l=vD(SD,t.__scopeMenu),c=JD(rP,t.__scopeMenu),u=i.useRef(null),d=f(n,u);return e.jsx(sD.Provider,{scope:t.__scopeMenu,children:e.jsx(N,{present:o||s.open,children:e.jsx(sD.Slot,{scope:t.__scopeMenu,children:e.jsx(DD,{id:c.contentId,"aria-labelledby":c.triggerId,...a,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:x(t.onFocusOutside,e=>{e.target!==c.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:x(t.onEscapeKeyDown,e=>{l.onClose(),e.preventDefault()}),onKeyDown:x(t.onKeyDown,e=>{const t=e.currentTarget.contains(e.target),n=aD[l.dir].includes(e.key);t&&n&&(s.onOpenChange(!1),c.trigger?.focus(),e.preventDefault())})})})})})});function aP(e){return e?"open":"closed"}function iP(e){return"indeterminate"===e}function sP(e){return iP(e)?"indeterminate":e?"checked":"unchecked"}function lP(e){return t=>"mouse"===t.pointerType?e(t):void 0}oP.displayName=rP;var cP=bD,uP=yD,dP=CD,fP=MD,pP=PD,mP=TD,hP=ID,gP=LD,vP=WD,bP=UD,yP=qD,xP=GD,wP=XD,kP=eP,CP=nP,SP=oP,jP="ContextMenu",[NP]=l(jP,[dD]),MP=dD(),[EP,_P]=NP(jP),OP=t=>{const{__scopeContextMenu:n,children:r,onOpenChange:o,dir:a,modal:s=!0}=t,[l,c]=i.useState(!1),u=MP(n),d=Bt(o),f=i.useCallback(e=>{c(e),d(e)},[d]);return e.jsx(EP,{scope:n,open:l,onOpenChange:f,modal:s,children:e.jsx(cP,{...u,dir:a,open:l,onOpenChange:f,modal:s,children:r})})};OP.displayName=jP;var DP="ContextMenuTrigger",PP=i.forwardRef((t,n)=>{const{__scopeContextMenu:r,disabled:o=!1,...a}=t,s=_P(DP,r),l=MP(r),c=i.useRef({x:0,y:0}),u=i.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...c.current})}),d=i.useRef(0),f=i.useCallback(()=>window.clearTimeout(d.current),[]),p=e=>{c.current={x:e.clientX,y:e.clientY},s.onOpenChange(!0)};return i.useEffect(()=>f,[f]),i.useEffect(()=>{o&&f()},[o,f]),e.jsxs(e.Fragment,{children:[e.jsx(uP,{...l,virtualRef:u}),e.jsx(S.span,{"data-state":s.open?"open":"closed","data-disabled":o?"":void 0,...a,ref:n,style:{WebkitTouchCallout:"none",...t.style},onContextMenu:o?t.onContextMenu:x(t.onContextMenu,e=>{f(),p(e),e.preventDefault()}),onPointerDown:o?t.onPointerDown:x(t.onPointerDown,GP(e=>{f(),d.current=window.setTimeout(()=>p(e),700)})),onPointerMove:o?t.onPointerMove:x(t.onPointerMove,GP(f)),onPointerCancel:o?t.onPointerCancel:x(t.onPointerCancel,GP(f)),onPointerUp:o?t.onPointerUp:x(t.onPointerUp,GP(f))})]})});PP.displayName=DP;var TP=t=>{const{__scopeContextMenu:n,...r}=t,o=MP(n);return e.jsx(dP,{...o,...r})};TP.displayName="ContextMenuPortal";var AP="ContextMenuContent",RP=i.forwardRef((t,n)=>{const{__scopeContextMenu:r,...o}=t,a=_P(AP,r),s=MP(r),l=i.useRef(!1);return e.jsx(fP,{...s,...o,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||a.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)"}})});RP.displayName=AP;var IP=i.forwardRef((t,n)=>{const{__scopeContextMenu:r,...o}=t,a=MP(r);return e.jsx(pP,{...a,...o,ref:n})});IP.displayName="ContextMenuGroup";var zP=i.forwardRef((t,n)=>{const{__scopeContextMenu:r,...o}=t,a=MP(r);return e.jsx(mP,{...a,...o,ref:n})});zP.displayName="ContextMenuLabel";var LP=i.forwardRef((t,n)=>{const{__scopeContextMenu:r,...o}=t,a=MP(r);return e.jsx(hP,{...a,...o,ref:n})});LP.displayName="ContextMenuItem";var FP=i.forwardRef((t,n)=>{const{__scopeContextMenu:r,...o}=t,a=MP(r);return e.jsx(gP,{...a,...o,ref:n})});FP.displayName="ContextMenuCheckboxItem";var BP=i.forwardRef((t,n)=>{const{__scopeContextMenu:r,...o}=t,a=MP(r);return e.jsx(vP,{...a,...o,ref:n})});BP.displayName="ContextMenuRadioGroup";var $P=i.forwardRef((t,n)=>{const{__scopeContextMenu:r,...o}=t,a=MP(r);return e.jsx(bP,{...a,...o,ref:n})});$P.displayName="ContextMenuRadioItem";var WP=i.forwardRef((t,n)=>{const{__scopeContextMenu:r,...o}=t,a=MP(r);return e.jsx(yP,{...a,...o,ref:n})});WP.displayName="ContextMenuItemIndicator";var HP=i.forwardRef((t,n)=>{const{__scopeContextMenu:r,...o}=t,a=MP(r);return e.jsx(xP,{...a,...o,ref:n})});HP.displayName="ContextMenuSeparator";var UP=i.forwardRef((t,n)=>{const{__scopeContextMenu:r,...o}=t,a=MP(r);return e.jsx(wP,{...a,...o,ref:n})});UP.displayName="ContextMenuArrow";var VP="ContextMenuSub",YP=t=>{const{__scopeContextMenu:n,children:r,onOpenChange:o,open:a,defaultOpen:i}=t,s=MP(n),[l,c]=C({prop:a,defaultProp:i??!1,onChange:o,caller:VP});return e.jsx(kP,{...s,open:l,onOpenChange:c,children:r})};YP.displayName=VP;var KP=i.forwardRef((t,n)=>{const{__scopeContextMenu:r,...o}=t,a=MP(r);return e.jsx(CP,{...a,...o,ref:n})});KP.displayName="ContextMenuSubTrigger";var qP=i.forwardRef((t,n)=>{const{__scopeContextMenu:r,...o}=t,a=MP(r);return e.jsx(SP,{...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 GP(e){return t=>"mouse"!==t.pointerType?e(t):void 0}qP.displayName="ContextMenuSubContent";var XP=OP,ZP=PP,QP=TP,JP=RP,eT=IP,tT=zP,nT=LP,rT=FP,oT=BP,aT=$P,iT=WP,sT=HP,lT=YP,cT=KP,uT=qP;const dT=t.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}),fT=()=>{const e=t.useContext(dT);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};function pT(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function mT(){return gT(/^iPad/)||gT(/^Mac/)&&navigator.maxTouchPoints>1}function hT(){return gT(/^iPhone/)||mT()}function gT(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 vT="undefined"!=typeof window?t.useLayoutEffect:t.useEffect;function bT(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}const yT="undefined"!=typeof document&&window.visualViewport;function xT(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function wT(e){for(xT(e)&&(e=e.parentElement);e&&!xT(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const kT=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let CT,ST=0;function jT(e={}){let{isDisabled:t}=e;vT(()=>{if(!t)return ST++,1===ST&&hT()&&(CT=function(){let e,t=0,n=n=>{e=wT(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;ET(t)&&t!==document.activeElement&&(e.preventDefault(),t.style.transform="translateY(-2000px)",t.focus(),requestAnimationFrame(()=>{t.style.transform=""}))},a=e=>{let t=e.target;ET(t)&&(t.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{t.style.transform="",yT&&(yT.height<window.innerHeight?requestAnimationFrame(()=>{MT(t)}):yT.addEventListener("resize",()=>MT(t),{once:!0}))}))},i=()=>{window.scrollTo(0,0)},s=window.pageXOffset,l=window.pageYOffset,c=bT(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=bT(NT(document,"touchstart",n,{passive:!1,capture:!0}),NT(document,"touchmove",r,{passive:!1,capture:!0}),NT(document,"touchend",o,{passive:!1,capture:!0}),NT(document,"focus",a,!0),NT(window,"scroll",i));return()=>{c(),u(),window.scrollTo(s,l)}}()),()=>{ST--,0===ST&&(null==CT||CT())}},[t])}function NT(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function MT(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let t=wT(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 ET(e){return e instanceof HTMLInputElement&&!kT.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function _T(...e){return i.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 OT=new WeakMap;function DT(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||OT.set(e,r)}const PT=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function TT(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(", ")[PT(t)?13:12]):(o=r.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[PT(t)?5:4]):null)}function AT(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}const RT={DURATION:.5,EASE:[.32,.72,0,1]},IT=16,zT="vaul-dragging";function LT(e){const n=t.useRef(e);return t.useEffect(()=>{n.current=e}),t.useMemo(()=>(...e)=>null==n.current?void 0:n.current.call(n,...e),[])}function FT({prop:e,defaultProp:n,onChange:r=()=>{}}){const[o,a]=function({defaultProp:e,onChange:n}){const r=t.useState(e),[o]=r,a=t.useRef(o),i=LT(n);return t.useEffect(()=>{a.current!==o&&(i(o),a.current=o)},[o,a,i]),r}({defaultProp:n,onChange:r}),i=void 0!==e,s=i?e:o,l=LT(r),c=t.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 BT=null;const $T=t.forwardRef(function({...e},n){const{overlayRef:r,snapPoints:o,onRelease:a,shouldFade:i,isOpen:s,modal:l,shouldAnimate:c}=fT(),u=_T(n,r),d=o&&o.length>0;if(!l)return null;const f=t.useCallback(e=>a(e),[a]);return t.createElement($r,{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})});$T.displayName="Drawer.Overlay";const WT=t.forwardRef(function({onPointerDownOutside:e,style:n,onOpenAutoFocus:r,...o},a){const{drawerRef:i,onPress:s,onRelease:l,onDrag:c,keyboardIsOpen:u,snapPointsOffset:d,activeSnapPointIndex:f,modal:p,isOpen:m,direction:h,snapPoints:g,container:v,handleOnly:b,shouldAnimate:y,autoFocus:x}=fT(),[w,k]=t.useState(!1),C=_T(a,i),S=t.useRef(null),j=t.useRef(null),N=t.useRef(!1),M=g&&g.length>0;!function(){const{direction:e,isOpen:n,shouldScaleBackground:r,setBackgroundColorOnScale:o,noBodyStyles:a}=fT(),i=t.useRef(null),s=t.useMemo(()=>document.body.style.backgroundColor,[]);function l(){return(window.innerWidth-26)/window.innerWidth}t.useEffect(()=>{if(n&&r){i.current&&clearTimeout(i.current);const t=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!t)return;o&&!a&&AT(document.body,{background:"black"}),AT(t,{transformOrigin:PT(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${RT.DURATION}s`,transitionTimingFunction:`cubic-bezier(${RT.EASE.join(",")})`});const n=AT(t,{borderRadius:"8px",overflow:"hidden",...PT(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*RT.DURATION)}}},[n,r,s])}();function E(e){S.current=null,N.current=!1,l(e)}return t.useEffect(()=>{M&&window.requestAnimationFrame(()=>{k(!0)})},[]),t.createElement(Wr,{"data-vaul-drawer-direction":h,"data-vaul-drawer":"","data-vaul-delayed-snap-points":w?"true":"false","data-vaul-snap-points":m&&M?"true":"false","data-vaul-custom-container":v?"true":"false","data-vaul-animate":(null==y?void 0:y.current)?"true":"false",...o,ref:C,style:d&&d.length>0?{"--snap-point-height":`${d[null!=f?f:0]}px`,...n}:n,onPointerDown:e=>{b||(null==o.onPointerDown||o.onPointerDown.call(o,e),S.current={x:e.pageX,y:e.pageY},s(e))},onOpenAutoFocus:e=>{null==r||r(e),x||e.preventDefault()},onPointerDownOutside:t=>{null==e||e(t),p&&!t.defaultPrevented?u.current&&(u.current=!1):t.preventDefault()},onFocusOutside:e=>{p||e.preventDefault()},onPointerMove:e=>{if(j.current=e,b)return;if(null==o.onPointerMove||o.onPointerMove.call(o,e),!S.current)return;const t=e.pageY-S.current.y,n=e.pageX-S.current.x,r="touch"===e.pointerType?10:2,a=((e,t,n=0)=>{if(N.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 N.current=!0,!0})({x:n,y:t},h,r);a?c(e):(Math.abs(n)>r||Math.abs(t)>r)&&(S.current=null)},onPointerUp:e=>{null==o.onPointerUp||o.onPointerUp.call(o,e),S.current=null,N.current=!1,l(e)},onPointerOut:e=>{null==o.onPointerOut||o.onPointerOut.call(o,e),E(j.current)},onContextMenu:e=>{null==o.onContextMenu||o.onContextMenu.call(o,e),j.current&&E(j.current)}})});WT.displayName="Drawer.Content";const HT=t.forwardRef(function({preventCycle:e=!1,children:n,...r},o){const{closeDrawer:a,isDragging:i,snapPoints:s,activeSnapPoint:l,setActiveSnapPoint:c,dismissible:u,handleOnly:d,isOpen:f,onPress:p,onDrag:m}=fT(),h=t.useRef(null),g=t.useRef(!1);function v(){h.current&&window.clearTimeout(h.current),g.current=!1}return t.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:o,"data-vaul-drawer-visible":f?"true":"false","data-vaul-handle":"","aria-hidden":"true",...r},t.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},n))});HT.displayName="Drawer.Handle";const UT={Root:function({open:e,onOpenChange:n,children:r,onDrag:o,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:b,nested:y,noBodyStyles:x=!1,direction:w="bottom",defaultOpen:k=!1,disablePreventScroll:C=!0,snapToSequentialPoint:S=!1,preventScrollRestoration:j=!1,repositionInputs:N=!0,onAnimationEnd:M,container:E,autoFocus:_=!1}){var O,D;const[P=!1,T]=FT({defaultProp:k,prop:e,onChange:e=>{null==n||n(e),e||y||ue(),setTimeout(()=>{null==M||M(e)},1e3*RT.DURATION),e&&!v&&"undefined"!=typeof window&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),e||(document.body.style.pointerEvents="auto")}}),[A,R]=t.useState(!1),[I,z]=t.useState(!1),[L,F]=t.useState(!1),B=t.useRef(null),$=t.useRef(null),W=t.useRef(null),H=t.useRef(null),U=t.useRef(null),V=t.useRef(!1),Y=t.useRef(null),K=t.useRef(0),q=t.useRef(!1),G=t.useRef(!k),X=t.useRef(0),Z=t.useRef(null),Q=t.useRef((null==(O=Z.current)?void 0:O.getBoundingClientRect().height)||0),J=t.useRef((null==(D=Z.current)?void 0:D.getBoundingClientRect().width)||0),ee=t.useRef(0),te=t.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:n,snapPoints:r,drawerRef:o,overlayRef:a,fadeFromIndex:i,onSnapPointChange:s,direction:l="bottom",container:c,snapToSequentialPoint:u}){const[d,f]=FT({prop:e,defaultProp:null==r?void 0:r[0],onChange:n}),[p,m]=t.useState("undefined"!=typeof window?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);t.useEffect(()=>{function e(){m({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);const h=t.useMemo(()=>d===(null==r?void 0:r[r.length-1])||null,[r,d]),g=t.useMemo(()=>{var e;return null!=(e=null==r?void 0:r.findIndex(e=>e===d))?e:null},[r,d]),v=r&&r.length>0&&(i||0===i)&&!Number.isNaN(i)&&r[i]===d||!r,b=t.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==r?void 0:r.map(t=>{const n="string"==typeof t;let r=0;if(n&&(r=parseInt(t,10)),PT(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:[]},[r,p,c]),y=t.useMemo(()=>null!==g?null==b?void 0:b[g]:null,[b,g]),x=t.useCallback(e=>{var t;const n=null!=(t=null==b?void 0:b.findIndex(t=>t===e))?t:null;s(n),DT(o.current,{transition:`transform ${RT.DURATION}s cubic-bezier(${RT.EASE.join(",")})`,transform:PT(l)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`}),b&&n!==b.length-1&&void 0!==i&&n!==i&&n<i?DT(a.current,{transition:`opacity ${RT.DURATION}s cubic-bezier(${RT.EASE.join(",")})`,opacity:"0"}):DT(a.current,{transition:`opacity ${RT.DURATION}s cubic-bezier(${RT.EASE.join(",")})`,opacity:"1"}),f(null==r?void 0:r[Math.max(n,0)])},[o.current,r,b,i,a,f]);return t.useEffect(()=>{if(d||e){var t;const n=null!=(t=null==r?void 0:r.findIndex(t=>t===e||t===d))?t:-1;b&&-1!==n&&"number"==typeof b[n]&&x(b[n])}},[d,e,r,b,x]),{isLastSnapPoint:h,activeSnapPoint:d,shouldFade:v,getPercentageDragged:function(e,t){if(!r||"number"!=typeof g||!b||void 0===i)return null;const n=g===i-1;if(g>=i&&t)return 0;if(n&&!t)return 1;if(!v&&!n)return null;const o=n?g+1:g-1,a=n?b[o]-b[o-1]:b[o+1]-b[o],s=e/Math.abs(a);return n?1-s:s},setActiveSnapPoint:f,activeSnapPointIndex:g,onRelease:function({draggedDistance:e,closeDrawer:t,velocity:n,dismissible:o}){if(void 0===i)return;const s="bottom"===l||"right"===l?(null!=y?y:0)-e:(null!=y?y:0)+e,c=0===g,d=e>0;if(g===i-1&&DT(a.current,{transition:`opacity ${RT.DURATION}s cubic-bezier(${RT.EASE.join(",")})`}),!u&&n>2&&!d)return void(o?t():x(b[0]));if(!u&&n>2&&d&&b&&r)return void x(b[r.length-1]);const f=null==b?void 0:b.reduce((e,t)=>"number"!=typeof e||"number"!=typeof t?e:Math.abs(t-s)<Math.abs(e-s)?t:e),p=PT(l)?window.innerHeight:window.innerWidth;if(n>.4&&Math.abs(e)<.4*p){const e=d?1:-1;if(e>0&&h&&r)return void x(b[r.length-1]);if(c&&e<0&&o&&t(),null===g)return;return void x(b[g+e])}x(f)},onDrag:function({draggedDistance:e}){if(null===y)return;const t="bottom"===l||"right"===l?y-e:y+e;("bottom"===l||"right"===l)&&t<b[b.length-1]||("top"===l||"left"===l)&&t>b[b.length-1]||DT(o.current,{transform:PT(l)?`translate3d(0, ${t}px, 0)`:`translate3d(${t}px, 0, 0)`})},snapPointsOffset:b}}({snapPoints:i,activeSnapPointProp:m,setActiveSnapPointProp:h,drawerRef:Z,fadeFromIndex:p,overlayRef:B,onSnapPointChange:te,direction:w,container:E,snapToSequentialPoint:S});jT({isDisabled:!P||I||!v||L||!A||!N||!C});const{restorePositionSetting:ue}=function({isOpen:e,modal:n,nested:r,hasBeenOpened:o,preventScrollRestoration:a,noBodyStyles:i}){const[s,l]=t.useState(()=>"undefined"!=typeof window?window.location.href:""),c=t.useRef(0),u=t.useCallback(()=>{if(pT()&&null===BT&&e&&!i){BT={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=t.useCallback(()=>{if(pT()&&null!==BT&&!i){const e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);Object.assign(document.body.style,BT),window.requestAnimationFrame(()=>{a&&s!==window.location.href?l(window.location.href):window.scrollTo(t,e)}),BT=null}},[s]);return t.useEffect(()=>{function e(){c.current=window.scrollY}return e(),window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}},[]),t.useEffect(()=>{if(n)return()=>{"undefined"!=typeof document&&(document.querySelector("[data-vaul-drawer]")||d())}},[n,d]),t.useEffect(()=>{!r&&o&&(e?(!window.matchMedia("(display-mode: standalone)").matches&&u(),n||window.setTimeout(()=>{d()},500)):d())},[e,o,s,n,r,u,d]),{restorePositionSetting:d}}({isOpen:P,modal:v,nested:null!=y&&y,hasBeenOpened:A,preventScrollRestoration:j,noBodyStyles:x});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?TT(Z.current,w):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"===w||"left"===w)return!0;if($.current&&i.getTime()-$.current.getTime()<500)return!1;if(null!==a&&("bottom"===w?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(!I||!Z.current)return;Z.current.classList.remove(zT),V.current=!1,z(!1),H.current=new Date}(),null==b||b(),e||T(!1),setTimeout(()=>{i&&oe(i[0])},1e3*RT.DURATION)}function me(){if(!Z.current)return;const e=document.querySelector("[data-vaul-drawer-wrapper]"),t=TT(Z.current,w);DT(Z.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${RT.DURATION}s cubic-bezier(${RT.EASE.join(",")})`}),DT(B.current,{transition:`opacity ${RT.DURATION}s cubic-bezier(${RT.EASE.join(",")})`,opacity:"1"}),s&&t&&t>0&&P&&DT(e,{borderRadius:"8px",overflow:"hidden",...PT(w)?{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:`${RT.DURATION}s`,transitionTimingFunction:`cubic-bezier(${RT.EASE.join(",")})`},!0)}return t.useEffect(()=>{window.requestAnimationFrame(()=>{G.current=!0})},[]),t.useEffect(()=>{var e;function t(){if(!Z.current||!N)return;if(ET(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]),t.useEffect(()=>(P&&(DT(document.documentElement,{scrollBehavior:"auto"}),$.current=new Date),()=>{!function(e,t){if(!(e&&e instanceof HTMLElement))return;let n=OT.get(e);n&&(e.style[t]=n[t])}(document.documentElement,"scrollBehavior")}),[P]),t.useEffect(()=>{v||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[v]),t.createElement(Lr,{defaultOpen:k,onOpenChange:e=>{(d||e)&&(e?R(!0):pe(!0),T(e))},open:P},t.createElement(dT.Provider,{value:{activeSnapPoint:ne,snapPoints:i,setActiveSnapPoint:oe,drawerRef:Z,overlayRef:B,onOpenChange:n,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,hT()&&window.addEventListener("touchend",()=>V.current=!1,{once:!0}),e.target.setPointerCapture(e.pointerId),K.current=PT(w)?e.pageY:e.pageX))},onRelease:function(e){if(!I||!Z.current)return;Z.current.classList.remove(zT),V.current=!1,z(!1),H.current=new Date;const t=TT(Z.current,w);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-(PT(w)?e.pageY:e.pageX),o=Math.abs(r)/n;if(o>.05&&(F(!0),setTimeout(()=>{F(!1)},200)),i){return ae({draggedDistance:r*("bottom"===w||"right"===w?1:-1),closeDrawer:pe,velocity:o,dismissible:d}),void(null==a||a(e,!0))}if("bottom"===w||"right"===w?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"===w||"right"===w;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&&I){const n="bottom"===w||"right"===w?1:-1,r=(K.current-(PT(w)?e.pageY:e.pageX))*n,a=r>0,l=i&&!d&&!a;if(l&&0===re)return;const c=Math.abs(r),u=document.querySelector("[data-vaul-drawer-wrapper]");let f=c/("bottom"===w||"top"===w?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(zT),V.current=!0,DT(Z.current,{transition:"none"}),DT(B.current,{transition:"none"}),i&&se({draggedDistance:r}),a&&!i){const e=(t=r,8*(Math.log(t+1)-2)),o=Math.min(-1*e,0)*n;return void DT(Z.current,{transform:PT(w)?`translate3d(0, ${o}px, 0)`:`translate3d(${o}px, 0, 0)`})}const h=1-f;if((le||p&&re===p-1)&&(null==o||o(e,f),DT(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);DT(u,{borderRadius:`${t}px`,transform:PT(w)?`scale(${e}) translate3d(0, ${n}px, 0)`:`scale(${e}) translate3d(${n}px, 0, 0)`,transition:"none"},!0)}if(!i){const e=c*n;DT(Z.current,{transform:PT(w)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}}},dismissible:d,shouldAnimate:G,handleOnly:f,isOpen:P,isDragging:I,shouldFade:le,closeDrawer:pe,onNestedDrag:function(e,t){if(t<0)return;const n=(window.innerWidth-IT)/window.innerWidth,r=n+t*(1-n),o=t*IT-16;DT(Z.current,{transform:PT(w)?`scale(${r}) translate3d(0, ${o}px, 0)`:`scale(${r}) translate3d(${o}px, 0, 0)`,transition:"none"})},onNestedOpenChange:function(e){const t=e?(window.innerWidth-IT)/window.innerWidth:1,n=e?-16:0;Y.current&&window.clearTimeout(Y.current),DT(Z.current,{transition:`transform ${RT.DURATION}s cubic-bezier(${RT.EASE.join(",")})`,transform:PT(w)?`scale(${t}) translate3d(0, ${n}px, 0)`:`scale(${t}) translate3d(${n}px, 0, 0)`}),!e&&Z.current&&(Y.current=setTimeout(()=>{const e=TT(Z.current,w);DT(Z.current,{transition:"none",transform:PT(w)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})},500))},onNestedRelease:function(e,t){const n=PT(w)?window.innerHeight:window.innerWidth,r=t?(n-IT)/n:1,o=t?-16:0;t&&DT(Z.current,{transition:`transform ${RT.DURATION}s cubic-bezier(${RT.EASE.join(",")})`,transform:PT(w)?`scale(${r}) translate3d(0, ${o}px, 0)`:`scale(${r}) translate3d(${o}px, 0, 0)`})},keyboardIsOpen:q,modal:v,snapPointsOffset:ie,activeSnapPointIndex:re,direction:w,shouldScaleBackground:s,setBackgroundColorOnScale:l,noBodyStyles:x,container:E,autoFocus:_}},r))},Content:WT,Overlay:$T,Trigger:Fr,Portal:function(e){const n=fT(),{container:r=n.container,...o}=e;return t.createElement(Br,{container:r,...o})},Close:Vr,Title:Hr,Description:Ur};function VT({...t}){return e.jsx(UT.Portal,{"data-slot":"drawer-portal",...t})}function YT({className:t,...n}){return e.jsx(UT.Overlay,{"data-slot":"drawer-overlay",className:Rt("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})}var KT="DropdownMenu",[qT]=l(KT,[dD]),GT=dD(),[XT,ZT]=qT(KT),QT=t=>{const{__scopeDropdownMenu:n,children:r,dir:o,open:a,defaultOpen:s,onOpenChange:l,modal:c=!0}=t,u=GT(n),d=i.useRef(null),[f,p]=C({prop:a,defaultProp:s??!1,onChange:l,caller:KT});return e.jsx(XT,{scope:n,triggerId:O(),triggerRef:d,contentId:O(),open:f,onOpenChange:p,onOpenToggle:i.useCallback(()=>p(e=>!e),[p]),modal:c,children:e.jsx(cP,{...u,open:f,onOpenChange:p,dir:o,modal:c,children:r})})};QT.displayName=KT;var JT="DropdownMenuTrigger",eA=i.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,disabled:o=!1,...a}=t,i=ZT(JT,r),s=GT(r);return e.jsx(uP,{asChild:!0,...s,children:e.jsx(S.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:d(n,i.triggerRef),onPointerDown:x(t.onPointerDown,e=>{o||0!==e.button||!1!==e.ctrlKey||(i.onOpenToggle(),i.open||e.preventDefault())}),onKeyDown:x(t.onKeyDown,e=>{o||(["Enter"," "].includes(e.key)&&i.onOpenToggle(),"ArrowDown"===e.key&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())})})})});eA.displayName=JT;var tA=t=>{const{__scopeDropdownMenu:n,...r}=t,o=GT(n);return e.jsx(dP,{...o,...r})};tA.displayName="DropdownMenuPortal";var nA="DropdownMenuContent",rA=i.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,a=ZT(nA,r),s=GT(r),l=i.useRef(!1);return e.jsx(fP,{id:a.contentId,"aria-labelledby":a.triggerId,...s,...o,ref:n,onCloseAutoFocus:x(t.onCloseAutoFocus,e=>{l.current||a.triggerRef.current?.focus(),l.current=!1,e.preventDefault()}),onInteractOutside:x(t.onInteractOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;a.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)"}})});rA.displayName=nA;var oA=i.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,a=GT(r);return e.jsx(pP,{...a,...o,ref:n})});oA.displayName="DropdownMenuGroup";var aA=i.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,a=GT(r);return e.jsx(mP,{...a,...o,ref:n})});aA.displayName="DropdownMenuLabel";var iA=i.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,a=GT(r);return e.jsx(hP,{...a,...o,ref:n})});iA.displayName="DropdownMenuItem";var sA=i.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,a=GT(r);return e.jsx(gP,{...a,...o,ref:n})});sA.displayName="DropdownMenuCheckboxItem";var lA=i.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,a=GT(r);return e.jsx(vP,{...a,...o,ref:n})});lA.displayName="DropdownMenuRadioGroup";var cA=i.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,a=GT(r);return e.jsx(bP,{...a,...o,ref:n})});cA.displayName="DropdownMenuRadioItem";var uA=i.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,a=GT(r);return e.jsx(yP,{...a,...o,ref:n})});uA.displayName="DropdownMenuItemIndicator";var dA=i.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,a=GT(r);return e.jsx(xP,{...a,...o,ref:n})});dA.displayName="DropdownMenuSeparator";var fA=i.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,a=GT(r);return e.jsx(wP,{...a,...o,ref:n})});fA.displayName="DropdownMenuArrow";var pA=i.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,a=GT(r);return e.jsx(CP,{...a,...o,ref:n})});pA.displayName="DropdownMenuSubTrigger";var mA=i.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,a=GT(r);return e.jsx(SP,{...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)"}})});mA.displayName="DropdownMenuSubContent";var hA=QT,gA=eA,vA=tA,bA=rA,yA=oA,xA=aA,wA=iA,kA=sA,CA=lA,SA=cA,jA=uA,NA=dA,MA=t=>{const{__scopeDropdownMenu:n,children:r,open:o,onOpenChange:a,defaultOpen:i}=t,s=GT(n),[l,c]=C({prop:o,defaultProp:i??!1,onChange:a,caller:"DropdownMenuSub"});return e.jsx(kP,{...s,open:l,onOpenChange:c,children:r})},EA=pA,_A=mA;const OA=Lt("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"}});var DA=i.forwardRef((t,n)=>e.jsx(S.label,{...t,ref:n,onMouseDown:e=>{e.target.closest("button, input, select, textarea")||(t.onMouseDown?.(e),!e.defaultPrevented&&e.detail>1&&e.preventDefault())}}));DA.displayName="Label";var PA=DA;function TA({className:t,...n}){return e.jsx(PA,{"data-slot":"label",className:Rt("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})}const AA=Lt("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"}});const RA=o.FormProvider,IA=i.createContext({}),zA=()=>{const e=i.useContext(IA),t=i.useContext(LA),{getFieldState:n}=o.useFormContext(),r=o.useFormState({name:e.name}),a=n(e.name,r);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:s}=t;return{id:s,name:e.name,formItemId:`${s}-form-item`,formDescriptionId:`${s}-form-item-description`,formMessageId:`${s}-form-item-message`,...a}},LA=i.createContext({});var FA,BA="HoverCard",[$A]=l(BA,[vO]),WA=vO(),[HA,UA]=$A(BA),VA=t=>{const{__scopeHoverCard:n,children:r,open:o,defaultOpen:a,onOpenChange:s,openDelay:l=700,closeDelay:c=300}=t,u=WA(n),d=i.useRef(0),f=i.useRef(0),p=i.useRef(!1),m=i.useRef(!1),[h,g]=C({prop:o,defaultProp:a??!1,onChange:s,caller:BA}),v=i.useCallback(()=>{clearTimeout(f.current),d.current=window.setTimeout(()=>g(!0),l)},[l,g]),b=i.useCallback(()=>{clearTimeout(d.current),p.current||m.current||(f.current=window.setTimeout(()=>g(!1),c))},[c,g]),y=i.useCallback(()=>g(!1),[g]);return i.useEffect(()=>()=>{clearTimeout(d.current),clearTimeout(f.current)},[]),e.jsx(HA,{scope:n,open:h,onOpenChange:g,onOpen:v,onClose:b,onDismiss:y,hasSelectionRef:p,isPointerDownOnContentRef:m,children:e.jsx(TO,{...u,children:r})})};VA.displayName=BA;var YA="HoverCardTrigger",KA=i.forwardRef((t,n)=>{const{__scopeHoverCard:r,...o}=t,a=UA(YA,r),i=WA(r);return e.jsx(AO,{asChild:!0,...i,children:e.jsx(S.a,{"data-state":a.open?"open":"closed",...o,ref:n,onPointerEnter:x(t.onPointerEnter,nR(a.onOpen)),onPointerLeave:x(t.onPointerLeave,nR(a.onClose)),onFocus:x(t.onFocus,a.onOpen),onBlur:x(t.onBlur,a.onClose),onTouchStart:x(t.onTouchStart,e=>e.preventDefault())})})});KA.displayName=YA;var qA="HoverCardPortal",[GA,XA]=$A(qA,{forceMount:void 0}),ZA=t=>{const{__scopeHoverCard:n,forceMount:r,children:o,container:a}=t,i=UA(qA,n);return e.jsx(GA,{scope:n,forceMount:r,children:e.jsx(N,{present:r||i.open,children:e.jsx(sn,{asChild:!0,container:a,children:o})})})};ZA.displayName=qA;var QA="HoverCardContent",JA=i.forwardRef((t,n)=>{const r=XA(QA,t.__scopeHoverCard),{forceMount:o=r.forceMount,...a}=t,i=UA(QA,t.__scopeHoverCard);return e.jsx(N,{present:o||i.open,children:e.jsx(eR,{"data-state":i.open?"open":"closed",...a,onPointerEnter:x(t.onPointerEnter,nR(i.onOpen)),onPointerLeave:x(t.onPointerLeave,nR(i.onClose)),ref:n})})});JA.displayName=QA;var eR=i.forwardRef((t,n)=>{const{__scopeHoverCard:r,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,...c}=t,u=UA(QA,r),d=WA(r),p=i.useRef(null),m=f(n,p),[h,g]=i.useState(!1);return i.useEffect(()=>{if(h){const e=document.body;return FA=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect="none",e.style.webkitUserSelect="none",()=>{e.style.userSelect=FA,e.style.webkitUserSelect=FA}}},[h]),i.useEffect(()=>{if(p.current){const e=()=>{g(!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]),i.useEffect(()=>{if(p.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})(p.current).forEach(e=>e.setAttribute("tabindex","-1"))}}),e.jsx(Yt,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:l,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:x(s,e=>{e.preventDefault()}),onDismiss:u.onDismiss,children:e.jsx(RO,{...d,...c,onPointerDown:x(c.onPointerDown,e=>{e.currentTarget.contains(e.target)&&g(!0),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!0}),ref:m,style:{...c.style,userSelect:h?"text":void 0,WebkitUserSelect:h?"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)"}})})}),tR=i.forwardRef((t,n)=>{const{__scopeHoverCard:r,...o}=t,a=WA(r);return e.jsx(IO,{...a,...o,ref:n})});function nR(e){return t=>"touch"===t.pointerType?void 0:e()}tR.displayName="HoverCardArrow";var rR=VA,oR=KA,aR=ZA,iR=JA;function sR({className:t,type:n,...r}){return e.jsx("input",{type:n,"data-slot":"input",className:Rt("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 lR({className:t,...n}){return e.jsx("textarea",{"data-slot":"textarea",className:Rt("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})}const cR=Lt("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"}});const uR=Lt("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"}});var dR=Object.defineProperty,fR=Object.defineProperties,pR=Object.getOwnPropertyDescriptors,mR=Object.getOwnPropertySymbols,hR=Object.prototype.hasOwnProperty,gR=Object.prototype.propertyIsEnumerable,vR=(e,t,n)=>t in e?dR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var bR=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");var yR=i.createContext({}),xR=i.forwardRef((e,t)=>{var n,r,o,a,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:b,containerClassName:y,noScriptCSSFallback:x=kR,render:w,children:k}=l,C=((e,t)=>{var n={};for(var r in e)hR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&mR)for(var r of mR(e))t.indexOf(r)<0&&gR.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,j]=i.useState("string"==typeof C.defaultValue?C.defaultValue:""),N=null!=c?c:S,M=function(e){let t=i.useRef();return i.useEffect(()=>{t.current=e}),t.current}(N),E=i.useCallback(e=>{null==u||u(e),j(e)},[u]),_=i.useMemo(()=>p?"string"==typeof p?new RegExp(p):p:null,[p]),O=i.useRef(null),D=i.useRef(null),P=i.useRef({value:N,onChange:E,isIOS:"undefined"!=typeof window&&(null==(r=null==(n=null==window?void 0:window.CSS)?void 0:n.supports)?void 0:r.call(n,"-webkit-touch-callout","none"))}),T=i.useRef({prev:[null==(o=O.current)?void 0:o.selectionStart,null==(a=O.current)?void 0:a.selectionEnd,null==(s=O.current)?void 0:s.selectionDirection]});i.useImperativeHandle(t,()=>O.current,[]),i.useEffect(()=>{let e=O.current,t=D.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=T.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&&O.current.setSelectionRange(l,c,t)}let u=-1!==l?l:n,d=-1!==c?c:r,f=null!=t?t:o;F(u),$(d),T.current.prev=[u,d,f]}if(P.current.value!==e.value&&P.current.onChange(e.value),T.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;";wR(e.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),wR(e.sheet,`[data-input-otp]:autofill { ${t} }`),wR(e.sheet,`[data-input-otp]:-webkit-autofill { ${t} }`),wR(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; } }"),wR(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[A,R]=i.useState(!1),[I,z]=i.useState(!1),[L,F]=i.useState(null),[B,$]=i.useState(null);i.useEffect(()=>{!function(e){setTimeout(e,0),setTimeout(e,10),setTimeout(e,50)}(()=>{var e,t,n,r;null==(e=O.current)||e.dispatchEvent(new Event("input"));let o=null==(t=O.current)?void 0:t.selectionStart,a=null==(n=O.current)?void 0:n.selectionEnd,i=null==(r=O.current)?void 0:r.selectionDirection;null!==o&&null!==a&&(F(o),$(a),T.current.prev=[o,a,i])})},[N,I]),i.useEffect(()=>{void 0!==M&&N!==M&&M.length<d&&N.length===d&&(null==g||g(N))},[d,g,M,N]);let W=function({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:r}){let[o,a]=i.useState(!1),[s,l]=i.useState(!1),[c,u]=i.useState(!1),d=i.useMemo(()=>"none"!==n&&("increase-width"===n||"experimental-no-flickering"===n)&&o&&s,[o,s,n]),f=i.useCallback(()=>{let r=e.current,o=t.current;if(!r||!o||c||"none"===n)return;let i=r,s=i.getBoundingClientRect().left+i.offsetWidth-18,l=i.getBoundingClientRect().top+i.offsetHeight/2;0===document.querySelectorAll(bR).length&&document.elementFromPoint(s,l)===r||(a(!0),u(!0))},[e,t,c,n]);return i.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]),i.useEffect(()=>{let e=r||document.activeElement===t.current;if("none"===n||!e)return;let o=setTimeout(f,0),a=setTimeout(f,2e3),i=setTimeout(f,5e3),s=setTimeout(()=>{u(!0)},6e3);return()=>{clearTimeout(o),clearTimeout(a),clearTimeout(i),clearTimeout(s)}},[t,r,n,f]),{hasPWMBadge:o,willPushPWMBadge:d,PWM_BADGE_SPACE_WIDTH:"40px"}}({containerRef:D,inputRef:O,pushPasswordManagerStrategy:v,isFocused:I}),H=i.useCallback(e=>{let t=e.currentTarget.value.slice(0,d);t.length>0&&_&&!_.test(t)?e.preventDefault():("string"==typeof M&&t.length<M.length&&document.dispatchEvent(new Event("selectionchange")),E(t))},[d,E,M,_]),U=i.useCallback(()=>{var e;if(O.current){let t=Math.min(O.current.value.length,d-1),n=O.current.value.length;null==(e=O.current)||e.setSelectionRange(t,n),F(t),$(n)}z(!0)},[d]),V=i.useCallback(e=>{var t,n;let r=O.current;if(!(b||P.current.isIOS&&e.clipboardData&&r))return;let o=e.clipboardData.getData("text/plain"),a=b?b(o):o;e.preventDefault();let i=null==(t=O.current)?void 0:t.selectionStart,s=null==(n=O.current)?void 0:n.selectionEnd,l=(i!==s?N.slice(0,i)+a+N.slice(s):N.slice(0,i)+a+N.slice(i)).slice(0,d);if(l.length>0&&_&&!_.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,_,N]),Y=i.useMemo(()=>({position:"relative",cursor:C.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[C.disabled]),K=i.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=i.useMemo(()=>i.createElement("input",((e,t)=>fR(e,pR(t)))(((e,t)=>{for(var n in t||(t={}))hR.call(t,n)&&vR(e,n,t[n]);if(mR)for(var n of mR(t))gR.call(t,n)&&vR(e,n,t[n]);return e})({autoComplete:C.autoComplete||"one-time-code"},C),{"data-input-otp":!0,"data-input-otp-placeholder-shown":0===N.length||void 0,"data-input-otp-mss":L,"data-input-otp-mse":B,inputMode:h,pattern:null==_?void 0:_.source,"aria-placeholder":m,style:K,maxLength:d,value:N,ref:O,onPaste:e=>{var t;V(e),null==(t=C.onPaste)||t.call(C,e)},onChange:H,onMouseOver:e=>{var t;R(!0),null==(t=C.onMouseOver)||t.call(C,e)},onMouseLeave:e=>{var t;R(!1),null==(t=C.onMouseLeave)||t.call(C,e)},onFocus:e=>{var t;U(),null==(t=C.onFocus)||t.call(C,e)},onBlur:e=>{var t;z(!1),null==(t=C.onBlur)||t.call(C,e)}})),[H,U,V,h,K,d,B,L,C,null==_?void 0:_.source,N]),G=i.useMemo(()=>({slots:Array.from({length:d}).map((e,t)=>{var n;let r=I&&null!==L&&null!==B&&(L===B&&t===L||t>=L&&t<B),o=void 0!==N[t]?N[t]:null;return{char:o,placeholderChar:void 0!==N[0]?null:null!=(n=null==m?void 0:m[t])?n:null,isActive:r,hasFakeCaret:r&&null===o}}),isFocused:I,isHovering:!C.disabled&&A}),[I,A,d,B,L,C.disabled,N]),X=i.useMemo(()=>w?w(G):i.createElement(yR.Provider,{value:G},k),[k,G,w]);return i.createElement(i.Fragment,null,null!==x&&i.createElement("noscript",null,i.createElement("style",null,x)),i.createElement("div",{ref:D,"data-input-otp-container":!0,style:Y,className:y},X,i.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},q)))});function wR(e,t){try{e.insertRule(t)}catch(e){console.error("input-otp could not insert CSS rule:",t)}}xR.displayName="Input";var kR="\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}";const CR=Lt("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"}});const SR=Lt("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"}});var jR="Menubar",[NR,MR,ER]=y(jR),[_R]=l(jR,[ER,UO]),OR=dD(),DR=UO(),[PR,TR]=_R(jR),AR=i.forwardRef((t,n)=>{const{__scopeMenubar:r,value:o,onValueChange:a,defaultValue:s,loop:l=!0,dir:c,...u}=t,d=K(c),f=DR(r),[p,m]=C({prop:o,onChange:a,defaultProp:s??"",caller:jR}),[h,g]=i.useState(null);return e.jsx(PR,{scope:r,value:p,onMenuOpen:i.useCallback(e=>{m(e),g(e)},[m]),onMenuClose:i.useCallback(()=>m(""),[m]),onMenuToggle:i.useCallback(e=>{m(t=>t?"":e),g(e)},[m]),dir:d,loop:l,children:e.jsx(NR.Provider,{scope:r,children:e.jsx(NR.Slot,{scope:r,children:e.jsx(JO,{asChild:!0,...f,orientation:"horizontal",loop:l,dir:d,currentTabStopId:h,onCurrentTabStopIdChange:g,children:e.jsx(S.div,{role:"menubar",...u,ref:n})})})})})});AR.displayName=jR;var RR="MenubarMenu",[IR,zR]=_R(RR),LR=t=>{const{__scopeMenubar:n,value:r,...o}=t,a=O(),s=r||a||"LEGACY_REACT_AUTO_VALUE",l=TR(RR,n),c=OR(n),u=i.useRef(null),d=i.useRef(!1),f=l.value===s;return i.useEffect(()=>{f||(d.current=!1)},[f]),e.jsx(IR,{scope:n,value:s,triggerId:O(),triggerRef:u,contentId:O(),wasKeyboardTriggerOpenRef:d,children:e.jsx(cP,{...c,open:f,onOpenChange:e=>{e||l.onMenuClose()},modal:!1,dir:l.dir,...o})})};LR.displayName=RR;var FR="MenubarTrigger",BR=i.forwardRef((t,n)=>{const{__scopeMenubar:r,disabled:o=!1,...a}=t,s=DR(r),l=OR(r),c=TR(FR,r),u=zR(FR,r),d=i.useRef(null),p=f(n,d,u.triggerRef),[m,h]=i.useState(!1),g=c.value===u.value;return e.jsx(NR.ItemSlot,{scope:r,value:u.value,disabled:o,children:e.jsx(eD,{asChild:!0,...s,focusable:!o,tabStopId:u.value,children:e.jsx(uP,{asChild:!0,...l,children:e.jsx(S.button,{type:"button",role:"menuitem",id:u.triggerId,"aria-haspopup":"menu","aria-expanded":g,"aria-controls":g?u.contentId:void 0,"data-highlighted":m?"":void 0,"data-state":g?"open":"closed","data-disabled":o?"":void 0,disabled:o,...a,ref:p,onPointerDown:x(t.onPointerDown,e=>{o||0!==e.button||!1!==e.ctrlKey||(c.onMenuOpen(u.value),g||e.preventDefault())}),onPointerEnter:x(t.onPointerEnter,()=>{Boolean(c.value)&&!g&&(c.onMenuOpen(u.value),d.current?.focus())}),onKeyDown:x(t.onKeyDown,e=>{o||(["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:x(t.onFocus,()=>h(!0)),onBlur:x(t.onBlur,()=>h(!1))})})})})});BR.displayName=FR;var $R=t=>{const{__scopeMenubar:n,...r}=t,o=OR(n);return e.jsx(dP,{...o,...r})};$R.displayName="MenubarPortal";var WR="MenubarContent",HR=i.forwardRef((t,n)=>{const{__scopeMenubar:r,align:o="start",...a}=t,s=OR(r),l=TR(WR,r),c=zR(WR,r),u=MR(r),d=i.useRef(!1);return e.jsx(fP,{id:c.contentId,"aria-labelledby":c.triggerId,"data-radix-menubar-content":"",...s,...a,ref:n,align:o,onCloseAutoFocus:x(t.onCloseAutoFocus,e=>{Boolean(l.value)||d.current||c.triggerRef.current?.focus(),d.current=!1,e.preventDefault()}),onFocusOutside:x(t.onFocusOutside,e=>{const t=e.target;u().some(e=>e.ref.current?.contains(t))&&e.preventDefault()}),onInteractOutside:x(t.onInteractOutside,()=>{d.current=!0}),onEntryFocus:e=>{c.wasKeyboardTriggerOpenRef.current||e.preventDefault()},onKeyDown:x(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)"}})});HR.displayName=WR;var UR=i.forwardRef((t,n)=>{const{__scopeMenubar:r,...o}=t,a=OR(r);return e.jsx(pP,{...a,...o,ref:n})});UR.displayName="MenubarGroup";var VR=i.forwardRef((t,n)=>{const{__scopeMenubar:r,...o}=t,a=OR(r);return e.jsx(mP,{...a,...o,ref:n})});VR.displayName="MenubarLabel";var YR=i.forwardRef((t,n)=>{const{__scopeMenubar:r,...o}=t,a=OR(r);return e.jsx(hP,{...a,...o,ref:n})});YR.displayName="MenubarItem";var KR=i.forwardRef((t,n)=>{const{__scopeMenubar:r,...o}=t,a=OR(r);return e.jsx(gP,{...a,...o,ref:n})});KR.displayName="MenubarCheckboxItem";var qR=i.forwardRef((t,n)=>{const{__scopeMenubar:r,...o}=t,a=OR(r);return e.jsx(vP,{...a,...o,ref:n})});qR.displayName="MenubarRadioGroup";var GR=i.forwardRef((t,n)=>{const{__scopeMenubar:r,...o}=t,a=OR(r);return e.jsx(bP,{...a,...o,ref:n})});GR.displayName="MenubarRadioItem";var XR=i.forwardRef((t,n)=>{const{__scopeMenubar:r,...o}=t,a=OR(r);return e.jsx(yP,{...a,...o,ref:n})});XR.displayName="MenubarItemIndicator";var ZR=i.forwardRef((t,n)=>{const{__scopeMenubar:r,...o}=t,a=OR(r);return e.jsx(xP,{...a,...o,ref:n})});ZR.displayName="MenubarSeparator";var QR=i.forwardRef((t,n)=>{const{__scopeMenubar:r,...o}=t,a=OR(r);return e.jsx(wP,{...a,...o,ref:n})});QR.displayName="MenubarArrow";var JR="MenubarSub",eI=t=>{const{__scopeMenubar:n,children:r,open:o,onOpenChange:a,defaultOpen:i}=t,s=OR(n),[l,c]=C({prop:o,defaultProp:i??!1,onChange:a,caller:JR});return e.jsx(kP,{...s,open:l,onOpenChange:c,children:r})};eI.displayName=JR;var tI=i.forwardRef((t,n)=>{const{__scopeMenubar:r,...o}=t,a=OR(r);return e.jsx(CP,{"data-radix-menubar-subtrigger":"",...a,...o,ref:n})});tI.displayName="MenubarSubTrigger";var nI=i.forwardRef((t,n)=>{const{__scopeMenubar:r,...o}=t,a=OR(r);return e.jsx(SP,{...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)"}})});nI.displayName="MenubarSubContent";var rI=AR,oI=LR,aI=BR,iI=$R,sI=HR,lI=UR,cI=VR,uI=YR,dI=KR,fI=qR,pI=GR,mI=XR,hI=ZR,gI=eI,vI=tI,bI=nI;function yI({...t}){return e.jsx(iI,{"data-slot":"menubar-portal",...t})}var xI=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"}),wI=i.forwardRef((t,n)=>e.jsx(S.span,{...t,ref:n,style:{...xI,...t.style}}));wI.displayName="VisuallyHidden";var kI=wI,CI="NavigationMenu",[SI,jI,NI]=y(CI),[MI,EI,_I]=y(CI),[OI]=l(CI,[NI,_I]),[DI,PI]=OI(CI),[TI,AI]=OI(CI),RI=i.forwardRef((t,n)=>{const{__scopeNavigationMenu:r,value:o,onValueChange:a,defaultValue:s,delayDuration:l=200,skipDelayDuration:c=300,orientation:u="horizontal",dir:d,...p}=t,[m,h]=i.useState(null),g=f(n,e=>h(e)),v=K(d),b=i.useRef(0),y=i.useRef(0),x=i.useRef(0),[w,k]=i.useState(!0),[j,N]=C({prop:o,onChange:e=>{const t=c>0;""!==e?(window.clearTimeout(x.current),t&&k(!1)):(window.clearTimeout(x.current),x.current=window.setTimeout(()=>k(!0),c)),a?.(e)},defaultProp:s??"",caller:CI}),M=i.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>N(""),150)},[N]),E=i.useCallback(e=>{window.clearTimeout(y.current),N(e)},[N]),_=i.useCallback(e=>{j===e?window.clearTimeout(y.current):b.current=window.setTimeout(()=>{window.clearTimeout(y.current),N(e)},l)},[j,N,l]);return i.useEffect(()=>()=>{window.clearTimeout(b.current),window.clearTimeout(y.current),window.clearTimeout(x.current)},[]),e.jsx(LI,{scope:r,isRootMenu:!0,value:j,dir:v,orientation:u,rootNavigationMenu:m,onTriggerEnter:e=>{window.clearTimeout(b.current),w?_(e):E(e)},onTriggerLeave:()=>{window.clearTimeout(b.current),M()},onContentEnter:()=>window.clearTimeout(y.current),onContentLeave:M,onItemSelect:e=>{N(t=>t===e?"":e)},onItemDismiss:()=>N(""),children:e.jsx(S.nav,{"aria-label":"Main","data-orientation":u,dir:v,...p,ref:g})})});RI.displayName=CI;var II="NavigationMenuSub",zI=i.forwardRef((t,n)=>{const{__scopeNavigationMenu:r,value:o,onValueChange:a,defaultValue:i,orientation:s="horizontal",...l}=t,c=PI(II,r),[u,d]=C({prop:o,onChange:a,defaultProp:i??"",caller:II});return e.jsx(LI,{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.jsx(S.div,{"data-orientation":s,...l,ref:n})})});zI.displayName=II;var LI=t=>{const{scope:n,isRootMenu:r,rootNavigationMenu:o,dir:a,orientation:s,children:l,value:c,onItemSelect:u,onItemDismiss:d,onTriggerEnter:f,onTriggerLeave:p,onContentEnter:m,onContentLeave:h}=t,[g,v]=i.useState(null),[b,y]=i.useState(new Map),[x,w]=i.useState(null);return e.jsx(DI,{scope:n,isRootMenu:r,rootNavigationMenu:o,value:c,previousValue:pM(c),baseId:O(),dir:a,orientation:s,viewport:g,onViewportChange:v,indicatorTrack:x,onIndicatorTrackChange:w,onTriggerEnter:Bt(f),onTriggerLeave:Bt(p),onContentEnter:Bt(m),onContentLeave:Bt(h),onItemSelect:Bt(u),onItemDismiss:Bt(d),onViewportContentChange:i.useCallback((e,t)=>{y(n=>(n.set(e,t),new Map(n)))},[]),onViewportContentRemove:i.useCallback(e=>{y(t=>t.has(e)?(t.delete(e),new Map(t)):t)},[]),children:e.jsx(SI.Provider,{scope:n,children:e.jsx(TI,{scope:n,items:b,children:l})})})},FI="NavigationMenuList",BI=i.forwardRef((t,n)=>{const{__scopeNavigationMenu:r,...o}=t,a=PI(FI,r),i=e.jsx(S.ul,{"data-orientation":a.orientation,...o,ref:n});return e.jsx(S.div,{style:{position:"relative"},ref:a.onIndicatorTrackChange,children:e.jsx(SI.Slot,{scope:r,children:a.isRootMenu?e.jsx(iz,{asChild:!0,children:i}):i})})});BI.displayName=FI;var $I="NavigationMenuItem",[WI,HI]=OI($I),UI=i.forwardRef((t,n)=>{const{__scopeNavigationMenu:r,value:o,...a}=t,s=O(),l=o||s||"LEGACY_REACT_AUTO_VALUE",c=i.useRef(null),u=i.useRef(null),d=i.useRef(null),f=i.useRef(()=>{}),p=i.useRef(!1),m=i.useCallback((e="start")=>{if(c.current){f.current();const t=cz(c.current);t.length&&uz("start"===e?t:t.reverse())}},[]),h=i.useCallback(()=>{if(c.current){const e=cz(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.jsx(WI,{scope:r,value:l,triggerRef:u,contentRef:c,focusProxyRef:d,wasEscapeCloseRef:p,onEntryKeyDown:m,onFocusProxyEnter:m,onRootContentClose:h,onContentFocusOutside:h,children:e.jsx(S.li,{...a,ref:n})})});UI.displayName=$I;var VI="NavigationMenuTrigger",YI=i.forwardRef((t,n)=>{const{__scopeNavigationMenu:r,disabled:o,...a}=t,s=PI(VI,t.__scopeNavigationMenu),l=HI(VI,t.__scopeNavigationMenu),c=i.useRef(null),u=f(c,l.triggerRef,n),d=pz(s.baseId,l.value),p=mz(s.baseId,l.value),m=i.useRef(!1),h=i.useRef(!1),g=l.value===s.value;return e.jsxs(e.Fragment,{children:[e.jsx(SI.ItemSlot,{scope:r,value:l.value,children:e.jsx(lz,{asChild:!0,children:e.jsx(S.button,{id:d,disabled:o,"data-disabled":o?"":void 0,"data-state":fz(g),"aria-expanded":g,"aria-controls":p,...a,ref:u,onPointerEnter:x(t.onPointerEnter,()=>{h.current=!1,l.wasEscapeCloseRef.current=!1}),onPointerMove:x(t.onPointerMove,hz(()=>{o||h.current||l.wasEscapeCloseRef.current||m.current||(s.onTriggerEnter(l.value),m.current=!0)})),onPointerLeave:x(t.onPointerLeave,hz(()=>{o||(s.onTriggerLeave(),m.current=!1)})),onClick:x(t.onClick,()=>{s.onItemSelect(l.value),h.current=g}),onKeyDown:x(t.onKeyDown,e=>{const t={horizontal:"ArrowDown",vertical:"rtl"===s.dir?"ArrowLeft":"ArrowRight"}[s.orientation];g&&e.key===t&&(l.onEntryKeyDown(),e.preventDefault())})})})}),g&&e.jsxs(e.Fragment,{children:[e.jsx(kI,{"aria-hidden":!0,tabIndex:0,ref:l.focusProxyRef,onFocus:e=>{const t=l.contentRef.current,n=e.relatedTarget,r=n===c.current,o=t?.contains(n);!r&&o||l.onFocusProxyEnter(r?"start":"end")}}),s.viewport&&e.jsx("span",{"aria-owns":p})]})]})});YI.displayName=VI;var KI="navigationMenu.linkSelect",qI=i.forwardRef((t,n)=>{const{__scopeNavigationMenu:r,active:o,onSelect:a,...i}=t;return e.jsx(lz,{asChild:!0,children:e.jsx(S.a,{"data-active":o?"":void 0,"aria-current":o?"page":void 0,...i,ref:n,onClick:x(t.onClick,e=>{const t=e.target,n=new CustomEvent(KI,{bubbles:!0,cancelable:!0});if(t.addEventListener(KI,e=>a?.(e),{once:!0}),j(t,n),!n.defaultPrevented&&!e.metaKey){j(t,new CustomEvent(tz,{bubbles:!0,cancelable:!0}))}},{checkForDefaultPrevented:!1})})})});qI.displayName="NavigationMenuLink";var GI="NavigationMenuIndicator",XI=i.forwardRef((t,r)=>{const{forceMount:o,...a}=t,i=PI(GI,t.__scopeNavigationMenu),s=Boolean(i.value);return i.indicatorTrack?n.createPortal(e.jsx(N,{present:o||s,children:e.jsx(ZI,{...a,ref:r})}),i.indicatorTrack):null});XI.displayName=GI;var ZI=i.forwardRef((t,n)=>{const{__scopeNavigationMenu:r,...o}=t,a=PI(GI,r),s=jI(r),[l,c]=i.useState(null),[u,d]=i.useState(null),f="horizontal"===a.orientation,p=Boolean(a.value);i.useEffect(()=>{const e=s(),t=e.find(e=>e.value===a.value)?.ref.current;t&&c(t)},[s,a.value]);const m=()=>{l&&d({size:f?l.offsetWidth:l.offsetHeight,offset:f?l.offsetLeft:l.offsetTop})};return dz(l,m),dz(a.indicatorTrack,m),u?e.jsx(S.div,{"aria-hidden":!0,"data-state":p?"visible":"hidden","data-orientation":a.orientation,...o,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)`},...o.style}}):null}),QI="NavigationMenuContent",JI=i.forwardRef((t,n)=>{const{forceMount:r,...o}=t,a=PI(QI,t.__scopeNavigationMenu),i=HI(QI,t.__scopeNavigationMenu),s=f(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.jsx(ez,{forceMount:r,...c,ref:s}):e.jsx(N,{present:r||l,children:e.jsx(nz,{"data-state":fz(l),...c,ref:s,onPointerEnter:x(t.onPointerEnter,a.onContentEnter),onPointerLeave:x(t.onPointerLeave,hz(a.onContentLeave)),style:{pointerEvents:!l&&a.isRootMenu?"none":void 0,...c.style}})})});JI.displayName=QI;var ez=i.forwardRef((e,t)=>{const n=PI(QI,e.__scopeNavigationMenu),{onViewportContentChange:r,onViewportContentRemove:o}=n;return w(()=>{r(e.value,{ref:t,...e})},[e,t,r]),w(()=>()=>o(e.value),[e.value,o]),null}),tz="navigationMenu.rootContentDismiss",nz=i.forwardRef((t,n)=>{const{__scopeNavigationMenu:r,value:o,triggerRef:a,focusProxyRef:s,wasEscapeCloseRef:l,onRootContentClose:c,onContentFocusOutside:u,...d}=t,p=PI(QI,r),m=i.useRef(null),h=f(m,n),g=pz(p.baseId,o),v=mz(p.baseId,o),b=jI(r),y=i.useRef(null),{onItemDismiss:w}=p;i.useEffect(()=>{const e=m.current;if(p.isRootMenu&&e){const t=()=>{w(),c(),e.contains(document.activeElement)&&a.current?.focus()};return e.addEventListener(tz,t),()=>e.removeEventListener(tz,t)}},[p.isRootMenu,t.value,a,w,c]);const k=i.useMemo(()=>{const e=b().map(e=>e.value);"rtl"===p.dir&&e.reverse();const t=e.indexOf(p.value),n=e.indexOf(p.previousValue),r=o===p.value,a=n===e.indexOf(o);if(!r&&!a)return y.current;const i=(()=>{if(t!==n){if(r&&-1!==n)return t>n?"from-end":"from-start";if(a&&-1!==t)return t>n?"to-start":"to-end"}return null})();return y.current=i,i},[p.previousValue,p.value,p.dir,b,o]);return e.jsx(iz,{asChild:!0,children:e.jsx(Yt,{id:v,"aria-labelledby":g,"data-motion":k,"data-orientation":p.orientation,...d,ref:h,disableOutsidePointerEvents:!1,onDismiss:()=>{const e=new Event(tz,{bubbles:!0,cancelable:!0});m.current?.dispatchEvent(e)},onFocusOutside:x(t.onFocusOutside,e=>{u();const t=e.target;p.rootNavigationMenu?.contains(t)&&e.preventDefault()}),onPointerDownOutside:x(t.onPointerDownOutside,e=>{const t=e.target,n=b().some(e=>e.ref.current?.contains(t)),r=p.isRootMenu&&p.viewport?.contains(t);(n||r||!p.isRootMenu)&&e.preventDefault()}),onKeyDown:x(t.onKeyDown,e=>{const t=e.altKey||e.ctrlKey||e.metaKey;if("Tab"===e.key&&!t){const t=cz(e.currentTarget),n=document.activeElement,r=t.findIndex(e=>e===n);uz(e.shiftKey?t.slice(0,r).reverse():t.slice(r+1,t.length))?e.preventDefault():s.current?.focus()}}),onEscapeKeyDown:x(t.onEscapeKeyDown,e=>{l.current=!0})})})}),rz="NavigationMenuViewport",oz=i.forwardRef((t,n)=>{const{forceMount:r,...o}=t,a=PI(rz,t.__scopeNavigationMenu),i=Boolean(a.value);return e.jsx(N,{present:r||i,children:e.jsx(az,{...o,ref:n})})});oz.displayName=rz;var az=i.forwardRef((t,n)=>{const{__scopeNavigationMenu:r,children:o,...a}=t,s=PI(rz,r),l=f(n,s.onViewportChange),c=AI(QI,t.__scopeNavigationMenu),[u,p]=i.useState(null),[m,h]=i.useState(null),g=u?u?.width+"px":void 0,v=u?u?.height+"px":void 0,b=Boolean(s.value),y=b?s.value:s.previousValue;return dz(m,()=>{m&&p({width:m.offsetWidth,height:m.offsetHeight})}),e.jsx(S.div,{"data-state":fz(b),"data-orientation":s.orientation,...a,ref:l,style:{pointerEvents:!b&&s.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":g,"--radix-navigation-menu-viewport-height":v,...a.style},onPointerEnter:x(t.onPointerEnter,s.onContentEnter),onPointerLeave:x(t.onPointerLeave,hz(s.onContentLeave)),children:Array.from(c.items).map(([t,{ref:n,forceMount:r,...o}])=>{const a=y===t;return e.jsx(N,{present:r||a,children:e.jsx(nz,{...o,ref:d(n,e=>{a&&e&&h(e)})})},t)})})}),iz=i.forwardRef((t,n)=>{const{__scopeNavigationMenu:r,...o}=t,a=PI("FocusGroup",r);return e.jsx(MI.Provider,{scope:r,children:e.jsx(MI.Slot,{scope:r,children:e.jsx(S.div,{dir:a.dir,...o,ref:n})})})}),sz=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],lz=i.forwardRef((t,n)=>{const{__scopeNavigationMenu:r,...o}=t,a=EI(r),i=PI("FocusGroupItem",r);return e.jsx(MI.ItemSlot,{scope:r,children:e.jsx(S.button,{...o,ref:n,onKeyDown:x(t.onKeyDown,e=>{if(["Home","End",...sz].includes(e.key)){let t=a().map(e=>e.ref.current);if(["rtl"===i.dir?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(e.key)&&t.reverse(),sz.includes(e.key)){const n=t.indexOf(e.currentTarget);t=t.slice(n+1)}setTimeout(()=>uz(t)),e.preventDefault()}})})})});function cz(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 uz(e){const t=document.activeElement;return e.some(e=>e===t||(e.focus(),document.activeElement!==t))}function dz(e,t){const n=Bt(t);w(()=>{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 fz(e){return e?"open":"closed"}function pz(e,t){return`${e}-trigger-${t}`}function mz(e,t){return`${e}-content-${t}`}function hz(e){return t=>"mouse"===t.pointerType?e(t):void 0}var gz=RI,vz=BI,bz=UI,yz=YI,xz=qI,wz=XI,kz=JI,Cz=oz;const Sz=Lt("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 jz({className:t,...n}){return e.jsx("div",{className:Rt("absolute left-0 top-full isolate z-50 flex justify-center"),children:e.jsx(Cz,{"data-slot":"navigation-menu-viewport",className:Rt("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 Nz({className:t,isActive:n,size:r="icon",...o}){return e.jsx("a",{"aria-current":n?"page":void 0,"data-slot":"pagination-link","data-active":n,className:Rt(ko({variant:n?"outline":"ghost",size:r}),t),...o})}var Mz="Popover",[Ez]=l(Mz,[vO]),_z=vO(),[Oz,Dz]=Ez(Mz),Pz=t=>{const{__scopePopover:n,children:r,open:o,defaultOpen:a,onOpenChange:s,modal:l=!1}=t,c=_z(n),u=i.useRef(null),[d,f]=i.useState(!1),[p,m]=C({prop:o,defaultProp:a??!1,onChange:s,caller:Mz});return e.jsx(TO,{...c,children:e.jsx(Oz,{scope:n,contentId:O(),triggerRef:u,open:p,onOpenChange:m,onOpenToggle:i.useCallback(()=>m(e=>!e),[m]),hasCustomAnchor:d,onCustomAnchorAdd:i.useCallback(()=>f(!0),[]),onCustomAnchorRemove:i.useCallback(()=>f(!1),[]),modal:l,children:r})})};Pz.displayName=Mz;var Tz="PopoverAnchor",Az=i.forwardRef((t,n)=>{const{__scopePopover:r,...o}=t,a=Dz(Tz,r),s=_z(r),{onCustomAnchorAdd:l,onCustomAnchorRemove:c}=a;return i.useEffect(()=>(l(),()=>c()),[l,c]),e.jsx(AO,{...s,...o,ref:n})});Az.displayName=Tz;var Rz="PopoverTrigger",Iz=i.forwardRef((t,n)=>{const{__scopePopover:r,...o}=t,a=Dz(Rz,r),i=_z(r),s=f(n,a.triggerRef),l=e.jsx(S.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Xz(a.open),...o,ref:s,onClick:x(t.onClick,a.onOpenToggle)});return a.hasCustomAnchor?l:e.jsx(AO,{asChild:!0,...i,children:l})});Iz.displayName=Rz;var zz="PopoverPortal",[Lz,Fz]=Ez(zz,{forceMount:void 0}),Bz=t=>{const{__scopePopover:n,forceMount:r,children:o,container:a}=t,i=Dz(zz,n);return e.jsx(Lz,{scope:n,forceMount:r,children:e.jsx(N,{present:r||i.open,children:e.jsx(sn,{asChild:!0,container:a,children:o})})})};Bz.displayName=zz;var $z="PopoverContent",Wz=i.forwardRef((t,n)=>{const r=Fz($z,t.__scopePopover),{forceMount:o=r.forceMount,...a}=t,i=Dz($z,t.__scopePopover);return e.jsx(N,{present:o||i.open,children:i.modal?e.jsx(Uz,{...a,ref:n}):e.jsx(Vz,{...a,ref:n})})});Wz.displayName=$z;var Hz=p("PopoverContent.RemoveScroll"),Uz=i.forwardRef((t,n)=>{const r=Dz($z,t.__scopePopover),o=i.useRef(null),a=f(n,o),s=i.useRef(!1);return i.useEffect(()=>{const e=o.current;if(e)return or(e)},[]),e.jsx(Zn,{as:Hz,allowPinchZoom:!0,children:e.jsx(Yz,{...t,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:x(t.onCloseAutoFocus,e=>{e.preventDefault(),s.current||r.triggerRef.current?.focus()}),onPointerDownOutside:x(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:x(t.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),Vz=i.forwardRef((t,n)=>{const r=Dz($z,t.__scopePopover),o=i.useRef(!1),a=i.useRef(!1);return e.jsx(Yz,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(o.current||r.triggerRef.current?.focus(),e.preventDefault()),o.current=!1,a.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(a.current=!0));const n=e.target,i=r.triggerRef.current?.contains(n);i&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&a.current&&e.preventDefault()}})}),Yz=i.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=Dz($z,r),m=_z(r);return cn(),e.jsx(Jt,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:a,onUnmountAutoFocus:i,children:e.jsx(Yt,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:d,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1),children:e.jsx(RO,{"data-state":Xz(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)"}})})})}),Kz="PopoverClose",qz=i.forwardRef((t,n)=>{const{__scopePopover:r,...o}=t,a=Dz(Kz,r);return e.jsx(S.button,{type:"button",...o,ref:n,onClick:x(t.onClick,()=>a.onOpenChange(!1))})});qz.displayName=Kz;var Gz=i.forwardRef((t,n)=>{const{__scopePopover:r,...o}=t,a=_z(r);return e.jsx(IO,{...a,...o,ref:n})});function Xz(e){return e?"open":"closed"}Gz.displayName="PopoverArrow";var Zz=Pz,Qz=Az,Jz=Iz,eL=Bz,tL=Wz;var nL="Progress",rL=100,[oL]=l(nL),[aL,iL]=oL(nL),sL=i.forwardRef((t,n)=>{const{__scopeProgress:r,value:o=null,max:a,getValueLabel:i=uL,...s}=t;!a&&0!==a||pL(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=pL(a)?a:rL;null===o||mL(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=mL(o,l)?o:null,u=fL(c)?i(c,l):void 0;return e.jsx(aL,{scope:r,value:c,max:l,children:e.jsx(S.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":fL(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":dL(c,l),"data-value":c??void 0,"data-max":l,...s,ref:n})})});sL.displayName=nL;var lL="ProgressIndicator",cL=i.forwardRef((t,n)=>{const{__scopeProgress:r,...o}=t,a=iL(lL,r);return e.jsx(S.div,{"data-state":dL(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...o,ref:n})});function uL(e,t){return`${Math.round(e/t*100)}%`}function dL(e,t){return null==e?"indeterminate":e===t?"complete":"loading"}function fL(e){return"number"==typeof e}function pL(e){return fL(e)&&!isNaN(e)&&e>0}function mL(e,t){return fL(e)&&!isNaN(e)&&e<=t&&e>=0}cL.displayName=lL;var hL=sL,gL=cL;var vL="Radio",[bL,yL]=l(vL),[xL,wL]=bL(vL),kL=i.forwardRef((t,n)=>{const{__scopeRadio:r,name:o,checked:a=!1,required:s,disabled:l,value:c="on",onCheck:u,form:d,...p}=t,[m,h]=i.useState(null),g=f(n,e=>h(e)),v=i.useRef(!1),b=!m||(d||!!m.closest("form"));return e.jsxs(xL,{scope:r,checked:a,disabled:l,children:[e.jsx(S.button,{type:"button",role:"radio","aria-checked":a,"data-state":NL(a),"data-disabled":l?"":void 0,disabled:l,value:c,...p,ref:g,onClick:x(t.onClick,e=>{a||u?.(),b&&(v.current=e.isPropagationStopped(),v.current||e.stopPropagation())})}),b&&e.jsx(jL,{control:m,bubbles:!v.current,name:o,value:c,checked:a,required:s,disabled:l,form:d,style:{transform:"translateX(-100%)"}})]})});kL.displayName=vL;var CL="RadioIndicator",SL=i.forwardRef((t,n)=>{const{__scopeRadio:r,forceMount:o,...a}=t,i=wL(CL,r);return e.jsx(N,{present:o||i.checked,children:e.jsx(S.span,{"data-state":NL(i.checked),"data-disabled":i.disabled?"":void 0,...a,ref:n})})});SL.displayName=CL;var jL=i.forwardRef(({__scopeRadio:t,control:n,checked:r,bubbles:o=!0,...a},s)=>{const l=i.useRef(null),c=f(l,s),u=pM(r),d=mM(n);return i.useEffect(()=>{const e=l.current;if(!e)return;const t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(u!==r&&n){const t=new Event("click",{bubbles:o});n.call(e,r),e.dispatchEvent(t)}},[u,r,o]),e.jsx(S.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...a,tabIndex:-1,ref:c,style:{...a.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function NL(e){return e?"checked":"unchecked"}jL.displayName="RadioBubbleInput";var ML=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],EL="RadioGroup",[_L]=l(EL,[UO,yL]),OL=UO(),DL=yL(),[PL,TL]=_L(EL),AL=i.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=OL(r),h=K(u),[g,v]=C({prop:i,defaultProp:a??null,onChange:f,caller:EL});return e.jsx(PL,{scope:r,name:o,required:s,disabled:l,value:g,onValueChange:v,children:e.jsx(JO,{asChild:!0,...m,orientation:c,dir:h,loop:d,children:e.jsx(S.div,{role:"radiogroup","aria-required":s,"aria-orientation":c,"data-disabled":l?"":void 0,dir:h,...p,ref:n})})})});AL.displayName=EL;var RL="RadioGroupItem",IL=i.forwardRef((t,n)=>{const{__scopeRadioGroup:r,disabled:o,...a}=t,s=TL(RL,r),l=s.disabled||o,c=OL(r),u=DL(r),d=i.useRef(null),p=f(n,d),m=s.value===a.value,h=i.useRef(!1);return i.useEffect(()=>{const e=e=>{ML.includes(e.key)&&(h.current=!0)},t=()=>h.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}},[]),e.jsx(eD,{asChild:!0,...c,focusable:!l,active:m,children:e.jsx(kL,{disabled:l,required:s.required,checked:m,...u,...a,name:s.name,ref:p,onCheck:()=>s.onValueChange(a.value),onKeyDown:x(e=>{"Enter"===e.key&&e.preventDefault()}),onFocus:x(a.onFocus,()=>{h.current&&d.current?.click()})})})});IL.displayName=RL;var zL=i.forwardRef((t,n)=>{const{__scopeRadioGroup:r,...o}=t,a=DL(r);return e.jsx(SL,{...a,...o,ref:n})});zL.displayName="RadioGroupIndicator";var LL=AL,FL=IL,BL=zL;const $L="undefined"!=typeof window,WL=t.createContext(null);WL.displayName="PanelGroupContext";const HL="data-panel-group",UL="data-panel-group-direction",VL="data-panel-group-id",YL="data-panel",KL="data-panel-collapsible",qL="data-panel-id",GL="data-panel-size",XL="data-resize-handle",ZL="data-resize-handle-active",QL="data-panel-resize-handle-enabled",JL="data-panel-resize-handle-id",eF="data-resize-handle-state",tF=$L?t.useLayoutEffect:()=>{},nF=i["useId".toString()],rF="function"==typeof nF?nF:()=>null;let oF=0;function aF(e=null){const n=rF(),r=t.useRef(e||n||null);return null===r.current&&(r.current=""+oF++),null!=e?e:r.current}function iF({children:e,className:n="",collapsedSize:r,collapsible:o,defaultSize:a,forwardedRef:i,id:s,maxSize:l,minSize:c,onCollapse:u,onExpand:d,onResize:f,order:p,style:m,tagName:h="div",...g}){const v=t.useContext(WL);if(null===v)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:b,expandPanel:y,getPanelSize:x,getPanelStyle:w,groupId:k,isPanelCollapsed:C,reevaluatePanelConstraints:S,registerPanel:j,resizePanel:N,unregisterPanel:M}=v,E=aF(s),_=t.useRef({callbacks:{onCollapse:u,onExpand:d,onResize:f},constraints:{collapsedSize:r,collapsible:o,defaultSize:a,maxSize:l,minSize:c},id:E,idIsFromProps:void 0!==s,order:p});t.useRef({didLogMissingDefaultSizeWarning:!1}),tF(()=>{const{callbacks:e,constraints:t}=_.current,n={...t};_.current.id=E,_.current.idIsFromProps=void 0!==s,_.current.order=p,e.onCollapse=u,e.onExpand=d,e.onResize=f,t.collapsedSize=r,t.collapsible=o,t.defaultSize=a,t.maxSize=l,t.minSize=c,n.collapsedSize===t.collapsedSize&&n.collapsible===t.collapsible&&n.maxSize===t.maxSize&&n.minSize===t.minSize||S(_.current,n)}),tF(()=>{const e=_.current;return j(e),()=>{M(e)}},[p,E,j,M]),t.useImperativeHandle(i,()=>({collapse:()=>{b(_.current)},expand:e=>{y(_.current,e)},getId:()=>E,getSize:()=>x(_.current),isCollapsed:()=>C(_.current),isExpanded:()=>!C(_.current),resize:e=>{N(_.current,e)}}),[b,y,x,C,E,N]);const O=w(_.current,a);return t.createElement(h,{...g,children:e,className:n,id:E,style:{...O,...m},[VL]:k,[YL]:"",[KL]:o||void 0,[qL]:E,[GL]:parseFloat(""+O.flexGrow).toFixed(1)})}const sF=t.forwardRef((e,n)=>t.createElement(iF,{...e,forwardedRef:n}));iF.displayName="Panel",sF.displayName="forwardRef(Panel)";let lF=null,cF=-1,uF=null;function dF(e,t,n){var r,o;const a=function(e,t){const n=0!==(t&jF),r=0!==(t&NF);if(t){if(0!==(t&CF))return n?"se-resize":r?"ne-resize":"e-resize";if(0!==(t&SF))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(lF!==a){var i;if(lF=a,null===uF&&(uF=document.createElement("style"),document.head.appendChild(uF)),cF>=0)null===(i=uF.sheet)||void 0===i||i.removeRule(cF);cF=null!==(r=null===(o=uF.sheet)||void 0===o?void 0:o.insertRule(`*{cursor: ${a} !important;}`))&&void 0!==r?r:-1}}function fF(e){return"keydown"===e.type}function pF(e){return e.type.startsWith("pointer")}function mF(e){return e.type.startsWith("mouse")}function hF(e){if(pF(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(mF(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function gF(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 vF=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function bF(e){const t=getComputedStyle(e);return"fixed"===t.position||(!("auto"===t.zIndex||"static"===t.position&&!function(e){var t;const n=getComputedStyle(null!==(t=kF(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||(!!vF.test(t.willChange)||"touch"===t.webkitOverflowScrolling)))))))))}function yF(e){let t=e.length;for(;t--;){const n=e[t];if(HF(n,"Missing node"),bF(n))return n}return null}function xF(e){return e&&Number(getComputedStyle(e).zIndex)||0}function wF(e){const t=[];for(;e;)t.push(e),e=kF(e);return t}function kF(e){const{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}const CF=1,SF=2,jF=4,NF=8,MF="coarse"===function(){if("function"==typeof matchMedia)return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}();let EF=[],_F=!1,OF=new Map,DF=new Map;const PF=new Set;function TF(e){const{target:t}=e,{x:n,y:r}=hF(e);_F=!0,zF({target:t,x:n,y:r}),$F(),EF.length>0&&(WF("down",e),FF(),e.preventDefault(),IF(t)||e.stopImmediatePropagation())}function AF(e){const{x:t,y:n}=hF(e);if(_F&&"pointerleave"!==e.type&&0===e.buttons&&(_F=!1,WF("up",e)),!_F){const{target:r}=e;zF({target:r,x:t,y:n})}WF("move",e),FF(),EF.length>0&&e.preventDefault()}function RF(e){const{target:t}=e,{x:n,y:r}=hF(e);DF.clear(),_F=!1,EF.length>0&&(e.preventDefault(),IF(t)||e.stopImmediatePropagation()),WF("up",e),zF({target:t,x:n,y:r}),FF(),$F()}function IF(e){let t=e;for(;t;){if(t.hasAttribute(XL))return!0;t=t.parentElement}return!1}function zF({target:e,x:t,y:n}){EF.splice(0);let r=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(r=e),PF.forEach(e=>{const{element:o,hitAreaMargins:a}=e,i=o.getBoundingClientRect(),{bottom:s,left:l,right:c,top:u}=i,d=MF?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:wF(e),b:wF(t)};let r;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),r=e;HF(r,"Stacking order can only be calculated for elements with a common ancestor");const o=xF(yF(n.a)),a=xF(yF(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(gF(e.getBoundingClientRect(),i)){t=!0;break}e=e.parentElement}if(t)return}EF.push(e)}})}function LF(e,t){DF.set(e,t)}function FF(){let e=!1,t=!1;EF.forEach(n=>{const{direction:r}=n;"horizontal"===r?e=!0:t=!0});let n=0;DF.forEach(e=>{n|=e}),e&&t?dF("intersection",n):e?dF("horizontal",n):t?dF("vertical",n):null!==uF&&(document.head.removeChild(uF),lF=null,uF=null,cF=-1)}let BF;function $F(){var e;null===(e=BF)||void 0===e||e.abort(),BF=new AbortController;const t={capture:!0,signal:BF.signal};PF.size&&(_F?(EF.length>0&&OF.forEach((e,n)=>{const{body:r}=n;e>0&&(r.addEventListener("contextmenu",RF,t),r.addEventListener("pointerleave",AF,t),r.addEventListener("pointermove",AF,t))}),OF.forEach((e,n)=>{const{body:r}=n;r.addEventListener("pointerup",RF,t),r.addEventListener("pointercancel",RF,t)})):OF.forEach((e,n)=>{const{body:r}=n;e>0&&(r.addEventListener("pointerdown",TF,t),r.addEventListener("pointermove",AF,t))}))}function WF(e,t){PF.forEach(n=>{const{setResizeHandlerState:r}=n,o=EF.includes(n);r(e,o,t)})}function HF(e,t){if(!e)throw console.error(t),Error(t)}function UF(e,t,n=10){return e.toFixed(n)===t.toFixed(n)?0:e>t?1:-1}function VF(e,t,n=10){return 0===UF(e,t,n)}function YF(e,t,n){return 0===UF(e,t,n)}function KF({panelConstraints:e,panelIndex:t,size:n}){const r=e[t];HF(null!=r,`Panel constraints not found for index ${t}`);let{collapsedSize:o=0,collapsible:a,maxSize:i=100,minSize:s=0}=r;if(UF(n,s)<0)if(a){n=UF(n,(o+s)/2)<0?o:s}else n=s;return n=Math.min(i,n),n=parseFloat(n.toFixed(10))}function qF({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:o,trigger:a}){if(YF(e,0))return t;const i=[...t],[s,l]=r;HF(null!=s,"Invalid first pivot index"),HF(null!=l,"Invalid second pivot index");let c=0;if("keyboard"===a){{const r=e<0?l:s,o=n[r];HF(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(HF(null!=n,`Previous layout not found for panel index ${r}`),YF(n,a)){const t=c-n;UF(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}{const r=e<0?s:l,o=n[r];HF(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(HF(null!=n,`Previous layout not found for panel index ${r}`),YF(n,c)){const t=n-a;UF(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];HF(null!=e,`Previous layout not found for panel index ${o}`);if(a+=KF({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];HF(null!=a,`Previous layout not found for panel index ${r}`);const s=KF({panelConstraints:n,panelIndex:r,size:a-o});if(!YF(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(!YF(e[r],t[r],n))return!1;return!0}(o,i))return o;{const r=e<0?l:s,o=t[r];HF(null!=o,`Previous layout not found for panel index ${r}`);const a=o+c,u=KF({panelConstraints:n,panelIndex:r,size:a});if(i[r]=u,!YF(u,a)){let t=a-u;let r=e<0?l:s;for(;r>=0&&r<n.length;){const o=i[r];HF(null!=o,`Previous layout not found for panel index ${r}`);const a=KF({panelConstraints:n,panelIndex:r,size:o+t});if(YF(o,a)||(t-=a-o,i[r]=a),YF(t,0))break;e>0?r--:r++}}}const u=i.reduce((e,t)=>t+e,0);return YF(u,100)?i:o}function GF({layout:e,panelsArray:t,pivotIndices:n}){let r=0,o=100,a=0,i=0;const s=n[0];HF(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 XF(e,t=document){return Array.from(t.querySelectorAll(`[${JL}][data-panel-group-id="${e}"]`))}function ZF(e,t,n=document){const r=XF(e,n).findIndex(e=>e.getAttribute(JL)===t);return null!=r?r:null}function QF(e,t,n){const r=ZF(e,t,n);return null!=r?[r,r+1]:[-1,-1]}function JF(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 eB(e,t=document){const n=t.querySelector(`[${JL}="${e}"]`);return n||null}function tB({committedValuesRef:e,eagerValuesRef:n,groupId:r,layout:o,panelDataArray:a,panelGroupElement:i,setLayout:s}){t.useRef({didWarnAboutMissingResizeHandle:!1}),tF(()=>{if(!i)return;const e=XF(r,i);for(let t=0;t<a.length-1;t++){const{valueMax:n,valueMin:r,valueNow:i}=GF({layout:o,panelsArray:a,pivotIndices:[t,t+1]}),s=e[t];if(null==s);else{const e=a[t];HF(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(r)),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")})}},[r,o,a,i]),t.useEffect(()=>{if(!i)return;const e=n.current;HF(e,"Eager values not found");const{panelDataArray:t}=e;HF(null!=JF(r,i),`No group found for id "${r}"`);const a=XF(r,i);HF(a,`No resize handles found for group id "${r}"`);const l=a.map(e=>{const n=e.getAttribute(JL);HF(n,"Resize handle element has no handle id attribute");const[a,l]=function(e,t,n,r=document){var o,a,i,s;const l=eB(t,r),c=XF(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]}(r,n,t,i);if(null==a||null==l)return()=>{};const c=e=>{if(!e.defaultPrevented)switch(e.key){case"Enter":{e.preventDefault();const l=t.findIndex(e=>e.id===a);if(l>=0){const e=t[l];HF(e,`No panel data found for index ${l}`);const a=o[l],{collapsedSize:c=0,collapsible:u,minSize:d=0}=e.constraints;if(null!=a&&u){const e=qF({delta:YF(a,c)?d-c:c-a,initialLayout:o,panelConstraints:t.map(e=>e.constraints),pivotIndices:QF(r,n,i),prevLayout:o,trigger:"keyboard"});o!==e&&s(e)}}break}}};return e.addEventListener("keydown",c),()=>{e.removeEventListener("keydown",c)}});return()=>{l.forEach(e=>e())}},[i,e,n,r,o,a,s])}function nB(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 rB(e,t){const n="horizontal"===e,{x:r,y:o}=hF(t);return n?r:o}function oB(e,t,n,r,o,a){if(fF(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=eB(t,o);HF(i,`No resize handle element found for id "${t}"`);const s=i.getAttribute(VL);HF(s,"Resize handle element has no group id attribute");let{initialCursorPosition:l}=r;const c=rB(n,e),u=JF(s,o);HF(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 aB(e,t,n){t.forEach((t,r)=>{const o=e[r];HF(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&&!VF(u,l)||VF(t,l)||r(),!e||null!=u&&VF(u,l)||!VF(t,l)||e())}})}function iB(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 sB(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 lB(e){return`react-resizable-panels:${e}`}function cB(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 uB(e,t){try{const n=lB(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 dB(e,t,n,r,o){var a;const i=lB(e),s=cB(t),l=null!==(a=uB(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 fB({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(!YF(r,100)&&n.length>0)for(let e=0;e<t.length;e++){const t=n[e];HF(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];HF(null!=r,`No layout data found for index ${e}`);const a=KF({panelConstraints:t,panelIndex:e,size:r});r!=a&&(o+=r-a,n[e]=a)}if(!YF(o,0))for(let e=0;e<t.length;e++){const r=n[e];HF(null!=r,`No layout data found for index ${e}`);const a=KF({panelConstraints:t,panelIndex:e,size:r+o});if(r!==a&&(o-=a-r,n[e]=a,YF(o,0)))break}return n}const pB={getItem:e=>(sB(pB),pB.getItem(e)),setItem:(e,t)=>{sB(pB),pB.setItem(e,t)}},mB={};function hB({autoSaveId:e=null,children:n,className:r="",direction:o,forwardedRef:a,id:i=null,onLayout:s=null,keyboardResizeBy:l=null,storage:c=pB,style:u,tagName:d="div",...f}){const p=aF(i),m=t.useRef(null),[h,g]=t.useState(null),[v,b]=t.useState([]),y=function(){const[e,n]=t.useState(0);return t.useCallback(()=>n(e=>e+1),[])}(),x=t.useRef({}),w=t.useRef(new Map),k=t.useRef(0),C=t.useRef({autoSaveId:e,direction:o,dragState:h,id:p,keyboardResizeBy:l,onLayout:s,storage:c}),S=t.useRef({layout:v,panelDataArray:[],panelDataArrayChanged:!1});t.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),t.useImperativeHandle(a,()=>({getId:()=>C.current.id,getLayout:()=>{const{layout:e}=S.current;return e},setLayout:e=>{const{onLayout:t}=C.current,{layout:n,panelDataArray:r}=S.current,o=fB({layout:e,panelConstraints:r.map(e=>e.constraints)});nB(n,o)||(b(o),S.current.layout=o,t&&t(o),aB(r,o,x.current))}}),[]),tF(()=>{C.current.autoSaveId=e,C.current.direction=o,C.current.dragState=h,C.current.id=p,C.current.onLayout=s,C.current.storage=c}),tB({committedValuesRef:C,eagerValuesRef:S,groupId:p,layout:v,panelDataArray:S.current.panelDataArray,setLayout:b,panelGroupElement:m.current}),t.useEffect(()=>{const{panelDataArray:t}=S.current;if(e){if(0===v.length||v.length!==t.length)return;let n=mB[e];null==n&&(n=function(e,t=10){let n=null;return(...r)=>{null!==n&&clearTimeout(n),n=setTimeout(()=>{e(...r)},t)}}(dB,100),mB[e]=n);const r=[...t],o=new Map(w.current);n(e,r,o,v,c)}},[e,v,c]),t.useEffect(()=>{});const j=t.useCallback(e=>{const{onLayout:t}=C.current,{layout:n,panelDataArray:r}=S.current;if(e.constraints.collapsible){const o=r.map(e=>e.constraints),{collapsedSize:a=0,panelSize:i,pivotIndices:s}=bB(r,e,n);if(HF(null!=i,`Panel size not found for panel "${e.id}"`),!VF(i,a)){w.current.set(e.id,i);const l=qF({delta:vB(r,e)===r.length-1?i-a:a-i,initialLayout:n,panelConstraints:o,pivotIndices:s,prevLayout:n,trigger:"imperative-api"});iB(n,l)||(b(l),S.current.layout=l,t&&t(l),aB(r,l,x.current))}}},[]),N=t.useCallback((e,t)=>{const{onLayout:n}=C.current,{layout:r,panelDataArray:o}=S.current;if(e.constraints.collapsible){const a=o.map(e=>e.constraints),{collapsedSize:i=0,panelSize:s=0,minSize:l=0,pivotIndices:c}=bB(o,e,r),u=null!=t?t:l;if(VF(s,i)){const t=w.current.get(e.id),i=null!=t&&t>=u?t:u,l=qF({delta:vB(o,e)===o.length-1?s-i:i-s,initialLayout:r,panelConstraints:a,pivotIndices:c,prevLayout:r,trigger:"imperative-api"});iB(r,l)||(b(l),S.current.layout=l,n&&n(l),aB(o,l,x.current))}}},[]),M=t.useCallback(e=>{const{layout:t,panelDataArray:n}=S.current,{panelSize:r}=bB(n,e,t);return HF(null!=r,`Panel size not found for panel "${e.id}"`),r},[]),E=t.useCallback((e,t)=>{const{panelDataArray:n}=S.current,r=vB(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:h,layout:v,panelData:n,panelIndex:r})},[h,v]),_=t.useCallback(e=>{const{layout:t,panelDataArray:n}=S.current,{collapsedSize:r=0,collapsible:o,panelSize:a}=bB(n,e,t);return HF(null!=a,`Panel size not found for panel "${e.id}"`),!0===o&&VF(a,r)},[]),O=t.useCallback(e=>{const{layout:t,panelDataArray:n}=S.current,{collapsedSize:r=0,collapsible:o,panelSize:a}=bB(n,e,t);return HF(null!=a,`Panel size not found for panel "${e.id}"`),!o||UF(a,r)>0},[]),D=t.useCallback(e=>{const{panelDataArray:t}=S.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}),S.current.panelDataArrayChanged=!0,y()},[y]);tF(()=>{if(S.current.panelDataArrayChanged){S.current.panelDataArrayChanged=!1;const{autoSaveId:e,onLayout:t,storage:n}=C.current,{layout:r,panelDataArray:o}=S.current;let a=null;if(e){const t=function(e,t,n){var r,o;return null!==(o=(null!==(r=uB(e,n))&&void 0!==r?r:{})[cB(t)])&&void 0!==o?o:null}(e,o,n);t&&(w.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];HF(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];HF(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=fB({layout:a,panelConstraints:o.map(e=>e.constraints)});nB(r,i)||(b(i),S.current.layout=i,t&&t(i),aB(o,i,x.current))}}),tF(()=>{const e=S.current;return()=>{e.layout=[]}},[]);const P=t.useCallback(e=>{let t=!1;const n=m.current;if(n){"rtl"===window.getComputedStyle(n,null).getPropertyValue("direction")&&(t=!0)}return function(n){n.preventDefault();const r=m.current;if(!r)return()=>null;const{direction:o,dragState:a,id:i,keyboardResizeBy:s,onLayout:l}=C.current,{layout:c,panelDataArray:u}=S.current,{initialLayout:d}=null!=a?a:{},f=QF(i,e,r);let p=oB(n,e,o,a,s,r);const h="horizontal"===o;h&&t&&(p=-p);const g=qF({delta:p,initialLayout:null!=d?d:c,panelConstraints:u.map(e=>e.constraints),pivotIndices:f,prevLayout:c,trigger:fF(n)?"keyboard":"mouse-or-touch"}),v=!iB(c,g);(pF(n)||mF(n))&&k.current!=p&&(k.current=p,LF(e,v||0===p?0:h?p<0?CF:SF:p<0?jF:NF)),v&&(b(g),S.current.layout=g,l&&l(g),aB(u,g,x.current))}},[]),T=t.useCallback((e,t)=>{const{onLayout:n}=C.current,{layout:r,panelDataArray:o}=S.current,a=o.map(e=>e.constraints),{panelSize:i,pivotIndices:s}=bB(o,e,r);HF(null!=i,`Panel size not found for panel "${e.id}"`);const l=qF({delta:vB(o,e)===o.length-1?i-t:t-i,initialLayout:r,panelConstraints:a,pivotIndices:s,prevLayout:r,trigger:"imperative-api"});iB(r,l)||(b(l),S.current.layout=l,n&&n(l),aB(o,l,x.current))},[]),A=t.useCallback((e,t)=>{const{layout:n,panelDataArray:r}=S.current,{collapsedSize:o=0,collapsible:a}=t,{collapsedSize:i=0,collapsible:s,maxSize:l=100,minSize:c=0}=e.constraints,{panelSize:u}=bB(r,e,n);null!=u&&(a&&s&&VF(u,o)?VF(o,i)||T(e,i):u<c?T(e,c):u>l&&T(e,l))},[T]),R=t.useCallback((e,t)=>{const{direction:n}=C.current,{layout:r}=S.current;if(!m.current)return;const o=eB(e,m.current);HF(o,`Drag handle element not found for id "${e}"`);const a=rB(n,t);g({dragHandleId:e,dragHandleRect:o.getBoundingClientRect(),initialCursorPosition:a,initialLayout:r})},[]),I=t.useCallback(()=>{g(null)},[]),z=t.useCallback(e=>{const{panelDataArray:t}=S.current,n=vB(t,e);n>=0&&(t.splice(n,1),delete x.current[e.id],S.current.panelDataArrayChanged=!0,y())},[y]),L=t.useMemo(()=>({collapsePanel:j,direction:o,dragState:h,expandPanel:N,getPanelSize:M,getPanelStyle:E,groupId:p,isPanelCollapsed:_,isPanelExpanded:O,reevaluatePanelConstraints:A,registerPanel:D,registerResizeHandle:P,resizePanel:T,startDragging:R,stopDragging:I,unregisterPanel:z,panelGroupElement:m.current}),[j,h,o,N,M,E,p,_,O,A,D,P,T,R,I,z]),F={display:"flex",flexDirection:"horizontal"===o?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return t.createElement(WL.Provider,{value:L},t.createElement(d,{...f,children:n,className:r,id:i,ref:m,style:{...F,...u},[HL]:"",[UL]:o,[VL]:p}))}const gB=t.forwardRef((e,n)=>t.createElement(hB,{...e,forwardedRef:n}));function vB(e,t){return e.findIndex(e=>e===t||e.id===t.id)}function bB(e,t,n){const r=vB(e,t),o=r===e.length-1?[r-1,r]:[r,r+1],a=n[r];return{...t.constraints,panelSize:a,pivotIndices:o}}function yB({children:e=null,className:n="",disabled:r=!1,hitAreaMargins:o,id:a,onBlur:i,onClick:s,onDragging:l,onFocus:c,onPointerDown:u,onPointerUp:d,style:f={},tabIndex:p=0,tagName:m="div",...h}){var g,v;const b=t.useRef(null),y=t.useRef({onClick:s,onDragging:l,onPointerDown:u,onPointerUp:d});t.useEffect(()=>{y.current.onClick=s,y.current.onDragging=l,y.current.onPointerDown=u,y.current.onPointerUp=d});const x=t.useContext(WL);if(null===x)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:w,groupId:k,registerResizeHandle:C,startDragging:S,stopDragging:j,panelGroupElement:N}=x,M=aF(a),[E,_]=t.useState("inactive"),[O,D]=t.useState(!1),[P,T]=t.useState(null),A=t.useRef({state:E});tF(()=>{A.current.state=E}),t.useEffect(()=>{if(r)T(null);else{const e=C(M);T(()=>e)}},[r,M,C]);const R=null!==(g=null==o?void 0:o.coarse)&&void 0!==g?g:15,I=null!==(v=null==o?void 0:o.fine)&&void 0!==v?v:5;t.useEffect(()=>{if(r||null==P)return;const e=b.current;HF(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=OF.get(i))&&void 0!==a?a:0;return OF.set(i,l+1),PF.add(s),$F(),function(){var t;DF.delete(e),PF.delete(s);const n=null!==(t=OF.get(i))&&void 0!==t?t:1;if(OF.set(i,n-1),$F(),1===n&&OF.delete(i),EF.includes(s)){const e=EF.indexOf(s);e>=0&&EF.splice(e,1),FF(),o("up",!0,null)}}}(M,e,w,{coarse:R,fine:I},(e,n,r)=>{if(n)switch(e){case"down":{_("drag"),t=!1,HF(r,'Expected event to be defined for "down" action'),S(M,r);const{onDragging:e,onPointerDown:n}=y.current;null==e||e(!0),null==n||n();break}case"move":{const{state:e}=A.current;t=!0,"drag"!==e&&_("hover"),HF(r,'Expected event to be defined for "move" action'),P(r);break}case"up":{_("hover"),j();const{onClick:e,onDragging:n,onPointerUp:r}=y.current;null==n||n(!1),null==r||r(),t||null==e||e();break}}else _("inactive")})},[R,w,r,I,C,M,P,S,j]),function({disabled:e,handleId:n,resizeHandler:r,panelGroupElement:o}){t.useEffect(()=>{if(e||null==r||null==o)return;const t=eB(n,o);if(null==t)return;const a=e=>{if(!e.defaultPrevented)switch(e.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":e.preventDefault(),r(e);break;case"F6":{e.preventDefault();const r=t.getAttribute(VL);HF(r,`No group element found for id "${r}"`);const a=XF(r,o),i=ZF(r,n,o);HF(null!==i,`No resize element found for id "${n}"`),a[e.shiftKey?i>0?i-1:a.length-1:i+1<a.length?i+1:0].focus();break}}};return t.addEventListener("keydown",a),()=>{t.removeEventListener("keydown",a)}},[o,e,n,r])}({disabled:r,handleId:M,resizeHandler:P,panelGroupElement:N});return t.createElement(m,{...h,children:e,className:n,id:a,onBlur:()=>{D(!1),null==i||i()},onFocus:()=>{D(!0),null==c||c()},ref:b,role:"separator",style:{touchAction:"none",userSelect:"none",...f},tabIndex:p,[UL]:w,[VL]:k,[XL]:"",[ZL]:"drag"===E?"pointer":O?"keyboard":void 0,[QL]:!r,[JL]:M,[eF]:E})}function xB(e,[t,n]){return Math.min(n,Math.max(t,e))}hB.displayName="PanelGroup",gB.displayName="forwardRef(PanelGroup)",yB.displayName="PanelResizeHandle";var wB="ScrollArea",[kB]=l(wB),[CB,SB]=kB(wB),jB=i.forwardRef((t,n)=>{const{__scopeScrollArea:r,type:o="hover",dir:a,scrollHideDelay:s=600,...l}=t,[c,u]=i.useState(null),[d,p]=i.useState(null),[m,h]=i.useState(null),[g,v]=i.useState(null),[b,y]=i.useState(null),[x,w]=i.useState(0),[k,C]=i.useState(0),[j,N]=i.useState(!1),[M,E]=i.useState(!1),_=f(n,e=>u(e)),O=K(a);return e.jsx(CB,{scope:r,type:o,dir:O,scrollHideDelay:s,scrollArea:c,viewport:d,onViewportChange:p,content:m,onContentChange:h,scrollbarX:g,onScrollbarXChange:v,scrollbarXEnabled:j,onScrollbarXEnabledChange:N,scrollbarY:b,onScrollbarYChange:y,scrollbarYEnabled:M,onScrollbarYEnabledChange:E,onCornerWidthChange:w,onCornerHeightChange:C,children:e.jsx(S.div,{dir:O,...l,ref:_,style:{position:"relative","--radix-scroll-area-corner-width":x+"px","--radix-scroll-area-corner-height":k+"px",...t.style}})})});jB.displayName=wB;var NB="ScrollAreaViewport",MB=i.forwardRef((t,n)=>{const{__scopeScrollArea:r,children:o,nonce:a,...s}=t,l=SB(NB,r),c=f(n,i.useRef(null),l.onViewportChange);return e.jsxs(e.Fragment,{children:[e.jsx("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:a}),e.jsx(S.div,{"data-radix-scroll-area-viewport":"",...s,ref:c,style:{overflowX:l.scrollbarXEnabled?"scroll":"hidden",overflowY:l.scrollbarYEnabled?"scroll":"hidden",...t.style},children:e.jsx("div",{ref:l.onContentChange,style:{minWidth:"100%",display:"table"},children:o})})]})});MB.displayName=NB;var EB="ScrollAreaScrollbar",_B=i.forwardRef((t,n)=>{const{forceMount:r,...o}=t,a=SB(EB,t.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:l}=a,c="horizontal"===t.orientation;return i.useEffect(()=>(c?s(!0):l(!0),()=>{c?s(!1):l(!1)}),[c,s,l]),"hover"===a.type?e.jsx(OB,{...o,ref:n,forceMount:r}):"scroll"===a.type?e.jsx(DB,{...o,ref:n,forceMount:r}):"auto"===a.type?e.jsx(PB,{...o,ref:n,forceMount:r}):"always"===a.type?e.jsx(TB,{...o,ref:n}):null});_B.displayName=EB;var OB=i.forwardRef((t,n)=>{const{forceMount:r,...o}=t,a=SB(EB,t.__scopeScrollArea),[s,l]=i.useState(!1);return i.useEffect(()=>{const e=a.scrollArea;let t=0;if(e){const n=()=>{window.clearTimeout(t),l(!0)},r=()=>{t=window.setTimeout(()=>l(!1),a.scrollHideDelay)};return e.addEventListener("pointerenter",n),e.addEventListener("pointerleave",r),()=>{window.clearTimeout(t),e.removeEventListener("pointerenter",n),e.removeEventListener("pointerleave",r)}}},[a.scrollArea,a.scrollHideDelay]),e.jsx(N,{present:r||s,children:e.jsx(PB,{"data-state":s?"visible":"hidden",...o,ref:n})})}),DB=i.forwardRef((t,n)=>{const{forceMount:r,...o}=t,a=SB(EB,t.__scopeScrollArea),s="horizontal"===t.orientation,l=QB(()=>u("SCROLL_END"),100),[c,u]=function(e,t){return i.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 i.useEffect(()=>{if("idle"===c){const e=window.setTimeout(()=>u("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(e)}},[c,a.scrollHideDelay,u]),i.useEffect(()=>{const e=a.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)}},[a.viewport,s,u,l]),e.jsx(N,{present:r||"hidden"!==c,children:e.jsx(TB,{"data-state":"hidden"===c?"hidden":"visible",...o,ref:n,onPointerEnter:x(t.onPointerEnter,()=>u("POINTER_ENTER")),onPointerLeave:x(t.onPointerLeave,()=>u("POINTER_LEAVE"))})})}),PB=i.forwardRef((t,n)=>{const r=SB(EB,t.__scopeScrollArea),{forceMount:o,...a}=t,[s,l]=i.useState(!1),c="horizontal"===t.orientation,u=QB(()=>{if(r.viewport){const e=r.viewport.offsetWidth<r.viewport.scrollWidth,t=r.viewport.offsetHeight<r.viewport.scrollHeight;l(c?e:t)}},10);return JB(r.viewport,u),JB(r.content,u),e.jsx(N,{present:o||s,children:e.jsx(TB,{"data-state":s?"visible":"hidden",...a,ref:n})})}),TB=i.forwardRef((t,n)=>{const{orientation:r="vertical",...o}=t,a=SB(EB,t.__scopeScrollArea),s=i.useRef(null),l=i.useRef(0),[c,u]=i.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=YB(c.viewport,c.content),f={...o,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=KB(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=GB([l,c],d);return f(e)}(e,l.current,c,t)}return"horizontal"===r?e.jsx(AB,{...f,ref:n,onThumbPositionChange:()=>{if(a.viewport&&s.current){const e=qB(a.viewport.scrollLeft,c,a.dir);s.current.style.transform=`translate3d(${e}px, 0, 0)`}},onWheelScroll:e=>{a.viewport&&(a.viewport.scrollLeft=e)},onDragScroll:e=>{a.viewport&&(a.viewport.scrollLeft=p(e,a.dir))}}):"vertical"===r?e.jsx(RB,{...f,ref:n,onThumbPositionChange:()=>{if(a.viewport&&s.current){const e=qB(a.viewport.scrollTop,c);s.current.style.transform=`translate3d(0, ${e}px, 0)`}},onWheelScroll:e=>{a.viewport&&(a.viewport.scrollTop=e)},onDragScroll:e=>{a.viewport&&(a.viewport.scrollTop=p(e))}}):null}),AB=i.forwardRef((t,n)=>{const{sizes:r,onSizesChange:o,...a}=t,s=SB(EB,t.__scopeScrollArea),[l,c]=i.useState(),u=i.useRef(null),d=f(n,u,s.onScrollbarXChange);return i.useEffect(()=>{u.current&&c(getComputedStyle(u.current))},[u]),e.jsx(LB,{"data-orientation":"horizontal",...a,ref:d,sizes:r,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":KB(r)+"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),XB(r,n)&&e.preventDefault()}},onResize:()=>{u.current&&s.viewport&&l&&o({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:u.current.clientWidth,paddingStart:VB(l.paddingLeft),paddingEnd:VB(l.paddingRight)}})}})}),RB=i.forwardRef((t,n)=>{const{sizes:r,onSizesChange:o,...a}=t,s=SB(EB,t.__scopeScrollArea),[l,c]=i.useState(),u=i.useRef(null),d=f(n,u,s.onScrollbarYChange);return i.useEffect(()=>{u.current&&c(getComputedStyle(u.current))},[u]),e.jsx(LB,{"data-orientation":"vertical",...a,ref:d,sizes:r,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":KB(r)+"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),XB(r,n)&&e.preventDefault()}},onResize:()=>{u.current&&s.viewport&&l&&o({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:u.current.clientHeight,paddingStart:VB(l.paddingTop),paddingEnd:VB(l.paddingBottom)}})}})}),[IB,zB]=kB(EB),LB=i.forwardRef((t,n)=>{const{__scopeScrollArea:r,sizes:o,hasThumb:a,onThumbChange:s,onThumbPointerUp:l,onThumbPointerDown:c,onThumbPositionChange:u,onDragScroll:d,onWheelScroll:p,onResize:m,...h}=t,g=SB(EB,r),[v,b]=i.useState(null),y=f(n,e=>b(e)),w=i.useRef(null),k=i.useRef(""),C=g.viewport,j=o.content-o.viewport,N=Bt(p),M=Bt(u),E=QB(m,10);function _(e){if(w.current){const t=e.clientX-w.current.left,n=e.clientY-w.current.top;d({x:t,y:n})}}return i.useEffect(()=>{const e=e=>{const t=e.target,n=v?.contains(t);n&&N(e,j)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})},[C,v,j,N]),i.useEffect(M,[o,M]),JB(v,E),JB(g.content,E),e.jsx(IB,{scope:r,scrollbar:v,hasThumb:a,onThumbChange:Bt(s),onThumbPointerUp:Bt(l),onThumbPositionChange:M,onThumbPointerDown:Bt(c),children:e.jsx(S.div,{...h,ref:y,style:{position:"absolute",...h.style},onPointerDown:x(t.onPointerDown,e=>{if(0===e.button){e.target.setPointerCapture(e.pointerId),w.current=v.getBoundingClientRect(),k.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",g.viewport&&(g.viewport.style.scrollBehavior="auto"),_(e)}}),onPointerMove:x(t.onPointerMove,_),onPointerUp:x(t.onPointerUp,e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=k.current,g.viewport&&(g.viewport.style.scrollBehavior=""),w.current=null})})})}),FB="ScrollAreaThumb",BB=i.forwardRef((t,n)=>{const{forceMount:r,...o}=t,a=zB(FB,t.__scopeScrollArea);return e.jsx(N,{present:r||a.hasThumb,children:e.jsx($B,{ref:n,...o})})}),$B=i.forwardRef((t,n)=>{const{__scopeScrollArea:r,style:o,...a}=t,s=SB(FB,r),l=zB(FB,r),{onThumbPositionChange:c}=l,u=f(n,e=>l.onThumbChange(e)),d=i.useRef(void 0),p=QB(()=>{d.current&&(d.current(),d.current=void 0)},100);return i.useEffect(()=>{const e=s.viewport;if(e){const t=()=>{if(p(),!d.current){const t=ZB(e,c);d.current=t,c()}};return c(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}},[s.viewport,p,c]),e.jsx(S.div,{"data-state":l.hasThumb?"visible":"hidden",...a,ref:u,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...o},onPointerDownCapture:x(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:x(t.onPointerUp,l.onThumbPointerUp)})});BB.displayName=FB;var WB="ScrollAreaCorner",HB=i.forwardRef((t,n)=>{const r=SB(WB,t.__scopeScrollArea),o=Boolean(r.scrollbarX&&r.scrollbarY);return"scroll"!==r.type&&o?e.jsx(UB,{...t,ref:n}):null});HB.displayName=WB;var UB=i.forwardRef((t,n)=>{const{__scopeScrollArea:r,...o}=t,a=SB(WB,r),[s,l]=i.useState(0),[c,u]=i.useState(0),d=Boolean(s&&c);return JB(a.scrollbarX,()=>{const e=a.scrollbarX?.offsetHeight||0;a.onCornerHeightChange(e),u(e)}),JB(a.scrollbarY,()=>{const e=a.scrollbarY?.offsetWidth||0;a.onCornerWidthChange(e),l(e)}),d?e.jsx(S.div,{...o,ref:n,style:{width:s,height:c,position:"absolute",right:"ltr"===a.dir?0:void 0,left:"rtl"===a.dir?0:void 0,bottom:0,...t.style}}):null});function VB(e){return e?parseInt(e,10):0}function YB(e,t){const n=e/t;return isNaN(n)?0:n}function KB(e){const t=YB(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function qB(e,t,n="ltr"){const r=KB(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-o,i=t.content-t.viewport,s=a-r,l=xB(e,"ltr"===n?[0,i]:[-1*i,0]);return GB([0,i],[0,s])(l)}function GB(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 XB(e,t){return e>0&&e<t}var ZB=(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 QB(e,t){const n=Bt(e),r=i.useRef(0);return i.useEffect(()=>()=>window.clearTimeout(r.current),[]),i.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function JB(e,t){const n=Bt(t);w(()=>{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 e$=jB,t$=MB,n$=HB;function r$({className:t,orientation:n="vertical",...r}){return e.jsx(_B,{"data-slot":"scroll-area-scrollbar",orientation:n,className:Rt("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.jsx(BB,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}var o$=[" ","Enter","ArrowUp","ArrowDown"],a$=[" ","Enter"],i$="Select",[s$,l$,c$]=y(i$),[u$]=l(i$,[c$,vO]),d$=vO(),[f$,p$]=u$(i$),[m$,h$]=u$(i$),g$=t=>{const{__scopeSelect:n,children:r,open:o,defaultOpen:a,onOpenChange:s,value:l,defaultValue:c,onValueChange:u,dir:d,name:f,autoComplete:p,disabled:m,required:h,form:g}=t,v=d$(n),[b,y]=i.useState(null),[x,w]=i.useState(null),[k,S]=i.useState(!1),j=K(d),[N,M]=C({prop:o,defaultProp:a??!1,onChange:s,caller:i$}),[E,_]=C({prop:l,defaultProp:c,onChange:u,caller:i$}),D=i.useRef(null),P=!b||(g||!!b.closest("form")),[T,A]=i.useState(new Set),R=Array.from(T).map(e=>e.props.value).join(";");return e.jsx(TO,{...v,children:e.jsxs(f$,{required:h,scope:n,trigger:b,onTriggerChange:y,valueNode:x,onValueNodeChange:w,valueNodeHasChildren:k,onValueNodeHasChildrenChange:S,contentId:O(),value:E,onValueChange:_,open:N,onOpenChange:M,dir:j,triggerPointerDownPosRef:D,disabled:m,children:[e.jsx(s$.Provider,{scope:n,children:e.jsx(m$,{scope:t.__scopeSelect,onNativeOptionAdd:i.useCallback(e=>{A(t=>new Set(t).add(e))},[]),onNativeOptionRemove:i.useCallback(e=>{A(t=>{const n=new Set(t);return n.delete(e),n})},[]),children:r})}),P?e.jsxs(oW,{"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:p,value:E,onChange:e=>_(e.target.value),disabled:m,form:g,children:[void 0===E?e.jsx("option",{value:""}):null,Array.from(T)]},R):null]})})};g$.displayName=i$;var v$="SelectTrigger",b$=i.forwardRef((t,n)=>{const{__scopeSelect:r,disabled:o=!1,...a}=t,s=d$(r),l=p$(v$,r),c=l.disabled||o,u=f(n,l.onTriggerChange),d=l$(r),p=i.useRef("touch"),[m,h,g]=iW(e=>{const t=d().filter(e=>!e.disabled),n=t.find(e=>e.value===l.value),r=sW(t,e,n);void 0!==r&&l.onValueChange(r.value)}),v=e=>{c||(l.onOpenChange(!0),g()),e&&(l.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return e.jsx(AO,{asChild:!0,...s,children:e.jsx(S.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":aW(l.value)?"":void 0,...a,ref:u,onClick:x(a.onClick,e=>{e.currentTarget.focus(),"mouse"!==p.current&&v(e)}),onPointerDown:x(a.onPointerDown,e=>{p.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(v(e),e.preventDefault())}),onKeyDown:x(a.onKeyDown,e=>{const t=""!==m.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||h(e.key),t&&" "===e.key||o$.includes(e.key)&&(v(),e.preventDefault())})})})});b$.displayName=v$;var y$="SelectValue",x$=i.forwardRef((t,n)=>{const{__scopeSelect:r,className:o,style:a,children:i,placeholder:s="",...l}=t,c=p$(y$,r),{onValueNodeHasChildrenChange:u}=c,d=void 0!==i,p=f(n,c.onValueNodeChange);return w(()=>{u(d)},[u,d]),e.jsx(S.span,{...l,ref:p,style:{pointerEvents:"none"},children:aW(c.value)?e.jsx(e.Fragment,{children:s}):i})});x$.displayName=y$;var w$=i.forwardRef((t,n)=>{const{__scopeSelect:r,children:o,...a}=t;return e.jsx(S.span,{"aria-hidden":!0,...a,ref:n,children:o||"▼"})});w$.displayName="SelectIcon";var k$=t=>e.jsx(sn,{asChild:!0,...t});k$.displayName="SelectPortal";var C$="SelectContent",S$=i.forwardRef((t,n)=>{const r=p$(C$,t.__scopeSelect),[o,a]=i.useState();if(w(()=>{a(new DocumentFragment)},[]),!r.open){const n=o;return n?s.createPortal(e.jsx(N$,{scope:t.__scopeSelect,children:e.jsx(s$.Slot,{scope:t.__scopeSelect,children:e.jsx("div",{children:t.children})})}),n):null}return e.jsx(_$,{...t,ref:n})});S$.displayName=C$;var j$=10,[N$,M$]=u$(C$),E$=p("SelectContent.RemoveScroll"),_$=i.forwardRef((t,n)=>{const{__scopeSelect:r,position:o="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:s,onPointerDownOutside:l,side:c,sideOffset:u,align:d,alignOffset:p,arrowPadding:m,collisionBoundary:h,collisionPadding:g,sticky:v,hideWhenDetached:b,avoidCollisions:y,...w}=t,k=p$(C$,r),[C,S]=i.useState(null),[j,N]=i.useState(null),M=f(n,e=>S(e)),[E,_]=i.useState(null),[O,D]=i.useState(null),P=l$(r),[T,A]=i.useState(!1),R=i.useRef(!1);i.useEffect(()=>{if(C)return or(C)},[C]),cn();const I=i.useCallback(e=>{const[t,...n]=P().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&&j&&(j.scrollTop=0),n===r&&j&&(j.scrollTop=j.scrollHeight),n?.focus(),document.activeElement!==o)return}},[P,j]),z=i.useCallback(()=>I([E,C]),[I,E,C]);i.useEffect(()=>{T&&z()},[T,z]);const{onOpenChange:L,triggerPointerDownPosRef:F}=k;i.useEffect(()=>{if(C){let e={x:0,y:0};const t=t=>{e={x:Math.abs(Math.round(t.pageX)-(F.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(F.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():C.contains(n.target)||L(!1),document.removeEventListener("pointermove",t),F.current=null};return null!==F.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[C,L,F]),i.useEffect(()=>{const e=()=>L(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[L]);const[B,$]=iW(e=>{const t=P().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),r=sW(t,e,n);r&&setTimeout(()=>r.ref.current.focus())}),W=i.useCallback((e,t,n)=>{const r=!R.current&&!n;(void 0!==k.value&&k.value===t||r)&&(_(e),r&&(R.current=!0))},[k.value]),H=i.useCallback(()=>C?.focus(),[C]),U=i.useCallback((e,t,n)=>{const r=!R.current&&!n;(void 0!==k.value&&k.value===t||r)&&D(e)},[k.value]),V="popper"===o?D$:O$,Y=V===D$?{side:c,sideOffset:u,align:d,alignOffset:p,arrowPadding:m,collisionBoundary:h,collisionPadding:g,sticky:v,hideWhenDetached:b,avoidCollisions:y}:{};return e.jsx(N$,{scope:r,content:C,viewport:j,onViewportChange:N,itemRefCallback:W,selectedItem:E,onItemLeave:H,itemTextRefCallback:U,focusSelectedItem:z,selectedItemText:O,position:o,isPositioned:T,searchRef:B,children:e.jsx(Zn,{as:E$,allowPinchZoom:!0,children:e.jsx(Jt,{asChild:!0,trapped:k.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:x(a,e=>{k.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:e.jsx(Yt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>k.onOpenChange(!1),children:e.jsx(V,{role:"listbox",id:k.contentId,"data-state":k.open?"open":"closed",dir:k.dir,onContextMenu:e=>e.preventDefault(),...w,...Y,onPlaced:()=>A(!0),ref:M,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:x(w.onKeyDown,e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||$(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=P().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(()=>I(t)),e.preventDefault()}})})})})})})});_$.displayName="SelectContentImpl";var O$=i.forwardRef((t,n)=>{const{__scopeSelect:r,onPlaced:o,...a}=t,s=p$(C$,r),l=M$(C$,r),[c,u]=i.useState(null),[d,p]=i.useState(null),m=f(n,e=>p(e)),h=l$(r),g=i.useRef(!1),v=i.useRef(!0),{viewport:b,selectedItem:y,selectedItemText:x,focusSelectedItem:k}=l,C=i.useCallback(()=>{if(s.trigger&&s.valueNode&&c&&d&&b&&y&&x){const e=s.trigger.getBoundingClientRect(),t=d.getBoundingClientRect(),n=s.valueNode.getBoundingClientRect(),r=x.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-j$,d=xB(a,[j$,Math.max(j$,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-j$,d=xB(a,[j$,Math.max(j$,u-l)]);c.style.minWidth=s+"px",c.style.right=d+"px"}const a=h(),i=window.innerHeight-2*j$,l=b.scrollHeight,u=window.getComputedStyle(d),f=parseInt(u.borderTopWidth,10),p=parseInt(u.paddingTop,10),m=parseInt(u.borderBottomWidth,10),v=f+p+l+parseInt(u.paddingBottom,10)+m,w=Math.min(5*y.offsetHeight,v),k=window.getComputedStyle(b),C=parseInt(k.paddingTop,10),S=parseInt(k.paddingBottom,10),j=e.top+e.height/2-j$,N=i-j,M=y.offsetHeight/2,E=f+p+(y.offsetTop+M),_=v-E;if(E<=j){const e=a.length>0&&y===a[a.length-1].ref.current;c.style.bottom="0px";const t=d.clientHeight-b.offsetTop-b.offsetHeight,n=E+Math.max(N,M+(e?S:0)+t+m);c.style.height=n+"px"}else{const e=a.length>0&&y===a[0].ref.current;c.style.top="0px";const t=Math.max(j,f+b.offsetTop+(e?C:0)+M)+_;c.style.height=t+"px",b.scrollTop=E-j+b.offsetTop}c.style.margin=`${j$}px 0`,c.style.minHeight=w+"px",c.style.maxHeight=i+"px",o?.(),requestAnimationFrame(()=>g.current=!0)}},[h,s.trigger,s.valueNode,c,d,b,y,x,s.dir,o]);w(()=>C(),[C]);const[j,N]=i.useState();w(()=>{d&&N(window.getComputedStyle(d).zIndex)},[d]);const M=i.useCallback(e=>{e&&!0===v.current&&(C(),k?.(),v.current=!1)},[C,k]);return e.jsx(P$,{scope:r,contentWrapper:c,shouldExpandOnScrollRef:g,onScrollButtonChange:M,children:e.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:j},children:e.jsx(S.div,{...a,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});O$.displayName="SelectItemAlignedPosition";var D$=i.forwardRef((t,n)=>{const{__scopeSelect:r,align:o="start",collisionPadding:a=j$,...i}=t,s=d$(r);return e.jsx(RO,{...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)"}})});D$.displayName="SelectPopperPosition";var[P$,T$]=u$(C$,{}),A$="SelectViewport",R$=i.forwardRef((t,n)=>{const{__scopeSelect:r,nonce:o,...a}=t,s=M$(A$,r),l=T$(A$,r),c=f(n,s.onViewportChange),u=i.useRef(0);return e.jsxs(e.Fragment,{children:[e.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),e.jsx(s$.Slot,{scope:r,children:e.jsx(S.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:x(a.onScroll,e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=l;if(r?.current&&n){const e=Math.abs(u.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*j$,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")}}}u.current=t.scrollTop})})})]})});R$.displayName=A$;var I$="SelectGroup",[z$,L$]=u$(I$),F$=i.forwardRef((t,n)=>{const{__scopeSelect:r,...o}=t,a=O();return e.jsx(z$,{scope:r,id:a,children:e.jsx(S.div,{role:"group","aria-labelledby":a,...o,ref:n})})});F$.displayName=I$;var B$="SelectLabel",$$=i.forwardRef((t,n)=>{const{__scopeSelect:r,...o}=t,a=L$(B$,r);return e.jsx(S.div,{id:a.id,...o,ref:n})});$$.displayName=B$;var W$="SelectItem",[H$,U$]=u$(W$),V$=i.forwardRef((t,n)=>{const{__scopeSelect:r,value:o,disabled:a=!1,textValue:s,...l}=t,c=p$(W$,r),u=M$(W$,r),d=c.value===o,[p,m]=i.useState(s??""),[h,g]=i.useState(!1),v=f(n,e=>u.itemRefCallback?.(e,o,a)),b=O(),y=i.useRef("touch"),w=()=>{a||(c.onValueChange(o),c.onOpenChange(!1))};if(""===o)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return e.jsx(H$,{scope:r,value:o,disabled:a,textId:b,isSelected:d,onItemTextChange:i.useCallback(e=>{m(t=>t||(e?.textContent??"").trim())},[]),children:e.jsx(s$.ItemSlot,{scope:r,value:o,disabled:a,textValue:p,children:e.jsx(S.div,{role:"option","aria-labelledby":b,"data-highlighted":h?"":void 0,"aria-selected":d&&h,"data-state":d?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...l,ref:v,onFocus:x(l.onFocus,()=>g(!0)),onBlur:x(l.onBlur,()=>g(!1)),onClick:x(l.onClick,()=>{"mouse"!==y.current&&w()}),onPointerUp:x(l.onPointerUp,()=>{"mouse"===y.current&&w()}),onPointerDown:x(l.onPointerDown,e=>{y.current=e.pointerType}),onPointerMove:x(l.onPointerMove,e=>{y.current=e.pointerType,a?u.onItemLeave?.():"mouse"===y.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:x(l.onPointerLeave,e=>{e.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:x(l.onKeyDown,e=>{""!==u.searchRef?.current&&" "===e.key||(a$.includes(e.key)&&w()," "===e.key&&e.preventDefault())})})})})});V$.displayName=W$;var Y$="SelectItemText",K$=i.forwardRef((t,n)=>{const{__scopeSelect:r,className:o,style:a,...l}=t,c=p$(Y$,r),u=M$(Y$,r),d=U$(Y$,r),p=h$(Y$,r),[m,h]=i.useState(null),g=f(n,e=>h(e),d.onItemTextChange,e=>u.itemTextRefCallback?.(e,d.value,d.disabled)),v=m?.textContent,b=i.useMemo(()=>e.jsx("option",{value:d.value,disabled:d.disabled,children:v},d.value),[d.disabled,d.value,v]),{onNativeOptionAdd:y,onNativeOptionRemove:x}=p;return w(()=>(y(b),()=>x(b)),[y,x,b]),e.jsxs(e.Fragment,{children:[e.jsx(S.span,{id:d.textId,...l,ref:g}),d.isSelected&&c.valueNode&&!c.valueNodeHasChildren?s.createPortal(l.children,c.valueNode):null]})});K$.displayName=Y$;var q$="SelectItemIndicator",G$=i.forwardRef((t,n)=>{const{__scopeSelect:r,...o}=t;return U$(q$,r).isSelected?e.jsx(S.span,{"aria-hidden":!0,...o,ref:n}):null});G$.displayName=q$;var X$="SelectScrollUpButton",Z$=i.forwardRef((t,n)=>{const r=M$(X$,t.__scopeSelect),o=T$(X$,t.__scopeSelect),[a,s]=i.useState(!1),l=f(n,o.onScrollButtonChange);return w(()=>{if(r.viewport&&r.isPositioned){let e=function(){const e=t.scrollTop>0;s(e)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),a?e.jsx(eW,{...t,ref:l,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});Z$.displayName=X$;var Q$="SelectScrollDownButton",J$=i.forwardRef((t,n)=>{const r=M$(Q$,t.__scopeSelect),o=T$(Q$,t.__scopeSelect),[a,s]=i.useState(!1),l=f(n,o.onScrollButtonChange);return w(()=>{if(r.viewport&&r.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;s(n)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),a?e.jsx(eW,{...t,ref:l,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});J$.displayName=Q$;var eW=i.forwardRef((t,n)=>{const{__scopeSelect:r,onAutoScroll:o,...a}=t,s=M$("SelectScrollButton",r),l=i.useRef(null),c=l$(r),u=i.useCallback(()=>{null!==l.current&&(window.clearInterval(l.current),l.current=null)},[]);return i.useEffect(()=>()=>u(),[u]),w(()=>{const e=c().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[c]),e.jsx(S.div,{"aria-hidden":!0,...a,ref:n,style:{flexShrink:0,...a.style},onPointerDown:x(a.onPointerDown,()=>{null===l.current&&(l.current=window.setInterval(o,50))}),onPointerMove:x(a.onPointerMove,()=>{s.onItemLeave?.(),null===l.current&&(l.current=window.setInterval(o,50))}),onPointerLeave:x(a.onPointerLeave,()=>{u()})})}),tW=i.forwardRef((t,n)=>{const{__scopeSelect:r,...o}=t;return e.jsx(S.div,{"aria-hidden":!0,...o,ref:n})});tW.displayName="SelectSeparator";var nW="SelectArrow",rW=i.forwardRef((t,n)=>{const{__scopeSelect:r,...o}=t,a=d$(r),i=p$(nW,r),s=M$(nW,r);return i.open&&"popper"===s.position?e.jsx(IO,{...a,...o,ref:n}):null});rW.displayName=nW;var oW=i.forwardRef(({__scopeSelect:t,value:n,...r},o)=>{const a=i.useRef(null),s=f(o,a),l=pM(n);return i.useEffect(()=>{const e=a.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.jsx(S.select,{...r,style:{...xI,...r.style},ref:s,defaultValue:n})});function aW(e){return""===e||void 0===e}function iW(e){const t=Bt(e),n=i.useRef(""),r=i.useRef(0),o=i.useCallback(e=>{const o=n.current+e;t(o),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout(()=>e(""),1e3))}(o)},[t]),a=i.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return i.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function sW(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}oW.displayName="SelectBubbleInput";var lW=g$,cW=b$,uW=x$,dW=w$,fW=k$,pW=S$,mW=R$,hW=F$,gW=$$,vW=V$,bW=K$,yW=G$,xW=Z$,wW=J$,kW=tW;function CW({className:t,...n}){return e.jsx(xW,{"data-slot":"select-scroll-up-button",className:Rt("flex cursor-default items-center justify-center py-1",t),...n,children:e.jsx(r.ChevronUpIcon,{className:"size-4"})})}function SW({className:t,...n}){return e.jsx(wW,{"data-slot":"select-scroll-down-button",className:Rt("flex cursor-default items-center justify-center py-1",t),...n,children:e.jsx(r.ChevronDownIcon,{className:"size-4"})})}function jW({...t}){return e.jsx(Lr,{"data-slot":"sheet",...t})}function NW({...t}){return e.jsx(Br,{"data-slot":"sheet-portal",...t})}function MW({className:t,...n}){return e.jsx($r,{"data-slot":"sheet-overlay",className:Rt("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 EW({className:t,children:n,side:o="right",...a}){return e.jsxs(NW,{children:[e.jsx(MW,{}),e.jsxs(Wr,{"data-slot":"sheet-content",className:Rt("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:[n,e.jsxs(Vr,{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.jsx(r.XIcon,{className:"size-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function _W({className:t,...n}){return e.jsx("div",{"data-slot":"sheet-header",className:Rt("flex flex-col gap-1.5 p-4",t),...n})}function OW({className:t,...n}){return e.jsx(Hr,{"data-slot":"sheet-title",className:Rt("text-foreground font-semibold",t),...n})}function DW({className:t,...n}){return e.jsx(Ur,{"data-slot":"sheet-description",className:Rt("text-muted-foreground text-sm",t),...n})}function PW({className:t,...n}){return e.jsx("div",{"data-slot":"skeleton",className:Rt("bg-accent animate-pulse rounded-md",t),...n})}var[TW]=l("Tooltip",[vO]),AW=vO(),RW="TooltipProvider",IW=700,zW="tooltip.open",[LW,FW]=TW(RW),BW=t=>{const{__scopeTooltip:n,delayDuration:r=IW,skipDelayDuration:o=300,disableHoverableContent:a=!1,children:s}=t,l=i.useRef(!0),c=i.useRef(!1),u=i.useRef(0);return i.useEffect(()=>{const e=u.current;return()=>window.clearTimeout(e)},[]),e.jsx(LW,{scope:n,isOpenDelayedRef:l,delayDuration:r,onOpen:i.useCallback(()=>{window.clearTimeout(u.current),l.current=!1},[]),onClose:i.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>l.current=!0,o)},[o]),isPointerInTransitRef:c,onPointerInTransitChange:i.useCallback(e=>{c.current=e},[]),disableHoverableContent:a,children:s})};BW.displayName=RW;var $W="Tooltip",[WW,HW]=TW($W),UW=t=>{const{__scopeTooltip:n,children:r,open:o,defaultOpen:a,onOpenChange:s,disableHoverableContent:l,delayDuration:c}=t,u=FW($W,t.__scopeTooltip),d=AW(n),[f,p]=i.useState(null),m=O(),h=i.useRef(0),g=l??u.disableHoverableContent,v=c??u.delayDuration,b=i.useRef(!1),[y,x]=C({prop:o,defaultProp:a??!1,onChange:e=>{e?(u.onOpen(),document.dispatchEvent(new CustomEvent(zW))):u.onClose(),s?.(e)},caller:$W}),w=i.useMemo(()=>y?b.current?"delayed-open":"instant-open":"closed",[y]),k=i.useCallback(()=>{window.clearTimeout(h.current),h.current=0,b.current=!1,x(!0)},[x]),S=i.useCallback(()=>{window.clearTimeout(h.current),h.current=0,x(!1)},[x]),j=i.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{b.current=!0,x(!0),h.current=0},v)},[v,x]);return i.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),e.jsx(TO,{...d,children:e.jsx(WW,{scope:n,contentId:m,open:y,stateAttribute:w,trigger:f,onTriggerChange:p,onTriggerEnter:i.useCallback(()=>{u.isOpenDelayedRef.current?j():k()},[u.isOpenDelayedRef,j,k]),onTriggerLeave:i.useCallback(()=>{g?S():(window.clearTimeout(h.current),h.current=0)},[S,g]),onOpen:k,onClose:S,disableHoverableContent:g,children:r})})};UW.displayName=$W;var VW="TooltipTrigger",YW=i.forwardRef((t,n)=>{const{__scopeTooltip:r,...o}=t,a=HW(VW,r),s=FW(VW,r),l=AW(r),c=f(n,i.useRef(null),a.onTriggerChange),u=i.useRef(!1),d=i.useRef(!1),p=i.useCallback(()=>u.current=!1,[]);return i.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),e.jsx(AO,{asChild:!0,...l,children:e.jsx(S.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...o,ref:c,onPointerMove:x(t.onPointerMove,e=>{"touch"!==e.pointerType&&(d.current||s.isPointerInTransitRef.current||(a.onTriggerEnter(),d.current=!0))}),onPointerLeave:x(t.onPointerLeave,()=>{a.onTriggerLeave(),d.current=!1}),onPointerDown:x(t.onPointerDown,()=>{a.open&&a.onClose(),u.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:x(t.onFocus,()=>{u.current||a.onOpen()}),onBlur:x(t.onBlur,a.onClose),onClick:x(t.onClick,a.onClose)})})});YW.displayName=VW;var KW="TooltipPortal",[qW,GW]=TW(KW,{forceMount:void 0}),XW=t=>{const{__scopeTooltip:n,forceMount:r,children:o,container:a}=t,i=HW(KW,n);return e.jsx(qW,{scope:n,forceMount:r,children:e.jsx(N,{present:r||i.open,children:e.jsx(sn,{asChild:!0,container:a,children:o})})})};XW.displayName=KW;var ZW="TooltipContent",QW=i.forwardRef((t,n)=>{const r=GW(ZW,t.__scopeTooltip),{forceMount:o=r.forceMount,side:a="top",...i}=t,s=HW(ZW,t.__scopeTooltip);return e.jsx(N,{present:o||s.open,children:s.disableHoverableContent?e.jsx(rH,{side:a,...i,ref:n}):e.jsx(JW,{side:a,...i,ref:n})})}),JW=i.forwardRef((t,n)=>{const r=HW(ZW,t.__scopeTooltip),o=FW(ZW,t.__scopeTooltip),a=i.useRef(null),s=f(n,a),[l,c]=i.useState(null),{trigger:u,onClose:d}=r,p=a.current,{onPointerInTransitChange:m}=o,h=i.useCallback(()=>{c(null),m(!1)},[m]),g=i.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),m(!0)},[m]);return i.useEffect(()=>()=>h(),[h]),i.useEffect(()=>{if(u&&p){const e=e=>g(e,p),t=e=>g(e,u);return u.addEventListener("pointerleave",e),p.addEventListener("pointerleave",t),()=>{u.removeEventListener("pointerleave",e),p.removeEventListener("pointerleave",t)}}},[u,p,g,h]),i.useEffect(()=>{if(l){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=u?.contains(t)||p?.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?h():o&&(h(),d())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[u,p,l,d,h]),e.jsx(rH,{...t,ref:s})}),[eH,tH]=TW($W,{isInside:!1}),nH=v("TooltipContent"),rH=i.forwardRef((t,n)=>{const{__scopeTooltip:r,children:o,"aria-label":a,onEscapeKeyDown:s,onPointerDownOutside:l,...c}=t,u=HW(ZW,r),d=AW(r),{onClose:f}=u;return i.useEffect(()=>(document.addEventListener(zW,f),()=>document.removeEventListener(zW,f)),[f]),i.useEffect(()=>{if(u.trigger){const e=e=>{const t=e.target;t?.contains(u.trigger)&&f()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[u.trigger,f]),e.jsx(Yt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:e=>e.preventDefault(),onDismiss:f,children:e.jsxs(RO,{"data-state":u.stateAttribute,...d,...c,ref:n,style:{...c.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.jsx(nH,{children:o}),e.jsx(eH,{scope:r,isInside:!0,children:e.jsx(kI,{id:u.contentId,role:"tooltip",children:a||o})})]})})});QW.displayName=ZW;var oH="TooltipArrow",aH=i.forwardRef((t,n)=>{const{__scopeTooltip:r,...o}=t,a=AW(r);return tH(oH,r).isInside?null:e.jsx(IO,{...a,...o,ref:n})});aH.displayName=oH;var iH=BW,sH=UW,lH=YW,cH=XW,uH=QW,dH=aH;function fH({delayDuration:t=0,...n}){return e.jsx(iH,{"data-slot":"tooltip-provider",delayDuration:t,...n})}function pH({...t}){return e.jsx(fH,{children:e.jsx(sH,{"data-slot":"tooltip",...t})})}function mH({...t}){return e.jsx(lH,{"data-slot":"tooltip-trigger",...t})}function hH({className:t,sideOffset:n=0,children:r,...o}){return e.jsx(cH,{children:e.jsxs(uH,{"data-slot":"tooltip-content",sideOffset:n,className:Rt("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),...o,children:[r,e.jsx(dH,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const gH=i.createContext(null);function vH(){const e=i.useContext(gH);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const bH=Lt("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"}});var yH=["PageUp","PageDown"],xH=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],wH={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},kH="Slider",[CH,SH,jH]=y(kH),[NH]=l(kH,[jH]),[MH,EH]=NH(kH),_H=i.forwardRef((t,n)=>{const{name:r,min:o=0,max:a=100,step:s=1,orientation:l="horizontal",disabled:c=!1,minStepsBetweenThumbs:u=0,defaultValue:d=[o],value:f,onValueChange:p=()=>{},onValueCommit:m=()=>{},inverted:h=!1,form:g,...v}=t,b=i.useRef(new Set),y=i.useRef(0),w="horizontal"===l?PH:TH,[k=[],S]=C({prop:f,defaultProp:d,onChange:e=>{const t=[...b.current];t[y.current]?.focus(),p(e)}}),j=i.useRef(k);function N(e,t,{commit:n}={commit:!1}){const r=function(e){return(String(e).split(".")[1]||"").length}(s),i=function(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}(Math.round((e-o)/s)*s+o,r),l=xB(i,[o,a]);S((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)){y.current=r.indexOf(l);const t=String(r)!==String(e);return t&&n&&m(r),t?r:e}return e})}return e.jsx(MH,{scope:t.__scopeSlider,name:r,disabled:c,min:o,max:a,valueIndexToChangeRef:y,thumbs:b.current,values:k,orientation:l,form:g,children:e.jsx(CH.Provider,{scope:t.__scopeSlider,children:e.jsx(CH.Slot,{scope:t.__scopeSlider,children:e.jsx(w,{"aria-disabled":c,"data-disabled":c?"":void 0,...v,ref:n,onPointerDown:x(v.onPointerDown,()=>{c||(j.current=k)}),min:o,max:a,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)}(k,e);N(e,t)},onSlideMove:c?void 0:function(e){N(e,y.current)},onSlideEnd:c?void 0:function(){const e=j.current[y.current];k[y.current]!==e&&m(k)},onHomeKeyDown:()=>!c&&N(o,0,{commit:!0}),onEndKeyDown:()=>!c&&N(a,k.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!c){const n=yH.includes(e.key)||e.shiftKey&&xH.includes(e.key)?10:1,r=y.current;N(k[r]+s*n*t,r,{commit:!0})}}})})})})});_H.displayName=kH;var[OH,DH]=NH(kH,{startEdge:"left",endEdge:"right",size:"width",direction:1}),PH=i.forwardRef((t,n)=>{const{min:r,max:o,dir:a,inverted:s,onSlideStart:l,onSlideMove:c,onSlideEnd:u,onStepKeyDown:d,...p}=t,[m,h]=i.useState(null),g=f(n,e=>h(e)),v=i.useRef(void 0),b=K(a),y="ltr"===b,x=y&&!s||!y&&s;function w(e){const t=v.current||m.getBoundingClientRect(),n=UH([0,t.width],x?[r,o]:[o,r]);return v.current=t,n(e-t.left)}return e.jsx(OH,{scope:t.__scopeSlider,startEdge:x?"left":"right",endEdge:x?"right":"left",direction:x?1:-1,size:"width",children:e.jsx(AH,{dir:b,"data-orientation":"horizontal",...p,ref:g,style:{...p.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:()=>{v.current=void 0,u?.()},onStepKeyDown:e=>{const t=wH[x?"from-left":"from-right"].includes(e.key);d?.({event:e,direction:t?-1:1})}})})}),TH=i.forwardRef((t,n)=>{const{min:r,max:o,inverted:a,onSlideStart:s,onSlideMove:l,onSlideEnd:c,onStepKeyDown:u,...d}=t,p=i.useRef(null),m=f(n,p),h=i.useRef(void 0),g=!a;function v(e){const t=h.current||p.current.getBoundingClientRect(),n=UH([0,t.height],g?[o,r]:[r,o]);return h.current=t,n(e-t.top)}return e.jsx(OH,{scope:t.__scopeSlider,startEdge:g?"bottom":"top",endEdge:g?"top":"bottom",size:"height",direction:g?1:-1,children:e.jsx(AH,{"data-orientation":"vertical",...d,ref:m,style:{...d.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{const t=v(e.clientY);s?.(t)},onSlideMove:e=>{const t=v(e.clientY);l?.(t)},onSlideEnd:()=>{h.current=void 0,c?.()},onStepKeyDown:e=>{const t=wH[g?"from-bottom":"from-top"].includes(e.key);u?.({event:e,direction:t?-1:1})}})})}),AH=i.forwardRef((t,n)=>{const{__scopeSlider:r,onSlideStart:o,onSlideMove:a,onSlideEnd:i,onHomeKeyDown:s,onEndKeyDown:l,onStepKeyDown:c,...u}=t,d=EH(kH,r);return e.jsx(S.span,{...u,ref:n,onKeyDown:x(t.onKeyDown,e=>{"Home"===e.key?(s(e),e.preventDefault()):"End"===e.key?(l(e),e.preventDefault()):yH.concat(xH).includes(e.key)&&(c(e),e.preventDefault())}),onPointerDown:x(t.onPointerDown,e=>{const t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),d.thumbs.has(t)?t.focus():o(e)}),onPointerMove:x(t.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&a(e)}),onPointerUp:x(t.onPointerUp,e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),i(e))})})}),RH="SliderTrack",IH=i.forwardRef((t,n)=>{const{__scopeSlider:r,...o}=t,a=EH(RH,r);return e.jsx(S.span,{"data-disabled":a.disabled?"":void 0,"data-orientation":a.orientation,...o,ref:n})});IH.displayName=RH;var zH="SliderRange",LH=i.forwardRef((t,n)=>{const{__scopeSlider:r,...o}=t,a=EH(zH,r),s=DH(zH,r),l=f(n,i.useRef(null)),c=a.values.length,u=a.values.map(e=>HH(e,a.min,a.max)),d=c>1?Math.min(...u):0,p=100-Math.max(...u);return e.jsx(S.span,{"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,...o,ref:l,style:{...t.style,[s.startEdge]:d+"%",[s.endEdge]:p+"%"}})});LH.displayName=zH;var FH="SliderThumb",BH=i.forwardRef((t,n)=>{const r=SH(t.__scopeSlider),[o,a]=i.useState(null),s=f(n,e=>a(e)),l=i.useMemo(()=>o?r().findIndex(e=>e.ref.current===o):-1,[r,o]);return e.jsx($H,{...t,ref:s,index:l})}),$H=i.forwardRef((t,n)=>{const{__scopeSlider:r,index:o,name:a,...s}=t,l=EH(FH,r),c=DH(FH,r),[u,d]=i.useState(null),p=f(n,e=>d(e)),m=!u||(l.form||!!u.closest("form")),h=mM(u),g=l.values[o],v=void 0===g?0:HH(g,l.min,l.max),b=function(e,t){return t>2?`Value ${e+1} of ${t}`:2===t?["Minimum","Maximum"][e]:void 0}(o,l.values.length),y=h?.[c.size],w=y?function(e,t,n){const r=e/2,o=UH([0,50],[0,r]);return(r-o(t)*n)*n}(y,v,c.direction):0;return i.useEffect(()=>{if(u)return l.thumbs.add(u),()=>{l.thumbs.delete(u)}},[u,l.thumbs]),e.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[c.startEdge]:`calc(${v}% + ${w}px)`},children:[e.jsx(CH.ItemSlot,{scope:t.__scopeSlider,children:e.jsx(S.span,{role:"slider","aria-label":t["aria-label"]||b,"aria-valuemin":l.min,"aria-valuenow":g,"aria-valuemax":l.max,"aria-orientation":l.orientation,"data-orientation":l.orientation,"data-disabled":l.disabled?"":void 0,tabIndex:l.disabled?void 0:0,...s,ref:p,style:void 0===g?{display:"none"}:t.style,onFocus:x(t.onFocus,()=>{l.valueIndexToChangeRef.current=o})})}),m&&e.jsx(WH,{name:a??(l.name?l.name+(l.values.length>1?"[]":""):void 0),form:l.form,value:g},o)]})});BH.displayName=FH;var WH=i.forwardRef(({__scopeSlider:t,value:n,...r},o)=>{const a=i.useRef(null),s=f(a,o),l=pM(n);return i.useEffect(()=>{const e=a.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.jsx(S.input,{style:{display:"none"},...r,ref:s,defaultValue:n})});function HH(e,t,n){return xB(100/(n-t)*(e-t),[0,100])}function UH(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])}}WH.displayName="RadioBubbleInput";var VH=_H,YH=IH,KH=LH,qH=BH;var GH=(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){}},XH=i.createContext(void 0),ZH={setTheme:e=>{},themes:[]};i.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:o,defaultTheme:a,value:s,themes:l,nonce:c,scriptProps:u})=>{let d=JSON.stringify([n,t,a,e,l,s,r,o]).slice(1,-1);return i.createElement("script",{...u,suppressHydrationWarning:!0,nonce:"undefined"==typeof window?c:"",dangerouslySetInnerHTML:{__html:`(${GH.toString()})(${d})`}})});const QH=Array(12).fill(0),JH=({visible:e,className:n})=>t.createElement("div",{className:["sonner-loading-wrapper",n].filter(Boolean).join(" "),"data-visible":e},t.createElement("div",{className:"sonner-spinner"},QH.map((e,n)=>t.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),eU=t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},t.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"})),tU=t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},t.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"})),nU=t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},t.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"})),rU=t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},t.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"})),oU=t.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"},t.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}));let aU=1;const iU=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:aU++,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,n)=>{if(!n)return;let r;void 0!==n.loading&&(r=this.create({...n,promise:e,type:"loading",message:n.loading,description:"function"!=typeof n.description?n.description:void 0}));const o=Promise.resolve(e instanceof Function?e():e);let a,i=void 0!==r;const s=o.then(async e=>{a=["resolve",e];if(t.isValidElement(e))i=!1,this.create({id:r,type:"default",message:e});else if(sU(e)&&!e.ok){i=!1;const o="function"==typeof n.error?await n.error(`HTTP error! status: ${e.status}`):n.error,a="function"==typeof n.description?await n.description(`HTTP error! status: ${e.status}`):n.description,s="object"==typeof o&&!t.isValidElement(o)?o:{message:o};this.create({id:r,type:"error",description:a,...s})}else if(e instanceof Error){i=!1;const o="function"==typeof n.error?await n.error(e):n.error,a="function"==typeof n.description?await n.description(e):n.description,s="object"==typeof o&&!t.isValidElement(o)?o:{message:o};this.create({id:r,type:"error",description:a,...s})}else if(void 0!==n.success){i=!1;const o="function"==typeof n.success?await n.success(e):n.success,a="function"==typeof n.description?await n.description(e):n.description,s="object"==typeof o&&!t.isValidElement(o)?o:{message:o};this.create({id:r,type:"success",description:a,...s})}}).catch(async e=>{if(a=["reject",e],void 0!==n.error){i=!1;const o="function"==typeof n.error?await n.error(e):n.error,a="function"==typeof n.description?await n.description(e):n.description,s="object"==typeof o&&!t.isValidElement(o)?o:{message:o};this.create({id:r,type:"error",description:a,...s})}}).finally(()=>{i&&(this.dismiss(r),r=void 0),null==n.finally||n.finally.call(n)}),l=()=>new Promise((e,t)=>s.then(()=>"reject"===a[0]?t(a[1]):e(a[1])).catch(t));return"string"!=typeof r&&"number"!=typeof r?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(e,t)=>{const n=(null==t?void 0:t.id)||aU++;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}},sU=e=>e&&"object"==typeof e&&"ok"in e&&"boolean"==typeof e.ok&&"status"in e&&"number"==typeof e.status,lU=(e,t)=>{const n=(null==t?void 0:t.id)||aU++;return iU.addToast({title:e,...t,id:n}),n};function cU(e){return void 0!==e.label}Object.assign(lU,{success:iU.success,info:iU.info,warning:iU.warning,error:iU.error,custom:iU.custom,message:iU.message,promise:iU.promise,dismiss:iU.dismiss,loading:iU.loading},{getHistory:()=>iU.toasts,getToasts:()=>iU.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 uU=3,dU=14;function fU(...e){return e.filter(Boolean).join(" ")}const pU=e=>{var n,r,o,a,i,s,l,c,u;const{invert:d,toast:f,unstyled:p,interacting:m,setHeights:h,visibleToasts:g,heights:v,index:b,toasts:y,expanded:x,removeToast:w,defaultRichColors:k,closeButton:C,style:S,cancelButtonStyle:j,actionButtonStyle:N,className:M="",descriptionClassName:E="",duration:_,position:O,gap:D,expandByDefault:P,classNames:T,icons:A,closeButtonAriaLabel:R="Close toast"}=e,[I,z]=t.useState(null),[L,F]=t.useState(null),[B,$]=t.useState(!1),[W,H]=t.useState(!1),[U,V]=t.useState(!1),[Y,K]=t.useState(!1),[q,G]=t.useState(!1),[X,Z]=t.useState(0),[Q,J]=t.useState(0),ee=t.useRef(f.duration||_||4e3),te=t.useRef(null),ne=t.useRef(null),re=0===b,oe=b+1<=g,ae=f.type,ie=!1!==f.dismissible,se=f.className||"",le=f.descriptionClassName||"",ce=t.useMemo(()=>v.findIndex(e=>e.toastId===f.id)||0,[v,f.id]),ue=t.useMemo(()=>{var e;return null!=(e=f.closeButton)?e:C},[f.closeButton,C]),de=t.useMemo(()=>f.duration||_||4e3,[f.duration,_]),fe=t.useRef(0),pe=t.useRef(0),me=t.useRef(0),he=t.useRef(null),[ge,ve]=O.split("-"),be=t.useMemo(()=>v.reduce((e,t,n)=>n>=ce?e:e+t.height,0),[v,ce]),ye=(()=>{const[e,n]=t.useState(document.hidden);return t.useEffect(()=>{const e=()=>{n(document.hidden)};return document.addEventListener("visibilitychange",e),()=>window.removeEventListener("visibilitychange",e)},[]),e})(),xe=f.invert||d,we="loading"===ae;pe.current=t.useMemo(()=>ce*D+be,[ce,be]),t.useEffect(()=>{ee.current=de},[de]),t.useEffect(()=>{$(!0)},[]),t.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]),t.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=t.useCallback(()=>{H(!0),Z(pe.current),h(e=>e.filter(e=>e.toastId!==f.id)),setTimeout(()=>{w(f)},200)},[f,w,h,pe]);t.useEffect(()=>{if(f.promise&&"loading"===ae||f.duration===1/0||"loading"===f.type)return;let e;return x||m||ye?(()=>{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)},[x,m,f,ae,ye,ke]),t.useEffect(()=>{f.delete&&(ke(),null==f.onDismiss||f.onDismiss.call(f,f))},[ke,f.delete]);const Ce=f.icon||(null==A?void 0:A[ae])||(e=>{switch(e){case"success":return eU;case"info":return nU;case"warning":return tU;case"error":return rU;default:return null}})(ae);var Se,je;return t.createElement("li",{tabIndex:0,ref:ne,className:fU(M,se,null==T?void 0:T.toast,null==f||null==(n=f.classNames)?void 0:n.toast,null==T?void 0:T.default,null==T?void 0:T[ae],null==f||null==(r=f.classNames)?void 0:r[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":b,"data-front":re,"data-swiping":U,"data-dismissible":ie,"data-type":ae,"data-invert":xe,"data-swipe-out":Y,"data-swipe-direction":L,"data-expanded":Boolean(x||P&&B),"data-testid":f.testId,style:{"--index":b,"--toasts-before":b,"--z-index":y.length-b,"--offset":`${W?X:pe.current}px`,"--initial-height":P?"auto":`${Q}px`,...S,...f.style},onDragEnd:()=>{V(!1),z(null),he.current=null},onPointerDown:e=>{2!==e.button&&!we&&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"===I?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"===I?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}(O);!I&&(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"===I){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"===I&&(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?t.createElement("button",{"aria-label":R,"data-disabled":we,"data-close-button":!0,onClick:we||!ie?()=>{}:()=>{ke(),null==f.onDismiss||f.onDismiss.call(f,f)},className:fU(null==T?void 0:T.closeButton,null==f||null==(o=f.classNames)?void 0:o.closeButton)},null!=(je=null==A?void 0:A.close)?je:oU):null,(ae||f.icon||f.promise)&&null!==f.icon&&(null!==(null==A?void 0:A[ae])||f.icon)?t.createElement("div",{"data-icon":"",className:fU(null==T?void 0:T.icon,null==f||null==(a=f.classNames)?void 0:a.icon)},f.promise||"loading"===f.type&&!f.icon?f.icon||function(){var e,n;return(null==A?void 0:A.loading)?t.createElement("div",{className:fU(null==T?void 0:T.loader,null==f||null==(n=f.classNames)?void 0:n.loader,"sonner-loader"),"data-visible":"loading"===ae},A.loading):t.createElement(JH,{className:fU(null==T?void 0:T.loader,null==f||null==(e=f.classNames)?void 0:e.loader),visible:"loading"===ae})}():null,"loading"!==f.type?Ce:null):null,t.createElement("div",{"data-content":"",className:fU(null==T?void 0:T.content,null==f||null==(i=f.classNames)?void 0:i.content)},t.createElement("div",{"data-title":"",className:fU(null==T?void 0:T.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?t.createElement("div",{"data-description":"",className:fU(E,le,null==T?void 0:T.description,null==f||null==(l=f.classNames)?void 0:l.description)},"function"==typeof f.description?f.description():f.description):null),t.isValidElement(f.cancel)?f.cancel:f.cancel&&cU(f.cancel)?t.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||j,onClick:e=>{cU(f.cancel)&&ie&&(null==f.cancel.onClick||f.cancel.onClick.call(f.cancel,e),ke())},className:fU(null==T?void 0:T.cancelButton,null==f||null==(c=f.classNames)?void 0:c.cancelButton)},f.cancel.label):null,t.isValidElement(f.action)?f.action:f.action&&cU(f.action)?t.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||N,onClick:e=>{cU(f.action)&&(null==f.action.onClick||f.action.onClick.call(f.action,e),e.defaultPrevented||ke())},className:fU(null==T?void 0:T.actionButton,null==f||null==(u=f.classNames)?void 0:u.actionButton)},f.action.label):null)};function mU(){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 hU(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 gU=t.forwardRef(function(e,r){const{id:o,invert:a,position:i="bottom-right",hotkey:s=["altKey","KeyT"],expand:l,closeButton:c,className:u,offset:d,mobileOffset:f,theme:p="light",richColors:m,duration:h,style:g,visibleToasts:v=uU,toastOptions:b,dir:y=mU(),gap:x=dU,icons:w,containerAriaLabel:k="Notifications"}=e,[C,S]=t.useState([]),j=t.useMemo(()=>o?C.filter(e=>e.toasterId===o):C.filter(e=>!e.toasterId),[C,o]),N=t.useMemo(()=>Array.from(new Set([i].concat(j.filter(e=>e.position).map(e=>e.position)))),[j,i]),[M,E]=t.useState([]),[_,O]=t.useState(!1),[D,P]=t.useState(!1),[T,A]=t.useState("system"!==p?p:"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),R=t.useRef(null),I=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),z=t.useRef(null),L=t.useRef(!1),F=t.useCallback(e=>{S(t=>{var n;return(null==(n=t.find(t=>t.id===e.id))?void 0:n.delete)||iU.dismiss(e.id),t.filter(({id:t})=>t!==e.id)})},[]);return t.useEffect(()=>iU.subscribe(e=>{e.dismiss?requestAnimationFrame(()=>{S(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))}):setTimeout(()=>{n.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]})})})}),[C]),t.useEffect(()=>{if("system"!==p)return void A(p);if("system"===p&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?A("dark"):A("light")),"undefined"==typeof window)return;const e=window.matchMedia("(prefers-color-scheme: dark)");try{e.addEventListener("change",({matches:e})=>{A(e?"dark":"light")})}catch(t){e.addListener(({matches:e})=>{try{A(e?"dark":"light")}catch(e){console.error(e)}})}},[p]),t.useEffect(()=>{C.length<=1&&O(!1)},[C]),t.useEffect(()=>{const e=e=>{var t;var n;s.every(t=>e[t]||e.code===t)&&(O(!0),null==(n=R.current)||n.focus());"Escape"!==e.code||document.activeElement!==R.current&&!(null==(t=R.current)?void 0:t.contains(document.activeElement))||O(!1)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[s]),t.useEffect(()=>{if(R.current)return()=>{z.current&&(z.current.focus({preventScroll:!0}),z.current=null,L.current=!1)}},[R.current]),t.createElement("section",{ref:r,"aria-label":`${k} ${I}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},N.map((n,r)=>{var o;const[i,s]=n.split("-");return j.length?t.createElement("ol",{key:n,dir:"auto"===y?mU():y,tabIndex:-1,ref:R,className:u,"data-sonner-toaster":!0,"data-sonner-theme":T,"data-y-position":i,"data-x-position":s,style:{"--front-toast-height":`${(null==(o=M[0])?void 0:o.height)||0}px`,"--width":"356px","--gap":`${x}px`,...g,...hU(d,f)},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:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{D||O(!1)},onDragEnd:()=>O(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||P(!0)},onPointerUp:()=>P(!1)},j.filter(e=>!e.position&&0===r||e.position===n).map((r,o)=>{var i,s;return t.createElement(pU,{key:r.id,icons:w,index:o,toast:r,defaultRichColors:m,duration:null!=(i=null==b?void 0:b.duration)?i:h,className:null==b?void 0:b.className,descriptionClassName:null==b?void 0:b.descriptionClassName,invert:a,visibleToasts:v,closeButton:null!=(s=null==b?void 0:b.closeButton)?s:c,interacting:D,position:n,style:null==b?void 0:b.style,unstyled:null==b?void 0:b.unstyled,classNames:null==b?void 0:b.classNames,cancelButtonStyle:null==b?void 0:b.cancelButtonStyle,actionButtonStyle:null==b?void 0:b.actionButtonStyle,closeButtonAriaLabel:null==b?void 0:b.closeButtonAriaLabel,removeToast:F,toasts:j.filter(e=>e.position==r.position),heights:M.filter(e=>e.position==r.position),setHeights:E,expandByDefault:l,gap:x,expanded:_,swipeDirections:e.swipeDirections})})):null}))});var vU="Switch",[bU]=l(vU),[yU,xU]=bU(vU),wU=i.forwardRef((t,n)=>{const{__scopeSwitch:r,name:o,checked:a,defaultChecked:s,required:l,disabled:c,value:u="on",onCheckedChange:d,form:p,...m}=t,[h,g]=i.useState(null),v=f(n,e=>g(e)),b=i.useRef(!1),y=!h||(p||!!h.closest("form")),[w,k]=C({prop:a,defaultProp:s??!1,onChange:d,caller:vU});return e.jsxs(yU,{scope:r,checked:w,disabled:c,children:[e.jsx(S.button,{type:"button",role:"switch","aria-checked":w,"aria-required":l,"data-state":jU(w),"data-disabled":c?"":void 0,disabled:c,value:u,...m,ref:v,onClick:x(t.onClick,e=>{k(e=>!e),y&&(b.current=e.isPropagationStopped(),b.current||e.stopPropagation())})}),y&&e.jsx(SU,{control:h,bubbles:!b.current,name:o,value:u,checked:w,required:l,disabled:c,form:p,style:{transform:"translateX(-100%)"}})]})});wU.displayName=vU;var kU="SwitchThumb",CU=i.forwardRef((t,n)=>{const{__scopeSwitch:r,...o}=t,a=xU(kU,r);return e.jsx(S.span,{"data-state":jU(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:n})});CU.displayName=kU;var SU=i.forwardRef(({__scopeSwitch:t,control:n,checked:r,bubbles:o=!0,...a},s)=>{const l=i.useRef(null),c=f(l,s),u=pM(r),d=mM(n);return i.useEffect(()=>{const e=l.current;if(!e)return;const t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(u!==r&&n){const t=new Event("click",{bubbles:o});n.call(e,r),e.dispatchEvent(t)}},[u,r,o]),e.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...a,tabIndex:-1,ref:c,style:{...a.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function jU(e){return e?"checked":"unchecked"}SU.displayName="SwitchBubbleInput";var NU=wU,MU=CU;var EU="Tabs",[_U]=l(EU,[UO]),OU=UO(),[DU,PU]=_U(EU),TU=i.forwardRef((t,n)=>{const{__scopeTabs:r,value:o,onValueChange:a,defaultValue:i,orientation:s="horizontal",dir:l,activationMode:c="automatic",...u}=t,d=K(l),[f,p]=C({prop:o,onChange:a,defaultProp:i??"",caller:EU});return e.jsx(DU,{scope:r,baseId:O(),value:f,onValueChange:p,orientation:s,dir:d,activationMode:c,children:e.jsx(S.div,{dir:d,"data-orientation":s,...u,ref:n})})});TU.displayName=EU;var AU="TabsList",RU=i.forwardRef((t,n)=>{const{__scopeTabs:r,loop:o=!0,...a}=t,i=PU(AU,r),s=OU(r);return e.jsx(JO,{asChild:!0,...s,orientation:i.orientation,dir:i.dir,loop:o,children:e.jsx(S.div,{role:"tablist","aria-orientation":i.orientation,...a,ref:n})})});RU.displayName=AU;var IU="TabsTrigger",zU=i.forwardRef((t,n)=>{const{__scopeTabs:r,value:o,disabled:a=!1,...i}=t,s=PU(IU,r),l=OU(r),c=BU(s.baseId,o),u=$U(s.baseId,o),d=o===s.value;return e.jsx(eD,{asChild:!0,...l,focusable:!a,active:d,children:e.jsx(S.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:x(t.onMouseDown,e=>{a||0!==e.button||!1!==e.ctrlKey?e.preventDefault():s.onValueChange(o)}),onKeyDown:x(t.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&s.onValueChange(o)}),onFocus:x(t.onFocus,()=>{const e="manual"!==s.activationMode;d||a||!e||s.onValueChange(o)})})})});zU.displayName=IU;var LU="TabsContent",FU=i.forwardRef((t,n)=>{const{__scopeTabs:r,value:o,forceMount:a,children:s,...l}=t,c=PU(LU,r),u=BU(c.baseId,o),d=$U(c.baseId,o),f=o===c.value,p=i.useRef(f);return i.useEffect(()=>{const e=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(e)},[]),e.jsx(N,{present:a||f,children:({present:r})=>e.jsx(S.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 BU(e,t){return`${e}-trigger-${t}`}function $U(e,t){return`${e}-content-${t}`}FU.displayName=LU;var WU=TU,HU=RU,UU=zU,VU=FU;var YU="Toggle",KU=i.forwardRef((t,n)=>{const{pressed:r,defaultPressed:o,onPressedChange:a,...i}=t,[s,l]=C({prop:r,onChange:a,defaultProp:o??!1,caller:YU});return e.jsx(S.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":t.disabled?"":void 0,...i,ref:n,onClick:x(t.onClick,()=>{t.disabled||l(!s)})})});KU.displayName=YU;var qU=KU,GU="ToggleGroup",[XU]=l(GU,[UO]),ZU=UO(),QU=t.forwardRef((t,n)=>{const{type:r,...o}=t;if("single"===r){const t=o;return e.jsx(tV,{...t,ref:n})}if("multiple"===r){const t=o;return e.jsx(nV,{...t,ref:n})}throw new Error(`Missing prop \`type\` expected on \`${GU}\``)});QU.displayName=GU;var[JU,eV]=XU(GU),tV=t.forwardRef((n,r)=>{const{value:o,defaultValue:a,onValueChange:i=()=>{},...s}=n,[l,c]=C({prop:o,defaultProp:a??"",onChange:i,caller:GU});return e.jsx(JU,{scope:n.__scopeToggleGroup,type:"single",value:t.useMemo(()=>l?[l]:[],[l]),onItemActivate:c,onItemDeactivate:t.useCallback(()=>c(""),[c]),children:e.jsx(aV,{...s,ref:r})})}),nV=t.forwardRef((n,r)=>{const{value:o,defaultValue:a,onValueChange:i=()=>{},...s}=n,[l,c]=C({prop:o,defaultProp:a??[],onChange:i,caller:GU}),u=t.useCallback(e=>c((t=[])=>[...t,e]),[c]),d=t.useCallback(e=>c((t=[])=>t.filter(t=>t!==e)),[c]);return e.jsx(JU,{scope:n.__scopeToggleGroup,type:"multiple",value:l,onItemActivate:u,onItemDeactivate:d,children:e.jsx(aV,{...s,ref:r})})});QU.displayName=GU;var[rV,oV]=XU(GU),aV=t.forwardRef((t,n)=>{const{__scopeToggleGroup:r,disabled:o=!1,rovingFocus:a=!0,orientation:i,dir:s,loop:l=!0,...c}=t,u=ZU(r),d=K(s),f={role:"group",dir:d,...c};return e.jsx(rV,{scope:r,rovingFocus:a,disabled:o,children:a?e.jsx(JO,{asChild:!0,...u,orientation:i,dir:d,loop:l,children:e.jsx(S.div,{...f,ref:n})}):e.jsx(S.div,{...f,ref:n})})}),iV="ToggleGroupItem",sV=t.forwardRef((n,r)=>{const o=eV(iV,n.__scopeToggleGroup),a=oV(iV,n.__scopeToggleGroup),i=ZU(n.__scopeToggleGroup),s=o.value.includes(n.value),l=a.disabled||n.disabled,c={...n,pressed:s,disabled:l},u=t.useRef(null);return a.rovingFocus?e.jsx(eD,{asChild:!0,...i,focusable:!l,active:s,ref:u,children:e.jsx(lV,{...c,ref:r})}):e.jsx(lV,{...c,ref:r})});sV.displayName=iV;var lV=t.forwardRef((t,n)=>{const{__scopeToggleGroup:r,value:o,...a}=t,i=eV(iV,r),s={role:"radio","aria-checked":t.pressed,"aria-pressed":void 0},l="single"===i.type?s:void 0;return e.jsx(KU,{...l,...a,ref:n,onPressedChange:e=>{e?i.onItemActivate(o):i.onItemDeactivate(o)}})}),cV=QU,uV=sV;const dV=Lt("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"}});const fV=i.createContext({size:"default",variant:"default"});exports.Accordion=function({...t}){return e.jsx(ke,{"data-slot":"accordion",...t})},exports.AccordionContent=function({className:t,children:n,...r}){return e.jsx(Ne,{"data-slot":"accordion-content",className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",...r,children:e.jsx("div",{className:Rt("pb-4 pt-0",t),children:n})})},exports.AccordionItem=function({className:t,...n}){return e.jsx(Ce,{"data-slot":"accordion-item",className:Rt("border-b last:border-b-0",t),...n})},exports.AccordionTrigger=function({className:t,children:n,...o}){return e.jsx(Se,{className:"flex",children:e.jsxs(je,{"data-slot":"accordion-trigger",className:Rt("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:[n,e.jsx(r.ChevronDownIcon,{className:"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200"})]})})},exports.Alert=function({className:t,variant:n,...r}){return e.jsx("div",{"data-slot":"alert",role:"alert",className:Rt(Ft({variant:n}),t),...r})},exports.AlertDescription=function({className:t,...n}){return e.jsx("div",{"data-slot":"alert-description",className:Rt("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",t),...n})},exports.AlertDialog=function({...t}){return e.jsx(po,{"data-slot":"alert-dialog",...t})},exports.AlertDialogAction=function({className:t,...n}){return e.jsx(bo,{className:Rt(ko(),t),...n})},exports.AlertDialogCancel=function({className:t,...n}){return e.jsx(yo,{className:Rt(ko({variant:"outline"}),t),...n})},exports.AlertDialogContent=function({className:t,...n}){return e.jsxs(So,{children:[e.jsx(jo,{}),e.jsx(vo,{"data-slot":"alert-dialog-content",className:Rt("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),...n})]})},exports.AlertDialogDescription=function({className:t,...n}){return e.jsx(wo,{"data-slot":"alert-dialog-description",className:Rt("text-muted-foreground text-sm",t),...n})},exports.AlertDialogFooter=function({className:t,...n}){return e.jsx("div",{"data-slot":"alert-dialog-footer",className:Rt("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...n})},exports.AlertDialogHeader=function({className:t,...n}){return e.jsx("div",{"data-slot":"alert-dialog-header",className:Rt("flex flex-col gap-2 text-center sm:text-left",t),...n})},exports.AlertDialogOverlay=jo,exports.AlertDialogPortal=So,exports.AlertDialogTitle=function({className:t,...n}){return e.jsx(xo,{"data-slot":"alert-dialog-title",className:Rt("text-lg font-semibold",t),...n})},exports.AlertDialogTrigger=function({...t}){return e.jsx(mo,{"data-slot":"alert-dialog-trigger",...t})},exports.AlertTitle=function({className:t,...n}){return e.jsx("div",{"data-slot":"alert-title",className:Rt("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",t),...n})},exports.AspectRatio=function({...t}){return e.jsx(Mo,{"data-slot":"aspect-ratio",...t})},exports.Avatar=function({className:t,...n}){return e.jsx(qo,{"data-slot":"avatar",className:Rt("relative flex size-8 shrink-0 overflow-hidden rounded-full",t),...n})},exports.AvatarFallback=function({className:t,...n}){return e.jsx(Xo,{"data-slot":"avatar-fallback",className:Rt("bg-muted flex size-full items-center justify-center rounded-full",t),...n})},exports.AvatarImage=function({className:t,...n}){return e.jsx(Go,{"data-slot":"avatar-image",className:Rt("aspect-square size-full",t),...n})},exports.Badge=function({className:t,variant:n,asChild:r=!1,...o}){const a=r?m:"span";return e.jsx(a,{"data-slot":"badge",className:Rt(Zo({variant:n}),t),...o})},exports.Breadcrumb=function({...t}){return e.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",...t})},exports.BreadcrumbEllipsis=function({className:t,...n}){return e.jsxs("span",{"data-slot":"breadcrumb-ellipsis",role:"presentation","aria-hidden":"true",className:Rt("flex size-9 items-center justify-center",t),...n,children:[e.jsx(r.MoreHorizontal,{className:"size-4"}),e.jsx("span",{className:"sr-only",children:"More"})]})},exports.BreadcrumbItem=function({className:t,...n}){return e.jsx("li",{"data-slot":"breadcrumb-item",className:Rt("inline-flex items-center gap-1.5",t),...n})},exports.BreadcrumbLink=function({asChild:t,className:n,...r}){const o=t?m:"a";return e.jsx(o,{"data-slot":"breadcrumb-link",className:Rt("hover:text-foreground transition-colors",n),...r})},exports.BreadcrumbList=function({className:t,...n}){return e.jsx("ol",{"data-slot":"breadcrumb-list",className:Rt("text-muted-foreground flex flex-wrap items-center gap-1.5 break-words text-sm sm:gap-2.5",t),...n})},exports.BreadcrumbPage=function({className:t,...n}){return e.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:Rt("text-foreground font-normal",t),...n})},exports.BreadcrumbSeparator=function({children:t,className:n,...o}){return e.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:Rt("[&>svg]:size-3.5",n),...o,children:t??e.jsx(r.ChevronRight,{})})},exports.Button=Co,exports.ButtonGroup=function({className:t,orientation:n,...r}){return e.jsx("div",{role:"group","data-slot":"button-group","data-orientation":n,className:Rt(ra({orientation:n}),t),...r})},exports.ButtonGroupSeparator=function({className:t,orientation:n="vertical",...r}){return e.jsx(na,{"data-slot":"button-group-separator",orientation:n,className:Rt("bg-input relative !m-0 self-stretch data-[orientation=vertical]:h-auto",t),...r})},exports.ButtonGroupText=function({className:t,asChild:n=!1,...r}){const o=n?m:"div";return e.jsx(o,{className:Rt("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})},exports.Calendar=function({className:t,classNames:n,showOutsideDays:o=!0,captionLayout:a="label",buttonVariant:i="ghost",formatters:s,components:l,...c}){const u=Bi();return e.jsx(hs,{showOutsideDays:o,className:Rt("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:a,formatters:{formatMonthDropdown:e=>e.toLocaleString("default",{month:"short"}),...s},classNames:{root:Rt("w-fit",u.root),months:Rt("flex gap-4 flex-col md:flex-row relative",u.months),month:Rt("flex flex-col w-full gap-4",u.month),nav:Rt("flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between",u.nav),button_previous:Rt(ko({variant:i}),"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",u.button_previous),button_next:Rt(ko({variant:i}),"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",u.button_next),month_caption:Rt("flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)",u.month_caption),dropdowns:Rt("w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5",u.dropdowns),dropdown_root:Rt("relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md",u.dropdown_root),dropdown:Rt("absolute bg-popover inset-0 opacity-0",u.dropdown),caption_label:Rt("select-none font-medium","label"===a?"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",u.caption_label),table:"w-full border-collapse",weekdays:Rt("flex",u.weekdays),weekday:Rt("text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none",u.weekday),week:Rt("flex w-full mt-2",u.week),week_number_header:Rt("select-none w-(--cell-size)",u.week_number_header),week_number:Rt("text-[0.8rem] select-none text-muted-foreground",u.week_number),day:Rt("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",u.day),range_start:Rt("rounded-l-md bg-accent",u.range_start),range_middle:Rt("rounded-none",u.range_middle),range_end:Rt("rounded-r-md bg-accent",u.range_end),today:Rt("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",u.today),outside:Rt("text-muted-foreground aria-selected:text-muted-foreground",u.outside),disabled:Rt("text-muted-foreground opacity-50",u.disabled),hidden:Rt("invisible",u.hidden),...n},components:{Root:({className:t,rootRef:n,...r})=>e.jsx("div",{"data-slot":"calendar",ref:n,className:Rt(t),...r}),Chevron:({className:t,orientation:n,...o})=>"left"===n?e.jsx(r.ChevronLeftIcon,{className:Rt("size-4",t),...o}):"right"===n?e.jsx(r.ChevronRightIcon,{className:Rt("size-4",t),...o}):e.jsx(r.ChevronDownIcon,{className:Rt("size-4",t),...o}),DayButton:gs,WeekNumber:({children:t,...n})=>e.jsx("td",{...n,children:e.jsx("div",{className:"size-(--cell-size) flex items-center justify-center text-center",children:t})}),...l},...c})},exports.CalendarDayButton=gs,exports.Card=function({className:t,...n}){return e.jsx("div",{"data-slot":"card",className:Rt("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",t),...n})},exports.CardAction=function({className:t,...n}){return e.jsx("div",{"data-slot":"card-action",className:Rt("col-start-2 row-span-2 row-start-1 self-start justify-self-end",t),...n})},exports.CardContent=function({className:t,...n}){return e.jsx("div",{"data-slot":"card-content",className:Rt("px-6",t),...n})},exports.CardDescription=function({className:t,...n}){return e.jsx("div",{"data-slot":"card-description",className:Rt("text-muted-foreground text-sm",t),...n})},exports.CardFooter=function({className:t,...n}){return e.jsx("div",{"data-slot":"card-footer",className:Rt("[.border-t]:pt-6 flex items-center px-6",t),...n})},exports.CardHeader=function({className:t,...n}){return e.jsx("div",{"data-slot":"card-header",className:Rt("@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})},exports.CardTitle=function({className:t,...n}){return e.jsx("div",{"data-slot":"card-title",className:Rt("font-semibold leading-none",t),...n})},exports.Carousel=function({orientation:t="horizontal",opts:n,setApi:r,plugins:o,className:a,children:s,...l}){const[c,u]=nl({...n,axis:"horizontal"===t?"x":"y"},o),[d,f]=i.useState(!1),[p,m]=i.useState(!1),h=i.useCallback(e=>{e&&(f(e.canScrollPrev()),m(e.canScrollNext()))},[]),g=i.useCallback(()=>{u?.scrollPrev()},[u]),v=i.useCallback(()=>{u?.scrollNext()},[u]),b=i.useCallback(e=>{"ArrowLeft"===e.key?(e.preventDefault(),g()):"ArrowRight"===e.key&&(e.preventDefault(),v())},[g,v]);return i.useEffect(()=>{u&&r&&r(u)},[u,r]),i.useEffect(()=>{if(u)return h(u),u.on("reInit",h),u.on("select",h),()=>{u?.off("select",h)}},[u,h]),e.jsx(rl.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.jsx("div",{onKeyDownCapture:b,className:Rt("relative",a),role:"region","aria-roledescription":"carousel","data-slot":"carousel",...l,children:s})})},exports.CarouselContent=function({className:t,...n}){const{carouselRef:r,orientation:o}=ol();return e.jsx("div",{ref:r,className:"overflow-hidden","data-slot":"carousel-content",children:e.jsx("div",{className:Rt("flex","horizontal"===o?"-ml-4":"-mt-4 flex-col",t),...n})})},exports.CarouselItem=function({className:t,...n}){const{orientation:r}=ol();return e.jsx("div",{role:"group","aria-roledescription":"slide","data-slot":"carousel-item",className:Rt("min-w-0 shrink-0 grow-0 basis-full","horizontal"===r?"pl-4":"pt-4",t),...n})},exports.CarouselNext=function({className:t,variant:n="outline",size:o="icon",...a}){const{orientation:i,scrollNext:s,canScrollNext:l}=ol();return e.jsxs(Co,{"data-slot":"carousel-next",variant:n,size:o,className:Rt("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.jsx(r.ArrowRight,{}),e.jsx("span",{className:"sr-only",children:"Next slide"})]})},exports.CarouselPrevious=function({className:t,variant:n="outline",size:o="icon",...a}){const{orientation:i,scrollPrev:s,canScrollPrev:l}=ol();return e.jsxs(Co,{"data-slot":"carousel-previous",variant:n,size:o,className:Rt("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.jsx(r.ArrowLeft,{}),e.jsx("span",{className:"sr-only",children:"Previous slide"})]})},exports.ChartContainer=function({id:t,className:n,children:r,config:o,...a}){const s=i.useId(),l=`chart-${t||s.replace(/:/g,"")}`;return e.jsx(sM.Provider,{value:{config:o},children:e.jsxs("div",{"data-slot":"chart","data-chart":l,className:Rt("[&_.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",n),...a,children:[e.jsx(cM,{id:l,config:o}),e.jsx(th,{children:r})]})})},exports.ChartLegend=dM,exports.ChartLegendContent=function({className:t,hideIcon:n=!1,payload:r,verticalAlign:o="bottom",nameKey:a}){const{config:i}=lM();return r?.length?e.jsx("div",{className:Rt("flex items-center justify-center gap-4","top"===o?"pb-3":"pt-3",t),children:r.filter(e=>"none"!==e.type).map(t=>{const r=`${a||t.dataKey||"value"}`,o=fM(i,t,r);return e.jsxs("div",{className:Rt("[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3"),children:[o?.icon&&!n?e.jsx(o.icon,{}):e.jsx("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:t.color}}),o?.label]},t.value)})}):null},exports.ChartStyle=cM,exports.ChartTooltip=uM,exports.ChartTooltipContent=function({active:t,payload:n,className:r,indicator:o="dot",hideLabel:a=!1,hideIndicator:s=!1,label:l,labelFormatter:c,labelClassName:u,formatter:d,color:f,nameKey:p,labelKey:m}){const{config:h}=lM(),g=i.useMemo(()=>{if(a||!n?.length)return null;const[t]=n,r=fM(h,t,`${m||t?.dataKey||t?.name||"value"}`),o=m||"string"!=typeof l?r?.label:h[l]?.label||l;return c?e.jsx("div",{className:Rt("font-medium",u),children:c(o,n)}):o?e.jsx("div",{className:Rt("font-medium",u),children:o}):null},[l,c,n,a,u,h,m]);if(!t||!n?.length)return null;const v=1===n.length&&"dot"!==o;return e.jsxs("div",{className:Rt("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",r),children:[v?null:g,e.jsx("div",{className:"grid gap-1.5",children:n.filter(e=>"none"!==e.type).map((t,n)=>{const r=`${p||t.name||t.dataKey||"value"}`,a=fM(h,t,r),i=f||t.payload.fill||t.color;return e.jsx("div",{className:Rt("[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5","dot"===o&&"items-center"),children:d&&void 0!==t?.value&&t.name?d(t.value,t.name,t,n,t.payload):e.jsxs(e.Fragment,{children:[a?.icon?e.jsx(a.icon,{}):!s&&e.jsx("div",{className:Rt("border-(--color-border) bg-(--color-bg) shrink-0 rounded-[2px]",{"h-2.5 w-2.5":"dot"===o,"w-1":"line"===o,"w-0 border-[1.5px] border-dashed bg-transparent":"dashed"===o,"my-0.5":v&&"dashed"===o}),style:{"--color-bg":i,"--color-border":i}}),e.jsxs("div",{className:Rt("flex flex-1 justify-between leading-none",v?"items-end":"items-center"),children:[e.jsxs("div",{className:"grid gap-1.5",children:[v?g:null,e.jsx("span",{className:"text-muted-foreground",children:a?.label||t.name})]}),t.value&&e.jsx("span",{className:"text-foreground font-mono font-medium tabular-nums",children:t.value.toLocaleString()})]})]})},t.dataKey)})})]})},exports.Checkbox=function({className:t,...n}){return e.jsx(kM,{"data-slot":"checkbox",className:Rt("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.jsx(SM,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:e.jsx(r.CheckIcon,{className:"size-3.5"})})})},exports.Collapsible=function({...t}){return e.jsx(H,{"data-slot":"collapsible",...t})},exports.CollapsibleContent=function({...t}){return e.jsx(B,{"data-slot":"collapsible-content",...t})},exports.CollapsibleTrigger=function({...t}){return e.jsx(L,{"data-slot":"collapsible-trigger",...t})},exports.Command=CE,exports.CommandDialog=function({title:t="Command Palette",description:n="Search for a command to run...",children:r,className:o,showCloseButton:a=!0,...i}){return e.jsxs(gE,{...i,children:[e.jsxs(xE,{className:"sr-only",children:[e.jsx(wE,{children:t}),e.jsx(kE,{children:n})]}),e.jsx(yE,{className:Rt("overflow-hidden p-0",o),showCloseButton:a,children:e.jsx(CE,{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:r})})]})},exports.CommandEmpty=function({...t}){return e.jsx(aE.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t})},exports.CommandGroup=function({className:t,...n}){return e.jsx(aE.Group,{"data-slot":"command-group",className:Rt("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})},exports.CommandInput=function({className:t,...n}){return e.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[e.jsx(r.SearchIcon,{className:"size-4 shrink-0 opacity-50"}),e.jsx(aE.Input,{"data-slot":"command-input",className:Rt("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),...n})]})},exports.CommandItem=function({className:t,...n}){return e.jsx(aE.Item,{"data-slot":"command-item",className:Rt("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})},exports.CommandList=function({className:t,...n}){return e.jsx(aE.List,{"data-slot":"command-list",className:Rt("max-h-[300px] scroll-py-1 overflow-y-auto overflow-x-hidden",t),...n})},exports.CommandSeparator=function({className:t,...n}){return e.jsx(aE.Separator,{"data-slot":"command-separator",className:Rt("bg-border -mx-1 h-px",t),...n})},exports.CommandShortcut=function({className:t,...n}){return e.jsx("span",{"data-slot":"command-shortcut",className:Rt("text-muted-foreground ml-auto text-xs tracking-widest",t),...n})},exports.ContextMenu=function({...t}){return e.jsx(XP,{"data-slot":"context-menu",...t})},exports.ContextMenuCheckboxItem=function({className:t,children:n,checked:o,...a}){return e.jsxs(rT,{"data-slot":"context-menu-checkbox-item",className:Rt("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.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:e.jsx(iT,{children:e.jsx(r.CheckIcon,{className:"size-4"})})}),n]})},exports.ContextMenuContent=function({className:t,...n}){return e.jsx(QP,{children:e.jsx(JP,{"data-slot":"context-menu-content",className:Rt("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})})},exports.ContextMenuGroup=function({...t}){return e.jsx(eT,{"data-slot":"context-menu-group",...t})},exports.ContextMenuItem=function({className:t,inset:n,variant:r="default",...o}){return e.jsx(nT,{"data-slot":"context-menu-item","data-inset":n,"data-variant":r,className:Rt("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})},exports.ContextMenuLabel=function({className:t,inset:n,...r}){return e.jsx(tT,{"data-slot":"context-menu-label","data-inset":n,className:Rt("text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),...r})},exports.ContextMenuPortal=function({...t}){return e.jsx(QP,{"data-slot":"context-menu-portal",...t})},exports.ContextMenuRadioGroup=function({...t}){return e.jsx(oT,{"data-slot":"context-menu-radio-group",...t})},exports.ContextMenuRadioItem=function({className:t,children:n,...o}){return e.jsxs(aT,{"data-slot":"context-menu-radio-item",className:Rt("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.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:e.jsx(iT,{children:e.jsx(r.CircleIcon,{className:"size-2 fill-current"})})}),n]})},exports.ContextMenuSeparator=function({className:t,...n}){return e.jsx(sT,{"data-slot":"context-menu-separator",className:Rt("bg-border -mx-1 my-1 h-px",t),...n})},exports.ContextMenuShortcut=function({className:t,...n}){return e.jsx("span",{"data-slot":"context-menu-shortcut",className:Rt("text-muted-foreground ml-auto text-xs tracking-widest",t),...n})},exports.ContextMenuSub=function({...t}){return e.jsx(lT,{"data-slot":"context-menu-sub",...t})},exports.ContextMenuSubContent=function({className:t,...n}){return e.jsx(uT,{"data-slot":"context-menu-sub-content",className:Rt("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})},exports.ContextMenuSubTrigger=function({className:t,inset:n,children:o,...a}){return e.jsxs(cT,{"data-slot":"context-menu-sub-trigger","data-inset":n,className:Rt("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.jsx(r.ChevronRightIcon,{className:"ml-auto"})]})},exports.ContextMenuTrigger=function({...t}){return e.jsx(ZP,{"data-slot":"context-menu-trigger",...t})},exports.Dialog=gE,exports.DialogClose=function({...t}){return e.jsx(Vr,{"data-slot":"dialog-close",...t})},exports.DialogContent=yE,exports.DialogDescription=kE,exports.DialogFooter=function({className:t,...n}){return e.jsx("div",{"data-slot":"dialog-footer",className:Rt("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...n})},exports.DialogHeader=xE,exports.DialogOverlay=bE,exports.DialogPortal=vE,exports.DialogTitle=wE,exports.DialogTrigger=function({...t}){return e.jsx(Fr,{"data-slot":"dialog-trigger",...t})},exports.Drawer=function({...t}){return e.jsx(UT.Root,{"data-slot":"drawer",...t})},exports.DrawerClose=function({...t}){return e.jsx(UT.Close,{"data-slot":"drawer-close",...t})},exports.DrawerContent=function({className:t,children:n,...r}){return e.jsxs(VT,{"data-slot":"drawer-portal",children:[e.jsx(YT,{}),e.jsxs(UT.Content,{"data-slot":"drawer-content",className:Rt("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),...r,children:[e.jsx("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"}),n]})]})},exports.DrawerDescription=function({className:t,...n}){return e.jsx(UT.Description,{"data-slot":"drawer-description",className:Rt("text-muted-foreground text-sm",t),...n})},exports.DrawerFooter=function({className:t,...n}){return e.jsx("div",{"data-slot":"drawer-footer",className:Rt("mt-auto flex flex-col gap-2 p-4",t),...n})},exports.DrawerHeader=function({className:t,...n}){return e.jsx("div",{"data-slot":"drawer-header",className:Rt("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})},exports.DrawerOverlay=YT,exports.DrawerPortal=VT,exports.DrawerTitle=function({className:t,...n}){return e.jsx(UT.Title,{"data-slot":"drawer-title",className:Rt("text-foreground font-semibold",t),...n})},exports.DrawerTrigger=function({...t}){return e.jsx(UT.Trigger,{"data-slot":"drawer-trigger",...t})},exports.DropdownMenu=function({...t}){return e.jsx(hA,{"data-slot":"dropdown-menu",...t})},exports.DropdownMenuCheckboxItem=function({className:t,children:n,checked:o,...a}){return e.jsxs(kA,{"data-slot":"dropdown-menu-checkbox-item",className:Rt("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.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:e.jsx(jA,{children:e.jsx(r.CheckIcon,{className:"size-4"})})}),n]})},exports.DropdownMenuContent=function({className:t,sideOffset:n=4,...r}){return e.jsx(vA,{children:e.jsx(bA,{"data-slot":"dropdown-menu-content",sideOffset:n,className:Rt("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})})},exports.DropdownMenuGroup=function({...t}){return e.jsx(yA,{"data-slot":"dropdown-menu-group",...t})},exports.DropdownMenuItem=function({className:t,inset:n,variant:r="default",...o}){return e.jsx(wA,{"data-slot":"dropdown-menu-item","data-inset":n,"data-variant":r,className:Rt("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})},exports.DropdownMenuLabel=function({className:t,inset:n,...r}){return e.jsx(xA,{"data-slot":"dropdown-menu-label","data-inset":n,className:Rt("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),...r})},exports.DropdownMenuPortal=function({...t}){return e.jsx(vA,{"data-slot":"dropdown-menu-portal",...t})},exports.DropdownMenuRadioGroup=function({...t}){return e.jsx(CA,{"data-slot":"dropdown-menu-radio-group",...t})},exports.DropdownMenuRadioItem=function({className:t,children:n,...o}){return e.jsxs(SA,{"data-slot":"dropdown-menu-radio-item",className:Rt("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.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:e.jsx(jA,{children:e.jsx(r.CircleIcon,{className:"size-2 fill-current"})})}),n]})},exports.DropdownMenuSeparator=function({className:t,...n}){return e.jsx(NA,{"data-slot":"dropdown-menu-separator",className:Rt("bg-border -mx-1 my-1 h-px",t),...n})},exports.DropdownMenuShortcut=function({className:t,...n}){return e.jsx("span",{"data-slot":"dropdown-menu-shortcut",className:Rt("text-muted-foreground ml-auto text-xs tracking-widest",t),...n})},exports.DropdownMenuSub=function({...t}){return e.jsx(MA,{"data-slot":"dropdown-menu-sub",...t})},exports.DropdownMenuSubContent=function({className:t,...n}){return e.jsx(_A,{"data-slot":"dropdown-menu-sub-content",className:Rt("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})},exports.DropdownMenuSubTrigger=function({className:t,inset:n,children:o,...a}){return e.jsxs(EA,{"data-slot":"dropdown-menu-sub-trigger","data-inset":n,className:Rt("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.jsx(r.ChevronRightIcon,{className:"ml-auto size-4"})]})},exports.DropdownMenuTrigger=function({...t}){return e.jsx(gA,{"data-slot":"dropdown-menu-trigger",...t})},exports.Empty=function({className:t,...n}){return e.jsx("div",{"data-slot":"empty",className:Rt("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})},exports.EmptyContent=function({className:t,...n}){return e.jsx("div",{"data-slot":"empty-content",className:Rt("flex w-full min-w-0 max-w-sm flex-col items-center gap-4 text-balance text-sm",t),...n})},exports.EmptyDescription=function({className:t,...n}){return e.jsx("div",{"data-slot":"empty-description",className:Rt("text-muted-foreground [&>a:hover]:text-primary text-sm/relaxed [&>a]:underline [&>a]:underline-offset-4",t),...n})},exports.EmptyHeader=function({className:t,...n}){return e.jsx("div",{"data-slot":"empty-header",className:Rt("flex max-w-sm flex-col items-center gap-2 text-center",t),...n})},exports.EmptyMedia=function({className:t,variant:n="default",...r}){return e.jsx("div",{"data-slot":"empty-icon","data-variant":n,className:Rt(OA({variant:n,className:t})),...r})},exports.EmptyTitle=function({className:t,...n}){return e.jsx("div",{"data-slot":"empty-title",className:Rt("text-lg font-medium tracking-tight",t),...n})},exports.Field=function({className:t,orientation:n="vertical",...r}){return e.jsx("div",{role:"group","data-slot":"field","data-orientation":n,className:Rt(AA({orientation:n}),t),...r})},exports.FieldContent=function({className:t,...n}){return e.jsx("div",{"data-slot":"field-content",className:Rt("group/field-content flex flex-1 flex-col gap-1.5 leading-snug",t),...n})},exports.FieldDescription=function({className:t,...n}){return e.jsx("p",{"data-slot":"field-description",className:Rt("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})},exports.FieldError=function({className:n,children:r,errors:o,...a}){const i=t.useMemo(()=>r||(o?1===o?.length&&o[0]?.message?o[0].message:e.jsx("ul",{className:"ml-4 flex list-disc flex-col gap-1",children:o.map((t,n)=>t?.message&&e.jsx("li",{children:t.message},n))}):null),[r,o]);return i?e.jsx("div",{role:"alert","data-slot":"field-error",className:Rt("text-destructive text-sm font-normal",n),...a,children:i}):null},exports.FieldGroup=function({className:t,...n}){return e.jsx("div",{"data-slot":"field-group",className:Rt("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})},exports.FieldLabel=function({className:t,...n}){return e.jsx(TA,{"data-slot":"field-label",className:Rt("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})},exports.FieldLegend=function({className:t,variant:n="legend",...r}){return e.jsx("legend",{"data-slot":"field-legend","data-variant":n,className:Rt("mb-3 font-medium","data-[variant=legend]:text-base","data-[variant=label]:text-sm",t),...r})},exports.FieldSeparator=function({children:t,className:n,...r}){return e.jsxs("div",{"data-slot":"field-separator","data-content":!!t,className:Rt("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",n),...r,children:[e.jsx(na,{className:"absolute inset-0 top-1/2"}),t&&e.jsx("span",{className:"bg-background text-muted-foreground relative mx-auto block w-fit px-2","data-slot":"field-separator-content",children:t})]})},exports.FieldSet=function({className:t,...n}){return e.jsx("fieldset",{"data-slot":"field-set",className:Rt("flex flex-col gap-6","has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",t),...n})},exports.FieldTitle=function({className:t,...n}){return e.jsx("div",{"data-slot":"field-label",className:Rt("flex w-fit items-center gap-2 text-sm font-medium leading-snug group-data-[disabled=true]/field:opacity-50",t),...n})},exports.Form=RA,exports.FormControl=function({...t}){const{error:n,formItemId:r,formDescriptionId:o,formMessageId:a}=zA();return e.jsx(m,{"data-slot":"form-control",id:r,"aria-describedby":n?`${o} ${a}`:`${o}`,"aria-invalid":!!n,...t})},exports.FormDescription=function({className:t,...n}){const{formDescriptionId:r}=zA();return e.jsx("p",{"data-slot":"form-description",id:r,className:Rt("text-muted-foreground text-sm",t),...n})},exports.FormField=({...t})=>e.jsx(IA.Provider,{value:{name:t.name},children:e.jsx(o.Controller,{...t})}),exports.FormItem=function({className:t,...n}){const r=i.useId();return e.jsx(LA.Provider,{value:{id:r},children:e.jsx("div",{"data-slot":"form-item",className:Rt("grid gap-2",t),...n})})},exports.FormLabel=function({className:t,...n}){const{error:r,formItemId:o}=zA();return e.jsx(TA,{"data-slot":"form-label","data-error":!!r,className:Rt("data-[error=true]:text-destructive",t),htmlFor:o,...n})},exports.FormMessage=function({className:t,...n}){const{error:r,formMessageId:o}=zA(),a=r?String(r?.message??""):n.children;return a?e.jsx("p",{"data-slot":"form-message",id:o,className:Rt("text-destructive text-sm",t),...n,children:a}):null},exports.HoverCard=function({...t}){return e.jsx(rR,{"data-slot":"hover-card",...t})},exports.HoverCardContent=function({className:t,align:n="center",sideOffset:r=4,...o}){return e.jsx(aR,{"data-slot":"hover-card-portal",children:e.jsx(iR,{"data-slot":"hover-card-content",align:n,sideOffset:r,className:Rt("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})})},exports.HoverCardTrigger=function({...t}){return e.jsx(oR,{"data-slot":"hover-card-trigger",...t})},exports.Input=sR,exports.InputGroup=function({className:t,...n}){return e.jsx("div",{"data-slot":"input-group",role:"group",className:Rt("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})},exports.InputGroupAddon=function({className:t,align:n="inline-start",...r}){return e.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":n,className:Rt(cR({align:n}),t),onClick:e=>{e.target.closest("button")||e.currentTarget.parentElement?.querySelector("input")?.focus()},...r})},exports.InputGroupButton=function({className:t,type:n="button",variant:r="ghost",size:o="xs",...a}){return e.jsx(Co,{type:n,"data-size":o,variant:r,className:Rt(uR({size:o}),t),...a})},exports.InputGroupInput=function({className:t,...n}){return e.jsx(sR,{"data-slot":"input-group-control",className:Rt("flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent",t),...n})},exports.InputGroupText=function({className:t,...n}){return e.jsx("span",{className:Rt("text-muted-foreground flex items-center gap-2 text-sm [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none",t),...n})},exports.InputGroupTextarea=function({className:t,...n}){return e.jsx(lR,{"data-slot":"input-group-control",className:Rt("flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent",t),...n})},exports.InputOTP=function({className:t,containerClassName:n,...r}){return e.jsx(xR,{"data-slot":"input-otp",containerClassName:Rt("flex items-center gap-2 has-disabled:opacity-50",n),className:Rt("disabled:cursor-not-allowed",t),...r})},exports.InputOTPGroup=function({className:t,...n}){return e.jsx("div",{"data-slot":"input-otp-group",className:Rt("flex items-center",t),...n})},exports.InputOTPSeparator=function({...t}){return e.jsx("div",{"data-slot":"input-otp-separator",role:"separator",...t,children:e.jsx(r.MinusIcon,{})})},exports.InputOTPSlot=function({index:t,className:n,...r}){const o=i.useContext(yR),{char:a,hasFakeCaret:s,isActive:l}=o?.slots[t]??{};return e.jsxs("div",{"data-slot":"input-otp-slot","data-active":l,className:Rt("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]",n),...r,children:[a,s&&e.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:e.jsx("div",{className:"animate-caret-blink bg-foreground h-4 w-px duration-1000"})})]})},exports.Item=function({className:t,variant:n="default",size:r="default",asChild:o=!1,...a}){const i=o?m:"div";return e.jsx(i,{"data-slot":"item","data-variant":n,"data-size":r,className:Rt(CR({variant:n,size:r,className:t})),...a})},exports.ItemActions=function({className:t,...n}){return e.jsx("div",{"data-slot":"item-actions",className:Rt("flex items-center gap-2",t),...n})},exports.ItemContent=function({className:t,...n}){return e.jsx("div",{"data-slot":"item-content",className:Rt("flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none",t),...n})},exports.ItemDescription=function({className:t,...n}){return e.jsx("p",{"data-slot":"item-description",className:Rt("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})},exports.ItemFooter=function({className:t,...n}){return e.jsx("div",{"data-slot":"item-footer",className:Rt("flex basis-full items-center justify-between gap-2",t),...n})},exports.ItemGroup=function({className:t,...n}){return e.jsx("div",{role:"list","data-slot":"item-group",className:Rt("group/item-group flex flex-col",t),...n})},exports.ItemHeader=function({className:t,...n}){return e.jsx("div",{"data-slot":"item-header",className:Rt("flex basis-full items-center justify-between gap-2",t),...n})},exports.ItemMedia=function({className:t,variant:n="default",...r}){return e.jsx("div",{"data-slot":"item-media","data-variant":n,className:Rt(SR({variant:n,className:t})),...r})},exports.ItemSeparator=function({className:t,...n}){return e.jsx(na,{"data-slot":"item-separator",orientation:"horizontal",className:Rt("my-0",t),...n})},exports.ItemTitle=function({className:t,...n}){return e.jsx("div",{"data-slot":"item-title",className:Rt("flex w-fit items-center gap-2 text-sm font-medium leading-snug",t),...n})},exports.Kbd=function({className:t,...n}){return e.jsx("kbd",{"data-slot":"kbd",className:Rt("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})},exports.KbdGroup=function({className:t,...n}){return e.jsx("kbd",{"data-slot":"kbd-group",className:Rt("inline-flex items-center gap-1",t),...n})},exports.Label=TA,exports.Menubar=function({className:t,...n}){return e.jsx(rI,{"data-slot":"menubar",className:Rt("bg-background shadow-xs flex h-9 items-center gap-1 rounded-md border p-1",t),...n})},exports.MenubarCheckboxItem=function({className:t,children:n,checked:o,...a}){return e.jsxs(dI,{"data-slot":"menubar-checkbox-item",className:Rt("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.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:e.jsx(mI,{children:e.jsx(r.CheckIcon,{className:"size-4"})})}),n]})},exports.MenubarContent=function({className:t,align:n="start",alignOffset:r=-4,sideOffset:o=8,...a}){return e.jsx(yI,{children:e.jsx(sI,{"data-slot":"menubar-content",align:n,alignOffset:r,sideOffset:o,className:Rt("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})})},exports.MenubarGroup=function({...t}){return e.jsx(lI,{"data-slot":"menubar-group",...t})},exports.MenubarItem=function({className:t,inset:n,variant:r="default",...o}){return e.jsx(uI,{"data-slot":"menubar-item","data-inset":n,"data-variant":r,className:Rt("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})},exports.MenubarLabel=function({className:t,inset:n,...r}){return e.jsx(cI,{"data-slot":"menubar-label","data-inset":n,className:Rt("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),...r})},exports.MenubarMenu=function({...t}){return e.jsx(oI,{"data-slot":"menubar-menu",...t})},exports.MenubarPortal=yI,exports.MenubarRadioGroup=function({...t}){return e.jsx(fI,{"data-slot":"menubar-radio-group",...t})},exports.MenubarRadioItem=function({className:t,children:n,...o}){return e.jsxs(pI,{"data-slot":"menubar-radio-item",className:Rt("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.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:e.jsx(mI,{children:e.jsx(r.CircleIcon,{className:"size-2 fill-current"})})}),n]})},exports.MenubarSeparator=function({className:t,...n}){return e.jsx(hI,{"data-slot":"menubar-separator",className:Rt("bg-border -mx-1 my-1 h-px",t),...n})},exports.MenubarShortcut=function({className:t,...n}){return e.jsx("span",{"data-slot":"menubar-shortcut",className:Rt("text-muted-foreground ml-auto text-xs tracking-widest",t),...n})},exports.MenubarSub=function({...t}){return e.jsx(gI,{"data-slot":"menubar-sub",...t})},exports.MenubarSubContent=function({className:t,...n}){return e.jsx(bI,{"data-slot":"menubar-sub-content",className:Rt("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})},exports.MenubarSubTrigger=function({className:t,inset:n,children:o,...a}){return e.jsxs(vI,{"data-slot":"menubar-sub-trigger","data-inset":n,className:Rt("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.jsx(r.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]})},exports.MenubarTrigger=function({className:t,...n}){return e.jsx(aI,{"data-slot":"menubar-trigger",className:Rt("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})},exports.NavigationMenu=function({className:t,children:n,viewport:r=!0,...o}){return e.jsxs(gz,{"data-slot":"navigation-menu","data-viewport":r,className:Rt("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",t),...o,children:[n,r&&e.jsx(jz,{})]})},exports.NavigationMenuContent=function({className:t,...n}){return e.jsx(kz,{"data-slot":"navigation-menu-content",className:Rt("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})},exports.NavigationMenuIndicator=function({className:t,...n}){return e.jsx(wz,{"data-slot":"navigation-menu-indicator",className:Rt("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.jsx("div",{className:"bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md"})})},exports.NavigationMenuItem=function({className:t,...n}){return e.jsx(bz,{"data-slot":"navigation-menu-item",className:Rt("relative",t),...n})},exports.NavigationMenuLink=function({className:t,...n}){return e.jsx(xz,{"data-slot":"navigation-menu-link",className:Rt("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})},exports.NavigationMenuList=function({className:t,...n}){return e.jsx(vz,{"data-slot":"navigation-menu-list",className:Rt("group flex flex-1 list-none items-center justify-center gap-1",t),...n})},exports.NavigationMenuTrigger=function({className:t,children:n,...o}){return e.jsxs(yz,{"data-slot":"navigation-menu-trigger",className:Rt(Sz(),"group",t),...o,children:[n," ",e.jsx(r.ChevronDownIcon,{className:"relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180","aria-hidden":"true"})]})},exports.NavigationMenuViewport=jz,exports.Pagination=function({className:t,...n}){return e.jsx("nav",{role:"navigation","aria-label":"pagination","data-slot":"pagination",className:Rt("mx-auto flex w-full justify-center",t),...n})},exports.PaginationContent=function({className:t,...n}){return e.jsx("ul",{"data-slot":"pagination-content",className:Rt("flex flex-row items-center gap-1",t),...n})},exports.PaginationEllipsis=function({className:t,...n}){return e.jsxs("span",{"aria-hidden":!0,"data-slot":"pagination-ellipsis",className:Rt("flex size-9 items-center justify-center",t),...n,children:[e.jsx(r.MoreHorizontalIcon,{className:"size-4"}),e.jsx("span",{className:"sr-only",children:"More pages"})]})},exports.PaginationItem=function({...t}){return e.jsx("li",{"data-slot":"pagination-item",...t})},exports.PaginationLink=Nz,exports.PaginationNext=function({className:t,...n}){return e.jsxs(Nz,{"aria-label":"Go to next page",size:"default",className:Rt("gap-1 px-2.5 sm:pr-2.5",t),...n,children:[e.jsx("span",{className:"hidden sm:block",children:"Next"}),e.jsx(r.ChevronRightIcon,{})]})},exports.PaginationPrevious=function({className:t,...n}){return e.jsxs(Nz,{"aria-label":"Go to previous page",size:"default",className:Rt("gap-1 px-2.5 sm:pl-2.5",t),...n,children:[e.jsx(r.ChevronLeftIcon,{}),e.jsx("span",{className:"hidden sm:block",children:"Previous"})]})},exports.Popover=function({...t}){return e.jsx(Zz,{"data-slot":"popover",...t})},exports.PopoverAnchor=function({...t}){return e.jsx(Qz,{"data-slot":"popover-anchor",...t})},exports.PopoverContent=function({className:t,align:n="center",sideOffset:r=4,...o}){return e.jsx(eL,{children:e.jsx(tL,{"data-slot":"popover-content",align:n,sideOffset:r,className:Rt("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})})},exports.PopoverTrigger=function({...t}){return e.jsx(Jz,{"data-slot":"popover-trigger",...t})},exports.Progress=function({className:t,value:n,...r}){return e.jsx(hL,{"data-slot":"progress",className:Rt("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",t),...r,children:e.jsx(gL,{"data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all",style:{transform:`translateX(-${100-(n||0)}%)`}})})},exports.RadioGroup=function({className:t,...n}){return e.jsx(LL,{"data-slot":"radio-group",className:Rt("grid gap-3",t),...n})},exports.RadioGroupItem=function({className:t,...n}){return e.jsx(FL,{"data-slot":"radio-group-item",className:Rt("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.jsx(BL,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:e.jsx(r.CircleIcon,{className:"fill-primary absolute left-1/2 top-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})},exports.ResizableHandle=function({withHandle:t,className:n,...o}){return e.jsx(yB,{"data-slot":"resizable-handle",className:Rt("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),...o,children:t&&e.jsx("div",{className:"bg-border rounded-xs z-10 flex h-4 w-3 items-center justify-center border",children:e.jsx(r.GripVerticalIcon,{className:"size-2.5"})})})},exports.ResizablePanel=function({...t}){return e.jsx(sF,{"data-slot":"resizable-panel",...t})},exports.ResizablePanelGroup=function({className:t,...n}){return e.jsx(gB,{"data-slot":"resizable-panel-group",className:Rt("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),...n})},exports.ScrollArea=function({className:t,children:n,...r}){return e.jsxs(e$,{"data-slot":"scroll-area",className:Rt("relative",t),...r,children:[e.jsx(t$,{"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:n}),e.jsx(r$,{}),e.jsx(n$,{})]})},exports.ScrollBar=r$,exports.Select=function({...t}){return e.jsx(lW,{"data-slot":"select",...t})},exports.SelectContent=function({className:t,children:n,position:r="popper",align:o="center",...a}){return e.jsx(fW,{children:e.jsxs(pW,{"data-slot":"select-content",className:Rt("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"===r&&"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:r,align:o,...a,children:[e.jsx(CW,{}),e.jsx(mW,{className:Rt("p-1","popper"===r&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:n}),e.jsx(SW,{})]})})},exports.SelectGroup=function({...t}){return e.jsx(hW,{"data-slot":"select-group",...t})},exports.SelectItem=function({className:t,children:n,...o}){return e.jsxs(vW,{"data-slot":"select-item",className:Rt("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.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:e.jsx(yW,{children:e.jsx(r.CheckIcon,{className:"size-4"})})}),e.jsx(bW,{children:n})]})},exports.SelectLabel=function({className:t,...n}){return e.jsx(gW,{"data-slot":"select-label",className:Rt("text-muted-foreground px-2 py-1.5 text-xs",t),...n})},exports.SelectScrollDownButton=SW,exports.SelectScrollUpButton=CW,exports.SelectSeparator=function({className:t,...n}){return e.jsx(kW,{"data-slot":"select-separator",className:Rt("bg-border pointer-events-none -mx-1 my-1 h-px",t),...n})},exports.SelectTrigger=function({className:t,size:n="default",children:o,...a}){return e.jsxs(cW,{"data-slot":"select-trigger","data-size":n,className:Rt("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.jsx(dW,{asChild:!0,children:e.jsx(r.ChevronDownIcon,{className:"size-4 opacity-50"})})]})},exports.SelectValue=function({...t}){return e.jsx(uW,{"data-slot":"select-value",...t})},exports.Separator=na,exports.Sheet=jW,exports.SheetClose=function({...t}){return e.jsx(Vr,{"data-slot":"sheet-close",...t})},exports.SheetContent=EW,exports.SheetDescription=DW,exports.SheetFooter=function({className:t,...n}){return e.jsx("div",{"data-slot":"sheet-footer",className:Rt("mt-auto flex flex-col gap-2 p-4",t),...n})},exports.SheetHeader=_W,exports.SheetTitle=OW,exports.SheetTrigger=function({...t}){return e.jsx(Fr,{"data-slot":"sheet-trigger",...t})},exports.Sidebar=function({side:t="left",variant:n="sidebar",collapsible:r="offcanvas",className:o,children:a,...i}){const{isMobile:s,state:l,openMobile:c,setOpenMobile:u}=vH();return"none"===r?e.jsx("div",{"data-slot":"sidebar",className:Rt("bg-sidebar text-sidebar-foreground w-(--sidebar-width) flex h-full flex-col",o),...i,children:a}):s?e.jsx(jW,{open:c,onOpenChange:u,...i,children:e.jsxs(EW,{"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:[e.jsxs(_W,{className:"sr-only",children:[e.jsx(OW,{children:"Sidebar"}),e.jsx(DW,{children:"Displays the mobile sidebar."})]}),e.jsx("div",{className:"flex h-full w-full flex-col",children:a})]})}):e.jsxs("div",{className:"text-sidebar-foreground group peer hidden md:block","data-state":l,"data-collapsible":"collapsed"===l?r:"","data-variant":n,"data-side":t,"data-slot":"sidebar",children:[e.jsx("div",{"data-slot":"sidebar-gap",className:Rt("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"===n||"inset"===n?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),e.jsx("div",{"data-slot":"sidebar-container",className:Rt("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"===n||"inset"===n?"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",o),...i,children:e.jsx("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:a})})]})},exports.SidebarContent=function({className:t,...n}){return e.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:Rt("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t),...n})},exports.SidebarFooter=function({className:t,...n}){return e.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:Rt("flex flex-col gap-2 p-2",t),...n})},exports.SidebarGroup=function({className:t,...n}){return e.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:Rt("relative flex w-full min-w-0 flex-col p-2",t),...n})},exports.SidebarGroupAction=function({className:t,asChild:n=!1,...r}){const o=n?m:"button";return e.jsx(o,{"data-slot":"sidebar-group-action","data-sidebar":"group-action",className:Rt("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})},exports.SidebarGroupContent=function({className:t,...n}){return e.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:Rt("w-full text-sm",t),...n})},exports.SidebarGroupLabel=function({className:t,asChild:n=!1,...r}){const o=n?m:"div";return e.jsx(o,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:Rt("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})},exports.SidebarHeader=function({className:t,...n}){return e.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:Rt("flex flex-col gap-2 p-2",t),...n})},exports.SidebarInput=function({className:t,...n}){return e.jsx(sR,{"data-slot":"sidebar-input","data-sidebar":"input",className:Rt("bg-background h-8 w-full shadow-none",t),...n})},exports.SidebarInset=function({className:t,...n}){return e.jsx("main",{"data-slot":"sidebar-inset",className:Rt("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})},exports.SidebarMenu=function({className:t,...n}){return e.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:Rt("flex w-full min-w-0 flex-col gap-1",t),...n})},exports.SidebarMenuAction=function({className:t,asChild:n=!1,showOnHover:r=!1,...o}){const a=n?m:"button";return e.jsx(a,{"data-slot":"sidebar-menu-action","data-sidebar":"menu-action",className:Rt("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})},exports.SidebarMenuBadge=function({className:t,...n}){return e.jsx("div",{"data-slot":"sidebar-menu-badge","data-sidebar":"menu-badge",className:Rt("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})},exports.SidebarMenuButton=function({asChild:t=!1,isActive:n=!1,variant:r="default",size:o="default",tooltip:a,className:i,...s}){const l=t?m:"button",{isMobile:c,state:u}=vH(),d=e.jsx(l,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":o,"data-active":n,className:Rt(bH({variant:r,size:o}),i),...s});return a?("string"==typeof a&&(a={children:a}),e.jsxs(pH,{children:[e.jsx(mH,{asChild:!0,children:d}),e.jsx(hH,{side:"right",align:"center",hidden:"collapsed"!==u||c,...a})]})):d},exports.SidebarMenuItem=function({className:t,...n}){return e.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:Rt("group/menu-item relative",t),...n})},exports.SidebarMenuSkeleton=function({className:t,showIcon:n=!1,...r}){const o=i.useMemo(()=>`${Math.floor(40*Math.random())+50}%`,[]);return e.jsxs("div",{"data-slot":"sidebar-menu-skeleton","data-sidebar":"menu-skeleton",className:Rt("flex h-8 items-center gap-2 rounded-md px-2",t),...r,children:[n&&e.jsx(PW,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),e.jsx(PW,{className:"max-w-(--skeleton-width) h-4 flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})},exports.SidebarMenuSub=function({className:t,...n}){return e.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:Rt("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})},exports.SidebarMenuSubButton=function({asChild:t=!1,size:n="md",isActive:r=!1,className:o,...a}){const i=t?m:"a";return e.jsx(i,{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button","data-size":n,"data-active":r,className:Rt("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})},exports.SidebarMenuSubItem=function({className:t,...n}){return e.jsx("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:Rt("group/menu-sub-item relative",t),...n})},exports.SidebarProvider=function({defaultOpen:t=!0,open:n,onOpenChange:r,className:o,style:a,children:s,...l}){const c=function(){const[e,t]=i.useState(void 0);return i.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]=i.useState(!1),[f,p]=i.useState(t),m=n??f,h=i.useCallback(e=>{const t="function"==typeof e?e(m):e;r?r(t):p(t),document.cookie=`sidebar_state=${t}; path=/; max-age=604800`},[r,m]),g=i.useCallback(()=>c?d(e=>!e):h(e=>!e),[c,h,d]);i.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",b=i.useMemo(()=>({state:v,open:m,setOpen:h,isMobile:c,openMobile:u,setOpenMobile:d,toggleSidebar:g}),[v,m,h,c,u,d,g]);return e.jsx(gH.Provider,{value:b,children:e.jsx(fH,{delayDuration:0,children:e.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":"16rem","--sidebar-width-icon":"3rem",...a},className:Rt("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",o),...l,children:s})})})},exports.SidebarRail=function({className:t,...n}){const{toggleSidebar:r}=vH();return e.jsx("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:Rt("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})},exports.SidebarSeparator=function({className:t,...n}){return e.jsx(na,{"data-slot":"sidebar-separator","data-sidebar":"separator",className:Rt("bg-sidebar-border mx-2 w-auto",t),...n})},exports.SidebarTrigger=function({className:t,onClick:n,...o}){const{toggleSidebar:a}=vH();return e.jsxs(Co,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:Rt("size-7",t),onClick:e=>{n?.(e),a()},...o,children:[e.jsx(r.PanelLeftIcon,{}),e.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})},exports.Skeleton=PW,exports.Slider=function({className:t,defaultValue:n,value:r,min:o=0,max:a=100,...s}){const l=i.useMemo(()=>Array.isArray(r)?r:Array.isArray(n)?n:[o,a],[r,n,o,a]);return e.jsxs(VH,{"data-slot":"slider",defaultValue:n,value:r,min:o,max:a,className:Rt("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),...s,children:[e.jsx(YH,{"data-slot":"slider-track",className:Rt("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.jsx(KH,{"data-slot":"slider-range",className:Rt("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:l.length},(t,n)=>e.jsx(qH,{"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))]})},exports.Spinner=function({className:t,...n}){return e.jsx(r.Loader2Icon,{role:"status","aria-label":"Loading",className:Rt("size-4 animate-spin",t),...n})},exports.Switch=function({className:t,...n}){return e.jsx(NU,{"data-slot":"switch",className:Rt("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.jsx(MU,{"data-slot":"switch-thumb",className:Rt("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")})})},exports.Table=function({className:t,...n}){return e.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:e.jsx("table",{"data-slot":"table",className:Rt("w-full caption-bottom text-sm",t),...n})})},exports.TableBody=function({className:t,...n}){return e.jsx("tbody",{"data-slot":"table-body",className:Rt("[&_tr:last-child]:border-0",t),...n})},exports.TableCaption=function({className:t,...n}){return e.jsx("caption",{"data-slot":"table-caption",className:Rt("text-muted-foreground mt-4 text-sm",t),...n})},exports.TableCell=function({className:t,...n}){return e.jsx("td",{"data-slot":"table-cell",className:Rt("whitespace-nowrap p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),...n})},exports.TableFooter=function({className:t,...n}){return e.jsx("tfoot",{"data-slot":"table-footer",className:Rt("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",t),...n})},exports.TableHead=function({className:t,...n}){return e.jsx("th",{"data-slot":"table-head",className:Rt("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})},exports.TableHeader=function({className:t,...n}){return e.jsx("thead",{"data-slot":"table-header",className:Rt("[&_tr]:border-b",t),...n})},exports.TableRow=function({className:t,...n}){return e.jsx("tr",{"data-slot":"table-row",className:Rt("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",t),...n})},exports.Tabs=function({className:t,...n}){return e.jsx(WU,{"data-slot":"tabs",className:Rt("flex flex-col gap-2",t),...n})},exports.TabsContent=function({className:t,...n}){return e.jsx(VU,{"data-slot":"tabs-content",className:Rt("flex-1 outline-none",t),...n})},exports.TabsList=function({className:t,...n}){return e.jsx(HU,{"data-slot":"tabs-list",className:Rt("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",t),...n})},exports.TabsTrigger=function({className:t,...n}){return e.jsx(UU,{"data-slot":"tabs-trigger",className:Rt("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})},exports.Textarea=lR,exports.Toaster=({...t})=>{const{theme:n="system"}=null!=(r=i.useContext(XH))?r:ZH;var r;return e.jsx(gU,{theme:n,className:"toaster group",style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},...t})},exports.Toggle=function({className:t,variant:n,size:r,...o}){return e.jsx(qU,{"data-slot":"toggle",className:Rt(dV({variant:n,size:r,className:t})),...o})},exports.ToggleGroup=function({className:t,variant:n,size:r,children:o,...a}){return e.jsx(cV,{"data-slot":"toggle-group","data-variant":n,"data-size":r,className:Rt("group/toggle-group data-[variant=outline]:shadow-xs flex w-fit items-center rounded-md",t),...a,children:e.jsx(fV.Provider,{value:{variant:n,size:r},children:o})})},exports.ToggleGroupItem=function({className:t,children:n,variant:r,size:o,...a}){const s=i.useContext(fV);return e.jsx(uV,{"data-slot":"toggle-group-item","data-variant":s.variant||r,"data-size":s.size||o,className:Rt(dV({variant:s.variant||r,size:s.size||o}),"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),...a,children:n})},exports.Tooltip=pH,exports.TooltipContent=hH,exports.TooltipProvider=fH,exports.TooltipTrigger=mH,exports.badgeVariants=Zo,exports.buttonGroupVariants=ra,exports.buttonVariants=ko,exports.cn=Rt,exports.navigationMenuTriggerStyle=Sz,exports.toggleVariants=dV,exports.useFormField=zA,exports.useIsMobile=function(){const[e,n]=t.useState(void 0);return t.useEffect(()=>{const e=window.matchMedia("(max-width: 767px)"),t=()=>{n(window.innerWidth<768)};return e.addEventListener("change",t),n(window.innerWidth<768),()=>e.removeEventListener("change",t)},[]),!!e},exports.useSidebar=vH;
20
+ //# sourceMappingURL=index.cjs.map