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.

344 lines
402 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 B_=Object.create;var ts=Object.defineProperty,H_=Object.defineProperties,z_=Object.getOwnPropertyDescriptor,K_=Object.getOwnPropertyDescriptors,V_=Object.getOwnPropertyNames,Hp=Object.getOwnPropertySymbols,Q_=Object.getPrototypeOf,Kp=Object.prototype.hasOwnProperty,X_=Object.prototype.propertyIsEnumerable;var zp=(r,e,t)=>e in r?ts(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,pe=(r,e)=>{for(var t in e||(e={}))Kp.call(e,t)&&zp(r,t,e[t]);if(Hp)for(var t of Hp(e))X_.call(e,t)&&zp(r,t,e[t]);return r},bt=(r,e)=>H_(r,K_(e));var T=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),Z_=(r,e)=>{for(var t in e)ts(r,t,{get:e[t],enumerable:!0})},Vp=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of V_(e))!Kp.call(r,i)&&i!==t&&ts(r,i,{get:()=>e[i],enumerable:!(n=z_(e,i))||n.enumerable});return r};var rs=(r,e,t)=>(t=r!=null?B_(Q_(r)):{},Vp(e||!r||!r.__esModule?ts(t,"default",{value:r,enumerable:!0}):t,r)),J_=r=>Vp(ts({},"__esModule",{value:!0}),r);var q=(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 Ee=T(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.matchAnyPattern=en.extractTerms=en.repeatedTimeunitPattern=void 0;function nv(r,e){let t=e.replace(/\((?!\?)/g,"(?:");return`${r}${t}\\s{0,5}(?:,?\\s{0,5}${t}){0,10}`}en.repeatedTimeunitPattern=nv;function Qp(r){let e;return r instanceof Array?e=[...r]:r instanceof Map?e=Array.from(r.keys()):e=Object.keys(r),e}en.extractTerms=Qp;function iv(r){return`(?:${Qp(r).sort((t,n)=>n.length-t.length).join("|").replace(/\./g,"\\.")})`}en.matchAnyPattern=iv});var be=T((Yu,ju)=>{(function(r,e){typeof Yu=="object"&&typeof ju!="undefined"?ju.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs=e()})(Yu,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",p="year",h="date",_="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,x={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("_")},P=function(B,C,E){var H=String(B);return!H||H.length>=C?B:""+Array(C+1-H.length).join(E)+B},N={s:P,z:function(B){var C=-B.utcOffset(),E=Math.abs(C),H=Math.floor(E/60),A=E%60;return(C<=0?"+":"-")+P(H,2,"0")+":"+P(A,2,"0")},m:function B(C,E){if(C.date()<E.date())return-B(E,C);var H=12*(E.year()-C.year())+(E.month()-C.month()),A=C.clone().add(H,l),J=E-A<0,d=C.clone().add(H+(J?-1:1),l);return+(-(H+(E-A)/(J?A-d:d-A))||0)},a:function(B){return B<0?Math.ceil(B)||0:Math.floor(B)},p:function(B){return{M:l,y:p,w:u,d:o,D:h,h:a,m:s,s:i,ms:n,Q:c}[B]||String(B||"").toLowerCase().replace(/s$/,"")},u:function(B){return B===void 0}},F="en",Z={};Z[F]=x;var V=function(B){return B instanceof Ae},he=function(B,C,E){var H;if(!B)return F;if(typeof B=="string")Z[B]&&(H=B),C&&(Z[B]=C,H=B);else{var A=B.name;Z[A]=B,H=A}return!E&&H&&(F=H),H||!E&&F},j=function(B,C){if(V(B))return B.clone();var E=typeof C=="object"?C:{};return E.date=B,E.args=arguments,new Ae(E)},G=N;G.l=he,G.i=V,G.w=function(B,C){return j(B,{locale:C.$L,utc:C.$u,x:C.$x,$offset:C.$offset})};var Ae=function(){function B(E){this.$L=he(E.locale,null,!0),this.parse(E)}var C=B.prototype;return C.parse=function(E){this.$d=function(H){var A=H.date,J=H.utc;if(A===null)return new Date(NaN);if(G.u(A))return new Date;if(A instanceof Date)return new Date(A);if(typeof A=="string"&&!/Z$/i.test(A)){var d=A.match(y);if(d){var f=d[2]-1||0,m=(d[7]||"0").substring(0,3);return J?new Date(Date.UTC(d[1],f,d[3]||1,d[4]||0,d[5]||0,d[6]||0,m)):new Date(d[1],f,d[3]||1,d[4]||0,d[5]||0,d[6]||0,m)}}return new Date(A)}(E),this.$x=E.x||{},this.init()},C.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()},C.$utils=function(){return G},C.isValid=function(){return this.$d.toString()!==_},C.isSame=function(E,H){var A=j(E);return this.startOf(H)<=A&&A<=this.endOf(H)},C.isAfter=function(E,H){return j(E)<this.startOf(H)},C.isBefore=function(E,H){return this.endOf(H)<j(E)},C.$g=function(E,H,A){return G.u(E)?this[H]:this.set(A,E)},C.unix=function(){return Math.floor(this.valueOf()/1e3)},C.valueOf=function(){return this.$d.getTime()},C.startOf=function(E,H){var A=this,J=!!G.u(H)||H,d=G.p(E),f=function(O,I){var me=G.w(A.$u?Date.UTC(A.$y,I,O):new Date(A.$y,I,O),A);return J?me:me.endOf(o)},m=function(O,I){return G.w(A.toDate()[O].apply(A.toDate("s"),(J?[0,0,0,0]:[23,59,59,999]).slice(I)),A)},g=this.$W,b=this.$M,v=this.$D,k="set"+(this.$u?"UTC":"");switch(d){case p:return J?f(1,0):f(31,11);case l:return J?f(1,b):f(0,b+1);case u:var D=this.$locale().weekStart||0,S=(g<D?g+7:g)-D;return f(J?v-S:v+(6-S),b);case o:case h:return m(k+"Hours",0);case a:return m(k+"Minutes",1);case s:return m(k+"Seconds",2);case i:return m(k+"Milliseconds",3);default:return this.clone()}},C.endOf=function(E){return this.startOf(E,!1)},C.$set=function(E,H){var A,J=G.p(E),d="set"+(this.$u?"UTC":""),f=(A={},A[o]=d+"Date",A[h]=d+"Date",A[l]=d+"Month",A[p]=d+"FullYear",A[a]=d+"Hours",A[s]=d+"Minutes",A[i]=d+"Seconds",A[n]=d+"Milliseconds",A)[J],m=J===o?this.$D+(H-this.$W):H;if(J===l||J===p){var g=this.clone().set(h,1);g.$d[f](m),g.init(),this.$d=g.set(h,Math.min(this.$D,g.daysInMonth())).$d}else f&&this.$d[f](m);return this.init(),this},C.set=function(E,H){return this.clone().$set(E,H)},C.get=function(E){return this[G.p(E)]()},C.add=function(E,H){var A,J=this;E=Number(E);var d=G.p(H),f=function(b){var v=j(J);return G.w(v.date(v.date()+Math.round(b*E)),J)};if(d===l)return this.set(l,this.$M+E);if(d===p)return this.set(p,this.$y+E);if(d===o)return f(1);if(d===u)return f(7);var m=(A={},A[s]=e,A[a]=t,A[i]=r,A)[d]||1,g=this.$d.getTime()+E*m;return G.w(g,this)},C.subtract=function(E,H){return this.add(-1*E,H)},C.format=function(E){var H=this,A=this.$locale();if(!this.isValid())return A.invalidDate||_;var J=E||"YYYY-MM-DDTHH:mm:ssZ",d=G.z(this),f=this.$H,m=this.$m,g=this.$M,b=A.weekdays,v=A.months,k=function(I,me,se,re){return I&&(I[me]||I(H,J))||se[me].substr(0,re)},D=function(I){return G.s(f%12||12,I,"0")},S=A.meridiem||function(I,me,se){var re=I<12?"AM":"PM";return se?re.toLowerCase():re},O={YY:String(this.$y).slice(-2),YYYY:this.$y,M:g+1,MM:G.s(g+1,2,"0"),MMM:k(A.monthsShort,g,v,3),MMMM:k(v,g),D:this.$D,DD:G.s(this.$D,2,"0"),d:String(this.$W),dd:k(A.weekdaysMin,this.$W,b,2),ddd:k(A.weekdaysShort,this.$W,b,3),dddd:b[this.$W],H:String(f),HH:G.s(f,2,"0"),h:D(1),hh:D(2),a:S(f,m,!0),A:S(f,m,!1),m:String(m),mm:G.s(m,2,"0"),s:String(this.$s),ss:G.s(this.$s,2,"0"),SSS:G.s(this.$ms,3,"0"),Z:d};return J.replace(w,function(I,me){return me||O[I]||d.replace(":","")})},C.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},C.diff=function(E,H,A){var J,d=G.p(H),f=j(E),m=(f.utcOffset()-this.utcOffset())*e,g=this-f,b=G.m(this,f);return b=(J={},J[p]=b/12,J[l]=b,J[c]=b/3,J[u]=(g-m)/6048e5,J[o]=(g-m)/864e5,J[a]=g/t,J[s]=g/e,J[i]=g/r,J)[d]||g,A?b:G.a(b)},C.daysInMonth=function(){return this.endOf(l).$D},C.$locale=function(){return Z[this.$L]},C.locale=function(E,H){if(!E)return this.$L;var A=this.clone(),J=he(E,H,!0);return J&&(A.$L=J),A},C.clone=function(){return G.w(this.$d,this)},C.toDate=function(){return new Date(this.valueOf())},C.toJSON=function(){return this.isValid()?this.toISOString():null},C.toISOString=function(){return this.$d.toISOString()},C.toString=function(){return this.$d.toUTCString()},B}(),Fe=Ae.prototype;return j.prototype=Fe,[["$ms",n],["$s",i],["$m",s],["$H",a],["$W",o],["$M",l],["$y",p],["$D",h]].forEach(function(B){Fe[B[1]]=function(C){return this.$g(C,B[0],B[1])}}),j.extend=function(B,C){return B.$i||(B(C,Ae,j),B.$i=!0),j},j.locale=he,j.isDayjs=V,j.unix=function(B){return j(1e3*B)},j.en=Z[F],j.Ls=Z,j.p={},j})});var rt=T(tn=>{"use strict";var sv=tn&&tn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(tn,"__esModule",{value:!0});tn.findYearClosestToRef=tn.findMostLikelyADYear=void 0;var av=sv(be());function ov(r){return r<100&&(r>50?r=r+1900:r=r+2e3),r}tn.findMostLikelyADYear=ov;function uv(r,e,t){let n=av.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()}tn.findYearClosestToRef=uv});var nt=T(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.parseTimeUnits=ne.TIME_UNITS_PATTERN=ne.parseYear=ne.YEAR_PATTERN=ne.parseOrdinalNumberPattern=ne.ORDINAL_NUMBER_PATTERN=ne.parseNumberPattern=ne.NUMBER_PATTERN=ne.TIME_UNIT_DICTIONARY=ne.ORDINAL_WORD_DICTIONARY=ne.INTEGER_WORD_DICTIONARY=ne.MONTH_DICTIONARY=ne.FULL_MONTH_NAME_DICTIONARY=ne.WEEKDAY_DICTIONARY=void 0;var Ua=Ee(),lv=rt();ne.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};ne.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};ne.MONTH_DICTIONARY=Object.assign(Object.assign({},ne.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});ne.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};ne.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};ne.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"};ne.NUMBER_PATTERN=`(?:${Ua.matchAnyPattern(ne.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 Zp(r){let e=r.toLowerCase();return ne.INTEGER_WORD_DICTIONARY[e]!==void 0?ne.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)}ne.parseNumberPattern=Zp;ne.ORDINAL_NUMBER_PATTERN=`(?:${Ua.matchAnyPattern(ne.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:st|nd|rd|th)?)`;function cv(r){let e=r.toLowerCase();return ne.ORDINAL_WORD_DICTIONARY[e]!==void 0?ne.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}ne.parseOrdinalNumberPattern=cv;ne.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 dv(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 lv.findMostLikelyADYear(e)}ne.parseYear=dv;var Jp=`(${ne.NUMBER_PATTERN})\\s{0,3}(${Ua.matchAnyPattern(ne.TIME_UNIT_DICTIONARY)})`,Xp=new RegExp(Jp,"i");ne.TIME_UNITS_PATTERN=Ua.repeatedTimeunitPattern("(?:(?:about|around)\\s{0,3})?",Jp);function fv(r){let e={},t=r,n=Xp.exec(t);for(;n;)pv(e,n),t=t.substring(n[0].length).trim(),n=Xp.exec(t);return e}ne.parseTimeUnits=fv;function pv(r,e){let t=Zp(e[1]),n=ne.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var eh=T((Gu,Bu)=>{(function(r,e){typeof Gu=="object"&&typeof Bu!="undefined"?Bu.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs_plugin_quarterOfYear=e()})(Gu,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 p=this.quarter()-1;return c?this.month(3*p).startOf(r).startOf("day"):this.month(3*p+2).endOf(r).endOf("day")}return a.bind(this)(o,u)}}})});var jt=T(hr=>{"use strict";Object.defineProperty(hr,"__esModule",{value:!0});hr.implySimilarTime=hr.assignSimilarTime=hr.assignSimilarDate=hr.assignTheNextDay=void 0;var th=Ge();function hv(r,e){e=e.add(1,"day"),rh(r,e),nh(r,e)}hr.assignTheNextDay=hv;function rh(r,e){r.assign("day",e.date()),r.assign("month",e.month()+1),r.assign("year",e.year())}hr.assignSimilarDate=rh;function mv(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",th.Meridiem.AM):r.assign("meridiem",th.Meridiem.PM)}hr.assignSimilarTime=mv;function nh(r,e){r.imply("hour",e.hour()),r.imply("minute",e.minute()),r.imply("second",e.second()),r.imply("millisecond",e.millisecond())}hr.implySimilarTime=nh});var ih=T(En=>{"use strict";Object.defineProperty(En,"__esModule",{value:!0});En.toTimezoneOffset=En.TIMEZONE_ABBR_MAP=void 0;En.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 gv(r){var e;return r==null?null:typeof r=="number"?r:(e=En.TIMEZONE_ABBR_MAP[r])!==null&&e!==void 0?e:null}En.toTimezoneOffset=gv});var Pe=T(mr=>{"use strict";var sh=mr&&mr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(mr,"__esModule",{value:!0});mr.ParsingResult=mr.ParsingComponents=mr.ReferenceWithTimezone=void 0;var yv=sh(eh()),Wa=sh(be()),Hu=jt(),bv=ih();Wa.default.extend(yv.default);var zu=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=bv.toTimezoneOffset(e.timezone))}};mr.ReferenceWithTimezone=zu;var wn=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=Wa.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 wn(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 Wa.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=Wa.default(e.instant);for(let s in t)n=n.add(t[s],s);let i=new wn(e);return t.hour||t.minute||t.second?(Hu.assignSimilarTime(i,n),Hu.assignSimilarDate(i,n),e.timezoneOffset!==null&&i.assign("timezoneOffset",-e.instant.getTimezoneOffset())):(Hu.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}};mr.ParsingComponents=wn;var ns=class{constructor(e,t,n,i,s){this.reference=e,this.refDate=e.instant,this.index=t,this.text=n,this.start=i||new wn(e),this.end=s}clone(){let e=new ns(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}', ...}]`}};mr.ParsingResult=ns});var W=T(qa=>{"use strict";Object.defineProperty(qa,"__esModule",{value:!0});qa.AbstractParserWithWordBoundaryChecking=void 0;var Ku=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)}};qa.AbstractParserWithWordBoundaryChecking=Ku});var ah=T(Xu=>{"use strict";Object.defineProperty(Xu,"__esModule",{value:!0});var Qu=nt(),Tv=Pe(),_v=W(),vv=new RegExp(`(?:within|in|for)\\s*(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${Qu.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Ev=new RegExp(`(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${Qu.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Vu=class extends _v.AbstractParserWithWordBoundaryChecking{innerPattern(e){return e.option.forwardDate?Ev:vv}innerExtract(e,t){let n=Qu.parseTimeUnits(t[1]);return Tv.ParsingComponents.createRelativeFromReference(e.reference,n)}};Xu.default=Vu});var fh=T(Ju=>{"use strict";Object.defineProperty(Ju,"__esModule",{value:!0});var wv=rt(),ch=nt(),dh=nt(),$a=nt(),kv=Ee(),Sv=W(),Ov=new RegExp(`(?:on\\s{0,3})?(${$a.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:to|\\-|\\\u2013|until|through|till)?\\s{0,3}(${$a.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s{0,3}(?:of)?\\s{0,3})(${kv.matchAnyPattern(ch.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s{0,3})(${dh.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),oh=1,uh=2,Dv=3,lh=4,Zu=class extends Sv.AbstractParserWithWordBoundaryChecking{innerPattern(){return Ov}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=ch.MONTH_DICTIONARY[t[Dv].toLowerCase()],s=$a.parseOrdinalNumberPattern(t[oh]);if(s>31)return t.index=t.index+t[oh].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[lh]){let a=dh.parseYear(t[lh]);n.start.assign("year",a)}else{let a=wv.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[uh]){let a=$a.parseOrdinalNumberPattern(t[uh]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Ju.default=Zu});var yh=T(tl=>{"use strict";Object.defineProperty(tl,"__esModule",{value:!0});var Rv=rt(),mh=nt(),Ya=nt(),gh=nt(),xv=Ee(),Mv=W(),Cv=new RegExp(`(${xv.matchAnyPattern(mh.MONTH_DICTIONARY)})(?:-|/|\\s*,?\\s*)(${Ya.ORDINAL_NUMBER_PATTERN})(?!\\s*(?:am|pm))\\s*(?:(?:to|\\-)\\s*(${Ya.ORDINAL_NUMBER_PATTERN})\\s*)?(?:(?:-|/|\\s*,?\\s*)(${gh.YEAR_PATTERN}))?(?=\\W|$)(?!\\:\\d)`,"i"),Av=1,Pv=2,ph=3,hh=4,el=class extends Mv.AbstractParserWithWordBoundaryChecking{innerPattern(){return Cv}innerExtract(e,t){let n=mh.MONTH_DICTIONARY[t[Av].toLowerCase()],i=Ya.parseOrdinalNumberPattern(t[Pv]);if(i>31)return null;let s=e.createParsingComponents({day:i,month:n});if(t[hh]){let u=gh.parseYear(t[hh]);s.assign("year",u)}else{let u=Rv.findYearClosestToRef(e.refDate,i,n);s.imply("year",u)}if(!t[ph])return s;let a=Ya.parseOrdinalNumberPattern(t[ph]),o=e.createParsingResult(t.index,t[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",a),o}};tl.default=el});var _h=T(il=>{"use strict";Object.defineProperty(il,"__esModule",{value:!0});var rl=nt(),Nv=rt(),Iv=Ee(),Th=nt(),Fv=W(),Lv=new RegExp(`((?:in)\\s*)?(${Iv.matchAnyPattern(rl.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${Th.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),Uv=1,Wv=2,bh=3,nl=class extends Fv.AbstractParserWithWordBoundaryChecking{innerPattern(){return Lv}innerExtract(e,t){let n=t[Wv].toLowerCase();if(t[0].length<=3&&!rl.FULL_MONTH_NAME_DICTIONARY[n])return null;let i=e.createParsingResult(t.index+(t[Uv]||"").length,t.index+t[0].length);i.start.imply("day",1);let s=rl.MONTH_DICTIONARY[n];if(i.start.assign("month",s),t[bh]){let a=Th.parseYear(t[bh]);i.start.assign("year",a)}else{let a=Nv.findYearClosestToRef(e.refDate,1,s);i.start.imply("year",a)}return i}};il.default=nl});var wh=T(al=>{"use strict";Object.defineProperty(al,"__esModule",{value:!0});var Eh=nt(),qv=Ee(),$v=W(),Yv=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${qv.matchAnyPattern(Eh.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),jv=1,Gv=2,vh=3,Bv=4,sl=class extends $v.AbstractParserWithWordBoundaryChecking{innerPattern(){return Yv}innerExtract(e,t){let n=t[vh]?parseInt(t[vh]):Eh.MONTH_DICTIONARY[t[Gv].toLowerCase()];if(n<1||n>12)return null;let i=parseInt(t[jv]);return{day:parseInt(t[Bv]),month:n,year:i}}};al.default=sl});var kh=T(ul=>{"use strict";Object.defineProperty(ul,"__esModule",{value:!0});var Hv=W(),zv=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),Kv=1,Vv=2,ol=class extends Hv.AbstractParserWithWordBoundaryChecking{innerPattern(){return zv}innerExtract(e,t){let n=parseInt(t[Vv]),i=parseInt(t[Kv]);return e.createParsingComponents().imply("day",1).assign("month",i).assign("year",n)}};ul.default=ol});var kn=T(Ba=>{"use strict";Object.defineProperty(Ba,"__esModule",{value:!0});Ba.AbstractTimeExpressionParser=void 0;var Tt=Ge();function Qv(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 Xv(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 Sh=2,ni=3,ja=4,Ga=5,is=6,ll=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[Sh]);if(o>100){if(this.strictMode||t[ni]!=null)return null;s=o%100,o=Math.floor(o/100)}if(o>24)return null;if(t[ni]!=null){if(t[ni].length==1&&!t[is])return null;s=parseInt(t[ni])}if(s>=60)return null;if(o>12&&(a=Tt.Meridiem.PM),t[is]!=null){if(o>12)return null;let u=t[is][0].toLowerCase();u=="a"&&(a=Tt.Meridiem.AM,o==12&&(o=0)),u=="p"&&(a=Tt.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",Tt.Meridiem.AM):i.imply("meridiem",Tt.Meridiem.PM),t[Ga]!=null){let u=parseInt(t[Ga].substring(0,3));if(u>=1e3)return null;i.assign("millisecond",u)}if(t[ja]!=null){let u=parseInt(t[ja]);if(u>=60)return null;i.assign("second",u)}return i}extractFollowingTimeComponents(e,t,n){let i=e.createParsingComponents();if(t[Ga]!=null){let u=parseInt(t[Ga].substring(0,3));if(u>=1e3)return null;i.assign("millisecond",u)}if(t[ja]!=null){let u=parseInt(t[ja]);if(u>=60)return null;i.assign("second",u)}let s=parseInt(t[Sh]),a=0,o=-1;if(t[ni]!=null?a=parseInt(t[ni]):s>100&&(a=s%100,s=Math.floor(s/100)),a>=60||s>24)return null;if(s>=12&&(o=Tt.Meridiem.PM),t[is]!=null){if(s>12)return null;let u=t[is][0].toLowerCase();u=="a"&&(o=Tt.Meridiem.AM,s==12&&(s=0,i.isCertain("day")||i.imply("day",i.get("day")+1))),u=="p"&&(o=Tt.Meridiem.PM,s!=12&&(s+=12)),n.start.isCertain("meridiem")||(o==Tt.Meridiem.AM?(n.start.imply("meridiem",Tt.Meridiem.AM),n.start.get("hour")==12&&n.start.assign("hour",0)):(n.start.imply("meridiem",Tt.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",Tt.Meridiem.AM):s<=12&&(i.assign("hour",s+12),i.assign("meridiem",Tt.Meridiem.PM)):s>12?i.imply("meridiem",Tt.Meridiem.PM):s<=12&&i.imply("meridiem",Tt.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=Qv(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=Xv(e,t),this.cachedFollowingPhase=e,this.cachedFollowingSuffix=t,this.cachedFollowingTimePatten)}};Ba.AbstractTimeExpressionParser=ll});var Oh=T(dl=>{"use strict";Object.defineProperty(dl,"__esModule",{value:!0});var Ha=Ge(),Zv=kn(),cl=class extends Zv.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",Ha.Meridiem.PM)):i<6&&n.assign("meridiem",Ha.Meridiem.AM)}if(t[0].endsWith("afternoon")){n.assign("meridiem",Ha.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",Ha.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};dl.default=cl});var Gt=T(ii=>{"use strict";Object.defineProperty(ii,"__esModule",{value:!0});ii.addImpliedTimeUnits=ii.reverseTimeUnits=void 0;function Jv(r){let e={};for(let t in r)e[t]=-r[t];return e}ii.reverseTimeUnits=Jv;function eE(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}ii.addImpliedTimeUnits=eE});var Dh=T(hl=>{"use strict";Object.defineProperty(hl,"__esModule",{value:!0});var pl=nt(),tE=Pe(),rE=W(),nE=Gt(),iE=new RegExp(`(${pl.TIME_UNITS_PATTERN})\\s{0,5}(?:ago|before|earlier)(?=(?:\\W|$))`,"i"),sE=new RegExp(`(${pl.TIME_UNITS_PATTERN})\\s{0,5}ago(?=(?:\\W|$))`,"i"),fl=class extends rE.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?sE:iE}innerExtract(e,t){let n=pl.parseTimeUnits(t[1]),i=nE.reverseTimeUnits(n);return tE.ParsingComponents.createRelativeFromReference(e.reference,i)}};hl.default=fl});var Rh=T(yl=>{"use strict";Object.defineProperty(yl,"__esModule",{value:!0});var gl=nt(),aE=Pe(),oE=W(),uE=new RegExp(`(${gl.TIME_UNITS_PATTERN})\\s{0,5}(?:later|after|from now|henceforth|forward|out)(?=(?:\\W|$))`,"i"),lE=new RegExp("("+gl.TIME_UNITS_PATTERN+")(later|from now)(?=(?:\\W|$))","i"),cE=1,ml=class extends oE.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?lE:uE}innerExtract(e,t){let n=gl.parseTimeUnits(t[cE]);return aE.ParsingComponents.createRelativeFromReference(e.reference,n)}};yl.default=ml});var ai=T(si=>{"use strict";Object.defineProperty(si,"__esModule",{value:!0});si.MergingRefiner=si.Filter=void 0;var bl=class{refine(e,t){return t.filter(n=>this.isValid(e,n))}};si.Filter=bl;var Tl=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}};si.MergingRefiner=Tl});var gr=T(vl=>{"use strict";Object.defineProperty(vl,"__esModule",{value:!0});var dE=ai(),_l=class extends dE.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}};vl.default=_l});var xh=T(ss=>{"use strict";var fE=ss&&ss.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ss,"__esModule",{value:!0});var pE=fE(gr()),El=class extends pE.default{patternBetween(){return/^\s*(to|-)\s*$/i}};ss.default=El});var Mh=T(oi=>{"use strict";Object.defineProperty(oi,"__esModule",{value:!0});oi.mergeDateTimeComponent=oi.mergeDateTimeResult=void 0;var hE=Ge();function mE(r,e){let t=r.clone(),n=r.start,i=e.start;if(t.start=wl(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=wl(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}oi.mergeDateTimeResult=mE;function wl(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")==hE.Meridiem.PM&&t.get("hour")<12&&(e.isCertain("hour")?t.assign("hour",t.get("hour")+12):t.imply("hour",t.get("hour")+12)),t}oi.mergeDateTimeComponent=wl});var xr=T(Sl=>{"use strict";Object.defineProperty(Sl,"__esModule",{value:!0});var gE=ai(),Ch=Mh(),kl=class extends gE.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()?Ch.mergeDateTimeResult(t,n):Ch.mergeDateTimeResult(n,t);return i.index=t.index,i.text=t.text+e+n.text,i}};Sl.default=kl});var Ah=T(as=>{"use strict";var yE=as&&as.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(as,"__esModule",{value:!0});var bE=yE(xr()),Ol=class extends bE.default{patternBetween(){return new RegExp("^\\s*(T|at|after|before|on|of|,|-)?\\s*$")}};as.default=Ol});var Ph=T(Rl=>{"use strict";Object.defineProperty(Rl,"__esModule",{value:!0});var TE=new RegExp("^\\s*,?\\s*\\(?([A-Z]{2,4})\\)?(?=\\W|$)","i"),_E={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},Dl=class{constructor(e){this.timezone=Object.assign(Object.assign({},_E),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=TE.exec(u);if(!l)return;let c=l[1].toUpperCase(),p=(o=(a=i[c])!==null&&a!==void 0?a:this.timezone[c])!==null&&o!==void 0?o:null;if(p===null)return;e.debug(()=>{console.log(`Extracting timezone: '${c}' into: ${p} for: ${s.start}`)});let h=s.start.get("timezoneOffset");h!==null&&p!=h&&(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",p),s.end!=null&&!s.end.isCertain("timezoneOffset")&&s.end.assign("timezoneOffset",p))}),t}};Rl.default=Dl});var za=T(Ml=>{"use strict";Object.defineProperty(Ml,"__esModule",{value:!0});var vE=new RegExp("^\\s*(?:\\(?(?:GMT|UTC)\\s?)?([+-])(\\d{1,2})(?::?(\\d{2}))?\\)?","i"),EE=1,wE=2,kE=3,xl=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=vE.exec(i);if(!s)return;e.debug(()=>{console.log(`Extracting timezone: '${s[0]}' into : ${n}`)});let a=parseInt(s[wE]),o=parseInt(s[kE]||"0"),u=a*60+o;u>14*60||(s[EE]==="-"&&(u=-u),n.end!=null&&n.end.assign("timezoneOffset",u),n.start.assign("timezoneOffset",u),n.text+=s[0])}),t}};Ml.default=xl});var Nh=T(Al=>{"use strict";Object.defineProperty(Al,"__esModule",{value:!0});var Cl=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}};Al.default=Cl});var Ih=T(os=>{"use strict";var SE=os&&os.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(os,"__esModule",{value:!0});var OE=SE(be()),Pl=class{refine(e,t){return e.option.forwardDate&&t.forEach(function(n){let i=OE.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}};os.default=Pl});var Fh=T(Il=>{"use strict";Object.defineProperty(Il,"__esModule",{value:!0});var DE=ai(),Nl=class extends DE.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}};Il.default=Nl});var Ul=T(Ll=>{"use strict";Object.defineProperty(Ll,"__esModule",{value:!0});var RE=W(),xE=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"),ME=1,CE=2,AE=3,Lh=4,PE=5,Uh=6,Wh=7,qh=8,$h=9,Fl=class extends RE.AbstractParserWithWordBoundaryChecking{innerPattern(){return xE}innerExtract(e,t){let n={};if(n.year=parseInt(t[ME]),n.month=parseInt(t[CE]),n.day=parseInt(t[AE]),t[Lh]!=null)if(n.hour=parseInt(t[Lh]),n.minute=parseInt(t[PE]),t[Uh]!=null&&(n.second=parseInt(t[Uh])),t[Wh]!=null&&(n.millisecond=parseInt(t[Wh])),t[qh]==null)n.timezoneOffset=0;else{let i=parseInt(t[qh]),s=0;t[$h]!=null&&(s=parseInt(t[$h]));let a=i*60;a<0?a-=s:a+=s,n.timezoneOffset=a}return n}};Ll.default=Fl});var Yh=T(ql=>{"use strict";Object.defineProperty(ql,"__esModule",{value:!0});var NE=ai(),Wl=class extends NE.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}};ql.default=Wl});var Mr=T(ui=>{"use strict";var Sn=ui&&ui.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ui,"__esModule",{value:!0});ui.includeCommonConfiguration=void 0;var IE=Sn(Ph()),FE=Sn(za()),jh=Sn(Nh()),LE=Sn(Ih()),UE=Sn(Fh()),WE=Sn(Ul()),qE=Sn(Yh());function $E(r,e=!1){return r.parsers.unshift(new WE.default),r.refiners.unshift(new qE.default),r.refiners.unshift(new IE.default),r.refiners.unshift(new FE.default),r.refiners.unshift(new jh.default),r.refiners.push(new jh.default),r.refiners.push(new LE.default),r.refiners.push(new UE.default(e)),r}ui.includeCommonConfiguration=$E});var Ar=T(ve=>{"use strict";var YE=ve&&ve.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ve,"__esModule",{value:!0});ve.noon=ve.morning=ve.midnight=ve.yesterdayEvening=ve.evening=ve.lastNight=ve.tonight=ve.theDayAfter=ve.tomorrow=ve.theDayBefore=ve.yesterday=ve.today=ve.now=void 0;var yr=Pe(),li=YE(be()),Cr=jt(),us=Ge();function jE(r){let e=li.default(r.instant),t=new yr.ParsingComponents(r,{});return Cr.assignSimilarDate(t,e),Cr.assignSimilarTime(t,e),r.timezoneOffset!==null&&t.assign("timezoneOffset",e.utcOffset()),t}ve.now=jE;function GE(r){let e=li.default(r.instant),t=new yr.ParsingComponents(r,{});return Cr.assignSimilarDate(t,e),Cr.implySimilarTime(t,e),t}ve.today=GE;function BE(r){return Gh(r,1)}ve.yesterday=BE;function Gh(r,e){return $l(r,-e)}ve.theDayBefore=Gh;function HE(r){return $l(r,1)}ve.tomorrow=HE;function $l(r,e){let t=li.default(r.instant),n=new yr.ParsingComponents(r,{});return t=t.add(e,"day"),Cr.assignSimilarDate(n,t),Cr.implySimilarTime(n,t),n}ve.theDayAfter=$l;function zE(r,e=22){let t=li.default(r.instant),n=new yr.ParsingComponents(r,{});return n.imply("hour",e),n.imply("meridiem",us.Meridiem.PM),Cr.assignSimilarDate(n,t),n}ve.tonight=zE;function KE(r,e=0){let t=li.default(r.instant),n=new yr.ParsingComponents(r,{});return t.hour()<6&&(t=t.add(-1,"day")),Cr.assignSimilarDate(n,t),n.imply("hour",e),n}ve.lastNight=KE;function VE(r,e=20){let t=new yr.ParsingComponents(r,{});return t.imply("meridiem",us.Meridiem.PM),t.imply("hour",e),t}ve.evening=VE;function QE(r,e=20){let t=li.default(r.instant),n=new yr.ParsingComponents(r,{});return t=t.add(-1,"day"),Cr.assignSimilarDate(n,t),n.imply("hour",e),n.imply("meridiem",us.Meridiem.PM),n}ve.yesterdayEvening=QE;function XE(r){let e=new yr.ParsingComponents(r,{});return e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e}ve.midnight=XE;function ZE(r,e=6){let t=new yr.ParsingComponents(r,{});return t.imply("meridiem",us.Meridiem.AM),t.imply("hour",e),t}ve.morning=ZE;function JE(r){let e=new yr.ParsingComponents(r,{});return e.imply("meridiem",us.Meridiem.AM),e.imply("hour",12),e}ve.noon=JE});var Bh=T(tr=>{"use strict";var ew=tr&&tr.__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]}),tw=tr&&tr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),rw=tr&&tr.__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)&&ew(e,r,t);return tw(e,r),e},nw=tr&&tr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(tr,"__esModule",{value:!0});var iw=nw(be()),sw=W(),aw=jt(),ls=rw(Ar()),ow=/(now|today|tonight|tomorrow|tmr|tmrw|yesterday|last\s*night)(?=\W|$)/i,Yl=class extends sw.AbstractParserWithWordBoundaryChecking{innerPattern(e){return ow}innerExtract(e,t){let n=iw.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();switch(i){case"now":return ls.now(e.reference);case"today":return ls.today(e.reference);case"yesterday":return ls.yesterday(e.reference);case"tomorrow":case"tmr":case"tmrw":return ls.tomorrow(e.reference);case"tonight":return ls.tonight(e.reference);default:i.match(/last\s*night/)&&(n.hour()>6&&(n=n.add(-1,"day")),aw.assignSimilarDate(s,n),s.imply("hour",0));break}return s}};tr.default=Yl});var Hh=T(cs=>{"use strict";var uw=cs&&cs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(cs,"__esModule",{value:!0});var Ka=Ge(),lw=W(),cw=uw(be()),dw=jt(),fw=/(?:this)?\s{0,3}(morning|afternoon|evening|night|midnight|noon)(?=\W|$)/i,jl=class extends lw.AbstractParserWithWordBoundaryChecking{innerPattern(){return fw}innerExtract(e,t){let n=cw.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":dw.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}};cs.default=jl});var On=T(rn=>{"use strict";var pw=rn&&rn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(rn,"__esModule",{value:!0});rn.toDayJSClosestWeekday=rn.toDayJSWeekday=void 0;var zh=pw(be());function hw(r,e,t){if(!t)return Kh(r,e);let n=zh.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}rn.toDayJSWeekday=hw;function Kh(r,e){let t=zh.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}rn.toDayJSClosestWeekday=Kh});var Qh=T(Bl=>{"use strict";Object.defineProperty(Bl,"__esModule",{value:!0});var Vh=nt(),mw=Ee(),gw=W(),yw=On(),bw=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:on\\s*?)?(?:(this|last|past|next)\\s*)?(${mw.matchAnyPattern(Vh.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(this|last|past|next)\\s*week)?(?=\\W|$)`,"i"),Tw=1,_w=2,vw=3,Gl=class extends gw.AbstractParserWithWordBoundaryChecking{innerPattern(){return bw}innerExtract(e,t){let n=t[_w].toLowerCase(),i=Vh.WEEKDAY_DICTIONARY[n],s=t[Tw],a=t[vw],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=yw.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Bl.default=Gl});var Jh=T(ds=>{"use strict";var Ew=ds&&ds.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ds,"__esModule",{value:!0});var Zh=nt(),Xh=Pe(),ww=Ew(be()),kw=W(),Sw=Ee(),Ow=new RegExp(`(this|last|past|next|after\\s*this)\\s*(${Sw.matchAnyPattern(Zh.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),Dw=1,Rw=2,Hl=class extends kw.AbstractParserWithWordBoundaryChecking{innerPattern(){return Ow}innerExtract(e,t){let n=t[Dw].toLowerCase(),i=t[Rw].toLowerCase(),s=Zh.TIME_UNIT_DICTIONARY[i];if(n=="next"||n.startsWith("after")){let u={};return u[s]=1,Xh.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="last"||n=="past"){let u={};return u[s]=-1,Xh.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=ww.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}};ds.default=Hl});var rr=T(fi=>{"use strict";Object.defineProperty(fi,"__esModule",{value:!0});fi.ParsingContext=fi.Chrono=void 0;var ci=Pe(),xw=zl(),di=class{constructor(e){e=e||xw.createCasualConfiguration(),this.parsers=[...e.parsers],this.refiners=[...e.refiners]}clone(){return new di({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 Va(e,t,n),s=[];return this.parsers.forEach(a=>{let o=di.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 ci.ParsingResult?c=l:l instanceof ci.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}};fi.Chrono=di;var Va=class{constructor(e,t,n){this.text=e,this.reference=new ci.ReferenceWithTimezone(t),this.option=n!=null?n:{},this.refDate=this.reference.instant}createParsingComponents(e){return e instanceof ci.ParsingComponents?e:new ci.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 ci.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))}};fi.ParsingContext=Va});var Dn=T(Ql=>{"use strict";Object.defineProperty(Ql,"__esModule",{value:!0});var em=rt(),Mw=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"),Qa=1,tm=5,rm=2,nm=3,Kl=4,Vl=class{constructor(e){this.groupNumberMonth=e?nm:rm,this.groupNumberDay=e?rm:nm}pattern(){return Mw}extract(e,t){if(t[Qa]=="/"||t[tm]=="/"){t.index+=t[0].length;return}let n=t.index+t[Qa].length,i=t[0].substr(t[Qa].length,t[0].length-t[Qa].length-t[tm].length);if(i.match(/^\d\.\d$/)||i.match(/^\d\.\d{1,2}\.\d{1,2}\s*$/)||!t[Kl]&&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[Kl]){let u=parseInt(t[Kl]),l=em.findMostLikelyADYear(u);s.start.assign("year",l)}else{let u=em.findYearClosestToRef(e.refDate,o,a);s.start.imply("year",u)}return s}};Ql.default=Vl});var sm=T(Zl=>{"use strict";Object.defineProperty(Zl,"__esModule",{value:!0});var im=nt(),Cw=Pe(),Aw=W(),Pw=Gt(),Nw=new RegExp(`(this|last|past|next|after|\\+|-)\\s*(${im.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Xl=class extends Aw.AbstractParserWithWordBoundaryChecking{innerPattern(){return Nw}innerExtract(e,t){let n=t[1].toLowerCase(),i=im.parseTimeUnits(t[2]);switch(n){case"last":case"past":case"-":i=Pw.reverseTimeUnits(i);break}return Cw.ParsingComponents.createRelativeFromReference(e.reference,i)}};Zl.default=Xl});var om=T(tc=>{"use strict";Object.defineProperty(tc,"__esModule",{value:!0});var Iw=ai(),Jl=Pe(),Fw=nt(),Lw=Gt();function am(r){return r.text.match(/\s+(before|from)$/i)!=null}function Uw(r){return r.text.match(/\s+(after|since)$/i)!=null}var ec=class extends Iw.MergingRefiner{patternBetween(){return/^\s*$/i}shouldMergeResults(e,t,n){return!e.match(this.patternBetween())||!am(t)&&!Uw(t)?!1:!!n.start.get("day")&&!!n.start.get("month")&&!!n.start.get("year")}mergeResults(e,t,n){let i=Fw.parseTimeUnits(t.text);am(t)&&(i=Lw.reverseTimeUnits(i));let s=Jl.ParsingComponents.createRelativeFromReference(new Jl.ReferenceWithTimezone(n.start.date()),i);return new Jl.ParsingResult(n.reference,t.index,`${t.text}${e}${n.text}`,s)}};tc.default=ec});var zl=T(qe=>{"use strict";var Be=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 Ww=Be(ah()),qw=Be(fh()),$w=Be(yh()),Yw=Be(_h()),jw=Be(wh()),Gw=Be(kh()),Bw=Be(Oh()),Hw=Be(Dh()),zw=Be(Rh()),Kw=Be(xh()),Vw=Be(Ah()),Qw=Mr(),Xw=Be(Bh()),Zw=Be(Hh()),Jw=Be(Qh()),ek=Be(Jh()),rc=rr(),tk=Be(Dn()),rk=Be(sm()),nk=Be(om());qe.casual=new rc.Chrono(um(!1));qe.strict=new rc.Chrono(Xa(!0,!1));qe.GB=new rc.Chrono(Xa(!1,!0));function ik(r,e,t){return qe.casual.parse(r,e,t)}qe.parse=ik;function sk(r,e,t){return qe.casual.parseDate(r,e,t)}qe.parseDate=sk;function um(r=!1){let e=Xa(!1,r);return e.parsers.unshift(new Xw.default),e.parsers.unshift(new Zw.default),e.parsers.unshift(new Yw.default),e.parsers.unshift(new ek.default),e.parsers.unshift(new rk.default),e}qe.createCasualConfiguration=um;function Xa(r=!0,e=!1){return Qw.includeCommonConfiguration({parsers:[new tk.default(e),new Ww.default,new qw.default,new $w.default,new Jw.default,new jw.default,new Gw.default,new Bw.default(r),new Hw.default(r),new zw.default(r)],refiners:[new nk.default,new Vw.default,new Kw.default]},r)}qe.createConfiguration=Xa});var lm=T(ic=>{"use strict";Object.defineProperty(ic,"__esModule",{value:!0});var ak=kn(),nc=class extends ak.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)}};ic.default=nc});var fs=T(Se=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});Se.parseTimeUnits=Se.TIME_UNITS_PATTERN=Se.parseYear=Se.YEAR_PATTERN=Se.parseNumberPattern=Se.NUMBER_PATTERN=Se.TIME_UNIT_DICTIONARY=Se.INTEGER_WORD_DICTIONARY=Se.MONTH_DICTIONARY=Se.WEEKDAY_DICTIONARY=void 0;var sc=Ee(),ok=rt();Se.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};Se.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};Se.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};Se.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"};Se.NUMBER_PATTERN=`(?:${sc.matchAnyPattern(Se.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s*an?)?|an?\\b(?:\\s*few)?|few|several|a?\\s*couple\\s*(?:of)?)`;function dm(r){let e=r.toLowerCase();return Se.INTEGER_WORD_DICTIONARY[e]!==void 0?Se.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)}Se.parseNumberPattern=dm;Se.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 uk(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 ok.findMostLikelyADYear(e)}Se.parseYear=uk;var fm=`(${Se.NUMBER_PATTERN})\\s{0,5}(${sc.matchAnyPattern(Se.TIME_UNIT_DICTIONARY)})\\s{0,5}`,cm=new RegExp(fm,"i");Se.TIME_UNITS_PATTERN=sc.repeatedTimeunitPattern("",fm);function lk(r){let e={},t=r,n=cm.exec(t);for(;n;)ck(e,n),t=t.substring(n[0].length),n=cm.exec(t);return e}Se.parseTimeUnits=lk;function ck(r,e){let t=dm(e[1]),n=Se.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var hm=T(oc=>{"use strict";Object.defineProperty(oc,"__esModule",{value:!0});var pm=fs(),dk=Ee(),fk=W(),pk=On(),hk=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:a[mn]\\s*?)?(?:(diese[mn]|letzte[mn]|n(?:\xE4|ae)chste[mn])\\s*)?(${dk.matchAnyPattern(pm.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(diese|letzte|n(?:\xE4|ae)chste)\\s*woche)?(?=\\W|$)`,"i"),mk=1,gk=3,yk=2,ac=class extends fk.AbstractParserWithWordBoundaryChecking{innerPattern(){return hk}innerExtract(e,t){let n=t[yk].toLowerCase(),i=pm.WEEKDAY_DICTIONARY[n],s=t[mk],a=t[gk],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=pk.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};oc.default=ac});var bm=T(uc=>{"use strict";Object.defineProperty(uc,"__esModule",{value:!0});var nn=Ge(),bk=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"),Tk=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"),_k=2,mm=3,gm=4,ym=5,pi=class{pattern(e){return bk}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=pi.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=Tk.exec(i);return s&&(n.end=pi.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[_k]),t[mm]!=null&&(i=parseInt(t[mm])),i>=60||n>24)return null;if(n>=12&&(s=nn.Meridiem.PM),t[ym]!=null){if(n>12)return null;let a=t[ym].toLowerCase();a.match(/morgen|vormittag/)&&(s=nn.Meridiem.AM,n==12&&(n=0)),a.match(/nachmittag|abend/)&&(s=nn.Meridiem.PM,n!=12&&(n+=12)),a.match(/nacht/)&&(n==12?(s=nn.Meridiem.AM,n=0):n<6?s=nn.Meridiem.AM:(s=nn.Meridiem.PM,n+=12))}if(e.assign("hour",n),e.assign("minute",i),s!==null?e.assign("meridiem",s):n<12?e.imply("meridiem",nn.Meridiem.AM):e.imply("meridiem",nn.Meridiem.PM),t[gm]!=null){let a=parseInt(t[gm]);if(a>=60)return null;e.assign("second",a)}return e}};uc.default=pi});var Tm=T(ps=>{"use strict";var vk=ps&&ps.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ps,"__esModule",{value:!0});var Ek=vk(gr()),lc=class extends Ek.default{patternBetween(){return/^\s*(bis(?:\s*(?:am|zum))?|-)\s*$/i}};ps.default=lc});var _m=T(hs=>{"use strict";var wk=hs&&hs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(hs,"__esModule",{value:!0});var kk=wk(xr()),cc=class extends kk.default{patternBetween(){return new RegExp("^\\s*(T|um|am|,|-)?\\s*$")}};hs.default=cc});var dc=T(gs=>{"use strict";var Sk=gs&&gs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(gs,"__esModule",{value:!0});var Ok=Sk(be()),Rn=Ge(),Dk=W(),Rk=jt(),xk=Gt(),ms=class extends Dk.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(diesen)?\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht)(?=\W|$)/i}innerExtract(e,t){let n=Ok.default(e.refDate),i=t[2].toLowerCase(),s=e.createParsingComponents();return Rk.implySimilarTime(s,n),ms.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",Rn.Meridiem.AM);break;case"vormittag":e.imply("hour",9),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Rn.Meridiem.AM);break;case"mittag":case"mittags":e.imply("hour",12),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Rn.Meridiem.AM);break;case"nachmittag":e.imply("hour",15),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Rn.Meridiem.PM);break;case"abend":e.imply("hour",18),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Rn.Meridiem.PM);break;case"nacht":e.imply("hour",22),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Rn.Meridiem.PM);break;case"mitternacht":e.get("hour")>1&&(e=xk.addImpliedTimeUnits(e,{day:1})),e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Rn.Meridiem.AM);break}return e}};gs.default=ms});var wm=T(nr=>{"use strict";var Mk=nr&&nr.__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]}),Ck=nr&&nr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Ak=nr&&nr.__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)&&Mk(e,r,t);return Ck(e,r),e},Em=nr&&nr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(nr,"__esModule",{value:!0});var Pk=Em(be()),Nk=W(),xn=jt(),Ik=Em(dc()),vm=Ak(Ar()),Fk=new RegExp("(jetzt|heute|morgen|\xFCbermorgen|uebermorgen|gestern|vorgestern|letzte\\s*nacht)(?:\\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht))?(?=\\W|$)","i"),Lk=1,Uk=2,fc=class extends Nk.AbstractParserWithWordBoundaryChecking{innerPattern(e){return Fk}innerExtract(e,t){let n=Pk.default(e.refDate),i=(t[Lk]||"").toLowerCase(),s=(t[Uk]||"").toLowerCase(),a=e.createParsingComponents();switch(i){case"jetzt":a=vm.now(e.reference);break;case"heute":a=vm.today(e.reference);break;case"morgen":xn.assignTheNextDay(a,n);break;case"\xFCbermorgen":case"uebermorgen":n=n.add(1,"day"),xn.assignTheNextDay(a,n);break;case"gestern":n=n.add(-1,"day"),xn.assignSimilarDate(a,n),xn.implySimilarTime(a,n);break;case"vorgestern":n=n.add(-2,"day"),xn.assignSimilarDate(a,n),xn.implySimilarTime(a,n);break;default:i.match(/letzte\s*nacht/)&&(n.hour()>6&&(n=n.add(-1,"day")),xn.assignSimilarDate(a,n),a.imply("hour",0));break}return s&&(a=Ik.default.extractTimeComponents(a,s)),a}};nr.default=fc});var xm=T(hc=>{"use strict";Object.defineProperty(hc,"__esModule",{value:!0});var Wk=rt(),Dm=fs(),Rm=fs(),qk=Ee(),$k=W(),Yk=new RegExp(`(?:am\\s*?)?(?:den\\s*?)?([0-9]{1,2})\\.(?:\\s*(?:bis(?:\\s*(?:am|zum))?|\\-|\\\u2013|\\s)\\s*([0-9]{1,2})\\.?)?\\s*(${qk.matchAnyPattern(Dm.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${Rm.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),km=1,Sm=2,jk=3,Om=4,pc=class extends $k.AbstractParserWithWordBoundaryChecking{innerPattern(){return Yk}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Dm.MONTH_DICTIONARY[t[jk].toLowerCase()],s=parseInt(t[km]);if(s>31)return t.index=t.index+t[km].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[Om]){let a=Rm.parseYear(t[Om]);n.start.assign("year",a)}else{let a=Wk.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[Sm]){let a=parseInt(t[Sm]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};hc.default=pc});var Mm=T(gc=>{"use strict";Object.defineProperty(gc,"__esModule",{value:!0});var Za=fs(),Gk=Pe(),Bk=W(),Hk=Gt(),zk=Ee(),mc=class extends Bk.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*)?(${Za.NUMBER_PATTERN})?(?:\\s*(n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?)?\\s*(${zk.matchAnyPattern(Za.TIME_UNIT_DICTIONARY)})`,"i")}innerExtract(e,t){let n=t[2]?Za.parseNumberPattern(t[2]):1,i=Za.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=Hk.reverseTimeUnits(s)),Gk.ParsingComponents.createRelativeFromReference(e.reference,s)}};gc.default=mc});var Pm=T(He=>{"use strict";var ir=He&&He.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(He,"__esModule",{value:!0});He.createConfiguration=He.createCasualConfiguration=He.parseDate=He.parse=He.strict=He.casual=void 0;var Kk=Mr(),Cm=rr(),Vk=ir(Dn()),Qk=ir(Ul()),Xk=ir(lm()),Zk=ir(hm()),Jk=ir(bm()),e1=ir(Tm()),t1=ir(_m()),r1=ir(wm()),n1=ir(dc()),i1=ir(xm()),s1=ir(Mm());He.casual=new Cm.Chrono(Am());He.strict=new Cm.Chrono(yc(!0));function a1(r,e,t){return He.casual.parse(r,e,t)}He.parse=a1;function o1(r,e,t){return He.casual.parseDate(r,e,t)}He.parseDate=o1;function Am(r=!0){let e=yc(!1,r);return e.parsers.unshift(new n1.default),e.parsers.unshift(new r1.default),e.parsers.unshift(new s1.default),e}He.createCasualConfiguration=Am;function yc(r=!0,e=!0){return Kk.includeCommonConfiguration({parsers:[new Qk.default,new Vk.default(e),new Xk.default,new Jk.default,new i1.default,new Zk.default],refiners:[new e1.default,new t1.default]},r)}He.createConfiguration=yc});var Im=T(sr=>{"use strict";var u1=sr&&sr.__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]}),l1=sr&&sr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),c1=sr&&sr.__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)&&u1(e,r,t);return l1(e,r),e},d1=sr&&sr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(sr,"__esModule",{value:!0});var f1=d1(be()),p1=Ge(),h1=W(),Nm=jt(),Ja=c1(Ar()),bc=class extends h1.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(maintenant|aujourd'hui|demain|hier|cette\s*nuit|la\s*veille)(?=\W|$)/i}innerExtract(e,t){let n=f1.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();switch(i){case"maintenant":return Ja.now(e.reference);case"aujourd'hui":return Ja.today(e.reference);case"hier":return Ja.yesterday(e.reference);case"demain":return Ja.tomorrow(e.reference);default:i.match(/cette\s*nuit/)?(Nm.assignSimilarDate(s,n),s.imply("hour",22),s.imply("meridiem",p1.Meridiem.PM)):i.match(/la\s*veille/)&&(n=n.add(-1,"day"),Nm.assignSimilarDate(s,n),s.imply("hour",0))}return s}};sr.default=bc});var Fm=T(_c=>{"use strict";Object.defineProperty(_c,"__esModule",{value:!0});var ys=Ge(),m1=W(),Tc=class extends m1.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",ys.Meridiem.PM);break;case"soir":i.imply("hour",18),i.imply("minute",0),i.imply("meridiem",ys.Meridiem.PM);break;case"matin":i.imply("hour",8),i.imply("minute",0),i.imply("meridiem",ys.Meridiem.AM);break;case"a midi":i.imply("hour",12),i.imply("minute",0),i.imply("meridiem",ys.Meridiem.AM);break;case"\xE0 minuit":i.imply("hour",0),i.imply("meridiem",ys.Meridiem.AM);break}return i}};_c.default=Tc});var Lm=T(Ec=>{"use strict";Object.defineProperty(Ec,"__esModule",{value:!0});var g1=kn(),vc=class extends g1.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)}};Ec.default=vc});var Um=T(bs=>{"use strict";var y1=bs&&bs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(bs,"__esModule",{value:!0});var b1=y1(xr()),wc=class extends b1.default{patternBetween(){return new RegExp("^\\s*(T|\xE0|a|vers|de|,|-)?\\s*$")}};bs.default=wc});var Wm=T(Ts=>{"use strict";var T1=Ts&&Ts.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ts,"__esModule",{value:!0});var _1=T1(gr()),kc=class extends _1.default{patternBetween(){return/^\s*(à|a|-)\s*$/i}};Ts.default=kc});var sn=T(Te=>{"use strict";Object.defineProperty(Te,"__esModule",{value:!0});Te.parseTimeUnits=Te.TIME_UNITS_PATTERN=Te.parseYear=Te.YEAR_PATTERN=Te.parseOrdinalNumberPattern=Te.ORDINAL_NUMBER_PATTERN=Te.parseNumberPattern=Te.NUMBER_PATTERN=Te.TIME_UNIT_DICTIONARY=Te.INTEGER_WORD_DICTIONARY=Te.MONTH_DICTIONARY=Te.WEEKDAY_DICTIONARY=void 0;var Sc=Ee();Te.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};Te.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};Te.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};Te.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"};Te.NUMBER_PATTERN=`(?:${Sc.matchAnyPattern(Te.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|une?\\b|quelques?|demi-?)`;function $m(r){let e=r.toLowerCase();return Te.INTEGER_WORD_DICTIONARY[e]!==void 0?Te.INTEGER_WORD_DICTIONARY[e]:e==="une"||e==="un"?1:e.match(/quelques?/)?3:e.match(/demi-?/)?.5:parseFloat(e)}Te.parseNumberPattern=$m;Te.ORDINAL_NUMBER_PATTERN="(?:[0-9]{1,2}(?:er)?)";function v1(r){let e=r.toLowerCase();return e=e.replace(/(?:er)$/i,""),parseInt(e)}Te.parseOrdinalNumberPattern=v1;Te.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 E1(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}Te.parseYear=E1;var Ym=`(${Te.NUMBER_PATTERN})\\s{0,5}(${Sc.matchAnyPattern(Te.TIME_UNIT_DICTIONARY)})\\s{0,5}`,qm=new RegExp(Ym,"i");Te.TIME_UNITS_PATTERN=Sc.repeatedTimeunitPattern("",Ym);function w1(r){let e={},t=r,n=qm.exec(t);for(;n;)k1(e,n),t=t.substring(n[0].length),n=qm.exec(t);return e}Te.parseTimeUnits=w1;function k1(r,e){let t=$m(e[1]),n=Te.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Gm=T(Dc=>{"use strict";Object.defineProperty(Dc,"__esModule",{value:!0});var jm=sn(),S1=Ee(),O1=W(),D1=On(),R1=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(?:ce)\\s*)?(${S1.matchAnyPattern(jm.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(dernier|prochain)\\s*)?(?=\\W|\\d|$)`,"i"),x1=1,M1=2,Oc=class extends O1.AbstractParserWithWordBoundaryChecking{innerPattern(){return R1}innerExtract(e,t){let n=t[x1].toLowerCase(),i=jm.WEEKDAY_DICTIONARY[n];if(i===void 0)return null;let s=t[M1];s=s||"",s=s.toLowerCase();let a=null;s=="dernier"?a="last":s=="prochain"&&(a="next");let o=D1.toDayJSWeekday(e.refDate,i,a);return e.createParsingComponents().assign("weekday",i).imply("day",o.date()).imply("month",o.month()+1).imply("year",o.year())}};Dc.default=Oc});var Km=T(Rc=>{"use strict";Object.defineProperty(Rc,"__esModule",{value:!0});var _s=Ge(),C1=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"),A1=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"),P1=2,Bm=3,Hm=4,zm=5,hi=class{pattern(e){return C1}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=hi.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=A1.exec(i);return s&&(n.end=hi.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[P1]),t[Bm]!=null&&(i=parseInt(t[Bm])),i>=60||n>24)return null;if(n>=12&&(s=_s.Meridiem.PM),t[zm]!=null){if(n>12)return null;let a=t[zm][0].toLowerCase();a=="a"&&(s=_s.Meridiem.AM,n==12&&(n=0)),a=="p"&&(s=_s.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",_s.Meridiem.AM):e.imply("meridiem",_s.Meridiem.PM),t[Hm]!=null){let a=parseInt(t[Hm]);if(a>=60)return null;e.assign("second",a)}return e}};Rc.default=hi});var eg=T(Mc=>{"use strict";Object.defineProperty(Mc,"__esModule",{value:!0});var N1=rt(),Zm=sn(),Jm=sn(),eo=sn(),I1=Ee(),F1=W(),L1=new RegExp(`(?:on\\s*?)?(${eo.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:au|\\-|\\\u2013|jusqu'au?|\\s)\\s*(${eo.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:de)?\\s*)(${I1.matchAnyPattern(Zm.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${Jm.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Vm=1,Qm=2,U1=3,Xm=4,xc=class extends F1.AbstractParserWithWordBoundaryChecking{innerPattern(){return L1}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Zm.MONTH_DICTIONARY[t[U1].toLowerCase()],s=eo.parseOrdinalNumberPattern(t[Vm]);if(s>31)return t.index=t.index+t[Vm].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[Xm]){let a=Jm.parseYear(t[Xm]);n.start.assign("year",a)}else{let a=N1.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[Qm]){let a=eo.parseOrdinalNumberPattern(t[Qm]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Mc.default=xc});var rg=T(Ac=>{"use strict";Object.defineProperty(Ac,"__esModule",{value:!0});var tg=sn(),W1=Pe(),q1=W(),$1=Gt(),Cc=class extends q1.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`il y a\\s*(${tg.TIME_UNITS_PATTERN})(?=(?:\\W|$))`,"i")}innerExtract(e,t){let n=tg.parseTimeUnits(t[1]),i=$1.reverseTimeUnits(n);return W1.ParsingComponents.createRelativeFromReference(e.reference,i)}};Ac.default=Cc});var ig=T(Nc=>{"use strict";Object.defineProperty(Nc,"__esModule",{value:!0});var ng=sn(),Y1=Pe(),j1=W(),Pc=class extends j1.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp(`(?:dans|en|pour|pendant|de)\\s*(${ng.TIME_UNITS_PATTERN})(?=\\W|$)`,"i")}innerExtract(e,t){let n=ng.parseTimeUnits(t[1]);return Y1.ParsingComponents.createRelativeFromReference(e.reference,n)}};Nc.default=Pc});var sg=T(Fc=>{"use strict";Object.defineProperty(Fc,"__esModule",{value:!0});var to=sn(),G1=Pe(),B1=W(),H1=Gt(),z1=Ee(),Ic=class extends B1.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:les?|la|l'|du|des?)\\s*(${to.NUMBER_PATTERN})?(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?\\s*(${z1.matchAnyPattern(to.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]?to.parseNumberPattern(t[1]):1,i=to.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=H1.reverseTimeUnits(s)),G1.ParsingComponents.createRelativeFromReference(e.reference,s)}};Fc.default=Ic});var ug=T(ze=>{"use strict";var Bt=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 K1=Mr(),ag=rr(),V1=Bt(Im()),Q1=Bt(Fm()),X1=Bt(Dn()),Z1=Bt(Lm()),J1=Bt(Um()),eS=Bt(Wm()),tS=Bt(Gm()),rS=Bt(Km()),nS=Bt(eg()),iS=Bt(rg()),sS=Bt(ig()),aS=Bt(sg());ze.casual=new ag.Chrono(og());ze.strict=new ag.Chrono(Lc(!0));function oS(r,e,t){return ze.casual.parse(r,e,t)}ze.parse=oS;function uS(r,e,t){return ze.casual.parseDate(r,e,t)}ze.parseDate=uS;function og(r=!0){let e=Lc(!1,r);return e.parsers.unshift(new V1.default),e.parsers.unshift(new Q1.default),e.parsers.unshift(new aS.default),e}ze.createCasualConfiguration=og;function Lc(r=!0,e=!0){return K1.includeCommonConfiguration({parsers:[new X1.default(e),new nS.default,new Z1.default,new rS.default,new iS.default,new sS.default,new tS.default],refiners:[new J1.default,new eS.default]},r)}ze.createConfiguration=Lc});var lg=T(ro=>{"use strict";Object.defineProperty(ro,"__esModule",{value:!0});ro.toHankaku=void 0;function lS(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,cS)}ro.toHankaku=lS;function cS(r){return String.fromCharCode(r.charCodeAt(0)-65248)}});var dg=T(vs=>{"use strict";var dS=vs&&vs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(vs,"__esModule",{value:!0});var Uc=lg(),fS=rt(),pS=dS(be()),hS=/(?:(?:([同今本])|((昭和|平成|令和)?([0-9-]{1,4}|元)))年\s*)?([0-9-]{1,2})月\s*([0-9-]{1,2})日/i,cg=1,mS=2,Wc=3,gS=4,yS=5,bS=6,qc=class{pattern(){return hS}extract(e,t){let n=parseInt(Uc.toHankaku(t[yS])),i=parseInt(Uc.toHankaku(t[bS])),s=e.createParsingComponents({day:i,month:n});if(t[cg]&&t[cg].match("\u540C|\u4ECA|\u672C")){let a=pS.default(e.refDate);s.assign("year",a.year())}if(t[mS]){let a=t[gS],o=a=="\u5143"?1:parseInt(Uc.toHankaku(a));t[Wc]=="\u4EE4\u548C"?o+=2018:t[Wc]=="\u5E73\u6210"?o+=1988:t[Wc]=="\u662D\u548C"&&(o+=1925),s.assign("year",o)}else{let a=fS.findYearClosestToRef(e.refDate,i,n);s.imply("year",a)}return s}};vs.default=qc});var fg=T(Es=>{"use strict";var TS=Es&&Es.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Es,"__esModule",{value:!0});var _S=TS(gr()),$c=class extends _S.default{patternBetween(){return/^\s*(から|ー|-)\s*$/i}};Es.default=$c});var hg=T(ar=>{"use strict";var vS=ar&&ar.__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]}),ES=ar&&ar.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),wS=ar&&ar.__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)&&vS(e,r,t);return ES(e,r),e},kS=ar&&ar.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ar,"__esModule",{value:!0});var SS=kS(be()),pg=Ge(),Yc=wS(Ar()),OS=/今日|当日|昨日|明日|今夜|今夕|今晩|今朝/i,jc=class{pattern(){return OS}extract(e,t){let n=t[0],i=SS.default(e.refDate),s=e.createParsingComponents();switch(n){case"\u6628\u65E5":return Yc.yesterday(e.reference);case"\u660E\u65E5":return Yc.tomorrow(e.reference);case"\u4ECA\u65E5":case"\u5F53\u65E5":return Yc.today(e.reference)}return n=="\u4ECA\u591C"||n=="\u4ECA\u5915"||n=="\u4ECA\u6669"?(s.imply("hour",22),s.assign("meridiem",pg.Meridiem.PM)):n.match("\u4ECA\u671D")&&(s.imply("hour",6),s.assign("meridiem",pg.Meridiem.AM)),s.assign("day",i.date()),s.assign("month",i.month()+1),s.assign("year",i.year()),s}};ar.default=jc});var yg=T(Ke=>{"use strict";var Gc=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 DS=Gc(dg()),RS=Gc(fg()),xS=Gc(hg()),mg=rr();Ke.casual=new mg.Chrono(gg());Ke.strict=new mg.Chrono(Bc());function MS(r,e,t){return Ke.casual.parse(r,e,t)}Ke.parse=MS;function CS(r,e,t){return Ke.casual.parseDate(r,e,t)}Ke.parseDate=CS;function gg(){let r=Bc();return r.parsers.unshift(new xS.default),r}Ke.createCasualConfiguration=gg;function Bc(){return{parsers:[new DS.default],refiners:[new RS.default]}}Ke.createConfiguration=Bc});var no=T(br=>{"use strict";Object.defineProperty(br,"__esModule",{value:!0});br.parseYear=br.YEAR_PATTERN=br.MONTH_DICTIONARY=br.WEEKDAY_DICTIONARY=void 0;br.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};br.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};br.YEAR_PATTERN="[0-9]{1,4}(?![^\\s]\\d)(?:\\s*[a|d]\\.?\\s*c\\.?|\\s*a\\.?\\s*d\\.?)?";function AS(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)}br.parseYear=AS});var Tg=T(zc=>{"use strict";Object.defineProperty(zc,"__esModule",{value:!0});var bg=no(),PS=Ee(),NS=W(),IS=On(),FS=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(este|esta|passado|pr[o\xF3]ximo)\\s*)?(${PS.matchAnyPattern(bg.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(este|esta|passado|pr[\xF3o]ximo)\\s*semana)?(?=\\W|\\d|$)`,"i"),LS=1,US=2,WS=3,Hc=class extends NS.AbstractParserWithWordBoundaryChecking{innerPattern(){return FS}innerExtract(e,t){let n=t[US].toLowerCase(),i=bg.WEEKDAY_DICTIONARY[n];if(i===void 0)return null;let s=t[LS],a=t[WS],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=IS.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};zc.default=Hc});var _g=T(Vc=>{"use strict";Object.defineProperty(Vc,"__esModule",{value:!0});var qS=kn(),Kc=class extends qS.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:ao?|\xE0s?|das|da|de|do)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|a(?:o)?|\\?)\\s*"}};Vc.default=Kc});var vg=T(ws=>{"use strict";var $S=ws&&ws.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ws,"__esModule",{value:!0});var YS=$S(xr()),Qc=class extends YS.default{patternBetween(){return new RegExp("^\\s*(?:,|\xE0)?\\s*$")}};ws.default=Qc});var Eg=T(ks=>{"use strict";var jS=ks&&ks.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ks,"__esModule",{value:!0});var GS=jS(gr()),Xc=class extends GS.default{patternBetween(){return/^\s*(?:-)\s*$/i}};ks.default=Xc});var Rg=T(Jc=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});var BS=rt(),Og=no(),Dg=no(),HS=Ee(),zS=W(),KS=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*)(${HS.matchAnyPattern(Og.MONTH_DICTIONARY)})(?:\\s*(?:de|,)?\\s*(${Dg.YEAR_PATTERN}))?(?=\\W|$)`,"i"),wg=1,kg=2,VS=3,Sg=4,Zc=class extends zS.AbstractParserWithWordBoundaryChecking{innerPattern(){return KS}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Og.MONTH_DICTIONARY[t[VS].toLowerCase()],s=parseInt(t[wg]);if(s>31)return t.index=t.index+t[wg].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[Sg]){let a=Dg.parseYear(t[Sg]);n.start.assign("year",a)}else{let a=BS.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[kg]){let a=parseInt(t[kg]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Jc.default=Zc});var xg=T(Pr=>{"use strict";var QS=Pr&&Pr.__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]}),XS=Pr&&Pr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),ZS=Pr&&Pr.__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)&&QS(e,r,t);return XS(e,r),e};Object.defineProperty(Pr,"__esModule",{value:!0});var JS=W(),io=ZS(Ar()),ed=class extends JS.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 io.now(e.reference);case"hoje":return io.today(e.reference);case"amanha":case"amanh\xE3":return io.tomorrow(e.reference);case"ontem":return io.yesterday(e.reference)}return i}};Pr.default=ed});var Mg=T(Ss=>{"use strict";var eO=Ss&&Ss.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ss,"__esModule",{value:!0});var so=Ge(),tO=W(),rO=jt(),nO=eO(be()),td=class extends tO.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(?:esta\s*)?(manha|manhã|tarde|meia-noite|meio-dia|noite)(?=\W|$)/i}innerExtract(e,t){let n=nO.default(e.refDate),i=e.createParsingComponents();switch(t[1].toLowerCase()){case"tarde":i.imply("meridiem",so.Meridiem.PM),i.imply("hour",15);break;case"noite":i.imply("meridiem",so.Meridiem.PM),i.imply("hour",22);break;case"manha":case"manh\xE3":i.imply("meridiem",so.Meridiem.AM),i.imply("hour",6);break;case"meia-noite":rO.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"meio-dia":i.imply("meridiem",so.Meridiem.AM),i.imply("hour",12);break}return i}};Ss.default=td});var Pg=T(Ve=>{"use strict";var an=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 iO=Mr(),Cg=rr(),sO=an(Dn()),aO=an(Tg()),oO=an(_g()),uO=an(vg()),lO=an(Eg()),cO=an(Rg()),dO=an(xg()),fO=an(Mg());Ve.casual=new Cg.Chrono(Ag());Ve.strict=new Cg.Chrono(rd(!0));function pO(r,e,t){return Ve.casual.parse(r,e,t)}Ve.parse=pO;function hO(r,e,t){return Ve.casual.parseDate(r,e,t)}Ve.parseDate=hO;function Ag(r=!0){let e=rd(!1,r);return e.parsers.push(new dO.default),e.parsers.push(new fO.default),e}Ve.createCasualConfiguration=Ag;function rd(r=!0,e=!0){return iO.includeCommonConfiguration({parsers:[new sO.default(e),new aO.default,new oO.default,new cO.default],refiners:[new uO.default,new lO.default]},r)}Ve.createConfiguration=rd});var Ng=T(Os=>{"use strict";var mO=Os&&Os.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Os,"__esModule",{value:!0});var gO=mO(gr()),nd=class extends gO.default{patternBetween(){return/^\s*(tot|-)\s*$/i}};Os.default=nd});var Ig=T(Ds=>{"use strict";var yO=Ds&&Ds.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ds,"__esModule",{value:!0});var bO=yO(xr()),id=class extends bO.default{patternBetween(){return new RegExp("^\\s*(om|na|voor|in de|,|-)?\\s*$")}};Ds.default=id});var Fg=T(Nr=>{"use strict";var TO=Nr&&Nr.__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]}),_O=Nr&&Nr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),vO=Nr&&Nr.__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)&&TO(e,r,t);return _O(e,r),e};Object.defineProperty(Nr,"__esModule",{value:!0});var EO=W(),ao=vO(Ar()),sd=class extends EO.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 ao.now(e.reference);case"vandaag":return ao.today(e.reference);case"morgen":case"morgend":return ao.tomorrow(e.reference);case"gisteren":return ao.yesterday(e.reference)}return i}};Nr.default=sd});var Lg=T(Rs=>{"use strict";var wO=Rs&&Rs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Rs,"__esModule",{value:!0});var oo=Ge(),kO=W(),SO=wO(be()),OO=jt(),DO=1,RO=2,ad=class extends kO.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(deze)?\s*(namiddag|avond|middernacht|ochtend|middag|'s middags|'s avonds|'s ochtends)(?=\W|$)/i}innerExtract(e,t){let n=SO.default(e.refDate),i=e.createParsingComponents();switch(t[DO]==="deze"&&(i.assign("day",e.refDate.getDate()),i.assign("month",e.refDate.getMonth()+1),i.assign("year",e.refDate.getFullYear())),t[RO].toLowerCase()){case"namiddag":case"'s namiddags":i.imply("meridiem",oo.Meridiem.PM),i.imply("hour",15);break;case"avond":case"'s avonds'":i.imply("meridiem",oo.Meridiem.PM),i.imply("hour",20);break;case"middernacht":OO.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"ochtend":case"'s ochtends":i.imply("meridiem",oo.Meridiem.AM),i.imply("hour",6);break;case"middag":case"'s middags":i.imply("meridiem",oo.Meridiem.AM),i.imply("hour",12);break}return i}};Rs.default=ad});var Mt=T(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 uo=Ee(),xO=rt();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=`(?:${uo.matchAnyPattern(oe.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+[\\.,][0-9]+|halve?|half|paar)`;function Wg(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=Wg;oe.ORDINAL_NUMBER_PATTERN=`(?:${uo.matchAnyPattern(oe.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:ste|de)?)`;function MO(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=MO;oe.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:voor Christus|na Christus)|[1-2][0-9]{3}|[5-9][0-9])";function CO(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 xO.findMostLikelyADYear(e)}oe.parseYear=CO;var qg=`(${oe.NUMBER_PATTERN})\\s{0,5}(${uo.matchAnyPattern(oe.TIME_UNIT_DICTIONARY)})\\s{0,5}`,Ug=new RegExp(qg,"i");oe.TIME_UNITS_PATTERN=uo.repeatedTimeunitPattern("(?:(?:binnen|in)\\s*)?",qg);function AO(r){let e={},t=r,n=Ug.exec(t);for(;n;)PO(e,n),t=t.substring(n[0].length),n=Ug.exec(t);return e}oe.parseTimeUnits=AO;function PO(r,e){let t=Wg(e[1]),n=oe.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Yg=T(ud=>{"use strict";Object.defineProperty(ud,"__esModule",{value:!0});var $g=Mt(),NO=Pe(),IO=W(),od=class extends IO.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(?:binnen|in|binnen de|voor)\\s*("+$g.TIME_UNITS_PATTERN+")(?=\\W|$)","i")}innerExtract(e,t){let n=$g.parseTimeUnits(t[1]);return NO.ParsingComponents.createRelativeFromReference(e.reference,n)}};ud.default=od});var Gg=T(cd=>{"use strict";Object.defineProperty(cd,"__esModule",{value:!0});var jg=Mt(),FO=Ee(),LO=W(),UO=On(),WO=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:op\\s*?)?(?:(deze|vorige|volgende)\\s*(?:week\\s*)?)?(${FO.matchAnyPattern(jg.WEEKDAY_DICTIONARY)})(?=\\W|$)`,"i"),qO=1,$O=2,YO=3,ld=class extends LO.AbstractParserWithWordBoundaryChecking{innerPattern(){return WO}innerExtract(e,t){let n=t[$O].toLowerCase(),i=jg.WEEKDAY_DICTIONARY[n],s=t[qO],a=t[YO],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=UO.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};cd.default=ld});var Qg=T(fd=>{"use strict";Object.defineProperty(fd,"__esModule",{value:!0});var jO=rt(),Kg=Mt(),lo=Mt(),Vg=Mt(),GO=Ee(),BO=W(),HO=new RegExp(`(?:on\\s*?)?(${lo.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:tot|\\-|\\\u2013|until|through|till|\\s)\\s*(${lo.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:of)?\\s*)(`+GO.matchAnyPattern(Kg.MONTH_DICTIONARY)+`)(?:(?:-|/|,?\\s*)(${Vg.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),zO=3,Bg=1,Hg=2,zg=4,dd=class extends BO.AbstractParserWithWordBoundaryChecking{innerPattern(){return HO}innerExtract(e,t){let n=Kg.MONTH_DICTIONARY[t[zO].toLowerCase()],i=lo.parseOrdinalNumberPattern(t[Bg]);if(i>31)return t.index=t.index+t[Bg].length,null;let s=e.createParsingComponents({day:i,month:n});if(t[zg]){let u=Vg.parseYear(t[zg]);s.assign("year",u)}else{let u=jO.findYearClosestToRef(e.refDate,i,n);s.imply("year",u)}if(!t[Hg])return s;let a=lo.parseOrdinalNumberPattern(t[Hg]),o=e.createParsingResult(t.index,t[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",a),o}};fd.default=dd});var ey=T(hd=>{"use strict";Object.defineProperty(hd,"__esModule",{value:!0});var Zg=Mt(),KO=rt(),VO=Ee(),Jg=Mt(),QO=W(),XO=new RegExp(`(${VO.matchAnyPattern(Zg.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${Jg.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),ZO=1,Xg=2,pd=class extends QO.AbstractParserWithWordBoundaryChecking{innerPattern(){return XO}innerExtract(e,t){let n=e.createParsingComponents();n.imply("day",1);let i=t[ZO],s=Zg.MONTH_DICTIONARY[i.toLowerCase()];if(n.assign("month",s),t[Xg]){let a=Jg.parseYear(t[Xg]);n.assign("year",a)}else{let a=KO.findYearClosestToRef(e.refDate,1,s);n.imply("year",a)}return n}};hd.default=pd});var ty=T(gd=>{"use strict";Object.defineProperty(gd,"__esModule",{value:!0});var JO=W(),e0=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),t0=1,r0=2,md=class extends JO.AbstractParserWithWordBoundaryChecking{innerPattern(){return e0}innerExtract(e,t){let n=parseInt(t[r0]),i=parseInt(t[t0]);return e.createParsingComponents().imply("day",1).assign("month",i).assign("year",n)}};gd.default=md});var ry=T(bd=>{"use strict";Object.defineProperty(bd,"__esModule",{value:!0});var n0=kn(),yd=class extends n0.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)}};bd.default=yd});var sy=T(_d=>{"use strict";Object.defineProperty(_d,"__esModule",{value:!0});var iy=Mt(),i0=Ee(),s0=W(),a0=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${i0.matchAnyPattern(iy.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),o0=1,u0=2,ny=3,l0=4,Td=class extends s0.AbstractParserWithWordBoundaryChecking{innerPattern(){return a0}innerExtract(e,t){let n=t[ny]?parseInt(t[ny]):iy.MONTH_DICTIONARY[t[u0].toLowerCase()];if(n<1||n>12)return null;let i=parseInt(t[o0]);return{day:parseInt(t[l0]),month:n,year:i}}};_d.default=Td});var ay=T(xs=>{"use strict";var c0=xs&&xs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(xs,"__esModule",{value:!0});var d0=W(),co=Ge(),vd=jt(),f0=c0(be()),p0=1,h0=2,Ed=class extends d0.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(gisteren|morgen|van)(ochtend|middag|namiddag|avond|nacht)(?=\W|$)/i}innerExtract(e,t){let n=t[p0].toLowerCase(),i=t[h0].toLowerCase(),s=e.createParsingComponents(),a=f0.default(e.refDate);switch(n){case"gisteren":vd.assignSimilarDate(s,a.add(-1,"day"));break;case"van":vd.assignSimilarDate(s,a);break;case"morgen":vd.assignTheNextDay(s,a);break}switch(i){case"ochtend":s.imply("meridiem",co.Meridiem.AM),s.imply("hour",6);break;case"middag":s.imply("meridiem",co.Meridiem.AM),s.imply("hour",12);break;case"namiddag":s.imply("meridiem",co.Meridiem.PM),s.imply("hour",15);break;case"avond":s.imply("meridiem",co.Meridiem.PM),s.imply("hour",20);break}return s}};xs.default=Ed});var uy=T(kd=>{"use strict";Object.defineProperty(kd,"__esModule",{value:!0});var oy=Mt(),m0=Pe(),g0=W(),y0=Gt(),b0=new RegExp(`(deze|vorige|afgelopen|komende|over|\\+|-)\\s*(${oy.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),wd=class extends g0.AbstractParserWithWordBoundaryChecking{innerPattern(){return b0}innerExtract(e,t){let n=t[1].toLowerCase(),i=oy.parseTimeUnits(t[2]);switch(n){case"vorige":case"afgelopen":case"-":i=y0.reverseTimeUnits(i);break}return m0.ParsingComponents.createRelativeFromReference(e.reference,i)}};kd.default=wd});var dy=T(Ms=>{"use strict";var T0=Ms&&Ms.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ms,"__esModule",{value:!0});var cy=Mt(),ly=Pe(),_0=T0(be()),v0=W(),E0=Ee(),w0=new RegExp(`(dit|deze|komende|volgend|volgende|afgelopen|vorige)\\s*(${E0.matchAnyPattern(cy.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),k0=1,S0=2,Sd=class extends v0.AbstractParserWithWordBoundaryChecking{innerPattern(){return w0}innerExtract(e,t){let n=t[k0].toLowerCase(),i=t[S0].toLowerCase(),s=cy.TIME_UNIT_DICTIONARY[i];if(n=="volgend"||n=="volgende"||n=="komende"){let u={};return u[s]=1,ly.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="afgelopen"||n=="vorige"){let u={};return u[s]=-1,ly.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=_0.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}};Ms.default=Sd});var fy=T(Rd=>{"use strict";Object.defineProperty(Rd,"__esModule",{value:!0});var Dd=Mt(),O0=Pe(),D0=W(),R0=Gt(),x0=new RegExp("("+Dd.TIME_UNITS_PATTERN+")(?:geleden|voor|eerder)(?=(?:\\W|$))","i"),M0=new RegExp("("+Dd.TIME_UNITS_PATTERN+")geleden(?=(?:\\W|$))","i"),Od=class extends D0.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?M0:x0}innerExtract(e,t){let n=Dd.parseTimeUnits(t[1]),i=R0.reverseTimeUnits(n);return O0.ParsingComponents.createRelativeFromReference(e.reference,i)}};Rd.default=Od});var py=T(Cd=>{"use strict";Object.defineProperty(Cd,"__esModule",{value:!0});var Md=Mt(),C0=Pe(),A0=W(),P0=new RegExp("("+Md.TIME_UNITS_PATTERN+")(later|na|vanaf nu|voortaan|vooruit|uit)(?=(?:\\W|$))","i"),N0=new RegExp("("+Md.TIME_UNITS_PATTERN+")(later|vanaf nu)(?=(?:\\W|$))","i"),I0=1,xd=class extends A0.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?N0:P0}innerExtract(e,t){let n=Md.parseTimeUnits(t[I0]);return C0.ParsingComponents.createRelativeFromReference(e.reference,n)}};Cd.default=xd});var yy=T(Qe=>{"use strict";var it=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 F0=Mr(),hy=rr(),L0=it(Ng()),U0=it(Ig()),W0=it(Fg()),q0=it(Lg()),$0=it(Dn()),Y0=it(Yg()),j0=it(Gg()),G0=it(Qg()),my=it(ey()),B0=it(ty()),H0=it(ry()),z0=it(sy()),K0=it(ay()),V0=it(uy()),Q0=it(dy()),X0=it(fy()),Z0=it(py());Qe.casual=new hy.Chrono(gy());Qe.strict=new hy.Chrono(Ad(!0));function J0(r,e,t){return Qe.casual.parse(r,e,t)}Qe.parse=J0;function eD(r,e,t){return Qe.casual.parseDate(r,e,t)}Qe.parseDate=eD;function gy(r=!0){let e=Ad(!1,r);return e.parsers.unshift(new W0.default),e.parsers.unshift(new q0.default),e.parsers.unshift(new K0.default),e.parsers.unshift(new my.default),e.parsers.unshift(new Q0.default),e.parsers.unshift(new V0.default),e}Qe.createCasualConfiguration=gy;function Ad(r=!0,e=!0){return F0.includeCommonConfiguration({parsers:[new $0.default(e),new Y0.default,new G0.default,new my.default,new j0.default,new z0.default,new B0.default,new H0.default(r),new X0.default(r),new Z0.default(r)],refiners:[new U0.default,new L0.default]},r)}Qe.createConfiguration=Ad});var vy=T(Cs=>{"use strict";var tD=Cs&&Cs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Cs,"__esModule",{value:!0});var rD=tD(be()),nD=W(),iD=1,by=2,sD=3,Ty=4,_y=5,aD=6,Pd=class extends nD.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=rD.default(e.refDate),a=s;if(t[iD])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[by]){let o=t[by],u=t[sD];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[Ty]){let u=t[Ty][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[_y]){let o=t[_y];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[aD];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}};Cs.default=Pd});var mi=T(kt=>{"use strict";Object.defineProperty(kt,"__esModule",{value:!0});kt.zhStringToYear=kt.zhStringToNumber=kt.WEEKDAY_OFFSET=kt.NUMBER=void 0;kt.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};kt.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function oD(r){let e=0;for(let t=0;t<r.length;t++){let n=r[t];n==="\u5341"?e=e===0?kt.NUMBER[n]:e*kt.NUMBER[n]:e+=kt.NUMBER[n]}return e}kt.zhStringToNumber=oD;function uD(r){let e="";for(let t=0;t<r.length;t++){let n=r[t];e=e+kt.NUMBER[n]}return parseInt(e)}kt.zhStringToYear=uD});var wy=T(As=>{"use strict";var lD=As&&As.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(As,"__esModule",{value:!0});var cD=lD(be()),dD=W(),Mn=mi(),Nd=1,Ey=2,Id=3,Fd=class extends dD.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(Mn.NUMBER).join("")+"]{4}|["+Object.keys(Mn.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(Mn.NUMBER).join("")+"]{1,2})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(Mn.NUMBER).join("")+"]{1,2})?(?:\\s*)(?:\u65E5|\u865F)?")}innerExtract(e,t){let n=cD.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=parseInt(t[Ey]);if(isNaN(s)&&(s=Mn.zhStringToNumber(t[Ey])),i.start.assign("month",s),t[Id]){let a=parseInt(t[Id]);isNaN(a)&&(a=Mn.zhStringToNumber(t[Id])),i.start.assign("day",a)}else i.start.imply("day",n.date());if(t[Nd]){let a=parseInt(t[Nd]);isNaN(a)&&(a=Mn.zhStringToYear(t[Nd])),i.start.assign("year",a)}else i.start.imply("year",n.year());return i}};As.default=Fd});var Sy=T(Ps=>{"use strict";var fD=Ps&&Ps.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ps,"__esModule",{value:!0});var pD=fD(be()),hD=W(),ky=mi(),mD=new RegExp("(\\d+|["+Object.keys(ky.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"),Ld=1,gD=2,Ud=class extends hD.AbstractParserWithWordBoundaryChecking{innerPattern(){return mD}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=parseInt(t[Ld]);if(isNaN(i)&&(i=ky.zhStringToNumber(t[Ld])),isNaN(i)){let u=t[Ld];if(u==="\u5E7E")i=3;else if(u==="\u534A")i=.5;else return null}let s=pD.default(e.refDate),o=t[gD][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 Dy=T(Ns=>{"use strict";var yD=Ns&&Ns.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ns,"__esModule",{value:!0});var bD=yD(be()),TD=W(),Oy=mi(),_D=new RegExp("(?<prefix>\u4E0A|\u4ECA|\u4E0B|\u9019|\u5462)(?:\u500B)?(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?<weekday>"+Object.keys(Oy.WEEKDAY_OFFSET).join("|")+")"),Wd=class extends TD.AbstractParserWithWordBoundaryChecking{innerPattern(){return _D}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=null,o=t.groups.prefix;o=="\u4E0A"?a="last":o=="\u4E0B"?a="next":(o=="\u4ECA"||o=="\u9019"||o=="\u5462")&&(a="this");let u=bD.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}};Ns.default=Wd});var Ry=T(Is=>{"use strict";var vD=Is&&Is.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Is,"__esModule",{value:!0});var ED=vD(be()),wD=W(),zt=mi(),kD=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(zt.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(zt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(zt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),SD=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(zt.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(zt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(zt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),fo=1,po=2,ho=3,mo=4,go=5,yo=6,Ht=7,gi=8,bo=9,qd=class extends wD.AbstractParserWithWordBoundaryChecking{innerPattern(){return kD}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=ED.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=n.clone();if(t[fo]){var a=t[fo];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[mo]){var o=t[mo];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[gi]){var p=parseInt(t[gi]);if(isNaN(p)&&(p=zt.zhStringToNumber(t[gi])),p>=60)return null;i.start.assign("second",p)}if(u=parseInt(t[yo]),isNaN(u)&&(u=zt.zhStringToNumber(t[yo])),t[Ht]?t[Ht]=="\u534A"?l=30:t[Ht]=="\u6B63"||t[Ht]=="\u6574"?l=0:(l=parseInt(t[Ht]),isNaN(l)&&(l=zt.zhStringToNumber(t[Ht]))):u>100&&(l=u%100,u=Math.floor(u/100)),l>=60||u>24)return null;if(u>=12&&(c=1),t[bo]){if(u>12)return null;var h=t[bo][0].toLowerCase();h=="a"&&(c=0,u==12&&(u=0)),h=="p"&&(c=1,u!=12&&(u+=12))}else if(t[po]){var _=t[po],y=_[0];y=="\u671D"||y=="\u65E9"?(c=0,u==12&&(u=0)):y=="\u665A"&&(c=1,u!=12&&(u+=12))}else if(t[ho]){var w=t[ho],x=w[0];x=="\u4E0A"||x=="\u671D"||x=="\u65E9"||x=="\u51CC"?(c=0,u==12&&(u=0)):(x=="\u4E0B"||x=="\u664F"||x=="\u665A")&&(c=1,u!=12&&(u+=12))}else if(t[go]){var P=t[go],N=P[0];N=="\u4E0A"||N=="\u671D"||N=="\u65E9"||N=="\u51CC"?(c=0,u==12&&(u=0)):(N=="\u4E0B"||N=="\u664F"||N=="\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=SD.exec(e.text.substring(i.index+i.text.length)),!t)return i.text.match(/^\d+$/)?null:i;let F=s.clone();if(i.end=e.createParsingComponents(),t[fo]){var a=t[fo];a=="\u660E"||a=="\u807D"?n.hour()>1&&F.add(1,"day"):a=="\u6628"||a=="\u5C0B"||a=="\u7434"?F.add(-1,"day"):a=="\u524D"?F.add(-2,"day"):a=="\u5927\u524D"?F.add(-3,"day"):a=="\u5F8C"?F.add(2,"day"):a=="\u5927\u5F8C"&&F.add(3,"day"),i.end.assign("day",F.date()),i.end.assign("month",F.month()+1),i.end.assign("year",F.year())}else if(t[mo]){var o=t[mo];o=="\u660E"||o=="\u807D"?F.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?F.add(-1,"day"):o=="\u524D"?F.add(-2,"day"):o=="\u5927\u524D"?F.add(-3,"day"):o=="\u5F8C"?F.add(2,"day"):o=="\u5927\u5F8C"&&F.add(3,"day"),i.end.assign("day",F.date()),i.end.assign("month",F.month()+1),i.end.assign("year",F.year())}else i.end.imply("day",F.date()),i.end.imply("month",F.month()+1),i.end.imply("year",F.year());if(u=0,l=0,c=-1,t[gi]){var p=parseInt(t[gi]);if(isNaN(p)&&(p=zt.zhStringToNumber(t[gi])),p>=60)return null;i.end.assign("second",p)}if(u=parseInt(t[yo]),isNaN(u)&&(u=zt.zhStringToNumber(t[yo])),t[Ht]?t[Ht]=="\u534A"?l=30:t[Ht]=="\u6B63"||t[Ht]=="\u6574"?l=0:(l=parseInt(t[Ht]),isNaN(l)&&(l=zt.zhStringToNumber(t[Ht]))):u>100&&(l=u%100,u=Math.floor(u/100)),l>=60||u>24)return null;if(u>=12&&(c=1),t[bo]){if(u>12)return null;var h=t[bo][0].toLowerCase();h=="a"&&(c=0,u==12&&(u=0)),h=="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[po]){var _=t[po],y=_[0];y=="\u671D"||y=="\u65E9"?(c=0,u==12&&(u=0)):y=="\u665A"&&(c=1,u!=12&&(u+=12))}else if(t[ho]){var w=t[ho],x=w[0];x=="\u4E0A"||x=="\u671D"||x=="\u65E9"||x=="\u51CC"?(c=0,u==12&&(u=0)):(x=="\u4E0B"||x=="\u664F"||x=="\u665A")&&(c=1,u!=12&&(u+=12))}else if(t[go]){var P=t[go],N=P[0];N=="\u4E0A"||N=="\u671D"||N=="\u65E9"||N=="\u51CC"?(c=0,u==12&&(u=0)):(N=="\u4E0B"||N=="\u664F"||N=="\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}};Is.default=qd});var My=T(Fs=>{"use strict";var OD=Fs&&Fs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Fs,"__esModule",{value:!0});var DD=OD(be()),RD=W(),xy=mi(),xD=new RegExp("(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?<weekday>"+Object.keys(xy.WEEKDAY_OFFSET).join("|")+")"),$d=class extends RD.AbstractParserWithWordBoundaryChecking{innerPattern(){return xD}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=xy.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=DD.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}};Fs.default=$d});var Cy=T(Ls=>{"use strict";var MD=Ls&&Ls.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ls,"__esModule",{value:!0});var CD=MD(gr()),Yd=class extends CD.default{patternBetween(){return/^\s*(至|到|\-|\~|||ー)\s*$/i}};Ls.default=Yd});var Ay=T(Us=>{"use strict";var AD=Us&&Us.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Us,"__esModule",{value:!0});var PD=AD(xr()),jd=class extends PD.default{patternBetween(){return/^\s*$/i}};Us.default=jd});var Py=T($e=>{"use strict";var Ir=$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.hant=void 0;var Gd=rr(),ND=Ir(za()),ID=Mr(),FD=Ir(vy()),LD=Ir(wy()),UD=Ir(Sy()),WD=Ir(Dy()),qD=Ir(Ry()),$D=Ir(My()),YD=Ir(Cy()),jD=Ir(Ay());$e.hant=new Gd.Chrono(Bd());$e.casual=new Gd.Chrono(Bd());$e.strict=new Gd.Chrono(Hd());function GD(r,e,t){return $e.casual.parse(r,e,t)}$e.parse=GD;function BD(r,e,t){return $e.casual.parseDate(r,e,t)}$e.parseDate=BD;function Bd(){let r=Hd();return r.parsers.unshift(new FD.default),r}$e.createCasualConfiguration=Bd;function Hd(){let r=ID.includeCommonConfiguration({parsers:[new LD.default,new WD.default,new $D.default,new qD.default,new UD.default],refiners:[new YD.default,new jD.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof ND.default)),r}$e.createConfiguration=Hd});var Ly=T(Ws=>{"use strict";var HD=Ws&&Ws.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ws,"__esModule",{value:!0});var zD=HD(be()),KD=W(),VD=1,Ny=2,QD=3,Iy=4,Fy=5,XD=6,zd=class extends KD.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=zD.default(e.refDate),a=s;if(t[VD])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[Ny]){let o=t[Ny],u=t[QD];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[Iy]){let u=t[Iy][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[Fy]){let o=t[Fy];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[XD];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}};Ws.default=zd});var yi=T(St=>{"use strict";Object.defineProperty(St,"__esModule",{value:!0});St.zhStringToYear=St.zhStringToNumber=St.WEEKDAY_OFFSET=St.NUMBER=void 0;St.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};St.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function ZD(r){let e=0;for(let t=0;t<r.length;t++){let n=r[t];n==="\u5341"?e=e===0?St.NUMBER[n]:e*St.NUMBER[n]:e+=St.NUMBER[n]}return e}St.zhStringToNumber=ZD;function JD(r){let e="";for(let t=0;t<r.length;t++){let n=r[t];e=e+St.NUMBER[n]}return parseInt(e)}St.zhStringToYear=JD});var Wy=T(qs=>{"use strict";var eR=qs&&qs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(qs,"__esModule",{value:!0});var tR=eR(be()),rR=W(),Cn=yi(),Kd=1,Uy=2,Vd=3,Qd=class extends rR.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(Cn.NUMBER).join("")+"]{4}|["+Object.keys(Cn.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(Cn.NUMBER).join("")+"]{1,3})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(Cn.NUMBER).join("")+"]{1,3})?(?:\\s*)(?:\u65E5|\u53F7)?")}innerExtract(e,t){let n=tR.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=parseInt(t[Uy]);if(isNaN(s)&&(s=Cn.zhStringToNumber(t[Uy])),i.start.assign("month",s),t[Vd]){let a=parseInt(t[Vd]);isNaN(a)&&(a=Cn.zhStringToNumber(t[Vd])),i.start.assign("day",a)}else i.start.imply("day",n.date());if(t[Kd]){let a=parseInt(t[Kd]);isNaN(a)&&(a=Cn.zhStringToYear(t[Kd])),i.start.assign("year",a)}else i.start.imply("year",n.year());return i}};qs.default=Qd});var $y=T($s=>{"use strict";var nR=$s&&$s.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($s,"__esModule",{value:!0});var iR=nR(be()),sR=W(),qy=yi(),aR=new RegExp("(\\d+|["+Object.keys(qy.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"),Xd=1,oR=2,Zd=class extends sR.AbstractParserWithWordBoundaryChecking{innerPattern(){return aR}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=parseInt(t[Xd]);if(isNaN(i)&&(i=qy.zhStringToNumber(t[Xd])),isNaN(i)){let u=t[Xd];if(u==="\u51E0")i=3;else if(u==="\u534A")i=.5;else return null}let s=iR.default(e.refDate),o=t[oR][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)}};$s.default=Zd});var jy=T(Ys=>{"use strict";var uR=Ys&&Ys.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ys,"__esModule",{value:!0});var lR=uR(be()),cR=W(),Yy=yi(),dR=new RegExp("(?<prefix>\u4E0A|\u4E0B|\u8FD9)(?:\u4E2A)?(?:\u661F\u671F|\u793C\u62DC|\u5468)(?<weekday>"+Object.keys(Yy.WEEKDAY_OFFSET).join("|")+")"),Jd=class extends cR.AbstractParserWithWordBoundaryChecking{innerPattern(){return dR}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=Yy.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=lR.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}};Ys.default=Jd});var Gy=T(js=>{"use strict";var fR=js&&js.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(js,"__esModule",{value:!0});var pR=fR(be()),hR=W(),Vt=yi(),mR=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(Vt.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Vt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Vt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),gR=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(Vt.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Vt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Vt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),To=1,_o=2,vo=3,Eo=4,wo=5,ko=6,Kt=7,bi=8,So=9,ef=class extends hR.AbstractParserWithWordBoundaryChecking{innerPattern(){return mR}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=pR.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=n.clone();if(t[To]){let c=t[To];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[Eo]){let c=t[Eo];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[bi]){let c=parseInt(t[bi]);if(isNaN(c)&&(c=Vt.zhStringToNumber(t[bi])),c>=60)return null;i.start.assign("second",c)}if(a=parseInt(t[ko]),isNaN(a)&&(a=Vt.zhStringToNumber(t[ko])),t[Kt]?t[Kt]=="\u534A"?o=30:t[Kt]=="\u6B63"||t[Kt]=="\u6574"?o=0:(o=parseInt(t[Kt]),isNaN(o)&&(o=Vt.zhStringToNumber(t[Kt]))):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(u=1),t[So]){if(a>12)return null;let c=t[So][0].toLowerCase();c=="a"&&(u=0,a==12&&(a=0)),c=="p"&&(u=1,a!=12&&(a+=12))}else if(t[_o]){let p=t[_o][0];p=="\u65E9"?(u=0,a==12&&(a=0)):p=="\u665A"&&(u=1,a!=12&&(a+=12))}else if(t[vo]){let p=t[vo][0];p=="\u4E0A"||p=="\u65E9"||p=="\u51CC"?(u=0,a==12&&(a=0)):(p=="\u4E0B"||p=="\u665A")&&(u=1,a!=12&&(a+=12))}else if(t[wo]){let p=t[wo][0];p=="\u4E0A"||p=="\u65E9"||p=="\u51CC"?(u=0,a==12&&(a=0)):(p=="\u4E0B"||p=="\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=gR.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[To]){let c=t[To];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[Eo]){let c=t[Eo];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[bi]){let c=parseInt(t[bi]);if(isNaN(c)&&(c=Vt.zhStringToNumber(t[bi])),c>=60)return null;i.end.assign("second",c)}if(a=parseInt(t[ko]),isNaN(a)&&(a=Vt.zhStringToNumber(t[ko])),t[Kt]?t[Kt]=="\u534A"?o=30:t[Kt]=="\u6B63"||t[Kt]=="\u6574"?o=0:(o=parseInt(t[Kt]),isNaN(o)&&(o=Vt.zhStringToNumber(t[Kt]))):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(u=1),t[So]){if(a>12)return null;let c=t[So][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[_o]){let p=t[_o][0];p=="\u65E9"?(u=0,a==12&&(a=0)):p=="\u665A"&&(u=1,a!=12&&(a+=12))}else if(t[vo]){let p=t[vo][0];p=="\u4E0A"||p=="\u65E9"||p=="\u51CC"?(u=0,a==12&&(a=0)):(p=="\u4E0B"||p=="\u665A")&&(u=1,a!=12&&(a+=12))}else if(t[wo]){let p=t[wo][0];p=="\u4E0A"||p=="\u65E9"||p=="\u51CC"?(u=0,a==12&&(a=0)):(p=="\u4E0B"||p=="\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}};js.default=ef});var Hy=T(Gs=>{"use strict";var yR=Gs&&Gs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Gs,"__esModule",{value:!0});var bR=yR(be()),TR=W(),By=yi(),_R=new RegExp("(?:\u661F\u671F|\u793C\u62DC|\u5468)(?<weekday>"+Object.keys(By.WEEKDAY_OFFSET).join("|")+")"),tf=class extends TR.AbstractParserWithWordBoundaryChecking{innerPattern(){return _R}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=By.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=bR.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=tf});var zy=T(Bs=>{"use strict";var vR=Bs&&Bs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Bs,"__esModule",{value:!0});var ER=vR(gr()),rf=class extends ER.default{patternBetween(){return/^\s*(至|到|-|~|||ー)\s*$/i}};Bs.default=rf});var Ky=T(Hs=>{"use strict";var wR=Hs&&Hs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Hs,"__esModule",{value:!0});var kR=wR(xr()),nf=class extends kR.default{patternBetween(){return/^\s*$/i}};Hs.default=nf});var Vy=T(Ye=>{"use strict";var Fr=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.hans=void 0;var sf=rr(),SR=Fr(za()),OR=Mr(),DR=Fr(Ly()),RR=Fr(Wy()),xR=Fr($y()),MR=Fr(jy()),CR=Fr(Gy()),AR=Fr(Hy()),PR=Fr(zy()),NR=Fr(Ky());Ye.hans=new sf.Chrono(af());Ye.casual=new sf.Chrono(af());Ye.strict=new sf.Chrono(of());function IR(r,e,t){return Ye.casual.parse(r,e,t)}Ye.parse=IR;function FR(r,e,t){return Ye.casual.parseDate(r,e,t)}Ye.parseDate=FR;function af(){let r=of();return r.parsers.unshift(new DR.default),r}Ye.createCasualConfiguration=af;function of(){let r=OR.includeCommonConfiguration({parsers:[new RR.default,new MR.default,new AR.default,new CR.default,new xR.default],refiners:[new PR.default,new NR.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof SR.default)),r}Ye.createConfiguration=of});var Xy=T(Ct=>{"use strict";var Qy=Ct&&Ct.__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]}),LR=Ct&&Ct.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),UR=Ct&&Ct.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Qy(e,r,t)},WR=Ct&&Ct.__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)&&Qy(e,r,t);return LR(e,r),e};Object.defineProperty(Ct,"__esModule",{value:!0});Ct.hans=void 0;UR(Py(),Ct);Ct.hans=WR(Vy())});var Ot=T(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.parseTimeUnits=te.TIME_UNITS_PATTERN=te.parseYear=te.YEAR_PATTERN=te.parseOrdinalNumberPattern=te.ORDINAL_NUMBER_PATTERN=te.parseNumberPattern=te.NUMBER_PATTERN=te.TIME_UNIT_DICTIONARY=te.ORDINAL_WORD_DICTIONARY=te.INTEGER_WORD_DICTIONARY=te.MONTH_DICTIONARY=te.FULL_MONTH_NAME_DICTIONARY=te.WEEKDAY_DICTIONARY=te.REGEX_PARTS=void 0;var Oo=Ee(),qR=rt();te.REGEX_PARTS={leftBoundary:"([^\\p{L}\\p{N}_]|^)",rightBoundary:"(?=[^\\p{L}\\p{N}_]|$)",flags:"iu"};te.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};te.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};te.MONTH_DICTIONARY=Object.assign(Object.assign({},te.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});te.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};te.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};te.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"};te.NUMBER_PATTERN=`(?:${Oo.matchAnyPattern(te.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 Jy(r){let e=r.toLowerCase();return te.INTEGER_WORD_DICTIONARY[e]!==void 0?te.INTEGER_WORD_DICTIONARY[e]:e.match(/несколько/)?3:e.match(/пол/)?.5:e.match(/пар/)?2:e===""?1:parseFloat(e)}te.parseNumberPattern=Jy;te.ORDINAL_NUMBER_PATTERN=`(?:${Oo.matchAnyPattern(te.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:\u0433\u043E|\u043E\u0433\u043E|\u0435|\u043E\u0435)?)`;function $R(r){let e=r.toLowerCase();return te.ORDINAL_WORD_DICTIONARY[e]!==void 0?te.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}te.parseOrdinalNumberPattern=$R;var uf="(?:\\s+(?:\u0433\u043E\u0434\u0443|\u0433\u043E\u0434\u0430|\u0433\u043E\u0434|\u0433|\u0433.))?";te.YEAR_PATTERN=`(?:[1-9][0-9]{0,3}${uf}\\s*(?:\u043D.\u044D.|\u0434\u043E \u043D.\u044D.|\u043D. \u044D.|\u0434\u043E \u043D. \u044D.)|[1-2][0-9]{3}${uf}|[5-9][0-9]${uf})`;function YR(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 qR.findMostLikelyADYear(e)}te.parseYear=YR;var eb=`(${te.NUMBER_PATTERN})\\s{0,3}(${Oo.matchAnyPattern(te.TIME_UNIT_DICTIONARY)})`,Zy=new RegExp(eb,"i");te.TIME_UNITS_PATTERN=Oo.repeatedTimeunitPattern("(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s{0,3})?",eb);function jR(r){let e={},t=r,n=Zy.exec(t);for(;n;)GR(e,n),t=t.substring(n[0].length).trim(),n=Zy.exec(t);return e}te.parseTimeUnits=jR;function GR(r,e){let t=Jy(e[1]),n=te.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var rb=T(cf=>{"use strict";Object.defineProperty(cf,"__esModule",{value:!0});var zs=Ot(),BR=Pe(),HR=W(),tb=`(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s*(?:~\\s*)?)?(${zs.TIME_UNITS_PATTERN})${zs.REGEX_PARTS.rightBoundary}`,zR=new RegExp(`(?:\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0435|\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0438)\\s*${tb}`,zs.REGEX_PARTS.flags),KR=new RegExp(tb,"i"),lf=class extends HR.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return zs.REGEX_PARTS.leftBoundary}innerPattern(e){return e.option.forwardDate?KR:zR}innerExtract(e,t){let n=zs.parseTimeUnits(t[1]);return BR.ParsingComponents.createRelativeFromReference(e.reference,n)}};cf.default=lf});var ob=T(ff=>{"use strict";Object.defineProperty(ff,"__esModule",{value:!0});var VR=rt(),Ks=Ot(),ab=Ot(),Do=Ot(),QR=Ee(),XR=W(),ZR=new RegExp(`(?:\u0441)?\\s*(${Do.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:\u043F\u043E|-|\u2013|\u0434\u043E)?\\s{0,3}(${Do.ORDINAL_NUMBER_PATTERN}))?(?:-|\\/|\\s{0,3}(?:of)?\\s{0,3})(${QR.matchAnyPattern(Ks.MONTH_DICTIONARY)})(?:(?:-|\\/|,?\\s{0,3})(${ab.YEAR_PATTERN}(?![^\\s]\\d)))?${Ks.REGEX_PARTS.rightBoundary}`,Ks.REGEX_PARTS.flags),nb=1,ib=2,JR=3,sb=4,df=class extends XR.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Ks.REGEX_PARTS.leftBoundary}innerPattern(){return ZR}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Ks.MONTH_DICTIONARY[t[JR].toLowerCase()],s=Do.parseOrdinalNumberPattern(t[nb]);if(s>31)return t.index=t.index+t[nb].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[sb]){let a=ab.parseYear(t[sb]);n.start.assign("year",a)}else{let a=VR.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[ib]){let a=Do.parseOrdinalNumberPattern(t[ib]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};ff.default=df});var cb=T(hf=>{"use strict";Object.defineProperty(hf,"__esModule",{value:!0});var Vs=Ot(),ex=rt(),tx=Ee(),lb=Ot(),rx=W(),nx=new RegExp(`((?:\u0432)\\s*)?(${tx.matchAnyPattern(Vs.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${lb.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,Vs.REGEX_PARTS.flags),ix=2,ub=3,pf=class extends rx.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Vs.REGEX_PARTS.leftBoundary}innerPattern(){return nx}innerExtract(e,t){let n=t[ix].toLowerCase();if(t[0].length<=3&&!Vs.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=Vs.MONTH_DICTIONARY[n];if(i.start.assign("month",s),t[ub]){let a=lb.parseYear(t[ub]);i.start.assign("year",a)}else{let a=ex.findYearClosestToRef(e.refDate,1,s);i.start.imply("year",a)}return i}};hf.default=pf});var fb=T(gf=>{"use strict";Object.defineProperty(gf,"__esModule",{value:!0});var Ro=Ge(),sx=kn(),db=Ot(),mf=class extends sx.AbstractTimeExpressionParser{constructor(e){super(e)}patternFlags(){return db.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))?(?!\\/)${db.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",Ro.Meridiem.PM)):i<6&&n.assign("meridiem",Ro.Meridiem.AM)}if(t[0].endsWith("\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F")){n.assign("meridiem",Ro.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",Ro.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};gf.default=mf});var pb=T(bf=>{"use strict";Object.defineProperty(bf,"__esModule",{value:!0});var xo=Ot(),ax=Pe(),ox=W(),ux=Gt(),lx=new RegExp(`(${xo.TIME_UNITS_PATTERN})\\s{0,5}\u043D\u0430\u0437\u0430\u0434(?=(?:\\W|$))`,xo.REGEX_PARTS.flags),yf=class extends ox.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return xo.REGEX_PARTS.leftBoundary}innerPattern(){return lx}innerExtract(e,t){let n=xo.parseTimeUnits(t[1]),i=ux.reverseTimeUnits(n);return ax.ParsingComponents.createRelativeFromReference(e.reference,i)}};bf.default=yf});var hb=T(Qs=>{"use strict";var cx=Qs&&Qs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Qs,"__esModule",{value:!0});var dx=cx(gr()),Tf=class extends dx.default{patternBetween(){return/^\s*(и до|и по|до|по|-)\s*$/i}};Qs.default=Tf});var mb=T(Xs=>{"use strict";var fx=Xs&&Xs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Xs,"__esModule",{value:!0});var px=fx(xr()),_f=class extends px.default{patternBetween(){return new RegExp("^\\s*(T|\u0432|,|-)?\\s*$")}};Xs.default=_f});var gb=T(Lr=>{"use strict";var hx=Lr&&Lr.__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]}),mx=Lr&&Lr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),gx=Lr&&Lr.__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)&&hx(e,r,t);return mx(e,r),e};Object.defineProperty(Lr,"__esModule",{value:!0});var yx=W(),Zs=gx(Ar()),vf=Ot(),bx=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)${vf.REGEX_PARTS.rightBoundary}`,vf.REGEX_PARTS.flags),Ef=class extends yx.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return vf.REGEX_PARTS.leftBoundary}innerPattern(e){return bx}innerExtract(e,t){let n=t[1].toLowerCase(),i=e.createParsingComponents();switch(n){case"\u0441\u0435\u0433\u043E\u0434\u043D\u044F":return Zs.today(e.reference);case"\u0432\u0447\u0435\u0440\u0430":return Zs.yesterday(e.reference);case"\u0437\u0430\u0432\u0442\u0440\u0430":return Zs.tomorrow(e.reference);case"\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430":return Zs.theDayAfter(e.reference,2);case"\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430":return Zs.theDayBefore(e.reference,2)}return i}};Lr.default=Ef});var yb=T(or=>{"use strict";var Tx=or&&or.__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]}),_x=or&&or.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),vx=or&&or.__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)&&Tx(e,r,t);return _x(e,r),e},Ex=or&&or.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(or,"__esModule",{value:!0});var wx=W(),An=vx(Ar()),kx=jt(),Sx=Ex(be()),wf=Ot(),Ox=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)${wf.REGEX_PARTS.rightBoundary}`,wf.REGEX_PARTS.flags),kf=class extends wx.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return wf.REGEX_PARTS.leftBoundary}innerPattern(){return Ox}innerExtract(e,t){let n=Sx.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();if(i==="\u0441\u0435\u0439\u0447\u0430\u0441")return An.now(e.reference);if(i==="\u0432\u0435\u0447\u0435\u0440\u043E\u043C"||i==="\u0432\u0435\u0447\u0435\u0440\u0430")return An.evening(e.reference);if(i.endsWith("\u0443\u0442\u0440\u043E\u043C")||i.endsWith("\u0443\u0442\u0440\u0430"))return An.morning(e.reference);if(i.match(/в\s*полдень/))return An.noon(e.reference);if(i.match(/прошлой\s*ночью/))return An.lastNight(e.reference);if(i.match(/прошлым\s*вечером/))return An.yesterdayEvening(e.reference);if(i.match(/следующей\s*ночью/)){let a=n.hour()<22?1:2;n=n.add(a,"day"),kx.assignSimilarDate(s,n),s.imply("hour",0)}return i.match(/в\s*полночь/)||i.endsWith("\u043D\u043E\u0447\u044C\u044E")?An.midnight(e.reference):s}};or.default=kf});var bb=T(Of=>{"use strict";Object.defineProperty(Of,"__esModule",{value:!0});var Js=Ot(),Dx=Ee(),Rx=W(),xx=On(),Mx=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*)?(${Dx.matchAnyPattern(Js.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)?${Js.REGEX_PARTS.rightBoundary}`,Js.REGEX_PARTS.flags),Cx=1,Ax=2,Px=3,Sf=class extends Rx.AbstractParserWithWordBoundaryChecking{innerPattern(){return Mx}patternLeftBoundary(){return Js.REGEX_PARTS.leftBoundary}innerExtract(e,t){let n=t[Ax].toLowerCase(),i=Js.WEEKDAY_DICTIONARY[n],s=t[Cx],a=t[Px],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=xx.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Of.default=Sf});var _b=T(ta=>{"use strict";var Nx=ta&&ta.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ta,"__esModule",{value:!0});var ea=Ot(),Tb=Pe(),Ix=Nx(be()),Fx=W(),Lx=Ee(),Ux=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*(${Lx.matchAnyPattern(ea.TIME_UNIT_DICTIONARY)})(?=\\s*)${ea.REGEX_PARTS.rightBoundary}`,ea.REGEX_PARTS.flags),Wx=1,qx=2,Df=class extends Fx.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return ea.REGEX_PARTS.leftBoundary}innerPattern(){return Ux}innerExtract(e,t){let n=t[Wx].toLowerCase(),i=t[qx].toLowerCase(),s=ea.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,Tb.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,Tb.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=Ix.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}};ta.default=Df});var vb=T(xf=>{"use strict";Object.defineProperty(xf,"__esModule",{value:!0});var ra=Ot(),$x=Pe(),Yx=W(),jx=Gt(),Gx=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*(${ra.TIME_UNITS_PATTERN})${ra.REGEX_PARTS.rightBoundary}`,ra.REGEX_PARTS.flags),Rf=class extends Yx.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return ra.REGEX_PARTS.leftBoundary}innerPattern(){return Gx}innerExtract(e,t){let n=t[1].toLowerCase(),i=ra.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=jx.reverseTimeUnits(i);break}return $x.ParsingComponents.createRelativeFromReference(e.reference,i)}};xf.default=Rf});var kb=T(Xe=>{"use strict";var At=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 Bx=At(rb()),Hx=At(ob()),zx=At(cb()),Kx=At(fb()),Vx=At(pb()),Qx=At(hb()),Xx=At(mb()),Zx=Mr(),Jx=At(gb()),eM=At(yb()),tM=At(bb()),rM=At(_b()),Eb=rr(),nM=At(Dn()),iM=At(vb());Xe.casual=new Eb.Chrono(wb());Xe.strict=new Eb.Chrono(Mf(!0));function sM(r,e,t){return Xe.casual.parse(r,e,t)}Xe.parse=sM;function aM(r,e,t){return Xe.casual.parseDate(r,e,t)}Xe.parseDate=aM;function wb(){let r=Mf(!1);return r.parsers.unshift(new Jx.default),r.parsers.unshift(new eM.default),r.parsers.unshift(new zx.default),r.parsers.unshift(new rM.default),r.parsers.unshift(new iM.default),r}Xe.createCasualConfiguration=wb;function Mf(r=!0){return Zx.includeCommonConfiguration({parsers:[new nM.default(!0),new Bx.default,new Hx.default,new tM.default,new Kx.default(r),new Vx.default],refiners:[new Xx.default,new Qx.default]},r)}Xe.createConfiguration=Mf});var Ge=T(ie=>{"use strict";var oM=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]}),uM=ie&&ie.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),on=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)&&oM(e,r,t);return uM(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 Cf=on(zl());ie.en=Cf;var lM=rr();Object.defineProperty(ie,"Chrono",{enumerable:!0,get:function(){return lM.Chrono}});var cM;(function(r){r[r.AM=0]="AM",r[r.PM=1]="PM"})(cM=ie.Meridiem||(ie.Meridiem={}));var dM=on(Pm());ie.de=dM;var fM=on(ug());ie.fr=fM;var pM=on(yg());ie.ja=pM;var hM=on(Pg());ie.pt=hM;var mM=on(yy());ie.nl=mM;var gM=on(Xy());ie.zh=gM;var yM=on(kb());ie.ru=yM;ie.strict=Cf.strict;ie.casual=Cf.casual;function bM(r,e,t){return ie.casual.parse(r,e,t)}ie.parse=bM;function TM(r,e,t){return ie.casual.parseDate(r,e,t)}ie.parseDate=TM});var _T=T((bT,TT)=>{(function(r){var e=Object.hasOwnProperty,t=Array.isArray?Array.isArray:function(f){return Object.prototype.toString.call(f)==="[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 f=Object.getOwnPropertyNames(d);return f.push.apply(f,Object.getOwnPropertySymbols(d)),f}:Object.keys;function c(){this._events={},this._conf&&p.call(this,this._conf)}function p(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 h(d,f){var m="(node) warning: possible EventEmitter memory leak detected. "+d+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(m+=" Event name: "+f+"."),typeof process!="undefined"&&process.emitWarning){var g=new Error(m);g.name="MaxListenersExceededWarning",g.emitter=this,g.count=d,process.emitWarning(g)}else console.error(m),console.trace&&console.trace()}var _=function(d,f,m){var g=arguments.length;switch(g){case 0:return[];case 1:return[d];case 2:return[d,f];case 3:return[d,f,m];default:for(var b=new Array(g);g--;)b[g]=arguments[g];return b}};function y(d,f){for(var m={},g,b=d.length,v=f?f.length:0,k=0;k<b;k++)g=d[k],m[g]=k<v?f[k]:r;return m}function w(d,f,m){this._emitter=d,this._target=f,this._listeners={},this._listenersCount=0;var g,b;if((m.on||m.off)&&(g=m.on,b=m.off),f.addEventListener?(g=f.addEventListener,b=f.removeEventListener):f.addListener?(g=f.addListener,b=f.removeListener):f.on&&(g=f.on,b=f.off),!g&&!b)throw Error("target does not implement any known event API");if(typeof g!="function")throw TypeError("on method must be a function");if(typeof b!="function")throw TypeError("off method must be a function");this._on=g,this._off=b;var v=d._observers;v?v.push(this):d._observers=[this]}Object.assign(w.prototype,{subscribe:function(d,f,m){var g=this,b=this._target,v=this._emitter,k=this._listeners,D=function(){var S=_.apply(null,arguments),O={data:S,name:f,original:d};if(m){var I=m.call(b,O);I!==!1&&v.emit.apply(v,[O.name].concat(S));return}v.emit.apply(v,[f].concat(S))};if(k[d])throw Error("Event '"+d+"' is already listening");this._listenersCount++,v._newListener&&v._removeListener&&!g._onNewListener?(this._onNewListener=function(S){S===f&&k[d]===null&&(k[d]=D,g._on.call(b,d,D))},v.on("newListener",this._onNewListener),this._onRemoveListener=function(S){S===f&&!v.hasListeners(S)&&k[d]&&(k[d]=null,g._off.call(b,d,D))},k[d]=null,v.on("removeListener",this._onRemoveListener)):(k[d]=D,g._on.call(b,d,D))},unsubscribe:function(d){var f=this,m=this._listeners,g=this._emitter,b,v,k=this._off,D=this._target,S;if(d&&typeof d!="string")throw TypeError("event must be a string");function O(){f._onNewListener&&(g.off("newListener",f._onNewListener),g.off("removeListener",f._onRemoveListener),f._onNewListener=null,f._onRemoveListener=null);var I=he.call(g,f);g._observers.splice(I,1)}if(d){if(b=m[d],!b)return;k.call(D,d,b),delete m[d],--this._listenersCount||O()}else{for(v=l(m),S=v.length;S-- >0;)d=v[S],k.call(D,d,m[d]);this._listeners={},this._listenersCount=0,O()}}});function x(d,f,m,g){var b=Object.assign({},f);if(!d)return b;if(typeof d!="object")throw TypeError("options must be an object");var v=Object.keys(d),k=v.length,D,S,O;function I(se){throw Error('Invalid "'+D+'" option value'+(se?". Reason: "+se:""))}for(var me=0;me<k;me++){if(D=v[me],!g&&!e.call(f,D))throw Error('Unknown "'+D+'" option');S=d[D],S!==r&&(O=m[D],b[D]=O?O(S,I):S)}return b}function P(d,f){return(typeof d!="function"||!d.hasOwnProperty("prototype"))&&f("value must be a constructor"),d}function N(d){var f="value must be type of "+d.join("|"),m=d.length,g=d[0],b=d[1];return m===1?function(v,k){if(typeof v===g)return v;k(f)}:m===2?function(v,k){var D=typeof v;if(D===g||D===b)return v;k(f)}:function(v,k){for(var D=typeof v,S=m;S-- >0;)if(D===d[S])return v;k(f)}}var F=N(["function"]),Z=N(["object","function"]);function V(d,f,m){var g,b,v=0,k,D=new d(function(S,O,I){m=x(m,{timeout:0,overload:!1},{timeout:function(De,U){return De*=1,(typeof De!="number"||De<0||!Number.isFinite(De))&&U("timeout must be a positive number"),De}}),g=!m.overload&&typeof d.prototype.cancel=="function"&&typeof I=="function";function me(){b&&(b=null),v&&(clearTimeout(v),v=0)}var se=function(De){me(),S(De)},re=function(De){me(),O(De)};g?f(se,re,I):(b=[function(De){re(De||Error("canceled"))}],f(se,re,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");b.push(De)}),k=!0),m.timeout>0&&(v=setTimeout(function(){var De=Error("timeout");De.code="ETIMEDOUT",v=0,D.cancel(De),O(De)},m.timeout))});return g||(D.cancel=function(S){if(!!b){for(var O=b.length,I=1;I<O;I++)b[I](S);b[0](S),b=null}}),D}function he(d){var f=this._observers;if(!f)return-1;for(var m=f.length,g=0;g<m;g++)if(f[g]._target===d)return g;return-1}function j(d,f,m,g,b){if(!m)return null;if(g===0){var v=typeof f;if(v==="string"){var k,D,S=0,O=0,I=this.delimiter,me=I.length;if((D=f.indexOf(I))!==-1){k=new Array(5);do k[S++]=f.slice(O,D),O=D+me;while((D=f.indexOf(I,O))!==-1);k[S++]=f.slice(O),f=k,b=S}else f=[f],b=1}else v==="object"?b=f.length:(f=[f],b=1)}var se=null,re,De,U,xe,Ce,tt=f[g],Rr=f[g+1],We,Le;if(g===b)m._listeners&&(typeof m._listeners=="function"?(d&&d.push(m._listeners),se=[m]):(d&&d.push.apply(d,m._listeners),se=[m]));else if(tt==="*"){for(We=l(m),D=We.length;D-- >0;)re=We[D],re!=="_listeners"&&(Le=j(d,f,m[re],g+1,b),Le&&(se?se.push.apply(se,Le):se=Le));return se}else if(tt==="**"){for(Ce=g+1===b||g+2===b&&Rr==="*",Ce&&m._listeners&&(se=j(d,f,m,b,b)),We=l(m),D=We.length;D-- >0;)re=We[D],re!=="_listeners"&&(re==="*"||re==="**"?(m[re]._listeners&&!Ce&&(Le=j(d,f,m[re],b,b),Le&&(se?se.push.apply(se,Le):se=Le)),Le=j(d,f,m[re],g,b)):re===Rr?Le=j(d,f,m[re],g+2,b):Le=j(d,f,m[re],g,b),Le&&(se?se.push.apply(se,Le):se=Le));return se}else m[tt]&&(se=j(d,f,m[tt],g+1,b));if(De=m["*"],De&&j(d,f,De,g+1,b),U=m["**"],U)if(g<b)for(U._listeners&&j(d,f,U,b,b),We=l(U),D=We.length;D-- >0;)re=We[D],re!=="_listeners"&&(re===Rr?j(d,f,U[re],g+2,b):re===tt?j(d,f,U[re],g+1,b):(xe={},xe[re]=U[re],j(d,f,{"**":xe},g+1,b)));else U._listeners?j(d,f,U,b,b):U["*"]&&U["*"]._listeners&&j(d,f,U["*"],b,b);return se}function G(d,f,m){var g=0,b=0,v,k=this.delimiter,D=k.length,S;if(typeof d=="string")if((v=d.indexOf(k))!==-1){S=new Array(5);do S[g++]=d.slice(b,v),b=v+D;while((v=d.indexOf(k,b))!==-1);S[g++]=d.slice(b)}else S=[d],g=1;else S=d,g=d.length;if(g>1){for(v=0;v+1<g;v++)if(S[v]==="**"&&S[v+1]==="**")return}var O=this.listenerTree,I;for(v=0;v<g;v++)if(I=S[v],O=O[I]||(O[I]={}),v===g-1)return O._listeners?(typeof O._listeners=="function"&&(O._listeners=[O._listeners]),m?O._listeners.unshift(f):O._listeners.push(f),!O._listeners.warned&&this._maxListeners>0&&O._listeners.length>this._maxListeners&&(O._listeners.warned=!0,h.call(this,O._listeners.length,I))):O._listeners=f,!0;return!0}function Ae(d,f,m,g){for(var b=l(d),v=b.length,k,D,S,O=d._listeners,I;v-- >0;)D=b[v],k=d[D],D==="_listeners"?S=m:S=m?m.concat(D):[D],I=g||typeof D=="symbol",O&&f.push(I?S:S.join(this.delimiter)),typeof k=="object"&&Ae.call(this,k,f,S,I);return f}function Fe(d){for(var f=l(d),m=f.length,g,b,v;m-- >0;)b=f[m],g=d[b],g&&(v=!0,b!=="_listeners"&&!Fe(g)&&delete d[b]);return v}function B(d,f,m){this.emitter=d,this.event=f,this.listener=m}B.prototype.off=function(){return this.emitter.off(this.event,this.listener),this};function C(d,f,m){if(m===!0)b=!0;else if(m===!1)g=!0;else{if(!m||typeof m!="object")throw TypeError("options should be an object or true");var g=m.async,b=m.promisify,v=m.nextTick,k=m.objectify}if(g||v||b){var D=f,S=f._origin||f;if(v&&!i)throw Error("process.nextTick is not supported");b===r&&(b=f.constructor.name==="AsyncFunction"),f=function(){var O=arguments,I=this,me=this.event;return b?v?Promise.resolve():new Promise(function(se){u(se)}).then(function(){return I.event=me,D.apply(I,O)}):(v?process.nextTick:u)(function(){I.event=me,D.apply(I,O)})},f._async=!0,f._origin=S}return[f,k?new B(this,d,f):this]}function E(d){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,p.call(this,d)}E.EventEmitter2=E,E.prototype.listenTo=function(d,f,m){if(typeof d!="object")throw TypeError("target musts be an object");var g=this;m=x(m,{on:r,off:r,reducers:r},{on:F,off:F,reducers:Z});function b(v){if(typeof v!="object")throw TypeError("events must be an object");var k=m.reducers,D=he.call(g,d),S;D===-1?S=new w(g,d,m):S=g._observers[D];for(var O=l(v),I=O.length,me,se=typeof k=="function",re=0;re<I;re++)me=O[re],S.subscribe(me,v[me]||me,se?k:k&&k[me])}return t(f)?b(y(f)):b(typeof f=="string"?y(f.split(/\s+/)):f),this},E.prototype.stopListeningTo=function(d,f){var m=this._observers;if(!m)return!1;var g=m.length,b,v=!1;if(d&&typeof d!="object")throw TypeError("target should be an object");for(;g-- >0;)b=m[g],(!d||b._target===d)&&(b.unsubscribe(f),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,f,m){return this._once(d,f,!1,m)},E.prototype.prependOnceListener=function(d,f,m){return this._once(d,f,!0,m)},E.prototype._once=function(d,f,m,g){return this._many(d,1,f,m,g)},E.prototype.many=function(d,f,m,g){return this._many(d,f,m,!1,g)},E.prototype.prependMany=function(d,f,m,g){return this._many(d,f,m,!0,g)},E.prototype._many=function(d,f,m,g,b){var v=this;if(typeof m!="function")throw new Error("many only accepts instances of Function");function k(){return--f===0&&v.off(d,k),m.apply(this,arguments)}return k._origin=m,this._on(d,k,g,b)},E.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||c.call(this);var d=arguments[0],f,m=this.wildcard,g,b,v,k,D;if(d==="newListener"&&!this._newListener&&!this._events.newListener)return!1;if(m&&(f=d,d!=="newListener"&&d!=="removeListener"&&typeof d=="object")){if(b=d.length,s){for(v=0;v<b;v++)if(typeof d[v]=="symbol"){D=!0;break}}D||(d=d.join(this.delimiter))}var S=arguments.length,O;if(this._all&&this._all.length)for(O=this._all.slice(),v=0,b=O.length;v<b;v++)switch(this.event=d,S){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(m)O=[],j.call(this,O,f,this.listenerTree,0,b);else if(O=this._events[d],typeof O=="function"){switch(this.event=d,S){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(S-1),k=1;k<S;k++)g[k-1]=arguments[k];O.apply(this,g)}return!0}else O&&(O=O.slice());if(O&&O.length){if(S>3)for(g=new Array(S-1),k=1;k<S;k++)g[k-1]=arguments[k];for(v=0,b=O.length;v<b;v++)switch(this.event=d,S){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],f=this.wildcard,m,g,b,v,k,D;if(d==="newListener"&&!this._newListener&&!this._events.newListener)return Promise.resolve([!1]);if(f&&(m=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 S=[],O=arguments.length,I;if(this._all)for(k=0,v=this._all.length;k<v;k++)switch(this.event=d,O){case 1:S.push(this._all[k].call(this,d));break;case 2:S.push(this._all[k].call(this,d,arguments[1]));break;case 3:S.push(this._all[k].call(this,d,arguments[1],arguments[2]));break;default:S.push(this._all[k].apply(this,arguments))}if(f?(I=[],j.call(this,I,m,this.listenerTree,0)):I=this._events[d],typeof I=="function")switch(this.event=d,O){case 1:S.push(I.call(this));break;case 2:S.push(I.call(this,arguments[1]));break;case 3:S.push(I.call(this,arguments[1],arguments[2]));break;default:for(b=new Array(O-1),D=1;D<O;D++)b[D-1]=arguments[D];S.push(I.apply(this,b))}else if(I&&I.length){if(I=I.slice(),O>3)for(b=new Array(O-1),D=1;D<O;D++)b[D-1]=arguments[D];for(k=0,v=I.length;k<v;k++)switch(this.event=d,O){case 1:S.push(I[k].call(this));break;case 2:S.push(I[k].call(this,arguments[1]));break;case 3:S.push(I[k].call(this,arguments[1],arguments[2]));break;default:S.push(I[k].apply(this,b))}}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(S)},E.prototype.on=function(d,f,m){return this._on(d,f,!1,m)},E.prototype.prependListener=function(d,f,m){return this._on(d,f,!0,m)},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,f){if(typeof d!="function")throw new Error("onAny only accepts instances of Function");return this._all||(this._all=[]),f?this._all.unshift(d):this._all.push(d),this},E.prototype._on=function(d,f,m,g){if(typeof d=="function")return this._onAny(d,f),this;if(typeof f!="function")throw new Error("on only accepts instances of Function");this._events||c.call(this);var b=this,v;return g!==r&&(v=C.call(this,d,f,g),f=v[0],b=v[1]),this._newListener&&this.emit("newListener",d,f),this.wildcard?(G.call(this,d,f,m),b):(this._events[d]?(typeof this._events[d]=="function"&&(this._events[d]=[this._events[d]]),m?this._events[d].unshift(f):this._events[d].push(f),!this._events[d].warned&&this._maxListeners>0&&this._events[d].length>this._maxListeners&&(this._events[d].warned=!0,h.call(this,this._events[d].length,d))):this._events[d]=f,b)},E.prototype.off=function(d,f){if(typeof f!="function")throw new Error("removeListener only takes instances of Function");var m,g=[];if(this.wildcard){var b=typeof d=="string"?d.split(this.delimiter):d.slice();if(g=j.call(this,null,b,this.listenerTree,0),!g)return this}else{if(!this._events[d])return this;m=this._events[d],g.push({_listeners:m})}for(var v=0;v<g.length;v++){var k=g[v];if(m=k._listeners,t(m)){for(var D=-1,S=0,O=m.length;S<O;S++)if(m[S]===f||m[S].listener&&m[S].listener===f||m[S]._origin&&m[S]._origin===f){D=S;break}if(D<0)continue;return this.wildcard?k._listeners.splice(D,1):this._events[d].splice(D,1),m.length===0&&(this.wildcard?delete k._listeners:delete this._events[d]),this._removeListener&&this.emit("removeListener",d,f),this}else(m===f||m.listener&&m.listener===f||m._origin&&m._origin===f)&&(this.wildcard?delete k._listeners:delete this._events[d],this._removeListener&&this.emit("removeListener",d,f))}return this.listenerTree&&Fe(this.listenerTree),this},E.prototype.offAny=function(d){var f=0,m=0,g;if(d&&this._all&&this._all.length>0){for(g=this._all,f=0,m=g.length;f<m;f++)if(d===g[f])return g.splice(f,1),this._removeListener&&this.emit("removeListenerAny",d),this}else{if(g=this._all,this._removeListener)for(f=0,m=g.length;f<m;f++)this.emit("removeListenerAny",g[f]);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 f=j.call(this,null,d,this.listenerTree,0),m,g;if(!f)return this;for(g=0;g<f.length;g++)m=f[g],m._listeners=null;this.listenerTree&&Fe(this.listenerTree)}else this._events&&(this._events[d]=null);return this},E.prototype.listeners=function(d){var f=this._events,m,g,b,v,k;if(d===r){if(this.wildcard)throw Error("event name required for wildcard emitter");if(!f)return[];for(m=l(f),v=m.length,b=[];v-- >0;)g=f[m[v]],typeof g=="function"?b.push(g):b.push.apply(b,g);return b}else{if(this.wildcard){if(k=this.listenerTree,!k)return[];var D=[],S=typeof d=="string"?d.split(this.delimiter):d.slice();return j.call(this,D,S,k,0),D}return f?(g=f[d],g?typeof g=="function"?[g]:g:[]):[]}},E.prototype.eventNames=function(d){var f=this._events;return this.wildcard?Ae.call(this,this.listenerTree,[],null,d):f?l(f):[]},E.prototype.listenerCount=function(d){return this.listeners(d).length},E.prototype.hasListeners=function(d){if(this.wildcard){var f=[],m=typeof d=="string"?d.split(this.delimiter):d.slice();return j.call(this,f,m,this.listenerTree,0),f.length>0}var g=this._events,b=this._all;return!!(b&&b.length||g&&(d===r?l(g).length:g[d]))},E.prototype.listenersAny=function(){return this._all?this._all:[]},E.prototype.waitFor=function(d,f){var m=this,g=typeof f;return g==="number"?f={timeout:f}:g==="function"&&(f={filter:f}),f=x(f,{timeout:0,filter:r,handleError:!1,Promise,overload:!1},{filter:F,Promise:P}),V(f.Promise,function(b,v,k){function D(){var S=f.filter;if(!(S&&!S.apply(m,arguments)))if(m.off(d,D),f.handleError){var O=arguments[0];O?v(O):b(_.apply(null,arguments).slice(1))}else b(_.apply(null,arguments))}k(function(){m.off(d,D)}),m._on(d,D,!1)},{timeout:f.timeout,overload:f.overload})};function H(d,f,m){m=x(m,{Promise,timeout:0,overload:!1},{Promise:P});var g=m.Promise;return V(g,function(b,v,k){var D;if(typeof d.addEventListener=="function"){D=function(){b(_.apply(null,arguments))},k(function(){d.removeEventListener(f,D)}),d.addEventListener(f,D,{once:!0});return}var S=function(){O&&d.removeListener("error",O),b(_.apply(null,arguments))},O;f!=="error"&&(O=function(I){d.removeListener(f,S),v(I)},d.once("error",O)),k(function(){O&&d.removeListener("error",O),d.removeListener(f,S)}),d.once(f,S)},{timeout:m.timeout,overload:m.overload})}var A=E.prototype;if(Object.defineProperties(E,{defaultMaxListeners:{get:function(){return A._maxListeners},set:function(d){if(typeof d!="number"||d<0||Number.isNaN(d))throw TypeError("n must be a non-negative number");A._maxListeners=d},enumerable:!0},once:{value:H,writable:!0,configurable:!0}}),Object.defineProperties(A,{_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 bT=="object")TT.exports=E;else{var J=new Function("","return this")();J.EventEmitter2=E}})()});var zT=T(dp=>{"use strict";Object.defineProperty(dp,"__esModule",{value:!0});var BT=Symbol("MustacheDataPath");function GT({target:r,propertyName:e}){return[...r[BT]||[],e]}function HT(r,e){return typeof r!="object"?r:new Proxy(r,{get(t,n){let i=t[n];if(i===void 0&&!(n in t)){let s=GT({target:t,propertyName:n});if(e!=null&&e.handleError)return e.handleError(s),i;throw Error(`Missing Mustache data property: ${s.join(" > ")}`)}return i&&typeof i=="object"?(i[BT]=GT({target:t,propertyName:n}),HT(i,e)):i}})}dp.default=HT});var kr=T(dr=>{"use strict";dr.__esModule=!0;dr.Tokens=dr.StructuralCharacters=dr.Operators=void 0;var QC;(function(r){r.AND="AND",r.OR="OR",r.XOR="XOR",r.NOT="NOT"})(QC=dr.Operators||(dr.Operators={}));var XC;(function(r){r.OPEN_PARENTHESIS="(",r.CLOSE_PARENTHESIS=")"})(XC=dr.StructuralCharacters||(dr.StructuralCharacters={}));var ZC;(function(r){r.IDENTIFIER="IDENTIFIER",r.OPERATOR="OPERATOR",r.STRUCTURAL_CHARACTER="STRUCTURAL_CHARACTER",r.EOF="EOF",r.COMMENT="COMMENT"})(ZC=dr.Tokens||(dr.Tokens={}))});var gp=T(qi=>{"use strict";qi.__esModule=!0;qi.VALID_TOKENS=qi.OPERATOR_PRECEDENCE=void 0;var Ie=kr();qi.OPERATOR_PRECEDENCE={NOT:0,XOR:1,AND:2,OR:3};qi.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 yp=T(ht=>{"use strict";ht.__esModule=!0;ht.ESCAPE_CHARACTER=ht.EOL=ht.COMMENT_DELIMITER=ht.QUOTED_IDENTIFIER_DELIMITER=ht.SEPARATORS=ht.OPERATORS=ht.STRUCTURAL_CHARACTERS=void 0;var $i=kr();ht.STRUCTURAL_CHARACTERS={"(":$i.StructuralCharacters.OPEN_PARENTHESIS,")":$i.StructuralCharacters.CLOSE_PARENTHESIS};ht.OPERATORS={AND:$i.Operators.AND,OR:$i.Operators.OR,XOR:$i.Operators.XOR,NOT:$i.Operators.NOT};ht.SEPARATORS=new Set([32,9,10,13].map(function(r){return String.fromCodePoint(r)}));ht.QUOTED_IDENTIFIER_DELIMITER=String.fromCodePoint(34);ht.COMMENT_DELIMITER=String.fromCodePoint(35);ht.EOL=String.fromCodePoint(10);ht.ESCAPE_CHARACTER=String.fromCodePoint(92)});var ZT=T(Jt=>{"use strict";var bp=Jt&&Jt.__assign||function(){return bp=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},bp.apply(this,arguments)};Jt.__esModule=!0;Jt.getQuotedIdentifier=Jt.getComment=Jt.createResult=void 0;var XT=kr(),Kn=yp(),JC=function(r,e,t){return{token:bp({name:r},e!==null?{value:e}:{}),remainingString:t}};Jt.createResult=JC;var eA=function(r){for(var e=r.length,t=0;t<r.length;t+=1){var n=r[t];if(n===Kn.EOL){e=t;break}}return(0,Jt.createResult)(XT.Tokens.COMMENT,r.slice(0,e),r.slice(e+1))};Jt.getComment=eA;var tA=function(r){for(var e=!1,t="",n=null,i=0;i<r.length;i+=1){var s=r[i];if(n===null)s===Kn.QUOTED_IDENTIFIER_DELIMITER?e?t=t.slice(-1)+Kn.QUOTED_IDENTIFIER_DELIMITER:n=i:(s===Kn.ESCAPE_CHARACTER?e=!0:e=!1,t=t+=s);else{if(!Kn.SEPARATORS.has(s)&&!Kn.STRUCTURAL_CHARACTERS[s])throw new Error("Unexpected character: ".concat(s," Expected ) character or separator"));break}}if(n===null)throw new Error("Unexpected end of expression: expected ".concat(Kn.QUOTED_IDENTIFIER_DELIMITER," character"));return(0,Jt.createResult)(XT.Tokens.IDENTIFIER,t,r.slice(n+1))};Jt.getQuotedIdentifier=tA});var JT=T(mu=>{"use strict";mu.__esModule=!0;mu.lex=void 0;var Yi=kr(),Ut=yp(),ji=ZT(),rA=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(!Ut.SEPARATORS.has(s)){var a=Ut.STRUCTURAL_CHARACTERS[s];if(a){var o=r[i+1];if(a===Yi.StructuralCharacters.CLOSE_PARENTHESIS&&o&&!Ut.SEPARATORS.has(o)&&o!==Yi.StructuralCharacters.CLOSE_PARENTHESIS)throw new Error("Unexpected character: ".concat(o,". A closing parenthesis should be followed by another closing parenthesis or whitespace"));return(0,ji.createResult)(Yi.Tokens.STRUCTURAL_CHARACTER,Ut.STRUCTURAL_CHARACTERS[s],r.slice(i+1))}if(s===Ut.QUOTED_IDENTIFIER_DELIMITER)return(0,ji.getQuotedIdentifier)(r.slice(i+1));if(s===Ut.COMMENT_DELIMITER)return(0,ji.getComment)(r.slice(i+1));e=i}}else if(Ut.SEPARATORS.has(s)||Ut.STRUCTURAL_CHARACTERS[s]){t=i,n=s;break}else if(s===Ut.QUOTED_IDENTIFIER_DELIMITER||s===Ut.COMMENT_DELIMITER)throw new Error("Unexpected character: ".concat(s))}if(e!==null){t=t!=null?t:r.length;var u=r.slice(e,t),l=r.slice(t);if(Ut.OPERATORS[u]){if(n&&!Ut.SEPARATORS.has(n))throw new Error("Unexpected character: ".concat(n,". Operators should be separated using whitespace"));return(0,ji.createResult)(Yi.Tokens.OPERATOR,Ut.OPERATORS[u],l)}else return(0,ji.createResult)(Yi.Tokens.IDENTIFIER,u,l)}return(0,ji.createResult)(Yi.Tokens.EOF,null,"")};mu.lex=rA});var t_=T(Wt=>{"use strict";var e_=Wt&&Wt.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,s;n<i;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return r.concat(s||Array.prototype.slice.call(e))};Wt.__esModule=!0;Wt.validateToken=Wt.previousOperatorTakesPrecedent=Wt.getValue=Wt.newTokenGenerator=void 0;var nA=JT(),Gi=kr(),gu=gp(),iA=function(r){var e=r;return function(t,n){for(n===void 0&&(n=!1);;){var i=(0,nA.lex)(e),s=i.token,a=i.remainingString;if(e=a,s.name!==Gi.Tokens.COMMENT)return(0,Wt.validateToken)(s,t,n),s}}};Wt.newTokenGenerator=iA;var sA=function(r,e){var t=r(gu.VALID_TOKENS.identifierOrNot),n=t.value===Gi.Operators.NOT;n&&(t=r(gu.VALID_TOKENS.identifierOnly));var i=t.name===Gi.Tokens.STRUCTURAL_CHARACTER?e(r,!0):[t];return n?e_(e_([],i,!0),[{name:Gi.Tokens.OPERATOR,value:Gi.Operators.NOT}],!1):i};Wt.getValue=sA;var aA=function(r,e){return gu.OPERATOR_PRECEDENCE[r]<=gu.OPERATOR_PRECEDENCE[e]};Wt.previousOperatorTakesPrecedent=aA;var oA=function(r,e,t){if(t===void 0&&(t=!1),r.name===Gi.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")};Wt.validateToken=oA});var _p=T(Bi=>{"use strict";var Sr=Bi&&Bi.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,s;n<i;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return r.concat(s||Array.prototype.slice.call(e))};Bi.__esModule=!0;Bi.parse=void 0;var r_=kr(),n_=gp(),yu=t_(),uA=function(r){if(typeof r!="string")throw new Error("Expected string but received ".concat(typeof r));var e=(0,yu.newTokenGenerator)(r);return Tp(e)};Bi.parse=uA;var Tp=function(r,e){e===void 0&&(e=!1);for(var t=Sr([],(0,yu.getValue)(r,Tp),!0),n=[];;){var i=e?n_.VALID_TOKENS.binaryOperatorOrClose:n_.VALID_TOKENS.binaryOperator,s=r(i,!e);if(s.name===r_.Tokens.EOF||s.name===r_.Tokens.STRUCTURAL_CHARACTER)return Sr(Sr([],t,!0),Sr([],n,!0).reverse(),!0);for(;n.length;){var a=n[n.length-1]||null;if(a&&(0,yu.previousOperatorTakesPrecedent)(a.value,s.value))t=Sr(Sr([],t,!0),[a],!1),n=n.slice(0,-1);else break}n=Sr(Sr([],n,!0),[s],!1),t=Sr(Sr([],t,!0),(0,yu.getValue)(r,Tp),!0)}}});var vp=T(mt=>{"use strict";mt.__esModule=!0;mt.throwInvalidExpression=mt.isOperator=mt.isIdentifier=mt.notUtil=mt.xorUtil=mt.orUtil=mt.andUtil=void 0;var i_=kr(),lA=function(r,e){return r&&e};mt.andUtil=lA;var cA=function(r,e){return r||e};mt.orUtil=cA;var dA=function(r,e){return r!==e};mt.xorUtil=dA;var fA=function(r){return!r};mt.notUtil=fA;var pA=function(r){var e=r.name,t=r.value;return e===i_.Tokens.IDENTIFIER&&typeof t=="string"};mt.isIdentifier=pA;var hA=function(r){var e=r.name,t=r.value;return e===i_.Tokens.OPERATOR&&typeof t=="string"};mt.isOperator=hA;var mA=function(r){throw new TypeError("Invalid postfix expression: ".concat(r))};mt.throwInvalidExpression=mA});var s_=T(bu=>{"use strict";var Ea;bu.__esModule=!0;bu.OPERATOR_MAP=void 0;var Ep=kr(),wp=vp();bu.OPERATOR_MAP=(Ea={},Ea[Ep.Operators.AND]=wp.andUtil,Ea[Ep.Operators.OR]=wp.orUtil,Ea[Ep.Operators.XOR]=wp.xorUtil,Ea)});var o_=T(Qr=>{"use strict";var Hi=Qr&&Qr.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,s;n<i;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return r.concat(s||Array.prototype.slice.call(e))};Qr.__esModule=!0;Qr.evaluate=Qr.getEvaluator=void 0;var gA=_p(),a_=kr(),yA=s_(),Vn=vp(),bA=function(r){var e=(0,gA.parse)(r);return function(t){return(0,Qr.evaluate)(e,t)}};Qr.getEvaluator=bA;var TA=function(r,e){if(!Array.isArray(r))throw new Error("".concat(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&&((0,Vn.isIdentifier)(i)||(0,Vn.isOperator)(i))))throw new Error("Invalid token: ".concat(i,". Found in parsed expression at index ").concat(s));if(i.name===a_.Tokens.IDENTIFIER)return Hi(Hi([],n,!0),[Boolean(e[i.value])],!1);var a=n[n.length-2],o=n[n.length-1];if(i.value===a_.Operators.NOT)return o===void 0&&(0,Vn.throwInvalidExpression)("missing identifier"),Hi(Hi([],n.slice(0,-1),!0),[(0,Vn.notUtil)(o)],!1);(o===void 0||a===void 0)&&(0,Vn.throwInvalidExpression)("missing identifier");var u=yA.OPERATOR_MAP[i.value];return u||(0,Vn.throwInvalidExpression)("unknown operator"),Hi(Hi([],n.slice(0,-2),!0),[u(a,o)],!1)},[]);return t.length!==1&&(0,Vn.throwInvalidExpression)("too many identifiers after evaluation"),t[0]};Qr.evaluate=TA});var l_=T(Or=>{"use strict";var kp=Or&&Or.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,i)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]});Or.__esModule=!0;Or.parse=Or.evaluate=Or.getEvaluator=void 0;var u_=o_();kp(Or,u_,"getEvaluator");kp(Or,u_,"evaluate");var _A=_p();kp(Or,_A,"parse")});var ZA={};Z_(ZA,{default:()=>Lu});module.exports=J_(ZA);var G_=require("obsidian");var Oi=require("obsidian");var eP=new Error("timeout while waiting for mutex to become available"),tP=new Error("mutex already locked"),ev=new Error("request for lock canceled"),tv=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(p){a(p)}}function u(c){try{l(n.throw(c))}catch(p){a(p)}}function l(c){c.done?s(c.value):i(c.value).then(o,u)}l((n=n.apply(r,e||[])).next())})},$u=class{constructor(e,t=ev){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 tv(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]=[])}},rv=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(p){a(p)}}function u(c){try{l(n.throw(c))}catch(p){a(p)}}function l(c){c.done?s(c.value):i(c.value).then(o,u)}l((n=n.apply(r,e||[])).next())})},La=class{constructor(e){this._semaphore=new $u(1,e)}acquire(){return rv(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 Mo=rs(Ge());var _t=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 _t(window.moment().startOf(t).startOf("day"),window.moment().endOf(t).startOf("day"))}static buildInvalid(){return new _t(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 Pt=class{static parseDate(e,t=!1){return window.moment(Mo.parseDate(e,void 0,{forwardDate:t})).startOf("day")}static parseDateRange(e,t=!1){let n=[Pt.parseRelativeDateRange,Pt.parseNumberedDateRange,Pt.parseAbsoluteDateRange];for(let i of n){let s=i(e,t);if(s.isValid())return s}return _t.buildInvalid()}static parseAbsoluteDateRange(e,t){let n=Mo.parse(e,void 0,{forwardDate:t});if(n.length===0)return _t.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 _t(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=_t.buildRelative(a);switch(s){case"last":o.moveToPrevious(a);break;case"next":o.moveToNext(a);break}return o}return _t.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 _t(window.moment(u,s).startOf(a),window.moment(u,s).endOf(a))}}return _t.buildInvalid()}};var _M={td:"today",tm:"tomorrow",yd:"yesterday",tw:"this week",nw:"next week",weekend:"sat",we:"sat"};function Ti(r){for(let[e,t]of Object.entries(_M))r=r.replace(RegExp(`\\b${e}\\s`,"i"),t);return r}var Co=["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(Co.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=Co[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},Nt=function(r){return typeof r=="number"},Af=function(r){return typeof r=="string"&&Co.includes(r)},st=Array.isArray,Qt=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(st(r))for(;t<e;t++)n[t]=[].concat(r);else for(;t<e;t++)n[t]=r;return n},Sb=function(r){return st(r)?r:[r]};function Pn(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 Ob=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},Ao=function(r,e){return{div:Math.floor(r/e),mod:ut(r,e)}},It=function(r){return!Re(r)||r.length===0},Ue=function(r){return!It(r)},ce=function(r,e){return Ue(r)&&r.indexOf(e)!==-1};var Tr=function(r,e,t,n,i,s){return n===void 0&&(n=0),i===void 0&&(i=0),s===void 0&&(s=0),new Date(Date.UTC(r,e-1,t,n,i,s))},vM=[31,28,31,30,31,30,31,31,30,31,30,31],xb=1e3*60*60*24,Po=9999,Mb=Tr(1970,1,1),EM=[6,0,1,2,3,4,5];var _i=function(r){return r%4===0&&r%100!==0||r%400===0},Pf=function(r){return r instanceof Date},Nn=function(r){return Pf(r)&&!isNaN(r.getTime())},Db=function(r){return r.getTimezoneOffset()*60*1e3},wM=function(r,e){var t=r.getTime()-Db(r),n=e.getTime()-Db(e),i=t-n;return Math.round(i/xb)},na=function(r){return wM(r,Mb)},No=function(r){return new Date(Mb.getTime()+r*xb)},kM=function(r){var e=r.getUTCMonth();return e===1&&_i(r.getUTCFullYear())?29:vM[e]},Ur=function(r){return EM[r.getUTCDay()]},Nf=function(r,e){var t=Tr(r,e+1,1);return[Ur(t),kM(t)]},Io=function(r,e){return e=e||r,new Date(Date.UTC(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()))},Fo=function(r){var e=new Date(r.getTime());return e},If=function(r){for(var e=[],t=0;t<r.length;t++)e.push(Fo(r[t]));return e},Wr=function(r){r.sort(function(e,t){return e.getTime()-t.getTime()})},vi=function(r,e){e===void 0&&(e=!0);var t=new Date(r);return[Pn(t.getUTCFullYear().toString(),4,"0"),Pn(t.getUTCMonth()+1,2,"0"),Pn(t.getUTCDate(),2,"0"),"T",Pn(t.getUTCHours(),2,"0"),Pn(t.getUTCMinutes(),2,"0"),Pn(t.getUTCSeconds(),2,"0"),e?"Z":""].join("")},ia=function(r){var e=/^(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2})Z?)?$/,t=e.exec(r);if(!t)throw new Error("Invalid UNTIL value: ".concat(r));return new Date(Date.UTC(parseInt(t[1],10),parseInt(t[2],10)-1,parseInt(t[3],10),parseInt(t[5],10)||0,parseInt(t[6],10)||0,parseInt(t[7],10)||0))},Rb=function(r,e){var t=r.toLocaleString("sv-SE",{timeZone:e});return t.replace(" ","T")+"Z"},Cb=function(r,e){var t=Intl.DateTimeFormat().resolvedOptions().timeZone,n=new Date(Rb(r,t)),i=new Date(Rb(r,e!=null?e:"UTC")),s=i.getTime()-n.getTime();return new Date(r.getTime()-s)};var SM=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}(),qr=SM;var Ff=function(r,e){return Ff=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},Ff(r,e)};function Ei(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Ff(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var at=function(){return at=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},at.apply(this,arguments)};function M(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,s;n<i;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return r.concat(s||Array.prototype.slice.call(e))}var OM=function(r){Ei(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}(qr),Lf=OM;var DM={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}},In=DM;var Ab=function(r,e){return r.indexOf(e)!==-1},RM=function(r){return r.toString()},xM=function(r,e,t){return"".concat(e," ").concat(t,", ").concat(r)},MM=function(){function r(e,t,n,i){if(t===void 0&&(t=RM),n===void 0&&(n=In),i===void 0&&(i=xM),this.text=[],this.language=n||In,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,p){return c-p}),a.sort(function(c,p){return p-c}),this.bymonthday=s.concat(a),this.bymonthday.length||(this.bymonthday=null)}if(Re(this.origOptions.byweekday)){var o=st(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,p){return c.weekday-p.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(Ab(["dtstart","wkst","freq"],n))return!0;if(!Ab(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[$.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=Nt(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=","),st(e)||(e=[e]);var a=function(u,l,c){for(var p="",h=0;h<u.length;h++)h!==0&&(h===u.length-1?p+=" "+c+" ":p+=l+" "),p+=u[h];return p};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}(),_r=MM;var CM=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 sa(r,e){e===void 0&&(e=In);var t={},n=new CM(e.tokens);if(!n.start(r))return null;return i(),t;function i(){n.expect("every");var h=n.acceptNumber();if(h&&(t.interval=parseInt(h[0],10)),n.isDone())throw new Error("Unexpected end");switch(n.symbol){case"day(s)":t.freq=$.DAILY,n.nextSymbol()&&(a(),p());break;case"weekday(s)":t.freq=$.WEEKLY,t.byweekday=[$.MO,$.TU,$.WE,$.TH,$.FR],n.nextSymbol(),p();break;case"week(s)":t.freq=$.WEEKLY,n.nextSymbol()&&(s(),p());break;case"hour(s)":t.freq=$.HOURLY,n.nextSymbol()&&(s(),p());break;case"minute(s)":t.freq=$.MINUTELY,n.nextSymbol()&&(s(),p());break;case"month(s)":t.freq=$.MONTHLY,n.nextSymbol()&&(s(),p());break;case"year(s)":t.freq=$.YEARLY,n.nextSymbol()&&(s(),p());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":t.freq=$.WEEKLY;var _=n.symbol.substr(0,2).toUpperCase();if(t.byweekday=[$[_]],!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]),n.nextSymbol()}c(),p();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=$.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(),p();break;default:throw new Error("Unknown symbol")}}function s(){var h=n.accept("on"),_=n.accept("the");if(!!(h||_))do{var y=l(),w=u(),x=o();if(y)w?(n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push($[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($[w]);else if(n.symbol==="weekday(s)")n.nextSymbol(),t.byweekday||(t.byweekday=[$.MO,$.TU,$.WE,$.TH,$.FR]);else if(n.symbol==="week(s)"){n.nextSymbol();var P=n.acceptNumber();if(!P)throw new Error("Unexpected symbol "+n.symbol+", expected week number");for(t.byweekno=[parseInt(P[0],10)];n.accept("comma");){if(P=n.acceptNumber(),!P)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.byweekno.push(parseInt(P[0],10))}}else if(x)n.nextSymbol(),t.bymonth||(t.bymonth=[]),t.bymonth.push(x);else return}while(n.accept("comma")||n.accept("the")||n.accept("on"))}function a(){var h=n.accept("at");if(!!h)do{var _=n.acceptNumber();if(!_)throw new Error("Unexpected symbol "+n.symbol+", expected hour");for(t.byhour=[parseInt(_[0],10)];n.accept("comma");){if(_=n.acceptNumber(),!_)throw new Error("Unexpected symbol "+n.symbol+"; expected hour");t.byhour.push(parseInt(_[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 h=parseInt(n.value[1],10);if(h<-366||h>366)throw new Error("Nth out of range: "+h);return n.nextSymbol(),n.accept("last")?-h:h;default:return!1}}function c(){n.accept("on"),n.accept("the");var h=l();if(!!h)for(t.bymonthday=[h],n.nextSymbol();n.accept("comma");){if(h=l(),!h)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.bymonthday.push(h),n.nextSymbol()}}function p(){if(n.symbol==="until"){var h=Date.parse(n.text);if(!h)throw new Error("Cannot parse until date:"+n.text);t.until=new Date(h)}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 aa(r){return r<ae.HOURLY}var Pb=function(r,e){return e===void 0&&(e=In),new $(sa(r,e)||void 0)},wi=["count","until","interval","byweekday","bymonthday","bymonth"];_r.IMPLEMENTED=[];_r.IMPLEMENTED[ae.HOURLY]=wi;_r.IMPLEMENTED[ae.MINUTELY]=wi;_r.IMPLEMENTED[ae.DAILY]=["byhour"].concat(wi);_r.IMPLEMENTED[ae.WEEKLY]=wi;_r.IMPLEMENTED[ae.MONTHLY]=wi;_r.IMPLEMENTED[ae.YEARLY]=["byweekno","byyearday"].concat(wi);var Nb=function(r,e,t,n){return new _r(r,e,t,n).toString()},Ib=_r.isFullyConvertible;var ki=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 Fb=function(r){Ei(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 Ur(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=Ao(this.hour,24),a=s.div,o=s.mod;if(a&&(this.hour=o,this.addDaily(a)),It(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=Ao(this.minute,60),o=a.div,u=a.mod;if(o&&(this.minute=u,this.addHours(o,!1,i)),(It(i)||ce(i,this.hour))&&(It(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=Ao(this.second,60),u=o.div,l=o.mod;if(u&&(this.second=l,this.addMinutes(u,!1,i,s)),(It(i)||ce(i,this.hour))&&(It(s)||ce(s,this.minute))&&(It(a)||ce(a,this.second)))break}},e.prototype.fixDay=function(){if(!(this.day<=28)){var t=Nf(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>Po))return;t=Nf(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}(ki);function Uf(r){for(var e=[],t=Object.keys(r),n=0,i=t;n<i.length;n++){var s=i[n];ce(Wb,s)||e.push(s),Pf(r[s])&&!Nn(r[s])&&e.push(s)}if(e.length)throw new Error("Invalid options: "+e.join(", "));return at({},r)}function Lb(r){var e=at(at({},oa),Uf(r));if(Re(e.byeaster)&&(e.freq=$.YEARLY),!(Re(e.freq)&&$.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)?Nt(e.wkst)||(e.wkst=e.wkst.weekday):e.wkst=$.MO.weekday,Re(e.bysetpos)){Nt(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 $.YEARLY:e.bymonth||(e.bymonth=e.dtstart.getUTCMonth()+1),e.bymonthday=e.dtstart.getUTCDate();break;case $.MONTHLY:e.bymonthday=e.dtstart.getUTCDate();break;case $.WEEKLY:e.byweekday=[Ur(e.dtstart)];break}if(Re(e.bymonth)&&!st(e.bymonth)&&(e.bymonth=[e.bymonth]),Re(e.byyearday)&&!st(e.byyearday)&&Nt(e.byyearday)&&(e.byyearday=[e.byyearday]),!Re(e.bymonthday))e.bymonthday=[],e.bynmonthday=[];else if(st(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)&&!st(e.byweekno)&&(e.byweekno=[e.byweekno]),!Re(e.byweekday))e.bynweekday=null;else if(Nt(e.byweekday))e.byweekday=[e.byweekday],e.bynweekday=null;else if(Af(e.byweekday))e.byweekday=[je.fromStr(e.byweekday).weekday],e.bynweekday=null;else if(e.byweekday instanceof je)!e.byweekday.n||e.freq>$.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(Nt(u)){a.push(u);continue}else if(Af(u)){a.push(je.fromStr(u).weekday);continue}!u.n||e.freq>$.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)?Nt(e.byhour)&&(e.byhour=[e.byhour]):e.byhour=e.freq<$.HOURLY?[e.dtstart.getUTCHours()]:null,Re(e.byminute)?Nt(e.byminute)&&(e.byminute=[e.byminute]):e.byminute=e.freq<$.MINUTELY?[e.dtstart.getUTCMinutes()]:null,Re(e.bysecond)?Nt(e.bysecond)&&(e.bysecond=[e.bysecond]):e.bysecond=e.freq<$.SECONDLY?[e.dtstart.getUTCSeconds()]:null,{parsedOptions:e}}function Ub(r){var e=r.dtstart.getTime()%1e3;if(!aa(r.freq))return[];var t=[];return r.byhour.forEach(function(n){r.byminute.forEach(function(i){r.bysecond.forEach(function(s){t.push(new ki(n,i,s,e))})})}),t}function la(r){var e=r.split(`
`).map(AM).filter(function(t){return t!==null});return at(at({},e[0]),e[1])}function ua(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=ia(i),e}function AM(r){if(r=r.replace(/^\s+|\s+$/,""),!r.length)return null;var e=/^([A-Z]+?)[:;]/.exec(r.toUpperCase());if(!e)return qb(r);var t=e[1];switch(t.toUpperCase()){case"RRULE":case"EXRULE":return qb(r);case"DTSTART":return ua(r);default:throw new Error("Unsupported RFC prop ".concat(t," in ").concat(r))}}function qb(r){var e=r.replace(/^RRULE:/i,""),t=ua(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=Xt[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=PM(o),l=a.toLowerCase();t[l]=u;break;case"BYWEEKDAY":case"BYDAY":t.byweekday=NM(o);break;case"DTSTART":case"TZID":var c=ua(r);t.tzid=c.tzid,t.dtstart=c.dtstart;break;case"UNTIL":t.until=ia(o);break;case"BYEASTER":t.byeaster=Number(o);break;default:throw new Error("Unknown RRULE property '"+a+"'")}}),t}function PM(r){if(r.indexOf(",")!==-1){var e=r.split(",");return e.map($b)}return $b(r)}function $b(r){return/^[+-]?\d+$/.test(r)?Number(r):r}function NM(r){var e=r.split(",");return e.map(function(t){if(t.length===2)return Xt[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=Xt[s].weekday;return new je(a,i)})}var Fn=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=vi(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(){return this.isUTC?this.date:Cb(this.date,this.tzid)},r}();function ca(r){for(var e=[],t="",n=Object.keys(r),i=Object.keys(oa),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)||st(o)&&!o.length)){switch(a){case"FREQ":u=$.FREQUENCIES[r.freq];break;case"WKST":Nt(o)?u=new je(o).toString():u=o.toString();break;case"BYWEEKDAY":a="BYDAY",u=Sb(o).map(function(_){return _ instanceof je?_:st(_)?new je(_[0],_[1]):new je(_)}).toString();break;case"DTSTART":t=IM(o,r.tzid);break;case"UNTIL":u=vi(o,!r.tzid);break;default:if(st(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 p=e.map(function(_){var y=_[0],w=_[1];return"".concat(y,"=").concat(w.toString())}).join(";"),h="";return p!==""&&(h="RRULE:".concat(p)),[t,h].filter(function(_){return!!_}).join(`
`)}function IM(r,e){return r?"DTSTART"+new Fn(new Date(r),e).toString():""}function FM(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 Yb=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?Fo(t):If(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 p=0;p<i.length;p++){var h=i[p];if(!FM(t[h],c[h]))return!0}return!1},a=this[e];if(e==="all")n=this.all;else if(st(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 qr(e,t),o=0;o<this.all.length&&l.accept(this.all[o]);o++);n=l.getValue(),this._cacheAdd(e,n,t)}return st(n)?If(n):n instanceof Date?Fo(n):n},r}();var jb=M(M(M(M(M(M(M(M(M(M(M(M(M([],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),Gb=M(M(M(M(M(M(M(M(M(M(M(M(M([],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),LM=Qt(1,29),UM=Qt(1,30),un=Qt(1,31),lt=Qt(1,32),Bb=M(M(M(M(M(M(M(M(M(M(M(M(M([],lt,!0),UM,!0),lt,!0),un,!0),lt,!0),un,!0),lt,!0),lt,!0),un,!0),lt,!0),un,!0),lt,!0),lt.slice(0,7),!0),Hb=M(M(M(M(M(M(M(M(M(M(M(M(M([],lt,!0),LM,!0),lt,!0),un,!0),lt,!0),un,!0),lt,!0),lt,!0),un,!0),lt,!0),un,!0),lt,!0),lt.slice(0,7),!0),WM=Qt(-28,0),qM=Qt(-29,0),ln=Qt(-30,0),ct=Qt(-31,0),zb=M(M(M(M(M(M(M(M(M(M(M(M(M([],ct,!0),qM,!0),ct,!0),ln,!0),ct,!0),ln,!0),ct,!0),ct,!0),ln,!0),ct,!0),ln,!0),ct,!0),ct.slice(0,7),!0),Kb=M(M(M(M(M(M(M(M(M(M(M(M(M([],ct,!0),WM,!0),ct,!0),ln,!0),ct,!0),ln,!0),ct,!0),ct,!0),ln,!0),ct,!0),ln,!0),ct,!0),ct.slice(0,7),!0),Vb=[0,31,60,91,121,152,182,213,244,274,305,335,366],Qb=[0,31,59,90,120,151,181,212,243,273,304,334,365],Wf=function(){for(var r=[],e=0;e<55;e++)r=r.concat(Qt(7));return r}();function Xb(r,e){var t=Tr(r,1,1),n=_i(r)?366:365,i=_i(r+1)?366:365,s=na(t),a=Ur(t),o=at(at({yearlen:n,nextyearlen:i,yearordinal:s,yearweekday:a},$M(r)),{wnomask:null});if(It(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 p=Math.floor(l/7),h=ut(l,7),_=Math.floor(p+h/4),y=0;y<e.byweekno.length;y++){var w=e.byweekno[y];if(w<0&&(w+=_+1),w>0&&w<=_){var x=void 0;w>1?(x=c+(w-1)*7,c!==u&&(x-=7-u)):x=c;for(var P=0;P<7&&(o.wnomask[x]=1,x++,o.wdaymask[x]!==e.wkst);P++);}}if(ce(e.byweekno,1)){var x=c+_*7;if(c!==u&&(x-=7-u),x<n)for(var y=0;y<7&&(o.wnomask[x]=1,x+=1,o.wdaymask[x]!==e.wkst);y++);}if(c){var N=void 0;if(ce(e.byweekno,-1))N=-1;else{var F=Ur(Tr(r-1,1,1)),Z=ut(7-F.valueOf()+e.wkst,7),V=_i(r-1)?366:365,he=void 0;Z>=4?(Z=0,he=V+ut(F-e.wkst,7)):he=n-c,N=Math.floor(52+ut(he,7)/4)}if(ce(e.byweekno,N))for(var x=0;x<c;x++)o.wnomask[x]=1}return o}function $M(r){var e=_i(r)?366:365,t=Tr(r,1,1),n=Ur(t);return e===365?{mmask:jb,mdaymask:Hb,nmdaymask:Kb,wdaymask:Wf.slice(n),mrange:Qb}:{mmask:Gb,mdaymask:Bb,nmdaymask:zb,wdaymask:Wf.slice(n),mrange:Vb}}function Zb(r,e,t,n,i,s){var a={lastyear:r,lastmonth:e,nwdaymask:[]},o=[];if(s.freq===$.YEARLY)if(It(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===$.MONTHLY&&(o=[n.slice(e-1,e+1)]);if(It(o))return a;a.nwdaymask=ue(0,t);for(var u=0;u<o.length;u++)for(var l=o[u],c=l[0],p=l[1]-1,h=0;h<s.bynweekday.length;h++){var _=void 0,y=s.bynweekday[h],w=y[0],x=y[1];x<0?(_=p+(x+1)*7,_-=ut(i[_]-w,7)):(_=c+(x-1)*7,_+=ut(7-i[_]+w,7)),c<=_&&_<=p&&(a.nwdaymask[_]=1)}return a}function Jb(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),p=i%4,h=Math.floor(32+2*a+2*c-l-p)%7,_=Math.floor((t+11*l+22*h)/451),y=Math.floor((l+h-7*_+114)/31),w=(l+h-7*_+114)%31+1,x=Date.UTC(r,y-1,w+e),P=Date.UTC(r,0,1);return[Math.ceil((x-P)/(1e3*60*60*24))]}var YM=function(){function r(e){this.options=e}return r.prototype.rebuild=function(e,t){var n=this.options;if(e!==this.lastyear&&(this.yearinfo=Xb(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=Zb(e,t,s,a,o,n)}Re(n.byeaster)&&(this.eastermask=Jb(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[Qt(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=na(Tr(e,t,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=na(Tr(e,t,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))}),Wr(a),a},r.prototype.mtimeset=function(e,t,n,i){var s=this.options.bysecond.map(function(a){return new ki(e,t,a,i)});return Wr(s),s},r.prototype.stimeset=function(e,t,n,i){return[new ki(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}(),eT=YM;function tT(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 p=[],h=t;h<n;h++){var _=s[h];!Re(_)||p.push(_)}var y=void 0;u<0?y=p.slice(u)[0]:y=p[u];var w=e[l],x=No(i.yearordinal+y),P=Io(x,w);ce(a,P)||a.push(P)}return Wr(a),a}function Lo(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 $r(r);var u=Fb.fromDate(t),l=new eT(e);l.rebuild(u.year,u.month);for(var c=BM(l,u,e);;){var p=l.getdayset(n)(u.year,u.month,u.day),h=p[0],_=p[1],y=p[2],w=GM(h,_,y,l,e);if(Ue(a))for(var x=tT(a,c,_,y,l,h),P=0;P<x.length;P++){var N=x[P];if(s&&N>s)return $r(r);if(N>=t){var F=rT(N,e);if(!r.accept(F)||o&&(--o,!o))return $r(r)}}else for(var P=_;P<y;P++){var Z=h[P];if(!!Re(Z))for(var V=No(l.yearordinal+Z),he=0;he<c.length;he++){var j=c[he],N=Io(V,j);if(s&&N>s)return $r(r);if(N>=t){var F=rT(N,e);if(!r.accept(F)||o&&(--o,!o))return $r(r)}}}if(e.interval===0||(u.add(e,w),u.year>Po))return $r(r);aa(n)||(c=l.gettimeset(n)(u.hour,u.minute,u.second,0)),l.rebuild(u.year,u.month)}}function jM(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 rT(r,e){return new Fn(r,e.tzid).rezonedDate()}function $r(r){return r.getValue()}function GM(r,e,t,n,i){for(var s=!1,a=e;a<t;a++){var o=r[a];s=jM(n,o,i),s&&(r[o]=null)}return s}function BM(r,e,t){var n=t.freq,i=t.byhour,s=t.byminute,a=t.bysecond;return aa(n)?Ub(t):n>=$.HOURLY&&Ue(i)&&!ce(i,e.hour)||n>=$.MINUTELY&&Ue(s)&&!ce(s,e.minute)||n>=$.SECONDLY&&Ue(a)&&!ce(a,e.second)?[]:r.gettimeset(n)(e.hour,e.minute,e.second,e.millisecond)}var Xt={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)},oa={freq:ae.YEARLY,dtstart:null,interval:1,wkst:Xt.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},Wb=Object.keys(oa),$=function(){function r(e,t){e===void 0&&(e={}),t===void 0&&(t=!1),this._cache=t?null:new Yb,this.origOptions=Uf(e);var n=Lb(e).parsedOptions;this.options=n}return r.parseText=function(e,t){return sa(e,t)},r.fromText=function(e,t){return Pb(e,t)},r.fromString=function(e){return new r(r.parseString(e)||void 0)},r.prototype._iter=function(e){return Lo(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 Lf("all",{},e));var t=this._cacheGet("all");return t===!1&&(t=this._iter(new qr("all",{})),this._cacheAdd("all",t)),t},r.prototype.between=function(e,t,n,i){if(n===void 0&&(n=!1),!Nn(e)||!Nn(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 Lf("between",s,i));var a=this._cacheGet("between",s);return a===!1&&(a=this._iter(new qr("between",s)),this._cacheAdd("between",a,s)),a},r.prototype.before=function(e,t){if(t===void 0&&(t=!1),!Nn(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 qr("before",n)),this._cacheAdd("before",i,n)),i},r.prototype.after=function(e,t){if(t===void 0&&(t=!1),!Nn(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 qr("after",n)),this._cacheAdd("after",i,n)),i},r.prototype.count=function(){return this.all().length},r.prototype.toString=function(){return ca(this.origOptions)},r.prototype.toText=function(e,t,n){return Nb(this,e,t,n)},r.prototype.isFullyConvertibleToText=function(){return Ib(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=Xt.MO,r.TU=Xt.TU,r.WE=Xt.WE,r.TH=Xt.TH,r.FR=Xt.FR,r.SA=Xt.SA,r.SU=Xt.SU,r.parseString=la,r.optionsToString=ca,r}();function nT(r,e,t,n,i,s){var a={},o=r.accept;function u(h,_){t.forEach(function(y){y.between(h,_,!0).forEach(function(w){a[Number(w)]=!0})})}i.forEach(function(h){var _=new Fn(h,s).rezonedDate();a[Number(_)]=!0}),r.accept=function(h){var _=Number(h);return isNaN(_)?o.call(this,h):!a[_]&&(u(new Date(_-1),new Date(_+1)),!a[_])?(a[_]=!0,o.call(this,h)):!0},r.method==="between"&&(u(r.args.after,r.args.before),r.accept=function(h){var _=Number(h);return a[_]?!0:(a[_]=!0,o.call(this,h))});for(var l=0;l<n.length;l++){var c=new Fn(n[l],s).rezonedDate();if(!r.accept(new Date(c.getTime())))break}e.forEach(function(h){Lo(r,h.options)});var p=r._result;switch(Wr(p),r.method){case"all":case"between":return p;case"before":return p.length&&p[p.length-1]||null;case"after":default:return p.length&&p[0]||null}}var iT={dtstart:null,cache:!1,unfold:!1,forceset:!1,compatible:!1,tzid:null};function HM(r,e){var t=[],n=[],i=[],s=[],a=ua(r),o=a.dtstart,u=a.tzid,l=XM(r,e.unfold);return l.forEach(function(c){var p;if(!!c){var h=QM(c),_=h.name,y=h.parms,w=h.value;switch(_.toUpperCase()){case"RRULE":if(y.length)throw new Error("unsupported RRULE parm: ".concat(y.join(",")));t.push(la(c));break;case"RDATE":var x=(p=/RDATE(?:;TZID=([^:=]+))?/i.exec(c))!==null&&p!==void 0?p:[],P=x[1];P&&!u&&(u=P),n=n.concat(sT(w,y));break;case"EXRULE":if(y.length)throw new Error("unsupported EXRULE parm: ".concat(y.join(",")));i.push(la(w));break;case"EXDATE":s=s.concat(sT(w,y));break;case"DTSTART":break;default:throw new Error("unsupported property: "+_)}}}),{dtstart:o,tzid:u,rrulevals:t,rdatevals:n,exrulevals:i,exdatevals:s}}function zM(r,e){var t=HM(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 $f(l);return c.dtstart(o),c.tzid(u||void 0),n.forEach(function(h){c.rrule(new $(qf(h,o,u),l))}),i.forEach(function(h){c.rdate(h)}),s.forEach(function(h){c.exrule(new $(qf(h,o,u),l))}),a.forEach(function(h){c.exdate(h)}),e.compatible&&e.dtstart&&c.rdate(o),c}var p=n[0]||{};return new $(qf(p,p.dtstart||e.dtstart||o,p.tzid||e.tzid||u),l)}function Uo(r,e){return e===void 0&&(e={}),zM(r,KM(e))}function qf(r,e,t){return at(at({},r),{dtstart:e,tzid:t})}function KM(r){var e=[],t=Object.keys(r),n=Object.keys(iT);if(t.forEach(function(i){ce(n,i)||e.push(i)}),e.length)throw new Error("Invalid options: "+e.join(", "));return at(at({},iT),r)}function VM(r){if(r.indexOf(":")===-1)return{name:"RRULE",value:r};var e=Ob(r,":",1),t=e[0],n=e[1];return{name:t,value:n}}function QM(r){var e=VM(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 XM(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 ZM(r){r.forEach(function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)})}function sT(r,e){return ZM(e),r.split(",").map(function(t){return ia(t)})}function aT(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 $f=function(r){Ei(e,r);function e(t){t===void 0&&(t=!1);var n=r.call(this,{},t)||this;return n.dtstart=aT.apply(n,["dtstart"]),n.tzid=aT.apply(n,["tzid"]),n._rrule=[],n._rdate=[],n._exrule=[],n._exdate=[],n}return e.prototype._iter=function(t){return nT(t,this._rrule,this._exrule,this._rdate,this._exdate,this.tzid())},e.prototype.rrule=function(t){oT(t,this._rrule)},e.prototype.exrule=function(t){oT(t,this._exrule)},e.prototype.rdate=function(t){uT(t,this._rdate)},e.prototype.exdate=function(t){uT(t,this._exdate)},e.prototype.rrules=function(){return this._rrule.map(function(t){return Uo(t.toString())})},e.prototype.exrules=function(){return this._exrule.map(function(t){return Uo(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(ca({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(lT("RDATE",this._rdate,this.tzid())),this._exdate.length&&t.push(lT("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}($);function oT(r,e){if(!(r instanceof $))throw new TypeError(String(r)+" is not RRule instance");ce(e.map(String),String(r))||e.push(r)}function uT(r,e){if(!(r instanceof Date))throw new TypeError(String(r)+" is not Date instance");ce(e.map(Number),Number(r))||(e.push(r),Wr(e))}function lT(r,e,t){var n=!t||t.toUpperCase()==="UTC",i=n?"".concat(r,":"):"".concat(r,";TZID=").concat(t,":"),s=e.map(function(a){return vi(a.valueOf(),n)}).join(",");return"".concat(i).concat(s)}function Yr(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 Ze=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=$.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 $(u);return new Ze({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||Yr(this.startDate,e.startDate)!==0||Yr(this.scheduledDate,e.scheduledDate)!==0||Yr(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 $(bt(pe({},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=Ze.nextAfterMonths(e,n,t,s[1])));let a=i.match(/every( \d+)? year(s)?(.*)?/);return a!==null&&(n=Ze.nextAfterYears(e,n,t,a[1])),Ze.addTimezone(n)}static nextAfterMonths(e,t,n,i){let s=1;for(i!==void 0&&(s=Number.parseInt(i.trim(),10));Ze.isSkippingTooManyMonths(e,t,s);)t=Ze.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));Ze.isSkippingTooManyYears(e,t,s);)t=Ze.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 $(n),window.moment(t.after(e.toDate()))}static addTimezone(e){return window.moment.utc(e).local(!0).startOf("day")}};function Wo(r){return r.replace(/([.*+?^${}()|[\]/\\])/g,"\\$1")}var cn=class{constructor(){this._globalFilter="";this._removeGlobalFilter=!1}static getInstance(){return cn.instance||(cn.instance=new cn),cn.instance}get(){return this._globalFilter}set(e){this._globalFilter=e}reset(){this.set(cn.empty)}isEmpty(){return this.get()===cn.empty}equals(e){return this.get()===e}includedIn(e){let t=this.get();return e.includes(t)}prependTo(e){return this.get()+" "+e}removeAsWordFromDependingOnSettings(e){return this.getRemoveGlobalFilter()?this.removeAsWordFrom(e):e}getRemoveGlobalFilter(){return this._removeGlobalFilter}setRemoveGlobalFilter(e){this._removeGlobalFilter=e}removeAsWordFrom(e){if(this.isEmpty())return e;let t=RegExp("(^|\\s)"+Wo(this.get())+"($|\\s)","ug");return e.search(t)>-1&&(e=e.replace(t,"$1$2").replace(" "," ").trim()),e}removeAsSubstringFrom(e){let t=this.get();return e.replace(t,"").trim()}},ge=cn;ge.empty="";var Yf=5;function jf(r,e){let t=[r.startDateSymbol,r.scheduledDateSymbol,r.dueDateSymbol].join("|");return(n,i,s)=>{let a=[];return a=a.concat(eC(n,i,s,t,e)),a=a.concat(tC(n,i,s,r.recurrenceSymbol)),a=a.concat(JM(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 JM(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=Pt.parseDate("today",!0).format(z.dateFormat);s.push({textToMatch:`${n.createdDateSymbol} created`,displayText:`${n.createdDateSymbol} created today (${l})`,appendText:`${n.createdDateSymbol} ${l} `})}let a=Gf(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 eC(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=Gf(r,o,e);if(u&&u.length>=2){let l=u[1],c=u[2];if(c.length<t.autoSuggestMinMatch)return[];let p=c&&c.length>1?Pt.parseDate(Ti(c),!0):null;p&&p.isValid()&&a.push({displayText:`${p.format(z.dateFormat)}`,appendText:`${l} ${p.format(z.dateFormat)} `,insertAt:u.index,insertSkip:u[0].length});let h=1,_=s.filter(y=>c&&c.length>=h&&y.toLowerCase().includes(c.toLowerCase())).slice(0,i);_.length===0&&(_=s.slice(0,i));for(let y of _){let x=`${Pt.parseDate(y,!0).format(z.dateFormat)}`;a.push({suggestionType:"match",displayText:`${y} (${x})`,appendText:`${l} ${x} `,insertAt:u.index,insertSkip:u[0].length})}}return a}function tC(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=Gf(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=Ze.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 p=1,h=t.autoSuggestMaxItems/2,_=i.filter(y=>c&&c.length>=p&&y.toLowerCase().includes(c.toLowerCase())).slice(0,h);_.length===0&&c.trim().length===0&&(_=i.slice(0,h));for(let y of _)s.push({suggestionType:"match",displayText:`${y}`,appendText:`${l} ${y} `,insertAt:o.index,insertSkip:o[0].length})}return s}function Gf(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}function rC(r,e){if(e.length===0)return!1;let t=Object.fromEntries(e.map(([i,s])=>[i,0])),n=Object.fromEntries(e.map(([i,s])=>[s,i]));for(let i of r)i in t?t[i]++:i in n&&(t[n[i]]=Math.max(0,t[n[i]]-1));return Object.values(t).some(i=>i>0)}function dT(r,e){return(t,n,i)=>rC(t.slice(0,n),e)?r(t,n,i):[]}function fT(r,e){return ge.getInstance().includedIn(r)&&nC(r,e)}function nC(r,e){if(r.length===0)return!1;let t=ye.extractTaskComponents(r);if(!t)return!1;let n=t.indentation+t.listMarker+" ["+t.status.symbol+"] ";return e>=n.length}var da=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.hideTags=!1;this.shortMode=!1;this.explainQuery=!1}},dn=class{constructor(e){this.defaultLayout=["description","priority","recurrenceRule","createdDate","startDate","scheduledDate","dueDate","doneDate","blockLink"];this.hiddenTaskLayoutComponents=[];this.taskListHiddenClasses=[];e?this.options=e:this.options=new da,this.shownTaskLayoutComponents=this.defaultLayout,this.applyOptions()}applyOptions(){let e=[[this.options.hidePriority,"priority"],[this.options.hideRecurrenceRule,"recurrenceRule"],[this.options.hideCreatedDate,"createdDate"],[this.options.hideStartDate,"startDate"],[this.options.hideScheduledDate,"scheduledDate"],[this.options.hideDueDate,"dueDate"],[this.options.hideDoneDate,"doneDate"]];for(let[n,i]of e)this.hideComponent(n,i),this.generateHiddenClassForTaskList(n,i);let t=[[this.options.hideTags,"tags"],[this.options.hideUrgency,"urgency"],[this.options.hideBacklinks,"backlinks"],[this.options.hideEditButton,"edit-button"]];for(let[n,i]of t)this.generateHiddenClassForTaskList(n,i);this.options.shortMode&&this.taskListHiddenClasses.push("tasks-layout-short-mode")}generateHiddenClassForTaskList(e,t){e&&this.taskListHiddenClasses.push(`tasks-layout-hide-${t}`)}hideComponent(e,t){e&&(this.hiddenTaskLayoutComponents.push(t),this.shownTaskLayoutComponents=this.shownTaskLayoutComponents.filter(n=>n!=t))}};var Bf={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}},Ln=class{constructor(e){this.symbols=e}serialize(e){let t=new dn,n="";for(let i of t.shownTaskLayoutComponents)n+=this.componentToString(e,t,i);return n}componentToString(e,t,n){var p;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 h="";return e.priority==="0"?h=" "+i.Highest:e.priority==="1"?h=" "+i.High:e.priority==="2"?h=" "+i.Medium:e.priority==="4"?h=" "+i.Low:e.priority==="5"&&(h=" "+i.Lowest),h}case"startDate":return e.startDate?t.options.shortMode?" "+s:` ${s} ${e.startDate.format(z.dateFormat)}`:"";case"createdDate":return e.createdDate?t.options.shortMode?" "+a:` ${a} ${e.createdDate.format(z.dateFormat)}`:"";case"scheduledDate":return!e.scheduledDate||e.scheduledDateIsInferred?"":t.options.shortMode?" "+o:` ${o} ${e.scheduledDate.format(z.dateFormat)}`;case"doneDate":return e.doneDate?t.options.shortMode?" "+u:` ${u} ${e.doneDate.format(z.dateFormat)}`:"";case"dueDate":return e.dueDate?t.options.shortMode?" "+c:` ${c} ${e.dueDate.format(z.dateFormat)}`:"";case"recurrenceRule":return e.recurrence?t.options.shortMode?" "+l:` ${l} ${e.recurrence.toText()}`:"";case"blockLink":return(p=e.blockLink)!=null?p:"";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="",p=null,h="",_=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 x=e.match(t.doneDateRegex);x!==null&&(u=window.moment(x[1],z.dateFormat),e=e.replace(t.doneDateRegex,"").trim(),n=!0);let P=e.match(t.dueDateRegex);P!==null&&(o=window.moment(P[1],z.dateFormat),e=e.replace(t.dueDateRegex,"").trim(),n=!0);let N=e.match(t.scheduledDateRegex);N!==null&&(a=window.moment(N[1],z.dateFormat),e=e.replace(t.scheduledDateRegex,"").trim(),n=!0);let F=e.match(t.startDateRegex);F!==null&&(s=window.moment(F[1],z.dateFormat),e=e.replace(t.startDateRegex,"").trim(),n=!0);let Z=e.match(t.createdDateRegex);Z!==null&&(l=window.moment(Z[1],z.dateFormat),e=e.replace(t.createdDateRegex,"").trim(),n=!0);let V=e.match(t.recurrenceRegex);V!==null&&(c=V[1].trim(),e=e.replace(t.recurrenceRegex,"").trim(),n=!0);let he=e.match(z.hashTagsFromEnd);if(he!=null){e=e.replace(z.hashTagsFromEnd,"").trim(),n=!0;let j=he[0].trim();h=h.length>0?[j,h].join(" "):j}y++}while(n&&y<=_);return c.length>0&&(p=Ze.fromText({recurrenceRuleText:c,startDate:s,scheduledDate:a,dueDate:o})),h.length>0&&(e+=" "+h),{description:e,priority:i,startDate:s,createdDate:l,scheduledDate:a,dueDate:o,doneDate:u,recurrence:p,tags:ye.extractHashtags(e)}}};function Un(r){let e=["(?:",/(?=[^\]]+\])\[/,"|",/(?=[^)]+\))\(/,")",/ */,r,/ */,/[)\]]/,/(?: *,)?/,/$/].map(t=>t instanceof RegExp?t.source:t).join("");return new RegExp(e,r.flags)}var Hf={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:Un(/priority:: *(highest|high|medium|low|lowest)/),startDateRegex:Un(/start:: *(\d{4}-\d{2}-\d{2})/),createdDateRegex:Un(/created:: *(\d{4}-\d{2}-\d{2})/),scheduledDateRegex:Un(/scheduled:: *(\d{4}-\d{2}-\d{2})/),dueDateRegex:Un(/due:: *(\d{4}-\d{2}-\d{2})/),doneDateRegex:Un(/completion:: *(\d{4}-\d{2}-\d{2})/),recurrenceRegex:Un(/repeat:: *([a-zA-Z0-9, !]+)/)}},qo=class extends Ln{constructor(){super(Hf)}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 Ft=(a=>(a.TODO="TODO",a.DONE="DONE",a.IN_PROGRESS="IN_PROGRESS",a.CANCELLED="CANCELLED",a.NON_TASK="NON_TASK",a.EMPTY="EMPTY",a))(Ft||{}),Je=class{constructor(e,t,n,i,s="TODO"){this.symbol=e,this.name=t,this.nextStatusSymbol=n,this.availableAsCommand=i,this.type=s}};var Dt=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}get typeGroupText(){let e=this.type,t;switch(e){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}`}constructor(e){this.configuration=e}static makeDone(){return new Dt(new Je("x","Done"," ",!0,"DONE"))}static makeEmpty(){return new Dt(new Je("","EMPTY","",!0,"EMPTY"))}static makeTodo(){return new Dt(new Je(" ","Todo","x",!0,"TODO"))}static makeCancelled(){return new Dt(new Je("-","Cancelled"," ",!0,"CANCELLED"))}static makeInProgress(){return new Dt(new Je("/","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 Ft[e]||"TODO"}static createUnknownStatus(e){return new Dt(new Je(e,"Unknown","x",!1,"TODO"))}static createFromImportedValue(e){let t=e[0],n=Dt.getTypeFromStatusTypeString(e[3]);return new Dt(new Je(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 Dt.tasksPluginCanCreateCommandsForStatuses()&&this.availableAsCommand&&(e=" Available as a command."),`- [${this.symbol}] => [${this.nextStatusSymbol}], name: '${this.name}', type: '${this.configuration.type}'.${e}`}static tasksPluginCanCreateCommandsForStatuses(){return!1}},X=Dt;X.DONE=Dt.makeDone(),X.EMPTY=Dt.makeEmpty(),X.TODO=Dt.makeTodo();var $o=class{constructor(e=!1,t=!1){this.ignoreSortInstructions=e,this.showTaskHiddenData=t}};var Ne=class{constructor(){this.coreStatuses=[X.makeTodo().configuration,X.makeDone().configuration],this.customStatuses=[X.makeInProgress().configuration,X.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 X(e);return t.findIndex(i=>new X(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){Ne.deleteAllCustomStatuses(e),new Ne().customStatuses.forEach(n=>{Ne.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.`):Ne.addStatus(e.customStatuses,X.createFromImportedValue(i))}),n}static allStatuses(e){return e.coreStatuses.concat(e.customStatuses)}static applyToStatusRegistry(e,t){t.clearStatuses(),Ne.allStatuses(e).forEach(n=>{t.add(n)})}};var pT=[{index:9999,internalName:"INTERNAL_TESTING_ENABLED_BY_DEFAULT",displayName:"Test Item. Used to validate the Feature Framework.",description:"Description",enabledByDefault:!0,stable:!1}];var jr=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 pT.forEach(t=>{e=[...e,new jr(t.internalName,t.index,t.description,t.displayName,t.enabledByDefault,t.stable)]}),e}static get settingsFlags(){let e={};return jr.values.forEach(t=>{e[t.internalName]=t.enabledByDefault}),e}static fromString(e){for(let t of jr.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}`)}};var Gr={tasksPluginEmoji:{displayName:"Tasks Emoji Format",taskSerializer:new Ln(Bf),buildSuggestions:jf(Bf,Yf)},dataview:{displayName:"Dataview",taskSerializer:new qo,buildSuggestions:dT(jf(Hf,Yf),[["(",")"],["[","]"]])}},mT={globalQuery:"",globalFilter:"",removeGlobalFilter:!1,taskFormat:"tasksPluginEmoji",setCreatedDate:!1,setDoneDate:!0,autoSuggestInEditor:!0,autoSuggestMinMatch:0,autoSuggestMaxItems:6,provideAccessKeys:!0,useFilenameAsScheduledDate:!1,filenameAsDateFolders:[],recurrenceOnNextLine:!1,statusSettings:new Ne,features:jr.settingsFlags,generalSettings:{},headingOpened:{},debugSettings:new $o,loggingOptions:{minLevels:{"":"info",tasks:"info","tasks.Cache":"info","tasks.Events":"info","tasks.File":"info","tasks.Query":"info","tasks.Task":"info"}}},fn=pe({},mT);function hT(r,e){for(let t in r)e[t]===void 0&&(e[t]=r[t])}var Q=()=>(hT(jr.settingsFlags,fn.features),hT(mT.loggingOptions.minLevels,fn.loggingOptions.minLevels),fn.statusSettings.customStatuses.forEach((r,e,t)=>{var i,s;let n=X.getTypeFromStatusTypeString(r.type);t[e]=new Je((i=r.symbol)!=null?i:" ",r.name,(s=r.nextStatusSymbol)!=null?s:"x",r.availableAsCommand,n)}),pe({},fn)),et=r=>(fn=pe(pe({},fn),r),Q());var Wn=(r,e)=>(fn.generalSettings[r]=e,Q()),gT=r=>{var e;return(e=fn.features[r])!=null?e:!1};function pa(){return Gr[Q().taskFormat]}function Yo(r){let t={"<":"&lt;",">":"&gt;","&":"&amp;",'"':"&quot;"}[r];return t!==void 0?t:r}function yT(r){let e=[...r],t="";return e.forEach(n=>{t+=Yo(n)}),t}var Oe=class{constructor(){this._registeredStatuses=[];this.addDefaultStatusTypes()}set(e){this.clearStatuses(),e.forEach(t=>{this.add(t)})}get registeredStatuses(){return this._registeredStatuses.filter(({symbol:e})=>e!==X.EMPTY.symbol)}static getInstance(){return Oe.instance||(Oe.instance=new Oe),Oe.instance}add(e){this.hasSymbol(e.symbol)||(e instanceof X?this._registeredStatuses.push(e):this._registeredStatuses.push(new X(e)))}bySymbol(e){return this.hasSymbol(e)?this.getSymbol(e):X.EMPTY}bySymbolOrCreate(e){return this.hasSymbol(e)?this.getSymbol(e):X.createUnknownStatus(e)}byName(e){return this._registeredStatuses.filter(({name:t})=>t===e).length>0?this._registeredStatuses.filter(({name:t})=>t===e)[0]:X.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 X.EMPTY}getNextStatusOrCreate(e){let t=this.getNextStatus(e);return t.type!=="EMPTY"?t:X.createUnknownStatus(e.nextStatusSymbol)}findUnknownStatuses(e){let t=e.filter(s=>!this.hasSymbol(s.symbol)),n=new Oe,i=[];return t.forEach(s=>{if(n.hasSymbol(s.symbol))return;let a=Oe.copyStatusWithNewName(s,`Unknown (${s.symbol})`);i.push(a),n.add(a)}),i.sort((s,a)=>s.symbol.localeCompare(a.symbol,void 0,{numeric:!0}))}static copyStatusWithNewName(e,t){let n=new Je(e.symbol,t,e.nextStatusSymbol,e.availableAsCommand,e.type);return new X(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(){[X.makeTodo(),X.makeInProgress(),X.makeDone(),X.makeCancelled()].forEach(t=>{this.add(t)})}mermaidDiagram(e=!1){let t=this.registeredStatuses,n="mermaid",i=[],s=[];return t.forEach((a,o)=>{let u=this.getMermaidNodeLabel(a,e);i.push(`${o+1}${u}`);let l=this.getNextStatus(a),c=t.findIndex(_=>_.symbol===l.symbol),p=c!==-1,h=l.type!=="EMPTY";p&&h&&s.push(`${o+1} --> ${c+1}`)}),`
\`\`\`${n}
flowchart LR
classDef TODO stroke:#f33,stroke-width:3px;
classDef DONE stroke:#0c0,stroke-width:3px;
classDef IN_PROGRESS stroke:#fa0,stroke-width:3px;
classDef CANCELLED stroke:#ddd,stroke-width:3px;
classDef NON_TASK stroke:#99e,stroke-width:3px;
${i.join(`
`)}
${s.join(`
`)}
linkStyle default stroke:gray
\`\`\`
`}getMermaidNodeLabel(e,t){let n=yT(e.name),i=e.type;if(t){let s=Yo(e.symbol),a=Yo(e.nextStatusSymbol),o=`[${s}] -> [${a}]`,u=`'${n}'`,l=`(${i})`;return`["${u}<br>${o}<br>${l}"]:::${i}`}else return`["${n}"]:::${i}`}};var ur=class{static calculate(e){let t=0;if(e.dueDate!==null){let n=window.moment().startOf("day"),i=Math.round(n.diff(e.dueDate)/ur.milliSecondsPerDay),s;i>=7?s=1:i>=-14?s=(i+14)*.8/21+.2:s=.2,t+=s*ur.dueCoefficient}switch(e.scheduledDate!==null&&window.moment().isSameOrAfter(e.scheduledDate)&&(t+=1*ur.scheduledCoefficient),e.startDate!==null&&window.moment().isBefore(e.startDate)&&(t+=1*ur.startedCoefficient),e.priority){case"0":t+=1.5*ur.priorityCoefficient;break;case"1":t+=1*ur.priorityCoefficient;break;case"2":t+=.65*ur.priorityCoefficient;break;case"3":t+=.325*ur.priorityCoefficient;break;case"5":t-=.3*ur.priorityCoefficient;break}return t}},Br=ur;Br.dueCoefficient=12,Br.scheduledCoefficient=5,Br.startedCoefficient=-3,Br.priorityCoefficient=6,Br.milliSecondsPerDay=1e3*60*60*24;var Rt=class{static fromPath(e){let{useFilenameAsScheduledDate:t,filenameAsDateFolders:n}=Q();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 ye(bt(pe({},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 ye(bt(pe({},i),{scheduledDateIsInferred:!1}))),i))}};var Hr=class{constructor(e,t){this.name=e,this.sortOrder=t}get groupText(){return this.name!==""?`%%${this.sortOrder}%% ${this.name}`:""}};var vt=class{constructor(e){this._date=null;this._date=e}get moment(){return this._date}formatAsDate(e=""){return this.format(z.dateFormat,e)}formatAsDateAndTime(e=""){return this.format(z.dateTimeFormat,e)}format(e,t=""){return this._date?this._date.format(e):t}toISOString(e){return this._date?this._date.toISOString(e):""}get category(){let e=window.moment(),t=this.moment;return t?t.isBefore(e,"day")?new Hr("Overdue",1):t.isSame(e,"day")?new Hr("Today",2):new Hr("Future",3):new Hr("Undated",4)}get fromNow(){let e=this.moment;if(!e)return new Hr("",0);let t=this.fromNowOrder(e);return new Hr(e.fromNow(),t)}fromNowOrder(e){let t=window.moment(),n=e.isSameOrBefore(t,"day"),i=this.fromNowStartDateOfGroup(e,n,t);return Number((n?1:3)+i.format("YYYYMMDD"))}fromNowStartDateOfGroup(e,t,n){let i=e.fromNow(!0).split(" "),s,a=Number(i[0]);isNaN(a)?s=1:s=a;let o=i[1];return t?n.subtract(s,o):n.add(s,o)}};var Si=class{constructor(e){this._path=e}get path(){return this._path}get pathWithoutExtension(){return this.withoutExtension(this.path)}withoutExtension(e){return e.replace(/\.md$/,"")}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]:""}get filenameWithoutExtension(){return this.withoutExtension(this.filename)}};var zr=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 zr.priorityNameUsingNone(e).replace("None","Normal")}};var sC=require("obsidian"),vT=rs(_T());var zf=class extends vT.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 Kf(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)}},xt=new zf,Kf=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)}};function Vf(r,e){let t=xt.getLogger("tasks");switch(r){case"trace":t.trace(e);break;case"debug":t.debug(e);break;case"info":t.info(e);break;case"warn":t.warn(e);break;case"error":t.error(e);break;default:break}}var Lt=class{},z=Lt;z.dateFormat="YYYY-MM-DD",z.dateTimeFormat="YYYY-MM-DD HH:mm",z.indentationRegex=/^([\s\t>]*)/,z.listMarkerRegex=/([-*+]|[0-9]+\.)/,z.checkboxRegex=/\[(.)\]/u,z.afterCheckboxRegex=/ *(.*)/u,z.taskRegex=new RegExp(Lt.indentationRegex.source+Lt.listMarkerRegex.source+" +"+Lt.checkboxRegex.source+Lt.afterCheckboxRegex.source,"u"),z.nonTaskRegex=new RegExp(Lt.indentationRegex.source+Lt.listMarkerRegex.source+"? *("+Lt.checkboxRegex.source+")?"+Lt.afterCheckboxRegex.source,"u"),z.listItemRegex=new RegExp(Lt.indentationRegex.source+Lt.listMarkerRegex.source),z.blockLinkRegex=/ \^[a-zA-Z0-9-]+$/u,z.hashTags=/(^|\s)#[^ !@#$%^&*(),.?":{}|<>]+/g,z.hashTagsFromEnd=new RegExp(Lt.hashTags.source+"$");var ye=class{constructor({status:e,description:t,taskLocation:n,indentation:i,listMarker:s,priority:a,createdDate:o,startDate:u,scheduledDate:l,dueDate:c,doneDate:p,recurrence:h,blockLink:_,tags:y,originalMarkdown:w,scheduledDateIsInferred:x}){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=p,this.recurrence=h,this.blockLink=_,this.originalMarkdown=w,this.scheduledDateIsInferred=x}static fromLine({line:e,taskLocation:t,fallbackDate:n}){let i=ye.extractTaskComponents(e);return i===null||!ge.getInstance().includedIn(i.body)?null:ye.parseTaskSignifiers(e,t,n)}static parseTaskSignifiers(e,t,n){let i=ye.extractTaskComponents(e);if(i===null)return null;let{taskSerializer:s}=pa(),a=s.deserialize(i.body),o=!1;return Rt.canApplyFallback(a)&&n!==null&&(a.scheduledDate=n,o=!0),a.tags=a.tags.map(u=>u.trim()),a.tags=a.tags.filter(u=>!ge.getInstance().equals(u)),new ye(bt(pe(pe({},i),a),{taskLocation:t,originalMarkdown:e,scheduledDateIsInferred:o}))}static extractTaskComponents(e){let t=e.match(z.taskRegex);if(t===null)return null;let n=t[1],i=t[2],s=t[3],a=Oe.getInstance().bySymbolOrCreate(s),o=t[4].trim(),u=o.match(z.blockLinkRegex),l=u!==null?u[0]:"";return l!==""&&(o=o.replace(z.blockLinkRegex,"").trim()),{indentation:n,listMarker:i,status:a,body:o,blockLink:l}}toString(){return pa().taskSerializer.serialize(this)}toFileLineString(){return`${this.indentation}${this.listMarker} [${this.status.symbol}] ${this.toString()}`}toggle(){xt.getLogger("tasks.Task").trace(`toggling task ${this.taskLocation.path} ${this.taskLocation.lineNumber} ${this.originalMarkdown}`);let t=Oe.getInstance().getNextStatusOrCreate(this.status),n=null,i=null;if(t.isCompleted()){let{setDoneDate:o}=Q();o&&(n=window.moment()),this.recurrence!==null&&(i=this.recurrence.next())}let s=new ye(bt(pe({},this),{status:t,doneDate:n})),a=[];if(i!==null){let{setCreatedDate:o}=Q(),u=null;o&&(u=window.moment());let l=Oe.getInstance().getNextStatusOrCreate(t),c=new ye(bt(pe(pe({},this),i),{status:l,blockLink:"",createdDate:u}));a.push(c)}return a.push(s),a}toggleWithRecurrenceInUsersOrder(){let e=this.toggle(),{recurrenceOnNextLine:t}=Q();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 priorityNameGroupText(){let e=zr.priorityNameUsingNormal(this.priority);return`%%${this.priority}%%${e} priority`}get descriptionWithoutTags(){return this.description.replace(z.hashTags,"").trim()}get priorityName(){return zr.priorityNameUsingNormal(this.priority)}get urgency(){return this._urgency===null&&(this._urgency=Br.calculate(this)),this._urgency}get path(){return this.taskLocation.path}get created(){return new vt(this.createdDate)}get done(){return new vt(this.doneDate)}get due(){return new vt(this.dueDate)}get scheduled(){return new vt(this.scheduledDate)}get start(){return new vt(this.startDate)}get happensDates(){return Array.of(this.startDate,this.scheduledDate,this.dueDate)}get happens(){let t=this.happensDates.sort(Yr);return new vt(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 Si(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(Yr(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(z.hashTags))==null?void 0:t.map(i=>i.trim()))!=null?n:[]}};var ha=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 qn=class{constructor({metadataCache:e,vault:t,events:n}){this.logger=xt.getLogger("tasks.Cache");this.logger.debug("Creating Cache object"),this.metadataCache=e,this.metadataCacheEventReferences=[],this.vault=t,this.vaultEventReferences=[],this.events=n,this.eventsEventReferences=[],this.tasksMutex=new La,this.state="Cold",this.logger.debug("Cache.constructor(): state = Cold"),this.tasks=[],this.loadedAfterFirstResolve=!1,this.subscribeToCache(),this.subscribeToVault(),this.subscribeToEvents(),this.loadVault()}unload(){this.logger.info("Unloading Cache");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.logger.debug("Cache.notifySubscribers()"),this.events.triggerCacheUpdate({tasks:this.tasks,state:this.state})}subscribeToCache(){this.logger.debug("Cache.subscribeToCache()");let e=this.metadataCache.on("resolved",()=>q(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(){this.logger.debug("Cache.subscribeToVault()");let{useFilenameAsScheduledDate:e}=Q(),t=this.vault.on("create",s=>{s instanceof Oi.TFile&&(this.logger.debug(`Cache.subscribeToVault.createdEventReference() ${s.path}`),this.tasksMutex.runExclusive(()=>{this.indexFile(s)}))});this.vaultEventReferences.push(t);let n=this.vault.on("delete",s=>{s instanceof Oi.TFile&&(this.logger.debug(`Cache.subscribeToVault.deletedEventReference() ${s.path}`),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 Oi.TFile&&(this.logger.debug(`Cache.subscribeToVault.renamedEventReference() ${s.path}`),this.tasksMutex.runExclusive(()=>{let o=new ha(()=>Rt.fromPath(s.path));this.tasks=this.tasks.map(u=>u.path===a?e?Rt.updateTaskPath(u,s.path,o.value):new ye(bt(pe({},u),{taskLocation:u.taskLocation.fromRenamedFile(s.path)})):u),this.notifySubscribers()}))});this.vaultEventReferences.push(i)}subscribeToEvents(){this.logger.debug("Cache.subscribeToEvents()");let e=this.events.onRequestCacheUpdate(t=>{t({tasks:this.tasks,state:this.state})});this.eventsEventReferences.push(e)}loadVault(){return this.logger.debug("Cache.loadVault()"),this.tasksMutex.runExclusive(()=>q(this,null,function*(){this.state="Initializing",this.logger.debug("Cache.loadVault(): state = Initializing"),yield Promise.all(this.vault.getMarkdownFiles().map(e=>this.indexFile(e))),this.state="Warm",this.logger.debug("Cache.loadVault(): state = Warm"),this.notifySubscribers()}))}indexFile(e){return q(this,null,function*(){let t=this.metadataCache.getFileCache(e);if(t==null)return;e.path.endsWith(".md")||this.logger.warn("indexFile: WARNING: indexing non-markdown file: "+e.path),this.logger.debug("Cache.indexFile: "+e.path);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)}ye.tasksListsIdentical(n,s)||(this.tasks=this.tasks.filter(a=>a.path!==e.path),this.tasks.push(...s),this.logger.debug("Cache.indexFile: "+e.path+`: read ${s.length} task(s)`),this.notifySubscribers())})}getTasksFromFileContent(e,t,n,i){let s=[],a=e.split(`
`),o=a.length,u=new ha(()=>Rt.fromPath(i.path)),l=null,c=0;for(let p of t)if(p.task!==void 0){let h=p.position.start.line;if(h>=o)return this.logger.debug(`${i.path} Obsidian gave us a line number ${h} past the end of the file. ${o}.`),s;if((l===null||l.position.end.line<h)&&(l=qn.getSection(h,n.sections),c=0),l===null)continue;let _=a[h];if(_===void 0){this.logger.debug(`${i.path}: line ${h} - ignoring 'undefined' line.`);continue}let y;try{y=ye.fromLine({line:_,taskLocation:new ot(i.path,h,l.position.start.line,c,qn.getPrecedingHeader(h,n.headings)),fallbackDate:u.value})}catch(w){this.reportTaskParsingErrorToUser(w,i,p,_);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.
`;this.logger.error(s),e instanceof Error&&this.logger.error(e.stack?e.stack:"Cannot determine stack"),this.state==="Initializing"&&new Oi.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 ap=require("obsidian");var WT=require("obsidian");function Kr(){}function Zf(r){return r()}function ET(){return Object.create(null)}function Yn(r){r.forEach(Zf)}function jo(r){return typeof r=="function"}function kT(r,e){return r!=r?e==e:r!==e||r&&typeof r=="object"||typeof r=="function"}function ST(r){return Object.keys(r).length===0}var OT=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global,ga=class{constructor(e){this.options=e,this._listeners="WeakMap"in OT?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)ga.entries.set(i.target,i),(n=this._listeners.get(i.target))===null||n===void 0||n(i)})}};ga.entries="WeakMap"in OT?new WeakMap:void 0;var DT=!1;function oC(){DT=!0}function uC(){DT=!1}function R(r,e){r.appendChild(e)}function Mi(r,e,t){r.insertBefore(e,t||null)}function jn(r){r.parentNode&&r.parentNode.removeChild(r)}function Jf(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 lC(r){return document.createElementNS("http://www.w3.org/2000/svg",r)}function dt(r){return document.createTextNode(r)}function de(){return dt(" ")}function Et(r,e,t,n){return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}function RT(r){return function(e){return e.preventDefault(),r.call(this,e)}}function L(r,e,t){t==null?r.removeAttribute(e):r.getAttribute(e)!==t&&r.setAttribute(e,t)}function xT(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 cC(r){return Array.from(r.childNodes)}function ep(r,e){e=""+e,r.data!==e&&(r.data=e)}function lr(r,e){r.value=e==null?"":e}function tp(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 MT(r){let e=r.querySelector(":checked");return e&&e.__value}function cr(r,e,t){r.classList[t?"add":"remove"](e)}var $n=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=lC(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(jn)}};var ya;function ma(r){ya=r}function dC(){if(!ya)throw new Error("Function called outside component initialization");return ya}function rp(r){dC().$$.on_mount.push(r)}var Ri=[];var Go=[],xi=[],wT=[],fC=Promise.resolve(),Xf=!1;function pC(){Xf||(Xf=!0,fC.then(CT))}function ba(r){xi.push(r)}var Qf=new Set,Di=0;function CT(){if(Di!==0)return;let r=ya;do{try{for(;Di<Ri.length;){let e=Ri[Di];Di++,ma(e),hC(e.$$)}}catch(e){throw Ri.length=0,Di=0,e}for(ma(null),Ri.length=0,Di=0;Go.length;)Go.pop()();for(let e=0;e<xi.length;e+=1){let t=xi[e];Qf.has(t)||(Qf.add(t),t())}xi.length=0}while(Ri.length);for(;wT.length;)wT.pop()();Xf=!1,Qf.clear(),ma(r)}function hC(r){if(r.fragment!==null){r.update(),Yn(r.before_update);let e=r.dirty;r.dirty=[-1],r.fragment&&r.fragment.p(r.ctx,e),r.after_update.forEach(ba)}}function mC(r){let e=[],t=[];xi.forEach(n=>r.indexOf(n)===-1?e.push(n):t.push(n)),t.forEach(n=>n()),xi=e}var gC=new Set;function yC(r,e){r&&r.i&&(gC.delete(r),r.i(e))}var bC=["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"],RU=new Set([...bC]);function TC(r,e,t,n){let{fragment:i,after_update:s}=r.$$;i&&i.m(e,t),n||ba(()=>{let a=r.$$.on_mount.map(Zf).filter(jo);r.$$.on_destroy?r.$$.on_destroy.push(...a):Yn(a),r.$$.on_mount=[]}),s.forEach(ba)}function AT(r,e){let t=r.$$;t.fragment!==null&&(mC(t.after_update),Yn(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function _C(r,e){r.$$.dirty[0]===-1&&(Ri.push(r),pC(),r.$$.dirty.fill(0)),r.$$.dirty[e/31|0]|=1<<e%31}function PT(r,e,t,n,i,s,a,o=[-1]){let u=ya;ma(r);let l=r.$$={fragment:null,ctx:[],props:s,update:Kr,not_equal:i,bound:ET(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(u?u.$$.context:[])),callbacks:ET(),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||{},(p,h,..._)=>{let y=_.length?_[0]:h;return l.ctx&&i(l.ctx[p],l.ctx[p]=y)&&(!l.skip_bound&&l.bound[p]&&l.bound[p](y),c&&_C(r,p)),h}):[],l.update(),c=!0,Yn(l.before_update),l.fragment=n?n(l.ctx):!1,e.target){if(e.hydrate){oC();let p=cC(e.target);l.fragment&&l.fragment.l(p),p.forEach(jn)}else l.fragment&&l.fragment.c();e.intro&&yC(r.$$.fragment),TC(r,e.target,e.anchor,e.customElement),uC(),CT()}ma(u)}var vC;typeof HTMLElement=="function"&&(vC=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){let{on_mount:r}=this.$$;this.$$.on_disconnect=r.map(Zf).filter(jo);for(let e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(r,e,t){this[r]=t}disconnectedCallback(){Yn(this.$$.on_disconnect)}$destroy(){AT(this,1),this.$destroy=Kr}$on(r,e){if(!jo(e))return Kr;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&&!ST(r)&&(this.$$.skip_bound=!0,this.$$set(r),this.$$.skip_bound=!1)}});var Bo=class{$destroy(){AT(this,1),this.$destroy=Kr}$on(e,t){if(!jo(t))return Kr;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&&!ST(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}};var ip=rs(Ge());function NT(r,e,t){let n=r.slice();return n[45]=e[t],n}function IT(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 EC(r){let e,t=r[50]+"",n;return{c(){e=K("span"),n=dt(t)},m(i,s){Mi(i,e,s),R(e,n)},p:Kr,d(i){i&&jn(e)}}}function FT(r){let e,t,n,i,s,a,o,u,l=r[49].substring(0,r[52])+"",c,p,h=r[49].substring(r[52],r[52]+1)+"",_,y,w=r[49].substring(r[52]+1)+"",x,P,N=r[50]&&r[50].charCodeAt(0)>=256,F,Z,V,he,j,G=N&&EC(r);return V=xT(r[33][0]),{c(){e=K("span"),t=K("input"),a=de(),o=K("label"),u=K("span"),c=dt(l),p=K("span"),_=dt(h),y=K("span"),x=dt(w),P=de(),G&&G.c(),Z=de(),L(t,"type","radio"),L(t,"id",n="priority-"+r[48]),t.__value=i=r[48],t.value=t.__value,L(t,"accesskey",s=r[15](r[51])),L(p,"class","accesskey"),L(o,"for",F="priority-"+r[48]),V.p(t)},m(Ae,Fe){Mi(Ae,e,Fe),R(e,t),t.checked=t.__value===r[1].priority,R(e,a),R(e,o),R(o,u),R(u,c),R(o,p),R(p,_),R(o,y),R(y,x),R(o,P),G&&G.m(o,null),R(e,Z),he||(j=Et(t,"change",r[32]),he=!0)},p(Ae,Fe){Fe[0]&32768&&s!==(s=Ae[15](Ae[51]))&&L(t,"accesskey",s),Fe[0]&3&&(t.checked=t.__value===Ae[1].priority),N&&G.p(Ae,Fe)},d(Ae){Ae&&jn(e),G&&G.d(),V.r(),he=!1,j()}}}function LT(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),R(e,n),R(e,i),R(e,a),R(e,o)},p(l,c){c[0]&1&&t!==(t=l[45].name+"")&&ep(n,t),c[0]&1&&s!==(s=l[45].symbol+"")&&ep(a,s),c[0]&1&&u!==(u=l[45])&&(e.__value=u,e.value=e.__value)},d(l){l&&jn(e)}}}function wC(r){let e,t,n,i,s,a,o,u,l,c,p,h,_,y,w,x,P,N,F,Z,V,he,j,G,Ae,Fe,B,C,E,H,A,J,d,f,m,g,b,v,k,D,S,O,I,me,se,re,De,U,xe,Ce,tt,Rr,We,Le,Ap,Vi,Ra,Pp,pr,xa,Np,Jn,Ma,Ip,Yt,Ca,Fp,Zr,Qi,Aa,Lp,Jr,Pa,Up,Xi,Uu,Wp,Na,qp,Zi,Wu,$p,Ia,Yp,ei,vn,jp,Fa,Gp,Ji,qu,Bp,ti=r[20],gt=[];for(let Y=0;Y<ti.length;Y+=1)gt[Y]=FT(IT(r,ti,Y));let ri=r[0],yt=[];for(let Y=0;Y<ri.length;Y+=1)yt[Y]=LT(NT(r,ri,Y));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"),p=dt("Priority"),_=de();for(let Y=0;Y<gt.length;Y+=1)gt[Y].c();y=de(),w=K("div"),x=K("label"),x.textContent="Recurs",P=de(),N=K("input"),Z=de(),V=K("code"),he=dt(r[16]),j=de(),G=new $n(!1),Ae=de(),Fe=K("label"),Fe.textContent="Due",B=de(),C=K("input"),H=de(),A=K("code"),J=dt(r[19]),d=de(),f=new $n(!1),m=de(),g=K("label"),g.textContent="Scheduled",b=de(),v=K("input"),D=de(),S=K("code"),O=dt(r[18]),I=de(),me=new $n(!1),se=de(),re=K("label"),re.innerHTML='St<span class="accesskey">a</span>rt',De=de(),U=K("input"),Ce=de(),tt=K("code"),Rr=dt(r[17]),We=de(),Le=new $n(!1),Ap=de(),Vi=K("div"),Ra=K("label"),Ra.innerHTML=`Only
<span class="accesskey-first">future</span> dates:`,Pp=de(),pr=K("input"),Np=de(),Jn=K("div"),Ma=K("label"),Ma.innerHTML='Stat<span class="accesskey">u</span>s',Ip=de(),Yt=K("select");for(let Y=0;Y<yt.length;Y+=1)yt[Y].c();Fp=de(),Zr=K("div"),Qi=K("div"),Aa=K("label"),Aa.textContent="Completed:",Lp=de(),Jr=K("input"),Up=de(),Xi=K("div"),Uu=K("span"),Uu.textContent="Created on:",Wp=de(),Na=K("code"),qp=de(),Zi=K("div"),Wu=K("span"),Wu.textContent="Done on:",$p=de(),Ia=K("code"),Yp=de(),ei=K("div"),vn=K("button"),jp=dt("Apply"),Gp=de(),Ji=K("button"),Ji.textContent="Cancel",L(i,"for","description"),L(a,"id","description"),L(a,"class","tasks-modal-description"),L(a,"placeholder","Take out the trash"),L(a,"accesskey",o=r[15]("t")),L(n,"class","tasks-modal-section"),L(c,"for",h="priority-"+r[1].priority),L(l,"class","tasks-modal-section tasks-modal-priorities"),L(x,"for","recurrence"),L(x,"class","accesskey-first"),L(N,"id","recurrence"),L(N,"type","text"),L(N,"placeholder","Try 'every 2 weeks on Thursday'."),L(N,"accesskey",F=r[15]("r")),cr(N,"tasks-modal-error",!r[8]),G.a=null,L(Fe,"for","due"),L(Fe,"class","accesskey-first"),L(C,"id","due"),L(C,"type","text"),L(C,"placeholder",np),L(C,"accesskey",E=r[15]("d")),cr(C,"tasks-modal-error",!r[7]),f.a=null,L(g,"for","scheduled"),L(g,"class","accesskey-first"),L(v,"id","scheduled"),L(v,"type","text"),L(v,"placeholder",np),L(v,"accesskey",k=r[15]("s")),cr(v,"tasks-modal-error",!r[5]),me.a=null,L(re,"for","start"),L(U,"id","start"),L(U,"type","text"),L(U,"placeholder",np),L(U,"accesskey",xe=r[15]("a")),cr(U,"tasks-modal-error",!r[3]),Le.a=null,L(Ra,"for","forwardOnly"),L(pr,"id","forwardOnly"),L(pr,"type","checkbox"),L(pr,"class","task-list-item-checkbox tasks-modal-checkbox"),L(pr,"accesskey",xa=r[15]("f")),L(w,"class","tasks-modal-section tasks-modal-dates"),L(Ma,"for","status"),L(Yt,"id","status-type"),L(Yt,"class","dropdown"),L(Yt,"accesskey",Ca=r[15]("u")),r[1].status===void 0&&ba(()=>r[39].call(Yt)),L(Jn,"class","tasks-modal-section"),L(Aa,"for","status"),L(Jr,"id","status"),L(Jr,"type","checkbox"),L(Jr,"class","task-list-item-checkbox tasks-modal-checkbox"),Jr.checked=Pa=r[1].status.isCompleted(),Jr.disabled=!0,L(Zr,"class","tasks-modal-section tasks-modal-status"),vn.disabled=Fa=!r[14],L(vn,"type","submit"),L(vn,"class","mod-cta"),L(Ji,"type","button"),L(ei,"class","tasks-modal-section tasks-modal-buttons"),cr(t,"with-accesskeys",r[9]),L(e,"class","tasks-modal")},m(Y,fe){Mi(Y,e,fe),R(e,t),R(t,n),R(n,i),R(n,s),R(n,a),lr(a,r[1].description),r[31](a),R(t,u),R(t,l),R(l,c),R(c,p),R(l,_);for(let le=0;le<gt.length;le+=1)gt[le]&&gt[le].m(l,null);R(t,y),R(t,w),R(w,x),R(w,P),R(w,N),lr(N,r[1].recurrenceRule),R(w,Z),R(w,V),R(V,he),R(V,j),G.m(r[12],V),R(w,Ae),R(w,Fe),R(w,B),R(w,C),lr(C,r[1].dueDate),R(w,H),R(w,A),R(A,J),R(A,d),f.m(r[6],A),R(w,m),R(w,g),R(w,b),R(w,v),lr(v,r[1].scheduledDate),R(w,D),R(w,S),R(S,O),R(S,I),me.m(r[4],S),R(w,se),R(w,re),R(w,De),R(w,U),lr(U,r[1].startDate),R(w,Ce),R(w,tt),R(tt,Rr),R(tt,We),Le.m(r[2],tt),R(w,Ap),R(w,Vi),R(Vi,Ra),R(Vi,Pp),R(Vi,pr),pr.checked=r[1].forwardOnly,R(t,Np),R(t,Jn),R(Jn,Ma),R(Jn,Ip),R(Jn,Yt);for(let le=0;le<yt.length;le+=1)yt[le]&&yt[le].m(Yt,null);tp(Yt,r[1].status,!0),R(t,Fp),R(t,Zr),R(Zr,Qi),R(Qi,Aa),R(Qi,Lp),R(Qi,Jr),R(Zr,Up),R(Zr,Xi),R(Xi,Uu),R(Xi,Wp),R(Xi,Na),Na.innerHTML=r[11],R(Zr,qp),R(Zr,Zi),R(Zi,Wu),R(Zi,$p),R(Zi,Ia),Ia.innerHTML=r[13],R(t,Yp),R(t,ei),R(ei,vn),R(vn,jp),R(ei,Gp),R(ei,Ji),qu||(Bp=[Et(a,"input",r[30]),Et(a,"keydown",r[23]),Et(a,"paste",r[24]),Et(a,"drop",r[24]),Et(l,"keyup",r[21]),Et(N,"input",r[34]),Et(C,"input",r[35]),Et(v,"input",r[36]),Et(U,"input",r[37]),Et(pr,"change",r[38]),Et(Yt,"change",r[39]),Et(Ji,"click",r[22]),Et(t,"submit",RT(r[25]))],qu=!0)},p(Y,fe){if(fe[0]&32768&&o!==(o=Y[15]("t"))&&L(a,"accesskey",o),fe[0]&3&&lr(a,Y[1].description),fe[0]&3&&h!==(h="priority-"+Y[1].priority)&&L(c,"for",h),fe[0]&1081346){ti=Y[20];let le;for(le=0;le<ti.length;le+=1){let es=IT(Y,ti,le);gt[le]?gt[le].p(es,fe):(gt[le]=FT(es),gt[le].c(),gt[le].m(l,null))}for(;le<gt.length;le+=1)gt[le].d(1);gt.length=ti.length}if(fe[0]&32768&&F!==(F=Y[15]("r"))&&L(N,"accesskey",F),fe[0]&3&&N.value!==Y[1].recurrenceRule&&lr(N,Y[1].recurrenceRule),fe[0]&256&&cr(N,"tasks-modal-error",!Y[8]),fe[0]&4096&&G.p(Y[12]),fe[0]&32768&&E!==(E=Y[15]("d"))&&L(C,"accesskey",E),fe[0]&3&&C.value!==Y[1].dueDate&&lr(C,Y[1].dueDate),fe[0]&128&&cr(C,"tasks-modal-error",!Y[7]),fe[0]&64&&f.p(Y[6]),fe[0]&32768&&k!==(k=Y[15]("s"))&&L(v,"accesskey",k),fe[0]&3&&v.value!==Y[1].scheduledDate&&lr(v,Y[1].scheduledDate),fe[0]&32&&cr(v,"tasks-modal-error",!Y[5]),fe[0]&16&&me.p(Y[4]),fe[0]&32768&&xe!==(xe=Y[15]("a"))&&L(U,"accesskey",xe),fe[0]&3&&U.value!==Y[1].startDate&&lr(U,Y[1].startDate),fe[0]&8&&cr(U,"tasks-modal-error",!Y[3]),fe[0]&4&&Le.p(Y[2]),fe[0]&32768&&xa!==(xa=Y[15]("f"))&&L(pr,"accesskey",xa),fe[0]&3&&(pr.checked=Y[1].forwardOnly),fe[0]&1){ri=Y[0];let le;for(le=0;le<ri.length;le+=1){let es=NT(Y,ri,le);yt[le]?yt[le].p(es,fe):(yt[le]=LT(es),yt[le].c(),yt[le].m(Yt,null))}for(;le<yt.length;le+=1)yt[le].d(1);yt.length=ri.length}fe[0]&32768&&Ca!==(Ca=Y[15]("u"))&&L(Yt,"accesskey",Ca),fe[0]&3&&tp(Yt,Y[1].status),fe[0]&3&&Pa!==(Pa=Y[1].status.isCompleted())&&(Jr.checked=Pa),fe[0]&2048&&(Na.innerHTML=Y[11]),fe[0]&8192&&(Ia.innerHTML=Y[13]),fe[0]&16384&&Fa!==(Fa=!Y[14])&&(vn.disabled=Fa),fe[0]&512&&cr(t,"with-accesskeys",Y[9])},i:Kr,o:Kr,d(Y){Y&&jn(e),r[31](null),Jf(gt,Y),Jf(yt,Y),qu=!1,Yn(Bp)}}}var np="Try 'Monday' or 'tomorrow', or [td|tm|yd|tw|nw|we] then space.";function kC(r,e,t){let n;var i;let{task:s}=e,{onSubmit:a}=e,{statusOptions:o}=e,{prioritySymbols:u,recurrenceSymbol:l,startDateSymbol:c,scheduledDateSymbol:p,dueDateSymbol:h}=Gr.tasksPluginEmoji.taskSerializer.symbols,_,y={description:"",status:X.TODO,priority:"none",recurrenceRule:"",createdDate:"",startDate:"",scheduledDate:"",dueDate:"",doneDate:"",forwardOnly:!0},w=!0,x="",P="",N=!0,F="",Z=!0,V="",he=!0,j="",G=!0,Ae="",Fe=!1,B=!0,C=!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 H(U,xe,Ce=void 0){if(!xe)return`<i>no ${U} date</i>`;let tt=ip.parseDate(xe,Ce,{forwardDate:Ce!=null});return tt!==null?window.moment(tt).format("YYYY-MM-DD"):`<i>invalid ${U} date</i>`}function A(U,xe){return H(U,xe,y.forwardOnly?new Date:void 0)}function J(U){let xe=null,Ce=ip.parseDate(U,new Date,{forwardDate:y.forwardOnly});return Ce!==null&&(xe=window.moment(Ce)),xe}rp(()=>{let{provideAccessKeys:U}=Q();t(9,B=U);let xe=ge.getInstance().removeAsWordFrom(s.description);(xe!=s.description||!ge.getInstance().includedIn(s.description))&&(Fe=!0);let Ce="none";s.priority==="5"?Ce="lowest":s.priority==="4"?Ce="low":s.priority==="2"?Ce="medium":s.priority==="1"?Ce="high":s.priority==="0"&&(Ce="highest"),t(1,y={description:xe,status:s.status,priority:Ce,recurrenceRule:s.recurrence?s.recurrence.toText():"",createdDate:new vt(s.createdDate).formatAsDate(),startDate:new vt(s.startDate).formatAsDate(),scheduledDate:new vt(s.scheduledDate).formatAsDate(),dueDate:new vt(s.dueDate).formatAsDate(),doneDate:new vt(s.doneDate).formatAsDate(),forwardOnly:!0}),setTimeout(()=>{_.focus()},10)});let d=U=>{if(U.key&&!U.altKey&&!U.ctrlKey){let xe=E.find(Ce=>Ce.label.charAt(0).toLowerCase()==U.key);xe&&t(1,y.priority=xe.value,y)}},f=()=>{a([])},m=U=>{U.key==="Enter"&&(U.preventDefault(),C&&b())},g=()=>{setTimeout(()=>{t(1,y.description=y.description.replace(/[\r\n]+/g," "),y)},0)},b=()=>{let U=y.description.trim();Fe&&(U=ge.getInstance().prependTo(U));let xe=J(y.startDate),Ce=J(y.scheduledDate),tt=J(y.dueDate),Rr=null;y.recurrenceRule&&(Rr=Ze.fromText({recurrenceRuleText:y.recurrenceRule,startDate:xe,scheduledDate:Ce,dueDate:tt}));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 ye(Object.assign(Object.assign({},s),{description:U,status:y.status,priority:We,recurrence:Rr,startDate:xe,scheduledDate:Ce,dueDate:tt,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,V),t(2,P),t(4,F),t(0,o)}function D(U){Go[U?"unshift":"push"](()=>{_=U,t(10,_)})}function S(){y.priority=this.__value,t(1,y),t(6,V),t(2,P),t(4,F),t(0,o)}function O(){y.recurrenceRule=this.value,t(1,y),t(6,V),t(2,P),t(4,F),t(0,o)}function I(){y.dueDate=this.value,t(1,y),t(6,V),t(2,P),t(4,F),t(0,o)}function me(){y.scheduledDate=this.value,t(1,y),t(6,V),t(2,P),t(4,F),t(0,o)}function se(){y.startDate=this.value,t(1,y),t(6,V),t(2,P),t(4,F),t(0,o)}function re(){y.forwardOnly=this.checked,t(1,y),t(6,V),t(2,P),t(4,F),t(0,o)}function De(){y.status=MT(this),t(1,y),t(6,V),t(2,P),t(4,F),t(0,o)}return r.$$set=U=>{"task"in U&&t(26,s=U.task),"onSubmit"in U&&t(27,a=U.onSubmit),"statusOptions"in U&&t(0,o=U.statusOptions)},r.$$.update=()=>{if(r.$$.dirty[0]&512){e:t(15,n=U=>B?U:null)}if(r.$$.dirty[0]&66){e:t(1,y.dueDate=Ti(y.dueDate),y),t(6,V=A("due",y.dueDate)),t(7,he=!V.includes("invalid"))}if(r.$$.dirty[0]&6){e:t(1,y.startDate=Ti(y.startDate),y),t(2,P=A("start",y.startDate)),t(3,N=!P.includes("invalid"))}if(r.$$.dirty[0]&18){e:t(1,y.scheduledDate=Ti(y.scheduledDate),y),t(4,F=A("scheduled",y.scheduledDate)),t(5,Z=!F.includes("invalid"))}if(r.$$.dirty[0]&268435458){e:if(t(8,G=!0),!y.recurrenceRule)t(12,j="<i>not recurring</>");else{let U=t(28,i=Ze.fromText({recurrenceRuleText:y.recurrenceRule,startDate:null,scheduledDate:null,dueDate:null}))===null||i===void 0?void 0:i.toText();U?!y.startDate&&!y.scheduledDate&&!y.dueDate?(t(12,j="<i>due, scheduled or start date required</i>"),t(8,G=!1)):t(12,j=U):(t(12,j="<i>invalid recurrence rule</i>"),t(8,G=!1))}}if(r.$$.dirty[0]&2){e:t(29,w=y.description.trim()!=="")}if(r.$$.dirty[0]&536871336){e:t(14,C=he&&G&&Z&&N&&w)}if(r.$$.dirty[0]&2){e:t(11,x=H("created",y.createdDate)),t(13,Ae=H("done",y.doneDate))}},[o,y,P,N,F,Z,V,he,G,B,_,x,j,Ae,C,n,l,c,p,h,E,d,f,m,g,b,s,a,i,w,k,D,S,v,O,I,me,se,re,De]}var sp=class extends Bo{constructor(e){super(),PT(this,e,kC,wC,kT,{task:26,onSubmit:27,statusOptions:0},null,[-1,-1])}},UT=sp;var pn=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 UT({target:t,props:{task:this.task,statusOptions:n,onSubmit:this.onSubmit}})}getKnownStatusesAndCurrentTaskStatusIfNotKnown(){let t=Oe.getInstance().registeredStatuses;return Oe.getInstance().bySymbol(this.task.status.symbol)===X.EMPTY&&t.push(this.task.status),t}onClose(){let{contentEl:t}=this;t.empty()}};function SC(){let{setCreatedDate:r}=Q();return r?window.moment():null}function OC(r){let{setCreatedDate:e}=Q();if(!e||r.createdDate!==null)return!1;let t=r.description==="",n=!ge.getInstance().isEmpty(),i=!ge.getInstance().includedIn(r.description);return t||n&&i}var Ho=({line:r,path:e})=>{var h,_;let t=ye.parseTaskSignifiers(r,ot.fromUnknownPosition(e),Rt.fromPath(e)),n=SC();if(t!==null)return OC(t)?new ye(bt(pe({},t),{createdDate:n})):t;let i=r.match(z.nonTaskRegex);if(i===null)return console.error("Tasks: Cannot create task on line:",r),new ye({status:X.TODO,description:"",taskLocation:ot.fromUnknownPosition(e),indentation:"",listMarker:"-",priority:"3",createdDate:n,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,recurrence:null,blockLink:"",tags:[],originalMarkdown:"",scheduledDateIsInferred:!1});let s=i[1],a=(h=i[2])!=null?h:"-",o=(_=i[4])!=null?_:" ",u=Oe.getInstance().bySymbolOrCreate(o),l=i[5],c=r.match(z.blockLinkRegex),p=c!==null?c[0]:"";return p!==""&&(l=l.replace(z.blockLinkRegex,"")),new ye({status:u,description:l,taskLocation:ot.fromUnknownPosition(e),indentation:s,listMarker:a,blockLink:p,priority:"3",createdDate:n,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,recurrence:null,tags:[],originalMarkdown:"",scheduledDateIsInferred:!1})};var qT=(r,e,t,n)=>{var p;if(r)return t instanceof ap.MarkdownView;if(!(t instanceof ap.MarkdownView))return;let i=(p=t.file)==null?void 0:p.path;if(i===void 0)return;let a=e.getCursor().line,o=e.getLine(a),u=Ho({line:o,path:i}),l=h=>{let _=Rt.removeInferredStatusIfNeeded(u,h).map(y=>y.toFileLineString()).join(`
`);e.setLine(a,_)};new pn({app:n,task:u,onSubmit:l}).open()};var op=require("obsidian");var $T=(r,e,t)=>{var u;if(r)return t instanceof op.MarkdownView;if(!(t instanceof op.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=DC(a,n);e.setLine(s,o.text),e.setCursor(RC(i,o))},DC=(r,e)=>{let t=ye.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(z.taskRegex);if(n!==null){let i=n[3],a=Oe.getInstance().bySymbol(i).nextStatusSymbol;return{text:r.replace(z.taskRegex,`$1- [${a}] $4`)}}else if(z.listItemRegex.test(r)){let i=r.replace(z.listItemRegex,"$1$2 [ ]");return{text:i,moveTo:{ch:i.length}}}else{let i=r.replace(z.indentationRegex,"$1- ");return{text:i,moveTo:{ch:i.length}}}}},RC=(r,e)=>{var s;let t={line:0,ch:r.ch},n=pe(pe({},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 zo=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)=>qT(t,n,i,this.app)}),e.addCommand({id:"toggle-done",name:"Toggle task done",icon:"check-in-circle",editorCheckCallback:$T})}};var xC=Object.prototype.toString,Ai=Array.isArray||function(e){return xC.call(e)==="[object Array]"};function lp(r){return typeof r=="function"}function MC(r){return Ai(r)?"array":typeof r}function up(r){return r.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function YT(r,e){return r!=null&&typeof r=="object"&&e in r}function CC(r,e){return r!=null&&typeof r!="object"&&r.hasOwnProperty&&r.hasOwnProperty(e)}var AC=RegExp.prototype.test;function PC(r,e){return AC.call(r,e)}var NC=/\S/;function IC(r){return!PC(NC,r)}var FC={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};function LC(r){return String(r).replace(/[&<>"'`=\/]/g,function(t){return FC[t]})}var UC=/\s*/,WC=/\s+/,jT=/\s*=/,qC=/\s*\}/,$C=/#|\^|\/|>|\{|&|=|!/;function YC(r,e){if(!r)return[];var t=!1,n=[],i=[],s=[],a=!1,o=!1,u="",l=0;function c(){if(a&&!o)for(;s.length;)delete i[s.pop()];else s=[];a=!1,o=!1}var p,h,_;function y(G){if(typeof G=="string"&&(G=G.split(WC,2)),!Ai(G)||G.length!==2)throw new Error("Invalid tags: "+G);p=new RegExp(up(G[0])+"\\s*"),h=new RegExp("\\s*"+up(G[1])),_=new RegExp("\\s*"+up("}"+G[1]))}y(e||Zt.tags);for(var w=new _a(r),x,P,N,F,Z,V;!w.eos();){if(x=w.pos,N=w.scanUntil(p),N)for(var he=0,j=N.length;he<j;++he)F=N.charAt(he),IC(F)?(s.push(i.length),u+=F):(o=!0,t=!0,u+=" "),i.push(["text",F,x,x+1]),x+=1,F===`
`&&(c(),u="",l=0,t=!1);if(!w.scan(p))break;if(a=!0,P=w.scan($C)||"name",w.scan(UC),P==="="?(N=w.scanUntil(jT),w.scan(jT),w.scanUntil(h)):P==="{"?(N=w.scanUntil(_),w.scan(qC),w.scanUntil(h),P="&"):N=w.scanUntil(h),!w.scan(h))throw new Error("Unclosed tag at "+w.pos);if(P==">"?Z=[P,N,x,w.pos,u,l,t]:Z=[P,N,x,w.pos],l++,i.push(Z),P==="#"||P==="^")n.push(Z);else if(P==="/"){if(V=n.pop(),!V)throw new Error('Unopened section "'+N+'" at '+x);if(V[1]!==N)throw new Error('Unclosed section "'+V[1]+'" at '+x)}else P==="name"||P==="{"||P==="&"?o=!0:P==="="&&y(N)}if(c(),V=n.pop(),V)throw new Error('Unclosed section "'+V[1]+'" at '+w.pos);return GC(jC(i))}function jC(r){for(var e=[],t,n,i=0,s=r.length;i<s;++i)t=r[i],t&&(t[0]==="text"&&n&&n[0]==="text"?(n[1]+=t[1],n[3]=t[3]):(e.push(t),n=t));return e}function GC(r){for(var e=[],t=e,n=[],i,s,a=0,o=r.length;a<o;++a)switch(i=r[a],i[0]){case"#":case"^":t.push(i),n.push(i),t=i[4]=[];break;case"/":s=n.pop(),s[5]=i[2],t=n.length>0?n[n.length-1][4]:e;break;default:t.push(i)}return e}function _a(r){this.string=r,this.tail=r,this.pos=0}_a.prototype.eos=function(){return this.tail===""};_a.prototype.scan=function(e){var t=this.tail.match(e);if(!t||t.index!==0)return"";var n=t[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n};_a.prototype.scanUntil=function(e){var t=this.tail.search(e),n;switch(t){case-1:n=this.tail,this.tail="";break;case 0:n="";break;default:n=this.tail.substring(0,t),this.tail=this.tail.substring(t)}return this.pos+=n.length,n};function Ci(r,e){this.view=r,this.cache={".":this.view},this.parent=e}Ci.prototype.push=function(e){return new Ci(e,this)};Ci.prototype.lookup=function(e){var t=this.cache,n;if(t.hasOwnProperty(e))n=t[e];else{for(var i=this,s,a,o,u=!1;i;){if(e.indexOf(".")>0)for(s=i.view,a=e.split("."),o=0;s!=null&&o<a.length;)o===a.length-1&&(u=YT(s,a[o])||CC(s,a[o])),s=s[a[o++]];else s=i.view[e],u=YT(i.view,e);if(u){n=s;break}i=i.parent}t[e]=n}return lp(n)&&(n=n.call(this.view)),n};function wt(){this.templateCache={_cache:{},set:function(e,t){this._cache[e]=t},get:function(e){return this._cache[e]},clear:function(){this._cache={}}}}wt.prototype.clearCache=function(){typeof this.templateCache!="undefined"&&this.templateCache.clear()};wt.prototype.parse=function(e,t){var n=this.templateCache,i=e+":"+(t||Zt.tags).join(":"),s=typeof n!="undefined",a=s?n.get(i):void 0;return a==null&&(a=YC(e,t),s&&n.set(i,a)),a};wt.prototype.render=function(e,t,n,i){var s=this.getConfigTags(i),a=this.parse(e,s),o=t instanceof Ci?t:new Ci(t,void 0);return this.renderTokens(a,o,n,e,i)};wt.prototype.renderTokens=function(e,t,n,i,s){for(var a="",o,u,l,c=0,p=e.length;c<p;++c)l=void 0,o=e[c],u=o[0],u==="#"?l=this.renderSection(o,t,n,i,s):u==="^"?l=this.renderInverted(o,t,n,i,s):u===">"?l=this.renderPartial(o,t,n,s):u==="&"?l=this.unescapedValue(o,t):u==="name"?l=this.escapedValue(o,t,s):u==="text"&&(l=this.rawValue(o)),l!==void 0&&(a+=l);return a};wt.prototype.renderSection=function(e,t,n,i,s){var a=this,o="",u=t.lookup(e[1]);function l(h){return a.render(h,t,n,s)}if(!!u){if(Ai(u))for(var c=0,p=u.length;c<p;++c)o+=this.renderTokens(e[4],t.push(u[c]),n,i,s);else if(typeof u=="object"||typeof u=="string"||typeof u=="number")o+=this.renderTokens(e[4],t.push(u),n,i,s);else if(lp(u)){if(typeof i!="string")throw new Error("Cannot use higher-order sections without the original template");u=u.call(t.view,i.slice(e[3],e[5]),l),u!=null&&(o+=u)}else o+=this.renderTokens(e[4],t,n,i,s);return o}};wt.prototype.renderInverted=function(e,t,n,i,s){var a=t.lookup(e[1]);if(!a||Ai(a)&&a.length===0)return this.renderTokens(e[4],t,n,i,s)};wt.prototype.indentPartial=function(e,t,n){for(var i=t.replace(/[^ \t]/g,""),s=e.split(`
`),a=0;a<s.length;a++)s[a].length&&(a>0||!n)&&(s[a]=i+s[a]);return s.join(`
`)};wt.prototype.renderPartial=function(e,t,n,i){if(!!n){var s=this.getConfigTags(i),a=lp(n)?n(e[1]):n[e[1]];if(a!=null){var o=e[6],u=e[5],l=e[4],c=a;u==0&&l&&(c=this.indentPartial(a,l,o));var p=this.parse(c,s);return this.renderTokens(p,t,n,c,i)}}};wt.prototype.unescapedValue=function(e,t){var n=t.lookup(e[1]);if(n!=null)return n};wt.prototype.escapedValue=function(e,t,n){var i=this.getConfigEscape(n)||Zt.escape,s=t.lookup(e[1]);if(s!=null)return typeof s=="number"&&i===Zt.escape?String(s):i(s)};wt.prototype.rawValue=function(e){return e[1]};wt.prototype.getConfigTags=function(e){return Ai(e)?e:e&&typeof e=="object"?e.tags:void 0};wt.prototype.getConfigEscape=function(e){if(e&&typeof e=="object"&&!Ai(e))return e.escape};var Zt={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(r){Ta.templateCache=r},get templateCache(){return Ta.templateCache}},Ta=new wt;Zt.clearCache=function(){return Ta.clearCache()};Zt.parse=function(e,t){return Ta.parse(e,t)};Zt.render=function(e,t,n,i){if(typeof e!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+MC(e)+'" was given as the first argument for mustache#render(template, view, partials)');return Ta.render(e,t,n,i)};Zt.escape=LC;Zt.Scanner=_a;Zt.Context=Ci;Zt.Writer=wt;var cp=Zt;var KT=rs(zT());function VT(r,e){cp.escape=function(t){return t};try{return cp.render(r,(0,KT.default)(e))}catch(t){let n="";throw t instanceof Error?n=`There was an error expanding one or more placeholders.
The error message was:
${t.message.replace(/ > /g,".").replace("Missing Mustache data property","Unknown property")}`:n="Unknown error expanding placeholders.",n+=`
The problem is in:
${r}`,Error(n)}}function Ko(r){return{query:{file:new Si(r)}}}function Gn(r,e){let t=`Error: ${r}.
The error message was:
`,n="";return e instanceof Error?n+=e:n+="Unknown error",`${t}"${n}"`}var Vr=class{constructor(e,t,n){this.property=e,this.comparator=Vr.maybeReverse(n,t)}static maybeReverse(e,t){return e?Vr.makeReversedComparator(t):t}static makeReversedComparator(e){return(t,n)=>e(t,n)*-1}};var hn=class{constructor(e,t,n){this.property=e,this.grouper=t,this.reverse=n}};var we=class{canCreateFilterForLine(e){return we.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 Wo(this.fieldNameSingular())}supportsSorting(){return!1}createSorterFromLine(e){if(!this.supportsSorting())return null;let t=we.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 Vr(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=we.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 hn(this.fieldNameSingular(),this.grouper(),e)}createNormalGrouper(){return this.createGrouper(!1)}createReverseGrouper(){return this.createGrouper(!0)}};var ke=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 ke("None of",e,"NOT")}static booleanXor(e){return new ke("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 ke(e,t,n)}};var ft=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(" ")}
`}};var vr=class{constructor(e){this.instruction=e}get queryComponent(){return this._queryComponent}set queryComponent(e){this._queryComponent=e}get error(){return this._error}set error(e){this._error=e}static fromObject(e,t){let n=new vr(e);return n._queryComponent=t,n}static fromError(e,t){let n=new vr(e);return n._error=t,n}};var ee=class{constructor(e){this.object=e}get instruction(){return this.object.instruction}get filter(){return this.object.queryComponent}get error(){return this.object.error}get filterFunction(){if(this.filter)return this.filter.filterFunction}static fromFilter(e){return new ee(vr.fromObject(e.instruction,e))}static fromError(e,t){return new ee(vr.fromError(e,t))}};var Vo=class{constructor(e,t){this._instruction=e,this._filter=t}canCreateFilterForLine(e){return e==this._instruction}createFilterOrErrorMessage(e){return e===this._instruction?ee.fromFilter(new ft(e,this._filter,new ke(e))):ee.fromError(e,`do not understand filter: ${e}`)}};var Er=class{constructor(){this._filters=[]}add(e,t){this._filters.push(new Vo(e,t))}canCreateFilterForLine(e){for(let t of this._filters)if(t.canCreateFilterForLine(e))return!0;return!1}createFilterOrErrorMessage(e){for(let t of this._filters){let n=t.createFilterOrErrorMessage(e);if(n.error===void 0)return n}return ee.fromError(e,`do not understand filter: ${e}`)}};var mn=class extends we{constructor(){super(...arguments);this._filters=new Er}canCreateFilterForLine(t){return this._filters.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){return this._filters.createFilterOrErrorMessage(t)}filterRegExp(){return null}};var wr=class extends mn{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=wr.oldStatusName(e),i=wr.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=>[wr.oldStatusName(e)]}};var Qo=class{findUnexpandedDateText(e){let t=["<%","YYYY-MM-DD"];for(let n of t)if(e.includes(n))return this.unexpandedDateTextMessage(n);return null}unexpandedDateTextMessage(e){return`Instruction contains unexpanded template text: "${e}" - and cannot be interpreted.
Possible causes:
- The query is an a template file, and is not intended to be searched.
- A command such as "Replace templates in the active file" needs to be run.
- The core "Daily notes" plugin is in use, and the template contained
date calculations that it does not support.
- Some sample template text was accidentally pasted in to a tasks query,
instead of in to a template file.
See: https://publish.obsidian.md/tasks/Advanced/Instruction+contains+unexpanded+template+text
`}};var pt=class extends we{constructor(t=null){super();t!==null?this.filterInstructions=t:(this.filterInstructions=new Er,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.checkForUnexpandedTemplateText(t);if(n)return ee.fromError(t,n);let i=this.filterInstructions.createFilterOrErrorMessage(t);if(i.filter!==void 0)return i;let s=we.getMatch(this.filterRegExp(),t);if(s===null)return ee.fromError(t,"do not understand query filter ("+this.fieldName()+" date)");let a=s[1],o=s[2],u=s[3],l=Pt.parseDateRange(u);if(!l.isValid()){let h=Pt.parseDate(a);h.isValid()&&(l=new _t(h,h))}if(!l.isValid())return ee.fromError(t,"do not understand "+this.fieldName()+" date");let c=this.buildFilterFunction(o,l),p=pt.buildExplanation(this.fieldNameForExplanation(),o,this.filterResultIfFieldMissing(),l);return ee.fromFilter(new ft(t,c,p))}buildFilterFunction(t,n){let i;switch(t){case"before":i=s=>s?s.isBefore(n.start):this.filterResultIfFieldMissing();break;case"after":i=s=>s?s.isAfter(n.end):this.filterResultIfFieldMissing();break;case"on or before":case"in or before":i=s=>s?s.isSameOrBefore(n.end):this.filterResultIfFieldMissing();break;case"on or after":case"in or after":i=s=>s?s.isSameOrAfter(n.start):this.filterResultIfFieldMissing();break;default:i=s=>s?s.isSameOrAfter(n.start)&&s.isSameOrBefore(n.end):this.filterResultIfFieldMissing()}return this.getFilter(i)}getFilter(t){return n=>t(this.date(n))}filterRegExp(){return new RegExp(`^${this.fieldNameForFilterInstruction()} (((?:on|in) or before|before|(?:on|in) or after|after|on|in)? ?(.*))`)}fieldNameForFilterInstruction(){return this.fieldName()}static buildExplanation(t,n,i,s){let a=n,o="YYYY-MM-DD (dddd Do MMMM YYYY)",u;switch(n){case"before":case"on or after":u=s.start.format(o);break;case"after":case"on or before":u=s.end.format(o);break;case"in or before":a="on or before",u=s.end.format(o);break;case"in or after":a="on or after",u=s.start.format(o);break;default:if(!s.start.isSame(s.end)){let c=`${t} date is between:`,p=[new ke(`${s.start.format(o)} and`),new ke(`${s.end.format(o)} inclusive`)];return i&&p.push(new ke(`OR no ${t} date`)),new ke(c,p)}a="on",u=s.start.format(o);break}let l=`${t} date is ${a} ${u}`;return i&&(l+=` OR no ${t} date`),new ke(l)}fieldNameForExplanation(){return this.fieldName()}supportsSorting(){return!0}comparator(){return(t,n)=>Yr(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")]}}checkForUnexpandedTemplateText(t){return new Qo().findUnexpandedDateText(t)}};var Pi=class extends pt{fieldName(){return"due"}date(e){return e.dueDate}filterResultIfFieldMissing(){return!1}};var fp=class extends we{createFilterOrErrorMessage(e){let t=we.getMatch(this.filterRegExp(),e);if(t!==null){let n=t[5],i=null;switch(n){case"lowest":i="5";break;case"low":i="4";break;case"none":i="3";break;case"medium":i="2";break;case"high":i="1";break;case"highest":i="0";break}if(i===null)return ee.fromError(e,"do not understand priority");let s=e,a;switch(t[3]){case"above":a=o=>o.priority.localeCompare(i)<0;break;case"below":a=o=>o.priority.localeCompare(i)>0;break;case"not":a=o=>o.priority!==i;break;default:a=o=>o.priority===i,s=`${this.fieldName()} is ${n}`}return ee.fromFilter(new ft(e,a,new ke(s)))}else return ee.fromError(e,"do not understand query filter (priority)")}fieldName(){return"priority"}filterRegExp(){return fp.priorityRegexp}supportsSorting(){return!0}comparator(){return(e,t)=>e.priority.localeCompare(t.priority)}supportsGrouping(){return!0}grouper(){return e=>[e.priorityNameGroupText]}},Bn=fp;Bn.priorityRegexp=/^priority(\s+is)?(\s+(above|below|not))?(\s+(lowest|low|none|medium|high|highest))$/;var Ni=class{matchesAnyOf(e){return e.some(t=>this.matches(t))}};var Ii=class extends Ni{constructor(t){super();this.stringToFind=t}matches(t){return Ii.stringIncludesCaseInsensitive(t,this.stringToFind)}static stringIncludesCaseInsensitive(t,n){return t.toLocaleLowerCase().includes(n.toLocaleLowerCase())}explanation(t){return new ke(t)}};var gn=class extends Ni{constructor(t){super();this.regex=t}static validateAndConstruct(t){let n=/^\/(.+)\/([^/]*)$/,i=t.match(n);if(i!==null){let s=new RegExp(i[1],i[2]);return new gn(s)}else return null}matches(t){return t.match(this.regex)!==null}static helpMessage(){return String.raw`See https://publish.obsidian.md/tasks/Queries/Regular+Expressions
Regular expressions must look like this:
/pattern/
or this:
/pattern/flags
Where:
- pattern: The 'regular expression' pattern to search for.
- flags: Optional characters that modify the search.
i => make the search case-insensitive
u => add Unicode support
Examples: /^Log/
/^Log/i
/File Name\.md/
/waiting|waits|waited/i
/\d\d:\d\d/
The following characters have special meaning in the pattern:
to find them literally, you must add a \ before them:
[\^$.|?*+()
CAUTION! Regular expression (or 'regex') searching is a powerful
but advanced feature that requires thorough knowledge in order to
use successfully, and not miss intended search results.
`}explanation(t){let i=BC(t,"using regex: ",this.regexAsString());return new ke(i)}regexAsString(){let t=`'${this.regex.source}' with `;switch(this.regex.flags.length){case 0:t+="no flags";break;case 1:t+=`flag '${this.regex.flags}'`;break;default:t+=`flags '${this.regex.flags}'`;break}return t}};function BC(r,e,t){var o;let n=r.match(/\//);if(!n)return"Error explaining instruction. Could not find a slash character";let i=2,s=((o=n.index)!=null?o:i)-i;return`${e.padEnd(s)}${t}`}var Me=class extends we{createFilterOrErrorMessage(e){let t=we.getMatch(this.filterRegExp(),e);if(t===null)return ee.fromError(e,`do not understand query filter (${this.fieldName()})`);let[n,i,s]=t,a=null;if(i.includes("include"))a=new Ii(s);else if(i.includes("regex")){try{a=gn.validateAndConstruct(s)}catch(l){let c=Gn("Parsing regular expression",l)+`
${gn.helpMessage()}`;return ee.fromError(e,c)}if(a===null)return ee.fromError(e,`Invalid instruction: '${e}'
${gn.helpMessage()}`)}if(a===null)return ee.fromError(e,`do not understand query filter (${this.fieldName()})`);let o=i.match(/not/)!==null,u=new ft(e,this.getFilter(a,o),a.explanation(e));return ee.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 Fi=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 Li=class extends we{canCreateFilterForLine(e){return!1}createFilterOrErrorMessage(e){return ee.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 Ui=class{static by(e,t){let n=[new Li().comparator(),new wr().comparator(),new Pi().comparator(),new Bn().comparator(),new Fi().comparator()],i=[];for(let s of e)i.push(s.comparator);return t.sort(Ui.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 Zo=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 Jo=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 eu=class extends Jo{},tu=class{constructor(e,t,n){this.root=new eu(t),this.buildGroupingTree(e,n)}buildGroupingTree(e,t){let n=[this.root];for(let i of e){let s=[];for(let a of n)for(let o of a.values){let u=i.grouper(o,t);u.length===0&&u.push("");for(let l of u){let c=a.children.get(l);c===void 0&&(c=new eu([]),a.children.set(l,c),s.push(c)),c.values.push(o)}}n=s}}generateTaskTreeStorage(){return this.root.generateAllPaths()}};var ru=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 Wi=class{constructor(e,t,n){this._groups=new Array;this._totalTaskCount=0;this._totalTaskCount=t.length,this._groupers=e;let s=new tu(e,t,n).generateTaskTreeStorage();this.addTaskGroups(s),this.sortTaskGroups(),this.setGroupsHeadings(s)}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 ru(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 Zo(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 Hn=class extends Me{fieldName(){return"description"}value(e){return ge.getInstance().removeAsSubstringFrom(e.description)}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=Hn.cleanDescription(e.description),i=Hn.cleanDescription(t.description);return n.localeCompare(i,void 0,{numeric:!0})}}static cleanDescription(e){e=ge.getInstance().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 nu=class extends pt{fieldName(){return"created"}date(e){return e.createdDate}filterResultIfFieldMissing(){return!1}};var iu=class extends pt{fieldName(){return"done"}date(e){return e.doneDate}filterResultIfFieldMissing(){return!1}};var su=class extends mn{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"}};var va=class extends vr{};function pp(r,e){let t=r.map(([n])=>n);try{let n=e.includes("return")?e:`return ${e}`,i=e&&new Function(...t,n);return i instanceof Function?va.fromObject(e,i):va.fromError(e,"Error parsing group function")}catch(n){return va.fromError(e,Gn(`Failed parsing expression "${e}"`,n))}}function hp(r,e){let t=e.map(([n,i])=>i);return r(...t)}function mp(r,e,t){try{return hp(r,e)}catch(n){return Gn(`Failed calculating expression "${t}"`,n)}}function au(r,e){return[["task",r],["query",e?e.query:null]]}function QT(r,e,t){let n=au(r,t||null),i=pp(n,e);return i.error?i.error:mp(i.queryComponent,n,e)}var ou=class{constructor(e){this.line=e,this.functionOrError=pp(au(null,null),e)}isValid(){return this.functionOrError.error===void 0}get parseError(){return this.functionOrError.error}evaluate(e,t){if(!this.isValid())throw Error(`Error: Cannot evaluate an expression which is not valid: "${this.line}" gave error: "${this.parseError}"`);return hp(this.functionOrError.queryComponent,au(e,t||null))}evaluateOrCatch(e,t){return this.isValid()?mp(this.functionOrError.queryComponent,au(e,t),this.line):`Error: Cannot evaluate an expression which is not valid: "${this.line}" gave error: "${this.parseError}"`}};var uu=class extends we{createFilterOrErrorMessage(e){let t=we.getMatch(this.filterRegExp(),e);if(t===null)return ee.fromError(e,"Unable to parse line");let n=t[1],i=new ou(n);return i.isValid()?ee.fromFilter(new ft(e,HC(i),new ke(e))):ee.fromError(e,i.parseError)}fieldName(){return"function"}filterRegExp(){return new RegExp(`^filter by ${this.fieldNameSingularEscaped()} (.*)`)}supportsGrouping(){return!0}createGrouperFromLine(e){let t=we.getMatch(this.grouperRegExp(),e);if(t===null)return null;let n=!!t[1],i=t[2];return new hn("function",KC(i),n)}grouperRegExp(){return new RegExp(`^group by ${this.fieldNameSingularEscaped()}( reverse)? (.*)`)}grouper(){throw Error("grouper() function not valid for FunctionField. Use createGrouperFromLine() instead.")}};function HC(r){return(e,t)=>{let n=t.queryContext();return zC(r,e,n)}}function zC(r,e,t){let n=r.evaluate(e,t);if(typeof n=="boolean")return n;throw Error(`filtering function must return true or false. This returned "${n}".`)}function KC(r){return(e,t)=>{let n=t.queryContext();return VC(e,r,n)}}function VC(r,e,t){try{let n=QT(r,e,t);return Array.isArray(n)?n.map(s=>s.toString()):n===null?[]:[n.toString()]}catch(n){let i=`Error: Failed calculating expression "${e}". The error message was: `;return n instanceof Error?[i+n.message]:[i+"Unknown error"]}}var lu=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 cu=class extends pt{fieldName(){return"scheduled"}date(e){return e.scheduledDate}filterResultIfFieldMissing(){return!1}};var du=class extends pt{fieldName(){return"start"}fieldNameForFilterInstruction(){return"starts"}date(e){return e.startDate}filterResultIfFieldMissing(){return!0}};var fu=class extends pt{constructor(){let e=new Er;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 pu=class extends mn{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 hu=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 hn(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 zn=class extends hu{constructor(){super();this.filterInstructions=new Er,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=zn.makeCompareByTagComparator(s);return new Vr(this.fieldNameSingular(),a,i)}sorterRegExp(){return/^sort by tag( reverse)?[\s]*(\d+)?/}comparator(){return zn.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 c_=rs(l_());var Tu=class extends we{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){if(t.length===0)return ee.fromError(t,"empty line");let n=this.preprocessExpression(t);try{let i=(0,c_.parse)(n);for(let o of i)if(o.name==="IDENTIFIER"&&o.value){let u=o.value.trim();if(!(u in this.subFields)){let l=_u(u);if(l===null)return ee.fromError(t,`couldn't parse sub-expression '${u}'`);if(l.error)return ee.fromError(t,`couldn't parse sub-expression '${u}': ${l.error}`);l.filter&&(this.subFields[u]=l.filter)}}else if(o.name==="OPERATOR"){if(o.value==null)return ee.fromError(t,"empty operator in boolean query");if(!this.supportedOperators.includes(o.value))return ee.fromError(t,`unknown boolean operator '${o.value}'`)}let s=(o,u)=>this.filterTaskWithParsedQuery(o,i,u),a=this.constructExplanation(i);return ee.fromFilter(new ft(t,s,a))}catch(i){let s=i instanceof Error?i.message:"unknown error type";return ee.fromError(t,`malformed boolean query -- ${s} (check the documentation for guidelines)`)}}preprocessExpression(t){return t.replace(/\(([^()]+)\)/g,'("$1")')}filterTaskWithParsedQuery(t,n,i){let s=u=>u==="true",a=u=>u?"true":"false",o=[];for(let u of n)if(u.name==="IDENTIFIER"){if(u.value==null)throw Error("null token value");let c=this.subFields[u.value.trim()].filterFunction(t,i);o.push(a(c))}else if(u.name==="OPERATOR")if(u.value==="NOT"){let l=s(o.pop());o.push(a(!l))}else if(u.value==="OR"){let l=s(o.pop()),c=s(o.pop());o.push(a(l||c))}else if(u.value==="AND"){let l=s(o.pop()),c=s(o.pop());o.push(a(l&&c))}else if(u.value==="XOR"){let l=s(o.pop()),c=s(o.pop());o.push(a(l&&!c||!l&&c))}else throw Error("Unsupported operator: "+u.value);else throw Error("Unsupported token type: "+u);return s(o[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(ke.booleanNot([s]))}else if(i.value==="OR"){let s=n.pop(),a=n.pop();n.push(ke.booleanOr([a,s]))}else if(i.value==="AND"){let s=n.pop(),a=n.pop();n.push(ke.booleanAnd([a,s]))}else if(i.value==="XOR"){let s=n.pop(),a=n.pop();n.push(ke.booleanXor([a,s]))}else throw Error("Unsupported operator: "+i.value);else throw Error("Unsupported token type: "+i.name);return n[0]}};var vu=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 Eu=class extends Me{constructor(){super()}fieldName(){return"status.name"}value(e){return e.status.name}supportsSorting(){return!0}supportsGrouping(){return!0}};var yn=class extends we{canCreateFilterForLine(e){let t=new RegExp(`^(?:${this.fieldNameSingularEscaped()})`);return we.lineMatchesFilter(t,e)}createFilterOrErrorMessage(e){let t=we.getMatch(this.filterRegExp(),e);if(t===null)return this.helpMessage(e);let[n,i,s]=t,a=Ft[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 ee.fromFilter(new ft(e,o,new ke(e)))}filterRegExp(){return new RegExp(`^(?:${this.fieldNameSingularEscaped()}) (is|is not) ([^ ]+)$`)}helpMessage(e){let t=Object.values(Ft).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 ee.fromError(e,n)}fieldName(){return"status.type"}value(e){return e.status.type}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=yn.groupName(e),i=yn.groupName(t);return n.localeCompare(i,void 0,{numeric:!0})}}supportsGrouping(){return!0}grouper(){return e=>[yn.groupName(e)]}static groupName(e){return e.status.typeGroupText}};var wu=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 ku=class extends Me{fieldName(){return"folder"}value(e){return e.file.folder}supportsGrouping(){return!0}grouper(){return e=>[Me.escapeMarkdownCharacters(this.value(e))]}};var Su=class extends Me{fieldName(){return"root"}value(e){return e.file.root}supportsGrouping(){return!0}grouper(){return e=>[Me.escapeMarkdownCharacters(this.value(e))]}};var Ou=class extends Me{fieldName(){return"backlink"}value(e){let t=e.getLinkText({isFilenameUnique:!0});return t===null?"Unknown Location":t}createFilterOrErrorMessage(e){return ee.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=e.precedingHeader;return n===null?["[["+t+"]]"]:[`[[${t}#${n}|${t} > ${n}]]`]}}};var Sp=[()=>new Eu,()=>new yn,()=>new wr,()=>new pu,()=>new Bn,()=>new fu,()=>new nu,()=>new du,()=>new cu,()=>new Pi,()=>new iu,()=>new Fi,()=>new ku,()=>new Su,()=>new Ou,()=>new Hn,()=>new zn,()=>new lu,()=>new su,()=>new vu,()=>new Li,()=>new wu,()=>new uu,()=>new Tu];function _u(r){for(let e of Sp){let t=e();if(t.canCreateFilterForLine(r))return t.createFilterOrErrorMessage(r)}return null}function d_(r){let e=/^sort by /;if(r.match(e)===null)return null;for(let t of Sp){let i=t().createSorterFromLine(r);if(i)return i}return null}function f_(r){let e=/^group by /;if(r.match(e)===null)return null;for(let t of Sp){let i=t().createGrouperFromLine(r);if(i)return i}return null}var bn=class{constructor(e,t){this.queryPath=e,this.allTasks=[...t]}static fromAllTasks(e){return new bn(void 0,e)}queryContext(){return this.queryPath?Ko(this.queryPath):void 0}};function p_(r){return`task${r!==1?"s":""}`}var Qn=class{constructor(e,t){this.totalTasksCountBeforeLimit=0;this._searchErrorMessage=void 0;this.taskGroups=e,this.totalTasksCountBeforeLimit=t}get searchErrorMessage(){return this._searchErrorMessage}set searchErrorMessage(e){this._searchErrorMessage=e}get totalTasksCount(){return this.taskGroups.totalTasksCount()}totalTasksCountDisplayText(){let e=this.totalTasksCount,t=this.totalTasksCountBeforeLimit;return e===t?`${e} ${p_(e)}`:`${e} of ${t} ${p_(t)}`}get groups(){return this.taskGroups.groups}static fromError(e){let t=new Qn(new Wi([],[],bn.fromAllTasks([])),0);return t._searchErrorMessage=e,t}};function h_(r){return r.endsWith("\\")}function m_(r){return r.endsWith("\\\\")}function EA(r){return r.replace(/^[ \t]*/,"")}function wA(r){return r.replace(/[ \t]*\\$/,"")}function kA(r,e){let t=r;return e&&(t=EA(r)),m_(t)?t=t.slice(0,-1):h_(r)&&(t=wA(t)),t}function SA(r,e,t){e?r[r.length-1]+=" "+t:r.push(t)}function OA(r){let e=[],t=!1;for(let n of r.split(`
`)){let i=kA(n,t);SA(e,t,i),m_(n)?t=!1:t=h_(n)}return e.join(`
`)}function g_(r){return OA(r).split(`
`).map(e=>e.trim()).filter(e=>e!=="")}var Xr=class{constructor(e,t=void 0){this._limit=void 0;this._taskGroupLimit=void 0;this._layoutOptions=new da;this._filters=[];this._error=void 0;this._sorting=[];this._grouping=[];this._ignoreGlobalQuery=!1;this.hideOptionsRegexp=/^(hide|show) (task count|backlink|priority|created date|start date|scheduled date|done date|due date|recurrence rule|edit button|urgency|tags)/;this.shortModeRegexp=/^short/;this.explainQueryRegexp=/^explain/;this.ignoreGlobalQueryRegexp=/^ignore global query/;this.logger=xt.getLogger("tasks.Query");this._queryId="";this.limitRegexp=/^limit (groups )?(to )?(\d+)( tasks?)?/;this.commentRegexp=/^#.*/;this._queryId=this.generateQueryId(10),this.source=e,this.filePath=t,this.debug(`Creating query: ${this.formatQueryForLogging()}`),g_(e).forEach(n=>{let i=this.expandPlaceholders(n,t);if(this.error===void 0)switch(!0){case this.shortModeRegexp.test(i):this._layoutOptions.shortMode=!0;break;case this.explainQueryRegexp.test(i):this._layoutOptions.explainQuery=!0;break;case this.ignoreGlobalQueryRegexp.test(i):this._ignoreGlobalQuery=!0;break;case this.limitRegexp.test(i):this.parseLimit(i);break;case this.parseSortBy(i):break;case this.parseGroupBy(i):break;case this.hideOptionsRegexp.test(i):this.parseHideOptions(i);break;case this.commentRegexp.test(i):break;case this.parseFilter(i):break;default:this.setError("do not understand query",i)}})}formatQueryForLogging(){return`[${this.source.split(`
`).join(" ; ")}]`}expandPlaceholders(e,t){if(e.includes("{{")&&e.includes("}}")&&this.filePath===void 0)return this._error=`The query looks like it contains a placeholder, with "{{" and "}}"
but no file path has been supplied, so cannot expand placeholder values.
The query is:
${e}`,e;let n=e;if(t){let i=Ko(t);try{n=VT(e,i)}catch(s){return s instanceof Error?this._error=s.message:this._error="Internal error. expandPlaceholders() threw something other than Error.",e}}return n}append(e){return this.source===""?e:e.source===""?this:new Xr(`${this.source}
${e.source}`,this.filePath)}explainQuery(){let e="";if(this.error!==void 0)return e+=`Query has an error:
`,e+=this.error+`
`,e;let 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}=Q();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}addFilter(e){this._filters.push(e)}get sorting(){return this._sorting}get grouping(){return this._grouping}get error(){return this._error}setError(e,t){this._error=`${e}
Problem line: "${t}"`}get ignoreGlobalQuery(){return this._ignoreGlobalQuery}applyQueryToTasks(e){this.debug(`Executing query: ${this.formatQueryForLogging()}`);let t=new bn(this.filePath,e);try{this.filters.forEach(o=>{e=e.filter(u=>o.filterFunction(u,t))});let{debugSettings:n}=Q(),i=n.ignoreSortInstructions?e:Ui.by(this.sorting,e),s=i.slice(0,this.limit),a=new Wi(this.grouping,s,t);return this._taskGroupLimit!==void 0&&a.applyTaskLimit(this._taskGroupLimit),new Qn(a,i.length)}catch(n){let i="Search failed";return Qn.fromError(Gn(i,n))}}parseHideOptions(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;case"tags":this._layoutOptions.hideTags=n;break;default:this.setError("do not understand hide/show option",e)}}}parseFilter(e){var n;let t=_u(e);return t!=null?(t.filter?this._filters.push(t.filter):this.setError((n=t.error)!=null?n:"Unknown error",e),!0):!1}parseLimit(e){let t=e.match(this.limitRegexp);if(t===null){this.setError("do not understand query limit",e);return}let n=Number.parseInt(t[3],10);t[1]!==void 0?this._taskGroupLimit=n:this._limit=n}parseSortBy(e){let t=d_(e);return t?(this._sorting.push(t),!0):!1}parseGroupBy(e){let t=f_(e);return t?(this._grouping.push(t),!0):!1}generateQueryId(e){let t="AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz1234567890";return Array.from({length:e},()=>t[Math.floor(Math.random()*t.length)]).join("")}debug(e,t){this.logger.debugWithId(this._queryId,`"${this.filePath}": ${e}`,t)}};var Tn=class{constructor(e=Tn.empty){this._source=e}static getInstance(){return Tn.instance||(Tn.instance=new Tn),Tn.instance}set(e){this._source=e}query(e=void 0){return new Xr(this._source,e)}hasInstructions(){return this._source.trim()!==Tn.empty}},er=Tn;er.empty="";var Du=class{constructor({obsidianEvents:e}){this.logger=xt.getLogger("tasks.Events");this.obsidianEvents=e}onCacheUpdate(e){return this.logger.debug("TasksEvents.onCacheUpdate()"),this.obsidianEvents.on("obsidian-tasks-plugin:cache-update",e)}triggerCacheUpdate(e){this.logger.debug("TasksEvents.triggerCacheUpdate()"),this.obsidianEvents.trigger("obsidian-tasks-plugin:cache-update",e)}onRequestCacheUpdate(e){return this.logger.debug("TasksEvents.onRequestCacheUpdate()"),this.obsidianEvents.on("obsidian-tasks-plugin:request-cache-update",e)}triggerRequestCacheUpdate(e){this.logger.debug("TasksEvents.triggerRequestCacheUpdate()"),this.obsidianEvents.trigger("obsidian-tasks-plugin:request-cache-update",e)}off(e){this.logger.debug("TasksEvents.off()"),this.obsidianEvents.offref(e)}};var Sa=require("obsidian");var wa,Op,Dp,DA=["md"],ka=xt.getLogger("tasks.File"),y_=({metadataCache:r,vault:e,workspace:t})=>{wa=r,Op=e,Dp=t},Mu=t=>q(void 0,[t],function*({originalTask:r,newTasks:e}){if(Op===void 0||wa===void 0||Dp===void 0){Ru("Tasks: cannot use File before initializing it.");return}Array.isArray(e)||(e=[e]),ka.debug(`replaceTaskWithTasks entered. ${r.path}`),T_({originalTask:r,newTasks:e,vault:Op,metadataCache:wa,workspace:Dp,previousTries:0})});function Ru(r){console.error(r),new Sa.Notice(r,15e3)}function b_(r){console.warn(r),new Sa.Notice(r,1e4)}function RA(r){ka.debug(r)}var _n=class extends Error{},xu=class extends Error{},T_=a=>q(void 0,[a],function*({originalTask:r,newTasks:e,vault:t,metadataCache:n,workspace:i,previousTries:s}){ka.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.
`;Ru(l);return}let u=Math.min(Math.pow(10,s),100);ka.debug(`timeout = ${u}`),setTimeout(()=>{T_({originalTask:r,newTasks:e,vault:t,metadataCache:n,workspace:i,previousTries:s+1})},u)};try{let[u,l,c]=yield __(r,t),p=[...c.slice(0,u),...e.map(h=>h.toFileLineString()),...c.slice(u+1)];yield t.modify(l,p.join(`
`))}catch(u){if(u instanceof _n)return u.message&&b_(u.message),o();if(u instanceof xu)return o();u instanceof Error&&Ru(u.message)}});function __(r,e){return q(this,null,function*(){if(wa===void 0)throw new _n;let t=e.getAbstractFileByPath(r.path);if(!(t instanceof Sa.TFile))throw new _n(`Tasks: No file found for task ${r.description}. Retrying ...`);if(!DA.includes(t.extension))throw new Error(`Tasks: Does not support files with the ${t.extension} file extension.`);let n=wa.getFileCache(t);if(n==null||n===null)throw new _n(`Tasks: No file cache found for file ${t.path}. Retrying ...`);let i=n.listItems;if(i===void 0||i.length===0)throw new _n(`Tasks: No list items found in file cache of ${t.path}. Retrying ...`);let a=(yield e.read(t)).split(`
`),o=xA(r,a,i,RA);if(o===void 0)throw new xu;return[o,t,a]})}function Rp(r,e){return q(this,null,function*(){try{let[t,n,i]=yield __(r,e);return[t,n]}catch(t){t instanceof _n?t.message&&b_(t.message):t instanceof Error&&Ru(t.message)}})}function v_(r,e){return r<e.length}function xA(r,e,t,n){let i=MA(r,e);return i!==void 0||(i=CA(r,e),i!==void 0)?i:AA(r,e,t,n)}function MA(r,e){let t=r.taskLocation.lineNumber;if(v_(t,e)&&e[t]===r.originalMarkdown)return ka.debug(`Found original markdown at original line number ${t}`),t}function CA(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 AA(r,e,t,n){let i,s=0;for(let a of t){let o=a.position.start.line;if(!v_(o,e))return;if(o<r.taskLocation.sectionStart||a.task===void 0)continue;let u=e[o];if(ge.getInstance().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 w_=require("obsidian");var E_=require("obsidian");var PA={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:"task-block-link"},NA=7,IA="far";function FA(r,e,t){return q(this,null,function*(){var o;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 LA(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();Mu({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&&jA({task:r,element:i,isFilenameUnique:e.isFilenameUnique}),n})}function LA(r,e,t,n){return q(this,null,function*(){let i={},s=new dn(e.layoutOptions),a=Gr.tasksPluginEmoji.taskSerializer;for(let o of s.shownTaskLayoutComponents){let u=a.componentToString(r,s,o);if(u){o==="description"&&(u=ge.getInstance().removeAsWordFromDependingOnSettings(u));let l=document.createElement("span");if(t.appendChild(l),l){let c=document.createElement("span");l.appendChild(c),yield UA(c,u,o,r,n,e.obsidianComponent),qA(o,c);let p=WA(o,r);l.classList.add(...p);let h=xp(o,r);for(let _ in h)l.dataset[_]=h[_];i=pe(pe({},i),h)}}}for(let o of s.hiddenTaskLayoutComponents){let u=xp(o,r);i=pe(pe({},i),u)}if(i.taskPriority===void 0){let o=xp("priority",r);i=pe(pe({},i),o)}return i})}function UA(r,e,t,n,i,s){return q(this,null,function*(){if(t==="description"){let{debugSettings:a}=Q();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 WA(r,e){let t=[],n=PA[r];switch(r){case"blockLink":case"description":case"priority":case"recurrenceRule":t.push(n);break;case"createdDate":case"dueDate":case"startDate":case"scheduledDate":case"doneDate":{e[r]&&t.push(n);break}}return t}function xp(r,e){let t={},n={createdDate:"taskCreated",dueDate:"taskDue",startDate:"taskStart",scheduledDate:"taskScheduled",doneDate:"taskDone",priority:"taskPriority",description:"",recurrenceRule:"",blockLink:""};switch(r){case"description":case"recurrenceRule":case"blockLink":break;case"priority":{let i=n[r];t[i]=zr.priorityNameUsingNormal(e.priority).toLocaleLowerCase();break}case"createdDate":case"dueDate":case"startDate":case"scheduledDate":case"doneDate":{let i=e[r];if(i){let s=$A(i);if(s){let a=n[r];t[a]=s}}break}}return t}function qA(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=YA(i),a=t[n];s&&(a.dataset.tagName=s)}}}}function $A(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)<=NA?t+=Math.abs(n).toString()+"d":t+=IA,t)}function YA(r){let e=/["&\x00\r\n]/g,t=r.replace(e,"-");return t=t.replace(/^[-_]+/,""),t.length>0?t:null}function jA({task:r,element:e,isFilenameUnique:t}){let{recurrenceSymbol:n,startDateSymbol:i,createdDateSymbol:s,scheduledDateSymbol:a,dueDateSymbol:o,doneDateSymbol:u}=Gr.tasksPluginEmoji.taskSerializer.symbols;e.addEventListener("mouseenter",()=>{let l=e.createDiv();l.addClasses(["tooltip","pop-up"]),r.recurrence&&l.createDiv().setText(`${n} ${r.recurrence.toText()}`),Oa(l,r.createdDate,s),Oa(l,r.startDate,i),Oa(l,r.scheduledDate,a),Oa(l,r.dueDate,o),Oa(l,r.doneDate,u);let c=r.getLinkText({isFilenameUnique:t});c&&l.createDiv().setText(`\u{1F517} ${c}`),e.addEventListener("mouseleave",()=>{l.remove()})})}function Oa(r,e,t){e&&r.createDiv().setText(GA({signifier:t,date:e}))}function GA({signifier:r,date:e}){return`${r} ${e.format(z.dateFormat)} (${e.from(window.moment().startOf("day"))})`}function Cu(r,e){function t(n,i,s,a){return q(this,null,function*(){if(!a)throw new Error("Must call the Obsidian renderer with an Obsidian Component object");yield E_.MarkdownRenderer.renderMarkdown(n,i,s,a)})}return FA(r,e,t)}var Au=class{constructor({plugin:e}){this.markdownPostProcessor=this._markdownPostProcessor.bind(this);e.registerMarkdownPostProcessor(this._markdownPostProcessor.bind(this))}_markdownPostProcessor(e,t){return q(this,null,function*(){var c;let n=new w_.MarkdownRenderChild(e);t.addChild(n);let i=e.findAll(".task-list-item").filter(p=>{var y;let h=(y=p.textContent)==null?void 0:y.split(`
`);if(h===void 0)return!1;let _=null;for(let w=0;w<h.length;w=w+1)if(h[w]!==""){_=h[w];break}return _===null?!1:ge.getInstance().includedIn(_)});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 p=a.lineStart;p<=a.lineEnd;p++){let h=o[p];if(h===void 0)continue;let _=null,y=ye.fromLine({line:h,taskLocation:new ot(s,p,a.lineStart,u,_),fallbackDate:null});y!==null&&(l.push(y),u++)}for(let p=0;p<i.length;p++){let h=l[p],_=i[p];if(h===void 0||_===void 0)continue;let y=(c=_.getAttr("data-line"))!=null?c:"0",w=Number.parseInt(y,10),x=yield Cu(h,{parentUlElement:e,listIndex:w,obsidianComponent:n}),P=_.childNodes;for(let Z=0;Z<P.length;Z=Z+1){let V=P[Z];V.nodeName.toLowerCase()==="div"?x.prepend(V):V.nodeName.toLowerCase()==="ul"&&x.append(V)}let N=_.querySelectorAll("[data-footnote-id]"),F=x.querySelectorAll("[data-footnote-id]");if(N.length===F.length)for(let Z=0;Z<N.length;Z++)F[Z].replaceWith(N[Z]);_.replaceWith(x)}})}};var k_=require("@codemirror/view"),S_=require("obsidian");var O_=()=>k_.ViewPlugin.fromClass(Mp),Mp=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 h=`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(h),new S_.Notice(h,45e3)}return!1}let{state:i}=this.view,s=this.view.posAtDOM(t),a=i.doc.lineAt(s),o=ye.fromLine({line:a.text,taskLocation:ot.fromUnknownPosition(""),fallbackDate:null});if(o===null)return!1;e.preventDefault();let l=o.toggleWithRecurrenceInUsersOrder().map(h=>h.toFileLineString()).join(i.lineBreak),c=i.update({changes:{from:a.from,to:a.to,insert:l}});this.view.dispatch(c);let p=t.checked;return setTimeout(()=>{t.checked=p},1),!0}};var zi=require("obsidian");function D_(r,e,t,n=void 0){let i="";e.isEmpty()||(i+=`Only tasks containing the global filter '${e.get()}'.
`);let s=new Xr(r,n);return s.ignoreGlobalQuery||t.hasInstructions()&&(i+=`Explanation of the global query:
${t.query(n).explainQuery()}
`),i+=`Explanation of this Tasks code block query:
${s.explainQuery()}`,i}function Pu(r,e,t){let n=new Xr(r,t);return n.ignoreGlobalQuery?n:e.query(t).append(n)}var Nu=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 q(this,null,function*(){n.addChild(new Cp({app:this.app,events:this.events,container:t,source:e,filePath:n.sourcePath}))})}},Cp=class extends zi.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=Pu(this.source,er.getInstance(),this.filePath),this.queryType="tasks";break;default:this.query=Pu(this.source,er.getInstance(),this.filePath),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=Pu(this.source,er.getInstance(),this.filePath),this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()},i+1e3)}render(i){return q(this,arguments,function*({tasks:t,state:n}){var a;let s=this.containerEl.createEl("div");n==="Warm"&&this.query.error===void 0?yield this.renderQuerySearchResults(t,n,s):this.query.error!==void 0?this.renderErrorMessage(s,this.query.error):this.renderLoadingMessage(s),(a=this.containerEl.firstChild)==null||a.replaceWith(s)})}renderQuerySearchResults(t,n,i){return q(this,null,function*(){this.query.debug(`Render called: plugin state: ${n}; searching ${t.length} tasks`),this.query.layoutOptions.explainQuery&&this.createExplanation(i);let s=this.query.applyQueryToTasks(t);if(s.searchErrorMessage!==void 0){this.renderErrorMessage(i,s.searchErrorMessage);return}yield this.addAllTaskGroups(s.taskGroups,i);let a=s.totalTasksCount;this.addTaskCount(i,s),this.query.debug(`${a} tasks displayed`)})}renderErrorMessage(t,n){t.createDiv().innerHTML=`<pre>Tasks query: ${n.replace(/\n/g,"<br>")}</pre>`}renderLoadingMessage(t){t.setText("Loading Tasks ...")}createExplanation(t){let n=D_(this.source,ge.getInstance(),er.getInstance(),this.filePath),i=t.createEl("pre");i.addClasses(["plugin-tasks-query-explanation"]),i.setText(n),t.appendChild(i)}createTaskList(t,n){return q(this,null,function*(){let i=new dn(this.query.layoutOptions),s=n.createEl("ul");s.addClasses(["contains-task-list","plugin-tasks-query-result"]),s.addClasses(i.taskListHiddenClasses);let a=this.getGroupingAttribute();a&&a.length>0&&(s.dataset.taskGroupBy=a);for(let[o,u]of t.entries()){let l=this.isFilenameUnique({task:u}),c=yield Cu(u,{parentUlElement:s,listIndex:o,layoutOptions:this.query.layoutOptions,isFilenameUnique:l,taskLayout:i,obsidianComponent:this});c.querySelectorAll("[data-footnote-id]").forEach(_=>_.remove());let h=c.createSpan("task-extras");if(this.query.layoutOptions.hideUrgency||this.addUrgency(h,u),!this.query.layoutOptions.hideBacklinks){let _=this.query.layoutOptions.shortMode;this.addBacklinks(h,u,_,l)}this.query.layoutOptions.hideEditButton||this.addEditButton(h,u),s.appendChild(c)}n.appendChild(s)})}addEditButton(t,n){t.createEl("a",{cls:"tasks-edit"}).onClickEvent(s=>{s.preventDefault();let a=u=>{Mu({originalTask:n,newTasks:Rt.removeInferredStatusIfNeeded(n,u)})};new pn({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"})}addAllTaskGroups(t,n){return q(this,null,function*(){for(let i of t.groups)this.addGroupHeadings(n,i.groupHeadings),yield this.createTaskList(i.tasks,n)})}addGroupHeadings(t,n){for(let i of n)this.addGroupHeading(t,i)}addGroupHeading(t,n){return q(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 zi.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",p=>q(this,null,function*(){let h=yield Rp(n,l);if(h){let[_,y]=h;yield this.app.workspace.getLeaf(zi.Keymap.isModEvent(p)).openFile(y,{eState:{line:_}})}})),o.addEventListener("mousedown",p=>q(this,null,function*(){if(p.button===1){let h=yield Rp(n,l);if(h){let[_,y]=h;yield this.app.workspace.getLeaf("tab").openFile(y,{eState:{line:_}})}}})),i||a.append(")")}addTaskCount(t,n){this.query.layoutOptions.hideTaskCount||t.createDiv({text:n.totalTasksCountDisplayText(),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");var Iu=class{constructor(e){this._markdown="";this.columnNames=e,this.addTitleRow()}get markdown(){return this._markdown}addTitleRow(){let e="|",t="|";this.columnNames.forEach(n=>{e+=` ${n} |`,t+=" ----- |"}),this._markdown+=`${e}
`,this._markdown+=`${t}
`}addRow(e){let t=this.makeRowText(e);this._markdown+=`${t}
`}addRowIfNew(e){let t=this.makeRowText(e);this._markdown.includes(t)||(this._markdown+=`${t}
`)}makeRowText(e){let t="|";return e.forEach(n=>{t+=` ${n} |`}),t}};function R_(r,e){return r.findIndex(t=>t.symbol===e)}function BA(r,e){let t=X.getTypeForUnknownSymbol(r.symbol);r.type!==t&&(t==="TODO"&&r.symbol!==" "||e.push(`For information, the conventional type for status symbol ${Dr(r.symbol)} is ${Dr(t)}: you may wish to review this type.`))}function HA(r,e,t){let n=R_(r,e.nextStatusSymbol);if(n===-1){t.push(`Next symbol ${Dr(e.nextStatusSymbol)} is unknown: create a status with symbol ${Dr(e.nextStatusSymbol)}.`);return}if(e.type!=="DONE")return;let i=r[n];if(i){if(i.type!=="TODO"&&i.type!=="IN_PROGRESS"){let s="https://publish.obsidian.md/tasks/Getting+Started/Statuses/Recurring+Tasks+and+Custom+Statuses";t.push(`This \`DONE\` status is followed by ${Dr(i.type)}, not \`TODO\` or \`IN_PROGRESS\`: this will not work well for recurring tasks. See [Recurring Tasks and Custom Statuses](${s}).`)}}else t.push("Unexpected failure to find the next status.")}function zA(r,e,t){let n=[];return e.symbol===X.EMPTY.symbol?(n.push("Empty symbol: this status will be ignored."),n):R_(r,e.symbol)!=t?(n.push(`Duplicate symbol '${Dr(e.symbol)}': this status will be ignored.`),n):(BA(e,n),HA(r,e,n),n)}function x_(r){let e=new Iu(["Status Symbol","Next Status Symbol","Status Name","Status Type","Problems (if any)"]),t=Ne.allStatuses(r);return t.forEach((n,i)=>{e.addRow([Dr(n.symbol),Dr(n.nextStatusSymbol),n.name,Dr(n.type),zA(t,n,i).join("<br>")])}),e.markdown}function M_(r,e,t,n){let s=x_(r),a=e.mermaidDiagram(!0);return`# ${t}
## About this file
This file was created by the Obsidian Tasks plugin (version ${n}) to help visualise the task statuses in this vault.
If you change the Tasks status settings, you can get an updated report by:
- Going to \`Settings\` -> \`Tasks\`.
- Clicking on \`Review and check your Statuses\`.
You can delete this file any time.
## Status Settings
<!--
Switch to Live Preview or Reading Mode to see the table.
If there are any Markdown formatting characters in status names, such as '*' or '_',
Obsidian may only render the table correctly in Reading Mode.
-->
These are the status values in the Core and Custom statuses sections.
${s}
## Loaded Settings
<!-- Switch to Live Preview or Reading Mode to see the diagram. -->
These are the settings actually used by Tasks.
${a}`}function Dr(r){return r===""?r:"`"+(r!==" "?r:"space")+"`"}function C_(){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 A_(){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 P_(){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 N_(){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 I_(){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 F_(){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 L_(){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 U_=[{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 fr=require("obsidian");var Xn=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=X.createFromImportedValue(e).configuration;return a.push(...this.validateSymbolTypeConventions(o)),a.push(...this.validate(o)),a}validateSymbol(e){return Xn.validateOneSymbol(e.symbol,"Task Status Symbol")}validateNextSymbol(e){return Xn.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=Ft[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 Oe,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 Zn=new Xn,qt=class extends fr.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 Je(this.statusSymbol,this.statusName,this.statusNextSymbol,this.statusAvailableAsCommand,this.type)}display(){return q(this,null,function*(){let{contentEl:t}=this;t.empty();let n=t.createDiv(),i;new fr.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,qt.setValid(l,Zn.validateSymbol(this.statusConfiguration()))})}).setDisabled(this.isCoreStatus).then(l=>{qt.setValid(i,Zn.validateSymbol(this.statusConfiguration()))});let s;new fr.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,qt.setValid(l,Zn.validateName(this.statusConfiguration()))})}).then(l=>{qt.setValid(s,Zn.validateName(this.statusConfiguration()))});let a;new fr.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,qt.setValid(l,Zn.validateNextSymbol(this.statusConfiguration()))})}).then(l=>{qt.setValid(a,Zn.validateNextSymbol(this.statusConfiguration()))}),new fr.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(p=>{l.addOption(p,p)}),l.setValue(this.type).onChange(p=>{this.type=X.getTypeFromStatusTypeString(p)})}),X.tasksPluginCanCreateCommandsForStatuses()&&new fr.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=>q(this,null,function*(){this.statusAvailableAsCommand=c}))});let o=t.createDiv(),u=new fr.Setting(o);u.addButton(l=>(l.setTooltip("Save").setIcon("checkmark").onClick(()=>q(this,null,function*(){let c=Zn.validate(this.statusConfiguration());if(c.length>0){let p=c.join(`
`)+`
Fix errors before saving.`;new fr.Notice(p);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?qt.removeValidationError(t):qt.setValidationError(t)}};var $t=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 q(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($t.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(Gr))i.addOption(s,Gr[s].displayName);i.setValue(Q().taskFormat).onChange(s=>q(this,null,function*(){et({taskFormat:s}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Global filter Settings"}),new _e.Setting(t).setName("Global task filter").setDesc($t.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(ge.getInstance().get()).onChange(s=>q(this,null,function*(){et({globalFilter:s}),ge.getInstance().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=Q();i.setValue(s.removeGlobalFilter).onChange(a=>q(this,null,function*(){et({removeGlobalFilter:a}),ge.getInstance().setRemoveGlobalFilter(a),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Global Query"}),XA(new _e.Setting(t).setDesc($t.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=Q();i.inputEl.rows=4,i.setPlaceholder(`# For example...
path does not include _templates/
limit 300
show urgency`).setValue(s.globalQuery).onChange(a=>q(this,null,function*(){et({globalQuery:a}),er.getInstance().set(a),yield this.plugin.saveSettings()}))})),t.createEl("h4",{text:"Task Statuses"});let{headingOpened:n}=Q();U_.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($t.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=Q();i.setValue(s.setCreatedDate).onChange(a=>q(this,null,function*(){et({setCreatedDate:a}),yield this.plugin.saveSettings()}))}),new _e.Setting(t).setName("Set done date on every completed task").setDesc($t.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=Q();i.setValue(s.setDoneDate).onChange(a=>q(this,null,function*(){et({setDoneDate:a}),yield this.plugin.saveSettings()}))}),new _e.Setting(t).setName("Use filename as Scheduled date for undated tasks").setDesc($t.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=Q();i.setValue(s.useFilenameAsScheduledDate).onChange(a=>q(this,null,function*(){et({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=>q(this,null,function*(){let s=Q();yield this.plugin.saveSettings(),i.setValue($t.renderFolderArray(s.filenameAsDateFolders)).onChange(a=>q(this,null,function*(){let o=$t.parseCommaSeparatedFolders(a);et({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($t.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}=Q();i.setValue(s).onChange(a=>q(this,null,function*(){et({recurrenceOnNextLine:a}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Auto-suggest Settings"}),new _e.Setting(t).setName("Auto-suggest task content").setDesc($t.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=Q();i.setValue(s.autoSuggestInEditor).onChange(a=>q(this,null,function*(){et({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=Q();i.setLimits(0,3,1).setValue(s.autoSuggestMinMatch).setDynamicTooltip().onChange(a=>q(this,null,function*(){et({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=Q();i.setLimits(3,12,1).setValue(s.autoSuggestMaxItems).setDynamicTooltip().onChange(a=>q(this,null,function*(){et({autoSuggestMaxItems:a}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Dialog Settings"}),new _e.Setting(t).setName("Provide access keys in dialogs").setDesc($t.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=Q();i.setValue(s.provideAccessKeys).onChange(a=>q(this,null,function*(){et({provideAccessKeys:a}),yield this.plugin.saveSettings()}))})}addOneSettingsBlock(t,n,i){let s=t.createEl("details",{cls:"tasks-nested-settings",attr:pe({},n.open||i[n.text]?{open:!0}:{})});s.empty(),s.ontoggle=()=>{i[n.text]=s.open,et({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!==""&&!gT(o.featureFlag))&&(o.type==="checkbox"?new _e.Setting(s).setName(o.name).setDesc(o.description).addToggle(u=>{let l=Q();l.generalSettings[o.settingName]||Wn(o.settingName,o.initialValue),u.setValue(l.generalSettings[o.settingName]).onChange(c=>q(this,null,function*(){Wn(o.settingName,c),yield this.plugin.saveSettings()}))}):o.type==="text"?new _e.Setting(s).setName(o.name).setDesc(o.description).addText(u=>{let l=Q();l.generalSettings[o.settingName]||Wn(o.settingName,o.initialValue);let c=p=>q(this,null,function*(){Wn(o.settingName,p),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=Q();l.generalSettings[o.settingName]||Wn(o.settingName,o.initialValue);let c=p=>q(this,null,function*(){Wn(o.settingName,p),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}=Q();i.coreStatuses.forEach(a=>{W_(t,a,i.coreStatuses,i,n,n.plugin,!0)}),new _e.Setting(t).addButton(a=>{let o="Review and check your Statuses";a.setButtonText(o).setCta().onClick(()=>q(this,null,function*(){let l=window.moment().format("YYYY-MM-DD HH-mm-ss"),c=`Tasks Plugin - ${o} ${l}.md`,p=this.plugin.manifest.version,h=Oe.getInstance(),_=M_(i,h,o,p),y=yield app.vault.create(c,_);yield this.app.workspace.getLeaf(!0).openFile(y)})),a.setTooltip("Create a new file in the root of the vault, containing a Mermaid diagram of the current status settings.")}).infoEl.remove()}insertCustomTaskStatusSettings(t,n){let{statusSettings:i}=Q();i.customStatuses.forEach(l=>{W_(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(()=>q(this,null,function*(){Ne.addStatus(i.customStatuses,new Je("","","",!1,"TODO")),yield Ki(i,n)}))}).infoEl.remove();let a=[["AnuPpuccin Theme",C_()],["Aura Theme",A_()],["Ebullientworks Theme",P_()],["ITS Theme & SlRvb Checkboxes",N_()],["Minimal Theme",F_()],["Things Theme",L_()],["LYT Mode Theme (Dark mode only)",I_()]];for(let[l,c]of a)new _e.Setting(t).addButton(h=>{let _=`${l}: Add ${c.length} supported Statuses`;h.setButtonText(_).onClick(()=>q(this,null,function*(){yield QA(c,i,n)}))}).infoEl.remove();new _e.Setting(t).addButton(l=>{l.setButtonText("Add All Unknown Status Types").setCta().onClick(()=>q(this,null,function*(){let p=this.plugin.getTasks().map(_=>_.status),h=Oe.getInstance().findUnknownStatuses(p);h.length!==0&&(h.forEach(_=>{Ne.addStatus(i.customStatuses,_)}),yield Ki(i,n))}))}).infoEl.remove(),new _e.Setting(t).addButton(l=>{l.setButtonText("Reset Custom Status Types to Defaults").setWarning().onClick(()=>q(this,null,function*(){Ne.resetAllCustomStatuses(i),yield Ki(i,n)}))}).infoEl.remove()}},Da=$t;Da.createFragmentWithHTML=t=>createFragment(n=>n.createDiv().innerHTML=t);function W_(r,e,t,n,i,s,a){let o=r.createEl("pre");o.addClass("row-for-status"),o.textContent=new X(e).previewText();let u=new _e.Setting(r);u.infoEl.replaceWith(o),a||u.addExtraButton(l=>{l.setIcon("cross").setTooltip("Delete").onClick(()=>q(this,null,function*(){Ne.deleteStatus(t,e)&&(yield Ki(n,i))}))}),u.addExtraButton(l=>{l.setIcon("pencil").setTooltip("Edit").onClick(()=>q(this,null,function*(){let c=new qt(s,e,a);c.onClose=()=>q(this,null,function*(){c.saved&&Ne.replaceStatus(t,e,c.statusConfiguration())&&(yield Ki(n,i))}),c.open()}))}),u.infoEl.remove()}function QA(r,e,t){return q(this,null,function*(){Ne.bulkAddStatusCollection(e,r).forEach(i=>{new _e.Notice(i)}),yield Ki(e,t)})}function Ki(r,e){return q(this,null,function*(){et({statusSettings:r}),Ne.applyToStatusRegistry(r,Oe.getInstance()),yield e.saveSettings(!0)})}function XA(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 q_=require("obsidian");var Fu=class extends q_.EditorSuggest{constructor(t,n){super(t);this.settings=n,t.scope.register([],"Tab",()=>{var s;let i=(s=this.context)==null?void 0:s.editor;return i?(i.exec("indentMore"),!1):!0})}onTrigger(t,n,i){if(!this.settings.autoSuggestInEditor)return null;let s=n.getLine(t.line);return fT(s,t.ch)?{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=pa()).buildSuggestions)==null?void 0:o.call(a,n,i.ch,this.settings))!=null?u:[]).map(l=>bt(pe({},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 p=new KeyboardEvent("keydown",{code:"Enter",key:"Enter"});(l=(u=i==null?void 0:i.cm)==null?void 0:u.contentDOM)==null||l.dispatchEvent(p);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 $_=(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 Y_=(r,e)=>{let t=Ho({line:"",path:""});return new pn({app:r,task:t,onSubmit:e})};var j_=r=>({createTaskLineModal:()=>$_(r,Y_)});var Lu=class extends G_.Plugin{get apiV1(){return j_(app)}onload(){return q(this,null,function*(){xt.registerConsoleLogger(),Vf("info",`loading plugin "${this.manifest.name}" v${this.manifest.version}`),yield this.loadSettings();let{loggingOptions:t}=Q();xt.configure(t),this.addSettingTab(new Da({plugin:this})),y_({metadataCache:this.app.metadataCache,vault:this.app.vault,workspace:this.app.workspace}),yield this.loadTaskStatuses();let n=new Du({obsidianEvents:this.app.workspace});this.cache=new qn({metadataCache:this.app.metadataCache,vault:this.app.vault,events:n}),this.inlineRenderer=new Au({plugin:this}),this.queryRenderer=new Nu({plugin:this,events:n}),this.registerEditorExtension(O_()),this.registerEditorSuggest(new Fu(this.app,Q())),new zo({plugin:this})})}loadTaskStatuses(){return q(this,null,function*(){let{statusSettings:t}=Q();Ne.applyToStatusRegistry(t,Oe.getInstance())})}onunload(){var t;Vf("info",`unloading plugin "${this.manifest.name}" v${this.manifest.version}`),(t=this.cache)==null||t.unload()}loadSettings(){return q(this,null,function*(){let t=yield this.loadData();et(t),t=Q(),ge.getInstance().set(t.globalFilter),ge.getInstance().setRemoveGlobalFilter(t.removeGlobalFilter),er.getInstance().set(t.globalQuery),yield this.loadTaskStatuses()})}saveSettings(){return q(this,null,function*(){yield this.saveData(Q())})}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.
*/
/*!
* mustache.js - Logic-less {{mustache}} templates with JavaScript
* http://github.com/janl/mustache.js
*/