offsite 0.0.26 → 0.0.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ import{a as e,n as t,r as n,t as r}from"./jsx-runtime-D3jfb0Ew.js";import{o as i,t as a}from"./utils-PtDt7m8t.js";var o=n((e=>{var n=t();function r(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function i(){}var a={d:{f:i,r:function(){throw Error(r(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`),s=Symbol.for(`react.recoverable`),c=Symbol.for(`react.optimistic_key`);function l(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:r===c?c:``+r,children:e,containerInfo:t,implementation:n}}var u=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.browser=function(e){return{$$typeof:s,_reason:e}},e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(r(299));return l(e,t,null,n)},e.flushSync=function(e){var t=u.T,n=a.p;try{if(u.T=null,a.p=2,e)return e()}finally{u.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=d(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??a.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=d(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else a.d.m(e)}},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return u.H.useFormState(e,t,n)},e.useFormStatus=function(){return u.H.useHostTransitionStatus()},e.version=`19.3.0`})),s=n(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=o()})),c=e(t()),l={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`},u=(0,c.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n,absoluteStrokeWidth:r=!1,className:i=``,altIcon:a,showAlt:o=!1,icon:s,primaryColor:u,secondaryColor:d,disableSecondaryOpacity:f=!1,...p},m)=>{let h=n===void 0?void 0:r?Number(n)*24/Number(t):n,g=h===void 0?{}:{strokeWidth:h,stroke:`currentColor`},_={ref:m,...l,width:t,height:t,color:u||e,className:i,...g,...p},v=[...o&&a?a:s].sort(([,e],[,t])=>{let n=e.opacity!==void 0;return t.opacity===void 0?n?-1:0:1}).map(([t,n])=>{let r=n.opacity!==void 0,i=r&&!f?n.opacity:void 0,a=d?{...n.stroke===void 0?{fill:r?d:u||e}:{stroke:r?d:u||e}}:{};return(0,c.createElement)(t,{...n,...g,...a,opacity:i,key:n.key})});return(0,c.createElement)(`svg`,_,v)});u.displayName=`HugeiconsIcon`;var d=r(),f=e(s(),1),p=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,m=i,h=(e,t)=>n=>{if(t?.variants==null)return m(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=p(t)||p(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return m(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},g=Object.defineProperty,_=(e,t)=>g(e,`name`,{value:t,configurable:!0});function v(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}_(v,`setRef`);function y(...e){return t=>{let n=!1,r=e.map(e=>{let r=v(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():v(e[t],null)}}}}_(y,`composeRefs`);function b(...e){return c.useCallback(y(...e),e)}_(b,`useComposedRefs`);var ee=Object.defineProperty,x=(e,t)=>ee(e,`name`,{value:t,configurable:!0});function S(e){let t=c.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];r=ie(r),c.Children.forEach(r,e=>{if(te(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;for(;k(n)&&typeof A==`function`;)n=A(n._payload);a=E(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=c.cloneElement(a,void 0,s):!o&&c.Children.count(r)===1&&c.isValidElement(r)&&(a=r);let l=a?O(a):void 0,u=b(n,l);if(!a){if(r||r===0)throw Error(o?se(e):oe(e));return r}let d=D(i,a.props??{});return a.type!==c.Fragment&&(d.ref=n?u:l),c.cloneElement(a,d)});return t.displayName=`${e}.Slot`,t}x(S,`createSlot`);var C=S(`Slot`),w=Symbol.for(`radix.slottable`);function T(e){let t=x(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=w,t}x(T,`createSlottable`);var E=x((e,t)=>`child`in e.props?c.isValidElement(t)?c.cloneElement(t,void 0,e.props.children(t.props.children)):null:c.isValidElement(t)?t:null,`getSlottableElementFromSlottable`);function D(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(` `):r===`aria-describedby`&&(n[r]=ae(a,i))}return{...e,...n}}x(D,`mergeProps`);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)}x(O,`getElementRef`);function te(e){return c.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===w}x(te,`isSlottable`);var ne=Symbol.for(`react.lazy`);function k(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===ne&&`_payload`in e&&re(e._payload)}x(k,`isLazyComponent`);function re(e){return typeof e==`object`&&!!e&&`then`in e}x(re,`isPromiseLike`);function ie(e){let t=e;for(;k(t)&&typeof A==`function`;)t=A(t._payload);return t}x(ie,`useUnwrappedLazy`);function ae(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}x(ae,`concatAriaDescribedby`);var oe=x(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),se=x(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),A=c.use,ce=Object.defineProperty,le=(e,t)=>ce(e,`name`,{value:t,configurable:!0}),j=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=S(`Primitive.${t}`),r=c.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,d.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function M(e,t){e&&f.flushSync(()=>e.dispatchEvent(t))}le(M,`dispatchDiscreteCustomEvent`);var ue=Object.defineProperty,N=(e,t)=>ue(e,`name`,{value:t,configurable:!0});function de(e,t){let n=c.createContext(t);n.displayName=e+`Context`;let r=N(e=>{let{children:t,...r}=e,i=c.useMemo(()=>r,Object.values(r));return(0,d.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=c.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return N(i,`useContext`),[r,i]}N(de,`createContext`);function fe(e,t=[]){let n=[];function r(t,r){let i=c.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=N(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,l=c.useMemo(()=>o,Object.values(o));return(0,d.jsx)(s.Provider,{value:l,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:l=!1}=s,u=o?.[e]?.[a]||i,d=c.useContext(u);if(d)return d;if(r!==void 0)return r;if(!l)throw Error(`\`${n}\` must be used within \`${t}\``)}return N(s,`useContext`),[o,s]}N(r,`createContext`);let i=N(()=>{let t=n.map(e=>c.createContext(e));return N(function(n){let r=n?.[e]||t;return c.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,pe(i,...t)]}N(fe,`createContextScope`);function pe(...e){let t=e[0];if(e.length===1)return t;let n=N(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return N(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}N(pe,`composeContextScopes`);var P=globalThis?.document?c.useLayoutEffect:()=>{},me=Object.defineProperty,F=(e,t)=>me(e,`name`,{value:t,configurable:!0}),he=!!(typeof window<`u`&&window.document&&window.document.createElement);function I(e,t,{checkForDefaultPrevented:n=!0}={}){return F(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}F(I,`composeEventHandlers`);function ge(e){if(!he)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}F(ge,`getOwnerWindow`);function L(e){if(!he)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}F(L,`getOwnerDocument`);function _e(e,t=!1){let{activeElement:n}=L(e);if(!n?.nodeName)return null;if(ve(n)&&n.contentDocument)return _e(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=L(n).getElementById(e);if(t)return t}}return n}F(_e,`getActiveElement`);function ve(e){return e.tagName===`IFRAME`}F(ve,`isFrame`);var ye=Object.defineProperty,be=(e,t)=>ye(e,`name`,{value:t,configurable:!0}),xe=c.useEffectEvent,Se=c.useInsertionEffect;function Ce(e){if(typeof xe==`function`)return xe(e);let t=c.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof Se==`function`?Se(()=>{t.current=e}):P(()=>{t.current=e}),c.useMemo(()=>((...e)=>t.current?.(...e)),[])}be(Ce,`useEffectEvent`);var we=Object.defineProperty,R=(e,t)=>we(e,`name`,{value:t,configurable:!0}),Te=c.useInsertionEffect||P;function Ee({prop:e,defaultProp:t,onChange:n=R(()=>{},`onChange`),caller:r}){let[i,a,o]=De({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,c.useCallback(t=>{if(s){let n=Oe(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}R(Ee,`useControllableState`);function De({defaultProp:e,onChange:t}){let[n,r]=c.useState(e),i=c.useRef(n),a=c.useRef(t);return Te(()=>{a.current=t},[t]),c.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}R(De,`useUncontrolledState`);function Oe(e){return typeof e==`function`}R(Oe,`isFunction`);var ke=Symbol(`RADIX:SYNC_STATE`);function Ae(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,l=i!==void 0,u=Ce(o),d=[{...n,state:a}];r&&d.push(r);let[f,p]=c.useReducer((t,n)=>{if(n.type===ke)return{...t,state:n.state};let r=e(t,n);return l&&!Object.is(r.state,t.state)&&u(r.state),r},...d),m=f.state,h=c.useRef(m);c.useEffect(()=>{h.current!==m&&(h.current=m,l||u(m))},[m,h,l]);let g=c.useMemo(()=>i===void 0?f:{...f,state:i},[f,i]);return c.useEffect(()=>{l&&!Object.is(i,f.state)&&p({type:ke,state:i})},[i,f.state,l]),[g,p]}R(Ae,`useControllableStateReducer`);var je=Object.defineProperty,z=(e,t)=>je(e,`name`,{value:t,configurable:!0});function Me(e,t){return c.useReducer((e,n)=>t[e][n]??e,e)}z(Me,`useStateMachine`);var Ne=z(e=>{let{present:t,children:n}=e,r=Pe(t),i=typeof n==`function`?n({present:r.isPresent}):c.Children.only(n),a=Fe(r.ref,Ie(i));return typeof n==`function`||r.isPresent?c.cloneElement(i,{ref:a}):null},`Presence`);function Pe(e){let[t,n]=c.useState(),r=c.useRef(null),i=c.useRef(e),a=c.useRef(`none`),o=c.useRef(void 0),[s,l]=Me(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return c.useEffect(()=>{s===`mounted`?(a.current=o.current??V(r.current),o.current=void 0):a.current=`none`},[s]),P(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=V(t);e?(o.current=s,l(`MOUNT`)):s===`none`||t?.display===`none`?l(`UNMOUNT`):l(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,l]),P(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=z(a=>{let o=V(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(l(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=z(e=>{e.target===t&&(a.current=V(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}l(`ANIMATION_END`)},[t,l]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:c.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=V(t)}else r.current=null;n(e)},[])}}z(Pe,`usePresence`);function B(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}z(B,`setRef`);function Fe(...e){let t=c.useRef(e);return t.current=e,c.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=B(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():B(n[e],null)}}},[])}z(Fe,`useStableComposedRefs`);function V(e){return e?.animationName||`none`}z(V,`getAnimationName`);function Ie(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)}z(Ie,`getElementRef`);var Le=Object.defineProperty,Re=(e,t)=>Le(e,`name`,{value:t,configurable:!0}),ze=c.useId||(()=>void 0),Be=0;function Ve(e){let[t,n]=c.useState(ze());return P(()=>{e||n(e=>e??String(Be++))},[e]),e||(t?`radix-${t}`:``)}Re(Ve,`useId`);var He=Object.defineProperty,Ue=(e,t)=>He(e,`name`,{value:t,configurable:!0}),We=c.useInsertionEffect;function H(e){let t=c.useRef(e);return typeof We==`function`?We(()=>{t.current=e}):P(()=>{t.current=e}),c.useMemo(()=>((...e)=>t.current?.(...e)),[])}Ue(H,`useCallbackRef`);var Ge=Object.defineProperty,U=(e,t)=>Ge(e,`name`,{value:t,configurable:!0}),W=`dismissableLayer.update`,Ke=`dismissableLayer.pointerDownOutside`,qe=`dismissableLayer.focusOutside`,Je,Ye=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Xe=c.forwardRef(U(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:l,...u}=e,f=c.useContext(Ye),[p,m]=c.useState(null),h=p?.ownerDocument??globalThis?.document,[,g]=c.useState({}),_=b(t,m),v=Array.from(f.layers),[y]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),ee=y?v.indexOf(y):-1,x=p?v.indexOf(p):-1,S=f.layersWithOutsidePointerEventsDisabled.size>0,C=x>=ee,w=c.useRef(!1),T=$e(e=>{a?.(e),s?.(e),e.defaultPrevented||l?.()},{ownerDocument:h,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:w,dismissableSurfaces:f.dismissableSurfaces,shouldHandlePointerDownOutside:c.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...f.branches].some(t=>t.contains(e));return C&&!t},[f.branches,C])}),E=et(e=>{if(r&&w.current)return;let t=e.target;[...f.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||l?.())},h),D=p?x===v.length-1:!1,O=H(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))});return c.useEffect(()=>{if(D)return h.addEventListener(`keydown`,O,{capture:!0}),()=>h.removeEventListener(`keydown`,O,{capture:!0})},[h,D,O]),c.useEffect(()=>{if(p)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(Je=h.body.style.pointerEvents,h.body.style.pointerEvents=`none`),f.layersWithOutsidePointerEventsDisabled.add(p)),f.layers.add(p),G(),()=>{n&&(f.layersWithOutsidePointerEventsDisabled.delete(p),f.layersWithOutsidePointerEventsDisabled.size===0&&(h.body.style.pointerEvents=Je))}},[p,h,n,f]),c.useEffect(()=>()=>{p&&(f.layers.delete(p),f.layersWithOutsidePointerEventsDisabled.delete(p),G())},[p,f]),c.useEffect(()=>{let e=U(()=>g({}),`handleUpdate`);return document.addEventListener(W,e),()=>document.removeEventListener(W,e)},[]),(0,d.jsx)(j.div,{...u,ref:_,style:{pointerEvents:S?C?`auto`:`none`:void 0,...e.style},onFocusCapture:I(e.onFocusCapture,E.onFocusCapture),onBlurCapture:I(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:I(e.onPointerDownCapture,T.onPointerDownCapture)})},`DismissableLayer`));function Ze(){let e=c.useContext(Ye),[t,n]=c.useState(null);return c.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}U(Ze,`useDismissableLayerSurface`);var Qe=U(()=>!0,`IS_TRUE`);function $e(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=Qe}=t,s=H(e),l=c.useRef(!1),u=c.useRef(!1),d=c.useRef(new Map),f=c.useRef(()=>{});return c.useEffect(()=>{function e(){u.current=!1,i.current=!1,d.current.clear()}U(e,`resetOutsideInteraction`);function t(){return Array.from(d.current.values()).some(Boolean)}U(t,`isOutsideInteractionIntercepted`);function c(e){if(!u.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||d.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{u.current&&f.current()},0)}U(c,`handleInteractionCapture`);function p(e){u.current&&d.current.set(e.type,!1)}U(p,`handleInteractionBubble`);let m=U(a=>{if(a.target&&!l.current){let c=function(){n.removeEventListener(`click`,f.current);let r=t();e(),r||K(Ke,s,p,{discrete:!0})};if(U(c,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,f.current),e(),l.current=!1;return}let p={originalEvent:a};u.current=!0,i.current=r&&a.button===0,d.current.clear(),!r||a.button!==0?c():(n.removeEventListener(`click`,f.current),f.current=c,n.addEventListener(`click`,f.current,{once:!0}))}else n.removeEventListener(`click`,f.current),e();l.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,c,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,f.current);for(let e of h)n.removeEventListener(e,c,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:U(()=>l.current=!0,`onPointerDownCapture`)}}U($e,`usePointerDownOutside`);function et(e,t=globalThis?.document){let n=H(e),r=c.useRef(!1);return c.useEffect(()=>{let e=U(e=>{e.target&&!r.current&&K(qe,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:U(()=>r.current=!0,`onFocusCapture`),onBlurCapture:U(()=>r.current=!1,`onBlurCapture`)}}U(et,`useFocusOutside`);function G(){let e=new CustomEvent(W);document.dispatchEvent(e)}U(G,`dispatchUpdate`);function K(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?M(i,a):i.dispatchEvent(a)}U(K,`handleAndDispatchCustomEvent`);var tt=Object.defineProperty,q=(e,t)=>tt(e,`name`,{value:t,configurable:!0}),J=`focusScope.autoFocusOnMount`,Y=`focusScope.autoFocusOnUnmount`,nt={bubbles:!1,cancelable:!0},rt=c.forwardRef(q(function(e,t){let{loop:n=!1,trapped:r=!1,branches:i,onMountAutoFocus:a,onUnmountAutoFocus:o,...s}=e,[l,u]=c.useState(null),f=H(a),p=H(o),m=c.useRef(null),h=b(t,u),g=c.useRef(i);c.useEffect(()=>{g.current=i});let _=c.useCallback(e=>e?l?.contains(e)?!0:!!g.current?.some(t=>t.contains(e)):!1,[l]),v=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let e=function(e){if(v.paused||!l)return;let t=e.target;_(t)?m.current=t:Q(m.current,{select:!0})},t=function(e){if(v.paused||!l)return;let t=e.relatedTarget;t!==null&&(_(t)||Q(m.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Q(l)};q(e,`handleFocusIn`),q(t,`handleFocusOut`),q(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,l,v.paused,_]),c.useEffect(()=>{if(l){ft.add(v);let e=document.activeElement;if(!l.contains(e)){let t=new CustomEvent(J,nt);l.addEventListener(J,f),l.dispatchEvent(t),t.defaultPrevented||(ct(mt(X(l)),{select:!0}),document.activeElement===e&&Q(l))}return()=>{l.removeEventListener(J,f);let t=l.ownerDocument,n=CustomEvent;setTimeout(()=>{let r=new n(Y,nt);l.addEventListener(Y,p),l.dispatchEvent(r),r.defaultPrevented||Q(e??t.body,{select:!0}),l.removeEventListener(Y,p),ft.remove(v)},0)}}},[l,f,p,v]);let y=c.useCallback(e=>{if(!n&&!r||v.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=lt(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Q(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Q(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,v.paused]);return(0,d.jsx)(j.div,{tabIndex:-1,...s,ref:h,onKeyDown:y})},`FocusScope`)),it=c.createContext(null);function at({registry:e,children:t}){return e?(0,d.jsx)(it.Provider,{value:e,children:t}):t}q(at,`FocusScopeBranchProvider`);function ot(){let[e,t]=c.useState([]);return{nodes:e,registry:c.useMemo(()=>({add:q(e=>t(t=>t.includes(e)?t:[...t,e]),`add`),remove:q(e=>t(t=>t.filter(t=>t!==e)),`remove`)}),[])}}q(ot,`useFocusScopeBranchRegistry`);function st(e){let t=c.useContext(it);c.useEffect(()=>{if(e&&t)return t.add(e),()=>t.remove(e)},[e,t])}q(st,`useFocusScopeBranch`);function ct(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Q(r,{select:t}),document.activeElement!==n)return}q(ct,`focusFirst`);function lt(e){let t=X(e);return[Z(t,e),Z(t.reverse(),e)]}q(lt,`getTabbableEdges`);function X(e){let t=[],n=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:q(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}q(X,`getTabbableCandidates`);function Z(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):ut(r,{upTo:t})))return r}q(Z,`findVisible`);function ut(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}q(ut,`isHidden`);function dt(e){return e.tagName===`INPUT`&&typeof e.select==`function`}q(dt,`isSelectableInput`);function Q(e,{select:t=!1}={}){if(e&&e.focus){let n=(e.ownerDocument??document).activeElement;e.focus({preventScroll:!0}),e!==n&&dt(e)&&t&&e.select()}}q(Q,`focus`);var ft=pt();function pt(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=$(e,t),e.unshift(t)},remove(t){e=$(e,t),e[0]?.resume()}}}q(pt,`createFocusScopesStack`);function $(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}q($,`arrayRemove`);function mt(e){return e.filter(e=>e.tagName!==`A`)}q(mt,`removeLinks`);var ht=Object.defineProperty,gt=c.forwardRef(((e,t)=>ht(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=c.useState(!1);P(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?f.createPortal((0,d.jsx)(j.div,{...r,ref:t}),o):null},`Portal`)),_t=h(`relative inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 rounded-[var(--control-radius)] border text-sm font-medium whitespace-nowrap outline-none transition-[box-shadow,scale] select-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset disabled:pointer-events-none disabled:opacity-64 [&:active:not([aria-haspopup])]:scale-[0.97] [&_svg]:pointer-events-none [&_svg]:-mx-0.5 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`border-primary bg-primary text-primary-foreground shadow-xs shadow-primary/24 not-disabled:inset-shadow-[0_1px_rgb(255_255_255/16%)] hover:bg-primary/90 active:shadow-none`,outline:`border-input bg-popover text-foreground shadow-xs/5 hover:bg-accent/50 dark:bg-input/32 dark:hover:bg-input/64 [&_svg:not([class*=text-])]:text-muted-foreground`,secondary:`border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/90 dark:bg-input/32 dark:hover:bg-input/64`,ghost:`border-transparent text-foreground hover:bg-accent aria-expanded:bg-accent [&_svg:not([class*=text-])]:text-muted-foreground`,"ghost-muted":`border-transparent text-muted-foreground hover:bg-accent hover:text-foreground aria-expanded:bg-accent`,destructive:`border-transparent bg-destructive/90 text-white shadow-xs shadow-destructive/24 hover:bg-destructive`},size:{default:`h-9 gap-1.5 px-[calc(--spacing(2.5)-1px)]`,sm:`h-8 gap-1.5 px-[calc(--spacing(2.5)-1px)]`,xs:`h-7 gap-1 px-[calc(--spacing(2)-1px)] text-xs [&_svg:not([class*='size-'])]:size-3.5`,icon:`size-9`,"icon-sm":`size-8`,"icon-xs":`size-7 [&_svg:not([class*='size-'])]:size-3.5`,"icon-micro":`size-6 rounded-sm p-0`}},defaultVariants:{variant:`default`,size:`default`}});function vt({className:e,variant:t=`default`,size:n=`default`,asChild:r=!1,...i}){let o=r?C:`button`;return(0,d.jsx)(o,{"data-slot":`button`,"data-variant":t,"data-size":n,className:a(_t({variant:t,size:n,className:e})),...i})}export{s as S,M as _,st as a,b,Ze as c,Ne as d,Ee as f,j as g,fe as h,at as i,H as l,P as m,gt as n,ot as o,I as p,rt as r,Xe as s,vt as t,Ve as u,S as v,u as x,T as y};
@@ -1 +1 @@
1
- export{n as getSharedHighlighter}from"./dist-BJ6NAVkJ.js";import"./index-BvZAQ-SQ.js";
1
+ export{n as getSharedHighlighter}from"./dist-BJ6NAVkJ.js";import"./index-CgH9Bup7.js";
@@ -0,0 +1 @@
1
+ import{t as e}from"./jsx-runtime-D3jfb0Ew.js";import{t}from"./zoomable-image-8K4_Vqt3.js";import{n,t as r}from"./preview-dialog-CPvYDNeU.js";var i=e();function a(e){return(0,i.jsxs)(r,{open:!0,onClose:e.onClose,children:[(0,i.jsx)(n,{title:e.name}),(0,i.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,i.jsx)(t,{src:e.src,alt:e.alt})})]})}export{a as ImageViewer};