@puddle-code/cli 0.4.9 → 0.4.11

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 (94) hide show
  1. package/CHANGELOG.md +8 -47
  2. package/README.md +1 -1
  3. package/dist/host-control.mjs +13 -6
  4. package/dist/index.js +25 -9
  5. package/dist/public/assets/App-Btf7WD40.js +26 -0
  6. package/dist/public/assets/{CompilationCommandForm-CipGdjjH.js → CompilationCommandForm-DQjUhaHj.js} +1 -1
  7. package/dist/public/assets/Dashboard-CEjiJV52.js +1 -0
  8. package/dist/public/assets/EditorTabClose-CQnXn4Ha.js +1 -0
  9. package/dist/public/assets/FindWidget-Bh_7yWNg.js +1 -0
  10. package/dist/public/assets/LazyTerminal-Bw9C4Swp.js +2 -0
  11. package/dist/public/assets/{NotebookWidget-Bcavj7Lb.js → NotebookWidget-C25iz3Cj.js} +1 -1
  12. package/dist/public/assets/PaneEditorBody-BdoKPslR.js +284 -0
  13. package/dist/public/assets/{PdfViewer-Cr5306nr.js → PdfViewer-BH-FXEVV.js} +1 -1
  14. package/dist/public/assets/{ReleaseNotesDialog-CbFYKoYM.js → ReleaseNotesDialog-Pa1yagZd.js} +1 -1
  15. package/dist/public/assets/Ripple-DAeJ5ylo.css +1 -0
  16. package/dist/public/assets/Ripple-sD2osFo9.js +7 -0
  17. package/dist/public/assets/SettingsDialog-2WaxsH3h.js +8 -0
  18. package/dist/public/assets/Terminal-D8s2Y67v.js +65 -0
  19. package/dist/public/assets/Workspace-B8WZOpOl.js +20 -0
  20. package/dist/public/assets/{Workspace-Bf0VMnaa.css → Workspace-CuAYZ1-B.css} +1 -1
  21. package/dist/public/assets/{_virtual_notebook-widget-runtime-Dro422xS.js → _virtual_notebook-widget-runtime-CVsZLTbL.js} +88 -88
  22. package/dist/public/assets/{api-B90WKMKj.js → api-CULxlzTe.js} +1 -1
  23. package/dist/public/assets/archive-i9DnVa-v.js +1 -0
  24. package/dist/public/assets/arrow-down-CtYa-Aya.js +1 -0
  25. package/dist/public/assets/{auth-CdosKReE.js → auth-C3ruG3fE.js} +1 -1
  26. package/dist/public/assets/button-DtByPSFL.js +1 -0
  27. package/dist/public/assets/client-settings-BdKglwtW.js +1 -0
  28. package/dist/public/assets/command-CN8HRRWf.js +1 -0
  29. package/dist/public/assets/{context-CG70lLa4.js → context-D1MuDP6X.js} +1 -1
  30. package/dist/public/assets/desktop-Bl69_YmL.js +1 -0
  31. package/dist/public/assets/dialog-DtvE8ATK.js +41 -0
  32. package/dist/public/assets/{dist-Dge3wHdO.js → dist-BeQvHdsz.js} +1 -1
  33. package/dist/public/assets/dist-DZg8Dwbr.js +1 -0
  34. package/dist/public/assets/dist-KPX-s1ou.js +1 -0
  35. package/dist/public/assets/dist-a682-VMb.js +1 -0
  36. package/dist/public/assets/{errors-tuvbq1a_.js → errors-efDAjyqa.js} +1 -1
  37. package/dist/public/assets/expanding-content-DOZTeXd_.js +1 -0
  38. package/dist/public/assets/forward-link-CAXhnLYS.js +1 -0
  39. package/dist/public/assets/{index-Doe7MhnI.js → index-BuNmxuXx.js} +3 -3
  40. package/dist/public/assets/index-CHGSBAX2.css +2 -0
  41. package/dist/public/assets/link-buffer-CsjuZOHH.js +1 -0
  42. package/dist/public/assets/{markdown-CMSzQtLp.js → markdown-BlvTv1jG.js} +1 -1
  43. package/dist/public/assets/media-refresh-store-DCt4XZrY.js +1 -0
  44. package/dist/public/assets/motion-Bd_MB9cH.js +1 -0
  45. package/dist/public/assets/notification-delivery-BkhZwpcS.js +1 -0
  46. package/dist/public/assets/popover-4DSuF34m.js +1 -0
  47. package/dist/public/assets/preferences-CbkHsty9.js +1 -0
  48. package/dist/public/assets/{protocol-support-TSI4Ig6W.js → protocol-support-BwRR1kRO.js} +1 -1
  49. package/dist/public/assets/render-rich-content-DF6NaC_6.js +4 -0
  50. package/dist/public/assets/{scroll-restoration-6GVbekSz.js → scroll-restoration-wdDB8mmu.js} +1 -1
  51. package/dist/public/assets/select-D099Wd2u.js +1 -0
  52. package/dist/public/assets/session-order-s2zUuZaO.js +1 -0
  53. package/dist/public/assets/square-terminal-CIkfNq3I.js +1 -0
  54. package/dist/public/assets/switch-AY03lzhq.js +1 -0
  55. package/dist/public/assets/use-ui-state-BpnVbZPm.js +1 -0
  56. package/dist/public/assets/{view-state-store-DbQ7YOPe.js → view-state-store-DVvLMbeY.js} +1 -1
  57. package/dist/public/assets/waves-horizontal-CLDJf7Dd.js +1 -0
  58. package/dist/public/assets/whole-word-BJjKpISQ.js +1 -0
  59. package/dist/public/assets/ws-CS9chtfK.js +1 -0
  60. package/dist/public/assets/x-DV6-RYI2.js +1 -0
  61. package/dist/public/index.html +4 -4
  62. package/dist/pudl.js +13 -6
  63. package/package.json +1 -1
  64. package/dist/public/assets/App-UQXXCAJF.js +0 -65
  65. package/dist/public/assets/Dashboard-6pSi_1fH.js +0 -1
  66. package/dist/public/assets/EditorTabClose-TixDVxvl.js +0 -1
  67. package/dist/public/assets/FindWidget-DG1YP6Zx.js +0 -1
  68. package/dist/public/assets/LazyTerminal-B88WIvyh.js +0 -2
  69. package/dist/public/assets/NewProjectDialog-C1TVzOvJ.js +0 -1
  70. package/dist/public/assets/PaneEditorBody-DRA4WG0A.js +0 -284
  71. package/dist/public/assets/SettingsDialog-BvaE3Ue8.js +0 -8
  72. package/dist/public/assets/Terminal-Bo8hyZj7.js +0 -67
  73. package/dist/public/assets/Workspace-Bf2zQC6v.js +0 -20
  74. package/dist/public/assets/button-C_Rvtcwg.js +0 -1
  75. package/dist/public/assets/chevron-right-BEy-IXEZ.js +0 -1
  76. package/dist/public/assets/client-settings-DhfHheKR.js +0 -1
  77. package/dist/public/assets/command-BV8ZEhQz.js +0 -1
  78. package/dist/public/assets/context-menu-D3ZhKA9s.js +0 -1
  79. package/dist/public/assets/dialog-D-Axqpzg.js +0 -41
  80. package/dist/public/assets/dist-BmSuHjIq.js +0 -1
  81. package/dist/public/assets/dist-Cq-O0n8n.js +0 -1
  82. package/dist/public/assets/forward-link-BspnTVuc.js +0 -1
  83. package/dist/public/assets/index-4XrK4Fes.css +0 -2
  84. package/dist/public/assets/media-refresh-store-CiyvSvEu.js +0 -1
  85. package/dist/public/assets/motion-OSLfKoC0.js +0 -1
  86. package/dist/public/assets/notification-delivery-CegOQxcZ.js +0 -1
  87. package/dist/public/assets/popover-D-jcaKGN.js +0 -1
  88. package/dist/public/assets/select-p5KTVHbg.js +0 -1
  89. package/dist/public/assets/selection-actions-CvYaucrm.js +0 -1
  90. package/dist/public/assets/session-order-CiDVvIU5.js +0 -1
  91. package/dist/public/assets/switch-oBD5uCTu.js +0 -1
  92. package/dist/public/assets/use-ui-state-D4FsRK2R.js +0 -1
  93. package/dist/public/assets/ws-Cp1eCJaM.js +0 -1
  94. package/dist/public/assets/x-Dq6POV20.js +0 -1
