-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathae7b8e3561800c1860c3d5a33e9d65eef5688e01-10089edb8ecab8ab4ed5.js
1 lines (1 loc) · 38.7 KB
/
ae7b8e3561800c1860c3d5a33e9d65eef5688e01-10089edb8ecab8ab4ed5.js
1
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[438],{9361:function(e,t,n){var r=n(9474),o=n(7698),i=n(9980),s=n(9443);const a=e=>{switch(e){case"success":return"border border-green-200";case"error":return"border border-red-200";case"warning":return"border border-yellow-200";default:return"border border-gray-200"}},c=e=>{switch(e){case"success":return"check-circle";case"error":return"exclamation-circle";case"warning":return"exclamation-triangle";default:return"info-circle"}},l=e=>{switch(e){case"success":return"text-green-400";case"error":return"text-red-400";case"warning":return"text-yellow-400";default:return"text-slate-400"}};t.A=e=>r.createElement(r.Fragment,null,r.createElement(o.bL,{open:e.open,onOpenChange:e.onOpenChange,className:(0,s.A)("flex items-center gap-x-3 bg-white dark:bg-slate-900",e.className,a(e.variant))},r.createElement(i.g,{icon:["fas",c(e.variant)],className:(0,s.A)(l(e.variant))}),r.createElement("div",{className:"flex grow items-center justify-between"},r.createElement("div",{className:"flex flex-col gap-y-2"},e.title&&r.createElement(o.hE,{className:"font-medium"},e.title),r.createElement(o.VY,null,e.children)),r.createElement(o.bm,{className:(0,s.A)("inline-flex h-6 w-6 items-center justify-center rounded-full text-slate-400/80 transition-colors","hover:bg-slate-200/50","dark:text-slate-500/90","dark:hover:bg-slate-600 dark:hover:text-slate-300"),"aria-label":"Close"},r.createElement(i.g,{icon:["fas","xmark"]})))),r.createElement(o.LM,{className:"fixed bottom-0 right-0 z-[9999] m-0 flex w-[390px] max-w-[100vw] list-none flex-col gap-[10px] p-6 text-sm outline-none"}))},602:function(e,t,n){n.d(t,{UE:function(){return de},ll:function(){return se},rD:function(){return me},UU:function(){return le},jD:function(){return fe},ER:function(){return pe},cY:function(){return ae},BN:function(){return ce},Ej:function(){return ue}});const r=["top","right","bottom","left"],o=Math.min,i=Math.max,s=Math.round,a=Math.floor,c=e=>({x:e,y:e}),l={left:"right",right:"left",bottom:"top",top:"bottom"},u={start:"end",end:"start"};function f(e,t,n){return i(e,o(t,n))}function d(e,t){return"function"==typeof e?e(t):e}function p(e){return e.split("-")[0]}function m(e){return e.split("-")[1]}function h(e){return"x"===e?"y":"x"}function w(e){return"y"===e?"height":"width"}function y(e){return["top","bottom"].includes(p(e))?"y":"x"}function v(e){return h(y(e))}function g(e){return e.replace(/start|end/g,(e=>u[e]))}function x(e){return e.replace(/left|right|bottom|top/g,(e=>l[e]))}function b(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function E(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function T(e,t,n){let{reference:r,floating:o}=e;const i=y(t),s=v(t),a=w(s),c=p(t),l="y"===i,u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[a]/2-o[a]/2;let h;switch(c){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-o.width,y:f};break;default:h={x:r.x,y:r.y}}switch(m(t)){case"start":h[s]-=d*(n&&l?-1:1);break;case"end":h[s]+=d*(n&&l?-1:1)}return h}async function R(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:p=!1,padding:m=0}=d(t,e),h=b(m),w=a[p?"floating"===f?"reference":"floating":f],y=E(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(w)))||n?w:w.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:l,rootBoundary:u,strategy:c})),v="floating"===f?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,g=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),x=await(null==i.isElement?void 0:i.isElement(g))&&await(null==i.getScale?void 0:i.getScale(g))||{x:1,y:1},T=E(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:g,strategy:c}):v);return{top:(y.top-T.top+h.top)/x.y,bottom:(T.bottom-y.bottom+h.bottom)/x.y,left:(y.left-T.left+h.left)/x.x,right:(T.right-y.right+h.right)/x.x}}function C(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function P(e){return r.some((t=>e[t]>=0))}function L(e){return A(e)?(e.nodeName||"").toLowerCase():"#document"}function D(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function S(e){var t;return null==(t=(A(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function A(e){return e instanceof Node||e instanceof D(e).Node}function k(e){return e instanceof Element||e instanceof D(e).Element}function O(e){return e instanceof HTMLElement||e instanceof D(e).HTMLElement}function N(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof D(e).ShadowRoot)}function F(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=B(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function j(e){return["table","td","th"].includes(L(e))}function M(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(n){return!1}}))}function _(e){const t=I(),n=k(e)?B(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function I(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function W(e){return["html","body","#document"].includes(L(e))}function B(e){return D(e).getComputedStyle(e)}function H(e){return k(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function V(e){if("html"===L(e))return e;const t=e.assignedSlot||e.parentNode||N(e)&&e.host||S(e);return N(t)?t.host:t}function K(e){const t=V(e);return W(t)?e.ownerDocument?e.ownerDocument.body:e.body:O(t)&&F(t)?t:K(t)}function U(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=K(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),s=D(o);if(i){const e=z(s);return t.concat(s,s.visualViewport||[],F(o)?o:[],e&&n?U(e):[])}return t.concat(o,U(o,[],n))}function z(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function $(e){const t=B(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=O(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,c=s(n)!==i||s(r)!==a;return c&&(n=i,r=a),{width:n,height:r,$:c}}function G(e){return k(e)?e:e.contextElement}function Y(e){const t=G(e);if(!O(t))return c(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=$(t);let a=(i?s(n.width):n.width)/r,l=(i?s(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}const q=c(0);function X(e){const t=D(e);return I()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:q}function Z(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=G(e);let s=c(1);t&&(r?k(r)&&(s=Y(r)):s=Y(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==D(e))&&t}(i,n,r)?X(i):c(0);let l=(o.left+a.x)/s.x,u=(o.top+a.y)/s.y,f=o.width/s.x,d=o.height/s.y;if(i){const e=D(i),t=r&&k(r)?D(r):r;let n=e,o=z(n);for(;o&&r&&t!==n;){const e=Y(o),t=o.getBoundingClientRect(),r=B(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,s=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,u*=e.y,f*=e.x,d*=e.y,l+=i,u+=s,n=D(o),o=z(n)}}return E({width:f,height:d,x:l,y:u})}function J(e){return Z(S(e)).left+H(e).scrollLeft}function Q(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=D(e),r=S(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,c=0;if(o){i=o.width,s=o.height;const e=I();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,c=o.offsetTop)}return{width:i,height:s,x:a,y:c}}(e,n);else if("document"===t)r=function(e){const t=S(e),n=H(e),r=e.ownerDocument.body,o=i(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=i(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+J(e);const c=-n.scrollTop;return"rtl"===B(r).direction&&(a+=i(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:a,y:c}}(S(e));else if(k(t))r=function(e,t){const n=Z(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=O(e)?Y(e):c(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=X(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return E(r)}function ee(e,t){const n=V(e);return!(n===t||!k(n)||W(n))&&("fixed"===B(n).position||ee(n,t))}function te(e,t,n){const r=O(t),o=S(t),i="fixed"===n,s=Z(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=c(0);if(r||!r&&!i)if(("body"!==L(t)||F(o))&&(a=H(t)),r){const e=Z(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=J(o));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function ne(e){return"static"===B(e).position}function re(e,t){return O(e)&&"fixed"!==B(e).position?t?t(e):e.offsetParent:null}function oe(e,t){const n=D(e);if(M(e))return n;if(!O(e)){let t=V(e);for(;t&&!W(t);){if(k(t)&&!ne(t))return t;t=V(t)}return n}let r=re(e,t);for(;r&&j(r)&&ne(r);)r=re(r,t);return r&&W(r)&&ne(r)&&!_(r)?n:r||function(e){let t=V(e);for(;O(t)&&!W(t);){if(_(t))return t;if(M(t))return null;t=V(t)}return null}(e)||n}const ie={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,s=S(r),a=!!t&&M(t.floating);if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},u=c(1);const f=c(0),d=O(r);if((d||!d&&!i)&&(("body"!==L(r)||F(s))&&(l=H(r)),O(r))){const e=Z(r);u=Y(r),f.x=e.x+r.clientLeft,f.y=e.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+f.x,y:n.y*u.y-l.scrollTop*u.y+f.y}},getDocumentElement:S,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const a=[..."clippingAncestors"===n?M(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=U(e,[],!1).filter((e=>k(e)&&"body"!==L(e))),o=null;const i="fixed"===B(e).position;let s=i?V(e):e;for(;k(s)&&!W(s);){const t=B(s),n=_(s);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||F(s)&&!n&&ee(e,s))?r=r.filter((e=>e!==s)):o=t,s=V(s)}return t.set(e,r),r}(t,this._c):[].concat(n),r],c=a[0],l=a.reduce(((e,n)=>{const r=Q(t,n,s);return e.top=i(r.top,e.top),e.right=o(r.right,e.right),e.bottom=o(r.bottom,e.bottom),e.left=i(r.left,e.left),e}),Q(t,c,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:oe,getElementRects:async function(e){const t=this.getOffsetParent||oe,n=this.getDimensions,r=await n(e.floating);return{reference:te(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=$(e);return{width:t,height:n}},getScale:Y,isElement:k,isRTL:function(e){return"rtl"===B(e).direction}};function se(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:s=!0,ancestorResize:c=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:u="function"==typeof IntersectionObserver,animationFrame:f=!1}=r,d=G(e),p=s||c?[...d?U(d):[],...U(t)]:[];p.forEach((e=>{s&&e.addEventListener("scroll",n,{passive:!0}),c&&e.addEventListener("resize",n)}));const m=d&&u?function(e,t){let n,r=null;const s=S(e);function c(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function l(u,f){void 0===u&&(u=!1),void 0===f&&(f=1),c();const{left:d,top:p,width:m,height:h}=e.getBoundingClientRect();if(u||t(),!m||!h)return;const w={rootMargin:-a(p)+"px "+-a(s.clientWidth-(d+m))+"px "+-a(s.clientHeight-(p+h))+"px "+-a(d)+"px",threshold:i(0,o(1,f))||1};let y=!0;function v(e){const t=e[0].intersectionRatio;if(t!==f){if(!y)return l();t?l(!1,t):n=setTimeout((()=>{l(!1,1e-7)}),1e3)}y=!1}try{r=new IntersectionObserver(v,{...w,root:s.ownerDocument})}catch(g){r=new IntersectionObserver(v,w)}r.observe(e)}(!0),c}(d,n):null;let h,w=-1,y=null;l&&(y=new ResizeObserver((e=>{let[r]=e;r&&r.target===d&&y&&(y.unobserve(t),cancelAnimationFrame(w),w=requestAnimationFrame((()=>{var e;null==(e=y)||e.observe(t)}))),n()})),d&&!f&&y.observe(d),y.observe(t));let v=f?Z(e):null;return f&&function t(){const r=Z(e);!v||r.x===v.x&&r.y===v.y&&r.width===v.width&&r.height===v.height||n();v=r,h=requestAnimationFrame(t)}(),n(),()=>{var e;p.forEach((e=>{s&&e.removeEventListener("scroll",n),c&&e.removeEventListener("resize",n)})),null==m||m(),null==(e=y)||e.disconnect(),y=null,f&&cancelAnimationFrame(h)}}const ae=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,c=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),s=p(n),a=m(n),c="y"===y(n),l=["left","top"].includes(s)?-1:1,u=i&&c?-1:1,f=d(t,e);let{mainAxis:h,crossAxis:w,alignmentAxis:v}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&"number"==typeof v&&(w="end"===a?-1*v:v),c?{x:w*u,y:h*l}:{x:h*l,y:w*u}}(t,e);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:s}}}}},ce=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=d(e,t),l={x:n,y:r},u=await R(t,c),m=y(p(o)),w=h(m);let v=l[w],g=l[m];if(i){const e="y"===w?"bottom":"right";v=f(v+u["y"===w?"top":"left"],v,v-u[e])}if(s){const e="y"===m?"bottom":"right";g=f(g+u["y"===m?"top":"left"],g,g-u[e])}const x=a.fn({...t,[w]:v,[m]:g});return{...x,data:{x:x.x-n,y:x.y-r}}}}},le=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:E="none",flipAlignment:T=!0,...C}=d(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const P=p(o),L=y(a),D=p(a)===a,S=await(null==c.isRTL?void 0:c.isRTL(l.floating)),A=h||(D||!T?[x(a)]:function(e){const t=x(e);return[g(e),t,g(t)]}(a)),k="none"!==E;!h&&k&&A.push(...function(e,t,n,r){const o=m(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}(p(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(g)))),i}(a,T,E,S));const O=[a,...A],N=await R(t,C),F=[];let j=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&F.push(N[P]),f){const e=function(e,t,n){void 0===n&&(n=!1);const r=m(e),o=v(e),i=w(o);let s="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=x(s)),[s,x(s)]}(o,s,S);F.push(N[e[0]],N[e[1]])}if(j=[...j,{placement:o,overflows:F}],!F.every((e=>e<=0))){var M,_;const e=((null==(M=i.flip)?void 0:M.index)||0)+1,t=O[e];if(t)return{data:{index:e,overflows:j},reset:{placement:t}};let n=null==(_=j.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:_.placement;if(!n)switch(b){case"bestFit":{var I;const e=null==(I=j.filter((e=>{if(k){const t=y(e.placement);return t===L||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:I[0];e&&(n=e);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}},ue=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:s,elements:a}=t,{apply:c=()=>{},...l}=d(e,t),u=await R(t,l),f=p(n),h=m(n),w="y"===y(n),{width:v,height:g}=r.floating;let x,b;"top"===f||"bottom"===f?(x=f,b=h===(await(null==s.isRTL?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(b=f,x="end"===h?"top":"bottom");const E=g-u.top-u.bottom,T=v-u.left-u.right,C=o(g-u[x],E),P=o(v-u[b],T),L=!t.middlewareData.shift;let D=C,S=P;if(w?S=h||L?o(P,T):T:D=h||L?o(C,E):E,L&&!h){const e=i(u.left,0),t=i(u.right,0),n=i(u.top,0),r=i(u.bottom,0);w?S=v-2*(0!==e||0!==t?e+t:i(u.left,u.right)):D=g-2*(0!==n||0!==r?n+r:i(u.top,u.bottom))}await c({...t,availableWidth:S,availableHeight:D});const A=await s.getDimensions(a.floating);return v!==A.width||g!==A.height?{reset:{rects:!0}}:{}}}},fe=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=d(e,t);switch(r){case"referenceHidden":{const e=C(await R(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:P(e)}}}case"escaped":{const e=C(await R(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:P(e)}}}default:return{}}}}},de=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:s,platform:a,elements:c,middlewareData:l}=t,{element:u,padding:p=0}=d(e,t)||{};if(null==u)return{};const h=b(p),y={x:n,y:r},g=v(i),x=w(g),E=await a.getDimensions(u),T="y"===g,R=T?"top":"left",C=T?"bottom":"right",P=T?"clientHeight":"clientWidth",L=s.reference[x]+s.reference[g]-y[g]-s.floating[x],D=y[g]-s.reference[g],S=await(null==a.getOffsetParent?void 0:a.getOffsetParent(u));let A=S?S[P]:0;A&&await(null==a.isElement?void 0:a.isElement(S))||(A=c.floating[P]||s.floating[x]);const k=L/2-D/2,O=A/2-E[x]/2-1,N=o(h[R],O),F=o(h[C],O),j=N,M=A-E[x]-F,_=A/2-E[x]/2+k,I=f(j,_,M),W=!l.arrow&&null!=m(i)&&_!==I&&s.reference[x]/2-(_<j?N:F)-E[x]/2<0,B=W?_<j?_-j:_-M:0;return{[g]:y[g]+B,data:{[g]:I,centerOffset:_-I-B,...W&&{alignmentOffset:B}},reset:W}}}),pe=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=d(e,t),u={x:n,y:r},f=y(o),m=h(f);let w=u[m],v=u[f];const g=d(a,t),x="number"==typeof g?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const e="y"===m?"height":"width",t=i.reference[m]-i.floating[e]+x.mainAxis,n=i.reference[m]+i.reference[e]-x.mainAxis;w<t?w=t:w>n&&(w=n)}if(l){var b,E;const e="y"===m?"width":"height",t=["top","left"].includes(p(o)),n=i.reference[f]-i.floating[e]+(t&&(null==(b=s.offset)?void 0:b[f])||0)+(t?0:x.crossAxis),r=i.reference[f]+i.reference[e]+(t?0:(null==(E=s.offset)?void 0:E[f])||0)-(t?x.crossAxis:0);v<n?v=n:v>r&&(v=r)}return{[m]:w,[f]:v}}}},me=(e,t,n)=>{const r=new Map,o={platform:ie,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),c=await(null==s.isRTL?void 0:s.isRTL(t));let l=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=T(l,r,c),d=r,p={},m=0;for(let h=0;h<a.length;h++){const{name:n,fn:i}=a[h],{x:w,y:y,data:v,reset:g}=await i({x:u,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:p,rects:l,platform:s,elements:{reference:e,floating:t}});u=null!=w?w:u,f=null!=y?y:f,p={...p,[n]:{...p[n],...v}},g&&m<=50&&(m++,"object"==typeof g&&(g.placement&&(d=g.placement),g.rects&&(l=!0===g.rects?await s.getElementRects({reference:e,floating:t,strategy:o}):g.rects),({x:u,y:f}=T(l,d,c))),h=-1)}return{x:u,y:f,placement:d,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})}},9820:function(e,t,n){n.d(t,{BN:function(){return m},ER:function(){return h},Ej:function(){return y},UE:function(){return g},UU:function(){return w},cY:function(){return p},jD:function(){return v},we:function(){return f}});var r=n(602),o=n(9474),i=n(1615),s="undefined"!=typeof document?o.useLayoutEffect:o.useEffect;function a(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!a(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!a(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function c(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function l(e,t){const n=c(e);return Math.round(t*n)/n}function u(e){const t=o.useRef(e);return s((()=>{t.current=e})),t}function f(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:f=[],platform:d,elements:{reference:p,floating:m}={},transform:h=!0,whileElementsMounted:w,open:y}=e,[v,g]=o.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[x,b]=o.useState(f);a(x,f)||b(f);const[E,T]=o.useState(null),[R,C]=o.useState(null),P=o.useCallback((e=>{e!==A.current&&(A.current=e,T(e))}),[]),L=o.useCallback((e=>{e!==k.current&&(k.current=e,C(e))}),[]),D=p||E,S=m||R,A=o.useRef(null),k=o.useRef(null),O=o.useRef(v),N=null!=w,F=u(w),j=u(d),M=o.useCallback((()=>{if(!A.current||!k.current)return;const e={placement:t,strategy:n,middleware:x};j.current&&(e.platform=j.current),(0,r.rD)(A.current,k.current,e).then((e=>{const t={...e,isPositioned:!0};_.current&&!a(O.current,t)&&(O.current=t,i.flushSync((()=>{g(t)})))}))}),[x,t,n,j]);s((()=>{!1===y&&O.current.isPositioned&&(O.current.isPositioned=!1,g((e=>({...e,isPositioned:!1}))))}),[y]);const _=o.useRef(!1);s((()=>(_.current=!0,()=>{_.current=!1})),[]),s((()=>{if(D&&(A.current=D),S&&(k.current=S),D&&S){if(F.current)return F.current(D,S,M);M()}}),[D,S,M,F,N]);const I=o.useMemo((()=>({reference:A,floating:k,setReference:P,setFloating:L})),[P,L]),W=o.useMemo((()=>({reference:D,floating:S})),[D,S]),B=o.useMemo((()=>{const e={position:n,left:0,top:0};if(!W.floating)return e;const t=l(W.floating,v.x),r=l(W.floating,v.y);return h?{...e,transform:"translate("+t+"px, "+r+"px)",...c(W.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,h,W.floating,v.x,v.y]);return o.useMemo((()=>({...v,update:M,refs:I,elements:W,floatingStyles:B})),[v,M,I,W,B])}const d=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:o}="function"==typeof e?e(t):e;return n&&(i=n,{}.hasOwnProperty.call(i,"current"))?null!=n.current?(0,r.UE)({element:n.current,padding:o}).fn(t):{}:n?(0,r.UE)({element:n,padding:o}).fn(t):{};var i}}),p=(e,t)=>({...(0,r.cY)(e),options:[e,t]}),m=(e,t)=>({...(0,r.BN)(e),options:[e,t]}),h=(e,t)=>({...(0,r.ER)(e),options:[e,t]}),w=(e,t)=>({...(0,r.UU)(e),options:[e,t]}),y=(e,t)=>({...(0,r.Ej)(e),options:[e,t]}),v=(e,t)=>({...(0,r.jD)(e),options:[e,t]}),g=(e,t)=>({...d(e),options:[e,t]})},6597:function(e,t,n){n.d(t,{lg:function(){return g},qW:function(){return m},bL:function(){return v}});var r=n(9474),o=n(4310),i=n(7205),s=n(7557),a=n(7021);var c,l=n(3274),u="dismissableLayer.update",f="dismissableLayer.pointerDownOutside",d="dismissableLayer.focusOutside",p=r.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),m=r.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:m,onPointerDownOutside:h,onFocusOutside:v,onInteractOutside:g,onDismiss:x,...b}=e,E=r.useContext(p),[T,R]=r.useState(null),C=T?.ownerDocument??globalThis?.document,[,P]=r.useState({}),L=(0,s.s)(t,(e=>R(e))),D=Array.from(E.layers),[S]=[...E.layersWithOutsidePointerEventsDisabled].slice(-1),A=D.indexOf(S),k=T?D.indexOf(T):-1,O=E.layersWithOutsidePointerEventsDisabled.size>0,N=k>=A,F=function(e,t=globalThis?.document){const n=(0,a.c)(e),o=r.useRef(!1),i=r.useRef((()=>{}));return r.useEffect((()=>{const e=e=>{if(e.target&&!o.current){let r=function(){y(f,n,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=r,t.addEventListener("click",i.current,{once:!0})):r()}else t.removeEventListener("click",i.current);o.current=!1},r=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(r),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}}),[t,n]),{onPointerDownCapture:()=>o.current=!0}}((e=>{const t=e.target,n=[...E.branches].some((e=>e.contains(t)));N&&!n&&(h?.(e),g?.(e),e.defaultPrevented||x?.())}),C),j=function(e,t=globalThis?.document){const n=(0,a.c)(e),o=r.useRef(!1);return r.useEffect((()=>{const e=e=>{if(e.target&&!o.current){y(d,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}((e=>{const t=e.target;[...E.branches].some((e=>e.contains(t)))||(v?.(e),g?.(e),e.defaultPrevented||x?.())}),C);return function(e,t=globalThis?.document){const n=(0,a.c)(e);r.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[n,t])}((e=>{k===E.layers.size-1&&(m?.(e),!e.defaultPrevented&&x&&(e.preventDefault(),x()))}),C),r.useEffect((()=>{if(T)return n&&(0===E.layersWithOutsidePointerEventsDisabled.size&&(c=C.body.style.pointerEvents,C.body.style.pointerEvents="none"),E.layersWithOutsidePointerEventsDisabled.add(T)),E.layers.add(T),w(),()=>{n&&1===E.layersWithOutsidePointerEventsDisabled.size&&(C.body.style.pointerEvents=c)}}),[T,C,n,E]),r.useEffect((()=>()=>{T&&(E.layers.delete(T),E.layersWithOutsidePointerEventsDisabled.delete(T),w())}),[T,E]),r.useEffect((()=>{const e=()=>P({});return document.addEventListener(u,e),()=>document.removeEventListener(u,e)}),[]),(0,l.jsx)(i.sG.div,{...b,ref:L,style:{pointerEvents:O?N?"auto":"none":void 0,...e.style},onFocusCapture:(0,o.m)(e.onFocusCapture,j.onFocusCapture),onBlurCapture:(0,o.m)(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:(0,o.m)(e.onPointerDownCapture,F.onPointerDownCapture)})}));m.displayName="DismissableLayer";var h=r.forwardRef(((e,t)=>{const n=r.useContext(p),o=r.useRef(null),a=(0,s.s)(t,o);return r.useEffect((()=>{const e=o.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),(0,l.jsx)(i.sG.div,{...e,ref:a})}));function w(){const e=new CustomEvent(u);document.dispatchEvent(e)}function y(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?(0,i.hO)(o,s):o.dispatchEvent(s)}h.displayName="DismissableLayerBranch";var v=m,g=h},9932:function(e,t,n){n.d(t,{Z:function(){return c}});var r=n(9474),o=n(1615),i=n(7205),s=n(2005),a=n(3274),c=r.forwardRef(((e,t)=>{const{container:n,...c}=e,[l,u]=r.useState(!1);(0,s.N)((()=>u(!0)),[]);const f=n||l&&globalThis?.document?.body;return f?o.createPortal((0,a.jsx)(i.sG.div,{...c,ref:t}),f):null}));c.displayName="Portal"},7698:function(e,t,n){n.d(t,{bm:function(){return re},VY:function(){return ne},Kq:function(){return J},bL:function(){return ee},hE:function(){return te},LM:function(){return Q}});var r=n(9474),o=n(1615),i=n(4310),s=n(7557),a=n(5597),c=n(6387),l=n(3274);var u=n(6597),f=n(9932),d=n(5347),p=n(7205),m=n(7021),h=n(2025),w=n(2005),y=n(3993),v="ToastProvider",[g,x,b]=function(e){const t=e+"CollectionProvider",[n,o]=(0,a.A)(t),[i,u]=n(t,{collectionRef:{current:null},itemMap:new Map}),f=e=>{const{scope:t,children:n}=e,o=r.useRef(null),s=r.useRef(new Map).current;return(0,l.jsx)(i,{scope:t,itemMap:s,collectionRef:o,children:n})};f.displayName=t;const d=e+"CollectionSlot",p=r.forwardRef(((e,t)=>{const{scope:n,children:r}=e,o=u(d,n),i=(0,s.s)(t,o.collectionRef);return(0,l.jsx)(c.DX,{ref:i,children:r})}));p.displayName=d;const m=e+"CollectionItemSlot",h="data-radix-collection-item",w=r.forwardRef(((e,t)=>{const{scope:n,children:o,...i}=e,a=r.useRef(null),f=(0,s.s)(t,a),d=u(m,n);return r.useEffect((()=>(d.itemMap.set(a,{ref:a,...i}),()=>{d.itemMap.delete(a)}))),(0,l.jsx)(c.DX,{[h]:"",ref:f,children:o})}));return w.displayName=m,[{Provider:f,Slot:p,ItemSlot:w},function(t){const n=u(e+"CollectionConsumer",t);return r.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${h}]`));return Array.from(n.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[n.collectionRef,n.itemMap])},o]}("Toast"),[E,T]=(0,a.A)("Toast",[b]),[R,C]=E(v),P=e=>{const{__scopeToast:t,label:n="Notification",duration:o=5e3,swipeDirection:i="right",swipeThreshold:s=50,children:a}=e,[c,u]=r.useState(null),[f,d]=r.useState(0),p=r.useRef(!1),m=r.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${v}\`. Expected non-empty \`string\`.`),(0,l.jsx)(g.Provider,{scope:t,children:(0,l.jsx)(R,{scope:t,label:n,duration:o,swipeDirection:i,swipeThreshold:s,toastCount:f,viewport:c,onViewportChange:u,onToastAdd:r.useCallback((()=>d((e=>e+1))),[]),onToastRemove:r.useCallback((()=>d((e=>e-1))),[]),isFocusedToastEscapeKeyDownRef:p,isClosePausedRef:m,children:a})})};P.displayName=v;var L="ToastViewport",D=["F8"],S="toast.viewportPause",A="toast.viewportResume",k=r.forwardRef(((e,t)=>{const{__scopeToast:n,hotkey:o=D,label:i="Notifications ({hotkey})",...a}=e,c=C(L,n),f=x(n),d=r.useRef(null),m=r.useRef(null),h=r.useRef(null),w=r.useRef(null),y=(0,s.s)(t,w,c.onViewportChange),v=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),b=c.toastCount>0;r.useEffect((()=>{const e=e=>{o.every((t=>e[t]||e.code===t))&&w.current?.focus()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[o]),r.useEffect((()=>{const e=d.current,t=w.current;if(b&&e&&t){const n=()=>{if(!c.isClosePausedRef.current){const e=new CustomEvent(S);t.dispatchEvent(e),c.isClosePausedRef.current=!0}},r=()=>{if(c.isClosePausedRef.current){const e=new CustomEvent(A);t.dispatchEvent(e),c.isClosePausedRef.current=!1}},o=t=>{!e.contains(t.relatedTarget)&&r()},i=()=>{e.contains(document.activeElement)||r()};return e.addEventListener("focusin",n),e.addEventListener("focusout",o),e.addEventListener("pointermove",n),e.addEventListener("pointerleave",i),window.addEventListener("blur",n),window.addEventListener("focus",r),()=>{e.removeEventListener("focusin",n),e.removeEventListener("focusout",o),e.removeEventListener("pointermove",n),e.removeEventListener("pointerleave",i),window.removeEventListener("blur",n),window.removeEventListener("focus",r)}}}),[b,c.isClosePausedRef]);const E=r.useCallback((({tabbingDirection:e})=>{const t=f().map((t=>{const n=t.ref.current,r=[n,...X(n)];return"forwards"===e?r:r.reverse()}));return("forwards"===e?t.reverse():t).flat()}),[f]);return r.useEffect((()=>{const e=w.current;if(e){const t=t=>{const n=t.altKey||t.ctrlKey||t.metaKey;if("Tab"===t.key&&!n){const n=document.activeElement,r=t.shiftKey;if(t.target===e&&r)return void m.current?.focus();const o=E({tabbingDirection:r?"backwards":"forwards"}),i=o.findIndex((e=>e===n));Z(o.slice(i+1))?t.preventDefault():r?m.current?.focus():h.current?.focus()}};return e.addEventListener("keydown",t),()=>e.removeEventListener("keydown",t)}}),[f,E]),(0,l.jsxs)(u.lg,{ref:d,role:"region","aria-label":i.replace("{hotkey}",v),tabIndex:-1,style:{pointerEvents:b?void 0:"none"},children:[b&&(0,l.jsx)(N,{ref:m,onFocusFromOutsideViewport:()=>{Z(E({tabbingDirection:"forwards"}))}}),(0,l.jsx)(g.Slot,{scope:n,children:(0,l.jsx)(p.sG.ol,{tabIndex:-1,...a,ref:y})}),b&&(0,l.jsx)(N,{ref:h,onFocusFromOutsideViewport:()=>{Z(E({tabbingDirection:"backwards"}))}})]})}));k.displayName=L;var O="ToastFocusProxy",N=r.forwardRef(((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=C(O,n);return(0,l.jsx)(y.s,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:e=>{const t=e.relatedTarget;!i.viewport?.contains(t)&&r()}})}));N.displayName=O;var F="Toast",j=r.forwardRef(((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:s,...a}=e,[c=!0,u]=(0,h.i)({prop:r,defaultProp:o,onChange:s});return(0,l.jsx)(d.C,{present:n||c,children:(0,l.jsx)(I,{open:c,...a,ref:t,onClose:()=>u(!1),onPause:(0,m.c)(e.onPause),onResume:(0,m.c)(e.onResume),onSwipeStart:(0,i.m)(e.onSwipeStart,(e=>{e.currentTarget.setAttribute("data-swipe","start")})),onSwipeMove:(0,i.m)(e.onSwipeMove,(e=>{const{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:(0,i.m)(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:(0,i.m)(e.onSwipeEnd,(e=>{const{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`),u(!1)}))})})}));j.displayName=F;var[M,_]=E(F,{onClose(){}}),I=r.forwardRef(((e,t)=>{const{__scopeToast:n,type:a="foreground",duration:c,open:f,onClose:d,onEscapeKeyDown:h,onPause:w,onResume:y,onSwipeStart:v,onSwipeMove:x,onSwipeCancel:b,onSwipeEnd:E,...T}=e,R=C(F,n),[P,L]=r.useState(null),D=(0,s.s)(t,(e=>L(e))),k=r.useRef(null),O=r.useRef(null),N=c||R.duration,j=r.useRef(0),_=r.useRef(N),I=r.useRef(0),{onToastAdd:B,onToastRemove:H}=R,V=(0,m.c)((()=>{const e=P?.contains(document.activeElement);e&&R.viewport?.focus(),d()})),K=r.useCallback((e=>{e&&e!==1/0&&(window.clearTimeout(I.current),j.current=(new Date).getTime(),I.current=window.setTimeout(V,e))}),[V]);r.useEffect((()=>{const e=R.viewport;if(e){const t=()=>{K(_.current),y?.()},n=()=>{const e=(new Date).getTime()-j.current;_.current=_.current-e,window.clearTimeout(I.current),w?.()};return e.addEventListener(S,n),e.addEventListener(A,t),()=>{e.removeEventListener(S,n),e.removeEventListener(A,t)}}}),[R.viewport,N,w,y,K]),r.useEffect((()=>{f&&!R.isClosePausedRef.current&&K(N)}),[f,N,R.isClosePausedRef,K]),r.useEffect((()=>(B(),()=>H())),[B,H]);const U=r.useMemo((()=>P?G(P):null),[P]);return R.viewport?(0,l.jsxs)(l.Fragment,{children:[U&&(0,l.jsx)(W,{__scopeToast:n,role:"status","aria-live":"foreground"===a?"assertive":"polite","aria-atomic":!0,children:U}),(0,l.jsx)(M,{scope:n,onClose:V,children:o.createPortal((0,l.jsx)(g.ItemSlot,{scope:n,children:(0,l.jsx)(u.bL,{asChild:!0,onEscapeKeyDown:(0,i.m)(h,(()=>{R.isFocusedToastEscapeKeyDownRef.current||V(),R.isFocusedToastEscapeKeyDownRef.current=!1})),children:(0,l.jsx)(p.sG.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":f?"open":"closed","data-swipe-direction":R.swipeDirection,...T,ref:D,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:(0,i.m)(e.onKeyDown,(e=>{"Escape"===e.key&&(h?.(e.nativeEvent),e.nativeEvent.defaultPrevented||(R.isFocusedToastEscapeKeyDownRef.current=!0,V()))})),onPointerDown:(0,i.m)(e.onPointerDown,(e=>{0===e.button&&(k.current={x:e.clientX,y:e.clientY})})),onPointerMove:(0,i.m)(e.onPointerMove,(e=>{if(!k.current)return;const t=e.clientX-k.current.x,n=e.clientY-k.current.y,r=Boolean(O.current),o=["left","right"].includes(R.swipeDirection),i=["left","up"].includes(R.swipeDirection)?Math.min:Math.max,s=o?i(0,t):0,a=o?0:i(0,n),c="touch"===e.pointerType?10:2,l={x:s,y:a},u={originalEvent:e,delta:l};r?(O.current=l,Y("toast.swipeMove",x,u,{discrete:!1})):q(l,R.swipeDirection,c)?(O.current=l,Y("toast.swipeStart",v,u,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>c||Math.abs(n)>c)&&(k.current=null)})),onPointerUp:(0,i.m)(e.onPointerUp,(e=>{const t=O.current,n=e.target;if(n.hasPointerCapture(e.pointerId)&&n.releasePointerCapture(e.pointerId),O.current=null,k.current=null,t){const n=e.currentTarget,r={originalEvent:e,delta:t};q(t,R.swipeDirection,R.swipeThreshold)?Y("toast.swipeEnd",E,r,{discrete:!0}):Y("toast.swipeCancel",b,r,{discrete:!0}),n.addEventListener("click",(e=>e.preventDefault()),{once:!0})}}))})})}),R.viewport)})]}):null})),W=e=>{const{__scopeToast:t,children:n,...o}=e,i=C(F,t),[s,a]=r.useState(!1),[c,u]=r.useState(!1);return function(e=()=>{}){const t=(0,m.c)(e);(0,w.N)((()=>{let e=0,n=0;return e=window.requestAnimationFrame((()=>n=window.requestAnimationFrame(t))),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(n)}}),[t])}((()=>a(!0))),r.useEffect((()=>{const e=window.setTimeout((()=>u(!0)),1e3);return()=>window.clearTimeout(e)}),[]),c?null:(0,l.jsx)(f.Z,{asChild:!0,children:(0,l.jsx)(y.s,{...o,children:s&&(0,l.jsxs)(l.Fragment,{children:[i.label," ",n]})})})},B=r.forwardRef(((e,t)=>{const{__scopeToast:n,...r}=e;return(0,l.jsx)(p.sG.div,{...r,ref:t})}));B.displayName="ToastTitle";var H=r.forwardRef(((e,t)=>{const{__scopeToast:n,...r}=e;return(0,l.jsx)(p.sG.div,{...r,ref:t})}));H.displayName="ToastDescription";var V="ToastAction",K=r.forwardRef(((e,t)=>{const{altText:n,...r}=e;return n.trim()?(0,l.jsx)($,{altText:n,asChild:!0,children:(0,l.jsx)(z,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${V}\`. Expected non-empty \`string\`.`),null)}));K.displayName=V;var U="ToastClose",z=r.forwardRef(((e,t)=>{const{__scopeToast:n,...r}=e,o=_(U,n);return(0,l.jsx)($,{asChild:!0,children:(0,l.jsx)(p.sG.button,{type:"button",...r,ref:t,onClick:(0,i.m)(e.onClick,o.onClose)})})}));z.displayName=U;var $=r.forwardRef(((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return(0,l.jsx)(p.sG.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})}));function G(e){const t=[];return Array.from(e.childNodes).forEach((e=>{if(e.nodeType===e.TEXT_NODE&&e.textContent&&t.push(e.textContent),function(e){return e.nodeType===e.ELEMENT_NODE}(e)){const n=e.ariaHidden||e.hidden||"none"===e.style.display,r=""===e.dataset.radixToastAnnounceExclude;if(!n)if(r){const n=e.dataset.radixToastAnnounceAlt;n&&t.push(n)}else t.push(...G(e))}})),t}function Y(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?(0,p.hO)(o,i):o.dispatchEvent(i)}var q=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return"left"===t||"right"===t?i&&r>n:!i&&o>n};function X(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;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 Z(e){const t=document.activeElement;return e.some((e=>e===t||(e.focus(),document.activeElement!==t)))}var J=P,Q=k,ee=j,te=B,ne=H,re=z},3993:function(e,t,n){n.d(t,{b:function(){return a},s:function(){return s}});var r=n(9474),o=n(7205),i=n(3274),s=r.forwardRef(((e,t)=>(0,i.jsx)(o.sG.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}})));s.displayName="VisuallyHidden";var a=s}}]);