iBet uBet web content aggregator. Adding the entire web to your favor.
iBet uBet web content aggregator. Adding the entire web to your favor.



Link to original content: http://retty.me/_nuxt/date-BYBoZiPG.js
var Ne=Object.defineProperty;var Ye=(n,s,e)=>s in n?Ne(n,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[s]=e;var o=(n,s,e)=>Ye(n,typeof s!="symbol"?s+"":s,e);import{g as fe,t as Y,a3 as T,a5 as Ie,a6 as Oe,a7 as Pe,a8 as ke,v as Z,a9 as we,aa as _e,ab as He,c as he,ac as pe,ad as Ee,ae as S,af as Le,ag as ee,ah as Ce,f as qe,W as R}from"./client-BmVmnFEC.js";function ye(){return Object.assign({},fe())}function ze(n){let e=Y(n).getDay();return e===0&&(e=7),e}function ve(n,s){const e=s instanceof Date?T(s,0):new s(0);return e.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),e.setHours(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),e}const Fe=10;class me{constructor(){o(this,"subPriority",0)}validate(s,e){return!0}}class $e extends me{constructor(s,e,t,r,a){super(),this.value=s,this.validateValue=e,this.setValue=t,this.priority=r,a&&(this.subPriority=a)}validate(s,e){return this.validateValue(s,this.value,e)}set(s,e,t){return this.setValue(s,e,this.value,t)}}class Ze extends me{constructor(){super(...arguments);o(this,"priority",Fe);o(this,"subPriority",-1)}set(e,t){return t.timestampIsSet?e:T(e,ve(e,Date))}}class u{run(s,e,t,r){const a=this.parse(s,e,t,r);return a?{setter:new $e(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}validate(s,e,t){return!0}}class Re extends u{constructor(){super(...arguments);o(this,"priority",140);o(this,"incompatibleTokens",["R","u","t","T"])}parse(e,t,r){switch(t){case"G":case"GG":case"GGG":return r.era(e,{width:"abbreviated"})||r.era(e,{width:"narrow"});case"GGGGG":return r.era(e,{width:"narrow"});case"GGGG":default:return r.era(e,{width:"wide"})||r.era(e,{width:"abbreviated"})||r.era(e,{width:"narrow"})}}set(e,t,r){return t.era=r,e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}}const 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}/},D={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 y(n,s){return n&&{value:s(n.value),rest:n.rest}}function d(n,s){const e=s.match(n);return e?{value:parseInt(e[0],10),rest:s.slice(e[0].length)}:null}function g(n,s){const e=s.match(n);if(!e)return null;if(e[0]==="Z")return{value:0,rest:s.slice(1)};const t=e[1]==="+"?1:-1,r=e[2]?parseInt(e[2],10):0,a=e[3]?parseInt(e[3],10):0,i=e[5]?parseInt(e[5],10):0;return{value:t*(r*Ie+a*Oe+i*Pe),rest:s.slice(e[0].length)}}function xe(n){return d(p.anyDigitsSigned,n)}function h(n,s){switch(n){case 1:return d(p.singleDigit,s);case 2:return d(p.twoDigits,s);case 3:return d(p.threeDigits,s);case 4:return d(p.fourDigits,s);default:return d(new RegExp("^\\d{1,"+n+"}"),s)}}function H(n,s){switch(n){case 1:return d(p.singleDigitSigned,s);case 2:return d(p.twoDigitsSigned,s);case 3:return d(p.threeDigitsSigned,s);case 4:return d(p.fourDigitsSigned,s);default:return d(new RegExp("^-?\\d{1,"+n+"}"),s)}}function Q(n){switch(n){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Te(n,s){const e=s>0,t=e?s:1-s;let r;if(t<=50)r=n||100;else{const a=t+50,i=Math.trunc(a/100)*100,l=n>=a%100;r=n+i-(l?100:0)}return e?r:1-r}function be(n){return n%400===0||n%4===0&&n%100!==0}class We extends u{constructor(){super(...arguments);o(this,"priority",130);o(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(e,t,r){const a=i=>({year:i,isTwoDigitYear:t==="yy"});switch(t){case"y":return y(h(4,e),a);case"yo":return y(r.ordinalNumber(e,{unit:"year"}),a);default:return y(h(t.length,e),a)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,r){const a=e.getFullYear();if(r.isTwoDigitYear){const l=Te(r.year,a);return e.setFullYear(l,0,1),e.setHours(0,0,0,0),e}const i=!("era"in t)||t.era===1?r.year:1-r.year;return e.setFullYear(i,0,1),e.setHours(0,0,0,0),e}}class Qe extends u{constructor(){super(...arguments);o(this,"priority",130);o(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(e,t,r){const a=i=>({year:i,isTwoDigitYear:t==="YY"});switch(t){case"Y":return y(h(4,e),a);case"Yo":return y(r.ordinalNumber(e,{unit:"year"}),a);default:return y(h(t.length,e),a)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,r,a){const i=ke(e,a);if(r.isTwoDigitYear){const f=Te(r.year,i);return e.setFullYear(f,0,a.firstWeekContainsDate),e.setHours(0,0,0,0),Z(e,a)}const l=!("era"in t)||t.era===1?r.year:1-r.year;return e.setFullYear(l,0,a.firstWeekContainsDate),e.setHours(0,0,0,0),Z(e,a)}}class Ue extends u{constructor(){super(...arguments);o(this,"priority",130);o(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(e,t){return H(t==="R"?4:t.length,e)}set(e,t,r){const a=T(e,0);return a.setFullYear(r,0,4),a.setHours(0,0,0,0),we(a)}}class Xe extends u{constructor(){super(...arguments);o(this,"priority",130);o(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(e,t){return H(t==="u"?4:t.length,e)}set(e,t,r){return e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}}class Ae extends u{constructor(){super(...arguments);o(this,"priority",120);o(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,t,r){switch(t){case"Q":case"QQ":return h(t.length,e);case"Qo":return r.ordinalNumber(e,{unit:"quarter"});case"QQQ":return r.quarter(e,{width:"abbreviated",context:"formatting"})||r.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(e,{width:"wide",context:"formatting"})||r.quarter(e,{width:"abbreviated",context:"formatting"})||r.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=1&&t<=4}set(e,t,r){return e.setMonth((r-1)*3,1),e.setHours(0,0,0,0),e}}class Ge extends u{constructor(){super(...arguments);o(this,"priority",120);o(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,t,r){switch(t){case"q":case"qq":return h(t.length,e);case"qo":return r.ordinalNumber(e,{unit:"quarter"});case"qqq":return r.quarter(e,{width:"abbreviated",context:"standalone"})||r.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(e,{width:"wide",context:"standalone"})||r.quarter(e,{width:"abbreviated",context:"standalone"})||r.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=1&&t<=4}set(e,t,r){return e.setMonth((r-1)*3,1),e.setHours(0,0,0,0),e}}class Be extends u{constructor(){super(...arguments);o(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);o(this,"priority",110)}parse(e,t,r){const a=i=>i-1;switch(t){case"M":return y(d(p.month,e),a);case"MM":return y(h(2,e),a);case"Mo":return y(r.ordinalNumber(e,{unit:"month"}),a);case"MMM":return r.month(e,{width:"abbreviated",context:"formatting"})||r.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(e,{width:"wide",context:"formatting"})||r.month(e,{width:"abbreviated",context:"formatting"})||r.month(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=11}set(e,t,r){return e.setMonth(r,1),e.setHours(0,0,0,0),e}}class je extends u{constructor(){super(...arguments);o(this,"priority",110);o(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(e,t,r){const a=i=>i-1;switch(t){case"L":return y(d(p.month,e),a);case"LL":return y(h(2,e),a);case"Lo":return y(r.ordinalNumber(e,{unit:"month"}),a);case"LLL":return r.month(e,{width:"abbreviated",context:"standalone"})||r.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(e,{width:"wide",context:"standalone"})||r.month(e,{width:"abbreviated",context:"standalone"})||r.month(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=11}set(e,t,r){return e.setMonth(r,1),e.setHours(0,0,0,0),e}}function Ke(n,s,e){const t=Y(n),r=_e(t,e)-s;return t.setDate(t.getDate()-r*7),t}class Ve extends u{constructor(){super(...arguments);o(this,"priority",100);o(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(e,t,r){switch(t){case"w":return d(p.week,e);case"wo":return r.ordinalNumber(e,{unit:"week"});default:return h(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,r,a){return Z(Ke(e,r,a),a)}}function Je(n,s){const e=Y(n),t=He(e)-s;return e.setDate(e.getDate()-t*7),e}class Se extends u{constructor(){super(...arguments);o(this,"priority",100);o(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(e,t,r){switch(t){case"I":return d(p.week,e);case"Io":return r.ordinalNumber(e,{unit:"week"});default:return h(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,r){return we(Je(e,r))}}const et=[31,28,31,30,31,30,31,31,30,31,30,31],tt=[31,29,31,30,31,30,31,31,30,31,30,31];class rt extends u{constructor(){super(...arguments);o(this,"priority",90);o(this,"subPriority",1);o(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(e,t,r){switch(t){case"d":return d(p.date,e);case"do":return r.ordinalNumber(e,{unit:"date"});default:return h(t.length,e)}}validate(e,t){const r=e.getFullYear(),a=be(r),i=e.getMonth();return a?t>=1&&t<=tt[i]:t>=1&&t<=et[i]}set(e,t,r){return e.setDate(r),e.setHours(0,0,0,0),e}}class nt extends u{constructor(){super(...arguments);o(this,"priority",90);o(this,"subpriority",1);o(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(e,t,r){switch(t){case"D":case"DD":return d(p.dayOfYear,e);case"Do":return r.ordinalNumber(e,{unit:"date"});default:return h(t.length,e)}}validate(e,t){const r=e.getFullYear();return be(r)?t>=1&&t<=366:t>=1&&t<=365}set(e,t,r){return e.setMonth(0,r),e.setHours(0,0,0,0),e}}function U(n,s,e){var I,_,N,P;const t=fe(),r=(e==null?void 0:e.weekStartsOn)??((_=(I=e==null?void 0:e.locale)==null?void 0:I.options)==null?void 0:_.weekStartsOn)??t.weekStartsOn??((P=(N=t.locale)==null?void 0:N.options)==null?void 0:P.weekStartsOn)??0,a=Y(n),i=a.getDay(),f=(s%7+7)%7,m=7-r,L=s<0||s>6?s-(i+m)%7:(f+m)%7-(i+m)%7;return he(a,L)}class st extends u{constructor(){super(...arguments);o(this,"priority",90);o(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(e,t,r){switch(t){case"E":case"EE":case"EEE":return r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,r,a){return e=U(e,r,a),e.setHours(0,0,0,0),e}}class at extends u{constructor(){super(...arguments);o(this,"priority",90);o(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(e,t,r,a){const i=l=>{const f=Math.floor((l-1)/7)*7;return(l+a.weekStartsOn+6)%7+f};switch(t){case"e":case"ee":return y(h(t.length,e),i);case"eo":return y(r.ordinalNumber(e,{unit:"day"}),i);case"eee":return r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"eeeee":return r.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,r,a){return e=U(e,r,a),e.setHours(0,0,0,0),e}}class ot extends u{constructor(){super(...arguments);o(this,"priority",90);o(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(e,t,r,a){const i=l=>{const f=Math.floor((l-1)/7)*7;return(l+a.weekStartsOn+6)%7+f};switch(t){case"c":case"cc":return y(h(t.length,e),i);case"co":return y(r.ordinalNumber(e,{unit:"day"}),i);case"ccc":return r.day(e,{width:"abbreviated",context:"standalone"})||r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"});case"ccccc":return r.day(e,{width:"narrow",context:"standalone"});case"cccccc":return r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return r.day(e,{width:"wide",context:"standalone"})||r.day(e,{width:"abbreviated",context:"standalone"})||r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=6}set(e,t,r,a){return e=U(e,r,a),e.setHours(0,0,0,0),e}}function it(n,s){const e=Y(n),t=ze(e),r=s-t;return he(e,r)}class ct extends u{constructor(){super(...arguments);o(this,"priority",90);o(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(e,t,r){const a=i=>i===0?7:i;switch(t){case"i":case"ii":return h(t.length,e);case"io":return r.ordinalNumber(e,{unit:"day"});case"iii":return y(r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),a);case"iiiii":return y(r.day(e,{width:"narrow",context:"formatting"}),a);case"iiiiii":return y(r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),a);case"iiii":default:return y(r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),a)}}validate(e,t){return t>=1&&t<=7}set(e,t,r){return e=it(e,r),e.setHours(0,0,0,0),e}}class ut extends u{constructor(){super(...arguments);o(this,"priority",80);o(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(e,t,r){switch(t){case"a":case"aa":case"aaa":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,r){return e.setHours(Q(r),0,0,0),e}}class lt extends u{constructor(){super(...arguments);o(this,"priority",80);o(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(e,t,r){switch(t){case"b":case"bb":case"bbb":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,r){return e.setHours(Q(r),0,0,0),e}}class dt extends u{constructor(){super(...arguments);o(this,"priority",80);o(this,"incompatibleTokens",["a","b","t","T"])}parse(e,t,r){switch(t){case"B":case"BB":case"BBB":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,r){return e.setHours(Q(r),0,0,0),e}}class ft extends u{constructor(){super(...arguments);o(this,"priority",70);o(this,"incompatibleTokens",["H","K","k","t","T"])}parse(e,t,r){switch(t){case"h":return d(p.hour12h,e);case"ho":return r.ordinalNumber(e,{unit:"hour"});default:return h(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,r){const a=e.getHours()>=12;return a&&r<12?e.setHours(r+12,0,0,0):!a&&r===12?e.setHours(0,0,0,0):e.setHours(r,0,0,0),e}}class wt extends u{constructor(){super(...arguments);o(this,"priority",70);o(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(e,t,r){switch(t){case"H":return d(p.hour23h,e);case"Ho":return r.ordinalNumber(e,{unit:"hour"});default:return h(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,r){return e.setHours(r,0,0,0),e}}class ht extends u{constructor(){super(...arguments);o(this,"priority",70);o(this,"incompatibleTokens",["h","H","k","t","T"])}parse(e,t,r){switch(t){case"K":return d(p.hour11h,e);case"Ko":return r.ordinalNumber(e,{unit:"hour"});default:return h(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,r){return e.getHours()>=12&&r<12?e.setHours(r+12,0,0,0):e.setHours(r,0,0,0),e}}class pt extends u{constructor(){super(...arguments);o(this,"priority",70);o(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(e,t,r){switch(t){case"k":return d(p.hour24h,e);case"ko":return r.ordinalNumber(e,{unit:"hour"});default:return h(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,r){const a=r<=24?r%24:r;return e.setHours(a,0,0,0),e}}class yt extends u{constructor(){super(...arguments);o(this,"priority",60);o(this,"incompatibleTokens",["t","T"])}parse(e,t,r){switch(t){case"m":return d(p.minute,e);case"mo":return r.ordinalNumber(e,{unit:"minute"});default:return h(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,r){return e.setMinutes(r,0,0),e}}class mt extends u{constructor(){super(...arguments);o(this,"priority",50);o(this,"incompatibleTokens",["t","T"])}parse(e,t,r){switch(t){case"s":return d(p.second,e);case"so":return r.ordinalNumber(e,{unit:"second"});default:return h(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,r){return e.setSeconds(r,0),e}}class xt extends u{constructor(){super(...arguments);o(this,"priority",30);o(this,"incompatibleTokens",["t","T"])}parse(e,t){const r=a=>Math.trunc(a*Math.pow(10,-t.length+3));return y(h(t.length,e),r)}set(e,t,r){return e.setMilliseconds(r),e}}class Tt extends u{constructor(){super(...arguments);o(this,"priority",10);o(this,"incompatibleTokens",["t","T","x"])}parse(e,t){switch(t){case"X":return g(D.basicOptionalMinutes,e);case"XX":return g(D.basic,e);case"XXXX":return g(D.basicOptionalSeconds,e);case"XXXXX":return g(D.extendedOptionalSeconds,e);case"XXX":default:return g(D.extended,e)}}set(e,t,r){return t.timestampIsSet?e:T(e,e.getTime()-pe(e)-r)}}class bt extends u{constructor(){super(...arguments);o(this,"priority",10);o(this,"incompatibleTokens",["t","T","X"])}parse(e,t){switch(t){case"x":return g(D.basicOptionalMinutes,e);case"xx":return g(D.basic,e);case"xxxx":return g(D.basicOptionalSeconds,e);case"xxxxx":return g(D.extendedOptionalSeconds,e);case"xxx":default:return g(D.extended,e)}}set(e,t,r){return t.timestampIsSet?e:T(e,e.getTime()-pe(e)-r)}}class Dt extends u{constructor(){super(...arguments);o(this,"priority",40);o(this,"incompatibleTokens","*")}parse(e){return xe(e)}set(e,t,r){return[T(e,r*1e3),{timestampIsSet:!0}]}}class gt extends u{constructor(){super(...arguments);o(this,"priority",20);o(this,"incompatibleTokens","*")}parse(e){return xe(e)}set(e,t,r){return[T(e,r),{timestampIsSet:!0}]}}const Mt={G:new Re,y:new We,Y:new Qe,R:new Ue,u:new Xe,Q:new Ae,q:new Ge,M:new Be,L:new je,w:new Ve,I:new Se,d:new rt,D:new nt,E:new st,e:new at,c:new ot,i:new ct,a:new ut,b:new lt,B:new dt,h:new ft,H:new wt,K:new ht,k:new pt,m:new yt,s:new mt,S:new xt,X:new Tt,x:new bt,t:new Dt,T:new gt},Nt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Yt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,It=/^'([^]*?)'?$/,Ot=/''/g,Pt=/\S/,kt=/[a-zA-Z]/;function _t(n,s,e,t){var A,G,B,j;const r=ye(),a=r.locale??Ee,i=r.firstWeekContainsDate??((G=(A=r.locale)==null?void 0:A.options)==null?void 0:G.firstWeekContainsDate)??1,l=r.weekStartsOn??((j=(B=r.locale)==null?void 0:B.options)==null?void 0:j.weekStartsOn)??0;if(s==="")return n===""?Y(e):T(e,NaN);const f={firstWeekContainsDate:i,weekStartsOn:l,locale:a},m=[new Ze],L=s.match(Yt).map(c=>{const w=c[0];if(w in S){const b=S[w];return b(c,a.formatLong)}return c}).join("").match(Nt),I=[];for(let c of L){Le(c)&&ee(c,s,n),Ce(c)&&ee(c,s,n);const w=c[0],b=Mt[w];if(b){const{incompatibleTokens:K}=b;if(Array.isArray(K)){const V=I.find(J=>K.includes(J.token)||J.token===w);if(V)throw new RangeError(`The format string mustn't contain \`${V.fullToken}\` and \`${c}\` at the same time`)}else if(b.incompatibleTokens==="*"&&I.length>0)throw new RangeError(`The format string mustn't contain \`${c}\` and any other token at the same time`);I.push({token:w,fullToken:c});const C=b.run(n,c,a.match,f);if(!C)return T(e,NaN);m.push(C.setter),n=C.rest}else{if(w.match(kt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");if(c==="''"?c="'":w==="'"&&(c=Ht(c)),n.indexOf(c)===0)n=n.slice(c.length);else return T(e,NaN)}}if(n.length>0&&Pt.test(n))return T(e,NaN);const _=m.map(c=>c.priority).sort((c,w)=>w-c).filter((c,w,b)=>b.indexOf(c)===w).map(c=>m.filter(w=>w.priority===c).sort((w,b)=>b.subPriority-w.subPriority)).map(c=>c[0]);let N=Y(e);if(isNaN(N.getTime()))return T(e,NaN);const P={};for(const c of _){if(!c.validate(N,f))return T(e,NaN);const w=c.set(N,P,f);Array.isArray(w)?(N=w[0],Object.assign(P,w[1])):N=w}return T(e,N)}function Ht(n){return n.match(It)[1].replace(Ot,"'")}function te(n,s,e){const t=ye(),r=Ct(n,e.timeZone,e.locale??t.locale);return"formatToParts"in r?Et(r,s):Lt(r,s)}function Et(n,s){const e=n.formatToParts(s);for(let t=e.length-1;t>=0;--t)if(e[t].type==="timeZoneName")return e[t].value}function Lt(n,s){const e=n.format(s).replace(/\u200E/g,""),t=/ [\w-+ ]+$/.exec(e);return t?t[0].substr(1):""}function Ct(n,s,e){return new Intl.DateTimeFormat(e?[e.code,"en-US"]:void 0,{timeZone:s,timeZoneName:n})}function qt(n,s){const e=Zt(s);return"formatToParts"in e?vt(e,n):Ft(e,n)}const zt={year:0,month:1,day:2,hour:3,minute:4,second:5};function vt(n,s){try{const e=n.formatToParts(s),t=[];for(let r=0;r=0?a:1e3+a,t-r}function Qt(n,s,e){let r=n.getTime()-s;const a=W(new Date(r),e);if(s===a)return s;r-=a-s;const i=W(new Date(r),e);return a===i?a:Math.max(a,i)}function se(n,s){return-23<=n&&n<=23&&(s==null||0<=s&&s<=59)}const ae={};function Ut(n){if(ae[n])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:n}),ae[n]=!0,!0}catch{return!1}}const Xt=60*1e3,At={X:function(n,s,e){const t=v(e.timeZone,n);if(t===0)return"Z";switch(s){case"X":return oe(t);case"XXXX":case"XX":return O(t);case"XXXXX":case"XXX":default:return O(t,":")}},x:function(n,s,e){const t=v(e.timeZone,n);switch(s){case"x":return oe(t);case"xxxx":case"xx":return O(t);case"xxxxx":case"xxx":default:return O(t,":")}},O:function(n,s,e){const t=v(e.timeZone,n);switch(s){case"O":case"OO":case"OOO":return"GMT"+Gt(t,":");case"OOOO":default:return"GMT"+O(t,":")}},z:function(n,s,e){switch(s){case"z":case"zz":case"zzz":return te("short",n,e);case"zzzz":default:return te("long",n,e)}}};function v(n,s){const e=n?X(n,s,!0)/Xt:(s==null?void 0:s.getTimezoneOffset())??0;if(Number.isNaN(e))throw new RangeError("Invalid time zone specified: "+n);return e}function E(n,s){const e=n<0?"-":"";let t=Math.abs(n).toString();for(;t.length0?"-":"+",t=Math.abs(n),r=E(Math.floor(t/60),2),a=E(Math.floor(t%60),2);return e+r+s+a}function oe(n,s){return n%60===0?(n>0?"-":"+")+E(Math.abs(n)/60,2):O(n,s)}function Gt(n,s=""){const e=n>0?"-":"+",t=Math.abs(n),r=Math.floor(t/60),a=t%60;return a===0?e+String(r):e+String(r)+s+E(a,2)}function ie(n){const s=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return s.setUTCFullYear(n.getFullYear()),+n-+s}const Bt=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,F=36e5,ce=6e4,jt=2,x={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:Bt};function ge(n,s={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(n===null)return new Date(NaN);const e=s.additionalDigits==null?jt:Number(s.additionalDigits);if(e!==2&&e!==1&&e!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]")return new Date(n.getTime());if(typeof n=="number"||Object.prototype.toString.call(n)==="[object Number]")return new Date(n);if(Object.prototype.toString.call(n)!=="[object String]")return new Date(NaN);const t=Kt(n),{year:r,restDateString:a}=Vt(t.date,e),i=Jt(a,r);if(i===null||isNaN(i.getTime()))return new Date(NaN);if(i){const l=i.getTime();let f=0,m;if(t.time&&(f=St(t.time),f===null||isNaN(f)))return new Date(NaN);if(t.timeZone||s.timeZone){if(m=X(t.timeZone||s.timeZone,new Date(l+f)),isNaN(m))return new Date(NaN)}else m=ie(new Date(l+f)),m=ie(new Date(l+f+m));return new Date(l+f+m)}else return new Date(NaN)}function Kt(n){const s={};let e=x.dateTimePattern.exec(n),t;if(e?(s.date=e[1],t=e[3]):(e=x.datePattern.exec(n),e?(s.date=e[1],t=e[2]):(s.date=null,t=n)),t){const r=x.timeZone.exec(t);r?(s.time=t.replace(r[1],""),s.timeZone=r[1].trim()):s.time=t}return s}function Vt(n,s){if(n){const e=x.YYY[s],t=x.YYYYY[s];let r=x.YYYY.exec(n)||t.exec(n);if(r){const a=r[1];return{year:parseInt(a,10),restDateString:n.slice(a.length)}}if(r=x.YY.exec(n)||e.exec(n),r){const a=r[1];return{year:parseInt(a,10)*100,restDateString:n.slice(a.length)}}}return{year:null}}function Jt(n,s){if(s===null)return null;let e,t,r;if(!n||!n.length)return e=new Date(0),e.setUTCFullYear(s),e;let a=x.MM.exec(n);if(a)return e=new Date(0),t=parseInt(a[1],10)-1,le(s,t)?(e.setUTCFullYear(s,t),e):new Date(NaN);if(a=x.DDD.exec(n),a){e=new Date(0);const i=parseInt(a[1],10);return rr(s,i)?(e.setUTCFullYear(s,0,i),e):new Date(NaN)}if(a=x.MMDD.exec(n),a){e=new Date(0),t=parseInt(a[1],10)-1;const i=parseInt(a[2],10);return le(s,t,i)?(e.setUTCFullYear(s,t,i),e):new Date(NaN)}if(a=x.Www.exec(n),a)return r=parseInt(a[1],10)-1,de(r)?ue(s,r):new Date(NaN);if(a=x.WwwD.exec(n),a){r=parseInt(a[1],10)-1;const i=parseInt(a[2],10)-1;return de(r,i)?ue(s,r,i):new Date(NaN)}return null}function St(n){let s,e,t=x.HH.exec(n);if(t)return s=parseFloat(t[1].replace(",",".")),$(s)?s%24*F:NaN;if(t=x.HHMM.exec(n),t)return s=parseInt(t[1],10),e=parseFloat(t[2].replace(",",".")),$(s,e)?s%24*F+e*ce:NaN;if(t=x.HHMMSS.exec(n),t){s=parseInt(t[1],10),e=parseInt(t[2],10);const r=parseFloat(t[3].replace(",","."));return $(s,e,r)?s%24*F+e*ce+r*1e3:NaN}return null}function ue(n,s,e){s=s||0,e=e||0;const t=new Date(0);t.setUTCFullYear(n,0,4);const r=t.getUTCDay()||7,a=s*7+e+1-r;return t.setUTCDate(t.getUTCDate()+a),t}const er=[31,28,31,30,31,30,31,31,30,31,30,31],tr=[31,29,31,30,31,30,31,31,30,31,30,31];function Me(n){return n%400===0||n%4===0&&n%100!==0}function le(n,s,e){if(s<0||s>11)return!1;if(e!=null){if(e<1)return!1;const t=Me(n);if(t&&e>tr[s]||!t&&e>er[s])return!1}return!0}function rr(n,s){if(s<1)return!1;const e=Me(n);return!(e&&s>366||!e&&s>365)}function de(n,s){return!(n<0||n>52||s!=null&&(s<0||s>6))}function $(n,s,e){return!(n<0||n>=25||s!=null&&(s<0||s>=60)||e!=null&&(e<0||e>=60))}const nr=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function k(n,s,e={}){s=String(s);const t=s.match(nr);if(t){const r=ge(e.originalDate||n,e);s=t.reduce(function(a,i){if(i[0]==="'")return a;const l=a.indexOf(i),f=a[l-1]==="'",m=a.replace(i,"'"+At[i[0]](r,i,e)+"'");return f?m.substring(0,l-1)+m.substring(l+1):m},s)}return qe(n,s,e)}function sr(n,s,e){n=ge(n,e);const t=X(s,n,!0),r=new Date(n.getTime()-t),a=new Date(0);return a.setFullYear(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate()),a.setHours(r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds()),a}const ar="Asia/Tokyo",M=(n,s)=>k(sr(n,ar),s),or=n=>M(n,"yyyy年MM月dd日"),ur=n=>M(n,"yyyy年MM月dd日 HH:mm"),lr=n=>M(n,"yyyy"),dr=n=>M(n,"M/d"),fr=(n,s=!0)=>s?`${M(n,"M/d")}(${R[M(n,"i")%7]})`:`${k(n,"M/d")}(${R[k(n,"i")%7]})`,wr=(n,s)=>{const e=_t(n,"yyyy-MM-dd",new Date);return`${k(e,"yyyy年M月d日")}(${R[k(e,"i")%7]}) ${s}`},hr=n=>M(n,"yyyy-MM-dd"),pr=n=>M(n,"yyyy-MM-dd"),yr=n=>or(n),mr=n=>M(n,"yyyy/MM/dd"),xr=n=>M(n,"yyyy/M/d");export{ur as a,mr as b,hr as c,or as d,M as e,xr as f,ge as g,X as h,sr as i,wr as j,pr as k,k as l,dr as m,De as n,_t as p,fr as r,Bt as t,yr as u,lr as y};