UNPKG

dgz-ui

Version:

Custom ui library using React.js, Shadcn/ui, TailwindCSS, Typescript

6 lines 80.5 kB
"use strict";const S=require("react/jsx-runtime"),O=require("react"),Je=require("react-i18next"),A=require("../utils/index.cjs.js"),J=require("./utils-C4d7Ql9-.cjs.js"),Z=require("./button-CpKtD3qG.cjs.js"),$e=require("./popover-Bh6emR_J.cjs.js"),xe=require("./index-is755vrc.cjs.js"),jn=require("./createLucideIcon-HtK0p34L.cjs.js"),ee=require("./select-D703Xctn.cjs.js"),Bn=e=>e&&e.__esModule?e:{default:e},y=Bn(O);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Fn=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],In=jn.createLucideIcon("calendar",Fn);function Hn(e,t,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(" ")}const Ge={},ve={};function de(e,t){try{const r=(Ge[e]||(Ge[e]=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format))(t).split("GMT")[1];return r in ve?ve[r]:ft(r,r.split(":"))}catch{if(e in ve)return ve[e];const n=e==null?void 0:e.match(qn);return n?ft(e,n.slice(1)):NaN}}const qn=/([+-]\d\d):?(\d\d)?/;function ft(e,t){const n=+(t[0]||0),r=+(t[1]||0),a=+(t[2]||0)/60;return ve[e]=n*60+r>0?n*60+r+a:n*60-r-a}class ne extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(de(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),Wt(this),Ke(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new ne(...n,t):new ne(Date.now(),t)}withTimeZone(t){return new ne(+this,t)}getTimezoneOffset(){const t=-de(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),Ke(this),+this}[Symbol.for("constructDateFrom")](t){return new ne(+new Date(t),this.timeZone)}}const ht=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!ht.test(e))return;const t=e.replace(ht,"$1UTC");ne.prototype[t]&&(e.startsWith("get")?ne.prototype[e]=function(){return this.internal[t]()}:(ne.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),An(this),+this},ne.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Ke(this),+this}))});function Ke(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-de(e.timeZone,e)*60))}function An(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),Wt(e)}function Wt(e){const t=de(e.timeZone,e),n=t>0?Math.floor(t):Math.ceil(t),r=new Date(+e);r.setUTCHours(r.getUTCHours()-1);const a=-new Date(+e).getTimezoneOffset(),o=-new Date(+r).getTimezoneOffset(),s=a-o,i=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();s&&i&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+s);const c=a-n;c&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+c);const u=new Date(+e);u.setUTCSeconds(0);const l=a>0?u.getSeconds():(u.getSeconds()-60)%60,d=Math.round(-(de(e.timeZone,e)*60))%60;(d||l)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+d),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+d+l));const h=de(e.timeZone,e),b=h>0?Math.floor(h):Math.ceil(h),D=-new Date(+e).getTimezoneOffset()-b,M=b!==n,v=D-c;if(M&&v){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+v);const g=de(e.timeZone,e),w=g>0?Math.floor(g):Math.ceil(g),C=b-w;C&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+C),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+C))}}class q extends ne{static tz(t,...n){return n.length?new q(...n,t):new q(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),a=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+a}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,a]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${r} ${n} ${a}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,a]=this.tzComponents();return`${t} GMT${n}${r}${a} (${Hn(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),a=String(Math.abs(t)%60).padStart(2,"0");return[n,r,a]}withTimeZone(t){return new q(+this,t)}[Symbol.for("constructDateFrom")](t){return new q(+new Date(t),this.timeZone)}}const St=6048e5,zn=864e5,mt=Symbol.for("constructDateFrom");function I(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&mt in e?e[mt](t):e instanceof Date?new e.constructor(t):new Date(t)}function E(e,t){return I(t||e,e)}function Nt(e,t,n){const r=E(e,n==null?void 0:n.in);return isNaN(t)?I(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Ct(e,t,n){const r=E(e,n==null?void 0:n.in);if(isNaN(t))return I(e,NaN);if(!t)return r;const a=r.getDate(),o=I(e,r.getTime());o.setMonth(r.getMonth()+t+1,0);const s=o.getDate();return a>=s?o:(r.setFullYear(o.getFullYear(),o.getMonth(),a),r)}let $n={};function Ne(){return $n}function ge(e,t){var i,c,u,l;const n=Ne(),r=(t==null?void 0:t.weekStartsOn)??((c=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((l=(u=n.locale)==null?void 0:u.options)==null?void 0:l.weekStartsOn)??0,a=E(e,t==null?void 0:t.in),o=a.getDay(),s=(o<r?7:0)+o-r;return a.setDate(a.getDate()-s),a.setHours(0,0,0,0),a}function We(e,t){return ge(e,{...t,weekStartsOn:1})}function pt(e,t){const n=E(e,t==null?void 0:t.in),r=n.getFullYear(),a=I(n,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);const o=We(a),s=I(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const i=We(s);return n.getTime()>=o.getTime()?r+1:n.getTime()>=i.getTime()?r:r-1}function yt(e){const t=E(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 be(e,...t){const n=I.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Se(e,t){const n=E(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function Ze(e,t,n){const[r,a]=be(n==null?void 0:n.in,e,t),o=Se(r),s=Se(a),i=+o-yt(o),c=+s-yt(s);return Math.round((i-c)/zn)}function Gn(e,t){const n=pt(e,t),r=I(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),We(r)}function Rn(e,t,n){return Nt(e,t*7,n)}function Vn(e,t,n){return Ct(e,t*12,n)}function Un(e,t){let n,r=t==null?void 0:t.in;return e.forEach(a=>{!r&&typeof a=="object"&&(r=I.bind(null,a));const o=E(a,r);(!n||n<o||isNaN(+o))&&(n=o)}),I(r,n||NaN)}function Qn(e,t){let n,r=t==null?void 0:t.in;return e.forEach(a=>{!r&&typeof a=="object"&&(r=I.bind(null,a));const o=E(a,r);(!n||n>o||isNaN(+o))&&(n=o)}),I(r,n||NaN)}function Xn(e,t,n){const[r,a]=be(n==null?void 0:n.in,e,t);return+Se(r)==+Se(a)}function Yt(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Kn(e){return!(!Yt(e)&&typeof e!="number"||isNaN(+E(e)))}function Tt(e,t,n){const[r,a]=be(n==null?void 0:n.in,e,t),o=r.getFullYear()-a.getFullYear(),s=r.getMonth()-a.getMonth();return o*12+s}function Jn(e,t){const n=E(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function Pt(e,t){const[n,r]=be(e,t.start,t.end);return{start:n,end:r}}function Zn(e,t){const{start:n,end:r}=Pt(t==null?void 0:t.in,e);let a=+n>+r;const o=a?+n:+r,s=a?r:n;s.setHours(0,0,0,0),s.setDate(1);let i=1;const c=[];for(;+s<=o;)c.push(I(n,s)),s.setMonth(s.getMonth()+i);return a?c.reverse():c}function Ln(e,t){const n=E(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function er(e,t){const n=E(e,t==null?void 0:t.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function _t(e,t){const n=E(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function tr(e,t){const{start:n,end:r}=Pt(t==null?void 0:t.in,e);let a=+n>+r;const o=a?+n:+r,s=a?r:n;s.setHours(0,0,0,0),s.setMonth(0,1);let i=1;const c=[];for(;+s<=o;)c.push(I(n,s)),s.setFullYear(s.getFullYear()+i);return a?c.reverse():c}function Et(e,t){var i,c,u,l;const n=Ne(),r=(t==null?void 0:t.weekStartsOn)??((c=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((l=(u=n.locale)==null?void 0:u.options)==null?void 0:l.weekStartsOn)??0,a=E(e,t==null?void 0:t.in),o=a.getDay(),s=(o<r?-7:0)+6-(o-r);return a.setDate(a.getDate()+s),a.setHours(23,59,59,999),a}function nr(e,t){return Et(e,{...t,weekStartsOn:1})}const rr={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"}},ar=(e,t,n)=>{let r;const a=rr[e];return typeof a=="string"?r=a:t===1?r=a.one:r=a.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Re(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const or={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},sr={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ir={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},cr={date:Re({formats:or,defaultWidth:"full"}),time:Re({formats:sr,defaultWidth:"full"}),dateTime:Re({formats:ir,defaultWidth:"full"})},ur={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},lr=(e,t,n,r)=>ur[e];function ke(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let a;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,i=n!=null&&n.width?String(n.width):s;a=e.formattingValues[i]||e.formattingValues[s]}else{const s=e.defaultWidth,i=n!=null&&n.width?String(n.width):e.defaultWidth;a=e.values[i]||e.values[s]}const o=e.argumentCallback?e.argumentCallback(t):t;return a[o]}}const dr={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},fr={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},hr={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"]},mr={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"]},yr={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"}},gr={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"}},br=(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"},wr={ordinalNumber:br,era:ke({values:dr,defaultWidth:"wide"}),quarter:ke({values:fr,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ke({values:hr,defaultWidth:"wide"}),day:ke({values:mr,defaultWidth:"wide"}),dayPeriod:ke({values:yr,defaultWidth:"wide",formattingValues:gr,defaultFormattingWidth:"wide"})};function De(e){return(t,n={})=>{const r=n.width,a=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(a);if(!o)return null;const s=o[0],i=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(i)?kr(i,d=>d.test(s)):Mr(i,d=>d.test(s));let u;u=e.valueCallback?e.valueCallback(c):c,u=n.valueCallback?n.valueCallback(u):u;const l=t.slice(s.length);return{value:u,rest:l}}}function Mr(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function kr(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Dr(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const a=r[0],o=t.match(e.parsePattern);if(!o)return null;let s=e.valueCallback?e.valueCallback(o[0]):o[0];s=n.valueCallback?n.valueCallback(s):s;const i=t.slice(a.length);return{value:s,rest:i}}}const vr=/^(\d+)(th|st|nd|rd)?/i,Or=/\d+/i,xr={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},Wr={any:[/^b/i,/^(a|c)/i]},Sr={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Nr={any:[/1/i,/2/i,/3/i,/4/i]},Cr={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},pr={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]},Yr={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},Tr={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]},Pr={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},_r={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}},Er={ordinalNumber:Dr({matchPattern:vr,parsePattern:Or,valueCallback:e=>parseInt(e,10)}),era:De({matchPatterns:xr,defaultMatchWidth:"wide",parsePatterns:Wr,defaultParseWidth:"any"}),quarter:De({matchPatterns:Sr,defaultMatchWidth:"wide",parsePatterns:Nr,defaultParseWidth:"any",valueCallback:e=>e+1}),month:De({matchPatterns:Cr,defaultMatchWidth:"wide",parsePatterns:pr,defaultParseWidth:"any"}),day:De({matchPatterns:Yr,defaultMatchWidth:"wide",parsePatterns:Tr,defaultParseWidth:"any"}),dayPeriod:De({matchPatterns:Pr,defaultMatchWidth:"any",parsePatterns:_r,defaultParseWidth:"any"})},ye={code:"en-US",formatDistance:ar,formatLong:cr,formatRelative:lr,localize:wr,match:Er,options:{weekStartsOn:0,firstWeekContainsDate:1}};function jr(e,t){const n=E(e,t==null?void 0:t.in);return Ze(n,_t(n))+1}function Le(e,t){const n=E(e,t==null?void 0:t.in),r=+We(n)-+Gn(n);return Math.round(r/St)+1}function jt(e,t){var l,d,h,b;const n=E(e,t==null?void 0:t.in),r=n.getFullYear(),a=Ne(),o=(t==null?void 0:t.firstWeekContainsDate)??((d=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:d.firstWeekContainsDate)??a.firstWeekContainsDate??((b=(h=a.locale)==null?void 0:h.options)==null?void 0:b.firstWeekContainsDate)??1,s=I((t==null?void 0:t.in)||e,0);s.setFullYear(r+1,0,o),s.setHours(0,0,0,0);const i=ge(s,t),c=I((t==null?void 0:t.in)||e,0);c.setFullYear(r,0,o),c.setHours(0,0,0,0);const u=ge(c,t);return+n>=+i?r+1:+n>=+u?r:r-1}function Br(e,t){var i,c,u,l;const n=Ne(),r=(t==null?void 0:t.firstWeekContainsDate)??((c=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((l=(u=n.locale)==null?void 0:u.options)==null?void 0:l.firstWeekContainsDate)??1,a=jt(e,t),o=I((t==null?void 0:t.in)||e,0);return o.setFullYear(a,0,r),o.setHours(0,0,0,0),ge(o,t)}function et(e,t){const n=E(e,t==null?void 0:t.in),r=+ge(n,t)-+Br(n,t);return Math.round(r/St)+1}function _(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const ue={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return _(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):_(n+1,2)},d(e,t){return _(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];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return _(e.getHours()%12||12,t.length)},H(e,t){return _(e.getHours(),t.length)},m(e,t){return _(e.getMinutes(),t.length)},s(e,t){return _(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),a=Math.trunc(r*Math.pow(10,n-3));return _(a,t.length)}},he={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},gt={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"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return ue.y(e,t)},Y:function(e,t,n,r){const a=jt(e,r),o=a>0?a:1-a;if(t==="YY"){const s=o%100;return _(s,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):_(o,t.length)},R:function(e,t){const n=pt(e);return _(n,t.length)},u:function(e,t){const n=e.getFullYear();return _(n,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 _(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"});case"QQQQ":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 _(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"});case"qqqq":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 ue.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"});case"MMMM":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 _(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"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const a=et(e,r);return t==="wo"?n.ordinalNumber(a,{unit:"week"}):_(a,t.length)},I:function(e,t,n){const r=Le(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):_(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):ue.d(e,t)},D:function(e,t,n){const r=jr(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):_(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"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const a=e.getDay(),o=(a-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return _(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const a=e.getDay(),o=(a-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return _(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),a=r===0?7:r;switch(t){case"i":return String(a);case"ii":return _(a,t.length);case"io":return n.ordinalNumber(a,{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"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let a;switch(r===12?a=he.noon:r===0?a=he.midnight:a=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let a;switch(r>=17?a=he.evening:r>=12?a=he.afternoon:r>=4?a=he.morning:a=he.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return ue.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):ue.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):_(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):_(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):ue.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):ue.s(e,t)},S:function(e,t){return ue.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return wt(r);case"XXXX":case"XX":return le(r);case"XXXXX":case"XXX":default:return le(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return wt(r);case"xxxx":case"xx":return le(r);case"xxxxx":case"xxx":default:return le(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+bt(r,":");case"OOOO":default:return"GMT"+le(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+bt(r,":");case"zzzz":default:return"GMT"+le(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return _(r,t.length)},T:function(e,t,n){return _(+e,t.length)}};function bt(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),a=Math.trunc(r/60),o=r%60;return o===0?n+String(a):n+String(a)+t+_(o,2)}function wt(e,t){return e%60===0?(e>0?"-":"+")+_(Math.abs(e)/60,2):le(e,t)}function le(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),a=_(Math.trunc(r/60),2),o=_(r%60,2);return n+a+t+o}const Mt=(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"});case"PPPP":default:return t.date({width:"full"})}},Bt=(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"});case"pppp":default:return t.time({width:"full"})}},Fr=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return Mt(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",Mt(r,t)).replace("{{time}}",Bt(a,t))},Ir={p:Bt,P:Fr},Hr=/^D+$/,qr=/^Y+$/,Ar=["D","DD","YY","YYYY"];function zr(e){return Hr.test(e)}function $r(e){return qr.test(e)}function Gr(e,t,n){const r=Rr(e,t,n);if(console.warn(r),Ar.includes(e))throw new RangeError(r)}function Rr(e,t,n){const r=e[0]==="Y"?"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`}const Vr=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ur=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Qr=/^'([^]*?)'?$/,Xr=/''/g,Kr=/[a-zA-Z]/;function Oe(e,t,n){var l,d,h,b,m,D,M,v;const r=Ne(),a=(n==null?void 0:n.locale)??r.locale??ye,o=(n==null?void 0:n.firstWeekContainsDate)??((d=(l=n==null?void 0:n.locale)==null?void 0:l.options)==null?void 0:d.firstWeekContainsDate)??r.firstWeekContainsDate??((b=(h=r.locale)==null?void 0:h.options)==null?void 0:b.firstWeekContainsDate)??1,s=(n==null?void 0:n.weekStartsOn)??((D=(m=n==null?void 0:n.locale)==null?void 0:m.options)==null?void 0:D.weekStartsOn)??r.weekStartsOn??((v=(M=r.locale)==null?void 0:M.options)==null?void 0:v.weekStartsOn)??0,i=E(e,n==null?void 0:n.in);if(!Kn(i))throw new RangeError("Invalid time value");let c=t.match(Ur).map(g=>{const w=g[0];if(w==="p"||w==="P"){const C=Ir[w];return C(g,a.formatLong)}return g}).join("").match(Vr).map(g=>{if(g==="''")return{isToken:!1,value:"'"};const w=g[0];if(w==="'")return{isToken:!1,value:Jr(g)};if(gt[w])return{isToken:!0,value:g};if(w.match(Kr))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");return{isToken:!1,value:g}});a.localize.preprocessor&&(c=a.localize.preprocessor(i,c));const u={firstWeekContainsDate:o,weekStartsOn:s,locale:a};return c.map(g=>{if(!g.isToken)return g.value;const w=g.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&$r(w)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&zr(w))&&Gr(w,t,String(e));const C=gt[w[0]];return C(i,w,a.localize,u)}).join("")}function Jr(e){const t=e.match(Qr);return t?t[1].replace(Xr,"'"):e}function Zr(e,t){const n=E(e,t==null?void 0:t.in),r=n.getFullYear(),a=n.getMonth(),o=I(n,0);return o.setFullYear(r,a+1,0),o.setHours(0,0,0,0),o.getDate()}function Lr(e,t){return E(e,t==null?void 0:t.in).getMonth()}function ea(e,t){return E(e,t==null?void 0:t.in).getFullYear()}function ta(e,t){return+E(e)>+E(t)}function na(e,t){return+E(e)<+E(t)}function ra(e,t,n){const[r,a]=be(n==null?void 0:n.in,e,t);return r.getFullYear()===a.getFullYear()&&r.getMonth()===a.getMonth()}function aa(e,t,n){const[r,a]=be(n==null?void 0:n.in,e,t);return r.getFullYear()===a.getFullYear()}function oa(e,t,n){const r=E(e,n==null?void 0:n.in),a=r.getFullYear(),o=r.getDate(),s=I(e,0);s.setFullYear(a,t,15),s.setHours(0,0,0,0);const i=Zr(s);return r.setMonth(t,Math.min(o,i)),r}function sa(e,t,n){const r=E(e,n==null?void 0:n.in);return isNaN(+r)?I(e,NaN):(r.setFullYear(t),r)}const kt=5,ia=4;function ca(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,a=t.addDays(e,-r+1),o=t.addDays(a,kt*7-1);return t.getMonth(e)===t.getMonth(o)?kt:ia}function Ft(e,t){const n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-6):t.addDays(n,-1*(r-1))}function ua(e,t){const n=Ft(e,t),r=ca(e,t);return t.addDays(n,r*7-1)}const It={...ye,labels:{labelDayButton:(e,t,n,r)=>{let a;r&&typeof r.format=="function"?a=r.format.bind(r):a=(s,i)=>Oe(s,i,{locale:ye,...n});let o=a(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o},labelMonthDropdown:"Choose the Month",labelNext:"Go to the Next Month",labelPrevious:"Go to the Previous Month",labelWeekNumber:e=>`Week ${e}`,labelYearDropdown:"Choose the Year",labelGrid:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(a,o)=>Oe(a,o,{locale:ye,...t}),r(e,"LLLL yyyy")},labelGridcell:(e,t,n,r)=>{let a;r&&typeof r.format=="function"?a=r.format.bind(r):a=(s,i)=>Oe(s,i,{locale:ye,...n});let o=a(e,"PPPP");return t!=null&&t.today&&(o=`Today, ${o}`),o},labelNav:"Navigation bar",labelWeekNumberHeader:"Week Number",labelWeekday:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(a,o)=>Oe(a,o,{locale:ye,...t}),r(e,"cccc")}}};class G{constructor(t,n){this.Date=Date,this.today=()=>{var r;return(r=this.overrides)!=null&&r.today?this.overrides.today():this.options.timeZone?q.tz(this.options.timeZone):new this.Date},this.newDate=(r,a,o)=>{var s;return(s=this.overrides)!=null&&s.newDate?this.overrides.newDate(r,a,o):this.options.timeZone?new q(r,a,o,this.options.timeZone):new Date(r,a,o)},this.addDays=(r,a)=>{var o;return(o=this.overrides)!=null&&o.addDays?this.overrides.addDays(r,a):Nt(r,a)},this.addMonths=(r,a)=>{var o;return(o=this.overrides)!=null&&o.addMonths?this.overrides.addMonths(r,a):Ct(r,a)},this.addWeeks=(r,a)=>{var o;return(o=this.overrides)!=null&&o.addWeeks?this.overrides.addWeeks(r,a):Rn(r,a)},this.addYears=(r,a)=>{var o;return(o=this.overrides)!=null&&o.addYears?this.overrides.addYears(r,a):Vn(r,a)},this.differenceInCalendarDays=(r,a)=>{var o;return(o=this.overrides)!=null&&o.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,a):Ze(r,a)},this.differenceInCalendarMonths=(r,a)=>{var o;return(o=this.overrides)!=null&&o.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,a):Tt(r,a)},this.eachMonthOfInterval=r=>{var a;return(a=this.overrides)!=null&&a.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):Zn(r)},this.eachYearOfInterval=r=>{var i;const a=(i=this.overrides)!=null&&i.eachYearOfInterval?this.overrides.eachYearOfInterval(r):tr(r),o=new Set(a.map(c=>this.getYear(c)));if(o.size===a.length)return a;const s=[];return o.forEach(c=>{s.push(new Date(c,0,1))}),s},this.endOfBroadcastWeek=r=>{var a;return(a=this.overrides)!=null&&a.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):ua(r,this)},this.endOfISOWeek=r=>{var a;return(a=this.overrides)!=null&&a.endOfISOWeek?this.overrides.endOfISOWeek(r):nr(r)},this.endOfMonth=r=>{var a;return(a=this.overrides)!=null&&a.endOfMonth?this.overrides.endOfMonth(r):Jn(r)},this.endOfWeek=(r,a)=>{var o;return(o=this.overrides)!=null&&o.endOfWeek?this.overrides.endOfWeek(r,a):Et(r,this.options)},this.endOfYear=r=>{var a;return(a=this.overrides)!=null&&a.endOfYear?this.overrides.endOfYear(r):er(r)},this.format=(r,a,o)=>{var i;const s=(i=this.overrides)!=null&&i.format?this.overrides.format(r,a,this.options):Oe(r,a,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(s):s},this.getISOWeek=r=>{var a;return(a=this.overrides)!=null&&a.getISOWeek?this.overrides.getISOWeek(r):Le(r)},this.getMonth=(r,a)=>{var o;return(o=this.overrides)!=null&&o.getMonth?this.overrides.getMonth(r,this.options):Lr(r,this.options)},this.getYear=(r,a)=>{var o;return(o=this.overrides)!=null&&o.getYear?this.overrides.getYear(r,this.options):ea(r,this.options)},this.getWeek=(r,a)=>{var o;return(o=this.overrides)!=null&&o.getWeek?this.overrides.getWeek(r,this.options):et(r,this.options)},this.isAfter=(r,a)=>{var o;return(o=this.overrides)!=null&&o.isAfter?this.overrides.isAfter(r,a):ta(r,a)},this.isBefore=(r,a)=>{var o;return(o=this.overrides)!=null&&o.isBefore?this.overrides.isBefore(r,a):na(r,a)},this.isDate=r=>{var a;return(a=this.overrides)!=null&&a.isDate?this.overrides.isDate(r):Yt(r)},this.isSameDay=(r,a)=>{var o;return(o=this.overrides)!=null&&o.isSameDay?this.overrides.isSameDay(r,a):Xn(r,a)},this.isSameMonth=(r,a)=>{var o;return(o=this.overrides)!=null&&o.isSameMonth?this.overrides.isSameMonth(r,a):ra(r,a)},this.isSameYear=(r,a)=>{var o;return(o=this.overrides)!=null&&o.isSameYear?this.overrides.isSameYear(r,a):aa(r,a)},this.max=r=>{var a;return(a=this.overrides)!=null&&a.max?this.overrides.max(r):Un(r)},this.min=r=>{var a;return(a=this.overrides)!=null&&a.min?this.overrides.min(r):Qn(r)},this.setMonth=(r,a)=>{var o;return(o=this.overrides)!=null&&o.setMonth?this.overrides.setMonth(r,a):oa(r,a)},this.setYear=(r,a)=>{var o;return(o=this.overrides)!=null&&o.setYear?this.overrides.setYear(r,a):sa(r,a)},this.startOfBroadcastWeek=(r,a)=>{var o;return(o=this.overrides)!=null&&o.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):Ft(r,this)},this.startOfDay=r=>{var a;return(a=this.overrides)!=null&&a.startOfDay?this.overrides.startOfDay(r):Se(r)},this.startOfISOWeek=r=>{var a;return(a=this.overrides)!=null&&a.startOfISOWeek?this.overrides.startOfISOWeek(r):We(r)},this.startOfMonth=r=>{var a;return(a=this.overrides)!=null&&a.startOfMonth?this.overrides.startOfMonth(r):Ln(r)},this.startOfWeek=(r,a)=>{var o;return(o=this.overrides)!=null&&o.startOfWeek?this.overrides.startOfWeek(r,this.options):ge(r,this.options)},this.startOfYear=r=>{var a;return(a=this.overrides)!=null&&a.startOfYear?this.overrides.startOfYear(r):_t(r)},this.options={locale:It,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),r={};for(let a=0;a<10;a++)r[a.toString()]=n.format(a);return r}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,r=>n[r]||r)}formatNumber(t){return this.replaceDigits(t.toString())}getMonthYearOrder(){var n;const t=(n=this.options.locale)==null?void 0:n.code;return t&&G.yearFirstLocales.has(t)?"year-first":"month-first"}formatMonthYear(t){const{locale:n,timeZone:r,numerals:a}=this.options,o=n==null?void 0:n.code;if(o&&G.yearFirstLocales.has(o))try{return new Intl.DateTimeFormat(o,{month:"long",year:"numeric",timeZone:r,numberingSystem:a}).format(t)}catch{}const s=this.getMonthYearOrder()==="year-first"?"y LLLL":"LLLL y";return this.format(t,s)}}G.yearFirstLocales=new Set(["eu","hu","ja","ja-Hira","ja-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mn","mn-MN","zh","zh-CN","zh-HK","zh-TW"]);const re=new G;class Ht{constructor(t,n,r=re){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r,this.isoDate=r.format(t,"yyyy-MM-dd"),this.displayMonthId=r.format(n,"yyyy-MM"),this.dateMonthId=r.format(t,"yyyy-MM")}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class la{constructor(t,n){this.date=t,this.weeks=n}}class da{constructor(t,n){this.days=n,this.weekNumber=t}}function fa(e){return y.default.createElement("button",{...e})}function ha(e){return y.default.createElement("span",{...e})}function ma(e){const{size:t=24,orientation:n="left",className:r}=e;return y.default.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&y.default.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&y.default.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&y.default.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&y.default.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function ya(e){const{day:t,modifiers:n,...r}=e;return y.default.createElement("td",{...r})}function qt(e){const{day:t,modifiers:n,...r}=e,a=y.default.useRef(null);return y.default.useEffect(()=>{var o;n.focused&&((o=a.current)==null||o.focus())},[n.focused]),y.default.createElement("button",{ref:a,...r})}var k;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(k||(k={}));var B;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(B||(B={}));var L;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(L||(L={}));var $;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})($||($={}));function ga(e){const{options:t,className:n,components:r,classNames:a,...o}=e,s=[a[k.Dropdown],n].join(" "),i=t==null?void 0:t.find(({value:c})=>c===o.value);return y.default.createElement("span",{"data-disabled":o.disabled,className:a[k.DropdownRoot]},y.default.createElement(r.Select,{className:s,...o},t==null?void 0:t.map(({value:c,label:u,disabled:l})=>y.default.createElement(r.Option,{key:c,value:c,disabled:l},u))),y.default.createElement("span",{className:a[k.CaptionLabel],"aria-hidden":!0},i==null?void 0:i.label,y.default.createElement(r.Chevron,{orientation:"down",size:18,className:a[k.Chevron]})))}function ba(e){return y.default.createElement("div",{...e})}function wa(e){return y.default.createElement("div",{...e})}function Ma(e){const{calendarMonth:t,displayIndex:n,...r}=e;return y.default.createElement("div",{...r},e.children)}function ka(e){const{calendarMonth:t,displayIndex:n,...r}=e;return y.default.createElement("div",{...r})}function Da(e){return y.default.createElement("table",{...e})}function va(e){return y.default.createElement("div",{...e})}const At=O.createContext(void 0);function Ce(){const e=O.useContext(At);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function Oa(e){const{components:t}=Ce();return y.default.createElement(t.Dropdown,{...e})}function xa(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:a,...o}=e,{components:s,classNames:i,labels:{labelPrevious:c,labelNext:u}}=Ce(),l=O.useCallback(h=>{a&&(n==null||n(h))},[a,n]),d=O.useCallback(h=>{r&&(t==null||t(h))},[r,t]);return y.default.createElement("nav",{...o},y.default.createElement(s.PreviousMonthButton,{type:"button",className:i[k.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":c(r),onClick:d},y.default.createElement(s.Chevron,{disabled:r?void 0:!0,className:i[k.Chevron],orientation:"left"})),y.default.createElement(s.NextMonthButton,{type:"button",className:i[k.NextMonthButton],tabIndex:a?void 0:-1,"aria-disabled":a?void 0:!0,"aria-label":u(a),onClick:l},y.default.createElement(s.Chevron,{disabled:a?void 0:!0,orientation:"right",className:i[k.Chevron]})))}function Wa(e){const{components:t}=Ce();return y.default.createElement(t.Button,{...e})}function Sa(e){return y.default.createElement("option",{...e})}function Na(e){const{components:t}=Ce();return y.default.createElement(t.Button,{...e})}function Ca(e){const{rootRef:t,...n}=e;return y.default.createElement("div",{...n,ref:t})}function pa(e){return y.default.createElement("select",{...e})}function Ya(e){const{week:t,...n}=e;return y.default.createElement("tr",{...n})}function zt(e){return y.default.createElement("th",{...e})}function Ta(e){return y.default.createElement("thead",{"aria-hidden":!0},y.default.createElement("tr",{...e}))}function Pa(e){const{week:t,...n}=e;return y.default.createElement("th",{...n})}function _a(e){return y.default.createElement("th",{...e})}function Ea(e){return y.default.createElement("tbody",{...e})}function ja(e){const{components:t}=Ce();return y.default.createElement(t.Dropdown,{...e})}const Ba=Object.freeze(Object.defineProperty({__proto__:null,Button:fa,CaptionLabel:ha,Chevron:ma,Day:ya,DayButton:qt,Dropdown:ga,DropdownNav:ba,Footer:wa,Month:Ma,MonthCaption:ka,MonthGrid:Da,Months:va,MonthsDropdown:Oa,Nav:xa,NextMonthButton:Wa,Option:Sa,PreviousMonthButton:Na,Root:Ca,Select:pa,Week:Ya,WeekNumber:Pa,WeekNumberHeader:_a,Weekday:zt,Weekdays:Ta,Weeks:Ea,YearsDropdown:ja},Symbol.toStringTag,{value:"Module"}));function se(e,t,n=!1,r=re){let{from:a,to:o}=e;const{differenceInCalendarDays:s,isSameDay:i}=r;return a&&o?(s(o,a)<0&&([a,o]=[o,a]),s(t,a)>=(n?1:0)&&s(o,t)>=(n?1:0)):!n&&o?i(o,t):!n&&a?i(a,t):!1}function tt(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function Ee(e){return!!(e&&typeof e=="object"&&"from"in e)}function nt(e){return!!(e&&typeof e=="object"&&"after"in e)}function rt(e){return!!(e&&typeof e=="object"&&"before"in e)}function $t(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function Gt(e,t){return Array.isArray(e)&&e.every(t.isDate)}function ie(e,t,n=re){const r=Array.isArray(t)?t:[t],{isSameDay:a,differenceInCalendarDays:o,isAfter:s}=n;return r.some(i=>{if(typeof i=="boolean")return i;if(n.isDate(i))return a(e,i);if(Gt(i,n))return i.some(c=>a(e,c));if(Ee(i))return se(i,e,!1,n);if($t(i))return Array.isArray(i.dayOfWeek)?i.dayOfWeek.includes(e.getDay()):i.dayOfWeek===e.getDay();if(tt(i)){const c=o(i.before,e),u=o(i.after,e),l=c>0,d=u<0;return s(i.before,i.after)?d&&l:l||d}return nt(i)?o(e,i.after)>0:rt(i)?o(i.before,e)>0:typeof i=="function"?i(e):!1})}function Fa(e,t,n,r,a){const{disabled:o,hidden:s,modifiers:i,showOutsideDays:c,broadcastCalendar:u,today:l=a.today()}=t,{isSameDay:d,isSameMonth:h,startOfMonth:b,isBefore:m,endOfMonth:D,isAfter:M}=a,v=n&&b(n),g=r&&D(r),w={[B.focused]:[],[B.outside]:[],[B.disabled]:[],[B.hidden]:[],[B.today]:[]},C={};for(const W of e){const{date:f,displayMonth:p}=W,j=!!(p&&!h(f,p)),H=!!(v&&m(f,v)),F=!!(g&&M(f,g)),R=!!(o&&ie(f,o,a)),ce=!!(s&&ie(f,s,a))||H||F||!u&&!c&&j||u&&c===!1&&j,ae=d(f,l);j&&w.outside.push(W),R&&w.disabled.push(W),ce&&w.hidden.push(W),ae&&w.today.push(W),i&&Object.keys(i).forEach(V=>{const fe=i==null?void 0:i[V];fe&&ie(f,fe,a)&&(C[V]?C[V].push(W):C[V]=[W])})}return W=>{const f={[B.focused]:!1,[B.disabled]:!1,[B.hidden]:!1,[B.outside]:!1,[B.today]:!1},p={};for(const j in w){const H=w[j];f[j]=H.some(F=>F===W)}for(const j in C)p[j]=C[j].some(H=>H===W);return{...f,...p}}}function Ia(e,t,n={}){return Object.entries(e).filter(([,a])=>a===!0).reduce((a,[o])=>(n[o]?a.push(n[o]):t[B[o]]?a.push(t[B[o]]):t[L[o]]&&a.push(t[L[o]]),a),[t[k.Day]])}function Ha(e){return{...Ba,...e}}function qa(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function Aa(){const e={};for(const t in k)e[k[t]]=`rdp-${k[t]}`;for(const t in B)e[B[t]]=`rdp-${B[t]}`;for(const t in L)e[L[t]]=`rdp-${L[t]}`;for(const t in $)e[$[t]]=`rdp-${$[t]}`;return e}function Rt(e,t,n){return(n??new G(t)).formatMonthYear(e)}const za=Rt;function $a(e,t,n){return(n??new G(t)).format(e,"d")}function Ga(e,t=re){return t.format(e,"LLLL")}function Ra(e,t,n){return(n??new G(t)).format(e,"cccccc")}function Va(e,t=re){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function Ua(){return""}function Vt(e,t=re){return t.format(e,"yyyy")}const Qa=Vt,Xa=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:Rt,formatDay:$a,formatMonthCaption:za,formatMonthDropdown:Ga,formatWeekNumber:Va,formatWeekNumberHeader:Ua,formatWeekdayName:Ra,formatYearCaption:Qa,formatYearDropdown:Vt},Symbol.toStringTag,{value:"Module"}));function Ka(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...Xa,...e}}function at(e,t,n,r){let a=(r??new G(n)).format(e,"PPPP");return t.today&&(a=`Today, ${a}`),t.selected&&(a=`${a}, selected`),a}const Ja=at;function ot(e,t,n){return(n??new G(t)).formatMonthYear(e)}const Za=ot;function Ut(e,t,n,r){let a=(r??new G(n)).format(e,"PPPP");return t!=null&&t.today&&(a=`Today, ${a}`),a}function Qt(e){return"Choose the Month"}function Xt(){return""}const La="Go to the Next Month";function Kt(e,t){return La}function Jt(e){return"Go to the Previous Month"}function Zt(e,t,n){return(n??new G(t)).format(e,"cccc")}function Lt(e,t){return`Week ${e}`}function en(e){return"Week Number"}function tn(e){return"Choose the Year"}const eo=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:Za,labelDay:Ja,labelDayButton:at,labelGrid:ot,labelGridcell:Ut,labelMonthDropdown:Qt,labelNav:Xt,labelNext:Kt,labelPrevious:Jt,labelWeekNumber:Lt,labelWeekNumberHeader:en,labelWeekday:Zt,labelYearDropdown:tn},Symbol.toStringTag,{value:"Module"})),K=(e,t,n)=>t||(n?typeof n=="function"?n:(...r)=>n:e);function to(e,t){var r;const n=((r=t.locale)==null?void 0:r.labels)??{};return{...eo,...e??{},labelDayButton:K(at,e==null?void 0:e.labelDayButton,n.labelDayButton),labelMonthDropdown:K(Qt,e==null?void 0:e.labelMonthDropdown,n.labelMonthDropdown),labelNext:K(Kt,e==null?void 0:e.labelNext,n.labelNext),labelPrevious:K(Jt,e==null?void 0:e.labelPrevious,n.labelPrevious),labelWeekNumber:K(Lt,e==null?void 0:e.labelWeekNumber,n.labelWeekNumber),labelYearDropdown:K(tn,e==null?void 0:e.labelYearDropdown,n.labelYearDropdown),labelGrid:K(ot,e==null?void 0:e.labelGrid,n.labelGrid),labelGridcell:K(Ut,e==null?void 0:e.labelGridcell,n.labelGridcell),labelNav:K(Xt,e==null?void 0:e.labelNav,n.labelNav),labelWeekNumberHeader:K(en,e==null?void 0:e.labelWeekNumberHeader,n.labelWeekNumberHeader),labelWeekday:K(Zt,e==null?void 0:e.labelWeekday,n.labelWeekday)}}function no(e,t,n,r,a){const{startOfMonth:o,startOfYear:s,endOfYear:i,eachMonthOfInterval:c,getMonth:u}=a;return c({start:s(e),end:i(e)}).map(h=>{const b=r.formatMonthDropdown(h,a),m=u(h),D=t&&h<o(t)||n&&h>o(n)||!1;return{value:m,label:b,disabled:D}})}function ro(e,t={},n={}){let r={...t==null?void 0:t[k.Day]};return Object.entries(e).filter(([,a])=>a===!0).forEach(([a])=>{r={...r,...n==null?void 0:n[a]}}),r}function ao(e,t,n,r){const a=r??e.today(),o=n?e.startOfBroadcastWeek(a,e):t?e.startOfISOWeek(a):e.startOfWeek(a),s=[];for(let i=0;i<7;i++){const c=e.addDays(o,i);s.push(c)}return s}function oo(e,t,n,r,a=!1){if(!e||!t)return;const{startOfYear:o,endOfYear:s,eachYearOfInterval:i,getYear:c}=r,u=o(e),l=s(t),d=i({start:u,end:l});return a&&d.reverse(),d.map(h=>{const b=n.formatYearDropdown(h,r);return{value:c(h),label:b,disabled:!1}})}function so(e,t={}){var i;const{weekStartsOn:n,locale:r}=t,a=n??((i=r==null?void 0:r.options)==null?void 0:i.weekStartsOn)??0,o=c=>{const u=typeof c=="number"||typeof c=="string"?new Date(c):c;return new q(u.getFullYear(),u.getMonth(),u.getDate(),12,0,0,e)},s=c=>{const u=o(c);return new Date(u.getFullYear(),u.getMonth(),u.getDate(),0,0,0,0)};return{today:()=>o(q.tz(e)),newDate:(c,u,l)=>new q(c,u,l,12,0,0,e),startOfDay:c=>o(c),startOfWeek:(c,u)=>{const l=o(c),d=(u==null?void 0:u.weekStartsOn)??a,h=(l.getDay()-d+7)%7;return l.setDate(l.getDate()-h),l},startOfISOWeek:c=>{const u=o(c),l=(u.getDay()-1+7)%7;return u.setDate(u.getDate()-l),u},startOfMonth:c=>{const u=o(c);return u.setDate(1),u},startOfYear:c=>{const u=o(c);return u.setMonth(0,1),u},endOfWeek:(c,u)=>{const l=o(c),b=((((u==null?void 0:u.weekStartsOn)??a)+6)%7-l.getDay()+7)%7;return l.setDate(l.getDate()+b),l},endOfISOWeek:c=>{const u=o(c),l=(7-u.getDay())%7;return u.setDate(u.getDate()+l),u},endOfMonth:c=>{const u=o(c);return u.setMonth(u.getMonth()+1,0),u},endOfYear:c=>{const u=o(c);return u.setMonth(11,31),u},eachMonthOfIn