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