1import{H as e,z as t}from"./chunk-62JRHF6Z-CS0B5gRj.js";import{t as n}from"./react-dom-fbBaaXm4.js";import{O as r}from"./paths-CTMSnpBZ.js";import{t as i}from"./jsx-runtime-Dv7-ob3D.js";import{T as a,m as o}from"./Wrapper-Qou99p7r.js";import{b as s}from"./useSignup-By7IaEZI.js";import{n as c}from"./useFocusTrap-DfjenWMi.js";import{t as l}from"./usePreventBodyScroll-Ccczez88.js";import{n as u}from"./Close-DYtSLL9b.js";var d=e(o(),1),f=e(t(),1),p=e(n(),1),m=i(),h=function(e){return e.Light=`light`,e.Dark=`dark`,e}({});function g({children:e,className:t=``,closeLabel:n=`Close modal`,colorScheme:i=`dark`,handleClose:o,id:h,isActive:g=!1,pictureInPicture:_=!1,modalSize:v,...y}){let b=v||r.Small,x=(0,f.useRef)(),S=(0,f.useRef)(null),C=(0,f.useRef)(!1);g&&!C.current&&!S.current&&(S.current=typeof document<`u`?document.activeElement:null),C.current=g;let[w,T]=(0,f.useState)(!1);return l(g&&!_),c(x,g&&!_),s(`Escape`,o),(0,f.useEffect)(()=>{T(!0)},[]),(0,f.useEffect)(()=>{if(!g&&S.current){let e=requestAnimationFrame(()=>{S.current?.focus(),S.current=null});return()=>cancelAnimationFrame(e)}},[g]),!w||!g?null:(0,m.jsx)(m.Fragment,{children:p.createPortal((0,m.jsx)(`aside`,{className:a((0,d.default)(`fixed inset-0 z-modal flex justify-center overflow-auto pt-6`,{"is-active":g},{"flex align-center items-center":b===r.Large||b===r.Full,"text-white bg-shade-90":i===`dark`,"text-base bg-white":i===`light`}),t),id:h,"data-component-name":h,ref:x,role:`dialog`,"aria-modal":!0,...y,children:(0,m.jsxs)(`div`,{className:(0,d.default)(`relative max-h-[66vh]`,{"max-w-4xl w-[90%]":b===r.Large,"max-w-screen-lg w-[90%]":b===r.Full,"max-w-[35em]":b!==r.Large&&b!==r.Full}),children:[(0,m.jsx)(`button`,{autoFocus:!0,"aria-label":n,className:(0,d.default)(`absolute right-0 `,{"top-0":b!==r.Large&&b!==r.Full,"-top-20":b===r.Large||b===r.Full,"hover:[&_svg]:text-white":i===`dark`,"hover:[&_svg]:text-black":i===`light`}),"data-component-name":`close`,onClick:o,type:`button`,children:(0,m.jsx)(u,{className:(0,d.default)(`h-8 w-8 transition-colors ease-in-out duration-300`,{"text-shade-30":i===`dark`,"text-shade-60":i===`light`})})}),(0,m.jsx)(`div`,{className:(0,d.default)({"pt-8":b===r.Small}),children:e})]})}),document.body)})}export{h as n,g as t}; 2//# sourceMappingURL=Modal-D8jto2qa.js.map
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.