1import{r as a,j as i,a0 as V,$ as y}from"./index-BUCFbuLp.js";import{u as B,d as R,P as h,f as H,a as m,c as D,b as Z,D as q,h as K}from"./index-DVnQU8aj.js";import{h as U,R as Y,u as z,F as J}from"./index-DLhje7_q.js";function Q(e){const t=X(e),n=a.forwardRef((r,o)=>{const{children:s,...c}=r,l=a.Children.toArray(s),u=l.find(te);if(u){const f=u.props.children,g=l.map(v=>v===u?a.Children.count(f)>1?a.Children.only(null):a.isValidElement(f)?f.props.children:null:v);return i.jsx(t,{...c,ref:o,children:a.isValidElement(f)?a.cloneElement(f,void 0,g):null})}return i.jsx(t,{...c,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function X(e){const t=a.forwardRef((n,r)=>{const{children:o,...s}=n;if(a.isValidElement(o)){const c=ne(o),l=oe(s,o.props);return o.type!==a.Fragment&&(l.ref=r?V(r,c):c),a.cloneElement(o,l)}return a.Children.count(o)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ee=Symbol("radix.slottable");function te(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ee}function oe(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...l)=>{const u=s(...l);return o(...l),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function ne(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 x="Dialog",[O,me]=Z(x),[re,d]=O(x),N=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:c=!0}=e,l=a.useRef(null),u=a.useRef(null),[f,g]=B({prop:r,defaultProp:o??!1,onChange:s,caller:x});return i.jsx(re,{scope:t,triggerRef:l,contentRef:u,contentId:R(),titleId:R(),descriptionId:R(),open:f,onOpenChange:g,onOpenToggle:a.useCallback(()=>g(v=>!v),[g]),modal:c,children:n})};N.displayName=x;var I="DialogTrigger",b=a.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=d(I,n),s=y(t,o.triggerRef);return i.jsx(m.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":P(o.open),...r,ref:s,onClick:D(e.onClick,o.onOpenToggle)})});b.displayName=I;var E="DialogPortal",[se,j]=O(E,{forceMount:void 0}),A=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=d(E,t);return i.jsx(se,{scope:t,forceMount:n,children:a.Children.map(r,c=>i.jsx(h,{present:n||s.open,children:i.jsx(H,{asChild:!0,container:o,children:c})}))})};A.displayName=E;var C="DialogOverlay",T=a.forwardRef((e,t)=>{const n=j(C,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=d(C,e.__scopeDialog);return s.modal?i.jsx(h,{present:r||s.open,children:i.jsx(ie,{...o,ref:t})}):null});T.displayName=C;var ae=Q("DialogOverlay.RemoveScroll"),ie=a.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=d(C,n);return i.jsx(Y,{as:ae,allowPinchZoom:!0,shards:[o.contentRef],children:i.jsx(m.div,{"data-state":P(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),p="DialogContent",S=a.forwardRef((e,t)=>{const n=j(p,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=d(p,e.__scopeDialog);return i.jsx(h,{present:r||s.open,children:s.modal?i.jsx(le,{...o,ref:t}):i.jsx(ce,{...o,ref:t})})});S.displayName=p;var le=a.forwardRef((e,t)=>{const n=d(p,e.__scopeDialog),r=a.useRef(null),o=y(t,n.contentRef,r);return a.useEffect(()=>{const s=r.current;if(s)return U(s)},[]),i.jsx(M,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:D(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:D(e.onPointerDownOutside,s=>{const c=s.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0;(c.button===2||l)&&s.preventDefault()}),onFocusOutside:D(e.onFocusOutside,s=>s.preventDefault())})}),ce=a.forwardRef((e,t)=>{const n=d(p,e.__scopeDialog),r=a.useRef(!1),o=a.useRef(!1);return i.jsx(M,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=s.target;n.triggerRef.current?.contains(c)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),M=a.forwardRef((e,t)=>
1{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...c}=e,l=d(p,n),u=a.useRef(null),f=y(t,u);return z(),i.jsxs(i.Fragment,{children:[i.jsx(J,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:i.jsx(q,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":P(l.open),...c,ref:f,onDismiss:()=>l.onOpenChange(!1)})}),i.jsxs(i.Fragment,{children:[i.jsx(ue,{titleId:l.titleId}),i.jsx(fe,{contentRef:u,descriptionId:l.descriptionId})]})]})}),_="DialogTitle",w=a.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=d(_,n);return i.jsx(m.h2,{id:o.titleId,...r,ref:t})});w.displayName=_;var F="DialogDescription",W=a.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=d(F,n);return i.jsx(m.p,{id:o.descriptionId,...r,ref:t})});W.displayName=F;var L="DialogClose",$=a.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=d(L,n);return i.jsx(m.button,{type:"button",...r,ref:t,onClick:D(e.onClick,()=>o.onOpenChange(!1))})});$.displayName=L;function P(e){return e?"open":"closed"}var k="DialogTitleWarning",[ve,G]=K(k,{contentName:p,titleName:_,docsSlug:"dialog"}),ue=({titleId:e})=>{const t=G(k),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 2 3If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 4 5For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return a.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},de="DialogDescriptionWarning",fe=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${G(de).contentName}}.`;return a.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Ce=N,xe=b,Re=A,ye=T,he=S,Ee=w,_e=W,Pe=$;export{he as C,_e as D,ye as O,Re as P,Ce as R,xe as T,ve as W,Pe as a,Ee as b,me as c};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.