import{j as s,r as g,u as wn}from"./index-gX9iSPDQ.js";import{C as pn,B as _n,g as Dn}from"./audio-recordings.query-TNjEEFpx.js";import{c as vt,a as C,i as Ke,u as Mn,b as gt,d as Nn,f as yt,P as me,e as te,S as jn,B as V}from"./createLucideIcon-W0Ra_zwb.js";import{u as Pn,C as Cn,b as kn,c as On,a as Sn}from"./index-BIG1Xq_V.js";import{C as Wn}from"./chevron-right-BHY7sgyv.js";import{C as Fn,D as Tn,a as Rn,b as En,d as Yn,c as Ze}from"./dropdown-menu-AOj3LtoW.js";import{b as Oe,c as Se,d as bt,e as We,z as ce,u as In,s as Ln,F as An,a as we,I as Bn}from"./index-Cc5_sMEQ.js";import{c as xt,a as Hn,A as wt,P as qn,h as Vn,R as $n,u as Gn,F as Qn,D as Xn,C as Un,b as zn}from"./Combination-BtzWoF87.js";import{P as pt}from"./index-DVAmEPTK.js";import{S as Jn,a as Kn,b as Zn,c as er,d as tr}from"./select-CKazIOen.js";import{S as K,B as nr,a as et,b as rr,c as ar}from"./skeleton-DGPXlcFF.js";import{R as pe}from"./refresh-ccw-DxZh10-m.js";import{L as or}from"./link-YPZRNdtx.js";import"./apiConstants-BiX1T2IA.js";import"./index-DmVJm5MZ.js";/**
 * @license lucide-react v0.476.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const sr=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],tt=vt("Eye",sr);/**
 * @license lucide-react v0.476.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ir=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]],lr=vt("Upload",ir),Re=6048e5,cr=864e5,nt=Symbol.for("constructDateFrom");function k(e,n){return typeof e=="function"?e(n):e&&typeof e=="object"&&nt in e?e[nt](n):e instanceof Date?new e.constructor(n):new Date(n)}function N(e,n){return k(n||e,e)}function O(e,n,t){const r=N(e,t==null?void 0:t.in);return isNaN(n)?k((t==null?void 0:t.in)||e,NaN):(n&&r.setDate(r.getDate()+n),r)}function T(e,n,t){const r=N(e,t==null?void 0:t.in);if(isNaN(n))return k((t==null?void 0:t.in)||e,NaN);if(!n)return r;const a=r.getDate(),o=k((t==null?void 0:t.in)||e,r.getTime());o.setMonth(r.getMonth()+n+1,0);const i=o.getDate();return a>=i?o:(r.setFullYear(o.getFullYear(),o.getMonth(),a),r)}let ur={};function ae(){return ur}function Y(e,n){var l,c,u,d;const t=ae(),r=(n==null?void 0:n.weekStartsOn)??((c=(l=n==null?void 0:n.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??t.weekStartsOn??((d=(u=t.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,a=N(e,n==null?void 0:n.in),o=a.getDay(),i=(o<r?7:0)+o-r;return a.setDate(a.getDate()-i),a.setHours(0,0,0,0),a}function $(e,n){return Y(e,{...n,weekStartsOn:1})}function _t(e,n){const t=N(e,n==null?void 0:n.in),r=t.getFullYear(),a=k(t,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);const o=$(a),i=k(t,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const l=$(i);return t.getTime()>=o.getTime()?r+1:t.getTime()>=l.getTime()?r:r-1}function de(e){const n=N(e),t=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return t.setUTCFullYear(n.getFullYear()),+e-+t}function z(e,...n){const t=k.bind(null,e||n.find(r=>typeof r=="object"));return n.map(t)}function X(e,n){const t=N(e,n==null?void 0:n.in);return t.setHours(0,0,0,0),t}function E(e,n,t){const[r,a]=z(t==null?void 0:t.in,e,n),o=X(r),i=X(a),l=+o-de(o),c=+i-de(i);return Math.round((l-c)/cr)}function dr(e,n){const t=_t(e,n),r=k(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),$(r)}function Fe(e,n,t){return O(e,n*7,t)}function fr(e,n,t){return T(e,n*12,t)}function hr(e,n){let t,r=n==null?void 0:n.in;return e.forEach(a=>{!r&&typeof a=="object"&&(r=k.bind(null,a));const o=N(a,r);(!t||t<o||isNaN(+o))&&(t=o)}),k(r,t||NaN)}function mr(e,n){let t,r=n==null?void 0:n.in;return e.forEach(a=>{!r&&typeof a=="object"&&(r=k.bind(null,a));const o=N(a,r);(!t||t>o||isNaN(+o))&&(t=o)}),k(r,t||NaN)}function S(e,n,t){const[r,a]=z(t==null?void 0:t.in,e,n);return+X(r)==+X(a)}function Ee(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function vr(e){return!(!Ee(e)&&typeof e!="number"||isNaN(+N(e)))}function re(e,n,t){const[r,a]=z(t==null?void 0:t.in,e,n),o=r.getFullYear()-a.getFullYear(),i=r.getMonth()-a.getMonth();return o*12+i}function gr(e,n,t){const[r,a]=z(t==null?void 0:t.in,e,n),o=Y(r,t),i=Y(a,t),l=+o-de(o),c=+i-de(i);return Math.round((l-c)/Re)}function Ye(e,n){const t=N(e,n==null?void 0:n.in),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function W(e,n){const t=N(e,n==null?void 0:n.in);return t.setDate(1),t.setHours(0,0,0,0),t}function Dt(e,n){const t=N(e,n==null?void 0:n.in);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}function Ie(e,n){var l,c,u,d;const t=ae(),r=(n==null?void 0:n.weekStartsOn)??((c=(l=n==null?void 0:n.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??t.weekStartsOn??((d=(u=t.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,a=N(e,n==null?void 0:n.in),o=a.getDay(),i=(o<r?-7:0)+6-(o-r);return a.setDate(a.getDate()+i),a.setHours(23,59,59,999),a}function Mt(e,n){return Ie(e,{...n,weekStartsOn:1})}const yr={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"}},br=(e,n,t)=>{let r;const a=yr[e];return typeof a=="string"?r=a:n===1?r=a.one:r=a.other.replace("{{count}}",n.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+r:r+" ago":r};function _e(e){return(n={})=>{const t=n.width?String(n.width):e.defaultWidth;return e.formats[t]||e.formats[e.defaultWidth]}}const xr={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},wr={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},pr={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},_r={date:_e({formats:xr,defaultWidth:"full"}),time:_e({formats:wr,defaultWidth:"full"}),dateTime:_e({formats:pr,defaultWidth:"full"})},Dr={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Mr=(e,n,t,r)=>Dr[e];function Z(e){return(n,t)=>{const r=t!=null&&t.context?String(t.context):"standalone";let a;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,l=t!=null&&t.width?String(t.width):i;a=e.formattingValues[l]||e.formattingValues[i]}else{const i=e.defaultWidth,l=t!=null&&t.width?String(t.width):e.defaultWidth;a=e.values[l]||e.values[i]}const o=e.argumentCallback?e.argumentCallback(n):n;return a[o]}}const Nr={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},jr={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Pr={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"]},Cr={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"]},kr={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"}},Or={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"}},Sr=(e,n)=>{const t=Number(e),r=t%100;if(r>20||r<10)switch(r%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},Wr={ordinalNumber:Sr,era:Z({values:Nr,defaultWidth:"wide"}),quarter:Z({values:jr,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Z({values:Pr,defaultWidth:"wide"}),day:Z({values:Cr,defaultWidth:"wide"}),dayPeriod:Z({values:kr,defaultWidth:"wide",formattingValues:Or,defaultFormattingWidth:"wide"})};function ee(e){return(n,t={})=>{const r=t.width,a=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=n.match(a);if(!o)return null;const i=o[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?Tr(l,f=>f.test(i)):Fr(l,f=>f.test(i));let u;u=e.valueCallback?e.valueCallback(c):c,u=t.valueCallback?t.valueCallback(u):u;const d=n.slice(i.length);return{value:u,rest:d}}}function Fr(e,n){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&n(e[t]))return t}function Tr(e,n){for(let t=0;t<e.length;t++)if(n(e[t]))return t}function Rr(e){return(n,t={})=>{const r=n.match(e.matchPattern);if(!r)return null;const a=r[0],o=n.match(e.parsePattern);if(!o)return null;let i=e.valueCallback?e.valueCallback(o[0]):o[0];i=t.valueCallback?t.valueCallback(i):i;const l=n.slice(a.length);return{value:i,rest:l}}}const Er=/^(\d+)(th|st|nd|rd)?/i,Yr=/\d+/i,Ir={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},Lr={any:[/^b/i,/^(a|c)/i]},Ar={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Br={any:[/1/i,/2/i,/3/i,/4/i]},Hr={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},qr={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]},Vr={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},$r={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]},Gr={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},Qr={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}},Xr={ordinalNumber:Rr({matchPattern:Er,parsePattern:Yr,valueCallback:e=>parseInt(e,10)}),era:ee({matchPatterns:Ir,defaultMatchWidth:"wide",parsePatterns:Lr,defaultParseWidth:"any"}),quarter:ee({matchPatterns:Ar,defaultMatchWidth:"wide",parsePatterns:Br,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ee({matchPatterns:Hr,defaultMatchWidth:"wide",parsePatterns:qr,defaultParseWidth:"any"}),day:ee({matchPatterns:Vr,defaultMatchWidth:"wide",parsePatterns:$r,defaultParseWidth:"any"}),dayPeriod:ee({matchPatterns:Gr,defaultMatchWidth:"any",parsePatterns:Qr,defaultParseWidth:"any"})},Nt={code:"en-US",formatDistance:br,formatLong:_r,formatRelative:Mr,localize:Wr,match:Xr,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Ur(e,n){const t=N(e,n==null?void 0:n.in);return E(t,Dt(t))+1}function jt(e,n){const t=N(e,n==null?void 0:n.in),r=+$(t)-+dr(t);return Math.round(r/Re)+1}function Pt(e,n){var d,f,h,v;const t=N(e,n==null?void 0:n.in),r=t.getFullYear(),a=ae(),o=(n==null?void 0:n.firstWeekContainsDate)??((f=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??a.firstWeekContainsDate??((v=(h=a.locale)==null?void 0:h.options)==null?void 0:v.firstWeekContainsDate)??1,i=k((n==null?void 0:n.in)||e,0);i.setFullYear(r+1,0,o),i.setHours(0,0,0,0);const l=Y(i,n),c=k((n==null?void 0:n.in)||e,0);c.setFullYear(r,0,o),c.setHours(0,0,0,0);const u=Y(c,n);return+t>=+l?r+1:+t>=+u?r:r-1}function zr(e,n){var l,c,u,d;const t=ae(),r=(n==null?void 0:n.firstWeekContainsDate)??((c=(l=n==null?void 0:n.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??t.firstWeekContainsDate??((d=(u=t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,a=Pt(e,n),o=k((n==null?void 0:n.in)||e,0);return o.setFullYear(a,0,r),o.setHours(0,0,0,0),Y(o,n)}function Ct(e,n){const t=N(e,n==null?void 0:n.in),r=+Y(t,n)-+zr(t,n);return Math.round(r/Re)+1}function M(e,n){const t=e<0?"-":"",r=Math.abs(e).toString().padStart(n,"0");return t+r}const A={y(e,n){const t=e.getFullYear(),r=t>0?t:1-t;return M(n==="yy"?r%100:r,n.length)},M(e,n){const t=e.getMonth();return n==="M"?String(t+1):M(t+1,2)},d(e,n){return M(e.getDate(),n.length)},a(e,n){const t=e.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(e,n){return M(e.getHours()%12||12,n.length)},H(e,n){return M(e.getHours(),n.length)},m(e,n){return M(e.getMinutes(),n.length)},s(e,n){return M(e.getSeconds(),n.length)},S(e,n){const t=n.length,r=e.getMilliseconds(),a=Math.trunc(r*Math.pow(10,t-3));return M(a,n.length)}},G={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},rt={G:function(e,n,t){const r=e.getFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return t.era(r,{width:"abbreviated"});case"GGGGG":return t.era(r,{width:"narrow"});case"GGGG":default:return t.era(r,{width:"wide"})}},y:function(e,n,t){if(n==="yo"){const r=e.getFullYear(),a=r>0?r:1-r;return t.ordinalNumber(a,{unit:"year"})}return A.y(e,n)},Y:function(e,n,t,r){const a=Pt(e,r),o=a>0?a:1-a;if(n==="YY"){const i=o%100;return M(i,2)}return n==="Yo"?t.ordinalNumber(o,{unit:"year"}):M(o,n.length)},R:function(e,n){const t=_t(e);return M(t,n.length)},u:function(e,n){const t=e.getFullYear();return M(t,n.length)},Q:function(e,n,t){const r=Math.ceil((e.getMonth()+1)/3);switch(n){case"Q":return String(r);case"QQ":return M(r,2);case"Qo":return t.ordinalNumber(r,{unit:"quarter"});case"QQQ":return t.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,n,t){const r=Math.ceil((e.getMonth()+1)/3);switch(n){case"q":return String(r);case"qq":return M(r,2);case"qo":return t.ordinalNumber(r,{unit:"quarter"});case"qqq":return t.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,n,t){const r=e.getMonth();switch(n){case"M":case"MM":return A.M(e,n);case"Mo":return t.ordinalNumber(r+1,{unit:"month"});case"MMM":return t.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(r,{width:"wide",context:"formatting"})}},L:function(e,n,t){const r=e.getMonth();switch(n){case"L":return String(r+1);case"LL":return M(r+1,2);case"Lo":return t.ordinalNumber(r+1,{unit:"month"});case"LLL":return t.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(r,{width:"wide",context:"standalone"})}},w:function(e,n,t,r){const a=Ct(e,r);return n==="wo"?t.ordinalNumber(a,{unit:"week"}):M(a,n.length)},I:function(e,n,t){const r=jt(e);return n==="Io"?t.ordinalNumber(r,{unit:"week"}):M(r,n.length)},d:function(e,n,t){return n==="do"?t.ordinalNumber(e.getDate(),{unit:"date"}):A.d(e,n)},D:function(e,n,t){const r=Ur(e);return n==="Do"?t.ordinalNumber(r,{unit:"dayOfYear"}):M(r,n.length)},E:function(e,n,t){const r=e.getDay();switch(n){case"E":case"EE":case"EEE":return t.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(r,{width:"short",context:"formatting"});case"EEEE":default:return t.day(r,{width:"wide",context:"formatting"})}},e:function(e,n,t,r){const a=e.getDay(),o=(a-r.weekStartsOn+8)%7||7;switch(n){case"e":return String(o);case"ee":return M(o,2);case"eo":return t.ordinalNumber(o,{unit:"day"});case"eee":return t.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(a,{width:"short",context:"formatting"});case"eeee":default:return t.day(a,{width:"wide",context:"formatting"})}},c:function(e,n,t,r){const a=e.getDay(),o=(a-r.weekStartsOn+8)%7||7;switch(n){case"c":return String(o);case"cc":return M(o,n.length);case"co":return t.ordinalNumber(o,{unit:"day"});case"ccc":return t.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(a,{width:"narrow",context:"standalone"});case"cccccc":return t.day(a,{width:"short",context:"standalone"});case"cccc":default:return t.day(a,{width:"wide",context:"standalone"})}},i:function(e,n,t){const r=e.getDay(),a=r===0?7:r;switch(n){case"i":return String(a);case"ii":return M(a,n.length);case"io":return t.ordinalNumber(a,{unit:"day"});case"iii":return t.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(r,{width:"short",context:"formatting"});case"iiii":default:return t.day(r,{width:"wide",context:"formatting"})}},a:function(e,n,t){const a=e.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,n,t){const r=e.getHours();let a;switch(r===12?a=G.noon:r===0?a=G.midnight:a=r/12>=1?"pm":"am",n){case"b":case"bb":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,n,t){const r=e.getHours();let a;switch(r>=17?a=G.evening:r>=12?a=G.afternoon:r>=4?a=G.morning:a=G.night,n){case"B":case"BB":case"BBB":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,n,t){if(n==="ho"){let r=e.getHours()%12;return r===0&&(r=12),t.ordinalNumber(r,{unit:"hour"})}return A.h(e,n)},H:function(e,n,t){return n==="Ho"?t.ordinalNumber(e.getHours(),{unit:"hour"}):A.H(e,n)},K:function(e,n,t){const r=e.getHours()%12;return n==="Ko"?t.ordinalNumber(r,{unit:"hour"}):M(r,n.length)},k:function(e,n,t){let r=e.getHours();return r===0&&(r=24),n==="ko"?t.ordinalNumber(r,{unit:"hour"}):M(r,n.length)},m:function(e,n,t){return n==="mo"?t.ordinalNumber(e.getMinutes(),{unit:"minute"}):A.m(e,n)},s:function(e,n,t){return n==="so"?t.ordinalNumber(e.getSeconds(),{unit:"second"}):A.s(e,n)},S:function(e,n){return A.S(e,n)},X:function(e,n,t){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(n){case"X":return ot(r);case"XXXX":case"XX":return q(r);case"XXXXX":case"XXX":default:return q(r,":")}},x:function(e,n,t){const r=e.getTimezoneOffset();switch(n){case"x":return ot(r);case"xxxx":case"xx":return q(r);case"xxxxx":case"xxx":default:return q(r,":")}},O:function(e,n,t){const r=e.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+at(r,":");case"OOOO":default:return"GMT"+q(r,":")}},z:function(e,n,t){const r=e.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+at(r,":");case"zzzz":default:return"GMT"+q(r,":")}},t:function(e,n,t){const r=Math.trunc(+e/1e3);return M(r,n.length)},T:function(e,n,t){return M(+e,n.length)}};function at(e,n=""){const t=e>0?"-":"+",r=Math.abs(e),a=Math.trunc(r/60),o=r%60;return o===0?t+String(a):t+String(a)+n+M(o,2)}function ot(e,n){return e%60===0?(e>0?"-":"+")+M(Math.abs(e)/60,2):q(e,n)}function q(e,n=""){const t=e>0?"-":"+",r=Math.abs(e),a=M(Math.trunc(r/60),2),o=M(r%60,2);return t+a+n+o}const st=(e,n)=>{switch(e){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},kt=(e,n)=>{switch(e){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},Jr=(e,n)=>{const t=e.match(/(P+)(p+)?/)||[],r=t[1],a=t[2];if(!a)return st(e,n);let o;switch(r){case"P":o=n.dateTime({width:"short"});break;case"PP":o=n.dateTime({width:"medium"});break;case"PPP":o=n.dateTime({width:"long"});break;case"PPPP":default:o=n.dateTime({width:"full"});break}return o.replace("{{date}}",st(r,n)).replace("{{time}}",kt(a,n))},Kr={p:kt,P:Jr},Zr=/^D+$/,ea=/^Y+$/,ta=["D","DD","YY","YYYY"];function na(e){return Zr.test(e)}function ra(e){return ea.test(e)}function aa(e,n,t){const r=oa(e,n,t);if(console.warn(r),ta.includes(e))throw new RangeError(r)}function oa(e,n,t){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${n}\`) for formatting ${r} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const sa=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ia=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,la=/^'([^]*?)'?$/,ca=/''/g,ua=/[a-zA-Z]/;function L(e,n,t){var d,f,h,v,b,_,m,D;const r=ae(),a=(t==null?void 0:t.locale)??r.locale??Nt,o=(t==null?void 0:t.firstWeekContainsDate)??((f=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??r.firstWeekContainsDate??((v=(h=r.locale)==null?void 0:h.options)==null?void 0:v.firstWeekContainsDate)??1,i=(t==null?void 0:t.weekStartsOn)??((_=(b=t==null?void 0:t.locale)==null?void 0:b.options)==null?void 0:_.weekStartsOn)??r.weekStartsOn??((D=(m=r.locale)==null?void 0:m.options)==null?void 0:D.weekStartsOn)??0,l=N(e,t==null?void 0:t.in);if(!vr(l))throw new RangeError("Invalid time value");let c=n.match(ia).map(p=>{const P=p[0];if(P==="p"||P==="P"){const H=Kr[P];return H(p,a.formatLong)}return p}).join("").match(sa).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const P=p[0];if(P==="'")return{isToken:!1,value:da(p)};if(rt[P])return{isToken:!0,value:p};if(P.match(ua))throw new RangeError("Format string contains an unescaped latin alphabet character `"+P+"`");return{isToken:!1,value:p}});a.localize.preprocessor&&(c=a.localize.preprocessor(l,c));const u={firstWeekContainsDate:o,weekStartsOn:i,locale:a};return c.map(p=>{if(!p.isToken)return p.value;const P=p.value;(!(t!=null&&t.useAdditionalWeekYearTokens)&&ra(P)||!(t!=null&&t.useAdditionalDayOfYearTokens)&&na(P))&&aa(P,n,String(e));const H=rt[P[0]];return H(l,P,a.localize,u)}).join("")}function da(e){const n=e.match(la);return n?n[1].replace(ca,"'"):e}function fa(e,n){const t=N(e,n==null?void 0:n.in),r=t.getFullYear(),a=t.getMonth(),o=k(t,0);return o.setFullYear(r,a+1,0),o.setHours(0,0,0,0),o.getDate()}function ha(e){return Math.trunc(+N(e)/1e3)}function ma(e,n){const t=N(e,n==null?void 0:n.in),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(0,0,0,0),N(t,n==null?void 0:n.in)}function va(e,n){const t=N(e,n==null?void 0:n.in);return gr(ma(t,n),W(t,n),n)+1}function Te(e,n){return+N(e)>+N(n)}function Ot(e,n){return+N(e)<+N(n)}function Le(e,n,t){const[r,a]=z(t==null?void 0:t.in,e,n);return r.getFullYear()===a.getFullYear()&&r.getMonth()===a.getMonth()}function ga(e,n,t){const[r,a]=z(t==null?void 0:t.in,e,n);return r.getFullYear()===a.getFullYear()}function De(e,n,t){return O(e,-n,t)}function Me(e,n,t){const r=N(e,t==null?void 0:t.in),a=r.getFullYear(),o=r.getDate(),i=k(e,0);i.setFullYear(a,n,15),i.setHours(0,0,0,0);const l=fa(i);return r.setMonth(n,Math.min(o,l)),r}function it(e,n,t){const r=N(e,t==null?void 0:t.in);return isNaN(+r)?k(e,NaN):(r.setFullYear(n),r)}var x=function(){return x=Object.assign||function(n){for(var t,r=1,a=arguments.length;r<a;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o])}return n},x.apply(this,arguments)};function ya(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)n.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(t[r[a]]=e[r[a]]);return t}function St(e,n,t){for(var r=0,a=n.length,o;r<a;r++)(o||!(r in n))&&(o||(o=Array.prototype.slice.call(n,0,r)),o[r]=n[r]);return e.concat(o||Array.prototype.slice.call(n))}function oe(e){return e.mode==="multiple"}function se(e){return e.mode==="range"}function ve(e){return e.mode==="single"}var ba={root:"rdp",multiple_months:"rdp-multiple_months",with_weeknumber:"rdp-with_weeknumber",vhidden:"rdp-vhidden",button_reset:"rdp-button_reset",button:"rdp-button",caption:"rdp-caption",caption_start:"rdp-caption_start",caption_end:"rdp-caption_end",caption_between:"rdp-caption_between",caption_label:"rdp-caption_label",caption_dropdowns:"rdp-caption_dropdowns",dropdown:"rdp-dropdown",dropdown_month:"rdp-dropdown_month",dropdown_year:"rdp-dropdown_year",dropdown_icon:"rdp-dropdown_icon",months:"rdp-months",month:"rdp-month",table:"rdp-table",tbody:"rdp-tbody",tfoot:"rdp-tfoot",head:"rdp-head",head_row:"rdp-head_row",head_cell:"rdp-head_cell",nav:"rdp-nav",nav_button:"rdp-nav_button",nav_button_previous:"rdp-nav_button_previous",nav_button_next:"rdp-nav_button_next",nav_icon:"rdp-nav_icon",row:"rdp-row",weeknumber:"rdp-weeknumber",cell:"rdp-cell",day:"rdp-day",day_today:"rdp-day_today",day_outside:"rdp-day_outside",day_selected:"rdp-day_selected",day_disabled:"rdp-day_disabled",day_hidden:"rdp-day_hidden",day_range_start:"rdp-day_range_start",day_range_end:"rdp-day_range_end",day_range_middle:"rdp-day_range_middle"};function xa(e,n){return L(e,"LLLL y",n)}function wa(e,n){return L(e,"d",n)}function pa(e,n){return L(e,"LLLL",n)}function _a(e){return"".concat(e)}function Da(e,n){return L(e,"cccccc",n)}function Ma(e,n){return L(e,"yyyy",n)}var Na=Object.freeze({__proto__:null,formatCaption:xa,formatDay:wa,formatMonthCaption:pa,formatWeekNumber:_a,formatWeekdayName:Da,formatYearCaption:Ma}),ja=function(e,n,t){return L(e,"do MMMM (EEEE)",t)},Pa=function(){return"Month: "},Ca=function(){return"Go to next month"},ka=function(){return"Go to previous month"},Oa=function(e,n){return L(e,"cccc",n)},Sa=function(e){return"Week n. ".concat(e)},Wa=function(){return"Year: "},Fa=Object.freeze({__proto__:null,labelDay:ja,labelMonthDropdown:Pa,labelNext:Ca,labelPrevious:ka,labelWeekNumber:Sa,labelWeekday:Oa,labelYearDropdown:Wa});function Ta(){var e="buttons",n=ba,t=Nt,r={},a={},o=1,i={},l=new Date;return{captionLayout:e,classNames:n,formatters:Na,labels:Fa,locale:t,modifiersClassNames:r,modifiers:a,numberOfMonths:o,styles:i,today:l,mode:"default"}}function Ra(e){var n=e.fromYear,t=e.toYear,r=e.fromMonth,a=e.toMonth,o=e.fromDate,i=e.toDate;return r?o=W(r):n&&(o=new Date(n,0,1)),a?i=Ye(a):t&&(i=new Date(t,11,31)),{fromDate:o?X(o):void 0,toDate:i?X(i):void 0}}var Wt=g.createContext(void 0);function Ea(e){var n,t=e.initialProps,r=Ta(),a=Ra(t),o=a.fromDate,i=a.toDate,l=(n=t.captionLayout)!==null&&n!==void 0?n:r.captionLayout;l!=="buttons"&&(!o||!i)&&(l="buttons");var c;(ve(t)||oe(t)||se(t))&&(c=t.onSelect);var u=x(x(x({},r),t),{captionLayout:l,classNames:x(x({},r.classNames),t.classNames),components:x({},t.components),formatters:x(x({},r.formatters),t.formatters),fromDate:o,labels:x(x({},r.labels),t.labels),mode:t.mode||r.mode,modifiers:x(x({},r.modifiers),t.modifiers),modifiersClassNames:x(x({},r.modifiersClassNames),t.modifiersClassNames),onSelect:c,styles:x(x({},r.styles),t.styles),toDate:i});return s.jsx(Wt.Provider,{value:u,children:e.children})}function j(){var e=g.useContext(Wt);if(!e)throw new Error("useDayPicker must be used within a DayPickerProvider.");return e}function Ft(e){var n=j(),t=n.locale,r=n.classNames,a=n.styles,o=n.formatters.formatCaption;return s.jsx("div",{className:r.caption_label,style:a.caption_label,"aria-live":"polite",role:"presentation",id:e.id,children:o(e.displayMonth,{locale:t})})}function Ya(e){return s.jsx("svg",x({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},e,{children:s.jsx("path",{d:"M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.778175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z",fill:"currentColor",fillRule:"nonzero"})}))}function Tt(e){var n,t,r=e.onChange,a=e.value,o=e.children,i=e.caption,l=e.className,c=e.style,u=j(),d=(t=(n=u.components)===null||n===void 0?void 0:n.IconDropdown)!==null&&t!==void 0?t:Ya;return s.jsxs("div",{className:l,style:c,children:[s.jsx("span",{className:u.classNames.vhidden,children:e["aria-label"]}),s.jsx("select",{name:e.name,"aria-label":e["aria-label"],className:u.classNames.dropdown,style:u.styles.dropdown,value:a,onChange:r,children:o}),s.jsxs("div",{className:u.classNames.caption_label,style:u.styles.caption_label,"aria-hidden":"true",children:[i,s.jsx(d,{className:u.classNames.dropdown_icon,style:u.styles.dropdown_icon})]})]})}function Ia(e){var n,t=j(),r=t.fromDate,a=t.toDate,o=t.styles,i=t.locale,l=t.formatters.formatMonthCaption,c=t.classNames,u=t.components,d=t.labels.labelMonthDropdown;if(!r)return s.jsx(s.Fragment,{});if(!a)return s.jsx(s.Fragment,{});var f=[];if(ga(r,a))for(var h=W(r),v=r.getMonth();v<=a.getMonth();v++)f.push(Me(h,v));else for(var h=W(new Date),v=0;v<=11;v++)f.push(Me(h,v));var b=function(m){var D=Number(m.target.value),p=Me(W(e.displayMonth),D);e.onChange(p)},_=(n=u==null?void 0:u.Dropdown)!==null&&n!==void 0?n:Tt;return s.jsx(_,{name:"months","aria-label":d(),className:c.dropdown_month,style:o.dropdown_month,onChange:b,value:e.displayMonth.getMonth(),caption:l(e.displayMonth,{locale:i}),children:f.map(function(m){return s.jsx("option",{value:m.getMonth(),children:l(m,{locale:i})},m.getMonth())})})}function La(e){var n,t=e.displayMonth,r=j(),a=r.fromDate,o=r.toDate,i=r.locale,l=r.styles,c=r.classNames,u=r.components,d=r.formatters.formatYearCaption,f=r.labels.labelYearDropdown,h=[];if(!a)return s.jsx(s.Fragment,{});if(!o)return s.jsx(s.Fragment,{});for(var v=a.getFullYear(),b=o.getFullYear(),_=v;_<=b;_++)h.push(it(Dt(new Date),_));var m=function(p){var P=it(W(t),Number(p.target.value));e.onChange(P)},D=(n=u==null?void 0:u.Dropdown)!==null&&n!==void 0?n:Tt;return s.jsx(D,{name:"years","aria-label":f(),className:c.dropdown_year,style:l.dropdown_year,onChange:m,value:t.getFullYear(),caption:d(t,{locale:i}),children:h.map(function(p){return s.jsx("option",{value:p.getFullYear(),children:d(p,{locale:i})},p.getFullYear())})})}function Aa(e,n){var t=g.useState(e),r=t[0],a=t[1],o=n===void 0?r:n;return[o,a]}function Ba(e){var n=e.month,t=e.defaultMonth,r=e.today,a=n||t||r||new Date,o=e.toDate,i=e.fromDate,l=e.numberOfMonths,c=l===void 0?1:l;if(o&&re(o,a)<0){var u=-1*(c-1);a=T(o,u)}return i&&re(a,i)<0&&(a=i),W(a)}function Ha(){var e=j(),n=Ba(e),t=Aa(n,e.month),r=t[0],a=t[1],o=function(i){var l;if(!e.disableNavigation){var c=W(i);a(c),(l=e.onMonthChange)===null||l===void 0||l.call(e,c)}};return[r,o]}function qa(e,n){for(var t=n.reverseMonths,r=n.numberOfMonths,a=W(e),o=W(T(a,r)),i=re(o,a),l=[],c=0;c<i;c++){var u=T(a,c);l.push(u)}return t&&(l=l.reverse()),l}function Va(e,n){if(!n.disableNavigation){var t=n.toDate,r=n.pagedNavigation,a=n.numberOfMonths,o=a===void 0?1:a,i=r?o:1,l=W(e);if(!t)return T(l,i);var c=re(t,e);if(!(c<o))return T(l,i)}}function $a(e,n){if(!n.disableNavigation){var t=n.fromDate,r=n.pagedNavigation,a=n.numberOfMonths,o=a===void 0?1:a,i=r?o:1,l=W(e);if(!t)return T(l,-i);var c=re(l,t);if(!(c<=0))return T(l,-i)}}var Rt=g.createContext(void 0);function Ga(e){var n=j(),t=Ha(),r=t[0],a=t[1],o=qa(r,n),i=Va(r,n),l=$a(r,n),c=function(f){return o.some(function(h){return Le(f,h)})},u=function(f,h){c(f)||(h&&Ot(f,h)?a(T(f,1+n.numberOfMonths*-1)):a(f))},d={currentMonth:r,displayMonths:o,goToMonth:a,goToDate:u,previousMonth:l,nextMonth:i,isDateDisplayed:c};return s.jsx(Rt.Provider,{value:d,children:e.children})}function ie(){var e=g.useContext(Rt);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}function lt(e){var n,t=j(),r=t.classNames,a=t.styles,o=t.components,i=ie().goToMonth,l=function(d){i(T(d,e.displayIndex?-e.displayIndex:0))},c=(n=o==null?void 0:o.CaptionLabel)!==null&&n!==void 0?n:Ft,u=s.jsx(c,{id:e.id,displayMonth:e.displayMonth});return s.jsxs("div",{className:r.caption_dropdowns,style:a.caption_dropdowns,children:[s.jsx("div",{className:r.vhidden,children:u}),s.jsx(Ia,{onChange:l,displayMonth:e.displayMonth}),s.jsx(La,{onChange:l,displayMonth:e.displayMonth})]})}function Qa(e){return s.jsx("svg",x({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:s.jsx("path",{d:"M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z",fill:"currentColor",fillRule:"nonzero"})}))}function Xa(e){return s.jsx("svg",x({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:s.jsx("path",{d:"M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z",fill:"currentColor"})}))}var fe=g.forwardRef(function(e,n){var t=j(),r=t.classNames,a=t.styles,o=[r.button_reset,r.button];e.className&&o.push(e.className);var i=o.join(" "),l=x(x({},a.button_reset),a.button);return e.style&&Object.assign(l,e.style),s.jsx("button",x({},e,{ref:n,type:"button",className:i,style:l}))});function Ua(e){var n,t,r=j(),a=r.dir,o=r.locale,i=r.classNames,l=r.styles,c=r.labels,u=c.labelPrevious,d=c.labelNext,f=r.components;if(!e.nextMonth&&!e.previousMonth)return s.jsx(s.Fragment,{});var h=u(e.previousMonth,{locale:o}),v=[i.nav_button,i.nav_button_previous].join(" "),b=d(e.nextMonth,{locale:o}),_=[i.nav_button,i.nav_button_next].join(" "),m=(n=f==null?void 0:f.IconRight)!==null&&n!==void 0?n:Xa,D=(t=f==null?void 0:f.IconLeft)!==null&&t!==void 0?t:Qa;return s.jsxs("div",{className:i.nav,style:l.nav,children:[!e.hidePrevious&&s.jsx(fe,{name:"previous-month","aria-label":h,className:v,style:l.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick,children:a==="rtl"?s.jsx(m,{className:i.nav_icon,style:l.nav_icon}):s.jsx(D,{className:i.nav_icon,style:l.nav_icon})}),!e.hideNext&&s.jsx(fe,{name:"next-month","aria-label":b,className:_,style:l.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick,children:a==="rtl"?s.jsx(D,{className:i.nav_icon,style:l.nav_icon}):s.jsx(m,{className:i.nav_icon,style:l.nav_icon})})]})}function ct(e){var n=j().numberOfMonths,t=ie(),r=t.previousMonth,a=t.nextMonth,o=t.goToMonth,i=t.displayMonths,l=i.findIndex(function(b){return Le(e.displayMonth,b)}),c=l===0,u=l===i.length-1,d=n>1&&(c||!u),f=n>1&&(u||!c),h=function(){r&&o(r)},v=function(){a&&o(a)};return s.jsx(Ua,{displayMonth:e.displayMonth,hideNext:d,hidePrevious:f,nextMonth:a,previousMonth:r,onPreviousClick:h,onNextClick:v})}function za(e){var n,t=j(),r=t.classNames,a=t.disableNavigation,o=t.styles,i=t.captionLayout,l=t.components,c=(n=l==null?void 0:l.CaptionLabel)!==null&&n!==void 0?n:Ft,u;return a?u=s.jsx(c,{id:e.id,displayMonth:e.displayMonth}):i==="dropdown"?u=s.jsx(lt,{displayMonth:e.displayMonth,id:e.id}):i==="dropdown-buttons"?u=s.jsxs(s.Fragment,{children:[s.jsx(lt,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),s.jsx(ct,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):u=s.jsxs(s.Fragment,{children:[s.jsx(c,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),s.jsx(ct,{displayMonth:e.displayMonth,id:e.id})]}),s.jsx("div",{className:r.caption,style:o.caption,children:u})}function Ja(e){var n=j(),t=n.footer,r=n.styles,a=n.classNames.tfoot;return t?s.jsx("tfoot",{className:a,style:r.tfoot,children:s.jsx("tr",{children:s.jsx("td",{colSpan:8,children:t})})}):s.jsx(s.Fragment,{})}function Ka(e,n,t){for(var r=t?$(new Date):Y(new Date,{locale:e,weekStartsOn:n}),a=[],o=0;o<7;o++){var i=O(r,o);a.push(i)}return a}function Za(){var e=j(),n=e.classNames,t=e.styles,r=e.showWeekNumber,a=e.locale,o=e.weekStartsOn,i=e.ISOWeek,l=e.formatters.formatWeekdayName,c=e.labels.labelWeekday,u=Ka(a,o,i);return s.jsxs("tr",{style:t.head_row,className:n.head_row,children:[r&&s.jsx("td",{style:t.head_cell,className:n.head_cell}),u.map(function(d,f){return s.jsx("th",{scope:"col",className:n.head_cell,style:t.head_cell,"aria-label":c(d,{locale:a}),children:l(d,{locale:a})},f)})]})}function eo(){var e,n=j(),t=n.classNames,r=n.styles,a=n.components,o=(e=a==null?void 0:a.HeadRow)!==null&&e!==void 0?e:Za;return s.jsx("thead",{style:r.head,className:t.head,children:s.jsx(o,{})})}function to(e){var n=j(),t=n.locale,r=n.formatters.formatDay;return s.jsx(s.Fragment,{children:r(e.date,{locale:t})})}var Ae=g.createContext(void 0);function no(e){if(!oe(e.initialProps)){var n={selected:void 0,modifiers:{disabled:[]}};return s.jsx(Ae.Provider,{value:n,children:e.children})}return s.jsx(ro,{initialProps:e.initialProps,children:e.children})}function ro(e){var n=e.initialProps,t=e.children,r=n.selected,a=n.min,o=n.max,i=function(u,d,f){var h,v;(h=n.onDayClick)===null||h===void 0||h.call(n,u,d,f);var b=!!(d.selected&&a&&(r==null?void 0:r.length)===a);if(!b){var _=!!(!d.selected&&o&&(r==null?void 0:r.length)===o);if(!_){var m=r?St([],r):[];if(d.selected){var D=m.findIndex(function(p){return S(u,p)});m.splice(D,1)}else m.push(u);(v=n.onSelect)===null||v===void 0||v.call(n,m,u,d,f)}}},l={disabled:[]};r&&l.disabled.push(function(u){var d=o&&r.length>o-1,f=r.some(function(h){return S(h,u)});return!!(d&&!f)});var c={selected:r,onDayClick:i,modifiers:l};return s.jsx(Ae.Provider,{value:c,children:t})}function Be(){var e=g.useContext(Ae);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}function ao(e,n){var t=n||{},r=t.from,a=t.to;return r&&a?S(a,e)&&S(r,e)?void 0:S(a,e)?{from:a,to:void 0}:S(r,e)?void 0:Te(r,e)?{from:e,to:a}:{from:r,to:e}:a?Te(e,a)?{from:a,to:e}:{from:e,to:a}:r?Ot(e,r)?{from:e,to:r}:{from:r,to:e}:{from:e,to:void 0}}var He=g.createContext(void 0);function oo(e){if(!se(e.initialProps)){var n={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return s.jsx(He.Provider,{value:n,children:e.children})}return s.jsx(so,{initialProps:e.initialProps,children:e.children})}function so(e){var n=e.initialProps,t=e.children,r=n.selected,a=r||{},o=a.from,i=a.to,l=n.min,c=n.max,u=function(v,b,_){var m,D;(m=n.onDayClick)===null||m===void 0||m.call(n,v,b,_);var p=ao(v,r);(D=n.onSelect)===null||D===void 0||D.call(n,p,v,b,_)},d={range_start:[],range_end:[],range_middle:[],disabled:[]};if(o?(d.range_start=[o],i?(d.range_end=[i],S(o,i)||(d.range_middle=[{after:o,before:i}])):d.range_end=[o]):i&&(d.range_start=[i],d.range_end=[i]),l&&(o&&!i&&d.disabled.push({after:De(o,l-1),before:O(o,l-1)}),o&&i&&d.disabled.push({after:o,before:O(o,l-1)}),!o&&i&&d.disabled.push({after:De(i,l-1),before:O(i,l-1)})),c){if(o&&!i&&(d.disabled.push({before:O(o,-c+1)}),d.disabled.push({after:O(o,c-1)})),o&&i){var f=E(i,o)+1,h=c-f;d.disabled.push({before:De(o,h)}),d.disabled.push({after:O(i,h)})}!o&&i&&(d.disabled.push({before:O(i,-c+1)}),d.disabled.push({after:O(i,c-1)}))}return s.jsx(He.Provider,{value:{selected:r,onDayClick:u,modifiers:d},children:t})}function qe(){var e=g.useContext(He);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function ue(e){return Array.isArray(e)?St([],e):e!==void 0?[e]:[]}function io(e){var n={};return Object.entries(e).forEach(function(t){var r=t[0],a=t[1];n[r]=ue(a)}),n}var R;(function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"})(R||(R={}));var lo=R.Selected,I=R.Disabled,co=R.Hidden,uo=R.Today,Ne=R.RangeEnd,je=R.RangeMiddle,Pe=R.RangeStart,fo=R.Outside;function ho(e,n,t){var r,a=(r={},r[lo]=ue(e.selected),r[I]=ue(e.disabled),r[co]=ue(e.hidden),r[uo]=[e.today],r[Ne]=[],r[je]=[],r[Pe]=[],r[fo]=[],r);return e.fromDate&&a[I].push({before:e.fromDate}),e.toDate&&a[I].push({after:e.toDate}),oe(e)?a[I]=a[I].concat(n.modifiers[I]):se(e)&&(a[I]=a[I].concat(t.modifiers[I]),a[Pe]=t.modifiers[Pe],a[je]=t.modifiers[je],a[Ne]=t.modifiers[Ne]),a}var Et=g.createContext(void 0);function mo(e){var n=j(),t=Be(),r=qe(),a=ho(n,t,r),o=io(n.modifiers),i=x(x({},a),o);return s.jsx(Et.Provider,{value:i,children:e.children})}function Yt(){var e=g.useContext(Et);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function vo(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function go(e){return!!(e&&typeof e=="object"&&"from"in e)}function yo(e){return!!(e&&typeof e=="object"&&"after"in e)}function bo(e){return!!(e&&typeof e=="object"&&"before"in e)}function xo(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function wo(e,n){var t,r=n.from,a=n.to;if(r&&a){var o=E(a,r)<0;o&&(t=[a,r],r=t[0],a=t[1]);var i=E(e,r)>=0&&E(a,e)>=0;return i}return a?S(a,e):r?S(r,e):!1}function po(e){return Ee(e)}function _o(e){return Array.isArray(e)&&e.every(Ee)}function Do(e,n){return n.some(function(t){if(typeof t=="boolean")return t;if(po(t))return S(e,t);if(_o(t))return t.includes(e);if(go(t))return wo(e,t);if(xo(t))return t.dayOfWeek.includes(e.getDay());if(vo(t)){var r=E(t.before,e),a=E(t.after,e),o=r>0,i=a<0,l=Te(t.before,t.after);return l?i&&o:o||i}return yo(t)?E(e,t.after)>0:bo(t)?E(t.before,e)>0:typeof t=="function"?t(e):!1})}function Ve(e,n,t){var r=Object.keys(n).reduce(function(o,i){var l=n[i];return Do(e,l)&&o.push(i),o},[]),a={};return r.forEach(function(o){return a[o]=!0}),t&&!Le(e,t)&&(a.outside=!0),a}function Mo(e,n){for(var t=W(e[0]),r=Ye(e[e.length-1]),a,o,i=t;i<=r;){var l=Ve(i,n),c=!l.disabled&&!l.hidden;if(!c){i=O(i,1);continue}if(l.selected)return i;l.today&&!o&&(o=i),a||(a=i),i=O(i,1)}return o||a}var No=365;function It(e,n){var t=n.moveBy,r=n.direction,a=n.context,o=n.modifiers,i=n.retry,l=i===void 0?{count:0,lastFocused:e}:i,c=a.weekStartsOn,u=a.fromDate,d=a.toDate,f=a.locale,h={day:O,week:Fe,month:T,year:fr,startOfWeek:function(m){return a.ISOWeek?$(m):Y(m,{locale:f,weekStartsOn:c})},endOfWeek:function(m){return a.ISOWeek?Mt(m):Ie(m,{locale:f,weekStartsOn:c})}},v=h[t](e,r==="after"?1:-1);r==="before"&&u?v=hr([u,v]):r==="after"&&d&&(v=mr([d,v]));var b=!0;if(o){var _=Ve(v,o);b=!_.disabled&&!_.hidden}return b?v:l.count>No?l.lastFocused:It(v,{moveBy:t,direction:r,context:a,modifiers:o,retry:x(x({},l),{count:l.count+1})})}var Lt=g.createContext(void 0);function jo(e){var n=ie(),t=Yt(),r=g.useState(),a=r[0],o=r[1],i=g.useState(),l=i[0],c=i[1],u=Mo(n.displayMonths,t),d=a??(l&&n.isDateDisplayed(l))?l:u,f=function(){c(a),o(void 0)},h=function(m){o(m)},v=j(),b=function(m,D){if(a){var p=It(a,{moveBy:m,direction:D,context:v,modifiers:t});S(a,p)||(n.goToDate(p,a),h(p))}},_={focusedDay:a,focusTarget:d,blur:f,focus:h,focusDayAfter:function(){return b("day","after")},focusDayBefore:function(){return b("day","before")},focusWeekAfter:function(){return b("week","after")},focusWeekBefore:function(){return b("week","before")},focusMonthBefore:function(){return b("month","before")},focusMonthAfter:function(){return b("month","after")},focusYearBefore:function(){return b("year","before")},focusYearAfter:function(){return b("year","after")},focusStartOfWeek:function(){return b("startOfWeek","before")},focusEndOfWeek:function(){return b("endOfWeek","after")}};return s.jsx(Lt.Provider,{value:_,children:e.children})}function $e(){var e=g.useContext(Lt);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}function Po(e,n){var t=Yt(),r=Ve(e,t,n);return r}var Ge=g.createContext(void 0);function Co(e){if(!ve(e.initialProps)){var n={selected:void 0};return s.jsx(Ge.Provider,{value:n,children:e.children})}return s.jsx(ko,{initialProps:e.initialProps,children:e.children})}function ko(e){var n=e.initialProps,t=e.children,r=function(o,i,l){var c,u,d;if((c=n.onDayClick)===null||c===void 0||c.call(n,o,i,l),i.selected&&!n.required){(u=n.onSelect)===null||u===void 0||u.call(n,void 0,o,i,l);return}(d=n.onSelect)===null||d===void 0||d.call(n,o,o,i,l)},a={selected:n.selected,onDayClick:r};return s.jsx(Ge.Provider,{value:a,children:t})}function At(){var e=g.useContext(Ge);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function Oo(e,n){var t=j(),r=At(),a=Be(),o=qe(),i=$e(),l=i.focusDayAfter,c=i.focusDayBefore,u=i.focusWeekAfter,d=i.focusWeekBefore,f=i.blur,h=i.focus,v=i.focusMonthBefore,b=i.focusMonthAfter,_=i.focusYearBefore,m=i.focusYearAfter,D=i.focusStartOfWeek,p=i.focusEndOfWeek,P=function(w){var y,ye,be,xe;ve(t)?(y=r.onDayClick)===null||y===void 0||y.call(r,e,n,w):oe(t)?(ye=a.onDayClick)===null||ye===void 0||ye.call(a,e,n,w):se(t)?(be=o.onDayClick)===null||be===void 0||be.call(o,e,n,w):(xe=t.onDayClick)===null||xe===void 0||xe.call(t,e,n,w)},H=function(w){var y;h(e),(y=t.onDayFocus)===null||y===void 0||y.call(t,e,n,w)},ge=function(w){var y;f(),(y=t.onDayBlur)===null||y===void 0||y.call(t,e,n,w)},J=function(w){var y;(y=t.onDayMouseEnter)===null||y===void 0||y.call(t,e,n,w)},un=function(w){var y;(y=t.onDayMouseLeave)===null||y===void 0||y.call(t,e,n,w)},dn=function(w){var y;(y=t.onDayPointerEnter)===null||y===void 0||y.call(t,e,n,w)},fn=function(w){var y;(y=t.onDayPointerLeave)===null||y===void 0||y.call(t,e,n,w)},hn=function(w){var y;(y=t.onDayTouchCancel)===null||y===void 0||y.call(t,e,n,w)},mn=function(w){var y;(y=t.onDayTouchEnd)===null||y===void 0||y.call(t,e,n,w)},vn=function(w){var y;(y=t.onDayTouchMove)===null||y===void 0||y.call(t,e,n,w)},gn=function(w){var y;(y=t.onDayTouchStart)===null||y===void 0||y.call(t,e,n,w)},yn=function(w){var y;(y=t.onDayKeyUp)===null||y===void 0||y.call(t,e,n,w)},bn=function(w){var y;switch(w.key){case"ArrowLeft":w.preventDefault(),w.stopPropagation(),t.dir==="rtl"?l():c();break;case"ArrowRight":w.preventDefault(),w.stopPropagation(),t.dir==="rtl"?c():l();break;case"ArrowDown":w.preventDefault(),w.stopPropagation(),u();break;case"ArrowUp":w.preventDefault(),w.stopPropagation(),d();break;case"PageUp":w.preventDefault(),w.stopPropagation(),w.shiftKey?_():v();break;case"PageDown":w.preventDefault(),w.stopPropagation(),w.shiftKey?m():b();break;case"Home":w.preventDefault(),w.stopPropagation(),D();break;case"End":w.preventDefault(),w.stopPropagation(),p();break}(y=t.onDayKeyDown)===null||y===void 0||y.call(t,e,n,w)},xn={onClick:P,onFocus:H,onBlur:ge,onKeyDown:bn,onKeyUp:yn,onMouseEnter:J,onMouseLeave:un,onPointerEnter:dn,onPointerLeave:fn,onTouchCancel:hn,onTouchEnd:mn,onTouchMove:vn,onTouchStart:gn};return xn}function So(){var e=j(),n=At(),t=Be(),r=qe(),a=ve(e)?n.selected:oe(e)?t.selected:se(e)?r.selected:void 0;return a}function Wo(e){return Object.values(R).includes(e)}function Fo(e,n){var t=[e.classNames.day];return Object.keys(n).forEach(function(r){var a=e.modifiersClassNames[r];if(a)t.push(a);else if(Wo(r)){var o=e.classNames["day_".concat(r)];o&&t.push(o)}}),t}function To(e,n){var t=x({},e.styles.day);return Object.keys(n).forEach(function(r){var a;t=x(x({},t),(a=e.modifiersStyles)===null||a===void 0?void 0:a[r])}),t}function Ro(e,n,t){var r,a,o,i=j(),l=$e(),c=Po(e,n),u=Oo(e,c),d=So(),f=!!(i.onDayClick||i.mode!=="default");g.useEffect(function(){var J;c.outside||l.focusedDay&&f&&S(l.focusedDay,e)&&((J=t.current)===null||J===void 0||J.focus())},[l.focusedDay,e,t,f,c.outside]);var h=Fo(i,c).join(" "),v=To(i,c),b=!!(c.outside&&!i.showOutsideDays||c.hidden),_=(o=(a=i.components)===null||a===void 0?void 0:a.DayContent)!==null&&o!==void 0?o:to,m=s.jsx(_,{date:e,displayMonth:n,activeModifiers:c}),D={style:v,className:h,children:m,role:"gridcell"},p=l.focusTarget&&S(l.focusTarget,e)&&!c.outside,P=l.focusedDay&&S(l.focusedDay,e),H=x(x(x({},D),(r={disabled:c.disabled,role:"gridcell"},r["aria-selected"]=c.selected,r.tabIndex=P||p?0:-1,r)),u),ge={isButton:f,isHidden:b,activeModifiers:c,selectedDays:d,buttonProps:H,divProps:D};return ge}function Eo(e){var n=g.useRef(null),t=Ro(e.date,e.displayMonth,n);return t.isHidden?s.jsx("div",{role:"gridcell"}):t.isButton?s.jsx(fe,x({name:"day",ref:n},t.buttonProps)):s.jsx("div",x({},t.divProps))}function Yo(e){var n=e.number,t=e.dates,r=j(),a=r.onWeekNumberClick,o=r.styles,i=r.classNames,l=r.locale,c=r.labels.labelWeekNumber,u=r.formatters.formatWeekNumber,d=u(Number(n),{locale:l});if(!a)return s.jsx("span",{className:i.weeknumber,style:o.weeknumber,children:d});var f=c(Number(n),{locale:l}),h=function(v){a(n,t,v)};return s.jsx(fe,{name:"week-number","aria-label":f,className:i.weeknumber,style:o.weeknumber,onClick:h,children:d})}function Io(e){var n,t,r=j(),a=r.styles,o=r.classNames,i=r.showWeekNumber,l=r.components,c=(n=l==null?void 0:l.Day)!==null&&n!==void 0?n:Eo,u=(t=l==null?void 0:l.WeekNumber)!==null&&t!==void 0?t:Yo,d;return i&&(d=s.jsx("td",{className:o.cell,style:a.cell,children:s.jsx(u,{number:e.weekNumber,dates:e.dates})})),s.jsxs("tr",{className:o.row,style:a.row,children:[d,e.dates.map(function(f){return s.jsx("td",{className:o.cell,style:a.cell,role:"presentation",children:s.jsx(c,{displayMonth:e.displayMonth,date:f})},ha(f))})]})}function ut(e,n,t){for(var r=t!=null&&t.ISOWeek?Mt(n):Ie(n,t),a=t!=null&&t.ISOWeek?$(e):Y(e,t),o=E(r,a),i=[],l=0;l<=o;l++)i.push(O(a,l));var c=i.reduce(function(u,d){var f=t!=null&&t.ISOWeek?jt(d):Ct(d,t),h=u.find(function(v){return v.weekNumber===f});return h?(h.dates.push(d),u):(u.push({weekNumber:f,dates:[d]}),u)},[]);return c}function Lo(e,n){var t=ut(W(e),Ye(e),n);if(n!=null&&n.useFixedWeeks){var r=va(e,n);if(r<6){var a=t[t.length-1],o=a.dates[a.dates.length-1],i=Fe(o,6-r),l=ut(Fe(o,1),i,n);t.push.apply(t,l)}}return t}function Ao(e){var n,t,r,a=j(),o=a.locale,i=a.classNames,l=a.styles,c=a.hideHead,u=a.fixedWeeks,d=a.components,f=a.weekStartsOn,h=a.firstWeekContainsDate,v=a.ISOWeek,b=Lo(e.displayMonth,{useFixedWeeks:!!u,ISOWeek:v,locale:o,weekStartsOn:f,firstWeekContainsDate:h}),_=(n=d==null?void 0:d.Head)!==null&&n!==void 0?n:eo,m=(t=d==null?void 0:d.Row)!==null&&t!==void 0?t:Io,D=(r=d==null?void 0:d.Footer)!==null&&r!==void 0?r:Ja;return s.jsxs("table",{id:e.id,className:i.table,style:l.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!c&&s.jsx(_,{}),s.jsx("tbody",{className:i.tbody,style:l.tbody,children:b.map(function(p){return s.jsx(m,{displayMonth:e.displayMonth,dates:p.dates,weekNumber:p.weekNumber},p.weekNumber)})}),s.jsx(D,{displayMonth:e.displayMonth})]})}function Bo(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var Ho=Bo()?g.useLayoutEffect:g.useEffect,Ce=!1,qo=0;function dt(){return"react-day-picker-".concat(++qo)}function Vo(e){var n,t=e??(Ce?dt():null),r=g.useState(t),a=r[0],o=r[1];return Ho(function(){a===null&&o(dt())},[]),g.useEffect(function(){Ce===!1&&(Ce=!0)},[]),(n=e??a)!==null&&n!==void 0?n:void 0}function $o(e){var n,t,r=j(),a=r.dir,o=r.classNames,i=r.styles,l=r.components,c=ie().displayMonths,u=Vo(r.id?"".concat(r.id,"-").concat(e.displayIndex):void 0),d=r.id?"".concat(r.id,"-grid-").concat(e.displayIndex):void 0,f=[o.month],h=i.month,v=e.displayIndex===0,b=e.displayIndex===c.length-1,_=!v&&!b;a==="rtl"&&(n=[v,b],b=n[0],v=n[1]),v&&(f.push(o.caption_start),h=x(x({},h),i.caption_start)),b&&(f.push(o.caption_end),h=x(x({},h),i.caption_end)),_&&(f.push(o.caption_between),h=x(x({},h),i.caption_between));var m=(t=l==null?void 0:l.Caption)!==null&&t!==void 0?t:za;return s.jsxs("div",{className:f.join(" "),style:h,children:[s.jsx(m,{id:u,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),s.jsx(Ao,{id:d,"aria-labelledby":u,displayMonth:e.displayMonth})]},e.displayIndex)}function Go(e){var n=j(),t=n.classNames,r=n.styles;return s.jsx("div",{className:t.months,style:r.months,children:e.children})}function Qo(e){var n,t,r=e.initialProps,a=j(),o=$e(),i=ie(),l=g.useState(!1),c=l[0],u=l[1];g.useEffect(function(){a.initialFocus&&o.focusTarget&&(c||(o.focus(o.focusTarget),u(!0)))},[a.initialFocus,c,o.focus,o.focusTarget,o]);var d=[a.classNames.root,a.className];a.numberOfMonths>1&&d.push(a.classNames.multiple_months),a.showWeekNumber&&d.push(a.classNames.with_weeknumber);var f=x(x({},a.styles.root),a.style),h=Object.keys(r).filter(function(b){return b.startsWith("data-")}).reduce(function(b,_){var m;return x(x({},b),(m={},m[_]=r[_],m))},{}),v=(t=(n=r.components)===null||n===void 0?void 0:n.Months)!==null&&t!==void 0?t:Go;return s.jsx("div",x({className:d.join(" "),style:f,dir:a.dir,id:a.id,nonce:r.nonce,title:r.title,lang:r.lang},h,{children:s.jsx(v,{children:i.displayMonths.map(function(b,_){return s.jsx($o,{displayIndex:_,displayMonth:b},_)})})}))}function Xo(e){var n=e.children,t=ya(e,["children"]);return s.jsx(Ea,{initialProps:t,children:s.jsx(Ga,{children:s.jsx(Co,{initialProps:t,children:s.jsx(no,{initialProps:t,children:s.jsx(oo,{initialProps:t,children:s.jsx(mo,{children:s.jsx(jo,{children:n})})})})})})})}function Uo(e){return s.jsx(Xo,x({},e,{children:s.jsx(Qo,{initialProps:e})}))}function Bt({className:e,classNames:n,showOutsideDays:t=!0,...r}){return s.jsx(Uo,{showOutsideDays:t,className:C("p-3",e),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:C(Ke({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-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:C("[&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected].day-range-end)]:rounded-r-md",r.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:C(Ke({variant:"ghost"}),"h-8 w-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",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:a,...o})=>s.jsx(Fn,{className:C("h-4 w-4",a),...o}),IconRight:({className:a,...o})=>s.jsx(Wn,{className:C("h-4 w-4",a),...o})},...r})}Bt.displayName="Calendar";var Qe="Popover",[Ht,Bs]=gt(Qe,[xt]),le=xt(),[zo,B]=Ht(Qe),qt=e=>{const{__scopePopover:n,children:t,open:r,defaultOpen:a,onOpenChange:o,modal:i=!1}=e,l=le(n),c=g.useRef(null),[u,d]=g.useState(!1),[f=!1,h]=Mn({prop:r,defaultProp:a,onChange:o});return s.jsx(Hn,{...l,children:s.jsx(zo,{scope:n,contentId:Nn(),triggerRef:c,open:f,onOpenChange:h,onOpenToggle:g.useCallback(()=>h(v=>!v),[h]),hasCustomAnchor:u,onCustomAnchorAdd:g.useCallback(()=>d(!0),[]),onCustomAnchorRemove:g.useCallback(()=>d(!1),[]),modal:i,children:t})})};qt.displayName=Qe;var Vt="PopoverAnchor",Jo=g.forwardRef((e,n)=>{const{__scopePopover:t,...r}=e,a=B(Vt,t),o=le(t),{onCustomAnchorAdd:i,onCustomAnchorRemove:l}=a;return g.useEffect(()=>(i(),()=>l()),[i,l]),s.jsx(wt,{...o,...r,ref:n})});Jo.displayName=Vt;var $t="PopoverTrigger",Gt=g.forwardRef((e,n)=>{const{__scopePopover:t,...r}=e,a=B($t,t),o=le(t),i=yt(n,a.triggerRef),l=s.jsx(me.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Jt(a.open),...r,ref:i,onClick:te(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?l:s.jsx(wt,{asChild:!0,...o,children:l})});Gt.displayName=$t;var Xe="PopoverPortal",[Ko,Zo]=Ht(Xe,{forceMount:void 0}),Qt=e=>{const{__scopePopover:n,forceMount:t,children:r,container:a}=e,o=B(Xe,n);return s.jsx(Ko,{scope:n,forceMount:t,children:s.jsx(pt,{present:t||o.open,children:s.jsx(qn,{asChild:!0,container:a,children:r})})})};Qt.displayName=Xe;var U="PopoverContent",Xt=g.forwardRef((e,n)=>{const t=Zo(U,e.__scopePopover),{forceMount:r=t.forceMount,...a}=e,o=B(U,e.__scopePopover);return s.jsx(pt,{present:r||o.open,children:o.modal?s.jsx(es,{...a,ref:n}):s.jsx(ts,{...a,ref:n})})});Xt.displayName=U;var es=g.forwardRef((e,n)=>{const t=B(U,e.__scopePopover),r=g.useRef(null),a=yt(n,r),o=g.useRef(!1);return g.useEffect(()=>{const i=r.current;if(i)return Vn(i)},[]),s.jsx($n,{as:jn,allowPinchZoom:!0,children:s.jsx(Ut,{...e,ref:a,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:te(e.onCloseAutoFocus,i=>{var l;i.preventDefault(),o.current||(l=t.triggerRef.current)==null||l.focus()}),onPointerDownOutside:te(e.onPointerDownOutside,i=>{const l=i.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,u=l.button===2||c;o.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:te(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),ts=g.forwardRef((e,n)=>{const t=B(U,e.__scopePopover),r=g.useRef(!1),a=g.useRef(!1);return s.jsx(Ut,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var i,l;(i=e.onCloseAutoFocus)==null||i.call(e,o),o.defaultPrevented||(r.current||(l=t.triggerRef.current)==null||l.focus(),o.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:o=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const i=o.target;((u=t.triggerRef.current)==null?void 0:u.contains(i))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&a.current&&o.preventDefault()}})}),Ut=g.forwardRef((e,n)=>{const{__scopePopover:t,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:i,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:d,...f}=e,h=B(U,t),v=le(t);return Gn(),s.jsx(Qn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:o,children:s.jsx(Xn,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:d,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>h.onOpenChange(!1),children:s.jsx(Un,{"data-state":Jt(h.open),role:"dialog",id:h.contentId,...v,...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)"}})})})}),zt="PopoverClose",ns=g.forwardRef((e,n)=>{const{__scopePopover:t,...r}=e,a=B(zt,t);return s.jsx(me.button,{type:"button",...r,ref:n,onClick:te(e.onClick,()=>a.onOpenChange(!1))})});ns.displayName=zt;var rs="PopoverArrow",as=g.forwardRef((e,n)=>{const{__scopePopover:t,...r}=e,a=le(t);return s.jsx(zn,{...a,...r,ref:n})});as.displayName=rs;function Jt(e){return e?"open":"closed"}var os=qt,ss=Gt,is=Qt,Kt=Xt;const ls=os,cs=ss,Zt=g.forwardRef(({className:e,align:n="center",sideOffset:t=4,...r},a)=>s.jsx(is,{children:s.jsx(Kt,{ref:a,align:n,sideOffset:t,className:C("bg-popover text-popover-foreground 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 z-50 w-72 rounded-md border p-4 shadow-md outline-none",e),...r})}));Zt.displayName=Kt.displayName;function us({field:e,label:n,placeholder:t="Pick a date"}){const r=e.value?new Date(e.value):void 0;return s.jsxs(Oe,{className:"flex flex-col",children:[s.jsx(Se,{children:n}),s.jsxs(ls,{children:[s.jsx(cs,{asChild:!0,children:s.jsx(bt,{children:s.jsxs(V,{variant:"outline",className:C("justify-start text-left font-normal",!e.value&&"text-muted-foreground"),children:[s.jsx(pn,{className:"me-2 h-4 w-4"}),e.value?L(new Date(e.value),"yyyy-MM-dd"):s.jsx("span",{children:t})]})})}),s.jsx(Zt,{className:"w-auto p-0",align:"start",children:s.jsx(Bt,{mode:"single",selected:r,onSelect:a=>{const o=a?L(a,"yyyy-MM-dd"):"";e.onChange(o)},initialFocus:!0})})]}),s.jsx(We,{})]})}var Ue="Progress",ze=100,[ds,Hs]=gt(Ue),[fs,hs]=ds(Ue),en=g.forwardRef((e,n)=>{const{__scopeProgress:t,value:r=null,max:a,getValueLabel:o=ms,...i}=e;(a||a===0)&&!ft(a)&&console.error(vs(`${a}`,"Progress"));const l=ft(a)?a:ze;r!==null&&!ht(r,l)&&console.error(gs(`${r}`,"Progress"));const c=ht(r,l)?r:null,u=he(c)?o(c,l):void 0;return s.jsx(fs,{scope:t,value:c,max:l,children:s.jsx(me.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":he(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":rn(c,l),"data-value":c??void 0,"data-max":l,...i,ref:n})})});en.displayName=Ue;var tn="ProgressIndicator",nn=g.forwardRef((e,n)=>{const{__scopeProgress:t,...r}=e,a=hs(tn,t);return s.jsx(me.div,{"data-state":rn(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...r,ref:n})});nn.displayName=tn;function ms(e,n){return`${Math.round(e/n*100)}%`}function rn(e,n){return e==null?"indeterminate":e===n?"complete":"loading"}function he(e){return typeof e=="number"}function ft(e){return he(e)&&!isNaN(e)&&e>0}function ht(e,n){return he(e)&&!isNaN(e)&&e<=n&&e>=0}function vs(e,n){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${n}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${ze}\`.`}function gs(e,n){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${n}\`. The \`value\` prop must be:
  - a positive number
  - less than the value passed to \`max\` (or ${ze} if no \`max\` prop is set)
  - \`null\` or \`undefined\` if the progress is indeterminate.

Defaulting to \`null\`.`}var an=en,ys=nn;const on=g.forwardRef(({className:e,value:n=0,...t},r)=>s.jsx(an,{ref:r,className:C("bg-secondary relative h-4 w-full overflow-hidden rounded-full",e||""),...t,children:s.jsx(ys,{className:"bg-primary h-full w-full flex-1 transition-all",style:{transform:`translateX(-${100-(n||0)}%)`}})}));on.displayName=an.displayName;const sn=g.forwardRef(({className:e,...n},t)=>s.jsx("div",{className:"relative w-full overflow-auto",children:s.jsx("table",{ref:t,className:C("w-full caption-bottom text-sm",e),...n})}));sn.displayName="Table";const ln=g.forwardRef(({className:e,...n},t)=>s.jsx("thead",{ref:t,className:C("[&_tr]:border-b",e),...n}));ln.displayName="TableHeader";const Je=g.forwardRef(({className:e,...n},t)=>s.jsx("tbody",{ref:t,className:C("[&_tr:last-child]:border-0",e),...n}));Je.displayName="TableBody";const bs=g.forwardRef(({className:e,...n},t)=>s.jsx("tfoot",{ref:t,className:C("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",e),...n}));bs.displayName="TableFooter";const ne=g.forwardRef(({className:e,...n},t)=>s.jsx("tr",{ref:t,className:C("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...n}));ne.displayName="TableRow";const Q=g.forwardRef(({className:e,...n},t)=>s.jsx("th",{ref:t,className:C("text-muted-foreground h-12 px-4 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0",e),...n}));Q.displayName="TableHead";const F=g.forwardRef(({className:e,...n},t)=>s.jsx("td",{ref:t,className:C("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...n}));F.displayName="TableCell";const xs=g.forwardRef(({className:e,...n},t)=>s.jsx("caption",{ref:t,className:C("text-muted-foreground mt-4 text-sm",e),...n}));xs.displayName="TableCaption";const cn=ce.enum(["all","uploaded","processing","completed","failed"]),ws=ce.object({job_id:ce.string().optional(),status:cn.default("all").optional(),created_at:ce.string().optional()}),mt={completed:"bg-green-500 text-white",processing:"bg-yellow-500 text-black",uploaded:"bg-blue-500 text-white",failed:"bg-red-500 text-white",default:"bg-gray-400 text-white"},ke=10;function ps({initialFilters:e}){const[n,t]=g.useState(1),[r,a]=g.useState(null),o=wn(),i=In({defaultValues:e,resolver:Ln(ws)}),l=i.watch(),c=g.useMemo(()=>{const{job_id:m,status:D,created_at:p}=l;return{job_id:m||void 0,status:D==="all"?void 0:D,created_at:p||void 0}},[l]),{data:u,isLoading:d,refetch:f}=Pn(Dn(c)),h=async()=>{await f()},v=()=>{i.reset({job_id:"",status:"all",created_at:""})},b=Math.ceil(((u==null?void 0:u.length)||0)/ke),_=u==null?void 0:u.slice((n-1)*ke,n*ke);return s.jsx(s.Fragment,{children:s.jsxs(Cn,{className:"mx-auto mt-8 w-full",children:[s.jsx(kn,{children:s.jsx(On,{children:"Audio Recordings"})}),s.jsxs(Sn,{children:[s.jsx(An,{...i,children:s.jsxs("form",{className:"space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-3",children:[s.jsx(we,{control:i.control,name:"job_id",render:({field:m})=>s.jsxs(Oe,{children:[s.jsx(Se,{children:"Job ID"}),s.jsx(bt,{children:s.jsx(Bn,{placeholder:"Enter Job ID",...m})}),s.jsx(We,{})]})}),s.jsx(we,{control:i.control,name:"status",render:({field:m})=>s.jsxs(Oe,{children:[s.jsx(Se,{children:"Status"}),s.jsxs(Jn,{value:m.value,onValueChange:m.onChange,children:[s.jsx(Kn,{children:s.jsx(Zn,{placeholder:"Select status"})}),s.jsx(er,{children:cn.options.map(D=>s.jsx(tr,{value:D,children:D.charAt(0).toUpperCase()+D.slice(1)},D))})]}),s.jsx(We,{})]})}),s.jsx(we,{control:i.control,name:"created_at",render:({field:m})=>s.jsx(us,{field:m,label:"Upload Date",placeholder:"Pick an upload date"})})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs(V,{variant:"outline",onClick:v,disabled:d,type:"reset",children:[s.jsx(pe,{className:"mr-2 h-4 w-4"}),d?"Resetting...":"Reset"]}),s.jsxs(V,{variant:"outline",onClick:h,disabled:d,type:"button",children:[s.jsx(pe,{className:"mr-2 h-4 w-4"}),d?"Refreshing...":"Refresh"]})]})]})}),d&&s.jsx(on,{value:90,className:"mt-4 mb-4"}),s.jsxs(sn,{children:[s.jsx(ln,{children:s.jsxs(ne,{children:[s.jsx(Q,{children:"Job ID"}),s.jsx(Q,{children:"File Name"}),s.jsx(Q,{children:"Status"}),s.jsx(Q,{children:"Upload Date"}),s.jsx(Q,{children:"Actions"})]})}),d?s.jsx(Ds,{}):s.jsx(Je,{children:_&&_.length>0?_.map(m=>s.jsxs(ne,{children:[s.jsx(F,{children:m.id}),s.jsx(F,{className:"max-w-[250px] truncate font-medium text-blue-500",children:m.file_name||m.file_path.split("/").pop()||"Unnamed Recording"}),s.jsx(F,{children:s.jsx(_n,{className:C("flex min-w-[100px] items-center justify-center rounded-md px-4 py-1 text-xs",mt[m.status]||mt.default),children:m.status})}),s.jsx(F,{children:new Date(parseInt(m.created_at)).toLocaleDateString()}),s.jsx(F,{children:s.jsxs(Tn,{children:[s.jsx(Rn,{asChild:!0,children:s.jsx(V,{variant:"outline",size:"icon",onClick:()=>a(m),children:s.jsx(tt,{className:"h-4 w-4"})})}),r&&r.id===m.id&&s.jsxs(En,{align:"end",children:[s.jsx(Yn,{children:"Actions"}),s.jsxs(Ze,{onClick:()=>{localStorage.setItem("current_recording_id",m.id),o.navigate({to:"/audio-recordings/$id",params:{id:m.id}})},children:[s.jsx(tt,{className:"mr-2 h-4 w-4"}),"View Details"]}),m.status==="uploaded"&&s.jsxs(Ze,{onClick:()=>null,children:[s.jsx(pe,{className:"mr-2 h-4 w-4"}),"Retry Processing"]})]})]})})]},m.id)):s.jsx(ne,{children:s.jsx(F,{colSpan:5,className:"py-4 text-center text-gray-500",children:"No results found"})})})]}),s.jsxs("div",{className:"mt-4 flex justify-between",children:[s.jsx(V,{onClick:()=>t(n-1),disabled:n===1,children:"Previous"}),s.jsxs("span",{children:["Page ",n," of ",b]}),s.jsx(V,{onClick:()=>t(n+1),disabled:n>=b,children:"Next"})]})]})]})})}const _s=8;function Ds({rows:e=_s}){return s.jsx(Je,{children:Array.from({length:e}).map((n,t)=>s.jsxs(ne,{children:[s.jsx(F,{children:s.jsx(K,{className:"h-5 w-24"})}),s.jsx(F,{children:s.jsx(K,{className:"h-5 w-48"})}),s.jsxs(F,{children:[s.jsx(K,{className:"h-6 w-[100px] rounded-md"})," "]}),s.jsx(F,{children:s.jsx(K,{className:"h-5 w-28"})}),s.jsxs(F,{children:[s.jsx(K,{className:"h-8 w-8 rounded-md"})," "]})]},`skeleton-${t}`))})}function Ms(){return s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx("h2",{className:"text-2xl font-semibold tracking-tight",children:"Audio Recordings"}),s.jsxs(nr,{children:[s.jsx(et,{children:s.jsx(rr,{href:"/",children:"Home"})}),s.jsx(et,{children:s.jsx(ar,{children:"Audio Recordings"})})]}),s.jsx("p",{className:"text-muted-foreground text-sm",children:"Manage and monitor all uploaded audio files and their processing status."})]}),s.jsx(or,{to:"/audio-upload",children:s.jsxs(V,{children:[s.jsx(lr,{className:"mr-2 h-4 w-4"}),"Add New Audio Recording"]})})]})}const Ns={job_id:"",status:"all",created_at:void 0},qs=function(){return s.jsxs("div",{className:"flex-1 space-y-4 p-4 pt-6 md:p-8",children:[s.jsx(Ms,{}),s.jsx(ps,{initialFilters:Ns})]})};export{qs as component};
