You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
50 KiB

import{eT as Ce,fT as v,T as s,fS as h}from"./index-f4658ae7.js";import{_ as qe}from"./createForOfIteratorHelper-eb4541b9.js";import{d as $e}from"./Loading-fead3a83.js";import{r as d,t as g,a as Y,s as J,g as ue}from"./index-c569cc07.js";function fe(o,i){d(2,arguments);var t=g(o),r=Y(i);return isNaN(r)?new Date(NaN):(r&&t.setDate(t.getDate()+r),t)}function xe(o,i){d(2,arguments);var t=g(o),r=Y(i);if(isNaN(r))return new Date(NaN);if(!r)return t;var e=t.getDate(),a=new Date(t.getTime());a.setMonth(t.getMonth()+r+1,0);var n=a.getDate();return e>=n?a:(t.setFullYear(a.getFullYear(),a.getMonth(),e),t)}function ut(o,i){d(2,arguments);var t=g(o).getTime(),r=Y(i);return new Date(t+r)}function Fe(o){var i=new Date(Date.UTC(o.getFullYear(),o.getMonth(),o.getDate(),o.getHours(),o.getMinutes(),o.getSeconds(),o.getMilliseconds()));return i.setUTCFullYear(o.getFullYear()),o.getTime()-i.getTime()}function We(o){d(1,arguments);var i=g(o);return i.setHours(0,0,0,0),i}function st(o,i){d(2,arguments);var t=Y(i),r=t*3;return xe(o,r)}function ct(o,i){d(2,arguments);var t=Y(i);return xe(o,t*12)}var lt=6e4,ft=36e5,dt=1e3;function vt(o,i){d(2,arguments);var t=We(o),r=We(i);return t.getTime()===r.getTime()}function ht(o){return d(1,arguments),o instanceof Date||Ce(o)==="object"&&Object.prototype.toString.call(o)==="[object Date]"}function Ge(o){if(d(1,arguments),!ht(o)&&typeof o!="number")return!1;var i=g(o);return!isNaN(Number(i))}function wt(o){d(1,arguments);var i=g(o),t=Math.floor(i.getMonth()/3)+1;return t}function Le(o){d(1,arguments);var i=g(o),t=i.getMonth(),r=t-t%3;return i.setMonth(r,1),i.setHours(0,0,0,0),i}function mt(o){d(1,arguments);var i=g(o);return i.setDate(1),i.setHours(0,0,0,0),i}function Be(o){d(1,arguments);var i=g(o),t=new Date(0);return t.setFullYear(i.getFullYear(),0,1),t.setHours(0,0,0,0),t}function Xe(o,i){d(2,arguments);var t=Y(i);return ut(o,-t)}var gt=864e5;function pt(o){d(1,arguments);var i=g(o),t=i.getTime();i.setUTCMonth(0,1),i.setUTCHours(0,0,0,0);var r=i.getTime(),e=t-r;return Math.floor(e/gt)+1}function te(o){d(1,arguments);var i=1,t=g(o),r=t.getUTCDay(),e=(r<i?7:0)+r-i;return t.setUTCDate(t.getUTCDate()-e),t.setUTCHours(0,0,0,0),t}function je(o){d(1,arguments);var i=g(o),t=i.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(t+1,0,4),r.setUTCHours(0,0,0,0);var e=te(r),a=new Date(0);a.setUTCFullYear(t,0,4),a.setUTCHours(0,0,0,0);var n=te(a);return i.getTime()>=e.getTime()?t+1:i.getTime()>=n.getTime()?t:t-1}function yt(o){d(1,arguments);var i=je(o),t=new Date(0);t.setUTCFullYear(i,0,4),t.setUTCHours(0,0,0,0);var r=te(t);return r}var Tt=6048e5;function Se(o){d(1,arguments);var i=g(o),t=te(i).getTime()-yt(i).getTime();return Math.round(t/Tt)+1}function Oe(o,i){var t,r,e,a,n,u,l,f;d(1,arguments);var T=g(o),C=T.getUTCFullYear(),E=ue(),O=Y((t=(r=(e=(a=i==null?void 0:i.firstWeekContainsDate)!==null&&a!==void 0?a:i==null||(n=i.locale)===null||n===void 0||(u=n.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&e!==void 0?e:E.firstWeekContainsDate)!==null&&r!==void 0?r:(l=E.locale)===null||l===void 0||(f=l.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&t!==void 0?t:1);if(!(O>=1&&O<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var _=new Date(0);_.setUTCFullYear(C+1,0,O),_.setUTCHours(0,0,0,0);var L=J(_,i),H=new Date(0);H.setUTCFullYear(C,0,O),H.setUTCHours(0,0,0,0);var A=J(H,i);return T.getTime()>=L.getTime()?C+1:T.getTime()>=A.getTime()?C:C-1}function bt(o,i){var t,r,e,a,n,u,l,f;d(1,arguments);var T=ue(),C=Y((t=(r=(e=(a=i==null?void 0:i.firstWeekContainsDate)!==null&&a!==void 0?a:i==null||(n=i.locale)===null||n===void 0||(u=n.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&e!==void 0?e:T.firstWeekContainsDate)!==null&&r!==void 0?r:(l=T.locale)===null||l===void 0||(f=l.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&t!==void 0?t:1),E=Oe(o,i),O=new Date(0);O.setUTCFullYear(E,0,C),O.setUTCHours(0,0,0,0);var _=J(O,i);return _}var Dt=6048e5;function Ke(o,i){d(1,arguments);var t=g(o),r=J(t,i).getTime()-bt(t,i).getTime();return Math.round(r/Dt)+1}function y(o,i){for(var t=o<0?"-":"",r=Math.abs(o).toString();r.length<i;)r="0"+r;return t+r}var Ct={y:function(i,t){var r=i.getUTCFullYear(),e=r>0?r:1-r;return y(t==="yy"?e%100:e,t.length)},M:function(i,t){var r=i.getUTCMonth();return t==="M"?String(r+1):y(r+1,2)},d:function(i,t){return y(i.getUTCDate(),t.length)},a:function(i,t){var r=i.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h:function(i,t){return y(i.getUTCHours()%12||12,t.length)},H:function(i,t){return y(i.getUTCHours(),t.length)},m:function(i,t){return y(i.getUTCMinutes(),t.length)},s:function(i,t){return y(i.getUTCSeconds(),t.length)},S:function(i,t){var r=t.length,e=i.getUTCMilliseconds(),a=Math.floor(e*Math.pow(10,r-3));return y(a,t.length)}};const S=Ct;var ee={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},xt={G:function(i,t,r){var e=i.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(e,{width:"abbreviated"});case"GGGGG":return r.era(e,{width:"narrow"});case"GGGG":default:return r.era(e,{width:"wide"})}},y:function(i,t,r){if(t==="yo"){var e=i.getUTCFullYear(),a=e>0?e:1-e;return r.ordinalNumber(a,{unit:"year"})}return S.y(i,t)},Y:function(i,t,r,e){var a=Oe(i,e),n=a>0?a:1-a;if(t==="YY"){var u=n%100;return y(u,2)}return t==="Yo"?r.ordinalNumber(n,{unit:"year"}):y(n,t.length)},R:function(i,t){var r=je(i);return y(r,t.length)},u:function(i,t){var r=i.getUTCFullYear();return y(r,t.length)},Q:function(i,t,r){var e=Math.ceil((i.getUTCMonth()+1)/3);switch(t){case"Q":return String(e);case"QQ":return y(e,2);case"Qo":return r.ordinalNumber(e,{unit:"quarter"});case"QQQ":return r.quarter(e,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(e,{width:"wide",context:"formatting"})}},q:function(i,t,r){var e=Math.ceil((i.getUTCMonth()+1)/3);switch(t){case"q":return String(e);case"qq":return y(e,2);case"qo":return r.ordinalNumber(e,{unit:"quarter"});case"qqq":return r.quarter(e,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(e,{width:"wide",context:"standalone"})}},M:function(i,t,r){var e=i.getUTCMonth();switch(t){case"M":case"MM":return S.M(i,t);case"Mo":return r.ordinalNumber(e+1,{unit:"month"});case"MMM":return r.month(e,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(e,{width:"wide",context:"formatting"})}},L:function(i,t,r){var e=i.getUTCMonth();switch(t){case"L":return String(e+1);case"LL":return y(e+1,2);case"Lo":return r.ordinalNumber(e+1,{unit:"month"});case"LLL":return r.month(e,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(e,{width:"wide",context:"standalone"})}},w:function(i,t,r,e){var a=Ke(i,e);return t==="wo"?r.ordinalNumber(a,{unit:"week"}):y(a,t.length)},I:function(i,t,r){var e=Se(i);return t==="Io"?r.ordinalNumber(e,{unit:"week"}):y(e,t.length)},d:function(i,t,r){return t==="do"?r.ordinalNumber(i.getUTCDate(),{unit:"date"}):S.d(i,t)},D:function(i,t,r){var e=pt(i);return t==="Do"?r.ordinalNumber(e,{unit:"dayOfYear"}):y(e,t.length)},E:function(i,t,r){var e=i.getUTCDay();switch(t){case"E":case"EE":case"EEE":return r.day(e,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(e,{width:"short",context:"formatting"});case"EEEE":default:return r.day(e,{width:"wide",context:"formatting"})}},e:function(i,t,r,e){var a=i.getUTCDay(),n=(a-e.weekStartsOn+8)%7||7;switch(t){case"e":return String(n);case"ee":return y(n,2);case"eo":return r.ordinalNumber(n,{unit:"day"});case"eee":return r.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(a,{width:"short",context:"formatting"});case"eeee":default:return r.day(a,{width:"wide",context:"formatting"})}},c:function(i,t,r,e){var a=i.getUTCDay(),n=(a-e.weekStartsOn+8)%7||7;switch(t){case"c":return String(n);case"cc":return y(n,t.length);case"co":return r.ordinalNumber(n,{unit:"day"});case"ccc":return r.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(a,{width:"narrow",context:"standalone"});case"cccccc":return r.day(a,{width:"short",context:"standalone"});case"cccc":default:return r.day(a,{width:"wide",context:"standalone"})}},i:function(i,t,r){var e=i.getUTCDay(),a=e===0?7:e;switch(t){case"i":return String(a);case"ii":return y(a,t.length);case"io":return r.ordinalNumber(a,{unit:"day"});case"iii":return r.day(e,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(e,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(e,{width:"short",context:"formatting"});case"iiii":default:return r.day(e,{width:"wide",context:"formatting"})}},a:function(i,t,r){var e=i.getUTCHours(),a=e/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(i,t,r){var e=i.getUTCHours(),a;switch(e===12?a=ee.noon:e===0?a=ee.midnight:a=e/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(i,t,r){var e=i.getUTCHours(),a;switch(e>=17?a=ee.evening:e>=12?a=ee.afternoon:e>=4?a=ee.morning:a=ee.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(i,t,r){if(t==="ho"){var e=i.getUTCHours()%12;return e===0&&(e=12),r.ordinalNumber(e,{unit:"hour"})}return S.h(i,t)},H:function(i,t,r){return t==="Ho"?r.ordinalNumber(i.getUTCHours(),{unit:"hour"}):S.H(i,t)},K:function(i,t,r){var e=i.getUTCHours()%12;return t==="Ko"?r.ordinalNumber(e,{unit:"hour"}):y(e,t.length)},k:function(i,t,r){var e=i.getUTCHours();return e===0&&(e=24),t==="ko"?r.ordinalNumber(e,{unit:"hour"}):y(e,t.length)},m:function(i,t,r){return t==="mo"?r.ordinalNumber(i.getUTCMinutes(),{unit:"minute"}):S.m(i,t)},s:function(i,t,r){return t==="so"?r.ordinalNumber(i.getUTCSeconds(),{unit:"second"}):S.s(i,t)},S:function(i,t){return S.S(i,t)},X:function(i,t,r,e){var a=e._originalDate||i,n=a.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return Re(n);case"XXXX":case"XX":return z(n);case"XXXXX":case"XXX":default:return z(n,":")}},x:function(i,t,r,e){var a=e._originalDate||i,n=a.getTimezoneOffset();switch(t){case"x":return Re(n);case"xxxx":case"xx":return z(n);case"xxxxx":case"xxx":default:return z(n,":")}},O:function(i,t,r,e){var a=e._originalDate||i,n=a.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Ae(n,":");case"OOOO":default:return"GMT"+z(n,":")}},z:function(i,t,r,e){var a=e._originalDate||i,n=a.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Ae(n,":");case"zzzz":default:return"GMT"+z(n,":")}},t:function(i,t,r,e){var a=e._originalDate||i,n=Math.floor(a.getTime()/1e3);return y(n,t.length)},T:function(i,t,r,e){var a=e._originalDate||i,n=a.getTime();return y(n,t.length)}};function Ae(o,i){var t=o>0?"-":"+",r=Math.abs(o),e=Math.floor(r/60),a=r%60;if(a===0)return t+String(e);var n=i||"";return t+String(e)+n+y(a,2)}function Re(o,i){if(o%60===0){var t=o>0?"-":"+";return t+y(Math.abs(o)/60,2)}return z(o,i)}function z(o,i){var t=i||"",r=o>0?"-":"+",e=Math.abs(o),a=y(Math.floor(e/60),2),n=y(e%60,2);return r+a+t+n}const Ot=xt;var Qe=function(i,t){switch(i){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Ze=function(i,t){switch(i){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Pt=function(i,t){var r=i.match(/(P+)(p+)?/)||[],e=r[1],a=r[2];if(!a)return Qe(i,t);var n;switch(e){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;case"PPPP":default:n=t.dateTime({width:"full"});break}return n.replace("{{date}}",Qe(e,t)).replace("{{time}}",Ze(a,t))},Mt={p:Ze,P:Pt};const be=Mt;var kt=["D","DD"],Ut=["YY","YYYY"];function Ve(o){return kt.indexOf(o)!==-1}function ze(o){return Ut.indexOf(o)!==-1}function de(o,i,t){if(o==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(i,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(o==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(i,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(o==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(i,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(o==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(i,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Yt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Et=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,_t=/^'([^]*?)'?$/,Nt=/''/g,Ht=/[a-zA-Z]/;function It(o,i,t){var r,e,a,n,u,l,f,T,C,E,O,_,L,H,A,F,K,Z;d(2,arguments);var re=String(i),N=ue(),R=(r=(e=t==null?void 0:t.locale)!==null&&e!==void 0?e:N.locale)!==null&&r!==void 0?r:$e,G=Y((a=(n=(u=(l=t==null?void 0:t.firstWeekContainsDate)!==null&&l!==void 0?l:t==null||(f=t.locale)===null||f===void 0||(T=f.options)===null||T===void 0?void 0:T.firstWeekContainsDate)!==null&&u!==void 0?u:N.firstWeekContainsDate)!==null&&n!==void 0?n:(C=N.locale)===null||C===void 0||(E=C.options)===null||E===void 0?void 0:E.firstWeekContainsDate)!==null&&a!==void 0?a:1);if(!(G>=1&&G<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var X=Y((O=(_=(L=(H=t==null?void 0:t.weekStartsOn)!==null&&H!==void 0?H:t==null||(A=t.locale)===null||A===void 0||(F=A.options)===null||F===void 0?void 0:F.weekStartsOn)!==null&&L!==void 0?L:N.weekStartsOn)!==null&&_!==void 0?_:(K=N.locale)===null||K===void 0||(Z=K.options)===null||Z===void 0?void 0:Z.weekStartsOn)!==null&&O!==void 0?O:0);if(!(X>=0&&X<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!R.localize)throw new RangeError("locale must contain localize property");if(!R.formatLong)throw new RangeError("locale must contain formatLong property");var j=g(o);if(!Ge(j))throw new RangeError("Invalid time value");var ne=Fe(j),ae=Xe(j,ne),ie={firstWeekContainsDate:G,weekStartsOn:X,locale:R,_originalDate:j},ge=re.match(Et).map(function(U){var I=U[0];if(I==="p"||I==="P"){var V=be[I];return V(U,R.formatLong)}return U}).join("").match(Yt).map(function(U){if(U==="''")return"'";var I=U[0];if(I==="'")return qt(U);var V=Ot[I];if(V)return!(t!=null&&t.useAdditionalWeekYearTokens)&&ze(U)&&de(U,i,String(o)),!(t!=null&&t.useAdditionalDayOfYearTokens)&&Ve(U)&&de(U,i,String(o)),V(ae,U,R.localize,ie);if(I.match(Ht))throw new RangeError("Format string contains an unescaped latin alphabet character `"+I+"`");return U}).join("");return ge}function qt(o){var i=o.match(_t);return i?i[1].replace(Nt,"'"):o}function Wt(o,i){if(o==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var t in i)Object.prototype.hasOwnProperty.call(i,t)&&(o[t]=i[t]);return o}function Lt(o){d(1,arguments);var i=g(o),t=i.getDate();return t}function At(o){d(1,arguments);var i=g(o),t=i.getDay();return t}function ve(o){d(1,arguments);var i=g(o),t=i.getMonth();return t}function W(o){d(1,arguments);var i=g(o),t=i.getTime();return t}function me(o){return d(1,arguments),g(o).getFullYear()}function c(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}function De(o,i){return De=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,e){return r.__proto__=e,r},De(o,i)}function w(o,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(i&&i.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),i&&De(o,i)}function he(o){return he=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},he(o)}function Rt(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(o){return!1}}function Qt(o,i){if(i&&(Ce(i)==="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return c(o)}function m(o){var i=Rt();return function(){var r=he(o),e;if(i){var a=he(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return Qt(this,e)}}var $t=10,Je=function(){function o(){v(this,o),s(this,"priority",void 0),s(this,"subPriority",0)}return h(o,[{key:"validate",value:function(t,r){return!0}}]),o}(),Ft=function(o){w(t,o);var i=m(t);function t(r,e,a,n,u){var l;return v(this,t),l=i.call(this),l.value=r,l.validateValue=e,l.setValue=a,l.priority=n,u&&(l.subPriority=u),l}return h(t,[{key:"validate",value:function(e,a){return this.validateValue(e,this.value,a)}},{key:"set",value:function(e,a,n){return this.setValue(e,a,this.value,n)}}]),t}(Je),Gt=function(o){w(t,o);var i=m(t);function t(){var r;v(this,t);for(var e=arguments.length,a=new Array(e),n=0;n<e;n++)a[n]=arguments[n];return r=i.call.apply(i,[this].concat(a)),s(c(r),"priority",$t),s(c(r),"subPriority",-1),r}return h(t,[{key:"set",value:function(e,a){if(a.timestampIsSet)return e;var n=new Date(0);return n.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),n.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),n}}]),t}(Je),p=function(){function o(){v(this,o),s(this,"incompatibleTokens",void 0),s(this,"priority",void 0),s(this,"subPriority",void 0)}return h(o,[{key:"run",value:function(t,r,e,a){var n=this.parse(t,r,e,a);return n?{setter:new Ft(n.value,this.validate,this.set,this.priority,this.subPriority),rest:n.rest}:null}},{key:"validate",value:function(t,r,e){return!0}}]),o}(),Bt=function(o){w(t,o);var i=m(t);function t(){var r;v(this,t);for(var e=arguments.length,a=new Array(e),n=0;n<e;n++)a[n]=arguments[n];return r=i.call.apply(i,[this].concat(a)),s(c(r),"priority",140),s(c(r),"incompatibleTokens",["R","u","t","T"]),r}return h(t,[{key:"parse",value:function(e,a,n){switch(a){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});case"GGGG":default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}}},{key:"set",value:function(e,a,n){return a.era=n,e.setUTCFullYear(n,0,1),e.setUTCHours(0,0,0,0),e}}]),t}(p),P={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}/},Q={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(o,i){return o&&{value:i(o.value),rest:o.rest}}function D(o,i){var t=i.match(o);return t?{value:parseInt(t[0],10),rest:i.slice(t[0].length)}:null}function $(o,i){var t=i.match(o);if(!t)return null;if(t[0]==="Z")return{value:0,rest:i.slice(1)};var r=t[1]==="+"?1:-1,e=t[2]?parseInt(t[2],10):0,a=t[3]?parseInt(t[3],10):0,n=t[5]?parseInt(t[5],10):0;return{value:r*(e*ft+a*lt+n*dt),rest:i.slice(t[0].length)}}function et(o){return D(P.anyDigitsSigned,o)}function x(o,i){switch(o){case 1:return D(P.singleDigit,i);case 2:return D(P.twoDigits,i);case 3:return D(P.threeDigits,i);case 4:return D(P.fourDigits,i);default:return D(new RegExp("^\\d{1,"+o+"}"),i)}}function we(o,i){switch(o){case 1:return D(P.singleDigitSigned,i);case 2:return D(P.twoDigitsSigned,i);case 3:return D(P.threeDigitsSigned,i);case 4:return D(P.fourDigitsSigned,i);default:return D(new RegExp("^-?\\d{1,"+o+"}"),i)}}function Pe(o){switch(o){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 tt(o,i){var t=i>0,r=t?i:1-i,e;if(r<=50)e=o||100;else{var a=r+50,n=Math.floor(a/100)*100,u=o>=a%100;e=o+n-(u?100:0)}return t?e:1-e}function rt(o){return o%400===0||o%4===0&&o%100!==0}var Xt=function(o){w(t,o);var i=m(t);function t(){var r;v(this,t);for(var e=arguments.length,a=new Array(e),n=0;n<e;n++)a[n]=arguments[n];return r=i.call.apply(i,[this].concat(a)),s(c(r),"priority",130),s(c(r),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),r}return h(t,[{key:"parse",value:function(e,a,n){var u=function(f){return{year:f,isTwoDigitYear:a==="yy"}};switch(a){case"y":return M(x(4,e),u);case"yo":return M(n.ordinalNumber(e,{unit:"year"}),u);default:return M(x(a.length,e),u)}}},{key:"validate",value:function(e,a){return a.isTwoDigitYear||a.year>0}},{key:"set",value:function(e,a,n){var u=e.getUTCFullYear();if(n.isTwoDigitYear){var l=tt(n.year,u);return e.setUTCFullYear(l,0,1),e.setUTCHours(0,0,0,0),e}var f=!("era"in a)||a.era===1?n.year:1-n.year;return e.setUTCFullYear(f,0,1),e.setUTCHours(0,0,0,0),e}}]),t}(p),jt=function(o){w(t,o);var i=m(t);function t(){var r;v(this,t);for(var e=arguments.length,a=new Array(e),n=0;n<e;n++)a[n]=arguments[n];return r=i.call.apply(i,[this].concat(a)),s(c(r),"priority",130),s(c(r),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),r}return h(t,[{key:"parse",value:function(e,a,n){var u=function(f){return{year:f,isTwoDigitYear:a==="YY"}};switch(a){case"Y":return M(x(4,e),u);case"Yo":return M(n.ordinalNumber(e,{unit:"year"}),u);default:return M(x(a.length,e),u)}}},{key:"validate",value:function(e,a){return a.isTwoDigitYear||a.year>0}},{key:"set",value:function(e,a,n,u){var l=Oe(e,u);if(n.isTwoDigitYear){var f=tt(n.year,l);return e.setUTCFullYear(f,0,u.firstWeekContainsDate),e.setUTCHours(0,0,0,0),J(e,u)}var T=!("era"in a)||a.era===1?n.year:1-n.year;return e.setUTCFullYear(T,0,u.firstWeekContainsDate),e.setUTCHours(0,0,0,0),J(e,u)}}]),t}(p),St=function(o){w(t,o);var i=m(t);function t(){var r;v(this,t);for(var e=arguments.length,a=new Array(e),n=0;n<e;n++)a[n]=arguments[n];return r=i.call.apply(i,[this].concat(a)),s(c(r),"priority",130),s(c(r),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),r}return h(t,[{key:"parse",value:function(e,a){return we(a==="R"?4:a.length,e)}},{key:"set",value:function(e,a,n){var u=new Date(0);return u.setUTCFullYear(n,0,4),u.setUTCHours(0,0,0,0),te(u)}}]),t}(p),Kt=function(o){w(t,o);var i=m(t);function t(){var r;v(this,t);for(var e=arguments.length,a=new Array(e),n=0;n<e;n++)a[n]=arguments[n];return r=i.call.apply(i,[this].concat(a)),s(c(r),"priority",130),s(c(r),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),r}return h(t,[{key:"parse",value:function(e,a){return we(a==="u"?4:a.length,e)}},{key:"set",value:function(e,a,n){return e.setUTCFullYear(n,0,1),e.setUTCHours(0,0,0,0),e}}]),t}(p),Zt=function(o){w(t,o);var i=m(t);function t(){var r;v(this,t);for(var e=arguments.length,a=new Array(e),n=0;n<e;n++)a[n]=arguments[n];return r=i.call.apply(i,[this].concat(a)),s(c(r),"priority",120),s(c(r),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),r}return h(t,[{key:"parse",value:function(e,a,n){switch(a){case"Q":case"QQ":return x(a.length,e);case"Qo":return n.ordinalNumber(e,{unit:"quarter"});case"QQQ":return n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(e,{width:"wide",context:"formatting"})||n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,a){return a>=1&&a<=4}},{key:"set",value:function(e,a,n){return e.setUTCMonth((n-1)*3,1),e.setUTCHours(0,0,0,0),e}}]),t}(p),Vt=function(o){w(t,o);var i=m(t);function t(){var r;v(this,t);for(var e=arguments.length,a=new Array(e),n=0;n<e;n++)a[n]=arguments[n];return r=i.call.apply(i,[this].concat(a)),s(c(r),"priority",120),s(c(r),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),r}return h(t,[{key:"parse",value:function(e,a,n){switch(a){case"q":case"qq":return x(a.length,e);case"qo":return n.ordinalNumber(e,{unit:"quarter"});case"qqq":return n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(e,{width:"wide",context:"standalone"})||n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,a){return a>=1&&a<=4}},{key:"set",value:function(e,a,n){return e.setUTCMonth((n-1)*3,1),e.setUTCHours(0,0,0,0),e}}]),t}(p),zt=function(o){w(t,o);var i=m(t);function t(){var r;v(this,t);for(var e=arguments.length,a=new Array(e),n=0;n<e;n++)a[n]=arguments[n];return r=i.call.apply(i,[this].concat(a)),s(c(r),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),s(c(r),"priority",110),r}return h(t,[{key:"parse",value:function(e,a,n){var u=function(f){return f-1};switch(a){case"M":return M(D(P.month,e),u);case"MM":return M(x(2,e),u);case"Mo":return M(n.ordinalNumber(e,{unit:"month"}),u);case"MMM":return n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(e,{width:"wide",context:"formatting"})||n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,a){return a>=0&&a<=11}},{key:"set",value:function(e,a,n){return e.setUTCMonth(n,1),e.setUTCHours(0,0,0,0),e}}]),t}(p),Jt=function(o){w(t,o);var i=m(t);function t(){var r;v(this,t);for(var e=arguments.length,a=new Array(e),n=0;n<e;n++)a[n]=arguments[n];return r=i.call.apply(i,[this].concat(a)),s(c(r),"priority",110),s(c(r),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),r}return h(t,[{key:"parse",value:function(e,a,n){var u=function(f){return f-1};switch(a){case"L":return M(D(P.month,e),u);case"LL":return M(x(2,e),u);case"Lo":return M(n.ordinalNumber(e,{unit:"month"}),u);case"LLL":return n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(e,{width:"wide",context:"standalone"})||n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,a){return a>=0&&a<=11}},{key:"set",value:function(e,a,n){return e.setUTCMonth(n,1),e.setUTCHours(0,0,0,0),e}}]),t}(p);function er(o,i,t){d(2,arguments);var r=g(o),e=Y(i),a=Ke(r,t)-e;return r.setUTCDate(r.getUTCDate()-a*7),r}var tr=function(o){w(t,o);var i=m(t);function t(){var r;v(this,t);for(var e=arguments.length,a=new Array(e),n=0;n<e;n++)a[n]=arguments[n];return r=i.call.apply(i,[this].concat(a)),s(c(r),"priority",100),s(c(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),r}return h(t,[{key:"parse",value:function(e,a,n){switch(a){case"w":return D(P.week,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return x(a.length,e)}}},{key:"validate",value:function(e,a){return a>=1&&a<=53}},{key:"set",value:function(e,a,n,u){return J(er(e,n,u),u)}}]),t}(p);function rr(o,i){d(2,arguments);var t=g(o),r=Y(i),e=Se(t)-r;return t.setUTCDate(t.getUTCDate()-e*7),t}var nr=function(o){w(t,o);var i=m(t);function t(){var r;v(this,t);for(var e=arguments.length,a=new Array(e),n=0;n<e;n++)a[n]=arguments[n];return r=i.call.apply(i,[this].concat(a)),s(c(r),"priority",100),s(c(r),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),r}return h(t,[{key:"parse",value:function(e,a,n){switch(a){case"I":return D(P.week,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return x(a.length,e)}}},{key:"validate",value:function(e,a){return a>=1&&a<=53}},{key:"set",value:function(e,a,n){return te(rr(e,n))}}]),t}(p),ar=[31,28,31,30,31,30,31,31,30,31,30,31],ir=[31,29,31,30,31,30,31,31,30,31,30,31],or=function(o){w(t,o);var i=m(t);function t(){var r;v(this,t);for(var e=arguments.length,a=new Array(e),n=0;n<e;n++)a[n]=arguments[n];return r=i.call.apply(i,[this].concat(a)),s(c(r),"priority",90),s(c(r),"subPriority",1),s(c(r),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),r}return h(t,[{key:"parse",value:function(e,a,n){switch(a){case"d":return D(P.date,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return x(a.length,e)}}},{key:"validate",value:function(e,a){var n=e.getUTCFullYear(),u=rt(n),l=e.getUTCMonth();return u?a>=1&&a<=ir[l]:a>=1&&a<=ar[l]}},{key:"set",value:function(e,a,n){return e.setUTCDate(n),e.setUTCHours(0,0,0,0),e}}]),t}(p),ur=function(o){w(t,o);var i=m(t);function t(){var r;v(this,t);for(var e=arguments.length,a=new Array(e),n=0;n<e;n++)a[n]=arguments[n];return r=i.call.apply(i,[this].concat(a)),s(c(r),"priority",90),s(c(r),"subpriority",1),s(c(r),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),r}return h(t,[{key:"parse",value:function(e,a,n){switch(a){case"D":case"DD":return D(P.dayOfYear,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return x(a.length,e)}}},{key:"validate",value:function(e,a){var n=e.getUTCFullYear(),u=rt(n);return u?a>=1&&a<=366:a>=1&&a<=365}},{key:"set",value:function(e,a,n){return e.setUTCMonth(0,n),e.setUTCHours(0,0,0,0),e}}]),t}(p);function Me(o,i,t){var r,e,a,n,u,l,f,T;d(2,arguments);var C=ue(),E=Y((r=(e=(a=(n=t==null?void 0:t.weekStartsOn)!==null&&n!==void 0?n:t==null||(u=t.locale)===null||u===void 0||(l=u.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&a!==void 0?a:C.weekStartsOn)!==null&&e!==void 0?e:(f=C.locale)===null||f===void 0||(T=f.options)===null||T===void 0?void 0:T.weekStartsOn)!==null&&r!==void 0?r:0);if(!(E>=0&&E<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var O=g(o),_=Y(i),L=O.getUTCDay(),H=_%7,A=(H+7)%7,F=(A<E?7:0)+_-L;return O.setUTCDate(O.getUTCDate()+F),O}var sr=function(o){w(t,o);var i=m(t);function t(){var r;v(this,t);for(var e=arguments.length,a=new Array(e),n=0;n<e;n++)a[n]=arguments[n];return r=i.call.apply(i,[this].concat(a)),s(c(r),"priority",90),s(c(r),"incompatibleTokens",["D","i","e","c","t","T"]),r}return h(t,[{key:"parse",value:function(e,a,n){switch(a){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,a){return a>=0&&a<=6}},{key:"set",value:function(e,a,n,u){return e=Me(e,n,u),e.setUTCHours(0,0,0,0),e}}]),t}(p),cr=function(o){w(t,o);var i=m(t);function t(){var r;v(this,t);for(var e=arguments.length,a=new Array(e),n=0;n<e;n++)a[n]=arguments[n];return r=i.call.apply(i,[this].concat(a)),s(c(r),"priority",90),s(c(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),r}return h(t,[{key:"parse",value:function(e,a,n,u){var l=function(T){var C=Math.floor((T-1)/7)*7;return(T+u.weekStartsOn+6)%7+C};switch(a){case"e":case"ee":return M(x(a.length,e),l);case"eo":return M(n.ordinalNumber(e,{unit:"day"}),l);case"eee":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeeee":return n.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,a){return a>=0&&a<=6}},{key:"set",value:function(e,a,n,u){return e=Me(e,n,u),e.setUTCHours(0,0,0,0),e}}]),t}(p),lr=function(o){w(t,o);var i=m(t);function t(){var r;v(this,t);for(var e=arguments.length,a=new Array(e),n=0;n<e;n++)a[n]=arguments[n];return r=i.call.apply(i,[this].concat(a)),s(c(r),"priority",90),s(c(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),r}return h(t,[{key:"parse",value:function(e,a,n,u){var l=function(T){var C=Math.floor((T-1)/7)*7;return(T+u.weekStartsOn+6)%7+C};switch(a){case"c":case"cc":return M(x(a.length,e),l);case"co":return M(n.ordinalNumber(e,{unit:"day"}),l);case"ccc":return n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"ccccc":return n.day(e,{width:"narrow",context:"standalone"});case"cccccc":return n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return n.day(e,{width:"wide",context:"standalone"})||n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,a){return a>=0&&a<=6}},{key:"set",value:function(e,a,n,u){return e=Me(e,n,u),e.setUTCHours(0,0,0,0),e}}]),t}(p);function fr(o,i){d(2,arguments);var t=Y(i);t%7===0&&(t=t-7);var r=1,e=g(o),a=e.getUTCDay(),n=t%7,u=(n+7)%7,l=(u<r?7:0)+t-a;return e.setUTCDate(e.getUTCDate()+l),e}var dr=function(o){w(t,o);var i=m(t);function t(){var r;v(this,t);for(var e=arguments.length,a=new Array(e),n=0;n<e;n++)a[n]=arguments[n];return r=i.call.apply(i,[this].concat(a)),s(c(r),"priority",90),s(c(r),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),r}return h(t,[{key:"parse",value:function(e,a,n){var u=function(f){return f===0?7:f};switch(a){case"i":case"ii":return x(a.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return M(n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),u);case"iiiii":return M(n.day(e,{width:"narrow",context:"formatting"}),u);case"iiiiii":return M(n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),u);case"iiii":default:return M(n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),u)}}},{key:"validate",value:function(e,a){return a>=1&&a<=7}},{key:"set",value:function(e,a,n){return e=fr(e,n),e.setUTCHours(0,0,0,0),e}}]),t}(p),vr=function(o){w(t,o);var i=m(t);function t(){var r;v(this,t);for(var e=arguments.length,a=new Array(e),n=0;n<e;n++)a[n]=arguments[n];return r=i.call.apply(i,[this].concat(a)),s(c(r),"priority",80),s(c(r),"incompatibleTokens",["b","B","H","k","t","T"]),r}return h(t,[{key:"parse",value:function(e,a,n){switch(a){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,a,n){return e.setUTCHours(Pe(n),0,0,0),e}}]),t}(p),hr=function(o){w(t,o);var i=m(t);function t(){var r;v(this,t);for(var e=arguments.length,a=new Array(e),n=0;n<e;n++)a[n]=arguments[n];return r=i.call.apply(i,[this].concat(a)),s(c(r),"priority",80),s(c(r),"incompatibleTokens",["a","B","H","k","t","T"]),r}return h(t,[{key:"parse",value:function(e,a,n){switch(a){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,a,n){return e.setUTCHours(Pe(n),0,0,0),e}}]),t}(p),wr=function(o){w(t,o);var i=m(t);function t(){var r;v(this,t);for(var e=arguments.length,a=new Array(e),n=0;n<e;n++)a[n]=arguments[n];return r=i.call.apply(i,[this].concat(a)),s(c(r),"priority",80),s(c(r),"incompatibleTokens",["a","b","t","T"]),r}return h(t,[{key:"parse",value:function(e,a,n){switch(a){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,a,n){return e.setUTCHours(Pe(n),0,0,0),e}}]),t}(p),mr=function(o){w(t,o);var i=m(t);function t(){var r;v(this,t);for(var e=arguments.length,a=new Array(e),n=0;n<e;n++)a[n]=arguments[n];return r=i.call.apply(i,[this].concat(a)),s(c(r),"priority",70),s(c(r),"incompatibleTokens",["H","K","k","t","T"]),r}return h(t,[{key:"parse",value:function(e,a,n){switch(a){case"h":return D(P.hour12h,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return x(a.length,e)}}},{key:"validate",value:function(e,a){return a>=1&&a<=12}},{key:"set",value:function(e,a,n){var u=e.getUTCHours()>=12;return u&&n<12?e.setUTCHours(n+12,0,0,0):!u&&n===12?e.setUTCHours(0,0,0,0):e.setUTCHours(n,0,0,0),e}}]),t}(p),gr=function(o){w(t,o);var i=m(t);function t(){var r;v(this,t);for(var e=arguments.length,a=new Array(e),n=0;n<e;n++)a[n]=arguments[n];return r=i.call.apply(i,[this].concat(a)),s(c(r),"priority",70),s(c(r),"incompatibleTokens",["a","b","h","K","k","t","T"]),r}return h(t,[{key:"parse",value:function(e,a,n){switch(a){case"H":return D(P.hour23h,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return x(a.length,e)}}},{key:"validate",value:function(e,a){return a>=0&&a<=23}},{key:"set",value:function(e,a,n){return e.setUTCHours(n,0,0,0),e}}]),t}(p),pr=function(o){w(t,o);var i=m(t);function t(){var r;v(this,t);for(var e=arguments.length,a=new Array(e),n=0;n<e;n++)a[n]=arguments[n];return r=i.call.apply(i,[this].concat(a)),s(c(r),"priority",70),s(c(r),"incompatibleTokens",["h","H","k","t","T"]),r}return h(t,[{key:"parse",value:function(e,a,n){switch(a){case"K":return D(P.hour11h,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return x(a.length,e)}}},{key:"validate",value:function(e,a){return a>=0&&a<=11}},{key:"set",value:function(e,a,n){var u=e.getUTCHours()>=12;return u&&n<12?e.setUTCHours(n+12,0,0,0):e.setUTCHours(n,0,0,0),e}}]),t}(p),yr=function(o){w(t,o);var i=m(t);function t(){var r;v(this,t);for(var e=arguments.length,a=new Array(e),n=0;n<e;n++)a[n]=arguments[n];return r=i.call.apply(i,[this].concat(a)),s(c(r),"priority",70),s(c(r),"incompatibleTokens",["a","b","h","H","K","t","T"]),r}return h(t,[{key:"parse",value:function(e,a,n){switch(a){case"k":return D(P.hour24h,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return x(a.length,e)}}},{key:"validate",value:function(e,a){return a>=1&&a<=24}},{key:"set",value:function(e,a,n){var u=n<=24?n%24:n;return e.setUTCHours(u,0,0,0),e}}]),t}(p),Tr=function(o){w(t,o);var i=m(t);function t(){var r;v(this,t);for(var e=arguments.length,a=new Array(e),n=0;n<e;n++)a[n]=arguments[n];return r=i.call.apply(i,[this].concat(a)),s(c(r),"priority",60),s(c(r),"incompatibleTokens",["t","T"]),r}return h(t,[{key:"parse",value:function(e,a,n){switch(a){case"m":return D(P.minute,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return x(a.length,e)}}},{key:"validate",value:function(e,a){return a>=0&&a<=59}},{key:"set",value:function(e,a,n){return e.setUTCMinutes(n,0,0),e}}]),t}(p),br=function(o){w(t,o);var i=m(t);function t(){var r;v(this,t);for(var e=arguments.length,a=new Array(e),n=0;n<e;n++)a[n]=arguments[n];return r=i.call.apply(i,[this].concat(a)),s(c(r),"priority",50),s(c(r),"incompatibleTokens",["t","T"]),r}return h(t,[{key:"parse",value:function(e,a,n){switch(a){case"s":return D(P.second,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return x(a.length,e)}}},{key:"validate",value:function(e,a){return a>=0&&a<=59}},{key:"set",value:function(e,a,n){return e.setUTCSeconds(n,0),e}}]),t}(p),Dr=function(o){w(t,o);var i=m(t);function t(){var r;v(this,t);for(var e=arguments.length,a=new Array(e),n=0;n<e;n++)a[n]=arguments[n];return r=i.call.apply(i,[this].concat(a)),s(c(r),"priority",30),s(c(r),"incompatibleTokens",["t","T"]),r}return h(t,[{key:"parse",value:function(e,a){var n=function(l){return Math.floor(l*Math.pow(10,-a.length+3))};return M(x(a.length,e),n)}},{key:"set",value:function(e,a,n){return e.setUTCMilliseconds(n),e}}]),t}(p),Cr=function(o){w(t,o);var i=m(t);function t(){var r;v(this,t);for(var e=arguments.length,a=new Array(e),n=0;n<e;n++)a[n]=arguments[n];return r=i.call.apply(i,[this].concat(a)),s(c(r),"priority",10),s(c(r),"incompatibleTokens",["t","T","x"]),r}return h(t,[{key:"parse",value:function(e,a){switch(a){case"X":return $(Q.basicOptionalMinutes,e);case"XX":return $(Q.basic,e);case"XXXX":return $(Q.basicOptionalSeconds,e);case"XXXXX":return $(Q.extendedOptionalSeconds,e);case"XXX":default:return $(Q.extended,e)}}},{key:"set",value:function(e,a,n){return a.timestampIsSet?e:new Date(e.getTime()-n)}}]),t}(p),xr=function(o){w(t,o);var i=m(t);function t(){var r;v(this,t);for(var e=arguments.length,a=new Array(e),n=0;n<e;n++)a[n]=arguments[n];return r=i.call.apply(i,[this].concat(a)),s(c(r),"priority",10),s(c(r),"incompatibleTokens",["t","T","X"]),r}return h(t,[{key:"parse",value:function(e,a){switch(a){case"x":return $(Q.basicOptionalMinutes,e);case"xx":return $(Q.basic,e);case"xxxx":return $(Q.basicOptionalSeconds,e);case"xxxxx":return $(Q.extendedOptionalSeconds,e);case"xxx":default:return $(Q.extended,e)}}},{key:"set",value:function(e,a,n){return a.timestampIsSet?e:new Date(e.getTime()-n)}}]),t}(p),Or=function(o){w(t,o);var i=m(t);function t(){var r;v(this,t);for(var e=arguments.length,a=new Array(e),n=0;n<e;n++)a[n]=arguments[n];return r=i.call.apply(i,[this].concat(a)),s(c(r),"priority",40),s(c(r),"incompatibleTokens","*"),r}return h(t,[{key:"parse",value:function(e){return et(e)}},{key:"set",value:function(e,a,n){return[new Date(n*1e3),{timestampIsSet:!0}]}}]),t}(p),Pr=function(o){w(t,o);var i=m(t);function t(){var r;v(this,t);for(var e=arguments.length,a=new Array(e),n=0;n<e;n++)a[n]=arguments[n];return r=i.call.apply(i,[this].concat(a)),s(c(r),"priority",20),s(c(r),"incompatibleTokens","*"),r}return h(t,[{key:"parse",value:function(e){return et(e)}},{key:"set",value:function(e,a,n){return[new Date(n),{timestampIsSet:!0}]}}]),t}(p),Mr={G:new Bt,y:new Xt,Y:new jt,R:new St,u:new Kt,Q:new Zt,q:new Vt,M:new zt,L:new Jt,w:new tr,I:new nr,d:new or,D:new ur,E:new sr,e:new cr,c:new lr,i:new dr,a:new vr,b:new hr,B:new wr,h:new mr,H:new gr,K:new pr,k:new yr,m:new Tr,s:new br,S:new Dr,X:new Cr,x:new xr,t:new Or,T:new Pr},kr=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ur=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Yr=/^'([^]*?)'?$/,Er=/''/g,_r=/\S/,Nr=/[a-zA-Z]/;function Hr(o,i,t,r){var e,a,n,u,l,f,T,C,E,O,_,L,H,A,F,K,Z,re;d(3,arguments);var N=String(o),R=String(i),G=ue(),X=(e=(a=r==null?void 0:r.locale)!==null&&a!==void 0?a:G.locale)!==null&&e!==void 0?e:$e;if(!X.match)throw new RangeError("locale must contain match property");var j=Y((n=(u=(l=(f=r==null?void 0:r.firstWeekContainsDate)!==null&&f!==void 0?f:r==null||(T=r.locale)===null||T===void 0||(C=T.options)===null||C===void 0?void 0:C.firstWeekContainsDate)!==null&&l!==void 0?l:G.firstWeekContainsDate)!==null&&u!==void 0?u:(E=G.locale)===null||E===void 0||(O=E.options)===null||O===void 0?void 0:O.firstWeekContainsDate)!==null&&n!==void 0?n:1);if(!(j>=1&&j<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var ne=Y((_=(L=(H=(A=r==null?void 0:r.weekStartsOn)!==null&&A!==void 0?A:r==null||(F=r.locale)===null||F===void 0||(K=F.options)===null||K===void 0?void 0:K.weekStartsOn)!==null&&H!==void 0?H:G.weekStartsOn)!==null&&L!==void 0?L:(Z=G.locale)===null||Z===void 0||(re=Z.options)===null||re===void 0?void 0:re.weekStartsOn)!==null&&_!==void 0?_:0);if(!(ne>=0&&ne<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(R==="")return N===""?g(t):new Date(NaN);var ae={firstWeekContainsDate:j,weekStartsOn:ne,locale:X},ie=[new Gt],ge=R.match(Ur).map(function(k){var b=k[0];if(b in be){var q=be[b];return q(k,X.formatLong)}return k}).join("").match(kr),U=[],I=qe(ge),V;try{var it=function(){var b=V.value;!(r!=null&&r.useAdditionalWeekYearTokens)&&ze(b)&&de(b,R,o),!(r!=null&&r.useAdditionalDayOfYearTokens)&&Ve(b)&&de(b,R,o);var q=b[0],le=Mr[q];if(le){var Ne=le.incompatibleTokens;if(Array.isArray(Ne)){var He=U.find(function(Ie){return Ne.includes(Ie.token)||Ie.token===q});if(He)throw new RangeError("The format string mustn't contain `".concat(He.fullToken,"` and `").concat(b,"` at the same time"))}else if(le.incompatibleTokens==="*"&&U.length>0)throw new RangeError("The format string mustn't contain `".concat(b,"` and any other token at the same time"));U.push({token:q,fullToken:b});var ye=le.run(N,b,X.match,ae);if(!ye)return{v:new Date(NaN)};ie.push(ye.setter),N=ye.rest}else{if(q.match(Nr))throw new RangeError("Format string contains an unescaped latin alphabet character `"+q+"`");if(b==="''"?b="'":q==="'"&&(b=Ir(b)),N.indexOf(b)===0)N=N.slice(b.length);else return{v:new Date(NaN)}}};for(I.s();!(V=I.n()).done;){var Ue=it();if(Ce(Ue)==="object")return Ue.v}}catch(k){I.e(k)}finally{I.f()}if(N.length>0&&_r.test(N))return new Date(NaN);var ot=ie.map(function(k){return k.priority}).sort(function(k,b){return b-k}).filter(function(k,b,q){return q.indexOf(k)===b}).map(function(k){return ie.filter(function(b){return b.priority===k}).sort(function(b,q){return q.subPriority-b.subPriority})}).map(function(k){return k[0]}),pe=g(t);if(isNaN(pe.getTime()))return new Date(NaN);var oe=Xe(pe,Fe(pe)),Ye={},se=qe(ot),Ee;try{for(se.s();!(Ee=se.n()).done;){var _e=Ee.value;if(!_e.validate(oe,ae))return new Date(NaN);var ce=_e.set(oe,Ye,ae);Array.isArray(ce)?(oe=ce[0],Wt(Ye,ce[1])):oe=ce}}catch(k){se.e(k)}finally{se.f()}return oe}function Ir(o){return o.match(Yr)[1].replace(Er,"'")}function ke(o,i){d(2,arguments);var t=g(o),r=g(i);return t.getFullYear()===r.getFullYear()&&t.getMonth()===r.getMonth()}function nt(o,i){d(2,arguments);var t=Le(o),r=Le(i);return t.getTime()===r.getTime()}function at(o,i){d(2,arguments);var t=g(o),r=g(i);return t.getFullYear()===r.getFullYear()}const qr=1901,Br=40,Wr={date:vt,month:ke,year:at,quarter:nt};function B(o,i,t){const r=Wr[t];return Array.isArray(o)?o.some(e=>r(e,i)):r(o,i)}function Te(o,i,t,r){let e=!1,a=!1,n=!1;Array.isArray(t)&&(t[0]<o&&o<t[1]&&(e=!0),B(t[0],o,"date")&&(a=!0),B(t[1],o,"date")&&(n=!0));const u=t!==null&&(Array.isArray(t)?B(t[0],o,"date")||B(t[1],o,"date"):B(t,o,"date"));return{type:"date",dateObject:{date:Lt(o),month:ve(o),year:me(o)},inCurrentMonth:ke(o,i),isCurrentDate:B(r,o,"date"),inSpan:e,startOfSpan:a,endOfSpan:n,selected:u,ts:W(o)}}function Lr(o,i,t){return{type:"month",dateObject:{month:ve(o),year:me(o)},isCurrent:ke(t,o),selected:i!==null&&B(i,o,"month"),ts:W(o)}}function Ar(o,i,t){return{type:"year",dateObject:{year:me(o)},isCurrent:at(t,o),selected:i!==null&&B(i,o,"year"),ts:W(o)}}function Rr(o,i,t){return{type:"quarter",dateObject:{quarter:wt(o),year:me(o)},isCurrent:nt(t,o),selected:i!==null&&B(i,o,"quarter"),ts:W(o)}}function Xr(o,i,t,r,e=!1){const a=ve(o);let n=W(mt(o)),u=W(fe(n,-1));const l=[];let f=!e;for(;At(u)!==r||f;)l.unshift(Te(u,o,i,t)),u=W(fe(u,-1)),f=!1;for(;ve(n)===a;)l.push(Te(n,o,i,t)),n=W(fe(n,1));const T=e?l.length<=28?28:l.length<=35?35:42:42;for(;l.length<T;)l.push(Te(n,o,i,t)),n=W(fe(n,1));return l}function jr(o,i,t){const r=[],e=Be(o);for(let a=0;a<12;a++)r.push(Lr(W(xe(e,a)),i,t));return r}function Sr(o,i,t){const r=[],e=Be(o);for(let a=0;a<4;a++)r.push(Rr(W(st(e,a)),i,t));return r}function Kr(o,i){const t=[],r=new Date(qr,0,1);for(let e=0;e<200;e++)t.push(Ar(W(ct(r,e)),o,i));return t}function Zr(o,i,t,r){const e=Hr(o,i,t,r);return Ge(e)?It(e,i,r)===o?e:new Date(NaN):e}function Vr(o){if(o===void 0)return;if(typeof o=="number")return o;const[i,t,r]=o.split(":");return{hours:Number(i),minutes:Number(t),seconds:Number(r)}}function zr(o,i){return Array.isArray(o)?o[i==="start"?0:1]:null}export{Br as M,qr as S,We as a,ve as b,xe as c,Xr as d,Zr as e,It as f,me as g,W as h,Ge as i,ke as j,Lt as k,Vr as l,jr as m,ct as n,Be as o,Le as p,Sr as q,zr as r,mt as s,Kr as y};