"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9797],{18929:(e,t,n)=>{n.d(t,{qW:()=>d});var r,o=n(20282),i=n(33885),a=n(24155),l=n(90348),c=n(62772),u=n(94450),s="dismissableLayer.update",f=o.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),d=o.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:d,onPointerDownOutside:h,onFocusOutside:v,onInteractOutside:g,onDismiss:y,...b}=e,w=o.useContext(f),[x,E]=o.useState(null),S=x?.ownerDocument??globalThis?.document,[,A]=o.useState({}),R=(0,l.s)(t,e=>E(e)),C=Array.from(w.layers),[L]=[...w.layersWithOutsidePointerEventsDisabled].slice(-1),O=C.indexOf(L),P=x?C.indexOf(x):-1,T=w.layersWithOutsidePointerEventsDisabled.size>0,k=P>=O,N=function(e,t=globalThis?.document){let n=(0,c.c)(e),r=o.useRef(!1),i=o.useRef(()=>{});return o.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){m("dismissableLayer.pointerDownOutside",n,o,{discrete:!0})},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);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}(e=>{let t=e.target,n=[...w.branches].some(e=>e.contains(t));!k||n||(h?.(e),g?.(e),e.defaultPrevented||y?.())},S),M=function(e,t=globalThis?.document){let n=(0,c.c)(e),r=o.useRef(!1);return o.useEffect(()=>{let e=e=>{e.target&&!r.current&&m("dismissableLayer.focusOutside",n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}(e=>{let t=e.target;[...w.branches].some(e=>e.contains(t))||(v?.(e),g?.(e),e.defaultPrevented||y?.())},S);return!function(e,t=globalThis?.document){let n=(0,c.c)(e);o.useEffect(()=>{let e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[n,t])}(e=>{P!==w.layers.size-1||(d?.(e),!e.defaultPrevented&&y&&(e.preventDefault(),y()))},S),o.useEffect(()=>{if(x)return n&&(0===w.layersWithOutsidePointerEventsDisabled.size&&(r=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),w.layersWithOutsidePointerEventsDisabled.add(x)),w.layers.add(x),p(),()=>{n&&1===w.layersWithOutsidePointerEventsDisabled.size&&(S.body.style.pointerEvents=r)}},[x,S,n,w]),o.useEffect(()=>()=>{x&&(w.layers.delete(x),w.layersWithOutsidePointerEventsDisabled.delete(x),p())},[x,w]),o.useEffect(()=>{let e=()=>A({});return document.addEventListener(s,e),()=>document.removeEventListener(s,e)},[]),(0,u.jsx)(a.sG.div,{...b,ref:R,style:{pointerEvents:T?k?"auto":"none":void 0,...e.style},onFocusCapture:(0,i.m)(e.onFocusCapture,M.onFocusCapture),onBlurCapture:(0,i.m)(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:(0,i.m)(e.onPointerDownCapture,N.onPointerDownCapture)})});function p(){let e=new CustomEvent(s);document.dispatchEvent(e)}function m(e,t,n,{discrete:r}){let o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?(0,a.hO)(o,i):o.dispatchEvent(i)}d.displayName="DismissableLayer",o.forwardRef((e,t)=>{let n=o.useContext(f),r=o.useRef(null),i=(0,l.s)(t,r);return o.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,u.jsx)(a.sG.div,{...e,ref:i})}).displayName="DismissableLayerBranch"},27692:(e,t,n)=>{n.d(t,{Oh:()=>i});var r=n(20282),o=0;function i(){r.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??a()),document.body.insertAdjacentElement("beforeend",e[1]??a()),o++,()=>{1===o&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),o--}},[])}function a(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}},1912:(e,t,n)=>{n.d(t,{n:()=>f});var r=n(20282),o=n(90348),i=n(24155),a=n(62772),l=n(94450),c="focusScope.autoFocusOnMount",u="focusScope.autoFocusOnUnmount",s={bubbles:!1,cancelable:!0},f=r.forwardRef((e,t)=>{let{loop:n=!1,trapped:f=!1,onMountAutoFocus:v,onUnmountAutoFocus:g,...y}=e,[b,w]=r.useState(null),x=(0,a.c)(v),E=(0,a.c)(g),S=r.useRef(null),A=(0,o.s)(t,e=>w(e)),R=r.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;r.useEffect(()=>{if(f){let e=function(e){if(R.paused||!b)return;let t=e.target;b.contains(t)?S.current=t:m(S.current,{select:!0})},t=function(e){if(R.paused||!b)return;let t=e.relatedTarget;null===t||b.contains(t)||m(S.current,{select:!0})};document.addEventListener("focusin",e),document.addEventListener("focusout",t);let n=new MutationObserver(function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&m(b)});return b&&n.observe(b,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}},[f,b,R.paused]),r.useEffect(()=>{if(b){h.add(R);let e=document.activeElement;if(!b.contains(e)){let t=new CustomEvent(c,s);b.addEventListener(c,x),b.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(m(r,{select:t}),document.activeElement!==n)return}(d(b).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&m(b))}return()=>{b.removeEventListener(c,x),setTimeout(()=>{let t=new CustomEvent(u,s);b.addEventListener(u,E),b.dispatchEvent(t),t.defaultPrevented||m(e??document.body,{select:!0}),b.removeEventListener(u,E),h.remove(R)},0)}}},[b,x,E,R]);let C=r.useCallback(e=>{if(!n&&!f||R.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,r=document.activeElement;if(t&&r){let t=e.currentTarget,[o,i]=function(e){let t=d(e);return[p(t,e),p(t.reverse(),e)]}(t);o&&i?e.shiftKey||r!==i?e.shiftKey&&r===o&&(e.preventDefault(),n&&m(i,{select:!0})):(e.preventDefault(),n&&m(o,{select:!0})):r===t&&e.preventDefault()}},[n,f,R.paused]);return(0,l.jsx)(i.sG.div,{tabIndex:-1,...y,ref:A,onKeyDown:C})});function d(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let 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 p(e,t){for(let n of e)if(!function(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===t||e!==t);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(n,{upTo:t}))return n}function m(e,{select:t=!1}={}){if(e&&e.focus){var n;let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&(n=e)instanceof HTMLInputElement&&"select"in n&&t&&e.select()}}f.displayName="FocusScope";var h=function(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),(e=v(e,t)).unshift(t)},remove(t){e=v(e,t),e[0]?.resume()}}}();function v(e,t){let n=[...e],r=n.indexOf(t);return -1!==r&&n.splice(r,1),n}},62625:(e,t,n)=>{n.d(t,{Mz:()=>e_,i3:()=>eK,UC:()=>eV,bL:()=>eX,Bk:()=>eO});var r=n(20282);function o(e){return e.split("-")[1]}function i(e){return"y"===e?"height":"width"}function a(e){return e.split("-")[0]}function l(e){return["top","bottom"].includes(a(e))?"x":"y"}function c(e,t,n){let r,{reference:c,floating:u}=e,s=c.x+c.width/2-u.width/2,f=c.y+c.height/2-u.height/2,d=l(t),p=i(d),m=c[p]/2-u[p]/2,h="x"===d;switch(a(t)){case"top":r={x:s,y:c.y-u.height};break;case"bottom":r={x:s,y:c.y+c.height};break;case"right":r={x:c.x+c.width,y:f};break;case"left":r={x:c.x-u.width,y:f};break;default:r={x:c.x,y:c.y}}switch(o(t)){case"start":r[d]-=m*(n&&h?-1:1);break;case"end":r[d]+=m*(n&&h?-1:1)}return r}let u=async(e,t,n)=>{let{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,l=i.filter(Boolean),u=await (null==a.isRTL?void 0:a.isRTL(t)),s=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:d}=c(s,r,u),p=r,m={},h=0;for(let n=0;ne.concat(t,t+"-start",t+"-end"),[]),{left:"right",right:"left",bottom:"top",top:"bottom"});function g(e){return e.replace(/left|right|bottom|top/g,e=>v[e])}let y={start:"end",end:"start"};function b(e){return e.replace(/start|end/g,e=>y[e])}function w(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function x(e){return h.some(t=>e[t]>=0)}function E(e){return"x"===e?"y":"x"}let S=Math.min,A=Math.max,R=Math.round,C=Math.floor,L=e=>({x:e,y:e});function O(e){return k(e)?(e.nodeName||"").toLowerCase():"#document"}function P(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function T(e){var t;return null==(t=(k(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function k(e){return e instanceof Node||e instanceof P(e).Node}function N(e){return e instanceof Element||e instanceof P(e).Element}function M(e){return e instanceof HTMLElement||e instanceof P(e).HTMLElement}function D(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof P(e).ShadowRoot)}function W(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=H(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function j(e){let t=F(),n=H(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 F(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}function B(e){return["html","body","#document"].includes(O(e))}function H(e){return P(e).getComputedStyle(e)}function I(e){return N(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function z(e){if("html"===O(e))return e;let t=e.assignedSlot||e.parentNode||D(e)&&e.host||T(e);return D(t)?t.host:t}function $(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let o=function e(t){let n=z(t);return B(n)?t.ownerDocument?t.ownerDocument.body:t.body:M(n)&&W(n)?n:e(n)}(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=P(o);return i?t.concat(a,a.visualViewport||[],W(o)?o:[],a.frameElement&&n?$(a.frameElement):[]):t.concat(o,$(o,[],n))}function Y(e){let t=H(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=M(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,l=R(n)!==i||R(r)!==a;return l&&(n=i,r=a),{width:n,height:r,$:l}}function X(e){return N(e)?e:e.contextElement}function _(e){let t=X(e);if(!M(t))return L(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Y(t),a=(i?R(n.width):n.width)/r,l=(i?R(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}let V=L(0);function K(e){let t=P(e);return F()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:V}function G(e,t,n,r){var o;void 0===t&&(t=!1),void 0===n&&(n=!1);let i=e.getBoundingClientRect(),a=X(e),l=L(1);t&&(r?N(r)&&(l=_(r)):l=_(e));let c=(void 0===(o=n)&&(o=!1),r&&(!o||r===P(a))&&o)?K(a):L(0),u=(i.left+c.x)/l.x,s=(i.top+c.y)/l.y,d=i.width/l.x,p=i.height/l.y;if(a){let e=P(a),t=r&&N(r)?P(r):r,n=e,o=n.frameElement;for(;o&&r&&t!==n;){let e=_(o),t=o.getBoundingClientRect(),r=H(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;u*=e.x,s*=e.y,d*=e.x,p*=e.y,u+=i,s+=a,o=(n=P(o)).frameElement}}return f({width:d,height:p,x:u,y:s})}let q=[":popover-open",":modal"];function Z(e){return q.some(t=>{try{return e.matches(t)}catch(e){return!1}})}function U(e){return G(T(e)).left+I(e).scrollLeft}function J(e,t,n){let r;if("viewport"===t)r=function(e,t){let n=P(e),r=T(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,l=0,c=0;if(o){i=o.width,a=o.height;let e=F();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,c=o.offsetTop)}return{width:i,height:a,x:l,y:c}}(e,n);else if("document"===t)r=function(e){let t=T(e),n=I(e),r=e.ownerDocument.body,o=A(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=A(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),a=-n.scrollLeft+U(e),l=-n.scrollTop;return"rtl"===H(r).direction&&(a+=A(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:l}}(T(e));else if(N(t))r=function(e,t){let n=G(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=M(e)?_(e):L(1),a=e.clientWidth*i.x;return{width:a,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{let n=K(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return f(r)}function Q(e,t){return M(e)&&"fixed"!==H(e).position?t?t(e):e.offsetParent:null}function ee(e,t){let n=P(e);if(!M(e)||Z(e))return n;let r=Q(e,t);for(;r&&["table","td","th"].includes(O(r))&&"static"===H(r).position;)r=Q(r,t);return r&&("html"===O(r)||"body"===O(r)&&"static"===H(r).position&&!j(r))?n:r||function(e){let t=z(e);for(;M(t)&&!B(t);){if(j(t))return t;t=z(t)}return null}(e)||n}let et=async function(e){let t=this.getOffsetParent||ee,n=this.getDimensions;return{reference:function(e,t,n){let r=M(t),o=T(t),i="fixed"===n,a=G(e,!0,i,t),l={scrollLeft:0,scrollTop:0},c=L(0);if(r||!r&&!i){if(("body"!==O(t)||W(o))&&(l=I(t)),r){let e=G(t,!0,i,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else o&&(c.x=U(o))}return{x:a.left+l.scrollLeft-c.x,y:a.top+l.scrollTop-c.y,width:a.width,height:a.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await n(e.floating)}}},en={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,i="fixed"===o,a=T(r),l=!!t&&Z(t.floating);if(r===a||l&&i)return n;let c={scrollLeft:0,scrollTop:0},u=L(1),s=L(0),f=M(r);if((f||!f&&!i)&&(("body"!==O(r)||W(a))&&(c=I(r)),M(r))){let e=G(r);u=_(r),s.x=e.x+r.clientLeft,s.y=e.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+s.x,y:n.y*u.y-c.scrollTop*u.y+s.y}},getDocumentElement:T,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e,i=[..."clippingAncestors"===n?function(e,t){let n=t.get(e);if(n)return n;let r=$(e,[],!1).filter(e=>N(e)&&"body"!==O(e)),o=null,i="fixed"===H(e).position,a=i?z(e):e;for(;N(a)&&!B(a);){let t=H(a),n=j(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&!!o&&["absolute","fixed"].includes(o.position)||W(a)&&!n&&function e(t,n){let r=z(t);return!(r===n||!N(r)||B(r))&&("fixed"===H(r).position||e(r,n))}(e,a))?r=r.filter(e=>e!==a):o=t,a=z(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((e,n)=>{let r=J(t,n,o);return e.top=A(r.top,e.top),e.right=S(r.right,e.right),e.bottom=S(r.bottom,e.bottom),e.left=A(r.left,e.left),e},J(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:ee,getElementRects:et,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:n}=Y(e);return{width:t,height:n}},getScale:_,isElement:N,isRTL:function(e){return"rtl"===H(e).direction}},er=e=>({name:"arrow",options:e,async fn(t){let{element:n,padding:r=0}=e||{},{x:a,y:c,placement:u,rects:f,platform:d,elements:h}=t;if(null==n)return{};let v=s(r),g={x:a,y:c},y=l(u),b=i(y),w=await d.getDimensions(n),x="y"===y,E=x?"top":"left",S=x?"bottom":"right",A=x?"clientHeight":"clientWidth",R=f.reference[b]+f.reference[y]-g[y]-f.floating[b],C=g[y]-f.reference[y],L=await (null==d.getOffsetParent?void 0:d.getOffsetParent(n)),O=L?L[A]:0;O&&await (null==d.isElement?void 0:d.isElement(L))||(O=h.floating[A]||f.floating[b]);let P=v[E],T=O-w[b]-v[S],k=O/2-w[b]/2+(R/2-C/2),N=m(P,p(k,T)),M=null!=o(u)&&k!=N&&f.reference[b]/2-(k{let r=new Map,o={platform:en,...n},i={...o.platform,_c:r};return u(e,t,{...o,platform:i})};var ei=n(43137),ea="undefined"!=typeof document?r.useLayoutEffect:r.useEffect;function el(e,t){let n,r,o;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!el(e[r],t[r]))return!1;return!0}if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){let n=o[r];if(("_owner"!==n||!e.$$typeof)&&!el(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function ec(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function eu(e,t){let n=ec(e);return Math.round(t*n)/n}function es(e){let t=r.useRef(e);return ea(()=>{t.current=e}),t}let ef=e=>({name:"arrow",options:e,fn(t){let{element:n,padding:r}="function"==typeof e?e(t):e;return n&&({}).hasOwnProperty.call(n,"current")?null!=n.current?er({element:n.current,padding:r}).fn(t):{}:n?er({element:n,padding:r}).fn(t):{}}}),ed=(e,t)=>({...function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){let{x:n,y:r}=t,i=await async function(e,t){let{placement:n,platform:r,elements:i}=e,c=await (null==r.isRTL?void 0:r.isRTL(i.floating)),u=a(n),s=o(n),f="x"===l(n),d=["left","top"].includes(u)?-1:1,p=c&&f?-1:1,m="function"==typeof t?t(e):t,{mainAxis:h,crossAxis:v,alignmentAxis:g}="number"==typeof m?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...m};return s&&"number"==typeof g&&(v="end"===s?-1*g:g),f?{x:v*p,y:h*d}:{x:h*d,y:v*p}}(t,e);return{x:n+i.x,y:r+i.y,data:i}}}}(e),options:[e,t]}),ep=(e,t)=>({...function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:c=!1,limiter:u={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=e,f={x:n,y:r},h=await d(t,s),v=l(a(o)),g=E(v),y=f[v],b=f[g];if(i){let e="y"===v?"bottom":"right";y=m(y+h["y"===v?"top":"left"],p(y,y-h[e]))}if(c){let e="y"===g?"bottom":"right";b=m(b+h["y"===g?"top":"left"],p(b,b-h[e]))}let w=u.fn({...t,[v]:y,[g]:b});return{...w,data:{x:w.x-n,y:w.y-r}}}}}(e),options:[e,t]}),em=(e,t)=>({...function(e){return void 0===e&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:o,rects:i,middlewareData:c}=t,{offset:u=0,mainAxis:s=!0,crossAxis:f=!0}=e,d={x:n,y:r},p=l(o),m=E(p),h=d[p],v=d[m],g="function"==typeof u?u(t):u,y="number"==typeof g?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(s){let e="y"===p?"height":"width",t=i.reference[p]-i.floating[e]+y.mainAxis,n=i.reference[p]+i.reference[e]-y.mainAxis;hn&&(h=n)}if(f){var b,w;let e="y"===p?"width":"height",t=["top","left"].includes(a(o)),n=i.reference[m]-i.floating[e]+(t&&(null==(b=c.offset)?void 0:b[m])||0)+(t?0:y.crossAxis),r=i.reference[m]+i.reference[e]+(t?0:(null==(w=c.offset)?void 0:w[m])||0)-(t?y.crossAxis:0);vr&&(v=r)}return{[p]:h,[m]:v}}}}(e),options:[e,t]}),eh=(e,t)=>({...function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r,c,u;let{placement:s,middlewareData:f,rects:p,initialPlacement:m,platform:h,elements:v}=t,{mainAxis:y=!0,crossAxis:w=!0,fallbackPlacements:x,fallbackStrategy:E="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:A=!0,...R}=e,C=a(s),L=a(m)===m,O=await (null==h.isRTL?void 0:h.isRTL(v.floating)),P=x||(L||!A?[g(m)]:function(e){let t=g(e);return[b(e),t,b(t)]}(m));x||"none"===S||P.push(...function(e,t,n,r){let i=o(e),l=function(e,t,n){let r=["left","right"],o=["right","left"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?["top","bottom"]:["bottom","top"];default:return[]}}(a(e),"start"===n,r);return i&&(l=l.map(e=>e+"-"+i),t&&(l=l.concat(l.map(b)))),l}(m,A,S,O));let T=[m,...P],k=await d(t,R),N=[],M=(null==(n=f.flip)?void 0:n.overflows)||[];if(y&&N.push(k[C]),w){let{main:e,cross:t}=function(e,t,n){void 0===n&&(n=!1);let r=o(e),a=l(e),c=i(a),u="x"===a?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[c]>t.floating[c]&&(u=g(u)),{main:u,cross:g(u)}}(s,p,O);N.push(k[e],k[t])}if(M=[...M,{placement:s,overflows:N}],!N.every(e=>e<=0)){let e=((null==(r=f.flip)?void 0:r.index)||0)+1,t=T[e];if(t)return{data:{index:e,overflows:M},reset:{placement:t}};let n=null==(c=M.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:c.placement;if(!n)switch(E){case"bestFit":{let e=null==(u=M.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:u[0];e&&(n=e);break}case"initialPlacement":n=m}if(s!==n)return{reset:{placement:n}}}return{}}}}(e),options:[e,t]}),ev=(e,t)=>({...function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){let n,r;let{placement:i,rects:c,platform:u,elements:s}=t,{apply:f=()=>{},...h}=e,v=await d(t,h),g=a(i),y=o(i),b="x"===l(i),{width:w,height:x}=c.floating;"top"===g||"bottom"===g?(n=g,r=y===(await (null==u.isRTL?void 0:u.isRTL(s.floating))?"start":"end")?"left":"right"):(r=g,n="end"===y?"top":"bottom");let E=x-v[n],S=w-v[r],A=!t.middlewareData.shift,R=E,C=S;if(b){let e=w-v.left-v.right;C=y||A?p(S,e):e}else{let e=x-v.top-v.bottom;R=y||A?p(E,e):e}if(A&&!y){let e=m(v.left,0),t=m(v.right,0),n=m(v.top,0),r=m(v.bottom,0);b?C=w-2*(0!==e||0!==t?e+t:m(v.left,v.right)):R=x-2*(0!==n||0!==r?n+r:m(v.top,v.bottom))}await f({...t,availableWidth:C,availableHeight:R});let L=await u.getDimensions(s.floating);return w!==L.width||x!==L.height?{reset:{rects:!0}}:{}}}}(e),options:[e,t]}),eg=(e,t)=>({...function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){let{strategy:n="referenceHidden",...r}=e,{rects:o}=t;switch(n){case"referenceHidden":{let e=w(await d(t,{...r,elementContext:"reference"}),o.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:x(e)}}}case"escaped":{let e=w(await d(t,{...r,altBoundary:!0}),o.floating);return{data:{escapedOffsets:e,escaped:x(e)}}}default:return{}}}}}(e),options:[e,t]}),ey=(e,t)=>({...ef(e),options:[e,t]});var eb=n(24155),ew=n(94450),ex=r.forwardRef((e,t)=>{let{children:n,width:r=10,height:o=5,...i}=e;return(0,ew.jsx)(eb.sG.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:(0,ew.jsx)("polygon",{points:"0,0 30,0 15,10"})})});ex.displayName="Arrow";var eE=n(90348),eS=n(94552),eA=n(62772),eR=n(10490),eC="Popper",[eL,eO]=(0,eS.A)(eC),[eP,eT]=eL(eC),ek=e=>{let{__scopePopper:t,children:n}=e,[o,i]=r.useState(null);return(0,ew.jsx)(eP,{scope:t,anchor:o,onAnchorChange:i,children:n})};ek.displayName=eC;var eN="PopperAnchor",eM=r.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:o,...i}=e,a=eT(eN,n),l=r.useRef(null),c=(0,eE.s)(t,l);return r.useEffect(()=>{a.onAnchorChange(o?.current||l.current)}),o?null:(0,ew.jsx)(eb.sG.div,{...i,ref:c})});eM.displayName=eN;var eD="PopperContent",[eW,ej]=eL(eD),eF=r.forwardRef((e,t)=>{let{__scopePopper:n,side:o="bottom",sideOffset:i=0,align:a="center",alignOffset:l=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:s=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:p=!1,updatePositionStrategy:m="optimized",onPlaced:h,...v}=e,g=eT(eD,n),[y,b]=r.useState(null),w=(0,eE.s)(t,e=>b(e)),[x,E]=r.useState(null),R=function(e){let[t,n]=r.useState(void 0);return(0,eR.N)(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let r,o;if(!Array.isArray(t)||!t.length)return;let i=t[0];if("borderBoxSize"in i){let e=i.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,o=t.blockSize}else r=e.offsetWidth,o=e.offsetHeight;n({width:r,height:o})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t}(x),L=R?.width??0,O=R?.height??0,P="number"==typeof f?f:{top:0,right:0,bottom:0,left:0,...f},k=Array.isArray(s)?s:[s],N=k.length>0,M={padding:P,boundary:k.filter(ez),altBoundary:N},{refs:D,floatingStyles:W,placement:j,isPositioned:F,middlewareData:B}=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:a,floating:l}={},transform:c=!0,whileElementsMounted:u,open:s}=e,[f,d]=r.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=r.useState(o);el(p,o)||m(o);let[h,v]=r.useState(null),[g,y]=r.useState(null),b=r.useCallback(e=>{e!==S.current&&(S.current=e,v(e))},[]),w=r.useCallback(e=>{e!==A.current&&(A.current=e,y(e))},[]),x=a||h,E=l||g,S=r.useRef(null),A=r.useRef(null),R=r.useRef(f),C=null!=u,L=es(u),O=es(i),P=r.useCallback(()=>{if(!S.current||!A.current)return;let e={placement:t,strategy:n,middleware:p};O.current&&(e.platform=O.current),eo(S.current,A.current,e).then(e=>{let t={...e,isPositioned:!0};T.current&&!el(R.current,t)&&(R.current=t,ei.flushSync(()=>{d(t)}))})},[p,t,n,O]);ea(()=>{!1===s&&R.current.isPositioned&&(R.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[s]);let T=r.useRef(!1);ea(()=>(T.current=!0,()=>{T.current=!1}),[]),ea(()=>{if(x&&(S.current=x),E&&(A.current=E),x&&E){if(L.current)return L.current(x,E,P);P()}},[x,E,P,L,C]);let k=r.useMemo(()=>({reference:S,floating:A,setReference:b,setFloating:w}),[b,w]),N=r.useMemo(()=>({reference:x,floating:E}),[x,E]),M=r.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=eu(N.floating,f.x),r=eu(N.floating,f.y);return c?{...e,transform:"translate("+t+"px, "+r+"px)",...ec(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,c,N.floating,f.x,f.y]);return r.useMemo(()=>({...f,update:P,refs:k,elements:N,floatingStyles:M}),[f,P,k,N,M])}({strategy:"fixed",placement:o+("center"!==a?"-"+a:""),whileElementsMounted:(...e)=>(function(e,t,n,r){let o;void 0===r&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:c="function"==typeof IntersectionObserver,animationFrame:u=!1}=r,s=X(e),f=i||a?[...s?$(s):[],...$(t)]:[];f.forEach(e=>{i&&e.addEventListener("scroll",n,{passive:!0}),a&&e.addEventListener("resize",n)});let d=s&&c?function(e,t){let n,r=null,o=T(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return!function a(l,c){void 0===l&&(l=!1),void 0===c&&(c=1),i();let{left:u,top:s,width:f,height:d}=e.getBoundingClientRect();if(l||t(),!f||!d)return;let p=C(s),m=C(o.clientWidth-(u+f)),h={rootMargin:-p+"px "+-m+"px "+-C(o.clientHeight-(s+d))+"px "+-C(u)+"px",threshold:A(0,S(1,c))||1},v=!0;function g(e){let t=e[0].intersectionRatio;if(t!==c){if(!v)return a();t?a(!1,t):n=setTimeout(()=>{a(!1,1e-7)},100)}v=!1}try{r=new IntersectionObserver(g,{...h,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,h)}r.observe(e)}(!0),i}(s,n):null,p=-1,m=null;l&&(m=new ResizeObserver(e=>{let[r]=e;r&&r.target===s&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(t)})),n()}),s&&!u&&m.observe(s),m.observe(t));let h=u?G(e):null;return u&&function t(){let r=G(e);h&&(r.x!==h.x||r.y!==h.y||r.width!==h.width||r.height!==h.height)&&n(),h=r,o=requestAnimationFrame(t)}(),n(),()=>{var e;f.forEach(e=>{i&&e.removeEventListener("scroll",n),a&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=m)||e.disconnect(),m=null,u&&cancelAnimationFrame(o)}})(...e,{animationFrame:"always"===m}),elements:{reference:g.anchor},middleware:[ed({mainAxis:i+O,alignmentAxis:l}),u&&ep({mainAxis:!0,crossAxis:!1,limiter:"partial"===d?em():void 0,...M}),u&&eh({...M}),ev({...M,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${n}px`),a.setProperty("--radix-popper-available-height",`${r}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),x&&ey({element:x,padding:c}),e$({arrowWidth:L,arrowHeight:O}),p&&eg({strategy:"referenceHidden",...M})]}),[H,I]=eY(j),z=(0,eA.c)(h);(0,eR.N)(()=>{F&&z?.()},[F,z]);let Y=B.arrow?.x,_=B.arrow?.y,V=B.arrow?.centerOffset!==0,[K,q]=r.useState();return(0,eR.N)(()=>{y&&q(window.getComputedStyle(y).zIndex)},[y]),(0,ew.jsx)("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:F?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:K,"--radix-popper-transform-origin":[B.transformOrigin?.x,B.transformOrigin?.y].join(" "),...B.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,ew.jsx)(eW,{scope:n,placedSide:H,onArrowChange:E,arrowX:Y,arrowY:_,shouldHideArrow:V,children:(0,ew.jsx)(eb.sG.div,{"data-side":H,"data-align":I,...v,ref:w,style:{...v.style,animation:F?void 0:"none"}})})})});eF.displayName=eD;var eB="PopperArrow",eH={top:"bottom",right:"left",bottom:"top",left:"right"},eI=r.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,o=ej(eB,n),i=eH[o.placedSide];return(0,ew.jsx)("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:(0,ew.jsx)(ex,{...r,ref:t,style:{...r.style,display:"block"}})})});function ez(e){return null!==e}eI.displayName=eB;var e$=e=>({name:"transformOrigin",options:e,fn(t){let{placement:n,rects:r,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[c,u]=eY(n),s={start:"0%",center:"50%",end:"100%"}[u],f=(o.arrow?.x??0)+a/2,d=(o.arrow?.y??0)+l/2,p="",m="";return"bottom"===c?(p=i?s:`${f}px`,m=`${-l}px`):"top"===c?(p=i?s:`${f}px`,m=`${r.floating.height+l}px`):"right"===c?(p=`${-l}px`,m=i?s:`${d}px`):"left"===c&&(p=`${r.floating.width+l}px`,m=i?s:`${d}px`),{data:{x:p,y:m}}}});function eY(e){let[t,n="center"]=e.split("-");return[t,n]}var eX=ek,e_=eM,eV=eF,eK=eI},27168:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(20282),o=n(43137),i=n(24155),a=n(10490),l=n(94450),c=r.forwardRef((e,t)=>{let{container:n,...c}=e,[u,s]=r.useState(!1);(0,a.N)(()=>s(!0),[]);let f=n||u&&globalThis?.document?.body;return f?o.createPortal((0,l.jsx)(i.sG.div,{...c,ref:t}),f):null});c.displayName="Portal"},93850:(e,t,n)=>{n.d(t,{E:()=>l});var r=new WeakMap,o=new WeakMap,i={},a=0,l=function(e,t,n){void 0===t&&(t="undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body),void 0===n&&(n="data-aria-hidden");var l=Array.isArray(e)?e:[e];i[n]||(i[n]=new WeakMap);var c=i[n],u=[],s=new Set,f=function(e){!e||s.has(e)||(s.add(e),f(e.parentNode))};l.forEach(f);var d=function(e){!e||l.indexOf(e)>=0||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))d(e);else{var t=e.getAttribute("aria-hidden"),i=null!==t&&"false"!==t,a=(r.get(e)||0)+1,l=(c.get(e)||0)+1;r.set(e,a),c.set(e,l),u.push(e),1===a&&i&&o.set(e,!0),1===l&&e.setAttribute(n,"true"),i||e.setAttribute("aria-hidden","true")}})};return d(t),s.clear(),a++,function(){u.forEach(function(e){var t=r.get(e)-1,i=c.get(e)-1;r.set(e,t),c.set(e,i),t||(o.has(e)||e.removeAttribute("aria-hidden"),o.delete(e)),i||e.removeAttribute(n)}),--a||(r=new WeakMap,r=new WeakMap,o=new WeakMap,i={})}}},97501:(e,t,n)=>{n.d(t,{A:()=>Y});var r,o,i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;nt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=(n=[l,t],r=function(e){return n.forEach(function(t){return"function"==typeof t?t(e):t&&(t.current=e),t})},(o=(0,a.useState)(function(){return{value:null,callback:r,facade:{get current(){return o.value},set current(value){var e=o.value;e!==value&&(o.value=value,o.callback(value,e))}}}})[0]).callback=r,o.facade),L=i(i({},R),u);return a.createElement(a.Fragment,null,g&&a.createElement(b,{sideCar:f,removeScrollBar:v,shards:y,noIsolation:w,inert:x,setCallbacks:s,allowPinchZoom:!!E,lockRef:l,gapMode:A}),p?a.cloneElement(a.Children.only(m),i(i({},L),{ref:C})):a.createElement(void 0===S?"div":S,i({},L,{className:h,ref:C}),m))});p.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},p.classNames={fullWidth:c,zeroRight:l};var m=function(e){var t=e.sideCar,n=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error("Sidecar medium not found");return a.createElement(r,u({},n))};m.isSideCarExport=!0;var h=function(){var e=0,t=null;return{add:function(r){if(0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=o||n.nc;return t&&e.setAttribute("nonce",t),e}())){var i,a;(i=t).styleSheet?i.styleSheet.cssText=r:i.appendChild(document.createTextNode(r)),a=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(a)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},v=function(){var e=h();return function(t,n){a.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},g=function(){var e=v();return function(t){return e(t.styles,t.dynamic),null}},y={left:0,top:0,right:0,gap:0},b=function(e){return parseInt(e||"",10)||0},w=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[b(n),b(r),b(o)]},x=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return y;var t=w(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},E=g(),S="data-scroll-locked",A=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,u=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(u,"px ").concat(r,";\n }\n body[").concat(S,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(u,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(l," {\n right: ").concat(u,"px ").concat(r,";\n }\n \n .").concat(c," {\n margin-right: ").concat(u,"px ").concat(r,";\n }\n \n .").concat(l," .").concat(l," {\n right: 0 ").concat(r,";\n }\n \n .").concat(c," .").concat(c," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(S,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(u,"px;\n }\n")},R=function(){var e=parseInt(document.body.getAttribute(S)||"0",10);return isFinite(e)?e:0},C=function(){a.useEffect(function(){return document.body.setAttribute(S,(R()+1).toString()),function(){var e=R()-1;e<=0?document.body.removeAttribute(S):document.body.setAttribute(S,e.toString())}},[])},L=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;C();var i=a.useMemo(function(){return x(o)},[o]);return a.createElement(E,{styles:A(i,!t,o,n?"":"!important")})},O=!1;if("undefined"!=typeof window)try{var P=Object.defineProperty({},"passive",{get:function(){return O=!0,!0}});window.addEventListener("test",P,P),window.removeEventListener("test",P,P)}catch(e){O=!1}var T=!!O&&{passive:!1},k=function(e,t){var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&"TEXTAREA"!==e.tagName&&"visible"===n[t])},N=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),M(e,r)){var o=D(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},M=function(e,t){return"v"===e?k(t,"overflowY"):k(t,"overflowX")},D=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},W=function(e,t,n,r,o){var i,a=(i=window.getComputedStyle(t).direction,"h"===e&&"rtl"===i?-1:1),l=a*r,c=n.target,u=t.contains(c),s=!1,f=l>0,d=0,p=0;do{var m=D(e,c),h=m[0],v=m[1]-m[2]-a*h;(h||v)&&M(e,c)&&(d+=v,p+=h),c instanceof ShadowRoot?c=c.host:c=c.parentNode}while(!u&&c!==document.body||u&&(t.contains(c)||t===c));return f&&(o&&1>Math.abs(d)||!o&&l>d)?s=!0:!f&&(o&&1>Math.abs(p)||!o&&-l>p)&&(s=!0),s},j=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},F=function(e){return[e.deltaX,e.deltaY]},B=function(e){return e&&"current"in e?e.current:e},H=0,I=[];let z=(r=function(e){var t=a.useRef([]),n=a.useRef([0,0]),r=a.useRef(),o=a.useState(H++)[0],i=a.useState(g)[0],l=a.useRef(e);a.useEffect(function(){l.current=e},[e]),a.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=(function(e,t,n){if(n||2==arguments.length)for(var r,o=0,i=t.length;oMath.abs(u)?"h":"v";if("touches"in e&&"h"===f&&"range"===s.type)return!1;var d=N(f,s);if(!d)return!0;if(d?o=f:(o="v"===f?"h":"v",d=N(f,s)),!d)return!1;if(!r.current&&"changedTouches"in e&&(c||u)&&(r.current=o),!o)return!0;var p=r.current||o;return W(p,t,e,"h"===p?c:u,!0)},[]),u=a.useCallback(function(e){if(I.length&&I[I.length-1]===i){var n="deltaY"in e?F(e):j(e),r=t.current.filter(function(t){var r;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(r=t.delta)[0]===n[0]&&r[1]===n[1]})[0];if(r&&r.should){e.cancelable&&e.preventDefault();return}if(!r){var o=(l.current.shards||[]).map(B).filter(Boolean).filter(function(t){return t.contains(e.target)});(o.length>0?c(e,o[0]):!l.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),s=a.useCallback(function(e,n,r,o){var i={name:e,delta:n,target:r,should:o,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(r)};t.current.push(i),setTimeout(function(){t.current=t.current.filter(function(e){return e!==i})},1)},[]),f=a.useCallback(function(e){n.current=j(e),r.current=void 0},[]),d=a.useCallback(function(t){s(t.type,F(t),t.target,c(t,e.lockRef.current))},[]),p=a.useCallback(function(t){s(t.type,j(t),t.target,c(t,e.lockRef.current))},[]);a.useEffect(function(){return I.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",u,T),document.addEventListener("touchmove",u,T),document.addEventListener("touchstart",f,T),function(){I=I.filter(function(e){return e!==i}),document.removeEventListener("wheel",u,T),document.removeEventListener("touchmove",u,T),document.removeEventListener("touchstart",f,T)}},[]);var m=e.removeScrollBar,h=e.inert;return a.createElement(a.Fragment,null,h?a.createElement(i,{styles:"\n .block-interactivity-".concat(o," {pointer-events: none;}\n .allow-interactivity-").concat(o," {pointer-events: all;}\n")}):null,m?a.createElement(L,{gapMode:e.gapMode}):null)},f.useMedium(r),m);var $=a.forwardRef(function(e,t){return a.createElement(p,i({},e,{ref:t,sideCar:z}))});$.classNames=p.classNames;let Y=$}}]);