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.

229 lines
385 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source visit the plugins github repository
*/
/*
License obsidian-tasks:
MIT License
Copyright (c) 2021 Martin Schenck and Clare Macrae
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
/*
License rrule (included library):
rrule.js: Library for working with recurrence rules for calendar dates.
=======================================================================
Copyright 2010, Jakub Roztocil <jakub@roztocil.name> and Lars Schöning
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of The author nor the names of its contributors may
be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR AND CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
./rrule.js and ./test/tests.js is based on python-dateutil. LICENCE:
python-dateutil - Extensions to the standard Python datetime module.
====================================================================
Copyright (c) 2003-2011 - Gustavo Niemeyer <gustavo@niemeyer.net>
Copyright (c) 2012 - Tomi Pieviläinen <tomi.pievilainen@iki.fi>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
License chrono-node (included library):
The MIT License
Copyright (c) 2014, Wanasit Tanakitrungruang
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
"use strict";var ab=Object.create;var Ii=Object.defineProperty,ob=Object.defineProperties,ub=Object.getOwnPropertyDescriptor,lb=Object.getOwnPropertyDescriptors,cb=Object.getOwnPropertyNames,up=Object.getOwnPropertySymbols,db=Object.getPrototypeOf,cp=Object.prototype.hasOwnProperty,fb=Object.prototype.propertyIsEnumerable;var lp=(r,e,t)=>e in r?Ii(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,ge=(r,e)=>{for(var t in e||(e={}))cp.call(e,t)&&lp(r,t,e[t]);if(up)for(var t of up(e))fb.call(e,t)&&lp(r,t,e[t]);return r},Dt=(r,e)=>ob(r,lb(e));var b=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),pb=(r,e)=>{for(var t in e)Ii(r,t,{get:e[t],enumerable:!0})},dp=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of cb(e))!cp.call(r,i)&&i!==t&&Ii(r,i,{get:()=>e[i],enumerable:!(n=ub(e,i))||n.enumerable});return r};var Fi=(r,e,t)=>(t=r!=null?ab(db(r)):{},dp(e||!r||!r.__esModule?Ii(t,"default",{value:r,enumerable:!0}):t,r)),mb=r=>dp(Ii({},"__esModule",{value:!0}),r);var W=(r,e,t)=>new Promise((n,i)=>{var s=u=>{try{o(t.next(u))}catch(l){i(l)}},a=u=>{try{o(t.throw(u))}catch(l){i(l)}},o=u=>u.done?n(u.value):Promise.resolve(u.value).then(s,a);o((t=t.apply(r,e)).next())});var be=b(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.matchAnyPattern=Yr.extractTerms=Yr.repeatedTimeunitPattern=void 0;function _b(r,e){let t=e.replace(/\((?!\?)/g,"(?:");return`${r}${t}\\s{0,5}(?:,?\\s{0,5}${t}){0,10}`}Yr.repeatedTimeunitPattern=_b;function fp(r){let e;return r instanceof Array?e=[...r]:r instanceof Map?e=Array.from(r.keys()):e=Object.keys(r),e}Yr.extractTerms=fp;function Tb(r){return`(?:${fp(r).sort((t,n)=>n.length-t.length).join("|").replace(/\./g,"\\.")})`}Yr.matchAnyPattern=Tb});var me=b((fu,pu)=>{(function(r,e){typeof fu=="object"&&typeof pu!="undefined"?pu.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs=e()})(fu,function(){"use strict";var r=1e3,e=6e4,t=36e5,n="millisecond",i="second",s="minute",a="hour",o="day",u="week",l="month",c="quarter",f="year",m="date",T="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,R={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},L=function(j,A,E){var B=String(j);return!B||B.length>=A?j:""+Array(A+1-B.length).join(E)+j},q={s:L,z:function(j){var A=-j.utcOffset(),E=Math.abs(A),B=Math.floor(E/60),P=E%60;return(A<=0?"+":"-")+L(B,2,"0")+":"+L(P,2,"0")},m:function j(A,E){if(A.date()<E.date())return-j(E,A);var B=12*(E.year()-A.year())+(E.month()-A.month()),P=A.clone().add(B,l),Q=E-P<0,d=A.clone().add(B+(Q?-1:1),l);return+(-(B+(E-P)/(Q?P-d:d-P))||0)},a:function(j){return j<0?Math.ceil(j)||0:Math.floor(j)},p:function(j){return{M:l,y:f,w:u,d:o,D:m,h:a,m:s,s:i,ms:n,Q:c}[j]||String(j||"").toLowerCase().replace(/s$/,"")},u:function(j){return j===void 0}},U="en",ne={};ne[U]=R;var te=function(j){return j instanceof Ce},Te=function(j,A,E){var B;if(!j)return U;if(typeof j=="string")ne[j]&&(B=j),A&&(ne[j]=A,B=j);else{var P=j.name;ne[P]=j,B=P}return!E&&B&&(U=B),B||!E&&U},G=function(j,A){if(te(j))return j.clone();var E=typeof A=="object"?A:{};return E.date=j,E.args=arguments,new Ce(E)},V=q;V.l=Te,V.i=te,V.w=function(j,A){return G(j,{locale:A.$L,utc:A.$u,x:A.$x,$offset:A.$offset})};var Ce=function(){function j(E){this.$L=Te(E.locale,null,!0),this.parse(E)}var A=j.prototype;return A.parse=function(E){this.$d=function(B){var P=B.date,Q=B.utc;if(P===null)return new Date(NaN);if(V.u(P))return new Date;if(P instanceof Date)return new Date(P);if(typeof P=="string"&&!/Z$/i.test(P)){var d=P.match(y);if(d){var p=d[2]-1||0,h=(d[7]||"0").substring(0,3);return Q?new Date(Date.UTC(d[1],p,d[3]||1,d[4]||0,d[5]||0,d[6]||0,h)):new Date(d[1],p,d[3]||1,d[4]||0,d[5]||0,d[6]||0,h)}}return new Date(P)}(E),this.$x=E.x||{},this.init()},A.init=function(){var E=this.$d;this.$y=E.getFullYear(),this.$M=E.getMonth(),this.$D=E.getDate(),this.$W=E.getDay(),this.$H=E.getHours(),this.$m=E.getMinutes(),this.$s=E.getSeconds(),this.$ms=E.getMilliseconds()},A.$utils=function(){return V},A.isValid=function(){return this.$d.toString()!==T},A.isSame=function(E,B){var P=G(E);return this.startOf(B)<=P&&P<=this.endOf(B)},A.isAfter=function(E,B){return G(E)<this.startOf(B)},A.isBefore=function(E,B){return this.endOf(B)<G(E)},A.$g=function(E,B,P){return V.u(E)?this[B]:this.set(P,E)},A.unix=function(){return Math.floor(this.valueOf()/1e3)},A.valueOf=function(){return this.$d.getTime()},A.startOf=function(E,B){var P=this,Q=!!V.u(B)||B,d=V.p(E),p=function(O,C){var pe=V.w(P.$u?Date.UTC(P.$y,C,O):new Date(P.$y,C,O),P);return Q?pe:pe.endOf(o)},h=function(O,C){return V.w(P.toDate()[O].apply(P.toDate("s"),(Q?[0,0,0,0]:[23,59,59,999]).slice(C)),P)},g=this.$W,_=this.$M,v=this.$D,k="set"+(this.$u?"UTC":"");switch(d){case f:return Q?p(1,0):p(31,11);case l:return Q?p(1,_):p(0,_+1);case u:var S=this.$locale().weekStart||0,D=(g<S?g+7:g)-S;return p(Q?v-D:v+(6-D),_);case o:case m:return h(k+"Hours",0);case a:return h(k+"Minutes",1);case s:return h(k+"Seconds",2);case i:return h(k+"Milliseconds",3);default:return this.clone()}},A.endOf=function(E){return this.startOf(E,!1)},A.$set=function(E,B){var P,Q=V.p(E),d="set"+(this.$u?"UTC":""),p=(P={},P[o]=d+"Date",P[m]=d+"Date",P[l]=d+"Month",P[f]=d+"FullYear",P[a]=d+"Hours",P[s]=d+"Minutes",P[i]=d+"Seconds",P[n]=d+"Milliseconds",P)[Q],h=Q===o?this.$D+(B-this.$W):B;if(Q===l||Q===f){var g=this.clone().set(m,1);g.$d[p](h),g.init(),this.$d=g.set(m,Math.min(this.$D,g.daysInMonth())).$d}else p&&this.$d[p](h);return this.init(),this},A.set=function(E,B){return this.clone().$set(E,B)},A.get=function(E){return this[V.p(E)]()},A.add=function(E,B){var P,Q=this;E=Number(E);var d=V.p(B),p=function(_){var v=G(Q);return V.w(v.date(v.date()+Math.round(_*E)),Q)};if(d===l)return this.set(l,this.$M+E);if(d===f)return this.set(f,this.$y+E);if(d===o)return p(1);if(d===u)return p(7);var h=(P={},P[s]=e,P[a]=t,P[i]=r,P)[d]||1,g=this.$d.getTime()+E*h;return V.w(g,this)},A.subtract=function(E,B){return this.add(-1*E,B)},A.format=function(E){var B=this,P=this.$locale();if(!this.isValid())return P.invalidDate||T;var Q=E||"YYYY-MM-DDTHH:mm:ssZ",d=V.z(this),p=this.$H,h=this.$m,g=this.$M,_=P.weekdays,v=P.months,k=function(C,pe,se,ee){return C&&(C[pe]||C(B,Q))||se[pe].substr(0,ee)},S=function(C){return V.s(p%12||12,C,"0")},D=P.meridiem||function(C,pe,se){var ee=C<12?"AM":"PM";return se?ee.toLowerCase():ee},O={YY:String(this.$y).slice(-2),YYYY:this.$y,M:g+1,MM:V.s(g+1,2,"0"),MMM:k(P.monthsShort,g,v,3),MMMM:k(v,g),D:this.$D,DD:V.s(this.$D,2,"0"),d:String(this.$W),dd:k(P.weekdaysMin,this.$W,_,2),ddd:k(P.weekdaysShort,this.$W,_,3),dddd:_[this.$W],H:String(p),HH:V.s(p,2,"0"),h:S(1),hh:S(2),a:D(p,h,!0),A:D(p,h,!1),m:String(h),mm:V.s(h,2,"0"),s:String(this.$s),ss:V.s(this.$s,2,"0"),SSS:V.s(this.$ms,3,"0"),Z:d};return Q.replace(w,function(C,pe){return pe||O[C]||d.replace(":","")})},A.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},A.diff=function(E,B,P){var Q,d=V.p(B),p=G(E),h=(p.utcOffset()-this.utcOffset())*e,g=this-p,_=V.m(this,p);return _=(Q={},Q[f]=_/12,Q[l]=_,Q[c]=_/3,Q[u]=(g-h)/6048e5,Q[o]=(g-h)/864e5,Q[a]=g/t,Q[s]=g/e,Q[i]=g/r,Q)[d]||g,P?_:V.a(_)},A.daysInMonth=function(){return this.endOf(l).$D},A.$locale=function(){return ne[this.$L]},A.locale=function(E,B){if(!E)return this.$L;var P=this.clone(),Q=Te(E,B,!0);return Q&&(P.$L=Q),P},A.clone=function(){return V.w(this.$d,this)},A.toDate=function(){return new Date(this.valueOf())},A.toJSON=function(){return this.isValid()?this.toISOString():null},A.toISOString=function(){return this.$d.toISOString()},A.toString=function(){return this.$d.toUTCString()},j}(),Fe=Ce.prototype;return G.prototype=Fe,[["$ms",n],["$s",i],["$m",s],["$H",a],["$W",o],["$M",l],["$y",f],["$D",m]].forEach(function(j){Fe[j[1]]=function(A){return this.$g(A,j[0],j[1])}}),G.extend=function(j,A){return j.$i||(j(A,Ce,G),j.$i=!0),G},G.locale=Te,G.isDayjs=te,G.unix=function(j){return G(1e3*j)},G.en=ne[U],G.Ls=ne,G.p={},G})});var nt=b($r=>{"use strict";var bb=$r&&$r.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($r,"__esModule",{value:!0});$r.findYearClosestToRef=$r.findMostLikelyADYear=void 0;var vb=bb(me());function wb(r){return r<100&&(r>50?r=r+1900:r=r+2e3),r}$r.findMostLikelyADYear=wb;function Eb(r,e,t){let n=vb.default(r),i=n;i=i.month(t-1),i=i.date(e),i=i.year(n.year());let s=i.add(1,"y"),a=i.add(-1,"y");return Math.abs(s.diff(n))<Math.abs(i.diff(n))?i=s:Math.abs(a.diff(n))<Math.abs(i.diff(n))&&(i=a),i.year()}$r.findYearClosestToRef=Eb});var it=b(re=>{"use strict";Object.defineProperty(re,"__esModule",{value:!0});re.parseTimeUnits=re.TIME_UNITS_PATTERN=re.parseYear=re.YEAR_PATTERN=re.parseOrdinalNumberPattern=re.ORDINAL_NUMBER_PATTERN=re.parseNumberPattern=re.NUMBER_PATTERN=re.TIME_UNIT_DICTIONARY=re.ORDINAL_WORD_DICTIONARY=re.INTEGER_WORD_DICTIONARY=re.MONTH_DICTIONARY=re.FULL_MONTH_NAME_DICTIONARY=re.WEEKDAY_DICTIONARY=void 0;var ma=be(),kb=nt();re.WEEKDAY_DICTIONARY={sunday:0,sun:0,"sun.":0,monday:1,mon:1,"mon.":1,tuesday:2,tue:2,"tue.":2,wednesday:3,wed:3,"wed.":3,thursday:4,thurs:4,"thurs.":4,thur:4,"thur.":4,thu:4,"thu.":4,friday:5,fri:5,"fri.":5,saturday:6,sat:6,"sat.":6};re.FULL_MONTH_NAME_DICTIONARY={january:1,february:2,march:3,april:4,may:5,june:6,july:7,august:8,september:9,october:10,november:11,december:12};re.MONTH_DICTIONARY=Object.assign(Object.assign({},re.FULL_MONTH_NAME_DICTIONARY),{jan:1,"jan.":1,feb:2,"feb.":2,mar:3,"mar.":3,apr:4,"apr.":4,jun:6,"jun.":6,jul:7,"jul.":7,aug:8,"aug.":8,sep:9,"sep.":9,sept:9,"sept.":9,oct:10,"oct.":10,nov:11,"nov.":11,dec:12,"dec.":12});re.INTEGER_WORD_DICTIONARY={one:1,two:2,three:3,four:4,five:5,six:6,seven:7,eight:8,nine:9,ten:10,eleven:11,twelve:12};re.ORDINAL_WORD_DICTIONARY={first:1,second:2,third:3,fourth:4,fifth:5,sixth:6,seventh:7,eighth:8,ninth:9,tenth:10,eleventh:11,twelfth:12,thirteenth:13,fourteenth:14,fifteenth:15,sixteenth:16,seventeenth:17,eighteenth:18,nineteenth:19,twentieth:20,"twenty first":21,"twenty-first":21,"twenty second":22,"twenty-second":22,"twenty third":23,"twenty-third":23,"twenty fourth":24,"twenty-fourth":24,"twenty fifth":25,"twenty-fifth":25,"twenty sixth":26,"twenty-sixth":26,"twenty seventh":27,"twenty-seventh":27,"twenty eighth":28,"twenty-eighth":28,"twenty ninth":29,"twenty-ninth":29,thirtieth:30,"thirty first":31,"thirty-first":31};re.TIME_UNIT_DICTIONARY={sec:"second",second:"second",seconds:"second",min:"minute",mins:"minute",minute:"minute",minutes:"minute",h:"hour",hr:"hour",hrs:"hour",hour:"hour",hours:"hour",day:"d",days:"d",week:"week",weeks:"week",month:"month",months:"month",qtr:"quarter",quarter:"quarter",quarters:"quarter",y:"year",yr:"year",year:"year",years:"year"};re.NUMBER_PATTERN=`(?:${ma.matchAnyPattern(re.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s{0,2}an?)?|an?\\b(?:\\s{0,2}few)?|few|several|a?\\s{0,2}couple\\s{0,2}(?:of)?)`;function mp(r){let e=r.toLowerCase();return re.INTEGER_WORD_DICTIONARY[e]!==void 0?re.INTEGER_WORD_DICTIONARY[e]:e==="a"||e==="an"?1:e.match(/few/)?3:e.match(/half/)?.5:e.match(/couple/)?2:e.match(/several/)?7:parseFloat(e)}re.parseNumberPattern=mp;re.ORDINAL_NUMBER_PATTERN=`(?:${ma.matchAnyPattern(re.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:st|nd|rd|th)?)`;function Db(r){let e=r.toLowerCase();return re.ORDINAL_WORD_DICTIONARY[e]!==void 0?re.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}re.parseOrdinalNumberPattern=Db;re.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s{0,2}(?:BE|AD|BC|BCE|CE)|[1-2][0-9]{3}|[5-9][0-9])";function Ob(r){if(/BE/i.test(r))return r=r.replace(/BE/i,""),parseInt(r)-543;if(/BCE?/i.test(r))return r=r.replace(/BCE?/i,""),-parseInt(r);if(/(AD|CE)/i.test(r))return r=r.replace(/(AD|CE)/i,""),parseInt(r);let e=parseInt(r);return kb.findMostLikelyADYear(e)}re.parseYear=Ob;var hp=`(${re.NUMBER_PATTERN})\\s{0,3}(${ma.matchAnyPattern(re.TIME_UNIT_DICTIONARY)})`,pp=new RegExp(hp,"i");re.TIME_UNITS_PATTERN=ma.repeatedTimeunitPattern("(?:(?:about|around)\\s{0,3})?",hp);function Sb(r){let e={},t=r,n=pp.exec(t);for(;n;)Rb(e,n),t=t.substring(n[0].length).trim(),n=pp.exec(t);return e}re.parseTimeUnits=Sb;function Rb(r,e){let t=mp(e[1]),n=re.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var gp=b((mu,hu)=>{(function(r,e){typeof mu=="object"&&typeof hu!="undefined"?hu.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs_plugin_quarterOfYear=e()})(mu,function(){"use strict";var r="month",e="quarter";return function(t,n){var i=n.prototype;i.quarter=function(o){return this.$utils().u(o)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(o-1))};var s=i.add;i.add=function(o,u){return o=Number(o),this.$utils().p(u)===e?this.add(3*o,r):s.bind(this)(o,u)};var a=i.startOf;i.startOf=function(o,u){var l=this.$utils(),c=!!l.u(u)||u;if(l.p(o)===e){var f=this.quarter()-1;return c?this.month(3*f).startOf(r).startOf("day"):this.month(3*f+2).endOf(r).endOf("day")}return a.bind(this)(o,u)}}})});var Lt=b(ar=>{"use strict";Object.defineProperty(ar,"__esModule",{value:!0});ar.implySimilarTime=ar.assignSimilarTime=ar.assignSimilarDate=ar.assignTheNextDay=void 0;var yp=Be();function Mb(r,e){e=e.add(1,"day"),_p(r,e),Tp(r,e)}ar.assignTheNextDay=Mb;function _p(r,e){r.assign("day",e.date()),r.assign("month",e.month()+1),r.assign("year",e.year())}ar.assignSimilarDate=_p;function xb(r,e){r.assign("hour",e.hour()),r.assign("minute",e.minute()),r.assign("second",e.second()),r.assign("millisecond",e.millisecond()),r.get("hour")<12?r.assign("meridiem",yp.Meridiem.AM):r.assign("meridiem",yp.Meridiem.PM)}ar.assignSimilarTime=xb;function Tp(r,e){r.imply("hour",e.hour()),r.imply("minute",e.minute()),r.imply("second",e.second()),r.imply("millisecond",e.millisecond())}ar.implySimilarTime=Tp});var bp=b(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.toTimezoneOffset=ln.TIMEZONE_ABBR_MAP=void 0;ln.TIMEZONE_ABBR_MAP={ACDT:630,ACST:570,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,ALMT:360,AMST:-180,AMT:-240,ANAST:720,ANAT:720,AQTT:300,ART:-180,AST:-240,AWDT:540,AWST:480,AZOST:0,AZOT:-60,AZST:300,AZT:240,BNT:480,BOT:-240,BRST:-120,BRT:-180,BST:60,BTT:360,CAST:480,CAT:120,CCT:390,CDT:-300,CEST:120,CET:60,CHADT:825,CHAST:765,CKT:-600,CLST:-180,CLT:-240,COT:-300,CST:-360,CVT:-60,CXT:420,ChST:600,DAVT:420,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEST:180,EET:120,EGST:0,EGT:-60,EST:-300,ET:-300,FJST:780,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GMT:0,GST:240,GYT:-240,HAA:-180,HAC:-300,HADT:-540,HAE:-240,HAP:-420,HAR:-360,HAST:-600,HAT:-90,HAY:-480,HKT:480,HLV:-210,HNA:-240,HNC:-360,HNE:-300,HNP:-480,HNR:-420,HNT:-150,HNY:-540,HOVT:420,ICT:420,IDT:180,IOT:360,IRDT:270,IRKST:540,IRKT:540,IRST:210,IST:330,JST:540,KGT:360,KRAST:480,KRAT:480,KST:540,KUYT:240,LHDT:660,LHST:630,LINT:840,MAGST:720,MAGT:720,MART:-510,MAWT:300,MDT:-360,MESZ:120,MEZ:60,MHT:720,MMT:390,MSD:240,MSK:180,MST:-420,MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:690,NOVST:420,NOVT:360,NPT:345,NST:-150,NUT:-660,NZDT:780,NZST:720,OMSST:420,OMST:420,PDT:-420,PET:-300,PETST:720,PETT:720,PGT:600,PHOT:780,PHT:480,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PT:-480,PWT:540,PYST:-180,PYT:-240,RET:240,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SRT:-180,SST:-660,TAHT:-600,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TVT:720,ULAT:480,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-210,VLAST:660,VLAT:660,VUT:660,WAST:120,WAT:60,WEST:60,WESZ:60,WET:0,WEZ:0,WFT:720,WGST:-120,WGT:-180,WIB:420,WIT:540,WITA:480,WST:780,WT:0,YAKST:600,YAKT:600,YAPT:600,YEKST:360,YEKT:360};function Ab(r){var e;return r==null?null:typeof r=="number"?r:(e=ln.TIMEZONE_ABBR_MAP[r])!==null&&e!==void 0?e:null}ln.toTimezoneOffset=Ab});var Ne=b(or=>{"use strict";var vp=or&&or.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(or,"__esModule",{value:!0});or.ParsingResult=or.ParsingComponents=or.ReferenceWithTimezone=void 0;var Pb=vp(gp()),ha=vp(me()),gu=Lt(),Cb=bp();ha.default.extend(Pb.default);var yu=class{constructor(e){var t;e=e!=null?e:new Date,e instanceof Date?this.instant=e:(this.instant=(t=e.instant)!==null&&t!==void 0?t:new Date,this.timezoneOffset=Cb.toTimezoneOffset(e.timezone))}};or.ReferenceWithTimezone=yu;var cn=class{constructor(e,t){if(this.reference=e,this.knownValues={},this.impliedValues={},t)for(let i in t)this.knownValues[i]=t[i];let n=ha.default(e.instant);this.imply("day",n.date()),this.imply("month",n.month()+1),this.imply("year",n.year()),this.imply("hour",12),this.imply("minute",0),this.imply("second",0),this.imply("millisecond",0)}get(e){return e in this.knownValues?this.knownValues[e]:e in this.impliedValues?this.impliedValues[e]:null}isCertain(e){return e in this.knownValues}getCertainComponents(){return Object.keys(this.knownValues)}imply(e,t){return e in this.knownValues?this:(this.impliedValues[e]=t,this)}assign(e,t){return this.knownValues[e]=t,delete this.impliedValues[e],this}delete(e){delete this.knownValues[e],delete this.impliedValues[e]}clone(){let e=new cn(this.reference);e.knownValues={},e.impliedValues={};for(let t in this.knownValues)e.knownValues[t]=this.knownValues[t];for(let t in this.impliedValues)e.impliedValues[t]=this.impliedValues[t];return e}isOnlyDate(){return!this.isCertain("hour")&&!this.isCertain("minute")&&!this.isCertain("second")}isOnlyTime(){return!this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")}isOnlyWeekdayComponent(){return this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")}isOnlyDayMonthComponent(){return this.isCertain("day")&&this.isCertain("month")&&!this.isCertain("year")}isValidDate(){let e=this.dateWithoutTimezoneAdjustment();return!(e.getFullYear()!==this.get("year")||e.getMonth()!==this.get("month")-1||e.getDate()!==this.get("day")||this.get("hour")!=null&&e.getHours()!=this.get("hour")||this.get("minute")!=null&&e.getMinutes()!=this.get("minute"))}toString(){return`[ParsingComponents {knownValues: ${JSON.stringify(this.knownValues)}, impliedValues: ${JSON.stringify(this.impliedValues)}}, reference: ${JSON.stringify(this.reference)}]`}dayjs(){return ha.default(this.date())}date(){let e=this.dateWithoutTimezoneAdjustment();return new Date(e.getTime()+this.getSystemTimezoneAdjustmentMinute(e)*6e4)}dateWithoutTimezoneAdjustment(){let e=new Date(this.get("year"),this.get("month")-1,this.get("day"),this.get("hour"),this.get("minute"),this.get("second"),this.get("millisecond"));return e.setFullYear(this.get("year")),e}getSystemTimezoneAdjustmentMinute(e){var t,n;(!e||e.getTime()<0)&&(e=new Date);let i=-e.getTimezoneOffset(),s=(n=(t=this.get("timezoneOffset"))!==null&&t!==void 0?t:this.reference.timezoneOffset)!==null&&n!==void 0?n:i;return i-s}static createRelativeFromReference(e,t){let n=ha.default(e.instant);for(let s in t)n=n.add(t[s],s);let i=new cn(e);return t.hour||t.minute||t.second?(gu.assignSimilarTime(i,n),gu.assignSimilarDate(i,n),e.timezoneOffset!==null&&i.assign("timezoneOffset",-e.instant.getTimezoneOffset())):(gu.implySimilarTime(i,n),e.timezoneOffset!==null&&i.imply("timezoneOffset",-e.instant.getTimezoneOffset()),t.d?(i.assign("day",n.date()),i.assign("month",n.month()+1),i.assign("year",n.year())):(t.week&&i.imply("weekday",n.day()),i.imply("day",n.date()),t.month?(i.assign("month",n.month()+1),i.assign("year",n.year())):(i.imply("month",n.month()+1),t.year?i.assign("year",n.year()):i.imply("year",n.year())))),i}};or.ParsingComponents=cn;var Li=class{constructor(e,t,n,i,s){this.reference=e,this.refDate=e.instant,this.index=t,this.text=n,this.start=i||new cn(e),this.end=s}clone(){let e=new Li(this.reference,this.index,this.text);return e.start=this.start?this.start.clone():null,e.end=this.end?this.end.clone():null,e}date(){return this.start.date()}toString(){return`[ParsingResult {index: ${this.index}, text: '${this.text}', ...}]`}};or.ParsingResult=Li});var F=b(ga=>{"use strict";Object.defineProperty(ga,"__esModule",{value:!0});ga.AbstractParserWithWordBoundaryChecking=void 0;var _u=class{constructor(){this.cachedInnerPattern=null,this.cachedPattern=null}patternLeftBoundary(){return"(\\W|^)"}pattern(e){let t=this.innerPattern(e);return t==this.cachedInnerPattern?this.cachedPattern:(this.cachedPattern=new RegExp(`${this.patternLeftBoundary()}${t.source}`,t.flags),this.cachedInnerPattern=t,this.cachedPattern)}extract(e,t){var n;let i=(n=t[1])!==null&&n!==void 0?n:"";t.index=t.index+i.length,t[0]=t[0].substring(i.length);for(let s=2;s<t.length;s++)t[s-1]=t[s];return this.innerExtract(e,t)}};ga.AbstractParserWithWordBoundaryChecking=_u});var wp=b(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});var bu=it(),Nb=Ne(),Ib=F(),Fb=new RegExp(`(?:within|in|for)\\s*(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${bu.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Lb=new RegExp(`(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${bu.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Tu=class extends Ib.AbstractParserWithWordBoundaryChecking{innerPattern(e){return e.option.forwardDate?Lb:Fb}innerExtract(e,t){let n=bu.parseTimeUnits(t[1]);return Nb.ParsingComponents.createRelativeFromReference(e.reference,n)}};vu.default=Tu});var Rp=b(Eu=>{"use strict";Object.defineProperty(Eu,"__esModule",{value:!0});var Ub=nt(),Op=it(),Sp=it(),ya=it(),Wb=be(),qb=F(),Yb=new RegExp(`(?:on\\s{0,3})?(${ya.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:to|\\-|\\\u2013|until|through|till)?\\s{0,3}(${ya.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s{0,3}(?:of)?\\s{0,3})(${Wb.matchAnyPattern(Op.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s{0,3})(${Sp.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Ep=1,kp=2,$b=3,Dp=4,wu=class extends qb.AbstractParserWithWordBoundaryChecking{innerPattern(){return Yb}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Op.MONTH_DICTIONARY[t[$b].toLowerCase()],s=ya.parseOrdinalNumberPattern(t[Ep]);if(s>31)return t.index=t.index+t[Ep].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[Dp]){let a=Sp.parseYear(t[Dp]);n.start.assign("year",a)}else{let a=Ub.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[kp]){let a=ya.parseOrdinalNumberPattern(t[kp]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Eu.default=wu});var Cp=b(Du=>{"use strict";Object.defineProperty(Du,"__esModule",{value:!0});var jb=nt(),Ap=it(),_a=it(),Pp=it(),Gb=be(),Bb=F(),Hb=new RegExp(`(${Gb.matchAnyPattern(Ap.MONTH_DICTIONARY)})(?:-|/|\\s*,?\\s*)(${_a.ORDINAL_NUMBER_PATTERN})(?!\\s*(?:am|pm))\\s*(?:(?:to|\\-)\\s*(${_a.ORDINAL_NUMBER_PATTERN})\\s*)?(?:(?:-|/|\\s*,?\\s*)(${Pp.YEAR_PATTERN}))?(?=\\W|$)(?!\\:\\d)`,"i"),zb=1,Kb=2,Mp=3,xp=4,ku=class extends Bb.AbstractParserWithWordBoundaryChecking{innerPattern(){return Hb}innerExtract(e,t){let n=Ap.MONTH_DICTIONARY[t[zb].toLowerCase()],i=_a.parseOrdinalNumberPattern(t[Kb]);if(i>31)return null;let s=e.createParsingComponents({day:i,month:n});if(t[xp]){let u=Pp.parseYear(t[xp]);s.assign("year",u)}else{let u=jb.findYearClosestToRef(e.refDate,i,n);s.imply("year",u)}if(!t[Mp])return s;let a=_a.parseOrdinalNumberPattern(t[Mp]),o=e.createParsingResult(t.index,t[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",a),o}};Du.default=ku});var Fp=b(Ru=>{"use strict";Object.defineProperty(Ru,"__esModule",{value:!0});var Ou=it(),Vb=nt(),Xb=be(),Ip=it(),Qb=F(),Zb=new RegExp(`((?:in)\\s*)?(${Xb.matchAnyPattern(Ou.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${Ip.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),Jb=1,ev=2,Np=3,Su=class extends Qb.AbstractParserWithWordBoundaryChecking{innerPattern(){return Zb}innerExtract(e,t){let n=t[ev].toLowerCase();if(t[0].length<=3&&!Ou.FULL_MONTH_NAME_DICTIONARY[n])return null;let i=e.createParsingResult(t.index+(t[Jb]||"").length,t.index+t[0].length);i.start.imply("day",1);let s=Ou.MONTH_DICTIONARY[n];if(i.start.assign("month",s),t[Np]){let a=Ip.parseYear(t[Np]);i.start.assign("year",a)}else{let a=Vb.findYearClosestToRef(e.refDate,1,s);i.start.imply("year",a)}return i}};Ru.default=Su});var Wp=b(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});var Up=it(),tv=be(),rv=F(),nv=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${tv.matchAnyPattern(Up.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),iv=1,sv=2,Lp=3,av=4,Mu=class extends rv.AbstractParserWithWordBoundaryChecking{innerPattern(){return nv}innerExtract(e,t){let n=t[Lp]?parseInt(t[Lp]):Up.MONTH_DICTIONARY[t[sv].toLowerCase()];if(n<1||n>12)return null;let i=parseInt(t[iv]);return{day:parseInt(t[av]),month:n,year:i}}};xu.default=Mu});var qp=b(Pu=>{"use strict";Object.defineProperty(Pu,"__esModule",{value:!0});var ov=F(),uv=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),lv=1,cv=2,Au=class extends ov.AbstractParserWithWordBoundaryChecking{innerPattern(){return uv}innerExtract(e,t){let n=parseInt(t[cv]),i=parseInt(t[lv]);return e.createParsingComponents().imply("day",1).assign("month",i).assign("year",n)}};Pu.default=Au});var dn=b(va=>{"use strict";Object.defineProperty(va,"__esModule",{value:!0});va.AbstractTimeExpressionParser=void 0;var ht=Be();function dv(r,e,t,n){return new RegExp(`${r}${e}(\\d{1,4})(?:(?:\\.|:|\uFF1A)(\\d{1,2})(?:(?::|\uFF1A)(\\d{2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${t}`,n)}function fv(r,e){return new RegExp(`^(${r})(\\d{1,4})(?:(?:\\.|\\:|\\\uFF1A)(\\d{1,2})(?:(?:\\.|\\:|\\\uFF1A)(\\d{1,2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${e}`,"i")}var Yp=2,$n=3,Ta=4,ba=5,Ui=6,Cu=class{constructor(e=!1){this.cachedPrimaryPrefix=null,this.cachedPrimarySuffix=null,this.cachedPrimaryTimePattern=null,this.cachedFollowingPhase=null,this.cachedFollowingSuffix=null,this.cachedFollowingTimePatten=null,this.strictMode=e}patternFlags(){return"i"}primaryPatternLeftBoundary(){return"(^|\\s|T|\\b)"}primarySuffix(){return"(?=\\W|$)"}followingSuffix(){return"(?=\\W|$)"}pattern(e){return this.getPrimaryTimePatternThroughCache()}extract(e,t){let n=this.extractPrimaryTimeComponents(e,t);if(!n)return t.index+=t[0].length,null;let i=t.index+t[1].length,s=t[0].substring(t[1].length),a=e.createParsingResult(i,s,n);t.index+=t[0].length;let o=e.text.substring(t.index),l=this.getFollowingTimePatternThroughCache().exec(o);return s.match(/^\d{3,4}/)&&l&&l[0].match(/^\s*([+-])\s*\d{2,4}$/)?null:!l||l[0].match(/^\s*([+-])\s*\d{3,4}$/)?this.checkAndReturnWithoutFollowingPattern(a):(a.end=this.extractFollowingTimeComponents(e,l,a),a.end&&(a.text+=l[0]),this.checkAndReturnWithFollowingPattern(a))}extractPrimaryTimeComponents(e,t,n=!1){let i=e.createParsingComponents(),s=0,a=null,o=parseInt(t[Yp]);if(o>100){if(this.strictMode||t[$n]!=null)return null;s=o%100,o=Math.floor(o/100)}if(o>24)return null;if(t[$n]!=null){if(t[$n].length==1&&!t[Ui])return null;s=parseInt(t[$n])}if(s>=60)return null;if(o>12&&(a=ht.Meridiem.PM),t[Ui]!=null){if(o>12)return null;let u=t[Ui][0].toLowerCase();u=="a"&&(a=ht.Meridiem.AM,o==12&&(o=0)),u=="p"&&(a=ht.Meridiem.PM,o!=12&&(o+=12))}if(i.assign("hour",o),i.assign("minute",s),a!==null?i.assign("meridiem",a):o<12?i.imply("meridiem",ht.Meridiem.AM):i.imply("meridiem",ht.Meridiem.PM),t[ba]!=null){let u=parseInt(t[ba].substring(0,3));if(u>=1e3)return null;i.assign("millisecond",u)}if(t[Ta]!=null){let u=parseInt(t[Ta]);if(u>=60)return null;i.assign("second",u)}return i}extractFollowingTimeComponents(e,t,n){let i=e.createParsingComponents();if(t[ba]!=null){let u=parseInt(t[ba].substring(0,3));if(u>=1e3)return null;i.assign("millisecond",u)}if(t[Ta]!=null){let u=parseInt(t[Ta]);if(u>=60)return null;i.assign("second",u)}let s=parseInt(t[Yp]),a=0,o=-1;if(t[$n]!=null?a=parseInt(t[$n]):s>100&&(a=s%100,s=Math.floor(s/100)),a>=60||s>24)return null;if(s>=12&&(o=ht.Meridiem.PM),t[Ui]!=null){if(s>12)return null;let u=t[Ui][0].toLowerCase();u=="a"&&(o=ht.Meridiem.AM,s==12&&(s=0,i.isCertain("day")||i.imply("day",i.get("day")+1))),u=="p"&&(o=ht.Meridiem.PM,s!=12&&(s+=12)),n.start.isCertain("meridiem")||(o==ht.Meridiem.AM?(n.start.imply("meridiem",ht.Meridiem.AM),n.start.get("hour")==12&&n.start.assign("hour",0)):(n.start.imply("meridiem",ht.Meridiem.PM),n.start.get("hour")!=12&&n.start.assign("hour",n.start.get("hour")+12)))}return i.assign("hour",s),i.assign("minute",a),o>=0?i.assign("meridiem",o):n.start.isCertain("meridiem")&&n.start.get("hour")>12?n.start.get("hour")-12>s?i.imply("meridiem",ht.Meridiem.AM):s<=12&&(i.assign("hour",s+12),i.assign("meridiem",ht.Meridiem.PM)):s>12?i.imply("meridiem",ht.Meridiem.PM):s<=12&&i.imply("meridiem",ht.Meridiem.AM),i.date().getTime()<n.start.date().getTime()&&i.imply("day",i.get("day")+1),i}checkAndReturnWithoutFollowingPattern(e){if(e.text.match(/^\d$/)||e.text.match(/^\d\d\d+$/)||e.text.match(/\d[apAP]$/))return null;let t=e.text.match(/[^\d:.](\d[\d.]+)$/);if(t){let n=t[1];if(this.strictMode||n.includes(".")&&!n.match(/\d(\.\d{2})+$/)||parseInt(n)>24)return null}return e}checkAndReturnWithFollowingPattern(e){if(e.text.match(/^\d+-\d+$/))return null;let t=e.text.match(/[^\d:.](\d[\d.]+)\s*-\s*(\d[\d.]+)$/);if(t){if(this.strictMode)return null;let n=t[1],i=t[2];if(i.includes(".")&&!i.match(/\d(\.\d{2})+$/))return null;let s=parseInt(i),a=parseInt(n);if(s>24||a>24)return null}return e}getPrimaryTimePatternThroughCache(){let e=this.primaryPrefix(),t=this.primarySuffix();return this.cachedPrimaryPrefix===e&&this.cachedPrimarySuffix===t?this.cachedPrimaryTimePattern:(this.cachedPrimaryTimePattern=dv(this.primaryPatternLeftBoundary(),e,t,this.patternFlags()),this.cachedPrimaryPrefix=e,this.cachedPrimarySuffix=t,this.cachedPrimaryTimePattern)}getFollowingTimePatternThroughCache(){let e=this.followingPhase(),t=this.followingSuffix();return this.cachedFollowingPhase===e&&this.cachedFollowingSuffix===t?this.cachedFollowingTimePatten:(this.cachedFollowingTimePatten=fv(e,t),this.cachedFollowingPhase=e,this.cachedFollowingSuffix=t,this.cachedFollowingTimePatten)}};va.AbstractTimeExpressionParser=Cu});var $p=b(Iu=>{"use strict";Object.defineProperty(Iu,"__esModule",{value:!0});var wa=Be(),pv=dn(),Nu=class extends pv.AbstractTimeExpressionParser{constructor(e){super(e)}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|to|\\?)\\s*"}primaryPrefix(){return"(?:(?:at|from)\\s*)??"}primarySuffix(){return"(?:\\s*(?:o\\W*clock|at\\s*night|in\\s*the\\s*(?:morning|afternoon)))?(?!/)(?=\\W|$)"}extractPrimaryTimeComponents(e,t){let n=super.extractPrimaryTimeComponents(e,t);if(n){if(t[0].endsWith("night")){let i=n.get("hour");i>=6&&i<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",wa.Meridiem.PM)):i<6&&n.assign("meridiem",wa.Meridiem.AM)}if(t[0].endsWith("afternoon")){n.assign("meridiem",wa.Meridiem.PM);let i=n.get("hour");i>=0&&i<=6&&n.assign("hour",n.get("hour")+12)}t[0].endsWith("morning")&&(n.assign("meridiem",wa.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};Iu.default=Nu});var Ut=b(jn=>{"use strict";Object.defineProperty(jn,"__esModule",{value:!0});jn.addImpliedTimeUnits=jn.reverseTimeUnits=void 0;function mv(r){let e={};for(let t in r)e[t]=-r[t];return e}jn.reverseTimeUnits=mv;function hv(r,e){let t=r.clone(),n=r.dayjs();for(let i in e)n=n.add(e[i],i);return("day"in e||"d"in e||"week"in e||"month"in e||"year"in e)&&(t.imply("day",n.date()),t.imply("month",n.month()+1),t.imply("year",n.year())),("second"in e||"minute"in e||"hour"in e)&&(t.imply("second",n.second()),t.imply("minute",n.minute()),t.imply("hour",n.hour())),t}jn.addImpliedTimeUnits=hv});var jp=b(Uu=>{"use strict";Object.defineProperty(Uu,"__esModule",{value:!0});var Lu=it(),gv=Ne(),yv=F(),_v=Ut(),Tv=new RegExp(`(${Lu.TIME_UNITS_PATTERN})\\s{0,5}(?:ago|before|earlier)(?=(?:\\W|$))`,"i"),bv=new RegExp(`(${Lu.TIME_UNITS_PATTERN})\\s{0,5}ago(?=(?:\\W|$))`,"i"),Fu=class extends yv.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?bv:Tv}innerExtract(e,t){let n=Lu.parseTimeUnits(t[1]),i=_v.reverseTimeUnits(n);return gv.ParsingComponents.createRelativeFromReference(e.reference,i)}};Uu.default=Fu});var Gp=b(Yu=>{"use strict";Object.defineProperty(Yu,"__esModule",{value:!0});var qu=it(),vv=Ne(),wv=F(),Ev=new RegExp(`(${qu.TIME_UNITS_PATTERN})\\s{0,5}(?:later|after|from now|henceforth|forward|out)(?=(?:\\W|$))`,"i"),kv=new RegExp("("+qu.TIME_UNITS_PATTERN+")(later|from now)(?=(?:\\W|$))","i"),Dv=1,Wu=class extends wv.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?kv:Ev}innerExtract(e,t){let n=qu.parseTimeUnits(t[Dv]);return vv.ParsingComponents.createRelativeFromReference(e.reference,n)}};Yu.default=Wu});var Bn=b(Gn=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});Gn.MergingRefiner=Gn.Filter=void 0;var $u=class{refine(e,t){return t.filter(n=>this.isValid(e,n))}};Gn.Filter=$u;var ju=class{refine(e,t){if(t.length<2)return t;let n=[],i=t[0],s=null;for(let a=1;a<t.length;a++){s=t[a];let o=e.text.substring(i.index+i.text.length,s.index);if(!this.shouldMergeResults(o,i,s,e))n.push(i),i=s;else{let u=i,l=s,c=this.mergeResults(o,u,l,e);e.debug(()=>{console.log(`${this.constructor.name} merged ${u} and ${l} into ${c}`)}),i=c}}return i!=null&&n.push(i),n}};Gn.MergingRefiner=ju});var ur=b(Bu=>{"use strict";Object.defineProperty(Bu,"__esModule",{value:!0});var Ov=Bn(),Gu=class extends Ov.MergingRefiner{shouldMergeResults(e,t,n){return!t.end&&!n.end&&e.match(this.patternBetween())!=null}mergeResults(e,t,n){if(!t.start.isOnlyWeekdayComponent()&&!n.start.isOnlyWeekdayComponent()&&(n.start.getCertainComponents().forEach(s=>{t.start.isCertain(s)||t.start.assign(s,n.start.get(s))}),t.start.getCertainComponents().forEach(s=>{n.start.isCertain(s)||n.start.assign(s,t.start.get(s))})),t.start.date().getTime()>n.start.date().getTime()){let s=t.start.dayjs(),a=n.start.dayjs();t.start.isOnlyWeekdayComponent()&&s.add(-7,"days").isBefore(a)?(s=s.add(-7,"days"),t.start.imply("day",s.date()),t.start.imply("month",s.month()+1),t.start.imply("year",s.year())):n.start.isOnlyWeekdayComponent()&&a.add(7,"days").isAfter(s)?(a=a.add(7,"days"),n.start.imply("day",a.date()),n.start.imply("month",a.month()+1),n.start.imply("year",a.year())):[n,t]=[t,n]}let i=t.clone();return i.start=t.start,i.end=n.start,i.index=Math.min(t.index,n.index),t.index<n.index?i.text=t.text+e+n.text:i.text=n.text+e+t.text,i}};Bu.default=Gu});var Bp=b(Wi=>{"use strict";var Sv=Wi&&Wi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Wi,"__esModule",{value:!0});var Rv=Sv(ur()),Hu=class extends Rv.default{patternBetween(){return/^\s*(to|-)\s*$/i}};Wi.default=Hu});var Hp=b(Hn=>{"use strict";Object.defineProperty(Hn,"__esModule",{value:!0});Hn.mergeDateTimeComponent=Hn.mergeDateTimeResult=void 0;var Mv=Be();function xv(r,e){let t=r.clone(),n=r.start,i=e.start;if(t.start=zu(n,i),r.end!=null||e.end!=null){let s=r.end==null?r.start:r.end,a=e.end==null?e.start:e.end,o=zu(s,a);r.end==null&&o.date().getTime()<t.start.date().getTime()&&(o.isCertain("day")?o.assign("day",o.get("day")+1):o.imply("day",o.get("day")+1)),t.end=o}return t}Hn.mergeDateTimeResult=xv;function zu(r,e){let t=r.clone();return e.isCertain("hour")?(t.assign("hour",e.get("hour")),t.assign("minute",e.get("minute")),e.isCertain("second")?(t.assign("second",e.get("second")),e.isCertain("millisecond")?t.assign("millisecond",e.get("millisecond")):t.imply("millisecond",e.get("millisecond"))):(t.imply("second",e.get("second")),t.imply("millisecond",e.get("millisecond")))):(t.imply("hour",e.get("hour")),t.imply("minute",e.get("minute")),t.imply("second",e.get("second")),t.imply("millisecond",e.get("millisecond"))),e.isCertain("timezoneOffset")&&t.assign("timezoneOffset",e.get("timezoneOffset")),e.isCertain("meridiem")?t.assign("meridiem",e.get("meridiem")):e.get("meridiem")!=null&&t.get("meridiem")==null&&t.imply("meridiem",e.get("meridiem")),t.get("meridiem")==Mv.Meridiem.PM&&t.get("hour")<12&&(e.isCertain("hour")?t.assign("hour",t.get("hour")+12):t.imply("hour",t.get("hour")+12)),t}Hn.mergeDateTimeComponent=zu});var yr=b(Vu=>{"use strict";Object.defineProperty(Vu,"__esModule",{value:!0});var Av=Bn(),zp=Hp(),Ku=class extends Av.MergingRefiner{shouldMergeResults(e,t,n){return(t.start.isOnlyDate()&&n.start.isOnlyTime()||n.start.isOnlyDate()&&t.start.isOnlyTime())&&e.match(this.patternBetween())!=null}mergeResults(e,t,n){let i=t.start.isOnlyDate()?zp.mergeDateTimeResult(t,n):zp.mergeDateTimeResult(n,t);return i.index=t.index,i.text=t.text+e+n.text,i}};Vu.default=Ku});var Kp=b(qi=>{"use strict";var Pv=qi&&qi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(qi,"__esModule",{value:!0});var Cv=Pv(yr()),Xu=class extends Cv.default{patternBetween(){return new RegExp("^\\s*(T|at|after|before|on|of|,|-)?\\s*$")}};qi.default=Xu});var Vp=b(Zu=>{"use strict";Object.defineProperty(Zu,"__esModule",{value:!0});var Nv=new RegExp("^\\s*,?\\s*\\(?([A-Z]{2,4})\\)?(?=\\W|$)","i"),Iv={ACDT:630,ACST:570,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,ALMT:360,AMST:-180,AMT:-240,ANAST:720,ANAT:720,AQTT:300,ART:-180,AST:-240,AWDT:540,AWST:480,AZOST:0,AZOT:-60,AZST:300,AZT:240,BNT:480,BOT:-240,BRST:-120,BRT:-180,BST:60,BTT:360,CAST:480,CAT:120,CCT:390,CDT:-300,CEST:120,CET:60,CHADT:825,CHAST:765,CKT:-600,CLST:-180,CLT:-240,COT:-300,CST:-360,CVT:-60,CXT:420,ChST:600,DAVT:420,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEST:180,EET:120,EGST:0,EGT:-60,EST:-300,ET:-300,FJST:780,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GMT:0,GST:240,GYT:-240,HAA:-180,HAC:-300,HADT:-540,HAE:-240,HAP:-420,HAR:-360,HAST:-600,HAT:-90,HAY:-480,HKT:480,HLV:-210,HNA:-240,HNC:-360,HNE:-300,HNP:-480,HNR:-420,HNT:-150,HNY:-540,HOVT:420,ICT:420,IDT:180,IOT:360,IRDT:270,IRKST:540,IRKT:540,IRST:210,IST:330,JST:540,KGT:360,KRAST:480,KRAT:480,KST:540,KUYT:240,LHDT:660,LHST:630,LINT:840,MAGST:720,MAGT:720,MART:-510,MAWT:300,MDT:-360,MESZ:120,MEZ:60,MHT:720,MMT:390,MSD:240,MSK:240,MST:-420,MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:690,NOVST:420,NOVT:360,NPT:345,NST:-150,NUT:-660,NZDT:780,NZST:720,OMSST:420,OMST:420,PDT:-420,PET:-300,PETST:720,PETT:720,PGT:600,PHOT:780,PHT:480,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PT:-480,PWT:540,PYST:-180,PYT:-240,RET:240,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SRT:-180,SST:-660,TAHT:-600,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TVT:720,ULAT:480,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-210,VLAST:660,VLAT:660,VUT:660,WAST:120,WAT:60,WEST:60,WESZ:60,WET:0,WEZ:0,WFT:720,WGST:-120,WGT:-180,WIB:420,WIT:540,WITA:480,WST:780,WT:0,YAKST:600,YAKT:600,YAPT:600,YEKST:360,YEKT:360},Qu=class{constructor(e){this.timezone=Object.assign(Object.assign({},Iv),e)}refine(e,t){var n;let i=(n=e.option.timezones)!==null&&n!==void 0?n:{};return t.forEach(s=>{var a,o;let u=e.text.substring(s.index+s.text.length),l=Nv.exec(u);if(!l)return;let c=l[1].toUpperCase(),f=(o=(a=i[c])!==null&&a!==void 0?a:this.timezone[c])!==null&&o!==void 0?o:null;if(f===null)return;e.debug(()=>{console.log(`Extracting timezone: '${c}' into: ${f} for: ${s.start}`)});let m=s.start.get("timezoneOffset");m!==null&&f!=m&&(s.start.isCertain("timezoneOffset")||c!=l[1])||s.start.isOnlyDate()&&c!=l[1]||(s.text+=l[0],s.start.isCertain("timezoneOffset")||s.start.assign("timezoneOffset",f),s.end!=null&&!s.end.isCertain("timezoneOffset")&&s.end.assign("timezoneOffset",f))}),t}};Zu.default=Qu});var Ea=b(el=>{"use strict";Object.defineProperty(el,"__esModule",{value:!0});var Fv=new RegExp("^\\s*(?:\\(?(?:GMT|UTC)\\s?)?([+-])(\\d{1,2})(?::?(\\d{2}))?\\)?","i"),Lv=1,Uv=2,Wv=3,Ju=class{refine(e,t){return t.forEach(function(n){if(n.start.isCertain("timezoneOffset"))return;let i=e.text.substring(n.index+n.text.length),s=Fv.exec(i);if(!s)return;e.debug(()=>{console.log(`Extracting timezone: '${s[0]}' into : ${n}`)});let a=parseInt(s[Uv]),o=parseInt(s[Wv]||"0"),u=a*60+o;u>14*60||(s[Lv]==="-"&&(u=-u),n.end!=null&&n.end.assign("timezoneOffset",u),n.start.assign("timezoneOffset",u),n.text+=s[0])}),t}};el.default=Ju});var Xp=b(rl=>{"use strict";Object.defineProperty(rl,"__esModule",{value:!0});var tl=class{refine(e,t){if(t.length<2)return t;let n=[],i=t[0];for(let s=1;s<t.length;s++){let a=t[s];a.index<i.index+i.text.length?a.text.length>i.text.length&&(i=a):(n.push(i),i=a)}return i!=null&&n.push(i),n}};rl.default=tl});var Qp=b(Yi=>{"use strict";var qv=Yi&&Yi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Yi,"__esModule",{value:!0});var Yv=qv(me()),nl=class{refine(e,t){return e.option.forwardDate&&t.forEach(function(n){let i=Yv.default(e.refDate);if(n.start.isOnlyDayMonthComponent()&&i.isAfter(n.start.dayjs()))for(let s=0;s<3&&i.isAfter(n.start.dayjs());s++)n.start.imply("year",n.start.get("year")+1),e.debug(()=>{console.log(`Forward yearly adjusted for ${n} (${n.start})`)}),n.end&&!n.end.isCertain("year")&&(n.end.imply("year",n.end.get("year")+1),e.debug(()=>{console.log(`Forward yearly adjusted for ${n} (${n.end})`)}));n.start.isOnlyWeekdayComponent()&&i.isAfter(n.start.dayjs())&&(i.day()>=n.start.get("weekday")?i=i.day(n.start.get("weekday")+7):i=i.day(n.start.get("weekday")),n.start.imply("day",i.date()),n.start.imply("month",i.month()+1),n.start.imply("year",i.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.start})`)}),n.end&&n.end.isOnlyWeekdayComponent()&&(i.day()>n.end.get("weekday")?i=i.day(n.end.get("weekday")+7):i=i.day(n.end.get("weekday")),n.end.imply("day",i.date()),n.end.imply("month",i.month()+1),n.end.imply("year",i.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.end})`)})))}),t}};Yi.default=nl});var Zp=b(sl=>{"use strict";Object.defineProperty(sl,"__esModule",{value:!0});var $v=Bn(),il=class extends $v.Filter{constructor(e){super(),this.strictMode=e}isValid(e,t){return t.text.replace(" ","").match(/^\d*(\.\d*)?$/)?(e.debug(()=>{console.log(`Removing unlikely result '${t.text}'`)}),!1):t.start.isValidDate()?t.end&&!t.end.isValidDate()?(e.debug(()=>{console.log(`Removing invalid result: ${t} (${t.end})`)}),!1):this.strictMode?this.isStrictModeValid(e,t):!0:(e.debug(()=>{console.log(`Removing invalid result: ${t} (${t.start})`)}),!1)}isStrictModeValid(e,t){return t.start.isOnlyWeekdayComponent()?(e.debug(()=>{console.log(`(Strict) Removing weekday only component: ${t} (${t.end})`)}),!1):t.start.isOnlyTime()&&(!t.start.isCertain("hour")||!t.start.isCertain("minute"))?(e.debug(()=>{console.log(`(Strict) Removing uncertain time component: ${t} (${t.end})`)}),!1):!0}};sl.default=il});var ul=b(ol=>{"use strict";Object.defineProperty(ol,"__esModule",{value:!0});var jv=F(),Gv=new RegExp("([0-9]{4})\\-([0-9]{1,2})\\-([0-9]{1,2})(?:T([0-9]{1,2}):([0-9]{1,2})(?::([0-9]{1,2})(?:\\.(\\d{1,4}))?)?(?:Z|([+-]\\d{2}):?(\\d{2})?)?)?(?=\\W|$)","i"),Bv=1,Hv=2,zv=3,Jp=4,Kv=5,em=6,tm=7,rm=8,nm=9,al=class extends jv.AbstractParserWithWordBoundaryChecking{innerPattern(){return Gv}innerExtract(e,t){let n={};if(n.year=parseInt(t[Bv]),n.month=parseInt(t[Hv]),n.day=parseInt(t[zv]),t[Jp]!=null)if(n.hour=parseInt(t[Jp]),n.minute=parseInt(t[Kv]),t[em]!=null&&(n.second=parseInt(t[em])),t[tm]!=null&&(n.millisecond=parseInt(t[tm])),t[rm]==null)n.timezoneOffset=0;else{let i=parseInt(t[rm]),s=0;t[nm]!=null&&(s=parseInt(t[nm]));let a=i*60;a<0?a-=s:a+=s,n.timezoneOffset=a}return n}};ol.default=al});var im=b(cl=>{"use strict";Object.defineProperty(cl,"__esModule",{value:!0});var Vv=Bn(),ll=class extends Vv.MergingRefiner{mergeResults(e,t,n){let i=n.clone();return i.index=t.index,i.text=t.text+e+i.text,i.start.assign("weekday",t.start.get("weekday")),i.end&&i.end.assign("weekday",t.start.get("weekday")),i}shouldMergeResults(e,t,n){return t.start.isOnlyWeekdayComponent()&&!t.start.isCertain("hour")&&n.start.isCertain("day")&&e.match(/^,?\s*$/)!=null}};cl.default=ll});var _r=b(zn=>{"use strict";var fn=zn&&zn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(zn,"__esModule",{value:!0});zn.includeCommonConfiguration=void 0;var Xv=fn(Vp()),Qv=fn(Ea()),sm=fn(Xp()),Zv=fn(Qp()),Jv=fn(Zp()),ew=fn(ul()),tw=fn(im());function rw(r,e=!1){return r.parsers.unshift(new ew.default),r.refiners.unshift(new tw.default),r.refiners.unshift(new Xv.default),r.refiners.unshift(new Qv.default),r.refiners.unshift(new sm.default),r.refiners.push(new sm.default),r.refiners.push(new Zv.default),r.refiners.push(new Jv.default(e)),r}zn.includeCommonConfiguration=rw});var br=b(ye=>{"use strict";var nw=ye&&ye.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ye,"__esModule",{value:!0});ye.noon=ye.morning=ye.midnight=ye.yesterdayEvening=ye.evening=ye.lastNight=ye.tonight=ye.theDayAfter=ye.tomorrow=ye.theDayBefore=ye.yesterday=ye.today=ye.now=void 0;var lr=Ne(),Kn=nw(me()),Tr=Lt(),$i=Be();function iw(r){let e=Kn.default(r.instant),t=new lr.ParsingComponents(r,{});return Tr.assignSimilarDate(t,e),Tr.assignSimilarTime(t,e),r.timezoneOffset!==null&&t.assign("timezoneOffset",e.utcOffset()),t}ye.now=iw;function sw(r){let e=Kn.default(r.instant),t=new lr.ParsingComponents(r,{});return Tr.assignSimilarDate(t,e),Tr.implySimilarTime(t,e),t}ye.today=sw;function aw(r){return am(r,1)}ye.yesterday=aw;function am(r,e){return dl(r,-e)}ye.theDayBefore=am;function ow(r){return dl(r,1)}ye.tomorrow=ow;function dl(r,e){let t=Kn.default(r.instant),n=new lr.ParsingComponents(r,{});return t=t.add(e,"day"),Tr.assignSimilarDate(n,t),Tr.implySimilarTime(n,t),n}ye.theDayAfter=dl;function uw(r,e=22){let t=Kn.default(r.instant),n=new lr.ParsingComponents(r,{});return n.imply("hour",e),n.imply("meridiem",$i.Meridiem.PM),Tr.assignSimilarDate(n,t),n}ye.tonight=uw;function lw(r,e=0){let t=Kn.default(r.instant),n=new lr.ParsingComponents(r,{});return t.hour()<6&&(t=t.add(-1,"day")),Tr.assignSimilarDate(n,t),n.imply("hour",e),n}ye.lastNight=lw;function cw(r,e=20){let t=new lr.ParsingComponents(r,{});return t.imply("meridiem",$i.Meridiem.PM),t.imply("hour",e),t}ye.evening=cw;function dw(r,e=20){let t=Kn.default(r.instant),n=new lr.ParsingComponents(r,{});return t=t.add(-1,"day"),Tr.assignSimilarDate(n,t),n.imply("hour",e),n.imply("meridiem",$i.Meridiem.PM),n}ye.yesterdayEvening=dw;function fw(r){let e=new lr.ParsingComponents(r,{});return e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e}ye.midnight=fw;function pw(r,e=6){let t=new lr.ParsingComponents(r,{});return t.imply("meridiem",$i.Meridiem.AM),t.imply("hour",e),t}ye.morning=pw;function mw(r){let e=new lr.ParsingComponents(r,{});return e.imply("meridiem",$i.Meridiem.AM),e.imply("hour",12),e}ye.noon=mw});var om=b(Kt=>{"use strict";var hw=Kt&&Kt.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),gw=Kt&&Kt.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),yw=Kt&&Kt.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&hw(e,r,t);return gw(e,r),e},_w=Kt&&Kt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Kt,"__esModule",{value:!0});var Tw=_w(me()),bw=F(),vw=Lt(),ji=yw(br()),ww=/(now|today|tonight|tomorrow|tmr|tmrw|yesterday|last\s*night)(?=\W|$)/i,fl=class extends bw.AbstractParserWithWordBoundaryChecking{innerPattern(e){return ww}innerExtract(e,t){let n=Tw.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();switch(i){case"now":return ji.now(e.reference);case"today":return ji.today(e.reference);case"yesterday":return ji.yesterday(e.reference);case"tomorrow":case"tmr":case"tmrw":return ji.tomorrow(e.reference);case"tonight":return ji.tonight(e.reference);default:i.match(/last\s*night/)&&(n.hour()>6&&(n=n.add(-1,"day")),vw.assignSimilarDate(s,n),s.imply("hour",0));break}return s}};Kt.default=fl});var um=b(Gi=>{"use strict";var Ew=Gi&&Gi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Gi,"__esModule",{value:!0});var ka=Be(),kw=F(),Dw=Ew(me()),Ow=Lt(),Sw=/(?:this)?\s{0,3}(morning|afternoon|evening|night|midnight|noon)(?=\W|$)/i,pl=class extends kw.AbstractParserWithWordBoundaryChecking{innerPattern(){return Sw}innerExtract(e,t){let n=Dw.default(e.refDate),i=e.createParsingComponents();switch(t[1].toLowerCase()){case"afternoon":i.imply("meridiem",ka.Meridiem.PM),i.imply("hour",15);break;case"evening":case"night":i.imply("meridiem",ka.Meridiem.PM),i.imply("hour",20);break;case"midnight":Ow.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"morning":i.imply("meridiem",ka.Meridiem.AM),i.imply("hour",6);break;case"noon":i.imply("meridiem",ka.Meridiem.AM),i.imply("hour",12);break}return i}};Gi.default=pl});var pn=b(jr=>{"use strict";var Rw=jr&&jr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(jr,"__esModule",{value:!0});jr.toDayJSClosestWeekday=jr.toDayJSWeekday=void 0;var lm=Rw(me());function Mw(r,e,t){if(!t)return cm(r,e);let n=lm.default(r);switch(t){case"this":n=n.day(e);break;case"next":n=n.day(e+7);break;case"last":n=n.day(e-7);break}return n}jr.toDayJSWeekday=Mw;function cm(r,e){let t=lm.default(r),n=t.day();return Math.abs(e-7-n)<Math.abs(e-n)?t=t.day(e-7):Math.abs(e+7-n)<Math.abs(e-n)?t=t.day(e+7):t=t.day(e),t}jr.toDayJSClosestWeekday=cm});var fm=b(hl=>{"use strict";Object.defineProperty(hl,"__esModule",{value:!0});var dm=it(),xw=be(),Aw=F(),Pw=pn(),Cw=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:on\\s*?)?(?:(this|last|past|next)\\s*)?(${xw.matchAnyPattern(dm.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(this|last|past|next)\\s*week)?(?=\\W|$)`,"i"),Nw=1,Iw=2,Fw=3,ml=class extends Aw.AbstractParserWithWordBoundaryChecking{innerPattern(){return Cw}innerExtract(e,t){let n=t[Iw].toLowerCase(),i=dm.WEEKDAY_DICTIONARY[n],s=t[Nw],a=t[Fw],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o=="last"||o=="past"?u="last":o=="next"?u="next":o=="this"&&(u="this");let l=Pw.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};hl.default=ml});var hm=b(Bi=>{"use strict";var Lw=Bi&&Bi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Bi,"__esModule",{value:!0});var mm=it(),pm=Ne(),Uw=Lw(me()),Ww=F(),qw=be(),Yw=new RegExp(`(this|last|past|next|after\\s*this)\\s*(${qw.matchAnyPattern(mm.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),$w=1,jw=2,gl=class extends Ww.AbstractParserWithWordBoundaryChecking{innerPattern(){return Yw}innerExtract(e,t){let n=t[$w].toLowerCase(),i=t[jw].toLowerCase(),s=mm.TIME_UNIT_DICTIONARY[i];if(n=="next"||n.startsWith("after")){let u={};return u[s]=1,pm.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="last"||n=="past"){let u={};return u[s]=-1,pm.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=Uw.default(e.reference.instant);return i.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):i.match(/month/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):i.match(/year/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};Bi.default=gl});var Vt=b(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.ParsingContext=Qn.Chrono=void 0;var Vn=Ne(),Gw=yl(),Xn=class{constructor(e){e=e||Gw.createCasualConfiguration(),this.parsers=[...e.parsers],this.refiners=[...e.refiners]}clone(){return new Xn({parsers:[...this.parsers],refiners:[...this.refiners]})}parseDate(e,t,n){let i=this.parse(e,t,n);return i.length>0?i[0].start.date():null}parse(e,t,n){let i=new Da(e,t,n),s=[];return this.parsers.forEach(a=>{let o=Xn.executeParser(i,a);s=s.concat(o)}),s.sort((a,o)=>a.index-o.index),this.refiners.forEach(function(a){s=a.refine(i,s)}),s}static executeParser(e,t){let n=[],i=t.pattern(e),s=e.text,a=e.text,o=i.exec(a);for(;o;){let u=o.index+s.length-a.length;o.index=u;let l=t.extract(e,o);if(!l){a=s.substring(o.index+1),o=i.exec(a);continue}let c=null;l instanceof Vn.ParsingResult?c=l:l instanceof Vn.ParsingComponents?(c=e.createParsingResult(o.index,o[0]),c.start=l):c=e.createParsingResult(o.index,o[0],l),e.debug(()=>console.log(`${t.constructor.name} extracted result ${c}`)),n.push(c),a=s.substring(u+c.text.length),o=i.exec(a)}return n}};Qn.Chrono=Xn;var Da=class{constructor(e,t,n){this.text=e,this.reference=new Vn.ReferenceWithTimezone(t),this.option=n!=null?n:{},this.refDate=this.reference.instant}createParsingComponents(e){return e instanceof Vn.ParsingComponents?e:new Vn.ParsingComponents(this.reference,e)}createParsingResult(e,t,n,i){let s=typeof t=="string"?t:this.text.substring(e,t),a=n?this.createParsingComponents(n):null,o=i?this.createParsingComponents(i):null;return new Vn.ParsingResult(this.reference,e,s,a,o)}debug(e){this.option.debug&&(this.option.debug instanceof Function?this.option.debug(e):this.option.debug.debug(e))}};Qn.ParsingContext=Da});var mn=b(bl=>{"use strict";Object.defineProperty(bl,"__esModule",{value:!0});var gm=nt(),Bw=new RegExp("([^\\d]|^)([0-3]{0,1}[0-9]{1})[\\/\\.\\-]([0-3]{0,1}[0-9]{1})(?:[\\/\\.\\-]([0-9]{4}|[0-9]{2}))?(\\W|$)","i"),Oa=1,ym=5,_m=2,Tm=3,_l=4,Tl=class{constructor(e){this.groupNumberMonth=e?Tm:_m,this.groupNumberDay=e?_m:Tm}pattern(){return Bw}extract(e,t){if(t[Oa]=="/"||t[ym]=="/"){t.index+=t[0].length;return}let n=t.index+t[Oa].length,i=t[0].substr(t[Oa].length,t[0].length-t[Oa].length-t[ym].length);if(i.match(/^\d\.\d$/)||i.match(/^\d\.\d{1,2}\.\d{1,2}\s*$/)||!t[_l]&&t[0].indexOf("/")<0)return;let s=e.createParsingResult(n,i),a=parseInt(t[this.groupNumberMonth]),o=parseInt(t[this.groupNumberDay]);if((a<1||a>12)&&a>12)if(o>=1&&o<=12&&a<=31)[o,a]=[a,o];else return null;if(o<1||o>31)return null;if(s.start.assign("day",o),s.start.assign("month",a),t[_l]){let u=parseInt(t[_l]),l=gm.findMostLikelyADYear(u);s.start.assign("year",l)}else{let u=gm.findYearClosestToRef(e.refDate,o,a);s.start.imply("year",u)}return s}};bl.default=Tl});var vm=b(wl=>{"use strict";Object.defineProperty(wl,"__esModule",{value:!0});var bm=it(),Hw=Ne(),zw=F(),Kw=Ut(),Vw=new RegExp(`(this|last|past|next|after|\\+|-)\\s*(${bm.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),vl=class extends zw.AbstractParserWithWordBoundaryChecking{innerPattern(){return Vw}innerExtract(e,t){let n=t[1].toLowerCase(),i=bm.parseTimeUnits(t[2]);switch(n){case"last":case"past":case"-":i=Kw.reverseTimeUnits(i);break}return Hw.ParsingComponents.createRelativeFromReference(e.reference,i)}};wl.default=vl});var Em=b(Dl=>{"use strict";Object.defineProperty(Dl,"__esModule",{value:!0});var Xw=Bn(),El=Ne(),Qw=it(),Zw=Ut();function wm(r){return r.text.match(/\s+(before|from)$/i)!=null}function Jw(r){return r.text.match(/\s+(after|since)$/i)!=null}var kl=class extends Xw.MergingRefiner{patternBetween(){return/^\s*$/i}shouldMergeResults(e,t,n){return!e.match(this.patternBetween())||!wm(t)&&!Jw(t)?!1:!!n.start.get("day")&&!!n.start.get("month")&&!!n.start.get("year")}mergeResults(e,t,n){let i=Qw.parseTimeUnits(t.text);wm(t)&&(i=Zw.reverseTimeUnits(i));let s=El.ParsingComponents.createRelativeFromReference(new El.ReferenceWithTimezone(n.start.date()),i);return new El.ParsingResult(n.reference,t.index,`${t.text}${e}${n.text}`,s)}};Dl.default=kl});var yl=b(qe=>{"use strict";var ze=qe&&qe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(qe,"__esModule",{value:!0});qe.createConfiguration=qe.createCasualConfiguration=qe.parseDate=qe.parse=qe.GB=qe.strict=qe.casual=void 0;var eE=ze(wp()),tE=ze(Rp()),rE=ze(Cp()),nE=ze(Fp()),iE=ze(Wp()),sE=ze(qp()),aE=ze($p()),oE=ze(jp()),uE=ze(Gp()),lE=ze(Bp()),cE=ze(Kp()),dE=_r(),fE=ze(om()),pE=ze(um()),mE=ze(fm()),hE=ze(hm()),Ol=Vt(),gE=ze(mn()),yE=ze(vm()),_E=ze(Em());qe.casual=new Ol.Chrono(km(!1));qe.strict=new Ol.Chrono(Sa(!0,!1));qe.GB=new Ol.Chrono(Sa(!1,!0));function TE(r,e,t){return qe.casual.parse(r,e,t)}qe.parse=TE;function bE(r,e,t){return qe.casual.parseDate(r,e,t)}qe.parseDate=bE;function km(r=!1){let e=Sa(!1,r);return e.parsers.unshift(new fE.default),e.parsers.unshift(new pE.default),e.parsers.unshift(new nE.default),e.parsers.unshift(new hE.default),e.parsers.unshift(new yE.default),e}qe.createCasualConfiguration=km;function Sa(r=!0,e=!1){return dE.includeCommonConfiguration({parsers:[new gE.default(e),new eE.default,new tE.default,new rE.default,new mE.default,new iE.default,new sE.default,new aE.default(r),new oE.default(r),new uE.default(r)],refiners:[new _E.default,new cE.default,new lE.default]},r)}qe.createConfiguration=Sa});var Dm=b(Rl=>{"use strict";Object.defineProperty(Rl,"__esModule",{value:!0});var vE=dn(),Sl=class extends vE.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:um|von)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|bis)\\s*"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}};Rl.default=Sl});var Hi=b(Ee=>{"use strict";Object.defineProperty(Ee,"__esModule",{value:!0});Ee.parseTimeUnits=Ee.TIME_UNITS_PATTERN=Ee.parseYear=Ee.YEAR_PATTERN=Ee.parseNumberPattern=Ee.NUMBER_PATTERN=Ee.TIME_UNIT_DICTIONARY=Ee.INTEGER_WORD_DICTIONARY=Ee.MONTH_DICTIONARY=Ee.WEEKDAY_DICTIONARY=void 0;var Ml=be(),wE=nt();Ee.WEEKDAY_DICTIONARY={sonntag:0,so:0,montag:1,mo:1,dienstag:2,di:2,mittwoch:3,mi:3,donnerstag:4,do:4,freitag:5,fr:5,samstag:6,sa:6};Ee.MONTH_DICTIONARY={januar:1,j\u00E4nner:1,janner:1,jan:1,"jan.":1,februar:2,feber:2,feb:2,"feb.":2,m\u00E4rz:3,maerz:3,m\u00E4r:3,"m\xE4r.":3,mrz:3,"mrz.":3,april:4,apr:4,"apr.":4,mai:5,juni:6,jun:6,"jun.":6,juli:7,jul:7,"jul.":7,august:8,aug:8,"aug.":8,september:9,sep:9,"sep.":9,sept:9,"sept.":9,oktober:10,okt:10,"okt.":10,november:11,nov:11,"nov.":11,dezember:12,dez:12,"dez.":12};Ee.INTEGER_WORD_DICTIONARY={eins:1,eine:1,einem:1,einen:1,einer:1,zwei:2,drei:3,vier:4,f\u00FCnf:5,fuenf:5,sechs:6,sieben:7,acht:8,neun:9,zehn:10,elf:11,zw\u00F6lf:12,zwoelf:12};Ee.TIME_UNIT_DICTIONARY={sek:"second",sekunde:"second",sekunden:"second",min:"minute",minute:"minute",minuten:"minute",h:"hour",std:"hour",stunde:"hour",stunden:"hour",tag:"d",tage:"d",tagen:"d",woche:"week",wochen:"week",monat:"month",monate:"month",monaten:"month",monats:"month",quartal:"quarter",quartals:"quarter",quartale:"quarter",quartalen:"quarter",a:"year",j:"year",jr:"year",jahr:"year",jahre:"year",jahren:"year",jahres:"year"};Ee.NUMBER_PATTERN=`(?:${Ml.matchAnyPattern(Ee.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s*an?)?|an?\\b(?:\\s*few)?|few|several|a?\\s*couple\\s*(?:of)?)`;function Sm(r){let e=r.toLowerCase();return Ee.INTEGER_WORD_DICTIONARY[e]!==void 0?Ee.INTEGER_WORD_DICTIONARY[e]:e==="a"||e==="an"?1:e.match(/few/)?3:e.match(/half/)?.5:e.match(/couple/)?2:e.match(/several/)?7:parseFloat(e)}Ee.parseNumberPattern=Sm;Ee.YEAR_PATTERN="(?:[0-9]{1,4}(?:\\s*[vn]\\.?\\s*(?:C(?:hr)?|(?:u\\.?|d\\.?(?:\\s*g\\.?)?)?\\s*Z)\\.?|\\s*(?:u\\.?|d\\.?(?:\\s*g\\.)?)\\s*Z\\.?)?)";function EE(r){if(/v/i.test(r))return-parseInt(r.replace(/[^0-9]+/gi,""));if(/n/i.test(r))return parseInt(r.replace(/[^0-9]+/gi,""));if(/z/i.test(r))return parseInt(r.replace(/[^0-9]+/gi,""));let e=parseInt(r);return wE.findMostLikelyADYear(e)}Ee.parseYear=EE;var Rm=`(${Ee.NUMBER_PATTERN})\\s{0,5}(${Ml.matchAnyPattern(Ee.TIME_UNIT_DICTIONARY)})\\s{0,5}`,Om=new RegExp(Rm,"i");Ee.TIME_UNITS_PATTERN=Ml.repeatedTimeunitPattern("",Rm);function kE(r){let e={},t=r,n=Om.exec(t);for(;n;)DE(e,n),t=t.substring(n[0].length),n=Om.exec(t);return e}Ee.parseTimeUnits=kE;function DE(r,e){let t=Sm(e[1]),n=Ee.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var xm=b(Al=>{"use strict";Object.defineProperty(Al,"__esModule",{value:!0});var Mm=Hi(),OE=be(),SE=F(),RE=pn(),ME=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:a[mn]\\s*?)?(?:(diese[mn]|letzte[mn]|n(?:\xE4|ae)chste[mn])\\s*)?(${OE.matchAnyPattern(Mm.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(diese|letzte|n(?:\xE4|ae)chste)\\s*woche)?(?=\\W|$)`,"i"),xE=1,AE=3,PE=2,xl=class extends SE.AbstractParserWithWordBoundaryChecking{innerPattern(){return ME}innerExtract(e,t){let n=t[PE].toLowerCase(),i=Mm.WEEKDAY_DICTIONARY[n],s=t[xE],a=t[AE],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o.match(/letzte/)?u="last":o.match(/chste/)?u="next":o.match(/diese/)&&(u="this");let l=RE.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Al.default=xl});var Nm=b(Pl=>{"use strict";Object.defineProperty(Pl,"__esModule",{value:!0});var Gr=Be(),CE=new RegExp("(^|\\s|T)(?:(?:um|von)\\s*)?(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s)?)?(?:\\s*Uhr)?(?:\\s*(morgens|vormittags|nachmittags|abends|nachts|am\\s+(?:Morgen|Vormittag|Nachmittag|Abend)|in\\s+der\\s+Nacht))?(?=\\W|$)","i"),NE=new RegExp("^\\s*(\\-|\\\u2013|\\~|\\\u301C|bis(?:\\s+um)?|\\?)\\s*(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s)?)?(?:\\s*Uhr)?(?:\\s*(morgens|vormittags|nachmittags|abends|nachts|am\\s+(?:Morgen|Vormittag|Nachmittag|Abend)|in\\s+der\\s+Nacht))?(?=\\W|$)","i"),IE=2,Am=3,Pm=4,Cm=5,Zn=class{pattern(e){return CE}extract(e,t){let n=e.createParsingResult(t.index+t[1].length,t[0].substring(t[1].length));if(n.text.match(/^\d{4}$/)||(n.start=Zn.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let i=e.text.substring(t.index+t[0].length),s=NE.exec(i);return s&&(n.end=Zn.extractTimeComponent(n.start.clone(),s),n.end&&(n.text+=s[0])),n}static extractTimeComponent(e,t){let n=0,i=0,s=null;if(n=parseInt(t[IE]),t[Am]!=null&&(i=parseInt(t[Am])),i>=60||n>24)return null;if(n>=12&&(s=Gr.Meridiem.PM),t[Cm]!=null){if(n>12)return null;let a=t[Cm].toLowerCase();a.match(/morgen|vormittag/)&&(s=Gr.Meridiem.AM,n==12&&(n=0)),a.match(/nachmittag|abend/)&&(s=Gr.Meridiem.PM,n!=12&&(n+=12)),a.match(/nacht/)&&(n==12?(s=Gr.Meridiem.AM,n=0):n<6?s=Gr.Meridiem.AM:(s=Gr.Meridiem.PM,n+=12))}if(e.assign("hour",n),e.assign("minute",i),s!==null?e.assign("meridiem",s):n<12?e.imply("meridiem",Gr.Meridiem.AM):e.imply("meridiem",Gr.Meridiem.PM),t[Pm]!=null){let a=parseInt(t[Pm]);if(a>=60)return null;e.assign("second",a)}return e}};Pl.default=Zn});var Im=b(zi=>{"use strict";var FE=zi&&zi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(zi,"__esModule",{value:!0});var LE=FE(ur()),Cl=class extends LE.default{patternBetween(){return/^\s*(bis(?:\s*(?:am|zum))?|-)\s*$/i}};zi.default=Cl});var Fm=b(Ki=>{"use strict";var UE=Ki&&Ki.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ki,"__esModule",{value:!0});var WE=UE(yr()),Nl=class extends WE.default{patternBetween(){return new RegExp("^\\s*(T|um|am|,|-)?\\s*$")}};Ki.default=Nl});var Il=b(Xi=>{"use strict";var qE=Xi&&Xi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Xi,"__esModule",{value:!0});var YE=qE(me()),hn=Be(),$E=F(),jE=Lt(),GE=Ut(),Vi=class extends $E.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(diesen)?\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht)(?=\W|$)/i}innerExtract(e,t){let n=YE.default(e.refDate),i=t[2].toLowerCase(),s=e.createParsingComponents();return jE.implySimilarTime(s,n),Vi.extractTimeComponents(s,i)}static extractTimeComponents(e,t){switch(t){case"morgen":e.imply("hour",6),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",hn.Meridiem.AM);break;case"vormittag":e.imply("hour",9),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",hn.Meridiem.AM);break;case"mittag":case"mittags":e.imply("hour",12),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",hn.Meridiem.AM);break;case"nachmittag":e.imply("hour",15),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",hn.Meridiem.PM);break;case"abend":e.imply("hour",18),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",hn.Meridiem.PM);break;case"nacht":e.imply("hour",22),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",hn.Meridiem.PM);break;case"mitternacht":e.get("hour")>1&&(e=GE.addImpliedTimeUnits(e,{day:1})),e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",hn.Meridiem.AM);break}return e}};Xi.default=Vi});var Wm=b(Xt=>{"use strict";var BE=Xt&&Xt.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),HE=Xt&&Xt.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),zE=Xt&&Xt.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&BE(e,r,t);return HE(e,r),e},Um=Xt&&Xt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Xt,"__esModule",{value:!0});var KE=Um(me()),VE=F(),gn=Lt(),XE=Um(Il()),Lm=zE(br()),QE=new RegExp("(jetzt|heute|morgen|\xFCbermorgen|uebermorgen|gestern|vorgestern|letzte\\s*nacht)(?:\\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht))?(?=\\W|$)","i"),ZE=1,JE=2,Fl=class extends VE.AbstractParserWithWordBoundaryChecking{innerPattern(e){return QE}innerExtract(e,t){let n=KE.default(e.refDate),i=(t[ZE]||"").toLowerCase(),s=(t[JE]||"").toLowerCase(),a=e.createParsingComponents();switch(i){case"jetzt":a=Lm.now(e.reference);break;case"heute":a=Lm.today(e.reference);break;case"morgen":gn.assignTheNextDay(a,n);break;case"\xFCbermorgen":case"uebermorgen":n=n.add(1,"day"),gn.assignTheNextDay(a,n);break;case"gestern":n=n.add(-1,"day"),gn.assignSimilarDate(a,n),gn.implySimilarTime(a,n);break;case"vorgestern":n=n.add(-2,"day"),gn.assignSimilarDate(a,n),gn.implySimilarTime(a,n);break;default:i.match(/letzte\s*nacht/)&&(n.hour()>6&&(n=n.add(-1,"day")),gn.assignSimilarDate(a,n),a.imply("hour",0));break}return s&&(a=XE.default.extractTimeComponents(a,s)),a}};Xt.default=Fl});var Bm=b(Ul=>{"use strict";Object.defineProperty(Ul,"__esModule",{value:!0});var e1=nt(),jm=Hi(),Gm=Hi(),t1=be(),r1=F(),n1=new RegExp(`(?:am\\s*?)?(?:den\\s*?)?([0-9]{1,2})\\.(?:\\s*(?:bis(?:\\s*(?:am|zum))?|\\-|\\\u2013|\\s)\\s*([0-9]{1,2})\\.?)?\\s*(${t1.matchAnyPattern(jm.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${Gm.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),qm=1,Ym=2,i1=3,$m=4,Ll=class extends r1.AbstractParserWithWordBoundaryChecking{innerPattern(){return n1}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=jm.MONTH_DICTIONARY[t[i1].toLowerCase()],s=parseInt(t[qm]);if(s>31)return t.index=t.index+t[qm].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[$m]){let a=Gm.parseYear(t[$m]);n.start.assign("year",a)}else{let a=e1.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[Ym]){let a=parseInt(t[Ym]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Ul.default=Ll});var Hm=b(ql=>{"use strict";Object.defineProperty(ql,"__esModule",{value:!0});var Ra=Hi(),s1=Ne(),a1=F(),o1=Ut(),u1=be(),Wl=class extends a1.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:\\s*((?:n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?|vor|in)\\s*)?(${Ra.NUMBER_PATTERN})?(?:\\s*(n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?)?\\s*(${u1.matchAnyPattern(Ra.TIME_UNIT_DICTIONARY)})`,"i")}innerExtract(e,t){let n=t[2]?Ra.parseNumberPattern(t[2]):1,i=Ra.TIME_UNIT_DICTIONARY[t[4].toLowerCase()],s={};s[i]=n;let a=t[1]||t[3]||"";if(a=a.toLowerCase(),!!a)return(/vor/.test(a)||/letzte/.test(a)||/vergangen/.test(a))&&(s=o1.reverseTimeUnits(s)),s1.ParsingComponents.createRelativeFromReference(e.reference,s)}};ql.default=Wl});var Vm=b(Ke=>{"use strict";var Qt=Ke&&Ke.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ke,"__esModule",{value:!0});Ke.createConfiguration=Ke.createCasualConfiguration=Ke.parseDate=Ke.parse=Ke.strict=Ke.casual=void 0;var l1=_r(),zm=Vt(),c1=Qt(mn()),d1=Qt(ul()),f1=Qt(Dm()),p1=Qt(xm()),m1=Qt(Nm()),h1=Qt(Im()),g1=Qt(Fm()),y1=Qt(Wm()),_1=Qt(Il()),T1=Qt(Bm()),b1=Qt(Hm());Ke.casual=new zm.Chrono(Km());Ke.strict=new zm.Chrono(Yl(!0));function v1(r,e,t){return Ke.casual.parse(r,e,t)}Ke.parse=v1;function w1(r,e,t){return Ke.casual.parseDate(r,e,t)}Ke.parseDate=w1;function Km(r=!0){let e=Yl(!1,r);return e.parsers.unshift(new _1.default),e.parsers.unshift(new y1.default),e.parsers.unshift(new b1.default),e}Ke.createCasualConfiguration=Km;function Yl(r=!0,e=!0){return l1.includeCommonConfiguration({parsers:[new d1.default,new c1.default(e),new f1.default,new m1.default,new T1.default,new p1.default],refiners:[new h1.default,new g1.default]},r)}Ke.createConfiguration=Yl});var Qm=b(Zt=>{"use strict";var E1=Zt&&Zt.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),k1=Zt&&Zt.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),D1=Zt&&Zt.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&E1(e,r,t);return k1(e,r),e},O1=Zt&&Zt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Zt,"__esModule",{value:!0});var S1=O1(me()),R1=Be(),M1=F(),Xm=Lt(),Ma=D1(br()),$l=class extends M1.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(maintenant|aujourd'hui|demain|hier|cette\s*nuit|la\s*veille)(?=\W|$)/i}innerExtract(e,t){let n=S1.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();switch(i){case"maintenant":return Ma.now(e.reference);case"aujourd'hui":return Ma.today(e.reference);case"hier":return Ma.yesterday(e.reference);case"demain":return Ma.tomorrow(e.reference);default:i.match(/cette\s*nuit/)?(Xm.assignSimilarDate(s,n),s.imply("hour",22),s.imply("meridiem",R1.Meridiem.PM)):i.match(/la\s*veille/)&&(n=n.add(-1,"day"),Xm.assignSimilarDate(s,n),s.imply("hour",0))}return s}};Zt.default=$l});var Zm=b(Gl=>{"use strict";Object.defineProperty(Gl,"__esModule",{value:!0});var Qi=Be(),x1=F(),jl=class extends x1.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(cet?)?\s*(matin|soir|après-midi|aprem|a midi|à minuit)(?=\W|$)/i}innerExtract(e,t){let n=t[2].toLowerCase(),i=e.createParsingComponents();switch(n){case"apr\xE8s-midi":case"aprem":i.imply("hour",14),i.imply("minute",0),i.imply("meridiem",Qi.Meridiem.PM);break;case"soir":i.imply("hour",18),i.imply("minute",0),i.imply("meridiem",Qi.Meridiem.PM);break;case"matin":i.imply("hour",8),i.imply("minute",0),i.imply("meridiem",Qi.Meridiem.AM);break;case"a midi":i.imply("hour",12),i.imply("minute",0),i.imply("meridiem",Qi.Meridiem.AM);break;case"\xE0 minuit":i.imply("hour",0),i.imply("meridiem",Qi.Meridiem.AM);break}return i}};Gl.default=jl});var Jm=b(Hl=>{"use strict";Object.defineProperty(Hl,"__esModule",{value:!0});var A1=dn(),Bl=class extends A1.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:[\xE0a])\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|[\xE0a]|\\?)\\s*"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}};Hl.default=Bl});var eh=b(Zi=>{"use strict";var P1=Zi&&Zi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Zi,"__esModule",{value:!0});var C1=P1(yr()),zl=class extends C1.default{patternBetween(){return new RegExp("^\\s*(T|\xE0|a|vers|de|,|-)?\\s*$")}};Zi.default=zl});var th=b(Ji=>{"use strict";var N1=Ji&&Ji.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ji,"__esModule",{value:!0});var I1=N1(ur()),Kl=class extends I1.default{patternBetween(){return/^\s*(à|a|-)\s*$/i}};Ji.default=Kl});var Br=b(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.parseTimeUnits=he.TIME_UNITS_PATTERN=he.parseYear=he.YEAR_PATTERN=he.parseOrdinalNumberPattern=he.ORDINAL_NUMBER_PATTERN=he.parseNumberPattern=he.NUMBER_PATTERN=he.TIME_UNIT_DICTIONARY=he.INTEGER_WORD_DICTIONARY=he.MONTH_DICTIONARY=he.WEEKDAY_DICTIONARY=void 0;var Vl=be();he.WEEKDAY_DICTIONARY={dimanche:0,dim:0,lundi:1,lun:1,mardi:2,mar:2,mercredi:3,mer:3,jeudi:4,jeu:4,vendredi:5,ven:5,samedi:6,sam:6};he.MONTH_DICTIONARY={janvier:1,jan:1,"jan.":1,f\u00E9vrier:2,f\u00E9v:2,"f\xE9v.":2,fevrier:2,fev:2,"fev.":2,mars:3,mar:3,"mar.":3,avril:4,avr:4,"avr.":4,mai:5,juin:6,jun:6,juillet:7,juil:7,jul:7,"jul.":7,ao\u00FBt:8,aout:8,septembre:9,sep:9,"sep.":9,sept:9,"sept.":9,octobre:10,oct:10,"oct.":10,novembre:11,nov:11,"nov.":11,d\u00E9cembre:12,decembre:12,dec:12,"dec.":12};he.INTEGER_WORD_DICTIONARY={un:1,deux:2,trois:3,quatre:4,cinq:5,six:6,sept:7,huit:8,neuf:9,dix:10,onze:11,douze:12,treize:13};he.TIME_UNIT_DICTIONARY={sec:"second",seconde:"second",secondes:"second",min:"minute",mins:"minute",minute:"minute",minutes:"minute",h:"hour",hr:"hour",hrs:"hour",heure:"hour",heures:"hour",jour:"d",jours:"d",semaine:"week",semaines:"week",mois:"month",trimestre:"quarter",trimestres:"quarter",ans:"year",ann\u00E9e:"year",ann\u00E9es:"year"};he.NUMBER_PATTERN=`(?:${Vl.matchAnyPattern(he.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|une?\\b|quelques?|demi-?)`;function nh(r){let e=r.toLowerCase();return he.INTEGER_WORD_DICTIONARY[e]!==void 0?he.INTEGER_WORD_DICTIONARY[e]:e==="une"||e==="un"?1:e.match(/quelques?/)?3:e.match(/demi-?/)?.5:parseFloat(e)}he.parseNumberPattern=nh;he.ORDINAL_NUMBER_PATTERN="(?:[0-9]{1,2}(?:er)?)";function F1(r){let e=r.toLowerCase();return e=e.replace(/(?:er)$/i,""),parseInt(e)}he.parseOrdinalNumberPattern=F1;he.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:AC|AD|p\\.\\s*C(?:hr?)?\\.\\s*n\\.)|[1-2][0-9]{3}|[5-9][0-9])";function L1(r){if(/AC/i.test(r))return r=r.replace(/BC/i,""),-parseInt(r);if(/AD/i.test(r)||/C/i.test(r))return r=r.replace(/[^\d]+/i,""),parseInt(r);let e=parseInt(r);return e<100&&(e>50?e=e+1900:e=e+2e3),e}he.parseYear=L1;var ih=`(${he.NUMBER_PATTERN})\\s{0,5}(${Vl.matchAnyPattern(he.TIME_UNIT_DICTIONARY)})\\s{0,5}`,rh=new RegExp(ih,"i");he.TIME_UNITS_PATTERN=Vl.repeatedTimeunitPattern("",ih);function U1(r){let e={},t=r,n=rh.exec(t);for(;n;)W1(e,n),t=t.substring(n[0].length),n=rh.exec(t);return e}he.parseTimeUnits=U1;function W1(r,e){let t=nh(e[1]),n=he.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var ah=b(Ql=>{"use strict";Object.defineProperty(Ql,"__esModule",{value:!0});var sh=Br(),q1=be(),Y1=F(),$1=pn(),j1=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(?:ce)\\s*)?(${q1.matchAnyPattern(sh.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(dernier|prochain)\\s*)?(?=\\W|\\d|$)`,"i"),G1=1,B1=2,Xl=class extends Y1.AbstractParserWithWordBoundaryChecking{innerPattern(){return j1}innerExtract(e,t){let n=t[G1].toLowerCase(),i=sh.WEEKDAY_DICTIONARY[n];if(i===void 0)return null;let s=t[B1];s=s||"",s=s.toLowerCase();let a=null;s=="dernier"?a="last":s=="prochain"&&(a="next");let o=$1.toDayJSWeekday(e.refDate,i,a);return e.createParsingComponents().assign("weekday",i).imply("day",o.date()).imply("month",o.month()+1).imply("year",o.year())}};Ql.default=Xl});var ch=b(Zl=>{"use strict";Object.defineProperty(Zl,"__esModule",{value:!0});var es=Be(),H1=new RegExp("(^|\\s|T)(?:(?:[\xE0a])\\s*)?(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s|:)?)?(?:\\s*(A\\.M\\.|P\\.M\\.|AM?|PM?))?(?=\\W|$)","i"),z1=new RegExp("^\\s*(\\-|\\\u2013|\\~|\\\u301C|[\xE0a]|\\?)\\s*(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s|:)?)?(?:\\s*(A\\.M\\.|P\\.M\\.|AM?|PM?))?(?=\\W|$)","i"),K1=2,oh=3,uh=4,lh=5,Jn=class{pattern(e){return H1}extract(e,t){let n=e.createParsingResult(t.index+t[1].length,t[0].substring(t[1].length));if(n.text.match(/^\d{4}$/)||(n.start=Jn.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let i=e.text.substring(t.index+t[0].length),s=z1.exec(i);return s&&(n.end=Jn.extractTimeComponent(n.start.clone(),s),n.end&&(n.text+=s[0])),n}static extractTimeComponent(e,t){let n=0,i=0,s=null;if(n=parseInt(t[K1]),t[oh]!=null&&(i=parseInt(t[oh])),i>=60||n>24)return null;if(n>=12&&(s=es.Meridiem.PM),t[lh]!=null){if(n>12)return null;let a=t[lh][0].toLowerCase();a=="a"&&(s=es.Meridiem.AM,n==12&&(n=0)),a=="p"&&(s=es.Meridiem.PM,n!=12&&(n+=12))}if(e.assign("hour",n),e.assign("minute",i),s!==null?e.assign("meridiem",s):n<12?e.imply("meridiem",es.Meridiem.AM):e.imply("meridiem",es.Meridiem.PM),t[uh]!=null){let a=parseInt(t[uh]);if(a>=60)return null;e.assign("second",a)}return e}};Zl.default=Jn});var gh=b(ec=>{"use strict";Object.defineProperty(ec,"__esModule",{value:!0});var V1=nt(),mh=Br(),hh=Br(),xa=Br(),X1=be(),Q1=F(),Z1=new RegExp(`(?:on\\s*?)?(${xa.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:au|\\-|\\\u2013|jusqu'au?|\\s)\\s*(${xa.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:de)?\\s*)(${X1.matchAnyPattern(mh.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${hh.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),dh=1,fh=2,J1=3,ph=4,Jl=class extends Q1.AbstractParserWithWordBoundaryChecking{innerPattern(){return Z1}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=mh.MONTH_DICTIONARY[t[J1].toLowerCase()],s=xa.parseOrdinalNumberPattern(t[dh]);if(s>31)return t.index=t.index+t[dh].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[ph]){let a=hh.parseYear(t[ph]);n.start.assign("year",a)}else{let a=V1.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[fh]){let a=xa.parseOrdinalNumberPattern(t[fh]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};ec.default=Jl});var _h=b(rc=>{"use strict";Object.defineProperty(rc,"__esModule",{value:!0});var yh=Br(),ek=Ne(),tk=F(),rk=Ut(),tc=class extends tk.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`il y a\\s*(${yh.TIME_UNITS_PATTERN})(?=(?:\\W|$))`,"i")}innerExtract(e,t){let n=yh.parseTimeUnits(t[1]),i=rk.reverseTimeUnits(n);return ek.ParsingComponents.createRelativeFromReference(e.reference,i)}};rc.default=tc});var bh=b(ic=>{"use strict";Object.defineProperty(ic,"__esModule",{value:!0});var Th=Br(),nk=Ne(),ik=F(),nc=class extends ik.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp(`(?:dans|en|pour|pendant|de)\\s*(${Th.TIME_UNITS_PATTERN})(?=\\W|$)`,"i")}innerExtract(e,t){let n=Th.parseTimeUnits(t[1]);return nk.ParsingComponents.createRelativeFromReference(e.reference,n)}};ic.default=nc});var vh=b(ac=>{"use strict";Object.defineProperty(ac,"__esModule",{value:!0});var Aa=Br(),sk=Ne(),ak=F(),ok=Ut(),uk=be(),sc=class extends ak.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:les?|la|l'|du|des?)\\s*(${Aa.NUMBER_PATTERN})?(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?\\s*(${uk.matchAnyPattern(Aa.TIME_UNIT_DICTIONARY)})(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?`,"i")}innerExtract(e,t){let n=t[1]?Aa.parseNumberPattern(t[1]):1,i=Aa.TIME_UNIT_DICTIONARY[t[3].toLowerCase()],s={};s[i]=n;let a=t[2]||t[4]||"";if(a=a.toLowerCase(),!!a)return(/derni[eè]re?s?/.test(a)||/pass[ée]e?s?/.test(a)||/pr[ée]c[ée]dents?/.test(a))&&(s=ok.reverseTimeUnits(s)),sk.ParsingComponents.createRelativeFromReference(e.reference,s)}};ac.default=sc});var kh=b(Ve=>{"use strict";var Wt=Ve&&Ve.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ve,"__esModule",{value:!0});Ve.createConfiguration=Ve.createCasualConfiguration=Ve.parseDate=Ve.parse=Ve.strict=Ve.casual=void 0;var lk=_r(),wh=Vt(),ck=Wt(Qm()),dk=Wt(Zm()),fk=Wt(mn()),pk=Wt(Jm()),mk=Wt(eh()),hk=Wt(th()),gk=Wt(ah()),yk=Wt(ch()),_k=Wt(gh()),Tk=Wt(_h()),bk=Wt(bh()),vk=Wt(vh());Ve.casual=new wh.Chrono(Eh());Ve.strict=new wh.Chrono(oc(!0));function wk(r,e,t){return Ve.casual.parse(r,e,t)}Ve.parse=wk;function Ek(r,e,t){return Ve.casual.parseDate(r,e,t)}Ve.parseDate=Ek;function Eh(r=!0){let e=oc(!1,r);return e.parsers.unshift(new ck.default),e.parsers.unshift(new dk.default),e.parsers.unshift(new vk.default),e}Ve.createCasualConfiguration=Eh;function oc(r=!0,e=!0){return lk.includeCommonConfiguration({parsers:[new fk.default(e),new _k.default,new pk.default,new yk.default,new Tk.default,new bk.default,new gk.default],refiners:[new mk.default,new hk.default]},r)}Ve.createConfiguration=oc});var Dh=b(Pa=>{"use strict";Object.defineProperty(Pa,"__esModule",{value:!0});Pa.toHankaku=void 0;function kk(r){return String(r).replace(/\u2019/g,"'").replace(/\u201D/g,'"').replace(/\u3000/g," ").replace(/\uFFE5/g,"\xA5").replace(/[\uFF01\uFF03-\uFF06\uFF08\uFF09\uFF0C-\uFF19\uFF1C-\uFF1F\uFF21-\uFF3B\uFF3D\uFF3F\uFF41-\uFF5B\uFF5D\uFF5E]/g,Dk)}Pa.toHankaku=kk;function Dk(r){return String.fromCharCode(r.charCodeAt(0)-65248)}});var Sh=b(ts=>{"use strict";var Ok=ts&&ts.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ts,"__esModule",{value:!0});var uc=Dh(),Sk=nt(),Rk=Ok(me()),Mk=/(?:(?:([同今本])|((昭和|平成|令和)?([0-9-]{1,4}|元)))年\s*)?([0-9-]{1,2})月\s*([0-9-]{1,2})日/i,Oh=1,xk=2,lc=3,Ak=4,Pk=5,Ck=6,cc=class{pattern(){return Mk}extract(e,t){let n=parseInt(uc.toHankaku(t[Pk])),i=parseInt(uc.toHankaku(t[Ck])),s=e.createParsingComponents({day:i,month:n});if(t[Oh]&&t[Oh].match("\u540C|\u4ECA|\u672C")){let a=Rk.default(e.refDate);s.assign("year",a.year())}if(t[xk]){let a=t[Ak],o=a=="\u5143"?1:parseInt(uc.toHankaku(a));t[lc]=="\u4EE4\u548C"?o+=2018:t[lc]=="\u5E73\u6210"?o+=1988:t[lc]=="\u662D\u548C"&&(o+=1925),s.assign("year",o)}else{let a=Sk.findYearClosestToRef(e.refDate,i,n);s.imply("year",a)}return s}};ts.default=cc});var Rh=b(rs=>{"use strict";var Nk=rs&&rs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(rs,"__esModule",{value:!0});var Ik=Nk(ur()),dc=class extends Ik.default{patternBetween(){return/^\s*(から|ー|-)\s*$/i}};rs.default=dc});var xh=b(Jt=>{"use strict";var Fk=Jt&&Jt.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Lk=Jt&&Jt.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Uk=Jt&&Jt.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&Fk(e,r,t);return Lk(e,r),e},Wk=Jt&&Jt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Jt,"__esModule",{value:!0});var qk=Wk(me()),Mh=Be(),fc=Uk(br()),Yk=/今日|当日|昨日|明日|今夜|今夕|今晩|今朝/i,pc=class{pattern(){return Yk}extract(e,t){let n=t[0],i=qk.default(e.refDate),s=e.createParsingComponents();switch(n){case"\u6628\u65E5":return fc.yesterday(e.reference);case"\u660E\u65E5":return fc.tomorrow(e.reference);case"\u4ECA\u65E5":case"\u5F53\u65E5":return fc.today(e.reference)}return n=="\u4ECA\u591C"||n=="\u4ECA\u5915"||n=="\u4ECA\u6669"?(s.imply("hour",22),s.assign("meridiem",Mh.Meridiem.PM)):n.match("\u4ECA\u671D")&&(s.imply("hour",6),s.assign("meridiem",Mh.Meridiem.AM)),s.assign("day",i.date()),s.assign("month",i.month()+1),s.assign("year",i.year()),s}};Jt.default=pc});var Ch=b(Xe=>{"use strict";var mc=Xe&&Xe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Xe,"__esModule",{value:!0});Xe.createConfiguration=Xe.createCasualConfiguration=Xe.parseDate=Xe.parse=Xe.strict=Xe.casual=void 0;var $k=mc(Sh()),jk=mc(Rh()),Gk=mc(xh()),Ah=Vt();Xe.casual=new Ah.Chrono(Ph());Xe.strict=new Ah.Chrono(hc());function Bk(r,e,t){return Xe.casual.parse(r,e,t)}Xe.parse=Bk;function Hk(r,e,t){return Xe.casual.parseDate(r,e,t)}Xe.parseDate=Hk;function Ph(){let r=hc();return r.parsers.unshift(new Gk.default),r}Xe.createCasualConfiguration=Ph;function hc(){return{parsers:[new $k.default],refiners:[new jk.default]}}Xe.createConfiguration=hc});var Ca=b(cr=>{"use strict";Object.defineProperty(cr,"__esModule",{value:!0});cr.parseYear=cr.YEAR_PATTERN=cr.MONTH_DICTIONARY=cr.WEEKDAY_DICTIONARY=void 0;cr.WEEKDAY_DICTIONARY={domingo:0,dom:0,segunda:1,"segunda-feira":1,seg:1,ter\u00E7a:2,"ter\xE7a-feira":2,ter:2,quarta:3,"quarta-feira":3,qua:3,quinta:4,"quinta-feira":4,qui:4,sexta:5,"sexta-feira":5,sex:5,s\u00E1bado:6,sabado:6,sab:6};cr.MONTH_DICTIONARY={janeiro:1,jan:1,"jan.":1,fevereiro:2,fev:2,"fev.":2,mar\u00E7o:3,mar:3,"mar.":3,abril:4,abr:4,"abr.":4,maio:5,mai:5,"mai.":5,junho:6,jun:6,"jun.":6,julho:7,jul:7,"jul.":7,agosto:8,ago:8,"ago.":8,setembro:9,set:9,"set.":9,outubro:10,out:10,"out.":10,novembro:11,nov:11,"nov.":11,dezembro:12,dez:12,"dez.":12};cr.YEAR_PATTERN="[0-9]{1,4}(?![^\\s]\\d)(?:\\s*[a|d]\\.?\\s*c\\.?|\\s*a\\.?\\s*d\\.?)?";function zk(r){if(r.match(/^[0-9]{1,4}$/)){let e=parseInt(r);return e<100&&(e>50?e=e+1900:e=e+2e3),e}return r.match(/a\.?\s*c\.?/i)?(r=r.replace(/a\.?\s*c\.?/i,""),-parseInt(r)):parseInt(r)}cr.parseYear=zk});var Ih=b(yc=>{"use strict";Object.defineProperty(yc,"__esModule",{value:!0});var Nh=Ca(),Kk=be(),Vk=F(),Xk=pn(),Qk=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(este|esta|passado|pr[o\xF3]ximo)\\s*)?(${Kk.matchAnyPattern(Nh.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(este|esta|passado|pr[\xF3o]ximo)\\s*semana)?(?=\\W|\\d|$)`,"i"),Zk=1,Jk=2,eD=3,gc=class extends Vk.AbstractParserWithWordBoundaryChecking{innerPattern(){return Qk}innerExtract(e,t){let n=t[Jk].toLowerCase(),i=Nh.WEEKDAY_DICTIONARY[n];if(i===void 0)return null;let s=t[Zk],a=t[eD],o=s||a||"";o=o.toLowerCase();let u=null;o=="passado"?u="this":o=="pr\xF3ximo"||o=="proximo"?u="next":o=="este"&&(u="this");let l=Xk.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};yc.default=gc});var Fh=b(Tc=>{"use strict";Object.defineProperty(Tc,"__esModule",{value:!0});var tD=dn(),_c=class extends tD.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:ao?|\xE0s?|das|da|de|do)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|a(?:o)?|\\?)\\s*"}};Tc.default=_c});var Lh=b(ns=>{"use strict";var rD=ns&&ns.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ns,"__esModule",{value:!0});var nD=rD(yr()),bc=class extends nD.default{patternBetween(){return new RegExp("^\\s*(?:,|\xE0)?\\s*$")}};ns.default=bc});var Uh=b(is=>{"use strict";var iD=is&&is.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(is,"__esModule",{value:!0});var sD=iD(ur()),vc=class extends sD.default{patternBetween(){return/^\s*(?:-)\s*$/i}};is.default=vc});var Gh=b(Ec=>{"use strict";Object.defineProperty(Ec,"__esModule",{value:!0});var aD=nt(),$h=Ca(),jh=Ca(),oD=be(),uD=F(),lD=new RegExp(`([0-9]{1,2})(?:\xBA|\xAA|\xB0)?(?:\\s*(?:desde|de|\\-|\\\u2013|ao?|\\s)\\s*([0-9]{1,2})(?:\xBA|\xAA|\xB0)?)?\\s*(?:de)?\\s*(?:-|/|\\s*(?:de|,)?\\s*)(${oD.matchAnyPattern($h.MONTH_DICTIONARY)})(?:\\s*(?:de|,)?\\s*(${jh.YEAR_PATTERN}))?(?=\\W|$)`,"i"),Wh=1,qh=2,cD=3,Yh=4,wc=class extends uD.AbstractParserWithWordBoundaryChecking{innerPattern(){return lD}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=$h.MONTH_DICTIONARY[t[cD].toLowerCase()],s=parseInt(t[Wh]);if(s>31)return t.index=t.index+t[Wh].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[Yh]){let a=jh.parseYear(t[Yh]);n.start.assign("year",a)}else{let a=aD.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[qh]){let a=parseInt(t[qh]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Ec.default=wc});var Bh=b(vr=>{"use strict";var dD=vr&&vr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),fD=vr&&vr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),pD=vr&&vr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&dD(e,r,t);return fD(e,r),e};Object.defineProperty(vr,"__esModule",{value:!0});var mD=F(),Na=pD(br()),kc=class extends mD.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(agora|hoje|amanha|amanhã|ontem)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),i=e.createParsingComponents();switch(n){case"agora":return Na.now(e.reference);case"hoje":return Na.today(e.reference);case"amanha":case"amanh\xE3":return Na.tomorrow(e.reference);case"ontem":return Na.yesterday(e.reference)}return i}};vr.default=kc});var Hh=b(ss=>{"use strict";var hD=ss&&ss.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ss,"__esModule",{value:!0});var Ia=Be(),gD=F(),yD=Lt(),_D=hD(me()),Dc=class extends gD.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(?:esta\s*)?(manha|manhã|tarde|meia-noite|meio-dia|noite)(?=\W|$)/i}innerExtract(e,t){let n=_D.default(e.refDate),i=e.createParsingComponents();switch(t[1].toLowerCase()){case"tarde":i.imply("meridiem",Ia.Meridiem.PM),i.imply("hour",15);break;case"noite":i.imply("meridiem",Ia.Meridiem.PM),i.imply("hour",22);break;case"manha":case"manh\xE3":i.imply("meridiem",Ia.Meridiem.AM),i.imply("hour",6);break;case"meia-noite":yD.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"meio-dia":i.imply("meridiem",Ia.Meridiem.AM),i.imply("hour",12);break}return i}};ss.default=Dc});var Vh=b(Qe=>{"use strict";var Hr=Qe&&Qe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Qe,"__esModule",{value:!0});Qe.createConfiguration=Qe.createCasualConfiguration=Qe.parseDate=Qe.parse=Qe.strict=Qe.casual=void 0;var TD=_r(),zh=Vt(),bD=Hr(mn()),vD=Hr(Ih()),wD=Hr(Fh()),ED=Hr(Lh()),kD=Hr(Uh()),DD=Hr(Gh()),OD=Hr(Bh()),SD=Hr(Hh());Qe.casual=new zh.Chrono(Kh());Qe.strict=new zh.Chrono(Oc(!0));function RD(r,e,t){return Qe.casual.parse(r,e,t)}Qe.parse=RD;function MD(r,e,t){return Qe.casual.parseDate(r,e,t)}Qe.parseDate=MD;function Kh(r=!0){let e=Oc(!1,r);return e.parsers.push(new OD.default),e.parsers.push(new SD.default),e}Qe.createCasualConfiguration=Kh;function Oc(r=!0,e=!0){return TD.includeCommonConfiguration({parsers:[new bD.default(e),new vD.default,new wD.default,new DD.default],refiners:[new ED.default,new kD.default]},r)}Qe.createConfiguration=Oc});var Xh=b(as=>{"use strict";var xD=as&&as.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(as,"__esModule",{value:!0});var AD=xD(ur()),Sc=class extends AD.default{patternBetween(){return/^\s*(tot|-)\s*$/i}};as.default=Sc});var Qh=b(os=>{"use strict";var PD=os&&os.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(os,"__esModule",{value:!0});var CD=PD(yr()),Rc=class extends CD.default{patternBetween(){return new RegExp("^\\s*(om|na|voor|in de|,|-)?\\s*$")}};os.default=Rc});var Zh=b(wr=>{"use strict";var ND=wr&&wr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),ID=wr&&wr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),FD=wr&&wr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&ND(e,r,t);return ID(e,r),e};Object.defineProperty(wr,"__esModule",{value:!0});var LD=F(),Fa=FD(br()),Mc=class extends LD.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(nu|vandaag|morgen|morgend|gisteren)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),i=e.createParsingComponents();switch(n){case"nu":return Fa.now(e.reference);case"vandaag":return Fa.today(e.reference);case"morgen":case"morgend":return Fa.tomorrow(e.reference);case"gisteren":return Fa.yesterday(e.reference)}return i}};wr.default=Mc});var Jh=b(us=>{"use strict";var UD=us&&us.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(us,"__esModule",{value:!0});var La=Be(),WD=F(),qD=UD(me()),YD=Lt(),$D=1,jD=2,xc=class extends WD.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(deze)?\s*(namiddag|avond|middernacht|ochtend|middag|'s middags|'s avonds|'s ochtends)(?=\W|$)/i}innerExtract(e,t){let n=qD.default(e.refDate),i=e.createParsingComponents();switch(t[$D]==="deze"&&(i.assign("day",e.refDate.getDate()),i.assign("month",e.refDate.getMonth()+1),i.assign("year",e.refDate.getFullYear())),t[jD].toLowerCase()){case"namiddag":case"'s namiddags":i.imply("meridiem",La.Meridiem.PM),i.imply("hour",15);break;case"avond":case"'s avonds'":i.imply("meridiem",La.Meridiem.PM),i.imply("hour",20);break;case"middernacht":YD.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"ochtend":case"'s ochtends":i.imply("meridiem",La.Meridiem.AM),i.imply("hour",6);break;case"middag":case"'s middags":i.imply("meridiem",La.Meridiem.AM),i.imply("hour",12);break}return i}};us.default=xc});var Ot=b(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.parseTimeUnits=oe.TIME_UNITS_PATTERN=oe.parseYear=oe.YEAR_PATTERN=oe.parseOrdinalNumberPattern=oe.ORDINAL_NUMBER_PATTERN=oe.parseNumberPattern=oe.NUMBER_PATTERN=oe.TIME_UNIT_DICTIONARY=oe.ORDINAL_WORD_DICTIONARY=oe.INTEGER_WORD_DICTIONARY=oe.MONTH_DICTIONARY=oe.WEEKDAY_DICTIONARY=void 0;var Ua=be(),GD=nt();oe.WEEKDAY_DICTIONARY={zondag:0,zon:0,"zon.":0,zo:0,"zo.":0,maandag:1,ma:1,"ma.":1,dinsdag:2,din:2,"din.":2,di:2,"di.":2,woensdag:3,woe:3,"woe.":3,wo:3,"wo.":3,donderdag:4,dond:4,"dond.":4,do:4,"do.":4,vrijdag:5,vrij:5,"vrij.":5,vr:5,"vr.":5,zaterdag:6,zat:6,"zat.":6,za:6,"za.":6};oe.MONTH_DICTIONARY={januari:1,jan:1,"jan.":1,februari:2,feb:2,"feb.":2,maart:3,mar:3,"mar.":3,april:4,apr:4,"apr.":4,mei:5,juni:6,jun:6,"jun.":6,juli:7,jul:7,"jul.":7,augustus:8,aug:8,"aug.":8,september:9,sep:9,"sep.":9,sept:9,"sept.":9,oktober:10,okt:10,"okt.":10,november:11,nov:11,"nov.":11,december:12,dec:12,"dec.":12};oe.INTEGER_WORD_DICTIONARY={een:1,twee:2,drie:3,vier:4,vijf:5,zes:6,zeven:7,acht:8,negen:9,tien:10,elf:11,twaalf:12};oe.ORDINAL_WORD_DICTIONARY={eerste:1,tweede:2,derde:3,vierde:4,vijfde:5,zesde:6,zevende:7,achtste:8,negende:9,tiende:10,elfde:11,twaalfde:12,dertiende:13,veertiende:14,vijftiende:15,zestiende:16,zeventiende:17,achttiende:18,negentiende:19,twintigste:20,eenentwintigste:21,twee\u00EBntwintigste:22,drieentwintigste:23,vierentwintigste:24,vijfentwintigste:25,zesentwintigste:26,zevenentwintigste:27,achtentwintig:28,negenentwintig:29,dertigste:30,eenendertigste:31};oe.TIME_UNIT_DICTIONARY={sec:"second",second:"second",seconden:"second",min:"minute",mins:"minute",minute:"minute",minuut:"minute",minuten:"minute",minuutje:"minute",h:"hour",hr:"hour",hrs:"hour",uur:"hour",u:"hour",uren:"hour",dag:"d",dagen:"d",week:"week",weken:"week",maand:"month",maanden:"month",jaar:"year",jr:"year",jaren:"year"};oe.NUMBER_PATTERN=`(?:${Ua.matchAnyPattern(oe.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+[\\.,][0-9]+|halve?|half|paar)`;function tg(r){let e=r.toLowerCase();return oe.INTEGER_WORD_DICTIONARY[e]!==void 0?oe.INTEGER_WORD_DICTIONARY[e]:e==="paar"?2:e==="half"||e.match(/halve?/)?.5:parseFloat(e.replace(",","."))}oe.parseNumberPattern=tg;oe.ORDINAL_NUMBER_PATTERN=`(?:${Ua.matchAnyPattern(oe.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:ste|de)?)`;function BD(r){let e=r.toLowerCase();return oe.ORDINAL_WORD_DICTIONARY[e]!==void 0?oe.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:ste|de)$/i,""),parseInt(e))}oe.parseOrdinalNumberPattern=BD;oe.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:voor Christus|na Christus)|[1-2][0-9]{3}|[5-9][0-9])";function HD(r){if(/voor Christus/i.test(r))return r=r.replace(/voor Christus/i,""),-parseInt(r);if(/na Christus/i.test(r))return r=r.replace(/na Christus/i,""),parseInt(r);let e=parseInt(r);return GD.findMostLikelyADYear(e)}oe.parseYear=HD;var rg=`(${oe.NUMBER_PATTERN})\\s{0,5}(${Ua.matchAnyPattern(oe.TIME_UNIT_DICTIONARY)})\\s{0,5}`,eg=new RegExp(rg,"i");oe.TIME_UNITS_PATTERN=Ua.repeatedTimeunitPattern("(?:(?:binnen|in)\\s*)?",rg);function zD(r){let e={},t=r,n=eg.exec(t);for(;n;)KD(e,n),t=t.substring(n[0].length),n=eg.exec(t);return e}oe.parseTimeUnits=zD;function KD(r,e){let t=tg(e[1]),n=oe.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var ig=b(Pc=>{"use strict";Object.defineProperty(Pc,"__esModule",{value:!0});var ng=Ot(),VD=Ne(),XD=F(),Ac=class extends XD.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(?:binnen|in|binnen de|voor)\\s*("+ng.TIME_UNITS_PATTERN+")(?=\\W|$)","i")}innerExtract(e,t){let n=ng.parseTimeUnits(t[1]);return VD.ParsingComponents.createRelativeFromReference(e.reference,n)}};Pc.default=Ac});var ag=b(Nc=>{"use strict";Object.defineProperty(Nc,"__esModule",{value:!0});var sg=Ot(),QD=be(),ZD=F(),JD=pn(),eO=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:op\\s*?)?(?:(deze|vorige|volgende)\\s*(?:week\\s*)?)?(${QD.matchAnyPattern(sg.WEEKDAY_DICTIONARY)})(?=\\W|$)`,"i"),tO=1,rO=2,nO=3,Cc=class extends ZD.AbstractParserWithWordBoundaryChecking{innerPattern(){return eO}innerExtract(e,t){let n=t[rO].toLowerCase(),i=sg.WEEKDAY_DICTIONARY[n],s=t[tO],a=t[nO],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o=="vorige"?u="last":o=="volgende"?u="next":o=="deze"&&(u="this");let l=JD.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Nc.default=Cc});var fg=b(Fc=>{"use strict";Object.defineProperty(Fc,"__esModule",{value:!0});var iO=nt(),cg=Ot(),Wa=Ot(),dg=Ot(),sO=be(),aO=F(),oO=new RegExp(`(?:on\\s*?)?(${Wa.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:tot|\\-|\\\u2013|until|through|till|\\s)\\s*(${Wa.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:of)?\\s*)(`+sO.matchAnyPattern(cg.MONTH_DICTIONARY)+`)(?:(?:-|/|,?\\s*)(${dg.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),uO=3,og=1,ug=2,lg=4,Ic=class extends aO.AbstractParserWithWordBoundaryChecking{innerPattern(){return oO}innerExtract(e,t){let n=cg.MONTH_DICTIONARY[t[uO].toLowerCase()],i=Wa.parseOrdinalNumberPattern(t[og]);if(i>31)return t.index=t.index+t[og].length,null;let s=e.createParsingComponents({day:i,month:n});if(t[lg]){let u=dg.parseYear(t[lg]);s.assign("year",u)}else{let u=iO.findYearClosestToRef(e.refDate,i,n);s.imply("year",u)}if(!t[ug])return s;let a=Wa.parseOrdinalNumberPattern(t[ug]),o=e.createParsingResult(t.index,t[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",a),o}};Fc.default=Ic});var gg=b(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});var mg=Ot(),lO=nt(),cO=be(),hg=Ot(),dO=F(),fO=new RegExp(`(${cO.matchAnyPattern(mg.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${hg.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),pO=1,pg=2,Lc=class extends dO.AbstractParserWithWordBoundaryChecking{innerPattern(){return fO}innerExtract(e,t){let n=e.createParsingComponents();n.imply("day",1);let i=t[pO],s=mg.MONTH_DICTIONARY[i.toLowerCase()];if(n.assign("month",s),t[pg]){let a=hg.parseYear(t[pg]);n.assign("year",a)}else{let a=lO.findYearClosestToRef(e.refDate,1,s);n.imply("year",a)}return n}};Uc.default=Lc});var yg=b(qc=>{"use strict";Object.defineProperty(qc,"__esModule",{value:!0});var mO=F(),hO=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),gO=1,yO=2,Wc=class extends mO.AbstractParserWithWordBoundaryChecking{innerPattern(){return hO}innerExtract(e,t){let n=parseInt(t[yO]),i=parseInt(t[gO]);return e.createParsingComponents().imply("day",1).assign("month",i).assign("year",n)}};qc.default=Wc});var _g=b($c=>{"use strict";Object.defineProperty($c,"__esModule",{value:!0});var _O=dn(),Yc=class extends _O.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:om)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|om|\\?)\\s*"}primarySuffix(){return"(?:\\s*(?:uur))?(?!/)(?=\\W|$)"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}};$c.default=Yc});var vg=b(Gc=>{"use strict";Object.defineProperty(Gc,"__esModule",{value:!0});var bg=Ot(),TO=be(),bO=F(),vO=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${TO.matchAnyPattern(bg.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),wO=1,EO=2,Tg=3,kO=4,jc=class extends bO.AbstractParserWithWordBoundaryChecking{innerPattern(){return vO}innerExtract(e,t){let n=t[Tg]?parseInt(t[Tg]):bg.MONTH_DICTIONARY[t[EO].toLowerCase()];if(n<1||n>12)return null;let i=parseInt(t[wO]);return{day:parseInt(t[kO]),month:n,year:i}}};Gc.default=jc});var wg=b(ls=>{"use strict";var DO=ls&&ls.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ls,"__esModule",{value:!0});var OO=F(),qa=Be(),Bc=Lt(),SO=DO(me()),RO=1,MO=2,Hc=class extends OO.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(gisteren|morgen|van)(ochtend|middag|namiddag|avond|nacht)(?=\W|$)/i}innerExtract(e,t){let n=t[RO].toLowerCase(),i=t[MO].toLowerCase(),s=e.createParsingComponents(),a=SO.default(e.refDate);switch(n){case"gisteren":Bc.assignSimilarDate(s,a.add(-1,"day"));break;case"van":Bc.assignSimilarDate(s,a);break;case"morgen":Bc.assignTheNextDay(s,a);break}switch(i){case"ochtend":s.imply("meridiem",qa.Meridiem.AM),s.imply("hour",6);break;case"middag":s.imply("meridiem",qa.Meridiem.AM),s.imply("hour",12);break;case"namiddag":s.imply("meridiem",qa.Meridiem.PM),s.imply("hour",15);break;case"avond":s.imply("meridiem",qa.Meridiem.PM),s.imply("hour",20);break}return s}};ls.default=Hc});var kg=b(Kc=>{"use strict";Object.defineProperty(Kc,"__esModule",{value:!0});var Eg=Ot(),xO=Ne(),AO=F(),PO=Ut(),CO=new RegExp(`(deze|vorige|afgelopen|komende|over|\\+|-)\\s*(${Eg.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),zc=class extends AO.AbstractParserWithWordBoundaryChecking{innerPattern(){return CO}innerExtract(e,t){let n=t[1].toLowerCase(),i=Eg.parseTimeUnits(t[2]);switch(n){case"vorige":case"afgelopen":case"-":i=PO.reverseTimeUnits(i);break}return xO.ParsingComponents.createRelativeFromReference(e.reference,i)}};Kc.default=zc});var Sg=b(cs=>{"use strict";var NO=cs&&cs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(cs,"__esModule",{value:!0});var Og=Ot(),Dg=Ne(),IO=NO(me()),FO=F(),LO=be(),UO=new RegExp(`(dit|deze|komende|volgend|volgende|afgelopen|vorige)\\s*(${LO.matchAnyPattern(Og.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),WO=1,qO=2,Vc=class extends FO.AbstractParserWithWordBoundaryChecking{innerPattern(){return UO}innerExtract(e,t){let n=t[WO].toLowerCase(),i=t[qO].toLowerCase(),s=Og.TIME_UNIT_DICTIONARY[i];if(n=="volgend"||n=="volgende"||n=="komende"){let u={};return u[s]=1,Dg.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="afgelopen"||n=="vorige"){let u={};return u[s]=-1,Dg.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=IO.default(e.reference.instant);return i.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):i.match(/maand/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):i.match(/jaar/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};cs.default=Vc});var Rg=b(Zc=>{"use strict";Object.defineProperty(Zc,"__esModule",{value:!0});var Qc=Ot(),YO=Ne(),$O=F(),jO=Ut(),GO=new RegExp("("+Qc.TIME_UNITS_PATTERN+")(?:geleden|voor|eerder)(?=(?:\\W|$))","i"),BO=new RegExp("("+Qc.TIME_UNITS_PATTERN+")geleden(?=(?:\\W|$))","i"),Xc=class extends $O.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?BO:GO}innerExtract(e,t){let n=Qc.parseTimeUnits(t[1]),i=jO.reverseTimeUnits(n);return YO.ParsingComponents.createRelativeFromReference(e.reference,i)}};Zc.default=Xc});var Mg=b(td=>{"use strict";Object.defineProperty(td,"__esModule",{value:!0});var ed=Ot(),HO=Ne(),zO=F(),KO=new RegExp("("+ed.TIME_UNITS_PATTERN+")(later|na|vanaf nu|voortaan|vooruit|uit)(?=(?:\\W|$))","i"),VO=new RegExp("("+ed.TIME_UNITS_PATTERN+")(later|vanaf nu)(?=(?:\\W|$))","i"),XO=1,Jc=class extends zO.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?VO:KO}innerExtract(e,t){let n=ed.parseTimeUnits(t[XO]);return HO.ParsingComponents.createRelativeFromReference(e.reference,n)}};td.default=Jc});var Cg=b(Ze=>{"use strict";var st=Ze&&Ze.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ze,"__esModule",{value:!0});Ze.createConfiguration=Ze.createCasualConfiguration=Ze.parseDate=Ze.parse=Ze.strict=Ze.casual=void 0;var QO=_r(),xg=Vt(),ZO=st(Xh()),JO=st(Qh()),eS=st(Zh()),tS=st(Jh()),rS=st(mn()),nS=st(ig()),iS=st(ag()),sS=st(fg()),Ag=st(gg()),aS=st(yg()),oS=st(_g()),uS=st(vg()),lS=st(wg()),cS=st(kg()),dS=st(Sg()),fS=st(Rg()),pS=st(Mg());Ze.casual=new xg.Chrono(Pg());Ze.strict=new xg.Chrono(rd(!0));function mS(r,e,t){return Ze.casual.parse(r,e,t)}Ze.parse=mS;function hS(r,e,t){return Ze.casual.parseDate(r,e,t)}Ze.parseDate=hS;function Pg(r=!0){let e=rd(!1,r);return e.parsers.unshift(new eS.default),e.parsers.unshift(new tS.default),e.parsers.unshift(new lS.default),e.parsers.unshift(new Ag.default),e.parsers.unshift(new dS.default),e.parsers.unshift(new cS.default),e}Ze.createCasualConfiguration=Pg;function rd(r=!0,e=!0){return QO.includeCommonConfiguration({parsers:[new rS.default(e),new nS.default,new sS.default,new Ag.default,new iS.default,new uS.default,new aS.default,new oS.default(r),new fS.default(r),new pS.default(r)],refiners:[new JO.default,new ZO.default]},r)}Ze.createConfiguration=rd});var Lg=b(ds=>{"use strict";var gS=ds&&ds.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ds,"__esModule",{value:!0});var yS=gS(me()),_S=F(),TS=1,Ng=2,bS=3,Ig=4,Fg=5,vS=6,nd=class extends _S.AbstractParserWithWordBoundaryChecking{innerPattern(e){return new RegExp("(\u800C\u5BB6|\u7ACB(?:\u523B|\u5373)|\u5373\u523B)|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s|,|\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?","i")}innerExtract(e,t){let n=t.index,i=e.createParsingResult(n,t[0]),s=yS.default(e.refDate),a=s;if(t[TS])i.start.imply("hour",s.hour()),i.start.imply("minute",s.minute()),i.start.imply("second",s.second()),i.start.imply("millisecond",s.millisecond());else if(t[Ng]){let o=t[Ng],u=t[bS];o=="\u660E"||o=="\u807D"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u5F8C"?a=a.add(2,"day"):o=="\u5927\u5F8C"&&(a=a.add(3,"day")),u=="\u65E9"||u=="\u671D"?i.start.imply("hour",6):u=="\u665A"&&(i.start.imply("hour",22),i.start.imply("meridiem",1))}else if(t[Ig]){let u=t[Ig][0];u=="\u65E9"||u=="\u671D"||u=="\u4E0A"?i.start.imply("hour",6):u=="\u4E0B"||u=="\u664F"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):u=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):u=="\u591C"||u=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):u=="\u51CC"&&i.start.imply("hour",0)}else if(t[Fg]){let o=t[Fg];o=="\u660E"||o=="\u807D"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u5F8C"?a=a.add(2,"day"):o=="\u5927\u5F8C"&&(a=a.add(3,"day"));let u=t[vS];if(u){let l=u[0];l=="\u65E9"||l=="\u671D"||l=="\u4E0A"?i.start.imply("hour",6):l=="\u4E0B"||l=="\u664F"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):l=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):l=="\u591C"||l=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):l=="\u51CC"&&i.start.imply("hour",0)}}return i.start.assign("day",a.date()),i.start.assign("month",a.month()+1),i.start.assign("year",a.year()),i}};ds.default=nd});var ei=b(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.zhStringToYear=Tt.zhStringToNumber=Tt.WEEKDAY_OFFSET=Tt.NUMBER=void 0;Tt.NUMBER={\u96F6:0,\u4E00:1,\u4E8C:2,\u5169:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6,\u4E03:7,\u516B:8,\u4E5D:9,\u5341:10,\u5EFF:20,\u5345:30};Tt.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function wS(r){let e=0;for(let t=0;t<r.length;t++){let n=r[t];n==="\u5341"?e=e===0?Tt.NUMBER[n]:e*Tt.NUMBER[n]:e+=Tt.NUMBER[n]}return e}Tt.zhStringToNumber=wS;function ES(r){let e="";for(let t=0;t<r.length;t++){let n=r[t];e=e+Tt.NUMBER[n]}return parseInt(e)}Tt.zhStringToYear=ES});var Wg=b(fs=>{"use strict";var kS=fs&&fs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(fs,"__esModule",{value:!0});var DS=kS(me()),OS=F(),yn=ei(),id=1,Ug=2,sd=3,ad=class extends OS.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(yn.NUMBER).join("")+"]{4}|["+Object.keys(yn.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(yn.NUMBER).join("")+"]{1,2})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(yn.NUMBER).join("")+"]{1,2})?(?:\\s*)(?:\u65E5|\u865F)?")}innerExtract(e,t){let n=DS.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=parseInt(t[Ug]);if(isNaN(s)&&(s=yn.zhStringToNumber(t[Ug])),i.start.assign("month",s),t[sd]){let a=parseInt(t[sd]);isNaN(a)&&(a=yn.zhStringToNumber(t[sd])),i.start.assign("day",a)}else i.start.imply("day",n.date());if(t[id]){let a=parseInt(t[id]);isNaN(a)&&(a=yn.zhStringToYear(t[id])),i.start.assign("year",a)}else i.start.imply("year",n.year());return i}};fs.default=ad});var Yg=b(ps=>{"use strict";var SS=ps&&ps.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ps,"__esModule",{value:!0});var RS=SS(me()),MS=F(),qg=ei(),xS=new RegExp("(\\d+|["+Object.keys(qg.NUMBER).join("")+"]+|\u534A|\u5E7E)(?:\\s*)(?:\u500B)?(\u79D2(?:\u9418)?|\u5206\u9418|\u5C0F\u6642|\u9418|\u65E5|\u5929|\u661F\u671F|\u79AE\u62DC|\u6708|\u5E74)(?:(?:\u4E4B|\u904E)?\u5F8C|(?:\u4E4B)?\u5167)","i"),od=1,AS=2,ud=class extends MS.AbstractParserWithWordBoundaryChecking{innerPattern(){return xS}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=parseInt(t[od]);if(isNaN(i)&&(i=qg.zhStringToNumber(t[od])),isNaN(i)){let u=t[od];if(u==="\u5E7E")i=3;else if(u==="\u534A")i=.5;else return null}let s=RS.default(e.refDate),o=t[AS][0];return o.match(/[日天星禮月年]/)?(o=="\u65E5"||o=="\u5929"?s=s.add(i,"d"):o=="\u661F"||o=="\u79AE"?s=s.add(i*7,"d"):o=="\u6708"?s=s.add(i,"month"):o=="\u5E74"&&(s=s.add(i,"year")),n.start.assign("year",s.year()),n.start.assign("month",s.month()+1),n.start.assign("day",s.date()),n):(o=="\u79D2"?s=s.add(i,"second"):o=="\u5206"?s=s.add(i,"minute"):(o=="\u5C0F"||o=="\u9418")&&(s=s.add(i,"hour")),n.start.imply("year",s.year()),n.start.imply("month",s.month()+1),n.start.imply("day",s.date()),n.start.assign("hour",s.hour()),n.start.assign("minute",s.minute()),n.start.assign("second",s.second()),n)}};ps.default=ud});var jg=b(ms=>{"use strict";var PS=ms&&ms.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ms,"__esModule",{value:!0});var CS=PS(me()),NS=F(),$g=ei(),IS=new RegExp("(?<prefix>\u4E0A|\u4ECA|\u4E0B|\u9019|\u5462)(?:\u500B)?(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?<weekday>"+Object.keys($g.WEEKDAY_OFFSET).join("|")+")"),ld=class extends NS.AbstractParserWithWordBoundaryChecking{innerPattern(){return IS}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=$g.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=null,o=t.groups.prefix;o=="\u4E0A"?a="last":o=="\u4E0B"?a="next":(o=="\u4ECA"||o=="\u9019"||o=="\u5462")&&(a="this");let u=CS.default(e.refDate),l=!1,c=u.day();return a=="last"||a=="past"?(u=u.day(s-7),l=!0):a=="next"?(u=u.day(s+7),l=!0):a=="this"?u=u.day(s):Math.abs(s-7-c)<Math.abs(s-c)?u=u.day(s-7):Math.abs(s+7-c)<Math.abs(s-c)?u=u.day(s+7):u=u.day(s),n.start.assign("weekday",s),l?(n.start.assign("day",u.date()),n.start.assign("month",u.month()+1),n.start.assign("year",u.year())):(n.start.imply("day",u.date()),n.start.imply("month",u.month()+1),n.start.imply("year",u.year())),n}};ms.default=ld});var Gg=b(hs=>{"use strict";var FS=hs&&hs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(hs,"__esModule",{value:!0});var LS=FS(me()),US=F(),Yt=ei(),WS=new RegExp("(?:\u7531|\u5F9E|\u81EA)?(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(Yt.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Yt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Yt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),qS=new RegExp("(?:^\\s*(?:\u5230|\u81F3|\\-|\\\u2013|\\~|\\\u301C)\\s*)(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(Yt.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Yt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Yt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),Ya=1,$a=2,ja=3,Ga=4,Ba=5,Ha=6,qt=7,ti=8,za=9,cd=class extends US.AbstractParserWithWordBoundaryChecking{innerPattern(){return WS}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=LS.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=n.clone();if(t[Ya]){var a=t[Ya];a=="\u660E"||a=="\u807D"?n.hour()>1&&s.add(1,"day"):a=="\u6628"||a=="\u5C0B"||a=="\u7434"?s.add(-1,"day"):a=="\u524D"?s.add(-2,"day"):a=="\u5927\u524D"?s.add(-3,"day"):a=="\u5F8C"?s.add(2,"day"):a=="\u5927\u5F8C"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else if(t[Ga]){var o=t[Ga];o=="\u660E"||o=="\u807D"?s.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?s.add(-1,"day"):o=="\u524D"?s.add(-2,"day"):o=="\u5927\u524D"?s.add(-3,"day"):o=="\u5F8C"?s.add(2,"day"):o=="\u5927\u5F8C"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else i.start.imply("day",s.date()),i.start.imply("month",s.month()+1),i.start.imply("year",s.year());let u=0,l=0,c=-1;if(t[ti]){var f=parseInt(t[ti]);if(isNaN(f)&&(f=Yt.zhStringToNumber(t[ti])),f>=60)return null;i.start.assign("second",f)}if(u=parseInt(t[Ha]),isNaN(u)&&(u=Yt.zhStringToNumber(t[Ha])),t[qt]?t[qt]=="\u534A"?l=30:t[qt]=="\u6B63"||t[qt]=="\u6574"?l=0:(l=parseInt(t[qt]),isNaN(l)&&(l=Yt.zhStringToNumber(t[qt]))):u>100&&(l=u%100,u=Math.floor(u/100)),l>=60||u>24)return null;if(u>=12&&(c=1),t[za]){if(u>12)return null;var m=t[za][0].toLowerCase();m=="a"&&(c=0,u==12&&(u=0)),m=="p"&&(c=1,u!=12&&(u+=12))}else if(t[$a]){var T=t[$a],y=T[0];y=="\u671D"||y=="\u65E9"?(c=0,u==12&&(u=0)):y=="\u665A"&&(c=1,u!=12&&(u+=12))}else if(t[ja]){var w=t[ja],R=w[0];R=="\u4E0A"||R=="\u671D"||R=="\u65E9"||R=="\u51CC"?(c=0,u==12&&(u=0)):(R=="\u4E0B"||R=="\u664F"||R=="\u665A")&&(c=1,u!=12&&(u+=12))}else if(t[Ba]){var L=t[Ba],q=L[0];q=="\u4E0A"||q=="\u671D"||q=="\u65E9"||q=="\u51CC"?(c=0,u==12&&(u=0)):(q=="\u4E0B"||q=="\u664F"||q=="\u665A")&&(c=1,u!=12&&(u+=12))}if(i.start.assign("hour",u),i.start.assign("minute",l),c>=0?i.start.assign("meridiem",c):u<12?i.start.imply("meridiem",0):i.start.imply("meridiem",1),t=qS.exec(e.text.substring(i.index+i.text.length)),!t)return i.text.match(/^\d+$/)?null:i;let U=s.clone();if(i.end=e.createParsingComponents(),t[Ya]){var a=t[Ya];a=="\u660E"||a=="\u807D"?n.hour()>1&&U.add(1,"day"):a=="\u6628"||a=="\u5C0B"||a=="\u7434"?U.add(-1,"day"):a=="\u524D"?U.add(-2,"day"):a=="\u5927\u524D"?U.add(-3,"day"):a=="\u5F8C"?U.add(2,"day"):a=="\u5927\u5F8C"&&U.add(3,"day"),i.end.assign("day",U.date()),i.end.assign("month",U.month()+1),i.end.assign("year",U.year())}else if(t[Ga]){var o=t[Ga];o=="\u660E"||o=="\u807D"?U.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?U.add(-1,"day"):o=="\u524D"?U.add(-2,"day"):o=="\u5927\u524D"?U.add(-3,"day"):o=="\u5F8C"?U.add(2,"day"):o=="\u5927\u5F8C"&&U.add(3,"day"),i.end.assign("day",U.date()),i.end.assign("month",U.month()+1),i.end.assign("year",U.year())}else i.end.imply("day",U.date()),i.end.imply("month",U.month()+1),i.end.imply("year",U.year());if(u=0,l=0,c=-1,t[ti]){var f=parseInt(t[ti]);if(isNaN(f)&&(f=Yt.zhStringToNumber(t[ti])),f>=60)return null;i.end.assign("second",f)}if(u=parseInt(t[Ha]),isNaN(u)&&(u=Yt.zhStringToNumber(t[Ha])),t[qt]?t[qt]=="\u534A"?l=30:t[qt]=="\u6B63"||t[qt]=="\u6574"?l=0:(l=parseInt(t[qt]),isNaN(l)&&(l=Yt.zhStringToNumber(t[qt]))):u>100&&(l=u%100,u=Math.floor(u/100)),l>=60||u>24)return null;if(u>=12&&(c=1),t[za]){if(u>12)return null;var m=t[za][0].toLowerCase();m=="a"&&(c=0,u==12&&(u=0)),m=="p"&&(c=1,u!=12&&(u+=12)),i.start.isCertain("meridiem")||(c==0?(i.start.imply("meridiem",0),i.start.get("hour")==12&&i.start.assign("hour",0)):(i.start.imply("meridiem",1),i.start.get("hour")!=12&&i.start.assign("hour",i.start.get("hour")+12)))}else if(t[$a]){var T=t[$a],y=T[0];y=="\u671D"||y=="\u65E9"?(c=0,u==12&&(u=0)):y=="\u665A"&&(c=1,u!=12&&(u+=12))}else if(t[ja]){var w=t[ja],R=w[0];R=="\u4E0A"||R=="\u671D"||R=="\u65E9"||R=="\u51CC"?(c=0,u==12&&(u=0)):(R=="\u4E0B"||R=="\u664F"||R=="\u665A")&&(c=1,u!=12&&(u+=12))}else if(t[Ba]){var L=t[Ba],q=L[0];q=="\u4E0A"||q=="\u671D"||q=="\u65E9"||q=="\u51CC"?(c=0,u==12&&(u=0)):(q=="\u4E0B"||q=="\u664F"||q=="\u665A")&&(c=1,u!=12&&(u+=12))}return i.text=i.text+t[0],i.end.assign("hour",u),i.end.assign("minute",l),c>=0?i.end.assign("meridiem",c):i.start.isCertain("meridiem")&&i.start.get("meridiem")==1&&i.start.get("hour")>u?i.end.imply("meridiem",0):u>12&&i.end.imply("meridiem",1),i.end.date().getTime()<i.start.date().getTime()&&i.end.imply("day",i.end.get("day")+1),i}};hs.default=cd});var Hg=b(gs=>{"use strict";var YS=gs&&gs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(gs,"__esModule",{value:!0});var $S=YS(me()),jS=F(),Bg=ei(),GS=new RegExp("(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?<weekday>"+Object.keys(Bg.WEEKDAY_OFFSET).join("|")+")"),dd=class extends jS.AbstractParserWithWordBoundaryChecking{innerPattern(){return GS}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=Bg.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=$S.default(e.refDate),o=!1,u=a.day();return Math.abs(s-7-u)<Math.abs(s-u)?a=a.day(s-7):Math.abs(s+7-u)<Math.abs(s-u)?a=a.day(s+7):a=a.day(s),n.start.assign("weekday",s),o?(n.start.assign("day",a.date()),n.start.assign("month",a.month()+1),n.start.assign("year",a.year())):(n.start.imply("day",a.date()),n.start.imply("month",a.month()+1),n.start.imply("year",a.year())),n}};gs.default=dd});var zg=b(ys=>{"use strict";var BS=ys&&ys.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ys,"__esModule",{value:!0});var HS=BS(ur()),fd=class extends HS.default{patternBetween(){return/^\s*(至|到|\-|\~|||ー)\s*$/i}};ys.default=fd});var Kg=b(_s=>{"use strict";var zS=_s&&_s.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(_s,"__esModule",{value:!0});var KS=zS(yr()),pd=class extends KS.default{patternBetween(){return/^\s*$/i}};_s.default=pd});var Vg=b(Ye=>{"use strict";var Er=Ye&&Ye.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ye,"__esModule",{value:!0});Ye.createConfiguration=Ye.createCasualConfiguration=Ye.parseDate=Ye.parse=Ye.strict=Ye.casual=Ye.hant=void 0;var md=Vt(),VS=Er(Ea()),XS=_r(),QS=Er(Lg()),ZS=Er(Wg()),JS=Er(Yg()),e0=Er(jg()),t0=Er(Gg()),r0=Er(Hg()),n0=Er(zg()),i0=Er(Kg());Ye.hant=new md.Chrono(hd());Ye.casual=new md.Chrono(hd());Ye.strict=new md.Chrono(gd());function s0(r,e,t){return Ye.casual.parse(r,e,t)}Ye.parse=s0;function a0(r,e,t){return Ye.casual.parseDate(r,e,t)}Ye.parseDate=a0;function hd(){let r=gd();return r.parsers.unshift(new QS.default),r}Ye.createCasualConfiguration=hd;function gd(){let r=XS.includeCommonConfiguration({parsers:[new ZS.default,new e0.default,new r0.default,new t0.default,new JS.default],refiners:[new n0.default,new i0.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof VS.default)),r}Ye.createConfiguration=gd});var Jg=b(Ts=>{"use strict";var o0=Ts&&Ts.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ts,"__esModule",{value:!0});var u0=o0(me()),l0=F(),c0=1,Xg=2,d0=3,Qg=4,Zg=5,f0=6,yd=class extends l0.AbstractParserWithWordBoundaryChecking{innerPattern(e){return new RegExp("(\u73B0\u5728|\u7ACB(?:\u523B|\u5373)|\u5373\u523B)|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s|,|\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?","i")}innerExtract(e,t){let n=t.index,i=e.createParsingResult(n,t[0]),s=u0.default(e.refDate),a=s;if(t[c0])i.start.imply("hour",s.hour()),i.start.imply("minute",s.minute()),i.start.imply("second",s.second()),i.start.imply("millisecond",s.millisecond());else if(t[Xg]){let o=t[Xg],u=t[d0];o=="\u660E"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u540E"?a=a.add(2,"day"):o=="\u5927\u540E"&&(a=a.add(3,"day")),u=="\u65E9"?i.start.imply("hour",6):u=="\u665A"&&(i.start.imply("hour",22),i.start.imply("meridiem",1))}else if(t[Qg]){let u=t[Qg][0];u=="\u65E9"||u=="\u4E0A"?i.start.imply("hour",6):u=="\u4E0B"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):u=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):u=="\u591C"||u=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):u=="\u51CC"&&i.start.imply("hour",0)}else if(t[Zg]){let o=t[Zg];o=="\u660E"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u540E"?a=a.add(2,"day"):o=="\u5927\u540E"&&(a=a.add(3,"day"));let u=t[f0];if(u){let l=u[0];l=="\u65E9"||l=="\u4E0A"?i.start.imply("hour",6):l=="\u4E0B"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):l=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):l=="\u591C"||l=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):l=="\u51CC"&&i.start.imply("hour",0)}}return i.start.assign("day",a.date()),i.start.assign("month",a.month()+1),i.start.assign("year",a.year()),i}};Ts.default=yd});var ri=b(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.zhStringToYear=bt.zhStringToNumber=bt.WEEKDAY_OFFSET=bt.NUMBER=void 0;bt.NUMBER={\u96F6:0,"\u3007":0,\u4E00:1,\u4E8C:2,\u4E24:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6,\u4E03:7,\u516B:8,\u4E5D:9,\u5341:10};bt.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function p0(r){let e=0;for(let t=0;t<r.length;t++){let n=r[t];n==="\u5341"?e=e===0?bt.NUMBER[n]:e*bt.NUMBER[n]:e+=bt.NUMBER[n]}return e}bt.zhStringToNumber=p0;function m0(r){let e="";for(let t=0;t<r.length;t++){let n=r[t];e=e+bt.NUMBER[n]}return parseInt(e)}bt.zhStringToYear=m0});var ty=b(bs=>{"use strict";var h0=bs&&bs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(bs,"__esModule",{value:!0});var g0=h0(me()),y0=F(),_n=ri(),_d=1,ey=2,Td=3,bd=class extends y0.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(_n.NUMBER).join("")+"]{4}|["+Object.keys(_n.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(_n.NUMBER).join("")+"]{1,3})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(_n.NUMBER).join("")+"]{1,3})?(?:\\s*)(?:\u65E5|\u53F7)?")}innerExtract(e,t){let n=g0.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=parseInt(t[ey]);if(isNaN(s)&&(s=_n.zhStringToNumber(t[ey])),i.start.assign("month",s),t[Td]){let a=parseInt(t[Td]);isNaN(a)&&(a=_n.zhStringToNumber(t[Td])),i.start.assign("day",a)}else i.start.imply("day",n.date());if(t[_d]){let a=parseInt(t[_d]);isNaN(a)&&(a=_n.zhStringToYear(t[_d])),i.start.assign("year",a)}else i.start.imply("year",n.year());return i}};bs.default=bd});var ny=b(vs=>{"use strict";var _0=vs&&vs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(vs,"__esModule",{value:!0});var T0=_0(me()),b0=F(),ry=ri(),v0=new RegExp("(\\d+|["+Object.keys(ry.NUMBER).join("")+"]+|\u534A|\u51E0)(?:\\s*)(?:\u4E2A)?(\u79D2(?:\u949F)?|\u5206\u949F|\u5C0F\u65F6|\u949F|\u65E5|\u5929|\u661F\u671F|\u793C\u62DC|\u6708|\u5E74)(?:(?:\u4E4B|\u8FC7)?\u540E|(?:\u4E4B)?\u5185)","i"),vd=1,w0=2,wd=class extends b0.AbstractParserWithWordBoundaryChecking{innerPattern(){return v0}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=parseInt(t[vd]);if(isNaN(i)&&(i=ry.zhStringToNumber(t[vd])),isNaN(i)){let u=t[vd];if(u==="\u51E0")i=3;else if(u==="\u534A")i=.5;else return null}let s=T0.default(e.refDate),o=t[w0][0];return o.match(/[日天星礼月年]/)?(o=="\u65E5"||o=="\u5929"?s=s.add(i,"d"):o=="\u661F"||o=="\u793C"?s=s.add(i*7,"d"):o=="\u6708"?s=s.add(i,"month"):o=="\u5E74"&&(s=s.add(i,"year")),n.start.assign("year",s.year()),n.start.assign("month",s.month()+1),n.start.assign("day",s.date()),n):(o=="\u79D2"?s=s.add(i,"second"):o=="\u5206"?s=s.add(i,"minute"):(o=="\u5C0F"||o=="\u949F")&&(s=s.add(i,"hour")),n.start.imply("year",s.year()),n.start.imply("month",s.month()+1),n.start.imply("day",s.date()),n.start.assign("hour",s.hour()),n.start.assign("minute",s.minute()),n.start.assign("second",s.second()),n)}};vs.default=wd});var sy=b(ws=>{"use strict";var E0=ws&&ws.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ws,"__esModule",{value:!0});var k0=E0(me()),D0=F(),iy=ri(),O0=new RegExp("(?<prefix>\u4E0A|\u4E0B|\u8FD9)(?:\u4E2A)?(?:\u661F\u671F|\u793C\u62DC|\u5468)(?<weekday>"+Object.keys(iy.WEEKDAY_OFFSET).join("|")+")"),Ed=class extends D0.AbstractParserWithWordBoundaryChecking{innerPattern(){return O0}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=iy.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=null,o=t.groups.prefix;o=="\u4E0A"?a="last":o=="\u4E0B"?a="next":o=="\u8FD9"&&(a="this");let u=k0.default(e.refDate),l=!1,c=u.day();return a=="last"||a=="past"?(u=u.day(s-7),l=!0):a=="next"?(u=u.day(s+7),l=!0):a=="this"?u=u.day(s):Math.abs(s-7-c)<Math.abs(s-c)?u=u.day(s-7):Math.abs(s+7-c)<Math.abs(s-c)?u=u.day(s+7):u=u.day(s),n.start.assign("weekday",s),l?(n.start.assign("day",u.date()),n.start.assign("month",u.month()+1),n.start.assign("year",u.year())):(n.start.imply("day",u.date()),n.start.imply("month",u.month()+1),n.start.imply("year",u.year())),n}};ws.default=Ed});var ay=b(Es=>{"use strict";var S0=Es&&Es.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Es,"__esModule",{value:!0});var R0=S0(me()),M0=F(),jt=ri(),x0=new RegExp("(?:\u4ECE|\u81EA)?(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(jt.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(jt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(jt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),A0=new RegExp("(?:^\\s*(?:\u5230|\u81F3|\\-|\\\u2013|\\~|\\\u301C)\\s*)(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(jt.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(jt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(jt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),Ka=1,Va=2,Xa=3,Qa=4,Za=5,Ja=6,$t=7,ni=8,eo=9,kd=class extends M0.AbstractParserWithWordBoundaryChecking{innerPattern(){return x0}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=R0.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=n.clone();if(t[Ka]){let c=t[Ka];c=="\u660E"?n.hour()>1&&s.add(1,"day"):c=="\u6628"?s.add(-1,"day"):c=="\u524D"?s.add(-2,"day"):c=="\u5927\u524D"?s.add(-3,"day"):c=="\u540E"?s.add(2,"day"):c=="\u5927\u540E"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else if(t[Qa]){let c=t[Qa];c=="\u660E"?s.add(1,"day"):c=="\u6628"?s.add(-1,"day"):c=="\u524D"?s.add(-2,"day"):c=="\u5927\u524D"?s.add(-3,"day"):c=="\u540E"?s.add(2,"day"):c=="\u5927\u540E"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else i.start.imply("day",s.date()),i.start.imply("month",s.month()+1),i.start.imply("year",s.year());let a=0,o=0,u=-1;if(t[ni]){let c=parseInt(t[ni]);if(isNaN(c)&&(c=jt.zhStringToNumber(t[ni])),c>=60)return null;i.start.assign("second",c)}if(a=parseInt(t[Ja]),isNaN(a)&&(a=jt.zhStringToNumber(t[Ja])),t[$t]?t[$t]=="\u534A"?o=30:t[$t]=="\u6B63"||t[$t]=="\u6574"?o=0:(o=parseInt(t[$t]),isNaN(o)&&(o=jt.zhStringToNumber(t[$t]))):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(u=1),t[eo]){if(a>12)return null;let c=t[eo][0].toLowerCase();c=="a"&&(u=0,a==12&&(a=0)),c=="p"&&(u=1,a!=12&&(a+=12))}else if(t[Va]){let f=t[Va][0];f=="\u65E9"?(u=0,a==12&&(a=0)):f=="\u665A"&&(u=1,a!=12&&(a+=12))}else if(t[Xa]){let f=t[Xa][0];f=="\u4E0A"||f=="\u65E9"||f=="\u51CC"?(u=0,a==12&&(a=0)):(f=="\u4E0B"||f=="\u665A")&&(u=1,a!=12&&(a+=12))}else if(t[Za]){let f=t[Za][0];f=="\u4E0A"||f=="\u65E9"||f=="\u51CC"?(u=0,a==12&&(a=0)):(f=="\u4E0B"||f=="\u665A")&&(u=1,a!=12&&(a+=12))}if(i.start.assign("hour",a),i.start.assign("minute",o),u>=0?i.start.assign("meridiem",u):a<12?i.start.imply("meridiem",0):i.start.imply("meridiem",1),t=A0.exec(e.text.substring(i.index+i.text.length)),!t)return i.text.match(/^\d+$/)?null:i;let l=s.clone();if(i.end=e.createParsingComponents(),t[Ka]){let c=t[Ka];c=="\u660E"?n.hour()>1&&l.add(1,"day"):c=="\u6628"?l.add(-1,"day"):c=="\u524D"?l.add(-2,"day"):c=="\u5927\u524D"?l.add(-3,"day"):c=="\u540E"?l.add(2,"day"):c=="\u5927\u540E"&&l.add(3,"day"),i.end.assign("day",l.date()),i.end.assign("month",l.month()+1),i.end.assign("year",l.year())}else if(t[Qa]){let c=t[Qa];c=="\u660E"?l.add(1,"day"):c=="\u6628"?l.add(-1,"day"):c=="\u524D"?l.add(-2,"day"):c=="\u5927\u524D"?l.add(-3,"day"):c=="\u540E"?l.add(2,"day"):c=="\u5927\u540E"&&l.add(3,"day"),i.end.assign("day",l.date()),i.end.assign("month",l.month()+1),i.end.assign("year",l.year())}else i.end.imply("day",l.date()),i.end.imply("month",l.month()+1),i.end.imply("year",l.year());if(a=0,o=0,u=-1,t[ni]){let c=parseInt(t[ni]);if(isNaN(c)&&(c=jt.zhStringToNumber(t[ni])),c>=60)return null;i.end.assign("second",c)}if(a=parseInt(t[Ja]),isNaN(a)&&(a=jt.zhStringToNumber(t[Ja])),t[$t]?t[$t]=="\u534A"?o=30:t[$t]=="\u6B63"||t[$t]=="\u6574"?o=0:(o=parseInt(t[$t]),isNaN(o)&&(o=jt.zhStringToNumber(t[$t]))):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(u=1),t[eo]){if(a>12)return null;let c=t[eo][0].toLowerCase();c=="a"&&(u=0,a==12&&(a=0)),c=="p"&&(u=1,a!=12&&(a+=12)),i.start.isCertain("meridiem")||(u==0?(i.start.imply("meridiem",0),i.start.get("hour")==12&&i.start.assign("hour",0)):(i.start.imply("meridiem",1),i.start.get("hour")!=12&&i.start.assign("hour",i.start.get("hour")+12)))}else if(t[Va]){let f=t[Va][0];f=="\u65E9"?(u=0,a==12&&(a=0)):f=="\u665A"&&(u=1,a!=12&&(a+=12))}else if(t[Xa]){let f=t[Xa][0];f=="\u4E0A"||f=="\u65E9"||f=="\u51CC"?(u=0,a==12&&(a=0)):(f=="\u4E0B"||f=="\u665A")&&(u=1,a!=12&&(a+=12))}else if(t[Za]){let f=t[Za][0];f=="\u4E0A"||f=="\u65E9"||f=="\u51CC"?(u=0,a==12&&(a=0)):(f=="\u4E0B"||f=="\u665A")&&(u=1,a!=12&&(a+=12))}return i.text=i.text+t[0],i.end.assign("hour",a),i.end.assign("minute",o),u>=0?i.end.assign("meridiem",u):i.start.isCertain("meridiem")&&i.start.get("meridiem")==1&&i.start.get("hour")>a?i.end.imply("meridiem",0):a>12&&i.end.imply("meridiem",1),i.end.date().getTime()<i.start.date().getTime()&&i.end.imply("day",i.end.get("day")+1),i}};Es.default=kd});var uy=b(ks=>{"use strict";var P0=ks&&ks.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ks,"__esModule",{value:!0});var C0=P0(me()),N0=F(),oy=ri(),I0=new RegExp("(?:\u661F\u671F|\u793C\u62DC|\u5468)(?<weekday>"+Object.keys(oy.WEEKDAY_OFFSET).join("|")+")"),Dd=class extends N0.AbstractParserWithWordBoundaryChecking{innerPattern(){return I0}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=oy.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=C0.default(e.refDate),o=!1,u=a.day();return Math.abs(s-7-u)<Math.abs(s-u)?a=a.day(s-7):Math.abs(s+7-u)<Math.abs(s-u)?a=a.day(s+7):a=a.day(s),n.start.assign("weekday",s),o?(n.start.assign("day",a.date()),n.start.assign("month",a.month()+1),n.start.assign("year",a.year())):(n.start.imply("day",a.date()),n.start.imply("month",a.month()+1),n.start.imply("year",a.year())),n}};ks.default=Dd});var ly=b(Ds=>{"use strict";var F0=Ds&&Ds.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ds,"__esModule",{value:!0});var L0=F0(ur()),Od=class extends L0.default{patternBetween(){return/^\s*(至|到|-|~|||ー)\s*$/i}};Ds.default=Od});var cy=b(Os=>{"use strict";var U0=Os&&Os.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Os,"__esModule",{value:!0});var W0=U0(yr()),Sd=class extends W0.default{patternBetween(){return/^\s*$/i}};Os.default=Sd});var dy=b($e=>{"use strict";var kr=$e&&$e.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($e,"__esModule",{value:!0});$e.createConfiguration=$e.createCasualConfiguration=$e.parseDate=$e.parse=$e.strict=$e.casual=$e.hans=void 0;var Rd=Vt(),q0=kr(Ea()),Y0=_r(),$0=kr(Jg()),j0=kr(ty()),G0=kr(ny()),B0=kr(sy()),H0=kr(ay()),z0=kr(uy()),K0=kr(ly()),V0=kr(cy());$e.hans=new Rd.Chrono(Md());$e.casual=new Rd.Chrono(Md());$e.strict=new Rd.Chrono(xd());function X0(r,e,t){return $e.casual.parse(r,e,t)}$e.parse=X0;function Q0(r,e,t){return $e.casual.parseDate(r,e,t)}$e.parseDate=Q0;function Md(){let r=xd();return r.parsers.unshift(new $0.default),r}$e.createCasualConfiguration=Md;function xd(){let r=Y0.includeCommonConfiguration({parsers:[new j0.default,new B0.default,new z0.default,new H0.default,new G0.default],refiners:[new K0.default,new V0.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof q0.default)),r}$e.createConfiguration=xd});var py=b(St=>{"use strict";var fy=St&&St.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Z0=St&&St.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),J0=St&&St.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&fy(e,r,t)},eR=St&&St.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&fy(e,r,t);return Z0(e,r),e};Object.defineProperty(St,"__esModule",{value:!0});St.hans=void 0;J0(Vg(),St);St.hans=eR(dy())});var vt=b(Z=>{"use strict";Object.defineProperty(Z,"__esModule",{value:!0});Z.parseTimeUnits=Z.TIME_UNITS_PATTERN=Z.parseYear=Z.YEAR_PATTERN=Z.parseOrdinalNumberPattern=Z.ORDINAL_NUMBER_PATTERN=Z.parseNumberPattern=Z.NUMBER_PATTERN=Z.TIME_UNIT_DICTIONARY=Z.ORDINAL_WORD_DICTIONARY=Z.INTEGER_WORD_DICTIONARY=Z.MONTH_DICTIONARY=Z.FULL_MONTH_NAME_DICTIONARY=Z.WEEKDAY_DICTIONARY=Z.REGEX_PARTS=void 0;var to=be(),tR=nt();Z.REGEX_PARTS={leftBoundary:"([^\\p{L}\\p{N}_]|^)",rightBoundary:"(?=[^\\p{L}\\p{N}_]|$)",flags:"iu"};Z.WEEKDAY_DICTIONARY={\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435:0,\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u044F:0,\u0432\u0441\u043A:0,"\u0432\u0441\u043A.":0,\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A:1,\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A\u0430:1,\u043F\u043D:1,"\u043F\u043D.":1,\u0432\u0442\u043E\u0440\u043D\u0438\u043A:2,\u0432\u0442\u043E\u0440\u043D\u0438\u043A\u0430:2,\u0432\u0442:2,"\u0432\u0442.":2,\u0441\u0440\u0435\u0434\u0430:3,\u0441\u0440\u0435\u0434\u044B:3,\u0441\u0440\u0435\u0434\u0443:3,\u0441\u0440:3,"\u0441\u0440.":3,\u0447\u0435\u0442\u0432\u0435\u0440\u0433:4,\u0447\u0435\u0442\u0432\u0435\u0440\u0433\u0430:4,\u0447\u0442:4,"\u0447\u0442.":4,\u043F\u044F\u0442\u043D\u0438\u0446\u0430:5,\u043F\u044F\u0442\u043D\u0438\u0446\u0443:5,\u043F\u044F\u0442\u043D\u0438\u0446\u044B:5,\u043F\u0442:5,"\u043F\u0442.":5,\u0441\u0443\u0431\u0431\u043E\u0442\u0430:6,\u0441\u0443\u0431\u0431\u043E\u0442\u0443:6,\u0441\u0443\u0431\u0431\u043E\u0442\u044B:6,\u0441\u0431:6,"\u0441\u0431.":6};Z.FULL_MONTH_NAME_DICTIONARY={\u044F\u043D\u0432\u0430\u0440\u044C:1,\u044F\u043D\u0432\u0430\u0440\u044F:1,\u044F\u043D\u0432\u0430\u0440\u0435:1,\u0444\u0435\u0432\u0440\u044F\u043B\u044C:2,\u0444\u0435\u0432\u0440\u044F\u043B\u044F:2,\u0444\u0435\u0432\u0440\u044F\u043B\u0435:2,\u043C\u0430\u0440\u0442:3,\u043C\u0430\u0440\u0442\u0430:3,\u043C\u0430\u0440\u0442\u0435:3,\u0430\u043F\u0440\u0435\u043B\u044C:4,\u0430\u043F\u0440\u0435\u043B\u044F:4,\u0430\u043F\u0440\u0435\u043B\u0435:4,\u043C\u0430\u0439:5,\u043C\u0430\u044F:5,\u043C\u0430\u0435:5,\u0438\u044E\u043D\u044C:6,\u0438\u044E\u043D\u044F:6,\u0438\u044E\u043D\u0435:6,\u0438\u044E\u043B\u044C:7,\u0438\u044E\u043B\u044F:7,\u0438\u044E\u043B\u0435:7,\u0430\u0432\u0433\u0443\u0441\u0442:8,\u0430\u0432\u0433\u0443\u0441\u0442\u0430:8,\u0430\u0432\u0433\u0443\u0441\u0442\u0435:8,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044C:9,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044F:9,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u0435:9,\u043E\u043A\u0442\u044F\u0431\u0440\u044C:10,\u043E\u043A\u0442\u044F\u0431\u0440\u044F:10,\u043E\u043A\u0442\u044F\u0431\u0440\u0435:10,\u043D\u043E\u044F\u0431\u0440\u044C:11,\u043D\u043E\u044F\u0431\u0440\u044F:11,\u043D\u043E\u044F\u0431\u0440\u0435:11,\u0434\u0435\u043A\u0430\u0431\u0440\u044C:12,\u0434\u0435\u043A\u0430\u0431\u0440\u044F:12,\u0434\u0435\u043A\u0430\u0431\u0440\u0435:12};Z.MONTH_DICTIONARY=Object.assign(Object.assign({},Z.FULL_MONTH_NAME_DICTIONARY),{\u044F\u043D\u0432:1,"\u044F\u043D\u0432.":1,\u0444\u0435\u0432:2,"\u0444\u0435\u0432.":2,\u043C\u0430\u0440:3,"\u043C\u0430\u0440.":3,\u0430\u043F\u0440:4,"\u0430\u043F\u0440.":4,\u0430\u0432\u0433:8,"\u0430\u0432\u0433.":8,\u0441\u0435\u043D:9,"\u0441\u0435\u043D.":9,\u043E\u043A\u0442:10,"\u043E\u043A\u0442.":10,\u043D\u043E\u044F:11,"\u043D\u043E\u044F.":11,\u0434\u0435\u043A:12,"\u0434\u0435\u043A.":12});Z.INTEGER_WORD_DICTIONARY={\u043E\u0434\u0438\u043D:1,\u043E\u0434\u043D\u0430:1,\u043E\u0434\u043D\u043E\u0439:1,\u043E\u0434\u043D\u0443:1,\u0434\u0432\u0435:2,\u0434\u0432\u0430:2,\u0434\u0432\u0443\u0445:2,\u0442\u0440\u0438:3,\u0442\u0440\u0435\u0445:3,\u0442\u0440\u0451\u0445:3,\u0447\u0435\u0442\u044B\u0440\u0435:4,\u0447\u0435\u0442\u044B\u0440\u0435\u0445:4,\u0447\u0435\u0442\u044B\u0440\u0451\u0445:4,\u043F\u044F\u0442\u044C:5,\u043F\u044F\u0442\u0438:5,\u0448\u0435\u0441\u0442\u044C:6,\u0448\u0435\u0441\u0442\u0438:6,\u0441\u0435\u043C\u044C:7,\u0441\u0435\u043C\u0438:7,\u0432\u043E\u0441\u0435\u043C\u044C:8,\u0432\u043E\u0441\u0435\u043C\u044C\u043C\u0438:8,\u0434\u0435\u0432\u044F\u0442\u044C:9,\u0434\u0435\u0432\u044F\u0442\u0438:9,\u0434\u0435\u0441\u044F\u0442\u044C:10,\u0434\u0435\u0441\u044F\u0442\u0438:10,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u044C:11,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u0438:11,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u044C:12,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u0438:12};Z.ORDINAL_WORD_DICTIONARY={\u043F\u0435\u0440\u0432\u043E\u0435:1,\u043F\u0435\u0440\u0432\u043E\u0433\u043E:1,\u0432\u0442\u043E\u0440\u043E\u0435:2,\u0432\u0442\u043E\u0440\u043E\u0433\u043E:2,\u0442\u0440\u0435\u0442\u044C\u0435:3,\u0442\u0440\u0435\u0442\u044C\u0435\u0433\u043E:3,\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0435:4,\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0433\u043E:4,\u043F\u044F\u0442\u043E\u0435:5,\u043F\u044F\u0442\u043E\u0433\u043E:5,\u0448\u0435\u0441\u0442\u043E\u0435:6,\u0448\u0435\u0441\u0442\u043E\u0433\u043E:6,\u0441\u0435\u0434\u044C\u043C\u043E\u0435:7,\u0441\u0435\u0434\u044C\u043C\u043E\u0433\u043E:7,\u0432\u043E\u0441\u044C\u043C\u043E\u0435:8,\u0432\u043E\u0441\u044C\u043C\u043E\u0433\u043E:8,\u0434\u0435\u0432\u044F\u0442\u043E\u0435:9,\u0434\u0435\u0432\u044F\u0442\u043E\u0433\u043E:9,\u0434\u0435\u0441\u044F\u0442\u043E\u0435:10,\u0434\u0435\u0441\u044F\u0442\u043E\u0433\u043E:10,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:11,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:11,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:12,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:12,\u0442\u0440\u0438\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:13,\u0442\u0440\u0438\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:13,\u0447\u0435\u0442\u044B\u0440\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:14,\u0447\u0435\u0442\u044B\u0440\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:14,\u043F\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:15,\u043F\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:15,\u0448\u0435\u0441\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:16,\u0448\u0435\u0441\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:16,\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:17,\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:17,\u0432\u043E\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:18,\u0432\u043E\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:18,\u0434\u0435\u0432\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:19,\u0434\u0435\u0432\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:19,\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u043E\u0435:20,\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:20,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0435":21,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0433\u043E":21,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u0442\u043E\u0440\u043E\u0435":22,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u0442\u043E\u0440\u043E\u0433\u043E":22,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0442\u0440\u0435\u0442\u044C\u0435":23,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0442\u0440\u0435\u0442\u044C\u0435\u0433\u043E":23,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0435":24,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0433\u043E":24,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u044F\u0442\u043E\u0435":25,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u044F\u0442\u043E\u0433\u043E":25,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0448\u0435\u0441\u0442\u043E\u0435":26,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0448\u0435\u0441\u0442\u043E\u0433\u043E":26,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0441\u0435\u0434\u044C\u043C\u043E\u0435":27,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0441\u0435\u0434\u044C\u043C\u043E\u0433\u043E":27,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u043E\u0441\u044C\u043C\u043E\u0435":28,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u043E\u0441\u044C\u043C\u043E\u0433\u043E":28,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0434\u0435\u0432\u044F\u0442\u043E\u0435":29,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0434\u0435\u0432\u044F\u0442\u043E\u0433\u043E":29,\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u043E\u0435:30,\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u043E\u0433\u043E:30,"\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0435":31,"\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0433\u043E":31};Z.TIME_UNIT_DICTIONARY={\u0441\u0435\u043A:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u0430:"second",\u0441\u0435\u043A\u0443\u043D\u0434:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u044B:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u0443:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0430:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0438:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u0435\u043A:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0443:"second",\u043C\u0438\u043D:"minute",\u043C\u0438\u043D\u0443\u0442\u0430:"minute",\u043C\u0438\u043D\u0443\u0442:"minute",\u043C\u0438\u043D\u0443\u0442\u044B:"minute",\u043C\u0438\u043D\u0443\u0442\u0443:"minute",\u043C\u0438\u043D\u0443\u0442\u043E\u043A:"minute",\u043C\u0438\u043D\u0443\u0442\u043A\u0438:"minute",\u043C\u0438\u043D\u0443\u0442\u043A\u0443:"minute",\u0447\u0430\u0441:"hour",\u0447\u0430\u0441\u043E\u0432:"hour",\u0447\u0430\u0441\u0430:"hour",\u0447\u0430\u0441\u0443:"hour",\u0447\u0430\u0441\u0438\u043A\u043E\u0432:"hour",\u0447\u0430\u0441\u0438\u043A\u0430:"hour",\u0447\u0430\u0441\u0438\u043A\u0435:"hour",\u0447\u0430\u0441\u0438\u043A:"hour",\u0434\u0435\u043D\u044C:"d",\u0434\u043D\u044F:"d",\u0434\u043D\u0435\u0439:"d",\u0441\u0443\u0442\u043E\u043A:"d",\u0441\u0443\u0442\u043A\u0438:"d",\u043D\u0435\u0434\u0435\u043B\u044F:"week",\u043D\u0435\u0434\u0435\u043B\u0435:"week",\u043D\u0435\u0434\u0435\u043B\u0438:"week",\u043D\u0435\u0434\u0435\u043B\u044E:"week",\u043D\u0435\u0434\u0435\u043B\u044C:"week",\u043D\u0435\u0434\u0435\u043B\u044C\u043A\u0435:"week",\u043D\u0435\u0434\u0435\u043B\u044C\u043A\u0438:"week",\u043D\u0435\u0434\u0435\u043B\u0435\u043A:"week",\u043C\u0435\u0441\u044F\u0446:"month",\u043C\u0435\u0441\u044F\u0446\u0435:"month",\u043C\u0435\u0441\u044F\u0446\u0435\u0432:"month",\u043C\u0435\u0441\u044F\u0446\u0430:"month",\u043A\u0432\u0430\u0440\u0442\u0430\u043B:"quarter",\u043A\u0432\u0430\u0440\u0442\u0430\u043B\u0435:"quarter",\u043A\u0432\u0430\u0440\u0442\u0430\u043B\u043E\u0432:"quarter",\u0433\u043E\u0434:"year",\u0433\u043E\u0434\u0430:"year",\u0433\u043E\u0434\u0443:"year",\u0433\u043E\u0434\u043E\u0432:"year",\u043B\u0435\u0442:"year",\u0433\u043E\u0434\u0438\u043A:"year",\u0433\u043E\u0434\u0438\u043A\u0430:"year",\u0433\u043E\u0434\u0438\u043A\u043E\u0432:"year"};Z.NUMBER_PATTERN=`(?:${to.matchAnyPattern(Z.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|\u043F\u043E\u043B|\u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E|\u043F\u0430\u0440(?:\u044B|\u0443)|\\s{0,3})`;function hy(r){let e=r.toLowerCase();return Z.INTEGER_WORD_DICTIONARY[e]!==void 0?Z.INTEGER_WORD_DICTIONARY[e]:e.match(/несколько/)?3:e.match(/пол/)?.5:e.match(/пар/)?2:e===""?1:parseFloat(e)}Z.parseNumberPattern=hy;Z.ORDINAL_NUMBER_PATTERN=`(?:${to.matchAnyPattern(Z.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:\u0433\u043E|\u043E\u0433\u043E|\u0435|\u043E\u0435)?)`;function rR(r){let e=r.toLowerCase();return Z.ORDINAL_WORD_DICTIONARY[e]!==void 0?Z.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}Z.parseOrdinalNumberPattern=rR;var Ad="(?:\\s+(?:\u0433\u043E\u0434\u0443|\u0433\u043E\u0434\u0430|\u0433\u043E\u0434|\u0433|\u0433.))?";Z.YEAR_PATTERN=`(?:[1-9][0-9]{0,3}${Ad}\\s*(?:\u043D.\u044D.|\u0434\u043E \u043D.\u044D.|\u043D. \u044D.|\u0434\u043E \u043D. \u044D.)|[1-2][0-9]{3}${Ad}|[5-9][0-9]${Ad})`;function nR(r){if(/(год|года|г|г.)/i.test(r)&&(r=r.replace(/(год|года|г|г.)/i,"")),/(до н.э.|до н. э.)/i.test(r))return r=r.replace(/(до н.э.|до н. э.)/i,""),-parseInt(r);if(/(н. э.|н.э.)/i.test(r))return r=r.replace(/(н. э.|н.э.)/i,""),parseInt(r);let e=parseInt(r);return tR.findMostLikelyADYear(e)}Z.parseYear=nR;var gy=`(${Z.NUMBER_PATTERN})\\s{0,3}(${to.matchAnyPattern(Z.TIME_UNIT_DICTIONARY)})`,my=new RegExp(gy,"i");Z.TIME_UNITS_PATTERN=to.repeatedTimeunitPattern("(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s{0,3})?",gy);function iR(r){let e={},t=r,n=my.exec(t);for(;n;)sR(e,n),t=t.substring(n[0].length).trim(),n=my.exec(t);return e}Z.parseTimeUnits=iR;function sR(r,e){let t=hy(e[1]),n=Z.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var _y=b(Cd=>{"use strict";Object.defineProperty(Cd,"__esModule",{value:!0});var Ss=vt(),aR=Ne(),oR=F(),yy=`(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s*(?:~\\s*)?)?(${Ss.TIME_UNITS_PATTERN})${Ss.REGEX_PARTS.rightBoundary}`,uR=new RegExp(`(?:\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0435|\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0438)\\s*${yy}`,Ss.REGEX_PARTS.flags),lR=new RegExp(yy,"i"),Pd=class extends oR.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Ss.REGEX_PARTS.leftBoundary}innerPattern(e){return e.option.forwardDate?lR:uR}innerExtract(e,t){let n=Ss.parseTimeUnits(t[1]);return aR.ParsingComponents.createRelativeFromReference(e.reference,n)}};Cd.default=Pd});var Ey=b(Id=>{"use strict";Object.defineProperty(Id,"__esModule",{value:!0});var cR=nt(),Rs=vt(),wy=vt(),ro=vt(),dR=be(),fR=F(),pR=new RegExp(`(?:\u0441)?\\s*(${ro.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:\u043F\u043E|-|\u2013|\u0434\u043E)?\\s{0,3}(${ro.ORDINAL_NUMBER_PATTERN}))?(?:-|\\/|\\s{0,3}(?:of)?\\s{0,3})(${dR.matchAnyPattern(Rs.MONTH_DICTIONARY)})(?:(?:-|\\/|,?\\s{0,3})(${wy.YEAR_PATTERN}(?![^\\s]\\d)))?${Rs.REGEX_PARTS.rightBoundary}`,Rs.REGEX_PARTS.flags),Ty=1,by=2,mR=3,vy=4,Nd=class extends fR.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Rs.REGEX_PARTS.leftBoundary}innerPattern(){return pR}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Rs.MONTH_DICTIONARY[t[mR].toLowerCase()],s=ro.parseOrdinalNumberPattern(t[Ty]);if(s>31)return t.index=t.index+t[Ty].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[vy]){let a=wy.parseYear(t[vy]);n.start.assign("year",a)}else{let a=cR.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[by]){let a=ro.parseOrdinalNumberPattern(t[by]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Id.default=Nd});var Oy=b(Ld=>{"use strict";Object.defineProperty(Ld,"__esModule",{value:!0});var Ms=vt(),hR=nt(),gR=be(),Dy=vt(),yR=F(),_R=new RegExp(`((?:\u0432)\\s*)?(${gR.matchAnyPattern(Ms.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${Dy.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,Ms.REGEX_PARTS.flags),TR=2,ky=3,Fd=class extends yR.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Ms.REGEX_PARTS.leftBoundary}innerPattern(){return _R}innerExtract(e,t){let n=t[TR].toLowerCase();if(t[0].length<=3&&!Ms.FULL_MONTH_NAME_DICTIONARY[n])return null;let i=e.createParsingResult(t.index,t.index+t[0].length);i.start.imply("day",1);let s=Ms.MONTH_DICTIONARY[n];if(i.start.assign("month",s),t[ky]){let a=Dy.parseYear(t[ky]);i.start.assign("year",a)}else{let a=hR.findYearClosestToRef(e.refDate,1,s);i.start.imply("year",a)}return i}};Ld.default=Fd});var Ry=b(Wd=>{"use strict";Object.defineProperty(Wd,"__esModule",{value:!0});var no=Be(),bR=dn(),Sy=vt(),Ud=class extends bR.AbstractTimeExpressionParser{constructor(e){super(e)}patternFlags(){return Sy.REGEX_PARTS.flags}primaryPatternLeftBoundary(){return"(^|\\s|T|(?:[^\\p{L}\\p{N}_]))"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|\u0434\u043E|\u0438|\u043F\u043E|\\?)\\s*"}primaryPrefix(){return"(?:(?:\u0432|\u0441)\\s*)??"}primarySuffix(){return`(?:\\s*(?:\u0443\u0442\u0440\u0430|\u0432\u0435\u0447\u0435\u0440\u0430|\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F))?(?!\\/)${Sy.REGEX_PARTS.rightBoundary}`}extractPrimaryTimeComponents(e,t){let n=super.extractPrimaryTimeComponents(e,t);if(n){if(t[0].endsWith("\u0432\u0435\u0447\u0435\u0440\u0430")){let i=n.get("hour");i>=6&&i<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",no.Meridiem.PM)):i<6&&n.assign("meridiem",no.Meridiem.AM)}if(t[0].endsWith("\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F")){n.assign("meridiem",no.Meridiem.PM);let i=n.get("hour");i>=0&&i<=6&&n.assign("hour",n.get("hour")+12)}t[0].endsWith("\u0443\u0442\u0440\u0430")&&(n.assign("meridiem",no.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};Wd.default=Ud});var My=b(Yd=>{"use strict";Object.defineProperty(Yd,"__esModule",{value:!0});var io=vt(),vR=Ne(),wR=F(),ER=Ut(),kR=new RegExp(`(${io.TIME_UNITS_PATTERN})\\s{0,5}\u043D\u0430\u0437\u0430\u0434(?=(?:\\W|$))`,io.REGEX_PARTS.flags),qd=class extends wR.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return io.REGEX_PARTS.leftBoundary}innerPattern(){return kR}innerExtract(e,t){let n=io.parseTimeUnits(t[1]),i=ER.reverseTimeUnits(n);return vR.ParsingComponents.createRelativeFromReference(e.reference,i)}};Yd.default=qd});var xy=b(xs=>{"use strict";var DR=xs&&xs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(xs,"__esModule",{value:!0});var OR=DR(ur()),$d=class extends OR.default{patternBetween(){return/^\s*(и до|и по|до|по|-)\s*$/i}};xs.default=$d});var Ay=b(As=>{"use strict";var SR=As&&As.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(As,"__esModule",{value:!0});var RR=SR(yr()),jd=class extends RR.default{patternBetween(){return new RegExp("^\\s*(T|\u0432|,|-)?\\s*$")}};As.default=jd});var Py=b(Dr=>{"use strict";var MR=Dr&&Dr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),xR=Dr&&Dr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),AR=Dr&&Dr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&MR(e,r,t);return xR(e,r),e};Object.defineProperty(Dr,"__esModule",{value:!0});var PR=F(),Ps=AR(br()),Gd=vt(),CR=new RegExp(`(?:\u0441|\u0441\u043E)?\\s*(\u0441\u0435\u0433\u043E\u0434\u043D\u044F|\u0432\u0447\u0435\u0440\u0430|\u0437\u0430\u0432\u0442\u0440\u0430|\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430|\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430)${Gd.REGEX_PARTS.rightBoundary}`,Gd.REGEX_PARTS.flags),Bd=class extends PR.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Gd.REGEX_PARTS.leftBoundary}innerPattern(e){return CR}innerExtract(e,t){let n=t[1].toLowerCase(),i=e.createParsingComponents();switch(n){case"\u0441\u0435\u0433\u043E\u0434\u043D\u044F":return Ps.today(e.reference);case"\u0432\u0447\u0435\u0440\u0430":return Ps.yesterday(e.reference);case"\u0437\u0430\u0432\u0442\u0440\u0430":return Ps.tomorrow(e.reference);case"\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430":return Ps.theDayAfter(e.reference,2);case"\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430":return Ps.theDayBefore(e.reference,2)}return i}};Dr.default=Bd});var Cy=b(er=>{"use strict";var NR=er&&er.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),IR=er&&er.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),FR=er&&er.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&NR(e,r,t);return IR(e,r),e},LR=er&&er.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(er,"__esModule",{value:!0});var UR=F(),Tn=FR(br()),WR=Lt(),qR=LR(me()),Hd=vt(),YR=new RegExp(`(\u0441\u0435\u0439\u0447\u0430\u0441|\u043F\u0440\u043E\u0448\u043B\u044B\u043C\\s*\u0432\u0435\u0447\u0435\u0440\u043E\u043C|\u043F\u0440\u043E\u0448\u043B\u043E\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u0441\u0435\u0433\u043E\u0434\u043D\u044F\\s*\u043D\u043E\u0447\u044C\u044E|\u044D\u0442\u043E\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u043D\u043E\u0447\u044C\u044E|\u044D\u0442\u0438\u043C \u0443\u0442\u0440\u043E\u043C|\u0443\u0442\u0440\u043E\u043C|\u0443\u0442\u0440\u0430|\u0432\\s*\u043F\u043E\u043B\u0434\u0435\u043D\u044C|\u0432\u0435\u0447\u0435\u0440\u043E\u043C|\u0432\u0435\u0447\u0435\u0440\u0430|\u0432\\s*\u043F\u043E\u043B\u043D\u043E\u0447\u044C)${Hd.REGEX_PARTS.rightBoundary}`,Hd.REGEX_PARTS.flags),zd=class extends UR.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Hd.REGEX_PARTS.leftBoundary}innerPattern(){return YR}innerExtract(e,t){let n=qR.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();if(i==="\u0441\u0435\u0439\u0447\u0430\u0441")return Tn.now(e.reference);if(i==="\u0432\u0435\u0447\u0435\u0440\u043E\u043C"||i==="\u0432\u0435\u0447\u0435\u0440\u0430")return Tn.evening(e.reference);if(i.endsWith("\u0443\u0442\u0440\u043E\u043C")||i.endsWith("\u0443\u0442\u0440\u0430"))return Tn.morning(e.reference);if(i.match(/в\s*полдень/))return Tn.noon(e.reference);if(i.match(/прошлой\s*ночью/))return Tn.lastNight(e.reference);if(i.match(/прошлым\s*вечером/))return Tn.yesterdayEvening(e.reference);if(i.match(/следующей\s*ночью/)){let a=n.hour()<22?1:2;n=n.add(a,"day"),WR.assignSimilarDate(s,n),s.imply("hour",0)}return i.match(/в\s*полночь/)||i.endsWith("\u043D\u043E\u0447\u044C\u044E")?Tn.midnight(e.reference):s}};er.default=zd});var Ny=b(Vd=>{"use strict";Object.defineProperty(Vd,"__esModule",{value:!0});var Cs=vt(),$R=be(),jR=F(),GR=pn(),BR=new RegExp(`(?:(?:,|\\(|\uFF08)\\s*)?(?:\u0432\\s*?)?(?:(\u044D\u0442\u0443|\u044D\u0442\u043E\u0442|\u043F\u0440\u043E\u0448\u043B\u044B\u0439|\u043F\u0440\u043E\u0448\u043B\u0443\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E)\\s*)?(${$R.matchAnyPattern(Cs.WEEKDAY_DICTIONARY)})(?:\\s*(?:,|\\)|\uFF09))?(?:\\s*\u043D\u0430\\s*(\u044D\u0442\u043E\u0439|\u043F\u0440\u043E\u0448\u043B\u043E\u0439|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439)\\s*\u043D\u0435\u0434\u0435\u043B\u0435)?${Cs.REGEX_PARTS.rightBoundary}`,Cs.REGEX_PARTS.flags),HR=1,zR=2,KR=3,Kd=class extends jR.AbstractParserWithWordBoundaryChecking{innerPattern(){return BR}patternLeftBoundary(){return Cs.REGEX_PARTS.leftBoundary}innerExtract(e,t){let n=t[zR].toLowerCase(),i=Cs.WEEKDAY_DICTIONARY[n],s=t[HR],a=t[KR],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o=="\u043F\u0440\u043E\u0448\u043B\u044B\u0439"||o=="\u043F\u0440\u043E\u0448\u043B\u0443\u044E"||o=="\u043F\u0440\u043E\u0448\u043B\u043E\u0439"?u="last":o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E"?u="next":(o=="\u044D\u0442\u043E\u0442"||o=="\u044D\u0442\u0443"||o=="\u044D\u0442\u043E\u0439")&&(u="this");let l=GR.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Vd.default=Kd});var Fy=b(Is=>{"use strict";var VR=Is&&Is.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Is,"__esModule",{value:!0});var Ns=vt(),Iy=Ne(),XR=VR(me()),QR=F(),ZR=be(),JR=new RegExp(`(\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u043C|\u043D\u0430 \u043F\u0440\u043E\u0448\u043B\u043E\u0439|\u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439|\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C|\u043D\u0430 \u044D\u0442\u043E\u0439|\u0432 \u044D\u0442\u043E\u043C)\\s*(${ZR.matchAnyPattern(Ns.TIME_UNIT_DICTIONARY)})(?=\\s*)${Ns.REGEX_PARTS.rightBoundary}`,Ns.REGEX_PARTS.flags),eM=1,tM=2,Xd=class extends QR.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Ns.REGEX_PARTS.leftBoundary}innerPattern(){return JR}innerExtract(e,t){let n=t[eM].toLowerCase(),i=t[tM].toLowerCase(),s=Ns.TIME_UNIT_DICTIONARY[i];if(n=="\u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||n=="\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C"){let u={};return u[s]=1,Iy.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u043C"||n=="\u043D\u0430 \u043F\u0440\u043E\u0448\u043B\u043E\u0439"){let u={};return u[s]=-1,Iy.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=XR.default(e.reference.instant);return s.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):s.match(/month/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):s.match(/year/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};Is.default=Xd});var Ly=b(Zd=>{"use strict";Object.defineProperty(Zd,"__esModule",{value:!0});var Fs=vt(),rM=Ne(),nM=F(),iM=Ut(),sM=new RegExp(`(\u044D\u0442\u0438|\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435|\u043F\u0440\u043E\u0448\u043B\u044B\u0435|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0435|\u043F\u043E\u0441\u043B\u0435|\u0447\u0435\u0440\u0435\u0437|\\+|-)\\s*(${Fs.TIME_UNITS_PATTERN})${Fs.REGEX_PARTS.rightBoundary}`,Fs.REGEX_PARTS.flags),Qd=class extends nM.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Fs.REGEX_PARTS.leftBoundary}innerPattern(){return sM}innerExtract(e,t){let n=t[1].toLowerCase(),i=Fs.parseTimeUnits(t[2]);switch(n){case"\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435":case"\u043F\u0440\u043E\u0448\u043B\u044B\u0435":case"-":i=iM.reverseTimeUnits(i);break}return rM.ParsingComponents.createRelativeFromReference(e.reference,i)}};Zd.default=Qd});var qy=b(Je=>{"use strict";var Rt=Je&&Je.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Je,"__esModule",{value:!0});Je.createConfiguration=Je.createCasualConfiguration=Je.parseDate=Je.parse=Je.strict=Je.casual=void 0;var aM=Rt(_y()),oM=Rt(Ey()),uM=Rt(Oy()),lM=Rt(Ry()),cM=Rt(My()),dM=Rt(xy()),fM=Rt(Ay()),pM=_r(),mM=Rt(Py()),hM=Rt(Cy()),gM=Rt(Ny()),yM=Rt(Fy()),Uy=Vt(),_M=Rt(mn()),TM=Rt(Ly());Je.casual=new Uy.Chrono(Wy());Je.strict=new Uy.Chrono(Jd(!0));function bM(r,e,t){return Je.casual.parse(r,e,t)}Je.parse=bM;function vM(r,e,t){return Je.casual.parseDate(r,e,t)}Je.parseDate=vM;function Wy(){let r=Jd(!1);return r.parsers.unshift(new mM.default),r.parsers.unshift(new hM.default),r.parsers.unshift(new uM.default),r.parsers.unshift(new yM.default),r.parsers.unshift(new TM.default),r}Je.createCasualConfiguration=Wy;function Jd(r=!0){return pM.includeCommonConfiguration({parsers:[new _M.default(!0),new aM.default,new oM.default,new gM.default,new lM.default(r),new cM.default],refiners:[new fM.default,new dM.default]},r)}Je.createConfiguration=Jd});var Be=b(ie=>{"use strict";var wM=ie&&ie.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),EM=ie&&ie.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),zr=ie&&ie.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&wM(e,r,t);return EM(e,r),e};Object.defineProperty(ie,"__esModule",{value:!0});ie.parseDate=ie.parse=ie.casual=ie.strict=ie.ru=ie.zh=ie.nl=ie.pt=ie.ja=ie.fr=ie.de=ie.Meridiem=ie.Chrono=ie.en=void 0;var ef=zr(yl());ie.en=ef;var kM=Vt();Object.defineProperty(ie,"Chrono",{enumerable:!0,get:function(){return kM.Chrono}});var DM;(function(r){r[r.AM=0]="AM",r[r.PM=1]="PM"})(DM=ie.Meridiem||(ie.Meridiem={}));var OM=zr(Vm());ie.de=OM;var SM=zr(kh());ie.fr=SM;var RM=zr(Ch());ie.ja=RM;var MM=zr(Vh());ie.pt=MM;var xM=zr(Cg());ie.nl=xM;var AM=zr(py());ie.zh=AM;var PM=zr(qy());ie.ru=PM;ie.strict=ef.strict;ie.casual=ef.casual;function CM(r,e,t){return ie.casual.parse(r,e,t)}ie.parse=CM;function NM(r,e,t){return ie.casual.parseDate(r,e,t)}ie.parseDate=NM});var c_=b((eN,co)=>{var jy,Gy,By,Hy,zy,Ky,Vy,Xy,Qy,uo,rf,Zy,Jy,e_,si,t_,r_,n_,i_,s_,a_,o_,u_,l_,lo;(function(r){var e=typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:{};typeof define=="function"&&define.amd?define("tslib",["exports"],function(n){r(t(e,t(n)))}):typeof co=="object"&&typeof co.exports=="object"?r(t(e,t(co.exports))):r(t(e));function t(n,i){return n!==e&&(typeof Object.create=="function"?Object.defineProperty(n,"__esModule",{value:!0}):n.__esModule=!0),function(s,a){return n[s]=i?i(s,a):a}}})(function(r){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])};jy=function(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");e(n,i);function s(){this.constructor=n}n.prototype=i===null?Object.create(i):(s.prototype=i.prototype,new s)},Gy=Object.assign||function(n){for(var i,s=1,a=arguments.length;s<a;s++){i=arguments[s];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])}return n},By=function(n,i){var s={};for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&i.indexOf(a)<0&&(s[a]=n[a]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,a=Object.getOwnPropertySymbols(n);o<a.length;o++)i.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(n,a[o])&&(s[a[o]]=n[a[o]]);return s},Hy=function(n,i,s,a){var o=arguments.length,u=o<3?i:a===null?a=Object.getOwnPropertyDescriptor(i,s):a,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,i,s,a);else for(var c=n.length-1;c>=0;c--)(l=n[c])&&(u=(o<3?l(u):o>3?l(i,s,u):l(i,s))||u);return o>3&&u&&Object.defineProperty(i,s,u),u},zy=function(n,i){return function(s,a){i(s,a,n)}},Ky=function(n,i){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,i)},Vy=function(n,i,s,a){function o(u){return u instanceof s?u:new s(function(l){l(u)})}return new(s||(s=Promise))(function(u,l){function c(T){try{m(a.next(T))}catch(y){l(y)}}function f(T){try{m(a.throw(T))}catch(y){l(y)}}function m(T){T.done?u(T.value):o(T.value).then(c,f)}m((a=a.apply(n,i||[])).next())})},Xy=function(n,i){var s={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},a,o,u,l;return l={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function c(m){return function(T){return f([m,T])}}function f(m){if(a)throw new TypeError("Generator is already executing.");for(;s;)try{if(a=1,o&&(u=m[0]&2?o.return:m[0]?o.throw||((u=o.return)&&u.call(o),0):o.next)&&!(u=u.call(o,m[1])).done)return u;switch(o=0,u&&(m=[m[0]&2,u.value]),m[0]){case 0:case 1:u=m;break;case 4:return s.label++,{value:m[1],done:!1};case 5:s.label++,o=m[1],m=[0];continue;case 7:m=s.ops.pop(),s.trys.pop();continue;default:if(u=s.trys,!(u=u.length>0&&u[u.length-1])&&(m[0]===6||m[0]===2)){s=0;continue}if(m[0]===3&&(!u||m[1]>u[0]&&m[1]<u[3])){s.label=m[1];break}if(m[0]===6&&s.label<u[1]){s.label=u[1],u=m;break}if(u&&s.label<u[2]){s.label=u[2],s.ops.push(m);break}u[2]&&s.ops.pop(),s.trys.pop();continue}m=i.call(n,s)}catch(T){m=[6,T],o=0}finally{a=u=0}if(m[0]&5)throw m[1];return{value:m[0]?m[1]:void 0,done:!0}}},Qy=function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&lo(i,n,s)},lo=Object.create?function(n,i,s,a){a===void 0&&(a=s);var o=Object.getOwnPropertyDescriptor(i,s);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,a,o)}:function(n,i,s,a){a===void 0&&(a=s),n[a]=i[s]},uo=function(n){var i=typeof Symbol=="function"&&Symbol.iterator,s=i&&n[i],a=0;if(s)return s.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&a>=n.length&&(n=void 0),{value:n&&n[a++],done:!n}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")},rf=function(n,i){var s=typeof Symbol=="function"&&n[Symbol.iterator];if(!s)return n;var a=s.call(n),o,u=[],l;try{for(;(i===void 0||i-- >0)&&!(o=a.next()).done;)u.push(o.value)}catch(c){l={error:c}}finally{try{o&&!o.done&&(s=a.return)&&s.call(a)}finally{if(l)throw l.error}}return u},Zy=function(){for(var n=[],i=0;i<arguments.length;i++)n=n.concat(rf(arguments[i]));return n},Jy=function(){for(var n=0,i=0,s=arguments.length;i<s;i++)n+=arguments[i].length;for(var a=Array(n),o=0,i=0;i<s;i++)for(var u=arguments[i],l=0,c=u.length;l<c;l++,o++)a[o]=u[l];return a},e_=function(n,i,s){if(s||arguments.length===2)for(var a=0,o=i.length,u;a<o;a++)(u||!(a in i))&&(u||(u=Array.prototype.slice.call(i,0,a)),u[a]=i[a]);return n.concat(u||Array.prototype.slice.call(i))},si=function(n){return this instanceof si?(this.v=n,this):new si(n)},t_=function(n,i,s){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a=s.apply(n,i||[]),o,u=[];return o={},l("next"),l("throw"),l("return"),o[Symbol.asyncIterator]=function(){return this},o;function l(w){a[w]&&(o[w]=function(R){return new Promise(function(L,q){u.push([w,R,L,q])>1||c(w,R)})})}function c(w,R){try{f(a[w](R))}catch(L){y(u[0][3],L)}}function f(w){w.value instanceof si?Promise.resolve(w.value.v).then(m,T):y(u[0][2],w)}function m(w){c("next",w)}function T(w){c("throw",w)}function y(w,R){w(R),u.shift(),u.length&&c(u[0][0],u[0][1])}},r_=function(n){var i,s;return i={},a("next"),a("throw",function(o){throw o}),a("return"),i[Symbol.iterator]=function(){return this},i;function a(o,u){i[o]=n[o]?function(l){return(s=!s)?{value:si(n[o](l)),done:o==="return"}:u?u(l):l}:u}},n_=function(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=n[Symbol.asyncIterator],s;return i?i.call(n):(n=typeof uo=="function"?uo(n):n[Symbol.iterator](),s={},a("next"),a("throw"),a("return"),s[Symbol.asyncIterator]=function(){return this},s);function a(u){s[u]=n[u]&&function(l){return new Promise(function(c,f){l=n[u](l),o(c,f,l.done,l.value)})}}function o(u,l,c,f){Promise.resolve(f).then(function(m){u({value:m,done:c})},l)}},i_=function(n,i){return Object.defineProperty?Object.defineProperty(n,"raw",{value:i}):n.raw=i,n};var t=Object.create?function(n,i){Object.defineProperty(n,"default",{enumerable:!0,value:i})}:function(n,i){n.default=i};s_=function(n){if(n&&n.__esModule)return n;var i={};if(n!=null)for(var s in n)s!=="default"&&Object.prototype.hasOwnProperty.call(n,s)&&lo(i,n,s);return t(i,n),i},a_=function(n){return n&&n.__esModule?n:{default:n}},o_=function(n,i,s,a){if(s==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof i=="function"?n!==i||!a:!i.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?a:s==="a"?a.call(n):a?a.value:i.get(n)},u_=function(n,i,s,a,o){if(a==="m")throw new TypeError("Private method is not writable");if(a==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof i=="function"?n!==i||!o:!i.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return a==="a"?o.call(n,s):o?o.value=s:i.set(n,s),s},l_=function(n,i){if(i===null||typeof i!="object"&&typeof i!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof n=="function"?i===n:n.has(i)},r("__extends",jy),r("__assign",Gy),r("__rest",By),r("__decorate",Hy),r("__param",zy),r("__metadata",Ky),r("__awaiter",Vy),r("__generator",Xy),r("__exportStar",Qy),r("__createBinding",lo),r("__values",uo),r("__read",rf),r("__spread",Zy),r("__spreadArrays",Jy),r("__spreadArray",e_),r("__await",si),r("__asyncGenerator",t_),r("__asyncDelegator",r_),r("__asyncValues",n_),r("__makeTemplateObject",i_),r("__importStar",s_),r("__importDefault",a_),r("__classPrivateFieldGet",o_),r("__classPrivateFieldSet",u_),r("__classPrivateFieldIn",l_)})});var V_=b((z_,K_)=>{(function(r){var e=Object.hasOwnProperty,t=Array.isArray?Array.isArray:function(p){return Object.prototype.toString.call(p)==="[object Array]"},n=10,i=typeof process=="object"&&typeof process.nextTick=="function",s=typeof Symbol=="function",a=typeof Reflect=="object",o=typeof setImmediate=="function",u=o?setImmediate:setTimeout,l=s?a&&typeof Reflect.ownKeys=="function"?Reflect.ownKeys:function(d){var p=Object.getOwnPropertyNames(d);return p.push.apply(p,Object.getOwnPropertySymbols(d)),p}:Object.keys;function c(){this._events={},this._conf&&f.call(this,this._conf)}function f(d){d&&(this._conf=d,d.delimiter&&(this.delimiter=d.delimiter),d.maxListeners!==r&&(this._maxListeners=d.maxListeners),d.wildcard&&(this.wildcard=d.wildcard),d.newListener&&(this._newListener=d.newListener),d.removeListener&&(this._removeListener=d.removeListener),d.verboseMemoryLeak&&(this.verboseMemoryLeak=d.verboseMemoryLeak),d.ignoreErrors&&(this.ignoreErrors=d.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function m(d,p){var h="(node) warning: possible EventEmitter memory leak detected. "+d+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(h+=" Event name: "+p+"."),typeof process!="undefined"&&process.emitWarning){var g=new Error(h);g.name="MaxListenersExceededWarning",g.emitter=this,g.count=d,process.emitWarning(g)}else console.error(h),console.trace&&console.trace()}var T=function(d,p,h){var g=arguments.length;switch(g){case 0:return[];case 1:return[d];case 2:return[d,p];case 3:return[d,p,h];default:for(var _=new Array(g);g--;)_[g]=arguments[g];return _}};function y(d,p){for(var h={},g,_=d.length,v=p?p.length:0,k=0;k<_;k++)g=d[k],h[g]=k<v?p[k]:r;return h}function w(d,p,h){this._emitter=d,this._target=p,this._listeners={},this._listenersCount=0;var g,_;if((h.on||h.off)&&(g=h.on,_=h.off),p.addEventListener?(g=p.addEventListener,_=p.removeEventListener):p.addListener?(g=p.addListener,_=p.removeListener):p.on&&(g=p.on,_=p.off),!g&&!_)throw Error("target does not implement any known event API");if(typeof g!="function")throw TypeError("on method must be a function");if(typeof _!="function")throw TypeError("off method must be a function");this._on=g,this._off=_;var v=d._observers;v?v.push(this):d._observers=[this]}Object.assign(w.prototype,{subscribe:function(d,p,h){var g=this,_=this._target,v=this._emitter,k=this._listeners,S=function(){var D=T.apply(null,arguments),O={data:D,name:p,original:d};if(h){var C=h.call(_,O);C!==!1&&v.emit.apply(v,[O.name].concat(D));return}v.emit.apply(v,[p].concat(D))};if(k[d])throw Error("Event '"+d+"' is already listening");this._listenersCount++,v._newListener&&v._removeListener&&!g._onNewListener?(this._onNewListener=function(D){D===p&&k[d]===null&&(k[d]=S,g._on.call(_,d,S))},v.on("newListener",this._onNewListener),this._onRemoveListener=function(D){D===p&&!v.hasListeners(D)&&k[d]&&(k[d]=null,g._off.call(_,d,S))},k[d]=null,v.on("removeListener",this._onRemoveListener)):(k[d]=S,g._on.call(_,d,S))},unsubscribe:function(d){var p=this,h=this._listeners,g=this._emitter,_,v,k=this._off,S=this._target,D;if(d&&typeof d!="string")throw TypeError("event must be a string");function O(){p._onNewListener&&(g.off("newListener",p._onNewListener),g.off("removeListener",p._onRemoveListener),p._onNewListener=null,p._onRemoveListener=null);var C=Te.call(g,p);g._observers.splice(C,1)}if(d){if(_=h[d],!_)return;k.call(S,d,_),delete h[d],--this._listenersCount||O()}else{for(v=l(h),D=v.length;D-- >0;)d=v[D],k.call(S,d,h[d]);this._listeners={},this._listenersCount=0,O()}}});function R(d,p,h,g){var _=Object.assign({},p);if(!d)return _;if(typeof d!="object")throw TypeError("options must be an object");var v=Object.keys(d),k=v.length,S,D,O;function C(se){throw Error('Invalid "'+S+'" option value'+(se?". Reason: "+se:""))}for(var pe=0;pe<k;pe++){if(S=v[pe],!g&&!e.call(p,S))throw Error('Unknown "'+S+'" option');D=d[S],D!==r&&(O=h[S],_[S]=O?O(D,C):D)}return _}function L(d,p){return(typeof d!="function"||!d.hasOwnProperty("prototype"))&&p("value must be a constructor"),d}function q(d){var p="value must be type of "+d.join("|"),h=d.length,g=d[0],_=d[1];return h===1?function(v,k){if(typeof v===g)return v;k(p)}:h===2?function(v,k){var S=typeof v;if(S===g||S===_)return v;k(p)}:function(v,k){for(var S=typeof v,D=h;D-- >0;)if(S===d[D])return v;k(p)}}var U=q(["function"]),ne=q(["object","function"]);function te(d,p,h){var g,_,v=0,k,S=new d(function(D,O,C){h=R(h,{timeout:0,overload:!1},{timeout:function(De,I){return De*=1,(typeof De!="number"||De<0||!Number.isFinite(De))&&I("timeout must be a positive number"),De}}),g=!h.overload&&typeof d.prototype.cancel=="function"&&typeof C=="function";function pe(){_&&(_=null),v&&(clearTimeout(v),v=0)}var se=function(De){pe(),D(De)},ee=function(De){pe(),O(De)};g?p(se,ee,C):(_=[function(De){ee(De||Error("canceled"))}],p(se,ee,function(De){if(k)throw Error("Unable to subscribe on cancel event asynchronously");if(typeof De!="function")throw TypeError("onCancel callback must be a function");_.push(De)}),k=!0),h.timeout>0&&(v=setTimeout(function(){var De=Error("timeout");De.code="ETIMEDOUT",v=0,S.cancel(De),O(De)},h.timeout))});return g||(S.cancel=function(D){if(!!_){for(var O=_.length,C=1;C<O;C++)_[C](D);_[0](D),_=null}}),S}function Te(d){var p=this._observers;if(!p)return-1;for(var h=p.length,g=0;g<h;g++)if(p[g]._target===d)return g;return-1}function G(d,p,h,g,_){if(!h)return null;if(g===0){var v=typeof p;if(v==="string"){var k,S,D=0,O=0,C=this.delimiter,pe=C.length;if((S=p.indexOf(C))!==-1){k=new Array(5);do k[D++]=p.slice(O,S),O=S+pe;while((S=p.indexOf(C,O))!==-1);k[D++]=p.slice(O),p=k,_=D}else p=[p],_=1}else v==="object"?_=p.length:(p=[p],_=1)}var se=null,ee,De,I,xe,Pe,rt=p[g],gr=p[g+1],We,Le;if(g===_)h._listeners&&(typeof h._listeners=="function"?(d&&d.push(h._listeners),se=[h]):(d&&d.push.apply(d,h._listeners),se=[h]));else if(rt==="*"){for(We=l(h),S=We.length;S-- >0;)ee=We[S],ee!=="_listeners"&&(Le=G(d,p,h[ee],g+1,_),Le&&(se?se.push.apply(se,Le):se=Le));return se}else if(rt==="**"){for(Pe=g+1===_||g+2===_&&gr==="*",Pe&&h._listeners&&(se=G(d,p,h,_,_)),We=l(h),S=We.length;S-- >0;)ee=We[S],ee!=="_listeners"&&(ee==="*"||ee==="**"?(h[ee]._listeners&&!Pe&&(Le=G(d,p,h[ee],_,_),Le&&(se?se.push.apply(se,Le):se=Le)),Le=G(d,p,h[ee],g,_)):ee===gr?Le=G(d,p,h[ee],g+2,_):Le=G(d,p,h[ee],g,_),Le&&(se?se.push.apply(se,Le):se=Le));return se}else h[rt]&&(se=G(d,p,h[rt],g+1,_));if(De=h["*"],De&&G(d,p,De,g+1,_),I=h["**"],I)if(g<_)for(I._listeners&&G(d,p,I,_,_),We=l(I),S=We.length;S-- >0;)ee=We[S],ee!=="_listeners"&&(ee===gr?G(d,p,I[ee],g+2,_):ee===rt?G(d,p,I[ee],g+1,_):(xe={},xe[ee]=I[ee],G(d,p,{"**":xe},g+1,_)));else I._listeners?G(d,p,I,_,_):I["*"]&&I["*"]._listeners&&G(d,p,I["*"],_,_);return se}function V(d,p,h){var g=0,_=0,v,k=this.delimiter,S=k.length,D;if(typeof d=="string")if((v=d.indexOf(k))!==-1){D=new Array(5);do D[g++]=d.slice(_,v),_=v+S;while((v=d.indexOf(k,_))!==-1);D[g++]=d.slice(_)}else D=[d],g=1;else D=d,g=d.length;if(g>1){for(v=0;v+1<g;v++)if(D[v]==="**"&&D[v+1]==="**")return}var O=this.listenerTree,C;for(v=0;v<g;v++)if(C=D[v],O=O[C]||(O[C]={}),v===g-1)return O._listeners?(typeof O._listeners=="function"&&(O._listeners=[O._listeners]),h?O._listeners.unshift(p):O._listeners.push(p),!O._listeners.warned&&this._maxListeners>0&&O._listeners.length>this._maxListeners&&(O._listeners.warned=!0,m.call(this,O._listeners.length,C))):O._listeners=p,!0;return!0}function Ce(d,p,h,g){for(var _=l(d),v=_.length,k,S,D,O=d._listeners,C;v-- >0;)S=_[v],k=d[S],S==="_listeners"?D=h:D=h?h.concat(S):[S],C=g||typeof S=="symbol",O&&p.push(C?D:D.join(this.delimiter)),typeof k=="object"&&Ce.call(this,k,p,D,C);return p}function Fe(d){for(var p=l(d),h=p.length,g,_,v;h-- >0;)_=p[h],g=d[_],g&&(v=!0,_!=="_listeners"&&!Fe(g)&&delete d[_]);return v}function j(d,p,h){this.emitter=d,this.event=p,this.listener=h}j.prototype.off=function(){return this.emitter.off(this.event,this.listener),this};function A(d,p,h){if(h===!0)_=!0;else if(h===!1)g=!0;else{if(!h||typeof h!="object")throw TypeError("options should be an object or true");var g=h.async,_=h.promisify,v=h.nextTick,k=h.objectify}if(g||v||_){var S=p,D=p._origin||p;if(v&&!i)throw Error("process.nextTick is not supported");_===r&&(_=p.constructor.name==="AsyncFunction"),p=function(){var O=arguments,C=this,pe=this.event;return _?v?Promise.resolve():new Promise(function(se){u(se)}).then(function(){return C.event=pe,S.apply(C,O)}):(v?process.nextTick:u)(function(){C.event=pe,S.apply(C,O)})},p._async=!0,p._origin=D}return[p,k?new j(this,d,p):this]}function E(d){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,f.call(this,d)}E.EventEmitter2=E,E.prototype.listenTo=function(d,p,h){if(typeof d!="object")throw TypeError("target musts be an object");var g=this;h=R(h,{on:r,off:r,reducers:r},{on:U,off:U,reducers:ne});function _(v){if(typeof v!="object")throw TypeError("events must be an object");var k=h.reducers,S=Te.call(g,d),D;S===-1?D=new w(g,d,h):D=g._observers[S];for(var O=l(v),C=O.length,pe,se=typeof k=="function",ee=0;ee<C;ee++)pe=O[ee],D.subscribe(pe,v[pe]||pe,se?k:k&&k[pe])}return t(p)?_(y(p)):_(typeof p=="string"?y(p.split(/\s+/)):p),this},E.prototype.stopListeningTo=function(d,p){var h=this._observers;if(!h)return!1;var g=h.length,_,v=!1;if(d&&typeof d!="object")throw TypeError("target should be an object");for(;g-- >0;)_=h[g],(!d||_._target===d)&&(_.unsubscribe(p),v=!0);return v},E.prototype.delimiter=".",E.prototype.setMaxListeners=function(d){d!==r&&(this._maxListeners=d,this._conf||(this._conf={}),this._conf.maxListeners=d)},E.prototype.getMaxListeners=function(){return this._maxListeners},E.prototype.event="",E.prototype.once=function(d,p,h){return this._once(d,p,!1,h)},E.prototype.prependOnceListener=function(d,p,h){return this._once(d,p,!0,h)},E.prototype._once=function(d,p,h,g){return this._many(d,1,p,h,g)},E.prototype.many=function(d,p,h,g){return this._many(d,p,h,!1,g)},E.prototype.prependMany=function(d,p,h,g){return this._many(d,p,h,!0,g)},E.prototype._many=function(d,p,h,g,_){var v=this;if(typeof h!="function")throw new Error("many only accepts instances of Function");function k(){return--p===0&&v.off(d,k),h.apply(this,arguments)}return k._origin=h,this._on(d,k,g,_)},E.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||c.call(this);var d=arguments[0],p,h=this.wildcard,g,_,v,k,S;if(d==="newListener"&&!this._newListener&&!this._events.newListener)return!1;if(h&&(p=d,d!=="newListener"&&d!=="removeListener"&&typeof d=="object")){if(_=d.length,s){for(v=0;v<_;v++)if(typeof d[v]=="symbol"){S=!0;break}}S||(d=d.join(this.delimiter))}var D=arguments.length,O;if(this._all&&this._all.length)for(O=this._all.slice(),v=0,_=O.length;v<_;v++)switch(this.event=d,D){case 1:O[v].call(this,d);break;case 2:O[v].call(this,d,arguments[1]);break;case 3:O[v].call(this,d,arguments[1],arguments[2]);break;default:O[v].apply(this,arguments)}if(h)O=[],G.call(this,O,p,this.listenerTree,0,_);else if(O=this._events[d],typeof O=="function"){switch(this.event=d,D){case 1:O.call(this);break;case 2:O.call(this,arguments[1]);break;case 3:O.call(this,arguments[1],arguments[2]);break;default:for(g=new Array(D-1),k=1;k<D;k++)g[k-1]=arguments[k];O.apply(this,g)}return!0}else O&&(O=O.slice());if(O&&O.length){if(D>3)for(g=new Array(D-1),k=1;k<D;k++)g[k-1]=arguments[k];for(v=0,_=O.length;v<_;v++)switch(this.event=d,D){case 1:O[v].call(this);break;case 2:O[v].call(this,arguments[1]);break;case 3:O[v].call(this,arguments[1],arguments[2]);break;default:O[v].apply(this,g)}return!0}else if(!this.ignoreErrors&&!this._all&&d==="error")throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");return!!this._all},E.prototype.emitAsync=function(){if(!this._events&&!this._all)return!1;this._events||c.call(this);var d=arguments[0],p=this.wildcard,h,g,_,v,k,S;if(d==="newListener"&&!this._newListener&&!this._events.newListener)return Promise.resolve([!1]);if(p&&(h=d,d!=="newListener"&&d!=="removeListener"&&typeof d=="object")){if(v=d.length,s){for(k=0;k<v;k++)if(typeof d[k]=="symbol"){g=!0;break}}g||(d=d.join(this.delimiter))}var D=[],O=arguments.length,C;if(this._all)for(k=0,v=this._all.length;k<v;k++)switch(this.event=d,O){case 1:D.push(this._all[k].call(this,d));break;case 2:D.push(this._all[k].call(this,d,arguments[1]));break;case 3:D.push(this._all[k].call(this,d,arguments[1],arguments[2]));break;default:D.push(this._all[k].apply(this,arguments))}if(p?(C=[],G.call(this,C,h,this.listenerTree,0)):C=this._events[d],typeof C=="function")switch(this.event=d,O){case 1:D.push(C.call(this));break;case 2:D.push(C.call(this,arguments[1]));break;case 3:D.push(C.call(this,arguments[1],arguments[2]));break;default:for(_=new Array(O-1),S=1;S<O;S++)_[S-1]=arguments[S];D.push(C.apply(this,_))}else if(C&&C.length){if(C=C.slice(),O>3)for(_=new Array(O-1),S=1;S<O;S++)_[S-1]=arguments[S];for(k=0,v=C.length;k<v;k++)switch(this.event=d,O){case 1:D.push(C[k].call(this));break;case 2:D.push(C[k].call(this,arguments[1]));break;case 3:D.push(C[k].call(this,arguments[1],arguments[2]));break;default:D.push(C[k].apply(this,_))}}else if(!this.ignoreErrors&&!this._all&&d==="error")return arguments[1]instanceof Error?Promise.reject(arguments[1]):Promise.reject("Uncaught, unspecified 'error' event.");return Promise.all(D)},E.prototype.on=function(d,p,h){return this._on(d,p,!1,h)},E.prototype.prependListener=function(d,p,h){return this._on(d,p,!0,h)},E.prototype.onAny=function(d){return this._onAny(d,!1)},E.prototype.prependAny=function(d){return this._onAny(d,!0)},E.prototype.addListener=E.prototype.on,E.prototype._onAny=function(d,p){if(typeof d!="function")throw new Error("onAny only accepts instances of Function");return this._all||(this._all=[]),p?this._all.unshift(d):this._all.push(d),this},E.prototype._on=function(d,p,h,g){if(typeof d=="function")return this._onAny(d,p),this;if(typeof p!="function")throw new Error("on only accepts instances of Function");this._events||c.call(this);var _=this,v;return g!==r&&(v=A.call(this,d,p,g),p=v[0],_=v[1]),this._newListener&&this.emit("newListener",d,p),this.wildcard?(V.call(this,d,p,h),_):(this._events[d]?(typeof this._events[d]=="function"&&(this._events[d]=[this._events[d]]),h?this._events[d].unshift(p):this._events[d].push(p),!this._events[d].warned&&this._maxListeners>0&&this._events[d].length>this._maxListeners&&(this._events[d].warned=!0,m.call(this,this._events[d].length,d))):this._events[d]=p,_)},E.prototype.off=function(d,p){if(typeof p!="function")throw new Error("removeListener only takes instances of Function");var h,g=[];if(this.wildcard){var _=typeof d=="string"?d.split(this.delimiter):d.slice();if(g=G.call(this,null,_,this.listenerTree,0),!g)return this}else{if(!this._events[d])return this;h=this._events[d],g.push({_listeners:h})}for(var v=0;v<g.length;v++){var k=g[v];if(h=k._listeners,t(h)){for(var S=-1,D=0,O=h.length;D<O;D++)if(h[D]===p||h[D].listener&&h[D].listener===p||h[D]._origin&&h[D]._origin===p){S=D;break}if(S<0)continue;return this.wildcard?k._listeners.splice(S,1):this._events[d].splice(S,1),h.length===0&&(this.wildcard?delete k._listeners:delete this._events[d]),this._removeListener&&this.emit("removeListener",d,p),this}else(h===p||h.listener&&h.listener===p||h._origin&&h._origin===p)&&(this.wildcard?delete k._listeners:delete this._events[d],this._removeListener&&this.emit("removeListener",d,p))}return this.listenerTree&&Fe(this.listenerTree),this},E.prototype.offAny=function(d){var p=0,h=0,g;if(d&&this._all&&this._all.length>0){for(g=this._all,p=0,h=g.length;p<h;p++)if(d===g[p])return g.splice(p,1),this._removeListener&&this.emit("removeListenerAny",d),this}else{if(g=this._all,this._removeListener)for(p=0,h=g.length;p<h;p++)this.emit("removeListenerAny",g[p]);this._all=[]}return this},E.prototype.removeListener=E.prototype.off,E.prototype.removeAllListeners=function(d){if(d===r)return!this._events||c.call(this),this;if(this.wildcard){var p=G.call(this,null,d,this.listenerTree,0),h,g;if(!p)return this;for(g=0;g<p.length;g++)h=p[g],h._listeners=null;this.listenerTree&&Fe(this.listenerTree)}else this._events&&(this._events[d]=null);return this},E.prototype.listeners=function(d){var p=this._events,h,g,_,v,k;if(d===r){if(this.wildcard)throw Error("event name required for wildcard emitter");if(!p)return[];for(h=l(p),v=h.length,_=[];v-- >0;)g=p[h[v]],typeof g=="function"?_.push(g):_.push.apply(_,g);return _}else{if(this.wildcard){if(k=this.listenerTree,!k)return[];var S=[],D=typeof d=="string"?d.split(this.delimiter):d.slice();return G.call(this,S,D,k,0),S}return p?(g=p[d],g?typeof g=="function"?[g]:g:[]):[]}},E.prototype.eventNames=function(d){var p=this._events;return this.wildcard?Ce.call(this,this.listenerTree,[],null,d):p?l(p):[]},E.prototype.listenerCount=function(d){return this.listeners(d).length},E.prototype.hasListeners=function(d){if(this.wildcard){var p=[],h=typeof d=="string"?d.split(this.delimiter):d.slice();return G.call(this,p,h,this.listenerTree,0),p.length>0}var g=this._events,_=this._all;return!!(_&&_.length||g&&(d===r?l(g).length:g[d]))},E.prototype.listenersAny=function(){return this._all?this._all:[]},E.prototype.waitFor=function(d,p){var h=this,g=typeof p;return g==="number"?p={timeout:p}:g==="function"&&(p={filter:p}),p=R(p,{timeout:0,filter:r,handleError:!1,Promise,overload:!1},{filter:U,Promise:L}),te(p.Promise,function(_,v,k){function S(){var D=p.filter;if(!(D&&!D.apply(h,arguments)))if(h.off(d,S),p.handleError){var O=arguments[0];O?v(O):_(T.apply(null,arguments).slice(1))}else _(T.apply(null,arguments))}k(function(){h.off(d,S)}),h._on(d,S,!1)},{timeout:p.timeout,overload:p.overload})};function B(d,p,h){h=R(h,{Promise,timeout:0,overload:!1},{Promise:L});var g=h.Promise;return te(g,function(_,v,k){var S;if(typeof d.addEventListener=="function"){S=function(){_(T.apply(null,arguments))},k(function(){d.removeEventListener(p,S)}),d.addEventListener(p,S,{once:!0});return}var D=function(){O&&d.removeListener("error",O),_(T.apply(null,arguments))},O;p!=="error"&&(O=function(C){d.removeListener(p,D),v(C)},d.once("error",O)),k(function(){O&&d.removeListener("error",O),d.removeListener(p,D)}),d.once(p,D)},{timeout:h.timeout,overload:h.overload})}var P=E.prototype;if(Object.defineProperties(E,{defaultMaxListeners:{get:function(){return P._maxListeners},set:function(d){if(typeof d!="number"||d<0||Number.isNaN(d))throw TypeError("n must be a non-negative number");P._maxListeners=d},enumerable:!0},once:{value:B,writable:!0,configurable:!0}}),Object.defineProperties(P,{_maxListeners:{value:n,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),typeof define=="function"&&define.amd)define(function(){return E});else if(typeof z_=="object")K_.exports=E;else{var Q=new Function("","return this")();Q.EventEmitter2=E}})()});var hr=b(an=>{"use strict";an.__esModule=!0;var Jx;(function(r){r.AND="AND",r.OR="OR",r.XOR="XOR",r.NOT="NOT"})(Jx=an.Operators||(an.Operators={}));var eA;(function(r){r.OPEN_PARENTHESIS="(",r.CLOSE_PARENTHESIS=")"})(eA=an.StructuralCharacters||(an.StructuralCharacters={}));var tA;(function(r){r.IDENTIFIER="IDENTIFIER",r.OPERATOR="OPERATOR",r.STRUCTURAL_CHARACTER="STRUCTURAL_CHARACTER",r.EOF="EOF",r.COMMENT="COMMENT"})(tA=an.Tokens||(an.Tokens={}))});var If=b(zo=>{"use strict";zo.__esModule=!0;var Ie=hr();zo.OPERATOR_PRECEDENCE={NOT:0,XOR:1,AND:2,OR:3};zo.VALID_TOKENS={identifierOnly:[{name:Ie.Tokens.IDENTIFIER},{name:Ie.Tokens.STRUCTURAL_CHARACTER,value:Ie.StructuralCharacters.OPEN_PARENTHESIS}],identifierOrNot:[{name:Ie.Tokens.IDENTIFIER},{name:Ie.Tokens.STRUCTURAL_CHARACTER,value:Ie.StructuralCharacters.OPEN_PARENTHESIS},{name:Ie.Tokens.OPERATOR,value:Ie.Operators.NOT}],binaryOperator:[{name:Ie.Tokens.OPERATOR,value:Ie.Operators.AND},{name:Ie.Tokens.OPERATOR,value:Ie.Operators.OR},{name:Ie.Tokens.OPERATOR,value:Ie.Operators.XOR}],binaryOperatorOrClose:[{name:Ie.Tokens.OPERATOR,value:Ie.Operators.AND},{name:Ie.Tokens.OPERATOR,value:Ie.Operators.OR},{name:Ie.Tokens.OPERATOR,value:Ie.Operators.XOR},{name:Ie.Tokens.STRUCTURAL_CHARACTER,value:Ie.StructuralCharacters.CLOSE_PARENTHESIS}]}});var Ff=b(Nr=>{"use strict";Nr.__esModule=!0;var wi=hr();Nr.STRUCTURAL_CHARACTERS={"(":wi.StructuralCharacters.OPEN_PARENTHESIS,")":wi.StructuralCharacters.CLOSE_PARENTHESIS};Nr.OPERATORS={AND:wi.Operators.AND,OR:wi.Operators.OR,XOR:wi.Operators.XOR,NOT:wi.Operators.NOT};Nr.SEPARATORS=new Set([32,9,10,13].map(function(r){return String.fromCodePoint(r)}));Nr.QUOTED_IDENTIFIER_DELIMITER=String.fromCodePoint(34);Nr.COMMENT_DELIMITER=String.fromCodePoint(35);Nr.EOL=String.fromCodePoint(10);Nr.ESCAPE_CHARACTER=String.fromCodePoint(92)});var AT=b(Ir=>{"use strict";var Lf=Ir&&Ir.__assign||function(){return Lf=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}return r},Lf.apply(this,arguments)};Ir.__esModule=!0;var xT=hr(),Cn=Ff();Ir.createResult=function(r,e,t){return{token:Lf({name:r},e!==null?{value:e}:{}),remainingString:t}};Ir.getComment=function(r){for(var e=r.length,t=0;t<r.length;t+=1){var n=r[t];if(n===Cn.EOL){e=t;break}}return Ir.createResult(xT.Tokens.COMMENT,r.slice(0,e),r.slice(e+1))};Ir.getQuotedIdentifier=function(r){for(var e=!1,t="",n=null,i=0;i<r.length;i+=1){var s=r[i];if(n===null)s===Cn.QUOTED_IDENTIFIER_DELIMITER?e?t=t.slice(-1)+Cn.QUOTED_IDENTIFIER_DELIMITER:n=i:(s===Cn.ESCAPE_CHARACTER?e=!0:e=!1,t=t+=s);else{if(!Cn.SEPARATORS.has(s)&&!Cn.STRUCTURAL_CHARACTERS[s])throw new Error("Unexpected character: "+s+" Expected ) character or separator");break}}if(n===null)throw new Error("Unexpected end of expression: expected "+Cn.QUOTED_IDENTIFIER_DELIMITER+" character");return Ir.createResult(xT.Tokens.IDENTIFIER,t,r.slice(n+1))}});var PT=b(Uf=>{"use strict";Uf.__esModule=!0;var Ei=hr(),Ct=Ff(),ki=AT();Uf.lex=function(r){for(var e=null,t=null,n=null,i=0;i<r.length;i+=1){var s=r[i];if(e===null){if(!Ct.SEPARATORS.has(s)){var a=Ct.STRUCTURAL_CHARACTERS[s];if(a){var o=r[i+1];if(a===Ei.StructuralCharacters.CLOSE_PARENTHESIS&&o&&!Ct.SEPARATORS.has(o)&&o!==Ei.StructuralCharacters.CLOSE_PARENTHESIS)throw new Error("Unexpected character: "+o+". A closing parenthesis should be followed by another closing parenthesis or whitespace");return ki.createResult(Ei.Tokens.STRUCTURAL_CHARACTER,Ct.STRUCTURAL_CHARACTERS[s],r.slice(i+1))}if(s===Ct.QUOTED_IDENTIFIER_DELIMITER)return ki.getQuotedIdentifier(r.slice(i+1));if(s===Ct.COMMENT_DELIMITER)return ki.getComment(r.slice(i+1));e=i}}else if(Ct.SEPARATORS.has(s)||Ct.STRUCTURAL_CHARACTERS[s]){t=i,n=s;break}else if(s===Ct.QUOTED_IDENTIFIER_DELIMITER||s===Ct.COMMENT_DELIMITER)throw new Error("Unexpected character: "+s)}if(e!==null){t=t!=null?t:r.length;var u=r.slice(e,t),l=r.slice(t);if(Ct.OPERATORS[u]){if(n&&!Ct.SEPARATORS.has(n))throw new Error("Unexpected character: "+n+". Operators should be separated using whitespace");return ki.createResult(Ei.Tokens.OPERATOR,Ct.OPERATORS[u],l)}else return ki.createResult(Ei.Tokens.IDENTIFIER,u,l)}return ki.createResult(Ei.Tokens.EOF,null,"")}});var CT=b(Fr=>{"use strict";var rA=Fr&&Fr.__spreadArrays||function(){for(var r=0,e=0,t=arguments.length;e<t;e++)r+=arguments[e].length;for(var n=Array(r),i=0,e=0;e<t;e++)for(var s=arguments[e],a=0,o=s.length;a<o;a++,i++)n[i]=s[a];return n};Fr.__esModule=!0;var nA=PT(),Di=hr(),Ko=If();Fr.newTokenGenerator=function(r){var e=r;return function(t,n){for(n===void 0&&(n=!1);;){var i=nA.lex(e),s=i.token,a=i.remainingString;if(e=a,s.name!==Di.Tokens.COMMENT)return Fr.validateToken(s,t,n),s}}};Fr.getValue=function(r,e){var t=r(Ko.VALID_TOKENS.identifierOrNot),n=t.value===Di.Operators.NOT;n&&(t=r(Ko.VALID_TOKENS.identifierOnly));var i=t.name===Di.Tokens.STRUCTURAL_CHARACTER?e(r,!0):[t];return n?rA(i,[{name:Di.Tokens.OPERATOR,value:Di.Operators.NOT}]):i};Fr.previousOperatorTakesPrecedent=function(r,e){return Ko.OPERATOR_PRECEDENCE[r]<=Ko.OPERATOR_PRECEDENCE[e]};Fr.validateToken=function(r,e,t){if(t===void 0&&(t=!1),r.name===Di.Tokens.EOF){if(t)return;throw new Error("Unexpected end of expression")}for(var n=0,i=e;n<i.length;n++){var s=i[n];if(s.name===r.name&&(!s.value||s.value===r.value))return}throw new TypeError("Invalid token")}});var qf=b(ea=>{"use strict";var Oi=ea&&ea.__spreadArrays||function(){for(var r=0,e=0,t=arguments.length;e<t;e++)r+=arguments[e].length;for(var n=Array(r),i=0,e=0;e<t;e++)for(var s=arguments[e],a=0,o=s.length;a<o;a++,i++)n[i]=s[a];return n};ea.__esModule=!0;var NT=hr(),IT=If(),Vo=CT();ea.parse=function(r){if(typeof r!="string")throw new Error("Expected string but received "+typeof r);var e=Vo.newTokenGenerator(r);return Wf(e)};var Wf=function(r,e){e===void 0&&(e=!1);for(var t=Oi(Vo.getValue(r,Wf)),n=[];;){var i=e?IT.VALID_TOKENS.binaryOperatorOrClose:IT.VALID_TOKENS.binaryOperator,s=r(i,!e);if(s.name===NT.Tokens.EOF||s.name===NT.Tokens.STRUCTURAL_CHARACTER)return Oi(t,Oi(n).reverse());for(;n.length;){var a=n[n.length-1]||null;if(a&&Vo.previousOperatorTakesPrecedent(a.value,s.value))t=Oi(t,[a]),n=n.slice(0,-1);else break}n=Oi(n,[s]),t=Oi(t,Vo.getValue(r,Wf))}}});var Yf=b(Lr=>{"use strict";Lr.__esModule=!0;var FT=hr();Lr.andUtil=function(r,e){return r&&e};Lr.orUtil=function(r,e){return r||e};Lr.xorUtil=function(r,e){return r!==e};Lr.notUtil=function(r){return!r};Lr.isIdentifier=function(r){var e=r.name,t=r.value;return e===FT.Tokens.IDENTIFIER&&typeof t=="string"};Lr.isOperator=function(r){var e=r.name,t=r.value;return e===FT.Tokens.OPERATOR&&typeof t=="string"};Lr.throwInvalidExpression=function(r){throw new TypeError("Invalid postfix expression: "+r)}});var LT=b(Gf=>{"use strict";var ta;Gf.__esModule=!0;var $f=hr(),jf=Yf();Gf.OPERATOR_MAP=(ta={},ta[$f.Operators.AND]=jf.andUtil,ta[$f.Operators.OR]=jf.orUtil,ta[$f.Operators.XOR]=jf.xorUtil,ta)});var WT=b(In=>{"use strict";var Bf=In&&In.__spreadArrays||function(){for(var r=0,e=0,t=arguments.length;e<t;e++)r+=arguments[e].length;for(var n=Array(r),i=0,e=0;e<t;e++)for(var s=arguments[e],a=0,o=s.length;a<o;a++,i++)n[i]=s[a];return n};In.__esModule=!0;var iA=qf(),UT=hr(),sA=LT(),Nn=Yf();In.getEvaluator=function(r){var e=iA.parse(r);return function(t){return In.evaluate(e,t)}};In.evaluate=function(r,e){if(!Array.isArray(r))throw new Error(r+" should be an array. evaluate takes in a parsed expression. Use in combination with parse or use getEvaluator");var t=r.reduce(function(n,i,s){if(!(i&&(Nn.isIdentifier(i)||Nn.isOperator(i))))throw new Error("Invalid token: "+i+". Found in parsed expression at index "+s);if(i.name===UT.Tokens.IDENTIFIER)return Bf(n,[Boolean(e[i.value])]);var a=n[n.length-2],o=n[n.length-1];if(i.value===UT.Operators.NOT)return o===void 0&&Nn.throwInvalidExpression("missing identifier"),Bf(n.slice(0,-1),[Nn.notUtil(o)]);(o===void 0||a===void 0)&&Nn.throwInvalidExpression("missing identifier");var u=sA.OPERATOR_MAP[i.value];return u||Nn.throwInvalidExpression("unknown operator"),Bf(n.slice(0,-2),[u(a,o)])},[]);return t.length!==1&&Nn.throwInvalidExpression("too many identifiers after evaluation"),t[0]}});var YT=b(ra=>{"use strict";ra.__esModule=!0;var qT=WT();ra.getEvaluator=qT.getEvaluator;ra.evaluate=qT.evaluate;var aA=qf();ra.parse=aA.parse});var fA={};pb(fA,{default:()=>ou});module.exports=mb(fA);var sb=require("obsidian");var ci=require("obsidian");var mA=new Error("timeout while waiting for mutex to become available"),hA=new Error("mutex already locked"),hb=new Error("request for lock canceled"),gb=function(r,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function o(c){try{l(n.next(c))}catch(f){a(f)}}function u(c){try{l(n.throw(c))}catch(f){a(f)}}function l(c){c.done?s(c.value):i(c.value).then(o,u)}l((n=n.apply(r,e||[])).next())})},du=class{constructor(e,t=hb){this._value=e,this._cancelError=t,this._weightedQueues=[],this._weightedWaiters=[]}acquire(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise((t,n)=>{this._weightedQueues[e-1]||(this._weightedQueues[e-1]=[]),this._weightedQueues[e-1].push({resolve:t,reject:n}),this._dispatch()})}runExclusive(e,t=1){return gb(this,void 0,void 0,function*(){let[n,i]=yield this.acquire(t);try{return yield e(n)}finally{i()}})}waitForUnlock(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise(t=>{this._weightedWaiters[e-1]||(this._weightedWaiters[e-1]=[]),this._weightedWaiters[e-1].push(t),this._dispatch()})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(e){this._value=e,this._dispatch()}release(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);this._value+=e,this._dispatch()}cancel(){this._weightedQueues.forEach(e=>e.forEach(t=>t.reject(this._cancelError))),this._weightedQueues=[]}_dispatch(){var e;for(let t=this._value;t>0;t--){let n=(e=this._weightedQueues[t-1])===null||e===void 0?void 0:e.shift();if(!n)continue;let i=this._value,s=t;this._value-=t,t=this._value+1,n.resolve([i,this._newReleaser(s)])}this._drainUnlockWaiters()}_newReleaser(e){let t=!1;return()=>{t||(t=!0,this.release(e))}}_drainUnlockWaiters(){for(let e=this._value;e>0;e--)!this._weightedWaiters[e-1]||(this._weightedWaiters[e-1].forEach(t=>t()),this._weightedWaiters[e-1]=[])}},yb=function(r,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function o(c){try{l(n.next(c))}catch(f){a(f)}}function u(c){try{l(n.throw(c))}catch(f){a(f)}}function l(c){c.done?s(c.value):i(c.value).then(o,u)}l((n=n.apply(r,e||[])).next())})},pa=class{constructor(e){this._semaphore=new du(1,e)}acquire(){return yb(this,void 0,void 0,function*(){let[,e]=yield this._semaphore.acquire();return e})}runExclusive(e){return this._semaphore.runExclusive(()=>e())}isLocked(){return this._semaphore.isLocked()}waitForUnlock(){return this._semaphore.waitForUnlock()}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}};var so=Fi(Be());var gt=class{constructor(e,t){this.start=e,this.end=t,t.isBefore(e)&&(this.start=t,this.end=e),this.start=this.start.startOf("day"),this.end=this.end.startOf("day")}static buildRelative(e){let t=e==="week"?"isoWeek":e;return new gt(window.moment().startOf(t).startOf("day"),window.moment().endOf(t).startOf("day"))}static buildInvalid(){return new gt(window.moment.invalid(),window.moment.invalid())}isValid(){return this.start.isValid()&&this.end.isValid()}moveToPrevious(e){let t=window.moment.duration(1,e);this.start.subtract(t),this.end.subtract(t),(e==="month"||e==="quarter")&&(this.end=this.end.endOf(e).startOf("day"))}moveToNext(e){let t=window.moment.duration(1,e);this.start.add(t),this.end.add(t),(e==="month"||e==="quarter")&&(this.end=this.end.endOf(e).startOf("day"))}};var Mt=class{static parseDate(e,t=!1){return window.moment(so.parseDate(e,void 0,{forwardDate:t})).startOf("day")}static parseDateRange(e,t=!1){let n=[Mt.parseRelativeDateRange,Mt.parseNumberedDateRange,Mt.parseAbsoluteDateRange];for(let i of n){let s=i(e,t);if(s.isValid())return s}return gt.buildInvalid()}static parseAbsoluteDateRange(e,t){let n=so.parse(e,void 0,{forwardDate:t});if(n.length===0)return gt.buildInvalid();let i=n[0].start,s=n[1]&&n[1].start?n[1].start:i,a=window.moment(i.date()),o=window.moment(s.date());return new gt(a,o)}static parseRelativeDateRange(e,t){let n=/(last|this|next) (week|month|quarter|year)/,i=e.match(n);if(i&&i.length===3){let s=i[1],a=i[2],o=gt.buildRelative(a);switch(s){case"last":o.moveToPrevious(a);break;case"next":o.moveToNext(a);break}return o}return gt.buildInvalid()}static parseNumberedDateRange(e,t){let n=[[/^\s*[0-9]{4}\s*$/,"YYYY","year"],[/^\s*[0-9]{4}-Q[1-4]\s*$/,"YYYY-Q","quarter"],[/^\s*[0-9]{4}-[0-9]{2}\s*$/,"YYYY-MM","month"],[/^\s*[0-9]{4}-W[0-9]{2}\s*$/,"YYYY-WW","isoWeek"]];for(let[i,s,a]of n){let o=e.match(i);if(o){let u=o[0].trim();return new gt(window.moment(u,s).startOf(a),window.moment(u,s).endOf(a))}}return gt.buildInvalid()}};var IM={td:"today",tm:"tomorrow",yd:"yesterday",tw:"this week",nw:"next week",weekend:"sat",we:"sat"};function ii(r){for(let[e,t]of Object.entries(IM))r=r.replace(RegExp(`\\b${e}\\s`,"i"),t);return r}var ao=["MO","TU","WE","TH","FR","SA","SU"],je=function(){function r(e,t){if(t===0)throw new Error("Can't create weekday with n == 0");this.weekday=e,this.n=t}return r.fromStr=function(e){return new r(ao.indexOf(e))},r.prototype.nth=function(e){return this.n===e?this:new r(this.weekday,e)},r.prototype.equals=function(e){return this.weekday===e.weekday&&this.n===e.n},r.prototype.toString=function(){var e=ao[this.weekday];return this.n&&(e=(this.n>0?"+":"")+String(this.n)+e),e},r.prototype.getJsWeekday=function(){return this.weekday===6?0:this.weekday+1},r}();var Re=function(r){return r!=null},xt=function(r){return typeof r=="number"},tf=function(r){return typeof r=="string"&&ao.includes(r)},at=Array.isArray,Gt=function(r,e){e===void 0&&(e=r),arguments.length===1&&(e=r,r=0);for(var t=[],n=r;n<e;n++)t.push(n);return t};var ue=function(r,e){var t=0,n=[];if(at(r))for(;t<e;t++)n[t]=[].concat(r);else for(;t<e;t++)n[t]=r;return n},Yy=function(r){return at(r)?r:[r]};function bn(r,e,t){t===void 0&&(t=" ");var n=String(r);return e=e>>0,n.length>e?String(n):(e=e-n.length,e>t.length&&(t+=ue(t,e/t.length)),t.slice(0,e)+String(n))}var $y=function(r,e,t){var n=r.split(e);return t?n.slice(0,t).concat([n.slice(t).join(e)]):n},ut=function(r,e){var t=r%e;return t*e<0?t+e:t},oo=function(r,e){return{div:Math.floor(r/e),mod:ut(r,e)}},At=function(r){return!Re(r)||r.length===0},Ue=function(r){return!At(r)},ce=function(r,e){return Ue(r)&&r.indexOf(e)!==-1};var Kr;(function(r){r.MONTH_DAYS=[31,28,31,30,31,30,31,31,30,31,30,31],r.ONE_DAY=1e3*60*60*24,r.MAXYEAR=9999,r.ORDINAL_BASE=new Date(Date.UTC(1970,0,1)),r.PY_WEEKDAYS=[6,0,1,2,3,4,5],r.getYearDay=function(e){var t=new Date(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate());return Math.ceil((t.valueOf()-new Date(e.getUTCFullYear(),0,1).valueOf())/r.ONE_DAY)+1},r.isLeapYear=function(e){return e%4===0&&e%100!==0||e%400===0},r.isDate=function(e){return e instanceof Date},r.isValidDate=function(e){return r.isDate(e)&&!isNaN(e.getTime())},r.tzOffset=function(e){return e.getTimezoneOffset()*60*1e3},r.daysBetween=function(e,t){var n=e.getTime()-r.tzOffset(e),i=t.getTime()-r.tzOffset(t),s=n-i;return Math.round(s/r.ONE_DAY)},r.toOrdinal=function(e){return r.daysBetween(e,r.ORDINAL_BASE)},r.fromOrdinal=function(e){return new Date(r.ORDINAL_BASE.getTime()+e*r.ONE_DAY)},r.getMonthDays=function(e){var t=e.getUTCMonth();return t===1&&r.isLeapYear(e.getUTCFullYear())?29:r.MONTH_DAYS[t]},r.getWeekday=function(e){return r.PY_WEEKDAYS[e.getUTCDay()]},r.monthRange=function(e,t){var n=new Date(Date.UTC(e,t,1));return[r.getWeekday(n),r.getMonthDays(n)]},r.combine=function(e,t){return t=t||e,new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))},r.clone=function(e){var t=new Date(e.getTime());return t},r.cloneDates=function(e){for(var t=[],n=0;n<e.length;n++)t.push(r.clone(e[n]));return t},r.sort=function(e){e.sort(function(t,n){return t.getTime()-n.getTime()})},r.timeToUntilString=function(e,t){t===void 0&&(t=!0);var n=new Date(e);return[bn(n.getUTCFullYear().toString(),4,"0"),bn(n.getUTCMonth()+1,2,"0"),bn(n.getUTCDate(),2,"0"),"T",bn(n.getUTCHours(),2,"0"),bn(n.getUTCMinutes(),2,"0"),bn(n.getUTCSeconds(),2,"0"),t?"Z":""].join("")},r.untilStringToDate=function(e){var t=/^(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2})Z?)?$/,n=t.exec(e);if(!n)throw new Error("Invalid UNTIL value: ".concat(e));return new Date(Date.UTC(parseInt(n[1],10),parseInt(n[2],10)-1,parseInt(n[3],10),parseInt(n[5],10)||0,parseInt(n[6],10)||0,parseInt(n[7],10)||0))}})(Kr||(Kr={}));var z=Kr;var FM=function(){function r(e,t){this.minDate=null,this.maxDate=null,this._result=[],this.total=0,this.method=e,this.args=t,e==="between"?(this.maxDate=t.inc?t.before:new Date(t.before.getTime()-1),this.minDate=t.inc?t.after:new Date(t.after.getTime()+1)):e==="before"?this.maxDate=t.inc?t.dt:new Date(t.dt.getTime()-1):e==="after"&&(this.minDate=t.inc?t.dt:new Date(t.dt.getTime()+1))}return r.prototype.accept=function(e){++this.total;var t=this.minDate&&e<this.minDate,n=this.maxDate&&e>this.maxDate;if(this.method==="between"){if(t)return!0;if(n)return!1}else if(this.method==="before"){if(n)return!1}else if(this.method==="after")return t?!0:(this.add(e),!1);return this.add(e)},r.prototype.add=function(e){return this._result.push(e),!0},r.prototype.getValue=function(){var e=this._result;switch(this.method){case"all":case"between":return e;case"before":case"after":default:return e.length?e[e.length-1]:null}},r.prototype.clone=function(){return new r(this.method,this.args)},r}(),Or=FM;var d_=Fi(c_(),1),{__extends:ai,__assign:yt,__rest:tN,__decorate:rN,__param:nN,__metadata:iN,__awaiter:sN,__generator:aN,__exportStar:oN,__createBinding:uN,__values:lN,__read:cN,__spread:dN,__spreadArrays:fN,__spreadArray:x,__await:pN,__asyncGenerator:mN,__asyncDelegator:hN,__asyncValues:gN,__makeTemplateObject:yN,__importStar:_N,__importDefault:TN,__classPrivateFieldGet:bN,__classPrivateFieldSet:vN,__classPrivateFieldIn:wN}=d_.default;var LM=function(r){ai(e,r);function e(t,n,i){var s=r.call(this,t,n)||this;return s.iterator=i,s}return e.prototype.add=function(t){return this.iterator(t,this._result.length)?(this._result.push(t),!0):!1},e}(Or),nf=LM;var UM={dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],tokens:{SKIP:/^[ \r\n\t]+|^\.$/,number:/^[1-9][0-9]*/,numberAsText:/^(one|two|three)/i,every:/^every/i,"day(s)":/^days?/i,"weekday(s)":/^weekdays?/i,"week(s)":/^weeks?/i,"hour(s)":/^hours?/i,"minute(s)":/^minutes?/i,"month(s)":/^months?/i,"year(s)":/^years?/i,on:/^(on|in)/i,at:/^(at)/i,the:/^the/i,first:/^first/i,second:/^second/i,third:/^third/i,nth:/^([1-9][0-9]*)(\.|th|nd|rd|st)/i,last:/^last/i,for:/^for/i,"time(s)":/^times?/i,until:/^(un)?til/i,monday:/^mo(n(day)?)?/i,tuesday:/^tu(e(s(day)?)?)?/i,wednesday:/^we(d(n(esday)?)?)?/i,thursday:/^th(u(r(sday)?)?)?/i,friday:/^fr(i(day)?)?/i,saturday:/^sa(t(urday)?)?/i,sunday:/^su(n(day)?)?/i,january:/^jan(uary)?/i,february:/^feb(ruary)?/i,march:/^mar(ch)?/i,april:/^apr(il)?/i,may:/^may/i,june:/^june?/i,july:/^july?/i,august:/^aug(ust)?/i,september:/^sep(t(ember)?)?/i,october:/^oct(ober)?/i,november:/^nov(ember)?/i,december:/^dec(ember)?/i,comma:/^(,\s*|(and|or)\s*)+/i}},vn=UM;var f_=function(r,e){return r.indexOf(e)!==-1},WM=function(r){return r.toString()},qM=function(r,e,t){return"".concat(e," ").concat(t,", ").concat(r)},YM=function(){function r(e,t,n,i){if(t===void 0&&(t=WM),n===void 0&&(n=vn),i===void 0&&(i=qM),this.text=[],this.language=n||vn,this.gettext=t,this.dateFormatter=i,this.rrule=e,this.options=e.options,this.origOptions=e.origOptions,this.origOptions.bymonthday){var s=[].concat(this.options.bymonthday),a=[].concat(this.options.bynmonthday);s.sort(function(c,f){return c-f}),a.sort(function(c,f){return f-c}),this.bymonthday=s.concat(a),this.bymonthday.length||(this.bymonthday=null)}if(Re(this.origOptions.byweekday)){var o=at(this.origOptions.byweekday)?this.origOptions.byweekday:[this.origOptions.byweekday],u=String(o);this.byweekday={allWeeks:o.filter(function(c){return!c.n}),someWeeks:o.filter(function(c){return Boolean(c.n)}),isWeekdays:u.indexOf("MO")!==-1&&u.indexOf("TU")!==-1&&u.indexOf("WE")!==-1&&u.indexOf("TH")!==-1&&u.indexOf("FR")!==-1&&u.indexOf("SA")===-1&&u.indexOf("SU")===-1,isEveryDay:u.indexOf("MO")!==-1&&u.indexOf("TU")!==-1&&u.indexOf("WE")!==-1&&u.indexOf("TH")!==-1&&u.indexOf("FR")!==-1&&u.indexOf("SA")!==-1&&u.indexOf("SU")!==-1};var l=function(c,f){return c.weekday-f.weekday};this.byweekday.allWeeks.sort(l),this.byweekday.someWeeks.sort(l),this.byweekday.allWeeks.length||(this.byweekday.allWeeks=null),this.byweekday.someWeeks.length||(this.byweekday.someWeeks=null)}else this.byweekday=null}return r.isFullyConvertible=function(e){var t=!0;if(!(e.options.freq in r.IMPLEMENTED)||e.origOptions.until&&e.origOptions.count)return!1;for(var n in e.origOptions){if(f_(["dtstart","wkst","freq"],n))return!0;if(!f_(r.IMPLEMENTED[e.options.freq],n))return!1}return t},r.prototype.isFullyConvertible=function(){return r.isFullyConvertible(this.rrule)},r.prototype.toString=function(){var e=this.gettext;if(!(this.options.freq in r.IMPLEMENTED))return e("RRule error: Unable to fully convert this rrule to text");if(this.text=[e("every")],this[Y.FREQUENCIES[this.options.freq]](),this.options.until){this.add(e("until"));var t=this.options.until;this.add(this.dateFormatter(t.getUTCFullYear(),this.language.monthNames[t.getUTCMonth()],t.getUTCDate()))}else this.options.count&&this.add(e("for")).add(this.options.count.toString()).add(this.plural(this.options.count)?e("times"):e("time"));return this.isFullyConvertible()||this.add(e("(~ approximate)")),this.text.join("")},r.prototype.HOURLY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("hours"):e("hour"))},r.prototype.MINUTELY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("minutes"):e("minute"))},r.prototype.DAILY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.byweekday&&this.byweekday.isWeekdays?this.add(this.plural(this.options.interval)?e("weekdays"):e("weekday")):this.add(this.plural(this.options.interval)?e("days"):e("day")),this.origOptions.bymonth&&(this.add(e("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday?this._byweekday():this.origOptions.byhour&&this._byhour()},r.prototype.WEEKLY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()).add(this.plural(this.options.interval)?e("weeks"):e("week")),this.byweekday&&this.byweekday.isWeekdays?this.options.interval===1?this.add(this.plural(this.options.interval)?e("weekdays"):e("weekday")):this.add(e("on")).add(e("weekdays")):this.byweekday&&this.byweekday.isEveryDay?this.add(this.plural(this.options.interval)?e("days"):e("day")):(this.options.interval===1&&this.add(e("week")),this.origOptions.bymonth&&(this.add(e("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday())},r.prototype.MONTHLY=function(){var e=this.gettext;this.origOptions.bymonth?(this.options.interval!==1&&(this.add(this.options.interval.toString()).add(e("months")),this.plural(this.options.interval)&&this.add(e("in"))),this._bymonth()):(this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("months"):e("month"))),this.bymonthday?this._bymonthday():this.byweekday&&this.byweekday.isWeekdays?this.add(e("on")).add(e("weekdays")):this.byweekday&&this._byweekday()},r.prototype.YEARLY=function(){var e=this.gettext;this.origOptions.bymonth?(this.options.interval!==1&&(this.add(this.options.interval.toString()),this.add(e("years"))),this._bymonth()):(this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("years"):e("year"))),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.options.byyearday&&this.add(e("on the")).add(this.list(this.options.byyearday,this.nth,e("and"))).add(e("day")),this.options.byweekno&&this.add(e("in")).add(this.plural(this.options.byweekno.length)?e("weeks"):e("week")).add(this.list(this.options.byweekno,void 0,e("and")))},r.prototype._bymonthday=function(){var e=this.gettext;this.byweekday&&this.byweekday.allWeeks?this.add(e("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext,e("or"))).add(e("the")).add(this.list(this.bymonthday,this.nth,e("or"))):this.add(e("on the")).add(this.list(this.bymonthday,this.nth,e("and")))},r.prototype._byweekday=function(){var e=this.gettext;this.byweekday.allWeeks&&!this.byweekday.isWeekdays&&this.add(e("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext)),this.byweekday.someWeeks&&(this.byweekday.allWeeks&&this.add(e("and")),this.add(e("on the")).add(this.list(this.byweekday.someWeeks,this.weekdaytext,e("and"))))},r.prototype._byhour=function(){var e=this.gettext;this.add(e("at")).add(this.list(this.origOptions.byhour,void 0,e("and")))},r.prototype._bymonth=function(){this.add(this.list(this.options.bymonth,this.monthtext,this.gettext("and")))},r.prototype.nth=function(e){e=parseInt(e.toString(),10);var t,n=this.gettext;if(e===-1)return n("last");var i=Math.abs(e);switch(i){case 1:case 21:case 31:t=i+n("st");break;case 2:case 22:t=i+n("nd");break;case 3:case 23:t=i+n("rd");break;default:t=i+n("th")}return e<0?t+" "+n("last"):t},r.prototype.monthtext=function(e){return this.language.monthNames[e-1]},r.prototype.weekdaytext=function(e){var t=xt(e)?(e+1)%7:e.getJsWeekday();return(e.n?this.nth(e.n)+" ":"")+this.language.dayNames[t]},r.prototype.plural=function(e){return e%100!==1},r.prototype.add=function(e){return this.text.push(" "),this.text.push(e),this},r.prototype.list=function(e,t,n,i){var s=this;i===void 0&&(i=","),at(e)||(e=[e]);var a=function(u,l,c){for(var f="",m=0;m<u.length;m++)m!==0&&(m===u.length-1?f+=" "+c+" ":f+=l+" "),f+=u[m];return f};t=t||function(u){return u.toString()};var o=function(u){return t&&t.call(s,u)};return n?a(e.map(o),i,n):e.map(o).join(i+" ")},r}(),dr=YM;var $M=function(){function r(e){this.done=!0,this.rules=e}return r.prototype.start=function(e){return this.text=e,this.done=!1,this.nextSymbol()},r.prototype.isDone=function(){return this.done&&this.symbol===null},r.prototype.nextSymbol=function(){var e,t;this.symbol=null,this.value=null;do{if(this.done)return!1;var n=void 0;e=null;for(var i in this.rules){n=this.rules[i];var s=n.exec(this.text);s&&(e===null||s[0].length>e[0].length)&&(e=s,t=i)}if(e!=null&&(this.text=this.text.substr(e[0].length),this.text===""&&(this.done=!0)),e==null){this.done=!0,this.symbol=null,this.value=null;return}}while(t==="SKIP");return this.symbol=t,this.value=e,!0},r.prototype.accept=function(e){if(this.symbol===e){if(this.value){var t=this.value;return this.nextSymbol(),t}return this.nextSymbol(),!0}return!1},r.prototype.acceptNumber=function(){return this.accept("number")},r.prototype.expect=function(e){if(this.accept(e))return!0;throw new Error("expected "+e+" but found "+this.symbol)},r}();function Ls(r,e){e===void 0&&(e=vn);var t={},n=new $M(e.tokens);if(!n.start(r))return null;return i(),t;function i(){n.expect("every");var m=n.acceptNumber();if(m&&(t.interval=parseInt(m[0],10)),n.isDone())throw new Error("Unexpected end");switch(n.symbol){case"day(s)":t.freq=Y.DAILY,n.nextSymbol()&&(a(),f());break;case"weekday(s)":t.freq=Y.WEEKLY,t.byweekday=[Y.MO,Y.TU,Y.WE,Y.TH,Y.FR],n.nextSymbol(),f();break;case"week(s)":t.freq=Y.WEEKLY,n.nextSymbol()&&(s(),f());break;case"hour(s)":t.freq=Y.HOURLY,n.nextSymbol()&&(s(),f());break;case"minute(s)":t.freq=Y.MINUTELY,n.nextSymbol()&&(s(),f());break;case"month(s)":t.freq=Y.MONTHLY,n.nextSymbol()&&(s(),f());break;case"year(s)":t.freq=Y.YEARLY,n.nextSymbol()&&(s(),f());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":t.freq=Y.WEEKLY;var T=n.symbol.substr(0,2).toUpperCase();if(t.byweekday=[Y[T]],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var y=u();if(!y)throw new Error("Unexpected symbol "+n.symbol+", expected weekday");t.byweekday.push(Y[y]),n.nextSymbol()}c(),f();break;case"january":case"february":case"march":case"april":case"may":case"june":case"july":case"august":case"september":case"october":case"november":case"december":if(t.freq=Y.YEARLY,t.bymonth=[o()],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var w=o();if(!w)throw new Error("Unexpected symbol "+n.symbol+", expected month");t.bymonth.push(w),n.nextSymbol()}s(),f();break;default:throw new Error("Unknown symbol")}}function s(){var m=n.accept("on"),T=n.accept("the");if(!!(m||T))do{var y=l(),w=u(),R=o();if(y)w?(n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(Y[w].nth(y))):(t.bymonthday||(t.bymonthday=[]),t.bymonthday.push(y),n.accept("day(s)"));else if(w)n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(Y[w]);else if(n.symbol==="weekday(s)")n.nextSymbol(),t.byweekday||(t.byweekday=[Y.MO,Y.TU,Y.WE,Y.TH,Y.FR]);else if(n.symbol==="week(s)"){n.nextSymbol();var L=n.acceptNumber();if(!L)throw new Error("Unexpected symbol "+n.symbol+", expected week number");for(t.byweekno=[parseInt(L[0],10)];n.accept("comma");){if(L=n.acceptNumber(),!L)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.byweekno.push(parseInt(L[0],10))}}else if(R)n.nextSymbol(),t.bymonth||(t.bymonth=[]),t.bymonth.push(R);else return}while(n.accept("comma")||n.accept("the")||n.accept("on"))}function a(){var m=n.accept("at");if(!!m)do{var T=n.acceptNumber();if(!T)throw new Error("Unexpected symbol "+n.symbol+", expected hour");for(t.byhour=[parseInt(T[0],10)];n.accept("comma");){if(T=n.acceptNumber(),!T)throw new Error("Unexpected symbol "+n.symbol+"; expected hour");t.byhour.push(parseInt(T[0],10))}}while(n.accept("comma")||n.accept("at"))}function o(){switch(n.symbol){case"january":return 1;case"february":return 2;case"march":return 3;case"april":return 4;case"may":return 5;case"june":return 6;case"july":return 7;case"august":return 8;case"september":return 9;case"october":return 10;case"november":return 11;case"december":return 12;default:return!1}}function u(){switch(n.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return n.symbol.substr(0,2).toUpperCase();default:return!1}}function l(){switch(n.symbol){case"last":return n.nextSymbol(),-1;case"first":return n.nextSymbol(),1;case"second":return n.nextSymbol(),n.accept("last")?-2:2;case"third":return n.nextSymbol(),n.accept("last")?-3:3;case"nth":var m=parseInt(n.value[1],10);if(m<-366||m>366)throw new Error("Nth out of range: "+m);return n.nextSymbol(),n.accept("last")?-m:m;default:return!1}}function c(){n.accept("on"),n.accept("the");var m=l();if(!!m)for(t.bymonthday=[m],n.nextSymbol();n.accept("comma");){if(m=l(),!m)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.bymonthday.push(m),n.nextSymbol()}}function f(){if(n.symbol==="until"){var m=Date.parse(n.text);if(!m)throw new Error("Cannot parse until date:"+n.text);t.until=new Date(m)}else n.accept("for")&&(t.count=parseInt(n.value[0],10),n.expect("number"))}}var ae;(function(r){r[r.YEARLY=0]="YEARLY",r[r.MONTHLY=1]="MONTHLY",r[r.WEEKLY=2]="WEEKLY",r[r.DAILY=3]="DAILY",r[r.HOURLY=4]="HOURLY",r[r.MINUTELY=5]="MINUTELY",r[r.SECONDLY=6]="SECONDLY"})(ae||(ae={}));function Us(r){return r<ae.HOURLY}var p_=function(r,e){return e===void 0&&(e=vn),new Y(Ls(r,e)||void 0)},oi=["count","until","interval","byweekday","bymonthday","bymonth"];dr.IMPLEMENTED=[];dr.IMPLEMENTED[ae.HOURLY]=oi;dr.IMPLEMENTED[ae.MINUTELY]=oi;dr.IMPLEMENTED[ae.DAILY]=["byhour"].concat(oi);dr.IMPLEMENTED[ae.WEEKLY]=oi;dr.IMPLEMENTED[ae.MONTHLY]=oi;dr.IMPLEMENTED[ae.YEARLY]=["byweekno","byyearday"].concat(oi);var m_=function(r,e,t,n){return new dr(r,e,t,n).toString()},h_=dr.isFullyConvertible;var ui=function(){function r(e,t,n,i){this.hour=e,this.minute=t,this.second=n,this.millisecond=i||0}return r.prototype.getHours=function(){return this.hour},r.prototype.getMinutes=function(){return this.minute},r.prototype.getSeconds=function(){return this.second},r.prototype.getMilliseconds=function(){return this.millisecond},r.prototype.getTime=function(){return(this.hour*60*60+this.minute*60+this.second)*1e3+this.millisecond},r}();var g_=function(r){ai(e,r);function e(t,n,i,s,a,o,u){var l=r.call(this,s,a,o,u)||this;return l.year=t,l.month=n,l.day=i,l}return e.fromDate=function(t){return new this(t.getUTCFullYear(),t.getUTCMonth()+1,t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.valueOf()%1e3)},e.prototype.getWeekday=function(){return Kr.getWeekday(new Date(this.getTime()))},e.prototype.getTime=function(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second,this.millisecond)).getTime()},e.prototype.getDay=function(){return this.day},e.prototype.getMonth=function(){return this.month},e.prototype.getYear=function(){return this.year},e.prototype.addYears=function(t){this.year+=t},e.prototype.addMonths=function(t){if(this.month+=t,this.month>12){var n=Math.floor(this.month/12),i=ut(this.month,12);this.month=i,this.year+=n,this.month===0&&(this.month=12,--this.year)}},e.prototype.addWeekly=function(t,n){n>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-n))+t*7:this.day+=-(this.getWeekday()-n)+t*7,this.fixDay()},e.prototype.addDaily=function(t){this.day+=t,this.fixDay()},e.prototype.addHours=function(t,n,i){for(n&&(this.hour+=Math.floor((23-this.hour)/t)*t);;){this.hour+=t;var s=oo(this.hour,24),a=s.div,o=s.mod;if(a&&(this.hour=o,this.addDaily(a)),At(i)||ce(i,this.hour))break}},e.prototype.addMinutes=function(t,n,i,s){for(n&&(this.minute+=Math.floor((1439-(this.hour*60+this.minute))/t)*t);;){this.minute+=t;var a=oo(this.minute,60),o=a.div,u=a.mod;if(o&&(this.minute=u,this.addHours(o,!1,i)),(At(i)||ce(i,this.hour))&&(At(s)||ce(s,this.minute)))break}},e.prototype.addSeconds=function(t,n,i,s,a){for(n&&(this.second+=Math.floor((86399-(this.hour*3600+this.minute*60+this.second))/t)*t);;){this.second+=t;var o=oo(this.second,60),u=o.div,l=o.mod;if(u&&(this.second=l,this.addMinutes(u,!1,i,s)),(At(i)||ce(i,this.hour))&&(At(s)||ce(s,this.minute))&&(At(a)||ce(a,this.second)))break}},e.prototype.fixDay=function(){if(!(this.day<=28)){var t=Kr.monthRange(this.year,this.month-1)[1];if(!(this.day<=t))for(;this.day>t;){if(this.day-=t,++this.month,this.month===13&&(this.month=1,++this.year,this.year>Kr.MAXYEAR))return;t=Kr.monthRange(this.year,this.month-1)[1]}}},e.prototype.add=function(t,n){var i=t.freq,s=t.interval,a=t.wkst,o=t.byhour,u=t.byminute,l=t.bysecond;switch(i){case ae.YEARLY:return this.addYears(s);case ae.MONTHLY:return this.addMonths(s);case ae.WEEKLY:return this.addWeekly(s,a);case ae.DAILY:return this.addDaily(s);case ae.HOURLY:return this.addHours(s,n,o);case ae.MINUTELY:return this.addMinutes(s,n,o,u);case ae.SECONDLY:return this.addSeconds(s,n,o,u,l)}},e}(ui);function sf(r){for(var e=[],t=Object.keys(r),n=0,i=t;n<i.length;n++){var s=i[n];ce(T_,s)||e.push(s),z.isDate(r[s])&&!z.isValidDate(r[s])&&e.push(s)}if(e.length)throw new Error("Invalid options: "+e.join(", "));return yt({},r)}function y_(r){var e=yt(yt({},Ws),sf(r));if(Re(e.byeaster)&&(e.freq=Y.YEARLY),!(Re(e.freq)&&Y.FREQUENCIES[e.freq]))throw new Error("Invalid frequency: ".concat(e.freq," ").concat(r.freq));if(e.dtstart||(e.dtstart=new Date(new Date().setMilliseconds(0))),Re(e.wkst)?xt(e.wkst)||(e.wkst=e.wkst.weekday):e.wkst=Y.MO.weekday,Re(e.bysetpos)){xt(e.bysetpos)&&(e.bysetpos=[e.bysetpos]);for(var t=0;t<e.bysetpos.length;t++){var n=e.bysetpos[t];if(n===0||!(n>=-366&&n<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}}if(!(Boolean(e.byweekno)||Ue(e.byweekno)||Ue(e.byyearday)||Boolean(e.bymonthday)||Ue(e.bymonthday)||Re(e.byweekday)||Re(e.byeaster)))switch(e.freq){case Y.YEARLY:e.bymonth||(e.bymonth=e.dtstart.getUTCMonth()+1),e.bymonthday=e.dtstart.getUTCDate();break;case Y.MONTHLY:e.bymonthday=e.dtstart.getUTCDate();break;case Y.WEEKLY:e.byweekday=[z.getWeekday(e.dtstart)];break}if(Re(e.bymonth)&&!at(e.bymonth)&&(e.bymonth=[e.bymonth]),Re(e.byyearday)&&!at(e.byyearday)&&xt(e.byyearday)&&(e.byyearday=[e.byyearday]),!Re(e.bymonthday))e.bymonthday=[],e.bynmonthday=[];else if(at(e.bymonthday)){for(var i=[],s=[],t=0;t<e.bymonthday.length;t++){var n=e.bymonthday[t];n>0?i.push(n):n<0&&s.push(n)}e.bymonthday=i,e.bynmonthday=s}else e.bymonthday<0?(e.bynmonthday=[e.bymonthday],e.bymonthday=[]):(e.bynmonthday=[],e.bymonthday=[e.bymonthday]);if(Re(e.byweekno)&&!at(e.byweekno)&&(e.byweekno=[e.byweekno]),!Re(e.byweekday))e.bynweekday=null;else if(xt(e.byweekday))e.byweekday=[e.byweekday],e.bynweekday=null;else if(tf(e.byweekday))e.byweekday=[je.fromStr(e.byweekday).weekday],e.bynweekday=null;else if(e.byweekday instanceof je)!e.byweekday.n||e.freq>Y.MONTHLY?(e.byweekday=[e.byweekday.weekday],e.bynweekday=null):(e.bynweekday=[[e.byweekday.weekday,e.byweekday.n]],e.byweekday=null);else{for(var a=[],o=[],t=0;t<e.byweekday.length;t++){var u=e.byweekday[t];if(xt(u)){a.push(u);continue}else if(tf(u)){a.push(je.fromStr(u).weekday);continue}!u.n||e.freq>Y.MONTHLY?a.push(u.weekday):o.push([u.weekday,u.n])}e.byweekday=Ue(a)?a:null,e.bynweekday=Ue(o)?o:null}return Re(e.byhour)?xt(e.byhour)&&(e.byhour=[e.byhour]):e.byhour=e.freq<Y.HOURLY?[e.dtstart.getUTCHours()]:null,Re(e.byminute)?xt(e.byminute)&&(e.byminute=[e.byminute]):e.byminute=e.freq<Y.MINUTELY?[e.dtstart.getUTCMinutes()]:null,Re(e.bysecond)?xt(e.bysecond)&&(e.bysecond=[e.bysecond]):e.bysecond=e.freq<Y.SECONDLY?[e.dtstart.getUTCSeconds()]:null,{parsedOptions:e}}function __(r){var e=r.dtstart.getTime()%1e3;if(!Us(r.freq))return[];var t=[];return r.byhour.forEach(function(n){r.byminute.forEach(function(i){r.bysecond.forEach(function(s){t.push(new ui(n,i,s,e))})})}),t}function Ys(r){var e=r.split(`
`).map(jM).filter(function(t){return t!==null});return yt(yt({},e[0]),e[1])}function qs(r){var e={},t=/DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec(r);if(!t)return e;var n=t[1],i=t[2];return n&&(e.tzid=n),e.dtstart=z.untilStringToDate(i),e}function jM(r){if(r=r.replace(/^\s+|\s+$/,""),!r.length)return null;var e=/^([A-Z]+?)[:;]/.exec(r.toUpperCase());if(!e)return b_(r);var t=e[1];switch(t.toUpperCase()){case"RRULE":case"EXRULE":return b_(r);case"DTSTART":return qs(r);default:throw new Error("Unsupported RFC prop ".concat(t," in ").concat(r))}}function b_(r){var e=r.replace(/^RRULE:/i,""),t=qs(e),n=r.replace(/^(?:RRULE|EXRULE):/i,"").split(";");return n.forEach(function(i){var s=i.split("="),a=s[0],o=s[1];switch(a.toUpperCase()){case"FREQ":t.freq=ae[o.toUpperCase()];break;case"WKST":t.wkst=Bt[o.toUpperCase()];break;case"COUNT":case"INTERVAL":case"BYSETPOS":case"BYMONTH":case"BYMONTHDAY":case"BYYEARDAY":case"BYWEEKNO":case"BYHOUR":case"BYMINUTE":case"BYSECOND":var u=GM(o),l=a.toLowerCase();t[l]=u;break;case"BYWEEKDAY":case"BYDAY":t.byweekday=BM(o);break;case"DTSTART":case"TZID":var c=qs(r);t.tzid=c.tzid,t.dtstart=c.dtstart;break;case"UNTIL":t.until=z.untilStringToDate(o);break;case"BYEASTER":t.byeaster=Number(o);break;default:throw new Error("Unknown RRULE property '"+a+"'")}}),t}function GM(r){if(r.indexOf(",")!==-1){var e=r.split(",");return e.map(v_)}return v_(r)}function v_(r){return/^[+-]?\d+$/.test(r)?Number(r):r}function BM(r){var e=r.split(",");return e.map(function(t){if(t.length===2)return Bt[t];var n=t.match(/^([+-]?\d{1,2})([A-Z]{2})$/);if(!n||n.length<3)throw new SyntaxError("Invalid weekday string: ".concat(t));var i=Number(n[1]),s=n[2],a=Bt[s].weekday;return new je(a,i)})}var wn=function(){function r(e,t){if(isNaN(e.getTime()))throw new RangeError("Invalid date passed to DateWithZone");this.date=e,this.tzid=t}return Object.defineProperty(r.prototype,"isUTC",{get:function(){return!this.tzid||this.tzid.toUpperCase()==="UTC"},enumerable:!1,configurable:!0}),r.prototype.toString=function(){var e=z.timeToUntilString(this.date.getTime(),this.isUTC);return this.isUTC?":".concat(e):";TZID=".concat(this.tzid,":").concat(e)},r.prototype.getTime=function(){return this.date.getTime()},r.prototype.rezonedDate=function(){var e;if(this.isUTC)return this.date;var t=Intl.DateTimeFormat().resolvedOptions().timeZone,n=new Date(this.date.toLocaleString(void 0,{timeZone:t})),i=new Date(this.date.toLocaleString(void 0,{timeZone:(e=this.tzid)!==null&&e!==void 0?e:"UTC"})),s=i.getTime()-n.getTime();return new Date(this.date.getTime()-s)},r}();function $s(r){for(var e=[],t="",n=Object.keys(r),i=Object.keys(Ws),s=0;s<n.length;s++)if(n[s]!=="tzid"&&!!ce(i,n[s])){var a=n[s].toUpperCase(),o=r[n[s]],u="";if(!(!Re(o)||at(o)&&!o.length)){switch(a){case"FREQ":u=Y.FREQUENCIES[r.freq];break;case"WKST":xt(o)?u=new je(o).toString():u=o.toString();break;case"BYWEEKDAY":a="BYDAY",u=Yy(o).map(function(T){return T instanceof je?T:at(T)?new je(T[0],T[1]):new je(T)}).toString();break;case"DTSTART":t=HM(o,r.tzid);break;case"UNTIL":u=z.timeToUntilString(o,!r.tzid);break;default:if(at(o)){for(var l=[],c=0;c<o.length;c++)l[c]=String(o[c]);u=l.toString()}else u=String(o)}u&&e.push([a,u])}}var f=e.map(function(T){var y=T[0],w=T[1];return"".concat(y,"=").concat(w.toString())}).join(";"),m="";return f!==""&&(m="RRULE:".concat(f)),[t,m].filter(function(T){return!!T}).join(`
`)}function HM(r,e){return r?"DTSTART"+new wn(new Date(r),e).toString():""}function zM(r,e){return Array.isArray(r)?!Array.isArray(e)||r.length!==e.length?!1:r.every(function(t,n){return t.getTime()===e[n].getTime()}):r instanceof Date?e instanceof Date&&r.getTime()===e.getTime():r===e}var w_=function(){function r(){this.all=!1,this.before=[],this.after=[],this.between=[]}return r.prototype._cacheAdd=function(e,t,n){t&&(t=t instanceof Date?z.clone(t):z.cloneDates(t)),e==="all"?this.all=t:(n._value=t,this[e].push(n))},r.prototype._cacheGet=function(e,t){var n=!1,i=t?Object.keys(t):[],s=function(c){for(var f=0;f<i.length;f++){var m=i[f];if(!zM(t[m],c[m]))return!0}return!1},a=this[e];if(e==="all")n=this.all;else if(at(a))for(var o=0;o<a.length;o++){var u=a[o];if(!(i.length&&s(u))){n=u._value;break}}if(!n&&this.all){for(var l=new Or(e,t),o=0;o<this.all.length&&l.accept(this.all[o]);o++);n=l.getValue(),this._cacheAdd(e,n,t)}return at(n)?z.cloneDates(n):n instanceof Date?z.clone(n):n},r}();var E_=x(x(x(x(x(x(x(x(x(x(x(x(x([],ue(1,31),!0),ue(2,28),!0),ue(3,31),!0),ue(4,30),!0),ue(5,31),!0),ue(6,30),!0),ue(7,31),!0),ue(8,31),!0),ue(9,30),!0),ue(10,31),!0),ue(11,30),!0),ue(12,31),!0),ue(1,7),!0),k_=x(x(x(x(x(x(x(x(x(x(x(x(x([],ue(1,31),!0),ue(2,29),!0),ue(3,31),!0),ue(4,30),!0),ue(5,31),!0),ue(6,30),!0),ue(7,31),!0),ue(8,31),!0),ue(9,30),!0),ue(10,31),!0),ue(11,30),!0),ue(12,31),!0),ue(1,7),!0),KM=Gt(1,29),VM=Gt(1,30),Vr=Gt(1,31),lt=Gt(1,32),D_=x(x(x(x(x(x(x(x(x(x(x(x(x([],lt,!0),VM,!0),lt,!0),Vr,!0),lt,!0),Vr,!0),lt,!0),lt,!0),Vr,!0),lt,!0),Vr,!0),lt,!0),lt.slice(0,7),!0),O_=x(x(x(x(x(x(x(x(x(x(x(x(x([],lt,!0),KM,!0),lt,!0),Vr,!0),lt,!0),Vr,!0),lt,!0),lt,!0),Vr,!0),lt,!0),Vr,!0),lt,!0),lt.slice(0,7),!0),XM=Gt(-28,0),QM=Gt(-29,0),Xr=Gt(-30,0),ct=Gt(-31,0),S_=x(x(x(x(x(x(x(x(x(x(x(x(x([],ct,!0),QM,!0),ct,!0),Xr,!0),ct,!0),Xr,!0),ct,!0),ct,!0),Xr,!0),ct,!0),Xr,!0),ct,!0),ct.slice(0,7),!0),R_=x(x(x(x(x(x(x(x(x(x(x(x(x([],ct,!0),XM,!0),ct,!0),Xr,!0),ct,!0),Xr,!0),ct,!0),ct,!0),Xr,!0),ct,!0),Xr,!0),ct,!0),ct.slice(0,7),!0),M_=[0,31,60,91,121,152,182,213,244,274,305,335,366],x_=[0,31,59,90,120,151,181,212,243,273,304,334,365],af=function(){for(var r=[],e=0;e<55;e++)r=r.concat(Gt(7));return r}();function A_(r,e){var t=new Date(Date.UTC(r,0,1)),n=z.isLeapYear(r)?366:365,i=z.isLeapYear(r+1)?366:365,s=z.toOrdinal(t),a=z.getWeekday(t),o=yt(yt({yearlen:n,nextyearlen:i,yearordinal:s,yearweekday:a},ZM(r)),{wnomask:null});if(At(e.byweekno))return o;o.wnomask=ue(0,n+7);var u,l,c=u=ut(7-a+e.wkst,7);c>=4?(c=0,l=o.yearlen+ut(a-e.wkst,7)):l=n-c;for(var f=Math.floor(l/7),m=ut(l,7),T=Math.floor(f+m/4),y=0;y<e.byweekno.length;y++){var w=e.byweekno[y];if(w<0&&(w+=T+1),w>0&&w<=T){var R=void 0;w>1?(R=c+(w-1)*7,c!==u&&(R-=7-u)):R=c;for(var L=0;L<7&&(o.wnomask[R]=1,R++,o.wdaymask[R]!==e.wkst);L++);}}if(ce(e.byweekno,1)){var R=c+T*7;if(c!==u&&(R-=7-u),R<n)for(var y=0;y<7&&(o.wnomask[R]=1,R+=1,o.wdaymask[R]!==e.wkst);y++);}if(c){var q=void 0;if(ce(e.byweekno,-1))q=-1;else{var U=z.getWeekday(new Date(Date.UTC(r-1,0,1))),ne=ut(7-U.valueOf()+e.wkst,7),te=z.isLeapYear(r-1)?366:365,Te=void 0;ne>=4?(ne=0,Te=te+ut(U-e.wkst,7)):Te=n-c,q=Math.floor(52+ut(Te,7)/4)}if(ce(e.byweekno,q))for(var R=0;R<c;R++)o.wnomask[R]=1}return o}function ZM(r){var e=z.isLeapYear(r)?366:365,t=new Date(Date.UTC(r,0,1)),n=z.getWeekday(t);return e===365?{mmask:E_,mdaymask:O_,nmdaymask:R_,wdaymask:af.slice(n),mrange:x_}:{mmask:k_,mdaymask:D_,nmdaymask:S_,wdaymask:af.slice(n),mrange:M_}}function P_(r,e,t,n,i,s){var a={lastyear:r,lastmonth:e,nwdaymask:[]},o=[];if(s.freq===Y.YEARLY)if(At(s.bymonth))o=[[0,t]];else for(var u=0;u<s.bymonth.length;u++)e=s.bymonth[u],o.push(n.slice(e-1,e+1));else s.freq===Y.MONTHLY&&(o=[n.slice(e-1,e+1)]);if(At(o))return a;a.nwdaymask=ue(0,t);for(var u=0;u<o.length;u++)for(var l=o[u],c=l[0],f=l[1]-1,m=0;m<s.bynweekday.length;m++){var T=void 0,y=s.bynweekday[m],w=y[0],R=y[1];R<0?(T=f+(R+1)*7,T-=ut(i[T]-w,7)):(T=c+(R-1)*7,T+=ut(7-i[T]+w,7)),c<=T&&T<=f&&(a.nwdaymask[T]=1)}return a}function C_(r,e){e===void 0&&(e=0);var t=r%19,n=Math.floor(r/100),i=r%100,s=Math.floor(n/4),a=n%4,o=Math.floor((n+8)/25),u=Math.floor((n-o+1)/3),l=Math.floor(19*t+n-s-u+15)%30,c=Math.floor(i/4),f=i%4,m=Math.floor(32+2*a+2*c-l-f)%7,T=Math.floor((t+11*l+22*m)/451),y=Math.floor((l+m-7*T+114)/31),w=(l+m-7*T+114)%31+1,R=Date.UTC(r,y-1,w+e),L=Date.UTC(r,0,1);return[Math.ceil((R-L)/(1e3*60*60*24))]}var JM=function(){function r(e){this.options=e}return r.prototype.rebuild=function(e,t){var n=this.options;if(e!==this.lastyear&&(this.yearinfo=A_(e,n)),Ue(n.bynweekday)&&(t!==this.lastmonth||e!==this.lastyear)){var i=this.yearinfo,s=i.yearlen,a=i.mrange,o=i.wdaymask;this.monthinfo=P_(e,t,s,a,o,n)}Re(n.byeaster)&&(this.eastermask=C_(e,n.byeaster))},Object.defineProperty(r.prototype,"lastyear",{get:function(){return this.monthinfo?this.monthinfo.lastyear:null},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"lastmonth",{get:function(){return this.monthinfo?this.monthinfo.lastmonth:null},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"yearlen",{get:function(){return this.yearinfo.yearlen},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"yearordinal",{get:function(){return this.yearinfo.yearordinal},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"mrange",{get:function(){return this.yearinfo.mrange},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"wdaymask",{get:function(){return this.yearinfo.wdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"mmask",{get:function(){return this.yearinfo.mmask},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"wnomask",{get:function(){return this.yearinfo.wnomask},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"nwdaymask",{get:function(){return this.monthinfo?this.monthinfo.nwdaymask:[]},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"nextyearlen",{get:function(){return this.yearinfo.nextyearlen},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"mdaymask",{get:function(){return this.yearinfo.mdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"nmdaymask",{get:function(){return this.yearinfo.nmdaymask},enumerable:!1,configurable:!0}),r.prototype.ydayset=function(){return[Gt(this.yearlen),0,this.yearlen]},r.prototype.mdayset=function(e,t){for(var n=this.mrange[t-1],i=this.mrange[t],s=ue(null,this.yearlen),a=n;a<i;a++)s[a]=a;return[s,n,i]},r.prototype.wdayset=function(e,t,n){for(var i=ue(null,this.yearlen+7),s=z.toOrdinal(new Date(Date.UTC(e,t-1,n)))-this.yearordinal,a=s,o=0;o<7&&(i[s]=s,++s,this.wdaymask[s]!==this.options.wkst);o++);return[i,a,s]},r.prototype.ddayset=function(e,t,n){var i=ue(null,this.yearlen),s=z.toOrdinal(new Date(Date.UTC(e,t-1,n)))-this.yearordinal;return i[s]=s,[i,s,s+1]},r.prototype.htimeset=function(e,t,n,i){var s=this,a=[];return this.options.byminute.forEach(function(o){a=a.concat(s.mtimeset(e,o,n,i))}),z.sort(a),a},r.prototype.mtimeset=function(e,t,n,i){var s=this.options.bysecond.map(function(a){return new ui(e,t,a,i)});return z.sort(s),s},r.prototype.stimeset=function(e,t,n,i){return[new ui(e,t,n,i)]},r.prototype.getdayset=function(e){switch(e){case ae.YEARLY:return this.ydayset.bind(this);case ae.MONTHLY:return this.mdayset.bind(this);case ae.WEEKLY:return this.wdayset.bind(this);case ae.DAILY:return this.ddayset.bind(this);default:return this.ddayset.bind(this)}},r.prototype.gettimeset=function(e){switch(e){case ae.HOURLY:return this.htimeset.bind(this);case ae.MINUTELY:return this.mtimeset.bind(this);case ae.SECONDLY:return this.stimeset.bind(this)}},r}(),N_=JM;function I_(r,e,t,n,i,s){for(var a=[],o=0;o<r.length;o++){var u=void 0,l=void 0,c=r[o];c<0?(u=Math.floor(c/e.length),l=ut(c,e.length)):(u=Math.floor((c-1)/e.length),l=ut(c-1,e.length));for(var f=[],m=t;m<n;m++){var T=s[m];!Re(T)||f.push(T)}var y=void 0;u<0?y=f.slice(u)[0]:y=f[u];var w=e[l],R=z.fromOrdinal(i.yearordinal+y),L=z.combine(R,w);ce(a,L)||a.push(L)}return z.sort(a),a}function fo(r,e){var t=e.dtstart,n=e.freq,i=e.interval,s=e.until,a=e.bysetpos,o=e.count;if(o===0||i===0)return Sr(r);var u=g_.fromDate(t),l=new N_(e);l.rebuild(u.year,u.month);for(var c=rx(l,u,e);;){var f=l.getdayset(n)(u.year,u.month,u.day),m=f[0],T=f[1],y=f[2],w=tx(m,T,y,l,e);if(Ue(a))for(var R=I_(a,c,T,y,l,m),L=0;L<R.length;L++){var q=R[L];if(s&&q>s)return Sr(r);if(q>=t){var U=F_(q,e);if(!r.accept(U)||o&&(--o,!o))return Sr(r)}}else for(var L=T;L<y;L++){var ne=m[L];if(!!Re(ne))for(var te=z.fromOrdinal(l.yearordinal+ne),Te=0;Te<c.length;Te++){var G=c[Te],q=z.combine(te,G);if(s&&q>s)return Sr(r);if(q>=t){var U=F_(q,e);if(!r.accept(U)||o&&(--o,!o))return Sr(r)}}}if(e.interval===0||(u.add(e,w),u.year>z.MAXYEAR))return Sr(r);Us(n)||(c=l.gettimeset(n)(u.hour,u.minute,u.second,0)),l.rebuild(u.year,u.month)}}function ex(r,e,t){var n=t.bymonth,i=t.byweekno,s=t.byweekday,a=t.byeaster,o=t.bymonthday,u=t.bynmonthday,l=t.byyearday;return Ue(n)&&!ce(n,r.mmask[e])||Ue(i)&&!r.wnomask[e]||Ue(s)&&!ce(s,r.wdaymask[e])||Ue(r.nwdaymask)&&!r.nwdaymask[e]||a!==null&&!ce(r.eastermask,e)||(Ue(o)||Ue(u))&&!ce(o,r.mdaymask[e])&&!ce(u,r.nmdaymask[e])||Ue(l)&&(e<r.yearlen&&!ce(l,e+1)&&!ce(l,-r.yearlen+e)||e>=r.yearlen&&!ce(l,e+1-r.yearlen)&&!ce(l,-r.nextyearlen+e-r.yearlen))}function F_(r,e){return new wn(r,e.tzid).rezonedDate()}function Sr(r){return r.getValue()}function tx(r,e,t,n,i){for(var s=!1,a=e;a<t;a++){var o=r[a];s=ex(n,o,i),s&&(r[o]=null)}return s}function rx(r,e,t){var n=t.freq,i=t.byhour,s=t.byminute,a=t.bysecond;return Us(n)?__(t):n>=Y.HOURLY&&Ue(i)&&!ce(i,e.hour)||n>=Y.MINUTELY&&Ue(s)&&!ce(s,e.minute)||n>=Y.SECONDLY&&Ue(a)&&!ce(a,e.second)?[]:r.gettimeset(n)(e.hour,e.minute,e.second,e.millisecond)}var Bt={MO:new je(0),TU:new je(1),WE:new je(2),TH:new je(3),FR:new je(4),SA:new je(5),SU:new je(6)},Ws={freq:ae.YEARLY,dtstart:null,interval:1,wkst:Bt.MO,count:null,until:null,tzid:null,bysetpos:null,bymonth:null,bymonthday:null,bynmonthday:null,byyearday:null,byweekno:null,byweekday:null,bynweekday:null,byhour:null,byminute:null,bysecond:null,byeaster:null},T_=Object.keys(Ws),Y=function(){function r(e,t){e===void 0&&(e={}),t===void 0&&(t=!1),this._cache=t?null:new w_,this.origOptions=sf(e);var n=y_(e).parsedOptions;this.options=n}return r.parseText=function(e,t){return Ls(e,t)},r.fromText=function(e,t){return p_(e,t)},r.fromString=function(e){return new r(r.parseString(e)||void 0)},r.prototype._iter=function(e){return fo(e,this.options)},r.prototype._cacheGet=function(e,t){return this._cache?this._cache._cacheGet(e,t):!1},r.prototype._cacheAdd=function(e,t,n){if(!!this._cache)return this._cache._cacheAdd(e,t,n)},r.prototype.all=function(e){if(e)return this._iter(new nf("all",{},e));var t=this._cacheGet("all");return t===!1&&(t=this._iter(new Or("all",{})),this._cacheAdd("all",t)),t},r.prototype.between=function(e,t,n,i){if(n===void 0&&(n=!1),!z.isValidDate(e)||!z.isValidDate(t))throw new Error("Invalid date passed in to RRule.between");var s={before:t,after:e,inc:n};if(i)return this._iter(new nf("between",s,i));var a=this._cacheGet("between",s);return a===!1&&(a=this._iter(new Or("between",s)),this._cacheAdd("between",a,s)),a},r.prototype.before=function(e,t){if(t===void 0&&(t=!1),!z.isValidDate(e))throw new Error("Invalid date passed in to RRule.before");var n={dt:e,inc:t},i=this._cacheGet("before",n);return i===!1&&(i=this._iter(new Or("before",n)),this._cacheAdd("before",i,n)),i},r.prototype.after=function(e,t){if(t===void 0&&(t=!1),!z.isValidDate(e))throw new Error("Invalid date passed in to RRule.after");var n={dt:e,inc:t},i=this._cacheGet("after",n);return i===!1&&(i=this._iter(new Or("after",n)),this._cacheAdd("after",i,n)),i},r.prototype.count=function(){return this.all().length},r.prototype.toString=function(){return $s(this.origOptions)},r.prototype.toText=function(e,t,n){return m_(this,e,t,n)},r.prototype.isFullyConvertibleToText=function(){return h_(this)},r.prototype.clone=function(){return new r(this.origOptions)},r.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],r.YEARLY=ae.YEARLY,r.MONTHLY=ae.MONTHLY,r.WEEKLY=ae.WEEKLY,r.DAILY=ae.DAILY,r.HOURLY=ae.HOURLY,r.MINUTELY=ae.MINUTELY,r.SECONDLY=ae.SECONDLY,r.MO=Bt.MO,r.TU=Bt.TU,r.WE=Bt.WE,r.TH=Bt.TH,r.FR=Bt.FR,r.SA=Bt.SA,r.SU=Bt.SU,r.parseString=Ys,r.optionsToString=$s,r}();function L_(r,e,t,n,i,s){var a={},o=r.accept;function u(m,T){t.forEach(function(y){y.between(m,T,!0).forEach(function(w){a[Number(w)]=!0})})}i.forEach(function(m){var T=new wn(m,s).rezonedDate();a[Number(T)]=!0}),r.accept=function(m){var T=Number(m);return isNaN(T)?o.call(this,m):!a[T]&&(u(new Date(T-1),new Date(T+1)),!a[T])?(a[T]=!0,o.call(this,m)):!0},r.method==="between"&&(u(r.args.after,r.args.before),r.accept=function(m){var T=Number(m);return a[T]?!0:(a[T]=!0,o.call(this,m))});for(var l=0;l<n.length;l++){var c=new wn(n[l],s).rezonedDate();if(!r.accept(new Date(c.getTime())))break}e.forEach(function(m){fo(r,m.options)});var f=r._result;switch(z.sort(f),r.method){case"all":case"between":return f;case"before":return f.length&&f[f.length-1]||null;case"after":default:return f.length&&f[0]||null}}var U_={dtstart:null,cache:!1,unfold:!1,forceset:!1,compatible:!1,tzid:null};function nx(r,e){var t=[],n=[],i=[],s=[],a=qs(r),o=a.dtstart,u=a.tzid,l=ux(r,e.unfold);return l.forEach(function(c){var f;if(!!c){var m=ox(c),T=m.name,y=m.parms,w=m.value;switch(T.toUpperCase()){case"RRULE":if(y.length)throw new Error("unsupported RRULE parm: ".concat(y.join(",")));t.push(Ys(c));break;case"RDATE":var R=(f=/RDATE(?:;TZID=([^:=]+))?/i.exec(c))!==null&&f!==void 0?f:[],L=R[1];L&&!u&&(u=L),n=n.concat(W_(w,y));break;case"EXRULE":if(y.length)throw new Error("unsupported EXRULE parm: ".concat(y.join(",")));i.push(Ys(w));break;case"EXDATE":s=s.concat(W_(w,y));break;case"DTSTART":break;default:throw new Error("unsupported property: "+T)}}}),{dtstart:o,tzid:u,rrulevals:t,rdatevals:n,exrulevals:i,exdatevals:s}}function ix(r,e){var t=nx(r,e),n=t.rrulevals,i=t.rdatevals,s=t.exrulevals,a=t.exdatevals,o=t.dtstart,u=t.tzid,l=e.cache===!1;if(e.compatible&&(e.forceset=!0,e.unfold=!0),e.forceset||n.length>1||i.length||s.length||a.length){var c=new uf(l);return c.dtstart(o),c.tzid(u||void 0),n.forEach(function(m){c.rrule(new Y(of(m,o,u),l))}),i.forEach(function(m){c.rdate(m)}),s.forEach(function(m){c.exrule(new Y(of(m,o,u),l))}),a.forEach(function(m){c.exdate(m)}),e.compatible&&e.dtstart&&c.rdate(o),c}var f=n[0]||{};return new Y(of(f,f.dtstart||e.dtstart||o,f.tzid||e.tzid||u),l)}function po(r,e){return e===void 0&&(e={}),ix(r,sx(e))}function of(r,e,t){return yt(yt({},r),{dtstart:e,tzid:t})}function sx(r){var e=[],t=Object.keys(r),n=Object.keys(U_);if(t.forEach(function(i){ce(n,i)||e.push(i)}),e.length)throw new Error("Invalid options: "+e.join(", "));return yt(yt({},U_),r)}function ax(r){if(r.indexOf(":")===-1)return{name:"RRULE",value:r};var e=$y(r,":",1),t=e[0],n=e[1];return{name:t,value:n}}function ox(r){var e=ax(r),t=e.name,n=e.value,i=t.split(";");if(!i)throw new Error("empty property name");return{name:i[0].toUpperCase(),parms:i.slice(1),value:n}}function ux(r,e){if(e===void 0&&(e=!1),r=r&&r.trim(),!r)throw new Error("Invalid empty string");if(!e)return r.split(/\s/);for(var t=r.split(`
`),n=0;n<t.length;){var i=t[n]=t[n].replace(/\s+$/g,"");i?n>0&&i[0]===" "?(t[n-1]+=i.slice(1),t.splice(n,1)):n+=1:t.splice(n,1)}return t}function lx(r){r.forEach(function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)})}function W_(r,e){return lx(e),r.split(",").map(function(t){return z.untilStringToDate(t)})}function q_(r){var e=this;return function(t){if(t!==void 0&&(e["_".concat(r)]=t),e["_".concat(r)]!==void 0)return e["_".concat(r)];for(var n=0;n<e._rrule.length;n++){var i=e._rrule[n].origOptions[r];if(i)return i}}}var uf=function(r){ai(e,r);function e(t){t===void 0&&(t=!1);var n=r.call(this,{},t)||this;return n.dtstart=q_.apply(n,["dtstart"]),n.tzid=q_.apply(n,["tzid"]),n._rrule=[],n._rdate=[],n._exrule=[],n._exdate=[],n}return e.prototype._iter=function(t){return L_(t,this._rrule,this._exrule,this._rdate,this._exdate,this.tzid())},e.prototype.rrule=function(t){Y_(t,this._rrule)},e.prototype.exrule=function(t){Y_(t,this._exrule)},e.prototype.rdate=function(t){$_(t,this._rdate)},e.prototype.exdate=function(t){$_(t,this._exdate)},e.prototype.rrules=function(){return this._rrule.map(function(t){return po(t.toString())})},e.prototype.exrules=function(){return this._exrule.map(function(t){return po(t.toString())})},e.prototype.rdates=function(){return this._rdate.map(function(t){return new Date(t.getTime())})},e.prototype.exdates=function(){return this._exdate.map(function(t){return new Date(t.getTime())})},e.prototype.valueOf=function(){var t=[];return!this._rrule.length&&this._dtstart&&(t=t.concat($s({dtstart:this._dtstart}))),this._rrule.forEach(function(n){t=t.concat(n.toString().split(`
`))}),this._exrule.forEach(function(n){t=t.concat(n.toString().split(`
`).map(function(i){return i.replace(/^RRULE:/,"EXRULE:")}).filter(function(i){return!/^DTSTART/.test(i)}))}),this._rdate.length&&t.push(j_("RDATE",this._rdate,this.tzid())),this._exdate.length&&t.push(j_("EXDATE",this._exdate,this.tzid())),t},e.prototype.toString=function(){return this.valueOf().join(`
`)},e.prototype.clone=function(){var t=new e(!!this._cache);return this._rrule.forEach(function(n){return t.rrule(n.clone())}),this._exrule.forEach(function(n){return t.exrule(n.clone())}),this._rdate.forEach(function(n){return t.rdate(new Date(n.getTime()))}),this._exdate.forEach(function(n){return t.exdate(new Date(n.getTime()))}),t},e}(Y);function Y_(r,e){if(!(r instanceof Y))throw new TypeError(String(r)+" is not RRule instance");ce(e.map(String),String(r))||e.push(r)}function $_(r,e){if(!(r instanceof Date))throw new TypeError(String(r)+" is not Date instance");ce(e.map(Number),Number(r))||(e.push(r),z.sort(e))}function j_(r,e,t){var n=!t||t.toUpperCase()==="UTC",i=n?"".concat(r,":"):"".concat(r,";TZID=").concat(t,":"),s=e.map(function(a){return z.timeToUntilString(a.valueOf(),n)}).join(",");return"".concat(i).concat(s)}function Rr(r,e){return r!==null&&e===null?-1:r===null&&e!==null?1:r!==null&&e!==null?r.isValid()&&!e.isValid()?-1:!r.isValid()&&e.isValid()||r.isAfter(e)?1:r.isBefore(e)?-1:0:0}var et=class{constructor({rrule:e,baseOnToday:t,referenceDate:n,startDate:i,scheduledDate:s,dueDate:a}){this.rrule=e,this.baseOnToday=t,this.referenceDate=n,this.startDate=i,this.scheduledDate=s,this.dueDate=a}static fromText({recurrenceRuleText:e,startDate:t,scheduledDate:n,dueDate:i}){try{let s=e.match(/^([a-zA-Z0-9, !]+?)( when done)?$/i);if(s==null)return null;let a=s[1].trim(),o=s[2]!==void 0,u=Y.parseText(a);if(u!==null){let l=null;i?l=window.moment(i):n?l=window.moment(n):t&&(l=window.moment(t)),!o&&l!==null?u.dtstart=window.moment(l).startOf("day").utc(!0).toDate():u.dtstart=window.moment().startOf("day").utc(!0).toDate();let c=new Y(u);return new et({rrule:c,baseOnToday:o,referenceDate:l,startDate:t,scheduledDate:n,dueDate:i})}}catch(s){s instanceof Error&&console.log(s.message)}return null}toText(){let e=this.rrule.toText();return this.baseOnToday&&(e+=" when done"),e}next(){let e=this.nextReferenceDate();if(e!==null){let t=null,n=null,i=null;if(this.referenceDate){if(this.startDate){let s=window.moment.duration(this.startDate.diff(this.referenceDate));t=window.moment(e),t.add(Math.round(s.asDays()),"days")}if(this.scheduledDate){let s=window.moment.duration(this.scheduledDate.diff(this.referenceDate));n=window.moment(e),n.add(Math.round(s.asDays()),"days")}if(this.dueDate){let s=window.moment.duration(this.dueDate.diff(this.referenceDate));i=window.moment(e),i.add(Math.round(s.asDays()),"days")}}return{startDate:t,scheduledDate:n,dueDate:i}}return null}identicalTo(e){return this.baseOnToday!==e.baseOnToday||Rr(this.startDate,e.startDate)!==0||Rr(this.scheduledDate,e.scheduledDate)!==0||Rr(this.dueDate,e.dueDate)!==0?!1:this.toText()===e.toText()}nextReferenceDate(){if(this.baseOnToday){let e=window.moment();return this.nextReferenceDateFromToday(e).toDate()}else return this.nextReferenceDateFromOriginalReferenceDate().toDate()}nextReferenceDateFromToday(e){let t=new Y(Dt(ge({},this.rrule.origOptions),{dtstart:e.startOf("day").utc(!0).toDate()}));return this.nextAfter(e.endOf("day"),t)}nextReferenceDateFromOriginalReferenceDate(){var t;let e=window.moment((t=this.referenceDate)!=null?t:void 0).endOf("day");return this.nextAfter(e,this.rrule)}nextAfter(e,t){e.utc(!0);let n=window.moment(t.after(e.toDate())),i=this.toText(),s=i.match(/every( \d+)? month(s)?(.*)?/);s!==null&&(i.includes(" on ")||(n=et.nextAfterMonths(e,n,t,s[1])));let a=i.match(/every( \d+)? year(s)?(.*)?/);return a!==null&&(n=et.nextAfterYears(e,n,t,a[1])),et.addTimezone(n)}static nextAfterMonths(e,t,n,i){let s=1;for(i!==void 0&&(s=Number.parseInt(i.trim(),10));et.isSkippingTooManyMonths(e,t,s);)t=et.fromOneDayEarlier(e,n);return t}static isSkippingTooManyMonths(e,t,n){let i=t.month()-e.month();return i+=(t.year()-e.year())*12,i>n}static nextAfterYears(e,t,n,i){let s=1;for(i!==void 0&&(s=Number.parseInt(i.trim(),10));et.isSkippingTooManyYears(e,t,s);)t=et.fromOneDayEarlier(e,n);return t}static isSkippingTooManyYears(e,t,n){return t.year()-e.year()>n}static fromOneDayEarlier(e,t){e.subtract(1,"days").endOf("day");let n=t.origOptions;return n.dtstart=e.startOf("day").toDate(),t=new Y(n),window.moment(t.after(e.toDate()))}static addTimezone(e){return window.moment.utc(e).local(!0).startOf("day")}};var lf=5;function cf(r,e){let t=[r.startDateSymbol,r.scheduledDateSymbol,r.dueDateSymbol].join("|");return(n,i,s)=>{let a=[];return a=a.concat(dx(n,i,s,t,e)),a=a.concat(fx(n,i,s,r.recurrenceSymbol)),a=a.concat(cx(n,i,s,r)),a.length>0&&!a.some(o=>o.suggestionType==="match")&&a.unshift({suggestionType:"empty",displayText:"\u23CE",appendText:`
`}),a=a.slice(0,s.autoSuggestMaxItems),a}}function cx(r,e,t,n){let i=u=>Object.values(n.prioritySymbols).some(l=>l.length>0&&u.includes(l)),s=[];if(r.includes(n.dueDateSymbol)||s.push({displayText:`${n.dueDateSymbol} due date`,appendText:`${n.dueDateSymbol} `}),r.includes(n.startDateSymbol)||s.push({displayText:`${n.startDateSymbol} start date`,appendText:`${n.startDateSymbol} `}),r.includes(n.scheduledDateSymbol)||s.push({displayText:`${n.scheduledDateSymbol} scheduled date`,appendText:`${n.scheduledDateSymbol} `}),i(r)||(s.push({displayText:`${n.prioritySymbols.High} high priority`,appendText:`${n.prioritySymbols.High} `}),s.push({displayText:`${n.prioritySymbols.Medium} medium priority`,appendText:`${n.prioritySymbols.Medium} `}),s.push({displayText:`${n.prioritySymbols.Low} low priority`,appendText:`${n.prioritySymbols.Low} `}),s.push({displayText:`${n.prioritySymbols.Highest} highest priority`,appendText:`${n.prioritySymbols.Highest} `}),s.push({displayText:`${n.prioritySymbols.Lowest} lowest priority`,appendText:`${n.prioritySymbols.Lowest} `})),r.includes(n.recurrenceSymbol)||s.push({displayText:`${n.recurrenceSymbol} recurring (repeat)`,appendText:`${n.recurrenceSymbol} `}),!r.includes(n.createdDateSymbol)){let l=Mt.parseDate("today",!0).format(H.dateFormat);s.push({textToMatch:`${n.createdDateSymbol} created`,displayText:`${n.createdDateSymbol} created today (${l})`,appendText:`${n.createdDateSymbol} ${l} `})}let a=df(r,/([a-zA-Z'_-]*)/g,e),o=[];if(a&&a.length>0){let u=a[0];if(u.length>=Math.max(1,t.autoSuggestMinMatch)){let l=s.filter(c=>(c.textToMatch||c.displayText).toLowerCase().includes(u.toLowerCase()));for(let c of l)o.push({suggestionType:"match",displayText:c.displayText,appendText:c.appendText,insertAt:a.index,insertSkip:u.length})}}return o.length===0&&t.autoSuggestMinMatch===0?s:o}function dx(r,e,t,n,i){let s=["today","tomorrow","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","next week","next month","next year"],a=[],o=new RegExp(`(${n})\\s*([0-9a-zA-Z ]*)`,"ug"),u=df(r,o,e);if(u&&u.length>=2){let l=u[1],c=u[2];if(c.length<t.autoSuggestMinMatch)return[];let f=c&&c.length>1?Mt.parseDate(ii(c),!0):null;f&&f.isValid()&&a.push({displayText:`${f.format(H.dateFormat)}`,appendText:`${l} ${f.format(H.dateFormat)} `,insertAt:u.index,insertSkip:u[0].length});let m=1,T=s.filter(y=>c&&c.length>=m&&y.toLowerCase().includes(c.toLowerCase())).slice(0,i);T.length===0&&(T=s.slice(0,i));for(let y of T){let R=`${Mt.parseDate(y,!0).format(H.dateFormat)}`;a.push({suggestionType:"match",displayText:`${y} (${R})`,appendText:`${l} ${R} `,insertAt:u.index,insertSkip:u[0].length})}}return a}function fx(r,e,t,n){var u;let i=["every","every day","every week","every month","every month on the","every year","every week on Sunday","every week on Monday","every week on Tuesday","every week on Wednesday","every week on Thursday","every week on Friday","every week on Saturday"],s=[],a=new RegExp(`(${n})\\s*([0-9a-zA-Z ]*)`,"ug"),o=df(r,a,e);if(o&&o.length>=2){let l=o[1],c=o[2];if(c.length<t.autoSuggestMinMatch)return[];if(c.length>0){let y=(u=et.fromText({recurrenceRuleText:c,startDate:null,scheduledDate:null,dueDate:null}))==null?void 0:u.toText();if(y){let w=`${l} ${y} `;if(s.push({suggestionType:"match",displayText:`\u2705 ${y}`,appendText:w,insertAt:o.index,insertSkip:o[0].length}),o[0]==w)return[]}}let f=1,m=t.autoSuggestMaxItems/2,T=i.filter(y=>c&&c.length>=f&&y.toLowerCase().includes(c.toLowerCase())).slice(0,m);T.length===0&&c.trim().length===0&&(T=i.slice(0,m));for(let y of T)s.push({suggestionType:"match",displayText:`${y}`,appendText:`${l} ${y} `,insertAt:o.index,insertSkip:o[0].length})}return s}function df(r,e,t){let n=r.matchAll(e);for(let i of n)if((i==null?void 0:i.index)&&i.index<=t&&t<=i.index+i[0].length)return i}var js=class{constructor(){this.hideTaskCount=!1;this.hideBacklinks=!1;this.hidePriority=!1;this.hideCreatedDate=!1;this.hideStartDate=!1;this.hideScheduledDate=!1;this.hideDoneDate=!1;this.hideDueDate=!1;this.hideRecurrenceRule=!1;this.hideEditButton=!1;this.hideUrgency=!0;this.shortMode=!1;this.explainQuery=!1}},Qr=class{constructor(e,t){this.defaultLayout=["description","priority","recurrenceRule","createdDate","startDate","scheduledDate","dueDate","doneDate","blockLink"];this.hiddenComponents=[];this.specificClasses=[];e?this.options=e:this.options=new js,t?this.layoutComponents=t:this.layoutComponents=this.defaultLayout,this.layoutComponents=this.applyOptions(this.options)}applyOptions(e){let t=(s,a,o)=>a?(this.specificClasses.push(`tasks-layout-hide-${o}`),this.hiddenComponents.push(o),s.filter(u=>u!=o)):s,n=(s,a)=>{s&&this.specificClasses.push(`tasks-layout-hide-${a}`)},i=this.layoutComponents;return i=t(i,e.hidePriority,"priority"),i=t(i,e.hideRecurrenceRule,"recurrenceRule"),i=t(i,e.hideCreatedDate,"createdDate"),i=t(i,e.hideStartDate,"startDate"),i=t(i,e.hideScheduledDate,"scheduledDate"),i=t(i,e.hideDueDate,"dueDate"),i=t(i,e.hideDoneDate,"doneDate"),n(e.hideUrgency,"urgency"),n(e.hideBacklinks,"backlinks"),n(e.hideEditButton,"edit-button"),e.shortMode&&this.specificClasses.push("tasks-layout-short-mode"),i}};var ff={prioritySymbols:{Highest:"\u{1F53A}",High:"\u23EB",Medium:"\u{1F53C}",Low:"\u{1F53D}",Lowest:"\u23EC",None:""},startDateSymbol:"\u{1F6EB}",createdDateSymbol:"\u2795",scheduledDateSymbol:"\u23F3",dueDateSymbol:"\u{1F4C5}",doneDateSymbol:"\u2705",recurrenceSymbol:"\u{1F501}",TaskFormatRegularExpressions:{priorityRegex:/([🔺⏫🔼🔽⏬])$/u,startDateRegex:/🛫 *(\d{4}-\d{2}-\d{2})$/u,createdDateRegex:/ *(\d{4}-\d{2}-\d{2})$/u,scheduledDateRegex:/[⏳⌛] *(\d{4}-\d{2}-\d{2})$/u,dueDateRegex:/[📅📆🗓] *(\d{4}-\d{2}-\d{2})$/u,doneDateRegex:/✅ *(\d{4}-\d{2}-\d{2})$/u,recurrenceRegex:/🔁 ?([a-zA-Z0-9, !]+)$/iu}},En=class{constructor(e){this.symbols=e}serialize(e){let t=new Qr,n="";for(let i of t.layoutComponents)n+=this.componentToString(e,t,i);return n}componentToString(e,t,n){var f;let{prioritySymbols:i,startDateSymbol:s,createdDateSymbol:a,scheduledDateSymbol:o,doneDateSymbol:u,recurrenceSymbol:l,dueDateSymbol:c}=this.symbols;switch(n){case"description":return e.description;case"priority":{let m="";return e.priority==="0"?m=" "+i.Highest:e.priority==="1"?m=" "+i.High:e.priority==="2"?m=" "+i.Medium:e.priority==="4"?m=" "+i.Low:e.priority==="5"&&(m=" "+i.Lowest),m}case"startDate":return e.startDate?t.options.shortMode?" "+s:` ${s} ${e.startDate.format(H.dateFormat)}`:"";case"createdDate":return e.createdDate?t.options.shortMode?" "+a:` ${a} ${e.createdDate.format(H.dateFormat)}`:"";case"scheduledDate":return!e.scheduledDate||e.scheduledDateIsInferred?"":t.options.shortMode?" "+o:` ${o} ${e.scheduledDate.format(H.dateFormat)}`;case"doneDate":return e.doneDate?t.options.shortMode?" "+u:` ${u} ${e.doneDate.format(H.dateFormat)}`:"";case"dueDate":return e.dueDate?t.options.shortMode?" "+c:` ${c} ${e.dueDate.format(H.dateFormat)}`:"";case"recurrenceRule":return e.recurrence?t.options.shortMode?" "+l:` ${l} ${e.recurrence.toText()}`:"";case"blockLink":return(f=e.blockLink)!=null?f:"";default:throw new Error(`Don't know how to render task component of type '${n}'`)}}parsePriority(e){let{prioritySymbols:t}=this.symbols;switch(e){case t.Lowest:return"5";case t.Low:return"4";case t.Medium:return"2";case t.High:return"1";case t.Highest:return"0";default:return"3"}}deserialize(e){let{TaskFormatRegularExpressions:t}=this.symbols,n,i="3",s=null,a=null,o=null,u=null,l=null,c="",f=null,m="",T=20,y=0;do{n=!1;let w=e.match(t.priorityRegex);w!==null&&(i=this.parsePriority(w[1]),e=e.replace(t.priorityRegex,"").trim(),n=!0);let R=e.match(t.doneDateRegex);R!==null&&(u=window.moment(R[1],H.dateFormat),e=e.replace(t.doneDateRegex,"").trim(),n=!0);let L=e.match(t.dueDateRegex);L!==null&&(o=window.moment(L[1],H.dateFormat),e=e.replace(t.dueDateRegex,"").trim(),n=!0);let q=e.match(t.scheduledDateRegex);q!==null&&(a=window.moment(q[1],H.dateFormat),e=e.replace(t.scheduledDateRegex,"").trim(),n=!0);let U=e.match(t.startDateRegex);U!==null&&(s=window.moment(U[1],H.dateFormat),e=e.replace(t.startDateRegex,"").trim(),n=!0);let ne=e.match(t.createdDateRegex);ne!==null&&(l=window.moment(ne[1],H.dateFormat),e=e.replace(t.createdDateRegex,"").trim(),n=!0);let te=e.match(t.recurrenceRegex);te!==null&&(c=te[1].trim(),e=e.replace(t.recurrenceRegex,"").trim(),n=!0);let Te=e.match(H.hashTagsFromEnd);if(Te!=null){e=e.replace(H.hashTagsFromEnd,"").trim(),n=!0;let G=Te[0].trim();m=m.length>0?[G,m].join(" "):G}y++}while(n&&y<=T);return c.length>0&&(f=et.fromText({recurrenceRuleText:c,startDate:s,scheduledDate:a,dueDate:o})),m.length>0&&(e+=" "+m),{description:e,priority:i,startDate:s,createdDate:l,scheduledDate:a,dueDate:o,doneDate:u,recurrence:f,tags:Oe.extractHashtags(e)}}};function kn(r){let e=["(?:",/(?=[^\]]+\])\[/,"|",/(?=[^)]+\))\(/,")",/ */,r,/ */,/[)\]]/,/(?: *,)?/,/$/].map(t=>t instanceof RegExp?t.source:t).join("");return new RegExp(e,r.flags)}var pf={prioritySymbols:{Highest:"priority:: highest",High:"priority:: high",Medium:"priority:: medium",Low:"priority:: low",Lowest:"priority:: lowest",None:""},startDateSymbol:"start::",createdDateSymbol:"created::",scheduledDateSymbol:"scheduled::",dueDateSymbol:"due::",doneDateSymbol:"completion::",recurrenceSymbol:"repeat::",TaskFormatRegularExpressions:{priorityRegex:kn(/priority:: *(highest|high|medium|low|lowest)/),startDateRegex:kn(/start:: *(\d{4}-\d{2}-\d{2})/),createdDateRegex:kn(/created:: *(\d{4}-\d{2}-\d{2})/),scheduledDateRegex:kn(/scheduled:: *(\d{4}-\d{2}-\d{2})/),dueDateRegex:kn(/due:: *(\d{4}-\d{2}-\d{2})/),doneDateRegex:kn(/completion:: *(\d{4}-\d{2}-\d{2})/),recurrenceRegex:kn(/repeat:: *([a-zA-Z0-9, !]+)/)}},mo=class extends En{constructor(){super(pf)}parsePriority(e){switch(e){case"highest":return"0";case"high":return"1";case"medium":return"2";case"low":return"4";case"lowest":return"5";default:return"3"}}componentToString(e,t,n){let i=super.componentToString(e,t,n);return i!==""&&!["blockLink","description"].includes(n)?` [${i.trim()}]`:i}};var Ht=(a=>(a.TODO="TODO",a.DONE="DONE",a.IN_PROGRESS="IN_PROGRESS",a.CANCELLED="CANCELLED",a.NON_TASK="NON_TASK",a.EMPTY="EMPTY",a))(Ht||{}),tt=class{constructor(e,t,n,i,s="TODO"){this.symbol=e,this.name=t,this.nextStatusSymbol=n,this.availableAsCommand=i,this.type=s}};var wt=class{get symbol(){return this.configuration.symbol}get name(){return this.configuration.name}get nextStatusSymbol(){return this.configuration.nextStatusSymbol}get nextSymbol(){return this.configuration.nextStatusSymbol}get availableAsCommand(){return this.configuration.availableAsCommand}get type(){return this.configuration.type}constructor(e){this.configuration=e}static makeDone(){return new wt(new tt("x","Done"," ",!0,"DONE"))}static makeEmpty(){return new wt(new tt("","EMPTY","",!0,"EMPTY"))}static makeTodo(){return new wt(new tt(" ","Todo","x",!0,"TODO"))}static makeCancelled(){return new wt(new tt("-","Cancelled"," ",!0,"CANCELLED"))}static makeInProgress(){return new wt(new tt("/","In Progress","x",!0,"IN_PROGRESS"))}static getTypeForUnknownSymbol(e){switch(e){case"x":case"X":return"DONE";case"/":return"IN_PROGRESS";case"-":return"CANCELLED";case"":return"EMPTY";case" ":default:return"TODO"}}static getTypeFromStatusTypeString(e){return Ht[e]||"TODO"}static createUnknownStatus(e){return new wt(new tt(e,"Unknown","x",!1,"TODO"))}static createFromImportedValue(e){let t=e[0],n=wt.getTypeFromStatusTypeString(e[3]);return new wt(new tt(t,e[1],e[2],!1,n))}isCompleted(){return this.type==="DONE"}identicalTo(e){let t=["symbol","name","nextStatusSymbol","availableAsCommand","type"];for(let n of t)if(this[n]!==e[n])return!1;return!0}previewText(){let e="";return wt.tasksPluginCanCreateCommandsForStatuses()&&this.availableAsCommand&&(e=" Available as a command."),`- [${this.symbol}] => [${this.nextStatusSymbol}], name: '${this.name}', type: '${this.configuration.type}'.${e}`}static tasksPluginCanCreateCommandsForStatuses(){return!1}},J=wt;J.DONE=wt.makeDone(),J.EMPTY=wt.makeEmpty(),J.TODO=wt.makeTodo();var ho=class{constructor(e=!1,t=!1){this.ignoreSortInstructions=e,this.showTaskHiddenData=t}};var He=class{constructor(){this.coreStatuses=[J.makeTodo().configuration,J.makeDone().configuration],this.customStatuses=[J.makeInProgress().configuration,J.makeCancelled().configuration]}static addStatus(e,t){e.push(t)}static replaceStatus(e,t,n){let i=this.findStatusIndex(t,e);return i<=-1?!1:(e.splice(i,1,n),!0)}static findStatusIndex(e,t){let n=new J(e);return t.findIndex(i=>new J(i).previewText()==n.previewText())}static deleteStatus(e,t){let n=this.findStatusIndex(t,e);return n<=-1?!1:(e.splice(n,1),!0)}static deleteAllCustomStatuses(e){e.customStatuses.splice(0)}static resetAllCustomStatuses(e){He.deleteAllCustomStatuses(e),new He().customStatuses.forEach(n=>{He.addStatus(e.customStatuses,n)})}static bulkAddStatusCollection(e,t){let n=[];return t.forEach(i=>{e.customStatuses.find(a=>a.symbol==i[0]&&a.name==i[1]&&a.nextStatusSymbol==i[2])?n.push(`The status ${i[1]} (${i[0]}) is already added.`):He.addStatus(e.customStatuses,J.createFromImportedValue(i))}),n}static applyToStatusRegistry(e,t){t.clearStatuses(),e.coreStatuses.forEach(n=>{t.add(n)}),e.customStatuses.forEach(n=>{t.add(n)})}};var G_=[{index:9999,internalName:"INTERNAL_TESTING_ENABLED_BY_DEFAULT",displayName:"Test Item. Used to validate the Feature Framework.",description:"Description",enabledByDefault:!0,stable:!1}];var fr=class{constructor(e,t,n,i,s,a){this.internalName=e;this.index=t;this.description=n;this.displayName=i;this.enabledByDefault=s;this.stable=a}static get values(){let e=[];return G_.forEach(t=>{e=[...e,new fr(t.internalName,t.index,t.description,t.displayName,t.enabledByDefault,t.stable)]}),e}static get settingsFlags(){let e={};return fr.values.forEach(t=>{e[t.internalName]=t.enabledByDefault}),e}static fromString(e){for(let t of fr.values)if(e===t.internalName)return t;throw new RangeError(`Illegal argument passed to fromString(): ${e} does not correspond to any available Feature ${this.prototype.constructor.name}`)}};function go(r){return r.replace(/([.*+?^${}()|[\]/\\])/g,"\\$1")}var zt=class{static get(){let{globalFilter:e}=X();return e}static set(e){Ge({globalFilter:e})}static reset(){Ge({globalFilter:zt.empty})}static isEmpty(){return zt.get()===zt.empty}static equals(e){return zt.get()===e}static includedIn(e){let t=zt.get();return e.includes(t)}static prependTo(e){return zt.get()+" "+e}static removeAsWordFromDependingOnSettings(e){let{removeGlobalFilter:t}=X();return t?zt.removeAsWordFrom(e):e}static removeAsWordFrom(e){if(zt.isEmpty())return e;let t=RegExp("(^|\\s)"+go(zt.get())+"($|\\s)","ug");return e.search(t)>-1&&(e=e.replace(t,"$1$2").replace(" "," ").trim()),e}static removeAsSubstringFrom(e){let t=zt.get();return e.replace(t,"").trim()}},ve=zt;ve.empty="";var Mr={tasksPluginEmoji:{displayName:"Tasks Emoji Format",taskSerializer:new En(ff),buildSuggestions:cf(ff,lf)},dataview:{displayName:"Dataview",taskSerializer:new mo,buildSuggestions:cf(pf,lf)}},mx={globalQuery:"",globalFilter:ve.empty,removeGlobalFilter:!1,taskFormat:"tasksPluginEmoji",setCreatedDate:!1,setDoneDate:!0,autoSuggestInEditor:!0,autoSuggestMinMatch:0,autoSuggestMaxItems:6,provideAccessKeys:!0,useFilenameAsScheduledDate:!1,filenameAsDateFolders:[],recurrenceOnNextLine:!1,statusSettings:new He,features:fr.settingsFlags,generalSettings:{},headingOpened:{},debugSettings:new ho},Zr=ge({},mx),X=()=>{for(let r in fr.settingsFlags)Zr.features[r]===void 0&&(Zr.features[r]=fr.settingsFlags[r]);return Zr.statusSettings.customStatuses.forEach((r,e,t)=>{var i,s;let n=J.getTypeFromStatusTypeString(r.type);t[e]=new tt((i=r.symbol)!=null?i:" ",r.name,(s=r.nextStatusSymbol)!=null?s:"x",r.availableAsCommand,n)}),ge({},Zr)},Ge=r=>(Zr=ge(ge({},Zr),r),X());var Dn=(r,e)=>(Zr.generalSettings[r]=e,X()),H_=r=>{var e;return(e=Zr.features[r])!=null?e:!1};function Gs(){return Mr[X().taskFormat]}function mf(){return{source:X().globalQuery}}var Se=class{constructor(){this._registeredStatuses=[];this.addDefaultStatusTypes()}get registeredStatuses(){return this._registeredStatuses.filter(({symbol:e})=>e!==J.EMPTY.symbol)}static getInstance(){return Se.instance||(Se.instance=new Se),Se.instance}add(e){this.hasSymbol(e.symbol)||(e instanceof J?this._registeredStatuses.push(e):this._registeredStatuses.push(new J(e)))}bySymbol(e){return this.hasSymbol(e)?this.getSymbol(e):J.EMPTY}bySymbolOrCreate(e){return this.hasSymbol(e)?this.getSymbol(e):J.createUnknownStatus(e)}byName(e){return this._registeredStatuses.filter(({name:t})=>t===e).length>0?this._registeredStatuses.filter(({name:t})=>t===e)[0]:J.EMPTY}resetToDefaultStatuses(){this.clearStatuses(),this.addDefaultStatusTypes()}clearStatuses(){this._registeredStatuses=[]}getNextStatus(e){if(e.nextStatusSymbol!==""){let t=this.bySymbol(e.nextStatusSymbol);if(t!==null)return t}return J.EMPTY}getNextStatusOrCreate(e){let t=this.getNextStatus(e);return t.type!=="EMPTY"?t:J.createUnknownStatus(e.nextStatusSymbol)}findUnknownStatuses(e){let t=e.filter(s=>!this.hasSymbol(s.symbol)),n=new Se,i=[];return t.forEach(s=>{if(n.hasSymbol(s.symbol))return;let a=Se.copyStatusWithNewName(s,`Unknown (${s.symbol})`);i.push(a),n.add(a)}),i}static copyStatusWithNewName(e,t){let n=new tt(e.symbol,t,e.nextStatusSymbol,e.availableAsCommand,e.type);return new J(n)}getSymbol(e){return this._registeredStatuses.filter(({symbol:t})=>t===e)[0]}hasSymbol(e){return this._registeredStatuses.find(t=>t.symbol===e)!==void 0}addDefaultStatusTypes(){[J.makeTodo(),J.makeInProgress(),J.makeDone(),J.makeCancelled()].forEach(t=>{this.add(t)})}};var tr=class{static calculate(e){let t=0;if(e.dueDate!==null){let n=Math.round(window.moment().diff(e.dueDate)/tr.milliSecondsPerDay),i;n>=7?i=1:n>=-14?i=(n+14)*.8/21+.2:i=.2,t+=i*tr.dueCoefficient}switch(e.scheduledDate!==null&&window.moment().isSameOrAfter(e.scheduledDate)&&(t+=1*tr.scheduledCoefficient),e.startDate!==null&&window.moment().isBefore(e.startDate)&&(t+=1*tr.startedCoefficient),e.priority){case"0":t+=1.5*tr.priorityCoefficient;break;case"1":t+=1*tr.priorityCoefficient;break;case"2":t+=.65*tr.priorityCoefficient;break;case"3":t+=.325*tr.priorityCoefficient;break;case"5":t-=.3*tr.priorityCoefficient;break}return t}},xr=tr;xr.dueCoefficient=12,xr.scheduledCoefficient=5,xr.startedCoefficient=-3,xr.priorityCoefficient=6,xr.milliSecondsPerDay=1e3*60*60*24;var rT=require("obsidian");var zs=require("obsidian");var hx=require("obsidian"),X_=Fi(V_());var hf=class extends X_.EventEmitter2{constructor(){super(...arguments);this.options={minLevels:{"":"info",tasks:"info"}};this.consoleLoggerRegistered=!1;this.arrAvg=t=>t.reduce((n,i)=>n+i,0)/t.length}configure(t){return this.options=Object.assign({},this.options,t),this}getLogger(t){let n="none",i="";for(let s in this.options.minLevels)t.startsWith(s)&&s.length>=i.length&&(n=this.options.minLevels[s],i=s);return new gf(this,t,n)}onLogEntry(t){return this.on("log",t),this}registerConsoleLogger(){return this.consoleLoggerRegistered?this:(this.onLogEntry(t=>{let n=`[${window.moment().format("YYYY-MM-DD-HH:mm:ss.SSS")}][${t.level}][${t.module}]`;switch(t.traceId&&(n+=`[${t.traceId}]`),n+=` ${t.message}`,t.objects===void 0&&(t.objects=""),t.level){case"trace":console.trace(n,t.objects);break;case"debug":console.debug(n,t.objects);break;case"info":console.info(n,t.objects);break;case"warn":console.warn(n,t.objects);break;case"error":console.error(n,t.objects);break;default:console.log(`{${t.level}} ${n}`,t.objects)}}),this.consoleLoggerRegistered=!0,this)}},yo=new hf,gf=class{constructor(e,t,n){this.levels={trace:1,debug:2,info:3,warn:4,error:5};this.logManager=e,this.module=t,this.minLevel=this.levelToInt(n)}levelToInt(e){return e.toLowerCase()in this.levels?this.levels[e.toLowerCase()]:99}log(e,t,n){if(this.levelToInt(e)<this.minLevel)return;let s={level:e,module:this.module,message:t,objects:n,traceId:void 0};this.logManager.emit("log",s)}trace(e,t){this.log("trace",e,t)}debug(e,t){this.log("debug",e,t)}info(e,t){this.log("info",e,t)}warn(e,t){this.log("warn",e,t)}error(e,t){this.log("error",e,t)}logWithId(e,t,n,i){if(this.levelToInt(e)<this.minLevel)return;let a={level:e,module:this.module,message:n,objects:i,traceId:t};this.logManager.emit("log",a)}traceWithId(e,t,n){this.logWithId("trace",e,t,n)}debugWithId(e,t,n){this.logWithId("debug",e,t,n)}infoWithId(e,t,n){this.logWithId("info",e,t,n)}warnWithId(e,t,n){this.logWithId("warn",e,t,n)}errorWithId(e,t,n){this.logWithId("error",e,t,n)}};var Bs,yf,_f,gx=["md"],Hs=yo.getLogger("tasks"),Q_=({metadataCache:r,vault:e,workspace:t})=>{Bs=r,yf=e,_f=t},bo=t=>W(void 0,[t],function*({originalTask:r,newTasks:e}){if(yf===void 0||Bs===void 0||_f===void 0){_o("Tasks: cannot use File before initializing it.");return}Array.isArray(e)||(e=[e]),Hs.debug(`replaceTaskWithTasks entered. ${r.path}`),J_({originalTask:r,newTasks:e,vault:yf,metadataCache:Bs,workspace:_f,previousTries:0})});function _o(r){console.error(r),new zs.Notice(r,15e3)}function Z_(r){console.warn(r),new zs.Notice(r,1e4)}function yx(r){Hs.debug(r)}var Jr=class extends Error{},To=class extends Error{},J_=a=>W(void 0,[a],function*({originalTask:r,newTasks:e,vault:t,metadataCache:n,workspace:i,previousTries:s}){Hs.debug(`tryRepetitive after ${s} previous tries`);let o=()=>{if(s>10){let l=`Tasks: Could not find the correct task line to update.
The task line not updated is:
${r.originalMarkdown}
In this markdown file:
"${r.taskLocation.path}"
Note: further clicks on this checkbox will usually now be ignored until the file is opened (or certain, specific edits are made - it's complicated).
Recommendations:
1. Close all panes that have the above file open, and then re-open the file.
2. Check for exactly identical copies of the task line, in this file, and see if you can make them different.
`;_o(l);return}let u=Math.min(Math.pow(10,s),100);Hs.debug(`timeout = ${u}`),setTimeout(()=>{J_({originalTask:r,newTasks:e,vault:t,metadataCache:n,workspace:i,previousTries:s+1})},u)};try{let[u,l,c]=yield eT(r,t),f=[...c.slice(0,u),...e.map(m=>m.toFileLineString()),...c.slice(u+1)];yield t.modify(l,f.join(`
`))}catch(u){if(u instanceof Jr)return u.message&&Z_(u.message),o();if(u instanceof To)return o();u instanceof Error&&_o(u.message)}});function eT(r,e){return W(this,null,function*(){if(Bs===void 0)throw new Jr;let t=e.getAbstractFileByPath(r.path);if(!(t instanceof zs.TFile))throw new Jr(`Tasks: No file found for task ${r.description}. Retrying ...`);if(!gx.includes(t.extension))throw new Error(`Tasks: Does not support files with the ${t.extension} file extension.`);let n=Bs.getFileCache(t);if(n==null||n===null)throw new Jr(`Tasks: No file cache found for file ${t.path}. Retrying ...`);let i=n.listItems;if(i===void 0||i.length===0)throw new Jr(`Tasks: No list items found in file cache of ${t.path}. Retrying ...`);let a=(yield e.read(t)).split(`
`),o=_x(r,a,i,yx);if(o===void 0)throw new To;return[o,t,a]})}function Tf(r,e){return W(this,null,function*(){try{let[t,n,i]=yield eT(r,e);return[t,n]}catch(t){t instanceof Jr?t.message&&Z_(t.message):t instanceof Error&&_o(t.message)}})}function tT(r,e){return r<e.length}function _x(r,e,t,n){let i=Tx(r,e);return i!==void 0||(i=bx(r,e),i!==void 0)?i:vx(r,e,t,n)}function Tx(r,e){let t=r.taskLocation.lineNumber;if(tT(t,e)&&e[t]===r.originalMarkdown)return Hs.debug(`Found original markdown at original line number ${t}`),t}function bx(r,e){let t=[];for(let n=0;n<e.length;n++)e[n]===r.originalMarkdown&&t.push(n);if(t.length===1)return t[0]}function vx(r,e,t,n){let i,s=0;for(let a of t){let o=a.position.start.line;if(!tT(o,e))return;if(o<r.taskLocation.sectionStart||a.task===void 0)continue;let u=e[o];if(ve.includedIn(u)){if(s===r.taskLocation.sectionIndex){if(u===r.originalMarkdown)i=o;else{n(`Tasks: Unable to find task in file ${r.taskLocation.path}.
Expected task:
${r.originalMarkdown}
Found task:
${u}`);return}break}s++}}return i}var en={description:"task-description",priority:"task-priority",dueDate:"task-due",startDate:"task-start",createdDate:"task-created",scheduledDate:"task-scheduled",doneDate:"task-done",recurrenceRule:"task-recurring",blockLink:""},wx=7,Ex="far";function kx(r,e,t,n){return W(this,null,function*(){if(!n)throw new Error("Must call the Obsidian renderer with an Obsidian Component object");yield rT.MarkdownRenderer.renderMarkdown(r,e,t,n)})}function nT(r,e,t=null){return W(this,null,function*(){var o;t||(t=kx);let n=document.createElement("li");e.parentUlElement.appendChild(n),n.classList.add("task-list-item","plugin-tasks-list-item");let i=document.createElement("span");n.appendChild(i),i.classList.add("tasks-list-text");let s=yield Dx(r,e,i,t);for(let u in s)n.dataset[u]=s[u];let a=document.createElement("input");return n.appendChild(a),a.classList.add("task-list-item-checkbox"),a.type="checkbox",r.status.symbol!==" "&&(a.checked=!0,n.classList.add("is-checked")),a.addEventListener("click",u=>{u.preventDefault(),u.stopPropagation(),a.disabled=!0;let l=r.toggleWithRecurrenceInUsersOrder();bo({originalTask:r,newTasks:l})}),n.prepend(a),n.setAttribute("data-task",r.status.symbol.trim()),n.setAttribute("data-line",e.listIndex.toString()),n.setAttribute("data-task-status-name",r.status.name),n.setAttribute("data-task-status-type",r.status.type),a.setAttribute("data-line",e.listIndex.toString()),(o=e.layoutOptions)!=null&&o.shortMode&&xx({task:r,element:i,isFilenameUnique:e.isFilenameUnique}),n})}function Dx(r,e,t,n){return W(this,null,function*(){let i={},s=new Qr(e.layoutOptions),a=Mr.tasksPluginEmoji.taskSerializer;for(let o of s.layoutComponents){let u=a.componentToString(r,s,o);if(u){o==="description"&&(u=ve.removeAsWordFromDependingOnSettings(u));let l=document.createElement("span");if(t.appendChild(l),l){let c=document.createElement("span");l.appendChild(c),yield Ox(c,u,o,r,n,e.obsidianComponent);let[f,m]=bf(o,r);Sx(o,c),l.classList.add(...f);for(let T in m)l.dataset[T]=m[T];i=ge(ge({},i),m)}}}for(let o of s.hiddenComponents){let[u,l]=bf(o,r);i=ge(ge({},i),l)}if(i.taskPriority===void 0){let[o,u]=bf("priority",r);i=ge(ge({},i),u)}return i})}function Ox(r,e,t,n,i,s){return W(this,null,function*(){if(t==="description"){let{debugSettings:a}=X();a.showTaskHiddenData&&(e+=`<br>\u{1F41B} <b>${n.lineNumber}</b> . ${n.sectionStart} . ${n.sectionIndex} . '<code>${n.originalMarkdown}</code>'<br>'<code>${n.path}</code>' > '<code>${n.precedingHeader}</code>'<br>`),yield i(e,r,n.path,s);let o=r.querySelector("blockquote"),u=o!=null?o:r,l=u.querySelector("p");if(l!==null){for(;l.firstChild;)u.insertBefore(l.firstChild,l);l.remove()}r.querySelectorAll("p").forEach(c=>{c.hasChildNodes()||c.remove()}),r.querySelectorAll(".footnotes").forEach(c=>{c.remove()})}else r.innerHTML=e})}function bf(r,e){let t=[],n={},i=(s,a)=>{let o=Rx(s);o&&(n[a]=o)};switch(r){case"description":t.push(en.description);break;case"priority":{let s=null;e.priority==="0"?s="highest":e.priority==="1"?s="high":e.priority==="2"?s="medium":e.priority==="4"?s="low":e.priority==="5"?s="lowest":s="normal",n.taskPriority=s,t.push(en.priority);break}case"createdDate":{let s=e.createdDate;s&&(t.push(en.createdDate),i(s,"taskCreated"));break}case"dueDate":{let s=e.dueDate;s&&(t.push(en.dueDate),i(s,"taskDue"));break}case"startDate":{let s=e.startDate;s&&(t.push(en.startDate),i(s,"taskStart"));break}case"scheduledDate":{let s=e.scheduledDate;s&&(t.push(en.scheduledDate),i(s,"taskScheduled"));break}case"doneDate":{let s=e.doneDate;s&&(t.push(en.doneDate),i(s,"taskDone"));break}case"recurrenceRule":{t.push(en.recurrenceRule);break}}return[t,n]}function Sx(r,e){if(r==="description"){let t=e.getElementsByClassName("tag");for(let n=0;n<t.length;n++){let i=t[n].textContent;if(i){let s=Mx(i),a=t[n];s&&(a.dataset.tagName=s)}}}}function Rx(r){let e=window.moment().startOf("day"),t="",n=e.diff(r,"days");return isNaN(n)?null:n===0?"today":(n>0?t+="past-":n<0&&(t+="future-"),Math.abs(n)<=wx?t+=Math.abs(n).toString()+"d":t+=Ex,t)}function Mx(r){let e=/["&\x00\r\n]/g,t=r.replace(e,"-");return t=t.replace(/^[-_]+/,""),t.length>0?t:null}function xx({task:r,element:e,isFilenameUnique:t}){let{recurrenceSymbol:n,startDateSymbol:i,createdDateSymbol:s,scheduledDateSymbol:a,dueDateSymbol:o,doneDateSymbol:u}=Mr.tasksPluginEmoji.taskSerializer.symbols;e.addEventListener("mouseenter",()=>{let l=e.createDiv();l.addClasses(["tooltip","pop-up"]),r.recurrence&&l.createDiv().setText(`${n} ${r.recurrence.toText()}`),r.createdDate&&l.createDiv().setText(Ks({signifier:s,date:r.createdDate})),r.startDate&&l.createDiv().setText(Ks({signifier:i,date:r.startDate})),r.scheduledDate&&l.createDiv().setText(Ks({signifier:a,date:r.scheduledDate})),r.dueDate&&l.createDiv().setText(Ks({signifier:o,date:r.dueDate})),r.doneDate&&l.createDiv().setText(Ks({signifier:u,date:r.doneDate}));let c=r.getLinkText({isFilenameUnique:t});c&&l.createDiv().setText(`\u{1F517} ${c}`),e.addEventListener("mouseleave",()=>{l.remove()})})}function Ks({signifier:r,date:e}){return`${r} ${e.format(H.dateFormat)} (${e.from(window.moment().startOf("day"))})`}var Et=class{static fromPath(e){let{useFilenameAsScheduledDate:t,filenameAsDateFolders:n}=X();return!t||!this.matchesAnyFolder(n,e)?null:this.extractDateFromPath(e)}static matchesAnyFolder(e,t){return e.length===0?!0:e.some(n=>t.startsWith(n+"/"))}static extractDateFromPath(e){let t=Math.max(0,e.lastIndexOf("/")+1),n=e.lastIndexOf("."),i=e.substring(t,n),s=/(\d{4})-(\d{2})-(\d{2})/.exec(i);if(s||(s=/(\d{4})(\d{2})(\d{2})/.exec(i)),s){let a=window.moment([parseInt(s[1]),parseInt(s[2])-1,parseInt(s[3])]);if(a.isValid())return a}return null}static canApplyFallback({startDate:e,scheduledDate:t,dueDate:n}){return e===null&&n===null&&t===null}static updateTaskPath(e,t,n){let i=e.scheduledDate,s=e.scheduledDateIsInferred;return n===null?s&&(s=!1,i=null):s?i=n:this.canApplyFallback(e)&&(i=n,s=!0),new Oe(Dt(ge({},e),{taskLocation:e.taskLocation.fromRenamedFile(t),scheduledDate:i,scheduledDateIsInferred:s}))}static removeInferredStatusIfNeeded(e,t){let n=e.scheduledDateIsInferred?e.scheduledDate:null;return t.map(i=>(n!==null&&!n.isSame(i.scheduledDate,"day")&&(i=new Oe(Dt(ge({},i),{scheduledDateIsInferred:!1}))),i))}};var Ar=class{constructor(e){this._date=null;this._date=e}get moment(){return this._date}formatAsDate(e=""){return this.format(H.dateFormat,e)}formatAsDateAndTime(e=""){return this.format(H.dateTimeFormat,e)}format(e,t=""){return this._date?this._date.format(e):t}toISOString(e){return this._date?this._date.toISOString(e):""}};var vo=class{constructor(e){this._path=e}get path(){return this._path}get root(){let e=this.path.replace(/\\/g,"/");e.charAt(0)==="/"&&(e=e.substring(1));let t=e.indexOf("/");return t==-1?"/":e.substring(0,t+1)}get folder(){let e=this.path,t=this.filename,n=e.substring(0,e.lastIndexOf(t));return n===""?"/":n}get filename(){let e=this.path.match(/([^/]+)$/);return e!==null?e[1]:""}};var tn=class{static priorityNameUsingNone(e){let t="ERROR";switch(e){case"1":t="High";break;case"0":t="Highest";break;case"2":t="Medium";break;case"3":t="None";break;case"4":t="Low";break;case"5":t="Lowest";break}return t}static priorityNameUsingNormal(e){return tn.priorityNameUsingNone(e).replace("None","Normal")}};var Pt=class{},H=Pt;H.dateFormat="YYYY-MM-DD",H.dateTimeFormat="YYYY-MM-DD HH:mm",H.indentationRegex=/^([\s\t>]*)/,H.listMarkerRegex=/([-*]|[0-9]+\.)/,H.checkboxRegex=/\[(.)\]/u,H.afterCheckboxRegex=/ *(.*)/u,H.taskRegex=new RegExp(Pt.indentationRegex.source+Pt.listMarkerRegex.source+" +"+Pt.checkboxRegex.source+Pt.afterCheckboxRegex.source,"u"),H.nonTaskRegex=new RegExp(Pt.indentationRegex.source+Pt.listMarkerRegex.source+"? *("+Pt.checkboxRegex.source+")?"+Pt.afterCheckboxRegex.source,"u"),H.listItemRegex=new RegExp(Pt.indentationRegex.source+Pt.listMarkerRegex.source),H.blockLinkRegex=/ \^[a-zA-Z0-9-]+$/u,H.hashTags=/(^|\s)#[^ !@#$%^&*(),.?":{}|<>]*/g,H.hashTagsFromEnd=new RegExp(Pt.hashTags.source+"$");var Oe=class{constructor({status:e,description:t,taskLocation:n,indentation:i,listMarker:s,priority:a,createdDate:o,startDate:u,scheduledDate:l,dueDate:c,doneDate:f,recurrence:m,blockLink:T,tags:y,originalMarkdown:w,scheduledDateIsInferred:R}){this._urgency=null;this.status=e,this.description=t,this.indentation=i,this.listMarker=s,this.taskLocation=n,this.tags=y,this.priority=a,this.createdDate=o,this.startDate=u,this.scheduledDate=l,this.dueDate=c,this.doneDate=f,this.recurrence=m,this.blockLink=T,this.originalMarkdown=w,this.scheduledDateIsInferred=R}static fromLine({line:e,taskLocation:t,fallbackDate:n}){let i=e.match(H.taskRegex);if(i===null)return null;let s=i[4].trim();if(!ve.includedIn(s))return null;let a=s,o=i[1],u=i[2],l=i[3],c=Se.getInstance().bySymbolOrCreate(l),f=a.match(H.blockLinkRegex),m=f!==null?f[0]:"";m!==""&&(a=a.replace(H.blockLinkRegex,"").trim());let{taskSerializer:T}=Gs(),y=T.deserialize(a),w=!1;return Et.canApplyFallback(y)&&n!==null&&(y.scheduledDate=n,w=!0),y.tags=y.tags.map(R=>R.trim()),y.tags=y.tags.filter(R=>!ve.equals(R)),new Oe(Dt(ge({},y),{status:c,indentation:o,listMarker:u,taskLocation:t,blockLink:m,originalMarkdown:e,scheduledDateIsInferred:w}))}toLi(e){return W(this,null,function*(){return nT(this,e)})}toString(){return Gs().taskSerializer.serialize(this)}toFileLineString(){return`${this.indentation}${this.listMarker} [${this.status.symbol}] ${this.toString()}`}toggle(){let e=Se.getInstance().getNextStatusOrCreate(this.status),t=null,n=null;if(e.isCompleted()){let{setDoneDate:a}=X();a&&(t=window.moment()),this.recurrence!==null&&(n=this.recurrence.next())}let i=new Oe(Dt(ge({},this),{status:e,doneDate:t})),s=[];if(n!==null){let{setCreatedDate:a}=X(),o=null;a&&(o=window.moment());let u=Se.getInstance().getNextStatusOrCreate(e),l=new Oe(Dt(ge(ge({},this),n),{status:u,blockLink:"",createdDate:o}));s.push(l)}return s.push(i),s}toggleWithRecurrenceInUsersOrder(){let e=this.toggle(),{recurrenceOnNextLine:t}=X();return t?e.reverse():e}get isDone(){return this.status.type==="DONE"||this.status.type==="CANCELLED"||this.status.type==="NON_TASK"}get priorityNumber(){return Number.parseInt(this.priority)}get priorityName(){return tn.priorityNameUsingNormal(this.priority)}get urgency(){return this._urgency===null&&(this._urgency=xr.calculate(this)),this._urgency}get path(){return this.taskLocation.path}get created(){return new Ar(this.createdDate)}get done(){return new Ar(this.doneDate)}get due(){return new Ar(this.dueDate)}get scheduled(){return new Ar(this.scheduledDate)}get start(){return new Ar(this.startDate)}get happensDates(){return Array.of(this.startDate,this.scheduledDate,this.dueDate)}get happens(){let t=this.happensDates.sort(Rr);return new Ar(t[0])}get isRecurring(){return this.recurrence!==null}get recurrenceRule(){return this.recurrence?this.recurrence.toText():""}get heading(){return this.precedingHeader}get hasHeading(){return this.precedingHeader!==null}get file(){return new vo(this.path)}get filename(){let e=this.path.match(/([^/]+)\.md$/);return e!==null?e[1]:null}get lineNumber(){return this.taskLocation.lineNumber}get sectionStart(){return this.taskLocation.sectionStart}get sectionIndex(){return this.taskLocation.sectionIndex}get precedingHeader(){return this.taskLocation.precedingHeader}getLinkText({isFilenameUnique:e}){let t;return e?t=this.filename:t="/"+this.path,t===null?null:(this.precedingHeader!==null&&this.precedingHeader!==t&&(t=t+" > "+this.precedingHeader),t)}static tasksListsIdentical(e,t){return e.length!==t.length?!1:e.every((n,i)=>n.identicalTo(t[i]))}identicalTo(e){let t=["description","path","indentation","listMarker","lineNumber","sectionStart","sectionIndex","precedingHeader","priority","blockLink","scheduledDateIsInferred"];for(let s of t)if(this[s]!==e[s])return!1;if(!this.status.identicalTo(e.status)||this.tags.length!==e.tags.length||!this.tags.every(function(s,a){return s===e.tags[a]}))return!1;t=["createdDate","startDate","scheduledDate","dueDate","doneDate"];for(let s of t){let a=this[s],o=e[s];if(Rr(a,o)!==0)return!1}let n=this.recurrence,i=e.recurrence;return n===null&&i!==null||n!==null&&i===null?!1:!(n&&i&&!n.identicalTo(i))}static extractHashtags(e){var t,n;return(n=(t=e.match(H.hashTags))==null?void 0:t.map(i=>i.trim()))!=null?n:[]}};var Vs=class{constructor(e){this.fetch=e;this._value=void 0}get value(){return this._value===void 0&&(this._value=this.fetch()),this._value}};var ot=class{constructor(e,t,n,i,s){this._path=e,this._lineNumber=t,this._sectionStart=n,this._sectionIndex=i,this._precedingHeader=s}static fromUnknownPosition(e){return new ot(e,0,0,0,null)}fromRenamedFile(e){return new ot(e,this.lineNumber,this.sectionStart,this.sectionIndex,this.precedingHeader)}get path(){return this._path}get lineNumber(){return this._lineNumber}get sectionStart(){return this._sectionStart}get sectionIndex(){return this._sectionIndex}get precedingHeader(){return this._precedingHeader}};var On=class{constructor({metadataCache:e,vault:t,events:n}){this.metadataCache=e,this.metadataCacheEventReferences=[],this.vault=t,this.vaultEventReferences=[],this.events=n,this.eventsEventReferences=[],this.tasksMutex=new pa,this.state="Cold",this.tasks=[],this.loadedAfterFirstResolve=!1,this.subscribeToCache(),this.subscribeToVault(),this.subscribeToEvents(),this.loadVault()}unload(){for(let e of this.metadataCacheEventReferences)this.metadataCache.offref(e);for(let e of this.vaultEventReferences)this.vault.offref(e);for(let e of this.eventsEventReferences)this.events.off(e)}getTasks(){return this.tasks}getState(){return this.state}notifySubscribers(){this.events.triggerCacheUpdate({tasks:this.tasks,state:this.state})}subscribeToCache(){let e=this.metadataCache.on("resolved",()=>W(this,null,function*(){this.loadedAfterFirstResolve||(this.loadedAfterFirstResolve=!0,this.loadVault())}));this.metadataCacheEventReferences.push(e);let t=this.metadataCache.on("changed",n=>{this.tasksMutex.runExclusive(()=>{this.indexFile(n)})});this.metadataCacheEventReferences.push(t)}subscribeToVault(){let{useFilenameAsScheduledDate:e}=X(),t=this.vault.on("create",s=>{s instanceof ci.TFile&&this.tasksMutex.runExclusive(()=>{this.indexFile(s)})});this.vaultEventReferences.push(t);let n=this.vault.on("delete",s=>{s instanceof ci.TFile&&this.tasksMutex.runExclusive(()=>{this.tasks=this.tasks.filter(a=>a.path!==s.path),this.notifySubscribers()})});this.vaultEventReferences.push(n);let i=this.vault.on("rename",(s,a)=>{s instanceof ci.TFile&&this.tasksMutex.runExclusive(()=>{let o=new Vs(()=>Et.fromPath(s.path));this.tasks=this.tasks.map(u=>u.path===a?e?Et.updateTaskPath(u,s.path,o.value):new Oe(Dt(ge({},u),{taskLocation:u.taskLocation.fromRenamedFile(s.path)})):u),this.notifySubscribers()})});this.vaultEventReferences.push(i)}subscribeToEvents(){let e=this.events.onRequestCacheUpdate(t=>{t({tasks:this.tasks,state:this.state})});this.eventsEventReferences.push(e)}loadVault(){return this.tasksMutex.runExclusive(()=>W(this,null,function*(){this.state="Initializing",yield Promise.all(this.vault.getMarkdownFiles().map(e=>this.indexFile(e))),this.state="Warm",this.notifySubscribers()}))}indexFile(e){return W(this,null,function*(){let t=this.metadataCache.getFileCache(e);if(t==null)return;let n=this.tasks.filter(a=>a.path===e.path),i=t.listItems,s=[];if(i!==void 0){let a=yield this.vault.cachedRead(e);s=this.getTasksFromFileContent(a,i,t,e)}Oe.tasksListsIdentical(n,s)||(this.getState()=="Warm"&&console.debug(`At least one task, its line number or its heading has changed in ${e.path}: triggering a refresh of all active Tasks blocks in Live Preview and Reading mode views.`),this.tasks=this.tasks.filter(a=>a.path!==e.path),this.tasks.push(...s),this.notifySubscribers())})}getTasksFromFileContent(e,t,n,i){let s=[],a=e.split(`
`),o=a.length,u=new Vs(()=>Et.fromPath(i.path)),l=null,c=0;for(let f of t)if(f.task!==void 0){let m=f.position.start.line;if(m>=o)return console.log(`${i.path} Obsidian gave us a line number ${m} past the end of the file. ${o}.`),s;if((l===null||l.position.end.line<m)&&(l=On.getSection(m,n.sections),c=0),l===null)continue;let T=a[m];if(T===void 0){console.log(`${i.path}: line ${m} - ignoring 'undefined' line.`);continue}let y;try{y=Oe.fromLine({line:T,taskLocation:new ot(i.path,m,l.position.start.line,c,On.getPrecedingHeader(m,n.headings)),fallbackDate:u.value})}catch(w){this.reportTaskParsingErrorToUser(w,i,f,T);continue}y!==null&&(c++,s.push(y))}return s}reportTaskParsingErrorToUser(e,t,n,i){let s=`There was an error reading one of the tasks in this vault.
The following task has been ignored, to prevent Tasks queries getting stuck with 'Loading Tasks ...'
Error: ${e}
File: ${t.path}
Line number: ${n.position.start.line}
Task line: ${i}
Please create a bug report for this message at
https://github.com/obsidian-tasks-group/obsidian-tasks/issues/new/choose
to help us find and fix the underlying issue.
Include:
- either a screenshot of the error popup, or copy the text from the console, if on a desktop machine.
- the output from running the Obsidian command 'Show debug info'
The error popup will only be shown when Tasks is starting up, but if the error persists,
it will be shown in the console every time this file is edited during the Obsidian
session.
`;console.error(s),e instanceof Error&&console.error(e.stack),this.state==="Initializing"&&new ci.Notice(s,1e4)}static getSection(e,t){if(t===void 0)return null;for(let n of t)if(n.position.start.line<=e&&n.position.end.line>=e)return n;return null}static getPrecedingHeader(e,t){if(t===void 0)return null;let n=null;for(let i of t){if(i.position.start.line>e)return n;n=i.heading}return n}};var Af=require("obsidian");var wT=require("obsidian");function Pr(){}function Ef(r){return r()}function sT(){return Object.create(null)}function Rn(r){r.forEach(Ef)}function wo(r){return typeof r=="function"}function oT(r,e){return r!=r?e==e:r!==e||r&&typeof r=="object"||typeof r=="function"}function uT(r){return Object.keys(r).length===0}var lT=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global,Qs=class{constructor(e){this.options=e,this._listeners="WeakMap"in lT?new WeakMap:void 0}observe(e,t){return this._listeners.set(e,t),this._getObserver().observe(e,this.options),()=>{this._listeners.delete(e),this._observer.unobserve(e)}}_getObserver(){var e;return(e=this._observer)!==null&&e!==void 0?e:this._observer=new ResizeObserver(t=>{var n;for(let i of t)Qs.entries.set(i.target,i),(n=this._listeners.get(i.target))===null||n===void 0||n(i)})}};Qs.entries="WeakMap"in lT?new WeakMap:void 0;var cT=!1;function Ax(){cT=!0}function Px(){cT=!1}function M(r,e){r.appendChild(e)}function mi(r,e,t){r.insertBefore(e,t||null)}function Mn(r){r.parentNode&&r.parentNode.removeChild(r)}function kf(r,e){for(let t=0;t<r.length;t+=1)r[t]&&r[t].d(e)}function K(r){return document.createElement(r)}function Cx(r){return document.createElementNS("http://www.w3.org/2000/svg",r)}function dt(r){return document.createTextNode(r)}function de(){return dt(" ")}function _t(r,e,t,n){return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}function dT(r){return function(e){return e.preventDefault(),r.call(this,e)}}function N(r,e,t){t==null?r.removeAttribute(e):r.getAttribute(e)!==t&&r.setAttribute(e,t)}function fT(r){let e;return{p(...t){e=t,e.forEach(n=>r.push(n))},r(){e.forEach(t=>r.splice(r.indexOf(t),1))}}}function Nx(r){return Array.from(r.childNodes)}function Df(r,e){e=""+e,r.data!==e&&(r.data=e)}function rr(r,e){r.value=e==null?"":e}function Of(r,e,t){for(let n=0;n<r.options.length;n+=1){let i=r.options[n];if(i.__value===e){i.selected=!0;return}}(!t||e!==void 0)&&(r.selectedIndex=-1)}function pT(r){let e=r.querySelector(":checked");return e&&e.__value}function nr(r,e,t){r.classList[t?"add":"remove"](e)}var Sn=class{constructor(e=!1){this.is_svg=!1,this.is_svg=e,this.e=this.n=null}c(e){this.h(e)}m(e,t,n=null){this.e||(this.is_svg?this.e=Cx(t.nodeName):this.e=K(t.nodeType===11?"TEMPLATE":t.nodeName),this.t=t.tagName!=="TEMPLATE"?t:t.content,this.c(e)),this.i(n)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.nodeName==="TEMPLATE"?this.e.content.childNodes:this.e.childNodes)}i(e){for(let t=0;t<this.n.length;t+=1)mi(this.t,this.n[t],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(Mn)}};var Zs;function Xs(r){Zs=r}function Ix(){if(!Zs)throw new Error("Function called outside component initialization");return Zs}function Sf(r){Ix().$$.on_mount.push(r)}var fi=[];var Eo=[],pi=[],aT=[],Fx=Promise.resolve(),wf=!1;function Lx(){wf||(wf=!0,Fx.then(mT))}function Js(r){pi.push(r)}var vf=new Set,di=0;function mT(){if(di!==0)return;let r=Zs;do{try{for(;di<fi.length;){let e=fi[di];di++,Xs(e),Ux(e.$$)}}catch(e){throw fi.length=0,di=0,e}for(Xs(null),fi.length=0,di=0;Eo.length;)Eo.pop()();for(let e=0;e<pi.length;e+=1){let t=pi[e];vf.has(t)||(vf.add(t),t())}pi.length=0}while(fi.length);for(;aT.length;)aT.pop()();wf=!1,vf.clear(),Xs(r)}function Ux(r){if(r.fragment!==null){r.update(),Rn(r.before_update);let e=r.dirty;r.dirty=[-1],r.fragment&&r.fragment.p(r.ctx,e),r.after_update.forEach(Js)}}function Wx(r){let e=[],t=[];pi.forEach(n=>r.indexOf(n)===-1?e.push(n):t.push(n)),t.forEach(n=>n()),pi=e}var qx=new Set;function Yx(r,e){r&&r.i&&(qx.delete(r),r.i(e))}var $x=["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"],v2=new Set([...$x]);function jx(r,e,t,n){let{fragment:i,after_update:s}=r.$$;i&&i.m(e,t),n||Js(()=>{let a=r.$$.on_mount.map(Ef).filter(wo);r.$$.on_destroy?r.$$.on_destroy.push(...a):Rn(a),r.$$.on_mount=[]}),s.forEach(Js)}function hT(r,e){let t=r.$$;t.fragment!==null&&(Wx(t.after_update),Rn(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function Gx(r,e){r.$$.dirty[0]===-1&&(fi.push(r),Lx(),r.$$.dirty.fill(0)),r.$$.dirty[e/31|0]|=1<<e%31}function gT(r,e,t,n,i,s,a,o=[-1]){let u=Zs;Xs(r);let l=r.$$={fragment:null,ctx:[],props:s,update:Pr,not_equal:i,bound:sT(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(u?u.$$.context:[])),callbacks:sT(),dirty:o,skip_bound:!1,root:e.target||u.$$.root};a&&a(l.root);let c=!1;if(l.ctx=t?t(r,e.props||{},(f,m,...T)=>{let y=T.length?T[0]:m;return l.ctx&&i(l.ctx[f],l.ctx[f]=y)&&(!l.skip_bound&&l.bound[f]&&l.bound[f](y),c&&Gx(r,f)),m}):[],l.update(),c=!0,Rn(l.before_update),l.fragment=n?n(l.ctx):!1,e.target){if(e.hydrate){Ax();let f=Nx(e.target);l.fragment&&l.fragment.l(f),f.forEach(Mn)}else l.fragment&&l.fragment.c();e.intro&&Yx(r.$$.fragment),jx(r,e.target,e.anchor,e.customElement),Px(),mT()}Xs(u)}var Bx;typeof HTMLElement=="function"&&(Bx=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){let{on_mount:r}=this.$$;this.$$.on_disconnect=r.map(Ef).filter(wo);for(let e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(r,e,t){this[r]=t}disconnectedCallback(){Rn(this.$$.on_disconnect)}$destroy(){hT(this,1),this.$destroy=Pr}$on(r,e){if(!wo(e))return Pr;let t=this.$$.callbacks[r]||(this.$$.callbacks[r]=[]);return t.push(e),()=>{let n=t.indexOf(e);n!==-1&&t.splice(n,1)}}$set(r){this.$$set&&!uT(r)&&(this.$$.skip_bound=!0,this.$$set(r),this.$$.skip_bound=!1)}});var ko=class{$destroy(){hT(this,1),this.$destroy=Pr}$on(e,t){if(!wo(t))return Pr;let n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{let i=n.indexOf(t);i!==-1&&n.splice(i,1)}}$set(e){this.$$set&&!uT(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}};var Mf=Fi(Be());function yT(r,e,t){let n=r.slice();return n[45]=e[t],n}function _T(r,e,t){let n=r.slice();return n[48]=e[t].value,n[49]=e[t].label,n[50]=e[t].symbol,n[51]=e[t].accessKey,n[52]=e[t].accessKeyIndex,n}function Hx(r){let e,t=r[50]+"",n;return{c(){e=K("span"),n=dt(t)},m(i,s){mi(i,e,s),M(e,n)},p:Pr,d(i){i&&Mn(e)}}}function TT(r){let e,t,n,i,s,a,o,u,l=r[49].substring(0,r[52])+"",c,f,m=r[49].substring(r[52],r[52]+1)+"",T,y,w=r[49].substring(r[52]+1)+"",R,L,q=r[50]&&r[50].charCodeAt(0)>=256,U,ne,te,Te,G,V=q&&Hx(r);return te=fT(r[33][0]),{c(){e=K("span"),t=K("input"),a=de(),o=K("label"),u=K("span"),c=dt(l),f=K("span"),T=dt(m),y=K("span"),R=dt(w),L=de(),V&&V.c(),ne=de(),N(t,"type","radio"),N(t,"id",n="priority-"+r[48]),t.__value=i=r[48],t.value=t.__value,N(t,"accesskey",s=r[15](r[51])),N(f,"class","accesskey"),N(o,"for",U="priority-"+r[48]),te.p(t)},m(Ce,Fe){mi(Ce,e,Fe),M(e,t),t.checked=t.__value===r[1].priority,M(e,a),M(e,o),M(o,u),M(u,c),M(o,f),M(f,T),M(o,y),M(y,R),M(o,L),V&&V.m(o,null),M(e,ne),Te||(G=_t(t,"change",r[32]),Te=!0)},p(Ce,Fe){Fe[0]&32768&&s!==(s=Ce[15](Ce[51]))&&N(t,"accesskey",s),Fe[0]&3&&(t.checked=t.__value===Ce[1].priority),q&&V.p(Ce,Fe)},d(Ce){Ce&&Mn(e),V&&V.d(),te.r(),Te=!1,G()}}}function bT(r){let e,t=r[45].name+"",n,i,s=r[45].symbol+"",a,o,u;return{c(){e=K("option"),n=dt(t),i=dt(" ["),a=dt(s),o=dt("]"),e.__value=u=r[45],e.value=e.__value},m(l,c){mi(l,e,c),M(e,n),M(e,i),M(e,a),M(e,o)},p(l,c){c[0]&1&&t!==(t=l[45].name+"")&&Df(n,t),c[0]&1&&s!==(s=l[45].symbol+"")&&Df(a,s),c[0]&1&&u!==(u=l[45])&&(e.__value=u,e.value=e.__value)},d(l){l&&Mn(e)}}}function zx(r){let e,t,n,i,s,a,o,u,l,c,f,m,T,y,w,R,L,q,U,ne,te,Te,G,V,Ce,Fe,j,A,E,B,P,Q,d,p,h,g,_,v,k,S,D,O,C,pe,se,ee,De,I,xe,Pe,rt,gr,We,Le,Kf,Mi,ia,Vf,sr,sa,Xf,Un,aa,Qf,Ft,oa,Zf,Wr,xi,ua,Jf,qr,la,ep,Ai,uu,tp,ca,rp,Pi,lu,np,da,ip,Wn,un,sp,fa,ap,Ci,cu,op,qn=r[20],pt=[];for(let $=0;$<qn.length;$+=1)pt[$]=TT(_T(r,qn,$));let Yn=r[0],mt=[];for(let $=0;$<Yn.length;$+=1)mt[$]=bT(yT(r,Yn,$));return{c(){e=K("div"),t=K("form"),n=K("div"),i=K("label"),i.innerHTML='Descrip<span class="accesskey">t</span>ion',s=de(),a=K("textarea"),u=de(),l=K("div"),c=K("label"),f=dt("Priority"),T=de();for(let $=0;$<pt.length;$+=1)pt[$].c();y=de(),w=K("div"),R=K("label"),R.textContent="Recurs",L=de(),q=K("input"),ne=de(),te=K("code"),Te=dt(r[16]),G=de(),V=new Sn(!1),Ce=de(),Fe=K("label"),Fe.textContent="Due",j=de(),A=K("input"),B=de(),P=K("code"),Q=dt(r[19]),d=de(),p=new Sn(!1),h=de(),g=K("label"),g.textContent="Scheduled",_=de(),v=K("input"),S=de(),D=K("code"),O=dt(r[18]),C=de(),pe=new Sn(!1),se=de(),ee=K("label"),ee.innerHTML='St<span class="accesskey">a</span>rt',De=de(),I=K("input"),Pe=de(),rt=K("code"),gr=dt(r[17]),We=de(),Le=new Sn(!1),Kf=de(),Mi=K("div"),ia=K("label"),ia.innerHTML=`Only
<span class="accesskey-first">future</span> dates:`,Vf=de(),sr=K("input"),Xf=de(),Un=K("div"),aa=K("label"),aa.innerHTML='Stat<span class="accesskey">u</span>s',Qf=de(),Ft=K("select");for(let $=0;$<mt.length;$+=1)mt[$].c();Zf=de(),Wr=K("div"),xi=K("div"),ua=K("label"),ua.textContent="Completed:",Jf=de(),qr=K("input"),ep=de(),Ai=K("div"),uu=K("span"),uu.textContent="Created on:",tp=de(),ca=K("code"),rp=de(),Pi=K("div"),lu=K("span"),lu.textContent="Done on:",np=de(),da=K("code"),ip=de(),Wn=K("div"),un=K("button"),sp=dt("Apply"),ap=de(),Ci=K("button"),Ci.textContent="Cancel",N(i,"for","description"),N(a,"id","description"),N(a,"type","text"),N(a,"class","tasks-modal-description"),N(a,"placeholder","Take out the trash"),N(a,"accesskey",o=r[15]("t")),N(n,"class","tasks-modal-section"),N(c,"for",m="priority-"+r[1].priority),N(l,"class","tasks-modal-section tasks-modal-priorities"),N(R,"for","recurrence"),N(R,"class","accesskey-first"),N(q,"id","recurrence"),N(q,"type","text"),N(q,"placeholder","Try 'every 2 weeks on Thursday'."),N(q,"accesskey",U=r[15]("r")),nr(q,"tasks-modal-error",!r[8]),V.a=null,N(Fe,"for","due"),N(Fe,"class","accesskey-first"),N(A,"id","due"),N(A,"type","text"),N(A,"placeholder",Rf),N(A,"accesskey",E=r[15]("d")),nr(A,"tasks-modal-error",!r[7]),p.a=null,N(g,"for","scheduled"),N(g,"class","accesskey-first"),N(v,"id","scheduled"),N(v,"type","text"),N(v,"placeholder",Rf),N(v,"accesskey",k=r[15]("s")),nr(v,"tasks-modal-error",!r[5]),pe.a=null,N(ee,"for","start"),N(I,"id","start"),N(I,"type","text"),N(I,"placeholder",Rf),N(I,"accesskey",xe=r[15]("a")),nr(I,"tasks-modal-error",!r[3]),Le.a=null,N(ia,"for","forwardOnly"),N(sr,"id","forwardOnly"),N(sr,"type","checkbox"),N(sr,"class","task-list-item-checkbox tasks-modal-checkbox"),N(sr,"accesskey",sa=r[15]("f")),N(w,"class","tasks-modal-section tasks-modal-dates"),N(aa,"for","status"),N(Ft,"id","status-type"),N(Ft,"class","dropdown"),N(Ft,"accesskey",oa=r[15]("u")),r[1].status===void 0&&Js(()=>r[39].call(Ft)),N(Un,"class","tasks-modal-section"),N(ua,"for","status"),N(qr,"id","status"),N(qr,"type","checkbox"),N(qr,"class","task-list-item-checkbox tasks-modal-checkbox"),qr.checked=la=r[1].status.isCompleted(),qr.disabled=!0,N(Wr,"class","tasks-modal-section tasks-modal-status"),un.disabled=fa=!r[14],N(un,"type","submit"),N(un,"class","mod-cta"),N(Ci,"type","button"),N(Wn,"class","tasks-modal-section tasks-modal-buttons"),nr(t,"with-accesskeys",r[9]),N(e,"class","tasks-modal")},m($,fe){mi($,e,fe),M(e,t),M(t,n),M(n,i),M(n,s),M(n,a),rr(a,r[1].description),r[31](a),M(t,u),M(t,l),M(l,c),M(c,f),M(l,T);for(let le=0;le<pt.length;le+=1)pt[le]&&pt[le].m(l,null);M(t,y),M(t,w),M(w,R),M(w,L),M(w,q),rr(q,r[1].recurrenceRule),M(w,ne),M(w,te),M(te,Te),M(te,G),V.m(r[12],te),M(w,Ce),M(w,Fe),M(w,j),M(w,A),rr(A,r[1].dueDate),M(w,B),M(w,P),M(P,Q),M(P,d),p.m(r[6],P),M(w,h),M(w,g),M(w,_),M(w,v),rr(v,r[1].scheduledDate),M(w,S),M(w,D),M(D,O),M(D,C),pe.m(r[4],D),M(w,se),M(w,ee),M(w,De),M(w,I),rr(I,r[1].startDate),M(w,Pe),M(w,rt),M(rt,gr),M(rt,We),Le.m(r[2],rt),M(w,Kf),M(w,Mi),M(Mi,ia),M(Mi,Vf),M(Mi,sr),sr.checked=r[1].forwardOnly,M(t,Xf),M(t,Un),M(Un,aa),M(Un,Qf),M(Un,Ft);for(let le=0;le<mt.length;le+=1)mt[le]&&mt[le].m(Ft,null);Of(Ft,r[1].status,!0),M(t,Zf),M(t,Wr),M(Wr,xi),M(xi,ua),M(xi,Jf),M(xi,qr),M(Wr,ep),M(Wr,Ai),M(Ai,uu),M(Ai,tp),M(Ai,ca),ca.innerHTML=r[11],M(Wr,rp),M(Wr,Pi),M(Pi,lu),M(Pi,np),M(Pi,da),da.innerHTML=r[13],M(t,ip),M(t,Wn),M(Wn,un),M(un,sp),M(Wn,ap),M(Wn,Ci),cu||(op=[_t(a,"input",r[30]),_t(a,"keydown",r[23]),_t(a,"paste",r[24]),_t(a,"drop",r[24]),_t(l,"keyup",r[21]),_t(q,"input",r[34]),_t(A,"input",r[35]),_t(v,"input",r[36]),_t(I,"input",r[37]),_t(sr,"change",r[38]),_t(Ft,"change",r[39]),_t(Ci,"click",r[22]),_t(t,"submit",dT(r[25]))],cu=!0)},p($,fe){if(fe[0]&32768&&o!==(o=$[15]("t"))&&N(a,"accesskey",o),fe[0]&3&&rr(a,$[1].description),fe[0]&3&&m!==(m="priority-"+$[1].priority)&&N(c,"for",m),fe[0]&1081346){qn=$[20];let le;for(le=0;le<qn.length;le+=1){let Ni=_T($,qn,le);pt[le]?pt[le].p(Ni,fe):(pt[le]=TT(Ni),pt[le].c(),pt[le].m(l,null))}for(;le<pt.length;le+=1)pt[le].d(1);pt.length=qn.length}if(fe[0]&32768&&U!==(U=$[15]("r"))&&N(q,"accesskey",U),fe[0]&3&&q.value!==$[1].recurrenceRule&&rr(q,$[1].recurrenceRule),fe[0]&256&&nr(q,"tasks-modal-error",!$[8]),fe[0]&4096&&V.p($[12]),fe[0]&32768&&E!==(E=$[15]("d"))&&N(A,"accesskey",E),fe[0]&3&&A.value!==$[1].dueDate&&rr(A,$[1].dueDate),fe[0]&128&&nr(A,"tasks-modal-error",!$[7]),fe[0]&64&&p.p($[6]),fe[0]&32768&&k!==(k=$[15]("s"))&&N(v,"accesskey",k),fe[0]&3&&v.value!==$[1].scheduledDate&&rr(v,$[1].scheduledDate),fe[0]&32&&nr(v,"tasks-modal-error",!$[5]),fe[0]&16&&pe.p($[4]),fe[0]&32768&&xe!==(xe=$[15]("a"))&&N(I,"accesskey",xe),fe[0]&3&&I.value!==$[1].startDate&&rr(I,$[1].startDate),fe[0]&8&&nr(I,"tasks-modal-error",!$[3]),fe[0]&4&&Le.p($[2]),fe[0]&32768&&sa!==(sa=$[15]("f"))&&N(sr,"accesskey",sa),fe[0]&3&&(sr.checked=$[1].forwardOnly),fe[0]&1){Yn=$[0];let le;for(le=0;le<Yn.length;le+=1){let Ni=yT($,Yn,le);mt[le]?mt[le].p(Ni,fe):(mt[le]=bT(Ni),mt[le].c(),mt[le].m(Ft,null))}for(;le<mt.length;le+=1)mt[le].d(1);mt.length=Yn.length}fe[0]&32768&&oa!==(oa=$[15]("u"))&&N(Ft,"accesskey",oa),fe[0]&3&&Of(Ft,$[1].status),fe[0]&3&&la!==(la=$[1].status.isCompleted())&&(qr.checked=la),fe[0]&2048&&(ca.innerHTML=$[11]),fe[0]&8192&&(da.innerHTML=$[13]),fe[0]&16384&&fa!==(fa=!$[14])&&(un.disabled=fa),fe[0]&512&&nr(t,"with-accesskeys",$[9])},i:Pr,o:Pr,d($){$&&Mn(e),r[31](null),kf(pt,$),kf(mt,$),cu=!1,Rn(op)}}}var Rf="Try 'Monday' or 'tomorrow', or [td|tm|yd|tw|nw|we] then space.";function Kx(r,e,t){let n;var i;let{task:s}=e,{onSubmit:a}=e,{statusOptions:o}=e,{prioritySymbols:u,recurrenceSymbol:l,startDateSymbol:c,scheduledDateSymbol:f,dueDateSymbol:m}=Mr.tasksPluginEmoji.taskSerializer.symbols,T,y={description:"",status:J.TODO,priority:"none",recurrenceRule:"",createdDate:"",startDate:"",scheduledDate:"",dueDate:"",doneDate:"",forwardOnly:!0},w=!0,R="",L="",q=!0,U="",ne=!0,te="",Te=!0,G="",V=!0,Ce="",Fe=!1,j=!0,A=!0,E=[{value:"lowest",label:"Lowest",symbol:u.Lowest,accessKey:"o",accessKeyIndex:1},{value:"low",label:"Low",symbol:u.Low,accessKey:"l",accessKeyIndex:0},{value:"none",label:"Normal",symbol:u.None,accessKey:"n",accessKeyIndex:0},{value:"medium",label:"Medium",symbol:u.Medium,accessKey:"m",accessKeyIndex:0},{value:"high",label:"High",symbol:u.High,accessKey:"h",accessKeyIndex:0},{value:"highest",label:"Highest",symbol:u.Highest,accessKey:"i",accessKeyIndex:1}];function B(I,xe,Pe=void 0){if(!xe)return`<i>no ${I} date</i>`;let rt=Mf.parseDate(xe,Pe,{forwardDate:Pe!=null});return rt!==null?window.moment(rt).format("YYYY-MM-DD"):`<i>invalid ${I} date</i>`}function P(I,xe){return B(I,xe,y.forwardOnly?new Date:void 0)}function Q(I){let xe=null,Pe=Mf.parseDate(I,new Date,{forwardDate:y.forwardOnly});return Pe!==null&&(xe=window.moment(Pe)),xe}Sf(()=>{let{provideAccessKeys:I}=X();t(9,j=I);let xe=ve.removeAsWordFrom(s.description);(xe!=s.description||!ve.includedIn(s.description))&&(Fe=!0);let Pe="none";s.priority==="5"?Pe="lowest":s.priority==="4"?Pe="low":s.priority==="2"?Pe="medium":s.priority==="1"?Pe="high":s.priority==="0"&&(Pe="highest"),t(1,y={description:xe,status:s.status,priority:Pe,recurrenceRule:s.recurrence?s.recurrence.toText():"",createdDate:s.createdDate?s.createdDate.format("YYYY-MM-DD"):"",startDate:s.startDate?s.startDate.format("YYYY-MM-DD"):"",scheduledDate:s.scheduledDate?s.scheduledDate.format("YYYY-MM-DD"):"",dueDate:s.dueDate?s.dueDate.format("YYYY-MM-DD"):"",doneDate:s.doneDate?s.doneDate.format("YYYY-MM-DD"):"",forwardOnly:!0}),setTimeout(()=>{T.focus()},10)});let d=I=>{if(I.key&&!I.altKey&&!I.ctrlKey){let xe=E.find(Pe=>Pe.label.charAt(0).toLowerCase()==I.key);xe&&t(1,y.priority=xe.value,y)}},p=()=>{a([])},h=I=>{I.key==="Enter"&&(I.preventDefault(),A&&_())},g=()=>{setTimeout(()=>{t(1,y.description=y.description.replace(/[\r\n]+/g," "),y)},0)},_=()=>{let I=y.description.trim();Fe&&(I=ve.prependTo(I));let xe=Q(y.startDate),Pe=Q(y.scheduledDate),rt=Q(y.dueDate),gr=null;y.recurrenceRule&&(gr=et.fromText({recurrenceRuleText:y.recurrenceRule,startDate:xe,scheduledDate:Pe,dueDate:rt}));let We;switch(y.priority){case"lowest":We="5";break;case"low":We="4";break;case"medium":We="2";break;case"high":We="1";break;case"highest":We="0";break;default:We="3"}let Le=new Oe(Object.assign(Object.assign({},s),{description:I,status:y.status,priority:We,recurrence:gr,startDate:xe,scheduledDate:Pe,dueDate:rt,doneDate:window.moment(y.doneDate,"YYYY-MM-DD").isValid()?window.moment(y.doneDate,"YYYY-MM-DD"):null}));a([Le])},v=[[]];function k(){y.description=this.value,t(1,y),t(6,te),t(2,L),t(4,U),t(0,o)}function S(I){Eo[I?"unshift":"push"](()=>{T=I,t(10,T)})}function D(){y.priority=this.__value,t(1,y),t(6,te),t(2,L),t(4,U),t(0,o)}function O(){y.recurrenceRule=this.value,t(1,y),t(6,te),t(2,L),t(4,U),t(0,o)}function C(){y.dueDate=this.value,t(1,y),t(6,te),t(2,L),t(4,U),t(0,o)}function pe(){y.scheduledDate=this.value,t(1,y),t(6,te),t(2,L),t(4,U),t(0,o)}function se(){y.startDate=this.value,t(1,y),t(6,te),t(2,L),t(4,U),t(0,o)}function ee(){y.forwardOnly=this.checked,t(1,y),t(6,te),t(2,L),t(4,U),t(0,o)}function De(){y.status=pT(this),t(1,y),t(6,te),t(2,L),t(4,U),t(0,o)}return r.$$set=I=>{"task"in I&&t(26,s=I.task),"onSubmit"in I&&t(27,a=I.onSubmit),"statusOptions"in I&&t(0,o=I.statusOptions)},r.$$.update=()=>{if(r.$$.dirty[0]&512){e:t(15,n=I=>j?I:null)}if(r.$$.dirty[0]&66){e:t(1,y.dueDate=ii(y.dueDate),y),t(6,te=P("due",y.dueDate)),t(7,Te=!te.includes("invalid"))}if(r.$$.dirty[0]&6){e:t(1,y.startDate=ii(y.startDate),y),t(2,L=P("start",y.startDate)),t(3,q=!L.includes("invalid"))}if(r.$$.dirty[0]&18){e:t(1,y.scheduledDate=ii(y.scheduledDate),y),t(4,U=P("scheduled",y.scheduledDate)),t(5,ne=!U.includes("invalid"))}if(r.$$.dirty[0]&268435458){e:if(t(8,V=!0),!y.recurrenceRule)t(12,G="<i>not recurring</>");else{let I=t(28,i=et.fromText({recurrenceRuleText:y.recurrenceRule,startDate:null,scheduledDate:null,dueDate:null}))===null||i===void 0?void 0:i.toText();I?t(12,G=I):(t(12,G="<i>invalid recurrence rule</i>"),t(8,V=!1))}}if(r.$$.dirty[0]&2){e:t(29,w=y.description.trim()!=="")}if(r.$$.dirty[0]&536871336){e:t(14,A=Te&&V&&ne&&q&&w)}if(r.$$.dirty[0]&2){e:t(11,R=B("created",y.createdDate)),t(13,Ce=B("done",y.doneDate))}},[o,y,L,q,U,ne,te,Te,V,j,T,R,G,Ce,A,n,l,c,f,m,E,d,p,h,g,_,s,a,i,w,k,S,D,v,O,C,pe,se,ee,De]}var xf=class extends ko{constructor(e){super(),gT(this,e,Kx,zx,oT,{task:26,onSubmit:27,statusOptions:0},null,[-1,-1])}},vT=xf;var rn=class extends wT.Modal{constructor({app:t,task:n,onSubmit:i}){super(t);this.task=n,this.onSubmit=s=>{s.length&&i(s),this.close()}}onOpen(){this.titleEl.setText("Create or edit Task");let{contentEl:t}=this,n=this.getKnownStatusesAndCurrentTaskStatusIfNotKnown();new vT({target:t,props:{task:this.task,statusOptions:n,onSubmit:this.onSubmit}})}getKnownStatusesAndCurrentTaskStatusIfNotKnown(){let t=Se.getInstance().registeredStatuses;return Se.getInstance().bySymbol(this.task.status.symbol)===J.EMPTY&&t.push(this.task.status),t}onClose(){let{contentEl:t}=this;t.empty()}};var Do=({line:r,path:e})=>{var y,w;let t=Et.fromPath(e),n=Oe.fromLine({line:r,taskLocation:ot.fromUnknownPosition(e),fallbackDate:t});if(n!==null)return n;let{setCreatedDate:i}=X(),s=null;i&&(s=window.moment());let a=r.match(H.nonTaskRegex);if(a===null)return console.error("Tasks: Cannot create task on line:",r),new Oe({status:J.TODO,description:"",taskLocation:ot.fromUnknownPosition(e),indentation:"",listMarker:"-",priority:"3",createdDate:s,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,recurrence:null,blockLink:"",tags:[],originalMarkdown:"",scheduledDateIsInferred:!1});let o=a[1],u=(y=a[2])!=null?y:"-",l=(w=a[4])!=null?w:" ",c=Se.getInstance().bySymbolOrCreate(l),f=a[5],m=r.match(H.blockLinkRegex),T=m!==null?m[0]:"";return T!==""&&(f=f.replace(H.blockLinkRegex,"")),new Oe({status:c,description:f,taskLocation:ot.fromUnknownPosition(e),indentation:o,listMarker:u,blockLink:T,priority:"3",createdDate:s,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,recurrence:null,tags:[],originalMarkdown:"",scheduledDateIsInferred:!1})};var ET=(r,e,t,n)=>{var f;if(r)return t instanceof Af.MarkdownView;if(!(t instanceof Af.MarkdownView))return;let i=(f=t.file)==null?void 0:f.path;if(i===void 0)return;let a=e.getCursor().line,o=e.getLine(a),u=Do({line:o,path:i}),l=m=>{let T=Et.removeInferredStatusIfNeeded(u,m).map(y=>y.toFileLineString()).join(`
`);e.setLine(a,T)};new rn({app:n,task:u,onSubmit:l}).open()};var Pf=require("obsidian");var kT=(r,e,t)=>{var u;if(r)return t instanceof Pf.MarkdownView;if(!(t instanceof Pf.MarkdownView))return;let n=(u=t.file)==null?void 0:u.path;if(n===void 0)return;let i=e.getCursor(),s=i.line,a=e.getLine(s),o=Vx(a,n);e.setLine(s,o.text),e.setCursor(Xx(i,o))},Vx=(r,e)=>{let t=Oe.fromLine({line:r,taskLocation:ot.fromUnknownPosition(e),fallbackDate:null});if(t!==null){let n=t.toggleWithRecurrenceInUsersOrder().map(i=>i.toFileLineString());return{text:n.join(`
`),moveTo:{line:n.length-1}}}else{let n=r.match(H.taskRegex);if(n!==null){let i=n[3],a=Se.getInstance().bySymbol(i).nextStatusSymbol;return{text:r.replace(H.taskRegex,`$1- [${a}] $4`)}}else if(H.listItemRegex.test(r)){let i=r.replace(H.listItemRegex,"$1$2 [ ]");return{text:i,moveTo:{ch:i.length}}}else{let i=r.replace(H.indentationRegex,"$1- ");return{text:i,moveTo:{ch:i.length}}}}},Xx=(r,e)=>{var s;let t={line:0,ch:r.ch},n=ge(ge({},t),(s=e.moveTo)!=null?s:{}),i=e.text.split(`
`)[n.line].length;return{line:r.line+n.line,ch:Math.min(n.ch,i)}};var Oo=class{get app(){return this.plugin.app}constructor({plugin:e}){this.plugin=e,e.addCommand({id:"edit-task",name:"Create or edit task",icon:"pencil",editorCheckCallback:(t,n,i)=>ET(t,n,i,this.app)}),e.addCommand({id:"toggle-done",name:"Toggle task done",icon:"check-in-circle",editorCheckCallback:kT})}};var So=class{constructor({obsidianEvents:e}){this.obsidianEvents=e}onCacheUpdate(e){return this.obsidianEvents.on("obsidian-tasks-plugin:cache-update",e)}triggerCacheUpdate(e){this.obsidianEvents.trigger("obsidian-tasks-plugin:cache-update",e)}onRequestCacheUpdate(e){return this.obsidianEvents.on("obsidian-tasks-plugin:request-cache-update",e)}triggerRequestCacheUpdate(e){this.obsidianEvents.trigger("obsidian-tasks-plugin:request-cache-update",e)}off(e){this.obsidianEvents.offref(e)}};var DT=require("obsidian");var Ro=class{constructor({plugin:e}){this.markdownPostProcessor=this._markdownPostProcessor.bind(this);e.registerMarkdownPostProcessor(this._markdownPostProcessor.bind(this))}_markdownPostProcessor(e,t){return W(this,null,function*(){var c;let n=new DT.MarkdownRenderChild(e);t.addChild(n);let i=e.findAll(".task-list-item").filter(f=>{var y;let m=(y=f.textContent)==null?void 0:y.split(`
`);if(m===void 0)return!1;let T=null;for(let w=0;w<m.length;w=w+1)if(m[w]!==""){T=m[w];break}return T===null?!1:ve.includedIn(T)});if(i.length===0)return;let s=t.sourcePath,a=t.getSectionInfo(e);if(a===null)return;let o=a.text.split(`
`),u=0,l=[];for(let f=a.lineStart;f<=a.lineEnd;f++){let m=o[f];if(m===void 0)continue;let T=null,y=Oe.fromLine({line:m,taskLocation:new ot(s,f,a.lineStart,u,T),fallbackDate:null});y!==null&&(l.push(y),u++)}for(let f=0;f<i.length;f++){let m=l[f],T=i[f];if(m===void 0||T===void 0)continue;let y=(c=T.getAttr("data-line"))!=null?c:"0",w=Number.parseInt(y,10),R=yield m.toLi({parentUlElement:e,listIndex:w,obsidianComponent:n}),L=T.childNodes;for(let ne=0;ne<L.length;ne=ne+1){let te=L[ne];te.nodeName.toLowerCase()==="div"?R.prepend(te):te.nodeName.toLowerCase()==="ul"&&R.append(te)}let q=T.querySelectorAll("[data-footnote-id]"),U=R.querySelectorAll("[data-footnote-id]");if(q.length===U.length)for(let ne=0;ne<q.length;ne++)U[ne].replaceWith(q[ne]);T.replaceWith(R)}})}};var OT=require("@codemirror/view"),ST=require("obsidian");var RT=()=>OT.ViewPlugin.fromClass(Cf),Cf=class{constructor(e){this.view=e,this.handleClickEvent=this.handleClickEvent.bind(this),this.view.dom.addEventListener("click",this.handleClickEvent)}destroy(){this.view.dom.removeEventListener("click",this.handleClickEvent)}handleClickEvent(e){let{target:t}=e;if(!t||!(t instanceof HTMLInputElement)||t.type!=="checkbox")return!1;let n=t.closest("ul.plugin-tasks-query-result, div.callout-content");if(n){if(n.matches("div.callout-content")){let m=`obsidian-tasks-plugin warning: Tasks cannot add or remove completion dates or make the next copy of a recurring task for tasks written inside a callout when you click their checkboxes in Live Preview.
If you wanted Tasks to do these things, please undo your change, then either click the line of the task and use the "Toggle Task Done" command, or switch to Reading View to click the checkbox.`;console.warn(m),new ST.Notice(m,45e3)}return!1}let{state:i}=this.view,s=this.view.posAtDOM(t),a=i.doc.lineAt(s),o=Oe.fromLine({line:a.text,taskLocation:ot.fromUnknownPosition(""),fallbackDate:null});if(console.debug(`Live Preview Extension: toggle called. Position: ${s} Line: ${a.text}`),o===null)return!1;e.preventDefault();let l=o.toggleWithRecurrenceInUsersOrder().map(m=>m.toFileLineString()).join(i.lineBreak),c=i.update({changes:{from:a.from,to:a.to,insert:l}});this.view.dispatch(c);let f=t.checked;return setTimeout(()=>{t.checked=f},1),!0}};var Si=require("obsidian");var Cr=class{constructor(e,t,n){this.property=e,this.comparator=Cr.maybeReverse(n,t)}static maybeReverse(e,t){return e?Cr.makeReversedComparator(t):t}static makeReversedComparator(e){return(t,n)=>e(t,n)*-1}};var nn=class{constructor(e,t,n){this.property=e,this.grouper=t,this.reverse=n}};var ke=class{canCreateFilterForLine(e){return ke.lineMatchesFilter(this.filterRegExp(),e)}static lineMatchesFilter(e,t){return e?e.test(t):!1}static getMatch(e,t){return e?t.match(e):null}fieldNameSingular(){return this.fieldName()}fieldNameSingularEscaped(){return go(this.fieldNameSingular())}supportsSorting(){return!1}createSorterFromLine(e){if(!this.supportsSorting())return null;let t=ke.getMatch(this.sorterRegExp(),e);if(t===null)return null;let n=!!t[1];return this.createSorter(n)}sorterRegExp(){if(!this.supportsSorting())throw Error(`sorterRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^sort by ${this.fieldNameSingularEscaped()}( reverse)?`)}comparator(){throw Error(`comparator() unimplemented for ${this.fieldNameSingular()}`)}createSorter(e){return new Cr(this.fieldNameSingular(),this.comparator(),e)}createNormalSorter(){return this.createSorter(!1)}createReverseSorter(){return this.createSorter(!0)}supportsGrouping(){return!1}createGrouperFromLine(e){if(!this.supportsGrouping())return null;let t=ke.getMatch(this.grouperRegExp(),e);if(t===null)return null;let n=!!t[1];return this.createGrouper(n)}grouperRegExp(){if(!this.supportsGrouping())throw Error(`grouperRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^group by ${this.fieldNameSingularEscaped()}( reverse)?$`)}grouper(){throw Error(`grouper() unimplemented for ${this.fieldNameSingular()}`)}createGrouper(e){return new nn(this.fieldNameSingular(),this.grouper(),e)}createNormalGrouper(){return this.createGrouper(!1)}createReverseGrouper(){return this.createGrouper(!0)}};var Ae=class{constructor(e,t=[],n=""){this.description=e,this.symbol=n,this.children=t}static booleanAnd(e){return this.combineOrCreateExplanation("All of",e,"AND")}static booleanOr(e){return this.combineOrCreateExplanation("At least one of",e,"OR")}static booleanNot(e){return new Ae("None of",e,"NOT")}static booleanXor(e){return new Ae("Exactly one of",e,"XOR")}asString(e=""){if(this.children.length==0)return e+this.description;let t=e;this.symbol===""?t+=this.description:(t+=this.symbol,this.children.length>1&&(t+=` (${this.description})`),t+=":");let n=e+" ";for(let i=0;i<this.children.length;i++)t+=`
${this.children[i].asString(n)}`;return t}static combineOrCreateExplanation(e,t,n){if(t.length===2){let i=t[0],s=t[1];if(i.symbol===n&&s.symbol==="")return i.children.push(s),i}return new Ae(e,t,n)}};var kt=class{constructor(e,t,n){this.instruction=e,this.explanation=n,this.filterFunction=t}explainFilterIndented(e){let t=this.explanation;return t.asString()===this.instruction?`${e}${this.instruction}
`:`${e}${this.instruction} =>
${t.asString(" ")}
`}},we=class{constructor(e){this.instruction=e}get filter(){return this._filter}set filter(e){this._filter=e}get filterFunction(){if(this._filter)return this._filter.filterFunction}static fromFilter(e){let t=new we(e.instruction);return t.filter=e,t}static fromError(e,t){let n=new we(e);return n.error=t,n}};var Mo=class{constructor(e,t){this._instruction=e,this._filter=t}canCreateFilterForLine(e){return e==this._instruction}createFilterOrErrorMessage(e){let t=new we(e);return e===this._instruction?(t.filter=new kt(e,this._filter,new Ae(e)),t):(t.error=`do not understand filter: ${e}`,t)}};var pr=class{constructor(){this._filters=[]}add(e,t){this._filters.push(new Mo(e,t))}canCreateFilterForLine(e){for(let t of this._filters)if(t.canCreateFilterForLine(e))return!0;return!1}createFilterOrErrorMessage(e){for(let n of this._filters){let i=n.createFilterOrErrorMessage(e);if(i.error===void 0)return i}let t=new we(e);return t.error=`do not understand filter: ${e}`,t}};var sn=class extends ke{constructor(){super(...arguments);this._filters=new pr}canCreateFilterForLine(t){return this._filters.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){return this._filters.createFilterOrErrorMessage(t)}filterRegExp(){return null}};var mr=class extends sn{constructor(){super(),this._filters.add("done",e=>e.isDone),this._filters.add("not done",e=>!e.isDone)}fieldName(){return"status"}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=mr.oldStatusName(e),i=mr.oldStatusName(t);return n<i?1:n>i?-1:0}}static oldStatusName(e){return e.status.symbol===" "?"Todo":"Done"}supportsGrouping(){return!0}grouper(){return e=>[mr.oldStatusName(e)]}};var ft=class extends ke{constructor(t=null){super();t!==null?this.filterInstructions=t:(this.filterInstructions=new pr,this.filterInstructions.add(`has ${this.fieldName()} date`,n=>this.date(n)!==null),this.filterInstructions.add(`no ${this.fieldName()} date`,n=>this.date(n)===null),this.filterInstructions.add(`${this.fieldName()} date is invalid`,n=>{let i=this.date(n);return i!==null&&!i.isValid()}))}canCreateFilterForLine(t){return this.filterInstructions.canCreateFilterForLine(t)?!0:super.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){let n=this.filterInstructions.createFilterOrErrorMessage(t);if(n.filter!==void 0)return n;let i=new we(t),s=ke.getMatch(this.filterRegExp(),t);if(s!==null){let a=s[1],o=s[2],u=s[3],l=Mt.parseDateRange(u);if(!l.isValid()){let c=Mt.parseDate(a);c.isValid()&&(l=new gt(c,c))}if(!l.isValid())i.error="do not understand "+this.fieldName()+" date";else{let c=this.buildFilterFunction(o,l),f=ft.buildExplanation(this.fieldNameForExplanation(),o,this.filterResultIfFieldMissing(),l);i.filter=new kt(t,c,f)}}else i.error="do not understand query filter ("+this.fieldName()+" date)";return i}buildFilterFunction(t,n){let i;return t==="before"?i=s=>s?s.isBefore(n.start):this.filterResultIfFieldMissing():t==="after"?i=s=>s?s.isAfter(n.end):this.filterResultIfFieldMissing():i=s=>s?s.isSameOrAfter(n.start)&&s.isSameOrBefore(n.end):this.filterResultIfFieldMissing(),this.getFilter(i)}getFilter(t){return n=>t(this.date(n))}filterRegExp(){return new RegExp(`^${this.fieldNameForFilterInstruction()} ((before|after|on|in)? ?(.*))`)}fieldNameForFilterInstruction(){return this.fieldName()}static buildExplanation(t,n,i,s){let a,o="YYYY-MM-DD (dddd Do MMMM YYYY)",u;switch(n){case"before":a=n,u=s.start.format(o);break;case"after":a=n,u=s.end.format(o);break;default:if(s.start.isSame(s.end))a="on",u=s.start.format(o);else{let c=`${t} date is between:`,f=[new Ae(`${s.start.format(o)} and`),new Ae(`${s.end.format(o)} inclusive`)];return i&&f.push(new Ae(`OR no ${t} date`)),new Ae(c,f)}break}let l=`${t} date is ${a} ${u}`;return i&&(l+=` OR no ${t} date`),new Ae(l)}fieldNameForExplanation(){return this.fieldName()}supportsSorting(){return!0}comparator(){return(t,n)=>Rr(this.date(t),this.date(n))}supportsGrouping(){return!0}grouper(){return t=>{let n=this.date(t);return n===null?["No "+this.fieldName()+" date"]:[n.format("YYYY-MM-DD dddd")]}}};var hi=class extends ft{fieldName(){return"due"}date(e){return e.dueDate}filterResultIfFieldMissing(){return!1}};var Nf=class extends ke{createFilterOrErrorMessage(e){let t=new we(e),n=ke.getMatch(this.filterRegExp(),e);if(n!==null){let i=n[5],s=null;switch(i){case"lowest":s="5";break;case"low":s="4";break;case"none":s="3";break;case"medium":s="2";break;case"high":s="1";break;case"highest":s="0";break}if(s===null)return t.error="do not understand priority",t;let a=e,o;switch(n[3]){case"above":o=u=>u.priority.localeCompare(s)<0;break;case"below":o=u=>u.priority.localeCompare(s)>0;break;case"not":o=u=>u.priority!==s;break;default:o=u=>u.priority===s,a=`${this.fieldName()} is ${i}`}t.filter=new kt(e,o,new Ae(a))}else t.error="do not understand query filter (priority)";return t}fieldName(){return"priority"}filterRegExp(){return Nf.priorityRegexp}supportsSorting(){return!0}comparator(){return(e,t)=>e.priority.localeCompare(t.priority)}supportsGrouping(){return!0}grouper(){return e=>{let t=tn.priorityNameUsingNormal(e.priority);return[`%%${e.priority}%%${t} priority`]}}},xn=Nf;xn.priorityRegexp=/^priority(\s+is)?(\s+(above|below|not))?(\s+(lowest|low|none|medium|high|highest))$/;var gi=class{matchesAnyOf(e){return e.some(t=>this.matches(t))}};var yi=class extends gi{constructor(t){super();this.stringToFind=t}matches(t){return yi.stringIncludesCaseInsensitive(t,this.stringToFind)}static stringIncludesCaseInsensitive(t,n){return t.toLocaleLowerCase().includes(n.toLocaleLowerCase())}};var _i=class extends gi{constructor(t){super();this.regex=t}static validateAndConstruct(t){let n=/\/((?![*+?])(?:[^\r\n[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*])+)\/((?:g(?:im?|mi?)?|i(?:gm?|mg?)?|m(?:gi?|ig?)?)?)/,i=t.match(n);if(i!==null){let s=new RegExp(i[1],i[2]);return new _i(s)}else return null}matches(t){return t.match(this.regex)!==null}};var Me=class extends ke{createFilterOrErrorMessage(e){let t=ke.getMatch(this.filterRegExp(),e);if(t===null)return we.fromError(e,`do not understand query filter (${this.fieldName()})`);let[n,i,s]=t,a=null;if(i.includes("include"))a=new yi(s);else if(i.includes("regex")&&(a=_i.validateAndConstruct(s),a===null))return we.fromError(e,`cannot parse regex (${this.fieldName()}); check your leading and trailing slashes for your query`);if(a===null)return we.fromError(e,`do not understand query filter (${this.fieldName()})`);let o=i.match(/not/)!==null,u=new kt(e,this.getFilter(a,o),new Ae(e));return we.fromFilter(u)}fieldPattern(){return this.fieldNameSingularEscaped()}filterOperatorPattern(){return"includes|does not include|regex matches|regex does not match"}filterRegExp(){return new RegExp(`^(?:${this.fieldPattern()}) (${this.filterOperatorPattern()}) (.*)`)}getFilter(e,t){return n=>{let i=e.matches(this.value(n));return t?!i:i}}comparator(){return(e,t)=>this.value(e).localeCompare(this.value(t),void 0,{numeric:!0})}grouper(){return e=>[this.value(e)]}static escapeMarkdownCharacters(e){return e.replace(/\\/g,"\\\\").replace(/_/g,"\\_")}};var Ti=class extends Me{fieldName(){return"path"}value(e){return e.path}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return e=>[Me.escapeMarkdownCharacters(e.path.replace(".md",""))]}};var bi=class extends ke{canCreateFilterForLine(e){return!1}createFilterOrErrorMessage(e){return we.fromError(e,"Filtering by urgency is not yet supported")}fieldName(){return"urgency"}filterRegExp(){throw Error(`filterRegExp() unimplemented for ${this.fieldName()}`)}supportsSorting(){return!0}comparator(){return(e,t)=>t.urgency-e.urgency}supportsGrouping(){return!0}grouper(){return e=>[`${e.urgency.toFixed(2)}`]}createGrouper(e){return super.createGrouper(!e)}};var vi=class{static by(e,t){let n=[new bi().comparator(),new mr().comparator(),new hi().comparator(),new xn().comparator(),new Ti().comparator()],i=[];for(let s of e)i.push(s.comparator);return t.sort(vi.makeCompositeComparator([...i,...n]))}static makeCompositeComparator(e){return(t,n)=>{for(let i of e){let s=i(t,n);if(s!==0)return s}return 0}}};var xo=class{constructor(e,t,n){this.nestingLevel=e,this.displayName=t,this.property=n}};var Ao=class{constructor(e,t){this.lastHeadingAtLevel=new Array;this.groupers=t;let i=e.keys().next().value.length;for(let s=0;s<i;s++)this.lastHeadingAtLevel.push("")}getHeadingsForTaskGroup(e){let t=new Array;for(let n=0;n<e.length;n++){let i=e[n];if(i!=this.lastHeadingAtLevel[n]){t.push(new xo(n,i,this.groupers[n].property));for(let s=n;s<e.length;s++)this.lastHeadingAtLevel[s]="";this.lastHeadingAtLevel[n]=i}}return t}};var Po=class{constructor(e){this.children=new Map;this.values=[];this.values=e}generateAllPaths(e=[]){let t=new Map;if(this.children.size==0)return t.set([...e],this.values),t;for(let[n,i]of this.children)e.push(n),i.generateAllPaths(e).forEach((a,o)=>t.set(o,a)),e.pop();return t}};var Co=class extends Po{},No=class{constructor(e,t){this.root=new Co(t),this.buildGroupingTree(e)}buildGroupingTree(e){let t=[this.root];for(let n of e){let i=[];for(let s of t)for(let a of s.values){let o=n.grouper(a);o.length===0&&o.push("");for(let u of o){let l=s.children.get(u);l===void 0&&(l=new Co([]),s.children.set(u,l),i.push(l)),l.values.push(a)}}t=i}}generateTaskTreeStorage(){return this.root.generateAllPaths()}};var Io=class{constructor(e,t){this.groups=e,this.groupHeadings=[],this.tasks=t}setGroupHeadings(e){for(let t of e)this.groupHeadings.push(t)}applyTaskLimit(e){this.tasks=this.tasks.slice(0,e)}tasksAsStringOfLines(){let e="";for(let t of this.tasks)e+=t.toFileLineString()+`
`;return e}toString(){let e=`
`;e+=`Group names: [${this.groups}]
`;for(let t of this.groupHeadings)e+=`${"#".repeat(4+t.nestingLevel)} [${t.property}] ${t.displayName}
`;return e+=this.tasksAsStringOfLines(),e}};var Fo=class{constructor(e,t){this._groups=new Array;this._totalTaskCount=0;this._totalTaskCount=t.length,this._groupers=e;let i=new No(e,t).generateTaskTreeStorage();this.addTaskGroups(i),this.sortTaskGroups(),this.setGroupsHeadings(i)}get groupers(){return this._groupers}get groups(){return this._groups}totalTasksCount(){return this._totalTaskCount}toString(){let e="";e+=`Groupers (if any):
`;for(let n of this._groupers){let i=n.reverse?" reverse":"";e+=`- ${n.property}${i}
`}for(let n of this.groups)e+=n.toString(),e+=`
---
`;return e+=`
${this.totalTasksCount()} tasks
`,e}addTaskGroups(e){for(let[t,n]of e){let i=new Io(t,n);this.addTaskGroup(i)}}addTaskGroup(e){this._groups.push(e)}sortTaskGroups(){let e=(t,n)=>{let i=t.groups,s=n.groups;for(let a=0;a<i.length;a++){let o=this._groupers[a],u=i[a].localeCompare(s[a],void 0,{numeric:!0});if(u!==0)return o.reverse?-u:u}return 0};this._groups.sort(e)}setGroupsHeadings(e){let t=new Ao(e,this._groupers);for(let n of this._groups)n.setGroupHeadings(t.getHeadingsForTaskGroup(n.groups))}applyTaskLimit(e){this._groupers.length!==0&&(this._groups.forEach(t=>{t.applyTaskLimit(e)}),this.recalculateTotalTaskCount())}recalculateTotalTaskCount(){let e=[];this._groups.forEach(n=>{e=[...e,...n.tasks]});let t=[...new Set(e)];this._totalTaskCount=t.length}};var An=class extends Me{fieldName(){return"description"}value(e){return ve.removeAsSubstringFrom(e.description)}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=An.cleanDescription(e.description),i=An.cleanDescription(t.description);return n.localeCompare(i,void 0,{numeric:!0})}}static cleanDescription(e){e=ve.removeAsSubstringFrom(e);let t=/^\[\[?([^\]]*)]]?/,n=e.match(t);if(n!==null){let i=n[1];e=i.substring(i.indexOf("|")+1)+e.replace(t,"")}return e=this.replaceFormatting(e,/^\*\*([^*]+)\*\*/),e=this.replaceFormatting(e,/^\*([^*]+)\*/),e=this.replaceFormatting(e,/^==([^=]+)==/),e=this.replaceFormatting(e,/^__([^_]+)__/),e=this.replaceFormatting(e,/^_([^_]+)_/),e}static replaceFormatting(e,t){let n=e.match(t);return n!==null&&(e=n[1]+e.replace(t,"")),e}};var Lo=class extends ft{fieldName(){return"created"}date(e){return e.createdDate}filterResultIfFieldMissing(){return!1}};var Uo=class extends ft{fieldName(){return"done"}date(e){return e.doneDate}filterResultIfFieldMissing(){return!1}};var Wo=class extends sn{constructor(){super(),this._filters.add("exclude sub-items",e=>{if(e.indentation==="")return!0;let t=e.indentation.lastIndexOf(">");return t===-1?!1:/^ ?$/.test(e.indentation.slice(t+1))})}fieldName(){return"exclude"}};function MT(r,e){let t=[["task",r]],n=t.map(([a])=>a),i=e&&new Function(...n,`return ${e}`);if(!(i instanceof Function))return"Error parsing group function";let s=t.map(([a,o])=>o);try{return i(...s)}catch(a){let o=`Error: Failed calculating expression "${e}". The error message was: `;return a instanceof Error?o+a.message:o+"Unknown error"}}var qo=class extends ke{createFilterOrErrorMessage(e){return we.fromError(e,"Searching by custom function not yet implemented")}fieldName(){return"function"}filterRegExp(){return null}supportsGrouping(){return!0}createGrouperFromLine(e){let t=ke.getMatch(this.grouperRegExp(),e);if(t===null)return null;let n=!!t[1],i=t[2];return new nn("function",Qx(i),n)}grouperRegExp(){return new RegExp(`^group by ${this.fieldNameSingularEscaped()}( reverse)? (.*)`)}grouper(){throw Error("grouper() function not valid for FunctionField. Use createGrouperFromLine() instead.")}};function Qx(r){return e=>Zx(e,r)}function Zx(r,e){try{let t=MT(r,e);return Array.isArray(t)?t.map(i=>i.toString()):t===null?[]:[t.toString()]}catch(t){let n=`Error: Failed calculating expression "${e}". The error message was: `;return t instanceof Error?[n+t.message]:[n+"Unknown error"]}}var Yo=class extends Me{fieldName(){return"heading"}value(e){return e.precedingHeader?e.precedingHeader:""}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return e=>e.precedingHeader===null||e.precedingHeader.length===0?["(No heading)"]:[e.precedingHeader]}};var $o=class extends ft{fieldName(){return"scheduled"}date(e){return e.scheduledDate}filterResultIfFieldMissing(){return!1}};var jo=class extends ft{fieldName(){return"start"}fieldNameForFilterInstruction(){return"starts"}date(e){return e.startDate}filterResultIfFieldMissing(){return!0}};var Go=class extends ft{constructor(){let e=new pr;e.add("has happens date",t=>this.dates(t).some(n=>n!==null)),e.add("no happens date",t=>!this.dates(t).some(n=>n!==null)),super(e)}fieldName(){return"happens"}fieldNameForExplanation(){return"due, start or scheduled"}date(e){return this.earliestDate(e)}dates(e){return e.happensDates}earliestDate(e){return e.happens.moment}filterResultIfFieldMissing(){return!1}getFilter(e){return t=>this.dates(t).some(n=>e(n))}};var Bo=class extends sn{constructor(){super(),this._filters.add("is recurring",e=>e.recurrence!==null),this._filters.add("is not recurring",e=>e.recurrence===null)}fieldName(){return"recurring"}supportsSorting(){return!0}comparator(){return(e,t)=>e.recurrence!==null&&t.recurrence===null?-1:e.recurrence===null&&t.recurrence!==null?1:0}supportsGrouping(){return!0}grouper(){return e=>e.recurrence!==null?["Recurring"]:["Not Recurring"]}};var Ho=class extends Me{fieldNamePlural(){return this.fieldNameSingular()+"s"}fieldName(){return`${this.fieldNameSingular()}/${this.fieldNamePlural()}`}fieldPattern(){return`${this.fieldNameSingular()}|${this.fieldNamePlural()}`}filterOperatorPattern(){return`${super.filterOperatorPattern()}|include|do not include`}value(e){return this.values(e).join(", ")}getFilter(e,t){return n=>{let i=e.matchesAnyOf(this.values(n));return t?!i:i}}createGrouper(e){return new nn(this.fieldNamePlural(),this.grouper(),e)}grouperRegExp(){if(!this.supportsGrouping())throw Error(`grouperRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^group by ${this.fieldNamePlural()}( reverse)?$`)}};var Pn=class extends Ho{constructor(){super();this.filterInstructions=new pr,this.filterInstructions.add(`has ${this.fieldNameSingular()}`,t=>this.values(t).length>0),this.filterInstructions.add(`has ${this.fieldNamePlural()}`,t=>this.values(t).length>0),this.filterInstructions.add(`no ${this.fieldNameSingular()}`,t=>this.values(t).length===0),this.filterInstructions.add(`no ${this.fieldNamePlural()}`,t=>this.values(t).length===0)}createFilterOrErrorMessage(t){let n=this.filterInstructions.createFilterOrErrorMessage(t);return n.filter!==void 0?n:super.createFilterOrErrorMessage(t)}canCreateFilterForLine(t){return this.filterInstructions.canCreateFilterForLine(t)?!0:super.canCreateFilterForLine(t)}fieldNameSingular(){return"tag"}values(t){return t.tags}supportsSorting(){return!0}createSorterFromLine(t){let n=t.match(this.sorterRegExp());if(n===null)return null;let i=!!n[1],s=isNaN(+n[2])?1:+n[2],a=Pn.makeCompareByTagComparator(s);return new Cr(this.fieldNameSingular(),a,i)}sorterRegExp(){return/^sort by tag( reverse)?[\s]*(\d+)?/}comparator(){return Pn.makeCompareByTagComparator(1)}static makeCompareByTagComparator(t){return(n,i)=>{if(n.tags.length===0&&i.tags.length===0)return 0;if(n.tags.length===0)return 1;if(i.tags.length===0)return-1;let s=t-1;if(n.tags.length<t&&i.tags.length>=t)return 1;if(i.tags.length<t&&n.tags.length>=t)return-1;if(n.tags.length<t&&i.tags.length<t)return 0;let a=n.tags[s],o=i.tags[s];return a.localeCompare(o,void 0,{numeric:!0})}}supportsGrouping(){return!0}grouper(){return t=>t.tags.length==0?["(No tags)"]:t.tags}};var $T=Fi(YT());var Xo=class extends ke{constructor(){super(...arguments);this.basicBooleanRegexp=/(.*(AND|OR|XOR|NOT)\s*[("].*|\(.+\))/g;this.supportedOperators=["AND","OR","XOR","NOT"];this.subFields={}}filterRegExp(){return this.basicBooleanRegexp}createFilterOrErrorMessage(t){return this.parseLine(t)}fieldName(){return"boolean query"}parseLine(t){let n=new we(t);if(t.length===0)return n.error="empty line",n;let i=this.preprocessExpression(t);try{let s=(0,$T.parse)(i);for(let u of s)if(u.name==="IDENTIFIER"&&u.value){let l=u.value.trim();if(!(l in this.subFields)){let c=Qo(l);if(c===null)return n.error=`couldn't parse sub-expression '${l}'`,n;if(c.error)return n.error=`couldn't parse sub-expression '${l}': ${c.error}`,n;c.filter&&(this.subFields[l]=c.filter)}}else if(u.name==="OPERATOR"){if(u.value==null)return n.error="empty operator in boolean query",n;if(!this.supportedOperators.includes(u.value))return n.error=`unknown boolean operator '${u.value}'`,n}let a=u=>this.filterTaskWithParsedQuery(u,s),o=this.constructExplanation(s);return n.filter=new kt(t,a,o),n}catch(s){let a=s instanceof Error?s.message:"unknown error type";return n.error=`malformed boolean query -- ${a} (check the documentation for guidelines)`,n}return n}preprocessExpression(t){return t.replace(/\(([^()]+)\)/g,'("$1")')}filterTaskWithParsedQuery(t,n){let i=o=>o==="true",s=o=>o?"true":"false",a=[];for(let o of n)if(o.name==="IDENTIFIER"){if(o.value==null)throw Error("null token value");let l=this.subFields[o.value.trim()].filterFunction(t);a.push(s(l))}else if(o.name==="OPERATOR")if(o.value==="NOT"){let u=i(a.pop());a.push(s(!u))}else if(o.value==="OR"){let u=i(a.pop()),l=i(a.pop());a.push(s(u||l))}else if(o.value==="AND"){let u=i(a.pop()),l=i(a.pop());a.push(s(u&&l))}else if(o.value==="XOR"){let u=i(a.pop()),l=i(a.pop());a.push(s(u&&!l||!u&&l))}else throw Error("Unsupported operator: "+o.value);else throw Error("Unsupported token type: "+o);return i(a[0])}constructExplanation(t){let n=[];for(let i of t)if(i.name==="IDENTIFIER"){if(i.value==null)throw Error("null token value");let s=this.subFields[i.value.trim()];n.push(s.explanation)}else if(i.name==="OPERATOR")if(i.value==="NOT"){let s=n.pop();n.push(Ae.booleanNot([s]))}else if(i.value==="OR"){let s=n.pop(),a=n.pop();n.push(Ae.booleanOr([a,s]))}else if(i.value==="AND"){let s=n.pop(),a=n.pop();n.push(Ae.booleanAnd([a,s]))}else if(i.value==="XOR"){let s=n.pop(),a=n.pop();n.push(Ae.booleanXor([a,s]))}else throw Error("Unsupported operator: "+i.value);else throw Error("Unsupported token type: "+i);return n[0]}};var Zo=class extends Me{fieldName(){return"filename"}value(e){let t=e.filename;return t===null?"":t+".md"}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return e=>{let t=e.filename;return t===null?["Unknown Location"]:["[["+t+"]]"]}}};var Jo=class extends Me{constructor(){super()}fieldName(){return"status.name"}value(e){return e.status.name}supportsSorting(){return!0}supportsGrouping(){return!0}};var on=class extends ke{canCreateFilterForLine(e){let t=new RegExp(`^(?:${this.fieldNameSingularEscaped()})`);return ke.lineMatchesFilter(t,e)}createFilterOrErrorMessage(e){let t=ke.getMatch(this.filterRegExp(),e);if(t===null)return this.helpMessage(e);let[n,i,s]=t,a=Ht[s.toUpperCase()];if(!a)return this.helpMessage(e);let o;switch(i){case"is":o=u=>u.status.type===a;break;case"is not":o=u=>u.status.type!==a;break;default:return this.helpMessage(e)}return we.fromFilter(new kt(e,o,new Ae(e)))}filterRegExp(){return new RegExp(`^(?:${this.fieldNameSingularEscaped()}) (is|is not) ([^ ]+)$`)}helpMessage(e){let t=Object.values(Ht).filter(i=>i!=="EMPTY").join(" "),n=`Invalid ${this.fieldNameSingular()} instruction: '${e}'.
Allowed options: 'is' and 'is not' (without quotes).
Allowed values: ${t}
Note: values are case-insensitive,
so 'in_progress' works too, for example.
Example: ${this.fieldNameSingular()} is not NON_TASK`;return we.fromError(e,n)}fieldName(){return"status.type"}value(e){return e.status.type}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=on.groupName(e),i=on.groupName(t);return n.localeCompare(i,void 0,{numeric:!0})}}supportsGrouping(){return!0}grouper(){return e=>[on.groupName(e)]}static groupName(e){let t;switch(e.status.type){case"IN_PROGRESS":t="1";break;case"TODO":t="2";break;case"DONE":t="3";break;case"CANCELLED":t="4";break;case"NON_TASK":t="5";break;case"EMPTY":t="6";break}return`%%${t}%%${e.status.type}`}};var eu=class extends Me{fieldName(){return"recurrence"}value(e){return e.recurrence!==null?e.recurrence.toText():""}supportsGrouping(){return!0}grouper(){return e=>e.recurrence!==null?[e.recurrence.toText()]:["None"]}};var tu=class extends Me{fieldName(){return"folder"}value(e){return e.file.folder}supportsGrouping(){return!0}grouper(){return e=>[Me.escapeMarkdownCharacters(this.value(e))]}};var ru=class extends Me{fieldName(){return"root"}value(e){return e.file.root}supportsGrouping(){return!0}grouper(){return e=>[Me.escapeMarkdownCharacters(this.value(e))]}};var nu=class extends Me{fieldName(){return"backlink"}value(e){let t=e.getLinkText({isFilenameUnique:!0});return t===null?"Unknown Location":t}createFilterOrErrorMessage(e){return we.fromError(e,"backlink field does not support filtering")}canCreateFilterForLine(e){return!1}supportsGrouping(){return!0}grouper(){return e=>{let t=e.filename;if(t===null)return["Unknown Location"];let n=Me.escapeMarkdownCharacters(t);return e.precedingHeader&&e.precedingHeader!==t&&(n+=" > "+e.precedingHeader),[n]}}};var Hf=[()=>new Jo,()=>new on,()=>new mr,()=>new Bo,()=>new xn,()=>new Go,()=>new Lo,()=>new jo,()=>new $o,()=>new hi,()=>new Uo,()=>new Ti,()=>new tu,()=>new ru,()=>new nu,()=>new An,()=>new Pn,()=>new Yo,()=>new Wo,()=>new Zo,()=>new bi,()=>new eu,()=>new qo,()=>new Xo];function Qo(r){for(let e of Hf){let t=e();if(t.canCreateFilterForLine(r))return t.createFilterOrErrorMessage(r)}return null}function jT(r){let e=/^sort by /;if(r.match(e)===null)return null;for(let t of Hf){let i=t().createSorterFromLine(r);if(i)return i}return null}function GT(r){let e=/^group by /;if(r.match(e)===null)return null;for(let t of Hf){let i=t().createGrouperFromLine(r);if(i)return i}return null}var Ur=class{constructor({source:e}){this._limit=void 0;this._taskGroupLimit=void 0;this._layoutOptions=new js;this._filters=[];this._error=void 0;this._sorting=[];this._grouping=[];this.hideOptionsRegexp=/^(hide|show) (task count|backlink|priority|created date|start date|scheduled date|done date|due date|recurrence rule|edit button|urgency)/;this.shortModeRegexp=/^short/;this.explainQueryRegexp=/^explain/;this.limitRegexp=/^limit (groups )?(to )?(\d+)( tasks?)?/;this.commentRegexp=/^#.*/;this.source=e,e.split(`
`).map(t=>t.trim()).forEach(t=>{switch(!0){case t==="":break;case this.shortModeRegexp.test(t):this._layoutOptions.shortMode=!0;break;case this.explainQueryRegexp.test(t):this._layoutOptions.explainQuery=!0;break;case this.limitRegexp.test(t):this.parseLimit({line:t});break;case this.parseSortBy({line:t}):break;case this.parseGroupBy({line:t}):break;case this.hideOptionsRegexp.test(t):this.parseHideOptions({line:t});break;case this.commentRegexp.test(t):break;case this.parseFilter(t):break;default:this._error=`do not understand query: ${t}`}})}append(e){return this.source===""?e:e.source===""?this:new Ur({source:`${this.source}
${e.source}`})}explainQuery(){let e="",t=this.filters.length;if(t===0)e+="No filters supplied. All tasks will match the query.";else for(let i=0;i<t;i++)i>0&&(e+=`
`),e+=this.filters[i].explainFilterIndented("");e+=this.explainQueryLimits();let{debugSettings:n}=X();return n.ignoreSortInstructions&&(e+=`
NOTE: All sort instructions, including default sort order, are disabled, due to 'ignoreSortInstructions' setting.`),e}explainQueryLimits(){let e="";function t(n){let i=`
At most ${n} task`;return n!==1&&(i+="s"),i}return this._limit!==void 0&&(e+=t(this._limit),e+=`.
`),this._taskGroupLimit!==void 0&&(e+=t(this._taskGroupLimit),e+=` per group (if any "group by" options are supplied).
`),e}get limit(){return this._limit}get layoutOptions(){return this._layoutOptions}get filters(){return this._filters}get sorting(){return this._sorting}get grouping(){return this._grouping}get error(){return this._error}applyQueryToTasks(e){this.filters.forEach(a=>{e=e.filter(a.filterFunction)});let{debugSettings:t}=X(),i=(t.ignoreSortInstructions?e:vi.by(this.sorting,e)).slice(0,this.limit),s=new Fo(this.grouping,i);return this._taskGroupLimit!==void 0&&s.applyTaskLimit(this._taskGroupLimit),s}parseHideOptions({line:e}){let t=e.match(this.hideOptionsRegexp);if(t!==null){let n=t[1]==="hide";switch(t[2]){case"task count":this._layoutOptions.hideTaskCount=n;break;case"backlink":this._layoutOptions.hideBacklinks=n;break;case"priority":this._layoutOptions.hidePriority=n;break;case"created date":this._layoutOptions.hideCreatedDate=n;break;case"start date":this._layoutOptions.hideStartDate=n;break;case"scheduled date":this._layoutOptions.hideScheduledDate=n;break;case"due date":this._layoutOptions.hideDueDate=n;break;case"done date":this._layoutOptions.hideDoneDate=n;break;case"recurrence rule":this._layoutOptions.hideRecurrenceRule=n;break;case"edit button":this._layoutOptions.hideEditButton=n;break;case"urgency":this._layoutOptions.hideUrgency=n;break;default:this._error="do not understand hide/show option"}}}parseFilter(e){let t=Qo(e);return t!=null?(t.filter?this._filters.push(t.filter):this._error=t.error,!0):!1}parseLimit({line:e}){let t=e.match(this.limitRegexp);if(t===null){this._error="do not understand query limit";return}let n=Number.parseInt(t[3],10);t[1]!==void 0?this._taskGroupLimit=n:this._limit=n}parseSortBy({line:e}){let t=jT(e);return t?(this._sorting.push(t),!0):!1}parseGroupBy({line:e}){let t=GT(e);return t?(this._grouping.push(t),!0):!1}};function BT(r){let e="";ve.isEmpty()||(e+=`Only tasks containing the global filter '${ve.get()}'.
`);let t=new Ur(mf());return t.source.trim()!==""&&(e+=`Explanation of the global query:
${t.explainQuery()}
`),e+=`Explanation of this Tasks code block query:
${new Ur({source:r}).explainQuery()}`,e}function iu(r){return new Ur(mf()).append(new Ur({source:r}))}var su=class{constructor({plugin:e,events:t}){this.addQueryRenderChild=this._addQueryRenderChild.bind(this);this.app=e.app,this.events=t,e.registerMarkdownCodeBlockProcessor("tasks",this._addQueryRenderChild.bind(this))}_addQueryRenderChild(e,t,n){return W(this,null,function*(){n.addChild(new zf({app:this.app,events:this.events,container:t,source:e,filePath:n.sourcePath}))})}},zf=class extends Si.MarkdownRenderChild{constructor({app:t,events:n,container:i,source:s,filePath:a}){super(i);switch(this.app=t,this.events=n,this.source=s,this.filePath=a,this.containerEl.className){case"block-language-tasks":this.query=iu(this.source),this.queryType="tasks";break;default:this.query=iu(this.source),this.queryType="tasks";break}}onload(){this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.renderEventRef=this.events.onCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()}onunload(){this.renderEventRef!==void 0&&this.events.off(this.renderEventRef),this.queryReloadTimeout!==void 0&&clearTimeout(this.queryReloadTimeout)}reloadQueryAtMidnight(){let t=new Date;t.setHours(24,0,0,0);let n=new Date,i=t.getTime()-n.getTime();this.queryReloadTimeout=setTimeout(()=>{this.query=iu(this.source),this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()},i+1e3)}render(i){return W(this,arguments,function*({tasks:t,state:n}){var a;let s=this.containerEl.createEl("div");if(n==="Warm"&&this.query.error===void 0){console.debug(`Render ${this.queryType} called for a block in active file "${this.filePath}", to select from ${t.length} tasks: plugin state: ${n}`),this.query.layoutOptions.explainQuery&&this.createExplanation(s);let o=this.query.applyQueryToTasks(t);for(let l of o.groups){this.addGroupHeadings(s,l.groupHeadings);let{taskList:c}=yield this.createTasksList({tasks:l.tasks,content:s});s.appendChild(c)}let u=o.totalTasksCount();console.debug(`${u} of ${t.length} tasks displayed in a block in "${this.filePath}"`),this.addTaskCount(s,u)}else this.query.error!==void 0?s.createDiv().innerHTML=`<pre>Tasks query: ${this.query.error.replace(/\n/g,"<br>")}</pre>`:s.setText("Loading Tasks ...");(a=this.containerEl.firstChild)==null||a.replaceWith(s)})}createExplanation(t){let n=BT(this.source),i=t.createEl("pre");i.addClasses(["plugin-tasks-query-explanation"]),i.setText(n),t.appendChild(i)}createTasksList(i){return W(this,arguments,function*({tasks:t,content:n}){let s=t.length,a=new Qr(this.query.layoutOptions),o=n.createEl("ul");o.addClasses(["contains-task-list","plugin-tasks-query-result"]),o.addClasses(a.specificClasses);let u=this.getGroupingAttribute();u&&u.length>0&&(o.dataset.taskGroupBy=u);for(let l=0;l<s;l++){let c=t[l],f=this.isFilenameUnique({task:c}),m=yield c.toLi({parentUlElement:o,listIndex:l,layoutOptions:this.query.layoutOptions,isFilenameUnique:f,taskLayout:a,obsidianComponent:this});m.querySelectorAll("[data-footnote-id]").forEach(R=>R.remove());let y=this.query.layoutOptions.shortMode,w=m.createSpan("task-extras");this.query.layoutOptions.hideUrgency||this.addUrgency(w,c),this.query.layoutOptions.hideBacklinks||this.addBacklinks(w,c,y,f),this.query.layoutOptions.hideEditButton||this.addEditButton(w,c),o.appendChild(m)}return{taskList:o,tasksCount:s}})}addEditButton(t,n){t.createEl("a",{cls:"tasks-edit"}).onClickEvent(s=>{s.preventDefault();let a=u=>{bo({originalTask:n,newTasks:Et.removeInferredStatusIfNeeded(n,u)})};new rn({app:this.app,task:n,onSubmit:a}).open()})}addUrgency(t,n){let i=new Intl.NumberFormat().format(n.urgency);t.createSpan({text:i,cls:"tasks-urgency"})}addGroupHeadings(t,n){for(let i of n)this.addGroupHeading(t,i)}addGroupHeading(t,n){return W(this,null,function*(){let i="h6";n.nestingLevel===0?i="h4":n.nestingLevel===1&&(i="h5");let s=t.createEl(i,{cls:"tasks-group-heading"});yield Si.MarkdownRenderer.renderMarkdown(n.displayName,s,this.filePath,this)})}addBacklinks(t,n,i,s){var c;let a=t.createSpan({cls:"tasks-backlink"});i||a.append(" (");let o=a.createEl("a");o.rel="noopener",o.target="_blank",o.addClass("internal-link"),i&&o.addClass("internal-link-short-mode");let u;i?u=" \u{1F517}":u=(c=n.getLinkText({isFilenameUnique:s}))!=null?c:"",o.setText(u);let l=this.app.vault;o.addEventListener("click",f=>W(this,null,function*(){let m=yield Tf(n,l);if(m){let[T,y]=m;yield this.app.workspace.getLeaf(Si.Keymap.isModEvent(f)).openFile(y,{eState:{line:T}})}})),o.addEventListener("mousedown",f=>W(this,null,function*(){if(f.button===1){let m=yield Tf(n,l);if(m){let[T,y]=m;yield this.app.workspace.getLeaf("tab").openFile(y,{eState:{line:T}})}}})),i||a.append(")")}addTaskCount(t,n){this.query.layoutOptions.hideTaskCount||t.createDiv({text:`${n} task${n!==1?"s":""}`,cls:"tasks-count"})}isFilenameUnique({task:t}){let n=t.path.match(/([^/]*)\..+$/i);if(n===null)return;let i=n[1];return this.app.vault.getMarkdownFiles().filter(a=>{if(a.basename===i)return!0}).length<2}getGroupingAttribute(){let t=[];for(let n of this.query.grouping)t.push(n.property);return t.join(",")}};var _e=require("obsidian");function HT(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],[">","Rescheduled","x","TODO"],["<","Scheduled","x","TODO"],["!","Important","x","TODO"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],["?","Question","x","TODO"],["*","Star","x","TODO"],["n","Note","x","TODO"],["l","Location","x","TODO"],["i","Information","x","TODO"],["I","Idea","x","TODO"],["S","Amount","x","TODO"],["p","Pro","x","TODO"],["c","Con","x","TODO"],["b","Bookmark","x","TODO"],['"',"Quote","x","TODO"],["0","Speech bubble 0","0","NON_TASK"],["1","Speech bubble 1","1","NON_TASK"],["2","Speech bubble 2","2","NON_TASK"],["3","Speech bubble 3","3","NON_TASK"],["4","Speech bubble 4","4","NON_TASK"],["5","Speech bubble 5","5","NON_TASK"],["6","Speech bubble 6","6","NON_TASK"],["7","Speech bubble 7","7","NON_TASK"],["8","Speech bubble 8","8","NON_TASK"],["9","Speech bubble 9","9","NON_TASK"]]}function zT(){return[[" ","incomplete","x","TODO"],["x","complete / done"," ","DONE"],["-","cancelled"," ","CANCELLED"],[">","deferred","x","TODO"],["/","in progress, or half-done","x","IN_PROGRESS"],["!","Important","x","TODO"],["?","question","x","TODO"],["R","review","x","TODO"],["+","Inbox / task that should be processed later","x","TODO"],["b","bookmark","x","TODO"],["B","brainstorm","x","TODO"],["D","deferred or scheduled","x","TODO"],["I","Info","x","TODO"],["i","idea","x","TODO"],["N","note","x","TODO"],["Q","quote","x","TODO"],["W","win / success / reward","x","TODO"],["P","pro","x","TODO"],["C","con","x","TODO"]]}function KT(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],[">","Deferred","x","TODO"],["!","Important","x","TODO"],["?","Question","x","TODO"],["r","Review","x","TODO"]]}function VT(){return[[" ","Unchecked","x","TODO"],["x","Regular"," ","DONE"],["X","Checked"," ","DONE"],["-","Dropped"," ","CANCELLED"],[">","Forward","x","TODO"],["D","Date","x","TODO"],["?","Question","x","TODO"],["/","Half Done","x","IN_PROGRESS"],["+","Add","x","TODO"],["R","Research","x","TODO"],["!","Important","x","TODO"],["i","Idea","x","TODO"],["B","Brainstorm","x","TODO"],["P","Pro","x","TODO"],["C","Con","x","TODO"],["Q","Quote","x","TODO"],["N","Note","x","TODO"],["b","Bookmark","x","TODO"],["I","Information","x","TODO"],["p","Paraphrase","x","TODO"],["L","Location","x","TODO"],["E","Example","x","TODO"],["A","Answer","x","TODO"],["r","Reward","x","TODO"],["c","Choice","x","TODO"],["d","Doing","x","IN_PROGRESS"],["T","Time","x","TODO"],["@","Character / Person","x","TODO"],["t","Talk","x","TODO"],["O","Outline / Plot","x","TODO"],["~","Conflict","x","TODO"],["W","World","x","TODO"],["f","Clue / Find","x","TODO"],["F","Foreshadow","x","TODO"],["H","Favorite / Health","x","TODO"],["&","Symbolism","x","TODO"],["s","Secret","x","TODO"]]}function XT(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],[">","Rescheduled","x","TODO"],["<","Scheduled","x","TODO"],["!","Important","x","TODO"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],["?","Question","x","TODO"],["*","Star","x","TODO"],["n","Note","x","TODO"],["l","Location","x","TODO"],["i","Information","x","TODO"],["I","Idea","x","TODO"],["S","Amount","x","TODO"],["p","Pro","x","TODO"],["c","Con","x","TODO"],["b","Bookmark","x","TODO"],["f","Fire","x","TODO"],["k","Key","x","TODO"],["w","Win","x","TODO"],["u","Up","x","TODO"],["d","Down","x","TODO"]]}function QT(){return[[" ","to-do","x","TODO"],["/","incomplete","x","IN_PROGRESS"],["x","done"," ","DONE"],["-","canceled"," ","CANCELLED"],[">","forwarded","x","TODO"],["<","scheduling","x","TODO"],["?","question","x","TODO"],["!","important","x","TODO"],["*","star","x","TODO"],['"',"quote","x","TODO"],["l","location","x","TODO"],["b","bookmark","x","TODO"],["i","information","x","TODO"],["S","savings","x","TODO"],["I","idea","x","TODO"],["p","pros","x","TODO"],["c","cons","x","TODO"],["f","fire","x","TODO"],["k","key","x","TODO"],["w","win","x","TODO"],["u","up","x","TODO"],["d","down","x","TODO"]]}function ZT(){return[[" ","to-do","x","TODO"],["/","incomplete","x","IN_PROGRESS"],["x","done"," ","DONE"],["-","canceled"," ","CANCELLED"],[">","forwarded","x","TODO"],["<","scheduling","x","TODO"],["?","question","x","TODO"],["!","important","x","TODO"],["*","star","x","TODO"],['"',"quote","x","TODO"],["l","location","x","TODO"],["b","bookmark","x","TODO"],["i","information","x","TODO"],["S","savings","x","TODO"],["I","idea","x","TODO"],["p","pros","x","TODO"],["c","cons","x","TODO"],["f","fire","x","TODO"],["k","key","x","TODO"],["w","win","x","TODO"],["u","up","x","TODO"],["d","down","x","TODO"]]}var JT=[{text:"Core Statuses",level:"h3",class:"",open:!0,notice:{class:"setting-item-description",text:null,html:"<p>These are the core statuses that Tasks supports natively, with no need for custom CSS styling or theming.</p><p>You can add edit and add your own custom statuses in the section below.</p>"},settings:[{name:"",description:"",type:"function",initialValue:"",placeholder:"",settingName:"insertTaskCoreStatusSettings",featureFlag:"",notice:null}]},{text:"Custom Statuses",level:"h3",class:"",open:!0,notice:{class:"setting-item-description",text:null,html:`<p>You should first <b>select and install a CSS Snippet or Theme</b> to style custom checkboxes.</p><p>Then, use the buttons below to set up your custom statuses, to match your chosen CSS checkboxes.</p><p><b>Note</b> Any statuses with the same symbol as any earlier statuses will be ignored. You can confirm the actually loaded statuses by running the 'Create or edit task' command and looking at the Status drop-down.</p><p></p><p>See the <a href="https://publish.obsidian.md/tasks/Getting+Started/Statuses">documentation</a> to get started!</p>`},settings:[{name:"",description:"",type:"function",initialValue:"",placeholder:"",settingName:"insertCustomTaskStatusSettings",featureFlag:"",notice:null}]}];var ir=require("obsidian");var Fn=class{validate(e){let t=[];return t.push(...this.validateSymbol(e)),t.push(...this.validateName(e)),t.push(...this.validateNextSymbol(e)),t}validateStatusCollectionEntry(e){let[t,n,i,s]=e,a=[];if(a.push(...this.validateType(s)),t===i&&s!=="NON_TASK"&&a.push(`Status symbol '${t}' toggles to itself`),a.length>0)return a;let o=J.createFromImportedValue(e).configuration;return a.push(...this.validateSymbolTypeConventions(o)),a.push(...this.validate(o)),a}validateSymbol(e){return Fn.validateOneSymbol(e.symbol,"Task Status Symbol")}validateNextSymbol(e){return Fn.validateOneSymbol(e.nextStatusSymbol,"Task Next Status Symbol")}validateName(e){let t=[];return e.name.length===0&&t.push("Task Status Name cannot be empty."),t}validateType(e){let t=Ht[e],n=[];return t||n.push(`Status Type "${e}" is not a valid type`),t=="EMPTY"&&n.push('Status Type "EMPTY" is not permitted in user data'),n}validateSymbolTypeConventions(e){let t=[],n=e.symbol,i=new Se,s=n==="X"?"x":n,a=i.bySymbol(s);return a.type!=="EMPTY"&&(e.nextStatusSymbol!==a.nextStatusSymbol&&t.push(`Next Status Symbol for symbol '${n}': '${e.nextStatusSymbol}' is inconsistent with convention '${a.nextStatusSymbol}'`),e.type!==a.type&&t.push(`Status Type for symbol '${n}': '${e.type}' is inconsistent with convention '${a.type}'`)),t}static validateOneSymbol(e,t){let n=[];return e.length===0&&n.push(`${t} cannot be empty.`),e.length>1&&n.push(`${t} ("${e}") must be a single character.`),n}};var Ln=new Fn,Nt=class extends ir.Modal{constructor(t,n,i){super(t.app);this.plugin=t;this.saved=!1;this.error=!1;this.statusSymbol=n.symbol,this.statusName=n.name,this.statusNextSymbol=n.nextStatusSymbol,this.statusAvailableAsCommand=n.availableAsCommand,this.type=n.type,this.isCoreStatus=i}statusConfiguration(){return new tt(this.statusSymbol,this.statusName,this.statusNextSymbol,this.statusAvailableAsCommand,this.type)}display(){return W(this,null,function*(){let{contentEl:t}=this;t.empty();let n=t.createDiv(),i;new ir.Setting(n).setName("Task Status Symbol").setDesc("This is the character between the square braces. (It can only be edited for Custom statuses, and not Core statuses.)").addText(l=>{i=l,l.setValue(this.statusSymbol).onChange(c=>{this.statusSymbol=c,Nt.setValid(l,Ln.validateSymbol(this.statusConfiguration()))})}).setDisabled(this.isCoreStatus).then(l=>{Nt.setValid(i,Ln.validateSymbol(this.statusConfiguration()))});let s;new ir.Setting(n).setName("Task Status Name").setDesc("This is the friendly name of the task status.").addText(l=>{s=l,l.setValue(this.statusName).onChange(c=>{this.statusName=c,Nt.setValid(l,Ln.validateName(this.statusConfiguration()))})}).then(l=>{Nt.setValid(s,Ln.validateName(this.statusConfiguration()))});let a;new ir.Setting(n).setName("Task Next Status Symbol").setDesc("When clicked on this is the symbol that should be used next.").addText(l=>{a=l,l.setValue(this.statusNextSymbol).onChange(c=>{this.statusNextSymbol=c,Nt.setValid(l,Ln.validateNextSymbol(this.statusConfiguration()))})}).then(l=>{Nt.setValid(a,Ln.validateNextSymbol(this.statusConfiguration()))}),new ir.Setting(n).setName("Task Status Type").setDesc("Control how the status behaves for searching and toggling.").addDropdown(l=>{["TODO","IN_PROGRESS","DONE","CANCELLED","NON_TASK"].forEach(f=>{l.addOption(f,f)}),l.setValue(this.type).onChange(f=>{this.type=J.getTypeFromStatusTypeString(f)})}),J.tasksPluginCanCreateCommandsForStatuses()&&new ir.Setting(n).setName("Available as command").setDesc("If enabled this status will be available as a command so you can assign a hotkey and toggle the status using it.").addToggle(l=>{l.setValue(this.statusAvailableAsCommand).onChange(c=>W(this,null,function*(){this.statusAvailableAsCommand=c}))});let o=t.createDiv(),u=new ir.Setting(o);u.addButton(l=>(l.setTooltip("Save").setIcon("checkmark").onClick(()=>W(this,null,function*(){let c=Ln.validate(this.statusConfiguration());if(c.length>0){let f=c.join(`
`)+`
Fix errors before saving.`;new ir.Notice(f);return}this.saved=!0,this.close()})),l)),u.addExtraButton(l=>(l.setIcon("cross").setTooltip("Cancel").onClick(()=>{this.saved=!1,this.close()}),l))})}onOpen(){this.display()}static setValidationError(t){t.inputEl.addClass("tasks-settings-is-invalid")}static removeValidationError(t){t.inputEl.removeClass("tasks-settings-is-invalid")}static setValid(t,n){n.length===0?Nt.removeValidationError(t):Nt.setValidationError(t)}};var It=class extends _e.PluginSettingTab{constructor({plugin:t}){super(t.app,t);this.customFunctions={insertTaskCoreStatusSettings:this.insertTaskCoreStatusSettings.bind(this),insertCustomTaskStatusSettings:this.insertCustomTaskStatusSettings.bind(this)};this.plugin=t}saveSettings(t){return W(this,null,function*(){yield this.plugin.saveSettings(),t&&this.display()})}display(){let{containerEl:t}=this;t.empty(),this.containerEl.addClass("tasks-settings"),t.createEl("h3",{text:"Tasks Settings"}),t.createEl("p",{cls:"tasks-setting-important",text:"Changing any settings requires a restart of obsidian."}),t.createEl("h4",{text:"Task Format Settings"}),new _e.Setting(t).setName("Task Format").setDesc(It.createFragmentWithHTML('<p>The format that Tasks uses to read and write tasks.</p><p><b>Important:</b> Tasks currently only supports one format at a time. Selecting Dataview will currently <b>stop Tasks reading its own emoji signifiers</b>.</p><p>See the <a href="https://publish.obsidian.md/tasks/Reference/Task+Formats/About+Task+Formats">documentation</a>.</p>')).addDropdown(i=>{for(let s of Object.keys(Mr))i.addOption(s,Mr[s].displayName);i.setValue(X().taskFormat).onChange(s=>W(this,null,function*(){Ge({taskFormat:s}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Global filter Settings"}),new _e.Setting(t).setName("Global task filter").setDesc(It.createFragmentWithHTML('<p><b>Recommended: Leave empty if you want all checklist items in your vault to be tasks managed by this plugin.</b></p><p>Use a global filter if you want Tasks to only act on a subset of your "<code>- [ ]</code>" checklist items, so that a checklist item must include the specified string in its description in order to be considered a task.<p><p>For example, if you set the global filter to <code>#task</code>, the Tasks plugin will only handle checklist items tagged with <code>#task</code>.</br>Other checklist items will remain normal checklist items and not appear in queries or get a done date set.</p><p>See the <a href="https://publish.obsidian.md/tasks/Getting+Started/Global+Filter">documentation</a>.</p>')).addText(i=>{i.setPlaceholder("e.g. #task or TODO").setValue(ve.get()).onChange(s=>W(this,null,function*(){ve.set(s),yield this.plugin.saveSettings()}))}),new _e.Setting(t).setName("Remove global filter from description").setDesc("Enabling this removes the string that you set as global filter from the task description when displaying a task.").addToggle(i=>{let s=X();i.setValue(s.removeGlobalFilter).onChange(a=>W(this,null,function*(){Ge({removeGlobalFilter:a}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Global Query"}),dA(new _e.Setting(t).setDesc(It.createFragmentWithHTML('<p>A query that is automatically included at the start of every Tasks block in the vault. Useful for adding default filters, or layout options.</p><p>See the <a href="https://publish.obsidian.md/tasks/Queries/Global+Query">documentation</a>.</p>')).addTextArea(i=>{let s=X();i.inputEl.rows=4,i.setPlaceholder(`# For example...
path does not include _templates/
limit 300
show urgency`).setValue(s.globalQuery).onChange(a=>W(this,null,function*(){Ge({globalQuery:a}),yield this.plugin.saveSettings()}))})),t.createEl("h4",{text:"Task Statuses"});let{headingOpened:n}=X();JT.forEach(i=>{this.addOneSettingsBlock(t,i,n)}),t.createEl("h4",{text:"Date Settings"}),new _e.Setting(t).setName("Set created date on every added task").setDesc(It.createFragmentWithHTML(`Enabling this will add a timestamp \u2795 YYYY-MM-DD before other date values, when a task is created with 'Create or edit task', or by completing a recurring task.</br><p>See the <a href="https://publish.obsidian.md/tasks/Getting+Started/Dates#Created+date">documentation</a>.</p>`)).addToggle(i=>{let s=X();i.setValue(s.setCreatedDate).onChange(a=>W(this,null,function*(){Ge({setCreatedDate:a}),yield this.plugin.saveSettings()}))}),new _e.Setting(t).setName("Set done date on every completed task").setDesc(It.createFragmentWithHTML('Enabling this will add a timestamp \u2705 YYYY-MM-DD at the end when a task is toggled to done.</br><p>See the <a href="https://publish.obsidian.md/tasks/Getting+Started/Dates#Done+date">documentation</a>.</p>')).addToggle(i=>{let s=X();i.setValue(s.setDoneDate).onChange(a=>W(this,null,function*(){Ge({setDoneDate:a}),yield this.plugin.saveSettings()}))}),new _e.Setting(t).setName("Use filename as Scheduled date for undated tasks").setDesc(It.createFragmentWithHTML('Save time entering Scheduled (\u23F3) dates.</br>If this option is enabled, any undated tasks will be given a default Scheduled date extracted from their file name.</br>The date in the file name must be in one of <code>YYYY-MM-DD</code> or <code>YYYYMMDD</code> formats.</br>Undated tasks have none of Due (\u{1F4C5} ), Scheduled (\u23F3) and Start (\u{1F6EB}) dates.</br><p>See the <a href="https://publish.obsidian.md/tasks/Getting+Started/Use+Filename+as+Default+Date">documentation</a>.</p>')).addToggle(i=>{let s=X();i.setValue(s.useFilenameAsScheduledDate).onChange(a=>W(this,null,function*(){Ge({useFilenameAsScheduledDate:a}),yield this.plugin.saveSettings()}))}),new _e.Setting(t).setName("Folders with default Scheduled dates").setDesc("Leave empty if you want to use default Scheduled dates everywhere, or enter a comma-separated list of folders.").addText(i=>W(this,null,function*(){let s=X();yield this.plugin.saveSettings(),i.setValue(It.renderFolderArray(s.filenameAsDateFolders)).onChange(a=>W(this,null,function*(){let o=It.parseCommaSeparatedFolders(a);Ge({filenameAsDateFolders:o}),yield this.plugin.saveSettings()}))})),t.createEl("h4",{text:"Recurring task Settings"}),new _e.Setting(t).setName("Next recurrence appears on the line below").setDesc(It.createFragmentWithHTML('Enabling this will make the next recurrence of a task appear on the line below the completed task. Otherwise the next recurrence will appear before the completed one.</br><p>See the <a href="https://publish.obsidian.md/tasks/Getting+Started/Recurring+Tasks">documentation</a>.</p>')).addToggle(i=>{let{recurrenceOnNextLine:s}=X();i.setValue(s).onChange(a=>W(this,null,function*(){Ge({recurrenceOnNextLine:a}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Auto-suggest Settings"}),new _e.Setting(t).setName("Auto-suggest task content").setDesc(It.createFragmentWithHTML('Enabling this will open an intelligent suggest menu while typing inside a recognized task line.</br><p>See the <a href="https://publish.obsidian.md/tasks/Getting+Started/Auto-Suggest">documentation</a>.</p>')).addToggle(i=>{let s=X();i.setValue(s.autoSuggestInEditor).onChange(a=>W(this,null,function*(){Ge({autoSuggestInEditor:a}),yield this.plugin.saveSettings()}))}),new _e.Setting(t).setName("Minimum match length for auto-suggest").setDesc("If higher than 0, auto-suggest will be triggered only when the beginning of any supported keywords is recognized.").addSlider(i=>{let s=X();i.setLimits(0,3,1).setValue(s.autoSuggestMinMatch).setDynamicTooltip().onChange(a=>W(this,null,function*(){Ge({autoSuggestMinMatch:a}),yield this.plugin.saveSettings()}))}),new _e.Setting(t).setName("Maximum number of auto-suggestions to show").setDesc('How many suggestions should be shown when an auto-suggest menu pops up (including the "\u23CE" option).').addSlider(i=>{let s=X();i.setLimits(3,12,1).setValue(s.autoSuggestMaxItems).setDynamicTooltip().onChange(a=>W(this,null,function*(){Ge({autoSuggestMaxItems:a}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Dialog Settings"}),new _e.Setting(t).setName("Provide access keys in dialogs").setDesc(It.createFragmentWithHTML('If the access keys (keyboard shortcuts) for various controls in dialog boxes conflict with system keyboard shortcuts or assistive technology functionality that is important for you, you may want to deactivate them here.</br><p>See the <a href="https://publish.obsidian.md/tasks/Getting+Started/Create+or+edit+Task#Keyboard+shortcuts">documentation</a>.</p>')).addToggle(i=>{let s=X();i.setValue(s.provideAccessKeys).onChange(a=>W(this,null,function*(){Ge({provideAccessKeys:a}),yield this.plugin.saveSettings()}))})}addOneSettingsBlock(t,n,i){let s=t.createEl("details",{cls:"tasks-nested-settings",attr:ge({},n.open||i[n.text]?{open:!0}:{})});s.empty(),s.ontoggle=()=>{i[n.text]=s.open,Ge({headingOpened:i}),this.plugin.saveSettings()};let a=s.createEl("summary");if(new _e.Setting(a).setHeading().setName(n.text),a.createDiv("collapser").createDiv("handle"),n.notice!==null){let o=s.createEl("div",{cls:n.notice.class,text:n.notice.text});n.notice.html!==null&&o.insertAdjacentHTML("beforeend",n.notice.html)}n.settings.forEach(o=>{if(!(o.featureFlag!==""&&!H_(o.featureFlag))&&(o.type==="checkbox"?new _e.Setting(s).setName(o.name).setDesc(o.description).addToggle(u=>{let l=X();l.generalSettings[o.settingName]||Dn(o.settingName,o.initialValue),u.setValue(l.generalSettings[o.settingName]).onChange(c=>W(this,null,function*(){Dn(o.settingName,c),yield this.plugin.saveSettings()}))}):o.type==="text"?new _e.Setting(s).setName(o.name).setDesc(o.description).addText(u=>{let l=X();l.generalSettings[o.settingName]||Dn(o.settingName,o.initialValue);let c=f=>W(this,null,function*(){Dn(o.settingName,f),yield this.plugin.saveSettings()});u.setPlaceholder(o.placeholder.toString()).setValue(l.generalSettings[o.settingName].toString()).onChange((0,_e.debounce)(c,500,!0))}):o.type==="textarea"?new _e.Setting(s).setName(o.name).setDesc(o.description).addTextArea(u=>{let l=X();l.generalSettings[o.settingName]||Dn(o.settingName,o.initialValue);let c=f=>W(this,null,function*(){Dn(o.settingName,f),yield this.plugin.saveSettings()});u.setPlaceholder(o.placeholder.toString()).setValue(l.generalSettings[o.settingName].toString()).onChange((0,_e.debounce)(c,500,!0)),u.inputEl.rows=8,u.inputEl.cols=40}):o.type==="function"&&this.customFunctions[o.settingName](s,this),o.notice!==null)){let u=s.createEl("p",{cls:o.notice.class,text:o.notice.text});o.notice.html!==null&&u.insertAdjacentHTML("beforeend",o.notice.html)}})}static parseCommaSeparatedFolders(t){return t.split(",").map(n=>n.trim()).map(n=>n.replace(/^\/|\/$/g,"")).filter(n=>n!=="")}static renderFolderArray(t){return t.join(",")}insertTaskCoreStatusSettings(t,n){let{statusSettings:i}=X();i.coreStatuses.forEach(s=>{eb(t,s,i.coreStatuses,i,n,n.plugin,!0)})}insertCustomTaskStatusSettings(t,n){let{statusSettings:i}=X();i.customStatuses.forEach(l=>{eb(t,l,i.customStatuses,i,n,n.plugin,!1)}),t.createEl("div"),new _e.Setting(t).addButton(l=>{l.setButtonText("Add New Task Status").setCta().onClick(()=>W(this,null,function*(){He.addStatus(i.customStatuses,new tt("","","",!1,"TODO")),yield Ri(i,n)}))}).infoEl.remove();let a=[["AnuPpuccin Theme",HT()],["Aura Theme",zT()],["Ebullientworks Theme",KT()],["ITS Theme & SlRvb Checkboxes",VT()],["Minimal Theme",QT()],["Things Theme",ZT()],["LYT Mode Theme (Dark mode only)",XT()]];for(let[l,c]of a)new _e.Setting(t).addButton(m=>{let T=`${l}: Add ${c.length} supported Statuses`;m.setButtonText(T).onClick(()=>W(this,null,function*(){yield cA(c,i,n)}))}).infoEl.remove();new _e.Setting(t).addButton(l=>{l.setButtonText("Add All Unknown Status Types").setCta().onClick(()=>W(this,null,function*(){let f=this.plugin.getTasks().map(T=>T.status),m=Se.getInstance().findUnknownStatuses(f);m.length!==0&&(m.forEach(T=>{He.addStatus(i.customStatuses,T)}),yield Ri(i,n))}))}).infoEl.remove(),new _e.Setting(t).addButton(l=>{l.setButtonText("Reset Custom Status Types to Defaults").setWarning().onClick(()=>W(this,null,function*(){He.resetAllCustomStatuses(i),yield Ri(i,n)}))}).infoEl.remove()}},na=It;na.createFragmentWithHTML=t=>createFragment(n=>n.createDiv().innerHTML=t);function eb(r,e,t,n,i,s,a){let o=r.createEl("pre");o.addClass("row-for-status"),o.textContent=new J(e).previewText();let u=new _e.Setting(r);u.infoEl.replaceWith(o),a||u.addExtraButton(l=>{l.setIcon("cross").setTooltip("Delete").onClick(()=>W(this,null,function*(){He.deleteStatus(t,e)&&(yield Ri(n,i))}))}),u.addExtraButton(l=>{l.setIcon("pencil").setTooltip("Edit").onClick(()=>W(this,null,function*(){let c=new Nt(s,e,a);c.onClose=()=>W(this,null,function*(){c.saved&&He.replaceStatus(t,e,c.statusConfiguration())&&(yield Ri(n,i))}),c.open()}))}),u.infoEl.remove()}function cA(r,e,t){return W(this,null,function*(){He.bulkAddStatusCollection(e,r).forEach(i=>{new _e.Notice(i)}),yield Ri(e,t)})}function Ri(r,e){return W(this,null,function*(){Ge({statusSettings:r}),He.applyToStatusRegistry(r,Se.getInstance()),yield e.saveSettings(!0)})}function dA(r){let{settingEl:e,infoEl:t,controlEl:n}=r,i=n.querySelector("textarea");i!==null&&(e.style.display="block",t.style.marginRight="0px",i.style.minWidth="-webkit-fill-available")}var tb=require("obsidian");var au=class extends tb.EditorSuggest{constructor(t,n){super(t);this.settings=n}onTrigger(t,n,i){if(!this.settings.autoSuggestInEditor)return null;let s=n.getLine(t.line);return ve.includedIn(s)&&s.match(H.taskRegex)?{start:{line:t.line,ch:0},end:{line:t.line,ch:s.length},query:s}:null}getSuggestions(t){var a,o,u;let n=t.query,i=t.editor.getCursor();return((u=(o=(a=Gs()).buildSuggestions)==null?void 0:o.call(a,n,i.ch,this.settings))!=null?u:[]).map(l=>Dt(ge({},l),{context:t}))}renderSuggestion(t,n){n.setText(t.displayText)}selectSuggestion(t,n){var u,l,c;let i=t.context.editor;if(t.suggestionType==="empty"){this.close();let f=new KeyboardEvent("keydown",{code:"Enter",key:"Enter"});(l=(u=i==null?void 0:i.cm)==null?void 0:u.contentDOM)==null||l.dispatchEvent(f);return}let s=t.context.editor.getCursor(),a={line:s.line,ch:(c=t.insertAt)!=null?c:s.ch},o=t.insertSkip?{line:s.line,ch:a.ch+t.insertSkip}:void 0;t.context.editor.replaceRange(t.appendText,a,o),t.context.editor.setCursor({line:s.line,ch:a.ch+t.appendText.length})}};var rb=(r,e)=>{let t,n=new Promise((a,o)=>{t=a});return e(r,a=>{let o=a.map(u=>u.toFileLineString()).join(`
`);t(o)}).open(),n};var nb=(r,e)=>{let t=Do({line:"",path:""});return new rn({app:r,task:t,onSubmit:e})};var ib=r=>({createTaskLineModal:()=>rb(r,nb)});var ou=class extends sb.Plugin{get apiV1(){return ib(app)}onload(){return W(this,null,function*(){yo.registerConsoleLogger(),console.log('loading plugin "tasks"'),yield this.loadSettings(),this.addSettingTab(new na({plugin:this})),Q_({metadataCache:this.app.metadataCache,vault:this.app.vault,workspace:this.app.workspace}),yield this.loadTaskStatuses();let t=new So({obsidianEvents:this.app.workspace});this.cache=new On({metadataCache:this.app.metadataCache,vault:this.app.vault,events:t}),this.inlineRenderer=new Ro({plugin:this}),this.queryRenderer=new su({plugin:this,events:t}),this.registerEditorExtension(RT()),this.registerEditorSuggest(new au(this.app,X())),new Oo({plugin:this})})}loadTaskStatuses(){return W(this,null,function*(){let{statusSettings:t}=X();He.applyToStatusRegistry(t,Se.getInstance())})}onunload(){var t;console.log('unloading plugin "tasks"'),(t=this.cache)==null||t.unload()}loadSettings(){return W(this,null,function*(){let t=yield this.loadData();Ge(t),yield this.loadTaskStatuses()})}saveSettings(){return W(this,null,function*(){yield this.saveData(X())})}getTasks(){var t;return(t=this.cache)==null?void 0:t.getTasks()}};
/*!
* EventEmitter2
* https://github.com/hij1nx/EventEmitter2
*
* Copyright (c) 2013 hij1nx
* Licensed under the MIT license.
*/