@cosmicstack/mercury-agent 1.1.7 → 1.1.9

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 (147) hide show
  1. package/README.md +36 -2
  2. package/dist/index.js +10142 -4331
  3. package/dist/index.js.map +1 -1
  4. package/dist/web/static/vendor/geist/Geist-Italic[wght].woff2 +0 -0
  5. package/dist/web/static/vendor/geist/Geist-Variable.woff2 +0 -0
  6. package/dist/web/static/vendor/geist/GeistMono-Italic[wght].woff2 +0 -0
  7. package/dist/web/static/vendor/geist/GeistMono-Variable.woff2 +0 -0
  8. package/dist/web/static/vendor/graphology.min.js +2 -0
  9. package/dist/web/static/vendor/icons.svg +108 -0
  10. package/dist/web/static/vendor/sql-wasm.wasm +0 -0
  11. package/dist/web/ui/assets/Chat-DCFkzIwn.js +28 -0
  12. package/dist/web/ui/assets/Chat-DCFkzIwn.js.map +1 -0
  13. package/dist/web/ui/assets/Dashboard-B81ollv8.js +2 -0
  14. package/dist/web/ui/assets/Dashboard-B81ollv8.js.map +1 -0
  15. package/dist/web/ui/assets/Goals-D0cR8yIP.js +12 -0
  16. package/dist/web/ui/assets/Goals-D0cR8yIP.js.map +1 -0
  17. package/dist/web/ui/assets/Graph-C3eHp3_J.js +7 -0
  18. package/dist/web/ui/assets/Graph-C3eHp3_J.js.map +1 -0
  19. package/dist/web/ui/assets/Kanban-DrkTRyni.js +45 -0
  20. package/dist/web/ui/assets/Kanban-DrkTRyni.js.map +1 -0
  21. package/dist/web/ui/assets/Login-GRQ-LjgN.js +2 -0
  22. package/dist/web/ui/assets/Login-GRQ-LjgN.js.map +1 -0
  23. package/dist/web/ui/assets/MarkdownRenderer-Dvh1jwyj.js +22 -0
  24. package/dist/web/ui/assets/MarkdownRenderer-Dvh1jwyj.js.map +1 -0
  25. package/dist/web/ui/assets/Memory-dAZsKmWz.js +12 -0
  26. package/dist/web/ui/assets/Memory-dAZsKmWz.js.map +1 -0
  27. package/dist/web/ui/assets/Permissions-DCiyUUfI.js +17 -0
  28. package/dist/web/ui/assets/Permissions-DCiyUUfI.js.map +1 -0
  29. package/dist/web/ui/assets/PersonDetail-iZgApJog.js +2 -0
  30. package/dist/web/ui/assets/PersonDetail-iZgApJog.js.map +1 -0
  31. package/dist/web/ui/assets/Persons-Bs_HhYjC.js +2 -0
  32. package/dist/web/ui/assets/Persons-Bs_HhYjC.js.map +1 -0
  33. package/dist/web/ui/assets/Providers-CL6wMWni.js +7 -0
  34. package/dist/web/ui/assets/Providers-CL6wMWni.js.map +1 -0
  35. package/dist/web/ui/assets/Schedules-BQwE1hP5.js +17 -0
  36. package/dist/web/ui/assets/Schedules-BQwE1hP5.js.map +1 -0
  37. package/dist/web/ui/assets/Settings-26SF-okR.js +12 -0
  38. package/dist/web/ui/assets/Settings-26SF-okR.js.map +1 -0
  39. package/dist/web/ui/assets/Skills-DANyYK_d.js +7 -0
  40. package/dist/web/ui/assets/Skills-DANyYK_d.js.map +1 -0
  41. package/dist/web/ui/assets/Tasks-DbwRozzx.js +7 -0
  42. package/dist/web/ui/assets/Tasks-DbwRozzx.js.map +1 -0
  43. package/dist/web/ui/assets/Usage-i_q6Ri4s.js +12 -0
  44. package/dist/web/ui/assets/Usage-i_q6Ri4s.js.map +1 -0
  45. package/dist/web/ui/assets/Workspace-ZR5syf-9.js +52 -0
  46. package/dist/web/ui/assets/Workspace-ZR5syf-9.js.map +1 -0
  47. package/dist/web/ui/assets/activity-CIP1IzSg.js +7 -0
  48. package/dist/web/ui/assets/activity-CIP1IzSg.js.map +1 -0
  49. package/dist/web/ui/assets/alert-dialog-CW-j2nG4.js +7 -0
  50. package/dist/web/ui/assets/alert-dialog-CW-j2nG4.js.map +1 -0
  51. package/dist/web/ui/assets/arrow-left-D2YO-iMS.js +7 -0
  52. package/dist/web/ui/assets/arrow-left-D2YO-iMS.js.map +1 -0
  53. package/dist/web/ui/assets/avatar-BLsf3GhK.js +7 -0
  54. package/dist/web/ui/assets/avatar-BLsf3GhK.js.map +1 -0
  55. package/dist/web/ui/assets/badge-DfDJNUtd.js +2 -0
  56. package/dist/web/ui/assets/badge-DfDJNUtd.js.map +1 -0
  57. package/dist/web/ui/assets/button-TaFPR-zy.js +2 -0
  58. package/dist/web/ui/assets/button-TaFPR-zy.js.map +1 -0
  59. package/dist/web/ui/assets/card-DAYo4Zl5.js +2 -0
  60. package/dist/web/ui/assets/card-DAYo4Zl5.js.map +1 -0
  61. package/dist/web/ui/assets/chevron-down-CQi0yuay.js +12 -0
  62. package/dist/web/ui/assets/chevron-down-CQi0yuay.js.map +1 -0
  63. package/dist/web/ui/assets/circle-check-DweDcOkA.js +7 -0
  64. package/dist/web/ui/assets/circle-check-DweDcOkA.js.map +1 -0
  65. package/dist/web/ui/assets/circle-x-BmL20etA.js +7 -0
  66. package/dist/web/ui/assets/circle-x-BmL20etA.js.map +1 -0
  67. package/dist/web/ui/assets/collapsible-BU_K9n8f.js +2 -0
  68. package/dist/web/ui/assets/collapsible-BU_K9n8f.js.map +1 -0
  69. package/dist/web/ui/assets/dialog-DovgkMhT.js +2 -0
  70. package/dist/web/ui/assets/dialog-DovgkMhT.js.map +1 -0
  71. package/dist/web/ui/assets/download-_QBatDio.js +7 -0
  72. package/dist/web/ui/assets/download-_QBatDio.js.map +1 -0
  73. package/dist/web/ui/assets/eye-Wpgtfmgw.js +7 -0
  74. package/dist/web/ui/assets/eye-Wpgtfmgw.js.map +1 -0
  75. package/dist/web/ui/assets/file-text-2EGFNyc1.js +7 -0
  76. package/dist/web/ui/assets/file-text-2EGFNyc1.js.map +1 -0
  77. package/dist/web/ui/assets/folder-open-C-OiZn9P.js +7 -0
  78. package/dist/web/ui/assets/folder-open-C-OiZn9P.js.map +1 -0
  79. package/dist/web/ui/assets/git-branch-BT9gCKgG.js +7 -0
  80. package/dist/web/ui/assets/git-branch-BT9gCKgG.js.map +1 -0
  81. package/dist/web/ui/assets/index-BhxU0YlT.js +163 -0
  82. package/dist/web/ui/assets/index-BhxU0YlT.js.map +1 -0
  83. package/dist/web/ui/assets/index-CUT6Fr2C.js +2 -0
  84. package/dist/web/ui/assets/index-CUT6Fr2C.js.map +1 -0
  85. package/dist/web/ui/assets/index-DOw1nKre.css +1 -0
  86. package/dist/web/ui/assets/input-L1uz5xAQ.js +2 -0
  87. package/dist/web/ui/assets/input-L1uz5xAQ.js.map +1 -0
  88. package/dist/web/ui/assets/loader-circle-BTFgt3hG.js +7 -0
  89. package/dist/web/ui/assets/loader-circle-BTFgt3hG.js.map +1 -0
  90. package/dist/web/ui/assets/pencil-uxK07iYy.js +7 -0
  91. package/dist/web/ui/assets/pencil-uxK07iYy.js.map +1 -0
  92. package/dist/web/ui/assets/plus-DcWFYr4m.js +7 -0
  93. package/dist/web/ui/assets/plus-DcWFYr4m.js.map +1 -0
  94. package/dist/web/ui/assets/power-DVIqVIMj.js +12 -0
  95. package/dist/web/ui/assets/power-DVIqVIMj.js.map +1 -0
  96. package/dist/web/ui/assets/progress-DMwOdxli.js +2 -0
  97. package/dist/web/ui/assets/progress-DMwOdxli.js.map +1 -0
  98. package/dist/web/ui/assets/search-D1OOxb1X.js +7 -0
  99. package/dist/web/ui/assets/search-D1OOxb1X.js.map +1 -0
  100. package/dist/web/ui/assets/select-Dnx_bUgy.js +2 -0
  101. package/dist/web/ui/assets/select-Dnx_bUgy.js.map +1 -0
  102. package/dist/web/ui/assets/send-D4uxqmyH.js +7 -0
  103. package/dist/web/ui/assets/send-D4uxqmyH.js.map +1 -0
  104. package/dist/web/ui/assets/sparkles-DLSJA4xU.js +7 -0
  105. package/dist/web/ui/assets/sparkles-DLSJA4xU.js.map +1 -0
  106. package/dist/web/ui/assets/switch-CvDDbCUA.js +2 -0
  107. package/dist/web/ui/assets/switch-CvDDbCUA.js.map +1 -0
  108. package/dist/web/ui/assets/terminal-DI3J3W_z.js +7 -0
  109. package/dist/web/ui/assets/terminal-DI3J3W_z.js.map +1 -0
  110. package/dist/web/ui/assets/textarea-CXLsr8tf.js +2 -0
  111. package/dist/web/ui/assets/textarea-CXLsr8tf.js.map +1 -0
  112. package/dist/web/ui/assets/vendor-dnd-DRBSMxXo.js +6 -0
  113. package/dist/web/ui/assets/vendor-dnd-DRBSMxXo.js.map +1 -0
  114. package/dist/web/ui/assets/vendor-markdown-DwTbvico.js +30 -0
  115. package/dist/web/ui/assets/vendor-markdown-DwTbvico.js.map +1 -0
  116. package/dist/web/ui/assets/vendor-motion-Dwx3-JO5.js +18 -0
  117. package/dist/web/ui/assets/vendor-motion-Dwx3-JO5.js.map +1 -0
  118. package/dist/web/ui/assets/vendor-radix-3UdfCgs_.js +65 -0
  119. package/dist/web/ui/assets/vendor-radix-3UdfCgs_.js.map +1 -0
  120. package/dist/web/ui/assets/vendor-react-C7pctHW3.js +44 -0
  121. package/dist/web/ui/assets/vendor-react-C7pctHW3.js.map +1 -0
  122. package/dist/web/ui/assets/vendor-syntax-xZUI6Op9.js +17 -0
  123. package/dist/web/ui/assets/vendor-syntax-xZUI6Op9.js.map +1 -0
  124. package/dist/web/ui/assets/zap-C-0oH5gt.js +7 -0
  125. package/dist/web/ui/assets/zap-C-0oH5gt.js.map +1 -0
  126. package/dist/web/ui/favicon.svg +10 -0
  127. package/dist/web/ui/icons/icon-192.svg +10 -0
  128. package/dist/web/ui/icons/icon-512-maskable.svg +10 -0
  129. package/dist/web/ui/icons/icon-512.svg +10 -0
  130. package/dist/web/ui/index.html +24 -0
  131. package/dist/web/ui/logo-dark.png +0 -0
  132. package/dist/web/ui/logo-full-dark.png +0 -0
  133. package/dist/web/ui/logo-full-light.png +0 -0
  134. package/dist/web/ui/logo-light.png +0 -0
  135. package/dist/web/ui/manifest.webmanifest +1 -0
  136. package/dist/web/ui/registerSW.js +1 -0
  137. package/dist/web/ui/sw.js +11 -0
  138. package/dist/web/ui/sw.js.map +1 -0
  139. package/dist/web/ui/workbox-0bb07689.js +3 -0
  140. package/dist/web/ui/workbox-0bb07689.js.map +1 -0
  141. package/package.json +11 -6
  142. package/src/web/static/vendor/geist/Geist-Italic[wght].woff2 +0 -0
  143. package/src/web/static/vendor/geist/Geist-Variable.woff2 +0 -0
  144. package/src/web/static/vendor/geist/GeistMono-Italic[wght].woff2 +0 -0
  145. package/src/web/static/vendor/geist/GeistMono-Variable.woff2 +0 -0
  146. package/src/web/static/vendor/graphology.min.js +2 -0
  147. package/src/web/static/vendor/icons.svg +108 -0
