1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e._posthogReleaseId=e._posthogReleaseId||"01a0e4e7-bd99-0000-b39e-496f9cbb769e";var n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="121dd481-760e-5c26-bd32-925d8c0ca32e")}catch(e){}}();import{S as G,I as K}from"./IconButton-DgMNAEqv.js";import{u as B}from"./usePrefersReducedMotion-Bv8N_NNZ.js";import{u as U}from"./useScrollLock-DtPRJxpD.js";import{u as E,t as w,a as h,c as x}from"./AppearanceContext-BzKvC_CR.js";import{d as $,F as v,H as X,e as C,I as Y,g as q}from"./index-CSqb30vx.js";import{d}from"./makeCustomizable-qcBvAgU4.js";import{r as u,bE as a,bU as R,bF as I,c0 as J,eT as Q}from"./index-Dds-OluI.js";import{a as A,j as S,m as M,e as T,k as z,n as O,h as P,i as N,u as Z,F as rr,d as or,b as er,c as tr}from"./floating-ui.react-DmKwfe4d.js";import"./makeLocalizable-a83RfZyl.js";import"./OptionsContext-Bo00NKK4.js";import"./localizationKeys-L95TEc06.js";import"./EnvironmentContext-J5sjUpHj.js";import"./underscore-PzdM3hke.js";import"./url-BE5gWOA9.js";import"./react-vendor-DV815YHd.js";function nr(o){const e=o.dir;return e==="rtl"?"rtl":e==="ltr"?"ltr":(e==="auto"||!e)&&window.getComputedStyle(o).direction==="rtl"?"rtl":"ltr"}function ar(o){return typeof window>"u"?"ltr":nr(document.documentElement)}const W=u.createContext(null),k=()=>{const o=u.useContext(W);if(!o)throw new Error("Drawer components must be wrapped in <Drawer.Root>");return o};function ir(o){return Z()==null?a(rr,{children:a(F,{...o})}):a(F,{...o})}function F({children:o,open:e,onOpenChange:i,strategy:s="fixed",floatingProps:r,portalProps:t,dismissProps:f}){const g=ar(),y=J(),m=(t==null?void 0:t.root)??(y==null?void 0:y())??void 0,l=or(),{refs:b,context:p}=T({open:e,onOpenChange:i,nodeId:l,transform:!1,strategy:s,placement:g==="ltr"?"right":"left",...r}),{getFloatingProps:n}=z([O(p),P(p,f),N(p)]);return a(tr,{id:l,children:a(W.Provider,{value:{isOpen:e,setIsOpen:i,strategy:s,portalProps:{...t,root:m},refs:b,context:p,getFloatingProps:n,direction:g},children:a(er,{...t,root:m,children:o})})})}const sr=u.forwardRef(function(e,i){const{strategy:s}=k(),{disableScrollLock:r,enableScrollLock:t}=U();return Q(()=>{if(s==="fixed")return t(),()=>{r()}},[s,r,t]),a($,{ref:i,...e,elementDescriptor:d.drawerBackdrop,sx:[f=>({inset:0,backgroundColor:x.setAlpha(f.colors.$colorBackground,.28)}),e.sx]})}),j=u.forwardRef((o,e)=>{const{strategy:i,context:s}=k(),{isMounted:r,styles:t}=S(s,{initial:{opacity:0}
1,open:{opacity:1},close:{opacity:0},common:{position:i,inset:0,transitionProperty:"opacity",transitionTimingFunction:h.bezier},duration:w.drawer});return r?a(sr,{ref:e,style:{...t}}):null});j.displayName="Drawer.Overlay";const H=u.forwardRef(({children:o},e)=>{const i=B(),{animations:s}=E().parsedOptions,r=!i&&s===!0,{strategy:t,refs:f,context:g,getFloatingProps:y,direction:m}=k(),l=A([e,f.setFloating]),{isMounted:b,styles:p}=S(g,{initial:{transform:"translate3d(var(--transform-offset), 0, 0)"},open:{transform:"translate3d(0, 0, 0)"},close:{transform:"translate3d(var(--transform-offset), 0, 0)"},common:{transitionProperty:"transform",transitionTimingFunction:h.bezier},duration:r?w.drawer:0});return b?a(M,{context:g,modal:!0,outsideElementsInert:!0,initialFocus:f.floating,children:a($,{ref:l,...y(),sx:n=>({position:t,insetBlock:0,insetInline:0,pointerEvents:"none",isolation:"isolate",zIndex:t==="absolute"?n.zIndices.$modal:void 0}),elementDescriptor:d.drawerRoot,children:a(v,{elementDescriptor:d.drawerContent,style:p,direction:"col",sx:n=>({"--transform-offset":t==="fixed"?`calc((100% + ${n.space.$3} + ${n.space.$8x75}) * ${m==="rtl"?-1:1})`:`calc((100% + ${n.space.$8x75}) * ${m==="rtl"?-1:1})`,willChange:"transform",position:t,insetBlock:t==="fixed"?n.space.$3:0,insetInlineEnd:t==="fixed"?n.space.$3:0,outline:0,width:n.sizes.$100,maxWidth:t==="fixed"?`calc(100% - ${n.space.$6})`:"100%",backgroundColor:n.colors.$colorBackground,borderStartStartRadius:n.radii.$lg,borderEndStartRadius:n.radii.$lg,borderEndEndRadius:t==="fixed"?n.radii.$lg:0,borderStartEndRadius:t==="fixed"?n.radii.$lg:0,borderWidth:n.borderWidths.$normal,borderStyle:n.borderStyles.$solid,borderColor:n.colors.$borderAlpha150,overflow:"hidden",pointerEvents:"auto"}),children:o})})}):null});H.displayName="Drawer.Content";const lr=u.forwardRef(({title:o,children:e,sx:i},s)=>a($,{ref:s,elementDescriptor:d.drawerHeader,as:"header",sx:[r=>({display:"flex",background:C.mergedColorsBackground(x.setAlpha(r.colors.$colorBackground,1),r.colors.$neutralAlpha50),borderBlockEndWidth:r.borderWidths.$normal,borderBlockEndStyle:r.borderStyles.$solid,borderBlockEndColor:r.colors.$borderAlpha150,borderStartStartRadius:r.radii.$lg,borderStartEndRadius:r.radii.$lg,paddingBlock:o?r.space.$3:void 0,paddingInline:o?r.space.$4:void 0}),i],children:o?R(I,{children:[a(X,{localizationKey:o,as:"h2",elementDescriptor:d.drawerTitle,textVariant:"h2",sx:{alignSelf:"center"}}),a(D,{})]}):e})),dr=u.forwardRef(({children:o,...e},i)=>a($,{ref:i,elementDescriptor:d.drawerBody,sx:[()=>({display:"flex",flexDirection:"column",flex:1,overflowY:"auto",overflowX:"hidden"}),e.sx],...e,children:o})),cr=u.forwardRef(({children:o,sx:e,...i},s)=>a($,{ref:s,elementDescriptor:d.drawerFooter,sx:[r=>({display:"flex",flexDirection:"column",background:C.mergedColorsBackground(x.setAlpha(r.colors.$colorBackground,1),r.colors.$neutralAlpha50),borderBlockStartWidth:r.borderWidths.$normal,borderBlockStartStyle:r.borderStyles.$solid,borderBlockStartColor:r.colors.$borderAlpha100,borderEndStartRadius:r.radii.$xl,borderEndEndRadius:r.radii.$xl,paddingBlock:r.space.$3,paddingInline:r.space.$4}),e],...i,children:o})),D=u.forwardRef((o,e)=>{const{setIsOpen:i}=k();return a(K,{ref:e,elementDescriptor:d.drawerClose,variant:"ghost","aria-label":"Close drawer",onClick:()=>i(!1),icon:a(Y,{icon:G}),sx:s=>({color:s.colors.$colorMutedForeground,padding:s.space.$3,marginInlineStart:"auto"})})});D.displayName="Drawer.Close";const L=u.forwardRef(({open:o,onOpenChange:e,children:i,actionsSlot:s,roleProps:r},t)=>{const f=B(),{animations:g}=E().parsedOptions,y=!f&&g===!0,{refs:m,context:l}=T({open:o,onOpenChange:e,transform:!1,strategy:"absolute"}),{getFloatingProps:b}=z([O(l),P(l),N(l,{role:"alertdialog",...r})]),p=A([t,m.setFloating]),{styles:n}=S(l,{initial:{opacity:0}
1,open:{opacity:1},close:{opacity:0},common:{transitionProperty:"opacity",transitionTimingFunction:h.bezier},duration:w.drawer}),{isMounted:V,styles:_}=S(l,{initial:{transform:"translate3D(0, 100%, 0)"},open:{transform:"translate3D(0, 0, 0)"},close:{transform:"translate3D(0, 100%, 0)"},common:{transitionProperty:"transform",transitionTimingFunction:h.bezier},duration:y?w.drawer:0});return V?R(I,{children:[a(q,{elementDescriptor:d.drawerConfirmationBackdrop,style:n,sx:c=>({position:"absolute",inset:0,backgroundImage:`linear-gradient(to bottom, ${x.setAlpha(c.colors.$colorBackground,.28)}, ${c.colors.$colorBackground})`})}),a(M,{context:l,modal:!0,outsideElementsInert:!0,initialFocus:m.floating,children:R($,{ref:p,elementDescriptor:d.drawerConfirmationRoot,style:_,...b(),sx:c=>({display:"flex",flexDirection:"column",rowGap:c.space.$6,outline:"none",willChange:"transform",position:"absolute",bottom:0,left:0,right:0,background:C.mergedColorsBackground(x.setAlpha(c.colors.$colorBackground,1),c.colors.$neutralAlpha50),padding:c.space.$4,borderStartStartRadius:c.radii.$md,borderStartEndRadius:c.radii.$md,boxShadow:`0 0 0 1px ${c.colors.$borderAlpha100}`}),children:[i,a(v,{elementDescriptor:d.drawerConfirmationActions,gap:3,justify:"end",children:s})]})})]}):null});L.displayName="Drawer.Confirmation";const Dr={Root:ir,Overlay:j,Content:H,Header:lr,Body:dr,Footer:cr,Confirmation:L,Close:D};export{Dr as Drawer,k as useDrawerContext}; 2 3//# chunkId=121dd481-760e-5c26-bd32-925d8c0ca32e
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.