var Oe=Object.defineProperty;var Pe=(n,r,e)=>r in n?Oe(n,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[r]=e;var i=(n,r,e)=>Pe(n,typeof r!="symbol"?r+"":r,e);function c(n){const r=Object.prototype.toString.call(n);return n instanceof Date||typeof n=="object"&&r==="[object Date]"?new n.constructor(+n):typeof n=="number"||r==="[object Number]"||typeof n=="string"||r==="[object String]"?new Date(n):new Date(NaN)}function w(n,r){return n instanceof Date?new n.constructor(r):new Date(r)}function G(n,r){const e=c(n);return isNaN(r)?w(n,NaN):(r&&e.setDate(e.getDate()+r),e)}function fe(n,r){const e=c(n);if(isNaN(r))return w(n,NaN);if(!r)return e;const t=e.getDate(),a=w(n,e.getTime());a.setMonth(e.getMonth()+r+1,0);const s=a.getDate();return t>=s?a:(e.setFullYear(a.getFullYear(),a.getMonth(),t),e)}const Z=6048e5,Ye=864e5,J=6e4,K=36e5,Ne=1e3,X=43200,oe=1440;let _e={};function E(){return _e}function _(n,r){const e=E(),t=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??e.weekStartsOn??e.locale?.options?.weekStartsOn??0,a=c(n),s=a.getDay(),o=(s<t?7:0)+s-t;return a.setDate(a.getDate()-o),a.setHours(0,0,0,0),a}function q(n){return _(n,{weekStartsOn:1})}function he(n){const r=c(n),e=r.getFullYear(),t=w(n,0);t.setFullYear(e+1,0,4),t.setHours(0,0,0,0);const a=q(t),s=w(n,0);s.setFullYear(e,0,4),s.setHours(0,0,0,0);const o=q(s);return r.getTime()>=a.getTime()?e+1:r.getTime()>=o.getTime()?e:e-1}function Q(n){const r=c(n);return r.setHours(0,0,0,0),r}function W(n){const r=c(n),e=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return e.setUTCFullYear(r.getFullYear()),+n-+e}function me(n,r){const e=Q(n),t=Q(r),a=+e-W(e),s=+t-W(t);return Math.round((a-s)/Ye)}function ve(n){const r=he(n),e=w(n,0);return e.setFullYear(r,0,4),e.setHours(0,0,0,0),q(e)}function We(n,r){const e=r*7;return G(n,e)}function tr(n,r){return fe(n,r*12)}function nr(n){let r;return n.forEach(function(e){const t=c(e);(r===void 0||r<t||isNaN(Number(t)))&&(r=t)}),r||new Date(NaN)}function rr(n){let r;return n.forEach(e=>{const t=c(e);(!r||r>t||isNaN(+t))&&(r=t)}),r||new Date(NaN)}function I(n,r){const e=c(n),t=c(r),a=e.getTime()-t.getTime();return a<0?-1:a>0?1:a}function Ee(n){return w(n,Date.now())}function ar(n,r){const e=Q(n),t=Q(r);return+e==+t}function Fe(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function He(n){if(!Fe(n)&&typeof n!="number")return!1;const r=c(n);return!isNaN(Number(r))}function Ie(n,r){const e=c(n),t=c(r),a=e.getFullYear()-t.getFullYear(),s=e.getMonth()-t.getMonth();return a*12+s}function qe(n,r,e){const t=_(n,e),a=_(r,e),s=+t-W(t),o=+a-W(a);return Math.round((s-o)/Z)}function Ce(n,r){const e=c(n),t=c(r);return e.getFullYear()-t.getFullYear()}function sr(n,r){const e=c(n),t=c(r),a=ie(e,t),s=Math.abs(me(e,t));e.setDate(e.getDate()-a*s);const o=+(ie(e,t)===-a),u=a*(s-o);return u===0?0:u}function ie(n,r){const e=n.getFullYear()-r.getFullYear()||n.getMonth()-r.getMonth()||n.getDate()-r.getDate()||n.getHours()-r.getHours()||n.getMinutes()-r.getMinutes()||n.getSeconds()-r.getSeconds()||n.getMilliseconds()-r.getMilliseconds();return e<0?-1:e>0?1:e}function Le(n){return r=>{const t=(n?Math[n]:Math.trunc)(r);return t===0?0:t}}function Re(n,r){return+c(n)-+c(r)}function Qe(n){const r=c(n);return r.setHours(23,59,59,999),r}function Xe(n){const r=c(n),e=r.getMonth();return r.setFullYear(r.getFullYear(),e+1,0),r.setHours(23,59,59,999),r}function Ae(n){const r=c(n);return+Qe(r)==+Xe(r)}function Be(n,r){const e=c(n),t=c(r),a=I(e,t),s=Math.abs(Ie(e,t));let o;if(s<1)o=0;else{e.getMonth()===1&&e.getDate()>27&&e.setDate(30),e.setMonth(e.getMonth()-a*s);let u=I(e,t)===-a;Ae(c(n))&&s===1&&I(n,t)===1&&(u=!1),o=a*(s-Number(u))}return o===0?0:o}function Ge(n,r,e){const t=Re(n,r)/1e3;return Le(e?.roundingMethod)(t)}function or(n,r){const e=c(n),t=c(r),a=I(e,t),s=Math.abs(Ce(e,t));e.setFullYear(1584),t.setFullYear(1584);const o=I(e,t)===-a,u=a*(s-+o);return u===0?0:u}function $e(n){const r=c(n);return r.setDate(1),r.setHours(0,0,0,0),r}function je(n){const r=c(n),e=w(n,0);return e.setFullYear(r.getFullYear(),0,1),e.setHours(0,0,0,0),e}function ze(n,r){const e=E(),t=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??e.weekStartsOn??e.locale?.options?.weekStartsOn??0,a=c(n),s=a.getDay(),o=(s<t?-7:0)+6-(s-t);return a.setDate(a.getDate()+o),a.setHours(23,59,59,999),a}function ir(n){return ze(n,{weekStartsOn:1})}const Ue={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"}},Ve=(n,r,e)=>{let t;const a=Ue[n];return typeof a=="string"?t=a:r===1?t=a.one:t=a.other.replace("{{count}}",r.toString()),e?.addSuffix?e.comparison&&e.comparison>0?"in "+t:t+" ago":t};function j(n){return(r={})=>{const e=r.width?String(r.width):n.defaultWidth;return n.formats[e]||n.formats[n.defaultWidth]}}const Ze={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Je={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Ke={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Se={date:j({formats:Ze,defaultWidth:"full"}),time:j({formats:Je,defaultWidth:"full"}),dateTime:j({formats:Ke,defaultWidth:"full"})},et={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},tt=(n,r,e,t)=>et[n];function C(n){return(r,e)=>{const t=e?.context?String(e.context):"standalone";let a;if(t==="formatting"&&n.formattingValues){const o=n.defaultFormattingWidth||n.defaultWidth,u=e?.width?String(e.width):o;a=n.formattingValues[u]||n.formattingValues[o]}else{const o=n.defaultWidth,u=e?.width?String(e.width):n.defaultWidth;a=n.values[u]||n.values[o]}const s=n.argumentCallback?n.argumentCallback(r):r;return a[s]}}const nt={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},rt={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},at={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"]},st={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"]},ot={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"}},it={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"}},ut=(n,r)=>{const e=Number(n),t=e%100;if(t>20||t<10)switch(t%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},ct={ordinalNumber:ut,era:C({values:nt,defaultWidth:"wide"}),quarter:C({values:rt,defaultWidth:"wide",argumentCallback:n=>n-1}),month:C({values:at,defaultWidth:"wide"}),day:C({values:st,defaultWidth:"wide"}),dayPeriod:C({values:ot,defaultWidth:"wide",formattingValues:it,defaultFormattingWidth:"wide"})};function L(n){return(r,e={})=>{const t=e.width,a=t&&n.matchPatterns[t]||n.matchPatterns[n.defaultMatchWidth],s=r.match(a);if(!s)return null;const o=s[0],u=t&&n.parsePatterns[t]||n.parsePatterns[n.defaultParseWidth],d=Array.isArray(u)?lt(u,y=>y.test(o)):dt(u,y=>y.test(o));let h;h=n.valueCallback?n.valueCallback(d):d,h=e.valueCallback?e.valueCallback(h):h;const g=r.slice(o.length);return{value:h,rest:g}}}function dt(n,r){for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e)&&r(n[e]))return e}function lt(n,r){for(let e=0;e<n.length;e++)if(r(n[e]))return e}function ft(n){return(r,e={})=>{const t=r.match(n.matchPattern);if(!t)return null;const a=t[0],s=r.match(n.parsePattern);if(!s)return null;let o=n.valueCallback?n.valueCallback(s[0]):s[0];o=e.valueCallback?e.valueCallback(o):o;const u=r.slice(a.length);return{value:o,rest:u}}}const ht=/^(\d+)(th|st|nd|rd)?/i,mt=/\d+/i,wt={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},gt={any:[/^b/i,/^(a|c)/i]},yt={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},bt={any:[/1/i,/2/i,/3/i,/4/i]},pt={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},xt={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]},Dt={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},Mt={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]},Tt={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},kt={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}},Ot={ordinalNumber:ft({matchPattern:ht,parsePattern:mt,valueCallback:n=>parseInt(n,10)}),era:L({matchPatterns:wt,defaultMatchWidth:"wide",parsePatterns:gt,defaultParseWidth:"any"}),quarter:L({matchPatterns:yt,defaultMatchWidth:"wide",parsePatterns:bt,defaultParseWidth:"any",valueCallback:n=>n+1}),month:L({matchPatterns:pt,defaultMatchWidth:"wide",parsePatterns:xt,defaultParseWidth:"any"}),day:L({matchPatterns:Dt,defaultMatchWidth:"wide",parsePatterns:Mt,defaultParseWidth:"any"}),dayPeriod:L({matchPatterns:Tt,defaultMatchWidth:"any",parsePatterns:kt,defaultParseWidth:"any"})},S={code:"en-US",formatDistance:Ve,formatLong:Se,formatRelative:tt,localize:ct,match:Ot,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Pt(n){const r=c(n);return me(r,je(r))+1}function we(n){const r=c(n),e=+q(r)-+ve(r);return Math.round(e/Z)+1}function ee(n,r){const e=c(n),t=e.getFullYear(),a=E(),s=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,o=w(n,0);o.setFullYear(t+1,0,s),o.setHours(0,0,0,0);const u=_(o,r),d=w(n,0);d.setFullYear(t,0,s),d.setHours(0,0,0,0);const h=_(d,r);return e.getTime()>=u.getTime()?t+1:e.getTime()>=h.getTime()?t:t-1}function Yt(n,r){const e=E(),t=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??e.firstWeekContainsDate??e.locale?.options?.firstWeekContainsDate??1,a=ee(n,r),s=w(n,0);return s.setFullYear(a,0,t),s.setHours(0,0,0,0),_(s,r)}function ge(n,r){const e=c(n),t=+_(e,r)-+Yt(e,r);return Math.round(t/Z)+1}function m(n,r){const e=n<0?"-":"",t=Math.abs(n).toString().padStart(r,"0");return e+t}const v={y(n,r){const e=n.getFullYear(),t=e>0?e:1-e;return m(r==="yy"?t%100:t,r.length)},M(n,r){const e=n.getMonth();return r==="M"?String(e+1):m(e+1,2)},d(n,r){return m(n.getDate(),r.length)},a(n,r){const e=n.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return e.toUpperCase();case"aaa":return e;case"aaaaa":return e[0];case"aaaa":default:return e==="am"?"a.m.":"p.m."}},h(n,r){return m(n.getHours()%12||12,r.length)},H(n,r){return m(n.getHours(),r.length)},m(n,r){return m(n.getMinutes(),r.length)},s(n,r){return m(n.getSeconds(),r.length)},S(n,r){const e=r.length,t=n.getMilliseconds(),a=Math.trunc(t*Math.pow(10,e-3));return m(a,r.length)}},H={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ue={G:function(n,r,e){const t=n.getFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return e.era(t,{width:"abbreviated"});case"GGGGG":return e.era(t,{width:"narrow"});case"GGGG":default:return e.era(t,{width:"wide"})}},y:function(n,r,e){if(r==="yo"){const t=n.getFullYear(),a=t>0?t:1-t;return e.ordinalNumber(a,{unit:"year"})}return v.y(n,r)},Y:function(n,r,e,t){const a=ee(n,t),s=a>0?a:1-a;if(r==="YY"){const o=s%100;return m(o,2)}return r==="Yo"?e.ordinalNumber(s,{unit:"year"}):m(s,r.length)},R:function(n,r){const e=he(n);return m(e,r.length)},u:function(n,r){const e=n.getFullYear();return m(e,r.length)},Q:function(n,r,e){const t=Math.ceil((n.getMonth()+1)/3);switch(r){case"Q":return String(t);case"QQ":return m(t,2);case"Qo":return e.ordinalNumber(t,{unit:"quarter"});case"QQQ":return e.quarter(t,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(t,{width:"wide",context:"formatting"})}},q:function(n,r,e){const t=Math.ceil((n.getMonth()+1)/3);switch(r){case"q":return String(t);case"qq":return m(t,2);case"qo":return e.ordinalNumber(t,{unit:"quarter"});case"qqq":return e.quarter(t,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(t,{width:"wide",context:"standalone"})}},M:function(n,r,e){const t=n.getMonth();switch(r){case"M":case"MM":return v.M(n,r);case"Mo":return e.ordinalNumber(t+1,{unit:"month"});case"MMM":return e.month(t,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(t,{width:"wide",context:"formatting"})}},L:function(n,r,e){const t=n.getMonth();switch(r){case"L":return String(t+1);case"LL":return m(t+1,2);case"Lo":return e.ordinalNumber(t+1,{unit:"month"});case"LLL":return e.month(t,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(t,{width:"wide",context:"standalone"})}},w:function(n,r,e,t){const a=ge(n,t);return r==="wo"?e.ordinalNumber(a,{unit:"week"}):m(a,r.length)},I:function(n,r,e){const t=we(n);return r==="Io"?e.ordinalNumber(t,{unit:"week"}):m(t,r.length)},d:function(n,r,e){return r==="do"?e.ordinalNumber(n.getDate(),{unit:"date"}):v.d(n,r)},D:function(n,r,e){const t=Pt(n);return r==="Do"?e.ordinalNumber(t,{unit:"dayOfYear"}):m(t,r.length)},E:function(n,r,e){const t=n.getDay();switch(r){case"E":case"EE":case"EEE":return e.day(t,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(t,{width:"short",context:"formatting"});case"EEEE":default:return e.day(t,{width:"wide",context:"formatting"})}},e:function(n,r,e,t){const a=n.getDay(),s=(a-t.weekStartsOn+8)%7||7;switch(r){case"e":return String(s);case"ee":return m(s,2);case"eo":return e.ordinalNumber(s,{unit:"day"});case"eee":return e.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(a,{width:"short",context:"formatting"});case"eeee":default:return e.day(a,{width:"wide",context:"formatting"})}},c:function(n,r,e,t){const a=n.getDay(),s=(a-t.weekStartsOn+8)%7||7;switch(r){case"c":return String(s);case"cc":return m(s,r.length);case"co":return e.ordinalNumber(s,{unit:"day"});case"ccc":return e.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(a,{width:"narrow",context:"standalone"});case"cccccc":return e.day(a,{width:"short",context:"standalone"});case"cccc":default:return e.day(a,{width:"wide",context:"standalone"})}},i:function(n,r,e){const t=n.getDay(),a=t===0?7:t;switch(r){case"i":return String(a);case"ii":return m(a,r.length);case"io":return e.ordinalNumber(a,{unit:"day"});case"iii":return e.day(t,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(t,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(t,{width:"short",context:"formatting"});case"iiii":default:return e.day(t,{width:"wide",context:"formatting"})}},a:function(n,r,e){const a=n.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(n,r,e){const t=n.getHours();let a;switch(t===12?a=H.noon:t===0?a=H.midnight:a=t/12>=1?"pm":"am",r){case"b":case"bb":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(n,r,e){const t=n.getHours();let a;switch(t>=17?a=H.evening:t>=12?a=H.afternoon:t>=4?a=H.morning:a=H.night,r){case"B":case"BB":case"BBB":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(n,r,e){if(r==="ho"){let t=n.getHours()%12;return t===0&&(t=12),e.ordinalNumber(t,{unit:"hour"})}return v.h(n,r)},H:function(n,r,e){return r==="Ho"?e.ordinalNumber(n.getHours(),{unit:"hour"}):v.H(n,r)},K:function(n,r,e){const t=n.getHours()%12;return r==="Ko"?e.ordinalNumber(t,{unit:"hour"}):m(t,r.length)},k:function(n,r,e){let t=n.getHours();return t===0&&(t=24),r==="ko"?e.ordinalNumber(t,{unit:"hour"}):m(t,r.length)},m:function(n,r,e){return r==="mo"?e.ordinalNumber(n.getMinutes(),{unit:"minute"}):v.m(n,r)},s:function(n,r,e){return r==="so"?e.ordinalNumber(n.getSeconds(),{unit:"second"}):v.s(n,r)},S:function(n,r){return v.S(n,r)},X:function(n,r,e){const t=n.getTimezoneOffset();if(t===0)return"Z";switch(r){case"X":return de(t);case"XXXX":case"XX":return F(t);case"XXXXX":case"XXX":default:return F(t,":")}},x:function(n,r,e){const t=n.getTimezoneOffset();switch(r){case"x":return de(t);case"xxxx":case"xx":return F(t);case"xxxxx":case"xxx":default:return F(t,":")}},O:function(n,r,e){const t=n.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+ce(t,":");case"OOOO":default:return"GMT"+F(t,":")}},z:function(n,r,e){const t=n.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+ce(t,":");case"zzzz":default:return"GMT"+F(t,":")}},t:function(n,r,e){const t=Math.trunc(n.getTime()/1e3);return m(t,r.length)},T:function(n,r,e){const t=n.getTime();return m(t,r.length)}};function ce(n,r=""){const e=n>0?"-":"+",t=Math.abs(n),a=Math.trunc(t/60),s=t%60;return s===0?e+String(a):e+String(a)+r+m(s,2)}function de(n,r){return n%60===0?(n>0?"-":"+")+m(Math.abs(n)/60,2):F(n,r)}function F(n,r=""){const e=n>0?"-":"+",t=Math.abs(n),a=m(Math.trunc(t/60),2),s=m(t%60,2);return e+a+r+s}const le=(n,r)=>{switch(n){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"})}},ye=(n,r)=>{switch(n){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"})}},Nt=(n,r)=>{const e=n.match(/(P+)(p+)?/)||[],t=e[1],a=e[2];if(!a)return le(n,r);let s;switch(t){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}}",le(t,r)).replace("{{time}}",ye(a,r))},U={p:ye,P:Nt},_t=/^D+$/,vt=/^Y+$/,Wt=["D","DD","YY","YYYY"];function be(n){return _t.test(n)}function pe(n){return vt.test(n)}function V(n,r,e){const t=Et(n,r,e);if(console.warn(t),Wt.includes(n))throw new RangeError(t)}function Et(n,r,e){const t=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${r}\`) for formatting ${t} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Ft=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ht=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,It=/^'([^]*?)'?$/,qt=/''/g,Ct=/[a-zA-Z]/;function ur(n,r,e){const t=E(),a=e?.locale??t.locale??S,s=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??t.firstWeekContainsDate??t.locale?.options?.firstWeekContainsDate??1,o=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??t.weekStartsOn??t.locale?.options?.weekStartsOn??0,u=c(n);if(!He(u))throw new RangeError("Invalid time value");let d=r.match(Ht).map(g=>{const y=g[0];if(y==="p"||y==="P"){const T=U[y];return T(g,a.formatLong)}return g}).join("").match(Ft).map(g=>{if(g==="''")return{isToken:!1,value:"'"};const y=g[0];if(y==="'")return{isToken:!1,value:Lt(g)};if(ue[y])return{isToken:!0,value:g};if(y.match(Ct))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");return{isToken:!1,value:g}});a.localize.preprocessor&&(d=a.localize.preprocessor(u,d));const h={firstWeekContainsDate:s,weekStartsOn:o,locale:a};return d.map(g=>{if(!g.isToken)return g.value;const y=g.value;(!e?.useAdditionalWeekYearTokens&&pe(y)||!e?.useAdditionalDayOfYearTokens&&be(y))&&V(y,r,String(n));const T=ue[y[0]];return T(u,y,a.localize,h)}).join("")}function Lt(n){const r=n.match(It);return r?r[1].replace(qt,"'"):n}function Rt(n,r,e){const t=E(),a=e?.locale??t.locale??S,s=2520,o=I(n,r);if(isNaN(o))throw new RangeError("Invalid time value");const u=Object.assign({},e,{addSuffix:e?.addSuffix,comparison:o});let d,h;o>0?(d=c(r),h=c(n)):(d=c(n),h=c(r));const g=Ge(h,d),y=(W(h)-W(d))/1e3,T=Math.round((g-y)/60);let k;if(T<2)return e?.includeSeconds?g<5?a.formatDistance("lessThanXSeconds",5,u):g<10?a.formatDistance("lessThanXSeconds",10,u):g<20?a.formatDistance("lessThanXSeconds",20,u):g<40?a.formatDistance("halfAMinute",0,u):g<60?a.formatDistance("lessThanXMinutes",1,u):a.formatDistance("xMinutes",1,u):T===0?a.formatDistance("lessThanXMinutes",1,u):a.formatDistance("xMinutes",T,u);if(T<45)return a.formatDistance("xMinutes",T,u);if(T<90)return a.formatDistance("aboutXHours",1,u);if(T<oe){const O=Math.round(T/60);return a.formatDistance("aboutXHours",O,u)}else{if(T<s)return a.formatDistance("xDays",1,u);if(T<X){const O=Math.round(T/oe);return a.formatDistance("xDays",O,u)}else if(T<X*2)return k=Math.round(T/X),a.formatDistance("aboutXMonths",k,u)}if(k=Be(h,d),k<12){const O=Math.round(T/X);return a.formatDistance("xMonths",O,u)}else{const O=k%12,l=Math.trunc(k/12);return O<3?a.formatDistance("aboutXYears",l,u):O<9?a.formatDistance("overXYears",l,u):a.formatDistance("almostXYears",l+1,u)}}function cr(n,r){return Rt(n,Ee(n),r)}function dr(n){return c(n).getDay()}function Qt(n){const r=c(n),e=r.getFullYear(),t=r.getMonth(),a=w(n,0);return a.setFullYear(e,t+1,0),a.setHours(0,0,0,0),a.getDate()}function Xt(){return Object.assign({},E())}function At(n){let e=c(n).getDay();return e===0&&(e=7),e}function lr(n){return Math.trunc(+c(n)/1e3)}function Bt(n){const r=c(n),e=r.getMonth();return r.setFullYear(r.getFullYear(),e+1,0),r.setHours(0,0,0,0),r}function fr(n,r){return qe(Bt(n),$e(n),r)+1}function hr(n,r){const e=c(n),t=c(r);return e.getTime()>t.getTime()}function mr(n,r){const e=c(n),t=c(r);return+e<+t}function Gt(n,r){const e=r instanceof Date?w(r,0):new r(0);return e.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),e.setHours(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),e}const $t=10;class xe{constructor(){i(this,"subPriority",0)}validate(r,e){return!0}}class jt extends xe{constructor(r,e,t,a,s){super(),this.value=r,this.validateValue=e,this.setValue=t,this.priority=a,s&&(this.subPriority=s)}validate(r,e){return this.validateValue(r,this.value,e)}set(r,e,t){return this.setValue(r,e,this.value,t)}}class zt extends xe{constructor(){super(...arguments);i(this,"priority",$t);i(this,"subPriority",-1)}set(e,t){return t.timestampIsSet?e:w(e,Gt(e,Date))}}class f{run(r,e,t,a){const s=this.parse(r,e,t,a);return s?{setter:new jt(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}validate(r,e,t){return!0}}class Ut extends f{constructor(){super(...arguments);i(this,"priority",140);i(this,"incompatibleTokens",["R","u","t","T"])}parse(e,t,a){switch(t){case"G":case"GG":case"GGG":return a.era(e,{width:"abbreviated"})||a.era(e,{width:"narrow"});case"GGGGG":return a.era(e,{width:"narrow"});case"GGGG":default:return a.era(e,{width:"wide"})||a.era(e,{width:"abbreviated"})||a.era(e,{width:"narrow"})}}set(e,t,a){return t.era=a,e.setFullYear(a,0,1),e.setHours(0,0,0,0),e}}const D={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}/},Y={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 M(n,r){return n&&{value:r(n.value),rest:n.rest}}function b(n,r){const e=r.match(n);return e?{value:parseInt(e[0],10),rest:r.slice(e[0].length)}:null}function N(n,r){const e=r.match(n);if(!e)return null;if(e[0]==="Z")return{value:0,rest:r.slice(1)};const t=e[1]==="+"?1:-1,a=e[2]?parseInt(e[2],10):0,s=e[3]?parseInt(e[3],10):0,o=e[5]?parseInt(e[5],10):0;return{value:t*(a*K+s*J+o*Ne),rest:r.slice(e[0].length)}}function De(n){return b(D.anyDigitsSigned,n)}function x(n,r){switch(n){case 1:return b(D.singleDigit,r);case 2:return b(D.twoDigits,r);case 3:return b(D.threeDigits,r);case 4:return b(D.fourDigits,r);default:return b(new RegExp("^\\d{1,"+n+"}"),r)}}function B(n,r){switch(n){case 1:return b(D.singleDigitSigned,r);case 2:return b(D.twoDigitsSigned,r);case 3:return b(D.threeDigitsSigned,r);case 4:return b(D.fourDigitsSigned,r);default:return b(new RegExp("^-?\\d{1,"+n+"}"),r)}}function te(n){switch(n){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 Me(n,r){const e=r>0,t=e?r:1-r;let a;if(t<=50)a=n||100;else{const s=t+50,o=Math.trunc(s/100)*100,u=n>=s%100;a=n+o-(u?100:0)}return e?a:1-a}function Te(n){return n%400===0||n%4===0&&n%100!==0}class Vt extends f{constructor(){super(...arguments);i(this,"priority",130);i(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(e,t,a){const s=o=>({year:o,isTwoDigitYear:t==="yy"});switch(t){case"y":return M(x(4,e),s);case"yo":return M(a.ordinalNumber(e,{unit:"year"}),s);default:return M(x(t.length,e),s)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,a){const s=e.getFullYear();if(a.isTwoDigitYear){const u=Me(a.year,s);return e.setFullYear(u,0,1),e.setHours(0,0,0,0),e}const o=!("era"in t)||t.era===1?a.year:1-a.year;return e.setFullYear(o,0,1),e.setHours(0,0,0,0),e}}class Zt extends f{constructor(){super(...arguments);i(this,"priority",130);i(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(e,t,a){const s=o=>({year:o,isTwoDigitYear:t==="YY"});switch(t){case"Y":return M(x(4,e),s);case"Yo":return M(a.ordinalNumber(e,{unit:"year"}),s);default:return M(x(t.length,e),s)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,a,s){const o=ee(e,s);if(a.isTwoDigitYear){const d=Me(a.year,o);return e.setFullYear(d,0,s.firstWeekContainsDate),e.setHours(0,0,0,0),_(e,s)}const u=!("era"in t)||t.era===1?a.year:1-a.year;return e.setFullYear(u,0,s.firstWeekContainsDate),e.setHours(0,0,0,0),_(e,s)}}class Jt extends f{constructor(){super(...arguments);i(this,"priority",130);i(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(e,t){return B(t==="R"?4:t.length,e)}set(e,t,a){const s=w(e,0);return s.setFullYear(a,0,4),s.setHours(0,0,0,0),q(s)}}class Kt extends f{constructor(){super(...arguments);i(this,"priority",130);i(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(e,t){return B(t==="u"?4:t.length,e)}set(e,t,a){return e.setFullYear(a,0,1),e.setHours(0,0,0,0),e}}class St extends f{constructor(){super(...arguments);i(this,"priority",120);i(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,t,a){switch(t){case"Q":case"QQ":return x(t.length,e);case"Qo":return a.ordinalNumber(e,{unit:"quarter"});case"QQQ":return a.quarter(e,{width:"abbreviated",context:"formatting"})||a.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return a.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(e,{width:"wide",context:"formatting"})||a.quarter(e,{width:"abbreviated",context:"formatting"})||a.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=1&&t<=4}set(e,t,a){return e.setMonth((a-1)*3,1),e.setHours(0,0,0,0),e}}class en extends f{constructor(){super(...arguments);i(this,"priority",120);i(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,t,a){switch(t){case"q":case"qq":return x(t.length,e);case"qo":return a.ordinalNumber(e,{unit:"quarter"});case"qqq":return a.quarter(e,{width:"abbreviated",context:"standalone"})||a.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return a.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(e,{width:"wide",context:"standalone"})||a.quarter(e,{width:"abbreviated",context:"standalone"})||a.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=1&&t<=4}set(e,t,a){return e.setMonth((a-1)*3,1),e.setHours(0,0,0,0),e}}class tn extends f{constructor(){super(...arguments);i(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);i(this,"priority",110)}parse(e,t,a){const s=o=>o-1;switch(t){case"M":return M(b(D.month,e),s);case"MM":return M(x(2,e),s);case"Mo":return M(a.ordinalNumber(e,{unit:"month"}),s);case"MMM":return a.month(e,{width:"abbreviated",context:"formatting"})||a.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return a.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(e,{width:"wide",context:"formatting"})||a.month(e,{width:"abbreviated",context:"formatting"})||a.month(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=11}set(e,t,a){return e.setMonth(a,1),e.setHours(0,0,0,0),e}}class nn extends f{constructor(){super(...arguments);i(this,"priority",110);i(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(e,t,a){const s=o=>o-1;switch(t){case"L":return M(b(D.month,e),s);case"LL":return M(x(2,e),s);case"Lo":return M(a.ordinalNumber(e,{unit:"month"}),s);case"LLL":return a.month(e,{width:"abbreviated",context:"standalone"})||a.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return a.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(e,{width:"wide",context:"standalone"})||a.month(e,{width:"abbreviated",context:"standalone"})||a.month(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=11}set(e,t,a){return e.setMonth(a,1),e.setHours(0,0,0,0),e}}function rn(n,r,e){const t=c(n),a=ge(t,e)-r;return t.setDate(t.getDate()-a*7),t}class an extends f{constructor(){super(...arguments);i(this,"priority",100);i(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(e,t,a){switch(t){case"w":return b(D.week,e);case"wo":return a.ordinalNumber(e,{unit:"week"});default:return x(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,a,s){return _(rn(e,a,s),s)}}function sn(n,r){const e=c(n),t=we(e)-r;return e.setDate(e.getDate()-t*7),e}class on extends f{constructor(){super(...arguments);i(this,"priority",100);i(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(e,t,a){switch(t){case"I":return b(D.week,e);case"Io":return a.ordinalNumber(e,{unit:"week"});default:return x(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,a){return q(sn(e,a))}}const un=[31,28,31,30,31,30,31,31,30,31,30,31],cn=[31,29,31,30,31,30,31,31,30,31,30,31];class dn extends f{constructor(){super(...arguments);i(this,"priority",90);i(this,"subPriority",1);i(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(e,t,a){switch(t){case"d":return b(D.date,e);case"do":return a.ordinalNumber(e,{unit:"date"});default:return x(t.length,e)}}validate(e,t){const a=e.getFullYear(),s=Te(a),o=e.getMonth();return s?t>=1&&t<=cn[o]:t>=1&&t<=un[o]}set(e,t,a){return e.setDate(a),e.setHours(0,0,0,0),e}}class ln extends f{constructor(){super(...arguments);i(this,"priority",90);i(this,"subpriority",1);i(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(e,t,a){switch(t){case"D":case"DD":return b(D.dayOfYear,e);case"Do":return a.ordinalNumber(e,{unit:"date"});default:return x(t.length,e)}}validate(e,t){const a=e.getFullYear();return Te(a)?t>=1&&t<=366:t>=1&&t<=365}set(e,t,a){return e.setMonth(0,a),e.setHours(0,0,0,0),e}}function ne(n,r,e){const t=E(),a=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??t.weekStartsOn??t.locale?.options?.weekStartsOn??0,s=c(n),o=s.getDay(),d=(r%7+7)%7,h=7-a,g=r<0||r>6?r-(o+h)%7:(d+h)%7-(o+h)%7;return G(s,g)}class fn extends f{constructor(){super(...arguments);i(this,"priority",90);i(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(e,t,a){switch(t){case"E":case"EE":case"EEE":return a.day(e,{width:"abbreviated",context:"formatting"})||a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return a.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return a.day(e,{width:"wide",context:"formatting"})||a.day(e,{width:"abbreviated",context:"formatting"})||a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,a,s){return e=ne(e,a,s),e.setHours(0,0,0,0),e}}class hn extends f{constructor(){super(...arguments);i(this,"priority",90);i(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(e,t,a,s){const o=u=>{const d=Math.floor((u-1)/7)*7;return(u+s.weekStartsOn+6)%7+d};switch(t){case"e":case"ee":return M(x(t.length,e),o);case"eo":return M(a.ordinalNumber(e,{unit:"day"}),o);case"eee":return a.day(e,{width:"abbreviated",context:"formatting"})||a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"});case"eeeee":return a.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return a.day(e,{width:"wide",context:"formatting"})||a.day(e,{width:"abbreviated",context:"formatting"})||a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,a,s){return e=ne(e,a,s),e.setHours(0,0,0,0),e}}class mn extends f{constructor(){super(...arguments);i(this,"priority",90);i(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(e,t,a,s){const o=u=>{const d=Math.floor((u-1)/7)*7;return(u+s.weekStartsOn+6)%7+d};switch(t){case"c":case"cc":return M(x(t.length,e),o);case"co":return M(a.ordinalNumber(e,{unit:"day"}),o);case"ccc":return a.day(e,{width:"abbreviated",context:"standalone"})||a.day(e,{width:"short",context:"standalone"})||a.day(e,{width:"narrow",context:"standalone"});case"ccccc":return a.day(e,{width:"narrow",context:"standalone"});case"cccccc":return a.day(e,{width:"short",context:"standalone"})||a.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return a.day(e,{width:"wide",context:"standalone"})||a.day(e,{width:"abbreviated",context:"standalone"})||a.day(e,{width:"short",context:"standalone"})||a.day(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=6}set(e,t,a,s){return e=ne(e,a,s),e.setHours(0,0,0,0),e}}function wn(n,r){const e=c(n),t=At(e),a=r-t;return G(e,a)}class gn extends f{constructor(){super(...arguments);i(this,"priority",90);i(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(e,t,a){const s=o=>o===0?7:o;switch(t){case"i":case"ii":return x(t.length,e);case"io":return a.ordinalNumber(e,{unit:"day"});case"iii":return M(a.day(e,{width:"abbreviated",context:"formatting"})||a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"}),s);case"iiiii":return M(a.day(e,{width:"narrow",context:"formatting"}),s);case"iiiiii":return M(a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"}),s);case"iiii":default:return M(a.day(e,{width:"wide",context:"formatting"})||a.day(e,{width:"abbreviated",context:"formatting"})||a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"}),s)}}validate(e,t){return t>=1&&t<=7}set(e,t,a){return e=wn(e,a),e.setHours(0,0,0,0),e}}class yn extends f{constructor(){super(...arguments);i(this,"priority",80);i(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(e,t,a){switch(t){case"a":case"aa":case"aaa":return a.dayPeriod(e,{width:"abbreviated",context:"formatting"})||a.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return a.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(e,{width:"wide",context:"formatting"})||a.dayPeriod(e,{width:"abbreviated",context:"formatting"})||a.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,a){return e.setHours(te(a),0,0,0),e}}class bn extends f{constructor(){super(...arguments);i(this,"priority",80);i(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(e,t,a){switch(t){case"b":case"bb":case"bbb":return a.dayPeriod(e,{width:"abbreviated",context:"formatting"})||a.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return a.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(e,{width:"wide",context:"formatting"})||a.dayPeriod(e,{width:"abbreviated",context:"formatting"})||a.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,a){return e.setHours(te(a),0,0,0),e}}class pn extends f{constructor(){super(...arguments);i(this,"priority",80);i(this,"incompatibleTokens",["a","b","t","T"])}parse(e,t,a){switch(t){case"B":case"BB":case"BBB":return a.dayPeriod(e,{width:"abbreviated",context:"formatting"})||a.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return a.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(e,{width:"wide",context:"formatting"})||a.dayPeriod(e,{width:"abbreviated",context:"formatting"})||a.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,a){return e.setHours(te(a),0,0,0),e}}class xn extends f{constructor(){super(...arguments);i(this,"priority",70);i(this,"incompatibleTokens",["H","K","k","t","T"])}parse(e,t,a){switch(t){case"h":return b(D.hour12h,e);case"ho":return a.ordinalNumber(e,{unit:"hour"});default:return x(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,a){const s=e.getHours()>=12;return s&&a<12?e.setHours(a+12,0,0,0):!s&&a===12?e.setHours(0,0,0,0):e.setHours(a,0,0,0),e}}class Dn extends f{constructor(){super(...arguments);i(this,"priority",70);i(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(e,t,a){switch(t){case"H":return b(D.hour23h,e);case"Ho":return a.ordinalNumber(e,{unit:"hour"});default:return x(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,a){return e.setHours(a,0,0,0),e}}class Mn extends f{constructor(){super(...arguments);i(this,"priority",70);i(this,"incompatibleTokens",["h","H","k","t","T"])}parse(e,t,a){switch(t){case"K":return b(D.hour11h,e);case"Ko":return a.ordinalNumber(e,{unit:"hour"});default:return x(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,a){return e.getHours()>=12&&a<12?e.setHours(a+12,0,0,0):e.setHours(a,0,0,0),e}}class Tn extends f{constructor(){super(...arguments);i(this,"priority",70);i(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(e,t,a){switch(t){case"k":return b(D.hour24h,e);case"ko":return a.ordinalNumber(e,{unit:"hour"});default:return x(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,a){const s=a<=24?a%24:a;return e.setHours(s,0,0,0),e}}class kn extends f{constructor(){super(...arguments);i(this,"priority",60);i(this,"incompatibleTokens",["t","T"])}parse(e,t,a){switch(t){case"m":return b(D.minute,e);case"mo":return a.ordinalNumber(e,{unit:"minute"});default:return x(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,a){return e.setMinutes(a,0,0),e}}class On extends f{constructor(){super(...arguments);i(this,"priority",50);i(this,"incompatibleTokens",["t","T"])}parse(e,t,a){switch(t){case"s":return b(D.second,e);case"so":return a.ordinalNumber(e,{unit:"second"});default:return x(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,a){return e.setSeconds(a,0),e}}class Pn extends f{constructor(){super(...arguments);i(this,"priority",30);i(this,"incompatibleTokens",["t","T"])}parse(e,t){const a=s=>Math.trunc(s*Math.pow(10,-t.length+3));return M(x(t.length,e),a)}set(e,t,a){return e.setMilliseconds(a),e}}class Yn extends f{constructor(){super(...arguments);i(this,"priority",10);i(this,"incompatibleTokens",["t","T","x"])}parse(e,t){switch(t){case"X":return N(Y.basicOptionalMinutes,e);case"XX":return N(Y.basic,e);case"XXXX":return N(Y.basicOptionalSeconds,e);case"XXXXX":return N(Y.extendedOptionalSeconds,e);case"XXX":default:return N(Y.extended,e)}}set(e,t,a){return t.timestampIsSet?e:w(e,e.getTime()-W(e)-a)}}class Nn extends f{constructor(){super(...arguments);i(this,"priority",10);i(this,"incompatibleTokens",["t","T","X"])}parse(e,t){switch(t){case"x":return N(Y.basicOptionalMinutes,e);case"xx":return N(Y.basic,e);case"xxxx":return N(Y.basicOptionalSeconds,e);case"xxxxx":return N(Y.extendedOptionalSeconds,e);case"xxx":default:return N(Y.extended,e)}}set(e,t,a){return t.timestampIsSet?e:w(e,e.getTime()-W(e)-a)}}class _n extends f{constructor(){super(...arguments);i(this,"priority",40);i(this,"incompatibleTokens","*")}parse(e){return De(e)}set(e,t,a){return[w(e,a*1e3),{timestampIsSet:!0}]}}class vn extends f{constructor(){super(...arguments);i(this,"priority",20);i(this,"incompatibleTokens","*")}parse(e){return De(e)}set(e,t,a){return[w(e,a),{timestampIsSet:!0}]}}const Wn={G:new Ut,y:new Vt,Y:new Zt,R:new Jt,u:new Kt,Q:new St,q:new en,M:new tn,L:new nn,w:new an,I:new on,d:new dn,D:new ln,E:new fn,e:new hn,c:new mn,i:new gn,a:new yn,b:new bn,B:new pn,h:new xn,H:new Dn,K:new Mn,k:new Tn,m:new kn,s:new On,S:new Pn,X:new Yn,x:new Nn,t:new _n,T:new vn},En=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Fn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Hn=/^'([^]*?)'?$/,In=/''/g,qn=/\S/,Cn=/[a-zA-Z]/;function wr(n,r,e,t){const a=Xt(),s=a.locale??S,o=a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,u=a.weekStartsOn??a.locale?.options?.weekStartsOn??0,d={firstWeekContainsDate:o,weekStartsOn:u,locale:s},h=[new zt],g=r.match(Fn).map(l=>{const p=l[0];if(p in U){const P=U[p];return P(l,s.formatLong)}return l}).join("").match(En),y=[];for(let l of g){pe(l)&&V(l,r,n),be(l)&&V(l,r,n);const p=l[0],P=Wn[p];if(P){const{incompatibleTokens:re}=P;if(Array.isArray(re)){const ae=y.find(se=>re.includes(se.token)||se.token===p);if(ae)throw new RangeError(`The format string mustn't contain \`${ae.fullToken}\` and \`${l}\` at the same time`)}else if(P.incompatibleTokens==="*"&&y.length>0)throw new RangeError(`The format string mustn't contain \`${l}\` and any other token at the same time`);y.push({token:p,fullToken:l});const $=P.run(n,l,s.match,d);if(!$)return w(e,NaN);h.push($.setter),n=$.rest}else{if(p.match(Cn))throw new RangeError("Format string contains an unescaped latin alphabet character `"+p+"`");if(l==="''"?l="'":p==="'"&&(l=Ln(l)),n.indexOf(l)===0)n=n.slice(l.length);else return w(e,NaN)}}if(n.length>0&&qn.test(n))return w(e,NaN);const T=h.map(l=>l.priority).sort((l,p)=>p-l).filter((l,p,P)=>P.indexOf(l)===p).map(l=>h.filter(p=>p.priority===l).sort((p,P)=>P.subPriority-p.subPriority)).map(l=>l[0]);let k=c(e);if(isNaN(k.getTime()))return w(e,NaN);const O={};for(const l of T){if(!l.validate(k,d))return w(e,NaN);const p=l.set(k,O,d);Array.isArray(p)?(k=p[0],Object.assign(O,p[1])):k=p}return w(e,k)}function Ln(n){return n.match(Hn)[1].replace(In,"'")}function gr(n,r){const e=c(n),t=c(r);return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()}function yr(n,r){const e=c(n),t=c(r);return e.getFullYear()===t.getFullYear()}function br(n,r){const e=+c(n),[t,a]=[+c(r.start),+c(r.end)].sort((s,o)=>s-o);return e>=t&&e<=a}function pr(n,r){return G(n,-r)}function xr(n,r){const t=An(n);let a;if(t.date){const d=Bn(t.date,2);a=Gn(d.restDateString,d.year)}if(!a||isNaN(a.getTime()))return new Date(NaN);const s=a.getTime();let o=0,u;if(t.time&&(o=$n(t.time),isNaN(o)))return new Date(NaN);if(t.timezone){if(u=jn(t.timezone),isNaN(u))return new Date(NaN)}else{const d=new Date(s+o),h=new Date(0);return h.setFullYear(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()),h.setHours(d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds()),h}return new Date(s+o+u)}const A={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Rn=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Qn=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Xn=/^([+-])(\d{2})(?::?(\d{2}))?$/;function An(n){const r={},e=n.split(A.dateTimeDelimiter);let t;if(e.length>2)return r;if(/:/.test(e[0])?t=e[0]:(r.date=e[0],t=e[1],A.timeZoneDelimiter.test(r.date)&&(r.date=n.split(A.timeZoneDelimiter)[0],t=n.substr(r.date.length,n.length))),t){const a=A.timezone.exec(t);a?(r.time=t.replace(a[1],""),r.timezone=a[1]):r.time=t}return r}function Bn(n,r){const e=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+r)+"})|(\\d{2}|[+-]\\d{"+(2+r)+"})$)"),t=n.match(e);if(!t)return{year:NaN,restDateString:""};const a=t[1]?parseInt(t[1]):null,s=t[2]?parseInt(t[2]):null;return{year:s===null?a:s*100,restDateString:n.slice((t[1]||t[2]).length)}}function Gn(n,r){if(r===null)return new Date(NaN);const e=n.match(Rn);if(!e)return new Date(NaN);const t=!!e[4],a=R(e[1]),s=R(e[2])-1,o=R(e[3]),u=R(e[4]),d=R(e[5])-1;if(t)return Jn(r,u,d)?zn(r,u,d):new Date(NaN);{const h=new Date(0);return!Vn(r,s,o)||!Zn(r,a)?new Date(NaN):(h.setUTCFullYear(r,s,Math.max(a,o)),h)}}function R(n){return n?parseInt(n):1}function $n(n){const r=n.match(Qn);if(!r)return NaN;const e=z(r[1]),t=z(r[2]),a=z(r[3]);return Kn(e,t,a)?e*K+t*J+a*1e3:NaN}function z(n){return n&&parseFloat(n.replace(",","."))||0}function jn(n){if(n==="Z")return 0;const r=n.match(Xn);if(!r)return 0;const e=r[1]==="+"?-1:1,t=parseInt(r[2]),a=r[3]&&parseInt(r[3])||0;return Sn(t,a)?e*(t*K+a*J):NaN}function zn(n,r,e){const t=new Date(0);t.setUTCFullYear(n,0,4);const a=t.getUTCDay()||7,s=(r-1)*7+e+1-a;return t.setUTCDate(t.getUTCDate()+s),t}const Un=[31,null,31,30,31,30,31,31,30,31,30,31];function ke(n){return n%400===0||n%4===0&&n%100!==0}function Vn(n,r,e){return r>=0&&r<=11&&e>=1&&e<=(Un[r]||(ke(n)?29:28))}function Zn(n,r){return r>=1&&r<=(ke(n)?366:365)}function Jn(n,r,e){return r>=1&&r<=53&&e>=0&&e<=6}function Kn(n,r,e){return n===24?r===0&&e===0:e>=0&&e<60&&r>=0&&r<60&&n>=0&&n<25}function Sn(n,r){return r>=0&&r<=59}function Dr(n,r){const e=c(n),t=e.getFullYear(),a=e.getDate(),s=w(n,0);s.setFullYear(t,r,15),s.setHours(0,0,0,0);const o=Qt(s);return e.setMonth(r,Math.min(a,o)),e}function Mr(n,r){const e=c(n);return isNaN(+e)?w(n,NaN):(e.setFullYear(r),e)}function Tr(){return Q(Date.now())}function kr(n,r){return fe(n,-1)}function Or(n,r){return We(n,-1)}export{tr as A,nr as B,rr as C,yr as D,Dr as E,Mr as F,je as G,ir as H,ze as I,q as J,we as K,ge as L,Fe as M,wr as N,Tr as O,dr as P,G as a,_ as b,Or as c,sr as d,$e as e,ur as f,kr as g,pr as h,cr as i,br as j,or as k,Ge as l,Xe as m,fe as n,Ie as o,xr as p,gr as q,mr as r,Q as s,ar as t,me as u,S as v,fr as w,We as x,lr as y,hr as z};