@@ -0,0 +1,65 @@
1
+ import{r as c,a as Nt,R as Pn,b as $i,c as Ae}from"./vendor-react-C7pctHW3.js";import{j as v}from"./vendor-motion-Dwx3-JO5.js";function A(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function or(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function De(...e){return t=>{let n=!1;const r=e.map(o=>{const s=or(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():or(e[o],null)}}}}function L(...e){return c.useCallback(De(...e),e)}function Fi(e,t){const n=c.createContext(t),r=s=>{const{children:i,...a}=s,l=c.useMemo(()=>a,Object.values(a));return v.jsx(n.Provider,{value:l,children:i})};r.displayName=e+"Provider";function o(s){const i=c.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function ee(e,t=[]){let n=[];function r(s,i){const a=c.createContext(i),l=n.length;n=[...n,i];const u=f=>{var w;const{scope:p,children:m,...y}=f,h=((w=p==null?void 0:p[e])==null?void 0:w[l])||a,g=c.useMemo(()=>y,Object.values(y));return v.jsx(h.Provider,{value:g,children:m})};u.displayName=s+"Provider";function d(f,p){var h;const m=((h=p==null?void 0:p[e])==null?void 0:h[l])||a,y=c.useContext(m);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const o=()=>{const s=n.map(i=>c.createContext(i));return function(a){const l=(a==null?void 0:a[e])||s;return c.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,ki(o,...t)]}function ki(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:l,scopeName:u})=>{const f=l(s)[`__scope${u}`];return{...a,...f}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function Wi(e){const t=Bi(e),n=c.forwardRef((r,o)=>{const{children:s,...i}=r,a=c.Children.toArray(s),l=a.find(Hi);if(l){const u=l.props.children,d=a.map(f=>f===l?c.Children.count(u)>1?c.Children.only(null):c.isValidElement(u)?u.props.children:null:f);return v.jsx(t,{...i,ref:o,children:c.isValidElement(u)?c.cloneElement(u,void 0,d):null})}return v.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function Bi(e){const t=c.forwardRef((n,r)=>{const{children:o,...s}=n;if(c.isValidElement(o)){const i=zi(o),a=Ui(s,o.props);return o.type!==c.Fragment&&(a.ref=r?De(r,i):i),c.cloneElement(o,a)}return c.Children.count(o)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Vi=Symbol("radix.slottable");function Hi(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Vi}function Ui(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function zi(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Gi=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],N=Gi.reduce((e,t)=>{const n=Wi(`Primitive.${t}`),r=c.forwardRef((o,s)=>{const{asChild:i,...a}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Yi(e,t){e&&Nt.flushSync(()=>e.dispatchEvent(t))}function K(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Ki(e,t=globalThis==null?void 0:globalThis.document){const n=K(e);c.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Xi="DismissableLayer",fn="dismissableLayer.update",qi="dismissableLayer.pointerDownOutside",Zi="dismissableLayer.focusOutside",sr,Mr=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ot=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...l}=e,u=c.useContext(Mr),[d,f]=c.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=c.useState({}),y=L(t,E=>f(E)),h=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=h.indexOf(g),x=d?h.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,S=x>=w,C=ea(E=>{const P=E.target,T=[...u.branches].some(_=>_.contains(P));!S||T||(o==null||o(E),i==null||i(E),E.defaultPrevented||a==null||a())},p),R=ta(E=>{const P=E.target;[...u.branches].some(_=>_.contains(P))||(s==null||s(E),i==null||i(E),E.defaultPrevented||a==null||a())},p);return Ki(E=>{x===u.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},p),c.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(sr=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),ir(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=sr)}},[d,p,n,u]),c.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),ir())},[d,u]),c.useEffect(()=>{const E=()=>m({});return document.addEventListener(fn,E),()=>document.removeEventListener(fn,E)},[]),v.jsx(N.div,{...l,ref:y,style:{pointerEvents:b?S?"auto":"none":void 0,...e.style},onFocusCapture:A(e.onFocusCapture,R.onFocusCapture),onBlurCapture:A(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:A(e.onPointerDownCapture,C.onPointerDownCapture)})});ot.displayName=Xi;var Qi="DismissableLayerBranch",Ji=c.forwardRef((e,t)=>{const n=c.useContext(Mr),r=c.useRef(null),o=L(t,r);return c.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),v.jsx(N.div,{...e,ref:o})});Ji.displayName=Qi;function ea(e,t=globalThis==null?void 0:globalThis.document){const n=K(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){Lr(qi,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function ta(e,t=globalThis==null?void 0:globalThis.document){const n=K(e),r=c.useRef(!1);return c.useEffect(()=>{const o=s=>{s.target&&!r.current&&Lr(Zi,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ir(){const e=new CustomEvent(fn);document.dispatchEvent(e)}function Lr(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Yi(o,s):o.dispatchEvent(s)}var G=globalThis!=null&&globalThis.document?c.useLayoutEffect:()=>{},na=Pn[" useId ".trim().toString()]||(()=>{}),ra=0;function re(e){const[t,n]=c.useState(na());return G(()=>{n(r=>r??String(ra++))},[e]),e||(t?`radix-${t}`:"")}const oa=["top","right","bottom","left"],be=Math.min,Q=Math.max,xt=Math.round,dt=Math.floor,ue=e=>({x:e,y:e}),sa={left:"right",right:"left",bottom:"top",top:"bottom"};function pn(e,t,n){return Q(e,be(t,n))}function ve(e,t){return typeof e=="function"?e(t):e}function he(e){return e.split("-")[0]}function Ge(e){return e.split("-")[1]}function An(e){return e==="x"?"y":"x"}function Tn(e){return e==="y"?"height":"width"}function le(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function _n(e){return An(le(e))}function ia(e,t,n){n===void 0&&(n=!1);const r=Ge(e),o=_n(e),s=Tn(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=bt(i)),[i,bt(i)]}function aa(e){const t=bt(e);return[vn(e),t,vn(t)]}function vn(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const ar=["left","right"],cr=["right","left"],ca=["top","bottom"],la=["bottom","top"];function ua(e,t,n){switch(e){case"top":case"bottom":return n?t?cr:ar:t?ar:cr;case"left":case"right":return t?ca:la;default:return[]}}function da(e,t,n,r){const o=Ge(e);let s=ua(he(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(vn)))),s}function bt(e){const t=he(e);return sa[t]+e.slice(t.length)}function fa(e){return{top:0,right:0,bottom:0,left:0,...e}}function jr(e){return typeof e!="number"?fa(e):{top:e,right:e,bottom:e,left:e}}function St(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 lr(e,t,n){let{reference:r,floating:o}=e;const s=le(t),i=_n(t),a=Tn(i),l=he(t),u=s==="y",d=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,p=r[a]/2-o[a]/2;let m;switch(l){case"top":m={x:d,y:r.y-o.height};break;case"bottom":m={x:d,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:f};break;case"left":m={x:r.x-o.width,y:f};break;default:m={x:r.x,y:r.y}}switch(Ge(t)){case"start":m[i]-=p*(n&&u?-1:1);break;case"end":m[i]+=p*(n&&u?-1:1);break}return m}async function pa(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:p=!1,padding:m=0}=ve(t,e),y=jr(m),g=a[p?f==="floating"?"reference":"floating":f],w=St(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(g)))==null||n?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:l})),x=f==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=await(s.isElement==null?void 0:s.isElement(b))?await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},C=St(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:b,strategy:l}):x);return{top:(w.top-C.top+y.top)/S.y,bottom:(C.bottom-w.bottom+y.bottom)/S.y,left:(w.left-C.left+y.left)/S.x,right:(C.right-w.right+y.right)/S.x}}const va=50,ha=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=i.detectOverflow?i:{...i,detectOverflow:pa},l=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=lr(u,r,l),p=r,m=0;const y={};for(let h=0;h<s.length;h++){const g=s[h];if(!g)continue;const{name:w,fn:x}=g,{x:b,y:S,data:C,reset:R}=await x({x:d,y:f,initialPlacement:r,placement:p,strategy:o,middlewareData:y,rects:u,platform:a,elements:{reference:e,floating:t}});d=b??d,f=S??f,y[w]={...y[w],...C},R&&m<va&&(m++,typeof R=="object"&&(R.placement&&(p=R.placement),R.rects&&(u=R.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:d,y:f}=lr(u,p,l)),h=-1)}return{x:d,y:f,placement:p,strategy:o,middlewareData:y}},ma=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:u,padding:d=0}=ve(e,t)||{};if(u==null)return{};const f=jr(d),p={x:n,y:r},m=_n(o),y=Tn(m),h=await i.getDimensions(u),g=m==="y",w=g?"top":"left",x=g?"bottom":"right",b=g?"clientHeight":"clientWidth",S=s.reference[y]+s.reference[m]-p[m]-s.floating[y],C=p[m]-s.reference[m],R=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let E=R?R[b]:0;(!E||!await(i.isElement==null?void 0:i.isElement(R)))&&(E=a.floating[b]||s.floating[y]);const P=S/2-C/2,T=E/2-h[y]/2-1,_=be(f[w],T),M=be(f[x],T),$=_,F=E-h[y]-M,j=E/2-h[y]/2+P,H=pn($,j,F),D=!l.arrow&&Ge(o)!=null&&j!==H&&s.reference[y]/2-(j<$?_:M)-h[y]/2<0,k=D?j<$?j-$:j-F:0;return{[m]:p[m]+k,data:{[m]:H,centerOffset:j-H-k,...D&&{alignmentOffset:k}},reset:D}}}),ga=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:h=!0,...g}=ve(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const w=he(o),x=le(a),b=he(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(u.floating)),C=p||(b||!h?[bt(a)]:aa(a)),R=y!=="none";!p&&R&&C.push(...da(a,h,y,S));const E=[a,...C],P=await l.detectOverflow(t,g),T=[];let _=((r=s.flip)==null?void 0:r.overflows)||[];if(d&&T.push(P[w]),f){const j=ia(o,i,S);T.push(P[j[0]],P[j[1]])}if(_=[..._,{placement:o,overflows:T}],!T.every(j=>j<=0)){var M,$;const j=(((M=s.flip)==null?void 0:M.index)||0)+1,H=E[j];if(H&&(!(f==="alignment"?x!==le(H):!1)||_.every(O=>le(O.placement)===x?O.overflows[0]>0:!0)))return{data:{index:j,overflows:_},reset:{placement:H}};let D=($=_.filter(k=>k.overflows[0]<=0).sort((k,O)=>k.overflows[1]-O.overflows[1])[0])==null?void 0:$.placement;if(!D)switch(m){case"bestFit":{var F;const k=(F=_.filter(O=>{if(R){const U=le(O.placement);return U===x||U==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(U=>U>0).reduce((U,X)=>U+X,0)]).sort((O,U)=>O[1]-U[1])[0])==null?void 0:F[0];k&&(D=k);break}case"initialPlacement":D=a;break}if(o!==D)return{reset:{placement:D}}}return{}}}};function ur(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function dr(e){return oa.some(t=>e[t]>=0)}const ya=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...s}=ve(e,t);switch(o){case"referenceHidden":{const i=await r.detectOverflow(t,{...s,elementContext:"reference"}),a=ur(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:dr(a)}}}case"escaped":{const i=await r.detectOverflow(t,{...s,altBoundary:!0}),a=ur(i,n.floating);return{data:{escapedOffsets:a,escaped:dr(a)}}}default:return{}}}}},$r=new Set(["left","top"]);async function wa(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=he(n),a=Ge(n),l=le(n)==="y",u=$r.has(i)?-1:1,d=s&&l?-1:1,f=ve(t,e);let{mainAxis:p,crossAxis:m,alignmentAxis:y}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof y=="number"&&(m=a==="end"?y*-1:y),l?{x:m*d,y:p*u}:{x:p*u,y:m*d}}const xa=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,l=await wa(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},ba=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:s}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:w=>{let{x,y:b}=w;return{x,y:b}}},...u}=ve(e,t),d={x:n,y:r},f=await s.detectOverflow(t,u),p=le(he(o)),m=An(p);let y=d[m],h=d[p];if(i){const w=m==="y"?"top":"left",x=m==="y"?"bottom":"right",b=y+f[w],S=y-f[x];y=pn(b,y,S)}if(a){const w=p==="y"?"top":"left",x=p==="y"?"bottom":"right",b=h+f[w],S=h-f[x];h=pn(b,h,S)}const g=l.fn({...t,[m]:y,[p]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[m]:i,[p]:a}}}}}},Sa=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=ve(e,t),d={x:n,y:r},f=le(o),p=An(f);let m=d[p],y=d[f];const h=ve(a,t),g=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){const b=p==="y"?"height":"width",S=s.reference[p]-s.floating[b]+g.mainAxis,C=s.reference[p]+s.reference[b]-g.mainAxis;m<S?m=S:m>C&&(m=C)}if(u){var w,x;const b=p==="y"?"width":"height",S=$r.has(he(o)),C=s.reference[f]-s.floating[b]+(S&&((w=i.offset)==null?void 0:w[f])||0)+(S?0:g.crossAxis),R=s.reference[f]+s.reference[b]+(S?0:((x=i.offset)==null?void 0:x[f])||0)-(S?g.crossAxis:0);y<C?y=C:y>R&&(y=R)}return{[p]:m,[f]:y}}}},Ca=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:l=()=>{},...u}=ve(e,t),d=await i.detectOverflow(t,u),f=he(o),p=Ge(o),m=le(o)==="y",{width:y,height:h}=s.floating;let g,w;f==="top"||f==="bottom"?(g=f,w=p===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(w=f,g=p==="end"?"top":"bottom");const x=h-d.top-d.bottom,b=y-d.left-d.right,S=be(h-d[g],x),C=be(y-d[w],b),R=!t.middlewareData.shift;let E=S,P=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=x),R&&!p){const _=Q(d.left,0),M=Q(d.right,0),$=Q(d.top,0),F=Q(d.bottom,0);m?P=y-2*(_!==0||M!==0?_+M:Q(d.left,d.right)):E=h-2*($!==0||F!==0?$+F:Q(d.top,d.bottom))}await l({...t,availableWidth:P,availableHeight:E});const T=await i.getDimensions(a.floating);return y!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function Ot(){return typeof window<"u"}function Ye(e){return Fr(e)?(e.nodeName||"").toLowerCase():"#document"}function J(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function de(e){var t;return(t=(Fr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Fr(e){return Ot()?e instanceof Node||e instanceof J(e).Node:!1}function oe(e){return Ot()?e instanceof Element||e instanceof J(e).Element:!1}function ge(e){return Ot()?e instanceof HTMLElement||e instanceof J(e).HTMLElement:!1}function fr(e){return!Ot()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof J(e).ShadowRoot}function st(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=se(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function Ea(e){return/^(table|td|th)$/.test(Ye(e))}function It(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Ra=/transform|translate|scale|rotate|perspective|filter/,Pa=/paint|layout|strict|content/,Te=e=>!!e&&e!=="none";let Jt;function Nn(e){const t=oe(e)?se(e):e;return Te(t.transform)||Te(t.translate)||Te(t.scale)||Te(t.rotate)||Te(t.perspective)||!On()&&(Te(t.backdropFilter)||Te(t.filter))||Ra.test(t.willChange||"")||Pa.test(t.contain||"")}function Aa(e){let t=Se(e);for(;ge(t)&&!Be(t);){if(Nn(t))return t;if(It(t))return null;t=Se(t)}return null}function On(){return Jt==null&&(Jt=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Jt}function Be(e){return/^(html|body|#document)$/.test(Ye(e))}function se(e){return J(e).getComputedStyle(e)}function Dt(e){return oe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Se(e){if(Ye(e)==="html")return e;const t=e.assignedSlot||e.parentNode||fr(e)&&e.host||de(e);return fr(t)?t.host:t}function kr(e){const t=Se(e);return Be(t)?e.ownerDocument?e.ownerDocument.body:e.body:ge(t)&&st(t)?t:kr(t)}function nt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=kr(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=J(o);if(s){const a=hn(i);return t.concat(i,i.visualViewport||[],st(o)?o:[],a&&n?nt(a):[])}else return t.concat(o,nt(o,[],n))}function hn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Wr(e){const t=se(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ge(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=xt(n)!==s||xt(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function In(e){return oe(e)?e:e.contextElement}function Fe(e){const t=In(e);if(!ge(t))return ue(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Wr(t);let i=(s?xt(n.width):n.width)/r,a=(s?xt(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const Ta=ue(0);function Br(e){const t=J(e);return!On()||!t.visualViewport?Ta:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _a(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==J(e)?!1:t}function _e(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=In(e);let i=ue(1);t&&(r?oe(r)&&(i=Fe(r)):i=Fe(e));const a=_a(s,n,r)?Br(s):ue(0);let l=(o.left+a.x)/i.x,u=(o.top+a.y)/i.y,d=o.width/i.x,f=o.height/i.y;if(s){const p=J(s),m=r&&oe(r)?J(r):r;let y=p,h=hn(y);for(;h&&r&&m!==y;){const g=Fe(h),w=h.getBoundingClientRect(),x=se(h),b=w.left+(h.clientLeft+parseFloat(x.paddingLeft))*g.x,S=w.top+(h.clientTop+parseFloat(x.paddingTop))*g.y;l*=g.x,u*=g.y,d*=g.x,f*=g.y,l+=b,u+=S,y=J(h),h=hn(y)}}return St({width:d,height:f,x:l,y:u})}function Mt(e,t){const n=Dt(e).scrollLeft;return t?t.left+n:_e(de(e)).left+n}function Vr(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Mt(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Na(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=de(r),a=t?It(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},u=ue(1);const d=ue(0),f=ge(r);if((f||!f&&!s)&&((Ye(r)!=="body"||st(i))&&(l=Dt(r)),f)){const m=_e(r);u=Fe(r),d.x=m.x+r.clientLeft,d.y=m.y+r.clientTop}const p=i&&!f&&!s?Vr(i,l):ue(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+p.x,y:n.y*u.y-l.scrollTop*u.y+d.y+p.y}}function Oa(e){return Array.from(e.getClientRects())}function Ia(e){const t=de(e),n=Dt(e),r=e.ownerDocument.body,o=Q(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Q(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Mt(e);const a=-n.scrollTop;return se(r).direction==="rtl"&&(i+=Q(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}const pr=25;function Da(e,t){const n=J(e),r=de(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const d=On();(!d||d&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const u=Mt(r);if(u<=0){const d=r.ownerDocument,f=d.body,p=getComputedStyle(f),m=d.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,y=Math.abs(r.clientWidth-f.clientWidth-m);y<=pr&&(s-=y)}else u<=pr&&(s+=u);return{width:s,height:i,x:a,y:l}}function Ma(e,t){const n=_e(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=ge(e)?Fe(e):ue(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,u=r*s.y;return{width:i,height:a,x:l,y:u}}function vr(e,t,n){let r;if(t==="viewport")r=Da(e,n);else if(t==="document")r=Ia(de(e));else if(oe(t))r=Ma(t,n);else{const o=Br(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return St(r)}function Hr(e,t){const n=Se(e);return n===t||!oe(n)||Be(n)?!1:se(n).position==="fixed"||Hr(n,t)}function La(e,t){const n=t.get(e);if(n)return n;let r=nt(e,[],!1).filter(a=>oe(a)&&Ye(a)!=="body"),o=null;const s=se(e).position==="fixed";let i=s?Se(e):e;for(;oe(i)&&!Be(i);){const a=se(i),l=Nn(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||st(i)&&!l&&Hr(e,i))?r=r.filter(d=>d!==i):o=a,i=Se(i)}return t.set(e,r),r}function ja(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?It(t)?[]:La(t,this._c):[].concat(n),r],a=vr(t,i[0],o);let l=a.top,u=a.right,d=a.bottom,f=a.left;for(let p=1;p<i.length;p++){const m=vr(t,i[p],o);l=Q(m.top,l),u=be(m.right,u),d=be(m.bottom,d),f=Q(m.left,f)}return{width:u-f,height:d-l,x:f,y:l}}function $a(e){const{width:t,height:n}=Wr(e);return{width:t,height:n}}function Fa(e,t,n){const r=ge(t),o=de(t),s=n==="fixed",i=_e(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=ue(0);function u(){l.x=Mt(o)}if(r||!r&&!s)if((Ye(t)!=="body"||st(o))&&(a=Dt(t)),r){const m=_e(t,!0,s,t);l.x=m.x+t.clientLeft,l.y=m.y+t.clientTop}else o&&u();s&&!r&&o&&u();const d=o&&!r&&!s?Vr(o,a):ue(0),f=i.left+a.scrollLeft-l.x-d.x,p=i.top+a.scrollTop-l.y-d.y;return{x:f,y:p,width:i.width,height:i.height}}function en(e){return se(e).position==="static"}function hr(e,t){if(!ge(e)||se(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return de(e)===n&&(n=n.ownerDocument.body),n}function Ur(e,t){const n=J(e);if(It(e))return n;if(!ge(e)){let o=Se(e);for(;o&&!Be(o);){if(oe(o)&&!en(o))return o;o=Se(o)}return n}let r=hr(e,t);for(;r&&Ea(r)&&en(r);)r=hr(r,t);return r&&Be(r)&&en(r)&&!Nn(r)?n:r||Aa(e)||n}const ka=async function(e){const t=this.getOffsetParent||Ur,n=this.getDimensions,r=await n(e.floating);return{reference:Fa(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Wa(e){return se(e).direction==="rtl"}const Ba={convertOffsetParentRelativeRectToViewportRelativeRect:Na,getDocumentElement:de,getClippingRect:ja,getOffsetParent:Ur,getElementRects:ka,getClientRects:Oa,getDimensions:$a,getScale:Fe,isElement:oe,isRTL:Wa};function zr(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Va(e,t){let n=null,r;const o=de(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const u=e.getBoundingClientRect(),{left:d,top:f,width:p,height:m}=u;if(a||t(),!p||!m)return;const y=dt(f),h=dt(o.clientWidth-(d+p)),g=dt(o.clientHeight-(f+m)),w=dt(d),b={rootMargin:-y+"px "+-h+"px "+-g+"px "+-w+"px",threshold:Q(0,be(1,l))||1};let S=!0;function C(R){const E=R[0].intersectionRatio;if(E!==l){if(!S)return i();E?i(!1,E):r=setTimeout(()=>{i(!1,1e-7)},1e3)}E===1&&!zr(u,e.getBoundingClientRect())&&i(),S=!1}try{n=new IntersectionObserver(C,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,b)}n.observe(e)}return i(!0),s}function Ha(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=In(e),d=o||s?[...u?nt(u):[],...t?nt(t):[]]:[];d.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),s&&w.addEventListener("resize",n)});const f=u&&a?Va(u,n):null;let p=-1,m=null;i&&(m=new ResizeObserver(w=>{let[x]=w;x&&x.target===u&&m&&t&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=m)==null||b.observe(t)})),n()}),u&&!l&&m.observe(u),t&&m.observe(t));let y,h=l?_e(e):null;l&&g();function g(){const w=_e(e);h&&!zr(h,w)&&n(),h=w,y=requestAnimationFrame(g)}return n(),()=>{var w;d.forEach(x=>{o&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),f==null||f(),(w=m)==null||w.disconnect(),m=null,l&&cancelAnimationFrame(y)}}const Ua=xa,za=ba,Ga=ga,Ya=Ca,Ka=ya,mr=ma,Xa=Sa,qa=(e,t,n)=>{const r=new Map,o={platform:Ba,...n},s={...o.platform,_c:r};return ha(e,t,{...o,platform:s})};var Za=typeof document<"u",Qa=function(){},gt=Za?c.useLayoutEffect:Qa;function Ct(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ct(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;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!Ct(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Gr(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function gr(e,t){const n=Gr(e);return Math.round(t*n)/n}function tn(e){const t=c.useRef(e);return gt(()=>{t.current=e}),t}function Ja(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[d,f]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=c.useState(r);Ct(p,r)||m(r);const[y,h]=c.useState(null),[g,w]=c.useState(null),x=c.useCallback(O=>{O!==R.current&&(R.current=O,h(O))},[]),b=c.useCallback(O=>{O!==E.current&&(E.current=O,w(O))},[]),S=s||y,C=i||g,R=c.useRef(null),E=c.useRef(null),P=c.useRef(d),T=l!=null,_=tn(l),M=tn(o),$=tn(u),F=c.useCallback(()=>{if(!R.current||!E.current)return;const O={placement:t,strategy:n,middleware:p};M.current&&(O.platform=M.current),qa(R.current,E.current,O).then(U=>{const X={...U,isPositioned:$.current!==!1};j.current&&!Ct(P.current,X)&&(P.current=X,Nt.flushSync(()=>{f(X)}))})},[p,t,n,M,$]);gt(()=>{u===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,f(O=>({...O,isPositioned:!1})))},[u]);const j=c.useRef(!1);gt(()=>(j.current=!0,()=>{j.current=!1}),[]),gt(()=>{if(S&&(R.current=S),C&&(E.current=C),S&&C){if(_.current)return _.current(S,C,F);F()}},[S,C,F,_,T]);const H=c.useMemo(()=>({reference:R,floating:E,setReference:x,setFloating:b}),[x,b]),D=c.useMemo(()=>({reference:S,floating:C}),[S,C]),k=c.useMemo(()=>{const O={position:n,left:0,top:0};if(!D.floating)return O;const U=gr(D.floating,d.x),X=gr(D.floating,d.y);return a?{...O,transform:"translate("+U+"px, "+X+"px)",...Gr(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:U,top:X}},[n,a,D.floating,d.x,d.y]);return c.useMemo(()=>({...d,update:F,refs:H,elements:D,floatingStyles:k}),[d,F,H,D,k])}const ec=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?mr({element:r.current,padding:o}).fn(n):{}:r?mr({element:r,padding:o}).fn(n):{}}}},tc=(e,t)=>{const n=Ua(e);return{name:n.name,fn:n.fn,options:[e,t]}},nc=(e,t)=>{const n=za(e);return{name:n.name,fn:n.fn,options:[e,t]}},rc=(e,t)=>({fn:Xa(e).fn,options:[e,t]}),oc=(e,t)=>{const n=Ga(e);return{name:n.name,fn:n.fn,options:[e,t]}},sc=(e,t)=>{const n=Ya(e);return{name:n.name,fn:n.fn,options:[e,t]}},ic=(e,t)=>{const n=Ka(e);return{name:n.name,fn:n.fn,options:[e,t]}},ac=(e,t)=>{const n=ec(e);return{name:n.name,fn:n.fn,options:[e,t]}};var cc="Arrow",Yr=c.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return v.jsx(N.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:v.jsx("polygon",{points:"0,0 30,0 15,10"})})});Yr.displayName=cc;var lc=Yr;function Kr(e){const[t,n]=c.useState(void 0);return G(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const l=s.borderBoxSize,u=Array.isArray(l)?l[0]:l;i=u.inlineSize,a=u.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Dn="Popper",[Xr,Ke]=ee(Dn),[uc,qr]=Xr(Dn),Zr=e=>{const{__scopePopper:t,children:n}=e,[r,o]=c.useState(null);return v.jsx(uc,{scope:t,anchor:r,onAnchorChange:o,children:n})};Zr.displayName=Dn;var Qr="PopperAnchor",Jr=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=qr(Qr,n),i=c.useRef(null),a=L(t,i),l=c.useRef(null);return c.useEffect(()=>{const u=l.current;l.current=(r==null?void 0:r.current)||i.current,u!==l.current&&s.onAnchorChange(l.current)}),r?null:v.jsx(N.div,{...o,ref:a})});Jr.displayName=Qr;var Mn="PopperContent",[dc,fc]=Xr(Mn),eo=c.forwardRef((e,t)=>{var I,z,Y,V,W,B;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:m="optimized",onPlaced:y,...h}=e,g=qr(Mn,n),[w,x]=c.useState(null),b=L(t,Z=>x(Z)),[S,C]=c.useState(null),R=Kr(S),E=(R==null?void 0:R.width)??0,P=(R==null?void 0:R.height)??0,T=r+(s!=="center"?"-"+s:""),_=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},M=Array.isArray(u)?u:[u],$=M.length>0,F={padding:_,boundary:M.filter(vc),altBoundary:$},{refs:j,floatingStyles:H,placement:D,isPositioned:k,middlewareData:O}=Ja({strategy:"fixed",placement:T,whileElementsMounted:(...Z)=>Ha(...Z,{animationFrame:m==="always"}),elements:{reference:g.anchor},middleware:[tc({mainAxis:o+P,alignmentAxis:i}),l&&nc({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?rc():void 0,...F}),l&&oc({...F}),sc({...F,apply:({elements:Z,rects:ae,availableWidth:Qe,availableHeight:Je})=>{const{width:et,height:ji}=ae.reference,ut=Z.floating.style;ut.setProperty("--radix-popper-available-width",`${Qe}px`),ut.setProperty("--radix-popper-available-height",`${Je}px`),ut.setProperty("--radix-popper-anchor-width",`${et}px`),ut.setProperty("--radix-popper-anchor-height",`${ji}px`)}}),S&&ac({element:S,padding:a}),hc({arrowWidth:E,arrowHeight:P}),p&&ic({strategy:"referenceHidden",...F})]}),[U,X]=ro(D),pe=K(y);G(()=>{k&&(pe==null||pe())},[k,pe]);const qe=(I=O.arrow)==null?void 0:I.x,Ze=(z=O.arrow)==null?void 0:z.y,we=((Y=O.arrow)==null?void 0:Y.centerOffset)!==0,[Me,Pe]=c.useState();return G(()=>{w&&Pe(window.getComputedStyle(w).zIndex)},[w]),v.jsx("div",{ref:j.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:k?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Me,"--radix-popper-transform-origin":[(V=O.transformOrigin)==null?void 0:V.x,(W=O.transformOrigin)==null?void 0:W.y].join(" "),...((B=O.hide)==null?void 0:B.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:v.jsx(dc,{scope:n,placedSide:U,onArrowChange:C,arrowX:qe,arrowY:Ze,shouldHideArrow:we,children:v.jsx(N.div,{"data-side":U,"data-align":X,...h,ref:b,style:{...h.style,animation:k?void 0:"none"}})})})});eo.displayName=Mn;var to="PopperArrow",pc={top:"bottom",right:"left",bottom:"top",left:"right"},no=c.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=fc(to,r),i=pc[s.placedSide];return v.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:v.jsx(lc,{...o,ref:n,style:{...o.style,display:"block"}})})});no.displayName=to;function vc(e){return e!==null}var hc=e=>({name:"transformOrigin",options:e,fn(t){var g,w,x;const{placement:n,rects:r,middlewareData:o}=t,i=((g=o.arrow)==null?void 0:g.centerOffset)!==0,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[u,d]=ro(n),f={start:"0%",center:"50%",end:"100%"}[d],p=(((w=o.arrow)==null?void 0:w.x)??0)+a/2,m=(((x=o.arrow)==null?void 0:x.y)??0)+l/2;let y="",h="";return u==="bottom"?(y=i?f:`${p}px`,h=`${-l}px`):u==="top"?(y=i?f:`${p}px`,h=`${r.floating.height+l}px`):u==="right"?(y=`${-l}px`,h=i?f:`${m}px`):u==="left"&&(y=`${r.floating.width+l}px`,h=i?f:`${m}px`),{data:{x:y,y:h}}}});function ro(e){const[t,n="center"]=e.split("-");return[t,n]}var Ln=Zr,Lt=Jr,jn=eo,$n=no,mc="Portal",it=c.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=c.useState(!1);G(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?$i.createPortal(v.jsx(N.div,{...r,ref:t}),i):null});it.displayName=mc;function gc(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var q=e=>{const{present:t,children:n}=e,r=yc(t),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),s=L(r.ref,wc(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:s}):null};q.displayName="Presence";function yc(e){const[t,n]=c.useState(),r=c.useRef(null),o=c.useRef(e),s=c.useRef("none"),i=e?"mounted":"unmounted",[a,l]=gc(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const u=ft(r.current);s.current=a==="mounted"?u:"none"},[a]),G(()=>{const u=r.current,d=o.current;if(d!==e){const p=s.current,m=ft(u);e?l("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&p!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),G(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,f=m=>{const h=ft(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&h&&(l("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},p=m=>{m.target===t&&(s.current=ft(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:c.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function ft(e){return(e==null?void 0:e.animationName)||"none"}function wc(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var xc=Symbol("radix.slottable");function bc(e){const t=({children:n})=>v.jsx(v.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=xc,t}var Sc=Pn[" useInsertionEffect ".trim().toString()]||G;function me({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=Cc({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:o;{const d=c.useRef(e!==void 0);c.useEffect(()=>{const f=d.current;f!==a&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=a},[a,r])}const u=c.useCallback(d=>{var f;if(a){const p=Ec(d)?d(e):d;p!==e&&((f=i.current)==null||f.call(i,p))}else s(d)},[a,e,s,i]);return[l,u]}function Cc({defaultProp:e,onChange:t}){const[n,r]=c.useState(e),o=c.useRef(n),s=c.useRef(t);return Sc(()=>{s.current=t},[t]),c.useEffect(()=>{var i;o.current!==n&&((i=s.current)==null||i.call(s,n),o.current=n)},[n,o]),[n,r,s]}function Ec(e){return typeof e=="function"}var oo=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"}),Rc="VisuallyHidden",so=c.forwardRef((e,t)=>v.jsx(N.span,{...e,ref:t,style:{...oo,...e.style}}));so.displayName=Rc;var Pc=so,[jt]=ee("Tooltip",[Ke]),$t=Ke(),io="TooltipProvider",Ac=700,mn="tooltip.open",[Tc,Fn]=jt(io),ao=e=>{const{__scopeTooltip:t,delayDuration:n=Ac,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,i=c.useRef(!0),a=c.useRef(!1),l=c.useRef(0);return c.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),v.jsx(Tc,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:c.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:c.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:c.useCallback(u=>{a.current=u},[]),disableHoverableContent:o,children:s})};ao.displayName=io;var rt="Tooltip",[_c,at]=jt(rt),co=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:i,delayDuration:a}=e,l=Fn(rt,e.__scopeTooltip),u=$t(t),[d,f]=c.useState(null),p=re(),m=c.useRef(0),y=i??l.disableHoverableContent,h=a??l.delayDuration,g=c.useRef(!1),[w,x]=me({prop:r,defaultProp:o??!1,onChange:E=>{E?(l.onOpen(),document.dispatchEvent(new CustomEvent(mn))):l.onClose(),s==null||s(E)},caller:rt}),b=c.useMemo(()=>w?g.current?"delayed-open":"instant-open":"closed",[w]),S=c.useCallback(()=>{window.clearTimeout(m.current),m.current=0,g.current=!1,x(!0)},[x]),C=c.useCallback(()=>{window.clearTimeout(m.current),m.current=0,x(!1)},[x]),R=c.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{g.current=!0,x(!0),m.current=0},h)},[h,x]);return c.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),v.jsx(Ln,{...u,children:v.jsx(_c,{scope:t,contentId:p,open:w,stateAttribute:b,trigger:d,onTriggerChange:f,onTriggerEnter:c.useCallback(()=>{l.isOpenDelayedRef.current?R():S()},[l.isOpenDelayedRef,R,S]),onTriggerLeave:c.useCallback(()=>{y?C():(window.clearTimeout(m.current),m.current=0)},[C,y]),onOpen:S,onClose:C,disableHoverableContent:y,children:n})})};co.displayName=rt;var gn="TooltipTrigger",lo=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=at(gn,n),s=Fn(gn,n),i=$t(n),a=c.useRef(null),l=L(t,a,o.onTriggerChange),u=c.useRef(!1),d=c.useRef(!1),f=c.useCallback(()=>u.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),v.jsx(Lt,{asChild:!0,...i,children:v.jsx(N.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:A(e.onPointerMove,p=>{p.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:A(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:A(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:A(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:A(e.onBlur,o.onClose),onClick:A(e.onClick,o.onClose)})})});lo.displayName=gn;var kn="TooltipPortal",[Nc,Oc]=jt(kn,{forceMount:void 0}),uo=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=at(kn,t);return v.jsx(Nc,{scope:t,forceMount:n,children:v.jsx(q,{present:n||s.open,children:v.jsx(it,{asChild:!0,container:o,children:r})})})};uo.displayName=kn;var Ve="TooltipContent",fo=c.forwardRef((e,t)=>{const n=Oc(Ve,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,i=at(Ve,e.__scopeTooltip);return v.jsx(q,{present:r||i.open,children:i.disableHoverableContent?v.jsx(po,{side:o,...s,ref:t}):v.jsx(Ic,{side:o,...s,ref:t})})}),Ic=c.forwardRef((e,t)=>{const n=at(Ve,e.__scopeTooltip),r=Fn(Ve,e.__scopeTooltip),o=c.useRef(null),s=L(t,o),[i,a]=c.useState(null),{trigger:l,onClose:u}=n,d=o.current,{onPointerInTransitChange:f}=r,p=c.useCallback(()=>{a(null),f(!1)},[f]),m=c.useCallback((y,h)=>{const g=y.currentTarget,w={x:y.clientX,y:y.clientY},x=$c(w,g.getBoundingClientRect()),b=Fc(w,x),S=kc(h.getBoundingClientRect()),C=Bc([...b,...S]);a(C),f(!0)},[f]);return c.useEffect(()=>()=>p(),[p]),c.useEffect(()=>{if(l&&d){const y=g=>m(g,d),h=g=>m(g,l);return l.addEventListener("pointerleave",y),d.addEventListener("pointerleave",h),()=>{l.removeEventListener("pointerleave",y),d.removeEventListener("pointerleave",h)}}},[l,d,m,p]),c.useEffect(()=>{if(i){const y=h=>{const g=h.target,w={x:h.clientX,y:h.clientY},x=(l==null?void 0:l.contains(g))||(d==null?void 0:d.contains(g)),b=!Wc(w,i);x?p():b&&(p(),u())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[l,d,i,u,p]),v.jsx(po,{...e,ref:s})}),[Dc,Mc]=jt(rt,{isInside:!1}),Lc=bc("TooltipContent"),po=c.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...a}=e,l=at(Ve,n),u=$t(n),{onClose:d}=l;return c.useEffect(()=>(document.addEventListener(mn,d),()=>document.removeEventListener(mn,d)),[d]),c.useEffect(()=>{if(l.trigger){const f=p=>{const m=p.target;m!=null&&m.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),v.jsx(ot,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:v.jsxs(jn,{"data-state":l.stateAttribute,...u,...a,ref:t,style:{...a.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:[v.jsx(Lc,{children:r}),v.jsx(Dc,{scope:n,isInside:!0,children:v.jsx(Pc,{id:l.contentId,role:"tooltip",children:o||r})})]})})});fo.displayName=Ve;var vo="TooltipArrow",jc=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=$t(n);return Mc(vo,n).isInside?null:v.jsx($n,{...o,...r,ref:t})});jc.displayName=vo;function $c(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Fc(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});break}return r}function kc(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}]}function Wc(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s],l=t[i],u=a.x,d=a.y,f=l.x,p=l.y;d>r!=p>r&&n<(f-u)*(r-d)/(p-d)+u&&(o=!o)}return o}function Bc(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Vc(t)}function Vc(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],i=n[n.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Mf=ao,Lf=co,jf=lo,$f=uo,Ff=fo,Hc=Symbol.for("react.lazy"),Et=Pn[" use ".trim().toString()];function Uc(e){return typeof e=="object"&&e!==null&&"then"in e}function ho(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Hc&&"_payload"in e&&Uc(e._payload)}function Ft(e){const t=zc(e),n=c.forwardRef((r,o)=>{let{children:s,...i}=r;ho(s)&&typeof Et=="function"&&(s=Et(s._payload));const a=c.Children.toArray(s),l=a.find(Yc);if(l){const u=l.props.children,d=a.map(f=>f===l?c.Children.count(u)>1?c.Children.only(null):c.isValidElement(u)?u.props.children:null:f);return v.jsx(t,{...i,ref:o,children:c.isValidElement(u)?c.cloneElement(u,void 0,d):null})}return v.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var kf=Ft("Slot");function zc(e){const t=c.forwardRef((n,r)=>{let{children:o,...s}=n;if(ho(o)&&typeof Et=="function"&&(o=Et(o._payload)),c.isValidElement(o)){const i=Xc(o),a=Kc(s,o.props);return o.type!==c.Fragment&&(a.ref=r?De(r,i):i),c.cloneElement(o,a)}return c.Children.count(o)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Gc=Symbol("radix.slottable");function Yc(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Gc}function Kc(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Xc(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var qc=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Zc=qc.reduce((e,t)=>{const n=Ft(`Primitive.${t}`),r=c.forwardRef((o,s)=>{const{asChild:i,...a}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Qc="Separator",yr="horizontal",Jc=["horizontal","vertical"],mo=c.forwardRef((e,t)=>{const{decorative:n,orientation:r=yr,...o}=e,s=el(r)?r:yr,a=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return v.jsx(Zc.div,{"data-orientation":s,...a,...o,ref:t})});mo.displayName=Qc;function el(e){return Jc.includes(e)}var Wf=mo,tl=c.createContext(void 0);function kt(e){const t=c.useContext(tl);return e||t||"ltr"}function yn(e,[t,n]){return Math.min(n,Math.max(t,e))}function nl(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var Wn="ScrollArea",[go]=ee(Wn),[rl,te]=go(Wn),yo=c.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:s=600,...i}=e,[a,l]=c.useState(null),[u,d]=c.useState(null),[f,p]=c.useState(null),[m,y]=c.useState(null),[h,g]=c.useState(null),[w,x]=c.useState(0),[b,S]=c.useState(0),[C,R]=c.useState(!1),[E,P]=c.useState(!1),T=L(t,M=>l(M)),_=kt(o);return v.jsx(rl,{scope:n,type:r,dir:_,scrollHideDelay:s,scrollArea:a,viewport:u,onViewportChange:d,content:f,onContentChange:p,scrollbarX:m,onScrollbarXChange:y,scrollbarXEnabled:C,onScrollbarXEnabledChange:R,scrollbarY:h,onScrollbarYChange:g,scrollbarYEnabled:E,onScrollbarYEnabledChange:P,onCornerWidthChange:x,onCornerHeightChange:S,children:v.jsx(N.div,{dir:_,...i,ref:T,style:{position:"relative","--radix-scroll-area-corner-width":w+"px","--radix-scroll-area-corner-height":b+"px",...e.style}})})});yo.displayName=Wn;var wo="ScrollAreaViewport",xo=c.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...s}=e,i=te(wo,n),a=c.useRef(null),l=L(t,a,i.onViewportChange);return v.jsxs(v.Fragment,{children:[v.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:o}),v.jsx(N.div,{"data-radix-scroll-area-viewport":"",...s,ref:l,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:v.jsx("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});xo.displayName=wo;var fe="ScrollAreaScrollbar",ol=c.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=te(fe,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:i}=o,a=e.orientation==="horizontal";return c.useEffect(()=>(a?s(!0):i(!0),()=>{a?s(!1):i(!1)}),[a,s,i]),o.type==="hover"?v.jsx(sl,{...r,ref:t,forceMount:n}):o.type==="scroll"?v.jsx(il,{...r,ref:t,forceMount:n}):o.type==="auto"?v.jsx(bo,{...r,ref:t,forceMount:n}):o.type==="always"?v.jsx(Bn,{...r,ref:t}):null});ol.displayName=fe;var sl=c.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=te(fe,e.__scopeScrollArea),[s,i]=c.useState(!1);return c.useEffect(()=>{const a=o.scrollArea;let l=0;if(a){const u=()=>{window.clearTimeout(l),i(!0)},d=()=>{l=window.setTimeout(()=>i(!1),o.scrollHideDelay)};return a.addEventListener("pointerenter",u),a.addEventListener("pointerleave",d),()=>{window.clearTimeout(l),a.removeEventListener("pointerenter",u),a.removeEventListener("pointerleave",d)}}},[o.scrollArea,o.scrollHideDelay]),v.jsx(q,{present:n||s,children:v.jsx(bo,{"data-state":s?"visible":"hidden",...r,ref:t})})}),il=c.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=te(fe,e.__scopeScrollArea),s=e.orientation==="horizontal",i=Bt(()=>l("SCROLL_END"),100),[a,l]=nl("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 c.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>l("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,o.scrollHideDelay,l]),c.useEffect(()=>{const u=o.viewport,d=s?"scrollLeft":"scrollTop";if(u){let f=u[d];const p=()=>{const m=u[d];f!==m&&(l("SCROLL"),i()),f=m};return u.addEventListener("scroll",p),()=>u.removeEventListener("scroll",p)}},[o.viewport,s,l,i]),v.jsx(q,{present:n||a!=="hidden",children:v.jsx(Bn,{"data-state":a==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:A(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:A(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),bo=c.forwardRef((e,t)=>{const n=te(fe,e.__scopeScrollArea),{forceMount:r,...o}=e,[s,i]=c.useState(!1),a=e.orientation==="horizontal",l=Bt(()=>{if(n.viewport){const u=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;i(a?u:d)}},10);return He(n.viewport,l),He(n.content,l),v.jsx(q,{present:r||s,children:v.jsx(Bn,{"data-state":s?"visible":"hidden",...o,ref:t})})}),Bn=c.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=te(fe,e.__scopeScrollArea),s=c.useRef(null),i=c.useRef(0),[a,l]=c.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=Ro(a.viewport,a.content),d={...r,sizes:a,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:p=>s.current=p,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:p=>i.current=p};function f(p,m){return pl(p,i.current,a,m)}return n==="horizontal"?v.jsx(al,{...d,ref:t,onThumbPositionChange:()=>{if(o.viewport&&s.current){const p=o.viewport.scrollLeft,m=wr(p,a,o.dir);s.current.style.transform=`translate3d(${m}px, 0, 0)`}},onWheelScroll:p=>{o.viewport&&(o.viewport.scrollLeft=p)},onDragScroll:p=>{o.viewport&&(o.viewport.scrollLeft=f(p,o.dir))}}):n==="vertical"?v.jsx(cl,{...d,ref:t,onThumbPositionChange:()=>{if(o.viewport&&s.current){const p=o.viewport.scrollTop,m=wr(p,a);s.current.style.transform=`translate3d(0, ${m}px, 0)`}},onWheelScroll:p=>{o.viewport&&(o.viewport.scrollTop=p)},onDragScroll:p=>{o.viewport&&(o.viewport.scrollTop=f(p))}}):null}),al=c.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,s=te(fe,e.__scopeScrollArea),[i,a]=c.useState(),l=c.useRef(null),u=L(t,l,s.onScrollbarXChange);return c.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),v.jsx(Co,{"data-orientation":"horizontal",...o,ref:u,sizes:n,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Wt(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,f)=>{if(s.viewport){const p=s.viewport.scrollLeft+d.deltaX;e.onWheelScroll(p),Ao(p,f)&&d.preventDefault()}},onResize:()=>{l.current&&s.viewport&&i&&r({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Pt(i.paddingLeft),paddingEnd:Pt(i.paddingRight)}})}})}),cl=c.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,s=te(fe,e.__scopeScrollArea),[i,a]=c.useState(),l=c.useRef(null),u=L(t,l,s.onScrollbarYChange);return c.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),v.jsx(Co,{"data-orientation":"vertical",...o,ref:u,sizes:n,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Wt(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,f)=>{if(s.viewport){const p=s.viewport.scrollTop+d.deltaY;e.onWheelScroll(p),Ao(p,f)&&d.preventDefault()}},onResize:()=>{l.current&&s.viewport&&i&&r({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Pt(i.paddingTop),paddingEnd:Pt(i.paddingBottom)}})}})}),[ll,So]=go(fe),Co=c.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:s,onThumbPointerUp:i,onThumbPointerDown:a,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:d,onResize:f,...p}=e,m=te(fe,n),[y,h]=c.useState(null),g=L(t,T=>h(T)),w=c.useRef(null),x=c.useRef(""),b=m.viewport,S=r.content-r.viewport,C=K(d),R=K(l),E=Bt(f,10);function P(T){if(w.current){const _=T.clientX-w.current.left,M=T.clientY-w.current.top;u({x:_,y:M})}}return c.useEffect(()=>{const T=_=>{const M=_.target;(y==null?void 0:y.contains(M))&&C(_,S)};return document.addEventListener("wheel",T,{passive:!1}),()=>document.removeEventListener("wheel",T,{passive:!1})},[b,y,S,C]),c.useEffect(R,[r,R]),He(y,E),He(m.content,E),v.jsx(ll,{scope:n,scrollbar:y,hasThumb:o,onThumbChange:K(s),onThumbPointerUp:K(i),onThumbPositionChange:R,onThumbPointerDown:K(a),children:v.jsx(N.div,{...p,ref:g,style:{position:"absolute",...p.style},onPointerDown:A(e.onPointerDown,T=>{T.button===0&&(T.target.setPointerCapture(T.pointerId),w.current=y.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),P(T))}),onPointerMove:A(e.onPointerMove,P),onPointerUp:A(e.onPointerUp,T=>{const _=T.target;_.hasPointerCapture(T.pointerId)&&_.releasePointerCapture(T.pointerId),document.body.style.webkitUserSelect=x.current,m.viewport&&(m.viewport.style.scrollBehavior=""),w.current=null})})})}),Rt="ScrollAreaThumb",ul=c.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=So(Rt,e.__scopeScrollArea);return v.jsx(q,{present:n||o.hasThumb,children:v.jsx(dl,{ref:t,...r})})}),dl=c.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,s=te(Rt,n),i=So(Rt,n),{onThumbPositionChange:a}=i,l=L(t,f=>i.onThumbChange(f)),u=c.useRef(void 0),d=Bt(()=>{u.current&&(u.current(),u.current=void 0)},100);return c.useEffect(()=>{const f=s.viewport;if(f){const p=()=>{if(d(),!u.current){const m=vl(f,a);u.current=m,a()}};return a(),f.addEventListener("scroll",p),()=>f.removeEventListener("scroll",p)}},[s.viewport,d,a]),v.jsx(N.div,{"data-state":i.hasThumb?"visible":"hidden",...o,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:A(e.onPointerDownCapture,f=>{const m=f.target.getBoundingClientRect(),y=f.clientX-m.left,h=f.clientY-m.top;i.onThumbPointerDown({x:y,y:h})}),onPointerUp:A(e.onPointerUp,i.onThumbPointerUp)})});ul.displayName=Rt;var Vn="ScrollAreaCorner",Eo=c.forwardRef((e,t)=>{const n=te(Vn,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?v.jsx(fl,{...e,ref:t}):null});Eo.displayName=Vn;var fl=c.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=te(Vn,n),[s,i]=c.useState(0),[a,l]=c.useState(0),u=!!(s&&a);return He(o.scrollbarX,()=>{var f;const d=((f=o.scrollbarX)==null?void 0:f.offsetHeight)||0;o.onCornerHeightChange(d),l(d)}),He(o.scrollbarY,()=>{var f;const d=((f=o.scrollbarY)==null?void 0:f.offsetWidth)||0;o.onCornerWidthChange(d),i(d)}),u?v.jsx(N.div,{...r,ref:t,style:{width:s,height:a,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Pt(e){return e?parseInt(e,10):0}function Ro(e,t){const n=e/t;return isNaN(n)?0:n}function Wt(e){const t=Ro(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function pl(e,t,n,r="ltr"){const o=Wt(n),s=o/2,i=t||s,a=o-i,l=n.scrollbar.paddingStart+i,u=n.scrollbar.size-n.scrollbar.paddingEnd-a,d=n.content-n.viewport,f=r==="ltr"?[0,d]:[d*-1,0];return Po([l,u],f)(e)}function wr(e,t,n="ltr"){const r=Wt(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-o,i=t.content-t.viewport,a=s-r,l=n==="ltr"?[0,i]:[i*-1,0],u=yn(e,l);return Po([0,i],[0,a])(u)}function Po(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 Ao(e,t){return e>0&&e<t}var vl=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const s={left:e.scrollLeft,top:e.scrollTop},i=n.left!==s.left,a=n.top!==s.top;(i||a)&&t(),n=s,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function Bt(e,t){const n=K(e),r=c.useRef(0);return c.useEffect(()=>()=>window.clearTimeout(r.current),[]),c.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function He(e,t){const n=K(t);G(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}var Bf=yo,Vf=xo,Hf=Eo;function hl(e,t=[]){let n=[];function r(s,i){const a=c.createContext(i);a.displayName=s+"Context";const l=n.length;n=[...n,i];const u=f=>{var w;const{scope:p,children:m,...y}=f,h=((w=p==null?void 0:p[e])==null?void 0:w[l])||a,g=c.useMemo(()=>y,Object.values(y));return v.jsx(h.Provider,{value:g,children:m})};u.displayName=s+"Provider";function d(f,p){var h;const m=((h=p==null?void 0:p[e])==null?void 0:h[l])||a,y=c.useContext(m);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const o=()=>{const s=n.map(i=>c.createContext(i));return function(a){const l=(a==null?void 0:a[e])||s;return c.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,ml(o,...t)]}function ml(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:l,scopeName:u})=>{const f=l(s)[`__scope${u}`];return{...a,...f}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var gl=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],To=gl.reduce((e,t)=>{const n=Ft(`Primitive.${t}`),r=c.forwardRef((o,s)=>{const{asChild:i,...a}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Hn="Progress",Un=100,[yl]=hl(Hn),[wl,xl]=yl(Hn),_o=c.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:s=bl,...i}=e;(o||o===0)&&!xr(o)&&console.error(Sl(`${o}`,"Progress"));const a=xr(o)?o:Un;r!==null&&!br(r,a)&&console.error(Cl(`${r}`,"Progress"));const l=br(r,a)?r:null,u=At(l)?s(l,a):void 0;return v.jsx(wl,{scope:n,value:l,max:a,children:v.jsx(To.div,{"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":At(l)?l:void 0,"aria-valuetext":u,role:"progressbar","data-state":Io(l,a),"data-value":l??void 0,"data-max":a,...i,ref:t})})});_o.displayName=Hn;var No="ProgressIndicator",Oo=c.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=xl(No,n);return v.jsx(To.div,{"data-state":Io(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});Oo.displayName=No;function bl(e,t){return`${Math.round(e/t*100)}%`}function Io(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function At(e){return typeof e=="number"}function xr(e){return At(e)&&!isNaN(e)&&e>0}function br(e,t){return At(e)&&!isNaN(e)&&e<=t&&e>=0}function Sl(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Un}\`.`}function Cl(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
2
+ - a positive number
3
+ - less than the value passed to \`max\` (or ${Un} if no \`max\` prop is set)
4
+ - \`null\` or \`undefined\` if the progress is indeterminate.
5
+
6
+ Defaulting to \`null\`.`}var Uf=_o,zf=Oo,nn="focusScope.autoFocusOnMount",rn="focusScope.autoFocusOnUnmount",Sr={bubbles:!1,cancelable:!0},El="FocusScope",Vt=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,l]=c.useState(null),u=K(o),d=K(s),f=c.useRef(null),p=L(t,h=>l(h)),m=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let h=function(b){if(m.paused||!a)return;const S=b.target;a.contains(S)?f.current=S:xe(f.current,{select:!0})},g=function(b){if(m.paused||!a)return;const S=b.relatedTarget;S!==null&&(a.contains(S)||xe(f.current,{select:!0}))},w=function(b){if(document.activeElement===document.body)for(const C of b)C.removedNodes.length>0&&xe(a)};document.addEventListener("focusin",h),document.addEventListener("focusout",g);const x=new MutationObserver(w);return a&&x.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",g),x.disconnect()}}},[r,a,m.paused]),c.useEffect(()=>{if(a){Er.add(m);const h=document.activeElement;if(!a.contains(h)){const w=new CustomEvent(nn,Sr);a.addEventListener(nn,u),a.dispatchEvent(w),w.defaultPrevented||(Rl(Nl(Do(a)),{select:!0}),document.activeElement===h&&xe(a))}return()=>{a.removeEventListener(nn,u),setTimeout(()=>{const w=new CustomEvent(rn,Sr);a.addEventListener(rn,d),a.dispatchEvent(w),w.defaultPrevented||xe(h??document.body,{select:!0}),a.removeEventListener(rn,d),Er.remove(m)},0)}}},[a,u,d,m]);const y=c.useCallback(h=>{if(!n&&!r||m.paused)return;const g=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,w=document.activeElement;if(g&&w){const x=h.currentTarget,[b,S]=Pl(x);b&&S?!h.shiftKey&&w===S?(h.preventDefault(),n&&xe(b,{select:!0})):h.shiftKey&&w===b&&(h.preventDefault(),n&&xe(S,{select:!0})):w===x&&h.preventDefault()}},[n,r,m.paused]);return v.jsx(N.div,{tabIndex:-1,...i,ref:p,onKeyDown:y})});Vt.displayName=El;function Rl(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(xe(r,{select:t}),document.activeElement!==n)return}function Pl(e){const t=Do(e),n=Cr(t,e),r=Cr(t.reverse(),e);return[n,r]}function Do(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Cr(e,t){for(const n of e)if(!Al(n,{upTo:t}))return n}function Al(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Tl(e){return e instanceof HTMLInputElement&&"select"in e}function xe(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Tl(e)&&t&&e.select()}}var Er=_l();function _l(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Rr(e,t),e.unshift(t)},remove(t){var n;e=Rr(e,t),(n=e[0])==null||n.resume()}}}function Rr(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Nl(e){return e.filter(t=>t.tagName!=="A")}var on=0;function zn(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Pr()),document.body.insertAdjacentElement("beforeend",e[1]??Pr()),on++,()=>{on===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),on--}},[])}function Pr(){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 ce=function(){return ce=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},ce.apply(this,arguments)};function Mo(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,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 Ol(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var yt="right-scroll-bar-position",wt="width-before-scroll-bar",Il="with-scroll-bars-hidden",Dl="--removed-body-scroll-bar-size";function sn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Ml(e,t){var n=c.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Ll=typeof window<"u"?c.useLayoutEffect:c.useEffect,Ar=new WeakMap;function jl(e,t){var n=Ml(null,function(r){return e.forEach(function(o){return sn(o,r)})});return Ll(function(){var r=Ar.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||sn(a,null)}),s.forEach(function(a){o.has(a)||sn(a,i)})}Ar.set(n,e)},[e]),n}function $l(e){return e}function Fl(e,t){t===void 0&&(t=$l);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(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var l=function(){var d=i;i=[],d.forEach(s)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(d){i.push(d),u()},filter:function(d){return i=i.filter(d),n}}}};return o}function kl(e){e===void 0&&(e={});var t=Fl(null);return t.options=ce({async:!0,ssr:!1},e),t}var Lo=function(e){var t=e.sideCar,n=Mo(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 c.createElement(r,ce({},n))};Lo.isSideCarExport=!0;function Wl(e,t){return e.useMedium(t),Lo}var jo=kl(),an=function(){},Ht=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:an,onWheelCapture:an,onTouchMoveCapture:an}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,y=e.noIsolation,h=e.inert,g=e.allowPinchZoom,w=e.as,x=w===void 0?"div":w,b=e.gapMode,S=Mo(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=p,R=jl([n,t]),E=ce(ce({},S),o);return c.createElement(c.Fragment,null,d&&c.createElement(C,{sideCar:jo,removeScrollBar:u,shards:f,noRelative:m,noIsolation:y,inert:h,setCallbacks:s,allowPinchZoom:!!g,lockRef:n,gapMode:b}),i?c.cloneElement(c.Children.only(a),ce(ce({},E),{ref:R})):c.createElement(x,ce({},E,{className:l,ref:R}),a))});Ht.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ht.classNames={fullWidth:wt,zeroRight:yt};var Bl=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Vl(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Bl();return t&&e.setAttribute("nonce",t),e}function Hl(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ul(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var zl=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Vl())&&(Hl(t,n),Ul(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Gl=function(){var e=zl();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},$o=function(){var e=Gl(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Yl={left:0,top:0,right:0,gap:0},cn=function(e){return parseInt(e||"",10)||0},Kl=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[cn(n),cn(r),cn(o)]},Xl=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Yl;var t=Kl(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])}},ql=$o(),ke="data-scroll-locked",Zl=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
7
+ .`.concat(Il,` {
8
+ overflow: hidden `).concat(r,`;
9
+ padding-right: `).concat(a,"px ").concat(r,`;
10
+ }
11
+ body[`).concat(ke,`] {
12
+ overflow: hidden `).concat(r,`;
13
+ overscroll-behavior: contain;
14
+ `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
15
+ padding-left: `.concat(o,`px;
16
+ padding-top: `).concat(s,`px;
17
+ padding-right: `).concat(i,`px;
18
+ margin-left:0;
19
+ margin-top:0;
20
+ margin-right: `).concat(a,"px ").concat(r,`;
21
+ `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
22
+ }
23
+
24
+ .`).concat(yt,` {
25
+ right: `).concat(a,"px ").concat(r,`;
26
+ }
27
+
28
+ .`).concat(wt,` {
29
+ margin-right: `).concat(a,"px ").concat(r,`;
30
+ }
31
+
32
+ .`).concat(yt," .").concat(yt,` {
33
+ right: 0 `).concat(r,`;
34
+ }
35
+
36
+ .`).concat(wt," .").concat(wt,` {
37
+ margin-right: 0 `).concat(r,`;
38
+ }
39
+
40
+ body[`).concat(ke,`] {
41
+ `).concat(Dl,": ").concat(a,`px;
42
+ }
43
+ `)},Tr=function(){var e=parseInt(document.body.getAttribute(ke)||"0",10);return isFinite(e)?e:0},Ql=function(){c.useEffect(function(){return document.body.setAttribute(ke,(Tr()+1).toString()),function(){var e=Tr()-1;e<=0?document.body.removeAttribute(ke):document.body.setAttribute(ke,e.toString())}},[])},Jl=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Ql();var s=c.useMemo(function(){return Xl(o)},[o]);return c.createElement(ql,{styles:Zl(s,!t,o,n?"":"!important")})},wn=!1;if(typeof window<"u")try{var pt=Object.defineProperty({},"passive",{get:function(){return wn=!0,!0}});window.addEventListener("test",pt,pt),window.removeEventListener("test",pt,pt)}catch{wn=!1}var Le=wn?{passive:!1}:!1,eu=function(e){return e.tagName==="TEXTAREA"},Fo=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!eu(e)&&n[t]==="visible")},tu=function(e){return Fo(e,"overflowY")},nu=function(e){return Fo(e,"overflowX")},_r=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=ko(e,r);if(o){var s=Wo(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},ru=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},ou=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},ko=function(e,t){return e==="v"?tu(t):nu(t)},Wo=function(e,t){return e==="v"?ru(t):ou(t)},su=function(e,t){return e==="h"&&t==="rtl"?-1:1},iu=function(e,t,n,r,o){var s=su(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,l=t.contains(a),u=!1,d=i>0,f=0,p=0;do{if(!a)break;var m=Wo(e,a),y=m[0],h=m[1],g=m[2],w=h-g-s*y;(y||w)&&ko(e,a)&&(f+=w,p+=y);var x=a.parentNode;a=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(d&&Math.abs(f)<1||!d&&Math.abs(p)<1)&&(u=!0),u},vt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Nr=function(e){return[e.deltaX,e.deltaY]},Or=function(e){return e&&"current"in e?e.current:e},au=function(e,t){return e[0]===t[0]&&e[1]===t[1]},cu=function(e){return`
44
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
45
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
46
+ `)},lu=0,je=[];function uu(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),o=c.useState(lu++)[0],s=c.useState($o)[0],i=c.useRef(e);c.useEffect(function(){i.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=Ol([e.lockRef.current],(e.shards||[]).map(Or),!0).filter(Boolean);return h.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=c.useCallback(function(h,g){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!i.current.allowPinchZoom;var w=vt(h),x=n.current,b="deltaX"in h?h.deltaX:x[0]-w[0],S="deltaY"in h?h.deltaY:x[1]-w[1],C,R=h.target,E=Math.abs(b)>Math.abs(S)?"h":"v";if("touches"in h&&E==="h"&&R.type==="range")return!1;var P=window.getSelection(),T=P&&P.anchorNode,_=T?T===R||T.contains(R):!1;if(_)return!1;var M=_r(E,R);if(!M)return!0;if(M?C=E:(C=E==="v"?"h":"v",M=_r(E,R)),!M)return!1;if(!r.current&&"changedTouches"in h&&(b||S)&&(r.current=C),!C)return!0;var $=r.current||C;return iu($,g,h,$==="h"?b:S)},[]),l=c.useCallback(function(h){var g=h;if(!(!je.length||je[je.length-1]!==s)){var w="deltaY"in g?Nr(g):vt(g),x=t.current.filter(function(C){return C.name===g.type&&(C.target===g.target||g.target===C.shadowParent)&&au(C.delta,w)})[0];if(x&&x.should){g.cancelable&&g.preventDefault();return}if(!x){var b=(i.current.shards||[]).map(Or).filter(Boolean).filter(function(C){return C.contains(g.target)}),S=b.length>0?a(g,b[0]):!i.current.noIsolation;S&&g.cancelable&&g.preventDefault()}}},[]),u=c.useCallback(function(h,g,w,x){var b={name:h,delta:g,target:w,should:x,shadowParent:du(w)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(S){return S!==b})},1)},[]),d=c.useCallback(function(h){n.current=vt(h),r.current=void 0},[]),f=c.useCallback(function(h){u(h.type,Nr(h),h.target,a(h,e.lockRef.current))},[]),p=c.useCallback(function(h){u(h.type,vt(h),h.target,a(h,e.lockRef.current))},[]);c.useEffect(function(){return je.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",l,Le),document.addEventListener("touchmove",l,Le),document.addEventListener("touchstart",d,Le),function(){je=je.filter(function(h){return h!==s}),document.removeEventListener("wheel",l,Le),document.removeEventListener("touchmove",l,Le),document.removeEventListener("touchstart",d,Le)}},[]);var m=e.removeScrollBar,y=e.inert;return c.createElement(c.Fragment,null,y?c.createElement(s,{styles:cu(o)}):null,m?c.createElement(Jl,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function du(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const fu=Wl(jo,uu);var Ut=c.forwardRef(function(e,t){return c.createElement(Ht,ce({},e,{ref:t,sideCar:fu}))});Ut.classNames=Ht.classNames;var pu=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},$e=new WeakMap,ht=new WeakMap,mt={},ln=0,Bo=function(e){return e&&(e.host||Bo(e.parentNode))},vu=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Bo(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},hu=function(e,t,n,r){var o=vu(t,Array.isArray(e)?e:[e]);mt[n]||(mt[n]=new WeakMap);var s=mt[n],i=[],a=new Set,l=new Set(o),u=function(f){!f||a.has(f)||(a.add(f),u(f.parentNode))};o.forEach(u);var d=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(p){if(a.has(p))d(p);else try{var m=p.getAttribute(r),y=m!==null&&m!=="false",h=($e.get(p)||0)+1,g=(s.get(p)||0)+1;$e.set(p,h),s.set(p,g),i.push(p),h===1&&y&&ht.set(p,!0),g===1&&p.setAttribute(n,"true"),y||p.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",p,w)}})};return d(t),a.clear(),ln++,function(){i.forEach(function(f){var p=$e.get(f)-1,m=s.get(f)-1;$e.set(f,p),s.set(f,m),p||(ht.has(f)||f.removeAttribute(r),ht.delete(f)),m||f.removeAttribute(n)}),ln--,ln||($e=new WeakMap,$e=new WeakMap,ht=new WeakMap,mt={})}},Gn=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=pu(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),hu(r,o,n,"aria-hidden")):function(){return null}};function mu(e){const t=gu(e),n=c.forwardRef((r,o)=>{const{children:s,...i}=r,a=c.Children.toArray(s),l=a.find(wu);if(l){const u=l.props.children,d=a.map(f=>f===l?c.Children.count(u)>1?c.Children.only(null):c.isValidElement(u)?u.props.children:null:f);return v.jsx(t,{...i,ref:o,children:c.isValidElement(u)?c.cloneElement(u,void 0,d):null})}return v.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function gu(e){const t=c.forwardRef((n,r)=>{const{children:o,...s}=n;if(c.isValidElement(o)){const i=bu(o),a=xu(s,o.props);return o.type!==c.Fragment&&(a.ref=r?De(r,i):i),c.cloneElement(o,a)}return c.Children.count(o)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var yu=Symbol("radix.slottable");function wu(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===yu}function xu(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function bu(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var zt="Dialog",[Vo,Ho]=ee(zt),[Su,ie]=Vo(zt),Uo=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!0}=e,a=c.useRef(null),l=c.useRef(null),[u,d]=me({prop:r,defaultProp:o??!1,onChange:s,caller:zt});return v.jsx(Su,{scope:t,triggerRef:a,contentRef:l,contentId:re(),titleId:re(),descriptionId:re(),open:u,onOpenChange:d,onOpenToggle:c.useCallback(()=>d(f=>!f),[d]),modal:i,children:n})};Uo.displayName=zt;var zo="DialogTrigger",Go=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ie(zo,n),s=L(t,o.triggerRef);return v.jsx(N.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Xn(o.open),...r,ref:s,onClick:A(e.onClick,o.onOpenToggle)})});Go.displayName=zo;var Yn="DialogPortal",[Cu,Yo]=Vo(Yn,{forceMount:void 0}),Ko=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=ie(Yn,t);return v.jsx(Cu,{scope:t,forceMount:n,children:c.Children.map(r,i=>v.jsx(q,{present:n||s.open,children:v.jsx(it,{asChild:!0,container:o,children:i})}))})};Ko.displayName=Yn;var Tt="DialogOverlay",Xo=c.forwardRef((e,t)=>{const n=Yo(Tt,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=ie(Tt,e.__scopeDialog);return s.modal?v.jsx(q,{present:r||s.open,children:v.jsx(Ru,{...o,ref:t})}):null});Xo.displayName=Tt;var Eu=mu("DialogOverlay.RemoveScroll"),Ru=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ie(Tt,n);return v.jsx(Ut,{as:Eu,allowPinchZoom:!0,shards:[o.contentRef],children:v.jsx(N.div,{"data-state":Xn(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Ne="DialogContent",qo=c.forwardRef((e,t)=>{const n=Yo(Ne,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=ie(Ne,e.__scopeDialog);return v.jsx(q,{present:r||s.open,children:s.modal?v.jsx(Pu,{...o,ref:t}):v.jsx(Au,{...o,ref:t})})});qo.displayName=Ne;var Pu=c.forwardRef((e,t)=>{const n=ie(Ne,e.__scopeDialog),r=c.useRef(null),o=L(t,n.contentRef,r);return c.useEffect(()=>{const s=r.current;if(s)return Gn(s)},[]),v.jsx(Zo,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:A(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:A(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&s.preventDefault()}),onFocusOutside:A(e.onFocusOutside,s=>s.preventDefault())})}),Au=c.forwardRef((e,t)=>{const n=ie(Ne,e.__scopeDialog),r=c.useRef(!1),o=c.useRef(!1);return v.jsx(Zo,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var i,a;(i=e.onCloseAutoFocus)==null||i.call(e,s),s.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;((u=n.triggerRef.current)==null?void 0:u.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),Zo=c.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...i}=e,a=ie(Ne,n),l=c.useRef(null),u=L(t,l);return zn(),v.jsxs(v.Fragment,{children:[v.jsx(Vt,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:v.jsx(ot,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Xn(a.open),...i,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),v.jsxs(v.Fragment,{children:[v.jsx(_u,{titleId:a.titleId}),v.jsx(Ou,{contentRef:l,descriptionId:a.descriptionId})]})]})}),Kn="DialogTitle",Qo=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ie(Kn,n);return v.jsx(N.h2,{id:o.titleId,...r,ref:t})});Qo.displayName=Kn;var Jo="DialogDescription",es=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ie(Jo,n);return v.jsx(N.p,{id:o.descriptionId,...r,ref:t})});es.displayName=Jo;var ts="DialogClose",ns=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ie(ts,n);return v.jsx(N.button,{type:"button",...r,ref:t,onClick:A(e.onClick,()=>o.onOpenChange(!1))})});ns.displayName=ts;function Xn(e){return e?"open":"closed"}var rs="DialogTitleWarning",[Tu,os]=Fi(rs,{contentName:Ne,titleName:Kn,docsSlug:"dialog"}),_u=({titleId:e})=>{const t=os(rs),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
47
+
48
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
49
+
50
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return c.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Nu="DialogDescriptionWarning",Ou=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${os(Nu).contentName}}.`;return c.useEffect(()=>{var s;const o=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Iu=Uo,Du=Go,Mu=Ko,Lu=Xo,ju=qo,$u=Qo,Fu=es,ss=ns,ku=Symbol("radix.slottable");function Wu(e){const t=({children:n})=>v.jsx(v.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=ku,t}var is="AlertDialog",[Bu]=ee(is,[Ho]),ye=Ho(),as=e=>{const{__scopeAlertDialog:t,...n}=e,r=ye(t);return v.jsx(Iu,{...r,...n,modal:!0})};as.displayName=is;var Vu="AlertDialogTrigger",cs=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=ye(n);return v.jsx(Du,{...o,...r,ref:t})});cs.displayName=Vu;var Hu="AlertDialogPortal",ls=e=>{const{__scopeAlertDialog:t,...n}=e,r=ye(t);return v.jsx(Mu,{...r,...n})};ls.displayName=Hu;var Uu="AlertDialogOverlay",us=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=ye(n);return v.jsx(Lu,{...o,...r,ref:t})});us.displayName=Uu;var We="AlertDialogContent",[zu,Gu]=Bu(We),Yu=Wu("AlertDialogContent"),ds=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...o}=e,s=ye(n),i=c.useRef(null),a=L(t,i),l=c.useRef(null);return v.jsx(Tu,{contentName:We,titleName:fs,docsSlug:"alert-dialog",children:v.jsx(zu,{scope:n,cancelRef:l,children:v.jsxs(ju,{role:"alertdialog",...s,...o,ref:a,onOpenAutoFocus:A(o.onOpenAutoFocus,u=>{var d;u.preventDefault(),(d=l.current)==null||d.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[v.jsx(Yu,{children:r}),v.jsx(Xu,{contentRef:i})]})})})});ds.displayName=We;var fs="AlertDialogTitle",ps=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=ye(n);return v.jsx($u,{...o,...r,ref:t})});ps.displayName=fs;var vs="AlertDialogDescription",hs=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=ye(n);return v.jsx(Fu,{...o,...r,ref:t})});hs.displayName=vs;var Ku="AlertDialogAction",ms=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=ye(n);return v.jsx(ss,{...o,...r,ref:t})});ms.displayName=Ku;var gs="AlertDialogCancel",ys=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:o}=Gu(gs,n),s=ye(n),i=L(t,o);return v.jsx(ss,{...s,...r,ref:i})});ys.displayName=gs;var Xu=({contentRef:e})=>{const t=`\`${We}\` requires a description for the component to be accessible for screen reader users.
51
+
52
+ You can add a description to the \`${We}\` by passing a \`${vs}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
53
+
54
+ Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${We}\`. 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.
55
+
56
+ For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return c.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},Gf=as,Yf=cs,Kf=ls,Xf=us,qf=ds,Zf=ms,Qf=ys,Jf=ps,ep=hs;function qu(e){const t=Zu(e),n=c.forwardRef((r,o)=>{const{children:s,...i}=r,a=c.Children.toArray(s),l=a.find(Ju);if(l){const u=l.props.children,d=a.map(f=>f===l?c.Children.count(u)>1?c.Children.only(null):c.isValidElement(u)?u.props.children:null:f);return v.jsx(t,{...i,ref:o,children:c.isValidElement(u)?c.cloneElement(u,void 0,d):null})}return v.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function Zu(e){const t=c.forwardRef((n,r)=>{const{children:o,...s}=n;if(c.isValidElement(o)){const i=td(o),a=ed(s,o.props);return o.type!==c.Fragment&&(a.ref=r?De(r,i):i),c.cloneElement(o,a)}return c.Children.count(o)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Qu=Symbol("radix.slottable");function Ju(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Qu}function ed(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function td(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Gt="Popover",[ws]=ee(Gt,[Ke]),ct=Ke(),[nd,Ce]=ws(Gt),xs=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!1}=e,a=ct(t),l=c.useRef(null),[u,d]=c.useState(!1),[f,p]=me({prop:r,defaultProp:o??!1,onChange:s,caller:Gt});return v.jsx(Ln,{...a,children:v.jsx(nd,{scope:t,contentId:re(),triggerRef:l,open:f,onOpenChange:p,onOpenToggle:c.useCallback(()=>p(m=>!m),[p]),hasCustomAnchor:u,onCustomAnchorAdd:c.useCallback(()=>d(!0),[]),onCustomAnchorRemove:c.useCallback(()=>d(!1),[]),modal:i,children:n})})};xs.displayName=Gt;var bs="PopoverAnchor",rd=c.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ce(bs,n),s=ct(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:a}=o;return c.useEffect(()=>(i(),()=>a()),[i,a]),v.jsx(Lt,{...s,...r,ref:t})});rd.displayName=bs;var Ss="PopoverTrigger",Cs=c.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ce(Ss,n),s=ct(n),i=L(t,o.triggerRef),a=v.jsx(N.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Ts(o.open),...r,ref:i,onClick:A(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:v.jsx(Lt,{asChild:!0,...s,children:a})});Cs.displayName=Ss;var qn="PopoverPortal",[od,sd]=ws(qn,{forceMount:void 0}),Es=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,s=Ce(qn,t);return v.jsx(od,{scope:t,forceMount:n,children:v.jsx(q,{present:n||s.open,children:v.jsx(it,{asChild:!0,container:o,children:r})})})};Es.displayName=qn;var Ue="PopoverContent",Rs=c.forwardRef((e,t)=>{const n=sd(Ue,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,s=Ce(Ue,e.__scopePopover);return v.jsx(q,{present:r||s.open,children:s.modal?v.jsx(ad,{...o,ref:t}):v.jsx(cd,{...o,ref:t})})});Rs.displayName=Ue;var id=qu("PopoverContent.RemoveScroll"),ad=c.forwardRef((e,t)=>{const n=Ce(Ue,e.__scopePopover),r=c.useRef(null),o=L(t,r),s=c.useRef(!1);return c.useEffect(()=>{const i=r.current;if(i)return Gn(i)},[]),v.jsx(Ut,{as:id,allowPinchZoom:!0,children:v.jsx(Ps,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:A(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),s.current||(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:A(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0,u=a.button===2||l;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:A(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),cd=c.forwardRef((e,t)=>{const n=Ce(Ue,e.__scopePopover),r=c.useRef(!1),o=c.useRef(!1);return v.jsx(Ps,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var i,a;(i=e.onCloseAutoFocus)==null||i.call(e,s),s.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;((u=n.triggerRef.current)==null?void 0:u.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),Ps=c.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:d,...f}=e,p=Ce(Ue,n),m=ct(n);return zn(),v.jsx(Vt,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:v.jsx(ot,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:d,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1),children:v.jsx(jn,{"data-state":Ts(p.open),role:"dialog",id:p.contentId,...m,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),As="PopoverClose",ld=c.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ce(As,n);return v.jsx(N.button,{type:"button",...r,ref:t,onClick:A(e.onClick,()=>o.onOpenChange(!1))})});ld.displayName=As;var ud="PopoverArrow",dd=c.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=ct(n);return v.jsx($n,{...o,...r,ref:t})});dd.displayName=ud;function Ts(e){return e?"open":"closed"}var tp=xs,np=Cs,rp=Es,op=Rs,Yt="Collapsible",[fd]=ee(Yt),[pd,Zn]=fd(Yt),_s=c.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:s,onOpenChange:i,...a}=e,[l,u]=me({prop:r,defaultProp:o??!1,onChange:i,caller:Yt});return v.jsx(pd,{scope:n,disabled:s,contentId:re(),open:l,onOpenToggle:c.useCallback(()=>u(d=>!d),[u]),children:v.jsx(N.div,{"data-state":Jn(l),"data-disabled":s?"":void 0,...a,ref:t})})});_s.displayName=Yt;var Ns="CollapsibleTrigger",vd=c.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Zn(Ns,n);return v.jsx(N.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Jn(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:A(e.onClick,o.onOpenToggle)})});vd.displayName=Ns;var Qn="CollapsibleContent",hd=c.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Zn(Qn,e.__scopeCollapsible);return v.jsx(q,{present:n||o.open,children:({present:s})=>v.jsx(md,{...r,ref:t,present:s})})});hd.displayName=Qn;var md=c.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...s}=e,i=Zn(Qn,n),[a,l]=c.useState(r),u=c.useRef(null),d=L(t,u),f=c.useRef(0),p=f.current,m=c.useRef(0),y=m.current,h=i.open||a,g=c.useRef(h),w=c.useRef(void 0);return c.useEffect(()=>{const x=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(x)},[]),G(()=>{const x=u.current;if(x){w.current=w.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const b=x.getBoundingClientRect();f.current=b.height,m.current=b.width,g.current||(x.style.transitionDuration=w.current.transitionDuration,x.style.animationName=w.current.animationName),l(r)}},[i.open,r]),v.jsx(N.div,{"data-state":Jn(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!h,...s,ref:d,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":y?`${y}px`:void 0,...e.style},children:h&&o})});function Jn(e){return e?"open":"closed"}var sp=_s;function Ir(e){const t=gd(e),n=c.forwardRef((r,o)=>{const{children:s,...i}=r,a=c.Children.toArray(s),l=a.find(wd);if(l){const u=l.props.children,d=a.map(f=>f===l?c.Children.count(u)>1?c.Children.only(null):c.isValidElement(u)?u.props.children:null:f);return v.jsx(t,{...i,ref:o,children:c.isValidElement(u)?c.cloneElement(u,void 0,d):null})}return v.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function gd(e){const t=c.forwardRef((n,r)=>{const{children:o,...s}=n;if(c.isValidElement(o)){const i=bd(o),a=xd(s,o.props);return o.type!==c.Fragment&&(a.ref=r?De(r,i):i),c.cloneElement(o,a)}return c.Children.count(o)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var yd=Symbol("radix.slottable");function wd(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===yd}function xd(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function bd(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Os(e){const t=e+"CollectionProvider",[n,r]=ee(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=h=>{const{scope:g,children:w}=h,x=Ae.useRef(null),b=Ae.useRef(new Map).current;return v.jsx(o,{scope:g,itemMap:b,collectionRef:x,children:w})};i.displayName=t;const a=e+"CollectionSlot",l=Ir(a),u=Ae.forwardRef((h,g)=>{const{scope:w,children:x}=h,b=s(a,w),S=L(g,b.collectionRef);return v.jsx(l,{ref:S,children:x})});u.displayName=a;const d=e+"CollectionItemSlot",f="data-radix-collection-item",p=Ir(d),m=Ae.forwardRef((h,g)=>{const{scope:w,children:x,...b}=h,S=Ae.useRef(null),C=L(g,S),R=s(d,w);return Ae.useEffect(()=>(R.itemMap.set(S,{ref:S,...b}),()=>void R.itemMap.delete(S))),v.jsx(p,{[f]:"",ref:C,children:x})});m.displayName=d;function y(h){const g=s(e+"CollectionConsumer",h);return Ae.useCallback(()=>{const x=g.collectionRef.current;if(!x)return[];const b=Array.from(x.querySelectorAll(`[${f}]`));return Array.from(g.itemMap.values()).sort((R,E)=>b.indexOf(R.ref.current)-b.indexOf(E.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:i,Slot:u,ItemSlot:m},y,r]}function Sd(e){const t=Cd(e),n=c.forwardRef((r,o)=>{const{children:s,...i}=r,a=c.Children.toArray(s),l=a.find(Rd);if(l){const u=l.props.children,d=a.map(f=>f===l?c.Children.count(u)>1?c.Children.only(null):c.isValidElement(u)?u.props.children:null:f);return v.jsx(t,{...i,ref:o,children:c.isValidElement(u)?c.cloneElement(u,void 0,d):null})}return v.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function Cd(e){const t=c.forwardRef((n,r)=>{const{children:o,...s}=n;if(c.isValidElement(o)){const i=Ad(o),a=Pd(s,o.props);return o.type!==c.Fragment&&(a.ref=r?De(r,i):i),c.cloneElement(o,a)}return c.Children.count(o)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ed=Symbol("radix.slottable");function Rd(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ed}function Pd(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Ad(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Is(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Td=[" ","Enter","ArrowUp","ArrowDown"],_d=[" ","Enter"],Oe="Select",[Kt,Xt,Nd]=Os(Oe),[Xe]=ee(Oe,[Nd,Ke]),qt=Ke(),[Od,Ee]=Xe(Oe),[Id,Dd]=Xe(Oe),Ds=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:i,defaultValue:a,onValueChange:l,dir:u,name:d,autoComplete:f,disabled:p,required:m,form:y}=e,h=qt(t),[g,w]=c.useState(null),[x,b]=c.useState(null),[S,C]=c.useState(!1),R=kt(u),[E,P]=me({prop:r,defaultProp:o??!1,onChange:s,caller:Oe}),[T,_]=me({prop:i,defaultProp:a,onChange:l,caller:Oe}),M=c.useRef(null),$=g?y||!!g.closest("form"):!0,[F,j]=c.useState(new Set),H=Array.from(F).map(D=>D.props.value).join(";");return v.jsx(Ln,{...h,children:v.jsxs(Od,{required:m,scope:t,trigger:g,onTriggerChange:w,valueNode:x,onValueNodeChange:b,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:re(),value:T,onValueChange:_,open:E,onOpenChange:P,dir:R,triggerPointerDownPosRef:M,disabled:p,children:[v.jsx(Kt.Provider,{scope:t,children:v.jsx(Id,{scope:e.__scopeSelect,onNativeOptionAdd:c.useCallback(D=>{j(k=>new Set(k).add(D))},[]),onNativeOptionRemove:c.useCallback(D=>{j(k=>{const O=new Set(k);return O.delete(D),O})},[]),children:n})}),$?v.jsxs(ri,{"aria-hidden":!0,required:m,tabIndex:-1,name:d,autoComplete:f,value:T,onChange:D=>_(D.target.value),disabled:p,form:y,children:[T===void 0?v.jsx("option",{value:""}):null,Array.from(F)]},H):null]})})};Ds.displayName=Oe;var Ms="SelectTrigger",Ls=c.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=qt(n),i=Ee(Ms,n),a=i.disabled||r,l=L(t,i.onTriggerChange),u=Xt(n),d=c.useRef("touch"),[f,p,m]=si(h=>{const g=u().filter(b=>!b.disabled),w=g.find(b=>b.value===i.value),x=ii(g,h,w);x!==void 0&&i.onValueChange(x.value)}),y=h=>{a||(i.onOpenChange(!0),m()),h&&(i.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)})};return v.jsx(Lt,{asChild:!0,...s,children:v.jsx(N.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":oi(i.value)?"":void 0,...o,ref:l,onClick:A(o.onClick,h=>{h.currentTarget.focus(),d.current!=="mouse"&&y(h)}),onPointerDown:A(o.onPointerDown,h=>{d.current=h.pointerType;const g=h.target;g.hasPointerCapture(h.pointerId)&&g.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&h.pointerType==="mouse"&&(y(h),h.preventDefault())}),onKeyDown:A(o.onKeyDown,h=>{const g=f.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&p(h.key),!(g&&h.key===" ")&&Td.includes(h.key)&&(y(),h.preventDefault())})})})});Ls.displayName=Ms;var js="SelectValue",$s=c.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...a}=e,l=Ee(js,n),{onValueNodeHasChildrenChange:u}=l,d=s!==void 0,f=L(t,l.onValueNodeChange);return G(()=>{u(d)},[u,d]),v.jsx(N.span,{...a,ref:f,style:{pointerEvents:"none"},children:oi(l.value)?v.jsx(v.Fragment,{children:i}):s})});$s.displayName=js;var Md="SelectIcon",Fs=c.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return v.jsx(N.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Fs.displayName=Md;var Ld="SelectPortal",ks=e=>v.jsx(it,{asChild:!0,...e});ks.displayName=Ld;var Ie="SelectContent",Ws=c.forwardRef((e,t)=>{const n=Ee(Ie,e.__scopeSelect),[r,o]=c.useState();if(G(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?Nt.createPortal(v.jsx(Bs,{scope:e.__scopeSelect,children:v.jsx(Kt.Slot,{scope:e.__scopeSelect,children:v.jsx("div",{children:e.children})})}),s):null}return v.jsx(Vs,{...e,ref:t})});Ws.displayName=Ie;var ne=10,[Bs,Re]=Xe(Ie),jd="SelectContentImpl",$d=Sd("SelectContent.RemoveScroll"),Vs=c.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:a,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:y,hideWhenDetached:h,avoidCollisions:g,...w}=e,x=Ee(Ie,n),[b,S]=c.useState(null),[C,R]=c.useState(null),E=L(t,I=>S(I)),[P,T]=c.useState(null),[_,M]=c.useState(null),$=Xt(n),[F,j]=c.useState(!1),H=c.useRef(!1);c.useEffect(()=>{if(b)return Gn(b)},[b]),zn();const D=c.useCallback(I=>{const[z,...Y]=$().map(B=>B.ref.current),[V]=Y.slice(-1),W=document.activeElement;for(const B of I)if(B===W||(B==null||B.scrollIntoView({block:"nearest"}),B===z&&C&&(C.scrollTop=0),B===V&&C&&(C.scrollTop=C.scrollHeight),B==null||B.focus(),document.activeElement!==W))return},[$,C]),k=c.useCallback(()=>D([P,b]),[D,P,b]);c.useEffect(()=>{F&&k()},[F,k]);const{onOpenChange:O,triggerPointerDownPosRef:U}=x;c.useEffect(()=>{if(b){let I={x:0,y:0};const z=V=>{var W,B;I={x:Math.abs(Math.round(V.pageX)-(((W=U.current)==null?void 0:W.x)??0)),y:Math.abs(Math.round(V.pageY)-(((B=U.current)==null?void 0:B.y)??0))}},Y=V=>{I.x<=10&&I.y<=10?V.preventDefault():b.contains(V.target)||O(!1),document.removeEventListener("pointermove",z),U.current=null};return U.current!==null&&(document.addEventListener("pointermove",z),document.addEventListener("pointerup",Y,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",z),document.removeEventListener("pointerup",Y,{capture:!0})}}},[b,O,U]),c.useEffect(()=>{const I=()=>O(!1);return window.addEventListener("blur",I),window.addEventListener("resize",I),()=>{window.removeEventListener("blur",I),window.removeEventListener("resize",I)}},[O]);const[X,pe]=si(I=>{const z=$().filter(W=>!W.disabled),Y=z.find(W=>W.ref.current===document.activeElement),V=ii(z,I,Y);V&&setTimeout(()=>V.ref.current.focus())}),qe=c.useCallback((I,z,Y)=>{const V=!H.current&&!Y;(x.value!==void 0&&x.value===z||V)&&(T(I),V&&(H.current=!0))},[x.value]),Ze=c.useCallback(()=>b==null?void 0:b.focus(),[b]),we=c.useCallback((I,z,Y)=>{const V=!H.current&&!Y;(x.value!==void 0&&x.value===z||V)&&M(I)},[x.value]),Me=r==="popper"?xn:Hs,Pe=Me===xn?{side:a,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:y,hideWhenDetached:h,avoidCollisions:g}:{};return v.jsx(Bs,{scope:n,content:b,viewport:C,onViewportChange:R,itemRefCallback:qe,selectedItem:P,onItemLeave:Ze,itemTextRefCallback:we,focusSelectedItem:k,selectedItemText:_,position:r,isPositioned:F,searchRef:X,children:v.jsx(Ut,{as:$d,allowPinchZoom:!0,children:v.jsx(Vt,{asChild:!0,trapped:x.open,onMountAutoFocus:I=>{I.preventDefault()},onUnmountAutoFocus:A(o,I=>{var z;(z=x.trigger)==null||z.focus({preventScroll:!0}),I.preventDefault()}),children:v.jsx(ot,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:I=>I.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:v.jsx(Me,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:I=>I.preventDefault(),...w,...Pe,onPlaced:()=>j(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:A(w.onKeyDown,I=>{const z=I.ctrlKey||I.altKey||I.metaKey;if(I.key==="Tab"&&I.preventDefault(),!z&&I.key.length===1&&pe(I.key),["ArrowUp","ArrowDown","Home","End"].includes(I.key)){let V=$().filter(W=>!W.disabled).map(W=>W.ref.current);if(["ArrowUp","End"].includes(I.key)&&(V=V.slice().reverse()),["ArrowUp","ArrowDown"].includes(I.key)){const W=I.target,B=V.indexOf(W);V=V.slice(B+1)}setTimeout(()=>D(V)),I.preventDefault()}})})})})})})});Vs.displayName=jd;var Fd="SelectItemAlignedPosition",Hs=c.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=Ee(Ie,n),i=Re(Ie,n),[a,l]=c.useState(null),[u,d]=c.useState(null),f=L(t,E=>d(E)),p=Xt(n),m=c.useRef(!1),y=c.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:w,focusSelectedItem:x}=i,b=c.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&u&&h&&g&&w){const E=s.trigger.getBoundingClientRect(),P=u.getBoundingClientRect(),T=s.valueNode.getBoundingClientRect(),_=w.getBoundingClientRect();if(s.dir!=="rtl"){const W=_.left-P.left,B=T.left-W,Z=E.left-B,ae=E.width+Z,Qe=Math.max(ae,P.width),Je=window.innerWidth-ne,et=yn(B,[ne,Math.max(ne,Je-Qe)]);a.style.minWidth=ae+"px",a.style.left=et+"px"}else{const W=P.right-_.right,B=window.innerWidth-T.right-W,Z=window.innerWidth-E.right-B,ae=E.width+Z,Qe=Math.max(ae,P.width),Je=window.innerWidth-ne,et=yn(B,[ne,Math.max(ne,Je-Qe)]);a.style.minWidth=ae+"px",a.style.right=et+"px"}const M=p(),$=window.innerHeight-ne*2,F=h.scrollHeight,j=window.getComputedStyle(u),H=parseInt(j.borderTopWidth,10),D=parseInt(j.paddingTop,10),k=parseInt(j.borderBottomWidth,10),O=parseInt(j.paddingBottom,10),U=H+D+F+O+k,X=Math.min(g.offsetHeight*5,U),pe=window.getComputedStyle(h),qe=parseInt(pe.paddingTop,10),Ze=parseInt(pe.paddingBottom,10),we=E.top+E.height/2-ne,Me=$-we,Pe=g.offsetHeight/2,I=g.offsetTop+Pe,z=H+D+I,Y=U-z;if(z<=we){const W=M.length>0&&g===M[M.length-1].ref.current;a.style.bottom="0px";const B=u.clientHeight-h.offsetTop-h.offsetHeight,Z=Math.max(Me,Pe+(W?Ze:0)+B+k),ae=z+Z;a.style.height=ae+"px"}else{const W=M.length>0&&g===M[0].ref.current;a.style.top="0px";const Z=Math.max(we,H+h.offsetTop+(W?qe:0)+Pe)+Y;a.style.height=Z+"px",h.scrollTop=z-we+h.offsetTop}a.style.margin=`${ne}px 0`,a.style.minHeight=X+"px",a.style.maxHeight=$+"px",r==null||r(),requestAnimationFrame(()=>m.current=!0)}},[p,s.trigger,s.valueNode,a,u,h,g,w,s.dir,r]);G(()=>b(),[b]);const[S,C]=c.useState();G(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const R=c.useCallback(E=>{E&&y.current===!0&&(b(),x==null||x(),y.current=!1)},[b,x]);return v.jsx(Wd,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:m,onScrollButtonChange:R,children:v.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:v.jsx(N.div,{...o,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Hs.displayName=Fd;var kd="SelectPopperPosition",xn=c.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=ne,...s}=e,i=qt(n);return v.jsx(jn,{...i,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});xn.displayName=kd;var[Wd,er]=Xe(Ie,{}),bn="SelectViewport",Us=c.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=Re(bn,n),i=er(bn,n),a=L(t,s.onViewportChange),l=c.useRef(0);return v.jsxs(v.Fragment,{children:[v.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:r}),v.jsx(Kt.Slot,{scope:n,children:v.jsx(N.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:A(o.onScroll,u=>{const d=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:p}=i;if(p!=null&&p.current&&f){const m=Math.abs(l.current-d.scrollTop);if(m>0){const y=window.innerHeight-ne*2,h=parseFloat(f.style.minHeight),g=parseFloat(f.style.height),w=Math.max(h,g);if(w<y){const x=w+m,b=Math.min(y,x),S=x-b;f.style.height=b+"px",f.style.bottom==="0px"&&(d.scrollTop=S>0?S:0,f.style.justifyContent="flex-end")}}}l.current=d.scrollTop})})})]})});Us.displayName=bn;var zs="SelectGroup",[Bd,Vd]=Xe(zs),Hd=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=re();return v.jsx(Bd,{scope:n,id:o,children:v.jsx(N.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Hd.displayName=zs;var Gs="SelectLabel",Ys=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Vd(Gs,n);return v.jsx(N.div,{id:o.id,...r,ref:t})});Ys.displayName=Gs;var _t="SelectItem",[Ud,Ks]=Xe(_t),Xs=c.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,a=Ee(_t,n),l=Re(_t,n),u=a.value===r,[d,f]=c.useState(s??""),[p,m]=c.useState(!1),y=L(t,x=>{var b;return(b=l.itemRefCallback)==null?void 0:b.call(l,x,r,o)}),h=re(),g=c.useRef("touch"),w=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")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 v.jsx(Ud,{scope:n,value:r,disabled:o,textId:h,isSelected:u,onItemTextChange:c.useCallback(x=>{f(b=>b||((x==null?void 0:x.textContent)??"").trim())},[]),children:v.jsx(Kt.ItemSlot,{scope:n,value:r,disabled:o,textValue:d,children:v.jsx(N.div,{role:"option","aria-labelledby":h,"data-highlighted":p?"":void 0,"aria-selected":u&&p,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:y,onFocus:A(i.onFocus,()=>m(!0)),onBlur:A(i.onBlur,()=>m(!1)),onClick:A(i.onClick,()=>{g.current!=="mouse"&&w()}),onPointerUp:A(i.onPointerUp,()=>{g.current==="mouse"&&w()}),onPointerDown:A(i.onPointerDown,x=>{g.current=x.pointerType}),onPointerMove:A(i.onPointerMove,x=>{var b;g.current=x.pointerType,o?(b=l.onItemLeave)==null||b.call(l):g.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:A(i.onPointerLeave,x=>{var b;x.currentTarget===document.activeElement&&((b=l.onItemLeave)==null||b.call(l))}),onKeyDown:A(i.onKeyDown,x=>{var S;((S=l.searchRef)==null?void 0:S.current)!==""&&x.key===" "||(_d.includes(x.key)&&w(),x.key===" "&&x.preventDefault())})})})})});Xs.displayName=_t;var tt="SelectItemText",qs=c.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,i=Ee(tt,n),a=Re(tt,n),l=Ks(tt,n),u=Dd(tt,n),[d,f]=c.useState(null),p=L(t,w=>f(w),l.onItemTextChange,w=>{var x;return(x=a.itemTextRefCallback)==null?void 0:x.call(a,w,l.value,l.disabled)}),m=d==null?void 0:d.textContent,y=c.useMemo(()=>v.jsx("option",{value:l.value,disabled:l.disabled,children:m},l.value),[l.disabled,l.value,m]),{onNativeOptionAdd:h,onNativeOptionRemove:g}=u;return G(()=>(h(y),()=>g(y)),[h,g,y]),v.jsxs(v.Fragment,{children:[v.jsx(N.span,{id:l.textId,...s,ref:p}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Nt.createPortal(s.children,i.valueNode):null]})});qs.displayName=tt;var Zs="SelectItemIndicator",Qs=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Ks(Zs,n).isSelected?v.jsx(N.span,{"aria-hidden":!0,...r,ref:t}):null});Qs.displayName=Zs;var Sn="SelectScrollUpButton",Js=c.forwardRef((e,t)=>{const n=Re(Sn,e.__scopeSelect),r=er(Sn,e.__scopeSelect),[o,s]=c.useState(!1),i=L(t,r.onScrollButtonChange);return G(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=l.scrollTop>0;s(u)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?v.jsx(ti,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});Js.displayName=Sn;var Cn="SelectScrollDownButton",ei=c.forwardRef((e,t)=>{const n=Re(Cn,e.__scopeSelect),r=er(Cn,e.__scopeSelect),[o,s]=c.useState(!1),i=L(t,r.onScrollButtonChange);return G(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=l.scrollHeight-l.clientHeight,d=Math.ceil(l.scrollTop)<u;s(d)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?v.jsx(ti,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});ei.displayName=Cn;var ti=c.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=Re("SelectScrollButton",n),i=c.useRef(null),a=Xt(n),l=c.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return c.useEffect(()=>()=>l(),[l]),G(()=>{var d;const u=a().find(f=>f.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[a]),v.jsx(N.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:A(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:A(o.onPointerMove,()=>{var u;(u=s.onItemLeave)==null||u.call(s),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:A(o.onPointerLeave,()=>{l()})})}),zd="SelectSeparator",ni=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return v.jsx(N.div,{"aria-hidden":!0,...r,ref:t})});ni.displayName=zd;var En="SelectArrow",Gd=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=qt(n),s=Ee(En,n),i=Re(En,n);return s.open&&i.position==="popper"?v.jsx($n,{...o,...r,ref:t}):null});Gd.displayName=En;var Yd="SelectBubbleInput",ri=c.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=c.useRef(null),s=L(r,o),i=Is(t);return c.useEffect(()=>{const a=o.current;if(!a)return;const l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(i!==t&&d){const f=new Event("change",{bubbles:!0});d.call(a,t),a.dispatchEvent(f)}},[i,t]),v.jsx(N.select,{...n,style:{...oo,...n.style},ref:s,defaultValue:t})});ri.displayName=Yd;function oi(e){return e===""||e===void 0}function si(e){const t=K(e),n=c.useRef(""),r=c.useRef(0),o=c.useCallback(i=>{const a=n.current+i;t(a),function l(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(a)},[t]),s=c.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function ii(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=Kd(e,Math.max(s,0));o.length===1&&(i=i.filter(u=>u!==n));const l=i.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function Kd(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var ip=Ds,ap=Ls,cp=$s,lp=Fs,up=ks,dp=Ws,fp=Us,pp=Ys,vp=Xs,hp=qs,mp=Qs,gp=Js,yp=ei,wp=ni;function Xd(e,t=[]){let n=[];function r(s,i){const a=c.createContext(i);a.displayName=s+"Context";const l=n.length;n=[...n,i];const u=f=>{var w;const{scope:p,children:m,...y}=f,h=((w=p==null?void 0:p[e])==null?void 0:w[l])||a,g=c.useMemo(()=>y,Object.values(y));return v.jsx(h.Provider,{value:g,children:m})};u.displayName=s+"Provider";function d(f,p){var h;const m=((h=p==null?void 0:p[e])==null?void 0:h[l])||a,y=c.useContext(m);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const o=()=>{const s=n.map(i=>c.createContext(i));return function(a){const l=(a==null?void 0:a[e])||s;return c.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,qd(o,...t)]}function qd(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:l,scopeName:u})=>{const f=l(s)[`__scope${u}`];return{...a,...f}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var Zd=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],tr=Zd.reduce((e,t)=>{const n=Ft(`Primitive.${t}`),r=c.forwardRef((o,s)=>{const{asChild:i,...a}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),ai={exports:{}},ci={};/**
57
+ * @license React
58
+ * use-sync-external-store-shim.production.js
59
+ *
60
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
61
+ *
62
+ * This source code is licensed under the MIT license found in the
63
+ * LICENSE file in the root directory of this source tree.
64
+ */var ze=c;function Qd(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Jd=typeof Object.is=="function"?Object.is:Qd,ef=ze.useState,tf=ze.useEffect,nf=ze.useLayoutEffect,rf=ze.useDebugValue;function of(e,t){var n=t(),r=ef({inst:{value:n,getSnapshot:t}}),o=r[0].inst,s=r[1];return nf(function(){o.value=n,o.getSnapshot=t,un(o)&&s({inst:o})},[e,n,t]),tf(function(){return un(o)&&s({inst:o}),e(function(){un(o)&&s({inst:o})})},[e]),rf(n),n}function un(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Jd(e,n)}catch{return!0}}function sf(e,t){return t()}var af=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?sf:of;ci.useSyncExternalStore=ze.useSyncExternalStore!==void 0?ze.useSyncExternalStore:af;ai.exports=ci;var cf=ai.exports;function lf(){return cf.useSyncExternalStore(uf,()=>!0,()=>!1)}function uf(){return()=>{}}var nr="Avatar",[df]=Xd(nr),[ff,li]=df(nr),ui=c.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,s]=c.useState("idle");return v.jsx(ff,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:s,children:v.jsx(tr.span,{...r,ref:t})})});ui.displayName=nr;var di="AvatarImage",fi=c.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...s}=e,i=li(di,n),a=pf(r,s),l=K(u=>{o(u),i.onImageLoadingStatusChange(u)});return G(()=>{a!=="idle"&&l(a)},[a,l]),a==="loaded"?v.jsx(tr.img,{...s,ref:t,src:r}):null});fi.displayName=di;var pi="AvatarFallback",vi=c.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,s=li(pi,n),[i,a]=c.useState(r===void 0);return c.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>a(!0),r);return()=>window.clearTimeout(l)}},[r]),i&&s.imageLoadingStatus!=="loaded"?v.jsx(tr.span,{...o,ref:t}):null});vi.displayName=pi;function Dr(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function pf(e,{referrerPolicy:t,crossOrigin:n}){const r=lf(),o=c.useRef(null),s=r?(o.current||(o.current=new window.Image),o.current):null,[i,a]=c.useState(()=>Dr(s,e));return G(()=>{a(Dr(s,e))},[s,e]),G(()=>{const l=f=>()=>{a(f)};if(!s)return;const u=l("loaded"),d=l("error");return s.addEventListener("load",u),s.addEventListener("error",d),t&&(s.referrerPolicy=t),typeof n=="string"&&(s.crossOrigin=n),()=>{s.removeEventListener("load",u),s.removeEventListener("error",d)}},[s,n,t]),i}var xp=ui,bp=fi,Sp=vi,dn="rovingFocusGroup.onEntryFocus",vf={bubbles:!1,cancelable:!0},lt="RovingFocusGroup",[Rn,hi,hf]=Os(lt),[mf,mi]=ee(lt,[hf]),[gf,yf]=mf(lt),gi=c.forwardRef((e,t)=>v.jsx(Rn.Provider,{scope:e.__scopeRovingFocusGroup,children:v.jsx(Rn.Slot,{scope:e.__scopeRovingFocusGroup,children:v.jsx(wf,{...e,ref:t})})}));gi.displayName=lt;var wf=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,p=c.useRef(null),m=L(t,p),y=kt(s),[h,g]=me({prop:i,defaultProp:a??null,onChange:l,caller:lt}),[w,x]=c.useState(!1),b=K(u),S=hi(n),C=c.useRef(!1),[R,E]=c.useState(0);return c.useEffect(()=>{const P=p.current;if(P)return P.addEventListener(dn,b),()=>P.removeEventListener(dn,b)},[b]),v.jsx(gf,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:h,onItemFocus:c.useCallback(P=>g(P),[g]),onItemShiftTab:c.useCallback(()=>x(!0),[]),onFocusableItemAdd:c.useCallback(()=>E(P=>P+1),[]),onFocusableItemRemove:c.useCallback(()=>E(P=>P-1),[]),children:v.jsx(N.div,{tabIndex:w||R===0?-1:0,"data-orientation":r,...f,ref:m,style:{outline:"none",...e.style},onMouseDown:A(e.onMouseDown,()=>{C.current=!0}),onFocus:A(e.onFocus,P=>{const T=!C.current;if(P.target===P.currentTarget&&T&&!w){const _=new CustomEvent(dn,vf);if(P.currentTarget.dispatchEvent(_),!_.defaultPrevented){const M=S().filter(D=>D.focusable),$=M.find(D=>D.active),F=M.find(D=>D.id===h),H=[$,F,...M].filter(Boolean).map(D=>D.ref.current);xi(H,d)}}C.current=!1}),onBlur:A(e.onBlur,()=>x(!1))})})}),yi="RovingFocusGroupItem",wi=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:i,...a}=e,l=re(),u=s||l,d=yf(yi,n),f=d.currentTabStopId===u,p=hi(n),{onFocusableItemAdd:m,onFocusableItemRemove:y,currentTabStopId:h}=d;return c.useEffect(()=>{if(r)return m(),()=>y()},[r,m,y]),v.jsx(Rn.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:v.jsx(N.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...a,ref:t,onMouseDown:A(e.onMouseDown,g=>{r?d.onItemFocus(u):g.preventDefault()}),onFocus:A(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:A(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){d.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const w=Sf(g,d.orientation,d.dir);if(w!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let b=p().filter(S=>S.focusable).map(S=>S.ref.current);if(w==="last")b.reverse();else if(w==="prev"||w==="next"){w==="prev"&&b.reverse();const S=b.indexOf(g.currentTarget);b=d.loop?Cf(b,S+1):b.slice(S+1)}setTimeout(()=>xi(b))}}),children:typeof i=="function"?i({isCurrentTabStop:f,hasTabStop:h!=null}):i})})});wi.displayName=yi;var xf={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function bf(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Sf(e,t,n){const r=bf(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return xf[r]}function xi(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Cf(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ef=gi,Rf=wi,Zt="Tabs",[Pf]=ee(Zt,[mi]),bi=mi(),[Af,rr]=Pf(Zt),Si=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:s,orientation:i="horizontal",dir:a,activationMode:l="automatic",...u}=e,d=kt(a),[f,p]=me({prop:r,onChange:o,defaultProp:s??"",caller:Zt});return v.jsx(Af,{scope:n,baseId:re(),value:f,onValueChange:p,orientation:i,dir:d,activationMode:l,children:v.jsx(N.div,{dir:d,"data-orientation":i,...u,ref:t})})});Si.displayName=Zt;var Ci="TabsList",Ei=c.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,s=rr(Ci,n),i=bi(n);return v.jsx(Ef,{asChild:!0,...i,orientation:s.orientation,dir:s.dir,loop:r,children:v.jsx(N.div,{role:"tablist","aria-orientation":s.orientation,...o,ref:t})})});Ei.displayName=Ci;var Ri="TabsTrigger",Pi=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...s}=e,i=rr(Ri,n),a=bi(n),l=_i(i.baseId,r),u=Ni(i.baseId,r),d=r===i.value;return v.jsx(Rf,{asChild:!0,...a,focusable:!o,active:d,children:v.jsx(N.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...s,ref:t,onMouseDown:A(e.onMouseDown,f=>{!o&&f.button===0&&f.ctrlKey===!1?i.onValueChange(r):f.preventDefault()}),onKeyDown:A(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&i.onValueChange(r)}),onFocus:A(e.onFocus,()=>{const f=i.activationMode!=="manual";!d&&!o&&f&&i.onValueChange(r)})})})});Pi.displayName=Ri;var Ai="TabsContent",Ti=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:s,...i}=e,a=rr(Ai,n),l=_i(a.baseId,r),u=Ni(a.baseId,r),d=r===a.value,f=c.useRef(d);return c.useEffect(()=>{const p=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(p)},[]),v.jsx(q,{present:o||d,children:({present:p})=>v.jsx(N.div,{"data-state":d?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!p,id:u,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:p&&s})})});Ti.displayName=Ai;function _i(e,t){return`${e}-trigger-${t}`}function Ni(e,t){return`${e}-content-${t}`}var Cp=Si,Ep=Ei,Rp=Pi,Pp=Ti,Qt="Switch",[Tf]=ee(Qt),[_f,Nf]=Tf(Qt),Oi=c.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:s,required:i,disabled:a,value:l="on",onCheckedChange:u,form:d,...f}=e,[p,m]=c.useState(null),y=L(t,b=>m(b)),h=c.useRef(!1),g=p?d||!!p.closest("form"):!0,[w,x]=me({prop:o,defaultProp:s??!1,onChange:u,caller:Qt});return v.jsxs(_f,{scope:n,checked:w,disabled:a,children:[v.jsx(N.button,{type:"button",role:"switch","aria-checked":w,"aria-required":i,"data-state":Li(w),"data-disabled":a?"":void 0,disabled:a,value:l,...f,ref:y,onClick:A(e.onClick,b=>{x(S=>!S),g&&(h.current=b.isPropagationStopped(),h.current||b.stopPropagation())})}),g&&v.jsx(Mi,{control:p,bubbles:!h.current,name:r,value:l,checked:w,required:i,disabled:a,form:d,style:{transform:"translateX(-100%)"}})]})});Oi.displayName=Qt;var Ii="SwitchThumb",Di=c.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=Nf(Ii,n);return v.jsx(N.span,{"data-state":Li(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});Di.displayName=Ii;var Of="SwitchBubbleInput",Mi=c.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},s)=>{const i=c.useRef(null),a=L(i,s),l=Is(n),u=Kr(t);return c.useEffect(()=>{const d=i.current;if(!d)return;const f=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==n&&m){const y=new Event("click",{bubbles:r});m.call(d,n),d.dispatchEvent(y)}},[l,n,r]),v.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:a,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Mi.displayName=Of;function Li(e){return e?"checked":"unchecked"}var Ap=Oi,Tp=Di;export{ep as $,gp as A,yp as B,Ff as C,Fu as D,wp as E,xp as F,Sp as G,bp as H,lp as I,Cp as J,Ep as K,pp as L,Rp as M,Pp as N,Lu as O,$f as P,Ap as Q,Lf as R,ol as S,jf as T,Tp as U,Vf as V,Gf as W,Yf as X,Kf as Y,qf as Z,Jf as _,Mf as a,Qf as a0,Zf as a1,Xf as a2,Uf as a3,zf as a4,kf as a5,Wf as b,Bf as c,Hf as d,ul as e,tp as f,np as g,rp as h,op as i,Iu as j,Mu as k,ju as l,ss as m,$u as n,sp as o,vd as p,hd as q,ip as r,cp as s,ap as t,up as u,dp as v,fp as w,vp as x,mp as y,hp as z};
65
+ //# sourceMappingURL=vendor-radix-3UdfCgs_.js.map