@sudocode-ai/local-server 0.1.0

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 (130) hide show
  1. package/README.md +19 -0
  2. package/dist/cli.d.ts +7 -0
  3. package/dist/cli.d.ts.map +1 -0
  4. package/dist/cli.js +105 -0
  5. package/dist/cli.js.map +7 -0
  6. package/dist/execution/engine/engine.d.ts +103 -0
  7. package/dist/execution/engine/engine.d.ts.map +1 -0
  8. package/dist/execution/engine/simple-engine.d.ts +190 -0
  9. package/dist/execution/engine/simple-engine.d.ts.map +1 -0
  10. package/dist/execution/engine/types.d.ts +116 -0
  11. package/dist/execution/engine/types.d.ts.map +1 -0
  12. package/dist/execution/output/ag-ui-adapter.d.ts +176 -0
  13. package/dist/execution/output/ag-ui-adapter.d.ts.map +1 -0
  14. package/dist/execution/output/ag-ui-integration.d.ts +96 -0
  15. package/dist/execution/output/ag-ui-integration.d.ts.map +1 -0
  16. package/dist/execution/output/claude-code-output-processor.d.ts +321 -0
  17. package/dist/execution/output/claude-code-output-processor.d.ts.map +1 -0
  18. package/dist/execution/output/index.d.ts +18 -0
  19. package/dist/execution/output/index.d.ts.map +1 -0
  20. package/dist/execution/output/types.d.ts +421 -0
  21. package/dist/execution/output/types.d.ts.map +1 -0
  22. package/dist/execution/process/builders/claude.d.ts +86 -0
  23. package/dist/execution/process/builders/claude.d.ts.map +1 -0
  24. package/dist/execution/process/index.d.ts +15 -0
  25. package/dist/execution/process/index.d.ts.map +1 -0
  26. package/dist/execution/process/manager.d.ts +133 -0
  27. package/dist/execution/process/manager.d.ts.map +1 -0
  28. package/dist/execution/process/simple-manager.d.ts +102 -0
  29. package/dist/execution/process/simple-manager.d.ts.map +1 -0
  30. package/dist/execution/process/types.d.ts +105 -0
  31. package/dist/execution/process/types.d.ts.map +1 -0
  32. package/dist/execution/process/utils.d.ts +53 -0
  33. package/dist/execution/process/utils.d.ts.map +1 -0
  34. package/dist/execution/resilience/circuit-breaker.d.ts +170 -0
  35. package/dist/execution/resilience/circuit-breaker.d.ts.map +1 -0
  36. package/dist/execution/resilience/executor.d.ts +109 -0
  37. package/dist/execution/resilience/executor.d.ts.map +1 -0
  38. package/dist/execution/resilience/index.d.ts +14 -0
  39. package/dist/execution/resilience/index.d.ts.map +1 -0
  40. package/dist/execution/resilience/resilient-executor.d.ts +86 -0
  41. package/dist/execution/resilience/resilient-executor.d.ts.map +1 -0
  42. package/dist/execution/resilience/retry.d.ts +161 -0
  43. package/dist/execution/resilience/retry.d.ts.map +1 -0
  44. package/dist/execution/resilience/types.d.ts +226 -0
  45. package/dist/execution/resilience/types.d.ts.map +1 -0
  46. package/dist/execution/transport/event-buffer.d.ts +119 -0
  47. package/dist/execution/transport/event-buffer.d.ts.map +1 -0
  48. package/dist/execution/transport/index.d.ts +10 -0
  49. package/dist/execution/transport/index.d.ts.map +1 -0
  50. package/dist/execution/transport/sse-transport.d.ts +146 -0
  51. package/dist/execution/transport/sse-transport.d.ts.map +1 -0
  52. package/dist/execution/transport/transport-manager.d.ts +176 -0
  53. package/dist/execution/transport/transport-manager.d.ts.map +1 -0
  54. package/dist/execution/workflow/index.d.ts +13 -0
  55. package/dist/execution/workflow/index.d.ts.map +1 -0
  56. package/dist/execution/workflow/linear-orchestrator.d.ts +216 -0
  57. package/dist/execution/workflow/linear-orchestrator.d.ts.map +1 -0
  58. package/dist/execution/workflow/memory-storage.d.ts +54 -0
  59. package/dist/execution/workflow/memory-storage.d.ts.map +1 -0
  60. package/dist/execution/workflow/orchestrator.d.ts +158 -0
  61. package/dist/execution/workflow/orchestrator.d.ts.map +1 -0
  62. package/dist/execution/workflow/types.d.ts +172 -0
  63. package/dist/execution/workflow/types.d.ts.map +1 -0
  64. package/dist/execution/workflow/utils.d.ts +89 -0
  65. package/dist/execution/workflow/utils.d.ts.map +1 -0
  66. package/dist/execution/worktree/config.d.ts +74 -0
  67. package/dist/execution/worktree/config.d.ts.map +1 -0
  68. package/dist/execution/worktree/git-cli.d.ts +151 -0
  69. package/dist/execution/worktree/git-cli.d.ts.map +1 -0
  70. package/dist/execution/worktree/index.d.ts +16 -0
  71. package/dist/execution/worktree/index.d.ts.map +1 -0
  72. package/dist/execution/worktree/manager.d.ts +184 -0
  73. package/dist/execution/worktree/manager.d.ts.map +1 -0
  74. package/dist/execution/worktree/types.d.ts +90 -0
  75. package/dist/execution/worktree/types.d.ts.map +1 -0
  76. package/dist/index.d.ts +8 -0
  77. package/dist/index.d.ts.map +1 -0
  78. package/dist/index.js +104 -0
  79. package/dist/index.js.map +7 -0
  80. package/dist/public/assets/index-C4SmlXoo.js +568 -0
  81. package/dist/public/assets/index-C4SmlXoo.js.map +1 -0
  82. package/dist/public/assets/index-DE59j7ti.css +1 -0
  83. package/dist/public/assets/react-vendor-LX0UoTxg.js +60 -0
  84. package/dist/public/assets/react-vendor-LX0UoTxg.js.map +1 -0
  85. package/dist/public/assets/ui-vendor-_cxVHaqZ.js +54 -0
  86. package/dist/public/assets/ui-vendor-_cxVHaqZ.js.map +1 -0
  87. package/dist/public/favicon.ico +0 -0
  88. package/dist/public/index.html +16 -0
  89. package/dist/public/logo.png +0 -0
  90. package/dist/routes/executions-stream.d.ts +24 -0
  91. package/dist/routes/executions-stream.d.ts.map +1 -0
  92. package/dist/routes/executions.d.ts +19 -0
  93. package/dist/routes/executions.d.ts.map +1 -0
  94. package/dist/routes/feedback.d.ts +7 -0
  95. package/dist/routes/feedback.d.ts.map +1 -0
  96. package/dist/routes/issues.d.ts +7 -0
  97. package/dist/routes/issues.d.ts.map +1 -0
  98. package/dist/routes/relationships.d.ts +7 -0
  99. package/dist/routes/relationships.d.ts.map +1 -0
  100. package/dist/routes/specs.d.ts +7 -0
  101. package/dist/routes/specs.d.ts.map +1 -0
  102. package/dist/services/db.d.ts +33 -0
  103. package/dist/services/db.d.ts.map +1 -0
  104. package/dist/services/execution-lifecycle.d.ts +108 -0
  105. package/dist/services/execution-lifecycle.d.ts.map +1 -0
  106. package/dist/services/execution-service.d.ts +185 -0
  107. package/dist/services/execution-service.d.ts.map +1 -0
  108. package/dist/services/executions.d.ts +59 -0
  109. package/dist/services/executions.d.ts.map +1 -0
  110. package/dist/services/export.d.ts +24 -0
  111. package/dist/services/export.d.ts.map +1 -0
  112. package/dist/services/feedback.d.ts +40 -0
  113. package/dist/services/feedback.d.ts.map +1 -0
  114. package/dist/services/issues.d.ts +27 -0
  115. package/dist/services/issues.d.ts.map +1 -0
  116. package/dist/services/prompt-template-engine.d.ts +108 -0
  117. package/dist/services/prompt-template-engine.d.ts.map +1 -0
  118. package/dist/services/prompt-templates.d.ts +97 -0
  119. package/dist/services/prompt-templates.d.ts.map +1 -0
  120. package/dist/services/relationships.d.ts +35 -0
  121. package/dist/services/relationships.d.ts.map +1 -0
  122. package/dist/services/specs.d.ts +27 -0
  123. package/dist/services/specs.d.ts.map +1 -0
  124. package/dist/services/watcher.d.ts +50 -0
  125. package/dist/services/watcher.d.ts.map +1 -0
  126. package/dist/services/websocket.d.ts +127 -0
  127. package/dist/services/websocket.d.ts.map +1 -0
  128. package/dist/utils/sudocode-dir.d.ts +6 -0
  129. package/dist/utils/sudocode-dir.d.ts.map +1 -0
  130. package/package.json +74 -0
