pulse-dashboard
Version:
A Next.js Dashboard application for real-time monitoring and historical analysis of Playwright test executions, based on playwright-pulse-report. This component provides the UI for visualizing Playwright test results and can be run as a standalone CLI too
1 lines • 488 kB
JavaScript
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,15288,e=>{"use strict";var t=e.i(43476),r=e.i(71645),n=e.i(75157);let o=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,className:(0,n.cn)("rounded-2xl border bg-card text-card-foreground shadow-sm",e),...r}));o.displayName="Card";let i=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,className:(0,n.cn)("flex flex-col space-y-1.5 p-6",e),...r}));i.displayName="CardHeader";let a=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,className:(0,n.cn)("text-2xl font-semibold leading-none tracking-tight",e),...r}));a.displayName="CardTitle";let l=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,className:(0,n.cn)("text-sm text-muted-foreground",e),...r}));l.displayName="CardDescription";let u=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,className:(0,n.cn)("p-6 pt-0",e),...r}));u.displayName="CardContent",r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,className:(0,n.cn)("flex items-center p-6 pt-0",e),...r})).displayName="CardFooter",e.s(["Card",0,o,"CardContent",0,u,"CardDescription",0,l,"CardHeader",0,i,"CardTitle",0,a])},2747,29592,e=>{"use strict";var t=e.i(43476),r=e.i(75157);e.s(["Skeleton",0,function({className:e,...n}){return(0,t.jsx)("div",{className:(0,r.cn)("animate-pulse rounded-md bg-muted",e),...n})}],2747);var n=e.i(71645);let o=(0,e.i(25913).cva)("relative w-full rounded-2xl shadow-md border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),i=n.forwardRef(({className:e,variant:n,...i},a)=>(0,t.jsx)("div",{ref:a,role:"alert",className:(0,r.cn)(o({variant:n}),e),...i}));i.displayName="Alert";let a=n.forwardRef(({className:e,...n},o)=>(0,t.jsx)("h5",{ref:o,className:(0,r.cn)("mb-1 font-medium leading-none tracking-tight",e),...n}));a.displayName="AlertTitle";let l=n.forwardRef(({className:e,...n},o)=>(0,t.jsx)("div",{ref:o,className:(0,r.cn)("text-sm [&_p]:leading-relaxed",e),...n}));l.displayName="AlertDescription",e.s(["Alert",0,i,"AlertDescription",0,l,"AlertTitle",0,a],29592)},68054,e=>{"use strict";let t=(0,e.i(75254).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",0,t],68054)},52571,e=>{"use strict";let t=(0,e.i(75254).default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);e.s(["Info",0,t],52571)},81140,30030,e=>{"use strict";e.s(["composeEventHandlers",0,function(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}],81140);var t=e.i(71645),r=e.i(43476);e.s(["createContext",0,function(e,n){let o=t.createContext(n),i=e=>{let{children:n,...i}=e,a=t.useMemo(()=>i,Object.values(i));return(0,r.jsx)(o.Provider,{value:a,children:n})};return i.displayName=e+"Provider",[i,function(r){let i=t.useContext(o);if(i)return i;if(void 0!==n)return n;throw Error(`\`${r}\` must be used within \`${e}\``)}]},"createContextScope",0,function(e,n=[]){let o=[],i=()=>{let r=o.map(e=>t.createContext(e));return function(n){let o=n?.[e]||r;return t.useMemo(()=>({[`__scope${e}`]:{...n,[e]:o}}),[n,o])}};return i.scopeName=e,[function(n,i){let a=t.createContext(i),l=o.length;o=[...o,i];let u=n=>{let{scope:o,children:i,...u}=n,c=o?.[e]?.[l]||a,s=t.useMemo(()=>u,Object.values(u));return(0,r.jsx)(c.Provider,{value:s,children:i})};return u.displayName=n+"Provider",[u,function(r,o){let u=o?.[e]?.[l]||a,c=t.useContext(u);if(c)return c;if(void 0!==i)return i;throw Error(`\`${r}\` must be used within \`${n}\``)}]},function(...e){let r=e[0];if(1===e.length)return r;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let o=n.reduce((t,{useScope:r,scopeName:n})=>{let o=r(e)[`__scope${n}`];return{...t,...o}},{});return t.useMemo(()=>({[`__scope${r.scopeName}`]:o}),[o])}};return n.scopeName=r.scopeName,n}(i,...n)]}],30030)},91918,20783,e=>{"use strict";var t=e.i(71645);function r(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function n(...e){return t=>{let n=!1,o=e.map(e=>{let o=r(e,t);return n||"function"!=typeof o||(n=!0),o});if(n)return()=>{for(let t=0;t<o.length;t++){let n=o[t];"function"==typeof n?n():r(e[t],null)}}}}e.s(["composeRefs",0,n,"useComposedRefs",0,function(...e){return t.useCallback(n(...e),e)}],20783);var o=e.i(43476),i=t.forwardRef((e,r)=>{let{children:n,...i}=e,l=t.Children.toArray(n),c=l.find(u);if(c){let e=c.props.children,n=l.map(r=>r!==c?r:t.Children.count(e)>1?t.Children.only(null):t.isValidElement(e)?e.props.children:null);return(0,o.jsx)(a,{...i,ref:r,children:t.isValidElement(e)?t.cloneElement(e,void 0,n):null})}return(0,o.jsx)(a,{...i,ref:r,children:n})});i.displayName="Slot";var a=t.forwardRef((e,r)=>{let{children:o,...i}=e;if(t.isValidElement(o)){var a;let e,l,u=(a=o,(l=(e=Object.getOwnPropertyDescriptor(a.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.ref:(l=(e=Object.getOwnPropertyDescriptor(a,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.props.ref:a.props.ref||a.ref),c=function(e,t){let r={...t};for(let n in t){let o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...e)=>{i(...e),o(...e)}:o&&(r[n]=o):"style"===n?r[n]={...o,...i}:"className"===n&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}(i,o.props);return o.type!==t.Fragment&&(c.ref=r?n(r,u):u),t.cloneElement(o,c)}return t.Children.count(o)>1?t.Children.only(null):null});a.displayName="SlotClone";var l=({children:e})=>(0,o.jsx)(o.Fragment,{children:e});function u(e){return t.isValidElement(e)&&e.type===l}e.s(["Slot",0,i],91918)},75830,e=>{"use strict";var t=e.i(71645),r=e.i(30030),n=e.i(20783),o=e.i(91918),i=e.i(43476);e.s(["createCollection",0,function(e){let a=e+"CollectionProvider",[l,u]=(0,r.createContextScope)(a),[c,s]=l(a,{collectionRef:{current:null},itemMap:new Map}),f=e=>{let{scope:r,children:n}=e,o=t.default.useRef(null),a=t.default.useRef(new Map).current;return(0,i.jsx)(c,{scope:r,itemMap:a,collectionRef:o,children:n})};f.displayName=a;let p=e+"CollectionSlot",d=t.default.forwardRef((e,t)=>{let{scope:r,children:a}=e,l=s(p,r),u=(0,n.useComposedRefs)(t,l.collectionRef);return(0,i.jsx)(o.Slot,{ref:u,children:a})});d.displayName=p;let h=e+"CollectionItemSlot",y="data-radix-collection-item",v=t.default.forwardRef((e,r)=>{let{scope:a,children:l,...u}=e,c=t.default.useRef(null),f=(0,n.useComposedRefs)(r,c),p=s(h,a);return t.default.useEffect(()=>(p.itemMap.set(c,{ref:c,...u}),()=>void p.itemMap.delete(c))),(0,i.jsx)(o.Slot,{...{[y]:""},ref:f,children:l})});return v.displayName=h,[{Provider:f,Slot:d,ItemSlot:v},function(r){let n=s(e+"CollectionConsumer",r);return t.default.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${y}]`));return Array.from(n.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[n.collectionRef,n.itemMap])},u]}])},10772,34620,e=>{"use strict";var t=e.i(71645),r=globalThis?.document?t.useLayoutEffect:()=>{};e.s(["useLayoutEffect",0,r],34620);var n=t["useId".toString()]||(()=>void 0),o=0;e.s(["useId",0,function(e){let[i,a]=t.useState(n());return r(()=>{e||a(e=>e??String(o++))},[e]),e||(i?`radix-${i}`:"")}],10772)},48425,30207,e=>{"use strict";var t=e.i(71645),r=e.i(74080),n=e.i(91918),o=e.i(43476),i=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,r)=>{let i=t.forwardRef((e,t)=>{let{asChild:i,...a}=e,l=i?n.Slot:r;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,o.jsx)(l,{...a,ref:t})});return i.displayName=`Primitive.${r}`,{...e,[r]:i}},{});e.s(["Primitive",0,i,"dispatchDiscreteCustomEvent",0,function(e,t){e&&r.flushSync(()=>e.dispatchEvent(t))}],48425),e.s(["useCallbackRef",0,function(e){let r=t.useRef(e);return t.useEffect(()=>{r.current=e}),t.useMemo(()=>(...e)=>r.current?.(...e),[])}],30207)},69340,e=>{"use strict";var t=e.i(71645),r=e.i(30207);e.s(["useControllableState",0,function({prop:e,defaultProp:n,onChange:o=()=>{}}){let[i,a]=function({defaultProp:e,onChange:n}){let o=t.useState(e),[i]=o,a=t.useRef(i),l=(0,r.useCallbackRef)(n);return t.useEffect(()=>{a.current!==i&&(l(i),a.current=i)},[i,a,l]),o}({defaultProp:n,onChange:o}),l=void 0!==e,u=l?e:i,c=(0,r.useCallbackRef)(o);return[u,t.useCallback(t=>{if(l){let r="function"==typeof t?t(e):t;r!==e&&c(r)}else a(t)},[l,e,a,c])]}])},86318,e=>{"use strict";var t=e.i(71645);e.i(43476);var r=t.createContext(void 0);e.s(["useDirection",0,function(e){let n=t.useContext(r);return e||n||"ltr"}])},42727,e=>{"use strict";var t=e.i(71645),r=e.i(81140),n=e.i(75830),o=e.i(20783),i=e.i(30030),a=e.i(10772),l=e.i(48425),u=e.i(30207),c=e.i(69340),s=e.i(86318),f=e.i(43476),p="rovingFocusGroup.onEntryFocus",d={bubbles:!1,cancelable:!0},h="RovingFocusGroup",[y,v,m]=(0,n.createCollection)(h),[b,g]=(0,i.createContextScope)(h,[m]),[x,w]=b(h),O=t.forwardRef((e,t)=>(0,f.jsx)(y.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,f.jsx)(y.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,f.jsx)(S,{...e,ref:t})})}));O.displayName=h;var S=t.forwardRef((e,n)=>{let{__scopeRovingFocusGroup:i,orientation:a,loop:h=!1,dir:y,currentTabStopId:m,defaultCurrentTabStopId:b,onCurrentTabStopIdChange:g,onEntryFocus:w,preventScrollOnEntryFocus:O=!1,...S}=e,j=t.useRef(null),E=(0,o.useComposedRefs)(n,j),P=(0,s.useDirection)(y),[T=null,k]=(0,c.useControllableState)({prop:m,defaultProp:b,onChange:g}),[C,M]=t.useState(!1),_=(0,u.useCallbackRef)(w),N=v(i),D=t.useRef(!1),[I,R]=t.useState(0);return t.useEffect(()=>{let e=j.current;if(e)return e.addEventListener(p,_),()=>e.removeEventListener(p,_)},[_]),(0,f.jsx)(x,{scope:i,orientation:a,dir:P,loop:h,currentTabStopId:T,onItemFocus:t.useCallback(e=>k(e),[k]),onItemShiftTab:t.useCallback(()=>M(!0),[]),onFocusableItemAdd:t.useCallback(()=>R(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>R(e=>e-1),[]),children:(0,f.jsx)(l.Primitive.div,{tabIndex:C||0===I?-1:0,"data-orientation":a,...S,ref:E,style:{outline:"none",...e.style},onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,()=>{D.current=!0}),onFocus:(0,r.composeEventHandlers)(e.onFocus,e=>{let t=!D.current;if(e.target===e.currentTarget&&t&&!C){let t=new CustomEvent(p,d);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=N().filter(e=>e.focusable);A([e.find(e=>e.active),e.find(e=>e.id===T),...e].filter(Boolean).map(e=>e.ref.current),O)}}D.current=!1}),onBlur:(0,r.composeEventHandlers)(e.onBlur,()=>M(!1))})})}),j="RovingFocusGroupItem",E=t.forwardRef((e,n)=>{let{__scopeRovingFocusGroup:o,focusable:i=!0,active:u=!1,tabStopId:c,...s}=e,p=(0,a.useId)(),d=c||p,h=w(j,o),m=h.currentTabStopId===d,b=v(o),{onFocusableItemAdd:g,onFocusableItemRemove:x}=h;return t.useEffect(()=>{if(i)return g(),()=>x()},[i,g,x]),(0,f.jsx)(y.ItemSlot,{scope:o,id:d,focusable:i,active:u,children:(0,f.jsx)(l.Primitive.span,{tabIndex:m?0:-1,"data-orientation":h.orientation,...s,ref:n,onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,e=>{i?h.onItemFocus(d):e.preventDefault()}),onFocus:(0,r.composeEventHandlers)(e.onFocus,()=>h.onItemFocus(d)),onKeyDown:(0,r.composeEventHandlers)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void h.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,r){var n;let o=(n=e.key,"rtl"!==r?n:"ArrowLeft"===n?"ArrowRight":"ArrowRight"===n?"ArrowLeft":n);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(o))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(o)))return P[o]}(e,h.orientation,h.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let o=b().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)o.reverse();else if("prev"===t||"next"===t){var r,n;"prev"===t&&o.reverse();let i=o.indexOf(e.currentTarget);o=h.loop?(r=o,n=i+1,r.map((e,t)=>r[(n+t)%r.length])):o.slice(i+1)}setTimeout(()=>A(o))}})})})});E.displayName=j;var P={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function A(e,t=!1){let r=document.activeElement;for(let n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}e.s(["Item",0,E,"Root",0,O,"createRovingFocusGroupScope",0,g])},96626,e=>{"use strict";var t=e.i(71645),r=e.i(20783),n=e.i(34620),o=e=>{var o;let a,l,{present:u,children:c}=e,s=function(e){var r,o;let[a,l]=t.useState(),u=t.useRef({}),c=t.useRef(e),s=t.useRef("none"),[f,p]=(r=e?"mounted":"unmounted",o={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},t.useReducer((e,t)=>o[e][t]??e,r));return t.useEffect(()=>{let e=i(u.current);s.current="mounted"===f?e:"none"},[f]),(0,n.useLayoutEffect)(()=>{let t=u.current,r=c.current;if(r!==e){let n=s.current,o=i(t);e?p("MOUNT"):"none"===o||t?.display==="none"?p("UNMOUNT"):r&&n!==o?p("ANIMATION_OUT"):p("UNMOUNT"),c.current=e}},[e,p]),(0,n.useLayoutEffect)(()=>{if(a){let e,t=a.ownerDocument.defaultView??window,r=r=>{let n=i(u.current).includes(r.animationName);if(r.target===a&&n&&(p("ANIMATION_END"),!c.current)){let r=a.style.animationFillMode;a.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===a.style.animationFillMode&&(a.style.animationFillMode=r)})}},n=e=>{e.target===a&&(s.current=i(u.current))};return a.addEventListener("animationstart",n),a.addEventListener("animationcancel",r),a.addEventListener("animationend",r),()=>{t.clearTimeout(e),a.removeEventListener("animationstart",n),a.removeEventListener("animationcancel",r),a.removeEventListener("animationend",r)}}p("ANIMATION_END")},[a,p]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:t.useCallback(e=>{e&&(u.current=getComputedStyle(e)),l(e)},[])}}(u),f="function"==typeof c?c({present:s.isPresent}):t.Children.only(c),p=(0,r.useComposedRefs)(s.ref,(o=f,(l=(a=Object.getOwnPropertyDescriptor(o.props,"ref")?.get)&&"isReactWarning"in a&&a.isReactWarning)?o.ref:(l=(a=Object.getOwnPropertyDescriptor(o,"ref")?.get)&&"isReactWarning"in a&&a.isReactWarning)?o.props.ref:o.props.ref||o.ref));return"function"==typeof c||s.isPresent?t.cloneElement(f,{ref:p}):null};function i(e){return e?.animationName||"none"}o.displayName="Presence",e.s(["Presence",0,o])},95150,e=>{"use strict";e.s(["getEffectiveTestStatus",0,function(e){return"flaky"===e.outcome||"flaky"===e.status||"passed"===e.status&&e.retryHistory&&e.retryHistory.length>0&&e.retryHistory.some(e=>"failed"===e.status||"timedOut"===e.status)?"flaky":e.retryHistory&&e.retryHistory.length>0&&e.final_status&&"flaky"===e.final_status?"flaky":e.status}])},64659,e=>{"use strict";let t=(0,e.i(75254).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["ChevronDown",0,t],64659)},70152,e=>{"use strict";e.s(["clamp",0,function(e,[t,r]){return Math.min(r,Math.max(t,e))}])},26330,3536,65491,e=>{"use strict";let t;var r,n=e.i(71645),o=e.i(81140),i=e.i(48425),a=e.i(20783),l=e.i(30207),u=e.i(43476),c="dismissableLayer.update",s=n.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),f=n.forwardRef((e,t)=>{let{disableOutsidePointerEvents:f=!1,onEscapeKeyDown:h,onPointerDownOutside:y,onFocusOutside:v,onInteractOutside:m,onDismiss:b,...g}=e,x=n.useContext(s),[w,O]=n.useState(null),S=w?.ownerDocument??globalThis?.document,[,j]=n.useState({}),E=(0,a.useComposedRefs)(t,e=>O(e)),P=Array.from(x.layers),[A]=[...x.layersWithOutsidePointerEventsDisabled].slice(-1),T=P.indexOf(A),k=w?P.indexOf(w):-1,C=x.layersWithOutsidePointerEventsDisabled.size>0,M=k>=T,_=function(e,t=globalThis?.document){let r=(0,l.useCallbackRef)(e),o=n.useRef(!1),i=n.useRef(()=>{});return n.useEffect(()=>{let e=e=>{if(e.target&&!o.current){let n=function(){d("dismissableLayer.pointerDownOutside",r,o,{discrete:!0})},o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=n,t.addEventListener("click",i.current,{once:!0})):n()}else t.removeEventListener("click",i.current);o.current=!1},n=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(n),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>o.current=!0}}(e=>{let t=e.target,r=[...x.branches].some(e=>e.contains(t));M&&!r&&(y?.(e),m?.(e),e.defaultPrevented||b?.())},S),N=function(e,t=globalThis?.document){let r=(0,l.useCallbackRef)(e),o=n.useRef(!1);return n.useEffect(()=>{let e=e=>{e.target&&!o.current&&d("dismissableLayer.focusOutside",r,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}(e=>{let t=e.target;![...x.branches].some(e=>e.contains(t))&&(v?.(e),m?.(e),e.defaultPrevented||b?.())},S);return!function(e,t=globalThis?.document){let r=(0,l.useCallbackRef)(e);n.useEffect(()=>{let e=e=>{"Escape"===e.key&&r(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[r,t])}(e=>{k===x.layers.size-1&&(h?.(e),!e.defaultPrevented&&b&&(e.preventDefault(),b()))},S),n.useEffect(()=>{if(w)return f&&(0===x.layersWithOutsidePointerEventsDisabled.size&&(r=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),x.layersWithOutsidePointerEventsDisabled.add(w)),x.layers.add(w),p(),()=>{f&&1===x.layersWithOutsidePointerEventsDisabled.size&&(S.body.style.pointerEvents=r)}},[w,S,f,x]),n.useEffect(()=>()=>{w&&(x.layers.delete(w),x.layersWithOutsidePointerEventsDisabled.delete(w),p())},[w,x]),n.useEffect(()=>{let e=()=>j({});return document.addEventListener(c,e),()=>document.removeEventListener(c,e)},[]),(0,u.jsx)(i.Primitive.div,{...g,ref:E,style:{pointerEvents:C?M?"auto":"none":void 0,...e.style},onFocusCapture:(0,o.composeEventHandlers)(e.onFocusCapture,N.onFocusCapture),onBlurCapture:(0,o.composeEventHandlers)(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:(0,o.composeEventHandlers)(e.onPointerDownCapture,_.onPointerDownCapture)})});function p(){let e=new CustomEvent(c);document.dispatchEvent(e)}function d(e,t,r,{discrete:n}){let o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?(0,i.dispatchDiscreteCustomEvent)(o,a):o.dispatchEvent(a)}f.displayName="DismissableLayer",n.forwardRef((e,t)=>{let r=n.useContext(s),o=n.useRef(null),l=(0,a.useComposedRefs)(t,o);return n.useEffect(()=>{let e=o.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}},[r.branches]),(0,u.jsx)(i.Primitive.div,{...e,ref:l})}).displayName="DismissableLayerBranch",e.s(["DismissableLayer",0,f],26330);var h=0;function y(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}e.s(["useFocusGuards",0,function(){n.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??y()),document.body.insertAdjacentElement("beforeend",e[1]??y()),h++,()=>{1===h&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),h--}},[])}],3536);var v="focusScope.autoFocusOnMount",m="focusScope.autoFocusOnUnmount",b={bubbles:!1,cancelable:!0},g=n.forwardRef((e,t)=>{let{loop:r=!1,trapped:o=!1,onMountAutoFocus:c,onUnmountAutoFocus:s,...f}=e,[p,d]=n.useState(null),h=(0,l.useCallbackRef)(c),y=(0,l.useCallbackRef)(s),g=n.useRef(null),j=(0,a.useComposedRefs)(t,e=>d(e)),E=n.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;n.useEffect(()=>{if(o){let e=function(e){if(E.paused||!p)return;let t=e.target;p.contains(t)?g.current=t:O(g.current,{select:!0})},t=function(e){if(E.paused||!p)return;let t=e.relatedTarget;null!==t&&(p.contains(t)||O(g.current,{select:!0}))};document.addEventListener("focusin",e),document.addEventListener("focusout",t);let r=new MutationObserver(function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&O(p)});return p&&r.observe(p,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[o,p,E.paused]),n.useEffect(()=>{if(p){S.add(E);let e=document.activeElement;if(!p.contains(e)){let t=new CustomEvent(v,b);p.addEventListener(v,h),p.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){let r=document.activeElement;for(let n of e)if(O(n,{select:t}),document.activeElement!==r)return}(x(p).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&O(p))}return()=>{p.removeEventListener(v,h),setTimeout(()=>{let t=new CustomEvent(m,b);p.addEventListener(m,y),p.dispatchEvent(t),t.defaultPrevented||O(e??document.body,{select:!0}),p.removeEventListener(m,y),S.remove(E)},0)}}},[p,h,y,E]);let P=n.useCallback(e=>{if(!r&&!o||E.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){var i;let t,o=e.currentTarget,[a,l]=[w(t=x(i=o),i),w(t.reverse(),i)];a&&l?e.shiftKey||n!==l?e.shiftKey&&n===a&&(e.preventDefault(),r&&O(l,{select:!0})):(e.preventDefault(),r&&O(a,{select:!0})):n===o&&e.preventDefault()}},[r,o,E.paused]);return(0,u.jsx)(i.Primitive.div,{tabIndex:-1,...f,ref:j,onKeyDown:P})});function x(e){let t=[],r=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(;r.nextNode();)t.push(r.currentNode);return t}function w(e,t){for(let r 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}(r,{upTo:t}))return r}function O(e,{select:t=!1}={}){if(e&&e.focus){var r;let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&(r=e)instanceof HTMLInputElement&&"select"in r&&t&&e.select()}}g.displayName="FocusScope";var S=(t=[],{add(e){let r=t[0];e!==r&&r?.pause(),(t=j(t,e)).unshift(e)},remove(e){t=j(t,e),t[0]?.resume()}});function j(e,t){let r=[...e],n=r.indexOf(t);return -1!==n&&r.splice(n,1),r}e.s(["FocusScope",0,g],65491)},53660,53760,58950,35804,74606,e=>{"use strict";var t=e.i(71645);let r=["top","right","bottom","left"],n=r.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]),o=Math.min,i=Math.max,a=Math.round,l=Math.floor,u=e=>({x:e,y:e}),c={left:"right",right:"left",bottom:"top",top:"bottom"},s={start:"end",end:"start"};function f(e,t){return"function"==typeof e?e(t):e}function p(e){return e.split("-")[0]}function d(e){return e.split("-")[1]}function h(e){return"x"===e?"y":"x"}function y(e){return"y"===e?"height":"width"}function v(e){return["top","bottom"].includes(p(e))?"y":"x"}function m(e,t,r){void 0===r&&(r=!1);let n=d(e),o=h(v(e)),i=y(o),a="x"===o?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=g(a)),[a,g(a)]}function b(e){return e.replace(/start|end/g,e=>s[e])}function g(e){return e.replace(/left|right|bottom|top/g,e=>c[e])}function x(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function w(e){let{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function O(e,t,r){let n,{reference:o,floating:i}=e,a=v(t),l=h(v(t)),u=y(l),c=p(t),s="y"===a,f=o.x+o.width/2-i.width/2,m=o.y+o.height/2-i.height/2,b=o[u]/2-i[u]/2;switch(c){case"top":n={x:f,y:o.y-i.height};break;case"bottom":n={x:f,y:o.y+o.height};break;case"right":n={x:o.x+o.width,y:m};break;case"left":n={x:o.x-i.width,y:m};break;default:n={x:o.x,y:o.y}}switch(d(t)){case"start":n[l]-=b*(r&&s?-1:1);break;case"end":n[l]+=b*(r&&s?-1:1)}return n}let S=async(e,t,r)=>{let{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,l=i.filter(Boolean),u=await (null==a.isRTL?void 0:a.isRTL(t)),c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:s,y:f}=O(c,n,u),p=n,d={},h=0;for(let r=0;r<l.length;r++){let{name:i,fn:y}=l[r],{x:v,y:m,data:b,reset:g}=await y({x:s,y:f,initialPlacement:n,placement:p,strategy:o,middlewareData:d,rects:c,platform:a,elements:{reference:e,floating:t}});s=null!=v?v:s,f=null!=m?m:f,d={...d,[i]:{...d[i],...b}},g&&h<=50&&(h++,"object"==typeof g&&(g.placement&&(p=g.placement),g.rects&&(c=!0===g.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):g.rects),{x:s,y:f}=O(c,p,u)),r=-1)}return{x:s,y:f,placement:p,strategy:o,middlewareData:d}};async function j(e,t){var r;void 0===t&&(t={});let{x:n,y:o,platform:i,rects:a,elements:l,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:s="viewport",elementContext:p="floating",altBoundary:d=!1,padding:h=0}=f(t,e),y=x(h),v=l[d?"floating"===p?"reference":"floating":p],m=w(await i.getClippingRect({element:null==(r=await (null==i.isElement?void 0:i.isElement(v)))||r?v:v.contextElement||await (null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:c,rootBoundary:s,strategy:u})),b="floating"===p?{x:n,y:o,width:a.floating.width,height:a.floating.height}:a.reference,g=await (null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),O=await (null==i.isElement?void 0:i.isElement(g))&&await (null==i.getScale?void 0:i.getScale(g))||{x:1,y:1},S=w(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:b,offsetParent:g,strategy:u}):b);return{top:(m.top-S.top+y.top)/O.y,bottom:(S.bottom-m.bottom+y.bottom)/O.y,left:(m.left-S.left+y.left)/O.x,right:(S.right-m.right+y.right)/O.x}}function E(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 A(e){let t=o(...e.map(e=>e.left)),r=o(...e.map(e=>e.top));return{x:t,y:r,width:i(...e.map(e=>e.right))-t,height:i(...e.map(e=>e.bottom))-r}}async function T(e,t){let{placement:r,platform:n,elements:o}=e,i=await (null==n.isRTL?void 0:n.isRTL(o.floating)),a=p(r),l=d(r),u="y"===v(r),c=["left","top"].includes(a)?-1:1,s=i&&u?-1:1,h=f(t,e),{mainAxis:y,crossAxis:m,alignmentAxis:b}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return l&&"number"==typeof b&&(m="end"===l?-1*b:b),u?{x:m*s,y:y*c}:{x:y*c,y:m*s}}function k(){return"u">typeof window}function C(e){return N(e)?(e.nodeName||"").toLowerCase():"#document"}function M(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function _(e){var t;return null==(t=(N(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function N(e){return!!k()&&(e instanceof Node||e instanceof M(e).Node)}function D(e){return!!k()&&(e instanceof Element||e instanceof M(e).Element)}function I(e){return!!k()&&(e instanceof HTMLElement||e instanceof M(e).HTMLElement)}function R(e){return!(!k()||"u"<typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof M(e).ShadowRoot)}function L(e){let{overflow:t,overflowX:r,overflowY:n,display:o}=H(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function B(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch(e){return!1}})}function z(e){let t=F(),r=D(e)?H(e):e;return["transform","translate","scale","rotate","perspective"].some(e=>!!r[e]&&"none"!==r[e])||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||["transform","translate","scale","rotate","perspective","filter"].some(e=>(r.willChange||"").includes(e))||["paint","layout","strict","content"].some(e=>(r.contain||"").includes(e))}function F(){return!("u"<typeof CSS)&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}function U(e){return["html","body","#document"].includes(C(e))}function H(e){return M(e).getComputedStyle(e)}function W(e){return D(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function $(e){if("html"===C(e))return e;let t=e.assignedSlot||e.parentNode||R(e)&&e.host||_(e);return R(t)?t.host:t}function q(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);let o=function e(t){let r=$(t);return U(r)?t.ownerDocument?t.ownerDocument.body:t.body:I(r)&&L(r)?r:e(r)}(e),i=o===(null==(n=e.ownerDocument)?void 0:n.body),a=M(o);if(i){let e=V(a);return t.concat(a,a.visualViewport||[],L(o)?o:[],e&&r?q(e):[])}return t.concat(o,q(o,[],r))}function V(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function X(e){let t=H(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,o=I(e),i=o?e.offsetWidth:r,l=o?e.offsetHeight:n,u=a(r)!==i||a(n)!==l;return u&&(r=i,n=l),{width:r,height:n,$:u}}function G(e){return D(e)?e:e.contextElement}function Y(e){let t=G(e);if(!I(t))return u(1);let r=t.getBoundingClientRect(),{width:n,height:o,$:i}=X(t),l=(i?a(r.width):r.width)/n,c=(i?a(r.height):r.height)/o;return l&&Number.isFinite(l)||(l=1),c&&Number.isFinite(c)||(c=1),{x:l,y:c}}let K=u(0);function Z(e){let t=M(e);return F()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:K}function J(e,t,r,n){var o;void 0===t&&(t=!1),void 0===r&&(r=!1);let i=e.getBoundingClientRect(),a=G(e),l=u(1);t&&(n?D(n)&&(l=Y(n)):l=Y(e));let c=(void 0===(o=r)&&(o=!1),n&&(!o||n===M(a))&&o)?Z(a):u(0),s=(i.left+c.x)/l.x,f=(i.top+c.y)/l.y,p=i.width/l.x,d=i.height/l.y;if(a){let e=M(a),t=n&&D(n)?M(n):n,r=e,o=V(r);for(;o&&n&&t!==r;){let e=Y(o),t=o.getBoundingClientRect(),n=H(o),i=t.left+(o.clientLeft+parseFloat(n.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(n.paddingTop))*e.y;s*=e.x,f*=e.y,p*=e.x,d*=e.y,s+=i,f+=a,o=V(r=M(o))}}return w({width:p,height:d,x:s,y:f})}function Q(e,t){let r=W(e).scrollLeft;return t?t.left+r:J(_(e)).left+r}function ee(e,t,r){void 0===r&&(r=!1);let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-(r?0:Q(e,n)),y:n.top+t.scrollTop}}function et(e,t,r){var n;let o;if("viewport"===t)o=function(e,t){let r=M(e),n=_(e),o=r.visualViewport,i=n.clientWidth,a=n.clientHeight,l=0,u=0;if(o){i=o.width,a=o.height;let e=F();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,u=o.offsetTop)}return{width:i,height:a,x:l,y:u}}(e,r);else if("document"===t){let t,r,a,l,u,c,s;n=_(e),t=_(n),r=W(n),a=n.ownerDocument.body,l=i(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),u=i(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight),c=-r.scrollLeft+Q(n),s=-r.scrollTop,"rtl"===H(a).direction&&(c+=i(t.clientWidth,a.clientWidth)-l),o={width:l,height:u,x:c,y:s}}else if(D(t)){let e,n,i,a,l,c;n=(e=J(t,!0,"fixed"===r)).top+t.clientTop,i=e.left+t.clientLeft,a=I(t)?Y(t):u(1),l=t.clientWidth*a.x,c=t.clientHeight*a.y,o={width:l,height:c,x:i*a.x,y:n*a.y}}else{let r=Z(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return w(o)}function er(e){return"static"===H(e).position}function en(e,t){if(!I(e)||"fixed"===H(e).position)return null;if(t)return t(e);let r=e.offsetParent;return _(e)===r&&(r=r.ownerDocument.body),r}function eo(e,t){let r=M(e);if(B(e))return r;if(!I(e)){let t=$(e);for(;t&&!U(t);){if(D(t)&&!er(t))return t;t=$(t)}return r}let n=en(e,t);for(;n&&["table","td","th"].includes(C(n))&&er(n);)n=en(n,t);return n&&U(n)&&er(n)&&!z(n)?r:n||function(e){let t=$(e);for(;I(t)&&!U(t);){if(z(t))return t;if(B(t))break;t=$(t)}return null}(e)||r}let ei=async function(e){let t=this.getOffsetParent||eo,r=this.getDimensions,n=await r(e.floating);return{reference:function(e,t,r){let n=I(t),o=_(t),i="fixed"===r,a=J(e,!0,i,t),l={scrollLeft:0,scrollTop:0},c=u(0);if(n||!n&&!i)if(("body"!==C(t)||L(o))&&(l=W(t)),n){let e=J(t,!0,i,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else o&&(c.x=Q(o));let s=!o||n||i?u(0):ee(o,l);return{x:a.left+l.scrollLeft-c.x-s.x,y:a.top+l.scrollTop-c.y-s.y,width:a.width,height:a.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},ea={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e,i="fixed"===o,a=_(n),l=!!t&&B(t.floating);if(n===a||l&&i)return r;let c={scrollLeft:0,scrollTop:0},s=u(1),f=u(0),p=I(n);if((p||!p&&!i)&&(("body"!==C(n)||L(a))&&(c=W(n)),I(n))){let e=J(n);s=Y(n),f.x=e.x+n.clientLeft,f.y=e.y+n.clientTop}let d=!a||p||i?u(0):ee(a,c,!0);return{width:r.width*s.x,height:r.height*s.y,x:r.x*s.x-c.scrollLeft*s.x+f.x+d.x,y:r.y*s.y-c.scrollTop*s.y+f.y+d.y}},getDocumentElement:_,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:a}=e,l=[..."clippingAncestors"===r?B(t)?[]:function(e,t){let r=t.get(e);if(r)return r;let n=q(e,[],!1).filter(e=>D(e)&&"body"!==C(e)),o=null,i="fixed"===H(e).position,a=i?$(e):e;for(;D(a)&&!U(a);){let t=H(a),r=z(a);r||"fixed"!==t.position||(o=null),(i?!r&&!o:!r&&"static"===t.position&&!!o&&["absolute","fixed"].includes(o.position)||L(a)&&!r&&function e(t,r){let n=$(t);return!(n===r||!D(n)||U(n))&&("fixed"===H(n).position||e(n,r))}(e,a))?n=n.filter(e=>e!==a):o=t,a=$(a)}return t.set(e,n),n}(t,this._c):[].concat(r),n],u=l[0],c=l.reduce((e,r)=>{let n=et(t,r,a);return e.top=i(n.top,e.top),e.right=o(n.right,e.right),e.bottom=o(n.bottom,e.bottom),e.left=i(n.left,e.left),e},et(t,u,a));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},getOffsetParent:eo,getElementRects:ei,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:r}=X(e);return{width:t,height:r}},getScale:Y,isElement:D,isRTL:function(e){return"rtl"===H(e).direction}};function el(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function eu(e,t,r,n){let a;void 0===n&&(n={});let{ancestorScroll:u=!0,ancestorResize:c=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:f="function"==typeof IntersectionObserver,animationFrame:p=!1}=n,d=G(e),h=u||c?[...d?q(d):[],...q(t)]:[];h.forEach(e=>{u&&e.addEventListener("scroll",r,{passive:!0}),c&&e.addEventListener("resize",r)});let y=d&&f?function(e,t){let r,n=null,a=_(e);function u(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return!function c(s,f){void 0===s&&(s=!1),void 0===f&&(f=1),u();let p=e.getBoundingClientRect(),{left:d,top:h,width:y,height:v}=p;if(s||t(),!y||!v)return;let m={rootMargin:-l(h)+"px "+-l(a.clientWidth-(d+y))+"px "+-l(a.clientHeight-(h+v))+"px "+-l(d)+"px",threshold:i(0,o(1,f))||1},b=!0;function g(t){let n=t[0].intersectionRatio;if(n!==f){if(!b)return c();n?c(!1,n):r=setTimeout(()=>{c(!1,1e-7)},1e3)}1!==n||el(p,e.getBoundingClientRect())||c(),b=!1}try{n=new IntersectionObserver(g,{...m,root:a.ownerDocument})}catch(e){n=new IntersectionObserver(g,m)}n.observe(e)}(!0),u}(d,r):null,v=-1,m=null;s&&(m=new ResizeObserver(e=>{let[n]=e;n&&n.target===d&&m&&(m.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(t)})),r()}),d&&!p&&m.observe(d),m.observe(t));let b=p?J(e):null;return p&&function t(){let n=J(e);b&&!el(b,n)&&r(),b=n,a=requestAnimationFrame(t)}(),r(),()=>{var e;h.forEach(e=>{u&&e.removeEventListener("scroll",r),c&&e.removeEventListener("resize",r)}),null==y||y(),null==(e=m)||e.disconnect(),m=null,p&&cancelAnimationFrame(a)}}let ec=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var r,n;let{x:o,y:i,placement:a,middlewareData:l}=t,u=await T(t,e);return a===(null==(r=l.offset)?void 0:r.placement)&&null!=(n=l.arrow)&&n.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:a}}}}},es=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:a}=t,{mainAxis:l=!0,crossAxis:u=!1,limiter:c={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...s}=f(e,t),d={x:r,y:n},y=await j(t,s),m=v(p(a)),b=h(m),g=d[b],x=d[m];if(l){let e="y"===b?"top":"left",t="y"===b?"bottom":"right",r=g+y[e],n=g-y[t];g=i(r,o(g,n))}if(u){let e="y"===m?"top":"left",t="y"===m?"bottom":"right",r=x+y[e],n=x-y[t];x=i(r,o(x,n))}let w=c.fn({...t,[b]:g,[m]:x});return{...w,data:{x:w.x-r,y:w.y-n,enabled:{[b]:l,[m]:u}}}}}},ef=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var r,n,o,i,a;let l,u,c,{placement:s,middlewareData:h,rects:y,initialPlacement:x,platform:w,elements:O}=t,{mainAxis:S=!0,crossAxis:E=!0,fallbackPlacements:P,fallbackStrategy:A="bestFit",fallbackAxisSideDirection:T="none",flipAlignment:k=!0,...C}=f(e,t);if(null!=(r=h.arrow)&&r.alignmentOffset)return{};let M=p(s),_=v(x),N=p(x)===x,D=await (null==w.isRTL?void 0:w.isRTL(O.floating)),I=P||(N||!k?[g(x)]:(l=g(x),[b(x),l,b(l)])),R="none"!==T;!P&&R&&I.push(...(u=d(x),c=function(e,t,r){let n=["left","right"],o=["right","left"];switch(e){case"top":case"bottom":if(r)return t?o:n;return t?n:o;case"left":case"right":return t?["top","bottom"]:["bottom","top"];default:return[]}}(p(x),"start"===T,D),u&&(c=c.map(e=>e+"-"+u),k&&(c=c.concat(c.map(b)))),c));let L=[x,...I],B=await j(t,C),z=[],F=(null==(n=h.flip)?void 0:n.overflows)||[];if(S&&z.push(B[M]),E){let e=m(s,y,D);z.push(B[e[0]],B[e[1]])}if(F=[...F,{placement:s,overflows:z}],!z.every(e=>e<=0)){let e=((null==(o=h.flip)?void 0:o.index)||0)+1,t=L[e];if(t)return{data:{index:e,overflows:F},reset:{placement:t}};let r=null==(i=F.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:i.placement;if(!r)switch(A){case"bestFit":{let e=null==(a=F.filter(e=>{if(R){let t=v(e.placement);return t===_||"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:a[0];e&&(r=e);break}case"initialPlacement":r=x}if(s!==r)return{reset:{placement:r}}}return{}}}},ep=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var r,n;let a,l,{placement:u,rects:c,platform:s,elements:h}=t,{apply:y=()=>{},...m}=f(e,t),b=await j(t,m),g=p(u),x=d(u),w="y"===v(u),{width:O,height:S}=c.floating;"top"===g||"bottom"===g?(a=g,l=x===(await (null==s.isRTL?void 0:s.isRTL(h.floating))?"start":"end")?"left":"right"):(l=g,a="end"===x?"top":"bottom");let E=S-b.top-b.bottom,P=O-b.left-b.right,A=o(S-b[a],E),T=o(O-b[l],P),k=!t.middlewareData.shift,C=A,M=T;if(null!=(r=t.middlewareData.shift)&&r.enabled.x&&(M=P),null!=(n=t.middlewareData.shift)&&n.enabled.y&&(C=E),k&&!x){let e=i(b.left,0),t=i(b.right,0),r=i(b.top,0),n=i(b.bottom,0);w?M=O-2*(0!==e||0!==t?e+t:i(b.left,b.right)):C=S-2*(0!==r||0!==n?r+n:i(b.top,b.bottom))}await y({...t,availableWidth:M,availableHeight:C});let _=await s.getDimensions(h.floating);return O!==_.width||S!==_.height?{reset:{rects:!0}}:{}}}},ed=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r}=t,{strategy:n="referenceHidden",...o}=f(e,t);switch(n){case"referenceHidden":{let e=E(await j(t,{...o,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:P(e)}}}case"escaped":{let e=E(await j(t,{...o,altBoundary:!0}),r.floating);return{data:{escapedOffsets:e,escaped:P(e)}}}default:return{}}}}},eh=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:n,placement:a,rects:l,platform:u,elements:c,middlewareData:s}=t,{element:p,padding:m=0}=f(e,t)||{};if(null==p)return{};let b=x(m),g={x:r,y:n},w=h(v(a)),O=y(w),S=await u.getDimensions(p),j="y"===w,E=j?"clientHeight":"clientWidth",P=l.reference[O]+l.reference[w]-g[w]-l.floating[O],A=g[w]-l.reference[w],T=await (null==u.getOffsetParent?void 0:u.getOffsetParent(p)),k=T?T[E]:0;k&&await (null==u.isElement?void 0:u.isElement(T))||(k=c.floating[E]||l.floating[O]);let C=k/2-S[O]/2-1,M=o(b[j?"top":"left"],C),_=o(b[j?"bottom":"right"],C),N=k-S[O]-_,D=k/2-S[O]/2+(P/2-A/2),I=i(M,o(D,N)),R=!s.arrow&&null!=d(a)&&D!==I&&l.reference[O]/2-(D<M?M:_)-S[O]/2<0,L=R?D<M?D-M:D-N:0;return{[w]:g[w]+L,data:{[w]:I,centerOffset:D-I-L,...R&&{alignmentOffset:L}},reset:R}}}),ey=function(e){return void 0===e&&(e={}),{options:e,fn(t){let{x:r,y:n,placement:o,rects:i,middlewareData:a}=t,{offset:l=0,mainAxis:u=!0,crossAxis:c=!0}=f(e,t),s={x:r,y:n},d=v(o),y=h(d),m=s[y],b=s[d],g=f(l,t),x="number"==typeof g?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(u){let e="y"===y?"height":"width",t=i.reference[y]-i.floating[e]+x.mainAxis,r=i.reference[y]+i.reference[e]-x.mainAxis;m<t?m=t:m>r&&(m=r)}if(c){var w,O;let e="y"===y?"width":"height",t=["top","left"].includes(p(o)),r=i.reference[d]-i.floating[e]+(t&&(null==(w=a.offset)?void 0:w[d])||0)+(t?0:x.crossAxis),n=i.reference[d]+i.reference[e]+(t?0:(null==(O=a.offset)?void 0:O[d])||0)-(t?x.crossAxis:0);b<r?b=r:b>n&&(b=n)}return{[y]:m,[d]:b}}}},ev=(e,t,r)=>{let n=new Map,o={platform:ea,...r},i={...o.platform,_c:n};return S(e,t,{...o,platform:i})};e.s(["arrow",0,eh,"autoPlacement",0,function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,o,i,a;let{rects:l,middlewareData:u,placement:c,platform:s,elements:h}=t,{crossAxis:y=!1,alignment:v,allowedPlacements:g=n,autoAlignment:x=!0,...w}=f(e,t),O=void 0!==v||g===n?((a=v||null)?[...g.filter(e=>d(e)===a),...g.filter(e=>d(e)!==a)]:g.filter(e=>p(e)===e)).filter(e=>!a||d(e)===a||!!x&&b(e)!==e):g,S=await j(t,w),E=(null==(r=u.autoPlacement)?void 0:r.index)||0,P=O[E];if(null==P)return{};let A=m(P,l,await (null==s.isRTL?void 0:s.isRTL(h.floating)));if(c!==P)return{reset:{placement:O[0]}};let T=[S[p(P)],S[A[0]],S[A[1]]],k=[...(null==(o=u.autoPlacement)?void 0:o.overflows)||[],{placement:P,overflows:T}],C=O[E+1];if(C)return{data:{index:E+1,overflows:k},reset:{placement:C}};let M=k.map(e=>{let t=d(e.placement);return[e.placement,t&&y?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),_=(null==(i=M.filter(e=>e[2].slice(0,d(e[0])?2:3).every(e=>e<=0))[0])?void 0:i[0])||M[0][0];return _!==c?{data:{index:E+1,overflows:k},reset:{placement:_}}:{}}}},"autoUpdate",0,eu,"computePosition",0,ev,"flip",0,ef,"hide",0,ed,"inline",0,function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){let{placement:r,elements:n,rects:a,platform:l,strategy:u}=t,{padding:c=2,x:s,y:d}=f(e,t),h=Array.from(await (null==l.getClientRects?void 0:l.getClientRects(n.reference))||[]),y=function(e){let t=e.slice().sort((e,t)=>e.y-t.y),r=[],n=null;for(let e=0;e<t.length;e++){let o=t[e];!n||o.y-n.y>n.height/2?r.push([o]):r[r.length-1].push(o),n=o}return r.map(e=>w(A(e)))}(h),m=w(A(h)),b=x(c),g=await l.getElementRects({reference:{getBoundingClientRect:function(){if(2===y.length&&y[0].left>y[1].right&&null!=s&&null!=d)return y.find(e=>s>e.left-b.left&&s<e.right+b.right&&d>e.top-b.top&&d<e.bottom+b.bottom)||m;if(y.length>=2){if("y"===v(r)){let e=y[0],t=y[y.length-1],n="top"===p(r),o=e.top,i=t.bottom,a=n?e.left:t.left,l=n?e.right:t.right;return{top:o,bottom:i,left:a,right:l,width:l-a,height:i-o,x:a,y:o}}let e="left"===p(r),t=i(...y.map(e=>e.right)),n=o(...y.map(e=>e.left)),a=y.filter(r=>e?r.left===n:r.right===t),l=a[0].top,u=a[a.length-1].bottom;return{top:l,bottom:u,left:n,right:t,width:t-n,height:u-l,x:n,y:l}}return m}},floating:n.floating,strategy:u});return a.reference.x!==g.reference.x||a.reference.y!==g.reference.y||a.reference.width!==g.reference.width||a.reference.height!==g.reference.height?{reset:{rects:g}}:{}}}},"limitShift",0,ey,"offset",0,ec,"shift",0,es,"size",0,ep],53760);var em=e.i(74080),eb="u">typeof document?t.useLayoutEffect:t.useEffect;function eg(e,t){let r,n,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((r=e.length)!==t.length)return!1;for(n=r;0!=n--;)if(!eg(e[n],t[n]))return!1;return!0}if((r=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!({}).hasOwnProperty.call(t,o[n]))return!1;for(n=r;0!=n--;){let r=o[n];if(("_owner"!==r||!e.$$typeof)&&!eg(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function ex(e){return"u"<typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ew(e,t){let r=ex(e);return Math.round(t*r)/r}function eO(e){let r=t.useRef(e);return eb(()=>{r.current=e}),r}function eS(e){void 0===e&&(e={});let{placement:r="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:a,floating:l}={},transform:u=!0,whileElementsMounted:c,open:s}=e,[f,p]=t.useState({x:0,y:0,strategy:n,placement:r,middlewareData:{},isPositioned:!1}),[d,h]=t.useState(o);eg(d,o)||h(o);let[y,v]=t.useState(null),[m,b]=t.useState(null),g=t.useCallback(e=>{e!==S.current&&(S.current=e,v(e))},[]),x=t.useCallback(e=>{e!==j.current&&(j.current=e,b(e))},[]),w=a||y,O=l||m,S=t.useRef(null),j=t.useRef(null),E=t.useRef(f),P=null!=c,A=eO(c),T=eO(i),k=eO(s),C=t.useCallback(()=>{if(!S.current||!j.current)return;let e={placement:r,strategy:n,middleware:d};T.current&&(e.platform=T.current),ev(S.current,j.current,e).then(e=>{let t={...e,isPositioned:!1!==k.current};M.current&&!eg(E.current,t)&&(E.current=t,em.flushSync(()=>{p(t)}))})},[d,r,n,T,k]);eb(()=>{!1===s&&E.current.isPositioned&&(E.current.isPositioned=!1,p(e=>({...e,isPositioned:!1})))},[s]);let M=t.useRef(!1);eb(()=>(M.current=!0,()=>{M.current=!1}),[]),eb(()=>{if(w&&(S.current=w),O&&(j.current=O),w&&O){if(A.current)return A.current(w,O,C);C()}},[w,O,C,A,P]);let _=t.useMemo(()=>({reference:S,floating:j,setReference:g,setFloating:x}),[g,x]),N=t.useMemo(()=>({reference:w,floating:O}),[w,O]),D=t.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=ew(N.floating,f.x),r=ew(N.floating,f.y);return u?{...e,transform:"translate("+t+"px, "+r+"px)",...ex(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,u,N.floating,f.x,f.y]);return t.useMemo(()=>({...f,update:C,refs:_,elements:N,floatingStyles:D}),[f,C,_,N,D])}let ej=(e,t)=>({...ec(e),options:[e,t]}),eE=(e,t)=>({...es(e),options:[e,t]}),eP=(e,t)=>({...ey(e),options:[e,t]}),eA=(e,t)=>({...ef(e),options:[e,t]}),eT=(e,t)=>({...ep(e),options:[e,t]}),ek=(e,t)=>({...ed(e),options:[e,t]}),eC=(e,t)=>({name:"arrow",options:e,fn(t){let{element:r,padding:n}="function"==typeof e?e(t):e;return r&&({}).hasOwnProperty.call(r,"current")?null!=r.current?eh({element:r.current,padding:n}).fn(t):{}:r?eh({element:r,padding:n}).fn(t):{}},options:[e,t]});e.s(["arrow",0,eC,"flip",0,eA,"hide",0,ek,"limitShift",0,eP,"offset",0,ej,"shift",0,eE,"size",0,eT,"useFloating",0,eS],58950);var eM=e.i(48425),e_=e.i(43476),eN=t.forwardRef((e,t)=>{let{children:r,width:n=10,height:o=5,...i}=e;return(0,e_.jsx)(eM.Primitive.svg,{...i,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:(0,e_.jsx)("polygon",{points:"0,0 30,0 15,10"})})});eN.displayName="Arrow";var eD=e.i(20783),eI=e.i(30030),eR=e.i(30207),eL=e.i(34620);function eB(e){let[r,n]=t.useState(void 0);return(0,eL.useLayoutEffect)(()=>{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]),r}e.s(["useSize",0,eB],35804);var ez="Popper",[eF,eU]=(0,eI.createContextScope)(ez),[eH,eW]=eF(ez),e$=e=>{let{__scopePopper:r,children:n}=e,[o,i]=t.useState(null);return(0,e_.jsx)(eH,{scope:r,anchor:o,onAnchorChange:i,children:n})};e$.displayName=ez;var eq="PopperAnchor",eV=t.forwardRef((e,r)=>{let{__scopePopper:n,virtualRef:o,...i}=e,a=eW(eq,n),l=t.useRef(null),u=(0,eD.useComposedRefs)(r,l);return t.useEffect(()=>{a.onAnchorChange(o?.current||l.current)}),o?null:(0,e_.jsx)(eM.Primitive.div,{...i,ref:u})});eV.displayName=eq;var eX="PopperContent",[eG,eY]=eF(eX),eK=t.forwardRef((e,r)=>{let{__scopePopper:n,side:o="bottom",sideOffset:i=0,align:a="center",alignOffset:l=0,arrowPadding:u=0,avoidCollisions:c=!0,collisionBoundary:s=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:d=!1,updatePositionStrategy:h="optimized",onPlaced:y,...v}=e,m=eW(eX,n),[b,g]=t.useState(null),x=(0,eD.useComposedRefs)(r,e=>g(e)),[w,O]=t.useState(null),S=eB(w),j=S?.width??0,E=S?.height??0,P="number"==typeof f?f:{top:0,right:0,bottom:0,left:0,...f},A=Array.isArray(s)?s:[s],T=A.length>0,k={padding:P,boundary:A.filter(e0),altBoundary:T},{refs:C,floatingStyles:M,placement:_,isPositioned:N,middlewareData:D}=eS({strategy:"fixed",placement:o+("center"!==a?"-"+a:""),whileElementsMounted:(...e)=>eu(...e,{animationFrame:"always"===h}),elements:{reference:m.anchor},middleware:[ej({mainAxis:i+E,alignmentAxis:l}),c&&eE({mainAxis:!0,crossAxis:!1,limiter:"partial"===p?eP():void 0,...k}),c&&eA({...k}),eT({...k,apply:({elements:e,rects:t,availableWidth:r,availableHeight:n})=>{let{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${r}px`),a.setProperty("--radix-popper-available-height",`${n}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),w&&eC({element:w,padding:u}),e1({arrowWidth:j,arrowHeight:E}),d&&ek({strategy:"referenceHidden",...k})]}),[I,R]=e2(_),L=(0,eR.useCallbackRef)(y);(0,eL.useLayoutEffect)(()=>{N&&L?.()},[N,L]);let B=D.arrow?.x,z=D.arrow?.y,F=D.arrow?.centerOffset!==0,[U,H]=t.useState();return(0,eL.useLayoutEffect)(()=>{b&&H(window.getComputedStyle(b).zIndex)},[b]),(0,e_.jsx)("div",{ref:C.setFloating,"data-radix-popper-content-wrapper":"",style:{...M,transform:N?M.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:U,"--radix-popper-transform-origin":[D.transformOrigin?.x,D.transformOrigin?.y].join(" "),...D.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,e_.jsx)(eG,{scope:n,placedSide:I,onArrowChange:O,arrowX:B,arrowY:z,shouldHideArro