|
|
/*
|
|
|
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 gD=Object.create;var Ui=Object.defineProperty,_D=Object.defineProperties,TD=Object.getOwnPropertyDescriptor,bD=Object.getOwnPropertyDescriptors,vD=Object.getOwnPropertyNames,Kp=Object.getOwnPropertySymbols,wD=Object.getPrototypeOf,Xp=Object.prototype.hasOwnProperty,DD=Object.prototype.propertyIsEnumerable;var Zp=(r,e,t)=>e in r?Ui(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Ne=(r,e)=>{for(var t in e||(e={}))Xp.call(e,t)&&Zp(r,t,e[t]);if(Kp)for(var t of Kp(e))DD.call(e,t)&&Zp(r,t,e[t]);return r},rr=(r,e)=>_D(r,bD(e));var O=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),kD=(r,e)=>{for(var t in e)Ui(r,t,{get:e[t],enumerable:!0})},Qp=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of vD(e))!Xp.call(r,s)&&s!==t&&Ui(r,s,{get:()=>e[s],enumerable:!(n=TD(e,s))||n.enumerable});return r};var os=(r,e,t)=>(t=r!=null?gD(wD(r)):{},Qp(e||!r||!r.__esModule?Ui(t,"default",{value:r,enumerable:!0}):t,r)),ED=r=>Qp(Ui({},"__esModule",{value:!0}),r);var J=(r,e,t)=>new Promise((n,s)=>{var a=c=>{try{l(t.next(c))}catch(f){s(f)}},o=c=>{try{l(t.throw(c))}catch(f){s(f)}},l=c=>c.done?n(c.value):Promise.resolve(c.value).then(a,o);l((t=t.apply(r,e)).next())});var Fe=O(Cn=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});Cn.matchAnyPattern=Cn.extractTerms=Cn.repeatedTimeunitPattern=void 0;function RD(r,e){let t=e.replace(/\((?!\?)/g,"(?:");return`${r}${t}\\s{0,5}(?:,?\\s{0,5}${t}){0,10}`}Cn.repeatedTimeunitPattern=RD;function Jp(r){let e;return r instanceof Array?e=[...r]:r instanceof Map?e=Array.from(r.keys()):e=Object.keys(r),e}Cn.extractTerms=Jp;function xD(r){return`(?:${Jp(r).sort((t,n)=>n.length-t.length).join("|").replace(/\./g,"\\.")})`}Cn.matchAnyPattern=xD});var xe=O((xl,Pl)=>{(function(r,e){typeof xl=="object"&&typeof Pl!="undefined"?Pl.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs=e()})(xl,function(){"use strict";var r=1e3,e=6e4,t=36e5,n="millisecond",s="second",a="minute",o="hour",l="day",c="week",f="month",m="quarter",g="year",T="date",S="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,R=/\[([^\]]+)]|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,C={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("_")},$=function(V,q,P){var Q=String(V);return!Q||Q.length>=q?V:""+Array(q+1-Q.length).join(P)+V},B={s:$,z:function(V){var q=-V.utcOffset(),P=Math.abs(q),Q=Math.floor(P/60),Y=P%60;return(q<=0?"+":"-")+$(Q,2,"0")+":"+$(Y,2,"0")},m:function V(q,P){if(q.date()<P.date())return-V(P,q);var Q=12*(P.year()-q.year())+(P.month()-q.month()),Y=q.clone().add(Q,f),oe=P-Y<0,y=q.clone().add(Q+(oe?-1:1),f);return+(-(Q+(P-Y)/(oe?Y-y:y-Y))||0)},a:function(V){return V<0?Math.ceil(V)||0:Math.floor(V)},p:function(V){return{M:f,y:g,w:c,d:l,D:T,h:o,m:a,s,ms:n,Q:m}[V]||String(V||"").toLowerCase().replace(/s$/,"")},u:function(V){return V===void 0}},W="en",De={};De[W]=C;var Te=function(V){return V instanceof Ft},be=function(V,q,P){var Q;if(!V)return W;if(typeof V=="string")De[V]&&(Q=V),q&&(De[V]=q,Q=V);else{var Y=V.name;De[Y]=V,Q=Y}return!P&&Q&&(W=Q),Q||!P&&W},ee=function(V,q){if(Te(V))return V.clone();var P=typeof q=="object"?q:{};return P.date=V,P.args=arguments,new Ft(P)},te=B;te.l=be,te.i=Te,te.w=function(V,q){return ee(V,{locale:q.$L,utc:q.$u,x:q.$x,$offset:q.$offset})};var Ft=function(){function V(P){this.$L=be(P.locale,null,!0),this.parse(P)}var q=V.prototype;return q.parse=function(P){this.$d=function(Q){var Y=Q.date,oe=Q.utc;if(Y===null)return new Date(NaN);if(te.u(Y))return new Date;if(Y instanceof Date)return new Date(Y);if(typeof Y=="string"&&!/Z$/i.test(Y)){var y=Y.match(v);if(y){var _=y[2]-1||0,w=(y[7]||"0").substring(0,3);return oe?new Date(Date.UTC(y[1],_,y[3]||1,y[4]||0,y[5]||0,y[6]||0,w)):new Date(y[1],_,y[3]||1,y[4]||0,y[5]||0,y[6]||0,w)}}return new Date(Y)}(P),this.$x=P.x||{},this.init()},q.init=function(){var P=this.$d;this.$y=P.getFullYear(),this.$M=P.getMonth(),this.$D=P.getDate(),this.$W=P.getDay(),this.$H=P.getHours(),this.$m=P.getMinutes(),this.$s=P.getSeconds(),this.$ms=P.getMilliseconds()},q.$utils=function(){return te},q.isValid=function(){return this.$d.toString()!==S},q.isSame=function(P,Q){var Y=ee(P);return this.startOf(Q)<=Y&&Y<=this.endOf(Q)},q.isAfter=function(P,Q){return ee(P)<this.startOf(Q)},q.isBefore=function(P,Q){return this.endOf(Q)<ee(P)},q.$g=function(P,Q,Y){return te.u(P)?this[Q]:this.set(Y,P)},q.unix=function(){return Math.floor(this.valueOf()/1e3)},q.valueOf=function(){return this.$d.getTime()},q.startOf=function(P,Q){var Y=this,oe=!!te.u(Q)||Q,y=te.p(P),_=function(N,j){var ke=te.w(Y.$u?Date.UTC(Y.$y,j,N):new Date(Y.$y,j,N),Y);return oe?ke:ke.endOf(l)},w=function(N,j){return te.w(Y.toDate()[N].apply(Y.toDate("s"),(oe?[0,0,0,0]:[23,59,59,999]).slice(j)),Y)},D=this.$W,E=this.$M,M=this.$D,k="set"+(this.$u?"UTC":"");switch(y){case g:return oe?_(1,0):_(31,11);case f:return oe?_(1,E):_(0,E+1);case c:var I=this.$locale().weekStart||0,A=(D<I?D+7:D)-I;return _(oe?M-A:M+(6-A),E);case l:case T:return w(k+"Hours",0);case o:return w(k+"Minutes",1);case a:return w(k+"Seconds",2);case s:return w(k+"Milliseconds",3);default:return this.clone()}},q.endOf=function(P){return this.startOf(P,!1)},q.$set=function(P,Q){var Y,oe=te.p(P),y="set"+(this.$u?"UTC":""),_=(Y={},Y[l]=y+"Date",Y[T]=y+"Date",Y[f]=y+"Month",Y[g]=y+"FullYear",Y[o]=y+"Hours",Y[a]=y+"Minutes",Y[s]=y+"Seconds",Y[n]=y+"Milliseconds",Y)[oe],w=oe===l?this.$D+(Q-this.$W):Q;if(oe===f||oe===g){var D=this.clone().set(T,1);D.$d[_](w),D.init(),this.$d=D.set(T,Math.min(this.$D,D.daysInMonth())).$d}else _&&this.$d[_](w);return this.init(),this},q.set=function(P,Q){return this.clone().$set(P,Q)},q.get=function(P){return this[te.p(P)]()},q.add=function(P,Q){var Y,oe=this;P=Number(P);var y=te.p(Q),_=function(E){var M=ee(oe);return te.w(M.date(M.date()+Math.round(E*P)),oe)};if(y===f)return this.set(f,this.$M+P);if(y===g)return this.set(g,this.$y+P);if(y===l)return _(1);if(y===c)return _(7);var w=(Y={},Y[a]=e,Y[o]=t,Y[s]=r,Y)[y]||1,D=this.$d.getTime()+P*w;return te.w(D,this)},q.subtract=function(P,Q){return this.add(-1*P,Q)},q.format=function(P){var Q=this,Y=this.$locale();if(!this.isValid())return Y.invalidDate||S;var oe=P||"YYYY-MM-DDTHH:mm:ssZ",y=te.z(this),_=this.$H,w=this.$m,D=this.$M,E=Y.weekdays,M=Y.months,k=function(j,ke,pe,le){return j&&(j[ke]||j(Q,oe))||pe[ke].substr(0,le)},I=function(j){return te.s(_%12||12,j,"0")},A=Y.meridiem||function(j,ke,pe){var le=j<12?"AM":"PM";return pe?le.toLowerCase():le},N={YY:String(this.$y).slice(-2),YYYY:this.$y,M:D+1,MM:te.s(D+1,2,"0"),MMM:k(Y.monthsShort,D,M,3),MMMM:k(M,D),D:this.$D,DD:te.s(this.$D,2,"0"),d:String(this.$W),dd:k(Y.weekdaysMin,this.$W,E,2),ddd:k(Y.weekdaysShort,this.$W,E,3),dddd:E[this.$W],H:String(_),HH:te.s(_,2,"0"),h:I(1),hh:I(2),a:A(_,w,!0),A:A(_,w,!1),m:String(w),mm:te.s(w,2,"0"),s:String(this.$s),ss:te.s(this.$s,2,"0"),SSS:te.s(this.$ms,3,"0"),Z:y};return oe.replace(R,function(j,ke){return ke||N[j]||y.replace(":","")})},q.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},q.diff=function(P,Q,Y){var oe,y=te.p(Q),_=ee(P),w=(_.utcOffset()-this.utcOffset())*e,D=this-_,E=te.m(this,_);return E=(oe={},oe[g]=E/12,oe[f]=E,oe[m]=E/3,oe[c]=(D-w)/6048e5,oe[l]=(D-w)/864e5,oe[o]=D/t,oe[a]=D/e,oe[s]=D/r,oe)[y]||D,Y?E:te.a(E)},q.daysInMonth=function(){return this.endOf(f).$D},q.$locale=function(){return De[this.$L]},q.locale=function(P,Q){if(!P)return this.$L;var Y=this.clone(),oe=be(P,Q,!0);return oe&&(Y.$L=oe),Y},q.clone=function(){return te.w(this.$d,this)},q.toDate=function(){return new Date(this.valueOf())},q.toJSON=function(){return this.isValid()?this.toISOString():null},q.toISOString=function(){return this.$d.toISOString()},q.toString=function(){return this.$d.toUTCString()},V}(),gt=Ft.prototype;return ee.prototype=gt,[["$ms",n],["$s",s],["$m",a],["$H",o],["$W",l],["$M",f],["$y",g],["$D",T]].forEach(function(V){gt[V[1]]=function(q){return this.$g(q,V[0],V[1])}}),ee.extend=function(V,q){return V.$i||(V(q,Ft,ee),V.$i=!0),ee},ee.locale=be,ee.isDayjs=Te,ee.unix=function(V){return ee(1e3*V)},ee.en=De[W],ee.Ls=De,ee.p={},ee})});var xt=O(In=>{"use strict";var PD=In&&In.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(In,"__esModule",{value:!0});In.findYearClosestToRef=In.findMostLikelyADYear=void 0;var AD=PD(xe());function ND(r){return r<100&&(r>50?r=r+1900:r=r+2e3),r}In.findMostLikelyADYear=ND;function CD(r,e,t){let n=AD.default(r),s=n;s=s.month(t-1),s=s.date(e),s=s.year(n.year());let a=s.add(1,"y"),o=s.add(-1,"y");return Math.abs(a.diff(n))<Math.abs(s.diff(n))?s=a:Math.abs(o.diff(n))<Math.abs(s.diff(n))&&(s=o),s.year()}In.findYearClosestToRef=CD});var Pt=O(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.parseTimeUnits=ye.TIME_UNITS_PATTERN=ye.parseYear=ye.YEAR_PATTERN=ye.parseOrdinalNumberPattern=ye.ORDINAL_NUMBER_PATTERN=ye.parseNumberPattern=ye.NUMBER_PATTERN=ye.TIME_UNIT_DICTIONARY=ye.ORDINAL_WORD_DICTIONARY=ye.INTEGER_WORD_DICTIONARY=ye.MONTH_DICTIONARY=ye.FULL_MONTH_NAME_DICTIONARY=ye.WEEKDAY_DICTIONARY=void 0;var So=Fe(),ID=xt();ye.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};ye.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};ye.MONTH_DICTIONARY=Object.assign(Object.assign({},ye.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});ye.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};ye.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};ye.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"};ye.NUMBER_PATTERN=`(?:${So.matchAnyPattern(ye.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 tm(r){let e=r.toLowerCase();return ye.INTEGER_WORD_DICTIONARY[e]!==void 0?ye.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)}ye.parseNumberPattern=tm;ye.ORDINAL_NUMBER_PATTERN=`(?:${So.matchAnyPattern(ye.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:st|nd|rd|th)?)`;function FD(r){let e=r.toLowerCase();return ye.ORDINAL_WORD_DICTIONARY[e]!==void 0?ye.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}ye.parseOrdinalNumberPattern=FD;ye.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 LD(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 ID.findMostLikelyADYear(e)}ye.parseYear=LD;var rm=`(${ye.NUMBER_PATTERN})\\s{0,3}(${So.matchAnyPattern(ye.TIME_UNIT_DICTIONARY)})`,em=new RegExp(rm,"i");ye.TIME_UNITS_PATTERN=So.repeatedTimeunitPattern("(?:(?:about|around)\\s{0,3})?",rm);function YD(r){let e={},t=r,n=em.exec(t);for(;n;)UD(e,n),t=t.substring(n[0].length).trim(),n=em.exec(t);return e}ye.parseTimeUnits=YD;function UD(r,e){let t=tm(e[1]),n=ye.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var nm=O((Al,Nl)=>{(function(r,e){typeof Al=="object"&&typeof Nl!="undefined"?Nl.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs_plugin_quarterOfYear=e()})(Al,function(){"use strict";var r="month",e="quarter";return function(t,n){var s=n.prototype;s.quarter=function(l){return this.$utils().u(l)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(l-1))};var a=s.add;s.add=function(l,c){return l=Number(l),this.$utils().p(c)===e?this.add(3*l,r):a.bind(this)(l,c)};var o=s.startOf;s.startOf=function(l,c){var f=this.$utils(),m=!!f.u(c)||c;if(f.p(l)===e){var g=this.quarter()-1;return m?this.month(3*g).startOf(r).startOf("day"):this.month(3*g+2).endOf(r).endOf("day")}return o.bind(this)(l,c)}}})});var yr=O(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.implySimilarTime=Wr.assignSimilarTime=Wr.assignSimilarDate=Wr.assignTheNextDay=void 0;var sm=mt();function WD(r,e){e=e.add(1,"day"),im(r,e),am(r,e)}Wr.assignTheNextDay=WD;function im(r,e){r.assign("day",e.date()),r.assign("month",e.month()+1),r.assign("year",e.year())}Wr.assignSimilarDate=im;function qD(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",sm.Meridiem.AM):r.assign("meridiem",sm.Meridiem.PM)}Wr.assignSimilarTime=qD;function am(r,e){r.imply("hour",e.hour()),r.imply("minute",e.minute()),r.imply("second",e.second()),r.imply("millisecond",e.millisecond())}Wr.implySimilarTime=am});var om=O(us=>{"use strict";Object.defineProperty(us,"__esModule",{value:!0});us.toTimezoneOffset=us.TIMEZONE_ABBR_MAP=void 0;us.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 jD(r){var e;return r==null?null:typeof r=="number"?r:(e=us.TIMEZONE_ABBR_MAP[r])!==null&&e!==void 0?e:null}us.toTimezoneOffset=jD});var rt=O(qr=>{"use strict";var um=qr&&qr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(qr,"__esModule",{value:!0});qr.ParsingResult=qr.ParsingComponents=qr.ReferenceWithTimezone=void 0;var $D=um(nm()),Oo=um(xe()),Cl=yr(),GD=om();Oo.default.extend($D.default);var Il=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=GD.toTimezoneOffset(e.timezone))}};qr.ReferenceWithTimezone=Il;var ls=class{constructor(e,t){if(this.reference=e,this.knownValues={},this.impliedValues={},t)for(let s in t)this.knownValues[s]=t[s];let n=Oo.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 ls(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 Oo.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 s=-e.getTimezoneOffset(),a=(n=(t=this.get("timezoneOffset"))!==null&&t!==void 0?t:this.reference.timezoneOffset)!==null&&n!==void 0?n:s;return s-a}static createRelativeFromReference(e,t){let n=Oo.default(e.instant);for(let a in t)n=n.add(t[a],a);let s=new ls(e);return t.hour||t.minute||t.second?(Cl.assignSimilarTime(s,n),Cl.assignSimilarDate(s,n),e.timezoneOffset!==null&&s.assign("timezoneOffset",-e.instant.getTimezoneOffset())):(Cl.implySimilarTime(s,n),e.timezoneOffset!==null&&s.imply("timezoneOffset",-e.instant.getTimezoneOffset()),t.d?(s.assign("day",n.date()),s.assign("month",n.month()+1),s.assign("year",n.year())):(t.week&&s.imply("weekday",n.day()),s.imply("day",n.date()),t.month?(s.assign("month",n.month()+1),s.assign("year",n.year())):(s.imply("month",n.month()+1),t.year?s.assign("year",n.year()):s.imply("year",n.year())))),s}};qr.ParsingComponents=ls;var Wi=class{constructor(e,t,n,s,a){this.reference=e,this.refDate=e.instant,this.index=t,this.text=n,this.start=s||new ls(e),this.end=a}clone(){let e=new Wi(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}', ...}]`}};qr.ParsingResult=Wi});var Z=O(Mo=>{"use strict";Object.defineProperty(Mo,"__esModule",{value:!0});Mo.AbstractParserWithWordBoundaryChecking=void 0;var Fl=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 s=(n=t[1])!==null&&n!==void 0?n:"";t.index=t.index+s.length,t[0]=t[0].substring(s.length);for(let a=2;a<t.length;a++)t[a-1]=t[a];return this.innerExtract(e,t)}};Mo.AbstractParserWithWordBoundaryChecking=Fl});var lm=O(Ul=>{"use strict";Object.defineProperty(Ul,"__esModule",{value:!0});var Yl=Pt(),BD=rt(),HD=Z(),zD=new RegExp(`(?:within|in|for)\\s*(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${Yl.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),VD=new RegExp(`(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${Yl.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Ll=class extends HD.AbstractParserWithWordBoundaryChecking{innerPattern(e){return e.option.forwardDate?VD:zD}innerExtract(e,t){let n=Yl.parseTimeUnits(t[1]);return BD.ParsingComponents.createRelativeFromReference(e.reference,n)}};Ul.default=Ll});var mm=O(ql=>{"use strict";Object.defineProperty(ql,"__esModule",{value:!0});var KD=xt(),hm=Pt(),pm=Pt(),Ro=Pt(),ZD=Fe(),XD=Z(),QD=new RegExp(`(?:on\\s{0,3})?(${Ro.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:to|\\-|\\\u2013|until|through|till)?\\s{0,3}(${Ro.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s{0,3}(?:of)?\\s{0,3})(${ZD.matchAnyPattern(hm.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s{0,3})(${pm.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),cm=1,dm=2,JD=3,fm=4,Wl=class extends XD.AbstractParserWithWordBoundaryChecking{innerPattern(){return QD}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=hm.MONTH_DICTIONARY[t[JD].toLowerCase()],a=Ro.parseOrdinalNumberPattern(t[cm]);if(a>31)return t.index=t.index+t[cm].length,null;if(n.start.assign("month",s),n.start.assign("day",a),t[fm]){let o=pm.parseYear(t[fm]);n.start.assign("year",o)}else{let o=KD.findYearClosestToRef(e.refDate,a,s);n.start.imply("year",o)}if(t[dm]){let o=Ro.parseOrdinalNumberPattern(t[dm]);n.end=n.start.clone(),n.end.assign("day",o)}return n}};ql.default=Wl});var bm=O($l=>{"use strict";Object.defineProperty($l,"__esModule",{value:!0});var ek=xt(),_m=Pt(),xo=Pt(),Tm=Pt(),tk=Fe(),rk=Z(),nk=new RegExp(`(${tk.matchAnyPattern(_m.MONTH_DICTIONARY)})(?:-|/|\\s*,?\\s*)(${xo.ORDINAL_NUMBER_PATTERN})(?!\\s*(?:am|pm))\\s*(?:(?:to|\\-)\\s*(${xo.ORDINAL_NUMBER_PATTERN})\\s*)?(?:(?:-|/|\\s*,?\\s*)(${Tm.YEAR_PATTERN}))?(?=\\W|$)(?!\\:\\d)`,"i"),sk=1,ik=2,ym=3,gm=4,jl=class extends rk.AbstractParserWithWordBoundaryChecking{innerPattern(){return nk}innerExtract(e,t){let n=_m.MONTH_DICTIONARY[t[sk].toLowerCase()],s=xo.parseOrdinalNumberPattern(t[ik]);if(s>31)return null;let a=e.createParsingComponents({day:s,month:n});if(t[gm]){let c=Tm.parseYear(t[gm]);a.assign("year",c)}else{let c=ek.findYearClosestToRef(e.refDate,s,n);a.imply("year",c)}if(!t[ym])return a;let o=xo.parseOrdinalNumberPattern(t[ym]),l=e.createParsingResult(t.index,t[0]);return l.start=a,l.end=a.clone(),l.end.assign("day",o),l}};$l.default=jl});var Dm=O(Hl=>{"use strict";Object.defineProperty(Hl,"__esModule",{value:!0});var Gl=Pt(),ak=xt(),ok=Fe(),wm=Pt(),uk=Z(),lk=new RegExp(`((?:in)\\s*)?(${ok.matchAnyPattern(Gl.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${wm.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),ck=1,dk=2,vm=3,Bl=class extends uk.AbstractParserWithWordBoundaryChecking{innerPattern(){return lk}innerExtract(e,t){let n=t[dk].toLowerCase();if(t[0].length<=3&&!Gl.FULL_MONTH_NAME_DICTIONARY[n])return null;let s=e.createParsingResult(t.index+(t[ck]||"").length,t.index+t[0].length);s.start.imply("day",1);let a=Gl.MONTH_DICTIONARY[n];if(s.start.assign("month",a),t[vm]){let o=wm.parseYear(t[vm]);s.start.assign("year",o)}else{let o=ak.findYearClosestToRef(e.refDate,1,a);s.start.imply("year",o)}return s}};Hl.default=Bl});var Sm=O(Vl=>{"use strict";Object.defineProperty(Vl,"__esModule",{value:!0});var Em=Pt(),fk=Fe(),hk=Z(),pk=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${fk.matchAnyPattern(Em.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),mk=1,yk=2,km=3,gk=4,zl=class extends hk.AbstractParserWithWordBoundaryChecking{innerPattern(){return pk}innerExtract(e,t){let n=t[km]?parseInt(t[km]):Em.MONTH_DICTIONARY[t[yk].toLowerCase()];if(n<1||n>12)return null;let s=parseInt(t[mk]);return{day:parseInt(t[gk]),month:n,year:s}}};Vl.default=zl});var Om=O(Zl=>{"use strict";Object.defineProperty(Zl,"__esModule",{value:!0});var _k=Z(),Tk=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),bk=1,vk=2,Kl=class extends _k.AbstractParserWithWordBoundaryChecking{innerPattern(){return Tk}innerExtract(e,t){let n=parseInt(t[vk]),s=parseInt(t[bk]);return e.createParsingComponents().imply("day",1).assign("month",s).assign("year",n)}};Zl.default=Kl});var cs=O(No=>{"use strict";Object.defineProperty(No,"__esModule",{value:!0});No.AbstractTimeExpressionParser=void 0;var Bt=mt();function wk(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 Dk(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 Mm=2,Gs=3,Po=4,Ao=5,qi=6,Xl=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 s=t.index+t[1].length,a=t[0].substring(t[1].length),o=e.createParsingResult(s,a,n);t.index+=t[0].length;let l=e.text.substring(t.index),f=this.getFollowingTimePatternThroughCache().exec(l);return a.match(/^\d{3,4}/)&&f&&f[0].match(/^\s*([+-])\s*\d{2,4}$/)?null:!f||f[0].match(/^\s*([+-])\s*\d{3,4}$/)?this.checkAndReturnWithoutFollowingPattern(o):(o.end=this.extractFollowingTimeComponents(e,f,o),o.end&&(o.text+=f[0]),this.checkAndReturnWithFollowingPattern(o))}extractPrimaryTimeComponents(e,t,n=!1){let s=e.createParsingComponents(),a=0,o=null,l=parseInt(t[Mm]);if(l>100){if(this.strictMode||t[Gs]!=null)return null;a=l%100,l=Math.floor(l/100)}if(l>24)return null;if(t[Gs]!=null){if(t[Gs].length==1&&!t[qi])return null;a=parseInt(t[Gs])}if(a>=60)return null;if(l>12&&(o=Bt.Meridiem.PM),t[qi]!=null){if(l>12)return null;let c=t[qi][0].toLowerCase();c=="a"&&(o=Bt.Meridiem.AM,l==12&&(l=0)),c=="p"&&(o=Bt.Meridiem.PM,l!=12&&(l+=12))}if(s.assign("hour",l),s.assign("minute",a),o!==null?s.assign("meridiem",o):l<12?s.imply("meridiem",Bt.Meridiem.AM):s.imply("meridiem",Bt.Meridiem.PM),t[Ao]!=null){let c=parseInt(t[Ao].substring(0,3));if(c>=1e3)return null;s.assign("millisecond",c)}if(t[Po]!=null){let c=parseInt(t[Po]);if(c>=60)return null;s.assign("second",c)}return s}extractFollowingTimeComponents(e,t,n){let s=e.createParsingComponents();if(t[Ao]!=null){let c=parseInt(t[Ao].substring(0,3));if(c>=1e3)return null;s.assign("millisecond",c)}if(t[Po]!=null){let c=parseInt(t[Po]);if(c>=60)return null;s.assign("second",c)}let a=parseInt(t[Mm]),o=0,l=-1;if(t[Gs]!=null?o=parseInt(t[Gs]):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(l=Bt.Meridiem.PM),t[qi]!=null){if(a>12)return null;let c=t[qi][0].toLowerCase();c=="a"&&(l=Bt.Meridiem.AM,a==12&&(a=0,s.isCertain("day")||s.imply("day",s.get("day")+1))),c=="p"&&(l=Bt.Meridiem.PM,a!=12&&(a+=12)),n.start.isCertain("meridiem")||(l==Bt.Meridiem.AM?(n.start.imply("meridiem",Bt.Meridiem.AM),n.start.get("hour")==12&&n.start.assign("hour",0)):(n.start.imply("meridiem",Bt.Meridiem.PM),n.start.get("hour")!=12&&n.start.assign("hour",n.start.get("hour")+12)))}return s.assign("hour",a),s.assign("minute",o),l>=0?s.assign("meridiem",l):n.start.isCertain("meridiem")&&n.start.get("hour")>12?n.start.get("hour")-12>a?s.imply("meridiem",Bt.Meridiem.AM):a<=12&&(s.assign("hour",a+12),s.assign("meridiem",Bt.Meridiem.PM)):a>12?s.imply("meridiem",Bt.Meridiem.PM):a<=12&&s.imply("meridiem",Bt.Meridiem.AM),s.date().getTime()<n.start.date().getTime()&&s.imply("day",s.get("day")+1),s}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],s=t[2];if(s.includes(".")&&!s.match(/\d(\.\d{2})+$/))return null;let a=parseInt(s),o=parseInt(n);if(a>24||o>24)return null}return e}getPrimaryTimePatternThroughCache(){let e=this.primaryPrefix(),t=this.primarySuffix();return this.cachedPrimaryPrefix===e&&this.cachedPrimarySuffix===t?this.cachedPrimaryTimePattern:(this.cachedPrimaryTimePattern=wk(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=Dk(e,t),this.cachedFollowingPhase=e,this.cachedFollowingSuffix=t,this.cachedFollowingTimePatten)}};No.AbstractTimeExpressionParser=Xl});var Rm=O(Jl=>{"use strict";Object.defineProperty(Jl,"__esModule",{value:!0});var Co=mt(),kk=cs(),Ql=class extends kk.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 s=n.get("hour");s>=6&&s<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",Co.Meridiem.PM)):s<6&&n.assign("meridiem",Co.Meridiem.AM)}if(t[0].endsWith("afternoon")){n.assign("meridiem",Co.Meridiem.PM);let s=n.get("hour");s>=0&&s<=6&&n.assign("hour",n.get("hour")+12)}t[0].endsWith("morning")&&(n.assign("meridiem",Co.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};Jl.default=Ql});var gr=O(Bs=>{"use strict";Object.defineProperty(Bs,"__esModule",{value:!0});Bs.addImpliedTimeUnits=Bs.reverseTimeUnits=void 0;function Ek(r){let e={};for(let t in r)e[t]=-r[t];return e}Bs.reverseTimeUnits=Ek;function Sk(r,e){let t=r.clone(),n=r.dayjs();for(let s in e)n=n.add(e[s],s);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}Bs.addImpliedTimeUnits=Sk});var xm=O(rc=>{"use strict";Object.defineProperty(rc,"__esModule",{value:!0});var tc=Pt(),Ok=rt(),Mk=Z(),Rk=gr(),xk=new RegExp(`(${tc.TIME_UNITS_PATTERN})\\s{0,5}(?:ago|before|earlier)(?=(?:\\W|$))`,"i"),Pk=new RegExp(`(${tc.TIME_UNITS_PATTERN})\\s{0,5}ago(?=(?:\\W|$))`,"i"),ec=class extends Mk.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?Pk:xk}innerExtract(e,t){let n=tc.parseTimeUnits(t[1]),s=Rk.reverseTimeUnits(n);return Ok.ParsingComponents.createRelativeFromReference(e.reference,s)}};rc.default=ec});var Pm=O(ic=>{"use strict";Object.defineProperty(ic,"__esModule",{value:!0});var sc=Pt(),Ak=rt(),Nk=Z(),Ck=new RegExp(`(${sc.TIME_UNITS_PATTERN})\\s{0,5}(?:later|after|from now|henceforth|forward|out)(?=(?:\\W|$))`,"i"),Ik=new RegExp("("+sc.TIME_UNITS_PATTERN+")(later|from now)(?=(?:\\W|$))","i"),Fk=1,nc=class extends Nk.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?Ik:Ck}innerExtract(e,t){let n=sc.parseTimeUnits(t[Fk]);return Ak.ParsingComponents.createRelativeFromReference(e.reference,n)}};ic.default=nc});var zs=O(Hs=>{"use strict";Object.defineProperty(Hs,"__esModule",{value:!0});Hs.MergingRefiner=Hs.Filter=void 0;var ac=class{refine(e,t){return t.filter(n=>this.isValid(e,n))}};Hs.Filter=ac;var oc=class{refine(e,t){if(t.length<2)return t;let n=[],s=t[0],a=null;for(let o=1;o<t.length;o++){a=t[o];let l=e.text.substring(s.index+s.text.length,a.index);if(!this.shouldMergeResults(l,s,a,e))n.push(s),s=a;else{let c=s,f=a,m=this.mergeResults(l,c,f,e);e.debug(()=>{console.log(`${this.constructor.name} merged ${c} and ${f} into ${m}`)}),s=m}}return s!=null&&n.push(s),n}};Hs.MergingRefiner=oc});var jr=O(lc=>{"use strict";Object.defineProperty(lc,"__esModule",{value:!0});var Lk=zs(),uc=class extends Lk.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(a=>{t.start.isCertain(a)||t.start.assign(a,n.start.get(a))}),t.start.getCertainComponents().forEach(a=>{n.start.isCertain(a)||n.start.assign(a,t.start.get(a))})),t.start.date().getTime()>n.start.date().getTime()){let a=t.start.dayjs(),o=n.start.dayjs();t.start.isOnlyWeekdayComponent()&&a.add(-7,"days").isBefore(o)?(a=a.add(-7,"days"),t.start.imply("day",a.date()),t.start.imply("month",a.month()+1),t.start.imply("year",a.year())):n.start.isOnlyWeekdayComponent()&&o.add(7,"days").isAfter(a)?(o=o.add(7,"days"),n.start.imply("day",o.date()),n.start.imply("month",o.month()+1),n.start.imply("year",o.year())):[n,t]=[t,n]}let s=t.clone();return s.start=t.start,s.end=n.start,s.index=Math.min(t.index,n.index),t.index<n.index?s.text=t.text+e+n.text:s.text=n.text+e+t.text,s}};lc.default=uc});var Am=O(ji=>{"use strict";var Yk=ji&&ji.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ji,"__esModule",{value:!0});var Uk=Yk(jr()),cc=class extends Uk.default{patternBetween(){return/^\s*(to|-)\s*$/i}};ji.default=cc});var Nm=O(Vs=>{"use strict";Object.defineProperty(Vs,"__esModule",{value:!0});Vs.mergeDateTimeComponent=Vs.mergeDateTimeResult=void 0;var Wk=mt();function qk(r,e){let t=r.clone(),n=r.start,s=e.start;if(t.start=dc(n,s),r.end!=null||e.end!=null){let a=r.end==null?r.start:r.end,o=e.end==null?e.start:e.end,l=dc(a,o);r.end==null&&l.date().getTime()<t.start.date().getTime()&&(l.isCertain("day")?l.assign("day",l.get("day")+1):l.imply("day",l.get("day")+1)),t.end=l}return t}Vs.mergeDateTimeResult=qk;function dc(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")==Wk.Meridiem.PM&&t.get("hour")<12&&(e.isCertain("hour")?t.assign("hour",t.get("hour")+12):t.imply("hour",t.get("hour")+12)),t}Vs.mergeDateTimeComponent=dc});var an=O(hc=>{"use strict";Object.defineProperty(hc,"__esModule",{value:!0});var jk=zs(),Cm=Nm(),fc=class extends jk.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 s=t.start.isOnlyDate()?Cm.mergeDateTimeResult(t,n):Cm.mergeDateTimeResult(n,t);return s.index=t.index,s.text=t.text+e+n.text,s}};hc.default=fc});var Im=O($i=>{"use strict";var $k=$i&&$i.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($i,"__esModule",{value:!0});var Gk=$k(an()),pc=class extends Gk.default{patternBetween(){return new RegExp("^\\s*(T|at|after|before|on|of|,|-)?\\s*$")}};$i.default=pc});var Fm=O(yc=>{"use strict";Object.defineProperty(yc,"__esModule",{value:!0});var Bk=new RegExp("^\\s*,?\\s*\\(?([A-Z]{2,4})\\)?(?=\\W|$)","i"),Hk={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},mc=class{constructor(e){this.timezone=Object.assign(Object.assign({},Hk),e)}refine(e,t){var n;let s=(n=e.option.timezones)!==null&&n!==void 0?n:{};return t.forEach(a=>{var o,l;let c=e.text.substring(a.index+a.text.length),f=Bk.exec(c);if(!f)return;let m=f[1].toUpperCase(),g=(l=(o=s[m])!==null&&o!==void 0?o:this.timezone[m])!==null&&l!==void 0?l:null;if(g===null)return;e.debug(()=>{console.log(`Extracting timezone: '${m}' into: ${g} for: ${a.start}`)});let T=a.start.get("timezoneOffset");T!==null&&g!=T&&(a.start.isCertain("timezoneOffset")||m!=f[1])||a.start.isOnlyDate()&&m!=f[1]||(a.text+=f[0],a.start.isCertain("timezoneOffset")||a.start.assign("timezoneOffset",g),a.end!=null&&!a.end.isCertain("timezoneOffset")&&a.end.assign("timezoneOffset",g))}),t}};yc.default=mc});var Io=O(_c=>{"use strict";Object.defineProperty(_c,"__esModule",{value:!0});var zk=new RegExp("^\\s*(?:\\(?(?:GMT|UTC)\\s?)?([+-])(\\d{1,2})(?::?(\\d{2}))?\\)?","i"),Vk=1,Kk=2,Zk=3,gc=class{refine(e,t){return t.forEach(function(n){if(n.start.isCertain("timezoneOffset"))return;let s=e.text.substring(n.index+n.text.length),a=zk.exec(s);if(!a)return;e.debug(()=>{console.log(`Extracting timezone: '${a[0]}' into : ${n}`)});let o=parseInt(a[Kk]),l=parseInt(a[Zk]||"0"),c=o*60+l;c>14*60||(a[Vk]==="-"&&(c=-c),n.end!=null&&n.end.assign("timezoneOffset",c),n.start.assign("timezoneOffset",c),n.text+=a[0])}),t}};_c.default=gc});var Lm=O(bc=>{"use strict";Object.defineProperty(bc,"__esModule",{value:!0});var Tc=class{refine(e,t){if(t.length<2)return t;let n=[],s=t[0];for(let a=1;a<t.length;a++){let o=t[a];o.index<s.index+s.text.length?o.text.length>s.text.length&&(s=o):(n.push(s),s=o)}return s!=null&&n.push(s),n}};bc.default=Tc});var Ym=O(Gi=>{"use strict";var Xk=Gi&&Gi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Gi,"__esModule",{value:!0});var Qk=Xk(xe()),vc=class{refine(e,t){return e.option.forwardDate&&t.forEach(function(n){let s=Qk.default(e.refDate);if(n.start.isOnlyDayMonthComponent()&&s.isAfter(n.start.dayjs()))for(let a=0;a<3&&s.isAfter(n.start.dayjs());a++)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()&&s.isAfter(n.start.dayjs())&&(s.day()>=n.start.get("weekday")?s=s.day(n.start.get("weekday")+7):s=s.day(n.start.get("weekday")),n.start.imply("day",s.date()),n.start.imply("month",s.month()+1),n.start.imply("year",s.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.start})`)}),n.end&&n.end.isOnlyWeekdayComponent()&&(s.day()>n.end.get("weekday")?s=s.day(n.end.get("weekday")+7):s=s.day(n.end.get("weekday")),n.end.imply("day",s.date()),n.end.imply("month",s.month()+1),n.end.imply("year",s.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.end})`)})))}),t}};Gi.default=vc});var Um=O(Dc=>{"use strict";Object.defineProperty(Dc,"__esModule",{value:!0});var Jk=zs(),wc=class extends Jk.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}};Dc.default=wc});var Sc=O(Ec=>{"use strict";Object.defineProperty(Ec,"__esModule",{value:!0});var eE=Z(),tE=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"),rE=1,nE=2,sE=3,Wm=4,iE=5,qm=6,jm=7,$m=8,Gm=9,kc=class extends eE.AbstractParserWithWordBoundaryChecking{innerPattern(){return tE}innerExtract(e,t){let n={};if(n.year=parseInt(t[rE]),n.month=parseInt(t[nE]),n.day=parseInt(t[sE]),t[Wm]!=null)if(n.hour=parseInt(t[Wm]),n.minute=parseInt(t[iE]),t[qm]!=null&&(n.second=parseInt(t[qm])),t[jm]!=null&&(n.millisecond=parseInt(t[jm])),t[$m]==null)n.timezoneOffset=0;else{let s=parseInt(t[$m]),a=0;t[Gm]!=null&&(a=parseInt(t[Gm]));let o=s*60;o<0?o-=a:o+=a,n.timezoneOffset=o}return n}};Ec.default=kc});var Bm=O(Mc=>{"use strict";Object.defineProperty(Mc,"__esModule",{value:!0});var aE=zs(),Oc=class extends aE.MergingRefiner{mergeResults(e,t,n){let s=n.clone();return s.index=t.index,s.text=t.text+e+s.text,s.start.assign("weekday",t.start.get("weekday")),s.end&&s.end.assign("weekday",t.start.get("weekday")),s}shouldMergeResults(e,t,n){return t.start.isOnlyWeekdayComponent()&&!t.start.isCertain("hour")&&n.start.isCertain("day")&&e.match(/^,?\s*$/)!=null}};Mc.default=Oc});var on=O(Ks=>{"use strict";var ds=Ks&&Ks.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ks,"__esModule",{value:!0});Ks.includeCommonConfiguration=void 0;var oE=ds(Fm()),uE=ds(Io()),Hm=ds(Lm()),lE=ds(Ym()),cE=ds(Um()),dE=ds(Sc()),fE=ds(Bm());function hE(r,e=!1){return r.parsers.unshift(new dE.default),r.refiners.unshift(new fE.default),r.refiners.unshift(new oE.default),r.refiners.unshift(new uE.default),r.refiners.unshift(new Hm.default),r.refiners.push(new Hm.default),r.refiners.push(new lE.default),r.refiners.push(new cE.default(e)),r}Ks.includeCommonConfiguration=hE});var ln=O(Ce=>{"use strict";var pE=Ce&&Ce.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ce,"__esModule",{value:!0});Ce.noon=Ce.morning=Ce.midnight=Ce.yesterdayEvening=Ce.evening=Ce.lastNight=Ce.tonight=Ce.theDayAfter=Ce.tomorrow=Ce.theDayBefore=Ce.yesterday=Ce.today=Ce.now=void 0;var $r=rt(),Zs=pE(xe()),un=yr(),Bi=mt();function mE(r){let e=Zs.default(r.instant),t=new $r.ParsingComponents(r,{});return un.assignSimilarDate(t,e),un.assignSimilarTime(t,e),r.timezoneOffset!==null&&t.assign("timezoneOffset",e.utcOffset()),t}Ce.now=mE;function yE(r){let e=Zs.default(r.instant),t=new $r.ParsingComponents(r,{});return un.assignSimilarDate(t,e),un.implySimilarTime(t,e),t}Ce.today=yE;function gE(r){return zm(r,1)}Ce.yesterday=gE;function zm(r,e){return Rc(r,-e)}Ce.theDayBefore=zm;function _E(r){return Rc(r,1)}Ce.tomorrow=_E;function Rc(r,e){let t=Zs.default(r.instant),n=new $r.ParsingComponents(r,{});return t=t.add(e,"day"),un.assignSimilarDate(n,t),un.implySimilarTime(n,t),n}Ce.theDayAfter=Rc;function TE(r,e=22){let t=Zs.default(r.instant),n=new $r.ParsingComponents(r,{});return n.imply("hour",e),n.imply("meridiem",Bi.Meridiem.PM),un.assignSimilarDate(n,t),n}Ce.tonight=TE;function bE(r,e=0){let t=Zs.default(r.instant),n=new $r.ParsingComponents(r,{});return t.hour()<6&&(t=t.add(-1,"day")),un.assignSimilarDate(n,t),n.imply("hour",e),n}Ce.lastNight=bE;function vE(r,e=20){let t=new $r.ParsingComponents(r,{});return t.imply("meridiem",Bi.Meridiem.PM),t.imply("hour",e),t}Ce.evening=vE;function wE(r,e=20){let t=Zs.default(r.instant),n=new $r.ParsingComponents(r,{});return t=t.add(-1,"day"),un.assignSimilarDate(n,t),n.imply("hour",e),n.imply("meridiem",Bi.Meridiem.PM),n}Ce.yesterdayEvening=wE;function DE(r){let e=new $r.ParsingComponents(r,{});return e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e}Ce.midnight=DE;function kE(r,e=6){let t=new $r.ParsingComponents(r,{});return t.imply("meridiem",Bi.Meridiem.AM),t.imply("hour",e),t}Ce.morning=kE;function EE(r){let e=new $r.ParsingComponents(r,{});return e.imply("meridiem",Bi.Meridiem.AM),e.imply("hour",12),e}Ce.noon=EE});var Vm=O(Rr=>{"use strict";var SE=Rr&&Rr.__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]}),OE=Rr&&Rr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),ME=Rr&&Rr.__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)&&SE(e,r,t);return OE(e,r),e},RE=Rr&&Rr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Rr,"__esModule",{value:!0});var xE=RE(xe()),PE=Z(),AE=yr(),Hi=ME(ln()),NE=/(now|today|tonight|tomorrow|tmr|tmrw|yesterday|last\s*night)(?=\W|$)/i,xc=class extends PE.AbstractParserWithWordBoundaryChecking{innerPattern(e){return NE}innerExtract(e,t){let n=xE.default(e.refDate),s=t[0].toLowerCase(),a=e.createParsingComponents();switch(s){case"now":return Hi.now(e.reference);case"today":return Hi.today(e.reference);case"yesterday":return Hi.yesterday(e.reference);case"tomorrow":case"tmr":case"tmrw":return Hi.tomorrow(e.reference);case"tonight":return Hi.tonight(e.reference);default:s.match(/last\s*night/)&&(n.hour()>6&&(n=n.add(-1,"day")),AE.assignSimilarDate(a,n),a.imply("hour",0));break}return a}};Rr.default=xc});var Km=O(zi=>{"use strict";var CE=zi&&zi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(zi,"__esModule",{value:!0});var Fo=mt(),IE=Z(),FE=CE(xe()),LE=yr(),YE=/(?:this)?\s{0,3}(morning|afternoon|evening|night|midnight|noon)(?=\W|$)/i,Pc=class extends IE.AbstractParserWithWordBoundaryChecking{innerPattern(){return YE}innerExtract(e,t){let n=FE.default(e.refDate),s=e.createParsingComponents();switch(t[1].toLowerCase()){case"afternoon":s.imply("meridiem",Fo.Meridiem.PM),s.imply("hour",15);break;case"evening":case"night":s.imply("meridiem",Fo.Meridiem.PM),s.imply("hour",20);break;case"midnight":LE.assignTheNextDay(s,n),s.imply("hour",0),s.imply("minute",0),s.imply("second",0);break;case"morning":s.imply("meridiem",Fo.Meridiem.AM),s.imply("hour",6);break;case"noon":s.imply("meridiem",Fo.Meridiem.AM),s.imply("hour",12);break}return s}};zi.default=Pc});var fs=O(Fn=>{"use strict";var UE=Fn&&Fn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Fn,"__esModule",{value:!0});Fn.toDayJSClosestWeekday=Fn.toDayJSWeekday=void 0;var Zm=UE(xe());function WE(r,e,t){if(!t)return Xm(r,e);let n=Zm.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}Fn.toDayJSWeekday=WE;function Xm(r,e){let t=Zm.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}Fn.toDayJSClosestWeekday=Xm});var Jm=O(Nc=>{"use strict";Object.defineProperty(Nc,"__esModule",{value:!0});var Qm=Pt(),qE=Fe(),jE=Z(),$E=fs(),GE=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:on\\s*?)?(?:(this|last|past|next)\\s*)?(${qE.matchAnyPattern(Qm.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(this|last|past|next)\\s*week)?(?=\\W|$)`,"i"),BE=1,HE=2,zE=3,Ac=class extends jE.AbstractParserWithWordBoundaryChecking{innerPattern(){return GE}innerExtract(e,t){let n=t[HE].toLowerCase(),s=Qm.WEEKDAY_DICTIONARY[n],a=t[BE],o=t[zE],l=a||o;l=l||"",l=l.toLowerCase();let c=null;l=="last"||l=="past"?c="last":l=="next"?c="next":l=="this"&&(c="this");let f=$E.toDayJSWeekday(e.refDate,s,c);return e.createParsingComponents().assign("weekday",s).imply("day",f.date()).imply("month",f.month()+1).imply("year",f.year())}};Nc.default=Ac});var ry=O(Vi=>{"use strict";var VE=Vi&&Vi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Vi,"__esModule",{value:!0});var ty=Pt(),ey=rt(),KE=VE(xe()),ZE=Z(),XE=Fe(),QE=new RegExp(`(this|last|past|next|after\\s*this)\\s*(${XE.matchAnyPattern(ty.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),JE=1,eS=2,Cc=class extends ZE.AbstractParserWithWordBoundaryChecking{innerPattern(){return QE}innerExtract(e,t){let n=t[JE].toLowerCase(),s=t[eS].toLowerCase(),a=ty.TIME_UNIT_DICTIONARY[s];if(n=="next"||n.startsWith("after")){let c={};return c[a]=1,ey.ParsingComponents.createRelativeFromReference(e.reference,c)}if(n=="last"||n=="past"){let c={};return c[a]=-1,ey.ParsingComponents.createRelativeFromReference(e.reference,c)}let o=e.createParsingComponents(),l=KE.default(e.reference.instant);return s.match(/week/i)?(l=l.add(-l.get("d"),"d"),o.imply("day",l.date()),o.imply("month",l.month()+1),o.imply("year",l.year())):s.match(/month/i)?(l=l.add(-l.date()+1,"d"),o.imply("day",l.date()),o.assign("year",l.year()),o.assign("month",l.month()+1)):s.match(/year/i)&&(l=l.add(-l.date()+1,"d"),l=l.add(-l.month(),"month"),o.imply("day",l.date()),o.imply("month",l.month()+1),o.assign("year",l.year())),o}};Vi.default=Cc});var xr=O(Js=>{"use strict";Object.defineProperty(Js,"__esModule",{value:!0});Js.ParsingContext=Js.Chrono=void 0;var Xs=rt(),tS=Ic(),Qs=class{constructor(e){e=e||tS.createCasualConfiguration(),this.parsers=[...e.parsers],this.refiners=[...e.refiners]}clone(){return new Qs({parsers:[...this.parsers],refiners:[...this.refiners]})}parseDate(e,t,n){let s=this.parse(e,t,n);return s.length>0?s[0].start.date():null}parse(e,t,n){let s=new Lo(e,t,n),a=[];return this.parsers.forEach(o=>{let l=Qs.executeParser(s,o);a=a.concat(l)}),a.sort((o,l)=>o.index-l.index),this.refiners.forEach(function(o){a=o.refine(s,a)}),a}static executeParser(e,t){let n=[],s=t.pattern(e),a=e.text,o=e.text,l=s.exec(o);for(;l;){let c=l.index+a.length-o.length;l.index=c;let f=t.extract(e,l);if(!f){o=a.substring(l.index+1),l=s.exec(o);continue}let m=null;f instanceof Xs.ParsingResult?m=f:f instanceof Xs.ParsingComponents?(m=e.createParsingResult(l.index,l[0]),m.start=f):m=e.createParsingResult(l.index,l[0],f),e.debug(()=>console.log(`${t.constructor.name} extracted result ${m}`)),n.push(m),o=a.substring(c+m.text.length),l=s.exec(o)}return n}};Js.Chrono=Qs;var Lo=class{constructor(e,t,n){this.text=e,this.reference=new Xs.ReferenceWithTimezone(t),this.option=n!=null?n:{},this.refDate=this.reference.instant}createParsingComponents(e){return e instanceof Xs.ParsingComponents?e:new Xs.ParsingComponents(this.reference,e)}createParsingResult(e,t,n,s){let a=typeof t=="string"?t:this.text.substring(e,t),o=n?this.createParsingComponents(n):null,l=s?this.createParsingComponents(s):null;return new Xs.ParsingResult(this.reference,e,a,o,l)}debug(e){this.option.debug&&(this.option.debug instanceof Function?this.option.debug(e):this.option.debug.debug(e))}};Js.ParsingContext=Lo});var hs=O(Yc=>{"use strict";Object.defineProperty(Yc,"__esModule",{value:!0});var ny=xt(),rS=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"),Yo=1,sy=5,iy=2,ay=3,Fc=4,Lc=class{constructor(e){this.groupNumberMonth=e?ay:iy,this.groupNumberDay=e?iy:ay}pattern(){return rS}extract(e,t){if(t[Yo]=="/"||t[sy]=="/"){t.index+=t[0].length;return}let n=t.index+t[Yo].length,s=t[0].substr(t[Yo].length,t[0].length-t[Yo].length-t[sy].length);if(s.match(/^\d\.\d$/)||s.match(/^\d\.\d{1,2}\.\d{1,2}\s*$/)||!t[Fc]&&t[0].indexOf("/")<0)return;let a=e.createParsingResult(n,s),o=parseInt(t[this.groupNumberMonth]),l=parseInt(t[this.groupNumberDay]);if((o<1||o>12)&&o>12)if(l>=1&&l<=12&&o<=31)[l,o]=[o,l];else return null;if(l<1||l>31)return null;if(a.start.assign("day",l),a.start.assign("month",o),t[Fc]){let c=parseInt(t[Fc]),f=ny.findMostLikelyADYear(c);a.start.assign("year",f)}else{let c=ny.findYearClosestToRef(e.refDate,l,o);a.start.imply("year",c)}return a}};Yc.default=Lc});var uy=O(Wc=>{"use strict";Object.defineProperty(Wc,"__esModule",{value:!0});var oy=Pt(),nS=rt(),sS=Z(),iS=gr(),aS=new RegExp(`(this|last|past|next|after|\\+|-)\\s*(${oy.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Uc=class extends sS.AbstractParserWithWordBoundaryChecking{innerPattern(){return aS}innerExtract(e,t){let n=t[1].toLowerCase(),s=oy.parseTimeUnits(t[2]);switch(n){case"last":case"past":case"-":s=iS.reverseTimeUnits(s);break}return nS.ParsingComponents.createRelativeFromReference(e.reference,s)}};Wc.default=Uc});var cy=O($c=>{"use strict";Object.defineProperty($c,"__esModule",{value:!0});var oS=zs(),qc=rt(),uS=Pt(),lS=gr();function ly(r){return r.text.match(/\s+(before|from)$/i)!=null}function cS(r){return r.text.match(/\s+(after|since)$/i)!=null}var jc=class extends oS.MergingRefiner{patternBetween(){return/^\s*$/i}shouldMergeResults(e,t,n){return!e.match(this.patternBetween())||!ly(t)&&!cS(t)?!1:!!n.start.get("day")&&!!n.start.get("month")&&!!n.start.get("year")}mergeResults(e,t,n){let s=uS.parseTimeUnits(t.text);ly(t)&&(s=lS.reverseTimeUnits(s));let a=qc.ParsingComponents.createRelativeFromReference(new qc.ReferenceWithTimezone(n.start.date()),s);return new qc.ParsingResult(n.reference,t.index,`${t.text}${e}${n.text}`,a)}};$c.default=jc});var Ic=O(ot=>{"use strict";var bt=ot&&ot.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ot,"__esModule",{value:!0});ot.createConfiguration=ot.createCasualConfiguration=ot.parseDate=ot.parse=ot.GB=ot.strict=ot.casual=void 0;var dS=bt(lm()),fS=bt(mm()),hS=bt(bm()),pS=bt(Dm()),mS=bt(Sm()),yS=bt(Om()),gS=bt(Rm()),_S=bt(xm()),TS=bt(Pm()),bS=bt(Am()),vS=bt(Im()),wS=on(),DS=bt(Vm()),kS=bt(Km()),ES=bt(Jm()),SS=bt(ry()),Gc=xr(),OS=bt(hs()),MS=bt(uy()),RS=bt(cy());ot.casual=new Gc.Chrono(dy(!1));ot.strict=new Gc.Chrono(Uo(!0,!1));ot.GB=new Gc.Chrono(Uo(!1,!0));function xS(r,e,t){return ot.casual.parse(r,e,t)}ot.parse=xS;function PS(r,e,t){return ot.casual.parseDate(r,e,t)}ot.parseDate=PS;function dy(r=!1){let e=Uo(!1,r);return e.parsers.unshift(new DS.default),e.parsers.unshift(new kS.default),e.parsers.unshift(new pS.default),e.parsers.unshift(new SS.default),e.parsers.unshift(new MS.default),e}ot.createCasualConfiguration=dy;function Uo(r=!0,e=!1){return wS.includeCommonConfiguration({parsers:[new OS.default(e),new dS.default,new fS.default,new hS.default,new ES.default,new mS.default,new yS.default,new gS.default(r),new _S.default(r),new TS.default(r)],refiners:[new RS.default,new vS.default,new bS.default]},r)}ot.createConfiguration=Uo});var fy=O(Hc=>{"use strict";Object.defineProperty(Hc,"__esModule",{value:!0});var AS=cs(),Bc=class extends AS.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)}};Hc.default=Bc});var Ki=O(We=>{"use strict";Object.defineProperty(We,"__esModule",{value:!0});We.parseTimeUnits=We.TIME_UNITS_PATTERN=We.parseYear=We.YEAR_PATTERN=We.parseNumberPattern=We.NUMBER_PATTERN=We.TIME_UNIT_DICTIONARY=We.INTEGER_WORD_DICTIONARY=We.MONTH_DICTIONARY=We.WEEKDAY_DICTIONARY=void 0;var zc=Fe(),NS=xt();We.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};We.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};We.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};We.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"};We.NUMBER_PATTERN=`(?:${zc.matchAnyPattern(We.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s*an?)?|an?\\b(?:\\s*few)?|few|several|a?\\s*couple\\s*(?:of)?)`;function py(r){let e=r.toLowerCase();return We.INTEGER_WORD_DICTIONARY[e]!==void 0?We.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)}We.parseNumberPattern=py;We.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 CS(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 NS.findMostLikelyADYear(e)}We.parseYear=CS;var my=`(${We.NUMBER_PATTERN})\\s{0,5}(${zc.matchAnyPattern(We.TIME_UNIT_DICTIONARY)})\\s{0,5}`,hy=new RegExp(my,"i");We.TIME_UNITS_PATTERN=zc.repeatedTimeunitPattern("",my);function IS(r){let e={},t=r,n=hy.exec(t);for(;n;)FS(e,n),t=t.substring(n[0].length),n=hy.exec(t);return e}We.parseTimeUnits=IS;function FS(r,e){let t=py(e[1]),n=We.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var gy=O(Kc=>{"use strict";Object.defineProperty(Kc,"__esModule",{value:!0});var yy=Ki(),LS=Fe(),YS=Z(),US=fs(),WS=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:a[mn]\\s*?)?(?:(diese[mn]|letzte[mn]|n(?:\xE4|ae)chste[mn])\\s*)?(${LS.matchAnyPattern(yy.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(diese|letzte|n(?:\xE4|ae)chste)\\s*woche)?(?=\\W|$)`,"i"),qS=1,jS=3,$S=2,Vc=class extends YS.AbstractParserWithWordBoundaryChecking{innerPattern(){return WS}innerExtract(e,t){let n=t[$S].toLowerCase(),s=yy.WEEKDAY_DICTIONARY[n],a=t[qS],o=t[jS],l=a||o;l=l||"",l=l.toLowerCase();let c=null;l.match(/letzte/)?c="last":l.match(/chste/)?c="next":l.match(/diese/)&&(c="this");let f=US.toDayJSWeekday(e.refDate,s,c);return e.createParsingComponents().assign("weekday",s).imply("day",f.date()).imply("month",f.month()+1).imply("year",f.year())}};Kc.default=Vc});var vy=O(Zc=>{"use strict";Object.defineProperty(Zc,"__esModule",{value:!0});var Ln=mt(),GS=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"),BS=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"),HS=2,_y=3,Ty=4,by=5,ei=class{pattern(e){return GS}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=ei.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let s=e.text.substring(t.index+t[0].length),a=BS.exec(s);return a&&(n.end=ei.extractTimeComponent(n.start.clone(),a),n.end&&(n.text+=a[0])),n}static extractTimeComponent(e,t){let n=0,s=0,a=null;if(n=parseInt(t[HS]),t[_y]!=null&&(s=parseInt(t[_y])),s>=60||n>24)return null;if(n>=12&&(a=Ln.Meridiem.PM),t[by]!=null){if(n>12)return null;let o=t[by].toLowerCase();o.match(/morgen|vormittag/)&&(a=Ln.Meridiem.AM,n==12&&(n=0)),o.match(/nachmittag|abend/)&&(a=Ln.Meridiem.PM,n!=12&&(n+=12)),o.match(/nacht/)&&(n==12?(a=Ln.Meridiem.AM,n=0):n<6?a=Ln.Meridiem.AM:(a=Ln.Meridiem.PM,n+=12))}if(e.assign("hour",n),e.assign("minute",s),a!==null?e.assign("meridiem",a):n<12?e.imply("meridiem",Ln.Meridiem.AM):e.imply("meridiem",Ln.Meridiem.PM),t[Ty]!=null){let o=parseInt(t[Ty]);if(o>=60)return null;e.assign("second",o)}return e}};Zc.default=ei});var wy=O(Zi=>{"use strict";var zS=Zi&&Zi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Zi,"__esModule",{value:!0});var VS=zS(jr()),Xc=class extends VS.default{patternBetween(){return/^\s*(bis(?:\s*(?:am|zum))?|-)\s*$/i}};Zi.default=Xc});var Dy=O(Xi=>{"use strict";var KS=Xi&&Xi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Xi,"__esModule",{value:!0});var ZS=KS(an()),Qc=class extends ZS.default{patternBetween(){return new RegExp("^\\s*(T|um|am|,|-)?\\s*$")}};Xi.default=Qc});var Jc=O(Ji=>{"use strict";var XS=Ji&&Ji.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ji,"__esModule",{value:!0});var QS=XS(xe()),ps=mt(),JS=Z(),eO=yr(),tO=gr(),Qi=class extends JS.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(diesen)?\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht)(?=\W|$)/i}innerExtract(e,t){let n=QS.default(e.refDate),s=t[2].toLowerCase(),a=e.createParsingComponents();return eO.implySimilarTime(a,n),Qi.extractTimeComponents(a,s)}static extractTimeComponents(e,t){switch(t){case"morgen":e.imply("hour",6),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",ps.Meridiem.AM);break;case"vormittag":e.imply("hour",9),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",ps.Meridiem.AM);break;case"mittag":case"mittags":e.imply("hour",12),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",ps.Meridiem.AM);break;case"nachmittag":e.imply("hour",15),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",ps.Meridiem.PM);break;case"abend":e.imply("hour",18),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",ps.Meridiem.PM);break;case"nacht":e.imply("hour",22),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",ps.Meridiem.PM);break;case"mitternacht":e.get("hour")>1&&(e=tO.addImpliedTimeUnits(e,{day:1})),e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",ps.Meridiem.AM);break}return e}};Ji.default=Qi});var Sy=O(Pr=>{"use strict";var rO=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]}),nO=Pr&&Pr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),sO=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)&&rO(e,r,t);return nO(e,r),e},Ey=Pr&&Pr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Pr,"__esModule",{value:!0});var iO=Ey(xe()),aO=Z(),ms=yr(),oO=Ey(Jc()),ky=sO(ln()),uO=new RegExp("(jetzt|heute|morgen|\xFCbermorgen|uebermorgen|gestern|vorgestern|letzte\\s*nacht)(?:\\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht))?(?=\\W|$)","i"),lO=1,cO=2,ed=class extends aO.AbstractParserWithWordBoundaryChecking{innerPattern(e){return uO}innerExtract(e,t){let n=iO.default(e.refDate),s=(t[lO]||"").toLowerCase(),a=(t[cO]||"").toLowerCase(),o=e.createParsingComponents();switch(s){case"jetzt":o=ky.now(e.reference);break;case"heute":o=ky.today(e.reference);break;case"morgen":ms.assignTheNextDay(o,n);break;case"\xFCbermorgen":case"uebermorgen":n=n.add(1,"day"),ms.assignTheNextDay(o,n);break;case"gestern":n=n.add(-1,"day"),ms.assignSimilarDate(o,n),ms.implySimilarTime(o,n);break;case"vorgestern":n=n.add(-2,"day"),ms.assignSimilarDate(o,n),ms.implySimilarTime(o,n);break;default:s.match(/letzte\s*nacht/)&&(n.hour()>6&&(n=n.add(-1,"day")),ms.assignSimilarDate(o,n),o.imply("hour",0));break}return a&&(o=oO.default.extractTimeComponents(o,a)),o}};Pr.default=ed});var Ay=O(rd=>{"use strict";Object.defineProperty(rd,"__esModule",{value:!0});var dO=xt(),xy=Ki(),Py=Ki(),fO=Fe(),hO=Z(),pO=new RegExp(`(?:am\\s*?)?(?:den\\s*?)?([0-9]{1,2})\\.(?:\\s*(?:bis(?:\\s*(?:am|zum))?|\\-|\\\u2013|\\s)\\s*([0-9]{1,2})\\.?)?\\s*(${fO.matchAnyPattern(xy.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${Py.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Oy=1,My=2,mO=3,Ry=4,td=class extends hO.AbstractParserWithWordBoundaryChecking{innerPattern(){return pO}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=xy.MONTH_DICTIONARY[t[mO].toLowerCase()],a=parseInt(t[Oy]);if(a>31)return t.index=t.index+t[Oy].length,null;if(n.start.assign("month",s),n.start.assign("day",a),t[Ry]){let o=Py.parseYear(t[Ry]);n.start.assign("year",o)}else{let o=dO.findYearClosestToRef(e.refDate,a,s);n.start.imply("year",o)}if(t[My]){let o=parseInt(t[My]);n.end=n.start.clone(),n.end.assign("day",o)}return n}};rd.default=td});var Ny=O(sd=>{"use strict";Object.defineProperty(sd,"__esModule",{value:!0});var Wo=Ki(),yO=rt(),gO=Z(),_O=gr(),TO=Fe(),nd=class extends gO.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*)?(${Wo.NUMBER_PATTERN})?(?:\\s*(n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?)?\\s*(${TO.matchAnyPattern(Wo.TIME_UNIT_DICTIONARY)})`,"i")}innerExtract(e,t){let n=t[2]?Wo.parseNumberPattern(t[2]):1,s=Wo.TIME_UNIT_DICTIONARY[t[4].toLowerCase()],a={};a[s]=n;let o=t[1]||t[3]||"";if(o=o.toLowerCase(),!!o)return(/vor/.test(o)||/letzte/.test(o)||/vergangen/.test(o))&&(a=_O.reverseTimeUnits(a)),yO.ParsingComponents.createRelativeFromReference(e.reference,a)}};sd.default=nd});var Fy=O(vt=>{"use strict";var Ar=vt&&vt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(vt,"__esModule",{value:!0});vt.createConfiguration=vt.createCasualConfiguration=vt.parseDate=vt.parse=vt.strict=vt.casual=void 0;var bO=on(),Cy=xr(),vO=Ar(hs()),wO=Ar(Sc()),DO=Ar(fy()),kO=Ar(gy()),EO=Ar(vy()),SO=Ar(wy()),OO=Ar(Dy()),MO=Ar(Sy()),RO=Ar(Jc()),xO=Ar(Ay()),PO=Ar(Ny());vt.casual=new Cy.Chrono(Iy());vt.strict=new Cy.Chrono(id(!0));function AO(r,e,t){return vt.casual.parse(r,e,t)}vt.parse=AO;function NO(r,e,t){return vt.casual.parseDate(r,e,t)}vt.parseDate=NO;function Iy(r=!0){let e=id(!1,r);return e.parsers.unshift(new RO.default),e.parsers.unshift(new MO.default),e.parsers.unshift(new PO.default),e}vt.createCasualConfiguration=Iy;function id(r=!0,e=!0){return bO.includeCommonConfiguration({parsers:[new wO.default,new vO.default(e),new DO.default,new EO.default,new xO.default,new kO.default],refiners:[new SO.default,new OO.default]},r)}vt.createConfiguration=id});var Yy=O(Nr=>{"use strict";var CO=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]}),IO=Nr&&Nr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),FO=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)&&CO(e,r,t);return IO(e,r),e},LO=Nr&&Nr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Nr,"__esModule",{value:!0});var YO=LO(xe()),UO=mt(),WO=Z(),Ly=yr(),qo=FO(ln()),ad=class extends WO.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(maintenant|aujourd'hui|demain|hier|cette\s*nuit|la\s*veille)(?=\W|$)/i}innerExtract(e,t){let n=YO.default(e.refDate),s=t[0].toLowerCase(),a=e.createParsingComponents();switch(s){case"maintenant":return qo.now(e.reference);case"aujourd'hui":return qo.today(e.reference);case"hier":return qo.yesterday(e.reference);case"demain":return qo.tomorrow(e.reference);default:s.match(/cette\s*nuit/)?(Ly.assignSimilarDate(a,n),a.imply("hour",22),a.imply("meridiem",UO.Meridiem.PM)):s.match(/la\s*veille/)&&(n=n.add(-1,"day"),Ly.assignSimilarDate(a,n),a.imply("hour",0))}return a}};Nr.default=ad});var Uy=O(ud=>{"use strict";Object.defineProperty(ud,"__esModule",{value:!0});var ea=mt(),qO=Z(),od=class extends qO.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(),s=e.createParsingComponents();switch(n){case"apr\xE8s-midi":case"aprem":s.imply("hour",14),s.imply("minute",0),s.imply("meridiem",ea.Meridiem.PM);break;case"soir":s.imply("hour",18),s.imply("minute",0),s.imply("meridiem",ea.Meridiem.PM);break;case"matin":s.imply("hour",8),s.imply("minute",0),s.imply("meridiem",ea.Meridiem.AM);break;case"a midi":s.imply("hour",12),s.imply("minute",0),s.imply("meridiem",ea.Meridiem.AM);break;case"\xE0 minuit":s.imply("hour",0),s.imply("meridiem",ea.Meridiem.AM);break}return s}};ud.default=od});var Wy=O(cd=>{"use strict";Object.defineProperty(cd,"__esModule",{value:!0});var jO=cs(),ld=class extends jO.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)}};cd.default=ld});var qy=O(ta=>{"use strict";var $O=ta&&ta.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ta,"__esModule",{value:!0});var GO=$O(an()),dd=class extends GO.default{patternBetween(){return new RegExp("^\\s*(T|\xE0|a|vers|de|,|-)?\\s*$")}};ta.default=dd});var jy=O(ra=>{"use strict";var BO=ra&&ra.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ra,"__esModule",{value:!0});var HO=BO(jr()),fd=class extends HO.default{patternBetween(){return/^\s*(à|a|-)\s*$/i}};ra.default=fd});var Yn=O(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.parseTimeUnits=Pe.TIME_UNITS_PATTERN=Pe.parseYear=Pe.YEAR_PATTERN=Pe.parseOrdinalNumberPattern=Pe.ORDINAL_NUMBER_PATTERN=Pe.parseNumberPattern=Pe.NUMBER_PATTERN=Pe.TIME_UNIT_DICTIONARY=Pe.INTEGER_WORD_DICTIONARY=Pe.MONTH_DICTIONARY=Pe.WEEKDAY_DICTIONARY=void 0;var hd=Fe();Pe.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};Pe.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};Pe.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};Pe.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"};Pe.NUMBER_PATTERN=`(?:${hd.matchAnyPattern(Pe.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|une?\\b|quelques?|demi-?)`;function Gy(r){let e=r.toLowerCase();return Pe.INTEGER_WORD_DICTIONARY[e]!==void 0?Pe.INTEGER_WORD_DICTIONARY[e]:e==="une"||e==="un"?1:e.match(/quelques?/)?3:e.match(/demi-?/)?.5:parseFloat(e)}Pe.parseNumberPattern=Gy;Pe.ORDINAL_NUMBER_PATTERN="(?:[0-9]{1,2}(?:er)?)";function zO(r){let e=r.toLowerCase();return e=e.replace(/(?:er)$/i,""),parseInt(e)}Pe.parseOrdinalNumberPattern=zO;Pe.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 VO(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}Pe.parseYear=VO;var By=`(${Pe.NUMBER_PATTERN})\\s{0,5}(${hd.matchAnyPattern(Pe.TIME_UNIT_DICTIONARY)})\\s{0,5}`,$y=new RegExp(By,"i");Pe.TIME_UNITS_PATTERN=hd.repeatedTimeunitPattern("",By);function KO(r){let e={},t=r,n=$y.exec(t);for(;n;)ZO(e,n),t=t.substring(n[0].length),n=$y.exec(t);return e}Pe.parseTimeUnits=KO;function ZO(r,e){let t=Gy(e[1]),n=Pe.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var zy=O(md=>{"use strict";Object.defineProperty(md,"__esModule",{value:!0});var Hy=Yn(),XO=Fe(),QO=Z(),JO=fs(),eM=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(?:ce)\\s*)?(${XO.matchAnyPattern(Hy.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(dernier|prochain)\\s*)?(?=\\W|\\d|$)`,"i"),tM=1,rM=2,pd=class extends QO.AbstractParserWithWordBoundaryChecking{innerPattern(){return eM}innerExtract(e,t){let n=t[tM].toLowerCase(),s=Hy.WEEKDAY_DICTIONARY[n];if(s===void 0)return null;let a=t[rM];a=a||"",a=a.toLowerCase();let o=null;a=="dernier"?o="last":a=="prochain"&&(o="next");let l=JO.toDayJSWeekday(e.refDate,s,o);return e.createParsingComponents().assign("weekday",s).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};md.default=pd});var Xy=O(yd=>{"use strict";Object.defineProperty(yd,"__esModule",{value:!0});var na=mt(),nM=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"),sM=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"),iM=2,Vy=3,Ky=4,Zy=5,ti=class{pattern(e){return nM}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=ti.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let s=e.text.substring(t.index+t[0].length),a=sM.exec(s);return a&&(n.end=ti.extractTimeComponent(n.start.clone(),a),n.end&&(n.text+=a[0])),n}static extractTimeComponent(e,t){let n=0,s=0,a=null;if(n=parseInt(t[iM]),t[Vy]!=null&&(s=parseInt(t[Vy])),s>=60||n>24)return null;if(n>=12&&(a=na.Meridiem.PM),t[Zy]!=null){if(n>12)return null;let o=t[Zy][0].toLowerCase();o=="a"&&(a=na.Meridiem.AM,n==12&&(n=0)),o=="p"&&(a=na.Meridiem.PM,n!=12&&(n+=12))}if(e.assign("hour",n),e.assign("minute",s),a!==null?e.assign("meridiem",a):n<12?e.imply("meridiem",na.Meridiem.AM):e.imply("meridiem",na.Meridiem.PM),t[Ky]!=null){let o=parseInt(t[Ky]);if(o>=60)return null;e.assign("second",o)}return e}};yd.default=ti});var ng=O(_d=>{"use strict";Object.defineProperty(_d,"__esModule",{value:!0});var aM=xt(),tg=Yn(),rg=Yn(),jo=Yn(),oM=Fe(),uM=Z(),lM=new RegExp(`(?:on\\s*?)?(${jo.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:au|\\-|\\\u2013|jusqu'au?|\\s)\\s*(${jo.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:de)?\\s*)(${oM.matchAnyPattern(tg.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${rg.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Qy=1,Jy=2,cM=3,eg=4,gd=class extends uM.AbstractParserWithWordBoundaryChecking{innerPattern(){return lM}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=tg.MONTH_DICTIONARY[t[cM].toLowerCase()],a=jo.parseOrdinalNumberPattern(t[Qy]);if(a>31)return t.index=t.index+t[Qy].length,null;if(n.start.assign("month",s),n.start.assign("day",a),t[eg]){let o=rg.parseYear(t[eg]);n.start.assign("year",o)}else{let o=aM.findYearClosestToRef(e.refDate,a,s);n.start.imply("year",o)}if(t[Jy]){let o=jo.parseOrdinalNumberPattern(t[Jy]);n.end=n.start.clone(),n.end.assign("day",o)}return n}};_d.default=gd});var ig=O(bd=>{"use strict";Object.defineProperty(bd,"__esModule",{value:!0});var sg=Yn(),dM=rt(),fM=Z(),hM=gr(),Td=class extends fM.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`il y a\\s*(${sg.TIME_UNITS_PATTERN})(?=(?:\\W|$))`,"i")}innerExtract(e,t){let n=sg.parseTimeUnits(t[1]),s=hM.reverseTimeUnits(n);return dM.ParsingComponents.createRelativeFromReference(e.reference,s)}};bd.default=Td});var og=O(wd=>{"use strict";Object.defineProperty(wd,"__esModule",{value:!0});var ag=Yn(),pM=rt(),mM=Z(),vd=class extends mM.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp(`(?:dans|en|pour|pendant|de)\\s*(${ag.TIME_UNITS_PATTERN})(?=\\W|$)`,"i")}innerExtract(e,t){let n=ag.parseTimeUnits(t[1]);return pM.ParsingComponents.createRelativeFromReference(e.reference,n)}};wd.default=vd});var ug=O(kd=>{"use strict";Object.defineProperty(kd,"__esModule",{value:!0});var $o=Yn(),yM=rt(),gM=Z(),_M=gr(),TM=Fe(),Dd=class extends gM.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:les?|la|l'|du|des?)\\s*(${$o.NUMBER_PATTERN})?(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?\\s*(${TM.matchAnyPattern($o.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]?$o.parseNumberPattern(t[1]):1,s=$o.TIME_UNIT_DICTIONARY[t[3].toLowerCase()],a={};a[s]=n;let o=t[2]||t[4]||"";if(o=o.toLowerCase(),!!o)return(/derni[eè]re?s?/.test(o)||/pass[ée]e?s?/.test(o)||/pr[ée]c[ée]dents?/.test(o))&&(a=_M.reverseTimeUnits(a)),yM.ParsingComponents.createRelativeFromReference(e.reference,a)}};kd.default=Dd});var dg=O(wt=>{"use strict";var _r=wt&&wt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(wt,"__esModule",{value:!0});wt.createConfiguration=wt.createCasualConfiguration=wt.parseDate=wt.parse=wt.strict=wt.casual=void 0;var bM=on(),lg=xr(),vM=_r(Yy()),wM=_r(Uy()),DM=_r(hs()),kM=_r(Wy()),EM=_r(qy()),SM=_r(jy()),OM=_r(zy()),MM=_r(Xy()),RM=_r(ng()),xM=_r(ig()),PM=_r(og()),AM=_r(ug());wt.casual=new lg.Chrono(cg());wt.strict=new lg.Chrono(Ed(!0));function NM(r,e,t){return wt.casual.parse(r,e,t)}wt.parse=NM;function CM(r,e,t){return wt.casual.parseDate(r,e,t)}wt.parseDate=CM;function cg(r=!0){let e=Ed(!1,r);return e.parsers.unshift(new vM.default),e.parsers.unshift(new wM.default),e.parsers.unshift(new AM.default),e}wt.createCasualConfiguration=cg;function Ed(r=!0,e=!0){return bM.includeCommonConfiguration({parsers:[new DM.default(e),new RM.default,new kM.default,new MM.default,new xM.default,new PM.default,new OM.default],refiners:[new EM.default,new SM.default]},r)}wt.createConfiguration=Ed});var fg=O(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});Go.toHankaku=void 0;function IM(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,FM)}Go.toHankaku=IM;function FM(r){return String.fromCharCode(r.charCodeAt(0)-65248)}});var pg=O(sa=>{"use strict";var LM=sa&&sa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(sa,"__esModule",{value:!0});var Sd=fg(),YM=xt(),UM=LM(xe()),WM=/(?:(?:([同今本])|((昭和|平成|令和)?([0-90-9]{1,4}|元)))年\s*)?([0-90-9]{1,2})月\s*([0-90-9]{1,2})日/i,hg=1,qM=2,Od=3,jM=4,$M=5,GM=6,Md=class{pattern(){return WM}extract(e,t){let n=parseInt(Sd.toHankaku(t[$M])),s=parseInt(Sd.toHankaku(t[GM])),a=e.createParsingComponents({day:s,month:n});if(t[hg]&&t[hg].match("\u540C|\u4ECA|\u672C")){let o=UM.default(e.refDate);a.assign("year",o.year())}if(t[qM]){let o=t[jM],l=o=="\u5143"?1:parseInt(Sd.toHankaku(o));t[Od]=="\u4EE4\u548C"?l+=2018:t[Od]=="\u5E73\u6210"?l+=1988:t[Od]=="\u662D\u548C"&&(l+=1925),a.assign("year",l)}else{let o=YM.findYearClosestToRef(e.refDate,s,n);a.imply("year",o)}return a}};sa.default=Md});var mg=O(ia=>{"use strict";var BM=ia&&ia.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ia,"__esModule",{value:!0});var HM=BM(jr()),Rd=class extends HM.default{patternBetween(){return/^\s*(から|ー|-)\s*$/i}};ia.default=Rd});var gg=O(Cr=>{"use strict";var zM=Cr&&Cr.__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]}),VM=Cr&&Cr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),KM=Cr&&Cr.__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)&&zM(e,r,t);return VM(e,r),e},ZM=Cr&&Cr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Cr,"__esModule",{value:!0});var XM=ZM(xe()),yg=mt(),xd=KM(ln()),QM=/今日|当日|昨日|明日|今夜|今夕|今晩|今朝/i,Pd=class{pattern(){return QM}extract(e,t){let n=t[0],s=XM.default(e.refDate),a=e.createParsingComponents();switch(n){case"\u6628\u65E5":return xd.yesterday(e.reference);case"\u660E\u65E5":return xd.tomorrow(e.reference);case"\u4ECA\u65E5":case"\u5F53\u65E5":return xd.today(e.reference)}return n=="\u4ECA\u591C"||n=="\u4ECA\u5915"||n=="\u4ECA\u6669"?(a.imply("hour",22),a.assign("meridiem",yg.Meridiem.PM)):n.match("\u4ECA\u671D")&&(a.imply("hour",6),a.assign("meridiem",yg.Meridiem.AM)),a.assign("day",s.date()),a.assign("month",s.month()+1),a.assign("year",s.year()),a}};Cr.default=Pd});var bg=O(Dt=>{"use strict";var Ad=Dt&&Dt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Dt,"__esModule",{value:!0});Dt.createConfiguration=Dt.createCasualConfiguration=Dt.parseDate=Dt.parse=Dt.strict=Dt.casual=void 0;var JM=Ad(pg()),eR=Ad(mg()),tR=Ad(gg()),_g=xr();Dt.casual=new _g.Chrono(Tg());Dt.strict=new _g.Chrono(Nd());function rR(r,e,t){return Dt.casual.parse(r,e,t)}Dt.parse=rR;function nR(r,e,t){return Dt.casual.parseDate(r,e,t)}Dt.parseDate=nR;function Tg(){let r=Nd();return r.parsers.unshift(new tR.default),r}Dt.createCasualConfiguration=Tg;function Nd(){return{parsers:[new JM.default],refiners:[new eR.default]}}Dt.createConfiguration=Nd});var Bo=O(Gr=>{"use strict";Object.defineProperty(Gr,"__esModule",{value:!0});Gr.parseYear=Gr.YEAR_PATTERN=Gr.MONTH_DICTIONARY=Gr.WEEKDAY_DICTIONARY=void 0;Gr.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};Gr.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};Gr.YEAR_PATTERN="[0-9]{1,4}(?![^\\s]\\d)(?:\\s*[a|d]\\.?\\s*c\\.?|\\s*a\\.?\\s*d\\.?)?";function sR(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)}Gr.parseYear=sR});var wg=O(Id=>{"use strict";Object.defineProperty(Id,"__esModule",{value:!0});var vg=Bo(),iR=Fe(),aR=Z(),oR=fs(),uR=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(este|esta|passado|pr[o\xF3]ximo)\\s*)?(${iR.matchAnyPattern(vg.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(este|esta|passado|pr[\xF3o]ximo)\\s*semana)?(?=\\W|\\d|$)`,"i"),lR=1,cR=2,dR=3,Cd=class extends aR.AbstractParserWithWordBoundaryChecking{innerPattern(){return uR}innerExtract(e,t){let n=t[cR].toLowerCase(),s=vg.WEEKDAY_DICTIONARY[n];if(s===void 0)return null;let a=t[lR],o=t[dR],l=a||o||"";l=l.toLowerCase();let c=null;l=="passado"?c="this":l=="pr\xF3ximo"||l=="proximo"?c="next":l=="este"&&(c="this");let f=oR.toDayJSWeekday(e.refDate,s,c);return e.createParsingComponents().assign("weekday",s).imply("day",f.date()).imply("month",f.month()+1).imply("year",f.year())}};Id.default=Cd});var Dg=O(Ld=>{"use strict";Object.defineProperty(Ld,"__esModule",{value:!0});var fR=cs(),Fd=class extends fR.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:ao?|\xE0s?|das|da|de|do)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|a(?:o)?|\\?)\\s*"}};Ld.default=Fd});var kg=O(aa=>{"use strict";var hR=aa&&aa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(aa,"__esModule",{value:!0});var pR=hR(an()),Yd=class extends pR.default{patternBetween(){return new RegExp("^\\s*(?:,|\xE0)?\\s*$")}};aa.default=Yd});var Eg=O(oa=>{"use strict";var mR=oa&&oa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(oa,"__esModule",{value:!0});var yR=mR(jr()),Ud=class extends yR.default{patternBetween(){return/^\s*(?:-)\s*$/i}};oa.default=Ud});var Pg=O(qd=>{"use strict";Object.defineProperty(qd,"__esModule",{value:!0});var gR=xt(),Rg=Bo(),xg=Bo(),_R=Fe(),TR=Z(),bR=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*)(${_R.matchAnyPattern(Rg.MONTH_DICTIONARY)})(?:\\s*(?:de|,)?\\s*(${xg.YEAR_PATTERN}))?(?=\\W|$)`,"i"),Sg=1,Og=2,vR=3,Mg=4,Wd=class extends TR.AbstractParserWithWordBoundaryChecking{innerPattern(){return bR}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=Rg.MONTH_DICTIONARY[t[vR].toLowerCase()],a=parseInt(t[Sg]);if(a>31)return t.index=t.index+t[Sg].length,null;if(n.start.assign("month",s),n.start.assign("day",a),t[Mg]){let o=xg.parseYear(t[Mg]);n.start.assign("year",o)}else{let o=gR.findYearClosestToRef(e.refDate,a,s);n.start.imply("year",o)}if(t[Og]){let o=parseInt(t[Og]);n.end=n.start.clone(),n.end.assign("day",o)}return n}};qd.default=Wd});var Ag=O(cn=>{"use strict";var wR=cn&&cn.__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]}),DR=cn&&cn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),kR=cn&&cn.__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)&&wR(e,r,t);return DR(e,r),e};Object.defineProperty(cn,"__esModule",{value:!0});var ER=Z(),Ho=kR(ln()),jd=class extends ER.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(agora|hoje|amanha|amanhã|ontem)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),s=e.createParsingComponents();switch(n){case"agora":return Ho.now(e.reference);case"hoje":return Ho.today(e.reference);case"amanha":case"amanh\xE3":return Ho.tomorrow(e.reference);case"ontem":return Ho.yesterday(e.reference)}return s}};cn.default=jd});var Ng=O(ua=>{"use strict";var SR=ua&&ua.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ua,"__esModule",{value:!0});var zo=mt(),OR=Z(),MR=yr(),RR=SR(xe()),$d=class extends OR.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(?:esta\s*)?(manha|manhã|tarde|meia-noite|meio-dia|noite)(?=\W|$)/i}innerExtract(e,t){let n=RR.default(e.refDate),s=e.createParsingComponents();switch(t[1].toLowerCase()){case"tarde":s.imply("meridiem",zo.Meridiem.PM),s.imply("hour",15);break;case"noite":s.imply("meridiem",zo.Meridiem.PM),s.imply("hour",22);break;case"manha":case"manh\xE3":s.imply("meridiem",zo.Meridiem.AM),s.imply("hour",6);break;case"meia-noite":MR.assignTheNextDay(s,n),s.imply("hour",0),s.imply("minute",0),s.imply("second",0);break;case"meio-dia":s.imply("meridiem",zo.Meridiem.AM),s.imply("hour",12);break}return s}};ua.default=$d});var Fg=O(kt=>{"use strict";var Un=kt&&kt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(kt,"__esModule",{value:!0});kt.createConfiguration=kt.createCasualConfiguration=kt.parseDate=kt.parse=kt.strict=kt.casual=void 0;var xR=on(),Cg=xr(),PR=Un(hs()),AR=Un(wg()),NR=Un(Dg()),CR=Un(kg()),IR=Un(Eg()),FR=Un(Pg()),LR=Un(Ag()),YR=Un(Ng());kt.casual=new Cg.Chrono(Ig());kt.strict=new Cg.Chrono(Gd(!0));function UR(r,e,t){return kt.casual.parse(r,e,t)}kt.parse=UR;function WR(r,e,t){return kt.casual.parseDate(r,e,t)}kt.parseDate=WR;function Ig(r=!0){let e=Gd(!1,r);return e.parsers.push(new LR.default),e.parsers.push(new YR.default),e}kt.createCasualConfiguration=Ig;function Gd(r=!0,e=!0){return xR.includeCommonConfiguration({parsers:[new PR.default(e),new AR.default,new NR.default,new FR.default],refiners:[new CR.default,new IR.default]},r)}kt.createConfiguration=Gd});var Lg=O(la=>{"use strict";var qR=la&&la.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(la,"__esModule",{value:!0});var jR=qR(jr()),Bd=class extends jR.default{patternBetween(){return/^\s*(tot|-)\s*$/i}};la.default=Bd});var Yg=O(ca=>{"use strict";var $R=ca&&ca.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ca,"__esModule",{value:!0});var GR=$R(an()),Hd=class extends GR.default{patternBetween(){return new RegExp("^\\s*(om|na|voor|in de|,|-)?\\s*$")}};ca.default=Hd});var Ug=O(dn=>{"use strict";var BR=dn&&dn.__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]}),HR=dn&&dn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),zR=dn&&dn.__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)&&BR(e,r,t);return HR(e,r),e};Object.defineProperty(dn,"__esModule",{value:!0});var VR=Z(),Vo=zR(ln()),zd=class extends VR.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(nu|vandaag|morgen|morgend|gisteren)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),s=e.createParsingComponents();switch(n){case"nu":return Vo.now(e.reference);case"vandaag":return Vo.today(e.reference);case"morgen":case"morgend":return Vo.tomorrow(e.reference);case"gisteren":return Vo.yesterday(e.reference)}return s}};dn.default=zd});var Wg=O(da=>{"use strict";var KR=da&&da.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(da,"__esModule",{value:!0});var Ko=mt(),ZR=Z(),XR=KR(xe()),QR=yr(),JR=1,ex=2,Vd=class extends ZR.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(deze)?\s*(namiddag|avond|middernacht|ochtend|middag|'s middags|'s avonds|'s ochtends)(?=\W|$)/i}innerExtract(e,t){let n=XR.default(e.refDate),s=e.createParsingComponents();switch(t[JR]==="deze"&&(s.assign("day",e.refDate.getDate()),s.assign("month",e.refDate.getMonth()+1),s.assign("year",e.refDate.getFullYear())),t[ex].toLowerCase()){case"namiddag":case"'s namiddags":s.imply("meridiem",Ko.Meridiem.PM),s.imply("hour",15);break;case"avond":case"'s avonds'":s.imply("meridiem",Ko.Meridiem.PM),s.imply("hour",20);break;case"middernacht":QR.assignTheNextDay(s,n),s.imply("hour",0),s.imply("minute",0),s.imply("second",0);break;case"ochtend":case"'s ochtends":s.imply("meridiem",Ko.Meridiem.AM),s.imply("hour",6);break;case"middag":case"'s middags":s.imply("meridiem",Ko.Meridiem.AM),s.imply("hour",12);break}return s}};da.default=Vd});var nr=O(ve=>{"use strict";Object.defineProperty(ve,"__esModule",{value:!0});ve.parseTimeUnits=ve.TIME_UNITS_PATTERN=ve.parseYear=ve.YEAR_PATTERN=ve.parseOrdinalNumberPattern=ve.ORDINAL_NUMBER_PATTERN=ve.parseNumberPattern=ve.NUMBER_PATTERN=ve.TIME_UNIT_DICTIONARY=ve.ORDINAL_WORD_DICTIONARY=ve.INTEGER_WORD_DICTIONARY=ve.MONTH_DICTIONARY=ve.WEEKDAY_DICTIONARY=void 0;var Zo=Fe(),tx=xt();ve.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};ve.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};ve.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};ve.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};ve.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"};ve.NUMBER_PATTERN=`(?:${Zo.matchAnyPattern(ve.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+[\\.,][0-9]+|halve?|half|paar)`;function jg(r){let e=r.toLowerCase();return ve.INTEGER_WORD_DICTIONARY[e]!==void 0?ve.INTEGER_WORD_DICTIONARY[e]:e==="paar"?2:e==="half"||e.match(/halve?/)?.5:parseFloat(e.replace(",","."))}ve.parseNumberPattern=jg;ve.ORDINAL_NUMBER_PATTERN=`(?:${Zo.matchAnyPattern(ve.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:ste|de)?)`;function rx(r){let e=r.toLowerCase();return ve.ORDINAL_WORD_DICTIONARY[e]!==void 0?ve.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:ste|de)$/i,""),parseInt(e))}ve.parseOrdinalNumberPattern=rx;ve.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:voor Christus|na Christus)|[1-2][0-9]{3}|[5-9][0-9])";function nx(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 tx.findMostLikelyADYear(e)}ve.parseYear=nx;var $g=`(${ve.NUMBER_PATTERN})\\s{0,5}(${Zo.matchAnyPattern(ve.TIME_UNIT_DICTIONARY)})\\s{0,5}`,qg=new RegExp($g,"i");ve.TIME_UNITS_PATTERN=Zo.repeatedTimeunitPattern("(?:(?:binnen|in)\\s*)?",$g);function sx(r){let e={},t=r,n=qg.exec(t);for(;n;)ix(e,n),t=t.substring(n[0].length),n=qg.exec(t);return e}ve.parseTimeUnits=sx;function ix(r,e){let t=jg(e[1]),n=ve.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Bg=O(Zd=>{"use strict";Object.defineProperty(Zd,"__esModule",{value:!0});var Gg=nr(),ax=rt(),ox=Z(),Kd=class extends ox.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(?:binnen|in|binnen de|voor)\\s*("+Gg.TIME_UNITS_PATTERN+")(?=\\W|$)","i")}innerExtract(e,t){let n=Gg.parseTimeUnits(t[1]);return ax.ParsingComponents.createRelativeFromReference(e.reference,n)}};Zd.default=Kd});var zg=O(Qd=>{"use strict";Object.defineProperty(Qd,"__esModule",{value:!0});var Hg=nr(),ux=Fe(),lx=Z(),cx=fs(),dx=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:op\\s*?)?(?:(deze|vorige|volgende)\\s*(?:week\\s*)?)?(${ux.matchAnyPattern(Hg.WEEKDAY_DICTIONARY)})(?=\\W|$)`,"i"),fx=1,hx=2,px=3,Xd=class extends lx.AbstractParserWithWordBoundaryChecking{innerPattern(){return dx}innerExtract(e,t){let n=t[hx].toLowerCase(),s=Hg.WEEKDAY_DICTIONARY[n],a=t[fx],o=t[px],l=a||o;l=l||"",l=l.toLowerCase();let c=null;l=="vorige"?c="last":l=="volgende"?c="next":l=="deze"&&(c="this");let f=cx.toDayJSWeekday(e.refDate,s,c);return e.createParsingComponents().assign("weekday",s).imply("day",f.date()).imply("month",f.month()+1).imply("year",f.year())}};Qd.default=Xd});var Jg=O(ef=>{"use strict";Object.defineProperty(ef,"__esModule",{value:!0});var mx=xt(),Xg=nr(),Xo=nr(),Qg=nr(),yx=Fe(),gx=Z(),_x=new RegExp(`(?:on\\s*?)?(${Xo.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:tot|\\-|\\\u2013|until|through|till|\\s)\\s*(${Xo.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:of)?\\s*)(`+yx.matchAnyPattern(Xg.MONTH_DICTIONARY)+`)(?:(?:-|/|,?\\s*)(${Qg.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Tx=3,Vg=1,Kg=2,Zg=4,Jd=class extends gx.AbstractParserWithWordBoundaryChecking{innerPattern(){return _x}innerExtract(e,t){let n=Xg.MONTH_DICTIONARY[t[Tx].toLowerCase()],s=Xo.parseOrdinalNumberPattern(t[Vg]);if(s>31)return t.index=t.index+t[Vg].length,null;let a=e.createParsingComponents({day:s,month:n});if(t[Zg]){let c=Qg.parseYear(t[Zg]);a.assign("year",c)}else{let c=mx.findYearClosestToRef(e.refDate,s,n);a.imply("year",c)}if(!t[Kg])return a;let o=Xo.parseOrdinalNumberPattern(t[Kg]),l=e.createParsingResult(t.index,t[0]);return l.start=a,l.end=a.clone(),l.end.assign("day",o),l}};ef.default=Jd});var n_=O(rf=>{"use strict";Object.defineProperty(rf,"__esModule",{value:!0});var t_=nr(),bx=xt(),vx=Fe(),r_=nr(),wx=Z(),Dx=new RegExp(`(${vx.matchAnyPattern(t_.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${r_.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),kx=1,e_=2,tf=class extends wx.AbstractParserWithWordBoundaryChecking{innerPattern(){return Dx}innerExtract(e,t){let n=e.createParsingComponents();n.imply("day",1);let s=t[kx],a=t_.MONTH_DICTIONARY[s.toLowerCase()];if(n.assign("month",a),t[e_]){let o=r_.parseYear(t[e_]);n.assign("year",o)}else{let o=bx.findYearClosestToRef(e.refDate,1,a);n.imply("year",o)}return n}};rf.default=tf});var s_=O(sf=>{"use strict";Object.defineProperty(sf,"__esModule",{value:!0});var Ex=Z(),Sx=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),Ox=1,Mx=2,nf=class extends Ex.AbstractParserWithWordBoundaryChecking{innerPattern(){return Sx}innerExtract(e,t){let n=parseInt(t[Mx]),s=parseInt(t[Ox]);return e.createParsingComponents().imply("day",1).assign("month",s).assign("year",n)}};sf.default=nf});var i_=O(of=>{"use strict";Object.defineProperty(of,"__esModule",{value:!0});var Rx=cs(),af=class extends Rx.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)}};of.default=af});var u_=O(lf=>{"use strict";Object.defineProperty(lf,"__esModule",{value:!0});var o_=nr(),xx=Fe(),Px=Z(),Ax=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${xx.matchAnyPattern(o_.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),Nx=1,Cx=2,a_=3,Ix=4,uf=class extends Px.AbstractParserWithWordBoundaryChecking{innerPattern(){return Ax}innerExtract(e,t){let n=t[a_]?parseInt(t[a_]):o_.MONTH_DICTIONARY[t[Cx].toLowerCase()];if(n<1||n>12)return null;let s=parseInt(t[Nx]);return{day:parseInt(t[Ix]),month:n,year:s}}};lf.default=uf});var l_=O(fa=>{"use strict";var Fx=fa&&fa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(fa,"__esModule",{value:!0});var Lx=Z(),Qo=mt(),cf=yr(),Yx=Fx(xe()),Ux=1,Wx=2,df=class extends Lx.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(gisteren|morgen|van)(ochtend|middag|namiddag|avond|nacht)(?=\W|$)/i}innerExtract(e,t){let n=t[Ux].toLowerCase(),s=t[Wx].toLowerCase(),a=e.createParsingComponents(),o=Yx.default(e.refDate);switch(n){case"gisteren":cf.assignSimilarDate(a,o.add(-1,"day"));break;case"van":cf.assignSimilarDate(a,o);break;case"morgen":cf.assignTheNextDay(a,o);break}switch(s){case"ochtend":a.imply("meridiem",Qo.Meridiem.AM),a.imply("hour",6);break;case"middag":a.imply("meridiem",Qo.Meridiem.AM),a.imply("hour",12);break;case"namiddag":a.imply("meridiem",Qo.Meridiem.PM),a.imply("hour",15);break;case"avond":a.imply("meridiem",Qo.Meridiem.PM),a.imply("hour",20);break}return a}};fa.default=df});var d_=O(hf=>{"use strict";Object.defineProperty(hf,"__esModule",{value:!0});var c_=nr(),qx=rt(),jx=Z(),$x=gr(),Gx=new RegExp(`(deze|vorige|afgelopen|komende|over|\\+|-)\\s*(${c_.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),ff=class extends jx.AbstractParserWithWordBoundaryChecking{innerPattern(){return Gx}innerExtract(e,t){let n=t[1].toLowerCase(),s=c_.parseTimeUnits(t[2]);switch(n){case"vorige":case"afgelopen":case"-":s=$x.reverseTimeUnits(s);break}return qx.ParsingComponents.createRelativeFromReference(e.reference,s)}};hf.default=ff});var p_=O(ha=>{"use strict";var Bx=ha&&ha.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ha,"__esModule",{value:!0});var h_=nr(),f_=rt(),Hx=Bx(xe()),zx=Z(),Vx=Fe(),Kx=new RegExp(`(dit|deze|komende|volgend|volgende|afgelopen|vorige)\\s*(${Vx.matchAnyPattern(h_.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),Zx=1,Xx=2,pf=class extends zx.AbstractParserWithWordBoundaryChecking{innerPattern(){return Kx}innerExtract(e,t){let n=t[Zx].toLowerCase(),s=t[Xx].toLowerCase(),a=h_.TIME_UNIT_DICTIONARY[s];if(n=="volgend"||n=="volgende"||n=="komende"){let c={};return c[a]=1,f_.ParsingComponents.createRelativeFromReference(e.reference,c)}if(n=="afgelopen"||n=="vorige"){let c={};return c[a]=-1,f_.ParsingComponents.createRelativeFromReference(e.reference,c)}let o=e.createParsingComponents(),l=Hx.default(e.reference.instant);return s.match(/week/i)?(l=l.add(-l.get("d"),"d"),o.imply("day",l.date()),o.imply("month",l.month()+1),o.imply("year",l.year())):s.match(/maand/i)?(l=l.add(-l.date()+1,"d"),o.imply("day",l.date()),o.assign("year",l.year()),o.assign("month",l.month()+1)):s.match(/jaar/i)&&(l=l.add(-l.date()+1,"d"),l=l.add(-l.month(),"month"),o.imply("day",l.date()),o.imply("month",l.month()+1),o.assign("year",l.year())),o}};ha.default=pf});var m_=O(gf=>{"use strict";Object.defineProperty(gf,"__esModule",{value:!0});var yf=nr(),Qx=rt(),Jx=Z(),eP=gr(),tP=new RegExp("("+yf.TIME_UNITS_PATTERN+")(?:geleden|voor|eerder)(?=(?:\\W|$))","i"),rP=new RegExp("("+yf.TIME_UNITS_PATTERN+")geleden(?=(?:\\W|$))","i"),mf=class extends Jx.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?rP:tP}innerExtract(e,t){let n=yf.parseTimeUnits(t[1]),s=eP.reverseTimeUnits(n);return Qx.ParsingComponents.createRelativeFromReference(e.reference,s)}};gf.default=mf});var y_=O(bf=>{"use strict";Object.defineProperty(bf,"__esModule",{value:!0});var Tf=nr(),nP=rt(),sP=Z(),iP=new RegExp("("+Tf.TIME_UNITS_PATTERN+")(later|na|vanaf nu|voortaan|vooruit|uit)(?=(?:\\W|$))","i"),aP=new RegExp("("+Tf.TIME_UNITS_PATTERN+")(later|vanaf nu)(?=(?:\\W|$))","i"),oP=1,_f=class extends sP.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?aP:iP}innerExtract(e,t){let n=Tf.parseTimeUnits(t[oP]);return nP.ParsingComponents.createRelativeFromReference(e.reference,n)}};bf.default=_f});var b_=O(Et=>{"use strict";var At=Et&&Et.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Et,"__esModule",{value:!0});Et.createConfiguration=Et.createCasualConfiguration=Et.parseDate=Et.parse=Et.strict=Et.casual=void 0;var uP=on(),g_=xr(),lP=At(Lg()),cP=At(Yg()),dP=At(Ug()),fP=At(Wg()),hP=At(hs()),pP=At(Bg()),mP=At(zg()),yP=At(Jg()),__=At(n_()),gP=At(s_()),_P=At(i_()),TP=At(u_()),bP=At(l_()),vP=At(d_()),wP=At(p_()),DP=At(m_()),kP=At(y_());Et.casual=new g_.Chrono(T_());Et.strict=new g_.Chrono(vf(!0));function EP(r,e,t){return Et.casual.parse(r,e,t)}Et.parse=EP;function SP(r,e,t){return Et.casual.parseDate(r,e,t)}Et.parseDate=SP;function T_(r=!0){let e=vf(!1,r);return e.parsers.unshift(new dP.default),e.parsers.unshift(new fP.default),e.parsers.unshift(new bP.default),e.parsers.unshift(new __.default),e.parsers.unshift(new wP.default),e.parsers.unshift(new vP.default),e}Et.createCasualConfiguration=T_;function vf(r=!0,e=!0){return uP.includeCommonConfiguration({parsers:[new hP.default(e),new pP.default,new yP.default,new __.default,new mP.default,new TP.default,new gP.default,new _P.default(r),new DP.default(r),new kP.default(r)],refiners:[new cP.default,new lP.default]},r)}Et.createConfiguration=vf});var k_=O(pa=>{"use strict";var OP=pa&&pa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(pa,"__esModule",{value:!0});var MP=OP(xe()),RP=Z(),xP=1,v_=2,PP=3,w_=4,D_=5,AP=6,wf=class extends RP.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,s=e.createParsingResult(n,t[0]),a=MP.default(e.refDate),o=a;if(t[xP])s.start.imply("hour",a.hour()),s.start.imply("minute",a.minute()),s.start.imply("second",a.second()),s.start.imply("millisecond",a.millisecond());else if(t[v_]){let l=t[v_],c=t[PP];l=="\u660E"||l=="\u807D"?a.hour()>1&&(o=o.add(1,"day")):l=="\u6628"||l=="\u5C0B"||l=="\u7434"?o=o.add(-1,"day"):l=="\u524D"?o=o.add(-2,"day"):l=="\u5927\u524D"?o=o.add(-3,"day"):l=="\u5F8C"?o=o.add(2,"day"):l=="\u5927\u5F8C"&&(o=o.add(3,"day")),c=="\u65E9"||c=="\u671D"?s.start.imply("hour",6):c=="\u665A"&&(s.start.imply("hour",22),s.start.imply("meridiem",1))}else if(t[w_]){let c=t[w_][0];c=="\u65E9"||c=="\u671D"||c=="\u4E0A"?s.start.imply("hour",6):c=="\u4E0B"||c=="\u664F"?(s.start.imply("hour",15),s.start.imply("meridiem",1)):c=="\u4E2D"?(s.start.imply("hour",12),s.start.imply("meridiem",1)):c=="\u591C"||c=="\u665A"?(s.start.imply("hour",22),s.start.imply("meridiem",1)):c=="\u51CC"&&s.start.imply("hour",0)}else if(t[D_]){let l=t[D_];l=="\u660E"||l=="\u807D"?a.hour()>1&&(o=o.add(1,"day")):l=="\u6628"||l=="\u5C0B"||l=="\u7434"?o=o.add(-1,"day"):l=="\u524D"?o=o.add(-2,"day"):l=="\u5927\u524D"?o=o.add(-3,"day"):l=="\u5F8C"?o=o.add(2,"day"):l=="\u5927\u5F8C"&&(o=o.add(3,"day"));let c=t[AP];if(c){let f=c[0];f=="\u65E9"||f=="\u671D"||f=="\u4E0A"?s.start.imply("hour",6):f=="\u4E0B"||f=="\u664F"?(s.start.imply("hour",15),s.start.imply("meridiem",1)):f=="\u4E2D"?(s.start.imply("hour",12),s.start.imply("meridiem",1)):f=="\u591C"||f=="\u665A"?(s.start.imply("hour",22),s.start.imply("meridiem",1)):f=="\u51CC"&&s.start.imply("hour",0)}}return s.start.assign("day",o.date()),s.start.assign("month",o.month()+1),s.start.assign("year",o.year()),s}};pa.default=wf});var ri=O(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:!0});Vt.zhStringToYear=Vt.zhStringToNumber=Vt.WEEKDAY_OFFSET=Vt.NUMBER=void 0;Vt.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};Vt.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function NP(r){let e=0;for(let t=0;t<r.length;t++){let n=r[t];n==="\u5341"?e=e===0?Vt.NUMBER[n]:e*Vt.NUMBER[n]:e+=Vt.NUMBER[n]}return e}Vt.zhStringToNumber=NP;function CP(r){let e="";for(let t=0;t<r.length;t++){let n=r[t];e=e+Vt.NUMBER[n]}return parseInt(e)}Vt.zhStringToYear=CP});var S_=O(ma=>{"use strict";var IP=ma&&ma.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ma,"__esModule",{value:!0});var FP=IP(xe()),LP=Z(),ys=ri(),Df=1,E_=2,kf=3,Ef=class extends LP.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(ys.NUMBER).join("")+"]{4}|["+Object.keys(ys.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(ys.NUMBER).join("")+"]{1,2})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(ys.NUMBER).join("")+"]{1,2})?(?:\\s*)(?:\u65E5|\u865F)?")}innerExtract(e,t){let n=FP.default(e.refDate),s=e.createParsingResult(t.index,t[0]),a=parseInt(t[E_]);if(isNaN(a)&&(a=ys.zhStringToNumber(t[E_])),s.start.assign("month",a),t[kf]){let o=parseInt(t[kf]);isNaN(o)&&(o=ys.zhStringToNumber(t[kf])),s.start.assign("day",o)}else s.start.imply("day",n.date());if(t[Df]){let o=parseInt(t[Df]);isNaN(o)&&(o=ys.zhStringToYear(t[Df])),s.start.assign("year",o)}else s.start.imply("year",n.year());return s}};ma.default=Ef});var M_=O(ya=>{"use strict";var YP=ya&&ya.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ya,"__esModule",{value:!0});var UP=YP(xe()),WP=Z(),O_=ri(),qP=new RegExp("(\\d+|["+Object.keys(O_.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"),Sf=1,jP=2,Of=class extends WP.AbstractParserWithWordBoundaryChecking{innerPattern(){return qP}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=parseInt(t[Sf]);if(isNaN(s)&&(s=O_.zhStringToNumber(t[Sf])),isNaN(s)){let c=t[Sf];if(c==="\u5E7E")s=3;else if(c==="\u534A")s=.5;else return null}let a=UP.default(e.refDate),l=t[jP][0];return l.match(/[日天星禮月年]/)?(l=="\u65E5"||l=="\u5929"?a=a.add(s,"d"):l=="\u661F"||l=="\u79AE"?a=a.add(s*7,"d"):l=="\u6708"?a=a.add(s,"month"):l=="\u5E74"&&(a=a.add(s,"year")),n.start.assign("year",a.year()),n.start.assign("month",a.month()+1),n.start.assign("day",a.date()),n):(l=="\u79D2"?a=a.add(s,"second"):l=="\u5206"?a=a.add(s,"minute"):(l=="\u5C0F"||l=="\u9418")&&(a=a.add(s,"hour")),n.start.imply("year",a.year()),n.start.imply("month",a.month()+1),n.start.imply("day",a.date()),n.start.assign("hour",a.hour()),n.start.assign("minute",a.minute()),n.start.assign("second",a.second()),n)}};ya.default=Of});var x_=O(ga=>{"use strict";var $P=ga&&ga.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ga,"__esModule",{value:!0});var GP=$P(xe()),BP=Z(),R_=ri(),HP=new RegExp("(?<prefix>\u4E0A|\u4ECA|\u4E0B|\u9019|\u5462)(?:\u500B)?(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?<weekday>"+Object.keys(R_.WEEKDAY_OFFSET).join("|")+")"),Mf=class extends BP.AbstractParserWithWordBoundaryChecking{innerPattern(){return HP}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=t.groups.weekday,a=R_.WEEKDAY_OFFSET[s];if(a===void 0)return null;let o=null,l=t.groups.prefix;l=="\u4E0A"?o="last":l=="\u4E0B"?o="next":(l=="\u4ECA"||l=="\u9019"||l=="\u5462")&&(o="this");let c=GP.default(e.refDate),f=!1,m=c.day();return o=="last"||o=="past"?(c=c.day(a-7),f=!0):o=="next"?(c=c.day(a+7),f=!0):o=="this"?c=c.day(a):Math.abs(a-7-m)<Math.abs(a-m)?c=c.day(a-7):Math.abs(a+7-m)<Math.abs(a-m)?c=c.day(a+7):c=c.day(a),n.start.assign("weekday",a),f?(n.start.assign("day",c.date()),n.start.assign("month",c.month()+1),n.start.assign("year",c.year())):(n.start.imply("day",c.date()),n.start.imply("month",c.month()+1),n.start.imply("year",c.year())),n}};ga.default=Mf});var P_=O(_a=>{"use strict";var zP=_a&&_a.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(_a,"__esModule",{value:!0});var VP=zP(xe()),KP=Z(),br=ri(),ZP=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(br.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(br.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(br.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),XP=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(br.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(br.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(br.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),Jo=1,eu=2,tu=3,ru=4,nu=5,su=6,Tr=7,ni=8,iu=9,Rf=class extends KP.AbstractParserWithWordBoundaryChecking{innerPattern(){return ZP}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=VP.default(e.refDate),s=e.createParsingResult(t.index,t[0]),a=n.clone();if(t[Jo]){var o=t[Jo];o=="\u660E"||o=="\u807D"?n.hour()>1&&a.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?a.add(-1,"day"):o=="\u524D"?a.add(-2,"day"):o=="\u5927\u524D"?a.add(-3,"day"):o=="\u5F8C"?a.add(2,"day"):o=="\u5927\u5F8C"&&a.add(3,"day"),s.start.assign("day",a.date()),s.start.assign("month",a.month()+1),s.start.assign("year",a.year())}else if(t[ru]){var l=t[ru];l=="\u660E"||l=="\u807D"?a.add(1,"day"):l=="\u6628"||l=="\u5C0B"||l=="\u7434"?a.add(-1,"day"):l=="\u524D"?a.add(-2,"day"):l=="\u5927\u524D"?a.add(-3,"day"):l=="\u5F8C"?a.add(2,"day"):l=="\u5927\u5F8C"&&a.add(3,"day"),s.start.assign("day",a.date()),s.start.assign("month",a.month()+1),s.start.assign("year",a.year())}else s.start.imply("day",a.date()),s.start.imply("month",a.month()+1),s.start.imply("year",a.year());let c=0,f=0,m=-1;if(t[ni]){var g=parseInt(t[ni]);if(isNaN(g)&&(g=br.zhStringToNumber(t[ni])),g>=60)return null;s.start.assign("second",g)}if(c=parseInt(t[su]),isNaN(c)&&(c=br.zhStringToNumber(t[su])),t[Tr]?t[Tr]=="\u534A"?f=30:t[Tr]=="\u6B63"||t[Tr]=="\u6574"?f=0:(f=parseInt(t[Tr]),isNaN(f)&&(f=br.zhStringToNumber(t[Tr]))):c>100&&(f=c%100,c=Math.floor(c/100)),f>=60||c>24)return null;if(c>=12&&(m=1),t[iu]){if(c>12)return null;var T=t[iu][0].toLowerCase();T=="a"&&(m=0,c==12&&(c=0)),T=="p"&&(m=1,c!=12&&(c+=12))}else if(t[eu]){var S=t[eu],v=S[0];v=="\u671D"||v=="\u65E9"?(m=0,c==12&&(c=0)):v=="\u665A"&&(m=1,c!=12&&(c+=12))}else if(t[tu]){var R=t[tu],C=R[0];C=="\u4E0A"||C=="\u671D"||C=="\u65E9"||C=="\u51CC"?(m=0,c==12&&(c=0)):(C=="\u4E0B"||C=="\u664F"||C=="\u665A")&&(m=1,c!=12&&(c+=12))}else if(t[nu]){var $=t[nu],B=$[0];B=="\u4E0A"||B=="\u671D"||B=="\u65E9"||B=="\u51CC"?(m=0,c==12&&(c=0)):(B=="\u4E0B"||B=="\u664F"||B=="\u665A")&&(m=1,c!=12&&(c+=12))}if(s.start.assign("hour",c),s.start.assign("minute",f),m>=0?s.start.assign("meridiem",m):c<12?s.start.imply("meridiem",0):s.start.imply("meridiem",1),t=XP.exec(e.text.substring(s.index+s.text.length)),!t)return s.text.match(/^\d+$/)?null:s;let W=a.clone();if(s.end=e.createParsingComponents(),t[Jo]){var o=t[Jo];o=="\u660E"||o=="\u807D"?n.hour()>1&&W.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?W.add(-1,"day"):o=="\u524D"?W.add(-2,"day"):o=="\u5927\u524D"?W.add(-3,"day"):o=="\u5F8C"?W.add(2,"day"):o=="\u5927\u5F8C"&&W.add(3,"day"),s.end.assign("day",W.date()),s.end.assign("month",W.month()+1),s.end.assign("year",W.year())}else if(t[ru]){var l=t[ru];l=="\u660E"||l=="\u807D"?W.add(1,"day"):l=="\u6628"||l=="\u5C0B"||l=="\u7434"?W.add(-1,"day"):l=="\u524D"?W.add(-2,"day"):l=="\u5927\u524D"?W.add(-3,"day"):l=="\u5F8C"?W.add(2,"day"):l=="\u5927\u5F8C"&&W.add(3,"day"),s.end.assign("day",W.date()),s.end.assign("month",W.month()+1),s.end.assign("year",W.year())}else s.end.imply("day",W.date()),s.end.imply("month",W.month()+1),s.end.imply("year",W.year());if(c=0,f=0,m=-1,t[ni]){var g=parseInt(t[ni]);if(isNaN(g)&&(g=br.zhStringToNumber(t[ni])),g>=60)return null;s.end.assign("second",g)}if(c=parseInt(t[su]),isNaN(c)&&(c=br.zhStringToNumber(t[su])),t[Tr]?t[Tr]=="\u534A"?f=30:t[Tr]=="\u6B63"||t[Tr]=="\u6574"?f=0:(f=parseInt(t[Tr]),isNaN(f)&&(f=br.zhStringToNumber(t[Tr]))):c>100&&(f=c%100,c=Math.floor(c/100)),f>=60||c>24)return null;if(c>=12&&(m=1),t[iu]){if(c>12)return null;var T=t[iu][0].toLowerCase();T=="a"&&(m=0,c==12&&(c=0)),T=="p"&&(m=1,c!=12&&(c+=12)),s.start.isCertain("meridiem")||(m==0?(s.start.imply("meridiem",0),s.start.get("hour")==12&&s.start.assign("hour",0)):(s.start.imply("meridiem",1),s.start.get("hour")!=12&&s.start.assign("hour",s.start.get("hour")+12)))}else if(t[eu]){var S=t[eu],v=S[0];v=="\u671D"||v=="\u65E9"?(m=0,c==12&&(c=0)):v=="\u665A"&&(m=1,c!=12&&(c+=12))}else if(t[tu]){var R=t[tu],C=R[0];C=="\u4E0A"||C=="\u671D"||C=="\u65E9"||C=="\u51CC"?(m=0,c==12&&(c=0)):(C=="\u4E0B"||C=="\u664F"||C=="\u665A")&&(m=1,c!=12&&(c+=12))}else if(t[nu]){var $=t[nu],B=$[0];B=="\u4E0A"||B=="\u671D"||B=="\u65E9"||B=="\u51CC"?(m=0,c==12&&(c=0)):(B=="\u4E0B"||B=="\u664F"||B=="\u665A")&&(m=1,c!=12&&(c+=12))}return s.text=s.text+t[0],s.end.assign("hour",c),s.end.assign("minute",f),m>=0?s.end.assign("meridiem",m):s.start.isCertain("meridiem")&&s.start.get("meridiem")==1&&s.start.get("hour")>c?s.end.imply("meridiem",0):c>12&&s.end.imply("meridiem",1),s.end.date().getTime()<s.start.date().getTime()&&s.end.imply("day",s.end.get("day")+1),s}};_a.default=Rf});var N_=O(Ta=>{"use strict";var QP=Ta&&Ta.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ta,"__esModule",{value:!0});var JP=QP(xe()),eA=Z(),A_=ri(),tA=new RegExp("(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?<weekday>"+Object.keys(A_.WEEKDAY_OFFSET).join("|")+")"),xf=class extends eA.AbstractParserWithWordBoundaryChecking{innerPattern(){return tA}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=t.groups.weekday,a=A_.WEEKDAY_OFFSET[s];if(a===void 0)return null;let o=JP.default(e.refDate),l=!1,c=o.day();return Math.abs(a-7-c)<Math.abs(a-c)?o=o.day(a-7):Math.abs(a+7-c)<Math.abs(a-c)?o=o.day(a+7):o=o.day(a),n.start.assign("weekday",a),l?(n.start.assign("day",o.date()),n.start.assign("month",o.month()+1),n.start.assign("year",o.year())):(n.start.imply("day",o.date()),n.start.imply("month",o.month()+1),n.start.imply("year",o.year())),n}};Ta.default=xf});var C_=O(ba=>{"use strict";var rA=ba&&ba.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ba,"__esModule",{value:!0});var nA=rA(jr()),Pf=class extends nA.default{patternBetween(){return/^\s*(至|到|\-|\~|~|-|ー)\s*$/i}};ba.default=Pf});var I_=O(va=>{"use strict";var sA=va&&va.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(va,"__esModule",{value:!0});var iA=sA(an()),Af=class extends iA.default{patternBetween(){return/^\s*$/i}};va.default=Af});var F_=O(ut=>{"use strict";var fn=ut&&ut.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ut,"__esModule",{value:!0});ut.createConfiguration=ut.createCasualConfiguration=ut.parseDate=ut.parse=ut.strict=ut.casual=ut.hant=void 0;var Nf=xr(),aA=fn(Io()),oA=on(),uA=fn(k_()),lA=fn(S_()),cA=fn(M_()),dA=fn(x_()),fA=fn(P_()),hA=fn(N_()),pA=fn(C_()),mA=fn(I_());ut.hant=new Nf.Chrono(Cf());ut.casual=new Nf.Chrono(Cf());ut.strict=new Nf.Chrono(If());function yA(r,e,t){return ut.casual.parse(r,e,t)}ut.parse=yA;function gA(r,e,t){return ut.casual.parseDate(r,e,t)}ut.parseDate=gA;function Cf(){let r=If();return r.parsers.unshift(new uA.default),r}ut.createCasualConfiguration=Cf;function If(){let r=oA.includeCommonConfiguration({parsers:[new lA.default,new dA.default,new hA.default,new fA.default,new cA.default],refiners:[new pA.default,new mA.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof aA.default)),r}ut.createConfiguration=If});var W_=O(wa=>{"use strict";var _A=wa&&wa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(wa,"__esModule",{value:!0});var TA=_A(xe()),bA=Z(),vA=1,L_=2,wA=3,Y_=4,U_=5,DA=6,Ff=class extends bA.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,s=e.createParsingResult(n,t[0]),a=TA.default(e.refDate),o=a;if(t[vA])s.start.imply("hour",a.hour()),s.start.imply("minute",a.minute()),s.start.imply("second",a.second()),s.start.imply("millisecond",a.millisecond());else if(t[L_]){let l=t[L_],c=t[wA];l=="\u660E"?a.hour()>1&&(o=o.add(1,"day")):l=="\u6628"?o=o.add(-1,"day"):l=="\u524D"?o=o.add(-2,"day"):l=="\u5927\u524D"?o=o.add(-3,"day"):l=="\u540E"?o=o.add(2,"day"):l=="\u5927\u540E"&&(o=o.add(3,"day")),c=="\u65E9"?s.start.imply("hour",6):c=="\u665A"&&(s.start.imply("hour",22),s.start.imply("meridiem",1))}else if(t[Y_]){let c=t[Y_][0];c=="\u65E9"||c=="\u4E0A"?s.start.imply("hour",6):c=="\u4E0B"?(s.start.imply("hour",15),s.start.imply("meridiem",1)):c=="\u4E2D"?(s.start.imply("hour",12),s.start.imply("meridiem",1)):c=="\u591C"||c=="\u665A"?(s.start.imply("hour",22),s.start.imply("meridiem",1)):c=="\u51CC"&&s.start.imply("hour",0)}else if(t[U_]){let l=t[U_];l=="\u660E"?a.hour()>1&&(o=o.add(1,"day")):l=="\u6628"?o=o.add(-1,"day"):l=="\u524D"?o=o.add(-2,"day"):l=="\u5927\u524D"?o=o.add(-3,"day"):l=="\u540E"?o=o.add(2,"day"):l=="\u5927\u540E"&&(o=o.add(3,"day"));let c=t[DA];if(c){let f=c[0];f=="\u65E9"||f=="\u4E0A"?s.start.imply("hour",6):f=="\u4E0B"?(s.start.imply("hour",15),s.start.imply("meridiem",1)):f=="\u4E2D"?(s.start.imply("hour",12),s.start.imply("meridiem",1)):f=="\u591C"||f=="\u665A"?(s.start.imply("hour",22),s.start.imply("meridiem",1)):f=="\u51CC"&&s.start.imply("hour",0)}}return s.start.assign("day",o.date()),s.start.assign("month",o.month()+1),s.start.assign("year",o.year()),s}};wa.default=Ff});var si=O(Kt=>{"use strict";Object.defineProperty(Kt,"__esModule",{value:!0});Kt.zhStringToYear=Kt.zhStringToNumber=Kt.WEEKDAY_OFFSET=Kt.NUMBER=void 0;Kt.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};Kt.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function kA(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=kA;function EA(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=EA});var j_=O(Da=>{"use strict";var SA=Da&&Da.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Da,"__esModule",{value:!0});var OA=SA(xe()),MA=Z(),gs=si(),Lf=1,q_=2,Yf=3,Uf=class extends MA.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(gs.NUMBER).join("")+"]{4}|["+Object.keys(gs.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(gs.NUMBER).join("")+"]{1,3})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(gs.NUMBER).join("")+"]{1,3})?(?:\\s*)(?:\u65E5|\u53F7)?")}innerExtract(e,t){let n=OA.default(e.refDate),s=e.createParsingResult(t.index,t[0]),a=parseInt(t[q_]);if(isNaN(a)&&(a=gs.zhStringToNumber(t[q_])),s.start.assign("month",a),t[Yf]){let o=parseInt(t[Yf]);isNaN(o)&&(o=gs.zhStringToNumber(t[Yf])),s.start.assign("day",o)}else s.start.imply("day",n.date());if(t[Lf]){let o=parseInt(t[Lf]);isNaN(o)&&(o=gs.zhStringToYear(t[Lf])),s.start.assign("year",o)}else s.start.imply("year",n.year());return s}};Da.default=Uf});var G_=O(ka=>{"use strict";var RA=ka&&ka.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ka,"__esModule",{value:!0});var xA=RA(xe()),PA=Z(),$_=si(),AA=new RegExp("(\\d+|["+Object.keys($_.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"),Wf=1,NA=2,qf=class extends PA.AbstractParserWithWordBoundaryChecking{innerPattern(){return AA}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=parseInt(t[Wf]);if(isNaN(s)&&(s=$_.zhStringToNumber(t[Wf])),isNaN(s)){let c=t[Wf];if(c==="\u51E0")s=3;else if(c==="\u534A")s=.5;else return null}let a=xA.default(e.refDate),l=t[NA][0];return l.match(/[日天星礼月年]/)?(l=="\u65E5"||l=="\u5929"?a=a.add(s,"d"):l=="\u661F"||l=="\u793C"?a=a.add(s*7,"d"):l=="\u6708"?a=a.add(s,"month"):l=="\u5E74"&&(a=a.add(s,"year")),n.start.assign("year",a.year()),n.start.assign("month",a.month()+1),n.start.assign("day",a.date()),n):(l=="\u79D2"?a=a.add(s,"second"):l=="\u5206"?a=a.add(s,"minute"):(l=="\u5C0F"||l=="\u949F")&&(a=a.add(s,"hour")),n.start.imply("year",a.year()),n.start.imply("month",a.month()+1),n.start.imply("day",a.date()),n.start.assign("hour",a.hour()),n.start.assign("minute",a.minute()),n.start.assign("second",a.second()),n)}};ka.default=qf});var H_=O(Ea=>{"use strict";var CA=Ea&&Ea.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ea,"__esModule",{value:!0});var IA=CA(xe()),FA=Z(),B_=si(),LA=new RegExp("(?<prefix>\u4E0A|\u4E0B|\u8FD9)(?:\u4E2A)?(?:\u661F\u671F|\u793C\u62DC|\u5468)(?<weekday>"+Object.keys(B_.WEEKDAY_OFFSET).join("|")+")"),jf=class extends FA.AbstractParserWithWordBoundaryChecking{innerPattern(){return LA}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=t.groups.weekday,a=B_.WEEKDAY_OFFSET[s];if(a===void 0)return null;let o=null,l=t.groups.prefix;l=="\u4E0A"?o="last":l=="\u4E0B"?o="next":l=="\u8FD9"&&(o="this");let c=IA.default(e.refDate),f=!1,m=c.day();return o=="last"||o=="past"?(c=c.day(a-7),f=!0):o=="next"?(c=c.day(a+7),f=!0):o=="this"?c=c.day(a):Math.abs(a-7-m)<Math.abs(a-m)?c=c.day(a-7):Math.abs(a+7-m)<Math.abs(a-m)?c=c.day(a+7):c=c.day(a),n.start.assign("weekday",a),f?(n.start.assign("day",c.date()),n.start.assign("month",c.month()+1),n.start.assign("year",c.year())):(n.start.imply("day",c.date()),n.start.imply("month",c.month()+1),n.start.imply("year",c.year())),n}};Ea.default=jf});var z_=O(Sa=>{"use strict";var YA=Sa&&Sa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Sa,"__esModule",{value:!0});var UA=YA(xe()),WA=Z(),wr=si(),qA=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(wr.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(wr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(wr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),jA=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(wr.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(wr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(wr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),au=1,ou=2,uu=3,lu=4,cu=5,du=6,vr=7,ii=8,fu=9,$f=class extends WA.AbstractParserWithWordBoundaryChecking{innerPattern(){return qA}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=UA.default(e.refDate),s=e.createParsingResult(t.index,t[0]),a=n.clone();if(t[au]){let m=t[au];m=="\u660E"?n.hour()>1&&a.add(1,"day"):m=="\u6628"?a.add(-1,"day"):m=="\u524D"?a.add(-2,"day"):m=="\u5927\u524D"?a.add(-3,"day"):m=="\u540E"?a.add(2,"day"):m=="\u5927\u540E"&&a.add(3,"day"),s.start.assign("day",a.date()),s.start.assign("month",a.month()+1),s.start.assign("year",a.year())}else if(t[lu]){let m=t[lu];m=="\u660E"?a.add(1,"day"):m=="\u6628"?a.add(-1,"day"):m=="\u524D"?a.add(-2,"day"):m=="\u5927\u524D"?a.add(-3,"day"):m=="\u540E"?a.add(2,"day"):m=="\u5927\u540E"&&a.add(3,"day"),s.start.assign("day",a.date()),s.start.assign("month",a.month()+1),s.start.assign("year",a.year())}else s.start.imply("day",a.date()),s.start.imply("month",a.month()+1),s.start.imply("year",a.year());let o=0,l=0,c=-1;if(t[ii]){let m=parseInt(t[ii]);if(isNaN(m)&&(m=wr.zhStringToNumber(t[ii])),m>=60)return null;s.start.assign("second",m)}if(o=parseInt(t[du]),isNaN(o)&&(o=wr.zhStringToNumber(t[du])),t[vr]?t[vr]=="\u534A"?l=30:t[vr]=="\u6B63"||t[vr]=="\u6574"?l=0:(l=parseInt(t[vr]),isNaN(l)&&(l=wr.zhStringToNumber(t[vr]))):o>100&&(l=o%100,o=Math.floor(o/100)),l>=60||o>24)return null;if(o>=12&&(c=1),t[fu]){if(o>12)return null;let m=t[fu][0].toLowerCase();m=="a"&&(c=0,o==12&&(o=0)),m=="p"&&(c=1,o!=12&&(o+=12))}else if(t[ou]){let g=t[ou][0];g=="\u65E9"?(c=0,o==12&&(o=0)):g=="\u665A"&&(c=1,o!=12&&(o+=12))}else if(t[uu]){let g=t[uu][0];g=="\u4E0A"||g=="\u65E9"||g=="\u51CC"?(c=0,o==12&&(o=0)):(g=="\u4E0B"||g=="\u665A")&&(c=1,o!=12&&(o+=12))}else if(t[cu]){let g=t[cu][0];g=="\u4E0A"||g=="\u65E9"||g=="\u51CC"?(c=0,o==12&&(o=0)):(g=="\u4E0B"||g=="\u665A")&&(c=1,o!=12&&(o+=12))}if(s.start.assign("hour",o),s.start.assign("minute",l),c>=0?s.start.assign("meridiem",c):o<12?s.start.imply("meridiem",0):s.start.imply("meridiem",1),t=jA.exec(e.text.substring(s.index+s.text.length)),!t)return s.text.match(/^\d+$/)?null:s;let f=a.clone();if(s.end=e.createParsingComponents(),t[au]){let m=t[au];m=="\u660E"?n.hour()>1&&f.add(1,"day"):m=="\u6628"?f.add(-1,"day"):m=="\u524D"?f.add(-2,"day"):m=="\u5927\u524D"?f.add(-3,"day"):m=="\u540E"?f.add(2,"day"):m=="\u5927\u540E"&&f.add(3,"day"),s.end.assign("day",f.date()),s.end.assign("month",f.month()+1),s.end.assign("year",f.year())}else if(t[lu]){let m=t[lu];m=="\u660E"?f.add(1,"day"):m=="\u6628"?f.add(-1,"day"):m=="\u524D"?f.add(-2,"day"):m=="\u5927\u524D"?f.add(-3,"day"):m=="\u540E"?f.add(2,"day"):m=="\u5927\u540E"&&f.add(3,"day"),s.end.assign("day",f.date()),s.end.assign("month",f.month()+1),s.end.assign("year",f.year())}else s.end.imply("day",f.date()),s.end.imply("month",f.month()+1),s.end.imply("year",f.year());if(o=0,l=0,c=-1,t[ii]){let m=parseInt(t[ii]);if(isNaN(m)&&(m=wr.zhStringToNumber(t[ii])),m>=60)return null;s.end.assign("second",m)}if(o=parseInt(t[du]),isNaN(o)&&(o=wr.zhStringToNumber(t[du])),t[vr]?t[vr]=="\u534A"?l=30:t[vr]=="\u6B63"||t[vr]=="\u6574"?l=0:(l=parseInt(t[vr]),isNaN(l)&&(l=wr.zhStringToNumber(t[vr]))):o>100&&(l=o%100,o=Math.floor(o/100)),l>=60||o>24)return null;if(o>=12&&(c=1),t[fu]){if(o>12)return null;let m=t[fu][0].toLowerCase();m=="a"&&(c=0,o==12&&(o=0)),m=="p"&&(c=1,o!=12&&(o+=12)),s.start.isCertain("meridiem")||(c==0?(s.start.imply("meridiem",0),s.start.get("hour")==12&&s.start.assign("hour",0)):(s.start.imply("meridiem",1),s.start.get("hour")!=12&&s.start.assign("hour",s.start.get("hour")+12)))}else if(t[ou]){let g=t[ou][0];g=="\u65E9"?(c=0,o==12&&(o=0)):g=="\u665A"&&(c=1,o!=12&&(o+=12))}else if(t[uu]){let g=t[uu][0];g=="\u4E0A"||g=="\u65E9"||g=="\u51CC"?(c=0,o==12&&(o=0)):(g=="\u4E0B"||g=="\u665A")&&(c=1,o!=12&&(o+=12))}else if(t[cu]){let g=t[cu][0];g=="\u4E0A"||g=="\u65E9"||g=="\u51CC"?(c=0,o==12&&(o=0)):(g=="\u4E0B"||g=="\u665A")&&(c=1,o!=12&&(o+=12))}return s.text=s.text+t[0],s.end.assign("hour",o),s.end.assign("minute",l),c>=0?s.end.assign("meridiem",c):s.start.isCertain("meridiem")&&s.start.get("meridiem")==1&&s.start.get("hour")>o?s.end.imply("meridiem",0):o>12&&s.end.imply("meridiem",1),s.end.date().getTime()<s.start.date().getTime()&&s.end.imply("day",s.end.get("day")+1),s}};Sa.default=$f});var K_=O(Oa=>{"use strict";var $A=Oa&&Oa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Oa,"__esModule",{value:!0});var GA=$A(xe()),BA=Z(),V_=si(),HA=new RegExp("(?:\u661F\u671F|\u793C\u62DC|\u5468)(?<weekday>"+Object.keys(V_.WEEKDAY_OFFSET).join("|")+")"),Gf=class extends BA.AbstractParserWithWordBoundaryChecking{innerPattern(){return HA}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=t.groups.weekday,a=V_.WEEKDAY_OFFSET[s];if(a===void 0)return null;let o=GA.default(e.refDate),l=!1,c=o.day();return Math.abs(a-7-c)<Math.abs(a-c)?o=o.day(a-7):Math.abs(a+7-c)<Math.abs(a-c)?o=o.day(a+7):o=o.day(a),n.start.assign("weekday",a),l?(n.start.assign("day",o.date()),n.start.assign("month",o.month()+1),n.start.assign("year",o.year())):(n.start.imply("day",o.date()),n.start.imply("month",o.month()+1),n.start.imply("year",o.year())),n}};Oa.default=Gf});var Z_=O(Ma=>{"use strict";var zA=Ma&&Ma.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ma,"__esModule",{value:!0});var VA=zA(jr()),Bf=class extends VA.default{patternBetween(){return/^\s*(至|到|-|~|~|-|ー)\s*$/i}};Ma.default=Bf});var X_=O(Ra=>{"use strict";var KA=Ra&&Ra.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ra,"__esModule",{value:!0});var ZA=KA(an()),Hf=class extends ZA.default{patternBetween(){return/^\s*$/i}};Ra.default=Hf});var Q_=O(lt=>{"use strict";var hn=lt&<.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(lt,"__esModule",{value:!0});lt.createConfiguration=lt.createCasualConfiguration=lt.parseDate=lt.parse=lt.strict=lt.casual=lt.hans=void 0;var zf=xr(),XA=hn(Io()),QA=on(),JA=hn(W_()),eN=hn(j_()),tN=hn(G_()),rN=hn(H_()),nN=hn(z_()),sN=hn(K_()),iN=hn(Z_()),aN=hn(X_());lt.hans=new zf.Chrono(Vf());lt.casual=new zf.Chrono(Vf());lt.strict=new zf.Chrono(Kf());function oN(r,e,t){return lt.casual.parse(r,e,t)}lt.parse=oN;function uN(r,e,t){return lt.casual.parseDate(r,e,t)}lt.parseDate=uN;function Vf(){let r=Kf();return r.parsers.unshift(new JA.default),r}lt.createCasualConfiguration=Vf;function Kf(){let r=QA.includeCommonConfiguration({parsers:[new eN.default,new rN.default,new sN.default,new nN.default,new tN.default],refiners:[new iN.default,new aN.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof XA.default)),r}lt.createConfiguration=Kf});var eT=O(sr=>{"use strict";var J_=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]}),lN=sr&&sr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),cN=sr&&sr.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&J_(e,r,t)},dN=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)&&J_(e,r,t);return lN(e,r),e};Object.defineProperty(sr,"__esModule",{value:!0});sr.hans=void 0;cN(F_(),sr);sr.hans=dN(Q_())});var Zt=O(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});de.parseTimeUnits=de.TIME_UNITS_PATTERN=de.parseYear=de.YEAR_PATTERN=de.parseOrdinalNumberPattern=de.ORDINAL_NUMBER_PATTERN=de.parseNumberPattern=de.NUMBER_PATTERN=de.TIME_UNIT_DICTIONARY=de.ORDINAL_WORD_DICTIONARY=de.INTEGER_WORD_DICTIONARY=de.MONTH_DICTIONARY=de.FULL_MONTH_NAME_DICTIONARY=de.WEEKDAY_DICTIONARY=de.REGEX_PARTS=void 0;var hu=Fe(),fN=xt();de.REGEX_PARTS={leftBoundary:"([^\\p{L}\\p{N}_]|^)",rightBoundary:"(?=[^\\p{L}\\p{N}_]|$)",flags:"iu"};de.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};de.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};de.MONTH_DICTIONARY=Object.assign(Object.assign({},de.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});de.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};de.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};de.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"};de.NUMBER_PATTERN=`(?:${hu.matchAnyPattern(de.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 rT(r){let e=r.toLowerCase();return de.INTEGER_WORD_DICTIONARY[e]!==void 0?de.INTEGER_WORD_DICTIONARY[e]:e.match(/несколько/)?3:e.match(/пол/)?.5:e.match(/пар/)?2:e===""?1:parseFloat(e)}de.parseNumberPattern=rT;de.ORDINAL_NUMBER_PATTERN=`(?:${hu.matchAnyPattern(de.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:\u0433\u043E|\u043E\u0433\u043E|\u0435|\u043E\u0435)?)`;function hN(r){let e=r.toLowerCase();return de.ORDINAL_WORD_DICTIONARY[e]!==void 0?de.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}de.parseOrdinalNumberPattern=hN;var Zf="(?:\\s+(?:\u0433\u043E\u0434\u0443|\u0433\u043E\u0434\u0430|\u0433\u043E\u0434|\u0433|\u0433.))?";de.YEAR_PATTERN=`(?:[1-9][0-9]{0,3}${Zf}\\s*(?:\u043D.\u044D.|\u0434\u043E \u043D.\u044D.|\u043D. \u044D.|\u0434\u043E \u043D. \u044D.)|[1-2][0-9]{3}${Zf}|[5-9][0-9]${Zf})`;function pN(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 fN.findMostLikelyADYear(e)}de.parseYear=pN;var nT=`(${de.NUMBER_PATTERN})\\s{0,3}(${hu.matchAnyPattern(de.TIME_UNIT_DICTIONARY)})`,tT=new RegExp(nT,"i");de.TIME_UNITS_PATTERN=hu.repeatedTimeunitPattern("(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s{0,3})?",nT);function mN(r){let e={},t=r,n=tT.exec(t);for(;n;)yN(e,n),t=t.substring(n[0].length).trim(),n=tT.exec(t);return e}de.parseTimeUnits=mN;function yN(r,e){let t=rT(e[1]),n=de.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var iT=O(Qf=>{"use strict";Object.defineProperty(Qf,"__esModule",{value:!0});var xa=Zt(),gN=rt(),_N=Z(),sT=`(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s*(?:~\\s*)?)?(${xa.TIME_UNITS_PATTERN})${xa.REGEX_PARTS.rightBoundary}`,TN=new RegExp(`(?:\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0435|\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0438)\\s*${sT}`,xa.REGEX_PARTS.flags),bN=new RegExp(sT,"i"),Xf=class extends _N.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return xa.REGEX_PARTS.leftBoundary}innerPattern(e){return e.option.forwardDate?bN:TN}innerExtract(e,t){let n=xa.parseTimeUnits(t[1]);return gN.ParsingComponents.createRelativeFromReference(e.reference,n)}};Qf.default=Xf});var cT=O(eh=>{"use strict";Object.defineProperty(eh,"__esModule",{value:!0});var vN=xt(),Pa=Zt(),lT=Zt(),pu=Zt(),wN=Fe(),DN=Z(),kN=new RegExp(`(?:\u0441)?\\s*(${pu.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:\u043F\u043E|-|\u2013|\u0434\u043E)?\\s{0,3}(${pu.ORDINAL_NUMBER_PATTERN}))?(?:-|\\/|\\s{0,3}(?:of)?\\s{0,3})(${wN.matchAnyPattern(Pa.MONTH_DICTIONARY)})(?:(?:-|\\/|,?\\s{0,3})(${lT.YEAR_PATTERN}(?![^\\s]\\d)))?${Pa.REGEX_PARTS.rightBoundary}`,Pa.REGEX_PARTS.flags),aT=1,oT=2,EN=3,uT=4,Jf=class extends DN.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Pa.REGEX_PARTS.leftBoundary}innerPattern(){return kN}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=Pa.MONTH_DICTIONARY[t[EN].toLowerCase()],a=pu.parseOrdinalNumberPattern(t[aT]);if(a>31)return t.index=t.index+t[aT].length,null;if(n.start.assign("month",s),n.start.assign("day",a),t[uT]){let o=lT.parseYear(t[uT]);n.start.assign("year",o)}else{let o=vN.findYearClosestToRef(e.refDate,a,s);n.start.imply("year",o)}if(t[oT]){let o=pu.parseOrdinalNumberPattern(t[oT]);n.end=n.start.clone(),n.end.assign("day",o)}return n}};eh.default=Jf});var hT=O(rh=>{"use strict";Object.defineProperty(rh,"__esModule",{value:!0});var Aa=Zt(),SN=xt(),ON=Fe(),fT=Zt(),MN=Z(),RN=new RegExp(`((?:\u0432)\\s*)?(${ON.matchAnyPattern(Aa.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${fT.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,Aa.REGEX_PARTS.flags),xN=2,dT=3,th=class extends MN.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Aa.REGEX_PARTS.leftBoundary}innerPattern(){return RN}innerExtract(e,t){let n=t[xN].toLowerCase();if(t[0].length<=3&&!Aa.FULL_MONTH_NAME_DICTIONARY[n])return null;let s=e.createParsingResult(t.index,t.index+t[0].length);s.start.imply("day",1);let a=Aa.MONTH_DICTIONARY[n];if(s.start.assign("month",a),t[dT]){let o=fT.parseYear(t[dT]);s.start.assign("year",o)}else{let o=SN.findYearClosestToRef(e.refDate,1,a);s.start.imply("year",o)}return s}};rh.default=th});var mT=O(sh=>{"use strict";Object.defineProperty(sh,"__esModule",{value:!0});var mu=mt(),PN=cs(),pT=Zt(),nh=class extends PN.AbstractTimeExpressionParser{constructor(e){super(e)}patternFlags(){return pT.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))?(?!\\/)${pT.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 s=n.get("hour");s>=6&&s<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",mu.Meridiem.PM)):s<6&&n.assign("meridiem",mu.Meridiem.AM)}if(t[0].endsWith("\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F")){n.assign("meridiem",mu.Meridiem.PM);let s=n.get("hour");s>=0&&s<=6&&n.assign("hour",n.get("hour")+12)}t[0].endsWith("\u0443\u0442\u0440\u0430")&&(n.assign("meridiem",mu.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};sh.default=nh});var yT=O(ah=>{"use strict";Object.defineProperty(ah,"__esModule",{value:!0});var yu=Zt(),AN=rt(),NN=Z(),CN=gr(),IN=new RegExp(`(${yu.TIME_UNITS_PATTERN})\\s{0,5}\u043D\u0430\u0437\u0430\u0434(?=(?:\\W|$))`,yu.REGEX_PARTS.flags),ih=class extends NN.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return yu.REGEX_PARTS.leftBoundary}innerPattern(){return IN}innerExtract(e,t){let n=yu.parseTimeUnits(t[1]),s=CN.reverseTimeUnits(n);return AN.ParsingComponents.createRelativeFromReference(e.reference,s)}};ah.default=ih});var gT=O(Na=>{"use strict";var FN=Na&&Na.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Na,"__esModule",{value:!0});var LN=FN(jr()),oh=class extends LN.default{patternBetween(){return/^\s*(и до|и по|до|по|-)\s*$/i}};Na.default=oh});var _T=O(Ca=>{"use strict";var YN=Ca&&Ca.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ca,"__esModule",{value:!0});var UN=YN(an()),uh=class extends UN.default{patternBetween(){return new RegExp("^\\s*(T|\u0432|,|-)?\\s*$")}};Ca.default=uh});var TT=O(pn=>{"use strict";var WN=pn&&pn.__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]}),qN=pn&&pn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),jN=pn&&pn.__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)&&WN(e,r,t);return qN(e,r),e};Object.defineProperty(pn,"__esModule",{value:!0});var $N=Z(),Ia=jN(ln()),lh=Zt(),GN=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)${lh.REGEX_PARTS.rightBoundary}`,lh.REGEX_PARTS.flags),ch=class extends $N.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return lh.REGEX_PARTS.leftBoundary}innerPattern(e){return GN}innerExtract(e,t){let n=t[1].toLowerCase(),s=e.createParsingComponents();switch(n){case"\u0441\u0435\u0433\u043E\u0434\u043D\u044F":return Ia.today(e.reference);case"\u0432\u0447\u0435\u0440\u0430":return Ia.yesterday(e.reference);case"\u0437\u0430\u0432\u0442\u0440\u0430":return Ia.tomorrow(e.reference);case"\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430":return Ia.theDayAfter(e.reference,2);case"\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430":return Ia.theDayBefore(e.reference,2)}return s}};pn.default=ch});var bT=O(Ir=>{"use strict";var BN=Ir&&Ir.__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]}),HN=Ir&&Ir.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),zN=Ir&&Ir.__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)&&BN(e,r,t);return HN(e,r),e},VN=Ir&&Ir.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ir,"__esModule",{value:!0});var KN=Z(),_s=zN(ln()),ZN=yr(),XN=VN(xe()),dh=Zt(),QN=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)${dh.REGEX_PARTS.rightBoundary}`,dh.REGEX_PARTS.flags),fh=class extends KN.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return dh.REGEX_PARTS.leftBoundary}innerPattern(){return QN}innerExtract(e,t){let n=XN.default(e.refDate),s=t[0].toLowerCase(),a=e.createParsingComponents();if(s==="\u0441\u0435\u0439\u0447\u0430\u0441")return _s.now(e.reference);if(s==="\u0432\u0435\u0447\u0435\u0440\u043E\u043C"||s==="\u0432\u0435\u0447\u0435\u0440\u0430")return _s.evening(e.reference);if(s.endsWith("\u0443\u0442\u0440\u043E\u043C")||s.endsWith("\u0443\u0442\u0440\u0430"))return _s.morning(e.reference);if(s.match(/в\s*полдень/))return _s.noon(e.reference);if(s.match(/прошлой\s*ночью/))return _s.lastNight(e.reference);if(s.match(/прошлым\s*вечером/))return _s.yesterdayEvening(e.reference);if(s.match(/следующей\s*ночью/)){let o=n.hour()<22?1:2;n=n.add(o,"day"),ZN.assignSimilarDate(a,n),a.imply("hour",0)}return s.match(/в\s*полночь/)||s.endsWith("\u043D\u043E\u0447\u044C\u044E")?_s.midnight(e.reference):a}};Ir.default=fh});var vT=O(ph=>{"use strict";Object.defineProperty(ph,"__esModule",{value:!0});var Fa=Zt(),JN=Fe(),eC=Z(),tC=fs(),rC=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*)?(${JN.matchAnyPattern(Fa.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)?${Fa.REGEX_PARTS.rightBoundary}`,Fa.REGEX_PARTS.flags),nC=1,sC=2,iC=3,hh=class extends eC.AbstractParserWithWordBoundaryChecking{innerPattern(){return rC}patternLeftBoundary(){return Fa.REGEX_PARTS.leftBoundary}innerExtract(e,t){let n=t[sC].toLowerCase(),s=Fa.WEEKDAY_DICTIONARY[n],a=t[nC],o=t[iC],l=a||o;l=l||"",l=l.toLowerCase();let c=null;l=="\u043F\u0440\u043E\u0448\u043B\u044B\u0439"||l=="\u043F\u0440\u043E\u0448\u043B\u0443\u044E"||l=="\u043F\u0440\u043E\u0448\u043B\u043E\u0439"?c="last":l=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439"||l=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E"||l=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||l=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E"?c="next":(l=="\u044D\u0442\u043E\u0442"||l=="\u044D\u0442\u0443"||l=="\u044D\u0442\u043E\u0439")&&(c="this");let f=tC.toDayJSWeekday(e.refDate,s,c);return e.createParsingComponents().assign("weekday",s).imply("day",f.date()).imply("month",f.month()+1).imply("year",f.year())}};ph.default=hh});var DT=O(Ya=>{"use strict";var aC=Ya&&Ya.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ya,"__esModule",{value:!0});var La=Zt(),wT=rt(),oC=aC(xe()),uC=Z(),lC=Fe(),cC=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*(${lC.matchAnyPattern(La.TIME_UNIT_DICTIONARY)})(?=\\s*)${La.REGEX_PARTS.rightBoundary}`,La.REGEX_PARTS.flags),dC=1,fC=2,mh=class extends uC.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return La.REGEX_PARTS.leftBoundary}innerPattern(){return cC}innerExtract(e,t){let n=t[dC].toLowerCase(),s=t[fC].toLowerCase(),a=La.TIME_UNIT_DICTIONARY[s];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 c={};return c[a]=1,wT.ParsingComponents.createRelativeFromReference(e.reference,c)}if(n=="\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u043C"||n=="\u043D\u0430 \u043F\u0440\u043E\u0448\u043B\u043E\u0439"){let c={};return c[a]=-1,wT.ParsingComponents.createRelativeFromReference(e.reference,c)}let o=e.createParsingComponents(),l=oC.default(e.reference.instant);return a.match(/week/i)?(l=l.add(-l.get("d"),"d"),o.imply("day",l.date()),o.imply("month",l.month()+1),o.imply("year",l.year())):a.match(/month/i)?(l=l.add(-l.date()+1,"d"),o.imply("day",l.date()),o.assign("year",l.year()),o.assign("month",l.month()+1)):a.match(/year/i)&&(l=l.add(-l.date()+1,"d"),l=l.add(-l.month(),"month"),o.imply("day",l.date()),o.imply("month",l.month()+1),o.assign("year",l.year())),o}};Ya.default=mh});var kT=O(gh=>{"use strict";Object.defineProperty(gh,"__esModule",{value:!0});var Ua=Zt(),hC=rt(),pC=Z(),mC=gr(),yC=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*(${Ua.TIME_UNITS_PATTERN})${Ua.REGEX_PARTS.rightBoundary}`,Ua.REGEX_PARTS.flags),yh=class extends pC.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Ua.REGEX_PARTS.leftBoundary}innerPattern(){return yC}innerExtract(e,t){let n=t[1].toLowerCase(),s=Ua.parseTimeUnits(t[2]);switch(n){case"\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435":case"\u043F\u0440\u043E\u0448\u043B\u044B\u0435":case"-":s=mC.reverseTimeUnits(s);break}return hC.ParsingComponents.createRelativeFromReference(e.reference,s)}};gh.default=yh});var OT=O(St=>{"use strict";var ir=St&&St.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(St,"__esModule",{value:!0});St.createConfiguration=St.createCasualConfiguration=St.parseDate=St.parse=St.strict=St.casual=void 0;var gC=ir(iT()),_C=ir(cT()),TC=ir(hT()),bC=ir(mT()),vC=ir(yT()),wC=ir(gT()),DC=ir(_T()),kC=on(),EC=ir(TT()),SC=ir(bT()),OC=ir(vT()),MC=ir(DT()),ET=xr(),RC=ir(hs()),xC=ir(kT());St.casual=new ET.Chrono(ST());St.strict=new ET.Chrono(_h(!0));function PC(r,e,t){return St.casual.parse(r,e,t)}St.parse=PC;function AC(r,e,t){return St.casual.parseDate(r,e,t)}St.parseDate=AC;function ST(){let r=_h(!1);return r.parsers.unshift(new EC.default),r.parsers.unshift(new SC.default),r.parsers.unshift(new TC.default),r.parsers.unshift(new MC.default),r.parsers.unshift(new xC.default),r}St.createCasualConfiguration=ST;function _h(r=!0){return kC.includeCommonConfiguration({parsers:[new RC.default(!0),new gC.default,new _C.default,new OC.default,new bC.default(r),new vC.default],refiners:[new DC.default,new wC.default]},r)}St.createConfiguration=_h});var mt=O(ge=>{"use strict";var NC=ge&&ge.__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]}),CC=ge&&ge.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Wn=ge&&ge.__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)&&NC(e,r,t);return CC(e,r),e};Object.defineProperty(ge,"__esModule",{value:!0});ge.parseDate=ge.parse=ge.casual=ge.strict=ge.ru=ge.zh=ge.nl=ge.pt=ge.ja=ge.fr=ge.de=ge.Meridiem=ge.Chrono=ge.en=void 0;var Th=Wn(Ic());ge.en=Th;var IC=xr();Object.defineProperty(ge,"Chrono",{enumerable:!0,get:function(){return IC.Chrono}});var FC;(function(r){r[r.AM=0]="AM",r[r.PM=1]="PM"})(FC=ge.Meridiem||(ge.Meridiem={}));var LC=Wn(Fy());ge.de=LC;var YC=Wn(dg());ge.fr=YC;var UC=Wn(bg());ge.ja=UC;var WC=Wn(Fg());ge.pt=WC;var qC=Wn(b_());ge.nl=qC;var jC=Wn(eT());ge.zh=jC;var $C=Wn(OT());ge.ru=$C;ge.strict=Th.strict;ge.casual=Th.casual;function GC(r,e,t){return ge.casual.parse(r,e,t)}ge.parse=GC;function BC(r,e,t){return ge.casual.parseDate(r,e,t)}ge.parseDate=BC});var vh=O((bh,ai)=>{(function(r,e){typeof bh=="object"&&typeof ai!="undefined"?ai.exports=e():typeof define=="function"&&define.amd?define(e):r.moment=e()})(bh,function(){"use strict";var r;function e(){return r.apply(null,arguments)}function t(i){r=i}function n(i){return i instanceof Array||Object.prototype.toString.call(i)==="[object Array]"}function s(i){return i!=null&&Object.prototype.toString.call(i)==="[object Object]"}function a(i,u){return Object.prototype.hasOwnProperty.call(i,u)}function o(i){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(i).length===0;var u;for(u in i)if(a(i,u))return!1;return!0}function l(i){return i===void 0}function c(i){return typeof i=="number"||Object.prototype.toString.call(i)==="[object Number]"}function f(i){return i instanceof Date||Object.prototype.toString.call(i)==="[object Date]"}function m(i,u){var d=[],h,p=i.length;for(h=0;h<p;++h)d.push(u(i[h],h));return d}function g(i,u){for(var d in u)a(u,d)&&(i[d]=u[d]);return a(u,"toString")&&(i.toString=u.toString),a(u,"valueOf")&&(i.valueOf=u.valueOf),i}function T(i,u,d,h){return Op(i,u,d,h,!0).utc()}function S(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function v(i){return i._pf==null&&(i._pf=S()),i._pf}var R;Array.prototype.some?R=Array.prototype.some:R=function(i){var u=Object(this),d=u.length>>>0,h;for(h=0;h<d;h++)if(h in u&&i.call(this,u[h],h,u))return!0;return!1};function C(i){if(i._isValid==null){var u=v(i),d=R.call(u.parsedDateParts,function(p){return p!=null}),h=!isNaN(i._d.getTime())&&u.overflow<0&&!u.empty&&!u.invalidEra&&!u.invalidMonth&&!u.invalidWeekday&&!u.weekdayMismatch&&!u.nullInput&&!u.invalidFormat&&!u.userInvalidated&&(!u.meridiem||u.meridiem&&d);if(i._strict&&(h=h&&u.charsLeftOver===0&&u.unusedTokens.length===0&&u.bigHour===void 0),Object.isFrozen==null||!Object.isFrozen(i))i._isValid=h;else return h}return i._isValid}function $(i){var u=T(NaN);return i!=null?g(v(u),i):v(u).userInvalidated=!0,u}var B=e.momentProperties=[],W=!1;function De(i,u){var d,h,p,b=B.length;if(l(u._isAMomentObject)||(i._isAMomentObject=u._isAMomentObject),l(u._i)||(i._i=u._i),l(u._f)||(i._f=u._f),l(u._l)||(i._l=u._l),l(u._strict)||(i._strict=u._strict),l(u._tzm)||(i._tzm=u._tzm),l(u._isUTC)||(i._isUTC=u._isUTC),l(u._offset)||(i._offset=u._offset),l(u._pf)||(i._pf=v(u)),l(u._locale)||(i._locale=u._locale),b>0)for(d=0;d<b;d++)h=B[d],p=u[h],l(p)||(i[h]=p);return i}function Te(i){De(this,i),this._d=new Date(i._d!=null?i._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),W===!1&&(W=!0,e.updateOffset(this),W=!1)}function be(i){return i instanceof Te||i!=null&&i._isAMomentObject!=null}function ee(i){e.suppressDeprecationWarnings===!1&&typeof console!="undefined"&&console.warn&&console.warn("Deprecation warning: "+i)}function te(i,u){var d=!0;return g(function(){if(e.deprecationHandler!=null&&e.deprecationHandler(null,i),d){var h=[],p,b,x,re=arguments.length;for(b=0;b<re;b++){if(p="",typeof arguments[b]=="object"){p+=`
|
|
|
[`+b+"] ";for(x in arguments[0])a(arguments[0],x)&&(p+=x+": "+arguments[0][x]+", ");p=p.slice(0,-2)}else p=arguments[b];h.push(p)}ee(i+`
|
|
|
Arguments: `+Array.prototype.slice.call(h).join("")+`
|
|
|
`+new Error().stack),d=!1}return u.apply(this,arguments)},u)}var Ft={};function gt(i,u){e.deprecationHandler!=null&&e.deprecationHandler(i,u),Ft[i]||(ee(u),Ft[i]=!0)}e.suppressDeprecationWarnings=!1,e.deprecationHandler=null;function V(i){return typeof Function!="undefined"&&i instanceof Function||Object.prototype.toString.call(i)==="[object Function]"}function q(i){var u,d;for(d in i)a(i,d)&&(u=i[d],V(u)?this[d]=u:this["_"+d]=u);this._config=i,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function P(i,u){var d=g({},i),h;for(h in u)a(u,h)&&(s(i[h])&&s(u[h])?(d[h]={},g(d[h],i[h]),g(d[h],u[h])):u[h]!=null?d[h]=u[h]:delete d[h]);for(h in i)a(i,h)&&!a(u,h)&&s(i[h])&&(d[h]=g({},d[h]));return d}function Q(i){i!=null&&this.set(i)}var Y;Object.keys?Y=Object.keys:Y=function(i){var u,d=[];for(u in i)a(i,u)&&d.push(u);return d};var oe={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function y(i,u,d){var h=this._calendar[i]||this._calendar.sameElse;return V(h)?h.call(u,d):h}function _(i,u,d){var h=""+Math.abs(i),p=u-h.length,b=i>=0;return(b?d?"+":"":"-")+Math.pow(10,Math.max(0,p)).toString().substr(1)+h}var w=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,D=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,E={},M={};function k(i,u,d,h){var p=h;typeof h=="string"&&(p=function(){return this[h]()}),i&&(M[i]=p),u&&(M[u[0]]=function(){return _(p.apply(this,arguments),u[1],u[2])}),d&&(M[d]=function(){return this.localeData().ordinal(p.apply(this,arguments),i)})}function I(i){return i.match(/\[[\s\S]/)?i.replace(/^\[|\]$/g,""):i.replace(/\\/g,"")}function A(i){var u=i.match(w),d,h;for(d=0,h=u.length;d<h;d++)M[u[d]]?u[d]=M[u[d]]:u[d]=I(u[d]);return function(p){var b="",x;for(x=0;x<h;x++)b+=V(u[x])?u[x].call(p,i):u[x];return b}}function N(i,u){return i.isValid()?(u=j(u,i.localeData()),E[u]=E[u]||A(u),E[u](i)):i.localeData().invalidDate()}function j(i,u){var d=5;function h(p){return u.longDateFormat(p)||p}for(D.lastIndex=0;d>=0&&D.test(i);)i=i.replace(D,h),D.lastIndex=0,d-=1;return i}var ke={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function pe(i){var u=this._longDateFormat[i],d=this._longDateFormat[i.toUpperCase()];return u||!d?u:(this._longDateFormat[i]=d.match(w).map(function(h){return h==="MMMM"||h==="MM"||h==="DD"||h==="dddd"?h.slice(1):h}).join(""),this._longDateFormat[i])}var le="Invalid date";function Ie(){return this._invalidDate}var K="%d",qe=/\d{1,2}/;function Qe(i){return this._ordinal.replace("%d",i)}var dt={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Or(i,u,d,h){var p=this._relativeTime[d];return V(p)?p(i,u,d,h):p.replace(/%d/i,i)}function at(i,u){var d=this._relativeTime[i>0?"future":"past"];return V(d)?d(u):d.replace(/%s/i,u)}var je={};function ft(i,u){var d=i.toLowerCase();je[d]=je[d+"s"]=je[u]=i}function _t(i){return typeof i=="string"?je[i]||je[i.toLowerCase()]:void 0}function Sn(i){var u={},d,h;for(h in i)a(i,h)&&(d=_t(h),d&&(u[d]=i[h]));return u}var Pi={};function $e(i,u){Pi[i]=u}function Fs(i){var u=[],d;for(d in i)a(i,d)&&u.push({unit:d,priority:Pi[d]});return u.sort(function(h,p){return h.priority-p.priority}),u}function Jn(i){return i%4===0&&i%100!==0||i%400===0}function ht(i){return i<0?Math.ceil(i)||0:Math.floor(i)}function ce(i){var u=+i,d=0;return u!==0&&isFinite(u)&&(d=ht(u)),d}function Zr(i,u){return function(d){return d!=null?(es(this,i,d),e.updateOffset(this,u),this):Rt(this,i)}}function Rt(i,u){return i.isValid()?i._d["get"+(i._isUTC?"UTC":"")+u]():NaN}function es(i,u,d){i.isValid()&&!isNaN(d)&&(u==="FullYear"&&Jn(i.year())&&i.month()===1&&i.date()===29?(d=ce(d),i._d["set"+(i._isUTC?"UTC":"")+u](d,i.month(),ho(d,i.month()))):i._d["set"+(i._isUTC?"UTC":"")+u](d))}function uo(i){return i=_t(i),V(this[i])?this[i]():this}function Ur(i,u){if(typeof i=="object"){i=Sn(i);var d=Fs(i),h,p=d.length;for(h=0;h<p;h++)this[d[h].unit](i[d[h].unit])}else if(i=_t(i),V(this[i]))return this[i](u);return this}var On=/\d/,Tt=/\d\d/,Ai=/\d{3}/,dr=/\d{4}/,Xr=/[+-]?\d{6}/,Ye=/\d\d?/,Mn=/\d\d\d\d?/,Ls=/\d\d\d\d\d\d?/,ts=/\d{1,3}/,Rn=/\d{1,4}/,rs=/[+-]?\d{1,6}/,fr=/\d+/,xn=/[+-]?\d+/,lo=/Z|[+-]\d\d:?\d\d/gi,Qr=/Z|[+-]\d\d(?::?\d\d)?/gi,co=/[+-]?\d+(\.\d{1,3})?/,hr=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,pr;pr={};function H(i,u,d){pr[i]=V(u)?u:function(h,p){return h&&d?d:u}}function Ys(i,u){return a(pr,i)?pr[i](u._strict,u._locale):new RegExp(fo(i))}function fo(i){return pt(i.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(u,d,h,p,b){return d||h||p||b}))}function pt(i){return i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var ns={};function Ae(i,u){var d,h=u,p;for(typeof i=="string"&&(i=[i]),c(u)&&(h=function(b,x){x[u]=ce(b)}),p=i.length,d=0;d<p;d++)ns[i[d]]=h}function mr(i,u){Ae(i,function(d,h,p,b){p._w=p._w||{},u(d,p._w,p,b)})}function Lt(i,u,d){u!=null&&a(ns,i)&&ns[i](u,d._a,d,i)}var tt=0,Je=1,G=2,ne=3,ue=4,$t=5,ss=6,jv=7,$v=8;function Gv(i,u){return(i%u+u)%u}var st;Array.prototype.indexOf?st=Array.prototype.indexOf:st=function(i){var u;for(u=0;u<this.length;++u)if(this[u]===i)return u;return-1};function ho(i,u){if(isNaN(i)||isNaN(u))return NaN;var d=Gv(u,12);return i+=(u-d)/12,d===1?Jn(i)?29:28:31-d%7%2}k("M",["MM",2],"Mo",function(){return this.month()+1}),k("MMM",0,0,function(i){return this.localeData().monthsShort(this,i)}),k("MMMM",0,0,function(i){return this.localeData().months(this,i)}),ft("month","M"),$e("month",8),H("M",Ye),H("MM",Ye,Tt),H("MMM",function(i,u){return u.monthsShortRegex(i)}),H("MMMM",function(i,u){return u.monthsRegex(i)}),Ae(["M","MM"],function(i,u){u[Je]=ce(i)-1}),Ae(["MMM","MMMM"],function(i,u,d,h){var p=d._locale.monthsParse(i,h,d._strict);p!=null?u[Je]=p:v(d).invalidMonth=i});var Bv="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),fp="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),hp=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Hv=hr,zv=hr;function Vv(i,u){return i?n(this._months)?this._months[i.month()]:this._months[(this._months.isFormat||hp).test(u)?"format":"standalone"][i.month()]:n(this._months)?this._months:this._months.standalone}function Kv(i,u){return i?n(this._monthsShort)?this._monthsShort[i.month()]:this._monthsShort[hp.test(u)?"format":"standalone"][i.month()]:n(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function Zv(i,u,d){var h,p,b,x=i.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],h=0;h<12;++h)b=T([2e3,h]),this._shortMonthsParse[h]=this.monthsShort(b,"").toLocaleLowerCase(),this._longMonthsParse[h]=this.months(b,"").toLocaleLowerCase();return d?u==="MMM"?(p=st.call(this._shortMonthsParse,x),p!==-1?p:null):(p=st.call(this._longMonthsParse,x),p!==-1?p:null):u==="MMM"?(p=st.call(this._shortMonthsParse,x),p!==-1?p:(p=st.call(this._longMonthsParse,x),p!==-1?p:null)):(p=st.call(this._longMonthsParse,x),p!==-1?p:(p=st.call(this._shortMonthsParse,x),p!==-1?p:null))}function Xv(i,u,d){var h,p,b;if(this._monthsParseExact)return Zv.call(this,i,u,d);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),h=0;h<12;h++){if(p=T([2e3,h]),d&&!this._longMonthsParse[h]&&(this._longMonthsParse[h]=new RegExp("^"+this.months(p,"").replace(".","")+"$","i"),this._shortMonthsParse[h]=new RegExp("^"+this.monthsShort(p,"").replace(".","")+"$","i")),!d&&!this._monthsParse[h]&&(b="^"+this.months(p,"")+"|^"+this.monthsShort(p,""),this._monthsParse[h]=new RegExp(b.replace(".",""),"i")),d&&u==="MMMM"&&this._longMonthsParse[h].test(i))return h;if(d&&u==="MMM"&&this._shortMonthsParse[h].test(i))return h;if(!d&&this._monthsParse[h].test(i))return h}}function pp(i,u){var d;if(!i.isValid())return i;if(typeof u=="string"){if(/^\d+$/.test(u))u=ce(u);else if(u=i.localeData().monthsParse(u),!c(u))return i}return d=Math.min(i.date(),ho(i.year(),u)),i._d["set"+(i._isUTC?"UTC":"")+"Month"](u,d),i}function mp(i){return i!=null?(pp(this,i),e.updateOffset(this,!0),this):Rt(this,"Month")}function Qv(){return ho(this.year(),this.month())}function Jv(i){return this._monthsParseExact?(a(this,"_monthsRegex")||yp.call(this),i?this._monthsShortStrictRegex:this._monthsShortRegex):(a(this,"_monthsShortRegex")||(this._monthsShortRegex=Hv),this._monthsShortStrictRegex&&i?this._monthsShortStrictRegex:this._monthsShortRegex)}function ew(i){return this._monthsParseExact?(a(this,"_monthsRegex")||yp.call(this),i?this._monthsStrictRegex:this._monthsRegex):(a(this,"_monthsRegex")||(this._monthsRegex=zv),this._monthsStrictRegex&&i?this._monthsStrictRegex:this._monthsRegex)}function yp(){function i(x,re){return re.length-x.length}var u=[],d=[],h=[],p,b;for(p=0;p<12;p++)b=T([2e3,p]),u.push(this.monthsShort(b,"")),d.push(this.months(b,"")),h.push(this.months(b,"")),h.push(this.monthsShort(b,""));for(u.sort(i),d.sort(i),h.sort(i),p=0;p<12;p++)u[p]=pt(u[p]),d[p]=pt(d[p]);for(p=0;p<24;p++)h[p]=pt(h[p]);this._monthsRegex=new RegExp("^("+h.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+d.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+u.join("|")+")","i")}k("Y",0,0,function(){var i=this.year();return i<=9999?_(i,4):"+"+i}),k(0,["YY",2],0,function(){return this.year()%100}),k(0,["YYYY",4],0,"year"),k(0,["YYYYY",5],0,"year"),k(0,["YYYYYY",6,!0],0,"year"),ft("year","y"),$e("year",1),H("Y",xn),H("YY",Ye,Tt),H("YYYY",Rn,dr),H("YYYYY",rs,Xr),H("YYYYYY",rs,Xr),Ae(["YYYYY","YYYYYY"],tt),Ae("YYYY",function(i,u){u[tt]=i.length===2?e.parseTwoDigitYear(i):ce(i)}),Ae("YY",function(i,u){u[tt]=e.parseTwoDigitYear(i)}),Ae("Y",function(i,u){u[tt]=parseInt(i,10)});function Ni(i){return Jn(i)?366:365}e.parseTwoDigitYear=function(i){return ce(i)+(ce(i)>68?1900:2e3)};var gp=Zr("FullYear",!0);function tw(){return Jn(this.year())}function rw(i,u,d,h,p,b,x){var re;return i<100&&i>=0?(re=new Date(i+400,u,d,h,p,b,x),isFinite(re.getFullYear())&&re.setFullYear(i)):re=new Date(i,u,d,h,p,b,x),re}function Ci(i){var u,d;return i<100&&i>=0?(d=Array.prototype.slice.call(arguments),d[0]=i+400,u=new Date(Date.UTC.apply(null,d)),isFinite(u.getUTCFullYear())&&u.setUTCFullYear(i)):u=new Date(Date.UTC.apply(null,arguments)),u}function po(i,u,d){var h=7+u-d,p=(7+Ci(i,0,h).getUTCDay()-u)%7;return-p+h-1}function _p(i,u,d,h,p){var b=(7+d-h)%7,x=po(i,h,p),re=1+7*(u-1)+b+x,me,Ue;return re<=0?(me=i-1,Ue=Ni(me)+re):re>Ni(i)?(me=i+1,Ue=re-Ni(i)):(me=i,Ue=re),{year:me,dayOfYear:Ue}}function Ii(i,u,d){var h=po(i.year(),u,d),p=Math.floor((i.dayOfYear()-h-1)/7)+1,b,x;return p<1?(x=i.year()-1,b=p+Jr(x,u,d)):p>Jr(i.year(),u,d)?(b=p-Jr(i.year(),u,d),x=i.year()+1):(x=i.year(),b=p),{week:b,year:x}}function Jr(i,u,d){var h=po(i,u,d),p=po(i+1,u,d);return(Ni(i)-h+p)/7}k("w",["ww",2],"wo","week"),k("W",["WW",2],"Wo","isoWeek"),ft("week","w"),ft("isoWeek","W"),$e("week",5),$e("isoWeek",5),H("w",Ye),H("ww",Ye,Tt),H("W",Ye),H("WW",Ye,Tt),mr(["w","ww","W","WW"],function(i,u,d,h){u[h.substr(0,1)]=ce(i)});function nw(i){return Ii(i,this._week.dow,this._week.doy).week}var sw={dow:0,doy:6};function iw(){return this._week.dow}function aw(){return this._week.doy}function ow(i){var u=this.localeData().week(this);return i==null?u:this.add((i-u)*7,"d")}function uw(i){var u=Ii(this,1,4).week;return i==null?u:this.add((i-u)*7,"d")}k("d",0,"do","day"),k("dd",0,0,function(i){return this.localeData().weekdaysMin(this,i)}),k("ddd",0,0,function(i){return this.localeData().weekdaysShort(this,i)}),k("dddd",0,0,function(i){return this.localeData().weekdays(this,i)}),k("e",0,0,"weekday"),k("E",0,0,"isoWeekday"),ft("day","d"),ft("weekday","e"),ft("isoWeekday","E"),$e("day",11),$e("weekday",11),$e("isoWeekday",11),H("d",Ye),H("e",Ye),H("E",Ye),H("dd",function(i,u){return u.weekdaysMinRegex(i)}),H("ddd",function(i,u){return u.weekdaysShortRegex(i)}),H("dddd",function(i,u){return u.weekdaysRegex(i)}),mr(["dd","ddd","dddd"],function(i,u,d,h){var p=d._locale.weekdaysParse(i,h,d._strict);p!=null?u.d=p:v(d).invalidWeekday=i}),mr(["d","e","E"],function(i,u,d,h){u[h]=ce(i)});function lw(i,u){return typeof i!="string"?i:isNaN(i)?(i=u.weekdaysParse(i),typeof i=="number"?i:null):parseInt(i,10)}function cw(i,u){return typeof i=="string"?u.weekdaysParse(i)%7||7:isNaN(i)?null:i}function fl(i,u){return i.slice(u,7).concat(i.slice(0,u))}var dw="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Tp="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),fw="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),hw=hr,pw=hr,mw=hr;function yw(i,u){var d=n(this._weekdays)?this._weekdays:this._weekdays[i&&i!==!0&&this._weekdays.isFormat.test(u)?"format":"standalone"];return i===!0?fl(d,this._week.dow):i?d[i.day()]:d}function gw(i){return i===!0?fl(this._weekdaysShort,this._week.dow):i?this._weekdaysShort[i.day()]:this._weekdaysShort}function _w(i){return i===!0?fl(this._weekdaysMin,this._week.dow):i?this._weekdaysMin[i.day()]:this._weekdaysMin}function Tw(i,u,d){var h,p,b,x=i.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],h=0;h<7;++h)b=T([2e3,1]).day(h),this._minWeekdaysParse[h]=this.weekdaysMin(b,"").toLocaleLowerCase(),this._shortWeekdaysParse[h]=this.weekdaysShort(b,"").toLocaleLowerCase(),this._weekdaysParse[h]=this.weekdays(b,"").toLocaleLowerCase();return d?u==="dddd"?(p=st.call(this._weekdaysParse,x),p!==-1?p:null):u==="ddd"?(p=st.call(this._shortWeekdaysParse,x),p!==-1?p:null):(p=st.call(this._minWeekdaysParse,x),p!==-1?p:null):u==="dddd"?(p=st.call(this._weekdaysParse,x),p!==-1||(p=st.call(this._shortWeekdaysParse,x),p!==-1)?p:(p=st.call(this._minWeekdaysParse,x),p!==-1?p:null)):u==="ddd"?(p=st.call(this._shortWeekdaysParse,x),p!==-1||(p=st.call(this._weekdaysParse,x),p!==-1)?p:(p=st.call(this._minWeekdaysParse,x),p!==-1?p:null)):(p=st.call(this._minWeekdaysParse,x),p!==-1||(p=st.call(this._weekdaysParse,x),p!==-1)?p:(p=st.call(this._shortWeekdaysParse,x),p!==-1?p:null))}function bw(i,u,d){var h,p,b;if(this._weekdaysParseExact)return Tw.call(this,i,u,d);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),h=0;h<7;h++){if(p=T([2e3,1]).day(h),d&&!this._fullWeekdaysParse[h]&&(this._fullWeekdaysParse[h]=new RegExp("^"+this.weekdays(p,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[h]=new RegExp("^"+this.weekdaysShort(p,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[h]=new RegExp("^"+this.weekdaysMin(p,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[h]||(b="^"+this.weekdays(p,"")+"|^"+this.weekdaysShort(p,"")+"|^"+this.weekdaysMin(p,""),this._weekdaysParse[h]=new RegExp(b.replace(".",""),"i")),d&&u==="dddd"&&this._fullWeekdaysParse[h].test(i))return h;if(d&&u==="ddd"&&this._shortWeekdaysParse[h].test(i))return h;if(d&&u==="dd"&&this._minWeekdaysParse[h].test(i))return h;if(!d&&this._weekdaysParse[h].test(i))return h}}function vw(i){if(!this.isValid())return i!=null?this:NaN;var u=this._isUTC?this._d.getUTCDay():this._d.getDay();return i!=null?(i=lw(i,this.localeData()),this.add(i-u,"d")):u}function ww(i){if(!this.isValid())return i!=null?this:NaN;var u=(this.day()+7-this.localeData()._week.dow)%7;return i==null?u:this.add(i-u,"d")}function Dw(i){if(!this.isValid())return i!=null?this:NaN;if(i!=null){var u=cw(i,this.localeData());return this.day(this.day()%7?u:u-7)}else return this.day()||7}function kw(i){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||hl.call(this),i?this._weekdaysStrictRegex:this._weekdaysRegex):(a(this,"_weekdaysRegex")||(this._weekdaysRegex=hw),this._weekdaysStrictRegex&&i?this._weekdaysStrictRegex:this._weekdaysRegex)}function Ew(i){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||hl.call(this),i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(a(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=pw),this._weekdaysShortStrictRegex&&i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Sw(i){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||hl.call(this),i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(a(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=mw),this._weekdaysMinStrictRegex&&i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function hl(){function i(Gt,sn){return sn.length-Gt.length}var u=[],d=[],h=[],p=[],b,x,re,me,Ue;for(b=0;b<7;b++)x=T([2e3,1]).day(b),re=pt(this.weekdaysMin(x,"")),me=pt(this.weekdaysShort(x,"")),Ue=pt(this.weekdays(x,"")),u.push(re),d.push(me),h.push(Ue),p.push(re),p.push(me),p.push(Ue);u.sort(i),d.sort(i),h.sort(i),p.sort(i),this._weekdaysRegex=new RegExp("^("+p.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+h.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+u.join("|")+")","i")}function pl(){return this.hours()%12||12}function Ow(){return this.hours()||24}k("H",["HH",2],0,"hour"),k("h",["hh",2],0,pl),k("k",["kk",2],0,Ow),k("hmm",0,0,function(){return""+pl.apply(this)+_(this.minutes(),2)}),k("hmmss",0,0,function(){return""+pl.apply(this)+_(this.minutes(),2)+_(this.seconds(),2)}),k("Hmm",0,0,function(){return""+this.hours()+_(this.minutes(),2)}),k("Hmmss",0,0,function(){return""+this.hours()+_(this.minutes(),2)+_(this.seconds(),2)});function bp(i,u){k(i,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),u)})}bp("a",!0),bp("A",!1),ft("hour","h"),$e("hour",13);function vp(i,u){return u._meridiemParse}H("a",vp),H("A",vp),H("H",Ye),H("h",Ye),H("k",Ye),H("HH",Ye,Tt),H("hh",Ye,Tt),H("kk",Ye,Tt),H("hmm",Mn),H("hmmss",Ls),H("Hmm",Mn),H("Hmmss",Ls),Ae(["H","HH"],ne),Ae(["k","kk"],function(i,u,d){var h=ce(i);u[ne]=h===24?0:h}),Ae(["a","A"],function(i,u,d){d._isPm=d._locale.isPM(i),d._meridiem=i}),Ae(["h","hh"],function(i,u,d){u[ne]=ce(i),v(d).bigHour=!0}),Ae("hmm",function(i,u,d){var h=i.length-2;u[ne]=ce(i.substr(0,h)),u[ue]=ce(i.substr(h)),v(d).bigHour=!0}),Ae("hmmss",function(i,u,d){var h=i.length-4,p=i.length-2;u[ne]=ce(i.substr(0,h)),u[ue]=ce(i.substr(h,2)),u[$t]=ce(i.substr(p)),v(d).bigHour=!0}),Ae("Hmm",function(i,u,d){var h=i.length-2;u[ne]=ce(i.substr(0,h)),u[ue]=ce(i.substr(h))}),Ae("Hmmss",function(i,u,d){var h=i.length-4,p=i.length-2;u[ne]=ce(i.substr(0,h)),u[ue]=ce(i.substr(h,2)),u[$t]=ce(i.substr(p))});function Mw(i){return(i+"").toLowerCase().charAt(0)==="p"}var Rw=/[ap]\.?m?\.?/i,xw=Zr("Hours",!0);function Pw(i,u,d){return i>11?d?"pm":"PM":d?"am":"AM"}var wp={calendar:oe,longDateFormat:ke,invalidDate:le,ordinal:K,dayOfMonthOrdinalParse:qe,relativeTime:dt,months:Bv,monthsShort:fp,week:sw,weekdays:dw,weekdaysMin:fw,weekdaysShort:Tp,meridiemParse:Rw},et={},Fi={},Li;function Aw(i,u){var d,h=Math.min(i.length,u.length);for(d=0;d<h;d+=1)if(i[d]!==u[d])return d;return h}function Dp(i){return i&&i.toLowerCase().replace("_","-")}function Nw(i){for(var u=0,d,h,p,b;u<i.length;){for(b=Dp(i[u]).split("-"),d=b.length,h=Dp(i[u+1]),h=h?h.split("-"):null;d>0;){if(p=mo(b.slice(0,d).join("-")),p)return p;if(h&&h.length>=d&&Aw(b,h)>=d-1)break;d--}u++}return Li}function Cw(i){return i.match("^[^/\\\\]*$")!=null}function mo(i){var u=null,d;if(et[i]===void 0&&typeof ai!="undefined"&&ai&&ai.exports&&Cw(i))try{u=Li._abbr,d=require,d("./locale/"+i),Pn(u)}catch(h){et[i]=null}return et[i]}function Pn(i,u){var d;return i&&(l(u)?d=en(i):d=ml(i,u),d?Li=d:typeof console!="undefined"&&console.warn&&console.warn("Locale "+i+" not found. Did you forget to load it?")),Li._abbr}function ml(i,u){if(u!==null){var d,h=wp;if(u.abbr=i,et[i]!=null)gt("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),h=et[i]._config;else if(u.parentLocale!=null)if(et[u.parentLocale]!=null)h=et[u.parentLocale]._config;else if(d=mo(u.parentLocale),d!=null)h=d._config;else return Fi[u.parentLocale]||(Fi[u.parentLocale]=[]),Fi[u.parentLocale].push({name:i,config:u}),null;return et[i]=new Q(P(h,u)),Fi[i]&&Fi[i].forEach(function(p){ml(p.name,p.config)}),Pn(i),et[i]}else return delete et[i],null}function Iw(i,u){if(u!=null){var d,h,p=wp;et[i]!=null&&et[i].parentLocale!=null?et[i].set(P(et[i]._config,u)):(h=mo(i),h!=null&&(p=h._config),u=P(p,u),h==null&&(u.abbr=i),d=new Q(u),d.parentLocale=et[i],et[i]=d),Pn(i)}else et[i]!=null&&(et[i].parentLocale!=null?(et[i]=et[i].parentLocale,i===Pn()&&Pn(i)):et[i]!=null&&delete et[i]);return et[i]}function en(i){var u;if(i&&i._locale&&i._locale._abbr&&(i=i._locale._abbr),!i)return Li;if(!n(i)){if(u=mo(i),u)return u;i=[i]}return Nw(i)}function Fw(){return Y(et)}function yl(i){var u,d=i._a;return d&&v(i).overflow===-2&&(u=d[Je]<0||d[Je]>11?Je:d[G]<1||d[G]>ho(d[tt],d[Je])?G:d[ne]<0||d[ne]>24||d[ne]===24&&(d[ue]!==0||d[$t]!==0||d[ss]!==0)?ne:d[ue]<0||d[ue]>59?ue:d[$t]<0||d[$t]>59?$t:d[ss]<0||d[ss]>999?ss:-1,v(i)._overflowDayOfYear&&(u<tt||u>G)&&(u=G),v(i)._overflowWeeks&&u===-1&&(u=jv),v(i)._overflowWeekday&&u===-1&&(u=$v),v(i).overflow=u),i}var Lw=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Yw=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Uw=/Z|[+-]\d\d(?::?\d\d)?/,yo=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],gl=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Ww=/^\/?Date\((-?\d+)/i,qw=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,jw={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function kp(i){var u,d,h=i._i,p=Lw.exec(h)||Yw.exec(h),b,x,re,me,Ue=yo.length,Gt=gl.length;if(p){for(v(i).iso=!0,u=0,d=Ue;u<d;u++)if(yo[u][1].exec(p[1])){x=yo[u][0],b=yo[u][2]!==!1;break}if(x==null){i._isValid=!1;return}if(p[3]){for(u=0,d=Gt;u<d;u++)if(gl[u][1].exec(p[3])){re=(p[2]||" ")+gl[u][0];break}if(re==null){i._isValid=!1;return}}if(!b&&re!=null){i._isValid=!1;return}if(p[4])if(Uw.exec(p[4]))me="Z";else{i._isValid=!1;return}i._f=x+(re||"")+(me||""),Tl(i)}else i._isValid=!1}function $w(i,u,d,h,p,b){var x=[Gw(i),fp.indexOf(u),parseInt(d,10),parseInt(h,10),parseInt(p,10)];return b&&x.push(parseInt(b,10)),x}function Gw(i){var u=parseInt(i,10);return u<=49?2e3+u:u<=999?1900+u:u}function Bw(i){return i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Hw(i,u,d){if(i){var h=Tp.indexOf(i),p=new Date(u[0],u[1],u[2]).getDay();if(h!==p)return v(d).weekdayMismatch=!0,d._isValid=!1,!1}return!0}function zw(i,u,d){if(i)return jw[i];if(u)return 0;var h=parseInt(d,10),p=h%100,b=(h-p)/100;return b*60+p}function Ep(i){var u=qw.exec(Bw(i._i)),d;if(u){if(d=$w(u[4],u[3],u[2],u[5],u[6],u[7]),!Hw(u[1],d,i))return;i._a=d,i._tzm=zw(u[8],u[9],u[10]),i._d=Ci.apply(null,i._a),i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),v(i).rfc2822=!0}else i._isValid=!1}function Vw(i){var u=Ww.exec(i._i);if(u!==null){i._d=new Date(+u[1]);return}if(kp(i),i._isValid===!1)delete i._isValid;else return;if(Ep(i),i._isValid===!1)delete i._isValid;else return;i._strict?i._isValid=!1:e.createFromInputFallback(i)}e.createFromInputFallback=te("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(i){i._d=new Date(i._i+(i._useUTC?" UTC":""))});function Us(i,u,d){return i!=null?i:u!=null?u:d}function Kw(i){var u=new Date(e.now());return i._useUTC?[u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()]:[u.getFullYear(),u.getMonth(),u.getDate()]}function _l(i){var u,d,h=[],p,b,x;if(!i._d){for(p=Kw(i),i._w&&i._a[G]==null&&i._a[Je]==null&&Zw(i),i._dayOfYear!=null&&(x=Us(i._a[tt],p[tt]),(i._dayOfYear>Ni(x)||i._dayOfYear===0)&&(v(i)._overflowDayOfYear=!0),d=Ci(x,0,i._dayOfYear),i._a[Je]=d.getUTCMonth(),i._a[G]=d.getUTCDate()),u=0;u<3&&i._a[u]==null;++u)i._a[u]=h[u]=p[u];for(;u<7;u++)i._a[u]=h[u]=i._a[u]==null?u===2?1:0:i._a[u];i._a[ne]===24&&i._a[ue]===0&&i._a[$t]===0&&i._a[ss]===0&&(i._nextDay=!0,i._a[ne]=0),i._d=(i._useUTC?Ci:rw).apply(null,h),b=i._useUTC?i._d.getUTCDay():i._d.getDay(),i._tzm!=null&&i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),i._nextDay&&(i._a[ne]=24),i._w&&typeof i._w.d!="undefined"&&i._w.d!==b&&(v(i).weekdayMismatch=!0)}}function Zw(i){var u,d,h,p,b,x,re,me,Ue;u=i._w,u.GG!=null||u.W!=null||u.E!=null?(b=1,x=4,d=Us(u.GG,i._a[tt],Ii(Ve(),1,4).year),h=Us(u.W,1),p=Us(u.E,1),(p<1||p>7)&&(me=!0)):(b=i._locale._week.dow,x=i._locale._week.doy,Ue=Ii(Ve(),b,x),d=Us(u.gg,i._a[tt],Ue.year),h=Us(u.w,Ue.week),u.d!=null?(p=u.d,(p<0||p>6)&&(me=!0)):u.e!=null?(p=u.e+b,(u.e<0||u.e>6)&&(me=!0)):p=b),h<1||h>Jr(d,b,x)?v(i)._overflowWeeks=!0:me!=null?v(i)._overflowWeekday=!0:(re=_p(d,h,p,b,x),i._a[tt]=re.year,i._dayOfYear=re.dayOfYear)}e.ISO_8601=function(){},e.RFC_2822=function(){};function Tl(i){if(i._f===e.ISO_8601){kp(i);return}if(i._f===e.RFC_2822){Ep(i);return}i._a=[],v(i).empty=!0;var u=""+i._i,d,h,p,b,x,re=u.length,me=0,Ue,Gt;for(p=j(i._f,i._locale).match(w)||[],Gt=p.length,d=0;d<Gt;d++)b=p[d],h=(u.match(Ys(b,i))||[])[0],h&&(x=u.substr(0,u.indexOf(h)),x.length>0&&v(i).unusedInput.push(x),u=u.slice(u.indexOf(h)+h.length),me+=h.length),M[b]?(h?v(i).empty=!1:v(i).unusedTokens.push(b),Lt(b,h,i)):i._strict&&!h&&v(i).unusedTokens.push(b);v(i).charsLeftOver=re-me,u.length>0&&v(i).unusedInput.push(u),i._a[ne]<=12&&v(i).bigHour===!0&&i._a[ne]>0&&(v(i).bigHour=void 0),v(i).parsedDateParts=i._a.slice(0),v(i).meridiem=i._meridiem,i._a[ne]=Xw(i._locale,i._a[ne],i._meridiem),Ue=v(i).era,Ue!==null&&(i._a[tt]=i._locale.erasConvertYear(Ue,i._a[tt])),_l(i),yl(i)}function Xw(i,u,d){var h;return d==null?u:i.meridiemHour!=null?i.meridiemHour(u,d):(i.isPM!=null&&(h=i.isPM(d),h&&u<12&&(u+=12),!h&&u===12&&(u=0)),u)}function Qw(i){var u,d,h,p,b,x,re=!1,me=i._f.length;if(me===0){v(i).invalidFormat=!0,i._d=new Date(NaN);return}for(p=0;p<me;p++)b=0,x=!1,u=De({},i),i._useUTC!=null&&(u._useUTC=i._useUTC),u._f=i._f[p],Tl(u),C(u)&&(x=!0),b+=v(u).charsLeftOver,b+=v(u).unusedTokens.length*10,v(u).score=b,re?b<h&&(h=b,d=u):(h==null||b<h||x)&&(h=b,d=u,x&&(re=!0));g(i,d||u)}function Jw(i){if(!i._d){var u=Sn(i._i),d=u.day===void 0?u.date:u.day;i._a=m([u.year,u.month,d,u.hour,u.minute,u.second,u.millisecond],function(h){return h&&parseInt(h,10)}),_l(i)}}function e0(i){var u=new Te(yl(Sp(i)));return u._nextDay&&(u.add(1,"d"),u._nextDay=void 0),u}function Sp(i){var u=i._i,d=i._f;return i._locale=i._locale||en(i._l),u===null||d===void 0&&u===""?$({nullInput:!0}):(typeof u=="string"&&(i._i=u=i._locale.preparse(u)),be(u)?new Te(yl(u)):(f(u)?i._d=u:n(d)?Qw(i):d?Tl(i):t0(i),C(i)||(i._d=null),i))}function t0(i){var u=i._i;l(u)?i._d=new Date(e.now()):f(u)?i._d=new Date(u.valueOf()):typeof u=="string"?Vw(i):n(u)?(i._a=m(u.slice(0),function(d){return parseInt(d,10)}),_l(i)):s(u)?Jw(i):c(u)?i._d=new Date(u):e.createFromInputFallback(i)}function Op(i,u,d,h,p){var b={};return(u===!0||u===!1)&&(h=u,u=void 0),(d===!0||d===!1)&&(h=d,d=void 0),(s(i)&&o(i)||n(i)&&i.length===0)&&(i=void 0),b._isAMomentObject=!0,b._useUTC=b._isUTC=p,b._l=d,b._i=i,b._f=u,b._strict=h,e0(b)}function Ve(i,u,d,h){return Op(i,u,d,h,!1)}var r0=te("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var i=Ve.apply(null,arguments);return this.isValid()&&i.isValid()?i<this?this:i:$()}),n0=te("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var i=Ve.apply(null,arguments);return this.isValid()&&i.isValid()?i>this?this:i:$()});function Mp(i,u){var d,h;if(u.length===1&&n(u[0])&&(u=u[0]),!u.length)return Ve();for(d=u[0],h=1;h<u.length;++h)(!u[h].isValid()||u[h][i](d))&&(d=u[h]);return d}function s0(){var i=[].slice.call(arguments,0);return Mp("isBefore",i)}function i0(){var i=[].slice.call(arguments,0);return Mp("isAfter",i)}var a0=function(){return Date.now?Date.now():+new Date},Yi=["year","quarter","month","week","day","hour","minute","second","millisecond"];function o0(i){var u,d=!1,h,p=Yi.length;for(u in i)if(a(i,u)&&!(st.call(Yi,u)!==-1&&(i[u]==null||!isNaN(i[u]))))return!1;for(h=0;h<p;++h)if(i[Yi[h]]){if(d)return!1;parseFloat(i[Yi[h]])!==ce(i[Yi[h]])&&(d=!0)}return!0}function u0(){return this._isValid}function l0(){return Mr(NaN)}function go(i){var u=Sn(i),d=u.year||0,h=u.quarter||0,p=u.month||0,b=u.week||u.isoWeek||0,x=u.day||0,re=u.hour||0,me=u.minute||0,Ue=u.second||0,Gt=u.millisecond||0;this._isValid=o0(u),this._milliseconds=+Gt+Ue*1e3+me*6e4+re*1e3*60*60,this._days=+x+b*7,this._months=+p+h*3+d*12,this._data={},this._locale=en(),this._bubble()}function _o(i){return i instanceof go}function bl(i){return i<0?Math.round(-1*i)*-1:Math.round(i)}function c0(i,u,d){var h=Math.min(i.length,u.length),p=Math.abs(i.length-u.length),b=0,x;for(x=0;x<h;x++)(d&&i[x]!==u[x]||!d&&ce(i[x])!==ce(u[x]))&&b++;return b+p}function Rp(i,u){k(i,0,0,function(){var d=this.utcOffset(),h="+";return d<0&&(d=-d,h="-"),h+_(~~(d/60),2)+u+_(~~d%60,2)})}Rp("Z",":"),Rp("ZZ",""),H("Z",Qr),H("ZZ",Qr),Ae(["Z","ZZ"],function(i,u,d){d._useUTC=!0,d._tzm=vl(Qr,i)});var d0=/([\+\-]|\d\d)/gi;function vl(i,u){var d=(u||"").match(i),h,p,b;return d===null?null:(h=d[d.length-1]||[],p=(h+"").match(d0)||["-",0,0],b=+(p[1]*60)+ce(p[2]),b===0?0:p[0]==="+"?b:-b)}function wl(i,u){var d,h;return u._isUTC?(d=u.clone(),h=(be(i)||f(i)?i.valueOf():Ve(i).valueOf())-d.valueOf(),d._d.setTime(d._d.valueOf()+h),e.updateOffset(d,!1),d):Ve(i).local()}function Dl(i){return-Math.round(i._d.getTimezoneOffset())}e.updateOffset=function(){};function f0(i,u,d){var h=this._offset||0,p;if(!this.isValid())return i!=null?this:NaN;if(i!=null){if(typeof i=="string"){if(i=vl(Qr,i),i===null)return this}else Math.abs(i)<16&&!d&&(i=i*60);return!this._isUTC&&u&&(p=Dl(this)),this._offset=i,this._isUTC=!0,p!=null&&this.add(p,"m"),h!==i&&(!u||this._changeInProgress?Np(this,Mr(i-h,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,e.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?h:Dl(this)}function h0(i,u){return i!=null?(typeof i!="string"&&(i=-i),this.utcOffset(i,u),this):-this.utcOffset()}function p0(i){return this.utcOffset(0,i)}function m0(i){return this._isUTC&&(this.utcOffset(0,i),this._isUTC=!1,i&&this.subtract(Dl(this),"m")),this}function y0(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var i=vl(lo,this._i);i!=null?this.utcOffset(i):this.utcOffset(0,!0)}return this}function g0(i){return this.isValid()?(i=i?Ve(i).utcOffset():0,(this.utcOffset()-i)%60===0):!1}function _0(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function T0(){if(!l(this._isDSTShifted))return this._isDSTShifted;var i={},u;return De(i,this),i=Sp(i),i._a?(u=i._isUTC?T(i._a):Ve(i._a),this._isDSTShifted=this.isValid()&&c0(i._a,u.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function b0(){return this.isValid()?!this._isUTC:!1}function v0(){return this.isValid()?this._isUTC:!1}function xp(){return this.isValid()?this._isUTC&&this._offset===0:!1}var w0=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,D0=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Mr(i,u){var d=i,h=null,p,b,x;return _o(i)?d={ms:i._milliseconds,d:i._days,M:i._months}:c(i)||!isNaN(+i)?(d={},u?d[u]=+i:d.milliseconds=+i):(h=w0.exec(i))?(p=h[1]==="-"?-1:1,d={y:0,d:ce(h[G])*p,h:ce(h[ne])*p,m:ce(h[ue])*p,s:ce(h[$t])*p,ms:ce(bl(h[ss]*1e3))*p}):(h=D0.exec(i))?(p=h[1]==="-"?-1:1,d={y:is(h[2],p),M:is(h[3],p),w:is(h[4],p),d:is(h[5],p),h:is(h[6],p),m:is(h[7],p),s:is(h[8],p)}):d==null?d={}:typeof d=="object"&&("from"in d||"to"in d)&&(x=k0(Ve(d.from),Ve(d.to)),d={},d.ms=x.milliseconds,d.M=x.months),b=new go(d),_o(i)&&a(i,"_locale")&&(b._locale=i._locale),_o(i)&&a(i,"_isValid")&&(b._isValid=i._isValid),b}Mr.fn=go.prototype,Mr.invalid=l0;function is(i,u){var d=i&&parseFloat(i.replace(",","."));return(isNaN(d)?0:d)*u}function Pp(i,u){var d={};return d.months=u.month()-i.month()+(u.year()-i.year())*12,i.clone().add(d.months,"M").isAfter(u)&&--d.months,d.milliseconds=+u-+i.clone().add(d.months,"M"),d}function k0(i,u){var d;return i.isValid()&&u.isValid()?(u=wl(u,i),i.isBefore(u)?d=Pp(i,u):(d=Pp(u,i),d.milliseconds=-d.milliseconds,d.months=-d.months),d):{milliseconds:0,months:0}}function Ap(i,u){return function(d,h){var p,b;return h!==null&&!isNaN(+h)&&(gt(u,"moment()."+u+"(period, number) is deprecated. Please use moment()."+u+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),b=d,d=h,h=b),p=Mr(d,h),Np(this,p,i),this}}function Np(i,u,d,h){var p=u._milliseconds,b=bl(u._days),x=bl(u._months);!i.isValid()||(h=h==null?!0:h,x&&pp(i,Rt(i,"Month")+x*d),b&&es(i,"Date",Rt(i,"Date")+b*d),p&&i._d.setTime(i._d.valueOf()+p*d),h&&e.updateOffset(i,b||x))}var E0=Ap(1,"add"),S0=Ap(-1,"subtract");function Cp(i){return typeof i=="string"||i instanceof String}function O0(i){return be(i)||f(i)||Cp(i)||c(i)||R0(i)||M0(i)||i===null||i===void 0}function M0(i){var u=s(i)&&!o(i),d=!1,h=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],p,b,x=h.length;for(p=0;p<x;p+=1)b=h[p],d=d||a(i,b);return u&&d}function R0(i){var u=n(i),d=!1;return u&&(d=i.filter(function(h){return!c(h)&&Cp(i)}).length===0),u&&d}function x0(i){var u=s(i)&&!o(i),d=!1,h=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],p,b;for(p=0;p<h.length;p+=1)b=h[p],d=d||a(i,b);return u&&d}function P0(i,u){var d=i.diff(u,"days",!0);return d<-6?"sameElse":d<-1?"lastWeek":d<0?"lastDay":d<1?"sameDay":d<2?"nextDay":d<7?"nextWeek":"sameElse"}function A0(i,u){arguments.length===1&&(arguments[0]?O0(arguments[0])?(i=arguments[0],u=void 0):x0(arguments[0])&&(u=arguments[0],i=void 0):(i=void 0,u=void 0));var d=i||Ve(),h=wl(d,this).startOf("day"),p=e.calendarFormat(this,h)||"sameElse",b=u&&(V(u[p])?u[p].call(this,d):u[p]);return this.format(b||this.localeData().calendar(p,this,Ve(d)))}function N0(){return new Te(this)}function C0(i,u){var d=be(i)?i:Ve(i);return this.isValid()&&d.isValid()?(u=_t(u)||"millisecond",u==="millisecond"?this.valueOf()>d.valueOf():d.valueOf()<this.clone().startOf(u).valueOf()):!1}function I0(i,u){var d=be(i)?i:Ve(i);return this.isValid()&&d.isValid()?(u=_t(u)||"millisecond",u==="millisecond"?this.valueOf()<d.valueOf():this.clone().endOf(u).valueOf()<d.valueOf()):!1}function F0(i,u,d,h){var p=be(i)?i:Ve(i),b=be(u)?u:Ve(u);return this.isValid()&&p.isValid()&&b.isValid()?(h=h||"()",(h[0]==="("?this.isAfter(p,d):!this.isBefore(p,d))&&(h[1]===")"?this.isBefore(b,d):!this.isAfter(b,d))):!1}function L0(i,u){var d=be(i)?i:Ve(i),h;return this.isValid()&&d.isValid()?(u=_t(u)||"millisecond",u==="millisecond"?this.valueOf()===d.valueOf():(h=d.valueOf(),this.clone().startOf(u).valueOf()<=h&&h<=this.clone().endOf(u).valueOf())):!1}function Y0(i,u){return this.isSame(i,u)||this.isAfter(i,u)}function U0(i,u){return this.isSame(i,u)||this.isBefore(i,u)}function W0(i,u,d){var h,p,b;if(!this.isValid())return NaN;if(h=wl(i,this),!h.isValid())return NaN;switch(p=(h.utcOffset()-this.utcOffset())*6e4,u=_t(u),u){case"year":b=To(this,h)/12;break;case"month":b=To(this,h);break;case"quarter":b=To(this,h)/3;break;case"second":b=(this-h)/1e3;break;case"minute":b=(this-h)/6e4;break;case"hour":b=(this-h)/36e5;break;case"day":b=(this-h-p)/864e5;break;case"week":b=(this-h-p)/6048e5;break;default:b=this-h}return d?b:ht(b)}function To(i,u){if(i.date()<u.date())return-To(u,i);var d=(u.year()-i.year())*12+(u.month()-i.month()),h=i.clone().add(d,"months"),p,b;return u-h<0?(p=i.clone().add(d-1,"months"),b=(u-h)/(h-p)):(p=i.clone().add(d+1,"months"),b=(u-h)/(p-h)),-(d+b)||0}e.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",e.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function q0(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function j0(i){if(!this.isValid())return null;var u=i!==!0,d=u?this.clone().utc():this;return d.year()<0||d.year()>9999?N(d,u?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):V(Date.prototype.toISOString)?u?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",N(d,"Z")):N(d,u?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function $0(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var i="moment",u="",d,h,p,b;return this.isLocal()||(i=this.utcOffset()===0?"moment.utc":"moment.parseZone",u="Z"),d="["+i+'("]',h=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",p="-MM-DD[T]HH:mm:ss.SSS",b=u+'[")]',this.format(d+h+p+b)}function G0(i){i||(i=this.isUtc()?e.defaultFormatUtc:e.defaultFormat);var u=N(this,i);return this.localeData().postformat(u)}function B0(i,u){return this.isValid()&&(be(i)&&i.isValid()||Ve(i).isValid())?Mr({to:this,from:i}).locale(this.locale()).humanize(!u):this.localeData().invalidDate()}function H0(i){return this.from(Ve(),i)}function z0(i,u){return this.isValid()&&(be(i)&&i.isValid()||Ve(i).isValid())?Mr({from:this,to:i}).locale(this.locale()).humanize(!u):this.localeData().invalidDate()}function V0(i){return this.to(Ve(),i)}function Ip(i){var u;return i===void 0?this._locale._abbr:(u=en(i),u!=null&&(this._locale=u),this)}var Fp=te("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(i){return i===void 0?this.localeData():this.locale(i)});function Lp(){return this._locale}var bo=1e3,Ws=60*bo,vo=60*Ws,Yp=(365*400+97)*24*vo;function qs(i,u){return(i%u+u)%u}function Up(i,u,d){return i<100&&i>=0?new Date(i+400,u,d)-Yp:new Date(i,u,d).valueOf()}function Wp(i,u,d){return i<100&&i>=0?Date.UTC(i+400,u,d)-Yp:Date.UTC(i,u,d)}function K0(i){var u,d;if(i=_t(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(d=this._isUTC?Wp:Up,i){case"year":u=d(this.year(),0,1);break;case"quarter":u=d(this.year(),this.month()-this.month()%3,1);break;case"month":u=d(this.year(),this.month(),1);break;case"week":u=d(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":u=d(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":u=d(this.year(),this.month(),this.date());break;case"hour":u=this._d.valueOf(),u-=qs(u+(this._isUTC?0:this.utcOffset()*Ws),vo);break;case"minute":u=this._d.valueOf(),u-=qs(u,Ws);break;case"second":u=this._d.valueOf(),u-=qs(u,bo);break}return this._d.setTime(u),e.updateOffset(this,!0),this}function Z0(i){var u,d;if(i=_t(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(d=this._isUTC?Wp:Up,i){case"year":u=d(this.year()+1,0,1)-1;break;case"quarter":u=d(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":u=d(this.year(),this.month()+1,1)-1;break;case"week":u=d(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":u=d(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":u=d(this.year(),this.month(),this.date()+1)-1;break;case"hour":u=this._d.valueOf(),u+=vo-qs(u+(this._isUTC?0:this.utcOffset()*Ws),vo)-1;break;case"minute":u=this._d.valueOf(),u+=Ws-qs(u,Ws)-1;break;case"second":u=this._d.valueOf(),u+=bo-qs(u,bo)-1;break}return this._d.setTime(u),e.updateOffset(this,!0),this}function X0(){return this._d.valueOf()-(this._offset||0)*6e4}function Q0(){return Math.floor(this.valueOf()/1e3)}function J0(){return new Date(this.valueOf())}function e1(){var i=this;return[i.year(),i.month(),i.date(),i.hour(),i.minute(),i.second(),i.millisecond()]}function t1(){var i=this;return{years:i.year(),months:i.month(),date:i.date(),hours:i.hours(),minutes:i.minutes(),seconds:i.seconds(),milliseconds:i.milliseconds()}}function r1(){return this.isValid()?this.toISOString():null}function n1(){return C(this)}function s1(){return g({},v(this))}function i1(){return v(this).overflow}function a1(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}k("N",0,0,"eraAbbr"),k("NN",0,0,"eraAbbr"),k("NNN",0,0,"eraAbbr"),k("NNNN",0,0,"eraName"),k("NNNNN",0,0,"eraNarrow"),k("y",["y",1],"yo","eraYear"),k("y",["yy",2],0,"eraYear"),k("y",["yyy",3],0,"eraYear"),k("y",["yyyy",4],0,"eraYear"),H("N",kl),H("NN",kl),H("NNN",kl),H("NNNN",g1),H("NNNNN",_1),Ae(["N","NN","NNN","NNNN","NNNNN"],function(i,u,d,h){var p=d._locale.erasParse(i,h,d._strict);p?v(d).era=p:v(d).invalidEra=i}),H("y",fr),H("yy",fr),H("yyy",fr),H("yyyy",fr),H("yo",T1),Ae(["y","yy","yyy","yyyy"],tt),Ae(["yo"],function(i,u,d,h){var p;d._locale._eraYearOrdinalRegex&&(p=i.match(d._locale._eraYearOrdinalRegex)),d._locale.eraYearOrdinalParse?u[tt]=d._locale.eraYearOrdinalParse(i,p):u[tt]=parseInt(i,10)});function o1(i,u){var d,h,p,b=this._eras||en("en")._eras;for(d=0,h=b.length;d<h;++d){switch(typeof b[d].since){case"string":p=e(b[d].since).startOf("day"),b[d].since=p.valueOf();break}switch(typeof b[d].until){case"undefined":b[d].until=1/0;break;case"string":p=e(b[d].until).startOf("day").valueOf(),b[d].until=p.valueOf();break}}return b}function u1(i,u,d){var h,p,b=this.eras(),x,re,me;for(i=i.toUpperCase(),h=0,p=b.length;h<p;++h)if(x=b[h].name.toUpperCase(),re=b[h].abbr.toUpperCase(),me=b[h].narrow.toUpperCase(),d)switch(u){case"N":case"NN":case"NNN":if(re===i)return b[h];break;case"NNNN":if(x===i)return b[h];break;case"NNNNN":if(me===i)return b[h];break}else if([x,re,me].indexOf(i)>=0)return b[h]}function l1(i,u){var d=i.since<=i.until?1:-1;return u===void 0?e(i.since).year():e(i.since).year()+(u-i.offset)*d}function c1(){var i,u,d,h=this.localeData().eras();for(i=0,u=h.length;i<u;++i)if(d=this.clone().startOf("day").valueOf(),h[i].since<=d&&d<=h[i].until||h[i].until<=d&&d<=h[i].since)return h[i].name;return""}function d1(){var i,u,d,h=this.localeData().eras();for(i=0,u=h.length;i<u;++i)if(d=this.clone().startOf("day").valueOf(),h[i].since<=d&&d<=h[i].until||h[i].until<=d&&d<=h[i].since)return h[i].narrow;return""}function f1(){var i,u,d,h=this.localeData().eras();for(i=0,u=h.length;i<u;++i)if(d=this.clone().startOf("day").valueOf(),h[i].since<=d&&d<=h[i].until||h[i].until<=d&&d<=h[i].since)return h[i].abbr;return""}function h1(){var i,u,d,h,p=this.localeData().eras();for(i=0,u=p.length;i<u;++i)if(d=p[i].since<=p[i].until?1:-1,h=this.clone().startOf("day").valueOf(),p[i].since<=h&&h<=p[i].until||p[i].until<=h&&h<=p[i].since)return(this.year()-e(p[i].since).year())*d+p[i].offset;return this.year()}function p1(i){return a(this,"_erasNameRegex")||El.call(this),i?this._erasNameRegex:this._erasRegex}function m1(i){return a(this,"_erasAbbrRegex")||El.call(this),i?this._erasAbbrRegex:this._erasRegex}function y1(i){return a(this,"_erasNarrowRegex")||El.call(this),i?this._erasNarrowRegex:this._erasRegex}function kl(i,u){return u.erasAbbrRegex(i)}function g1(i,u){return u.erasNameRegex(i)}function _1(i,u){return u.erasNarrowRegex(i)}function T1(i,u){return u._eraYearOrdinalRegex||fr}function El(){var i=[],u=[],d=[],h=[],p,b,x=this.eras();for(p=0,b=x.length;p<b;++p)u.push(pt(x[p].name)),i.push(pt(x[p].abbr)),d.push(pt(x[p].narrow)),h.push(pt(x[p].name)),h.push(pt(x[p].abbr)),h.push(pt(x[p].narrow));this._erasRegex=new RegExp("^("+h.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+u.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+i.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+d.join("|")+")","i")}k(0,["gg",2],0,function(){return this.weekYear()%100}),k(0,["GG",2],0,function(){return this.isoWeekYear()%100});function wo(i,u){k(0,[i,i.length],0,u)}wo("gggg","weekYear"),wo("ggggg","weekYear"),wo("GGGG","isoWeekYear"),wo("GGGGG","isoWeekYear"),ft("weekYear","gg"),ft("isoWeekYear","GG"),$e("weekYear",1),$e("isoWeekYear",1),H("G",xn),H("g",xn),H("GG",Ye,Tt),H("gg",Ye,Tt),H("GGGG",Rn,dr),H("gggg",Rn,dr),H("GGGGG",rs,Xr),H("ggggg",rs,Xr),mr(["gggg","ggggg","GGGG","GGGGG"],function(i,u,d,h){u[h.substr(0,2)]=ce(i)}),mr(["gg","GG"],function(i,u,d,h){u[h]=e.parseTwoDigitYear(i)});function b1(i){return qp.call(this,i,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function v1(i){return qp.call(this,i,this.isoWeek(),this.isoWeekday(),1,4)}function w1(){return Jr(this.year(),1,4)}function D1(){return Jr(this.isoWeekYear(),1,4)}function k1(){var i=this.localeData()._week;return Jr(this.year(),i.dow,i.doy)}function E1(){var i=this.localeData()._week;return Jr(this.weekYear(),i.dow,i.doy)}function qp(i,u,d,h,p){var b;return i==null?Ii(this,h,p).year:(b=Jr(i,h,p),u>b&&(u=b),S1.call(this,i,u,d,h,p))}function S1(i,u,d,h,p){var b=_p(i,u,d,h,p),x=Ci(b.year,0,b.dayOfYear);return this.year(x.getUTCFullYear()),this.month(x.getUTCMonth()),this.date(x.getUTCDate()),this}k("Q",0,"Qo","quarter"),ft("quarter","Q"),$e("quarter",7),H("Q",On),Ae("Q",function(i,u){u[Je]=(ce(i)-1)*3});function O1(i){return i==null?Math.ceil((this.month()+1)/3):this.month((i-1)*3+this.month()%3)}k("D",["DD",2],"Do","date"),ft("date","D"),$e("date",9),H("D",Ye),H("DD",Ye,Tt),H("Do",function(i,u){return i?u._dayOfMonthOrdinalParse||u._ordinalParse:u._dayOfMonthOrdinalParseLenient}),Ae(["D","DD"],G),Ae("Do",function(i,u){u[G]=ce(i.match(Ye)[0])});var jp=Zr("Date",!0);k("DDD",["DDDD",3],"DDDo","dayOfYear"),ft("dayOfYear","DDD"),$e("dayOfYear",4),H("DDD",ts),H("DDDD",Ai),Ae(["DDD","DDDD"],function(i,u,d){d._dayOfYear=ce(i)});function M1(i){var u=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return i==null?u:this.add(i-u,"d")}k("m",["mm",2],0,"minute"),ft("minute","m"),$e("minute",14),H("m",Ye),H("mm",Ye,Tt),Ae(["m","mm"],ue);var R1=Zr("Minutes",!1);k("s",["ss",2],0,"second"),ft("second","s"),$e("second",15),H("s",Ye),H("ss",Ye,Tt),Ae(["s","ss"],$t);var x1=Zr("Seconds",!1);k("S",0,0,function(){return~~(this.millisecond()/100)}),k(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),k(0,["SSS",3],0,"millisecond"),k(0,["SSSS",4],0,function(){return this.millisecond()*10}),k(0,["SSSSS",5],0,function(){return this.millisecond()*100}),k(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),k(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),k(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),k(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),ft("millisecond","ms"),$e("millisecond",16),H("S",ts,On),H("SS",ts,Tt),H("SSS",ts,Ai);var An,$p;for(An="SSSS";An.length<=9;An+="S")H(An,fr);function P1(i,u){u[ss]=ce(("0."+i)*1e3)}for(An="S";An.length<=9;An+="S")Ae(An,P1);$p=Zr("Milliseconds",!1),k("z",0,0,"zoneAbbr"),k("zz",0,0,"zoneName");function A1(){return this._isUTC?"UTC":""}function N1(){return this._isUTC?"Coordinated Universal Time":""}var F=Te.prototype;F.add=E0,F.calendar=A0,F.clone=N0,F.diff=W0,F.endOf=Z0,F.format=G0,F.from=B0,F.fromNow=H0,F.to=z0,F.toNow=V0,F.get=uo,F.invalidAt=i1,F.isAfter=C0,F.isBefore=I0,F.isBetween=F0,F.isSame=L0,F.isSameOrAfter=Y0,F.isSameOrBefore=U0,F.isValid=n1,F.lang=Fp,F.locale=Ip,F.localeData=Lp,F.max=n0,F.min=r0,F.parsingFlags=s1,F.set=Ur,F.startOf=K0,F.subtract=S0,F.toArray=e1,F.toObject=t1,F.toDate=J0,F.toISOString=j0,F.inspect=$0,typeof Symbol!="undefined"&&Symbol.for!=null&&(F[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),F.toJSON=r1,F.toString=q0,F.unix=Q0,F.valueOf=X0,F.creationData=a1,F.eraName=c1,F.eraNarrow=d1,F.eraAbbr=f1,F.eraYear=h1,F.year=gp,F.isLeapYear=tw,F.weekYear=b1,F.isoWeekYear=v1,F.quarter=F.quarters=O1,F.month=mp,F.daysInMonth=Qv,F.week=F.weeks=ow,F.isoWeek=F.isoWeeks=uw,F.weeksInYear=k1,F.weeksInWeekYear=E1,F.isoWeeksInYear=w1,F.isoWeeksInISOWeekYear=D1,F.date=jp,F.day=F.days=vw,F.weekday=ww,F.isoWeekday=Dw,F.dayOfYear=M1,F.hour=F.hours=xw,F.minute=F.minutes=R1,F.second=F.seconds=x1,F.millisecond=F.milliseconds=$p,F.utcOffset=f0,F.utc=p0,F.local=m0,F.parseZone=y0,F.hasAlignedHourOffset=g0,F.isDST=_0,F.isLocal=b0,F.isUtcOffset=v0,F.isUtc=xp,F.isUTC=xp,F.zoneAbbr=A1,F.zoneName=N1,F.dates=te("dates accessor is deprecated. Use date instead.",jp),F.months=te("months accessor is deprecated. Use month instead",mp),F.years=te("years accessor is deprecated. Use year instead",gp),F.zone=te("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",h0),F.isDSTShifted=te("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",T0);function C1(i){return Ve(i*1e3)}function I1(){return Ve.apply(null,arguments).parseZone()}function Gp(i){return i}var Re=Q.prototype;Re.calendar=y,Re.longDateFormat=pe,Re.invalidDate=Ie,Re.ordinal=Qe,Re.preparse=Gp,Re.postformat=Gp,Re.relativeTime=Or,Re.pastFuture=at,Re.set=q,Re.eras=o1,Re.erasParse=u1,Re.erasConvertYear=l1,Re.erasAbbrRegex=m1,Re.erasNameRegex=p1,Re.erasNarrowRegex=y1,Re.months=Vv,Re.monthsShort=Kv,Re.monthsParse=Xv,Re.monthsRegex=ew,Re.monthsShortRegex=Jv,Re.week=nw,Re.firstDayOfYear=aw,Re.firstDayOfWeek=iw,Re.weekdays=yw,Re.weekdaysMin=_w,Re.weekdaysShort=gw,Re.weekdaysParse=bw,Re.weekdaysRegex=kw,Re.weekdaysShortRegex=Ew,Re.weekdaysMinRegex=Sw,Re.isPM=Mw,Re.meridiem=Pw;function Do(i,u,d,h){var p=en(),b=T().set(h,u);return p[d](b,i)}function Bp(i,u,d){if(c(i)&&(u=i,i=void 0),i=i||"",u!=null)return Do(i,u,d,"month");var h,p=[];for(h=0;h<12;h++)p[h]=Do(i,h,d,"month");return p}function Sl(i,u,d,h){typeof i=="boolean"?(c(u)&&(d=u,u=void 0),u=u||""):(u=i,d=u,i=!1,c(u)&&(d=u,u=void 0),u=u||"");var p=en(),b=i?p._week.dow:0,x,re=[];if(d!=null)return Do(u,(d+b)%7,h,"day");for(x=0;x<7;x++)re[x]=Do(u,(x+b)%7,h,"day");return re}function F1(i,u){return Bp(i,u,"months")}function L1(i,u){return Bp(i,u,"monthsShort")}function Y1(i,u,d){return Sl(i,u,d,"weekdays")}function U1(i,u,d){return Sl(i,u,d,"weekdaysShort")}function W1(i,u,d){return Sl(i,u,d,"weekdaysMin")}Pn("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(i){var u=i%10,d=ce(i%100/10)===1?"th":u===1?"st":u===2?"nd":u===3?"rd":"th";return i+d}}),e.lang=te("moment.lang is deprecated. Use moment.locale instead.",Pn),e.langData=te("moment.langData is deprecated. Use moment.localeData instead.",en);var tn=Math.abs;function q1(){var i=this._data;return this._milliseconds=tn(this._milliseconds),this._days=tn(this._days),this._months=tn(this._months),i.milliseconds=tn(i.milliseconds),i.seconds=tn(i.seconds),i.minutes=tn(i.minutes),i.hours=tn(i.hours),i.months=tn(i.months),i.years=tn(i.years),this}function Hp(i,u,d,h){var p=Mr(u,d);return i._milliseconds+=h*p._milliseconds,i._days+=h*p._days,i._months+=h*p._months,i._bubble()}function j1(i,u){return Hp(this,i,u,1)}function $1(i,u){return Hp(this,i,u,-1)}function zp(i){return i<0?Math.floor(i):Math.ceil(i)}function G1(){var i=this._milliseconds,u=this._days,d=this._months,h=this._data,p,b,x,re,me;return i>=0&&u>=0&&d>=0||i<=0&&u<=0&&d<=0||(i+=zp(Ol(d)+u)*864e5,u=0,d=0),h.milliseconds=i%1e3,p=ht(i/1e3),h.seconds=p%60,b=ht(p/60),h.minutes=b%60,x=ht(b/60),h.hours=x%24,u+=ht(x/24),me=ht(Vp(u)),d+=me,u-=zp(Ol(me)),re=ht(d/12),d%=12,h.days=u,h.months=d,h.years=re,this}function Vp(i){return i*4800/146097}function Ol(i){return i*146097/4800}function B1(i){if(!this.isValid())return NaN;var u,d,h=this._milliseconds;if(i=_t(i),i==="month"||i==="quarter"||i==="year")switch(u=this._days+h/864e5,d=this._months+Vp(u),i){case"month":return d;case"quarter":return d/3;case"year":return d/12}else switch(u=this._days+Math.round(Ol(this._months)),i){case"week":return u/7+h/6048e5;case"day":return u+h/864e5;case"hour":return u*24+h/36e5;case"minute":return u*1440+h/6e4;case"second":return u*86400+h/1e3;case"millisecond":return Math.floor(u*864e5)+h;default:throw new Error("Unknown unit "+i)}}function H1(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+ce(this._months/12)*31536e6:NaN}function rn(i){return function(){return this.as(i)}}var z1=rn("ms"),V1=rn("s"),K1=rn("m"),Z1=rn("h"),X1=rn("d"),Q1=rn("w"),J1=rn("M"),eD=rn("Q"),tD=rn("y");function rD(){return Mr(this)}function nD(i){return i=_t(i),this.isValid()?this[i+"s"]():NaN}function as(i){return function(){return this.isValid()?this._data[i]:NaN}}var sD=as("milliseconds"),iD=as("seconds"),aD=as("minutes"),oD=as("hours"),uD=as("days"),lD=as("months"),cD=as("years");function dD(){return ht(this.days()/7)}var nn=Math.round,js={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function fD(i,u,d,h,p){return p.relativeTime(u||1,!!d,i,h)}function hD(i,u,d,h){var p=Mr(i).abs(),b=nn(p.as("s")),x=nn(p.as("m")),re=nn(p.as("h")),me=nn(p.as("d")),Ue=nn(p.as("M")),Gt=nn(p.as("w")),sn=nn(p.as("y")),Nn=b<=d.ss&&["s",b]||b<d.s&&["ss",b]||x<=1&&["m"]||x<d.m&&["mm",x]||re<=1&&["h"]||re<d.h&&["hh",re]||me<=1&&["d"]||me<d.d&&["dd",me];return d.w!=null&&(Nn=Nn||Gt<=1&&["w"]||Gt<d.w&&["ww",Gt]),Nn=Nn||Ue<=1&&["M"]||Ue<d.M&&["MM",Ue]||sn<=1&&["y"]||["yy",sn],Nn[2]=u,Nn[3]=+i>0,Nn[4]=h,fD.apply(null,Nn)}function pD(i){return i===void 0?nn:typeof i=="function"?(nn=i,!0):!1}function mD(i,u){return js[i]===void 0?!1:u===void 0?js[i]:(js[i]=u,i==="s"&&(js.ss=u-1),!0)}function yD(i,u){if(!this.isValid())return this.localeData().invalidDate();var d=!1,h=js,p,b;return typeof i=="object"&&(u=i,i=!1),typeof i=="boolean"&&(d=i),typeof u=="object"&&(h=Object.assign({},js,u),u.s!=null&&u.ss==null&&(h.ss=u.s-1)),p=this.localeData(),b=hD(this,!d,h,p),d&&(b=p.pastFuture(+this,b)),p.postformat(b)}var Ml=Math.abs;function $s(i){return(i>0)-(i<0)||+i}function ko(){if(!this.isValid())return this.localeData().invalidDate();var i=Ml(this._milliseconds)/1e3,u=Ml(this._days),d=Ml(this._months),h,p,b,x,re=this.asSeconds(),me,Ue,Gt,sn;return re?(h=ht(i/60),p=ht(h/60),i%=60,h%=60,b=ht(d/12),d%=12,x=i?i.toFixed(3).replace(/\.?0+$/,""):"",me=re<0?"-":"",Ue=$s(this._months)!==$s(re)?"-":"",Gt=$s(this._days)!==$s(re)?"-":"",sn=$s(this._milliseconds)!==$s(re)?"-":"",me+"P"+(b?Ue+b+"Y":"")+(d?Ue+d+"M":"")+(u?Gt+u+"D":"")+(p||h||i?"T":"")+(p?sn+p+"H":"")+(h?sn+h+"M":"")+(i?sn+x+"S":"")):"P0D"}var Oe=go.prototype;Oe.isValid=u0,Oe.abs=q1,Oe.add=j1,Oe.subtract=$1,Oe.as=B1,Oe.asMilliseconds=z1,Oe.asSeconds=V1,Oe.asMinutes=K1,Oe.asHours=Z1,Oe.asDays=X1,Oe.asWeeks=Q1,Oe.asMonths=J1,Oe.asQuarters=eD,Oe.asYears=tD,Oe.valueOf=H1,Oe._bubble=G1,Oe.clone=rD,Oe.get=nD,Oe.milliseconds=sD,Oe.seconds=iD,Oe.minutes=aD,Oe.hours=oD,Oe.days=uD,Oe.weeks=dD,Oe.months=lD,Oe.years=cD,Oe.humanize=yD,Oe.toISOString=ko,Oe.toString=ko,Oe.toJSON=ko,Oe.locale=Ip,Oe.localeData=Lp,Oe.toIsoString=te("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ko),Oe.lang=Fp,k("X",0,0,"unix"),k("x",0,0,"valueOf"),H("x",xn),H("X",co),Ae("X",function(i,u,d){d._d=new Date(parseFloat(i)*1e3)}),Ae("x",function(i,u,d){d._d=new Date(ce(i))});return e.version="2.29.4",t(Ve),e.fn=F,e.min=s0,e.max=i0,e.now=a0,e.utc=T,e.unix=C1,e.months=F1,e.isDate=f,e.locale=Pn,e.invalid=$,e.duration=Mr,e.isMoment=be,e.weekdays=Y1,e.parseZone=I1,e.localeData=en,e.isDuration=_o,e.monthsShort=L1,e.weekdaysMin=W1,e.defineLocale=ml,e.updateLocale=Iw,e.locales=Fw,e.weekdaysShort=U1,e.normalizeUnits=_t,e.relativeTimeRounding=pD,e.relativeTimeThreshold=mD,e.calendarFormat=P0,e.prototype=F,e.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},e})});var XT=O((sY,wu)=>{var xT,PT,AT,NT,CT,IT,FT,LT,YT,bu,Dh,UT,WT,qT,ui,jT,$T,GT,BT,HT,zT,VT,KT,ZT,vu;(function(r){var e=typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:{};typeof define=="function"&&define.amd?define("tslib",["exports"],function(n){r(t(e,t(n)))}):typeof wu=="object"&&typeof wu.exports=="object"?r(t(e,t(wu.exports))):r(t(e));function t(n,s){return n!==e&&(typeof Object.create=="function"?Object.defineProperty(n,"__esModule",{value:!0}):n.__esModule=!0),function(a,o){return n[a]=s?s(a,o):o}}})(function(r){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var a in s)Object.prototype.hasOwnProperty.call(s,a)&&(n[a]=s[a])};xT=function(n,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");e(n,s);function a(){this.constructor=n}n.prototype=s===null?Object.create(s):(a.prototype=s.prototype,new a)},PT=Object.assign||function(n){for(var s,a=1,o=arguments.length;a<o;a++){s=arguments[a];for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(n[l]=s[l])}return n},AT=function(n,s){var a={};for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&s.indexOf(o)<0&&(a[o]=n[o]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,o=Object.getOwnPropertySymbols(n);l<o.length;l++)s.indexOf(o[l])<0&&Object.prototype.propertyIsEnumerable.call(n,o[l])&&(a[o[l]]=n[o[l]]);return a},NT=function(n,s,a,o){var l=arguments.length,c=l<3?s:o===null?o=Object.getOwnPropertyDescriptor(s,a):o,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(n,s,a,o);else for(var m=n.length-1;m>=0;m--)(f=n[m])&&(c=(l<3?f(c):l>3?f(s,a,c):f(s,a))||c);return l>3&&c&&Object.defineProperty(s,a,c),c},CT=function(n,s){return function(a,o){s(a,o,n)}},IT=function(n,s){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,s)},FT=function(n,s,a,o){function l(c){return c instanceof a?c:new a(function(f){f(c)})}return new(a||(a=Promise))(function(c,f){function m(S){try{T(o.next(S))}catch(v){f(v)}}function g(S){try{T(o.throw(S))}catch(v){f(v)}}function T(S){S.done?c(S.value):l(S.value).then(m,g)}T((o=o.apply(n,s||[])).next())})},LT=function(n,s){var a={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},o,l,c,f;return f={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(f[Symbol.iterator]=function(){return this}),f;function m(T){return function(S){return g([T,S])}}function g(T){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,l&&(c=T[0]&2?l.return:T[0]?l.throw||((c=l.return)&&c.call(l),0):l.next)&&!(c=c.call(l,T[1])).done)return c;switch(l=0,c&&(T=[T[0]&2,c.value]),T[0]){case 0:case 1:c=T;break;case 4:return a.label++,{value:T[1],done:!1};case 5:a.label++,l=T[1],T=[0];continue;case 7:T=a.ops.pop(),a.trys.pop();continue;default:if(c=a.trys,!(c=c.length>0&&c[c.length-1])&&(T[0]===6||T[0]===2)){a=0;continue}if(T[0]===3&&(!c||T[1]>c[0]&&T[1]<c[3])){a.label=T[1];break}if(T[0]===6&&a.label<c[1]){a.label=c[1],c=T;break}if(c&&a.label<c[2]){a.label=c[2],a.ops.push(T);break}c[2]&&a.ops.pop(),a.trys.pop();continue}T=s.call(n,a)}catch(S){T=[6,S],l=0}finally{o=c=0}if(T[0]&5)throw T[1];return{value:T[0]?T[1]:void 0,done:!0}}},YT=function(n,s){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(s,a)&&vu(s,n,a)},vu=Object.create?function(n,s,a,o){o===void 0&&(o=a);var l=Object.getOwnPropertyDescriptor(s,a);(!l||("get"in l?!s.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return s[a]}}),Object.defineProperty(n,o,l)}:function(n,s,a,o){o===void 0&&(o=a),n[o]=s[a]},bu=function(n){var s=typeof Symbol=="function"&&Symbol.iterator,a=s&&n[s],o=0;if(a)return a.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&o>=n.length&&(n=void 0),{value:n&&n[o++],done:!n}}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")},Dh=function(n,s){var a=typeof Symbol=="function"&&n[Symbol.iterator];if(!a)return n;var o=a.call(n),l,c=[],f;try{for(;(s===void 0||s-- >0)&&!(l=o.next()).done;)c.push(l.value)}catch(m){f={error:m}}finally{try{l&&!l.done&&(a=o.return)&&a.call(o)}finally{if(f)throw f.error}}return c},UT=function(){for(var n=[],s=0;s<arguments.length;s++)n=n.concat(Dh(arguments[s]));return n},WT=function(){for(var n=0,s=0,a=arguments.length;s<a;s++)n+=arguments[s].length;for(var o=Array(n),l=0,s=0;s<a;s++)for(var c=arguments[s],f=0,m=c.length;f<m;f++,l++)o[l]=c[f];return o},qT=function(n,s,a){if(a||arguments.length===2)for(var o=0,l=s.length,c;o<l;o++)(c||!(o in s))&&(c||(c=Array.prototype.slice.call(s,0,o)),c[o]=s[o]);return n.concat(c||Array.prototype.slice.call(s))},ui=function(n){return this instanceof ui?(this.v=n,this):new ui(n)},jT=function(n,s,a){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o=a.apply(n,s||[]),l,c=[];return l={},f("next"),f("throw"),f("return"),l[Symbol.asyncIterator]=function(){return this},l;function f(R){o[R]&&(l[R]=function(C){return new Promise(function($,B){c.push([R,C,$,B])>1||m(R,C)})})}function m(R,C){try{g(o[R](C))}catch($){v(c[0][3],$)}}function g(R){R.value instanceof ui?Promise.resolve(R.value.v).then(T,S):v(c[0][2],R)}function T(R){m("next",R)}function S(R){m("throw",R)}function v(R,C){R(C),c.shift(),c.length&&m(c[0][0],c[0][1])}},$T=function(n){var s,a;return s={},o("next"),o("throw",function(l){throw l}),o("return"),s[Symbol.iterator]=function(){return this},s;function o(l,c){s[l]=n[l]?function(f){return(a=!a)?{value:ui(n[l](f)),done:l==="return"}:c?c(f):f}:c}},GT=function(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s=n[Symbol.asyncIterator],a;return s?s.call(n):(n=typeof bu=="function"?bu(n):n[Symbol.iterator](),a={},o("next"),o("throw"),o("return"),a[Symbol.asyncIterator]=function(){return this},a);function o(c){a[c]=n[c]&&function(f){return new Promise(function(m,g){f=n[c](f),l(m,g,f.done,f.value)})}}function l(c,f,m,g){Promise.resolve(g).then(function(T){c({value:T,done:m})},f)}},BT=function(n,s){return Object.defineProperty?Object.defineProperty(n,"raw",{value:s}):n.raw=s,n};var t=Object.create?function(n,s){Object.defineProperty(n,"default",{enumerable:!0,value:s})}:function(n,s){n.default=s};HT=function(n){if(n&&n.__esModule)return n;var s={};if(n!=null)for(var a in n)a!=="default"&&Object.prototype.hasOwnProperty.call(n,a)&&vu(s,n,a);return t(s,n),s},zT=function(n){return n&&n.__esModule?n:{default:n}},VT=function(n,s,a,o){if(a==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof s=="function"?n!==s||!o:!s.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return a==="m"?o:a==="a"?o.call(n):o?o.value:s.get(n)},KT=function(n,s,a,o,l){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!l)throw new TypeError("Private accessor was defined without a setter");if(typeof s=="function"?n!==s||!l:!s.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?l.call(n,a):l?l.value=a:s.set(n,a),a},ZT=function(n,s){if(s===null||typeof s!="object"&&typeof s!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof n=="function"?s===n:n.has(s)},r("__extends",xT),r("__assign",PT),r("__rest",AT),r("__decorate",NT),r("__param",CT),r("__metadata",IT),r("__awaiter",FT),r("__generator",LT),r("__exportStar",YT),r("__createBinding",vu),r("__values",bu),r("__read",Dh),r("__spread",UT),r("__spreadArrays",WT),r("__spreadArray",qT),r("__await",ui),r("__asyncGenerator",jT),r("__asyncDelegator",$T),r("__asyncValues",GT),r("__makeTemplateObject",BT),r("__importStar",HT),r("__importDefault",zT),r("__classPrivateFieldGet",VT),r("__classPrivateFieldSet",KT),r("__classPrivateFieldIn",ZT)})});var Lb=O((Ib,Fb)=>{(function(r){var e=Object.hasOwnProperty,t=Array.isArray?Array.isArray:function(_){return Object.prototype.toString.call(_)==="[object Array]"},n=10,s=typeof process=="object"&&typeof process.nextTick=="function",a=typeof Symbol=="function",o=typeof Reflect=="object",l=typeof setImmediate=="function",c=l?setImmediate:setTimeout,f=a?o&&typeof Reflect.ownKeys=="function"?Reflect.ownKeys:function(y){var _=Object.getOwnPropertyNames(y);return _.push.apply(_,Object.getOwnPropertySymbols(y)),_}:Object.keys;function m(){this._events={},this._conf&&g.call(this,this._conf)}function g(y){y&&(this._conf=y,y.delimiter&&(this.delimiter=y.delimiter),y.maxListeners!==r&&(this._maxListeners=y.maxListeners),y.wildcard&&(this.wildcard=y.wildcard),y.newListener&&(this._newListener=y.newListener),y.removeListener&&(this._removeListener=y.removeListener),y.verboseMemoryLeak&&(this.verboseMemoryLeak=y.verboseMemoryLeak),y.ignoreErrors&&(this.ignoreErrors=y.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function T(y,_){var w="(node) warning: possible EventEmitter memory leak detected. "+y+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(w+=" Event name: "+_+"."),typeof process!="undefined"&&process.emitWarning){var D=new Error(w);D.name="MaxListenersExceededWarning",D.emitter=this,D.count=y,process.emitWarning(D)}else console.error(w),console.trace&&console.trace()}var S=function(y,_,w){var D=arguments.length;switch(D){case 0:return[];case 1:return[y];case 2:return[y,_];case 3:return[y,_,w];default:for(var E=new Array(D);D--;)E[D]=arguments[D];return E}};function v(y,_){for(var w={},D,E=y.length,M=_?_.length:0,k=0;k<E;k++)D=y[k],w[D]=k<M?_[k]:r;return w}function R(y,_,w){this._emitter=y,this._target=_,this._listeners={},this._listenersCount=0;var D,E;if((w.on||w.off)&&(D=w.on,E=w.off),_.addEventListener?(D=_.addEventListener,E=_.removeEventListener):_.addListener?(D=_.addListener,E=_.removeListener):_.on&&(D=_.on,E=_.off),!D&&!E)throw Error("target does not implement any known event API");if(typeof D!="function")throw TypeError("on method must be a function");if(typeof E!="function")throw TypeError("off method must be a function");this._on=D,this._off=E;var M=y._observers;M?M.push(this):y._observers=[this]}Object.assign(R.prototype,{subscribe:function(y,_,w){var D=this,E=this._target,M=this._emitter,k=this._listeners,I=function(){var A=S.apply(null,arguments),N={data:A,name:_,original:y};if(w){var j=w.call(E,N);j!==!1&&M.emit.apply(M,[N.name].concat(A));return}M.emit.apply(M,[_].concat(A))};if(k[y])throw Error("Event '"+y+"' is already listening");this._listenersCount++,M._newListener&&M._removeListener&&!D._onNewListener?(this._onNewListener=function(A){A===_&&k[y]===null&&(k[y]=I,D._on.call(E,y,I))},M.on("newListener",this._onNewListener),this._onRemoveListener=function(A){A===_&&!M.hasListeners(A)&&k[y]&&(k[y]=null,D._off.call(E,y,I))},k[y]=null,M.on("removeListener",this._onRemoveListener)):(k[y]=I,D._on.call(E,y,I))},unsubscribe:function(y){var _=this,w=this._listeners,D=this._emitter,E,M,k=this._off,I=this._target,A;if(y&&typeof y!="string")throw TypeError("event must be a string");function N(){_._onNewListener&&(D.off("newListener",_._onNewListener),D.off("removeListener",_._onRemoveListener),_._onNewListener=null,_._onRemoveListener=null);var j=be.call(D,_);D._observers.splice(j,1)}if(y){if(E=w[y],!E)return;k.call(I,y,E),delete w[y],--this._listenersCount||N()}else{for(M=f(w),A=M.length;A-- >0;)y=M[A],k.call(I,y,w[y]);this._listeners={},this._listenersCount=0,N()}}});function C(y,_,w,D){var E=Object.assign({},_);if(!y)return E;if(typeof y!="object")throw TypeError("options must be an object");var M=Object.keys(y),k=M.length,I,A,N;function j(pe){throw Error('Invalid "'+I+'" option value'+(pe?". Reason: "+pe:""))}for(var ke=0;ke<k;ke++){if(I=M[ke],!D&&!e.call(_,I))throw Error('Unknown "'+I+'" option');A=y[I],A!==r&&(N=w[I],E[I]=N?N(A,j):A)}return E}function $(y,_){return(typeof y!="function"||!y.hasOwnProperty("prototype"))&&_("value must be a constructor"),y}function B(y){var _="value must be type of "+y.join("|"),w=y.length,D=y[0],E=y[1];return w===1?function(M,k){if(typeof M===D)return M;k(_)}:w===2?function(M,k){var I=typeof M;if(I===D||I===E)return M;k(_)}:function(M,k){for(var I=typeof M,A=w;A-- >0;)if(I===y[A])return M;k(_)}}var W=B(["function"]),De=B(["object","function"]);function Te(y,_,w){var D,E,M=0,k,I=new y(function(A,N,j){w=C(w,{timeout:0,overload:!1},{timeout:function(Ie,K){return Ie*=1,(typeof Ie!="number"||Ie<0||!Number.isFinite(Ie))&&K("timeout must be a positive number"),Ie}}),D=!w.overload&&typeof y.prototype.cancel=="function"&&typeof j=="function";function ke(){E&&(E=null),M&&(clearTimeout(M),M=0)}var pe=function(Ie){ke(),A(Ie)},le=function(Ie){ke(),N(Ie)};D?_(pe,le,j):(E=[function(Ie){le(Ie||Error("canceled"))}],_(pe,le,function(Ie){if(k)throw Error("Unable to subscribe on cancel event asynchronously");if(typeof Ie!="function")throw TypeError("onCancel callback must be a function");E.push(Ie)}),k=!0),w.timeout>0&&(M=setTimeout(function(){var Ie=Error("timeout");Ie.code="ETIMEDOUT",M=0,I.cancel(Ie),N(Ie)},w.timeout))});return D||(I.cancel=function(A){if(!!E){for(var N=E.length,j=1;j<N;j++)E[j](A);E[0](A),E=null}}),I}function be(y){var _=this._observers;if(!_)return-1;for(var w=_.length,D=0;D<w;D++)if(_[D]._target===y)return D;return-1}function ee(y,_,w,D,E){if(!w)return null;if(D===0){var M=typeof _;if(M==="string"){var k,I,A=0,N=0,j=this.delimiter,ke=j.length;if((I=_.indexOf(j))!==-1){k=new Array(5);do k[A++]=_.slice(N,I),N=I+ke;while((I=_.indexOf(j,N))!==-1);k[A++]=_.slice(N),_=k,E=A}else _=[_],E=1}else M==="object"?E=_.length:(_=[_],E=1)}var pe=null,le,Ie,K,qe,Qe,dt=_[D],Or=_[D+1],at,je;if(D===E)w._listeners&&(typeof w._listeners=="function"?(y&&y.push(w._listeners),pe=[w]):(y&&y.push.apply(y,w._listeners),pe=[w]));else if(dt==="*"){for(at=f(w),I=at.length;I-- >0;)le=at[I],le!=="_listeners"&&(je=ee(y,_,w[le],D+1,E),je&&(pe?pe.push.apply(pe,je):pe=je));return pe}else if(dt==="**"){for(Qe=D+1===E||D+2===E&&Or==="*",Qe&&w._listeners&&(pe=ee(y,_,w,E,E)),at=f(w),I=at.length;I-- >0;)le=at[I],le!=="_listeners"&&(le==="*"||le==="**"?(w[le]._listeners&&!Qe&&(je=ee(y,_,w[le],E,E),je&&(pe?pe.push.apply(pe,je):pe=je)),je=ee(y,_,w[le],D,E)):le===Or?je=ee(y,_,w[le],D+2,E):je=ee(y,_,w[le],D,E),je&&(pe?pe.push.apply(pe,je):pe=je));return pe}else w[dt]&&(pe=ee(y,_,w[dt],D+1,E));if(Ie=w["*"],Ie&&ee(y,_,Ie,D+1,E),K=w["**"],K)if(D<E)for(K._listeners&&ee(y,_,K,E,E),at=f(K),I=at.length;I-- >0;)le=at[I],le!=="_listeners"&&(le===Or?ee(y,_,K[le],D+2,E):le===dt?ee(y,_,K[le],D+1,E):(qe={},qe[le]=K[le],ee(y,_,{"**":qe},D+1,E)));else K._listeners?ee(y,_,K,E,E):K["*"]&&K["*"]._listeners&&ee(y,_,K["*"],E,E);return pe}function te(y,_,w){var D=0,E=0,M,k=this.delimiter,I=k.length,A;if(typeof y=="string")if((M=y.indexOf(k))!==-1){A=new Array(5);do A[D++]=y.slice(E,M),E=M+I;while((M=y.indexOf(k,E))!==-1);A[D++]=y.slice(E)}else A=[y],D=1;else A=y,D=y.length;if(D>1){for(M=0;M+1<D;M++)if(A[M]==="**"&&A[M+1]==="**")return}var N=this.listenerTree,j;for(M=0;M<D;M++)if(j=A[M],N=N[j]||(N[j]={}),M===D-1)return N._listeners?(typeof N._listeners=="function"&&(N._listeners=[N._listeners]),w?N._listeners.unshift(_):N._listeners.push(_),!N._listeners.warned&&this._maxListeners>0&&N._listeners.length>this._maxListeners&&(N._listeners.warned=!0,T.call(this,N._listeners.length,j))):N._listeners=_,!0;return!0}function Ft(y,_,w,D){for(var E=f(y),M=E.length,k,I,A,N=y._listeners,j;M-- >0;)I=E[M],k=y[I],I==="_listeners"?A=w:A=w?w.concat(I):[I],j=D||typeof I=="symbol",N&&_.push(j?A:A.join(this.delimiter)),typeof k=="object"&&Ft.call(this,k,_,A,j);return _}function gt(y){for(var _=f(y),w=_.length,D,E,M;w-- >0;)E=_[w],D=y[E],D&&(M=!0,E!=="_listeners"&&!gt(D)&&delete y[E]);return M}function V(y,_,w){this.emitter=y,this.event=_,this.listener=w}V.prototype.off=function(){return this.emitter.off(this.event,this.listener),this};function q(y,_,w){if(w===!0)E=!0;else if(w===!1)D=!0;else{if(!w||typeof w!="object")throw TypeError("options should be an object or true");var D=w.async,E=w.promisify,M=w.nextTick,k=w.objectify}if(D||M||E){var I=_,A=_._origin||_;if(M&&!s)throw Error("process.nextTick is not supported");E===r&&(E=_.constructor.name==="AsyncFunction"),_=function(){var N=arguments,j=this,ke=this.event;return E?M?Promise.resolve():new Promise(function(pe){c(pe)}).then(function(){return j.event=ke,I.apply(j,N)}):(M?process.nextTick:c)(function(){j.event=ke,I.apply(j,N)})},_._async=!0,_._origin=A}return[_,k?new V(this,y,_):this]}function P(y){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,g.call(this,y)}P.EventEmitter2=P,P.prototype.listenTo=function(y,_,w){if(typeof y!="object")throw TypeError("target musts be an object");var D=this;w=C(w,{on:r,off:r,reducers:r},{on:W,off:W,reducers:De});function E(M){if(typeof M!="object")throw TypeError("events must be an object");var k=w.reducers,I=be.call(D,y),A;I===-1?A=new R(D,y,w):A=D._observers[I];for(var N=f(M),j=N.length,ke,pe=typeof k=="function",le=0;le<j;le++)ke=N[le],A.subscribe(ke,M[ke]||ke,pe?k:k&&k[ke])}return t(_)?E(v(_)):E(typeof _=="string"?v(_.split(/\s+/)):_),this},P.prototype.stopListeningTo=function(y,_){var w=this._observers;if(!w)return!1;var D=w.length,E,M=!1;if(y&&typeof y!="object")throw TypeError("target should be an object");for(;D-- >0;)E=w[D],(!y||E._target===y)&&(E.unsubscribe(_),M=!0);return M},P.prototype.delimiter=".",P.prototype.setMaxListeners=function(y){y!==r&&(this._maxListeners=y,this._conf||(this._conf={}),this._conf.maxListeners=y)},P.prototype.getMaxListeners=function(){return this._maxListeners},P.prototype.event="",P.prototype.once=function(y,_,w){return this._once(y,_,!1,w)},P.prototype.prependOnceListener=function(y,_,w){return this._once(y,_,!0,w)},P.prototype._once=function(y,_,w,D){return this._many(y,1,_,w,D)},P.prototype.many=function(y,_,w,D){return this._many(y,_,w,!1,D)},P.prototype.prependMany=function(y,_,w,D){return this._many(y,_,w,!0,D)},P.prototype._many=function(y,_,w,D,E){var M=this;if(typeof w!="function")throw new Error("many only accepts instances of Function");function k(){return--_===0&&M.off(y,k),w.apply(this,arguments)}return k._origin=w,this._on(y,k,D,E)},P.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||m.call(this);var y=arguments[0],_,w=this.wildcard,D,E,M,k,I;if(y==="newListener"&&!this._newListener&&!this._events.newListener)return!1;if(w&&(_=y,y!=="newListener"&&y!=="removeListener"&&typeof y=="object")){if(E=y.length,a){for(M=0;M<E;M++)if(typeof y[M]=="symbol"){I=!0;break}}I||(y=y.join(this.delimiter))}var A=arguments.length,N;if(this._all&&this._all.length)for(N=this._all.slice(),M=0,E=N.length;M<E;M++)switch(this.event=y,A){case 1:N[M].call(this,y);break;case 2:N[M].call(this,y,arguments[1]);break;case 3:N[M].call(this,y,arguments[1],arguments[2]);break;default:N[M].apply(this,arguments)}if(w)N=[],ee.call(this,N,_,this.listenerTree,0,E);else if(N=this._events[y],typeof N=="function"){switch(this.event=y,A){case 1:N.call(this);break;case 2:N.call(this,arguments[1]);break;case 3:N.call(this,arguments[1],arguments[2]);break;default:for(D=new Array(A-1),k=1;k<A;k++)D[k-1]=arguments[k];N.apply(this,D)}return!0}else N&&(N=N.slice());if(N&&N.length){if(A>3)for(D=new Array(A-1),k=1;k<A;k++)D[k-1]=arguments[k];for(M=0,E=N.length;M<E;M++)switch(this.event=y,A){case 1:N[M].call(this);break;case 2:N[M].call(this,arguments[1]);break;case 3:N[M].call(this,arguments[1],arguments[2]);break;default:N[M].apply(this,D)}return!0}else if(!this.ignoreErrors&&!this._all&&y==="error")throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");return!!this._all},P.prototype.emitAsync=function(){if(!this._events&&!this._all)return!1;this._events||m.call(this);var y=arguments[0],_=this.wildcard,w,D,E,M,k,I;if(y==="newListener"&&!this._newListener&&!this._events.newListener)return Promise.resolve([!1]);if(_&&(w=y,y!=="newListener"&&y!=="removeListener"&&typeof y=="object")){if(M=y.length,a){for(k=0;k<M;k++)if(typeof y[k]=="symbol"){D=!0;break}}D||(y=y.join(this.delimiter))}var A=[],N=arguments.length,j;if(this._all)for(k=0,M=this._all.length;k<M;k++)switch(this.event=y,N){case 1:A.push(this._all[k].call(this,y));break;case 2:A.push(this._all[k].call(this,y,arguments[1]));break;case 3:A.push(this._all[k].call(this,y,arguments[1],arguments[2]));break;default:A.push(this._all[k].apply(this,arguments))}if(_?(j=[],ee.call(this,j,w,this.listenerTree,0)):j=this._events[y],typeof j=="function")switch(this.event=y,N){case 1:A.push(j.call(this));break;case 2:A.push(j.call(this,arguments[1]));break;case 3:A.push(j.call(this,arguments[1],arguments[2]));break;default:for(E=new Array(N-1),I=1;I<N;I++)E[I-1]=arguments[I];A.push(j.apply(this,E))}else if(j&&j.length){if(j=j.slice(),N>3)for(E=new Array(N-1),I=1;I<N;I++)E[I-1]=arguments[I];for(k=0,M=j.length;k<M;k++)switch(this.event=y,N){case 1:A.push(j[k].call(this));break;case 2:A.push(j[k].call(this,arguments[1]));break;case 3:A.push(j[k].call(this,arguments[1],arguments[2]));break;default:A.push(j[k].apply(this,E))}}else if(!this.ignoreErrors&&!this._all&&y==="error")return arguments[1]instanceof Error?Promise.reject(arguments[1]):Promise.reject("Uncaught, unspecified 'error' event.");return Promise.all(A)},P.prototype.on=function(y,_,w){return this._on(y,_,!1,w)},P.prototype.prependListener=function(y,_,w){return this._on(y,_,!0,w)},P.prototype.onAny=function(y){return this._onAny(y,!1)},P.prototype.prependAny=function(y){return this._onAny(y,!0)},P.prototype.addListener=P.prototype.on,P.prototype._onAny=function(y,_){if(typeof y!="function")throw new Error("onAny only accepts instances of Function");return this._all||(this._all=[]),_?this._all.unshift(y):this._all.push(y),this},P.prototype._on=function(y,_,w,D){if(typeof y=="function")return this._onAny(y,_),this;if(typeof _!="function")throw new Error("on only accepts instances of Function");this._events||m.call(this);var E=this,M;return D!==r&&(M=q.call(this,y,_,D),_=M[0],E=M[1]),this._newListener&&this.emit("newListener",y,_),this.wildcard?(te.call(this,y,_,w),E):(this._events[y]?(typeof this._events[y]=="function"&&(this._events[y]=[this._events[y]]),w?this._events[y].unshift(_):this._events[y].push(_),!this._events[y].warned&&this._maxListeners>0&&this._events[y].length>this._maxListeners&&(this._events[y].warned=!0,T.call(this,this._events[y].length,y))):this._events[y]=_,E)},P.prototype.off=function(y,_){if(typeof _!="function")throw new Error("removeListener only takes instances of Function");var w,D=[];if(this.wildcard){var E=typeof y=="string"?y.split(this.delimiter):y.slice();if(D=ee.call(this,null,E,this.listenerTree,0),!D)return this}else{if(!this._events[y])return this;w=this._events[y],D.push({_listeners:w})}for(var M=0;M<D.length;M++){var k=D[M];if(w=k._listeners,t(w)){for(var I=-1,A=0,N=w.length;A<N;A++)if(w[A]===_||w[A].listener&&w[A].listener===_||w[A]._origin&&w[A]._origin===_){I=A;break}if(I<0)continue;return this.wildcard?k._listeners.splice(I,1):this._events[y].splice(I,1),w.length===0&&(this.wildcard?delete k._listeners:delete this._events[y]),this._removeListener&&this.emit("removeListener",y,_),this}else(w===_||w.listener&&w.listener===_||w._origin&&w._origin===_)&&(this.wildcard?delete k._listeners:delete this._events[y],this._removeListener&&this.emit("removeListener",y,_))}return this.listenerTree&>(this.listenerTree),this},P.prototype.offAny=function(y){var _=0,w=0,D;if(y&&this._all&&this._all.length>0){for(D=this._all,_=0,w=D.length;_<w;_++)if(y===D[_])return D.splice(_,1),this._removeListener&&this.emit("removeListenerAny",y),this}else{if(D=this._all,this._removeListener)for(_=0,w=D.length;_<w;_++)this.emit("removeListenerAny",D[_]);this._all=[]}return this},P.prototype.removeListener=P.prototype.off,P.prototype.removeAllListeners=function(y){if(y===r)return!this._events||m.call(this),this;if(this.wildcard){var _=ee.call(this,null,y,this.listenerTree,0),w,D;if(!_)return this;for(D=0;D<_.length;D++)w=_[D],w._listeners=null;this.listenerTree&>(this.listenerTree)}else this._events&&(this._events[y]=null);return this},P.prototype.listeners=function(y){var _=this._events,w,D,E,M,k;if(y===r){if(this.wildcard)throw Error("event name required for wildcard emitter");if(!_)return[];for(w=f(_),M=w.length,E=[];M-- >0;)D=_[w[M]],typeof D=="function"?E.push(D):E.push.apply(E,D);return E}else{if(this.wildcard){if(k=this.listenerTree,!k)return[];var I=[],A=typeof y=="string"?y.split(this.delimiter):y.slice();return ee.call(this,I,A,k,0),I}return _?(D=_[y],D?typeof D=="function"?[D]:D:[]):[]}},P.prototype.eventNames=function(y){var _=this._events;return this.wildcard?Ft.call(this,this.listenerTree,[],null,y):_?f(_):[]},P.prototype.listenerCount=function(y){return this.listeners(y).length},P.prototype.hasListeners=function(y){if(this.wildcard){var _=[],w=typeof y=="string"?y.split(this.delimiter):y.slice();return ee.call(this,_,w,this.listenerTree,0),_.length>0}var D=this._events,E=this._all;return!!(E&&E.length||D&&(y===r?f(D).length:D[y]))},P.prototype.listenersAny=function(){return this._all?this._all:[]},P.prototype.waitFor=function(y,_){var w=this,D=typeof _;return D==="number"?_={timeout:_}:D==="function"&&(_={filter:_}),_=C(_,{timeout:0,filter:r,handleError:!1,Promise,overload:!1},{filter:W,Promise:$}),Te(_.Promise,function(E,M,k){function I(){var A=_.filter;if(!(A&&!A.apply(w,arguments)))if(w.off(y,I),_.handleError){var N=arguments[0];N?M(N):E(S.apply(null,arguments).slice(1))}else E(S.apply(null,arguments))}k(function(){w.off(y,I)}),w._on(y,I,!1)},{timeout:_.timeout,overload:_.overload})};function Q(y,_,w){w=C(w,{Promise,timeout:0,overload:!1},{Promise:$});var D=w.Promise;return Te(D,function(E,M,k){var I;if(typeof y.addEventListener=="function"){I=function(){E(S.apply(null,arguments))},k(function(){y.removeEventListener(_,I)}),y.addEventListener(_,I,{once:!0});return}var A=function(){N&&y.removeListener("error",N),E(S.apply(null,arguments))},N;_!=="error"&&(N=function(j){y.removeListener(_,A),M(j)},y.once("error",N)),k(function(){N&&y.removeListener("error",N),y.removeListener(_,A)}),y.once(_,A)},{timeout:w.timeout,overload:w.overload})}var Y=P.prototype;if(Object.defineProperties(P,{defaultMaxListeners:{get:function(){return Y._maxListeners},set:function(y){if(typeof y!="number"||y<0||Number.isNaN(y))throw TypeError("n must be a non-negative number");Y._maxListeners=y},enumerable:!0},once:{value:Q,writable:!0,configurable:!0}}),Object.defineProperties(Y,{_maxListeners:{value:n,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),typeof define=="function"&&define.amd)define(function(){return P});else if(typeof Ib=="object")Fb.exports=P;else{var oe=new Function("","return this")();oe.EventEmitter2=P}})()});var Kr=O(Xn=>{"use strict";Xn.__esModule=!0;var aF;(function(r){r.AND="AND",r.OR="OR",r.XOR="XOR",r.NOT="NOT"})(aF=Xn.Operators||(Xn.Operators={}));var oF;(function(r){r.OPEN_PARENTHESIS="(",r.CLOSE_PARENTHESIS=")"})(oF=Xn.StructuralCharacters||(Xn.StructuralCharacters={}));var uF;(function(r){r.IDENTIFIER="IDENTIFIER",r.OPERATOR="OPERATOR",r.STRUCTURAL_CHARACTER="STRUCTURAL_CHARACTER",r.EOF="EOF",r.COMMENT="COMMENT"})(uF=Xn.Tokens||(Xn.Tokens={}))});var Jh=O(Hu=>{"use strict";Hu.__esModule=!0;var nt=Kr();Hu.OPERATOR_PRECEDENCE={NOT:0,XOR:1,AND:2,OR:3};Hu.VALID_TOKENS={identifierOnly:[{name:nt.Tokens.IDENTIFIER},{name:nt.Tokens.STRUCTURAL_CHARACTER,value:nt.StructuralCharacters.OPEN_PARENTHESIS}],identifierOrNot:[{name:nt.Tokens.IDENTIFIER},{name:nt.Tokens.STRUCTURAL_CHARACTER,value:nt.StructuralCharacters.OPEN_PARENTHESIS},{name:nt.Tokens.OPERATOR,value:nt.Operators.NOT}],binaryOperator:[{name:nt.Tokens.OPERATOR,value:nt.Operators.AND},{name:nt.Tokens.OPERATOR,value:nt.Operators.OR},{name:nt.Tokens.OPERATOR,value:nt.Operators.XOR}],binaryOperatorOrClose:[{name:nt.Tokens.OPERATOR,value:nt.Operators.AND},{name:nt.Tokens.OPERATOR,value:nt.Operators.OR},{name:nt.Tokens.OPERATOR,value:nt.Operators.XOR},{name:nt.Tokens.STRUCTURAL_CHARACTER,value:nt.StructuralCharacters.CLOSE_PARENTHESIS}]}});var ep=O(vn=>{"use strict";vn.__esModule=!0;var Di=Kr();vn.STRUCTURAL_CHARACTERS={"(":Di.StructuralCharacters.OPEN_PARENTHESIS,")":Di.StructuralCharacters.CLOSE_PARENTHESIS};vn.OPERATORS={AND:Di.Operators.AND,OR:Di.Operators.OR,XOR:Di.Operators.XOR,NOT:Di.Operators.NOT};vn.SEPARATORS=new Set([32,9,10,13].map(function(r){return String.fromCodePoint(r)}));vn.QUOTED_IDENTIFIER_DELIMITER=String.fromCodePoint(34);vn.COMMENT_DELIMITER=String.fromCodePoint(35);vn.EOL=String.fromCodePoint(10);vn.ESCAPE_CHARACTER=String.fromCodePoint(92)});var mv=O(wn=>{"use strict";var tp=wn&&wn.__assign||function(){return tp=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])}return r},tp.apply(this,arguments)};wn.__esModule=!0;var pv=Kr(),Ps=ep();wn.createResult=function(r,e,t){return{token:tp({name:r},e!==null?{value:e}:{}),remainingString:t}};wn.getComment=function(r){for(var e=r.length,t=0;t<r.length;t+=1){var n=r[t];if(n===Ps.EOL){e=t;break}}return wn.createResult(pv.Tokens.COMMENT,r.slice(0,e),r.slice(e+1))};wn.getQuotedIdentifier=function(r){for(var e=!1,t="",n=null,s=0;s<r.length;s+=1){var a=r[s];if(n===null)a===Ps.QUOTED_IDENTIFIER_DELIMITER?e?t=t.slice(-1)+Ps.QUOTED_IDENTIFIER_DELIMITER:n=s:(a===Ps.ESCAPE_CHARACTER?e=!0:e=!1,t=t+=a);else{if(!Ps.SEPARATORS.has(a)&&!Ps.STRUCTURAL_CHARACTERS[a])throw new Error("Unexpected character: "+a+" Expected ) character or separator");break}}if(n===null)throw new Error("Unexpected end of expression: expected "+Ps.QUOTED_IDENTIFIER_DELIMITER+" character");return wn.createResult(pv.Tokens.IDENTIFIER,t,r.slice(n+1))}});var yv=O(rp=>{"use strict";rp.__esModule=!0;var ki=Kr(),lr=ep(),Ei=mv();rp.lex=function(r){for(var e=null,t=null,n=null,s=0;s<r.length;s+=1){var a=r[s];if(e===null){if(!lr.SEPARATORS.has(a)){var o=lr.STRUCTURAL_CHARACTERS[a];if(o){var l=r[s+1];if(o===ki.StructuralCharacters.CLOSE_PARENTHESIS&&l&&!lr.SEPARATORS.has(l)&&l!==ki.StructuralCharacters.CLOSE_PARENTHESIS)throw new Error("Unexpected character: "+l+". A closing parenthesis should be followed by another closing parenthesis or whitespace");return Ei.createResult(ki.Tokens.STRUCTURAL_CHARACTER,lr.STRUCTURAL_CHARACTERS[a],r.slice(s+1))}if(a===lr.QUOTED_IDENTIFIER_DELIMITER)return Ei.getQuotedIdentifier(r.slice(s+1));if(a===lr.COMMENT_DELIMITER)return Ei.getComment(r.slice(s+1));e=s}}else if(lr.SEPARATORS.has(a)||lr.STRUCTURAL_CHARACTERS[a]){t=s,n=a;break}else if(a===lr.QUOTED_IDENTIFIER_DELIMITER||a===lr.COMMENT_DELIMITER)throw new Error("Unexpected character: "+a)}if(e!==null){t=t!=null?t:r.length;var c=r.slice(e,t),f=r.slice(t);if(lr.OPERATORS[c]){if(n&&!lr.SEPARATORS.has(n))throw new Error("Unexpected character: "+n+". Operators should be separated using whitespace");return Ei.createResult(ki.Tokens.OPERATOR,lr.OPERATORS[c],f)}else return Ei.createResult(ki.Tokens.IDENTIFIER,c,f)}return Ei.createResult(ki.Tokens.EOF,null,"")}});var gv=O(Dn=>{"use strict";var lF=Dn&&Dn.__spreadArrays||function(){for(var r=0,e=0,t=arguments.length;e<t;e++)r+=arguments[e].length;for(var n=Array(r),s=0,e=0;e<t;e++)for(var a=arguments[e],o=0,l=a.length;o<l;o++,s++)n[s]=a[o];return n};Dn.__esModule=!0;var cF=yv(),Si=Kr(),zu=Jh();Dn.newTokenGenerator=function(r){var e=r;return function(t,n){for(n===void 0&&(n=!1);;){var s=cF.lex(e),a=s.token,o=s.remainingString;if(e=o,a.name!==Si.Tokens.COMMENT)return Dn.validateToken(a,t,n),a}}};Dn.getValue=function(r,e){var t=r(zu.VALID_TOKENS.identifierOrNot),n=t.value===Si.Operators.NOT;n&&(t=r(zu.VALID_TOKENS.identifierOnly));var s=t.name===Si.Tokens.STRUCTURAL_CHARACTER?e(r,!0):[t];return n?lF(s,[{name:Si.Tokens.OPERATOR,value:Si.Operators.NOT}]):s};Dn.previousOperatorTakesPrecedent=function(r,e){return zu.OPERATOR_PRECEDENCE[r]<=zu.OPERATOR_PRECEDENCE[e]};Dn.validateToken=function(r,e,t){if(t===void 0&&(t=!1),r.name===Si.Tokens.EOF){if(t)return;throw new Error("Unexpected end of expression")}for(var n=0,s=e;n<s.length;n++){var a=s[n];if(a.name===r.name&&(!a.value||a.value===r.value))return}throw new TypeError("Invalid token")}});var sp=O(so=>{"use strict";var Oi=so&&so.__spreadArrays||function(){for(var r=0,e=0,t=arguments.length;e<t;e++)r+=arguments[e].length;for(var n=Array(r),s=0,e=0;e<t;e++)for(var a=arguments[e],o=0,l=a.length;o<l;o++,s++)n[s]=a[o];return n};so.__esModule=!0;var _v=Kr(),Tv=Jh(),Vu=gv();so.parse=function(r){if(typeof r!="string")throw new Error("Expected string but received "+typeof r);var e=Vu.newTokenGenerator(r);return np(e)};var np=function(r,e){e===void 0&&(e=!1);for(var t=Oi(Vu.getValue(r,np)),n=[];;){var s=e?Tv.VALID_TOKENS.binaryOperatorOrClose:Tv.VALID_TOKENS.binaryOperator,a=r(s,!e);if(a.name===_v.Tokens.EOF||a.name===_v.Tokens.STRUCTURAL_CHARACTER)return Oi(t,Oi(n).reverse());for(;n.length;){var o=n[n.length-1]||null;if(o&&Vu.previousOperatorTakesPrecedent(o.value,a.value))t=Oi(t,[o]),n=n.slice(0,-1);else break}n=Oi(n,[a]),t=Oi(t,Vu.getValue(r,np))}}});var ip=O(kn=>{"use strict";kn.__esModule=!0;var bv=Kr();kn.andUtil=function(r,e){return r&&e};kn.orUtil=function(r,e){return r||e};kn.xorUtil=function(r,e){return r!==e};kn.notUtil=function(r){return!r};kn.isIdentifier=function(r){var e=r.name,t=r.value;return e===bv.Tokens.IDENTIFIER&&typeof t=="string"};kn.isOperator=function(r){var e=r.name,t=r.value;return e===bv.Tokens.OPERATOR&&typeof t=="string"};kn.throwInvalidExpression=function(r){throw new TypeError("Invalid postfix expression: "+r)}});var vv=O(up=>{"use strict";var io;up.__esModule=!0;var ap=Kr(),op=ip();up.OPERATOR_MAP=(io={},io[ap.Operators.AND]=op.andUtil,io[ap.Operators.OR]=op.orUtil,io[ap.Operators.XOR]=op.xorUtil,io)});var Dv=O(Ns=>{"use strict";var lp=Ns&&Ns.__spreadArrays||function(){for(var r=0,e=0,t=arguments.length;e<t;e++)r+=arguments[e].length;for(var n=Array(r),s=0,e=0;e<t;e++)for(var a=arguments[e],o=0,l=a.length;o<l;o++,s++)n[s]=a[o];return n};Ns.__esModule=!0;var dF=sp(),wv=Kr(),fF=vv(),As=ip();Ns.getEvaluator=function(r){var e=dF.parse(r);return function(t){return Ns.evaluate(e,t)}};Ns.evaluate=function(r,e){if(!Array.isArray(r))throw new Error(r+" should be an array. evaluate takes in a parsed expression. Use in combination with parse or use getEvaluator");var t=r.reduce(function(n,s,a){if(!(s&&(As.isIdentifier(s)||As.isOperator(s))))throw new Error("Invalid token: "+s+". Found in parsed expression at index "+a);if(s.name===wv.Tokens.IDENTIFIER)return lp(n,[Boolean(e[s.value])]);var o=n[n.length-2],l=n[n.length-1];if(s.value===wv.Operators.NOT)return l===void 0&&As.throwInvalidExpression("missing identifier"),lp(n.slice(0,-1),[As.notUtil(l)]);(l===void 0||o===void 0)&&As.throwInvalidExpression("missing identifier");var c=fF.OPERATOR_MAP[s.value];return c||As.throwInvalidExpression("unknown operator"),lp(n.slice(0,-2),[c(o,l)])},[]);return t.length!==1&&As.throwInvalidExpression("too many identifiers after evaluation"),t[0]}});var Ev=O(ao=>{"use strict";ao.__esModule=!0;var kv=Dv();ao.getEvaluator=kv.getEvaluator;ao.evaluate=kv.evaluate;var hF=sp();ao.parse=hF.parse});var _F={};kD(_F,{default:()=>dl});module.exports=ED(_F);var qv=require("obsidian");var hi=require("obsidian");var bF=new Error("timeout while waiting for mutex to become available"),vF=new Error("mutex already locked"),SD=new Error("request for lock canceled"),OD=function(r,e,t,n){function s(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function l(m){try{f(n.next(m))}catch(g){o(g)}}function c(m){try{f(n.throw(m))}catch(g){o(g)}}function f(m){m.done?a(m.value):s(m.value).then(l,c)}f((n=n.apply(r,e||[])).next())})},Rl=class{constructor(e,t=SD){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 OD(this,void 0,void 0,function*(){let[n,s]=yield this.acquire(t);try{return yield e(n)}finally{s()}})}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 s=this._value,a=t;this._value-=t,t=this._value+1,n.resolve([s,this._newReleaser(a)])}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]=[])}},MD=function(r,e,t,n){function s(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function l(m){try{f(n.next(m))}catch(g){o(g)}}function c(m){try{f(n.throw(m))}catch(g){o(g)}}function f(m){m.done?a(m.value):s(m.value).then(l,c)}f((n=n.apply(r,e||[])).next())})},Eo=class{constructor(e){this._semaphore=new Rl(1,e)}acquire(){return MD(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 gu=os(mt()),qn=os(vh()),Xt=class{static parseDate(e,t=!1){return window.moment(gu.parseDate(e,void 0,{forwardDate:t})).startOf("day")}static parseDateRange(e){let t=[Xt.parseRelativeDateRange,Xt.parseSpecificDateRange,Xt.parseAbsoluteDateRange];for(let n of t){let s=n(e);if(s!==void 0)return s}return[qn.default.invalid(),qn.default.invalid()]}static parseAbsoluteDateRange(e){let t=gu.parse(e,void 0,{forwardDate:!0});if(t.length===0)return;let n=t[0].start,s=t[1]&&t[1].start?t[1].start:n,a=window.moment(n.date()),o=window.moment(s.date()),l=[a,o];return o.isBefore(a)&&(l=[o,a]),Xt.setDateRangeToStartOfDay(l)}static parseRelativeDateRange(e){let t=/(last|this|next) (week|month|quarter|year)/,n=e.match(t);if(n&&n.length===3){let s=n[1],a=n[2],o=qn.default.duration(1,a),l=[(0,qn.default)(),(0,qn.default)()];switch(s){case"last":l.forEach(f=>f.subtract(o));break;case"next":l.forEach(f=>f.add(o));break}let c=a==="week"?"isoWeek":a;return l=[l[0].startOf(c),l[1].endOf(c)],Xt.setDateRangeToStartOfDay(l)}}static parseSpecificDateRange(e){let t=[[/^\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[n,s,a]of t){let o=e.match(n);if(o){let l=o[0].trim(),c=[(0,qn.default)(l,s).startOf(a),(0,qn.default)(l,s).endOf(a)];return Xt.setDateRangeToStartOfDay(c)}}}static setDateRangeToStartOfDay(e){return e.forEach(t=>t.startOf("day")),e}};var HC={td:"today",tm:"tomorrow",yd:"yesterday",tw:"this week",nw:"next week",weekend:"sat",we:"sat"};function oi(r){for(let[e,t]of Object.entries(HC))r=r.replace(RegExp(`\\b${e}\\s`,"i"),t);return r}var _u=["MO","TU","WE","TH","FR","SA","SU"],ct=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(_u.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=_u[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 ze=function(r){return r!=null},ar=function(r){return typeof r=="number"},wh=function(r){return typeof r=="string"&&_u.includes(r)},Nt=Array.isArray,Dr=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 we=function(r,e){var t=0,n=[];if(Nt(r))for(;t<e;t++)n[t]=[].concat(r);else for(;t<e;t++)n[t]=r;return n},MT=function(r){return Nt(r)?r:[r]};function Ts(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+=we(t,e/t.length)),t.slice(0,e)+String(n))}var RT=function(r,e,t){var n=r.split(e);return t?n.slice(0,t).concat([n.slice(t).join(e)]):n},Yt=function(r,e){var t=r%e;return t*e<0?t+e:t},Tu=function(r,e){return{div:Math.floor(r/e),mod:Yt(r,e)}},or=function(r){return!ze(r)||r.length===0},it=function(r){return!or(r)},Ee=function(r,e){return it(r)&&r.indexOf(e)!==-1};var jn;(function(r){r.MONTH_DAYS=[31,28,31,30,31,30,31,31,30,31,30,31],r.ONE_DAY=1e3*60*60*24,r.MAXYEAR=9999,r.ORDINAL_BASE=new Date(Date.UTC(1970,0,1)),r.PY_WEEKDAYS=[6,0,1,2,3,4,5],r.getYearDay=function(e){var t=new Date(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate());return Math.ceil((t.valueOf()-new Date(e.getUTCFullYear(),0,1).valueOf())/r.ONE_DAY)+1},r.isLeapYear=function(e){return e%4===0&&e%100!==0||e%400===0},r.isDate=function(e){return e instanceof Date},r.isValidDate=function(e){return r.isDate(e)&&!isNaN(e.getTime())},r.tzOffset=function(e){return e.getTimezoneOffset()*60*1e3},r.daysBetween=function(e,t){var n=e.getTime()-r.tzOffset(e),s=t.getTime()-r.tzOffset(t),a=n-s;return Math.round(a/r.ONE_DAY)},r.toOrdinal=function(e){return r.daysBetween(e,r.ORDINAL_BASE)},r.fromOrdinal=function(e){return new Date(r.ORDINAL_BASE.getTime()+e*r.ONE_DAY)},r.getMonthDays=function(e){var t=e.getUTCMonth();return t===1&&r.isLeapYear(e.getUTCFullYear())?29:r.MONTH_DAYS[t]},r.getWeekday=function(e){return r.PY_WEEKDAYS[e.getUTCDay()]},r.monthRange=function(e,t){var n=new Date(Date.UTC(e,t,1));return[r.getWeekday(n),r.getMonthDays(n)]},r.combine=function(e,t){return t=t||e,new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))},r.clone=function(e){var t=new Date(e.getTime());return t},r.cloneDates=function(e){for(var t=[],n=0;n<e.length;n++)t.push(r.clone(e[n]));return t},r.sort=function(e){e.sort(function(t,n){return t.getTime()-n.getTime()})},r.timeToUntilString=function(e,t){t===void 0&&(t=!0);var n=new Date(e);return[Ts(n.getUTCFullYear().toString(),4,"0"),Ts(n.getUTCMonth()+1,2,"0"),Ts(n.getUTCDate(),2,"0"),"T",Ts(n.getUTCHours(),2,"0"),Ts(n.getUTCMinutes(),2,"0"),Ts(n.getUTCSeconds(),2,"0"),t?"Z":""].join("")},r.untilStringToDate=function(e){var t=/^(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2})Z?)?$/,n=t.exec(e);if(!n)throw new Error("Invalid UNTIL value: ".concat(e));return new Date(Date.UTC(parseInt(n[1],10),parseInt(n[2],10)-1,parseInt(n[3],10),parseInt(n[5],10)||0,parseInt(n[6],10)||0,parseInt(n[7],10)||0))}})(jn||(jn={}));var se=jn;var zC=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}(),mn=zC;var QT=os(XT(),1),{__extends:li,__assign:Ht,__rest:iY,__decorate:aY,__param:oY,__metadata:uY,__awaiter:lY,__generator:cY,__exportStar:dY,__createBinding:fY,__values:hY,__read:pY,__spread:mY,__spreadArrays:yY,__spreadArray:U,__await:gY,__asyncGenerator:_Y,__asyncDelegator:TY,__asyncValues:bY,__makeTemplateObject:vY,__importStar:wY,__importDefault:DY,__classPrivateFieldGet:kY,__classPrivateFieldSet:EY,__classPrivateFieldIn:SY}=QT.default;var VC=function(r){li(e,r);function e(t,n,s){var a=r.call(this,t,n)||this;return a.iterator=s,a}return e.prototype.add=function(t){return this.iterator(t,this._result.length)?(this._result.push(t),!0):!1},e}(mn),kh=VC;var KC={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}},bs=KC;var JT=function(r,e){return r.indexOf(e)!==-1},ZC=function(r){return r.toString()},XC=function(r,e,t){return"".concat(e," ").concat(t,", ").concat(r)},QC=function(){function r(e,t,n,s){if(t===void 0&&(t=ZC),n===void 0&&(n=bs),s===void 0&&(s=XC),this.text=[],this.language=n||bs,this.gettext=t,this.dateFormatter=s,this.rrule=e,this.options=e.options,this.origOptions=e.origOptions,this.origOptions.bymonthday){var a=[].concat(this.options.bymonthday),o=[].concat(this.options.bynmonthday);a.sort(function(m,g){return m-g}),o.sort(function(m,g){return g-m}),this.bymonthday=a.concat(o),this.bymonthday.length||(this.bymonthday=null)}if(ze(this.origOptions.byweekday)){var l=Nt(this.origOptions.byweekday)?this.origOptions.byweekday:[this.origOptions.byweekday],c=String(l);this.byweekday={allWeeks:l.filter(function(m){return!m.n}),someWeeks:l.filter(function(m){return Boolean(m.n)}),isWeekdays:c.indexOf("MO")!==-1&&c.indexOf("TU")!==-1&&c.indexOf("WE")!==-1&&c.indexOf("TH")!==-1&&c.indexOf("FR")!==-1&&c.indexOf("SA")===-1&&c.indexOf("SU")===-1,isEveryDay:c.indexOf("MO")!==-1&&c.indexOf("TU")!==-1&&c.indexOf("WE")!==-1&&c.indexOf("TH")!==-1&&c.indexOf("FR")!==-1&&c.indexOf("SA")!==-1&&c.indexOf("SU")!==-1};var f=function(m,g){return m.weekday-g.weekday};this.byweekday.allWeeks.sort(f),this.byweekday.someWeeks.sort(f),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(JT(["dtstart","wkst","freq"],n))return!0;if(!JT(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[X.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 s=Math.abs(e);switch(s){case 1:case 21:case 31:t=s+n("st");break;case 2:case 22:t=s+n("nd");break;case 3:case 23:t=s+n("rd");break;default:t=s+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=ar(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,s){var a=this;s===void 0&&(s=","),Nt(e)||(e=[e]);var o=function(c,f,m){for(var g="",T=0;T<c.length;T++)T!==0&&(T===c.length-1?g+=" "+m+" ":g+=f+" "),g+=c[T];return g};t=t||function(c){return c.toString()};var l=function(c){return t&&t.call(a,c)};return n?o(e.map(l),s,n):e.map(l).join(s+" ")},r}(),Br=QC;var JC=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 s in this.rules){n=this.rules[s];var a=n.exec(this.text);a&&(e===null||a[0].length>e[0].length)&&(e=a,t=s)}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 Wa(r,e){e===void 0&&(e=bs);var t={},n=new JC(e.tokens);if(!n.start(r))return null;return s(),t;function s(){n.expect("every");var T=n.acceptNumber();if(T&&(t.interval=parseInt(T[0],10)),n.isDone())throw new Error("Unexpected end");switch(n.symbol){case"day(s)":t.freq=X.DAILY,n.nextSymbol()&&(o(),g());break;case"weekday(s)":t.freq=X.WEEKLY,t.byweekday=[X.MO,X.TU,X.WE,X.TH,X.FR],n.nextSymbol(),g();break;case"week(s)":t.freq=X.WEEKLY,n.nextSymbol()&&(a(),g());break;case"hour(s)":t.freq=X.HOURLY,n.nextSymbol()&&(a(),g());break;case"minute(s)":t.freq=X.MINUTELY,n.nextSymbol()&&(a(),g());break;case"month(s)":t.freq=X.MONTHLY,n.nextSymbol()&&(a(),g());break;case"year(s)":t.freq=X.YEARLY,n.nextSymbol()&&(a(),g());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":t.freq=X.WEEKLY;var S=n.symbol.substr(0,2).toUpperCase();if(t.byweekday=[X[S]],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var v=c();if(!v)throw new Error("Unexpected symbol "+n.symbol+", expected weekday");t.byweekday.push(X[v]),n.nextSymbol()}m(),g();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=X.YEARLY,t.bymonth=[l()],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var R=l();if(!R)throw new Error("Unexpected symbol "+n.symbol+", expected month");t.bymonth.push(R),n.nextSymbol()}a(),g();break;default:throw new Error("Unknown symbol")}}function a(){var T=n.accept("on"),S=n.accept("the");if(!!(T||S))do{var v=f(),R=c(),C=l();if(v)R?(n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(X[R].nth(v))):(t.bymonthday||(t.bymonthday=[]),t.bymonthday.push(v),n.accept("day(s)"));else if(R)n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(X[R]);else if(n.symbol==="weekday(s)")n.nextSymbol(),t.byweekday||(t.byweekday=[X.MO,X.TU,X.WE,X.TH,X.FR]);else if(n.symbol==="week(s)"){n.nextSymbol();var $=n.acceptNumber();if(!$)throw new Error("Unexpected symbol "+n.symbol+", expected week number");for(t.byweekno=[parseInt($[0],10)];n.accept("comma");){if($=n.acceptNumber(),!$)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.byweekno.push(parseInt($[0],10))}}else if(C)n.nextSymbol(),t.bymonth||(t.bymonth=[]),t.bymonth.push(C);else return}while(n.accept("comma")||n.accept("the")||n.accept("on"))}function o(){var T=n.accept("at");if(!!T)do{var S=n.acceptNumber();if(!S)throw new Error("Unexpected symbol "+n.symbol+", expected hour");for(t.byhour=[parseInt(S[0],10)];n.accept("comma");){if(S=n.acceptNumber(),!S)throw new Error("Unexpected symbol "+n.symbol+"; expected hour");t.byhour.push(parseInt(S[0],10))}}while(n.accept("comma")||n.accept("at"))}function l(){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 c(){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 f(){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 T=parseInt(n.value[1],10);if(T<-366||T>366)throw new Error("Nth out of range: "+T);return n.nextSymbol(),n.accept("last")?-T:T;default:return!1}}function m(){n.accept("on"),n.accept("the");var T=f();if(!!T)for(t.bymonthday=[T],n.nextSymbol();n.accept("comma");){if(T=f(),!T)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.bymonthday.push(T),n.nextSymbol()}}function g(){if(n.symbol==="until"){var T=Date.parse(n.text);if(!T)throw new Error("Cannot parse until date:"+n.text);t.until=new Date(T)}else n.accept("for")&&(t.count=parseInt(n.value[0],10),n.expect("number"))}}var _e;(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"})(_e||(_e={}));function qa(r){return r<_e.HOURLY}var eb=function(r,e){return e===void 0&&(e=bs),new X(Wa(r,e)||void 0)},ci=["count","until","interval","byweekday","bymonthday","bymonth"];Br.IMPLEMENTED=[];Br.IMPLEMENTED[_e.HOURLY]=ci;Br.IMPLEMENTED[_e.MINUTELY]=ci;Br.IMPLEMENTED[_e.DAILY]=["byhour"].concat(ci);Br.IMPLEMENTED[_e.WEEKLY]=ci;Br.IMPLEMENTED[_e.MONTHLY]=ci;Br.IMPLEMENTED[_e.YEARLY]=["byweekno","byyearday"].concat(ci);var tb=function(r,e,t,n){return new Br(r,e,t,n).toString()},rb=Br.isFullyConvertible;var di=function(){function r(e,t,n,s){this.hour=e,this.minute=t,this.second=n,this.millisecond=s||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 nb=function(r){li(e,r);function e(t,n,s,a,o,l,c){var f=r.call(this,a,o,l,c)||this;return f.year=t,f.month=n,f.day=s,f}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 jn.getWeekday(new Date(this.getTime()))},e.prototype.getTime=function(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second,this.millisecond)).getTime()},e.prototype.getDay=function(){return this.day},e.prototype.getMonth=function(){return this.month},e.prototype.getYear=function(){return this.year},e.prototype.addYears=function(t){this.year+=t},e.prototype.addMonths=function(t){if(this.month+=t,this.month>12){var n=Math.floor(this.month/12),s=Yt(this.month,12);this.month=s,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,s){for(n&&(this.hour+=Math.floor((23-this.hour)/t)*t);;){this.hour+=t;var a=Tu(this.hour,24),o=a.div,l=a.mod;if(o&&(this.hour=l,this.addDaily(o)),or(s)||Ee(s,this.hour))break}},e.prototype.addMinutes=function(t,n,s,a){for(n&&(this.minute+=Math.floor((1439-(this.hour*60+this.minute))/t)*t);;){this.minute+=t;var o=Tu(this.minute,60),l=o.div,c=o.mod;if(l&&(this.minute=c,this.addHours(l,!1,s)),(or(s)||Ee(s,this.hour))&&(or(a)||Ee(a,this.minute)))break}},e.prototype.addSeconds=function(t,n,s,a,o){for(n&&(this.second+=Math.floor((86399-(this.hour*3600+this.minute*60+this.second))/t)*t);;){this.second+=t;var l=Tu(this.second,60),c=l.div,f=l.mod;if(c&&(this.second=f,this.addMinutes(c,!1,s,a)),(or(s)||Ee(s,this.hour))&&(or(a)||Ee(a,this.minute))&&(or(o)||Ee(o,this.second)))break}},e.prototype.fixDay=function(){if(!(this.day<=28)){var t=jn.monthRange(this.year,this.month-1)[1];if(!(this.day<=t))for(;this.day>t;){if(this.day-=t,++this.month,this.month===13&&(this.month=1,++this.year,this.year>jn.MAXYEAR))return;t=jn.monthRange(this.year,this.month-1)[1]}}},e.prototype.add=function(t,n){var s=t.freq,a=t.interval,o=t.wkst,l=t.byhour,c=t.byminute,f=t.bysecond;switch(s){case _e.YEARLY:return this.addYears(a);case _e.MONTHLY:return this.addMonths(a);case _e.WEEKLY:return this.addWeekly(a,o);case _e.DAILY:return this.addDaily(a);case _e.HOURLY:return this.addHours(a,n,l);case _e.MINUTELY:return this.addMinutes(a,n,l,c);case _e.SECONDLY:return this.addSeconds(a,n,l,c,f)}},e}(di);function Eh(r){for(var e=[],t=Object.keys(r),n=0,s=t;n<s.length;n++){var a=s[n];Ee(ab,a)||e.push(a),se.isDate(r[a])&&!se.isValidDate(r[a])&&e.push(a)}if(e.length)throw new Error("Invalid options: "+e.join(", "));return Ht({},r)}function sb(r){var e=Ht(Ht({},ja),Eh(r));if(ze(e.byeaster)&&(e.freq=X.YEARLY),!(ze(e.freq)&&X.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))),ze(e.wkst)?ar(e.wkst)||(e.wkst=e.wkst.weekday):e.wkst=X.MO.weekday,ze(e.bysetpos)){ar(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)||it(e.byweekno)||it(e.byyearday)||Boolean(e.bymonthday)||it(e.bymonthday)||ze(e.byweekday)||ze(e.byeaster)))switch(e.freq){case X.YEARLY:e.bymonth||(e.bymonth=e.dtstart.getUTCMonth()+1),e.bymonthday=e.dtstart.getUTCDate();break;case X.MONTHLY:e.bymonthday=e.dtstart.getUTCDate();break;case X.WEEKLY:e.byweekday=[se.getWeekday(e.dtstart)];break}if(ze(e.bymonth)&&!Nt(e.bymonth)&&(e.bymonth=[e.bymonth]),ze(e.byyearday)&&!Nt(e.byyearday)&&ar(e.byyearday)&&(e.byyearday=[e.byyearday]),!ze(e.bymonthday))e.bymonthday=[],e.bynmonthday=[];else if(Nt(e.bymonthday)){for(var s=[],a=[],t=0;t<e.bymonthday.length;t++){var n=e.bymonthday[t];n>0?s.push(n):n<0&&a.push(n)}e.bymonthday=s,e.bynmonthday=a}else e.bymonthday<0?(e.bynmonthday=[e.bymonthday],e.bymonthday=[]):(e.bynmonthday=[],e.bymonthday=[e.bymonthday]);if(ze(e.byweekno)&&!Nt(e.byweekno)&&(e.byweekno=[e.byweekno]),!ze(e.byweekday))e.bynweekday=null;else if(ar(e.byweekday))e.byweekday=[e.byweekday],e.bynweekday=null;else if(wh(e.byweekday))e.byweekday=[ct.fromStr(e.byweekday).weekday],e.bynweekday=null;else if(e.byweekday instanceof ct)!e.byweekday.n||e.freq>X.MONTHLY?(e.byweekday=[e.byweekday.weekday],e.bynweekday=null):(e.bynweekday=[[e.byweekday.weekday,e.byweekday.n]],e.byweekday=null);else{for(var o=[],l=[],t=0;t<e.byweekday.length;t++){var c=e.byweekday[t];if(ar(c)){o.push(c);continue}else if(wh(c)){o.push(ct.fromStr(c).weekday);continue}!c.n||e.freq>X.MONTHLY?o.push(c.weekday):l.push([c.weekday,c.n])}e.byweekday=it(o)?o:null,e.bynweekday=it(l)?l:null}return ze(e.byhour)?ar(e.byhour)&&(e.byhour=[e.byhour]):e.byhour=e.freq<X.HOURLY?[e.dtstart.getUTCHours()]:null,ze(e.byminute)?ar(e.byminute)&&(e.byminute=[e.byminute]):e.byminute=e.freq<X.MINUTELY?[e.dtstart.getUTCMinutes()]:null,ze(e.bysecond)?ar(e.bysecond)&&(e.bysecond=[e.bysecond]):e.bysecond=e.freq<X.SECONDLY?[e.dtstart.getUTCSeconds()]:null,{parsedOptions:e}}function ib(r){var e=r.dtstart.getTime()%1e3;if(!qa(r.freq))return[];var t=[];return r.byhour.forEach(function(n){r.byminute.forEach(function(s){r.bysecond.forEach(function(a){t.push(new di(n,s,a,e))})})}),t}function Ga(r){var e=r.split(`
|
|
|
`).map(eI).filter(function(t){return t!==null});return Ht(Ht({},e[0]),e[1])}function $a(r){var e={},t=/DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec(r);if(!t)return e;var n=t[1],s=t[2];return n&&(e.tzid=n),e.dtstart=se.untilStringToDate(s),e}function eI(r){if(r=r.replace(/^\s+|\s+$/,""),!r.length)return null;var e=/^([A-Z]+?)[:;]/.exec(r.toUpperCase());if(!e)return ob(r);var t=e[1];switch(t.toUpperCase()){case"RRULE":case"EXRULE":return ob(r);case"DTSTART":return $a(r);default:throw new Error("Unsupported RFC prop ".concat(t," in ").concat(r))}}function ob(r){var e=r.replace(/^RRULE:/i,""),t=$a(e),n=r.replace(/^(?:RRULE|EXRULE):/i,"").split(";");return n.forEach(function(s){var a=s.split("="),o=a[0],l=a[1];switch(o.toUpperCase()){case"FREQ":t.freq=_e[l.toUpperCase()];break;case"WKST":t.wkst=kr[l.toUpperCase()];break;case"COUNT":case"INTERVAL":case"BYSETPOS":case"BYMONTH":case"BYMONTHDAY":case"BYYEARDAY":case"BYWEEKNO":case"BYHOUR":case"BYMINUTE":case"BYSECOND":var c=tI(l),f=o.toLowerCase();t[f]=c;break;case"BYWEEKDAY":case"BYDAY":t.byweekday=rI(l);break;case"DTSTART":case"TZID":var m=$a(r);t.tzid=m.tzid,t.dtstart=m.dtstart;break;case"UNTIL":t.until=se.untilStringToDate(l);break;case"BYEASTER":t.byeaster=Number(l);break;default:throw new Error("Unknown RRULE property '"+o+"'")}}),t}function tI(r){if(r.indexOf(",")!==-1){var e=r.split(",");return e.map(ub)}return ub(r)}function ub(r){return/^[+-]?\d+$/.test(r)?Number(r):r}function rI(r){var e=r.split(",");return e.map(function(t){if(t.length===2)return kr[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 s=Number(n[1]),a=n[2],o=kr[a].weekday;return new ct(o,s)})}var vs=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=se.timeToUntilString(this.date.getTime(),this.isUTC);return this.isUTC?":".concat(e):";TZID=".concat(this.tzid,":").concat(e)},r.prototype.getTime=function(){return this.date.getTime()},r.prototype.rezonedDate=function(){var e;if(this.isUTC)return this.date;var t=Intl.DateTimeFormat().resolvedOptions().timeZone,n=new Date(this.date.toLocaleString(void 0,{timeZone:t})),s=new Date(this.date.toLocaleString(void 0,{timeZone:(e=this.tzid)!==null&&e!==void 0?e:"UTC"})),a=s.getTime()-n.getTime();return new Date(this.date.getTime()-a)},r}();function Ba(r){for(var e=[],t="",n=Object.keys(r),s=Object.keys(ja),a=0;a<n.length;a++)if(n[a]!=="tzid"&&!!Ee(s,n[a])){var o=n[a].toUpperCase(),l=r[n[a]],c="";if(!(!ze(l)||Nt(l)&&!l.length)){switch(o){case"FREQ":c=X.FREQUENCIES[r.freq];break;case"WKST":ar(l)?c=new ct(l).toString():c=l.toString();break;case"BYWEEKDAY":o="BYDAY",c=MT(l).map(function(S){return S instanceof ct?S:Nt(S)?new ct(S[0],S[1]):new ct(S)}).toString();break;case"DTSTART":t=nI(l,r.tzid);break;case"UNTIL":c=se.timeToUntilString(l,!r.tzid);break;default:if(Nt(l)){for(var f=[],m=0;m<l.length;m++)f[m]=String(l[m]);c=f.toString()}else c=String(l)}c&&e.push([o,c])}}var g=e.map(function(S){var v=S[0],R=S[1];return"".concat(v,"=").concat(R.toString())}).join(";"),T="";return g!==""&&(T="RRULE:".concat(g)),[t,T].filter(function(S){return!!S}).join(`
|
|
|
`)}function nI(r,e){return r?"DTSTART"+new vs(new Date(r),e).toString():""}function sI(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 lb=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?se.clone(t):se.cloneDates(t)),e==="all"?this.all=t:(n._value=t,this[e].push(n))},r.prototype._cacheGet=function(e,t){var n=!1,s=t?Object.keys(t):[],a=function(m){for(var g=0;g<s.length;g++){var T=s[g];if(!sI(t[T],m[T]))return!0}return!1},o=this[e];if(e==="all")n=this.all;else if(Nt(o))for(var l=0;l<o.length;l++){var c=o[l];if(!(s.length&&a(c))){n=c._value;break}}if(!n&&this.all){for(var f=new mn(e,t),l=0;l<this.all.length&&f.accept(this.all[l]);l++);n=f.getValue(),this._cacheAdd(e,n,t)}return Nt(n)?se.cloneDates(n):n instanceof Date?se.clone(n):n},r}();var cb=U(U(U(U(U(U(U(U(U(U(U(U(U([],we(1,31),!0),we(2,28),!0),we(3,31),!0),we(4,30),!0),we(5,31),!0),we(6,30),!0),we(7,31),!0),we(8,31),!0),we(9,30),!0),we(10,31),!0),we(11,30),!0),we(12,31),!0),we(1,7),!0),db=U(U(U(U(U(U(U(U(U(U(U(U(U([],we(1,31),!0),we(2,29),!0),we(3,31),!0),we(4,30),!0),we(5,31),!0),we(6,30),!0),we(7,31),!0),we(8,31),!0),we(9,30),!0),we(10,31),!0),we(11,30),!0),we(12,31),!0),we(1,7),!0),iI=Dr(1,29),aI=Dr(1,30),$n=Dr(1,31),Ut=Dr(1,32),fb=U(U(U(U(U(U(U(U(U(U(U(U(U([],Ut,!0),aI,!0),Ut,!0),$n,!0),Ut,!0),$n,!0),Ut,!0),Ut,!0),$n,!0),Ut,!0),$n,!0),Ut,!0),Ut.slice(0,7),!0),hb=U(U(U(U(U(U(U(U(U(U(U(U(U([],Ut,!0),iI,!0),Ut,!0),$n,!0),Ut,!0),$n,!0),Ut,!0),Ut,!0),$n,!0),Ut,!0),$n,!0),Ut,!0),Ut.slice(0,7),!0),oI=Dr(-28,0),uI=Dr(-29,0),Gn=Dr(-30,0),Wt=Dr(-31,0),pb=U(U(U(U(U(U(U(U(U(U(U(U(U([],Wt,!0),uI,!0),Wt,!0),Gn,!0),Wt,!0),Gn,!0),Wt,!0),Wt,!0),Gn,!0),Wt,!0),Gn,!0),Wt,!0),Wt.slice(0,7),!0),mb=U(U(U(U(U(U(U(U(U(U(U(U(U([],Wt,!0),oI,!0),Wt,!0),Gn,!0),Wt,!0),Gn,!0),Wt,!0),Wt,!0),Gn,!0),Wt,!0),Gn,!0),Wt,!0),Wt.slice(0,7),!0),yb=[0,31,60,91,121,152,182,213,244,274,305,335,366],gb=[0,31,59,90,120,151,181,212,243,273,304,334,365],Sh=function(){for(var r=[],e=0;e<55;e++)r=r.concat(Dr(7));return r}();function _b(r,e){var t=new Date(Date.UTC(r,0,1)),n=se.isLeapYear(r)?366:365,s=se.isLeapYear(r+1)?366:365,a=se.toOrdinal(t),o=se.getWeekday(t),l=Ht(Ht({yearlen:n,nextyearlen:s,yearordinal:a,yearweekday:o},lI(r)),{wnomask:null});if(or(e.byweekno))return l;l.wnomask=we(0,n+7);var c,f,m=c=Yt(7-o+e.wkst,7);m>=4?(m=0,f=l.yearlen+Yt(o-e.wkst,7)):f=n-m;for(var g=Math.floor(f/7),T=Yt(f,7),S=Math.floor(g+T/4),v=0;v<e.byweekno.length;v++){var R=e.byweekno[v];if(R<0&&(R+=S+1),R>0&&R<=S){var C=void 0;R>1?(C=m+(R-1)*7,m!==c&&(C-=7-c)):C=m;for(var $=0;$<7&&(l.wnomask[C]=1,C++,l.wdaymask[C]!==e.wkst);$++);}}if(Ee(e.byweekno,1)){var C=m+S*7;if(m!==c&&(C-=7-c),C<n)for(var v=0;v<7&&(l.wnomask[C]=1,C+=1,l.wdaymask[C]!==e.wkst);v++);}if(m){var B=void 0;if(Ee(e.byweekno,-1))B=-1;else{var W=se.getWeekday(new Date(Date.UTC(r-1,0,1))),De=Yt(7-W.valueOf()+e.wkst,7),Te=se.isLeapYear(r-1)?366:365,be=void 0;De>=4?(De=0,be=Te+Yt(W-e.wkst,7)):be=n-m,B=Math.floor(52+Yt(be,7)/4)}if(Ee(e.byweekno,B))for(var C=0;C<m;C++)l.wnomask[C]=1}return l}function lI(r){var e=se.isLeapYear(r)?366:365,t=new Date(Date.UTC(r,0,1)),n=se.getWeekday(t);return e===365?{mmask:cb,mdaymask:hb,nmdaymask:mb,wdaymask:Sh.slice(n),mrange:gb}:{mmask:db,mdaymask:fb,nmdaymask:pb,wdaymask:Sh.slice(n),mrange:yb}}function Tb(r,e,t,n,s,a){var o={lastyear:r,lastmonth:e,nwdaymask:[]},l=[];if(a.freq===X.YEARLY)if(or(a.bymonth))l=[[0,t]];else for(var c=0;c<a.bymonth.length;c++)e=a.bymonth[c],l.push(n.slice(e-1,e+1));else a.freq===X.MONTHLY&&(l=[n.slice(e-1,e+1)]);if(or(l))return o;o.nwdaymask=we(0,t);for(var c=0;c<l.length;c++)for(var f=l[c],m=f[0],g=f[1]-1,T=0;T<a.bynweekday.length;T++){var S=void 0,v=a.bynweekday[T],R=v[0],C=v[1];C<0?(S=g+(C+1)*7,S-=Yt(s[S]-R,7)):(S=m+(C-1)*7,S+=Yt(7-s[S]+R,7)),m<=S&&S<=g&&(o.nwdaymask[S]=1)}return o}function bb(r,e){e===void 0&&(e=0);var t=r%19,n=Math.floor(r/100),s=r%100,a=Math.floor(n/4),o=n%4,l=Math.floor((n+8)/25),c=Math.floor((n-l+1)/3),f=Math.floor(19*t+n-a-c+15)%30,m=Math.floor(s/4),g=s%4,T=Math.floor(32+2*o+2*m-f-g)%7,S=Math.floor((t+11*f+22*T)/451),v=Math.floor((f+T-7*S+114)/31),R=(f+T-7*S+114)%31+1,C=Date.UTC(r,v-1,R+e),$=Date.UTC(r,0,1);return[Math.ceil((C-$)/(1e3*60*60*24))]}var cI=function(){function r(e){this.options=e}return r.prototype.rebuild=function(e,t){var n=this.options;if(e!==this.lastyear&&(this.yearinfo=_b(e,n)),it(n.bynweekday)&&(t!==this.lastmonth||e!==this.lastyear)){var s=this.yearinfo,a=s.yearlen,o=s.mrange,l=s.wdaymask;this.monthinfo=Tb(e,t,a,o,l,n)}ze(n.byeaster)&&(this.eastermask=bb(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[Dr(this.yearlen),0,this.yearlen]},r.prototype.mdayset=function(e,t){for(var n=this.mrange[t-1],s=this.mrange[t],a=we(null,this.yearlen),o=n;o<s;o++)a[o]=o;return[a,n,s]},r.prototype.wdayset=function(e,t,n){for(var s=we(null,this.yearlen+7),a=se.toOrdinal(new Date(Date.UTC(e,t-1,n)))-this.yearordinal,o=a,l=0;l<7&&(s[a]=a,++a,this.wdaymask[a]!==this.options.wkst);l++);return[s,o,a]},r.prototype.ddayset=function(e,t,n){var s=we(null,this.yearlen),a=se.toOrdinal(new Date(Date.UTC(e,t-1,n)))-this.yearordinal;return s[a]=a,[s,a,a+1]},r.prototype.htimeset=function(e,t,n,s){var a=this,o=[];return this.options.byminute.forEach(function(l){o=o.concat(a.mtimeset(e,l,n,s))}),se.sort(o),o},r.prototype.mtimeset=function(e,t,n,s){var a=this.options.bysecond.map(function(o){return new di(e,t,o,s)});return se.sort(a),a},r.prototype.stimeset=function(e,t,n,s){return[new di(e,t,n,s)]},r.prototype.getdayset=function(e){switch(e){case _e.YEARLY:return this.ydayset.bind(this);case _e.MONTHLY:return this.mdayset.bind(this);case _e.WEEKLY:return this.wdayset.bind(this);case _e.DAILY:return this.ddayset.bind(this);default:return this.ddayset.bind(this)}},r.prototype.gettimeset=function(e){switch(e){case _e.HOURLY:return this.htimeset.bind(this);case _e.MINUTELY:return this.mtimeset.bind(this);case _e.SECONDLY:return this.stimeset.bind(this)}},r}(),vb=cI;function wb(r,e,t,n,s,a){for(var o=[],l=0;l<r.length;l++){var c=void 0,f=void 0,m=r[l];m<0?(c=Math.floor(m/e.length),f=Yt(m,e.length)):(c=Math.floor((m-1)/e.length),f=Yt(m-1,e.length));for(var g=[],T=t;T<n;T++){var S=a[T];!ze(S)||g.push(S)}var v=void 0;c<0?v=g.slice(c)[0]:v=g[c];var R=e[f],C=se.fromOrdinal(s.yearordinal+v),$=se.combine(C,R);Ee(o,$)||o.push($)}return se.sort(o),o}function Du(r,e){var t=e.dtstart,n=e.freq,s=e.interval,a=e.until,o=e.bysetpos,l=e.count;if(l===0||s===0)return yn(r);var c=nb.fromDate(t),f=new vb(e);f.rebuild(c.year,c.month);for(var m=hI(f,c,e);;){var g=f.getdayset(n)(c.year,c.month,c.day),T=g[0],S=g[1],v=g[2],R=fI(T,S,v,f,e);if(it(o))for(var C=wb(o,m,S,v,f,T),$=0;$<C.length;$++){var B=C[$];if(a&&B>a)return yn(r);if(B>=t){var W=Db(B,e);if(!r.accept(W)||l&&(--l,!l))return yn(r)}}else for(var $=S;$<v;$++){var De=T[$];if(!!ze(De))for(var Te=se.fromOrdinal(f.yearordinal+De),be=0;be<m.length;be++){var ee=m[be],B=se.combine(Te,ee);if(a&&B>a)return yn(r);if(B>=t){var W=Db(B,e);if(!r.accept(W)||l&&(--l,!l))return yn(r)}}}if(e.interval===0||(c.add(e,R),c.year>se.MAXYEAR))return yn(r);qa(n)||(m=f.gettimeset(n)(c.hour,c.minute,c.second,0)),f.rebuild(c.year,c.month)}}function dI(r,e,t){var n=t.bymonth,s=t.byweekno,a=t.byweekday,o=t.byeaster,l=t.bymonthday,c=t.bynmonthday,f=t.byyearday;return it(n)&&!Ee(n,r.mmask[e])||it(s)&&!r.wnomask[e]||it(a)&&!Ee(a,r.wdaymask[e])||it(r.nwdaymask)&&!r.nwdaymask[e]||o!==null&&!Ee(r.eastermask,e)||(it(l)||it(c))&&!Ee(l,r.mdaymask[e])&&!Ee(c,r.nmdaymask[e])||it(f)&&(e<r.yearlen&&!Ee(f,e+1)&&!Ee(f,-r.yearlen+e)||e>=r.yearlen&&!Ee(f,e+1-r.yearlen)&&!Ee(f,-r.nextyearlen+e-r.yearlen))}function Db(r,e){return new vs(r,e.tzid).rezonedDate()}function yn(r){return r.getValue()}function fI(r,e,t,n,s){for(var a=!1,o=e;o<t;o++){var l=r[o];a=dI(n,l,s),a&&(r[l]=null)}return a}function hI(r,e,t){var n=t.freq,s=t.byhour,a=t.byminute,o=t.bysecond;return qa(n)?ib(t):n>=X.HOURLY&&it(s)&&!Ee(s,e.hour)||n>=X.MINUTELY&&it(a)&&!Ee(a,e.minute)||n>=X.SECONDLY&&it(o)&&!Ee(o,e.second)?[]:r.gettimeset(n)(e.hour,e.minute,e.second,e.millisecond)}var kr={MO:new ct(0),TU:new ct(1),WE:new ct(2),TH:new ct(3),FR:new ct(4),SA:new ct(5),SU:new ct(6)},ja={freq:_e.YEARLY,dtstart:null,interval:1,wkst:kr.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},ab=Object.keys(ja),X=function(){function r(e,t){e===void 0&&(e={}),t===void 0&&(t=!1),this._cache=t?null:new lb,this.origOptions=Eh(e);var n=sb(e).parsedOptions;this.options=n}return r.parseText=function(e,t){return Wa(e,t)},r.fromText=function(e,t){return eb(e,t)},r.fromString=function(e){return new r(r.parseString(e)||void 0)},r.prototype._iter=function(e){return Du(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 kh("all",{},e));var t=this._cacheGet("all");return t===!1&&(t=this._iter(new mn("all",{})),this._cacheAdd("all",t)),t},r.prototype.between=function(e,t,n,s){if(n===void 0&&(n=!1),!se.isValidDate(e)||!se.isValidDate(t))throw new Error("Invalid date passed in to RRule.between");var a={before:t,after:e,inc:n};if(s)return this._iter(new kh("between",a,s));var o=this._cacheGet("between",a);return o===!1&&(o=this._iter(new mn("between",a)),this._cacheAdd("between",o,a)),o},r.prototype.before=function(e,t){if(t===void 0&&(t=!1),!se.isValidDate(e))throw new Error("Invalid date passed in to RRule.before");var n={dt:e,inc:t},s=this._cacheGet("before",n);return s===!1&&(s=this._iter(new mn("before",n)),this._cacheAdd("before",s,n)),s},r.prototype.after=function(e,t){if(t===void 0&&(t=!1),!se.isValidDate(e))throw new Error("Invalid date passed in to RRule.after");var n={dt:e,inc:t},s=this._cacheGet("after",n);return s===!1&&(s=this._iter(new mn("after",n)),this._cacheAdd("after",s,n)),s},r.prototype.count=function(){return this.all().length},r.prototype.toString=function(){return Ba(this.origOptions)},r.prototype.toText=function(e,t,n){return tb(this,e,t,n)},r.prototype.isFullyConvertibleToText=function(){return rb(this)},r.prototype.clone=function(){return new r(this.origOptions)},r.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],r.YEARLY=_e.YEARLY,r.MONTHLY=_e.MONTHLY,r.WEEKLY=_e.WEEKLY,r.DAILY=_e.DAILY,r.HOURLY=_e.HOURLY,r.MINUTELY=_e.MINUTELY,r.SECONDLY=_e.SECONDLY,r.MO=kr.MO,r.TU=kr.TU,r.WE=kr.WE,r.TH=kr.TH,r.FR=kr.FR,r.SA=kr.SA,r.SU=kr.SU,r.parseString=Ga,r.optionsToString=Ba,r}();function kb(r,e,t,n,s,a){var o={},l=r.accept;function c(T,S){t.forEach(function(v){v.between(T,S,!0).forEach(function(R){o[Number(R)]=!0})})}s.forEach(function(T){var S=new vs(T,a).rezonedDate();o[Number(S)]=!0}),r.accept=function(T){var S=Number(T);return isNaN(S)?l.call(this,T):!o[S]&&(c(new Date(S-1),new Date(S+1)),!o[S])?(o[S]=!0,l.call(this,T)):!0},r.method==="between"&&(c(r.args.after,r.args.before),r.accept=function(T){var S=Number(T);return o[S]?!0:(o[S]=!0,l.call(this,T))});for(var f=0;f<n.length;f++){var m=new vs(n[f],a).rezonedDate();if(!r.accept(new Date(m.getTime())))break}e.forEach(function(T){Du(r,T.options)});var g=r._result;switch(se.sort(g),r.method){case"all":case"between":return g;case"before":return g.length&&g[g.length-1]||null;case"after":default:return g.length&&g[0]||null}}var Eb={dtstart:null,cache:!1,unfold:!1,forceset:!1,compatible:!1,tzid:null};function pI(r,e){var t=[],n=[],s=[],a=[],o=$a(r),l=o.dtstart,c=o.tzid,f=TI(r,e.unfold);return f.forEach(function(m){var g;if(!!m){var T=_I(m),S=T.name,v=T.parms,R=T.value;switch(S.toUpperCase()){case"RRULE":if(v.length)throw new Error("unsupported RRULE parm: ".concat(v.join(",")));t.push(Ga(m));break;case"RDATE":var C=(g=/RDATE(?:;TZID=([^:=]+))?/i.exec(m))!==null&&g!==void 0?g:[],$=C[1];$&&!c&&(c=$),n=n.concat(Sb(R,v));break;case"EXRULE":if(v.length)throw new Error("unsupported EXRULE parm: ".concat(v.join(",")));s.push(Ga(R));break;case"EXDATE":a=a.concat(Sb(R,v));break;case"DTSTART":break;default:throw new Error("unsupported property: "+S)}}}),{dtstart:l,tzid:c,rrulevals:t,rdatevals:n,exrulevals:s,exdatevals:a}}function mI(r,e){var t=pI(r,e),n=t.rrulevals,s=t.rdatevals,a=t.exrulevals,o=t.exdatevals,l=t.dtstart,c=t.tzid,f=e.cache===!1;if(e.compatible&&(e.forceset=!0,e.unfold=!0),e.forceset||n.length>1||s.length||a.length||o.length){var m=new Mh(f);return m.dtstart(l),m.tzid(c||void 0),n.forEach(function(T){m.rrule(new X(Oh(T,l,c),f))}),s.forEach(function(T){m.rdate(T)}),a.forEach(function(T){m.exrule(new X(Oh(T,l,c),f))}),o.forEach(function(T){m.exdate(T)}),e.compatible&&e.dtstart&&m.rdate(l),m}var g=n[0]||{};return new X(Oh(g,g.dtstart||e.dtstart||l,g.tzid||e.tzid||c),f)}function ku(r,e){return e===void 0&&(e={}),mI(r,yI(e))}function Oh(r,e,t){return Ht(Ht({},r),{dtstart:e,tzid:t})}function yI(r){var e=[],t=Object.keys(r),n=Object.keys(Eb);if(t.forEach(function(s){Ee(n,s)||e.push(s)}),e.length)throw new Error("Invalid options: "+e.join(", "));return Ht(Ht({},Eb),r)}function gI(r){if(r.indexOf(":")===-1)return{name:"RRULE",value:r};var e=RT(r,":",1),t=e[0],n=e[1];return{name:t,value:n}}function _I(r){var e=gI(r),t=e.name,n=e.value,s=t.split(";");if(!s)throw new Error("empty property name");return{name:s[0].toUpperCase(),parms:s.slice(1),value:n}}function TI(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 s=t[n]=t[n].replace(/\s+$/g,"");s?n>0&&s[0]===" "?(t[n-1]+=s.slice(1),t.splice(n,1)):n+=1:t.splice(n,1)}return t}function bI(r){r.forEach(function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)})}function Sb(r,e){return bI(e),r.split(",").map(function(t){return se.untilStringToDate(t)})}function Ob(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 s=e._rrule[n].origOptions[r];if(s)return s}}}var Mh=function(r){li(e,r);function e(t){t===void 0&&(t=!1);var n=r.call(this,{},t)||this;return n.dtstart=Ob.apply(n,["dtstart"]),n.tzid=Ob.apply(n,["tzid"]),n._rrule=[],n._rdate=[],n._exrule=[],n._exdate=[],n}return e.prototype._iter=function(t){return kb(t,this._rrule,this._exrule,this._rdate,this._exdate,this.tzid())},e.prototype.rrule=function(t){Mb(t,this._rrule)},e.prototype.exrule=function(t){Mb(t,this._exrule)},e.prototype.rdate=function(t){Rb(t,this._rdate)},e.prototype.exdate=function(t){Rb(t,this._exdate)},e.prototype.rrules=function(){return this._rrule.map(function(t){return ku(t.toString())})},e.prototype.exrules=function(){return this._exrule.map(function(t){return ku(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(Ba({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(s){return s.replace(/^RRULE:/,"EXRULE:")}).filter(function(s){return!/^DTSTART/.test(s)}))}),this._rdate.length&&t.push(xb("RDATE",this._rdate,this.tzid())),this._exdate.length&&t.push(xb("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}(X);function Mb(r,e){if(!(r instanceof X))throw new TypeError(String(r)+" is not RRule instance");Ee(e.map(String),String(r))||e.push(r)}function Rb(r,e){if(!(r instanceof Date))throw new TypeError(String(r)+" is not Date instance");Ee(e.map(Number),Number(r))||(e.push(r),se.sort(e))}function xb(r,e,t){var n=!t||t.toUpperCase()==="UTC",s=n?"".concat(r,":"):"".concat(r,";TZID=").concat(t,":"),a=e.map(function(o){return se.timeToUntilString(o.valueOf(),n)}).join(",");return"".concat(s).concat(a)}function Hr(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 Ot=class{constructor({rrule:e,baseOnToday:t,referenceDate:n,startDate:s,scheduledDate:a,dueDate:o}){this.rrule=e,this.baseOnToday=t,this.referenceDate=n,this.startDate=s,this.scheduledDate=a,this.dueDate=o}static fromText({recurrenceRuleText:e,startDate:t,scheduledDate:n,dueDate:s}){try{let a=e.match(/^([a-zA-Z0-9, !]+?)( when done)?$/i);if(a==null)return null;let o=a[1].trim(),l=a[2]!==void 0,c=X.parseText(o);if(c!==null){let f=null;s?f=window.moment(s):n?f=window.moment(n):t&&(f=window.moment(t)),!l&&f!==null?c.dtstart=window.moment(f).startOf("day").utc(!0).toDate():c.dtstart=window.moment().startOf("day").utc(!0).toDate();let m=new X(c);return new Ot({rrule:m,baseOnToday:l,referenceDate:f,startDate:t,scheduledDate:n,dueDate:s})}}catch(a){}return null}toText(){let e=this.rrule.toText();return this.baseOnToday&&(e+=" when done"),e}next(){var t;let e;if(this.baseOnToday){let n=window.moment(),s=new X(rr(Ne({},this.rrule.origOptions),{dtstart:n.startOf("day").utc(!0).toDate()}));e=this.nextAfter(n.endOf("day"),s)}else{let n=window.moment((t=this.referenceDate)!=null?t:void 0).endOf("day");e=this.nextAfter(n,this.rrule)}if(e!==null){let n=null,s=null,a=null;if(this.referenceDate){if(this.startDate){let o=window.moment.duration(this.startDate.diff(this.referenceDate));n=window.moment(e),n.add(Math.round(o.asDays()),"days")}if(this.scheduledDate){let o=window.moment.duration(this.scheduledDate.diff(this.referenceDate));s=window.moment(e),s.add(Math.round(o.asDays()),"days")}if(this.dueDate){let o=window.moment.duration(this.dueDate.diff(this.referenceDate));a=window.moment(e),a.add(Math.round(o.asDays()),"days")}}return{startDate:n,scheduledDate:s,dueDate:a}}return null}identicalTo(e){return this.baseOnToday!==e.baseOnToday||Hr(this.startDate,e.startDate)!==0||Hr(this.scheduledDate,e.scheduledDate)!==0||Hr(this.dueDate,e.dueDate)!==0?!1:this.toText()===e.toText()}nextAfter(e,t){e.utc(!0);let n=window.moment(t.after(e.toDate())),s=this.toText(),a=s.match(/every( \d+)? month(s)?(.*)?/);a!==null&&(s.includes(" on ")||(n=Ot.nextAfterMonths(e,n,t,a[1])));let o=s.match(/every( \d+)? year(s)?(.*)?/);return o!==null&&(n=Ot.nextAfterYears(e,n,t,o[1])),Ot.addTimezone(n).toDate()}static nextAfterMonths(e,t,n,s){let a=1;for(s!==void 0&&(a=Number.parseInt(s.trim(),10));Ot.isSkippingTooManyMonths(e,t,a);)t=Ot.fromOneDayEarlier(e,n);return t}static isSkippingTooManyMonths(e,t,n){let s=t.month()-e.month();return s+=(t.year()-e.year())*12,s>n}static nextAfterYears(e,t,n,s){let a=1;for(s!==void 0&&(a=Number.parseInt(s.trim(),10));Ot.isSkippingTooManyYears(e,t,a);)t=Ot.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 X(n),window.moment(t.after(e.toDate()))}static addTimezone(e){return window.moment.utc(e).local(!0).startOf("day")}};function Pb(r){let e=`${r.startDateSymbol}${r.scheduledDateSymbol}${r.dueDateSymbol}`;return(t,n,s)=>{let a=[];a=a.concat(wI(t,n,s,e)),a=a.concat(DI(t,n,s,r.recurrenceSymbol));let o=vI(t,s,r),l=Rh(t,/([a-zA-Z'_-]*)/g,n),c=!1;if(l&&l.length>0){let f=l[0];if(f.length>=Math.max(1,s.autoSuggestMinMatch)){let m=o.filter(g=>g.displayText.toLowerCase().includes(f.toLowerCase()));for(let g of m)a.push({suggestionType:"match",displayText:g.displayText,appendText:g.appendText,insertAt:l.index,insertSkip:f.length}),c=!0}}return!c&&s.autoSuggestMinMatch===0&&(a=a.concat(o)),a.length>0&&!a.some(f=>f.suggestionType==="match")&&a.unshift({suggestionType:"empty",displayText:"\u23CE",appendText:`
|
|
|
`}),a=a.slice(0,s.autoSuggestMaxItems),a}}function vI(r,e,t){let n=a=>Object.values(t.prioritySymbols).some(o=>o.length>0&&a.includes(o)),s=[];return r.includes(t.dueDateSymbol)||s.push({displayText:`${t.dueDateSymbol} due date`,appendText:`${t.dueDateSymbol} `}),r.includes(t.startDateSymbol)||s.push({displayText:`${t.startDateSymbol} start date`,appendText:`${t.startDateSymbol} `}),r.includes(t.scheduledDateSymbol)||s.push({displayText:`${t.scheduledDateSymbol} scheduled date`,appendText:`${t.scheduledDateSymbol} `}),n(r)||(s.push({displayText:`${t.prioritySymbols.High} high priority`,appendText:`${t.prioritySymbols.High} `}),s.push({displayText:`${t.prioritySymbols.Medium} medium priority`,appendText:`${t.prioritySymbols.Medium} `}),s.push({displayText:`${t.prioritySymbols.Low} low priority`,appendText:`${t.prioritySymbols.Low} `})),r.includes(t.recurrenceSymbol)||s.push({displayText:`${t.recurrenceSymbol} recurring (repeat)`,appendText:`${t.recurrenceSymbol} `}),s}function wI(r,e,t,n){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"),l=Rh(r,o,e);if(l&&l.length>=2){let c=l[1],f=l[2];if(f.length<t.autoSuggestMinMatch)return[];let m=f&&f.length>1?Xt.parseDate(oi(f),!0):null;m&&m.isValid()&&a.push({displayText:`${m.format(ie.dateFormat)}`,appendText:`${c} ${m.format(ie.dateFormat)} `,insertAt:l.index,insertSkip:l[0].length});let g=1,T=5,S=s.filter(v=>f&&f.length>=g&&v.toLowerCase().includes(f.toLowerCase())).slice(0,T);S.length===0&&(S=s.slice(0,T));for(let v of S){let C=`${Xt.parseDate(v,!0).format(ie.dateFormat)}`;a.push({suggestionType:"match",displayText:`${v} (${C})`,appendText:`${c} ${C} `,insertAt:l.index,insertSkip:l[0].length})}}return a}function DI(r,e,t,n){var c;let s=["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"],a=[],o=new RegExp(`(${n})\\s*([0-9a-zA-Z ]*)`,"ug"),l=Rh(r,o,e);if(l&&l.length>=2){let f=l[1],m=l[2];if(m.length<t.autoSuggestMinMatch)return[];if(m.length>0){let v=(c=Ot.fromText({recurrenceRuleText:m,startDate:null,scheduledDate:null,dueDate:null}))==null?void 0:c.toText();if(v){let R=`${f} ${v} `;if(a.push({suggestionType:"match",displayText:`\u2705 ${v}`,appendText:R,insertAt:l.index,insertSkip:l[0].length}),l[0]==R)return[]}}let g=1,T=t.autoSuggestMaxItems/2,S=s.filter(v=>m&&m.length>=g&&v.toLowerCase().includes(m.toLowerCase())).slice(0,T);S.length===0&&m.trim().length===0&&(S=s.slice(0,T));for(let v of S)a.push({suggestionType:"match",displayText:`${v}`,appendText:`${f} ${v} `,insertAt:l.index,insertSkip:l[0].length})}return a}function Rh(r,e,t){let n=r.matchAll(e);for(let s of n)if((s==null?void 0:s.index)&&s.index<=t&&t<=s.index+s[0].length)return s;return[]}var Ha=class{constructor(){this.hideTaskCount=!1;this.hideBacklinks=!1;this.hidePriority=!1;this.hideCreatedDate=!1;this.hideStartDate=!1;this.hideScheduledDate=!1;this.hideDoneDate=!1;this.hideDueDate=!1;this.hideRecurrenceRule=!1;this.hideEditButton=!1;this.hideUrgency=!0;this.shortMode=!1;this.explainQuery=!1}},Bn=class{constructor(e,t){this.defaultLayout=["description","priority","recurrenceRule","createdDate","startDate","scheduledDate","dueDate","doneDate","blockLink"];this.hiddenComponents=[];this.specificClasses=[];e?this.options=e:this.options=new Ha,t?this.layoutComponents=t:this.layoutComponents=this.defaultLayout,this.layoutComponents=this.applyOptions(this.options)}applyOptions(e){let t=(s,a,o)=>a?(this.specificClasses.push(`tasks-layout-hide-${o}`),this.hiddenComponents.push(o),s.filter(l=>l!=o)):s,n=this.layoutComponents;return n=t(n,e.hidePriority,"priority"),n=t(n,e.hideRecurrenceRule,"recurrenceRule"),n=t(n,e.hideCreatedDate,"createdDate"),n=t(n,e.hideStartDate,"startDate"),n=t(n,e.hideScheduledDate,"scheduledDate"),n=t(n,e.hideDueDate,"dueDate"),n=t(n,e.hideDoneDate,"doneDate"),e.shortMode&&this.specificClasses.push("tasks-layout-short-mode"),n}};var xh={prioritySymbols:{High:"\u23EB",Medium:"\u{1F53C}",Low:"\u{1F53D}",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}},za=class{constructor(e){this.symbols=e}serialize(e){let t=new Bn,n="";for(let s of t.layoutComponents)n+=this.componentToString(e,t,s);return n}componentToString(e,t,n){var g;let{prioritySymbols:s,startDateSymbol:a,createdDateSymbol:o,scheduledDateSymbol:l,doneDateSymbol:c,recurrenceSymbol:f,dueDateSymbol:m}=this.symbols;switch(n){case"description":return e.description;case"priority":{let T="";return e.priority==="1"?T=" "+s.High:e.priority==="2"?T=" "+s.Medium:e.priority==="4"&&(T=" "+s.Low),T}case"startDate":return e.startDate?t.options.shortMode?" "+a:` ${a} ${e.startDate.format(ie.dateFormat)}`:"";case"createdDate":return e.createdDate?t.options.shortMode?" "+o:` ${o} ${e.createdDate.format(ie.dateFormat)}`:"";case"scheduledDate":return!e.scheduledDate||e.scheduledDateIsInferred?"":t.options.shortMode?" "+l:` ${l} ${e.scheduledDate.format(ie.dateFormat)}`;case"doneDate":return e.doneDate?t.options.shortMode?" "+c:` ${c} ${e.doneDate.format(ie.dateFormat)}`:"";case"dueDate":return e.dueDate?t.options.shortMode?" "+m:` ${m} ${e.dueDate.format(ie.dateFormat)}`:"";case"recurrenceRule":return e.recurrence?t.options.shortMode?" "+f:` ${f} ${e.recurrence.toText()}`:"";case"blockLink":return(g=e.blockLink)!=null?g:"";default:throw new Error(`Don't know how to render task component of type '${n}'`)}}deserialize(e){let{prioritySymbols:t,TaskFormatRegularExpressions:n}=this.symbols,s,a="3",o=null,l=null,c=null,f=null,m=null,g="",T=null,S="",v=20,R=0;do{s=!1;let C=e.match(n.priorityRegex);if(C!==null){switch(C[1]){case t.Low:a="4";break;case t.Medium:a="2";break;case t.High:a="1";break}e=e.replace(n.priorityRegex,"").trim(),s=!0}let $=e.match(n.doneDateRegex);$!==null&&(f=window.moment($[1],ie.dateFormat),e=e.replace(n.doneDateRegex,"").trim(),s=!0);let B=e.match(n.dueDateRegex);B!==null&&(c=window.moment(B[1],ie.dateFormat),e=e.replace(n.dueDateRegex,"").trim(),s=!0);let W=e.match(n.scheduledDateRegex);W!==null&&(l=window.moment(W[1],ie.dateFormat),e=e.replace(n.scheduledDateRegex,"").trim(),s=!0);let De=e.match(n.startDateRegex);De!==null&&(o=window.moment(De[1],ie.dateFormat),e=e.replace(n.startDateRegex,"").trim(),s=!0);let Te=e.match(n.createdDateRegex);Te!==null&&(m=window.moment(Te[1],ie.dateFormat),e=e.replace(n.createdDateRegex,"").trim(),s=!0);let be=e.match(n.recurrenceRegex);be!==null&&(g=be[1].trim(),e=e.replace(n.recurrenceRegex,"").trim(),s=!0);let ee=e.match(ie.hashTagsFromEnd);if(ee!=null){e=e.replace(ie.hashTagsFromEnd,"").trim(),s=!0;let te=ee[0].trim();S=S.length>0?[te,S].join(" "):te}R++}while(s&&R<=v);return g.length>0&&(T=Ot.fromText({recurrenceRuleText:g,startDate:o,scheduledDate:l,dueDate:c})),S.length>0&&(e+=" "+S),{description:e,priority:a,startDate:o,createdDate:m,scheduledDate:l,dueDate:c,doneDate:f,recurrence:T,tags:Ge.extractHashtags(e)}}};var Er=(o=>(o.TODO="TODO",o.DONE="DONE",o.IN_PROGRESS="IN_PROGRESS",o.CANCELLED="CANCELLED",o.NON_TASK="NON_TASK",o.EMPTY="EMPTY",o))(Er||{}),Mt=class{constructor(e,t,n,s,a="TODO"){this.symbol=e,this.name=t,this.nextStatusSymbol=n,this.availableAsCommand=s,this.type=a}};var Qt=class{get symbol(){return this.configuration.symbol}get name(){return this.configuration.name}get nextStatusSymbol(){return this.configuration.nextStatusSymbol}get availableAsCommand(){return this.configuration.availableAsCommand}get type(){return this.configuration.type}constructor(e){this.configuration=e}static makeDone(){return new Qt(new Mt("x","Done"," ",!0,"DONE"))}static makeEmpty(){return new Qt(new Mt("","EMPTY","",!0,"EMPTY"))}static makeTodo(){return new Qt(new Mt(" ","Todo","x",!0,"TODO"))}static makeCancelled(){return new Qt(new Mt("-","Cancelled"," ",!0,"CANCELLED"))}static makeInProgress(){return new Qt(new Mt("/","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 Er[e]||"TODO"}static createUnknownStatus(e){return new Qt(new Mt(e,"Unknown","x",!1,"TODO"))}static createFromImportedValue(e){let t=e[0],n=Qt.getTypeFromStatusTypeString(e[3]);return new Qt(new Mt(t,e[1],e[2],!1,n))}isCompleted(){return this.type==="DONE"}previewText(){let e="";return Qt.tasksPluginCanCreateCommandsForStatuses()&&this.availableAsCommand&&(e=" Available as a command."),`- [${this.symbol}] => [${this.nextStatusSymbol}], name: '${this.name}', type: '${this.configuration.type}'.${e}`}static tasksPluginCanCreateCommandsForStatuses(){return!1}},fe=Qt;fe.DONE=Qt.makeDone(),fe.EMPTY=Qt.makeEmpty(),fe.TODO=Qt.makeTodo();var Eu=class{constructor(e=!1,t=!1){this.ignoreSortInstructions=e,this.showTaskHiddenData=t}};var yt=class{constructor(){this.coreStatuses=[fe.makeTodo().configuration,fe.makeDone().configuration],this.customStatuses=[fe.makeInProgress().configuration,fe.makeCancelled().configuration]}static addStatus(e,t){e.push(t)}static replaceStatus(e,t,n){let s=this.findStatusIndex(t,e);return s<=-1?!1:(e.splice(s,1,n),!0)}static findStatusIndex(e,t){let n=new fe(e);return t.findIndex(s=>new fe(s).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){yt.deleteAllCustomStatuses(e),new yt().customStatuses.forEach(n=>{yt.addStatus(e.customStatuses,n)})}static bulkAddStatusCollection(e,t){let n=[];return t.forEach(s=>{e.customStatuses.find(o=>o.symbol==s[0]&&o.name==s[1]&&o.nextStatusSymbol==s[2])?n.push(`The status ${s[1]} (${s[0]}) is already added.`):yt.addStatus(e.customStatuses,fe.createFromImportedValue(s))}),n}static applyToStatusRegistry(e,t){t.clearStatuses(),e.coreStatuses.forEach(n=>{t.add(n)}),e.customStatuses.forEach(n=>{t.add(n)})}};var Ab=[{index:9999,internalName:"INTERNAL_TESTING_ENABLED_BY_DEFAULT",displayName:"Test Item. Used to validate the Feature Framework.",description:"Description",enabledByDefault:!0,stable:!1}];var zr=class{constructor(e,t,n,s,a,o){this.internalName=e;this.index=t;this.description=n;this.displayName=s;this.enabledByDefault=a;this.stable=o}static get values(){let e=[];return Ab.forEach(t=>{e=[...e,new zr(t.internalName,t.index,t.description,t.displayName,t.enabledByDefault,t.stable)]}),e}static get settingsFlags(){let e={};return zr.values.forEach(t=>{e[t.internalName]=t.enabledByDefault}),e}static fromString(e){for(let t of zr.values)if(e===t.internalName)return t;throw new RangeError(`Illegal argument passed to fromString(): ${e} does not correspond to any available Feature ${this.prototype.constructor.name}`)}};function Su(r){return r.replace(/([.*+?^${}()|[\]/\\])/g,"\\$1")}var Sr=class{static get(){let{globalFilter:e}=he();return e}static set(e){Ct({globalFilter:e})}static reset(){Ct({globalFilter:Sr.empty})}static isEmpty(){return Sr.get()===Sr.empty}static equals(e){return Sr.get()===e}static includedIn(e){let t=Sr.get();return e.includes(t)}static prependTo(e){return Sr.get()+" "+e}static removeAsWordFrom(e){if(Sr.isEmpty())return e;let t=RegExp("(^|\\s)"+Su(Sr.get())+"($|\\s)","ug");return e.search(t)>-1&&(e=e.replace(t,"$1$2").replace(" "," ").trim()),e}static removeAsSubstringFrom(e){let t=Sr.get();return e.replace(t,"").trim()}static removeAsSubstringFromDependingOnSettings(e){let{removeGlobalFilter:t}=he();return t?Sr.removeAsSubstringFrom(e):e}},Le=Sr;Le.empty="";var fi={tasksPluginEmoji:{displayName:"Default",taskSerializer:new za(xh),buildSuggestions:Pb(xh)}},EI={globalFilter:Le.empty,removeGlobalFilter:!1,taskFormat:"tasksPluginEmoji",setCreatedDate:!1,setDoneDate:!0,autoSuggestInEditor:!0,autoSuggestMinMatch:0,autoSuggestMaxItems:6,provideAccessKeys:!0,useFilenameAsScheduledDate:!1,filenameAsDateFolders:[],statusSettings:new yt,features:zr.settingsFlags,generalSettings:{},headingOpened:{},debugSettings:new Eu},Hn=Ne({},EI),he=()=>{for(let r in zr.settingsFlags)Hn.features[r]===void 0&&(Hn.features[r]=zr.settingsFlags[r]);return Hn.statusSettings.customStatuses.forEach((r,e,t)=>{var s,a;let n=fe.getTypeFromStatusTypeString(r.type);t[e]=new Mt((s=r.symbol)!=null?s:" ",r.name,(a=r.nextStatusSymbol)!=null?a:"x",r.availableAsCommand,n)}),Ne({},Hn)},Ct=r=>(Hn=Ne(Ne({},Hn),r),he());var ws=(r,e)=>(Hn.generalSettings[r]=e,he()),Cb=r=>{var e;return(e=Hn.features[r])!=null?e:!1};function Ka(){return fi[he().taskFormat]}var Be=class{constructor(){this._registeredStatuses=[];this.addDefaultStatusTypes()}get registeredStatuses(){return this._registeredStatuses.filter(({symbol:e})=>e!==fe.EMPTY.symbol)}static getInstance(){return Be.instance||(Be.instance=new Be),Be.instance}add(e){this.hasSymbol(e.symbol)||(e instanceof fe?this._registeredStatuses.push(e):this._registeredStatuses.push(new fe(e)))}bySymbol(e){return this.hasSymbol(e)?this.getSymbol(e):fe.EMPTY}bySymbolOrCreate(e){return this.hasSymbol(e)?this.getSymbol(e):fe.createUnknownStatus(e)}byName(e){return this._registeredStatuses.filter(({name:t})=>t===e).length>0?this._registeredStatuses.filter(({name:t})=>t===e)[0]:fe.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 fe.EMPTY}getNextStatusOrCreate(e){let t=this.getNextStatus(e);return t.type!=="EMPTY"?t:fe.createUnknownStatus(e.nextStatusSymbol)}findUnknownStatuses(e){let t=e.filter(a=>!this.hasSymbol(a.symbol)),n=new Be,s=[];return t.forEach(a=>{if(n.hasSymbol(a.symbol))return;let o=Be.copyStatusWithNewName(a,`Unknown (${a.symbol})`);s.push(o),n.add(o)}),s}static copyStatusWithNewName(e,t){let n=new Mt(e.symbol,t,e.nextStatusSymbol,e.availableAsCommand,e.type);return new fe(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(){[fe.makeTodo(),fe.makeInProgress(),fe.makeDone(),fe.makeCancelled()].forEach(t=>{this.add(t)})}};var _n=class{static calculate(e){let t=0;if(e.dueDate!==null){let n=Math.round(window.moment().diff(e.dueDate)/_n.milliSecondsPerDay),s;n>=7?s=1:n>=-14?s=(n+14)*.8/21+.2:s=.2,t+=s*_n.dueCoefficient}switch(e.scheduledDate!==null&&window.moment().isSameOrAfter(e.scheduledDate)&&(t+=1*_n.scheduledCoefficient),e.startDate!==null&&window.moment().isBefore(e.startDate)&&(t+=1*_n.startedCoefficient),e.priority){case"1":t+=1*_n.priorityCoefficient;break;case"2":t+=.65*_n.priorityCoefficient;break;case"3":t+=.325*_n.priorityCoefficient;break}return t}},gn=_n;gn.dueCoefficient=12,gn.scheduledCoefficient=5,gn.startedCoefficient=-3,gn.priorityCoefficient=6,gn.milliSecondsPerDay=1e3*60*60*24;var $b=require("obsidian");var Xa=require("obsidian");var Yb=os(vh()),SI=require("obsidian"),Ub=os(Lb());var Ph=class extends Ub.EventEmitter2{constructor(){super(...arguments);this.options={minLevels:{"":"info",tasks:"info"}};this.consoleLoggerRegistered=!1;this.arrAvg=t=>t.reduce((n,s)=>n+s,0)/t.length}configure(t){return this.options=Object.assign({},this.options,t),this}getLogger(t){let n="none",s="";for(let a in this.options.minLevels)t.startsWith(a)&&a.length>=s.length&&(n=this.options.minLevels[a],s=a);return new Ah(this,t,n)}onLogEntry(t){return this.on("log",t),this}registerConsoleLogger(){return this.consoleLoggerRegistered?this:(this.onLogEntry(t=>{let n=`[${(0,Yb.default)().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)}},Ou=new Ph,Ah=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 a={level:e,module:this.module,message:t,objects:n,traceId:void 0};this.logManager.emit("log",a)}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,s){if(this.levelToInt(e)<this.minLevel)return;let o={level:e,module:this.module,message:n,objects:s,traceId:t};this.logManager.emit("log",o)}traceWithId(e,t,n){this.logWithId("trace",e,t,n)}debugWithId(e,t,n){this.logWithId("debug",e,t,n)}infoWithId(e,t,n){this.logWithId("info",e,t,n)}warnWithId(e,t,n){this.logWithId("warn",e,t,n)}errorWithId(e,t,n){this.logWithId("error",e,t,n)}};var Ch,Ih,Fh,OI=["md"],Za=Ou.getLogger("tasks"),Wb=({metadataCache:r,vault:e,workspace:t})=>{Ch=r,Ih=e,Fh=t},Mu=t=>J(void 0,[t],function*({originalTask:r,newTasks:e}){if(Ih===void 0||Ch===void 0||Fh===void 0){Lh("Tasks: cannot use File before initializing it.");return}Array.isArray(e)||(e=[e]),Za.debug(`replaceTaskWithTasks entered. ${r.path}`),qb({originalTask:r,newTasks:e,vault:Ih,metadataCache:Ch,workspace:Fh,previousTries:0})});function Lh(r){console.error(r),new Xa.Notice(r,15e3)}function Nh(r){console.warn(r),new Xa.Notice(r,1e4)}function MI(r){Za.debug(r)}var qb=o=>J(void 0,[o],function*({originalTask:r,newTasks:e,vault:t,metadataCache:n,workspace:s,previousTries:a}){Za.debug(`tryRepetitive after ${a} previous tries`);let l=()=>{if(a>10){let C=`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.
|
|
|
`;Lh(C);return}let R=Math.min(Math.pow(10,a),100);Za.debug(`timeout = ${R}`),setTimeout(()=>{qb({originalTask:r,newTasks:e,vault:t,metadataCache:n,workspace:s,previousTries:a+1})},R)},c=t.getAbstractFileByPath(r.path);if(!(c instanceof Xa.TFile))return Nh(`Tasks: No file found for task ${r.description}. Retrying ...`),l();if(!OI.includes(c.extension)){Lh(`Tasks: Does not support files with the ${c.extension} file extension.`);return}let f=n.getFileCache(c);if(f==null||f===null)return Nh(`Tasks: No file cache found for file ${c.path}. Retrying ...`),l();let m=f.listItems;if(m===void 0||m.length===0)return Nh(`Tasks: No list items found in file cache of ${c.path}. Retrying ...`),l();let T=(yield t.read(c)).split(`
|
|
|
`),S=RI(r,T,m,MI);if(S===void 0)return l();let v=[...T.slice(0,S),...e.map(R=>R.toFileLineString()),...T.slice(S+1)];yield t.modify(c,v.join(`
|
|
|
`))});function jb(r,e){return r<e.length}function RI(r,e,t,n){let s=xI(r,e);return s!==void 0||(s=PI(r,e),s!==void 0)?s:AI(r,e,t,n)}function xI(r,e){let t=r.taskLocation.lineNumber;if(jb(t,e)&&e[t]===r.originalMarkdown)return Za.debug(`Found original markdown at original line number ${t}`),t}function PI(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 AI(r,e,t,n){let s,a=0;for(let o of t){let l=o.position.start.line;if(!jb(l,e))return;if(l<r.taskLocation.sectionStart||o.task===void 0)continue;let c=e[l];if(Le.includedIn(c)){if(a===r.taskLocation.sectionIndex){if(c===r.originalMarkdown)s=l;else{n(`Tasks: Unable to find task in file ${r.taskLocation.path}.
|
|
|
Expected task:
|
|
|
${r.originalMarkdown}
|
|
|
Found task:
|
|
|
${c}`);return}break}a++}}return s}var zn={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:""},NI=7,CI="far";function II(r,e,t){return J(this,null,function*(){yield $b.MarkdownRenderer.renderMarkdown(r,e,t,null)})}function Gb(r,e,t=null){return J(this,null,function*(){var l;t||(t=II);let n=document.createElement("li");e.parentUlElement.appendChild(n),n.classList.add("task-list-item","plugin-tasks-list-item");let s=document.createElement("span");n.appendChild(s),s.classList.add("tasks-list-text");let a=yield FI(r,e,s,t);for(let c in a)n.dataset[c]=a[c];let o=document.createElement("input");return n.appendChild(o),o.classList.add("task-list-item-checkbox"),o.type="checkbox",r.status.symbol!==" "&&(o.checked=!0,n.classList.add("is-checked")),o.addEventListener("click",c=>{c.preventDefault(),c.stopPropagation(),o.disabled=!0;let f=r.toggle();Mu({originalTask:r,newTasks:f})}),n.prepend(o),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),o.setAttribute("data-line",e.listIndex.toString()),(l=e.layoutOptions)!=null&&l.shortMode&&qI({task:r,element:s,isFilenameUnique:e.isFilenameUnique}),n})}function FI(r,e,t,n){return J(this,null,function*(){let s={},a=new Bn(e.layoutOptions),o=fi.tasksPluginEmoji.taskSerializer;for(let l of a.layoutComponents){let c=o.componentToString(r,a,l);if(c){l==="description"&&(c=Le.removeAsSubstringFromDependingOnSettings(c));let f=document.createElement("span");if(t.appendChild(f),f){let m=document.createElement("span");f.appendChild(m),yield LI(m,c,l,r,n);let[g,T]=Yh(l,r);YI(l,m),f.classList.add(...g);for(let S in T)f.dataset[S]=T[S];s=Ne(Ne({},s),T)}}}for(let l of a.hiddenComponents){let[c,f]=Yh(l,r);s=Ne(Ne({},s),f)}if(s.taskPriority===void 0){let[l,c]=Yh("priority",r);s=Ne(Ne({},s),c)}return s})}function LI(r,e,t,n,s){return J(this,null,function*(){if(t==="description"){let{debugSettings:a}=he();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 s(e,r,n.path);let o=r.querySelector("blockquote"),l=o!=null?o:r,c=l.querySelector("p");if(c!==null){for(;c.firstChild;)l.insertBefore(c.firstChild,c);c.remove()}r.querySelectorAll("p").forEach(f=>{f.hasChildNodes()||f.remove()}),r.querySelectorAll(".footnotes").forEach(f=>{f.remove()})}else r.innerHTML=e})}function Yh(r,e){let t=[],n={},s=(a,o)=>{let l=UI(a);l&&(n[o]=l)};switch(r){case"description":t.push(zn.description);break;case"priority":{let a=null;e.priority==="1"?a="high":e.priority==="2"?a="medium":e.priority==="4"?a="low":a="normal",n.taskPriority=a,t.push(zn.priority);break}case"createdDate":{let a=e.createdDate;a&&(t.push(zn.createdDate),s(a,"taskCreated"));break}case"dueDate":{let a=e.dueDate;a&&(t.push(zn.dueDate),s(a,"taskDue"));break}case"startDate":{let a=e.startDate;a&&(t.push(zn.startDate),s(a,"taskStart"));break}case"scheduledDate":{let a=e.scheduledDate;a&&(t.push(zn.scheduledDate),s(a,"taskScheduled"));break}case"doneDate":{let a=e.doneDate;a&&(t.push(zn.doneDate),s(a,"taskDone"));break}case"recurrenceRule":{t.push(zn.recurrenceRule);break}}return[t,n]}function YI(r,e){if(r==="description"){let t=e.getElementsByClassName("tag");for(let n=0;n<t.length;n++){let s=t[n].textContent;if(s){let a=WI(s),o=t[n];a&&(o.dataset.tagName=a)}}}}function UI(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)<=NI?t+=Math.abs(n).toString()+"d":t+=CI,t)}function WI(r){let e=/["&\x00\r\n]/g,t=r.replace(e,"-");return t=t.replace(/^[-_]+/,""),t.length>0?t:null}function qI({task:r,element:e,isFilenameUnique:t}){let{recurrenceSymbol:n,startDateSymbol:s,createdDateSymbol:a,scheduledDateSymbol:o,dueDateSymbol:l,doneDateSymbol:c}=fi.tasksPluginEmoji.taskSerializer.symbols;e.addEventListener("mouseenter",()=>{let f=e.createDiv();f.addClasses(["tooltip","pop-up"]),r.recurrence&&f.createDiv().setText(`${n} ${r.recurrence.toText()}`),r.createdDate&&f.createDiv().setText(Qa({signifier:a,date:r.createdDate})),r.startDate&&f.createDiv().setText(Qa({signifier:s,date:r.startDate})),r.scheduledDate&&f.createDiv().setText(Qa({signifier:o,date:r.scheduledDate})),r.dueDate&&f.createDiv().setText(Qa({signifier:l,date:r.dueDate})),r.doneDate&&f.createDiv().setText(Qa({signifier:c,date:r.doneDate}));let m=r.getLinkText({isFilenameUnique:t});m&&f.createDiv().setText(`\u{1F517} ${m}`),e.addEventListener("mouseleave",()=>{f.remove()})})}function Qa({signifier:r,date:e}){return`${r} ${e.format(ie.dateFormat)} (${e.from(window.moment().startOf("day"))})`}var Jt=class{static fromPath(e){let{useFilenameAsScheduledDate:t,filenameAsDateFolders:n}=he();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("."),s=e.substring(t,n),a=/(\d{4})-(\d{2})-(\d{2})/.exec(s);if(a||(a=/(\d{4})(\d{2})(\d{2})/.exec(s)),a){let o=window.moment([parseInt(a[1]),parseInt(a[2])-1,parseInt(a[3])]);if(o.isValid())return o}return null}static canApplyFallback({startDate:e,scheduledDate:t,dueDate:n}){return e===null&&n===null&&t===null}static updateTaskPath(e,t,n){let s=e.scheduledDate,a=e.scheduledDateIsInferred;return n===null?a&&(a=!1,s=null):a?s=n:this.canApplyFallback(e)&&(s=n,a=!0),new Ge(rr(Ne({},e),{taskLocation:e.taskLocation.fromRenamedFile(t),scheduledDate:s,scheduledDateIsInferred:a}))}static removeInferredStatusIfNeeded(e,t){let n=e.scheduledDateIsInferred?e.scheduledDate:null;return t.map(s=>(n!==null&&!n.isSame(s.scheduledDate,"day")&&(s=new Ge(rr(Ne({},s),{scheduledDateIsInferred:!1}))),s))}};var ur=class{},ie=ur;ie.dateFormat="YYYY-MM-DD",ie.indentationRegex=/^([\s\t>]*)/,ie.listMarkerRegex=/([-*]|[0-9]+\.)/,ie.checkboxRegex=/\[(.)\]/u,ie.afterCheckboxRegex=/ *(.*)/u,ie.taskRegex=new RegExp(ur.indentationRegex.source+ur.listMarkerRegex.source+" +"+ur.checkboxRegex.source+ur.afterCheckboxRegex.source,"u"),ie.nonTaskRegex=new RegExp(ur.indentationRegex.source+ur.listMarkerRegex.source+"? *("+ur.checkboxRegex.source+")?"+ur.afterCheckboxRegex.source,"u"),ie.listItemRegex=new RegExp(ur.indentationRegex.source+ur.listMarkerRegex.source),ie.blockLinkRegex=/ \^[a-zA-Z0-9-]+$/u,ie.hashTags=/(^|\s)#[^ !@#$%^&*(),.?":{}|<>]*/g,ie.hashTagsFromEnd=new RegExp(ur.hashTags.source+"$");var Ge=class{constructor({status:e,description:t,taskLocation:n,indentation:s,listMarker:a,priority:o,createdDate:l,startDate:c,scheduledDate:f,dueDate:m,doneDate:g,recurrence:T,blockLink:S,tags:v,originalMarkdown:R,scheduledDateIsInferred:C}){this._urgency=null;this.status=e,this.description=t,this.indentation=s,this.listMarker=a,this.taskLocation=n,this.tags=v,this.priority=o,this.createdDate=l,this.startDate=c,this.scheduledDate=f,this.dueDate=m,this.doneDate=g,this.recurrence=T,this.blockLink=S,this.originalMarkdown=R,this.scheduledDateIsInferred=C}static fromLine({line:e,taskLocation:t,fallbackDate:n}){let s=e.match(ie.taskRegex);if(s===null)return null;let a=s[4].trim();if(!Le.includedIn(a))return null;let o=a,l=s[1],c=s[2],f=s[3],m=Be.getInstance().bySymbolOrCreate(f),g=o.match(ie.blockLinkRegex),T=g!==null?g[0]:"";T!==""&&(o=o.replace(ie.blockLinkRegex,"").trim());let{taskSerializer:S}=Ka(),v=S.deserialize(o),R=!1;return Jt.canApplyFallback(v)&&n!==null&&(v.scheduledDate=n,R=!0),v.tags=v.tags.map(C=>C.trim()),v.tags=v.tags.filter(C=>!Le.equals(C)),new Ge(rr(Ne({},v),{status:m,indentation:l,listMarker:c,taskLocation:t,blockLink:T,originalMarkdown:e,scheduledDateIsInferred:R}))}toLi(e){return J(this,null,function*(){return Gb(this,e)})}toString(){return Ka().taskSerializer.serialize(this)}toFileLineString(){return`${this.indentation}${this.listMarker} [${this.status.symbol}] ${this.toString()}`}toggle(){let e=Be.getInstance().getNextStatusOrCreate(this.status),t=null,n=null;if(e.isCompleted()){let{setDoneDate:o}=he();o&&(t=window.moment()),this.recurrence!==null&&(n=this.recurrence.next())}let s=new Ge(rr(Ne({},this),{status:e,doneDate:t})),a=[];if(n!==null){let{setCreatedDate:o}=he(),l=null;o&&(l=window.moment());let c=Be.getInstance().getNextStatusOrCreate(e),f=new Ge(rr(Ne(Ne({},this),n),{status:c,blockLink:"",createdDate:l}));a.push(f)}return a.push(s),a}get urgency(){return this._urgency===null&&(this._urgency=gn.calculate(this)),this._urgency}get path(){return this.taskLocation.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,s)=>n.identicalTo(t[s]))}identicalTo(e){let t=["status","description","path","indentation","listMarker","lineNumber","sectionStart","sectionIndex","precedingHeader","priority","blockLink","scheduledDateIsInferred"];for(let a of t)if(this[a]!==e[a])return!1;if(this.tags.length!==e.tags.length||!this.tags.every(function(a,o){return a===e.tags[o]}))return!1;t=["createdDate","startDate","scheduledDate","dueDate","doneDate"];for(let a of t){let o=this[a],l=e[a];if(Hr(o,l)!==0)return!1}let n=this.recurrence,s=e.recurrence;return n===null&&s!==null||n!==null&&s===null?!1:!(n&&s&&!n.identicalTo(s))}static extractHashtags(e){var t,n;return(n=(t=e.match(ie.hashTags))==null?void 0:t.map(s=>s.trim()))!=null?n:[]}};var Ja=class{constructor(e){this.fetch=e;this._value=void 0}get value(){return this._value===void 0&&(this._value=this.fetch()),this._value}};var It=class{constructor(e,t,n,s,a){this._path=e,this._lineNumber=t,this._sectionStart=n,this._sectionIndex=s,this._precedingHeader=a}static fromUnknownPosition(e){return new It(e,0,0,0,null)}fromRenamedFile(e){return new It(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 Ds=class{constructor({metadataCache:e,vault:t,events:n}){this.metadataCache=e,this.metadataCacheEventReferences=[],this.vault=t,this.vaultEventReferences=[],this.events=n,this.eventsEventReferences=[],this.tasksMutex=new Eo,this.state="Cold",this.tasks=[],this.loadedAfterFirstResolve=!1,this.subscribeToCache(),this.subscribeToVault(),this.subscribeToEvents(),this.loadVault()}unload(){for(let e of this.metadataCacheEventReferences)this.metadataCache.offref(e);for(let e of this.vaultEventReferences)this.vault.offref(e);for(let e of this.eventsEventReferences)this.events.off(e)}getTasks(){return this.tasks}getState(){return this.state}notifySubscribers(){this.events.triggerCacheUpdate({tasks:this.tasks,state:this.state})}subscribeToCache(){let e=this.metadataCache.on("resolved",()=>J(this,null,function*(){this.loadedAfterFirstResolve||(this.loadedAfterFirstResolve=!0,this.loadVault())}));this.metadataCacheEventReferences.push(e);let t=this.metadataCache.on("changed",n=>{this.tasksMutex.runExclusive(()=>{this.indexFile(n)})});this.metadataCacheEventReferences.push(t)}subscribeToVault(){let{useFilenameAsScheduledDate:e}=he(),t=this.vault.on("create",a=>{a instanceof hi.TFile&&this.tasksMutex.runExclusive(()=>{this.indexFile(a)})});this.vaultEventReferences.push(t);let n=this.vault.on("delete",a=>{a instanceof hi.TFile&&this.tasksMutex.runExclusive(()=>{this.tasks=this.tasks.filter(o=>o.path!==a.path),this.notifySubscribers()})});this.vaultEventReferences.push(n);let s=this.vault.on("rename",(a,o)=>{a instanceof hi.TFile&&this.tasksMutex.runExclusive(()=>{let l=new Ja(()=>Jt.fromPath(a.path));this.tasks=this.tasks.map(c=>c.path===o?e?Jt.updateTaskPath(c,a.path,l.value):new Ge(rr(Ne({},c),{taskLocation:c.taskLocation.fromRenamedFile(a.path)})):c),this.notifySubscribers()})});this.vaultEventReferences.push(s)}subscribeToEvents(){let e=this.events.onRequestCacheUpdate(t=>{t({tasks:this.tasks,state:this.state})});this.eventsEventReferences.push(e)}loadVault(){return this.tasksMutex.runExclusive(()=>J(this,null,function*(){this.state="Initializing",yield Promise.all(this.vault.getMarkdownFiles().map(e=>this.indexFile(e))),this.state="Warm",this.notifySubscribers()}))}indexFile(e){return J(this,null,function*(){let t=this.metadataCache.getFileCache(e);if(t==null)return;let n=this.tasks.filter(o=>o.path===e.path),s=t.listItems,a=[];if(s!==void 0){let o=yield this.vault.cachedRead(e);a=this.getTasksFromFileContent(o,s,t,e)}Ge.tasksListsIdentical(n,a)||(this.getState()=="Warm"&&console.debug(`At least one task, its line number or its heading has changed in ${e.path}: triggering a refresh of all active Tasks blocks in Live Preview and Reading mode views.`),this.tasks=this.tasks.filter(o=>o.path!==e.path),this.tasks.push(...a),this.notifySubscribers())})}getTasksFromFileContent(e,t,n,s){let a=[],o=e.split(`
|
|
|
`),l=o.length,c=new Ja(()=>Jt.fromPath(s.path)),f=null,m=0;for(let g of t)if(g.task!==void 0){let T=g.position.start.line;if(T>=l)return console.log(`${s.path} Obsidian gave us a line number ${T} past the end of the file. ${l}.`),a;if((f===null||f.position.end.line<T)&&(f=Ds.getSection(T,n.sections),m=0),f===null)continue;let S=o[T];if(S===void 0){console.log(`${s.path}: line ${T} - ignoring 'undefined' line.`);continue}let v;try{v=Ge.fromLine({line:S,taskLocation:new It(s.path,T,f.position.start.line,m,Ds.getPrecedingHeader(T,n.headings)),fallbackDate:c.value})}catch(R){this.reportTaskParsingErrorToUser(R,s,g,S);continue}v!==null&&(m++,a.push(v))}return a}reportTaskParsingErrorToUser(e,t,n,s){let a=`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: ${s}
|
|
|
|
|
|
Please create a bug report for this message at
|
|
|
https://github.com/obsidian-tasks-group/obsidian-tasks/issues/new/choose
|
|
|
to help us find and fix the underlying issue.
|
|
|
|
|
|
Include:
|
|
|
- either a screenshot of the error popup, or copy the text from the console, if on a desktop machine.
|
|
|
- the output from running the Obsidian command 'Show debug info'
|
|
|
|
|
|
The error popup will only be shown when Tasks is starting up, but if the error persists,
|
|
|
it will be shown in the console every time this file is edited during the Obsidian
|
|
|
session.
|
|
|
`;console.error(a),e instanceof Error&&console.error(e.stack),this.state==="Initializing"&&new hi.Notice(a,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 s of t){if(s.position.start.line>e)return n;n=s.heading}return n}};var Kh=require("obsidian");var uv=require("obsidian");function Es(){}function qh(r){return r()}function Hb(){return Object.create(null)}function Ss(r){r.forEach(qh)}function Vb(r){return typeof r=="function"}function Kb(r,e){return r!=r?e==e:r!==e||r&&typeof r=="object"||typeof r=="function"}function Zb(r){return Object.keys(r).length===0}var Xb=!1;function jI(){Xb=!0}function $I(){Xb=!1}function L(r,e){r.appendChild(e)}function pi(r,e,t){r.insertBefore(e,t||null)}function Os(r){r.parentNode.removeChild(r)}function jh(r,e){for(let t=0;t<r.length;t+=1)r[t]&&r[t].d(e)}function ae(r){return document.createElement(r)}function GI(r){return document.createElementNS("http://www.w3.org/2000/svg",r)}function er(r){return document.createTextNode(r)}function Se(){return er(" ")}function zt(r,e,t,n){return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}function Qb(r){return function(e){return e.preventDefault(),r.call(this,e)}}function z(r,e,t){t==null?r.removeAttribute(e):r.getAttribute(e)!==t&&r.setAttribute(e,t)}function BI(r){return Array.from(r.childNodes)}function $h(r,e){e=""+e,r.wholeText!==e&&(r.data=e)}function Fr(r,e){r.value=e==null?"":e}function Gh(r,e){for(let t=0;t<r.options.length;t+=1){let n=r.options[t];if(n.__value===e){n.selected=!0;return}}r.selectedIndex=-1}function Jb(r){let e=r.querySelector(":checked")||r.options[0];return e&&e.__value}function Lr(r,e,t){r.classList[t?"add":"remove"](e)}var ks=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=GI(t.nodeName):this.e=ae(t.nodeName),this.t=t,this.c(e)),this.i(n)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.childNodes)}i(e){for(let t=0;t<this.n.length;t+=1)pi(this.t,this.n[t],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(Os)}};var ro;function to(r){ro=r}function HI(){if(!ro)throw new Error("Function called outside component initialization");return ro}function Bh(r){HI().$$.on_mount.push(r)}var eo=[];var Pu=[],xu=[],zb=[],zI=Promise.resolve(),Wh=!1;function VI(){Wh||(Wh=!0,zI.then(ev))}function no(r){xu.push(r)}var Uh=new Set,Ru=0;function ev(){let r=ro;do{for(;Ru<eo.length;){let e=eo[Ru];Ru++,to(e),KI(e.$$)}for(to(null),eo.length=0,Ru=0;Pu.length;)Pu.pop()();for(let e=0;e<xu.length;e+=1){let t=xu[e];Uh.has(t)||(Uh.add(t),t())}xu.length=0}while(eo.length);for(;zb.length;)zb.pop()();Wh=!1,Uh.clear(),to(r)}function KI(r){if(r.fragment!==null){r.update(),Ss(r.before_update);let e=r.dirty;r.dirty=[-1],r.fragment&&r.fragment.p(r.ctx,e),r.after_update.forEach(no)}}var ZI=new Set;function XI(r,e){r&&r.i&&(ZI.delete(r),r.i(e))}var dj=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global;function QI(r,e,t,n){let{fragment:s,on_mount:a,on_destroy:o,after_update:l}=r.$$;s&&s.m(e,t),n||no(()=>{let c=a.map(qh).filter(Vb);o?o.push(...c):Ss(c),r.$$.on_mount=[]}),l.forEach(no)}function tv(r,e){let t=r.$$;t.fragment!==null&&(Ss(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function JI(r,e){r.$$.dirty[0]===-1&&(eo.push(r),VI(),r.$$.dirty.fill(0)),r.$$.dirty[e/31|0]|=1<<e%31}function rv(r,e,t,n,s,a,o,l=[-1]){let c=ro;to(r);let f=r.$$={fragment:null,ctx:null,props:a,update:Es,not_equal:s,bound:Hb(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(c?c.$$.context:[])),callbacks:Hb(),dirty:l,skip_bound:!1,root:e.target||c.$$.root};o&&o(f.root);let m=!1;if(f.ctx=t?t(r,e.props||{},(g,T,...S)=>{let v=S.length?S[0]:T;return f.ctx&&s(f.ctx[g],f.ctx[g]=v)&&(!f.skip_bound&&f.bound[g]&&f.bound[g](v),m&&JI(r,g)),T}):[],f.update(),m=!0,Ss(f.before_update),f.fragment=n?n(f.ctx):!1,e.target){if(e.hydrate){jI();let g=BI(e.target);f.fragment&&f.fragment.l(g),g.forEach(Os)}else f.fragment&&f.fragment.c();e.intro&&XI(r.$$.fragment),QI(r,e.target,e.anchor,e.customElement),$I(),ev()}to(c)}var eF;typeof HTMLElement=="function"&&(eF=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){let{on_mount:r}=this.$$;this.$$.on_disconnect=r.map(qh).filter(Vb);for(let e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(r,e,t){this[r]=t}disconnectedCallback(){Ss(this.$$.on_disconnect)}$destroy(){tv(this,1),this.$destroy=Es}$on(r,e){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&&!Zb(r)&&(this.$$.skip_bound=!0,this.$$set(r),this.$$.skip_bound=!1)}});var Au=class{$destroy(){tv(this,1),this.$destroy=Es}$on(e,t){let n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{let s=n.indexOf(t);s!==-1&&n.splice(s,1)}}$set(e){this.$$set&&!Zb(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}};var zh=os(mt());function nv(r,e,t){let n=r.slice();return n[45]=e[t],n}function sv(r,e,t){let n=r.slice();return n[48]=e[t].value,n[49]=e[t].label,n[50]=e[t].symbol,n}function tF(r){let e,t=r[50]+"",n;return{c(){e=ae("span"),n=er(t)},m(s,a){pi(s,e,a),L(e,n)},p:Es,d(s){s&&Os(e)}}}function iv(r){let e,t,n,s,a,o,l,c,f=r[49]+"",m,g,T=r[50]&&r[50].charCodeAt(0)>=256,S,v,R,C,$=T&&tF(r);return{c(){e=ae("span"),t=ae("input"),o=Se(),l=ae("label"),c=ae("span"),m=er(f),g=Se(),$&&$.c(),v=Se(),z(t,"type","radio"),z(t,"id",n="priority-"+r[48]),t.__value=s=r[48],t.value=t.__value,z(t,"accesskey",a=r[15](r[49].charAt(0).toLowerCase())),r[33][0].push(t),z(c,"class","accesskey-first"),z(l,"for",S="priority-"+r[48])},m(B,W){pi(B,e,W),L(e,t),t.checked=t.__value===r[1].priority,L(e,o),L(e,l),L(l,c),L(c,m),L(l,g),$&&$.m(l,null),L(e,v),R||(C=zt(t,"change",r[32]),R=!0)},p(B,W){W[0]&32768&&a!==(a=B[15](B[49].charAt(0).toLowerCase()))&&z(t,"accesskey",a),W[0]&3&&(t.checked=t.__value===B[1].priority),T&&$.p(B,W)},d(B){B&&Os(e),r[33][0].splice(r[33][0].indexOf(t),1),$&&$.d(),R=!1,C()}}}function av(r){let e,t=r[45].name+"",n,s,a=r[45].symbol+"",o,l,c;return{c(){e=ae("option"),n=er(t),s=er(" ["),o=er(a),l=er("]"),e.__value=c=r[45],e.value=e.__value},m(f,m){pi(f,e,m),L(e,n),L(e,s),L(e,o),L(e,l)},p(f,m){m[0]&1&&t!==(t=f[45].name+"")&&$h(n,t),m[0]&1&&a!==(a=f[45].symbol+"")&&$h(o,a),m[0]&1&&c!==(c=f[45])&&(e.__value=c,e.value=e.__value)},d(f){f&&Os(e)}}}function rF(r){let e,t,n,s,a,o,l,c,f,m,g,T,S,v,R,C,$,B,W,De,Te,be,ee,te,Ft,gt,V,q,P,Q,Y,oe,y,_,w,D,E,M,k,I,A,N,j,ke,pe,le,Ie,K,qe,Qe,dt,Or,at,je,ft,_t,Sn,Pi,$e,Fs,Jn,ht,ce,Zr,Rt,es,uo,Ur,On,Tt,Ai,dr,Xr,Ye,Mn,Ls,ts,Rn,rs,fr,xn,lo,Qr,co,hr,pr,H,Ys,fo,pt,ns,Ae,mr=r[20],Lt=[];for(let G=0;G<mr.length;G+=1)Lt[G]=iv(sv(r,mr,G));let tt=r[0],Je=[];for(let G=0;G<tt.length;G+=1)Je[G]=av(nv(r,tt,G));return{c(){e=ae("div"),t=ae("form"),n=ae("div"),s=ae("label"),s.innerHTML='Descrip<span class="accesskey">t</span>ion',a=Se(),o=ae("textarea"),c=Se(),f=ae("div"),m=ae("label"),g=er("Priority"),S=Se();for(let G=0;G<Lt.length;G+=1)Lt[G].c();v=Se(),R=ae("div"),C=ae("label"),C.textContent="Recurs",$=Se(),B=ae("input"),De=Se(),Te=ae("code"),be=er(r[16]),ee=Se(),te=new ks(!1),Ft=Se(),gt=ae("label"),gt.textContent="Due",V=Se(),q=ae("input"),Q=Se(),Y=ae("code"),oe=er(r[19]),y=Se(),_=new ks(!1),w=Se(),D=ae("label"),D.textContent="Scheduled",E=Se(),M=ae("input"),I=Se(),A=ae("code"),N=er(r[18]),j=Se(),ke=new ks(!1),pe=Se(),le=ae("label"),le.innerHTML='St<span class="accesskey">a</span>rt',Ie=Se(),K=ae("input"),Qe=Se(),dt=ae("code"),Or=er(r[17]),at=Se(),je=new ks(!1),ft=Se(),_t=ae("div"),Sn=ae("label"),Sn.innerHTML=`Only
|
|
|
<span class="accesskey-first">future</span> dates:`,Pi=Se(),$e=ae("input"),Jn=Se(),ht=ae("div"),ce=ae("label"),ce.innerHTML='Stat<span class="accesskey">u</span>s',Zr=Se(),Rt=ae("select");for(let G=0;G<Je.length;G+=1)Je[G].c();uo=Se(),Ur=ae("div"),On=ae("div"),Tt=ae("label"),Tt.textContent="Completed:",Ai=Se(),dr=ae("input"),Ye=Se(),Mn=ae("div"),Ls=ae("span"),Ls.textContent="Created on:",ts=Se(),Rn=ae("code"),rs=Se(),fr=ae("div"),xn=ae("span"),xn.textContent="Done on:",lo=Se(),Qr=ae("code"),co=Se(),hr=ae("div"),pr=ae("button"),H=er("Apply"),fo=Se(),pt=ae("button"),pt.textContent="Cancel",z(s,"for","description"),z(o,"id","description"),z(o,"type","text"),z(o,"class","tasks-modal-description"),z(o,"placeholder","Take out the trash"),z(o,"accesskey",l=r[15]("t")),z(n,"class","tasks-modal-section"),z(m,"for",T="priority-"+r[1].priority),z(f,"class","tasks-modal-section tasks-modal-priorities"),z(C,"for","recurrence"),z(C,"class","accesskey-first"),z(B,"id","recurrence"),z(B,"type","text"),z(B,"placeholder","Try 'every 2 weeks on Thursday'."),z(B,"accesskey",W=r[15]("r")),Lr(B,"tasks-modal-error",!r[8]),te.a=null,z(gt,"for","due"),z(gt,"class","accesskey-first"),z(q,"id","due"),z(q,"type","text"),z(q,"placeholder",Hh),z(q,"accesskey",P=r[15]("d")),Lr(q,"tasks-modal-error",!r[7]),_.a=null,z(D,"for","scheduled"),z(D,"class","accesskey-first"),z(M,"id","scheduled"),z(M,"type","text"),z(M,"placeholder",Hh),z(M,"accesskey",k=r[15]("s")),Lr(M,"tasks-modal-error",!r[5]),ke.a=null,z(le,"for","start"),z(K,"id","start"),z(K,"type","text"),z(K,"placeholder",Hh),z(K,"accesskey",qe=r[15]("a")),Lr(K,"tasks-modal-error",!r[3]),je.a=null,z(Sn,"for","forwardOnly"),z($e,"id","forwardOnly"),z($e,"type","checkbox"),z($e,"class","task-list-item-checkbox tasks-modal-checkbox"),z($e,"accesskey",Fs=r[15]("f")),z(R,"class","tasks-modal-section tasks-modal-dates"),z(ce,"for","status"),z(Rt,"id","status-type"),z(Rt,"class","dropdown"),z(Rt,"accesskey",es=r[15]("u")),r[1].status===void 0&&no(()=>r[39].call(Rt)),z(ht,"class","tasks-modal-section"),z(Tt,"for","status"),z(dr,"id","status"),z(dr,"type","checkbox"),z(dr,"class","task-list-item-checkbox tasks-modal-checkbox"),dr.checked=Xr=r[1].status.isCompleted(),dr.disabled=!0,z(Ur,"class","tasks-modal-section tasks-modal-status"),pr.disabled=Ys=!r[14],z(pr,"type","submit"),z(pr,"class","mod-cta"),z(pt,"type","button"),z(hr,"class","tasks-modal-section tasks-modal-buttons"),Lr(t,"with-accesskeys",r[9]),z(e,"class","tasks-modal")},m(G,ne){pi(G,e,ne),L(e,t),L(t,n),L(n,s),L(n,a),L(n,o),Fr(o,r[1].description),r[31](o),L(t,c),L(t,f),L(f,m),L(m,g),L(f,S);for(let ue=0;ue<Lt.length;ue+=1)Lt[ue].m(f,null);L(t,v),L(t,R),L(R,C),L(R,$),L(R,B),Fr(B,r[1].recurrenceRule),L(R,De),L(R,Te),L(Te,be),L(Te,ee),te.m(r[12],Te),L(R,Ft),L(R,gt),L(R,V),L(R,q),Fr(q,r[1].dueDate),L(R,Q),L(R,Y),L(Y,oe),L(Y,y),_.m(r[6],Y),L(R,w),L(R,D),L(R,E),L(R,M),Fr(M,r[1].scheduledDate),L(R,I),L(R,A),L(A,N),L(A,j),ke.m(r[4],A),L(R,pe),L(R,le),L(R,Ie),L(R,K),Fr(K,r[1].startDate),L(R,Qe),L(R,dt),L(dt,Or),L(dt,at),je.m(r[2],dt),L(R,ft),L(R,_t),L(_t,Sn),L(_t,Pi),L(_t,$e),$e.checked=r[1].forwardOnly,L(t,Jn),L(t,ht),L(ht,ce),L(ht,Zr),L(ht,Rt);for(let ue=0;ue<Je.length;ue+=1)Je[ue].m(Rt,null);Gh(Rt,r[1].status),L(t,uo),L(t,Ur),L(Ur,On),L(On,Tt),L(On,Ai),L(On,dr),L(Ur,Ye),L(Ur,Mn),L(Mn,Ls),L(Mn,ts),L(Mn,Rn),Rn.innerHTML=r[11],L(Ur,rs),L(Ur,fr),L(fr,xn),L(fr,lo),L(fr,Qr),Qr.innerHTML=r[13],L(t,co),L(t,hr),L(hr,pr),L(pr,H),L(hr,fo),L(hr,pt),ns||(Ae=[zt(o,"input",r[30]),zt(o,"keydown",r[23]),zt(o,"paste",r[24]),zt(o,"drop",r[24]),zt(f,"keyup",r[21]),zt(B,"input",r[34]),zt(q,"input",r[35]),zt(M,"input",r[36]),zt(K,"input",r[37]),zt($e,"change",r[38]),zt(Rt,"change",r[39]),zt(pt,"click",r[22]),zt(t,"submit",Qb(r[25]))],ns=!0)},p(G,ne){if(ne[0]&32768&&l!==(l=G[15]("t"))&&z(o,"accesskey",l),ne[0]&3&&Fr(o,G[1].description),ne[0]&3&&T!==(T="priority-"+G[1].priority)&&z(m,"for",T),ne[0]&1081346){mr=G[20];let ue;for(ue=0;ue<mr.length;ue+=1){let $t=sv(G,mr,ue);Lt[ue]?Lt[ue].p($t,ne):(Lt[ue]=iv($t),Lt[ue].c(),Lt[ue].m(f,null))}for(;ue<Lt.length;ue+=1)Lt[ue].d(1);Lt.length=mr.length}if(ne[0]&32768&&W!==(W=G[15]("r"))&&z(B,"accesskey",W),ne[0]&3&&B.value!==G[1].recurrenceRule&&Fr(B,G[1].recurrenceRule),ne[0]&256&&Lr(B,"tasks-modal-error",!G[8]),ne[0]&4096&&te.p(G[12]),ne[0]&32768&&P!==(P=G[15]("d"))&&z(q,"accesskey",P),ne[0]&3&&q.value!==G[1].dueDate&&Fr(q,G[1].dueDate),ne[0]&128&&Lr(q,"tasks-modal-error",!G[7]),ne[0]&64&&_.p(G[6]),ne[0]&32768&&k!==(k=G[15]("s"))&&z(M,"accesskey",k),ne[0]&3&&M.value!==G[1].scheduledDate&&Fr(M,G[1].scheduledDate),ne[0]&32&&Lr(M,"tasks-modal-error",!G[5]),ne[0]&16&&ke.p(G[4]),ne[0]&32768&&qe!==(qe=G[15]("a"))&&z(K,"accesskey",qe),ne[0]&3&&K.value!==G[1].startDate&&Fr(K,G[1].startDate),ne[0]&8&&Lr(K,"tasks-modal-error",!G[3]),ne[0]&4&&je.p(G[2]),ne[0]&32768&&Fs!==(Fs=G[15]("f"))&&z($e,"accesskey",Fs),ne[0]&3&&($e.checked=G[1].forwardOnly),ne[0]&1){tt=G[0];let ue;for(ue=0;ue<tt.length;ue+=1){let $t=nv(G,tt,ue);Je[ue]?Je[ue].p($t,ne):(Je[ue]=av($t),Je[ue].c(),Je[ue].m(Rt,null))}for(;ue<Je.length;ue+=1)Je[ue].d(1);Je.length=tt.length}ne[0]&32768&&es!==(es=G[15]("u"))&&z(Rt,"accesskey",es),ne[0]&3&&Gh(Rt,G[1].status),ne[0]&3&&Xr!==(Xr=G[1].status.isCompleted())&&(dr.checked=Xr),ne[0]&2048&&(Rn.innerHTML=G[11]),ne[0]&8192&&(Qr.innerHTML=G[13]),ne[0]&16384&&Ys!==(Ys=!G[14])&&(pr.disabled=Ys),ne[0]&512&&Lr(t,"with-accesskeys",G[9])},i:Es,o:Es,d(G){G&&Os(e),r[31](null),jh(Lt,G),jh(Je,G),ns=!1,Ss(Ae)}}}var Hh="Try 'Monday' or 'tomorrow', or [td|tm|yd|tw|nw|we] then space.";function nF(r,e,t){let n;var s;let{task:a}=e,{onSubmit:o}=e,{statusOptions:l}=e,{prioritySymbols:c,recurrenceSymbol:f,startDateSymbol:m,scheduledDateSymbol:g,dueDateSymbol:T}=fi.tasksPluginEmoji.taskSerializer.symbols,S,v={description:"",status:fe.TODO,priority:"none",recurrenceRule:"",createdDate:"",startDate:"",scheduledDate:"",dueDate:"",doneDate:"",forwardOnly:!0},R=!0,C="",$="",B=!0,W="",De=!0,Te="",be=!0,ee="",te=!0,Ft="",gt=!1,V=!0,q=!0,P=[{value:"low",label:"Low",symbol:c.Low},{value:"none",label:"Normal",symbol:c.None},{value:"medium",label:"Medium",symbol:c.Medium},{value:"high",label:"High",symbol:c.High}];function Q(K,qe,Qe=void 0){if(!qe)return`<i>no ${K} date</i>`;let dt=zh.parseDate(qe,Qe,{forwardDate:Qe!=null});return dt!==null?window.moment(dt).format("YYYY-MM-DD"):`<i>invalid ${K} date</i>`}function Y(K,qe){return Q(K,qe,v.forwardOnly?new Date:void 0)}function oe(K){let qe=null,Qe=zh.parseDate(K,new Date,{forwardDate:v.forwardOnly});return Qe!==null&&(qe=window.moment(Qe)),qe}Bh(()=>{let{provideAccessKeys:K}=he();t(9,V=K);let qe=Le.removeAsWordFrom(a.description);(qe!=a.description||!Le.includedIn(a.description))&&(gt=!0);let Qe="none";a.priority==="4"?Qe="low":a.priority==="2"?Qe="medium":a.priority==="1"&&(Qe="high"),t(1,v={description:qe,status:a.status,priority:Qe,recurrenceRule:a.recurrence?a.recurrence.toText():"",createdDate:a.createdDate?a.createdDate.format("YYYY-MM-DD"):"",startDate:a.startDate?a.startDate.format("YYYY-MM-DD"):"",scheduledDate:a.scheduledDate?a.scheduledDate.format("YYYY-MM-DD"):"",dueDate:a.dueDate?a.dueDate.format("YYYY-MM-DD"):"",doneDate:a.doneDate?a.doneDate.format("YYYY-MM-DD"):"",forwardOnly:!0}),setTimeout(()=>{S.focus()},10)});let y=K=>{if(K.key&&!K.altKey&&!K.ctrlKey){let qe=P.find(Qe=>Qe.label.charAt(0).toLowerCase()==K.key);qe&&t(1,v.priority=qe.value,v)}},_=()=>{o([])},w=K=>{K.key==="Enter"&&(K.preventDefault(),q&&E())},D=()=>{setTimeout(()=>{t(1,v.description=v.description.replace(/[\r\n]+/g," "),v)},0)},E=()=>{let K=v.description.trim();gt&&(K=Le.prependTo(K));let qe=oe(v.startDate),Qe=oe(v.scheduledDate),dt=oe(v.dueDate),Or=null;v.recurrenceRule&&(Or=Ot.fromText({recurrenceRuleText:v.recurrenceRule,startDate:qe,scheduledDate:Qe,dueDate:dt}));let at;switch(v.priority){case"low":at="4";break;case"medium":at="2";break;case"high":at="1";break;default:at="3"}let je=new Ge(Object.assign(Object.assign({},a),{description:K,status:v.status,priority:at,recurrence:Or,startDate:qe,scheduledDate:Qe,dueDate:dt,doneDate:window.moment(v.doneDate,"YYYY-MM-DD").isValid()?window.moment(v.doneDate,"YYYY-MM-DD"):null}));o([je])},M=[[]];function k(){v.description=this.value,t(1,v),t(6,Te),t(2,$),t(4,W),t(0,l)}function I(K){Pu[K?"unshift":"push"](()=>{S=K,t(10,S)})}function A(){v.priority=this.__value,t(1,v),t(6,Te),t(2,$),t(4,W),t(0,l)}function N(){v.recurrenceRule=this.value,t(1,v),t(6,Te),t(2,$),t(4,W),t(0,l)}function j(){v.dueDate=this.value,t(1,v),t(6,Te),t(2,$),t(4,W),t(0,l)}function ke(){v.scheduledDate=this.value,t(1,v),t(6,Te),t(2,$),t(4,W),t(0,l)}function pe(){v.startDate=this.value,t(1,v),t(6,Te),t(2,$),t(4,W),t(0,l)}function le(){v.forwardOnly=this.checked,t(1,v),t(6,Te),t(2,$),t(4,W),t(0,l)}function Ie(){v.status=Jb(this),t(1,v),t(6,Te),t(2,$),t(4,W),t(0,l)}return r.$$set=K=>{"task"in K&&t(26,a=K.task),"onSubmit"in K&&t(27,o=K.onSubmit),"statusOptions"in K&&t(0,l=K.statusOptions)},r.$$.update=()=>{if(r.$$.dirty[0]&512){e:t(15,n=K=>V?K:null)}if(r.$$.dirty[0]&66){e:t(1,v.dueDate=oi(v.dueDate),v),t(6,Te=Y("due",v.dueDate)),t(7,be=!Te.includes("invalid"))}if(r.$$.dirty[0]&6){e:t(1,v.startDate=oi(v.startDate),v),t(2,$=Y("start",v.startDate)),t(3,B=!$.includes("invalid"))}if(r.$$.dirty[0]&18){e:t(1,v.scheduledDate=oi(v.scheduledDate),v),t(4,W=Y("scheduled",v.scheduledDate)),t(5,De=!W.includes("invalid"))}if(r.$$.dirty[0]&268435458){e:if(t(8,te=!0),!v.recurrenceRule)t(12,ee="<i>not recurring</>");else{let K=t(28,s=Ot.fromText({recurrenceRuleText:v.recurrenceRule,startDate:null,scheduledDate:null,dueDate:null}))===null||s===void 0?void 0:s.toText();K?t(12,ee=K):(t(12,ee="<i>invalid recurrence rule</i>"),t(8,te=!1))}}if(r.$$.dirty[0]&2){e:t(29,R=v.description.trim()!=="")}if(r.$$.dirty[0]&536871336){e:t(14,q=be&&te&&De&&B&&R)}if(r.$$.dirty[0]&2){e:t(11,C=Q("created",v.createdDate)),t(13,Ft=Q("done",v.doneDate))}},[l,v,$,B,W,De,Te,be,te,V,S,C,ee,Ft,q,n,f,m,g,T,P,y,_,w,D,E,a,o,s,R,k,I,A,M,N,j,ke,pe,le,Ie]}var Vh=class extends Au{constructor(e){super(),rv(this,e,nF,rF,Kb,{task:26,onSubmit:27,statusOptions:0},null,[-1,-1])}},ov=Vh;var Vn=class extends uv.Modal{constructor({app:t,task:n,onSubmit:s}){super(t);this.task=n,this.onSubmit=a=>{a.length&&s(a),this.close()}}onOpen(){this.titleEl.setText("Create or edit Task");let{contentEl:t}=this,n=this.getKnownStatusesAndCurrentTaskStatusIfNotKnown();new ov({target:t,props:{task:this.task,statusOptions:n,onSubmit:this.onSubmit}})}getKnownStatusesAndCurrentTaskStatusIfNotKnown(){let t=Be.getInstance().registeredStatuses;return Be.getInstance().bySymbol(this.task.status.symbol)===fe.EMPTY&&t.push(this.task.status),t}onClose(){let{contentEl:t}=this;t.empty()}};var Nu=({line:r,path:e})=>{var v,R;let t=Jt.fromPath(e),n=Ge.fromLine({line:r,taskLocation:It.fromUnknownPosition(e),fallbackDate:t});if(n!==null)return n;let{setCreatedDate:s}=he(),a=null;s&&(a=window.moment());let o=r.match(ie.nonTaskRegex);if(o===null)return console.error("Tasks: Cannot create task on line:",r),new Ge({status:fe.TODO,description:"",taskLocation:It.fromUnknownPosition(e),indentation:"",listMarker:"-",priority:"3",createdDate:a,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,recurrence:null,blockLink:"",tags:[],originalMarkdown:"",scheduledDateIsInferred:!1});let l=o[1],c=(v=o[2])!=null?v:"-",f=(R=o[4])!=null?R:" ",m=Be.getInstance().bySymbolOrCreate(f),g=o[5],T=r.match(ie.blockLinkRegex),S=T!==null?T[0]:"";return S!==""&&(g=g.replace(ie.blockLinkRegex,"")),new Ge({status:m,description:g,taskLocation:It.fromUnknownPosition(e),indentation:l,listMarker:c,blockLink:S,priority:"3",createdDate:a,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,recurrence:null,tags:[],originalMarkdown:"",scheduledDateIsInferred:!1})};var lv=(r,e,t,n)=>{var g;if(r)return t instanceof Kh.MarkdownView;if(!(t instanceof Kh.MarkdownView))return;let s=(g=t.file)==null?void 0:g.path;if(s===void 0)return;let o=e.getCursor().line,l=e.getLine(o),c=Nu({line:l,path:s}),f=T=>{let S=Jt.removeInferredStatusIfNeeded(c,T).map(v=>v.toFileLineString()).join(`
|
|
|
`);e.setLine(o,S)};new Vn({app:n,task:c,onSubmit:f}).open()};var Zh=require("obsidian");var cv=(r,e,t)=>{var c;if(r)return t instanceof Zh.MarkdownView;if(!(t instanceof Zh.MarkdownView))return;let n=(c=t.file)==null?void 0:c.path;if(n===void 0)return;let s=e.getCursor(),a=s.line,o=e.getLine(a),l=sF(o,n);e.setLine(a,l.text),e.setCursor(iF(s,l))},sF=(r,e)=>{let t=Ge.fromLine({line:r,taskLocation:It.fromUnknownPosition(e),fallbackDate:null});if(t!==null){let n=t.toggle().map(s=>s.toFileLineString());return{text:n.join(`
|
|
|
`),moveTo:{line:n.length-1}}}else{let n=r.match(ie.taskRegex);if(n!==null){let s=n[3],o=Be.getInstance().bySymbol(s).nextStatusSymbol;return{text:r.replace(ie.taskRegex,`$1- [${o}] $4`)}}else if(ie.listItemRegex.test(r)){let s=r.replace(ie.listItemRegex,"$1$2 [ ]");return{text:s,moveTo:{ch:s.length}}}else{let s=r.replace(ie.indentationRegex,"$1- ");return{text:s,moveTo:{ch:s.length}}}}},iF=(r,e)=>{var a;let t={line:0,ch:r.ch},n=Ne(Ne({},t),(a=e.moveTo)!=null?a:{}),s=e.text.split(`
|
|
|
`)[n.line].length;return{line:r.line+n.line,ch:Math.min(n.ch,s)}};var Cu=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,s)=>lv(t,n,s,this.app)}),e.addCommand({id:"toggle-done",name:"Toggle task done",icon:"check-in-circle",editorCheckCallback:cv})}};var Iu=class{constructor({obsidianEvents:e}){this.obsidianEvents=e}onCacheUpdate(e){return this.obsidianEvents.on("obsidian-tasks-plugin:cache-update",e)}triggerCacheUpdate(e){this.obsidianEvents.trigger("obsidian-tasks-plugin:cache-update",e)}onRequestCacheUpdate(e){return this.obsidianEvents.on("obsidian-tasks-plugin:request-cache-update",e)}triggerRequestCacheUpdate(e){this.obsidianEvents.trigger("obsidian-tasks-plugin:request-cache-update",e)}off(e){this.obsidianEvents.offref(e)}};var Fu=class{constructor({plugin:e}){this.markdownPostProcessor=this._markdownPostProcessor.bind(this);e.registerMarkdownPostProcessor(this._markdownPostProcessor.bind(this))}_markdownPostProcessor(e,t){return J(this,null,function*(){var f;let n=e.findAll(".task-list-item").filter(m=>{var S;let g=(S=m.textContent)==null?void 0:S.split(`
|
|
|
`);if(g===void 0)return!1;let T=null;for(let v=0;v<g.length;v=v+1)if(g[v]!==""){T=g[v];break}return T===null?!1:Le.includedIn(T)});if(n.length===0)return;let s=t.sourcePath,a=t.getSectionInfo(e);if(a===null)return;let o=a.text.split(`
|
|
|
`),l=0,c=[];for(let m=a.lineStart;m<=a.lineEnd;m++){let g=o[m];if(g===void 0)continue;let T=null,S=Ge.fromLine({line:g,taskLocation:new It(s,m,a.lineStart,l,T),fallbackDate:null});S!==null&&(c.push(S),l++)}for(let m=0;m<n.length;m++){let g=c[m],T=n[m];if(g===void 0||T===void 0)continue;let S=(f=T.getAttr("data-line"))!=null?f:"0",v=Number.parseInt(S,10),R=yield g.toLi({parentUlElement:e,listIndex:v}),C=T.childNodes;for(let W=0;W<C.length;W=W+1){let De=C[W];De.nodeName.toLowerCase()==="div"?R.prepend(De):De.nodeName.toLowerCase()==="ul"&&R.append(De)}let $=T.querySelectorAll("[data-footnote-id]"),B=R.querySelectorAll("[data-footnote-id]");if($.length===B.length)for(let W=0;W<$.length;W++)B[W].replaceWith($[W]);T.replaceWith(R)}})}};var dv=require("@codemirror/view"),fv=require("obsidian");var hv=()=>dv.ViewPlugin.fromClass(Xh),Xh=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 T=`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(T),new fv.Notice(T,45e3)}return!1}let{state:s}=this.view,a=this.view.posAtDOM(t),o=s.doc.lineAt(a),l=Ge.fromLine({line:o.text,taskLocation:It.fromUnknownPosition(""),fallbackDate:null});if(console.debug(`Live Preview Extension: toggle called. Position: ${a} Line: ${o.text}`),l===null)return!1;e.preventDefault();let f=l.toggle().map(T=>T.toFileLineString()).join(s.lineBreak),m=s.update({changes:{from:o.from,to:o.to,insert:f}});this.view.dispatch(m);let g=t.checked;return setTimeout(()=>{t.checked=g},1),!0}};var ll=require("obsidian");var Tn=class{constructor(e,t,n){this.property=e,this.comparator=Tn.maybeReverse(n,t)}static maybeReverse(e,t){return e?Tn.makeReversedComparator(t):t}static makeReversedComparator(e){return(t,n)=>e(t,n)*-1}};var mi=class{constructor(e,t){this.property=e,this.grouper=t}};var Ke=class{canCreateFilterForLine(e){return Ke.lineMatchesFilter(this.filterRegExp(),e)}static lineMatchesFilter(e,t){return e?e.test(t):!1}static getMatch(e,t){return e?t.match(e):null}fieldNameSingular(){return this.fieldName()}fieldNameSingularEscaped(){return Su(this.fieldNameSingular())}supportsSorting(){return!1}parseSortLine(e){return!this.supportsSorting()||!this.canCreateSorterForLine(e)?null:this.createSorterFromLine(e)}canCreateSorterForLine(e){return this.supportsSorting()?Ke.lineMatchesFilter(this.sorterRegExp(),e):!1}createSorterFromLine(e){if(!this.supportsSorting())return null;let t=Ke.getMatch(this.sorterRegExp(),e);if(t===null)return null;let n=!!t[1];return this.createSorter(n)}sorterRegExp(){if(!this.supportsSorting())throw Error(`sorterRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^sort by ${this.fieldNameSingularEscaped()}( reverse)?`)}comparator(){throw Error(`comparator() unimplemented for ${this.fieldNameSingular()}`)}createSorter(e){return new Tn(this.fieldNameSingular(),this.comparator(),e)}createNormalSorter(){return this.createSorter(!1)}createReverseSorter(){return this.createSorter(!0)}supportsGrouping(){return!1}grouper(){throw Error(`grouper() unimplemented for ${this.fieldNameSingular()}`)}createGrouper(){return new mi(this.fieldNameSingular(),this.grouper())}};var Ze=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 Ze("None of",e,"NOT")}static booleanXor(e){return new Ze("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 s=0;s<this.children.length;s++)t+=`
|
|
|
${this.children[s].asString(n)}`;return t}static combineOrCreateExplanation(e,t,n){if(t.length===2){let s=t[0],a=t[1];if(s.symbol===n&&a.symbol==="")return s.children.push(a),s}return new Ze(e,t,n)}};var tr=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(" ")}
|
|
|
`}},Xe=class{constructor(e){this.instruction=e}get filter(){return this._filter}set filter(e){this._filter=e}get filterFunction(){if(this._filter)return this._filter.filterFunction}static fromFilter(e){let t=new Xe(e.instruction);return t.filter=e,t}static fromError(e,t){let n=new Xe(e);return n.error=t,n}};var Lu=class{constructor(e,t){this._instruction=e,this._filter=t}canCreateFilterForLine(e){return e==this._instruction}createFilterOrErrorMessage(e){let t=new Xe(e);return e===this._instruction?(t.filter=new tr(e,this._filter,new Ze(e)),t):(t.error=`do not understand filter: ${e}`,t)}};var Vr=class{constructor(){this._filters=[]}add(e,t){this._filters.push(new Lu(e,t))}canCreateFilterForLine(e){for(let t of this._filters)if(t.canCreateFilterForLine(e))return!0;return!1}createFilterOrErrorMessage(e){for(let n of this._filters){let s=n.createFilterOrErrorMessage(e);if(s.error===void 0)return s}let t=new Xe(e);return t.error=`do not understand filter: ${e}`,t}};var Kn=class extends Ke{constructor(){super(...arguments);this._filters=new Vr}canCreateFilterForLine(t){return this._filters.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){return this._filters.createFilterOrErrorMessage(t)}filterRegExp(){return null}};var bn=class extends Kn{constructor(){super(),this._filters.add("done",e=>e.status.type==="DONE"||e.status.type==="CANCELLED"||e.status.type==="NON_TASK"),this._filters.add("not done",e=>e.status.type==="TODO"||e.status.type==="IN_PROGRESS")}fieldName(){return"status"}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=bn.oldStatusName(e),s=bn.oldStatusName(t);return n<s?1:n>s?-1:0}}static oldStatusName(e){return e.status.symbol===" "?"Todo":"Done"}};var qt=class extends Ke{constructor(t=null){super();t!==null?this.filterInstructions=t:(this.filterInstructions=new Vr,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 s=this.date(n);return s!==null&&!s.isValid()}))}canCreateFilterForLine(t){return this.filterInstructions.canCreateFilterForLine(t)?!0:super.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){let n=this.filterInstructions.createFilterOrErrorMessage(t);if(n.filter!==void 0)return n;let s=new Xe(t),a=Ke.getMatch(this.filterRegExp(),t);if(a!==null){let o=a[1],l=a[2],c=Xt.parseDateRange(l);if(!c[0].isValid()||!c[1].isValid())s.error="do not understand "+this.fieldName()+" date";else{let f=this.buildFilterFunction(o,c),m=qt.buildExplanation(this.fieldNameForExplanation(),o,this.filterResultIfFieldMissing(),c);s.filter=new tr(t,f,m)}}else s.error="do not understand query filter ("+this.fieldName()+" date)";return s}buildFilterFunction(t,n){let s;return t==="before"?s=a=>a?a.isBefore(n[0]):this.filterResultIfFieldMissing():t==="after"?s=a=>a?a.isAfter(n[1]):this.filterResultIfFieldMissing():s=a=>a?a.isSameOrAfter(n[0])&&a.isSameOrBefore(n[1]):this.filterResultIfFieldMissing(),this.getFilter(s)}getFilter(t){return n=>t(this.date(n))}filterRegExp(){return new RegExp(`^${this.fieldNameForFilterInstruction()} (before|after|on|in)? ?(.*)`)}fieldNameForFilterInstruction(){return this.fieldName()}static buildExplanation(t,n,s,a){let o,l="YYYY-MM-DD (dddd Do MMMM YYYY)",c;switch(n){case"before":o=n,c=a[0].format(l);break;case"after":o=n,c=a[1].format(l);break;default:if(a[0].isSame(a[1]))o="on",c=a[0].format(l);else{let m=`${t} date is between:`,g=[new Ze(`${a[0].format(l)} and`),new Ze(`${a[1].format(l)} inclusive`)];return s&&g.push(new Ze(`OR no ${t} date`)),new Ze(m,g)}break}let f=`${t} date is ${o} ${c}`;return s&&(f+=` OR no ${t} date`),new Ze(f)}fieldNameForExplanation(){return this.fieldName()}supportsSorting(){return!0}comparator(){return(t,n)=>Hr(this.date(t),this.date(n))}};var yi=class extends qt{fieldName(){return"due"}date(e){return e.dueDate}filterResultIfFieldMissing(){return!1}};var Qh=class extends Ke{createFilterOrErrorMessage(e){let t=new Xe(e),n=Ke.getMatch(this.filterRegExp(),e);if(n!==null){let s=n[5],a=null;switch(s){case"low":a="4";break;case"none":a="3";break;case"medium":a="2";break;case"high":a="1";break}if(a===null)return t.error="do not understand priority",t;let o=e,l;switch(n[3]){case"above":l=c=>c.priority.localeCompare(a)<0;break;case"below":l=c=>c.priority.localeCompare(a)>0;break;case"not":l=c=>c.priority!==a;break;default:l=c=>c.priority===a,o=`${this.fieldName()} is ${s}`}t.filter=new tr(e,l,new Ze(o))}else t.error="do not understand query filter (priority)";return t}fieldName(){return"priority"}filterRegExp(){return Qh.priorityRegexp}supportsSorting(){return!0}comparator(){return(e,t)=>e.priority.localeCompare(t.priority)}},Ms=Qh;Ms.priorityRegexp=/^priority(\s+is)?(\s+(above|below|not))?(\s+(low|none|medium|high))$/;var gi=class{matchesAnyOf(e){return e.some(t=>this.matches(t))}};var _i=class extends gi{constructor(t){super();this.stringToFind=t}matches(t){return _i.stringIncludesCaseInsensitive(t,this.stringToFind)}static stringIncludesCaseInsensitive(t,n){return t.toLocaleLowerCase().includes(n.toLocaleLowerCase())}};var Ti=class extends gi{constructor(t){super();this.regex=t}static validateAndConstruct(t){let n=/\/((?![*+?])(?:[^\r\n[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*])+)\/((?:g(?:im?|mi?)?|i(?:gm?|mg?)?|m(?:gi?|ig?)?)?)/,s=t.match(n);if(s!==null){let a=new RegExp(s[1],s[2]);return new Ti(a)}else return null}matches(t){return t.match(this.regex)!==null}};var jt=class extends Ke{createFilterOrErrorMessage(e){let t=Ke.getMatch(this.filterRegExp(),e);if(t===null)return Xe.fromError(e,`do not understand query filter (${this.fieldName()})`);let[n,s,a]=t,o=null;if(s.includes("include"))o=new _i(a);else if(s.includes("regex")&&(o=Ti.validateAndConstruct(a),o===null))return Xe.fromError(e,`cannot parse regex (${this.fieldName()}); check your leading and trailing slashes for your query`);if(o===null)return Xe.fromError(e,`do not understand query filter (${this.fieldName()})`);let l=s.match(/not/)!==null,c=new tr(e,this.getFilter(o,l),new Ze(e));return Xe.fromFilter(c)}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 s=e.matches(this.value(n));return t?!s:s}}comparator(){return(e,t)=>this.value(e).localeCompare(this.value(t),void 0,{numeric:!0})}grouper(){return e=>[this.value(e)]}};var bi=class extends jt{fieldName(){return"path"}value(e){return e.path}supportsSorting(){return!0}};var vi=class extends Ke{canCreateFilterForLine(e){return!1}createFilterOrErrorMessage(e){return Xe.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}};var wi=class{static by(e,t){let n=[new vi().comparator(),new bn().comparator(),new yi().comparator(),new Ms().comparator(),new bi().comparator()],s=[];for(let a of e)s.push(a.comparator);return t.sort(wi.makeCompositeComparator([...s,...n]))}static makeCompositeComparator(e){return(t,n)=>{for(let s of e){let a=s(t,n);if(a!==0)return a}return 0}}};var Rs=class extends jt{fieldName(){return"description"}value(e){return Le.removeAsSubstringFrom(e.description)}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=Rs.cleanDescription(e.description),s=Rs.cleanDescription(t.description);return n.localeCompare(s,void 0,{numeric:!0})}}static cleanDescription(e){e=Le.removeAsSubstringFrom(e);let t=/^\[\[?([^\]]*)]]?/,n=e.match(t);if(n!==null){let s=n[1];e=s.substring(s.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 Yu=class extends qt{fieldName(){return"created"}date(e){return e.createdDate}filterResultIfFieldMissing(){return!1}};var Uu=class extends qt{fieldName(){return"done"}date(e){return e.doneDate}filterResultIfFieldMissing(){return!1}};var Wu=class extends Kn{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 qu=class extends jt{fieldName(){return"heading"}value(e){return e.precedingHeader?e.precedingHeader:""}supportsSorting(){return!0}};var ju=class extends qt{fieldName(){return"scheduled"}date(e){return e.scheduledDate}filterResultIfFieldMissing(){return!1}};var $u=class extends qt{fieldName(){return"start"}fieldNameForFilterInstruction(){return"starts"}date(e){return e.startDate}filterResultIfFieldMissing(){return!0}};var Zn=class extends qt{constructor(){let e=new Vr;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 Array.of(e.startDate,e.scheduledDate,e.dueDate)}earliestDate(e){return new Zn().dates(e).sort(Hr)[0]}filterResultIfFieldMissing(){return!1}getFilter(e){return t=>this.dates(t).some(n=>e(n))}};var Gu=class extends Kn{constructor(){super(),this._filters.add("is recurring",e=>e.recurrence!==null),this._filters.add("is not recurring",e=>e.recurrence===null)}fieldName(){return"recurring"}};var Bu=class extends jt{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 s=e.matchesAnyOf(this.values(n));return t?!s:s}}};var xs=class extends Bu{constructor(){super();this.filterInstructions=new Vr,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 s=!!n[1],a=isNaN(+n[2])?1:+n[2],o=xs.makeCompareByTagComparator(a);return new Tn(this.fieldNameSingular(),o,s)}sorterRegExp(){return/^sort by tag( reverse)?[\s]*(\d+)?/}comparator(){return xs.makeCompareByTagComparator(1)}static makeCompareByTagComparator(t){return(n,s)=>{if(n.tags.length===0&&s.tags.length===0)return 0;if(n.tags.length===0)return 1;if(s.tags.length===0)return-1;let a=t-1;if(n.tags.length<t&&s.tags.length>=t)return 1;if(s.tags.length<t&&n.tags.length>=t)return-1;if(n.tags.length<t&&s.tags.length<t)return 0;let o=n.tags[a],l=s.tags[a];return o.localeCompare(l,void 0,{numeric:!0})}}};var Sv=os(Ev());var Ku=class extends Ke{constructor(){super(...arguments);this.basicBooleanRegexp=/(.*(AND|OR|XOR|NOT)\s*[("].*|\(.+\))/g;this.supportedOperators=["AND","OR","XOR","NOT"];this.subFields={}}filterRegExp(){return this.basicBooleanRegexp}createFilterOrErrorMessage(t){return this.parseLine(t)}fieldName(){return"boolean query"}parseLine(t){let n=new Xe(t);if(t.length===0)return n.error="empty line",n;let s=this.preprocessExpression(t);try{let a=(0,Sv.parse)(s);for(let c of a)if(c.name==="IDENTIFIER"&&c.value){let f=c.value.trim();if(!(f in this.subFields)){let m=Zu(f);if(m===null)return n.error=`couldn't parse sub-expression '${f}'`,n;if(m.error)return n.error=`couldn't parse sub-expression '${f}': ${m.error}`,n;m.filter&&(this.subFields[f]=m.filter)}}else if(c.name==="OPERATOR"){if(c.value==null)return n.error="empty operator in boolean query",n;if(!this.supportedOperators.includes(c.value))return n.error=`unknown boolean operator '${c.value}'`,n}let o=c=>this.filterTaskWithParsedQuery(c,a),l=this.constructExplanation(a);return n.filter=new tr(t,o,l),n}catch(a){let o=a instanceof Error?a.message:"unknown error type";return n.error=`malformed boolean query -- ${o} (check the documentation for guidelines)`,n}return n}preprocessExpression(t){return t.replace(/\(([^()]+)\)/g,'("$1")')}filterTaskWithParsedQuery(t,n){let s=l=>l==="true",a=l=>l?"true":"false",o=[];for(let l of n)if(l.name==="IDENTIFIER"){if(l.value==null)throw Error("null token value");let f=this.subFields[l.value.trim()].filterFunction(t);o.push(a(f))}else if(l.name==="OPERATOR")if(l.value==="NOT"){let c=s(o.pop());o.push(a(!c))}else if(l.value==="OR"){let c=s(o.pop()),f=s(o.pop());o.push(a(c||f))}else if(l.value==="AND"){let c=s(o.pop()),f=s(o.pop());o.push(a(c&&f))}else if(l.value==="XOR"){let c=s(o.pop()),f=s(o.pop());o.push(a(c&&!f||!c&&f))}else throw Error("Unsupported operator: "+l.value);else throw Error("Unsupported token type: "+l);return s(o[0])}constructExplanation(t){let n=[];for(let s of t)if(s.name==="IDENTIFIER"){if(s.value==null)throw Error("null token value");let a=this.subFields[s.value.trim()];n.push(a.explanation)}else if(s.name==="OPERATOR")if(s.value==="NOT"){let a=n.pop();n.push(Ze.booleanNot([a]))}else if(s.value==="OR"){let a=n.pop(),o=n.pop();n.push(Ze.booleanOr([o,a]))}else if(s.value==="AND"){let a=n.pop(),o=n.pop();n.push(Ze.booleanAnd([o,a]))}else if(s.value==="XOR"){let a=n.pop(),o=n.pop();n.push(Ze.booleanXor([o,a]))}else throw Error("Unsupported operator: "+s.value);else throw Error("Unsupported token type: "+s);return n[0]}};var Xu=class extends jt{fieldName(){return"filename"}value(e){let t=e.filename;return t===null?"":t+".md"}supportsSorting(){return!0}};var Qu=class extends jt{constructor(){super()}fieldName(){return"status.name"}value(e){return e.status.name}supportsSorting(){return!0}supportsGrouping(){return!0}};var Qn=class extends Ke{canCreateFilterForLine(e){let t=new RegExp(`^(?:${this.fieldNameSingularEscaped()})`);return Ke.lineMatchesFilter(t,e)}createFilterOrErrorMessage(e){let t=Ke.getMatch(this.filterRegExp(),e);if(t===null)return this.helpMessage(e);let[n,s,a]=t,o=Er[a.toUpperCase()];if(!o)return this.helpMessage(e);let l;switch(s){case"is":l=c=>c.status.type===o;break;case"is not":l=c=>c.status.type!==o;break;default:return this.helpMessage(e)}return Xe.fromFilter(new tr(e,l,new Ze(e)))}filterRegExp(){return new RegExp(`^(?:${this.fieldNameSingularEscaped()}) (is|is not) ([^ ]+)$`)}helpMessage(e){let t=Object.values(Er).filter(s=>s!=="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 Xe.fromError(e,n)}fieldName(){return"status.type"}value(e){return e.status.type}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=Qn.groupName(e),s=Qn.groupName(t);return n.localeCompare(s,void 0,{numeric:!0})}}supportsGrouping(){return!0}grouper(){return e=>[Qn.groupName(e)]}static groupName(e){let t;switch(e.status.type){case"IN_PROGRESS":t="1";break;case"TODO":t="2";break;case"DONE":t="3";break;case"CANCELLED":t="4";break;case"NON_TASK":t="5";break;case"EMPTY":t="6";break}return t+" "+e.status.type}};var Ju=class extends jt{fieldName(){return"recurrence"}value(e){return e.recurrence!==null?e.recurrence.toText():""}};var cp=[()=>new Qu,()=>new Qn,()=>new bn,()=>new Gu,()=>new Ms,()=>new Zn,()=>new Yu,()=>new $u,()=>new ju,()=>new yi,()=>new Uu,()=>new bi,()=>new Rs,()=>new xs,()=>new qu,()=>new Wu,()=>new Ku,()=>new Xu,()=>new vi,()=>new Ju];function Zu(r){for(let e of cp){let t=e();if(t.canCreateFilterForLine(r))return t.createFilterOrErrorMessage(r)}return null}function Ov(r){let e=/^sort by /;if(r.match(e)===null)return null;for(let t of cp){let s=t().parseSortLine(r);if(s)return s}return null}function Mv(r){let e=/^group by /;if(r.match(e)===null)return null;for(let t of cp){let n=t(),s=n.fieldNameSingular();if(r===`group by ${s}`&&n.supportsGrouping())return n.createGrouper()}return null}var el=class{constructor(e,t){this.nestingLevel=e,this.name=t}};var tl=class{constructor(e){this.lastHeadingAtLevel=new Array;let n=e.keys().next().value.length;for(let s=0;s<n;s++)this.lastHeadingAtLevel.push("")}getHeadingsForTaskGroup(e){let t=new Array;for(let n=0;n<e.length;n++){let s=e[n];if(s!=this.lastHeadingAtLevel[n]){t.push(new el(n,s));for(let a=n;a<e.length;a++)this.lastHeadingAtLevel[a]="";this.lastHeadingAtLevel[n]=s}}return t}};var rl=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,s]of this.children)e.push(n),s.generateAllPaths(e).forEach((o,l)=>t.set(l,o)),e.pop();return t}};var nl=class extends Map{},sl=class extends rl{},il=class{constructor(e,t){this.groups=new nl;let n=this.buildGroupingTree(e,t);this.groups=n.generateAllPaths(),this.groups=this.getSortedGroups()}buildGroupingTree(e,t){let n=new sl(t),s=[n];for(let a of e){let o=[];for(let l of s)for(let c of l.values){let f=En.getGroupNamesForTask(a,c);for(let m of f){let g=l.children.get(m);g===void 0&&(g=new sl([]),l.children.set(m,g),o.push(g)),g.values.push(c)}}s=o}return n}getSortedGroups(){return new nl([...this.groups.entries()].sort())}};var al=class{constructor(e,t,n){this.groups=e,this.groupHeadings=t,this.tasks=n}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.name}
|
|
|
`;return e+=this.tasksAsStringOfLines(),e}};var ol=class{constructor(e,t){this._groups=new Array;this._totalTaskCount=0;this._totalTaskCount=t.length;let n=new il(e,t);this.addTasks(n)}get groups(){return this._groups}totalTasksCount(){return this._totalTaskCount}toString(){let e="";for(let n of this.groups)e+=n.toString(),e+=`
|
|
|
---
|
|
|
`;return e+=`
|
|
|
${this.totalTasksCount()} tasks
|
|
|
`,e}addTasks(e){let t=new tl(e.groups);for(let[n,s]of e.groups){let a=t.getHeadingsForTaskGroup(n),o=new al(n,a,s);this.add(o)}}add(e){this._groups.push(e)}};var Me=class{static fromGroupingProperty(e){return new mi(e,Me.grouperForProperty(e))}static by(e,t){return new ol(e,t)}static getGroupNamesForTask(e,t){return e.grouper(t)}static grouperForProperty(e){return Me.groupers[e]}static escapeMarkdownCharacters(e){return e.replace(/\\/g,"\\\\").replace(/_/g,"\\_")}static groupByPriority(e){let t="ERROR";switch(e.priority){case"1":t="High";break;case"2":t="Medium";break;case"3":t="None";break;case"4":t="Low";break}return[`Priority ${e.priority}: ${t}`]}static groupByRecurrence(e){return e.recurrence!==null?[e.recurrence.toText()]:["None"]}static groupByRecurring(e){return e.recurrence!==null?["Recurring"]:["Not Recurring"]}static groupByCreatedDate(e){return[Me.stringFromDate(e.createdDate,"created")]}static groupByStartDate(e){return[Me.stringFromDate(e.startDate,"start")]}static groupByScheduledDate(e){return[Me.stringFromDate(e.scheduledDate,"scheduled")]}static groupByDueDate(e){return[Me.stringFromDate(e.dueDate,"due")]}static groupByDoneDate(e){return[Me.stringFromDate(e.doneDate,"done")]}static groupByHappensDate(e){let t=new Zn().earliestDate(e);return[Me.stringFromDate(t,"happens")]}static stringFromDate(e,t){return e===null?"No "+t+" date":e.format(Me.groupDateFormat)}static groupByPath(e){return[Me.escapeMarkdownCharacters(e.path.replace(".md",""))]}static groupByFolder(e){let t=e.path,n=e.filename+".md",s=t.substring(0,t.lastIndexOf(n));return s===""?["/"]:[Me.escapeMarkdownCharacters(s)]}static groupByFileName(e){let t=e.filename;return t===null?["Unknown Location"]:["[["+t+"]]"]}static groupByRoot(e){let t=e.path.replace(/\\/g,"/"),n=t.indexOf("/");return n==-1?["/"]:[Me.escapeMarkdownCharacters(t.substring(0,n+1))]}static groupByBacklink(e){if(e.getLinkText({isFilenameUnique:!0})===null)return["Unknown Location"];let n="Unknown Location";if(e.filename!==null&&(n=Me.escapeMarkdownCharacters(e.filename)),e.precedingHeader===null||e.precedingHeader.length===0)return[n];let s=Me.groupByHeading(e)[0];return n===s?[n]:[`${n} > ${s}`]}static groupByStatus(e){return e.status.symbol===" "?["Todo"]:["Done"]}static groupByHeading(e){return e.precedingHeader===null||e.precedingHeader.length===0?["(No heading)"]:[e.precedingHeader]}static groupByTags(e){return e.tags.length==0?["(No tags)"]:e.tags}},En=Me;En.groupDateFormat="YYYY-MM-DD dddd",En.groupers={backlink:Me.groupByBacklink,created:Me.groupByCreatedDate,done:Me.groupByDoneDate,due:Me.groupByDueDate,filename:Me.groupByFileName,folder:Me.groupByFolder,happens:Me.groupByHappensDate,heading:Me.groupByHeading,path:Me.groupByPath,priority:Me.groupByPriority,recurrence:Me.groupByRecurrence,recurring:Me.groupByRecurring,root:Me.groupByRoot,scheduled:Me.groupByScheduledDate,start:Me.groupByStartDate,status:Me.groupByStatus,tags:Me.groupByTags};var Mi=class{constructor({source:e}){this._limit=void 0;this._layoutOptions=new Ha;this._filters=[];this._error=void 0;this._sorting=[];this._grouping=[];this.groupByRegexp=/^group by (backlink|created|done|due|filename|folder|happens|heading|path|priority|recurrence|recurring|root|scheduled|start|status|tags)/;this.hideOptionsRegexp=/^(hide|show) (task count|backlink|priority|created date|start date|scheduled date|done date|due date|recurrence rule|edit button|urgency)/;this.shortModeRegexp=/^short/;this.explainQueryRegexp=/^explain/;this.limitRegexp=/^limit (to )?(\d+)( tasks?)?/;this.commentRegexp=/^#.*/;this.source=e,e.split(`
|
|
|
`).map(t=>t.trim()).forEach(t=>{switch(!0){case t==="":break;case this.shortModeRegexp.test(t):this._layoutOptions.shortMode=!0;break;case this.explainQueryRegexp.test(t):this._layoutOptions.explainQuery=!0;break;case this.limitRegexp.test(t):this.parseLimit({line:t});break;case this.parseSortBy({line:t}):break;case this.parseGroupBy2({line:t}):break;case this.groupByRegexp.test(t):this.parseGroupBy({line:t});break;case this.hideOptionsRegexp.test(t):this.parseHideOptions({line:t});break;case this.commentRegexp.test(t):break;case this.parseFilter(t):break;default:this._error=`do not understand query: ${t}`}})}explainQuery(){return`Explanation of this Tasks code block query:
|
|
|
|
|
|
`+this.explainQueryWithoutIntroduction()}explainQueryWithoutIntroduction(){let e="";Le.isEmpty()||(e+=`Only tasks containing the global filter '${Le.get()}'.
|
|
|
|
|
|
`);let t=this.filters.length;if(t===0)e+="No filters supplied. All tasks will match the query.";else for(let s=0;s<t;s++)s>0&&(e+=`
|
|
|
`),e+=this.filters[s].explainFilterIndented("");this._limit!==void 0&&(e+=`
|
|
|
|
|
|
At most ${this._limit} task`,this._limit!==1&&(e+="s"),e+=`.
|
|
|
`);let{debugSettings:n}=he();return n.ignoreSortInstructions&&(e+=`
|
|
|
|
|
|
NOTE: All sort instructions, including default sort order, are disabled, due to 'ignoreSortInstructions' setting.`),e}get limit(){return this._limit}get layoutOptions(){return this._layoutOptions}get filters(){return this._filters}get sorting(){return this._sorting}get grouping(){return this._grouping}get error(){return this._error}applyQueryToTasks(e){this.filters.forEach(a=>{e=e.filter(a.filterFunction)});let{debugSettings:t}=he(),s=(t.ignoreSortInstructions?e:wi.by(this.sorting,e)).slice(0,this.limit);return En.by(this.grouping,s)}parseHideOptions({line:e}){let t=e.match(this.hideOptionsRegexp);if(t!==null){let n=t[1]==="hide";switch(t[2]){case"task count":this._layoutOptions.hideTaskCount=n;break;case"backlink":this._layoutOptions.hideBacklinks=n;break;case"priority":this._layoutOptions.hidePriority=n;break;case"created date":this._layoutOptions.hideCreatedDate=n;break;case"start date":this._layoutOptions.hideStartDate=n;break;case"scheduled date":this._layoutOptions.hideScheduledDate=n;break;case"due date":this._layoutOptions.hideDueDate=n;break;case"done date":this._layoutOptions.hideDoneDate=n;break;case"recurrence rule":this._layoutOptions.hideRecurrenceRule=n;break;case"edit button":this._layoutOptions.hideEditButton=n;break;case"urgency":this._layoutOptions.hideUrgency=n;break;default:this._error="do not understand hide/show option"}}}parseFilter(e){let t=Zu(e);return t!=null?(t.filter?this._filters.push(t.filter):this._error=t.error,!0):!1}parseLimit({line:e}){let t=e.match(this.limitRegexp);t!==null?this._limit=Number.parseInt(t[2],10):this._error="do not understand query limit"}parseSortBy({line:e}){let t=Ov(e);return t?(this._sorting.push(t),!0):!1}parseGroupBy({line:e}){let t=e.match(this.groupByRegexp);t!==null?this._grouping.push(En.fromGroupingProperty(t[1])):this._error="do not understand query grouping"}parseGroupBy2({line:e}){let t=Mv(e);return t?(this._grouping.push(t),!0):!1}};var ul=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 J(this,null,function*(){n.addChild(new dp({app:this.app,events:this.events,container:t,source:e,filePath:n.sourcePath}))})}},dp=class extends ll.MarkdownRenderChild{constructor({app:t,events:n,container:s,source:a,filePath:o}){super(s);switch(this.app=t,this.events=n,this.source=a,this.filePath=o,this.containerEl.className){case"block-language-tasks":this.query=new Mi({source:a}),this.queryType="tasks";break;default:this.query=new Mi({source:a}),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,s=t.getTime()-n.getTime();this.queryReloadTimeout=setTimeout(()=>{this.query=new Mi({source:this.source}),this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()},s+1e3)}render(s){return J(this,arguments,function*({tasks:t,state:n}){var o;let a=this.containerEl.createEl("div");if(n==="Warm"&&this.query.error===void 0){console.debug(`Render ${this.queryType} called for a block in active file "${this.filePath}", to select from ${t.length} tasks: plugin state: ${n}`),this.query.layoutOptions.explainQuery&&this.createExplanation(a);let l=this.query.applyQueryToTasks(t);for(let f of l.groups){this.addGroupHeadings(a,f.groupHeadings);let{taskList:m}=yield this.createTasksList({tasks:f.tasks,content:a});a.appendChild(m)}let c=l.totalTasksCount();console.debug(`${c} of ${t.length} tasks displayed in a block in "${this.filePath}"`),this.addTaskCount(a,c)}else this.query.error!==void 0?a.createDiv().innerHTML=`<pre>Tasks query: ${this.query.error.replace(/\n/g,"<br>")}</pre>`:a.setText("Loading Tasks ...");(o=this.containerEl.firstChild)==null||o.replaceWith(a)})}createExplanation(t){let n=this.query.explainQuery(),s=t.createEl("pre");s.addClasses(["plugin-tasks-query-explanation"]),s.setText(n),t.appendChild(s)}createTasksList(s){return J(this,arguments,function*({tasks:t,content:n}){let a=t.length,o=new Bn(this.query.layoutOptions),l=n.createEl("ul");l.addClasses(["contains-task-list","plugin-tasks-query-result"]),l.addClasses(o.specificClasses);let c=this.getGroupingAttribute();c&&c.length>0&&(l.dataset.taskGroupBy=c);for(let f=0;f<a;f++){let m=t[f],g=this.isFilenameUnique({task:m}),T=yield m.toLi({parentUlElement:l,listIndex:f,layoutOptions:this.query.layoutOptions,isFilenameUnique:g,taskLayout:o});T.querySelectorAll("[data-footnote-id]").forEach(C=>C.remove());let v=this.query.layoutOptions.shortMode,R=T.createSpan("task-extras");this.query.layoutOptions.hideUrgency||this.addUrgency(R,m),this.query.layoutOptions.hideBacklinks||this.addBacklinks(R,m,v,g),this.query.layoutOptions.hideEditButton||this.addEditButton(R,m),l.appendChild(T)}return{taskList:l,tasksCount:a}})}addEditButton(t,n){t.createEl("a",{cls:"tasks-edit"}).onClickEvent(a=>{a.preventDefault();let o=c=>{Mu({originalTask:n,newTasks:Jt.removeInferredStatusIfNeeded(n,c)})};new Vn({app:this.app,task:n,onSubmit:o}).open()})}addUrgency(t,n){let s=new Intl.NumberFormat().format(n.urgency);t.createSpan({text:s,cls:"tasks-urgency"})}addGroupHeadings(t,n){for(let s of n)this.addGroupHeading(t,s)}addGroupHeading(t,n){return J(this,null,function*(){let s;n.nestingLevel===0?s=t.createEl("h4",{cls:"tasks-group-heading"}):n.nestingLevel===1?s=t.createEl("h5",{cls:"tasks-group-heading"}):s=t.createEl("h6",{cls:"tasks-group-heading"}),yield ll.MarkdownRenderer.renderMarkdown(n.name,s,this.filePath,this)})}addBacklinks(t,n,s,a){var f;let o=t.createSpan({cls:"tasks-backlink"});s||o.append(" (");let l=o.createEl("a");if(l.href=n.path,l.setAttribute("data-href",n.path),l.rel="noopener",l.target="_blank",l.addClass("internal-link"),s&&l.addClass("internal-link-short-mode"),n.precedingHeader!==null){let m=n.precedingHeader.replace(/#/g,"");l.href=l.href+"#"+m,l.setAttribute("data-href",l.getAttribute("data-href")+"#"+m)}let c;s?c=" \u{1F517}":c=(f=n.getLinkText({isFilenameUnique:a}))!=null?f:"",l.setText(c),s||o.append(")")}addTaskCount(t,n){this.query.layoutOptions.hideTaskCount||t.createDiv({text:`${n} task${n!==1?"s":""}`,cls:"tasks-count"})}isFilenameUnique({task:t}){let n=t.path.match(/([^/]*)\..+$/i);if(n===null)return;let s=n[1];return this.app.vault.getMarkdownFiles().filter(o=>{if(o.basename===s)return!0}).length<2}getGroupingAttribute(){let t=[];for(let n of this.query.grouping)t.push(n.property);return t.join(",")}};var He=require("obsidian");function Rv(){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 xv(){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 Pv(){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 Av(){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 Nv(){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 Cv(){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 Iv=[{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 Yr=require("obsidian");var Cs=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,s,a]=e,o=[];if(o.push(...this.validateType(a)),t===s&&a!=="NON_TASK"&&o.push(`Status symbol '${t}' toggles to itself`),o.length>0)return o;let l=fe.createFromImportedValue(e).configuration;return o.push(...this.validateSymbolTypeConventions(l)),o.push(...this.validate(l)),o}validateSymbol(e){return Cs.validateOneSymbol(e.symbol,"Task Status Symbol")}validateNextSymbol(e){return Cs.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=Er[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,s=new Be,a=n==="X"?"x":n,o=s.bySymbol(a);return o.type!=="EMPTY"&&(e.nextStatusSymbol!==o.nextStatusSymbol&&t.push(`Next Status Symbol for symbol '${n}': '${e.nextStatusSymbol}' is inconsistent with convention '${o.nextStatusSymbol}'`),e.type!==o.type&&t.push(`Status Type for symbol '${n}': '${e.type}' is inconsistent with convention '${o.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 Is=new Cs,cr=class extends Yr.Modal{constructor(t,n,s){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=s}statusConfiguration(){return new Mt(this.statusSymbol,this.statusName,this.statusNextSymbol,this.statusAvailableAsCommand,this.type)}display(){return J(this,null,function*(){let{contentEl:t}=this;t.empty();let n=t.createDiv(),s;new Yr.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(f=>{s=f,f.setValue(this.statusSymbol).onChange(m=>{this.statusSymbol=m,cr.setValid(f,Is.validateSymbol(this.statusConfiguration()))})}).setDisabled(this.isCoreStatus).then(f=>{cr.setValid(s,Is.validateSymbol(this.statusConfiguration()))});let a;new Yr.Setting(n).setName("Task Status Name").setDesc("This is the friendly name of the task status.").addText(f=>{a=f,f.setValue(this.statusName).onChange(m=>{this.statusName=m,cr.setValid(f,Is.validateName(this.statusConfiguration()))})}).then(f=>{cr.setValid(a,Is.validateName(this.statusConfiguration()))});let o;new Yr.Setting(n).setName("Task Next Status Symbol").setDesc("When clicked on this is the symbol that should be used next.").addText(f=>{o=f,f.setValue(this.statusNextSymbol).onChange(m=>{this.statusNextSymbol=m,cr.setValid(f,Is.validateNextSymbol(this.statusConfiguration()))})}).then(f=>{cr.setValid(o,Is.validateNextSymbol(this.statusConfiguration()))}),new Yr.Setting(n).setName("Task Status Type").setDesc("Control how the status behaves for searching and toggling.").addDropdown(f=>{["TODO","IN_PROGRESS","DONE","CANCELLED","NON_TASK"].forEach(g=>{f.addOption(g,g)}),f.setValue(this.type).onChange(g=>{this.type=fe.getTypeFromStatusTypeString(g)})}),fe.tasksPluginCanCreateCommandsForStatuses()&&new Yr.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(f=>{f.setValue(this.statusAvailableAsCommand).onChange(m=>J(this,null,function*(){this.statusAvailableAsCommand=m}))});let l=t.createDiv(),c=new Yr.Setting(l);c.addButton(f=>(f.setTooltip("Save").setIcon("checkmark").onClick(()=>J(this,null,function*(){let m=Is.validate(this.statusConfiguration());if(m.length>0){let g=m.join(`
|
|
|
`)+`
|
|
|
|
|
|
Fix errors before saving.`;new Yr.Notice(g);return}this.saved=!0,this.close()})),f)),c.addExtraButton(f=>(f.setIcon("cross").setTooltip("Cancel").onClick(()=>{this.saved=!1,this.close()}),f))})}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?cr.removeValidationError(t):cr.setValidationError(t)}};var Ri=class extends He.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 J(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:"Global filter Settings"}),new He.Setting(t).setName("Global task filter").setDesc(Ri.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(s=>{s.setPlaceholder("e.g. #task or TODO").setValue(Le.get()).onChange(a=>J(this,null,function*(){Le.set(a),yield this.plugin.saveSettings()}))}),new He.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(s=>{let a=he();s.setValue(a.removeGlobalFilter).onChange(o=>J(this,null,function*(){Ct({removeGlobalFilter:o}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Task Statuses"});let{headingOpened:n}=he();Iv.forEach(s=>{this.addOneSettingsBlock(t,s,n)}),t.createEl("h4",{text:"Date Settings"}),new He.Setting(t).setName("Set created date on every added task").setDesc("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.").addToggle(s=>{let a=he();s.setValue(a.setCreatedDate).onChange(o=>J(this,null,function*(){Ct({setCreatedDate:o}),yield this.plugin.saveSettings()}))}),new He.Setting(t).setName("Set done date on every completed task").setDesc("Enabling this will add a timestamp \u2705 YYYY-MM-DD at the end when a task is toggled to done.").addToggle(s=>{let a=he();s.setValue(a.setDoneDate).onChange(o=>J(this,null,function*(){Ct({setDoneDate:o}),yield this.plugin.saveSettings()}))}),new He.Setting(t).setName("Use filename as Scheduled date for undated tasks").setDesc(Ri.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(s=>{let a=he();s.setValue(a.useFilenameAsScheduledDate).onChange(o=>J(this,null,function*(){Ct({useFilenameAsScheduledDate:o}),yield this.plugin.saveSettings()}))}),new He.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(s=>J(this,null,function*(){let a=he();yield this.plugin.saveSettings(),s.setValue(Ri.renderFolderArray(a.filenameAsDateFolders)).onChange(o=>J(this,null,function*(){let l=Ri.parseCommaSeparatedFolders(o);Ct({filenameAsDateFolders:l}),yield this.plugin.saveSettings()}))})),t.createEl("h4",{text:"Auto-suggest Settings"}),new He.Setting(t).setName("Auto-suggest task content").setDesc("Enabling this will open an intelligent suggest menu while typing inside a recognized task line.").addToggle(s=>{let a=he();s.setValue(a.autoSuggestInEditor).onChange(o=>J(this,null,function*(){Ct({autoSuggestInEditor:o}),yield this.plugin.saveSettings()}))}),new He.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(s=>{let a=he();s.setLimits(0,3,1).setValue(a.autoSuggestMinMatch).setDynamicTooltip().onChange(o=>J(this,null,function*(){Ct({autoSuggestMinMatch:o}),yield this.plugin.saveSettings()}))}),new He.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(s=>{let a=he();s.setLimits(3,12,1).setValue(a.autoSuggestMaxItems).setDynamicTooltip().onChange(o=>J(this,null,function*(){Ct({autoSuggestMaxItems:o}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Dialog Settings"}),new He.Setting(t).setName("Provide access keys in dialogs").setDesc("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.").addToggle(s=>{let a=he();s.setValue(a.provideAccessKeys).onChange(o=>J(this,null,function*(){Ct({provideAccessKeys:o}),yield this.plugin.saveSettings()}))})}addOneSettingsBlock(t,n,s){let a=t.createEl("details",{cls:"tasks-nested-settings",attr:Ne({},n.open||s[n.text]?{open:!0}:{})});a.empty(),a.ontoggle=()=>{s[n.text]=a.open,Ct({headingOpened:s}),this.plugin.saveSettings()};let o=a.createEl("summary");if(new He.Setting(o).setHeading().setName(n.text),o.createDiv("collapser").createDiv("handle"),n.notice!==null){let l=a.createEl("div",{cls:n.notice.class,text:n.notice.text});n.notice.html!==null&&l.insertAdjacentHTML("beforeend",n.notice.html)}n.settings.forEach(l=>{if(!(l.featureFlag!==""&&!Cb(l.featureFlag))&&(l.type==="checkbox"?new He.Setting(a).setName(l.name).setDesc(l.description).addToggle(c=>{let f=he();f.generalSettings[l.settingName]||ws(l.settingName,l.initialValue),c.setValue(f.generalSettings[l.settingName]).onChange(m=>J(this,null,function*(){ws(l.settingName,m),yield this.plugin.saveSettings()}))}):l.type==="text"?new He.Setting(a).setName(l.name).setDesc(l.description).addText(c=>{let f=he();f.generalSettings[l.settingName]||ws(l.settingName,l.initialValue);let m=g=>J(this,null,function*(){ws(l.settingName,g),yield this.plugin.saveSettings()});c.setPlaceholder(l.placeholder.toString()).setValue(f.generalSettings[l.settingName].toString()).onChange((0,He.debounce)(m,500,!0))}):l.type==="textarea"?new He.Setting(a).setName(l.name).setDesc(l.description).addTextArea(c=>{let f=he();f.generalSettings[l.settingName]||ws(l.settingName,l.initialValue);let m=g=>J(this,null,function*(){ws(l.settingName,g),yield this.plugin.saveSettings()});c.setPlaceholder(l.placeholder.toString()).setValue(f.generalSettings[l.settingName].toString()).onChange((0,He.debounce)(m,500,!0)),c.inputEl.rows=8,c.inputEl.cols=40}):l.type==="function"&&this.customFunctions[l.settingName](a,this),l.notice!==null)){let c=a.createEl("p",{cls:l.notice.class,text:l.notice.text});l.notice.html!==null&&c.insertAdjacentHTML("beforeend",l.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:s}=he();s.coreStatuses.forEach(a=>{Fv(t,a,s.coreStatuses,s,n,n.plugin,!0)})}insertCustomTaskStatusSettings(t,n){let{statusSettings:s}=he();s.customStatuses.forEach(f=>{Fv(t,f,s.customStatuses,s,n,n.plugin,!1)}),t.createEl("div"),new He.Setting(t).addButton(f=>{f.setButtonText("Add New Task Status").setCta().onClick(()=>J(this,null,function*(){yt.addStatus(s.customStatuses,new Mt("","","",!1,"TODO")),yield xi(s,n)}))}).infoEl.remove();let o=[["AnuPpuccin Theme",Rv()],["Ebullientworks Theme",Pv()],["ITS Theme & SlRvb Checkboxes",Av()],["Minimal Theme",Nv()],["Things Theme",Cv()],["Aura Theme (Dark mode only)",xv()]];for(let[f,m]of o)new He.Setting(t).addButton(T=>{let S=`${f}: Add ${m.length} supported Statuses`;T.setButtonText(S).onClick(()=>J(this,null,function*(){yield gF(m,s,n)}))}).infoEl.remove();new He.Setting(t).addButton(f=>{f.setButtonText("Add All Unknown Status Types").setCta().onClick(()=>J(this,null,function*(){let g=this.plugin.getTasks().map(S=>S.status),T=Be.getInstance().findUnknownStatuses(g);T.length!==0&&(T.forEach(S=>{yt.addStatus(s.customStatuses,S)}),yield xi(s,n))}))}).infoEl.remove(),new He.Setting(t).addButton(f=>{f.setButtonText("Reset Custom Status Types to Defaults").setWarning().onClick(()=>J(this,null,function*(){yt.resetAllCustomStatuses(s),yield xi(s,n)}))}).infoEl.remove()}},oo=Ri;oo.createFragmentWithHTML=t=>createFragment(n=>n.createDiv().innerHTML=t);function Fv(r,e,t,n,s,a,o){let l=r.createEl("pre");l.addClass("row-for-status"),l.textContent=new fe(e).previewText();let c=new He.Setting(r);c.infoEl.replaceWith(l),o||c.addExtraButton(f=>{f.setIcon("cross").setTooltip("Delete").onClick(()=>J(this,null,function*(){yt.deleteStatus(t,e)&&(yield xi(n,s))}))}),c.addExtraButton(f=>{f.setIcon("pencil").setTooltip("Edit").onClick(()=>J(this,null,function*(){let m=new cr(a,e,o);m.onClose=()=>J(this,null,function*(){m.saved&&yt.replaceStatus(t,e,m.statusConfiguration())&&(yield xi(n,s))}),m.open()}))}),c.infoEl.remove()}function gF(r,e,t){return J(this,null,function*(){yt.bulkAddStatusCollection(e,r).forEach(s=>{new He.Notice(s)}),yield xi(e,t)})}function xi(r,e){return J(this,null,function*(){Ct({statusSettings:r}),yt.applyToStatusRegistry(r,Be.getInstance()),yield e.saveSettings(!0)})}var Lv=require("obsidian");var cl=class extends Lv.EditorSuggest{constructor(t,n){super(t);this.settings=n}onTrigger(t,n,s){if(!this.settings.autoSuggestInEditor)return null;let a=n.getLine(t.line);return Le.includedIn(a)&&a.match(ie.taskRegex)?{start:{line:t.line,ch:0},end:{line:t.line,ch:a.length},query:a}:null}getSuggestions(t){var o,l,c;let n=t.query,s=t.editor.getCursor();return((c=(l=(o=Ka()).buildSuggestions)==null?void 0:l.call(o,n,s.ch,this.settings))!=null?c:[]).map(f=>rr(Ne({},f),{context:t}))}renderSuggestion(t,n){n.setText(t.displayText)}selectSuggestion(t,n){var c,f,m;let s=t.context.editor;if(t.suggestionType==="empty"){this.close();let g=new KeyboardEvent("keydown",{code:"Enter",key:"Enter"});(f=(c=s==null?void 0:s.cm)==null?void 0:c.contentDOM)==null||f.dispatchEvent(g);return}let a=t.context.editor.getCursor(),o={line:a.line,ch:(m=t.insertAt)!=null?m:a.ch},l=t.insertSkip?{line:a.line,ch:o.ch+t.insertSkip}:void 0;t.context.editor.replaceRange(t.appendText,o,l),t.context.editor.setCursor({line:a.line,ch:o.ch+t.appendText.length})}};var Yv=(r,e)=>{let t,n=new Promise((o,l)=>{t=o});return e(r,o=>{let l=o.map(c=>c.toFileLineString()).join(`
|
|
|
`);t(l)}).open(),n};var Uv=(r,e)=>{let t=Nu({line:"",path:""});return new Vn({app:r,task:t,onSubmit:e})};var Wv=r=>({createTaskLineModal:()=>Yv(r,Uv)});var dl=class extends qv.Plugin{get apiV1(){return Wv(app)}onload(){return J(this,null,function*(){Ou.registerConsoleLogger(),console.log('loading plugin "tasks"'),yield this.loadSettings(),this.addSettingTab(new oo({plugin:this})),Wb({metadataCache:this.app.metadataCache,vault:this.app.vault,workspace:this.app.workspace}),yield this.loadTaskStatuses();let t=new Iu({obsidianEvents:this.app.workspace});this.cache=new Ds({metadataCache:this.app.metadataCache,vault:this.app.vault,events:t}),this.inlineRenderer=new Fu({plugin:this}),this.queryRenderer=new ul({plugin:this,events:t}),this.registerEditorExtension(hv()),this.registerEditorSuggest(new cl(this.app,he())),new Cu({plugin:this})})}loadTaskStatuses(){return J(this,null,function*(){let{statusSettings:t}=he();yt.applyToStatusRegistry(t,Be.getInstance())})}onunload(){var t;console.log('unloading plugin "tasks"'),(t=this.cache)==null||t.unload()}loadSettings(){return J(this,null,function*(){let t=yield this.loadData();Ct(t),yield this.loadTaskStatuses()})}saveSettings(){return J(this,null,function*(){yield this.saveData(he())})}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.
|
|
|
*/
|
|
|
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
|
|
//! license : MIT
|
|
|
//! moment.js
|
|
|
//! momentjs.com
|
|
|
//! version : 2.29.4
|