@@ -0,0 +1,41 @@
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{t as n}from"./react-dom-cJyBB_A4.js";import{t as r}from"./jsx-runtime-By8HlURe.js";import{n as i}from"./createLucideIcon-C9A1vLE-.js";import{a,n as o}from"./dist-DZg8Dwbr.js";import{t as s}from"./x-DV6-RYI2.js";var c=e(t(),1);typeof window<`u`&&window.document&&window.document.createElement;function l(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)}}var u=r();function d(e,t=[]){let n=[];function r(t,r){let i=c.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,l=c.useMemo(()=>o,Object.values(o));return(0,u.jsx)(s.Provider,{value:l,children:r})};o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:l=!1}=s,u=o?.[e]?.[a]||i,d=c.useContext(u);if(d)return d;if(r!==void 0)return r;if(!l)throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>c.createContext(e));return function(n){let r=n?.[e]||t;return c.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,f(i,...t)]}function f(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var p=e(n(),1),m=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=o(`Primitive.${t}`),r=c.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,u.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function h(e,t){e&&p.flushSync(()=>e.dispatchEvent(t))}function g(e){let t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>((...e)=>t.current?.(...e)),[])}var _=`DismissableLayer`,v=`dismissableLayer.update`,y=`dismissableLayer.pointerDownOutside`,b=`dismissableLayer.focusOutside`,ee,x=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),S=c.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:d,onDismiss:f,...p}=e,h=c.useContext(x),[_,y]=c.useState(null),b=_?.ownerDocument??globalThis?.document,[,S]=c.useState({}),C=a(t,y),w=Array.from(h.layers),[te]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),ne=te?w.indexOf(te):-1,T=_?w.indexOf(_):-1,E=h.layersWithOutsidePointerEventsDisabled.size>0,D=T>=ne,oe=c.useRef(!1),O=re(e=>{o?.(e),d?.(e),e.defaultPrevented||f?.()},{ownerDocument:b,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:oe,dismissableSurfaces:h.dismissableSurfaces,shouldHandlePointerDownOutside:c.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...h.branches].some(t=>t.contains(e));return D&&!t},[h.branches,D])}),se=ie(e=>{if(r&&oe.current)return;let t=e.target;[...h.branches].some(e=>e.contains(t))||(s?.(e),d?.(e),e.defaultPrevented||f?.())},b),k=_?T===w.length-1:!1,A=g(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&f&&(e.preventDefault(),f()))});return c.useEffect(()=>{if(k)return b.addEventListener(`keydown`,A,{capture:!0}),()=>b.removeEventListener(`keydown`,A,{capture:!0})},[b,k,A]),c.useEffect(()=>{if(_)return n&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(ee=b.body.style.pointerEvents,b.body.style.pointerEvents=`none`),h.layersWithOutsidePointerEventsDisabled.add(_)),h.layers.add(_),ae(),()=>{n&&(h.layersWithOutsidePointerEventsDisabled.delete(_),h.layersWithOutsidePointerEventsDisabled.size===0&&(b.body.style.pointerEvents=ee))}},[_,b,n,h]),c.useEffect(()=>()=>{_&&(h.layers.delete(_),h.layersWithOutsidePointerEventsDisabled.delete(_),ae())},[_,h]),c.useEffect(()=>{let e=()=>S({});return document.addEventListener(v,e),()=>document.removeEventListener(v,e)},[]),(0,u.jsx)(m.div,{...p,ref:C,style:{pointerEvents:E?D?`auto`:`none`:void 0,...e.style},onFocusCapture:l(e.onFocusCapture,se.onFocusCapture),onBlurCapture:l(e.onBlurCapture,se.onBlurCapture),onPointerDownCapture:l(e.onPointerDownCapture,O.onPointerDownCapture)})});S.displayName=_;var C=`DismissableLayerBranch`,w=c.forwardRef((e,t)=>{let n=c.useContext(x),r=c.useRef(null),i=a(t,r);return c.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,u.jsx)(m.div,{...e,ref:i})});w.displayName=C;function te(){let e=c.useContext(x),[t,n]=c.useState(null);return c.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}var ne=()=>!0;function re(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=ne}=t,s=g(e),l=c.useRef(!1),u=c.useRef(!1),d=c.useRef(new Map),f=c.useRef(()=>{});return c.useEffect(()=>{function e(){u.current=!1,i.current=!1,d.current.clear()}function t(){return Array.from(d.current.values()).some(Boolean)}function c(e){if(!u.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||d.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{u.current&&f.current()},0)}function p(e){u.current&&d.current.set(e.type,!1)}let m=a=>{if(a.target&&!l.current){let c=function(){n.removeEventListener(`click`,f.current);let r=t();e(),r||T(y,s,p,{discrete:!0})};if(!o(a.target)){n.removeEventListener(`click`,f.current),e(),l.current=!1;return}let p={originalEvent:a};u.current=!0,i.current=r&&a.button===0,d.current.clear(),!r||a.button!==0?c():(n.removeEventListener(`click`,f.current),f.current=c,n.addEventListener(`click`,f.current,{once:!0}))}else n.removeEventListener(`click`,f.current),e();l.current=!1},h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,c,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,f.current);for(let e of h)n.removeEventListener(e,c,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:()=>l.current=!0}}function ie(e,t=globalThis?.document){let n=g(e),r=c.useRef(!1);return c.useEffect(()=>{let e=e=>{e.target&&!r.current&&T(b,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ae(){let e=new CustomEvent(v);document.dispatchEvent(e)}function T(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?h(i,a):i.dispatchEvent(a)}var E=globalThis?.document?c.useLayoutEffect:()=>{},D=c.useId||(()=>void 0),oe=0;function O(e){let[t,n]=c.useState(D());return E(()=>{e||n(e=>e??String(oe++))},[e]),e||(t?`radix-${t}`:``)}var se=`Portal`,k=c.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=c.useState(!1);E(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?p.createPortal((0,u.jsx)(m.div,{...r,ref:t}),o):null});k.displayName=se;function A(e,t){return c.useReducer((e,n)=>t[e][n]??e,e)}var j=e=>{let{present:t,children:n}=e,r=ce(t),i=typeof n==`function`?n({present:r.isPresent}):c.Children.only(n),a=ue(r.ref,de(i));return typeof n==`function`||r.isPresent?c.cloneElement(i,{ref:a}):null};j.displayName=`Presence`;function ce(e){let[t,n]=c.useState(),r=c.useRef(null),i=c.useRef(e),a=c.useRef(`none`),o=c.useRef(void 0),[s,l]=A(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return c.useEffect(()=>{s===`mounted`?(a.current=o.current??M(r.current),o.current=void 0):a.current=`none`},[s]),E(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=M(t);e?(o.current=s,l(`MOUNT`)):s===`none`||t?.display===`none`?l(`UNMOUNT`):l(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,l]),E(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=M(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(l(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},s=e=>{e.target===t&&(a.current=M(r.current))};return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else l(`ANIMATION_END`)},[t,l]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:c.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=M(t)}else r.current=null;n(e)},[])}}function le(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function ue(...e){let t=c.useRef(e);return t.current=e,c.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=le(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():le(n[e],null)}}},[])}function M(e){return e?.animationName||`none`}function de(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 fe=c.useInsertionEffect||E;function pe({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=me({defaultProp:t,onChange:n}),s=e!==void 0,l=s?e:i;{let t=c.useRef(e!==void 0);c.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`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.`),t.current=s},[s,r])}return[l,c.useCallback(t=>{if(s){let n=he(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function me({defaultProp:e,onChange:t}){let[n,r]=c.useState(e),i=c.useRef(n),a=c.useRef(t);return fe(()=>{a.current=t},[t]),c.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function he(e){return typeof e==`function`}var N=0,P=null;function ge(){c.useEffect(()=>{P||={start:_e(),end:_e()};let{start:e,end:t}=P;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),N++,()=>{N===1&&(P?.start.remove(),P?.end.remove(),P=null),N=Math.max(0,N-1)}},[])}function _e(){let 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 ve=`focusScope.autoFocusOnMount`,F=`focusScope.autoFocusOnUnmount`,ye={bubbles:!1,cancelable:!0},be=`FocusScope`,xe=c.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...s}=e,[l,d]=c.useState(null),f=g(i),p=g(o),h=c.useRef(null),_=a(t,d),v=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let e=function(e){if(v.paused||!l)return;let t=e.target;l.contains(t)?h.current=t:I(h.current,{select:!0})},t=function(e){if(v.paused||!l)return;let t=e.relatedTarget;t!==null&&(l.contains(t)||I(h.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&I(l)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,l,v.paused]),c.useEffect(()=>{if(l){Oe.add(v);let e=document.activeElement;if(!l.contains(e)){let t=new CustomEvent(ve,ye);l.addEventListener(ve,f),l.dispatchEvent(t),t.defaultPrevented||(Se(je(we(l)),{select:!0}),document.activeElement===e&&I(l))}return()=>{l.removeEventListener(ve,f),setTimeout(()=>{let t=new CustomEvent(F,ye);l.addEventListener(F,p),l.dispatchEvent(t),t.defaultPrevented||I(e??document.body,{select:!0}),l.removeEventListener(F,p),Oe.remove(v)},0)}}},[l,f,p,v]);let y=c.useCallback(e=>{if(!n&&!r||v.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=Ce(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&I(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&I(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,v.paused]);return(0,u.jsx)(m.div,{tabIndex:-1,...s,ref:_,onKeyDown:y})});xe.displayName=be;function Se(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(I(r,{select:t}),document.activeElement!==n)return}function Ce(e){let t=we(e);return[Te(t,e),Te(t.reverse(),e)]}function we(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Te(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):Ee(r,{upTo:t})))return r}function Ee(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 De(e){return e instanceof HTMLInputElement&&`select`in e}function I(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&De(e)&&t&&e.select()}}var Oe=ke();function ke(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Ae(e,t),e.unshift(t)},remove(t){e=Ae(e,t),e[0]?.resume()}}}function Ae(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function je(e){return e.filter(e=>e.tagName!==`A`)}var Me=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},L=new WeakMap,R=new WeakMap,z={},Ne=0,Pe=function(e){return e&&(e.host||Pe(e.parentNode))},Fe=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Pe(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Ie=function(e,t,n,r){var i=Fe(t,Array.isArray(e)?e:[e]);z[n]||(z[n]=new WeakMap);var a=z[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(L.get(e)||0)+1,l=(a.get(e)||0)+1;L.set(e,c),a.set(e,l),o.push(e),c===1&&i&&R.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Ne++,function(){o.forEach(function(e){var t=L.get(e)-1,i=a.get(e)-1;L.set(e,t),a.set(e,i),t||(R.has(e)||e.removeAttribute(r),R.delete(e)),i||e.removeAttribute(n)}),Ne--,Ne||(L=new WeakMap,L=new WeakMap,R=new WeakMap,z={})}},Le=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Me(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Ie(r,i,n,`aria-hidden`)):function(){return null}},B=function(){return B=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},B.apply(this,arguments)};function Re(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 i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function ze(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var V=`right-scroll-bar-position`,H=`width-before-scroll-bar`,Be=`with-scroll-bars-hidden`,Ve=`--removed-body-scroll-bar-size`;function He(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Ue(e,t){var n=(0,c.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var We=typeof window<`u`?c.useLayoutEffect:c.useEffect,Ge=new WeakMap;function Ke(e,t){var n=Ue(t||null,function(t){return e.forEach(function(e){return He(e,t)})});return We(function(){var t=Ge.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||He(e,null)}),i.forEach(function(e){r.has(e)||He(e,a)})}Ge.set(n,e)},[e]),n}function qe(e){return e}function Je(e,t){t===void 0&&(t=qe);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Ye(e){e===void 0&&(e={});var t=Je(null);return t.options=B({async:!0,ssr:!1},e),t}var Xe=function(e){var t=e.sideCar,n=Re(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return c.createElement(r,B({},n))};Xe.isSideCarExport=!0;function Ze(e,t){return e.useMedium(t),Xe}var Qe=Ye(),$e=function(){},U=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:$e,onWheelCapture:$e,onTouchMoveCapture:$e}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,ee=Re(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=p,S=Ke([n,t]),C=B(B({},ee),i);return c.createElement(c.Fragment,null,d&&c.createElement(x,{sideCar:Qe,removeScrollBar:u,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!_,lockRef:n,gapMode:b}),o?c.cloneElement(c.Children.only(s),B(B({},C),{ref:S})):c.createElement(y,B({},C,{className:l,ref:S}),s))});U.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},U.classNames={fullWidth:H,zeroRight:V};var et,tt=function(){if(et)return et;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function nt(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=tt();return t&&e.setAttribute(`nonce`,t),e}function rt(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function it(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var at=function(){var e=0,t=null;return{add:function(n){e==0&&(t=nt())&&(rt(t,n),it(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ot=function(){var e=at();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},st=function(){var e=ot();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},ct={left:0,top:0,right:0,gap:0},lt=function(e){return parseInt(e||``,10)||0},ut=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[lt(n),lt(r),lt(i)]},dt=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return ct;var t=ut(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])}},ft=st(),W=`data-scroll-locked`,pt=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
2
+ .${Be} {
3
+ overflow: hidden ${r};
4
+ padding-right: ${s}px ${r};
5
+ }
6
+ body[${W}] {
7
+ overflow: hidden ${r};
8
+ overscroll-behavior: contain;
9
+ ${[t&&`position: relative ${r};`,n===`margin`&&`
10
+ padding-left: ${i}px;
11
+ padding-top: ${a}px;
12
+ padding-right: ${o}px;
13
+ margin-left:0;
14
+ margin-top:0;
15
+ margin-right: ${s}px ${r};
16
+ `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
17
+ }
18
+
19
+ .${V} {
20
+ right: ${s}px ${r};
21
+ }
22
+
23
+ .${H} {
24
+ margin-right: ${s}px ${r};
25
+ }
26
+
27
+ .${V} .${V} {
28
+ right: 0 ${r};
29
+ }
30
+
31
+ .${H} .${H} {
32
+ margin-right: 0 ${r};
33
+ }
34
+
35
+ body[${W}] {
36
+ ${Ve}: ${s}px;
37
+ }
38
+ `},mt=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},ht=function(){c.useEffect(function(){return document.body.setAttribute(W,(mt()+1).toString()),function(){var e=mt()-1;e<=0?document.body.removeAttribute(W):document.body.setAttribute(W,e.toString())}},[])},gt=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;ht();var a=c.useMemo(function(){return dt(i)},[i]);return c.createElement(ft,{styles:pt(a,!t,i,n?``:`!important`)})},_t=!1;if(typeof window<`u`)try{var G=Object.defineProperty({},"passive",{get:function(){return _t=!0,!0}});window.addEventListener(`test`,G,G),window.removeEventListener(`test`,G,G)}catch{_t=!1}var K=_t?{passive:!1}:!1,vt=function(e){return e.tagName===`TEXTAREA`},yt=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!vt(e)&&n[t]===`visible`)},bt=function(e){return yt(e,`overflowY`)},xt=function(e){return yt(e,`overflowX`)},St=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),Tt(e,r)){var i=Et(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Ct=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},wt=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Tt=function(e,t){return e===`v`?bt(t):xt(t)},Et=function(e,t){return e===`v`?Ct(t):wt(t)},Dt=function(e,t){return e===`h`&&t===`rtl`?-1:1},Ot=function(e,t,n,r,i){var a=Dt(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=Et(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&Tt(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},q=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},kt=function(e){return[e.deltaX,e.deltaY]},At=function(e){return e&&`current`in e?e.current:e},jt=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Mt=function(e){return`
39
+ .block-interactivity-${e} {pointer-events: none;}
40
+ .allow-interactivity-${e} {pointer-events: all;}
41
+ `},Nt=0,J=[];function Pt(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),i=c.useState(Nt++)[0],a=c.useState(st)[0],o=c.useRef(e);c.useEffect(function(){o.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=ze([e.lockRef.current],(e.shards||[]).map(At),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=c.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=q(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=St(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=St(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Ot(h,t,e,h===`h`?s:c,!0)},[]),l=c.useCallback(function(e){var n=e;if(!(!J.length||J[J.length-1]!==a)){var r=`deltaY`in n?kt(n):q(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&jt(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(At).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),u=c.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Ft(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),d=c.useCallback(function(e){n.current=q(e),r.current=void 0},[]),f=c.useCallback(function(t){u(t.type,kt(t),t.target,s(t,e.lockRef.current))},[]),p=c.useCallback(function(t){u(t.type,q(t),t.target,s(t,e.lockRef.current))},[]);c.useEffect(function(){return J.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener(`wheel`,l,K),document.addEventListener(`touchmove`,l,K),document.addEventListener(`touchstart`,d,K),function(){J=J.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,l,K),document.removeEventListener(`touchmove`,l,K),document.removeEventListener(`touchstart`,d,K)}},[]);var m=e.removeScrollBar,h=e.inert;return c.createElement(c.Fragment,null,h?c.createElement(a,{styles:Mt(i)}):null,m?c.createElement(gt,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ft(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var It=Ze(Qe,Pt),Lt=c.forwardRef(function(e,t){return c.createElement(U,B({},e,{ref:t,sideCar:It}))});Lt.classNames=U.classNames;var Y=`Dialog`,[Rt,zt]=d(Y),[Bt,X]=Rt(Y),Vt=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=c.useRef(null),l=c.useRef(null),[d,f]=pe({prop:r,defaultProp:i??!1,onChange:a,caller:Y});return(0,u.jsx)(Bt,{scope:t,triggerRef:s,contentRef:l,contentId:O(),titleId:O(),descriptionId:O(),open:d,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(e=>!e),[f]),modal:o,children:n})};Vt.displayName=Y;var Ht=`DialogTrigger`,Ut=c.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=X(Ht,n),o=a(t,i.triggerRef);return(0,u.jsx)(m.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":sn(i.open),...r,ref:o,onClick:l(e.onClick,i.onOpenToggle)})});Ut.displayName=Ht;var Wt=`DialogPortal`,[Gt,Kt]=Rt(Wt,{forceMount:void 0}),qt=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=X(Wt,t);return(0,u.jsx)(Gt,{scope:t,forceMount:n,children:c.Children.map(r,e=>(0,u.jsx)(j,{present:n||a.open,children:(0,u.jsx)(k,{asChild:!0,container:i,children:e})}))})};qt.displayName=Wt;var Z=`DialogOverlay`,Q=c.forwardRef((e,t)=>{let n=Kt(Z,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=X(Z,e.__scopeDialog);return a.modal?(0,u.jsx)(j,{present:r||a.open,children:(0,u.jsx)(Yt,{...i,ref:t})}):null});Q.displayName=Z;var Jt=o(`DialogOverlay.RemoveScroll`),Yt=c.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=X(Z,n),o=a(t,te());return(0,u.jsx)(Lt,{as:Jt,allowPinchZoom:!0,shards:[i.contentRef],children:(0,u.jsx)(m.div,{"data-state":sn(i.open),...r,ref:o,style:{pointerEvents:`auto`,...r.style}})})}),$=`DialogContent`,Xt=c.forwardRef((e,t)=>{let n=Kt($,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=X($,e.__scopeDialog);return(0,u.jsx)(j,{present:r||a.open,children:a.modal?(0,u.jsx)(Zt,{...i,ref:t}):(0,u.jsx)(Qt,{...i,ref:t})})});Xt.displayName=$;var Zt=c.forwardRef((e,t)=>{let n=X($,e.__scopeDialog),r=c.useRef(null),i=a(t,n.contentRef,r);return c.useEffect(()=>{let e=r.current;if(e)return Le(e)},[]),(0,u.jsx)($t,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:l(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:l(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:l(e.onFocusOutside,e=>e.preventDefault())})}),Qt=c.forwardRef((e,t)=>{let n=X($,e.__scopeDialog),r=c.useRef(!1),i=c.useRef(!1);return(0,u.jsx)($t,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),$t=c.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=X($,n);return ge(),(0,u.jsx)(u.Fragment,{children:(0,u.jsx)(xe,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,u.jsx)(S,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":sn(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})}),en=`DialogTitle`,tn=c.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=X(en,n);return(0,u.jsx)(m.h2,{id:i.titleId,...r,ref:t})});tn.displayName=en;var nn=`DialogDescription`,rn=c.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=X(nn,n);return(0,u.jsx)(m.p,{id:i.descriptionId,...r,ref:t})});rn.displayName=nn;var an=`DialogClose`,on=c.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=X(an,n);return(0,u.jsx)(m.button,{type:`button`,...r,ref:t,onClick:l(e.onClick,()=>i.onOpenChange(!1))})});on.displayName=an;function sn(e){return e?`open`:`closed`}var cn=Vt,ln=on;function un({className:e,children:t,wide:n=!1,surface:r=!0,showCloseButton:a=!0,...o}){return(0,u.jsxs)(qt,{children:[(0,u.jsx)(Q,{className:`overlay-backdrop-motion fixed inset-0 z-50 bg-ground/70 backdrop-blur-[2px]`}),(0,u.jsxs)(Xt,{className:i(`overlay-content-motion fixed left-1/2 top-[calc(var(--phone-top,0px)+var(--phone-height,100dvh)/2)] z-50 grid max-h-[calc(var(--phone-height,100dvh)-2rem)] w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 overflow-y-auto rounded-[var(--ui-surface-radius)] p-5`,r&&`island-outline bg-surface shadow-[var(--ui-overlay-shadow)]`,n?`max-w-3xl`:`max-w-md`,e),...o,children:[t,a&&(0,u.jsxs)(on,{className:`absolute right-3.5 top-3.5 rounded-sm text-fg-muted transition-colors hover:text-fg`,children:[(0,u.jsx)(s,{className:`size-4`}),(0,u.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function dn({className:e,...t}){return(0,u.jsx)(`div`,{className:i(`flex flex-col gap-1`,e),...t})}function fn({className:e,...t}){return(0,u.jsx)(tn,{className:i(`text-lg font-semibold text-fg`,e),...t})}function pn({className:e,...t}){return(0,u.jsx)(rn,{className:i(`text-sm text-fg-secondary`,e),...t})}function mn({className:e,...t}){return(0,u.jsx)(`div`,{className:i(`flex justify-end gap-2`,e),...t})}export{m as C,l as E,g as S,d as T,j as _,mn as a,E as b,Vt as c,qt as d,Lt as f,pe as g,ge as h,pn as i,Xt as l,xe as m,ln as n,dn as o,Le as p,un as r,fn as s,cn as t,Q as u,k as v,h as w,S as x,O as y};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{t as n}from"./jsx-runtime-By8HlURe.js";import{C as r}from"./dialog-D-Axqpzg.js";import{t as i}from"./createLucideIcon-C9A1vLE-.js";var a=e(t(),1),o=n(),s=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`}),c=`VisuallyHidden`,l=a.forwardRef((e,t)=>(0,o.jsx)(r.span,{...e,ref:t,style:{...s,...e.style}}));l.displayName=c;var u=l,d=i(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),f=i(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]);function p(e){let t=a.useRef({value:e,previous:e});return a.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}export{s as a,u as i,f as n,d as r,p as t};
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{t as n}from"./jsx-runtime-By8HlURe.js";import{t as r}from"./createLucideIcon-C9A1vLE-.js";import{C as i}from"./dialog-DtvE8ATK.js";var a=e(t(),1),o=n(),s=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`}),c=`VisuallyHidden`,l=a.forwardRef((e,t)=>(0,o.jsx)(i.span,{...e,ref:t,style:{...s,...e.style}}));l.displayName=c;var u=l,d=r(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),f=r(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]);function p(e){let t=a.useRef({value:e,previous:e});return a.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}export{s as a,u as i,f as n,d as r,p as t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";var n=e(t(),1);function r(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function i(...e){return t=>{let n=!1,i=e.map(e=>{let i=r(e,t);return!n&&typeof i==`function`&&(n=!0),i});if(n)return()=>{for(let t=0;t<i.length;t++){let n=i[t];typeof n==`function`?n():r(e[t],null)}}}}function a(...e){return n.useCallback(i(...e),e)}function o(e){let t=n.forwardRef((t,r)=>{let{children:i,...o}=t,s=null,c=!1,l=[];h(i)&&typeof y==`function`&&(i=y(i._payload)),n.Children.forEach(i,e=>{if(p(e)){c=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;h(n)&&typeof y==`function`&&(n=y(n._payload)),s=u(t,n),l.push(s?.props?.children)}else l.push(e)}),s?s=n.cloneElement(s,void 0,l):!c&&n.Children.count(i)===1&&n.isValidElement(i)&&(s=i);let m=s?f(s):void 0,g=a(r,m);if(!s){if(i||i===0)throw Error(c?v(e):_(e));return i}let b=d(o,s.props??{});return s.type!==n.Fragment&&(b.ref=r?g:m),n.cloneElement(s,b)});return t.displayName=`${e}.Slot`,t}var s=o(`Slot`),c=Symbol.for(`radix.slottable`);function l(e){let t=e=>`child`in e?e.children(e.child):e.children;return t.displayName=`${e}.Slottable`,t.__radixId=c,t}var u=(e,t)=>{if(`child`in e.props){let t=e.props.child;return n.isValidElement(t)?n.cloneElement(t,void 0,e.props.children(t.props.children)):null}return n.isValidElement(t)?t:null};function d(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function f(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)}function p(e){return n.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===c}var m=Symbol.for(`react.lazy`);function h(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===m&&`_payload`in e&&g(e._payload)}function g(e){return typeof e==`object`&&!!e&&`then`in e}var _=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,v=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,y=n.use;export{a,i,o as n,l as r,s as t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{t as n}from"./jsx-runtime-By8HlURe.js";import{C as r,E as i,S as a,T as o,_ as s,b as c,f as l,g as u,h as d,m as f,p,v as m,w as h,x as g,y as _}from"./dialog-DtvE8ATK.js";import{a as v,n as y}from"./dist-DZg8Dwbr.js";import{_ as b,b as x,g as S,n as C,t as w,v as T,y as E}from"./dist-a682-VMb.js";var D=e(t(),1),O=!1;function ee(){let[e,t]=D.useState(O);return D.useEffect(()=>{O||(O=!0,t(!0))},[]),e}var k=D.useSyncExternalStore;function A(){return()=>{}}function te(){return k(A,()=>!0,()=>!1)}var j=typeof k==`function`?te:ee,M=n(),N=`rovingFocusGroup.onEntryFocus`,ne={bubbles:!1,cancelable:!0},P=`RovingFocusGroup`,[F,I,re]=C(P),[ie,L]=o(P,[re]),[R,ae]=ie(P),oe=D.forwardRef((e,t)=>(0,M.jsx)(F.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,M.jsx)(F.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,M.jsx)(se,{...e,ref:t})})}));oe.displayName=P;var se=D.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:o,loop:s=!1,dir:c,currentTabStopId:l,defaultCurrentTabStopId:d,onCurrentTabStopIdChange:f,onEntryFocus:p,preventScrollOnEntryFocus:m=!1,...h}=e,g=D.useRef(null),_=v(t,g),y=w(c),[b,x]=u({prop:l,defaultProp:d??null,onChange:f,caller:P}),[S,C]=D.useState(!1),T=a(p),E=I(n),O=D.useRef(!1),[ee,k]=D.useState(0);return D.useEffect(()=>{let e=g.current;if(e)return e.addEventListener(N,T),()=>e.removeEventListener(N,T)},[T]),(0,M.jsx)(R,{scope:n,orientation:o,dir:y,loop:s,currentTabStopId:b,onItemFocus:D.useCallback(e=>x(e),[x]),onItemShiftTab:D.useCallback(()=>C(!0),[]),onFocusableItemAdd:D.useCallback(()=>k(e=>e+1),[]),onFocusableItemRemove:D.useCallback(()=>k(e=>e-1),[]),children:(0,M.jsx)(r.div,{tabIndex:S||ee===0?-1:0,"data-orientation":o,...h,ref:_,style:{outline:`none`,...e.style},onMouseDown:i(e.onMouseDown,()=>{O.current=!0}),onFocus:i(e.onFocus,e=>{let t=!O.current;if(e.target===e.currentTarget&&t&&!S){let t=new CustomEvent(N,ne);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=E().filter(e=>e.focusable);pe([e.find(e=>e.active),e.find(e=>e.id===b),...e].filter(Boolean).map(e=>e.ref.current),m)}}O.current=!1}),onBlur:i(e.onBlur,()=>C(!1))})})}),ce=`RovingFocusGroupItem`,le=D.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:a=!0,active:o=!1,tabStopId:s,children:l,...u}=e,d=_(),f=s||d,p=ae(ce,n),m=p.currentTabStopId===f,h=I(n),{onFocusableItemAdd:g,onFocusableItemRemove:v,currentTabStopId:y}=p,b=j();return c(()=>{if(!(!b||!a))return g(),()=>v()},[b,a,g,v]),D.useEffect(()=>{if(!(b||!a))return g(),()=>v()},[b,a,g,v]),(0,M.jsx)(F.ItemSlot,{scope:n,id:f,focusable:a,active:o,children:(0,M.jsx)(r.span,{tabIndex:m?0:-1,"data-orientation":p.orientation,...u,ref:t,onMouseDown:i(e.onMouseDown,e=>{a?p.onItemFocus(f):e.preventDefault()}),onFocus:i(e.onFocus,()=>p.onItemFocus(f)),onKeyDown:i(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){p.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=fe(e,p.orientation,p.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=h().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=p.loop?me(n,r+1):n.slice(r+1)}setTimeout(()=>pe(n))}}),children:typeof l==`function`?l({isCurrentTabStop:m,hasTabStop:y!=null}):l})})});le.displayName=ce;var ue={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function de(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function fe(e,t,n){let r=de(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return ue[r]}function pe(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function me(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var he=oe,ge=le,z=[`Enter`,` `],_e=[`ArrowDown`,`PageUp`,`Home`],ve=[`ArrowUp`,`PageDown`,`End`],ye=[..._e,...ve],be={ltr:[...z,`ArrowRight`],rtl:[...z,`ArrowLeft`]},xe={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},B=`Menu`,[V,Se,Ce]=C(B),[H,we]=o(B,[Ce,x,L]),U=x(),Te=L(),[Ee,W]=H(B),[De,G]=H(B),Oe=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:s=!0}=e,c=U(t),[l,u]=D.useState(null),d=D.useRef(!1),f=a(o),p=w(i);return D.useEffect(()=>{let e=()=>{d.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>d.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),D.useEffect(()=>{if(!n)return;let e=()=>f(!1);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,f]),(0,M.jsx)(E,{...c,children:(0,M.jsx)(Ee,{scope:t,open:n,onOpenChange:f,content:l,onContentChange:u,children:(0,M.jsx)(De,{scope:t,onClose:D.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:p,modal:s,children:r})})})};Oe.displayName=B;var ke=`MenuAnchor`,K=D.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=U(n);return(0,M.jsx)(S,{...i,...r,ref:t})});K.displayName=ke;var q=`MenuPortal`,[Ae,je]=H(q,{forceMount:void 0}),Me=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=W(q,t);return(0,M.jsx)(Ae,{scope:t,forceMount:n,children:(0,M.jsx)(s,{present:n||a.open,children:(0,M.jsx)(m,{asChild:!0,container:i,children:r})})})};Me.displayName=q;var J=`MenuContent`,[Ne,Pe]=H(J),Fe=D.forwardRef((e,t)=>{let n=je(J,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=W(J,e.__scopeMenu),o=G(J,e.__scopeMenu);return(0,M.jsx)(V.Provider,{scope:e.__scopeMenu,children:(0,M.jsx)(s,{present:r||a.open,children:(0,M.jsx)(V.Slot,{scope:e.__scopeMenu,children:o.modal?(0,M.jsx)(Ie,{...i,ref:t}):(0,M.jsx)(Le,{...i,ref:t})})})})}),Ie=D.forwardRef((e,t)=>{let n=W(J,e.__scopeMenu),r=D.useRef(null),a=v(t,r);return D.useEffect(()=>{let e=r.current;if(e)return p(e)},[]),(0,M.jsx)(ze,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:i(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Le=D.forwardRef((e,t)=>{let n=W(J,e.__scopeMenu);return(0,M.jsx)(ze,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Re=y(`MenuContent.ScrollLock`),ze=D.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEntryFocus:u,onEscapeKeyDown:p,onPointerDownOutside:m,onFocusOutside:h,onInteractOutside:_,onDismiss:y,disableOutsideScroll:b,...x}=e,S=W(J,n),C=G(J,n),w=U(n),E=Te(n),O=Se(n),[ee,k]=D.useState(null),A=D.useRef(null),te=v(t,A,S.onContentChange),j=D.useRef(0),N=D.useRef(``),ne=D.useRef(0),P=D.useRef(null),F=D.useRef(`right`),I=D.useRef(0),re=b?l:D.Fragment,ie=b?{as:Re,allowPinchZoom:!0}:void 0,L=e=>{let t=N.current+e,n=O().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=yt(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){N.current=t,window.clearTimeout(j.current),t!==``&&(j.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};D.useEffect(()=>()=>window.clearTimeout(j.current),[]),d();let R=D.useCallback(e=>F.current===P.current?.side&&xt(e,P.current?.area),[]);return(0,M.jsx)(Ne,{scope:n,searchRef:N,onItemEnter:D.useCallback(e=>{R(e)&&e.preventDefault()},[R]),onItemLeave:D.useCallback(e=>{R(e)||(A.current?.focus(),k(null))},[R]),onTriggerLeave:D.useCallback(e=>{R(e)&&e.preventDefault()},[R]),pointerGraceTimerRef:ne,onPointerGraceIntentChange:D.useCallback(e=>{P.current=e},[]),children:(0,M.jsx)(re,{...ie,children:(0,M.jsx)(f,{asChild:!0,trapped:a,onMountAutoFocus:i(o,e=>{e.preventDefault(),A.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:(0,M.jsx)(g,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:p,onPointerDownOutside:m,onFocusOutside:h,onInteractOutside:_,onDismiss:y,children:(0,M.jsx)(he,{asChild:!0,...E,dir:C.dir,orientation:`vertical`,loop:r,currentTabStopId:ee,onCurrentTabStopIdChange:k,onEntryFocus:i(u,e=>{C.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,M.jsx)(T,{role:`menu`,"aria-orientation":`vertical`,"data-state":ht(S.open),"data-radix-menu-content":``,dir:C.dir,...w,...x,ref:te,style:{outline:`none`,...x.style},onKeyDown:i(x.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&L(e.key));let i=A.current;if(e.target!==i||!ye.includes(e.key))return;e.preventDefault();let a=O().filter(e=>!e.disabled).map(e=>e.ref.current);ve.includes(e.key)&&a.reverse(),_t(a)}),onBlur:i(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(j.current),N.current=``)}),onPointerMove:i(e.onPointerMove,$(e=>{let t=e.target,n=I.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>I.current?`right`:`left`;F.current=t,I.current=e.clientX}}))})})})})})})});Fe.displayName=J;var Be=`MenuGroup`,Ve=D.forwardRef((e,t)=>{let{__scopeMenu:n,...i}=e;return(0,M.jsx)(r.div,{role:`group`,...i,ref:t})});Ve.displayName=Be;var He=`MenuLabel`,Ue=D.forwardRef((e,t)=>{let{__scopeMenu:n,...i}=e;return(0,M.jsx)(r.div,{...i,ref:t})});Ue.displayName=He;var Y=`MenuItem`,We=`menu.itemSelect`,X=D.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...a}=e,o=D.useRef(null),s=G(Y,e.__scopeMenu),c=Pe(Y,e.__scopeMenu),l=v(t,o),u=D.useRef(!1),d=()=>{let e=o.current;if(!n&&e){let t=new CustomEvent(We,{bubbles:!0,cancelable:!0});e.addEventListener(We,e=>r?.(e),{once:!0}),h(e,t),t.defaultPrevented?u.current=!1:s.onClose()}};return(0,M.jsx)(Ge,{...a,ref:l,disabled:n,onClick:i(e.onClick,d),onPointerDown:t=>{e.onPointerDown?.(t),u.current=!0},onPointerUp:i(e.onPointerUp,e=>{u.current||e.currentTarget?.click()}),onKeyDown:i(e.onKeyDown,e=>{n||e.target!==e.currentTarget||c.searchRef.current!==``&&e.key===` `||z.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});X.displayName=Y;var Ge=D.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:a=!1,textValue:o,...s}=e,c=Pe(Y,n),l=Te(n),u=D.useRef(null),d=v(t,u),[f,p]=D.useState(!1),[m,h]=D.useState(``);return D.useEffect(()=>{let e=u.current;e&&h((e.textContent??``).trim())},[s.children]),(0,M.jsx)(V.ItemSlot,{scope:n,disabled:a,textValue:o??m,children:(0,M.jsx)(ge,{asChild:!0,...l,focusable:!a,children:(0,M.jsx)(r.div,{role:`menuitem`,"data-highlighted":f?``:void 0,"aria-disabled":a||void 0,"data-disabled":a?``:void 0,...s,ref:d,onPointerMove:i(e.onPointerMove,$(e=>{a?c.onItemLeave(e):(c.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:i(e.onPointerLeave,$(e=>c.onItemLeave(e))),onFocus:i(e.onFocus,()=>p(!0)),onBlur:i(e.onBlur,()=>p(!1))})})})}),Ke=`MenuCheckboxItem`,qe=D.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...a}=e;return(0,M.jsx)(tt,{scope:e.__scopeMenu,checked:n,children:(0,M.jsx)(X,{role:`menuitemcheckbox`,"aria-checked":Q(n)?`mixed`:n,...a,ref:t,"data-state":gt(n),onSelect:i(a.onSelect,()=>r?.(Q(n)?!0:!n),{checkForDefaultPrevented:!1})})})});qe.displayName=Ke;var Je=`MenuRadioGroup`,[Ye,Xe]=H(Je,{value:void 0,onValueChange:()=>{}}),Ze=D.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,o=a(r);return(0,M.jsx)(Ye,{scope:e.__scopeMenu,value:n,onValueChange:o,children:(0,M.jsx)(Ve,{...i,ref:t})})});Ze.displayName=Je;var Qe=`MenuRadioItem`,$e=D.forwardRef((e,t)=>{let{value:n,...r}=e,a=Xe(Qe,e.__scopeMenu),o=n===a.value;return(0,M.jsx)(tt,{scope:e.__scopeMenu,checked:o,children:(0,M.jsx)(X,{role:`menuitemradio`,"aria-checked":o,...r,ref:t,"data-state":gt(o),onSelect:i(r.onSelect,()=>a.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});$e.displayName=Qe;var et=`MenuItemIndicator`,[tt,nt]=H(et,{checked:!1}),rt=D.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:i,...a}=e,o=nt(et,n);return(0,M.jsx)(s,{present:i||Q(o.checked)||o.checked===!0,children:(0,M.jsx)(r.span,{...a,ref:t,"data-state":gt(o.checked)})})});rt.displayName=et;var it=`MenuSeparator`,at=D.forwardRef((e,t)=>{let{__scopeMenu:n,...i}=e;return(0,M.jsx)(r.div,{role:`separator`,"aria-orientation":`horizontal`,...i,ref:t})});at.displayName=it;var ot=`MenuArrow`,st=D.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=U(n);return(0,M.jsx)(b,{...i,...r,ref:t})});st.displayName=ot;var ct=`MenuSub`,[lt,ut]=H(ct),dt=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,o=W(ct,t),s=U(t),[c,l]=D.useState(null),[u,d]=D.useState(null),f=a(i);return D.useEffect(()=>(o.open===!1&&f(!1),()=>f(!1)),[o.open,f]),(0,M.jsx)(E,{...s,children:(0,M.jsx)(Ee,{scope:t,open:r,onOpenChange:f,content:u,onContentChange:d,children:(0,M.jsx)(lt,{scope:t,contentId:_(),triggerId:_(),trigger:c,onTriggerChange:l,children:n})})})};dt.displayName=ct;var Z=`MenuSubTrigger`,ft=D.forwardRef((e,t)=>{let n=W(Z,e.__scopeMenu),r=G(Z,e.__scopeMenu),a=ut(Z,e.__scopeMenu),o=Pe(Z,e.__scopeMenu),s=D.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:l}=o,u={__scopeMenu:e.__scopeMenu},d=D.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);D.useEffect(()=>d,[d]),D.useEffect(()=>{let e=c.current;return()=>{window.clearTimeout(e),l(null)}},[c,l]);let f=v(t,a.onTriggerChange);return(0,M.jsx)(K,{asChild:!0,...u,children:(0,M.jsx)(Ge,{id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":n.open?a.contentId:void 0,"data-state":ht(n.open),...e,ref:f,onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:i(e.onPointerMove,$(t=>{o.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(o.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:i(e.onPointerLeave,$(e=>{d();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,a=i?-5:5,s=t[i?`left`:`right`],l=t[i?`right`:`left`];o.onPointerGraceIntentChange({area:[{x:e.clientX+a,y:e.clientY},{x:s,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:s,y:t.bottom}],side:r}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(e),e.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:i(e.onKeyDown,t=>{e.disabled||t.target!==t.currentTarget||o.searchRef.current!==``&&t.key===` `||be[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});ft.displayName=Z;var pt=`MenuSubContent`,mt=D.forwardRef((e,t)=>{let n=je(J,e.__scopeMenu),{forceMount:r=n.forceMount,align:a=`start`,...o}=e,c=W(J,e.__scopeMenu),l=G(J,e.__scopeMenu),u=ut(pt,e.__scopeMenu),d=D.useRef(null),f=v(t,d);return(0,M.jsx)(V.Provider,{scope:e.__scopeMenu,children:(0,M.jsx)(s,{present:r||c.open,children:(0,M.jsx)(V.Slot,{scope:e.__scopeMenu,children:(0,M.jsx)(ze,{id:u.contentId,"aria-labelledby":u.triggerId,...o,ref:f,align:a,side:l.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{l.isUsingKeyboardRef.current&&d.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:i(e.onFocusOutside,e=>{e.target!==u.trigger&&c.onOpenChange(!1)}),onEscapeKeyDown:i(e.onEscapeKeyDown,e=>{l.onClose(),e.preventDefault()}),onKeyDown:i(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=xe[l.dir].includes(e.key);t&&n&&(c.onOpenChange(!1),u.trigger?.focus(),e.preventDefault())})})})})})});mt.displayName=pt;function ht(e){return e?`open`:`closed`}function Q(e){return e===`indeterminate`}function gt(e){return Q(e)?`indeterminate`:e?`checked`:`unchecked`}function _t(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function vt(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function yt(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=vt(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function bt(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function xt(e,t){return t?bt({x:e.clientX,y:e.clientY},t):!1}function $(e){return t=>t.pointerType===`mouse`?e(t):void 0}var St=Oe,Ct=K,wt=Me,Tt=Fe,Et=Ve,Dt=Ue,Ot=X,kt=qe,At=Ze,jt=$e,Mt=rt,Nt=at,Pt=st,Ft=dt,It=ft,Lt=mt;export{we as _,Et as a,Dt as c,jt as d,St as f,It as g,Lt as h,Tt as i,wt as l,Ft as m,Pt as n,Ot as o,Nt as p,kt as r,Mt as s,Ct as t,At as u};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{t as n}from"./react-dom-cJyBB_A4.js";import{t as r}from"./jsx-runtime-By8HlURe.js";import{n as i,t as a}from"./createLucideIcon-C9A1vLE-.js";import{C as o,S as s,T as c,b as l}from"./dialog-DtvE8ATK.js";import{a as u,n as d}from"./dist-DZg8Dwbr.js";var f=e(t(),1),p=[`top`,`right`,`bottom`,`left`],m=Math.min,h=Math.max,g=Math.round,_=Math.floor,v=e=>({x:e,y:e}),y={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function b(e,t,n){return h(e,m(t,n))}function x(e,t){return typeof e==`function`?e(t):e}function S(e){return e.split(`-`)[0]}function C(e){return e.split(`-`)[1]}function w(e){return e===`x`?`y`:`x`}function T(e){return e===`y`?`height`:`width`}function E(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function D(e){return w(E(e))}function O(e,t,n){n===void 0&&(n=!1);let r=C(e),i=D(e),a=T(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=L(o)),[o,L(o)]}function k(e){let t=L(e);return[A(e),t,A(t)]}function A(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var j=[`left`,`right`],M=[`right`,`left`],N=[`top`,`bottom`],P=[`bottom`,`top`];function F(e,t,n){switch(e){case`top`:case`bottom`:return n?t?M:j:t?j:M;case`left`:case`right`:return t?N:P;default:return[]}}function I(e,t,n,r){let i=C(e),a=F(S(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(A)))),a}function L(e){let t=S(e);return y[t]+e.slice(t.length)}function R(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function z(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:R(e)}function B(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function ee(e,t,n){let{reference:r,floating:i}=e,a=E(t),o=D(t),s=T(o),c=S(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=C(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function te(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=x(t,e),p=z(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=B(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=B(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var ne=50,re=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:te},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=ee(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<ne&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=ee(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},ie=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=x(e,t)||{};if(l==null)return{};let d=z(u),f={x:n,y:r},p=D(i),h=T(p),g=await o.getDimensions(l),_=p===`y`,v=_?`top`:`left`,y=_?`bottom`:`right`,S=_?`clientHeight`:`clientWidth`,w=a.reference[h]+a.reference[p]-f[p]-a.floating[h],E=f[p]-a.reference[p],O=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),k=O?O[S]:0;(!k||!await(o.isElement==null?void 0:o.isElement(O)))&&(k=s.floating[S]||a.floating[h]);let A=w/2-E/2,j=k/2-g[h]/2-1,M=m(d[v],j),N=m(d[y],j),P=k-g[h]-N,F=k/2-g[h]/2+A,I=b(M,F,P),L=!c.arrow&&C(i)!=null&&F!==I&&a.reference[h]/2-(F<M?M:N)-g[h]/2<0,R=L?F<M?F-M:F-P:0;return{[p]:f[p]+R,data:{[p]:I,centerOffset:F-I-R,...L&&{alignmentOffset:R}},reset:L}}}),ae=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=x(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=S(r),_=E(o),v=S(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[L(o)]:k(o)),C=p!==`none`;!d&&C&&b.push(...I(o,m,p,y));let w=[o,...b],T=await s.detectOverflow(t,h),D=[],A=i.flip?.overflows||[];if(l&&D.push(T[g]),u){let e=O(r,a,y);D.push(T[e[0]],T[e[1]])}if(A=[...A,{placement:r,overflows:D}],!D.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=w[e];if(t&&(!(u===`alignment`&&_!==E(t))||A.every(e=>E(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:A},reset:{placement:t}};let n=A.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=A.filter(e=>{if(C){let t=E(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function oe(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function se(e){return p.some(t=>e[t]>=0)}var ce=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=x(e,t);switch(i){case`referenceHidden`:{let e=oe(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:se(e)}}}case`escaped`:{let e=oe(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:se(e)}}}default:return{}}}}},le=new Set([`left`,`top`]);async function ue(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=S(n),s=C(n),c=E(n)===`y`,l=le.has(o)?-1:1,u=a&&c?-1:1,d=x(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var de=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await ue(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},fe=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=x(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=E(i),p=w(f),m=u[p],h=u[f],g=(e,t)=>b(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},pe=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=x(e,t),u={x:n,y:r},d=E(i),f=w(d),p=u[f],m=u[d],h=x(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=le.has(S(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},me=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=x(e,t),c=await i.detectOverflow(t,s),l=S(n),u=C(n),d=E(n)===`y`,{width:f,height:p}=r.floating,g,_;l===`top`||l===`bottom`?(g=l,_=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(_=l,g=u===`end`?`top`:`bottom`);let v=p-c.top-c.bottom,y=f-c.left-c.right,b=m(p-c[g],v),w=m(f-c[_],y),T=t.middlewareData.shift,D=!T,O=b,k=w;T!=null&&T.enabled.x&&(k=y),T!=null&&T.enabled.y&&(O=v),D&&!u&&(d?k=f-2*h(c.left,c.right):O=p-2*h(c.top,c.bottom)),await o({...t,availableWidth:k,availableHeight:O});let A=await i.getDimensions(a.floating);return f!==A.width||p!==A.height?{reset:{rects:!0}}:{}}}};function he(){return typeof window<`u`}function V(e){return ge(e)?(e.nodeName||``).toLowerCase():`#document`}function H(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function U(e){return((ge(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function ge(e){return he()?e instanceof Node||e instanceof H(e).Node:!1}function W(e){return he()?e instanceof Element||e instanceof H(e).Element:!1}function G(e){return he()?e instanceof HTMLElement||e instanceof H(e).HTMLElement:!1}function _e(e){return!he()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof H(e).ShadowRoot}function ve(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=J(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function ye(e){return/^(table|td|th)$/.test(V(e))}function be(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var xe=/transform|translate|scale|rotate|perspective|filter/,Se=/paint|layout|strict|content/,K=e=>!!e&&e!==`none`,Ce;function we(e){let t=W(e)?J(e):e;return K(t.transform)||K(t.translate)||K(t.scale)||K(t.rotate)||K(t.perspective)||!Ee()&&(K(t.backdropFilter)||K(t.filter))||xe.test(t.willChange||``)||Se.test(t.contain||``)}function Te(e){let t=Y(e);for(;G(t)&&!q(t);){if(we(t))return t;if(be(t))return null;t=Y(t)}return null}function Ee(){return Ce??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Ce}function q(e){return/^(html|body|#document)$/.test(V(e))}function J(e){return H(e).getComputedStyle(e)}function De(e){return W(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Y(e){if(V(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||_e(e)&&e.host||U(e);return _e(t)?t.host:t}function Oe(e){let t=Y(e);return q(t)?(e.ownerDocument||e).body:G(t)&&ve(t)?t:Oe(t)}function X(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Oe(e),i=r===e.ownerDocument?.body,a=H(r);if(i){let e=ke(a);return t.concat(a,a.visualViewport||[],ve(r)?r:[],e&&n?X(e):[])}else return t.concat(r,X(r,[],n))}function ke(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ae(e){let t=J(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=G(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=g(n)!==a||g(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function je(e){return W(e)?e:e.contextElement}function Z(e){let t=je(e);if(!G(t))return v(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Ae(t),o=(a?g(n.width):n.width)/r,s=(a?g(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Me=v(0);function Ne(e){let t=H(e);return!Ee()||!t.visualViewport?Me:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Pe(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===H(e)}function Q(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=je(e),o=v(1);t&&(r?W(r)&&(o=Z(r)):o=Z(e));let s=Pe(a,n,r)?Ne(a):v(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=H(a),t=W(r)?H(r):r,n=e,i=ke(n);for(;i&&t!==n;){let e=Z(i),t=i.getBoundingClientRect(),r=J(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=H(i),i=ke(n)}}return B({width:u,height:d,x:c,y:l})}function Fe(e,t){let n=De(e).scrollLeft;return t?t.left+n:Q(U(e)).left+n}function Ie(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Fe(e,n),y:n.top+t.scrollTop}}function Le(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=U(r),s=t?be(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=v(1),u=v(0),d=G(r);if((d||!a)&&((V(r)!==`body`||ve(o))&&(c=De(r)),d)){let e=Q(r);l=Z(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Ie(o,c):v(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Re(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function ze(e){let t=De(e),n=e.ownerDocument.body,r=h(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=h(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Fe(e),o=-t.scrollTop;return J(n).direction===`rtl`&&(a+=h(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Be=25;function Ve(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=H(e),a=U(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Ee()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Fe(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=Be&&(s-=o)}return{width:s,height:c,x:l,y:u}}function He(e,t){let n=Q(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Z(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Ue(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Ve(e,n,t);else if(t===`document`)r=ze(U(e));else if(W(t))r=He(t,n);else{let n=Ne(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return B(r)}function We(e,t){let n=t.get(e);if(n)return n;let r=X(e,[],!1).filter(e=>W(e)&&V(e)!==`body`),i=null,a=J(e).position===`fixed`,o=a?Y(e):e;for(;W(o)&&!q(o);){let e=J(o),t=we(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Y(o)}return t.set(e,r),r}function Ge(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?be(t)?[]:We(t,this._c):[].concat(n),r],o=Ue(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Ue(t,a[e],i);s=h(n.top,s),c=m(n.right,c),l=m(n.bottom,l),u=h(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Ke(e){let{width:t,height:n}=Ae(e);return{width:t,height:n}}function qe(e,t,n){let r=G(t),i=U(t),a=n===`fixed`,o=Q(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=v(0);if((r||!a)&&((V(t)!==`body`||ve(i))&&(s=De(t)),r)){let e=Q(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Fe(i));let l=i&&!r&&!a?Ie(i,s):v(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function Je(e){return J(e).position===`static`}function Ye(e,t){if(!G(e)||J(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return U(e)===n&&(n=n.ownerDocument.body),n}function Xe(e,t){let n=H(e);if(be(e))return n;if(!G(e)){let t=Y(e);for(;t&&!q(t);){if(W(t)&&!Je(t))return t;t=Y(t)}return n}let r=Ye(e,t);for(;r&&ye(r)&&Je(r);)r=Ye(r,t);return r&&q(r)&&Je(r)&&!we(r)?n:r||Te(e)||n}var Ze=async function(e){let t=this.getOffsetParent||Xe,n=this.getDimensions,r=await n(e.floating);return{reference:qe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Qe(e){return J(e).direction===`rtl`}var $e={convertOffsetParentRelativeRectToViewportRelativeRect:Le,getDocumentElement:U,getClippingRect:Ge,getOffsetParent:Xe,getElementRects:Ze,getClientRects:Re,getDimensions:Ke,getScale:Z,isElement:W,isRTL:Qe};function et(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function tt(e,t,n){let r=null,i,a=U(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let g=_(d),v=_(a.clientWidth-(u+f)),y=_(a.clientHeight-(d+p)),b=_(u),x={rootMargin:-g+`px `+-v+`px `+-y+`px `+-b+`px`,threshold:h(0,m(1,c))||1},S=!0;function C(t){let n=t[0].intersectionRatio;if(!et(l,e.getBoundingClientRect()))return s();if(n!==c){if(!S)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}S=!1}try{r=new IntersectionObserver(C,{...x,root:a.ownerDocument})}catch{r=new IntersectionObserver(C,x)}r.observe(e)}let c=H(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function nt(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=je(e),u=i||a?[...l?X(l):[],...t?X(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?tt(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Q(e):null;c&&g();function g(){let t=Q(e);h&&!et(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var rt=de,it=fe,at=ae,ot=me,st=ce,ct=ie,lt=pe,ut=(e,t,n)=>{let r=new Map,i=n??{},a={...$e,...i.platform,_c:r};return re(e,t,{...i,platform:a})},dt=e(n(),1),ft=typeof document<`u`?f.useLayoutEffect:function(){};function pt(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,i;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(!pt(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!pt(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function mt(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ht(e,t){let n=mt(e);return Math.round(t*n)/n}function gt(e){let t=f.useRef(e);return ft(()=>{t.current=e}),t}function _t(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=f.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=f.useState(r);pt(p,r)||m(r);let[h,g]=f.useState(null),[_,v]=f.useState(null),y=f.useCallback(e=>{e!==C.current&&(C.current=e,g(e))},[]),b=f.useCallback(e=>{e!==w.current&&(w.current=e,v(e))},[]),x=a||h,S=o||_,C=f.useRef(null),w=f.useRef(null),T=f.useRef(u),E=c!=null,D=gt(c),O=gt(i),k=gt(l),A=f.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:p};O.current&&(e.platform=O.current),ut(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!pt(T.current,t)&&(T.current=t,dt.flushSync(()=>{d(t)}))})},[p,t,n,O,k]);ft(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=f.useRef(!1);ft(()=>(j.current=!0,()=>{j.current=!1}),[]),ft(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let M=f.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),N=f.useMemo(()=>({reference:x,floating:S}),[x,S]),P=f.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=ht(N.floating,u.x),r=ht(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...mt(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return f.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:P}),[u,A,M,N,P])}var vt=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:ct({element:r.current,padding:i}).fn(n):r?ct({element:r,padding:i}).fn(n):{}}}},yt=(e,t)=>{let n=rt(e);return{name:n.name,fn:n.fn,options:[e,t]}},bt=(e,t)=>{let n=it(e);return{name:n.name,fn:n.fn,options:[e,t]}},xt=(e,t)=>({fn:lt(e).fn,options:[e,t]}),St=(e,t)=>{let n=at(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ct=(e,t)=>{let n=ot(e);return{name:n.name,fn:n.fn,options:[e,t]}},wt=(e,t)=>{let n=st(e);return{name:n.name,fn:n.fn,options:[e,t]}},Tt=(e,t)=>{let n=vt(e);return{name:n.name,fn:n.fn,options:[e,t]}},$=r(),Et=`Arrow`,Dt=f.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,$.jsx)(o.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,$.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});Dt.displayName=Et;var Ot=Dt;function kt(e){let[t,n]=f.useState(void 0);return l(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var At=`Popper`,[jt,Mt]=c(At),[Nt,Pt]=jt(At),Ft=e=>{let{__scopePopper:t,children:n}=e,[r,i]=f.useState(null),[a,o]=f.useState(void 0);return(0,$.jsx)(Nt,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})};Ft.displayName=At;var It=`PopperAnchor`,Lt=f.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=Pt(It,n),s=f.useRef(null),c=a.onAnchorChange,l=u(t,f.useCallback(e=>{s.current=e,e&&c(e)},[c])),d=f.useRef(null);f.useEffect(()=>{if(!r)return;let e=d.current;d.current=r.current,e!==d.current&&c(d.current)});let p=a.placementState&&qt(a.placementState),m=p?.[0],h=p?.[1];return r?null:(0,$.jsx)(o.div,{"data-radix-popper-side":m,"data-radix-popper-align":h,...i,ref:l})});Lt.displayName=It;var Rt=`PopperContent`,[zt,Bt]=jt(Rt),Vt=f.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:c=0,arrowPadding:d=0,avoidCollisions:p=!0,collisionBoundary:m=[],collisionPadding:h=0,sticky:g=`partial`,hideWhenDetached:_=!1,updatePositionStrategy:v=`optimized`,onPlaced:y,...b}=e,x=Pt(Rt,n),[S,C]=f.useState(null),w=u(t,C),[T,E]=f.useState(null),D=kt(T),O=D?.width??0,k=D?.height??0,A=r+(a===`center`?``:`-`+a),j=typeof h==`number`?h:{top:0,right:0,bottom:0,left:0,...h},M=Array.isArray(m)?m:[m],N=M.length>0,P={padding:j,boundary:M.filter(Gt),altBoundary:N},{refs:F,floatingStyles:I,placement:L,isPositioned:R,middlewareData:z}=_t({strategy:`fixed`,placement:A,whileElementsMounted:(...e)=>nt(...e,{animationFrame:v===`always`}),elements:{reference:x.anchor},middleware:[yt({mainAxis:i+k,alignmentAxis:c}),p&&bt({mainAxis:!0,crossAxis:!1,limiter:g===`partial`?xt():void 0,...P}),p&&St({...P}),Ct({...P,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),T&&Tt({element:T,padding:d}),Kt({arrowWidth:O,arrowHeight:k}),_&&wt({strategy:`referenceHidden`,...P,boundary:N?P.boundary:void 0})]}),B=x.setPlacementState;l(()=>(B(L),()=>{B(void 0)}),[L,B]);let[ee,te]=qt(L),ne=s(y);l(()=>{R&&ne?.()},[R,ne]);let re=z.arrow?.x,ie=z.arrow?.y,ae=z.arrow?.centerOffset!==0,[oe,se]=f.useState();return l(()=>{S&&se(window.getComputedStyle(S).zIndex)},[S]),(0,$.jsx)(`div`,{ref:F.setFloating,"data-radix-popper-content-wrapper":``,style:{...I,transform:R?I.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:oe,"--radix-popper-transform-origin":[z.transformOrigin?.x,z.transformOrigin?.y].join(` `),...z.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,$.jsx)(zt,{scope:n,placedSide:ee,placedAlign:te,onArrowChange:E,arrowX:re,arrowY:ie,shouldHideArrow:ae,children:(0,$.jsx)(o.div,{"data-side":ee,"data-align":te,...b,ref:w,style:{...b.style,animation:R?void 0:`none`}})})})});Vt.displayName=Rt;var Ht=`PopperArrow`,Ut={top:`bottom`,right:`left`,bottom:`top`,left:`right`},Wt=f.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=Bt(Ht,n),a=Ut[i.placedSide];return(0,$.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,$.jsx)(Ot,{...r,ref:t,style:{...r.style,display:`block`}})})});Wt.displayName=Ht;function Gt(e){return e!==null}var Kt=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=qt(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function qt(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var Jt=Ft,Yt=Lt,Xt=Vt,Zt=Wt,Qt=`rounded-[var(--ui-radius)] bg-border/50 text-sm text-fg placeholder:text-fg-muted transition-colors hover:bg-border/80 focus:bg-border/80 disabled:cursor-not-allowed disabled:opacity-50`,$t=`relative flex cursor-pointer select-none items-center gap-2 rounded-[var(--ui-menu-radius)] px-2 py-1.5 text-sm text-fg outline-none transition-colors`,en=`data-[highlighted]:bg-action data-[highlighted]:text-action-ink data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,tn=`data-[selected=true]:bg-action data-[selected=true]:text-action-ink data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50`,nn=`overlay-surface rounded-[var(--ui-surface-radius)] bg-elevated`,rn=`overlay-content-motion`,an=`${nn} ${rn} p-1`,on=`overlay-surface rounded-[var(--ui-radius)] bg-elevated`,sn=`inline-flex size-[var(--ui-control-height)] shrink-0 cursor-pointer items-center justify-center rounded-[var(--ui-radius)] text-fg transition-colors hover:bg-elevated disabled:pointer-events-none disabled:opacity-50`,cn=`cursor-pointer rounded-[var(--ui-menu-radius)] px-1 py-0.5 text-xs text-fg transition-colors hover:bg-elevated`;function ln({className:e,type:t,...n}){return(0,$.jsx)(`input`,{type:t,className:i(`flex h-[var(--ui-field-height)] w-full px-2.5`,Qt,e),...n})}function un({className:e,...t}){return(0,$.jsx)(`textarea`,{className:i(`flex min-h-16 w-full px-2.5 py-2`,Qt,e),...t})}var dn=a(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]);function fn(e){let t=e+`CollectionProvider`,[n,r]=c(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=f.useRef(null),a=f.useRef(new Map).current;return(0,$.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,l=d(s),p=f.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=u(t,a(s,n).collectionRef);return(0,$.jsx)(l,{ref:i,children:r})});p.displayName=s;let m=e+`CollectionItemSlot`,h=`data-radix-collection-item`,g=d(m),_=f.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=f.useRef(null),s=u(t,o),c=a(m,n);return f.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,$.jsx)(g,{[h]:``,ref:s,children:r})});_.displayName=m;function v(t){let n=a(e+`CollectionConsumer`,t);return f.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${h}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:p,ItemSlot:_},v,r]}var pn=f.createContext(void 0);function mn(e){let t=f.useContext(pn);return e||t||`ltr`}export{Zt as _,un as a,Mt as b,Qt as c,$t as d,an as f,Yt as g,cn as h,ln as i,tn as l,nn as m,fn as n,sn as o,rn as p,dn as r,on as s,mn as t,en as u,Xt as v,kt as x,Jt as y};
@@ -1 +1 @@
1
- import{t as e}from"./api-B90WKMKj.js";import{n as t}from"./dist-BOS6OKSE.js";function n(e){t.error(i(e),{id:`err:${i(e)}`})}function r(t){if(!(t instanceof e)||t.code!==`conversation_live`)return null;let n=t.details?.existing_session_id,r=t.details?.existing_project_id;return typeof n==`string`&&typeof r==`string`?{sessionId:n,projectId:r}:null}function i(e){return e instanceof Error&&e.message.trim()!==``?e.message:typeof e==`string`&&e.trim()!==``?e:`Something went wrong`}export{n,r as t};
1
+ import{t as e}from"./api-CULxlzTe.js";import{n as t}from"./dist-BOS6OKSE.js";function n(e){t.error(i(e),{id:`err:${i(e)}`})}function r(t){if(!(t instanceof e)||t.code!==`conversation_live`)return null;let n=t.details?.existing_session_id,r=t.details?.existing_project_id;return typeof n==`string`&&typeof r==`string`?{sessionId:n,projectId:r}:null}function i(e){return e instanceof Error&&e.message.trim()!==``?e.message:typeof e==`string`&&e.trim()!==``?e:`Something went wrong`}export{n,r as t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{H as n,J as r,R as i,Z as a,_t as ee,s as te,u as o,y as s,z as c}from"./protocol-support-BwRR1kRO.js";import{a as ne,d as l,f as u,i as d,l as f,o as re,r as p,u as m}from"./LazyTerminal-Bw9C4Swp.js";import{t as h}from"./jsx-runtime-By8HlURe.js";import{C as ie,h as g,m as _}from"./session-order-s2zUuZaO.js";import{n as v}from"./motion-Bd_MB9cH.js";import{t as y}from"./createLucideIcon-C9A1vLE-.js";import{a as ae,i as oe,o as b,r as x,s as S,t as C}from"./dialog-DtvE8ATK.js";import{i as w}from"./dist-a682-VMb.js";import{t as T}from"./button-DtByPSFL.js";import{t as se}from"./use-debounced-value-C86N-mOK.js";var E=y(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),D=y(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),O=e(t(),1),k=h();function A(e){let t=e.trim().replace(/\/+$/,``);return t===``?`/`:t}function j(e){return e.startsWith(`/`)||e.startsWith(`~`)}function M(e){let t=e.replace(/\/+$/,``),n=t.lastIndexOf(`/`);return n<=0?`/`:t.slice(0,n)}function ce({dir:e,onNavigate:t,onChoose:n}){let i=r(e.endsWith(`/`)?e:`${e}/`);return(0,k.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,k.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,k.jsxs)(`button`,{type:`button`,onClick:()=>t(M(e)),disabled:e===`/`,title:`Parent directory`,className:`shrink-0 rounded-sm p-1 text-fg-gold transition-colors hover:bg-elevated hover:text-fg disabled:pointer-events-none disabled:opacity-40`,children:[(0,k.jsx)(_,{className:`size-3.5`}),(0,k.jsx)(`span`,{className:`sr-only`,children:`Parent directory`})]}),(0,k.jsx)(`button`,{type:`button`,onClick:()=>n(e),className:`ml-auto shrink-0 text-2xs text-fg-muted transition-colors hover:text-fg`,children:`choose this folder`})]}),(0,k.jsxs)(`div`,{className:`max-h-48 overflow-y-auto`,children:[(i.data?.entries??[]).map(e=>(0,k.jsxs)(`div`,{className:`flex items-center rounded-md transition-colors hover:bg-elevated`,children:[(0,k.jsxs)(`button`,{type:`button`,onClick:()=>t(e.path),className:`flex min-w-0 flex-1 items-center gap-2 px-2 py-1 text-left`,children:[e.is_git?(0,k.jsx)(f,{className:`size-3.5 shrink-0 text-success`}):(0,k.jsx)(D,{className:`size-3.5 shrink-0 text-fg-gold`}),(0,k.jsx)(`span`,{className:`truncate text-xs text-fg`,children:e.name})]}),e.is_git&&(0,k.jsx)(`button`,{type:`button`,onClick:()=>n(e.path),className:`shrink-0 px-2 py-1 text-2xs text-fg-muted transition-colors hover:text-fg`,children:`choose`})]},e.path)),i.data!==void 0&&i.data.entries.length===0&&(0,k.jsx)(`p`,{className:`px-2 py-1 text-xs text-fg-muted`,children:`No subdirectories.`})]})]})}function N({profileId:e,open:t,onOpenChange:f}){let h=ee(),g=n().data?.protocol,_=o(g),v=s(g),y=c(),E=i(),D=ie(),M=a(),[N,P]=(0,O.useState)(``),[F,I]=(0,O.useState)(``),[L,R]=(0,O.useState)(!1),[z,B]=(0,O.useState)(``),[V,H]=(0,O.useState)(null),[U,W]=(0,O.useState)(!1),[G,K]=(0,O.useState)(null),[q,J]=(0,O.useState)(null),Y=M.data?.home,le=()=>{let e=N.trim(),t=j(e)&&Y!==void 0?A(e.replace(/^~(?=\/|$)/,Y)):j(e)&&e.startsWith(`/`)?A(e):Y??`/`;Z(t)},X=e=>{I(e),U||B(l(e))},Z=e=>{J(e),P(e)},ue=e=>{P(e),J(null),X(e.split(`/`).filter(Boolean).pop()??``),R(!0)},Q=r(se(N,150)),de=(0,O.useMemo)(()=>{if(!j(N))return(h.data??[]).map(e=>({value:e.path,badge:`registered`,is_git:!0}));let e=new Set((h.data??[]).map(e=>e.path));return(Q.data?.entries??[]).map(t=>({value:t.path,label:t.name,badge:e.has(t.path)?`registered`:t.is_git?`git`:void 0,is_git:t.is_git}))},[N,h.data,Q.data]),fe=async()=>{K(null);try{let t=A(N),n=h.data?.find(e=>e.path===t)?.id??(await y.mutateAsync({path:t,..._?{default_base_branch:``}:{}})).id,r=await E.mutateAsync({profile_id:e,repo_id:n,name:F.trim(),...v?{colour:V}:{},...u(z)?{abbrev:u(z)}:{}});f(!1),D(`/project/${r.id}`)}catch(e){K(e instanceof Error?e.message:String(e))}},$=F.trim()!==``&&j(N.trim());return(0,k.jsx)(C,{open:t,onOpenChange:f,children:(0,k.jsxs)(x,{children:[(0,k.jsxs)(b,{children:[(0,k.jsx)(S,{children:`New project`}),(0,k.jsx)(oe,{children:`Point at a git repository on the daemon host — known repositories are reused.`})]}),(0,k.jsxs)(`form`,{className:`flex flex-col gap-3`,onSubmit:e=>{e.preventDefault(),$&&fe()},children:[(0,k.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,k.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,k.jsx)(m,{htmlFor:`repo-path`,children:`Repository path`}),(0,k.jsx)(`button`,{type:`button`,onClick:()=>q===null?le():J(null),className:`text-2xs text-fg-muted transition-colors hover:text-fg`,children:q===null?`browse…`:`hide browser`})]}),(0,k.jsx)(p,{id:`repo-path`,placeholder:`~/src/my-repo`,value:N,onValueChange:P,onChoose:e=>{!L&&e.is_git&&X(e.value.split(`/`).filter(Boolean).pop()??``)},hints:de}),q!==null&&(0,k.jsx)(ce,{dir:q,onNavigate:Z,onChoose:ue})]}),(0,k.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,k.jsx)(m,{htmlFor:`project-name`,children:`Project name`}),(0,k.jsx)(w,{id:`project-name`,placeholder:`e.g. checkout-rework`,value:F,className:ne(V),style:re(V),onChange:e=>{X(e.target.value),R(!0)}})]}),(0,k.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,k.jsx)(m,{htmlFor:`project-abbrev`,children:`Abbreviation`}),(0,k.jsx)(w,{id:`project-abbrev`,placeholder:F.trim()?l(F):`ABBRV`,maxLength:5,value:z,onChange:e=>{B(u(e.target.value)),W(!0)},className:`w-24 uppercase`}),(0,k.jsxs)(`p`,{className:`text-2xs text-fg-muted`,children:[`Up to `,5,` characters — the project's label on the collapsed sidebar rail.`]})]}),v&&(0,k.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,k.jsx)(`span`,{className:`text-xs text-fg-secondary`,children:`Colour`}),(0,k.jsx)(d,{value:V,onChange:H,onCustomChange:te(g)?H:void 0,label:`Project colour`})]}),G&&(0,k.jsx)(`p`,{className:`text-xs text-danger`,children:G}),(0,k.jsxs)(ae,{children:[(0,k.jsx)(T,{type:`button`,variant:`ghost`,onClick:()=>f(!1),children:`Cancel`}),(0,k.jsx)(T,{type:`submit`,disabled:!$||y.isPending||E.isPending,children:`Create project`})]})]})]})})}var P=class extends O.Component{element=(0,O.createRef)();animation=null;getSnapshotBeforeUpdate(e){return e.expanded===this.props.expanded||this.props.reduced?null:this.element.current?.getBoundingClientRect().height??null}componentDidUpdate(e,t,n){if(this.props.reduced){this.animation?.cancel(),this.animation=null;return}if(e.expanded===this.props.expanded)return;this.animation?.cancel();let r=this.element.current;if(!r||n===null)return;let i=r.getBoundingClientRect().height;if(n===i)return;let a=r.animate([{height:`${n}px`,overflow:`clip`},{height:`${i}px`,overflow:`clip`}],{duration:180,easing:`ease-out`});this.animation=a,a.finished.then(()=>{this.animation===a&&(this.animation=null)},()=>{})}componentWillUnmount(){this.animation?.cancel()}render(){return(0,k.jsx)(`div`,{ref:this.element,"data-expanding-content":!0,children:(0,k.jsx)(g,{motionKey:String(this.props.expanded),children:this.props.children})})}};function F(e){return(0,k.jsx)(P,{...e,reduced:v()})}export{N as n,E as r,F as t};
@@ -0,0 +1 @@
1
+ import{m as e}from"./auth-C3ruG3fE.js";import{n as t}from"./api-CULxlzTe.js";import{t as n}from"./desktop-Bl69_YmL.js";async function r(n){let r=/^\/forward\/([^/]+)\/(\d+)$/.exec(n.pathname);if(!r)throw Error(`This forwarding link is invalid.`);let i=await t(`POST`,`/cockpit/proxy-grant`,{session:r[1],port:Number(r[2]),path:n.searchParams.get(`path`)??`/`});return e.parse(i).url}async function i(e){let t=e,i=new URL(e,window.location.href);n()&&i.origin===window.location.origin&&i.pathname.startsWith(`/forward/`)&&(t=await r(i)),window.open(t,`_blank`,`noopener,noreferrer`)}export{i as n,r as t};