1import{$ as e,Jn as t,Q as n,Yn as r,b as i,cr as a,nt as o,wt as s,yt as c}from"./modulepreload-polyfill-B-nb0kqi.js";var l=a(r(),1),u=a(c(),1);function d(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function f(e,t){typeof e==`function`?e(t):e!=null&&(e.current=t)}function p(...e){return t=>e.forEach(e=>f(e,t))}function m(...e){return l.useCallback(p(...e),e)}var h=t();function g(e,t=[]){let n=[];function r(t,r){let i=l.createContext(r),a=n.length;n=[...n,r];function o(t){let{scope:n,children:r,...o}=t,s=n?.[e][a]||i,c=l.useMemo(()=>o,Object.values(o));return(0,h.jsx)(s.Provider,{value:c,children:r})}function s(n,o){let s=o?.[e][a]||i,c=l.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return o.displayName=t+`Provider`,[o,s]}let i=()=>{let t=n.map(e=>l.createContext(e));return function(n){let r=n?.[e]||t;return l.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,_(i,...t)]}function _(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var v=l.forwardRef((e,t)=>{let{children:n,...r}=e,i=l.Children.toArray(n),a=i.find(x);if(a){let e=a.props.children,n=i.map(t=>t===a?l.Children.count(e)>1?l.Children.only(null):l.isValidElement(e)?e.props.children:null:t);return(0,h.jsx)(y,{...r,ref:t,children:l.isValidElement(e)?l.cloneElement(e,void 0,n):null})}return(0,h.jsx)(y,{...r,ref:t,children:n})});v.displayName=`Slot`;var y=l.forwardRef((e,t)=>{let{children:n,...r}=e;if(l.isValidElement(n)){let e=C(n);return l.cloneElement(n,{...S(r,n.props),ref:t?p(t,e):e})}return l.Children.count(n)>1?l.Children.only(null):null});y.displayName=`SlotClone`;var b=({children:e})=>(0,h.jsx)(h.Fragment,{children:e});function x(e){return l.isValidElement(e)&&e.type===b}function S(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)=>{a(...e),i(...e)}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function C(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)}function w(e){let t=e+`CollectionProvider`,[n,r]=g(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=l.useRef(null),a=l.useRef(new Map).current;return(0,h.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=l.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=m(t,a(s,n).collectionRef);return(0,h.jsx)(v,{ref:i,children:r})});c.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=l.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=l.useRef(null),s=m(t,o),c=a(u,n);return l.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,h.jsx)(v,{[d]:``,ref:s,children:r})});f.displayName=u;function p(t){let n=a(e+`CollectionConsumer`,t);return l.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:c,ItemSlot:f},p,r]}function T(e,t=[]){let n=[];function r(t,r){let i=l.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=l.useMemo(()=>o,Object.values(o));return(0,h.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=l.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>l.createContext(e));return function(n){let r=n?.[e]||t;return l.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,E(i,...t)]}function E(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var D=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`span`,`svg`,`ul`].reduce((e,t)=>
vendor: 4,480 bytes, line 1
1{let n=l.forwardRef((e,n)=>{let{asChild:r,...i}=e,a=r?v:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,h.jsx)(a,{...i,ref:n})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function O(e,t){e&&u.flushSync(()=>e.dispatchEvent(t))}function k(e){let t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...e)=>t.current?.(...e),[])}function A(e,t=globalThis?.document){let n=k(e);l.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var j=`DismissableLayer`,M=`dismissableLayer.update`,N=`dismissableLayer.pointerDownOutside`,P=`dismissableLayer.focusOutside`,F,I=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ee=l.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,u=l.useContext(I),[f,p]=l.useState(null),g=f?.ownerDocument??globalThis?.document,[,_]=l.useState({}),v=m(t,e=>p(e)),y=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=y.indexOf(b),S=f?y.indexOf(f):-1,C=u.layersWithOutsidePointerEventsDisabled.size>0,w=S>=x,T=re(e=>{let t=e.target,n=[...u.branches].some(e=>e.contains(t));w&&!n&&(i?.(e),o?.(e),e.defaultPrevented||s?.())},g),E=ie(e=>{let t=e.target;[...u.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},g);return A(e=>{S===u.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},g),l.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(F=g.body.style.pointerEvents,g.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),ae(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=F)}},[f,g,n,u]),l.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),ae())},[f,u]),l.useEffect(()=>{let e=()=>_({});return document.addEventListener(M,e),()=>document.removeEventListener(M,e)},[]),(0,h.jsx)(D.div,{...c,ref:v,style:{pointerEvents:C?w?`auto`:`none`:void 0,...e.style},onFocusCapture:d(e.onFocusCapture,E.onFocusCapture),onBlurCapture:d(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:d(e.onPointerDownCapture,T.onPointerDownCapture)})});ee.displayName=j;var te=`DismissableLayerBranch`,ne=l.forwardRef((e,t)=>{let n=l.useContext(I),r=l.useRef(null),i=m(t,r);return l.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,h.jsx)(D.div,{...e,ref:i})});ne.displayName=te;function re(e,t=globalThis?.document){let n=k(e),r=l.useRef(!1),i=l.useRef(()=>{});return l.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){oe(N,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function ie(e,t=globalThis?.document){let n=k(e),r=l.useRef(!1);return l.useEffect(()=>{let e=e=>{e.target&&!r.current&&oe(P,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ae(){let e=new CustomEvent(M);document.dispatchEvent(e)}function oe(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?O(i,a):i.dispatchEvent(a)}var se=ee,ce=ne,L=globalThis?.document?l.useLayoutEffect:()=>{},le=`Portal`,ue=l.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=l.useState(!1);L(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?u.createPortal((0,h.jsx)(D.div,{...r,ref:t}),o):null});ue.displayName=le;function de(e,t){return l.useReducer((e,n)=>t[e][n]??e,e)}var fe=e=>{let{present:t,children:n}=e,r=pe(t),i=typeof n==`function`?n({present:r.isPresent}):l.Children.only(n),a=m(r.ref,me(i));return typeof n==`function`||r.isPresent?l.cloneElement(i,{ref:a}):null};fe.displayName=`Presence`;function pe(e){let[t,n]=l.useState(),r=l.useRef({}
1),i=l.useRef(e),a=l.useRef(`none`),[o,s]=de(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return l.useEffect(()=>{let e=R(r.current);a.current=o===`mounted`?e:`none`},[o]),L(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=R(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),L(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=R(r.current).includes(a.animationName);if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=R(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:l.useCallback(e=>{e&&(r.current=getComputedStyle(e)),n(e)},[])}}function R(e){return e?.animationName||`none`}function me(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)}function he({prop:e,defaultProp:t,onChange:n=()=>{}}){let[r,i]=ge({defaultProp:t,onChange:n}),a=e!==void 0,o=a?e:r,s=k(n);return[o,l.useCallback(t=>{if(a){let n=typeof t==`function`?t(e):t;n!==e&&s(n)}else i(t)},[a,e,i,s])]}function ge({defaultProp:e,onChange:t}){let n=l.useState(e),[r]=n,i=l.useRef(r),a=k(t);return l.useEffect(()=>{i.current!==r&&(a(r),i.current=r)},[r,i,a]),n}var _e=`VisuallyHidden`,z=l.forwardRef((e,t)=>(0,h.jsx)(D.span,{...e,ref:t,style:{position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`,...e.style}}));z.displayName=_e;var B=`ToastProvider`,[V,ve,ye]=w(`Toast`),[be,xe]=T(`Toast`,[ye]),[Se,H]=be(B),Ce=e=>{let{__scopeToast:t,label:n=`Notification`,duration:r=5e3,swipeDirection:i=`right`,swipeThreshold:a=50,children:o}=e,[s,c]=l.useState(null),[u,d]=l.useState(0),f=l.useRef(!1),p=l.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${B}\`. Expected non-empty \`string\`.`),(0,h.jsx)(V.Provider,{scope:t,children:(0,h.jsx)(Se,{scope:t,label:n,duration:r,swipeDirection:i,swipeThreshold:a,toastCount:u,viewport:s,onViewportChange:c,onToastAdd:l.useCallback(()=>d(e=>e+1),[]),onToastRemove:l.useCallback(()=>d(e=>e-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:p,children:o})})};Ce.displayName=B;var we=`ToastViewport`,Te=[`F8`],U=`toast.viewportPause`,W=`toast.viewportResume`,Ee=l.forwardRef((e,t)=>{let{__scopeToast:n,hotkey:r=Te,label:i=`Notifications ({hotkey})`,...a}=e,o=H(we,n),s=ve(n),c=l.useRef(null),u=l.useRef(null),d=l.useRef(null),f=l.useRef(null),p=m(t,f,o.onViewportChange),g=r.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),_=o.toastCount>0;l.useEffect(()=>{let e=e=>{r.length!==0&&r.every(t=>e[t]||e.code===t)&&f.current?.focus()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[r]),l.useEffect(()=>{let e=c.current,t=f.current;if(_&&e&&t){let n=()=>{if(!o.isClosePausedRef.current){let e=new CustomEvent(U);t.dispatchEvent(e),o.isClosePausedRef.current=!0}},r=()=>{if(o.isClosePausedRef.current){let e=new CustomEvent(W);t.dispatchEvent(e),o.isClosePausedRef.current=!1}},i=t=>{e.contains(t.relatedTarget)||r()},a=()=>{e.contains(document.activeElement)||r()};return e.addEventListener(`focusin`,n),e.addEventListener(`focusout`,i),e.addEventListener(`pointermove`,n),e.addEventListener(`pointerleave`,a),window.addEventListener(`blur`,n),window.addEventListener(`focus`,r),()=>{e.removeEventListener(`focusin`,n),e.removeEventListener(`focusout`,i),e.removeEventListener(`pointermove`,n),e.removeEventListener(`pointerleave`,a),window.removeEventListener(`blur`,n),window.removeEventListener(`focus`,r)}}},[_,o.isClosePausedRef]);let v=l.useCallback(({tabbingDirection:e})=>{let t=s().map(t=>{let n=t.ref.current,r=[n,...Ye(n)];return e===`forwards`?r:r.reverse()});return(e===`forwards`?t.reverse():t).flat()},[s]);return l.useEffect(()=>{let e=f.current;if(e){let t=t=>{let n=t.altKey||t.ctrlKey||t.metaKey;if(t.key===`Tab`&&!n){let n=document.activeElement,r=t.shiftKey;if(t.target===e&&r){u.current?.focus();return}let i=v({tabbingDirection:r?`backwards`:`forwards`}),a=i.findIndex(e=>e===n);Y(i.slice(a+1))?t.preventDefault():r?u.current?.focus():d.current?.focus()}};
vendor: 9,038 bytes, line 1
1return e.addEventListener(`keydown`,t),()=>e.removeEventListener(`keydown`,t)}},[s,v]),(0,h.jsxs)(ce,{ref:c,role:`region`,"aria-label":i.replace(`{hotkey}`,g),tabIndex:-1,style:{pointerEvents:_?void 0:`none`},children:[_&&(0,h.jsx)(G,{ref:u,onFocusFromOutsideViewport:()=>{Y(v({tabbingDirection:`forwards`}))}}),(0,h.jsx)(V.Slot,{scope:n,children:(0,h.jsx)(D.ol,{tabIndex:-1,...a,ref:p})}),_&&(0,h.jsx)(G,{ref:d,onFocusFromOutsideViewport:()=>{Y(v({tabbingDirection:`backwards`}))}})]})});Ee.displayName=we;var De=`ToastFocusProxy`,G=l.forwardRef((e,t)=>{let{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=e,a=H(De,n);return(0,h.jsx)(z,{"aria-hidden":!0,tabIndex:0,...i,ref:t,style:{position:`fixed`},onFocus:e=>{let t=e.relatedTarget;a.viewport?.contains(t)||r()}})});G.displayName=De;var K=`Toast`,Oe=`toast.swipeStart`,ke=`toast.swipeMove`,Ae=`toast.swipeCancel`,je=`toast.swipeEnd`,Me=l.forwardRef((e,t)=>{let{forceMount:n,open:r,defaultOpen:i,onOpenChange:a,...o}=e,[s=!0,c]=he({prop:r,defaultProp:i,onChange:a});return(0,h.jsx)(fe,{present:n||s,children:(0,h.jsx)(Fe,{open:s,...o,ref:t,onClose:()=>c(!1),onPause:k(e.onPause),onResume:k(e.onResume),onSwipeStart:d(e.onSwipeStart,e=>{e.currentTarget.setAttribute(`data-swipe`,`start`)}),onSwipeMove:d(e.onSwipeMove,e=>{let{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute(`data-swipe`,`move`),e.currentTarget.style.setProperty(`--radix-toast-swipe-move-x`,`${t}px`),e.currentTarget.style.setProperty(`--radix-toast-swipe-move-y`,`${n}px`)}),onSwipeCancel:d(e.onSwipeCancel,e=>{e.currentTarget.setAttribute(`data-swipe`,`cancel`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-y`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-end-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-end-y`)}),onSwipeEnd:d(e.onSwipeEnd,e=>{let{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute(`data-swipe`,`end`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-y`),e.currentTarget.style.setProperty(`--radix-toast-swipe-end-x`,`${t}px`),e.currentTarget.style.setProperty(`--radix-toast-swipe-end-y`,`${n}px`),c(!1)})})})});Me.displayName=K;var[Ne,Pe]=be(K,{onClose(){}}),Fe=l.forwardRef((e,t)=>{let{__scopeToast:n,type:r=`foreground`,duration:i,open:a,onClose:o,onEscapeKeyDown:s,onPause:c,onResume:f,onSwipeStart:p,onSwipeMove:g,onSwipeCancel:_,onSwipeEnd:v,...y}=e,b=H(K,n),[x,S]=l.useState(null),C=m(t,e=>S(e)),w=l.useRef(null),T=l.useRef(null),E=i||b.duration,O=l.useRef(0),A=l.useRef(E),j=l.useRef(0),{onToastAdd:M,onToastRemove:N}=b,P=k(()=>{x?.contains(document.activeElement)&&b.viewport?.focus(),o()}),F=l.useCallback(e=>{e&&e!==1/0&&(window.clearTimeout(j.current),O.current=new Date().getTime(),j.current=window.setTimeout(P,e))},[P]);l.useEffect(()=>{let e=b.viewport;if(e){let t=()=>{F(A.current),f?.()},n=()=>{let e=new Date().getTime()-O.current;A.current-=e,window.clearTimeout(j.current),c?.()};return e.addEventListener(U,n),e.addEventListener(W,t),()=>{e.removeEventListener(U,n),e.removeEventListener(W,t)}}},[b.viewport,E,c,f,F]),l.useEffect(()=>{a&&!b.isClosePausedRef.current&&F(E)},[a,E,b.isClosePausedRef,F]),l.useEffect(()=>(M(),()=>N()),[M,N]);let I=l.useMemo(()=>x?Ge(x):null,[x]);return b.viewport?(0,h.jsxs)(h.Fragment,{children:[I&&(0,h.jsx)(Ie,{__scopeToast:n,role:`status`,"aria-live":r===`foreground`?`assertive`:`polite`,"aria-atomic":!0,children:I}),(0,h.jsx)(Ne,{scope:n,onClose:P,children:u.createPortal((0,h.jsx)(V.ItemSlot,{scope:n,children:(0,h.jsx)(se,{asChild:!0,onEscapeKeyDown:d(s,()=>{b.isFocusedToastEscapeKeyDownRef.current||P(),b.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,h.jsx)(D.li,{role:`status`,"aria-live":`off`,"aria-atomic":!0,tabIndex:0,"data-state":a?`open`:`closed`,"data-swipe-direction":b.swipeDirection,...y,ref:C,style:{userSelect:`none`,touchAction:`none`,...e.style},onKeyDown:d(e.onKeyDown,e=>{e.key===`Escape`&&(s?.(e.nativeEvent),e.nativeEvent.defaultPrevented||(b.isFocusedToastEscapeKeyDownRef.current=!0,P()))}),onPointerDown:d(e.onPointerDown,e=>{e.button===0&&(w.current={x:e.clientX,y:e.clientY})}),onPointerMove:d(e.onPointerMove,e=>{if(!w.current)return;let t=e.clientX-w.current.x,n=e.clientY-w.current.y,r=!!T.current,i=[`left`,`right`].includes(b.swipeDirection),a=[`left`,`up`].includes(b.swipeDirection)?Math.min:Math.max,o=i?a(0,t):0,s=i?0:a(0,n),c=e.pointerType===`touch`?10:2,l={x:o,y:s},u={originalEvent:e,delta:l};r?(T.current=l,J(ke,g,u,{discrete:!1})):Ke(l,b.swipeDirection,c)?(T.current=l,J(Oe,p,u,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>c||Math.abs(n)>c)&&(w.current=null)}),onPointerUp:d(e.onPointerUp,e=>{let t=T.current,n=e.target;if(n.hasPointerCapture(e.pointerId)&&n.releasePointerCapture(e.pointerId),T.current=null,w.current=null,t){let n=e.currentTarget,r={originalEvent:e,delta:t};Ke(t,b.swipeDirection,b.swipeThreshold)?J(je,v,r,{discrete:!0}):J(Ae,_,r,{discrete:!0}),n.addEventListener(`click`,e=>e.preventDefault(),{once:!0})}})})})}),b.viewport)})]}):null}),Ie=e=>{let{__scopeToast:t,children:n,...r}=e,i=H(K,t),[a,o]=l.useState(!1),[s,c]=l.useState(!1);return qe(()=>o(!0)),l.useEffect(()=>{let e=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(e)},[]),s?null:(0,h.jsx)(ue,{asChild:!0,children:(0,h.jsx)(z,{...r,children:a&&(0,h.jsxs)(h.Fragment,{children:[i.label,` `,n]})})})},Le=`ToastTitle`,Re=l.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e;return(0,h.jsx)(D.div,{...r,ref:t})});Re.displayName=Le;var ze=`ToastDescription`,Be=l.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e;return(0,h.jsx)(D.div,{...r,ref:t})});Be.displayName=ze;var Ve=`ToastAction`,He=l.forwardRef((e,t)=>{let{altText:n,...r}=e;return n.trim()?(0,h.jsx)(We,{altText:n,asChild:!0,children:(0,h.jsx)(q,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Ve}\`. Expected non-empty \`string\`.`),null)});He.displayName=Ve;var Ue=`ToastClose`,q=l.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e,i=Pe(Ue,n);return(0,h.jsx)(We,{asChild:!0,children:(0,h.jsx)(D.button,{type:`button`,...r,ref:t,onClick:d(e.onClick,i.onClose)})})});q.displayName=Ue;var We=l.forwardRef((e,t)=>{let{__scopeToast:n,altText:r,...i}=e;return(0,h.jsx)(D.div,{"data-radix-toast-announce-exclude":``,"data-radix-toast-announce-alt":r||void 0,...i,ref:t})});function Ge(e){let t=[];return Array.from(e.childNodes).forEach(e=>{if(e.nodeType===e.TEXT_NODE&&e.textContent&&t.push(e.textContent),Je(e)){let n=e.ariaHidden||e.hidden||e.style.display===`none`,r=e.dataset.radixToastAnnounceExclude===``;if(!n){if(r){let n=e.dataset.radixToastAnnounceAlt;n&&t.push(n)}else t.push(...Ge(e))}}}),t}function J(e,t,n,{discrete:r}){let i=n.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?O(i,a):i.dispatchEvent(a)}var Ke=(e,t,n=0)=>{let r=Math.abs(e.x),i=Math.abs(e.y),a=r>i;return t===`left`||t===`right`?a&&r>n:!a&&i>n};function qe(e=()=>{}){let t=k(e);L(()=>{let e=0,n=0;return e=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(n)}},[t])}function Je(e){return e.nodeType===e.ELEMENT_NODE}function Ye(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode: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}});for(;n.nextNode();)t.push(n.currentNode);return t}function Y(e){let t=document.activeElement;return e.some(e=>e===t||(e.focus(),document.activeElement!==t))}var Xe=Ce,Ze=Ee,Qe=Me,$e=Re,et=Be,tt=q,nt=a(o()),rt=(0,l.forwardRef)(({title:e,titleId:t,...n},r)=>(0,h.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 512 512`,className:`rwg-icon`,ref:r,"aria-labelledby":t,...n,children:[e?(0,h.jsx)(`title`,{id:t,children:e}):null,(0,h.jsx)(`path`,{fill:`currentColor`,d:`M432 256a176 176 0 1 0-352.1.1A176 176 0 0 0 432 256m32 0a208 208 0 1 1-416.1-.1 208 208 0 0 1 416.1.1`}),(0,h.jsx)(`path`,{fill:`currentColor`,d:`M339.7 165.7a16 16 0 1 1 24.6 20.6l-134.4 160a16 16 0 0 1-24.2.4l-57.6-64a16 16 0 0 1 23.8-21.4l45.3 50.3z`})]})),it=s(rt),at=(0,l.forwardRef)(({title:e,titleId:t,...n},r)=>(0,h.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 512 512`,className:`rwg-icon`,ref:r,"aria-labelledby":t,...n,children:[e?(0,h.jsx)(`title`,{id:t,children:e}):null,(0,h.jsx)(`path`,{fill:`currentColor`,d:`M449 399 278.7 82.7a32 32 0 0 0-56.3 0L51.9 399A32 32 0 0 0 80 446.2h340.9a32 32 0 0 0 28.2-47.1m-198.5-1.7a20 20 0 1 1 0-40 20 20 0 0 1 0 40M272.2 196l-5.7 122a16 16 0 0 1-32 0l-5.8-122a21.7 21.7 0 0 1 21.5-22.6h.2a21.7 21.7 0 0 1 21.7 22.7z`})]})),X=s(at),Z={viewport:`_viewport_1ntf2_7`,root:`_root_1ntf2_23`,slideIn:`_slideIn_1ntf2_1`,hide:`_hide_1ntf2_1`,swipeOut:`_swipeOut_1ntf2_1`,icon:`_icon_1ntf2_51`,iconInfo:`_iconInfo_1ntf2_58`,
1iconSuccess:`_iconSuccess_1ntf2_62`,iconWarning:`_iconWarning_1ntf2_66`,iconError:`_iconError_1ntf2_74`,content:`_content_1ntf2_82`,title:`_title_1ntf2_90`,description:`_description_1ntf2_98`,closeButton:`_closeButton_1ntf2_105`},Q=(0,l.createContext)({}),ot={info:i,success:it,warning:X,error:X},st=t=>{let{clearToast:n}=(0,l.useContext)(Q),r=t.kind??`info`,i=t.showCloseButton!==!1,a=ot[r],o=t.showIcon!==!1&&a!==null,s=(0,l.useCallback)(e=>{e||n(t.timestamp)},[n,t.timestamp]);return(0,h.jsxs)(Qe,{open:!0,onOpenChange:s,duration:3e3,className:Z.root,children:[o&&(0,h.jsx)(`span`,{className:(0,nt.default)(Z.icon,r===`info`&&Z.iconInfo,r===`success`&&Z.iconSuccess,r===`warning`&&Z.iconWarning,r===`error`&&Z.iconError),children:(0,h.jsx)(a,{size:r===`info`||r===`success`?48:24})}),(0,h.jsxs)(`div`,{className:Z.content,children:[(0,h.jsx)($e,{className:Z.title,children:t.title}),t.description&&(0,h.jsx)(et,{className:Z.description,children:t.description})]}),i&&(0,h.jsx)(tt,{className:Z.closeButton,"aria-label":`Dismiss notification`,type:`button`,children:(0,h.jsx)(e,{size:24})})]})},ct=({children:e})=>{let[t,n]=(0,l.useState)(()=>new Map),r=(0,l.useCallback)(e=>{n(t=>{let n=Date.now();return new Map(t).set(n,{...e,timestamp:n})})},[]),i=(0,l.useCallback)(e=>{n(t=>{let n=new Map(t);return n.delete(e),n})},[]);return(0,h.jsxs)(Q.Provider,{value:{messages:t,createToast:r,clearToast:i},children:[e,(0,h.jsxs)(Xe,{swipeDirection:`up`,children:[Array.from(t.values()).map(e=>(0,h.jsx)(st,{...e},e.timestamp)),(0,h.jsx)(Ze,{className:Z.viewport})]})]})},$={formFeedback:`_formFeedback_1q7fi_7`,helper:`_helper_1q7fi_17`,success:`_success_1q7fi_21`,error:`_error_1q7fi_25`,contents:`_contents_1q7fi_36`},lt=n(({type:e,headline:t,className:n,children:r},i)=>(0,h.jsxs)(`div`,{ref:i,className:(0,nt.default)($.formFeedback,e===`helper`&&$.helper,e===`success`&&$.success,e===`error`&&$.error,n),children:[!!t&&(0,h.jsx)(`h3`,{children:t}),(0,h.jsx)(`div`,{className:$.contents,children:r})]}));export{Z as a,Xe as c,ct as i,Ze as l,st as n,X as o,Q as r,it as s,lt 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.