/* 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 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 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 Copyright (c) 2012 - Tomi Pieviläinen 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. */ var eh=Object.create;var vr=Object.defineProperty,th=Object.defineProperties,rh=Object.getOwnPropertyDescriptor,nh=Object.getOwnPropertyDescriptors,ih=Object.getOwnPropertyNames,Qa=Object.getOwnPropertySymbols,sh=Object.getPrototypeOf,Xa=Object.prototype.hasOwnProperty,ah=Object.prototype.propertyIsEnumerable;var Ja=(r,e,t)=>e in r?vr(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Le=(r,e)=>{for(var t in e||(e={}))Xa.call(e,t)&&Ja(r,t,e[t]);if(Qa)for(var t of Qa(e))ah.call(e,t)&&Ja(r,t,e[t]);return r},St=(r,e)=>th(r,nh(e)),eo=r=>vr(r,"__esModule",{value:!0});var p=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),oh=(r,e)=>{eo(r);for(var t in e)vr(r,t,{get:e[t],enumerable:!0})},uh=(r,e,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of ih(e))!Xa.call(r,n)&&n!=="default"&&vr(r,n,{get:()=>e[n],enumerable:!(t=rh(e,n))||t.enumerable});return r},Ye=r=>uh(eo(vr(r!=null?eh(sh(r)):{},"default",r&&r.__esModule&&"default"in r?{get:()=>r.default,enumerable:!0}:{value:r,enumerable:!0})),r);var te=(r,e,t)=>new Promise((n,i)=>{var s=u=>{try{o(t.next(u))}catch(l){i(l)}},a=u=>{try{o(t.throw(u))}catch(l){i(l)}},o=u=>u.done?n(u.value):Promise.resolve(u.value).then(s,a);o((t=t.apply(r,e)).next())});var Oo=p((qv,On)=>{var uo,lo,co,fo,ho,po,mo,yo,go,Pn,Oi,_o,To,Xt,bo,vo,wo,Do,Eo,ko,Mo,Ro,Po;(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 On=="object"&&typeof On.exports=="object"?r(t(e,t(On.exports))):r(t(e));function t(n,i){return n!==e&&(typeof Object.create=="function"?Object.defineProperty(n,"__esModule",{value:!0}):n.__esModule=!0),function(s,a){return n[s]=i?i(s,a):a}}})(function(r){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)n.hasOwnProperty(i)&&(t[i]=n[i])};uo=function(t,n){e(t,n);function i(){this.constructor=t}t.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)},lo=Object.assign||function(t){for(var n,i=1,s=arguments.length;i=0;l--)(u=t[l])&&(o=(a<3?u(o):a>3?u(n,i,o):u(n,i))||o);return a>3&&o&&Object.defineProperty(n,i,o),o},ho=function(t,n){return function(i,s){n(i,s,t)}},po=function(t,n){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,n)},mo=function(t,n,i,s){function a(o){return o instanceof i?o:new i(function(u){u(o)})}return new(i||(i=Promise))(function(o,u){function l(f){try{c(s.next(f))}catch(h){u(h)}}function d(f){try{c(s.throw(f))}catch(h){u(h)}}function c(f){f.done?o(f.value):a(f.value).then(l,d)}c((s=s.apply(t,n||[])).next())})},yo=function(t,n){var i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},s,a,o,u;return u={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function l(c){return function(f){return d([c,f])}}function d(c){if(s)throw new TypeError("Generator is already executing.");for(;i;)try{if(s=1,a&&(o=c[0]&2?a.return:c[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,c[1])).done)return o;switch(a=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,a=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(o=i.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){i=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]=t.length&&(t=void 0),{value:t&&t[s++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},Oi=function(t,n){var i=typeof Symbol=="function"&&t[Symbol.iterator];if(!i)return t;var s=i.call(t),a,o=[],u;try{for(;(n===void 0||n-- >0)&&!(a=s.next()).done;)o.push(a.value)}catch(l){u={error:l}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(u)throw u.error}}return o},_o=function(){for(var t=[],n=0;n1||l(m,g)})})}function l(m,g){try{d(s[m](g))}catch(b){h(o[0][3],b)}}function d(m){m.value instanceof Xt?Promise.resolve(m.value.v).then(c,f):h(o[0][2],m)}function c(m){l("next",m)}function f(m){l("throw",m)}function h(m,g){m(g),o.shift(),o.length&&l(o[0][0],o[0][1])}},vo=function(t){var n,i;return n={},s("next"),s("throw",function(a){throw a}),s("return"),n[Symbol.iterator]=function(){return this},n;function s(a,o){n[a]=t[a]?function(u){return(i=!i)?{value:Xt(t[a](u)),done:a==="return"}:o?o(u):u}:o}},wo=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=t[Symbol.asyncIterator],i;return n?n.call(t):(t=typeof Pn=="function"?Pn(t):t[Symbol.iterator](),i={},s("next"),s("throw"),s("return"),i[Symbol.asyncIterator]=function(){return this},i);function s(o){i[o]=t[o]&&function(u){return new Promise(function(l,d){u=t[o](u),a(l,d,u.done,u.value)})}}function a(o,u,l,d){Promise.resolve(d).then(function(c){o({value:c,done:l})},u)}},Do=function(t,n){return Object.defineProperty?Object.defineProperty(t,"raw",{value:n}):t.raw=n,t},Eo=function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var i in t)Object.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n.default=t,n},ko=function(t){return t&&t.__esModule?t:{default:t}},Mo=function(t,n){if(!n.has(t))throw new TypeError("attempted to get private field on non-instance");return n.get(t)},Ro=function(t,n,i){if(!n.has(t))throw new TypeError("attempted to set private field on non-instance");return n.set(t,i),i},r("__extends",uo),r("__assign",lo),r("__rest",co),r("__decorate",fo),r("__param",ho),r("__metadata",po),r("__awaiter",mo),r("__generator",yo),r("__exportStar",go),r("__createBinding",Po),r("__values",Pn),r("__read",Oi),r("__spread",_o),r("__spreadArrays",To),r("__await",Xt),r("__asyncGenerator",bo),r("__asyncDelegator",vo),r("__asyncValues",wo),r("__makeTemplateObject",Do),r("__importStar",Eo),r("__importDefault",ko),r("__classPrivateFieldGet",Mo),r("__classPrivateFieldSet",Ro)})});var ae=p(Et=>{"use strict";Object.defineProperty(Et,"__esModule",{value:!0});Et.matchAnyPattern=Et.extractTerms=Et.repeatedTimeunitPattern=void 0;function Jh(r,e){let t=e.replace(/\((?!\?)/g,"(?:");return`${r}${t}\\s*(?:,?\\s{0,5}${t}){0,10}`}Et.repeatedTimeunitPattern=Jh;function wu(r){let e;return r instanceof Array?e=[...r]:r instanceof Map?e=Array.from(r.keys()):e=Object.keys(r),e}Et.extractTerms=wu;function ep(r){return`(?:${wu(r).sort((t,n)=>n.length-t.length).join("|").replace(/\./g,"\\.")})`}Et.matchAnyPattern=ep});var ve=p((ji,Bi)=>{(function(r,e){typeof ji=="object"&&typeof Bi!="undefined"?Bi.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs=e()})(ji,function(){"use strict";var r=1e3,e=6e4,t=36e5,n="millisecond",i="second",s="minute",a="hour",o="day",u="week",l="month",d="quarter",c="year",f="date",h="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|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,b={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("_")},O=function(D,v,y){var E=String(D);return!E||E.length>=v?D:""+Array(v+1-E.length).join(y)+D},K={s:O,z:function(D){var v=-D.utcOffset(),y=Math.abs(v),E=Math.floor(y/60),T=y%60;return(v<=0?"+":"-")+O(E,2,"0")+":"+O(T,2,"0")},m:function D(v,y){if(v.date(){"use strict";var tp=kt&&kt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(kt,"__esModule",{value:!0});kt.findYearClosestToRef=kt.findMostLikelyADYear=void 0;var rp=tp(ve());function np(r){return r<100&&(r>50?r=r+1900:r=r+2e3),r}kt.findMostLikelyADYear=np;function ip(r,e,t){let n=rp.default(r),i=n;i=i.month(t-1),i=i.date(e),i=i.year(n.year());let s=i.add(1,"y"),a=i.add(-1,"y");return Math.abs(s.diff(n)){"use strict";Object.defineProperty(C,"__esModule",{value:!0});C.parseTimeUnits=C.TIME_UNITS_PATTERN=C.parseYear=C.YEAR_PATTERN=C.parseOrdinalNumberPattern=C.ORDINAL_NUMBER_PATTERN=C.parseNumberPattern=C.NUMBER_PATTERN=C.TIME_UNIT_DICTIONARY=C.ORDINAL_WORD_DICTIONARY=C.INTEGER_WORD_DICTIONARY=C.MONTH_DICTIONARY=C.FULL_MONTH_NAME_DICTIONARY=C.WEEKDAY_DICTIONARY=void 0;var Wn=ae(),sp=Ie();C.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};C.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};C.MONTH_DICTIONARY=Object.assign(Object.assign({},C.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});C.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};C.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};C.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",y:"year",yr:"year",year:"year",years:"year"};C.NUMBER_PATTERN=`(?:${Wn.matchAnyPattern(C.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s*an?)?|an?(?:\\s*few)?|few|several|a?\\s*couple\\s*(?:of)?)`;function Du(r){let e=r.toLowerCase();return C.INTEGER_WORD_DICTIONARY[e]!==void 0?C.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)}C.parseNumberPattern=Du;C.ORDINAL_NUMBER_PATTERN=`(?:${Wn.matchAnyPattern(C.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:st|nd|rd|th)?)`;function ap(r){let e=r.toLowerCase();return C.ORDINAL_WORD_DICTIONARY[e]!==void 0?C.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}C.parseOrdinalNumberPattern=ap;C.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:BE|AD|BC)|[1-2][0-9]{3}|[5-9][0-9])";function op(r){if(/BE/i.test(r))return r=r.replace(/BE/i,""),parseInt(r)-543;if(/BC/i.test(r))return r=r.replace(/BC/i,""),-parseInt(r);if(/AD/i.test(r))return r=r.replace(/AD/i,""),parseInt(r);let e=parseInt(r);return sp.findMostLikelyADYear(e)}C.parseYear=op;var Eu=`(${C.NUMBER_PATTERN})\\s{0,5}(${Wn.matchAnyPattern(C.TIME_UNIT_DICTIONARY)})\\s{0,5}`,ku=new RegExp(Eu,"i");C.TIME_UNITS_PATTERN=Wn.repeatedTimeunitPattern("(?:(?:about|around)\\s*)?",Eu);function up(r){let e={},t=r,n=ku.exec(t);for(;n;)lp(e,n),t=t.substring(n[0].length),n=ku.exec(t);return e}C.parseTimeUnits=up;function lp(r,e){let t=Du(e[1]),n=C.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Mu=p((Gi,Hi)=>{(function(r,e){typeof Gi=="object"&&typeof Hi!="undefined"?Hi.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs_plugin_quarterOfYear=e()})(Gi,function(){"use strict";var r="month",e="quarter";return function(t,n){var i=n.prototype;i.quarter=function(o){return this.$utils().u(o)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(o-1))};var s=i.add;i.add=function(o,u){return o=Number(o),this.$utils().p(u)===e?this.add(3*o,r):s.bind(this)(o,u)};var a=i.startOf;i.startOf=function(o,u){var l=this.$utils(),d=!!l.u(u)||u;if(l.p(o)===e){var c=this.quarter()-1;return d?this.month(3*c).startOf(r).startOf("day"):this.month(3*c+2).endOf(r).endOf("day")}return a.bind(this)(o,u)}}})});var Ze=p(nt=>{"use strict";Object.defineProperty(nt,"__esModule",{value:!0});nt.implySimilarTime=nt.assignSimilarTime=nt.assignSimilarDate=nt.assignTheNextDay=void 0;function cp(r,e){e=e.add(1,"day"),Ru(r,e),Pu(r,e)}nt.assignTheNextDay=cp;function Ru(r,e){r.assign("day",e.date()),r.assign("month",e.month()+1),r.assign("year",e.year())}nt.assignSimilarDate=Ru;function dp(r,e){r.assign("hour",e.hour()),r.assign("minute",e.minute()),r.assign("second",e.second()),r.assign("millisecond",e.millisecond()),r.assign("timezoneOffset",e.utcOffset())}nt.assignSimilarTime=dp;function Pu(r,e){r.imply("hour",e.hour()),r.imply("minute",e.minute()),r.imply("second",e.second()),r.imply("millisecond",e.millisecond()),r.imply("timezoneOffset",e.utcOffset())}nt.implySimilarTime=Pu});var He=p(Mt=>{"use strict";var Ou=Mt&&Mt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Mt,"__esModule",{value:!0});Mt.ParsingResult=Mt.ParsingComponents=void 0;var fp=Ou(Mu()),Ln=Ou(ve()),zi=Ze();Ln.default.extend(fp.default);var ir=class{constructor(e,t){if(this.knownValues={},this.impliedValues={},t)for(let i in t)this.knownValues[i]=t[i];let n=Ln.default(e);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 ir(new Date);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.isCertain("timezoneOffset")?this.dateWithoutTimezoneAdjustment():this.date();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)}}]`}dayjs(){return Ln.default(this.date())}date(){let e=this.dateWithoutTimezoneAdjustment();return new Date(e.getTime()+this.getTimezoneAdjustmentMinute(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}getTimezoneAdjustmentMinute(e){var t;e=e!=null?e:new Date;let n=-e.getTimezoneOffset(),i=(t=this.get("timezoneOffset"))!==null&&t!==void 0?t:n;return n-i}static createRelativeFromRefDate(e,t){let n=Ln.default(e);for(let s in t)n=n.add(t[s],s);let i=new ir(e);return t.hour||t.minute||t.second?(zi.assignSimilarTime(i,n),zi.assignSimilarDate(i,n)):(zi.implySimilarTime(i,n),t.d?(i.assign("day",n.date()),i.assign("month",n.month()+1),i.assign("year",n.year())):(t.week&&i.imply("weekday",n.day()),i.imply("day",n.date()),t.month?(i.assign("month",n.month()+1),i.assign("year",n.year())):(i.imply("month",n.month()+1),t.year?i.assign("year",n.year()):i.imply("year",n.year())))),i}};Mt.ParsingComponents=ir;var Yn=class{constructor(e,t,n,i,s){this.refDate=e,this.index=t,this.text=n,this.start=i||new ir(this.refDate),this.end=s}clone(){let e=new Yn(this.refDate,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}', ...}]`}};Mt.ParsingResult=Yn});var N=p(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});Un.AbstractParserWithWordBoundaryChecking=void 0;var Au=class{constructor(){this.cachedInnerPattern=null,this.cachedPattern=null}pattern(e){let t=this.innerPattern(e);return t==this.cachedInnerPattern?this.cachedPattern:(this.cachedPattern=new RegExp(`(\\W|^)${t.source}`,t.flags),this.cachedInnerPattern=t,this.cachedPattern)}extract(e,t){let n=t[1];t.index=t.index+n.length,t[0]=t[0].substring(n.length);for(let i=2;i{"use strict";Object.defineProperty(Vi,"__esModule",{value:!0});var Ki=Pe(),hp=He(),pp=N(),mp=new RegExp(`(?:within|in|for)\\s*(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${Ki.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),yp=new RegExp(`(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${Ki.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),xu=class extends pp.AbstractParserWithWordBoundaryChecking{innerPattern(e){return e.option.forwardDate?yp:mp}innerExtract(e,t){let n=Ki.parseTimeUnits(t[1]);return hp.ParsingComponents.createRelativeFromRefDate(e.refDate,n)}};Vi.default=xu});var Yu=p(Zi=>{"use strict";Object.defineProperty(Zi,"__esModule",{value:!0});var gp=Ie(),Nu=Pe(),Iu=Pe(),qn=Pe(),_p=ae(),Tp=N(),bp=new RegExp(`(?:on\\s*?)?(${qn.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:to|\\-|\\\u2013|until|through|till|\\s)\\s*(${qn.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:of)?\\s*)(`+_p.matchAnyPattern(Nu.MONTH_DICTIONARY)+`)(?:(?:-|/|,?\\s*)(${Iu.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Su=1,Fu=2,vp=3,Wu=4,Lu=class extends Tp.AbstractParserWithWordBoundaryChecking{innerPattern(){return bp}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Nu.MONTH_DICTIONARY[t[vp].toLowerCase()],s=qn.parseOrdinalNumberPattern(t[Su]);if(s>31)return t.index=t.index+t[Su].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[Wu]){let a=Iu.parseYear(t[Wu]);n.start.assign("year",a)}else{let a=gp.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[Fu]){let a=qn.parseOrdinalNumberPattern(t[Fu]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Zi.default=Lu});var Gu=p(Qi=>{"use strict";Object.defineProperty(Qi,"__esModule",{value:!0});var wp=Ie(),Uu=Pe(),$n=Pe(),qu=Pe(),Dp=ae(),Ep=N(),kp=new RegExp(`(${Dp.matchAnyPattern(Uu.MONTH_DICTIONARY)})(?:-|/|\\s*,?\\s*)(${$n.ORDINAL_NUMBER_PATTERN})(?!\\s*(?:am|pm))\\s*(?:(?:to|\\-)\\s*(${$n.ORDINAL_NUMBER_PATTERN})\\s*)?(?:(?:-|/|\\s*,?\\s*)(${qu.YEAR_PATTERN}))?(?=\\W|$)(?!\\:\\d)`,"i"),Mp=1,Rp=2,$u=3,ju=4,Bu=class extends Ep.AbstractParserWithWordBoundaryChecking{innerPattern(){return kp}innerExtract(e,t){let n=Uu.MONTH_DICTIONARY[t[Mp].toLowerCase()],i=$n.parseOrdinalNumberPattern(t[Rp]);if(i>31)return null;let s=e.createParsingComponents({day:i,month:n});if(t[ju]){let u=qu.parseYear(t[ju]);s.assign("year",u)}else{let u=wp.findYearClosestToRef(e.refDate,i,n);s.imply("year",u)}if(!t[$u])return s;let a=$n.parseOrdinalNumberPattern(t[$u]),o=e.createParsingResult(t.index,t[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",a),o}};Qi.default=Bu});var Vu=p(Ji=>{"use strict";Object.defineProperty(Ji,"__esModule",{value:!0});var Xi=Pe(),Pp=Ie(),Op=ae(),Hu=Pe(),Ap=N(),xp=new RegExp(`((?:in)\\s*)?(${Op.matchAnyPattern(Xi.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${Hu.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),Cp=1,Np=2,zu=3,Ku=class extends Ap.AbstractParserWithWordBoundaryChecking{innerPattern(){return xp}innerExtract(e,t){let n=t[Np].toLowerCase();if(t[0].length<=3&&!Xi.FULL_MONTH_NAME_DICTIONARY[n])return null;let i=e.createParsingResult(t.index+(t[Cp]||"").length,t.index+t[0].length);i.start.imply("day",1);let s=Xi.MONTH_DICTIONARY[n];if(i.start.assign("month",s),t[zu]){let a=Hu.parseYear(t[zu]);i.start.assign("year",a)}else{let a=Pp.findYearClosestToRef(e.refDate,1,s);i.start.imply("year",a)}return i}};Ji.default=Ku});var Ju=p(es=>{"use strict";Object.defineProperty(es,"__esModule",{value:!0});var Zu=Pe(),Ip=ae(),Sp=N(),Fp=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${Ip.matchAnyPattern(Zu.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),Wp=1,Lp=2,Qu=3,Yp=4,Xu=class extends Sp.AbstractParserWithWordBoundaryChecking{innerPattern(){return Fp}innerExtract(e,t){let n=t[Qu]?parseInt(t[Qu]):Zu.MONTH_DICTIONARY[t[Lp].toLowerCase()];if(n<1||n>12)return null;let i=parseInt(t[Wp]);return{day:parseInt(t[Yp]),month:n,year:i}}};es.default=Xu});var tl=p(ts=>{"use strict";Object.defineProperty(ts,"__esModule",{value:!0});var Up=N(),qp=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),$p=1,jp=2,el=class extends Up.AbstractParserWithWordBoundaryChecking{innerPattern(){return qp}innerExtract(e,t){let n=parseInt(t[jp]),i=parseInt(t[$p]);return e.createParsingComponents().imply("day",1).assign("month",i).assign("year",n)}};ts.default=el});var ar=p(Gn=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});Gn.AbstractTimeExpressionParser=void 0;var Ce=we();function Bp(r,e){return new RegExp(`(^|\\s|T|\\b)${r}(\\d{1,4})(?:(?:\\.|\\:|\\\uFF1A)(\\d{1,2})(?:(?:\\:|\\\uFF1A)(\\d{2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${e}`,"i")}function Gp(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 rl=2,sr=3,jn=4,Bn=5,Nr=6,nl=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}primarySuffix(){return"(?=\\W|$)"}followingSuffix(){return"(?=\\W|$)"}pattern(e){return this.getPrimaryTimePatternThroughCache()}extract(e,t){let n=this.extractPrimaryTimeComponents(e,t);if(!n)return t.index+=t[0].length,null;let i=t.index+t[1].length,s=t[0].substring(t[1].length),a=e.createParsingResult(i,s,n);t.index+=t[0].length;let o=e.text.substring(t.index),l=this.getFollowingTimePatternThroughCache().exec(o);return!l||l[0].match(/^\s*([+-])\s*\d{3,4}$/)?this.checkAndReturnWithoutFollowingPattern(a):(a.end=this.extractFollowingTimeComponents(e,l,a),a.end&&(a.text+=l[0]),this.checkAndReturnWithFollowingPattern(a))}extractPrimaryTimeComponents(e,t,n=!1){let i=e.createParsingComponents(),s=0,a=null,o=parseInt(t[rl]);if(o>100){if(this.strictMode||t[sr]!=null)return null;s=o%100,o=Math.floor(o/100)}if(o>24)return null;if(t[sr]!=null){if(t[sr].length==1&&!t[Nr])return null;s=parseInt(t[sr])}if(s>=60)return null;if(o>12&&(a=Ce.Meridiem.PM),t[Nr]!=null){if(o>12)return null;let u=t[Nr][0].toLowerCase();u=="a"&&(a=Ce.Meridiem.AM,o==12&&(o=0)),u=="p"&&(a=Ce.Meridiem.PM,o!=12&&(o+=12))}if(i.assign("hour",o),i.assign("minute",s),a!==null?i.assign("meridiem",a):o<12?i.imply("meridiem",Ce.Meridiem.AM):i.imply("meridiem",Ce.Meridiem.PM),t[Bn]!=null){let u=parseInt(t[Bn].substring(0,3));if(u>=1e3)return null;i.assign("millisecond",u)}if(t[jn]!=null){let u=parseInt(t[jn]);if(u>=60)return null;i.assign("second",u)}return i}extractFollowingTimeComponents(e,t,n){let i=e.createParsingComponents();if(t[Bn]!=null){let u=parseInt(t[Bn].substring(0,3));if(u>=1e3)return null;i.assign("millisecond",u)}if(t[jn]!=null){let u=parseInt(t[jn]);if(u>=60)return null;i.assign("second",u)}let s=parseInt(t[rl]),a=0,o=-1;if(t[sr]!=null?a=parseInt(t[sr]):s>100&&(a=s%100,s=Math.floor(s/100)),a>=60||s>24)return null;if(s>=12&&(o=Ce.Meridiem.PM),t[Nr]!=null){if(s>12)return null;let u=t[Nr][0].toLowerCase();u=="a"&&(o=Ce.Meridiem.AM,s==12&&(s=0,i.isCertain("day")||i.imply("day",i.get("day")+1))),u=="p"&&(o=Ce.Meridiem.PM,s!=12&&(s+=12)),n.start.isCertain("meridiem")||(o==Ce.Meridiem.AM?(n.start.imply("meridiem",Ce.Meridiem.AM),n.start.get("hour")==12&&n.start.assign("hour",0)):(n.start.imply("meridiem",Ce.Meridiem.PM),n.start.get("hour")!=12&&n.start.assign("hour",n.start.get("hour")+12)))}return i.assign("hour",s),i.assign("minute",a),o>=0?i.assign("meridiem",o):n.start.isCertain("meridiem")&&n.start.get("hour")>12?n.start.get("hour")-12>s?i.imply("meridiem",Ce.Meridiem.AM):s<=12&&(i.assign("hour",s+12),i.assign("meridiem",Ce.Meridiem.PM)):s>12?i.imply("meridiem",Ce.Meridiem.PM):s<=12&&i.imply("meridiem",Ce.Meridiem.AM),i.date().getTime()24)return null}return e}checkAndReturnWithFollowingPattern(e){if(e.text.match(/^\d+-\d+$/))return null;let t=e.text.match(/[^\d:.](\d[\d.]+)\s*-\s*(\d[\d.]+)$/);if(t){if(this.strictMode)return null;let n=t[1],i=t[2];if(i.includes(".")&&!i.match(/\d(\.\d{2})+$/))return null;let s=parseInt(i),a=parseInt(n);if(s>24||a>24)return null}return e}getPrimaryTimePatternThroughCache(){let e=this.primaryPrefix(),t=this.primarySuffix();return this.cachedPrimaryPrefix===e&&this.cachedPrimarySuffix===t?this.cachedPrimaryTimePattern:(this.cachedPrimaryTimePattern=Bp(e,t),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=Gp(e,t),this.cachedFollowingPhase=e,this.cachedFollowingSuffix=t,this.cachedFollowingTimePatten)}};Gn.AbstractTimeExpressionParser=nl});var sl=p(rs=>{"use strict";Object.defineProperty(rs,"__esModule",{value:!0});var Hn=we(),Hp=ar(),il=class extends Hp.AbstractTimeExpressionParser{constructor(e){super(e)}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|to|\\?)\\s*"}primaryPrefix(){return"(?:(?:at|from)\\s*)??"}primarySuffix(){return"(?:\\s*(?:o\\W*clock|at\\s*night|in\\s*the\\s*(?:morning|afternoon)))?(?!/)(?=\\W|$)"}extractPrimaryTimeComponents(e,t){let n=super.extractPrimaryTimeComponents(e,t);if(n){if(t[0].endsWith("night")){let i=n.get("hour");i>=6&&i<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",Hn.Meridiem.PM)):i<6&&n.assign("meridiem",Hn.Meridiem.AM)}if(t[0].endsWith("afternoon")){n.assign("meridiem",Hn.Meridiem.PM);let i=n.get("hour");i>=0&&i<=6&&n.assign("hour",n.get("hour")+12)}t[0].endsWith("morning")&&(n.assign("meridiem",Hn.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};rs.default=il});var ur=p(or=>{"use strict";Object.defineProperty(or,"__esModule",{value:!0});or.addImpliedTimeUnits=or.reverseTimeUnits=void 0;function zp(r){let e={};for(let t in r)e[t]=-r[t];return e}or.reverseTimeUnits=zp;function Kp(r,e){let t=r.clone(),n=r.dayjs();for(let i in e)n=n.add(e[i],i);return("day"in e||"d"in e||"week"in e||"month"in e||"year"in e)&&(t.imply("day",n.date()),t.imply("month",n.month()+1),t.imply("year",n.year())),("second"in e||"minute"in e||"hour"in e)&&(t.imply("second",n.second()),t.imply("minute",n.minute()),t.imply("hour",n.hour())),t}or.addImpliedTimeUnits=Kp});var ol=p(is=>{"use strict";Object.defineProperty(is,"__esModule",{value:!0});var ns=Pe(),Vp=He(),Zp=N(),Qp=ur(),Xp=new RegExp("("+ns.TIME_UNITS_PATTERN+")(?:ago|before|earlier)(?=(?:\\W|$))","i"),Jp=new RegExp("("+ns.TIME_UNITS_PATTERN+")ago(?=(?:\\W|$))","i"),al=class extends Zp.AbstractParserWithWordBoundaryChecking{constructor(e){super();this.strictMode=e}innerPattern(){return this.strictMode?Jp:Xp}innerExtract(e,t){let n=ns.parseTimeUnits(t[1]),i=Qp.reverseTimeUnits(n);return Vp.ParsingComponents.createRelativeFromRefDate(e.refDate,i)}};is.default=al});var ll=p(as=>{"use strict";Object.defineProperty(as,"__esModule",{value:!0});var ss=Pe(),em=He(),tm=N(),rm=new RegExp("("+ss.TIME_UNITS_PATTERN+")(later|after|from now|henceforth|forward|out)(?=(?:\\W|$))","i"),nm=new RegExp("("+ss.TIME_UNITS_PATTERN+")(later|from now)(?=(?:\\W|$))","i"),im=1,ul=class extends tm.AbstractParserWithWordBoundaryChecking{constructor(e){super();this.strictMode=e}innerPattern(){return this.strictMode?nm:rm}innerExtract(e,t){let n=ss.parseTimeUnits(t[im]);return em.ParsingComponents.createRelativeFromRefDate(e.refDate,n)}};as.default=ul});var Ir=p(lr=>{"use strict";Object.defineProperty(lr,"__esModule",{value:!0});lr.MergingRefiner=lr.Filter=void 0;var cl=class{refine(e,t){return t.filter(n=>this.isValid(e,n))}};lr.Filter=cl;var dl=class{refine(e,t){if(t.length<2)return t;let n=[],i=t[0],s=null;for(let a=1;a{console.log(`${this.constructor.name} merged ${u} and ${l} into ${d}`)}),i=d}}return i!=null&&n.push(i),n}};lr.MergingRefiner=dl});var $t=p(os=>{"use strict";Object.defineProperty(os,"__esModule",{value:!0});var sm=Ir(),fl=class extends sm.MergingRefiner{shouldMergeResults(e,t,n){return!t.end&&!n.end&&e.match(this.patternBetween())!=null}mergeResults(e,t,n){if(!t.start.isOnlyWeekdayComponent()&&!n.start.isOnlyWeekdayComponent()&&(n.start.getCertainComponents().forEach(s=>{t.start.isCertain(s)||t.start.assign(s,n.start.get(s))}),t.start.getCertainComponents().forEach(s=>{n.start.isCertain(s)||n.start.assign(s,t.start.get(s))})),t.start.date().getTime()>n.start.date().getTime()){let s=t.start.dayjs(),a=n.start.dayjs();t.start.isOnlyWeekdayComponent()&&s.add(-7,"days").isBefore(a)?(s=s.add(-7,"days"),t.start.imply("day",s.date()),t.start.imply("month",s.month()+1),t.start.imply("year",s.year())):n.start.isOnlyWeekdayComponent()&&a.add(7,"days").isAfter(s)?(a=a.add(7,"days"),n.start.imply("day",a.date()),n.start.imply("month",a.month()+1),n.start.imply("year",a.year())):[n,t]=[t,n]}let i=t.clone();return i.start=t.start,i.end=n.start,i.index=Math.min(t.index,n.index),t.index{"use strict";var am=Sr&&Sr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Sr,"__esModule",{value:!0});var om=am($t()),hl=class extends om.default{patternBetween(){return/^\s*(to|-)\s*$/i}};Sr.default=hl});var ml=p(cr=>{"use strict";Object.defineProperty(cr,"__esModule",{value:!0});cr.mergeDateTimeComponent=cr.mergeDateTimeResult=void 0;var um=we();function lm(r,e){let t=r.clone(),n=r.start,i=e.start;if(t.start=us(n,i),r.end!=null||e.end!=null){let s=r.end==null?r.start:r.end,a=e.end==null?e.start:e.end,o=us(s,a);r.end==null&&o.date().getTime(){"use strict";Object.defineProperty(ls,"__esModule",{value:!0});var cm=Ir(),yl=ml(),gl=class extends cm.MergingRefiner{shouldMergeResults(e,t,n){return(t.start.isOnlyDate()&&n.start.isOnlyTime()||n.start.isOnlyDate()&&t.start.isOnlyTime())&&e.match(this.patternBetween())!=null}mergeResults(e,t,n){let i=t.start.isOnlyDate()?yl.mergeDateTimeResult(t,n):yl.mergeDateTimeResult(n,t);return i.index=t.index,i.text=t.text+e+n.text,i}};ls.default=gl});var Tl=p(Fr=>{"use strict";var dm=Fr&&Fr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Fr,"__esModule",{value:!0});var fm=dm(dr()),_l=class extends fm.default{patternBetween(){return new RegExp("^\\s*(T|at|after|before|on|of|,|-)?\\s*$")}};Fr.default=_l});var vl=p(cs=>{"use strict";Object.defineProperty(cs,"__esModule",{value:!0});var hm=new RegExp("^\\s*\\(?([A-Z]{2,4})\\)?(?=\\W|$)","i"),pm={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},bl=class{constructor(e){this.timezone=Object.assign(Object.assign({},pm),e)}refine(e,t){var n;let i=(n=e.option.timezones)!==null&&n!==void 0?n:{};return t.forEach(s=>{var a,o;let u=e.text.substring(s.index+s.text.length),l=hm.exec(u);if(!l)return;let d=l[1].toUpperCase(),c=(o=(a=i[d])!==null&&a!==void 0?a:this.timezone[d])!==null&&o!==void 0?o:null;if(c===null)return;e.debug(()=>{console.log(`Extracting timezone: '${d}' into : ${c}`)});let f=s.start.get("timezoneOffset");f!==null&&c!=f||(s.text+=l[0],s.start.isCertain("timezoneOffset")||s.start.assign("timezoneOffset",c),s.end!=null&&!s.end.isCertain("timezoneOffset")&&s.end.assign("timezoneOffset",c))}),t}};cs.default=bl});var Dl=p(ds=>{"use strict";Object.defineProperty(ds,"__esModule",{value:!0});var mm=new RegExp("^\\s*(?:(?:GMT|UTC)\\s?)?([+-])(\\d{1,2})(?::?(\\d{2}))?","i"),ym=1,gm=2,_m=3,wl=class{refine(e,t){return t.forEach(function(n){if(n.start.isCertain("timezoneOffset"))return;let i=e.text.substring(n.index+n.text.length),s=mm.exec(i);if(!s)return;e.debug(()=>{console.log(`Extracting timezone: '${s[0]}' into : ${n}`)});let a=parseInt(s[gm]),o=parseInt(s[_m]||"0"),u=a*60+o;s[ym]==="-"&&(u=-u),n.end!=null&&n.end.assign("timezoneOffset",u),n.start.assign("timezoneOffset",u),n.text+=s[0]}),t}};ds.default=wl});var kl=p(fs=>{"use strict";Object.defineProperty(fs,"__esModule",{value:!0});var El=class{refine(e,t){if(t.length<2)return t;let n=[],i=t[0];for(let s=1;si.text.length&&(i=a):(n.push(i),i=a)}return i!=null&&n.push(i),n}};fs.default=El});var Rl=p(Wr=>{"use strict";var Tm=Wr&&Wr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Wr,"__esModule",{value:!0});var bm=Tm(ve()),Ml=class{refine(e,t){return e.option.forwardDate&&t.forEach(function(n){let i=bm.default(e.refDate);if(n.start.isOnlyDayMonthComponent()&&i.isAfter(n.start.dayjs()))for(let s=0;s<3&&i.isAfter(n.start.dayjs());s++)n.start.imply("year",n.start.get("year")+1),e.debug(()=>{console.log(`Forward yearly adjusted for ${n} (${n.start})`)}),n.end&&!n.end.isCertain("year")&&(n.end.imply("year",n.end.get("year")+1),e.debug(()=>{console.log(`Forward yearly adjusted for ${n} (${n.end})`)}));n.start.isOnlyWeekdayComponent()&&i.isAfter(n.start.dayjs())&&(i.day()>n.start.get("weekday")?i=i.day(n.start.get("weekday")+7):i=i.day(n.start.get("weekday")),n.start.imply("day",i.date()),n.start.imply("month",i.month()+1),n.start.imply("year",i.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.start})`)}),n.end&&n.end.isOnlyWeekdayComponent()&&(i.day()>n.end.get("weekday")?i=i.day(n.end.get("weekday")+7):i=i.day(n.end.get("weekday")),n.end.imply("day",i.date()),n.end.imply("month",i.month()+1),n.end.imply("year",i.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.end})`)})))}),t}};Wr.default=Ml});var Ol=p(hs=>{"use strict";Object.defineProperty(hs,"__esModule",{value:!0});var vm=Ir(),Pl=class extends vm.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}};hs.default=Pl});var ms=p(ps=>{"use strict";Object.defineProperty(ps,"__esModule",{value:!0});var wm=N(),Dm=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"),Em=1,km=2,Mm=3,Al=4,Rm=5,xl=6,Cl=7,Nl=8,Il=9,Sl=class extends wm.AbstractParserWithWordBoundaryChecking{innerPattern(){return Dm}innerExtract(e,t){let n={};if(n.year=parseInt(t[Em]),n.month=parseInt(t[km]),n.day=parseInt(t[Mm]),t[Al]!=null)if(n.hour=parseInt(t[Al]),n.minute=parseInt(t[Rm]),t[xl]!=null&&(n.second=parseInt(t[xl])),t[Cl]!=null&&(n.millisecond=parseInt(t[Cl])),t[Nl]==null)n.timezoneOffset=0;else{let i=parseInt(t[Nl]),s=0;t[Il]!=null&&(s=parseInt(t[Il]));let a=i*60;a<0?a-=s:a+=s,n.timezoneOffset=a}return n}};ps.default=Sl});var Wl=p(ys=>{"use strict";Object.defineProperty(ys,"__esModule",{value:!0});var Pm=Ir(),Fl=class extends Pm.MergingRefiner{mergeResults(e,t,n){let i=n.clone();return i.index=t.index,i.text=t.text+e+i.text,i.start.assign("weekday",t.start.get("weekday")),i.end&&i.end.assign("weekday",t.start.get("weekday")),i}shouldMergeResults(e,t,n){return t.start.isOnlyWeekdayComponent()&&!t.start.isCertain("hour")&&n.start.isCertain("day")&&e.match(/^,?\s*$/)!=null}};ys.default=Fl});var hr=p(fr=>{"use strict";var jt=fr&&fr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(fr,"__esModule",{value:!0});fr.includeCommonConfiguration=void 0;var Om=jt(vl()),Am=jt(Dl()),Ll=jt(kl()),xm=jt(Rl()),Cm=jt(Ol()),Nm=jt(ms()),Im=jt(Wl());function Sm(r,e=!1){return r.parsers.unshift(new Nm.default),r.refiners.unshift(new Im.default),r.refiners.unshift(new Om.default),r.refiners.unshift(new Am.default),r.refiners.unshift(new Ll.default),r.refiners.push(new Ll.default),r.refiners.push(new xm.default),r.refiners.push(new Cm.default(e)),r}fr.includeCommonConfiguration=Sm});var Bt=p(Se=>{"use strict";var Fm=Se&&Se.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Se,"__esModule",{value:!0});Se.tonight=Se.tomorrow=Se.yesterday=Se.today=Se.now=void 0;var Lr=He(),Yr=Fm(ve()),Rt=Ze(),Wm=we();function Lm(r){let e=Yr.default(r),t=new Lr.ParsingComponents(r,{});return Rt.assignSimilarDate(t,e),Rt.assignSimilarTime(t,e),t}Se.now=Lm;function Ym(r){let e=Yr.default(r),t=new Lr.ParsingComponents(r,{});return Rt.assignSimilarDate(t,e),Rt.implySimilarTime(t,e),t}Se.today=Ym;function Um(r){let e=Yr.default(r),t=new Lr.ParsingComponents(r,{});return e=e.add(-1,"day"),Rt.assignSimilarDate(t,e),Rt.implySimilarTime(t,e),t}Se.yesterday=Um;function qm(r){let e=Yr.default(r),t=new Lr.ParsingComponents(r,{});return Rt.assignTheNextDay(t,e),t}Se.tomorrow=qm;function $m(r,e=22){let t=Yr.default(r),n=new Lr.ParsingComponents(r,{});return n.imply("hour",e),n.imply("meridiem",Wm.Meridiem.PM),Rt.assignSimilarDate(n,t),n}Se.tonight=$m});var Ul=p(Qe=>{"use strict";var jm=Qe&&Qe.__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]}),Bm=Qe&&Qe.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Gm=Qe&&Qe.__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)&&jm(e,r,t);return Bm(e,r),e},Hm=Qe&&Qe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Qe,"__esModule",{value:!0});var zm=Hm(ve()),Km=N(),Vm=Ze(),Ur=Gm(Bt()),Zm=/(now|today|tonight|tomorrow|tmr|yesterday|last\s*night)(?=\W|$)/i,Yl=class extends Km.AbstractParserWithWordBoundaryChecking{innerPattern(e){return Zm}innerExtract(e,t){let n=zm.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();switch(i){case"now":return Ur.now(e.refDate);case"today":return Ur.today(e.refDate);case"yesterday":return Ur.yesterday(e.refDate);case"tomorrow":case"tmr":return Ur.tomorrow(e.refDate);case"tonight":return Ur.tonight(e.refDate);default:i.match(/last\s*night/)&&(n.hour()>6&&(n=n.add(-1,"day")),Vm.assignSimilarDate(s,n),s.imply("hour",0));break}return s}};Qe.default=Yl});var $l=p(qr=>{"use strict";var Qm=qr&&qr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(qr,"__esModule",{value:!0});var zn=we(),Xm=N(),Jm=Qm(ve()),ey=Ze(),ty=/(?:this)?\s*(morning|afternoon|evening|night|midnight|noon)(?=\W|$)/i,ql=class extends Xm.AbstractParserWithWordBoundaryChecking{innerPattern(){return ty}innerExtract(e,t){let n=Jm.default(e.refDate),i=e.createParsingComponents();switch(t[1].toLowerCase()){case"afternoon":i.imply("meridiem",zn.Meridiem.PM),i.imply("hour",15);break;case"evening":case"night":i.imply("meridiem",zn.Meridiem.PM),i.imply("hour",20);break;case"midnight":ey.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"morning":i.imply("meridiem",zn.Meridiem.AM),i.imply("hour",6);break;case"noon":i.imply("meridiem",zn.Meridiem.AM),i.imply("hour",12);break}return i}};qr.default=ql});var pr=p(Pt=>{"use strict";var ry=Pt&&Pt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Pt,"__esModule",{value:!0});Pt.toDayJSClosestWeekday=Pt.toDayJSWeekday=void 0;var jl=ry(ve());function ny(r,e,t){if(!t)return Bl(r,e);let n=jl.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}Pt.toDayJSWeekday=ny;function Bl(r,e){let t=jl.default(r),n=t.day();return Math.abs(e-7-n){"use strict";Object.defineProperty(gs,"__esModule",{value:!0});var Gl=Pe(),iy=ae(),sy=N(),ay=pr(),oy=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:on\\s*?)?(?:(this|last|past|next)\\s*)?(${iy.matchAnyPattern(Gl.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(this|last|past|next)\\s*week)?(?=\\W|$)`,"i"),uy=1,ly=2,cy=3,Hl=class extends sy.AbstractParserWithWordBoundaryChecking{innerPattern(){return oy}innerExtract(e,t){let n=t[ly].toLowerCase(),i=Gl.WEEKDAY_DICTIONARY[n],s=t[uy],a=t[cy],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o=="last"||o=="past"?u="last":o=="next"?u="next":o=="this"&&(u="this");let l=ay.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};gs.default=Hl});var Ql=p($r=>{"use strict";var dy=$r&&$r.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($r,"__esModule",{value:!0});var Kl=Pe(),Vl=He(),fy=dy(ve()),hy=N(),py=ae(),my=new RegExp(`(this|next|last|past)\\s*(${py.matchAnyPattern(Kl.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),yy=1,gy=2,Zl=class extends hy.AbstractParserWithWordBoundaryChecking{innerPattern(){return my}innerExtract(e,t){let n=t[yy].toLowerCase(),i=t[gy].toLowerCase(),s=Kl.TIME_UNIT_DICTIONARY[i];if(n=="next"){let u={};return u[s]=1,Vl.ParsingComponents.createRelativeFromRefDate(e.refDate,u)}if(n=="last"||n=="past"){let u={};return u[s]=-1,Vl.ParsingComponents.createRelativeFromRefDate(e.refDate,u)}let a=e.createParsingComponents(),o=fy.default(e.refDate);return i.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):i.match(/month/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):i.match(/year/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};$r.default=Zl});var Ot=p(mr=>{"use strict";Object.defineProperty(mr,"__esModule",{value:!0});mr.ParsingContext=mr.Chrono=void 0;var jr=He(),_y=Ts(),Br=class{constructor(e){e=e||_y.createCasualConfiguration(),this.parsers=[...e.parsers],this.refiners=[...e.refiners]}clone(){return new Br({parsers:[...this.parsers],refiners:[...this.refiners]})}parseDate(e,t,n){let i=this.parse(e,t,n);return i.length>0?i[0].start.date():null}parse(e,t,n){let i=new _s(e,t||new Date,n||{}),s=[];return this.parsers.forEach(a=>{let o=Br.executeParser(i,a);s=s.concat(o)}),s.sort((a,o)=>a.index-o.index),this.refiners.forEach(function(a){s=a.refine(i,s)}),s}static executeParser(e,t){let n=[],i=t.pattern(e),s=e.text,a=e.text,o=i.exec(a);for(;o;){let u=o.index+s.length-a.length;o.index=u;let l=t.extract(e,o);if(!l){a=s.substring(o.index+1),o=i.exec(a);continue}let d=null;l instanceof jr.ParsingResult?d=l:l instanceof jr.ParsingComponents?(d=e.createParsingResult(o.index,o[0]),d.start=l):d=e.createParsingResult(o.index,o[0],l),e.debug(()=>console.log(`${t.constructor.name} extracted result ${d}`)),n.push(d),a=s.substring(u+d.text.length),o=i.exec(a)}return n}};mr.Chrono=Br;var _s=class{constructor(e,t,n){this.text=e,this.refDate=t,this.option=n}createParsingComponents(e){return e instanceof jr.ParsingComponents?e:new jr.ParsingComponents(this.refDate,e)}createParsingResult(e,t,n,i){let s=typeof t=="string"?t:this.text.substring(e,t),a=n?this.createParsingComponents(n):null,o=i?this.createParsingComponents(i):null;return new jr.ParsingResult(this.refDate,e,s,a,o)}debug(e){this.option.debug&&(this.option.debug instanceof Function?this.option.debug(e):this.option.debug.debug(e))}};mr.ParsingContext=_s});var yr=p(vs=>{"use strict";Object.defineProperty(vs,"__esModule",{value:!0});var Xl=Ie(),Ty=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"),Kn=1,Jl=5,ec=2,tc=3,bs=4,rc=class{constructor(e){this.groupNumberMonth=e?tc:ec,this.groupNumberDay=e?ec:tc}pattern(){return Ty}extract(e,t){if(t[Kn]=="/"||t[Jl]=="/"){t.index+=t[0].length;return}let n=t.index+t[Kn].length,i=t[0].substr(t[Kn].length,t[0].length-t[Kn].length-t[Jl].length);if(i.match(/^\d\.\d$/)||i.match(/^\d\.\d{1,2}\.\d{1,2}\s*$/)||!t[bs]&&t[0].indexOf("/")<0)return;let s=e.createParsingResult(n,i),a=parseInt(t[this.groupNumberMonth]),o=parseInt(t[this.groupNumberDay]);if((a<1||a>12)&&a>12)if(o>=1&&o<=12&&a<=31)[o,a]=[a,o];else return null;if(o<1||o>31)return null;if(s.start.assign("day",o),s.start.assign("month",a),t[bs]){let u=parseInt(t[bs]),l=Xl.findMostLikelyADYear(u);s.start.assign("year",l)}else{let u=Xl.findYearClosestToRef(e.refDate,o,a);s.start.imply("year",u)}return s}};vs.default=rc});var sc=p(ws=>{"use strict";Object.defineProperty(ws,"__esModule",{value:!0});var nc=Pe(),by=He(),vy=N(),wy=ur(),Dy=new RegExp(`(this|last|past|next|\\+|-)\\s*(${nc.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),ic=class extends vy.AbstractParserWithWordBoundaryChecking{innerPattern(){return Dy}innerExtract(e,t){let n=t[1].toLowerCase(),i=nc.parseTimeUnits(t[2]);switch(n){case"last":case"past":case"-":i=wy.reverseTimeUnits(i);break}return by.ParsingComponents.createRelativeFromRefDate(e.refDate,i)}};ws.default=ic});var Ts=p(ce=>{"use strict";var De=ce&&ce.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ce,"__esModule",{value:!0});ce.createConfiguration=ce.createCasualConfiguration=ce.parseDate=ce.parse=ce.GB=ce.strict=ce.casual=void 0;var Ey=De(Cu()),ky=De(Yu()),My=De(Gu()),Ry=De(Vu()),Py=De(Ju()),Oy=De(tl()),Ay=De(sl()),xy=De(ol()),Cy=De(ll()),Ny=De(pl()),Iy=De(Tl()),Sy=hr(),Fy=De(Ul()),Wy=De($l()),Ly=De(zl()),Yy=De(Ql()),Ds=Ot(),Uy=De(yr()),qy=De(sc());ce.casual=new Ds.Chrono(ac(!1));ce.strict=new Ds.Chrono(Vn(!0,!1));ce.GB=new Ds.Chrono(Vn(!1,!0));function $y(r,e,t){return ce.casual.parse(r,e,t)}ce.parse=$y;function jy(r,e,t){return ce.casual.parseDate(r,e,t)}ce.parseDate=jy;function ac(r=!1){let e=Vn(!1,r);return e.parsers.unshift(new Fy.default),e.parsers.unshift(new Wy.default),e.parsers.unshift(new Ry.default),e.parsers.unshift(new Yy.default),e.parsers.unshift(new qy.default),e}ce.createCasualConfiguration=ac;function Vn(r=!0,e=!1){return Sy.includeCommonConfiguration({parsers:[new Uy.default(e),new Ey.default,new ky.default,new My.default,new Ly.default,new Py.default,new Oy.default,new Ay.default(r),new xy.default(r),new Cy.default(r)],refiners:[new Iy.default,new Ny.default]},r)}ce.createConfiguration=Vn});var lc=p(Es=>{"use strict";Object.defineProperty(Es,"__esModule",{value:!0});var By=ar(),oc=we(),uc=class extends By.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:um|von)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|bis)\\s*"}primarySuffix(){return"(?:\\s*uhr)?(?:\\s*(?:morgens|vormittags|nachmittags|abends|nachts))?(?=\\W|$)"}extractPrimaryTimeComponents(e,t){let n=super.extractPrimaryTimeComponents(e,t);return n&&((t[0].endsWith("morgens")||t[0].endsWith("vormittags"))&&(n.assign("meridiem",oc.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour"))),(t[0].endsWith("nachmittags")||t[0].endsWith("abends")||t[0].endsWith("nachts"))&&(n.assign("meridiem",oc.Meridiem.PM),n.get("hour")<12&&n.assign("hour",n.get("hour")+12))),n}};Es.default=uc});var Zn=p(z=>{"use strict";Object.defineProperty(z,"__esModule",{value:!0});z.parseTimeUnits=z.TIME_UNITS_PATTERN=z.parseYear=z.YEAR_PATTERN=z.parseNumberPattern=z.NUMBER_PATTERN=z.TIME_UNIT_DICTIONARY=z.INTEGER_WORD_DICTIONARY=z.MONTH_DICTIONARY=z.WEEKDAY_DICTIONARY=void 0;var ks=ae(),Gy=Ie();z.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};z.MONTH_DICTIONARY={januar:1,jan:1,"jan.":1,februar: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};z.INTEGER_WORD_DICTIONARY={eins: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};z.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",y:"year",yr:"year",year:"year",years:"year"};z.NUMBER_PATTERN=`(?:${ks.matchAnyPattern(z.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s*an?)?|an?(?:\\s*few)?|few|several|a?\\s*couple\\s*(?:of)?)`;function cc(r){let e=r.toLowerCase();return z.INTEGER_WORD_DICTIONARY[e]!==void 0?z.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)}z.parseNumberPattern=cc;z.YEAR_PATTERN="(?:[0-9]{1,4}(?:\\s*[vn]\\.?\\s*C(?:hr)?\\.?)?)";function Hy(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,""));let e=parseInt(r);return Gy.findMostLikelyADYear(e)}z.parseYear=Hy;var dc=`(${z.NUMBER_PATTERN})\\s{0,5}(${ks.matchAnyPattern(z.TIME_UNIT_DICTIONARY)})\\s{0,5}`,fc=new RegExp(dc,"i");z.TIME_UNITS_PATTERN=ks.repeatedTimeunitPattern("",dc);function zy(r){let e={},t=r,n=fc.exec(t);for(;n;)Ky(e,n),t=t.substring(n[0].length),n=fc.exec(t);return e}z.parseTimeUnits=zy;function Ky(r,e){let t=cc(e[1]),n=z.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var mc=p(Ms=>{"use strict";Object.defineProperty(Ms,"__esModule",{value:!0});var hc=Zn(),Vy=ae(),Zy=N(),Qy=pr(),Xy=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:a[mn]\\s*?)?(?:(diese[mn]|letzte[mn]|n(?:\xE4|ae)chste[mn])\\s*)?(${Vy.matchAnyPattern(hc.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(diese|letzte|n(?:\xE4|ae)chste)\\s*woche)?(?=\\W|$)`,"i"),Jy=1,eg=3,tg=2,pc=class extends Zy.AbstractParserWithWordBoundaryChecking{innerPattern(){return Xy}innerExtract(e,t){let n=t[tg].toLowerCase(),i=hc.WEEKDAY_DICTIONARY[n],s=t[Jy],a=t[eg],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o.match(/letzte/)?u="last":o.match(/chste/)?u="next":o.match(/diese/)&&(u="this");let l=Qy.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Ms.default=pc});var gc=p(Gr=>{"use strict";var rg=Gr&&Gr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Gr,"__esModule",{value:!0});var ng=rg($t()),yc=class extends ng.default{patternBetween(){return/^\s*(bis(?:\s*(?:am|zum))?|-)\s*$/i}};Gr.default=yc});var Tc=p(Hr=>{"use strict";var ig=Hr&&Hr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Hr,"__esModule",{value:!0});var sg=ig(dr()),_c=class extends sg.default{patternBetween(){return new RegExp("^\\s*(T|um|am|,|-)?\\s*$")}};Hr.default=_c});var Rs=p(zr=>{"use strict";var ag=zr&&zr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(zr,"__esModule",{value:!0});var og=ag(ve()),Gt=we(),ug=N(),lg=Ze(),cg=ur(),Qn=class extends ug.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(diesen)?\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht)(?=\W|$)/i}innerExtract(e,t){let n=og.default(e.refDate),i=t[2].toLowerCase(),s=e.createParsingComponents();return lg.implySimilarTime(s,n),Qn.extractTimeComponents(s,i)}static extractTimeComponents(e,t){switch(t){case"morgen":e.imply("hour",6),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Gt.Meridiem.AM);break;case"vormittag":e.imply("hour",9),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Gt.Meridiem.AM);break;case"mittag":case"mittags":e.imply("hour",12),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Gt.Meridiem.AM);break;case"nachmittag":e.imply("hour",15),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Gt.Meridiem.PM);break;case"abend":e.imply("hour",18),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Gt.Meridiem.PM);break;case"nacht":e.imply("hour",22),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Gt.Meridiem.PM);break;case"mitternacht":e.get("hour")>1&&(e=cg.addImpliedTimeUnits(e,{day:1})),e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Gt.Meridiem.AM);break}return e}};zr.default=Qn});var Dc=p(Xe=>{"use strict";var dg=Xe&&Xe.__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]}),fg=Xe&&Xe.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),hg=Xe&&Xe.__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)&&dg(e,r,t);return fg(e,r),e},bc=Xe&&Xe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Xe,"__esModule",{value:!0});var pg=bc(ve()),mg=N(),Ht=Ze(),yg=bc(Rs()),vc=hg(Bt()),gg=new RegExp("(jetzt|heute|morgen|\xFCbermorgen|uebermorgen|gestern|vorgestern|letzte\\s*nacht)(?:\\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht))?(?=\\W|$)","i"),_g=1,Tg=2,wc=class extends mg.AbstractParserWithWordBoundaryChecking{innerPattern(e){return gg}innerExtract(e,t){let n=pg.default(e.refDate),i=(t[_g]||"").toLowerCase(),s=(t[Tg]||"").toLowerCase(),a=e.createParsingComponents();switch(i){case"jetzt":a=vc.now(e.refDate);break;case"heute":a=vc.today(e.refDate);break;case"morgen":Ht.assignTheNextDay(a,n);break;case"\xFCbermorgen":case"uebermorgen":n=n.add(1,"day"),Ht.assignTheNextDay(a,n);break;case"gestern":n=n.add(-1,"day"),Ht.assignSimilarDate(a,n),Ht.implySimilarTime(a,n);break;case"vorgestern":n=n.add(-2,"day"),Ht.assignSimilarDate(a,n),Ht.implySimilarTime(a,n);break;default:i.match(/letzte\s*nacht/)&&(n.hour()>6&&(n=n.add(-1,"day")),Ht.assignSimilarDate(a,n),a.imply("hour",0));break}return s&&(a=yg.default.extractTimeComponents(a,s)),a}};Xe.default=wc});var Ac=p(Ps=>{"use strict";Object.defineProperty(Ps,"__esModule",{value:!0});var bg=Ie(),Ec=Zn(),kc=Zn(),vg=ae(),wg=N(),Dg=new RegExp(`(?:am\\s*?)?(?:den\\s*?)?([0-9]{1,2})\\.(?:\\s*(?:bis(?:\\s*(?:am|zum))?|\\-|\\\u2013|\\s)\\s*([0-9]{1,2})\\.?)?\\s*(${vg.matchAnyPattern(Ec.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${kc.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Mc=1,Rc=2,Eg=3,Pc=4,Oc=class extends wg.AbstractParserWithWordBoundaryChecking{innerPattern(){return Dg}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Ec.MONTH_DICTIONARY[t[Eg].toLowerCase()],s=parseInt(t[Mc]);if(s>31)return t.index=t.index+t[Mc].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[Pc]){let a=kc.parseYear(t[Pc]);n.start.assign("year",a)}else{let a=bg.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[Rc]){let a=parseInt(t[Rc]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Ps.default=Oc});var Nc=p(me=>{"use strict";var dt=me&&me.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(me,"__esModule",{value:!0});me.createConfiguration=me.createCasualConfiguration=me.parseDate=me.parse=me.strict=me.casual=void 0;var kg=hr(),xc=Ot(),Mg=dt(yr()),Rg=dt(ms()),Pg=dt(lc()),Og=dt(mc()),Ag=dt(gc()),xg=dt(Tc()),Cg=dt(Dc()),Ng=dt(Rs()),Ig=dt(Ac());me.casual=new xc.Chrono(Cc());me.strict=new xc.Chrono(Os(!0));function Sg(r,e,t){return me.casual.parse(r,e,t)}me.parse=Sg;function Fg(r,e,t){return me.casual.parseDate(r,e,t)}me.parseDate=Fg;function Cc(r=!0){let e=Os(!1,r);return e.parsers.unshift(new Ng.default),e.parsers.unshift(new Cg.default),e}me.createCasualConfiguration=Cc;function Os(r=!0,e=!0){return kg.includeCommonConfiguration({parsers:[new Rg.default,new Mg.default(e),new Pg.default,new Ig.default,new Og.default],refiners:[new Ag.default,new xg.default]},r)}me.createConfiguration=Os});var Fc=p(Je=>{"use strict";var Wg=Je&&Je.__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]}),Lg=Je&&Je.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Yg=Je&&Je.__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)&&Wg(e,r,t);return Lg(e,r),e},Ug=Je&&Je.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Je,"__esModule",{value:!0});var qg=Ug(ve()),$g=we(),jg=N(),Ic=Ze(),Xn=Yg(Bt()),Sc=class extends jg.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(maintenant|aujourd'hui|demain|hier|cette\s*nuit|la\s*veille)(?=\W|$)/i}innerExtract(e,t){let n=qg.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();switch(i){case"maintenant":return Xn.now(e.refDate);case"aujourd'hui":return Xn.today(e.refDate);case"hier":return Xn.yesterday(e.refDate);case"demain":return Xn.tomorrow(e.refDate);default:i.match(/cette\s*nuit/)?(Ic.assignSimilarDate(s,n),s.imply("hour",22),s.imply("meridiem",$g.Meridiem.PM)):i.match(/la\s*veille/)&&(n=n.add(-1,"day"),Ic.assignSimilarDate(s,n),s.imply("hour",0))}return s}};Je.default=Sc});var Lc=p(As=>{"use strict";Object.defineProperty(As,"__esModule",{value:!0});var Kr=we(),Bg=N(),Wc=class extends Bg.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(cet?)?\s*(matin|soir|après-midi|aprem|a midi|à minuit)(?=\W|$)/i}innerExtract(e,t){let n=t[2].toLowerCase(),i=e.createParsingComponents();switch(n){case"apr\xE8s-midi":case"aprem":i.imply("hour",14),i.imply("minute",0),i.imply("meridiem",Kr.Meridiem.PM);break;case"soir":i.imply("hour",18),i.imply("minute",0),i.imply("meridiem",Kr.Meridiem.PM);break;case"matin":i.imply("hour",8),i.imply("minute",0),i.imply("meridiem",Kr.Meridiem.AM);break;case"a midi":i.imply("hour",12),i.imply("minute",0),i.imply("meridiem",Kr.Meridiem.AM);break;case"\xE0 minuit":i.imply("hour",0),i.imply("meridiem",Kr.Meridiem.AM);break}return i}};As.default=Wc});var Uc=p(xs=>{"use strict";Object.defineProperty(xs,"__esModule",{value:!0});var Gg=ar(),Yc=class extends Gg.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)}};xs.default=Yc});var $c=p(Vr=>{"use strict";var Hg=Vr&&Vr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Vr,"__esModule",{value:!0});var zg=Hg(dr()),qc=class extends zg.default{patternBetween(){return new RegExp("^\\s*(T|\xE0|a|vers|de|,|-)?\\s*$")}};Vr.default=qc});var Bc=p(Zr=>{"use strict";var Kg=Zr&&Zr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Zr,"__esModule",{value:!0});var Vg=Kg($t()),jc=class extends Vg.default{patternBetween(){return/^\s*(à|a|-)\s*$/i}};Zr.default=jc});var At=p($=>{"use strict";Object.defineProperty($,"__esModule",{value:!0});$.parseTimeUnits=$.TIME_UNITS_PATTERN=$.parseYear=$.YEAR_PATTERN=$.parseOrdinalNumberPattern=$.ORDINAL_NUMBER_PATTERN=$.parseNumberPattern=$.NUMBER_PATTERN=$.TIME_UNIT_DICTIONARY=$.INTEGER_WORD_DICTIONARY=$.MONTH_DICTIONARY=$.WEEKDAY_DICTIONARY=void 0;var Cs=ae();$.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};$.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};$.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};$.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"};$.NUMBER_PATTERN=`(?:${Cs.matchAnyPattern($.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|une?|quelques?|demi-?)`;function Gc(r){let e=r.toLowerCase();return $.INTEGER_WORD_DICTIONARY[e]!==void 0?$.INTEGER_WORD_DICTIONARY[e]:e==="une"||e==="un"?1:e.match(/quelques?/)?3:e.match(/demi-?/)?.5:parseFloat(e)}$.parseNumberPattern=Gc;$.ORDINAL_NUMBER_PATTERN="(?:[0-9]{1,2}(?:er)?)";function Zg(r){let e=r.toLowerCase();return e=e.replace(/(?:er)$/i,""),parseInt(e)}$.parseOrdinalNumberPattern=Zg;$.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 Qg(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}$.parseYear=Qg;var Hc=`(${$.NUMBER_PATTERN})\\s{0,5}(${Cs.matchAnyPattern($.TIME_UNIT_DICTIONARY)})\\s{0,5}`,zc=new RegExp(Hc,"i");$.TIME_UNITS_PATTERN=Cs.repeatedTimeunitPattern("",Hc);function Xg(r){let e={},t=r,n=zc.exec(t);for(;n;)Jg(e,n),t=t.substring(n[0].length),n=zc.exec(t);return e}$.parseTimeUnits=Xg;function Jg(r,e){let t=Gc(e[1]),n=$.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Zc=p(Ns=>{"use strict";Object.defineProperty(Ns,"__esModule",{value:!0});var Kc=At(),e_=ae(),t_=N(),r_=pr(),n_=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(?:ce)\\s*)?(${e_.matchAnyPattern(Kc.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(dernier|prochain)\\s*)?(?=\\W|\\d|$)`,"i"),i_=1,s_=2,Vc=class extends t_.AbstractParserWithWordBoundaryChecking{innerPattern(){return n_}innerExtract(e,t){let n=t[i_].toLowerCase(),i=Kc.WEEKDAY_DICTIONARY[n];if(i===void 0)return null;let s=t[s_];s=s||"",s=s.toLowerCase();let a=null;s=="dernier"?a="last":s=="prochain"&&(a="next");let o=r_.toDayJSWeekday(e.refDate,i,a);return e.createParsingComponents().assign("weekday",i).imply("day",o.date()).imply("month",o.month()+1).imply("year",o.year())}};Ns.default=Vc});var ed=p(Is=>{"use strict";Object.defineProperty(Is,"__esModule",{value:!0});var Qr=we(),a_=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"),o_=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"),u_=2,Qc=3,Xc=4,Jc=5,Xr=class{pattern(e){return a_}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=Xr.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let i=e.text.substring(t.index+t[0].length),s=o_.exec(i);return s&&(n.end=Xr.extractTimeComponent(n.start.clone(),s),n.end&&(n.text+=s[0])),n}static extractTimeComponent(e,t){let n=0,i=0,s=null;if(n=parseInt(t[u_]),t[Qc]!=null&&(i=parseInt(t[Qc])),i>=60||n>24)return null;if(n>=12&&(s=Qr.Meridiem.PM),t[Jc]!=null){if(n>12)return null;let a=t[Jc][0].toLowerCase();a=="a"&&(s=Qr.Meridiem.AM,n==12&&(n=0)),a=="p"&&(s=Qr.Meridiem.PM,n!=12&&(n+=12))}if(e.assign("hour",n),e.assign("minute",i),s!==null?e.assign("meridiem",s):n<12?e.imply("meridiem",Qr.Meridiem.AM):e.imply("meridiem",Qr.Meridiem.PM),t[Xc]!=null){let a=parseInt(t[Xc]);if(a>=60)return null;e.assign("second",a)}return e}};Is.default=Xr});var od=p(Ss=>{"use strict";Object.defineProperty(Ss,"__esModule",{value:!0});var l_=Ie(),td=At(),rd=At(),Jn=At(),c_=ae(),d_=N(),f_=new RegExp(`(?:on\\s*?)?(${Jn.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:au|\\-|\\\u2013|jusqu'au?|\\s)\\s*(${Jn.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:de)?\\s*)(${c_.matchAnyPattern(td.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${rd.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),nd=1,id=2,h_=3,sd=4,ad=class extends d_.AbstractParserWithWordBoundaryChecking{innerPattern(){return f_}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=td.MONTH_DICTIONARY[t[h_].toLowerCase()],s=Jn.parseOrdinalNumberPattern(t[nd]);if(s>31)return t.index=t.index+t[nd].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[sd]){let a=rd.parseYear(t[sd]);n.start.assign("year",a)}else{let a=l_.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[id]){let a=Jn.parseOrdinalNumberPattern(t[id]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Ss.default=ad});var cd=p(Fs=>{"use strict";Object.defineProperty(Fs,"__esModule",{value:!0});var ud=At(),p_=He(),m_=N(),y_=ur(),ld=class extends m_.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`il y a\\s*(${ud.TIME_UNITS_PATTERN})(?=(?:\\W|$))`,"i")}innerExtract(e,t){let n=ud.parseTimeUnits(t[1]),i=y_.reverseTimeUnits(n);return p_.ParsingComponents.createRelativeFromRefDate(e.refDate,i)}};Fs.default=ld});var hd=p(Ws=>{"use strict";Object.defineProperty(Ws,"__esModule",{value:!0});var dd=At(),g_=He(),__=N(),fd=class extends __.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp(`(?:dans|en|pour|pendant)\\s*(${dd.TIME_UNITS_PATTERN})(?=\\W|$)`,"i")}innerExtract(e,t){let n=dd.parseTimeUnits(t[1]);return g_.ParsingComponents.createRelativeFromRefDate(e.refDate,n)}};Ws.default=fd});var md=p(Ls=>{"use strict";Object.defineProperty(Ls,"__esModule",{value:!0});var ei=At(),T_=He(),b_=N(),v_=ur(),w_=ae(),pd=class extends b_.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:les?|la|l'|du|des?)\\s*(${ei.NUMBER_PATTERN})?(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?\\s*(${w_.matchAnyPattern(ei.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]?ei.parseNumberPattern(t[1]):1,i=ei.TIME_UNIT_DICTIONARY[t[3].toLowerCase()],s={};s[i]=n;let a=t[2]||t[4]||"";if(a=a.toLowerCase(),!!a)return(/derni[eè]re?s?/.test(a)||/pass[ée]e?s?/.test(a)||/pr[ée]c[ée]dents?/.test(a))&&(s=v_.reverseTimeUnits(s)),T_.ParsingComponents.createRelativeFromRefDate(e.refDate,s)}};Ls.default=pd});var _d=p(ye=>{"use strict";var ze=ye&&ye.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ye,"__esModule",{value:!0});ye.createConfiguration=ye.createCasualConfiguration=ye.parseDate=ye.parse=ye.strict=ye.casual=void 0;var D_=hr(),yd=Ot(),E_=ze(Fc()),k_=ze(Lc()),M_=ze(yr()),R_=ze(Uc()),P_=ze($c()),O_=ze(Bc()),A_=ze(Zc()),x_=ze(ed()),C_=ze(od()),N_=ze(cd()),I_=ze(hd()),S_=ze(md());ye.casual=new yd.Chrono(gd());ye.strict=new yd.Chrono(Ys(!0));function F_(r,e,t){return ye.casual.parse(r,e,t)}ye.parse=F_;function W_(r,e,t){return ye.casual.parseDate(r,e,t)}ye.parseDate=W_;function gd(r=!0){let e=Ys(!1,r);return e.parsers.unshift(new E_.default),e.parsers.unshift(new k_.default),e.parsers.unshift(new S_.default),e}ye.createCasualConfiguration=gd;function Ys(r=!0,e=!0){return D_.includeCommonConfiguration({parsers:[new M_.default(e),new C_.default,new R_.default,new x_.default,new N_.default,new I_.default,new A_.default],refiners:[new P_.default,new O_.default]},r)}ye.createConfiguration=Ys});var Td=p(ti=>{"use strict";Object.defineProperty(ti,"__esModule",{value:!0});ti.toHankaku=void 0;function L_(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,Y_)}ti.toHankaku=L_;function Y_(r){return String.fromCharCode(r.charCodeAt(0)-65248)}});var wd=p(Jr=>{"use strict";var U_=Jr&&Jr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Jr,"__esModule",{value:!0});var Us=Td(),q_=Ie(),$_=U_(ve()),j_=/(?:(?:([同今本])|((昭和|平成|令和)?([0-90-9]{1,4}|元)))年\s*)?([0-90-9]{1,2})月\s*([0-90-9]{1,2})日/i,bd=1,B_=2,qs=3,G_=4,H_=5,z_=6,vd=class{pattern(){return j_}extract(e,t){let n=parseInt(Us.toHankaku(t[H_])),i=parseInt(Us.toHankaku(t[z_])),s=e.createParsingComponents({day:i,month:n});if(t[bd]&&t[bd].match("\u540C|\u4ECA|\u672C")){let a=$_.default(e.refDate);s.assign("year",a.year())}if(t[B_]){let a=t[G_],o=a=="\u5143"?1:parseInt(Us.toHankaku(a));t[qs]=="\u4EE4\u548C"?o+=2018:t[qs]=="\u5E73\u6210"?o+=1988:t[qs]=="\u662D\u548C"&&(o+=1925),s.assign("year",o)}else{let a=q_.findYearClosestToRef(e.refDate,i,n);s.imply("year",a)}return s}};Jr.default=vd});var Ed=p(en=>{"use strict";var K_=en&&en.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(en,"__esModule",{value:!0});var V_=K_($t()),Dd=class extends V_.default{patternBetween(){return/^\s*(から|ー|-)\s*$/i}};en.default=Dd});var Rd=p(et=>{"use strict";var Z_=et&&et.__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]}),Q_=et&&et.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),X_=et&&et.__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)&&Z_(e,r,t);return Q_(e,r),e},J_=et&&et.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(et,"__esModule",{value:!0});var eT=J_(ve()),kd=we(),$s=X_(Bt()),tT=/今日|当日|昨日|明日|今夜|今夕|今晩|今朝/i,Md=class{pattern(){return tT}extract(e,t){let n=t[0],i=eT.default(e.refDate),s=e.createParsingComponents();switch(n){case"\u6628\u65E5":return $s.yesterday(e.refDate);case"\u660E\u65E5":return $s.tomorrow(e.refDate);case"\u4ECA\u65E5":case"\u5F53\u65E5":return $s.today(e.refDate)}return n=="\u4ECA\u591C"||n=="\u4ECA\u5915"||n=="\u4ECA\u6669"?(s.imply("hour",22),s.assign("meridiem",kd.Meridiem.PM)):n.match("\u4ECA\u671D")&&(s.imply("hour",6),s.assign("meridiem",kd.Meridiem.AM)),s.assign("day",i.date()),s.assign("month",i.month()+1),s.assign("year",i.year()),s}};et.default=Md});var Ad=p(ge=>{"use strict";var js=ge&&ge.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ge,"__esModule",{value:!0});ge.createConfiguration=ge.createCasualConfiguration=ge.parseDate=ge.parse=ge.strict=ge.casual=void 0;var rT=js(wd()),nT=js(Ed()),iT=js(Rd()),Pd=Ot();ge.casual=new Pd.Chrono(Od());ge.strict=new Pd.Chrono(Bs());function sT(r,e,t){return ge.casual.parse(r,e,t)}ge.parse=sT;function aT(r,e,t){return ge.casual.parseDate(r,e,t)}ge.parseDate=aT;function Od(){let r=Bs();return r.parsers.unshift(new iT.default),r}ge.createCasualConfiguration=Od;function Bs(){return{parsers:[new rT.default],refiners:[new nT.default]}}ge.createConfiguration=Bs});var ri=p(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.parseYear=it.YEAR_PATTERN=it.MONTH_DICTIONARY=it.WEEKDAY_DICTIONARY=void 0;it.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};it.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};it.YEAR_PATTERN="[0-9]{1,4}(?![^\\s]\\d)(?:\\s*[a|d]\\.?\\s*c\\.?|\\s*a\\.?\\s*d\\.?)?";function oT(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)}it.parseYear=oT});var Nd=p(Gs=>{"use strict";Object.defineProperty(Gs,"__esModule",{value:!0});var xd=ri(),uT=ae(),lT=N(),cT=pr(),dT=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(este|esta|passado|pr[o\xF3]ximo)\\s*)?(${uT.matchAnyPattern(xd.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(este|esta|passado|pr[\xF3o]ximo)\\s*semana)?(?=\\W|\\d|$)`,"i"),fT=1,hT=2,pT=3,Cd=class extends lT.AbstractParserWithWordBoundaryChecking{innerPattern(){return dT}innerExtract(e,t){let n=t[hT].toLowerCase(),i=xd.WEEKDAY_DICTIONARY[n];if(i===void 0)return null;let s=t[fT],a=t[pT],o=s||a||"";o=o.toLowerCase();let u=null;o=="passado"?u="this":o=="pr\xF3ximo"||o=="proximo"?u="next":o=="este"&&(u="this");let l=cT.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Gs.default=Cd});var Sd=p(Hs=>{"use strict";Object.defineProperty(Hs,"__esModule",{value:!0});var mT=ar(),Id=class extends mT.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:ao?|\xE0s?|das|da|de|do)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|a(?:o)?|\\?)\\s*"}};Hs.default=Id});var Wd=p(tn=>{"use strict";var yT=tn&&tn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(tn,"__esModule",{value:!0});var gT=yT(dr()),Fd=class extends gT.default{patternBetween(){return new RegExp("^\\s*(?:,|\xE0)?\\s*$")}};tn.default=Fd});var Yd=p(rn=>{"use strict";var _T=rn&&rn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(rn,"__esModule",{value:!0});var TT=_T($t()),Ld=class extends TT.default{patternBetween(){return/^\s*(?:-)\s*$/i}};rn.default=Ld});var Hd=p(zs=>{"use strict";Object.defineProperty(zs,"__esModule",{value:!0});var bT=Ie(),Ud=ri(),qd=ri(),vT=ae(),wT=N(),DT=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*)(${vT.matchAnyPattern(Ud.MONTH_DICTIONARY)})(?:\\s*(?:de|,)?\\s*(${qd.YEAR_PATTERN}))?(?=\\W|$)`,"i"),$d=1,jd=2,ET=3,Bd=4,Gd=class extends wT.AbstractParserWithWordBoundaryChecking{innerPattern(){return DT}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Ud.MONTH_DICTIONARY[t[ET].toLowerCase()],s=parseInt(t[$d]);if(s>31)return t.index=t.index+t[$d].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[Bd]){let a=qd.parseYear(t[Bd]);n.start.assign("year",a)}else{let a=bT.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[jd]){let a=parseInt(t[jd]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};zs.default=Gd});var Kd=p(ft=>{"use strict";var kT=ft&&ft.__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]}),MT=ft&&ft.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),RT=ft&&ft.__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)&&kT(e,r,t);return MT(e,r),e};Object.defineProperty(ft,"__esModule",{value:!0});var PT=N(),ni=RT(Bt()),zd=class extends PT.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(agora|hoje|amanha|amanhã|ontem)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),i=e.createParsingComponents();switch(n){case"agora":return ni.now(e.refDate);case"hoje":return ni.today(e.refDate);case"amanha":case"amanh\xE3":return ni.tomorrow(e.refDate);case"ontem":return ni.yesterday(e.refDate)}return i}};ft.default=zd});var Zd=p(nn=>{"use strict";var OT=nn&&nn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(nn,"__esModule",{value:!0});var ii=we(),AT=N(),xT=Ze(),CT=OT(ve()),Vd=class extends AT.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(?:esta\s*)?(manha|manhã|tarde|meia-noite|meio-dia|noite)(?=\W|$)/i}innerExtract(e,t){let n=CT.default(e.refDate),i=e.createParsingComponents();switch(t[1].toLowerCase()){case"tarde":i.imply("meridiem",ii.Meridiem.PM),i.imply("hour",15);break;case"noite":i.imply("meridiem",ii.Meridiem.PM),i.imply("hour",22);break;case"manha":case"manh\xE3":i.imply("meridiem",ii.Meridiem.AM),i.imply("hour",6);break;case"meia-noite":xT.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"meio-dia":i.imply("meridiem",ii.Meridiem.AM),i.imply("hour",12);break}return i}};nn.default=Vd});var Jd=p(_e=>{"use strict";var xt=_e&&_e.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(_e,"__esModule",{value:!0});_e.createConfiguration=_e.createCasualConfiguration=_e.parseDate=_e.parse=_e.strict=_e.casual=void 0;var NT=hr(),Qd=Ot(),IT=xt(yr()),ST=xt(Nd()),FT=xt(Sd()),WT=xt(Wd()),LT=xt(Yd()),YT=xt(Hd()),UT=xt(Kd()),qT=xt(Zd());_e.casual=new Qd.Chrono(Xd());_e.strict=new Qd.Chrono(Ks(!0));function $T(r,e,t){return _e.casual.parse(r,e,t)}_e.parse=$T;function jT(r,e,t){return _e.casual.parseDate(r,e,t)}_e.parseDate=jT;function Xd(r=!0){let e=Ks(!1,r);return e.parsers.push(new UT.default),e.parsers.push(new qT.default),e}_e.createCasualConfiguration=Xd;function Ks(r=!0,e=!0){return NT.includeCommonConfiguration({parsers:[new IT.default(e),new ST.default,new FT.default,new YT.default],refiners:[new WT.default,new LT.default]},r)}_e.createConfiguration=Ks});var tf=p(sn=>{"use strict";var BT=sn&&sn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(sn,"__esModule",{value:!0});var GT=BT($t()),ef=class extends GT.default{patternBetween(){return/^\s*(tot|-)\s*$/i}};sn.default=ef});var nf=p(an=>{"use strict";var HT=an&&an.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(an,"__esModule",{value:!0});var zT=HT(dr()),rf=class extends zT.default{patternBetween(){return new RegExp("^\\s*(om|na|voor|in de|,|-)?\\s*$")}};an.default=rf});var af=p(ht=>{"use strict";var KT=ht&&ht.__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]}),VT=ht&&ht.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),ZT=ht&&ht.__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)&&KT(e,r,t);return VT(e,r),e};Object.defineProperty(ht,"__esModule",{value:!0});var QT=N(),si=ZT(Bt()),sf=class extends QT.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(nu|vandaag|morgen|morgend|gisteren)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),i=e.createParsingComponents();switch(n){case"nu":return si.now(e.refDate);case"vandaag":return si.today(e.refDate);case"morgen":case"morgend":return si.tomorrow(e.refDate);case"gisteren":return si.yesterday(e.refDate)}return i}};ht.default=sf});var uf=p(on=>{"use strict";var XT=on&&on.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(on,"__esModule",{value:!0});var ai=we(),JT=N(),eb=XT(ve()),tb=Ze(),rb=1,nb=2,of=class extends JT.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(deze)?\s*(namiddag|avond|middernacht|ochtend|middag|'s middags|'s avonds|'s ochtends)(?=\W|$)/i}innerExtract(e,t){let n=eb.default(e.refDate),i=e.createParsingComponents();switch(t[rb]==="deze"&&(i.assign("day",e.refDate.getDate()),i.assign("month",e.refDate.getMonth()+1),i.assign("year",e.refDate.getFullYear())),t[nb].toLowerCase()){case"namiddag":case"'s namiddags":i.imply("meridiem",ai.Meridiem.PM),i.imply("hour",15);break;case"avond":case"'s avonds'":i.imply("meridiem",ai.Meridiem.PM),i.imply("hour",20);break;case"middernacht":tb.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"ochtend":case"'s ochtends":i.imply("meridiem",ai.Meridiem.AM),i.imply("hour",6);break;case"middag":case"'s middags":i.imply("meridiem",ai.Meridiem.AM),i.imply("hour",12);break}return i}};on.default=of});var pt=p(F=>{"use strict";Object.defineProperty(F,"__esModule",{value:!0});F.parseTimeUnits=F.TIME_UNITS_PATTERN=F.parseYear=F.YEAR_PATTERN=F.parseOrdinalNumberPattern=F.ORDINAL_NUMBER_PATTERN=F.parseNumberPattern=F.NUMBER_PATTERN=F.TIME_UNIT_DICTIONARY=F.ORDINAL_WORD_DICTIONARY=F.INTEGER_WORD_DICTIONARY=F.MONTH_DICTIONARY=F.WEEKDAY_DICTIONARY=void 0;var oi=ae(),ib=Ie();F.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};F.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};F.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};F.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};F.TIME_UNIT_DICTIONARY={sec:"second",second:"second",seconden:"second",min:"minute",mins:"minute",minute:"minute",minuten:"minute",h:"hour",hr:"hour",hrs:"hour",uur:"hour",uren:"hour",dag:"d",dagen:"d",week:"week",weken:"week",maand:"month",maanden:"month",jaar:"year",jr:"year",jaren:"year"};F.NUMBER_PATTERN=`(?:${oi.matchAnyPattern(F.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|een?|halve?)`;function lf(r){let e=r.toLowerCase();return F.INTEGER_WORD_DICTIONARY[e]!==void 0?F.INTEGER_WORD_DICTIONARY[e]:e==="een"?1:e.match(/halve?/)?.5:parseFloat(e)}F.parseNumberPattern=lf;F.ORDINAL_NUMBER_PATTERN=`(?:${oi.matchAnyPattern(F.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:ste|de)?)`;function sb(r){let e=r.toLowerCase();return F.ORDINAL_WORD_DICTIONARY[e]!==void 0?F.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:ste|de)$/i,""),parseInt(e))}F.parseOrdinalNumberPattern=sb;F.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:voor Christus|na Christus)|[1-2][0-9]{3}|[5-9][0-9])";function ab(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 ib.findMostLikelyADYear(e)}F.parseYear=ab;var cf=`(${F.NUMBER_PATTERN})\\s{0,5}(${oi.matchAnyPattern(F.TIME_UNIT_DICTIONARY)})\\s{0,5}`,df=new RegExp(cf,"i");F.TIME_UNITS_PATTERN=oi.repeatedTimeunitPattern("(?:(?:binnen|in)\\s*)?",cf);function ob(r){let e={},t=r,n=df.exec(t);for(;n;)ub(e,n),t=t.substring(n[0].length),n=df.exec(t);return e}F.parseTimeUnits=ob;function ub(r,e){let t=lf(e[1]),n=F.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var pf=p(Vs=>{"use strict";Object.defineProperty(Vs,"__esModule",{value:!0});var ff=pt(),lb=He(),cb=N(),hf=class extends cb.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(?:binnen|in|binnen de|voor)\\s*("+ff.TIME_UNITS_PATTERN+")(?=\\W|$)","i")}innerExtract(e,t){let n=ff.parseTimeUnits(t[1]);return lb.ParsingComponents.createRelativeFromRefDate(e.refDate,n)}};Vs.default=hf});var gf=p(Zs=>{"use strict";Object.defineProperty(Zs,"__esModule",{value:!0});var mf=pt(),db=ae(),fb=N(),hb=pr(),pb=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:op\\s*?)?(?:(deze|vorige|volgende)\\s*(?:week\\s*)?)?(${db.matchAnyPattern(mf.WEEKDAY_DICTIONARY)})(?=\\W|$)`,"i"),mb=1,yb=2,gb=3,yf=class extends fb.AbstractParserWithWordBoundaryChecking{innerPattern(){return pb}innerExtract(e,t){let n=t[yb].toLowerCase(),i=mf.WEEKDAY_DICTIONARY[n],s=t[mb],a=t[gb],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o=="vorige"?u="last":o=="volgende"?u="next":o=="deze"&&(u="this");let l=hb.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Zs.default=yf});var Ef=p(Qs=>{"use strict";Object.defineProperty(Qs,"__esModule",{value:!0});var _b=Ie(),_f=pt(),ui=pt(),Tf=pt(),Tb=ae(),bb=N(),vb=new RegExp(`(?:on\\s*?)?(${ui.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:tot|\\-|\\\u2013|until|through|till|\\s)\\s*(${ui.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:of)?\\s*)(`+Tb.matchAnyPattern(_f.MONTH_DICTIONARY)+`)(?:(?:-|/|,?\\s*)(${Tf.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),wb=3,bf=1,vf=2,wf=4,Df=class extends bb.AbstractParserWithWordBoundaryChecking{innerPattern(){return vb}innerExtract(e,t){let n=_f.MONTH_DICTIONARY[t[wb].toLowerCase()],i=ui.parseOrdinalNumberPattern(t[bf]);if(i>31)return t.index=t.index+t[bf].length,null;let s=e.createParsingComponents({day:i,month:n});if(t[wf]){let u=Tf.parseYear(t[wf]);s.assign("year",u)}else{let u=_b.findYearClosestToRef(e.refDate,i,n);s.imply("year",u)}if(!t[vf])return s;let a=ui.parseOrdinalNumberPattern(t[vf]),o=e.createParsingResult(t.index,t[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",a),o}};Qs.default=Df});var Of=p(Xs=>{"use strict";Object.defineProperty(Xs,"__esModule",{value:!0});var kf=pt(),Db=Ie(),Eb=ae(),Mf=pt(),kb=N(),Mb=new RegExp(`(${Eb.matchAnyPattern(kf.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${Mf.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),Rb=1,Rf=2,Pf=class extends kb.AbstractParserWithWordBoundaryChecking{innerPattern(){return Mb}innerExtract(e,t){let n=e.createParsingComponents();n.imply("day",1);let i=t[Rb],s=kf.MONTH_DICTIONARY[i.toLowerCase()];if(n.assign("month",s),t[Rf]){let a=Mf.parseYear(t[Rf]);n.assign("year",a)}else{let a=Db.findYearClosestToRef(e.refDate,1,s);n.imply("year",a)}return n}};Xs.default=Pf});var xf=p(Js=>{"use strict";Object.defineProperty(Js,"__esModule",{value:!0});var Pb=N(),Ob=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),Ab=1,xb=2,Af=class extends Pb.AbstractParserWithWordBoundaryChecking{innerPattern(){return Ob}innerExtract(e,t){let n=parseInt(t[xb]),i=parseInt(t[Ab]);return e.createParsingComponents().imply("day",1).assign("month",i).assign("year",n)}};Js.default=Af});var Nf=p(ea=>{"use strict";Object.defineProperty(ea,"__esModule",{value:!0});var Cb=ar(),Cf=class extends Cb.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:om)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|om|\\?)\\s*"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}};ea.default=Cf});var Wf=p(ta=>{"use strict";Object.defineProperty(ta,"__esModule",{value:!0});var If=pt(),Nb=ae(),Ib=N(),Sb=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${Nb.matchAnyPattern(If.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),Fb=1,Wb=2,Sf=3,Lb=4,Ff=class extends Ib.AbstractParserWithWordBoundaryChecking{innerPattern(){return Sb}innerExtract(e,t){let n=t[Sf]?parseInt(t[Sf]):If.MONTH_DICTIONARY[t[Wb].toLowerCase()];if(n<1||n>12)return null;let i=parseInt(t[Fb]);return{day:parseInt(t[Lb]),month:n,year:i}}};ta.default=Ff});var Yf=p(un=>{"use strict";var Yb=un&&un.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(un,"__esModule",{value:!0});var Ub=N(),li=we(),ra=Ze(),qb=Yb(ve()),$b=1,jb=2,Lf=class extends Ub.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(gisteren|morgen|van)(ochtend|middag|namiddag|avond|nacht)(?=\W|$)/i}innerExtract(e,t){let n=t[$b].toLowerCase(),i=t[jb].toLowerCase(),s=e.createParsingComponents(),a=qb.default(e.refDate);switch(n){case"gisteren":ra.assignSimilarDate(s,a.add(-1,"day"));break;case"van":ra.assignSimilarDate(s,a);break;case"morgen":ra.assignTheNextDay(s,a);break}switch(i){case"ochtend":s.imply("meridiem",li.Meridiem.AM),s.imply("hour",6);break;case"middag":s.imply("meridiem",li.Meridiem.AM),s.imply("hour",12);break;case"namiddag":s.imply("meridiem",li.Meridiem.PM),s.imply("hour",15);break;case"avond":s.imply("meridiem",li.Meridiem.PM),s.imply("hour",20);break}return s}};un.default=Lf});var $f=p(Te=>{"use strict";var $e=Te&&Te.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Te,"__esModule",{value:!0});Te.createConfiguration=Te.createCasualConfiguration=Te.parseDate=Te.parse=Te.strict=Te.casual=void 0;var Bb=hr(),Uf=Ot(),Gb=$e(tf()),Hb=$e(nf()),zb=$e(af()),Kb=$e(uf()),Vb=$e(yr()),Zb=$e(pf()),Qb=$e(gf()),Xb=$e(Ef()),Jb=$e(Of()),ev=$e(xf()),tv=$e(Nf()),rv=$e(Wf()),nv=$e(Yf());Te.casual=new Uf.Chrono(qf());Te.strict=new Uf.Chrono(na(!0));function iv(r,e,t){return Te.casual.parse(r,e,t)}Te.parse=iv;function sv(r,e,t){return Te.casual.parseDate(r,e,t)}Te.parseDate=sv;function qf(r=!0){let e=na(!1,r);return e.parsers.unshift(new zb.default),e.parsers.unshift(new Kb.default),e.parsers.unshift(new nv.default),e}Te.createCasualConfiguration=qf;function na(r=!0,e=!0){return Bb.includeCommonConfiguration({parsers:[new Vb.default(e),new Xb.default,new Jb.default,new tv.default,new Zb.default,new ev.default,new Qb.default,new rv.default],refiners:[new Hb.default,new Gb.default]},r)}Te.createConfiguration=na});var we=p(Y=>{"use strict";var av=Y&&Y.__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]}),ov=Y&&Y.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),gr=Y&&Y.__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)&&av(e,r,t);return ov(e,r),e};Object.defineProperty(Y,"__esModule",{value:!0});Y.parseDate=Y.parse=Y.casual=Y.strict=Y.nl=Y.pt=Y.ja=Y.fr=Y.de=Y.Meridiem=Y.Chrono=Y.en=void 0;var ia=gr(Ts());Y.en=ia;var uv=Ot();Object.defineProperty(Y,"Chrono",{enumerable:!0,get:function(){return uv.Chrono}});var lv;(function(r){r[r.AM=0]="AM",r[r.PM=1]="PM"})(lv=Y.Meridiem||(Y.Meridiem={}));var cv=gr(Nc());Y.de=cv;var dv=gr(_d());Y.fr=dv;var fv=gr(Ad());Y.ja=fv;var hv=gr(Jd());Y.pt=hv;var pv=gr($f());Y.nl=pv;Y.strict=ia.strict;Y.casual=ia.casual;function mv(r,e,t){return Y.casual.parse(r,e,t)}Y.parse=mv;function yv(r,e,t){return Y.casual.parseDate(r,e,t)}Y.parseDate=yv});oh(exports,{default:()=>Na});var Jf=Ye(require("obsidian"));var Cn=Ye(require("obsidian"));var kv=new Error("timeout while waiting for mutex to become available"),Mv=new Error("mutex already locked"),lh=new Error("request for lock canceled"),to=function(r,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function o(d){try{l(n.next(d))}catch(c){a(c)}}function u(d){try{l(n.throw(d))}catch(c){a(c)}}function l(d){d.done?s(d.value):i(d.value).then(o,u)}l((n=n.apply(r,e||[])).next())})},ro=class{constructor(e,t=lh){if(this._maxConcurrency=e,this._cancelError=t,this._queue=[],this._waiters=[],e<=0)throw new Error("semaphore must be initialized to a positive value");this._value=e}acquire(){let e=this.isLocked(),t=new Promise((n,i)=>this._queue.push({resolve:n,reject:i}));return e||this._dispatch(),t}runExclusive(e){return to(this,void 0,void 0,function*(){let[t,n]=yield this.acquire();try{return yield e(t)}finally{n()}})}waitForUnlock(){return to(this,void 0,void 0,function*(){return this.isLocked()?new Promise(t=>this._waiters.push({resolve:t})):Promise.resolve()})}isLocked(){return this._value<=0}release(){if(this._maxConcurrency>1)throw new Error("this method is unavailable on semaphores with concurrency > 1; use the scoped release returned by acquire instead");if(this._currentReleaser){let e=this._currentReleaser;this._currentReleaser=void 0,e()}}cancel(){this._queue.forEach(e=>e.reject(this._cancelError)),this._queue=[]}_dispatch(){let e=this._queue.shift();if(!e)return;let t=!1;this._currentReleaser=()=>{t||(t=!0,this._value++,this._resolveWaiters(),this._dispatch())},e.resolve([this._value--,this._currentReleaser])}_resolveWaiters(){this._waiters.forEach(e=>e.resolve()),this._waiters=[]}},ch=function(r,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function o(d){try{l(n.next(d))}catch(c){a(c)}}function u(d){try{l(n.throw(d))}catch(c){a(c)}}function l(d){d.done?s(d.value):i(d.value).then(o,u)}l((n=n.apply(r,e||[])).next())})},Ei=class{constructor(e){this._semaphore=new ro(1,e)}acquire(){return ch(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.release()}cancel(){return this._semaphore.cancel()}};var lu=Ye(require("obsidian"));var no=Ye(require("obsidian"));var dh={globalFilter:"",removeGlobalFilter:!1,setDoneDate:!0},ki=Le({},dh),se=()=>Le({},ki),Qt=r=>(ki=Le(Le({},ki),r),se());var Mi,Ri,io=({metadataCache:r,vault:e})=>{Mi=r,Ri=e},kn=t=>te(void 0,[t],function*({originalTask:r,newTasks:e}){if(Ri===void 0||Mi===void 0){console.error("Tasks: cannot use File before initializing it.");return}Array.isArray(e)||(e=[e]),so({originalTask:r,newTasks:e,vault:Ri,metadataCache:Mi,previousTries:0})}),so=s=>te(void 0,[s],function*({originalTask:r,newTasks:e,vault:t,metadataCache:n,previousTries:i}){let a=()=>{if(i>10){console.error("Tasks: Too many retries. File update not possible ...");return}let b=Math.min(Math.pow(10,i),100);setTimeout(()=>{so({originalTask:r,newTasks:e,vault:t,metadataCache:n,previousTries:i+1})},b)},o=t.getAbstractFileByPath(r.path);if(!(o instanceof no.TFile))return console.warn(`Tasks: No file found for task ${r.description}. Retrying ...`),a();if(o.extension!=="md"){console.error("Tasks: Only supporting files with the .md file extension.");return}let u=n.getFileCache(o);if(u==null||u===null)return console.warn(`Tasks: No file cache found for file ${o.path}. Retrying ...`),a();let l=u.listItems;if(l===void 0||l.length===0)return console.warn(`Tasks: No list items found in file cache of ${o.path}. Retrying ...`),a();let c=(yield t.read(o)).split(` `),{globalFilter:f}=se(),h,m=0;for(let b of l){if(b.position.start.lineb.toFileLineString()),...c.slice(h.position.start.line+1)];yield t.modify(o,g.join(` `))});var wr=class{constructor(){this.hideTaskCount=!1;this.hideBacklinks=!1;this.hidePriority=!1;this.hideStartDate=!1;this.hideScheduledDate=!1;this.hideDoneDate=!1;this.hideDueDate=!1;this.hideRecurrenceRule=!1;this.hideEditButton=!1;this.shortMode=!1}};var Mn=["MO","TU","WE","TH","FR","SA","SU"],le=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(Mn.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=Mn[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 Z=function(r){return r!=null},Ue=function(r){return typeof r=="number"},Pi=function(r){return Mn.indexOf(r)>=0},be=Array.isArray,Be=function(r,e){e===void 0&&(e=r),arguments.length===1&&(e=r,r=0);for(var t=[],n=r;n>0,n.length>e?String(n):(e=e-n.length,e>t.length&&(t+=W(t,e/t.length)),t.slice(0,e)+String(n))}var oo=function(r,e,t){var n=r.split(e);return t?n.slice(0,t).concat([n.slice(t).join(e)]):n},ke=function(r,e){var t=r%e;return t*e<0?t+e:t},Rn=function(r,e){return{div:Math.floor(r/e),mod:ke(r,e)}},qe=function(r){return!Z(r)||r.length===0},oe=function(r){return!qe(r)},L=function(r,e){return oe(r)&&r.indexOf(e)!==-1};var _t;(function(r){r.MONTH_DAYS=[31,28,31,30,31,30,31,31,30,31,30,31],r.ONE_DAY=1e3*60*60*24,r.MAXYEAR=9999,r.ORDINAL_BASE=new Date(Date.UTC(1970,0,1)),r.PY_WEEKDAYS=[6,0,1,2,3,4,5],r.getYearDay=function(e){var t=new Date(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate());return Math.ceil((t.valueOf()-new Date(e.getUTCFullYear(),0,1).valueOf())/r.ONE_DAY)+1},r.isLeapYear=function(e){return e%4==0&&e%100!=0||e%400==0},r.isDate=function(e){return e instanceof Date},r.isValidDate=function(e){return r.isDate(e)&&!isNaN(e.getTime())},r.tzOffset=function(e){return e.getTimezoneOffset()*60*1e3},r.daysBetween=function(e,t){var n=e.getTime()-r.tzOffset(e),i=t.getTime()-r.tzOffset(t),s=n-i;return Math.round(s/r.ONE_DAY)},r.toOrdinal=function(e){return r.daysBetween(e,r.ORDINAL_BASE)},r.fromOrdinal=function(e){return new Date(r.ORDINAL_BASE.getTime()+e*r.ONE_DAY)},r.getMonthDays=function(e){var t=e.getUTCMonth();return t===1&&r.isLeapYear(e.getUTCFullYear())?29:r.MONTH_DAYS[t]},r.getWeekday=function(e){return r.PY_WEEKDAYS[e.getUTCDay()]},r.monthRange=function(e,t){var n=new Date(Date.UTC(e,t,1));return[r.getWeekday(n),r.getMonthDays(n)]},r.combine=function(e,t){return t=t||e,new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))},r.clone=function(e){var t=new Date(e.getTime());return t},r.cloneDates=function(e){for(var t=[],n=0;nthis.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}(),ot=fh;var Ao=Ye(Oo()),{__extends:Jt,__assign:xe,__rest:$v,__decorate:jv,__param:Bv,__metadata:Gv,__awaiter:Hv,__generator:zv,__exportStar:Kv,__createBinding:Vv,__values:Zv,__read:Qv,__spread:Xv,__spreadArrays:Wt,__await:Jv,__asyncGenerator:ew,__asyncDelegator:tw,__asyncValues:rw,__makeTemplateObject:nw,__importStar:iw,__importDefault:sw,__classPrivateFieldGet:aw,__classPrivateFieldSet:ow}=Ao.default;var hh=function(r){Jt(e,r);function e(t,n,i){var s=r.call(this,t,n)||this;return s.iterator=i,s}return e.prototype.add=function(t){return this.iterator(t,this._result.length)?(this._result.push(t),!0):!1},e}(ot),Ai=hh;var ph={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}},Lt=ph;var xo=function(r,e){return r.indexOf(e)!==-1},mh=function(r){return r.toString()},yh=function(r,e,t){return e+" "+t+", "+r},gh=function(){function r(e,t,n,i){if(t===void 0&&(t=mh),n===void 0&&(n=Lt),i===void 0&&(i=yh),this.text=[],this.language=n||Lt,this.gettext=t,this.dateFormatter=i,this.rrule=e,this.options=e.options,this.origOptions=e.origOptions,this.origOptions.bymonthday){var s=[].concat(this.options.bymonthday),a=[].concat(this.options.bynmonthday);s.sort(function(d,c){return d-c}),a.sort(function(d,c){return c-d}),this.bymonthday=s.concat(a),this.bymonthday.length||(this.bymonthday=null)}if(Z(this.origOptions.byweekday)){var o=be(this.origOptions.byweekday)?this.origOptions.byweekday:[this.origOptions.byweekday],u=String(o);this.byweekday={allWeeks:o.filter(function(d){return!d.n}),someWeeks:o.filter(function(d){return Boolean(d.n)}),isWeekdays:u.indexOf("MO")!==-1&&u.indexOf("TU")!==-1&&u.indexOf("WE")!==-1&&u.indexOf("TH")!==-1&&u.indexOf("FR")!==-1&&u.indexOf("SA")===-1&&u.indexOf("SU")===-1,isEveryDay:u.indexOf("MO")!==-1&&u.indexOf("TU")!==-1&&u.indexOf("WE")!==-1&&u.indexOf("TH")!==-1&&u.indexOf("FR")!==-1&&u.indexOf("SA")!==-1&&u.indexOf("SU")!==-1};var l=function(d,c){return d.weekday-c.weekday};this.byweekday.allWeeks.sort(l),this.byweekday.someWeeks.sort(l),this.byweekday.allWeeks.length||(this.byweekday.allWeeks=null),this.byweekday.someWeeks.length||(this.byweekday.someWeeks=null)}else this.byweekday=null}return r.isFullyConvertible=function(e){var t=!0;if(!(e.options.freq in r.IMPLEMENTED)||e.origOptions.until&&e.origOptions.count)return!1;for(var n in e.origOptions){if(xo(["dtstart","wkst","freq"],n))return!0;if(!xo(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[w.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,i=this.gettext;if(e===-1)return i("last");switch(n=Math.abs(e),n){case 1:case 21:case 31:t=n+i("st");break;case 2:case 22:t=n+i("nd");break;case 3:case 23:t=n+i("rd");break;default:t=n+i("th")}return e<0?t+" "+i("last"):t},r.prototype.monthtext=function(e){return this.language.monthNames[e-1]},r.prototype.weekdaytext=function(e){var t=Ue(e)?(e+1)%7:e.getJsWeekday();return(e.n?this.nth(e.n)+" ":"")+this.language.dayNames[t]},r.prototype.plural=function(e){return e%100!=1},r.prototype.add=function(e){return this.text.push(" "),this.text.push(e),this},r.prototype.list=function(e,t,n,i){i===void 0&&(i=","),be(e)||(e=[e]);var s=function(u,l,d){for(var c="",f=0;fe[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 Dr(r,e){e===void 0&&(e=Lt);var t={},n=new _h(e.tokens);if(!n.start(r))return null;return i(),t;function i(){n.expect("every");var f=n.acceptNumber();if(f&&(t.interval=parseInt(f[0],10)),n.isDone())throw new Error("Unexpected end");switch(n.symbol){case"day(s)":t.freq=w.DAILY,n.nextSymbol()&&(a(),c());break;case"weekday(s)":t.freq=w.WEEKLY,t.byweekday=[w.MO,w.TU,w.WE,w.TH,w.FR],n.nextSymbol(),c();break;case"week(s)":t.freq=w.WEEKLY,n.nextSymbol()&&(s(),c());break;case"hour(s)":t.freq=w.HOURLY,n.nextSymbol()&&(s(),c());break;case"minute(s)":t.freq=w.MINUTELY,n.nextSymbol()&&(s(),c());break;case"month(s)":t.freq=w.MONTHLY,n.nextSymbol()&&(s(),c());break;case"year(s)":t.freq=w.YEARLY,n.nextSymbol()&&(s(),c());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":t.freq=w.WEEKLY;var h=n.symbol.substr(0,2).toUpperCase();if(t.byweekday=[w[h]],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var m=u();if(!m)throw new Error("Unexpected symbol "+n.symbol+", expected weekday");t.byweekday.push(w[m]),n.nextSymbol()}d(),c();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=w.YEARLY,t.bymonth=[o()],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var g=o();if(!g)throw new Error("Unexpected symbol "+n.symbol+", expected month");t.bymonth.push(g),n.nextSymbol()}s(),c();break;default:throw new Error("Unknown symbol")}}function s(){var f=n.accept("on"),h=n.accept("the");if(!!(f||h))do{var m=l(),g=u(),b=o();if(m)g?(n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(w[g].nth(m))):(t.bymonthday||(t.bymonthday=[]),t.bymonthday.push(m),n.accept("day(s)"));else if(g)n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(w[g]);else if(n.symbol==="weekday(s)")n.nextSymbol(),t.byweekday||(t.byweekday=[w.MO,w.TU,w.WE,w.TH,w.FR]);else if(n.symbol==="week(s)"){n.nextSymbol();var O=n.acceptNumber();if(!O)throw new Error("Unexpected symbol "+n.symbol+", expected week number");for(t.byweekno=[parseInt(O[0],10)];n.accept("comma");){if(O=n.acceptNumber(),!O)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.byweekno.push(parseInt(O[0],10))}}else if(b)n.nextSymbol(),t.bymonth||(t.bymonth=[]),t.bymonth.push(b);else return}while(n.accept("comma")||n.accept("the")||n.accept("on"))}function a(){var f=n.accept("at");if(!!f)do{var h=n.acceptNumber();if(!h)throw new Error("Unexpected symbol "+n.symbol+", expected hour");for(t.byhour=[parseInt(h[0],10)];n.accept("comma");){if(h=n.acceptNumber(),!h)throw new Error("Unexpected symbol "+n.symbol+"; expected hour");t.byhour.push(parseInt(h[0],10))}}while(n.accept("comma")||n.accept("at"))}function o(){switch(n.symbol){case"january":return 1;case"february":return 2;case"march":return 3;case"april":return 4;case"may":return 5;case"june":return 6;case"july":return 7;case"august":return 8;case"september":return 9;case"october":return 10;case"november":return 11;case"december":return 12;default:return!1}}function u(){switch(n.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return n.symbol.substr(0,2).toUpperCase();default:return!1}}function l(){switch(n.symbol){case"last":return n.nextSymbol(),-1;case"first":return n.nextSymbol(),1;case"second":return n.nextSymbol(),n.accept("last")?-2:2;case"third":return n.nextSymbol(),n.accept("last")?-3:3;case"nth":var f=parseInt(n.value[1],10);if(f<-366||f>366)throw new Error("Nth out of range: "+f);return n.nextSymbol(),n.accept("last")?-f:f;default:return!1}}function d(){n.accept("on"),n.accept("the");var f=l();if(!!f)for(t.bymonthday=[f],n.nextSymbol();n.accept("comma");){if(f=l(),!f)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.bymonthday.push(f),n.nextSymbol()}}function c(){if(n.symbol==="until"){var f=Date.parse(n.text);if(!f)throw new Error("Cannot parse until date:"+n.text);t.until=new Date(f)}else n.accept("for")&&(t.count=parseInt(n.value[0],10),n.expect("number"))}}var I;(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"})(I||(I={}));function Er(r){return r12){var n=Math.floor(this.month/12),i=ke(this.month,12);this.month=i,this.year+=n,this.month===0&&(this.month=12,--this.year)}},e.prototype.addWeekly=function(t,n){n>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-n))+t*7:this.day+=-(this.getWeekday()-n)+t*7,this.fixDay()},e.prototype.addDaily=function(t){this.day+=t,this.fixDay()},e.prototype.addHours=function(t,n,i){for(n&&(this.hour+=Math.floor((23-this.hour)/t)*t);;){this.hour+=t;var s=Rn(this.hour,24),a=s.div,o=s.mod;if(a&&(this.hour=o,this.addDaily(a)),qe(i)||L(i,this.hour))break}},e.prototype.addMinutes=function(t,n,i,s){for(n&&(this.minute+=Math.floor((1439-(this.hour*60+this.minute))/t)*t);;){this.minute+=t;var a=Rn(this.minute,60),o=a.div,u=a.mod;if(o&&(this.minute=u,this.addHours(o,!1,i)),(qe(i)||L(i,this.hour))&&(qe(s)||L(s,this.minute)))break}},e.prototype.addSeconds=function(t,n,i,s,a){for(n&&(this.second+=Math.floor((86399-(this.hour*3600+this.minute*60+this.second))/t)*t);;){this.second+=t;var o=Rn(this.second,60),u=o.div,l=o.mod;if(u&&(this.second=l,this.addMinutes(u,!1,i,s)),(qe(i)||L(i,this.hour))&&(qe(s)||L(s,this.minute))&&(qe(a)||L(a,this.second)))break}},e.prototype.fixDay=function(){if(!(this.day<=28)){var t=_t.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>_t.MAXYEAR))return;t=_t.monthRange(this.year,this.month-1)[1]}}},e.prototype.add=function(t,n){var i=t.freq,s=t.interval,a=t.wkst,o=t.byhour,u=t.byminute,l=t.bysecond;switch(i){case I.YEARLY:return this.addYears(s);case I.MONTHLY:return this.addMonths(s);case I.WEEKLY:return this.addWeekly(s,a);case I.DAILY:return this.addDaily(s);case I.HOURLY:return this.addHours(s,n,o);case I.MINUTELY:return this.addMinutes(s,n,o,u);case I.SECONDLY:return this.addSeconds(s,n,o,u,l)}},e}(tr);function xi(r){for(var e=[],t=Object.keys(r),n=0,i=t;n=-366&&n<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}}if(!(Boolean(e.byweekno)||oe(e.byweekno)||oe(e.byyearday)||Boolean(e.bymonthday)||oe(e.bymonthday)||Z(e.byweekday)||Z(e.byeaster)))switch(e.freq){case w.YEARLY:e.bymonth||(e.bymonth=e.dtstart.getUTCMonth()+1),e.bymonthday=e.dtstart.getUTCDate();break;case w.MONTHLY:e.bymonthday=e.dtstart.getUTCDate();break;case w.WEEKLY:e.byweekday=[R.getWeekday(e.dtstart)];break}if(Z(e.bymonth)&&!be(e.bymonth)&&(e.bymonth=[e.bymonth]),Z(e.byyearday)&&!be(e.byyearday)&&Ue(e.byyearday)&&(e.byyearday=[e.byyearday]),!Z(e.bymonthday))e.bymonthday=[],e.bynmonthday=[];else if(be(e.bymonthday)){for(var i=[],s=[],t=0;t0?i.push(n):n<0&&s.push(n)}e.bymonthday=i,e.bynmonthday=s}else e.bymonthday<0?(e.bynmonthday=[e.bymonthday],e.bymonthday=[]):(e.bynmonthday=[],e.bymonthday=[e.bymonthday]);if(Z(e.byweekno)&&!be(e.byweekno)&&(e.byweekno=[e.byweekno]),!Z(e.byweekday))e.bynweekday=null;else if(Ue(e.byweekday))e.byweekday=[e.byweekday],e.bynweekday=null;else if(Pi(e.byweekday))e.byweekday=[le.fromStr(e.byweekday).weekday],e.bynweekday=null;else if(e.byweekday instanceof le)!e.byweekday.n||e.freq>w.MONTHLY?(e.byweekday=[e.byweekday.weekday],e.bynweekday=null):(e.bynweekday=[[e.byweekday.weekday,e.byweekday.n]],e.byweekday=null);else{for(var a=[],o=[],t=0;tw.MONTHLY?a.push(u.weekday):o.push([u.weekday,u.n])}e.byweekday=oe(a)?a:null,e.bynweekday=oe(o)?o:null}return Z(e.byhour)?Ue(e.byhour)&&(e.byhour=[e.byhour]):e.byhour=e.freq=4?(d=0,l=o.yearlen+ke(a-e.wkst,7)):l=n-d;for(var c=Math.floor(l/7),f=ke(l,7),h=Math.floor(c+f/4),m=0;m0&&g<=h){var b=void 0;g>1?(b=d+(g-1)*7,d!==u&&(b-=7-u)):b=d;for(var O=0;O<7&&(o.wnomask[b]=1,b++,o.wdaymask[b]!==e.wkst);O++);}}if(L(e.byweekno,1)){var b=d+h*7;if(d!==u&&(b-=7-u),b=4?(j=0,re=V+ke(J-e.wkst,7)):re=n-d,K=Math.floor(52+ke(re,7)/4)}if(L(e.byweekno,K))for(var b=0;bs)return ut(r);if(K>=t){var J=tu(K,e);if(!r.accept(J)||o&&(--o,!o))return ut(r)}}else for(var O=h;Os)return ut(r);if(K>=t){var J=tu(K,e);if(!r.accept(J)||o&&(--o,!o))return ut(r)}}}if(e.interval===0||(u.add(e,g),u.year>R.MAXYEAR))return ut(r);Er(n)||(d=l.gettimeset(n)(u.hour,u.minute,u.second,0)),l.rebuild(u.year,u.month)}}function Ah(r,e,t){var n=t.bymonth,i=t.byweekno,s=t.byweekday,a=t.byeaster,o=t.bymonthday,u=t.bynmonthday,l=t.byyearday;return oe(n)&&!L(n,r.mmask[e])||oe(i)&&!r.wnomask[e]||oe(s)&&!L(s,r.wdaymask[e])||oe(r.nwdaymask)&&!r.nwdaymask[e]||a!==null&&!L(r.eastermask,e)||(oe(o)||oe(u))&&!L(o,r.mdaymask[e])&&!L(u,r.nmdaymask[e])||oe(l)&&(e=r.yearlen&&!L(l,e+1-r.yearlen)&&!L(l,-r.nextyearlen+e-r.yearlen))}function tu(r,e){return new Yt(r,e.tzid).rezonedDate()}function ut(r){return r.getValue()}function xh(r,e,t,n,i){for(var s=!1,a=e;a=w.HOURLY&&oe(i)&&!L(i,e.hour)||n>=w.MINUTELY&&oe(s)&&!L(s,e.minute)||n>=w.SECONDLY&&oe(a)&&!L(a,e.second)?[]:r.gettimeset(n)(e.hour,e.minute,e.second,e.millisecond)}var Ge={MO:new le(0),TU:new le(1),WE:new le(2),TH:new le(3),FR:new le(4),SA:new le(5),SU:new le(6)},kr={freq:I.YEARLY,dtstart:null,interval:1,wkst:Ge.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},Lo=Object.keys(kr),w=function(){function r(e,t){e===void 0&&(e={}),t===void 0&&(t=!1),this._cache=t?null:new qo,this.origOptions=xi(e);var n=Fo(e).parsedOptions;this.options=n}return r.parseText=function(e,t){return Dr(e,t)},r.fromText=function(e,t){return Co(e,t)},r.fromString=function(e){return new r(r.parseString(e)||void 0)},r.prototype._iter=function(e){return An(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 Ai("all",{},e));var t=this._cacheGet("all");return t===!1&&(t=this._iter(new ot("all",{})),this._cacheAdd("all",t)),t},r.prototype.between=function(e,t,n,i){if(n===void 0&&(n=!1),!R.isValidDate(e)||!R.isValidDate(t))throw new Error("Invalid date passed in to RRule.between");var s={before:t,after:e,inc:n};if(i)return this._iter(new Ai("between",s,i));var a=this._cacheGet("between",s);return a===!1&&(a=this._iter(new ot("between",s)),this._cacheAdd("between",a,s)),a},r.prototype.before=function(e,t){if(t===void 0&&(t=!1),!R.isValidDate(e))throw new Error("Invalid date passed in to RRule.before");var n={dt:e,inc:t},i=this._cacheGet("before",n);return i===!1&&(i=this._iter(new ot("before",n)),this._cacheAdd("before",i,n)),i},r.prototype.after=function(e,t){if(t===void 0&&(t=!1),!R.isValidDate(e))throw new Error("Invalid date passed in to RRule.after");var n={dt:e,inc:t},i=this._cacheGet("after",n);return i===!1&&(i=this._iter(new ot("after",n)),this._cacheAdd("after",i,n)),i},r.prototype.count=function(){return this.all().length},r.prototype.toString=function(){return Pr(this.origOptions)},r.prototype.toText=function(e,t,n){return No(this,e,t,n)},r.prototype.isFullyConvertibleToText=function(){return Io(this)},r.prototype.clone=function(){return new r(this.origOptions)},r.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],r.YEARLY=I.YEARLY,r.MONTHLY=I.MONTHLY,r.WEEKLY=I.WEEKLY,r.DAILY=I.DAILY,r.HOURLY=I.HOURLY,r.MINUTELY=I.MINUTELY,r.SECONDLY=I.SECONDLY,r.MO=Ge.MO,r.TU=Ge.TU,r.WE=Ge.WE,r.TH=Ge.TH,r.FR=Ge.FR,r.SA=Ge.SA,r.SU=Ge.SU,r.parseString=Mr,r.optionsToString=Pr,r}();function ru(r,e,t,n,i,s){var a={},o=r.accept;function u(f,h){t.forEach(function(m){m.between(f,h,!0).forEach(function(g){a[Number(g)]=!0})})}i.forEach(function(f){var h=new Yt(f,s).rezonedDate();a[Number(h)]=!0}),r.accept=function(f){var h=Number(f);return isNaN(h)?o.call(this,f):!a[h]&&(u(new Date(h-1),new Date(h+1)),!a[h])?(a[h]=!0,o.call(this,f)):!0},r.method==="between"&&(u(r.args.after,r.args.before),r.accept=function(f){var h=Number(f);return a[h]?!0:(a[h]=!0,o.call(this,f))});for(var l=0;l1||i.length||s.length||a.length){var d=new Ii(l);return d.dtstart(o),d.tzid(u||void 0),n.forEach(function(f){d.rrule(new w(Ni(f,o,u),l))}),i.forEach(function(f){d.rdate(f)}),s.forEach(function(f){d.exrule(new w(Ni(f,o,u),l))}),a.forEach(function(f){d.exdate(f)}),e.compatible&&e.dtstart&&d.rdate(o),d}var c=n[0]||{};return new w(Ni(c,c.dtstart||e.dtstart||o,c.tzid||e.tzid||u),l)}function xn(r,e){return e===void 0&&(e={}),Ih(r,Sh(e))}function Ni(r,e,t){return xe(xe({},r),{dtstart:e,tzid:t})}function Sh(r){var e=[],t=Object.keys(r),n=Object.keys(nu);if(t.forEach(function(i){L(n,i)||e.push(i)}),e.length)throw new Error("Invalid options: "+e.join(", "));return xe(xe({},nu),r)}function Fh(r){if(r.indexOf(":")===-1)return{name:"RRULE",value:r};var e=oo(r,":",1),t=e[0],n=e[1];return{name:t,value:n}}function Wh(r){var e=Fh(r),t=e.name,n=e.value,i=t.split(";");if(!i)throw new Error("empty property name");return{name:i[0].toUpperCase(),parms:i.slice(1),value:n}}function Lh(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;n0&&i[0]===" "?(t[n-1]+=i.slice(1),t.splice(n,1)):n+=1:t.splice(n,1)}return t}function Yh(r){r.forEach(function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)})}function iu(r,e){return Yh(e),r.split(",").map(function(t){return R.untilStringToDate(t)})}function su(r){var e=this;return function(t){if(t!==void 0&&(e["_"+r]=t),e["_"+r]!==void 0)return e["_"+r];for(var n=0;n=7?i=1:n>=-14?i=(n+14)*.8/21+.2:i=.2,t+=i*lt.dueCoefficient}switch(e.scheduledDate!==null&&window.moment().isSameOrAfter(e.scheduledDate)&&(t+=1*lt.scheduledCoefficient),e.startDate!==null&&window.moment().isBefore(e.startDate)&&(t+=1*lt.startedCoefficient),e.priority){case"1":t+=1*lt.priorityCoefficient;break;case"2":t+=.65*lt.priorityCoefficient;break;case"3":t+=.325*lt.priorityCoefficient;break}return t}},wt=lt;wt.dueCoefficient=12,wt.scheduledCoefficient=5,wt.startedCoefficient=-3,wt.priorityCoefficient=6,wt.milliSecondsPerDay=1e3*60*60*24;var ue;(function(t){t.Todo="Todo",t.Done="Done"})(ue||(ue={}));var X;(function(i){i.High="1",i.Medium="2",i.None="3",i.Low="4"})(X||(X={}));var B=class{constructor({status:e,description:t,path:n,indentation:i,sectionStart:s,sectionIndex:a,originalStatusCharacter:o,precedingHeader:u,priority:l,startDate:d,scheduledDate:c,dueDate:f,doneDate:h,recurrence:m,blockLink:g,tags:b}){this._urgency=null;this.status=e,this.description=t,this.path=n,this.indentation=i,this.sectionStart=s,this.sectionIndex=a,this.originalStatusCharacter=o,this.precedingHeader=u,this.tags=b,this.priority=l,this.startDate=d,this.scheduledDate=c,this.dueDate=f,this.doneDate=h,this.recurrence=m,this.blockLink=g}static fromLine({line:e,path:t,sectionStart:n,sectionIndex:i,precedingHeader:s}){let a=e.match(B.taskRegex);if(a===null)return null;let o=a[3].trim(),{globalFilter:u}=se();if(!o.includes(u))return null;let l=o,d=a[1],c=a[2].toLowerCase(),f;switch(c){case" ":f=ue.Todo;break;default:f=ue.Done}let h=l.match(this.blockLinkRegex),m=h!==null?h[0]:"";m!==""&&(l=l.replace(this.blockLinkRegex,"").trim());let g,b=X.None,O=null,K=null,J=null,j=null,V=null,re=[],x=7,M=0;do{g=!1;let D=l.match(B.priorityRegex);if(D!==null){switch(D[1]){case"\u{1F53D}":b=X.Low;break;case"\u{1F53C}":b=X.Medium;break;case"\u23EB":b=X.High;break}l=l.replace(B.priorityRegex,"").trim(),g=!0}let v=l.match(B.doneDateRegex);v!==null&&(j=window.moment(v[1],B.dateFormat),l=l.replace(B.doneDateRegex,"").trim(),g=!0);let y=l.match(B.dueDateRegex);y!==null&&(J=window.moment(y[1],B.dateFormat),l=l.replace(B.dueDateRegex,"").trim(),g=!0);let E=l.match(B.scheduledDateRegex);E!==null&&(K=window.moment(E[1],B.dateFormat),l=l.replace(B.scheduledDateRegex,"").trim(),g=!0);let T=l.match(B.startDateRegex);T!==null&&(O=window.moment(T[1],B.dateFormat),l=l.replace(B.startDateRegex,"").trim(),g=!0);let k=l.match(B.recurrenceRegex);k!==null&&(V=vt.fromText({recurrenceRuleText:k[1].trim(),startDate:O,scheduledDate:K,dueDate:J}),l=l.replace(B.recurrenceRegex,"").trim(),g=!0),M++}while(g&&M<=x);let ne=l.match(this.hashTags);return ne!==null&&(re=ne.filter(D=>D!==u).map(D=>D.trim())),new B({status:f,description:l,path:t,indentation:d,sectionStart:n,sectionIndex:i,originalStatusCharacter:c,precedingHeader:s,priority:b,startDate:O,scheduledDate:K,dueDate:J,doneDate:j,recurrence:V,blockLink:m,tags:re})}toLi(s){return te(this,arguments,function*({parentUlElement:e,listIndex:t,layoutOptions:n,isFilenameUnique:i}){let a=e.createEl("li");a.addClasses(["task-list-item","plugin-tasks-list-item"]);let o=this.toString(n),{globalFilter:u,removeGlobalFilter:l}=se();l&&(o=o.replace(u,"").trim());let d=a.createSpan();d.addClass("tasks-list-text"),yield lu.MarkdownRenderer.renderMarkdown(o,d,this.path,null);let c=d.querySelector("blockquote"),f=c!=null?c:d,h=f.querySelector("p");if(h!==null){for(;h.firstChild;)f.insertBefore(h.firstChild,h);h.remove()}d.findAll("p").forEach(g=>{g.hasChildNodes()||g.remove()}),d.findAll(".footnotes").forEach(g=>{g.remove()});let m=a.createEl("input");return m.addClass("task-list-item-checkbox"),m.type="checkbox",this.status!==ue.Todo&&(m.checked=!0,a.addClass("is-checked")),m.onClickEvent(g=>{g.preventDefault(),g.stopPropagation(),m.disabled=!0;let b=this.toggle();kn({originalTask:this,newTasks:b})}),a.prepend(m),a.setAttr("data-task",this.originalStatusCharacter.trim()),a.setAttr("data-line",t),m.setAttr("data-line",t),(n==null?void 0:n.shortMode)&&this.addTooltip({element:d,isFilenameUnique:i}),a})}toString(e){var i;e=e!=null?e:new wr;let t=this.description;if(!e.hidePriority){let s="";this.priority===X.High?s=" \u23EB":this.priority===X.Medium?s=" \u{1F53C}":this.priority===X.Low&&(s=" \u{1F53D}"),t+=s}return!e.hideRecurrenceRule&&this.recurrence&&(t+=e.shortMode?" \u{1F501}":` \u{1F501} ${this.recurrence.toText()}`),!e.hideStartDate&&this.startDate&&(t+=e.shortMode?" \u{1F6EB}":` \u{1F6EB} ${this.startDate.format(B.dateFormat)}`),!e.hideScheduledDate&&this.scheduledDate&&(t+=e.shortMode?" \u23F3":` \u23F3 ${this.scheduledDate.format(B.dateFormat)}`),!e.hideDueDate&&this.dueDate&&(t+=e.shortMode?" \u{1F4C5}":` \u{1F4C5} ${this.dueDate.format(B.dateFormat)}`),!e.hideDoneDate&&this.doneDate&&(t+=e.shortMode?" \u2705":` \u2705 ${this.doneDate.format(B.dateFormat)}`),t+=(i=this.blockLink)!=null?i:"",t}toFileLineString(){return`${this.indentation}- [${this.originalStatusCharacter}] ${this.toString()}`}toggle(){let e=this.status===ue.Todo?ue.Done:ue.Todo,t=null,n=null;if(e!==ue.Todo){let{setDoneDate:a}=se();a&&(t=window.moment()),this.recurrence!==null&&(n=this.recurrence.next())}let i=new B(St(Le({},this),{status:e,doneDate:t,originalStatusCharacter:e===ue.Done?"x":" "})),s=[];if(n!==null){let a=new B(St(Le(Le({},this),n),{blockLink:""}));s.push(a)}return s.push(i),s}get urgency(){return this._urgency===null&&(this._urgency=wt.calculate(this)),this._urgency}get filename(){let e=this.path.match(/([^/]+)\.md$/);return e!==null?e[1]:null}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)}addTooltip({element:e,isFilenameUnique:t}){e.addEventListener("mouseenter",()=>{let n=e.createDiv();n.addClasses(["tooltip","mod-right"]),this.recurrence&&n.createDiv().setText(`\u{1F501} ${this.recurrence.toText()}`),this.startDate&&n.createDiv().setText(B.toTooltipDate({signifier:"\u{1F6EB}",date:this.startDate})),this.scheduledDate&&n.createDiv().setText(B.toTooltipDate({signifier:"\u23F3",date:this.scheduledDate})),this.dueDate&&n.createDiv().setText(B.toTooltipDate({signifier:"\u{1F4C5}",date:this.dueDate})),this.doneDate&&n.createDiv().setText(B.toTooltipDate({signifier:"\u2705",date:this.doneDate}));let i=this.getLinkText({isFilenameUnique:t});i&&n.createDiv().setText(`\u{1F517} ${i}`),e.addEventListener("mouseleave",()=>{n.remove()})})}static toTooltipDate({signifier:e,date:t}){return`${e} ${t.format(B.dateFormat)} (${t.from(window.moment().startOf("day"))})`}},H=B;H.dateFormat="YYYY-MM-DD",H.taskRegex=/^([\s\t]*)[-*] +\[(.)\] *(.*)/u,H.blockLinkRegex=/ \^[a-zA-Z0-9-]+$/u,H.priorityRegex=/([⏫🔼🔽])$/u,H.startDateRegex=/🛫 ?(\d{4}-\d{2}-\d{2})$/u,H.scheduledDateRegex=/[⏳⌛] ?(\d{4}-\d{2}-\d{2})$/u,H.dueDateRegex=/[📅📆🗓] ?(\d{4}-\d{2}-\d{2})$/u,H.doneDateRegex=/✅ ?(\d{4}-\d{2}-\d{2})$/u,H.recurrenceRegex=/🔁 ?([a-zA-Z0-9, !]+)$/iu,H.hashTags=/(^|\s)#[^ !@#$%^&*(),.?":{}|<>]*/g;var Ut;(function(n){n.Cold="Cold",n.Initializing="Initializing",n.Warm="Warm"})(Ut||(Ut={}));var Si=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 Ei,this.state=Ut.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",()=>te(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 e=this.vault.on("create",i=>{i instanceof Cn.TFile&&this.tasksMutex.runExclusive(()=>{this.indexFile(i)})});this.vaultEventReferences.push(e);let t=this.vault.on("delete",i=>{i instanceof Cn.TFile&&this.tasksMutex.runExclusive(()=>{this.tasks=this.tasks.filter(s=>s.path!==i.path),this.notifySubscribers()})});this.vaultEventReferences.push(t);let n=this.vault.on("rename",(i,s)=>{i instanceof Cn.TFile&&this.tasksMutex.runExclusive(()=>{this.tasks=this.tasks.map(a=>a.path===s?new H(St(Le({},a),{path:i.path})):a),this.notifySubscribers()})});this.vaultEventReferences.push(n)}subscribeToEvents(){let e=this.events.onRequestCacheUpdate(t=>{t({tasks:this.tasks,state:this.state})});this.eventsEventReferences.push(e)}loadVault(){return this.tasksMutex.runExclusive(()=>te(this,null,function*(){this.state=Ut.Initializing,yield Promise.all(this.vault.getMarkdownFiles().map(e=>this.indexFile(e))),this.state=Ut.Warm,this.notifySubscribers()}))}indexFile(e){return te(this,null,function*(){let t=this.metadataCache.getFileCache(e);if(t==null)return;let n=t.listItems;n===void 0&&(n=[]);let s=(yield this.vault.cachedRead(e)).split(` `);this.tasks=this.tasks.filter(u=>u.path!==e.path);let a=null,o=0;for(let u of n)if(u.task!==void 0){if((a===null||a.position.end.line=e)return n;return null}getPrecedingHeader({lineNumberTask:e,sections:t,fileLines:n}){if(t===void 0)return null;let i;for(let l of t)if(l.type==="heading"){if(l.position.start.line>e)break;i=l}if(i===void 0)return null;let s=i.position.start.line,a=n[s],o=/^#+ +(.*)/u,u=a.match(o);return u===null?null:u[1]}};var aa=Ye(require("obsidian"));var Gf=Ye(require("obsidian"));function rr(){}function Fi(r){return r()}function cu(){return Object.create(null)}function qt(r){r.forEach(Fi)}function du(r){return typeof r=="function"}function fu(r,e){return r!=r?e==e:r!==e||r&&typeof r=="object"||typeof r=="function"}function hu(r){return Object.keys(r).length===0}var L1=new Set;var pu=!1;function Uh(){pu=!0}function qh(){pu=!1}function _(r,e){r.appendChild(e)}function Wi(r,e,t){r.insertBefore(e,t||null)}function Nn(r){r.parentNode.removeChild(r)}function A(r){return document.createElement(r)}function $h(r){return document.createElementNS("http://www.w3.org/2000/svg",r)}function ct(r){return document.createTextNode(r)}function Q(){return ct(" ")}function Dt(r,e,t,n){return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}function mu(r){return function(e){return e.preventDefault(),r.call(this,e)}}function S(r,e,t){t==null?r.removeAttribute(e):r.getAttribute(e)!==t&&r.setAttribute(e,t)}function jh(r){return Array.from(r.childNodes)}function yu(r,e){e=""+e,r.wholeText!==e&&(r.data=e)}function Ve(r,e){r.value=e==null?"":e}function Li(r,e){for(let t=0;t{let u=s.map(Fi).filter(du);a?a.push(...u):qt(u),r.$$.on_mount=[]}),o.forEach(Cr)}function bu(r,e){let t=r.$$;t.fragment!==null&&(qt(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function Qh(r,e){r.$$.dirty[0]===-1&&(xr.push(r),Hh(),r.$$.dirty.fill(0)),r.$$.dirty[e/31|0]|=1<{let m=h.length?h[0]:f;return l.ctx&&i(l.ctx[c],l.ctx[c]=m)&&(!l.skip_bound&&l.bound[c]&&l.bound[c](m),d&&Qh(r,c)),f}):[],l.update(),d=!0,qt(l.before_update),l.fragment=n?n(l.ctx):!1,e.target){if(e.hydrate){Uh();let c=jh(e.target);l.fragment&&l.fragment.l(c),c.forEach(Nn)}else l.fragment&&l.fragment.c();e.intro&&Vh(r.$$.fragment),Zh(r,e.target,e.anchor,e.customElement),qh(),Tu()}Ar(u)}var Xh;typeof HTMLElement=="function"&&(Xh=class extends HTMLElement{constructor(){super();this.attachShadow({mode:"open"})}connectedCallback(){let{on_mount:r}=this.$$;this.$$.on_disconnect=r.map(Fi).filter(du);for(let e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(r,e,t){this[r]=t}disconnectedCallback(){qt(this.$$.on_disconnect)}$destroy(){bu(this,1),this.$destroy=rr}$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&&!hu(r)&&(this.$$.skip_bound=!0,this.$$set(r),this.$$.skip_bound=!1)}});var $i=class{$destroy(){bu(this,1),this.$destroy=rr}$on(e,t){let n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{let i=n.indexOf(t);i!==-1&&n.splice(i,1)}}$set(e){this.$$set&&!hu(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}};var ln=Ye(we());var gv={td:"today",tm:"tomorrow",yd:"yesterday",tw:"this week",nw:"next week",weekend:"sat",we:"sat"};function ci(r){for(let[e,t]of Object.entries(gv))r=r.replace(RegExp(`\\b${e}\\s`,"i"),t);return r}function _v(r){let e,t,n,i,s,a,o,u,l,d,c,f,h,m,g,b,O,K,J,j,V,re,x,M,ne,Ne,D,v,y,E,T,k,P,G,ee,q,fe,Fe,je,tt,yt,Oe,he,Ke,We,Nt,mn,Ia,yn,Sa,gt,gn,Fa,at,Wa,_n,La,Tn,Ya,Ua,qa,Vt,Zt,$a,It,bn,ja,bi,vn=r[0].status+"",vi,Ba,wn,Ga,Dn,Ha,za,Ka,wi,Va,En,Di,Za;return{c(){e=A("div"),t=A("form"),n=A("div"),i=A("label"),i.textContent="Description",s=Q(),a=A("input"),o=Q(),u=A("hr"),l=Q(),d=A("div"),c=A("label"),c.textContent="Priority",f=Q(),h=A("select"),m=A("option"),m.textContent="None",g=A("option"),g.textContent="\u23EB High",b=A("option"),b.textContent="\u{1F53C} Medium",O=A("option"),O.textContent="\u{1F53D} Low",K=Q(),J=A("hr"),j=Q(),V=A("div"),re=A("label"),re.textContent="Recurrence",x=Q(),M=A("input"),ne=Q(),Ne=A("code"),D=ct("\u{1F501} "),v=new nr(!1),y=Q(),E=A("hr"),T=Q(),k=A("div"),P=A("div"),G=A("label"),G.textContent="Due",ee=Q(),q=A("input"),fe=Q(),Fe=A("code"),je=ct("\u{1F4C5} "),tt=new nr(!1),yt=Q(),Oe=A("div"),he=A("label"),he.textContent="Scheduled",Ke=Q(),We=A("input"),Nt=Q(),mn=A("code"),Ia=ct("\u23F3 "),yn=new nr(!1),Sa=Q(),gt=A("div"),gn=A("label"),gn.textContent="Start",Fa=Q(),at=A("input"),Wa=Q(),_n=A("code"),La=ct("\u{1F6EB} "),Tn=new nr(!1),Ya=Q(),Ua=A("hr"),qa=Q(),Vt=A("div"),Zt=A("div"),$a=ct(`Status: `),It=A("input"),ja=Q(),bi=A("code"),vi=ct(vn),Ba=Q(),wn=A("div"),Ga=ct(`Done on: `),Dn=A("code"),Ha=Q(),za=A("hr"),Ka=Q(),wi=A("div"),Va=Q(),En=A("div"),En.innerHTML='',S(i,"for","description"),S(a,"id","description"),S(a,"type","text"),S(a,"class","tasks-modal-description"),S(a,"placeholder","Take out the trash"),S(n,"class","tasks-modal-section"),S(c,"for","priority"),m.__value="none",m.value=m.__value,g.__value="high",g.value=g.__value,b.__value="medium",b.value=b.__value,O.__value="low",O.value=O.__value,S(h,"id","priority"),S(h,"class","dropdown"),r[0].priority===void 0&&Cr(()=>r[14].call(h)),S(d,"class","tasks-modal-section"),S(re,"for","recurrence"),S(M,"id","description"),S(M,"type","text"),S(M,"placeholder","Try 'every 2 weeks on Thursday'."),v.a=null,S(V,"class","tasks-modal-section"),S(G,"for","due"),S(q,"id","due"),S(q,"type","text"),S(q,"placeholder",sa),tt.a=null,S(P,"class","tasks-modal-date"),S(he,"for","scheduled"),S(We,"id","scheduled"),S(We,"type","text"),S(We,"placeholder",sa),yn.a=null,S(Oe,"class","tasks-modal-date"),S(gn,"for","start"),S(at,"id","start"),S(at,"type","text"),S(at,"placeholder",sa),Tn.a=null,S(gt,"class","tasks-modal-date"),S(k,"class","tasks-modal-section"),S(It,"type","checkbox"),S(It,"class","task-list-item-checkbox tasks-modal-checkbox"),It.checked=bn=r[0].status===ue.Done,It.disabled=!0,S(Vt,"class","tasks-modal-section"),S(wi,"class","tasks-modal-section"),S(En,"class","tasks-modal-section"),S(e,"class","tasks-modal")},m(ie,Ae){Wi(ie,e,Ae),_(e,t),_(t,n),_(n,i),_(n,s),_(n,a),Ve(a,r[0].description),r[13](a),_(t,o),_(t,u),_(t,l),_(t,d),_(d,c),_(d,f),_(d,h),_(h,m),_(h,g),_(h,b),_(h,O),Li(h,r[0].priority),_(t,K),_(t,J),_(t,j),_(t,V),_(V,re),_(V,x),_(V,M),Ve(M,r[0].recurrenceRule),_(V,ne),_(V,Ne),_(Ne,D),v.m(r[5],Ne),_(t,y),_(t,E),_(t,T),_(t,k),_(k,P),_(P,G),_(P,ee),_(P,q),Ve(q,r[0].dueDate),_(P,fe),_(P,Fe),_(Fe,je),tt.m(r[4],Fe),_(k,yt),_(k,Oe),_(Oe,he),_(Oe,Ke),_(Oe,We),Ve(We,r[0].scheduledDate),_(Oe,Nt),_(Oe,mn),_(mn,Ia),yn.m(r[3],mn),_(k,Sa),_(k,gt),_(gt,gn),_(gt,Fa),_(gt,at),Ve(at,r[0].startDate),_(gt,Wa),_(gt,_n),_(_n,La),Tn.m(r[2],_n),_(t,Ya),_(t,Ua),_(t,qa),_(t,Vt),_(Vt,Zt),_(Zt,$a),_(Zt,It),_(Zt,ja),_(Zt,bi),_(bi,vi),_(Vt,Ba),_(Vt,wn),_(wn,Ga),_(wn,Dn),Dn.innerHTML=r[6],_(t,Ha),_(t,za),_(t,Ka),_(t,wi),_(t,Va),_(t,En),Di||(Za=[Dt(a,"input",r[12]),Dt(h,"change",r[14]),Dt(M,"input",r[15]),Dt(q,"input",r[16]),Dt(We,"input",r[17]),Dt(at,"input",r[18]),Dt(t,"submit",mu(r[7]))],Di=!0)},p(ie,[Ae]){Ae&1&&a.value!==ie[0].description&&Ve(a,ie[0].description),Ae&1&&Li(h,ie[0].priority),Ae&1&&M.value!==ie[0].recurrenceRule&&Ve(M,ie[0].recurrenceRule),Ae&32&&v.p(ie[5]),Ae&1&&q.value!==ie[0].dueDate&&Ve(q,ie[0].dueDate),Ae&16&&tt.p(ie[4]),Ae&1&&We.value!==ie[0].scheduledDate&&Ve(We,ie[0].scheduledDate),Ae&8&&yn.p(ie[3]),Ae&1&&at.value!==ie[0].startDate&&Ve(at,ie[0].startDate),Ae&4&&Tn.p(ie[2]),Ae&1&&bn!==(bn=ie[0].status===ue.Done)&&(It.checked=bn),Ae&1&&vn!==(vn=ie[0].status+"")&&yu(vi,vn),Ae&64&&(Dn.innerHTML=ie[6])},i:rr,o:rr,d(ie){ie&&Nn(e),r[13](null),Di=!1,qt(Za)}}}var sa="Try 'Monday' or 'tomorrow', or [td|tm|yd|tw|nw|we] then space.";function Tv(r,e,t){var n,i;let{task:s}=e,{onSubmit:a}=e,o,u={description:"",status:ue.Todo,priority:"none",recurrenceRule:"",startDate:"",scheduledDate:"",dueDate:"",doneDate:""},l="",d="",c="",f="",h="";function m(x,M,ne=void 0){if(!M)return`no ${x} date`;let Ne=ln.default.parseDate(M,ne,{forwardDate:ne!=null});return Ne!==null?window.moment(Ne).format("YYYY-MM-DD"):`invalid ${x} date`}Yi(()=>{let{globalFilter:x}=se(),M=s.description.replace(x,"").replace(" "," ").trim(),ne="none";s.priority===X.Low?ne="low":s.priority===X.Medium?ne="medium":s.priority===X.High&&(ne="high"),t(0,u={description:M,status:s.status,priority:ne,recurrenceRule:s.recurrence?s.recurrence.toText():"",startDate:s.startDate?s.startDate.format("YYYY-MM-DD"):"",scheduledDate:s.scheduledDate?s.scheduledDate.format("YYYY-MM-DD"):"",dueDate:s.dueDate?s.dueDate.format("YYYY-MM-DD"):"",doneDate:s.doneDate?s.doneDate.format("YYYY-MM-DD"):""}),setTimeout(()=>{o.focus()},10)});let g=()=>{let{globalFilter:x}=se(),M=u.description.trim();M.includes(x)||(M=x+" "+M);let ne=null,Ne=ln.default.parseDate(u.startDate,new Date,{forwardDate:!0});Ne!==null&&(ne=window.moment(Ne));let D=null,v=ln.default.parseDate(u.scheduledDate,new Date,{forwardDate:!0});v!==null&&(D=window.moment(v));let y=null,E=ln.default.parseDate(u.dueDate,new Date,{forwardDate:!0});E!==null&&(y=window.moment(E));let T=null;u.recurrenceRule&&(T=vt.fromText({recurrenceRuleText:u.recurrenceRule,startDate:ne,scheduledDate:D,dueDate:y}));let k;switch(u.priority){case"low":k=X.Low;break;case"medium":k=X.Medium;break;case"high":k=X.High;break;default:k=X.None}let P=new H(Object.assign(Object.assign({},s),{description:M,status:u.status,priority:k,recurrence:T,startDate:ne,scheduledDate:D,dueDate:y,doneDate:window.moment(u.doneDate,"YYYY-MM-DD").isValid()?window.moment(u.doneDate,"YYYY-MM-DD"):null}));a([P])};function b(){u.description=this.value,t(0,u)}function O(x){In[x?"unshift":"push"](()=>{o=x,t(1,o)})}function K(){u.priority=gu(this),t(0,u)}function J(){u.recurrenceRule=this.value,t(0,u)}function j(){u.dueDate=this.value,t(0,u)}function V(){u.scheduledDate=this.value,t(0,u)}function re(){u.startDate=this.value,t(0,u)}return r.$$set=x=>{"task"in x&&t(8,s=x.task),"onSubmit"in x&&t(9,a=x.onSubmit)},r.$$.update=()=>{if(r.$$.dirty&1){e:t(0,u.startDate=ci(u.startDate),u),t(2,l=m("start",u.startDate,new Date))}if(r.$$.dirty&1){e:t(0,u.scheduledDate=ci(u.scheduledDate),u),t(3,d=m("scheduled",u.scheduledDate,new Date))}if(r.$$.dirty&1){e:t(0,u.dueDate=ci(u.dueDate),u),t(4,c=m("due",u.dueDate,new Date))}if(r.$$.dirty&3073){e:u.recurrenceRule?t(5,f=t(11,i=t(10,n=vt.fromText({recurrenceRuleText:u.recurrenceRule,startDate:null,scheduledDate:null,dueDate:null}))===null||n===void 0?void 0:n.toText())!==null&&i!==void 0?i:"invalid recurrence rule"):t(5,f="not recurring")}if(r.$$.dirty&1){e:t(6,h=m("done",u.doneDate))}},[u,o,l,d,c,f,h,g,s,a,n,i,b,O,K,J,j,V,re]}var jf=class extends $i{constructor(e){super();vu(this,e,Tv,_v,fu,{task:8,onSubmit:9})}},Bf=jf;var cn=class extends Gf.Modal{constructor({app:e,task:t,onSubmit:n}){super(e);this.task=t,this.onSubmit=i=>{n(i),this.close()}}onOpen(){this.titleEl.setText("Create or edit Task");let{contentEl:e}=this;new Bf({target:e,props:{task:this.task,onSubmit:this.onSubmit}})}onClose(){let{contentEl:e}=this;e.empty()}};var Hf=(r,e,t,n)=>{var c;if(r)return t instanceof aa.MarkdownView;if(!(t instanceof aa.MarkdownView))return;let i=(c=t.file)==null?void 0:c.path;if(i===void 0)return;let a=e.getCursor().line,o=e.getLine(a),u=bv({line:o,path:i}),l=f=>{let h=f.map(m=>m.toFileLineString()).join(` `);e.setLine(a,h)};new cn({app:n,task:u,onSubmit:l}).open()},bv=({line:r,path:e})=>{var c;let t=H.fromLine({line:r,path:e,sectionStart:0,sectionIndex:0,precedingHeader:null});if(t!==null)return t;let n=/^([\s\t]*)[-*]? *(\[(.)\])? *(.*)/u,i=r.match(n);if(i===null)return console.error("Tasks: Cannot create task on line:",r),new H({status:ue.Todo,description:"",path:e,indentation:"",originalStatusCharacter:" ",priority:X.None,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,recurrence:null,sectionStart:0,sectionIndex:0,precedingHeader:null,blockLink:"",tags:[]});let s=i[1],a=(c=i[3])!=null?c:" ",o=a===" "?ue.Todo:ue.Done,u=i[4],l=r.match(H.blockLinkRegex),d=l!==null?l[0]:"";return d!==""&&(u=u.replace(H.blockLinkRegex,"")),new H({status:o,description:u,path:e,indentation:s,originalStatusCharacter:a,blockLink:d,priority:X.None,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,recurrence:null,sectionStart:0,sectionIndex:0,precedingHeader:null,tags:[]})};var oa=Ye(require("obsidian"));var zf=(r,e,t)=>{var u;if(r)return t instanceof oa.MarkdownView;if(!(t instanceof oa.MarkdownView))return;let n=(u=t.file)==null?void 0:u.path;if(n===void 0)return;let i=e.getCursor(),s=i.line,a=e.getLine(s),o=vv({line:a,path:n});e.setLine(s,o),/[^ [\]*-]/.test(o)&&e.setCursor({line:i.line,ch:i.ch+o.length-a.length})},vv=({line:r,path:e})=>{let t=r,n=H.fromLine({line:r,path:e,sectionStart:0,sectionIndex:0,precedingHeader:null});if(n!==null)t=wv({task:n});else{let i=r.match(H.taskRegex);if(i!==null)t=Dv({regexMatch:i});else{let s=/^([\s\t]*)([-*])/;s.test(r)?t=r.replace(s,"$1$2 [ ]"):t=r.replace(/^([\s\t]*)/,"$1- ")}}return t},wv=({task:r})=>r.toggle().map(n=>n.toFileLineString()).join(` `),Dv=({regexMatch:r})=>{let e=r[1],t=r[2].toLowerCase(),n=r[3];return`${e}- [${t===" "?"x":" "}] ${n}`};var ua=class{get app(){return this.plugin.app}constructor({plugin:e}){this.plugin=e,e.addCommand({id:"edit-task",name:"Create or edit task",icon:"pencil",editorCheckCallback:(t,n,i)=>Hf(t,n,i,this.app)}),e.addCommand({id:"toggle-done",name:"Toggle task done",icon:"check-in-circle",editorCheckCallback:zf})}};var _r;(function(t){t.CacheUpdate="obsidian-tasks-plugin:cache-update",t.RequestCacheUpdate="obsidian-tasks-plugin:request-cache-update"})(_r||(_r={}));var la=class{constructor({obsidianEents:e}){this.obsidianEvents=e}onCacheUpdate(e){return this.obsidianEvents.on(_r.CacheUpdate,e)}triggerCacheUpdate(e){this.obsidianEvents.trigger(_r.CacheUpdate,e)}onRequestCacheUpdate(e){return this.obsidianEvents.on(_r.RequestCacheUpdate,e)}triggerRequestCacheUpdate(e){this.obsidianEvents.trigger(_r.RequestCacheUpdate,e)}off(e){this.obsidianEvents.offref(e)}};var ca=class{constructor({plugin:e}){this.markdownPostProcessor=this._markdownPostProcessor.bind(this);e.registerMarkdownPostProcessor(this._markdownPostProcessor.bind(this))}_markdownPostProcessor(e,t){return te(this,null,function*(){var d;let{globalFilter:n}=se(),i=e.findAll(".task-list-item").filter(c=>{var m;let f=(m=c.textContent)==null?void 0:m.split(` `);if(f===void 0)return!1;let h=null;for(let g=0;gKf.ViewPlugin.fromClass(Zf),Zf=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{state:n}=this.view,i=this.view.posAtDOM(t),s=n.doc.lineAt(i),a=H.fromLine({line:s.text,path:"",sectionStart:0,sectionIndex:0,precedingHeader:null});if(a===null)return!1;e.preventDefault();let u=a.toggle().map(c=>c.toFileLineString()).join(n.lineBreak),l=n.update({changes:{from:s.from,to:s.to,insert:u}});this.view.dispatch(l);let d=t.checked;return setTimeout(()=>{t.checked=d},1),!0}};var Xf=Ye(require("obsidian"));var da=class{constructor(e,t){this.nestingLevel=e,this.name=t}};var fa=class{constructor(e){this.lastHeadingAtLevel=new Array;let n=e.keys().next().value.length;for(let i=0;ie(t,n)*-1}static makeCompositeComparator(e){return(t,n)=>{for(let i of e){let s=i(t,n);if(s!==0)return s}return 0}}static compareByUrgency(e,t){return t.urgency-e.urgency}static compareByStatus(e,t){return e.statust.status?-1:0}static compareByPriority(e,t){return e.priority.localeCompare(t.priority)}static compareByStartDate(e,t){return U.compareByDate(e.startDate,t.startDate)}static compareByScheduledDate(e,t){return U.compareByDate(e.scheduledDate,t.scheduledDate)}static compareByDueDate(e,t){return U.compareByDate(e.dueDate,t.dueDate)}static compareByDoneDate(e,t){return U.compareByDate(e.doneDate,t.doneDate)}static compareByTag(e,t){if(e.tags.length===0&&t.tags.length===0)return 0;if(e.tags.length===0)return 1;if(t.tags.length===0)return-1;let n=U.tagPropertyInstance-1;return e.tags.length=U.tagPropertyInstance?1:t.tags.length=U.tagPropertyInstance?-1:e.tags.lengtht.tags[n]?1:0}static compareByDate(e,t){return e!==null&&t===null?-1:e===null&&t!==null?1:e!==null&&t!==null?e.isAfter(t)?1:e.isBefore(t)?-1:0:0}static compareByPath(e,t){return e.patht.path?1:0}static compareByDescription(e,t){return U.cleanDescription(e.description).localeCompare(U.cleanDescription(t.description))}static cleanDescription(e){let t=se().globalFilter;e=e.replace(t,"").trim();let n=/^\[\[?([^\]]*)\]/,i=e.match(n);if(i!==null){let l=i[1];e=l.substring(l.indexOf("|")+1)+e.replace(n,"")}let s=/^\*\*?([^*]*)\*/,a=e.match(s);a!==null&&(e=a[1]+e.replace(n,""));let o=/^==?([^=]*)==/,u=e.match(o);return u!==null&&(e=u[1]+e.replace(o,"")),e}},dn=U;dn.tagPropertyInstance=1,dn.comparators={urgency:U.compareByUrgency,description:U.compareByDescription,priority:U.compareByPriority,start:U.compareByStartDate,scheduled:U.compareByScheduledDate,due:U.compareByDueDate,done:U.compareByDoneDate,path:U.compareByPath,status:U.compareByStatus,tag:U.compareByTag};var de=class{canCreateFilterForLine(e){return de.lineMatchesFilter(this.filterRegexp(),e)}static lineMatchesFilter(e,t){return e?e.test(t):!1}static getMatch(e,t){return e?t.match(e):null}};var Ee=class{};var st=class extends de{createFilterOrErrorMessage(e){let t=new Ee,n=de.getMatch(this.filterRegexp(),e);return n!==null?n[1]==="includes"?t.filter=s=>st.stringIncludesCaseInsensitive(this.value(s),n[2]):n[1]==="does not include"?t.filter=s=>!st.stringIncludesCaseInsensitive(this.value(s),n[2]):t.error=`do not understand query filter (${this.fieldName()})`:t.error=`do not understand query filter (${this.fieldName()})`,t}static stringIncludesCaseInsensitive(e,t){return e.toLocaleLowerCase().includes(t.toLocaleLowerCase())}};var ga=class extends st{fieldName(){return"description"}filterRegexp(){return ga.descriptionRegexp}value(e){let t=se().globalFilter;return e.description.replace(t,"").trim()}},di=ga;di.descriptionRegexp=/^description (includes|does not include) (.*)/;var Qf=Ye(we()),fn=class{static parseDate(e){return window.moment(Qf.parseDate(e)).startOf("day")}};var mt=class extends de{constructor(){super(...arguments);this.instructionForFieldPresence=`has ${this.fieldName()} date`;this.instructionForFieldAbsence=`no ${this.fieldName()} date`}canCreateFilterForLine(e){return e===this.instructionForFieldPresence||e===this.instructionForFieldAbsence?!0:super.canCreateFilterForLine(e)}createFilterOrErrorMessage(e){let t=new Ee;if(e===this.instructionForFieldPresence)return t.filter=i=>this.date(i)!==null,t;if(e===this.instructionForFieldAbsence)return t.filter=i=>this.date(i)===null,t;let n=de.getMatch(this.filterRegexp(),e);if(n!==null){let i=fn.parseDate(n[2]);i.isValid()?n[1]==="before"?t.filter=s=>{let a=this.date(s);return a?a.isBefore(i):this.filterResultIfFieldMissing()}:n[1]==="after"?t.filter=s=>{let a=this.date(s);return a?a.isAfter(i):this.filterResultIfFieldMissing()}:t.filter=s=>{let a=this.date(s);return a?a.isSame(i):this.filterResultIfFieldMissing()}:t.error="do not understand "+this.fieldName()+" date"}else t.error="do not understand query filter ("+this.fieldName()+" date)";return t}};var _a=class extends mt{filterRegexp(){return _a.doneRegexp}fieldName(){return"done"}date(e){return e.doneDate}filterResultIfFieldMissing(){return!1}},fi=_a;fi.doneRegexp=/^done (before|after|on)? ?(.*)/;var Ta=class extends mt{filterRegexp(){return Ta.dueRegexp}fieldName(){return"due"}date(e){return e.dueDate}filterResultIfFieldMissing(){return!1}},hi=Ta;hi.dueRegexp=/^due (before|after|on)? ?(.*)/;var ba=class{constructor(e,t){this._instruction=e,this._filter=t}canCreateFilterForLine(e){return e==this._instruction}createFilterOrErrorMessage(e){let t=new Ee;return e===this._instruction?(t.filter=this._filter,t):(t.error=`do not understand filter: ${e}`,t)}};var va=class{constructor(){this._filters=[]}add(e,t){this._filters.push(new ba(e,t))}canCreateFilterForLine(e){for(let t of this._filters)if(t.canCreateFilterForLine(e))return!0;return!1}createFilterOrErrorMessage(e){for(let n of this._filters){let i=n.createFilterOrErrorMessage(e);if(i.error===void 0)return i}let t=new Ee;return t.error=`do not understand filter: ${e}`,t}};var zt=class extends de{constructor(){super(...arguments);this._filters=new va}canCreateFilterForLine(e){return this._filters.canCreateFilterForLine(e)}createFilterOrErrorMessage(e){return this._filters.createFilterOrErrorMessage(e)}filterRegexp(){return null}};var wa=class extends zt{constructor(){super();this._filters.add("exclude sub-items",e=>e.indentation==="")}fieldName(){return"exclude"}};var Da=class extends st{filterRegexp(){return Da.headingRegexp}fieldName(){return"heading"}value(e){return e.precedingHeader?e.precedingHeader:""}},pi=Da;pi.headingRegexp=/^heading (includes|does not include) (.*)/;var Ea=class extends st{filterRegexp(){return Ea.pathRegexp}fieldName(){return"path"}value(e){return e.path}},mi=Ea;mi.pathRegexp=/^path (includes|does not include) (.*)/;var ka=class extends de{createFilterOrErrorMessage(e){let t=new Ee,n=de.getMatch(this.filterRegexp(),e);if(n!==null){let i=n[3],s=null;switch(i){case"low":s=X.Low;break;case"none":s=X.None;break;case"medium":s=X.Medium;break;case"high":s=X.High;break}if(s===null)return t.error="do not understand priority",t;let a;n[2]==="above"?a=o=>o.priority?o.priority.localeCompare(s)<0:!1:n[2]==="below"?a=o=>o.priority?o.priority.localeCompare(s)>0:!1:a=o=>o.priority?o.priority===s:!1,t.filter=a}else t.error="do not understand query filter (priority)";return t}fieldName(){return"priority"}filterRegexp(){return ka.priorityRegexp}},yi=ka;yi.priorityRegexp=/^priority (is )?(above|below)? ?(low|none|medium|high)/;var Ma=class extends mt{filterRegexp(){return Ma.scheduledRegexp}fieldName(){return"scheduled"}date(e){return e.scheduledDate}filterResultIfFieldMissing(){return!1}},gi=Ma;gi.scheduledRegexp=/^scheduled (before|after|on)? ?(.*)/;var Ra=class extends mt{filterRegexp(){return Ra.startRegexp}fieldName(){return"start"}date(e){return e.startDate}filterResultIfFieldMissing(){return!0}},_i=Ra;_i.startRegexp=/^starts (before|after|on)? ?(.*)/;var Kt=class extends de{canCreateFilterForLine(e){return e===Kt.instructionForFieldPresence||e===Kt.instructionForFieldAbsence?!0:super.canCreateFilterForLine(e)}createFilterOrErrorMessage(e){let t=new Ee;if(e===Kt.instructionForFieldPresence){let i=new Ee;return i.filter=s=>this.dates(s).some(a=>a!==null),i}if(e===Kt.instructionForFieldAbsence){let i=new Ee;return i.filter=s=>!this.dates(s).some(a=>a!==null),i}let n=de.getMatch(this.filterRegexp(),e);if(n!==null){let i=fn.parseDate(n[2]);i.isValid()?n[1]==="before"?t.filter=s=>this.dates(s).some(a=>a&&a.isBefore(i)):n[1]==="after"?t.filter=s=>this.dates(s).some(a=>a&&a.isAfter(i)):t.filter=s=>this.dates(s).some(a=>a&&a.isSame(i)):t.error="do not understand happens date"}else t.error="do not understand query filter (happens date)";return t}filterRegexp(){return Kt.happensRegexp}dates(e){return Array.of(e.startDate,e.scheduledDate,e.dueDate)}fieldName(){return"happens"}},Tr=Kt;Tr.happensRegexp=/^happens (before|after|on)? ?(.*)/,Tr.instructionForFieldPresence="has happens date",Tr.instructionForFieldAbsence="no happens date";var Pa=class extends zt{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 Oa=class extends zt{constructor(){super();this._filters.add("done",e=>e.status===ue.Done),this._filters.add("not done",e=>e.status!==ue.Done)}fieldName(){return"status"}};var Aa=class extends de{createFilterOrErrorMessage(e){let t=new Ee,n=de.getMatch(this.filterRegexp(),e);if(n!==null){let i=n[2],s=n[3].replace(/^#/,"");i==="include"||i==="includes"?t.filter=a=>a.tags.find(o=>o.toLowerCase().includes(s.toLowerCase()))!==void 0:n[2]==="do not include"||n[2]==="does not include"?t.filter=a=>a.tags.find(o=>o.toLowerCase().includes(s.toLowerCase()))==null:t.error="do not understand query filter (tag/tags)"}else t.error="do not understand query filter (tag/tags)";return t}fieldName(){return"tag/tags"}filterRegexp(){return Aa.tagRegexp}},Ti=Aa;Ti.tagRegexp=/^(tag|tags) (includes|does not include|include|do not include) (.*)/;var hn=class{constructor({source:e}){this._limit=void 0;this._layoutOptions=new wr;this._filters=[];this._error=void 0;this._sorting=[];this._grouping=[];this.sortByRegexp=/^sort by (urgency|status|priority|start|scheduled|due|done|path|description|tag)( reverse)?[\s]*(\d+)?/;this.groupByRegexp=/^group by (backlink|done|due|filename|folder|heading|path|scheduled|start|status)/;this.hideOptionsRegexp=/^hide (task count|backlink|priority|start date|scheduled date|done date|due date|recurrence rule|edit button)/;this.shortModeRegexp=/^short/;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.parseFilter(t,new Oa):break;case this.parseFilter(t,new Pa):break;case this.parseFilter(t,new yi):break;case this.parseFilter(t,new Tr):break;case this.parseFilter(t,new _i):break;case this.parseFilter(t,new gi):break;case this.parseFilter(t,new hi):break;case this.parseFilter(t,new fi):break;case this.parseFilter(t,new mi):break;case this.parseFilter(t,new di):break;case this.parseFilter(t,new Ti):break;case this.parseFilter(t,new pi):break;case this.parseFilter(t,new wa):break;case this.limitRegexp.test(t):this.parseLimit({line:t});break;case this.sortByRegexp.test(t):this.parseSortBy({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;default:this._error=`do not understand query: ${t}`}})}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(n=>{e=e.filter(n)});let t=dn.by(this,e).slice(0,this.limit);return Ct.by(this.grouping,t)}parseHideOptions({line:e}){let t=e.match(this.hideOptionsRegexp);if(t!==null)switch(t[1].trim().toLowerCase()){case"task count":this._layoutOptions.hideTaskCount=!0;break;case"backlink":this._layoutOptions.hideBacklinks=!0;break;case"priority":this._layoutOptions.hidePriority=!0;break;case"start date":this._layoutOptions.hideStartDate=!0;break;case"scheduled date":this._layoutOptions.hideScheduledDate=!0;break;case"due date":this._layoutOptions.hideDueDate=!0;break;case"done date":this._layoutOptions.hideDoneDate=!0;break;case"recurrence rule":this._layoutOptions.hideRecurrenceRule=!0;break;case"edit button":this._layoutOptions.hideEditButton=!0;break;default:this._error="do not understand hide option"}}parseFilter(e,t){if(t.canCreateFilterForLine(e)){let{filter:n,error:i}=t.createFilterOrErrorMessage(e);return n?this._filters.push(n):this._error=i,!0}else return!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=e.match(this.sortByRegexp);t!==null?this._sorting.push({property:t[1],reverse:!!t[2],propertyInstance:isNaN(+t[3])?1:+t[3]}):this._error="do not understand query sorting"}parseGroupBy({line:e}){let t=e.match(this.groupByRegexp);t!==null?this._grouping.push({property:t[1]}):this._error="do not understand query grouping"}};var xa=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 te(this,null,function*(){n.addChild(new pn({app:this.app,events:this.events,container:t,source:e}))})}},pn=class extends Xf.MarkdownRenderChild{constructor({app:e,events:t,container:n,source:i}){super(n);switch(this.app=e,this.events=t,this.source=i,this.containerEl.className){case"block-language-tasks":this.query=new hn({source:i}),this.queryType="tasks";break;default:this.query=new hn({source:i}),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 e=new Date;e.setHours(24,0,0,0);let t=new Date,n=e.getTime()-t.getTime();this.queryReloadTimeout=setTimeout(()=>{this.query=new hn({source:this.source}),this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()},n+1e3)}render(n){return te(this,arguments,function*({tasks:e,state:t}){var s;console.debug(`Render ${this.queryType} called for ${e.length} tasks, state: ${t}`);let i=this.containerEl.createEl("div");if(t===Ut.Warm&&this.query.error===void 0){let a=this.query.applyQueryToTasks(e);for(let u of a.groups){pn.addGroupHeadings(i,u.groupHeadings);let{taskList:l}=yield this.createTasksList({tasks:u.tasks,content:i});i.appendChild(l)}let o=a.totalTasksCount();this.addTaskCount(i,o)}else this.query.error!==void 0?i.setText(`Tasks query: ${this.query.error}`):i.setText("Loading Tasks ...");(s=this.containerEl.firstChild)==null||s.replaceWith(i)})}createTasksList(n){return te(this,arguments,function*({tasks:e,content:t}){let i=e.length,s=t.createEl("ul");s.addClasses(["contains-task-list","plugin-tasks-query-result"]);for(let a=0;ah.remove());let c=l.createSpan(),f=this.query.layoutOptions.shortMode;this.query.layoutOptions.hideBacklinks||this.addBacklinks(c,o,f,u),this.query.layoutOptions.hideEditButton||this.addEditButton(c,o),s.appendChild(l)}return{taskList:s,tasksCount:i}})}addEditButton(e,t){e.createEl("a",{cls:"tasks-edit"}).onClickEvent(i=>{i.preventDefault();let s=o=>{kn({originalTask:t,newTasks:o})};new cn({app:this.app,task:t,onSubmit:s}).open()})}static addGroupHeadings(e,t){for(let n of t)pn.addGroupHeading(e,n)}static addGroupHeading(e,t){let n;t.nestingLevel===0?n=e.createEl("h4",{cls:"tasks-group-heading"}):t.nestingLevel===1?n=e.createEl("h5",{cls:"tasks-group-heading"}):n=e.createEl("h6",{cls:"tasks-group-heading"}),n.appendText(t.name)}addBacklinks(e,t,n,i){var o;e.addClass("tasks-backlink"),n||e.append(" (");let s=e.createEl("a");if(s.href=t.path,s.setAttribute("data-href",t.path),s.rel="noopener",s.target="_blank",s.addClass("internal-link"),n&&s.addClass("internal-link-short-mode"),t.precedingHeader!==null){let u=t.precedingHeader.replace(/#/g,"");s.href=s.href+"#"+u,s.setAttribute("data-href",s.getAttribute("data-href")+"#"+u)}let a;n?a=" \u{1F517}":a=(o=t.getLinkText({isFilenameUnique:i}))!=null?o:"",s.setText(a),n||e.append(")")}addTaskCount(e,t){this.query.layoutOptions.hideTaskCount||e.createDiv({text:`${t} task${t!==1?"s":""}`,cls:"tasks-count"})}isFilenameUnique({task:e}){let t=e.path.match(/([^/]*)\..+$/i);if(t===null)return;let n=t[1];return this.app.vault.getMarkdownFiles().filter(s=>{if(s.basename===n)return!0}).length<2}};var br=Ye(require("obsidian"));var Ca=class extends br.PluginSettingTab{constructor({plugin:e}){super(e.app,e);this.plugin=e}display(){let{containerEl:e}=this;e.empty(),e.createEl("h2",{text:"Tasks Settings"}),e.createEl("p",{cls:"tasks-setting-important",text:"Changing any settings requires a restart of obsidian."}),new br.Setting(e).setName("Global task filter").setDesc("The global filter will be applied to all checklist items.").addText(t=>{let n=se();t.setPlaceholder("#task").setValue(n.globalFilter).onChange(i=>te(this,null,function*(){Qt({globalFilter:i}),yield this.plugin.saveSettings()}))}),e.createEl("div",{cls:"setting-item-description",text:'The global filter will be applied to all checklist items to filter out "non-task" checklist items.\nA checklist item must include the specified string in its description in order to be considered a task.\nFor example, if you set the global filter to `#task`, the Tasks plugin will only handle checklist items tagged with `#task`.\nOther checklist items will remain normal checklist items and not appear in queries or get a done date set.\nLeave empty if you want all checklist items from your vault to be tasks managed by this plugin.'}),new br.Setting(e).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(t=>{let n=se();t.setValue(n.removeGlobalFilter).onChange(i=>te(this,null,function*(){Qt({removeGlobalFilter:i}),yield this.plugin.saveSettings()}))}),new br.Setting(e).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(t=>{let n=se();t.setValue(n.setDoneDate).onChange(i=>te(this,null,function*(){Qt({setDoneDate:i}),yield this.plugin.saveSettings()}))})}};var Na=class extends Jf.Plugin{onload(){return te(this,null,function*(){console.log('loading plugin "tasks"'),yield this.loadSettings(),this.addSettingTab(new Ca({plugin:this})),io({metadataCache:this.app.metadataCache,vault:this.app.vault});let e=new la({obsidianEents:this.app.workspace});this.cache=new Si({metadataCache:this.app.metadataCache,vault:this.app.vault,events:e}),this.inlineRenderer=new ca({plugin:this}),this.queryRenderer=new xa({plugin:this,events:e}),this.registerEditorExtension(Vf()),new ua({plugin:this})})}onunload(){var e;console.log('unloading plugin "tasks"'),(e=this.cache)==null||e.unload()}loadSettings(){return te(this,null,function*(){let e=yield this.loadData();Qt(e)})}saveSettings(){return te(this,null,function*(){yield this.saveData(se())})}}; /*! * rrule.js - Library for working with recurrence rules for calendar dates. * https://github.com/jakubroztocil/rrule * * Copyright 2010, Jakub Roztocil and Lars Schoning * Licenced under the BSD licence. * https://github.com/jakubroztocil/rrule/blob/master/LICENCE * * Based on: * python-dateutil - Extensions to the standard Python datetime module. * Copyright (c) 2003-2011 - Gustavo Niemeyer * Copyright (c) 2012 - Tomi Pieviläinen * https://github.com/jakubroztocil/rrule/blob/master/LICENCE * */ /*! * rrule.js - Library for working with recurrence rules for calendar dates. * https://github.com/jakubroztocil/rrule * * Copyright 2010, Jakub Roztocil and Lars Schoning * Licenced under the BSD licence. * https://github.com/jakubroztocil/rrule/blob/master/LICENCE * */ /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */