vendor: 12,256 bytes, lines 1-9
1import{r as Ee,g as ye,a as Be}from"./react-vendor-BtP0CW_r.js";function Ke(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const o in n)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(n,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>n[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var G={exports:{}},U={};/** 2 * @license React 3 * react-jsx-runtime.production.min.js 4 * 5 * Copyright (c) Facebook, Inc. and its affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var le;function $e(){if(le)return U;le=1;var e=Ee(),t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function u(c,l,a){var d,m={},y=null,x=null;a!==void 0&&(y=""+a),l.key!==void 0&&(y=""+l.key),l.ref!==void 0&&(x=l.ref);for(d in l)n.call(l,d)&&!i.hasOwnProperty(d)&&(m[d]=l[d]);if(c&&c.defaultProps)for(d in l=c.defaultProps,l)m[d]===void 0&&(m[d]=l[d]);return{$$typeof:t,type:c,key:y,ref:x,props:m,_owner:o.current}}return U.Fragment=r,U.jsx=u,U.jsxs=u,U}var de;function qe(){return de||(de=1,G.exports=$e()),G.exports}var v=qe(),s=Ee();const L=ye(s),Mt=Ke({__proto__:null,default:L},[s]);var oe=Be();const He=ye(oe);function S(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function fe(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function we(...e){return t=>{let r=!1;const n=e.map(o=>{const i=fe(o,t);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let o=0;o<n.length;o++){const i=n[o];typeof i=="function"?i():fe(e[o],null)}}}}function j(...e){return s.useCallback(we(...e),e)}function Te(e,t=[]){let r=[];function n(i,u){const c=s.createContext(u),l=r.length;r=[...r,u];const a=m=>{var P;const{scope:y,children:x,...b}=m,p=((P=y==null?void 0:y[e])==null?void 0:P[l])||c,f=s.useMemo(()=>b,Object.values(b));return v.jsx(p.Provider,{value:f,children:x})};a.displayName=i+"Provider";function d(m,y){var p;const x=((p=y==null?void 0:y[e])==null?void 0:p[l])||c,b=s.useContext(x);if(b)return b;if(u!==void 0)return u;throw new Error(`\`${m}\` must be used within \`${i}\``)}return[a,d]}const o=()=>{const i=r.map(u=>s.createContext(u));return function(c){const l=(c==null?void 0:c[e])||i;return s.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return o.scopeName=e,[n,Xe(o,...t)]}function Xe(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const u=n.reduce((c,{useScope:l,scopeName:a})=>{const m=l(i)[`__scope${a}`];return{...c,...m}},{});return s.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return r.scopeName=t.scopeName,r}function X(e){const t=Ye(e),r=s.forwardRef((n,o)=>{const{children:i,...u}=n,c=s.Children.toArray(i),l=c.find(Je);if(l){const a=l.props.children,d=c.map(m=>m===l?s.Children.count(a)>1?s.Children.only(null):s.isValidElement(a)?a.props.children:null:m);return v.jsx(t,{...u,ref:o,children:s.isValidElement(a)?s.cloneElement(a,void 0,d):null})}return v.jsx(t,{...u,ref:o,children:i})});return r.displayName=`${e}.Slot`,r}var Ft=X("Slot");function Ye(e){const t=s.forwardRef((r,n)=>{const{children:o,...i}=r;if(s.isValidElement(o)){const u=Ge(o),c=Ze(i,o.props);return o.type!==s.Fragment&&(c.ref=n?we(n,u):u),s.cloneElement(o,c)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ze=Symbol("radix.slottable");function Je(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ze}function Ze(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...c)=>{i(...c),o(...c)}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}function Ge(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function Qe(e){const t=e+"CollectionProvider",[r,n]=Te(t),[o,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),u=p=>{const{scope:f,children:P}=p,w=L.useRef(null),T=L.useRef(new Map).current;return v.jsx(o,{scope:f,itemMap:T,collectionRef:w,children:P})};u.displayName=t;const c=e+"CollectionSlot",l=X(c),a=L.forwardRef((p,f)=>{const{scope:P,children:w}=p,T=i(c,P),C=j(f,T.collectionRef);return v.jsx(l,{ref:C,children:w})});a.displayName=c;const d=e+"CollectionItemSlot",m="data-radix-collection-item",y=X(d),x=L.forwardRef((p,f)=>{const{scope:P,children:w,...T}=p,C=L.useRef(null),g=j(f,C),R=i(d,P);return L.useEffect(()=>(R.itemMap.set(C,{ref:C,...T}),()=>void R.itemMap.delete(C))),v.jsx(y,{[m]:"",ref:g,children:w})});x.displayName=d;function b(p){const f=i(e+"CollectionConsumer",p);return L.useCallback(()=>{const w=f.collectionRef.current;if(!w)return[];const T=Array.from(w.querySelectorAll(`[${m}]`));return Array.from(f.itemMap.values()).sort((R,h)=>T.indexOf(R.ref.current)-T.indexOf(h.ref.current))},[f.collectionRef,f.itemMap])}return[{Provider:u,Slot:a,ItemSlot:x},b,n]}var et=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],O=et.reduce((e,t)=>{const r=X(`Primitive.${t}`),n=s.forwardRef((o,i)=>{const{asChild:u,...c}=o,l=u?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(l,{...c,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function he(e,t){e&&oe.flushSync(()=>e.dispatchEvent(t))}function I(e){const t=s.useRef(e);return s.useEffect(()=>{t.current=e}),s.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function tt(e,t=globalThis==null?void 0:globalThis.document){const r=I(e);s.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var nt="DismissableLayer",ee="dismissableLayer.update",rt="dismissableLayer.pointerDownOutside",ot="dismissableLayer.focusOutside",pe,xe=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ce=s.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:u,onDismiss:c,...l}=e,a=s.useContext(xe),[d,m]=s.useState(null),y=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,x]=s.useState({}),b=j(t,h=>m(h)),p=Array.from(a.layers),[f]=[...a.layersWithOutsidePointerEventsDisabled].slice(-1),P=p.indexOf(f),w=d?p.indexOf(d):-1,T=a.layersWithOutsidePointerEventsDisabled.size>0,C=w>=P,g=it(h=>{const _=h.target,A=[...a.branches].some(M=>M.contains(_));!C||A||(o==null||o(h),u==null||u(h),h.defaultPrevented||c==null||c())},y),R=at(h=>{const _=h.target;[...a.branches].some(M=>M.contains(_))||(i==null||i(h),u==null||u(h),h.defaultPrevented||c==null||c())},y);return tt(h=>{w===a.layers.size-1&&(n==null||n(h),!h.defaultPrevented&&c&&(h.preventDefault(),c()))},y),s.useEffect(()=>{if(d)return r&&(a.layersWithOutsidePointerEventsDisabled.size===0&&(pe=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),a.layersWithOutsidePointerEventsDisabled.add(d)),a.layers.add(d),me(),()=>{r&&a.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=pe)}},[d,y,r,a]),s.useEffect(()=>()=>{d&&(a.layers.delete(d),a.layersWithOutsidePointerEventsDisabled.delete(d),me())},[d,a]),s.useEffect(()=>{const h=()=>x({});return document.addEventListener(ee,h),()=>document.removeEventListener(ee,h)},[]),v.jsx(O.div,{...l,ref:b,style:{pointerEvents:T?C?"auto":"none":void 0,...e.style},onFocusCapture:S(e.onFocusCapture,R.onFocusCapture),onBlurCapture:S(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:S(e.onPointerDownCapture,g.onPointerDownCapture)})});Ce.displayName=nt;var st="DismissableLayerBranch",Pe=s.forwardRef((e,t)=>{const r=s.useContext(xe),n=s.useRef(null),o=j(t,n);return s.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),v.jsx(O.div,{...e,ref:o})});Pe.displayName=st;function it(e,t=globalThis==null?void 0:globalThis.document){const r=I(e),n=s.useRef(!1),o=s.useRef(()=>{});return s.useEffect(()=>{const i=c=>{if(c.target&&!n.current){let l=function(){Re(rt,r,a,{discrete:!0})};const a={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);n.current=!1},u=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function at(e,t=globalThis==null?void 0:globalThis.document){const r=I(e),n=s.useRef(!1);return s.useEffect(()=>{const o=i=>{i.target&&!n.current&&Re(ot,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function me(){const e=new CustomEvent(ee);document.dispatchEvent(e)}function Re(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?he(o,i):o.dispatchEvent(i)}var ct=Ce,ut=Pe,Y=globalThis!=null&&globalThis.document?s.useLayoutEffect:()=>{},lt="Portal",be=s.forwardRef((e,t)=>{var c;const{container:r,...n}=e,[o,i]=s.useState(!1);Y(()=>i(!0),[]);const u=r||o&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return u?He.createPortal(v.jsx(O.div,{...n,ref:t}),u):null});be.displayName=lt;function dt(e,t){return s.useReducer((r,n)=>t[r][n]??r,e)}var ge=e=>{const{present:t,children:r}=e,n=ft(t),o=typeof r=="function"?r({present:n.isPresent}):s.Children.only(r),i=j(n.ref,pt(o));return typeof r=="function"||n.isPresent?s.cloneElement(o,{ref:i}):null};ge.displayName="Presence";function ft(e){const[t,r]=s.useState(),n=s.useRef({}),o=s.useRef(e),i=s.useRef("none"),u=e?"mounted":"unmounted",[c,l]=dt(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect(()=>{const a=q(n.current);i.current=c==="mounted"?a:"none"},[c]),Y(()=>{const a=n.current,d=o.current;if(d!==e){const y=i.current,x=q(a);e?l("MOUNT"):x==="none"||(a==null?void 0:a.display)==="none"?l("UNMOUNT"):l(d&&y!==x?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Y(()=>{if(t){let a;const d=t.ownerDocument.defaultView??window,m=x=>{const p=q(n.current).includes(x.animationName);if(x.target===t&&p&&(l("ANIMATION_END"),!o.current)){const f=t.style.animationFillMode;t.style.animationFillMode="forwards",a=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=f)})}},y=x=>{x.target===t&&(i.current=q(n.current))};return t.addEventListener("animationstart",y),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{d.clearTimeout(a),t.removeEventListener("animationstart",y),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:s.useCallback(a=>{a&&(n.current=getComputedStyle(a)),r(a)},[])}}function q(e){return(e==null?void 0:e.animationName)||"none"}function pt(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function mt({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,o]=vt({defaultProp:t,onChange:r}),i=e!==void 0,u=i?e:n,c=I(r),l=s.useCallback(a=>
9{if(i){const m=typeof a=="function"?a(e):a;m!==e&&c(m)}else o(a)},[i,e,o,c]);return[u,l]}function vt({defaultProp:e,onChange:t}){const r=s.useState(e),[n]=r,o=s.useRef(n),i=I(t);return s.useEffect(()=>{o.current!==n&&(i(n),o.current=n)},[n,o,i]),r}var Et="VisuallyHidden",se=s.forwardRef((e,t)=>v.jsx(O.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}}));se.displayName=Et;var ie="ToastProvider",[ae,yt,wt]=Qe("Toast"),[Se,jt]=Te("Toast",[wt]),[Tt,z]=Se(ie),Ne=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:u}=e,[c,l]=s.useState(null),[a,d]=s.useState(0),m=s.useRef(!1),y=s.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${ie}\`. Expected non-empty \`string\`.`),v.jsx(ae.Provider,{scope:t,children:v.jsx(Tt,{scope:t,label:r,duration:n,swipeDirection:o,swipeThreshold:i,toastCount:a,viewport:c,onViewportChange:l,onToastAdd:s.useCallback(()=>d(x=>x+1),[]),onToastRemove:s.useCallback(()=>d(x=>x-1),[]),isFocusedToastEscapeKeyDownRef:m,isClosePausedRef:y,children:u})})};Ne.displayName=ie;var _e="ToastViewport",ht=["F8"],te="toast.viewportPause",ne="toast.viewportResume",Oe=s.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=ht,label:o="Notifications ({hotkey})",...i}=e,u=z(_e,r),c=yt(r),l=s.useRef(null),a=s.useRef(null),d=s.useRef(null),m=s.useRef(null),y=j(t,m,u.onViewportChange),x=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),b=u.toastCount>0;s.useEffect(()=>{const f=P=>{var T;n.length!==0&&n.every(C=>P[C]||P.code===C)&&((T=m.current)==null||T.focus())};return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[n]),s.useEffect(()=>{const f=l.current,P=m.current;if(b&&f&&P){const w=()=>{if(!u.isClosePausedRef.current){const R=new CustomEvent(te);P.dispatchEvent(R),u.isClosePausedRef.current=!0}},T=()=>{if(u.isClosePausedRef.current){const R=new CustomEvent(ne);P.dispatchEvent(R),u.isClosePausedRef.current=!1}},C=R=>{!f.contains(R.relatedTarget)&&T()},g=()=>{f.contains(document.activeElement)||T()};return f.addEventListener("focusin",w),f.addEventListener("focusout",C),f.addEventListener("pointermove",w),f.addEventListener("pointerleave",g),window.addEventListener("blur",w),window.addEventListener("focus",T),()=>{f.removeEventListener("focusin",w),f.removeEventListener("focusout",C),f.removeEventListener("pointermove",w),f.removeEventListener("pointerleave",g),window.removeEventListener("blur",w),window.removeEventListener("focus",T)}}},[b,u.isClosePausedRef]);const p=s.useCallback(({tabbingDirection:f})=>{const w=c().map(T=>{const C=T.ref.current,g=[C,...Dt(C)];return f==="forwards"?g:g.reverse()});return(f==="forwards"?w.reverse():w).flat()},[c]);return s.useEffect(()=>{const f=m.current;if(f){const P=w=>{var g,R,h;const T=w.altKey||w.ctrlKey||w.metaKey;if(w.key==="Tab"&&!T){const _=document.activeElement,A=w.shiftKey;if(w.target===f&&A){(g=a.current)==null||g.focus();return}const F=p({tabbingDirection:A?"backwards":"forwards"}),B=F.findIndex(E=>E===_);Q(F.slice(B+1))?w.preventDefault():A?(R=a.current)==null||R.focus():(h=d.current)==null||h.focus()}};return f.addEventListener("keydown",P),()=>f.removeEventListener("keydown",P)}},[c,p]),v.jsxs(ut,{ref:l,role:"region","aria-label":o.replace("{hotkey}",x),tabIndex:-1,style:{pointerEvents:b?void 0:"none"},children:[b&&v.jsx(re,{ref:a,onFocusFromOutsideViewport:()=>{const f=p({tabbingDirection:"forwards"});Q(f)}}),v.jsx(ae.Slot,{scope:r,children:v.jsx(O.ol,{tabIndex:-1,...i,ref:y})}),b&&v.jsx(re,{ref:d,onFocusFromOutsideViewport:()=>{const f=p({tabbingDirection:"backwards"});Q(f)}})]})});Oe.displayName=_e;var Ae="ToastFocusProxy",re=s.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...o}=e,i=z(Ae,r);return v.jsx(se,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:u=>{var a;const c=u.relatedTarget;!((a=i.viewport)!=null&&a.contains(c))&&n()}})});re.displayName=Ae;var J="Toast",xt="toast.swipeStart",Ct="toast.swipeMove",Pt="toast.swipeCancel",Rt="toast.swipeEnd",Ie=s.forwardRef((e,t)=>
9{const{forceMount:r,open:n,defaultOpen:o,onOpenChange:i,...u}=e,[c=!0,l]=mt({prop:n,defaultProp:o,onChange:i});return v.jsx(ge,{present:r||c,children:v.jsx(St,{open:c,...u,ref:t,onClose:()=>l(!1),onPause:I(e.onPause),onResume:I(e.onResume),onSwipeStart:S(e.onSwipeStart,a=>{a.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:S(e.onSwipeMove,a=>{const{x:d,y:m}=a.detail.delta;a.currentTarget.setAttribute("data-swipe","move"),a.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),a.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${m}px`)}),onSwipeCancel:S(e.onSwipeCancel,a=>{a.currentTarget.setAttribute("data-swipe","cancel"),a.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),a.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),a.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),a.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:S(e.onSwipeEnd,a=>{const{x:d,y:m}=a.detail.delta;a.currentTarget.setAttribute("data-swipe","end"),a.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),a.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),a.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),a.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${m}px`),l(!1)})})})});Ie.displayName=J;var[bt,gt]=Se(J,{onClose(){}}),St=s.forwardRef((e,t)=>{const{__scopeToast:r,type:n="foreground",duration:o,open:i,onClose:u,onEscapeKeyDown:c,onPause:l,onResume:a,onSwipeStart:d,onSwipeMove:m,onSwipeCancel:y,onSwipeEnd:x,...b}=e,p=z(J,r),[f,P]=s.useState(null),w=j(t,E=>P(E)),T=s.useRef(null),C=s.useRef(null),g=o||p.duration,R=s.useRef(0),h=s.useRef(g),_=s.useRef(0),{onToastAdd:A,onToastRemove:M}=p,k=I(()=>{var N;(f==null?void 0:f.contains(document.activeElement))&&((N=p.viewport)==null||N.focus()),u()}),F=s.useCallback(E=>{!E||E===1/0||(window.clearTimeout(_.current),R.current=new Date().getTime(),_.current=window.setTimeout(k,E))},[k]);s.useEffect(()=>{const E=p.viewport;if(E){const N=()=>{F(h.current),a==null||a()},D=()=>{const W=new Date().getTime()-R.current;h.current=h.current-W,window.clearTimeout(_.current),l==null||l()};return E.addEventListener(te,D),E.addEventListener(ne,N),()=>{E.removeEventListener(te,D),E.removeEventListener(ne,N)}}},[p.viewport,g,l,a,F]),s.useEffect(()=>{i&&!p.isClosePausedRef.current&&F(g)},[i,g,p.isClosePausedRef,F]),s.useEffect(()=>(A(),()=>M()),[A,M]);const B=s.useMemo(()=>f?We(f):null,[f]);return p.viewport?v.jsxs(v.Fragment,{children:[B&&v.jsx(Nt,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:B}),v.jsx(bt,{scope:r,onClose:k,children:oe.createPortal(v.jsx(ae.ItemSlot,{scope:r,children:v.jsx(ct,{asChild:!0,onEscapeKeyDown:S(c,()=>{p.isFocusedToastEscapeKeyDownRef.current||k(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:v.jsx(O.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":p.swipeDirection,...b,ref:w,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:S(e.onKeyDown,E=>{E.key==="Escape"&&(c==null||c(E.nativeEvent),E.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,k()))}),onPointerDown:S(e.onPointerDown,E=>{E.button===0&&(T.current={x:E.clientX,y:E.clientY})}),onPointerMove:S(e.onPointerMove,E=>{if(!T.current)return;const N=E.clientX-T.current.x,D=E.clientY-T.current.y,W=!!C.current,V=["left","right"].includes(p.swipeDirection),K=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,Ve=V?K(0,N):0,Ue=V?0:K(0,D),Z=E.pointerType==="touch"?10:2,$={x:Ve,y:Ue},ue={originalEvent:E,delta:$};W?(C.current=$,H(Ct,m,ue,{discrete:!1})):ve($,p.swipeDirection,Z)?(C.current=$,H(xt,d,ue,{discrete:!1}),E.target.setPointerCapture(E.pointerId)):(Math.abs(N)>Z||Math.abs(D)>Z)&&(T.current=null)}),onPointerUp:S(e.onPointerUp,E=>{const N=C.current,D=E.target;if(D.hasPointerCapture(E.pointerId)&&D.releasePointerCapture(E.pointerId),C.current=null,T.current=null,N){const W=E.currentTarget,V={originalEvent:E,delta:N};ve(N,p.swipeDirection,p.swipeThreshold)?H(Rt,x,V,{discrete:!0}):H(Pt,y,V,{discrete:!0}),W.addEventListener("click",K=>K.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),Nt=e=>{const{__scopeToast:t,children:r,...n}=e,o=z(J,t),[i,u]=s.useState(!1),[c,l]=s.useState(!1);return At(()=>u(!0)),s.useEffect(()=>{const a=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(a)},[]),c?null:v.jsx(be,{asChild:!0,children:v.jsx(se,{...n,children:i&&v.jsxs(v.Fragment,{children:[o.label," ",r]})})})},_t="ToastTitle",De=s.forwardRef((e,t)=>
9{const{__scopeToast:r,...n}=e;return v.jsx(O.div,{...n,ref:t})});De.displayName=_t;var Ot="ToastDescription",Le=s.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return v.jsx(O.div,{...n,ref:t})});Le.displayName=Ot;var Me="ToastAction",Fe=s.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?v.jsx(ke,{altText:r,asChild:!0,children:v.jsx(ce,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Me}\`. Expected non-empty \`string\`.`),null)});Fe.displayName=Me;var je="ToastClose",ce=s.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,o=gt(je,r);return v.jsx(ke,{asChild:!0,children:v.jsx(O.button,{type:"button",...n,ref:t,onClick:S(e.onClick,o.onClose)})})});ce.displayName=je;var ke=s.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...o}=e;return v.jsx(O.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...o,ref:t})});function We(e){const t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),It(n)){const o=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const u=n.dataset.radixToastAnnounceAlt;u&&t.push(u)}else t.push(...We(n))}}),t}function H(e,t,r,{discrete:n}){const o=r.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?he(o,i):o.dispatchEvent(i)}var ve=(e,t,r=0)=>{const n=Math.abs(e.x),o=Math.abs(e.y),i=n>o;return t==="left"||t==="right"?i&&n>r:!i&&o>r};function At(e=()=>{}){const t=I(e);Y(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function It(e){return e.nodeType===e.ELEMENT_NODE}function Dt(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Q(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var kt=Ne,Wt=Oe,Vt=Ie,Ut=De,Bt=Le,Kt=Fe,$t=ce;export{Kt as A,$t as C,Bt as D,kt as P,Mt as R,Ft as S,Ut as T,Wt as V,Vt as a,L as b,O as c,v as j,s as r};
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.