lsp-uikit 1.0.9 → 1.0.11

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/dist/index.js CHANGED
@@ -1,3 +1,2 @@
1
- "use client";
2
1
  import{jsx as e,Fragment as t,jsxs as n}from"react/jsx-runtime";import*as r from"react";import o,{useLayoutEffect as a,useEffect as i,useState as s,forwardRef as l}from"react";import{clsx as c}from"clsx";import{Loader2 as d,ChevronDown as u,ChevronRight as f,ChevronLeft as p,Check as m,CalendarIcon as h,X as g,Circle as v,Copy as b,CircleAlert as w,ChevronUp as y,PanelLeft as x,MoveRight as N,Ban as C}from"lucide-react";import*as k from"react-dom";import R from"react-dom";import{DayPicker as E}from"react-day-picker";import*as _ from"recharts";import S from"copy-to-clipboard";function P(e){const t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):"number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?new Date(e):new Date(NaN)}function T(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}const M=6048e5;let D={};function O(){return D}function A(e){D=e}function I(e,t){const n=O(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=P(e),a=o.getDay(),i=(a<r?7:0)+a-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function L(e){return I(e,{weekStartsOn:1})}function F(e){const t=P(e),n=t.getFullYear(),r=T(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=L(r),a=T(e,0);a.setFullYear(n,0,4),a.setHours(0,0,0,0);const i=L(a);return t.getTime()>=o.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function z(e){const t=P(e);return t.setHours(0,0,0,0),t}function W(e){const t=P(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function H(e){if(!(t=e,t instanceof Date||"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t)||"number"==typeof e))return!1;var t;const n=P(e);return!isNaN(Number(n))}const G={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function j(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const K={date:j({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:j({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:j({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},B={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function V(e){return(t,n)=>{let r;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,o=n?.width?String(n.width):t;r=e.formattingValues[o]||e.formattingValues[t]}else{const t=e.defaultWidth,o=n?.width?String(n.width):e.defaultWidth;r=e.values[o]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}const $={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:V({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:V({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:V({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:V({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:V({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function q(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;const i=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n;return}(s,(e=>e.test(i))):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n;return}(s,(e=>e.test(i)));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;return{value:c,rest:t.slice(i.length)}}}function Y(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],a=t.match(e.parsePattern);if(!a)return null;let i=e.valueCallback?e.valueCallback(a[0]):a[0];i=n.valueCallback?n.valueCallback(i):i;return{value:i,rest:t.slice(o.length)}}}const U={ordinalNumber:Y({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:q({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:q({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:q({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:q({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:q({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},X={code:"en-US",formatDistance:(e,t,n)=>{let r;const o=G[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:K,formatRelative:(e,t,n,r)=>B[e],localize:$,match:U,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Q(e){const t=P(e),n=function(e,t){const n=z(e),r=z(t),o=+n-W(n),a=+r-W(r);return Math.round((o-a)/864e5)}(t,function(e){const t=P(e),n=T(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}(t));return n+1}function Z(e){const t=P(e),n=+L(t)-+function(e){const t=F(e),n=T(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),L(n)}(t);return Math.round(n/M)+1}function J(e,t){const n=P(e),r=n.getFullYear(),o=O(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,i=T(e,0);i.setFullYear(r+1,0,a),i.setHours(0,0,0,0);const s=I(i,t),l=T(e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const c=I(l,t);return n.getTime()>=s.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function ee(e,t){const n=P(e),r=+I(n,t)-+function(e,t){const n=O(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=J(e,t),a=T(e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),I(a,t)}(n,t);return Math.round(r/M)+1}function te(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const ne={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return te("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):te(n+1,2)},d:(e,t)=>te(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>te(e.getHours()%12||12,t.length),H:(e,t)=>te(e.getHours(),t.length),m:(e,t)=>te(e.getMinutes(),t.length),s:(e,t)=>te(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return te(Math.trunc(r*Math.pow(10,n-3)),t.length)}},re="midnight",oe="noon",ae="morning",ie="afternoon",se="evening",le="night",ce={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:"year"})}return ne.y(e,t)},Y:function(e,t,n,r){const o=J(e,r),a=o>0?o:1-o;if("YY"===t){return te(a%100,2)}return"Yo"===t?n.ordinalNumber(a,{unit:"year"}):te(a,t.length)},R:function(e,t){return te(F(e),t.length)},u:function(e,t){return te(e.getFullYear(),t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return te(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return te(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return ne.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return te(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=ee(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):te(o,t.length)},I:function(e,t,n){const r=Z(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):te(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):ne.d(e,t)},D:function(e,t,n){const r=Q(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):te(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return te(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return te(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return te(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(o=12===r?oe:0===r?re:r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(o=r>=17?se:r>=12?ie:r>=4?ae:le,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return ne.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):ne.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):te(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):te(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):ne.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):ne.s(e,t)},S:function(e,t){return ne.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return ue(r);case"XXXX":case"XX":return fe(r);default:return fe(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return ue(r);case"xxxx":case"xx":return fe(r);default:return fe(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+de(r,":");default:return"GMT"+fe(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+de(r,":");default:return"GMT"+fe(r,":")}},t:function(e,t,n){return te(Math.trunc(e.getTime()/1e3),t.length)},T:function(e,t,n){return te(e.getTime(),t.length)}};function de(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),a=r%60;return 0===a?n+String(o):n+String(o)+t+te(a,2)}function ue(e,t){if(e%60==0){return(e>0?"-":"+")+te(Math.abs(e)/60,2)}return fe(e,t)}function fe(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+te(Math.trunc(r/60),2)+t+te(r%60,2)}const pe=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},me=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},he={p:me,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return pe(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;default:a=t.dateTime({width:"full"})}return a.replace("{{date}}",pe(r,t)).replace("{{time}}",me(o,t))}},ge=/^D+$/,ve=/^Y+$/,be=["D","DD","YY","YYYY"];const we=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ye=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,xe=/^'([^]*?)'?$/,Ne=/''/g,Ce=/[a-zA-Z]/;function ke(e,t,n){const r=O(),o=r.locale??X,a=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=P(e);if(!H(s))throw new RangeError("Invalid time value");let l=t.match(ye).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,he[t])(e,o.formatLong)}return e})).join("").match(we).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:Re(e)};if(ce[t])return{isToken:!0,value:e};if(t.match(Ce))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const c={firstWeekContainsDate:a,weekStartsOn:i,locale:o};return l.map((n=>{if(!n.isToken)return n.value;const r=n.value;(function(e){return ve.test(e)}(r)||function(e){return ge.test(e)}(r))&&function(e,t,n){const r=function(e,t,n){const r="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,n);if(console.warn(r),be.includes(e))throw new RangeError(r)}(r,t,String(e));return(0,ce[r[0]])(s,r,o.localize,c)})).join("")}function Re(e){const t=e.match(xe);return t?t[1].replace(Ne,"'"):e}function Ee(e,t,n){return+I(e,n)==+I(t,n)}function _e(e,t){return function(e,t){const n=P(e);return isNaN(t)?T(e,NaN):t?(n.setDate(n.getDate()+t),n):n}(e,-t)}function Se(e,t){if(void 0!==e.one&&1===t)return e.one;const n=t%10,r=t%100;return 1===n&&11!==r?e.singularNominative.replace("{{count}}",String(t)):n>=2&&n<=4&&(r<10||r>20)?e.singularGenitive.replace("{{count}}",String(t)):e.pluralGenitive.replace("{{count}}",String(t))}function Pe(e){return(t,n)=>n?.addSuffix?n.comparison&&n.comparison>0?e.future?Se(e.future,t):"через "+Se(e.regular,t):e.past?Se(e.past,t):Se(e.regular,t)+" назад":Se(e.regular,t)}const Te={lessThanXSeconds:Pe({regular:{one:"меньше секунды",singularNominative:"меньше {{count}} секунды",singularGenitive:"меньше {{count}} секунд",pluralGenitive:"меньше {{count}} секунд"},future:{one:"меньше, чем через секунду",singularNominative:"меньше, чем через {{count}} секунду",singularGenitive:"меньше, чем через {{count}} секунды",pluralGenitive:"меньше, чем через {{count}} секунд"}}),xSeconds:Pe({regular:{singularNominative:"{{count}} секунда",singularGenitive:"{{count}} секунды",pluralGenitive:"{{count}} секунд"},past:{singularNominative:"{{count}} секунду назад",singularGenitive:"{{count}} секунды назад",pluralGenitive:"{{count}} секунд назад"},future:{singularNominative:"через {{count}} секунду",singularGenitive:"через {{count}} секунды",pluralGenitive:"через {{count}} секунд"}}),halfAMinute:(e,t)=>t?.addSuffix?t.comparison&&t.comparison>0?"через полминуты":"полминуты назад":"полминуты",lessThanXMinutes:Pe({regular:{one:"меньше минуты",singularNominative:"меньше {{count}} минуты",singularGenitive:"меньше {{count}} минут",pluralGenitive:"меньше {{count}} минут"},future:{one:"меньше, чем через минуту",singularNominative:"меньше, чем через {{count}} минуту",singularGenitive:"меньше, чем через {{count}} минуты",pluralGenitive:"меньше, чем через {{count}} минут"}}),xMinutes:Pe({regular:{singularNominative:"{{count}} минута",singularGenitive:"{{count}} минуты",pluralGenitive:"{{count}} минут"},past:{singularNominative:"{{count}} минуту назад",singularGenitive:"{{count}} минуты назад",pluralGenitive:"{{count}} минут назад"},future:{singularNominative:"через {{count}} минуту",singularGenitive:"через {{count}} минуты",pluralGenitive:"через {{count}} минут"}}),aboutXHours:Pe({regular:{singularNominative:"около {{count}} часа",singularGenitive:"около {{count}} часов",pluralGenitive:"около {{count}} часов"},future:{singularNominative:"приблизительно через {{count}} час",singularGenitive:"приблизительно через {{count}} часа",pluralGenitive:"приблизительно через {{count}} часов"}}),xHours:Pe({regular:{singularNominative:"{{count}} час",singularGenitive:"{{count}} часа",pluralGenitive:"{{count}} часов"}}),xDays:Pe({regular:{singularNominative:"{{count}} день",singularGenitive:"{{count}} дня",pluralGenitive:"{{count}} дней"}}),aboutXWeeks:Pe({regular:{singularNominative:"около {{count}} недели",singularGenitive:"около {{count}} недель",pluralGenitive:"около {{count}} недель"},future:{singularNominative:"приблизительно через {{count}} неделю",singularGenitive:"приблизительно через {{count}} недели",pluralGenitive:"приблизительно через {{count}} недель"}}),xWeeks:Pe({regular:{singularNominative:"{{count}} неделя",singularGenitive:"{{count}} недели",pluralGenitive:"{{count}} недель"}}),aboutXMonths:Pe({regular:{singularNominative:"около {{count}} месяца",singularGenitive:"около {{count}} месяцев",pluralGenitive:"около {{count}} месяцев"},future:{singularNominative:"приблизительно через {{count}} месяц",singularGenitive:"приблизительно через {{count}} месяца",pluralGenitive:"приблизительно через {{count}} месяцев"}}),xMonths:Pe({regular:{singularNominative:"{{count}} месяц",singularGenitive:"{{count}} месяца",pluralGenitive:"{{count}} месяцев"}}),aboutXYears:Pe({regular:{singularNominative:"около {{count}} года",singularGenitive:"около {{count}} лет",pluralGenitive:"около {{count}} лет"},future:{singularNominative:"приблизительно через {{count}} год",singularGenitive:"приблизительно через {{count}} года",pluralGenitive:"приблизительно через {{count}} лет"}}),xYears:Pe({regular:{singularNominative:"{{count}} год",singularGenitive:"{{count}} года",pluralGenitive:"{{count}} лет"}}),overXYears:Pe({regular:{singularNominative:"больше {{count}} года",singularGenitive:"больше {{count}} лет",pluralGenitive:"больше {{count}} лет"},future:{singularNominative:"больше, чем через {{count}} год",singularGenitive:"больше, чем через {{count}} года",pluralGenitive:"больше, чем через {{count}} лет"}}),almostXYears:Pe({regular:{singularNominative:"почти {{count}} год",singularGenitive:"почти {{count}} года",pluralGenitive:"почти {{count}} лет"},future:{singularNominative:"почти через {{count}} год",singularGenitive:"почти через {{count}} года",pluralGenitive:"почти через {{count}} лет"}})},Me={date:j({formats:{full:"EEEE, d MMMM y 'г.'",long:"d MMMM y 'г.'",medium:"d MMM y 'г.'",short:"dd.MM.y"},defaultWidth:"full"}),time:j({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:j({formats:{any:"{{date}}, {{time}}"},defaultWidth:"any"})},De=["воскресенье","понедельник","вторник","среду","четверг","пятницу","субботу"];function Oe(e){const t=De[e];return 2===e?"'во "+t+" в' p":"'в "+t+" в' p"}const Ae={lastWeek:(e,t,n)=>{const r=e.getDay();return Ee(e,t,n)?Oe(r):function(e){const t=De[e];switch(e){case 0:return"'в прошлое "+t+" в' p";case 1:case 2:case 4:return"'в прошлый "+t+" в' p";case 3:case 5:case 6:return"'в прошлую "+t+" в' p"}}(r)},yesterday:"'вчера в' p",today:"'сегодня в' p",tomorrow:"'завтра в' p",nextWeek:(e,t,n)=>{const r=e.getDay();return Ee(e,t,n)?Oe(r):function(e){const t=De[e];switch(e){case 0:return"'в следующее "+t+" в' p";case 1:case 2:case 4:return"'в следующий "+t+" в' p";case 3:case 5:case 6:return"'в следующую "+t+" в' p"}}(r)},other:"P"},Ie={ordinalNumber:(e,t)=>{const n=Number(e),r=t?.unit;let o;return o="date"===r?"-е":"week"===r||"minute"===r||"second"===r?"-я":"-й",n+o},era:V({values:{narrow:["до н.э.","н.э."],abbreviated:["до н. э.","н. э."],wide:["до нашей эры","нашей эры"]},defaultWidth:"wide"}),quarter:V({values:{narrow:["1","2","3","4"],abbreviated:["1-й кв.","2-й кв.","3-й кв.","4-й кв."],wide:["1-й квартал","2-й квартал","3-й квартал","4-й квартал"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:V({values:{narrow:["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],abbreviated:["янв.","фев.","март","апр.","май","июнь","июль","авг.","сент.","окт.","нояб.","дек."],wide:["январь","февраль","март","апрель","май","июнь","июль","август","сентябрь","октябрь","ноябрь","декабрь"]},defaultWidth:"wide",formattingValues:{narrow:["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],abbreviated:["янв.","фев.","мар.","апр.","мая","июн.","июл.","авг.","сент.","окт.","нояб.","дек."],wide:["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"]},defaultFormattingWidth:"wide"}),day:V({values:{narrow:["В","П","В","С","Ч","П","С"],short:["вс","пн","вт","ср","чт","пт","сб"],abbreviated:["вск","пнд","втр","срд","чтв","птн","суб"],wide:["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"]},defaultWidth:"wide"}),dayPeriod:V({values:{narrow:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утро",afternoon:"день",evening:"веч.",night:"ночь"},abbreviated:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утро",afternoon:"день",evening:"веч.",night:"ночь"},wide:{am:"ДП",pm:"ПП",midnight:"полночь",noon:"полдень",morning:"утро",afternoon:"день",evening:"вечер",night:"ночь"}},defaultWidth:"any",formattingValues:{narrow:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утра",afternoon:"дня",evening:"веч.",night:"ночи"},abbreviated:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утра",afternoon:"дня",evening:"веч.",night:"ночи"},wide:{am:"ДП",pm:"ПП",midnight:"полночь",noon:"полдень",morning:"утра",afternoon:"дня",evening:"вечера",night:"ночи"}},defaultFormattingWidth:"wide"})},Le={ordinalNumber:Y({matchPattern:/^(\d+)(-?(е|я|й|ое|ье|ая|ья|ый|ой|ий|ый))?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:q({matchPatterns:{narrow:/^((до )?н\.?\s?э\.?)/i,abbreviated:/^((до )?н\.?\s?э\.?)/i,wide:/^(до нашей эры|нашей эры|наша эра)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^д/i,/^н/i]},defaultParseWidth:"any"}),quarter:q({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234](-?[ыои]?й?)? кв.?/i,wide:/^[1234](-?[ыои]?й?)? квартал/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:q({matchPatterns:{narrow:/^[яфмаисонд]/i,abbreviated:/^(янв|фев|март?|апр|ма[йя]|июн[ья]?|июл[ья]?|авг|сент?|окт|нояб?|дек)\.?/i,wide:/^(январ[ья]|феврал[ья]|марта?|апрел[ья]|ма[йя]|июн[ья]|июл[ья]|августа?|сентябр[ья]|октябр[ья]|октябр[ья]|ноябр[ья]|декабр[ья])/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^я/i,/^ф/i,/^м/i,/^а/i,/^м/i,/^и/i,/^и/i,/^а/i,/^с/i,/^о/i,/^н/i,/^я/i],any:[/^я/i,/^ф/i,/^мар/i,/^ап/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^ав/i,/^с/i,/^о/i,/^н/i,/^д/i]},defaultParseWidth:"any"}),day:q({matchPatterns:{narrow:/^[впсч]/i,short:/^(вс|во|пн|по|вт|ср|чт|че|пт|пя|сб|су)\.?/i,abbreviated:/^(вск|вос|пнд|пон|втр|вто|срд|сре|чтв|чет|птн|пят|суб).?/i,wide:/^(воскресень[ея]|понедельника?|вторника?|сред[аы]|четверга?|пятниц[аы]|суббот[аы])/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^в/i,/^п/i,/^в/i,/^с/i,/^ч/i,/^п/i,/^с/i],any:[/^в[ос]/i,/^п[он]/i,/^в/i,/^ср/i,/^ч/i,/^п[ят]/i,/^с[уб]/i]},defaultParseWidth:"any"}),dayPeriod:q({matchPatterns:{narrow:/^([дп]п|полн\.?|полд\.?|утр[оа]|день|дня|веч\.?|ноч[ьи])/i,abbreviated:/^([дп]п|полн\.?|полд\.?|утр[оа]|день|дня|веч\.?|ноч[ьи])/i,wide:/^([дп]п|полночь|полдень|утр[оа]|день|дня|вечера?|ноч[ьи])/i},defaultMatchWidth:"wide",parsePatterns:{any:{am:/^дп/i,pm:/^пп/i,midnight:/^полн/i,noon:/^полд/i,morning:/^у/i,afternoon:/^д[ен]/i,evening:/^в/i,night:/^н/i}},defaultParseWidth:"any"})},Fe={code:"ru",formatDistance:(e,t,n)=>Te[e](t,n),formatLong:Me,formatRelative:(e,t,n,r)=>{const o=Ae[e];return"function"==typeof o?o(t,n,r):o},localize:Ie,match:Le,options:{weekStartsOn:1,firstWeekContainsDate:1}};function ze(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function We(...e){return t=>{let n=!1;const r=e.map((e=>{const r=ze(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():ze(e[t],null)}}}}function He(...e){return r.useCallback(We(...e),e)}var Ge=r.forwardRef(((t,n)=>{const{children:o,...a}=t,i=r.Children.toArray(o),s=i.find(Be);if(s){const t=s.props.children,o=i.map((e=>e===s?r.Children.count(t)>1?r.Children.only(null):r.isValidElement(t)?t.props.children:null:e));return e(je,{...a,ref:n,children:r.isValidElement(t)?r.cloneElement(t,void 0,o):null})}return e(je,{...a,ref:n,children:o})}));Ge.displayName="Slot";var je=r.forwardRef(((e,t)=>{const{children:n,...o}=e;if(r.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n),a=function(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{a(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}(o,n.props);return n.type!==r.Fragment&&(a.ref=t?We(t,e):e),r.cloneElement(n,a)}return r.Children.count(n)>1?r.Children.only(null):null}));je.displayName="SlotClone";var Ke=({children:n})=>e(t,{children:n});function Be(e){return r.isValidElement(e)&&e.type===Ke}const Ve=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,$e=c,qe=(e,t)=>n=>{var r;if(null==(null==t?void 0:t.variants))return $e(e,null==n?void 0:n.class,null==n?void 0:n.className);const{variants:o,defaultVariants:a}=t,i=Object.keys(o).map((e=>{const t=null==n?void 0:n[e],r=null==a?void 0:a[e];if(null===t)return null;const i=Ve(t)||Ve(r);return o[e][i]})),s=n&&Object.entries(n).reduce(((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e}),{}),l=null==t||null===(r=t.compoundVariants)||void 0===r?void 0:r.reduce(((e,t)=>{let{class:n,className:r,...o}=t;return Object.entries(o).every((e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...a,...s}[t]):{...a,...s}[t]===n}))?[...e,n,r]:e}),[]);return $e(e,i,l,null==n?void 0:n.class,null==n?void 0:n.className)},Ye=e=>{const t=Ze(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{const n=e.split("-");return""===n[0]&&1!==n.length&&n.shift(),Ue(n,t)||Qe(e)},getConflictingClassGroupIds:(e,t)=>{const o=n[e]||[];return t&&r[e]?[...o,...r[e]]:o}}},Ue=(e,t)=>{if(0===e.length)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Ue(e.slice(1),r):void 0;if(o)return o;if(0===t.validators.length)return;const a=e.join("-");return t.validators.find((({validator:e})=>e(a)))?.classGroupId},Xe=/^\[(.+)\]$/,Qe=e=>{if(Xe.test(e)){const t=Xe.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Ze=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return nt(Object.entries(e.classGroups),n).forEach((([e,n])=>{Je(n,r,e,t)})),r},Je=(e,t,n,r)=>{e.forEach((e=>{if("string"!=typeof e){if("function"==typeof e)return tt(e)?void Je(e(r),t,n,r):void t.validators.push({validator:e,classGroupId:n});Object.entries(e).forEach((([e,o])=>{Je(o,et(t,e),n,r)}))}else{(""===e?t:et(t,e)).classGroupId=n}}))},et=(e,t)=>{let n=e;return t.split("-").forEach((e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)})),n},tt=e=>e.isThemeGetter,nt=(e,t)=>t?e.map((([e,n])=>[e,n.map((e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map((([e,n])=>[t+e,n]))):e))])):e,rt=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(o,a)=>{n.set(o,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);return void 0!==t?t:void 0!==(t=r.get(e))?(o(e,t),t):void 0},set(e,t){n.has(e)?n.set(e,t):o(e,t)}}},ot=e=>{const{separator:t,experimentalParseClassName:n}=e,r=1===t.length,o=t[0],a=t.length,i=e=>{const n=[];let i,s=0,l=0;for(let c=0;c<e.length;c++){let d=e[c];if(0===s){if(d===o&&(r||e.slice(c,c+a)===t)){n.push(e.slice(l,c)),l=c+a;continue}if("/"===d){i=c;continue}}"["===d?s++:"]"===d&&s--}const c=0===n.length?e:e.substring(l),d=c.startsWith("!");return{modifiers:n,hasImportantModifier:d,baseClassName:d?c.substring(1):c,maybePostfixModifierPosition:i&&i>l?i-l:void 0}};return n?e=>n({className:e,parseClassName:i}):i},at=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach((e=>{"["===e[0]?(t.push(...n.sort(),e),n=[]):n.push(e)})),t.push(...n.sort()),t},it=/\s+/;function st(){let e,t,n=0,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=lt(e))&&(r&&(r+=" "),r+=t);return r}const lt=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=lt(e[r]))&&(n&&(n+=" "),n+=t);return n};function ct(e,...t){let n,r,o,a=function(s){const l=t.reduce(((e,t)=>t(e)),e());return n=(e=>({cache:rt(e.cacheSize),parseClassName:ot(e),...Ye(e)}))(l),r=n.cache.get,o=n.cache.set,a=i,i(s)};function i(e){const t=r(e);if(t)return t;const a=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,a=[],i=e.trim().split(it);let s="";for(let e=i.length-1;e>=0;e-=1){const t=i[e],{modifiers:l,hasImportantModifier:c,baseClassName:d,maybePostfixModifierPosition:u}=n(t);let f=Boolean(u),p=r(f?d.substring(0,u):d);if(!p){if(!f){s=t+(s.length>0?" "+s:s);continue}if(p=r(d),!p){s=t+(s.length>0?" "+s:s);continue}f=!1}const m=at(l).join(":"),h=c?m+"!":m,g=h+p;if(a.includes(g))continue;a.push(g);const v=o(p,f);for(let e=0;e<v.length;++e){const t=v[e];a.push(h+t)}s=t+(s.length>0?" "+s:s)}return s})(e,n);return o(e,a),a}return function(){return a(st.apply(null,arguments))}}const dt=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},ut=/^\[(?:([a-z-]+):)?(.+)\]$/i,ft=/^\d+\/\d+$/,pt=new Set(["px","full","screen"]),mt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ht=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,gt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,vt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,bt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,wt=e=>xt(e)||pt.has(e)||ft.test(e),yt=e=>At(e,"length",It),xt=e=>Boolean(e)&&!Number.isNaN(Number(e)),Nt=e=>At(e,"number",xt),Ct=e=>Boolean(e)&&Number.isInteger(Number(e)),kt=e=>e.endsWith("%")&&xt(e.slice(0,-1)),Rt=e=>ut.test(e),Et=e=>mt.test(e),_t=new Set(["length","size","percentage"]),St=e=>At(e,_t,Lt),Pt=e=>At(e,"position",Lt),Tt=new Set(["image","url"]),Mt=e=>At(e,Tt,zt),Dt=e=>At(e,"",Ft),Ot=()=>!0,At=(e,t,n)=>{const r=ut.exec(e);return!!r&&(r[1]?"string"==typeof t?r[1]===t:t.has(r[1]):n(r[2]))},It=e=>ht.test(e)&&!gt.test(e),Lt=()=>!1,Ft=e=>vt.test(e),zt=e=>bt.test(e),Wt=ct((()=>{const e=dt("colors"),t=dt("spacing"),n=dt("blur"),r=dt("brightness"),o=dt("borderColor"),a=dt("borderRadius"),i=dt("borderSpacing"),s=dt("borderWidth"),l=dt("contrast"),c=dt("grayscale"),d=dt("hueRotate"),u=dt("invert"),f=dt("gap"),p=dt("gradientColorStops"),m=dt("gradientColorStopPositions"),h=dt("inset"),g=dt("margin"),v=dt("opacity"),b=dt("padding"),w=dt("saturate"),y=dt("scale"),x=dt("sepia"),N=dt("skew"),C=dt("space"),k=dt("translate"),R=()=>["auto",Rt,t],E=()=>[Rt,t],_=()=>["",wt,yt],S=()=>["auto",xt,Rt],P=()=>["","0",Rt],T=()=>[xt,Rt];return{cacheSize:500,separator:":",theme:{colors:[Ot],spacing:[wt,yt],blur:["none","",Et,Rt],brightness:T(),borderColor:[e],borderRadius:["none","","full",Et,Rt],borderSpacing:E(),borderWidth:_(),contrast:T(),grayscale:P(),hueRotate:T(),invert:P(),gap:E(),gradientColorStops:[e],gradientColorStopPositions:[kt,yt],inset:R(),margin:R(),opacity:T(),padding:E(),saturate:T(),scale:T(),sepia:P(),skew:T(),space:E(),translate:E()},classGroups:{aspect:[{aspect:["auto","square","video",Rt]}],container:["container"],columns:[{columns:[Et]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",Rt]}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ct,Rt]}],basis:[{basis:R()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Rt]}],grow:[{grow:P()}],shrink:[{shrink:P()}],order:[{order:["first","last","none",Ct,Rt]}],"grid-cols":[{"grid-cols":[Ot]}],"col-start-end":[{col:["auto",{span:["full",Ct,Rt]},Rt]}],"col-start":[{"col-start":S()}],"col-end":[{"col-end":S()}],"grid-rows":[{"grid-rows":[Ot]}],"row-start-end":[{row:["auto",{span:[Ct,Rt]},Rt]}],"row-start":[{"row-start":S()}],"row-end":[{"row-end":S()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Rt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Rt]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal","start","end","center","between","around","evenly","stretch"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Rt,t]}],"min-w":[{"min-w":[Rt,t,"min","max","fit"]}],"max-w":[{"max-w":[Rt,t,"none","full","min","max","fit","prose",{screen:[Et]},Et]}],h:[{h:[Rt,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Rt,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Rt,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Rt,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Et,yt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Nt]}],"font-family":[{font:[Ot]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Rt]}],"line-clamp":[{"line-clamp":["none",xt,Nt]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",wt,Rt]}],"list-image":[{"list-image":["none",Rt]}],"list-style-type":[{list:["none","disc","decimal",Rt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","none","wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",wt,yt]}],"underline-offset":[{"underline-offset":["auto",wt,Rt]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Rt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Rt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",Pt]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",St]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Mt]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:["solid","dashed","dotted","double","none","hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["","solid","dashed","dotted","double","none"]}],"outline-offset":[{"outline-offset":[wt,Rt]}],"outline-w":[{outline:[wt,yt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:_()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[wt,yt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Et,Dt]}],"shadow-color":[{shadow:[Ot]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Et,Rt]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[u]}],saturate:[{saturate:[w]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Rt]}],duration:[{duration:T()}],ease:[{ease:["linear","in","out","in-out",Rt]}],delay:[{delay:T()}],animate:[{animate:["none","spin","ping","pulse","bounce",Rt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[y]}],"scale-x":[{"scale-x":[y]}],"scale-y":[{"scale-y":[y]}],rotate:[{rotate:[Ct,Rt]}],"translate-x":[{"translate-x":[k]}],"translate-y":[{"translate-y":[k]}],"skew-x":[{"skew-x":[N]}],"skew-y":[{"skew-y":[N]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Rt]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Rt]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Rt]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[wt,yt,Nt]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}));function Ht(...e){return Wt(c(e))}const Gt=qe("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/60",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",clear:"p-0"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3 py-2",lg:"h-11 rounded-md px-8",icon:"h-8 w-8 [&_svg]:size-[18px]"}},defaultVariants:{variant:"default",size:"sm"}}),jt=r.forwardRef((({className:t,variant:r,size:o,isLoading:a,asChild:i=!1,...s},l)=>n(i?Ge:"button",{disabled:a||s.disabled,className:Ht(Gt({variant:r,size:o,className:t})),ref:l,...s,children:[a&&e(d,{className:"mr-2 h-4 w-4 animate-spin"}),s.children]})));function Kt(t,n=[]){let o=[];const a=()=>{const e=o.map((e=>r.createContext(e)));return function(n){const o=n?.[t]||e;return r.useMemo((()=>({[`__scope${t}`]:{...n,[t]:o}})),[n,o])}};return a.scopeName=t,[function(n,a){const i=r.createContext(a),s=o.length;o=[...o,a];const l=n=>{const{scope:o,children:a,...l}=n,c=o?.[t]?.[s]||i,d=r.useMemo((()=>l),Object.values(l));return e(c.Provider,{value:d,children:a})};return l.displayName=n+"Provider",[l,function(e,o){const l=o?.[t]?.[s]||i,c=r.useContext(l);if(c)return c;if(void 0!==a)return a;throw new Error(`\`${e}\` must be used within \`${n}\``)}]},Bt(a,...n)]}function Bt(...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 o=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return r.useMemo((()=>({[`__scope${t.scopeName}`]:o})),[o])}};return n.scopeName=t.scopeName,n}function Vt(t){const n=t+"CollectionProvider",[r,a]=Kt(n),[i,s]=r(n,{collectionRef:{current:null},itemMap:new Map}),l=t=>{const{scope:n,children:r}=t,a=o.useRef(null),s=o.useRef(new Map).current;return e(i,{scope:n,itemMap:s,collectionRef:a,children:r})};l.displayName=n;const c=t+"CollectionSlot",d=o.forwardRef(((t,n)=>{const{scope:r,children:o}=t,a=He(n,s(c,r).collectionRef);return e(Ge,{ref:a,children:o})}));d.displayName=c;const u=t+"CollectionItemSlot",f="data-radix-collection-item",p=o.forwardRef(((t,n)=>{const{scope:r,children:a,...i}=t,l=o.useRef(null),c=He(n,l),d=s(u,r);return o.useEffect((()=>(d.itemMap.set(l,{ref:l,...i}),()=>{d.itemMap.delete(l)}))),e(Ge,{[f]:"",ref:c,children:a})}));return p.displayName=u,[{Provider:l,Slot:d,ItemSlot:p},function(e){const n=s(t+"CollectionConsumer",e);return o.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${f}]`));return Array.from(n.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[n.collectionRef,n.itemMap])},a]}function $t(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function qt(e){const t=r.useRef(e);return r.useEffect((()=>{t.current=e})),r.useMemo((()=>(...e)=>t.current?.(...e)),[])}function Yt({prop:e,defaultProp:t,onChange:n=()=>{}}){const[o,a]=function({defaultProp:e,onChange:t}){const n=r.useState(e),[o]=n,a=r.useRef(o),i=qt(t);return r.useEffect((()=>{a.current!==o&&(i(o),a.current=o)}),[o,a,i]),n}({defaultProp:t,onChange:n}),i=void 0!==e,s=i?e:o,l=qt(n);return[s,r.useCallback((t=>{if(i){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else a(t)}),[i,e,a,l])]}jt.displayName="Button";var Ut=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((t,n)=>{const o=r.forwardRef(((t,r)=>{const{asChild:o,...a}=t,i=o?Ge:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),e(i,{...a,ref:r})}));return o.displayName=`Primitive.${n}`,{...t,[n]:o}}),{});function Xt(e,t){e&&k.flushSync((()=>e.dispatchEvent(t)))}var Qt=Boolean(globalThis?.document)?r.useLayoutEffect:()=>{};var Zt=e=>{const{present:t,children:n}=e,o=function(e){const[t,n]=r.useState(),o=r.useRef({}),a=r.useRef(e),i=r.useRef("none"),s=e?"mounted":"unmounted",[l,c]=function(e,t){return r.useReducer(((e,n)=>t[e][n]??e),e)}(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return r.useEffect((()=>{const e=Jt(o.current);i.current="mounted"===l?e:"none"}),[l]),Qt((()=>{const t=o.current,n=a.current;if(n!==e){const r=i.current,o=Jt(t);if(e)c("MOUNT");else if("none"===o||"none"===t?.display)c("UNMOUNT");else{c(n&&r!==o?"ANIMATION_OUT":"UNMOUNT")}a.current=e}}),[e,c]),Qt((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,r=r=>{const i=Jt(o.current).includes(r.animationName);if(r.target===t&&i&&(c("ANIMATION_END"),!a.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)}))}},s=e=>{e.target===t&&(i.current=Jt(o.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",r),t.addEventListener("animationend",r),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",r),t.removeEventListener("animationend",r)}}c("ANIMATION_END")}),[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:r.useCallback((e=>{e&&(o.current=getComputedStyle(e)),n(e)}),[])}}(t),a="function"==typeof n?n({present:o.isPresent}):r.Children.only(n),i=He(o.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(a));return"function"==typeof n||o.isPresent?r.cloneElement(a,{ref:i}):null};function Jt(e){return e?.animationName||"none"}Zt.displayName="Presence";var en=r["useId".toString()]||(()=>{}),tn=0;function nn(e){const[t,n]=r.useState(en());return Qt((()=>{n((e=>e??String(tn++)))}),[e]),t?`radix-${t}`:""}var rn="Collapsible",[on,an]=Kt(rn),[sn,ln]=on(rn),cn=r.forwardRef(((t,n)=>{const{__scopeCollapsible:o,open:a,defaultOpen:i,disabled:s,onOpenChange:l,...c}=t,[d=!1,u]=Yt({prop:a,defaultProp:i,onChange:l});return e(sn,{scope:o,disabled:s,contentId:nn(),open:d,onOpenToggle:r.useCallback((()=>u((e=>!e))),[u]),children:e(Ut.div,{"data-state":hn(d),"data-disabled":s?"":void 0,...c,ref:n})})}));cn.displayName=rn;var dn="CollapsibleTrigger",un=r.forwardRef(((t,n)=>{const{__scopeCollapsible:r,...o}=t,a=ln(dn,r);return e(Ut.button,{type:"button","aria-controls":a.contentId,"aria-expanded":a.open||!1,"data-state":hn(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...o,ref:n,onClick:$t(t.onClick,a.onOpenToggle)})}));un.displayName=dn;var fn="CollapsibleContent",pn=r.forwardRef(((t,n)=>{const{forceMount:r,...o}=t,a=ln(fn,t.__scopeCollapsible);return e(Zt,{present:r||a.open,children:({present:t})=>e(mn,{...o,ref:n,present:t})})}));pn.displayName=fn;var mn=r.forwardRef(((t,n)=>{const{__scopeCollapsible:o,present:a,children:i,...s}=t,l=ln(fn,o),[c,d]=r.useState(a),u=r.useRef(null),f=He(n,u),p=r.useRef(0),m=p.current,h=r.useRef(0),g=h.current,v=l.open||c,b=r.useRef(v),w=r.useRef(void 0);return r.useEffect((()=>{const e=requestAnimationFrame((()=>b.current=!1));return()=>cancelAnimationFrame(e)}),[]),Qt((()=>{const e=u.current;if(e){w.current=w.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";const t=e.getBoundingClientRect();p.current=t.height,h.current=t.width,b.current||(e.style.transitionDuration=w.current.transitionDuration,e.style.animationName=w.current.animationName),d(a)}}),[l.open,a]),e(Ut.div,{"data-state":hn(l.open),"data-disabled":l.disabled?"":void 0,id:l.contentId,hidden:!v,...s,ref:f,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...t.style},children:v&&i})}));function hn(e){return e?"open":"closed"}var gn=cn,vn=un,bn=pn,wn=r.createContext(void 0);function yn(e){const t=r.useContext(wn);return e||t||"ltr"}var xn="Accordion",Nn=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Cn,kn,Rn]=Vt(xn),[En,_n]=Kt(xn,[Rn,an]),Sn=an(),Pn=o.forwardRef(((t,n)=>{const{type:r,...o}=t,a=o,i=o;return e(Cn.Provider,{scope:t.__scopeAccordion,children:"multiple"===r?e(In,{...i,ref:n}):e(An,{...a,ref:n})})}));Pn.displayName=xn;var[Tn,Mn]=En(xn),[Dn,On]=En(xn,{collapsible:!1}),An=o.forwardRef(((t,n)=>{const{value:r,defaultValue:a,onValueChange:i=()=>{},collapsible:s=!1,...l}=t,[c,d]=Yt({prop:r,defaultProp:a,onChange:i});return e(Tn,{scope:t.__scopeAccordion,value:c?[c]:[],onItemOpen:d,onItemClose:o.useCallback((()=>s&&d("")),[s,d]),children:e(Dn,{scope:t.__scopeAccordion,collapsible:s,children:e(zn,{...l,ref:n})})})})),In=o.forwardRef(((t,n)=>{const{value:r,defaultValue:a,onValueChange:i=()=>{},...s}=t,[l=[],c]=Yt({prop:r,defaultProp:a,onChange:i}),d=o.useCallback((e=>c(((t=[])=>[...t,e]))),[c]),u=o.useCallback((e=>c(((t=[])=>t.filter((t=>t!==e))))),[c]);return e(Tn,{scope:t.__scopeAccordion,value:l,onItemOpen:d,onItemClose:u,children:e(Dn,{scope:t.__scopeAccordion,collapsible:!0,children:e(zn,{...s,ref:n})})})})),[Ln,Fn]=En(xn),zn=o.forwardRef(((t,n)=>{const{__scopeAccordion:r,disabled:a,dir:i,orientation:s="vertical",...l}=t,c=He(o.useRef(null),n),d=kn(r),u="ltr"===yn(i),f=$t(t.onKeyDown,(e=>{if(!Nn.includes(e.key))return;const t=e.target,n=d().filter((e=>!e.ref.current?.disabled)),r=n.findIndex((e=>e.ref.current===t)),o=n.length;if(-1===r)return;e.preventDefault();let a=r;const i=o-1,l=()=>{a=r+1,a>i&&(a=0)},c=()=>{a=r-1,a<0&&(a=i)};switch(e.key){case"Home":a=0;break;case"End":a=i;break;case"ArrowRight":"horizontal"===s&&(u?l():c());break;case"ArrowDown":"vertical"===s&&l();break;case"ArrowLeft":"horizontal"===s&&(u?c():l());break;case"ArrowUp":"vertical"===s&&c()}const f=a%o;n[f].ref.current?.focus()}));return e(Ln,{scope:r,disabled:a,direction:i,orientation:s,children:e(Cn.Slot,{scope:r,children:e(Ut.div,{...l,"data-orientation":s,ref:c,onKeyDown:a?void 0:f})})})})),Wn="AccordionItem",[Hn,Gn]=En(Wn),jn=o.forwardRef(((t,n)=>{const{__scopeAccordion:r,value:o,...a}=t,i=Fn(Wn,r),s=Mn(Wn,r),l=Sn(r),c=nn(),d=o&&s.value.includes(o)||!1,u=i.disabled||t.disabled;return e(Hn,{scope:r,open:d,disabled:u,triggerId:c,children:e(gn,{"data-orientation":i.orientation,"data-state":Un(d),...l,...a,ref:n,disabled:u,open:d,onOpenChange:e=>{e?s.onItemOpen(o):s.onItemClose(o)}})})}));jn.displayName=Wn;var Kn="AccordionHeader",Bn=o.forwardRef(((t,n)=>{const{__scopeAccordion:r,...o}=t,a=Fn(xn,r),i=Gn(Kn,r);return e(Ut.h3,{"data-orientation":a.orientation,"data-state":Un(i.open),"data-disabled":i.disabled?"":void 0,...o,ref:n})}));Bn.displayName=Kn;var Vn="AccordionTrigger",$n=o.forwardRef(((t,n)=>{const{__scopeAccordion:r,...o}=t,a=Fn(xn,r),i=Gn(Vn,r),s=On(Vn,r),l=Sn(r);return e(Cn.ItemSlot,{scope:r,children:e(vn,{"aria-disabled":i.open&&!s.collapsible||void 0,"data-orientation":a.orientation,id:i.triggerId,...l,...o,ref:n})})}));$n.displayName=Vn;var qn="AccordionContent",Yn=o.forwardRef(((t,n)=>{const{__scopeAccordion:r,...o}=t,a=Fn(xn,r),i=Gn(qn,r),s=Sn(r);return e(bn,{role:"region","aria-labelledby":i.triggerId,"data-orientation":a.orientation,...s,...o,ref:n,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...t.style}})}));function Un(e){return e?"open":"closed"}Yn.displayName=qn;var Xn=jn,Qn=Bn,Zn=$n,Jn=Yn;const er=Pn,tr=r.forwardRef((({className:t,...n},r)=>e(Xn,{ref:r,className:Ht("border-b",t),...n})));tr.displayName="AccordionItem";const nr=r.forwardRef((({className:t,children:r,...o},a)=>e(Qn,{className:"flex",children:n(Zn,{ref:a,className:Ht("flex flex-1 items-center justify-between py-4 text-left text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",t),...o,children:[r,e(u,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"})]})})));nr.displayName=Zn.displayName;const rr=r.forwardRef((({className:t,children:n,...r},o)=>e(Jn,{ref:o,className:"overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r,children:e("div",{className:Ht("pb-4 pt-0",t),children:n})})));rr.displayName=Jn.displayName;const or=qe("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-red-200 bg-red-100/50 dark:bg-red-900/50 dark:border-red-400/50",warning:"border-orange-200 bg-orange-100/50 dark:bg-orange-900/20 dark:border-orange-400/20",success:"border-green-200 bg-green-100/50 dark:bg-green-900/50 dark:border-green-400/50"}},defaultVariants:{variant:"default"}}),ar=r.forwardRef((({className:t,variant:n,...r},o)=>e("div",{ref:o,role:"alert",className:Ht(or({variant:n}),t),...r})));ar.displayName="Alert";const ir=r.forwardRef((({className:t,...n},r)=>e("h5",{ref:r,className:Ht("mb-1 font-medium leading-none tracking-tight",t),...n})));ir.displayName="AlertTitle";const sr=r.forwardRef((({className:t,...n},r)=>e("div",{ref:r,className:Ht("text-sm [&_p]:leading-relaxed",t),...n})));sr.displayName="AlertDescription";const lr=qe("items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{primary:"border-transparent text-primary-foreground bg-blue-500",primary_outline:"border-primary/50 text-primary dark:border-primary bg-blue-100/50 dark:bg-blue-600/70 dark:text-primary-foreground",success:"border-transparent text-primary-foreground bg-green-500",success_outline:"border-green-300 dark:border-green-700 bg-green-100/50 dark:bg-green-700/70 dark:text-primary-foreground",purple:"border-transparent text-primary-foreground bg-purple-500",purple_outline:"border-purple-300 dark:border-transparent bg-purple-100/50 dark:bg-purple-500 text-purple-800 dark:text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground",destructive_outline:"border-destructive/60 dark:border-destructive bg-destructive/20 dark:bg-destructive/20 text-red-500",outline:"text-foreground"},rounded:{sm:"rounded-sm",md:"rounded-md",full:"rounded-full"},textOverflow:{default:"inline-flex",hidden:"overflow-hidden text-ellipsis whitespace-nowrap block"},hover:{true:"hover:opacity-80"}},defaultVariants:{variant:"primary_outline",rounded:"sm",textOverflow:"default"}});function cr({className:t,variant:n,textOverflow:r="default",hover:o=!1,...a}){return e("div",{className:Ht(lr({variant:n,textOverflow:r,hover:o}),t),...a})}function dr({className:t,classNames:n,showOutsideDays:r=!0,...o}){return e(E,{locale:Fe,showOutsideDays:r,className:Ht("p-3",t),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:Ht(Gt({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:"h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",day:Ht(Gt({variant:"ghost"}),"h-9 w-9 p-0 font-normal aria-selected:opacity-100"),day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...n},components:{IconLeft:({className:t,...n})=>e(p,{className:Ht("h-4 w-4",t),...n}),IconRight:({className:t,...n})=>e(f,{className:Ht("h-4 w-4",t),...n})},...o})}dr.displayName="Calendar";const ur=r.forwardRef((({className:t,...n},r)=>e("div",{ref:r,className:Ht("rounded-md border bg-background p-5 text-card-foreground",t),...n})));ur.displayName="Card";const fr=r.forwardRef((({className:t,...n},r)=>e("div",{ref:r,className:Ht("flex flex-col space-y-2.5 p-2",t),...n})));fr.displayName="CardHeader";const pr=r.forwardRef((({className:t,...n},r)=>e("div",{ref:r,className:Ht("text-xl font-medium leading-none tracking-tight",t),...n})));pr.displayName="CardTitle";const mr=r.forwardRef((({className:t,...n},r)=>e("div",{ref:r,className:Ht("mt-1 text-sm leading-none text-muted-foreground",t),...n})));mr.displayName="CardDescription";const hr=r.forwardRef((({className:t,...n},r)=>e("div",{ref:r,className:Ht("p-2 pt-0",t),...n})));hr.displayName="CardContent";const gr=r.forwardRef((({className:t,...n},r)=>e("div",{ref:r,className:Ht("flex items-center p-6 pt-0",t),...n})));gr.displayName="CardFooter";const vr={light:"",dark:".dark"},br=r.createContext(null);function wr(){const e=r.useContext(br);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}const yr=r.forwardRef((({id:t,className:o,children:a,config:i,containerHeight:s,...l},c)=>{const d=r.useId(),u=`chart-${t||d.replace(/:/g,"")}`;return e(br.Provider,{value:{config:i},children:n("div",{"data-chart":u,ref:c,className:Ht("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",o),...l,children:[e(xr,{id:u,config:i}),e(_.ResponsiveContainer,{width:"100%",height:s,children:a})]})})}));yr.displayName="Chart";const xr=({id:t,config:n})=>{const r=Object.entries(n).filter((([,e])=>e.theme||e.color));return r.length?e("style",{dangerouslySetInnerHTML:{__html:Object.entries(vr).map((([e,n])=>`\n${n} [data-chart=${t}] {\n${r.map((([t,n])=>{const r=n.theme?.[e]||n.color;return r?` --color-${t}: ${r};`:null})).join("\n")}\n}\n`)).join("\n")}}):null},Nr=_.Tooltip,Cr=r.forwardRef((({active:o,payload:a,className:i,indicator:s="dot",hideLabel:l=!1,hideIndicator:c=!1,tooltipVariant:d="default",label:u,labelFormatter:f,labelClassName:p,formatter:m,color:h,nameKey:g,labelKey:v},b)=>{const{config:w}=wr(),y=r.useMemo((()=>{if(l||!a?.length)return null;const[t]=a,n=`${v||t.dataKey||t.name||"value"}`,r=Er(w,t,n),o=v||"string"!=typeof u?r?.label:w[u]?.label||u;return f?e("div",{className:Ht("font-medium",p),children:f(o,a)}):o?e("div",{className:Ht("font-medium",p),children:o}):null}),[u,f,a,l,p,w,v]);if(!o||!a?.length)return null;const x=1===a.length&&"dot"!==s;return n("div",{ref:b,className:Ht("grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 font-inter text-sm shadow-xl","area-chart"===d&&"px-5 py-3",i),children:[x?null:y,e("div",{className:Ht("grid gap-2","area-chart"===d&&"mt-3"),children:a.map(((r,o)=>{const a=`${g||r.name||r.dataKey||"value"}`,i=Er(w,r,a),l=h||r.payload.fill||r.color;return e("div",{className:Ht("flex w-full flex-wrap items-start gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground"),children:m&&void 0!==r?.value&&r.name?m(r.value,r.name,r,o,r.payload):n(t,{children:[i?.icon?e(i.icon,{}):!c&&e("div",{className:Ht("mt-[2px] shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":"dot"===s,"w-1":"line"===s,"w-0 border-[1.5px] border-dashed bg-transparent":"dashed"===s,"my-0.5":x&&"dashed"===s}),style:{"--color-bg":l,"--color-border":l}}),"area-chart"===d&&n("div",{className:Ht("flex flex-1 flex-col items-start gap-1 leading-none"),children:[n("div",{className:"grid gap-1.5",children:[x?y:null,e("span",{className:"text-muted-foreground",children:i?.label||r.name})]}),r.value&&e("span",{className:"text-lg font-semibold tabular-nums text-foreground",children:r.value.toLocaleString()})]}),"default"===d&&n("div",{className:Ht("flex flex-1 justify-between gap-3 leading-none",x?"items-end":"items-center"),children:[n("div",{className:"grid gap-1.5",children:[x?y:null,e("span",{className:"text-muted-foreground",children:i?.label||r.name})]}),r.value&&e("span",{className:"font-medium tabular-nums text-foreground",children:r.value.toLocaleString()})]})]})},r.dataKey)}))})]})}));Cr.displayName="ChartTooltip";const kr=_.Legend,Rr=r.forwardRef((({className:t,hideIcon:r=!1,payload:o,verticalAlign:a="bottom",nameKey:i},s)=>{const{config:l}=wr();return o?.length?e("div",{ref:s,className:Ht("flex flex-wrap items-center justify-center gap-x-4 gap-y-2","top"===a?"pb-3":"pt-3",t),children:o.map((t=>{const o=`${i||t.dataKey||"value"}`,a=Er(l,t,o);return n("div",{className:Ht("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),children:[a?.icon&&!r?e(a.icon,{}):e("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:t.color}}),a?.label]},t.value)}))}):null}));function Er(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]}function _r(e){const t=r.useRef({value:e,previous:e});return r.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}function Sr(e){const[t,n]=r.useState(void 0);return Qt((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let o,a;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,a=t.blockSize}else o=e.offsetWidth,a=e.offsetHeight;n({width:o,height:a})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}Rr.displayName="ChartLegend";var Pr="Checkbox",[Tr,Mr]=Kt(Pr),[Dr,Or]=Tr(Pr),Ar=r.forwardRef(((t,o)=>{const{__scopeCheckbox:a,name:i,checked:s,defaultChecked:l,required:c,disabled:d,value:u="on",onCheckedChange:f,form:p,...m}=t,[h,g]=r.useState(null),v=He(o,(e=>g(e))),b=r.useRef(!1),w=!h||(p||!!h.closest("form")),[y=!1,x]=Yt({prop:s,defaultProp:l,onChange:f}),N=r.useRef(y);return r.useEffect((()=>{const e=h?.form;if(e){const t=()=>x(N.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[h,x]),n(Dr,{scope:a,state:y,disabled:d,children:[e(Ut.button,{type:"button",role:"checkbox","aria-checked":zr(y)?"mixed":y,"aria-required":c,"data-state":Wr(y),"data-disabled":d?"":void 0,disabled:d,value:u,...m,ref:v,onKeyDown:$t(t.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:$t(t.onClick,(e=>{x((e=>!!zr(e)||!e)),w&&(b.current=e.isPropagationStopped(),b.current||e.stopPropagation())}))}),w&&e(Fr,{control:h,bubbles:!b.current,name:i,value:u,checked:y,required:c,disabled:d,form:p,style:{transform:"translateX(-100%)"},defaultChecked:!zr(l)&&l})]})}));Ar.displayName=Pr;var Ir="CheckboxIndicator",Lr=r.forwardRef(((t,n)=>{const{__scopeCheckbox:r,forceMount:o,...a}=t,i=Or(Ir,r);return e(Zt,{present:o||zr(i.state)||!0===i.state,children:e(Ut.span,{"data-state":Wr(i.state),"data-disabled":i.disabled?"":void 0,...a,ref:n,style:{pointerEvents:"none",...t.style}})})}));Lr.displayName=Ir;var Fr=t=>{const{control:n,checked:o,bubbles:a=!0,defaultChecked:i,...s}=t,l=r.useRef(null),c=_r(o),d=Sr(n);r.useEffect((()=>{const e=l.current,t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(c!==o&&n){const t=new Event("click",{bubbles:a});e.indeterminate=zr(o),n.call(e,!zr(o)&&o),e.dispatchEvent(t)}}),[c,o,a]);const u=r.useRef(!zr(o)&&o);return e("input",{type:"checkbox","aria-hidden":!0,defaultChecked:i??u.current,...s,tabIndex:-1,ref:l,style:{...t.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function zr(e){return"indeterminate"===e}function Wr(e){return zr(e)?"indeterminate":e?"checked":"unchecked"}var Hr=Ar,Gr=Lr;const jr=r.forwardRef((({className:t,rounded:n="default",...r},o)=>e(Hr,{ref:o,className:Ht("peer h-4 w-4 shrink-0 border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground","default"===n&&"rounded-sm","small"===n&&"rounded-[4px]",t),...r,children:e(Gr,{className:Ht("flex items-center justify-center text-current"),children:e(m,{className:"h-4 w-4"})})})));jr.displayName=Hr.displayName;const Kr=t=>{const{children:n,className:r,max:o=!0,...a}=t;return e("div",{className:Ht("flex flex-col items-start gap-2",o&&"w-full",r),...a,children:n})},Br=t=>{const{children:n,className:r,max:o=!0,...a}=t;return e("div",{className:Ht("flex items-center gap-2",o&&"w-full",r),...a,children:n})},Vr=t=>{const{value:r,checked:o,onClick:a,label:i,...s}=t;return n(Br,{className:"w-fit cursor-pointer transition-colors hover:text-muted-foreground",onClick:()=>a(r),...s,children:[e(jr,{className:"rounded-[6px]",checked:o})," ",i||r]})};var $r,qr="dismissableLayer.update",Yr="dismissableLayer.pointerDownOutside",Ur="dismissableLayer.focusOutside",Xr=r.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Qr=r.forwardRef(((t,n)=>{const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:l,onDismiss:c,...d}=t,u=r.useContext(Xr),[f,p]=r.useState(null),m=f?.ownerDocument??globalThis?.document,[,h]=r.useState({}),g=He(n,(e=>p(e))),v=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=v.indexOf(b),y=f?v.indexOf(f):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,N=y>=w,C=function(e,t=globalThis?.document){const n=qt(e),o=r.useRef(!1),a=r.useRef((()=>{}));return r.useEffect((()=>{const e=e=>{if(e.target&&!o.current){let r=function(){eo(Yr,n,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",a.current),a.current=r,t.addEventListener("click",a.current,{once:!0})):r()}else t.removeEventListener("click",a.current);o.current=!1},r=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(r),t.removeEventListener("pointerdown",e),t.removeEventListener("click",a.current)}}),[t,n]),{onPointerDownCapture:()=>o.current=!0}}((e=>{const t=e.target,n=[...u.branches].some((e=>e.contains(t)));N&&!n&&(i?.(e),l?.(e),e.defaultPrevented||c?.())}),m),k=function(e,t=globalThis?.document){const n=qt(e),o=r.useRef(!1);return r.useEffect((()=>{const e=e=>{if(e.target&&!o.current){eo(Ur,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}((e=>{const t=e.target;[...u.branches].some((e=>e.contains(t)))||(s?.(e),l?.(e),e.defaultPrevented||c?.())}),m);return function(e,t=globalThis?.document){const n=qt(e);r.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[n,t])}((e=>{y===u.layers.size-1&&(a?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))}),m),r.useEffect((()=>{if(f)return o&&(0===u.layersWithOutsidePointerEventsDisabled.size&&($r=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Jr(),()=>{o&&1===u.layersWithOutsidePointerEventsDisabled.size&&(m.body.style.pointerEvents=$r)}}),[f,m,o,u]),r.useEffect((()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Jr())}),[f,u]),r.useEffect((()=>{const e=()=>h({});return document.addEventListener(qr,e),()=>document.removeEventListener(qr,e)}),[]),e(Ut.div,{...d,ref:g,style:{pointerEvents:x?N?"auto":"none":void 0,...t.style},onFocusCapture:$t(t.onFocusCapture,k.onFocusCapture),onBlurCapture:$t(t.onBlurCapture,k.onBlurCapture),onPointerDownCapture:$t(t.onPointerDownCapture,C.onPointerDownCapture)})}));Qr.displayName="DismissableLayer";var Zr=r.forwardRef(((t,n)=>{const o=r.useContext(Xr),a=r.useRef(null),i=He(n,a);return r.useEffect((()=>{const e=a.current;if(e)return o.branches.add(e),()=>{o.branches.delete(e)}}),[o.branches]),e(Ut.div,{...t,ref:i})}));function Jr(){const e=new CustomEvent(qr);document.dispatchEvent(e)}function eo(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Xt(o,a):o.dispatchEvent(a)}Zr.displayName="DismissableLayerBranch";var to=Qr,no=Zr,ro=0;function oo(){r.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ao()),document.body.insertAdjacentElement("beforeend",e[1]??ao()),ro++,()=>{1===ro&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),ro--}}),[])}function ao(){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 io="focusScope.autoFocusOnMount",so="focusScope.autoFocusOnUnmount",lo={bubbles:!1,cancelable:!0},co=r.forwardRef(((t,n)=>{const{loop:o=!1,trapped:a=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...l}=t,[c,d]=r.useState(null),u=qt(i),f=qt(s),p=r.useRef(null),m=He(n,(e=>d(e))),h=r.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;r.useEffect((()=>{if(a){let e=function(e){if(h.paused||!c)return;const t=e.target;c.contains(t)?p.current=t:mo(p.current,{select:!0})},t=function(e){if(h.paused||!c)return;const t=e.relatedTarget;null!==t&&(c.contains(t)||mo(p.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&mo(c)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return c&&r.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[a,c,h.paused]),r.useEffect((()=>{if(c){ho.add(h);const t=document.activeElement;if(!c.contains(t)){const n=new CustomEvent(io,lo);c.addEventListener(io,u),c.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(mo(r,{select:t}),document.activeElement!==n)return}((e=uo(c),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&mo(c))}return()=>{c.removeEventListener(io,u),setTimeout((()=>{const e=new CustomEvent(so,lo);c.addEventListener(so,f),c.dispatchEvent(e),e.defaultPrevented||mo(t??document.body,{select:!0}),c.removeEventListener(so,f),ho.remove(h)}),0)}}var e}),[c,u,f,h]);const g=r.useCallback((e=>{if(!o&&!a)return;if(h.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[r,a]=function(e){const t=uo(e),n=fo(t,e),r=fo(t.reverse(),e);return[n,r]}(t);r&&a?e.shiftKey||n!==a?e.shiftKey&&n===r&&(e.preventDefault(),o&&mo(a,{select:!0})):(e.preventDefault(),o&&mo(r,{select:!0})):n===t&&e.preventDefault()}}),[o,a,h.paused]);return e(Ut.div,{tabIndex:-1,...l,ref:m,onKeyDown:g})}));function uo(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 fo(e,t){for(const n of e)if(!po(n,{upTo:t}))return n}function po(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 mo(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}co.displayName="FocusScope";var ho=function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=go(e,t),e.unshift(t)},remove(t){e=go(e,t),e[0]?.resume()}}}();function go(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}const vo=["top","right","bottom","left"],bo=Math.min,wo=Math.max,yo=Math.round,xo=Math.floor,No=e=>({x:e,y:e}),Co={left:"right",right:"left",bottom:"top",top:"bottom"},ko={start:"end",end:"start"};function Ro(e,t,n){return wo(e,bo(t,n))}function Eo(e,t){return"function"==typeof e?e(t):e}function _o(e){return e.split("-")[0]}function So(e){return e.split("-")[1]}function Po(e){return"x"===e?"y":"x"}function To(e){return"y"===e?"height":"width"}function Mo(e){return["top","bottom"].includes(_o(e))?"y":"x"}function Do(e){return Po(Mo(e))}function Oo(e){return e.replace(/start|end/g,(e=>ko[e]))}function Ao(e){return e.replace(/left|right|bottom|top/g,(e=>Co[e]))}function Io(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Lo(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 Fo(e,t,n){let{reference:r,floating:o}=e;const a=Mo(t),i=Do(t),s=To(i),l=_o(t),c="y"===a,d=r.x+r.width/2-o.width/2,u=r.y+r.height/2-o.height/2,f=r[s]/2-o[s]/2;let p;switch(l){case"top":p={x:d,y:r.y-o.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:u};break;case"left":p={x:r.x-o.width,y:u};break;default:p={x:r.x,y:r.y}}switch(So(t)){case"start":p[i]-=f*(n&&c?-1:1);break;case"end":p[i]+=f*(n&&c?-1:1)}return p}async function zo(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:a,rects:i,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:f=!1,padding:p=0}=Eo(t,e),m=Io(p),h=s[f?"floating"===u?"reference":"floating":u],g=Lo(await a.getClippingRect({element:null==(n=await(null==a.isElement?void 0:a.isElement(h)))||n?h:h.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:l})),v="floating"===u?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,b=await(null==a.getOffsetParent?void 0:a.getOffsetParent(s.floating)),w=await(null==a.isElement?void 0:a.isElement(b))&&await(null==a.getScale?void 0:a.getScale(b))||{x:1,y:1},y=Lo(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:b,strategy:l}):v);return{top:(g.top-y.top+m.top)/w.y,bottom:(y.bottom-g.bottom+m.bottom)/w.y,left:(g.left-y.left+m.left)/w.x,right:(y.right-g.right+m.right)/w.x}}function Wo(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ho(e){return vo.some((t=>e[t]>=0))}function Go(){return"undefined"!=typeof window}function jo(e){return Vo(e)?(e.nodeName||"").toLowerCase():"#document"}function Ko(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Bo(e){var t;return null==(t=(Vo(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Vo(e){return!!Go()&&(e instanceof Node||e instanceof Ko(e).Node)}function $o(e){return!!Go()&&(e instanceof Element||e instanceof Ko(e).Element)}function qo(e){return!!Go()&&(e instanceof HTMLElement||e instanceof Ko(e).HTMLElement)}function Yo(e){return!(!Go()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Ko(e).ShadowRoot)}function Uo(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ta(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Xo(e){return["table","td","th"].includes(jo(e))}function Qo(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Zo(e){const t=Jo(),n=$o(e)?ta(e):e;return["transform","translate","scale","rotate","perspective"].some((e=>!!n[e]&&"none"!==n[e]))||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","translate","scale","rotate","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function Jo(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function ea(e){return["html","body","#document"].includes(jo(e))}function ta(e){return Ko(e).getComputedStyle(e)}function na(e){return $o(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ra(e){if("html"===jo(e))return e;const t=e.assignedSlot||e.parentNode||Yo(e)&&e.host||Bo(e);return Yo(t)?t.host:t}function oa(e){const t=ra(e);return ea(t)?e.ownerDocument?e.ownerDocument.body:e.body:qo(t)&&Uo(t)?t:oa(t)}function aa(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=oa(e),a=o===(null==(r=e.ownerDocument)?void 0:r.body),i=Ko(o);if(a){const e=ia(i);return t.concat(i,i.visualViewport||[],Uo(o)?o:[],e&&n?aa(e):[])}return t.concat(o,aa(o,[],n))}function ia(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function sa(e){const t=ta(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=qo(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,s=yo(n)!==a||yo(r)!==i;return s&&(n=a,r=i),{width:n,height:r,$:s}}function la(e){return $o(e)?e:e.contextElement}function ca(e){const t=la(e);if(!qo(t))return No(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=sa(t);let i=(a?yo(n.width):n.width)/r,s=(a?yo(n.height):n.height)/o;return i&&Number.isFinite(i)||(i=1),s&&Number.isFinite(s)||(s=1),{x:i,y:s}}const da=No(0);function ua(e){const t=Ko(e);return Jo()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:da}function fa(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),a=la(e);let i=No(1);t&&(r?$o(r)&&(i=ca(r)):i=ca(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Ko(e))&&t}(a,n,r)?ua(a):No(0);let l=(o.left+s.x)/i.x,c=(o.top+s.y)/i.y,d=o.width/i.x,u=o.height/i.y;if(a){const e=Ko(a),t=r&&$o(r)?Ko(r):r;let n=e,o=ia(n);for(;o&&r&&t!==n;){const e=ca(o),t=o.getBoundingClientRect(),r=ta(o),a=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,d*=e.x,u*=e.y,l+=a,c+=i,n=Ko(o),o=ia(n)}}return Lo({width:d,height:u,x:l,y:c})}function pa(e,t){const n=na(e).scrollLeft;return t?t.left+n:fa(Bo(e)).left+n}function ma(e,t,n){void 0===n&&(n=!1);const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:pa(e,r)),y:r.top+t.scrollTop}}function ha(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Ko(e),r=Bo(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,s=0,l=0;if(o){a=o.width,i=o.height;const e=Jo();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:a,height:i,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=Bo(e),n=na(e),r=e.ownerDocument.body,o=wo(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=wo(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+pa(e);const s=-n.scrollTop;return"rtl"===ta(r).direction&&(i+=wo(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:s}}(Bo(e));else if($o(t))r=function(e,t){const n=fa(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=qo(e)?ca(e):No(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:o*a.x,y:r*a.y}}(t,n);else{const n=ua(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Lo(r)}function ga(e,t){const n=ra(e);return!(n===t||!$o(n)||ea(n))&&("fixed"===ta(n).position||ga(n,t))}function va(e,t,n){const r=qo(t),o=Bo(t),a="fixed"===n,i=fa(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const l=No(0);if(r||!r&&!a)if(("body"!==jo(t)||Uo(o))&&(s=na(t)),r){const e=fa(t,!0,a,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=pa(o));const c=!o||r||a?No(0):ma(o,s);return{x:i.left+s.scrollLeft-l.x-c.x,y:i.top+s.scrollTop-l.y-c.y,width:i.width,height:i.height}}function ba(e){return"static"===ta(e).position}function wa(e,t){if(!qo(e)||"fixed"===ta(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Bo(e)===n&&(n=n.ownerDocument.body),n}function ya(e,t){const n=Ko(e);if(Qo(e))return n;if(!qo(e)){let t=ra(e);for(;t&&!ea(t);){if($o(t)&&!ba(t))return t;t=ra(t)}return n}let r=wa(e,t);for(;r&&Xo(r)&&ba(r);)r=wa(r,t);return r&&ea(r)&&ba(r)&&!Zo(r)?n:r||function(e){let t=ra(e);for(;qo(t)&&!ea(t);){if(Zo(t))return t;if(Qo(t))return null;t=ra(t)}return null}(e)||n}const xa={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a="fixed"===o,i=Bo(r),s=!!t&&Qo(t.floating);if(r===i||s&&a)return n;let l={scrollLeft:0,scrollTop:0},c=No(1);const d=No(0),u=qo(r);if((u||!u&&!a)&&(("body"!==jo(r)||Uo(i))&&(l=na(r)),qo(r))){const e=fa(r);c=ca(r),d.x=e.x+r.clientLeft,d.y=e.y+r.clientTop}const f=!i||u||a?No(0):ma(i,l,!0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+f.x,y:n.y*c.y-l.scrollTop*c.y+d.y+f.y}},getDocumentElement:Bo,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[..."clippingAncestors"===n?Qo(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=aa(e,[],!1).filter((e=>$o(e)&&"body"!==jo(e))),o=null;const a="fixed"===ta(e).position;let i=a?ra(e):e;for(;$o(i)&&!ea(i);){const t=ta(i),n=Zo(i);n||"fixed"!==t.position||(o=null),(a?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||Uo(i)&&!n&&ga(e,i))?r=r.filter((e=>e!==i)):o=t,i=ra(i)}return t.set(e,r),r}(t,this._c):[].concat(n),r],i=a[0],s=a.reduce(((e,n)=>{const r=ha(t,n,o);return e.top=wo(r.top,e.top),e.right=bo(r.right,e.right),e.bottom=bo(r.bottom,e.bottom),e.left=wo(r.left,e.left),e}),ha(t,i,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:ya,getElementRects:async function(e){const t=this.getOffsetParent||ya,n=this.getDimensions,r=await n(e.floating);return{reference:va(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=sa(e);return{width:t,height:n}},getScale:ca,isElement:$o,isRTL:function(e){return"rtl"===ta(e).direction}};function Na(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ca(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=la(e),d=o||a?[...c?aa(c):[],...aa(t)]:[];d.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),a&&e.addEventListener("resize",n)}));const u=c&&s?function(e,t){let n,r=null;const o=Bo(e);function a(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function i(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),a();const c=e.getBoundingClientRect(),{left:d,top:u,width:f,height:p}=c;if(s||t(),!f||!p)return;const m={rootMargin:-xo(u)+"px "+-xo(o.clientWidth-(d+f))+"px "+-xo(o.clientHeight-(u+p))+"px "+-xo(d)+"px",threshold:wo(0,bo(1,l))||1};let h=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!h)return i();r?i(!1,r):n=setTimeout((()=>{i(!1,1e-7)}),1e3)}1!==r||Na(c,e.getBoundingClientRect())||i(),h=!1}try{r=new IntersectionObserver(g,{...m,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,m)}r.observe(e)}(!0),a}(c,n):null;let f,p=-1,m=null;i&&(m=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=m)||e.observe(t)}))),n()})),c&&!l&&m.observe(c),m.observe(t));let h=l?fa(e):null;return l&&function t(){const r=fa(e);h&&!Na(h,r)&&n();h=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach((e=>{o&&e.removeEventListener("scroll",n),a&&e.removeEventListener("resize",n)})),null==u||u(),null==(e=m)||e.disconnect(),m=null,l&&cancelAnimationFrame(f)}}const ka=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:i,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,a=await(null==r.isRTL?void 0:r.isRTL(o.floating)),i=_o(n),s=So(n),l="y"===Mo(n),c=["left","top"].includes(i)?-1:1,d=a&&l?-1:1,u=Eo(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&"number"==typeof m&&(p="end"===s?-1*m:m),l?{x:p*d,y:f*c}:{x:f*c,y:p*d}}(t,e);return i===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:i}}}}},Ra=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Eo(e,t),c={x:n,y:r},d=await zo(t,l),u=Mo(_o(o)),f=Po(u);let p=c[f],m=c[u];if(a){const e="y"===f?"bottom":"right";p=Ro(p+d["y"===f?"top":"left"],p,p-d[e])}if(i){const e="y"===u?"bottom":"right";m=Ro(m+d["y"===u?"top":"left"],m,m-d[e])}const h=s.fn({...t,[f]:p,[u]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[f]:a,[u]:i}}}}}},Ea=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:i,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...g}=Eo(e,t);if(null!=(n=a.arrow)&&n.alignmentOffset)return{};const v=_o(o),b=Mo(s),w=_o(s)===s,y=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=f||(w||!h?[Ao(s)]:function(e){const t=Ao(e);return[Oo(e),t,Oo(t)]}(s)),N="none"!==m;!f&&N&&x.push(...function(e,t,n,r){const o=So(e);let a=function(e,t,n){const r=["left","right"],o=["right","left"],a=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?a:i;default:return[]}}(_o(e),"start"===n,r);return o&&(a=a.map((e=>e+"-"+o)),t&&(a=a.concat(a.map(Oo)))),a}(s,h,m,y));const C=[s,...x],k=await zo(t,g),R=[];let E=(null==(r=a.flip)?void 0:r.overflows)||[];if(d&&R.push(k[v]),u){const e=function(e,t,n){void 0===n&&(n=!1);const r=So(e),o=Do(e),a=To(o);let i="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Ao(i)),[i,Ao(i)]}(o,i,y);R.push(k[e[0]],k[e[1]])}if(E=[...E,{placement:o,overflows:R}],!R.every((e=>e<=0))){var _,S;const e=((null==(_=a.flip)?void 0:_.index)||0)+1,t=C[e];if(t)return{data:{index:e,overflows:E},reset:{placement:t}};let n=null==(S=E.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:S.placement;if(!n)switch(p){case"bestFit":{var P;const e=null==(P=E.filter((e=>{if(N){const t=Mo(e.placement);return t===b||"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:P[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},_a=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:i,elements:s}=t,{apply:l=()=>{},...c}=Eo(e,t),d=await zo(t,c),u=_o(o),f=So(o),p="y"===Mo(o),{width:m,height:h}=a.floating;let g,v;"top"===u||"bottom"===u?(g=u,v=f===(await(null==i.isRTL?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(v=u,g="end"===f?"top":"bottom");const b=h-d.top-d.bottom,w=m-d.left-d.right,y=bo(h-d[g],b),x=bo(m-d[v],w),N=!t.middlewareData.shift;let C=y,k=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(k=w),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(C=b),N&&!f){const e=wo(d.left,0),t=wo(d.right,0),n=wo(d.top,0),r=wo(d.bottom,0);p?k=m-2*(0!==e||0!==t?e+t:wo(d.left,d.right)):C=h-2*(0!==n||0!==r?n+r:wo(d.top,d.bottom))}await l({...t,availableWidth:k,availableHeight:C});const R=await i.getDimensions(s.floating);return m!==R.width||h!==R.height?{reset:{rects:!0}}:{}}}},Sa=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Eo(e,t);switch(r){case"referenceHidden":{const e=Wo(await zo(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ho(e)}}}case"escaped":{const e=Wo(await zo(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Ho(e)}}}default:return{}}}}},Pa=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:i,elements:s,middlewareData:l}=t,{element:c,padding:d=0}=Eo(e,t)||{};if(null==c)return{};const u=Io(d),f={x:n,y:r},p=Do(o),m=To(p),h=await i.getDimensions(c),g="y"===p,v=g?"top":"left",b=g?"bottom":"right",w=g?"clientHeight":"clientWidth",y=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],N=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c));let C=N?N[w]:0;C&&await(null==i.isElement?void 0:i.isElement(N))||(C=s.floating[w]||a.floating[m]);const k=y/2-x/2,R=C/2-h[m]/2-1,E=bo(u[v],R),_=bo(u[b],R),S=E,P=C-h[m]-_,T=C/2-h[m]/2+k,M=Ro(S,T,P),D=!l.arrow&&null!=So(o)&&T!==M&&a.reference[m]/2-(T<S?E:_)-h[m]/2<0,O=D?T<S?T-S:T-P:0;return{[p]:f[p]+O,data:{[p]:M,centerOffset:T-M-O,...D&&{alignmentOffset:O}},reset:D}}}),Ta=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:i}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=Eo(e,t),d={x:n,y:r},u=Mo(o),f=Po(u);let p=d[f],m=d[u];const h=Eo(s,t),g="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){const e="y"===f?"height":"width",t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(c){var v,b;const e="y"===f?"width":"height",t=["top","left"].includes(_o(o)),n=a.reference[u]-a.floating[e]+(t&&(null==(v=i.offset)?void 0:v[u])||0)+(t?0:g.crossAxis),r=a.reference[u]+a.reference[e]+(t?0:(null==(b=i.offset)?void 0:b[u])||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[u]:m}}}},Ma=(e,t,n)=>{const r=new Map,o={platform:xa,...n},a={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,s=a.filter(Boolean),l=await(null==i.isRTL?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=Fo(c,r,l),f=r,p={},m=0;for(let n=0;n<s.length;n++){const{name:a,fn:h}=s[n],{x:g,y:v,data:b,reset:w}=await h({x:d,y:u,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:c,platform:i,elements:{reference:e,floating:t}});d=null!=g?g:d,u=null!=v?v:u,p={...p,[a]:{...p[a],...b}},w&&m<=50&&(m++,"object"==typeof w&&(w.placement&&(f=w.placement),w.rects&&(c=!0===w.rects?await i.getElementRects({reference:e,floating:t,strategy:o}):w.rects),({x:d,y:u}=Fo(c,f,l))),n=-1)}return{x:d,y:u,placement:f,strategy:o,middlewareData:p}})(e,t,{...o,platform:a})};var Da="undefined"!=typeof document?a:i;function Oa(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(!Oa(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)&&!Oa(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Aa(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ia(e,t){const n=Aa(e);return Math.round(t*n)/n}function La(e){const t=r.useRef(e);return Da((()=>{t.current=e})),t}const Fa=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?Pa({element:n.current,padding:r}).fn(t):{}:n?Pa({element:n,padding:r}).fn(t):{};var o}}),za=(e,t)=>({...ka(e),options:[e,t]}),Wa=(e,t)=>({...Ra(e),options:[e,t]}),Ha=(e,t)=>({...Ta(e),options:[e,t]}),Ga=(e,t)=>({...Ea(e),options:[e,t]}),ja=(e,t)=>({..._a(e),options:[e,t]}),Ka=(e,t)=>({...Sa(e),options:[e,t]}),Ba=(e,t)=>({...Fa(e),options:[e,t]});var Va=r.forwardRef(((t,n)=>{const{children:r,width:o=10,height:a=5,...i}=t;return e(Ut.svg,{...i,ref:n,width:o,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:e("polygon",{points:"0,0 30,0 15,10"})})}));Va.displayName="Arrow";var $a=Va,qa="Popper",[Ya,Ua]=Kt(qa),[Xa,Qa]=Ya(qa),Za=t=>{const{__scopePopper:n,children:o}=t,[a,i]=r.useState(null);return e(Xa,{scope:n,anchor:a,onAnchorChange:i,children:o})};Za.displayName=qa;var Ja="PopperAnchor",ei=r.forwardRef(((t,n)=>{const{__scopePopper:o,virtualRef:a,...i}=t,s=Qa(Ja,o),l=r.useRef(null),c=He(n,l);return r.useEffect((()=>{s.onAnchorChange(a?.current||l.current)})),a?null:e(Ut.div,{...i,ref:c})}));ei.displayName=Ja;var ti="PopperContent",[ni,ri]=Ya(ti),oi=r.forwardRef(((t,n)=>{const{__scopePopper:o,side:a="bottom",sideOffset:i=0,align:s="center",alignOffset:l=0,arrowPadding:c=0,avoidCollisions:d=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:m=!1,updatePositionStrategy:h="optimized",onPlaced:g,...v}=t,b=Qa(ti,o),[w,y]=r.useState(null),x=He(n,(e=>y(e))),[N,C]=r.useState(null),R=Sr(N),E=R?.width??0,_=R?.height??0,S=a+("center"!==s?"-"+s:""),P="number"==typeof f?f:{top:0,right:0,bottom:0,left:0,...f},T=Array.isArray(u)?u:[u],M=T.length>0,D={padding:P,boundary:T.filter(li),altBoundary:M},{refs:O,floatingStyles:A,placement:I,isPositioned:L,middlewareData:F}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:a,elements:{reference:i,floating:s}={},transform:l=!0,whileElementsMounted:c,open:d}=e,[u,f]=r.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=r.useState(o);Oa(p,o)||m(o);const[h,g]=r.useState(null),[v,b]=r.useState(null),w=r.useCallback((e=>{e!==C.current&&(C.current=e,g(e))}),[]),y=r.useCallback((e=>{e!==R.current&&(R.current=e,b(e))}),[]),x=i||h,N=s||v,C=r.useRef(null),R=r.useRef(null),E=r.useRef(u),_=null!=c,S=La(c),P=La(a),T=La(d),M=r.useCallback((()=>{if(!C.current||!R.current)return;const e={placement:t,strategy:n,middleware:p};P.current&&(e.platform=P.current),Ma(C.current,R.current,e).then((e=>{const t={...e,isPositioned:!1!==T.current};D.current&&!Oa(E.current,t)&&(E.current=t,k.flushSync((()=>{f(t)})))}))}),[p,t,n,P,T]);Da((()=>{!1===d&&E.current.isPositioned&&(E.current.isPositioned=!1,f((e=>({...e,isPositioned:!1}))))}),[d]);const D=r.useRef(!1);Da((()=>(D.current=!0,()=>{D.current=!1})),[]),Da((()=>{if(x&&(C.current=x),N&&(R.current=N),x&&N){if(S.current)return S.current(x,N,M);M()}}),[x,N,M,S,_]);const O=r.useMemo((()=>({reference:C,floating:R,setReference:w,setFloating:y})),[w,y]),A=r.useMemo((()=>({reference:x,floating:N})),[x,N]),I=r.useMemo((()=>{const e={position:n,left:0,top:0};if(!A.floating)return e;const t=Ia(A.floating,u.x),r=Ia(A.floating,u.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...Aa(A.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,l,A.floating,u.x,u.y]);return r.useMemo((()=>({...u,update:M,refs:O,elements:A,floatingStyles:I})),[u,M,O,A,I])}({strategy:"fixed",placement:S,whileElementsMounted:(...e)=>Ca(...e,{animationFrame:"always"===h}),elements:{reference:b.anchor},middleware:[za({mainAxis:i+_,alignmentAxis:l}),d&&Wa({mainAxis:!0,crossAxis:!1,limiter:"partial"===p?Ha():void 0,...D}),d&&Ga({...D}),ja({...D,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:a}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${r}px`),i.setProperty("--radix-popper-anchor-width",`${o}px`),i.setProperty("--radix-popper-anchor-height",`${a}px`)}}),N&&Ba({element:N,padding:c}),ci({arrowWidth:E,arrowHeight:_}),m&&Ka({strategy:"referenceHidden",...D})]}),[z,W]=di(I),H=qt(g);Qt((()=>{L&&H?.()}),[L,H]);const G=F.arrow?.x,j=F.arrow?.y,K=0!==F.arrow?.centerOffset,[B,V]=r.useState();return Qt((()=>{w&&V(window.getComputedStyle(w).zIndex)}),[w]),e("div",{ref:O.setFloating,"data-radix-popper-content-wrapper":"",style:{...A,transform:L?A.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:B,"--radix-popper-transform-origin":[F.transformOrigin?.x,F.transformOrigin?.y].join(" "),...F.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:e(ni,{scope:o,placedSide:z,onArrowChange:C,arrowX:G,arrowY:j,shouldHideArrow:K,children:e(Ut.div,{"data-side":z,"data-align":W,...v,ref:x,style:{...v.style,animation:L?void 0:"none"}})})})}));oi.displayName=ti;var ai="PopperArrow",ii={top:"bottom",right:"left",bottom:"top",left:"right"},si=r.forwardRef((function(t,n){const{__scopePopper:r,...o}=t,a=ri(ai,r),i=ii[a.placedSide];return e("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:e($a,{...o,ref:n,style:{...o.style,display:"block"}})})}));function li(e){return null!==e}si.displayName=ai;var ci=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,a=0!==o.arrow?.centerOffset,i=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[l,c]=di(n),d={start:"0%",center:"50%",end:"100%"}[c],u=(o.arrow?.x??0)+i/2,f=(o.arrow?.y??0)+s/2;let p="",m="";return"bottom"===l?(p=a?d:`${u}px`,m=-s+"px"):"top"===l?(p=a?d:`${u}px`,m=`${r.floating.height+s}px`):"right"===l?(p=-s+"px",m=a?d:`${f}px`):"left"===l&&(p=`${r.floating.width+s}px`,m=a?d:`${f}px`),{data:{x:p,y:m}}}});function di(e){const[t,n="center"]=e.split("-");return[t,n]}var ui=Za,fi=ei,pi=oi,mi=si,hi=r.forwardRef(((t,n)=>{const{container:o,...a}=t,[i,s]=r.useState(!1);Qt((()=>s(!0)),[]);const l=o||i&&globalThis?.document?.body;return l?R.createPortal(e(Ut.div,{...a,ref:n}),l):null}));hi.displayName="Portal";var gi=new WeakMap,vi=new WeakMap,bi={},wi=0,yi=function(e){return e&&(e.host||yi(e.parentNode))},xi=function(e,t,n,r){var o=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=yi(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);bi[n]||(bi[n]=new WeakMap);var a=bi[n],i=[],s=new Set,l=new Set(o),c=function(e){e&&!s.has(e)&&(s.add(e),c(e.parentNode))};o.forEach(c);var d=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(s.has(e))d(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,l=(gi.get(e)||0)+1,c=(a.get(e)||0)+1;gi.set(e,l),a.set(e,c),i.push(e),1===l&&o&&vi.set(e,!0),1===c&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}}))};return d(t),s.clear(),wi++,function(){i.forEach((function(e){var t=gi.get(e)-1,o=a.get(e)-1;gi.set(e,t),a.set(e,o),t||(vi.has(e)||e.removeAttribute(r),vi.delete(e)),o||e.removeAttribute(n)})),--wi||(gi=new WeakMap,gi=new WeakMap,vi=new WeakMap,bi={})}},Ni=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),xi(r,o,n,"aria-hidden")):function(){return null}},Ci=function(){return Ci=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ci.apply(this,arguments)};function ki(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}var Ri="right-scroll-bar-position",Ei="width-before-scroll-bar";function _i(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var Si="undefined"!=typeof window?r.useLayoutEffect:r.useEffect,Pi=new WeakMap;function Ti(e,t){var n,r,o,a=(n=null,r=function(t){return e.forEach((function(e){return _i(e,t)}))},(o=s((function(){return{value:n,callback:r,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}}))[0]).callback=r,o.facade);return Si((function(){var t=Pi.get(a);if(t){var n=new Set(t),r=new Set(e),o=a.current;n.forEach((function(e){r.has(e)||_i(e,null)})),r.forEach((function(e){n.has(e)||_i(e,o)}))}Pi.set(a,e)}),[e]),a}function Mi(e){return e}var Di=function(e){var t=e.sideCar,n=ki(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return r.createElement(o,Ci({},n))};Di.isSideCarExport=!0;var Oi=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=Mi);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},i=function(){return Promise.resolve().then(a)};i(),n={push:function(e){t.push(e),i()},filter:function(e){return t=t.filter(e),n}}}}}(null);return t.options=Ci({async:!0,ssr:!1},e),t}(),Ai=function(){},Ii=r.forwardRef((function(e,t){var n=r.useRef(null),o=r.useState({onScrollCapture:Ai,onWheelCapture:Ai,onTouchMoveCapture:Ai}),a=o[0],i=o[1],s=e.forwardProps,l=e.children,c=e.className,d=e.removeScrollBar,u=e.enabled,f=e.shards,p=e.sideCar,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,v=e.as,b=void 0===v?"div":v,w=e.gapMode,y=ki(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=p,N=Ti([n,t]),C=Ci(Ci({},y),a);return r.createElement(r.Fragment,null,u&&r.createElement(x,{sideCar:Oi,removeScrollBar:d,shards:f,noIsolation:m,inert:h,setCallbacks:i,allowPinchZoom:!!g,lockRef:n,gapMode:w}),s?r.cloneElement(r.Children.only(l),Ci(Ci({},C),{ref:N})):r.createElement(b,Ci({},C,{className:c,ref:N}),l))}));Ii.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Ii.classNames={fullWidth:Ei,zeroRight:Ri};function Li(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var Fi=function(){var e=0,t=null;return{add:function(n){var r,o;0==e&&(t=Li())&&(o=n,(r=t).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},zi=function(){var e,t=(e=Fi(),function(t,n){r.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&n])});return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}},Wi={left:0,top:0,right:0,gap:0},Hi=function(e){return parseInt(e||"",10)||0},Gi=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Wi;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[Hi(n),Hi(r),Hi(o)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},ji=zi(),Ki="data-scroll-locked",Bi=function(e,t,n,r){var o=e.left,a=e.top,i=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body[").concat(Ki,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(a,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(Ri," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(Ei," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(Ri," .").concat(Ri," {\n right: 0 ").concat(r,";\n }\n \n .").concat(Ei," .").concat(Ei," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(Ki,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},Vi=function(){var e=parseInt(document.body.getAttribute(Ki)||"0",10);return isFinite(e)?e:0},$i=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,a=void 0===o?"margin":o;r.useEffect((function(){return document.body.setAttribute(Ki,(Vi()+1).toString()),function(){var e=Vi()-1;e<=0?document.body.removeAttribute(Ki):document.body.setAttribute(Ki,e.toString())}}),[]);var i=r.useMemo((function(){return Gi(a)}),[a]);return r.createElement(ji,{styles:Bi(i,!t,a,n?"":"!important")})},qi=!1;if("undefined"!=typeof window)try{var Yi=Object.defineProperty({},"passive",{get:function(){return qi=!0,!0}});window.addEventListener("test",Yi,Yi),window.removeEventListener("test",Yi,Yi)}catch(e){qi=!1}var Ui=!!qi&&{passive:!1},Xi=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},Qi=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),Zi(e,r)){var o=Ji(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Zi=function(e,t){return"v"===e?function(e){return Xi(e,"overflowY")}(t):function(e){return Xi(e,"overflowX")}(t)},Ji=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},es=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ts=function(e){return[e.deltaX,e.deltaY]},ns=function(e){return e&&"current"in e?e.current:e},rs=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},os=0,as=[];function is(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var ss,ls=(ss=function(e){var t=r.useRef([]),n=r.useRef([0,0]),o=r.useRef(),a=r.useState(os++)[0],i=r.useState(zi)[0],s=r.useRef(e);r.useEffect((function(){s.current=e}),[e]),r.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var t=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([e.lockRef.current],(e.shards||[]).map(ns),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(a))})),function(){document.body.classList.remove("block-interactivity-".concat(a)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(a))}))}}}),[e.inert,e.lockRef.current,e.shards]);var l=r.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!s.current.allowPinchZoom;var r,a=es(e),i=n.current,l="deltaX"in e?e.deltaX:i[0]-a[0],c="deltaY"in e?e.deltaY:i[1]-a[1],d=e.target,u=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===u&&"range"===d.type)return!1;var f=Qi(u,d);if(!f)return!0;if(f?r=u:(r="v"===u?"h":"v",f=Qi(u,d)),!f)return!1;if(!o.current&&"changedTouches"in e&&(l||c)&&(o.current=r),!r)return!0;var p=o.current||r;return function(e,t,n,r){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=o*r,i=n.target,s=t.contains(i),l=!1,c=a>0,d=0,u=0;do{var f=Ji(e,i),p=f[0],m=f[1]-f[2]-o*p;(p||m)&&Zi(e,i)&&(d+=m,u+=p),i=i instanceof ShadowRoot?i.host:i.parentNode}while(!s&&i!==document.body||s&&(t.contains(i)||t===i));return(c&&Math.abs(d)<1||!c&&Math.abs(u)<1)&&(l=!0),l}(p,t,e,"h"===p?l:c)}),[]),c=r.useCallback((function(e){var n=e;if(as.length&&as[as.length-1]===i){var r="deltaY"in n?ts(n):es(n),o=t.current.filter((function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&(t=e.delta,o=r,t[0]===o[0]&&t[1]===o[1]);var t,o}))[0];if(o&&o.should)n.cancelable&&n.preventDefault();else if(!o){var a=(s.current.shards||[]).map(ns).filter(Boolean).filter((function(e){return e.contains(n.target)}));(a.length>0?l(n,a[0]):!s.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),d=r.useCallback((function(e,n,r,o){var a={name:e,delta:n,target:r,should:o,shadowParent:is(r)};t.current.push(a),setTimeout((function(){t.current=t.current.filter((function(e){return e!==a}))}),1)}),[]),u=r.useCallback((function(e){n.current=es(e),o.current=void 0}),[]),f=r.useCallback((function(t){d(t.type,ts(t),t.target,l(t,e.lockRef.current))}),[]),p=r.useCallback((function(t){d(t.type,es(t),t.target,l(t,e.lockRef.current))}),[]);r.useEffect((function(){return as.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",c,Ui),document.addEventListener("touchmove",c,Ui),document.addEventListener("touchstart",u,Ui),function(){as=as.filter((function(e){return e!==i})),document.removeEventListener("wheel",c,Ui),document.removeEventListener("touchmove",c,Ui),document.removeEventListener("touchstart",u,Ui)}}),[]);var m=e.removeScrollBar,h=e.inert;return r.createElement(r.Fragment,null,h?r.createElement(i,{styles:rs(a)}):null,m?r.createElement($i,{gapMode:e.gapMode}):null)},Oi.useMedium(ss),Di),cs=r.forwardRef((function(e,t){return r.createElement(Ii,Ci({},e,{ref:t,sideCar:ls}))}));cs.classNames=Ii.classNames;var ds="Popover",[us,fs]=Kt(ds,[Ua]),ps=Ua(),[ms,hs]=us(ds),gs=t=>{const{__scopePopover:n,children:o,open:a,defaultOpen:i,onOpenChange:s,modal:l=!1}=t,c=ps(n),d=r.useRef(null),[u,f]=r.useState(!1),[p=!1,m]=Yt({prop:a,defaultProp:i,onChange:s});return e(ui,{...c,children:e(ms,{scope:n,contentId:nn(),triggerRef:d,open:p,onOpenChange:m,onOpenToggle:r.useCallback((()=>m((e=>!e))),[m]),hasCustomAnchor:u,onCustomAnchorAdd:r.useCallback((()=>f(!0)),[]),onCustomAnchorRemove:r.useCallback((()=>f(!1)),[]),modal:l,children:o})})};gs.displayName=ds;var vs="PopoverAnchor",bs=r.forwardRef(((t,n)=>{const{__scopePopover:o,...a}=t,i=hs(vs,o),s=ps(o),{onCustomAnchorAdd:l,onCustomAnchorRemove:c}=i;return r.useEffect((()=>(l(),()=>c())),[l,c]),e(fi,{...s,...a,ref:n})}));bs.displayName=vs;var ws="PopoverTrigger",ys=r.forwardRef(((t,n)=>{const{__scopePopover:r,...o}=t,a=hs(ws,r),i=ps(r),s=He(n,a.triggerRef),l=e(Ut.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Ms(a.open),...o,ref:s,onClick:$t(t.onClick,a.onOpenToggle)});return a.hasCustomAnchor?l:e(fi,{asChild:!0,...i,children:l})}));ys.displayName=ws;var xs="PopoverPortal",[Ns,Cs]=us(xs,{forceMount:void 0}),ks=t=>{const{__scopePopover:n,forceMount:r,children:o,container:a}=t,i=hs(xs,n);return e(Ns,{scope:n,forceMount:r,children:e(Zt,{present:r||i.open,children:e(hi,{asChild:!0,container:a,children:o})})})};ks.displayName=xs;var Rs="PopoverContent",Es=r.forwardRef(((t,n)=>{const r=Cs(Rs,t.__scopePopover),{forceMount:o=r.forceMount,...a}=t,i=hs(Rs,t.__scopePopover);return e(Zt,{present:o||i.open,children:i.modal?e(_s,{...a,ref:n}):e(Ss,{...a,ref:n})})}));Es.displayName=Rs;var _s=r.forwardRef(((t,n)=>{const o=hs(Rs,t.__scopePopover),a=r.useRef(null),i=He(n,a),s=r.useRef(!1);return r.useEffect((()=>{const e=a.current;if(e)return Ni(e)}),[]),e(cs,{as:Ge,allowPinchZoom:!0,children:e(Ps,{...t,ref:i,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:$t(t.onCloseAutoFocus,(e=>{e.preventDefault(),s.current||o.triggerRef.current?.focus()})),onPointerDownOutside:$t(t.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;s.current=r}),{checkForDefaultPrevented:!1}),onFocusOutside:$t(t.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})})})),Ss=r.forwardRef(((t,n)=>{const o=hs(Rs,t.__scopePopover),a=r.useRef(!1),i=r.useRef(!1);return e(Ps,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(a.current||o.triggerRef.current?.focus(),e.preventDefault()),a.current=!1,i.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(a.current=!0,"pointerdown"===e.detail.originalEvent.type&&(i.current=!0));const n=e.target,r=o.triggerRef.current?.contains(n);r&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&i.current&&e.preventDefault()}})})),Ps=r.forwardRef(((t,n)=>{const{__scopePopover:r,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:u,...f}=t,p=hs(Rs,r),m=ps(r);return oo(),e(co,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:a,onUnmountAutoFocus:i,children:e(Qr,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:u,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onDismiss:()=>p.onOpenChange(!1),children:e(pi,{"data-state":Ms(p.open),role:"dialog",id:p.contentId,...m,...f,ref:n,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})})),Ts="PopoverClose";r.forwardRef(((t,n)=>{const{__scopePopover:r,...o}=t,a=hs(Ts,r);return e(Ut.button,{type:"button",...o,ref:n,onClick:$t(t.onClick,(()=>a.onOpenChange(!1)))})})).displayName=Ts;function Ms(e){return e?"open":"closed"}r.forwardRef(((t,n)=>{const{__scopePopover:r,...o}=t,a=ps(r);return e(mi,{...a,...o,ref:n})})).displayName="PopoverArrow";var Ds=ks,Os=Es;const As=gs,Is=ys,Ls=bs,Fs=r.forwardRef((({className:t,align:n="center",sideOffset:r=4,...o},a)=>e(Ds,{children:e(Os,{ref:a,align:n,sideOffset:r,className:Ht("z-50 w-72 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",t),...o})})));Fs.displayName=Os.displayName;const zs=r=>{const{className:o,datesRange:a,withDatesMacroses:l,triggerClassName:c,onApply:d}=r,[u,f]=s(!1),[p,m]=s();i((()=>{m({from:a?.from?new Date(a?.from):void 0,to:a?.to?new Date(a?.to):void 0})}),[a]);const g=e=>{const t=new Date;let n=new Date(t);"week"===e&&(n=_e(t,6)),"month"===e&&(n=_e(t,30)),"year"===e&&(n=_e(t,365)),d({from:ke(n,"yyyy-MM-dd"),to:ke(t,"yyyy-MM-dd")}),f(!1)};return e("div",{className:Ht("grid gap-2",o),children:n(As,{open:u,onOpenChange:f,children:[e(Is,{asChild:!0,children:n(jt,{id:"date",variant:"outline",className:Ht("justify-start text-left font-normal",!a&&"text-muted-foreground",c),children:[e(h,{}),p?.from?p.to?n(t,{children:[ke(p.from,"LLL dd, y")," -"," ",ke(p.to,"LLL dd, y")]}):ke(p.from,"LLL dd, y"):e("span",{children:"Укажите даты"})]})}),n(Fs,{className:"w-auto p-0",align:"start",children:[l&&n("div",{className:"flex w-full items-center gap-2 p-3",children:[e(jt,{variant:"secondary",onClick:()=>g("week"),children:"7 дней"}),e(jt,{variant:"secondary",onClick:()=>g("month"),children:"30 дней"}),e(jt,{variant:"secondary",onClick:()=>g("year"),children:"Год"})]}),e(dr,{initialFocus:!0,mode:"range",defaultMonth:p?.from,selected:p,onSelect:m,numberOfMonths:2,toDate:new Date}),n("div",{className:"flex gap-3 p-3",children:[e(jt,{className:"w-full",onClick:()=>{d(void 0),f(!1)},variant:"outline",size:"sm",children:"Сбросить период"}),e(jt,{disabled:!p?.from||!p.to,className:"w-full",onClick:()=>{d({from:ke(p.from,"yyyy-MM-dd"),to:ke(p.to,"yyyy-MM-dd")}),f(!1)},size:"sm",children:"Применить"})]})]})]})})};var Ws="Dialog",[Hs,Gs]=Kt(Ws),[js,Ks]=Hs(Ws),Bs=t=>{const{__scopeDialog:n,children:o,open:a,defaultOpen:i,onOpenChange:s,modal:l=!0}=t,c=r.useRef(null),d=r.useRef(null),[u=!1,f]=Yt({prop:a,defaultProp:i,onChange:s});return e(js,{scope:n,triggerRef:c,contentRef:d,contentId:nn(),titleId:nn(),descriptionId:nn(),open:u,onOpenChange:f,onOpenToggle:r.useCallback((()=>f((e=>!e))),[f]),modal:l,children:o})};Bs.displayName=Ws;var Vs="DialogTrigger",$s=r.forwardRef(((t,n)=>{const{__scopeDialog:r,...o}=t,a=Ks(Vs,r),i=He(n,a.triggerRef);return e(Ut.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":ul(a.open),...o,ref:i,onClick:$t(t.onClick,a.onOpenToggle)})}));$s.displayName=Vs;var qs="DialogPortal",[Ys,Us]=Hs(qs,{forceMount:void 0}),Xs=t=>{const{__scopeDialog:n,forceMount:o,children:a,container:i}=t,s=Ks(qs,n);return e(Ys,{scope:n,forceMount:o,children:r.Children.map(a,(t=>e(Zt,{present:o||s.open,children:e(hi,{asChild:!0,container:i,children:t})})))})};Xs.displayName=qs;var Qs="DialogOverlay",Zs=r.forwardRef(((t,n)=>{const r=Us(Qs,t.__scopeDialog),{forceMount:o=r.forceMount,...a}=t,i=Ks(Qs,t.__scopeDialog);return i.modal?e(Zt,{present:o||i.open,children:e(Js,{...a,ref:n})}):null}));Zs.displayName=Qs;var Js=r.forwardRef(((t,n)=>{const{__scopeDialog:r,...o}=t,a=Ks(Qs,r);return e(cs,{as:Ge,allowPinchZoom:!0,shards:[a.contentRef],children:e(Ut.div,{"data-state":ul(a.open),...o,ref:n,style:{pointerEvents:"auto",...o.style}})})})),el="DialogContent",tl=r.forwardRef(((t,n)=>{const r=Us(el,t.__scopeDialog),{forceMount:o=r.forceMount,...a}=t,i=Ks(el,t.__scopeDialog);return e(Zt,{present:o||i.open,children:i.modal?e(nl,{...a,ref:n}):e(rl,{...a,ref:n})})}));tl.displayName=el;var nl=r.forwardRef(((t,n)=>{const o=Ks(el,t.__scopeDialog),a=r.useRef(null),i=He(n,o.contentRef,a);return r.useEffect((()=>{const e=a.current;if(e)return Ni(e)}),[]),e(ol,{...t,ref:i,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:$t(t.onCloseAutoFocus,(e=>{e.preventDefault(),o.triggerRef.current?.focus()})),onPointerDownOutside:$t(t.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:$t(t.onFocusOutside,(e=>e.preventDefault()))})})),rl=r.forwardRef(((t,n)=>{const o=Ks(el,t.__scopeDialog),a=r.useRef(!1),i=r.useRef(!1);return e(ol,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(a.current||o.triggerRef.current?.focus(),e.preventDefault()),a.current=!1,i.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(a.current=!0,"pointerdown"===e.detail.originalEvent.type&&(i.current=!0));const n=e.target,r=o.triggerRef.current?.contains(n);r&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&i.current&&e.preventDefault()}})})),ol=r.forwardRef(((o,a)=>{const{__scopeDialog:i,trapFocus:s,onOpenAutoFocus:l,onCloseAutoFocus:c,...d}=o,u=Ks(el,i),f=r.useRef(null),p=He(a,f);return oo(),n(t,{children:[e(co,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:l,onUnmountAutoFocus:c,children:e(Qr,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":ul(u.open),...d,ref:p,onDismiss:()=>u.onOpenChange(!1)})}),n(t,{children:[e(hl,{titleId:u.titleId}),e(gl,{contentRef:f,descriptionId:u.descriptionId})]})]})})),al="DialogTitle",il=r.forwardRef(((t,n)=>{const{__scopeDialog:r,...o}=t,a=Ks(al,r);return e(Ut.h2,{id:a.titleId,...o,ref:n})}));il.displayName=al;var sl="DialogDescription",ll=r.forwardRef(((t,n)=>{const{__scopeDialog:r,...o}=t,a=Ks(sl,r);return e(Ut.p,{id:a.descriptionId,...o,ref:n})}));ll.displayName=sl;var cl="DialogClose",dl=r.forwardRef(((t,n)=>{const{__scopeDialog:r,...o}=t,a=Ks(cl,r);return e(Ut.button,{type:"button",...o,ref:n,onClick:$t(t.onClick,(()=>a.onOpenChange(!1)))})}));function ul(e){return e?"open":"closed"}dl.displayName=cl;var fl="DialogTitleWarning",[pl,ml]=function(t,n){const o=r.createContext(n),a=t=>{const{children:n,...a}=t,i=r.useMemo((()=>a),Object.values(a));return e(o.Provider,{value:i,children:n})};return a.displayName=t+"Provider",[a,function(e){const a=r.useContext(o);if(a)return a;if(void 0!==n)return n;throw new Error(`\`${e}\` must be used within \`${t}\``)}]}(fl,{contentName:el,titleName:al,docsSlug:"dialog"}),hl=({titleId:e})=>{const t=ml(fl),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 r.useEffect((()=>{if(e){document.getElementById(e)||console.error(n)}}),[n,e]),null},gl=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ml("DialogDescriptionWarning").contentName}}.`;return r.useEffect((()=>{const r=e.current?.getAttribute("aria-describedby");if(t&&r){document.getElementById(t)||console.warn(n)}}),[n,e,t]),null},vl=Bs,bl=$s,wl=Xs,yl=Zs,xl=tl,Nl=il,Cl=ll,kl=dl;const Rl=vl,El=bl,_l=wl,Sl=kl,Pl=r.forwardRef((({className:t,blurred:n=!1,...r},o)=>e(yl,{ref:o,className:Ht("fixed inset-0 z-50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",n?"backdrop-blur":"bg-black/80",t),...r})));Pl.displayName=yl.displayName;const Tl=r.forwardRef((({className:t,blurred:r=!1,children:o,hideCloseButton:a,...i},s)=>n(_l,{children:[e(Pl,{blurred:r}),n(xl,{ref:s,className:Ht("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[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%] sm:rounded-lg",t),...i,onOpenAutoFocus:e=>e.preventDefault(),children:[o,!a&&e(kl,{asChild:!0,className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:e(jt,{variant:"ghost",size:"icon",children:e(g,{size:20})})})]})]})));Tl.displayName=xl.displayName;const Ml=({className:t,...n})=>e("div",{className:Ht("flex flex-col space-y-1.5 text-left",t),...n});Ml.displayName="DialogHeader";const Dl=({className:t,...n})=>e("div",{className:Ht("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...n});Dl.displayName="DialogFooter";const Ol=r.forwardRef((({className:t,...n},r)=>e(Nl,{ref:r,className:Ht("text-lg font-semibold leading-none tracking-tight",t),...n})));Ol.displayName=Nl.displayName;const Al=r.forwardRef((({className:t,...n},r)=>e(Cl,{ref:r,className:Ht("text-sm text-muted-foreground",t),...n})));Al.displayName=Cl.displayName;var Il="rovingFocusGroup.onEntryFocus",Ll={bubbles:!1,cancelable:!0},Fl="RovingFocusGroup",[zl,Wl,Hl]=Vt(Fl),[Gl,jl]=Kt(Fl,[Hl]),[Kl,Bl]=Gl(Fl),Vl=r.forwardRef(((t,n)=>e(zl.Provider,{scope:t.__scopeRovingFocusGroup,children:e(zl.Slot,{scope:t.__scopeRovingFocusGroup,children:e($l,{...t,ref:n})})})));Vl.displayName=Fl;var $l=r.forwardRef(((t,n)=>{const{__scopeRovingFocusGroup:o,orientation:a,loop:i=!1,dir:s,currentTabStopId:l,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:d,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...p}=t,m=r.useRef(null),h=He(n,m),g=yn(s),[v=null,b]=Yt({prop:l,defaultProp:c,onChange:d}),[w,y]=r.useState(!1),x=qt(u),N=Wl(o),C=r.useRef(!1),[k,R]=r.useState(0);return r.useEffect((()=>{const e=m.current;if(e)return e.addEventListener(Il,x),()=>e.removeEventListener(Il,x)}),[x]),e(Kl,{scope:o,orientation:a,dir:g,loop:i,currentTabStopId:v,onItemFocus:r.useCallback((e=>b(e)),[b]),onItemShiftTab:r.useCallback((()=>y(!0)),[]),onFocusableItemAdd:r.useCallback((()=>R((e=>e+1))),[]),onFocusableItemRemove:r.useCallback((()=>R((e=>e-1))),[]),children:e(Ut.div,{tabIndex:w||0===k?-1:0,"data-orientation":a,...p,ref:h,style:{outline:"none",...t.style},onMouseDown:$t(t.onMouseDown,(()=>{C.current=!0})),onFocus:$t(t.onFocus,(e=>{const t=!C.current;if(e.target===e.currentTarget&&t&&!w){const t=new CustomEvent(Il,Ll);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=N().filter((e=>e.focusable));Xl([e.find((e=>e.active)),e.find((e=>e.id===v)),...e].filter(Boolean).map((e=>e.ref.current)),f)}}C.current=!1})),onBlur:$t(t.onBlur,(()=>y(!1)))})})})),ql="RovingFocusGroupItem",Yl=r.forwardRef(((t,n)=>{const{__scopeRovingFocusGroup:o,focusable:a=!0,active:i=!1,tabStopId:s,...l}=t,c=nn(),d=s||c,u=Bl(ql,o),f=u.currentTabStopId===d,p=Wl(o),{onFocusableItemAdd:m,onFocusableItemRemove:h}=u;return r.useEffect((()=>{if(a)return m(),()=>h()}),[a,m,h]),e(zl.ItemSlot,{scope:o,id:d,focusable:a,active:i,children:e(Ut.span,{tabIndex:f?0:-1,"data-orientation":u.orientation,...l,ref:n,onMouseDown:$t(t.onMouseDown,(e=>{a?u.onItemFocus(d):e.preventDefault()})),onFocus:$t(t.onFocus,(()=>u.onItemFocus(d))),onKeyDown:$t(t.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void u.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:Ul[r]}(e,u.orientation,u.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let o=p().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)o.reverse();else if("prev"===t||"next"===t){"prev"===t&&o.reverse();const a=o.indexOf(e.currentTarget);o=u.loop?(r=a+1,(n=o).map(((e,t)=>n[(r+t)%n.length]))):o.slice(a+1)}setTimeout((()=>Xl(o)))}var n,r}))})})}));Yl.displayName=ql;var Ul={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Xl(e,t=!1){const n=document.activeElement;for(const r of e){if(r===n)return;if(r.focus({preventScroll:t}),document.activeElement!==n)return}}var Ql=Vl,Zl=Yl,Jl=["Enter"," "],ec=["ArrowUp","PageDown","End"],tc=["ArrowDown","PageUp","Home",...ec],nc={ltr:[...Jl,"ArrowRight"],rtl:[...Jl,"ArrowLeft"]},rc={ltr:["ArrowLeft"],rtl:["ArrowRight"]},oc="Menu",[ac,ic,sc]=Vt(oc),[lc,cc]=Kt(oc,[sc,Ua,jl]),dc=Ua(),uc=jl(),[fc,pc]=lc(oc),[mc,hc]=lc(oc),gc=t=>{const{__scopeMenu:n,open:o=!1,children:a,dir:i,onOpenChange:s,modal:l=!0}=t,c=dc(n),[d,u]=r.useState(null),f=r.useRef(!1),p=qt(s),m=yn(i);return r.useEffect((()=>{const e=()=>{f.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>f.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}}),[]),e(ui,{...c,children:e(fc,{scope:n,open:o,onOpenChange:p,content:d,onContentChange:u,children:e(mc,{scope:n,onClose:r.useCallback((()=>p(!1)),[p]),isUsingKeyboardRef:f,dir:m,modal:l,children:a})})})};gc.displayName=oc;var vc=r.forwardRef(((t,n)=>{const{__scopeMenu:r,...o}=t,a=dc(r);return e(fi,{...a,...o,ref:n})}));vc.displayName="MenuAnchor";var bc="MenuPortal",[wc,yc]=lc(bc,{forceMount:void 0}),xc=t=>{const{__scopeMenu:n,forceMount:r,children:o,container:a}=t,i=pc(bc,n);return e(wc,{scope:n,forceMount:r,children:e(Zt,{present:r||i.open,children:e(hi,{asChild:!0,container:a,children:o})})})};xc.displayName=bc;var Nc="MenuContent",[Cc,kc]=lc(Nc),Rc=r.forwardRef(((t,n)=>{const r=yc(Nc,t.__scopeMenu),{forceMount:o=r.forceMount,...a}=t,i=pc(Nc,t.__scopeMenu),s=hc(Nc,t.__scopeMenu);return e(ac.Provider,{scope:t.__scopeMenu,children:e(Zt,{present:o||i.open,children:e(ac.Slot,{scope:t.__scopeMenu,children:s.modal?e(Ec,{...a,ref:n}):e(_c,{...a,ref:n})})})})})),Ec=r.forwardRef(((t,n)=>{const o=pc(Nc,t.__scopeMenu),a=r.useRef(null),i=He(n,a);return r.useEffect((()=>{const e=a.current;if(e)return Ni(e)}),[]),e(Sc,{...t,ref:i,trapFocus:o.open,disableOutsidePointerEvents:o.open,disableOutsideScroll:!0,onFocusOutside:$t(t.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>o.onOpenChange(!1)})})),_c=r.forwardRef(((t,n)=>{const r=pc(Nc,t.__scopeMenu);return e(Sc,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})})),Sc=r.forwardRef(((t,n)=>{const{__scopeMenu:o,loop:a=!1,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:l,disableOutsidePointerEvents:c,onEntryFocus:d,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:m,onDismiss:h,disableOutsideScroll:g,...v}=t,b=pc(Nc,o),w=hc(Nc,o),y=dc(o),x=uc(o),N=ic(o),[C,k]=r.useState(null),R=r.useRef(null),E=He(n,R,b.onContentChange),_=r.useRef(0),S=r.useRef(""),P=r.useRef(0),T=r.useRef(null),M=r.useRef("right"),D=r.useRef(0),O=g?cs:r.Fragment,A=g?{as:Ge,allowPinchZoom:!0}:void 0,I=e=>{const t=S.current+e,n=N().filter((e=>!e.disabled)),r=document.activeElement,o=n.find((e=>e.ref.current===r))?.textValue,a=function(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0])),o=r?t[0]:t,a=n?e.indexOf(n):-1;let i=(s=e,l=Math.max(a,0),s.map(((e,t)=>s[(l+t)%s.length])));var s,l;1===o.length&&(i=i.filter((e=>e!==n)));const c=i.find((e=>e.toLowerCase().startsWith(o.toLowerCase())));return c!==n?c:void 0}(n.map((e=>e.textValue)),t,o),i=n.find((e=>e.textValue===a))?.ref.current;!function e(t){S.current=t,window.clearTimeout(_.current),""!==t&&(_.current=window.setTimeout((()=>e("")),1e3))}(t),i&&setTimeout((()=>i.focus()))};r.useEffect((()=>()=>window.clearTimeout(_.current)),[]),oo();const L=r.useCallback((e=>M.current===T.current?.side&&function(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return function(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){const i=t[e].x,s=t[e].y,l=t[a].x,c=t[a].y;s>r!=c>r&&n<(l-i)*(r-s)/(c-s)+i&&(o=!o)}return o}(n,t)}(e,T.current?.area)),[]);return e(Cc,{scope:o,searchRef:S,onItemEnter:r.useCallback((e=>{L(e)&&e.preventDefault()}),[L]),onItemLeave:r.useCallback((e=>{L(e)||(R.current?.focus(),k(null))}),[L]),onTriggerLeave:r.useCallback((e=>{L(e)&&e.preventDefault()}),[L]),pointerGraceTimerRef:P,onPointerGraceIntentChange:r.useCallback((e=>{T.current=e}),[]),children:e(O,{...A,children:e(co,{asChild:!0,trapped:i,onMountAutoFocus:$t(s,(e=>{e.preventDefault(),R.current?.focus({preventScroll:!0})})),onUnmountAutoFocus:l,children:e(Qr,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:m,onDismiss:h,children:e(Ql,{asChild:!0,...x,dir:w.dir,orientation:"vertical",loop:a,currentTabStopId:C,onCurrentTabStopIdChange:k,onEntryFocus:$t(d,(e=>{w.isUsingKeyboardRef.current||e.preventDefault()})),preventScrollOnEntryFocus:!0,children:e(pi,{role:"menu","aria-orientation":"vertical","data-state":nd(b.open),"data-radix-menu-content":"",dir:w.dir,...y,...v,ref:E,style:{outline:"none",...v.style},onKeyDown:$t(v.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&&I(e.key));const o=R.current;if(e.target!==o)return;if(!tc.includes(e.key))return;e.preventDefault();const a=N().filter((e=>!e.disabled)).map((e=>e.ref.current));ec.includes(e.key)&&a.reverse(),function(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}(a)})),onBlur:$t(t.onBlur,(e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(_.current),S.current="")})),onPointerMove:$t(t.onPointerMove,ad((e=>{const t=e.target,n=D.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>D.current?"right":"left";M.current=t,D.current=e.clientX}})))})})})})})})}));Rc.displayName=Nc;var Pc=r.forwardRef(((t,n)=>{const{__scopeMenu:r,...o}=t;return e(Ut.div,{role:"group",...o,ref:n})}));Pc.displayName="MenuGroup";var Tc=r.forwardRef(((t,n)=>{const{__scopeMenu:r,...o}=t;return e(Ut.div,{...o,ref:n})}));Tc.displayName="MenuLabel";var Mc="MenuItem",Dc="menu.itemSelect",Oc=r.forwardRef(((t,n)=>{const{disabled:o=!1,onSelect:a,...i}=t,s=r.useRef(null),l=hc(Mc,t.__scopeMenu),c=kc(Mc,t.__scopeMenu),d=He(n,s),u=r.useRef(!1);return e(Ac,{...i,ref:d,disabled:o,onClick:$t(t.onClick,(()=>{const e=s.current;if(!o&&e){const t=new CustomEvent(Dc,{bubbles:!0,cancelable:!0});e.addEventListener(Dc,(e=>a?.(e)),{once:!0}),Xt(e,t),t.defaultPrevented?u.current=!1:l.onClose()}})),onPointerDown:e=>{t.onPointerDown?.(e),u.current=!0},onPointerUp:$t(t.onPointerUp,(e=>{u.current||e.currentTarget?.click()})),onKeyDown:$t(t.onKeyDown,(e=>{const t=""!==c.searchRef.current;o||t&&" "===e.key||Jl.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}))})}));Oc.displayName=Mc;var Ac=r.forwardRef(((t,n)=>{const{__scopeMenu:o,disabled:a=!1,textValue:i,...s}=t,l=kc(Mc,o),c=uc(o),d=r.useRef(null),u=He(n,d),[f,p]=r.useState(!1),[m,h]=r.useState("");return r.useEffect((()=>{const e=d.current;e&&h((e.textContent??"").trim())}),[s.children]),e(ac.ItemSlot,{scope:o,disabled:a,textValue:i??m,children:e(Zl,{asChild:!0,...c,focusable:!a,children:e(Ut.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":a||void 0,"data-disabled":a?"":void 0,...s,ref:u,onPointerMove:$t(t.onPointerMove,ad((e=>{if(a)l.onItemLeave(e);else if(l.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus({preventScroll:!0})}}))),onPointerLeave:$t(t.onPointerLeave,ad((e=>l.onItemLeave(e)))),onFocus:$t(t.onFocus,(()=>p(!0))),onBlur:$t(t.onBlur,(()=>p(!1)))})})})})),Ic=r.forwardRef(((t,n)=>{const{checked:r=!1,onCheckedChange:o,...a}=t;return e(Kc,{scope:t.__scopeMenu,checked:r,children:e(Oc,{role:"menuitemcheckbox","aria-checked":rd(r)?"mixed":r,...a,ref:n,"data-state":od(r),onSelect:$t(a.onSelect,(()=>o?.(!!rd(r)||!r)),{checkForDefaultPrevented:!1})})})}));Ic.displayName="MenuCheckboxItem";var Lc="MenuRadioGroup",[Fc,zc]=lc(Lc,{value:void 0,onValueChange:()=>{}}),Wc=r.forwardRef(((t,n)=>{const{value:r,onValueChange:o,...a}=t,i=qt(o);return e(Fc,{scope:t.__scopeMenu,value:r,onValueChange:i,children:e(Pc,{...a,ref:n})})}));Wc.displayName=Lc;var Hc="MenuRadioItem",Gc=r.forwardRef(((t,n)=>{const{value:r,...o}=t,a=zc(Hc,t.__scopeMenu),i=r===a.value;return e(Kc,{scope:t.__scopeMenu,checked:i,children:e(Oc,{role:"menuitemradio","aria-checked":i,...o,ref:n,"data-state":od(i),onSelect:$t(o.onSelect,(()=>a.onValueChange?.(r)),{checkForDefaultPrevented:!1})})})}));Gc.displayName=Hc;var jc="MenuItemIndicator",[Kc,Bc]=lc(jc,{checked:!1}),Vc=r.forwardRef(((t,n)=>{const{__scopeMenu:r,forceMount:o,...a}=t,i=Bc(jc,r);return e(Zt,{present:o||rd(i.checked)||!0===i.checked,children:e(Ut.span,{...a,ref:n,"data-state":od(i.checked)})})}));Vc.displayName=jc;var $c=r.forwardRef(((t,n)=>{const{__scopeMenu:r,...o}=t;return e(Ut.div,{role:"separator","aria-orientation":"horizontal",...o,ref:n})}));$c.displayName="MenuSeparator";var qc=r.forwardRef(((t,n)=>{const{__scopeMenu:r,...o}=t,a=dc(r);return e(mi,{...a,...o,ref:n})}));qc.displayName="MenuArrow";var Yc="MenuSub",[Uc,Xc]=lc(Yc),Qc=t=>{const{__scopeMenu:n,children:o,open:a=!1,onOpenChange:i}=t,s=pc(Yc,n),l=dc(n),[c,d]=r.useState(null),[u,f]=r.useState(null),p=qt(i);return r.useEffect((()=>(!1===s.open&&p(!1),()=>p(!1))),[s.open,p]),e(ui,{...l,children:e(fc,{scope:n,open:a,onOpenChange:p,content:u,onContentChange:f,children:e(Uc,{scope:n,contentId:nn(),triggerId:nn(),trigger:c,onTriggerChange:d,children:o})})})};Qc.displayName=Yc;var Zc="MenuSubTrigger",Jc=r.forwardRef(((t,n)=>{const o=pc(Zc,t.__scopeMenu),a=hc(Zc,t.__scopeMenu),i=Xc(Zc,t.__scopeMenu),s=kc(Zc,t.__scopeMenu),l=r.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:d}=s,u={__scopeMenu:t.__scopeMenu},f=r.useCallback((()=>{l.current&&window.clearTimeout(l.current),l.current=null}),[]);return r.useEffect((()=>f),[f]),r.useEffect((()=>{const e=c.current;return()=>{window.clearTimeout(e),d(null)}}),[c,d]),e(vc,{asChild:!0,...u,children:e(Ac,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":i.contentId,"data-state":nd(o.open),...t,ref:We(n,i.onTriggerChange),onClick:e=>{t.onClick?.(e),t.disabled||e.defaultPrevented||(e.currentTarget.focus(),o.open||o.onOpenChange(!0))},onPointerMove:$t(t.onPointerMove,ad((e=>{s.onItemEnter(e),e.defaultPrevented||t.disabled||o.open||l.current||(s.onPointerGraceIntentChange(null),l.current=window.setTimeout((()=>{o.onOpenChange(!0),f()}),100))}))),onPointerLeave:$t(t.onPointerLeave,ad((e=>{f();const t=o.content?.getBoundingClientRect();if(t){const n=o.content?.dataset.side,r="right"===n,a=r?-5:5,i=t[r?"left":"right"],l=t[r?"right":"left"];s.onPointerGraceIntentChange({area:[{x:e.clientX+a,y:e.clientY},{x:i,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:i,y:t.bottom}],side:n}),window.clearTimeout(c.current),c.current=window.setTimeout((()=>s.onPointerGraceIntentChange(null)),300)}else{if(s.onTriggerLeave(e),e.defaultPrevented)return;s.onPointerGraceIntentChange(null)}}))),onKeyDown:$t(t.onKeyDown,(e=>{const n=""!==s.searchRef.current;t.disabled||n&&" "===e.key||nc[a.dir].includes(e.key)&&(o.onOpenChange(!0),o.content?.focus(),e.preventDefault())}))})})}));Jc.displayName=Zc;var ed="MenuSubContent",td=r.forwardRef(((t,n)=>{const o=yc(Nc,t.__scopeMenu),{forceMount:a=o.forceMount,...i}=t,s=pc(Nc,t.__scopeMenu),l=hc(Nc,t.__scopeMenu),c=Xc(ed,t.__scopeMenu),d=r.useRef(null),u=He(n,d);return e(ac.Provider,{scope:t.__scopeMenu,children:e(Zt,{present:a||s.open,children:e(ac.Slot,{scope:t.__scopeMenu,children:e(Sc,{id:c.contentId,"aria-labelledby":c.triggerId,...i,ref:u,align:"start",side:"rtl"===l.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{l.isUsingKeyboardRef.current&&d.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:$t(t.onFocusOutside,(e=>{e.target!==c.trigger&&s.onOpenChange(!1)})),onEscapeKeyDown:$t(t.onEscapeKeyDown,(e=>{l.onClose(),e.preventDefault()})),onKeyDown:$t(t.onKeyDown,(e=>{const t=e.currentTarget.contains(e.target),n=rc[l.dir].includes(e.key);t&&n&&(s.onOpenChange(!1),c.trigger?.focus(),e.preventDefault())}))})})})})}));function nd(e){return e?"open":"closed"}function rd(e){return"indeterminate"===e}function od(e){return rd(e)?"indeterminate":e?"checked":"unchecked"}function ad(e){return t=>"mouse"===t.pointerType?e(t):void 0}td.displayName=ed;var id=gc,sd=vc,ld=xc,cd=Rc,dd=Pc,ud=Tc,fd=Oc,pd=Ic,md=Wc,hd=Gc,gd=Vc,vd=$c,bd=qc,wd=Qc,yd=Jc,xd=td,Nd="DropdownMenu",[Cd,kd]=Kt(Nd,[cc]),Rd=cc(),[Ed,_d]=Cd(Nd),Sd=t=>{const{__scopeDropdownMenu:n,children:o,dir:a,open:i,defaultOpen:s,onOpenChange:l,modal:c=!0}=t,d=Rd(n),u=r.useRef(null),[f=!1,p]=Yt({prop:i,defaultProp:s,onChange:l});return e(Ed,{scope:n,triggerId:nn(),triggerRef:u,contentId:nn(),open:f,onOpenChange:p,onOpenToggle:r.useCallback((()=>p((e=>!e))),[p]),modal:c,children:e(id,{...d,open:f,onOpenChange:p,dir:a,modal:c,children:o})})};Sd.displayName=Nd;var Pd="DropdownMenuTrigger",Td=r.forwardRef(((t,n)=>{const{__scopeDropdownMenu:r,disabled:o=!1,...a}=t,i=_d(Pd,r),s=Rd(r);return e(sd,{asChild:!0,...s,children:e(Ut.button,{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":o?"":void 0,disabled:o,...a,ref:We(n,i.triggerRef),onPointerDown:$t(t.onPointerDown,(e=>{o||0!==e.button||!1!==e.ctrlKey||(i.onOpenToggle(),i.open||e.preventDefault())})),onKeyDown:$t(t.onKeyDown,(e=>{o||(["Enter"," "].includes(e.key)&&i.onOpenToggle(),"ArrowDown"===e.key&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())}))})})}));Td.displayName=Pd;var Md=t=>{const{__scopeDropdownMenu:n,...r}=t,o=Rd(n);return e(ld,{...o,...r})};Md.displayName="DropdownMenuPortal";var Dd="DropdownMenuContent",Od=r.forwardRef(((t,n)=>{const{__scopeDropdownMenu:o,...a}=t,i=_d(Dd,o),s=Rd(o),l=r.useRef(!1);return e(cd,{id:i.contentId,"aria-labelledby":i.triggerId,...s,...a,ref:n,onCloseAutoFocus:$t(t.onCloseAutoFocus,(e=>{l.current||i.triggerRef.current?.focus(),l.current=!1,e.preventDefault()})),onInteractOutside:$t(t.onInteractOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;i.modal&&!r||(l.current=!0)})),style:{...t.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)"}})}));Od.displayName=Dd;var Ad=r.forwardRef(((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,a=Rd(r);return e(dd,{...a,...o,ref:n})}));Ad.displayName="DropdownMenuGroup";var Id=r.forwardRef(((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,a=Rd(r);return e(ud,{...a,...o,ref:n})}));Id.displayName="DropdownMenuLabel";var Ld=r.forwardRef(((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,a=Rd(r);return e(fd,{...a,...o,ref:n})}));Ld.displayName="DropdownMenuItem";var Fd=r.forwardRef(((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,a=Rd(r);return e(pd,{...a,...o,ref:n})}));Fd.displayName="DropdownMenuCheckboxItem";var zd=r.forwardRef(((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,a=Rd(r);return e(md,{...a,...o,ref:n})}));zd.displayName="DropdownMenuRadioGroup";var Wd=r.forwardRef(((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,a=Rd(r);return e(hd,{...a,...o,ref:n})}));Wd.displayName="DropdownMenuRadioItem";var Hd=r.forwardRef(((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,a=Rd(r);return e(gd,{...a,...o,ref:n})}));Hd.displayName="DropdownMenuItemIndicator";var Gd=r.forwardRef(((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,a=Rd(r);return e(vd,{...a,...o,ref:n})}));Gd.displayName="DropdownMenuSeparator";r.forwardRef(((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,a=Rd(r);return e(bd,{...a,...o,ref:n})})).displayName="DropdownMenuArrow";var jd=r.forwardRef(((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,a=Rd(r);return e(yd,{...a,...o,ref:n})}));jd.displayName="DropdownMenuSubTrigger";var Kd=r.forwardRef(((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,a=Rd(r);return e(xd,{...a,...o,ref:n,style:{...t.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)"}})}));Kd.displayName="DropdownMenuSubContent";var Bd=Md,Vd=Od,$d=Id,qd=Ld,Yd=Fd,Ud=Wd,Xd=Hd,Qd=Gd,Zd=jd,Jd=Kd;const eu=Sd,tu=Td,nu=Ad,ru=Bd,ou=t=>{const{__scopeDropdownMenu:n,children:r,open:o,onOpenChange:a,defaultOpen:i}=t,s=Rd(n),[l=!1,c]=Yt({prop:o,defaultProp:i,onChange:a});return e(wd,{...s,open:l,onOpenChange:c,children:r})},au=zd,iu=r.forwardRef((({className:t,inset:r,children:o,...a},i)=>n(Zd,{ref:i,className:Ht("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",r&&"pl-8",t),...a,children:[o,e(f,{className:"ml-auto"})]})));iu.displayName=Zd.displayName;const su=r.forwardRef((({className:t,...n},r)=>e(Jd,{ref:r,className:Ht("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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",t),...n})));su.displayName=Jd.displayName;const lu=r.forwardRef((({className:t,sideOffset:n=4,...r},o)=>e(Bd,{children:e(Vd,{ref:o,sideOffset:n,className:Ht("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","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",t),...r})})));lu.displayName=Vd.displayName;const cu=r.forwardRef((({className:t,inset:n,...r},o)=>e(qd,{ref:o,className:Ht("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",n&&"pl-8",t),...r})));cu.displayName=qd.displayName;const du=r.forwardRef((({className:t,children:r,checked:o,...a},i)=>n(Yd,{ref:i,className:Ht("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),checked:o,...a,children:[e("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e(Xd,{children:e(m,{className:"h-4 w-4"})})}),r]})));du.displayName=Yd.displayName;const uu=r.forwardRef((({className:t,children:r,...o},a)=>n(Ud,{ref:a,className:Ht("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...o,children:[e("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e(Xd,{children:e(v,{className:"h-2 w-2 fill-current"})})}),r]})));uu.displayName=Ud.displayName;const fu=r.forwardRef((({className:t,inset:n,...r},o)=>e($d,{ref:o,className:Ht("px-2 py-1.5 text-sm font-semibold",n&&"pl-8",t),...r})));fu.displayName=$d.displayName;const pu=r.forwardRef((({className:t,...n},r)=>e(Qd,{ref:r,className:Ht("-mx-1 my-1 h-px bg-muted",t),...n})));pu.displayName=Qd.displayName;const mu=({className:t,...n})=>e("span",{className:Ht("ml-auto text-xs tracking-widest opacity-60",t),...n});mu.displayName="DropdownMenuShortcut";const hu=t=>{const{className:n,children:r,variant:o="default",weight:a="normal",as:i="p",truncate:s=!1,...l}=t;return e(i,{className:Ht("text-sm",s&&"block truncate",{black:"font-black",extrabold:"font-extrabold",bold:"font-bold",semibold:"font-semibold",medium:"font-medium",light:"font-light",extraLight:"font-extralight",normal:""}[a],"default"!==o&&{default:"",error:"text-destructive",secondary:"text-muted-foreground",primary:"text-primary"}[o],n),...l,children:r})},gu=t=>{const{field:r,value:o,className:a,variant:i="flex",truncate:s=!0,...l}=t;return n(Br,{className:Ht("flex"===i?"justify-between gap-[2px] max-sm:flex-col max-sm:items-start":"grid grid-cols-2 max-sm:grid-cols-1 max-sm:gap-1",a),...l,children:[e(hu,{as:"span",variant:"secondary",truncate:s,children:r}),e(hu,{truncate:s,as:"div",children:o})]})},vu=t=>{const{field:r,value:o,className:a,variant:i="flex",truncate:l=!0,...c}=t,[d,u]=s(!1);return n(Br,{className:Ht("flex"===i?"justify-between gap-[2px] max-sm:flex-col max-sm:items-start":"grid grid-cols-2 max-sm:grid-cols-1 max-sm:gap-1",a),...c,children:[e(hu,{as:"span",variant:"secondary",truncate:l,children:r}),n(hu,{truncate:l,as:"div",className:"flex items-center gap-2",children:[o,e("span",{className:"inline-block cursor-pointer",children:d?e(m,{size:13}):e(b,{onClick:()=>{S(o)&&(u(!0),setTimeout((()=>u(!1)),1e3))},size:13})})]})]})};var bu,wu="HoverCard",[yu,xu]=Kt(wu,[Ua]),Nu=Ua(),[Cu,ku]=yu(wu),Ru=t=>{const{__scopeHoverCard:n,children:o,open:a,defaultOpen:i,onOpenChange:s,openDelay:l=700,closeDelay:c=300}=t,d=Nu(n),u=r.useRef(0),f=r.useRef(0),p=r.useRef(!1),m=r.useRef(!1),[h=!1,g]=Yt({prop:a,defaultProp:i,onChange:s}),v=r.useCallback((()=>{clearTimeout(f.current),u.current=window.setTimeout((()=>g(!0)),l)}),[l,g]),b=r.useCallback((()=>{clearTimeout(u.current),p.current||m.current||(f.current=window.setTimeout((()=>g(!1)),c))}),[c,g]),w=r.useCallback((()=>g(!1)),[g]);return r.useEffect((()=>()=>{clearTimeout(u.current),clearTimeout(f.current)}),[]),e(Cu,{scope:n,open:h,onOpenChange:g,onOpen:v,onClose:b,onDismiss:w,hasSelectionRef:p,isPointerDownOnContentRef:m,children:e(ui,{...d,children:o})})};Ru.displayName=wu;var Eu="HoverCardTrigger",_u=r.forwardRef(((t,n)=>{const{__scopeHoverCard:r,...o}=t,a=ku(Eu,r),i=Nu(r);return e(fi,{asChild:!0,...i,children:e(Ut.a,{"data-state":a.open?"open":"closed",...o,ref:n,onPointerEnter:$t(t.onPointerEnter,Ou(a.onOpen)),onPointerLeave:$t(t.onPointerLeave,Ou(a.onClose)),onFocus:$t(t.onFocus,a.onOpen),onBlur:$t(t.onBlur,a.onClose),onTouchStart:$t(t.onTouchStart,(e=>e.preventDefault()))})})}));_u.displayName=Eu;var[Su,Pu]=yu("HoverCardPortal",{forceMount:void 0}),Tu="HoverCardContent",Mu=r.forwardRef(((t,n)=>{const r=Pu(Tu,t.__scopeHoverCard),{forceMount:o=r.forceMount,...a}=t,i=ku(Tu,t.__scopeHoverCard);return e(Zt,{present:o||i.open,children:e(Du,{"data-state":i.open?"open":"closed",...a,onPointerEnter:$t(t.onPointerEnter,Ou(i.onOpen)),onPointerLeave:$t(t.onPointerLeave,Ou(i.onClose)),ref:n})})}));Mu.displayName=Tu;var Du=r.forwardRef(((t,n)=>{const{__scopeHoverCard:o,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:l,...c}=t,d=ku(Tu,o),u=Nu(o),f=r.useRef(null),p=He(n,f),[m,h]=r.useState(!1);return r.useEffect((()=>{if(m){const e=document.body;return bu=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect="none",e.style.webkitUserSelect="none",()=>{e.style.userSelect=bu,e.style.webkitUserSelect=bu}}}),[m]),r.useEffect((()=>{if(f.current){const e=()=>{h(!1),d.isPointerDownOnContentRef.current=!1,setTimeout((()=>{""!==document.getSelection()?.toString()&&(d.hasSelectionRef.current=!0)}))};return document.addEventListener("pointerup",e),()=>{document.removeEventListener("pointerup",e),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!1}}}),[d.isPointerDownOnContentRef,d.hasSelectionRef]),r.useEffect((()=>{if(f.current){(function(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})(f.current).forEach((e=>e.setAttribute("tabindex","-1")))}})),e(Qr,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:l,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:$t(s,(e=>{e.preventDefault()})),onDismiss:d.onDismiss,children:e(pi,{...u,...c,onPointerDown:$t(c.onPointerDown,(e=>{e.currentTarget.contains(e.target)&&h(!0),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!0})),ref:p,style:{...c.style,userSelect:m?"text":void 0,WebkitUserSelect:m?"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 Ou(e){return t=>"touch"===t.pointerType?void 0:e()}r.forwardRef(((t,n)=>{const{__scopeHoverCard:r,...o}=t,a=Nu(r);return e(mi,{...a,...o,ref:n})})).displayName="HoverCardArrow";var Au=Mu;const Iu=Ru,Lu=_u,Fu=r.forwardRef((({className:t,align:n="center",sideOffset:r=4,...o},a)=>e(Au,{ref:a,align:n,sideOffset:r,className:Ht("z-50 w-64 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",t),...o})));Fu.displayName=Au.displayName;const zu=r.forwardRef((({className:t,type:n,...r},o)=>e("input",{type:n,className:Ht("input",t),ref:o,...r})));zu.displayName="Input";const Wu=r.forwardRef((({className:t,type:r,error:o,wrapClassName:a,...i},s)=>n("div",{className:Ht("relative",a),children:[n("div",{className:Ht("input__wrap",a),"data-error":Boolean(o),children:[e("input",{type:r,className:Ht("input",t),ref:s,...i}),o&&e(w,{size:20,className:"input__state"})]}),o&&e("span",{className:"input__error",children:o})]})));Wu.displayName="FormInput";var Hu=r.forwardRef(((t,n)=>e(Ut.label,{...t,ref:n,onMouseDown:e=>{e.target.closest("button, input, select, textarea")||(t.onMouseDown?.(e),!e.defaultPrevented&&e.detail>1&&e.preventDefault())}})));Hu.displayName="Label";var Gu=Hu;const ju=qe("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ku=r.forwardRef((({className:t,...n},r)=>e(Gu,{ref:r,className:Ht(ju(),t),...n})));Ku.displayName=Gu.displayName;const Bu=({size:t,className:n,fullHeight:r,flexGrow:o,fullWidth:a=!0,...i})=>e("div",{className:Ht("flex items-center justify-center",r&&"h-full",o&&"flex-grow",a&&"w-full"),...i,children:e(d,{size:t||30,className:Ht("animate-spin stroke-primary",n)})}),Vu=l(((t,n)=>{const{className:r,type:o,value:a,max:i,onChange:s,...l}=t,c=(e=>e?isNaN(parseInt(e.replace(/\s+/g,""),10))?"0":parseInt(e.replace(/\s+/g,""),10).toLocaleString("ru-RU"):"")(String(a||""))||0;return e(zu,{ref:n,type:o,value:c,onChange:e=>{let t=e.target.value.replace(/\s+/g,"");if(t.length>1&&t.startsWith("0")&&(t=t.slice(1)),/^\d*$/.test(t))return i&&parseInt(t)>i?s?.(String(i)):void s?.(t)},className:r,...l})}));Vu.displayName="NumericInput";const $u=({className:t,...n})=>e("nav",{role:"navigation","aria-label":"pagination",className:Ht("mx-auto flex w-full",t),...n});$u.displayName="PaginationNav";const qu=r.forwardRef((({className:t,...n},r)=>e("ul",{ref:r,className:Ht("flex flex-row items-center gap-1",t),...n})));qu.displayName="PaginationContent";const Yu=r.memo((({className:t,isActive:n,children:r,size:o="icon",onClick:a})=>e("li",{onClick:a,className:Ht(Gt({variant:n?"outline":"ghost",size:o}),t,"cursor-pointer"),children:r})));Yu.displayName="PaginationItem";const Uu=r.memo((({limit:n,total:o,offset:a,onChange:i,className:s})=>{const l=Math.ceil(o/n),c=0===a?1:l-Math.ceil((o-a)/n)+1,d=r.useCallback((e=>{if(c===e)return;document.body.offsetHeight>window.innerHeight&&window.scrollTo({top:0,left:0,behavior:"smooth"}),i(e)}),[c,i]);return o<=n?null:e($u,{className:s,children:e(qu,{children:l>1&&e(t,{children:Array.from({length:7},((e,t)=>c-3+t)).map((t=>t<1||t>l?null:e(Yu,{isActive:t===c,onClick:()=>d(t),children:t},t)))})})})}));var Xu="Progress",Qu=100,[Zu,Ju]=Kt(Xu),[ef,tf]=Zu(Xu),nf=r.forwardRef(((t,n)=>{const{__scopeProgress:r,value:o=null,max:a,getValueLabel:i=af,...s}=t;!a&&0!==a||cf(a)||console.error(`Invalid prop \`max\` of value \`${`${a}`}\` supplied to \`${"Progress"}\`. Only numbers greater than 0 are valid max values. Defaulting to \`100\`.`);const l=cf(a)?a:Qu;null===o||df(o,l)||console.error(function(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:\n - a positive number\n - less than the value passed to \`max\` (or 100 if no \`max\` prop is set)\n - \`null\` or \`undefined\` if the progress is indeterminate.\n\nDefaulting to \`null\`.`}(`${o}`,"Progress"));const c=df(o,l)?o:null,d=lf(c)?i(c,l):void 0;return e(ef,{scope:r,value:c,max:l,children:e(Ut.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":lf(c)?c:void 0,"aria-valuetext":d,role:"progressbar","data-state":sf(c,l),"data-value":c??void 0,"data-max":l,...s,ref:n})})}));nf.displayName=Xu;var rf="ProgressIndicator",of=r.forwardRef(((t,n)=>{const{__scopeProgress:r,...o}=t,a=tf(rf,r);return e(Ut.div,{"data-state":sf(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...o,ref:n})}));function af(e,t){return`${Math.round(e/t*100)}%`}function sf(e,t){return null==e?"indeterminate":e===t?"complete":"loading"}function lf(e){return"number"==typeof e}function cf(e){return lf(e)&&!isNaN(e)&&e>0}function df(e,t){return lf(e)&&!isNaN(e)&&e<=t&&e>=0}of.displayName=rf;var uf=nf,ff=of;const pf=r.forwardRef((({className:t,value:n,...r},o)=>e(uf,{ref:o,className:Ht("relative h-4 w-full overflow-hidden rounded-full bg-secondary",t),...r,children:e(ff,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(n||0)}%)`}})})));pf.displayName=uf.displayName;const mf=({children:t,className:n,isLoading:r,...o})=>r?e(Bu,{fullHeight:!0}):e(Kr,{className:Ht("flex flex-col overflow-scroll rounded-md border p-3",{"h-[200px]":!n},n),...o,children:t});function hf(e,[t,n]){return Math.min(n,Math.max(t,e))}var gf=r.forwardRef(((t,n)=>e(Ut.span,{...t,ref:n,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",...t.style}})));gf.displayName="VisuallyHidden";var vf=gf,bf=[" ","Enter","ArrowUp","ArrowDown"],wf=[" ","Enter"],yf="Select",[xf,Nf,Cf]=Vt(yf),[kf,Rf]=Kt(yf,[Cf,Ua]),Ef=Ua(),[_f,Sf]=kf(yf),[Pf,Tf]=kf(yf),Mf=t=>{const{__scopeSelect:o,children:a,open:i,defaultOpen:s,onOpenChange:l,value:c,defaultValue:d,onValueChange:u,dir:f,name:p,autoComplete:m,disabled:h,required:g,form:v}=t,b=Ef(o),[w,y]=r.useState(null),[x,N]=r.useState(null),[C,k]=r.useState(!1),R=yn(f),[E=!1,_]=Yt({prop:i,defaultProp:s,onChange:l}),[S,P]=Yt({prop:c,defaultProp:d,onChange:u}),T=r.useRef(null),M=!w||(v||!!w.closest("form")),[D,O]=r.useState(new Set),A=Array.from(D).map((e=>e.props.value)).join(";");return e(ui,{...b,children:n(_f,{required:g,scope:o,trigger:w,onTriggerChange:y,valueNode:x,onValueNodeChange:N,valueNodeHasChildren:C,onValueNodeHasChildrenChange:k,contentId:nn(),value:S,onValueChange:P,open:E,onOpenChange:_,dir:R,triggerPointerDownPosRef:T,disabled:h,children:[e(xf.Provider,{scope:o,children:e(Pf,{scope:t.__scopeSelect,onNativeOptionAdd:r.useCallback((e=>{O((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:r.useCallback((e=>{O((t=>{const n=new Set(t);return n.delete(e),n}))}),[]),children:a})}),M?n(bp,{"aria-hidden":!0,required:g,tabIndex:-1,name:p,autoComplete:m,value:S,onChange:e=>P(e.target.value),disabled:h,form:v,children:[void 0===S?e("option",{value:""}):null,Array.from(D)]},A):null]})})};Mf.displayName=yf;var Df="SelectTrigger",Of=r.forwardRef(((t,n)=>{const{__scopeSelect:o,disabled:a=!1,...i}=t,s=Ef(o),l=Sf(Df,o),c=l.disabled||a,d=He(n,l.onTriggerChange),u=Nf(o),f=r.useRef("touch"),[p,m,h]=wp((e=>{const t=u().filter((e=>!e.disabled)),n=t.find((e=>e.value===l.value)),r=yp(t,e,n);void 0!==r&&l.onValueChange(r.value)})),g=e=>{c||(l.onOpenChange(!0),h()),e&&(l.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return e(fi,{asChild:!0,...s,children:e(Ut.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":vp(l.value)?"":void 0,...i,ref:d,onClick:$t(i.onClick,(e=>{e.currentTarget.focus(),"mouse"!==f.current&&g(e)})),onPointerDown:$t(i.onPointerDown,(e=>{f.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(g(e),e.preventDefault())})),onKeyDown:$t(i.onKeyDown,(e=>{const t=""!==p.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||m(e.key),t&&" "===e.key||bf.includes(e.key)&&(g(),e.preventDefault())}))})})}));Of.displayName=Df;var Af="SelectValue",If=r.forwardRef(((n,r)=>{const{__scopeSelect:o,className:a,style:i,children:s,placeholder:l="",...c}=n,d=Sf(Af,o),{onValueNodeHasChildrenChange:u}=d,f=void 0!==s,p=He(r,d.onValueNodeChange);return Qt((()=>{u(f)}),[u,f]),e(Ut.span,{...c,ref:p,style:{pointerEvents:"none"},children:vp(d.value)?e(t,{children:l}):s})}));If.displayName=Af;var Lf=r.forwardRef(((t,n)=>{const{__scopeSelect:r,children:o,...a}=t;return e(Ut.span,{"aria-hidden":!0,...a,ref:n,children:o||"▼"})}));Lf.displayName="SelectIcon";var Ff=t=>e(hi,{asChild:!0,...t});Ff.displayName="SelectPortal";var zf="SelectContent",Wf=r.forwardRef(((t,n)=>{const o=Sf(zf,t.__scopeSelect),[a,i]=r.useState();if(Qt((()=>{i(new DocumentFragment)}),[]),!o.open){const n=a;return n?k.createPortal(e(Gf,{scope:t.__scopeSelect,children:e(xf.Slot,{scope:t.__scopeSelect,children:e("div",{children:t.children})})}),n):null}return e(Kf,{...t,ref:n})}));Wf.displayName=zf;var Hf=10,[Gf,jf]=kf(zf),Kf=r.forwardRef(((t,n)=>{const{__scopeSelect:o,position:a="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:l,side:c,sideOffset:d,align:u,alignOffset:f,arrowPadding:p,collisionBoundary:m,collisionPadding:h,sticky:g,hideWhenDetached:v,avoidCollisions:b,...w}=t,y=Sf(zf,o),[x,N]=r.useState(null),[C,k]=r.useState(null),R=He(n,(e=>N(e))),[E,_]=r.useState(null),[S,P]=r.useState(null),T=Nf(o),[M,D]=r.useState(!1),O=r.useRef(!1);r.useEffect((()=>{if(x)return Ni(x)}),[x]),oo();const A=r.useCallback((e=>{const[t,...n]=T().map((e=>e.ref.current)),[r]=n.slice(-1),o=document.activeElement;for(const n of e){if(n===o)return;if(n?.scrollIntoView({block:"nearest"}),n===t&&C&&(C.scrollTop=0),n===r&&C&&(C.scrollTop=C.scrollHeight),n?.focus(),document.activeElement!==o)return}}),[T,C]),I=r.useCallback((()=>A([E,x])),[A,E,x]);r.useEffect((()=>{M&&I()}),[M,I]);const{onOpenChange:L,triggerPointerDownPosRef:F}=y;r.useEffect((()=>{if(x){let e={x:0,y:0};const t=t=>{e={x:Math.abs(Math.round(t.pageX)-(F.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(F.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():x.contains(n.target)||L(!1),document.removeEventListener("pointermove",t),F.current=null};return null!==F.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}}),[x,L,F]),r.useEffect((()=>{const e=()=>L(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[L]);const[z,W]=wp((e=>{const t=T().filter((e=>!e.disabled)),n=t.find((e=>e.ref.current===document.activeElement)),r=yp(t,e,n);r&&setTimeout((()=>r.ref.current.focus()))})),H=r.useCallback(((e,t,n)=>{const r=!O.current&&!n;(void 0!==y.value&&y.value===t||r)&&(_(e),r&&(O.current=!0))}),[y.value]),G=r.useCallback((()=>x?.focus()),[x]),j=r.useCallback(((e,t,n)=>{const r=!O.current&&!n;(void 0!==y.value&&y.value===t||r)&&P(e)}),[y.value]),K="popper"===a?Vf:Bf,B=K===Vf?{side:c,sideOffset:d,align:u,alignOffset:f,arrowPadding:p,collisionBoundary:m,collisionPadding:h,sticky:g,hideWhenDetached:v,avoidCollisions:b}:{};return e(Gf,{scope:o,content:x,viewport:C,onViewportChange:k,itemRefCallback:H,selectedItem:E,onItemLeave:G,itemTextRefCallback:j,focusSelectedItem:I,selectedItemText:S,position:a,isPositioned:M,searchRef:z,children:e(cs,{as:Ge,allowPinchZoom:!0,children:e(co,{asChild:!0,trapped:y.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:$t(i,(e=>{y.trigger?.focus({preventScroll:!0}),e.preventDefault()})),children:e(Qr,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:e(K,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:e=>e.preventDefault(),...w,...B,onPlaced:()=>D(!0),ref:R,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:$t(w.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||W(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=T().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((()=>A(t))),e.preventDefault()}}))})})})})})}));Kf.displayName="SelectContentImpl";var Bf=r.forwardRef(((t,n)=>{const{__scopeSelect:o,onPlaced:a,...i}=t,s=Sf(zf,o),l=jf(zf,o),[c,d]=r.useState(null),[u,f]=r.useState(null),p=He(n,(e=>f(e))),m=Nf(o),h=r.useRef(!1),g=r.useRef(!0),{viewport:v,selectedItem:b,selectedItemText:w,focusSelectedItem:y}=l,x=r.useCallback((()=>{if(s.trigger&&s.valueNode&&c&&u&&v&&b&&w){const e=s.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),n=s.valueNode.getBoundingClientRect(),r=w.getBoundingClientRect();if("rtl"!==s.dir){const o=r.left-t.left,a=n.left-o,i=e.left-a,s=e.width+i,l=Math.max(s,t.width),d=window.innerWidth-Hf,u=hf(a,[Hf,Math.max(Hf,d-l)]);c.style.minWidth=s+"px",c.style.left=u+"px"}else{const o=t.right-r.right,a=window.innerWidth-n.right-o,i=window.innerWidth-e.right-a,s=e.width+i,l=Math.max(s,t.width),d=window.innerWidth-Hf,u=hf(a,[Hf,Math.max(Hf,d-l)]);c.style.minWidth=s+"px",c.style.right=u+"px"}const o=m(),i=window.innerHeight-2*Hf,l=v.scrollHeight,d=window.getComputedStyle(u),f=parseInt(d.borderTopWidth,10),p=parseInt(d.paddingTop,10),g=parseInt(d.borderBottomWidth,10),y=f+p+l+parseInt(d.paddingBottom,10)+g,x=Math.min(5*b.offsetHeight,y),N=window.getComputedStyle(v),C=parseInt(N.paddingTop,10),k=parseInt(N.paddingBottom,10),R=e.top+e.height/2-Hf,E=i-R,_=b.offsetHeight/2,S=f+p+(b.offsetTop+_),P=y-S;if(S<=R){const e=o.length>0&&b===o[o.length-1].ref.current;c.style.bottom="0px";const t=u.clientHeight-v.offsetTop-v.offsetHeight,n=S+Math.max(E,_+(e?k:0)+t+g);c.style.height=n+"px"}else{const e=o.length>0&&b===o[0].ref.current;c.style.top="0px";const t=Math.max(R,f+v.offsetTop+(e?C:0)+_)+P;c.style.height=t+"px",v.scrollTop=S-R+v.offsetTop}c.style.margin=`${Hf}px 0`,c.style.minHeight=x+"px",c.style.maxHeight=i+"px",a?.(),requestAnimationFrame((()=>h.current=!0))}}),[m,s.trigger,s.valueNode,c,u,v,b,w,s.dir,a]);Qt((()=>x()),[x]);const[N,C]=r.useState();Qt((()=>{u&&C(window.getComputedStyle(u).zIndex)}),[u]);const k=r.useCallback((e=>{e&&!0===g.current&&(x(),y?.(),g.current=!1)}),[x,y]);return e($f,{scope:o,contentWrapper:c,shouldExpandOnScrollRef:h,onScrollButtonChange:k,children:e("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:N},children:e(Ut.div,{...i,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})}));Bf.displayName="SelectItemAlignedPosition";var Vf=r.forwardRef(((t,n)=>{const{__scopeSelect:r,align:o="start",collisionPadding:a=Hf,...i}=t,s=Ef(r);return e(pi,{...s,...i,ref:n,align:o,collisionPadding:a,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)"}})}));Vf.displayName="SelectPopperPosition";var[$f,qf]=kf(zf,{}),Yf="SelectViewport",Uf=r.forwardRef(((o,a)=>{const{__scopeSelect:i,nonce:s,...l}=o,c=jf(Yf,i),d=qf(Yf,i),u=He(a,c.onViewportChange),f=r.useRef(0);return n(t,{children:[e("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}"},nonce:s}),e(xf.Slot,{scope:i,children:e(Ut.div,{"data-radix-select-viewport":"",role:"presentation",...l,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...l.style},onScroll:$t(l.onScroll,(e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=d;if(r?.current&&n){const e=Math.abs(f.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*Hf,o=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),i=Math.max(o,a);if(i<r){const o=i+e,a=Math.min(r,o),s=o-a;n.style.height=a+"px","0px"===n.style.bottom&&(t.scrollTop=s>0?s:0,n.style.justifyContent="flex-end")}}}f.current=t.scrollTop}))})})]})}));Uf.displayName=Yf;var Xf="SelectGroup",[Qf,Zf]=kf(Xf),Jf=r.forwardRef(((t,n)=>{const{__scopeSelect:r,...o}=t,a=nn();return e(Qf,{scope:r,id:a,children:e(Ut.div,{role:"group","aria-labelledby":a,...o,ref:n})})}));Jf.displayName=Xf;var ep="SelectLabel",tp=r.forwardRef(((t,n)=>{const{__scopeSelect:r,...o}=t,a=Zf(ep,r);return e(Ut.div,{id:a.id,...o,ref:n})}));tp.displayName=ep;var np="SelectItem",[rp,op]=kf(np),ap=r.forwardRef(((t,n)=>{const{__scopeSelect:o,value:a,disabled:i=!1,textValue:s,...l}=t,c=Sf(np,o),d=jf(np,o),u=c.value===a,[f,p]=r.useState(s??""),[m,h]=r.useState(!1),g=He(n,(e=>d.itemRefCallback?.(e,a,i))),v=nn(),b=r.useRef("touch"),w=()=>{i||(c.onValueChange(a),c.onOpenChange(!1))};if(""===a)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 e(rp,{scope:o,value:a,disabled:i,textId:v,isSelected:u,onItemTextChange:r.useCallback((e=>{p((t=>t||(e?.textContent??"").trim()))}),[]),children:e(xf.ItemSlot,{scope:o,value:a,disabled:i,textValue:f,children:e(Ut.div,{role:"option","aria-labelledby":v,"data-highlighted":m?"":void 0,"aria-selected":u&&m,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...l,ref:g,onFocus:$t(l.onFocus,(()=>h(!0))),onBlur:$t(l.onBlur,(()=>h(!1))),onClick:$t(l.onClick,(()=>{"mouse"!==b.current&&w()})),onPointerUp:$t(l.onPointerUp,(()=>{"mouse"===b.current&&w()})),onPointerDown:$t(l.onPointerDown,(e=>{b.current=e.pointerType})),onPointerMove:$t(l.onPointerMove,(e=>{b.current=e.pointerType,i?d.onItemLeave?.():"mouse"===b.current&&e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:$t(l.onPointerLeave,(e=>{e.currentTarget===document.activeElement&&d.onItemLeave?.()})),onKeyDown:$t(l.onKeyDown,(e=>{""!==d.searchRef?.current&&" "===e.key||(wf.includes(e.key)&&w()," "===e.key&&e.preventDefault())}))})})})}));ap.displayName=np;var ip="SelectItemText",sp=r.forwardRef(((o,a)=>{const{__scopeSelect:i,className:s,style:l,...c}=o,d=Sf(ip,i),u=jf(ip,i),f=op(ip,i),p=Tf(ip,i),[m,h]=r.useState(null),g=He(a,(e=>h(e)),f.onItemTextChange,(e=>u.itemTextRefCallback?.(e,f.value,f.disabled))),v=m?.textContent,b=r.useMemo((()=>e("option",{value:f.value,disabled:f.disabled,children:v},f.value)),[f.disabled,f.value,v]),{onNativeOptionAdd:w,onNativeOptionRemove:y}=p;return Qt((()=>(w(b),()=>y(b))),[w,y,b]),n(t,{children:[e(Ut.span,{id:f.textId,...c,ref:g}),f.isSelected&&d.valueNode&&!d.valueNodeHasChildren?k.createPortal(c.children,d.valueNode):null]})}));sp.displayName=ip;var lp="SelectItemIndicator",cp=r.forwardRef(((t,n)=>{const{__scopeSelect:r,...o}=t;return op(lp,r).isSelected?e(Ut.span,{"aria-hidden":!0,...o,ref:n}):null}));cp.displayName=lp;var dp="SelectScrollUpButton",up=r.forwardRef(((t,n)=>{const o=jf(dp,t.__scopeSelect),a=qf(dp,t.__scopeSelect),[i,s]=r.useState(!1),l=He(n,a.onScrollButtonChange);return Qt((()=>{if(o.viewport&&o.isPositioned){let e=function(){const e=t.scrollTop>0;s(e)};const t=o.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[o.viewport,o.isPositioned]),i?e(mp,{...t,ref:l,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=o;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null}));up.displayName=dp;var fp="SelectScrollDownButton",pp=r.forwardRef(((t,n)=>{const o=jf(fp,t.__scopeSelect),a=qf(fp,t.__scopeSelect),[i,s]=r.useState(!1),l=He(n,a.onScrollButtonChange);return Qt((()=>{if(o.viewport&&o.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;s(n)};const t=o.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[o.viewport,o.isPositioned]),i?e(mp,{...t,ref:l,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=o;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null}));pp.displayName=fp;var mp=r.forwardRef(((t,n)=>{const{__scopeSelect:o,onAutoScroll:a,...i}=t,s=jf("SelectScrollButton",o),l=r.useRef(null),c=Nf(o),d=r.useCallback((()=>{null!==l.current&&(window.clearInterval(l.current),l.current=null)}),[]);return r.useEffect((()=>()=>d()),[d]),Qt((()=>{const e=c().find((e=>e.ref.current===document.activeElement));e?.ref.current?.scrollIntoView({block:"nearest"})}),[c]),e(Ut.div,{"aria-hidden":!0,...i,ref:n,style:{flexShrink:0,...i.style},onPointerDown:$t(i.onPointerDown,(()=>{null===l.current&&(l.current=window.setInterval(a,50))})),onPointerMove:$t(i.onPointerMove,(()=>{s.onItemLeave?.(),null===l.current&&(l.current=window.setInterval(a,50))})),onPointerLeave:$t(i.onPointerLeave,(()=>{d()}))})})),hp=r.forwardRef(((t,n)=>{const{__scopeSelect:r,...o}=t;return e(Ut.div,{"aria-hidden":!0,...o,ref:n})}));hp.displayName="SelectSeparator";var gp="SelectArrow";function vp(e){return""===e||void 0===e}r.forwardRef(((t,n)=>{const{__scopeSelect:r,...o}=t,a=Ef(r),i=Sf(gp,r),s=jf(gp,r);return i.open&&"popper"===s.position?e(mi,{...a,...o,ref:n}):null})).displayName=gp;var bp=r.forwardRef(((t,n)=>{const{value:o,...a}=t,i=r.useRef(null),s=He(n,i),l=_r(o);return r.useEffect((()=>{const e=i.current,t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,"value").set;if(l!==o&&n){const t=new Event("change",{bubbles:!0});n.call(e,o),e.dispatchEvent(t)}}),[l,o]),e(gf,{asChild:!0,children:e("select",{...a,ref:s,defaultValue:o})})}));function wp(e){const t=qt(e),n=r.useRef(""),o=r.useRef(0),a=r.useCallback((e=>{const r=n.current+e;t(r),function e(t){n.current=t,window.clearTimeout(o.current),""!==t&&(o.current=window.setTimeout((()=>e("")),1e3))}(r)}),[t]),i=r.useCallback((()=>{n.current="",window.clearTimeout(o.current)}),[]);return r.useEffect((()=>()=>window.clearTimeout(o.current)),[]),[n,a,i]}function yp(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 a=(i=e,s=Math.max(o,0),i.map(((e,t)=>i[(s+t)%i.length])));var i,s;1===r.length&&(a=a.filter((e=>e!==n)));const l=a.find((e=>e.textValue.toLowerCase().startsWith(r.toLowerCase())));return l!==n?l:void 0}bp.displayName="BubbleSelect";var xp=Of,Np=Lf,Cp=Ff,kp=Wf,Rp=Uf,Ep=tp,_p=ap,Sp=sp,Pp=cp,Tp=up,Mp=pp,Dp=hp;const Op=Mf,Ap=Jf,Ip=If,Lp=r.forwardRef((({className:t,children:r,...o},a)=>n(xp,{ref:a,className:Ht("flex h-9 w-full items-center justify-between overflow-hidden whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm outline-none ring-offset-background transition-all placeholder:text-muted-foreground focus:outline-none focus:ring-[1.2px] focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...o,children:[r,e(Np,{asChild:!0,children:e(u,{className:"h-4 w-4 opacity-50"})})]})));Lp.displayName=xp.displayName;const Fp=r.forwardRef((({className:t,...n},r)=>e(Tp,{ref:r,className:Ht("flex cursor-default items-center justify-center py-1",t),...n,children:e(y,{className:"h-4 w-4"})})));Fp.displayName=Tp.displayName;const zp=r.forwardRef((({className:t,...n},r)=>e(Mp,{ref:r,className:Ht("flex cursor-default items-center justify-center py-1",t),...n,children:e(u,{className:"h-4 w-4"})})));zp.displayName=Mp.displayName;const Wp=r.forwardRef((({className:t,children:r,position:o="popper",...a},i)=>e(Cp,{children:n(kp,{ref:i,className:Ht("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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","popper"===o&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:o,...a,children:[e(Fp,{}),e(Rp,{className:Ht("p-1","popper"===o&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r}),e(zp,{})]})})));Wp.displayName=kp.displayName;const Hp=r.forwardRef((({className:t,...n},r)=>e(Ep,{ref:r,className:Ht("px-2 py-1.5 text-sm font-semibold",t),...n})));Hp.displayName=Ep.displayName;const Gp=r.forwardRef((({className:t,children:r,...o},a)=>n(_p,{ref:a,className:Ht("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...o,children:[e("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:e(Pp,{children:e(m,{className:"h-4 w-4"})})}),e(Sp,{children:r})]})));Gp.displayName=_p.displayName;const jp=r.forwardRef((({className:t,...n},r)=>e(Dp,{ref:r,className:Ht("-mx-1 my-1 h-px bg-muted",t),...n})));jp.displayName=Dp.displayName;var Kp="horizontal",Bp=["horizontal","vertical"],Vp=r.forwardRef(((t,n)=>{const{decorative:r,orientation:o=Kp,...a}=t,i=function(e){return Bp.includes(e)}(o)?o:Kp,s=r?{role:"none"}:{"aria-orientation":"vertical"===i?i:void 0,role:"separator"};return e(Ut.div,{"data-orientation":i,...s,...a,ref:n})}));Vp.displayName="Separator";var $p=Vp;const qp=r.forwardRef((({className:t,orientation:n="horizontal",decorative:r=!0,...o},a)=>e($p,{ref:a,decorative:r,orientation:n,className:Ht("shrink-0 bg-border","horizontal"===n?"h-[1px] w-full":"h-full w-[1px]",t),...o})));qp.displayName=$p.displayName;const Yp=r.forwardRef((({className:t,wrapClassName:n,...r},o)=>e("div",{className:Ht("relative w-full overflow-auto rounded-md border",n),children:e("table",{ref:o,className:Ht("w-full caption-bottom text-sm",t),...r})})));Yp.displayName="Table";const Up=r.forwardRef((({className:t,...n},r)=>e("thead",{ref:r,className:Ht("[&_tr]:border-b",t),...n})));Up.displayName="TableHeader";const Xp=r.forwardRef((({className:t,...n},r)=>e("tbody",{ref:r,className:Ht("[&_tr:last-child]:border-0",t),...n})));Xp.displayName="TableBody";const Qp=r.forwardRef((({className:t,...n},r)=>e("tfoot",{ref:r,className:Ht("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",t),...n})));Qp.displayName="TableFooter";const Zp=r.forwardRef((({className:t,...n},r)=>e("tr",{ref:r,className:Ht("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",t),...n})));Zp.displayName="TableRow";const Jp=r.forwardRef((({className:t,...n},r)=>e("th",{ref:r,className:Ht("h-12 px-3 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&:not(:last-child)]:border-r",t),...n})));Jp.displayName="TableHead";const em=r.forwardRef((({className:t,...n},r)=>e("td",{ref:r,className:Ht("p-3 align-middle [&:has([role=checkbox])]:pr-0 [&:not(:last-child)]:border-r",t),...n})));em.displayName="TableCell";const tm=r.forwardRef((({className:t,...n},r)=>e("caption",{ref:r,className:Ht("mt-4 text-sm text-muted-foreground",t),...n})));tm.displayName="TableCaption";const nm=vl,rm=bl,om=kl,am=wl,im=r.forwardRef((({className:t,...n},r)=>e(yl,{className:Ht("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",t),...n,ref:r})));im.displayName=yl.displayName;const sm=qe("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",{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"},duration:{default:"data-[state=closed]:duration-300 data-[state=open]:duration-500",fast:"data-[state=closed]:duration-200 data-[state=open]:duration-300"}},defaultVariants:{side:"right",duration:"default"}}),lm=r.forwardRef((({side:t="right",duration:r="default",className:o,children:a,...i},s)=>n(am,{children:[e(im,{}),n(xl,{ref:s,className:Ht(sm({side:t,duration:r}),o),onOpenAutoFocus:e=>e.preventDefault(),onCloseAutoFocus:e=>e.preventDefault(),...i,children:[a,e(kl,{className:"absolute right-4 top-4 rounded-sm 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",asChild:!0,children:e(jt,{variant:"ghost",size:"icon",children:e(g,{size:20})})})]})]})));lm.displayName=xl.displayName;const cm=({className:t,...n})=>e("div",{className:Ht("flex flex-col space-y-2 text-center sm:text-left",t),...n});cm.displayName="SheetHeader";const dm=({className:t,...n})=>e("div",{className:Ht("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...n});dm.displayName="SheetFooter";const um=r.forwardRef((({className:t,...n},r)=>e(Nl,{ref:r,className:Ht("text-lg font-semibold text-foreground",t),...n})));um.displayName=Nl.displayName;const fm=r.forwardRef((({className:t,...n},r)=>e(Cl,{ref:r,className:Ht("text-sm text-muted-foreground",t),...n})));fm.displayName=Cl.displayName;const pm={sm:640,md:768,lg:1024};function mm({className:t,...n}){return e("div",{className:Ht("skeleton",t),...n})}var[hm,gm]=Kt("Tooltip",[Ua]),vm=Ua(),bm="TooltipProvider",wm=700,ym="tooltip.open",[xm,Nm]=hm(bm),Cm=t=>{const{__scopeTooltip:n,delayDuration:o=wm,skipDelayDuration:a=300,disableHoverableContent:i=!1,children:s}=t,[l,c]=r.useState(!0),d=r.useRef(!1),u=r.useRef(0);return r.useEffect((()=>{const e=u.current;return()=>window.clearTimeout(e)}),[]),e(xm,{scope:n,isOpenDelayed:l,delayDuration:o,onOpen:r.useCallback((()=>{window.clearTimeout(u.current),c(!1)}),[]),onClose:r.useCallback((()=>{window.clearTimeout(u.current),u.current=window.setTimeout((()=>c(!0)),a)}),[a]),isPointerInTransitRef:d,onPointerInTransitChange:r.useCallback((e=>{d.current=e}),[]),disableHoverableContent:i,children:s})};Cm.displayName=bm;var km="Tooltip",[Rm,Em]=hm(km),_m=t=>{const{__scopeTooltip:n,children:o,open:a,defaultOpen:i=!1,onOpenChange:s,disableHoverableContent:l,delayDuration:c}=t,d=Nm(km,t.__scopeTooltip),u=vm(n),[f,p]=r.useState(null),m=nn(),h=r.useRef(0),g=l??d.disableHoverableContent,v=c??d.delayDuration,b=r.useRef(!1),[w=!1,y]=Yt({prop:a,defaultProp:i,onChange:e=>{e?(d.onOpen(),document.dispatchEvent(new CustomEvent(ym))):d.onClose(),s?.(e)}}),x=r.useMemo((()=>w?b.current?"delayed-open":"instant-open":"closed"),[w]),N=r.useCallback((()=>{window.clearTimeout(h.current),h.current=0,b.current=!1,y(!0)}),[y]),C=r.useCallback((()=>{window.clearTimeout(h.current),h.current=0,y(!1)}),[y]),k=r.useCallback((()=>{window.clearTimeout(h.current),h.current=window.setTimeout((()=>{b.current=!0,y(!0),h.current=0}),v)}),[v,y]);return r.useEffect((()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)}),[]),e(ui,{...u,children:e(Rm,{scope:n,contentId:m,open:w,stateAttribute:x,trigger:f,onTriggerChange:p,onTriggerEnter:r.useCallback((()=>{d.isOpenDelayed?k():N()}),[d.isOpenDelayed,k,N]),onTriggerLeave:r.useCallback((()=>{g?C():(window.clearTimeout(h.current),h.current=0)}),[C,g]),onOpen:N,onClose:C,disableHoverableContent:g,children:o})})};_m.displayName=km;var Sm="TooltipTrigger",Pm=r.forwardRef(((t,n)=>{const{__scopeTooltip:o,...a}=t,i=Em(Sm,o),s=Nm(Sm,o),l=vm(o),c=He(n,r.useRef(null),i.onTriggerChange),d=r.useRef(!1),u=r.useRef(!1),f=r.useCallback((()=>d.current=!1),[]);return r.useEffect((()=>()=>document.removeEventListener("pointerup",f)),[f]),e(fi,{asChild:!0,...l,children:e(Ut.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...a,ref:c,onPointerMove:$t(t.onPointerMove,(e=>{"touch"!==e.pointerType&&(u.current||s.isPointerInTransitRef.current||(i.onTriggerEnter(),u.current=!0))})),onPointerLeave:$t(t.onPointerLeave,(()=>{i.onTriggerLeave(),u.current=!1})),onPointerDown:$t(t.onPointerDown,(()=>{d.current=!0,document.addEventListener("pointerup",f,{once:!0})})),onFocus:$t(t.onFocus,(()=>{d.current||i.onOpen()})),onBlur:$t(t.onBlur,i.onClose),onClick:$t(t.onClick,i.onClose)})})}));Pm.displayName=Sm;var[Tm,Mm]=hm("TooltipPortal",{forceMount:void 0}),Dm="TooltipContent",Om=r.forwardRef(((t,n)=>{const r=Mm(Dm,t.__scopeTooltip),{forceMount:o=r.forceMount,side:a="top",...i}=t,s=Em(Dm,t.__scopeTooltip);return e(Zt,{present:o||s.open,children:s.disableHoverableContent?e(Fm,{side:a,...i,ref:n}):e(Am,{side:a,...i,ref:n})})})),Am=r.forwardRef(((t,n)=>{const o=Em(Dm,t.__scopeTooltip),a=Nm(Dm,t.__scopeTooltip),i=r.useRef(null),s=He(n,i),[l,c]=r.useState(null),{trigger:d,onClose:u}=o,f=i.current,{onPointerInTransitChange:p}=a,m=r.useCallback((()=>{c(null),p(!1)}),[p]),h=r.useCallback(((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},o=function(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}(r,function(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}(r,n.getBoundingClientRect())),a=function(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)),function(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)}(t)}([...o,...function(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}]}(t.getBoundingClientRect())]);c(a),p(!0)}),[p]);return r.useEffect((()=>()=>m()),[m]),r.useEffect((()=>{if(d&&f){const e=e=>h(e,f),t=e=>h(e,d);return d.addEventListener("pointerleave",e),f.addEventListener("pointerleave",t),()=>{d.removeEventListener("pointerleave",e),f.removeEventListener("pointerleave",t)}}}),[d,f,h,m]),r.useEffect((()=>{if(l){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=d?.contains(t)||f?.contains(t),o=!function(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){const i=t[e].x,s=t[e].y,l=t[a].x,c=t[a].y;s>r!=c>r&&n<(l-i)*(r-s)/(c-s)+i&&(o=!o)}return o}(n,l);r?m():o&&(m(),u())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[d,f,l,u,m]),e(Fm,{...t,ref:s})})),[Im,Lm]=hm(km,{isInside:!1}),Fm=r.forwardRef(((t,o)=>{const{__scopeTooltip:a,children:i,"aria-label":s,onEscapeKeyDown:l,onPointerDownOutside:c,...d}=t,u=Em(Dm,a),f=vm(a),{onClose:p}=u;return r.useEffect((()=>(document.addEventListener(ym,p),()=>document.removeEventListener(ym,p))),[p]),r.useEffect((()=>{if(u.trigger){const e=e=>{const t=e.target;t?.contains(u.trigger)&&p()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}}),[u.trigger,p]),e(Qr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:e=>e.preventDefault(),onDismiss:p,children:n(pi,{"data-state":u.stateAttribute,...f,...d,ref:o,style:{...d.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)"},children:[e(Ke,{children:i}),e(Im,{scope:a,isInside:!0,children:e(vf,{id:u.contentId,role:"tooltip",children:s||i})})]})})}));Om.displayName=Dm;var zm="TooltipArrow";r.forwardRef(((t,n)=>{const{__scopeTooltip:r,...o}=t,a=vm(r);return Lm(zm,r).isInside?null:e(mi,{...a,...o,ref:n})})).displayName=zm;var Wm=Om;const Hm=Cm,Gm=_m,jm=Pm,Km=r.forwardRef((({className:t,sideOffset:n=4,...r},o)=>e(Wm,{ref:o,sideOffset:n,className:Ht("z-50 h-auto max-w-[250px] overflow-hidden whitespace-normal rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground 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-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",t),...r})));Km.displayName=Wm.displayName;const Bm=r.createContext(null);function Vm(){const e=r.useContext(Bm);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const $m=r.forwardRef((({defaultOpen:t=!0,open:n,onOpenChange:o,className:a,style:l,children:c,...d},u)=>{const f=function(e="md"){const[t,n]=s(void 0),r=pm[e];return i((()=>{const e=window.matchMedia(`(max-width: ${r-1}px)`),t=()=>{n(window.innerWidth<r)};return e.addEventListener("change",t),n(window.innerWidth<r),()=>e.removeEventListener("change",t)}),[]),!!t}(),[p,m]=r.useState(!1),[h,g]=r.useState(t),v=n??h,b=r.useCallback((e=>{const t="function"==typeof e?e(v):e;o?o(t):g(t),document.cookie=`sidebar:state=${t}; path=/; max-age=604800`}),[o,v]),w=r.useCallback((()=>f?m((e=>!e)):b((e=>!e))),[f,b,m]);r.useEffect((()=>{const e=e=>{"b"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),w())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)}),[w]);const y=v?"expanded":"collapsed",x=r.useMemo((()=>({state:y,open:v,setOpen:b,isMobile:f,openMobile:p,setOpenMobile:m,toggleSidebar:w})),[y,v,b,f,p,m,w]);return e(Bm.Provider,{value:x,children:e(Hm,{delayDuration:0,children:e("div",{style:{"--sidebar-width":"16rem","--sidebar-width-icon":"5rem",...l},className:Ht("group/sidebar-wrapper flex min-h-svh w-[--sidebar-width] has-[[data-variant=inset]]:bg-sidebar",a),ref:u,...d,children:c})})})}));$m.displayName="SidebarProvider";const qm=r.forwardRef((({side:t="left",variant:r="sidebar",collapsible:o="offcanvas",className:a,children:i,...s},l)=>{const{isMobile:c,state:d,openMobile:u,setOpenMobile:f}=Vm();return"none"===o?e("div",{className:Ht("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",a),ref:l,...s,children:i}):c?e(nm,{open:u,onOpenChange:f,...s,children:n(lm,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-full max-w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":"18rem"},side:t,children:[e(um,{asChild:!0,children:e("div",{})}),e(fm,{}),e("div",{className:"flex h-full w-full flex-col",children:i})]})}):n("div",{ref:l,className:"group peer hidden text-sidebar-foreground md:block","data-state":d,"data-collapsible":"collapsed"===d?o:"","data-variant":r,"data-side":t,children:[e("div",{className:Ht("relative h-svh w-[--sidebar-width] bg-transparent transition-[width] duration-150 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180","floating"===r||"inset"===r?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),e("div",{className:Ht("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-150 ease-linear md:flex","left"===t?"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"===r||"inset"===r?"p-4 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",a),...s,children:e("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:i})})]})}));qm.displayName="Sidebar";const Ym=r.forwardRef((({className:t,onClick:r,...o},a)=>{const{toggleSidebar:i}=Vm();return n(jt,{ref:a,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:Ht("h-7 w-7",t),onClick:e=>{r?.(e),i()},...o,children:[e(x,{}),e("span",{className:"sr-only",children:"Toggle Sidebar"})]})}));Ym.displayName="SidebarTrigger";const Um=r.forwardRef((({className:t,...n},r)=>{const{toggleSidebar:o}=Vm();return e("button",{ref:r,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:o,title:"Toggle Sidebar",className:Ht("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",t),...n})}));Um.displayName="SidebarRail";const Xm=r.forwardRef((({className:t,...n},r)=>e("main",{ref:r,className:Ht("relative flex min-h-svh flex-1 flex-col bg-background","peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] 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-xl md:peer-data-[variant=inset]:shadow",t),...n})));Xm.displayName="SidebarInset";const Qm=r.forwardRef((({className:t,...n},r)=>e(zu,{ref:r,"data-sidebar":"input",className:Ht("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",t),...n})));Qm.displayName="SidebarInput";const Zm=r.forwardRef((({className:t,...n},r)=>e("div",{ref:r,"data-sidebar":"header",className:Ht("flex flex-col gap-2 p-2",t),...n})));Zm.displayName="SidebarHeader";const Jm=r.forwardRef((({className:t,...n},r)=>e("div",{ref:r,"data-sidebar":"footer",className:Ht("flex flex-col gap-2 p-2",t),...n})));Jm.displayName="SidebarFooter";const eh=r.forwardRef((({className:t,...n},r)=>e(qp,{ref:r,"data-sidebar":"separator",className:Ht("mx-2 w-auto bg-sidebar-border",t),...n})));eh.displayName="SidebarSeparator";const th=r.forwardRef((({className:t,...n},r)=>e("div",{ref:r,"data-sidebar":"content",className:Ht("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t),...n})));th.displayName="SidebarContent";const nh=r.forwardRef((({className:t,...n},r)=>e("div",{ref:r,"data-sidebar":"group",className:Ht("relative flex w-full min-w-0 flex-col p-2",t),...n})));nh.displayName="SidebarGroup";const rh=r.forwardRef((({className:t,asChild:n=!1,...r},o)=>e(n?Ge:"div",{ref:o,"data-sidebar":"group-label",className:Ht("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] duration-150 ease-linear focus-visible:ring-2 [&>svg]:size-[18px] [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",t),...r})));rh.displayName="SidebarGroupLabel";const oh=r.forwardRef((({className:t,asChild:n=!1,...r},o)=>e(n?Ge:"button",{ref:o,"data-sidebar":"group-action",className:Ht("absolute right-3 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-[18px] [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",t),...r})));oh.displayName="SidebarGroupAction";const ah=r.forwardRef((({className:t,...n},r)=>e("div",{ref:r,"data-sidebar":"group-content",className:Ht("w-full text-sm",t),...n})));ah.displayName="SidebarGroupContent";const ih=r.forwardRef((({className:t,...n},r)=>e("ul",{ref:r,"data-sidebar":"menu",className:Ht("flex w-full min-w-0 flex-col gap-1",t),...n})));ih.displayName="SidebarMenu";const sh=r.forwardRef((({className:t,...n},r)=>e("li",{ref:r,"data-sidebar":"menu-item",className:Ht("group/menu-item relative",t),...n})));sh.displayName="SidebarMenuItem";const lh=qe("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md pl-4 pr-3 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground 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-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!w-[3rem] group-data-[collapsible=icon]:!h-[40px] group-data-[collapsible=icon]:!pl-4 [&>span:last-child]:truncate [&>svg]:size-[18px] [&>svg]:shrink-0 transition-colors",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",primary:"hover:text-primary dark:hover:text-foreground dark:text-foreground/50",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-10 text-sm"}},defaultVariants:{variant:"default",size:"default"}}),ch=r.forwardRef((({asChild:t=!1,isActive:r=!1,variant:o="default",size:a="default",tooltip:i,className:s,...l},c)=>{const d=t?Ge:"button",{isMobile:u,state:f}=Vm(),p=e(d,{ref:c,"data-sidebar":"menu-button","data-size":a,"data-active":r,className:Ht(lh({variant:o,size:a}),s),...l});return i?("string"==typeof i&&(i={children:i}),n(Gm,{children:[e(jm,{asChild:!0,children:p}),e(Km,{side:"right",align:"center",hidden:"collapsed"!==f||u,...i})]})):p}));ch.displayName="SidebarMenuButton";const dh=r.forwardRef((({className:t,asChild:n=!1,showOnHover:r=!1,...o},a)=>e(n?Ge:"button",{ref:a,"data-sidebar":"menu-action",className:Ht("absolute right-1 top-1.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 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-[18px] [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",r&&"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",t),...o})));dh.displayName="SidebarMenuAction";const uh=r.forwardRef((({className:t,...n},r)=>e("div",{ref:r,"data-sidebar":"menu-badge",className:Ht("pointer-events-none absolute right-1 flex h-4 min-w-4 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-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-[0.8rem]","group-data-[collapsible=icon]:hidden",t),...n})));uh.displayName="SidebarMenuBadge";const fh=r.forwardRef((({className:t,showIcon:o=!1,...a},i)=>{const s=r.useMemo((()=>`${Math.floor(40*Math.random())+50}%`),[]);return n("div",{ref:i,"data-sidebar":"menu-skeleton",className:Ht("flex h-8 items-center gap-2 rounded-md px-2",t),...a,children:[o&&e(mm,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),e(mm,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":s}})]})}));fh.displayName="SidebarMenuSkeleton";const ph=r.forwardRef((({className:t,...n},r)=>e("ul",{ref:r,"data-sidebar":"menu-sub",className:Ht("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",t),...n})));ph.displayName="SidebarMenuSub";const mh=r.forwardRef((({...t},n)=>e("li",{ref:n,...t})));mh.displayName="SidebarMenuSubItem";const hh=r.forwardRef((({asChild:t=!1,size:n="md",isActive:r,className:o,...a},i)=>e(t?Ge:"a",{ref:i,"data-sidebar":"menu-sub-button","data-size":n,"data-active":r,className:Ht("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-[18px] [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground","sm"===n&&"text-xs","md"===n&&"text-sm","group-data-[collapsible=icon]:hidden",o),...a})));hh.displayName="SidebarMenuSubButton";var gh="Switch",[vh,bh]=Kt(gh),[wh,yh]=vh(gh),xh=r.forwardRef(((t,o)=>{const{__scopeSwitch:a,name:i,checked:s,defaultChecked:l,required:c,disabled:d,value:u="on",onCheckedChange:f,form:p,...m}=t,[h,g]=r.useState(null),v=He(o,(e=>g(e))),b=r.useRef(!1),w=!h||(p||!!h.closest("form")),[y=!1,x]=Yt({prop:s,defaultProp:l,onChange:f});return n(wh,{scope:a,checked:y,disabled:d,children:[e(Ut.button,{type:"button",role:"switch","aria-checked":y,"aria-required":c,"data-state":Rh(y),"data-disabled":d?"":void 0,disabled:d,value:u,...m,ref:v,onClick:$t(t.onClick,(e=>{x((e=>!e)),w&&(b.current=e.isPropagationStopped(),b.current||e.stopPropagation())}))}),w&&e(kh,{control:h,bubbles:!b.current,name:i,value:u,checked:y,required:c,disabled:d,form:p,style:{transform:"translateX(-100%)"}})]})}));xh.displayName=gh;var Nh="SwitchThumb",Ch=r.forwardRef(((t,n)=>{const{__scopeSwitch:r,...o}=t,a=yh(Nh,r);return e(Ut.span,{"data-state":Rh(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:n})}));Ch.displayName=Nh;var kh=t=>{const{control:n,checked:o,bubbles:a=!0,...i}=t,s=r.useRef(null),l=_r(o),c=Sr(n);return r.useEffect((()=>{const e=s.current,t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(l!==o&&n){const t=new Event("click",{bubbles:a});n.call(e,o),e.dispatchEvent(t)}}),[l,o,a]),e("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o,...i,tabIndex:-1,ref:s,style:{...t.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Rh(e){return e?"checked":"unchecked"}var Eh=xh,_h=Ch;const Sh=qe("peer inline-flex 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 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",{variants:{size:{sm:"h-5 w-10",md:"h-6 w-11"}},defaultVariants:{size:"md"}}),Ph=qe("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",{variants:{size:{sm:"h-4 w-4",md:"h-5 w-5"}},defaultVariants:{size:"md"}}),Th=r.forwardRef((({className:t,size:n,...r},o)=>e(Eh,{className:Ht(Sh({size:n,className:t})),...r,ref:o,children:e(_h,{className:Ht(Ph({size:n}))})})));Th.displayName=Eh.displayName;const Mh=t=>{const{header:r,children:o,className:a,...i}=t;return e(Kr,{className:Ht("table-wrapper",a),...i,children:n("table",{className:"table",children:[e("thead",{children:r}),e("tbody",{children:o})]})})},Dh=t=>{const{className:r,onClick:o,children:a,...i}=t;return n("tr",{...i,onClick:o,className:Ht("table__row",r,o&&"cursor-pointer"),children:[a,o&&n(Ah,{className:"arrow-cell",children:[e("div",{className:"table__row__bg"}),e(N,{size:18})]})]})},Oh=t=>{const{className:n,...r}=t;return e("tr",{className:Ht("w-full",t.className),...r,children:e(Ah,{className:"h-[49px] w-full px-1 py-[2px]",children:e(mm,{className:"h-full w-full"})})})},Ah=t=>{const{className:n,children:r,...o}=t;return e("td",{className:n,...o,children:r})},Ih=t=>{const{text:r,...o}=t;return e(Dh,{className:"table__row table__row__empty",...o,children:n(Ah,{children:[e(w,{className:"text-muted-foreground",strokeWidth:1.5,size:25}),e(hu,{className:"text-muted-foreground",as:"span",children:r||"Тут ничего нет"})]})})},Lh=({isNegative:t,negativeText:r,positiveText:o,...a})=>e(Ah,{...a,children:t?n(Br,{className:"text-destructive",children:[r||"Заблокирован",e(C,{size:16})]}):e(hu,{as:"span",className:"text-green-600",children:o||"Активен"})});var Fh="Tabs",[zh,Wh]=Kt(Fh,[jl]),Hh=jl(),[Gh,jh]=zh(Fh),Kh=r.forwardRef(((t,n)=>{const{__scopeTabs:r,value:o,onValueChange:a,defaultValue:i,orientation:s="horizontal",dir:l,activationMode:c="automatic",...d}=t,u=yn(l),[f,p]=Yt({prop:o,onChange:a,defaultProp:i});return e(Gh,{scope:r,baseId:nn(),value:f,onValueChange:p,orientation:s,dir:u,activationMode:c,children:e(Ut.div,{dir:u,"data-orientation":s,...d,ref:n})})}));Kh.displayName=Fh;var Bh="TabsList",Vh=r.forwardRef(((t,n)=>{const{__scopeTabs:r,loop:o=!0,...a}=t,i=jh(Bh,r),s=Hh(r);return e(Ql,{asChild:!0,...s,orientation:i.orientation,dir:i.dir,loop:o,children:e(Ut.div,{role:"tablist","aria-orientation":i.orientation,...a,ref:n})})}));Vh.displayName=Bh;var $h="TabsTrigger",qh=r.forwardRef(((t,n)=>{const{__scopeTabs:r,value:o,disabled:a=!1,...i}=t,s=jh($h,r),l=Hh(r),c=Xh(s.baseId,o),d=Qh(s.baseId,o),u=o===s.value;return e(Zl,{asChild:!0,...l,focusable:!a,active:u,children:e(Ut.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":d,"data-state":u?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:c,...i,ref:n,onMouseDown:$t(t.onMouseDown,(e=>{a||0!==e.button||!1!==e.ctrlKey?e.preventDefault():s.onValueChange(o)})),onKeyDown:$t(t.onKeyDown,(e=>{[" ","Enter"].includes(e.key)&&s.onValueChange(o)})),onFocus:$t(t.onFocus,(()=>{const e="manual"!==s.activationMode;u||a||!e||s.onValueChange(o)}))})})}));qh.displayName=$h;var Yh="TabsContent",Uh=r.forwardRef(((t,n)=>{const{__scopeTabs:o,value:a,forceMount:i,children:s,...l}=t,c=jh(Yh,o),d=Xh(c.baseId,a),u=Qh(c.baseId,a),f=a===c.value,p=r.useRef(f);return r.useEffect((()=>{const e=requestAnimationFrame((()=>p.current=!1));return()=>cancelAnimationFrame(e)}),[]),e(Zt,{present:i||f,children:({present:r})=>e(Ut.div,{"data-state":f?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":d,hidden:!r,id:u,tabIndex:0,...l,ref:n,style:{...t.style,animationDuration:p.current?"0s":void 0},children:r&&s})})}));function Xh(e,t){return`${e}-trigger-${t}`}function Qh(e,t){return`${e}-content-${t}`}Uh.displayName=Yh;var Zh=Vh,Jh=qh,eg=Uh;const tg=Kh,ng=r.forwardRef((({className:t,...n},r)=>e(Zh,{ref:r,className:Ht("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",t),...n})));ng.displayName=Zh.displayName;const rg=r.forwardRef((({className:t,...n},r)=>e(Jh,{ref:r,className:Ht("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",t),...n})));rg.displayName=Jh.displayName;const og=r.forwardRef((({className:t,...n},r)=>e(eg,{ref:r,className:Ht("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t),...n})));og.displayName=eg.displayName;const ag=r.forwardRef((({className:t,...n},r)=>e("textarea",{className:Ht("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm outline-none transition-all placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-[1.2px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:r,...n})));ag.displayName="Textarea";var ig="ToastProvider",[sg,lg,cg]=Vt("Toast"),[dg,ug]=Kt("Toast",[cg]),[fg,pg]=dg(ig),mg=t=>{const{__scopeToast:n,label:o="Notification",duration:a=5e3,swipeDirection:i="right",swipeThreshold:s=50,children:l}=t,[c,d]=r.useState(null),[u,f]=r.useState(0),p=r.useRef(!1),m=r.useRef(!1);return o.trim()||console.error(`Invalid prop \`label\` supplied to \`${ig}\`. Expected non-empty \`string\`.`),e(sg.Provider,{scope:n,children:e(fg,{scope:n,label:o,duration:a,swipeDirection:i,swipeThreshold:s,toastCount:u,viewport:c,onViewportChange:d,onToastAdd:r.useCallback((()=>f((e=>e+1))),[]),onToastRemove:r.useCallback((()=>f((e=>e-1))),[]),isFocusedToastEscapeKeyDownRef:p,isClosePausedRef:m,children:l})})};mg.displayName=ig;var hg="ToastViewport",gg=["F8"],vg="toast.viewportPause",bg="toast.viewportResume",wg=r.forwardRef(((t,o)=>{const{__scopeToast:a,hotkey:i=gg,label:s="Notifications ({hotkey})",...l}=t,c=pg(hg,a),d=lg(a),u=r.useRef(null),f=r.useRef(null),p=r.useRef(null),m=r.useRef(null),h=He(o,m,c.onViewportChange),g=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),v=c.toastCount>0;r.useEffect((()=>{const e=e=>{0!==i.length&&i.every((t=>e[t]||e.code===t))&&m.current?.focus()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[i]),r.useEffect((()=>{const e=u.current,t=m.current;if(v&&e&&t){const n=()=>{if(!c.isClosePausedRef.current){const e=new CustomEvent(vg);t.dispatchEvent(e),c.isClosePausedRef.current=!0}},r=()=>{if(c.isClosePausedRef.current){const e=new CustomEvent(bg);t.dispatchEvent(e),c.isClosePausedRef.current=!1}},o=t=>{!e.contains(t.relatedTarget)&&r()},a=()=>{e.contains(document.activeElement)||r()};return e.addEventListener("focusin",n),e.addEventListener("focusout",o),e.addEventListener("pointermove",n),e.addEventListener("pointerleave",a),window.addEventListener("blur",n),window.addEventListener("focus",r),()=>{e.removeEventListener("focusin",n),e.removeEventListener("focusout",o),e.removeEventListener("pointermove",n),e.removeEventListener("pointerleave",a),window.removeEventListener("blur",n),window.removeEventListener("focus",r)}}}),[v,c.isClosePausedRef]);const b=r.useCallback((({tabbingDirection:e})=>{const t=d().map((t=>{const n=t.ref.current,r=[n,...zg(n)];return"forwards"===e?r:r.reverse()}));return("forwards"===e?t.reverse():t).flat()}),[d]);return r.useEffect((()=>{const e=m.current;if(e){const t=t=>{const n=t.altKey||t.ctrlKey||t.metaKey;if("Tab"===t.key&&!n){const n=document.activeElement,r=t.shiftKey;if(t.target===e&&r)return void f.current?.focus();const o=b({tabbingDirection:r?"backwards":"forwards"}),a=o.findIndex((e=>e===n));Wg(o.slice(a+1))?t.preventDefault():r?f.current?.focus():p.current?.focus()}};return e.addEventListener("keydown",t),()=>e.removeEventListener("keydown",t)}}),[d,b]),n(no,{ref:u,role:"region","aria-label":s.replace("{hotkey}",g),tabIndex:-1,style:{pointerEvents:v?void 0:"none"},children:[v&&e(xg,{ref:f,onFocusFromOutsideViewport:()=>{Wg(b({tabbingDirection:"forwards"}))}}),e(sg.Slot,{scope:a,children:e(Ut.ol,{tabIndex:-1,...l,ref:h})}),v&&e(xg,{ref:p,onFocusFromOutsideViewport:()=>{Wg(b({tabbingDirection:"backwards"}))}})]})}));wg.displayName=hg;var yg="ToastFocusProxy",xg=r.forwardRef(((t,n)=>{const{__scopeToast:r,onFocusFromOutsideViewport:o,...a}=t,i=pg(yg,r);return e(gf,{"aria-hidden":!0,tabIndex:0,...a,ref:n,style:{position:"fixed"},onFocus:e=>{const t=e.relatedTarget;!i.viewport?.contains(t)&&o()}})}));xg.displayName=yg;var Ng="Toast",Cg=r.forwardRef(((t,n)=>{const{forceMount:r,open:o,defaultOpen:a,onOpenChange:i,...s}=t,[l=!0,c]=Yt({prop:o,defaultProp:a,onChange:i});return e(Zt,{present:r||l,children:e(Eg,{open:l,...s,ref:n,onClose:()=>c(!1),onPause:qt(t.onPause),onResume:qt(t.onResume),onSwipeStart:$t(t.onSwipeStart,(e=>{e.currentTarget.setAttribute("data-swipe","start")})),onSwipeMove:$t(t.onSwipeMove,(e=>{const{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute("data-swipe","move"),e.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${t}px`),e.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${n}px`)})),onSwipeCancel:$t(t.onSwipeCancel,(e=>{e.currentTarget.setAttribute("data-swipe","cancel"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),e.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")})),onSwipeEnd:$t(t.onSwipeEnd,(e=>{const{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute("data-swipe","end"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),e.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${t}px`),e.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${n}px`),c(!1)}))})})}));Cg.displayName=Ng;var[kg,Rg]=dg(Ng,{onClose(){}}),Eg=r.forwardRef(((o,a)=>{const{__scopeToast:i,type:s="foreground",duration:l,open:c,onClose:d,onEscapeKeyDown:u,onPause:f,onResume:p,onSwipeStart:m,onSwipeMove:h,onSwipeCancel:g,onSwipeEnd:v,...b}=o,w=pg(Ng,i),[y,x]=r.useState(null),N=He(a,(e=>x(e))),C=r.useRef(null),R=r.useRef(null),E=l||w.duration,_=r.useRef(0),S=r.useRef(E),P=r.useRef(0),{onToastAdd:T,onToastRemove:M}=w,D=qt((()=>{const e=y?.contains(document.activeElement);e&&w.viewport?.focus(),d()})),O=r.useCallback((e=>{e&&e!==1/0&&(window.clearTimeout(P.current),_.current=(new Date).getTime(),P.current=window.setTimeout(D,e))}),[D]);r.useEffect((()=>{const e=w.viewport;if(e){const t=()=>{O(S.current),p?.()},n=()=>{const e=(new Date).getTime()-_.current;S.current=S.current-e,window.clearTimeout(P.current),f?.()};return e.addEventListener(vg,n),e.addEventListener(bg,t),()=>{e.removeEventListener(vg,n),e.removeEventListener(bg,t)}}}),[w.viewport,E,f,p,O]),r.useEffect((()=>{c&&!w.isClosePausedRef.current&&O(E)}),[c,E,w.isClosePausedRef,O]),r.useEffect((()=>(T(),()=>M())),[T,M]);const A=r.useMemo((()=>y?Ig(y):null),[y]);return w.viewport?n(t,{children:[A&&e(_g,{__scopeToast:i,role:"status","aria-live":"foreground"===s?"assertive":"polite","aria-atomic":!0,children:A}),e(kg,{scope:i,onClose:D,children:k.createPortal(e(sg.ItemSlot,{scope:i,children:e(to,{asChild:!0,onEscapeKeyDown:$t(u,(()=>{w.isFocusedToastEscapeKeyDownRef.current||D(),w.isFocusedToastEscapeKeyDownRef.current=!1})),children:e(Ut.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":c?"open":"closed","data-swipe-direction":w.swipeDirection,...b,ref:N,style:{userSelect:"none",touchAction:"none",...o.style},onKeyDown:$t(o.onKeyDown,(e=>{"Escape"===e.key&&(u?.(e.nativeEvent),e.nativeEvent.defaultPrevented||(w.isFocusedToastEscapeKeyDownRef.current=!0,D()))})),onPointerDown:$t(o.onPointerDown,(e=>{0===e.button&&(C.current={x:e.clientX,y:e.clientY})})),onPointerMove:$t(o.onPointerMove,(e=>{if(!C.current)return;const t=e.clientX-C.current.x,n=e.clientY-C.current.y,r=Boolean(R.current),o=["left","right"].includes(w.swipeDirection),a=["left","up"].includes(w.swipeDirection)?Math.min:Math.max,i=o?a(0,t):0,s=o?0:a(0,n),l="touch"===e.pointerType?10:2,c={x:i,y:s},d={originalEvent:e,delta:c};r?(R.current=c,Lg("toast.swipeMove",h,d,{discrete:!1})):Fg(c,w.swipeDirection,l)?(R.current=c,Lg("toast.swipeStart",m,d,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>l||Math.abs(n)>l)&&(C.current=null)})),onPointerUp:$t(o.onPointerUp,(e=>{const t=R.current,n=e.target;if(n.hasPointerCapture(e.pointerId)&&n.releasePointerCapture(e.pointerId),R.current=null,C.current=null,t){const n=e.currentTarget,r={originalEvent:e,delta:t};Fg(t,w.swipeDirection,w.swipeThreshold)?Lg("toast.swipeEnd",v,r,{discrete:!0}):Lg("toast.swipeCancel",g,r,{discrete:!0}),n.addEventListener("click",(e=>e.preventDefault()),{once:!0})}}))})})}),w.viewport)})]}):null})),_g=o=>{const{__scopeToast:a,children:i,...s}=o,l=pg(Ng,a),[c,d]=r.useState(!1),[u,f]=r.useState(!1);return function(e=()=>{}){const t=qt(e);Qt((()=>{let e=0,n=0;return e=window.requestAnimationFrame((()=>n=window.requestAnimationFrame(t))),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(n)}}),[t])}((()=>d(!0))),r.useEffect((()=>{const e=window.setTimeout((()=>f(!0)),1e3);return()=>window.clearTimeout(e)}),[]),u?null:e(hi,{asChild:!0,children:e(gf,{...s,children:c&&n(t,{children:[l.label," ",i]})})})},Sg=r.forwardRef(((t,n)=>{const{__scopeToast:r,...o}=t;return e(Ut.div,{...o,ref:n})}));Sg.displayName="ToastTitle";var Pg=r.forwardRef(((t,n)=>{const{__scopeToast:r,...o}=t;return e(Ut.div,{...o,ref:n})}));Pg.displayName="ToastDescription";var Tg="ToastAction",Mg=r.forwardRef(((t,n)=>{const{altText:r,...o}=t;return r.trim()?e(Ag,{altText:r,asChild:!0,children:e(Og,{...o,ref:n})}):(console.error(`Invalid prop \`altText\` supplied to \`${Tg}\`. Expected non-empty \`string\`.`),null)}));Mg.displayName=Tg;var Dg="ToastClose",Og=r.forwardRef(((t,n)=>{const{__scopeToast:r,...o}=t,a=Rg(Dg,r);return e(Ag,{asChild:!0,children:e(Ut.button,{type:"button",...o,ref:n,onClick:$t(t.onClick,a.onClose)})})}));Og.displayName=Dg;var Ag=r.forwardRef(((t,n)=>{const{__scopeToast:r,altText:o,...a}=t;return e(Ut.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0,...a,ref:n})}));function Ig(e){const t=[];return Array.from(e.childNodes).forEach((e=>{if(e.nodeType===e.TEXT_NODE&&e.textContent&&t.push(e.textContent),function(e){return e.nodeType===e.ELEMENT_NODE}(e)){const n=e.ariaHidden||e.hidden||"none"===e.style.display,r=""===e.dataset.radixToastAnnounceExclude;if(!n)if(r){const n=e.dataset.radixToastAnnounceAlt;n&&t.push(n)}else t.push(...Ig(e))}})),t}function Lg(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Xt(o,a):o.dispatchEvent(a)}var Fg=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),a=r>o;return"left"===t||"right"===t?a&&r>n:!a&&o>n};function zg(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 Wg(e){const t=document.activeElement;return e.some((e=>e===t||(e.focus(),document.activeElement!==t)))}var Hg=wg,Gg=Cg,jg=Sg,Kg=Pg,Bg=Mg,Vg=Og;const $g=mg,qg=r.forwardRef((({className:t,...n},r)=>e(Hg,{ref:r,className:Ht("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",t),...n})));qg.displayName=Hg.displayName;const Yg=qe("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",success:"border-green-600 text-primary-foreground bg-green-600 hover:bg-green-600/80",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"success"}}),Ug=r.forwardRef((({className:t,variant:n,...r},o)=>e(Gg,{ref:o,className:Ht(Yg({variant:n}),t),...r})));Ug.displayName=Gg.displayName;const Xg=r.forwardRef((({className:t,...n},r)=>e(Bg,{ref:r,className:Ht("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",t),...n})));Xg.displayName=Bg.displayName;const Qg=r.forwardRef((({className:t,...n},r)=>e(Vg,{ref:r,className:Ht("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",t),"toast-close":"",...n,children:e(g,{className:"h-4 w-4"})})));Qg.displayName=Vg.displayName;const Zg=r.forwardRef((({className:t,...n},r)=>e(jg,{ref:r,className:Ht("text-sm font-semibold [&+div]:text-xs",t),...n})));Zg.displayName=jg.displayName;const Jg=r.forwardRef((({className:t,...n},r)=>e(Kg,{ref:r,className:Ht("text-sm opacity-90",t),...n})));Jg.displayName=Kg.displayName;let ev=0;const tv=new Map,nv=e=>{if(tv.has(e))return;const t=setTimeout((()=>{tv.delete(e),iv({type:"REMOVE_TOAST",toastId:e})}),1e6);tv.set(e,t)},rv=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map((e=>e.id===t.toast.id?{...e,...t.toast}:e))};case"DISMISS_TOAST":{const{toastId:n}=t;return n?nv(n):e.toasts.forEach((e=>{nv(e.id)})),{...e,toasts:e.toasts.map((e=>e.id===n||void 0===n?{...e,open:!1}:e))}}case"REMOVE_TOAST":return void 0===t.toastId?{...e,toasts:[]}:{...e,toasts:e.toasts.filter((e=>e.id!==t.toastId))}}},ov=[];let av={toasts:[]};function iv(e){av=rv(av,e),ov.forEach((e=>{e(av)}))}function sv({...e}){const t=(ev=(ev+1)%Number.MAX_VALUE,ev.toString()),n=()=>iv({type:"DISMISS_TOAST",toastId:t});return iv({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:e=>{e||n()}}}),{id:t,dismiss:n,update:e=>iv({type:"UPDATE_TOAST",toast:{...e,id:t,duration:3e3}})}}function lv(){const{toasts:t}=function(){const[e,t]=r.useState(av);return r.useEffect((()=>(ov.push(t),()=>{const e=ov.indexOf(t);e>-1&&ov.splice(e,1)})),[e]),{...e,toast:sv,dismiss:e=>iv({type:"DISMISS_TOAST",toastId:e})}}();return n($g,{children:[t.map((function({id:t,title:r,description:o,action:a,...i}){return n(Ug,{...i,children:[n("div",{className:"grid gap-1",children:[r&&e(Zg,{children:r}),o&&e(Jg,{children:o})]}),a,e(Qg,{})]},t)})),e(qg,{})]})}var cv=r.forwardRef(((t,n)=>{const{pressed:r,defaultPressed:o=!1,onPressedChange:a,...i}=t,[s=!1,l]=Yt({prop:r,onChange:a,defaultProp:o});return e(Ut.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":t.disabled?"":void 0,...i,ref:n,onClick:$t(t.onClick,(()=>{t.disabled||l(!s)}))})}));cv.displayName="Toggle";var dv=cv;const uv=qe("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),fv=r.forwardRef((({className:t,variant:n,size:r,...o},a)=>e(dv,{ref:a,className:Ht(uv({variant:n,size:r,className:t})),...o})));fv.displayName=dv.displayName;var pv="Radio",[mv,hv]=Kt(pv),[gv,vv]=mv(pv),bv=r.forwardRef(((t,o)=>{const{__scopeRadio:a,name:i,checked:s=!1,required:l,disabled:c,value:d="on",onCheck:u,form:f,...p}=t,[m,h]=r.useState(null),g=He(o,(e=>h(e))),v=r.useRef(!1),b=!m||(f||!!m.closest("form"));return n(gv,{scope:a,checked:s,disabled:c,children:[e(Ut.button,{type:"button",role:"radio","aria-checked":s,"data-state":Nv(s),"data-disabled":c?"":void 0,disabled:c,value:d,...p,ref:g,onClick:$t(t.onClick,(e=>{s||u?.(),b&&(v.current=e.isPropagationStopped(),v.current||e.stopPropagation())}))}),b&&e(xv,{control:m,bubbles:!v.current,name:i,value:d,checked:s,required:l,disabled:c,form:f,style:{transform:"translateX(-100%)"}})]})}));bv.displayName=pv;var wv="RadioIndicator",yv=r.forwardRef(((t,n)=>{const{__scopeRadio:r,forceMount:o,...a}=t,i=vv(wv,r);return e(Zt,{present:o||i.checked,children:e(Ut.span,{"data-state":Nv(i.checked),"data-disabled":i.disabled?"":void 0,...a,ref:n})})}));yv.displayName=wv;var xv=t=>{const{control:n,checked:o,bubbles:a=!0,...i}=t,s=r.useRef(null),l=_r(o),c=Sr(n);return r.useEffect((()=>{const e=s.current,t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(l!==o&&n){const t=new Event("click",{bubbles:a});n.call(e,o),e.dispatchEvent(t)}}),[l,o,a]),e("input",{type:"radio","aria-hidden":!0,defaultChecked:o,...i,tabIndex:-1,ref:s,style:{...t.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Nv(e){return e?"checked":"unchecked"}var Cv=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],kv="RadioGroup",[Rv,Ev]=Kt(kv,[jl,hv]),_v=jl(),Sv=hv(),[Pv,Tv]=Rv(kv),Mv=r.forwardRef(((t,n)=>{const{__scopeRadioGroup:r,name:o,defaultValue:a,value:i,required:s=!1,disabled:l=!1,orientation:c,dir:d,loop:u=!0,onValueChange:f,...p}=t,m=_v(r),h=yn(d),[g,v]=Yt({prop:i,defaultProp:a,onChange:f});return e(Pv,{scope:r,name:o,required:s,disabled:l,value:g,onValueChange:v,children:e(Ql,{asChild:!0,...m,orientation:c,dir:h,loop:u,children:e(Ut.div,{role:"radiogroup","aria-required":s,"aria-orientation":c,"data-disabled":l?"":void 0,dir:h,...p,ref:n})})})}));Mv.displayName=kv;var Dv="RadioGroupItem",Ov=r.forwardRef(((t,n)=>{const{__scopeRadioGroup:o,disabled:a,...i}=t,s=Tv(Dv,o),l=s.disabled||a,c=_v(o),d=Sv(o),u=r.useRef(null),f=He(n,u),p=s.value===i.value,m=r.useRef(!1);return r.useEffect((()=>{const e=e=>{Cv.includes(e.key)&&(m.current=!0)},t=()=>m.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}}),[]),e(Zl,{asChild:!0,...c,focusable:!l,active:p,children:e(bv,{disabled:l,required:s.required,checked:p,...d,...i,name:s.name,ref:f,onCheck:()=>s.onValueChange(i.value),onKeyDown:$t((e=>{"Enter"===e.key&&e.preventDefault()})),onFocus:$t(i.onFocus,(()=>{m.current&&u.current?.click()}))})})}));Ov.displayName=Dv;var Av=r.forwardRef(((t,n)=>{const{__scopeRadioGroup:r,...o}=t,a=Sv(r);return e(yv,{...a,...o,ref:n})}));Av.displayName="RadioGroupIndicator";var Iv=Mv,Lv=Ov,Fv=Av;const zv=r.forwardRef((({className:t,...n},r)=>e(Iv,{className:Ht("grid gap-2",t),...n,ref:r})));zv.displayName=Iv.displayName;const Wv=r.forwardRef((({className:t,...n},r)=>e(Lv,{ref:r,className:Ht("aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t),...n,children:e(Fv,{className:"flex items-center justify-center",children:e(v,{className:"h-3.5 w-3.5 fill-primary"})})})));Wv.displayName=Lv.displayName,function(e){const t={},n=O();for(const e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e]);for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(void 0===e[n]?delete t[n]:t[n]=e[n]);A(t)}({locale:Fe});export{er as Accordion,rr as AccordionContent,tr as AccordionItem,nr as AccordionTrigger,ar as Alert,sr as AlertDescription,ir as AlertTitle,cr as Badge,jt as Button,dr as Calendar,ur as Card,hr as CardContent,mr as CardDescription,gr as CardFooter,fr as CardHeader,pr as CardTitle,yr as ChartContainer,kr as ChartLegend,Rr as ChartLegendContent,xr as ChartStyle,Nr as ChartTooltip,Cr as ChartTooltipContent,jr as Checkbox,Vr as CheckedValue,vu as CopiedFieldValue,zs as DateRangePicker,Rl as Dialog,Sl as DialogClose,Tl as DialogContent,Al as DialogDescription,Dl as DialogFooter,Ml as DialogHeader,Pl as DialogOverlay,_l as DialogPortal,Ol as DialogTitle,El as DialogTrigger,eu as DropdownMenu,du as DropdownMenuCheckboxItem,lu as DropdownMenuContent,nu as DropdownMenuGroup,cu as DropdownMenuItem,fu as DropdownMenuLabel,ru as DropdownMenuPortal,au as DropdownMenuRadioGroup,uu as DropdownMenuRadioItem,pu as DropdownMenuSeparator,mu as DropdownMenuShortcut,ou as DropdownMenuSub,su as DropdownMenuSubContent,iu as DropdownMenuSubTrigger,tu as DropdownMenuTrigger,Ih as EmptyTableRow,gu as FieldValue,Wu as FormInput,Br as HStack,Iu as HoverCard,Fu as HoverCardContent,Lu as HoverCardTrigger,zu as Input,Ku as Label,Bu as Loader,Vu as NumericInput,Uu as Pagination,As as Popover,Ls as PopoverAnchor,Fs as PopoverContent,Is as PopoverTrigger,pf as Progress,zv as RadioGroup,Wv as RadioGroupItem,mf as ScrollArea,Op as Select,Wp as SelectContent,Ap as SelectGroup,Gp as SelectItem,Hp as SelectLabel,zp as SelectScrollDownButton,Fp as SelectScrollUpButton,jp as SelectSeparator,Lp as SelectTrigger,Ip as SelectValue,qp as Separator,Yp as ShadcnTable,Xp as ShadcnTableBody,tm as ShadcnTableCaption,em as ShadcnTableCell,Qp as ShadcnTableFooter,Jp as ShadcnTableHead,Up as ShadcnTableHeader,Zp as ShadcnTableRow,nm as Sheet,om as SheetClose,lm as SheetContent,fm as SheetDescription,dm as SheetFooter,cm as SheetHeader,im as SheetOverlay,am as SheetPortal,um as SheetTitle,rm as SheetTrigger,qm as Sidebar,th as SidebarContent,Jm as SidebarFooter,nh as SidebarGroup,oh as SidebarGroupAction,ah as SidebarGroupContent,rh as SidebarGroupLabel,Zm as SidebarHeader,Qm as SidebarInput,Xm as SidebarInset,ih as SidebarMenu,dh as SidebarMenuAction,uh as SidebarMenuBadge,ch as SidebarMenuButton,sh as SidebarMenuItem,fh as SidebarMenuSkeleton,ph as SidebarMenuSub,hh as SidebarMenuSubButton,mh as SidebarMenuSubItem,$m as SidebarProvider,Um as SidebarRail,eh as SidebarSeparator,Ym as SidebarTrigger,mm as Skeleton,Th as Switch,Mh as Table,Ah as TableCell,Dh as TableRow,Oh as TableRowSkeleton,Lh as TableStatusCell,tg as Tabs,og as TabsContent,ng as TabsList,rg as TabsTrigger,hu as Text,ag as Textarea,Ug as Toast,Xg as ToastAction,Qg as ToastClose,Jg as ToastDescription,$g as ToastProvider,Zg as ToastTitle,qg as ToastViewport,lv as Toaster,fv as Toggle,Gm as Tooltip,Km as TooltipContent,Hm as TooltipProvider,jm as TooltipTrigger,Kr as VStack,lr as badgeVariants,Gt as buttonVariants,uv as toggleVariants,Vm as useSidebar};
3
2
  //# sourceMappingURL=index.js.map