vendor: 4,123 bytes, line 1
1import{o as e,t}from"./jsx-runtime-DVpe7PXp.js";import{r as n}from"./shim-1B_yCr4H.js";import{_ as r,a as i,c as a,d as o,g as s,h as c,i as l,m as u,n as d,o as f,r as p,t as m,u as h}from"./es2015-BjNNCY6_.js";import{t as g}from"./dist-DBLqVDx9.js";import{t as _}from"./utils-DXalBF5w.js";import{a as v,i as y,n as b,r as x,t as S}from"./dist-CoR5CSSX.js";var C=e(n(),1),w=t();function T(e){let t=E(e),n=C.forwardRef((e,n)=>{let{children:r,...i}=e,a=C.Children.toArray(r),o=a.find(ee);if(o){let e=o.props.children,r=a.map(t=>t===o?C.Children.count(e)>1?C.Children.only(null):C.isValidElement(e)?e.props.children:null:t);return(0,w.jsx)(t,{...i,ref:n,children:C.isValidElement(e)?C.cloneElement(e,void 0,r):null})}return(0,w.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function E(e){let t=C.forwardRef((e,t)=>{let{children:n,...r}=e;if(C.isValidElement(n)){let e=O(n),i=te(r,n.props);return n.type!==C.Fragment&&(i.ref=t?c(t,e):e),C.cloneElement(n,i)}return C.Children.count(n)>1?C.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var D=Symbol(`radix.slottable`);function ee(e){return C.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===D}function te(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 O(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 k=`Popover`,[A,ne]=u(k,[v]),j=v(),[M,N]=A(k),P=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:s=!1}=e,c=j(t),l=C.useRef(null),[u,d]=C.useState(!1),[f,p]=h({prop:r,defaultProp:i??!1,onChange:a,caller:k});return(0,w.jsx)(y,{...c,children:(0,w.jsx)(M,{scope:t,contentId:o(),triggerRef:l,open:f,onOpenChange:p,onOpenToggle:C.useCallback(()=>p(e=>!e),[p]),hasCustomAnchor:u,onCustomAnchorAdd:C.useCallback(()=>d(!0),[]),onCustomAnchorRemove:C.useCallback(()=>d(!1),[]),modal:s,children:n})})};P.displayName=k;var F=`PopoverAnchor`,re=C.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=N(F,n),a=j(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return C.useEffect(()=>(o(),()=>s()),[o,s]),(0,w.jsx)(S,{...a,...r,ref:t})});re.displayName=F;var I=`PopoverTrigger`,L=C.forwardRef((e,t)=>{let{__scopePopover:n,...i}=e,o=N(I,n),c=j(n),l=s(t,o.triggerRef),u=(0,w.jsx)(a.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Z(o.open),...i,ref:l,onClick:r(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?u:(0,w.jsx)(S,{asChild:!0,...c,children:u})});L.displayName=I;var R=`PopoverPortal`,[z,B]=A(R,{forceMount:void 0}),V=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=N(R,t);return(0,w.jsx)(z,{scope:t,forceMount:n,children:(0,w.jsx)(g,{present:n||a.open,children:(0,w.jsx)(l,{asChild:!0,container:i,children:r})})})};V.displayName=R;var H=`PopoverContent`,U=C.forwardRef((e,t)=>{let n=B(H,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=N(H,e.__scopePopover);return(0,w.jsx)(g,{present:r||a.open,children:a.modal?(0,w.jsx)(G,{...i,ref:t}):(0,w.jsx)(K,{...i,ref:t})})});U.displayName=H;var W=T(`PopoverContent.RemoveScroll`),G=C.forwardRef((e,t)=>{let n=N(H,e.__scopePopover),i=C.useRef(null),a=s(t,i),o=C.useRef(!1);return C.useEffect(()=>{let e=i.current;if(e)return m(e)},[]),(0,w.jsx)(d,{as:W,allowPinchZoom:!0,children:(0,w.jsx)(q,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:r(e.onCloseAutoFocus,e=>{e.preventDefault(),o.current||n.triggerRef.current?.focus()}),onPointerDownOutside:r(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;o.current=t.button===2||n},{checkForDefaultPrevented:!1}),onFocusOutside:r(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),K=C.forwardRef((e,t)=>
1{let n=N(H,e.__scopePopover),r=C.useRef(!1),i=C.useRef(!1);return(0,w.jsx)(q,{...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()}})}),q=C.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:d,...m}=e,h=N(H,n),g=j(n);return p(),(0,w.jsx)(i,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:o,children:(0,w.jsx)(f,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:d,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>h.onOpenChange(!1),children:(0,w.jsx)(x,{"data-state":Z(h.open),role:`dialog`,id:h.contentId,...g,...m,ref:t,style:{...m.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})}),J=`PopoverClose`,Y=C.forwardRef((e,t)=>{let{__scopePopover:n,...i}=e,o=N(J,n);return(0,w.jsx)(a.button,{type:`button`,...i,ref:t,onClick:r(e.onClick,()=>o.onOpenChange(!1))})});Y.displayName=J;var X=`PopoverArrow`,ie=C.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=j(n);return(0,w.jsx)(b,{...i,...r,ref:t})});ie.displayName=X;function Z(e){return e?`open`:`closed`}var ae=P,oe=L,se=V,Q=U,ce=ae,le=oe,$=C.forwardRef(({className:e,align:t=`center`,sideOffset:n=4,...r},i)=>(0,w.jsx)(se,{children:(0,w.jsx)(Q,{ref:i,align:t,sideOffset:n,className:_(`z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-popover-content-transform-origin)`,e),...r})}));$.displayName=Q.displayName;export{$ as n,le as r,ce as t};
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.