@wellesley/ui 1.0.267 → 1.0.269
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.mjs +1 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -66,4 +66,4 @@ import*as P from"https://cdn.jsdelivr.net/npm/react@18.2.0/+esm";import ye,{forw
|
|
|
66
66
|
*
|
|
67
67
|
* This source code is licensed under the MIT license found in the
|
|
68
68
|
* LICENSE file in the root directory of this source tree.
|
|
69
|
-
*/function H5(){if(bC)return Nt;bC=1;var e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.server_context"),s=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen");function m(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:switch(e=e.type){case r:case i:case o:case c:case d:return e;default:switch(e=e&&e.$$typeof){case u:case l:case s:case p:case f:case a:return e;default:return h}}case n:return h}}}return e=Symbol.for("react.module.reference"),Nt.ContextConsumer=l,Nt.ContextProvider=a,Nt.Element=t,Nt.ForwardRef=s,Nt.Fragment=r,Nt.Lazy=p,Nt.Memo=f,Nt.Portal=n,Nt.Profiler=i,Nt.StrictMode=o,Nt.Suspense=c,Nt.SuspenseList=d,Nt.isAsyncMode=function(){return!1},Nt.isConcurrentMode=function(){return!1},Nt.isContextConsumer=function(e){return m(e)===l},Nt.isContextProvider=function(e){return m(e)===a},Nt.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Nt.isForwardRef=function(e){return m(e)===s},Nt.isFragment=function(e){return m(e)===r},Nt.isLazy=function(e){return m(e)===p},Nt.isMemo=function(e){return m(e)===f},Nt.isPortal=function(e){return m(e)===n},Nt.isProfiler=function(e){return m(e)===i},Nt.isStrictMode=function(e){return m(e)===o},Nt.isSuspense=function(e){return m(e)===c},Nt.isSuspenseList=function(e){return m(e)===d},Nt.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===i||t===o||t===c||t===d||t===h||"object"==typeof t&&null!==t&&(t.$$typeof===p||t.$$typeof===f||t.$$typeof===a||t.$$typeof===l||t.$$typeof===s||t.$$typeof===e||void 0!==t.getModuleId)},Nt.typeOf=m,Nt}function V5(){return wC||(wC=1,oy.exports=H5()),oy.exports}function gO(){if(xC)return iy;xC=1;var e=ta(),t=fo();return iy=function(n){return"number"==typeof n||t(n)&&"[object Number]"==e(n)}}function G5(){if(_C)return ay;_C=1;var e=gO();return ay=function(t){return e(t)&&t!=+t}}V5();var K5=G5();const Y5=Oo(K5);var X5=gO();const Q5=Oo(X5);var tv=function(e){return vO(e)&&e.indexOf("%")===e.length-1},Wo=function(e){return Q5(e)&&!Y5(e)},xv=function(e){return Wo(e)||vO(e)};function Qw(e){return(Qw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Z5=["viewBox","children"],J5=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],$C=["points","pathLength"],sy={svg:Z5,polygon:$C,polyline:$C},yO=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],e9=function(e,t,n){return function(r){return e(t,n,r),null}},t9=function(e,t,n){if(!mO(e)||"object"!==Qw(e))return null;var r=null;return Object.keys(e).forEach((function(o){var i=e[o];yO.includes(o)&&"function"==typeof i&&(r||(r={}),r[o]=e9(i,t,n))})),r},n9=function(e){return"string"==typeof e?e:e?e.displayName||e.name||"Component":""},r9=function(e,t,n,r){var o,i=null!==(o=null==sy?void 0:sy[r])&&void 0!==o?o:[];return!wv(e)&&(r&&i.includes(t)||J5.includes(t))||yO.includes(t)},bO=function(e,t,n){if(!e||"function"==typeof e||"boolean"==typeof e)return null;var r=e;if(Xi(e)&&(r=e.props),!mO(r))return null;var o={};return Object.keys(r).forEach((function(e){var i;r9(null===(i=r)||void 0===i?void 0:i[e],e,t,n)&&(o[e]=r[e])})),o},o9=["children","width","height","viewBox","className","style","title","desc"];function Zw(){return Zw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zw.apply(this,arguments)}function i9(e,t){if(null==e)return{};var n,r,o=a9(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function a9(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function s9(e){var t=e.children,n=e.width,r=e.height,o=e.viewBox,i=e.className,a=e.style,l=e.title,u=e.desc,s=i9(e,o9),c=o||{width:n,height:r,x:0,y:0},d=Za("recharts-surface",i);return ye.createElement("svg",Zw({},bO(s,!0,"svg"),{className:d,width:n,height:r,style:a,viewBox:"".concat(c.x," ").concat(c.y," ").concat(c.width," ").concat(c.height)}),ye.createElement("title",null,l),ye.createElement("desc",null,u),t)}var ly,SC,uy,CC,cy,EC,fy,PC,dy,RC,py,TC,hy,OC,vy,AC,mv=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o]};function l9(){if(SC)return ly;return SC=1,ly=function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i}}function u9(){if(CC)return uy;CC=1;var e=l9();return uy=function(t,n,r){var o=t.length;return r=void 0===r?o:r,!n&&r>=o?t:e(t,n,r)}}function wO(){if(EC)return cy;EC=1;var e=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");return cy=function(t){return e.test(t)}}function c9(){if(PC)return fy;return PC=1,fy=function(e){return e.split("")}}function f9(){if(RC)return dy;RC=1;var e="\\ud800-\\udfff",t="["+e+"]",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",r="\\ud83c[\\udffb-\\udfff]",o="[^"+e+"]",i="(?:\\ud83c[\\udde6-\\uddff]){2}",a="[\\ud800-\\udbff][\\udc00-\\udfff]",l="(?:"+n+"|"+r+")"+"?",u="[\\ufe0e\\ufe0f]?",s=u+l+("(?:\\u200d(?:"+[o,i,a].join("|")+")"+u+l+")*"),c="(?:"+[o+n+"?",n,i,a,t].join("|")+")",d=RegExp(r+"(?="+r+")|"+c+s,"g");return dy=function(e){return e.match(d)||[]}}function d9(){if(TC)return py;TC=1;var e=c9(),t=wO(),n=f9();return py=function(r){return t(r)?n(r):e(r)}}function p9(){if(OC)return hy;OC=1;var e=u9(),t=wO(),n=d9(),r=t_();return hy=function(o){return function(i){i=r(i);var a=t(i)?n(i):void 0,l=a?a[0]:i.charAt(0),u=a?e(a,1).join(""):i.slice(1);return l[o]()+u}}}function h9(){if(AC)return vy;AC=1;var e=p9()("toUpperCase");return vy=e}var v9=h9();const xO=Oo(v9);function nv(e){return function(){return e}}const _O=Math.cos,_v=Math.sin,Ko=Math.sqrt,$v=Math.PI,om=2*$v,Jw=Math.PI,ex=2*Jw,nl=1e-6,m9=ex-nl;function $O(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function g9(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return $O;const n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}class y9{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?$O:g9(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,o,i){this._append`C${+e},${+t},${+n},${+r},${this._x1=+o},${this._y1=+i}`}arcTo(e,t,n,r,o){if(e=+e,t=+t,n=+n,r=+r,(o=+o)<0)throw new Error(`negative radius: ${o}`);let i=this._x1,a=this._y1,l=n-e,u=r-t,s=i-e,c=a-t,d=s*s+c*c;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(d>nl)if(Math.abs(c*l-u*s)>nl&&o){let f=n-i,p=r-a,h=l*l+u*u,m=f*f+p*p,v=Math.sqrt(h),g=Math.sqrt(d),y=o*Math.tan((Jw-Math.acos((h+d-m)/(2*v*g)))/2),b=y/g,w=y/v;Math.abs(b-1)>nl&&this._append`L${e+b*s},${t+b*c}`,this._append`A${o},${o},0,0,${+(c*f>s*p)},${this._x1=e+w*l},${this._y1=t+w*u}`}else this._append`L${this._x1=e},${this._y1=t}`}arc(e,t,n,r,o,i){if(e=+e,t=+t,i=!!i,(n=+n)<0)throw new Error(`negative radius: ${n}`);let a=n*Math.cos(r),l=n*Math.sin(r),u=e+a,s=t+l,c=1^i,d=i?r-o:o-r;null===this._x1?this._append`M${u},${s}`:(Math.abs(this._x1-u)>nl||Math.abs(this._y1-s)>nl)&&this._append`L${u},${s}`,n&&(d<0&&(d=d%ex+ex),d>m9?this._append`A${n},${n},0,1,${c},${e-a},${t-l}A${n},${n},0,1,${c},${this._x1=u},${this._y1=s}`:d>nl&&this._append`A${n},${n},0,${+(d>=Jw)},${c},${this._x1=e+n*Math.cos(o)},${this._y1=t+n*Math.sin(o)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function b9(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{const e=Math.floor(n);if(!(e>=0))throw new RangeError(`invalid digits: ${n}`);t=e}return e},()=>new y9(t)}const r_={draw(e,t){const n=Ko(t/$v);e.moveTo(n,0),e.arc(0,0,n,0,om)}},w9={draw(e,t){const n=Ko(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},SO=Ko(1/3),x9=2*SO,_9={draw(e,t){const n=Ko(t/x9),r=n*SO;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},$9={draw(e,t){const n=Ko(t),r=-n/2;e.rect(r,r,n,n)}},S9=.8908130915292852,CO=_v($v/10)/_v(7*$v/10),C9=_v(om/10)*CO,E9=-_O(om/10)*CO,P9={draw(e,t){const n=Ko(t*S9),r=C9*n,o=E9*n;e.moveTo(0,-n),e.lineTo(r,o);for(let t=1;t<5;++t){const i=om*t/5,a=_O(i),l=_v(i);e.lineTo(l*n,-a*n),e.lineTo(a*r-l*o,l*r+a*o)}e.closePath()}},my=Ko(3),R9={draw(e,t){const n=-Ko(t/(3*my));e.moveTo(0,2*n),e.lineTo(-my*n,-n),e.lineTo(my*n,-n),e.closePath()}},Co=-.5,Eo=Ko(3)/2,tx=1/Ko(12),T9=3*(tx/2+1),O9={draw(e,t){const n=Ko(t/T9),r=n/2,o=n*tx,i=r,a=n*tx+n,l=-i,u=a;e.moveTo(r,o),e.lineTo(i,a),e.lineTo(l,u),e.lineTo(Co*r-Eo*o,Eo*r+Co*o),e.lineTo(Co*i-Eo*a,Eo*i+Co*a),e.lineTo(Co*l-Eo*u,Eo*l+Co*u),e.lineTo(Co*r+Eo*o,Co*o-Eo*r),e.lineTo(Co*i+Eo*a,Co*a-Eo*i),e.lineTo(Co*l+Eo*u,Co*u-Eo*l),e.closePath()}};function A9(e,t){let n=null,r=b9(o);function o(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return e="function"==typeof e?e:nv(e||r_),t="function"==typeof t?t:nv(void 0===t?64:+t),o.type=function(t){return arguments.length?(e="function"==typeof t?t:nv(t),o):e},o.size=function(e){return arguments.length?(t="function"==typeof e?e:nv(+e),o):t},o.context=function(e){return arguments.length?(n=e??null,o):n},o}function Cd(e){return(Cd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var N9=["type","size","sizeType"];function nx(){return nx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nx.apply(this,arguments)}function NC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function DC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?NC(Object(n),!0).forEach((function(t){D9(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NC(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function D9(e,t,n){return(t=I9(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I9(e){var t=k9(e,"string");return"symbol"==Cd(t)?t:t+""}function k9(e,t){if("object"!=Cd(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Cd(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function M9(e,t){if(null==e)return{};var n,r,o=L9(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function L9(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var EO={symbolCircle:r_,symbolCross:w9,symbolDiamond:_9,symbolSquare:$9,symbolStar:P9,symbolTriangle:R9,symbolWye:O9},j9=Math.PI/180,F9=function(e){var t="symbol".concat(xO(e));return EO[t]||r_},B9=function(e,t,n){if("area"===t)return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return.5*e*e/Math.sqrt(3);case"square":return e*e;case"star":var r=18*j9;return 1.25*e*e*(Math.tan(r)-Math.tan(2*r)*Math.pow(Math.tan(r),2));case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},q9=function(e,t){EO["symbol".concat(xO(e))]=t},PO=function(e){var t,n=e.type,r=void 0===n?"circle":n,o=e.size,i=void 0===o?64:o,a=e.sizeType,l=void 0===a?"area":a,u=DC(DC({},M9(e,N9)),{},{type:r,size:i,sizeType:l}),s=u.className,c=u.cx,d=u.cy,f=bO(u,!0);return c===+c&&d===+d&&i===+i?ye.createElement("path",nx({},f,{className:Za("recharts-symbols",s),transform:"translate(".concat(c,", ").concat(d,")"),d:(t=F9(r),A9().type(t).size(B9(i,l,r))())})):null};function Gu(e){return(Gu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function rx(){return rx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rx.apply(this,arguments)}function IC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function z9(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?IC(Object(n),!0).forEach((function(t){Ed(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):IC(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function W9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function U9(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,TO(r.key),r)}}function H9(e,t,n){return U9(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function V9(e,t,n){return t=Sv(t),G9(e,RO()?Reflect.construct(t,n||[],Sv(e).constructor):t.apply(e,n))}function G9(e,t){if(t&&("object"===Gu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return K9(e)}function K9(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function RO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(RO=function(){return!!e})()}function Sv(e){return(Sv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Y9(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ox(e,t)}function ox(e,t){return(ox=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ed(e,t,n){return(t=TO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TO(e){var t=X9(e,"string");return"symbol"==Gu(t)?t:t+""}function X9(e,t){if("object"!=Gu(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Gu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}PO.registerSymbol=q9;var gy,kC,yy,MC,by,LC,wy,jC,xy,FC,_y,BC,$y,qC,Sy,zC,Cy,WC,Ey,UC,Py,HC,Ry,VC,Ty,GC,Oy,KC,Ay,YC,Ny,XC,Dy,QC,Iy,ZC,ky,JC,My,eE,Ly,tE,jy,nE,Fy,rE,By,oE,Po=32,o_=function(){function e(){return W9(this,e),V9(this,e,arguments)}return Y9(e,zv),H9(e,[{key:"renderIcon",value:function(e){var t=this.props.inactiveColor,n=Po/2,r=Po/6,o=Po/3,i=e.inactive?t:e.color;if("plainline"===e.type)return ye.createElement("line",{strokeWidth:4,fill:"none",stroke:i,strokeDasharray:e.payload.strokeDasharray,x1:0,y1:n,x2:Po,y2:n,className:"recharts-legend-icon"});if("line"===e.type)return ye.createElement("path",{strokeWidth:4,fill:"none",stroke:i,d:"M0,".concat(n,"h").concat(o,"\n A").concat(r,",").concat(r,",0,1,1,").concat(2*o,",").concat(n,"\n H").concat(Po,"M").concat(2*o,",").concat(n,"\n A").concat(r,",").concat(r,",0,1,1,").concat(o,",").concat(n),className:"recharts-legend-icon"});if("rect"===e.type)return ye.createElement("path",{stroke:"none",fill:i,d:"M0,".concat(Po/8,"h").concat(Po,"v").concat(3*Po/4,"h").concat(-Po,"z"),className:"recharts-legend-icon"});if(ye.isValidElement(e.legendIcon)){var a=z9({},e);return delete a.legendIcon,ye.cloneElement(e.legendIcon,a)}return ye.createElement(PO,{fill:i,cx:n,cy:n,size:Po,sizeType:"diameter",type:e.type})}},{key:"renderItems",value:function(){var e=this,t=this.props,n=t.payload,r=t.iconSize,o=t.layout,i=t.formatter,a=t.inactiveColor,l={x:0,y:0,width:Po,height:Po},u={display:"horizontal"===o?"inline-block":"block",marginRight:10},s={display:"inline-block",verticalAlign:"middle",marginRight:4};return n.map((function(t,n){var o=t.formatter||i,c=Za(Ed(Ed({"recharts-legend-item":!0},"legend-item-".concat(n),!0),"inactive",t.inactive));if("none"===t.type)return null;var d=wv(t.value)?null:t.value;mv(!wv(t.value),'The name property is also required when using a function for the dataKey of a chart\'s cartesian components. Ex: <Bar name="Name of my Data"/>');var f=t.inactive?a:t.color;return ye.createElement("li",rx({className:c,style:u,key:"legend-item-".concat(n)},t9(e.props,t,n)),ye.createElement(s9,{width:r,height:r,viewBox:l,style:s},e.renderIcon(t)),ye.createElement("span",{className:"recharts-legend-item-text",style:{color:f}},o?o(d,t,n):d))}))}},{key:"render",value:function(){var e=this.props,t=e.payload,n=e.layout,r=e.align;if(!t||!t.length)return null;var o={padding:0,margin:0,textAlign:"horizontal"===n?r:"left"};return ye.createElement("ul",{className:"recharts-default-legend",style:o},this.renderItems())}}])}();function Q9(){if(kC)return gy;kC=1;var e=nm();return gy=function(){this.__data__=new e,this.size=0}}function Z9(){if(MC)return yy;return MC=1,yy=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}}function J9(){if(LC)return by;return LC=1,by=function(e){return this.__data__.get(e)}}function e4(){if(jC)return wy;return jC=1,wy=function(e){return this.__data__.has(e)}}function t4(){if(FC)return xy;FC=1;var e=nm(),t=Zx(),n=Jx();return xy=function(r,o){var i=this.__data__;if(i instanceof e){var a=i.__data__;if(!t||a.length<199)return a.push([r,o]),this.size=++i.size,this;i=this.__data__=new n(a)}return i.set(r,o),this.size=i.size,this}}function i_(){if(BC)return _y;BC=1;var e=nm(),t=Q9(),n=Z9(),r=J9(),o=e4(),i=t4();function a(t){var n=this.__data__=new e(t);this.size=n.size}return a.prototype.clear=t,a.prototype.delete=n,a.prototype.get=r,a.prototype.has=o,a.prototype.set=i,_y=a}function n4(){if(qC)return $y;qC=1;return $y=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}}function r4(){if(zC)return Sy;return zC=1,Sy=function(e){return this.__data__.has(e)}}function OO(){if(WC)return Cy;WC=1;var e=Jx(),t=n4(),n=r4();function r(t){var n=-1,r=null==t?0:t.length;for(this.__data__=new e;++n<r;)this.add(t[n])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,Cy=r}function o4(){if(UC)return Ey;return UC=1,Ey=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}}function AO(){if(HC)return Py;return HC=1,Py=function(e,t){return e.has(t)}}function NO(){if(VC)return Ry;VC=1;var e=OO(),t=o4(),n=AO();return Ry=function(r,o,i,a,l,u){var s=1&i,c=r.length,d=o.length;if(c!=d&&!(s&&d>c))return!1;var f=u.get(r),p=u.get(o);if(f&&p)return f==o&&p==r;var h=-1,m=!0,v=2&i?new e:void 0;for(u.set(r,o),u.set(o,r);++h<c;){var g=r[h],y=o[h];if(a)var b=s?a(y,g,h,o,r,u):a(g,y,h,r,o,u);if(void 0!==b){if(b)continue;m=!1;break}if(v){if(!t(o,(function(e,t){if(!n(v,t)&&(g===e||l(g,e,i,a,u)))return v.push(t)}))){m=!1;break}}else if(g!==y&&!l(g,y,i,a,u)){m=!1;break}}return u.delete(r),u.delete(o),m}}function DO(){if(GC)return Ty;GC=1;var e=Er().Uint8Array;return Ty=e}function i4(){if(KC)return Oy;return KC=1,Oy=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}}function a_(){if(YC)return Ay;return YC=1,Ay=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}}function a4(){if(XC)return Ny;XC=1;var e=ac(),t=DO(),n=em(),r=NO(),o=i4(),i=a_(),a=e?e.prototype:void 0,l=a?a.valueOf:void 0;return Ny=function(e,a,u,s,c,d,f){switch(u){case"[object DataView]":if(e.byteLength!=a.byteLength||e.byteOffset!=a.byteOffset)return!1;e=e.buffer,a=a.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=a.byteLength||!d(new t(e),new t(a)));case"[object Boolean]":case"[object Date]":case"[object Number]":return n(+e,+a);case"[object Error]":return e.name==a.name&&e.message==a.message;case"[object RegExp]":case"[object String]":return e==a+"";case"[object Map]":var p=o;case"[object Set]":var h=1&s;if(p||(p=i),e.size!=a.size&&!h)return!1;var m=f.get(e);if(m)return m==a;s|=2,f.set(e,a);var v=r(p(e),p(a),s,c,d,f);return f.delete(e),v;case"[object Symbol]":if(l)return l.call(e)==l.call(a)}return!1}}function s_(){if(QC)return Dy;return QC=1,Dy=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}}function IO(){if(ZC)return Iy;ZC=1;var e=s_(),t=Cr();return Iy=function(n,r,o){var i=r(n);return t(n)?i:e(i,o(n))}}function s4(){if(JC)return ky;return JC=1,ky=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}}function kO(){if(eE)return My;return eE=1,My=function(){return[]}}function l_(){if(tE)return Ly;tE=1;var e=s4(),t=kO(),n=Object.prototype.propertyIsEnumerable,r=Object.getOwnPropertySymbols;return Ly=r?function(t){return null==t?[]:(t=Object(t),e(r(t),(function(e){return n.call(t,e)})))}:t}function l4(){if(nE)return jy;return nE=1,jy=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}}function u4(){if(rE)return Fy;rE=1;var e=ta(),t=fo();return Fy=function(n){return t(n)&&"[object Arguments]"==e(n)}}function u_(){if(oE)return By;oE=1;var e=u4(),t=fo(),n=Object.prototype,r=n.hasOwnProperty,o=n.propertyIsEnumerable,i=e(function(){return arguments}())?e:function(e){return t(e)&&r.call(e,"callee")&&!o.call(e,"callee")};return By=i}Ed(o_,"displayName","Legend"),Ed(o_,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var qy,iE,aE,zy,sE,Wy,lE,Uy,uE,Hy,cE,vd={exports:{}};function c4(){if(iE)return qy;return iE=1,qy=function(){return!1}}function c_(){return aE||(aE=1,e=vd,t=vd.exports,n=Er(),r=c4(),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o?n.Buffer:void 0,l=(a?a.isBuffer:void 0)||r,e.exports=l),vd.exports;var e,t,n,r,o,i,a,l}function im(){if(sE)return zy;sE=1;var e=/^(?:0|[1-9]\d*)$/;return zy=function(t,n){var r=typeof t;return!!(n=n??9007199254740991)&&("number"==r||"symbol"!=r&&e.test(t))&&t>-1&&t%1==0&&t<n}}function f_(){if(lE)return Wy;lE=1;return Wy=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}}function f4(){if(uE)return Uy;uE=1;var e=ta(),t=f_(),n=fo(),r={};return r["[object Float32Array]"]=r["[object Float64Array]"]=r["[object Int8Array]"]=r["[object Int16Array]"]=r["[object Int32Array]"]=r["[object Uint8Array]"]=r["[object Uint8ClampedArray]"]=r["[object Uint16Array]"]=r["[object Uint32Array]"]=!0,r["[object Arguments]"]=r["[object Array]"]=r["[object ArrayBuffer]"]=r["[object Boolean]"]=r["[object DataView]"]=r["[object Date]"]=r["[object Error]"]=r["[object Function]"]=r["[object Map]"]=r["[object Number]"]=r["[object Object]"]=r["[object RegExp]"]=r["[object Set]"]=r["[object String]"]=r["[object WeakMap]"]=!1,Uy=function(o){return n(o)&&t(o.length)&&!!r[e(o)]}}function am(){if(cE)return Hy;return cE=1,Hy=function(e){return function(t){return e(t)}}}vd.exports;var fE,Vy,dE,Gy,pE,Ky,hE,Yy,vE,Xy,mE,Qy,gE,Zy,yE,Jy,bE,eb,wE,tb,xE,nb,_E,rb,$E,ob,SE,ib,CE,ab,EE,sb,PE,lb,RE,ub,TE,cb,OE,fb,AE,db,NE,pb,DE,hb,IE,vb,kE,mb,ME,gb,LE,yb,jE,bb,FE,wb,BE,xb,qE,_b,zE,$b,WE,Sb,UE,Cb,HE,Eb,VE,Pb,GE,Rb,KE,Tb,YE,Ob,XE,Ab,QE,Nb,ZE,md={exports:{}};function d_(){return fE||(fE=1,e=md,t=md.exports,n=cO(),r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,i=o&&o.exports===r&&n.process,a=function(){try{return o&&o.require&&o.require("util").types||i&&i.binding&&i.binding("util")}catch{}}(),e.exports=a),md.exports;var e,t,n,r,o,i,a}function MO(){if(dE)return Vy;dE=1;var e=f4(),t=am(),n=d_(),r=n&&n.isTypedArray,o=r?t(r):e;return Vy=o}function LO(){if(pE)return Gy;pE=1;var e=l4(),t=u_(),n=Cr(),r=c_(),o=im(),i=MO(),a=Object.prototype.hasOwnProperty;return Gy=function(l,u){var s=n(l),c=!s&&t(l),d=!s&&!c&&r(l),f=!s&&!c&&!d&&i(l),p=s||c||d||f,h=p?e(l.length,String):[],m=h.length;for(var v in l)(u||a.call(l,v))&&(!p||!("length"==v||d&&("offset"==v||"parent"==v)||f&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||o(v,m)))&&h.push(v);return h}}function p_(){if(hE)return Ky;hE=1;var e=Object.prototype;return Ky=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}}function jO(){if(vE)return Yy;return vE=1,Yy=function(e,t){return function(n){return e(t(n))}}}function d4(){if(mE)return Xy;mE=1;var e=jO()(Object.keys,Object);return Xy=e}function FO(){if(gE)return Qy;gE=1;var e=p_(),t=d4(),n=Object.prototype.hasOwnProperty;return Qy=function(r){if(!e(r))return t(r);var o=[];for(var i in Object(r))n.call(r,i)&&"constructor"!=i&&o.push(i);return o}}function zd(){if(yE)return Zy;yE=1;var e=Zv(),t=f_();return Zy=function(n){return null!=n&&t(n.length)&&!e(n)}}function Wd(){if(bE)return Jy;bE=1;var e=LO(),t=FO(),n=zd();return Jy=function(r){return n(r)?e(r):t(r)}}function BO(){if(wE)return eb;wE=1;var e=IO(),t=l_(),n=Wd();return eb=function(r){return e(r,n,t)}}function p4(){if(xE)return tb;xE=1;var e=BO(),t=Object.prototype.hasOwnProperty;return tb=function(n,r,o,i,a,l){var u=1&o,s=e(n),c=s.length;if(c!=e(r).length&&!u)return!1;for(var d=c;d--;){var f=s[d];if(!(u?f in r:t.call(r,f)))return!1}var p=l.get(n),h=l.get(r);if(p&&h)return p==r&&h==n;var m=!0;l.set(n,r),l.set(r,n);for(var v=u;++d<c;){var g=n[f=s[d]],y=r[f];if(i)var b=u?i(y,g,f,r,n,l):i(g,y,f,n,r,l);if(!(void 0===b?g===y||a(g,y,o,i,l):b)){m=!1;break}v||(v="constructor"==f)}if(m&&!v){var w=n.constructor,x=r.constructor;w!=x&&"constructor"in n&&"constructor"in r&&!("function"==typeof w&&w instanceof w&&"function"==typeof x&&x instanceof x)&&(m=!1)}return l.delete(n),l.delete(r),m}}function h4(){if(_E)return nb;_E=1;var e=gl()(Er(),"DataView");return nb=e}function v4(){if($E)return rb;$E=1;var e=gl()(Er(),"Promise");return rb=e}function qO(){if(SE)return ob;SE=1;var e=gl()(Er(),"Set");return ob=e}function zO(){if(CE)return ib;CE=1;var e=gl()(Er(),"WeakMap");return ib=e}function Ud(){if(EE)return ab;EE=1;var e=h4(),t=Zx(),n=v4(),r=qO(),o=zO(),i=ta(),a=fO(),l="[object Map]",u="[object Promise]",s="[object Set]",c="[object WeakMap]",d="[object DataView]",f=a(e),p=a(t),h=a(n),m=a(r),v=a(o),g=i;return(e&&g(new e(new ArrayBuffer(1)))!=d||t&&g(new t)!=l||n&&g(n.resolve())!=u||r&&g(new r)!=s||o&&g(new o)!=c)&&(g=function(e){var t=i(e),n="[object Object]"==t?e.constructor:void 0,r=n?a(n):"";if(r)switch(r){case f:return d;case p:return l;case h:return u;case m:return s;case v:return c}return t}),ab=g}function m4(){if(PE)return sb;PE=1;var e=i_(),t=NO(),n=a4(),r=p4(),o=Ud(),i=Cr(),a=c_(),l=MO(),u="[object Arguments]",s="[object Array]",c="[object Object]",d=Object.prototype.hasOwnProperty;return sb=function(f,p,h,m,v,g){var y=i(f),b=i(p),w=y?s:o(f),x=b?s:o(p),_=(w=w==u?c:w)==c,k=(x=x==u?c:x)==c,P=w==x;if(P&&a(f)){if(!a(p))return!1;y=!0,_=!1}if(P&&!_)return g||(g=new e),y||l(f)?t(f,p,h,m,v,g):n(f,p,w,h,m,v,g);if(!(1&h)){var S=_&&d.call(f,"__wrapped__"),C=k&&d.call(p,"__wrapped__");if(S||C){var E=S?f.value():f,N=C?p.value():p;return g||(g=new e),v(E,N,h,m,g)}}return!!P&&(g||(g=new e),r(f,p,h,m,v,g))}}function WO(){if(RE)return lb;RE=1;var e=m4(),t=fo();return lb=function n(r,o,i,a,l){return r===o||(null==r||null==o||!t(r)&&!t(o)?r!=r&&o!=o:e(r,o,i,a,n,l))},lb}function g4(){if(TE)return ub;TE=1;var e=i_(),t=WO();return ub=function(n,r,o,i){var a=o.length,l=a,u=!i;if(null==n)return!l;for(n=Object(n);a--;){var s=o[a];if(u&&s[2]?s[1]!==n[s[0]]:!(s[0]in n))return!1}for(;++a<l;){var c=(s=o[a])[0],d=n[c],f=s[1];if(u&&s[2]){if(void 0===d&&!(c in n))return!1}else{var p=new e;if(i)var h=i(d,f,c,n,r,p);if(!(void 0===h?t(f,d,3,i,p):h))return!1}}return!0}}function UO(){if(OE)return cb;OE=1;var e=No();return cb=function(t){return t==t&&!e(t)}}function y4(){if(AE)return fb;AE=1;var e=UO(),t=Wd();return fb=function(n){for(var r=t(n),o=r.length;o--;){var i=r[o],a=n[i];r[o]=[i,a,e(a)]}return r}}function HO(){if(NE)return db;return NE=1,db=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}}function b4(){if(DE)return pb;DE=1;var e=g4(),t=y4(),n=HO();return pb=function(r){var o=t(r);return 1==o.length&&o[0][2]?n(o[0][0],o[0][1]):function(t){return t===r||e(t,r,o)}}}function w4(){if(IE)return hb;return IE=1,hb=function(e,t){return null!=e&&t in Object(e)}}function x4(){if(kE)return vb;kE=1;var e=pO(),t=u_(),n=Cr(),r=im(),o=f_(),i=qd();return vb=function(a,l,u){for(var s=-1,c=(l=e(l,a)).length,d=!1;++s<c;){var f=i(l[s]);if(!(d=null!=a&&u(a,f)))break;a=a[f]}return d||++s!=c?d:!!(c=null==a?0:a.length)&&o(c)&&r(f,c)&&(n(a)||t(a))}}function _4(){if(ME)return mb;ME=1;var e=w4(),t=x4();return mb=function(n,r){return null!=n&&t(n,r,e)}}function $4(){if(LE)return gb;LE=1;var e=WO(),t=hO(),n=_4(),r=Qx(),o=UO(),i=HO(),a=qd();return gb=function(l,u){return r(l)&&o(u)?i(a(l),u):function(r){var o=t(r,l);return void 0===o&&o===u?n(r,l):e(u,o,3)}}}function Hd(){if(jE)return yb;return jE=1,yb=function(e){return e}}function S4(){if(FE)return bb;return FE=1,bb=function(e){return function(t){return null==t?void 0:t[e]}}}function C4(){if(BE)return wb;BE=1;var e=n_();return wb=function(t){return function(n){return e(n,t)}}}function E4(){if(qE)return xb;qE=1;var e=S4(),t=C4(),n=Qx(),r=qd();return xb=function(o){return n(o)?e(r(o)):t(o)}}function h_(){if(zE)return _b;zE=1;var e=b4(),t=$4(),n=Hd(),r=Cr(),o=E4();return _b=function(i){return"function"==typeof i?i:null==i?n:"object"==typeof i?r(i)?t(i[0],i[1]):e(i):o(i)}}function P4(){if(WE)return $b;return WE=1,$b=function(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}}function R4(){if(UE)return Sb;return UE=1,Sb=function(e){return e!=e}}function T4(){if(HE)return Cb;return HE=1,Cb=function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}}function O4(){if(VE)return Eb;VE=1;var e=P4(),t=R4(),n=T4();return Eb=function(r,o,i){return o==o?n(r,o,i):e(r,t,i)}}function VO(){if(GE)return Pb;GE=1;var e=O4();return Pb=function(t,n){return!!(null==t?0:t.length)&&e(t,n,0)>-1}}function A4(){if(KE)return Rb;return KE=1,Rb=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}}function GO(){if(YE)return Tb;return YE=1,Tb=function(){}}function N4(){if(XE)return Ob;XE=1;var e=qO(),t=GO(),n=a_(),r=e&&1/n(new e([,-0]))[1]==1/0?function(t){return new e(t)}:t;return Ob=r}function D4(){if(QE)return Ab;QE=1;var e=OO(),t=VO(),n=A4(),r=AO(),o=N4(),i=a_();return Ab=function(a,l,u){var s=-1,c=t,d=a.length,f=!0,p=[],h=p;if(u)f=!1,c=n;else if(d>=200){var m=l?null:o(a);if(m)return i(m);f=!1,c=r,h=new e}else h=l?[]:p;e:for(;++s<d;){var v=a[s],g=l?l(v):v;if(v=u||0!==v?v:0,f&&g==g){for(var y=h.length;y--;)if(h[y]===g)continue e;l&&h.push(g),p.push(v)}else c(h,g,u)||(h!==p&&h.push(g),p.push(v))}return p}}function I4(){if(ZE)return Nb;ZE=1;var e=h_(),t=D4();return Nb=function(n,r){return n&&n.length?t(n,e(r,2)):[]}}md.exports;var k4=I4();const JE=Oo(k4);function KO(e,t,n){return!0===t?JE(e,n):wv(t)?JE(e,t):e}function Ku(e){return(Ku="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var M4=["ref"];function eP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Vi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eP(Object(n),!0).forEach((function(t){sm(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function L4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,XO(r.key),r)}}function j4(e,t,n){return tP(e.prototype,t),tP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function F4(e,t,n){return t=Cv(t),B4(e,YO()?Reflect.construct(t,n,Cv(e).constructor):t.apply(e,n))}function B4(e,t){if(t&&("object"===Ku(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return q4(e)}function q4(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function YO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(YO=function(){return!!e})()}function Cv(e){return(Cv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function z4(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ix(e,t)}function ix(e,t){return(ix=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function sm(e,t,n){return(t=XO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function XO(e){var t=W4(e,"string");return"symbol"==Ku(t)?t:t+""}function W4(e,t){if("object"!=Ku(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Ku(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function U4(e,t){if(null==e)return{};var n,r,o=H4(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function H4(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function V4(e){return e.value}function G4(e,t){if(ye.isValidElement(e))return ye.cloneElement(e,t);if("function"==typeof e)return ye.createElement(e,t);t.ref;var n=U4(t,M4);return ye.createElement(o_,n)}var Db,rP,Ib,oP,kb,iP,Mb,aP,Lb,sP,jb,lP,Fb,uP,Bb,cP,qb,fP,zb,dP,Wb,pP,Ub,hP,Hb,vP,Vb,mP,Gb,gP,Kb,yP,Yb,bP,Xb,wP,Qb,xP,Zb,_P,Jb,$P,e1,SP,nP=1,v_=function(){function e(){var t;L4(this,e);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return sm(t=F4(this,e,[].concat(r)),"lastBoundingBox",{width:-1,height:-1}),t}return z4(e,zv),j4(e,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();return e.height=this.wrapperNode.offsetHeight,e.width=this.wrapperNode.offsetWidth,e}return null}},{key:"updateBBox",value:function(){var e=this.props.onBBoxUpdate,t=this.getBBox();t?(Math.abs(t.width-this.lastBoundingBox.width)>nP||Math.abs(t.height-this.lastBoundingBox.height)>nP)&&(this.lastBoundingBox.width=t.width,this.lastBoundingBox.height=t.height,e&&e(t)):(-1!==this.lastBoundingBox.width||-1!==this.lastBoundingBox.height)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,e&&e(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Vi({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(e){var t,n,r=this.props,o=r.layout,i=r.align,a=r.verticalAlign,l=r.margin,u=r.chartWidth,s=r.chartHeight;if(!e||(void 0===e.left||null===e.left)&&(void 0===e.right||null===e.right))if("center"===i&&"vertical"===o){t={left:((u||0)-this.getBBoxSnapshot().width)/2}}else t="right"===i?{right:l&&l.right||0}:{left:l&&l.left||0};if(!e||(void 0===e.top||null===e.top)&&(void 0===e.bottom||null===e.bottom))if("middle"===a){n={top:((s||0)-this.getBBoxSnapshot().height)/2}}else n="bottom"===a?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return Vi(Vi({},t),n)}},{key:"render",value:function(){var e=this,t=this.props,n=t.content,r=t.width,o=t.height,i=t.wrapperStyle,a=t.payloadUniqBy,l=t.payload,u=Vi(Vi({position:"absolute",width:r||"auto",height:o||"auto"},this.getDefaultPosition(i)),i);return ye.createElement("div",{className:"recharts-legend-wrapper",style:u,ref:function(t){e.wrapperNode=t}},G4(n,Vi(Vi({},this.props),{},{payload:KO(l,a,V4)})))}}],[{key:"getWithHeight",value:function(e,t){var n=Vi(Vi({},this.defaultProps),e.props).layout;return"vertical"===n&&Wo(e.props.height)?{height:e.props.height}:"horizontal"===n?{width:e.props.width||t}:null}}])}();function K4(){if(rP)return Db;rP=1;var e=ac(),t=u_(),n=Cr(),r=e?e.isConcatSpreadable:void 0;return Db=function(e){return n(e)||t(e)||!!(r&&e&&e[r])}}function QO(){if(oP)return Ib;oP=1;var e=s_(),t=K4();return Ib=function n(r,o,i,a,l){var u=-1,s=r.length;for(i||(i=t),l||(l=[]);++u<s;){var c=r[u];o>0&&i(c)?o>1?n(c,o-1,i,a,l):e(l,c):a||(l[l.length]=c)}return l},Ib}function Y4(){if(iP)return kb;return iP=1,kb=function(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),l=a.length;l--;){var u=a[e?l:++o];if(!1===n(i[u],u,i))break}return t}}}function X4(){if(aP)return Mb;aP=1;var e=Y4()();return Mb=e}function Q4(){if(sP)return Lb;sP=1;var e=X4(),t=Wd();return Lb=function(n,r){return n&&e(n,r,t)}}function Z4(){if(lP)return jb;lP=1;var e=zd();return jb=function(t,n){return function(r,o){if(null==r)return r;if(!e(r))return t(r,o);for(var i=r.length,a=n?i:-1,l=Object(r);(n?a--:++a<i)&&!1!==o(l[a],a,l););return r}}}function J4(){if(uP)return Fb;uP=1;var e=Q4(),t=Z4()(e);return Fb=t}function eL(){if(cP)return Bb;cP=1;var e=J4(),t=zd();return Bb=function(n,r){var o=-1,i=t(n)?Array(n.length):[];return e(n,(function(e,t,n){i[++o]=r(e,t,n)})),i}}function tL(){if(fP)return qb;return fP=1,qb=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}}function nL(){if(dP)return zb;dP=1;var e=sc();return zb=function(t,n){if(t!==n){var r=void 0!==t,o=null===t,i=t==t,a=e(t),l=void 0!==n,u=null===n,s=n==n,c=e(n);if(!u&&!c&&!a&&t>n||a&&l&&s&&!u&&!c||o&&l&&s||!r&&s||!i)return 1;if(!o&&!a&&!c&&t<n||c&&r&&i&&!o&&!a||u&&r&&i||!l&&i||!s)return-1}return 0}}function rL(){if(pP)return Wb;pP=1;var e=nL();return Wb=function(t,n,r){for(var o=-1,i=t.criteria,a=n.criteria,l=i.length,u=r.length;++o<l;){var s=e(i[o],a[o]);if(s)return o>=u?s:s*("desc"==r[o]?-1:1)}return t.index-n.index}}function oL(){if(hP)return Ub;hP=1;var e=e_(),t=n_(),n=h_(),r=eL(),o=tL(),i=am(),a=rL(),l=Hd(),u=Cr();return Ub=function(s,c,d){c=c.length?e(c,(function(e){return u(e)?function(n){return t(n,1===e.length?e[0]:e)}:e})):[l];var f=-1;c=e(c,i(n));var p=r(s,(function(t,n,r){return{criteria:e(c,(function(e){return e(t)})),index:++f,value:t}}));return o(p,(function(e,t){return a(e,t,d)}))}}function m_(){if(vP)return Hb;return vP=1,Hb=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}}function ZO(){if(mP)return Vb;mP=1;var e=m_(),t=Math.max;return Vb=function(n,r,o){return r=t(void 0===r?n.length-1:r,0),function(){for(var i=arguments,a=-1,l=t(i.length-r,0),u=Array(l);++a<l;)u[a]=i[r+a];a=-1;for(var s=Array(r+1);++a<r;)s[a]=i[a];return s[r]=o(u),e(n,this,s)}},Vb}function iL(){if(gP)return Gb;return gP=1,Gb=function(e){return function(){return e}}}function JO(){if(yP)return Kb;yP=1;var e=gl(),t=function(){try{var t=e(Object,"defineProperty");return t({},"",{}),t}catch{}}();return Kb=t}function aL(){if(bP)return Yb;bP=1;var e=iL(),t=JO(),n=Hd();return Yb=t?function(n,r){return t(n,"toString",{configurable:!0,enumerable:!1,value:e(r),writable:!0})}:n}function eA(){if(wP)return Xb;wP=1;var e=Date.now;return Xb=function(t){var n=0,r=0;return function(){var o=e(),i=16-(o-r);if(r=o,i>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}},Xb}function g_(){if(xP)return Qb;xP=1;var e=aL(),t=eA()(e);return Qb=t}function sL(){if(_P)return Zb;_P=1;var e=Hd(),t=ZO(),n=g_();return Zb=function(r,o){return n(t(r,o,e),r+"")}}function lL(){if($P)return Jb;$P=1;var e=em(),t=zd(),n=im(),r=No();return Jb=function(o,i,a){if(!r(a))return!1;var l=typeof i;return!!("number"==l?t(a)&&n(i,a.length):"string"==l&&i in a)&&e(a[i],o)}}function uL(){if(SP)return e1;SP=1;var e=QO(),t=oL(),n=sL(),r=lL(),o=n((function(n,o){if(null==n)return[];var i=o.length;return i>1&&r(n,o[0],o[1])?o=[]:i>2&&r(o[0],o[1],o[2])&&(o=[o[0]]),t(n,e(o,1),[])}));return e1=o}sm(v_,"displayName","Legend"),sm(v_,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var cL=uL();const fL=Oo(cL);function Pd(e){return(Pd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ax(){return ax=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ax.apply(this,arguments)}function dL(e,t){return mL(e)||vL(e,t)||hL(e,t)||pL()}function pL(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function hL(e,t){if(e){if("string"==typeof e)return CP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return CP(e,t)}}function CP(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function vL(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0!==t)for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}function mL(e){if(Array.isArray(e))return e}function EP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t1(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?EP(Object(n),!0).forEach((function(t){gL(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):EP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function gL(e,t,n){return(t=yL(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yL(e){var t=bL(e,"string");return"symbol"==Pd(t)?t:t+""}function bL(e,t){if("object"!=Pd(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Pd(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function wL(e){return Array.isArray(e)&&xv(e[0])&&xv(e[1])?e.join(" ~ "):e}var xL=function(e){var t=e.separator,n=void 0===t?" : ":t,r=e.contentStyle,o=void 0===r?{}:r,i=e.itemStyle,a=void 0===i?{}:i,l=e.labelStyle,u=void 0===l?{}:l,s=e.payload,c=e.formatter,d=e.itemSorter,f=e.wrapperClassName,p=e.labelClassName,h=e.label,m=e.labelFormatter,v=e.accessibilityLayer,g=void 0!==v&&v,y=t1({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},o),b=t1({margin:0},u),w=!B5(h),x=w?h:"",_=Za("recharts-default-tooltip",f),k=Za("recharts-tooltip-label",p);w&&m&&null!=s&&(x=m(h,s));var P=g?{role:"status","aria-live":"assertive"}:{};return ye.createElement("div",ax({className:_,style:y},P),ye.createElement("p",{className:k,style:b},ye.isValidElement(x)?x:"".concat(x)),function(){if(s&&s.length){var e=(d?fL(s,d):s).map((function(e,t){if("none"===e.type)return null;var r=t1({display:"block",paddingTop:4,paddingBottom:4,color:e.color||"#000"},a),o=e.formatter||c||wL,i=e.value,l=e.name,u=i,d=l;if(null!=u&&null!=d){var f=o(i,l,e,t,s);if(Array.isArray(f)){var p=dL(f,2);u=p[0],d=p[1]}else u=f}return ye.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(t),style:r},xv(d)?ye.createElement("span",{className:"recharts-tooltip-item-name"},d):null,xv(d)?ye.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,ye.createElement("span",{className:"recharts-tooltip-item-value"},u),ye.createElement("span",{className:"recharts-tooltip-item-unit"},e.unit||""))}));return ye.createElement("ul",{className:"recharts-tooltip-item-list",style:{padding:0,margin:0}},e)}return null}())};function Rd(e){return(Rd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function rv(e,t,n){return(t=_L(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _L(e){var t=$L(e,"string");return"symbol"==Rd(t)?t:t+""}function $L(e,t){if("object"!=Rd(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Rd(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var cd="recharts-tooltip-wrapper",SL={visibility:"hidden"};function CL(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return Za(cd,rv(rv(rv(rv({},"".concat(cd,"-right"),Wo(n)&&t&&Wo(t.x)&&n>=t.x),"".concat(cd,"-left"),Wo(n)&&t&&Wo(t.x)&&n<t.x),"".concat(cd,"-bottom"),Wo(r)&&t&&Wo(t.y)&&r>=t.y),"".concat(cd,"-top"),Wo(r)&&t&&Wo(t.y)&&r<t.y))}function PP(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,o=e.offsetTopLeft,i=e.position,a=e.reverseDirection,l=e.tooltipDimension,u=e.viewBox,s=e.viewBoxDimension;if(i&&Wo(i[r]))return i[r];var c=n[r]-l-o,d=n[r]+o;return t[r]?a[r]?c:d:a[r]?c<u[r]?Math.max(d,u[r]):Math.max(c,u[r]):d+l>u[r]+s?Math.max(c,u[r]):Math.max(d,u[r])}function EL(e){var t=e.translateX,n=e.translateY;return{transform:e.useTranslate3d?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function PL(e){var t,n,r,o=e.allowEscapeViewBox,i=e.coordinate,a=e.offsetTopLeft,l=e.position,u=e.reverseDirection,s=e.tooltipBox,c=e.useTranslate3d,d=e.viewBox;return s.height>0&&s.width>0&&i?t=EL({translateX:n=PP({allowEscapeViewBox:o,coordinate:i,key:"x",offsetTopLeft:a,position:l,reverseDirection:u,tooltipDimension:s.width,viewBox:d,viewBoxDimension:d.width}),translateY:r=PP({allowEscapeViewBox:o,coordinate:i,key:"y",offsetTopLeft:a,position:l,reverseDirection:u,tooltipDimension:s.height,viewBox:d,viewBoxDimension:d.height}),useTranslate3d:c}):t=SL,{cssProperties:t,cssClasses:CL({translateX:n,translateY:r,coordinate:i})}}function Yu(e){return(Yu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function RP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function TP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?RP(Object(n),!0).forEach((function(t){lx(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function RL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TL(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,nA(r.key),r)}}function OL(e,t,n){return TL(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function AL(e,t,n){return t=Ev(t),NL(e,tA()?Reflect.construct(t,n,Ev(e).constructor):t.apply(e,n))}function NL(e,t){if(t&&("object"===Yu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return DL(e)}function DL(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(tA=function(){return!!e})()}function Ev(e){return(Ev=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function IL(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sx(e,t)}function sx(e,t){return(sx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function lx(e,t,n){return(t=nA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nA(e){var t=kL(e,"string");return"symbol"==Yu(t)?t:t+""}function kL(e,t){if("object"!=Yu(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=Yu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var OP=1,ML=function(){function e(){var t;RL(this,e);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return lx(t=AL(this,e,[].concat(r)),"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),lx(t,"handleKeyDown",(function(e){var n,r,o,i;"Escape"===e.key&&t.setState({dismissed:!0,dismissedAtCoordinate:{x:null!==(n=null===(r=t.props.coordinate)||void 0===r?void 0:r.x)&&void 0!==n?n:0,y:null!==(o=null===(i=t.props.coordinate)||void 0===i?void 0:i.y)&&void 0!==o?o:0}})})),t}return IL(e,zv),OL(e,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();(Math.abs(e.width-this.state.lastBoundingBox.width)>OP||Math.abs(e.height-this.state.lastBoundingBox.height)>OP)&&this.setState({lastBoundingBox:{width:e.width,height:e.height}})}else(-1!==this.state.lastBoundingBox.width||-1!==this.state.lastBoundingBox.height)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var e,t;this.props.active&&this.updateBBox(),this.state.dismissed&&((null===(e=this.props.coordinate)||void 0===e?void 0:e.x)!==this.state.dismissedAtCoordinate.x||(null===(t=this.props.coordinate)||void 0===t?void 0:t.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var e=this,t=this.props,n=t.active,r=t.allowEscapeViewBox,o=t.animationDuration,i=t.animationEasing,a=t.children,l=t.coordinate,u=t.hasPayload,s=t.isAnimationActive,c=t.offset,d=t.position,f=t.reverseDirection,p=t.useTranslate3d,h=t.viewBox,m=t.wrapperStyle,v=PL({allowEscapeViewBox:r,coordinate:l,offsetTopLeft:c,position:d,reverseDirection:f,tooltipBox:this.state.lastBoundingBox,useTranslate3d:p,viewBox:h}),g=v.cssClasses,y=v.cssProperties,b=TP(TP({transition:s&&n?"transform ".concat(o,"ms ").concat(i):void 0},y),{},{pointerEvents:"none",visibility:!this.state.dismissed&&n&&u?"visible":"hidden",position:"absolute",top:0,left:0},m);return ye.createElement("div",{tabIndex:-1,className:g,style:b,ref:function(t){e.wrapperNode=t}},a)}}])}(),LL=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},gv={isSsr:LL(),get:function(e){return gv[e]},set:function(e,t){if("string"==typeof e)gv[e]=t;else{var n=Object.keys(e);n&&n.length&&n.forEach((function(t){gv[t]=e[t]}))}}};function Xu(e){return(Xu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function AP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function NP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?AP(Object(n),!0).forEach((function(t){y_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function jL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function FL(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,oA(r.key),r)}}function BL(e,t,n){return FL(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function qL(e,t,n){return t=Pv(t),zL(e,rA()?Reflect.construct(t,n||[],Pv(e).constructor):t.apply(e,n))}function zL(e,t){if(t&&("object"===Xu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return WL(e)}function WL(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(rA=function(){return!!e})()}function Pv(e){return(Pv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function UL(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ux(e,t)}function ux(e,t){return(ux=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function y_(e,t,n){return(t=oA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oA(e){var t=HL(e,"string");return"symbol"==Xu(t)?t:t+""}function HL(e,t){if("object"!=Xu(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Xu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function VL(e){return e.dataKey}function GL(e,t){return ye.isValidElement(e)?ye.cloneElement(e,t):"function"==typeof e?ye.createElement(e,t):ye.createElement(xL,t)}var n1,DP,r1,IP,o1,kP,i1,MP,a1,LP,s1,jP,b_=function(){function e(){return jL(this,e),qL(this,e,arguments)}return UL(e,zv),BL(e,[{key:"render",value:function(){var e=this,t=this.props,n=t.active,r=t.allowEscapeViewBox,o=t.animationDuration,i=t.animationEasing,a=t.content,l=t.coordinate,u=t.filterNull,s=t.isAnimationActive,c=t.offset,d=t.payload,f=t.payloadUniqBy,p=t.position,h=t.reverseDirection,m=t.useTranslate3d,v=t.viewBox,g=t.wrapperStyle,y=d??[];u&&y.length&&(y=KO(d.filter((function(t){return null!=t.value&&(!0!==t.hide||e.props.includeHidden)})),f,VL));var b=y.length>0;return ye.createElement(ML,{allowEscapeViewBox:r,animationDuration:o,animationEasing:i,isAnimationActive:s,active:n,coordinate:l,hasPayload:b,offset:c,position:p,reverseDirection:h,useTranslate3d:m,viewBox:v,wrapperStyle:g},GL(a,NP(NP({},this.props),{},{payload:y})))}}])}();function KL(){if(DP)return n1;DP=1;var e=Er();return n1=function(){return e.Date.now()}}function YL(){if(IP)return r1;IP=1;var e=/\s/;return r1=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}}function XL(){if(kP)return o1;kP=1;var e=YL(),t=/^\s+/;return o1=function(n){return n&&n.slice(0,e(n)+1).replace(t,"")}}function iA(){if(MP)return i1;MP=1;var e=XL(),t=No(),n=sc(),r=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,i=/^0o[0-7]+$/i,a=parseInt;return i1=function(l){if("number"==typeof l)return l;if(n(l))return NaN;if(t(l)){var u="function"==typeof l.valueOf?l.valueOf():l;l=t(u)?u+"":u}if("string"!=typeof l)return 0===l?l:+l;l=e(l);var s=o.test(l);return s||i.test(l)?a(l.slice(2),s?2:8):r.test(l)?NaN:+l}}function aA(){if(LP)return a1;LP=1;var e=No(),t=KL(),n=iA(),r=Math.max,o=Math.min;return a1=function(i,a,l){var u,s,c,d,f,p,h=0,m=!1,v=!1,g=!0;if("function"!=typeof i)throw new TypeError("Expected a function");function y(e){var t=u,n=s;return u=s=void 0,h=e,d=i.apply(n,t)}function b(e){var t=e-p;return void 0===p||t>=a||t<0||v&&e-h>=c}function w(){var e=t();if(b(e))return x(e);f=setTimeout(w,function(e){var t=a-(e-p);return v?o(t,c-(e-h)):t}(e))}function x(e){return f=void 0,g&&u?y(e):(u=s=void 0,d)}function _(){var e=t(),n=b(e);if(u=arguments,s=this,p=e,n){if(void 0===f)return function(e){return h=e,f=setTimeout(w,a),m?y(e):d}(p);if(v)return clearTimeout(f),f=setTimeout(w,a),y(p)}return void 0===f&&(f=setTimeout(w,a)),d}return a=n(a)||0,e(l)&&(m=!!l.leading,c=(v="maxWait"in l)?r(n(l.maxWait)||0,a):c,g="trailing"in l?!!l.trailing:g),_.cancel=function(){void 0!==f&&clearTimeout(f),h=0,u=p=s=f=void 0},_.flush=function(){return void 0===f?d:x(t())},_},a1}function QL(){if(jP)return s1;jP=1;var e=aA(),t=No();return s1=function(n,r,o){var i=!0,a=!0;if("function"!=typeof n)throw new TypeError("Expected a function");return t(o)&&(i="leading"in o?!!o.leading:i,a="trailing"in o?!!o.trailing:a),e(n,r,{leading:i,maxWait:r,trailing:a})}}y_(b_,"displayName","Tooltip"),y_(b_,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!gv.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var ZL=QL();const JL=Oo(ZL);function Td(e){return(Td="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function FP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ov(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?FP(Object(n),!0).forEach((function(t){ej(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ej(e,t,n){return(t=tj(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tj(e){var t=nj(e,"string");return"symbol"==Td(t)?t:t+""}function nj(e,t){if("object"!=Td(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Td(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function rj(e,t){return sj(e)||aj(e,t)||ij(e,t)||oj()}function oj(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ij(e,t){if(e){if("string"==typeof e)return BP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return BP(e,t)}}function BP(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function aj(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0!==t)for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}function sj(e){if(Array.isArray(e))return e}var l1,qP,u1,zP,c1,WP,f1,UP,d1,HP,p1,VP,h1,GP,v1,KP,m1,YP,g1,XP,y1,QP,b1,ZP,w1,JP,lj=_e((function(e,t){var n=e.aspect,r=e.initialDimension,o=void 0===r?{width:-1,height:-1}:r,i=e.width,a=void 0===i?"100%":i,l=e.height,u=void 0===l?"100%":l,s=e.minWidth,c=void 0===s?0:s,d=e.minHeight,f=e.maxHeight,p=e.children,h=e.debounce,m=void 0===h?0:h,v=e.id,g=e.className,y=e.onResize,b=e.style,w=void 0===b?{}:b,x=ke(null),_=ke();_.current=y,Zk(t,(function(){return Object.defineProperty(x.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),x.current},configurable:!0})}));var k=rj(tt({containerWidth:o.width,containerHeight:o.height}),2),P=k[0],S=k[1],C=lt((function(e,t){S((function(n){var r=Math.round(e),o=Math.round(t);return n.containerWidth===r&&n.containerHeight===o?n:{containerWidth:r,containerHeight:o}}))}),[]);We((function(){var e=function(e){var t,n=e[0].contentRect,r=n.width,o=n.height;C(r,o),null===(t=_.current)||void 0===t||t.call(_,r,o)};m>0&&(e=JL(e,m,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),n=x.current.getBoundingClientRect(),r=n.width,o=n.height;return C(r,o),t.observe(x.current),function(){t.disconnect()}}),[C,m]);var E=Ur((function(){var e=P.containerWidth,t=P.containerHeight;if(e<0||t<0)return null;mv(tv(a)||tv(u),"The width(%s) and height(%s) are both fixed numbers,\n maybe you don't need to use a ResponsiveContainer.",a,u),mv(!n||n>0,"The aspect(%s) must be greater than zero.",n);var r=tv(a)?e:a,o=tv(u)?t:u;n&&n>0&&(r?o=r/n:o&&(r=o*n),f&&o>f&&(o=f)),mv(r>0||o>0,"The width(%s) and height(%s) of chart should be greater than 0,\n please check the style of container, or the props width(%s) and height(%s),\n or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the\n height and width.",r,o,a,u,c,d,n);var i=!Array.isArray(p)&&n9(p.type).endsWith("Chart");return ye.Children.map(p,(function(e){return ye.isValidElement(e)?ml(e,ov({width:r,height:o},i?{style:ov({height:"100%",width:"100%",maxHeight:o,maxWidth:r},e.props.style)}:{})):e}))}),[n,p,u,f,d,c,P,a]);return ye.createElement("div",{id:v?"".concat(v):void 0,className:Za("recharts-responsive-container",g),style:ov(ov({},w),{},{width:a,height:u,minWidth:c,minHeight:d,maxHeight:f}),ref:x},E)}));function w_(){if(qP)return l1;qP=1;var e=jO()(Object.getPrototypeOf,Object);return l1=e}function uj(){if(zP)return u1;zP=1;var e=ta(),t=w_(),n=fo(),r=Function.prototype,o=Object.prototype,i=r.toString,a=o.hasOwnProperty,l=i.call(Object);return u1=function(r){if(!n(r)||"[object Object]"!=e(r))return!1;var o=t(r);if(null===o)return!0;var u=a.call(o,"constructor")&&o.constructor;return"function"==typeof u&&u instanceof u&&i.call(u)==l}}function cj(){if(WP)return c1;WP=1;var e=iA(),t=1/0;return c1=function(n){return n?(n=e(n))===t||n===-t?17976931348623157e292*(n<0?-1:1):n==n?n:0:0===n?n:0}}function sA(){if(UP)return f1;UP=1;var e=JO();return f1=function(t,n,r){"__proto__"==n&&e?e(t,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[n]=r}}function lA(){if(HP)return d1;HP=1;var e=cj();return d1=function(t){var n=e(t),r=n%1;return n==n?r?n-r:n:0}}function x_(){if(VP)return p1;return VP=1,p1=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}}function uA(){if(GP)return h1;GP=1;var e=sA(),t=em(),n=Object.prototype.hasOwnProperty;return h1=function(r,o,i){var a=r[o];(!n.call(r,o)||!t(a,i)||void 0===i&&!(o in r))&&e(r,o,i)}}function lm(){if(KP)return v1;KP=1;var e=uA(),t=sA();return v1=function(n,r,o,i){var a=!o;o||(o={});for(var l=-1,u=r.length;++l<u;){var s=r[l],c=i?i(o[s],n[s],s,o,n):void 0;void 0===c&&(c=n[s]),a?t(o,s,c):e(o,s,c)}return o}}function cA(){if(YP)return m1;YP=1;var e=lm(),t=Wd();return m1=function(n,r){return n&&e(r,t(r),n)}}function fj(){if(XP)return g1;return XP=1,g1=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}}function dj(){if(QP)return y1;QP=1;var e=No(),t=p_(),n=fj(),r=Object.prototype.hasOwnProperty;return y1=function(o){if(!e(o))return n(o);var i=t(o),a=[];for(var l in o)"constructor"==l&&(i||!r.call(o,l))||a.push(l);return a}}function __(){if(ZP)return b1;ZP=1;var e=LO(),t=dj(),n=zd();return b1=function(r){return n(r)?e(r,!0):t(r)}}function pj(){if(JP)return w1;JP=1;var e=lm(),t=__();return w1=function(n,r){return n&&e(r,t(r),n)}}var e2,x1,t2,_1,n2,$1,r2,S1,o2,C1,i2,E1,a2,P1,s2,R1,l2,T1,u2,O1,c2,A1,f2,N1,d2,D1,p2,I1,h2,k1,v2,M1,m2,L1,g2,j1,y2,F1,b2,B1,w2,q1,x2,gd={exports:{}};function hj(){return e2||(e2=1,e=gd,t=gd.exports,n=Er(),r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,i=o&&o.exports===r?n.Buffer:void 0,a=i?i.allocUnsafe:void 0,e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=a?a(n):new e.constructor(n);return e.copy(r),r}),gd.exports;var e,t,n,r,o,i,a}function um(){if(t2)return x1;return t2=1,x1=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}}function vj(){if(n2)return _1;n2=1;var e=lm(),t=l_();return _1=function(n,r){return e(n,t(n),r)}}function fA(){if(r2)return $1;r2=1;var e=s_(),t=w_(),n=l_(),r=kO(),o=Object.getOwnPropertySymbols;return $1=o?function(r){for(var o=[];r;)e(o,n(r)),r=t(r);return o}:r}function mj(){if(o2)return S1;o2=1;var e=lm(),t=fA();return S1=function(n,r){return e(n,t(n),r)}}function gj(){if(i2)return C1;i2=1;var e=IO(),t=fA(),n=__();return C1=function(r){return e(r,n,t)}}function yj(){if(a2)return E1;a2=1;var e=Object.prototype.hasOwnProperty;return E1=function(t){var n=t.length,r=new t.constructor(n);return n&&"string"==typeof t[0]&&e.call(t,"index")&&(r.index=t.index,r.input=t.input),r}}function $_(){if(s2)return P1;s2=1;var e=DO();return P1=function(t){var n=new t.constructor(t.byteLength);return new e(n).set(new e(t)),n}}function bj(){if(l2)return R1;l2=1;var e=$_();return R1=function(t,n){var r=n?e(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}}function wj(){if(u2)return T1;u2=1;var e=/\w*$/;return T1=function(t){var n=new t.constructor(t.source,e.exec(t));return n.lastIndex=t.lastIndex,n}}function xj(){if(c2)return O1;c2=1;var e=ac(),t=e?e.prototype:void 0,n=t?t.valueOf:void 0;return O1=function(e){return n?Object(n.call(e)):{}}}function _j(){if(f2)return A1;f2=1;var e=$_();return A1=function(t,n){var r=n?e(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}}function $j(){if(d2)return N1;d2=1;var e=$_(),t=bj(),n=wj(),r=xj(),o=_j();return N1=function(i,a,l){var u=i.constructor;switch(a){case"[object ArrayBuffer]":return e(i);case"[object Boolean]":case"[object Date]":return new u(+i);case"[object DataView]":return t(i,l);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return o(i,l);case"[object Map]":case"[object Set]":return new u;case"[object Number]":case"[object String]":return new u(i);case"[object RegExp]":return n(i);case"[object Symbol]":return r(i)}}}function cm(){if(p2)return D1;p2=1;var e=No(),t=Object.create;return D1=function(){function n(){}return function(r){if(!e(r))return{};if(t)return t(r);n.prototype=r;var o=new n;return n.prototype=void 0,o}}()}function Sj(){if(h2)return I1;h2=1;var e=cm(),t=w_(),n=p_();return I1=function(r){return"function"!=typeof r.constructor||n(r)?{}:e(t(r))}}function Cj(){if(v2)return k1;v2=1;var e=Ud(),t=fo();return k1=function(n){return t(n)&&"[object Map]"==e(n)}}function Ej(){if(m2)return M1;m2=1;var e=Cj(),t=am(),n=d_(),r=n&&n.isMap,o=r?t(r):e;return M1=o}function Pj(){if(g2)return L1;g2=1;var e=Ud(),t=fo();return L1=function(n){return t(n)&&"[object Set]"==e(n)}}function Rj(){if(y2)return j1;y2=1;var e=Pj(),t=am(),n=d_(),r=n&&n.isSet,o=r?t(r):e;return j1=o}function dA(){if(b2)return F1;b2=1;var e=i_(),t=x_(),n=uA(),r=cA(),o=pj(),i=hj(),a=um(),l=vj(),u=mj(),s=BO(),c=gj(),d=Ud(),f=yj(),p=$j(),h=Sj(),m=Cr(),v=c_(),g=Ej(),y=No(),b=Rj(),w=Wd(),x=__(),_="[object Arguments]",k="[object Function]",P="[object Object]",S={};return S[_]=S["[object Array]"]=S["[object ArrayBuffer]"]=S["[object DataView]"]=S["[object Boolean]"]=S["[object Date]"]=S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Map]"]=S["[object Number]"]=S[P]=S["[object RegExp]"]=S["[object Set]"]=S["[object String]"]=S["[object Symbol]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S["[object Error]"]=S[k]=S["[object WeakMap]"]=!1,F1=function C(E,N,O,T,R,j){var D,z=1&N,A=2&N,M=4&N;if(O&&(D=R?O(E,T,R,j):O(E)),void 0!==D)return D;if(!y(E))return E;var L=m(E);if(L){if(D=f(E),!z)return a(E,D)}else{var I=d(E),F=I==k||"[object GeneratorFunction]"==I;if(v(E))return i(E,z);if(I==P||I==_||F&&!R){if(D=A||F?{}:h(E),!z)return A?u(E,o(D,E)):l(E,r(D,E))}else{if(!S[I])return R?E:{};D=p(E,I,z)}}j||(j=new e);var W=j.get(E);if(W)return W;j.set(E,D),b(E)?E.forEach((function(e){D.add(C(e,N,O,e,E,j))})):g(E)&&E.forEach((function(e,t){D.set(t,C(e,N,O,t,E,j))}));var B=L?void 0:(M?A?c:s:A?x:w)(E);return t(B||E,(function(e,t){B&&(e=E[t=e]),n(D,t,C(e,N,O,t,E,j))})),D},F1}function Tj(){if(w2)return B1;w2=1;var e=QO();return B1=function(t){return(null==t?0:t.length)?e(t,1):[]}}function Oj(){if(x2)return q1;x2=1;var e=Tj(),t=ZO(),n=g_();return q1=function(r){return n(t(r,void 0,e),r+"")}}gd.exports;const Aj={light:"",dark:".dark"},pA=P.createContext(null);function hA(){const e=P.useContext(pA);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}const Nj=P.forwardRef((({id:e,className:t,children:n,config:r,...o},i)=>{const a=P.useId(),l=`chart-${e||a.replace(/:/g,"")}`;return k.jsx(pA.Provider,{value:{config:r},children:k.jsxs("div",{"data-chart":l,ref:i,className:se("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",t),...o,children:[k.jsx(Dj,{id:l,config:r}),k.jsx(lj,{children:n})]})})}));Nj.displayName="Chart";const Dj=({id:e,config:t})=>{const n=Object.entries(t).filter((([,e])=>e.theme||e.color));return n.length?k.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(Aj).map((([t,r])=>`\n${r} [data-chart=${e}] {\n${n.map((([e,n])=>{var r;const o=(null==(r=n.theme)?void 0:r[t])||n.color;return o?` --color-${e}: ${o};`:null})).join("\n")}\n}\n`)).join("\n")}}):null},eX=b_,Ij=P.forwardRef((({active:e,payload:t,className:n,indicator:r="dot",hideLabel:o=!1,hideIndicator:i=!1,label:a,labelFormatter:l,labelClassName:u,formatter:s,color:c,nameKey:d,labelKey:f,hoveredItem:p,onItemHover:h},m)=>{const{config:v}=hA(),g=P.useMemo((()=>{var e;if(o||null==t||!t.length)return null;const[n]=t,r=`${f||(null==n?void 0:n.dataKey)||(null==n?void 0:n.name)||"value"}`,i=cx(v,n,r),s=f||"string"!=typeof a?null==i?void 0:i.label:(null==(e=v[a])?void 0:e.label)||a;return l?k.jsx("div",{className:se("font-medium",u),children:l(s,t)}):s?k.jsx("div",{className:se("font-medium",u),children:s}):null}),[a,l,t,o,u,v,f]);if(!e||null==t||!t.length)return null;const y=1===t.length&&"dot"!==r,b=t.length>10;return k.jsxs("div",{ref:m,className:se("grid min-w-[8rem] items-start gap-xxs rounded-sm border border-border/50 bg-background px-xs py-xxs text-xs shadow-xl",b&&"min-w-[16rem]",n),children:[y?null:g,k.jsx("div",{className:se("grid gap-xxs",b&&"grid-cols-2 gap-x-s"),children:t.map(((e,t)=>{var n;const o=`${d||e.name||e.dataKey||"value"}`,a=cx(v,e,o),l=c||(null==(n=e.payload)?void 0:n.fill)||e.color||"",u=o===p;return k.jsx("div",{className:se("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground","dot"===r&&"items-center",u?"":p?"opacity-40":""),onMouseEnter:()=>null==h?void 0:h(o),onMouseLeave:()=>null==h?void 0:h(null),children:s&&void 0!==(null==e?void 0:e.value)&&void 0!==(null==e?void 0:e.payload)&&e.name?s(e.value,e.name,e,t,[e.payload]):k.jsxs(k.Fragment,{children:[null!=a&&a.icon?k.jsx(a.icon,{}):!i&&k.jsx("div",{className:se("shrink-0 rounded-full border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":"dot"===r,"w-1":"line"===r,"w-0 border border-dashed bg-transparent":"dashed"===r,"my-0.5":y&&"dashed"===r}),style:{"--color-bg":l,"--color-border":l}}),k.jsxs("div",{className:se("flex flex-1 justify-between leading-none",y?"items-end":"items-center"),children:[k.jsxs("div",{className:"grid gap-xxs",children:[y?g:null,k.jsx("span",{className:se("text-muted-foreground",u&&"font-medium text-foreground"),children:(null==a?void 0:a.label)||e.name})]}),e.value&&k.jsx("span",{className:se("font-mono font-medium tabular-nums text-foreground",u&&"font-bold"),children:e.value.toLocaleString()})]})]})},e.dataKey)}))})]})}));Ij.displayName="ChartTooltip";const tX=v_,kj=P.forwardRef((({className:e,hideIcon:t=!1,payload:n,nameKey:r,onItemHover:o,hoveredItem:i},a)=>{const{config:l}=hA(),u=P.useRef({});return P.useEffect((()=>{if(i&&u.current[i]){const e=u.current[i];e&&e.scrollIntoView({behavior:"smooth",block:"nearest"})}}),[i]),null!=n&&n.length?k.jsx("div",{ref:a,className:se("flex h-[150px] w-full flex-wrap items-center justify-center gap-l overflow-y-auto pb-xl",e),children:n.map((e=>{var n;const a=`${r||e.dataKey||"value"}`,s=cx(l,e,a),c=!!o&&a===i;return k.jsxs("div",{ref:e=>{e?u.current[a]=e:delete u.current[a]},className:se("group flex cursor-pointer select-none items-center gap-xs text-base transition-all duration-150",c?"scale-105 text-black":i?"text-gray-700 opacity-40":"text-gray-700"),onMouseEnter:()=>null==o?void 0:o(e.dataKey),onMouseLeave:()=>null==o?void 0:o(null),children:[null!=s&&s.icon&&!t?k.jsx(s.icon,{}):k.jsx("div",{className:"h-2 w-2 shrink-0 rounded-full",style:{backgroundColor:e.color||""}}),k.jsx("span",{className:"min-w-[max-content]",children:(null==s?void 0:s.label)||e.name})]},(null==(n=e.value)?void 0:n.toString())||a)}))}):null}));function cx(e,t,n){if("object"!=typeof t||null===t)return;const r="payload"in t&&"object"==typeof t.payload&&null!==t.payload?t.payload:void 0;let o=n;return n in t&&"string"==typeof t[n]?o=t[n]:r&&n in r&&"string"==typeof r[n]&&(o=r[n]),o in e?e[o]:e[n]}kj.displayName="ChartLegend";const Mj=({children:e,className:t})=>k.jsx("div",{className:se("flex flex-wrap gap-1",t),children:e}),_2=({text:e,icon:t,disabled:n,avatarSrc:r,onClick:o,onRemove:i})=>k.jsxs("div",{onClick:n?void 0:o,className:se("flex cursor-pointer items-center gap-xxxs rounded-sm bg-slate-100 p-xxs text-sm font-medium text-slate-900 transition-all hover:bg-slate-200 [&_svg]:size-4",n&&"cursor-not-allowed bg-slate-100 text-slate-300"),children:[r&&k.jsxs(tO,{className:se("size-6 text-[10px]"),children:[k.jsx(nO,{src:r,alt:e}),k.jsx(rO,{className:"text-xs",children:e.charAt(0).toUpperCase()})]}),t,k.jsx("span",{children:e}),i&&k.jsx("button",{onClick:e=>{e.stopPropagation(),null==i||i()},disabled:n,className:"pointer-events-auto cursor-pointer ",children:k.jsx(Dx,{size:16})})]});function fm(e){const t=ke({value:e,previous:e});return Ur((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}function dm(e){const[t,n]=tt(void 0);return fr((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t)||!t.length)return;const r=t[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;n({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}const vA="Checkbox",[Lj,nX]=Sr(vA),[jj,Fj]=Lj(vA),Bj=_e(((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:a,disabled:l,value:u="on",onCheckedChange:s,...c}=e,[d,f]=tt(null),p=Rt(t,(e=>f(e))),h=ke(!1),m=!d||!!d.closest("form"),[v=!1,g]=Vo({prop:o,defaultProp:i,onChange:s}),y=ke(v);return We((()=>{const e=null==d?void 0:d.form;if(e){const t=()=>g(y.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[d,g]),z(jj,{scope:n,state:v,disabled:l},z(it.button,fe({type:"button",role:"checkbox","aria-checked":sl(v)?"mixed":v,"aria-required":a,"data-state":mA(v),"data-disabled":l?"":void 0,disabled:l,value:u},c,{ref:p,onKeyDown:ze(e.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:ze(e.onClick,(e=>{g((e=>!!sl(e)||!e)),m&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())}))})),m&&z(Wj,{control:d,bubbles:!h.current,name:r,value:u,checked:v,required:a,disabled:l,style:{transform:"translateX(-100%)"}}))})),qj="CheckboxIndicator",zj=_e(((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=Fj(qj,n);return z(Ao,{present:r||sl(i.state)||!0===i.state},z(it.span,fe({"data-state":mA(i.state),"data-disabled":i.disabled?"":void 0},o,{ref:t,style:{pointerEvents:"none",...e.style}})))})),Wj=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=ke(null),a=fm(n),l=dm(t);return We((()=>{const e=i.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(a!==n&&o){const t=new Event("click",{bubbles:r});e.indeterminate=sl(n),o.call(e,!sl(n)&&n),e.dispatchEvent(t)}}),[a,n,r]),z("input",fe({type:"checkbox","aria-hidden":!0,defaultChecked:!sl(n)&&n},o,{tabIndex:-1,ref:i,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function sl(e){return"indeterminate"===e}function mA(e){return sl(e)?"indeterminate":e?"checked":"unchecked"}const gA=Bj,Uj=zj,Hj=Ji("transition-[border-width,background-color] duration-300 relative overflow-hidden ",{variants:{size:{default:"size-xs"},variant:{default:"peer shrink-0 rounded-sm border border-blue_100 data-[state=unchecked]:border-slate-300 data-[state=checked]:text-primary-foreground disabled:cursor-not-allowed disabled:!border-0 disabled:!bg-slate-100 md:hover:!border-[2px] md:hover:data-[state=checked]:bg-blue_120"}},defaultVariants:{size:"default",variant:"default"}}),S_=P.forwardRef((({className:e,size:t,variant:n,iconType:r,...o},i)=>{const[a]=P.useState(o.checked),[l,u]=P.useState(!1);P.useEffect((()=>{a!==o.checked&&u(!0)}),[o.checked]);const s=e=>"minus"===r?k.jsx(EM,{...e}):k.jsx(Nx,{...e});return k.jsxs(gA,{ref:i,className:se(e,Hj({size:t,variant:n})),...o,children:[k.jsx("div",{className:se("transform-origin-center absolute left-0 top-0 size-full",{"bg-blue_100":(l||a)&&!o.disabled,"animate-fill-in":o.checked&&l,"animate-fill-out":!o.checked&&l})}),k.jsx(Uj,{className:"relative flex items-center justify-center text-current",children:k.jsx(s,{className:"size-xxxs",color:o.disabled?"var(--slate-300)":"white"})})]})}));S_.displayName=gA.displayName;var $2=1,Vj=.9,Gj=.8,Kj=.17,z1=.1,W1=.999,Yj=.9999,Xj=.99,Qj=/[\\\/_+.#"@\[\(\{&]/,Zj=/[\\\/_+.#"@\[\(\{&]/g,Jj=/[\s-]/,yA=/[\s-]/g;function fx(e,t,n,r,o,i,a){if(i===t.length)return o===e.length?$2:Xj;var l=`${o},${i}`;if(void 0!==a[l])return a[l];for(var u,s,c,d,f=r.charAt(i),p=n.indexOf(f,o),h=0;p>=0;)(u=fx(e,t,n,r,p+1,i+1,a))>h&&(p===o?u*=$2:Qj.test(e.charAt(p-1))?(u*=Gj,(c=e.slice(o,p-1).match(Zj))&&o>0&&(u*=Math.pow(W1,c.length))):Jj.test(e.charAt(p-1))?(u*=Vj,(d=e.slice(o,p-1).match(yA))&&o>0&&(u*=Math.pow(W1,d.length))):(u*=Kj,o>0&&(u*=Math.pow(W1,p-o))),e.charAt(p)!==t.charAt(i)&&(u*=Yj)),(u<z1&&n.charAt(p-1)===r.charAt(i+1)||r.charAt(i+1)===r.charAt(i)&&n.charAt(p-1)!==r.charAt(i))&&((s=fx(e,t,n,r,p+1,i+2,a))*z1>u&&(u=s*z1)),u>h&&(h=u),p=n.indexOf(f,p+1);return a[l]=h,h}function S2(e){return e.toLowerCase().replace(yA," ")}function eF(e,t,n){return fx(e=n&&n.length>0?""+(e+" "+n.join(" ")):e,t,S2(e),S2(t),0,0,{})}var fd='[cmdk-group=""]',U1='[cmdk-group-items=""]',tF='[cmdk-group-heading=""]',C_='[cmdk-item=""]',C2=`${C_}:not([aria-disabled="true"])`,dx="cmdk-item-select",ol="data-value",nF=(e,t,n)=>eF(e,t,n),bA=P.createContext(void 0),Vd=()=>P.useContext(bA),wA=P.createContext(void 0),E_=()=>P.useContext(wA),xA=P.createContext(void 0),_A=P.forwardRef(((e,t)=>{let n=Wu((()=>{var t,n;return{search:"",value:null!=(n=null!=(t=e.value)?t:e.defaultValue)?n:"",filtered:{count:0,items:new Map,groups:new Set}}})),r=Wu((()=>new Set)),o=Wu((()=>new Map)),i=Wu((()=>new Map)),a=Wu((()=>new Set)),l=$A(e),{label:u,children:s,value:c,onValueChange:d,filter:f,shouldFilter:p,loop:h,disablePointerSelection:m=!1,vimBindings:v=!0,...g}=e,y=P.useId(),b=P.useId(),w=P.useId(),x=P.useRef(null),_=pF();cl((()=>{if(void 0!==c){let e=c.trim();n.current.value=e,k.emit()}}),[c]),cl((()=>{_(6,T)}),[]);let k=P.useMemo((()=>({subscribe:e=>(a.current.add(e),()=>a.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var o,i,a;if(!Object.is(n.current[e],t)){if(n.current[e]=t,"search"===e)O(),E(),_(1,N);else if("value"===e&&(r||_(5,T),void 0!==(null==(o=l.current)?void 0:o.value))){let e=t??"";return void(null==(a=(i=l.current).onValueChange)||a.call(i,e))}k.emit()}},emit:()=>{a.current.forEach((e=>e()))}})),[]),S=P.useMemo((()=>({value:(e,t,r)=>{var o;t!==(null==(o=i.current.get(e))?void 0:o.value)&&(i.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,C(t,r)),_(2,(()=>{E(),k.emit()})))},item:(e,t)=>(r.current.add(e),t&&(o.current.has(t)?o.current.get(t).add(e):o.current.set(t,new Set([e]))),_(3,(()=>{O(),E(),n.current.value||N(),k.emit()})),()=>{i.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=R();_(4,(()=>{O(),(null==t?void 0:t.getAttribute("id"))===e&&N(),k.emit()}))}),group:e=>(o.current.has(e)||o.current.set(e,new Set),()=>{i.current.delete(e),o.current.delete(e)}),filter:()=>l.current.shouldFilter,label:u||e["aria-label"],disablePointerSelection:m,listId:y,inputId:w,labelId:b,listInnerRef:x})),[]);function C(e,t){var r,o;let i=null!=(o=null==(r=l.current)?void 0:r.filter)?o:nF;return e?i(e,n.current.search,t):0}function E(){if(!n.current.search||!1===l.current.shouldFilter)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach((n=>{let r=o.current.get(n),i=0;r.forEach((t=>{let n=e.get(t);i=Math.max(n,i)})),t.push([n,i])}));let r=x.current;j().sort(((t,n)=>{var r,o;let i=t.getAttribute("id"),a=n.getAttribute("id");return(null!=(r=e.get(a))?r:0)-(null!=(o=e.get(i))?o:0)})).forEach((e=>{let t=e.closest(U1);t?t.appendChild(e.parentElement===t?e:e.closest(`${U1} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${U1} > *`))})),t.sort(((e,t)=>t[1]-e[1])).forEach((e=>{let t=x.current.querySelector(`${fd}[${ol}="${encodeURIComponent(e[0])}"]`);null==t||t.parentElement.appendChild(t)}))}function N(){let e=j().find((e=>"true"!==e.getAttribute("aria-disabled"))),t=null==e?void 0:e.getAttribute(ol);k.setState("value",t||void 0)}function O(){var e,t,a,u;if(!n.current.search||!1===l.current.shouldFilter)return void(n.current.filtered.count=r.current.size);n.current.filtered.groups=new Set;let s=0;for(let o of r.current){let r=C(null!=(t=null==(e=i.current.get(o))?void 0:e.value)?t:"",null!=(u=null==(a=i.current.get(o))?void 0:a.keywords)?u:[]);n.current.filtered.items.set(o,r),r>0&&s++}for(let[e,t]of o.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=s}function T(){var e,t,n;let r=R();r&&((null==(e=r.parentElement)?void 0:e.firstChild)===r&&(null==(n=null==(t=r.closest(fd))?void 0:t.querySelector(tF))||n.scrollIntoView({block:"nearest"})),r.scrollIntoView({block:"nearest"}))}function R(){var e;return null==(e=x.current)?void 0:e.querySelector(`${C_}[aria-selected="true"]`)}function j(){var e;return Array.from(null==(e=x.current)?void 0:e.querySelectorAll(C2))}function D(e){let t=j()[e];t&&k.setState("value",t.getAttribute(ol))}function z(e){var t;let n=R(),r=j(),o=r.findIndex((e=>e===n)),i=r[o+e];null!=(t=l.current)&&t.loop&&(i=o+e<0?r[r.length-1]:o+e===r.length?r[0]:r[o+e]),i&&k.setState("value",i.getAttribute(ol))}function A(e){let t,n=R(),r=null==n?void 0:n.closest(fd);for(;r&&!t;)r=e>0?fF(r,fd):dF(r,fd),t=null==r?void 0:r.querySelector(C2);t?k.setState("value",t.getAttribute(ol)):z(e)}let M=()=>D(j().length-1),L=e=>{e.preventDefault(),e.metaKey?M():e.altKey?A(1):z(1)},I=e=>{e.preventDefault(),e.metaKey?D(0):e.altKey?A(-1):z(-1)};return P.createElement(it.div,{ref:t,tabIndex:-1,...g,"cmdk-root":"",onKeyDown:e=>{var t;if(null==(t=g.onKeyDown)||t.call(g,e),!e.defaultPrevented)switch(e.key){case"n":case"j":v&&e.ctrlKey&&L(e);break;case"ArrowDown":L(e);break;case"p":case"k":v&&e.ctrlKey&&I(e);break;case"ArrowUp":I(e);break;case"Home":e.preventDefault(),D(0);break;case"End":e.preventDefault(),M();break;case"Enter":if(!e.nativeEvent.isComposing&&229!==e.keyCode){e.preventDefault();let t=R();if(t){let e=new Event(dx);t.dispatchEvent(e)}}}}},P.createElement("label",{"cmdk-label":"",htmlFor:S.inputId,id:S.labelId,style:vF},u),pm(e,(e=>P.createElement(wA.Provider,{value:k},P.createElement(bA.Provider,{value:S},e)))))})),rF=P.forwardRef(((e,t)=>{var n,r;let o=P.useId(),i=P.useRef(null),a=P.useContext(xA),l=Vd(),u=$A(e),s=null!=(r=null==(n=u.current)?void 0:n.forceMount)?r:null==a?void 0:a.forceMount;cl((()=>{if(!s)return l.item(o,null==a?void 0:a.id)}),[s]);let c=SA(o,i,[e.value,e.children,i],e.keywords),d=E_(),f=fl((e=>e.value&&e.value===c.current)),p=fl((e=>!(!s&&!1!==l.filter())||(!e.search||e.filtered.items.get(o)>0)));function h(){var e,t;m(),null==(t=(e=u.current).onSelect)||t.call(e,c.current)}function m(){d.setState("value",c.current,!0)}if(P.useEffect((()=>{let t=i.current;if(t&&!e.disabled)return t.addEventListener(dx,h),()=>t.removeEventListener(dx,h)}),[p,e.onSelect,e.disabled]),!p)return null;let{disabled:v,value:g,onSelect:y,forceMount:b,keywords:w,...x}=e;return P.createElement(it.div,{ref:Od([i,t]),...x,id:o,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!f,"data-disabled":!!v,"data-selected":!!f,onPointerMove:v||l.disablePointerSelection?void 0:m,onClick:v?void 0:h},e.children)})),oF=P.forwardRef(((e,t)=>{let{heading:n,children:r,forceMount:o,...i}=e,a=P.useId(),l=P.useRef(null),u=P.useRef(null),s=P.useId(),c=Vd(),d=fl((e=>!(!o&&!1!==c.filter())||(!e.search||e.filtered.groups.has(a))));cl((()=>c.group(a)),[]),SA(a,l,[e.value,e.heading,u]);let f=P.useMemo((()=>({id:a,forceMount:o})),[o]);return P.createElement(it.div,{ref:Od([l,t]),...i,"cmdk-group":"",role:"presentation",hidden:!d||void 0},n&&P.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:s},n),pm(e,(e=>P.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?s:void 0},P.createElement(xA.Provider,{value:f},e)))))})),iF=P.forwardRef(((e,t)=>{let{alwaysRender:n,...r}=e,o=P.useRef(null),i=fl((e=>!e.search));return n||i?P.createElement(it.div,{ref:Od([o,t]),...r,"cmdk-separator":"",role:"separator"}):null})),aF=P.forwardRef(((e,t)=>{let{onValueChange:n,...r}=e,o=null!=e.value,i=E_(),a=fl((e=>e.search)),l=fl((e=>e.value)),u=Vd(),s=P.useMemo((()=>{var e;let t=null==(e=u.listInnerRef.current)?void 0:e.querySelector(`${C_}[${ol}="${encodeURIComponent(l)}"]`);return null==t?void 0:t.getAttribute("id")}),[]);return P.useEffect((()=>{null!=e.value&&i.setState("search",e.value)}),[e.value]),P.createElement(it.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":u.listId,"aria-labelledby":u.labelId,"aria-activedescendant":s,id:u.inputId,type:"text",value:o?e.value:a,onChange:e=>{o||i.setState("search",e.target.value),null==n||n(e.target.value)}})})),sF=P.forwardRef(((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,i=P.useRef(null),a=P.useRef(null),l=Vd();return P.useEffect((()=>{if(a.current&&i.current){let e,t=a.current,n=i.current,r=new ResizeObserver((()=>{e=requestAnimationFrame((()=>{let e=t.offsetHeight;n.style.setProperty("--cmdk-list-height",e.toFixed(1)+"px")}))}));return r.observe(t),()=>{cancelAnimationFrame(e),r.unobserve(t)}}}),[]),P.createElement(it.div,{ref:Od([i,t]),...o,"cmdk-list":"",role:"listbox","aria-label":r,id:l.listId},pm(e,(e=>P.createElement("div",{ref:Od([a,l.listInnerRef]),"cmdk-list-sizer":""},e))))})),lF=P.forwardRef(((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:i,container:a,...l}=e;return P.createElement(Yv,{open:n,onOpenChange:r},P.createElement(Xv,{container:a},P.createElement(rc,{"cmdk-overlay":"",className:o}),P.createElement(oc,{"aria-label":e.label,"cmdk-dialog":"",className:i},P.createElement(_A,{ref:t,...l}))))})),uF=P.forwardRef(((e,t)=>fl((e=>0===e.filtered.count))?P.createElement(it.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null)),cF=P.forwardRef(((e,t)=>{let{progress:n,children:r,label:o="Loading...",...i}=e;return P.createElement(it.div,{ref:t,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},pm(e,(e=>P.createElement("div",{"aria-hidden":!0},e))))})),Vr=Object.assign(_A,{List:sF,Item:rF,Input:aF,Group:oF,Separator:iF,Dialog:lF,Empty:uF,Loading:cF});function fF(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function dF(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function $A(e){let t=P.useRef(e);return cl((()=>{t.current=e})),t}var cl=typeof window>"u"?P.useEffect:P.useLayoutEffect;function Wu(e){let t=P.useRef();return void 0===t.current&&(t.current=e()),t}function Od(e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}function fl(e){let t=E_(),n=()=>e(t.snapshot());return P.useSyncExternalStore(t.subscribe,n,n)}function SA(e,t,n,r=[]){let o=P.useRef(),i=Vd();return cl((()=>{var a;let l=(()=>{var e;for(let t of n){if("string"==typeof t)return t.trim();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim():o.current}})(),u=r.map((e=>e.trim()));i.value(e,l,u),null==(a=t.current)||a.setAttribute(ol,l),o.current=l})),o}var pF=()=>{let[e,t]=P.useState(),n=Wu((()=>new Map));return cl((()=>{n.current.forEach((e=>e())),n.current=new Map}),[e]),(e,r)=>{n.current.set(e,r),t({})}};function hF(e){let t=e.type;return"function"==typeof t?t(e.props):"render"in t?t.render(e.props):e}function pm({asChild:e,children:t},n){return e&&P.isValidElement(t)?P.cloneElement(hF(t),{ref:t.ref},n(t.props.children)):n(t)}var vF={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const mF=Yv,rX=Ux,gF=Xv,oX=ic,CA=P.forwardRef((({className:e,...t},n)=>(P.useEffect((()=>{const e=document.querySelectorAll(".blured-modal-overlay");return e.forEach((e=>e&&(e.style.filter="blur(5px)"))),()=>{e.forEach((e=>e&&(e.style.filter="none")))}}),[]),k.jsx(rc,{ref:n,"data-testid":"dialog_overlay",className:se("fixed inset-0 z-100 bg-black opacity-[0.8] data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}))));CA.displayName=rc.displayName;const yF=Ji("",{variants:{closeVariant:{none:"",insideCard:"absolute right-m top-m rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground text-slate-400",outsideCard:"fixed right-[30px] top-[30px] z-100 text-slate-400",mobileGallery:"fixed right-m top-[62px] text-white z-[110]"}},defaultVariants:{closeVariant:"outsideCard"}}),bF=Ji("",{variants:{closeSize:{small:"size-6",big:"size-[42px]","18x18":"size-[18px]"}},defaultVariants:{closeSize:"small"}}),EA=P.forwardRef((({title:e,titleIcon:t,className:n,showClose:r=!0,closeVariant:o="outsideCard",closeSize:i="big",children:a,overlayClassName:l,childrenClassName:u,onBack:s,onCloseModal:c,renderFooter:d,...f},p)=>{const h=k.jsxs(ic,{className:se(yF({closeVariant:o})),children:[k.jsx(Dx,{onClick:c,fill:"currentColor",className:se(bF({closeSize:i}))}),k.jsx("span",{className:"sr-only",children:"Close"})]});return k.jsxs(gF,{children:[k.jsx(CA,{className:l,onClick:c}),r&&"insideCard"!==o&&h,k.jsxs(oc,{ref:p,className:se("fixed left-[50%] top-[50%] z-100 grid max-w-[600px] translate-x-[-50%] translate-y-[-50%] !overflow-visible rounded-sm bg-background shadow-lg outline-none duration-200 data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] max-md:w-[calc(100vw-32px)] md:w-full [&>div]:min-w-0",n),...f,children:[e&&k.jsxs("h3",{className:"flex items-center justify-center gap-xxs border-b border-slate-200 p-m text-center text-lg font-semibold text-slate-700",children:[t,e]}),k.jsx("div",{className:se("p-m",u),children:a}),r&&"insideCard"===o&&h,s&&k.jsx("button",{"data-testid":"dialog-back-button","aria-label":"Back",onClick:s,className:"absolute left-m top-m",children:k.jsx(cT,{color:"var(--slate-400)",size:24})}),k.jsx(PA,{className:"empty:hidden",children:null==d?void 0:d()})]})]})}));EA.displayName=oc.displayName;const wF=({className:e,...t})=>k.jsx("div",{className:se("border-b border-slate-200 p-m text-center text-lg font-semibold text-slate-700",e),...t});wF.displayName="DialogHeader";const PA=({className:e,...t})=>k.jsx("div",{className:se("flex border-t border-slate-200 p-m",e),...t});PA.displayName="DialogFooter";const xF=P.forwardRef((({className:e,...t},n)=>k.jsx(jd,{ref:n,className:se("text-lg font-semibold leading-none tracking-tight",e),...t})));xF.displayName=jd.displayName;const _F=P.forwardRef((({className:e,...t},n)=>k.jsx(Fd,{ref:n,className:se("text-sm text-muted-foreground",e),...t})));_F.displayName=Fd.displayName;const RA=P.forwardRef((({className:e,...t},n)=>k.jsx(Vr,{ref:n,className:se("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t})));RA.displayName=Vr.displayName;const iX=({children:e,...t})=>k.jsx(mF,{...t,children:k.jsx(EA,{className:"overflow-hidden p-0 shadow-lg",children:k.jsx(RA,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),$F=P.forwardRef((({className:e,...t},n)=>k.jsx("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:k.jsx(Vr.Input,{ref:n,className:se("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})})));$F.displayName=Vr.Input.displayName;const SF=P.forwardRef((({className:e,...t},n)=>k.jsx(Vr.List,{ref:n,className:se("mt-2 max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t})));SF.displayName=Vr.List.displayName;const CF=P.forwardRef(((e,t)=>k.jsx(Vr.Empty,{ref:t,className:"py-6 text-center text-sm",...e})));CF.displayName=Vr.Empty.displayName;const EF=P.forwardRef((({className:e,...t},n)=>k.jsx(Vr.Group,{ref:n,className:se("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t})));EF.displayName=Vr.Group.displayName;const PF=P.forwardRef((({className:e,...t},n)=>k.jsx(Vr.Separator,{ref:n,className:se("-mx-1 h-px bg-border",e),...t})));PF.displayName=Vr.Separator.displayName;const RF=P.forwardRef((({className:e,...t},n)=>k.jsx(Vr.Item,{ref:n,className:se("relative flex max-w-[215px] cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50",e),...t})));RF.displayName=Vr.Item.displayName;const TF=({className:e,...t})=>k.jsx("span",{className:se("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});function Ya(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function E2(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function TA(...e){return t=>{let n=!1;const r=e.map((e=>{const r=E2(e,t);return!n&&"function"==typeof r&&(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():E2(e[t],null)}}}}function yl(...e){return P.useCallback(TA(...e),e)}function OF(e,t){const n=P.createContext(t),r=e=>{const{children:t,...r}=e,o=P.useMemo((()=>r),Object.values(r));return k.jsx(n.Provider,{value:o,children:t})};return r.displayName=e+"Provider",[r,function(r){const o=P.useContext(n);if(o)return o;if(void 0!==t)return t;throw new Error(`\`${r}\` must be used within \`${e}\``)}]}function AF(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>P.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return P.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=P.createContext(r),i=n.length;n=[...n,r];const a=t=>{var n;const{scope:r,children:a,...l}=t,u=(null==(n=null==r?void 0:r[e])?void 0:n[i])||o,s=P.useMemo((()=>l),Object.values(l));return k.jsx(u.Provider,{value:s,children:a})};return a.displayName=t+"Provider",[a,function(n,a){var l;const u=(null==(l=null==a?void 0:a[e])?void 0:l[i])||o,s=P.useContext(u);if(s)return s;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},NF(r,...t)]}function NF(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return P.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}TF.displayName="CommandShortcut";var Rv=null!=globalThis&&globalThis.document?P.useLayoutEffect:()=>{},DF=P[" useId ".trim().toString()]||(()=>{}),IF=0;function H1(e){const[t,n]=P.useState(DF());return Rv((()=>{e||n((e=>e??String(IF++)))}),[e]),e||(t?`radix-${t}`:"")}function dl(e){const t=P.useRef(e);return P.useEffect((()=>{t.current=e})),P.useMemo((()=>(...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[])}function kF({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=MF({defaultProp:t,onChange:n}),i=void 0!==e,a=i?e:r,l=dl(n);return[a,P.useCallback((t=>{if(i){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[i,e,o,l])]}function MF({defaultProp:e,onChange:t}){const n=P.useState(e),[r]=n,o=P.useRef(r),i=dl(t);return P.useEffect((()=>{o.current!==r&&(i(r),o.current=r)}),[r,o,i]),n}function OA(e){const t=LF(e),n=P.forwardRef(((e,n)=>{const{children:r,...o}=e,i=P.Children.toArray(r),a=i.find(FF);if(a){const e=a.props.children,r=i.map((t=>t===a?P.Children.count(e)>1?P.Children.only(null):P.isValidElement(e)?e.props.children:null:t));return k.jsx(t,{...o,ref:n,children:P.isValidElement(e)?P.cloneElement(e,void 0,r):null})}return k.jsx(t,{...o,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function LF(e){const t=P.forwardRef(((e,t)=>{const{children:n,...r}=e;if(P.isValidElement(n)){const e=qF(n),o=BF(r,n.props);return n.type!==P.Fragment&&(o.ref=t?TA(t,e):e),P.cloneElement(n,o)}return P.Children.count(n)>1?P.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}var jF=Symbol("radix.slottable");function FF(e){return P.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===jF}function BF(e,t){const n={...t};for(const r in t){const 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}}function qF(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var zF=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],na=zF.reduce(((e,t)=>{const n=OA(`Primitive.${t}`),r=P.forwardRef(((e,r)=>{const{asChild:o,...i}=e,a=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),k.jsx(a,{...i,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{});function WF(e,t){e&&_i.flushSync((()=>e.dispatchEvent(t)))}function UF(e,t=(null==globalThis?void 0:globalThis.document)){const n=dl(e);P.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[n,t])}var P2,HF="DismissableLayer",px="dismissableLayer.update",VF="dismissableLayer.pointerDownOutside",GF="dismissableLayer.focusOutside",AA=P.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),NA=P.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:l,...u}=e,s=P.useContext(AA),[c,d]=P.useState(null),f=(null==c?void 0:c.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,p]=P.useState({}),h=yl(t,(e=>d(e))),m=Array.from(s.layers),[v]=[...s.layersWithOutsidePointerEventsDisabled].slice(-1),g=m.indexOf(v),y=c?m.indexOf(c):-1,b=s.layersWithOutsidePointerEventsDisabled.size>0,w=y>=g,x=XF((e=>{const t=e.target,n=[...s.branches].some((e=>e.contains(t)));!w||n||(null==o||o(e),null==a||a(e),e.defaultPrevented||null==l||l())}),f),_=QF((e=>{const t=e.target;[...s.branches].some((e=>e.contains(t)))||(null==i||i(e),null==a||a(e),e.defaultPrevented||null==l||l())}),f);return UF((e=>{y===s.layers.size-1&&(null==r||r(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))}),f),P.useEffect((()=>{if(c)return n&&(0===s.layersWithOutsidePointerEventsDisabled.size&&(P2=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),s.layersWithOutsidePointerEventsDisabled.add(c)),s.layers.add(c),R2(),()=>{n&&1===s.layersWithOutsidePointerEventsDisabled.size&&(f.body.style.pointerEvents=P2)}}),[c,f,n,s]),P.useEffect((()=>()=>{c&&(s.layers.delete(c),s.layersWithOutsidePointerEventsDisabled.delete(c),R2())}),[c,s]),P.useEffect((()=>{const e=()=>p({});return document.addEventListener(px,e),()=>document.removeEventListener(px,e)}),[]),k.jsx(na.div,{...u,ref:h,style:{pointerEvents:b?w?"auto":"none":void 0,...e.style},onFocusCapture:Ya(e.onFocusCapture,_.onFocusCapture),onBlurCapture:Ya(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:Ya(e.onPointerDownCapture,x.onPointerDownCapture)})}));NA.displayName=HF;var KF="DismissableLayerBranch",YF=P.forwardRef(((e,t)=>{const n=P.useContext(AA),r=P.useRef(null),o=yl(t,r);return P.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),k.jsx(na.div,{...e,ref:o})}));function XF(e,t=(null==globalThis?void 0:globalThis.document)){const n=dl(e),r=P.useRef(!1),o=P.useRef((()=>{}));return P.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){DA(VF,n,i,{discrete:!0})};const i={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}function QF(e,t=(null==globalThis?void 0:globalThis.document)){const n=dl(e),r=P.useRef(!1);return P.useEffect((()=>{const e=e=>{e.target&&!r.current&&DA(GF,n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function R2(){const e=new CustomEvent(px);document.dispatchEvent(e)}function DA(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?WF(o,i):o.dispatchEvent(i)}YF.displayName=KF;var V1="focusScope.autoFocusOnMount",G1="focusScope.autoFocusOnUnmount",T2={bubbles:!1,cancelable:!0},ZF="FocusScope",IA=P.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[l,u]=P.useState(null),s=dl(o),c=dl(i),d=P.useRef(null),f=yl(t,(e=>u(e))),p=P.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;P.useEffect((()=>{if(r){let e=function(e){if(p.paused||!l)return;const t=e.target;l.contains(t)?d.current=t:Ga(d.current,{select:!0})},t=function(e){if(p.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||Ga(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&Ga(l)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[r,l,p.paused]),P.useEffect((()=>{if(l){A2.add(p);const e=document.activeElement;if(!l.contains(e)){const t=new CustomEvent(V1,T2);l.addEventListener(V1,s),l.dispatchEvent(t),t.defaultPrevented||(JF(oB(kA(l)),{select:!0}),document.activeElement===e&&Ga(l))}return()=>{l.removeEventListener(V1,s),setTimeout((()=>{const t=new CustomEvent(G1,T2);l.addEventListener(G1,c),l.dispatchEvent(t),t.defaultPrevented||Ga(e??document.body,{select:!0}),l.removeEventListener(G1,c),A2.remove(p)}),0)}}}),[l,s,c,p]);const h=P.useCallback((e=>{if(!n&&!r||p.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[r,i]=eB(t);r&&i?e.shiftKey||o!==i?e.shiftKey&&o===r&&(e.preventDefault(),n&&Ga(i,{select:!0})):(e.preventDefault(),n&&Ga(r,{select:!0})):o===t&&e.preventDefault()}}),[n,r,p.paused]);return k.jsx(na.div,{tabIndex:-1,...a,ref:f,onKeyDown:h})}));function JF(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ga(r,{select:t}),document.activeElement!==n)return}function eB(e){const t=kA(e);return[O2(t,e),O2(t.reverse(),e)]}function kA(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function O2(e,t){for(const n of e)if(!tB(n,{upTo:t}))return n}function tB(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function nB(e){return e instanceof HTMLInputElement&&"select"in e}function Ga(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&nB(e)&&t&&e.select()}}IA.displayName=ZF;var A2=rB();function rB(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=N2(e,t),e.unshift(t)},remove(t){var n;e=N2(e,t),null==(n=e[0])||n.resume()}}}function N2(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}function oB(e){return e.filter((e=>"A"!==e.tagName))}var iB="Portal",MA=P.forwardRef(((e,t)=>{var n;const{container:r,...o}=e,[i,a]=P.useState(!1);Rv((()=>a(!0)),[]);const l=r||i&&(null==(n=null==globalThis?void 0:globalThis.document)?void 0:n.body);return l?Mx.createPortal(k.jsx(na.div,{...o,ref:t}),l):null}));function aB(e,t){return P.useReducer(((e,n)=>t[e][n]??e),e)}MA.displayName=iB;var hm=e=>{const{present:t,children:n}=e,r=sB(t),o="function"==typeof n?n({present:r.isPresent}):P.Children.only(n),i=yl(r.ref,lB(o));return"function"==typeof n||r.isPresent?P.cloneElement(o,{ref:i}):null};function sB(e){const[t,n]=P.useState(),r=P.useRef({}),o=P.useRef(e),i=P.useRef("none"),a=e?"mounted":"unmounted",[l,u]=aB(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return P.useEffect((()=>{const e=iv(r.current);i.current="mounted"===l?e:"none"}),[l]),Rv((()=>{const t=r.current,n=o.current;if(n!==e){const r=i.current,a=iv(t);e?u("MOUNT"):"none"===a||"none"===(null==t?void 0:t.display)?u("UNMOUNT"):u(n&&r!==a?"ANIMATION_OUT":"UNMOUNT"),o.current=e}}),[e,u]),Rv((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,a=i=>{const a=iv(r.current).includes(i.animationName);if(i.target===t&&a&&(u("ANIMATION_END"),!o.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)}))}},l=e=>{e.target===t&&(i.current=iv(r.current))};return t.addEventListener("animationstart",l),t.addEventListener("animationcancel",a),t.addEventListener("animationend",a),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",l),t.removeEventListener("animationcancel",a),t.removeEventListener("animationend",a)}}u("ANIMATION_END")}),[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:P.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}function iv(e){return(null==e?void 0:e.animationName)||"none"}function lB(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}hm.displayName="Presence";var K1=0;function uB(){P.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??D2()),document.body.insertAdjacentElement("beforeend",e[1]??D2()),K1++,()=>{1===K1&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),K1--}}),[])}function D2(){const 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}var LA=ET(),Y1=function(){},vm=P.forwardRef((function(e,t){var n=P.useRef(null),r=P.useState({onScrollCapture:Y1,onWheelCapture:Y1,onTouchMoveCapture:Y1}),o=r[0],i=r[1],a=e.forwardProps,l=e.children,u=e.className,s=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,p=e.noIsolation,h=e.inert,m=e.allowPinchZoom,v=e.as,g=void 0===v?"div":v,y=e.gapMode,b=qx(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=f,x=CT([n,t]),_=cr(cr({},b),o);return P.createElement(P.Fragment,null,c&&P.createElement(w,{sideCar:LA,removeScrollBar:s,shards:d,noIsolation:p,inert:h,setCallbacks:i,allowPinchZoom:!!m,lockRef:n,gapMode:y}),a?P.cloneElement(P.Children.only(l),cr(cr({},_),{ref:x})):P.createElement(g,cr({},_,{className:u,ref:x}),l))}));vm.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},vm.classNames={fullWidth:bd,zeroRight:yd};var hx=!1;if(typeof window<"u")try{var av=Object.defineProperty({},"passive",{get:function(){return hx=!0,!0}});window.addEventListener("test",av,av),window.removeEventListener("test",av,av)}catch{hx=!1}var qu=!!hx&&{passive:!1},cB=function(e){return"TEXTAREA"===e.tagName},jA=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!cB(e)&&"visible"===n[t])},fB=function(e){return jA(e,"overflowY")},dB=function(e){return jA(e,"overflowX")},I2=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host),FA(e,r)){var o=BA(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},pB=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},hB=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},FA=function(e,t){return"v"===e?fB(t):dB(t)},BA=function(e,t){return"v"===e?pB(t):hB(t)},vB=function(e,t){return"h"===e&&"rtl"===t?-1:1},mB=function(e,t,n,r,o){var i=vB(e,window.getComputedStyle(t).direction),a=i*r,l=n.target,u=t.contains(l),s=!1,c=a>0,d=0,f=0;do{var p=BA(e,l),h=p[0],m=p[1]-p[2]-i*h;(h||m)&&FA(e,l)&&(d+=m,f+=h),l=l instanceof ShadowRoot?l.host:l.parentNode}while(!u&&l!==document.body||u&&(t.contains(l)||t===l));return(c&&(Math.abs(d)<1||!o)||!c&&(Math.abs(f)<1||!o))&&(s=!0),s},sv=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},k2=function(e){return[e.deltaX,e.deltaY]},M2=function(e){return e&&"current"in e?e.current:e},gB=function(e,t){return e[0]===t[0]&&e[1]===t[1]},yB=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},bB=0,zu=[];function wB(e){var t=P.useRef([]),n=P.useRef([0,0]),r=P.useRef(),o=P.useState(bB++)[0],i=P.useState(zx)[0],a=P.useRef(e);P.useEffect((function(){a.current=e}),[e]),P.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=ST([e.lockRef.current],(e.shards||[]).map(M2),!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=P.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!a.current.allowPinchZoom;var o,i=sv(e),l=n.current,u="deltaX"in e?e.deltaX:l[0]-i[0],s="deltaY"in e?e.deltaY:l[1]-i[1],c=e.target,d=Math.abs(u)>Math.abs(s)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=I2(d,c);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=I2(d,c)),!f)return!1;if(!r.current&&"changedTouches"in e&&(u||s)&&(r.current=o),!o)return!0;var p=r.current||o;return mB(p,t,e,"h"===p?u:s,!0)}),[]),u=P.useCallback((function(e){var n=e;if(zu.length&&zu[zu.length-1]===i){var r="deltaY"in n?k2(n):sv(n),o=t.current.filter((function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&gB(e.delta,r)}))[0];if(o&&o.should)return void(n.cancelable&&n.preventDefault());if(!o){var u=(a.current.shards||[]).map(M2).filter(Boolean).filter((function(e){return e.contains(n.target)}));(u.length>0?l(n,u[0]):!a.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),s=P.useCallback((function(e,n,r,o){var i={name:e,delta:n,target:r,should:o,shadowParent:xB(r)};t.current.push(i),setTimeout((function(){t.current=t.current.filter((function(e){return e!==i}))}),1)}),[]),c=P.useCallback((function(e){n.current=sv(e),r.current=void 0}),[]),d=P.useCallback((function(t){s(t.type,k2(t),t.target,l(t,e.lockRef.current))}),[]),f=P.useCallback((function(t){s(t.type,sv(t),t.target,l(t,e.lockRef.current))}),[]);P.useEffect((function(){return zu.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",u,qu),document.addEventListener("touchmove",u,qu),document.addEventListener("touchstart",c,qu),function(){zu=zu.filter((function(e){return e!==i})),document.removeEventListener("wheel",u,qu),document.removeEventListener("touchmove",u,qu),document.removeEventListener("touchstart",c,qu)}}),[]);var p=e.removeScrollBar,h=e.inert;return P.createElement(P.Fragment,null,h?P.createElement(i,{styles:yB(o)}):null,p?P.createElement(OT,{gapMode:e.gapMode}):null)}function xB(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const _B=RT(LA,wB);var qA=P.forwardRef((function(e,t){return P.createElement(vm,cr({},e,{ref:t,sideCar:_B}))}));qA.classNames=vm.classNames;var P_="Dialog",[zA,aX]=AF(P_),[$B,Yo]=zA(P_),WA=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,l=P.useRef(null),u=P.useRef(null),[s=!1,c]=kF({prop:r,defaultProp:o,onChange:i});return k.jsx($B,{scope:t,triggerRef:l,contentRef:u,contentId:H1(),titleId:H1(),descriptionId:H1(),open:s,onOpenChange:c,onOpenToggle:P.useCallback((()=>c((e=>!e))),[c]),modal:a,children:n})};WA.displayName=P_;var UA="DialogTrigger",HA=P.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Yo(UA,n),i=yl(t,o.triggerRef);return k.jsx(na.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":O_(o.open),...r,ref:i,onClick:Ya(e.onClick,o.onOpenToggle)})}));HA.displayName=UA;var R_="DialogPortal",[SB,VA]=zA(R_,{forceMount:void 0}),GA=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=Yo(R_,t);return k.jsx(SB,{scope:t,forceMount:n,children:P.Children.map(r,(e=>k.jsx(hm,{present:n||i.open,children:k.jsx(MA,{asChild:!0,container:o,children:e})})))})};GA.displayName=R_;var Tv="DialogOverlay",KA=P.forwardRef(((e,t)=>{const n=VA(Tv,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Yo(Tv,e.__scopeDialog);return i.modal?k.jsx(hm,{present:r||i.open,children:k.jsx(EB,{...o,ref:t})}):null}));KA.displayName=Tv;var CB=OA("DialogOverlay.RemoveScroll"),EB=P.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Yo(Tv,n);return k.jsx(qA,{as:CB,allowPinchZoom:!0,shards:[o.contentRef],children:k.jsx(na.div,{"data-state":O_(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})})),pl="DialogContent",YA=P.forwardRef(((e,t)=>{const n=VA(pl,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Yo(pl,e.__scopeDialog);return k.jsx(hm,{present:r||i.open,children:i.modal?k.jsx(PB,{...o,ref:t}):k.jsx(RB,{...o,ref:t})})}));YA.displayName=pl;var PB=P.forwardRef(((e,t)=>{const n=Yo(pl,e.__scopeDialog),r=P.useRef(null),o=yl(t,n.contentRef,r);return P.useEffect((()=>{const e=r.current;if(e)return Kv(e)}),[]),k.jsx(XA,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ya(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),null==(t=n.triggerRef.current)||t.focus()})),onPointerDownOutside:Ya(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:Ya(e.onFocusOutside,(e=>e.preventDefault()))})})),RB=P.forwardRef(((e,t)=>{const n=Yo(pl,e.__scopeDialog),r=P.useRef(!1),o=P.useRef(!1);return k.jsx(XA,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var i,a;null==(i=e.onCloseAutoFocus)||i.call(e,t),t.defaultPrevented||(r.current||null==(a=n.triggerRef.current)||a.focus(),t.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:t=>{var i,a;null==(i=e.onInteractOutside)||i.call(e,t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));const l=t.target;(null==(a=n.triggerRef.current)?void 0:a.contains(l))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})})),XA=P.forwardRef(((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,l=Yo(pl,n),u=P.useRef(null),s=yl(t,u);return uB(),k.jsxs(k.Fragment,{children:[k.jsx(IA,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:k.jsx(NA,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":O_(l.open),...a,ref:s,onDismiss:()=>l.onOpenChange(!1)})}),k.jsxs(k.Fragment,{children:[k.jsx(TB,{titleId:l.titleId}),k.jsx(AB,{contentRef:u,descriptionId:l.descriptionId})]})]})})),T_="DialogTitle",QA=P.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Yo(T_,n);return k.jsx(na.h2,{id:o.titleId,...r,ref:t})}));QA.displayName=T_;var ZA="DialogDescription",JA=P.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Yo(ZA,n);return k.jsx(na.p,{id:o.descriptionId,...r,ref:t})}));JA.displayName=ZA;var eN="DialogClose",tN=P.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Yo(eN,n);return k.jsx(na.button,{type:"button",...r,ref:t,onClick:Ya(e.onClick,(()=>o.onOpenChange(!1)))})}));function O_(e){return e?"open":"closed"}tN.displayName=eN;var nN="DialogTitleWarning",[sX,rN]=OF(nN,{contentName:pl,titleName:T_,docsSlug:"dialog"}),TB=({titleId:e})=>{const t=rN(nN),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return P.useEffect((()=>{e&&(document.getElementById(e)||console.error(n))}),[n,e]),null},OB="DialogDescriptionWarning",AB=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${rN(OB).contentName}}.`;return P.useEffect((()=>{var r;const o=null==(r=e.current)?void 0:r.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(n))}),[n,e,t]),null},NB=WA,DB=HA,IB=GA,kB=KA,MB=YA,LB=QA,jB=JA,FB=tN;function BB(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const oN=ye.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),lc=()=>{const e=ye.useContext(oN);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};BB("[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,100%,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,-100%,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(-100%,0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(100%,0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(\n[data-state=closed]\n){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,100%,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,100%,0)}}@keyframes slideFromTop{from{transform:translate3d(0,-100%,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,-100%,0)}}@keyframes slideFromLeft{from{transform:translate3d(-100%,0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(-100%,0,0)}}@keyframes slideFromRight{from{transform:translate3d(100%,0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(100%,0,0)}}");const qB=24,zB=typeof window<"u"?tc:We;function L2(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}function WB(){return A_(/^Mac/)}function UB(){return A_(/^iPhone/)}function j2(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function HB(){return A_(/^iPad/)||WB()&&navigator.maxTouchPoints>1}function iN(){return UB()||HB()}function A_(e){return typeof window<"u"&&null!=window.navigator?e.test(window.navigator.platform):void 0}const X1=typeof document<"u"&&window.visualViewport;function F2(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function aN(e){for(F2(e)&&(e=e.parentElement);e&&!F2(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const VB=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let Q1,lv=0;function GB(e={}){let{isDisabled:t}=e;zB((()=>{if(!t)return lv++,1===lv&&iN()&&(Q1=KB()),()=>{lv--,0===lv&&(null==Q1||Q1())}}),[t])}function KB(){let e,t=0,n=window.pageXOffset,r=window.pageYOffset,o=L2(YB(document.documentElement,"paddingRight",window.innerWidth-document.documentElement.clientWidth+"px"));window.scrollTo(0,0);let i=L2(dd(document,"touchstart",(n=>{e=aN(n.target),(e!==document.documentElement||e!==document.body)&&(t=n.changedTouches[0].pageY)}),{passive:!1,capture:!0}),dd(document,"touchmove",(n=>{if(!e||e===document.documentElement||e===document.body)return void n.preventDefault();let r=n.changedTouches[0].pageY,o=e.scrollTop,i=e.scrollHeight-e.clientHeight;0!==i&&((o<=0&&r>t||o>=i&&r<t)&&n.preventDefault(),t=r)}),{passive:!1,capture:!0}),dd(document,"touchend",(e=>{let t=e.target;vx(t)&&t!==document.activeElement&&(e.preventDefault(),t.style.transform="translateY(-2000px)",t.focus(),requestAnimationFrame((()=>{t.style.transform=""})))}),{passive:!1,capture:!0}),dd(document,"focus",(e=>{let t=e.target;vx(t)&&(t.style.transform="translateY(-2000px)",requestAnimationFrame((()=>{t.style.transform="",X1&&(X1.height<window.innerHeight?requestAnimationFrame((()=>{B2(t)})):X1.addEventListener("resize",(()=>B2(t)),{once:!0}))})))}),!0),dd(window,"scroll",(()=>{window.scrollTo(0,0)})));return()=>{o(),i(),window.scrollTo(n,r)}}function YB(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function dd(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function B2(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let t=aN(e);if(t!==document.documentElement&&t!==document.body&&t!==e){let n=t.getBoundingClientRect().top,r=e.getBoundingClientRect().top;e.getBoundingClientRect().bottom>t.getBoundingClientRect().bottom+24&&(t.scrollTop+=r-n)}e=t.parentElement}}function vx(e){return e instanceof HTMLInputElement&&!VB.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function XB(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function QB(...e){return t=>e.forEach((e=>XB(e,t)))}function sN(...e){return P.useCallback(QB(...e),e)}const lN=new WeakMap;function Rn(e,t,n=!1){if(!(e&&e instanceof HTMLElement))return;let r={};Object.entries(t).forEach((([t,n])=>{t.startsWith("--")?e.style.setProperty(t,n):(r[t]=e.style[t],e.style[t]=n)})),!n&&lN.set(e,r)}function ZB(e,t){if(!(e&&e instanceof HTMLElement))return;let n=lN.get(e);n&&(e.style[t]=n[t])}const Tn=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function uv(e,t){if(!e)return null;const n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform;let o=r.match(/^matrix3d\((.+)\)$/);return o?parseFloat(o[1].split(", ")[Tn(t)?13:12]):(o=r.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[Tn(t)?5:4]):null)}function JB(e){return 8*(Math.log(e+1)-2)}function Z1(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function eq(...e){return(...t)=>{for(const n of e)"function"==typeof n&&n(...t)}}const nn={DURATION:.5,EASE:[.32,.72,0,1]},uN=.4,tq=.25,nq=100,cN=8,tl=16,mx=26,J1="vaul-dragging";function fN(e){const t=ye.useRef(e);return ye.useEffect((()=>{t.current=e})),ye.useMemo((()=>(...e)=>null==t.current?void 0:t.current.call(t,...e)),[])}function rq({defaultProp:e,onChange:t}){const n=ye.useState(e),[r]=n,o=ye.useRef(r),i=fN(t);return ye.useEffect((()=>{o.current!==r&&(i(r),o.current=r)}),[r,o,i]),n}function dN({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=rq({defaultProp:t,onChange:n}),i=void 0!==e,a=i?e:r,l=fN(n);return[a,ye.useCallback((t=>{if(i){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[i,e,o,l])]}function oq({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:o,fadeFromIndex:i,onSnapPointChange:a,direction:l="bottom",container:u,snapToSequentialPoint:s}){const[c,d]=dN({prop:e,defaultProp:null==n?void 0:n[0],onChange:t}),[f,p]=ye.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);ye.useEffect((()=>{function e(){p({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]);const h=ye.useMemo((()=>c===(null==n?void 0:n[n.length-1])||null),[n,c]),m=ye.useMemo((()=>null==n?void 0:n.findIndex((e=>e===c))),[n,c]),v=n&&n.length>0&&(i||0===i)&&!Number.isNaN(i)&&n[i]===c||!n,g=ye.useMemo((()=>{const e=u?{width:u.getBoundingClientRect().width,height:u.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var t;return null!=(t=null==n?void 0:n.map((t=>{const n="string"==typeof t;let r=0;if(n&&(r=parseInt(t,10)),Tn(l)){const o=n?r:f?t*e.height:0;return f?"bottom"===l?e.height-o:-e.height+o:o}const o=n?r:f?t*e.width:0;return f?"right"===l?e.width-o:-e.width+o:o})))?t:[]}),[n,f,u]),y=ye.useMemo((()=>null!==m?null==g?void 0:g[m]:null),[g,m]),b=ye.useCallback((e=>{var t;const u=null!=(t=null==g?void 0:g.findIndex((t=>t===e)))?t:null;a(u),Rn(r.current,{transition:`transform ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`,transform:Tn(l)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`}),g&&u!==g.length-1&&u!==i&&u<i?Rn(o.current,{transition:`opacity ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`,opacity:"0"}):Rn(o.current,{transition:`opacity ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`,opacity:"1"}),d(null==n?void 0:n[Math.max(u,0)])}),[r.current,n,g,i,o,d]);return ye.useEffect((()=>{if(c||e){var t;const r=null!=(t=null==n?void 0:n.findIndex((t=>t===e||t===c)))?t:-1;g&&-1!==r&&"number"==typeof g[r]&&b(g[r])}}),[c,e,n,g,b]),{isLastSnapPoint:h,activeSnapPoint:c,shouldFade:v,getPercentageDragged:function(e,t){if(!n||"number"!=typeof m||!g||void 0===i)return null;const r=m===i-1;if(m>=i&&t)return 0;if(r&&!t)return 1;if(!v&&!r)return null;const o=r?m+1:m-1,a=r?g[o]-g[o-1]:g[o+1]-g[o],l=e/Math.abs(a);return r?1-l:l},setActiveSnapPoint:d,activeSnapPointIndex:m,onRelease:function({draggedDistance:e,closeDrawer:t,velocity:r,dismissible:a}){if(void 0===i)return;const u="bottom"===l||"right"===l?(y??0)-e:(y??0)+e,c=0===m,d=e>0;if(m===i-1&&Rn(o.current,{transition:`opacity ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`}),!s&&r>2&&!d)return void(a?t():b(g[0]));if(!s&&r>2&&d&&g&&n)return void b(g[n.length-1]);const f=null==g?void 0:g.reduce(((e,t)=>"number"!=typeof e||"number"!=typeof t?e:Math.abs(t-u)<Math.abs(e-u)?t:e)),p=Tn(l)?window.innerHeight:window.innerWidth;if(r>uN&&Math.abs(e)<.4*p){const e=d?1:-1;if(e>0&&h)return void b(g[n.length-1]);if(c&&e<0&&a&&t(),null===m)return;b(g[m+e])}else b(f)},onDrag:function({draggedDistance:e}){if(null===y)return;const t="bottom"===l||"right"===l?y-e:y+e;("bottom"===l||"right"===l)&&t<g[g.length-1]||("top"===l||"left"===l)&&t>g[g.length-1]||Rn(r.current,{transform:Tn(l)?`translate3d(0, ${t}px, 0)`:`translate3d(${t}px, 0, 0)`})},snapPointsOffset:g}}const iq=()=>()=>{};function aq(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:o}=lc(),i=ye.useRef(null),a=Ur((()=>document.body.style.backgroundColor),[]);function l(){return(window.innerWidth-26)/window.innerWidth}ye.useEffect((()=>{if(t&&n){i.current&&clearTimeout(i.current);const t=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!t)return;eq(r&&!o?Z1(document.body,{background:"black"}):iq,Z1(t,{transformOrigin:Tn(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${nn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${nn.EASE.join(",")})`}));const n=Z1(t,{borderRadius:"8px",overflow:"hidden",...Tn(e)?{transform:`scale(${l()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${l()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{n(),i.current=window.setTimeout((()=>{a?document.body.style.background=a:document.body.style.removeProperty("background")}),1e3*nn.DURATION)}}}),[t,n,a])}let pd=null;function sq({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:o,noBodyStyles:i}){const[a,l]=ye.useState((()=>typeof window<"u"?window.location.href:"")),u=ye.useRef(0),s=ye.useCallback((()=>{if(j2()&&null===pd&&e&&!i){pd={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:e,innerHeight:t}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:-u.current+"px",left:-e+"px",right:"0px",height:"auto"}),window.setTimeout((()=>window.requestAnimationFrame((()=>{const e=t-window.innerHeight;e&&u.current>=t&&(document.body.style.top=-(u.current+e)+"px")}))),300)}}),[e]),c=ye.useCallback((()=>{if(j2()&&null!==pd&&!i){const e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);Object.assign(document.body.style,pd),window.requestAnimationFrame((()=>{o&&a!==window.location.href?l(window.location.href):window.scrollTo(t,e)})),pd=null}}),[a]);return ye.useEffect((()=>{function e(){u.current=window.scrollY}return e(),window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}}),[]),ye.useEffect((()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&s(),t||window.setTimeout((()=>{c()}),500)):c())}),[e,r,a,t,n,s,c]),{restorePositionSetting:c}}function pN({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:o,snapPoints:i,shouldScaleBackground:a=!1,setBackgroundColorOnScale:l=!0,closeThreshold:u=tq,scrollLockTimeout:s=nq,dismissible:c=!0,handleOnly:d=!1,fadeFromIndex:f=i&&i.length-1,activeSnapPoint:p,setActiveSnapPoint:h,fixed:m,modal:v=!0,onClose:g,nested:y,noBodyStyles:b,direction:w="bottom",defaultOpen:x=!1,disablePreventScroll:_=!0,snapToSequentialPoint:k=!1,preventScrollRestoration:P=!1,repositionInputs:S=!0,onAnimationEnd:C,container:E,autoFocus:N=!1}){var O,T;const[R=!1,j]=dN({defaultProp:x,prop:e,onChange:e=>{null==t||t(e),!e&&!y&&ue(),setTimeout((()=>{null==C||C(e)}),1e3*nn.DURATION),e&&!v&&typeof window<"u"&&window.requestAnimationFrame((()=>{document.body.style.pointerEvents="auto"})),e||(document.body.style.pointerEvents="auto")}}),[D,z]=ye.useState(!1),[A,M]=ye.useState(!1),[L,I]=ye.useState(!1),F=ye.useRef(null),W=ye.useRef(null),B=ye.useRef(null),U=ye.useRef(null),$=ye.useRef(null),H=ye.useRef(!1),V=ye.useRef(null),K=ye.useRef(0),q=ye.useRef(!1),G=ye.useRef(0),Y=ye.useRef(null),X=ye.useRef((null==(O=Y.current)?void 0:O.getBoundingClientRect().height)||0),Q=ye.useRef((null==(T=Y.current)?void 0:T.getBoundingClientRect().width)||0),Z=ye.useRef(0),J=ye.useCallback((e=>{i&&e===oe.length-1&&(W.current=new Date)}),[]),{activeSnapPoint:ee,activeSnapPointIndex:te,setActiveSnapPoint:ne,onRelease:re,snapPointsOffset:oe,onDrag:ie,shouldFade:ae,getPercentageDragged:le}=oq({snapPoints:i,activeSnapPointProp:p,setActiveSnapPointProp:h,drawerRef:Y,fadeFromIndex:f,overlayRef:F,onSnapPointChange:J,direction:w,container:E,snapToSequentialPoint:k});GB({isDisabled:!R||A||!v||L||!D||!S||!_});const{restorePositionSetting:ue}=sq({isOpen:R,modal:v,nested:y,hasBeenOpened:D,preventScrollRestoration:P,noBodyStyles:b});function se(){return(window.innerWidth-26)/window.innerWidth}function ce(e,t){var n,r;let o=e;const i=null==(n=window.getSelection())?void 0:n.toString(),a=Y.current?uv(Y.current,w):null,l=new Date;if(o.hasAttribute("data-vaul-no-drag")||o.closest("[data-vaul-no-drag]"))return!1;if("right"===w||"left"===w)return!0;if(W.current&&l.getTime()-W.current.getTime()<500)return!1;if(null!==a&&("bottom"===w?a>0:a<0))return!0;if(i&&i.length>0)return!1;if(l.getTime()-(null==(r=$.current)?void 0:r.getTime())<s&&0===a||t)return $.current=l,!1;for(;o;){if(o.scrollHeight>o.clientHeight){if(0!==o.scrollTop)return $.current=new Date,!1;if("dialog"===o.getAttribute("role"))return!0}o=o.parentNode}return!0}function de(e){!A||!Y.current||(Y.current.classList.remove(J1),H.current=!1,M(!1),U.current=new Date),null==g||g(),e||j(!1),setTimeout((()=>{i&&ne(i[0])}),1e3*nn.DURATION)}function fe(){if(!Y.current)return;const e=document.querySelector("[data-vaul-drawer-wrapper]"),t=uv(Y.current,w);Rn(Y.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`}),Rn(F.current,{transition:`opacity ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`,opacity:"1"}),a&&t&&t>0&&R&&Rn(e,{borderRadius:"8px",overflow:"hidden",...Tn(w)?{transform:`scale(${se()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${se()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${nn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${nn.EASE.join(",")})`},!0)}return ye.useEffect((()=>{var e;function t(){if(!Y.current||!S)return;if(vx(document.activeElement)||q.current){var e;const t=(null==(e=window.visualViewport)?void 0:e.height)||0,n=window.innerHeight;let r=n-t;const o=Y.current.getBoundingClientRect().height||0,a=o>.8*n;Z.current||(Z.current=o);const l=Y.current.getBoundingClientRect().top;if(Math.abs(G.current-r)>60&&(q.current=!q.current),i&&i.length>0&&oe&&te){r+=oe[te]||0}if(G.current=r,o>t||q.current){const e=Y.current.getBoundingClientRect().height;let n=e;e>t&&(n=t-(a?l:26)),Y.current.style.height=m?e-Math.max(r,0)+"px":`${Math.max(n,t-l)}px`}else Y.current.style.height=`${Z.current}px`;i&&i.length>0&&!q.current?Y.current.style.bottom="0px":Y.current.style.bottom=`${Math.max(r,0)}px`}}return null==(e=window.visualViewport)||e.addEventListener("resize",t),()=>{var e;return null==(e=window.visualViewport)?void 0:e.removeEventListener("resize",t)}}),[te,i,oe]),ye.useEffect((()=>(R&&(Rn(document.documentElement,{scrollBehavior:"auto"}),W.current=new Date),()=>{ZB(document.documentElement,"scrollBehavior")})),[R]),ye.createElement(NB,{defaultOpen:x,onOpenChange:e=>{!c&&!e||(e?z(!0):de(!0),j(e))},open:R},ye.createElement(oN.Provider,{value:{activeSnapPoint:ee,snapPoints:i,setActiveSnapPoint:ne,drawerRef:Y,overlayRef:F,onOpenChange:t,onPress:function(e){var t,n;!c&&!i||Y.current&&!Y.current.contains(e.target)||(X.current=(null==(t=Y.current)?void 0:t.getBoundingClientRect().height)||0,Q.current=(null==(n=Y.current)?void 0:n.getBoundingClientRect().width)||0,M(!0),B.current=new Date,iN()&&window.addEventListener("touchend",(()=>H.current=!1),{once:!0}),e.target.setPointerCapture(e.pointerId),K.current=Tn(w)?e.pageY:e.pageX)},onRelease:function(e){if(!A||!Y.current)return;Y.current.classList.remove(J1),H.current=!1,M(!1),U.current=new Date;const t=uv(Y.current,w);if(!ce(e.target,!1)||!t||Number.isNaN(t)||null===B.current)return;const n=U.current.getTime()-B.current.getTime(),r=K.current-(Tn(w)?e.pageY:e.pageX),a=Math.abs(r)/n;if(a>.05&&(I(!0),setTimeout((()=>{I(!1)}),200)),i)return re({draggedDistance:r*("bottom"===w||"right"===w?1:-1),closeDrawer:de,velocity:a,dismissible:c}),void(null==o||o(e,!0));if("bottom"===w||"right"===w?r>0:r<0)return fe(),void(null==o||o(e,!0));if(a>uN)return de(),void(null==o||o(e,!1));var l;const s=Math.min(null!=(l=Y.current.getBoundingClientRect().height)?l:0,window.innerHeight);var d;const f=Math.min(null!=(d=Y.current.getBoundingClientRect().width)?d:0,window.innerWidth),p="left"===w||"right"===w;if(Math.abs(t)>=(p?f:s)*u)return de(),void(null==o||o(e,!1));null==o||o(e,!0),fe()},onDrag:function(e){if(Y.current&&A){const t="bottom"===w||"right"===w?1:-1,n=(K.current-(Tn(w)?e.pageY:e.pageX))*t,o=n>0,l=i&&!c&&!o;if(l&&0===te)return;const u=Math.abs(n),s=document.querySelector("[data-vaul-drawer-wrapper]");let d=u/("bottom"===w||"top"===w?X.current:Q.current);const p=le(u,o);if(null!==p&&(d=p),l&&d>=1||!H.current&&!ce(e.target,o))return;if(Y.current.classList.add(J1),H.current=!0,Rn(Y.current,{transition:"none"}),Rn(F.current,{transition:"none"}),i&&ie({draggedDistance:n}),o&&!i){const e=JB(n),r=Math.min(-1*e,0)*t;return void Rn(Y.current,{transform:Tn(w)?`translate3d(0, ${r}px, 0)`:`translate3d(${r}px, 0, 0)`})}const h=1-d;if((ae||f&&te===f-1)&&(null==r||r(e,d),Rn(F.current,{opacity:`${h}`,transition:"none"},!0)),s&&F.current&&a){const e=Math.min(se()+d*(1-se()),1),t=8-8*d,n=Math.max(0,14-14*d);Rn(s,{borderRadius:`${t}px`,transform:Tn(w)?`scale(${e}) translate3d(0, ${n}px, 0)`:`scale(${e}) translate3d(${n}px, 0, 0)`,transition:"none"},!0)}if(!i){const e=u*t;Rn(Y.current,{transform:Tn(w)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}}},dismissible:c,handleOnly:d,isOpen:R,isDragging:A,shouldFade:ae,closeDrawer:de,onNestedDrag:function(e,t){if(t<0)return;const n=(window.innerWidth-16)/window.innerWidth,r=n+t*(1-n),o=16*t-16;Rn(Y.current,{transform:Tn(w)?`scale(${r}) translate3d(0, ${o}px, 0)`:`scale(${r}) translate3d(${o}px, 0, 0)`,transition:"none"})},onNestedOpenChange:function(e){const t=e?(window.innerWidth-16)/window.innerWidth:1,n=e?-16:0;V.current&&window.clearTimeout(V.current),Rn(Y.current,{transition:`transform ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`,transform:`scale(${t}) translate3d(0, ${n}px, 0)`}),!e&&Y.current&&(V.current=setTimeout((()=>{const e=uv(Y.current,w);Rn(Y.current,{transition:"none",transform:Tn(w)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}),500))},onNestedRelease:function(e,t){const n=Tn(w)?window.innerHeight:window.innerWidth,r=t?(n-16)/n:1,o=t?-16:0;t&&Rn(Y.current,{transition:`transform ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`,transform:Tn(w)?`scale(${r}) translate3d(0, ${o}px, 0)`:`scale(${r}) translate3d(${o}px, 0, 0)`})},keyboardIsOpen:q,modal:v,snapPointsOffset:oe,direction:w,shouldScaleBackground:a,setBackgroundColorOnScale:l,noBodyStyles:b,container:E,autoFocus:N}},n))}const hN=ye.forwardRef((function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:o,shouldFade:i,isOpen:a,modal:l}=lc(),u=sN(t,n),s=r&&r.length>0;return l?ye.createElement(kB,{onMouseUp:o,ref:u,"data-vaul-overlay":"","data-vaul-snap-points":a&&s?"true":"false","data-vaul-snap-points-overlay":a&&i?"true":"false",...e}):(typeof window<"u"&&window.requestAnimationFrame((()=>{document.body.style.pointerEvents="auto"})),null)}));hN.displayName="Drawer.Overlay";const vN=ye.forwardRef((function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},o){const{drawerRef:i,onPress:a,onRelease:l,onDrag:u,keyboardIsOpen:s,snapPointsOffset:c,modal:d,isOpen:f,direction:p,snapPoints:h,container:m,handleOnly:v,autoFocus:g}=lc(),[y,b]=ye.useState(!1),w=sN(o,i),x=ye.useRef(null),_=ye.useRef(null),k=ye.useRef(!1),P=h&&h.length>0;aq();function S(e){x.current=null,k.current=!1,l(e)}return ye.useEffect((()=>{P&&window.requestAnimationFrame((()=>{b(!0)}))}),[]),ye.createElement(MB,{"data-vaul-drawer-direction":p,"data-vaul-drawer":"","data-vaul-delayed-snap-points":y?"true":"false","data-vaul-snap-points":f&&P?"true":"false","data-vaul-custom-container":m?"true":"false",...r,ref:w,style:c&&c.length>0?{"--snap-point-height":`${c[0]}px`,...t}:t,onPointerDown:e=>{v||(null==r.onPointerDown||r.onPointerDown.call(r,e),x.current={x:e.pageX,y:e.pageY},a(e))},onOpenAutoFocus:e=>{null==n||n(e),g||e.preventDefault()},onPointerDownOutside:t=>{null==e||e(t),d&&!t.defaultPrevented?s.current&&(s.current=!1):t.preventDefault()},onFocusOutside:e=>{d||e.preventDefault()},onPointerMove:e=>{if(_.current=e,v||(null==r.onPointerMove||r.onPointerMove.call(r,e),!x.current))return;const t=e.pageY-x.current.y,n=e.pageX-x.current.x,o="touch"===e.pointerType?10:2;((e,t,n=0)=>{if(k.current)return!0;const r=Math.abs(e.y),o=Math.abs(e.x),i=o>r,a=["bottom","right"].includes(t)?1:-1;if("left"===t||"right"===t){if(!(e.x*a<0)&&o>=0&&o<=n)return i}else if(!(e.y*a<0)&&r>=0&&r<=n)return!i;return k.current=!0,!0})({x:n,y:t},p,o)?u(e):(Math.abs(n)>o||Math.abs(t)>o)&&(x.current=null)},onPointerUp:e=>{null==r.onPointerUp||r.onPointerUp.call(r,e),x.current=null,k.current=!1,l(e)},onPointerOut:e=>{null==r.onPointerOut||r.onPointerOut.call(r,e),S(_.current)},onContextMenu:e=>{null==r.onContextMenu||r.onContextMenu.call(r,e),S(_.current)}})}));vN.displayName="Drawer.Content";const lq=250,uq=120,mN=ye.forwardRef((function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:o,isDragging:i,snapPoints:a,activeSnapPoint:l,setActiveSnapPoint:u,dismissible:s,handleOnly:c,isOpen:d,onPress:f,onDrag:p}=lc(),h=ye.useRef(null),m=ye.useRef(!1);function v(){window.clearTimeout(h.current),m.current=!1}return ye.createElement("div",{onClick:function(){m.current?v():window.setTimeout((()=>{!function(){if(i||e||m.current)return void v();if(v(),(!a||0===a.length)&&s)return void o();if(l===a[a.length-1]&&s)return void o();const t=a.findIndex((e=>e===l));if(-1===t)return;const n=a[t+1];u(n)}()}),uq)},onPointerCancel:v,onPointerDown:e=>{c&&f(e),h.current=window.setTimeout((()=>{m.current=!0}),lq)},onPointerMove:e=>{c&&p(e)},ref:r,"data-vaul-drawer-visible":d?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},ye.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))}));function cq({onDrag:e,onOpenChange:t,...n}){const{onNestedDrag:r,onNestedOpenChange:o,onNestedRelease:i}=lc();if(!r)throw new Error("Drawer.NestedRoot must be placed in another drawer");return ye.createElement(pN,{nested:!0,onClose:()=>{o(!1)},onDrag:(t,n)=>{r(t,n),null==e||e(t,n)},onOpenChange:e=>{e&&o(e)},onRelease:i,...n})}function fq(e){const t=lc(),{container:n=t.container,...r}=e;return ye.createElement(IB,{container:n,...r})}mN.displayName="Drawer.Handle";const Xo={Root:pN,NestedRoot:cq,Content:vN,Overlay:hN,Trigger:DB,Portal:fq,Handle:mN,Close:FB,Title:LB,Description:jB},dq=({shouldScaleBackground:e=!0,direction:t="bottom",...n})=>k.jsx(Xo.Root,{direction:t,shouldScaleBackground:e,...n});dq.displayName="Drawer";const lX=Xo.Trigger,pq=Xo.Portal,uX=Xo.Close,gN=P.forwardRef((({className:e,...t},n)=>k.jsx(Xo.Overlay,{ref:n,className:se("fixed inset-0 z-50 bg-black/5",e),...t})));gN.displayName=Xo.Overlay.displayName;const hq=P.forwardRef((({className:e,children:t,direction:n="bottom",...r},o)=>k.jsxs(pq,{children:[k.jsx(gN,{}),k.jsxs(Xo.Content,{ref:o,className:se("fixed z-50 border bg-background shadow-lg","bottom"===n&&"inset-x-0 bottom-0 mt-24 flex h-auto flex-col rounded-t-sm","top"===n&&"inset-x-0 top-0 mb-24 flex h-auto flex-col rounded-b-sm","left"===n&&"inset-y-0 left-0 flex h-full flex-col","right"===n&&"inset-y-0 right-0 flex h-full w-[346px] flex-col sm:w-[435px]",e),...r,children:["bottom"===n&&k.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),t]})]})));hq.displayName="DrawerContent";const vq=({className:e,...t})=>k.jsx("div",{className:se("grid gap-1.5 p-4 text-center sm:text-left",e),...t});vq.displayName="DrawerHeader";const mq=({className:e,...t})=>k.jsx("div",{className:se("mt-auto flex flex-col gap-2 p-4",e),...t});mq.displayName="DrawerFooter";const gq=P.forwardRef((({className:e,...t},n)=>k.jsx(Xo.Title,{ref:n,className:se("text-lg font-semibold leading-none tracking-tight",e),...t})));gq.displayName=Xo.Title.displayName;const yq=P.forwardRef((({className:e,...t},n)=>k.jsx(Xo.Description,{ref:n,className:se("text-sm text-muted-foreground",e),...t})));function N_(e){const t=e+"CollectionProvider",[n,r]=Sr(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=e+"CollectionSlot",l=e+"CollectionItemSlot",u="data-radix-collection-item";return[{Provider:e=>{const{scope:t,children:n}=e,r=ye.useRef(null),i=ye.useRef(new Map).current;return ye.createElement(o,{scope:t,itemMap:i,collectionRef:r},n)},Slot:ye.forwardRef(((e,t)=>{const{scope:n,children:r}=e,o=Rt(t,i(a,n).collectionRef);return ye.createElement(ll,{ref:o},r)})),ItemSlot:ye.forwardRef(((e,t)=>{const{scope:n,children:r,...o}=e,a=ye.useRef(null),s=Rt(t,a),c=i(l,n);return ye.useEffect((()=>(c.itemMap.set(a,{ref:a,...o}),()=>{c.itemMap.delete(a)}))),ye.createElement(ll,{[u]:"",ref:s},r)}))},function(t){const n=i(e+"CollectionConsumer",t);return ye.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${u}]`));return Array.from(n.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[n.collectionRef,n.itemMap])},r]}yq.displayName=Xo.Description.displayName;const bq=Qa(void 0);function Gd(e){const t=ec(bq);return e||t||"ltr"}const wq=["top","right","bottom","left"],Ja=Math.min,ao=Math.max,Ov=Math.round,cv=Math.floor,es=e=>({x:e,y:e}),xq={left:"right",right:"left",bottom:"top",top:"bottom"},_q={start:"end",end:"start"};function gx(e,t,n){return ao(e,Ja(t,n))}function Qi(e,t){return"function"==typeof e?e(t):e}function Zi(e){return e.split("-")[0]}function uc(e){return e.split("-")[1]}function D_(e){return"x"===e?"y":"x"}function I_(e){return"y"===e?"height":"width"}function ts(e){return["top","bottom"].includes(Zi(e))?"y":"x"}function k_(e){return D_(ts(e))}function $q(e,t,n){void 0===n&&(n=!1);const r=uc(e),o=k_(e),i=I_(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Av(a)),[a,Av(a)]}function Sq(e){const t=Av(e);return[yx(e),t,yx(t)]}function yx(e){return e.replace(/start|end/g,(e=>_q[e]))}function Cq(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function Eq(e,t,n,r){const o=uc(e);let i=Cq(Zi(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(yx)))),i}function Av(e){return e.replace(/left|right|bottom|top/g,(e=>xq[e]))}function Pq(e){return{top:0,right:0,bottom:0,left:0,...e}}function yN(e){return"number"!=typeof e?Pq(e):{top:e,right:e,bottom:e,left:e}}function Nv(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function q2(e,t,n){let{reference:r,floating:o}=e;const i=ts(t),a=k_(t),l=I_(a),u=Zi(t),s="y"===i,c=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[l]/2-o[l]/2;let p;switch(u){case"top":p={x:c,y:r.y-o.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(uc(t)){case"start":p[a]-=f*(n&&s?-1:1);break;case"end":p[a]+=f*(n&&s?-1:1)}return p}const Rq=async(e,t,n)=>{const{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));let s=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=q2(s,r,u),f=r,p={},h=0;for(let n=0;n<l.length;n++){const{name:i,fn:m}=l[n],{x:v,y:g,data:y,reset:b}=await m({x:c,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:s,platform:a,elements:{reference:e,floating:t}});c=v??c,d=g??d,p={...p,[i]:{...p[i],...y}},b&&h<=50&&(h++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(s=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:c,y:d}=q2(s,f,u))),n=-1)}return{x:c,y:d,placement:f,strategy:o,middlewareData:p}};async function Ad(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:l,strategy:u}=e,{boundary:s="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Qi(t,e),h=yN(p),m=l[f?"floating"===d?"reference":"floating":d],v=Nv(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:s,rootBoundary:c,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)),b=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},w=Nv(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:g,offsetParent:y,strategy:u}):g);return{top:(v.top-w.top+h.top)/b.y,bottom:(w.bottom-v.bottom+h.bottom)/b.y,left:(v.left-w.left+h.left)/b.x,right:(w.right-v.right+h.right)/b.x}}const Tq=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:l,middlewareData:u}=t,{element:s,padding:c=0}=Qi(e,t)||{};if(null==s)return{};const d=yN(c),f={x:n,y:r},p=k_(o),h=I_(p),m=await a.getDimensions(s),v="y"===p,g=v?"top":"left",y=v?"bottom":"right",b=v?"clientHeight":"clientWidth",w=i.reference[h]+i.reference[p]-f[p]-i.floating[h],x=f[p]-i.reference[p],_=await(null==a.getOffsetParent?void 0:a.getOffsetParent(s));let k=_?_[b]:0;(!k||!await(null==a.isElement?void 0:a.isElement(_)))&&(k=l.floating[b]||i.floating[h]);const P=w/2-x/2,S=k/2-m[h]/2-1,C=Ja(d[g],S),E=Ja(d[y],S),N=C,O=k-m[h]-E,T=k/2-m[h]/2+P,R=gx(N,T,O),j=!u.arrow&&null!=uc(o)&&T!==R&&i.reference[h]/2-(T<N?C:E)-m[h]/2<0,D=j?T<N?T-N:T-O:0;return{[p]:f[p]+D,data:{[p]:R,centerOffset:T-R-D,...j&&{alignmentOffset:D}},reset:j}}}),Oq=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:l,platform:u,elements:s}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...v}=Qi(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const g=Zi(o),y=ts(l),b=Zi(l)===l,w=await(null==u.isRTL?void 0:u.isRTL(s.floating)),x=f||(b||!m?[Av(l)]:Sq(l)),_="none"!==h;!f&&_&&x.push(...Eq(l,m,h,w));const k=[l,...x],P=await Ad(t,v),S=[];let C=(null==(r=i.flip)?void 0:r.overflows)||[];if(c&&S.push(P[g]),d){const e=$q(o,a,w);S.push(P[e[0]],P[e[1]])}if(C=[...C,{placement:o,overflows:S}],!S.every((e=>e<=0))){var E,N;const e=((null==(E=i.flip)?void 0:E.index)||0)+1,t=k[e];if(t)return{data:{index:e,overflows:C},reset:{placement:t}};let n=null==(N=C.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:N.placement;if(!n)switch(p){case"bestFit":{var O;const e=null==(O=C.filter((e=>{if(_){const t=ts(e.placement);return t===y||"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:O[0];e&&(n=e);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}};function z2(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function W2(e){return wq.some((t=>e[t]>=0))}const Aq=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Qi(e,t);switch(r){case"referenceHidden":{const e=z2(await Ad(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:W2(e)}}}case"escaped":{const e=z2(await Ad(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:W2(e)}}}default:return{}}}}};async function Nq(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=Zi(n),l=uc(n),u="y"===ts(n),s=["left","top"].includes(a)?-1:1,c=i&&u?-1:1,d=Qi(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&"number"==typeof h&&(p="end"===l?-1*h:h),u?{x:p*c,y:f*s}:{x:f*s,y:p*c}}const Dq=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:l}=t,u=await Nq(t,e);return a===(null==(n=l.offset)?void 0:n.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:a}}}}},Iq=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...u}=Qi(e,t),s={x:n,y:r},c=await Ad(t,u),d=ts(Zi(o)),f=D_(d);let p=s[f],h=s[d];if(i){const e="y"===f?"bottom":"right";p=gx(p+c["y"===f?"top":"left"],p,p-c[e])}if(a){const e="y"===d?"bottom":"right";h=gx(h+c["y"===d?"top":"left"],h,h-c[e])}const m=l.fn({...t,[f]:p,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:i,[d]:a}}}}}},kq=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:l=0,mainAxis:u=!0,crossAxis:s=!0}=Qi(e,t),c={x:n,y:r},d=ts(o),f=D_(d);let p=c[f],h=c[d];const m=Qi(l,t),v="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(u){const e="y"===f?"height":"width",t=i.reference[f]-i.floating[e]+v.mainAxis,n=i.reference[f]+i.reference[e]-v.mainAxis;p<t?p=t:p>n&&(p=n)}if(s){var g,y;const e="y"===f?"width":"height",t=["top","left"].includes(Zi(o)),n=i.reference[d]-i.floating[e]+(t&&(null==(g=a.offset)?void 0:g[d])||0)+(t?0:v.crossAxis),r=i.reference[d]+i.reference[e]+(t?0:(null==(y=a.offset)?void 0:y[d])||0)-(t?v.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[f]:p,[d]:h}}}},Mq=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:l}=t,{apply:u=()=>{},...s}=Qi(e,t),c=await Ad(t,s),d=Zi(o),f=uc(o),p="y"===ts(o),{width:h,height:m}=i.floating;let v,g;"top"===d||"bottom"===d?(v=d,g=f===(await(null==a.isRTL?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(g=d,v="end"===f?"top":"bottom");const y=m-c.top-c.bottom,b=h-c.left-c.right,w=Ja(m-c[v],y),x=Ja(h-c[g],b),_=!t.middlewareData.shift;let k=w,P=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(P=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(k=y),_&&!f){const e=ao(c.left,0),t=ao(c.right,0),n=ao(c.top,0),r=ao(c.bottom,0);p?P=h-2*(0!==e||0!==t?e+t:ao(c.left,c.right)):k=m-2*(0!==n||0!==r?n+r:ao(c.top,c.bottom))}await u({...t,availableWidth:P,availableHeight:k});const S=await a.getDimensions(l.floating);return h!==S.width||m!==S.height?{reset:{rects:!0}}:{}}}};function mm(){return typeof window<"u"}function ns(e){return bN(e)?(e.nodeName||"").toLowerCase():"#document"}function uo(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function ra(e){var t;return null==(t=(bN(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function bN(e){return!!mm()&&(e instanceof Node||e instanceof uo(e).Node)}function bi(e){return!!mm()&&(e instanceof Element||e instanceof uo(e).Element)}function wi(e){return!!mm()&&(e instanceof HTMLElement||e instanceof uo(e).HTMLElement)}function U2(e){return!(!mm()||typeof ShadowRoot>"u")&&(e instanceof ShadowRoot||e instanceof uo(e).ShadowRoot)}function Kd(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=To(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Lq(e){return["table","td","th"].includes(ns(e))}function jq(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch{return!1}}))}function M_(e){const t=L_(),n=bi(e)?To(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function wN(e){let t=Qu(e);for(;wi(t)&&!gm(t);){if(M_(t))return t;if(jq(t))return null;t=Qu(t)}return null}function L_(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function gm(e){return["html","body","#document"].includes(ns(e))}function To(e){return uo(e).getComputedStyle(e)}function ym(e){return bi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qu(e){if("html"===ns(e))return e;const t=e.assignedSlot||e.parentNode||U2(e)&&e.host||ra(e);return U2(t)?t.host:t}function xN(e){const t=Qu(e);return gm(t)?e.ownerDocument?e.ownerDocument.body:e.body:wi(t)&&Kd(t)?t:xN(t)}function Nd(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=xN(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=uo(o);if(i){const e=Fq(a);return t.concat(a,a.visualViewport||[],Kd(o)?o:[],e&&n?Nd(e):[])}return t.concat(o,Nd(o,[],n))}function Fq(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function _N(e){const t=To(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=wi(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,l=Ov(n)!==i||Ov(r)!==a;return l&&(n=i,r=a),{width:n,height:r,$:l}}function j_(e){return bi(e)?e:e.contextElement}function Hu(e){const t=j_(e);if(!wi(t))return es(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=_N(t);let a=(i?Ov(n.width):n.width)/r,l=(i?Ov(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const Bq=es(0);function $N(e){const t=uo(e);return L_()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Bq}function qq(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==uo(e))&&t}function hl(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=j_(e);let a=es(1);t&&(r?bi(r)&&(a=Hu(r)):a=Hu(e));const l=qq(i,n,r)?$N(i):es(0);let u=(o.left+l.x)/a.x,s=(o.top+l.y)/a.y,c=o.width/a.x,d=o.height/a.y;if(i){const e=uo(i),t=r&&bi(r)?uo(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=Hu(n),t=n.getBoundingClientRect(),r=To(n),o=t.left+(n.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(n.clientTop+parseFloat(r.paddingTop))*e.y;u*=e.x,s*=e.y,c*=e.x,d*=e.y,u+=o,s+=i,n=uo(n).frameElement}}return Nv({width:c,height:d,x:u,y:s})}const zq=[":popover-open",":modal"];function SN(e){let t=!1,n=0,r=0;if(zq.forEach((n=>{!function(n){try{t=t||e.matches(n)}catch{}}(n)})),t){const t=wN(e);if(t){const e=t.getBoundingClientRect();n=e.x,r=e.y}}return[t,n,r]}function Wq(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=ra(r),[a]=t?SN(t.floating):[!1];if(r===i||a)return n;let l={scrollLeft:0,scrollTop:0},u=es(1);const s=es(0),c=wi(r);if((c||!c&&"fixed"!==o)&&(("body"!==ns(r)||Kd(i))&&(l=ym(r)),wi(r))){const e=hl(r);u=Hu(r),s.x=e.x+r.clientLeft,s.y=e.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+s.x,y:n.y*u.y-l.scrollTop*u.y+s.y}}function Uq(e){return Array.from(e.getClientRects())}function CN(e){return hl(ra(e)).left+ym(e).scrollLeft}function Hq(e){const t=ra(e),n=ym(e),r=e.ownerDocument.body,o=ao(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=ao(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+CN(e);const l=-n.scrollTop;return"rtl"===To(r).direction&&(a+=ao(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:l}}function Vq(e,t){const n=uo(e),r=ra(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,l=0,u=0;if(o){i=o.width,a=o.height;const e=L_();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,u=o.offsetTop)}return{width:i,height:a,x:l,y:u}}function Gq(e,t){const n=hl(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=wi(e)?Hu(e):es(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}function H2(e,t,n){let r;if("viewport"===t)r=Vq(e,n);else if("document"===t)r=Hq(ra(e));else if(bi(t))r=Gq(t,n);else{const n=$N(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return Nv(r)}function EN(e,t){const n=Qu(e);return!(n===t||!bi(n)||gm(n))&&("fixed"===To(n).position||EN(n,t))}function Kq(e,t){const n=t.get(e);if(n)return n;let r=Nd(e,[],!1).filter((e=>bi(e)&&"body"!==ns(e))),o=null;const i="fixed"===To(e).position;let a=i?Qu(e):e;for(;bi(a)&&!gm(a);){const t=To(a),n=M_(a);!n&&"fixed"===t.position&&(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||Kd(a)&&!n&&EN(e,a))?r=r.filter((e=>e!==a)):o=t,a=Qu(a)}return t.set(e,r),r}function Yq(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?Kq(t,this._c):[].concat(n),r],a=i[0],l=i.reduce(((e,n)=>{const r=H2(t,n,o);return e.top=ao(r.top,e.top),e.right=Ja(r.right,e.right),e.bottom=Ja(r.bottom,e.bottom),e.left=ao(r.left,e.left),e}),H2(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Xq(e){const{width:t,height:n}=_N(e);return{width:t,height:n}}function Qq(e,t,n,r){const o=wi(t),i=ra(t),a="fixed"===n,l=hl(e,!0,a,t);let u={scrollLeft:0,scrollTop:0};const s=es(0);if(o||!o&&!a)if(("body"!==ns(t)||Kd(i))&&(u=ym(t)),o){const e=hl(t,!0,a,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else i&&(s.x=CN(i));let c=l.left+u.scrollLeft-s.x,d=l.top+u.scrollTop-s.y;const[f,p,h]=SN(r);return f&&(c+=p,d+=h,o&&(c+=t.clientLeft,d+=t.clientTop)),{x:c,y:d,width:l.width,height:l.height}}function V2(e,t){return wi(e)&&"fixed"!==To(e).position?t?t(e):e.offsetParent:null}function PN(e,t){const n=uo(e);if(!wi(e))return n;let r=V2(e,t);for(;r&&Lq(r)&&"static"===To(r).position;)r=V2(r,t);return r&&("html"===ns(r)||"body"===ns(r)&&"static"===To(r).position&&!M_(r))?n:r||wN(e)||n}const Zq=async function(e){const t=this.getOffsetParent||PN,n=this.getDimensions;return{reference:Qq(e.reference,await t(e.floating),e.strategy,e.floating),floating:{x:0,y:0,...await n(e.floating)}}};function Jq(e){return"rtl"===To(e).direction}const ez={convertOffsetParentRelativeRectToViewportRelativeRect:Wq,getDocumentElement:ra,getClippingRect:Yq,getOffsetParent:PN,getElementRects:Zq,getClientRects:Uq,getDimensions:Xq,getScale:Hu,isElement:bi,isRTL:Jq};function tz(e,t){let n,r=null;const o=ra(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();const{left:s,top:c,width:d,height:f}=e.getBoundingClientRect();if(l||t(),!d||!f)return;const p={rootMargin:-cv(c)+"px "+-cv(o.clientWidth-(s+d))+"px "+-cv(o.clientHeight-(c+f))+"px "+-cv(s)+"px",threshold:ao(0,Ja(1,u))||1};let h=!0;function m(e){const t=e[0].intersectionRatio;if(t!==u){if(!h)return a();t?a(!1,t):n=setTimeout((()=>{a(!1,1e-7)}),100)}h=!1}try{r=new IntersectionObserver(m,{...p,root:o.ownerDocument})}catch{r=new IntersectionObserver(m,p)}r.observe(e)}(!0),i}function nz(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:u=!1}=r,s=j_(e),c=o||i?[...s?Nd(s):[],...Nd(t)]:[];c.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=s&&l?tz(s,n):null;let f=-1,p=null;a&&(p=new ResizeObserver((e=>{let[r]=e;r&&r.target===s&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{var e;null==(e=p)||e.observe(t)}))),n()})),s&&!u&&p.observe(s),p.observe(t));let h,m=u?hl(e):null;return u&&function t(){const r=hl(e);m&&(r.x!==m.x||r.y!==m.y||r.width!==m.width||r.height!==m.height)&&n(),m=r,h=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=p)||e.disconnect(),p=null,u&&cancelAnimationFrame(h)}}const rz=Iq,oz=Oq,iz=Mq,az=Aq,G2=Tq,sz=kq,lz=(e,t,n)=>{const r=new Map,o={platform:ez,...n},i={...o.platform,_c:r};return Rq(e,t,{...o,platform:i})};var yv=typeof document<"u"?tc:We;function Dv(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!Dv(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||Dv(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function RN(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function K2(e,t){const n=RN(e);return Math.round(t*n)/n}function ew(e){const t=P.useRef(e);return yv((()=>{t.current=e})),t}function uz(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:l=!0,whileElementsMounted:u,open:s}=e,[c,d]=P.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=P.useState(r);Dv(f,r)||p(r);const[h,m]=P.useState(null),[v,g]=P.useState(null),y=P.useCallback((e=>{e!==_.current&&(_.current=e,m(e))}),[]),b=P.useCallback((e=>{e!==k.current&&(k.current=e,g(e))}),[]),w=i||h,x=a||v,_=P.useRef(null),k=P.useRef(null),S=P.useRef(c),C=null!=u,E=ew(u),N=ew(o),O=ew(s),T=P.useCallback((()=>{if(!_.current||!k.current)return;const e={placement:t,strategy:n,middleware:f};N.current&&(e.platform=N.current),lz(_.current,k.current,e).then((e=>{const t={...e,isPositioned:!1!==O.current};R.current&&!Dv(S.current,t)&&(S.current=t,_i.flushSync((()=>{d(t)})))}))}),[f,t,n,N,O]);yv((()=>{!1===s&&S.current.isPositioned&&(S.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[s]);const R=P.useRef(!1);yv((()=>(R.current=!0,()=>{R.current=!1})),[]),yv((()=>{if(w&&(_.current=w),x&&(k.current=x),w&&x){if(E.current)return E.current(w,x,T);T()}}),[w,x,T,E,C]);const j=P.useMemo((()=>({reference:_,floating:k,setReference:y,setFloating:b})),[y,b]),D=P.useMemo((()=>({reference:w,floating:x})),[w,x]),z=P.useMemo((()=>{const e={position:n,left:0,top:0};if(!D.floating)return e;const t=K2(D.floating,c.x),r=K2(D.floating,c.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...RN(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,l,D.floating,c.x,c.y]);return P.useMemo((()=>({...c,update:T,refs:j,elements:D,floatingStyles:z})),[c,T,j,D,z])}const cz=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&function(e){return{}.hasOwnProperty.call(e,"current")}(n)?null!=n.current?G2({element:n.current,padding:r}).fn(t):{}:n?G2({element:n,padding:r}).fn(t):{}}}),fz=(e,t)=>({...Dq(e),options:[e,t]}),dz=(e,t)=>({...rz(e),options:[e,t]}),pz=(e,t)=>({...sz(e),options:[e,t]}),hz=(e,t)=>({...oz(e),options:[e,t]}),vz=(e,t)=>({...iz(e),options:[e,t]}),mz=(e,t)=>({...az(e),options:[e,t]}),gz=(e,t)=>({...cz(e),options:[e,t]}),TN="Popper",[ON,cc]=Sr(TN),[yz,AN]=ON(TN),bz=e=>{const{__scopePopper:t,children:n}=e,[r,o]=tt(null);return z(yz,{scope:t,anchor:r,onAnchorChange:o},n)},wz="PopperAnchor",xz=_e(((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=AN(wz,n),a=ke(null),l=Rt(t,a);return We((()=>{i.onAnchorChange((null==r?void 0:r.current)||a.current)})),r?null:z(it.div,fe({},o,{ref:l}))})),NN="PopperContent",[_z,cX]=ON(NN),$z=_e(((e,t)=>{var n,r,o,i,a,l,u,s;const{__scopePopper:c,side:d="bottom",sideOffset:f=0,align:p="center",alignOffset:h=0,arrowPadding:m=0,avoidCollisions:v=!0,collisionBoundary:g=[],collisionPadding:y=0,sticky:b="partial",hideWhenDetached:w=!1,updatePositionStrategy:x="optimized",onPlaced:_,...k}=e,P=AN(NN,c),[S,C]=tt(null),E=Rt(t,(e=>C(e))),[N,O]=tt(null),T=dm(N),R=null!==(n=null==T?void 0:T.width)&&void 0!==n?n:0,j=null!==(r=null==T?void 0:T.height)&&void 0!==r?r:0,D=d+("center"!==p?"-"+p:""),A="number"==typeof y?y:{top:0,right:0,bottom:0,left:0,...y},M=Array.isArray(g)?g:[g],L=M.length>0,I={padding:A,boundary:M.filter(Sz),altBoundary:L},{refs:F,floatingStyles:W,placement:B,isPositioned:U,middlewareData:$}=uz({strategy:"fixed",placement:D,whileElementsMounted:(...e)=>nz(...e,{animationFrame:"always"===x}),elements:{reference:P.anchor},middleware:[fz({mainAxis:f+j,alignmentAxis:h}),v&&dz({mainAxis:!0,crossAxis:!1,limiter:"partial"===b?pz():void 0,...I}),v&&hz({...I}),vz({...I,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${n}px`),a.setProperty("--radix-popper-available-height",`${r}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),N&&gz({element:N,padding:m}),Cz({arrowWidth:R,arrowHeight:j}),w&&mz({strategy:"referenceHidden",...I})]}),[H,V]=DN(B),K=Hr(_);fr((()=>{U&&(null==K||K())}),[U,K]);const q=null===(o=$.arrow)||void 0===o?void 0:o.x,G=null===(i=$.arrow)||void 0===i?void 0:i.y,Y=0!==(null===(a=$.arrow)||void 0===a?void 0:a.centerOffset),[X,Q]=tt();return fr((()=>{S&&Q(window.getComputedStyle(S).zIndex)}),[S]),z("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:U?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:X,"--radix-popper-transform-origin":[null===(l=$.transformOrigin)||void 0===l?void 0:l.x,null===(u=$.transformOrigin)||void 0===u?void 0:u.y].join(" ")},dir:e.dir},z(_z,{scope:c,placedSide:H,onArrowChange:O,arrowX:q,arrowY:G,shouldHideArrow:Y},z(it.div,fe({"data-side":H,"data-align":V},k,{ref:E,style:{...k.style,animation:U?void 0:"none",opacity:null!==(s=$.hide)&&void 0!==s&&s.referenceHidden?0:void 0}}))))}));function Sz(e){return null!==e}const Cz=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,a;const{placement:l,rects:u,middlewareData:s}=t,c=0!==(null===(n=s.arrow)||void 0===n?void 0:n.centerOffset),d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[p,h]=DN(l),m={start:"0%",center:"50%",end:"100%"}[h],v=(null!==(r=null===(o=s.arrow)||void 0===o?void 0:o.x)&&void 0!==r?r:0)+d/2,g=(null!==(i=null===(a=s.arrow)||void 0===a?void 0:a.y)&&void 0!==i?i:0)+f/2;let y="",b="";return"bottom"===p?(y=c?m:`${v}px`,b=-f+"px"):"top"===p?(y=c?m:`${v}px`,b=`${u.floating.height+f}px`):"right"===p?(y=-f+"px",b=c?m:`${g}px`):"left"===p&&(y=`${u.floating.width+f}px`,b=c?m:`${g}px`),{data:{x:y,y:b}}}});function DN(e){const[t,n="center"]=e.split("-");return[t,n]}const bm=bz,F_=xz,B_=$z,tw="rovingFocusGroup.onEntryFocus",Ez={bubbles:!1,cancelable:!0},q_="RovingFocusGroup",[bx,IN,Pz]=N_(q_),[Rz,fc]=Sr(q_,[Pz]),[Tz,Oz]=Rz(q_),Az=_e(((e,t)=>z(bx.Provider,{scope:e.__scopeRovingFocusGroup},z(bx.Slot,{scope:e.__scopeRovingFocusGroup},z(Nz,fe({},e,{ref:t})))))),Nz=_e(((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:s,...c}=e,d=ke(null),f=Rt(t,d),p=Gd(i),[h=null,m]=Vo({prop:a,defaultProp:l,onChange:u}),[v,g]=tt(!1),y=Hr(s),b=IN(n),w=ke(!1),[x,_]=tt(0);return We((()=>{const e=d.current;if(e)return e.addEventListener(tw,y),()=>e.removeEventListener(tw,y)}),[y]),z(Tz,{scope:n,orientation:r,dir:p,loop:o,currentTabStopId:h,onItemFocus:lt((e=>m(e)),[m]),onItemShiftTab:lt((()=>g(!0)),[]),onFocusableItemAdd:lt((()=>_((e=>e+1))),[]),onFocusableItemRemove:lt((()=>_((e=>e-1))),[])},z(it.div,fe({tabIndex:v||0===x?-1:0,"data-orientation":r},c,{ref:f,style:{outline:"none",...e.style},onMouseDown:ze(e.onMouseDown,(()=>{w.current=!0})),onFocus:ze(e.onFocus,(e=>{const t=!w.current;if(e.target===e.currentTarget&&t&&!v){const t=new CustomEvent(tw,Ez);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=b().filter((e=>e.focusable));kN([e.find((e=>e.active)),e.find((e=>e.id===h)),...e].filter(Boolean).map((e=>e.ref.current)))}}w.current=!1})),onBlur:ze(e.onBlur,(()=>g(!1)))})))})),Dz="RovingFocusGroupItem",Iz=_e(((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...a}=e,l=lo(),u=i||l,s=Oz(Dz,n),c=s.currentTabStopId===u,d=IN(n),{onFocusableItemAdd:f,onFocusableItemRemove:p}=s;return We((()=>{if(r)return f(),()=>p()}),[r,f,p]),z(bx.ItemSlot,{scope:n,id:u,focusable:r,active:o},z(it.span,fe({tabIndex:c?0:-1,"data-orientation":s.orientation},a,{ref:t,onMouseDown:ze(e.onMouseDown,(e=>{r?s.onItemFocus(u):e.preventDefault()})),onFocus:ze(e.onFocus,(()=>s.onItemFocus(u))),onKeyDown:ze(e.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void s.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=Lz(e,s.orientation,s.dir);if(void 0!==t){e.preventDefault();let n=d().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)n.reverse();else if("prev"===t||"next"===t){"prev"===t&&n.reverse();const r=n.indexOf(e.currentTarget);n=s.loop?jz(n,r+1):n.slice(r+1)}setTimeout((()=>kN(n)))}}))})))})),kz={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Mz(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}function Lz(e,t,n){const r=Mz(e.key,n);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)))return kz[r]}function kN(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function jz(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}const z_=Az,W_=Iz,wx=["Enter"," "],Fz=["ArrowDown","PageUp","Home"],MN=["ArrowUp","PageDown","End"],Bz=[...Fz,...MN],qz={ltr:[...wx,"ArrowRight"],rtl:[...wx,"ArrowLeft"]},zz={ltr:["ArrowLeft"],rtl:["ArrowRight"]},wm="Menu",[Dd,Wz,Uz]=N_(wm),[bl,LN]=Sr(wm,[Uz,cc,fc]),xm=cc(),jN=fc(),[FN,is]=bl(wm),[Hz,Yd]=bl(wm),Vz=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:i,modal:a=!0}=e,l=xm(t),[u,s]=tt(null),c=ke(!1),d=Hr(i),f=Gd(o);return We((()=>{const e=()=>{c.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>c.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})}}),[]),z(bm,l,z(FN,{scope:t,open:n,onOpenChange:d,content:u,onContentChange:s},z(Hz,{scope:t,onClose:lt((()=>d(!1)),[d]),isUsingKeyboardRef:c,dir:f,modal:a},r)))},BN=_e(((e,t)=>{const{__scopeMenu:n,...r}=e,o=xm(n);return z(F_,fe({},o,r,{ref:t}))})),qN="MenuPortal",[Gz,zN]=bl(qN,{forceMount:void 0}),Kz=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,i=is(qN,t);return z(Gz,{scope:t,forceMount:n},z(Ao,{present:n||i.open},z(Fx,{asChild:!0,container:o},r)))},Ho="MenuContent",[Yz,U_]=bl(Ho),Xz=_e(((e,t)=>{const n=zN(Ho,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=is(Ho,e.__scopeMenu),a=Yd(Ho,e.__scopeMenu);return z(Dd.Provider,{scope:e.__scopeMenu},z(Ao,{present:r||i.open},z(Dd.Slot,{scope:e.__scopeMenu},a.modal?z(Qz,fe({},o,{ref:t})):z(Zz,fe({},o,{ref:t})))))})),Qz=_e(((e,t)=>{const n=is(Ho,e.__scopeMenu),r=ke(null),o=Rt(t,r);return We((()=>{const e=r.current;if(e)return Kv(e)}),[]),z(H_,fe({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ze(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))})),Zz=_e(((e,t)=>{const n=is(Ho,e.__scopeMenu);return z(H_,fe({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))})),H_=_e(((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:l,onEntryFocus:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:h,...m}=e,v=is(Ho,n),g=Yd(Ho,n),y=xm(n),b=jN(n),w=Wz(n),[x,_]=tt(null),k=ke(null),P=Rt(t,k,v.onContentChange),S=ke(0),C=ke(""),E=ke(0),N=ke(null),O=ke("right"),T=ke(0),R=h?Gv:vl,j=h?{as:ll,allowPinchZoom:!0}:void 0;We((()=>()=>window.clearTimeout(S.current)),[]),Bx();const D=lt((e=>{var t,n;return O.current===(null===(t=N.current)||void 0===t?void 0:t.side)&&bW(e,null===(n=N.current)||void 0===n?void 0:n.area)}),[]);return z(Yz,{scope:n,searchRef:C,onItemEnter:lt((e=>{D(e)&&e.preventDefault()}),[D]),onItemLeave:lt((e=>{var t;D(e)||(null===(t=k.current)||void 0===t||t.focus(),_(null))}),[D]),onTriggerLeave:lt((e=>{D(e)&&e.preventDefault()}),[D]),pointerGraceTimerRef:E,onPointerGraceIntentChange:lt((e=>{N.current=e}),[])},z(R,j,z(jx,{asChild:!0,trapped:o,onMountAutoFocus:ze(i,(e=>{var t;e.preventDefault(),null===(t=k.current)||void 0===t||t.focus()})),onUnmountAutoFocus:a},z(Hv,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p},z(z_,fe({asChild:!0},b,{dir:g.dir,orientation:"vertical",loop:r,currentTabStopId:x,onCurrentTabStopIdChange:_,onEntryFocus:ze(u,(e=>{g.isUsingKeyboardRef.current||e.preventDefault()}))}),z(B_,fe({role:"menu","aria-orientation":"vertical","data-state":YN(v.open),"data-radix-menu-content":"",dir:g.dir},y,m,{ref:P,style:{outline:"none",...m.style},onKeyDown:ze(m.onKeyDown,(e=>{const 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&&(e=>{var t,n;const r=C.current+e,o=w().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=gW(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){C.current=t,window.clearTimeout(S.current),""!==t&&(S.current=window.setTimeout((()=>e("")),1e3))})(r),u&&setTimeout((()=>u.focus()))})(e.key));const o=k.current;if(e.target!==o||!Bz.includes(e.key))return;e.preventDefault();const i=w().filter((e=>!e.disabled)).map((e=>e.ref.current));MN.includes(e.key)&&i.reverse(),vW(i)})),onBlur:ze(e.onBlur,(e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(S.current),C.current="")})),onPointerMove:ze(e.onPointerMove,Id((e=>{const t=e.target,n=T.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>T.current?"right":"left";O.current=t,T.current=e.clientX}})))})))))))})),WN=_e(((e,t)=>{const{__scopeMenu:n,...r}=e;return z(it.div,fe({role:"group"},r,{ref:t}))})),Jz=_e(((e,t)=>{const{__scopeMenu:n,...r}=e;return z(it.div,fe({},r,{ref:t}))})),xx="MenuItem",Y2="menu.itemSelect",V_=_e(((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,i=ke(null),a=Yd(xx,e.__scopeMenu),l=U_(xx,e.__scopeMenu),u=Rt(t,i),s=ke(!1);return z(UN,fe({},o,{ref:u,disabled:n,onClick:ze(e.onClick,(()=>{const e=i.current;if(!n&&e){const t=new CustomEvent(Y2,{bubbles:!0,cancelable:!0});e.addEventListener(Y2,(e=>null==r?void 0:r(e)),{once:!0}),xT(e,t),t.defaultPrevented?s.current=!1:a.onClose()}})),onPointerDown:t=>{var n;null===(n=e.onPointerDown)||void 0===n||n.call(e,t),s.current=!0},onPointerUp:ze(e.onPointerUp,(e=>{var t;s.current||null===(t=e.currentTarget)||void 0===t||t.click()})),onKeyDown:ze(e.onKeyDown,(e=>{const t=""!==l.searchRef.current;n||t&&" "===e.key||wx.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}))}))})),UN=_e(((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...i}=e,a=U_(xx,n),l=jN(n),u=ke(null),s=Rt(t,u),[c,d]=tt(!1),[f,p]=tt("");return We((()=>{const e=u.current;var t;e&&p((null!==(t=e.textContent)&&void 0!==t?t:"").trim())}),[i.children]),z(Dd.ItemSlot,{scope:n,disabled:r,textValue:o??f},z(W_,fe({asChild:!0},l,{focusable:!r}),z(it.div,fe({role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},i,{ref:s,onPointerMove:ze(e.onPointerMove,Id((e=>{r?a.onItemLeave(e):(a.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus())}))),onPointerLeave:ze(e.onPointerLeave,Id((e=>a.onItemLeave(e)))),onFocus:ze(e.onFocus,(()=>d(!0))),onBlur:ze(e.onBlur,(()=>d(!1)))}))))})),eW=_e(((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return z(VN,{scope:e.__scopeMenu,checked:n},z(V_,fe({role:"menuitemcheckbox","aria-checked":Iv(n)?"mixed":n},o,{ref:t,"data-state":G_(n),onSelect:ze(o.onSelect,(()=>null==r?void 0:r(!!Iv(n)||!n)),{checkForDefaultPrevented:!1})})))})),tW="MenuRadioGroup",[nW,rW]=bl(tW,{value:void 0,onValueChange:()=>{}}),oW=_e(((e,t)=>{const{value:n,onValueChange:r,...o}=e,i=Hr(r);return z(nW,{scope:e.__scopeMenu,value:n,onValueChange:i},z(WN,fe({},o,{ref:t})))})),iW="MenuRadioItem",aW=_e(((e,t)=>{const{value:n,...r}=e,o=rW(iW,e.__scopeMenu),i=n===o.value;return z(VN,{scope:e.__scopeMenu,checked:i},z(V_,fe({role:"menuitemradio","aria-checked":i},r,{ref:t,"data-state":G_(i),onSelect:ze(r.onSelect,(()=>{var e;return null===(e=o.onValueChange)||void 0===e?void 0:e.call(o,n)}),{checkForDefaultPrevented:!1})})))})),HN="MenuItemIndicator",[VN,sW]=bl(HN,{checked:!1}),lW=_e(((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,i=sW(HN,n);return z(Ao,{present:r||Iv(i.checked)||!0===i.checked},z(it.span,fe({},o,{ref:t,"data-state":G_(i.checked)})))})),uW=_e(((e,t)=>{const{__scopeMenu:n,...r}=e;return z(it.div,fe({role:"separator","aria-orientation":"horizontal"},r,{ref:t}))})),GN="MenuSub",[cW,KN]=bl(GN),fW=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,i=is(GN,t),a=xm(t),[l,u]=tt(null),[s,c]=tt(null),d=Hr(o);return We((()=>(!1===i.open&&d(!1),()=>d(!1))),[i.open,d]),z(bm,a,z(FN,{scope:t,open:r,onOpenChange:d,content:s,onContentChange:c},z(cW,{scope:t,contentId:lo(),triggerId:lo(),trigger:l,onTriggerChange:u},n)))},fv="MenuSubTrigger",dW=_e(((e,t)=>{const n=is(fv,e.__scopeMenu),r=Yd(fv,e.__scopeMenu),o=KN(fv,e.__scopeMenu),i=U_(fv,e.__scopeMenu),a=ke(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:u}=i,s={__scopeMenu:e.__scopeMenu},c=lt((()=>{a.current&&window.clearTimeout(a.current),a.current=null}),[]);return We((()=>c),[c]),We((()=>{const e=l.current;return()=>{window.clearTimeout(e),u(null)}}),[l,u]),z(BN,fe({asChild:!0},s),z(UN,fe({id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":YN(n.open)},e,{ref:Uv(t,o.onTriggerChange),onClick:t=>{var r;null===(r=e.onClick)||void 0===r||r.call(e,t),!e.disabled&&!t.defaultPrevented&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:ze(e.onPointerMove,Id((t=>{i.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(i.onPointerGraceIntentChange(null),a.current=window.setTimeout((()=>{n.onOpenChange(!0),c()}),100))}))),onPointerLeave:ze(e.onPointerLeave,Id((e=>{var t;c();const r=null===(t=n.content)||void 0===t?void 0:t.getBoundingClientRect();if(r){var o;const t=null===(o=n.content)||void 0===o?void 0:o.dataset.side,a="right"===t,u=a?-5:5,s=r[a?"left":"right"],c=r[a?"right":"left"];i.onPointerGraceIntentChange({area:[{x:e.clientX+u,y:e.clientY},{x:s,y:r.top},{x:c,y:r.top},{x:c,y:r.bottom},{x:s,y:r.bottom}],side:t}),window.clearTimeout(l.current),l.current=window.setTimeout((()=>i.onPointerGraceIntentChange(null)),300)}else{if(i.onTriggerLeave(e),e.defaultPrevented)return;i.onPointerGraceIntentChange(null)}}))),onKeyDown:ze(e.onKeyDown,(t=>{const o=""!==i.searchRef.current;var a;e.disabled||o&&" "===t.key||!qz[r.dir].includes(t.key)||(n.onOpenChange(!0),null===(a=n.content)||void 0===a||a.focus(),t.preventDefault())}))})))})),pW="MenuSubContent",hW=_e(((e,t)=>{const n=zN(Ho,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=is(Ho,e.__scopeMenu),a=Yd(Ho,e.__scopeMenu),l=KN(pW,e.__scopeMenu),u=ke(null),s=Rt(t,u);return z(Dd.Provider,{scope:e.__scopeMenu},z(Ao,{present:r||i.open},z(Dd.Slot,{scope:e.__scopeMenu},z(H_,fe({id:l.contentId,"aria-labelledby":l.triggerId},o,{ref:s,align:"start",side:"rtl"===a.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{var t;a.isUsingKeyboardRef.current&&(null===(t=u.current)||void 0===t||t.focus()),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:ze(e.onFocusOutside,(e=>{e.target!==l.trigger&&i.onOpenChange(!1)})),onEscapeKeyDown:ze(e.onEscapeKeyDown,(e=>{a.onClose(),e.preventDefault()})),onKeyDown:ze(e.onKeyDown,(e=>{const t=e.currentTarget.contains(e.target),n=zz[a.dir].includes(e.key);var r;t&&n&&(i.onOpenChange(!1),null===(r=l.trigger)||void 0===r||r.focus(),e.preventDefault())}))})))))}));function YN(e){return e?"open":"closed"}function Iv(e){return"indeterminate"===e}function G_(e){return Iv(e)?"indeterminate":e?"checked":"unchecked"}function vW(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function mW(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}function gW(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,o=n?e.indexOf(n):-1;let i=mW(e,Math.max(o,0));1===r.length&&(i=i.filter((e=>e!==n)));const a=i.find((e=>e.toLowerCase().startsWith(r.toLowerCase())));return a!==n?a:void 0}function yW(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){const a=t[e].x,l=t[e].y,u=t[i].x,s=t[i].y;l>r!=s>r&&n<(u-a)*(r-l)/(s-l)+a&&(o=!o)}return o}function bW(e,t){if(!t)return!1;return yW({x:e.clientX,y:e.clientY},t)}function Id(e){return t=>"mouse"===t.pointerType?e(t):void 0}const wW=Vz,xW=BN,_W=Kz,$W=Xz,SW=WN,CW=Jz,EW=V_,PW=eW,RW=oW,TW=aW,OW=lW,AW=uW,NW=fW,DW=dW,IW=hW,XN="DropdownMenu",[kW,fX]=Sr(XN,[LN]),Pr=LN(),[MW,QN]=kW(XN),LW=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:i,onOpenChange:a,modal:l=!0}=e,u=Pr(t),s=ke(null),[c=!1,d]=Vo({prop:o,defaultProp:i,onChange:a});return z(MW,{scope:t,triggerId:lo(),triggerRef:s,contentId:lo(),open:c,onOpenChange:d,onOpenToggle:lt((()=>d((e=>!e))),[d]),modal:l},z(wW,fe({},u,{open:c,onOpenChange:d,dir:r,modal:l}),n))},jW="DropdownMenuTrigger",FW=_e(((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,i=QN(jW,n),a=Pr(n);return z(xW,fe({asChild:!0},a),z(it.button,fe({type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r},o,{ref:Uv(t,i.triggerRef),onPointerDown:ze(e.onPointerDown,(e=>{!r&&0===e.button&&!1===e.ctrlKey&&(i.onOpenToggle(),i.open||e.preventDefault())})),onKeyDown:ze(e.onKeyDown,(e=>{r||(["Enter"," "].includes(e.key)&&i.onOpenToggle(),"ArrowDown"===e.key&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())}))})))})),BW=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Pr(t);return z(_W,fe({},r,n))},qW="DropdownMenuContent",zW=_e(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=QN(qW,n),i=Pr(n),a=ke(!1);return z($W,fe({id:o.contentId,"aria-labelledby":o.triggerId},i,r,{ref:t,onCloseAutoFocus:ze(e.onCloseAutoFocus,(e=>{var t;a.current||null===(t=o.triggerRef.current)||void 0===t||t.focus(),a.current=!1,e.preventDefault()})),onInteractOutside:ze(e.onInteractOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;(!o.modal||r)&&(a.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)"}}))})),WW=_e(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pr(n);return z(SW,fe({},o,r,{ref:t}))})),UW=_e(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pr(n);return z(CW,fe({},o,r,{ref:t}))})),HW=_e(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pr(n);return z(EW,fe({},o,r,{ref:t}))})),VW=_e(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pr(n);return z(PW,fe({},o,r,{ref:t}))})),GW=_e(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pr(n);return z(RW,fe({},o,r,{ref:t}))})),KW=_e(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pr(n);return z(TW,fe({},o,r,{ref:t}))})),YW=_e(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pr(n);return z(OW,fe({},o,r,{ref:t}))})),XW=_e(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pr(n);return z(AW,fe({},o,r,{ref:t}))})),QW=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:i}=e,a=Pr(t),[l=!1,u]=Vo({prop:r,defaultProp:i,onChange:o});return z(NW,fe({},a,{open:l,onOpenChange:u}),n)},ZW=_e(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pr(n);return z(DW,fe({},o,r,{ref:t}))})),JW=_e(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pr(n);return z(IW,fe({},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)"}}))})),eU=LW,tU=FW,ZN=BW,JN=zW,nU=WW,e3=UW,t3=HW,n3=VW,rU=GW,r3=KW,oU=YW,K_=XW,iU=QW,o3=ZW,i3=JW,dX=eU,pX=tU,hX=nU,vX=ZN,mX=iU,gX=rU,aU=P.forwardRef((({className:e,inset:t,children:n,...r},o)=>k.jsxs(o3,{ref:o,className:se("flex cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[n,k.jsx(fT,{className:"ml-auto h-4 w-4"})]})));aU.displayName=o3.displayName;const sU=P.forwardRef((({className:e,...t},n)=>k.jsx(i3,{ref:n,className:se("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t})));sU.displayName=i3.displayName;const lU=P.forwardRef((({className:e,sideOffset:t=4,...n},r)=>k.jsx(ZN,{children:k.jsx(JN,{ref:r,sideOffset:t,className:se("z-[101] flex max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] flex-col gap-xxxs overflow-y-auto rounded-lg border border-slate-200 bg-white p-xxs text-popover-foreground ","shadow-[0px_0px_12px_0px_rgba(0,0,0,0.08)] ","data-[state=open]:fade-in data-[state=open]:slide-in-from-top-2","data-[state=closed]:fade-out data-[state=closed]:slide-out-to-top-2","data-[state=closed]:duration-150 data-[state=open]:duration-150","data-[state=closed]:[animation-timing-function:ease-in] data-[state=open]:[animation-timing-function:ease-out]",e),...n})})));lU.displayName=JN.displayName;const uU=P.forwardRef((({className:e,inset:t,...n},r)=>k.jsx(t3,{ref:r,className:se("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs text-base font-medium text-slate-900 outline-none transition-colors hover:bg-slate-100 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-xl",e),...n})));uU.displayName=t3.displayName;const cU=P.forwardRef((({className:e,children:t,checked:n,checkboxPosition:r="right",...o},i)=>{const a=k.jsx(S_,{size:"default",variant:"default",checked:n});return k.jsxs(n3,{ref:i,className:se("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs text-base font-medium text-slate-900"," outline-none transition-colors hover:bg-slate-100 focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,onSelect:e=>e.preventDefault(),...o,children:["left"===r&&a,k.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:t}),"right"===r&&a]})}));cU.displayName=n3.displayName;const fU=P.forwardRef((({className:e,children:t,radioPosition:n="right",...r},o)=>{const i=k.jsx("div",{className:"flex h-xxs items-center justify-center",children:k.jsx(oU,{children:k.jsx(Nx,{size:20})})});return k.jsxs(r3,{ref:o,className:se("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs text-base font-medium text-slate-900"," outline-none transition-colors hover:bg-slate-100 focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),onSelect:e=>e.preventDefault(),...r,children:["left"===n&&i,k.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:t}),"right"===n&&i]})}));fU.displayName=r3.displayName;const dU=P.forwardRef((({className:e,inset:t,...n},r)=>k.jsx(e3,{ref:r,className:se("text-sm font-semibold",t&&"pl-xl",e),...n})));dU.displayName=e3.displayName;const pU=P.forwardRef((({className:e,...t},n)=>k.jsx(K_,{ref:n,className:se("-mx-1 my-1 h-px bg-muted",e),...t})));pU.displayName=K_.displayName;const hU=({className:e,...t})=>k.jsx("span",{className:se("ml-auto text-xs tracking-widest opacity-60",e),...t});hU.displayName="DropdownMenuShortcut";const vU=_e(((e,t)=>z(it.label,fe({},e,{ref:t,onMouseDown:t=>{var n;null===(n=e.onMouseDown)||void 0===n||n.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault()}})))),a3=vU,mU=Ji("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),s3=P.forwardRef((({className:e,...t},n)=>k.jsx(a3,{ref:n,className:se(mU(),e),...t})));function X2(e,[t,n]){return Math.min(n,Math.max(t,e))}s3.displayName=a3.displayName;const l3=_e(((e,t)=>z(it.span,fe({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})))),gU=l3,yU=[" ","Enter","ArrowUp","ArrowDown"],bU=[" ","Enter"],_m="Select",[$m,Sm,wU]=N_(_m),[dc,yX]=Sr(_m,[wU,cc]),Y_=cc(),[xU,wl]=dc(_m),[_U,$U]=dc(_m),SU=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:a,defaultValue:l,onValueChange:u,dir:s,name:c,autoComplete:d,disabled:f,required:p}=e,h=Y_(t),[m,v]=tt(null),[g,y]=tt(null),[b,w]=tt(!1),x=Gd(s),[_=!1,k]=Vo({prop:r,defaultProp:o,onChange:i}),[P,S]=Vo({prop:a,defaultProp:l,onChange:u}),C=ke(null),E=!m||!!m.closest("form"),[N,O]=tt(new Set),T=Array.from(N).map((e=>e.props.value)).join(";");return z(bm,h,z(xU,{required:p,scope:t,trigger:m,onTriggerChange:v,valueNode:g,onValueNodeChange:y,valueNodeHasChildren:b,onValueNodeHasChildrenChange:w,contentId:lo(),value:P,onValueChange:S,open:_,onOpenChange:k,dir:x,triggerPointerDownPosRef:C,disabled:f},z($m.Provider,{scope:t},z(_U,{scope:e.__scopeSelect,onNativeOptionAdd:lt((e=>{O((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:lt((e=>{O((t=>{const n=new Set(t);return n.delete(e),n}))}),[])},n)),E?z(p3,{key:T,"aria-hidden":!0,required:p,tabIndex:-1,name:c,autoComplete:d,value:P,onChange:e=>S(e.target.value),disabled:f},void 0===P?z("option",{value:""}):null,Array.from(N)):null))},CU="SelectTrigger",EU=_e(((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=Y_(n),a=wl(CU,n),l=a.disabled||r,u=Rt(t,a.onTriggerChange),s=Sm(n),[c,d,f]=h3((e=>{const t=s().filter((e=>!e.disabled)),n=t.find((e=>e.value===a.value)),r=v3(t,e,n);void 0!==r&&a.onValueChange(r.value)})),p=()=>{l||(a.onOpenChange(!0),f())};return z(F_,fe({asChild:!0},i),z(it.button,fe({type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":d3(a.value)?"":void 0},o,{ref:u,onClick:ze(o.onClick,(e=>{e.currentTarget.focus()})),onPointerDown:ze(o.onPointerDown,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&(p(),a.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)},e.preventDefault())})),onKeyDown:ze(o.onKeyDown,(e=>{const t=""!==c.current;!(e.ctrlKey||e.altKey||e.metaKey)&&1===e.key.length&&d(e.key),(!t||" "!==e.key)&&yU.includes(e.key)&&(p(),e.preventDefault())}))})))})),PU="SelectValue",RU=_e(((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:a="",...l}=e,u=wl(PU,n),{onValueNodeHasChildrenChange:s}=u,c=void 0!==i,d=Rt(t,u.onValueNodeChange);return fr((()=>{s(c)}),[s,c]),z(it.span,fe({},l,{ref:d,style:{pointerEvents:"none"}}),d3(u.value)?z(vl,null,a):i)})),TU=_e(((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return z(it.span,fe({"aria-hidden":!0},o,{ref:t}),r||"▼")})),OU=e=>z(Fx,fe({asChild:!0},e)),Zu="SelectContent",AU=_e(((e,t)=>{const n=wl(Zu,e.__scopeSelect),[r,o]=tt();if(fr((()=>{o(new DocumentFragment)}),[]),!n.open){const t=r;return t?_i.createPortal(z(u3,{scope:e.__scopeSelect},z($m.Slot,{scope:e.__scopeSelect},z("div",null,e.children))),t):null}return z(NU,fe({},e,{ref:t}))})),Gi=10,[u3,xl]=dc(Zu),NU=_e(((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:a,side:l,sideOffset:u,align:s,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:h,hideWhenDetached:m,avoidCollisions:v,...g}=e,y=wl(Zu,n),[b,w]=tt(null),[x,_]=tt(null),k=Rt(t,(e=>w(e))),[P,S]=tt(null),[C,E]=tt(null),N=Sm(n),[O,T]=tt(!1),R=ke(!1);We((()=>{if(b)return Kv(b)}),[b]),Bx();const j=lt((e=>{const[t,...n]=N().map((e=>e.ref.current)),[r]=n.slice(-1),o=document.activeElement;for(const n of e)if(n===o||(null==n||n.scrollIntoView({block:"nearest"}),n===t&&x&&(x.scrollTop=0),n===r&&x&&(x.scrollTop=x.scrollHeight),null==n||n.focus(),document.activeElement!==o))return}),[N,x]),D=lt((()=>j([P,b])),[j,P,b]);We((()=>{O&&D()}),[O,D]);const{onOpenChange:A,triggerPointerDownPosRef:M}=y;We((()=>{if(b){let e={x:0,y:0};const t=t=>{var n,r,o,i;e={x:Math.abs(Math.round(t.pageX)-(null!==(n=null===(r=M.current)||void 0===r?void 0:r.x)&&void 0!==n?n:0)),y:Math.abs(Math.round(t.pageY)-(null!==(o=null===(i=M.current)||void 0===i?void 0:i.y)&&void 0!==o?o:0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():b.contains(n.target)||A(!1),document.removeEventListener("pointermove",t),M.current=null};return null!==M.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}}),[b,A,M]),We((()=>{const e=()=>A(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[A]);const[L,I]=h3((e=>{const t=N().filter((e=>!e.disabled)),n=t.find((e=>e.ref.current===document.activeElement)),r=v3(t,e,n);r&&setTimeout((()=>r.ref.current.focus()))})),F=lt(((e,t,n)=>{const r=!R.current&&!n;(void 0!==y.value&&y.value===t||r)&&(S(e),r&&(R.current=!0))}),[y.value]),W=lt((()=>null==b?void 0:b.focus()),[b]),B=lt(((e,t,n)=>{const r=!R.current&&!n;(void 0!==y.value&&y.value===t||r)&&E(e)}),[y.value]),U="popper"===r?Q2:DU,$=U===Q2?{side:l,sideOffset:u,align:s,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:h,hideWhenDetached:m,avoidCollisions:v}:{};return z(u3,{scope:n,content:b,viewport:x,onViewportChange:_,itemRefCallback:F,selectedItem:P,onItemLeave:W,itemTextRefCallback:B,focusSelectedItem:D,selectedItemText:C,position:r,isPositioned:O,searchRef:L},z(Gv,{as:ll,allowPinchZoom:!0},z(jx,{asChild:!0,trapped:y.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:ze(o,(e=>{var t;null===(t=y.trigger)||void 0===t||t.focus({preventScroll:!0}),e.preventDefault()}))},z(Hv,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>y.onOpenChange(!1)},z(U,fe({role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:e=>e.preventDefault()},g,$,{onPlaced:()=>T(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:ze(g.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),!t&&1===e.key.length&&I(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=N().filter((e=>!e.disabled)).map((e=>e.ref.current));if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout((()=>j(t))),e.preventDefault()}}))}))))))})),DU=_e(((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=wl(Zu,n),a=xl(Zu,n),[l,u]=tt(null),[s,c]=tt(null),d=Rt(t,(e=>c(e))),f=Sm(n),p=ke(!1),h=ke(!0),{viewport:m,selectedItem:v,selectedItemText:g,focusSelectedItem:y}=a,b=lt((()=>{if(i.trigger&&i.valueNode&&l&&s&&m&&v&&g){const e=i.trigger.getBoundingClientRect(),t=s.getBoundingClientRect(),n=i.valueNode.getBoundingClientRect(),o=g.getBoundingClientRect();if("rtl"!==i.dir){const r=o.left-t.left,i=n.left-r,a=e.left-i,u=e.width+a,s=Math.max(u,t.width),c=window.innerWidth-Gi,d=X2(i,[Gi,c-s]);l.style.minWidth=u+"px",l.style.left=d+"px"}else{const r=t.right-o.right,i=window.innerWidth-n.right-r,a=window.innerWidth-e.right-i,u=e.width+a,s=Math.max(u,t.width),c=window.innerWidth-Gi,d=X2(i,[Gi,c-s]);l.style.minWidth=u+"px",l.style.right=d+"px"}const a=f(),u=window.innerHeight-2*Gi,c=m.scrollHeight,d=window.getComputedStyle(s),h=parseInt(d.borderTopWidth,10),y=parseInt(d.paddingTop,10),b=parseInt(d.borderBottomWidth,10),w=h+y+c+parseInt(d.paddingBottom,10)+b,x=Math.min(5*v.offsetHeight,w),_=window.getComputedStyle(m),k=parseInt(_.paddingTop,10),P=parseInt(_.paddingBottom,10),S=e.top+e.height/2-Gi,C=u-S,E=v.offsetHeight/2,N=h+y+(v.offsetTop+E),O=w-N;if(N<=S){const e=v===a[a.length-1].ref.current;l.style.bottom="0px";const t=s.clientHeight-m.offsetTop-m.offsetHeight,n=N+Math.max(C,E+(e?P:0)+t+b);l.style.height=n+"px"}else{const e=v===a[0].ref.current;l.style.top="0px";const t=Math.max(S,h+m.offsetTop+(e?k:0)+E)+O;l.style.height=t+"px",m.scrollTop=N-S+m.offsetTop}l.style.margin=`${Gi}px 0`,l.style.minHeight=x+"px",l.style.maxHeight=u+"px",null==r||r(),requestAnimationFrame((()=>p.current=!0))}}),[f,i.trigger,i.valueNode,l,s,m,v,g,i.dir,r]);fr((()=>b()),[b]);const[w,x]=tt();fr((()=>{s&&x(window.getComputedStyle(s).zIndex)}),[s]);const _=lt((e=>{e&&!0===h.current&&(b(),null==y||y(),h.current=!1)}),[b,y]);return z(IU,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:p,onScrollButtonChange:_},z("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w}},z(it.div,fe({},o,{ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}}))))})),Q2=_e(((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Gi,...i}=e,a=Y_(n);return z(B_,fe({},a,i,{ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))})),[IU,X_]=dc(Zu,{}),Z2="SelectViewport",kU=_e(((e,t)=>{const{__scopeSelect:n,...r}=e,o=xl(Z2,n),i=X_(Z2,n),a=Rt(t,o.onViewportChange),l=ke(0);return z(vl,null,z("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),z($m.Slot,{scope:n},z(it.div,fe({"data-radix-select-viewport":"",role:"presentation"},r,{ref:a,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:ze(r.onScroll,(e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=i;if(null!=r&&r.current&&n){const e=Math.abs(l.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*Gi,o=parseFloat(n.style.minHeight),i=parseFloat(n.style.height),a=Math.max(o,i);if(a<r){const o=a+e,i=Math.min(r,o),l=o-i;n.style.height=i+"px","0px"===n.style.bottom&&(t.scrollTop=l>0?l:0,n.style.justifyContent="flex-end")}}}l.current=t.scrollTop}))}))))})),MU="SelectGroup",[LU,jU]=dc(MU),FU=_e(((e,t)=>{const{__scopeSelect:n,...r}=e,o=lo();return z(LU,{scope:n,id:o},z(it.div,fe({role:"group","aria-labelledby":o},r,{ref:t})))})),BU="SelectLabel",qU=_e(((e,t)=>{const{__scopeSelect:n,...r}=e,o=jU(BU,n);return z(it.div,fe({id:o.id},r,{ref:t}))})),_x="SelectItem",[zU,c3]=dc(_x),WU=_e(((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...a}=e,l=wl(_x,n),u=xl(_x,n),s=l.value===r,[c,d]=tt(i??""),[f,p]=tt(!1),h=Rt(t,(e=>{var t;return null===(t=u.itemRefCallback)||void 0===t?void 0:t.call(u,e,r,o)})),m=lo(),v=()=>{o||(l.onValueChange(r),l.onOpenChange(!1))};if(""===r)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return z(zU,{scope:n,value:r,disabled:o,textId:m,isSelected:s,onItemTextChange:lt((e=>{d((t=>{var n;return t||(null!==(n=null==e?void 0:e.textContent)&&void 0!==n?n:"").trim()}))}),[])},z($m.ItemSlot,{scope:n,value:r,disabled:o,textValue:c},z(it.div,fe({role:"option","aria-labelledby":m,"data-highlighted":f?"":void 0,"aria-selected":s&&f,"data-state":s?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1},a,{ref:h,onFocus:ze(a.onFocus,(()=>p(!0))),onBlur:ze(a.onBlur,(()=>p(!1))),onPointerUp:ze(a.onPointerUp,v),onPointerMove:ze(a.onPointerMove,(e=>{var t;o?null===(t=u.onItemLeave)||void 0===t||t.call(u):e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:ze(a.onPointerLeave,(e=>{var t;e.currentTarget===document.activeElement&&(null===(t=u.onItemLeave)||void 0===t||t.call(u))})),onKeyDown:ze(a.onKeyDown,(e=>{var t;""!==(null===(t=u.searchRef)||void 0===t?void 0:t.current)&&" "===e.key||(bU.includes(e.key)&&v()," "===e.key&&e.preventDefault())}))}))))})),dv="SelectItemText",UU=_e(((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,a=wl(dv,n),l=xl(dv,n),u=c3(dv,n),s=$U(dv,n),[c,d]=tt(null),f=Rt(t,(e=>d(e)),u.onItemTextChange,(e=>{var t;return null===(t=l.itemTextRefCallback)||void 0===t?void 0:t.call(l,e,u.value,u.disabled)})),p=null==c?void 0:c.textContent,h=Ur((()=>z("option",{key:u.value,value:u.value,disabled:u.disabled},p)),[u.disabled,u.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:v}=s;return fr((()=>(m(h),()=>v(h))),[m,v,h]),z(vl,null,z(it.span,fe({id:u.textId},i,{ref:f})),u.isSelected&&a.valueNode&&!a.valueNodeHasChildren?_i.createPortal(i.children,a.valueNode):null)})),HU="SelectItemIndicator",VU=_e(((e,t)=>{const{__scopeSelect:n,...r}=e;return c3(HU,n).isSelected?z(it.span,fe({"aria-hidden":!0},r,{ref:t})):null})),J2="SelectScrollUpButton",GU=_e(((e,t)=>{const n=xl(J2,e.__scopeSelect),r=X_(J2,e.__scopeSelect),[o,i]=tt(!1),a=Rt(t,r.onScrollButtonChange);return fr((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollTop>0;i(e)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),o?z(f3,fe({},e,{ref:a,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}})):null})),eR="SelectScrollDownButton",KU=_e(((e,t)=>{const n=xl(eR,e.__scopeSelect),r=X_(eR,e.__scopeSelect),[o,i]=tt(!1),a=Rt(t,r.onScrollButtonChange);return fr((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;i(n)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),o?z(f3,fe({},e,{ref:a,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}})):null})),f3=_e(((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=xl("SelectScrollButton",n),a=ke(null),l=Sm(n),u=lt((()=>{null!==a.current&&(window.clearInterval(a.current),a.current=null)}),[]);return We((()=>()=>u()),[u]),fr((()=>{var e;const t=l().find((e=>e.ref.current===document.activeElement));null==t||null===(e=t.ref.current)||void 0===e||e.scrollIntoView({block:"nearest"})}),[l]),z(it.div,fe({"aria-hidden":!0},o,{ref:t,style:{flexShrink:0,...o.style},onPointerDown:ze(o.onPointerDown,(()=>{null===a.current&&(a.current=window.setInterval(r,50))})),onPointerMove:ze(o.onPointerMove,(()=>{var e;null===(e=i.onItemLeave)||void 0===e||e.call(i),null===a.current&&(a.current=window.setInterval(r,50))})),onPointerLeave:ze(o.onPointerLeave,(()=>{u()}))}))})),YU=_e(((e,t)=>{const{__scopeSelect:n,...r}=e;return z(it.div,fe({"aria-hidden":!0},r,{ref:t}))}));function d3(e){return""===e||void 0===e}const p3=_e(((e,t)=>{const{value:n,...r}=e,o=ke(null),i=Rt(t,o),a=fm(n);return We((()=>{const e=o.current,t=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(a!==n&&r){const t=new Event("change",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}}),[a,n]),z(l3,{asChild:!0},z("select",fe({},r,{ref:i,defaultValue:n})))}));function h3(e){const t=Hr(e),n=ke(""),r=ke(0),o=lt((e=>{const o=n.current+e;t(o),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout((()=>e("")),1e3))}(o)}),[t]),i=lt((()=>{n.current="",window.clearTimeout(r.current)}),[]);return We((()=>()=>window.clearTimeout(r.current)),[]),[n,o,i]}function v3(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,o=n?e.indexOf(n):-1;let i=XU(e,Math.max(o,0));1===r.length&&(i=i.filter((e=>e!==n)));const a=i.find((e=>e.textValue.toLowerCase().startsWith(r.toLowerCase())));return a!==n?a:void 0}function XU(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}p3.displayName="BubbleSelect";const m3=SU,g3=EU,y3=RU,QU=TU,ZU=OU,b3=AU,JU=kU,w3=FU,x3=qU,_3=WU,eH=UU,tH=VU,$3=GU,S3=KU,C3=YU,nH=m3,E3=P.forwardRef((({...e},t)=>k.jsx(nH,{ref:t,...e})));E3.displayName=m3.displayName;const P3=P.forwardRef(((e,t)=>k.jsx(w3,{ref:t,...e})));P3.displayName=w3.displayName;const R3=P.forwardRef(((e,t)=>k.jsx(y3,{ref:t,...e})));R3.displayName=y3.displayName;const Q_=P.forwardRef((({className:e,children:t,caption:n,error:r,icon:o,...i},a)=>k.jsxs("div",{className:"w-full",children:[k.jsxs(g3,{ref:a,className:se("flex h-l w-full items-center justify-between rounded-m border bg-background p-xxs text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-slate-700 focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50",r?"border-red-500":"border-input",e),...i,children:[k.jsxs("div",{className:"flex flex-1 items-center gap-xxs",children:[o&&k.jsx("span",{className:se("text-muted-foreground",{"text-red-dark":r}),children:o}),t]}),k.jsx(QU,{asChild:!0,children:k.jsx(uT,{size:20})})]}),n||r?r?k.jsxs("div",{className:"mt-xxs flex items-center gap-xxxs text-sm text-red-600",children:[k.jsx(pT,{size:16}),r]}):k.jsxs("div",{className:"mt-xxs flex items-center gap-xxxs text-sm text-muted-foreground",children:[k.jsx($M,{size:16}),n]}):null]})));Q_.displayName="SelectTriggerWrapper";const T3=P.forwardRef((({className:e,children:t,caption:n,error:r,icon:o,...i},a)=>k.jsx(Q_,{ref:a,className:se("[&>span]:line-clamp-1 [&>span]:text-left",e),caption:n,error:r,icon:o,...i,children:t})));T3.displayName=g3.displayName;const O3=P.forwardRef((({className:e,children:t,position:n="popper",...r},o)=>{const i=P.useMemo((()=>{const e=t=>{var n,r;if(!t)return!1;if(Array.isArray(t))return t.some(e);if(P.isValidElement(t)){const o=null==(n=t.type)?void 0:n.displayName;return"SelectActions"===o||"SelectFooter"===o||e(null==(r=t.props)?void 0:r.children)}return!1};return e(t)}),[t]);return k.jsx(ZU,{children:k.jsx(b3,{ref:o,className:se("z-[101] flex max-h-[var(--radix-select-content-available-height)] min-w-[8rem] flex-col rounded-lg border border-slate-200 bg-white text-popover-foreground","shadow-[0px_0px_12px_0px_rgba(0,0,0,0.08)]","data-[state=open]:animate-in data-[state=closed]:animate-out ","data-[state=open]:fade-in data-[state=open]:slide-in-from-top-2 ","data-[state=closed]:fade-out data-[state=closed]:slide-out-to-top-2 ","data-[state=closed]:duration-150 data-[state=open]:duration-150 ","data-[state=closed]:[animation-timing-function:ease-in] data-[state=open]:[animation-timing-function:ease-out]","popper"===n&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:k.jsx(JU,{className:se("flex flex-col gap-xxxs overflow-y-auto px-xxs",{"py-xxs":!i},"popper"===n&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})})}));O3.displayName=b3.displayName;const A3=P.forwardRef((({className:e,...t},n)=>k.jsx(x3,{ref:n,className:se("text-sm font-medium text-slate-900",e),...t})));A3.displayName=x3.displayName;const N3=P.forwardRef((({className:e,showCheck:t=!0,checkPosition:n="right",children:r,...o},i)=>{const a=k.jsx(tH,{children:k.jsx(Nx,{size:20})});return k.jsxs(_3,{ref:i,className:se("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs","text-base font-medium text-slate-900 outline-none transition-colors hover:bg-slate-100","focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[t&&"left"===n&&a,k.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:k.jsx(eH,{children:r})}),t&&"right"===n&&a]})}));N3.displayName=_3.displayName;const D3=P.forwardRef((({className:e,...t},n)=>k.jsx(C3,{ref:n,className:se("-mx-1 my-1 h-px bg-slate-200",e),...t})));D3.displayName=C3.displayName;const rH=(e,t)=>{const n=P.useRef(null),[r,o]=P.useState(e.length);return P.useLayoutEffect((()=>{if(!n.current||0===e.length)return void o(e.length);const r=n.current.offsetWidth-60,i=document.createElement("div");Object.assign(i.style,{position:"absolute",visibility:"hidden",whiteSpace:"nowrap",display:"flex",gap:"4px",top:"-9999px",left:"-9999px"}),document.body.appendChild(i);let a=0,l=0;for(const n of e){const e=document.createElement("div");e.className="gap-xxxs p-xxs flex cursor-pointer items-center rounded-sm bg-slate-100 text-sm font-medium text-slate-900";const o=document.createElement("span");if(o.textContent="string"==typeof n?n:n.value,e.appendChild(o),"string"!=typeof n&&n.avatar){const t=document.createElement("div");t.className="w-6 h-6 rounded-full bg-slate-300 flex-shrink-0",e.insertBefore(t,o)}if(t){const t=document.createElement("button");t.innerHTML="×",t.className="ml-1 rounded-full outline-none",e.appendChild(t)}i.appendChild(e);const u=e.offsetWidth+4;if(!(a+u<=r))break;a+=u,l++}document.body.removeChild(i),o(Math.max(1,l))}),[e,t]),{containerRef:n,visibleCount:r}},oH=P.forwardRef((({className:e,selectedValues:t=[],placeholder:n,onRemoveValue:r,icon:o,caption:i,error:a,...l},u)=>{const{containerRef:s,visibleCount:c}=rH(t,r),d=t.length-c;return k.jsx(Q_,{ref:u,className:e,caption:i,error:a,icon:o,...l,children:k.jsx("div",{ref:s,className:"flex w-full flex-1 flex-nowrap overflow-hidden",children:0===t.length?k.jsx("span",{children:n||"Select options..."}):k.jsxs(Mj,{children:[t.slice(0,c).map((e=>{const t="string"==typeof e?e:e.value;return k.jsx(_2,{avatarSrc:"string"==typeof e?void 0:e.avatar,text:t,onRemove:()=>null==r?void 0:r(t)},t)})),d>0&&k.jsx(_2,{text:`+${d}`})]})})})}));oH.displayName="SelectMultiTrigger";const iH=P.forwardRef((({value:e,isSelected:t=!1,isLoading:n=!1,checkboxPosition:r="right",onSelect:o,className:i,children:a,...l},u)=>{const s=n?k.jsx(dT,{size:24,className:"flex-shrink-0 animate-spin text-blue_100"}):k.jsx(S_,{size:"default",variant:"default",checked:t}),c=()=>{null==o||o(e)};return k.jsxs("div",{ref:u,className:se("relative flex cursor-pointer select-none items-center gap-xxs rounded-m","p-xxs text-base font-medium text-slate-900 outline-none transition-colors hover:bg-slate-100","focus:bg-accent focus:text-accent-foreground",{"pointer-events-none":n},i),onClick:c,role:"button",tabIndex:0,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),c())},...l,children:["left"===r&&s,k.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:a}),"right"===r&&s]})}));iH.displayName="SelectCheckboxItem";const aH=P.forwardRef((({className:e,...t},n)=>k.jsx($3,{ref:n,className:se("flex cursor-default items-center justify-center py-xxs",e),...t,children:k.jsx(bM,{size:16})})));aH.displayName=$3.displayName;const sH=P.forwardRef((({className:e,...t},n)=>k.jsx(S3,{ref:n,className:se("flex cursor-default items-center justify-center p-xxs",e),...t,children:k.jsx(uT,{size:16})})));sH.displayName=S3.displayName;const lH=P.forwardRef((({className:e,children:t,...n},r)=>k.jsx("div",{ref:r,className:se("sticky top-0 z-20 bg-white p-xxs",e),...n,children:t})));lH.displayName="SelectActions";const uH=P.forwardRef((({className:e,children:t,...n},r)=>k.jsx("div",{ref:r,className:se("sticky bottom-0 z-20 bg-white p-xxs",e),...n,children:t})));uH.displayName="SelectFooter";const bX=Jk,I3=P.createContext({}),wX=({...e})=>k.jsx(I3.Provider,{value:{name:e.name},children:k.jsx(eM,{...e})}),as=()=>{const e=P.useContext(I3),t=P.useContext(k3),n=tM();e||console.error("useFormContext must be used within a FormProvider");const{getFieldState:r,formState:o}=n,i=r(e.name,o);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:a}=t;return{id:a,name:e.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...i}},k3=P.createContext({}),cH=P.forwardRef((({className:e,...t},n)=>{const r=P.useId();return k.jsx(k3.Provider,{value:{id:r},children:k.jsx("div",{ref:n,className:se("mt-[8px]",e),...t})})}));cH.displayName="FormItem";const fH=P.forwardRef((({className:e,isRequired:t,...n},r)=>{var o;const{formItemId:i}=as();return k.jsx(s3,{ref:r,className:se("mb-2 text-sm font-medium",e),htmlFor:i,...n,children:t?`*${null==(o=n.children)?void 0:o.toString()}`:n.children})}));fH.displayName="FormLabel";const dH=P.forwardRef((({...e},t)=>{const{error:n,formItemId:r,formDescriptionId:o,formMessageId:i}=as();return k.jsx(os,{ref:t,id:r,"aria-describedby":n?`${o} ${i}`:`${o}`,"aria-invalid":!!n,...e})}));dH.displayName="FormControl";const pH=P.forwardRef((({className:e,...t},n)=>{const{formDescriptionId:r}=as();return k.jsx("p",{ref:n,id:r,className:se("text-sm text-muted-foreground",e),...t})}));pH.displayName="FormDescription";const hH=P.forwardRef((({className:e,children:t,...n},r)=>{const{error:o,formMessageId:i}=as(),a=o?String(null==o?void 0:o.message):t;return a?k.jsxs("p",{ref:r,id:i,className:se("flex items-center gap-1 pt-xxs text-sm text-red-dark",e),...n,children:[k.jsx(pT,{size:16,className:"text-red-dark"})," ",a]}):null}));hH.displayName="FormMessage";const vH=P.forwardRef((({...e},t)=>{const{name:n}=as();return k.jsx(E3,{ref:t,name:n,...e})}));vH.displayName="FormSelect";const mH=P.forwardRef((({className:e,children:t,...n},r)=>{const{formItemId:o}=as();return k.jsx(T3,{ref:r,id:o,className:e,...n,children:t})}));mH.displayName="FormSelectTrigger";const gH=P.forwardRef(((e,t)=>k.jsx(O3,{ref:t,...e})));gH.displayName="FormSelectContent";const yH=P.forwardRef(((e,t)=>k.jsx(N3,{ref:t,...e})));yH.displayName="FormSelectItem";const bH=P.forwardRef(((e,t)=>k.jsx(P3,{ref:t,...e})));bH.displayName="FormSelectGroup";const wH=P.forwardRef(((e,t)=>k.jsx(A3,{ref:t,...e})));wH.displayName="FormSelectLabel";const xH=P.forwardRef(((e,t)=>k.jsx(D3,{ref:t,...e})));xH.displayName="FormSelectSeparator";const _H=P.forwardRef(((e,t)=>k.jsx(R3,{ref:t,...e})));function Ro(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function M3(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>Qa(e)));return function(n){const r=(null==n?void 0:n[e])||t;return Ur((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=Qa(r),i=n.length;function a(t){const{scope:n,children:r,...a}=t,l=(null==n?void 0:n[e][i])||o,u=Ur((()=>a),Object.values(a));return z(l.Provider,{value:u},r)}return n=[...n,r],a.displayName=t+"Provider",[a,function(n,a){const l=(null==a?void 0:a[e][i])||o,u=ec(l);if(u)return u;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},$H(r,...t)]}function $H(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return Ur((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function pc(e){const t=ke(e);return We((()=>{t.current=e})),Ur((()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)}),[])}function SH({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=CH({defaultProp:t,onChange:n}),i=void 0!==e,a=i?e:r,l=pc(n);return[a,lt((t=>{if(i){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[i,e,o,l])]}function CH({defaultProp:e,onChange:t}){const n=tt(e),[r]=n,o=ke(r),i=pc(t);return We((()=>{o.current!==r&&(i(r),o.current=r)}),[r,o,i]),n}function EH(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function PH(...e){return t=>e.forEach((e=>EH(e,t)))}function RH(...e){return lt(PH(...e),e)}function _l(e){return e.split("-")[0]}function Xd(e){return e.split("-")[1]}function hc(e){return["top","bottom"].includes(_l(e))?"x":"y"}function Z_(e){return"y"===e?"height":"width"}function tR(e,t,n){let{reference:r,floating:o}=e;const i=r.x+r.width/2-o.width/2,a=r.y+r.height/2-o.height/2,l=hc(t),u=Z_(l),s=r[u]/2-o[u]/2,c="x"===l;let d;switch(_l(t)){case"top":d={x:i,y:r.y-o.height};break;case"bottom":d={x:i,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:a};break;case"left":d={x:r.x-o.width,y:a};break;default:d={x:r.x,y:r.y}}switch(Xd(t)){case"start":d[l]-=s*(n&&c?-1:1);break;case"end":d[l]+=s*(n&&c?-1:1)}return d}_H.displayName="FormSelectValue";const TH=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,l=await(null==a.isRTL?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:s,y:c}=tR(u,r,l),d=r,f={},p=0;for(let n=0;n<i.length;n++){const{name:h,fn:m}=i[n],{x:v,y:g,data:y,reset:b}=await m({x:s,y:c,initialPlacement:r,placement:d,strategy:o,middlewareData:f,rects:u,platform:a,elements:{reference:e,floating:t}});s=v??s,c=g??c,f={...f,[h]:{...f[h],...y}},b&&p<=50&&(p++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(u=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:s,y:c}=tR(u,d,l))),n=-1)}return{x:s,y:c,placement:d,strategy:o,middlewareData:f}};function L3(e){return"number"!=typeof e?(t=e,{top:0,right:0,bottom:0,left:0,...t}):{top:e,right:e,bottom:e,left:e};var t}function kv(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function kd(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:l,strategy:u}=e,{boundary:s="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=t,h=L3(p),m=l[f?"floating"===d?"reference":"floating":d],v=kv(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:s,rootBoundary:c,strategy:u})),g=kv(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===d?{...a.floating,x:r,y:o}:a.reference,offsetParent:await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),strategy:u}):a[d]);return{top:v.top-g.top+h.top,bottom:g.bottom-v.bottom+h.bottom,left:v.left-g.left+h.left,right:g.right-v.right+h.right}}const OH=Math.min,rl=Math.max;function $x(e,t,n){return rl(e,OH(t,n))}const nR=e=>({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:o,y:i,placement:a,rects:l,platform:u}=t;if(null==n)return{};const s=L3(r),c={x:o,y:i},d=hc(a),f=Xd(a),p=Z_(d),h=await u.getDimensions(n),m="y"===d?"top":"left",v="y"===d?"bottom":"right",g=l.reference[p]+l.reference[d]-c[d]-l.floating[p],y=c[d]-l.reference[d],b=await(null==u.getOffsetParent?void 0:u.getOffsetParent(n));let w=b?"y"===d?b.clientHeight||0:b.clientWidth||0:0;0===w&&(w=l.floating[p]);const x=g/2-y/2,_=s[m],k=w-h[p]-s[v],P=w/2-h[p]/2+x,S=$x(_,P,k),C=("start"===f?s[m]:s[v])>0&&P!==S&&l.reference[p]<=l.floating[p];return{[d]:c[d]-(C?P<_?_-P:k-P:0),data:{[d]:S,centerOffset:P-S}}}}),AH={left:"right",right:"left",bottom:"top",top:"bottom"};function Mv(e){return e.replace(/left|right|bottom|top/g,(e=>AH[e]))}function NH(e,t,n){void 0===n&&(n=!1);const r=Xd(e),o=hc(e),i=Z_(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Mv(a)),{main:a,cross:Mv(a)}}const DH={start:"end",end:"start"};function rR(e){return e.replace(/start|end/g,(e=>DH[e]))}const j3=["top","right","bottom","left"];j3.reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]);const IH=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:i,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:s=!0,crossAxis:c=!0,fallbackPlacements:d,fallbackStrategy:f="bestFit",flipAlignment:p=!0,...h}=e,m=_l(r),v=[a,...d||(m!==a&&p?function(e){const t=Mv(e);return[rR(e),t,rR(t)]}(a):[Mv(a)])],g=await kd(t,h),y=[];let b=(null==(n=o.flip)?void 0:n.overflows)||[];if(s&&y.push(g[m]),c){const{main:e,cross:t}=NH(r,i,await(null==l.isRTL?void 0:l.isRTL(u.floating)));y.push(g[e],g[t])}if(b=[...b,{placement:r,overflows:y}],!y.every((e=>e<=0))){var w,x;const e=(null!=(w=null==(x=o.flip)?void 0:x.index)?w:0)+1,t=v[e];if(t)return{data:{index:e,overflows:b},reset:{placement:t}};let n="bottom";switch(f){case"bestFit":{var _;const e=null==(_=b.map((e=>[e,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:_[0].placement;e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}};function oR(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function iR(e){return j3.some((t=>e[t]>=0))}const kH=function(e){let{strategy:t="referenceHidden",...n}=void 0===e?{}:e;return{name:"hide",async fn(e){const{rects:r}=e;switch(t){case"referenceHidden":{const t=oR(await kd(e,{...n,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:iR(t)}}}case"escaped":{const t=oR(await kd(e,{...n,altBoundary:!0}),r.floating);return{data:{escapedOffsets:t,escaped:iR(t)}}}default:return{}}}}},MH=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=_l(n),l=Xd(n),u="x"===hc(n),s=["left","top"].includes(a)?-1:1,c=i&&u?-1:1,d="function"==typeof t?t(e):t;let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return l&&"number"==typeof h&&(p="end"===l?-1*h:h),u?{x:p*c,y:f*s}:{x:f*s,y:p*c}}(t,e);return{x:n+o.x,y:r+o.y,data:o}}}};function F3(e){return"x"===e?"y":"x"}const LH=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...u}=e,s={x:n,y:r},c=await kd(t,u),d=hc(_l(o)),f=F3(d);let p=s[d],h=s[f];if(i){const e="y"===d?"bottom":"right";p=$x(p+c["y"===d?"top":"left"],p,p-c[e])}if(a){const e="y"===f?"bottom":"right";h=$x(h+c["y"===f?"top":"left"],h,h-c[e])}const m=l.fn({...t,[d]:p,[f]:h});return{...m,data:{x:m.x-n,y:m.y-r}}}}},jH=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:l=0,mainAxis:u=!0,crossAxis:s=!0}=e,c={x:n,y:r},d=hc(o),f=F3(d);let p=c[d],h=c[f];const m="function"==typeof l?l({...i,placement:o}):l,v="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(u){const e="y"===d?"height":"width",t=i.reference[d]-i.floating[e]+v.mainAxis,n=i.reference[d]+i.reference[e]-v.mainAxis;p<t?p=t:p>n&&(p=n)}if(s){var g,y,b,w;const e="y"===d?"width":"height",t=["top","left"].includes(_l(o)),n=i.reference[f]-i.floating[e]+(t&&null!=(g=null==(y=a.offset)?void 0:y[f])?g:0)+(t?0:v.crossAxis),r=i.reference[f]+i.reference[e]+(t?0:null!=(b=null==(w=a.offset)?void 0:w[f])?b:0)-(t?v.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[d]:p,[f]:h}}}},FH=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a,...l}=e,u=await kd(t,l),s=_l(n),c=Xd(n);let d,f;"top"===s||"bottom"===s?(d=s,f=c===(await(null==o.isRTL?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(f=s,d="end"===c?"top":"bottom");const p=rl(u.left,0),h=rl(u.right,0),m=rl(u.top,0),v=rl(u.bottom,0),g={availableHeight:r.floating.height-(["left","right"].includes(n)?2*(0!==m||0!==v?m+v:rl(u.top,u.bottom)):u[d]),availableWidth:r.floating.width-(["top","bottom"].includes(n)?2*(0!==p||0!==h?p+h:rl(u.left,u.right)):u[f])},y=await o.getDimensions(i.floating);null==a||a({...t,...g});const b=await o.getDimensions(i.floating);return y.width!==b.width||y.height!==b.height?{reset:{rects:!0}}:{}}}};function B3(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function oa(e){if(null==e)return window;if(!B3(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function Qd(e){return oa(e).getComputedStyle(e)}function Ki(e){return B3(e)?"":e?(e.nodeName||"").toLowerCase():""}function q3(){const e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function xi(e){return e instanceof oa(e).HTMLElement}function rs(e){return e instanceof oa(e).Element}function J_(e){return!(typeof ShadowRoot>"u")&&(e instanceof oa(e).ShadowRoot||e instanceof ShadowRoot)}function Cm(e){const{overflow:t,overflowX:n,overflowY:r}=Qd(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function BH(e){return["table","td","th"].includes(Ki(e))}function aR(e){const t=/firefox/i.test(q3()),n=Qd(e);return"none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||["transform","perspective"].includes(n.willChange)||t&&"filter"===n.willChange||t&&!!n.filter&&"none"!==n.filter}function z3(){return!/^((?!chrome|android).)*safari/i.test(q3())}const sR=Math.min,xd=Math.max,Lv=Math.round;function Yi(e,t,n){var r,o,i,a;void 0===t&&(t=!1),void 0===n&&(n=!1);const l=e.getBoundingClientRect();let u=1,s=1;t&&xi(e)&&(u=e.offsetWidth>0&&Lv(l.width)/e.offsetWidth||1,s=e.offsetHeight>0&&Lv(l.height)/e.offsetHeight||1);const c=rs(e)?oa(e):window,d=!z3()&&n,f=(l.left+(d&&null!=(r=null==(o=c.visualViewport)?void 0:o.offsetLeft)?r:0))/u,p=(l.top+(d&&null!=(i=null==(a=c.visualViewport)?void 0:a.offsetTop)?i:0))/s,h=l.width/u,m=l.height/s;return{width:h,height:m,top:p,right:f+h,bottom:p+m,left:f,x:f,y:p}}function Xa(e){return(t=e,(t instanceof oa(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function Em(e){return rs(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function W3(e){return Yi(Xa(e)).left+Em(e).scrollLeft}function qH(e,t,n){const r=xi(t),o=Xa(t),i=Yi(e,r&&function(e){const t=Yi(e);return Lv(t.width)!==e.offsetWidth||Lv(t.height)!==e.offsetHeight}(t),"fixed"===n);let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==Ki(t)||Cm(o))&&(a=Em(t)),xi(t)){const e=Yi(t,!0);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=W3(o));return{x:i.left+a.scrollLeft-l.x,y:i.top+a.scrollTop-l.y,width:i.width,height:i.height}}function U3(e){return"html"===Ki(e)?e:e.assignedSlot||e.parentNode||(J_(e)?e.host:null)||Xa(e)}function lR(e){return xi(e)&&"fixed"!==getComputedStyle(e).position?e.offsetParent:null}function Sx(e){const t=oa(e);let n=lR(e);for(;n&&BH(n)&&"static"===getComputedStyle(n).position;)n=lR(n);return n&&("html"===Ki(n)||"body"===Ki(n)&&"static"===getComputedStyle(n).position&&!aR(n))?t:n||function(e){let t=U3(e);for(J_(t)&&(t=t.host);xi(t)&&!["html","body"].includes(Ki(t));){if(aR(t))return t;t=t.parentNode}return null}(e)||t}function uR(e){if(xi(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Yi(e);return{width:t.width,height:t.height}}function H3(e){const t=U3(e);return["html","body","#document"].includes(Ki(t))?e.ownerDocument.body:xi(t)&&Cm(t)?t:H3(t)}function jv(e,t){var n;void 0===t&&(t=[]);const r=H3(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=oa(r),a=o?[i].concat(i.visualViewport||[],Cm(r)?r:[]):r,l=t.concat(a);return o?l:l.concat(jv(a))}function cR(e,t,n){return"viewport"===t?kv(function(e,t){const n=oa(e),r=Xa(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,l=0,u=0;if(o){i=o.width,a=o.height;const e=z3();(e||!e&&"fixed"===t)&&(l=o.offsetLeft,u=o.offsetTop)}return{width:i,height:a,x:l,y:u}}(e,n)):rs(t)?function(e,t){const n=Yi(e,!1,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft;return{top:r,left:o,x:o,y:r,right:o+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}(t,n):kv(function(e){var t;const n=Xa(e),r=Em(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=xd(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=xd(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0);let l=-r.scrollLeft+W3(e);const u=-r.scrollTop;return"rtl"===Qd(o||n).direction&&(l+=xd(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:l,y:u}}(Xa(e)))}function zH(e){const t=jv(e),n=["absolute","fixed"].includes(Qd(e).position)&&xi(e)?Sx(e):e;return rs(n)?t.filter((e=>rs(e)&&function(e,t){const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&J_(n)){let n=t;do{if(n&&e===n)return!0;n=n.parentNode||n.host}while(n)}return!1}(e,n)&&"body"!==Ki(e))):[]}const WH={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?zH(t):[].concat(n),r],a=i[0],l=i.reduce(((e,n)=>{const r=cR(t,n,o);return e.top=xd(r.top,e.top),e.right=sR(r.right,e.right),e.bottom=sR(r.bottom,e.bottom),e.left=xd(r.left,e.left),e}),cR(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=xi(n),i=Xa(n);if(n===i)return t;let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==Ki(n)||Cm(i))&&(a=Em(n)),xi(n))){const e=Yi(n,!0);l.x=e.x+n.clientLeft,l.y=e.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+l.x,y:t.y-a.scrollTop+l.y}},isElement:rs,getDimensions:uR,getOffsetParent:Sx,getDocumentElement:Xa,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:qH(t,Sx(n),r),floating:{...uR(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===Qd(e).direction};function UH(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:l=!1}=r,u=o&&!l,s=i&&!l,c=u||s?[...rs(e)?jv(e):[],...jv(t)]:[];c.forEach((e=>{u&&e.addEventListener("scroll",n,{passive:!0}),s&&e.addEventListener("resize",n)}));let d,f=null;if(a){let r=!0;f=new ResizeObserver((()=>{r||n(),r=!1})),rs(e)&&!l&&f.observe(e),f.observe(t)}let p=l?Yi(e):null;return l&&function t(){const r=Yi(e);!p||r.x===p.x&&r.y===p.y&&r.width===p.width&&r.height===p.height||n(),p=r,d=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{u&&e.removeEventListener("scroll",n),s&&e.removeEventListener("resize",n)})),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(d)}}const HH=(e,t,n)=>TH(e,t,{platform:WH,...n});var Cx=typeof document<"u"?tc:We;function Ex(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;0!=r--;)if(!Ex(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||Ex(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function VH(e){const t=P.useRef(e);return Cx((()=>{t.current=e})),t}function GH(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:o}=void 0===e?{}:e;const i=P.useRef(null),a=P.useRef(null),l=VH(o),u=P.useRef(null),[s,c]=P.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[d,f]=P.useState(t);Ex(null==d?void 0:d.map((e=>{let{options:t}=e;return t})),null==t?void 0:t.map((e=>{let{options:t}=e;return t})))||f(t);const p=P.useCallback((()=>{!i.current||!a.current||HH(i.current,a.current,{middleware:d,placement:n,strategy:r}).then((e=>{h.current&&_i.flushSync((()=>{c(e)}))}))}),[d,n,r]);Cx((()=>{h.current&&p()}),[p]);const h=P.useRef(!1);Cx((()=>(h.current=!0,()=>{h.current=!1})),[]);const m=P.useCallback((()=>{if("function"==typeof u.current&&(u.current(),u.current=null),i.current&&a.current)if(l.current){const e=l.current(i.current,a.current,p);u.current=e}else p()}),[p,l]),v=P.useCallback((e=>{i.current=e,m()}),[m]),g=P.useCallback((e=>{a.current=e,m()}),[m]),y=P.useMemo((()=>({reference:i,floating:a})),[]);return P.useMemo((()=>({...s,update:p,refs:y,reference:v,floating:g})),[s,p,y,v,g])}const KH=e=>{const{element:t,padding:n}=e;return{name:"arrow",options:e,fn:e=>function(e){return Object.prototype.hasOwnProperty.call(e,"current")}(t)?null!=t.current?nR({element:t.current,padding:n}).fn(e):{}:t?nR({element:t,padding:n}).fn(e):{}}};function YH(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function XH(...e){return t=>e.forEach((e=>YH(e,t)))}const V3=_e(((e,t)=>{const{children:n,...r}=e,o=so.toArray(n),i=o.find(ZH);if(i){const e=i.props.children,n=o.map((t=>t===i?so.count(e)>1?so.only(null):Xi(e)?e.props.children:null:t));return z(Px,fe({},r,{ref:t}),Xi(e)?ml(e,void 0,n):null)}return z(Px,fe({},r,{ref:t}),n)}));V3.displayName="Slot";const Px=_e(((e,t)=>{const{children:n,...r}=e;return Xi(n)?ml(n,{...JH(r,n.props),ref:XH(t,n.ref)}):so.count(n)>1?so.only(null):null}));Px.displayName="SlotClone";const QH=({children:e})=>z(vl,null,e);function ZH(e){return Xi(e)&&e.type===QH}function JH(e,t){const n={...t};for(const r in t){const 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}}const eV=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ju=eV.reduce(((e,t)=>{const n=_e(((e,n)=>{const{asChild:r,...o}=e,i=r?V3:t;return We((()=>{window[Symbol.for("radix-ui")]=!0}),[]),z(i,fe({},o,{ref:n}))}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function tV(e,t){e&&_i.flushSync((()=>e.dispatchEvent(t)))}function nV(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function rV(...e){return t=>e.forEach((e=>nV(e,t)))}function G3(...e){return lt(rV(...e),e)}const al=null!=globalThis&&globalThis.document?tc:()=>{};function oV(e){const[t,n]=tt(void 0);return al((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t)||!t.length)return;const r=t[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;n({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}const K3="Popper",[e$,Y3]=M3(K3),[iV,X3]=e$(K3),aV=e=>{const{__scopePopper:t,children:n}=e,[r,o]=tt(null);return z(iV,{scope:t,anchor:r,onAnchorChange:o},n)},sV="PopperAnchor",lV=_e(((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=X3(sV,n),a=ke(null),l=G3(t,a);return We((()=>{i.onAnchorChange((null==r?void 0:r.current)||a.current)})),r?null:z(Ju.div,fe({},o,{ref:l}))})),Fv="PopperContent",[uV,xX]=e$(Fv),[cV,fV]=e$(Fv,{hasParent:!1,positionUpdateFns:new Set}),dV=_e(((e,t)=>{var n,r,o,i,a,l,u,s;const{__scopePopper:c,side:d="bottom",sideOffset:f=0,align:p="center",alignOffset:h=0,arrowPadding:m=0,collisionBoundary:v=[],collisionPadding:g=0,sticky:y="partial",hideWhenDetached:b=!1,avoidCollisions:w=!0,onPlaced:x,..._}=e,k=X3(Fv,c),[P,S]=tt(null),C=G3(t,(e=>S(e))),[E,N]=tt(null),O=oV(E),T=null!==(n=null==O?void 0:O.width)&&void 0!==n?n:0,R=null!==(r=null==O?void 0:O.height)&&void 0!==r?r:0,j=d+("center"!==p?"-"+p:""),D="number"==typeof g?g:{top:0,right:0,bottom:0,left:0,...g},A=Array.isArray(v)?v:[v],M=A.length>0,L={padding:D,boundary:A.filter(hV),altBoundary:M},{reference:I,floating:F,strategy:W,x:B,y:U,placement:$,middlewareData:H,update:V}=GH({strategy:"fixed",placement:j,whileElementsMounted:UH,middleware:[vV(),MH({mainAxis:f+R,alignmentAxis:h}),w?LH({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?jH():void 0,...L}):void 0,E?KH({element:E,padding:m}):void 0,w?IH({...L}):void 0,FH({...L,apply:({elements:e,availableWidth:t,availableHeight:n})=>{e.floating.style.setProperty("--radix-popper-available-width",`${t}px`),e.floating.style.setProperty("--radix-popper-available-height",`${n}px`)}}),mV({arrowWidth:T,arrowHeight:R}),b?kH({strategy:"referenceHidden"}):void 0].filter(pV)});al((()=>{I(k.anchor)}),[I,k.anchor]);const K=null!==B&&null!==U,[q,G]=Q3($),Y=pc(x);al((()=>{K&&(null==Y||Y())}),[K,Y]);const X=null===(o=H.arrow)||void 0===o?void 0:o.x,Q=null===(i=H.arrow)||void 0===i?void 0:i.y,Z=0!==(null===(a=H.arrow)||void 0===a?void 0:a.centerOffset),[J,ee]=tt();al((()=>{P&&ee(window.getComputedStyle(P).zIndex)}),[P]);const{hasParent:te,positionUpdateFns:ne}=fV(Fv,c),re=!te;tc((()=>{if(!re)return ne.add(V),()=>{ne.delete(V)}}),[re,ne,V]),al((()=>{re&&K&&Array.from(ne).reverse().forEach((e=>requestAnimationFrame(e)))}),[re,K,ne]);const oe={"data-side":q,"data-align":G,..._,ref:C,style:{..._.style,animation:K?void 0:"none",opacity:null!==(l=H.hide)&&void 0!==l&&l.referenceHidden?0:void 0}};return z("div",{ref:F,"data-radix-popper-content-wrapper":"",style:{position:W,left:0,top:0,transform:K?`translate3d(${Math.round(B)}px, ${Math.round(U)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:J,"--radix-popper-transform-origin":[null===(u=H.transformOrigin)||void 0===u?void 0:u.x,null===(s=H.transformOrigin)||void 0===s?void 0:s.y].join(" ")},dir:e.dir},z(uV,{scope:c,placedSide:q,onArrowChange:N,arrowX:X,arrowY:Q,shouldHideArrow:Z},re?z(cV,{scope:c,hasParent:!0,positionUpdateFns:ne},z(Ju.div,oe)):z(Ju.div,oe)))}));function pV(e){return void 0!==e}function hV(e){return null!==e}const vV=()=>({name:"anchorCssProperties",fn(e){const{rects:t,elements:n}=e,{width:r,height:o}=t.reference;return n.floating.style.setProperty("--radix-popper-anchor-width",`${r}px`),n.floating.style.setProperty("--radix-popper-anchor-height",`${o}px`),{}}}),mV=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,a;const{placement:l,rects:u,middlewareData:s}=t,c=0!==(null===(n=s.arrow)||void 0===n?void 0:n.centerOffset),d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[p,h]=Q3(l),m={start:"0%",center:"50%",end:"100%"}[h],v=(null!==(r=null===(o=s.arrow)||void 0===o?void 0:o.x)&&void 0!==r?r:0)+d/2,g=(null!==(i=null===(a=s.arrow)||void 0===a?void 0:a.y)&&void 0!==i?i:0)+f/2;let y="",b="";return"bottom"===p?(y=c?m:`${v}px`,b=-f+"px"):"top"===p?(y=c?m:`${v}px`,b=`${u.floating.height+f}px`):"right"===p?(y=-f+"px",b=c?m:`${g}px`):"left"===p&&(y=`${u.floating.width+f}px`,b=c?m:`${g}px`),{data:{x:y,y:b}}}});function Q3(e){const[t,n="center"]=e.split("-");return[t,n]}const gV=aV,yV=lV,bV=dV,wV=_e(((e,t)=>{var n;const{container:r=(null==globalThis||null===(n=globalThis.document)||void 0===n?void 0:n.body),...o}=e;return r?Mx.createPortal(z(Ju.div,fe({},o,{ref:t})),r):null}));function xV(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function _V(...e){return t=>e.forEach((e=>xV(e,t)))}function $V(...e){return lt(_V(...e),e)}function SV(e,t){return oT(((e,n)=>t[e][n]??e),e)}const t$=e=>{const{present:t,children:n}=e,r=CV(t),o="function"==typeof n?n({present:r.isPresent}):so.only(n),i=$V(r.ref,o.ref);return"function"==typeof n||r.isPresent?ml(o,{ref:i}):null};function CV(e){const[t,n]=tt(),r=ke({}),o=ke(e),i=ke("none"),a=e?"mounted":"unmounted",[l,u]=SV(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return We((()=>{const e=pv(r.current);i.current="mounted"===l?e:"none"}),[l]),al((()=>{const t=r.current,n=o.current;if(n!==e){const r=i.current,a=pv(t);e?u("MOUNT"):"none"===a||"none"===(null==t?void 0:t.display)?u("UNMOUNT"):u(n&&r!==a?"ANIMATION_OUT":"UNMOUNT"),o.current=e}}),[e,u]),al((()=>{if(t){const e=e=>{const n=pv(r.current).includes(e.animationName);e.target===t&&n&&_i.flushSync((()=>u("ANIMATION_END")))},n=e=>{e.target===t&&(i.current=pv(r.current))};return t.addEventListener("animationstart",n),t.addEventListener("animationcancel",e),t.addEventListener("animationend",e),()=>{t.removeEventListener("animationstart",n),t.removeEventListener("animationcancel",e),t.removeEventListener("animationend",e)}}u("ANIMATION_END")}),[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:lt((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}function pv(e){return(null==e?void 0:e.animationName)||"none"}function EV(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function PV(...e){return t=>e.forEach((e=>EV(e,t)))}function RV(...e){return lt(PV(...e),e)}function TV(e,t=(null==globalThis?void 0:globalThis.document)){const n=pc(e);We((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)}),[n,t])}t$.displayName="Presence";const Rx="dismissableLayer.update",OV="dismissableLayer.pointerDownOutside",AV="dismissableLayer.focusOutside";let fR;const NV=Qa({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),DV=_e(((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:l,onDismiss:u,...s}=e,c=ec(NV),[d,f]=tt(null),p=null!==(n=null==d?void 0:d.ownerDocument)&&void 0!==n?n:null==globalThis?void 0:globalThis.document,[,h]=tt({}),m=RV(t,(e=>f(e))),v=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=v.indexOf(g),b=d?v.indexOf(d):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,x=b>=y,_=IV((e=>{const t=e.target,n=[...c.branches].some((e=>e.contains(t)));!x||n||(null==i||i(e),null==l||l(e),e.defaultPrevented||null==u||u())}),p),k=kV((e=>{const t=e.target;[...c.branches].some((e=>e.contains(t)))||(null==a||a(e),null==l||l(e),e.defaultPrevented||null==u||u())}),p);return TV((e=>{b===c.layers.size-1&&(null==o||o(e),!e.defaultPrevented&&u&&(e.preventDefault(),u()))}),p),We((()=>{if(d)return r&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(fR=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),dR(),()=>{r&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=fR)}}),[d,p,r,c]),We((()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),dR())}),[d,c]),We((()=>{const e=()=>h({});return document.addEventListener(Rx,e),()=>document.removeEventListener(Rx,e)}),[]),z(Ju.div,fe({},s,{ref:m,style:{pointerEvents:w?x?"auto":"none":void 0,...e.style},onFocusCapture:Ro(e.onFocusCapture,k.onFocusCapture),onBlurCapture:Ro(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:Ro(e.onPointerDownCapture,_.onPointerDownCapture)}))}));function IV(e,t=(null==globalThis?void 0:globalThis.document)){const n=pc(e),r=ke(!1),o=ke((()=>{}));return We((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){Z3(OV,n,i,{discrete:!0})};const i={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}r.current=!1},i=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}function kV(e,t=(null==globalThis?void 0:globalThis.document)){const n=pc(e),r=ke(!1);return We((()=>{const e=e=>{e.target&&!r.current&&Z3(AV,n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function dR(){const e=new CustomEvent(Rx);document.dispatchEvent(e)}function Z3(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?tV(o,i):o.dispatchEvent(i)}let nw;const J3="HoverCard",[eD,_X]=M3(J3,[Y3]),n$=Y3(),[MV,Pm]=eD(J3),LV=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:o,onOpenChange:i,openDelay:a=700,closeDelay:l=300}=e,u=n$(t),s=ke(0),c=ke(0),d=ke(!1),f=ke(!1),[p=!1,h]=SH({prop:r,defaultProp:o,onChange:i}),m=lt((()=>{clearTimeout(c.current),s.current=window.setTimeout((()=>h(!0)),a)}),[a,h]),v=lt((()=>{clearTimeout(s.current),!d.current&&!f.current&&(c.current=window.setTimeout((()=>h(!1)),l))}),[l,h]),g=lt((()=>h(!1)),[h]);return We((()=>()=>{clearTimeout(s.current),clearTimeout(c.current)}),[]),z(MV,{scope:t,open:p,onOpenChange:h,onOpen:m,onClose:v,onDismiss:g,hasSelectionRef:d,isPointerDownOnContentRef:f},z(gV,u,n))},jV="HoverCardTrigger",FV=_e(((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=Pm(jV,n),i=n$(n);return z(yV,fe({asChild:!0},i),z(Ju.a,fe({"data-state":o.open?"open":"closed"},r,{ref:t,onPointerEnter:Ro(e.onPointerEnter,Bv(o.onOpen)),onPointerLeave:Ro(e.onPointerLeave,Bv(o.onClose)),onFocus:Ro(e.onFocus,o.onOpen),onBlur:Ro(e.onBlur,o.onClose),onTouchStart:Ro(e.onTouchStart,(e=>e.preventDefault()))})))})),tD="HoverCardPortal",[BV,qV]=eD(tD,{forceMount:void 0}),zV=e=>{const{__scopeHoverCard:t,forceMount:n,children:r,container:o}=e,i=Pm(tD,t);return z(BV,{scope:t,forceMount:n},z(t$,{present:n||i.open},z(wV,{asChild:!0,container:o},r)))},Tx="HoverCardContent",WV=_e(((e,t)=>{const n=qV(Tx,e.__scopeHoverCard),{forceMount:r=n.forceMount,...o}=e,i=Pm(Tx,e.__scopeHoverCard);return z(t$,{present:r||i.open},z(UV,fe({"data-state":i.open?"open":"closed"},o,{onPointerEnter:Ro(e.onPointerEnter,Bv(i.onOpen)),onPointerLeave:Ro(e.onPointerLeave,Bv(i.onClose)),ref:t})))})),UV=_e(((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,...l}=e,u=Pm(Tx,n),s=n$(n),c=ke(null),d=RH(t,c),[f,p]=tt(!1);return We((()=>{if(f){const e=document.body;return nw=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect="none",e.style.webkitUserSelect="none",()=>{e.style.userSelect=nw,e.style.webkitUserSelect=nw}}}),[f]),We((()=>{if(c.current){const e=()=>{p(!1),u.isPointerDownOnContentRef.current=!1,setTimeout((()=>{var e;""!==(null===(e=document.getSelection())||void 0===e?void 0:e.toString())&&(u.hasSelectionRef.current=!0)}))};return document.addEventListener("pointerup",e),()=>{document.removeEventListener("pointerup",e),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!1}}}),[u.isPointerDownOnContentRef,u.hasSelectionRef]),We((()=>{c.current&&HV(c.current).forEach((e=>e.setAttribute("tabindex","-1")))})),z(DV,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:a,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:Ro(i,(e=>{e.preventDefault()})),onDismiss:u.onDismiss},z(bV,fe({},s,l,{onPointerDown:Ro(l.onPointerDown,(e=>{e.currentTarget.contains(e.target)&&p(!0),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!0})),ref:d,style:{...l.style,userSelect:f?"text":void 0,WebkitUserSelect:f?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})))}));function Bv(e){return t=>"touch"===t.pointerType?void 0:e()}function HV(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}const VV=LV,GV=FV,KV=zV,nD=WV,$X=VV,SX=GV,CX=KV,YV=P.forwardRef((({className:e,align:t="center",sideOffset:n=4,...r},o)=>k.jsx(nD,{ref:o,align:t,sideOffset:n,className:se("z-50 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})));YV.displayName=nD.displayName;const rD=P.forwardRef((({className:e,type:t,...n},r)=>{const{error:o}=as();return k.jsx("input",{type:t,className:se("flex w-full rounded-m px-4 py-3.5 text-base text-slate-900 outline outline-1 outline-input ring-offset-background transition-all duration-200 ease-in-out file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-base placeholder:text-muted-foreground placeholder:text-slate-400 hover:outline-2 hover:outline-slate-400 focus-visible:bg-slate-50 focus-visible:text-slate-900 focus-visible:outline-2 focus-visible:outline-blue_120 disabled:cursor-not-allowed disabled:text-slate-300 disabled:outline-slate-200",{"bg-red_30_17 outline-red-dark":!!o},e),ref:r,...n})}));rD.displayName="Input";const oD="Radio",[XV,iD]=Sr(oD),[QV,ZV]=XV(oD),JV=_e(((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:i,disabled:a,value:l="on",onCheck:u,...s}=e,[c,d]=tt(null),f=Rt(t,(e=>d(e))),p=ke(!1),h=!c||!!c.closest("form");return z(QV,{scope:n,checked:o,disabled:a},z(it.button,fe({type:"button",role:"radio","aria-checked":o,"data-state":aD(o),"data-disabled":a?"":void 0,disabled:a,value:l},s,{ref:f,onClick:ze(e.onClick,(e=>{o||null==u||u(),h&&(p.current=e.isPropagationStopped(),p.current||e.stopPropagation())}))})),h&&z(nG,{control:c,bubbles:!p.current,name:r,value:l,checked:o,required:i,disabled:a,style:{transform:"translateX(-100%)"}}))})),eG="RadioIndicator",tG=_e(((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,i=ZV(eG,n);return z(Ao,{present:r||i.checked},z(it.span,fe({"data-state":aD(i.checked),"data-disabled":i.disabled?"":void 0},o,{ref:t})))})),nG=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=ke(null),a=fm(n),l=dm(t);return We((()=>{const e=i.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(a!==n&&o){const t=new Event("click",{bubbles:r});o.call(e,n),e.dispatchEvent(t)}}),[a,n,r]),z("input",fe({type:"radio","aria-hidden":!0,defaultChecked:n},o,{tabIndex:-1,ref:i,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function aD(e){return e?"checked":"unchecked"}const rG=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],sD="RadioGroup",[oG,EX]=Sr(sD,[fc,iD]),lD=fc(),uD=iD(),[iG,aG]=oG(sD),sG=_e(((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:i,required:a=!1,disabled:l=!1,orientation:u,dir:s,loop:c=!0,onValueChange:d,...f}=e,p=lD(n),h=Gd(s),[m,v]=Vo({prop:i,defaultProp:o,onChange:d});return z(iG,{scope:n,name:r,required:a,disabled:l,value:m,onValueChange:v},z(z_,fe({asChild:!0},p,{orientation:u,dir:h,loop:c}),z(it.div,fe({role:"radiogroup","aria-required":a,"aria-orientation":u,"data-disabled":l?"":void 0,dir:h},f,{ref:t}))))})),lG="RadioGroupItem",uG=_e(((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,i=aG(lG,n),a=i.disabled||r,l=lD(n),u=uD(n),s=ke(null),c=Rt(t,s),d=i.value===o.value,f=ke(!1);return We((()=>{const e=e=>{rG.includes(e.key)&&(f.current=!0)},t=()=>f.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}}),[]),z(W_,fe({asChild:!0},l,{focusable:!a,active:d}),z(JV,fe({disabled:a,required:i.required,checked:d},u,o,{name:i.name,ref:c,onCheck:()=>i.onValueChange(o.value),onKeyDown:ze((e=>{"Enter"===e.key&&e.preventDefault()})),onFocus:ze(o.onFocus,(()=>{var e;f.current&&(null===(e=s.current)||void 0===e||e.click())}))})))})),cG=_e(((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=uD(n);return z(tG,fe({},o,r,{ref:t}))})),cD=sG,fD=uG,fG=cG,dG=P.forwardRef((({className:e,...t},n)=>k.jsx(cD,{className:se("grid gap-2",e),...t,ref:n})));dG.displayName=cD.displayName;const pG=P.forwardRef((({className:e,...t},n)=>k.jsx(fD,{ref:n,className:se("aspect-square size-6 rounded-full border border-slate-300 disabled:cursor-not-allowed disabled:border-slate-100 disabled:bg-slate-100 data-[state=checked]:border-blue_100 data-[state=checked]:bg-blue_100 md:hover:border-2",e),...t,children:k.jsx(fG,{className:"flex items-center justify-center",children:k.jsx(xM,{className:"stack-animate size-2 border-none",style:{fill:t.disabled?"var(--slate-300)":"white",color:t.disabled?"var(--slate-300)":"white"}})})})));pG.displayName=fD.displayName;const hG=Yv,PX=Ux,RX=ic,vG=Xv,dD=P.forwardRef((({className:e,...t},n)=>k.jsx(rc,{className:se("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n})));dD.displayName=rc.displayName;const mG=Ji("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),pD=P.forwardRef((({side:e="right",className:t,overlayClassName:n,children:r,...o},i)=>k.jsxs(vG,{children:[k.jsx(dD,{className:se("bg-slate-900/70",n)}),k.jsxs(oc,{ref:i,className:se(mG({side:e}),t),...o,children:[r,k.jsxs(ic,{className:"absolute right-4 top-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[k.jsx(Dx,{className:"h-4 w-4"}),k.jsx("span",{className:"sr-only",children:"Close"})]})]})]})));pD.displayName=oc.displayName;const hD=({className:e,...t})=>k.jsx("div",{className:se("flex flex-col space-y-2 text-center sm:text-left",e),...t});hD.displayName="SheetHeader";const gG=({className:e,...t})=>k.jsx("div",{className:se("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});gG.displayName="SheetFooter";const vD=P.forwardRef((({className:e,...t},n)=>k.jsx(jd,{ref:n,className:se("text-lg font-semibold text-foreground",e),...t})));vD.displayName=jd.displayName;const mD=P.forwardRef((({className:e,...t},n)=>k.jsx(Fd,{ref:n,className:se("text-sm text-muted-foreground",e),...t})));mD.displayName=Fd.displayName;const[Rm,TX]=Sr("Tooltip",[cc]),r$=cc(),yG="TooltipProvider",bG=700,Ox="tooltip.open",[wG,o$]=Rm(yG),gD=e=>{const{__scopeTooltip:t,delayDuration:n=bG,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,[a,l]=tt(!0),u=ke(!1),s=ke(0);return We((()=>{const e=s.current;return()=>window.clearTimeout(e)}),[]),z(wG,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:lt((()=>{window.clearTimeout(s.current),l(!1)}),[]),onClose:lt((()=>{window.clearTimeout(s.current),s.current=window.setTimeout((()=>l(!0)),r)}),[r]),isPointerInTransitRef:u,onPointerInTransitChange:lt((e=>{u.current=e}),[]),disableHoverableContent:o},i)},i$="Tooltip",[xG,Tm]=Rm(i$),yD=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:a,delayDuration:l}=e,u=o$(i$,e.__scopeTooltip),s=r$(t),[c,d]=tt(null),f=lo(),p=ke(0),h=a??u.disableHoverableContent,m=l??u.delayDuration,v=ke(!1),[g=!1,y]=Vo({prop:r,defaultProp:o,onChange:e=>{e?(u.onOpen(),document.dispatchEvent(new CustomEvent(Ox))):u.onClose(),null==i||i(e)}}),b=Ur((()=>g?v.current?"delayed-open":"instant-open":"closed"),[g]),w=lt((()=>{window.clearTimeout(p.current),v.current=!1,y(!0)}),[y]),x=lt((()=>{window.clearTimeout(p.current),y(!1)}),[y]),_=lt((()=>{window.clearTimeout(p.current),p.current=window.setTimeout((()=>{v.current=!0,y(!0)}),m)}),[m,y]);return We((()=>()=>window.clearTimeout(p.current)),[]),z(bm,s,z(xG,{scope:t,contentId:f,open:g,stateAttribute:b,trigger:c,onTriggerChange:d,onTriggerEnter:lt((()=>{u.isOpenDelayed?_():w()}),[u.isOpenDelayed,_,w]),onTriggerLeave:lt((()=>{h?x():window.clearTimeout(p.current)}),[x,h]),onOpen:w,onClose:x,disableHoverableContent:h},n))},pR="TooltipTrigger",bD=_e(((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Tm(pR,n),i=o$(pR,n),a=r$(n),l=Rt(t,ke(null),o.onTriggerChange),u=ke(!1),s=ke(!1),c=lt((()=>u.current=!1),[]);return We((()=>()=>document.removeEventListener("pointerup",c)),[c]),z(F_,fe({asChild:!0},a),z(it.button,fe({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},r,{ref:l,onPointerMove:ze(e.onPointerMove,(e=>{"touch"!==e.pointerType&&!s.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),s.current=!0)})),onPointerLeave:ze(e.onPointerLeave,(()=>{o.onTriggerLeave(),s.current=!1})),onPointerDown:ze(e.onPointerDown,(()=>{u.current=!0,document.addEventListener("pointerup",c,{once:!0})})),onFocus:ze(e.onFocus,(()=>{u.current||o.onOpen()})),onBlur:ze(e.onBlur,o.onClose),onClick:ze(e.onClick,o.onClose)})))})),_G="TooltipPortal",[OX,$G]=Rm(_G,{forceMount:void 0}),Md="TooltipContent",wD=_e(((e,t)=>{const n=$G(Md,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,a=Tm(Md,e.__scopeTooltip);return z(Ao,{present:r||a.open},a.disableHoverableContent?z(xD,fe({side:o},i,{ref:t})):z(SG,fe({side:o},i,{ref:t})))})),SG=_e(((e,t)=>{const n=Tm(Md,e.__scopeTooltip),r=o$(Md,e.__scopeTooltip),o=ke(null),i=Rt(t,o),[a,l]=tt(null),{trigger:u,onClose:s}=n,c=o.current,{onPointerInTransitChange:d}=r,f=lt((()=>{l(null),d(!1)}),[d]),p=lt(((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},o=OG([...PG(r,EG(r,n.getBoundingClientRect())),...RG(t.getBoundingClientRect())]);l(o),d(!0)}),[d]);return We((()=>()=>f()),[f]),We((()=>{if(u&&c){const e=e=>p(e,c),t=e=>p(e,u);return u.addEventListener("pointerleave",e),c.addEventListener("pointerleave",t),()=>{u.removeEventListener("pointerleave",e),c.removeEventListener("pointerleave",t)}}}),[u,c,p,f]),We((()=>{if(a){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=(null==u?void 0:u.contains(t))||(null==c?void 0:c.contains(t)),o=!TG(n,a);r?f():o&&(f(),s())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[u,c,a,s,f]),z(xD,fe({},e,{ref:i}))})),[CG,AX]=Rm(i$,{isInside:!1}),xD=_e(((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...l}=e,u=Tm(Md,n),s=r$(n),{onClose:c}=u;return We((()=>(document.addEventListener(Ox,c),()=>document.removeEventListener(Ox,c))),[c]),We((()=>{if(u.trigger){const e=e=>{const t=e.target;null!=t&&t.contains(u.trigger)&&c()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}}),[u.trigger,c]),z(Hv,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:e=>e.preventDefault(),onDismiss:c},z(B_,fe({"data-state":u.stateAttribute},s,l,{ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),z(Lx,null,r),z(CG,{scope:n,isInside:!0},z(gU,{id:u.contentId,role:"tooltip"},o||r))))}));function EG(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function PG(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}function RG(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function TG(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){const a=t[e].x,l=t[e].y,u=t[i].x,s=t[i].y;l>r!=s>r&&n<(u-a)*(r-l)/(s-l)+a&&(o=!o)}return o}function OG(e){const t=e.slice();return t.sort(((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0)),AG(t)}function AG(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const r=e[n];for(;t.length>=2;){const e=t[t.length-1],n=t[t.length-2];if(!((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x)))break;t.pop()}t.push(r)}t.pop();const n=[];for(let t=e.length-1;t>=0;t--){const r=e[t];for(;n.length>=2;){const e=n[n.length-1],t=n[n.length-2];if(!((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x)))break;n.pop()}n.push(r)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}const NG=gD,DG=yD,IG=bD,_D=wD,$D=()=>{const e=window.innerWidth;return e<768?"mobile":e<1024?"tablet":"desktop"},kG=e=>{if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)},MG=e=>kG(e)&&"type"in e&&"string"==typeof e.type,Ct=e=>{const t=t=>({type:e,payload:t});return t.toString=()=>`${e}`,t.type=e,t.match=t=>MG(t)&&t.type===e,t};Ct("remoteReady"),Ct("reselectUser"),Ct("requestLogin"),Ct("requestLogout"),Ct("setConfirmLeavePage"),Ct("requestChangePath"),Ct("wsSubscribe"),Ct("wsUnSubscribe"),Ct("hostStoreConnect"),Ct("remoteLogin"),Ct("remoteLogout"),Ct("wsOnMessage"),Ct("setRouterPath");const SD=Ct("setDeviceType");Ct("setUserError"),Ct("setUserIsError"),Ct("setUserPending"),Ct("setUserSuccess"),Ct("setUserData"),Ct("updateAccountData"),Ct("updateUser"),Ct("addNotification"),Ct("markNotification"),Ct("setNotificationsError"),Ct("setNotificationsList"),Ct("setNotificationsPending"),Ct("setNotificationsTotalCount"),Ct("setNotificationsUnreadCount"),Ct("resetNotificationsState"),Ct("undoNotification"),Ct("setInstanceInfo"),Ct("setInstanceInfoPending"),Ct("setInstanceInfoError"),Ct("setPlatformSettings"),Ct("setProfileSettings"),Ct("setGroupData"),Ct("setGroupLoading"),Ct("showGroupBasicInfo"),iT("requestMicroFrontendFetch"),iT("sendMicroFrontendFetchResponse");const LG={deviceType:$D()},Om=nM({name:"ui",initialState:LG,reducers:{},extraReducers:e=>{e.addCase(SD,((e,{payload:t})=>{e.deviceType=t}))},selectors:{selectDeviceType:e=>e.deviceType,selectIsMobile:e=>"mobile"===e.deviceType,selectIsTablet:e=>"tablet"===e.deviceType,selectIsDesktop:e=>"desktop"===e.deviceType}});var rw,hR,ow,vR,iw,mR,aw,gR,sw,yR,lw,bR,uw,wR,cw,xR,fw,_R,dw,$R,pw,SR,hw,CR,vw,ER,mw,PR,gw,RR,yw,TR,bw,OR,ww,AR,xw,NR,_w,DR,$w,IR,Sw,kR,Cw,MR,Ew,LR,Pw,jR,Rw,FR,Tw,BR,Ow,qR,Aw,zR,Nw,WR,Dw,UR,Iw,HR,kw,VR,Mw,GR,Lw,KR,jw,YR,Fw,XR,Bw,QR,qw,ZR,zw,JR,Ww,eT;function CD(){if(hR)return rw;hR=1;var e=zO(),t=e&&new e;return rw=t}function ED(){if(vR)return ow;vR=1;var e=Hd(),t=CD();return ow=t?function(e,n){return t.set(e,n),e}:e}function Am(){if(mR)return iw;mR=1;var e=cm(),t=No();return iw=function(n){return function(){var r=arguments;switch(r.length){case 0:return new n;case 1:return new n(r[0]);case 2:return new n(r[0],r[1]);case 3:return new n(r[0],r[1],r[2]);case 4:return new n(r[0],r[1],r[2],r[3]);case 5:return new n(r[0],r[1],r[2],r[3],r[4]);case 6:return new n(r[0],r[1],r[2],r[3],r[4],r[5]);case 7:return new n(r[0],r[1],r[2],r[3],r[4],r[5],r[6])}var o=e(n.prototype),i=n.apply(o,r);return t(i)?i:o}},iw}function jG(){if(gR)return aw;gR=1;var e=Am(),t=Er();return aw=function(n,r,o){var i=1&r,a=e(n);return function e(){return(this&&this!==t&&this instanceof e?a:n).apply(i?o:this,arguments)}},aw}function PD(){if(yR)return sw;yR=1;var e=Math.max;return sw=function(t,n,r,o){for(var i=-1,a=t.length,l=r.length,u=-1,s=n.length,c=e(a-l,0),d=Array(s+c),f=!o;++u<s;)d[u]=n[u];for(;++i<l;)(f||i<a)&&(d[r[i]]=t[i]);for(;c--;)d[u++]=t[i++];return d}}function RD(){if(bR)return lw;bR=1;var e=Math.max;return lw=function(t,n,r,o){for(var i=-1,a=t.length,l=-1,u=r.length,s=-1,c=n.length,d=e(a-u,0),f=Array(d+c),p=!o;++i<d;)f[i]=t[i];for(var h=i;++s<c;)f[h+s]=n[s];for(;++l<u;)(p||i<a)&&(f[h+r[l]]=t[i++]);return f}}function FG(){if(wR)return uw;return wR=1,uw=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}}function a$(){if(xR)return cw;return xR=1,cw=function(){}}function s$(){if(_R)return fw;_R=1;var e=cm(),t=a$();function n(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}return n.prototype=e(t.prototype),n.prototype.constructor=n,fw=n}function TD(){if($R)return dw;$R=1;var e=CD(),t=GO();return dw=e?function(t){return e.get(t)}:t}function BG(){if(SR)return pw;SR=1;return pw={}}function qG(){if(CR)return hw;CR=1;var e=BG(),t=Object.prototype.hasOwnProperty;return hw=function(n){for(var r=n.name+"",o=e[r],i=t.call(e,r)?o.length:0;i--;){var a=o[i],l=a.func;if(null==l||l==n)return a.name}return r}}function OD(){if(ER)return vw;ER=1;var e=cm(),t=a$();function n(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}return n.prototype=e(t.prototype),n.prototype.constructor=n,vw=n}function zG(){if(PR)return mw;PR=1;var e=s$(),t=OD(),n=um();return mw=function(r){if(r instanceof e)return r.clone();var o=new t(r.__wrapped__,r.__chain__);return o.__actions__=n(r.__actions__),o.__index__=r.__index__,o.__values__=r.__values__,o}}function WG(){if(RR)return gw;RR=1;var e=s$(),t=OD(),n=a$(),r=Cr(),o=fo(),i=zG(),a=Object.prototype.hasOwnProperty;function l(n){if(o(n)&&!r(n)&&!(n instanceof e)){if(n instanceof t)return n;if(a.call(n,"__wrapped__"))return i(n)}return new t(n)}return l.prototype=n.prototype,l.prototype.constructor=l,gw=l}function UG(){if(TR)return yw;TR=1;var e=s$(),t=TD(),n=qG(),r=WG();return yw=function(o){var i=n(o),a=r[i];if("function"!=typeof a||!(i in e.prototype))return!1;if(o===a)return!0;var l=t(a);return!!l&&o===l[0]}}function AD(){if(OR)return bw;OR=1;var e=ED(),t=eA()(e);return bw=t}function HG(){if(AR)return ww;AR=1;var e=/\{\n\/\* \[wrapped with (.+)\] \*/,t=/,? & /;return ww=function(n){var r=n.match(e);return r?r[1].split(t):[]}}function VG(){if(NR)return xw;NR=1;var e=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;return xw=function(t,n){var r=n.length;if(!r)return t;var o=r-1;return n[o]=(r>1?"& ":"")+n[o],n=n.join(r>2?", ":" "),t.replace(e,"{\n/* [wrapped with "+n+"] */\n")}}function GG(){if(DR)return _w;DR=1;var e=x_(),t=VO(),n=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];return _w=function(r,o){return e(n,(function(e){var n="_."+e[0];o&e[1]&&!t(r,n)&&r.push(n)})),r.sort()}}function ND(){if(IR)return $w;IR=1;var e=HG(),t=VG(),n=g_(),r=GG();return $w=function(o,i,a){var l=i+"";return n(o,t(l,r(e(l),a)))}}function DD(){if(kR)return Sw;kR=1;var e=UG(),t=AD(),n=ND();return Sw=function(r,o,i,a,l,u,s,c,d,f){var p=8&o;o|=p?32:64,4&(o&=~(p?64:32))||(o&=-4);var h=[r,o,l,p?u:void 0,p?s:void 0,p?void 0:u,p?void 0:s,c,d,f],m=i.apply(void 0,h);return e(r)&&t(m,h),m.placeholder=a,n(m,r,o)}}function ID(){if(MR)return Cw;return MR=1,Cw=function(e){return e.placeholder}}function KG(){if(LR)return Ew;LR=1;var e=um(),t=im(),n=Math.min;return Ew=function(r,o){for(var i=r.length,a=n(o.length,i),l=e(r);a--;){var u=o[a];r[a]=t(u,i)?l[u]:void 0}return r}}function l$(){if(jR)return Pw;jR=1;var e="__lodash_placeholder__";return Pw=function(t,n){for(var r=-1,o=t.length,i=0,a=[];++r<o;){var l=t[r];(l===n||l===e)&&(t[r]=e,a[i++]=r)}return a}}function kD(){if(FR)return Rw;FR=1;var e=PD(),t=RD(),n=FG(),r=Am(),o=DD(),i=ID(),a=KG(),l=l$(),u=Er();return Rw=function s(c,d,f,p,h,m,v,g,y,b){var w=128&d,x=1&d,_=2&d,k=24&d,P=512&d,S=_?void 0:r(c);return function C(){for(var E=arguments.length,N=Array(E),O=E;O--;)N[O]=arguments[O];if(k)var T=i(C),R=n(N,T);if(p&&(N=e(N,p,h,k)),m&&(N=t(N,m,v,k)),E-=R,k&&E<b){var j=l(N,T);return o(c,d,s,C.placeholder,f,N,j,g,y,b-E)}var D=x?f:this,z=_?D[c]:c;return E=N.length,g?N=a(N,g):P&&E>1&&N.reverse(),w&&y<E&&(N.length=y),this&&this!==u&&this instanceof C&&(z=S||r(z)),z.apply(D,N)}},Rw}function YG(){if(BR)return Tw;BR=1;var e=m_(),t=Am(),n=kD(),r=DD(),o=ID(),i=l$(),a=Er();return Tw=function(l,u,s){var c=t(l);return function t(){for(var d=arguments.length,f=Array(d),p=d,h=o(t);p--;)f[p]=arguments[p];var m=d<3&&f[0]!==h&&f[d-1]!==h?[]:i(f,h);return(d-=m.length)<s?r(l,u,n,t.placeholder,void 0,f,m,void 0,void 0,s-d):e(this&&this!==a&&this instanceof t?c:l,this,f)}},Tw}function XG(){if(qR)return Ow;qR=1;var e=m_(),t=Am(),n=Er();return Ow=function(r,o,i,a){var l=1&o,u=t(r);return function t(){for(var o=-1,s=arguments.length,c=-1,d=a.length,f=Array(d+s),p=this&&this!==n&&this instanceof t?u:r;++c<d;)f[c]=a[c];for(;s--;)f[c++]=arguments[++o];return e(p,l?i:this,f)}},Ow}function QG(){if(zR)return Aw;zR=1;var e=PD(),t=RD(),n=l$(),r="__lodash_placeholder__",o=128,i=Math.min;return Aw=function(a,l){var u=a[1],s=l[1],c=u|s,d=c<131,f=s==o&&8==u||s==o&&256==u&&a[7].length<=l[8]||384==s&&l[7].length<=l[8]&&8==u;if(!d&&!f)return a;1&s&&(a[2]=l[2],c|=1&u?0:4);var p=l[3];if(p){var h=a[3];a[3]=h?e(h,p,l[4]):p,a[4]=h?n(a[3],r):l[4]}return(p=l[5])&&(h=a[5],a[5]=h?t(h,p,l[6]):p,a[6]=h?n(a[5],r):l[6]),(p=l[7])&&(a[7]=p),s&o&&(a[8]=null==a[8]?l[8]:i(a[8],l[8])),null==a[9]&&(a[9]=l[9]),a[0]=l[0],a[1]=c,a}}function u$(){if(WR)return Nw;WR=1;var e=ED(),t=jG(),n=YG(),r=kD(),o=XG(),i=TD(),a=QG(),l=AD(),u=ND(),s=lA(),c=Math.max;return Nw=function(d,f,p,h,m,v,g,y){var b=2&f;if(!b&&"function"!=typeof d)throw new TypeError("Expected a function");var w=h?h.length:0;if(w||(f&=-97,h=m=void 0),g=void 0===g?g:c(s(g),0),y=void 0===y?y:s(y),w-=m?m.length:0,64&f){var x=h,_=m;h=m=void 0}var k=b?void 0:i(d),P=[d,f,p,h,m,x,_,v,g,y];if(k&&a(P,k),d=P[0],f=P[1],p=P[2],h=P[3],m=P[4],!(y=P[9]=void 0===P[9]?b?0:d.length:c(P[9]-w,0))&&24&f&&(f&=-25),f&&1!=f)S=8==f||16==f?n(d,f,y):32!=f&&33!=f||m.length?r.apply(void 0,P):o(d,f,p,h);else var S=t(d,f,p);return u((k?e:l)(S,P),d,f)}}function ZG(){if(UR)return Dw;UR=1;var e=u$();return Dw=function(t,n,r){return n=r?void 0:n,n=t&&null==n?t.length:n,e(t,128,void 0,void 0,void 0,void 0,n)}}function JG(){if(HR)return Iw;HR=1;var e=dA();return Iw=function(t){return e(t,4)}}function eK(){if(VR)return kw;VR=1;var e=u$();function t(n,r,o){var i=e(n,8,void 0,void 0,void 0,void 0,void 0,r=o?void 0:r);return i.placeholder=t.placeholder,i}return t.placeholder={},kw=t}function tK(){if(GR)return Mw;GR=1;var e=ta(),t=fo(),n=uj();return Mw=function(r){if(!t(r))return!1;var o=e(r);return"[object Error]"==o||"[object DOMException]"==o||"string"==typeof r.message&&"string"==typeof r.name&&!n(r)}}function nK(){if(KR)return Lw;KR=1;var e=Ud(),t=fo();return Lw=function(n){return t(n)&&"[object WeakMap]"==e(n)}}function rK(){if(YR)return jw;YR=1;var e=dA(),t=h_();return jw=function(n){return t("function"==typeof n?n:e(n,1))}}function oK(){if(XR)return Fw;XR=1;var e=u$(),t=Oj(),n=t((function(t,n){return e(t,256,void 0,void 0,void 0,n)}));return Fw=n}function iK(){if(QR)return Bw;QR=1;var e=e_(),t=um(),n=Cr(),r=sc(),o=dO(),i=qd(),a=t_();return Bw=function(l){return n(l)?e(l,i):r(l)?[l]:t(o(a(l)))}}function aK(){return ZR||(ZR=1,qw={ary:ZG(),assign:cA(),clone:JG(),curry:eK(),forEach:x_(),isArray:Cr(),isError:tK(),isFunction:Zv(),isWeakMap:nK(),iteratee:rK(),keys:FO(),rearg:oK(),toInteger:lA(),toPath:iK()}),qw}function sK(){if(JR)return zw;JR=1;var e=sT(),t=aK();return zw=function(n,r,o){return e(t,n,r,o)}}function lK(){if(eT)return Ww;eT=1;var e=sK()("debounce",aA());return e.placeholder=aT(),Ww=e}var uK=lK();const cK=Oo(uK);function tT(e,t,n=window){const r=ke(t);We((()=>{r.current=t}),[t]),We((()=>{if(!n)return;const t=e=>r.current(e);return n.addEventListener(e,t),()=>{n.removeEventListener(e,t)}}),[e,n])}const fK=e=>{const t=cK(150)(e);tT("resize",t),tT("orientationchange",t)},NX=()=>{const e=rM();fK((()=>{const t=$D();e(SD(t))}))},DX=()=>Wv(Om.selectors.selectDeviceType),dK=()=>Wv(Om.selectors.selectIsMobile),IX=()=>Wv(Om.selectors.selectIsTablet),kX=()=>Wv(Om.selectors.selectIsDesktop);function nT({className:e,...t}){return k.jsx("div",{className:se("animate-pulse rounded-md bg-muted",e),...t})}const pK="sidebar_state",hK=604800,vK="14rem",mK="18rem",gK="3rem",yK="b",MD=P.createContext(null);function Nm(){const e=P.useContext(MD);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const bK=P.forwardRef((({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:o,children:i,...a},l)=>{const u=dK(),[s,c]=P.useState(!1),[d,f]=P.useState(e),p=t??d,h=P.useCallback((e=>{const t="function"==typeof e?e(p):e;n?n(t):f(t),document.cookie=`${pK}=${t}; path=/; max-age=${hK}`}),[n,p]),m=P.useCallback((()=>u?c((e=>!e)):h((e=>!e))),[u,h,c]);P.useEffect((()=>{const e=e=>{e.key===yK&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),m())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)}),[m]);const v=p?"expanded":"collapsed",g=P.useMemo((()=>({state:v,open:p,setOpen:h,isMobile:u,openMobile:s,setOpenMobile:c,toggleSidebar:m})),[v,p,h,u,s,c,m]);return k.jsx(MD.Provider,{value:g,children:k.jsx(gD,{delayDuration:0,children:k.jsx("div",{style:{"--sidebar-width":vK,"--sidebar-width-icon":gK,...o},className:se("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",r),ref:l,...a,children:i})})})}));bK.displayName="SidebarProvider";const wK=P.forwardRef((({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:o,...i},a)=>{const{isMobile:l,state:u,openMobile:s,setOpenMobile:c}=Nm();return"none"===n?k.jsx("div",{className:se("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",r),ref:a,...i,children:o}):l?k.jsx(hG,{open:s,onOpenChange:c,children:k.jsxs(pD,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":mK},side:e,children:[k.jsxs(hD,{className:"sr-only",children:[k.jsx(vD,{children:"Sidebar"}),k.jsx(mD,{children:"Displays the mobile sidebar."})]}),k.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):k.jsxs("div",{ref:a,className:"group peer hidden text-sidebar-foreground md:block","data-state":u,"data-collapsible":"collapsed"===u?n:"","data-variant":t,"data-side":e,children:[k.jsx("div",{className:se("relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180","floating"===t||"inset"===t?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),k.jsx("div",{className:se("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex","left"===e?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]","floating"===t||"inset"===t?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...i,children:k.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-sm group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:o})})]})}));wK.displayName="Sidebar";const xK=P.forwardRef((({className:e,onClick:t,...n},r)=>{const{toggleSidebar:o,open:i}=Nm();return k.jsx(Ld,{ref:r,"data-sidebar":"trigger",variant:"tertiary",size:"icon_m",className:se("size-6 text-slate-900",e),onClick:e=>{null==t||t(e),o()},...n,children:i?k.jsx(OM,{size:16}):k.jsx(RM,{size:16})})}));xK.displayName="SidebarTrigger";const _K=P.forwardRef((({className:e,...t},n)=>{const{toggleSidebar:r}=Nm();return k.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:se("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})}));_K.displayName="SidebarRail";const $K=P.forwardRef((({className:e,...t},n)=>k.jsx("main",{ref:n,className:se("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-m md:peer-data-[variant=inset]:shadow",e),...t})));$K.displayName="SidebarInset";const SK=P.forwardRef((({className:e,...t},n)=>k.jsx(rD,{ref:n,"data-sidebar":"input",className:se("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t})));SK.displayName="SidebarInput";const CK=P.forwardRef((({className:e,...t},n)=>k.jsx("div",{ref:n,"data-sidebar":"header",className:se("flex flex-col gap-2 p-2",e),...t})));CK.displayName="SidebarHeader";const EK=P.forwardRef((({className:e,...t},n)=>k.jsx("div",{ref:n,"data-sidebar":"footer",className:se("flex flex-col gap-2 p-2",e),...t})));EK.displayName="SidebarFooter";const PK=P.forwardRef((({className:e,...t},n)=>k.jsx(K_,{ref:n,"data-sidebar":"separator",className:se("mx-2 w-auto bg-sidebar-border",e),...t})));PK.displayName="SidebarSeparator";const RK=P.forwardRef((({className:e,...t},n)=>k.jsx("div",{ref:n,"data-sidebar":"content",className:se("flex min-h-0 flex-1 flex-col gap-xxxs overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})));RK.displayName="SidebarContent";const TK=P.forwardRef((({className:e,...t},n)=>k.jsx("div",{ref:n,"data-sidebar":"group",className:se("relative flex w-full min-w-0 flex-col px-xxs pt-xs",e),...t})));TK.displayName="SidebarGroup";const OK=P.forwardRef((({className:e,asChild:t=!1,...n},r)=>{const o=t?os:"div";return k.jsx(o,{ref:r,"data-sidebar":"group-label",className:se("flex h-s shrink-0 items-center rounded-md px-xxs py-xxs text-xs font-semibold text-slate-700 opacity-60 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-xl group-data-[collapsible=icon]:opacity-0",e),...n})}));OK.displayName="SidebarGroupLabel";const AK=P.forwardRef((({className:e,asChild:t=!1,...n},r)=>{const o=t?os:"button";return k.jsx(o,{ref:r,"data-sidebar":"group-action",className:se("absolute right-xs top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...n})}));AK.displayName="SidebarGroupAction";const NK=P.forwardRef((({className:e,...t},n)=>k.jsx("div",{ref:n,"data-sidebar":"group-content",className:se("w-full text-sm",e),...t})));NK.displayName="SidebarGroupContent";const DK=P.forwardRef((({className:e,...t},n)=>k.jsx("ul",{ref:n,"data-sidebar":"menu",className:se("flex w-full min-w-0 flex-col p-xs font-semibold text-slate-700 [&_svg]:size-4",e),...t})));DK.displayName="SidebarMenu";const IK=P.forwardRef((({className:e,...t},n)=>k.jsx("li",{ref:n,"data-sidebar":"menu-item",className:se("group/menu-item relative",e),...t})));IK.displayName="SidebarMenuItem";const kK=Ji("peer/menu-button flex w-full items-center gap-xxs overflow-hidden rounded-sm p-xxs text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:text-blue_100 hover:bg-white focus-visible:ring-2 active:bg-white active:text-blue_100 disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-white data-[active=true]:font-medium data-[active=true]:text-blue_100 data-[state=open]:hover:bg-white data-[state=open]:hover:text-blue_100 group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:text-blue_100 hover:bg-white",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-white hover:text-blue_100 hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-s text-sm",sm:"h-m text-xs",lg:"h-l text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),MK=P.forwardRef((({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:o,className:i,...a},l)=>{const u=e?os:"button",{isMobile:s,state:c}=Nm(),d=k.jsx(u,{ref:l,"data-sidebar":"menu-button","data-size":r,"data-active":t,className:se(kK({variant:n,size:r}),i),...a});return o?("string"==typeof o&&(o={children:o}),k.jsxs(yD,{children:[k.jsx(bD,{asChild:!0,children:d}),k.jsx(wD,{side:"right",align:"center",hidden:"collapsed"!==c||s,...o})]})):d}));MK.displayName="SidebarMenuButton";const LK=P.forwardRef((({className:e,asChild:t=!1,showOnHover:n=!1,...r},o)=>{const i=t?os:"button";return k.jsx(i,{ref:o,"data-sidebar":"menu-action",className:se("absolute right-xxxs top-xxs flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-xxxs","peer-data-[size=default]/menu-button:top-xxs","peer-data-[size=lg]/menu-button:top-xs","group-data-[collapsible=icon]:hidden",n&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...r})}));LK.displayName="SidebarMenuAction";const jK=P.forwardRef((({className:e,...t},n)=>k.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:se("pointer-events-none absolute right-xxxs flex h-m min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-xxxs","peer-data-[size=default]/menu-button:top-xxs","peer-data-[size=lg]/menu-button:top-xs","group-data-[collapsible=icon]:hidden",e),...t})));jK.displayName="SidebarMenuBadge";const FK=P.forwardRef((({className:e,showIcon:t=!1,...n},r)=>{const o=P.useMemo((()=>`${Math.floor(40*Math.random())+50}%`),[]);return k.jsxs("div",{ref:r,"data-sidebar":"menu-skeleton",className:se("flex h-8 items-center gap-xxs rounded-md px-xxs",e),...n,children:[t&&k.jsx(nT,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),k.jsx(nT,{className:"h-xxxs max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})}));FK.displayName="SidebarMenuSkeleton";const BK=P.forwardRef((({className:e,...t},n)=>k.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:se("flex min-w-0 translate-x-px flex-col gap-xxxs border-l border-sidebar-border","group-data-[collapsible=icon]:hidden",e),...t})));BK.displayName="SidebarMenuSub";const qK=P.forwardRef((({...e},t)=>k.jsx("li",{ref:t,...e})));qK.displayName="SidebarMenuSubItem";const zK=P.forwardRef((({asChild:e=!1,size:t="md",isActive:n,className:r,...o},i)=>{const a=e?os:"a";return k.jsx(a,{ref:i,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:se("flex h-s min-w-0 -translate-x-px items-center gap-xxs overflow-hidden rounded-sm px-xxs text-sm text-slate-700 outline-none ring-sidebar-ring hover:bg-white hover:text-blue_100 focus-visible:ring-2 active:bg-white active:text-blue_100 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-blue_100","data-[active=true]:bg-white data-[active=true]:text-blue_100","sm"===t&&"text-xs","md"===t&&"text-sm","group-data-[collapsible=icon]:hidden",r),...o})}));zK.displayName="SidebarMenuSubButton";const LD="Switch",[WK,MX]=Sr(LD),[UK,HK]=WK(LD),VK=_e(((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:i,required:a,disabled:l,value:u="on",onCheckedChange:s,...c}=e,[d,f]=tt(null),p=Rt(t,(e=>f(e))),h=ke(!1),m=!d||!!d.closest("form"),[v=!1,g]=Vo({prop:o,defaultProp:i,onChange:s});return z(UK,{scope:n,checked:v,disabled:l},z(it.button,fe({type:"button",role:"switch","aria-checked":v,"aria-required":a,"data-state":jD(v),"data-disabled":l?"":void 0,disabled:l,value:u},c,{ref:p,onClick:ze(e.onClick,(e=>{g((e=>!e)),m&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())}))})),m&&z(YK,{control:d,bubbles:!h.current,name:r,value:u,checked:v,required:a,disabled:l,style:{transform:"translateX(-100%)"}}))})),GK="SwitchThumb",KK=_e(((e,t)=>{const{__scopeSwitch:n,...r}=e,o=HK(GK,n);return z(it.span,fe({"data-state":jD(o.checked),"data-disabled":o.disabled?"":void 0},r,{ref:t}))})),YK=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=ke(null),a=fm(n),l=dm(t);return We((()=>{const e=i.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(a!==n&&o){const t=new Event("click",{bubbles:r});o.call(e,n),e.dispatchEvent(t)}}),[a,n,r]),z("input",fe({type:"checkbox","aria-hidden":!0,defaultChecked:n},o,{tabIndex:-1,ref:i,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function jD(e){return e?"checked":"unchecked"}const FD=VK,XK=KK,QK=P.forwardRef((({className:e,...t},n)=>k.jsx(FD,{className:se("group peer inline-flex h-xs w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background data-[state=checked]:bg-blue_100 data-[state=unchecked]:bg-slate-200","disabled:cursor-not-allowed disabled:!bg-slate-100 md:hover:data-[state=checked]:bg-blue_120 md:hover:data-[state=unchecked]:!bg-slate-300",e),...t,ref:n,children:k.jsx(XK,{className:se("pointer-events-none block size-xxs rounded-full bg-background shadow-lg ring-0 transition-[transform,width] data-[state=checked]:translate-x-[20px] data-[state=unchecked]:translate-x-0",{"md:group-hover:w-[26px] md:group-hover:data-[state=checked]:translate-x-[14px]":!t.disabled,"bg-slate-300":t.disabled})})})));QK.displayName=FD.displayName;const BD="Tabs",[ZK,LX]=Sr(BD,[fc]),qD=fc(),[JK,c$]=ZK(BD),eY=_e(((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:i,orientation:a="horizontal",dir:l,activationMode:u="automatic",...s}=e,c=Gd(l),[d,f]=Vo({prop:r,onChange:o,defaultProp:i});return z(JK,{scope:n,baseId:lo(),value:d,onValueChange:f,orientation:a,dir:c,activationMode:u},z(it.div,fe({dir:c,"data-orientation":a},s,{ref:t})))})),tY="TabsList",nY=_e(((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,i=c$(tY,n),a=qD(n);return z(z_,fe({asChild:!0},a,{orientation:i.orientation,dir:i.dir,loop:r}),z(it.div,fe({role:"tablist","aria-orientation":i.orientation},o,{ref:t})))})),rY="TabsTrigger",oY=_e(((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...i}=e,a=c$(rY,n),l=qD(n),u=zD(a.baseId,r),s=WD(a.baseId,r),c=r===a.value;return z(W_,fe({asChild:!0},l,{focusable:!o,active:c}),z(it.button,fe({type:"button",role:"tab","aria-selected":c,"aria-controls":s,"data-state":c?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:u},i,{ref:t,onMouseDown:ze(e.onMouseDown,(e=>{o||0!==e.button||!1!==e.ctrlKey?e.preventDefault():a.onValueChange(r)})),onKeyDown:ze(e.onKeyDown,(e=>{[" ","Enter"].includes(e.key)&&a.onValueChange(r)})),onFocus:ze(e.onFocus,(()=>{const e="manual"!==a.activationMode;!c&&!o&&e&&a.onValueChange(r)}))})))})),iY="TabsContent",aY=_e(((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:i,...a}=e,l=c$(iY,n),u=zD(l.baseId,r),s=WD(l.baseId,r),c=r===l.value,d=ke(c);return We((()=>{const e=requestAnimationFrame((()=>d.current=!1));return()=>cancelAnimationFrame(e)}),[]),z(Ao,{present:o||c},(({present:n})=>z(it.div,fe({"data-state":c?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":u,hidden:!n,id:s,tabIndex:0},a,{ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0}}),n&&i)))}));function zD(e,t){return`${e}-trigger-${t}`}function WD(e,t){return`${e}-content-${t}`}const sY=eY,UD=nY,HD=oY,VD=aY,jX=sY,lY=P.forwardRef((({className:e,useDefaults:t=!0,...n},r)=>k.jsx(UD,{ref:r,"data-testid":"tabsList",className:t?se("inline-flex items-center justify-center gap-xxs border-b border-slate-200 p-none text-muted-foreground",e):e,...n})));lY.displayName=UD.displayName;const uY=P.forwardRef((({className:e,useDefaults:t=!0,children:n,...r},o)=>k.jsx(HD,{ref:o,className:t?se("inline-flex items-center justify-center whitespace-nowrap p-xxs pb-[calc(theme(spacing.xxs)-2px)] pt-xxs text-basering-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring border-b-2 border-transparent font-semibold focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:border-slate-900","group relative before:absolute before:inset-xxxs before:rounded-sm before:bg-transparent before:transition-colors hover:before:bg-slate-50",e):e,...r,children:k.jsx("span",{className:"relative text-slate-500 group-hover:text-slate-900 group-data-[state=active]:text-slate-900",children:n})})));uY.displayName=HD.displayName;const cY=P.forwardRef((({className:e,...t},n)=>k.jsx(VD,{ref:n,className:se("ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t})));cY.displayName=VD.displayName;const fY=P.forwardRef((({className:e,...t},n)=>k.jsx("table",{ref:n,className:se("w-full caption-bottom text-sm",e),...t})));fY.displayName="Table";const dY=P.forwardRef((({className:e,...t},n)=>k.jsx("thead",{ref:n,className:se("[&_tr]:border-b",e),...t})));dY.displayName="TableHeader";const pY=P.forwardRef((({className:e,...t},n)=>k.jsx("tbody",{ref:n,className:se("[&_tr:last-child]:border-0",e),...t})));pY.displayName="TableBody";const hY=P.forwardRef((({className:e,...t},n)=>k.jsx("tfoot",{ref:n,className:se("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t})));hY.displayName="TableFooter";const vY=P.forwardRef((({className:e,...t},n)=>k.jsx("tr",{ref:n,className:se("border-b bg-background transition-colors hover:bg-gray-100 data-[state=selected]:bg-gray-200 dark:hover:bg-muted dark:data-[state=selected]:bg-muted",e),...t})));vY.displayName="TableRow";const mY=P.forwardRef((({className:e,...t},n)=>k.jsx("th",{ref:n,className:se("h-m bg-inherit px-xs py-xxs text-left align-middle font-normal text-muted-foreground","whitespace-nowrap border-slate-200 text-sm text-slate-500 [&:not(:last-child)]:border-r",e),...t})));mY.displayName="TableHead";const gY=P.forwardRef((({className:e,...t},n)=>k.jsx("td",{ref:n,className:se("bg-inherit p-xs py-xxs align-middle","overflow-hidden truncate text-ellipsis border-slate-200 text-base text-slate-700 [&:not(:last-child)]:border-r",e),...t})));gY.displayName="TableCell";const yY=P.forwardRef((({className:e,...t},n)=>k.jsx("caption",{ref:n,className:se("mt-s text-sm text-muted-foreground",e),...t})));yY.displayName="TableCaption";const bY=(e,t)=>se("flex w-full rounded-m px-4 py-3.5 text-base text-slate-900 outline outline-1 outline-input ring-offset-background transition-all duration-200 ease-in-out placeholder:text-base placeholder:text-muted-foreground placeholder:text-slate-400 hover:outline-2 hover:outline-slate-400 focus-visible:bg-slate-50 focus-visible:text-slate-900 focus-visible:outline-2 focus-visible:outline-blue_120 disabled:cursor-not-allowed disabled:select-none disabled:text-slate-300 disabled:outline-slate-200",{"bg-red_30_17 outline-red-dark":!!e},t),wY=P.forwardRef((({className:e,...t},n)=>{const{error:r}=as();return k.jsx("textarea",{className:bY(!!r,e),ref:n,...t})}));wY.displayName="Textarea";const FX=NG,xY=DG,_Y=IG,$Y=Ji("z-50 overflow-hidden shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",{variants:{size:{default:"rounded-md border text-sm px-3 py-1.5",small:"rounded-md border px-[11px] py-[3px] text-base leading-[16px]"},theme:{default:"bg-popover text-popover-foreground",dark:"bg-slate-900_90 text-slate-50"},defaultVariants:{size:"small",theme:"dark"}}}),GD=P.forwardRef((({className:e,sideOffset:t=1,size:n,theme:r,...o},i)=>k.jsx(_D,{ref:i,sideOffset:t,className:se($Y({size:n,theme:r,className:e})),...o})));GD.displayName=_D.displayName;const BX=({children:e,tooltipText:t,triggerClassname:n,triggerProps:r,...o})=>k.jsxs(xY,{children:[k.jsx(_Y,{className:n,...r,children:e}),t&&k.jsx(GD,{...o,children:t})]}),qX=({accept:e="*",multiple:t,handleUpload:n,disabled:r})=>k.jsx("div",{className:"hidden",children:k.jsx("input",{type:"file","data-button":"input file",accept:e,multiple:t,onChange:({target:e})=>{if(!e.files)return;const t=Array.from(e.files).map((e=>({file:e,objectUrl:URL.createObjectURL(e)})));n(t),e.value=""},onClick:e=>{e.stopPropagation(),r&&e.preventDefault()}})}),zX=({as:e="div",children:t,className:n,...r})=>z(e,{className:se(n),...r},t);function SY(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function CY(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>P.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return P.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=P.createContext(r),i=n.length;n=[...n,r];const a=t=>{var n;const{scope:r,children:a,...l}=t,u=(null==(n=null==r?void 0:r[e])?void 0:n[i])||o,s=P.useMemo((()=>l),Object.values(l));return k.jsx(u.Provider,{value:s,children:a})};return a.displayName=t+"Provider",[a,function(n,a){var l;const u=(null==(l=null==a?void 0:a[e])?void 0:l[i])||o,s=P.useContext(u);if(s)return s;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},EY(r,...t)]}function EY(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return P.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function KD(e){const t=P.useRef(e);return P.useEffect((()=>{t.current=e})),P.useMemo((()=>(...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[])}function PY({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=RY({defaultProp:t,onChange:n}),i=void 0!==e,a=i?e:r,l=KD(n);return[a,P.useCallback((t=>{if(i){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[i,e,o,l])]}function RY({defaultProp:e,onChange:t}){const n=P.useState(e),[r]=n,o=P.useRef(r),i=KD(t);return P.useEffect((()=>{o.current!==r&&(i(r),o.current=r)}),[r,o,i]),n}var qv=null!=globalThis&&globalThis.document?P.useLayoutEffect:()=>{};function rT(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function YD(...e){return t=>{let n=!1;const r=e.map((e=>{const r=rT(e,t);return!n&&"function"==typeof r&&(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():rT(e[t],null)}}}}function XD(...e){return P.useCallback(YD(...e),e)}var QD=P.forwardRef(((e,t)=>{const{children:n,...r}=e,o=P.Children.toArray(n),i=o.find(OY);if(i){const e=i.props.children,n=o.map((t=>t===i?P.Children.count(e)>1?P.Children.only(null):P.isValidElement(e)?e.props.children:null:t));return k.jsx(Ax,{...r,ref:t,children:P.isValidElement(e)?P.cloneElement(e,void 0,n):null})}return k.jsx(Ax,{...r,ref:t,children:n})}));QD.displayName="Slot";var Ax=P.forwardRef(((e,t)=>{const{children:n,...r}=e;if(P.isValidElement(n)){const e=NY(n),o=AY(r,n.props);return n.type!==P.Fragment&&(o.ref=t?YD(t,e):e),P.cloneElement(n,o)}return P.Children.count(n)>1?P.Children.only(null):null}));Ax.displayName="SlotClone";var TY=({children:e})=>k.jsx(k.Fragment,{children:e});function OY(e){return P.isValidElement(e)&&e.type===TY}function AY(e,t){const n={...t};for(const r in t){const 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}}function NY(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var DY=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],f$=DY.reduce(((e,t)=>{const n=P.forwardRef(((e,n)=>{const{asChild:r,...o}=e,i=r?QD:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),k.jsx(i,{...o,ref:n})}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function IY(e,t){return P.useReducer(((e,n)=>t[e][n]??e),e)}var ZD=e=>{const{present:t,children:n}=e,r=kY(t),o="function"==typeof n?n({present:r.isPresent}):P.Children.only(n),i=XD(r.ref,MY(o));return"function"==typeof n||r.isPresent?P.cloneElement(o,{ref:i}):null};function kY(e){const[t,n]=P.useState(),r=P.useRef({}),o=P.useRef(e),i=P.useRef("none"),a=e?"mounted":"unmounted",[l,u]=IY(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return P.useEffect((()=>{const e=hv(r.current);i.current="mounted"===l?e:"none"}),[l]),qv((()=>{const t=r.current,n=o.current;if(n!==e){const r=i.current,a=hv(t);e?u("MOUNT"):"none"===a||"none"===(null==t?void 0:t.display)?u("UNMOUNT"):u(n&&r!==a?"ANIMATION_OUT":"UNMOUNT"),o.current=e}}),[e,u]),qv((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,a=i=>{const a=hv(r.current).includes(i.animationName);if(i.target===t&&a&&(u("ANIMATION_END"),!o.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)}))}},l=e=>{e.target===t&&(i.current=hv(r.current))};return t.addEventListener("animationstart",l),t.addEventListener("animationcancel",a),t.addEventListener("animationend",a),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",l),t.removeEventListener("animationcancel",a),t.removeEventListener("animationend",a)}}u("ANIMATION_END")}),[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:P.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}function hv(e){return(null==e?void 0:e.animationName)||"none"}function MY(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}ZD.displayName="Presence";var LY=P.useId||(()=>{}),jY=0;function FY(e){const[t,n]=P.useState(LY());return qv((()=>{e||n((e=>e??String(jY++)))}),[e]),e||(t?`radix-${t}`:"")}var d$="Collapsible",[BY,WX]=CY(d$),[qY,p$]=BY(d$),JD=P.forwardRef(((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:i,onOpenChange:a,...l}=e,[u=!1,s]=PY({prop:r,defaultProp:o,onChange:a});return k.jsx(qY,{scope:n,disabled:i,contentId:FY(),open:u,onOpenToggle:P.useCallback((()=>s((e=>!e))),[s]),children:k.jsx(f$.div,{"data-state":v$(u),"data-disabled":i?"":void 0,...l,ref:t})})}));JD.displayName=d$;var eI="CollapsibleTrigger",tI=P.forwardRef(((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=p$(eI,n);return k.jsx(f$.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":v$(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:SY(e.onClick,o.onOpenToggle)})}));tI.displayName=eI;var h$="CollapsibleContent",nI=P.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,o=p$(h$,e.__scopeCollapsible);return k.jsx(ZD,{present:n||o.open,children:({present:e})=>k.jsx(zY,{...r,ref:t,present:e})})}));nI.displayName=h$;var zY=P.forwardRef(((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...i}=e,a=p$(h$,n),[l,u]=P.useState(r),s=P.useRef(null),c=XD(t,s),d=P.useRef(0),f=d.current,p=P.useRef(0),h=p.current,m=a.open||l,v=P.useRef(m),g=P.useRef(void 0);return P.useEffect((()=>{const e=requestAnimationFrame((()=>v.current=!1));return()=>cancelAnimationFrame(e)}),[]),qv((()=>{const e=s.current;if(e){g.current=g.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";const t=e.getBoundingClientRect();d.current=t.height,p.current=t.width,v.current||(e.style.transitionDuration=g.current.transitionDuration,e.style.animationName=g.current.animationName),u(r)}}),[a.open,r]),k.jsx(f$.div,{"data-state":v$(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!m,...i,ref:c,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":h?`${h}px`:void 0,...e.style},children:m&&o})}));function v$(e){return e?"open":"closed"}var WY=JD;const UX=WY,HX=tI,VX=nI;export{QY as AlertDialog,f8 as AlertDialogAction,d8 as AlertDialogCancel,a8 as AlertDialogContent,c8 as AlertDialogDescription,l8 as AlertDialogFooter,s8 as AlertDialogHeader,YT as AlertDialogOverlay,i8 as AlertDialogPortal,u8 as AlertDialogTitle,ZY as AlertDialogTrigger,tO as Avatar,rO as AvatarFallback,nO as AvatarImage,Ld as Button,KY as ButtonLoader,x8 as Card,C8 as CardContent,S8 as CardDescription,E8 as CardFooter,_8 as CardHeader,$8 as CardTitle,s5 as Carousel,l5 as CarouselContent,u5 as CarouselItem,f5 as CarouselNext,c5 as CarouselPrevious,Nj as ChartContainer,tX as ChartLegend,kj as ChartLegendContent,Dj as ChartStyle,eX as ChartTooltip,Ij as ChartTooltipContent,S_ as Checkbox,_2 as ChipsItem,Mj as ChipsWrapper,UX as Collapsible,VX as CollapsibleContent,HX as CollapsibleTrigger,RA as Command,iX as CommandDialog,CF as CommandEmpty,EF as CommandGroup,$F as CommandInput,RF as CommandItem,SF as CommandList,PF as CommandSeparator,TF as CommandShortcut,mF as Dialog,oX as DialogClose,EA as DialogContent,_F as DialogDescription,PA as DialogFooter,wF as DialogHeader,CA as DialogOverlay,gF as DialogPortal,xF as DialogTitle,rX as DialogTrigger,dq as Drawer,uX as DrawerClose,hq as DrawerContent,yq as DrawerDescription,mq as DrawerFooter,vq as DrawerHeader,gN as DrawerOverlay,pq as DrawerPortal,gq as DrawerTitle,lX as DrawerTrigger,dX as DropdownMenu,cU as DropdownMenuCheckboxItem,lU as DropdownMenuContent,hX as DropdownMenuGroup,uU as DropdownMenuItem,dU as DropdownMenuLabel,vX as DropdownMenuPortal,gX as DropdownMenuRadioGroup,fU as DropdownMenuRadioItem,pU as DropdownMenuSeparator,hU as DropdownMenuShortcut,mX as DropdownMenuSub,sU as DropdownMenuSubContent,aU as DropdownMenuSubTrigger,pX as DropdownMenuTrigger,bX as Form,dH as FormControl,pH as FormDescription,wX as FormField,cH as FormItem,fH as FormLabel,hH as FormMessage,vH as FormSelect,gH as FormSelectContent,bH as FormSelectGroup,yH as FormSelectItem,wH as FormSelectLabel,xH as FormSelectSeparator,mH as FormSelectTrigger,_H as FormSelectValue,$X as HoverCard,YV as HoverCardContent,CX as HoverCardPortal,SX as HoverCardTrigger,rD as Input,qX as InputFile,s3 as Label,dG as RadioGroup,pG as RadioGroupItem,E3 as Select,lH as SelectActions,iH as SelectCheckboxItem,O3 as SelectContent,uH as SelectFooter,P3 as SelectGroup,N3 as SelectItem,A3 as SelectLabel,oH as SelectMultiTrigger,sH as SelectScrollDownButton,aH as SelectScrollUpButton,D3 as SelectSeparator,T3 as SelectTrigger,R3 as SelectValue,hG as Sheet,RX as SheetClose,pD as SheetContent,mD as SheetDescription,gG as SheetFooter,hD as SheetHeader,dD as SheetOverlay,vG as SheetPortal,vD as SheetTitle,PX as SheetTrigger,wK as Sidebar,RK as SidebarContent,EK as SidebarFooter,TK as SidebarGroup,AK as SidebarGroupAction,NK as SidebarGroupContent,OK as SidebarGroupLabel,CK as SidebarHeader,SK as SidebarInput,$K as SidebarInset,DK as SidebarMenu,LK as SidebarMenuAction,jK as SidebarMenuBadge,MK as SidebarMenuButton,IK as SidebarMenuItem,FK as SidebarMenuSkeleton,BK as SidebarMenuSub,zK as SidebarMenuSubButton,qK as SidebarMenuSubItem,bK as SidebarProvider,_K as SidebarRail,PK as SidebarSeparator,xK as SidebarTrigger,nT as Skeleton,QK as Switch,fY as Table,pY as TableBody,yY as TableCaption,gY as TableCell,hY as TableFooter,mY as TableHead,dY as TableHeader,vY as TableRow,jX as Tabs,cY as TabsContent,lY as TabsList,uY as TabsTrigger,wY as Textarea,xY as Tooltip,GD as TooltipContent,FX as TooltipProvider,_Y as TooltipTrigger,BX as TooltipWrapper,kx as buttonVariants,se as cn,bY as getTextareaClassName,zX as styledElement,Om as uiSlice,Qv as useCarousel,DX as useDeviceType,NX as useDeviceTypeUpdater,as as useFormField,kX as useIsDesktop,dK as useIsMobile,IX as useIsTablet,Nm as useSidebar};
|
|
69
|
+
*/function H5(){if(bC)return Nt;bC=1;var e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.server_context"),s=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen");function m(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:switch(e=e.type){case r:case i:case o:case c:case d:return e;default:switch(e=e&&e.$$typeof){case u:case l:case s:case p:case f:case a:return e;default:return h}}case n:return h}}}return e=Symbol.for("react.module.reference"),Nt.ContextConsumer=l,Nt.ContextProvider=a,Nt.Element=t,Nt.ForwardRef=s,Nt.Fragment=r,Nt.Lazy=p,Nt.Memo=f,Nt.Portal=n,Nt.Profiler=i,Nt.StrictMode=o,Nt.Suspense=c,Nt.SuspenseList=d,Nt.isAsyncMode=function(){return!1},Nt.isConcurrentMode=function(){return!1},Nt.isContextConsumer=function(e){return m(e)===l},Nt.isContextProvider=function(e){return m(e)===a},Nt.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Nt.isForwardRef=function(e){return m(e)===s},Nt.isFragment=function(e){return m(e)===r},Nt.isLazy=function(e){return m(e)===p},Nt.isMemo=function(e){return m(e)===f},Nt.isPortal=function(e){return m(e)===n},Nt.isProfiler=function(e){return m(e)===i},Nt.isStrictMode=function(e){return m(e)===o},Nt.isSuspense=function(e){return m(e)===c},Nt.isSuspenseList=function(e){return m(e)===d},Nt.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===i||t===o||t===c||t===d||t===h||"object"==typeof t&&null!==t&&(t.$$typeof===p||t.$$typeof===f||t.$$typeof===a||t.$$typeof===l||t.$$typeof===s||t.$$typeof===e||void 0!==t.getModuleId)},Nt.typeOf=m,Nt}function V5(){return wC||(wC=1,oy.exports=H5()),oy.exports}function gO(){if(xC)return iy;xC=1;var e=ta(),t=fo();return iy=function(n){return"number"==typeof n||t(n)&&"[object Number]"==e(n)}}function G5(){if(_C)return ay;_C=1;var e=gO();return ay=function(t){return e(t)&&t!=+t}}V5();var K5=G5();const Y5=Oo(K5);var X5=gO();const Q5=Oo(X5);var tv=function(e){return vO(e)&&e.indexOf("%")===e.length-1},Wo=function(e){return Q5(e)&&!Y5(e)},xv=function(e){return Wo(e)||vO(e)};function Qw(e){return(Qw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Z5=["viewBox","children"],J5=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],$C=["points","pathLength"],sy={svg:Z5,polygon:$C,polyline:$C},yO=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],e9=function(e,t,n){return function(r){return e(t,n,r),null}},t9=function(e,t,n){if(!mO(e)||"object"!==Qw(e))return null;var r=null;return Object.keys(e).forEach((function(o){var i=e[o];yO.includes(o)&&"function"==typeof i&&(r||(r={}),r[o]=e9(i,t,n))})),r},n9=function(e){return"string"==typeof e?e:e?e.displayName||e.name||"Component":""},r9=function(e,t,n,r){var o,i=null!==(o=null==sy?void 0:sy[r])&&void 0!==o?o:[];return!wv(e)&&(r&&i.includes(t)||J5.includes(t))||yO.includes(t)},bO=function(e,t,n){if(!e||"function"==typeof e||"boolean"==typeof e)return null;var r=e;if(Xi(e)&&(r=e.props),!mO(r))return null;var o={};return Object.keys(r).forEach((function(e){var i;r9(null===(i=r)||void 0===i?void 0:i[e],e,t,n)&&(o[e]=r[e])})),o},o9=["children","width","height","viewBox","className","style","title","desc"];function Zw(){return Zw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zw.apply(this,arguments)}function i9(e,t){if(null==e)return{};var n,r,o=a9(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function a9(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function s9(e){var t=e.children,n=e.width,r=e.height,o=e.viewBox,i=e.className,a=e.style,l=e.title,u=e.desc,s=i9(e,o9),c=o||{width:n,height:r,x:0,y:0},d=Za("recharts-surface",i);return ye.createElement("svg",Zw({},bO(s,!0,"svg"),{className:d,width:n,height:r,style:a,viewBox:"".concat(c.x," ").concat(c.y," ").concat(c.width," ").concat(c.height)}),ye.createElement("title",null,l),ye.createElement("desc",null,u),t)}var ly,SC,uy,CC,cy,EC,fy,PC,dy,RC,py,TC,hy,OC,vy,AC,mv=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o]};function l9(){if(SC)return ly;return SC=1,ly=function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i}}function u9(){if(CC)return uy;CC=1;var e=l9();return uy=function(t,n,r){var o=t.length;return r=void 0===r?o:r,!n&&r>=o?t:e(t,n,r)}}function wO(){if(EC)return cy;EC=1;var e=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");return cy=function(t){return e.test(t)}}function c9(){if(PC)return fy;return PC=1,fy=function(e){return e.split("")}}function f9(){if(RC)return dy;RC=1;var e="\\ud800-\\udfff",t="["+e+"]",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",r="\\ud83c[\\udffb-\\udfff]",o="[^"+e+"]",i="(?:\\ud83c[\\udde6-\\uddff]){2}",a="[\\ud800-\\udbff][\\udc00-\\udfff]",l="(?:"+n+"|"+r+")"+"?",u="[\\ufe0e\\ufe0f]?",s=u+l+("(?:\\u200d(?:"+[o,i,a].join("|")+")"+u+l+")*"),c="(?:"+[o+n+"?",n,i,a,t].join("|")+")",d=RegExp(r+"(?="+r+")|"+c+s,"g");return dy=function(e){return e.match(d)||[]}}function d9(){if(TC)return py;TC=1;var e=c9(),t=wO(),n=f9();return py=function(r){return t(r)?n(r):e(r)}}function p9(){if(OC)return hy;OC=1;var e=u9(),t=wO(),n=d9(),r=t_();return hy=function(o){return function(i){i=r(i);var a=t(i)?n(i):void 0,l=a?a[0]:i.charAt(0),u=a?e(a,1).join(""):i.slice(1);return l[o]()+u}}}function h9(){if(AC)return vy;AC=1;var e=p9()("toUpperCase");return vy=e}var v9=h9();const xO=Oo(v9);function nv(e){return function(){return e}}const _O=Math.cos,_v=Math.sin,Ko=Math.sqrt,$v=Math.PI,om=2*$v,Jw=Math.PI,ex=2*Jw,nl=1e-6,m9=ex-nl;function $O(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function g9(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return $O;const n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}class y9{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?$O:g9(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,o,i){this._append`C${+e},${+t},${+n},${+r},${this._x1=+o},${this._y1=+i}`}arcTo(e,t,n,r,o){if(e=+e,t=+t,n=+n,r=+r,(o=+o)<0)throw new Error(`negative radius: ${o}`);let i=this._x1,a=this._y1,l=n-e,u=r-t,s=i-e,c=a-t,d=s*s+c*c;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(d>nl)if(Math.abs(c*l-u*s)>nl&&o){let f=n-i,p=r-a,h=l*l+u*u,m=f*f+p*p,v=Math.sqrt(h),g=Math.sqrt(d),y=o*Math.tan((Jw-Math.acos((h+d-m)/(2*v*g)))/2),b=y/g,w=y/v;Math.abs(b-1)>nl&&this._append`L${e+b*s},${t+b*c}`,this._append`A${o},${o},0,0,${+(c*f>s*p)},${this._x1=e+w*l},${this._y1=t+w*u}`}else this._append`L${this._x1=e},${this._y1=t}`}arc(e,t,n,r,o,i){if(e=+e,t=+t,i=!!i,(n=+n)<0)throw new Error(`negative radius: ${n}`);let a=n*Math.cos(r),l=n*Math.sin(r),u=e+a,s=t+l,c=1^i,d=i?r-o:o-r;null===this._x1?this._append`M${u},${s}`:(Math.abs(this._x1-u)>nl||Math.abs(this._y1-s)>nl)&&this._append`L${u},${s}`,n&&(d<0&&(d=d%ex+ex),d>m9?this._append`A${n},${n},0,1,${c},${e-a},${t-l}A${n},${n},0,1,${c},${this._x1=u},${this._y1=s}`:d>nl&&this._append`A${n},${n},0,${+(d>=Jw)},${c},${this._x1=e+n*Math.cos(o)},${this._y1=t+n*Math.sin(o)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function b9(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{const e=Math.floor(n);if(!(e>=0))throw new RangeError(`invalid digits: ${n}`);t=e}return e},()=>new y9(t)}const r_={draw(e,t){const n=Ko(t/$v);e.moveTo(n,0),e.arc(0,0,n,0,om)}},w9={draw(e,t){const n=Ko(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},SO=Ko(1/3),x9=2*SO,_9={draw(e,t){const n=Ko(t/x9),r=n*SO;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},$9={draw(e,t){const n=Ko(t),r=-n/2;e.rect(r,r,n,n)}},S9=.8908130915292852,CO=_v($v/10)/_v(7*$v/10),C9=_v(om/10)*CO,E9=-_O(om/10)*CO,P9={draw(e,t){const n=Ko(t*S9),r=C9*n,o=E9*n;e.moveTo(0,-n),e.lineTo(r,o);for(let t=1;t<5;++t){const i=om*t/5,a=_O(i),l=_v(i);e.lineTo(l*n,-a*n),e.lineTo(a*r-l*o,l*r+a*o)}e.closePath()}},my=Ko(3),R9={draw(e,t){const n=-Ko(t/(3*my));e.moveTo(0,2*n),e.lineTo(-my*n,-n),e.lineTo(my*n,-n),e.closePath()}},Co=-.5,Eo=Ko(3)/2,tx=1/Ko(12),T9=3*(tx/2+1),O9={draw(e,t){const n=Ko(t/T9),r=n/2,o=n*tx,i=r,a=n*tx+n,l=-i,u=a;e.moveTo(r,o),e.lineTo(i,a),e.lineTo(l,u),e.lineTo(Co*r-Eo*o,Eo*r+Co*o),e.lineTo(Co*i-Eo*a,Eo*i+Co*a),e.lineTo(Co*l-Eo*u,Eo*l+Co*u),e.lineTo(Co*r+Eo*o,Co*o-Eo*r),e.lineTo(Co*i+Eo*a,Co*a-Eo*i),e.lineTo(Co*l+Eo*u,Co*u-Eo*l),e.closePath()}};function A9(e,t){let n=null,r=b9(o);function o(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return e="function"==typeof e?e:nv(e||r_),t="function"==typeof t?t:nv(void 0===t?64:+t),o.type=function(t){return arguments.length?(e="function"==typeof t?t:nv(t),o):e},o.size=function(e){return arguments.length?(t="function"==typeof e?e:nv(+e),o):t},o.context=function(e){return arguments.length?(n=e??null,o):n},o}function Cd(e){return(Cd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var N9=["type","size","sizeType"];function nx(){return nx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nx.apply(this,arguments)}function NC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function DC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?NC(Object(n),!0).forEach((function(t){D9(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NC(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function D9(e,t,n){return(t=I9(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I9(e){var t=k9(e,"string");return"symbol"==Cd(t)?t:t+""}function k9(e,t){if("object"!=Cd(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Cd(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function M9(e,t){if(null==e)return{};var n,r,o=L9(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function L9(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var EO={symbolCircle:r_,symbolCross:w9,symbolDiamond:_9,symbolSquare:$9,symbolStar:P9,symbolTriangle:R9,symbolWye:O9},j9=Math.PI/180,F9=function(e){var t="symbol".concat(xO(e));return EO[t]||r_},B9=function(e,t,n){if("area"===t)return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return.5*e*e/Math.sqrt(3);case"square":return e*e;case"star":var r=18*j9;return 1.25*e*e*(Math.tan(r)-Math.tan(2*r)*Math.pow(Math.tan(r),2));case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},q9=function(e,t){EO["symbol".concat(xO(e))]=t},PO=function(e){var t,n=e.type,r=void 0===n?"circle":n,o=e.size,i=void 0===o?64:o,a=e.sizeType,l=void 0===a?"area":a,u=DC(DC({},M9(e,N9)),{},{type:r,size:i,sizeType:l}),s=u.className,c=u.cx,d=u.cy,f=bO(u,!0);return c===+c&&d===+d&&i===+i?ye.createElement("path",nx({},f,{className:Za("recharts-symbols",s),transform:"translate(".concat(c,", ").concat(d,")"),d:(t=F9(r),A9().type(t).size(B9(i,l,r))())})):null};function Gu(e){return(Gu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function rx(){return rx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rx.apply(this,arguments)}function IC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function z9(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?IC(Object(n),!0).forEach((function(t){Ed(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):IC(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function W9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function U9(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,TO(r.key),r)}}function H9(e,t,n){return U9(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function V9(e,t,n){return t=Sv(t),G9(e,RO()?Reflect.construct(t,n||[],Sv(e).constructor):t.apply(e,n))}function G9(e,t){if(t&&("object"===Gu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return K9(e)}function K9(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function RO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(RO=function(){return!!e})()}function Sv(e){return(Sv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Y9(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ox(e,t)}function ox(e,t){return(ox=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ed(e,t,n){return(t=TO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TO(e){var t=X9(e,"string");return"symbol"==Gu(t)?t:t+""}function X9(e,t){if("object"!=Gu(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Gu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}PO.registerSymbol=q9;var gy,kC,yy,MC,by,LC,wy,jC,xy,FC,_y,BC,$y,qC,Sy,zC,Cy,WC,Ey,UC,Py,HC,Ry,VC,Ty,GC,Oy,KC,Ay,YC,Ny,XC,Dy,QC,Iy,ZC,ky,JC,My,eE,Ly,tE,jy,nE,Fy,rE,By,oE,Po=32,o_=function(){function e(){return W9(this,e),V9(this,e,arguments)}return Y9(e,zv),H9(e,[{key:"renderIcon",value:function(e){var t=this.props.inactiveColor,n=Po/2,r=Po/6,o=Po/3,i=e.inactive?t:e.color;if("plainline"===e.type)return ye.createElement("line",{strokeWidth:4,fill:"none",stroke:i,strokeDasharray:e.payload.strokeDasharray,x1:0,y1:n,x2:Po,y2:n,className:"recharts-legend-icon"});if("line"===e.type)return ye.createElement("path",{strokeWidth:4,fill:"none",stroke:i,d:"M0,".concat(n,"h").concat(o,"\n A").concat(r,",").concat(r,",0,1,1,").concat(2*o,",").concat(n,"\n H").concat(Po,"M").concat(2*o,",").concat(n,"\n A").concat(r,",").concat(r,",0,1,1,").concat(o,",").concat(n),className:"recharts-legend-icon"});if("rect"===e.type)return ye.createElement("path",{stroke:"none",fill:i,d:"M0,".concat(Po/8,"h").concat(Po,"v").concat(3*Po/4,"h").concat(-Po,"z"),className:"recharts-legend-icon"});if(ye.isValidElement(e.legendIcon)){var a=z9({},e);return delete a.legendIcon,ye.cloneElement(e.legendIcon,a)}return ye.createElement(PO,{fill:i,cx:n,cy:n,size:Po,sizeType:"diameter",type:e.type})}},{key:"renderItems",value:function(){var e=this,t=this.props,n=t.payload,r=t.iconSize,o=t.layout,i=t.formatter,a=t.inactiveColor,l={x:0,y:0,width:Po,height:Po},u={display:"horizontal"===o?"inline-block":"block",marginRight:10},s={display:"inline-block",verticalAlign:"middle",marginRight:4};return n.map((function(t,n){var o=t.formatter||i,c=Za(Ed(Ed({"recharts-legend-item":!0},"legend-item-".concat(n),!0),"inactive",t.inactive));if("none"===t.type)return null;var d=wv(t.value)?null:t.value;mv(!wv(t.value),'The name property is also required when using a function for the dataKey of a chart\'s cartesian components. Ex: <Bar name="Name of my Data"/>');var f=t.inactive?a:t.color;return ye.createElement("li",rx({className:c,style:u,key:"legend-item-".concat(n)},t9(e.props,t,n)),ye.createElement(s9,{width:r,height:r,viewBox:l,style:s},e.renderIcon(t)),ye.createElement("span",{className:"recharts-legend-item-text",style:{color:f}},o?o(d,t,n):d))}))}},{key:"render",value:function(){var e=this.props,t=e.payload,n=e.layout,r=e.align;if(!t||!t.length)return null;var o={padding:0,margin:0,textAlign:"horizontal"===n?r:"left"};return ye.createElement("ul",{className:"recharts-default-legend",style:o},this.renderItems())}}])}();function Q9(){if(kC)return gy;kC=1;var e=nm();return gy=function(){this.__data__=new e,this.size=0}}function Z9(){if(MC)return yy;return MC=1,yy=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}}function J9(){if(LC)return by;return LC=1,by=function(e){return this.__data__.get(e)}}function e4(){if(jC)return wy;return jC=1,wy=function(e){return this.__data__.has(e)}}function t4(){if(FC)return xy;FC=1;var e=nm(),t=Zx(),n=Jx();return xy=function(r,o){var i=this.__data__;if(i instanceof e){var a=i.__data__;if(!t||a.length<199)return a.push([r,o]),this.size=++i.size,this;i=this.__data__=new n(a)}return i.set(r,o),this.size=i.size,this}}function i_(){if(BC)return _y;BC=1;var e=nm(),t=Q9(),n=Z9(),r=J9(),o=e4(),i=t4();function a(t){var n=this.__data__=new e(t);this.size=n.size}return a.prototype.clear=t,a.prototype.delete=n,a.prototype.get=r,a.prototype.has=o,a.prototype.set=i,_y=a}function n4(){if(qC)return $y;qC=1;return $y=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}}function r4(){if(zC)return Sy;return zC=1,Sy=function(e){return this.__data__.has(e)}}function OO(){if(WC)return Cy;WC=1;var e=Jx(),t=n4(),n=r4();function r(t){var n=-1,r=null==t?0:t.length;for(this.__data__=new e;++n<r;)this.add(t[n])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,Cy=r}function o4(){if(UC)return Ey;return UC=1,Ey=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}}function AO(){if(HC)return Py;return HC=1,Py=function(e,t){return e.has(t)}}function NO(){if(VC)return Ry;VC=1;var e=OO(),t=o4(),n=AO();return Ry=function(r,o,i,a,l,u){var s=1&i,c=r.length,d=o.length;if(c!=d&&!(s&&d>c))return!1;var f=u.get(r),p=u.get(o);if(f&&p)return f==o&&p==r;var h=-1,m=!0,v=2&i?new e:void 0;for(u.set(r,o),u.set(o,r);++h<c;){var g=r[h],y=o[h];if(a)var b=s?a(y,g,h,o,r,u):a(g,y,h,r,o,u);if(void 0!==b){if(b)continue;m=!1;break}if(v){if(!t(o,(function(e,t){if(!n(v,t)&&(g===e||l(g,e,i,a,u)))return v.push(t)}))){m=!1;break}}else if(g!==y&&!l(g,y,i,a,u)){m=!1;break}}return u.delete(r),u.delete(o),m}}function DO(){if(GC)return Ty;GC=1;var e=Er().Uint8Array;return Ty=e}function i4(){if(KC)return Oy;return KC=1,Oy=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}}function a_(){if(YC)return Ay;return YC=1,Ay=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}}function a4(){if(XC)return Ny;XC=1;var e=ac(),t=DO(),n=em(),r=NO(),o=i4(),i=a_(),a=e?e.prototype:void 0,l=a?a.valueOf:void 0;return Ny=function(e,a,u,s,c,d,f){switch(u){case"[object DataView]":if(e.byteLength!=a.byteLength||e.byteOffset!=a.byteOffset)return!1;e=e.buffer,a=a.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=a.byteLength||!d(new t(e),new t(a)));case"[object Boolean]":case"[object Date]":case"[object Number]":return n(+e,+a);case"[object Error]":return e.name==a.name&&e.message==a.message;case"[object RegExp]":case"[object String]":return e==a+"";case"[object Map]":var p=o;case"[object Set]":var h=1&s;if(p||(p=i),e.size!=a.size&&!h)return!1;var m=f.get(e);if(m)return m==a;s|=2,f.set(e,a);var v=r(p(e),p(a),s,c,d,f);return f.delete(e),v;case"[object Symbol]":if(l)return l.call(e)==l.call(a)}return!1}}function s_(){if(QC)return Dy;return QC=1,Dy=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}}function IO(){if(ZC)return Iy;ZC=1;var e=s_(),t=Cr();return Iy=function(n,r,o){var i=r(n);return t(n)?i:e(i,o(n))}}function s4(){if(JC)return ky;return JC=1,ky=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}}function kO(){if(eE)return My;return eE=1,My=function(){return[]}}function l_(){if(tE)return Ly;tE=1;var e=s4(),t=kO(),n=Object.prototype.propertyIsEnumerable,r=Object.getOwnPropertySymbols;return Ly=r?function(t){return null==t?[]:(t=Object(t),e(r(t),(function(e){return n.call(t,e)})))}:t}function l4(){if(nE)return jy;return nE=1,jy=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}}function u4(){if(rE)return Fy;rE=1;var e=ta(),t=fo();return Fy=function(n){return t(n)&&"[object Arguments]"==e(n)}}function u_(){if(oE)return By;oE=1;var e=u4(),t=fo(),n=Object.prototype,r=n.hasOwnProperty,o=n.propertyIsEnumerable,i=e(function(){return arguments}())?e:function(e){return t(e)&&r.call(e,"callee")&&!o.call(e,"callee")};return By=i}Ed(o_,"displayName","Legend"),Ed(o_,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var qy,iE,aE,zy,sE,Wy,lE,Uy,uE,Hy,cE,vd={exports:{}};function c4(){if(iE)return qy;return iE=1,qy=function(){return!1}}function c_(){return aE||(aE=1,e=vd,t=vd.exports,n=Er(),r=c4(),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o?n.Buffer:void 0,l=(a?a.isBuffer:void 0)||r,e.exports=l),vd.exports;var e,t,n,r,o,i,a,l}function im(){if(sE)return zy;sE=1;var e=/^(?:0|[1-9]\d*)$/;return zy=function(t,n){var r=typeof t;return!!(n=n??9007199254740991)&&("number"==r||"symbol"!=r&&e.test(t))&&t>-1&&t%1==0&&t<n}}function f_(){if(lE)return Wy;lE=1;return Wy=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}}function f4(){if(uE)return Uy;uE=1;var e=ta(),t=f_(),n=fo(),r={};return r["[object Float32Array]"]=r["[object Float64Array]"]=r["[object Int8Array]"]=r["[object Int16Array]"]=r["[object Int32Array]"]=r["[object Uint8Array]"]=r["[object Uint8ClampedArray]"]=r["[object Uint16Array]"]=r["[object Uint32Array]"]=!0,r["[object Arguments]"]=r["[object Array]"]=r["[object ArrayBuffer]"]=r["[object Boolean]"]=r["[object DataView]"]=r["[object Date]"]=r["[object Error]"]=r["[object Function]"]=r["[object Map]"]=r["[object Number]"]=r["[object Object]"]=r["[object RegExp]"]=r["[object Set]"]=r["[object String]"]=r["[object WeakMap]"]=!1,Uy=function(o){return n(o)&&t(o.length)&&!!r[e(o)]}}function am(){if(cE)return Hy;return cE=1,Hy=function(e){return function(t){return e(t)}}}vd.exports;var fE,Vy,dE,Gy,pE,Ky,hE,Yy,vE,Xy,mE,Qy,gE,Zy,yE,Jy,bE,eb,wE,tb,xE,nb,_E,rb,$E,ob,SE,ib,CE,ab,EE,sb,PE,lb,RE,ub,TE,cb,OE,fb,AE,db,NE,pb,DE,hb,IE,vb,kE,mb,ME,gb,LE,yb,jE,bb,FE,wb,BE,xb,qE,_b,zE,$b,WE,Sb,UE,Cb,HE,Eb,VE,Pb,GE,Rb,KE,Tb,YE,Ob,XE,Ab,QE,Nb,ZE,md={exports:{}};function d_(){return fE||(fE=1,e=md,t=md.exports,n=cO(),r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,i=o&&o.exports===r&&n.process,a=function(){try{return o&&o.require&&o.require("util").types||i&&i.binding&&i.binding("util")}catch{}}(),e.exports=a),md.exports;var e,t,n,r,o,i,a}function MO(){if(dE)return Vy;dE=1;var e=f4(),t=am(),n=d_(),r=n&&n.isTypedArray,o=r?t(r):e;return Vy=o}function LO(){if(pE)return Gy;pE=1;var e=l4(),t=u_(),n=Cr(),r=c_(),o=im(),i=MO(),a=Object.prototype.hasOwnProperty;return Gy=function(l,u){var s=n(l),c=!s&&t(l),d=!s&&!c&&r(l),f=!s&&!c&&!d&&i(l),p=s||c||d||f,h=p?e(l.length,String):[],m=h.length;for(var v in l)(u||a.call(l,v))&&(!p||!("length"==v||d&&("offset"==v||"parent"==v)||f&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||o(v,m)))&&h.push(v);return h}}function p_(){if(hE)return Ky;hE=1;var e=Object.prototype;return Ky=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}}function jO(){if(vE)return Yy;return vE=1,Yy=function(e,t){return function(n){return e(t(n))}}}function d4(){if(mE)return Xy;mE=1;var e=jO()(Object.keys,Object);return Xy=e}function FO(){if(gE)return Qy;gE=1;var e=p_(),t=d4(),n=Object.prototype.hasOwnProperty;return Qy=function(r){if(!e(r))return t(r);var o=[];for(var i in Object(r))n.call(r,i)&&"constructor"!=i&&o.push(i);return o}}function zd(){if(yE)return Zy;yE=1;var e=Zv(),t=f_();return Zy=function(n){return null!=n&&t(n.length)&&!e(n)}}function Wd(){if(bE)return Jy;bE=1;var e=LO(),t=FO(),n=zd();return Jy=function(r){return n(r)?e(r):t(r)}}function BO(){if(wE)return eb;wE=1;var e=IO(),t=l_(),n=Wd();return eb=function(r){return e(r,n,t)}}function p4(){if(xE)return tb;xE=1;var e=BO(),t=Object.prototype.hasOwnProperty;return tb=function(n,r,o,i,a,l){var u=1&o,s=e(n),c=s.length;if(c!=e(r).length&&!u)return!1;for(var d=c;d--;){var f=s[d];if(!(u?f in r:t.call(r,f)))return!1}var p=l.get(n),h=l.get(r);if(p&&h)return p==r&&h==n;var m=!0;l.set(n,r),l.set(r,n);for(var v=u;++d<c;){var g=n[f=s[d]],y=r[f];if(i)var b=u?i(y,g,f,r,n,l):i(g,y,f,n,r,l);if(!(void 0===b?g===y||a(g,y,o,i,l):b)){m=!1;break}v||(v="constructor"==f)}if(m&&!v){var w=n.constructor,x=r.constructor;w!=x&&"constructor"in n&&"constructor"in r&&!("function"==typeof w&&w instanceof w&&"function"==typeof x&&x instanceof x)&&(m=!1)}return l.delete(n),l.delete(r),m}}function h4(){if(_E)return nb;_E=1;var e=gl()(Er(),"DataView");return nb=e}function v4(){if($E)return rb;$E=1;var e=gl()(Er(),"Promise");return rb=e}function qO(){if(SE)return ob;SE=1;var e=gl()(Er(),"Set");return ob=e}function zO(){if(CE)return ib;CE=1;var e=gl()(Er(),"WeakMap");return ib=e}function Ud(){if(EE)return ab;EE=1;var e=h4(),t=Zx(),n=v4(),r=qO(),o=zO(),i=ta(),a=fO(),l="[object Map]",u="[object Promise]",s="[object Set]",c="[object WeakMap]",d="[object DataView]",f=a(e),p=a(t),h=a(n),m=a(r),v=a(o),g=i;return(e&&g(new e(new ArrayBuffer(1)))!=d||t&&g(new t)!=l||n&&g(n.resolve())!=u||r&&g(new r)!=s||o&&g(new o)!=c)&&(g=function(e){var t=i(e),n="[object Object]"==t?e.constructor:void 0,r=n?a(n):"";if(r)switch(r){case f:return d;case p:return l;case h:return u;case m:return s;case v:return c}return t}),ab=g}function m4(){if(PE)return sb;PE=1;var e=i_(),t=NO(),n=a4(),r=p4(),o=Ud(),i=Cr(),a=c_(),l=MO(),u="[object Arguments]",s="[object Array]",c="[object Object]",d=Object.prototype.hasOwnProperty;return sb=function(f,p,h,m,v,g){var y=i(f),b=i(p),w=y?s:o(f),x=b?s:o(p),_=(w=w==u?c:w)==c,k=(x=x==u?c:x)==c,P=w==x;if(P&&a(f)){if(!a(p))return!1;y=!0,_=!1}if(P&&!_)return g||(g=new e),y||l(f)?t(f,p,h,m,v,g):n(f,p,w,h,m,v,g);if(!(1&h)){var S=_&&d.call(f,"__wrapped__"),C=k&&d.call(p,"__wrapped__");if(S||C){var E=S?f.value():f,N=C?p.value():p;return g||(g=new e),v(E,N,h,m,g)}}return!!P&&(g||(g=new e),r(f,p,h,m,v,g))}}function WO(){if(RE)return lb;RE=1;var e=m4(),t=fo();return lb=function n(r,o,i,a,l){return r===o||(null==r||null==o||!t(r)&&!t(o)?r!=r&&o!=o:e(r,o,i,a,n,l))},lb}function g4(){if(TE)return ub;TE=1;var e=i_(),t=WO();return ub=function(n,r,o,i){var a=o.length,l=a,u=!i;if(null==n)return!l;for(n=Object(n);a--;){var s=o[a];if(u&&s[2]?s[1]!==n[s[0]]:!(s[0]in n))return!1}for(;++a<l;){var c=(s=o[a])[0],d=n[c],f=s[1];if(u&&s[2]){if(void 0===d&&!(c in n))return!1}else{var p=new e;if(i)var h=i(d,f,c,n,r,p);if(!(void 0===h?t(f,d,3,i,p):h))return!1}}return!0}}function UO(){if(OE)return cb;OE=1;var e=No();return cb=function(t){return t==t&&!e(t)}}function y4(){if(AE)return fb;AE=1;var e=UO(),t=Wd();return fb=function(n){for(var r=t(n),o=r.length;o--;){var i=r[o],a=n[i];r[o]=[i,a,e(a)]}return r}}function HO(){if(NE)return db;return NE=1,db=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}}function b4(){if(DE)return pb;DE=1;var e=g4(),t=y4(),n=HO();return pb=function(r){var o=t(r);return 1==o.length&&o[0][2]?n(o[0][0],o[0][1]):function(t){return t===r||e(t,r,o)}}}function w4(){if(IE)return hb;return IE=1,hb=function(e,t){return null!=e&&t in Object(e)}}function x4(){if(kE)return vb;kE=1;var e=pO(),t=u_(),n=Cr(),r=im(),o=f_(),i=qd();return vb=function(a,l,u){for(var s=-1,c=(l=e(l,a)).length,d=!1;++s<c;){var f=i(l[s]);if(!(d=null!=a&&u(a,f)))break;a=a[f]}return d||++s!=c?d:!!(c=null==a?0:a.length)&&o(c)&&r(f,c)&&(n(a)||t(a))}}function _4(){if(ME)return mb;ME=1;var e=w4(),t=x4();return mb=function(n,r){return null!=n&&t(n,r,e)}}function $4(){if(LE)return gb;LE=1;var e=WO(),t=hO(),n=_4(),r=Qx(),o=UO(),i=HO(),a=qd();return gb=function(l,u){return r(l)&&o(u)?i(a(l),u):function(r){var o=t(r,l);return void 0===o&&o===u?n(r,l):e(u,o,3)}}}function Hd(){if(jE)return yb;return jE=1,yb=function(e){return e}}function S4(){if(FE)return bb;return FE=1,bb=function(e){return function(t){return null==t?void 0:t[e]}}}function C4(){if(BE)return wb;BE=1;var e=n_();return wb=function(t){return function(n){return e(n,t)}}}function E4(){if(qE)return xb;qE=1;var e=S4(),t=C4(),n=Qx(),r=qd();return xb=function(o){return n(o)?e(r(o)):t(o)}}function h_(){if(zE)return _b;zE=1;var e=b4(),t=$4(),n=Hd(),r=Cr(),o=E4();return _b=function(i){return"function"==typeof i?i:null==i?n:"object"==typeof i?r(i)?t(i[0],i[1]):e(i):o(i)}}function P4(){if(WE)return $b;return WE=1,$b=function(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}}function R4(){if(UE)return Sb;return UE=1,Sb=function(e){return e!=e}}function T4(){if(HE)return Cb;return HE=1,Cb=function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}}function O4(){if(VE)return Eb;VE=1;var e=P4(),t=R4(),n=T4();return Eb=function(r,o,i){return o==o?n(r,o,i):e(r,t,i)}}function VO(){if(GE)return Pb;GE=1;var e=O4();return Pb=function(t,n){return!!(null==t?0:t.length)&&e(t,n,0)>-1}}function A4(){if(KE)return Rb;return KE=1,Rb=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}}function GO(){if(YE)return Tb;return YE=1,Tb=function(){}}function N4(){if(XE)return Ob;XE=1;var e=qO(),t=GO(),n=a_(),r=e&&1/n(new e([,-0]))[1]==1/0?function(t){return new e(t)}:t;return Ob=r}function D4(){if(QE)return Ab;QE=1;var e=OO(),t=VO(),n=A4(),r=AO(),o=N4(),i=a_();return Ab=function(a,l,u){var s=-1,c=t,d=a.length,f=!0,p=[],h=p;if(u)f=!1,c=n;else if(d>=200){var m=l?null:o(a);if(m)return i(m);f=!1,c=r,h=new e}else h=l?[]:p;e:for(;++s<d;){var v=a[s],g=l?l(v):v;if(v=u||0!==v?v:0,f&&g==g){for(var y=h.length;y--;)if(h[y]===g)continue e;l&&h.push(g),p.push(v)}else c(h,g,u)||(h!==p&&h.push(g),p.push(v))}return p}}function I4(){if(ZE)return Nb;ZE=1;var e=h_(),t=D4();return Nb=function(n,r){return n&&n.length?t(n,e(r,2)):[]}}md.exports;var k4=I4();const JE=Oo(k4);function KO(e,t,n){return!0===t?JE(e,n):wv(t)?JE(e,t):e}function Ku(e){return(Ku="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var M4=["ref"];function eP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Vi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eP(Object(n),!0).forEach((function(t){sm(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function L4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,XO(r.key),r)}}function j4(e,t,n){return tP(e.prototype,t),tP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function F4(e,t,n){return t=Cv(t),B4(e,YO()?Reflect.construct(t,n,Cv(e).constructor):t.apply(e,n))}function B4(e,t){if(t&&("object"===Ku(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return q4(e)}function q4(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function YO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(YO=function(){return!!e})()}function Cv(e){return(Cv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function z4(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ix(e,t)}function ix(e,t){return(ix=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function sm(e,t,n){return(t=XO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function XO(e){var t=W4(e,"string");return"symbol"==Ku(t)?t:t+""}function W4(e,t){if("object"!=Ku(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Ku(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function U4(e,t){if(null==e)return{};var n,r,o=H4(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function H4(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function V4(e){return e.value}function G4(e,t){if(ye.isValidElement(e))return ye.cloneElement(e,t);if("function"==typeof e)return ye.createElement(e,t);t.ref;var n=U4(t,M4);return ye.createElement(o_,n)}var Db,rP,Ib,oP,kb,iP,Mb,aP,Lb,sP,jb,lP,Fb,uP,Bb,cP,qb,fP,zb,dP,Wb,pP,Ub,hP,Hb,vP,Vb,mP,Gb,gP,Kb,yP,Yb,bP,Xb,wP,Qb,xP,Zb,_P,Jb,$P,e1,SP,nP=1,v_=function(){function e(){var t;L4(this,e);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return sm(t=F4(this,e,[].concat(r)),"lastBoundingBox",{width:-1,height:-1}),t}return z4(e,zv),j4(e,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();return e.height=this.wrapperNode.offsetHeight,e.width=this.wrapperNode.offsetWidth,e}return null}},{key:"updateBBox",value:function(){var e=this.props.onBBoxUpdate,t=this.getBBox();t?(Math.abs(t.width-this.lastBoundingBox.width)>nP||Math.abs(t.height-this.lastBoundingBox.height)>nP)&&(this.lastBoundingBox.width=t.width,this.lastBoundingBox.height=t.height,e&&e(t)):(-1!==this.lastBoundingBox.width||-1!==this.lastBoundingBox.height)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,e&&e(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Vi({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(e){var t,n,r=this.props,o=r.layout,i=r.align,a=r.verticalAlign,l=r.margin,u=r.chartWidth,s=r.chartHeight;if(!e||(void 0===e.left||null===e.left)&&(void 0===e.right||null===e.right))if("center"===i&&"vertical"===o){t={left:((u||0)-this.getBBoxSnapshot().width)/2}}else t="right"===i?{right:l&&l.right||0}:{left:l&&l.left||0};if(!e||(void 0===e.top||null===e.top)&&(void 0===e.bottom||null===e.bottom))if("middle"===a){n={top:((s||0)-this.getBBoxSnapshot().height)/2}}else n="bottom"===a?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return Vi(Vi({},t),n)}},{key:"render",value:function(){var e=this,t=this.props,n=t.content,r=t.width,o=t.height,i=t.wrapperStyle,a=t.payloadUniqBy,l=t.payload,u=Vi(Vi({position:"absolute",width:r||"auto",height:o||"auto"},this.getDefaultPosition(i)),i);return ye.createElement("div",{className:"recharts-legend-wrapper",style:u,ref:function(t){e.wrapperNode=t}},G4(n,Vi(Vi({},this.props),{},{payload:KO(l,a,V4)})))}}],[{key:"getWithHeight",value:function(e,t){var n=Vi(Vi({},this.defaultProps),e.props).layout;return"vertical"===n&&Wo(e.props.height)?{height:e.props.height}:"horizontal"===n?{width:e.props.width||t}:null}}])}();function K4(){if(rP)return Db;rP=1;var e=ac(),t=u_(),n=Cr(),r=e?e.isConcatSpreadable:void 0;return Db=function(e){return n(e)||t(e)||!!(r&&e&&e[r])}}function QO(){if(oP)return Ib;oP=1;var e=s_(),t=K4();return Ib=function n(r,o,i,a,l){var u=-1,s=r.length;for(i||(i=t),l||(l=[]);++u<s;){var c=r[u];o>0&&i(c)?o>1?n(c,o-1,i,a,l):e(l,c):a||(l[l.length]=c)}return l},Ib}function Y4(){if(iP)return kb;return iP=1,kb=function(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),l=a.length;l--;){var u=a[e?l:++o];if(!1===n(i[u],u,i))break}return t}}}function X4(){if(aP)return Mb;aP=1;var e=Y4()();return Mb=e}function Q4(){if(sP)return Lb;sP=1;var e=X4(),t=Wd();return Lb=function(n,r){return n&&e(n,r,t)}}function Z4(){if(lP)return jb;lP=1;var e=zd();return jb=function(t,n){return function(r,o){if(null==r)return r;if(!e(r))return t(r,o);for(var i=r.length,a=n?i:-1,l=Object(r);(n?a--:++a<i)&&!1!==o(l[a],a,l););return r}}}function J4(){if(uP)return Fb;uP=1;var e=Q4(),t=Z4()(e);return Fb=t}function eL(){if(cP)return Bb;cP=1;var e=J4(),t=zd();return Bb=function(n,r){var o=-1,i=t(n)?Array(n.length):[];return e(n,(function(e,t,n){i[++o]=r(e,t,n)})),i}}function tL(){if(fP)return qb;return fP=1,qb=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}}function nL(){if(dP)return zb;dP=1;var e=sc();return zb=function(t,n){if(t!==n){var r=void 0!==t,o=null===t,i=t==t,a=e(t),l=void 0!==n,u=null===n,s=n==n,c=e(n);if(!u&&!c&&!a&&t>n||a&&l&&s&&!u&&!c||o&&l&&s||!r&&s||!i)return 1;if(!o&&!a&&!c&&t<n||c&&r&&i&&!o&&!a||u&&r&&i||!l&&i||!s)return-1}return 0}}function rL(){if(pP)return Wb;pP=1;var e=nL();return Wb=function(t,n,r){for(var o=-1,i=t.criteria,a=n.criteria,l=i.length,u=r.length;++o<l;){var s=e(i[o],a[o]);if(s)return o>=u?s:s*("desc"==r[o]?-1:1)}return t.index-n.index}}function oL(){if(hP)return Ub;hP=1;var e=e_(),t=n_(),n=h_(),r=eL(),o=tL(),i=am(),a=rL(),l=Hd(),u=Cr();return Ub=function(s,c,d){c=c.length?e(c,(function(e){return u(e)?function(n){return t(n,1===e.length?e[0]:e)}:e})):[l];var f=-1;c=e(c,i(n));var p=r(s,(function(t,n,r){return{criteria:e(c,(function(e){return e(t)})),index:++f,value:t}}));return o(p,(function(e,t){return a(e,t,d)}))}}function m_(){if(vP)return Hb;return vP=1,Hb=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}}function ZO(){if(mP)return Vb;mP=1;var e=m_(),t=Math.max;return Vb=function(n,r,o){return r=t(void 0===r?n.length-1:r,0),function(){for(var i=arguments,a=-1,l=t(i.length-r,0),u=Array(l);++a<l;)u[a]=i[r+a];a=-1;for(var s=Array(r+1);++a<r;)s[a]=i[a];return s[r]=o(u),e(n,this,s)}},Vb}function iL(){if(gP)return Gb;return gP=1,Gb=function(e){return function(){return e}}}function JO(){if(yP)return Kb;yP=1;var e=gl(),t=function(){try{var t=e(Object,"defineProperty");return t({},"",{}),t}catch{}}();return Kb=t}function aL(){if(bP)return Yb;bP=1;var e=iL(),t=JO(),n=Hd();return Yb=t?function(n,r){return t(n,"toString",{configurable:!0,enumerable:!1,value:e(r),writable:!0})}:n}function eA(){if(wP)return Xb;wP=1;var e=Date.now;return Xb=function(t){var n=0,r=0;return function(){var o=e(),i=16-(o-r);if(r=o,i>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}},Xb}function g_(){if(xP)return Qb;xP=1;var e=aL(),t=eA()(e);return Qb=t}function sL(){if(_P)return Zb;_P=1;var e=Hd(),t=ZO(),n=g_();return Zb=function(r,o){return n(t(r,o,e),r+"")}}function lL(){if($P)return Jb;$P=1;var e=em(),t=zd(),n=im(),r=No();return Jb=function(o,i,a){if(!r(a))return!1;var l=typeof i;return!!("number"==l?t(a)&&n(i,a.length):"string"==l&&i in a)&&e(a[i],o)}}function uL(){if(SP)return e1;SP=1;var e=QO(),t=oL(),n=sL(),r=lL(),o=n((function(n,o){if(null==n)return[];var i=o.length;return i>1&&r(n,o[0],o[1])?o=[]:i>2&&r(o[0],o[1],o[2])&&(o=[o[0]]),t(n,e(o,1),[])}));return e1=o}sm(v_,"displayName","Legend"),sm(v_,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var cL=uL();const fL=Oo(cL);function Pd(e){return(Pd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ax(){return ax=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ax.apply(this,arguments)}function dL(e,t){return mL(e)||vL(e,t)||hL(e,t)||pL()}function pL(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function hL(e,t){if(e){if("string"==typeof e)return CP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return CP(e,t)}}function CP(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function vL(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0!==t)for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}function mL(e){if(Array.isArray(e))return e}function EP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t1(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?EP(Object(n),!0).forEach((function(t){gL(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):EP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function gL(e,t,n){return(t=yL(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yL(e){var t=bL(e,"string");return"symbol"==Pd(t)?t:t+""}function bL(e,t){if("object"!=Pd(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Pd(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function wL(e){return Array.isArray(e)&&xv(e[0])&&xv(e[1])?e.join(" ~ "):e}var xL=function(e){var t=e.separator,n=void 0===t?" : ":t,r=e.contentStyle,o=void 0===r?{}:r,i=e.itemStyle,a=void 0===i?{}:i,l=e.labelStyle,u=void 0===l?{}:l,s=e.payload,c=e.formatter,d=e.itemSorter,f=e.wrapperClassName,p=e.labelClassName,h=e.label,m=e.labelFormatter,v=e.accessibilityLayer,g=void 0!==v&&v,y=t1({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},o),b=t1({margin:0},u),w=!B5(h),x=w?h:"",_=Za("recharts-default-tooltip",f),k=Za("recharts-tooltip-label",p);w&&m&&null!=s&&(x=m(h,s));var P=g?{role:"status","aria-live":"assertive"}:{};return ye.createElement("div",ax({className:_,style:y},P),ye.createElement("p",{className:k,style:b},ye.isValidElement(x)?x:"".concat(x)),function(){if(s&&s.length){var e=(d?fL(s,d):s).map((function(e,t){if("none"===e.type)return null;var r=t1({display:"block",paddingTop:4,paddingBottom:4,color:e.color||"#000"},a),o=e.formatter||c||wL,i=e.value,l=e.name,u=i,d=l;if(null!=u&&null!=d){var f=o(i,l,e,t,s);if(Array.isArray(f)){var p=dL(f,2);u=p[0],d=p[1]}else u=f}return ye.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(t),style:r},xv(d)?ye.createElement("span",{className:"recharts-tooltip-item-name"},d):null,xv(d)?ye.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,ye.createElement("span",{className:"recharts-tooltip-item-value"},u),ye.createElement("span",{className:"recharts-tooltip-item-unit"},e.unit||""))}));return ye.createElement("ul",{className:"recharts-tooltip-item-list",style:{padding:0,margin:0}},e)}return null}())};function Rd(e){return(Rd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function rv(e,t,n){return(t=_L(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _L(e){var t=$L(e,"string");return"symbol"==Rd(t)?t:t+""}function $L(e,t){if("object"!=Rd(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Rd(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var cd="recharts-tooltip-wrapper",SL={visibility:"hidden"};function CL(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return Za(cd,rv(rv(rv(rv({},"".concat(cd,"-right"),Wo(n)&&t&&Wo(t.x)&&n>=t.x),"".concat(cd,"-left"),Wo(n)&&t&&Wo(t.x)&&n<t.x),"".concat(cd,"-bottom"),Wo(r)&&t&&Wo(t.y)&&r>=t.y),"".concat(cd,"-top"),Wo(r)&&t&&Wo(t.y)&&r<t.y))}function PP(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,o=e.offsetTopLeft,i=e.position,a=e.reverseDirection,l=e.tooltipDimension,u=e.viewBox,s=e.viewBoxDimension;if(i&&Wo(i[r]))return i[r];var c=n[r]-l-o,d=n[r]+o;return t[r]?a[r]?c:d:a[r]?c<u[r]?Math.max(d,u[r]):Math.max(c,u[r]):d+l>u[r]+s?Math.max(c,u[r]):Math.max(d,u[r])}function EL(e){var t=e.translateX,n=e.translateY;return{transform:e.useTranslate3d?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function PL(e){var t,n,r,o=e.allowEscapeViewBox,i=e.coordinate,a=e.offsetTopLeft,l=e.position,u=e.reverseDirection,s=e.tooltipBox,c=e.useTranslate3d,d=e.viewBox;return s.height>0&&s.width>0&&i?t=EL({translateX:n=PP({allowEscapeViewBox:o,coordinate:i,key:"x",offsetTopLeft:a,position:l,reverseDirection:u,tooltipDimension:s.width,viewBox:d,viewBoxDimension:d.width}),translateY:r=PP({allowEscapeViewBox:o,coordinate:i,key:"y",offsetTopLeft:a,position:l,reverseDirection:u,tooltipDimension:s.height,viewBox:d,viewBoxDimension:d.height}),useTranslate3d:c}):t=SL,{cssProperties:t,cssClasses:CL({translateX:n,translateY:r,coordinate:i})}}function Yu(e){return(Yu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function RP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function TP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?RP(Object(n),!0).forEach((function(t){lx(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function RL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TL(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,nA(r.key),r)}}function OL(e,t,n){return TL(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function AL(e,t,n){return t=Ev(t),NL(e,tA()?Reflect.construct(t,n,Ev(e).constructor):t.apply(e,n))}function NL(e,t){if(t&&("object"===Yu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return DL(e)}function DL(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(tA=function(){return!!e})()}function Ev(e){return(Ev=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function IL(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sx(e,t)}function sx(e,t){return(sx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function lx(e,t,n){return(t=nA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nA(e){var t=kL(e,"string");return"symbol"==Yu(t)?t:t+""}function kL(e,t){if("object"!=Yu(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=Yu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var OP=1,ML=function(){function e(){var t;RL(this,e);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return lx(t=AL(this,e,[].concat(r)),"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),lx(t,"handleKeyDown",(function(e){var n,r,o,i;"Escape"===e.key&&t.setState({dismissed:!0,dismissedAtCoordinate:{x:null!==(n=null===(r=t.props.coordinate)||void 0===r?void 0:r.x)&&void 0!==n?n:0,y:null!==(o=null===(i=t.props.coordinate)||void 0===i?void 0:i.y)&&void 0!==o?o:0}})})),t}return IL(e,zv),OL(e,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();(Math.abs(e.width-this.state.lastBoundingBox.width)>OP||Math.abs(e.height-this.state.lastBoundingBox.height)>OP)&&this.setState({lastBoundingBox:{width:e.width,height:e.height}})}else(-1!==this.state.lastBoundingBox.width||-1!==this.state.lastBoundingBox.height)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var e,t;this.props.active&&this.updateBBox(),this.state.dismissed&&((null===(e=this.props.coordinate)||void 0===e?void 0:e.x)!==this.state.dismissedAtCoordinate.x||(null===(t=this.props.coordinate)||void 0===t?void 0:t.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var e=this,t=this.props,n=t.active,r=t.allowEscapeViewBox,o=t.animationDuration,i=t.animationEasing,a=t.children,l=t.coordinate,u=t.hasPayload,s=t.isAnimationActive,c=t.offset,d=t.position,f=t.reverseDirection,p=t.useTranslate3d,h=t.viewBox,m=t.wrapperStyle,v=PL({allowEscapeViewBox:r,coordinate:l,offsetTopLeft:c,position:d,reverseDirection:f,tooltipBox:this.state.lastBoundingBox,useTranslate3d:p,viewBox:h}),g=v.cssClasses,y=v.cssProperties,b=TP(TP({transition:s&&n?"transform ".concat(o,"ms ").concat(i):void 0},y),{},{pointerEvents:"none",visibility:!this.state.dismissed&&n&&u?"visible":"hidden",position:"absolute",top:0,left:0},m);return ye.createElement("div",{tabIndex:-1,className:g,style:b,ref:function(t){e.wrapperNode=t}},a)}}])}(),LL=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},gv={isSsr:LL(),get:function(e){return gv[e]},set:function(e,t){if("string"==typeof e)gv[e]=t;else{var n=Object.keys(e);n&&n.length&&n.forEach((function(t){gv[t]=e[t]}))}}};function Xu(e){return(Xu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function AP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function NP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?AP(Object(n),!0).forEach((function(t){y_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function jL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function FL(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,oA(r.key),r)}}function BL(e,t,n){return FL(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function qL(e,t,n){return t=Pv(t),zL(e,rA()?Reflect.construct(t,n||[],Pv(e).constructor):t.apply(e,n))}function zL(e,t){if(t&&("object"===Xu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return WL(e)}function WL(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(rA=function(){return!!e})()}function Pv(e){return(Pv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function UL(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ux(e,t)}function ux(e,t){return(ux=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function y_(e,t,n){return(t=oA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oA(e){var t=HL(e,"string");return"symbol"==Xu(t)?t:t+""}function HL(e,t){if("object"!=Xu(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Xu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function VL(e){return e.dataKey}function GL(e,t){return ye.isValidElement(e)?ye.cloneElement(e,t):"function"==typeof e?ye.createElement(e,t):ye.createElement(xL,t)}var n1,DP,r1,IP,o1,kP,i1,MP,a1,LP,s1,jP,b_=function(){function e(){return jL(this,e),qL(this,e,arguments)}return UL(e,zv),BL(e,[{key:"render",value:function(){var e=this,t=this.props,n=t.active,r=t.allowEscapeViewBox,o=t.animationDuration,i=t.animationEasing,a=t.content,l=t.coordinate,u=t.filterNull,s=t.isAnimationActive,c=t.offset,d=t.payload,f=t.payloadUniqBy,p=t.position,h=t.reverseDirection,m=t.useTranslate3d,v=t.viewBox,g=t.wrapperStyle,y=d??[];u&&y.length&&(y=KO(d.filter((function(t){return null!=t.value&&(!0!==t.hide||e.props.includeHidden)})),f,VL));var b=y.length>0;return ye.createElement(ML,{allowEscapeViewBox:r,animationDuration:o,animationEasing:i,isAnimationActive:s,active:n,coordinate:l,hasPayload:b,offset:c,position:p,reverseDirection:h,useTranslate3d:m,viewBox:v,wrapperStyle:g},GL(a,NP(NP({},this.props),{},{payload:y})))}}])}();function KL(){if(DP)return n1;DP=1;var e=Er();return n1=function(){return e.Date.now()}}function YL(){if(IP)return r1;IP=1;var e=/\s/;return r1=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}}function XL(){if(kP)return o1;kP=1;var e=YL(),t=/^\s+/;return o1=function(n){return n&&n.slice(0,e(n)+1).replace(t,"")}}function iA(){if(MP)return i1;MP=1;var e=XL(),t=No(),n=sc(),r=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,i=/^0o[0-7]+$/i,a=parseInt;return i1=function(l){if("number"==typeof l)return l;if(n(l))return NaN;if(t(l)){var u="function"==typeof l.valueOf?l.valueOf():l;l=t(u)?u+"":u}if("string"!=typeof l)return 0===l?l:+l;l=e(l);var s=o.test(l);return s||i.test(l)?a(l.slice(2),s?2:8):r.test(l)?NaN:+l}}function aA(){if(LP)return a1;LP=1;var e=No(),t=KL(),n=iA(),r=Math.max,o=Math.min;return a1=function(i,a,l){var u,s,c,d,f,p,h=0,m=!1,v=!1,g=!0;if("function"!=typeof i)throw new TypeError("Expected a function");function y(e){var t=u,n=s;return u=s=void 0,h=e,d=i.apply(n,t)}function b(e){var t=e-p;return void 0===p||t>=a||t<0||v&&e-h>=c}function w(){var e=t();if(b(e))return x(e);f=setTimeout(w,function(e){var t=a-(e-p);return v?o(t,c-(e-h)):t}(e))}function x(e){return f=void 0,g&&u?y(e):(u=s=void 0,d)}function _(){var e=t(),n=b(e);if(u=arguments,s=this,p=e,n){if(void 0===f)return function(e){return h=e,f=setTimeout(w,a),m?y(e):d}(p);if(v)return clearTimeout(f),f=setTimeout(w,a),y(p)}return void 0===f&&(f=setTimeout(w,a)),d}return a=n(a)||0,e(l)&&(m=!!l.leading,c=(v="maxWait"in l)?r(n(l.maxWait)||0,a):c,g="trailing"in l?!!l.trailing:g),_.cancel=function(){void 0!==f&&clearTimeout(f),h=0,u=p=s=f=void 0},_.flush=function(){return void 0===f?d:x(t())},_},a1}function QL(){if(jP)return s1;jP=1;var e=aA(),t=No();return s1=function(n,r,o){var i=!0,a=!0;if("function"!=typeof n)throw new TypeError("Expected a function");return t(o)&&(i="leading"in o?!!o.leading:i,a="trailing"in o?!!o.trailing:a),e(n,r,{leading:i,maxWait:r,trailing:a})}}y_(b_,"displayName","Tooltip"),y_(b_,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!gv.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var ZL=QL();const JL=Oo(ZL);function Td(e){return(Td="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function FP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ov(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?FP(Object(n),!0).forEach((function(t){ej(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ej(e,t,n){return(t=tj(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tj(e){var t=nj(e,"string");return"symbol"==Td(t)?t:t+""}function nj(e,t){if("object"!=Td(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Td(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function rj(e,t){return sj(e)||aj(e,t)||ij(e,t)||oj()}function oj(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ij(e,t){if(e){if("string"==typeof e)return BP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return BP(e,t)}}function BP(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function aj(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0!==t)for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}function sj(e){if(Array.isArray(e))return e}var l1,qP,u1,zP,c1,WP,f1,UP,d1,HP,p1,VP,h1,GP,v1,KP,m1,YP,g1,XP,y1,QP,b1,ZP,w1,JP,lj=_e((function(e,t){var n=e.aspect,r=e.initialDimension,o=void 0===r?{width:-1,height:-1}:r,i=e.width,a=void 0===i?"100%":i,l=e.height,u=void 0===l?"100%":l,s=e.minWidth,c=void 0===s?0:s,d=e.minHeight,f=e.maxHeight,p=e.children,h=e.debounce,m=void 0===h?0:h,v=e.id,g=e.className,y=e.onResize,b=e.style,w=void 0===b?{}:b,x=ke(null),_=ke();_.current=y,Zk(t,(function(){return Object.defineProperty(x.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),x.current},configurable:!0})}));var k=rj(tt({containerWidth:o.width,containerHeight:o.height}),2),P=k[0],S=k[1],C=lt((function(e,t){S((function(n){var r=Math.round(e),o=Math.round(t);return n.containerWidth===r&&n.containerHeight===o?n:{containerWidth:r,containerHeight:o}}))}),[]);We((function(){var e=function(e){var t,n=e[0].contentRect,r=n.width,o=n.height;C(r,o),null===(t=_.current)||void 0===t||t.call(_,r,o)};m>0&&(e=JL(e,m,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),n=x.current.getBoundingClientRect(),r=n.width,o=n.height;return C(r,o),t.observe(x.current),function(){t.disconnect()}}),[C,m]);var E=Ur((function(){var e=P.containerWidth,t=P.containerHeight;if(e<0||t<0)return null;mv(tv(a)||tv(u),"The width(%s) and height(%s) are both fixed numbers,\n maybe you don't need to use a ResponsiveContainer.",a,u),mv(!n||n>0,"The aspect(%s) must be greater than zero.",n);var r=tv(a)?e:a,o=tv(u)?t:u;n&&n>0&&(r?o=r/n:o&&(r=o*n),f&&o>f&&(o=f)),mv(r>0||o>0,"The width(%s) and height(%s) of chart should be greater than 0,\n please check the style of container, or the props width(%s) and height(%s),\n or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the\n height and width.",r,o,a,u,c,d,n);var i=!Array.isArray(p)&&n9(p.type).endsWith("Chart");return ye.Children.map(p,(function(e){return ye.isValidElement(e)?ml(e,ov({width:r,height:o},i?{style:ov({height:"100%",width:"100%",maxHeight:o,maxWidth:r},e.props.style)}:{})):e}))}),[n,p,u,f,d,c,P,a]);return ye.createElement("div",{id:v?"".concat(v):void 0,className:Za("recharts-responsive-container",g),style:ov(ov({},w),{},{width:a,height:u,minWidth:c,minHeight:d,maxHeight:f}),ref:x},E)}));function w_(){if(qP)return l1;qP=1;var e=jO()(Object.getPrototypeOf,Object);return l1=e}function uj(){if(zP)return u1;zP=1;var e=ta(),t=w_(),n=fo(),r=Function.prototype,o=Object.prototype,i=r.toString,a=o.hasOwnProperty,l=i.call(Object);return u1=function(r){if(!n(r)||"[object Object]"!=e(r))return!1;var o=t(r);if(null===o)return!0;var u=a.call(o,"constructor")&&o.constructor;return"function"==typeof u&&u instanceof u&&i.call(u)==l}}function cj(){if(WP)return c1;WP=1;var e=iA(),t=1/0;return c1=function(n){return n?(n=e(n))===t||n===-t?17976931348623157e292*(n<0?-1:1):n==n?n:0:0===n?n:0}}function sA(){if(UP)return f1;UP=1;var e=JO();return f1=function(t,n,r){"__proto__"==n&&e?e(t,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[n]=r}}function lA(){if(HP)return d1;HP=1;var e=cj();return d1=function(t){var n=e(t),r=n%1;return n==n?r?n-r:n:0}}function x_(){if(VP)return p1;return VP=1,p1=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}}function uA(){if(GP)return h1;GP=1;var e=sA(),t=em(),n=Object.prototype.hasOwnProperty;return h1=function(r,o,i){var a=r[o];(!n.call(r,o)||!t(a,i)||void 0===i&&!(o in r))&&e(r,o,i)}}function lm(){if(KP)return v1;KP=1;var e=uA(),t=sA();return v1=function(n,r,o,i){var a=!o;o||(o={});for(var l=-1,u=r.length;++l<u;){var s=r[l],c=i?i(o[s],n[s],s,o,n):void 0;void 0===c&&(c=n[s]),a?t(o,s,c):e(o,s,c)}return o}}function cA(){if(YP)return m1;YP=1;var e=lm(),t=Wd();return m1=function(n,r){return n&&e(r,t(r),n)}}function fj(){if(XP)return g1;return XP=1,g1=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}}function dj(){if(QP)return y1;QP=1;var e=No(),t=p_(),n=fj(),r=Object.prototype.hasOwnProperty;return y1=function(o){if(!e(o))return n(o);var i=t(o),a=[];for(var l in o)"constructor"==l&&(i||!r.call(o,l))||a.push(l);return a}}function __(){if(ZP)return b1;ZP=1;var e=LO(),t=dj(),n=zd();return b1=function(r){return n(r)?e(r,!0):t(r)}}function pj(){if(JP)return w1;JP=1;var e=lm(),t=__();return w1=function(n,r){return n&&e(r,t(r),n)}}var e2,x1,t2,_1,n2,$1,r2,S1,o2,C1,i2,E1,a2,P1,s2,R1,l2,T1,u2,O1,c2,A1,f2,N1,d2,D1,p2,I1,h2,k1,v2,M1,m2,L1,g2,j1,y2,F1,b2,B1,w2,q1,x2,gd={exports:{}};function hj(){return e2||(e2=1,e=gd,t=gd.exports,n=Er(),r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,i=o&&o.exports===r?n.Buffer:void 0,a=i?i.allocUnsafe:void 0,e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=a?a(n):new e.constructor(n);return e.copy(r),r}),gd.exports;var e,t,n,r,o,i,a}function um(){if(t2)return x1;return t2=1,x1=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}}function vj(){if(n2)return _1;n2=1;var e=lm(),t=l_();return _1=function(n,r){return e(n,t(n),r)}}function fA(){if(r2)return $1;r2=1;var e=s_(),t=w_(),n=l_(),r=kO(),o=Object.getOwnPropertySymbols;return $1=o?function(r){for(var o=[];r;)e(o,n(r)),r=t(r);return o}:r}function mj(){if(o2)return S1;o2=1;var e=lm(),t=fA();return S1=function(n,r){return e(n,t(n),r)}}function gj(){if(i2)return C1;i2=1;var e=IO(),t=fA(),n=__();return C1=function(r){return e(r,n,t)}}function yj(){if(a2)return E1;a2=1;var e=Object.prototype.hasOwnProperty;return E1=function(t){var n=t.length,r=new t.constructor(n);return n&&"string"==typeof t[0]&&e.call(t,"index")&&(r.index=t.index,r.input=t.input),r}}function $_(){if(s2)return P1;s2=1;var e=DO();return P1=function(t){var n=new t.constructor(t.byteLength);return new e(n).set(new e(t)),n}}function bj(){if(l2)return R1;l2=1;var e=$_();return R1=function(t,n){var r=n?e(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}}function wj(){if(u2)return T1;u2=1;var e=/\w*$/;return T1=function(t){var n=new t.constructor(t.source,e.exec(t));return n.lastIndex=t.lastIndex,n}}function xj(){if(c2)return O1;c2=1;var e=ac(),t=e?e.prototype:void 0,n=t?t.valueOf:void 0;return O1=function(e){return n?Object(n.call(e)):{}}}function _j(){if(f2)return A1;f2=1;var e=$_();return A1=function(t,n){var r=n?e(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}}function $j(){if(d2)return N1;d2=1;var e=$_(),t=bj(),n=wj(),r=xj(),o=_j();return N1=function(i,a,l){var u=i.constructor;switch(a){case"[object ArrayBuffer]":return e(i);case"[object Boolean]":case"[object Date]":return new u(+i);case"[object DataView]":return t(i,l);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return o(i,l);case"[object Map]":case"[object Set]":return new u;case"[object Number]":case"[object String]":return new u(i);case"[object RegExp]":return n(i);case"[object Symbol]":return r(i)}}}function cm(){if(p2)return D1;p2=1;var e=No(),t=Object.create;return D1=function(){function n(){}return function(r){if(!e(r))return{};if(t)return t(r);n.prototype=r;var o=new n;return n.prototype=void 0,o}}()}function Sj(){if(h2)return I1;h2=1;var e=cm(),t=w_(),n=p_();return I1=function(r){return"function"!=typeof r.constructor||n(r)?{}:e(t(r))}}function Cj(){if(v2)return k1;v2=1;var e=Ud(),t=fo();return k1=function(n){return t(n)&&"[object Map]"==e(n)}}function Ej(){if(m2)return M1;m2=1;var e=Cj(),t=am(),n=d_(),r=n&&n.isMap,o=r?t(r):e;return M1=o}function Pj(){if(g2)return L1;g2=1;var e=Ud(),t=fo();return L1=function(n){return t(n)&&"[object Set]"==e(n)}}function Rj(){if(y2)return j1;y2=1;var e=Pj(),t=am(),n=d_(),r=n&&n.isSet,o=r?t(r):e;return j1=o}function dA(){if(b2)return F1;b2=1;var e=i_(),t=x_(),n=uA(),r=cA(),o=pj(),i=hj(),a=um(),l=vj(),u=mj(),s=BO(),c=gj(),d=Ud(),f=yj(),p=$j(),h=Sj(),m=Cr(),v=c_(),g=Ej(),y=No(),b=Rj(),w=Wd(),x=__(),_="[object Arguments]",k="[object Function]",P="[object Object]",S={};return S[_]=S["[object Array]"]=S["[object ArrayBuffer]"]=S["[object DataView]"]=S["[object Boolean]"]=S["[object Date]"]=S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Map]"]=S["[object Number]"]=S[P]=S["[object RegExp]"]=S["[object Set]"]=S["[object String]"]=S["[object Symbol]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S["[object Error]"]=S[k]=S["[object WeakMap]"]=!1,F1=function C(E,N,O,T,R,j){var D,z=1&N,A=2&N,M=4&N;if(O&&(D=R?O(E,T,R,j):O(E)),void 0!==D)return D;if(!y(E))return E;var L=m(E);if(L){if(D=f(E),!z)return a(E,D)}else{var I=d(E),F=I==k||"[object GeneratorFunction]"==I;if(v(E))return i(E,z);if(I==P||I==_||F&&!R){if(D=A||F?{}:h(E),!z)return A?u(E,o(D,E)):l(E,r(D,E))}else{if(!S[I])return R?E:{};D=p(E,I,z)}}j||(j=new e);var W=j.get(E);if(W)return W;j.set(E,D),b(E)?E.forEach((function(e){D.add(C(e,N,O,e,E,j))})):g(E)&&E.forEach((function(e,t){D.set(t,C(e,N,O,t,E,j))}));var B=L?void 0:(M?A?c:s:A?x:w)(E);return t(B||E,(function(e,t){B&&(e=E[t=e]),n(D,t,C(e,N,O,t,E,j))})),D},F1}function Tj(){if(w2)return B1;w2=1;var e=QO();return B1=function(t){return(null==t?0:t.length)?e(t,1):[]}}function Oj(){if(x2)return q1;x2=1;var e=Tj(),t=ZO(),n=g_();return q1=function(r){return n(t(r,void 0,e),r+"")}}gd.exports;const Aj={light:"",dark:".dark"},pA=P.createContext(null);function hA(){const e=P.useContext(pA);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}const Nj=P.forwardRef((({id:e,className:t,children:n,config:r,...o},i)=>{const a=P.useId(),l=`chart-${e||a.replace(/:/g,"")}`;return k.jsx(pA.Provider,{value:{config:r},children:k.jsxs("div",{"data-chart":l,ref:i,className:se("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",t),...o,children:[k.jsx(Dj,{id:l,config:r}),k.jsx(lj,{children:n})]})})}));Nj.displayName="Chart";const Dj=({id:e,config:t})=>{const n=Object.entries(t).filter((([,e])=>e.theme||e.color));return n.length?k.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(Aj).map((([t,r])=>`\n${r} [data-chart=${e}] {\n${n.map((([e,n])=>{var r;const o=(null==(r=n.theme)?void 0:r[t])||n.color;return o?` --color-${e}: ${o};`:null})).join("\n")}\n}\n`)).join("\n")}}):null},eX=b_,Ij=P.forwardRef((({active:e,payload:t,className:n,indicator:r="dot",hideLabel:o=!1,hideIndicator:i=!1,label:a,labelFormatter:l,labelClassName:u,formatter:s,color:c,nameKey:d,labelKey:f,hoveredItem:p,onItemHover:h},m)=>{const{config:v}=hA(),g=P.useMemo((()=>{var e;if(o||null==t||!t.length)return null;const[n]=t,r=`${f||(null==n?void 0:n.dataKey)||(null==n?void 0:n.name)||"value"}`,i=cx(v,n,r),s=f||"string"!=typeof a?null==i?void 0:i.label:(null==(e=v[a])?void 0:e.label)||a;return l?k.jsx("div",{className:se("font-medium",u),children:l(s,t)}):s?k.jsx("div",{className:se("font-medium",u),children:s}):null}),[a,l,t,o,u,v,f]);if(!e||null==t||!t.length)return null;const y=1===t.length&&"dot"!==r,b=t.length>10;return k.jsxs("div",{ref:m,className:se("grid min-w-[8rem] items-start gap-xxs rounded-sm border border-border/50 bg-background px-xs py-xxs text-xs shadow-xl",b&&"min-w-[16rem]",n),children:[y?null:g,k.jsx("div",{className:se("grid gap-xxs",b&&"grid-cols-2 gap-x-s"),children:t.map(((e,t)=>{var n;const o=`${d||e.name||e.dataKey||"value"}`,a=cx(v,e,o),l=c||(null==(n=e.payload)?void 0:n.fill)||e.color||"",u=o===p;return k.jsx("div",{className:se("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground","dot"===r&&"items-center",u?"":p?"opacity-40":""),onMouseEnter:()=>null==h?void 0:h(o),onMouseLeave:()=>null==h?void 0:h(null),children:s&&void 0!==(null==e?void 0:e.value)&&void 0!==(null==e?void 0:e.payload)&&e.name?s(e.value,e.name,e,t,[e.payload]):k.jsxs(k.Fragment,{children:[null!=a&&a.icon?k.jsx(a.icon,{}):!i&&k.jsx("div",{className:se("shrink-0 rounded-full border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":"dot"===r,"w-1":"line"===r,"w-0 border border-dashed bg-transparent":"dashed"===r,"my-0.5":y&&"dashed"===r}),style:{"--color-bg":l,"--color-border":l}}),k.jsxs("div",{className:se("flex flex-1 justify-between leading-none",y?"items-end":"items-center"),children:[k.jsxs("div",{className:"grid gap-xxs",children:[y?g:null,k.jsx("span",{className:se("text-muted-foreground",u&&"font-medium text-foreground"),children:(null==a?void 0:a.label)||e.name})]}),e.value&&k.jsx("span",{className:se("font-mono font-medium tabular-nums text-foreground",u&&"font-bold"),children:e.value.toLocaleString()})]})]})},e.dataKey)}))})]})}));Ij.displayName="ChartTooltip";const tX=v_,kj=P.forwardRef((({className:e,hideIcon:t=!1,payload:n,nameKey:r,onItemHover:o,hoveredItem:i},a)=>{const{config:l}=hA(),u=P.useRef({});return P.useEffect((()=>{if(i&&u.current[i]){const e=u.current[i];e&&e.scrollIntoView({behavior:"smooth",block:"nearest"})}}),[i]),null!=n&&n.length?k.jsx("div",{ref:a,className:se("flex h-[150px] w-full flex-wrap items-center justify-center gap-l overflow-y-auto pb-xl",e),children:n.map((e=>{var n;const a=`${r||e.dataKey||"value"}`,s=cx(l,e,a),c=!!o&&a===i;return k.jsxs("div",{ref:e=>{e?u.current[a]=e:delete u.current[a]},className:se("group flex cursor-pointer select-none items-center gap-xs text-base transition-all duration-150",c?"scale-105 text-black":i?"text-gray-700 opacity-40":"text-gray-700"),onMouseEnter:()=>null==o?void 0:o(e.dataKey),onMouseLeave:()=>null==o?void 0:o(null),children:[null!=s&&s.icon&&!t?k.jsx(s.icon,{}):k.jsx("div",{className:"h-2 w-2 shrink-0 rounded-full",style:{backgroundColor:e.color||""}}),k.jsx("span",{className:"min-w-[max-content]",children:(null==s?void 0:s.label)||e.name})]},(null==(n=e.value)?void 0:n.toString())||a)}))}):null}));function cx(e,t,n){if("object"!=typeof t||null===t)return;const r="payload"in t&&"object"==typeof t.payload&&null!==t.payload?t.payload:void 0;let o=n;return n in t&&"string"==typeof t[n]?o=t[n]:r&&n in r&&"string"==typeof r[n]&&(o=r[n]),o in e?e[o]:e[n]}kj.displayName="ChartLegend";const Mj=({children:e,className:t})=>k.jsx("div",{className:se("flex flex-wrap gap-1",t),children:e}),_2=({text:e,icon:t,disabled:n,avatarSrc:r,onClick:o,onRemove:i})=>k.jsxs("div",{onClick:n?void 0:o,className:se("flex cursor-pointer items-center gap-xxxs rounded-sm bg-slate-100 p-xxs text-sm font-medium text-slate-900 transition-all hover:bg-slate-200 [&_svg]:size-4",n&&"cursor-not-allowed bg-slate-100 text-slate-300"),children:[r&&k.jsxs(tO,{className:se("size-6 text-[10px]"),children:[k.jsx(nO,{src:r,alt:e}),k.jsx(rO,{className:"text-xs",children:e.charAt(0).toUpperCase()})]}),t,k.jsx("span",{children:e}),i&&k.jsx("button",{onClick:e=>{e.stopPropagation(),null==i||i()},onPointerDown:e=>{e.stopPropagation(),e.preventDefault()},disabled:n,className:"pointer-events-auto cursor-pointer",children:k.jsx(Dx,{size:16})})]});function fm(e){const t=ke({value:e,previous:e});return Ur((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}function dm(e){const[t,n]=tt(void 0);return fr((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t)||!t.length)return;const r=t[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;n({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}const vA="Checkbox",[Lj,nX]=Sr(vA),[jj,Fj]=Lj(vA),Bj=_e(((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:a,disabled:l,value:u="on",onCheckedChange:s,...c}=e,[d,f]=tt(null),p=Rt(t,(e=>f(e))),h=ke(!1),m=!d||!!d.closest("form"),[v=!1,g]=Vo({prop:o,defaultProp:i,onChange:s}),y=ke(v);return We((()=>{const e=null==d?void 0:d.form;if(e){const t=()=>g(y.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[d,g]),z(jj,{scope:n,state:v,disabled:l},z(it.button,fe({type:"button",role:"checkbox","aria-checked":sl(v)?"mixed":v,"aria-required":a,"data-state":mA(v),"data-disabled":l?"":void 0,disabled:l,value:u},c,{ref:p,onKeyDown:ze(e.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:ze(e.onClick,(e=>{g((e=>!!sl(e)||!e)),m&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())}))})),m&&z(Wj,{control:d,bubbles:!h.current,name:r,value:u,checked:v,required:a,disabled:l,style:{transform:"translateX(-100%)"}}))})),qj="CheckboxIndicator",zj=_e(((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=Fj(qj,n);return z(Ao,{present:r||sl(i.state)||!0===i.state},z(it.span,fe({"data-state":mA(i.state),"data-disabled":i.disabled?"":void 0},o,{ref:t,style:{pointerEvents:"none",...e.style}})))})),Wj=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=ke(null),a=fm(n),l=dm(t);return We((()=>{const e=i.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(a!==n&&o){const t=new Event("click",{bubbles:r});e.indeterminate=sl(n),o.call(e,!sl(n)&&n),e.dispatchEvent(t)}}),[a,n,r]),z("input",fe({type:"checkbox","aria-hidden":!0,defaultChecked:!sl(n)&&n},o,{tabIndex:-1,ref:i,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function sl(e){return"indeterminate"===e}function mA(e){return sl(e)?"indeterminate":e?"checked":"unchecked"}const gA=Bj,Uj=zj,Hj=Ji("transition-[border-width,background-color] duration-300 relative overflow-hidden ",{variants:{size:{default:"size-xs"},variant:{default:"peer shrink-0 rounded-sm border border-blue_100 data-[state=unchecked]:border-slate-300 data-[state=checked]:text-primary-foreground disabled:cursor-not-allowed disabled:!border-0 disabled:!bg-slate-100 md:hover:!border-[2px] md:hover:data-[state=checked]:bg-blue_120"}},defaultVariants:{size:"default",variant:"default"}}),S_=P.forwardRef((({className:e,size:t,variant:n,iconType:r,...o},i)=>{const[a]=P.useState(o.checked),[l,u]=P.useState(!1);P.useEffect((()=>{a!==o.checked&&u(!0)}),[o.checked]);const s=e=>"minus"===r?k.jsx(EM,{...e}):k.jsx(Nx,{...e});return k.jsxs(gA,{ref:i,className:se(e,Hj({size:t,variant:n})),...o,children:[k.jsx("div",{className:se("transform-origin-center absolute left-0 top-0 size-full",{"bg-blue_100":(l||a)&&!o.disabled,"animate-fill-in":o.checked&&l,"animate-fill-out":!o.checked&&l})}),k.jsx(Uj,{className:"relative flex items-center justify-center text-current",children:k.jsx(s,{className:"size-xxxs",color:o.disabled?"var(--slate-300)":"white"})})]})}));S_.displayName=gA.displayName;var $2=1,Vj=.9,Gj=.8,Kj=.17,z1=.1,W1=.999,Yj=.9999,Xj=.99,Qj=/[\\\/_+.#"@\[\(\{&]/,Zj=/[\\\/_+.#"@\[\(\{&]/g,Jj=/[\s-]/,yA=/[\s-]/g;function fx(e,t,n,r,o,i,a){if(i===t.length)return o===e.length?$2:Xj;var l=`${o},${i}`;if(void 0!==a[l])return a[l];for(var u,s,c,d,f=r.charAt(i),p=n.indexOf(f,o),h=0;p>=0;)(u=fx(e,t,n,r,p+1,i+1,a))>h&&(p===o?u*=$2:Qj.test(e.charAt(p-1))?(u*=Gj,(c=e.slice(o,p-1).match(Zj))&&o>0&&(u*=Math.pow(W1,c.length))):Jj.test(e.charAt(p-1))?(u*=Vj,(d=e.slice(o,p-1).match(yA))&&o>0&&(u*=Math.pow(W1,d.length))):(u*=Kj,o>0&&(u*=Math.pow(W1,p-o))),e.charAt(p)!==t.charAt(i)&&(u*=Yj)),(u<z1&&n.charAt(p-1)===r.charAt(i+1)||r.charAt(i+1)===r.charAt(i)&&n.charAt(p-1)!==r.charAt(i))&&((s=fx(e,t,n,r,p+1,i+2,a))*z1>u&&(u=s*z1)),u>h&&(h=u),p=n.indexOf(f,p+1);return a[l]=h,h}function S2(e){return e.toLowerCase().replace(yA," ")}function eF(e,t,n){return fx(e=n&&n.length>0?""+(e+" "+n.join(" ")):e,t,S2(e),S2(t),0,0,{})}var fd='[cmdk-group=""]',U1='[cmdk-group-items=""]',tF='[cmdk-group-heading=""]',C_='[cmdk-item=""]',C2=`${C_}:not([aria-disabled="true"])`,dx="cmdk-item-select",ol="data-value",nF=(e,t,n)=>eF(e,t,n),bA=P.createContext(void 0),Vd=()=>P.useContext(bA),wA=P.createContext(void 0),E_=()=>P.useContext(wA),xA=P.createContext(void 0),_A=P.forwardRef(((e,t)=>{let n=Wu((()=>{var t,n;return{search:"",value:null!=(n=null!=(t=e.value)?t:e.defaultValue)?n:"",filtered:{count:0,items:new Map,groups:new Set}}})),r=Wu((()=>new Set)),o=Wu((()=>new Map)),i=Wu((()=>new Map)),a=Wu((()=>new Set)),l=$A(e),{label:u,children:s,value:c,onValueChange:d,filter:f,shouldFilter:p,loop:h,disablePointerSelection:m=!1,vimBindings:v=!0,...g}=e,y=P.useId(),b=P.useId(),w=P.useId(),x=P.useRef(null),_=pF();cl((()=>{if(void 0!==c){let e=c.trim();n.current.value=e,k.emit()}}),[c]),cl((()=>{_(6,T)}),[]);let k=P.useMemo((()=>({subscribe:e=>(a.current.add(e),()=>a.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var o,i,a;if(!Object.is(n.current[e],t)){if(n.current[e]=t,"search"===e)O(),E(),_(1,N);else if("value"===e&&(r||_(5,T),void 0!==(null==(o=l.current)?void 0:o.value))){let e=t??"";return void(null==(a=(i=l.current).onValueChange)||a.call(i,e))}k.emit()}},emit:()=>{a.current.forEach((e=>e()))}})),[]),S=P.useMemo((()=>({value:(e,t,r)=>{var o;t!==(null==(o=i.current.get(e))?void 0:o.value)&&(i.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,C(t,r)),_(2,(()=>{E(),k.emit()})))},item:(e,t)=>(r.current.add(e),t&&(o.current.has(t)?o.current.get(t).add(e):o.current.set(t,new Set([e]))),_(3,(()=>{O(),E(),n.current.value||N(),k.emit()})),()=>{i.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=R();_(4,(()=>{O(),(null==t?void 0:t.getAttribute("id"))===e&&N(),k.emit()}))}),group:e=>(o.current.has(e)||o.current.set(e,new Set),()=>{i.current.delete(e),o.current.delete(e)}),filter:()=>l.current.shouldFilter,label:u||e["aria-label"],disablePointerSelection:m,listId:y,inputId:w,labelId:b,listInnerRef:x})),[]);function C(e,t){var r,o;let i=null!=(o=null==(r=l.current)?void 0:r.filter)?o:nF;return e?i(e,n.current.search,t):0}function E(){if(!n.current.search||!1===l.current.shouldFilter)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach((n=>{let r=o.current.get(n),i=0;r.forEach((t=>{let n=e.get(t);i=Math.max(n,i)})),t.push([n,i])}));let r=x.current;j().sort(((t,n)=>{var r,o;let i=t.getAttribute("id"),a=n.getAttribute("id");return(null!=(r=e.get(a))?r:0)-(null!=(o=e.get(i))?o:0)})).forEach((e=>{let t=e.closest(U1);t?t.appendChild(e.parentElement===t?e:e.closest(`${U1} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${U1} > *`))})),t.sort(((e,t)=>t[1]-e[1])).forEach((e=>{let t=x.current.querySelector(`${fd}[${ol}="${encodeURIComponent(e[0])}"]`);null==t||t.parentElement.appendChild(t)}))}function N(){let e=j().find((e=>"true"!==e.getAttribute("aria-disabled"))),t=null==e?void 0:e.getAttribute(ol);k.setState("value",t||void 0)}function O(){var e,t,a,u;if(!n.current.search||!1===l.current.shouldFilter)return void(n.current.filtered.count=r.current.size);n.current.filtered.groups=new Set;let s=0;for(let o of r.current){let r=C(null!=(t=null==(e=i.current.get(o))?void 0:e.value)?t:"",null!=(u=null==(a=i.current.get(o))?void 0:a.keywords)?u:[]);n.current.filtered.items.set(o,r),r>0&&s++}for(let[e,t]of o.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=s}function T(){var e,t,n;let r=R();r&&((null==(e=r.parentElement)?void 0:e.firstChild)===r&&(null==(n=null==(t=r.closest(fd))?void 0:t.querySelector(tF))||n.scrollIntoView({block:"nearest"})),r.scrollIntoView({block:"nearest"}))}function R(){var e;return null==(e=x.current)?void 0:e.querySelector(`${C_}[aria-selected="true"]`)}function j(){var e;return Array.from(null==(e=x.current)?void 0:e.querySelectorAll(C2))}function D(e){let t=j()[e];t&&k.setState("value",t.getAttribute(ol))}function z(e){var t;let n=R(),r=j(),o=r.findIndex((e=>e===n)),i=r[o+e];null!=(t=l.current)&&t.loop&&(i=o+e<0?r[r.length-1]:o+e===r.length?r[0]:r[o+e]),i&&k.setState("value",i.getAttribute(ol))}function A(e){let t,n=R(),r=null==n?void 0:n.closest(fd);for(;r&&!t;)r=e>0?fF(r,fd):dF(r,fd),t=null==r?void 0:r.querySelector(C2);t?k.setState("value",t.getAttribute(ol)):z(e)}let M=()=>D(j().length-1),L=e=>{e.preventDefault(),e.metaKey?M():e.altKey?A(1):z(1)},I=e=>{e.preventDefault(),e.metaKey?D(0):e.altKey?A(-1):z(-1)};return P.createElement(it.div,{ref:t,tabIndex:-1,...g,"cmdk-root":"",onKeyDown:e=>{var t;if(null==(t=g.onKeyDown)||t.call(g,e),!e.defaultPrevented)switch(e.key){case"n":case"j":v&&e.ctrlKey&&L(e);break;case"ArrowDown":L(e);break;case"p":case"k":v&&e.ctrlKey&&I(e);break;case"ArrowUp":I(e);break;case"Home":e.preventDefault(),D(0);break;case"End":e.preventDefault(),M();break;case"Enter":if(!e.nativeEvent.isComposing&&229!==e.keyCode){e.preventDefault();let t=R();if(t){let e=new Event(dx);t.dispatchEvent(e)}}}}},P.createElement("label",{"cmdk-label":"",htmlFor:S.inputId,id:S.labelId,style:vF},u),pm(e,(e=>P.createElement(wA.Provider,{value:k},P.createElement(bA.Provider,{value:S},e)))))})),rF=P.forwardRef(((e,t)=>{var n,r;let o=P.useId(),i=P.useRef(null),a=P.useContext(xA),l=Vd(),u=$A(e),s=null!=(r=null==(n=u.current)?void 0:n.forceMount)?r:null==a?void 0:a.forceMount;cl((()=>{if(!s)return l.item(o,null==a?void 0:a.id)}),[s]);let c=SA(o,i,[e.value,e.children,i],e.keywords),d=E_(),f=fl((e=>e.value&&e.value===c.current)),p=fl((e=>!(!s&&!1!==l.filter())||(!e.search||e.filtered.items.get(o)>0)));function h(){var e,t;m(),null==(t=(e=u.current).onSelect)||t.call(e,c.current)}function m(){d.setState("value",c.current,!0)}if(P.useEffect((()=>{let t=i.current;if(t&&!e.disabled)return t.addEventListener(dx,h),()=>t.removeEventListener(dx,h)}),[p,e.onSelect,e.disabled]),!p)return null;let{disabled:v,value:g,onSelect:y,forceMount:b,keywords:w,...x}=e;return P.createElement(it.div,{ref:Od([i,t]),...x,id:o,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!f,"data-disabled":!!v,"data-selected":!!f,onPointerMove:v||l.disablePointerSelection?void 0:m,onClick:v?void 0:h},e.children)})),oF=P.forwardRef(((e,t)=>{let{heading:n,children:r,forceMount:o,...i}=e,a=P.useId(),l=P.useRef(null),u=P.useRef(null),s=P.useId(),c=Vd(),d=fl((e=>!(!o&&!1!==c.filter())||(!e.search||e.filtered.groups.has(a))));cl((()=>c.group(a)),[]),SA(a,l,[e.value,e.heading,u]);let f=P.useMemo((()=>({id:a,forceMount:o})),[o]);return P.createElement(it.div,{ref:Od([l,t]),...i,"cmdk-group":"",role:"presentation",hidden:!d||void 0},n&&P.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:s},n),pm(e,(e=>P.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?s:void 0},P.createElement(xA.Provider,{value:f},e)))))})),iF=P.forwardRef(((e,t)=>{let{alwaysRender:n,...r}=e,o=P.useRef(null),i=fl((e=>!e.search));return n||i?P.createElement(it.div,{ref:Od([o,t]),...r,"cmdk-separator":"",role:"separator"}):null})),aF=P.forwardRef(((e,t)=>{let{onValueChange:n,...r}=e,o=null!=e.value,i=E_(),a=fl((e=>e.search)),l=fl((e=>e.value)),u=Vd(),s=P.useMemo((()=>{var e;let t=null==(e=u.listInnerRef.current)?void 0:e.querySelector(`${C_}[${ol}="${encodeURIComponent(l)}"]`);return null==t?void 0:t.getAttribute("id")}),[]);return P.useEffect((()=>{null!=e.value&&i.setState("search",e.value)}),[e.value]),P.createElement(it.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":u.listId,"aria-labelledby":u.labelId,"aria-activedescendant":s,id:u.inputId,type:"text",value:o?e.value:a,onChange:e=>{o||i.setState("search",e.target.value),null==n||n(e.target.value)}})})),sF=P.forwardRef(((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,i=P.useRef(null),a=P.useRef(null),l=Vd();return P.useEffect((()=>{if(a.current&&i.current){let e,t=a.current,n=i.current,r=new ResizeObserver((()=>{e=requestAnimationFrame((()=>{let e=t.offsetHeight;n.style.setProperty("--cmdk-list-height",e.toFixed(1)+"px")}))}));return r.observe(t),()=>{cancelAnimationFrame(e),r.unobserve(t)}}}),[]),P.createElement(it.div,{ref:Od([i,t]),...o,"cmdk-list":"",role:"listbox","aria-label":r,id:l.listId},pm(e,(e=>P.createElement("div",{ref:Od([a,l.listInnerRef]),"cmdk-list-sizer":""},e))))})),lF=P.forwardRef(((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:i,container:a,...l}=e;return P.createElement(Yv,{open:n,onOpenChange:r},P.createElement(Xv,{container:a},P.createElement(rc,{"cmdk-overlay":"",className:o}),P.createElement(oc,{"aria-label":e.label,"cmdk-dialog":"",className:i},P.createElement(_A,{ref:t,...l}))))})),uF=P.forwardRef(((e,t)=>fl((e=>0===e.filtered.count))?P.createElement(it.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null)),cF=P.forwardRef(((e,t)=>{let{progress:n,children:r,label:o="Loading...",...i}=e;return P.createElement(it.div,{ref:t,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},pm(e,(e=>P.createElement("div",{"aria-hidden":!0},e))))})),Vr=Object.assign(_A,{List:sF,Item:rF,Input:aF,Group:oF,Separator:iF,Dialog:lF,Empty:uF,Loading:cF});function fF(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function dF(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function $A(e){let t=P.useRef(e);return cl((()=>{t.current=e})),t}var cl=typeof window>"u"?P.useEffect:P.useLayoutEffect;function Wu(e){let t=P.useRef();return void 0===t.current&&(t.current=e()),t}function Od(e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}function fl(e){let t=E_(),n=()=>e(t.snapshot());return P.useSyncExternalStore(t.subscribe,n,n)}function SA(e,t,n,r=[]){let o=P.useRef(),i=Vd();return cl((()=>{var a;let l=(()=>{var e;for(let t of n){if("string"==typeof t)return t.trim();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim():o.current}})(),u=r.map((e=>e.trim()));i.value(e,l,u),null==(a=t.current)||a.setAttribute(ol,l),o.current=l})),o}var pF=()=>{let[e,t]=P.useState(),n=Wu((()=>new Map));return cl((()=>{n.current.forEach((e=>e())),n.current=new Map}),[e]),(e,r)=>{n.current.set(e,r),t({})}};function hF(e){let t=e.type;return"function"==typeof t?t(e.props):"render"in t?t.render(e.props):e}function pm({asChild:e,children:t},n){return e&&P.isValidElement(t)?P.cloneElement(hF(t),{ref:t.ref},n(t.props.children)):n(t)}var vF={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const mF=Yv,rX=Ux,gF=Xv,oX=ic,CA=P.forwardRef((({className:e,...t},n)=>(P.useEffect((()=>{const e=document.querySelectorAll(".blured-modal-overlay");return e.forEach((e=>e&&(e.style.filter="blur(5px)"))),()=>{e.forEach((e=>e&&(e.style.filter="none")))}}),[]),k.jsx(rc,{ref:n,"data-testid":"dialog_overlay",className:se("fixed inset-0 z-100 bg-black opacity-[0.8] data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}))));CA.displayName=rc.displayName;const yF=Ji("",{variants:{closeVariant:{none:"",insideCard:"absolute right-m top-m rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground text-slate-400",outsideCard:"fixed right-[30px] top-[30px] z-100 text-slate-400",mobileGallery:"fixed right-m top-[62px] text-white z-[110]"}},defaultVariants:{closeVariant:"outsideCard"}}),bF=Ji("",{variants:{closeSize:{small:"size-6",big:"size-[42px]","18x18":"size-[18px]"}},defaultVariants:{closeSize:"small"}}),EA=P.forwardRef((({title:e,titleIcon:t,className:n,showClose:r=!0,closeVariant:o="outsideCard",closeSize:i="big",children:a,overlayClassName:l,childrenClassName:u,onBack:s,onCloseModal:c,renderFooter:d,...f},p)=>{const h=k.jsxs(ic,{className:se(yF({closeVariant:o})),children:[k.jsx(Dx,{onClick:c,fill:"currentColor",className:se(bF({closeSize:i}))}),k.jsx("span",{className:"sr-only",children:"Close"})]});return k.jsxs(gF,{children:[k.jsx(CA,{className:l,onClick:c}),r&&"insideCard"!==o&&h,k.jsxs(oc,{ref:p,className:se("fixed left-[50%] top-[50%] z-100 grid max-w-[600px] translate-x-[-50%] translate-y-[-50%] !overflow-visible rounded-sm bg-background shadow-lg outline-none duration-200 data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] max-md:w-[calc(100vw-32px)] md:w-full [&>div]:min-w-0",n),...f,children:[e&&k.jsxs("h3",{className:"flex items-center justify-center gap-xxs border-b border-slate-200 p-m text-center text-lg font-semibold text-slate-700",children:[t,e]}),k.jsx("div",{className:se("p-m",u),children:a}),r&&"insideCard"===o&&h,s&&k.jsx("button",{"data-testid":"dialog-back-button","aria-label":"Back",onClick:s,className:"absolute left-m top-m",children:k.jsx(cT,{color:"var(--slate-400)",size:24})}),k.jsx(PA,{className:"empty:hidden",children:null==d?void 0:d()})]})]})}));EA.displayName=oc.displayName;const wF=({className:e,...t})=>k.jsx("div",{className:se("border-b border-slate-200 p-m text-center text-lg font-semibold text-slate-700",e),...t});wF.displayName="DialogHeader";const PA=({className:e,...t})=>k.jsx("div",{className:se("flex border-t border-slate-200 p-m",e),...t});PA.displayName="DialogFooter";const xF=P.forwardRef((({className:e,...t},n)=>k.jsx(jd,{ref:n,className:se("text-lg font-semibold leading-none tracking-tight",e),...t})));xF.displayName=jd.displayName;const _F=P.forwardRef((({className:e,...t},n)=>k.jsx(Fd,{ref:n,className:se("text-sm text-muted-foreground",e),...t})));_F.displayName=Fd.displayName;const RA=P.forwardRef((({className:e,...t},n)=>k.jsx(Vr,{ref:n,className:se("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t})));RA.displayName=Vr.displayName;const iX=({children:e,...t})=>k.jsx(mF,{...t,children:k.jsx(EA,{className:"overflow-hidden p-0 shadow-lg",children:k.jsx(RA,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),$F=P.forwardRef((({className:e,...t},n)=>k.jsx("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:k.jsx(Vr.Input,{ref:n,className:se("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})})));$F.displayName=Vr.Input.displayName;const SF=P.forwardRef((({className:e,...t},n)=>k.jsx(Vr.List,{ref:n,className:se("mt-2 max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t})));SF.displayName=Vr.List.displayName;const CF=P.forwardRef(((e,t)=>k.jsx(Vr.Empty,{ref:t,className:"py-6 text-center text-sm",...e})));CF.displayName=Vr.Empty.displayName;const EF=P.forwardRef((({className:e,...t},n)=>k.jsx(Vr.Group,{ref:n,className:se("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t})));EF.displayName=Vr.Group.displayName;const PF=P.forwardRef((({className:e,...t},n)=>k.jsx(Vr.Separator,{ref:n,className:se("-mx-1 h-px bg-border",e),...t})));PF.displayName=Vr.Separator.displayName;const RF=P.forwardRef((({className:e,...t},n)=>k.jsx(Vr.Item,{ref:n,className:se("relative flex max-w-[215px] cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50",e),...t})));RF.displayName=Vr.Item.displayName;const TF=({className:e,...t})=>k.jsx("span",{className:se("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});function Ya(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function E2(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function TA(...e){return t=>{let n=!1;const r=e.map((e=>{const r=E2(e,t);return!n&&"function"==typeof r&&(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():E2(e[t],null)}}}}function yl(...e){return P.useCallback(TA(...e),e)}function OF(e,t){const n=P.createContext(t),r=e=>{const{children:t,...r}=e,o=P.useMemo((()=>r),Object.values(r));return k.jsx(n.Provider,{value:o,children:t})};return r.displayName=e+"Provider",[r,function(r){const o=P.useContext(n);if(o)return o;if(void 0!==t)return t;throw new Error(`\`${r}\` must be used within \`${e}\``)}]}function AF(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>P.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return P.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=P.createContext(r),i=n.length;n=[...n,r];const a=t=>{var n;const{scope:r,children:a,...l}=t,u=(null==(n=null==r?void 0:r[e])?void 0:n[i])||o,s=P.useMemo((()=>l),Object.values(l));return k.jsx(u.Provider,{value:s,children:a})};return a.displayName=t+"Provider",[a,function(n,a){var l;const u=(null==(l=null==a?void 0:a[e])?void 0:l[i])||o,s=P.useContext(u);if(s)return s;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},NF(r,...t)]}function NF(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return P.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}TF.displayName="CommandShortcut";var Rv=null!=globalThis&&globalThis.document?P.useLayoutEffect:()=>{},DF=P[" useId ".trim().toString()]||(()=>{}),IF=0;function H1(e){const[t,n]=P.useState(DF());return Rv((()=>{e||n((e=>e??String(IF++)))}),[e]),e||(t?`radix-${t}`:"")}function dl(e){const t=P.useRef(e);return P.useEffect((()=>{t.current=e})),P.useMemo((()=>(...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[])}function kF({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=MF({defaultProp:t,onChange:n}),i=void 0!==e,a=i?e:r,l=dl(n);return[a,P.useCallback((t=>{if(i){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[i,e,o,l])]}function MF({defaultProp:e,onChange:t}){const n=P.useState(e),[r]=n,o=P.useRef(r),i=dl(t);return P.useEffect((()=>{o.current!==r&&(i(r),o.current=r)}),[r,o,i]),n}function OA(e){const t=LF(e),n=P.forwardRef(((e,n)=>{const{children:r,...o}=e,i=P.Children.toArray(r),a=i.find(FF);if(a){const e=a.props.children,r=i.map((t=>t===a?P.Children.count(e)>1?P.Children.only(null):P.isValidElement(e)?e.props.children:null:t));return k.jsx(t,{...o,ref:n,children:P.isValidElement(e)?P.cloneElement(e,void 0,r):null})}return k.jsx(t,{...o,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function LF(e){const t=P.forwardRef(((e,t)=>{const{children:n,...r}=e;if(P.isValidElement(n)){const e=qF(n),o=BF(r,n.props);return n.type!==P.Fragment&&(o.ref=t?TA(t,e):e),P.cloneElement(n,o)}return P.Children.count(n)>1?P.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}var jF=Symbol("radix.slottable");function FF(e){return P.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===jF}function BF(e,t){const n={...t};for(const r in t){const 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}}function qF(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var zF=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],na=zF.reduce(((e,t)=>{const n=OA(`Primitive.${t}`),r=P.forwardRef(((e,r)=>{const{asChild:o,...i}=e,a=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),k.jsx(a,{...i,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{});function WF(e,t){e&&_i.flushSync((()=>e.dispatchEvent(t)))}function UF(e,t=(null==globalThis?void 0:globalThis.document)){const n=dl(e);P.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[n,t])}var P2,HF="DismissableLayer",px="dismissableLayer.update",VF="dismissableLayer.pointerDownOutside",GF="dismissableLayer.focusOutside",AA=P.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),NA=P.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:l,...u}=e,s=P.useContext(AA),[c,d]=P.useState(null),f=(null==c?void 0:c.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,p]=P.useState({}),h=yl(t,(e=>d(e))),m=Array.from(s.layers),[v]=[...s.layersWithOutsidePointerEventsDisabled].slice(-1),g=m.indexOf(v),y=c?m.indexOf(c):-1,b=s.layersWithOutsidePointerEventsDisabled.size>0,w=y>=g,x=XF((e=>{const t=e.target,n=[...s.branches].some((e=>e.contains(t)));!w||n||(null==o||o(e),null==a||a(e),e.defaultPrevented||null==l||l())}),f),_=QF((e=>{const t=e.target;[...s.branches].some((e=>e.contains(t)))||(null==i||i(e),null==a||a(e),e.defaultPrevented||null==l||l())}),f);return UF((e=>{y===s.layers.size-1&&(null==r||r(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))}),f),P.useEffect((()=>{if(c)return n&&(0===s.layersWithOutsidePointerEventsDisabled.size&&(P2=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),s.layersWithOutsidePointerEventsDisabled.add(c)),s.layers.add(c),R2(),()=>{n&&1===s.layersWithOutsidePointerEventsDisabled.size&&(f.body.style.pointerEvents=P2)}}),[c,f,n,s]),P.useEffect((()=>()=>{c&&(s.layers.delete(c),s.layersWithOutsidePointerEventsDisabled.delete(c),R2())}),[c,s]),P.useEffect((()=>{const e=()=>p({});return document.addEventListener(px,e),()=>document.removeEventListener(px,e)}),[]),k.jsx(na.div,{...u,ref:h,style:{pointerEvents:b?w?"auto":"none":void 0,...e.style},onFocusCapture:Ya(e.onFocusCapture,_.onFocusCapture),onBlurCapture:Ya(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:Ya(e.onPointerDownCapture,x.onPointerDownCapture)})}));NA.displayName=HF;var KF="DismissableLayerBranch",YF=P.forwardRef(((e,t)=>{const n=P.useContext(AA),r=P.useRef(null),o=yl(t,r);return P.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),k.jsx(na.div,{...e,ref:o})}));function XF(e,t=(null==globalThis?void 0:globalThis.document)){const n=dl(e),r=P.useRef(!1),o=P.useRef((()=>{}));return P.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){DA(VF,n,i,{discrete:!0})};const i={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}function QF(e,t=(null==globalThis?void 0:globalThis.document)){const n=dl(e),r=P.useRef(!1);return P.useEffect((()=>{const e=e=>{e.target&&!r.current&&DA(GF,n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function R2(){const e=new CustomEvent(px);document.dispatchEvent(e)}function DA(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?WF(o,i):o.dispatchEvent(i)}YF.displayName=KF;var V1="focusScope.autoFocusOnMount",G1="focusScope.autoFocusOnUnmount",T2={bubbles:!1,cancelable:!0},ZF="FocusScope",IA=P.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[l,u]=P.useState(null),s=dl(o),c=dl(i),d=P.useRef(null),f=yl(t,(e=>u(e))),p=P.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;P.useEffect((()=>{if(r){let e=function(e){if(p.paused||!l)return;const t=e.target;l.contains(t)?d.current=t:Ga(d.current,{select:!0})},t=function(e){if(p.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||Ga(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&Ga(l)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[r,l,p.paused]),P.useEffect((()=>{if(l){A2.add(p);const e=document.activeElement;if(!l.contains(e)){const t=new CustomEvent(V1,T2);l.addEventListener(V1,s),l.dispatchEvent(t),t.defaultPrevented||(JF(oB(kA(l)),{select:!0}),document.activeElement===e&&Ga(l))}return()=>{l.removeEventListener(V1,s),setTimeout((()=>{const t=new CustomEvent(G1,T2);l.addEventListener(G1,c),l.dispatchEvent(t),t.defaultPrevented||Ga(e??document.body,{select:!0}),l.removeEventListener(G1,c),A2.remove(p)}),0)}}}),[l,s,c,p]);const h=P.useCallback((e=>{if(!n&&!r||p.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[r,i]=eB(t);r&&i?e.shiftKey||o!==i?e.shiftKey&&o===r&&(e.preventDefault(),n&&Ga(i,{select:!0})):(e.preventDefault(),n&&Ga(r,{select:!0})):o===t&&e.preventDefault()}}),[n,r,p.paused]);return k.jsx(na.div,{tabIndex:-1,...a,ref:f,onKeyDown:h})}));function JF(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ga(r,{select:t}),document.activeElement!==n)return}function eB(e){const t=kA(e);return[O2(t,e),O2(t.reverse(),e)]}function kA(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function O2(e,t){for(const n of e)if(!tB(n,{upTo:t}))return n}function tB(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function nB(e){return e instanceof HTMLInputElement&&"select"in e}function Ga(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&nB(e)&&t&&e.select()}}IA.displayName=ZF;var A2=rB();function rB(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=N2(e,t),e.unshift(t)},remove(t){var n;e=N2(e,t),null==(n=e[0])||n.resume()}}}function N2(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}function oB(e){return e.filter((e=>"A"!==e.tagName))}var iB="Portal",MA=P.forwardRef(((e,t)=>{var n;const{container:r,...o}=e,[i,a]=P.useState(!1);Rv((()=>a(!0)),[]);const l=r||i&&(null==(n=null==globalThis?void 0:globalThis.document)?void 0:n.body);return l?Mx.createPortal(k.jsx(na.div,{...o,ref:t}),l):null}));function aB(e,t){return P.useReducer(((e,n)=>t[e][n]??e),e)}MA.displayName=iB;var hm=e=>{const{present:t,children:n}=e,r=sB(t),o="function"==typeof n?n({present:r.isPresent}):P.Children.only(n),i=yl(r.ref,lB(o));return"function"==typeof n||r.isPresent?P.cloneElement(o,{ref:i}):null};function sB(e){const[t,n]=P.useState(),r=P.useRef({}),o=P.useRef(e),i=P.useRef("none"),a=e?"mounted":"unmounted",[l,u]=aB(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return P.useEffect((()=>{const e=iv(r.current);i.current="mounted"===l?e:"none"}),[l]),Rv((()=>{const t=r.current,n=o.current;if(n!==e){const r=i.current,a=iv(t);e?u("MOUNT"):"none"===a||"none"===(null==t?void 0:t.display)?u("UNMOUNT"):u(n&&r!==a?"ANIMATION_OUT":"UNMOUNT"),o.current=e}}),[e,u]),Rv((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,a=i=>{const a=iv(r.current).includes(i.animationName);if(i.target===t&&a&&(u("ANIMATION_END"),!o.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)}))}},l=e=>{e.target===t&&(i.current=iv(r.current))};return t.addEventListener("animationstart",l),t.addEventListener("animationcancel",a),t.addEventListener("animationend",a),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",l),t.removeEventListener("animationcancel",a),t.removeEventListener("animationend",a)}}u("ANIMATION_END")}),[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:P.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}function iv(e){return(null==e?void 0:e.animationName)||"none"}function lB(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}hm.displayName="Presence";var K1=0;function uB(){P.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??D2()),document.body.insertAdjacentElement("beforeend",e[1]??D2()),K1++,()=>{1===K1&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),K1--}}),[])}function D2(){const 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}var LA=ET(),Y1=function(){},vm=P.forwardRef((function(e,t){var n=P.useRef(null),r=P.useState({onScrollCapture:Y1,onWheelCapture:Y1,onTouchMoveCapture:Y1}),o=r[0],i=r[1],a=e.forwardProps,l=e.children,u=e.className,s=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,p=e.noIsolation,h=e.inert,m=e.allowPinchZoom,v=e.as,g=void 0===v?"div":v,y=e.gapMode,b=qx(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=f,x=CT([n,t]),_=cr(cr({},b),o);return P.createElement(P.Fragment,null,c&&P.createElement(w,{sideCar:LA,removeScrollBar:s,shards:d,noIsolation:p,inert:h,setCallbacks:i,allowPinchZoom:!!m,lockRef:n,gapMode:y}),a?P.cloneElement(P.Children.only(l),cr(cr({},_),{ref:x})):P.createElement(g,cr({},_,{className:u,ref:x}),l))}));vm.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},vm.classNames={fullWidth:bd,zeroRight:yd};var hx=!1;if(typeof window<"u")try{var av=Object.defineProperty({},"passive",{get:function(){return hx=!0,!0}});window.addEventListener("test",av,av),window.removeEventListener("test",av,av)}catch{hx=!1}var qu=!!hx&&{passive:!1},cB=function(e){return"TEXTAREA"===e.tagName},jA=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!cB(e)&&"visible"===n[t])},fB=function(e){return jA(e,"overflowY")},dB=function(e){return jA(e,"overflowX")},I2=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host),FA(e,r)){var o=BA(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},pB=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},hB=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},FA=function(e,t){return"v"===e?fB(t):dB(t)},BA=function(e,t){return"v"===e?pB(t):hB(t)},vB=function(e,t){return"h"===e&&"rtl"===t?-1:1},mB=function(e,t,n,r,o){var i=vB(e,window.getComputedStyle(t).direction),a=i*r,l=n.target,u=t.contains(l),s=!1,c=a>0,d=0,f=0;do{var p=BA(e,l),h=p[0],m=p[1]-p[2]-i*h;(h||m)&&FA(e,l)&&(d+=m,f+=h),l=l instanceof ShadowRoot?l.host:l.parentNode}while(!u&&l!==document.body||u&&(t.contains(l)||t===l));return(c&&(Math.abs(d)<1||!o)||!c&&(Math.abs(f)<1||!o))&&(s=!0),s},sv=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},k2=function(e){return[e.deltaX,e.deltaY]},M2=function(e){return e&&"current"in e?e.current:e},gB=function(e,t){return e[0]===t[0]&&e[1]===t[1]},yB=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},bB=0,zu=[];function wB(e){var t=P.useRef([]),n=P.useRef([0,0]),r=P.useRef(),o=P.useState(bB++)[0],i=P.useState(zx)[0],a=P.useRef(e);P.useEffect((function(){a.current=e}),[e]),P.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=ST([e.lockRef.current],(e.shards||[]).map(M2),!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=P.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!a.current.allowPinchZoom;var o,i=sv(e),l=n.current,u="deltaX"in e?e.deltaX:l[0]-i[0],s="deltaY"in e?e.deltaY:l[1]-i[1],c=e.target,d=Math.abs(u)>Math.abs(s)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=I2(d,c);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=I2(d,c)),!f)return!1;if(!r.current&&"changedTouches"in e&&(u||s)&&(r.current=o),!o)return!0;var p=r.current||o;return mB(p,t,e,"h"===p?u:s,!0)}),[]),u=P.useCallback((function(e){var n=e;if(zu.length&&zu[zu.length-1]===i){var r="deltaY"in n?k2(n):sv(n),o=t.current.filter((function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&gB(e.delta,r)}))[0];if(o&&o.should)return void(n.cancelable&&n.preventDefault());if(!o){var u=(a.current.shards||[]).map(M2).filter(Boolean).filter((function(e){return e.contains(n.target)}));(u.length>0?l(n,u[0]):!a.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),s=P.useCallback((function(e,n,r,o){var i={name:e,delta:n,target:r,should:o,shadowParent:xB(r)};t.current.push(i),setTimeout((function(){t.current=t.current.filter((function(e){return e!==i}))}),1)}),[]),c=P.useCallback((function(e){n.current=sv(e),r.current=void 0}),[]),d=P.useCallback((function(t){s(t.type,k2(t),t.target,l(t,e.lockRef.current))}),[]),f=P.useCallback((function(t){s(t.type,sv(t),t.target,l(t,e.lockRef.current))}),[]);P.useEffect((function(){return zu.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",u,qu),document.addEventListener("touchmove",u,qu),document.addEventListener("touchstart",c,qu),function(){zu=zu.filter((function(e){return e!==i})),document.removeEventListener("wheel",u,qu),document.removeEventListener("touchmove",u,qu),document.removeEventListener("touchstart",c,qu)}}),[]);var p=e.removeScrollBar,h=e.inert;return P.createElement(P.Fragment,null,h?P.createElement(i,{styles:yB(o)}):null,p?P.createElement(OT,{gapMode:e.gapMode}):null)}function xB(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const _B=RT(LA,wB);var qA=P.forwardRef((function(e,t){return P.createElement(vm,cr({},e,{ref:t,sideCar:_B}))}));qA.classNames=vm.classNames;var P_="Dialog",[zA,aX]=AF(P_),[$B,Yo]=zA(P_),WA=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,l=P.useRef(null),u=P.useRef(null),[s=!1,c]=kF({prop:r,defaultProp:o,onChange:i});return k.jsx($B,{scope:t,triggerRef:l,contentRef:u,contentId:H1(),titleId:H1(),descriptionId:H1(),open:s,onOpenChange:c,onOpenToggle:P.useCallback((()=>c((e=>!e))),[c]),modal:a,children:n})};WA.displayName=P_;var UA="DialogTrigger",HA=P.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Yo(UA,n),i=yl(t,o.triggerRef);return k.jsx(na.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":O_(o.open),...r,ref:i,onClick:Ya(e.onClick,o.onOpenToggle)})}));HA.displayName=UA;var R_="DialogPortal",[SB,VA]=zA(R_,{forceMount:void 0}),GA=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=Yo(R_,t);return k.jsx(SB,{scope:t,forceMount:n,children:P.Children.map(r,(e=>k.jsx(hm,{present:n||i.open,children:k.jsx(MA,{asChild:!0,container:o,children:e})})))})};GA.displayName=R_;var Tv="DialogOverlay",KA=P.forwardRef(((e,t)=>{const n=VA(Tv,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Yo(Tv,e.__scopeDialog);return i.modal?k.jsx(hm,{present:r||i.open,children:k.jsx(EB,{...o,ref:t})}):null}));KA.displayName=Tv;var CB=OA("DialogOverlay.RemoveScroll"),EB=P.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Yo(Tv,n);return k.jsx(qA,{as:CB,allowPinchZoom:!0,shards:[o.contentRef],children:k.jsx(na.div,{"data-state":O_(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})})),pl="DialogContent",YA=P.forwardRef(((e,t)=>{const n=VA(pl,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Yo(pl,e.__scopeDialog);return k.jsx(hm,{present:r||i.open,children:i.modal?k.jsx(PB,{...o,ref:t}):k.jsx(RB,{...o,ref:t})})}));YA.displayName=pl;var PB=P.forwardRef(((e,t)=>{const n=Yo(pl,e.__scopeDialog),r=P.useRef(null),o=yl(t,n.contentRef,r);return P.useEffect((()=>{const e=r.current;if(e)return Kv(e)}),[]),k.jsx(XA,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ya(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),null==(t=n.triggerRef.current)||t.focus()})),onPointerDownOutside:Ya(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:Ya(e.onFocusOutside,(e=>e.preventDefault()))})})),RB=P.forwardRef(((e,t)=>{const n=Yo(pl,e.__scopeDialog),r=P.useRef(!1),o=P.useRef(!1);return k.jsx(XA,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var i,a;null==(i=e.onCloseAutoFocus)||i.call(e,t),t.defaultPrevented||(r.current||null==(a=n.triggerRef.current)||a.focus(),t.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:t=>{var i,a;null==(i=e.onInteractOutside)||i.call(e,t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));const l=t.target;(null==(a=n.triggerRef.current)?void 0:a.contains(l))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})})),XA=P.forwardRef(((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,l=Yo(pl,n),u=P.useRef(null),s=yl(t,u);return uB(),k.jsxs(k.Fragment,{children:[k.jsx(IA,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:k.jsx(NA,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":O_(l.open),...a,ref:s,onDismiss:()=>l.onOpenChange(!1)})}),k.jsxs(k.Fragment,{children:[k.jsx(TB,{titleId:l.titleId}),k.jsx(AB,{contentRef:u,descriptionId:l.descriptionId})]})]})})),T_="DialogTitle",QA=P.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Yo(T_,n);return k.jsx(na.h2,{id:o.titleId,...r,ref:t})}));QA.displayName=T_;var ZA="DialogDescription",JA=P.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Yo(ZA,n);return k.jsx(na.p,{id:o.descriptionId,...r,ref:t})}));JA.displayName=ZA;var eN="DialogClose",tN=P.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Yo(eN,n);return k.jsx(na.button,{type:"button",...r,ref:t,onClick:Ya(e.onClick,(()=>o.onOpenChange(!1)))})}));function O_(e){return e?"open":"closed"}tN.displayName=eN;var nN="DialogTitleWarning",[sX,rN]=OF(nN,{contentName:pl,titleName:T_,docsSlug:"dialog"}),TB=({titleId:e})=>{const t=rN(nN),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return P.useEffect((()=>{e&&(document.getElementById(e)||console.error(n))}),[n,e]),null},OB="DialogDescriptionWarning",AB=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${rN(OB).contentName}}.`;return P.useEffect((()=>{var r;const o=null==(r=e.current)?void 0:r.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(n))}),[n,e,t]),null},NB=WA,DB=HA,IB=GA,kB=KA,MB=YA,LB=QA,jB=JA,FB=tN;function BB(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const oN=ye.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),lc=()=>{const e=ye.useContext(oN);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};BB("[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,100%,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,-100%,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(-100%,0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(100%,0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(\n[data-state=closed]\n){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,100%,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,100%,0)}}@keyframes slideFromTop{from{transform:translate3d(0,-100%,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,-100%,0)}}@keyframes slideFromLeft{from{transform:translate3d(-100%,0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(-100%,0,0)}}@keyframes slideFromRight{from{transform:translate3d(100%,0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(100%,0,0)}}");const qB=24,zB=typeof window<"u"?tc:We;function L2(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}function WB(){return A_(/^Mac/)}function UB(){return A_(/^iPhone/)}function j2(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function HB(){return A_(/^iPad/)||WB()&&navigator.maxTouchPoints>1}function iN(){return UB()||HB()}function A_(e){return typeof window<"u"&&null!=window.navigator?e.test(window.navigator.platform):void 0}const X1=typeof document<"u"&&window.visualViewport;function F2(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function aN(e){for(F2(e)&&(e=e.parentElement);e&&!F2(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const VB=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let Q1,lv=0;function GB(e={}){let{isDisabled:t}=e;zB((()=>{if(!t)return lv++,1===lv&&iN()&&(Q1=KB()),()=>{lv--,0===lv&&(null==Q1||Q1())}}),[t])}function KB(){let e,t=0,n=window.pageXOffset,r=window.pageYOffset,o=L2(YB(document.documentElement,"paddingRight",window.innerWidth-document.documentElement.clientWidth+"px"));window.scrollTo(0,0);let i=L2(dd(document,"touchstart",(n=>{e=aN(n.target),(e!==document.documentElement||e!==document.body)&&(t=n.changedTouches[0].pageY)}),{passive:!1,capture:!0}),dd(document,"touchmove",(n=>{if(!e||e===document.documentElement||e===document.body)return void n.preventDefault();let r=n.changedTouches[0].pageY,o=e.scrollTop,i=e.scrollHeight-e.clientHeight;0!==i&&((o<=0&&r>t||o>=i&&r<t)&&n.preventDefault(),t=r)}),{passive:!1,capture:!0}),dd(document,"touchend",(e=>{let t=e.target;vx(t)&&t!==document.activeElement&&(e.preventDefault(),t.style.transform="translateY(-2000px)",t.focus(),requestAnimationFrame((()=>{t.style.transform=""})))}),{passive:!1,capture:!0}),dd(document,"focus",(e=>{let t=e.target;vx(t)&&(t.style.transform="translateY(-2000px)",requestAnimationFrame((()=>{t.style.transform="",X1&&(X1.height<window.innerHeight?requestAnimationFrame((()=>{B2(t)})):X1.addEventListener("resize",(()=>B2(t)),{once:!0}))})))}),!0),dd(window,"scroll",(()=>{window.scrollTo(0,0)})));return()=>{o(),i(),window.scrollTo(n,r)}}function YB(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function dd(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function B2(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let t=aN(e);if(t!==document.documentElement&&t!==document.body&&t!==e){let n=t.getBoundingClientRect().top,r=e.getBoundingClientRect().top;e.getBoundingClientRect().bottom>t.getBoundingClientRect().bottom+24&&(t.scrollTop+=r-n)}e=t.parentElement}}function vx(e){return e instanceof HTMLInputElement&&!VB.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function XB(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function QB(...e){return t=>e.forEach((e=>XB(e,t)))}function sN(...e){return P.useCallback(QB(...e),e)}const lN=new WeakMap;function Rn(e,t,n=!1){if(!(e&&e instanceof HTMLElement))return;let r={};Object.entries(t).forEach((([t,n])=>{t.startsWith("--")?e.style.setProperty(t,n):(r[t]=e.style[t],e.style[t]=n)})),!n&&lN.set(e,r)}function ZB(e,t){if(!(e&&e instanceof HTMLElement))return;let n=lN.get(e);n&&(e.style[t]=n[t])}const Tn=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function uv(e,t){if(!e)return null;const n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform;let o=r.match(/^matrix3d\((.+)\)$/);return o?parseFloat(o[1].split(", ")[Tn(t)?13:12]):(o=r.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[Tn(t)?5:4]):null)}function JB(e){return 8*(Math.log(e+1)-2)}function Z1(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function eq(...e){return(...t)=>{for(const n of e)"function"==typeof n&&n(...t)}}const nn={DURATION:.5,EASE:[.32,.72,0,1]},uN=.4,tq=.25,nq=100,cN=8,tl=16,mx=26,J1="vaul-dragging";function fN(e){const t=ye.useRef(e);return ye.useEffect((()=>{t.current=e})),ye.useMemo((()=>(...e)=>null==t.current?void 0:t.current.call(t,...e)),[])}function rq({defaultProp:e,onChange:t}){const n=ye.useState(e),[r]=n,o=ye.useRef(r),i=fN(t);return ye.useEffect((()=>{o.current!==r&&(i(r),o.current=r)}),[r,o,i]),n}function dN({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=rq({defaultProp:t,onChange:n}),i=void 0!==e,a=i?e:r,l=fN(n);return[a,ye.useCallback((t=>{if(i){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[i,e,o,l])]}function oq({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:o,fadeFromIndex:i,onSnapPointChange:a,direction:l="bottom",container:u,snapToSequentialPoint:s}){const[c,d]=dN({prop:e,defaultProp:null==n?void 0:n[0],onChange:t}),[f,p]=ye.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);ye.useEffect((()=>{function e(){p({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]);const h=ye.useMemo((()=>c===(null==n?void 0:n[n.length-1])||null),[n,c]),m=ye.useMemo((()=>null==n?void 0:n.findIndex((e=>e===c))),[n,c]),v=n&&n.length>0&&(i||0===i)&&!Number.isNaN(i)&&n[i]===c||!n,g=ye.useMemo((()=>{const e=u?{width:u.getBoundingClientRect().width,height:u.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var t;return null!=(t=null==n?void 0:n.map((t=>{const n="string"==typeof t;let r=0;if(n&&(r=parseInt(t,10)),Tn(l)){const o=n?r:f?t*e.height:0;return f?"bottom"===l?e.height-o:-e.height+o:o}const o=n?r:f?t*e.width:0;return f?"right"===l?e.width-o:-e.width+o:o})))?t:[]}),[n,f,u]),y=ye.useMemo((()=>null!==m?null==g?void 0:g[m]:null),[g,m]),b=ye.useCallback((e=>{var t;const u=null!=(t=null==g?void 0:g.findIndex((t=>t===e)))?t:null;a(u),Rn(r.current,{transition:`transform ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`,transform:Tn(l)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`}),g&&u!==g.length-1&&u!==i&&u<i?Rn(o.current,{transition:`opacity ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`,opacity:"0"}):Rn(o.current,{transition:`opacity ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`,opacity:"1"}),d(null==n?void 0:n[Math.max(u,0)])}),[r.current,n,g,i,o,d]);return ye.useEffect((()=>{if(c||e){var t;const r=null!=(t=null==n?void 0:n.findIndex((t=>t===e||t===c)))?t:-1;g&&-1!==r&&"number"==typeof g[r]&&b(g[r])}}),[c,e,n,g,b]),{isLastSnapPoint:h,activeSnapPoint:c,shouldFade:v,getPercentageDragged:function(e,t){if(!n||"number"!=typeof m||!g||void 0===i)return null;const r=m===i-1;if(m>=i&&t)return 0;if(r&&!t)return 1;if(!v&&!r)return null;const o=r?m+1:m-1,a=r?g[o]-g[o-1]:g[o+1]-g[o],l=e/Math.abs(a);return r?1-l:l},setActiveSnapPoint:d,activeSnapPointIndex:m,onRelease:function({draggedDistance:e,closeDrawer:t,velocity:r,dismissible:a}){if(void 0===i)return;const u="bottom"===l||"right"===l?(y??0)-e:(y??0)+e,c=0===m,d=e>0;if(m===i-1&&Rn(o.current,{transition:`opacity ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`}),!s&&r>2&&!d)return void(a?t():b(g[0]));if(!s&&r>2&&d&&g&&n)return void b(g[n.length-1]);const f=null==g?void 0:g.reduce(((e,t)=>"number"!=typeof e||"number"!=typeof t?e:Math.abs(t-u)<Math.abs(e-u)?t:e)),p=Tn(l)?window.innerHeight:window.innerWidth;if(r>uN&&Math.abs(e)<.4*p){const e=d?1:-1;if(e>0&&h)return void b(g[n.length-1]);if(c&&e<0&&a&&t(),null===m)return;b(g[m+e])}else b(f)},onDrag:function({draggedDistance:e}){if(null===y)return;const t="bottom"===l||"right"===l?y-e:y+e;("bottom"===l||"right"===l)&&t<g[g.length-1]||("top"===l||"left"===l)&&t>g[g.length-1]||Rn(r.current,{transform:Tn(l)?`translate3d(0, ${t}px, 0)`:`translate3d(${t}px, 0, 0)`})},snapPointsOffset:g}}const iq=()=>()=>{};function aq(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:o}=lc(),i=ye.useRef(null),a=Ur((()=>document.body.style.backgroundColor),[]);function l(){return(window.innerWidth-26)/window.innerWidth}ye.useEffect((()=>{if(t&&n){i.current&&clearTimeout(i.current);const t=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!t)return;eq(r&&!o?Z1(document.body,{background:"black"}):iq,Z1(t,{transformOrigin:Tn(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${nn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${nn.EASE.join(",")})`}));const n=Z1(t,{borderRadius:"8px",overflow:"hidden",...Tn(e)?{transform:`scale(${l()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${l()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{n(),i.current=window.setTimeout((()=>{a?document.body.style.background=a:document.body.style.removeProperty("background")}),1e3*nn.DURATION)}}}),[t,n,a])}let pd=null;function sq({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:o,noBodyStyles:i}){const[a,l]=ye.useState((()=>typeof window<"u"?window.location.href:"")),u=ye.useRef(0),s=ye.useCallback((()=>{if(j2()&&null===pd&&e&&!i){pd={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:e,innerHeight:t}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:-u.current+"px",left:-e+"px",right:"0px",height:"auto"}),window.setTimeout((()=>window.requestAnimationFrame((()=>{const e=t-window.innerHeight;e&&u.current>=t&&(document.body.style.top=-(u.current+e)+"px")}))),300)}}),[e]),c=ye.useCallback((()=>{if(j2()&&null!==pd&&!i){const e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);Object.assign(document.body.style,pd),window.requestAnimationFrame((()=>{o&&a!==window.location.href?l(window.location.href):window.scrollTo(t,e)})),pd=null}}),[a]);return ye.useEffect((()=>{function e(){u.current=window.scrollY}return e(),window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}}),[]),ye.useEffect((()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&s(),t||window.setTimeout((()=>{c()}),500)):c())}),[e,r,a,t,n,s,c]),{restorePositionSetting:c}}function pN({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:o,snapPoints:i,shouldScaleBackground:a=!1,setBackgroundColorOnScale:l=!0,closeThreshold:u=tq,scrollLockTimeout:s=nq,dismissible:c=!0,handleOnly:d=!1,fadeFromIndex:f=i&&i.length-1,activeSnapPoint:p,setActiveSnapPoint:h,fixed:m,modal:v=!0,onClose:g,nested:y,noBodyStyles:b,direction:w="bottom",defaultOpen:x=!1,disablePreventScroll:_=!0,snapToSequentialPoint:k=!1,preventScrollRestoration:P=!1,repositionInputs:S=!0,onAnimationEnd:C,container:E,autoFocus:N=!1}){var O,T;const[R=!1,j]=dN({defaultProp:x,prop:e,onChange:e=>{null==t||t(e),!e&&!y&&ue(),setTimeout((()=>{null==C||C(e)}),1e3*nn.DURATION),e&&!v&&typeof window<"u"&&window.requestAnimationFrame((()=>{document.body.style.pointerEvents="auto"})),e||(document.body.style.pointerEvents="auto")}}),[D,z]=ye.useState(!1),[A,M]=ye.useState(!1),[L,I]=ye.useState(!1),F=ye.useRef(null),W=ye.useRef(null),B=ye.useRef(null),U=ye.useRef(null),$=ye.useRef(null),H=ye.useRef(!1),V=ye.useRef(null),K=ye.useRef(0),q=ye.useRef(!1),G=ye.useRef(0),Y=ye.useRef(null),X=ye.useRef((null==(O=Y.current)?void 0:O.getBoundingClientRect().height)||0),Q=ye.useRef((null==(T=Y.current)?void 0:T.getBoundingClientRect().width)||0),Z=ye.useRef(0),J=ye.useCallback((e=>{i&&e===oe.length-1&&(W.current=new Date)}),[]),{activeSnapPoint:ee,activeSnapPointIndex:te,setActiveSnapPoint:ne,onRelease:re,snapPointsOffset:oe,onDrag:ie,shouldFade:ae,getPercentageDragged:le}=oq({snapPoints:i,activeSnapPointProp:p,setActiveSnapPointProp:h,drawerRef:Y,fadeFromIndex:f,overlayRef:F,onSnapPointChange:J,direction:w,container:E,snapToSequentialPoint:k});GB({isDisabled:!R||A||!v||L||!D||!S||!_});const{restorePositionSetting:ue}=sq({isOpen:R,modal:v,nested:y,hasBeenOpened:D,preventScrollRestoration:P,noBodyStyles:b});function se(){return(window.innerWidth-26)/window.innerWidth}function ce(e,t){var n,r;let o=e;const i=null==(n=window.getSelection())?void 0:n.toString(),a=Y.current?uv(Y.current,w):null,l=new Date;if(o.hasAttribute("data-vaul-no-drag")||o.closest("[data-vaul-no-drag]"))return!1;if("right"===w||"left"===w)return!0;if(W.current&&l.getTime()-W.current.getTime()<500)return!1;if(null!==a&&("bottom"===w?a>0:a<0))return!0;if(i&&i.length>0)return!1;if(l.getTime()-(null==(r=$.current)?void 0:r.getTime())<s&&0===a||t)return $.current=l,!1;for(;o;){if(o.scrollHeight>o.clientHeight){if(0!==o.scrollTop)return $.current=new Date,!1;if("dialog"===o.getAttribute("role"))return!0}o=o.parentNode}return!0}function de(e){!A||!Y.current||(Y.current.classList.remove(J1),H.current=!1,M(!1),U.current=new Date),null==g||g(),e||j(!1),setTimeout((()=>{i&&ne(i[0])}),1e3*nn.DURATION)}function fe(){if(!Y.current)return;const e=document.querySelector("[data-vaul-drawer-wrapper]"),t=uv(Y.current,w);Rn(Y.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`}),Rn(F.current,{transition:`opacity ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`,opacity:"1"}),a&&t&&t>0&&R&&Rn(e,{borderRadius:"8px",overflow:"hidden",...Tn(w)?{transform:`scale(${se()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${se()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${nn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${nn.EASE.join(",")})`},!0)}return ye.useEffect((()=>{var e;function t(){if(!Y.current||!S)return;if(vx(document.activeElement)||q.current){var e;const t=(null==(e=window.visualViewport)?void 0:e.height)||0,n=window.innerHeight;let r=n-t;const o=Y.current.getBoundingClientRect().height||0,a=o>.8*n;Z.current||(Z.current=o);const l=Y.current.getBoundingClientRect().top;if(Math.abs(G.current-r)>60&&(q.current=!q.current),i&&i.length>0&&oe&&te){r+=oe[te]||0}if(G.current=r,o>t||q.current){const e=Y.current.getBoundingClientRect().height;let n=e;e>t&&(n=t-(a?l:26)),Y.current.style.height=m?e-Math.max(r,0)+"px":`${Math.max(n,t-l)}px`}else Y.current.style.height=`${Z.current}px`;i&&i.length>0&&!q.current?Y.current.style.bottom="0px":Y.current.style.bottom=`${Math.max(r,0)}px`}}return null==(e=window.visualViewport)||e.addEventListener("resize",t),()=>{var e;return null==(e=window.visualViewport)?void 0:e.removeEventListener("resize",t)}}),[te,i,oe]),ye.useEffect((()=>(R&&(Rn(document.documentElement,{scrollBehavior:"auto"}),W.current=new Date),()=>{ZB(document.documentElement,"scrollBehavior")})),[R]),ye.createElement(NB,{defaultOpen:x,onOpenChange:e=>{!c&&!e||(e?z(!0):de(!0),j(e))},open:R},ye.createElement(oN.Provider,{value:{activeSnapPoint:ee,snapPoints:i,setActiveSnapPoint:ne,drawerRef:Y,overlayRef:F,onOpenChange:t,onPress:function(e){var t,n;!c&&!i||Y.current&&!Y.current.contains(e.target)||(X.current=(null==(t=Y.current)?void 0:t.getBoundingClientRect().height)||0,Q.current=(null==(n=Y.current)?void 0:n.getBoundingClientRect().width)||0,M(!0),B.current=new Date,iN()&&window.addEventListener("touchend",(()=>H.current=!1),{once:!0}),e.target.setPointerCapture(e.pointerId),K.current=Tn(w)?e.pageY:e.pageX)},onRelease:function(e){if(!A||!Y.current)return;Y.current.classList.remove(J1),H.current=!1,M(!1),U.current=new Date;const t=uv(Y.current,w);if(!ce(e.target,!1)||!t||Number.isNaN(t)||null===B.current)return;const n=U.current.getTime()-B.current.getTime(),r=K.current-(Tn(w)?e.pageY:e.pageX),a=Math.abs(r)/n;if(a>.05&&(I(!0),setTimeout((()=>{I(!1)}),200)),i)return re({draggedDistance:r*("bottom"===w||"right"===w?1:-1),closeDrawer:de,velocity:a,dismissible:c}),void(null==o||o(e,!0));if("bottom"===w||"right"===w?r>0:r<0)return fe(),void(null==o||o(e,!0));if(a>uN)return de(),void(null==o||o(e,!1));var l;const s=Math.min(null!=(l=Y.current.getBoundingClientRect().height)?l:0,window.innerHeight);var d;const f=Math.min(null!=(d=Y.current.getBoundingClientRect().width)?d:0,window.innerWidth),p="left"===w||"right"===w;if(Math.abs(t)>=(p?f:s)*u)return de(),void(null==o||o(e,!1));null==o||o(e,!0),fe()},onDrag:function(e){if(Y.current&&A){const t="bottom"===w||"right"===w?1:-1,n=(K.current-(Tn(w)?e.pageY:e.pageX))*t,o=n>0,l=i&&!c&&!o;if(l&&0===te)return;const u=Math.abs(n),s=document.querySelector("[data-vaul-drawer-wrapper]");let d=u/("bottom"===w||"top"===w?X.current:Q.current);const p=le(u,o);if(null!==p&&(d=p),l&&d>=1||!H.current&&!ce(e.target,o))return;if(Y.current.classList.add(J1),H.current=!0,Rn(Y.current,{transition:"none"}),Rn(F.current,{transition:"none"}),i&&ie({draggedDistance:n}),o&&!i){const e=JB(n),r=Math.min(-1*e,0)*t;return void Rn(Y.current,{transform:Tn(w)?`translate3d(0, ${r}px, 0)`:`translate3d(${r}px, 0, 0)`})}const h=1-d;if((ae||f&&te===f-1)&&(null==r||r(e,d),Rn(F.current,{opacity:`${h}`,transition:"none"},!0)),s&&F.current&&a){const e=Math.min(se()+d*(1-se()),1),t=8-8*d,n=Math.max(0,14-14*d);Rn(s,{borderRadius:`${t}px`,transform:Tn(w)?`scale(${e}) translate3d(0, ${n}px, 0)`:`scale(${e}) translate3d(${n}px, 0, 0)`,transition:"none"},!0)}if(!i){const e=u*t;Rn(Y.current,{transform:Tn(w)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}}},dismissible:c,handleOnly:d,isOpen:R,isDragging:A,shouldFade:ae,closeDrawer:de,onNestedDrag:function(e,t){if(t<0)return;const n=(window.innerWidth-16)/window.innerWidth,r=n+t*(1-n),o=16*t-16;Rn(Y.current,{transform:Tn(w)?`scale(${r}) translate3d(0, ${o}px, 0)`:`scale(${r}) translate3d(${o}px, 0, 0)`,transition:"none"})},onNestedOpenChange:function(e){const t=e?(window.innerWidth-16)/window.innerWidth:1,n=e?-16:0;V.current&&window.clearTimeout(V.current),Rn(Y.current,{transition:`transform ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`,transform:`scale(${t}) translate3d(0, ${n}px, 0)`}),!e&&Y.current&&(V.current=setTimeout((()=>{const e=uv(Y.current,w);Rn(Y.current,{transition:"none",transform:Tn(w)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}),500))},onNestedRelease:function(e,t){const n=Tn(w)?window.innerHeight:window.innerWidth,r=t?(n-16)/n:1,o=t?-16:0;t&&Rn(Y.current,{transition:`transform ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`,transform:Tn(w)?`scale(${r}) translate3d(0, ${o}px, 0)`:`scale(${r}) translate3d(${o}px, 0, 0)`})},keyboardIsOpen:q,modal:v,snapPointsOffset:oe,direction:w,shouldScaleBackground:a,setBackgroundColorOnScale:l,noBodyStyles:b,container:E,autoFocus:N}},n))}const hN=ye.forwardRef((function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:o,shouldFade:i,isOpen:a,modal:l}=lc(),u=sN(t,n),s=r&&r.length>0;return l?ye.createElement(kB,{onMouseUp:o,ref:u,"data-vaul-overlay":"","data-vaul-snap-points":a&&s?"true":"false","data-vaul-snap-points-overlay":a&&i?"true":"false",...e}):(typeof window<"u"&&window.requestAnimationFrame((()=>{document.body.style.pointerEvents="auto"})),null)}));hN.displayName="Drawer.Overlay";const vN=ye.forwardRef((function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},o){const{drawerRef:i,onPress:a,onRelease:l,onDrag:u,keyboardIsOpen:s,snapPointsOffset:c,modal:d,isOpen:f,direction:p,snapPoints:h,container:m,handleOnly:v,autoFocus:g}=lc(),[y,b]=ye.useState(!1),w=sN(o,i),x=ye.useRef(null),_=ye.useRef(null),k=ye.useRef(!1),P=h&&h.length>0;aq();function S(e){x.current=null,k.current=!1,l(e)}return ye.useEffect((()=>{P&&window.requestAnimationFrame((()=>{b(!0)}))}),[]),ye.createElement(MB,{"data-vaul-drawer-direction":p,"data-vaul-drawer":"","data-vaul-delayed-snap-points":y?"true":"false","data-vaul-snap-points":f&&P?"true":"false","data-vaul-custom-container":m?"true":"false",...r,ref:w,style:c&&c.length>0?{"--snap-point-height":`${c[0]}px`,...t}:t,onPointerDown:e=>{v||(null==r.onPointerDown||r.onPointerDown.call(r,e),x.current={x:e.pageX,y:e.pageY},a(e))},onOpenAutoFocus:e=>{null==n||n(e),g||e.preventDefault()},onPointerDownOutside:t=>{null==e||e(t),d&&!t.defaultPrevented?s.current&&(s.current=!1):t.preventDefault()},onFocusOutside:e=>{d||e.preventDefault()},onPointerMove:e=>{if(_.current=e,v||(null==r.onPointerMove||r.onPointerMove.call(r,e),!x.current))return;const t=e.pageY-x.current.y,n=e.pageX-x.current.x,o="touch"===e.pointerType?10:2;((e,t,n=0)=>{if(k.current)return!0;const r=Math.abs(e.y),o=Math.abs(e.x),i=o>r,a=["bottom","right"].includes(t)?1:-1;if("left"===t||"right"===t){if(!(e.x*a<0)&&o>=0&&o<=n)return i}else if(!(e.y*a<0)&&r>=0&&r<=n)return!i;return k.current=!0,!0})({x:n,y:t},p,o)?u(e):(Math.abs(n)>o||Math.abs(t)>o)&&(x.current=null)},onPointerUp:e=>{null==r.onPointerUp||r.onPointerUp.call(r,e),x.current=null,k.current=!1,l(e)},onPointerOut:e=>{null==r.onPointerOut||r.onPointerOut.call(r,e),S(_.current)},onContextMenu:e=>{null==r.onContextMenu||r.onContextMenu.call(r,e),S(_.current)}})}));vN.displayName="Drawer.Content";const lq=250,uq=120,mN=ye.forwardRef((function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:o,isDragging:i,snapPoints:a,activeSnapPoint:l,setActiveSnapPoint:u,dismissible:s,handleOnly:c,isOpen:d,onPress:f,onDrag:p}=lc(),h=ye.useRef(null),m=ye.useRef(!1);function v(){window.clearTimeout(h.current),m.current=!1}return ye.createElement("div",{onClick:function(){m.current?v():window.setTimeout((()=>{!function(){if(i||e||m.current)return void v();if(v(),(!a||0===a.length)&&s)return void o();if(l===a[a.length-1]&&s)return void o();const t=a.findIndex((e=>e===l));if(-1===t)return;const n=a[t+1];u(n)}()}),uq)},onPointerCancel:v,onPointerDown:e=>{c&&f(e),h.current=window.setTimeout((()=>{m.current=!0}),lq)},onPointerMove:e=>{c&&p(e)},ref:r,"data-vaul-drawer-visible":d?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},ye.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))}));function cq({onDrag:e,onOpenChange:t,...n}){const{onNestedDrag:r,onNestedOpenChange:o,onNestedRelease:i}=lc();if(!r)throw new Error("Drawer.NestedRoot must be placed in another drawer");return ye.createElement(pN,{nested:!0,onClose:()=>{o(!1)},onDrag:(t,n)=>{r(t,n),null==e||e(t,n)},onOpenChange:e=>{e&&o(e)},onRelease:i,...n})}function fq(e){const t=lc(),{container:n=t.container,...r}=e;return ye.createElement(IB,{container:n,...r})}mN.displayName="Drawer.Handle";const Xo={Root:pN,NestedRoot:cq,Content:vN,Overlay:hN,Trigger:DB,Portal:fq,Handle:mN,Close:FB,Title:LB,Description:jB},dq=({shouldScaleBackground:e=!0,direction:t="bottom",...n})=>k.jsx(Xo.Root,{direction:t,shouldScaleBackground:e,...n});dq.displayName="Drawer";const lX=Xo.Trigger,pq=Xo.Portal,uX=Xo.Close,gN=P.forwardRef((({className:e,...t},n)=>k.jsx(Xo.Overlay,{ref:n,className:se("fixed inset-0 z-50 bg-black/5",e),...t})));gN.displayName=Xo.Overlay.displayName;const hq=P.forwardRef((({className:e,children:t,direction:n="bottom",...r},o)=>k.jsxs(pq,{children:[k.jsx(gN,{}),k.jsxs(Xo.Content,{ref:o,className:se("fixed z-50 border bg-background shadow-lg","bottom"===n&&"inset-x-0 bottom-0 mt-24 flex h-auto flex-col rounded-t-sm","top"===n&&"inset-x-0 top-0 mb-24 flex h-auto flex-col rounded-b-sm","left"===n&&"inset-y-0 left-0 flex h-full flex-col","right"===n&&"inset-y-0 right-0 flex h-full w-[346px] flex-col sm:w-[435px]",e),...r,children:["bottom"===n&&k.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),t]})]})));hq.displayName="DrawerContent";const vq=({className:e,...t})=>k.jsx("div",{className:se("grid gap-1.5 p-4 text-center sm:text-left",e),...t});vq.displayName="DrawerHeader";const mq=({className:e,...t})=>k.jsx("div",{className:se("mt-auto flex flex-col gap-2 p-4",e),...t});mq.displayName="DrawerFooter";const gq=P.forwardRef((({className:e,...t},n)=>k.jsx(Xo.Title,{ref:n,className:se("text-lg font-semibold leading-none tracking-tight",e),...t})));gq.displayName=Xo.Title.displayName;const yq=P.forwardRef((({className:e,...t},n)=>k.jsx(Xo.Description,{ref:n,className:se("text-sm text-muted-foreground",e),...t})));function N_(e){const t=e+"CollectionProvider",[n,r]=Sr(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=e+"CollectionSlot",l=e+"CollectionItemSlot",u="data-radix-collection-item";return[{Provider:e=>{const{scope:t,children:n}=e,r=ye.useRef(null),i=ye.useRef(new Map).current;return ye.createElement(o,{scope:t,itemMap:i,collectionRef:r},n)},Slot:ye.forwardRef(((e,t)=>{const{scope:n,children:r}=e,o=Rt(t,i(a,n).collectionRef);return ye.createElement(ll,{ref:o},r)})),ItemSlot:ye.forwardRef(((e,t)=>{const{scope:n,children:r,...o}=e,a=ye.useRef(null),s=Rt(t,a),c=i(l,n);return ye.useEffect((()=>(c.itemMap.set(a,{ref:a,...o}),()=>{c.itemMap.delete(a)}))),ye.createElement(ll,{[u]:"",ref:s},r)}))},function(t){const n=i(e+"CollectionConsumer",t);return ye.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${u}]`));return Array.from(n.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[n.collectionRef,n.itemMap])},r]}yq.displayName=Xo.Description.displayName;const bq=Qa(void 0);function Gd(e){const t=ec(bq);return e||t||"ltr"}const wq=["top","right","bottom","left"],Ja=Math.min,ao=Math.max,Ov=Math.round,cv=Math.floor,es=e=>({x:e,y:e}),xq={left:"right",right:"left",bottom:"top",top:"bottom"},_q={start:"end",end:"start"};function gx(e,t,n){return ao(e,Ja(t,n))}function Qi(e,t){return"function"==typeof e?e(t):e}function Zi(e){return e.split("-")[0]}function uc(e){return e.split("-")[1]}function D_(e){return"x"===e?"y":"x"}function I_(e){return"y"===e?"height":"width"}function ts(e){return["top","bottom"].includes(Zi(e))?"y":"x"}function k_(e){return D_(ts(e))}function $q(e,t,n){void 0===n&&(n=!1);const r=uc(e),o=k_(e),i=I_(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Av(a)),[a,Av(a)]}function Sq(e){const t=Av(e);return[yx(e),t,yx(t)]}function yx(e){return e.replace(/start|end/g,(e=>_q[e]))}function Cq(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function Eq(e,t,n,r){const o=uc(e);let i=Cq(Zi(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(yx)))),i}function Av(e){return e.replace(/left|right|bottom|top/g,(e=>xq[e]))}function Pq(e){return{top:0,right:0,bottom:0,left:0,...e}}function yN(e){return"number"!=typeof e?Pq(e):{top:e,right:e,bottom:e,left:e}}function Nv(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function q2(e,t,n){let{reference:r,floating:o}=e;const i=ts(t),a=k_(t),l=I_(a),u=Zi(t),s="y"===i,c=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[l]/2-o[l]/2;let p;switch(u){case"top":p={x:c,y:r.y-o.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(uc(t)){case"start":p[a]-=f*(n&&s?-1:1);break;case"end":p[a]+=f*(n&&s?-1:1)}return p}const Rq=async(e,t,n)=>{const{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));let s=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=q2(s,r,u),f=r,p={},h=0;for(let n=0;n<l.length;n++){const{name:i,fn:m}=l[n],{x:v,y:g,data:y,reset:b}=await m({x:c,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:s,platform:a,elements:{reference:e,floating:t}});c=v??c,d=g??d,p={...p,[i]:{...p[i],...y}},b&&h<=50&&(h++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(s=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:c,y:d}=q2(s,f,u))),n=-1)}return{x:c,y:d,placement:f,strategy:o,middlewareData:p}};async function Ad(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:l,strategy:u}=e,{boundary:s="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Qi(t,e),h=yN(p),m=l[f?"floating"===d?"reference":"floating":d],v=Nv(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:s,rootBoundary:c,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)),b=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},w=Nv(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:g,offsetParent:y,strategy:u}):g);return{top:(v.top-w.top+h.top)/b.y,bottom:(w.bottom-v.bottom+h.bottom)/b.y,left:(v.left-w.left+h.left)/b.x,right:(w.right-v.right+h.right)/b.x}}const Tq=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:l,middlewareData:u}=t,{element:s,padding:c=0}=Qi(e,t)||{};if(null==s)return{};const d=yN(c),f={x:n,y:r},p=k_(o),h=I_(p),m=await a.getDimensions(s),v="y"===p,g=v?"top":"left",y=v?"bottom":"right",b=v?"clientHeight":"clientWidth",w=i.reference[h]+i.reference[p]-f[p]-i.floating[h],x=f[p]-i.reference[p],_=await(null==a.getOffsetParent?void 0:a.getOffsetParent(s));let k=_?_[b]:0;(!k||!await(null==a.isElement?void 0:a.isElement(_)))&&(k=l.floating[b]||i.floating[h]);const P=w/2-x/2,S=k/2-m[h]/2-1,C=Ja(d[g],S),E=Ja(d[y],S),N=C,O=k-m[h]-E,T=k/2-m[h]/2+P,R=gx(N,T,O),j=!u.arrow&&null!=uc(o)&&T!==R&&i.reference[h]/2-(T<N?C:E)-m[h]/2<0,D=j?T<N?T-N:T-O:0;return{[p]:f[p]+D,data:{[p]:R,centerOffset:T-R-D,...j&&{alignmentOffset:D}},reset:j}}}),Oq=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:l,platform:u,elements:s}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...v}=Qi(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const g=Zi(o),y=ts(l),b=Zi(l)===l,w=await(null==u.isRTL?void 0:u.isRTL(s.floating)),x=f||(b||!m?[Av(l)]:Sq(l)),_="none"!==h;!f&&_&&x.push(...Eq(l,m,h,w));const k=[l,...x],P=await Ad(t,v),S=[];let C=(null==(r=i.flip)?void 0:r.overflows)||[];if(c&&S.push(P[g]),d){const e=$q(o,a,w);S.push(P[e[0]],P[e[1]])}if(C=[...C,{placement:o,overflows:S}],!S.every((e=>e<=0))){var E,N;const e=((null==(E=i.flip)?void 0:E.index)||0)+1,t=k[e];if(t)return{data:{index:e,overflows:C},reset:{placement:t}};let n=null==(N=C.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:N.placement;if(!n)switch(p){case"bestFit":{var O;const e=null==(O=C.filter((e=>{if(_){const t=ts(e.placement);return t===y||"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:O[0];e&&(n=e);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}};function z2(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function W2(e){return wq.some((t=>e[t]>=0))}const Aq=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Qi(e,t);switch(r){case"referenceHidden":{const e=z2(await Ad(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:W2(e)}}}case"escaped":{const e=z2(await Ad(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:W2(e)}}}default:return{}}}}};async function Nq(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=Zi(n),l=uc(n),u="y"===ts(n),s=["left","top"].includes(a)?-1:1,c=i&&u?-1:1,d=Qi(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&"number"==typeof h&&(p="end"===l?-1*h:h),u?{x:p*c,y:f*s}:{x:f*s,y:p*c}}const Dq=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:l}=t,u=await Nq(t,e);return a===(null==(n=l.offset)?void 0:n.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:a}}}}},Iq=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...u}=Qi(e,t),s={x:n,y:r},c=await Ad(t,u),d=ts(Zi(o)),f=D_(d);let p=s[f],h=s[d];if(i){const e="y"===f?"bottom":"right";p=gx(p+c["y"===f?"top":"left"],p,p-c[e])}if(a){const e="y"===d?"bottom":"right";h=gx(h+c["y"===d?"top":"left"],h,h-c[e])}const m=l.fn({...t,[f]:p,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:i,[d]:a}}}}}},kq=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:l=0,mainAxis:u=!0,crossAxis:s=!0}=Qi(e,t),c={x:n,y:r},d=ts(o),f=D_(d);let p=c[f],h=c[d];const m=Qi(l,t),v="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(u){const e="y"===f?"height":"width",t=i.reference[f]-i.floating[e]+v.mainAxis,n=i.reference[f]+i.reference[e]-v.mainAxis;p<t?p=t:p>n&&(p=n)}if(s){var g,y;const e="y"===f?"width":"height",t=["top","left"].includes(Zi(o)),n=i.reference[d]-i.floating[e]+(t&&(null==(g=a.offset)?void 0:g[d])||0)+(t?0:v.crossAxis),r=i.reference[d]+i.reference[e]+(t?0:(null==(y=a.offset)?void 0:y[d])||0)-(t?v.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[f]:p,[d]:h}}}},Mq=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:l}=t,{apply:u=()=>{},...s}=Qi(e,t),c=await Ad(t,s),d=Zi(o),f=uc(o),p="y"===ts(o),{width:h,height:m}=i.floating;let v,g;"top"===d||"bottom"===d?(v=d,g=f===(await(null==a.isRTL?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(g=d,v="end"===f?"top":"bottom");const y=m-c.top-c.bottom,b=h-c.left-c.right,w=Ja(m-c[v],y),x=Ja(h-c[g],b),_=!t.middlewareData.shift;let k=w,P=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(P=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(k=y),_&&!f){const e=ao(c.left,0),t=ao(c.right,0),n=ao(c.top,0),r=ao(c.bottom,0);p?P=h-2*(0!==e||0!==t?e+t:ao(c.left,c.right)):k=m-2*(0!==n||0!==r?n+r:ao(c.top,c.bottom))}await u({...t,availableWidth:P,availableHeight:k});const S=await a.getDimensions(l.floating);return h!==S.width||m!==S.height?{reset:{rects:!0}}:{}}}};function mm(){return typeof window<"u"}function ns(e){return bN(e)?(e.nodeName||"").toLowerCase():"#document"}function uo(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function ra(e){var t;return null==(t=(bN(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function bN(e){return!!mm()&&(e instanceof Node||e instanceof uo(e).Node)}function bi(e){return!!mm()&&(e instanceof Element||e instanceof uo(e).Element)}function wi(e){return!!mm()&&(e instanceof HTMLElement||e instanceof uo(e).HTMLElement)}function U2(e){return!(!mm()||typeof ShadowRoot>"u")&&(e instanceof ShadowRoot||e instanceof uo(e).ShadowRoot)}function Kd(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=To(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Lq(e){return["table","td","th"].includes(ns(e))}function jq(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch{return!1}}))}function M_(e){const t=L_(),n=bi(e)?To(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function wN(e){let t=Qu(e);for(;wi(t)&&!gm(t);){if(M_(t))return t;if(jq(t))return null;t=Qu(t)}return null}function L_(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function gm(e){return["html","body","#document"].includes(ns(e))}function To(e){return uo(e).getComputedStyle(e)}function ym(e){return bi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qu(e){if("html"===ns(e))return e;const t=e.assignedSlot||e.parentNode||U2(e)&&e.host||ra(e);return U2(t)?t.host:t}function xN(e){const t=Qu(e);return gm(t)?e.ownerDocument?e.ownerDocument.body:e.body:wi(t)&&Kd(t)?t:xN(t)}function Nd(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=xN(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=uo(o);if(i){const e=Fq(a);return t.concat(a,a.visualViewport||[],Kd(o)?o:[],e&&n?Nd(e):[])}return t.concat(o,Nd(o,[],n))}function Fq(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function _N(e){const t=To(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=wi(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,l=Ov(n)!==i||Ov(r)!==a;return l&&(n=i,r=a),{width:n,height:r,$:l}}function j_(e){return bi(e)?e:e.contextElement}function Hu(e){const t=j_(e);if(!wi(t))return es(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=_N(t);let a=(i?Ov(n.width):n.width)/r,l=(i?Ov(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const Bq=es(0);function $N(e){const t=uo(e);return L_()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Bq}function qq(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==uo(e))&&t}function hl(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=j_(e);let a=es(1);t&&(r?bi(r)&&(a=Hu(r)):a=Hu(e));const l=qq(i,n,r)?$N(i):es(0);let u=(o.left+l.x)/a.x,s=(o.top+l.y)/a.y,c=o.width/a.x,d=o.height/a.y;if(i){const e=uo(i),t=r&&bi(r)?uo(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=Hu(n),t=n.getBoundingClientRect(),r=To(n),o=t.left+(n.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(n.clientTop+parseFloat(r.paddingTop))*e.y;u*=e.x,s*=e.y,c*=e.x,d*=e.y,u+=o,s+=i,n=uo(n).frameElement}}return Nv({width:c,height:d,x:u,y:s})}const zq=[":popover-open",":modal"];function SN(e){let t=!1,n=0,r=0;if(zq.forEach((n=>{!function(n){try{t=t||e.matches(n)}catch{}}(n)})),t){const t=wN(e);if(t){const e=t.getBoundingClientRect();n=e.x,r=e.y}}return[t,n,r]}function Wq(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=ra(r),[a]=t?SN(t.floating):[!1];if(r===i||a)return n;let l={scrollLeft:0,scrollTop:0},u=es(1);const s=es(0),c=wi(r);if((c||!c&&"fixed"!==o)&&(("body"!==ns(r)||Kd(i))&&(l=ym(r)),wi(r))){const e=hl(r);u=Hu(r),s.x=e.x+r.clientLeft,s.y=e.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+s.x,y:n.y*u.y-l.scrollTop*u.y+s.y}}function Uq(e){return Array.from(e.getClientRects())}function CN(e){return hl(ra(e)).left+ym(e).scrollLeft}function Hq(e){const t=ra(e),n=ym(e),r=e.ownerDocument.body,o=ao(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=ao(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+CN(e);const l=-n.scrollTop;return"rtl"===To(r).direction&&(a+=ao(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:l}}function Vq(e,t){const n=uo(e),r=ra(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,l=0,u=0;if(o){i=o.width,a=o.height;const e=L_();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,u=o.offsetTop)}return{width:i,height:a,x:l,y:u}}function Gq(e,t){const n=hl(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=wi(e)?Hu(e):es(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}function H2(e,t,n){let r;if("viewport"===t)r=Vq(e,n);else if("document"===t)r=Hq(ra(e));else if(bi(t))r=Gq(t,n);else{const n=$N(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return Nv(r)}function EN(e,t){const n=Qu(e);return!(n===t||!bi(n)||gm(n))&&("fixed"===To(n).position||EN(n,t))}function Kq(e,t){const n=t.get(e);if(n)return n;let r=Nd(e,[],!1).filter((e=>bi(e)&&"body"!==ns(e))),o=null;const i="fixed"===To(e).position;let a=i?Qu(e):e;for(;bi(a)&&!gm(a);){const t=To(a),n=M_(a);!n&&"fixed"===t.position&&(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||Kd(a)&&!n&&EN(e,a))?r=r.filter((e=>e!==a)):o=t,a=Qu(a)}return t.set(e,r),r}function Yq(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?Kq(t,this._c):[].concat(n),r],a=i[0],l=i.reduce(((e,n)=>{const r=H2(t,n,o);return e.top=ao(r.top,e.top),e.right=Ja(r.right,e.right),e.bottom=Ja(r.bottom,e.bottom),e.left=ao(r.left,e.left),e}),H2(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Xq(e){const{width:t,height:n}=_N(e);return{width:t,height:n}}function Qq(e,t,n,r){const o=wi(t),i=ra(t),a="fixed"===n,l=hl(e,!0,a,t);let u={scrollLeft:0,scrollTop:0};const s=es(0);if(o||!o&&!a)if(("body"!==ns(t)||Kd(i))&&(u=ym(t)),o){const e=hl(t,!0,a,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else i&&(s.x=CN(i));let c=l.left+u.scrollLeft-s.x,d=l.top+u.scrollTop-s.y;const[f,p,h]=SN(r);return f&&(c+=p,d+=h,o&&(c+=t.clientLeft,d+=t.clientTop)),{x:c,y:d,width:l.width,height:l.height}}function V2(e,t){return wi(e)&&"fixed"!==To(e).position?t?t(e):e.offsetParent:null}function PN(e,t){const n=uo(e);if(!wi(e))return n;let r=V2(e,t);for(;r&&Lq(r)&&"static"===To(r).position;)r=V2(r,t);return r&&("html"===ns(r)||"body"===ns(r)&&"static"===To(r).position&&!M_(r))?n:r||wN(e)||n}const Zq=async function(e){const t=this.getOffsetParent||PN,n=this.getDimensions;return{reference:Qq(e.reference,await t(e.floating),e.strategy,e.floating),floating:{x:0,y:0,...await n(e.floating)}}};function Jq(e){return"rtl"===To(e).direction}const ez={convertOffsetParentRelativeRectToViewportRelativeRect:Wq,getDocumentElement:ra,getClippingRect:Yq,getOffsetParent:PN,getElementRects:Zq,getClientRects:Uq,getDimensions:Xq,getScale:Hu,isElement:bi,isRTL:Jq};function tz(e,t){let n,r=null;const o=ra(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();const{left:s,top:c,width:d,height:f}=e.getBoundingClientRect();if(l||t(),!d||!f)return;const p={rootMargin:-cv(c)+"px "+-cv(o.clientWidth-(s+d))+"px "+-cv(o.clientHeight-(c+f))+"px "+-cv(s)+"px",threshold:ao(0,Ja(1,u))||1};let h=!0;function m(e){const t=e[0].intersectionRatio;if(t!==u){if(!h)return a();t?a(!1,t):n=setTimeout((()=>{a(!1,1e-7)}),100)}h=!1}try{r=new IntersectionObserver(m,{...p,root:o.ownerDocument})}catch{r=new IntersectionObserver(m,p)}r.observe(e)}(!0),i}function nz(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:u=!1}=r,s=j_(e),c=o||i?[...s?Nd(s):[],...Nd(t)]:[];c.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=s&&l?tz(s,n):null;let f=-1,p=null;a&&(p=new ResizeObserver((e=>{let[r]=e;r&&r.target===s&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{var e;null==(e=p)||e.observe(t)}))),n()})),s&&!u&&p.observe(s),p.observe(t));let h,m=u?hl(e):null;return u&&function t(){const r=hl(e);m&&(r.x!==m.x||r.y!==m.y||r.width!==m.width||r.height!==m.height)&&n(),m=r,h=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=p)||e.disconnect(),p=null,u&&cancelAnimationFrame(h)}}const rz=Iq,oz=Oq,iz=Mq,az=Aq,G2=Tq,sz=kq,lz=(e,t,n)=>{const r=new Map,o={platform:ez,...n},i={...o.platform,_c:r};return Rq(e,t,{...o,platform:i})};var yv=typeof document<"u"?tc:We;function Dv(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!Dv(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||Dv(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function RN(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function K2(e,t){const n=RN(e);return Math.round(t*n)/n}function ew(e){const t=P.useRef(e);return yv((()=>{t.current=e})),t}function uz(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:l=!0,whileElementsMounted:u,open:s}=e,[c,d]=P.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=P.useState(r);Dv(f,r)||p(r);const[h,m]=P.useState(null),[v,g]=P.useState(null),y=P.useCallback((e=>{e!==_.current&&(_.current=e,m(e))}),[]),b=P.useCallback((e=>{e!==k.current&&(k.current=e,g(e))}),[]),w=i||h,x=a||v,_=P.useRef(null),k=P.useRef(null),S=P.useRef(c),C=null!=u,E=ew(u),N=ew(o),O=ew(s),T=P.useCallback((()=>{if(!_.current||!k.current)return;const e={placement:t,strategy:n,middleware:f};N.current&&(e.platform=N.current),lz(_.current,k.current,e).then((e=>{const t={...e,isPositioned:!1!==O.current};R.current&&!Dv(S.current,t)&&(S.current=t,_i.flushSync((()=>{d(t)})))}))}),[f,t,n,N,O]);yv((()=>{!1===s&&S.current.isPositioned&&(S.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[s]);const R=P.useRef(!1);yv((()=>(R.current=!0,()=>{R.current=!1})),[]),yv((()=>{if(w&&(_.current=w),x&&(k.current=x),w&&x){if(E.current)return E.current(w,x,T);T()}}),[w,x,T,E,C]);const j=P.useMemo((()=>({reference:_,floating:k,setReference:y,setFloating:b})),[y,b]),D=P.useMemo((()=>({reference:w,floating:x})),[w,x]),z=P.useMemo((()=>{const e={position:n,left:0,top:0};if(!D.floating)return e;const t=K2(D.floating,c.x),r=K2(D.floating,c.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...RN(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,l,D.floating,c.x,c.y]);return P.useMemo((()=>({...c,update:T,refs:j,elements:D,floatingStyles:z})),[c,T,j,D,z])}const cz=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&function(e){return{}.hasOwnProperty.call(e,"current")}(n)?null!=n.current?G2({element:n.current,padding:r}).fn(t):{}:n?G2({element:n,padding:r}).fn(t):{}}}),fz=(e,t)=>({...Dq(e),options:[e,t]}),dz=(e,t)=>({...rz(e),options:[e,t]}),pz=(e,t)=>({...sz(e),options:[e,t]}),hz=(e,t)=>({...oz(e),options:[e,t]}),vz=(e,t)=>({...iz(e),options:[e,t]}),mz=(e,t)=>({...az(e),options:[e,t]}),gz=(e,t)=>({...cz(e),options:[e,t]}),TN="Popper",[ON,cc]=Sr(TN),[yz,AN]=ON(TN),bz=e=>{const{__scopePopper:t,children:n}=e,[r,o]=tt(null);return z(yz,{scope:t,anchor:r,onAnchorChange:o},n)},wz="PopperAnchor",xz=_e(((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=AN(wz,n),a=ke(null),l=Rt(t,a);return We((()=>{i.onAnchorChange((null==r?void 0:r.current)||a.current)})),r?null:z(it.div,fe({},o,{ref:l}))})),NN="PopperContent",[_z,cX]=ON(NN),$z=_e(((e,t)=>{var n,r,o,i,a,l,u,s;const{__scopePopper:c,side:d="bottom",sideOffset:f=0,align:p="center",alignOffset:h=0,arrowPadding:m=0,avoidCollisions:v=!0,collisionBoundary:g=[],collisionPadding:y=0,sticky:b="partial",hideWhenDetached:w=!1,updatePositionStrategy:x="optimized",onPlaced:_,...k}=e,P=AN(NN,c),[S,C]=tt(null),E=Rt(t,(e=>C(e))),[N,O]=tt(null),T=dm(N),R=null!==(n=null==T?void 0:T.width)&&void 0!==n?n:0,j=null!==(r=null==T?void 0:T.height)&&void 0!==r?r:0,D=d+("center"!==p?"-"+p:""),A="number"==typeof y?y:{top:0,right:0,bottom:0,left:0,...y},M=Array.isArray(g)?g:[g],L=M.length>0,I={padding:A,boundary:M.filter(Sz),altBoundary:L},{refs:F,floatingStyles:W,placement:B,isPositioned:U,middlewareData:$}=uz({strategy:"fixed",placement:D,whileElementsMounted:(...e)=>nz(...e,{animationFrame:"always"===x}),elements:{reference:P.anchor},middleware:[fz({mainAxis:f+j,alignmentAxis:h}),v&&dz({mainAxis:!0,crossAxis:!1,limiter:"partial"===b?pz():void 0,...I}),v&&hz({...I}),vz({...I,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${n}px`),a.setProperty("--radix-popper-available-height",`${r}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),N&&gz({element:N,padding:m}),Cz({arrowWidth:R,arrowHeight:j}),w&&mz({strategy:"referenceHidden",...I})]}),[H,V]=DN(B),K=Hr(_);fr((()=>{U&&(null==K||K())}),[U,K]);const q=null===(o=$.arrow)||void 0===o?void 0:o.x,G=null===(i=$.arrow)||void 0===i?void 0:i.y,Y=0!==(null===(a=$.arrow)||void 0===a?void 0:a.centerOffset),[X,Q]=tt();return fr((()=>{S&&Q(window.getComputedStyle(S).zIndex)}),[S]),z("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:U?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:X,"--radix-popper-transform-origin":[null===(l=$.transformOrigin)||void 0===l?void 0:l.x,null===(u=$.transformOrigin)||void 0===u?void 0:u.y].join(" ")},dir:e.dir},z(_z,{scope:c,placedSide:H,onArrowChange:O,arrowX:q,arrowY:G,shouldHideArrow:Y},z(it.div,fe({"data-side":H,"data-align":V},k,{ref:E,style:{...k.style,animation:U?void 0:"none",opacity:null!==(s=$.hide)&&void 0!==s&&s.referenceHidden?0:void 0}}))))}));function Sz(e){return null!==e}const Cz=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,a;const{placement:l,rects:u,middlewareData:s}=t,c=0!==(null===(n=s.arrow)||void 0===n?void 0:n.centerOffset),d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[p,h]=DN(l),m={start:"0%",center:"50%",end:"100%"}[h],v=(null!==(r=null===(o=s.arrow)||void 0===o?void 0:o.x)&&void 0!==r?r:0)+d/2,g=(null!==(i=null===(a=s.arrow)||void 0===a?void 0:a.y)&&void 0!==i?i:0)+f/2;let y="",b="";return"bottom"===p?(y=c?m:`${v}px`,b=-f+"px"):"top"===p?(y=c?m:`${v}px`,b=`${u.floating.height+f}px`):"right"===p?(y=-f+"px",b=c?m:`${g}px`):"left"===p&&(y=`${u.floating.width+f}px`,b=c?m:`${g}px`),{data:{x:y,y:b}}}});function DN(e){const[t,n="center"]=e.split("-");return[t,n]}const bm=bz,F_=xz,B_=$z,tw="rovingFocusGroup.onEntryFocus",Ez={bubbles:!1,cancelable:!0},q_="RovingFocusGroup",[bx,IN,Pz]=N_(q_),[Rz,fc]=Sr(q_,[Pz]),[Tz,Oz]=Rz(q_),Az=_e(((e,t)=>z(bx.Provider,{scope:e.__scopeRovingFocusGroup},z(bx.Slot,{scope:e.__scopeRovingFocusGroup},z(Nz,fe({},e,{ref:t})))))),Nz=_e(((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:s,...c}=e,d=ke(null),f=Rt(t,d),p=Gd(i),[h=null,m]=Vo({prop:a,defaultProp:l,onChange:u}),[v,g]=tt(!1),y=Hr(s),b=IN(n),w=ke(!1),[x,_]=tt(0);return We((()=>{const e=d.current;if(e)return e.addEventListener(tw,y),()=>e.removeEventListener(tw,y)}),[y]),z(Tz,{scope:n,orientation:r,dir:p,loop:o,currentTabStopId:h,onItemFocus:lt((e=>m(e)),[m]),onItemShiftTab:lt((()=>g(!0)),[]),onFocusableItemAdd:lt((()=>_((e=>e+1))),[]),onFocusableItemRemove:lt((()=>_((e=>e-1))),[])},z(it.div,fe({tabIndex:v||0===x?-1:0,"data-orientation":r},c,{ref:f,style:{outline:"none",...e.style},onMouseDown:ze(e.onMouseDown,(()=>{w.current=!0})),onFocus:ze(e.onFocus,(e=>{const t=!w.current;if(e.target===e.currentTarget&&t&&!v){const t=new CustomEvent(tw,Ez);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=b().filter((e=>e.focusable));kN([e.find((e=>e.active)),e.find((e=>e.id===h)),...e].filter(Boolean).map((e=>e.ref.current)))}}w.current=!1})),onBlur:ze(e.onBlur,(()=>g(!1)))})))})),Dz="RovingFocusGroupItem",Iz=_e(((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...a}=e,l=lo(),u=i||l,s=Oz(Dz,n),c=s.currentTabStopId===u,d=IN(n),{onFocusableItemAdd:f,onFocusableItemRemove:p}=s;return We((()=>{if(r)return f(),()=>p()}),[r,f,p]),z(bx.ItemSlot,{scope:n,id:u,focusable:r,active:o},z(it.span,fe({tabIndex:c?0:-1,"data-orientation":s.orientation},a,{ref:t,onMouseDown:ze(e.onMouseDown,(e=>{r?s.onItemFocus(u):e.preventDefault()})),onFocus:ze(e.onFocus,(()=>s.onItemFocus(u))),onKeyDown:ze(e.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void s.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=Lz(e,s.orientation,s.dir);if(void 0!==t){e.preventDefault();let n=d().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)n.reverse();else if("prev"===t||"next"===t){"prev"===t&&n.reverse();const r=n.indexOf(e.currentTarget);n=s.loop?jz(n,r+1):n.slice(r+1)}setTimeout((()=>kN(n)))}}))})))})),kz={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Mz(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}function Lz(e,t,n){const r=Mz(e.key,n);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)))return kz[r]}function kN(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function jz(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}const z_=Az,W_=Iz,wx=["Enter"," "],Fz=["ArrowDown","PageUp","Home"],MN=["ArrowUp","PageDown","End"],Bz=[...Fz,...MN],qz={ltr:[...wx,"ArrowRight"],rtl:[...wx,"ArrowLeft"]},zz={ltr:["ArrowLeft"],rtl:["ArrowRight"]},wm="Menu",[Dd,Wz,Uz]=N_(wm),[bl,LN]=Sr(wm,[Uz,cc,fc]),xm=cc(),jN=fc(),[FN,is]=bl(wm),[Hz,Yd]=bl(wm),Vz=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:i,modal:a=!0}=e,l=xm(t),[u,s]=tt(null),c=ke(!1),d=Hr(i),f=Gd(o);return We((()=>{const e=()=>{c.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>c.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})}}),[]),z(bm,l,z(FN,{scope:t,open:n,onOpenChange:d,content:u,onContentChange:s},z(Hz,{scope:t,onClose:lt((()=>d(!1)),[d]),isUsingKeyboardRef:c,dir:f,modal:a},r)))},BN=_e(((e,t)=>{const{__scopeMenu:n,...r}=e,o=xm(n);return z(F_,fe({},o,r,{ref:t}))})),qN="MenuPortal",[Gz,zN]=bl(qN,{forceMount:void 0}),Kz=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,i=is(qN,t);return z(Gz,{scope:t,forceMount:n},z(Ao,{present:n||i.open},z(Fx,{asChild:!0,container:o},r)))},Ho="MenuContent",[Yz,U_]=bl(Ho),Xz=_e(((e,t)=>{const n=zN(Ho,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=is(Ho,e.__scopeMenu),a=Yd(Ho,e.__scopeMenu);return z(Dd.Provider,{scope:e.__scopeMenu},z(Ao,{present:r||i.open},z(Dd.Slot,{scope:e.__scopeMenu},a.modal?z(Qz,fe({},o,{ref:t})):z(Zz,fe({},o,{ref:t})))))})),Qz=_e(((e,t)=>{const n=is(Ho,e.__scopeMenu),r=ke(null),o=Rt(t,r);return We((()=>{const e=r.current;if(e)return Kv(e)}),[]),z(H_,fe({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ze(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))})),Zz=_e(((e,t)=>{const n=is(Ho,e.__scopeMenu);return z(H_,fe({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))})),H_=_e(((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:l,onEntryFocus:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:h,...m}=e,v=is(Ho,n),g=Yd(Ho,n),y=xm(n),b=jN(n),w=Wz(n),[x,_]=tt(null),k=ke(null),P=Rt(t,k,v.onContentChange),S=ke(0),C=ke(""),E=ke(0),N=ke(null),O=ke("right"),T=ke(0),R=h?Gv:vl,j=h?{as:ll,allowPinchZoom:!0}:void 0;We((()=>()=>window.clearTimeout(S.current)),[]),Bx();const D=lt((e=>{var t,n;return O.current===(null===(t=N.current)||void 0===t?void 0:t.side)&&bW(e,null===(n=N.current)||void 0===n?void 0:n.area)}),[]);return z(Yz,{scope:n,searchRef:C,onItemEnter:lt((e=>{D(e)&&e.preventDefault()}),[D]),onItemLeave:lt((e=>{var t;D(e)||(null===(t=k.current)||void 0===t||t.focus(),_(null))}),[D]),onTriggerLeave:lt((e=>{D(e)&&e.preventDefault()}),[D]),pointerGraceTimerRef:E,onPointerGraceIntentChange:lt((e=>{N.current=e}),[])},z(R,j,z(jx,{asChild:!0,trapped:o,onMountAutoFocus:ze(i,(e=>{var t;e.preventDefault(),null===(t=k.current)||void 0===t||t.focus()})),onUnmountAutoFocus:a},z(Hv,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p},z(z_,fe({asChild:!0},b,{dir:g.dir,orientation:"vertical",loop:r,currentTabStopId:x,onCurrentTabStopIdChange:_,onEntryFocus:ze(u,(e=>{g.isUsingKeyboardRef.current||e.preventDefault()}))}),z(B_,fe({role:"menu","aria-orientation":"vertical","data-state":YN(v.open),"data-radix-menu-content":"",dir:g.dir},y,m,{ref:P,style:{outline:"none",...m.style},onKeyDown:ze(m.onKeyDown,(e=>{const 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&&(e=>{var t,n;const r=C.current+e,o=w().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=gW(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){C.current=t,window.clearTimeout(S.current),""!==t&&(S.current=window.setTimeout((()=>e("")),1e3))})(r),u&&setTimeout((()=>u.focus()))})(e.key));const o=k.current;if(e.target!==o||!Bz.includes(e.key))return;e.preventDefault();const i=w().filter((e=>!e.disabled)).map((e=>e.ref.current));MN.includes(e.key)&&i.reverse(),vW(i)})),onBlur:ze(e.onBlur,(e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(S.current),C.current="")})),onPointerMove:ze(e.onPointerMove,Id((e=>{const t=e.target,n=T.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>T.current?"right":"left";O.current=t,T.current=e.clientX}})))})))))))})),WN=_e(((e,t)=>{const{__scopeMenu:n,...r}=e;return z(it.div,fe({role:"group"},r,{ref:t}))})),Jz=_e(((e,t)=>{const{__scopeMenu:n,...r}=e;return z(it.div,fe({},r,{ref:t}))})),xx="MenuItem",Y2="menu.itemSelect",V_=_e(((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,i=ke(null),a=Yd(xx,e.__scopeMenu),l=U_(xx,e.__scopeMenu),u=Rt(t,i),s=ke(!1);return z(UN,fe({},o,{ref:u,disabled:n,onClick:ze(e.onClick,(()=>{const e=i.current;if(!n&&e){const t=new CustomEvent(Y2,{bubbles:!0,cancelable:!0});e.addEventListener(Y2,(e=>null==r?void 0:r(e)),{once:!0}),xT(e,t),t.defaultPrevented?s.current=!1:a.onClose()}})),onPointerDown:t=>{var n;null===(n=e.onPointerDown)||void 0===n||n.call(e,t),s.current=!0},onPointerUp:ze(e.onPointerUp,(e=>{var t;s.current||null===(t=e.currentTarget)||void 0===t||t.click()})),onKeyDown:ze(e.onKeyDown,(e=>{const t=""!==l.searchRef.current;n||t&&" "===e.key||wx.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}))}))})),UN=_e(((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...i}=e,a=U_(xx,n),l=jN(n),u=ke(null),s=Rt(t,u),[c,d]=tt(!1),[f,p]=tt("");return We((()=>{const e=u.current;var t;e&&p((null!==(t=e.textContent)&&void 0!==t?t:"").trim())}),[i.children]),z(Dd.ItemSlot,{scope:n,disabled:r,textValue:o??f},z(W_,fe({asChild:!0},l,{focusable:!r}),z(it.div,fe({role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},i,{ref:s,onPointerMove:ze(e.onPointerMove,Id((e=>{r?a.onItemLeave(e):(a.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus())}))),onPointerLeave:ze(e.onPointerLeave,Id((e=>a.onItemLeave(e)))),onFocus:ze(e.onFocus,(()=>d(!0))),onBlur:ze(e.onBlur,(()=>d(!1)))}))))})),eW=_e(((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return z(VN,{scope:e.__scopeMenu,checked:n},z(V_,fe({role:"menuitemcheckbox","aria-checked":Iv(n)?"mixed":n},o,{ref:t,"data-state":G_(n),onSelect:ze(o.onSelect,(()=>null==r?void 0:r(!!Iv(n)||!n)),{checkForDefaultPrevented:!1})})))})),tW="MenuRadioGroup",[nW,rW]=bl(tW,{value:void 0,onValueChange:()=>{}}),oW=_e(((e,t)=>{const{value:n,onValueChange:r,...o}=e,i=Hr(r);return z(nW,{scope:e.__scopeMenu,value:n,onValueChange:i},z(WN,fe({},o,{ref:t})))})),iW="MenuRadioItem",aW=_e(((e,t)=>{const{value:n,...r}=e,o=rW(iW,e.__scopeMenu),i=n===o.value;return z(VN,{scope:e.__scopeMenu,checked:i},z(V_,fe({role:"menuitemradio","aria-checked":i},r,{ref:t,"data-state":G_(i),onSelect:ze(r.onSelect,(()=>{var e;return null===(e=o.onValueChange)||void 0===e?void 0:e.call(o,n)}),{checkForDefaultPrevented:!1})})))})),HN="MenuItemIndicator",[VN,sW]=bl(HN,{checked:!1}),lW=_e(((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,i=sW(HN,n);return z(Ao,{present:r||Iv(i.checked)||!0===i.checked},z(it.span,fe({},o,{ref:t,"data-state":G_(i.checked)})))})),uW=_e(((e,t)=>{const{__scopeMenu:n,...r}=e;return z(it.div,fe({role:"separator","aria-orientation":"horizontal"},r,{ref:t}))})),GN="MenuSub",[cW,KN]=bl(GN),fW=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,i=is(GN,t),a=xm(t),[l,u]=tt(null),[s,c]=tt(null),d=Hr(o);return We((()=>(!1===i.open&&d(!1),()=>d(!1))),[i.open,d]),z(bm,a,z(FN,{scope:t,open:r,onOpenChange:d,content:s,onContentChange:c},z(cW,{scope:t,contentId:lo(),triggerId:lo(),trigger:l,onTriggerChange:u},n)))},fv="MenuSubTrigger",dW=_e(((e,t)=>{const n=is(fv,e.__scopeMenu),r=Yd(fv,e.__scopeMenu),o=KN(fv,e.__scopeMenu),i=U_(fv,e.__scopeMenu),a=ke(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:u}=i,s={__scopeMenu:e.__scopeMenu},c=lt((()=>{a.current&&window.clearTimeout(a.current),a.current=null}),[]);return We((()=>c),[c]),We((()=>{const e=l.current;return()=>{window.clearTimeout(e),u(null)}}),[l,u]),z(BN,fe({asChild:!0},s),z(UN,fe({id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":YN(n.open)},e,{ref:Uv(t,o.onTriggerChange),onClick:t=>{var r;null===(r=e.onClick)||void 0===r||r.call(e,t),!e.disabled&&!t.defaultPrevented&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:ze(e.onPointerMove,Id((t=>{i.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(i.onPointerGraceIntentChange(null),a.current=window.setTimeout((()=>{n.onOpenChange(!0),c()}),100))}))),onPointerLeave:ze(e.onPointerLeave,Id((e=>{var t;c();const r=null===(t=n.content)||void 0===t?void 0:t.getBoundingClientRect();if(r){var o;const t=null===(o=n.content)||void 0===o?void 0:o.dataset.side,a="right"===t,u=a?-5:5,s=r[a?"left":"right"],c=r[a?"right":"left"];i.onPointerGraceIntentChange({area:[{x:e.clientX+u,y:e.clientY},{x:s,y:r.top},{x:c,y:r.top},{x:c,y:r.bottom},{x:s,y:r.bottom}],side:t}),window.clearTimeout(l.current),l.current=window.setTimeout((()=>i.onPointerGraceIntentChange(null)),300)}else{if(i.onTriggerLeave(e),e.defaultPrevented)return;i.onPointerGraceIntentChange(null)}}))),onKeyDown:ze(e.onKeyDown,(t=>{const o=""!==i.searchRef.current;var a;e.disabled||o&&" "===t.key||!qz[r.dir].includes(t.key)||(n.onOpenChange(!0),null===(a=n.content)||void 0===a||a.focus(),t.preventDefault())}))})))})),pW="MenuSubContent",hW=_e(((e,t)=>{const n=zN(Ho,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=is(Ho,e.__scopeMenu),a=Yd(Ho,e.__scopeMenu),l=KN(pW,e.__scopeMenu),u=ke(null),s=Rt(t,u);return z(Dd.Provider,{scope:e.__scopeMenu},z(Ao,{present:r||i.open},z(Dd.Slot,{scope:e.__scopeMenu},z(H_,fe({id:l.contentId,"aria-labelledby":l.triggerId},o,{ref:s,align:"start",side:"rtl"===a.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{var t;a.isUsingKeyboardRef.current&&(null===(t=u.current)||void 0===t||t.focus()),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:ze(e.onFocusOutside,(e=>{e.target!==l.trigger&&i.onOpenChange(!1)})),onEscapeKeyDown:ze(e.onEscapeKeyDown,(e=>{a.onClose(),e.preventDefault()})),onKeyDown:ze(e.onKeyDown,(e=>{const t=e.currentTarget.contains(e.target),n=zz[a.dir].includes(e.key);var r;t&&n&&(i.onOpenChange(!1),null===(r=l.trigger)||void 0===r||r.focus(),e.preventDefault())}))})))))}));function YN(e){return e?"open":"closed"}function Iv(e){return"indeterminate"===e}function G_(e){return Iv(e)?"indeterminate":e?"checked":"unchecked"}function vW(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function mW(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}function gW(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,o=n?e.indexOf(n):-1;let i=mW(e,Math.max(o,0));1===r.length&&(i=i.filter((e=>e!==n)));const a=i.find((e=>e.toLowerCase().startsWith(r.toLowerCase())));return a!==n?a:void 0}function yW(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){const a=t[e].x,l=t[e].y,u=t[i].x,s=t[i].y;l>r!=s>r&&n<(u-a)*(r-l)/(s-l)+a&&(o=!o)}return o}function bW(e,t){if(!t)return!1;return yW({x:e.clientX,y:e.clientY},t)}function Id(e){return t=>"mouse"===t.pointerType?e(t):void 0}const wW=Vz,xW=BN,_W=Kz,$W=Xz,SW=WN,CW=Jz,EW=V_,PW=eW,RW=oW,TW=aW,OW=lW,AW=uW,NW=fW,DW=dW,IW=hW,XN="DropdownMenu",[kW,fX]=Sr(XN,[LN]),Pr=LN(),[MW,QN]=kW(XN),LW=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:i,onOpenChange:a,modal:l=!0}=e,u=Pr(t),s=ke(null),[c=!1,d]=Vo({prop:o,defaultProp:i,onChange:a});return z(MW,{scope:t,triggerId:lo(),triggerRef:s,contentId:lo(),open:c,onOpenChange:d,onOpenToggle:lt((()=>d((e=>!e))),[d]),modal:l},z(wW,fe({},u,{open:c,onOpenChange:d,dir:r,modal:l}),n))},jW="DropdownMenuTrigger",FW=_e(((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,i=QN(jW,n),a=Pr(n);return z(xW,fe({asChild:!0},a),z(it.button,fe({type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r},o,{ref:Uv(t,i.triggerRef),onPointerDown:ze(e.onPointerDown,(e=>{!r&&0===e.button&&!1===e.ctrlKey&&(i.onOpenToggle(),i.open||e.preventDefault())})),onKeyDown:ze(e.onKeyDown,(e=>{r||(["Enter"," "].includes(e.key)&&i.onOpenToggle(),"ArrowDown"===e.key&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())}))})))})),BW=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Pr(t);return z(_W,fe({},r,n))},qW="DropdownMenuContent",zW=_e(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=QN(qW,n),i=Pr(n),a=ke(!1);return z($W,fe({id:o.contentId,"aria-labelledby":o.triggerId},i,r,{ref:t,onCloseAutoFocus:ze(e.onCloseAutoFocus,(e=>{var t;a.current||null===(t=o.triggerRef.current)||void 0===t||t.focus(),a.current=!1,e.preventDefault()})),onInteractOutside:ze(e.onInteractOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;(!o.modal||r)&&(a.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)"}}))})),WW=_e(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pr(n);return z(SW,fe({},o,r,{ref:t}))})),UW=_e(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pr(n);return z(CW,fe({},o,r,{ref:t}))})),HW=_e(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pr(n);return z(EW,fe({},o,r,{ref:t}))})),VW=_e(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pr(n);return z(PW,fe({},o,r,{ref:t}))})),GW=_e(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pr(n);return z(RW,fe({},o,r,{ref:t}))})),KW=_e(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pr(n);return z(TW,fe({},o,r,{ref:t}))})),YW=_e(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pr(n);return z(OW,fe({},o,r,{ref:t}))})),XW=_e(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pr(n);return z(AW,fe({},o,r,{ref:t}))})),QW=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:i}=e,a=Pr(t),[l=!1,u]=Vo({prop:r,defaultProp:i,onChange:o});return z(NW,fe({},a,{open:l,onOpenChange:u}),n)},ZW=_e(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pr(n);return z(DW,fe({},o,r,{ref:t}))})),JW=_e(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pr(n);return z(IW,fe({},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)"}}))})),eU=LW,tU=FW,ZN=BW,JN=zW,nU=WW,e3=UW,t3=HW,n3=VW,rU=GW,r3=KW,oU=YW,K_=XW,iU=QW,o3=ZW,i3=JW,dX=eU,pX=tU,hX=nU,vX=ZN,mX=iU,gX=rU,aU=P.forwardRef((({className:e,inset:t,children:n,...r},o)=>k.jsxs(o3,{ref:o,className:se("flex cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[n,k.jsx(fT,{className:"ml-auto h-4 w-4"})]})));aU.displayName=o3.displayName;const sU=P.forwardRef((({className:e,...t},n)=>k.jsx(i3,{ref:n,className:se("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t})));sU.displayName=i3.displayName;const lU=P.forwardRef((({className:e,sideOffset:t=4,...n},r)=>k.jsx(ZN,{children:k.jsx(JN,{ref:r,sideOffset:t,className:se("z-[101] flex max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] flex-col gap-xxxs overflow-y-auto rounded-lg border border-slate-200 bg-white p-xxs text-popover-foreground ","shadow-[0px_0px_12px_0px_rgba(0,0,0,0.08)] ","data-[state=open]:fade-in data-[state=open]:slide-in-from-top-2","data-[state=closed]:fade-out data-[state=closed]:slide-out-to-top-2","data-[state=closed]:duration-150 data-[state=open]:duration-150","data-[state=closed]:[animation-timing-function:ease-in] data-[state=open]:[animation-timing-function:ease-out]",e),...n})})));lU.displayName=JN.displayName;const uU=P.forwardRef((({className:e,inset:t,...n},r)=>k.jsx(t3,{ref:r,className:se("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs text-base font-medium text-slate-900 outline-none transition-colors hover:bg-slate-100 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-xl",e),...n})));uU.displayName=t3.displayName;const cU=P.forwardRef((({className:e,children:t,checked:n,checkboxPosition:r="right",...o},i)=>{const a=k.jsx(S_,{size:"default",variant:"default",checked:n});return k.jsxs(n3,{ref:i,className:se("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs text-base font-medium text-slate-900"," outline-none transition-colors hover:bg-slate-100 focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,onSelect:e=>e.preventDefault(),...o,children:["left"===r&&a,k.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:t}),"right"===r&&a]})}));cU.displayName=n3.displayName;const fU=P.forwardRef((({className:e,children:t,radioPosition:n="right",...r},o)=>{const i=k.jsx("div",{className:"flex h-xxs items-center justify-center",children:k.jsx(oU,{children:k.jsx(Nx,{size:20})})});return k.jsxs(r3,{ref:o,className:se("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs text-base font-medium text-slate-900"," outline-none transition-colors hover:bg-slate-100 focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),onSelect:e=>e.preventDefault(),...r,children:["left"===n&&i,k.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:t}),"right"===n&&i]})}));fU.displayName=r3.displayName;const dU=P.forwardRef((({className:e,inset:t,...n},r)=>k.jsx(e3,{ref:r,className:se("text-sm font-semibold",t&&"pl-xl",e),...n})));dU.displayName=e3.displayName;const pU=P.forwardRef((({className:e,...t},n)=>k.jsx(K_,{ref:n,className:se("-mx-1 my-1 h-px bg-muted",e),...t})));pU.displayName=K_.displayName;const hU=({className:e,...t})=>k.jsx("span",{className:se("ml-auto text-xs tracking-widest opacity-60",e),...t});hU.displayName="DropdownMenuShortcut";const vU=_e(((e,t)=>z(it.label,fe({},e,{ref:t,onMouseDown:t=>{var n;null===(n=e.onMouseDown)||void 0===n||n.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault()}})))),a3=vU,mU=Ji("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),s3=P.forwardRef((({className:e,...t},n)=>k.jsx(a3,{ref:n,className:se(mU(),e),...t})));function X2(e,[t,n]){return Math.min(n,Math.max(t,e))}s3.displayName=a3.displayName;const l3=_e(((e,t)=>z(it.span,fe({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})))),gU=l3,yU=[" ","Enter","ArrowUp","ArrowDown"],bU=[" ","Enter"],_m="Select",[$m,Sm,wU]=N_(_m),[dc,yX]=Sr(_m,[wU,cc]),Y_=cc(),[xU,wl]=dc(_m),[_U,$U]=dc(_m),SU=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:a,defaultValue:l,onValueChange:u,dir:s,name:c,autoComplete:d,disabled:f,required:p}=e,h=Y_(t),[m,v]=tt(null),[g,y]=tt(null),[b,w]=tt(!1),x=Gd(s),[_=!1,k]=Vo({prop:r,defaultProp:o,onChange:i}),[P,S]=Vo({prop:a,defaultProp:l,onChange:u}),C=ke(null),E=!m||!!m.closest("form"),[N,O]=tt(new Set),T=Array.from(N).map((e=>e.props.value)).join(";");return z(bm,h,z(xU,{required:p,scope:t,trigger:m,onTriggerChange:v,valueNode:g,onValueNodeChange:y,valueNodeHasChildren:b,onValueNodeHasChildrenChange:w,contentId:lo(),value:P,onValueChange:S,open:_,onOpenChange:k,dir:x,triggerPointerDownPosRef:C,disabled:f},z($m.Provider,{scope:t},z(_U,{scope:e.__scopeSelect,onNativeOptionAdd:lt((e=>{O((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:lt((e=>{O((t=>{const n=new Set(t);return n.delete(e),n}))}),[])},n)),E?z(p3,{key:T,"aria-hidden":!0,required:p,tabIndex:-1,name:c,autoComplete:d,value:P,onChange:e=>S(e.target.value),disabled:f},void 0===P?z("option",{value:""}):null,Array.from(N)):null))},CU="SelectTrigger",EU=_e(((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=Y_(n),a=wl(CU,n),l=a.disabled||r,u=Rt(t,a.onTriggerChange),s=Sm(n),[c,d,f]=h3((e=>{const t=s().filter((e=>!e.disabled)),n=t.find((e=>e.value===a.value)),r=v3(t,e,n);void 0!==r&&a.onValueChange(r.value)})),p=()=>{l||(a.onOpenChange(!0),f())};return z(F_,fe({asChild:!0},i),z(it.button,fe({type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":d3(a.value)?"":void 0},o,{ref:u,onClick:ze(o.onClick,(e=>{e.currentTarget.focus()})),onPointerDown:ze(o.onPointerDown,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&(p(),a.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)},e.preventDefault())})),onKeyDown:ze(o.onKeyDown,(e=>{const t=""!==c.current;!(e.ctrlKey||e.altKey||e.metaKey)&&1===e.key.length&&d(e.key),(!t||" "!==e.key)&&yU.includes(e.key)&&(p(),e.preventDefault())}))})))})),PU="SelectValue",RU=_e(((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:a="",...l}=e,u=wl(PU,n),{onValueNodeHasChildrenChange:s}=u,c=void 0!==i,d=Rt(t,u.onValueNodeChange);return fr((()=>{s(c)}),[s,c]),z(it.span,fe({},l,{ref:d,style:{pointerEvents:"none"}}),d3(u.value)?z(vl,null,a):i)})),TU=_e(((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return z(it.span,fe({"aria-hidden":!0},o,{ref:t}),r||"▼")})),OU=e=>z(Fx,fe({asChild:!0},e)),Zu="SelectContent",AU=_e(((e,t)=>{const n=wl(Zu,e.__scopeSelect),[r,o]=tt();if(fr((()=>{o(new DocumentFragment)}),[]),!n.open){const t=r;return t?_i.createPortal(z(u3,{scope:e.__scopeSelect},z($m.Slot,{scope:e.__scopeSelect},z("div",null,e.children))),t):null}return z(NU,fe({},e,{ref:t}))})),Gi=10,[u3,xl]=dc(Zu),NU=_e(((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:a,side:l,sideOffset:u,align:s,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:h,hideWhenDetached:m,avoidCollisions:v,...g}=e,y=wl(Zu,n),[b,w]=tt(null),[x,_]=tt(null),k=Rt(t,(e=>w(e))),[P,S]=tt(null),[C,E]=tt(null),N=Sm(n),[O,T]=tt(!1),R=ke(!1);We((()=>{if(b)return Kv(b)}),[b]),Bx();const j=lt((e=>{const[t,...n]=N().map((e=>e.ref.current)),[r]=n.slice(-1),o=document.activeElement;for(const n of e)if(n===o||(null==n||n.scrollIntoView({block:"nearest"}),n===t&&x&&(x.scrollTop=0),n===r&&x&&(x.scrollTop=x.scrollHeight),null==n||n.focus(),document.activeElement!==o))return}),[N,x]),D=lt((()=>j([P,b])),[j,P,b]);We((()=>{O&&D()}),[O,D]);const{onOpenChange:A,triggerPointerDownPosRef:M}=y;We((()=>{if(b){let e={x:0,y:0};const t=t=>{var n,r,o,i;e={x:Math.abs(Math.round(t.pageX)-(null!==(n=null===(r=M.current)||void 0===r?void 0:r.x)&&void 0!==n?n:0)),y:Math.abs(Math.round(t.pageY)-(null!==(o=null===(i=M.current)||void 0===i?void 0:i.y)&&void 0!==o?o:0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():b.contains(n.target)||A(!1),document.removeEventListener("pointermove",t),M.current=null};return null!==M.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}}),[b,A,M]),We((()=>{const e=()=>A(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[A]);const[L,I]=h3((e=>{const t=N().filter((e=>!e.disabled)),n=t.find((e=>e.ref.current===document.activeElement)),r=v3(t,e,n);r&&setTimeout((()=>r.ref.current.focus()))})),F=lt(((e,t,n)=>{const r=!R.current&&!n;(void 0!==y.value&&y.value===t||r)&&(S(e),r&&(R.current=!0))}),[y.value]),W=lt((()=>null==b?void 0:b.focus()),[b]),B=lt(((e,t,n)=>{const r=!R.current&&!n;(void 0!==y.value&&y.value===t||r)&&E(e)}),[y.value]),U="popper"===r?Q2:DU,$=U===Q2?{side:l,sideOffset:u,align:s,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:h,hideWhenDetached:m,avoidCollisions:v}:{};return z(u3,{scope:n,content:b,viewport:x,onViewportChange:_,itemRefCallback:F,selectedItem:P,onItemLeave:W,itemTextRefCallback:B,focusSelectedItem:D,selectedItemText:C,position:r,isPositioned:O,searchRef:L},z(Gv,{as:ll,allowPinchZoom:!0},z(jx,{asChild:!0,trapped:y.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:ze(o,(e=>{var t;null===(t=y.trigger)||void 0===t||t.focus({preventScroll:!0}),e.preventDefault()}))},z(Hv,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>y.onOpenChange(!1)},z(U,fe({role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:e=>e.preventDefault()},g,$,{onPlaced:()=>T(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:ze(g.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),!t&&1===e.key.length&&I(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=N().filter((e=>!e.disabled)).map((e=>e.ref.current));if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout((()=>j(t))),e.preventDefault()}}))}))))))})),DU=_e(((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=wl(Zu,n),a=xl(Zu,n),[l,u]=tt(null),[s,c]=tt(null),d=Rt(t,(e=>c(e))),f=Sm(n),p=ke(!1),h=ke(!0),{viewport:m,selectedItem:v,selectedItemText:g,focusSelectedItem:y}=a,b=lt((()=>{if(i.trigger&&i.valueNode&&l&&s&&m&&v&&g){const e=i.trigger.getBoundingClientRect(),t=s.getBoundingClientRect(),n=i.valueNode.getBoundingClientRect(),o=g.getBoundingClientRect();if("rtl"!==i.dir){const r=o.left-t.left,i=n.left-r,a=e.left-i,u=e.width+a,s=Math.max(u,t.width),c=window.innerWidth-Gi,d=X2(i,[Gi,c-s]);l.style.minWidth=u+"px",l.style.left=d+"px"}else{const r=t.right-o.right,i=window.innerWidth-n.right-r,a=window.innerWidth-e.right-i,u=e.width+a,s=Math.max(u,t.width),c=window.innerWidth-Gi,d=X2(i,[Gi,c-s]);l.style.minWidth=u+"px",l.style.right=d+"px"}const a=f(),u=window.innerHeight-2*Gi,c=m.scrollHeight,d=window.getComputedStyle(s),h=parseInt(d.borderTopWidth,10),y=parseInt(d.paddingTop,10),b=parseInt(d.borderBottomWidth,10),w=h+y+c+parseInt(d.paddingBottom,10)+b,x=Math.min(5*v.offsetHeight,w),_=window.getComputedStyle(m),k=parseInt(_.paddingTop,10),P=parseInt(_.paddingBottom,10),S=e.top+e.height/2-Gi,C=u-S,E=v.offsetHeight/2,N=h+y+(v.offsetTop+E),O=w-N;if(N<=S){const e=v===a[a.length-1].ref.current;l.style.bottom="0px";const t=s.clientHeight-m.offsetTop-m.offsetHeight,n=N+Math.max(C,E+(e?P:0)+t+b);l.style.height=n+"px"}else{const e=v===a[0].ref.current;l.style.top="0px";const t=Math.max(S,h+m.offsetTop+(e?k:0)+E)+O;l.style.height=t+"px",m.scrollTop=N-S+m.offsetTop}l.style.margin=`${Gi}px 0`,l.style.minHeight=x+"px",l.style.maxHeight=u+"px",null==r||r(),requestAnimationFrame((()=>p.current=!0))}}),[f,i.trigger,i.valueNode,l,s,m,v,g,i.dir,r]);fr((()=>b()),[b]);const[w,x]=tt();fr((()=>{s&&x(window.getComputedStyle(s).zIndex)}),[s]);const _=lt((e=>{e&&!0===h.current&&(b(),null==y||y(),h.current=!1)}),[b,y]);return z(IU,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:p,onScrollButtonChange:_},z("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w}},z(it.div,fe({},o,{ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}}))))})),Q2=_e(((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Gi,...i}=e,a=Y_(n);return z(B_,fe({},a,i,{ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))})),[IU,X_]=dc(Zu,{}),Z2="SelectViewport",kU=_e(((e,t)=>{const{__scopeSelect:n,...r}=e,o=xl(Z2,n),i=X_(Z2,n),a=Rt(t,o.onViewportChange),l=ke(0);return z(vl,null,z("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),z($m.Slot,{scope:n},z(it.div,fe({"data-radix-select-viewport":"",role:"presentation"},r,{ref:a,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:ze(r.onScroll,(e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=i;if(null!=r&&r.current&&n){const e=Math.abs(l.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*Gi,o=parseFloat(n.style.minHeight),i=parseFloat(n.style.height),a=Math.max(o,i);if(a<r){const o=a+e,i=Math.min(r,o),l=o-i;n.style.height=i+"px","0px"===n.style.bottom&&(t.scrollTop=l>0?l:0,n.style.justifyContent="flex-end")}}}l.current=t.scrollTop}))}))))})),MU="SelectGroup",[LU,jU]=dc(MU),FU=_e(((e,t)=>{const{__scopeSelect:n,...r}=e,o=lo();return z(LU,{scope:n,id:o},z(it.div,fe({role:"group","aria-labelledby":o},r,{ref:t})))})),BU="SelectLabel",qU=_e(((e,t)=>{const{__scopeSelect:n,...r}=e,o=jU(BU,n);return z(it.div,fe({id:o.id},r,{ref:t}))})),_x="SelectItem",[zU,c3]=dc(_x),WU=_e(((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...a}=e,l=wl(_x,n),u=xl(_x,n),s=l.value===r,[c,d]=tt(i??""),[f,p]=tt(!1),h=Rt(t,(e=>{var t;return null===(t=u.itemRefCallback)||void 0===t?void 0:t.call(u,e,r,o)})),m=lo(),v=()=>{o||(l.onValueChange(r),l.onOpenChange(!1))};if(""===r)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return z(zU,{scope:n,value:r,disabled:o,textId:m,isSelected:s,onItemTextChange:lt((e=>{d((t=>{var n;return t||(null!==(n=null==e?void 0:e.textContent)&&void 0!==n?n:"").trim()}))}),[])},z($m.ItemSlot,{scope:n,value:r,disabled:o,textValue:c},z(it.div,fe({role:"option","aria-labelledby":m,"data-highlighted":f?"":void 0,"aria-selected":s&&f,"data-state":s?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1},a,{ref:h,onFocus:ze(a.onFocus,(()=>p(!0))),onBlur:ze(a.onBlur,(()=>p(!1))),onPointerUp:ze(a.onPointerUp,v),onPointerMove:ze(a.onPointerMove,(e=>{var t;o?null===(t=u.onItemLeave)||void 0===t||t.call(u):e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:ze(a.onPointerLeave,(e=>{var t;e.currentTarget===document.activeElement&&(null===(t=u.onItemLeave)||void 0===t||t.call(u))})),onKeyDown:ze(a.onKeyDown,(e=>{var t;""!==(null===(t=u.searchRef)||void 0===t?void 0:t.current)&&" "===e.key||(bU.includes(e.key)&&v()," "===e.key&&e.preventDefault())}))}))))})),dv="SelectItemText",UU=_e(((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,a=wl(dv,n),l=xl(dv,n),u=c3(dv,n),s=$U(dv,n),[c,d]=tt(null),f=Rt(t,(e=>d(e)),u.onItemTextChange,(e=>{var t;return null===(t=l.itemTextRefCallback)||void 0===t?void 0:t.call(l,e,u.value,u.disabled)})),p=null==c?void 0:c.textContent,h=Ur((()=>z("option",{key:u.value,value:u.value,disabled:u.disabled},p)),[u.disabled,u.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:v}=s;return fr((()=>(m(h),()=>v(h))),[m,v,h]),z(vl,null,z(it.span,fe({id:u.textId},i,{ref:f})),u.isSelected&&a.valueNode&&!a.valueNodeHasChildren?_i.createPortal(i.children,a.valueNode):null)})),HU="SelectItemIndicator",VU=_e(((e,t)=>{const{__scopeSelect:n,...r}=e;return c3(HU,n).isSelected?z(it.span,fe({"aria-hidden":!0},r,{ref:t})):null})),J2="SelectScrollUpButton",GU=_e(((e,t)=>{const n=xl(J2,e.__scopeSelect),r=X_(J2,e.__scopeSelect),[o,i]=tt(!1),a=Rt(t,r.onScrollButtonChange);return fr((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollTop>0;i(e)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),o?z(f3,fe({},e,{ref:a,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}})):null})),eR="SelectScrollDownButton",KU=_e(((e,t)=>{const n=xl(eR,e.__scopeSelect),r=X_(eR,e.__scopeSelect),[o,i]=tt(!1),a=Rt(t,r.onScrollButtonChange);return fr((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;i(n)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),o?z(f3,fe({},e,{ref:a,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}})):null})),f3=_e(((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=xl("SelectScrollButton",n),a=ke(null),l=Sm(n),u=lt((()=>{null!==a.current&&(window.clearInterval(a.current),a.current=null)}),[]);return We((()=>()=>u()),[u]),fr((()=>{var e;const t=l().find((e=>e.ref.current===document.activeElement));null==t||null===(e=t.ref.current)||void 0===e||e.scrollIntoView({block:"nearest"})}),[l]),z(it.div,fe({"aria-hidden":!0},o,{ref:t,style:{flexShrink:0,...o.style},onPointerDown:ze(o.onPointerDown,(()=>{null===a.current&&(a.current=window.setInterval(r,50))})),onPointerMove:ze(o.onPointerMove,(()=>{var e;null===(e=i.onItemLeave)||void 0===e||e.call(i),null===a.current&&(a.current=window.setInterval(r,50))})),onPointerLeave:ze(o.onPointerLeave,(()=>{u()}))}))})),YU=_e(((e,t)=>{const{__scopeSelect:n,...r}=e;return z(it.div,fe({"aria-hidden":!0},r,{ref:t}))}));function d3(e){return""===e||void 0===e}const p3=_e(((e,t)=>{const{value:n,...r}=e,o=ke(null),i=Rt(t,o),a=fm(n);return We((()=>{const e=o.current,t=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(a!==n&&r){const t=new Event("change",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}}),[a,n]),z(l3,{asChild:!0},z("select",fe({},r,{ref:i,defaultValue:n})))}));function h3(e){const t=Hr(e),n=ke(""),r=ke(0),o=lt((e=>{const o=n.current+e;t(o),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout((()=>e("")),1e3))}(o)}),[t]),i=lt((()=>{n.current="",window.clearTimeout(r.current)}),[]);return We((()=>()=>window.clearTimeout(r.current)),[]),[n,o,i]}function v3(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,o=n?e.indexOf(n):-1;let i=XU(e,Math.max(o,0));1===r.length&&(i=i.filter((e=>e!==n)));const a=i.find((e=>e.textValue.toLowerCase().startsWith(r.toLowerCase())));return a!==n?a:void 0}function XU(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}p3.displayName="BubbleSelect";const m3=SU,g3=EU,y3=RU,QU=TU,ZU=OU,b3=AU,JU=kU,w3=FU,x3=qU,_3=WU,eH=UU,tH=VU,$3=GU,S3=KU,C3=YU,nH=m3,E3=P.forwardRef((({...e},t)=>k.jsx(nH,{ref:t,...e})));E3.displayName=m3.displayName;const P3=P.forwardRef(((e,t)=>k.jsx(w3,{ref:t,...e})));P3.displayName=w3.displayName;const R3=P.forwardRef(((e,t)=>k.jsx(y3,{ref:t,...e})));R3.displayName=y3.displayName;const Q_=P.forwardRef((({className:e,children:t,caption:n,error:r,icon:o,...i},a)=>k.jsxs("div",{className:"w-full",children:[k.jsxs(g3,{ref:a,className:se("flex h-l w-full items-center justify-between rounded-m border bg-background p-xxs text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-slate-700 focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50",r?"border-red-500":"border-input",e),...i,children:[k.jsxs("div",{className:"flex flex-1 items-center gap-xxs",children:[o&&k.jsx("span",{className:se("text-muted-foreground",{"text-red-dark":r}),children:o}),t]}),k.jsx(QU,{asChild:!0,children:k.jsx(uT,{size:20})})]}),n||r?r?k.jsxs("div",{className:"mt-xxs flex items-center gap-xxxs text-sm text-red-600",children:[k.jsx(pT,{size:16}),r]}):k.jsxs("div",{className:"mt-xxs flex items-center gap-xxxs text-sm text-muted-foreground",children:[k.jsx($M,{size:16}),n]}):null]})));Q_.displayName="SelectTriggerWrapper";const T3=P.forwardRef((({className:e,children:t,caption:n,error:r,icon:o,...i},a)=>k.jsx(Q_,{ref:a,className:se("[&>span]:line-clamp-1 [&>span]:text-left",e),caption:n,error:r,icon:o,...i,children:t})));T3.displayName=g3.displayName;const O3=P.forwardRef((({className:e,children:t,position:n="popper",...r},o)=>{const i=P.useMemo((()=>{const e=t=>{var n,r;if(!t)return!1;if(Array.isArray(t))return t.some(e);if(P.isValidElement(t)){const o=null==(n=t.type)?void 0:n.displayName;return"SelectActions"===o||"SelectFooter"===o||e(null==(r=t.props)?void 0:r.children)}return!1};return e(t)}),[t]);return k.jsx(ZU,{children:k.jsx(b3,{ref:o,className:se("z-[101] flex max-h-[var(--radix-select-content-available-height)] min-w-[8rem] flex-col rounded-lg border border-slate-200 bg-white text-popover-foreground","shadow-[0px_0px_12px_0px_rgba(0,0,0,0.08)]","data-[state=open]:animate-in data-[state=closed]:animate-out ","data-[state=open]:fade-in data-[state=open]:slide-in-from-top-2 ","data-[state=closed]:fade-out data-[state=closed]:slide-out-to-top-2 ","data-[state=closed]:duration-150 data-[state=open]:duration-150 ","data-[state=closed]:[animation-timing-function:ease-in] data-[state=open]:[animation-timing-function:ease-out]","popper"===n&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:k.jsx(JU,{className:se("flex flex-col gap-xxxs overflow-y-auto px-xxs",{"py-xxs":!i},"popper"===n&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})})}));O3.displayName=b3.displayName;const A3=P.forwardRef((({className:e,...t},n)=>k.jsx(x3,{ref:n,className:se("text-sm font-medium text-slate-900",e),...t})));A3.displayName=x3.displayName;const N3=P.forwardRef((({className:e,showCheck:t=!0,checkPosition:n="right",children:r,...o},i)=>{const a=k.jsx(tH,{children:k.jsx(Nx,{size:20})});return k.jsxs(_3,{ref:i,className:se("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs","text-base font-medium text-slate-900 outline-none transition-colors hover:bg-slate-100","focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[t&&"left"===n&&a,k.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:k.jsx(eH,{children:r})}),t&&"right"===n&&a]})}));N3.displayName=_3.displayName;const D3=P.forwardRef((({className:e,...t},n)=>k.jsx(C3,{ref:n,className:se("-mx-1 my-1 h-px bg-slate-200",e),...t})));D3.displayName=C3.displayName;const rH=(e,t)=>{const n=P.useRef(null),[r,o]=P.useState(e.length);return P.useLayoutEffect((()=>{if(!n.current||0===e.length)return void o(e.length);const r=n.current.offsetWidth-60,i=document.createElement("div");Object.assign(i.style,{position:"absolute",visibility:"hidden",whiteSpace:"nowrap",display:"flex",gap:"4px",top:"-9999px",left:"-9999px"}),document.body.appendChild(i);let a=0,l=0;for(const n of e){const e=document.createElement("div");e.className="gap-xxxs p-xxs flex cursor-pointer items-center rounded-sm bg-slate-100 text-sm font-medium text-slate-900";const o=document.createElement("span");if(o.textContent="string"==typeof n?n:n.value,e.appendChild(o),"string"!=typeof n&&n.avatar){const t=document.createElement("div");t.className="w-6 h-6 rounded-full bg-slate-300 flex-shrink-0",e.insertBefore(t,o)}if(t){const t=document.createElement("button");t.innerHTML="×",t.className="ml-1 rounded-full outline-none",e.appendChild(t)}i.appendChild(e);const u=e.offsetWidth+4;if(!(a+u<=r))break;a+=u,l++}document.body.removeChild(i),o(Math.max(1,l))}),[e,t]),{containerRef:n,visibleCount:r}},oH=P.forwardRef((({className:e,selectedValues:t=[],placeholder:n,onRemoveValue:r,icon:o,caption:i,error:a,...l},u)=>{const{containerRef:s,visibleCount:c}=rH(t,r),d=t.length-c;return k.jsx(Q_,{ref:u,className:e,caption:i,error:a,icon:o,...l,children:k.jsx("div",{ref:s,className:"flex w-full flex-1 flex-nowrap overflow-hidden",children:0===t.length?k.jsx("span",{children:n||"Select options..."}):k.jsxs(Mj,{children:[t.slice(0,c).map((e=>{const t="string"==typeof e?e:e.value;return k.jsx(_2,{avatarSrc:"string"==typeof e?void 0:e.avatar,text:t,onRemove:()=>null==r?void 0:r(t)},t)})),d>0&&k.jsx(_2,{text:`+${d}`})]})})})}));oH.displayName="SelectMultiTrigger";const iH=P.forwardRef((({value:e,isSelected:t=!1,isLoading:n=!1,checkboxPosition:r="right",onSelect:o,className:i,children:a,...l},u)=>{const s=n?k.jsx(dT,{size:24,className:"flex-shrink-0 animate-spin text-blue_100"}):k.jsx(S_,{size:"default",variant:"default",checked:t}),c=()=>{null==o||o(e)};return k.jsxs("div",{ref:u,className:se("relative flex cursor-pointer select-none items-center gap-xxs rounded-m","p-xxs text-base font-medium text-slate-900 outline-none transition-colors hover:bg-slate-100","focus:bg-accent focus:text-accent-foreground",{"pointer-events-none":n},i),onClick:c,role:"button",tabIndex:0,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),c())},...l,children:["left"===r&&s,k.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:a}),"right"===r&&s]})}));iH.displayName="SelectCheckboxItem";const aH=P.forwardRef((({className:e,...t},n)=>k.jsx($3,{ref:n,className:se("flex cursor-default items-center justify-center py-xxs",e),...t,children:k.jsx(bM,{size:16})})));aH.displayName=$3.displayName;const sH=P.forwardRef((({className:e,...t},n)=>k.jsx(S3,{ref:n,className:se("flex cursor-default items-center justify-center p-xxs",e),...t,children:k.jsx(uT,{size:16})})));sH.displayName=S3.displayName;const lH=P.forwardRef((({className:e,children:t,...n},r)=>k.jsx("div",{ref:r,className:se("sticky top-0 z-20 bg-white p-xxs",e),...n,children:t})));lH.displayName="SelectActions";const uH=P.forwardRef((({className:e,children:t,...n},r)=>k.jsx("div",{ref:r,className:se("sticky bottom-0 z-20 bg-white p-xxs",e),...n,children:t})));uH.displayName="SelectFooter";const bX=Jk,I3=P.createContext({}),wX=({...e})=>k.jsx(I3.Provider,{value:{name:e.name},children:k.jsx(eM,{...e})}),as=()=>{const e=P.useContext(I3),t=P.useContext(k3),n=tM();e||console.error("useFormContext must be used within a FormProvider");const{getFieldState:r,formState:o}=n,i=r(e.name,o);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:a}=t;return{id:a,name:e.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...i}},k3=P.createContext({}),cH=P.forwardRef((({className:e,...t},n)=>{const r=P.useId();return k.jsx(k3.Provider,{value:{id:r},children:k.jsx("div",{ref:n,className:se("mt-[8px]",e),...t})})}));cH.displayName="FormItem";const fH=P.forwardRef((({className:e,isRequired:t,...n},r)=>{var o;const{formItemId:i}=as();return k.jsx(s3,{ref:r,className:se("mb-2 text-sm font-medium",e),htmlFor:i,...n,children:t?`*${null==(o=n.children)?void 0:o.toString()}`:n.children})}));fH.displayName="FormLabel";const dH=P.forwardRef((({...e},t)=>{const{error:n,formItemId:r,formDescriptionId:o,formMessageId:i}=as();return k.jsx(os,{ref:t,id:r,"aria-describedby":n?`${o} ${i}`:`${o}`,"aria-invalid":!!n,...e})}));dH.displayName="FormControl";const pH=P.forwardRef((({className:e,...t},n)=>{const{formDescriptionId:r}=as();return k.jsx("p",{ref:n,id:r,className:se("text-sm text-muted-foreground",e),...t})}));pH.displayName="FormDescription";const hH=P.forwardRef((({className:e,children:t,...n},r)=>{const{error:o,formMessageId:i}=as(),a=o?String(null==o?void 0:o.message):t;return a?k.jsxs("p",{ref:r,id:i,className:se("flex items-center gap-1 pt-xxs text-sm text-red-dark",e),...n,children:[k.jsx(pT,{size:16,className:"text-red-dark"})," ",a]}):null}));hH.displayName="FormMessage";const vH=P.forwardRef((({...e},t)=>{const{name:n}=as();return k.jsx(E3,{ref:t,name:n,...e})}));vH.displayName="FormSelect";const mH=P.forwardRef((({className:e,children:t,...n},r)=>{const{formItemId:o}=as();return k.jsx(T3,{ref:r,id:o,className:e,...n,children:t})}));mH.displayName="FormSelectTrigger";const gH=P.forwardRef(((e,t)=>k.jsx(O3,{ref:t,...e})));gH.displayName="FormSelectContent";const yH=P.forwardRef(((e,t)=>k.jsx(N3,{ref:t,...e})));yH.displayName="FormSelectItem";const bH=P.forwardRef(((e,t)=>k.jsx(P3,{ref:t,...e})));bH.displayName="FormSelectGroup";const wH=P.forwardRef(((e,t)=>k.jsx(A3,{ref:t,...e})));wH.displayName="FormSelectLabel";const xH=P.forwardRef(((e,t)=>k.jsx(D3,{ref:t,...e})));xH.displayName="FormSelectSeparator";const _H=P.forwardRef(((e,t)=>k.jsx(R3,{ref:t,...e})));function Ro(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function M3(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>Qa(e)));return function(n){const r=(null==n?void 0:n[e])||t;return Ur((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=Qa(r),i=n.length;function a(t){const{scope:n,children:r,...a}=t,l=(null==n?void 0:n[e][i])||o,u=Ur((()=>a),Object.values(a));return z(l.Provider,{value:u},r)}return n=[...n,r],a.displayName=t+"Provider",[a,function(n,a){const l=(null==a?void 0:a[e][i])||o,u=ec(l);if(u)return u;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},$H(r,...t)]}function $H(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return Ur((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function pc(e){const t=ke(e);return We((()=>{t.current=e})),Ur((()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)}),[])}function SH({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=CH({defaultProp:t,onChange:n}),i=void 0!==e,a=i?e:r,l=pc(n);return[a,lt((t=>{if(i){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[i,e,o,l])]}function CH({defaultProp:e,onChange:t}){const n=tt(e),[r]=n,o=ke(r),i=pc(t);return We((()=>{o.current!==r&&(i(r),o.current=r)}),[r,o,i]),n}function EH(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function PH(...e){return t=>e.forEach((e=>EH(e,t)))}function RH(...e){return lt(PH(...e),e)}function _l(e){return e.split("-")[0]}function Xd(e){return e.split("-")[1]}function hc(e){return["top","bottom"].includes(_l(e))?"x":"y"}function Z_(e){return"y"===e?"height":"width"}function tR(e,t,n){let{reference:r,floating:o}=e;const i=r.x+r.width/2-o.width/2,a=r.y+r.height/2-o.height/2,l=hc(t),u=Z_(l),s=r[u]/2-o[u]/2,c="x"===l;let d;switch(_l(t)){case"top":d={x:i,y:r.y-o.height};break;case"bottom":d={x:i,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:a};break;case"left":d={x:r.x-o.width,y:a};break;default:d={x:r.x,y:r.y}}switch(Xd(t)){case"start":d[l]-=s*(n&&c?-1:1);break;case"end":d[l]+=s*(n&&c?-1:1)}return d}_H.displayName="FormSelectValue";const TH=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,l=await(null==a.isRTL?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:s,y:c}=tR(u,r,l),d=r,f={},p=0;for(let n=0;n<i.length;n++){const{name:h,fn:m}=i[n],{x:v,y:g,data:y,reset:b}=await m({x:s,y:c,initialPlacement:r,placement:d,strategy:o,middlewareData:f,rects:u,platform:a,elements:{reference:e,floating:t}});s=v??s,c=g??c,f={...f,[h]:{...f[h],...y}},b&&p<=50&&(p++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(u=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:s,y:c}=tR(u,d,l))),n=-1)}return{x:s,y:c,placement:d,strategy:o,middlewareData:f}};function L3(e){return"number"!=typeof e?(t=e,{top:0,right:0,bottom:0,left:0,...t}):{top:e,right:e,bottom:e,left:e};var t}function kv(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function kd(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:l,strategy:u}=e,{boundary:s="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=t,h=L3(p),m=l[f?"floating"===d?"reference":"floating":d],v=kv(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:s,rootBoundary:c,strategy:u})),g=kv(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===d?{...a.floating,x:r,y:o}:a.reference,offsetParent:await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),strategy:u}):a[d]);return{top:v.top-g.top+h.top,bottom:g.bottom-v.bottom+h.bottom,left:v.left-g.left+h.left,right:g.right-v.right+h.right}}const OH=Math.min,rl=Math.max;function $x(e,t,n){return rl(e,OH(t,n))}const nR=e=>({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:o,y:i,placement:a,rects:l,platform:u}=t;if(null==n)return{};const s=L3(r),c={x:o,y:i},d=hc(a),f=Xd(a),p=Z_(d),h=await u.getDimensions(n),m="y"===d?"top":"left",v="y"===d?"bottom":"right",g=l.reference[p]+l.reference[d]-c[d]-l.floating[p],y=c[d]-l.reference[d],b=await(null==u.getOffsetParent?void 0:u.getOffsetParent(n));let w=b?"y"===d?b.clientHeight||0:b.clientWidth||0:0;0===w&&(w=l.floating[p]);const x=g/2-y/2,_=s[m],k=w-h[p]-s[v],P=w/2-h[p]/2+x,S=$x(_,P,k),C=("start"===f?s[m]:s[v])>0&&P!==S&&l.reference[p]<=l.floating[p];return{[d]:c[d]-(C?P<_?_-P:k-P:0),data:{[d]:S,centerOffset:P-S}}}}),AH={left:"right",right:"left",bottom:"top",top:"bottom"};function Mv(e){return e.replace(/left|right|bottom|top/g,(e=>AH[e]))}function NH(e,t,n){void 0===n&&(n=!1);const r=Xd(e),o=hc(e),i=Z_(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Mv(a)),{main:a,cross:Mv(a)}}const DH={start:"end",end:"start"};function rR(e){return e.replace(/start|end/g,(e=>DH[e]))}const j3=["top","right","bottom","left"];j3.reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]);const IH=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:i,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:s=!0,crossAxis:c=!0,fallbackPlacements:d,fallbackStrategy:f="bestFit",flipAlignment:p=!0,...h}=e,m=_l(r),v=[a,...d||(m!==a&&p?function(e){const t=Mv(e);return[rR(e),t,rR(t)]}(a):[Mv(a)])],g=await kd(t,h),y=[];let b=(null==(n=o.flip)?void 0:n.overflows)||[];if(s&&y.push(g[m]),c){const{main:e,cross:t}=NH(r,i,await(null==l.isRTL?void 0:l.isRTL(u.floating)));y.push(g[e],g[t])}if(b=[...b,{placement:r,overflows:y}],!y.every((e=>e<=0))){var w,x;const e=(null!=(w=null==(x=o.flip)?void 0:x.index)?w:0)+1,t=v[e];if(t)return{data:{index:e,overflows:b},reset:{placement:t}};let n="bottom";switch(f){case"bestFit":{var _;const e=null==(_=b.map((e=>[e,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:_[0].placement;e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}};function oR(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function iR(e){return j3.some((t=>e[t]>=0))}const kH=function(e){let{strategy:t="referenceHidden",...n}=void 0===e?{}:e;return{name:"hide",async fn(e){const{rects:r}=e;switch(t){case"referenceHidden":{const t=oR(await kd(e,{...n,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:iR(t)}}}case"escaped":{const t=oR(await kd(e,{...n,altBoundary:!0}),r.floating);return{data:{escapedOffsets:t,escaped:iR(t)}}}default:return{}}}}},MH=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=_l(n),l=Xd(n),u="x"===hc(n),s=["left","top"].includes(a)?-1:1,c=i&&u?-1:1,d="function"==typeof t?t(e):t;let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return l&&"number"==typeof h&&(p="end"===l?-1*h:h),u?{x:p*c,y:f*s}:{x:f*s,y:p*c}}(t,e);return{x:n+o.x,y:r+o.y,data:o}}}};function F3(e){return"x"===e?"y":"x"}const LH=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...u}=e,s={x:n,y:r},c=await kd(t,u),d=hc(_l(o)),f=F3(d);let p=s[d],h=s[f];if(i){const e="y"===d?"bottom":"right";p=$x(p+c["y"===d?"top":"left"],p,p-c[e])}if(a){const e="y"===f?"bottom":"right";h=$x(h+c["y"===f?"top":"left"],h,h-c[e])}const m=l.fn({...t,[d]:p,[f]:h});return{...m,data:{x:m.x-n,y:m.y-r}}}}},jH=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:l=0,mainAxis:u=!0,crossAxis:s=!0}=e,c={x:n,y:r},d=hc(o),f=F3(d);let p=c[d],h=c[f];const m="function"==typeof l?l({...i,placement:o}):l,v="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(u){const e="y"===d?"height":"width",t=i.reference[d]-i.floating[e]+v.mainAxis,n=i.reference[d]+i.reference[e]-v.mainAxis;p<t?p=t:p>n&&(p=n)}if(s){var g,y,b,w;const e="y"===d?"width":"height",t=["top","left"].includes(_l(o)),n=i.reference[f]-i.floating[e]+(t&&null!=(g=null==(y=a.offset)?void 0:y[f])?g:0)+(t?0:v.crossAxis),r=i.reference[f]+i.reference[e]+(t?0:null!=(b=null==(w=a.offset)?void 0:w[f])?b:0)-(t?v.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[d]:p,[f]:h}}}},FH=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a,...l}=e,u=await kd(t,l),s=_l(n),c=Xd(n);let d,f;"top"===s||"bottom"===s?(d=s,f=c===(await(null==o.isRTL?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(f=s,d="end"===c?"top":"bottom");const p=rl(u.left,0),h=rl(u.right,0),m=rl(u.top,0),v=rl(u.bottom,0),g={availableHeight:r.floating.height-(["left","right"].includes(n)?2*(0!==m||0!==v?m+v:rl(u.top,u.bottom)):u[d]),availableWidth:r.floating.width-(["top","bottom"].includes(n)?2*(0!==p||0!==h?p+h:rl(u.left,u.right)):u[f])},y=await o.getDimensions(i.floating);null==a||a({...t,...g});const b=await o.getDimensions(i.floating);return y.width!==b.width||y.height!==b.height?{reset:{rects:!0}}:{}}}};function B3(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function oa(e){if(null==e)return window;if(!B3(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function Qd(e){return oa(e).getComputedStyle(e)}function Ki(e){return B3(e)?"":e?(e.nodeName||"").toLowerCase():""}function q3(){const e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function xi(e){return e instanceof oa(e).HTMLElement}function rs(e){return e instanceof oa(e).Element}function J_(e){return!(typeof ShadowRoot>"u")&&(e instanceof oa(e).ShadowRoot||e instanceof ShadowRoot)}function Cm(e){const{overflow:t,overflowX:n,overflowY:r}=Qd(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function BH(e){return["table","td","th"].includes(Ki(e))}function aR(e){const t=/firefox/i.test(q3()),n=Qd(e);return"none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||["transform","perspective"].includes(n.willChange)||t&&"filter"===n.willChange||t&&!!n.filter&&"none"!==n.filter}function z3(){return!/^((?!chrome|android).)*safari/i.test(q3())}const sR=Math.min,xd=Math.max,Lv=Math.round;function Yi(e,t,n){var r,o,i,a;void 0===t&&(t=!1),void 0===n&&(n=!1);const l=e.getBoundingClientRect();let u=1,s=1;t&&xi(e)&&(u=e.offsetWidth>0&&Lv(l.width)/e.offsetWidth||1,s=e.offsetHeight>0&&Lv(l.height)/e.offsetHeight||1);const c=rs(e)?oa(e):window,d=!z3()&&n,f=(l.left+(d&&null!=(r=null==(o=c.visualViewport)?void 0:o.offsetLeft)?r:0))/u,p=(l.top+(d&&null!=(i=null==(a=c.visualViewport)?void 0:a.offsetTop)?i:0))/s,h=l.width/u,m=l.height/s;return{width:h,height:m,top:p,right:f+h,bottom:p+m,left:f,x:f,y:p}}function Xa(e){return(t=e,(t instanceof oa(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function Em(e){return rs(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function W3(e){return Yi(Xa(e)).left+Em(e).scrollLeft}function qH(e,t,n){const r=xi(t),o=Xa(t),i=Yi(e,r&&function(e){const t=Yi(e);return Lv(t.width)!==e.offsetWidth||Lv(t.height)!==e.offsetHeight}(t),"fixed"===n);let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==Ki(t)||Cm(o))&&(a=Em(t)),xi(t)){const e=Yi(t,!0);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=W3(o));return{x:i.left+a.scrollLeft-l.x,y:i.top+a.scrollTop-l.y,width:i.width,height:i.height}}function U3(e){return"html"===Ki(e)?e:e.assignedSlot||e.parentNode||(J_(e)?e.host:null)||Xa(e)}function lR(e){return xi(e)&&"fixed"!==getComputedStyle(e).position?e.offsetParent:null}function Sx(e){const t=oa(e);let n=lR(e);for(;n&&BH(n)&&"static"===getComputedStyle(n).position;)n=lR(n);return n&&("html"===Ki(n)||"body"===Ki(n)&&"static"===getComputedStyle(n).position&&!aR(n))?t:n||function(e){let t=U3(e);for(J_(t)&&(t=t.host);xi(t)&&!["html","body"].includes(Ki(t));){if(aR(t))return t;t=t.parentNode}return null}(e)||t}function uR(e){if(xi(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Yi(e);return{width:t.width,height:t.height}}function H3(e){const t=U3(e);return["html","body","#document"].includes(Ki(t))?e.ownerDocument.body:xi(t)&&Cm(t)?t:H3(t)}function jv(e,t){var n;void 0===t&&(t=[]);const r=H3(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=oa(r),a=o?[i].concat(i.visualViewport||[],Cm(r)?r:[]):r,l=t.concat(a);return o?l:l.concat(jv(a))}function cR(e,t,n){return"viewport"===t?kv(function(e,t){const n=oa(e),r=Xa(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,l=0,u=0;if(o){i=o.width,a=o.height;const e=z3();(e||!e&&"fixed"===t)&&(l=o.offsetLeft,u=o.offsetTop)}return{width:i,height:a,x:l,y:u}}(e,n)):rs(t)?function(e,t){const n=Yi(e,!1,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft;return{top:r,left:o,x:o,y:r,right:o+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}(t,n):kv(function(e){var t;const n=Xa(e),r=Em(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=xd(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=xd(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0);let l=-r.scrollLeft+W3(e);const u=-r.scrollTop;return"rtl"===Qd(o||n).direction&&(l+=xd(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:l,y:u}}(Xa(e)))}function zH(e){const t=jv(e),n=["absolute","fixed"].includes(Qd(e).position)&&xi(e)?Sx(e):e;return rs(n)?t.filter((e=>rs(e)&&function(e,t){const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&J_(n)){let n=t;do{if(n&&e===n)return!0;n=n.parentNode||n.host}while(n)}return!1}(e,n)&&"body"!==Ki(e))):[]}const WH={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?zH(t):[].concat(n),r],a=i[0],l=i.reduce(((e,n)=>{const r=cR(t,n,o);return e.top=xd(r.top,e.top),e.right=sR(r.right,e.right),e.bottom=sR(r.bottom,e.bottom),e.left=xd(r.left,e.left),e}),cR(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=xi(n),i=Xa(n);if(n===i)return t;let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==Ki(n)||Cm(i))&&(a=Em(n)),xi(n))){const e=Yi(n,!0);l.x=e.x+n.clientLeft,l.y=e.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+l.x,y:t.y-a.scrollTop+l.y}},isElement:rs,getDimensions:uR,getOffsetParent:Sx,getDocumentElement:Xa,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:qH(t,Sx(n),r),floating:{...uR(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===Qd(e).direction};function UH(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:l=!1}=r,u=o&&!l,s=i&&!l,c=u||s?[...rs(e)?jv(e):[],...jv(t)]:[];c.forEach((e=>{u&&e.addEventListener("scroll",n,{passive:!0}),s&&e.addEventListener("resize",n)}));let d,f=null;if(a){let r=!0;f=new ResizeObserver((()=>{r||n(),r=!1})),rs(e)&&!l&&f.observe(e),f.observe(t)}let p=l?Yi(e):null;return l&&function t(){const r=Yi(e);!p||r.x===p.x&&r.y===p.y&&r.width===p.width&&r.height===p.height||n(),p=r,d=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{u&&e.removeEventListener("scroll",n),s&&e.removeEventListener("resize",n)})),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(d)}}const HH=(e,t,n)=>TH(e,t,{platform:WH,...n});var Cx=typeof document<"u"?tc:We;function Ex(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;0!=r--;)if(!Ex(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||Ex(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function VH(e){const t=P.useRef(e);return Cx((()=>{t.current=e})),t}function GH(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:o}=void 0===e?{}:e;const i=P.useRef(null),a=P.useRef(null),l=VH(o),u=P.useRef(null),[s,c]=P.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[d,f]=P.useState(t);Ex(null==d?void 0:d.map((e=>{let{options:t}=e;return t})),null==t?void 0:t.map((e=>{let{options:t}=e;return t})))||f(t);const p=P.useCallback((()=>{!i.current||!a.current||HH(i.current,a.current,{middleware:d,placement:n,strategy:r}).then((e=>{h.current&&_i.flushSync((()=>{c(e)}))}))}),[d,n,r]);Cx((()=>{h.current&&p()}),[p]);const h=P.useRef(!1);Cx((()=>(h.current=!0,()=>{h.current=!1})),[]);const m=P.useCallback((()=>{if("function"==typeof u.current&&(u.current(),u.current=null),i.current&&a.current)if(l.current){const e=l.current(i.current,a.current,p);u.current=e}else p()}),[p,l]),v=P.useCallback((e=>{i.current=e,m()}),[m]),g=P.useCallback((e=>{a.current=e,m()}),[m]),y=P.useMemo((()=>({reference:i,floating:a})),[]);return P.useMemo((()=>({...s,update:p,refs:y,reference:v,floating:g})),[s,p,y,v,g])}const KH=e=>{const{element:t,padding:n}=e;return{name:"arrow",options:e,fn:e=>function(e){return Object.prototype.hasOwnProperty.call(e,"current")}(t)?null!=t.current?nR({element:t.current,padding:n}).fn(e):{}:t?nR({element:t,padding:n}).fn(e):{}}};function YH(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function XH(...e){return t=>e.forEach((e=>YH(e,t)))}const V3=_e(((e,t)=>{const{children:n,...r}=e,o=so.toArray(n),i=o.find(ZH);if(i){const e=i.props.children,n=o.map((t=>t===i?so.count(e)>1?so.only(null):Xi(e)?e.props.children:null:t));return z(Px,fe({},r,{ref:t}),Xi(e)?ml(e,void 0,n):null)}return z(Px,fe({},r,{ref:t}),n)}));V3.displayName="Slot";const Px=_e(((e,t)=>{const{children:n,...r}=e;return Xi(n)?ml(n,{...JH(r,n.props),ref:XH(t,n.ref)}):so.count(n)>1?so.only(null):null}));Px.displayName="SlotClone";const QH=({children:e})=>z(vl,null,e);function ZH(e){return Xi(e)&&e.type===QH}function JH(e,t){const n={...t};for(const r in t){const 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}}const eV=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ju=eV.reduce(((e,t)=>{const n=_e(((e,n)=>{const{asChild:r,...o}=e,i=r?V3:t;return We((()=>{window[Symbol.for("radix-ui")]=!0}),[]),z(i,fe({},o,{ref:n}))}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function tV(e,t){e&&_i.flushSync((()=>e.dispatchEvent(t)))}function nV(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function rV(...e){return t=>e.forEach((e=>nV(e,t)))}function G3(...e){return lt(rV(...e),e)}const al=null!=globalThis&&globalThis.document?tc:()=>{};function oV(e){const[t,n]=tt(void 0);return al((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t)||!t.length)return;const r=t[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;n({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}const K3="Popper",[e$,Y3]=M3(K3),[iV,X3]=e$(K3),aV=e=>{const{__scopePopper:t,children:n}=e,[r,o]=tt(null);return z(iV,{scope:t,anchor:r,onAnchorChange:o},n)},sV="PopperAnchor",lV=_e(((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=X3(sV,n),a=ke(null),l=G3(t,a);return We((()=>{i.onAnchorChange((null==r?void 0:r.current)||a.current)})),r?null:z(Ju.div,fe({},o,{ref:l}))})),Fv="PopperContent",[uV,xX]=e$(Fv),[cV,fV]=e$(Fv,{hasParent:!1,positionUpdateFns:new Set}),dV=_e(((e,t)=>{var n,r,o,i,a,l,u,s;const{__scopePopper:c,side:d="bottom",sideOffset:f=0,align:p="center",alignOffset:h=0,arrowPadding:m=0,collisionBoundary:v=[],collisionPadding:g=0,sticky:y="partial",hideWhenDetached:b=!1,avoidCollisions:w=!0,onPlaced:x,..._}=e,k=X3(Fv,c),[P,S]=tt(null),C=G3(t,(e=>S(e))),[E,N]=tt(null),O=oV(E),T=null!==(n=null==O?void 0:O.width)&&void 0!==n?n:0,R=null!==(r=null==O?void 0:O.height)&&void 0!==r?r:0,j=d+("center"!==p?"-"+p:""),D="number"==typeof g?g:{top:0,right:0,bottom:0,left:0,...g},A=Array.isArray(v)?v:[v],M=A.length>0,L={padding:D,boundary:A.filter(hV),altBoundary:M},{reference:I,floating:F,strategy:W,x:B,y:U,placement:$,middlewareData:H,update:V}=GH({strategy:"fixed",placement:j,whileElementsMounted:UH,middleware:[vV(),MH({mainAxis:f+R,alignmentAxis:h}),w?LH({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?jH():void 0,...L}):void 0,E?KH({element:E,padding:m}):void 0,w?IH({...L}):void 0,FH({...L,apply:({elements:e,availableWidth:t,availableHeight:n})=>{e.floating.style.setProperty("--radix-popper-available-width",`${t}px`),e.floating.style.setProperty("--radix-popper-available-height",`${n}px`)}}),mV({arrowWidth:T,arrowHeight:R}),b?kH({strategy:"referenceHidden"}):void 0].filter(pV)});al((()=>{I(k.anchor)}),[I,k.anchor]);const K=null!==B&&null!==U,[q,G]=Q3($),Y=pc(x);al((()=>{K&&(null==Y||Y())}),[K,Y]);const X=null===(o=H.arrow)||void 0===o?void 0:o.x,Q=null===(i=H.arrow)||void 0===i?void 0:i.y,Z=0!==(null===(a=H.arrow)||void 0===a?void 0:a.centerOffset),[J,ee]=tt();al((()=>{P&&ee(window.getComputedStyle(P).zIndex)}),[P]);const{hasParent:te,positionUpdateFns:ne}=fV(Fv,c),re=!te;tc((()=>{if(!re)return ne.add(V),()=>{ne.delete(V)}}),[re,ne,V]),al((()=>{re&&K&&Array.from(ne).reverse().forEach((e=>requestAnimationFrame(e)))}),[re,K,ne]);const oe={"data-side":q,"data-align":G,..._,ref:C,style:{..._.style,animation:K?void 0:"none",opacity:null!==(l=H.hide)&&void 0!==l&&l.referenceHidden?0:void 0}};return z("div",{ref:F,"data-radix-popper-content-wrapper":"",style:{position:W,left:0,top:0,transform:K?`translate3d(${Math.round(B)}px, ${Math.round(U)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:J,"--radix-popper-transform-origin":[null===(u=H.transformOrigin)||void 0===u?void 0:u.x,null===(s=H.transformOrigin)||void 0===s?void 0:s.y].join(" ")},dir:e.dir},z(uV,{scope:c,placedSide:q,onArrowChange:N,arrowX:X,arrowY:Q,shouldHideArrow:Z},re?z(cV,{scope:c,hasParent:!0,positionUpdateFns:ne},z(Ju.div,oe)):z(Ju.div,oe)))}));function pV(e){return void 0!==e}function hV(e){return null!==e}const vV=()=>({name:"anchorCssProperties",fn(e){const{rects:t,elements:n}=e,{width:r,height:o}=t.reference;return n.floating.style.setProperty("--radix-popper-anchor-width",`${r}px`),n.floating.style.setProperty("--radix-popper-anchor-height",`${o}px`),{}}}),mV=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,a;const{placement:l,rects:u,middlewareData:s}=t,c=0!==(null===(n=s.arrow)||void 0===n?void 0:n.centerOffset),d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[p,h]=Q3(l),m={start:"0%",center:"50%",end:"100%"}[h],v=(null!==(r=null===(o=s.arrow)||void 0===o?void 0:o.x)&&void 0!==r?r:0)+d/2,g=(null!==(i=null===(a=s.arrow)||void 0===a?void 0:a.y)&&void 0!==i?i:0)+f/2;let y="",b="";return"bottom"===p?(y=c?m:`${v}px`,b=-f+"px"):"top"===p?(y=c?m:`${v}px`,b=`${u.floating.height+f}px`):"right"===p?(y=-f+"px",b=c?m:`${g}px`):"left"===p&&(y=`${u.floating.width+f}px`,b=c?m:`${g}px`),{data:{x:y,y:b}}}});function Q3(e){const[t,n="center"]=e.split("-");return[t,n]}const gV=aV,yV=lV,bV=dV,wV=_e(((e,t)=>{var n;const{container:r=(null==globalThis||null===(n=globalThis.document)||void 0===n?void 0:n.body),...o}=e;return r?Mx.createPortal(z(Ju.div,fe({},o,{ref:t})),r):null}));function xV(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function _V(...e){return t=>e.forEach((e=>xV(e,t)))}function $V(...e){return lt(_V(...e),e)}function SV(e,t){return oT(((e,n)=>t[e][n]??e),e)}const t$=e=>{const{present:t,children:n}=e,r=CV(t),o="function"==typeof n?n({present:r.isPresent}):so.only(n),i=$V(r.ref,o.ref);return"function"==typeof n||r.isPresent?ml(o,{ref:i}):null};function CV(e){const[t,n]=tt(),r=ke({}),o=ke(e),i=ke("none"),a=e?"mounted":"unmounted",[l,u]=SV(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return We((()=>{const e=pv(r.current);i.current="mounted"===l?e:"none"}),[l]),al((()=>{const t=r.current,n=o.current;if(n!==e){const r=i.current,a=pv(t);e?u("MOUNT"):"none"===a||"none"===(null==t?void 0:t.display)?u("UNMOUNT"):u(n&&r!==a?"ANIMATION_OUT":"UNMOUNT"),o.current=e}}),[e,u]),al((()=>{if(t){const e=e=>{const n=pv(r.current).includes(e.animationName);e.target===t&&n&&_i.flushSync((()=>u("ANIMATION_END")))},n=e=>{e.target===t&&(i.current=pv(r.current))};return t.addEventListener("animationstart",n),t.addEventListener("animationcancel",e),t.addEventListener("animationend",e),()=>{t.removeEventListener("animationstart",n),t.removeEventListener("animationcancel",e),t.removeEventListener("animationend",e)}}u("ANIMATION_END")}),[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:lt((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}function pv(e){return(null==e?void 0:e.animationName)||"none"}function EV(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function PV(...e){return t=>e.forEach((e=>EV(e,t)))}function RV(...e){return lt(PV(...e),e)}function TV(e,t=(null==globalThis?void 0:globalThis.document)){const n=pc(e);We((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)}),[n,t])}t$.displayName="Presence";const Rx="dismissableLayer.update",OV="dismissableLayer.pointerDownOutside",AV="dismissableLayer.focusOutside";let fR;const NV=Qa({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),DV=_e(((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:l,onDismiss:u,...s}=e,c=ec(NV),[d,f]=tt(null),p=null!==(n=null==d?void 0:d.ownerDocument)&&void 0!==n?n:null==globalThis?void 0:globalThis.document,[,h]=tt({}),m=RV(t,(e=>f(e))),v=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=v.indexOf(g),b=d?v.indexOf(d):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,x=b>=y,_=IV((e=>{const t=e.target,n=[...c.branches].some((e=>e.contains(t)));!x||n||(null==i||i(e),null==l||l(e),e.defaultPrevented||null==u||u())}),p),k=kV((e=>{const t=e.target;[...c.branches].some((e=>e.contains(t)))||(null==a||a(e),null==l||l(e),e.defaultPrevented||null==u||u())}),p);return TV((e=>{b===c.layers.size-1&&(null==o||o(e),!e.defaultPrevented&&u&&(e.preventDefault(),u()))}),p),We((()=>{if(d)return r&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(fR=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),dR(),()=>{r&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=fR)}}),[d,p,r,c]),We((()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),dR())}),[d,c]),We((()=>{const e=()=>h({});return document.addEventListener(Rx,e),()=>document.removeEventListener(Rx,e)}),[]),z(Ju.div,fe({},s,{ref:m,style:{pointerEvents:w?x?"auto":"none":void 0,...e.style},onFocusCapture:Ro(e.onFocusCapture,k.onFocusCapture),onBlurCapture:Ro(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:Ro(e.onPointerDownCapture,_.onPointerDownCapture)}))}));function IV(e,t=(null==globalThis?void 0:globalThis.document)){const n=pc(e),r=ke(!1),o=ke((()=>{}));return We((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){Z3(OV,n,i,{discrete:!0})};const i={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}r.current=!1},i=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}function kV(e,t=(null==globalThis?void 0:globalThis.document)){const n=pc(e),r=ke(!1);return We((()=>{const e=e=>{e.target&&!r.current&&Z3(AV,n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function dR(){const e=new CustomEvent(Rx);document.dispatchEvent(e)}function Z3(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?tV(o,i):o.dispatchEvent(i)}let nw;const J3="HoverCard",[eD,_X]=M3(J3,[Y3]),n$=Y3(),[MV,Pm]=eD(J3),LV=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:o,onOpenChange:i,openDelay:a=700,closeDelay:l=300}=e,u=n$(t),s=ke(0),c=ke(0),d=ke(!1),f=ke(!1),[p=!1,h]=SH({prop:r,defaultProp:o,onChange:i}),m=lt((()=>{clearTimeout(c.current),s.current=window.setTimeout((()=>h(!0)),a)}),[a,h]),v=lt((()=>{clearTimeout(s.current),!d.current&&!f.current&&(c.current=window.setTimeout((()=>h(!1)),l))}),[l,h]),g=lt((()=>h(!1)),[h]);return We((()=>()=>{clearTimeout(s.current),clearTimeout(c.current)}),[]),z(MV,{scope:t,open:p,onOpenChange:h,onOpen:m,onClose:v,onDismiss:g,hasSelectionRef:d,isPointerDownOnContentRef:f},z(gV,u,n))},jV="HoverCardTrigger",FV=_e(((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=Pm(jV,n),i=n$(n);return z(yV,fe({asChild:!0},i),z(Ju.a,fe({"data-state":o.open?"open":"closed"},r,{ref:t,onPointerEnter:Ro(e.onPointerEnter,Bv(o.onOpen)),onPointerLeave:Ro(e.onPointerLeave,Bv(o.onClose)),onFocus:Ro(e.onFocus,o.onOpen),onBlur:Ro(e.onBlur,o.onClose),onTouchStart:Ro(e.onTouchStart,(e=>e.preventDefault()))})))})),tD="HoverCardPortal",[BV,qV]=eD(tD,{forceMount:void 0}),zV=e=>{const{__scopeHoverCard:t,forceMount:n,children:r,container:o}=e,i=Pm(tD,t);return z(BV,{scope:t,forceMount:n},z(t$,{present:n||i.open},z(wV,{asChild:!0,container:o},r)))},Tx="HoverCardContent",WV=_e(((e,t)=>{const n=qV(Tx,e.__scopeHoverCard),{forceMount:r=n.forceMount,...o}=e,i=Pm(Tx,e.__scopeHoverCard);return z(t$,{present:r||i.open},z(UV,fe({"data-state":i.open?"open":"closed"},o,{onPointerEnter:Ro(e.onPointerEnter,Bv(i.onOpen)),onPointerLeave:Ro(e.onPointerLeave,Bv(i.onClose)),ref:t})))})),UV=_e(((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,...l}=e,u=Pm(Tx,n),s=n$(n),c=ke(null),d=RH(t,c),[f,p]=tt(!1);return We((()=>{if(f){const e=document.body;return nw=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect="none",e.style.webkitUserSelect="none",()=>{e.style.userSelect=nw,e.style.webkitUserSelect=nw}}}),[f]),We((()=>{if(c.current){const e=()=>{p(!1),u.isPointerDownOnContentRef.current=!1,setTimeout((()=>{var e;""!==(null===(e=document.getSelection())||void 0===e?void 0:e.toString())&&(u.hasSelectionRef.current=!0)}))};return document.addEventListener("pointerup",e),()=>{document.removeEventListener("pointerup",e),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!1}}}),[u.isPointerDownOnContentRef,u.hasSelectionRef]),We((()=>{c.current&&HV(c.current).forEach((e=>e.setAttribute("tabindex","-1")))})),z(DV,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:a,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:Ro(i,(e=>{e.preventDefault()})),onDismiss:u.onDismiss},z(bV,fe({},s,l,{onPointerDown:Ro(l.onPointerDown,(e=>{e.currentTarget.contains(e.target)&&p(!0),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!0})),ref:d,style:{...l.style,userSelect:f?"text":void 0,WebkitUserSelect:f?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})))}));function Bv(e){return t=>"touch"===t.pointerType?void 0:e()}function HV(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}const VV=LV,GV=FV,KV=zV,nD=WV,$X=VV,SX=GV,CX=KV,YV=P.forwardRef((({className:e,align:t="center",sideOffset:n=4,...r},o)=>k.jsx(nD,{ref:o,align:t,sideOffset:n,className:se("z-50 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})));YV.displayName=nD.displayName;const rD=P.forwardRef((({className:e,type:t,...n},r)=>{const{error:o}=as();return k.jsx("input",{type:t,className:se("flex w-full rounded-m px-4 py-3.5 text-base text-slate-900 outline outline-1 outline-input ring-offset-background transition-all duration-200 ease-in-out file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-base placeholder:text-muted-foreground placeholder:text-slate-400 hover:outline-2 hover:outline-slate-400 focus-visible:bg-slate-50 focus-visible:text-slate-900 focus-visible:outline-2 focus-visible:outline-blue_120 disabled:cursor-not-allowed disabled:text-slate-300 disabled:outline-slate-200",{"bg-red_30_17 outline-red-dark":!!o},e),ref:r,...n})}));rD.displayName="Input";const oD="Radio",[XV,iD]=Sr(oD),[QV,ZV]=XV(oD),JV=_e(((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:i,disabled:a,value:l="on",onCheck:u,...s}=e,[c,d]=tt(null),f=Rt(t,(e=>d(e))),p=ke(!1),h=!c||!!c.closest("form");return z(QV,{scope:n,checked:o,disabled:a},z(it.button,fe({type:"button",role:"radio","aria-checked":o,"data-state":aD(o),"data-disabled":a?"":void 0,disabled:a,value:l},s,{ref:f,onClick:ze(e.onClick,(e=>{o||null==u||u(),h&&(p.current=e.isPropagationStopped(),p.current||e.stopPropagation())}))})),h&&z(nG,{control:c,bubbles:!p.current,name:r,value:l,checked:o,required:i,disabled:a,style:{transform:"translateX(-100%)"}}))})),eG="RadioIndicator",tG=_e(((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,i=ZV(eG,n);return z(Ao,{present:r||i.checked},z(it.span,fe({"data-state":aD(i.checked),"data-disabled":i.disabled?"":void 0},o,{ref:t})))})),nG=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=ke(null),a=fm(n),l=dm(t);return We((()=>{const e=i.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(a!==n&&o){const t=new Event("click",{bubbles:r});o.call(e,n),e.dispatchEvent(t)}}),[a,n,r]),z("input",fe({type:"radio","aria-hidden":!0,defaultChecked:n},o,{tabIndex:-1,ref:i,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function aD(e){return e?"checked":"unchecked"}const rG=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],sD="RadioGroup",[oG,EX]=Sr(sD,[fc,iD]),lD=fc(),uD=iD(),[iG,aG]=oG(sD),sG=_e(((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:i,required:a=!1,disabled:l=!1,orientation:u,dir:s,loop:c=!0,onValueChange:d,...f}=e,p=lD(n),h=Gd(s),[m,v]=Vo({prop:i,defaultProp:o,onChange:d});return z(iG,{scope:n,name:r,required:a,disabled:l,value:m,onValueChange:v},z(z_,fe({asChild:!0},p,{orientation:u,dir:h,loop:c}),z(it.div,fe({role:"radiogroup","aria-required":a,"aria-orientation":u,"data-disabled":l?"":void 0,dir:h},f,{ref:t}))))})),lG="RadioGroupItem",uG=_e(((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,i=aG(lG,n),a=i.disabled||r,l=lD(n),u=uD(n),s=ke(null),c=Rt(t,s),d=i.value===o.value,f=ke(!1);return We((()=>{const e=e=>{rG.includes(e.key)&&(f.current=!0)},t=()=>f.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}}),[]),z(W_,fe({asChild:!0},l,{focusable:!a,active:d}),z(JV,fe({disabled:a,required:i.required,checked:d},u,o,{name:i.name,ref:c,onCheck:()=>i.onValueChange(o.value),onKeyDown:ze((e=>{"Enter"===e.key&&e.preventDefault()})),onFocus:ze(o.onFocus,(()=>{var e;f.current&&(null===(e=s.current)||void 0===e||e.click())}))})))})),cG=_e(((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=uD(n);return z(tG,fe({},o,r,{ref:t}))})),cD=sG,fD=uG,fG=cG,dG=P.forwardRef((({className:e,...t},n)=>k.jsx(cD,{className:se("grid gap-2",e),...t,ref:n})));dG.displayName=cD.displayName;const pG=P.forwardRef((({className:e,...t},n)=>k.jsx(fD,{ref:n,className:se("aspect-square size-6 rounded-full border border-slate-300 disabled:cursor-not-allowed disabled:border-slate-100 disabled:bg-slate-100 data-[state=checked]:border-blue_100 data-[state=checked]:bg-blue_100 md:hover:border-2",e),...t,children:k.jsx(fG,{className:"flex items-center justify-center",children:k.jsx(xM,{className:"stack-animate size-2 border-none",style:{fill:t.disabled?"var(--slate-300)":"white",color:t.disabled?"var(--slate-300)":"white"}})})})));pG.displayName=fD.displayName;const hG=Yv,PX=Ux,RX=ic,vG=Xv,dD=P.forwardRef((({className:e,...t},n)=>k.jsx(rc,{className:se("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n})));dD.displayName=rc.displayName;const mG=Ji("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),pD=P.forwardRef((({side:e="right",className:t,overlayClassName:n,children:r,...o},i)=>k.jsxs(vG,{children:[k.jsx(dD,{className:se("bg-slate-900/70",n)}),k.jsxs(oc,{ref:i,className:se(mG({side:e}),t),...o,children:[r,k.jsxs(ic,{className:"absolute right-4 top-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[k.jsx(Dx,{className:"h-4 w-4"}),k.jsx("span",{className:"sr-only",children:"Close"})]})]})]})));pD.displayName=oc.displayName;const hD=({className:e,...t})=>k.jsx("div",{className:se("flex flex-col space-y-2 text-center sm:text-left",e),...t});hD.displayName="SheetHeader";const gG=({className:e,...t})=>k.jsx("div",{className:se("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});gG.displayName="SheetFooter";const vD=P.forwardRef((({className:e,...t},n)=>k.jsx(jd,{ref:n,className:se("text-lg font-semibold text-foreground",e),...t})));vD.displayName=jd.displayName;const mD=P.forwardRef((({className:e,...t},n)=>k.jsx(Fd,{ref:n,className:se("text-sm text-muted-foreground",e),...t})));mD.displayName=Fd.displayName;const[Rm,TX]=Sr("Tooltip",[cc]),r$=cc(),yG="TooltipProvider",bG=700,Ox="tooltip.open",[wG,o$]=Rm(yG),gD=e=>{const{__scopeTooltip:t,delayDuration:n=bG,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,[a,l]=tt(!0),u=ke(!1),s=ke(0);return We((()=>{const e=s.current;return()=>window.clearTimeout(e)}),[]),z(wG,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:lt((()=>{window.clearTimeout(s.current),l(!1)}),[]),onClose:lt((()=>{window.clearTimeout(s.current),s.current=window.setTimeout((()=>l(!0)),r)}),[r]),isPointerInTransitRef:u,onPointerInTransitChange:lt((e=>{u.current=e}),[]),disableHoverableContent:o},i)},i$="Tooltip",[xG,Tm]=Rm(i$),yD=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:a,delayDuration:l}=e,u=o$(i$,e.__scopeTooltip),s=r$(t),[c,d]=tt(null),f=lo(),p=ke(0),h=a??u.disableHoverableContent,m=l??u.delayDuration,v=ke(!1),[g=!1,y]=Vo({prop:r,defaultProp:o,onChange:e=>{e?(u.onOpen(),document.dispatchEvent(new CustomEvent(Ox))):u.onClose(),null==i||i(e)}}),b=Ur((()=>g?v.current?"delayed-open":"instant-open":"closed"),[g]),w=lt((()=>{window.clearTimeout(p.current),v.current=!1,y(!0)}),[y]),x=lt((()=>{window.clearTimeout(p.current),y(!1)}),[y]),_=lt((()=>{window.clearTimeout(p.current),p.current=window.setTimeout((()=>{v.current=!0,y(!0)}),m)}),[m,y]);return We((()=>()=>window.clearTimeout(p.current)),[]),z(bm,s,z(xG,{scope:t,contentId:f,open:g,stateAttribute:b,trigger:c,onTriggerChange:d,onTriggerEnter:lt((()=>{u.isOpenDelayed?_():w()}),[u.isOpenDelayed,_,w]),onTriggerLeave:lt((()=>{h?x():window.clearTimeout(p.current)}),[x,h]),onOpen:w,onClose:x,disableHoverableContent:h},n))},pR="TooltipTrigger",bD=_e(((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Tm(pR,n),i=o$(pR,n),a=r$(n),l=Rt(t,ke(null),o.onTriggerChange),u=ke(!1),s=ke(!1),c=lt((()=>u.current=!1),[]);return We((()=>()=>document.removeEventListener("pointerup",c)),[c]),z(F_,fe({asChild:!0},a),z(it.button,fe({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},r,{ref:l,onPointerMove:ze(e.onPointerMove,(e=>{"touch"!==e.pointerType&&!s.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),s.current=!0)})),onPointerLeave:ze(e.onPointerLeave,(()=>{o.onTriggerLeave(),s.current=!1})),onPointerDown:ze(e.onPointerDown,(()=>{u.current=!0,document.addEventListener("pointerup",c,{once:!0})})),onFocus:ze(e.onFocus,(()=>{u.current||o.onOpen()})),onBlur:ze(e.onBlur,o.onClose),onClick:ze(e.onClick,o.onClose)})))})),_G="TooltipPortal",[OX,$G]=Rm(_G,{forceMount:void 0}),Md="TooltipContent",wD=_e(((e,t)=>{const n=$G(Md,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,a=Tm(Md,e.__scopeTooltip);return z(Ao,{present:r||a.open},a.disableHoverableContent?z(xD,fe({side:o},i,{ref:t})):z(SG,fe({side:o},i,{ref:t})))})),SG=_e(((e,t)=>{const n=Tm(Md,e.__scopeTooltip),r=o$(Md,e.__scopeTooltip),o=ke(null),i=Rt(t,o),[a,l]=tt(null),{trigger:u,onClose:s}=n,c=o.current,{onPointerInTransitChange:d}=r,f=lt((()=>{l(null),d(!1)}),[d]),p=lt(((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},o=OG([...PG(r,EG(r,n.getBoundingClientRect())),...RG(t.getBoundingClientRect())]);l(o),d(!0)}),[d]);return We((()=>()=>f()),[f]),We((()=>{if(u&&c){const e=e=>p(e,c),t=e=>p(e,u);return u.addEventListener("pointerleave",e),c.addEventListener("pointerleave",t),()=>{u.removeEventListener("pointerleave",e),c.removeEventListener("pointerleave",t)}}}),[u,c,p,f]),We((()=>{if(a){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=(null==u?void 0:u.contains(t))||(null==c?void 0:c.contains(t)),o=!TG(n,a);r?f():o&&(f(),s())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[u,c,a,s,f]),z(xD,fe({},e,{ref:i}))})),[CG,AX]=Rm(i$,{isInside:!1}),xD=_e(((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...l}=e,u=Tm(Md,n),s=r$(n),{onClose:c}=u;return We((()=>(document.addEventListener(Ox,c),()=>document.removeEventListener(Ox,c))),[c]),We((()=>{if(u.trigger){const e=e=>{const t=e.target;null!=t&&t.contains(u.trigger)&&c()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}}),[u.trigger,c]),z(Hv,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:e=>e.preventDefault(),onDismiss:c},z(B_,fe({"data-state":u.stateAttribute},s,l,{ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),z(Lx,null,r),z(CG,{scope:n,isInside:!0},z(gU,{id:u.contentId,role:"tooltip"},o||r))))}));function EG(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function PG(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}function RG(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function TG(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){const a=t[e].x,l=t[e].y,u=t[i].x,s=t[i].y;l>r!=s>r&&n<(u-a)*(r-l)/(s-l)+a&&(o=!o)}return o}function OG(e){const t=e.slice();return t.sort(((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0)),AG(t)}function AG(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const r=e[n];for(;t.length>=2;){const e=t[t.length-1],n=t[t.length-2];if(!((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x)))break;t.pop()}t.push(r)}t.pop();const n=[];for(let t=e.length-1;t>=0;t--){const r=e[t];for(;n.length>=2;){const e=n[n.length-1],t=n[n.length-2];if(!((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x)))break;n.pop()}n.push(r)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}const NG=gD,DG=yD,IG=bD,_D=wD,$D=()=>{const e=window.innerWidth;return e<768?"mobile":e<1024?"tablet":"desktop"},kG=e=>{if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)},MG=e=>kG(e)&&"type"in e&&"string"==typeof e.type,Ct=e=>{const t=t=>({type:e,payload:t});return t.toString=()=>`${e}`,t.type=e,t.match=t=>MG(t)&&t.type===e,t};Ct("remoteReady"),Ct("reselectUser"),Ct("requestLogin"),Ct("requestLogout"),Ct("setConfirmLeavePage"),Ct("requestChangePath"),Ct("wsSubscribe"),Ct("wsUnSubscribe"),Ct("hostStoreConnect"),Ct("remoteLogin"),Ct("remoteLogout"),Ct("wsOnMessage"),Ct("setRouterPath");const SD=Ct("setDeviceType");Ct("setUserError"),Ct("setUserIsError"),Ct("setUserPending"),Ct("setUserSuccess"),Ct("setUserData"),Ct("updateAccountData"),Ct("updateUser"),Ct("addNotification"),Ct("markNotification"),Ct("setNotificationsError"),Ct("setNotificationsList"),Ct("setNotificationsPending"),Ct("setNotificationsTotalCount"),Ct("setNotificationsUnreadCount"),Ct("resetNotificationsState"),Ct("undoNotification"),Ct("setInstanceInfo"),Ct("setInstanceInfoPending"),Ct("setInstanceInfoError"),Ct("setPlatformSettings"),Ct("setProfileSettings"),Ct("setGroupData"),Ct("setGroupLoading"),Ct("showGroupBasicInfo"),iT("requestMicroFrontendFetch"),iT("sendMicroFrontendFetchResponse");const LG={deviceType:$D()},Om=nM({name:"ui",initialState:LG,reducers:{},extraReducers:e=>{e.addCase(SD,((e,{payload:t})=>{e.deviceType=t}))},selectors:{selectDeviceType:e=>e.deviceType,selectIsMobile:e=>"mobile"===e.deviceType,selectIsTablet:e=>"tablet"===e.deviceType,selectIsDesktop:e=>"desktop"===e.deviceType}});var rw,hR,ow,vR,iw,mR,aw,gR,sw,yR,lw,bR,uw,wR,cw,xR,fw,_R,dw,$R,pw,SR,hw,CR,vw,ER,mw,PR,gw,RR,yw,TR,bw,OR,ww,AR,xw,NR,_w,DR,$w,IR,Sw,kR,Cw,MR,Ew,LR,Pw,jR,Rw,FR,Tw,BR,Ow,qR,Aw,zR,Nw,WR,Dw,UR,Iw,HR,kw,VR,Mw,GR,Lw,KR,jw,YR,Fw,XR,Bw,QR,qw,ZR,zw,JR,Ww,eT;function CD(){if(hR)return rw;hR=1;var e=zO(),t=e&&new e;return rw=t}function ED(){if(vR)return ow;vR=1;var e=Hd(),t=CD();return ow=t?function(e,n){return t.set(e,n),e}:e}function Am(){if(mR)return iw;mR=1;var e=cm(),t=No();return iw=function(n){return function(){var r=arguments;switch(r.length){case 0:return new n;case 1:return new n(r[0]);case 2:return new n(r[0],r[1]);case 3:return new n(r[0],r[1],r[2]);case 4:return new n(r[0],r[1],r[2],r[3]);case 5:return new n(r[0],r[1],r[2],r[3],r[4]);case 6:return new n(r[0],r[1],r[2],r[3],r[4],r[5]);case 7:return new n(r[0],r[1],r[2],r[3],r[4],r[5],r[6])}var o=e(n.prototype),i=n.apply(o,r);return t(i)?i:o}},iw}function jG(){if(gR)return aw;gR=1;var e=Am(),t=Er();return aw=function(n,r,o){var i=1&r,a=e(n);return function e(){return(this&&this!==t&&this instanceof e?a:n).apply(i?o:this,arguments)}},aw}function PD(){if(yR)return sw;yR=1;var e=Math.max;return sw=function(t,n,r,o){for(var i=-1,a=t.length,l=r.length,u=-1,s=n.length,c=e(a-l,0),d=Array(s+c),f=!o;++u<s;)d[u]=n[u];for(;++i<l;)(f||i<a)&&(d[r[i]]=t[i]);for(;c--;)d[u++]=t[i++];return d}}function RD(){if(bR)return lw;bR=1;var e=Math.max;return lw=function(t,n,r,o){for(var i=-1,a=t.length,l=-1,u=r.length,s=-1,c=n.length,d=e(a-u,0),f=Array(d+c),p=!o;++i<d;)f[i]=t[i];for(var h=i;++s<c;)f[h+s]=n[s];for(;++l<u;)(p||i<a)&&(f[h+r[l]]=t[i++]);return f}}function FG(){if(wR)return uw;return wR=1,uw=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}}function a$(){if(xR)return cw;return xR=1,cw=function(){}}function s$(){if(_R)return fw;_R=1;var e=cm(),t=a$();function n(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}return n.prototype=e(t.prototype),n.prototype.constructor=n,fw=n}function TD(){if($R)return dw;$R=1;var e=CD(),t=GO();return dw=e?function(t){return e.get(t)}:t}function BG(){if(SR)return pw;SR=1;return pw={}}function qG(){if(CR)return hw;CR=1;var e=BG(),t=Object.prototype.hasOwnProperty;return hw=function(n){for(var r=n.name+"",o=e[r],i=t.call(e,r)?o.length:0;i--;){var a=o[i],l=a.func;if(null==l||l==n)return a.name}return r}}function OD(){if(ER)return vw;ER=1;var e=cm(),t=a$();function n(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}return n.prototype=e(t.prototype),n.prototype.constructor=n,vw=n}function zG(){if(PR)return mw;PR=1;var e=s$(),t=OD(),n=um();return mw=function(r){if(r instanceof e)return r.clone();var o=new t(r.__wrapped__,r.__chain__);return o.__actions__=n(r.__actions__),o.__index__=r.__index__,o.__values__=r.__values__,o}}function WG(){if(RR)return gw;RR=1;var e=s$(),t=OD(),n=a$(),r=Cr(),o=fo(),i=zG(),a=Object.prototype.hasOwnProperty;function l(n){if(o(n)&&!r(n)&&!(n instanceof e)){if(n instanceof t)return n;if(a.call(n,"__wrapped__"))return i(n)}return new t(n)}return l.prototype=n.prototype,l.prototype.constructor=l,gw=l}function UG(){if(TR)return yw;TR=1;var e=s$(),t=TD(),n=qG(),r=WG();return yw=function(o){var i=n(o),a=r[i];if("function"!=typeof a||!(i in e.prototype))return!1;if(o===a)return!0;var l=t(a);return!!l&&o===l[0]}}function AD(){if(OR)return bw;OR=1;var e=ED(),t=eA()(e);return bw=t}function HG(){if(AR)return ww;AR=1;var e=/\{\n\/\* \[wrapped with (.+)\] \*/,t=/,? & /;return ww=function(n){var r=n.match(e);return r?r[1].split(t):[]}}function VG(){if(NR)return xw;NR=1;var e=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;return xw=function(t,n){var r=n.length;if(!r)return t;var o=r-1;return n[o]=(r>1?"& ":"")+n[o],n=n.join(r>2?", ":" "),t.replace(e,"{\n/* [wrapped with "+n+"] */\n")}}function GG(){if(DR)return _w;DR=1;var e=x_(),t=VO(),n=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];return _w=function(r,o){return e(n,(function(e){var n="_."+e[0];o&e[1]&&!t(r,n)&&r.push(n)})),r.sort()}}function ND(){if(IR)return $w;IR=1;var e=HG(),t=VG(),n=g_(),r=GG();return $w=function(o,i,a){var l=i+"";return n(o,t(l,r(e(l),a)))}}function DD(){if(kR)return Sw;kR=1;var e=UG(),t=AD(),n=ND();return Sw=function(r,o,i,a,l,u,s,c,d,f){var p=8&o;o|=p?32:64,4&(o&=~(p?64:32))||(o&=-4);var h=[r,o,l,p?u:void 0,p?s:void 0,p?void 0:u,p?void 0:s,c,d,f],m=i.apply(void 0,h);return e(r)&&t(m,h),m.placeholder=a,n(m,r,o)}}function ID(){if(MR)return Cw;return MR=1,Cw=function(e){return e.placeholder}}function KG(){if(LR)return Ew;LR=1;var e=um(),t=im(),n=Math.min;return Ew=function(r,o){for(var i=r.length,a=n(o.length,i),l=e(r);a--;){var u=o[a];r[a]=t(u,i)?l[u]:void 0}return r}}function l$(){if(jR)return Pw;jR=1;var e="__lodash_placeholder__";return Pw=function(t,n){for(var r=-1,o=t.length,i=0,a=[];++r<o;){var l=t[r];(l===n||l===e)&&(t[r]=e,a[i++]=r)}return a}}function kD(){if(FR)return Rw;FR=1;var e=PD(),t=RD(),n=FG(),r=Am(),o=DD(),i=ID(),a=KG(),l=l$(),u=Er();return Rw=function s(c,d,f,p,h,m,v,g,y,b){var w=128&d,x=1&d,_=2&d,k=24&d,P=512&d,S=_?void 0:r(c);return function C(){for(var E=arguments.length,N=Array(E),O=E;O--;)N[O]=arguments[O];if(k)var T=i(C),R=n(N,T);if(p&&(N=e(N,p,h,k)),m&&(N=t(N,m,v,k)),E-=R,k&&E<b){var j=l(N,T);return o(c,d,s,C.placeholder,f,N,j,g,y,b-E)}var D=x?f:this,z=_?D[c]:c;return E=N.length,g?N=a(N,g):P&&E>1&&N.reverse(),w&&y<E&&(N.length=y),this&&this!==u&&this instanceof C&&(z=S||r(z)),z.apply(D,N)}},Rw}function YG(){if(BR)return Tw;BR=1;var e=m_(),t=Am(),n=kD(),r=DD(),o=ID(),i=l$(),a=Er();return Tw=function(l,u,s){var c=t(l);return function t(){for(var d=arguments.length,f=Array(d),p=d,h=o(t);p--;)f[p]=arguments[p];var m=d<3&&f[0]!==h&&f[d-1]!==h?[]:i(f,h);return(d-=m.length)<s?r(l,u,n,t.placeholder,void 0,f,m,void 0,void 0,s-d):e(this&&this!==a&&this instanceof t?c:l,this,f)}},Tw}function XG(){if(qR)return Ow;qR=1;var e=m_(),t=Am(),n=Er();return Ow=function(r,o,i,a){var l=1&o,u=t(r);return function t(){for(var o=-1,s=arguments.length,c=-1,d=a.length,f=Array(d+s),p=this&&this!==n&&this instanceof t?u:r;++c<d;)f[c]=a[c];for(;s--;)f[c++]=arguments[++o];return e(p,l?i:this,f)}},Ow}function QG(){if(zR)return Aw;zR=1;var e=PD(),t=RD(),n=l$(),r="__lodash_placeholder__",o=128,i=Math.min;return Aw=function(a,l){var u=a[1],s=l[1],c=u|s,d=c<131,f=s==o&&8==u||s==o&&256==u&&a[7].length<=l[8]||384==s&&l[7].length<=l[8]&&8==u;if(!d&&!f)return a;1&s&&(a[2]=l[2],c|=1&u?0:4);var p=l[3];if(p){var h=a[3];a[3]=h?e(h,p,l[4]):p,a[4]=h?n(a[3],r):l[4]}return(p=l[5])&&(h=a[5],a[5]=h?t(h,p,l[6]):p,a[6]=h?n(a[5],r):l[6]),(p=l[7])&&(a[7]=p),s&o&&(a[8]=null==a[8]?l[8]:i(a[8],l[8])),null==a[9]&&(a[9]=l[9]),a[0]=l[0],a[1]=c,a}}function u$(){if(WR)return Nw;WR=1;var e=ED(),t=jG(),n=YG(),r=kD(),o=XG(),i=TD(),a=QG(),l=AD(),u=ND(),s=lA(),c=Math.max;return Nw=function(d,f,p,h,m,v,g,y){var b=2&f;if(!b&&"function"!=typeof d)throw new TypeError("Expected a function");var w=h?h.length:0;if(w||(f&=-97,h=m=void 0),g=void 0===g?g:c(s(g),0),y=void 0===y?y:s(y),w-=m?m.length:0,64&f){var x=h,_=m;h=m=void 0}var k=b?void 0:i(d),P=[d,f,p,h,m,x,_,v,g,y];if(k&&a(P,k),d=P[0],f=P[1],p=P[2],h=P[3],m=P[4],!(y=P[9]=void 0===P[9]?b?0:d.length:c(P[9]-w,0))&&24&f&&(f&=-25),f&&1!=f)S=8==f||16==f?n(d,f,y):32!=f&&33!=f||m.length?r.apply(void 0,P):o(d,f,p,h);else var S=t(d,f,p);return u((k?e:l)(S,P),d,f)}}function ZG(){if(UR)return Dw;UR=1;var e=u$();return Dw=function(t,n,r){return n=r?void 0:n,n=t&&null==n?t.length:n,e(t,128,void 0,void 0,void 0,void 0,n)}}function JG(){if(HR)return Iw;HR=1;var e=dA();return Iw=function(t){return e(t,4)}}function eK(){if(VR)return kw;VR=1;var e=u$();function t(n,r,o){var i=e(n,8,void 0,void 0,void 0,void 0,void 0,r=o?void 0:r);return i.placeholder=t.placeholder,i}return t.placeholder={},kw=t}function tK(){if(GR)return Mw;GR=1;var e=ta(),t=fo(),n=uj();return Mw=function(r){if(!t(r))return!1;var o=e(r);return"[object Error]"==o||"[object DOMException]"==o||"string"==typeof r.message&&"string"==typeof r.name&&!n(r)}}function nK(){if(KR)return Lw;KR=1;var e=Ud(),t=fo();return Lw=function(n){return t(n)&&"[object WeakMap]"==e(n)}}function rK(){if(YR)return jw;YR=1;var e=dA(),t=h_();return jw=function(n){return t("function"==typeof n?n:e(n,1))}}function oK(){if(XR)return Fw;XR=1;var e=u$(),t=Oj(),n=t((function(t,n){return e(t,256,void 0,void 0,void 0,n)}));return Fw=n}function iK(){if(QR)return Bw;QR=1;var e=e_(),t=um(),n=Cr(),r=sc(),o=dO(),i=qd(),a=t_();return Bw=function(l){return n(l)?e(l,i):r(l)?[l]:t(o(a(l)))}}function aK(){return ZR||(ZR=1,qw={ary:ZG(),assign:cA(),clone:JG(),curry:eK(),forEach:x_(),isArray:Cr(),isError:tK(),isFunction:Zv(),isWeakMap:nK(),iteratee:rK(),keys:FO(),rearg:oK(),toInteger:lA(),toPath:iK()}),qw}function sK(){if(JR)return zw;JR=1;var e=sT(),t=aK();return zw=function(n,r,o){return e(t,n,r,o)}}function lK(){if(eT)return Ww;eT=1;var e=sK()("debounce",aA());return e.placeholder=aT(),Ww=e}var uK=lK();const cK=Oo(uK);function tT(e,t,n=window){const r=ke(t);We((()=>{r.current=t}),[t]),We((()=>{if(!n)return;const t=e=>r.current(e);return n.addEventListener(e,t),()=>{n.removeEventListener(e,t)}}),[e,n])}const fK=e=>{const t=cK(150)(e);tT("resize",t),tT("orientationchange",t)},NX=()=>{const e=rM();fK((()=>{const t=$D();e(SD(t))}))},DX=()=>Wv(Om.selectors.selectDeviceType),dK=()=>Wv(Om.selectors.selectIsMobile),IX=()=>Wv(Om.selectors.selectIsTablet),kX=()=>Wv(Om.selectors.selectIsDesktop);function nT({className:e,...t}){return k.jsx("div",{className:se("animate-pulse rounded-md bg-muted",e),...t})}const pK="sidebar_state",hK=604800,vK="14rem",mK="18rem",gK="3rem",yK="b",MD=P.createContext(null);function Nm(){const e=P.useContext(MD);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const bK=P.forwardRef((({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:o,children:i,...a},l)=>{const u=dK(),[s,c]=P.useState(!1),[d,f]=P.useState(e),p=t??d,h=P.useCallback((e=>{const t="function"==typeof e?e(p):e;n?n(t):f(t),document.cookie=`${pK}=${t}; path=/; max-age=${hK}`}),[n,p]),m=P.useCallback((()=>u?c((e=>!e)):h((e=>!e))),[u,h,c]);P.useEffect((()=>{const e=e=>{e.key===yK&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),m())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)}),[m]);const v=p?"expanded":"collapsed",g=P.useMemo((()=>({state:v,open:p,setOpen:h,isMobile:u,openMobile:s,setOpenMobile:c,toggleSidebar:m})),[v,p,h,u,s,c,m]);return k.jsx(MD.Provider,{value:g,children:k.jsx(gD,{delayDuration:0,children:k.jsx("div",{style:{"--sidebar-width":vK,"--sidebar-width-icon":gK,...o},className:se("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",r),ref:l,...a,children:i})})})}));bK.displayName="SidebarProvider";const wK=P.forwardRef((({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:o,...i},a)=>{const{isMobile:l,state:u,openMobile:s,setOpenMobile:c}=Nm();return"none"===n?k.jsx("div",{className:se("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",r),ref:a,...i,children:o}):l?k.jsx(hG,{open:s,onOpenChange:c,children:k.jsxs(pD,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":mK},side:e,children:[k.jsxs(hD,{className:"sr-only",children:[k.jsx(vD,{children:"Sidebar"}),k.jsx(mD,{children:"Displays the mobile sidebar."})]}),k.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):k.jsxs("div",{ref:a,className:"group peer hidden text-sidebar-foreground md:block","data-state":u,"data-collapsible":"collapsed"===u?n:"","data-variant":t,"data-side":e,children:[k.jsx("div",{className:se("relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180","floating"===t||"inset"===t?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),k.jsx("div",{className:se("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex","left"===e?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]","floating"===t||"inset"===t?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...i,children:k.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-sm group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:o})})]})}));wK.displayName="Sidebar";const xK=P.forwardRef((({className:e,onClick:t,...n},r)=>{const{toggleSidebar:o,open:i}=Nm();return k.jsx(Ld,{ref:r,"data-sidebar":"trigger",variant:"tertiary",size:"icon_m",className:se("size-6 text-slate-900",e),onClick:e=>{null==t||t(e),o()},...n,children:i?k.jsx(OM,{size:16}):k.jsx(RM,{size:16})})}));xK.displayName="SidebarTrigger";const _K=P.forwardRef((({className:e,...t},n)=>{const{toggleSidebar:r}=Nm();return k.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:se("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})}));_K.displayName="SidebarRail";const $K=P.forwardRef((({className:e,...t},n)=>k.jsx("main",{ref:n,className:se("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-m md:peer-data-[variant=inset]:shadow",e),...t})));$K.displayName="SidebarInset";const SK=P.forwardRef((({className:e,...t},n)=>k.jsx(rD,{ref:n,"data-sidebar":"input",className:se("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t})));SK.displayName="SidebarInput";const CK=P.forwardRef((({className:e,...t},n)=>k.jsx("div",{ref:n,"data-sidebar":"header",className:se("flex flex-col gap-2 p-2",e),...t})));CK.displayName="SidebarHeader";const EK=P.forwardRef((({className:e,...t},n)=>k.jsx("div",{ref:n,"data-sidebar":"footer",className:se("flex flex-col gap-2 p-2",e),...t})));EK.displayName="SidebarFooter";const PK=P.forwardRef((({className:e,...t},n)=>k.jsx(K_,{ref:n,"data-sidebar":"separator",className:se("mx-2 w-auto bg-sidebar-border",e),...t})));PK.displayName="SidebarSeparator";const RK=P.forwardRef((({className:e,...t},n)=>k.jsx("div",{ref:n,"data-sidebar":"content",className:se("flex min-h-0 flex-1 flex-col gap-xxxs overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})));RK.displayName="SidebarContent";const TK=P.forwardRef((({className:e,...t},n)=>k.jsx("div",{ref:n,"data-sidebar":"group",className:se("relative flex w-full min-w-0 flex-col px-xxs pt-xs",e),...t})));TK.displayName="SidebarGroup";const OK=P.forwardRef((({className:e,asChild:t=!1,...n},r)=>{const o=t?os:"div";return k.jsx(o,{ref:r,"data-sidebar":"group-label",className:se("flex h-s shrink-0 items-center rounded-md px-xxs py-xxs text-xs font-semibold text-slate-700 opacity-60 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-xl group-data-[collapsible=icon]:opacity-0",e),...n})}));OK.displayName="SidebarGroupLabel";const AK=P.forwardRef((({className:e,asChild:t=!1,...n},r)=>{const o=t?os:"button";return k.jsx(o,{ref:r,"data-sidebar":"group-action",className:se("absolute right-xs top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...n})}));AK.displayName="SidebarGroupAction";const NK=P.forwardRef((({className:e,...t},n)=>k.jsx("div",{ref:n,"data-sidebar":"group-content",className:se("w-full text-sm",e),...t})));NK.displayName="SidebarGroupContent";const DK=P.forwardRef((({className:e,...t},n)=>k.jsx("ul",{ref:n,"data-sidebar":"menu",className:se("flex w-full min-w-0 flex-col p-xs font-semibold text-slate-700 [&_svg]:size-4",e),...t})));DK.displayName="SidebarMenu";const IK=P.forwardRef((({className:e,...t},n)=>k.jsx("li",{ref:n,"data-sidebar":"menu-item",className:se("group/menu-item relative",e),...t})));IK.displayName="SidebarMenuItem";const kK=Ji("peer/menu-button flex w-full items-center gap-xxs overflow-hidden rounded-sm p-xxs text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:text-blue_100 hover:bg-white focus-visible:ring-2 active:bg-white active:text-blue_100 disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-white data-[active=true]:font-medium data-[active=true]:text-blue_100 data-[state=open]:hover:bg-white data-[state=open]:hover:text-blue_100 group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:text-blue_100 hover:bg-white",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-white hover:text-blue_100 hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-s text-sm",sm:"h-m text-xs",lg:"h-l text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),MK=P.forwardRef((({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:o,className:i,...a},l)=>{const u=e?os:"button",{isMobile:s,state:c}=Nm(),d=k.jsx(u,{ref:l,"data-sidebar":"menu-button","data-size":r,"data-active":t,className:se(kK({variant:n,size:r}),i),...a});return o?("string"==typeof o&&(o={children:o}),k.jsxs(yD,{children:[k.jsx(bD,{asChild:!0,children:d}),k.jsx(wD,{side:"right",align:"center",hidden:"collapsed"!==c||s,...o})]})):d}));MK.displayName="SidebarMenuButton";const LK=P.forwardRef((({className:e,asChild:t=!1,showOnHover:n=!1,...r},o)=>{const i=t?os:"button";return k.jsx(i,{ref:o,"data-sidebar":"menu-action",className:se("absolute right-xxxs top-xxs flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-xxxs","peer-data-[size=default]/menu-button:top-xxs","peer-data-[size=lg]/menu-button:top-xs","group-data-[collapsible=icon]:hidden",n&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...r})}));LK.displayName="SidebarMenuAction";const jK=P.forwardRef((({className:e,...t},n)=>k.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:se("pointer-events-none absolute right-xxxs flex h-m min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-xxxs","peer-data-[size=default]/menu-button:top-xxs","peer-data-[size=lg]/menu-button:top-xs","group-data-[collapsible=icon]:hidden",e),...t})));jK.displayName="SidebarMenuBadge";const FK=P.forwardRef((({className:e,showIcon:t=!1,...n},r)=>{const o=P.useMemo((()=>`${Math.floor(40*Math.random())+50}%`),[]);return k.jsxs("div",{ref:r,"data-sidebar":"menu-skeleton",className:se("flex h-8 items-center gap-xxs rounded-md px-xxs",e),...n,children:[t&&k.jsx(nT,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),k.jsx(nT,{className:"h-xxxs max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})}));FK.displayName="SidebarMenuSkeleton";const BK=P.forwardRef((({className:e,...t},n)=>k.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:se("flex min-w-0 translate-x-px flex-col gap-xxxs border-l border-sidebar-border","group-data-[collapsible=icon]:hidden",e),...t})));BK.displayName="SidebarMenuSub";const qK=P.forwardRef((({...e},t)=>k.jsx("li",{ref:t,...e})));qK.displayName="SidebarMenuSubItem";const zK=P.forwardRef((({asChild:e=!1,size:t="md",isActive:n,className:r,...o},i)=>{const a=e?os:"a";return k.jsx(a,{ref:i,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:se("flex h-s min-w-0 -translate-x-px items-center gap-xxs overflow-hidden rounded-sm px-xxs text-sm text-slate-700 outline-none ring-sidebar-ring hover:bg-white hover:text-blue_100 focus-visible:ring-2 active:bg-white active:text-blue_100 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-blue_100","data-[active=true]:bg-white data-[active=true]:text-blue_100","sm"===t&&"text-xs","md"===t&&"text-sm","group-data-[collapsible=icon]:hidden",r),...o})}));zK.displayName="SidebarMenuSubButton";const LD="Switch",[WK,MX]=Sr(LD),[UK,HK]=WK(LD),VK=_e(((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:i,required:a,disabled:l,value:u="on",onCheckedChange:s,...c}=e,[d,f]=tt(null),p=Rt(t,(e=>f(e))),h=ke(!1),m=!d||!!d.closest("form"),[v=!1,g]=Vo({prop:o,defaultProp:i,onChange:s});return z(UK,{scope:n,checked:v,disabled:l},z(it.button,fe({type:"button",role:"switch","aria-checked":v,"aria-required":a,"data-state":jD(v),"data-disabled":l?"":void 0,disabled:l,value:u},c,{ref:p,onClick:ze(e.onClick,(e=>{g((e=>!e)),m&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())}))})),m&&z(YK,{control:d,bubbles:!h.current,name:r,value:u,checked:v,required:a,disabled:l,style:{transform:"translateX(-100%)"}}))})),GK="SwitchThumb",KK=_e(((e,t)=>{const{__scopeSwitch:n,...r}=e,o=HK(GK,n);return z(it.span,fe({"data-state":jD(o.checked),"data-disabled":o.disabled?"":void 0},r,{ref:t}))})),YK=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=ke(null),a=fm(n),l=dm(t);return We((()=>{const e=i.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(a!==n&&o){const t=new Event("click",{bubbles:r});o.call(e,n),e.dispatchEvent(t)}}),[a,n,r]),z("input",fe({type:"checkbox","aria-hidden":!0,defaultChecked:n},o,{tabIndex:-1,ref:i,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function jD(e){return e?"checked":"unchecked"}const FD=VK,XK=KK,QK=P.forwardRef((({className:e,...t},n)=>k.jsx(FD,{className:se("group peer inline-flex h-xs w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background data-[state=checked]:bg-blue_100 data-[state=unchecked]:bg-slate-200","disabled:cursor-not-allowed disabled:!bg-slate-100 md:hover:data-[state=checked]:bg-blue_120 md:hover:data-[state=unchecked]:!bg-slate-300",e),...t,ref:n,children:k.jsx(XK,{className:se("pointer-events-none block size-xxs rounded-full bg-background shadow-lg ring-0 transition-[transform,width] data-[state=checked]:translate-x-[20px] data-[state=unchecked]:translate-x-0",{"md:group-hover:w-[26px] md:group-hover:data-[state=checked]:translate-x-[14px]":!t.disabled,"bg-slate-300":t.disabled})})})));QK.displayName=FD.displayName;const BD="Tabs",[ZK,LX]=Sr(BD,[fc]),qD=fc(),[JK,c$]=ZK(BD),eY=_e(((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:i,orientation:a="horizontal",dir:l,activationMode:u="automatic",...s}=e,c=Gd(l),[d,f]=Vo({prop:r,onChange:o,defaultProp:i});return z(JK,{scope:n,baseId:lo(),value:d,onValueChange:f,orientation:a,dir:c,activationMode:u},z(it.div,fe({dir:c,"data-orientation":a},s,{ref:t})))})),tY="TabsList",nY=_e(((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,i=c$(tY,n),a=qD(n);return z(z_,fe({asChild:!0},a,{orientation:i.orientation,dir:i.dir,loop:r}),z(it.div,fe({role:"tablist","aria-orientation":i.orientation},o,{ref:t})))})),rY="TabsTrigger",oY=_e(((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...i}=e,a=c$(rY,n),l=qD(n),u=zD(a.baseId,r),s=WD(a.baseId,r),c=r===a.value;return z(W_,fe({asChild:!0},l,{focusable:!o,active:c}),z(it.button,fe({type:"button",role:"tab","aria-selected":c,"aria-controls":s,"data-state":c?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:u},i,{ref:t,onMouseDown:ze(e.onMouseDown,(e=>{o||0!==e.button||!1!==e.ctrlKey?e.preventDefault():a.onValueChange(r)})),onKeyDown:ze(e.onKeyDown,(e=>{[" ","Enter"].includes(e.key)&&a.onValueChange(r)})),onFocus:ze(e.onFocus,(()=>{const e="manual"!==a.activationMode;!c&&!o&&e&&a.onValueChange(r)}))})))})),iY="TabsContent",aY=_e(((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:i,...a}=e,l=c$(iY,n),u=zD(l.baseId,r),s=WD(l.baseId,r),c=r===l.value,d=ke(c);return We((()=>{const e=requestAnimationFrame((()=>d.current=!1));return()=>cancelAnimationFrame(e)}),[]),z(Ao,{present:o||c},(({present:n})=>z(it.div,fe({"data-state":c?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":u,hidden:!n,id:s,tabIndex:0},a,{ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0}}),n&&i)))}));function zD(e,t){return`${e}-trigger-${t}`}function WD(e,t){return`${e}-content-${t}`}const sY=eY,UD=nY,HD=oY,VD=aY,jX=sY,lY=P.forwardRef((({className:e,useDefaults:t=!0,...n},r)=>k.jsx(UD,{ref:r,"data-testid":"tabsList",className:t?se("inline-flex items-center justify-center gap-xxs border-b border-slate-200 p-none text-muted-foreground",e):e,...n})));lY.displayName=UD.displayName;const uY=P.forwardRef((({className:e,useDefaults:t=!0,children:n,...r},o)=>k.jsx(HD,{ref:o,className:t?se("inline-flex items-center justify-center whitespace-nowrap p-xxs pb-[calc(theme(spacing.xxs)-2px)] pt-xxs text-basering-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring border-b-2 border-transparent font-semibold focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:border-slate-900","group relative before:absolute before:inset-xxxs before:rounded-sm before:bg-transparent before:transition-colors hover:before:bg-slate-50",e):e,...r,children:k.jsx("span",{className:"relative text-slate-500 group-hover:text-slate-900 group-data-[state=active]:text-slate-900",children:n})})));uY.displayName=HD.displayName;const cY=P.forwardRef((({className:e,...t},n)=>k.jsx(VD,{ref:n,className:se("ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t})));cY.displayName=VD.displayName;const fY=P.forwardRef((({className:e,...t},n)=>k.jsx("table",{ref:n,className:se("w-full caption-bottom text-sm",e),...t})));fY.displayName="Table";const dY=P.forwardRef((({className:e,...t},n)=>k.jsx("thead",{ref:n,className:se("[&_tr]:border-b",e),...t})));dY.displayName="TableHeader";const pY=P.forwardRef((({className:e,...t},n)=>k.jsx("tbody",{ref:n,className:se("[&_tr:last-child]:border-0",e),...t})));pY.displayName="TableBody";const hY=P.forwardRef((({className:e,...t},n)=>k.jsx("tfoot",{ref:n,className:se("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t})));hY.displayName="TableFooter";const vY=P.forwardRef((({className:e,...t},n)=>k.jsx("tr",{ref:n,className:se("border-b bg-background transition-colors hover:bg-gray-100 data-[state=selected]:bg-gray-200 dark:hover:bg-muted dark:data-[state=selected]:bg-muted",e),...t})));vY.displayName="TableRow";const mY=P.forwardRef((({className:e,...t},n)=>k.jsx("th",{ref:n,className:se("h-m bg-inherit px-xs py-xxs text-left align-middle font-normal text-muted-foreground","whitespace-nowrap border-slate-200 text-sm text-slate-500 [&:not(:last-child)]:border-r",e),...t})));mY.displayName="TableHead";const gY=P.forwardRef((({className:e,...t},n)=>k.jsx("td",{ref:n,className:se("bg-inherit p-xs py-xxs align-middle","overflow-hidden truncate text-ellipsis border-slate-200 text-base text-slate-700 [&:not(:last-child)]:border-r",e),...t})));gY.displayName="TableCell";const yY=P.forwardRef((({className:e,...t},n)=>k.jsx("caption",{ref:n,className:se("mt-s text-sm text-muted-foreground",e),...t})));yY.displayName="TableCaption";const bY=(e,t)=>se("flex w-full rounded-m px-4 py-3.5 text-base text-slate-900 outline outline-1 outline-input ring-offset-background transition-all duration-200 ease-in-out placeholder:text-base placeholder:text-muted-foreground placeholder:text-slate-400 hover:outline-2 hover:outline-slate-400 focus-visible:bg-slate-50 focus-visible:text-slate-900 focus-visible:outline-2 focus-visible:outline-blue_120 disabled:cursor-not-allowed disabled:select-none disabled:text-slate-300 disabled:outline-slate-200",{"bg-red_30_17 outline-red-dark":!!e},t),wY=P.forwardRef((({className:e,...t},n)=>{const{error:r}=as();return k.jsx("textarea",{className:bY(!!r,e),ref:n,...t})}));wY.displayName="Textarea";const FX=NG,xY=DG,_Y=IG,$Y=Ji("z-50 overflow-hidden shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",{variants:{size:{default:"rounded-md border text-sm px-3 py-1.5",small:"rounded-md border px-[11px] py-[3px] text-base leading-[16px]"},theme:{default:"bg-popover text-popover-foreground",dark:"bg-slate-900_90 text-slate-50"},defaultVariants:{size:"small",theme:"dark"}}}),GD=P.forwardRef((({className:e,sideOffset:t=1,size:n,theme:r,...o},i)=>k.jsx(_D,{ref:i,sideOffset:t,className:se($Y({size:n,theme:r,className:e})),...o})));GD.displayName=_D.displayName;const BX=({children:e,tooltipText:t,triggerClassname:n,triggerProps:r,...o})=>k.jsxs(xY,{children:[k.jsx(_Y,{className:n,...r,children:e}),t&&k.jsx(GD,{...o,children:t})]}),qX=({accept:e="*",multiple:t,handleUpload:n,disabled:r})=>k.jsx("div",{className:"hidden",children:k.jsx("input",{type:"file","data-button":"input file",accept:e,multiple:t,onChange:({target:e})=>{if(!e.files)return;const t=Array.from(e.files).map((e=>({file:e,objectUrl:URL.createObjectURL(e)})));n(t),e.value=""},onClick:e=>{e.stopPropagation(),r&&e.preventDefault()}})}),zX=({as:e="div",children:t,className:n,...r})=>z(e,{className:se(n),...r},t);function SY(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function CY(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>P.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return P.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=P.createContext(r),i=n.length;n=[...n,r];const a=t=>{var n;const{scope:r,children:a,...l}=t,u=(null==(n=null==r?void 0:r[e])?void 0:n[i])||o,s=P.useMemo((()=>l),Object.values(l));return k.jsx(u.Provider,{value:s,children:a})};return a.displayName=t+"Provider",[a,function(n,a){var l;const u=(null==(l=null==a?void 0:a[e])?void 0:l[i])||o,s=P.useContext(u);if(s)return s;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},EY(r,...t)]}function EY(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return P.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function KD(e){const t=P.useRef(e);return P.useEffect((()=>{t.current=e})),P.useMemo((()=>(...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[])}function PY({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=RY({defaultProp:t,onChange:n}),i=void 0!==e,a=i?e:r,l=KD(n);return[a,P.useCallback((t=>{if(i){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[i,e,o,l])]}function RY({defaultProp:e,onChange:t}){const n=P.useState(e),[r]=n,o=P.useRef(r),i=KD(t);return P.useEffect((()=>{o.current!==r&&(i(r),o.current=r)}),[r,o,i]),n}var qv=null!=globalThis&&globalThis.document?P.useLayoutEffect:()=>{};function rT(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function YD(...e){return t=>{let n=!1;const r=e.map((e=>{const r=rT(e,t);return!n&&"function"==typeof r&&(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():rT(e[t],null)}}}}function XD(...e){return P.useCallback(YD(...e),e)}var QD=P.forwardRef(((e,t)=>{const{children:n,...r}=e,o=P.Children.toArray(n),i=o.find(OY);if(i){const e=i.props.children,n=o.map((t=>t===i?P.Children.count(e)>1?P.Children.only(null):P.isValidElement(e)?e.props.children:null:t));return k.jsx(Ax,{...r,ref:t,children:P.isValidElement(e)?P.cloneElement(e,void 0,n):null})}return k.jsx(Ax,{...r,ref:t,children:n})}));QD.displayName="Slot";var Ax=P.forwardRef(((e,t)=>{const{children:n,...r}=e;if(P.isValidElement(n)){const e=NY(n),o=AY(r,n.props);return n.type!==P.Fragment&&(o.ref=t?YD(t,e):e),P.cloneElement(n,o)}return P.Children.count(n)>1?P.Children.only(null):null}));Ax.displayName="SlotClone";var TY=({children:e})=>k.jsx(k.Fragment,{children:e});function OY(e){return P.isValidElement(e)&&e.type===TY}function AY(e,t){const n={...t};for(const r in t){const 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}}function NY(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var DY=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],f$=DY.reduce(((e,t)=>{const n=P.forwardRef(((e,n)=>{const{asChild:r,...o}=e,i=r?QD:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),k.jsx(i,{...o,ref:n})}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function IY(e,t){return P.useReducer(((e,n)=>t[e][n]??e),e)}var ZD=e=>{const{present:t,children:n}=e,r=kY(t),o="function"==typeof n?n({present:r.isPresent}):P.Children.only(n),i=XD(r.ref,MY(o));return"function"==typeof n||r.isPresent?P.cloneElement(o,{ref:i}):null};function kY(e){const[t,n]=P.useState(),r=P.useRef({}),o=P.useRef(e),i=P.useRef("none"),a=e?"mounted":"unmounted",[l,u]=IY(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return P.useEffect((()=>{const e=hv(r.current);i.current="mounted"===l?e:"none"}),[l]),qv((()=>{const t=r.current,n=o.current;if(n!==e){const r=i.current,a=hv(t);e?u("MOUNT"):"none"===a||"none"===(null==t?void 0:t.display)?u("UNMOUNT"):u(n&&r!==a?"ANIMATION_OUT":"UNMOUNT"),o.current=e}}),[e,u]),qv((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,a=i=>{const a=hv(r.current).includes(i.animationName);if(i.target===t&&a&&(u("ANIMATION_END"),!o.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)}))}},l=e=>{e.target===t&&(i.current=hv(r.current))};return t.addEventListener("animationstart",l),t.addEventListener("animationcancel",a),t.addEventListener("animationend",a),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",l),t.removeEventListener("animationcancel",a),t.removeEventListener("animationend",a)}}u("ANIMATION_END")}),[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:P.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}function hv(e){return(null==e?void 0:e.animationName)||"none"}function MY(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}ZD.displayName="Presence";var LY=P.useId||(()=>{}),jY=0;function FY(e){const[t,n]=P.useState(LY());return qv((()=>{e||n((e=>e??String(jY++)))}),[e]),e||(t?`radix-${t}`:"")}var d$="Collapsible",[BY,WX]=CY(d$),[qY,p$]=BY(d$),JD=P.forwardRef(((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:i,onOpenChange:a,...l}=e,[u=!1,s]=PY({prop:r,defaultProp:o,onChange:a});return k.jsx(qY,{scope:n,disabled:i,contentId:FY(),open:u,onOpenToggle:P.useCallback((()=>s((e=>!e))),[s]),children:k.jsx(f$.div,{"data-state":v$(u),"data-disabled":i?"":void 0,...l,ref:t})})}));JD.displayName=d$;var eI="CollapsibleTrigger",tI=P.forwardRef(((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=p$(eI,n);return k.jsx(f$.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":v$(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:SY(e.onClick,o.onOpenToggle)})}));tI.displayName=eI;var h$="CollapsibleContent",nI=P.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,o=p$(h$,e.__scopeCollapsible);return k.jsx(ZD,{present:n||o.open,children:({present:e})=>k.jsx(zY,{...r,ref:t,present:e})})}));nI.displayName=h$;var zY=P.forwardRef(((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...i}=e,a=p$(h$,n),[l,u]=P.useState(r),s=P.useRef(null),c=XD(t,s),d=P.useRef(0),f=d.current,p=P.useRef(0),h=p.current,m=a.open||l,v=P.useRef(m),g=P.useRef(void 0);return P.useEffect((()=>{const e=requestAnimationFrame((()=>v.current=!1));return()=>cancelAnimationFrame(e)}),[]),qv((()=>{const e=s.current;if(e){g.current=g.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";const t=e.getBoundingClientRect();d.current=t.height,p.current=t.width,v.current||(e.style.transitionDuration=g.current.transitionDuration,e.style.animationName=g.current.animationName),u(r)}}),[a.open,r]),k.jsx(f$.div,{"data-state":v$(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!m,...i,ref:c,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":h?`${h}px`:void 0,...e.style},children:m&&o})}));function v$(e){return e?"open":"closed"}var WY=JD;const UX=WY,HX=tI,VX=nI;export{QY as AlertDialog,f8 as AlertDialogAction,d8 as AlertDialogCancel,a8 as AlertDialogContent,c8 as AlertDialogDescription,l8 as AlertDialogFooter,s8 as AlertDialogHeader,YT as AlertDialogOverlay,i8 as AlertDialogPortal,u8 as AlertDialogTitle,ZY as AlertDialogTrigger,tO as Avatar,rO as AvatarFallback,nO as AvatarImage,Ld as Button,KY as ButtonLoader,x8 as Card,C8 as CardContent,S8 as CardDescription,E8 as CardFooter,_8 as CardHeader,$8 as CardTitle,s5 as Carousel,l5 as CarouselContent,u5 as CarouselItem,f5 as CarouselNext,c5 as CarouselPrevious,Nj as ChartContainer,tX as ChartLegend,kj as ChartLegendContent,Dj as ChartStyle,eX as ChartTooltip,Ij as ChartTooltipContent,S_ as Checkbox,_2 as ChipsItem,Mj as ChipsWrapper,UX as Collapsible,VX as CollapsibleContent,HX as CollapsibleTrigger,RA as Command,iX as CommandDialog,CF as CommandEmpty,EF as CommandGroup,$F as CommandInput,RF as CommandItem,SF as CommandList,PF as CommandSeparator,TF as CommandShortcut,mF as Dialog,oX as DialogClose,EA as DialogContent,_F as DialogDescription,PA as DialogFooter,wF as DialogHeader,CA as DialogOverlay,gF as DialogPortal,xF as DialogTitle,rX as DialogTrigger,dq as Drawer,uX as DrawerClose,hq as DrawerContent,yq as DrawerDescription,mq as DrawerFooter,vq as DrawerHeader,gN as DrawerOverlay,pq as DrawerPortal,gq as DrawerTitle,lX as DrawerTrigger,dX as DropdownMenu,cU as DropdownMenuCheckboxItem,lU as DropdownMenuContent,hX as DropdownMenuGroup,uU as DropdownMenuItem,dU as DropdownMenuLabel,vX as DropdownMenuPortal,gX as DropdownMenuRadioGroup,fU as DropdownMenuRadioItem,pU as DropdownMenuSeparator,hU as DropdownMenuShortcut,mX as DropdownMenuSub,sU as DropdownMenuSubContent,aU as DropdownMenuSubTrigger,pX as DropdownMenuTrigger,bX as Form,dH as FormControl,pH as FormDescription,wX as FormField,cH as FormItem,fH as FormLabel,hH as FormMessage,vH as FormSelect,gH as FormSelectContent,bH as FormSelectGroup,yH as FormSelectItem,wH as FormSelectLabel,xH as FormSelectSeparator,mH as FormSelectTrigger,_H as FormSelectValue,$X as HoverCard,YV as HoverCardContent,CX as HoverCardPortal,SX as HoverCardTrigger,rD as Input,qX as InputFile,s3 as Label,dG as RadioGroup,pG as RadioGroupItem,E3 as Select,lH as SelectActions,iH as SelectCheckboxItem,O3 as SelectContent,uH as SelectFooter,P3 as SelectGroup,N3 as SelectItem,A3 as SelectLabel,oH as SelectMultiTrigger,sH as SelectScrollDownButton,aH as SelectScrollUpButton,D3 as SelectSeparator,T3 as SelectTrigger,R3 as SelectValue,hG as Sheet,RX as SheetClose,pD as SheetContent,mD as SheetDescription,gG as SheetFooter,hD as SheetHeader,dD as SheetOverlay,vG as SheetPortal,vD as SheetTitle,PX as SheetTrigger,wK as Sidebar,RK as SidebarContent,EK as SidebarFooter,TK as SidebarGroup,AK as SidebarGroupAction,NK as SidebarGroupContent,OK as SidebarGroupLabel,CK as SidebarHeader,SK as SidebarInput,$K as SidebarInset,DK as SidebarMenu,LK as SidebarMenuAction,jK as SidebarMenuBadge,MK as SidebarMenuButton,IK as SidebarMenuItem,FK as SidebarMenuSkeleton,BK as SidebarMenuSub,zK as SidebarMenuSubButton,qK as SidebarMenuSubItem,bK as SidebarProvider,_K as SidebarRail,PK as SidebarSeparator,xK as SidebarTrigger,nT as Skeleton,QK as Switch,fY as Table,pY as TableBody,yY as TableCaption,gY as TableCell,hY as TableFooter,mY as TableHead,dY as TableHeader,vY as TableRow,jX as Tabs,cY as TabsContent,lY as TabsList,uY as TabsTrigger,wY as Textarea,xY as Tooltip,GD as TooltipContent,FX as TooltipProvider,_Y as TooltipTrigger,BX as TooltipWrapper,kx as buttonVariants,se as cn,bY as getTextareaClassName,zX as styledElement,Om as uiSlice,Qv as useCarousel,DX as useDeviceType,NX as useDeviceTypeUpdater,as as useFormField,kX as useIsDesktop,dK as useIsMobile,IX as useIsTablet,Nm as useSidebar};
|