@@ -0,0 +1,54 @@
1
+ import{r as or,a,b as Yt,R as Xt,c as ir,d as oe}from"./react-vendor-LX0UoTxg.js";var ze={exports:{}},ge={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var xt;function sr(){if(xt)return ge;xt=1;var e=or(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function c(s,l,u){var f,d={},h=null,p=null;u!==void 0&&(h=""+u),l.key!==void 0&&(h=""+l.key),l.ref!==void 0&&(p=l.ref);for(f in l)r.call(l,f)&&!i.hasOwnProperty(f)&&(d[f]=l[f]);if(s&&s.defaultProps)for(f in l=s.defaultProps,l)d[f]===void 0&&(d[f]=l[f]);return{$$typeof:t,type:s,key:h,ref:p,props:d,_owner:o.current}}return ge.Fragment=n,ge.jsx=c,ge.jsxs=c,ge}var bt;function cr(){return bt||(bt=1,ze.exports=sr()),ze.exports}var S=cr();function ee(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function Et(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Kt(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Et(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():Et(e[o],null)}}}}function B(...e){return a.useCallback(Kt(...e),e)}function ar(e,t){const n=a.createContext(t),r=i=>{const{children:c,...s}=i,l=a.useMemo(()=>s,Object.values(s));return S.jsx(n.Provider,{value:l,children:c})};r.displayName=e+"Provider";function o(i){const c=a.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function st(e,t=[]){let n=[];function r(i,c){const s=a.createContext(c),l=n.length;n=[...n,c];const u=d=>{const{scope:h,children:p,...g}=d,m=h?.[e]?.[l]||s,v=a.useMemo(()=>g,Object.values(g));return S.jsx(m.Provider,{value:v,children:p})};u.displayName=i+"Provider";function f(d,h){const p=h?.[e]?.[l]||s,g=a.useContext(p);if(g)return g;if(c!==void 0)return c;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[u,f]}const o=()=>{const i=n.map(c=>a.createContext(c));return function(s){const l=s?.[e]||i;return a.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,lr(o,...t)]}function lr(...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(i){const c=r.reduce((s,{useScope:l,scopeName:u})=>{const d=l(i)[`__scope${u}`];return{...s,...d}},{});return a.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}function ye(e){const t=ur(e),n=a.forwardRef((r,o)=>{const{children:i,...c}=r,s=a.Children.toArray(i),l=s.find(fr);if(l){const u=l.props.children,f=s.map(d=>d===l?a.Children.count(u)>1?a.Children.only(null):a.isValidElement(u)?u.props.children:null:d);return S.jsx(t,{...c,ref:o,children:a.isValidElement(u)?a.cloneElement(u,void 0,f):null})}return S.jsx(t,{...c,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}var is=ye("Slot");function ur(e){const t=a.forwardRef((n,r)=>{const{children:o,...i}=n;if(a.isValidElement(o)){const c=mr(o),s=dr(i,o.props);return o.type!==a.Fragment&&(s.ref=r?Kt(r,c):c),a.cloneElement(o,s)}return a.Children.count(o)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var qt=Symbol("radix.slottable");function ss(e){const t=({children:n})=>S.jsx(S.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=qt,t}function fr(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===qt}function dr(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{const l=i(...s);return o(...s),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function mr(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var pr=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$=pr.reduce((e,t)=>{const n=ye(`Primitive.${t}`),r=a.forwardRef((o,i)=>{const{asChild:c,...s}=o,l=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),S.jsx(l,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function hr(e,t){e&&Yt.flushSync(()=>e.dispatchEvent(t))}function de(e){const t=a.useRef(e);return a.useEffect(()=>{t.current=e}),a.useMemo(()=>(...n)=>t.current?.(...n),[])}function vr(e,t=globalThis?.document){const n=de(e);a.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 gr="DismissableLayer",tt="dismissableLayer.update",yr="dismissableLayer.pointerDownOutside",wr="dismissableLayer.focusOutside",Ct,Gt=a.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Zt=a.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:c,onDismiss:s,...l}=e,u=a.useContext(Gt),[f,d]=a.useState(null),h=f?.ownerDocument??globalThis?.document,[,p]=a.useState({}),g=B(t,C=>d(C)),m=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(v),w=f?m.indexOf(f):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,b=w>=y,E=Er(C=>{const O=C.target,N=[...u.branches].some(P=>P.contains(O));!b||N||(o?.(C),c?.(C),C.defaultPrevented||s?.())},h),R=Cr(C=>{const O=C.target;[...u.branches].some(P=>P.contains(O))||(i?.(C),c?.(C),C.defaultPrevented||s?.())},h);return vr(C=>{w===u.layers.size-1&&(r?.(C),!C.defaultPrevented&&s&&(C.preventDefault(),s()))},h),a.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Ct=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),St(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Ct)}},[f,h,n,u]),a.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),St())},[f,u]),a.useEffect(()=>{const C=()=>p({});return document.addEventListener(tt,C),()=>document.removeEventListener(tt,C)},[]),S.jsx($.div,{...l,ref:g,style:{pointerEvents:x?b?"auto":"none":void 0,...e.style},onFocusCapture:ee(e.onFocusCapture,R.onFocusCapture),onBlurCapture:ee(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:ee(e.onPointerDownCapture,E.onPointerDownCapture)})});Zt.displayName=gr;var xr="DismissableLayerBranch",br=a.forwardRef((e,t)=>{const n=a.useContext(Gt),r=a.useRef(null),o=B(t,r);return a.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),S.jsx($.div,{...e,ref:o})});br.displayName=xr;function Er(e,t=globalThis?.document){const n=de(e),r=a.useRef(!1),o=a.useRef(()=>{});return a.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let l=function(){Jt(yr,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Cr(e,t=globalThis?.document){const n=de(e),r=a.useRef(!1);return a.useEffect(()=>{const o=i=>{i.target&&!r.current&&Jt(wr,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function St(){const e=new CustomEvent(tt);document.dispatchEvent(e)}function Jt(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?hr(o,i):o.dispatchEvent(i)}var te=globalThis?.document?a.useLayoutEffect:()=>{},Sr=Xt[" useId ".trim().toString()]||(()=>{}),Rr=0;function Ue(e){const[t,n]=a.useState(Sr());return te(()=>{n(r=>r??String(Rr++))},[e]),t?`radix-${t}`:""}const Ar=["top","right","bottom","left"],ne=Math.min,W=Math.max,Me=Math.round,Ce=Math.floor,K=e=>({x:e,y:e}),Or={left:"right",right:"left",bottom:"top",top:"bottom"},Pr={start:"end",end:"start"};function nt(e,t,n){return W(e,ne(t,n))}function Z(e,t){return typeof e=="function"?e(t):e}function J(e){return e.split("-")[0]}function pe(e){return e.split("-")[1]}function ct(e){return e==="x"?"y":"x"}function at(e){return e==="y"?"height":"width"}const Dr=new Set(["top","bottom"]);function X(e){return Dr.has(J(e))?"y":"x"}function lt(e){return ct(X(e))}function Nr(e,t,n){n===void 0&&(n=!1);const r=pe(e),o=lt(e),i=at(o);let c=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(c=_e(c)),[c,_e(c)]}function Tr(e){const t=_e(e);return[rt(e),t,rt(t)]}function rt(e){return e.replace(/start|end/g,t=>Pr[t])}const Rt=["left","right"],At=["right","left"],Mr=["top","bottom"],_r=["bottom","top"];function Lr(e,t,n){switch(e){case"top":case"bottom":return n?t?At:Rt:t?Rt:At;case"left":case"right":return t?Mr:_r;default:return[]}}function Ir(e,t,n,r){const o=pe(e);let i=Lr(J(e),n==="start",r);return o&&(i=i.map(c=>c+"-"+o),t&&(i=i.concat(i.map(rt)))),i}function _e(e){return e.replace(/left|right|bottom|top/g,t=>Or[t])}function Fr(e){return{top:0,right:0,bottom:0,left:0,...e}}function Qt(e){return typeof e!="number"?Fr(e):{top:e,right:e,bottom:e,left:e}}function Le(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 Ot(e,t,n){let{reference:r,floating:o}=e;const i=X(t),c=lt(t),s=at(c),l=J(t),u=i==="y",f=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,h=r[s]/2-o[s]/2;let p;switch(l){case"top":p={x:f,y:r.y-o.height};break;case"bottom":p={x:f,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(pe(t)){case"start":p[c]-=h*(n&&u?-1:1);break;case"end":p[c]+=h*(n&&u?-1:1);break}return p}const kr=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:c}=n,s=i.filter(Boolean),l=await(c.isRTL==null?void 0:c.isRTL(t));let u=await c.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:d}=Ot(u,r,l),h=r,p={},g=0;for(let m=0;m<s.length;m++){const{name:v,fn:y}=s[m],{x:w,y:x,data:b,reset:E}=await y({x:f,y:d,initialPlacement:r,placement:h,strategy:o,middlewareData:p,rects:u,platform:c,elements:{reference:e,floating:t}});f=w??f,d=x??d,p={...p,[v]:{...p[v],...b}},E&&g<=50&&(g++,typeof E=="object"&&(E.placement&&(h=E.placement),E.rects&&(u=E.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:f,y:d}=Ot(u,h,l)),m=-1)}return{x:f,y:d,placement:h,strategy:o,middlewareData:p}};async function we(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:c,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=Z(t,e),g=Qt(p),v=s[h?d==="floating"?"reference":"floating":d],y=Le(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(v)))==null||n?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:f,strategy:l})),w=d==="floating"?{x:r,y:o,width:c.floating.width,height:c.floating.height}:c.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),b=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},E=Le(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:x,strategy:l}):w);return{top:(y.top-E.top+g.top)/b.y,bottom:(E.bottom-y.bottom+g.bottom)/b.y,left:(y.left-E.left+g.left)/b.x,right:(E.right-y.right+g.right)/b.x}}const Wr=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:c,elements:s,middlewareData:l}=t,{element:u,padding:f=0}=Z(e,t)||{};if(u==null)return{};const d=Qt(f),h={x:n,y:r},p=lt(o),g=at(p),m=await c.getDimensions(u),v=p==="y",y=v?"top":"left",w=v?"bottom":"right",x=v?"clientHeight":"clientWidth",b=i.reference[g]+i.reference[p]-h[p]-i.floating[g],E=h[p]-i.reference[p],R=await(c.getOffsetParent==null?void 0:c.getOffsetParent(u));let C=R?R[x]:0;(!C||!await(c.isElement==null?void 0:c.isElement(R)))&&(C=s.floating[x]||i.floating[g]);const O=b/2-E/2,N=C/2-m[g]/2-1,P=ne(d[y],N),I=ne(d[w],N),F=P,T=C-m[g]-I,D=C/2-m[g]/2+O,k=nt(F,D,T),M=!l.arrow&&pe(o)!=null&&D!==k&&i.reference[g]/2-(D<F?P:I)-m[g]/2<0,_=M?D<F?D-F:D-T:0;return{[p]:h[p]+_,data:{[p]:k,centerOffset:D-k-_,...M&&{alignmentOffset:_}},reset:M}}}),jr=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:c,initialPlacement:s,platform:l,elements:u}=t,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...v}=Z(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=J(o),w=X(s),x=J(s)===s,b=await(l.isRTL==null?void 0:l.isRTL(u.floating)),E=h||(x||!m?[_e(s)]:Tr(s)),R=g!=="none";!h&&R&&E.push(...Ir(s,m,g,b));const C=[s,...E],O=await we(t,v),N=[];let P=((r=i.flip)==null?void 0:r.overflows)||[];if(f&&N.push(O[y]),d){const D=Nr(o,c,b);N.push(O[D[0]],O[D[1]])}if(P=[...P,{placement:o,overflows:N}],!N.every(D=>D<=0)){var I,F;const D=(((I=i.flip)==null?void 0:I.index)||0)+1,k=C[D];if(k&&(!(d==="alignment"?w!==X(k):!1)||P.every(A=>X(A.placement)===w?A.overflows[0]>0:!0)))return{data:{index:D,overflows:P},reset:{placement:k}};let M=(F=P.filter(_=>_.overflows[0]<=0).sort((_,A)=>_.overflows[1]-A.overflows[1])[0])==null?void 0:F.placement;if(!M)switch(p){case"bestFit":{var T;const _=(T=P.filter(A=>{if(R){const L=X(A.placement);return L===w||L==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(L=>L>0).reduce((L,U)=>L+U,0)]).sort((A,L)=>A[1]-L[1])[0])==null?void 0:T[0];_&&(M=_);break}case"initialPlacement":M=s;break}if(o!==M)return{reset:{placement:M}}}return{}}}};function Pt(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Dt(e){return Ar.some(t=>e[t]>=0)}const $r=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Z(e,t);switch(r){case"referenceHidden":{const i=await we(t,{...o,elementContext:"reference"}),c=Pt(i,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Dt(c)}}}case"escaped":{const i=await we(t,{...o,altBoundary:!0}),c=Pt(i,n.floating);return{data:{escapedOffsets:c,escaped:Dt(c)}}}default:return{}}}}},en=new Set(["left","top"]);async function Br(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),c=J(n),s=pe(n),l=X(n)==="y",u=en.has(c)?-1:1,f=i&&l?-1:1,d=Z(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof g=="number"&&(p=s==="end"?g*-1:g),l?{x:p*f,y:h*u}:{x:h*u,y:p*f}}const Hr=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:c,middlewareData:s}=t,l=await Br(t,e);return c===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:c}}}}},Vr=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:c=!1,limiter:s={fn:v=>{let{x:y,y:w}=v;return{x:y,y:w}}},...l}=Z(e,t),u={x:n,y:r},f=await we(t,l),d=X(J(o)),h=ct(d);let p=u[h],g=u[d];if(i){const v=h==="y"?"top":"left",y=h==="y"?"bottom":"right",w=p+f[v],x=p-f[y];p=nt(w,p,x)}if(c){const v=d==="y"?"top":"left",y=d==="y"?"bottom":"right",w=g+f[v],x=g-f[y];g=nt(w,g,x)}const m=s.fn({...t,[h]:p,[d]:g});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:i,[d]:c}}}}}},zr=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:c}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=Z(e,t),f={x:n,y:r},d=X(o),h=ct(d);let p=f[h],g=f[d];const m=Z(s,t),v=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const x=h==="y"?"height":"width",b=i.reference[h]-i.floating[x]+v.mainAxis,E=i.reference[h]+i.reference[x]-v.mainAxis;p<b?p=b:p>E&&(p=E)}if(u){var y,w;const x=h==="y"?"width":"height",b=en.has(J(o)),E=i.reference[d]-i.floating[x]+(b&&((y=c.offset)==null?void 0:y[d])||0)+(b?0:v.crossAxis),R=i.reference[d]+i.reference[x]+(b?0:((w=c.offset)==null?void 0:w[d])||0)-(b?v.crossAxis:0);g<E?g=E:g>R&&(g=R)}return{[h]:p,[d]:g}}}},Ur=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:c,elements:s}=t,{apply:l=()=>{},...u}=Z(e,t),f=await we(t,u),d=J(o),h=pe(o),p=X(o)==="y",{width:g,height:m}=i.floating;let v,y;d==="top"||d==="bottom"?(v=d,y=h===(await(c.isRTL==null?void 0:c.isRTL(s.floating))?"start":"end")?"left":"right"):(y=d,v=h==="end"?"top":"bottom");const w=m-f.top-f.bottom,x=g-f.left-f.right,b=ne(m-f[v],w),E=ne(g-f[y],x),R=!t.middlewareData.shift;let C=b,O=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(O=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=w),R&&!h){const P=W(f.left,0),I=W(f.right,0),F=W(f.top,0),T=W(f.bottom,0);p?O=g-2*(P!==0||I!==0?P+I:W(f.left,f.right)):C=m-2*(F!==0||T!==0?F+T:W(f.top,f.bottom))}await l({...t,availableWidth:O,availableHeight:C});const N=await c.getDimensions(s.floating);return g!==N.width||m!==N.height?{reset:{rects:!0}}:{}}}};function ke(){return typeof window<"u"}function he(e){return tn(e)?(e.nodeName||"").toLowerCase():"#document"}function j(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function G(e){var t;return(t=(tn(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function tn(e){return ke()?e instanceof Node||e instanceof j(e).Node:!1}function H(e){return ke()?e instanceof Element||e instanceof j(e).Element:!1}function q(e){return ke()?e instanceof HTMLElement||e instanceof j(e).HTMLElement:!1}function Nt(e){return!ke()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof j(e).ShadowRoot}const Yr=new Set(["inline","contents"]);function be(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=V(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Yr.has(o)}const Xr=new Set(["table","td","th"]);function Kr(e){return Xr.has(he(e))}const qr=[":popover-open",":modal"];function We(e){return qr.some(t=>{try{return e.matches(t)}catch{return!1}})}const Gr=["transform","translate","scale","rotate","perspective"],Zr=["transform","translate","scale","rotate","perspective","filter"],Jr=["paint","layout","strict","content"];function ut(e){const t=ft(),n=H(e)?V(e):e;return Gr.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Zr.some(r=>(n.willChange||"").includes(r))||Jr.some(r=>(n.contain||"").includes(r))}function Qr(e){let t=re(e);for(;q(t)&&!me(t);){if(ut(t))return t;if(We(t))return null;t=re(t)}return null}function ft(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const eo=new Set(["html","body","#document"]);function me(e){return eo.has(he(e))}function V(e){return j(e).getComputedStyle(e)}function je(e){return H(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function re(e){if(he(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Nt(e)&&e.host||G(e);return Nt(t)?t.host:t}function nn(e){const t=re(e);return me(t)?e.ownerDocument?e.ownerDocument.body:e.body:q(t)&&be(t)?t:nn(t)}function xe(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=nn(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),c=j(o);if(i){const s=ot(c);return t.concat(c,c.visualViewport||[],be(o)?o:[],s&&n?xe(s):[])}return t.concat(o,xe(o,[],n))}function ot(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function rn(e){const t=V(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=q(e),i=o?e.offsetWidth:n,c=o?e.offsetHeight:r,s=Me(n)!==i||Me(r)!==c;return s&&(n=i,r=c),{width:n,height:r,$:s}}function dt(e){return H(e)?e:e.contextElement}function ue(e){const t=dt(e);if(!q(t))return K(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=rn(t);let c=(i?Me(n.width):n.width)/r,s=(i?Me(n.height):n.height)/o;return(!c||!Number.isFinite(c))&&(c=1),(!s||!Number.isFinite(s))&&(s=1),{x:c,y:s}}const to=K(0);function on(e){const t=j(e);return!ft()||!t.visualViewport?to:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function no(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==j(e)?!1:t}function ie(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=dt(e);let c=K(1);t&&(r?H(r)&&(c=ue(r)):c=ue(e));const s=no(i,n,r)?on(i):K(0);let l=(o.left+s.x)/c.x,u=(o.top+s.y)/c.y,f=o.width/c.x,d=o.height/c.y;if(i){const h=j(i),p=r&&H(r)?j(r):r;let g=h,m=ot(g);for(;m&&r&&p!==g;){const v=ue(m),y=m.getBoundingClientRect(),w=V(m),x=y.left+(m.clientLeft+parseFloat(w.paddingLeft))*v.x,b=y.top+(m.clientTop+parseFloat(w.paddingTop))*v.y;l*=v.x,u*=v.y,f*=v.x,d*=v.y,l+=x,u+=b,g=j(m),m=ot(g)}}return Le({width:f,height:d,x:l,y:u})}function $e(e,t){const n=je(e).scrollLeft;return t?t.left+n:ie(G(e)).left+n}function sn(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-$e(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function ro(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",c=G(r),s=t?We(t.floating):!1;if(r===c||s&&i)return n;let l={scrollLeft:0,scrollTop:0},u=K(1);const f=K(0),d=q(r);if((d||!d&&!i)&&((he(r)!=="body"||be(c))&&(l=je(r)),q(r))){const p=ie(r);u=ue(r),f.x=p.x+r.clientLeft,f.y=p.y+r.clientTop}const h=c&&!d&&!i?sn(c,l):K(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+f.x+h.x,y:n.y*u.y-l.scrollTop*u.y+f.y+h.y}}function oo(e){return Array.from(e.getClientRects())}function io(e){const t=G(e),n=je(e),r=e.ownerDocument.body,o=W(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=W(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let c=-n.scrollLeft+$e(e);const s=-n.scrollTop;return V(r).direction==="rtl"&&(c+=W(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:c,y:s}}const Tt=25;function so(e,t){const n=j(e),r=G(e),o=n.visualViewport;let i=r.clientWidth,c=r.clientHeight,s=0,l=0;if(o){i=o.width,c=o.height;const f=ft();(!f||f&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}const u=$e(r);if(u<=0){const f=r.ownerDocument,d=f.body,h=getComputedStyle(d),p=f.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,g=Math.abs(r.clientWidth-d.clientWidth-p);g<=Tt&&(i-=g)}else u<=Tt&&(i+=u);return{width:i,height:c,x:s,y:l}}const co=new Set(["absolute","fixed"]);function ao(e,t){const n=ie(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=q(e)?ue(e):K(1),c=e.clientWidth*i.x,s=e.clientHeight*i.y,l=o*i.x,u=r*i.y;return{width:c,height:s,x:l,y:u}}function Mt(e,t,n){let r;if(t==="viewport")r=so(e,n);else if(t==="document")r=io(G(e));else if(H(t))r=ao(t,n);else{const o=on(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Le(r)}function cn(e,t){const n=re(e);return n===t||!H(n)||me(n)?!1:V(n).position==="fixed"||cn(n,t)}function lo(e,t){const n=t.get(e);if(n)return n;let r=xe(e,[],!1).filter(s=>H(s)&&he(s)!=="body"),o=null;const i=V(e).position==="fixed";let c=i?re(e):e;for(;H(c)&&!me(c);){const s=V(c),l=ut(c);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&co.has(o.position)||be(c)&&!l&&cn(e,c))?r=r.filter(f=>f!==c):o=s,c=re(c)}return t.set(e,r),r}function uo(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const c=[...n==="clippingAncestors"?We(t)?[]:lo(t,this._c):[].concat(n),r],s=c[0],l=c.reduce((u,f)=>{const d=Mt(t,f,o);return u.top=W(d.top,u.top),u.right=ne(d.right,u.right),u.bottom=ne(d.bottom,u.bottom),u.left=W(d.left,u.left),u},Mt(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function fo(e){const{width:t,height:n}=rn(e);return{width:t,height:n}}function mo(e,t,n){const r=q(t),o=G(t),i=n==="fixed",c=ie(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=K(0);function u(){l.x=$e(o)}if(r||!r&&!i)if((he(t)!=="body"||be(o))&&(s=je(t)),r){const p=ie(t,!0,i,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else o&&u();i&&!r&&o&&u();const f=o&&!r&&!i?sn(o,s):K(0),d=c.left+s.scrollLeft-l.x-f.x,h=c.top+s.scrollTop-l.y-f.y;return{x:d,y:h,width:c.width,height:c.height}}function Ye(e){return V(e).position==="static"}function _t(e,t){if(!q(e)||V(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return G(e)===n&&(n=n.ownerDocument.body),n}function an(e,t){const n=j(e);if(We(e))return n;if(!q(e)){let o=re(e);for(;o&&!me(o);){if(H(o)&&!Ye(o))return o;o=re(o)}return n}let r=_t(e,t);for(;r&&Kr(r)&&Ye(r);)r=_t(r,t);return r&&me(r)&&Ye(r)&&!ut(r)?n:r||Qr(e)||n}const po=async function(e){const t=this.getOffsetParent||an,n=this.getDimensions,r=await n(e.floating);return{reference:mo(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ho(e){return V(e).direction==="rtl"}const vo={convertOffsetParentRelativeRectToViewportRelativeRect:ro,getDocumentElement:G,getClippingRect:uo,getOffsetParent:an,getElementRects:po,getClientRects:oo,getDimensions:fo,getScale:ue,isElement:H,isRTL:ho};function ln(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function go(e,t){let n=null,r;const o=G(e);function i(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function c(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const u=e.getBoundingClientRect(),{left:f,top:d,width:h,height:p}=u;if(s||t(),!h||!p)return;const g=Ce(d),m=Ce(o.clientWidth-(f+h)),v=Ce(o.clientHeight-(d+p)),y=Ce(f),x={rootMargin:-g+"px "+-m+"px "+-v+"px "+-y+"px",threshold:W(0,ne(1,l))||1};let b=!0;function E(R){const C=R[0].intersectionRatio;if(C!==l){if(!b)return c();C?c(!1,C):r=setTimeout(()=>{c(!1,1e-7)},1e3)}C===1&&!ln(u,e.getBoundingClientRect())&&c(),b=!1}try{n=new IntersectionObserver(E,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,x)}n.observe(e)}return c(!0),i}function yo(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=dt(e),f=o||i?[...u?xe(u):[],...xe(t)]:[];f.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const d=u&&s?go(u,n):null;let h=-1,p=null;c&&(p=new ResizeObserver(y=>{let[w]=y;w&&w.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),n()}),u&&!l&&p.observe(u),p.observe(t));let g,m=l?ie(e):null;l&&v();function v(){const y=ie(e);m&&!ln(m,y)&&n(),m=y,g=requestAnimationFrame(v)}return n(),()=>{var y;f.forEach(w=>{o&&w.removeEventListener("scroll",n),i&&w.removeEventListener("resize",n)}),d?.(),(y=p)==null||y.disconnect(),p=null,l&&cancelAnimationFrame(g)}}const wo=Hr,xo=Vr,bo=jr,Eo=Ur,Co=$r,Lt=Wr,So=zr,Ro=(e,t,n)=>{const r=new Map,o={platform:vo,...n},i={...o.platform,_c:r};return kr(e,t,{...o,platform:i})};var Ao=typeof document<"u",Oo=function(){},De=Ao?a.useLayoutEffect:Oo;function Ie(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(!Ie(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 i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Ie(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function un(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function It(e,t){const n=un(e);return Math.round(t*n)/n}function Xe(e){const t=a.useRef(e);return De(()=>{t.current=e}),t}function Po(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:c}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[f,d]=a.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=a.useState(r);Ie(h,r)||p(r);const[g,m]=a.useState(null),[v,y]=a.useState(null),w=a.useCallback(A=>{A!==R.current&&(R.current=A,m(A))},[]),x=a.useCallback(A=>{A!==C.current&&(C.current=A,y(A))},[]),b=i||g,E=c||v,R=a.useRef(null),C=a.useRef(null),O=a.useRef(f),N=l!=null,P=Xe(l),I=Xe(o),F=Xe(u),T=a.useCallback(()=>{if(!R.current||!C.current)return;const A={placement:t,strategy:n,middleware:h};I.current&&(A.platform=I.current),Ro(R.current,C.current,A).then(L=>{const U={...L,isPositioned:F.current!==!1};D.current&&!Ie(O.current,U)&&(O.current=U,Yt.flushSync(()=>{d(U)}))})},[h,t,n,I,F]);De(()=>{u===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,d(A=>({...A,isPositioned:!1})))},[u]);const D=a.useRef(!1);De(()=>(D.current=!0,()=>{D.current=!1}),[]),De(()=>{if(b&&(R.current=b),E&&(C.current=E),b&&E){if(P.current)return P.current(b,E,T);T()}},[b,E,T,P,N]);const k=a.useMemo(()=>({reference:R,floating:C,setReference:w,setFloating:x}),[w,x]),M=a.useMemo(()=>({reference:b,floating:E}),[b,E]),_=a.useMemo(()=>{const A={position:n,left:0,top:0};if(!M.floating)return A;const L=It(M.floating,f.x),U=It(M.floating,f.y);return s?{...A,transform:"translate("+L+"px, "+U+"px)",...un(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:L,top:U}},[n,s,M.floating,f.x,f.y]);return a.useMemo(()=>({...f,update:T,refs:k,elements:M,floatingStyles:_}),[f,T,k,M,_])}const Do=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?Lt({element:r.current,padding:o}).fn(n):{}:r?Lt({element:r,padding:o}).fn(n):{}}}},No=(e,t)=>({...wo(e),options:[e,t]}),To=(e,t)=>({...xo(e),options:[e,t]}),Mo=(e,t)=>({...So(e),options:[e,t]}),_o=(e,t)=>({...bo(e),options:[e,t]}),Lo=(e,t)=>({...Eo(e),options:[e,t]}),Io=(e,t)=>({...Co(e),options:[e,t]}),Fo=(e,t)=>({...Do(e),options:[e,t]});var ko="Arrow",fn=a.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return S.jsx($.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:S.jsx("polygon",{points:"0,0 30,0 15,10"})})});fn.displayName=ko;var Wo=fn;function jo(e){const[t,n]=a.useState(void 0);return te(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let c,s;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;c=u.inlineSize,s=u.blockSize}else c=e.offsetWidth,s=e.offsetHeight;n({width:c,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var mt="Popper",[dn,cs]=st(mt),[$o,mn]=dn(mt),pn=e=>{const{__scopePopper:t,children:n}=e,[r,o]=a.useState(null);return S.jsx($o,{scope:t,anchor:r,onAnchorChange:o,children:n})};pn.displayName=mt;var hn="PopperAnchor",vn=a.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=mn(hn,n),c=a.useRef(null),s=B(t,c),l=a.useRef(null);return a.useEffect(()=>{const u=l.current;l.current=r?.current||c.current,u!==l.current&&i.onAnchorChange(l.current)}),r?null:S.jsx($.div,{...o,ref:s})});vn.displayName=hn;var pt="PopperContent",[Bo,Ho]=dn(pt),gn=a.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:c=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:g,...m}=e,v=mn(pt,n),[y,w]=a.useState(null),x=B(t,ve=>w(ve)),[b,E]=a.useState(null),R=jo(b),C=R?.width??0,O=R?.height??0,N=r+(i!=="center"?"-"+i:""),P=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},I=Array.isArray(u)?u:[u],F=I.length>0,T={padding:P,boundary:I.filter(zo),altBoundary:F},{refs:D,floatingStyles:k,placement:M,isPositioned:_,middlewareData:A}=Po({strategy:"fixed",placement:N,whileElementsMounted:(...ve)=>yo(...ve,{animationFrame:p==="always"}),elements:{reference:v.anchor},middleware:[No({mainAxis:o+O,alignmentAxis:c}),l&&To({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?Mo():void 0,...T}),l&&_o({...T}),Lo({...T,apply:({elements:ve,rects:wt,availableWidth:er,availableHeight:tr})=>{const{width:nr,height:rr}=wt.reference,Ee=ve.floating.style;Ee.setProperty("--radix-popper-available-width",`${er}px`),Ee.setProperty("--radix-popper-available-height",`${tr}px`),Ee.setProperty("--radix-popper-anchor-width",`${nr}px`),Ee.setProperty("--radix-popper-anchor-height",`${rr}px`)}}),b&&Fo({element:b,padding:s}),Uo({arrowWidth:C,arrowHeight:O}),h&&Io({strategy:"referenceHidden",...T})]}),[L,U]=xn(M),yt=de(g);te(()=>{_&&yt?.()},[_,yt]);const qn=A.arrow?.x,Gn=A.arrow?.y,Zn=A.arrow?.centerOffset!==0,[Jn,Qn]=a.useState();return te(()=>{y&&Qn(window.getComputedStyle(y).zIndex)},[y]),S.jsx("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...k,transform:_?k.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Jn,"--radix-popper-transform-origin":[A.transformOrigin?.x,A.transformOrigin?.y].join(" "),...A.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:S.jsx(Bo,{scope:n,placedSide:L,onArrowChange:E,arrowX:qn,arrowY:Gn,shouldHideArrow:Zn,children:S.jsx($.div,{"data-side":L,"data-align":U,...m,ref:x,style:{...m.style,animation:_?void 0:"none"}})})})});gn.displayName=pt;var yn="PopperArrow",Vo={top:"bottom",right:"left",bottom:"top",left:"right"},wn=a.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=Ho(yn,r),c=Vo[i.placedSide];return S.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:S.jsx(Wo,{...o,ref:n,style:{...o.style,display:"block"}})})});wn.displayName=yn;function zo(e){return e!==null}var Uo=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,c=o.arrow?.centerOffset!==0,s=c?0:e.arrowWidth,l=c?0:e.arrowHeight,[u,f]=xn(n),d={start:"0%",center:"50%",end:"100%"}[f],h=(o.arrow?.x??0)+s/2,p=(o.arrow?.y??0)+l/2;let g="",m="";return u==="bottom"?(g=c?d:`${h}px`,m=`${-l}px`):u==="top"?(g=c?d:`${h}px`,m=`${r.floating.height+l}px`):u==="right"?(g=`${-l}px`,m=c?d:`${p}px`):u==="left"&&(g=`${r.floating.width+l}px`,m=c?d:`${p}px`),{data:{x:g,y:m}}}});function xn(e){const[t,n="center"]=e.split("-");return[t,n]}var as=pn,ls=vn,us=gn,fs=wn,Yo="Portal",bn=a.forwardRef((e,t)=>{const{container:n,...r}=e,[o,i]=a.useState(!1);te(()=>i(!0),[]);const c=n||o&&globalThis?.document?.body;return c?ir.createPortal(S.jsx($.div,{...r,ref:t}),c):null});bn.displayName=Yo;function Xo(e,t){return a.useReducer((n,r)=>t[n][r]??n,e)}var Be=e=>{const{present:t,children:n}=e,r=Ko(t),o=typeof n=="function"?n({present:r.isPresent}):a.Children.only(n),i=B(r.ref,qo(o));return typeof n=="function"||r.isPresent?a.cloneElement(o,{ref:i}):null};Be.displayName="Presence";function Ko(e){const[t,n]=a.useState(),r=a.useRef(null),o=a.useRef(e),i=a.useRef("none"),c=e?"mounted":"unmounted",[s,l]=Xo(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return a.useEffect(()=>{const u=Se(r.current);i.current=s==="mounted"?u:"none"},[s]),te(()=>{const u=r.current,f=o.current;if(f!==e){const h=i.current,p=Se(u);e?l("MOUNT"):p==="none"||u?.display==="none"?l("UNMOUNT"):l(f&&h!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),te(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,d=p=>{const m=Se(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&m&&(l("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},h=p=>{p.target===t&&(i.current=Se(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:a.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Se(e){return e?.animationName||"none"}function qo(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Go=Xt[" useInsertionEffect ".trim().toString()]||te;function Zo({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,c]=Jo({defaultProp:t,onChange:n}),s=e!==void 0,l=s?e:o;{const f=a.useRef(e!==void 0);a.useEffect(()=>{const d=f.current;d!==s&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=s},[s,r])}const u=a.useCallback(f=>{if(s){const d=Qo(f)?f(e):f;d!==e&&c.current?.(d)}else i(f)},[s,e,i,c]);return[l,u]}function Jo({defaultProp:e,onChange:t}){const[n,r]=a.useState(e),o=a.useRef(n),i=a.useRef(t);return Go(()=>{i.current=t},[t]),a.useEffect(()=>{o.current!==n&&(i.current?.(n),o.current=n)},[n,o]),[n,r,i]}function Qo(e){return typeof e=="function"}var Ke="focusScope.autoFocusOnMount",qe="focusScope.autoFocusOnUnmount",Ft={bubbles:!1,cancelable:!0},ei="FocusScope",En=a.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...c}=e,[s,l]=a.useState(null),u=de(o),f=de(i),d=a.useRef(null),h=B(t,m=>l(m)),p=a.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;a.useEffect(()=>{if(r){let m=function(x){if(p.paused||!s)return;const b=x.target;s.contains(b)?d.current=b:Q(d.current,{select:!0})},v=function(x){if(p.paused||!s)return;const b=x.relatedTarget;b!==null&&(s.contains(b)||Q(d.current,{select:!0}))},y=function(x){if(document.activeElement===document.body)for(const E of x)E.removedNodes.length>0&&Q(s)};document.addEventListener("focusin",m),document.addEventListener("focusout",v);const w=new MutationObserver(y);return s&&w.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",v),w.disconnect()}}},[r,s,p.paused]),a.useEffect(()=>{if(s){Wt.add(p);const m=document.activeElement;if(!s.contains(m)){const y=new CustomEvent(Ke,Ft);s.addEventListener(Ke,u),s.dispatchEvent(y),y.defaultPrevented||(ti(si(Cn(s)),{select:!0}),document.activeElement===m&&Q(s))}return()=>{s.removeEventListener(Ke,u),setTimeout(()=>{const y=new CustomEvent(qe,Ft);s.addEventListener(qe,f),s.dispatchEvent(y),y.defaultPrevented||Q(m??document.body,{select:!0}),s.removeEventListener(qe,f),Wt.remove(p)},0)}}},[s,u,f,p]);const g=a.useCallback(m=>{if(!n&&!r||p.paused)return;const v=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(v&&y){const w=m.currentTarget,[x,b]=ni(w);x&&b?!m.shiftKey&&y===b?(m.preventDefault(),n&&Q(x,{select:!0})):m.shiftKey&&y===x&&(m.preventDefault(),n&&Q(b,{select:!0})):y===w&&m.preventDefault()}},[n,r,p.paused]);return S.jsx($.div,{tabIndex:-1,...c,ref:h,onKeyDown:g})});En.displayName=ei;function ti(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Q(r,{select:t}),document.activeElement!==n)return}function ni(e){const t=Cn(e),n=kt(t,e),r=kt(t.reverse(),e);return[n,r]}function Cn(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 kt(e,t){for(const n of e)if(!ri(n,{upTo:t}))return n}function ri(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 oi(e){return e instanceof HTMLInputElement&&"select"in e}function Q(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&oi(e)&&t&&e.select()}}var Wt=ii();function ii(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=jt(e,t),e.unshift(t)},remove(t){e=jt(e,t),e[0]?.resume()}}}function jt(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function si(e){return e.filter(t=>t.tagName!=="A")}var Ge=0;function ci(){a.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??$t()),document.body.insertAdjacentElement("beforeend",e[1]??$t()),Ge++,()=>{Ge===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ge--}},[])}function $t(){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 Y=function(){return Y=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Y.apply(this,arguments)};function Sn(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 ai(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var Ne="right-scroll-bar-position",Te="width-before-scroll-bar",li="with-scroll-bars-hidden",ui="--removed-body-scroll-bar-size";function Ze(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function fi(e,t){var n=a.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 di=typeof window<"u"?a.useLayoutEffect:a.useEffect,Bt=new WeakMap;function mi(e,t){var n=fi(null,function(r){return e.forEach(function(o){return Ze(o,r)})});return di(function(){var r=Bt.get(n);if(r){var o=new Set(r),i=new Set(e),c=n.current;o.forEach(function(s){i.has(s)||Ze(s,null)}),i.forEach(function(s){o.has(s)||Ze(s,c)})}Bt.set(n,e)},[e]),n}function pi(e){return e}function hi(e,t){t===void 0&&(t=pi);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(i){var c=t(i,r);return n.push(c),function(){n=n.filter(function(s){return s!==c})}},assignSyncMedium:function(i){for(r=!0;n.length;){var c=n;n=[],c.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var c=[];if(n.length){var s=n;n=[],s.forEach(i),c=n}var l=function(){var f=c;c=[],f.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(f){c.push(f),u()},filter:function(f){return c=c.filter(f),n}}}};return o}function vi(e){e===void 0&&(e={});var t=hi(null);return t.options=Y({async:!0,ssr:!1},e),t}var Rn=function(e){var t=e.sideCar,n=Sn(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 a.createElement(r,Y({},n))};Rn.isSideCarExport=!0;function gi(e,t){return e.useMedium(t),Rn}var An=vi(),Je=function(){},He=a.forwardRef(function(e,t){var n=a.useRef(null),r=a.useState({onScrollCapture:Je,onWheelCapture:Je,onTouchMoveCapture:Je}),o=r[0],i=r[1],c=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,f=e.enabled,d=e.shards,h=e.sideCar,p=e.noRelative,g=e.noIsolation,m=e.inert,v=e.allowPinchZoom,y=e.as,w=y===void 0?"div":y,x=e.gapMode,b=Sn(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=h,R=mi([n,t]),C=Y(Y({},b),o);return a.createElement(a.Fragment,null,f&&a.createElement(E,{sideCar:An,removeScrollBar:u,shards:d,noRelative:p,noIsolation:g,inert:m,setCallbacks:i,allowPinchZoom:!!v,lockRef:n,gapMode:x}),c?a.cloneElement(a.Children.only(s),Y(Y({},C),{ref:R})):a.createElement(w,Y({},C,{className:l,ref:R}),s))});He.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};He.classNames={fullWidth:Te,zeroRight:Ne};var yi=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function wi(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=yi();return t&&e.setAttribute("nonce",t),e}function xi(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function bi(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Ei=function(){var e=0,t=null;return{add:function(n){e==0&&(t=wi())&&(xi(t,n),bi(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ci=function(){var e=Ei();return function(t,n){a.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},On=function(){var e=Ci(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Si={left:0,top:0,right:0,gap:0},Qe=function(e){return parseInt(e||"",10)||0},Ri=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[Qe(n),Qe(r),Qe(o)]},Ai=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Si;var t=Ri(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])}},Oi=On(),fe="data-scroll-locked",Pi=function(e,t,n,r){var o=e.left,i=e.top,c=e.right,s=e.gap;return n===void 0&&(n="margin"),`
10
+ .`.concat(li,` {
11
+ overflow: hidden `).concat(r,`;
12
+ padding-right: `).concat(s,"px ").concat(r,`;
13
+ }
14
+ body[`).concat(fe,`] {
15
+ overflow: hidden `).concat(r,`;
16
+ overscroll-behavior: contain;
17
+ `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
18
+ padding-left: `.concat(o,`px;
19
+ padding-top: `).concat(i,`px;
20
+ padding-right: `).concat(c,`px;
21
+ margin-left:0;
22
+ margin-top:0;
23
+ margin-right: `).concat(s,"px ").concat(r,`;
24
+ `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
25
+ }
26
+
27
+ .`).concat(Ne,` {
28
+ right: `).concat(s,"px ").concat(r,`;
29
+ }
30
+
31
+ .`).concat(Te,` {
32
+ margin-right: `).concat(s,"px ").concat(r,`;
33
+ }
34
+
35
+ .`).concat(Ne," .").concat(Ne,` {
36
+ right: 0 `).concat(r,`;
37
+ }
38
+
39
+ .`).concat(Te," .").concat(Te,` {
40
+ margin-right: 0 `).concat(r,`;
41
+ }
42
+
43
+ body[`).concat(fe,`] {
44
+ `).concat(ui,": ").concat(s,`px;
45
+ }
46
+ `)},Ht=function(){var e=parseInt(document.body.getAttribute(fe)||"0",10);return isFinite(e)?e:0},Di=function(){a.useEffect(function(){return document.body.setAttribute(fe,(Ht()+1).toString()),function(){var e=Ht()-1;e<=0?document.body.removeAttribute(fe):document.body.setAttribute(fe,e.toString())}},[])},Ni=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Di();var i=a.useMemo(function(){return Ai(o)},[o]);return a.createElement(Oi,{styles:Pi(i,!t,o,n?"":"!important")})},it=!1;if(typeof window<"u")try{var Re=Object.defineProperty({},"passive",{get:function(){return it=!0,!0}});window.addEventListener("test",Re,Re),window.removeEventListener("test",Re,Re)}catch{it=!1}var ce=it?{passive:!1}:!1,Ti=function(e){return e.tagName==="TEXTAREA"},Pn=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Ti(e)&&n[t]==="visible")},Mi=function(e){return Pn(e,"overflowY")},_i=function(e){return Pn(e,"overflowX")},Vt=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Dn(e,r);if(o){var i=Nn(e,r),c=i[1],s=i[2];if(c>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Li=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Ii=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Dn=function(e,t){return e==="v"?Mi(t):_i(t)},Nn=function(e,t){return e==="v"?Li(t):Ii(t)},Fi=function(e,t){return e==="h"&&t==="rtl"?-1:1},ki=function(e,t,n,r,o){var i=Fi(e,window.getComputedStyle(t).direction),c=i*r,s=n.target,l=t.contains(s),u=!1,f=c>0,d=0,h=0;do{if(!s)break;var p=Nn(e,s),g=p[0],m=p[1],v=p[2],y=m-v-i*g;(g||y)&&Dn(e,s)&&(d+=y,h+=g);var w=s.parentNode;s=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(f&&Math.abs(d)<1||!f&&Math.abs(h)<1)&&(u=!0),u},Ae=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},zt=function(e){return[e.deltaX,e.deltaY]},Ut=function(e){return e&&"current"in e?e.current:e},Wi=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ji=function(e){return`
47
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
48
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
49
+ `)},$i=0,ae=[];function Bi(e){var t=a.useRef([]),n=a.useRef([0,0]),r=a.useRef(),o=a.useState($i++)[0],i=a.useState(On)[0],c=a.useRef(e);a.useEffect(function(){c.current=e},[e]),a.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=ai([e.lockRef.current],(e.shards||[]).map(Ut),!0).filter(Boolean);return m.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=a.useCallback(function(m,v){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!c.current.allowPinchZoom;var y=Ae(m),w=n.current,x="deltaX"in m?m.deltaX:w[0]-y[0],b="deltaY"in m?m.deltaY:w[1]-y[1],E,R=m.target,C=Math.abs(x)>Math.abs(b)?"h":"v";if("touches"in m&&C==="h"&&R.type==="range")return!1;var O=Vt(C,R);if(!O)return!0;if(O?E=C:(E=C==="v"?"h":"v",O=Vt(C,R)),!O)return!1;if(!r.current&&"changedTouches"in m&&(x||b)&&(r.current=E),!E)return!0;var N=r.current||E;return ki(N,v,m,N==="h"?x:b)},[]),l=a.useCallback(function(m){var v=m;if(!(!ae.length||ae[ae.length-1]!==i)){var y="deltaY"in v?zt(v):Ae(v),w=t.current.filter(function(E){return E.name===v.type&&(E.target===v.target||v.target===E.shadowParent)&&Wi(E.delta,y)})[0];if(w&&w.should){v.cancelable&&v.preventDefault();return}if(!w){var x=(c.current.shards||[]).map(Ut).filter(Boolean).filter(function(E){return E.contains(v.target)}),b=x.length>0?s(v,x[0]):!c.current.noIsolation;b&&v.cancelable&&v.preventDefault()}}},[]),u=a.useCallback(function(m,v,y,w){var x={name:m,delta:v,target:y,should:w,shadowParent:Hi(y)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(b){return b!==x})},1)},[]),f=a.useCallback(function(m){n.current=Ae(m),r.current=void 0},[]),d=a.useCallback(function(m){u(m.type,zt(m),m.target,s(m,e.lockRef.current))},[]),h=a.useCallback(function(m){u(m.type,Ae(m),m.target,s(m,e.lockRef.current))},[]);a.useEffect(function(){return ae.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",l,ce),document.addEventListener("touchmove",l,ce),document.addEventListener("touchstart",f,ce),function(){ae=ae.filter(function(m){return m!==i}),document.removeEventListener("wheel",l,ce),document.removeEventListener("touchmove",l,ce),document.removeEventListener("touchstart",f,ce)}},[]);var p=e.removeScrollBar,g=e.inert;return a.createElement(a.Fragment,null,g?a.createElement(i,{styles:ji(o)}):null,p?a.createElement(Ni,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Hi(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Vi=gi(An,Bi);var Tn=a.forwardRef(function(e,t){return a.createElement(He,Y({},e,{ref:t,sideCar:Vi}))});Tn.classNames=He.classNames;var zi=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},le=new WeakMap,Oe=new WeakMap,Pe={},et=0,Mn=function(e){return e&&(e.host||Mn(e.parentNode))},Ui=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Mn(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})},Yi=function(e,t,n,r){var o=Ui(t,Array.isArray(e)?e:[e]);Pe[n]||(Pe[n]=new WeakMap);var i=Pe[n],c=[],s=new Set,l=new Set(o),u=function(d){!d||s.has(d)||(s.add(d),u(d.parentNode))};o.forEach(u);var f=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(h){if(s.has(h))f(h);else try{var p=h.getAttribute(r),g=p!==null&&p!=="false",m=(le.get(h)||0)+1,v=(i.get(h)||0)+1;le.set(h,m),i.set(h,v),c.push(h),m===1&&g&&Oe.set(h,!0),v===1&&h.setAttribute(n,"true"),g||h.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",h,y)}})};return f(t),s.clear(),et++,function(){c.forEach(function(d){var h=le.get(d)-1,p=i.get(d)-1;le.set(d,h),i.set(d,p),h||(Oe.has(d)||d.removeAttribute(r),Oe.delete(d)),p||d.removeAttribute(n)}),et--,et||(le=new WeakMap,le=new WeakMap,Oe=new WeakMap,Pe={})}},Xi=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=zi(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Yi(r,o,n,"aria-hidden")):function(){return null}},Ve="Dialog",[_n,ds]=st(Ve),[Ki,z]=_n(Ve),Ln=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:c=!0}=e,s=a.useRef(null),l=a.useRef(null),[u,f]=Zo({prop:r,defaultProp:o??!1,onChange:i,caller:Ve});return S.jsx(Ki,{scope:t,triggerRef:s,contentRef:l,contentId:Ue(),titleId:Ue(),descriptionId:Ue(),open:u,onOpenChange:f,onOpenToggle:a.useCallback(()=>f(d=>!d),[f]),modal:c,children:n})};Ln.displayName=Ve;var In="DialogTrigger",Fn=a.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=z(In,n),i=B(t,o.triggerRef);return S.jsx($.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":gt(o.open),...r,ref:i,onClick:ee(e.onClick,o.onOpenToggle)})});Fn.displayName=In;var ht="DialogPortal",[qi,kn]=_n(ht,{forceMount:void 0}),Wn=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=z(ht,t);return S.jsx(qi,{scope:t,forceMount:n,children:a.Children.map(r,c=>S.jsx(Be,{present:n||i.open,children:S.jsx(bn,{asChild:!0,container:o,children:c})}))})};Wn.displayName=ht;var Fe="DialogOverlay",jn=a.forwardRef((e,t)=>{const n=kn(Fe,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=z(Fe,e.__scopeDialog);return i.modal?S.jsx(Be,{present:r||i.open,children:S.jsx(Zi,{...o,ref:t})}):null});jn.displayName=Fe;var Gi=ye("DialogOverlay.RemoveScroll"),Zi=a.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=z(Fe,n);return S.jsx(Tn,{as:Gi,allowPinchZoom:!0,shards:[o.contentRef],children:S.jsx($.div,{"data-state":gt(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),se="DialogContent",$n=a.forwardRef((e,t)=>{const n=kn(se,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=z(se,e.__scopeDialog);return S.jsx(Be,{present:r||i.open,children:i.modal?S.jsx(Ji,{...o,ref:t}):S.jsx(Qi,{...o,ref:t})})});$n.displayName=se;var Ji=a.forwardRef((e,t)=>{const n=z(se,e.__scopeDialog),r=a.useRef(null),o=B(t,n.contentRef,r);return a.useEffect(()=>{const i=r.current;if(i)return Xi(i)},[]),S.jsx(Bn,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ee(e.onCloseAutoFocus,i=>{i.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:ee(e.onPointerDownOutside,i=>{const c=i.detail.originalEvent,s=c.button===0&&c.ctrlKey===!0;(c.button===2||s)&&i.preventDefault()}),onFocusOutside:ee(e.onFocusOutside,i=>i.preventDefault())})}),Qi=a.forwardRef((e,t)=>{const n=z(se,e.__scopeDialog),r=a.useRef(!1),o=a.useRef(!1);return S.jsx(Bn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),i.defaultPrevented||(r.current||n.triggerRef.current?.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=i.target;n.triggerRef.current?.contains(c)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),Bn=a.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...c}=e,s=z(se,n),l=a.useRef(null),u=B(t,l);return ci(),S.jsxs(S.Fragment,{children:[S.jsx(En,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:S.jsx(Zt,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":gt(s.open),...c,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),S.jsxs(S.Fragment,{children:[S.jsx(es,{titleId:s.titleId}),S.jsx(ns,{contentRef:l,descriptionId:s.descriptionId})]})]})}),vt="DialogTitle",Hn=a.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=z(vt,n);return S.jsx($.h2,{id:o.titleId,...r,ref:t})});Hn.displayName=vt;var Vn="DialogDescription",zn=a.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=z(Vn,n);return S.jsx($.p,{id:o.descriptionId,...r,ref:t})});zn.displayName=Vn;var Un="DialogClose",Yn=a.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=z(Un,n);return S.jsx($.button,{type:"button",...r,ref:t,onClick:ee(e.onClick,()=>o.onOpenChange(!1))})});Yn.displayName=Un;function gt(e){return e?"open":"closed"}var Xn="DialogTitleWarning",[ms,Kn]=ar(Xn,{contentName:se,titleName:vt,docsSlug:"dialog"}),es=({titleId:e})=>{const t=Kn(Xn),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
50
+
51
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
52
+
53
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return a.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},ts="DialogDescriptionWarning",ns=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Kn(ts).contentName}}.`;return a.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},ps=Ln,hs=Fn,vs=Wn,gs=jn,ys=$n,ws=Hn,xs=zn,bs=Yn;function Es(e){const t=e+"CollectionProvider",[n,r]=st(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=m=>{const{scope:v,children:y}=m,w=oe.useRef(null),x=oe.useRef(new Map).current;return S.jsx(o,{scope:v,itemMap:x,collectionRef:w,children:y})};c.displayName=t;const s=e+"CollectionSlot",l=ye(s),u=oe.forwardRef((m,v)=>{const{scope:y,children:w}=m,x=i(s,y),b=B(v,x.collectionRef);return S.jsx(l,{ref:b,children:w})});u.displayName=s;const f=e+"CollectionItemSlot",d="data-radix-collection-item",h=ye(f),p=oe.forwardRef((m,v)=>{const{scope:y,children:w,...x}=m,b=oe.useRef(null),E=B(v,b),R=i(f,y);return oe.useEffect(()=>(R.itemMap.set(b,{ref:b,...x}),()=>void R.itemMap.delete(b))),S.jsx(h,{[d]:"",ref:E,children:w})});p.displayName=f;function g(m){const v=i(e+"CollectionConsumer",m);return oe.useCallback(()=>{const w=v.collectionRef.current;if(!w)return[];const x=Array.from(w.querySelectorAll(`[${d}]`));return Array.from(v.itemMap.values()).sort((R,C)=>x.indexOf(R.ref.current)-x.indexOf(C.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:c,Slot:u,ItemSlot:p},g,r]}var rs=a.createContext(void 0);function Cs(e){const t=a.useContext(rs);return e||t||"ltr"}export{ls as A,us as C,Zt as D,En as F,gs as O,$ as P,as as R,is as S,ws as T,ms as W,Be as a,bn as b,st as c,cs as d,ss as e,Ue as f,Zo as g,ee as h,fs as i,S as j,vs as k,ys as l,xs as m,ps as n,hs as o,Es as p,te as q,de as r,Xi as s,ci as t,B as u,Tn as v,ye as w,Cs as x,ds as y,bs as z};
54
+ //# sourceMappingURL=ui-vendor-_cxVHaqZ.js.map