UNPKG

@vuepic/vue-datepicker

Version:

Datepicker component for Vue 3

1 lines 205 kB
var VueDatePicker=function(e){"use strict";var Mi=Object.defineProperty;var Ti=(e,qe,bt)=>qe in e?Mi(e,qe,{enumerable:!0,configurable:!0,writable:!0,value:bt}):e[qe]=bt;var re=(e,qe,bt)=>Ti(e,typeof qe!="symbol"?qe+"":qe,bt);function qe(){const t=e.useAttrs();return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img",...t},[e.createElementVNode("path",{d:"M29.333 8c0-2.208-1.792-4-4-4h-18.667c-2.208 0-4 1.792-4 4v18.667c0 2.208 1.792 4 4 4h18.667c2.208 0 4-1.792 4-4v-18.667zM26.667 8v18.667c0 0.736-0.597 1.333-1.333 1.333 0 0-18.667 0-18.667 0-0.736 0-1.333-0.597-1.333-1.333 0 0 0-18.667 0-18.667 0-0.736 0.597-1.333 1.333-1.333 0 0 18.667 0 18.667 0 0.736 0 1.333 0.597 1.333 1.333z"}),e.createElementVNode("path",{d:"M20 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"}),e.createElementVNode("path",{d:"M9.333 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"}),e.createElementVNode("path",{d:"M4 14.667h24c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-24c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z"})])}qe.compatConfig={MODE:3};function bt(){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[e.createElementVNode("path",{d:"M23.057 7.057l-16 16c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l16-16c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0z"}),e.createElementVNode("path",{d:"M7.057 8.943l16 16c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885l-16-16c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"})])}bt.compatConfig={MODE:3};function dn(){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[e.createElementVNode("path",{d:"M20.943 23.057l-7.057-7.057c0 0 7.057-7.057 7.057-7.057 0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-8 8c-0.521 0.521-0.521 1.365 0 1.885l8 8c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"})])}dn.compatConfig={MODE:3};function fn(){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[e.createElementVNode("path",{d:"M12.943 24.943l8-8c0.521-0.521 0.521-1.365 0-1.885l-8-8c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885l7.057 7.057c0 0-7.057 7.057-7.057 7.057-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0z"})])}fn.compatConfig={MODE:3};function mn(){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[e.createElementVNode("path",{d:"M16 1.333c-8.095 0-14.667 6.572-14.667 14.667s6.572 14.667 14.667 14.667c8.095 0 14.667-6.572 14.667-14.667s-6.572-14.667-14.667-14.667zM16 4c6.623 0 12 5.377 12 12s-5.377 12-12 12c-6.623 0-12-5.377-12-12s5.377-12 12-12z"}),e.createElementVNode("path",{d:"M14.667 8v8c0 0.505 0.285 0.967 0.737 1.193l5.333 2.667c0.658 0.329 1.46 0.062 1.789-0.596s0.062-1.46-0.596-1.789l-4.596-2.298c0 0 0-7.176 0-7.176 0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"})])}mn.compatConfig={MODE:3};function hn(){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[e.createElementVNode("path",{d:"M24.943 19.057l-8-8c-0.521-0.521-1.365-0.521-1.885 0l-8 8c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l7.057-7.057c0 0 7.057 7.057 7.057 7.057 0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"})])}hn.compatConfig={MODE:3};function gn(){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[e.createElementVNode("path",{d:"M7.057 12.943l8 8c0.521 0.521 1.365 0.521 1.885 0l8-8c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-7.057 7.057c0 0-7.057-7.057-7.057-7.057-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"})])}gn.compatConfig={MODE:3};const na=6048e5,mr=864e5,hr=6e4,aa=36e5,gr=1e3,ra=Symbol.for("constructDateFrom");function be(t,r){return typeof t=="function"?t(r):t&&typeof t=="object"&&ra in t?t[ra](r):t instanceof Date?new t.constructor(r):new Date(r)}function de(t,r){return be(r||t,t)}function Qe(t,r,n){const a=de(t,n==null?void 0:n.in);return isNaN(r)?be((n==null?void 0:n.in)||t,NaN):(r&&a.setDate(a.getDate()+r),a)}function Ke(t,r,n){const a=de(t,n==null?void 0:n.in);if(isNaN(r))return be(t,NaN);if(!r)return a;const o=a.getDate(),s=be(t,a.getTime());s.setMonth(a.getMonth()+r+1,0);const i=s.getDate();return o>=i?s:(a.setFullYear(s.getFullYear(),s.getMonth(),o),a)}function oa(t,r,n){const{years:a=0,months:o=0,weeks:s=0,days:i=0,hours:d=0,minutes:c=0,seconds:v=0}=r,f=de(t,n==null?void 0:n.in),T=o||a?Ke(f,o+a*12):f,h=i||s?Qe(T,i+s*7):T,P=c+d*60,_=(v+P*60)*1e3;return be(t,+h+_)}function yr(t,r,n){return be(t,+de(t)+r)}function pr(t,r,n){return yr(t,r*aa)}let wr={};function vt(){return wr}function Xe(t,r){var d,c,v,f;const n=vt(),a=(r==null?void 0:r.weekStartsOn)??((c=(d=r==null?void 0:r.locale)==null?void 0:d.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((f=(v=n.locale)==null?void 0:v.options)==null?void 0:f.weekStartsOn)??0,o=de(t,r==null?void 0:r.in),s=o.getDay(),i=(s<a?7:0)+s-a;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function $t(t,r){return Xe(t,{...r,weekStartsOn:1})}function la(t,r){const n=de(t,r==null?void 0:r.in),a=n.getFullYear(),o=be(n,0);o.setFullYear(a+1,0,4),o.setHours(0,0,0,0);const s=$t(o),i=be(n,0);i.setFullYear(a,0,4),i.setHours(0,0,0,0);const d=$t(i);return n.getTime()>=s.getTime()?a+1:n.getTime()>=d.getTime()?a:a-1}function Zt(t){const r=de(t),n=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return n.setUTCFullYear(r.getFullYear()),+t-+n}function Lt(t,...r){const n=be.bind(null,r.find(a=>typeof a=="object"));return r.map(n)}function sa(t,r){const n=de(t,r==null?void 0:r.in);return n.setHours(0,0,0,0),n}function ia(t,r,n){const[a,o]=Lt(n==null?void 0:n.in,t,r),s=sa(a),i=sa(o),d=+s-Zt(s),c=+i-Zt(i);return Math.round((d-c)/mr)}function kr(t,r){const n=la(t,r),a=be(t,0);return a.setFullYear(n,0,4),a.setHours(0,0,0,0),$t(a)}function br(t,r,n){return Ke(t,r*3,n)}function yn(t,r,n){return Ke(t,r*12,n)}function ua(t,r){const n=+de(t)-+de(r);return n<0?-1:n>0?1:n}function ca(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function zt(t){return!(!ca(t)&&typeof t!="number"||isNaN(+de(t)))}function da(t,r){const n=de(t,r==null?void 0:r.in);return Math.trunc(n.getMonth()/3)+1}function vr(t,r,n){const[a,o]=Lt(n==null?void 0:n.in,t,r);return a.getFullYear()-o.getFullYear()}function Dr(t,r,n){const[a,o]=Lt(n==null?void 0:n.in,t,r),s=ua(a,o),i=Math.abs(vr(a,o));a.setFullYear(1584),o.setFullYear(1584);const d=ua(a,o)===-s,c=s*(i-+d);return c===0?0:c}function fa(t,r){const[n,a]=Lt(t,r.start,r.end);return{start:n,end:a}}function ma(t,r){const{start:n,end:a}=fa(r==null?void 0:r.in,t);let o=+n>+a;const s=o?+n:+a,i=o?a:n;i.setHours(0,0,0,0);let d=1;const c=[];for(;+i<=s;)c.push(be(n,i)),i.setDate(i.getDate()+d),i.setHours(0,0,0,0);return o?c.reverse():c}function Dt(t,r){const n=de(t,r==null?void 0:r.in),a=n.getMonth(),o=a-a%3;return n.setMonth(o,1),n.setHours(0,0,0,0),n}function Mr(t,r){const{start:n,end:a}=fa(r==null?void 0:r.in,t);let o=+n>+a;const s=o?+Dt(n):+Dt(a);let i=Dt(o?a:n),d=1;const c=[];for(;+i<=s;)c.push(be(n,i)),i=br(i,d);return o?c.reverse():c}function Tr(t,r){const n=de(t,r==null?void 0:r.in);return n.setDate(1),n.setHours(0,0,0,0),n}function ha(t,r){const n=de(t,r==null?void 0:r.in),a=n.getFullYear();return n.setFullYear(a+1,0,0),n.setHours(23,59,59,999),n}function Ht(t,r){const n=de(t,r==null?void 0:r.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function ga(t,r){var d,c,v,f;const n=vt(),a=(r==null?void 0:r.weekStartsOn)??((c=(d=r==null?void 0:r.locale)==null?void 0:d.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((f=(v=n.locale)==null?void 0:v.options)==null?void 0:f.weekStartsOn)??0,o=de(t,r==null?void 0:r.in),s=o.getDay(),i=(s<a?-7:0)+6-(s-a);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}function ya(t,r){const n=de(t,r==null?void 0:r.in),a=n.getMonth(),o=a-a%3+3;return n.setMonth(o,0),n.setHours(23,59,59,999),n}const Pr={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"}},Cr=(t,r,n)=>{let a;const o=Pr[t];return typeof o=="string"?a=o:r===1?a=o.one:a=o.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a};function pn(t){return(r={})=>{const n=r.width?String(r.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const Br={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"},Ar={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},$r={date:pn({formats:Br,defaultWidth:"full"}),time:pn({formats:Sr,defaultWidth:"full"}),dateTime:pn({formats:Ar,defaultWidth:"full"})},Or={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Er=(t,r,n,a)=>Or[t];function Wt(t){return(r,n)=>{const a=n!=null&&n.context?String(n.context):"standalone";let o;if(a==="formatting"&&t.formattingValues){const i=t.defaultFormattingWidth||t.defaultWidth,d=n!=null&&n.width?String(n.width):i;o=t.formattingValues[d]||t.formattingValues[i]}else{const i=t.defaultWidth,d=n!=null&&n.width?String(n.width):t.defaultWidth;o=t.values[d]||t.values[i]}const s=t.argumentCallback?t.argumentCallback(r):r;return o[s]}}const Nr={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Rr={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Yr={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"]},_r={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"]},xr={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"}},Vr={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"}},Ir={ordinalNumber:(t,r)=>{const n=Number(t),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Wt({values:Nr,defaultWidth:"wide"}),quarter:Wt({values:Rr,defaultWidth:"wide",argumentCallback:t=>t-1}),month:Wt({values:Yr,defaultWidth:"wide"}),day:Wt({values:_r,defaultWidth:"wide"}),dayPeriod:Wt({values:xr,defaultWidth:"wide",formattingValues:Vr,defaultFormattingWidth:"wide"})};function qt(t){return(r,n={})=>{const a=n.width,o=a&&t.matchPatterns[a]||t.matchPatterns[t.defaultMatchWidth],s=r.match(o);if(!s)return null;const i=s[0],d=a&&t.parsePatterns[a]||t.parsePatterns[t.defaultParseWidth],c=Array.isArray(d)?Lr(d,T=>T.test(i)):Fr(d,T=>T.test(i));let v;v=t.valueCallback?t.valueCallback(c):c,v=n.valueCallback?n.valueCallback(v):v;const f=r.slice(i.length);return{value:v,rest:f}}}function Fr(t,r){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&r(t[n]))return n}function Lr(t,r){for(let n=0;n<t.length;n++)if(r(t[n]))return n}function zr(t){return(r,n={})=>{const a=r.match(t.matchPattern);if(!a)return null;const o=a[0],s=r.match(t.parsePattern);if(!s)return null;let i=t.valueCallback?t.valueCallback(s[0]):s[0];i=n.valueCallback?n.valueCallback(i):i;const d=r.slice(o.length);return{value:i,rest:d}}}const Hr=/^(\d+)(th|st|nd|rd)?/i,Wr=/\d+/i,qr={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},Ur={any:[/^b/i,/^(a|c)/i]},jr={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Qr={any:[/1/i,/2/i,/3/i,/4/i]},Gr={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},Kr={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]},Xr={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},Jr={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]},Zr={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},eo={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}},to={ordinalNumber:zr({matchPattern:Hr,parsePattern:Wr,valueCallback:t=>parseInt(t,10)}),era:qt({matchPatterns:qr,defaultMatchWidth:"wide",parsePatterns:Ur,defaultParseWidth:"any"}),quarter:qt({matchPatterns:jr,defaultMatchWidth:"wide",parsePatterns:Qr,defaultParseWidth:"any",valueCallback:t=>t+1}),month:qt({matchPatterns:Gr,defaultMatchWidth:"wide",parsePatterns:Kr,defaultParseWidth:"any"}),day:qt({matchPatterns:Xr,defaultMatchWidth:"wide",parsePatterns:Jr,defaultParseWidth:"any"}),dayPeriod:qt({matchPatterns:Zr,defaultMatchWidth:"any",parsePatterns:eo,defaultParseWidth:"any"})},pa={code:"en-US",formatDistance:Cr,formatLong:$r,formatRelative:Er,localize:Ir,match:to,options:{weekStartsOn:0,firstWeekContainsDate:1}};function no(t,r){const n=de(t,r==null?void 0:r.in);return ia(n,Ht(n))+1}function wn(t,r){const n=de(t,r==null?void 0:r.in),a=+$t(n)-+kr(n);return Math.round(a/na)+1}function kn(t,r){var f,T,h,P;const n=de(t,r==null?void 0:r.in),a=n.getFullYear(),o=vt(),s=(r==null?void 0:r.firstWeekContainsDate)??((T=(f=r==null?void 0:r.locale)==null?void 0:f.options)==null?void 0:T.firstWeekContainsDate)??o.firstWeekContainsDate??((P=(h=o.locale)==null?void 0:h.options)==null?void 0:P.firstWeekContainsDate)??1,i=be((r==null?void 0:r.in)||t,0);i.setFullYear(a+1,0,s),i.setHours(0,0,0,0);const d=Xe(i,r),c=be((r==null?void 0:r.in)||t,0);c.setFullYear(a,0,s),c.setHours(0,0,0,0);const v=Xe(c,r);return+n>=+d?a+1:+n>=+v?a:a-1}function ao(t,r){var d,c,v,f;const n=vt(),a=(r==null?void 0:r.firstWeekContainsDate)??((c=(d=r==null?void 0:r.locale)==null?void 0:d.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((f=(v=n.locale)==null?void 0:v.options)==null?void 0:f.firstWeekContainsDate)??1,o=kn(t,r),s=be((r==null?void 0:r.in)||t,0);return s.setFullYear(o,0,a),s.setHours(0,0,0,0),Xe(s,r)}function bn(t,r){const n=de(t,r==null?void 0:r.in),a=+Xe(n,r)-+ao(n,r);return Math.round(a/na)+1}function ve(t,r){const n=t<0?"-":"",a=Math.abs(t).toString().padStart(r,"0");return n+a}const ft={y(t,r){const n=t.getFullYear(),a=n>0?n:1-n;return ve(r==="yy"?a%100:a,r.length)},M(t,r){const n=t.getMonth();return r==="M"?String(n+1):ve(n+1,2)},d(t,r){return ve(t.getDate(),r.length)},a(t,r){const n=t.getHours()/12>=1?"pm":"am";switch(r){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(t,r){return ve(t.getHours()%12||12,r.length)},H(t,r){return ve(t.getHours(),r.length)},m(t,r){return ve(t.getMinutes(),r.length)},s(t,r){return ve(t.getSeconds(),r.length)},S(t,r){const n=r.length,a=t.getMilliseconds(),o=Math.trunc(a*Math.pow(10,n-3));return ve(o,r.length)}},Ot={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wa={G:function(t,r,n){const a=t.getFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"});case"GGGGG":return n.era(a,{width:"narrow"});case"GGGG":default:return n.era(a,{width:"wide"})}},y:function(t,r,n){if(r==="yo"){const a=t.getFullYear(),o=a>0?a:1-a;return n.ordinalNumber(o,{unit:"year"})}return ft.y(t,r)},Y:function(t,r,n,a){const o=kn(t,a),s=o>0?o:1-o;if(r==="YY"){const i=s%100;return ve(i,2)}return r==="Yo"?n.ordinalNumber(s,{unit:"year"}):ve(s,r.length)},R:function(t,r){const n=la(t);return ve(n,r.length)},u:function(t,r){const n=t.getFullYear();return ve(n,r.length)},Q:function(t,r,n){const a=Math.ceil((t.getMonth()+1)/3);switch(r){case"Q":return String(a);case"QQ":return ve(a,2);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(a,{width:"wide",context:"formatting"})}},q:function(t,r,n){const a=Math.ceil((t.getMonth()+1)/3);switch(r){case"q":return String(a);case"qq":return ve(a,2);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(a,{width:"wide",context:"standalone"})}},M:function(t,r,n){const a=t.getMonth();switch(r){case"M":case"MM":return ft.M(t,r);case"Mo":return n.ordinalNumber(a+1,{unit:"month"});case"MMM":return n.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(a,{width:"wide",context:"formatting"})}},L:function(t,r,n){const a=t.getMonth();switch(r){case"L":return String(a+1);case"LL":return ve(a+1,2);case"Lo":return n.ordinalNumber(a+1,{unit:"month"});case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(a,{width:"wide",context:"standalone"})}},w:function(t,r,n,a){const o=bn(t,a);return r==="wo"?n.ordinalNumber(o,{unit:"week"}):ve(o,r.length)},I:function(t,r,n){const a=wn(t);return r==="Io"?n.ordinalNumber(a,{unit:"week"}):ve(a,r.length)},d:function(t,r,n){return r==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):ft.d(t,r)},D:function(t,r,n){const a=no(t);return r==="Do"?n.ordinalNumber(a,{unit:"dayOfYear"}):ve(a,r.length)},E:function(t,r,n){const a=t.getDay();switch(r){case"E":case"EE":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"})}},e:function(t,r,n,a){const o=t.getDay(),s=(o-a.weekStartsOn+8)%7||7;switch(r){case"e":return String(s);case"ee":return ve(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(t,r,n,a){const o=t.getDay(),s=(o-a.weekStartsOn+8)%7||7;switch(r){case"c":return String(s);case"cc":return ve(s,r.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(t,r,n){const a=t.getDay(),o=a===0?7:a;switch(r){case"i":return String(o);case"ii":return ve(o,r.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(a,{width:"short",context:"formatting"});case"iiii":default:return n.day(a,{width:"wide",context:"formatting"})}},a:function(t,r,n){const o=t.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,r,n){const a=t.getHours();let o;switch(a===12?o=Ot.noon:a===0?o=Ot.midnight:o=a/12>=1?"pm":"am",r){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,r,n){const a=t.getHours();let o;switch(a>=17?o=Ot.evening:a>=12?o=Ot.afternoon:a>=4?o=Ot.morning:o=Ot.night,r){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,r,n){if(r==="ho"){let a=t.getHours()%12;return a===0&&(a=12),n.ordinalNumber(a,{unit:"hour"})}return ft.h(t,r)},H:function(t,r,n){return r==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):ft.H(t,r)},K:function(t,r,n){const a=t.getHours()%12;return r==="Ko"?n.ordinalNumber(a,{unit:"hour"}):ve(a,r.length)},k:function(t,r,n){let a=t.getHours();return a===0&&(a=24),r==="ko"?n.ordinalNumber(a,{unit:"hour"}):ve(a,r.length)},m:function(t,r,n){return r==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):ft.m(t,r)},s:function(t,r,n){return r==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):ft.s(t,r)},S:function(t,r){return ft.S(t,r)},X:function(t,r,n){const a=t.getTimezoneOffset();if(a===0)return"Z";switch(r){case"X":return ba(a);case"XXXX":case"XX":return Mt(a);case"XXXXX":case"XXX":default:return Mt(a,":")}},x:function(t,r,n){const a=t.getTimezoneOffset();switch(r){case"x":return ba(a);case"xxxx":case"xx":return Mt(a);case"xxxxx":case"xxx":default:return Mt(a,":")}},O:function(t,r,n){const a=t.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+ka(a,":");case"OOOO":default:return"GMT"+Mt(a,":")}},z:function(t,r,n){const a=t.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+ka(a,":");case"zzzz":default:return"GMT"+Mt(a,":")}},t:function(t,r,n){const a=Math.trunc(+t/1e3);return ve(a,r.length)},T:function(t,r,n){return ve(+t,r.length)}};function ka(t,r=""){const n=t>0?"-":"+",a=Math.abs(t),o=Math.trunc(a/60),s=a%60;return s===0?n+String(o):n+String(o)+r+ve(s,2)}function ba(t,r){return t%60===0?(t>0?"-":"+")+ve(Math.abs(t)/60,2):Mt(t,r)}function Mt(t,r=""){const n=t>0?"-":"+",a=Math.abs(t),o=ve(Math.trunc(a/60),2),s=ve(a%60,2);return n+o+r+s}const va=(t,r)=>{switch(t){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},Da=(t,r)=>{switch(t){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},vn={p:Da,P:(t,r)=>{const n=t.match(/(P+)(p+)?/)||[],a=n[1],o=n[2];if(!o)return va(t,r);let s;switch(a){case"P":s=r.dateTime({width:"short"});break;case"PP":s=r.dateTime({width:"medium"});break;case"PPP":s=r.dateTime({width:"long"});break;case"PPPP":default:s=r.dateTime({width:"full"});break}return s.replace("{{date}}",va(a,r)).replace("{{time}}",Da(o,r))}},ro=/^D+$/,oo=/^Y+$/,lo=["D","DD","YY","YYYY"];function Ma(t){return ro.test(t)}function Ta(t){return oo.test(t)}function Dn(t,r,n){const a=so(t,r,n);if(console.warn(a),lo.includes(t))throw new RangeError(a)}function so(t,r,n){const a=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${r}\`) for formatting ${a} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const io=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,uo=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,co=/^'([^]*?)'?$/,fo=/''/g,mo=/[a-zA-Z]/;function nt(t,r,n){var f,T,h,P,R,_,N,b;const a=vt(),o=(n==null?void 0:n.locale)??a.locale??pa,s=(n==null?void 0:n.firstWeekContainsDate)??((T=(f=n==null?void 0:n.locale)==null?void 0:f.options)==null?void 0:T.firstWeekContainsDate)??a.firstWeekContainsDate??((P=(h=a.locale)==null?void 0:h.options)==null?void 0:P.firstWeekContainsDate)??1,i=(n==null?void 0:n.weekStartsOn)??((_=(R=n==null?void 0:n.locale)==null?void 0:R.options)==null?void 0:_.weekStartsOn)??a.weekStartsOn??((b=(N=a.locale)==null?void 0:N.options)==null?void 0:b.weekStartsOn)??0,d=de(t,n==null?void 0:n.in);if(!zt(d))throw new RangeError("Invalid time value");let c=r.match(uo).map(M=>{const p=M[0];if(p==="p"||p==="P"){const L=vn[p];return L(M,o.formatLong)}return M}).join("").match(io).map(M=>{if(M==="''")return{isToken:!1,value:"'"};const p=M[0];if(p==="'")return{isToken:!1,value:ho(M)};if(wa[p])return{isToken:!0,value:M};if(p.match(mo))throw new RangeError("Format string contains an unescaped latin alphabet character `"+p+"`");return{isToken:!1,value:M}});o.localize.preprocessor&&(c=o.localize.preprocessor(d,c));const v={firstWeekContainsDate:s,weekStartsOn:i,locale:o};return c.map(M=>{if(!M.isToken)return M.value;const p=M.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&Ta(p)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&Ma(p))&&Dn(p,r,String(t));const L=wa[p[0]];return L(d,p,o.localize,v)}).join("")}function ho(t){const r=t.match(co);return r?r[1].replace(fo,"'"):t}function go(t,r){return de(t,r==null?void 0:r.in).getDay()}function yo(t,r){const n=de(t,r==null?void 0:r.in),a=n.getFullYear(),o=n.getMonth(),s=be(n,0);return s.setFullYear(a,o+1,0),s.setHours(0,0,0,0),s.getDate()}function po(){return Object.assign({},vt())}function it(t,r){return de(t,r==null?void 0:r.in).getHours()}function wo(t,r){const n=de(t,r==null?void 0:r.in).getDay();return n===0?7:n}function mt(t,r){return de(t,r==null?void 0:r.in).getMinutes()}function pe(t,r){return de(t,r==null?void 0:r.in).getMonth()}function Et(t){return de(t).getSeconds()}function fe(t,r){return de(t,r==null?void 0:r.in).getFullYear()}function Tt(t,r){return+de(t)>+de(r)}function Nt(t,r){return+de(t)<+de(r)}function Rt(t,r){return+de(t)==+de(r)}function ko(t,r){const n=bo(r)?new r(0):be(r,0);return n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),n.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),n}function bo(t){var r;return typeof t=="function"&&((r=t.prototype)==null?void 0:r.constructor)===t}const vo=10;class Pa{constructor(){re(this,"subPriority",0)}validate(r,n){return!0}}class Do extends Pa{constructor(r,n,a,o,s){super(),this.value=r,this.validateValue=n,this.setValue=a,this.priority=o,s&&(this.subPriority=s)}validate(r,n){return this.validateValue(r,this.value,n)}set(r,n,a){return this.setValue(r,n,this.value,a)}}class Mo extends Pa{constructor(n,a){super();re(this,"priority",vo);re(this,"subPriority",-1);this.context=n||(o=>be(a,o))}set(n,a){return a.timestampIsSet?n:be(n,ko(n,this.context))}}class ke{run(r,n,a,o){const s=this.parse(r,n,a,o);return s?{setter:new Do(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}validate(r,n,a){return!0}}class To extends ke{constructor(){super(...arguments);re(this,"priority",140);re(this,"incompatibleTokens",["R","u","t","T"])}parse(n,a,o){switch(a){case"G":case"GG":case"GGG":return o.era(n,{width:"abbreviated"})||o.era(n,{width:"narrow"});case"GGGGG":return o.era(n,{width:"narrow"});case"GGGG":default:return o.era(n,{width:"wide"})||o.era(n,{width:"abbreviated"})||o.era(n,{width:"narrow"})}}set(n,a,o){return a.era=o,n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}const Ne={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},at={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Re(t,r){return t&&{value:r(t.value),rest:t.rest}}function Se(t,r){const n=r.match(t);return n?{value:parseInt(n[0],10),rest:r.slice(n[0].length)}:null}function rt(t,r){const n=r.match(t);if(!n)return null;if(n[0]==="Z")return{value:0,rest:r.slice(1)};const a=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,s=n[3]?parseInt(n[3],10):0,i=n[5]?parseInt(n[5],10):0;return{value:a*(o*aa+s*hr+i*gr),rest:r.slice(n[0].length)}}function Ca(t){return Se(Ne.anyDigitsSigned,t)}function $e(t,r){switch(t){case 1:return Se(Ne.singleDigit,r);case 2:return Se(Ne.twoDigits,r);case 3:return Se(Ne.threeDigits,r);case 4:return Se(Ne.fourDigits,r);default:return Se(new RegExp("^\\d{1,"+t+"}"),r)}}function en(t,r){switch(t){case 1:return Se(Ne.singleDigitSigned,r);case 2:return Se(Ne.twoDigitsSigned,r);case 3:return Se(Ne.threeDigitsSigned,r);case 4:return Se(Ne.fourDigitsSigned,r);default:return Se(new RegExp("^-?\\d{1,"+t+"}"),r)}}function Mn(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Ba(t,r){const n=r>0,a=n?r:1-r;let o;if(a<=50)o=t||100;else{const s=a+50,i=Math.trunc(s/100)*100,d=t>=s%100;o=t+i-(d?100:0)}return n?o:1-o}function Sa(t){return t%400===0||t%4===0&&t%100!==0}class Po extends ke{constructor(){super(...arguments);re(this,"priority",130);re(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(n,a,o){const s=i=>({year:i,isTwoDigitYear:a==="yy"});switch(a){case"y":return Re($e(4,n),s);case"yo":return Re(o.ordinalNumber(n,{unit:"year"}),s);default:return Re($e(a.length,n),s)}}validate(n,a){return a.isTwoDigitYear||a.year>0}set(n,a,o){const s=n.getFullYear();if(o.isTwoDigitYear){const d=Ba(o.year,s);return n.setFullYear(d,0,1),n.setHours(0,0,0,0),n}const i=!("era"in a)||a.era===1?o.year:1-o.year;return n.setFullYear(i,0,1),n.setHours(0,0,0,0),n}}class Co extends ke{constructor(){super(...arguments);re(this,"priority",130);re(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(n,a,o){const s=i=>({year:i,isTwoDigitYear:a==="YY"});switch(a){case"Y":return Re($e(4,n),s);case"Yo":return Re(o.ordinalNumber(n,{unit:"year"}),s);default:return Re($e(a.length,n),s)}}validate(n,a){return a.isTwoDigitYear||a.year>0}set(n,a,o,s){const i=kn(n,s);if(o.isTwoDigitYear){const c=Ba(o.year,i);return n.setFullYear(c,0,s.firstWeekContainsDate),n.setHours(0,0,0,0),Xe(n,s)}const d=!("era"in a)||a.era===1?o.year:1-o.year;return n.setFullYear(d,0,s.firstWeekContainsDate),n.setHours(0,0,0,0),Xe(n,s)}}class Bo extends ke{constructor(){super(...arguments);re(this,"priority",130);re(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,a){return en(a==="R"?4:a.length,n)}set(n,a,o){const s=be(n,0);return s.setFullYear(o,0,4),s.setHours(0,0,0,0),$t(s)}}class So extends ke{constructor(){super(...arguments);re(this,"priority",130);re(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,a){return en(a==="u"?4:a.length,n)}set(n,a,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class Ao extends ke{constructor(){super(...arguments);re(this,"priority",120);re(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,a,o){switch(a){case"Q":case"QQ":return $e(a.length,n);case"Qo":return o.ordinalNumber(n,{unit:"quarter"});case"QQQ":return o.quarter(n,{width:"abbreviated",context:"formatting"})||o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQQ":return o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(n,{width:"wide",context:"formatting"})||o.quarter(n,{width:"abbreviated",context:"formatting"})||o.quarter(n,{width:"narrow",context:"formatting"})}}validate(n,a){return a>=1&&a<=4}set(n,a,o){return n.setMonth((o-1)*3,1),n.setHours(0,0,0,0),n}}class $o extends ke{constructor(){super(...arguments);re(this,"priority",120);re(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,a,o){switch(a){case"q":case"qq":return $e(a.length,n);case"qo":return o.ordinalNumber(n,{unit:"quarter"});case"qqq":return o.quarter(n,{width:"abbreviated",context:"standalone"})||o.quarter(n,{width:"narrow",context:"standalone"});case"qqqqq":return o.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(n,{width:"wide",context:"standalone"})||o.quarter(n,{width:"abbreviated",context:"standalone"})||o.quarter(n,{width:"narrow",context:"standalone"})}}validate(n,a){return a>=1&&a<=4}set(n,a,o){return n.setMonth((o-1)*3,1),n.setHours(0,0,0,0),n}}class Oo extends ke{constructor(){super(...arguments);re(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);re(this,"priority",110)}parse(n,a,o){const s=i=>i-1;switch(a){case"M":return Re(Se(Ne.month,n),s);case"MM":return Re($e(2,n),s);case"Mo":return Re(o.ordinalNumber(n,{unit:"month"}),s);case"MMM":return o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(n,{width:"wide",context:"formatting"})||o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"})}}validate(n,a){return a>=0&&a<=11}set(n,a,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}class Eo extends ke{constructor(){super(...arguments);re(this,"priority",110);re(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(n,a,o){const s=i=>i-1;switch(a){case"L":return Re(Se(Ne.month,n),s);case"LL":return Re($e(2,n),s);case"Lo":return Re(o.ordinalNumber(n,{unit:"month"}),s);case"LLL":return o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(n,{width:"wide",context:"standalone"})||o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"})}}validate(n,a){return a>=0&&a<=11}set(n,a,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}function No(t,r,n){const a=de(t,n==null?void 0:n.in),o=bn(a,n)-r;return a.setDate(a.getDate()-o*7),de(a,n==null?void 0:n.in)}class Ro extends ke{constructor(){super(...arguments);re(this,"priority",100);re(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,a,o){switch(a){case"w":return Se(Ne.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return $e(a.length,n)}}validate(n,a){return a>=1&&a<=53}set(n,a,o,s){return Xe(No(n,o,s),s)}}function Yo(t,r,n){const a=de(t,n==null?void 0:n.in),o=wn(a,n)-r;return a.setDate(a.getDate()-o*7),a}class _o extends ke{constructor(){super(...arguments);re(this,"priority",100);re(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(n,a,o){switch(a){case"I":return Se(Ne.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return $e(a.length,n)}}validate(n,a){return a>=1&&a<=53}set(n,a,o){return $t(Yo(n,o))}}const xo=[31,28,31,30,31,30,31,31,30,31,30,31],Vo=[31,29,31,30,31,30,31,31,30,31,30,31];class Io extends ke{constructor(){super(...arguments);re(this,"priority",90);re(this,"subPriority",1);re(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,a,o){switch(a){case"d":return Se(Ne.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return $e(a.length,n)}}validate(n,a){const o=n.getFullYear(),s=Sa(o),i=n.getMonth();return s?a>=1&&a<=Vo[i]:a>=1&&a<=xo[i]}set(n,a,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class Fo extends ke{constructor(){super(...arguments);re(this,"priority",90);re(this,"subpriority",1);re(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(n,a,o){switch(a){case"D":case"DD":return Se(Ne.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return $e(a.length,n)}}validate(n,a){const o=n.getFullYear();return Sa(o)?a>=1&&a<=366:a>=1&&a<=365}set(n,a,o){return n.setMonth(0,o),n.setHours(0,0,0,0),n}}function Tn(t,r,n){var T,h,P,R;const a=vt(),o=(n==null?void 0:n.weekStartsOn)??((h=(T=n==null?void 0:n.locale)==null?void 0:T.options)==null?void 0:h.weekStartsOn)??a.weekStartsOn??((R=(P=a.locale)==null?void 0:P.options)==null?void 0:R.weekStartsOn)??0,s=de(t,n==null?void 0:n.in),i=s.getDay(),c=(r%7+7)%7,v=7-o,f=r<0||r>6?r-(i+v)%7:(c+v)%7-(i+v)%7;return Qe(s,f,n)}class Lo extends ke{constructor(){super(...arguments);re(this,"priority",90);re(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(n,a,o){switch(a){case"E":case"EE":case"EEE":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,a){return a>=0&&a<=6}set(n,a,o,s){return n=Tn(n,o,s),n.setHours(0,0,0,0),n}}class zo extends ke{constructor(){super(...arguments);re(this,"priority",90);re(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(n,a,o,s){const i=d=>{const c=Math.floor((d-1)/7)*7;return(d+s.weekStartsOn+6)%7+c};switch(a){case"e":case"ee":return Re($e(a.length,n),i);case"eo":return Re(o.ordinalNumber(n,{unit:"day"}),i);case"eee":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeeee":return o.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,a){return a>=0&&a<=6}set(n,a,o,s){return n=Tn(n,o,s),n.setHours(0,0,0,0),n}}class Ho extends ke{constructor(){super(...arguments);re(this,"priority",90);re(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(n,a,o,s){const i=d=>{const c=Math.floor((d-1)/7)*7;return(d+s.weekStartsOn+6)%7+c};switch(a){case"c":case"cc":return Re($e(a.length,n),i);case"co":return Re(o.ordinalNumber(n,{unit:"day"}),i);case"ccc":return o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"ccccc":return o.day(n,{width:"narrow",context:"standalone"});case"cccccc":return o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(n,{width:"wide",context:"standalone"})||o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"})}}validate(n,a){return a>=0&&a<=6}set(n,a,o,s){return n=Tn(n,o,s),n.setHours(0,0,0,0),n}}function Wo(t,r,n){const a=de(t,n==null?void 0:n.in),o=wo(a,n),s=r-o;return Qe(a,s,n)}class qo extends ke{constructor(){super(...arguments);re(this,"priority",90);re(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(n,a,o){const s=i=>i===0?7:i;switch(a){case"i":case"ii":return $e(a.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return Re(o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s);case"iiiii":return Re(o.day(n,{width:"narrow",context:"formatting"}),s);case"iiiiii":return Re(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s);case"iiii":default:return Re(o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s)}}validate(n,a){return a>=1&&a<=7}set(n,a,o){return n=Wo(n,o),n.setHours(0,0,0,0),n}}class Uo extends ke{constructor(){super(...arguments);re(this,"priority",80);re(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(n,a,o){switch(a){case"a":case"aa":case"aaa":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaaa":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,a,o){return n.setHours(Mn(o),0,0,0),n}}class jo extends ke{constructor(){super(...arguments);re(this,"priority",80);re(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(n,a,o){switch(a){case"b":case"bb":case"bbb":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbbb":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,a,o){return n.setHours(Mn(o),0,0,0),n}}class Qo extends ke{constructor(){super(...arguments);re(this,"priority",80);re(this,"incompatibleTokens",["a","b","t","T"])}parse(n,a,o){switch(a){case"B":case"BB":case"BBB":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBBB":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,a,o){return n.setHours(Mn(o),0,0,0),n}}class Go extends ke{constructor(){super(...arguments);re(this,"priority",70);re(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,a,o){switch(a){case"h":return Se(Ne.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return $e(a.length,n)}}validate(n,a){return a>=1&&a<=12}set(n,a,o){const s=n.getHours()>=12;return s&&o<12?n.setHours(o+12,0,0,0):!s&&o===12?n.setHours(0,0,0,0):n.setHours(o,0,0,0),n}}class Ko extends ke{constructor(){super(...arguments);re(this,"priority",70);re(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,a,o){switch(a){case"H":return Se(Ne.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return $e(a.length,n)}}validate(n,a){return a>=0&&a<=23}set(n,a,o){return n.setHours(o,0,0,0),n}}class Xo extends ke{constructor(){super(...arguments);re(this,"priority",70);re(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,a,o){switch(a){case"K":return Se(Ne.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return $e(a.length,n)}}validate(n,a){return a>=0&&a<=11}set(n,a,o){return n.getHours()>=12&&o<12?n.setHours(o+12,0,0,0):n.setHours(o,0,0,0),n}}class Jo extends ke{constructor(){super(...arguments);re(this,"priority",70);re(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,a,o){switch(a){case"k":return Se(Ne.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return $e(a.length,n)}}validate(n,a){return a>=1&&a<=24}set(n,a,o){const s=o<=24?o%24:o;return n.setHours(s,0,0,0),n}}class Zo extends ke{constructor(){super(...arguments);re(this,"priority",60);re(this,"incompatibleTokens",["t","T"])}parse(n,a,o){switch(a){case"m":return Se(Ne.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return $e(a.length,n)}}validate(n,a){return a>=0&&a<=59}set(n,a,o){return n.setMinutes(o,0,0),n}}class el extends ke{constructor(){super(...arguments);re(this,"priority",50);re(this,"incompatibleTokens",["t","T"])}parse(n,a,o){switch(a){case"s":return Se(Ne.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return $e(a.length,n)}}validate(n,a){return a>=0&&a<=59}set(n,a,o){return n.setSeconds(o,0),n}}class tl extends ke{constructor(){super(...arguments);re(this,"priority",30);re(this,"incompatibleTokens",["t","T"])}parse(n,a){const o=s=>Math.trunc(s*Math.pow(10,-a.length+3));return Re($e(a.length,n),o)}set(n,a,o){return n.setMilliseconds(o),n}}class nl extends ke{constructor(){super(...arguments);re(this,"priority",10);re(this,"incompatibleTokens",["t","T","x"])}parse(n,a){switch(a){case"X":return rt(at.basicOptionalMinutes,n);case"XX":return rt(at.basic,n);case"XXXX":return rt(at.basicOptionalSeconds,n);case"XXXXX":return rt(at.extendedOptionalSeconds,n);case"XXX":default:return rt(at.extended,n)}}set(n,a,o){return a.timestampIsSet?n:be(n,n.getTime()-Zt(n)-o)}}class al extends ke{constructor(){super(...arguments);re(this,"priority",10);re(this,"incompatibleTokens",["t","T","X"])}parse(n,a){switch(a){case"x":return rt(at.basicOptionalMinutes,n);case"xx":return rt(at.basic,n);case"xxxx":return rt(at.basicOptionalSeconds,n);case"xxxxx":return rt(at.extendedOptionalSeconds,n);case"xxx":default:return rt(at.extended,n)}}set(n,a,o){return a.timestampIsSet?n:be(n,n.getTime()-Zt(n)-o)}}class rl extends ke{constructor(){super(...arguments);re(this,"priority",40);re(this,"incompatibleTokens","*")}parse(n){return Ca(n)}set(n,a,o){return[be(n,o*1e3),{timestampIsSet:!0}]}}class ol extends ke{constructor(){super(...arguments);re(this,"priority",20);re(this,"incompatibleTokens","*")}parse(n){return Ca(n)}set(n,a,o){return[be(n,o),{timestampIsSet:!0}]}}const ll={G:new To,y:new Po,Y:new Co,R:new Bo,u:new So,Q:new Ao,q:new $o,M:new Oo,L:new Eo,w:new Ro,I:new _o,d:new Io,D:new Fo,E:new Lo,e:new zo,c:new Ho,i:new qo,a:new Uo,b:new jo,B:new Qo,h:new Go,H:new Ko,K:new Xo,k:new Jo,m:new Zo,s:new el,S:new tl,X:new nl,x:new al,t:new rl,T:new ol},sl=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,il=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ul=/^'([^]*?)'?$/,cl=/''/g,dl=/\S/,fl=/[a-zA-Z]/;function Pn(t,r,n,a){var N,b,M,p,L,F,G,z;const o=()=>be((a==null?void 0:a.in)||n,NaN),s=po(),i=(a==null?void 0:a.locale)??s.locale??pa,d=(a==null?void 0:a.firstWeekContainsDate)??((b=(N=a==null?void 0:a.locale)==null?void 0:N.options)==null?void 0:b.firstWeekContainsDate)??s.firstWeekContainsDate??((p=(M=s.locale)==null?void 0:M.options)==null?void 0:p.firstWeekContainsDate)??1,c=(a==null?void 0:a.weekStartsOn)??((F=(L=a==null?void 0:a.locale)==null?void 0:L.options)==null?void 0:F.weekStartsOn)??s.weekStartsOn??((z=(G=s.locale)==null?void 0:G.options)==null?void 0:z.weekStartsOn)??0;if(!r)return t?o():de(n,a==null?void 0:a.in);const v={firstWeekContainsDate:d,weekStartsOn:c,locale:i},f=[new Mo(a==null?void 0:a.in,n)],T=r.match(il).map(g=>{const Y=g[0];if(Y in vn){const $=vn[Y];return $(g,i.formatLong)}return g}).join("").match(sl),h=[];for(let g of T){!(a!=null&&a.useAdditiona