iobroker.javascript
Version:
Rules Engine for ioBroker
1 lines • 154 kB
JavaScript
import{j as u}from"./jsx-runtime-C1csJtRx.js";import{C as g,a as K}from"./ConfigCustomJavascriptSet__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__-DaN0pfsw.js";import{C as w}from"./ConfigCustomJavascriptSet__loadShare___mf_0_mui_mf_1_material__loadShare__-BqzgglHd.js";import{C as Ve,a as Xe}from"./ConfigCustomJavascriptSet__mf_v__runtimeInit__mf_v__-jdUmHa_i.js";import{C as z,R as fe}from"./ConfigCustomJavascriptSet__loadShare__react__loadShare__-BNbscXK6.js";import"./ConfigCustomJavascriptSet__loadShare__react_mf_2_dom__loadShare__-N2_tx_mJ.js";import{T as wt}from"./ThemeProvider-C50pIiW4.js";import{_ as yt}from"./DefaultPropsProvider-DfdXSIBu.js";import"./_commonjsHelpers-CE1G-McA.js";import"./createTheme-Bm92JF8u.js";import"./index-Df6OaCxx.js";import"./useTheme-Cgjfsi-1.js";import"./useEnhancedEffect-aUb-5tTL.js";const Je=6048e5,bt=864e5,Qe=6e4,Be=36e5,vt=1e3,je=Symbol.for("constructDateFrom");function P(a,e){return typeof a=="function"?a(e):a&&typeof a=="object"&&je in a?a[je](e):a instanceof Date?new a.constructor(e):new Date(e)}function l(a,e){return P(e||a,a)}function se(a,e,t){const n=l(a,t==null?void 0:t.in);return isNaN(e)?P((t==null?void 0:t.in)||a,NaN):(e&&n.setDate(n.getDate()+e),n)}function Ue(a,e,t){return P(a,+l(a)+e)}function pt(a,e,t){return Ue(a,e*1e3)}function Mt(a,e,t){const n=l(a,t==null?void 0:t.in);return n.setTime(n.getTime()+e*Qe),n}function Pt(a,e,t){return Ue(a,e*Be)}function xt(a,e,t){return se(a,e*7,t)}function Ke(a,e,t){const n=l(a,t==null?void 0:t.in);if(isNaN(e))return P(a,NaN);if(!e)return n;const r=n.getDate(),i=P(a,n.getTime());i.setMonth(n.getMonth()+e+1,0);const o=i.getDate();return r>=o?i:(n.setFullYear(i.getFullYear(),i.getMonth(),r),n)}function kt(a,e,t){return Ke(a,e*12,t)}function Ee(a,e){const t=l(a,e==null?void 0:e.in);return t.setHours(23,59,59,999),t}let Wt={};function X(){return Wt}function Dt(a,e){var s,h,f,M;const t=X(),n=(e==null?void 0:e.weekStartsOn)??((h=(s=e==null?void 0:e.locale)==null?void 0:s.options)==null?void 0:h.weekStartsOn)??t.weekStartsOn??((M=(f=t.locale)==null?void 0:f.options)==null?void 0:M.weekStartsOn)??0,r=l(a,e==null?void 0:e.in),i=r.getDay(),o=(i<n?-7:0)+6-(i-n);return r.setDate(r.getDate()+o),r.setHours(23,59,59,999),r}function Ne(a,e){const t=l(a,e==null?void 0:e.in),n=t.getFullYear();return t.setFullYear(n+1,0,0),t.setHours(23,59,59,999),t}const Tt={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"}},Ct=(a,e,t)=>{let n;const r=Tt[a];return typeof r=="string"?n=r:e===1?n=r.one:n=r.other.replace("{{count}}",e.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+n:n+" ago":n};function y(a){return(e={})=>{const t=e.width?String(e.width):a.defaultWidth;return a.formats[t]||a.formats[a.defaultWidth]}}const $t={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},zt={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},jt={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Et={date:y({formats:$t,defaultWidth:"full"}),time:y({formats:zt,defaultWidth:"full"}),dateTime:y({formats:jt,defaultWidth:"full"})},Nt={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Ot=(a,e,t,n)=>Nt[a];function d(a){return(e,t)=>{const n=t!=null&&t.context?String(t.context):"standalone";let r;if(n==="formatting"&&a.formattingValues){const o=a.defaultFormattingWidth||a.defaultWidth,s=t!=null&&t.width?String(t.width):o;r=a.formattingValues[s]||a.formattingValues[o]}else{const o=a.defaultWidth,s=t!=null&&t.width?String(t.width):a.defaultWidth;r=a.values[s]||a.values[o]}const i=a.argumentCallback?a.argumentCallback(e):e;return r[i]}}const St={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Lt={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Ht={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"]},At={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"]},Yt={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"}},Ft={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"}},_t=(a,e)=>{const t=Number(a),n=t%100;if(n>20||n<10)switch(n%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},It={ordinalNumber:_t,era:d({values:St,defaultWidth:"wide"}),quarter:d({values:Lt,defaultWidth:"wide",argumentCallback:a=>a-1}),month:d({values:Ht,defaultWidth:"wide"}),day:d({values:At,defaultWidth:"wide"}),dayPeriod:d({values:Yt,defaultWidth:"wide",formattingValues:Ft,defaultFormattingWidth:"wide"})};function c(a){return(e,t={})=>{const n=t.width,r=n&&a.matchPatterns[n]||a.matchPatterns[a.defaultMatchWidth],i=e.match(r);if(!i)return null;const o=i[0],s=n&&a.parsePatterns[n]||a.parsePatterns[a.defaultParseWidth],h=Array.isArray(s)?Gt(s,j=>j.test(o)):qt(s,j=>j.test(o));let f;f=a.valueCallback?a.valueCallback(h):h,f=t.valueCallback?t.valueCallback(f):f;const M=e.slice(o.length);return{value:f,rest:M}}}function qt(a,e){for(const t in a)if(Object.prototype.hasOwnProperty.call(a,t)&&e(a[t]))return t}function Gt(a,e){for(let t=0;t<a.length;t++)if(e(a[t]))return t}function L(a){return(e,t={})=>{const n=e.match(a.matchPattern);if(!n)return null;const r=n[0],i=e.match(a.parsePattern);if(!i)return null;let o=a.valueCallback?a.valueCallback(i[0]):i[0];o=t.valueCallback?t.valueCallback(o):o;const s=e.slice(r.length);return{value:o,rest:s}}}const Rt=/^(\d+)(th|st|nd|rd)?/i,Vt=/\d+/i,Xt={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},Jt={any:[/^b/i,/^(a|c)/i]},Qt={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]},Ut={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},Kt={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]},Zt={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},en={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]},tn={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},nn={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}},an={ordinalNumber:L({matchPattern:Rt,parsePattern:Vt,valueCallback:a=>parseInt(a,10)}),era:c({matchPatterns:Xt,defaultMatchWidth:"wide",parsePatterns:Jt,defaultParseWidth:"any"}),quarter:c({matchPatterns:Qt,defaultMatchWidth:"wide",parsePatterns:Bt,defaultParseWidth:"any",valueCallback:a=>a+1}),month:c({matchPatterns:Ut,defaultMatchWidth:"wide",parsePatterns:Kt,defaultParseWidth:"any"}),day:c({matchPatterns:Zt,defaultMatchWidth:"wide",parsePatterns:en,defaultParseWidth:"any"}),dayPeriod:c({matchPatterns:tn,defaultMatchWidth:"any",parsePatterns:nn,defaultParseWidth:"any"})},ue={code:"en-US",formatDistance:Ct,formatLong:Et,formatRelative:Ot,localize:It,match:an,options:{weekStartsOn:0,firstWeekContainsDate:1}};function re(a){const e=l(a),t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+a-+t}function U(a,...e){const t=P.bind(null,a||e.find(n=>typeof n=="object"));return e.map(t)}function te(a,e){const t=l(a,e==null?void 0:e.in);return t.setHours(0,0,0,0),t}function rn(a,e,t){const[n,r]=U(t==null?void 0:t.in,a,e),i=te(n),o=te(r),s=+i-re(i),h=+o-re(o);return Math.round((s-h)/bt)}function Ze(a,e){const t=l(a,e==null?void 0:e.in);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}function on(a,e){const t=l(a,e==null?void 0:e.in);return rn(t,Ze(t))+1}function H(a,e){var s,h,f,M;const t=X(),n=(e==null?void 0:e.weekStartsOn)??((h=(s=e==null?void 0:e.locale)==null?void 0:s.options)==null?void 0:h.weekStartsOn)??t.weekStartsOn??((M=(f=t.locale)==null?void 0:f.options)==null?void 0:M.weekStartsOn)??0,r=l(a,e==null?void 0:e.in),i=r.getDay(),o=(i<n?7:0)+i-n;return r.setDate(r.getDate()-o),r.setHours(0,0,0,0),r}function B(a,e){return H(a,{...e,weekStartsOn:1})}function et(a,e){const t=l(a,e==null?void 0:e.in),n=t.getFullYear(),r=P(t,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const i=B(r),o=P(t,0);o.setFullYear(n,0,4),o.setHours(0,0,0,0);const s=B(o);return t.getTime()>=i.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function sn(a,e){const t=et(a,e),n=P(a,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),B(n)}function tt(a,e){const t=l(a,e==null?void 0:e.in),n=+B(t)-+sn(t);return Math.round(n/Je)+1}function be(a,e){var M,j,D,m;const t=l(a,e==null?void 0:e.in),n=t.getFullYear(),r=X(),i=(e==null?void 0:e.firstWeekContainsDate)??((j=(M=e==null?void 0:e.locale)==null?void 0:M.options)==null?void 0:j.firstWeekContainsDate)??r.firstWeekContainsDate??((m=(D=r.locale)==null?void 0:D.options)==null?void 0:m.firstWeekContainsDate)??1,o=P((e==null?void 0:e.in)||a,0);o.setFullYear(n+1,0,i),o.setHours(0,0,0,0);const s=H(o,e),h=P((e==null?void 0:e.in)||a,0);h.setFullYear(n,0,i),h.setHours(0,0,0,0);const f=H(h,e);return+t>=+s?n+1:+t>=+f?n:n-1}function un(a,e){var s,h,f,M;const t=X(),n=(e==null?void 0:e.firstWeekContainsDate)??((h=(s=e==null?void 0:e.locale)==null?void 0:s.options)==null?void 0:h.firstWeekContainsDate)??t.firstWeekContainsDate??((M=(f=t.locale)==null?void 0:f.options)==null?void 0:M.firstWeekContainsDate)??1,r=be(a,e),i=P((e==null?void 0:e.in)||a,0);return i.setFullYear(r,0,n),i.setHours(0,0,0,0),H(i,e)}function ve(a,e){const t=l(a,e==null?void 0:e.in),n=+H(t,e)-+un(t,e);return Math.round(n/Je)+1}function p(a,e){const t=a<0?"-":"",n=Math.abs(a).toString().padStart(e,"0");return t+n}const I={y(a,e){const t=a.getFullYear(),n=t>0?t:1-t;return p(e==="yy"?n%100:n,e.length)},M(a,e){const t=a.getMonth();return e==="M"?String(t+1):p(t+1,2)},d(a,e){return p(a.getDate(),e.length)},a(a,e){const t=a.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(a,e){return p(a.getHours()%12||12,e.length)},H(a,e){return p(a.getHours(),e.length)},m(a,e){return p(a.getMinutes(),e.length)},s(a,e){return p(a.getSeconds(),e.length)},S(a,e){const t=e.length,n=a.getMilliseconds(),r=Math.trunc(n*Math.pow(10,t-3));return p(r,e.length)}},Q={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Oe={G:function(a,e,t){const n=a.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return t.era(n,{width:"abbreviated"});case"GGGGG":return t.era(n,{width:"narrow"});case"GGGG":default:return t.era(n,{width:"wide"})}},y:function(a,e,t){if(e==="yo"){const n=a.getFullYear(),r=n>0?n:1-n;return t.ordinalNumber(r,{unit:"year"})}return I.y(a,e)},Y:function(a,e,t,n){const r=be(a,n),i=r>0?r:1-r;if(e==="YY"){const o=i%100;return p(o,2)}return e==="Yo"?t.ordinalNumber(i,{unit:"year"}):p(i,e.length)},R:function(a,e){const t=et(a);return p(t,e.length)},u:function(a,e){const t=a.getFullYear();return p(t,e.length)},Q:function(a,e,t){const n=Math.ceil((a.getMonth()+1)/3);switch(e){case"Q":return String(n);case"QQ":return p(n,2);case"Qo":return t.ordinalNumber(n,{unit:"quarter"});case"QQQ":return t.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(n,{width:"wide",context:"formatting"})}},q:function(a,e,t){const n=Math.ceil((a.getMonth()+1)/3);switch(e){case"q":return String(n);case"qq":return p(n,2);case"qo":return t.ordinalNumber(n,{unit:"quarter"});case"qqq":return t.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(n,{width:"wide",context:"standalone"})}},M:function(a,e,t){const n=a.getMonth();switch(e){case"M":case"MM":return I.M(a,e);case"Mo":return t.ordinalNumber(n+1,{unit:"month"});case"MMM":return t.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(n,{width:"wide",context:"formatting"})}},L:function(a,e,t){const n=a.getMonth();switch(e){case"L":return String(n+1);case"LL":return p(n+1,2);case"Lo":return t.ordinalNumber(n+1,{unit:"month"});case"LLL":return t.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(n,{width:"wide",context:"standalone"})}},w:function(a,e,t,n){const r=ve(a,n);return e==="wo"?t.ordinalNumber(r,{unit:"week"}):p(r,e.length)},I:function(a,e,t){const n=tt(a);return e==="Io"?t.ordinalNumber(n,{unit:"week"}):p(n,e.length)},d:function(a,e,t){return e==="do"?t.ordinalNumber(a.getDate(),{unit:"date"}):I.d(a,e)},D:function(a,e,t){const n=on(a);return e==="Do"?t.ordinalNumber(n,{unit:"dayOfYear"}):p(n,e.length)},E:function(a,e,t){const n=a.getDay();switch(e){case"E":case"EE":case"EEE":return t.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(n,{width:"short",context:"formatting"});case"EEEE":default:return t.day(n,{width:"wide",context:"formatting"})}},e:function(a,e,t,n){const r=a.getDay(),i=(r-n.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return p(i,2);case"eo":return t.ordinalNumber(i,{unit:"day"});case"eee":return t.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(r,{width:"short",context:"formatting"});case"eeee":default:return t.day(r,{width:"wide",context:"formatting"})}},c:function(a,e,t,n){const r=a.getDay(),i=(r-n.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return p(i,e.length);case"co":return t.ordinalNumber(i,{unit:"day"});case"ccc":return t.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(r,{width:"narrow",context:"standalone"});case"cccccc":return t.day(r,{width:"short",context:"standalone"});case"cccc":default:return t.day(r,{width:"wide",context:"standalone"})}},i:function(a,e,t){const n=a.getDay(),r=n===0?7:n;switch(e){case"i":return String(r);case"ii":return p(r,e.length);case"io":return t.ordinalNumber(r,{unit:"day"});case"iii":return t.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(n,{width:"short",context:"formatting"});case"iiii":default:return t.day(n,{width:"wide",context:"formatting"})}},a:function(a,e,t){const r=a.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(a,e,t){const n=a.getHours();let r;switch(n===12?r=Q.noon:n===0?r=Q.midnight:r=n/12>=1?"pm":"am",e){case"b":case"bb":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(a,e,t){const n=a.getHours();let r;switch(n>=17?r=Q.evening:n>=12?r=Q.afternoon:n>=4?r=Q.morning:r=Q.night,e){case"B":case"BB":case"BBB":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(a,e,t){if(e==="ho"){let n=a.getHours()%12;return n===0&&(n=12),t.ordinalNumber(n,{unit:"hour"})}return I.h(a,e)},H:function(a,e,t){return e==="Ho"?t.ordinalNumber(a.getHours(),{unit:"hour"}):I.H(a,e)},K:function(a,e,t){const n=a.getHours()%12;return e==="Ko"?t.ordinalNumber(n,{unit:"hour"}):p(n,e.length)},k:function(a,e,t){let n=a.getHours();return n===0&&(n=24),e==="ko"?t.ordinalNumber(n,{unit:"hour"}):p(n,e.length)},m:function(a,e,t){return e==="mo"?t.ordinalNumber(a.getMinutes(),{unit:"minute"}):I.m(a,e)},s:function(a,e,t){return e==="so"?t.ordinalNumber(a.getSeconds(),{unit:"second"}):I.s(a,e)},S:function(a,e){return I.S(a,e)},X:function(a,e,t){const n=a.getTimezoneOffset();if(n===0)return"Z";switch(e){case"X":return Le(n);case"XXXX":case"XX":return V(n);case"XXXXX":case"XXX":default:return V(n,":")}},x:function(a,e,t){const n=a.getTimezoneOffset();switch(e){case"x":return Le(n);case"xxxx":case"xx":return V(n);case"xxxxx":case"xxx":default:return V(n,":")}},O:function(a,e,t){const n=a.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Se(n,":");case"OOOO":default:return"GMT"+V(n,":")}},z:function(a,e,t){const n=a.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Se(n,":");case"zzzz":default:return"GMT"+V(n,":")}},t:function(a,e,t){const n=Math.trunc(+a/1e3);return p(n,e.length)},T:function(a,e,t){return p(+a,e.length)}};function Se(a,e=""){const t=a>0?"-":"+",n=Math.abs(a),r=Math.trunc(n/60),i=n%60;return i===0?t+String(r):t+String(r)+e+p(i,2)}function Le(a,e){return a%60===0?(a>0?"-":"+")+p(Math.abs(a)/60,2):V(a,e)}function V(a,e=""){const t=a>0?"-":"+",n=Math.abs(a),r=p(Math.trunc(n/60),2),i=p(n%60,2);return t+r+e+i}const He=(a,e)=>{switch(a){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},nt=(a,e)=>{switch(a){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},dn=(a,e)=>{const t=a.match(/(P+)(p+)?/)||[],n=t[1],r=t[2];if(!r)return He(a,e);let i;switch(n){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"});break}return i.replace("{{date}}",He(n,e)).replace("{{time}}",nt(r,e))},ie={p:nt,P:dn},cn=/^D+$/,ln=/^Y+$/,mn=["D","DD","YY","YYYY"];function at(a){return cn.test(a)}function rt(a){return ln.test(a)}function ge(a,e,t){const n=hn(a,e,t);if(console.warn(n),mn.includes(a))throw new RangeError(n)}function hn(a,e,t){const n=a[0]==="Y"?"years":"days of the month";return`Use \`${a.toLowerCase()}\` instead of \`${a}\` (in \`${e}\`) for formatting ${n} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}function fn(a){return a instanceof Date||typeof a=="object"&&Object.prototype.toString.call(a)==="[object Date]"}function it(a){return!(!fn(a)&&typeof a!="number"||isNaN(+l(a)))}const gn=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,wn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,yn=/^'([^]*?)'?$/,bn=/''/g,vn=/[a-zA-Z]/;function pn(a,e,t){var M,j,D,m,S,G,R,_;const n=X(),r=(t==null?void 0:t.locale)??n.locale??ue,i=(t==null?void 0:t.firstWeekContainsDate)??((j=(M=t==null?void 0:t.locale)==null?void 0:M.options)==null?void 0:j.firstWeekContainsDate)??n.firstWeekContainsDate??((m=(D=n.locale)==null?void 0:D.options)==null?void 0:m.firstWeekContainsDate)??1,o=(t==null?void 0:t.weekStartsOn)??((G=(S=t==null?void 0:t.locale)==null?void 0:S.options)==null?void 0:G.weekStartsOn)??n.weekStartsOn??((_=(R=n.locale)==null?void 0:R.options)==null?void 0:_.weekStartsOn)??0,s=l(a,t==null?void 0:t.in);if(!it(s))throw new RangeError("Invalid time value");let h=e.match(wn).map(T=>{const E=T[0];if(E==="p"||E==="P"){const J=ie[E];return J(T,r.formatLong)}return T}).join("").match(gn).map(T=>{if(T==="''")return{isToken:!1,value:"'"};const E=T[0];if(E==="'")return{isToken:!1,value:Mn(T)};if(Oe[E])return{isToken:!0,value:T};if(E.match(vn))throw new RangeError("Format string contains an unescaped latin alphabet character `"+E+"`");return{isToken:!1,value:T}});r.localize.preprocessor&&(h=r.localize.preprocessor(s,h));const f={firstWeekContainsDate:i,weekStartsOn:o,locale:r};return h.map(T=>{if(!T.isToken)return T.value;const E=T.value;(!(t!=null&&t.useAdditionalWeekYearTokens)&&rt(E)||!(t!=null&&t.useAdditionalDayOfYearTokens)&&at(E))&&ge(E,e,String(a));const J=Oe[E[0]];return J(s,E,r.localize,f)}).join("")}function Mn(a){const e=a.match(yn);return e?e[1].replace(bn,"'"):a}function Pn(a,e){return l(a,e==null?void 0:e.in).getDate()}function ot(a,e){const t=l(a,e==null?void 0:e.in),n=t.getFullYear(),r=t.getMonth(),i=P(t,0);return i.setFullYear(n,r+1,0),i.setHours(0,0,0,0),i.getDate()}function xn(a,e){return l(a,e==null?void 0:e.in).getHours()}function kn(a,e){return l(a,e==null?void 0:e.in).getMinutes()}function Wn(a,e){return l(a,e==null?void 0:e.in).getMonth()}function Dn(a){return l(a).getSeconds()}function Tn(a){return l(a).getMilliseconds()}function Cn(a,e){return l(a,e==null?void 0:e.in).getFullYear()}function ce(a,e){return+l(a)>+l(e)}function le(a,e){return+l(a)<+l(e)}function $n(a,e){return+l(a)==+l(e)}function zn(a,e,t){const[n,r]=U(t==null?void 0:t.in,a,e);return+te(n)==+te(r)}function jn(a,e,t){const[n,r]=U(t==null?void 0:t.in,a,e);return n.getFullYear()===r.getFullYear()}function En(a,e,t){const[n,r]=U(t==null?void 0:t.in,a,e);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function Ae(a,e){const t=l(a,e==null?void 0:e.in);return t.setMinutes(0,0,0),t}function Nn(a,e,t){const[n,r]=U(t==null?void 0:t.in,a,e);return+Ae(n)==+Ae(r)}function On(){return Object.assign({},X())}function Sn(a,e){const t=Ln(e)?new e(0):P(e,0);return t.setFullYear(a.getFullYear(),a.getMonth(),a.getDate()),t.setHours(a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds()),t}function Ln(a){var e;return typeof a=="function"&&((e=a.prototype)==null?void 0:e.constructor)===a}const Hn=10;class st{subPriority=0;validate(e,t){return!0}}class An extends st{constructor(e,t,n,r,i){super(),this.value=e,this.validateValue=t,this.setValue=n,this.priority=r,i&&(this.subPriority=i)}validate(e,t){return this.validateValue(e,this.value,t)}set(e,t,n){return this.setValue(e,t,this.value,n)}}class Yn extends st{priority=Hn;subPriority=-1;constructor(e,t){super(),this.context=e||(n=>P(t,n))}set(e,t){return t.timestampIsSet?e:P(e,Sn(e,this.context))}}class v{run(e,t,n,r){const i=this.parse(e,t,n,r);return i?{setter:new An(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(e,t,n){return!0}}class Fn extends v{priority=140;parse(e,t,n){switch(t){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"})}}set(e,t,n){return t.era=n,e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["R","u","t","T"]}const C={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 $(a,e){return a&&{value:e(a.value),rest:a.rest}}function x(a,e){const t=e.match(a);return t?{value:parseInt(t[0],10),rest:e.slice(t[0].length)}:null}function F(a,e){const t=e.match(a);if(!t)return null;if(t[0]==="Z")return{value:0,rest:e.slice(1)};const n=t[1]==="+"?1:-1,r=t[2]?parseInt(t[2],10):0,i=t[3]?parseInt(t[3],10):0,o=t[5]?parseInt(t[5],10):0;return{value:n*(r*Be+i*Qe+o*vt),rest:e.slice(t[0].length)}}function ut(a){return x(C.anyDigitsSigned,a)}function W(a,e){switch(a){case 1:return x(C.singleDigit,e);case 2:return x(C.twoDigits,e);case 3:return x(C.threeDigits,e);case 4:return x(C.fourDigits,e);default:return x(new RegExp("^\\d{1,"+a+"}"),e)}}function oe(a,e){switch(a){case 1:return x(C.singleDigitSigned,e);case 2:return x(C.twoDigitsSigned,e);case 3:return x(C.threeDigitsSigned,e);case 4:return x(C.fourDigitsSigned,e);default:return x(new RegExp("^-?\\d{1,"+a+"}"),e)}}function pe(a){switch(a){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 dt(a,e){const t=e>0,n=t?e:1-e;let r;if(n<=50)r=a||100;else{const i=n+50,o=Math.trunc(i/100)*100,s=a>=i%100;r=a+o-(s?100:0)}return t?r:1-r}function ct(a){return a%400===0||a%4===0&&a%100!==0}class _n extends v{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(e,t,n){const r=i=>({year:i,isTwoDigitYear:t==="yy"});switch(t){case"y":return $(W(4,e),r);case"yo":return $(n.ordinalNumber(e,{unit:"year"}),r);default:return $(W(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n){const r=e.getFullYear();if(n.isTwoDigitYear){const o=dt(n.year,r);return e.setFullYear(o,0,1),e.setHours(0,0,0,0),e}const i=!("era"in t)||t.era===1?n.year:1-n.year;return e.setFullYear(i,0,1),e.setHours(0,0,0,0),e}}class In extends v{priority=130;parse(e,t,n){const r=i=>({year:i,isTwoDigitYear:t==="YY"});switch(t){case"Y":return $(W(4,e),r);case"Yo":return $(n.ordinalNumber(e,{unit:"year"}),r);default:return $(W(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n,r){const i=be(e,r);if(n.isTwoDigitYear){const s=dt(n.year,i);return e.setFullYear(s,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),H(e,r)}const o=!("era"in t)||t.era===1?n.year:1-n.year;return e.setFullYear(o,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),H(e,r)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class qn extends v{priority=130;parse(e,t){return oe(t==="R"?4:t.length,e)}set(e,t,n){const r=P(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),B(r)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class Gn extends v{priority=130;parse(e,t){return oe(t==="u"?4:t.length,e)}set(e,t,n){return e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class Rn extends v{priority=120;parse(e,t,n){switch(t){case"Q":case"QQ":return W(t.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"})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth((n-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class Vn extends v{priority=120;parse(e,t,n){switch(t){case"q":case"qq":return W(t.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"})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth((n-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class Xn extends v{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(e,t,n){const r=i=>i-1;switch(t){case"M":return $(x(C.month,e),r);case"MM":return $(W(2,e),r);case"Mo":return $(n.ordinalNumber(e,{unit:"month"}),r);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"})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}}class Jn extends v{priority=110;parse(e,t,n){const r=i=>i-1;switch(t){case"L":return $(x(C.month,e),r);case"LL":return $(W(2,e),r);case"Lo":return $(n.ordinalNumber(e,{unit:"month"}),r);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"})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function Qn(a,e,t){const n=l(a,t==null?void 0:t.in),r=ve(n,t)-e;return n.setDate(n.getDate()-r*7),l(n,t==null?void 0:t.in)}class Bn extends v{priority=100;parse(e,t,n){switch(t){case"w":return x(C.week,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return W(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n,r){return H(Qn(e,n,r),r)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function Un(a,e,t){const n=l(a,t==null?void 0:t.in),r=tt(n,t)-e;return n.setDate(n.getDate()-r*7),n}class Kn extends v{priority=100;parse(e,t,n){switch(t){case"I":return x(C.week,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return W(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n){return B(Un(e,n))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const Zn=[31,28,31,30,31,30,31,31,30,31,30,31],ea=[31,29,31,30,31,30,31,31,30,31,30,31];class ta extends v{priority=90;subPriority=1;parse(e,t,n){switch(t){case"d":return x(C.date,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return W(t.length,e)}}validate(e,t){const n=e.getFullYear(),r=ct(n),i=e.getMonth();return r?t>=1&&t<=ea[i]:t>=1&&t<=Zn[i]}set(e,t,n){return e.setDate(n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class na extends v{priority=90;subpriority=1;parse(e,t,n){switch(t){case"D":case"DD":return x(C.dayOfYear,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return W(t.length,e)}}validate(e,t){const n=e.getFullYear();return ct(n)?t>=1&&t<=366:t>=1&&t<=365}set(e,t,n){return e.setMonth(0,n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function Me(a,e,t){var j,D,m,S;const n=X(),r=(t==null?void 0:t.weekStartsOn)??((D=(j=t==null?void 0:t.locale)==null?void 0:j.options)==null?void 0:D.weekStartsOn)??n.weekStartsOn??((S=(m=n.locale)==null?void 0:m.options)==null?void 0:S.weekStartsOn)??0,i=l(a,t==null?void 0:t.in),o=i.getDay(),h=(e%7+7)%7,f=7-r,M=e<0||e>6?e-(o+f)%7:(h+f)%7-(o+f)%7;return se(i,M,t)}class aa extends v{priority=90;parse(e,t,n){switch(t){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"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return e=Me(e,n,r),e.setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]}class ra extends v{priority=90;parse(e,t,n,r){const i=o=>{const s=Math.floor((o-1)/7)*7;return(o+r.weekStartsOn+6)%7+s};switch(t){case"e":case"ee":return $(W(t.length,e),i);case"eo":return $(n.ordinalNumber(e,{unit:"day"}),i);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"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return e=Me(e,n,r),e.setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class ia extends v{priority=90;parse(e,t,n,r){const i=o=>{const s=Math.floor((o-1)/7)*7;return(o+r.weekStartsOn+6)%7+s};switch(t){case"c":case"cc":return $(W(t.length,e),i);case"co":return $(n.ordinalNumber(e,{unit:"day"}),i);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"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return e=Me(e,n,r),e.setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function oa(a,e){const t=l(a,e==null?void 0:e.in).getDay();return t===0?7:t}function sa(a,e,t){const n=l(a,t==null?void 0:t.in),r=oa(n,t),i=e-r;return se(n,i,t)}class ua extends v{priority=90;parse(e,t,n){const r=i=>i===0?7:i;switch(t){case"i":case"ii":return W(t.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return $(n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiii":return $(n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiiii":return $(n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);case"iiii":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"}),r)}}validate(e,t){return t>=1&&t<=7}set(e,t,n){return e=sa(e,n),e.setHours(0,0,0,0),e}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class da extends v{priority=80;parse(e,t,n){switch(t){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"})}}set(e,t,n){return e.setHours(pe(n),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]}class ca extends v{priority=80;parse(e,t,n){switch(t){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"})}}set(e,t,n){return e.setHours(pe(n),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]}class la extends v{priority=80;parse(e,t,n){switch(t){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"})}}set(e,t,n){return e.setHours(pe(n),0,0,0),e}incompatibleTokens=["a","b","t","T"]}class ma extends v{priority=70;parse(e,t,n){switch(t){case"h":return x(C.hour12h,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return W(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,n){const r=e.getHours()>=12;return r&&n<12?e.setHours(n+12,0,0,0):!r&&n===12?e.setHours(0,0,0,0):e.setHours(n,0,0,0),e}incompatibleTokens=["H","K","k","t","T"]}class ha extends v{priority=70;parse(e,t,n){switch(t){case"H":return x(C.hour23h,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return W(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,n){return e.setHours(n,0,0,0),e}incompatibleTokens=["a","b","h","K","k","t","T"]}class fa extends v{priority=70;parse(e,t,n){switch(t){case"K":return x(C.hour11h,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return W(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.getHours()>=12&&n<12?e.setHours(n+12,0,0,0):e.setHours(n,0,0,0),e}incompatibleTokens=["h","H","k","t","T"]}class ga extends v{priority=70;parse(e,t,n){switch(t){case"k":return x(C.hour24h,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return W(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,n){const r=n<=24?n%24:n;return e.setHours(r,0,0,0),e}incompatibleTokens=["a","b","h","H","K","t","T"]}class wa extends v{priority=60;parse(e,t,n){switch(t){case"m":return x(C.minute,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return W(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setMinutes(n,0,0),e}incompatibleTokens=["t","T"]}class ya extends v{priority=50;parse(e,t,n){switch(t){case"s":return x(C.second,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return W(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setSeconds(n,0),e}incompatibleTokens=["t","T"]}class ba extends v{priority=30;parse(e,t){const n=r=>Math.trunc(r*Math.pow(10,-t.length+3));return $(W(t.length,e),n)}set(e,t,n){return e.setMilliseconds(n),e}incompatibleTokens=["t","T"]}class va extends v{priority=10;parse(e,t){switch(t){case"X":return F(Y.basicOptionalMinutes,e);case"XX":return F(Y.basic,e);case"XXXX":return F(Y.basicOptionalSeconds,e);case"XXXXX":return F(Y.extendedOptionalSeconds,e);case"XXX":default:return F(Y.extended,e)}}set(e,t,n){return t.timestampIsSet?e:P(e,e.getTime()-re(e)-n)}incompatibleTokens=["t","T","x"]}class pa extends v{priority=10;parse(e,t){switch(t){case"x":return F(Y.basicOptionalMinutes,e);case"xx":return F(Y.basic,e);case"xxxx":return F(Y.basicOptionalSeconds,e);case"xxxxx":return F(Y.extendedOptionalSeconds,e);case"xxx":default:return F(Y.extended,e)}}set(e,t,n){return t.timestampIsSet?e:P(e,e.getTime()-re(e)-n)}incompatibleTokens=["t","T","X"]}class Ma extends v{priority=40;parse(e){return ut(e)}set(e,t,n){return[P(e,n*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class Pa extends v{priority=20;parse(e){return ut(e)}set(e,t,n){return[P(e,n),{timestampIsSet:!0}]}incompatibleTokens="*"}const xa={G:new Fn,y:new _n,Y:new In,R:new qn,u:new Gn,Q:new Rn,q:new Vn,M:new Xn,L:new Jn,w:new Bn,I:new Kn,d:new ta,D:new na,E:new aa,e:new ra,c:new ia,i:new ua,a:new da,b:new ca,B:new la,h:new ma,H:new ha,K:new fa,k:new ga,m:new wa,s:new ya,S:new ba,X:new va,x:new pa,t:new Ma,T:new Pa},ka=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Wa=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Da=/^'([^]*?)'?$/,Ta=/''/g,Ca=/\S/,$a=/[a-zA-Z]/;function za(a,e,t,n){var R,_,T,E,J,We,De,Te;const r=()=>P((n==null?void 0:n.in)||t,NaN),i=On(),o=(n==null?void 0:n.locale)??i.locale??ue,s=(n==null?void 0:n.firstWeekContainsDate)??((_=(R=n==null?void 0:n.locale)==null?void 0:R.options)==null?void 0:_.firstWeekContainsDate)??i.firstWeekContainsDate??((E=(T=i.locale)==null?void 0:T.options)==null?void 0:E.firstWeekContainsDate)??1,h=(n==null?void 0:n.weekStartsOn)??((We=(J=n==null?void 0:n.locale)==null?void 0:J.options)==null?void 0:We.weekStartsOn)??i.weekStartsOn??((Te=(De=i.locale)==null?void 0:De.options)==null?void 0:Te.weekStartsOn)??0;if(!e)return a?r():l(t,n==null?void 0:n.in);const f={firstWeekContainsDate:s,weekStartsOn:h,locale:o},M=[new Yn(n==null?void 0:n.in,t)],j=e.match(Wa).map(b=>{const k=b[0];if(k in ie){const A=ie[k];return A(b,o.formatLong)}return b}).join("").match(ka),D=[];for(let b of j){!(n!=null&&n.useAdditionalWeekYearTokens)&&rt(b)&&ge(b,e,a),!(n!=null&&n.useAdditionalDayOfYearTokens)&&at(b)&&ge(b,e,a);const k=b[0],A=xa[k];if(A){const{incompatibleTokens:Ce}=A;if(Array.isArray(Ce)){const $e=D.find(ze=>Ce.includes(ze.token)||ze.token===k);if($e)throw new RangeError(`The format string mustn't contain \`${$e.fullToken}\` and \`${b}\` at the same time`)}else if(A.incompatibleTokens==="*"&&D.length>0)throw new RangeError(`The format string mustn't contain \`${b}\` and any other token at the same time`);D.push({token:k,fullToken:b});const de=A.run(a,b,o.match,f);if(!de)return r();M.push(de.setter),a=de.rest}else{if(k.match($a))throw new RangeError("Format string contains an unescaped latin alphabet character `"+k+"`");if(b==="''"?b="'":k==="'"&&(b=ja(b)),a.indexOf(b)===0)a=a.slice(b.length);else return r()}}if(a.length>0&&Ca.test(a))return r();const m=M.map(b=>b.priority).sort((b,k)=>k-b).filter((b,k,A)=>A.indexOf(b)===k).map(b=>M.filter(k=>k.priority===b).sort((k,A)=>A.subPriority-k.subPriority)).map(b=>b[0]);let S=l(t,n==null?void 0:n.in);if(isNaN(+S))return r();const G={};for(const b of m){if(!b.validate(S,f))return r();const k=b.set(S,G,f);Array.isArray(k)?(S=k[0],Object.assign(G,k[1])):S=k}return S}function ja(a){return a.match(Da)[1].replace(Ta,"'")}function Ea(a,e,t){const n=l(a,t==null?void 0:t.in);return n.setDate(e),n}function Na(a,e,t){const n=l(a,t==null?void 0:t.in);return n.setHours(e),n}function Oa(a,e,t){const n=l(a,t==null?void 0:t.in);return n.setMinutes(e),n}function Sa(a,e,t){const n=l(a,t==null?void 0:t.in),r=n.getFullYear(),i=n.getDate(),o=P(a,0);o.setFullYear(r,e,15),o.setHours(0,0,0,0);const s=ot(o);return n.setMonth(e,Math.min(i,s)),n}function La(a,e,t){const n=l(a,t==null?void 0:t.in);return n.setSeconds(e),n}function Ha(a,e,t){const n=l(a,t==null?void 0:t.in);return n.setMilliseconds(e),n}function Aa(a,e,t){const n=l(a,t==null?void 0:t.in);return isNaN(+n)?P(a,NaN):(n.setFullYear(e),n)}function Ya(a,e){const t=l(a,e==null?void 0:e.in);return t.setDate(1),t.setHours(0,0,0,0),t}function Fa(a,e){const t=l(a,e==null?void 0:e.in),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function _a(a,e,t){const n=+l(a,t==null?void 0:t.in),[r,i]=[+l(e.start,t==null?void 0:t.in),+l(e.end,t==null?void 0:t.in)].sort((o,s)=>o-s);return n>=r&&n<=i}const Ia={y:{sectionType:"year",contentType:"digit",maxLength:4},yy:"year",yyy:{sectionType:"year",contentType:"digit",maxLength:4},yyyy:"year",M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMMM:{sectionType:"month",contentType:"letter"},MMM:{sectionType:"month",contentType:"letter"},L:{sectionType:"month",contentType:"digit",maxLength:2},LL:"month",LLL:{sectionType:"month",contentType:"letter"},LLLL:{sectionType:"month",contentType:"letter"},d:{sectionType:"day",contentType:"digit",maxLength:2},dd:"day",do:{sectionType:"day",contentType:"digit-with-letter"},E:{sectionType:"weekDay",contentType:"letter"},EE:{sectionType:"weekDay",contentType:"letter"},EEE:{sectionType:"weekDay",contentType:"letter"},EEEE:{sectionType:"weekDay",contentType:"letter"},EEEEE:{sectionType:"weekDay",contentType:"letter"},i:{sectionType:"weekDay",contentType:"digit",maxLength:1},ii:"weekDay",iii:{sectionType:"weekDay",contentType:"letter"},iiii:{sectionType:"weekDay",contentType:"letter"},e:{sectionType:"weekDay",contentType:"digit",maxLength:1},ee:"weekDay",eee:{sectionType:"weekDay",contentType:"letter"},eeee:{sectionType:"weekDay",contentType:"letter"},eeeee:{sectionType:"weekDay",contentType:"letter"},eeeeee:{sectionType:"weekDay",contentType:"letter"},c:{sectionType:"weekDay",contentType:"digit",maxLength:1},cc:"weekDay",ccc:{sectionType:"weekDay",contentType:"letter"},cccc:{sectionType:"weekDay",contentType:"letter"},ccccc:{sectionType:"weekDay",contentType:"letter"},cccccc:{sectionType:"weekDay",contentType:"letter"},a:"meridiem",aa:"meridiem",aaa:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},qa={year:"yyyy",month:"LLLL",monthShort:"MMM",dayOfMonth:"d",dayOfMonthFull:"do",weekday:"EEEE",weekdayShort:"EEEEEE",hours24h:"HH",hours12h:"hh",meridiem:"aa",minutes:"mm",seconds:"ss",fullDate:"PP",keyboardDate:"P",shortDate:"MMM d",normalDate:"d MMMM",normalDateWithWeekday:"EEE, MMM d",fullTime:"p",fullTime12h:"hh:mm aa",fullTime24h:"HH:mm",keyboardDateTime:"P p",keyboardDateTime12h:"P hh:mm aa",keyboardDateTime24h:"P HH:mm"};class Ga{constructor(e){this.isMUIAdapter=!0,this.isTimezoneCompatible=!1,this.lib=void 0,this.locale=void 0,this.formats=void 0,this.formatTokenMap=Ia,this.escapedCharacters={start:"'",end:"'"},this.longFormatters=void 0,this.date=o=>typeof o>"u"?new Date:o===null?null:new Date(o),this.getInvalidDate=()=>new Date("Invalid Date"),this.getTimezone=()=>"default",this.setTimezone=o=>o,this.toJsDate=o=>o,this.getCurrentLocaleCode=()=>this.locale.code,this.is12HourCycleInCurrentLocale=()=>/a/.test(this.locale.formatLong.time({width:"short"})),this.expandFormat=o=>{const s=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;return o.match(s).map(h=>{const f=h[0];if(f==="p"||f==="P"){const M=this.longFormatters[f];return M(h,this.locale.formatLong)}return h}).join("")},this.formatNumber=o=>o,this.getDayOfWeek=o=>o.getDay()+1;const{locale:t,formats:n,longFormatters:r,lib:i}=e;this.locale=t,this.formats=yt({},qa,n),this.longFormatters=r,this.lib=i||"date-fns"}}class Ra extends Ga{constructor({locale:e,formats:t}={}){super({locale:e??ue,formats:t,longFormatters:ie}),this.parse=(n,r)=>n===""?null:za(n,r,new Date,{locale:this.locale}),this.isValid=n=>n==null?!1:it(n),this.format=(n,r)=>this.formatByString(n,this.formats[r]),this.formatByString=(n,r)=>pn(n,r,{locale:this.locale}),this.isEqual=(n,r)=>n===null&&r===null?!0:n===null||r===null?!1:$n(n,r),this.isSameYear=(n,r)=>jn(n,r),this.isSameMonth=(n,r)=>En(n,r),this.isSameDay=(n,r)=>zn(n,r),this.isSameHour=(n,r)=>Nn(n,r),this.isAfter=(n,r)=>ce(n,r),this.isAfterYear=(n,r)=>ce(n,Ne(r)),this.isAfterDay=(n,r)=>ce(n,Ee(r)),this.isBefore=(n,r)=>le(n,r),this.isBeforeYear=(n,r)=>le(n,this.startOfYear(r)),this.isBeforeDay=(n,r)=>le(n,this.startOfDay(r)),this.isWithinRange=(n,[r,i])=>_a(n,{start:r,end:i}),this.startOfYear=n=>Ze(n),thi