1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[414],{1147:function(e,t,n){"use strict";n.d(t,{Ry:function(){return c}});var r=new WeakMap,o=new WeakMap,i={},a=0,l=function(e){return e&&(e.host||l(e.parentNode))},u=function(e,t,n,u){var c=(Array.isArray(e)?e:[e]).map(function(e){if(t.contains(e))return e;var n=l(e);return n&&t.contains(n)?n:(console.error("aria-hidden",e,"in not contained inside",t,". Doing nothing"),null)}).filter(function(e){return!!e});i[n]||(i[n]=new WeakMap);var s=i[n],d=[],f=new Set,p=new Set(c),m=function(e){!e||f.has(e)||(f.add(e),m(e.parentNode))};c.forEach(m);var v=function(e){!e||p.has(e)||Array.prototype.forEach.call(e.children,function(e){if(f.has(e))v(e);else try{var t=e.getAttribute(u),i=null!==t&&"false"!==t,a=(r.get(e)||0)+1,l=(s.get(e)||0)+1;r.set(e,a),s.set(e,l),d.push(e),1===a&&i&&o.set(e,!0),1===l&&e.setAttribute(n,"true"),i||e.setAttribute(u,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return v(t),f.clear(),a++,function(){d.forEach(function(e){var t=r.get(e)-1,i=s.get(e)-1;r.set(e,t),s.set(e,i),t||(o.has(e)||e.removeAttribute(u),o.delete(e)),i||e.removeAttribute(n)}),--a||(r=new WeakMap,r=new WeakMap,o=new WeakMap,i={})}},c=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||("undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),u(r,o,n,"aria-hidden")):function(){return null}}},2862:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(7137).Z)("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},8937:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(7137).Z)("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},7244:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(7137).Z)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},6037:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(7137).Z)("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]])},5427:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(7137).Z)("Github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]])},6978:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(7137).Z)("Linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]])},8375:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(7137).Z)("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]])},445:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(7137).Z)("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]])},3597:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(7137).Z)("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]])},4220:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(7137).Z)("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]])},6622:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(7137).Z)("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]])},105:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(7137).Z)("Twitter",[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]])},5762:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(7137).Z)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
1],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},9908:function(e,t,n){"use strict";n.d(t,{default:function(){return o.a}});var r=n(2020),o=n.n(r)},5184:function(e,t,n){"use strict";var r=n(2279);n.o(r,"usePathname")&&n.d(t,{usePathname:function(){return r.usePathname}})},1005:function(e,t,n){"use strict";n.d(t,{Z:function(){return q}});var r,o,i,a,l,u,c,s=function(){return(s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function d(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);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}"function"==typeof SuppressedError&&SuppressedError;var f=n(9334),p="right-scroll-bar-position",m="width-before-scroll-bar";function v(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var h="undefined"!=typeof window?f.useLayoutEffect:f.useEffect,g=new WeakMap,y=(void 0===o&&(o={}),(void 0===i&&(i=function(e){return e}),a=[],l=!1,u={read:function(){if(l)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return a.length?a[a.length-1]:null},useMedium:function(e){var t=i(e,l);return a.push(t),function(){a=a.filter(function(e){return e!==t})}},assignSyncMedium:function(e){for(l=!0;a.length;){var t=a;a=[],t.forEach(e)}a={push:function(t){return e(t)},filter:function(){return a}}},assignMedium:function(e){l=!0;var t=[];if(a.length){var n=a;a=[],n.forEach(e),t=a}var r=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(r)};o(),a={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),a}}}}).options=s({async:!0,ssr:!1},o),u),w=function(){},b=f.forwardRef(function(e,t){var n,r,o,i,a=f.useRef(null),l=f.useState({onScrollCapture:w,onWheelCapture:w,onTouchMoveCapture:w}),u=l[0],c=l[1],p=e.forwardProps,m=e.children,b=e.className,x=e.removeScrollBar,E=e.enabled,C=e.shards,M=e.sideCar,R=e.noRelative,k=e.noIsolation,S=e.inert,T=e.allowPinchZoom,A=e.as,D=e.gapMode,j=d(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=(n=[a,t],r=function(e){return n.forEach(function(t){return v(t,e)})},(o=(0,f.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,i=o.facade,h(function(){var e=g.get(i);if(e){var t=new Set(e),r=new Set(n),o=i.current;t.forEach(function(e){r.has(e)||v(e,null)}),r.forEach(function(e){t.has(e)||v(e,o)})}g.set(i,n)},[n]),i),P=s(s({},j),u);return f.createElement(f.Fragment,null,E&&f.createElement(M,{sideCar:y,removeScrollBar:x,shards:C,noRelative:R,noIsolation:k,inert:S,setCallbacks:c,allowPinchZoom:!!T,lockRef:a,gapMode:D}),p?f.cloneElement(f.Children.only(m),s(s({},P),{ref:N})):f.createElement(void 0===A?"div":A,s({},P,{className:b,ref:N}),m))});b.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},b.classNames={fullWidth:m,zeroRight:p};var x=function(e){var t=e.sideCar,n=d(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 f.createElement(r,s({},n))};x.isSideCarExport=!0;var E=function(){var e=0,t=null;return{add:function(o){if(0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=r||n.nc;return t&&e.setAttribute("nonce",t),e}())){var i,a;(i=t).styleSheet?i.styleSheet.cssText=o:i.appendChild(document.createTextNode(o)),a=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(a)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},C=function(){var e=E();return function(t,n){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},M=function(){var e=C();return function(t){return e(t.styles,t.dynamic),null}},R={left:0,top:0,right:0,gap:0},k=function(e){return parseInt(e||"",10)||0},S=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[k(n),k(r),k(o)]},T=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return R;var t=S(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])}},A=M(),D="data-scroll-locked",j=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,l=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(l,"px ").concat(r,";\n }\n body[").concat(D,"] {\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(l,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(l,"px ").concat(r,";
1")].filter(Boolean).join(""),"\n }\n \n .").concat(p," {\n right: ").concat(l,"px ").concat(r,";\n }\n \n .").concat(m," {\n margin-right: ").concat(l,"px ").concat(r,";\n }\n \n .").concat(p," .").concat(p," {\n right: 0 ").concat(r,";\n }\n \n .").concat(m," .").concat(m," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(D,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(l,"px;\n }\n")},N=function(){var e=parseInt(document.body.getAttribute(D)||"0",10);return isFinite(e)?e:0},P=function(){f.useEffect(function(){return document.body.setAttribute(D,(N()+1).toString()),function(){var e=N()-1;e<=0?document.body.removeAttribute(D):document.body.setAttribute(D,e.toString())}},[])},O=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;P();var i=f.useMemo(function(){return T(o)},[o]);return f.createElement(A,{styles:j(i,!t,o,n?"":"!important")})},L=!1;if("undefined"!=typeof window)try{var _=Object.defineProperty({},"passive",{get:function(){return L=!0,!0}});window.addEventListener("test",_,_),window.removeEventListener("test",_,_)}catch(e){L=!1}var I=!!L&&{passive:!1},F=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&"TEXTAREA"!==e.tagName&&"visible"===n[t])},W=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),V(e,r)){var o=B(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},V=function(e,t){return"v"===e?F(t,"overflowY"):F(t,"overflowX")},B=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},K=function(e,t,n,r,o){var i,a=(i=window.getComputedStyle(t).direction,"h"===e&&"rtl"===i?-1:1),l=a*r,u=n.target,c=t.contains(u),s=!1,d=l>0,f=0,p=0;do{if(!u)break;var m=B(e,u),v=m[0],h=m[1]-m[2]-a*v;(v||h)&&V(e,u)&&(f+=h,p+=v);var g=u.parentNode;u=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&u!==document.body||c&&(t.contains(u)||t===u));return d&&(o&&1>Math.abs(f)||!o&&l>f)?s=!0:!d&&(o&&1>Math.abs(p)||!o&&-l>p)&&(s=!0),s},Z=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},z=function(e){return[e.deltaX,e.deltaY]},H=function(e){return e&&"current"in e?e.current:e},U=0,X=[],G=(c=function(e){var t=f.useRef([]),n=f.useRef([0,0]),r=f.useRef(),o=f.useState(U++)[0],i=f.useState(M)[0],a=f.useRef(e);f.useEffect(function(){a.current=e},[e]),f.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;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))})([e.lockRef.current],(e.shards||[]).map(H),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=f.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!a.current.allowPinchZoom;var o,i=Z(e),l=n.current,u="deltaX"in e?e.deltaX:l[0]-i[0],c="deltaY"in e?e.deltaY:l[1]-i[1],s=e.target,d=Math.abs(u)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===s.type)return!1;var f=W(d,s);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=W(d,s)),!f)return!1;if(!r.current&&"changedTouches"in e&&(u||c)&&(r.current=o),!o)return!0;var p=r.current||o;return K(p,t,e,"h"===p?u:c,!0)},[]),u=f.useCallback(function(e){if(X.length&&X[X.length-1]===i){var n="deltaY"in e?z(e):Z(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=(a.current.shards||[]).map(H).filter(Boolean).filter(function(t){return t.contains(e.target)});(o.length>0?l(e,o[0]):!a.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),c=f.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)},[]),s=f.useCallback(function(e){n.current=Z(e),r.current=void 0},[]),d=f.useCallback(function(t){c(t.type,z(t),t.target,l(t,e.lockRef.current))},[]),p=f.useCallback(function(t){c(t.type,Z(t),t.target,l(t,e.lockRef.current))},[]);f.useEffect(function(){return X.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",u,I),document.addEventListener("touchmove",u,I),document.addEventListener("touchstart",s,I),function(){X=X.filter(function(e){return e!==i}),document.removeEventListener("wheel",u,I),document.removeEventListener("touchmove",u,I),document.removeEventListener("touchstart",s,I)}},[]);var m=e.removeScrollBar,v=e.inert;return f.createElement(f.Fragment,null,v?f.createElement(i,{styles:"\n .block-interactivity-".concat(o," {pointer-events: none;}\n .allow-interactivity-").concat(o," {pointer-events: all;}\n")}):null,m?f.createElement(O,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},y.useMedium(c),x),Y=f.forwardRef(function(e,t){return f.createElement(b,s({},e,{ref:t,sideCar:G}))});Y.classNames=b.classNames;var q=Y},7195:function(e){e.exports={style:{fontFamily:"'__Inter_f367f3', '__Inter_Fallback_f367f3'",fontStyle:"normal"},className:"__className_f367f3",variable:"__variable_f367f3"}},4793:function(e){e.exports={style:{fontFamily:"'__JetBrains_Mono_3c557b', '__JetBrains_Mono_Fallback_3c557b'",fontStyle:"normal"},className:"__className_3c557b",variable:"__variable_3c557b"}},5477:function(e,t,n){"use strict";function r(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}n.d(t,{M:function(){return r}})},1068:function(e,t,n){"use strict";n.d(t,{F:function(){return i},e:function(){return a}});var r=n(9334);function o(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function i(...e){return t=>{let n=!1,r=e.map(e=>{let r=o(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];"function"==typeof n?n():o(e[t],null)}}}}function a(...e){return r.useCallback(i(...e),e)}},1940:function(e,t,n){"use strict";n.d(t,{b:function(){return a},k:function(){return i}});var r=n(9334),o=n(6287);function i(e,t){let n=r.createContext(t),i=e=>{let{children:t,...i}=e,a=r.useMemo(()=>i,Object.values(i));return(0,o.jsx)(n.Provider,{value:a,children:t})};return i.displayName=e+"Provider",[i,function(o){let i=r.useContext(n);if(i)return i;if(void 0!==t)return t;throw Error(`\`${o}\` must be used within \`${e}\``)}]}function a(e,t=[]){let n=[],i=()=>{let t=n.map(e=>r.createContext(e));return function(n){let o=n?.[e]||t;return r.useMemo(()=>({[`__scope${e}`]:{...n,[e]:o}}),[n,o])}};return i.scopeName=e,[function(t,i){let a=r.createContext(i),l=n.length;n=[...n,i];let u=t=>{let{scope:n,children:i,...u}=t,c=n?.[e]?.[l]||a,s=r.useMemo(()=>u,Object.values(u));return(0,o.jsx)(c.Provider,{value:s,children:i})};return u.displayName=t+"Provider",[u,function(n,o){let u=o?.[e]?.[l]||a,c=r.useContext(u);if(c)return c;if(void 0!==i)return i;throw Error(`\`${n}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let o=n.reduce((t,{useScope:n,scopeName:r})=>{let o=n(e)[`__scope${r}`];return{...t,...o}},{});return r.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}(i,...t)]}},1293:function(e,t,n){"use strict";n.d(t,{Dx:function(){return en},VY:function(){return et},aV:function(){return ee},dk:function(){return er},fC:function(){return $},h_:function(){return Q},x8:function(){return eo},xz:function(){return J}});var r=n(9334),o=n(5477),i=n(1068),a=n(1940),l=n(7624),u=n(22),c=n(9592),s=n(3452),d=n(4355),f=n(9430),p=n(6147),m=n(4252),v=n(1005),h=n(1147),g=n(2078),y=n(6287),w="Dialog",[b,x]=(0,a.b)(w),[E,C]=b(w),M=e=>{let{__scopeDialog:t,children:n,open:o,defaultOpen:i,onOpenChange:a,modal:c=!0}=e,s=r.useRef(null),d=r.useRef(null),[f=!1,p]=(0,u.T)({prop:o,defaultProp:i,onChange:a});return(0,y.jsx)(E,{scope:t,triggerRef:s,contentRef:d,contentId:(0,l.M)(),titleId:(0,l.M)(),descriptionId:(0,l.M)(),open:f,onOpenChange:p,onOpenToggle:r.useCallback(()=>p(e=>!e),[p]),modal:c,children:n})};M.displayName=w;var R="DialogTrigger",k=r.forwardRef((e,t)=>
1{let{__scopeDialog:n,...r}=e,a=C(R,n),l=(0,i.e)(t,a.triggerRef);return(0,y.jsx)(p.WV.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":H(a.open),...r,ref:l,onClick:(0,o.M)(e.onClick,a.onOpenToggle)})});k.displayName=R;var S="DialogPortal",[T,A]=b(S,{forceMount:void 0}),D=e=>{let{__scopeDialog:t,forceMount:n,children:o,container:i}=e,a=C(S,t);return(0,y.jsx)(T,{scope:t,forceMount:n,children:r.Children.map(o,e=>(0,y.jsx)(f.z,{present:n||a.open,children:(0,y.jsx)(d.h,{asChild:!0,container:i,children:e})}))})};D.displayName=S;var j="DialogOverlay",N=r.forwardRef((e,t)=>{let n=A(j,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=C(j,e.__scopeDialog);return i.modal?(0,y.jsx)(f.z,{present:r||i.open,children:(0,y.jsx)(P,{...o,ref:t})}):null});N.displayName=j;var P=r.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,o=C(j,n);return(0,y.jsx)(v.Z,{as:g.g7,allowPinchZoom:!0,shards:[o.contentRef],children:(0,y.jsx)(p.WV.div,{"data-state":H(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),O="DialogContent",L=r.forwardRef((e,t)=>{let n=A(O,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=C(O,e.__scopeDialog);return(0,y.jsx)(f.z,{present:r||i.open,children:i.modal?(0,y.jsx)(_,{...o,ref:t}):(0,y.jsx)(I,{...o,ref:t})})});L.displayName=O;var _=r.forwardRef((e,t)=>{let n=C(O,e.__scopeDialog),a=r.useRef(null),l=(0,i.e)(t,n.contentRef,a);return r.useEffect(()=>{let e=a.current;if(e)return(0,h.Ry)(e)},[]),(0,y.jsx)(F,{...e,ref:l,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,o.M)(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),null===(t=n.triggerRef.current)||void 0===t||t.focus()}),onPointerDownOutside:(0,o.M)(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:(0,o.M)(e.onFocusOutside,e=>e.preventDefault())})}),I=r.forwardRef((e,t)=>{let n=C(O,e.__scopeDialog),o=r.useRef(!1),i=r.useRef(!1);return(0,y.jsx)(F,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var r,a;null===(r=e.onCloseAutoFocus)||void 0===r||r.call(e,t),t.defaultPrevented||(o.current||null===(a=n.triggerRef.current)||void 0===a||a.focus(),t.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:t=>{var r,a;null===(r=e.onInteractOutside)||void 0===r||r.call(e,t),t.defaultPrevented||(o.current=!0,"pointerdown"!==t.detail.originalEvent.type||(i.current=!0));let l=t.target;(null===(a=n.triggerRef.current)||void 0===a?void 0:a.contains(l))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&i.current&&t.preventDefault()}})}),F=r.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:l,...u}=e,d=C(O,n),f=r.useRef(null),p=(0,i.e)(t,f);return(0,m.EW)(),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(s.M,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:a,onUnmountAutoFocus:l,children:(0,y.jsx)(c.XB,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":H(d.open),...u,ref:p,onDismiss:()=>d.onOpenChange(!1)})}),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Y,{titleId:d.titleId}),(0,y.jsx)(q,{contentRef:f,descriptionId:d.descriptionId})]})]})}),W="DialogTitle",V=r.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,o=C(W,n);return(0,y.jsx)(p.WV.h2,{id:o.titleId,...r,ref:t})});V.displayName=W;var B="DialogDescription",K=r.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,o=C(B,n);return(0,y.jsx)(p.WV.p,{id:o.descriptionId,...r,ref:t})});K.displayName=B;var Z="DialogClose",z=r.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=C(Z,n);return(0,y.jsx)(p.WV.button,{type:"button",...r,ref:t,onClick:(0,o.M)(e.onClick,()=>i.onOpenChange(!1))})});function H(e){return e?"open":"closed"}z.displayName=Z;var U="DialogTitleWarning",[X,G]=(0,a.k)(U,{contentName:O,titleName:W,docsSlug:"dialog"}),Y=e=>{let{titleId:t}=e,n=G(U),o="`".concat(n.contentName,"` requires a `").concat(n.titleName,"` for the component to be accessible for screen reader users.\n\nIf you want to hide the `").concat(n.titleName,"`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/").concat(n.docsSlug);return r.useEffect(()=>{t&&!document.getElementById(t)&&console.error(o)},[o,t]),null},q=e=>{let{contentRef:t,descriptionId:n}=e,o=G("DialogDescriptionWarning"),i="Warning: Missing `Description` or `aria-describedby={undefined}` for {".concat(o.contentName,"}.");return r.useEffect(()=>{var e;let r=null===(e=t.current)||void 0===e?void 0:e.getAttribute("aria-describedby");n&&r&&!document.getElementById(n)&&console.warn(i)},[i,t,n]),null},$=M,J=k,Q=D,ee=N,et=L,en=V,er=K,eo=z},9592:function(e,t,n){"use strict";n.d(t,{XB:function(){return f}});var r,o=n(9334),i=n(5477),a=n(6147),l=n(1068),u=n(4382),c=n(6287),s="dismissableLayer.update",d=o.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),f=o.forwardRef((e,t)=>
1{var n,f;let{disableOutsidePointerEvents:v=!1,onEscapeKeyDown:h,onPointerDownOutside:g,onFocusOutside:y,onInteractOutside:w,onDismiss:b,...x}=e,E=o.useContext(d),[C,M]=o.useState(null),R=null!==(f=null==C?void 0:C.ownerDocument)&&void 0!==f?f:null===(n=globalThis)||void 0===n?void 0:n.document,[,k]=o.useState({}),S=(0,l.e)(t,e=>M(e)),T=Array.from(E.layers),[A]=[...E.layersWithOutsidePointerEventsDisabled].slice(-1),D=T.indexOf(A),j=C?T.indexOf(C):-1,N=E.layersWithOutsidePointerEventsDisabled.size>0,P=j>=D,O=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===(t=globalThis)||void 0===t?void 0:t.document,r=(0,u.W)(e),i=o.useRef(!1),a=o.useRef(()=>{});return o.useEffect(()=>{let e=e=>{if(e.target&&!i.current){let t=function(){m("dismissableLayer.pointerDownOutside",r,o,{discrete:!0})},o={originalEvent:e};"touch"===e.pointerType?(n.removeEventListener("click",a.current),a.current=t,n.addEventListener("click",a.current,{once:!0})):t()}else n.removeEventListener("click",a.current);i.current=!1},t=window.setTimeout(()=>{n.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(t),n.removeEventListener("pointerdown",e),n.removeEventListener("click",a.current)}},[n,r]),{onPointerDownCapture:()=>i.current=!0}}(e=>{let t=e.target,n=[...E.branches].some(e=>e.contains(t));!P||n||(null==g||g(e),null==w||w(e),e.defaultPrevented||null==b||b())},R),L=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===(t=globalThis)||void 0===t?void 0:t.document,r=(0,u.W)(e),i=o.useRef(!1);return o.useEffect(()=>{let e=e=>{e.target&&!i.current&&m("dismissableLayer.focusOutside",r,{originalEvent:e},{discrete:!1})};return n.addEventListener("focusin",e),()=>n.removeEventListener("focusin",e)},[n,r]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}(e=>{let t=e.target;[...E.branches].some(e=>e.contains(t))||(null==y||y(e),null==w||w(e),e.defaultPrevented||null==b||b())},R);return!function(e,t=globalThis?.document){let n=(0,u.W)(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=>{j!==E.layers.size-1||(null==h||h(e),!e.defaultPrevented&&b&&(e.preventDefault(),b()))},R),o.useEffect(()=>{if(C)return v&&(0===E.layersWithOutsidePointerEventsDisabled.size&&(r=R.body.style.pointerEvents,R.body.style.pointerEvents="none"),E.layersWithOutsidePointerEventsDisabled.add(C)),E.layers.add(C),p(),()=>{v&&1===E.layersWithOutsidePointerEventsDisabled.size&&(R.body.style.pointerEvents=r)}},[C,R,v,E]),o.useEffect(()=>()=>{C&&(E.layers.delete(C),E.layersWithOutsidePointerEventsDisabled.delete(C),p())},[C,E]),o.useEffect(()=>{let e=()=>k({});return document.addEventListener(s,e),()=>document.removeEventListener(s,e)},[]),(0,c.jsx)(a.WV.div,{...x,ref:S,style:{pointerEvents:N?P?"auto":"none":void 0,...e.style},onFocusCapture:(0,i.M)(e.onFocusCapture,L.onFocusCapture),onBlurCapture:(0,i.M)(e.onBlurCapture,L.onBlurCapture),onPointerDownCapture:(0,i.M)(e.onPointerDownCapture,O.onPointerDownCapture)})});function p(){let e=new CustomEvent(s);document.dispatchEvent(e)}function m(e,t,n,r){let{discrete:o}=r,i=n.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),o?(0,a.jH)(i,l):i.dispatchEvent(l)}f.displayName="DismissableLayer",o.forwardRef((e,t)=>{let n=o.useContext(d),r=o.useRef(null),i=(0,l.e)(t,r);return o.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,c.jsx)(a.WV.div,{...e,ref:i})}).displayName="DismissableLayerBranch"},7491:function(e,t,n){"use strict";n.d(t,{oC:function(){return n0},VY:function(){return nq},ZA:function(){return n$},ck:function(){return nQ},wU:function(){return n3},__:function(){return nJ},Uv:function(){return nY},Ee:function(){return n1},Rk:function(){return n2},fC:function(){return nX},Z0:function(){return n7},Tr:function(){return n4},tu:function(){return n6},fF:function(){return n5},xz:function(){return nG}});var r=n(9334),o=n(5477),i=n(1068),a=n(1940),l=n(22),u=n(6147),c=n(2078),s=n(6287);function d(e){let t=e+"CollectionProvider",[n,o]=(0,a.b)(t),[l,u]=n(t,{collectionRef:{current:null},itemMap:new Map}),d=e=>{let{scope:t,children:n}=e,o=r.useRef(null),i=r.useRef(new Map).current;return(0,s.jsx)(l,{scope:t,itemMap:i,collectionRef:o,children:n})};d.displayName=t;let f=e+"CollectionSlot",p=r.forwardRef((e,t)=>
1{let{scope:n,children:r}=e,o=u(f,n),a=(0,i.e)(t,o.collectionRef);return(0,s.jsx)(c.g7,{ref:a,children:r})});p.displayName=f;let m=e+"CollectionItemSlot",v="data-radix-collection-item",h=r.forwardRef((e,t)=>{let{scope:n,children:o,...a}=e,l=r.useRef(null),d=(0,i.e)(t,l),f=u(m,n);return r.useEffect(()=>(f.itemMap.set(l,{ref:l,...a}),()=>void f.itemMap.delete(l))),(0,s.jsx)(c.g7,{[v]:"",ref:d,children:o})});return h.displayName=m,[{Provider:d,Slot:p,ItemSlot:h},function(t){let n=u(e+"CollectionConsumer",t);return r.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll("[".concat(v,"]")));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])},o]}var f=r.createContext(void 0);function p(e){let t=r.useContext(f);return e||t||"ltr"}var m=n(9592),v=n(4252),h=n(3452),g=n(7624);let y=["top","right","bottom","left"],w=Math.min,b=Math.max,x=Math.round,E=Math.floor,C=e=>({x:e,y:e}),M={left:"right",right:"left",bottom:"top",top:"bottom"},R={start:"end",end:"start"};function k(e,t){return"function"==typeof e?e(t):e}function S(e){return e.split("-")[0]}function T(e){return e.split("-")[1]}function A(e){return"x"===e?"y":"x"}function D(e){return"y"===e?"height":"width"}let j=new Set(["top","bottom"]);function N(e){return j.has(S(e))?"y":"x"}function P(e){return e.replace(/start|end/g,e=>R[e])}let O=["left","right"],L=["right","left"],_=["top","bottom"],I=["bottom","top"];function F(e){return e.replace(/left|right|bottom|top/g,e=>M[e])}function W(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function V(e){let{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 B(e,t,n){let r,{reference:o,floating:i}=e,a=N(t),l=A(N(t)),u=D(l),c=S(t),s="y"===a,d=o.x+o.width/2-i.width/2,f=o.y+o.height/2-i.height/2,p=o[u]/2-i[u]/2;switch(c){case"top":r={x:d,y:o.y-i.height};break;case"bottom":r={x:d,y:o.y+o.height};break;case"right":r={x:o.x+o.width,y:f};break;case"left":r={x:o.x-i.width,y:f};break;default:r={x:o.x,y:o.y}}switch(T(t)){case"start":r[l]-=p*(n&&s?-1:1);break;case"end":r[l]+=p*(n&&s?-1:1)}return r}let K=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)),c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:s,y:d}=B(c,r,u),f=r,p={},m=0;for(let n=0;n<l.length;n++){let{name:i,fn:v}=l[n],{x:h,y:g,data:y,reset:w}=await v({x:s,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});s=null!=h?h:s,d=null!=g?g:d,p={...p,[i]:{...p[i],...y}},w&&m<=50&&(m++,"object"==typeof w&&(w.placement&&(f=w.placement),w.rects&&(c=!0===w.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):w.rects),{x:s,y:d}=B(c,f,u)),n=-1)}return{x:s,y:d,placement:f,strategy:o,middlewareData:p}};async function Z(e,t){var n;void 0===t&&(t={});let{x:r,y:o,platform:i,rects:a,elements:l,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:s="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=k(t,e),m=W(p),v=l[f?"floating"===d?"reference":"floating":d],h=V(await i.getClippingRect({element:null==(n=await (null==i.isElement?void 0:i.isElement(v)))||n?v:v.contextElement||await (null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:c,rootBoundary:s,strategy:u})),g="floating"===d?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,y=await (null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),w=await (null==i.isElement?void 0:i.isElement(y))&&await (null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},b=V(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:g,offsetParent:y,strategy:u}):g);return{top:(h.top-b.top+m.top)/w.y,bottom:(b.bottom-h.bottom+m.bottom)/w.y,left:(h.left-b.left+m.left)/w.x,right:(b.right-h.right+m.right)/w.x}}function z(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function H(e){return y.some(t=>e[t]>=0)}let U=new Set(["left","top"]);async function X(e,t){let{placement:n,platform:r,elements:o}=e,i=await (null==r.isRTL?void 0:r.isRTL(o.floating)),a=S(n),l=T(n),u="y"===N(n),c=U.has(a)?-1:1,s=i&&u?-1:1,d=k(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}
1:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&"number"==typeof m&&(p="end"===l?-1*m:m),u?{x:p*s,y:f*c}:{x:f*c,y:p*s}}function G(){return"undefined"!=typeof window}function Y(e){return J(e)?(e.nodeName||"").toLowerCase():"#document"}function q(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function $(e){var t;return null==(t=(J(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function J(e){return!!G()&&(e instanceof Node||e instanceof q(e).Node)}function Q(e){return!!G()&&(e instanceof Element||e instanceof q(e).Element)}function ee(e){return!!G()&&(e instanceof HTMLElement||e instanceof q(e).HTMLElement)}function et(e){return!!G()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof q(e).ShadowRoot)}let en=new Set(["inline","contents"]);function er(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=em(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!en.has(o)}let eo=new Set(["table","td","th"]),ei=[":popover-open",":modal"];function ea(e){return ei.some(t=>{try{return e.matches(t)}catch(e){return!1}})}let el=["transform","translate","scale","rotate","perspective"],eu=["transform","translate","scale","rotate","perspective","filter"],ec=["paint","layout","strict","content"];function es(e){let t=ed(),n=Q(e)?em(e):e;return el.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||eu.some(e=>(n.willChange||"").includes(e))||ec.some(e=>(n.contain||"").includes(e))}function ed(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}let ef=new Set(["html","body","#document"]);function ep(e){return ef.has(Y(e))}function em(e){return q(e).getComputedStyle(e)}function ev(e){return Q(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function eh(e){if("html"===Y(e))return e;let t=e.assignedSlot||e.parentNode||et(e)&&e.host||$(e);return et(t)?t.host:t}function eg(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let o=function e(t){let n=eh(t);return ep(n)?t.ownerDocument?t.ownerDocument.body:t.body:ee(n)&&er(n)?n:e(n)}(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=q(o);if(i){let e=ey(a);return t.concat(a,a.visualViewport||[],er(o)?o:[],e&&n?eg(e):[])}return t.concat(o,eg(o,[],n))}function ey(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ew(e){let t=em(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=ee(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,l=x(n)!==i||x(r)!==a;return l&&(n=i,r=a),{width:n,height:r,$:l}}function eb(e){return Q(e)?e:e.contextElement}function ex(e){let t=eb(e);if(!ee(t))return C(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:i}=ew(t),a=(i?x(n.width):n.width)/r,l=(i?x(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}let eE=C(0);function eC(e){let t=q(e);return ed()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:eE}function eM(e,t,n,r){var o;void 0===t&&(t=!1),void 0===n&&(n=!1);let i=e.getBoundingClientRect(),a=eb(e),l=C(1);t&&(r?Q(r)&&(l=ex(r)):l=ex(e));let u=(void 0===(o=n)&&(o=!1),r&&(!o||r===q(a))&&o)?eC(a):C(0),c=(i.left+u.x)/l.x,s=(i.top+u.y)/l.y,d=i.width/l.x,f=i.height/l.y;if(a){let e=q(a),t=r&&Q(r)?q(r):r,n=e,o=ey(n);for(;o&&r&&t!==n;){let e=ex(o),t=o.getBoundingClientRect(),r=em(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,s*=e.y,d*=e.x,f*=e.y,c+=i,s+=a,o=ey(n=q(o))}}return V({width:d,height:f,x:c,y:s})}function eR(e,t){let n=ev(e).scrollLeft;return t?t.left+n:eM($(e)).left+n}function ek(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-eR(e,n),y:n.top+t.scrollTop}}let eS=new Set(["absolute","fixed"]);function eT(e,t,n){let r;if("viewport"===t)r=function(e,t){let n=q(e),r=$(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,l=0,u=0;if(o){i=o.width,a=o.height;let e=ed();
1(!e||e&&"fixed"===t)&&(l=o.offsetLeft,u=o.offsetTop)}let c=eR(r);if(c<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(r.clientWidth-t.clientWidth-o);a<=25&&(i-=a)}else c<=25&&(i+=c);return{width:i,height:a,x:l,y:u}}(e,n);else if("document"===t)r=function(e){let t=$(e),n=ev(e),r=e.ownerDocument.body,o=b(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=b(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),a=-n.scrollLeft+eR(e),l=-n.scrollTop;return"rtl"===em(r).direction&&(a+=b(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:l}}($(e));else if(Q(t))r=function(e,t){let n=eM(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ee(e)?ex(e):C(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=eC(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return V(r)}function eA(e){return"static"===em(e).position}function eD(e,t){if(!ee(e)||"fixed"===em(e).position)return null;if(t)return t(e);let n=e.offsetParent;return $(e)===n&&(n=n.ownerDocument.body),n}function ej(e,t){var n;let r=q(e);if(ea(e))return r;if(!ee(e)){let t=eh(e);for(;t&&!ep(t);){if(Q(t)&&!eA(t))return t;t=eh(t)}return r}let o=eD(e,t);for(;o&&(n=o,eo.has(Y(n)))&&eA(o);)o=eD(o,t);return o&&ep(o)&&eA(o)&&!es(o)?r:o||function(e){let t=eh(e);for(;ee(t)&&!ep(t);){if(es(t))return t;if(ea(t))break;t=eh(t)}return null}(e)||r}let eN=async function(e){let t=this.getOffsetParent||ej,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=ee(t),o=$(t),i="fixed"===n,a=eM(e,!0,i,t),l={scrollLeft:0,scrollTop:0},u=C(0);
1if(r||!r&&!i){if(("body"!==Y(t)||er(o))&&(l=ev(t)),r){let e=eM(t,!0,i,t);u.x=e.x+t.clientLeft,u.y=e.y+t.clientTop}else o&&(u.x=eR(o))}i&&!r&&o&&(u.x=eR(o));let c=!o||r||i?C(0):ek(o,l);return{x:a.left+l.scrollLeft-u.x-c.x,y:a.top+l.scrollTop-u.y-c.y,width:a.width,height:a.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},eP={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,i="fixed"===o,a=$(r),l=!!t&&ea(t.floating);if(r===a||l&&i)return n;let u={scrollLeft:0,scrollTop:0},c=C(1),s=C(0),d=ee(r);if((d||!d&&!i)&&(("body"!==Y(r)||er(a))&&(u=ev(r)),ee(r))){let e=eM(r);c=ex(r),s.x=e.x+r.clientLeft,s.y=e.y+r.clientTop}let f=!a||d||i?C(0):ek(a,u);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+s.x+f.x,y:n.y*c.y-u.scrollTop*c.y+s.y+f.y}},getDocumentElement:$,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e,i=[..."clippingAncestors"===n?ea(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=eg(e,[],!1).filter(e=>Q(e)&&"body"!==Y(e)),o=null,i="fixed"===em(e).position,a=i?eh(e):e;for(;Q(a)&&!ep(a);){let t=em(a),n=es(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&!!o&&eS.has(o.position)||er(a)&&!n&&function e(t,n){let r=eh(t);return!(r===n||!Q(r)||ep(r))&&("fixed"===em(r).position||e(r,n))}(e,a))?r=r.filter(e=>e!==a):o=t,a=eh(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((e,n)=>{let r=eT(t,n,o);return e.top=b(r.top,e.top),e.right=w(r.right,e.right),e.bottom=w(r.bottom,e.bottom),e.left=b(r.left,e.left),e},eT(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:ej,getElementRects:eN,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:n}=ew(e);return{width:t,height:n}},getScale:ex,isElement:Q,isRTL:function(e){return"rtl"===em(e).direction}};function eO(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}let eL=e=>({name:"arrow",options:e,async fn(t){let{x:n,y:r,placement:o,rects:i,platform:a,elements:l,middlewareData:u}=t,{element:c,padding:s=0}=k(e,t)||{};if(null==c)return{};let d=W(s),f={x:n,y:r},p=A(N(o)),m=D(p),v=await a.getDimensions(c),h="y"===p,g=h?"clientHeight":"clientWidth",y=i.reference[m]+i.reference[p]-f[p]-i.floating[m],x=f[p]-i.reference[p],E=await (null==a.getOffsetParent?void 0:a.getOffsetParent(c)),C=E?E[g]:0;C&&await (null==a.isElement?void 0:a.isElement(E))||(C=l.floating[g]||i.floating[m]);let M=C/2-v[m]/2-1,R=w(d[h?"top":"left"],M),S=w(d[h?"bottom":"right"],M),j=C-v[m]-S,P=C/2-v[m]/2+(y/2-x/2),O=b(R,w(P,j)),L=!u.arrow&&null!=T(o)&&P!==O&&i.reference[m]/2-(P<R?R:S)-v[m]/2<0,_=L?P<R?P-R:P-j:0;return{[p]:f[p]+_,data:{[p]:O,centerOffset:P-O-_,...L&&{alignmentOffset:_}},reset:L}}}),e_=(e,t,n)=>{let r=new Map,o={platform:eP,...n},i={...o.platform,_c:r};return K(e,t,{...o,platform:i})};var eI=n(9365),eF="undefined"!=typeof document?r.useLayoutEffect:function(){};function eW(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(!eW(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)&&!eW(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function eV(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function eB(e,t){let n=eV(e);return Math.round(t*n)/n}function eK(e){let t=r.useRef(e);return eF(()=>{t.current=e}),t}let eZ=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?eL({element:n.current,padding:r}).fn(t):{}:n?eL({element:n,padding:r}).fn(t):{}}}),ez=(e,t)=>{var n;return{...(void 0===(n=e)&&(n=0),{name:"offset",options:n,async fn(e){var t,r;let{x:o,y:i,placement:a,middlewareData:l}=e,u=await X(e,n);return a===(null==(t=l.offset)?void 0:t.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:a}}}}),options:[e,t]}},eH=(e,t)=>{var n;return{...(void 0===(n=e)&&(n={}),{name:"shift",options:n,async fn(e){let{x:t,y:r,placement:o}=e,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...u}=k(n,e),c={x:t,y:r},s=await Z(e,u),d=N(S(o)),f=A(d),p=c[f],m=c[d];if(i){let e="y"===f?"top":"left",t="y"===f?"bottom":"right",n=p+s[e],r=p-s[t];p=b(n,w(p,r))}
1if(a){let e="y"===d?"top":"left",t="y"===d?"bottom":"right",n=m+s[e],r=m-s[t];m=b(n,w(m,r))}let v=l.fn({...e,[f]:p,[d]:m});return{...v,data:{x:v.x-t,y:v.y-r,enabled:{[f]:i,[d]:a}}}}}),options:[e,t]}},eU=(e,t)=>{var n;return{...(void 0===(n=e)&&(n={}),{options:n,fn(e){let{x:t,y:r,placement:o,rects:i,middlewareData:a}=e,{offset:l=0,mainAxis:u=!0,crossAxis:c=!0}=k(n,e),s={x:t,y:r},d=N(o),f=A(d),p=s[f],m=s[d],v=k(l,e),h="number"==typeof v?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(u){let e="y"===f?"height":"width",t=i.reference[f]-i.floating[e]+h.mainAxis,n=i.reference[f]+i.reference[e]-h.mainAxis;p<t?p=t:p>n&&(p=n)}if(c){var g,y;let e="y"===f?"width":"height",t=U.has(S(o)),n=i.reference[d]-i.floating[e]+(t&&(null==(g=a.offset)?void 0:g[d])||0)+(t?0:h.crossAxis),r=i.reference[d]+i.reference[e]+(t?0:(null==(y=a.offset)?void 0:y[d])||0)-(t?h.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}),options:[e,t]}},eX=(e,t)=>{var n;return{...(void 0===(n=e)&&(n={}),{name:"flip",options:n,async fn(e){var t,r,o,i,a;let{placement:l,middlewareData:u,rects:c,initialPlacement:s,platform:d,elements:f}=e,{mainAxis:p=!0,crossAxis:m=!0,fallbackPlacements:v,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:y=!0,...w}=k(n,e);if(null!=(t=u.arrow)&&t.alignmentOffset)return{};let b=S(l),x=N(s),E=S(s)===s,C=await (null==d.isRTL?void 0:d.isRTL(f.floating)),M=v||(E||!y?[F(s)]:function(e){let t=F(e);return[P(e),t,P(t)]}(s)),R="none"!==g;!v&&R&&M.push(...function(e,t,n,r){let o=T(e),i=function(e,t,n){switch(e){case"top":case"bottom":if(n)return t?L:O;return t?O:L;case"left":case"right":return t?_:I;default:return[]}}(S(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(P)))),i}(s,y,g,C));let j=[s,...M],W=await Z(e,w),V=[],B=(null==(r=u.flip)?void 0:r.overflows)||[];if(p&&V.push(W[b]),m){let e=function(e,t,n){void 0===n&&(n=!1);let r=T(e),o=A(N(e)),i=D(o),a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=F(a)),[a,F(a)]}(l,c,C);V.push(W[e[0]],W[e[1]])}if(B=[...B,{placement:l,overflows:V}],!V.every(e=>e<=0)){let e=((null==(o=u.flip)?void 0:o.index)||0)+1,t=j[e];if(t&&(!("alignment"===m&&x!==N(t))||B.every(e=>N(e.placement)!==x||e.overflows[0]>0)))return{data:{index:e,overflows:B},reset:{placement:t}};let n=null==(i=B.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:i.placement;if(!n)switch(h){case"bestFit":{let e=null==(a=B.filter(e=>{if(R){let t=N(e.placement);return t===x||"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&&(n=e);break}case"initialPlacement":n=s}if(l!==n)return{reset:{placement:n}}}return{}}}),options:[e,t]}},eG=(e,t)=>{var n;return{...(void 0===(n=e)&&(n={}),{name:"size",options:n,async fn(e){var t,r;let o,i;let{placement:a,rects:l,platform:u,elements:c}=e,{apply:s=()=>{},...d}=k(n,e),f=await Z(e,d),p=S(a),m=T(a),v="y"===N(a),{width:h,height:g}=l.floating;"top"===p||"bottom"===p?(o=p,i=m===(await (null==u.isRTL?void 0:u.isRTL(c.floating))?"start":"end")?"left":"right"):(i=p,o="end"===m?"top":"bottom");let y=g-f.top-f.bottom,x=h-f.left-f.right,E=w(g-f[o],y),C=w(h-f[i],x),M=!e.middlewareData.shift,R=E,A=C;if(null!=(t=e.middlewareData.shift)&&t.enabled.x&&(A=x),null!=(r=e.middlewareData.shift)&&r.enabled.y&&(R=y),M&&!m){let e=b(f.left,0),t=b(f.right,0),n=b(f.top,0),r=b(f.bottom,0);v?A=h-2*(0!==e||0!==t?e+t:b(f.left,f.right)):R=g-2*(0!==n||0!==r?n+r:b(f.top,f.bottom))}await s({...e,availableWidth:A,availableHeight:R});let D=await u.getDimensions(c.floating);return h!==D.width||g!==D.height?{reset:{rects:!0}}:{}}}),options:[e,t]}},eY=(e,t)=>{var n;return{...(void 0===(n=e)&&(n={}),{name:"hide",options:n,async fn(e){let{rects:t}=e,{strategy:r="referenceHidden",...o}=k(n,e);switch(r){case"referenceHidden":{let n=z(await Z(e,{...o,elementContext:"reference"}),t.reference);return{data:{referenceHiddenOffsets:n,referenceHidden:H(n)}}}case"escaped":{let n=z(await Z(e,{...o,altBoundary:!0}),t.floating);return{data:{escapedOffsets:n,escaped:H(n)}}}default:return{}}}}),options:[e,t]}},eq=(e,t)=>
1({...eZ(e),options:[e,t]});var e$=r.forwardRef((e,t)=>{let{children:n,width:r=10,height:o=5,...i}=e;return(0,s.jsx)(u.WV.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:(0,s.jsx)("polygon",{points:"0,0 30,0 15,10"})})});e$.displayName="Arrow";var eJ=n(4382),eQ=n(7790),e0="Popper",[e1,e2]=(0,a.b)(e0),[e3,e7]=e1(e0),e4=e=>{let{__scopePopper:t,children:n}=e,[o,i]=r.useState(null);return(0,s.jsx)(e3,{scope:t,anchor:o,onAnchorChange:i,children:n})};e4.displayName=e0;var e5="PopperAnchor",e6=r.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:o,...a}=e,l=e7(e5,n),c=r.useRef(null),d=(0,i.e)(t,c);return r.useEffect(()=>{l.onAnchorChange((null==o?void 0:o.current)||c.current)}),o?null:(0,s.jsx)(u.WV.div,{...a,ref:d})});e6.displayName=e5;var e9="PopperContent",[e8,te]=e1(e9),tt=r.forwardRef((e,t)=>{var n,o,a,l,c,d,f,p;let{__scopePopper:m,side:v="bottom",sideOffset:h=0,align:g="center",alignOffset:y=0,arrowPadding:x=0,avoidCollisions:C=!0,collisionBoundary:M=[],collisionPadding:R=0,sticky:k="partial",hideWhenDetached:S=!1,updatePositionStrategy:T="optimized",onPlaced:A,...D}=e,j=e7(e9,m),[N,P]=r.useState(null),O=(0,i.e)(t,e=>P(e)),[L,_]=r.useState(null),I=function(e){let[t,n]=r.useState(void 0);return(0,eQ.b)(()=>{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}(L),F=null!==(f=null==I?void 0:I.width)&&void 0!==f?f:0,W=null!==(p=null==I?void 0:I.height)&&void 0!==p?p:0,V="number"==typeof R?R:{top:0,right:0,bottom:0,left:0,...R},B=Array.isArray(M)?M:[M],K=B.length>0,Z={padding:V,boundary:B.filter(ti),altBoundary:K},{refs:z,floatingStyles:H,placement:U,isPositioned:X,middlewareData:G}=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:a,floating:l}={},transform:u=!0,whileElementsMounted:c,open:s}=e,[d,f]=r.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=r.useState(o);eW(p,o)||m(o);let[v,h]=r.useState(null),[g,y]=r.useState(null),w=r.useCallback(e=>{e!==C.current&&(C.current=e,h(e))},[]),b=r.useCallback(e=>{e!==M.current&&(M.current=e,y(e))},[]),x=a||v,E=l||g,C=r.useRef(null),M=r.useRef(null),R=r.useRef(d),k=null!=c,S=eK(c),T=eK(i),A=eK(s),D=r.useCallback(()=>{if(!C.current||!M.current)return;let e={placement:t,strategy:n,middleware:p};T.current&&(e.platform=T.current),e_(C.current,M.current,e).then(e=>{let t={...e,isPositioned:!1!==A.current};j.current&&!eW(R.current,t)&&(R.current=t,eI.flushSync(()=>{f(t)}))})},[p,t,n,T,A]);eF(()=>{!1===s&&R.current.isPositioned&&(R.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[s]);let j=r.useRef(!1);eF(()=>(j.current=!0,()=>{j.current=!1}),[]),eF(()=>{if(x&&(C.current=x),E&&(M.current=E),x&&E){if(S.current)return S.current(x,E,D);D()}},[x,E,D,S,k]);let N=r.useMemo(()=>({reference:C,floating:M,setReference:w,setFloating:b}),[w,b]),P=r.useMemo(()=>({reference:x,floating:E}),[x,E]),O=r.useMemo(()=>{let e={position:n,left:0,top:0};if(!P.floating)return e;let t=eB(P.floating,d.x),r=eB(P.floating,d.y);return u?{...e,transform:"translate("+t+"px, "+r+"px)",...eV(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,u,P.floating,d.x,d.y]);return r.useMemo(()=>({...d,update:D,refs:N,elements:P,floatingStyles:O}),[d,D,N,P,O])}({strategy:"fixed",placement:v+("center"!==g?"-"+g:""),whileElementsMounted:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,t,n,r){let o;void 0===r&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:u="function"==typeof IntersectionObserver,animationFrame:c=!1}=r,s=eb(e),d=i||a?[...s?eg(s):[],...eg(t)]:[];d.forEach(e=>{i&&e.addEventListener("scroll",n,{passive:!0}),a&&e.addEventListener("resize",n)});let f=s&&u?function(e,t){let n,r=null,o=$(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return!function a(l,u){void 0===l&&(l=!1),void 0===u&&(u=1),i();let c=e.getBoundingClientRect(),{left:s,top:d,width:f,height:p}=c;if(l||t(),!f||!p)return;let m=E(d),v=E(o.clientWidth-(s+f)),h={rootMargin:-m+"px "+-v+"px "+-E(o.clientHeight-(d+p))+"px "+-E(s)+"px",threshold:b(0,w(1,u))||1},g=!0;function y(t){let r=t[0].intersectionRatio;if(r!==u){if(!g)return a();r?a(!1,r):n=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==r||eO(c,e.getBoundingClientRect())||a(),g=!1}try{r=new IntersectionObserver(y,{...h,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(y,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&&!c&&m.observe(s),m.observe(t));let v=c?eM(e):null;return c&&function t(){let r=eM(e);v&&!eO(v,r)&&n(),v=r,o=requestAnimationFrame(t)}(),n(),()=>{var e;
1d.forEach(e=>{i&&e.removeEventListener("scroll",n),a&&e.removeEventListener("resize",n)}),null==f||f(),null==(e=m)||e.disconnect(),m=null,c&&cancelAnimationFrame(o)}}(...t,{animationFrame:"always"===T})},elements:{reference:j.anchor},middleware:[ez({mainAxis:h+W,alignmentAxis:y}),C&&eH({mainAxis:!0,crossAxis:!1,limiter:"partial"===k?eU():void 0,...Z}),C&&eX({...Z}),eG({...Z,apply:e=>{let{elements:t,rects:n,availableWidth:r,availableHeight:o}=e,{width:i,height:a}=n.reference,l=t.floating.style;l.setProperty("--radix-popper-available-width","".concat(r,"px")),l.setProperty("--radix-popper-available-height","".concat(o,"px")),l.setProperty("--radix-popper-anchor-width","".concat(i,"px")),l.setProperty("--radix-popper-anchor-height","".concat(a,"px"))}}),L&&eq({element:L,padding:x}),ta({arrowWidth:F,arrowHeight:W}),S&&eY({strategy:"referenceHidden",...Z})]}),[Y,q]=tl(U),J=(0,eJ.W)(A);(0,eQ.b)(()=>{X&&(null==J||J())},[X,J]);let Q=null===(n=G.arrow)||void 0===n?void 0:n.x,ee=null===(o=G.arrow)||void 0===o?void 0:o.y,et=(null===(a=G.arrow)||void 0===a?void 0:a.centerOffset)!==0,[en,er]=r.useState();return(0,eQ.b)(()=>{N&&er(window.getComputedStyle(N).zIndex)},[N]),(0,s.jsx)("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:X?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:en,"--radix-popper-transform-origin":[null===(l=G.transformOrigin)||void 0===l?void 0:l.x,null===(c=G.transformOrigin)||void 0===c?void 0:c.y].join(" "),...(null===(d=G.hide)||void 0===d?void 0:d.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,s.jsx)(e8,{scope:m,placedSide:Y,onArrowChange:_,arrowX:Q,arrowY:ee,shouldHideArrow:et,children:(0,s.jsx)(u.WV.div,{"data-side":Y,"data-align":q,...D,ref:O,style:{...D.style,animation:X?void 0:"none"}})})})});tt.displayName=e9;var tn="PopperArrow",tr={top:"bottom",right:"left",bottom:"top",left:"right"},to=r.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,o=te(tn,n),i=tr[o.placedSide];return(0,s.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,s.jsx)(e$,{...r,ref:t,style:{...r.style,display:"block"}})})});function ti(e){return null!==e}to.displayName=tn;var ta=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,a;let{placement:l,rects:u,middlewareData:c}=t,s=(null===(n=c.arrow)||void 0===n?void 0:n.centerOffset)!==0,d=s?0:e.arrowWidth,f=s?0:e.arrowHeight,[p,m]=tl(l),v={start:"0%",center:"50%",end:"100%"}[m],h=(null!==(i=null===(r=c.arrow)||void 0===r?void 0:r.x)&&void 0!==i?i:0)+d/2,g=(null!==(a=null===(o=c.arrow)||void 0===o?void 0:o.y)&&void 0!==a?a:0)+f/2,y="",w="";return"bottom"===p?(y=s?v:"".concat(h,"px"),w="".concat(-f,"px")):"top"===p?(y=s?v:"".concat(h,"px"),w="".concat(u.floating.height+f,"px")):"right"===p?(y="".concat(-f,"px"),w=s?v:"".concat(g,"px")):"left"===p&&(y="".concat(u.floating.width+f,"px"),w=s?v:"".concat(g,"px")),{data:{x:y,y:w}}}});function tl(e){let[t,n="center"]=e.split("-");return[t,n]}var tu=n(4355),tc=n(9430),ts="rovingFocusGroup.onEntryFocus",td={bubbles:!1,cancelable:!0},tf="RovingFocusGroup",[tp,tm,tv]=d(tf),[th,tg]=(0,a.b)(tf,[tv]),[ty,tw]=th(tf),tb=r.forwardRef((e,t)=>(0,s.jsx)(tp.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,s.jsx)(tp.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,s.jsx)(tx,{...e,ref:t})})}));tb.displayName=tf;var tx=r.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:a,loop:c=!1,dir:d,currentTabStopId:f,defaultCurrentTabStopId:m,onCurrentTabStopIdChange:v,onEntryFocus:h,preventScrollOnEntryFocus:g=!1,...y}=e,w=r.useRef(null),b=(0,i.e)(t,w),x=p(d),[E=null,C]=(0,l.T)({prop:f,defaultProp:m,onChange:v}),[M,R]=r.useState(!1),k=(0,eJ.W)(h),S=tm(n),T=r.useRef(!1),[A,D]=r.useState(0);return r.useEffect(()=>{let e=w.current;if(e)return e.addEventListener(ts,k),()=>e.removeEventListener(ts,k)},[k]),(0,s.jsx)(ty,{scope:n,orientation:a,dir:x,loop:c,currentTabStopId:E,onItemFocus:r.useCallback(e=>C(e),[C]),onItemShiftTab:r.useCallback(()=>R(!0),[]),onFocusableItemAdd:r.useCallback(()=>D(e=>e+1),[]),onFocusableItemRemove:r.useCallback(()=>D(e=>e-1),[]),children:(0,s.jsx)(u.WV.div,{tabIndex:M||0===A?-1:0,"data-orientation":a,...y,ref:b,style:{outline:"none",...e.style},onMouseDown:(0,o.M)(e.onMouseDown,()=>{T.current=!0}),onFocus:(0,o.M)(e.onFocus,e=>{let t=!T.current;if(e.target===e.currentTarget&&t&&!M){let t=new CustomEvent(ts,td);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=S().filter(e=>
1e.focusable);tR([e.find(e=>e.active),e.find(e=>e.id===E),...e].filter(Boolean).map(e=>e.ref.current),g)}}T.current=!1}),onBlur:(0,o.M)(e.onBlur,()=>R(!1))})})}),tE="RovingFocusGroupItem",tC=r.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:i=!0,active:a=!1,tabStopId:l,...c}=e,d=(0,g.M)(),f=l||d,p=tw(tE,n),m=p.currentTabStopId===f,v=tm(n),{onFocusableItemAdd:h,onFocusableItemRemove:y}=p;return r.useEffect(()=>{if(i)return h(),()=>y()},[i,h,y]),(0,s.jsx)(tp.ItemSlot,{scope:n,id:f,focusable:i,active:a,children:(0,s.jsx)(u.WV.span,{tabIndex:m?0:-1,"data-orientation":p.orientation,...c,ref:t,onMouseDown:(0,o.M)(e.onMouseDown,e=>{i?p.onItemFocus(f):e.preventDefault()}),onFocus:(0,o.M)(e.onFocus,()=>p.onItemFocus(f)),onKeyDown:(0,o.M)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey){p.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=function(e,t,n){var r;let o=(r=e.key,"rtl"!==n?r:"ArrowLeft"===r?"ArrowRight":"ArrowRight"===r?"ArrowLeft":r);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(o))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(o)))return tM[o]}(e,p.orientation,p.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let o=v().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)o.reverse();else if("prev"===t||"next"===t){var n,r;"prev"===t&&o.reverse();let i=o.indexOf(e.currentTarget);o=p.loop?(n=o,r=i+1,n.map((e,t)=>n[(r+t)%n.length])):o.slice(i+1)}setTimeout(()=>tR(o))}})})})});tC.displayName=tE;var tM={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function tR(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}var tk=n(1147),tS=n(1005),tT=["Enter"," "],tA=["ArrowUp","PageDown","End"],tD=["ArrowDown","PageUp","Home",...tA],tj={ltr:[...tT,"ArrowRight"],rtl:[...tT,"ArrowLeft"]},tN={ltr:["ArrowLeft"],rtl:["ArrowRight"]},tP="Menu",[tO,tL,t_]=d(tP),[tI,tF]=(0,a.b)(tP,[t_,e2,tg]),tW=e2(),tV=tg(),[tB,tK]=tI(tP),[tZ,tz]=tI(tP),tH=e=>{let{__scopeMenu:t,open:n=!1,children:o,dir:i,onOpenChange:a,modal:l=!0}=e,u=tW(t),[c,d]=r.useState(null),f=r.useRef(!1),m=(0,eJ.W)(a),v=p(i);return r.useEffect(()=>{let e=()=>{f.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>f.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}},[]),(0,s.jsx)(e4,{...u,children:(0,s.jsx)(tB,{scope:t,open:n,onOpenChange:m,content:c,onContentChange:d,children:(0,s.jsx)(tZ,{scope:t,onClose:r.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:f,dir:v,modal:l,children:o})})})};tH.displayName=tP;var tU=r.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,o=tW(n);return(0,s.jsx)(e6,{...o,...r,ref:t})});tU.displayName="MenuAnchor";var tX="MenuPortal",[tG,tY]=tI(tX,{forceMount:void 0}),tq=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:o}=e,i=tK(tX,t);return(0,s.jsx)(tG,{scope:t,forceMount:n,children:(0,s.jsx)(tc.z,{present:n||i.open,children:(0,s.jsx)(tu.h,{asChild:!0,container:o,children:r})})})};tq.displayName=tX;var t$="MenuContent",[tJ,tQ]=tI(t$),t0=r.forwardRef((e,t)=>{let n=tY(t$,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=tK(t$,e.__scopeMenu),a=tz(t$,e.__scopeMenu);return(0,s.jsx)(tO.Provider,{scope:e.__scopeMenu,children:(0,s.jsx)(tc.z,{present:r||i.open,children:(0,s.jsx)(tO.Slot,{scope:e.__scopeMenu,children:a.modal?(0,s.jsx)(t1,{...o,ref:t}):(0,s.jsx)(t2,{...o,ref:t})})})})}),t1=r.forwardRef((e,t)=>{let n=tK(t$,e.__scopeMenu),a=r.useRef(null),l=(0,i.e)(t,a);return r.useEffect(()=>{let e=a.current;if(e)return(0,tk.Ry)(e)},[]),(0,s.jsx)(t3,{...e,ref:l,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:(0,o.M)(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}
1),t2=r.forwardRef((e,t)=>{let n=tK(t$,e.__scopeMenu);return(0,s.jsx)(t3,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),t3=r.forwardRef((e,t)=>{let{__scopeMenu:n,loop:a=!1,trapFocus:l,onOpenAutoFocus:u,onCloseAutoFocus:d,disableOutsidePointerEvents:f,onEntryFocus:p,onEscapeKeyDown:g,onPointerDownOutside:y,onFocusOutside:w,onInteractOutside:b,onDismiss:x,disableOutsideScroll:E,...C}=e,M=tK(t$,n),R=tz(t$,n),k=tW(n),S=tV(n),T=tL(n),[A,D]=r.useState(null),j=r.useRef(null),N=(0,i.e)(t,j,M.onContentChange),P=r.useRef(0),O=r.useRef(""),L=r.useRef(0),_=r.useRef(null),I=r.useRef("right"),F=r.useRef(0),W=E?tS.Z:r.Fragment,V=E?{as:c.g7,allowPinchZoom:!0}:void 0,B=e=>{var t,n;let r=O.current+e,o=T().filter(e=>!e.disabled),i=document.activeElement,a=null===(t=o.find(e=>e.ref.current===i))||void 0===t?void 0:t.textValue,l=function(e,t,n){var r;let o=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=(r=Math.max(n?e.indexOf(n):-1,0),e.map((t,n)=>e[(r+n)%e.length]));1===o.length&&(i=i.filter(e=>e!==n));let a=i.find(e=>e.toLowerCase().startsWith(o.toLowerCase()));return a!==n?a:void 0}(o.map(e=>e.textValue),r,a),u=null===(n=o.find(e=>e.textValue===l))||void 0===n?void 0:n.ref.current;!function e(t){O.current=t,window.clearTimeout(P.current),""!==t&&(P.current=window.setTimeout(()=>e(""),1e3))}(r),u&&setTimeout(()=>u.focus())};r.useEffect(()=>()=>window.clearTimeout(P.current),[]),(0,v.EW)();let K=r.useCallback(e=>{var t,n,r;return I.current===(null===(t=_.current)||void 0===t?void 0:t.side)&&!!(r=null===(n=_.current)||void 0===n?void 0:n.area)&&function(e,t){let{x:n,y:r}=e,o=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){let a=t[e].x,l=t[e].y,u=t[i].x,c=t[i].y;l>r!=c>r&&n<(u-a)*(r-l)/(c-l)+a&&(o=!o)}return o}({x:e.clientX,y:e.clientY},r)},[]);return(0,s.jsx)(tJ,{scope:n,searchRef:O,onItemEnter:r.useCallback(e=>{K(e)&&e.preventDefault()},[K]),onItemLeave:r.useCallback(e=>{var t;K(e)||(null===(t=j.current)||void 0===t||t.focus(),D(null))},[K]),onTriggerLeave:r.useCallback(e=>{K(e)&&e.preventDefault()},[K]),pointerGraceTimerRef:L,onPointerGraceIntentChange:r.useCallback(e=>{_.current=e},[]),children:(0,s.jsx)(W,{...V,children:(0,s.jsx)(h.M,{asChild:!0,trapped:l,onMountAutoFocus:(0,o.M)(u,e=>{var t;e.preventDefault(),null===(t=j.current)||void 0===t||t.focus({preventScroll:!0})}),onUnmountAutoFocus:d,children:(0,s.jsx)(m.XB,{asChild:!0,disableOutsidePointerEvents:f,onEscapeKeyDown:g,onPointerDownOutside:y,onFocusOutside:w,onInteractOutside:b,onDismiss:x,children:(0,s.jsx)(tb,{asChild:!0,...S,dir:R.dir,orientation:"vertical",loop:a,currentTabStopId:A,onCurrentTabStopIdChange:D,onEntryFocus:(0,o.M)(p,e=>{R.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,s.jsx)(tt,{role:"menu","aria-orientation":"vertical","data-state":nx(M.open),"data-radix-menu-content":"",dir:R.dir,...k,...C,ref:N,style:{outline:"none",...C.style},onKeyDown:(0,o.M)(C.onKeyDown,e=>{let t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!n&&r&&B(e.key));let o=j.current;if(e.target!==o||!tD.includes(e.key))return;e.preventDefault();let i=T().filter(e=>!e.disabled).map(e=>e.ref.current);tA.includes(e.key)&&i.reverse(),function(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}(i)}),onBlur:(0,o.M)(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(P.current),O.current="")}),onPointerMove:(0,o.M)(e.onPointerMove,nM(e=>{let t=e.target,n=F.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>F.current?"right":"left";I.current=t,F.current=e.clientX}}))})})})})})})});t0.displayName=t$;var t7=r.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,s.jsx)(u.WV.div,{role:"group",...r,ref:t})});t7.displayName="MenuGroup";var t4=r.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,s.jsx)(u.WV.div,{...r,ref:t})});t4.displayName="MenuLabel";var t5="MenuItem",t6="menu.itemSelect",t9=r.forwardRef((e,t)=>
1{let{disabled:n=!1,onSelect:a,...l}=e,c=r.useRef(null),d=tz(t5,e.__scopeMenu),f=tQ(t5,e.__scopeMenu),p=(0,i.e)(t,c),m=r.useRef(!1);return(0,s.jsx)(t8,{...l,ref:p,disabled:n,onClick:(0,o.M)(e.onClick,()=>{let e=c.current;if(!n&&e){let t=new CustomEvent(t6,{bubbles:!0,cancelable:!0});e.addEventListener(t6,e=>null==a?void 0:a(e),{once:!0}),(0,u.jH)(e,t),t.defaultPrevented?m.current=!1:d.onClose()}}),onPointerDown:t=>{var n;null===(n=e.onPointerDown)||void 0===n||n.call(e,t),m.current=!0},onPointerUp:(0,o.M)(e.onPointerUp,e=>{var t;m.current||null===(t=e.currentTarget)||void 0===t||t.click()}),onKeyDown:(0,o.M)(e.onKeyDown,e=>{let t=""!==f.searchRef.current;!n&&(!t||" "!==e.key)&&tT.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});t9.displayName=t5;var t8=r.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:a=!1,textValue:l,...c}=e,d=tQ(t5,n),f=tV(n),p=r.useRef(null),m=(0,i.e)(t,p),[v,h]=r.useState(!1),[g,y]=r.useState("");return r.useEffect(()=>{let e=p.current;if(e){var t;y((null!==(t=e.textContent)&&void 0!==t?t:"").trim())}},[c.children]),(0,s.jsx)(tO.ItemSlot,{scope:n,disabled:a,textValue:null!=l?l:g,children:(0,s.jsx)(tC,{asChild:!0,...f,focusable:!a,children:(0,s.jsx)(u.WV.div,{role:"menuitem","data-highlighted":v?"":void 0,"aria-disabled":a||void 0,"data-disabled":a?"":void 0,...c,ref:m,onPointerMove:(0,o.M)(e.onPointerMove,nM(e=>{a?d.onItemLeave(e):(d.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:(0,o.M)(e.onPointerLeave,nM(e=>d.onItemLeave(e))),onFocus:(0,o.M)(e.onFocus,()=>h(!0)),onBlur:(0,o.M)(e.onBlur,()=>h(!1))})})})}),ne=r.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,s.jsx)(nu,{scope:e.__scopeMenu,checked:n,children:(0,s.jsx)(t9,{role:"menuitemcheckbox","aria-checked":nE(n)?"mixed":n,...i,ref:t,"data-state":nC(n),onSelect:(0,o.M)(i.onSelect,()=>null==r?void 0:r(!!nE(n)||!n),{checkForDefaultPrevented:!1})})})});ne.displayName="MenuCheckboxItem";var nt="MenuRadioGroup",[nn,nr]=tI(nt,{value:void 0,onValueChange:()=>{}}),no=r.forwardRef((e,t)=>{let{value:n,onValueChange:r,...o}=e,i=(0,eJ.W)(r);return(0,s.jsx)(nn,{scope:e.__scopeMenu,value:n,onValueChange:i,children:(0,s.jsx)(t7,{...o,ref:t})})});no.displayName=nt;var ni="MenuRadioItem",na=r.forwardRef((e,t)=>{let{value:n,...r}=e,i=nr(ni,e.__scopeMenu),a=n===i.value;return(0,s.jsx)(nu,{scope:e.__scopeMenu,checked:a,children:(0,s.jsx)(t9,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":nC(a),onSelect:(0,o.M)(r.onSelect,()=>{var e;return null===(e=i.onValueChange)||void 0===e?void 0:e.call(i,n)},{checkForDefaultPrevented:!1})})})});na.displayName=ni;var nl="MenuItemIndicator",[nu,nc]=tI(nl,{checked:!1}),ns=r.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...o}=e,i=nc(nl,n);return(0,s.jsx)(tc.z,{present:r||nE(i.checked)||!0===i.checked,children:(0,s.jsx)(u.WV.span,{...o,ref:t,"data-state":nC(i.checked)})})});ns.displayName=nl;var nd=r.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,s.jsx)(u.WV.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});nd.displayName="MenuSeparator";var nf=r.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,o=tW(n);return(0,s.jsx)(to,{...o,...r,ref:t})});nf.displayName="MenuArrow";var np="MenuSub",[nm,nv]=tI(np),nh=e=>{let{__scopeMenu:t,children:n,open:o=!1,onOpenChange:i}=e,a=tK(np,t),l=tW(t),[u,c]=r.useState(null),[d,f]=r.useState(null),p=(0,eJ.W)(i);return r.useEffect(()=>(!1===a.open&&p(!1),()=>p(!1)),[a.open,p]),(0,s.jsx)(e4,{...l,children:(0,s.jsx)(tB,{scope:t,open:o,onOpenChange:p,content:d,onContentChange:f,children:(0,s.jsx)(nm,{scope:t,contentId:(0,g.M)(),triggerId:(0,g.M)(),trigger:u,onTriggerChange:c,children:n})})})};nh.displayName=np;var ng="MenuSubTrigger",ny=r.forwardRef((e,t)=>{let n=tK(ng,e.__scopeMenu),a=tz(ng,e.__scopeMenu),l=nv(ng,e.__scopeMenu),u=tQ(ng,e.__scopeMenu),c=r.useRef(null),{pointerGraceTimerRef:d,onPointerGraceIntentChange:f}=u,p={__scopeMenu:e.__scopeMenu},m=r.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return r.useEffect(()=>m,[m]),r.useEffect(()=>{let e=d.current;return()=>{window.clearTimeout(e),f(null)}},[d,f]),(0,s.jsx)(tU,{asChild:!0,...p,children:(0,s.jsx)(t8,{id:l.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":l.contentId,"data-state":nx(n.open),...e,ref:(0,i.F)(t,l.onTriggerChange),onClick:t=>{var r;null===(r=e.onClick)||void 0===r||r.call(e,t),e.disabled||t.defaultPrevented||(t.currentTarget.focu
1s(),n.open||n.onOpenChange(!0))},onPointerMove:(0,o.M)(e.onPointerMove,nM(t=>{u.onItemEnter(t),t.defaultPrevented||e.disabled||n.open||c.current||(u.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{n.onOpenChange(!0),m()},100))})),onPointerLeave:(0,o.M)(e.onPointerLeave,nM(e=>{var t,r;m();let o=null===(t=n.content)||void 0===t?void 0:t.getBoundingClientRect();if(o){let t=null===(r=n.content)||void 0===r?void 0:r.dataset.side,i="right"===t,a=o[i?"left":"right"],l=o[i?"right":"left"];u.onPointerGraceIntentChange({area:[{x:e.clientX+(i?-5:5),y:e.clientY},{x:a,y:o.top},{x:l,y:o.top},{x:l,y:o.bottom},{x:a,y:o.bottom}],side:t}),window.clearTimeout(d.current),d.current=window.setTimeout(()=>u.onPointerGraceIntentChange(null),300)}else{if(u.onTriggerLeave(e),e.defaultPrevented)return;u.onPointerGraceIntentChange(null)}})),onKeyDown:(0,o.M)(e.onKeyDown,t=>{let r=""!==u.searchRef.current;if(!e.disabled&&(!r||" "!==t.key)&&tj[a.dir].includes(t.key)){var o;n.onOpenChange(!0),null===(o=n.content)||void 0===o||o.focus(),t.preventDefault()}})})})});ny.displayName=ng;var nw="MenuSubContent",nb=r.forwardRef((e,t)=>{let n=tY(t$,e.__scopeMenu),{forceMount:a=n.forceMount,...l}=e,u=tK(t$,e.__scopeMenu),c=tz(t$,e.__scopeMenu),d=nv(nw,e.__scopeMenu),f=r.useRef(null),p=(0,i.e)(t,f);return(0,s.jsx)(tO.Provider,{scope:e.__scopeMenu,children:(0,s.jsx)(tc.z,{present:a||u.open,children:(0,s.jsx)(tO.Slot,{scope:e.__scopeMenu,children:(0,s.jsx)(t3,{id:d.contentId,"aria-labelledby":d.triggerId,...l,ref:p,align:"start",side:"rtl"===c.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{var t;c.isUsingKeyboardRef.current&&(null===(t=f.current)||void 0===t||t.focus()),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:(0,o.M)(e.onFocusOutside,e=>{e.target!==d.trigger&&u.onOpenChange(!1)}),onEscapeKeyDown:(0,o.M)(e.onEscapeKeyDown,e=>{c.onClose(),e.preventDefault()}),onKeyDown:(0,o.M)(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=tN[c.dir].includes(e.key);if(t&&n){var r;u.onOpenChange(!1),null===(r=d.trigger)||void 0===r||r.focus(),e.preventDefault()}})})})})})});function nx(e){return e?"open":"closed"}function nE(e){return"indeterminate"===e}function nC(e){return nE(e)?"indeterminate":e?"checked":"unchecked"}function nM(e){return t=>"mouse"===t.pointerType?e(t):void 0}nb.displayName=nw;var nR="DropdownMenu",[nk,nS]=(0,a.b)(nR,[tF]),nT=tF(),[nA,nD]=nk(nR),nj=e=>{let{__scopeDropdownMenu:t,children:n,dir:o,open:i,defaultOpen:a,onOpenChange:u,modal:c=!0}=e,d=nT(t),f=r.useRef(null),[p=!1,m]=(0,l.T)({prop:i,defaultProp:a,onChange:u});return(0,s.jsx)(nA,{scope:t,triggerId:(0,g.M)(),triggerRef:f,contentId:(0,g.M)(),open:p,onOpenChange:m,onOpenToggle:r.useCallback(()=>m(e=>!e),[m]),modal:c,children:(0,s.jsx)(tH,{...d,open:p,onOpenChange:m,dir:o,modal:c,children:n})})};nj.displayName=nR;var nN="DropdownMenuTrigger",nP=r.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...a}=e,l=nD(nN,n),c=nT(n);return(0,s.jsx)(tU,{asChild:!0,...c,children:(0,s.jsx)(u.WV.button,{type:"button",id:l.triggerId,"aria-haspopup":"menu","aria-expanded":l.open,"aria-controls":l.open?l.contentId:void 0,"data-state":l.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...a,ref:(0,i.F)(t,l.triggerRef),onPointerDown:(0,o.M)(e.onPointerDown,e=>{r||0!==e.button||!1!==e.ctrlKey||(l.onOpenToggle(),l.open||e.preventDefault())}),onKeyDown:(0,o.M)(e.onKeyDown,e=>{!r&&(["Enter"," "].includes(e.key)&&l.onOpenToggle(),"ArrowDown"===e.key&&l.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())})})})});nP.displayName=nN;var nO=e=>{let{__scopeDropdownMenu:t,...n}=e,r=nT(t);return(0,s.jsx)(tq,{...r,...n})};nO.displayName="DropdownMenuPortal";var nL="DropdownMenuContent",n_=r.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...i}=e,a=nD(nL,n),l=nT(n),u=r.useRef(!1);return(0,s.jsx)(t0,{id:a.contentId,"aria-labelledby":a.triggerId,...l,...i,ref:t,onCloseAutoFocus:(0,o.M)(e.onCloseAutoFocus,e=>{var t;u.current||null===(t=a.triggerRef.current)||void 0===t||t.focus(),u.current=!1,e.preventDefault()}),onInteractOutside:(0,o.M)(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;(!a.modal||r)&&(u.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});
1n_.displayName=nL;var nI=r.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,o=nT(n);return(0,s.jsx)(t7,{...o,...r,ref:t})});nI.displayName="DropdownMenuGroup";var nF=r.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,o=nT(n);return(0,s.jsx)(t4,{...o,...r,ref:t})});nF.displayName="DropdownMenuLabel";var nW=r.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,o=nT(n);return(0,s.jsx)(t9,{...o,...r,ref:t})});nW.displayName="DropdownMenuItem";var nV=r.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,o=nT(n);return(0,s.jsx)(ne,{...o,...r,ref:t})});nV.displayName="DropdownMenuCheckboxItem";var nB=r.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,o=nT(n);return(0,s.jsx)(no,{...o,...r,ref:t})});nB.displayName="DropdownMenuRadioGroup";var nK=r.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,o=nT(n);return(0,s.jsx)(na,{...o,...r,ref:t})});nK.displayName="DropdownMenuRadioItem";var nZ=r.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,o=nT(n);return(0,s.jsx)(ns,{...o,...r,ref:t})});nZ.displayName="DropdownMenuItemIndicator";var nz=r.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,o=nT(n);return(0,s.jsx)(nd,{...o,...r,ref:t})});nz.displayName="DropdownMenuSeparator",r.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,o=nT(n);return(0,s.jsx)(nf,{...o,...r,ref:t})}).displayName="DropdownMenuArrow";var nH=r.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,o=nT(n);return(0,s.jsx)(ny,{...o,...r,ref:t})});nH.displayName="DropdownMenuSubTrigger";var nU=r.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,o=nT(n);return(0,s.jsx)(nb,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});nU.displayName="DropdownMenuSubContent";var nX=nj,nG=nP,nY=nO,nq=n_,n$=nI,nJ=nF,nQ=nW,n0=nV,n1=nB,n2=nK,n3=nZ,n7=nz,n4=e=>{let{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:i}=e,a=nT(t),[u=!1,c]=(0,l.T)({prop:r,defaultProp:i,onChange:o});return(0,s.jsx)(nh,{...a,open:u,onOpenChange:c,children:n})},n5=nH,n6=nU},4252:function(e,t,n){"use strict";n.d(t,{EW:function(){return i}});var r=n(9334),o=0;function i(){r.useEffect(()=>{var e,t;let n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=n[0])&&void 0!==e?e:a()),document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t: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.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}},3452:function(e,t,n){"use strict";let r;n.d(t,{M:function(){return f}});var o=n(9334),i=n(1068),a=n(6147),l=n(4382),u=n(6287),c="focusScope.autoFocusOnMount",s="focusScope.autoFocusOnUnmount",d={bubbles:!1,cancelable:!0},f=o.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:f,onUnmountAutoFocus:g,...y}=e,[w,b]=o.useState(null),x=(0,l.W)(f),E=(0,l.W)(g),C=o.useRef(null),M=(0,i.e)(t,e=>b(e)),R=o.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;o.useEffect(()=>{if(r){let e=function(e){if(R.paused||!w)return;let t=e.target;w.contains(t)?C.current=t:v(C.current,{select:!0})},t=function(e){if(R.paused||!w)return;let t=e.relatedTarget;null===t||w.contains(t)||v(C.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&&v(w)});return w&&n.observe(w,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}},[r,w,R.paused]),o.useEffect(()=>{if(w){h.add(R);let e=document.activeElement;if(!w.contains(e)){let t=new CustomEvent(c,d);w.addEventListener(c,x),w.dispatchEvent(t),t.defaultPrevented||(function(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=document.activeElement;for(let r of e)if(v(r,{select:t}),document.activeElement!==n)return}(p(w).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&v(w))}return()=>{w.removeEventListener(c,x),setTimeout(()=>{let t=new CustomEvent(s,d);w.addEventListener(s,E),w.dispatchEvent(t),t.defaultPrevented||v(null!=e?e:document.body,{select:!0}),w.removeEventListener(s,E),h.remove(R)},0)}}},[w,x,E,R]);let k=o.useCallback(e=>{if(!n&&!r||R.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){let t=e.currentTarget,[r,i]=function(e){let t=p(e);return[m(t,e),m(t.reverse(),e)]}(t);r&&i?e.shiftKey||o!==i?e.shiftKey&&o===r&&(e.preventDefault(),n&&v(i,{select:!0})):(e.preventDefault(),n&&v(r,{select:!0})):o===t&&e.preventDefault()}},[n,r,R.paused]);return(0,u.jsx)(a.WV.div,{tabIndex:-1,...y,ref:M,onKeyDown:k})});function p(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 m(e,t){for(let n of e)if(!function(e,t){let{upTo:n}=t;if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===n||e!==n);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(n,{upTo:t}))return n}function v(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[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=(r=[],{add(e){let t=r[0];e!==t&&(null==t||t.pause()),(r=g(r,e)).unshift(e)},remove(e){var t;null===(t=(r=g(r,e))[0])||void 0===t||t.resume()}});function g(e,t){let n=[...e],r=n.indexOf(t);return -1!==r&&n.splice(r,1),n}},7624:function(e,t,n){"use strict";n.d(t,{M:function(){return u}});var r,o=n(9334),i=n(7790),a=(r||(r=n.t(o,2)))["useId".toString()]||(()=>void 0),l=0;function u(e){let[t,n]=o.useState(a());return(0,i.b)(()=>{e||n(e=>e??String(l++))},[e]),e||(t?`radix-${t}`:"")}},4355:function(e,t,n){"use strict";n.d(t,{h:function(){return u}});var r=n(9334),o=n(9365),i=n(6147),a=n(7790),l=n(6287),u=r.forwardRef((e,t)=>
1{var n,u;let{container:c,...s}=e,[d,f]=r.useState(!1);(0,a.b)(()=>f(!0),[]);let p=c||d&&(null===(u=globalThis)||void 0===u?void 0:null===(n=u.document)||void 0===n?void 0:n.body);return p?o.createPortal((0,l.jsx)(i.WV.div,{...s,ref:t}),p):null});u.displayName="Portal"},9430:function(e,t,n){"use strict";n.d(t,{z:function(){return a}});var r=n(9334),o=n(1068),i=n(7790),a=e=>{var t,n;let a,u;let{present:c,children:s}=e,d=function(e){var t,n;let[o,a]=r.useState(),u=r.useRef({}),c=r.useRef(e),s=r.useRef("none"),[d,f]=(t=e?"mounted":"unmounted",n={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},r.useReducer((e,t)=>{let r=n[e][t];return null!=r?r:e},t));return r.useEffect(()=>{let e=l(u.current);s.current="mounted"===d?e:"none"},[d]),(0,i.b)(()=>{let t=u.current,n=c.current;if(n!==e){let r=s.current,o=l(t);e?f("MOUNT"):"none"===o||(null==t?void 0:t.display)==="none"?f("UNMOUNT"):n&&r!==o?f("ANIMATION_OUT"):f("UNMOUNT"),c.current=e}},[e,f]),(0,i.b)(()=>{if(o){var e;let t;let n=null!==(e=o.ownerDocument.defaultView)&&void 0!==e?e:window,r=e=>{let r=l(u.current).includes(e.animationName);if(e.target===o&&r&&(f("ANIMATION_END"),!c.current)){let e=o.style.animationFillMode;o.style.animationFillMode="forwards",t=n.setTimeout(()=>{"forwards"===o.style.animationFillMode&&(o.style.animationFillMode=e)})}},i=e=>{e.target===o&&(s.current=l(u.current))};return o.addEventListener("animationstart",i),o.addEventListener("animationcancel",r),o.addEventListener("animationend",r),()=>{n.clearTimeout(t),o.removeEventListener("animationstart",i),o.removeEventListener("animationcancel",r),o.removeEventListener("animationend",r)}}f("ANIMATION_END")},[o,f]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:r.useCallback(e=>{e&&(u.current=getComputedStyle(e)),a(e)},[])}}(c),f="function"==typeof s?s({present:d.isPresent}):r.Children.only(s),p=(0,o.e)(d.ref,(a=null===(t=Object.getOwnPropertyDescriptor(f.props,"ref"))||void 0===t?void 0:t.get)&&"isReactWarning"in a&&a.isReactWarning?f.ref:(a=null===(n=Object.getOwnPropertyDescriptor(f,"ref"))||void 0===n?void 0:n.get)&&"isReactWarning"in a&&a.isReactWarning?f.props.ref:f.props.ref||f.ref);return"function"==typeof s||d.isPresent?r.cloneElement(f,{ref:p}):null};function l(e){return(null==e?void 0:e.animationName)||"none"}a.displayName="Presence"},6147:function(e,t,n){"use strict";n.d(t,{WV:function(){return l},jH:function(){return u}});var r=n(9334),o=n(9365),i=n(2078),a=n(6287),l=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{let n=r.forwardRef((e,n)=>{let{asChild:r,...o}=e,l=r?i.g7:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,a.jsx)(l,{...o,ref:n})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function u(e,t){e&&o.flushSync(()=>e.dispatchEvent(t))}},2078:function(e,t,n){"use strict";n.d(t,{g7:function(){return a}});var r=n(9334),o=n(1068),i=n(6287),a=r.forwardRef((e,t)=>{let{children:n,...o}=e,a=r.Children.toArray(n),u=a.find(c);if(u){let e=u.props.children,n=a.map(t=>t!==u?t:r.Children.count(e)>1?r.Children.only(null):r.isValidElement(e)?e.props.children:null);return(0,i.jsx)(l,{...o,ref:t,children:r.isValidElement(e)?r.cloneElement(e,void 0,n):null})}return(0,i.jsx)(l,{...o,ref:t,children:n})});a.displayName="Slot";var l=r.forwardRef((e,t)=>{let{children:n,...i}=e;if(r.isValidElement(n)){let e,a;let l=(e=Object.getOwnPropertyDescriptor(n.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?n.ref:(e=Object.getOwnPropertyDescriptor(n,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?n.props.ref:n.props.ref||n.ref;return r.cloneElement(n,{...function(e,t){let n={...t};for(let r in t){let o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(i,n.props),ref:t?(0,o.F)(t,l):l})}return r.Children.count(n)>1?r.Children.only(null):null});l.displayName="SlotClone";var u=({children:e})=>(0,i.jsx)(i.Fragment,{children:e});function c(e){return r.isValidElement(e)&&e.type===u}},4382:function(e,t,n){"use strict";n.d(t,{W:function(){return o}});var r=n(9334);function o(e){let t=r.useRef(e);return r.useEffect(()=>{t.current=e}),r.useMemo(()=>(...e)=>t.current?.(...e),[])}},22:function(e,t,n){"use strict";n.d(t,{T:function(){return i}});var r=n(9334),o=n(4382);function i({prop:e,defaultProp:t,onChange:n=()=>{}}){let[i,a]=function({defaultProp:e,onChange:t}){let n=r.useState(e),[i]=n,a=r.useRef(i),l=(0,o.W)(t);return r.useEffect(()=>{a.current!==i&&(l(i),a.current=i)},[i,a,l]),n}({defaultProp:t,onChange:n}),l=void 0!==e,u=l?e:i,c=(0,o.W)(n);return[u,r.useCallback(t=>{if(l){let n="function"==typeof t?t(e):t;n!==e&&c(n)}else a(t)},[l,e,a,c])]}},7790:function(e,t,n){"use strict";n.d(t,{b:function(){return o}});var r=n(9334),o=globalThis?.document?r.useLayoutEffect:()=>{}},5437:function(e,t,n){"use strict";n.d(t,{j:function(){return a}});var r=n(8256);let o=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,i=r.W,a=(e,t)=>n=>{var r;if((null==t?void 0:t.variants)==null)return i(e,null==n?void 0:n.class,null==n?void 0:n.className);let{variants:a,defaultVariants:l}=t,u=Object.keys(a).map(e=>{let t=null==n?void 0:n[e],r=null==l?void 0:l[e];
1if(null===t)return null;let i=o(t)||o(r);return a[e][i]}),c=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e},{});return i(e,u,null==t?void 0:null===(r=t.compoundVariants)||void 0===r?void 0:r.reduce((e,t)=>{let{class:n,className:r,...o}=t;return Object.entries(o).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...l,...c}[t]):({...l,...c})[t]===n})?[...e,n,r]:e},[]),null==n?void 0:n.class,null==n?void 0:n.className)}},976:function(e,t,n){"use strict";n.d(t,{F:function(){return s},f:function(){return d}});var r=n(9334),o=(e,t,n,r,o,i,a,l)=>{let u=document.documentElement,c=["light","dark"];function s(t){(Array.isArray(e)?e:[e]).forEach(e=>{let n="class"===e,r=n&&i?o.map(e=>i[e]||e):o;n?(u.classList.remove(...r),u.classList.add(i&&i[t]?i[t]:t)):u.setAttribute(e,t)}),l&&c.includes(t)&&(u.style.colorScheme=t)}if(r)s(r);else try{let e=localStorage.getItem(t)||n,r=a&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;s(r)}catch(e){}},i=["light","dark"],a="(prefers-color-scheme: dark)",l="undefined"==typeof window,u=r.createContext(void 0),c={setTheme:e=>{},themes:[]},s=()=>{var e;return null!=(e=r.useContext(u))?e:c},d=e=>r.useContext(u)?r.createElement(r.Fragment,null,e.children):r.createElement(p,{...e}),f=["light","dark"],p=e=>{let{forcedTheme:t,disableTransitionOnChange:n=!1,enableSystem:o=!0,enableColorScheme:l=!0,storageKey:c="theme",themes:s=f,defaultTheme:d=o?"system":"light",attribute:p="data-theme",value:y,children:w,nonce:b,scriptProps:x}=e,[E,C]=r.useState(()=>v(c,d)),[M,R]=r.useState(()=>"system"===E?g():E),k=y?Object.values(y):s,S=r.useCallback(e=>{let t=e;if(!t)return;"system"===e&&o&&(t=g());let r=y?y[t]:t,a=n?h(b):null,u=document.documentElement,c=e=>{"class"===e?(u.classList.remove(...k),r&&u.classList.add(r)):e.startsWith("data-")&&(r?u.setAttribute(e,r):u.removeAttribute(e))};if(Array.isArray(p)?p.forEach(c):c(p),l){let e=i.includes(d)?d:null,n=i.includes(t)?t:e;u.style.colorScheme=n}null==a||a()},[b]),T=r.useCallback(e=>{let t="function"==typeof e?e(E):e;C(t);try{localStorage.setItem(c,t)}catch(e){}},[E]),A=r.useCallback(e=>{R(g(e)),"system"===E&&o&&!t&&S("system")},[E,t]);r.useEffect(()=>{let e=window.matchMedia(a);return e.addListener(A),A(e),()=>e.removeListener(A)},[A]),r.useEffect(()=>{let e=e=>{e.key===c&&(e.newValue?C(e.newValue):T(d))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[T]),r.useEffect(()=>{S(null!=t?t:E)},[t,E]);let D=r.useMemo(()=>({theme:E,setTheme:T,forcedTheme:t,resolvedTheme:"system"===E?M:E,themes:o?[...s,"system"]:s,systemTheme:o?M:void 0}),[E,T,t,M,o,s]);return r.createElement(u.Provider,{value:D},r.createElement(m,{forcedTheme:t,storageKey:c,attribute:p,enableSystem:o,enableColorScheme:l,defaultTheme:d,value:y,themes:s,nonce:b,scriptProps:x}),w)},m=r.memo(e=>{let{forcedTheme:t,storageKey:n,attribute:i,enableSystem:a,enableColorScheme:l,defaultTheme:u,value:c,themes:s,nonce:d,scriptProps:f}=e,p=JSON.stringify([i,n,u,t,s,c,a,l]).slice(1,-1);return r.createElement("script",{...f,suppressHydrationWarning:!0,nonce:"undefined"==typeof window?d:"",dangerouslySetInnerHTML:{__html:"(".concat(o.toString(),")(").concat(p,")")}})}),v=(e,t)=>{let n;if(!l){try{n=localStorage.getItem(e)||void 0}catch(e){}return n||t}},h=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},g=e=>(e||(e=window.matchMedia(a)),e.matches?"dark":"light")}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.