From d35ba3cecd97caa22c975ae3fe432474e0a3b75e Mon Sep 17 00:00:00 2001 From: quanruzhuoxiu Date: Thu, 11 Jan 2024 10:18:46 +0800 Subject: [PATCH] feat: update plugin version --- .../plugins/obsidian-tasks-plugin/main.js | 135 +++++++++--------- .../obsidian-tasks-plugin/manifest.json | 2 +- .../plugins/obsidian-tasks-plugin/styles.css | 12 ++ .obsidian/plugins/periodic-para/main.js | 85 ++++++----- .obsidian/plugins/periodic-para/manifest.json | 2 +- .obsidian/plugins/templater-obsidian/main.js | 66 +++++---- .../plugins/templater-obsidian/manifest.json | 4 +- .obsidian/workspace.json | 30 ++-- 8 files changed, 192 insertions(+), 144 deletions(-) diff --git a/.obsidian/plugins/obsidian-tasks-plugin/main.js b/.obsidian/plugins/obsidian-tasks-plugin/main.js index a2a1bd4..ae963af 100644 --- a/.obsidian/plugins/obsidian-tasks-plugin/main.js +++ b/.obsidian/plugins/obsidian-tasks-plugin/main.js @@ -122,14 +122,14 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -"use strict";var av=Object.create;var ss=Object.defineProperty,ov=Object.defineProperties,uv=Object.getOwnPropertyDescriptor,lv=Object.getOwnPropertyDescriptors,cv=Object.getOwnPropertyNames,eh=Object.getOwnPropertySymbols,dv=Object.getPrototypeOf,rh=Object.prototype.hasOwnProperty,fv=Object.prototype.propertyIsEnumerable;var th=(r,e,t)=>e in r?ss(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,we=(r,e)=>{for(var t in e||(e={}))rh.call(e,t)&&th(r,t,e[t]);if(eh)for(var t of eh(e))fv.call(e,t)&&th(r,t,e[t]);return r},it=(r,e)=>ov(r,lv(e));var _=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),pv=(r,e)=>{for(var t in e)ss(r,t,{get:e[t],enumerable:!0})},nh=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of cv(e))!rh.call(r,i)&&i!==t&&ss(r,i,{get:()=>e[i],enumerable:!(n=uv(e,i))||n.enumerable});return r};var as=(r,e,t)=>(t=r!=null?av(dv(r)):{},nh(e||!r||!r.__esModule?ss(t,"default",{value:r,enumerable:!0}):t,r)),hv=r=>nh(ss({},"__esModule",{value:!0}),r);var F=(r,e,t)=>new Promise((n,i)=>{var s=u=>{try{o(t.next(u))}catch(l){i(l)}},a=u=>{try{o(t.throw(u))}catch(l){i(l)}},o=u=>u.done?n(u.value):Promise.resolve(u.value).then(s,a);o((t=t.apply(r,e)).next())});var Ee=_(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.matchAnyPattern=rn.extractTerms=rn.repeatedTimeunitPattern=void 0;function Tv(r,e){let t=e.replace(/\((?!\?)/g,"(?:");return`${r}${t}\\s{0,5}(?:,?\\s{0,5}${t}){0,10}`}rn.repeatedTimeunitPattern=Tv;function ih(r){let e;return r instanceof Array?e=[...r]:r instanceof Map?e=Array.from(r.keys()):e=Object.keys(r),e}rn.extractTerms=ih;function bv(r){return`(?:${ih(r).sort((t,n)=>n.length-t.length).join("|").replace(/\./g,"\\.")})`}rn.matchAnyPattern=bv});var ye=_((Vu,Ku)=>{(function(r,e){typeof Vu=="object"&&typeof Ku!="undefined"?Ku.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs=e()})(Vu,function(){"use strict";var r=1e3,e=6e4,t=36e5,n="millisecond",i="second",s="minute",a="hour",o="day",u="week",l="month",c="quarter",f="year",h="date",T="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,D={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("_")},C=function(B,A,E){var H=String(B);return!H||H.length>=A?B:""+Array(A+1-H.length).join(E)+B},N={s:C,z:function(B){var A=-B.utcOffset(),E=Math.abs(A),H=Math.floor(E/60),P=E%60;return(A<=0?"+":"-")+C(H,2,"0")+":"+C(P,2,"0")},m:function B(A,E){if(A.date(){"use strict";var _v=nn&&nn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(nn,"__esModule",{value:!0});nn.findYearClosestToRef=nn.findMostLikelyADYear=void 0;var vv=_v(ye());function wv(r){return r<100&&(r>50?r=r+1900:r=r+2e3),r}nn.findMostLikelyADYear=wv;function Ev(r,e,t){let n=vv.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(re,"__esModule",{value:!0});re.parseTimeUnits=re.TIME_UNITS_PATTERN=re.parseYear=re.YEAR_PATTERN=re.parseOrdinalNumberPattern=re.ORDINAL_NUMBER_PATTERN=re.parseNumberPattern=re.NUMBER_PATTERN=re.TIME_UNIT_DICTIONARY=re.ORDINAL_WORD_DICTIONARY=re.INTEGER_WORD_DICTIONARY=re.MONTH_DICTIONARY=re.FULL_MONTH_NAME_DICTIONARY=re.WEEKDAY_DICTIONARY=void 0;var qa=Ee(),kv=st();re.WEEKDAY_DICTIONARY={sunday:0,sun:0,"sun.":0,monday:1,mon:1,"mon.":1,tuesday:2,tue:2,"tue.":2,wednesday:3,wed:3,"wed.":3,thursday:4,thurs:4,"thurs.":4,thur:4,"thur.":4,thu:4,"thu.":4,friday:5,fri:5,"fri.":5,saturday:6,sat:6,"sat.":6};re.FULL_MONTH_NAME_DICTIONARY={january:1,february:2,march:3,april:4,may:5,june:6,july:7,august:8,september:9,october:10,november:11,december:12};re.MONTH_DICTIONARY=Object.assign(Object.assign({},re.FULL_MONTH_NAME_DICTIONARY),{jan:1,"jan.":1,feb:2,"feb.":2,mar:3,"mar.":3,apr:4,"apr.":4,jun:6,"jun.":6,jul:7,"jul.":7,aug:8,"aug.":8,sep:9,"sep.":9,sept:9,"sept.":9,oct:10,"oct.":10,nov:11,"nov.":11,dec:12,"dec.":12});re.INTEGER_WORD_DICTIONARY={one:1,two:2,three:3,four:4,five:5,six:6,seven:7,eight:8,nine:9,ten:10,eleven:11,twelve:12};re.ORDINAL_WORD_DICTIONARY={first:1,second:2,third:3,fourth:4,fifth:5,sixth:6,seventh:7,eighth:8,ninth:9,tenth:10,eleventh:11,twelfth:12,thirteenth:13,fourteenth:14,fifteenth:15,sixteenth:16,seventeenth:17,eighteenth:18,nineteenth:19,twentieth:20,"twenty first":21,"twenty-first":21,"twenty second":22,"twenty-second":22,"twenty third":23,"twenty-third":23,"twenty fourth":24,"twenty-fourth":24,"twenty fifth":25,"twenty-fifth":25,"twenty sixth":26,"twenty-sixth":26,"twenty seventh":27,"twenty-seventh":27,"twenty eighth":28,"twenty-eighth":28,"twenty ninth":29,"twenty-ninth":29,thirtieth:30,"thirty first":31,"thirty-first":31};re.TIME_UNIT_DICTIONARY={sec:"second",second:"second",seconds:"second",min:"minute",mins:"minute",minute:"minute",minutes:"minute",h:"hour",hr:"hour",hrs:"hour",hour:"hour",hours:"hour",day:"d",days:"d",week:"week",weeks:"week",month:"month",months:"month",qtr:"quarter",quarter:"quarter",quarters:"quarter",y:"year",yr:"year",year:"year",years:"year"};re.NUMBER_PATTERN=`(?:${qa.matchAnyPattern(re.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s{0,2}an?)?|an?\\b(?:\\s{0,2}few)?|few|several|a?\\s{0,2}couple\\s{0,2}(?:of)?)`;function ah(r){let e=r.toLowerCase();return re.INTEGER_WORD_DICTIONARY[e]!==void 0?re.INTEGER_WORD_DICTIONARY[e]:e==="a"||e==="an"?1:e.match(/few/)?3:e.match(/half/)?.5:e.match(/couple/)?2:e.match(/several/)?7:parseFloat(e)}re.parseNumberPattern=ah;re.ORDINAL_NUMBER_PATTERN=`(?:${qa.matchAnyPattern(re.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:st|nd|rd|th)?)`;function Sv(r){let e=r.toLowerCase();return re.ORDINAL_WORD_DICTIONARY[e]!==void 0?re.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}re.parseOrdinalNumberPattern=Sv;re.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s{0,2}(?:BE|AD|BC|BCE|CE)|[1-2][0-9]{3}|[5-9][0-9])";function Ov(r){if(/BE/i.test(r))return r=r.replace(/BE/i,""),parseInt(r)-543;if(/BCE?/i.test(r))return r=r.replace(/BCE?/i,""),-parseInt(r);if(/(AD|CE)/i.test(r))return r=r.replace(/(AD|CE)/i,""),parseInt(r);let e=parseInt(r);return kv.findMostLikelyADYear(e)}re.parseYear=Ov;var oh=`(${re.NUMBER_PATTERN})\\s{0,3}(${qa.matchAnyPattern(re.TIME_UNIT_DICTIONARY)})`,sh=new RegExp(oh,"i");re.TIME_UNITS_PATTERN=qa.repeatedTimeunitPattern("(?:(?:about|around)\\s{0,3})?",oh);function Dv(r){let e={},t=r,n=sh.exec(t);for(;n;)xv(e,n),t=t.substring(n[0].length).trim(),n=sh.exec(t);return e}re.parseTimeUnits=Dv;function xv(r,e){let t=ah(e[1]),n=re.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var uh=_((Qu,Xu)=>{(function(r,e){typeof Qu=="object"&&typeof Xu!="undefined"?Xu.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs_plugin_quarterOfYear=e()})(Qu,function(){"use strict";var r="month",e="quarter";return function(t,n){var i=n.prototype;i.quarter=function(o){return this.$utils().u(o)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(o-1))};var s=i.add;i.add=function(o,u){return o=Number(o),this.$utils().p(u)===e?this.add(3*o,r):s.bind(this)(o,u)};var a=i.startOf;i.startOf=function(o,u){var l=this.$utils(),c=!!l.u(u)||u;if(l.p(o)===e){var f=this.quarter()-1;return c?this.month(3*f).startOf(r).startOf("day"):this.month(3*f+2).endOf(r).endOf("day")}return a.bind(this)(o,u)}}})});var Gt=_(gr=>{"use strict";Object.defineProperty(gr,"__esModule",{value:!0});gr.implySimilarTime=gr.assignSimilarTime=gr.assignSimilarDate=gr.assignTheNextDay=void 0;var lh=Be();function Rv(r,e){e=e.add(1,"day"),ch(r,e),dh(r,e)}gr.assignTheNextDay=Rv;function ch(r,e){r.assign("day",e.date()),r.assign("month",e.month()+1),r.assign("year",e.year())}gr.assignSimilarDate=ch;function Mv(r,e){r.assign("hour",e.hour()),r.assign("minute",e.minute()),r.assign("second",e.second()),r.assign("millisecond",e.millisecond()),r.get("hour")<12?r.assign("meridiem",lh.Meridiem.AM):r.assign("meridiem",lh.Meridiem.PM)}gr.assignSimilarTime=Mv;function dh(r,e){r.imply("hour",e.hour()),r.imply("minute",e.minute()),r.imply("second",e.second()),r.imply("millisecond",e.millisecond())}gr.implySimilarTime=dh});var fh=_(Sn=>{"use strict";Object.defineProperty(Sn,"__esModule",{value:!0});Sn.toTimezoneOffset=Sn.TIMEZONE_ABBR_MAP=void 0;Sn.TIMEZONE_ABBR_MAP={ACDT:630,ACST:570,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,ALMT:360,AMST:-180,AMT:-240,ANAST:720,ANAT:720,AQTT:300,ART:-180,AST:-240,AWDT:540,AWST:480,AZOST:0,AZOT:-60,AZST:300,AZT:240,BNT:480,BOT:-240,BRST:-120,BRT:-180,BST:60,BTT:360,CAST:480,CAT:120,CCT:390,CDT:-300,CEST:120,CET:60,CHADT:825,CHAST:765,CKT:-600,CLST:-180,CLT:-240,COT:-300,CST:-360,CVT:-60,CXT:420,ChST:600,DAVT:420,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEST:180,EET:120,EGST:0,EGT:-60,EST:-300,ET:-300,FJST:780,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GMT:0,GST:240,GYT:-240,HAA:-180,HAC:-300,HADT:-540,HAE:-240,HAP:-420,HAR:-360,HAST:-600,HAT:-90,HAY:-480,HKT:480,HLV:-210,HNA:-240,HNC:-360,HNE:-300,HNP:-480,HNR:-420,HNT:-150,HNY:-540,HOVT:420,ICT:420,IDT:180,IOT:360,IRDT:270,IRKST:540,IRKT:540,IRST:210,IST:330,JST:540,KGT:360,KRAST:480,KRAT:480,KST:540,KUYT:240,LHDT:660,LHST:630,LINT:840,MAGST:720,MAGT:720,MART:-510,MAWT:300,MDT:-360,MESZ:120,MEZ:60,MHT:720,MMT:390,MSD:240,MSK:180,MST:-420,MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:690,NOVST:420,NOVT:360,NPT:345,NST:-150,NUT:-660,NZDT:780,NZST:720,OMSST:420,OMST:420,PDT:-420,PET:-300,PETST:720,PETT:720,PGT:600,PHOT:780,PHT:480,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PT:-480,PWT:540,PYST:-180,PYT:-240,RET:240,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SRT:-180,SST:-660,TAHT:-600,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TVT:720,ULAT:480,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-210,VLAST:660,VLAT:660,VUT:660,WAST:120,WAT:60,WEST:60,WESZ:60,WET:0,WEZ:0,WFT:720,WGST:-120,WGT:-180,WIB:420,WIT:540,WITA:480,WST:780,WT:0,YAKST:600,YAKT:600,YAPT:600,YEKST:360,YEKT:360};function Cv(r){var e;return r==null?null:typeof r=="number"?r:(e=Sn.TIMEZONE_ABBR_MAP[r])!==null&&e!==void 0?e:null}Sn.toTimezoneOffset=Cv});var Ie=_(yr=>{"use strict";var ph=yr&&yr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(yr,"__esModule",{value:!0});yr.ParsingResult=yr.ParsingComponents=yr.ReferenceWithTimezone=void 0;var Av=ph(uh()),$a=ph(ye()),Zu=Gt(),Pv=fh();$a.default.extend(Av.default);var Ju=class{constructor(e){var t;e=e!=null?e:new Date,e instanceof Date?this.instant=e:(this.instant=(t=e.instant)!==null&&t!==void 0?t:new Date,this.timezoneOffset=Pv.toTimezoneOffset(e.timezone))}};yr.ReferenceWithTimezone=Ju;var On=class{constructor(e,t){if(this.reference=e,this.knownValues={},this.impliedValues={},t)for(let i in t)this.knownValues[i]=t[i];let n=$a.default(e.instant);this.imply("day",n.date()),this.imply("month",n.month()+1),this.imply("year",n.year()),this.imply("hour",12),this.imply("minute",0),this.imply("second",0),this.imply("millisecond",0)}get(e){return e in this.knownValues?this.knownValues[e]:e in this.impliedValues?this.impliedValues[e]:null}isCertain(e){return e in this.knownValues}getCertainComponents(){return Object.keys(this.knownValues)}imply(e,t){return e in this.knownValues?this:(this.impliedValues[e]=t,this)}assign(e,t){return this.knownValues[e]=t,delete this.impliedValues[e],this}delete(e){delete this.knownValues[e],delete this.impliedValues[e]}clone(){let e=new On(this.reference);e.knownValues={},e.impliedValues={};for(let t in this.knownValues)e.knownValues[t]=this.knownValues[t];for(let t in this.impliedValues)e.impliedValues[t]=this.impliedValues[t];return e}isOnlyDate(){return!this.isCertain("hour")&&!this.isCertain("minute")&&!this.isCertain("second")}isOnlyTime(){return!this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")}isOnlyWeekdayComponent(){return this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")}isOnlyDayMonthComponent(){return this.isCertain("day")&&this.isCertain("month")&&!this.isCertain("year")}isValidDate(){let e=this.dateWithoutTimezoneAdjustment();return!(e.getFullYear()!==this.get("year")||e.getMonth()!==this.get("month")-1||e.getDate()!==this.get("day")||this.get("hour")!=null&&e.getHours()!=this.get("hour")||this.get("minute")!=null&&e.getMinutes()!=this.get("minute"))}toString(){return`[ParsingComponents {knownValues: ${JSON.stringify(this.knownValues)}, impliedValues: ${JSON.stringify(this.impliedValues)}}, reference: ${JSON.stringify(this.reference)}]`}dayjs(){return $a.default(this.date())}date(){let e=this.dateWithoutTimezoneAdjustment();return new Date(e.getTime()+this.getSystemTimezoneAdjustmentMinute(e)*6e4)}dateWithoutTimezoneAdjustment(){let e=new Date(this.get("year"),this.get("month")-1,this.get("day"),this.get("hour"),this.get("minute"),this.get("second"),this.get("millisecond"));return e.setFullYear(this.get("year")),e}getSystemTimezoneAdjustmentMinute(e){var t,n;(!e||e.getTime()<0)&&(e=new Date);let i=-e.getTimezoneOffset(),s=(n=(t=this.get("timezoneOffset"))!==null&&t!==void 0?t:this.reference.timezoneOffset)!==null&&n!==void 0?n:i;return i-s}static createRelativeFromReference(e,t){let n=$a.default(e.instant);for(let s in t)n=n.add(t[s],s);let i=new On(e);return t.hour||t.minute||t.second?(Zu.assignSimilarTime(i,n),Zu.assignSimilarDate(i,n),e.timezoneOffset!==null&&i.assign("timezoneOffset",-e.instant.getTimezoneOffset())):(Zu.implySimilarTime(i,n),e.timezoneOffset!==null&&i.imply("timezoneOffset",-e.instant.getTimezoneOffset()),t.d?(i.assign("day",n.date()),i.assign("month",n.month()+1),i.assign("year",n.year())):(t.week&&i.imply("weekday",n.day()),i.imply("day",n.date()),t.month?(i.assign("month",n.month()+1),i.assign("year",n.year())):(i.imply("month",n.month()+1),t.year?i.assign("year",n.year()):i.imply("year",n.year())))),i}};yr.ParsingComponents=On;var os=class{constructor(e,t,n,i,s){this.reference=e,this.refDate=e.instant,this.index=t,this.text=n,this.start=i||new On(e),this.end=s}clone(){let e=new os(this.reference,this.index,this.text);return e.start=this.start?this.start.clone():null,e.end=this.end?this.end.clone():null,e}date(){return this.start.date()}toString(){return`[ParsingResult {index: ${this.index}, text: '${this.text}', ...}]`}};yr.ParsingResult=os});var q=_(Ya=>{"use strict";Object.defineProperty(Ya,"__esModule",{value:!0});Ya.AbstractParserWithWordBoundaryChecking=void 0;var el=class{constructor(){this.cachedInnerPattern=null,this.cachedPattern=null}patternLeftBoundary(){return"(\\W|^)"}pattern(e){let t=this.innerPattern(e);return t==this.cachedInnerPattern?this.cachedPattern:(this.cachedPattern=new RegExp(`${this.patternLeftBoundary()}${t.source}`,t.flags),this.cachedInnerPattern=t,this.cachedPattern)}extract(e,t){var n;let i=(n=t[1])!==null&&n!==void 0?n:"";t.index=t.index+i.length,t[0]=t[0].substring(i.length);for(let s=2;s{"use strict";Object.defineProperty(nl,"__esModule",{value:!0});var rl=at(),Nv=Ie(),Iv=q(),Fv=new RegExp(`(?:within|in|for)\\s*(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${rl.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Lv=new RegExp(`(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${rl.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),tl=class extends Iv.AbstractParserWithWordBoundaryChecking{innerPattern(e){return e.option.forwardDate?Lv:Fv}innerExtract(e,t){let n=rl.parseTimeUnits(t[1]);return Nv.ParsingComponents.createRelativeFromReference(e.reference,n)}};nl.default=tl});var _h=_(sl=>{"use strict";Object.defineProperty(sl,"__esModule",{value:!0});var Uv=st(),Th=at(),bh=at(),ja=at(),Wv=Ee(),qv=q(),$v=new RegExp(`(?:on\\s{0,3})?(${ja.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:to|\\-|\\\u2013|until|through|till)?\\s{0,3}(${ja.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s{0,3}(?:of)?\\s{0,3})(${Wv.matchAnyPattern(Th.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s{0,3})(${bh.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),mh=1,gh=2,Yv=3,yh=4,il=class extends qv.AbstractParserWithWordBoundaryChecking{innerPattern(){return $v}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Th.MONTH_DICTIONARY[t[Yv].toLowerCase()],s=ja.parseOrdinalNumberPattern(t[mh]);if(s>31)return t.index=t.index+t[mh].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[yh]){let a=bh.parseYear(t[yh]);n.start.assign("year",a)}else{let a=Uv.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[gh]){let a=ja.parseOrdinalNumberPattern(t[gh]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};sl.default=il});var Sh=_(ol=>{"use strict";Object.defineProperty(ol,"__esModule",{value:!0});var jv=st(),Eh=at(),Ga=at(),kh=at(),Gv=Ee(),Bv=q(),Hv=new RegExp(`(${Gv.matchAnyPattern(Eh.MONTH_DICTIONARY)})(?:-|/|\\s*,?\\s*)(${Ga.ORDINAL_NUMBER_PATTERN})(?!\\s*(?:am|pm))\\s*(?:(?:to|\\-)\\s*(${Ga.ORDINAL_NUMBER_PATTERN})\\s*)?(?:(?:-|/|\\s*,?\\s*)(${kh.YEAR_PATTERN}))?(?=\\W|$)(?!\\:\\d)`,"i"),zv=1,Vv=2,vh=3,wh=4,al=class extends Bv.AbstractParserWithWordBoundaryChecking{innerPattern(){return Hv}innerExtract(e,t){let n=Eh.MONTH_DICTIONARY[t[zv].toLowerCase()],i=Ga.parseOrdinalNumberPattern(t[Vv]);if(i>31)return null;let s=e.createParsingComponents({day:i,month:n});if(t[wh]){let u=kh.parseYear(t[wh]);s.assign("year",u)}else{let u=jv.findYearClosestToRef(e.refDate,i,n);s.imply("year",u)}if(!t[vh])return s;let a=Ga.parseOrdinalNumberPattern(t[vh]),o=e.createParsingResult(t.index,t[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",a),o}};ol.default=al});var xh=_(cl=>{"use strict";Object.defineProperty(cl,"__esModule",{value:!0});var ul=at(),Kv=st(),Qv=Ee(),Dh=at(),Xv=q(),Zv=new RegExp(`((?:in)\\s*)?(${Qv.matchAnyPattern(ul.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${Dh.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),Jv=1,ew=2,Oh=3,ll=class extends Xv.AbstractParserWithWordBoundaryChecking{innerPattern(){return Zv}innerExtract(e,t){let n=t[ew].toLowerCase();if(t[0].length<=3&&!ul.FULL_MONTH_NAME_DICTIONARY[n])return null;let i=e.createParsingResult(t.index+(t[Jv]||"").length,t.index+t[0].length);i.start.imply("day",1);let s=ul.MONTH_DICTIONARY[n];if(i.start.assign("month",s),t[Oh]){let a=Dh.parseYear(t[Oh]);i.start.assign("year",a)}else{let a=Kv.findYearClosestToRef(e.refDate,1,s);i.start.imply("year",a)}return i}};cl.default=ll});var Ch=_(fl=>{"use strict";Object.defineProperty(fl,"__esModule",{value:!0});var Mh=at(),tw=Ee(),rw=q(),nw=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${tw.matchAnyPattern(Mh.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),iw=1,sw=2,Rh=3,aw=4,dl=class extends rw.AbstractParserWithWordBoundaryChecking{innerPattern(){return nw}innerExtract(e,t){let n=t[Rh]?parseInt(t[Rh]):Mh.MONTH_DICTIONARY[t[sw].toLowerCase()];if(n<1||n>12)return null;let i=parseInt(t[iw]);return{day:parseInt(t[aw]),month:n,year:i}}};fl.default=dl});var Ah=_(hl=>{"use strict";Object.defineProperty(hl,"__esModule",{value:!0});var ow=q(),uw=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),lw=1,cw=2,pl=class extends ow.AbstractParserWithWordBoundaryChecking{innerPattern(){return uw}innerExtract(e,t){let n=parseInt(t[cw]),i=parseInt(t[lw]);return e.createParsingComponents().imply("day",1).assign("month",i).assign("year",n)}};hl.default=pl});var Dn=_(za=>{"use strict";Object.defineProperty(za,"__esModule",{value:!0});za.AbstractTimeExpressionParser=void 0;var wt=Be();function dw(r,e,t,n){return new RegExp(`${r}${e}(\\d{1,4})(?:(?:\\.|:|\uFF1A)(\\d{1,2})(?:(?::|\uFF1A)(\\d{2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${t}`,n)}function fw(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 Ph=2,ui=3,Ba=4,Ha=5,us=6,ml=class{constructor(e=!1){this.cachedPrimaryPrefix=null,this.cachedPrimarySuffix=null,this.cachedPrimaryTimePattern=null,this.cachedFollowingPhase=null,this.cachedFollowingSuffix=null,this.cachedFollowingTimePatten=null,this.strictMode=e}patternFlags(){return"i"}primaryPatternLeftBoundary(){return"(^|\\s|T|\\b)"}primarySuffix(){return"(?=\\W|$)"}followingSuffix(){return"(?=\\W|$)"}pattern(e){return this.getPrimaryTimePatternThroughCache()}extract(e,t){let n=this.extractPrimaryTimeComponents(e,t);if(!n)return t.index+=t[0].length,null;let i=t.index+t[1].length,s=t[0].substring(t[1].length),a=e.createParsingResult(i,s,n);t.index+=t[0].length;let o=e.text.substring(t.index),l=this.getFollowingTimePatternThroughCache().exec(o);return s.match(/^\d{3,4}/)&&l&&l[0].match(/^\s*([+-])\s*\d{2,4}$/)?null:!l||l[0].match(/^\s*([+-])\s*\d{3,4}$/)?this.checkAndReturnWithoutFollowingPattern(a):(a.end=this.extractFollowingTimeComponents(e,l,a),a.end&&(a.text+=l[0]),this.checkAndReturnWithFollowingPattern(a))}extractPrimaryTimeComponents(e,t,n=!1){let i=e.createParsingComponents(),s=0,a=null,o=parseInt(t[Ph]);if(o>100){if(this.strictMode||t[ui]!=null)return null;s=o%100,o=Math.floor(o/100)}if(o>24)return null;if(t[ui]!=null){if(t[ui].length==1&&!t[us])return null;s=parseInt(t[ui])}if(s>=60)return null;if(o>12&&(a=wt.Meridiem.PM),t[us]!=null){if(o>12)return null;let u=t[us][0].toLowerCase();u=="a"&&(a=wt.Meridiem.AM,o==12&&(o=0)),u=="p"&&(a=wt.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",wt.Meridiem.AM):i.imply("meridiem",wt.Meridiem.PM),t[Ha]!=null){let u=parseInt(t[Ha].substring(0,3));if(u>=1e3)return null;i.assign("millisecond",u)}if(t[Ba]!=null){let u=parseInt(t[Ba]);if(u>=60)return null;i.assign("second",u)}return i}extractFollowingTimeComponents(e,t,n){let i=e.createParsingComponents();if(t[Ha]!=null){let u=parseInt(t[Ha].substring(0,3));if(u>=1e3)return null;i.assign("millisecond",u)}if(t[Ba]!=null){let u=parseInt(t[Ba]);if(u>=60)return null;i.assign("second",u)}let s=parseInt(t[Ph]),a=0,o=-1;if(t[ui]!=null?a=parseInt(t[ui]):s>100&&(a=s%100,s=Math.floor(s/100)),a>=60||s>24)return null;if(s>=12&&(o=wt.Meridiem.PM),t[us]!=null){if(s>12)return null;let u=t[us][0].toLowerCase();u=="a"&&(o=wt.Meridiem.AM,s==12&&(s=0,i.isCertain("day")||i.imply("day",i.get("day")+1))),u=="p"&&(o=wt.Meridiem.PM,s!=12&&(s+=12)),n.start.isCertain("meridiem")||(o==wt.Meridiem.AM?(n.start.imply("meridiem",wt.Meridiem.AM),n.start.get("hour")==12&&n.start.assign("hour",0)):(n.start.imply("meridiem",wt.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",wt.Meridiem.AM):s<=12&&(i.assign("hour",s+12),i.assign("meridiem",wt.Meridiem.PM)):s>12?i.imply("meridiem",wt.Meridiem.PM):s<=12&&i.imply("meridiem",wt.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=dw(this.primaryPatternLeftBoundary(),e,t,this.patternFlags()),this.cachedPrimaryPrefix=e,this.cachedPrimarySuffix=t,this.cachedPrimaryTimePattern)}getFollowingTimePatternThroughCache(){let e=this.followingPhase(),t=this.followingSuffix();return this.cachedFollowingPhase===e&&this.cachedFollowingSuffix===t?this.cachedFollowingTimePatten:(this.cachedFollowingTimePatten=fw(e,t),this.cachedFollowingPhase=e,this.cachedFollowingSuffix=t,this.cachedFollowingTimePatten)}};za.AbstractTimeExpressionParser=ml});var Nh=_(yl=>{"use strict";Object.defineProperty(yl,"__esModule",{value:!0});var Va=Be(),pw=Dn(),gl=class extends pw.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",Va.Meridiem.PM)):i<6&&n.assign("meridiem",Va.Meridiem.AM)}if(t[0].endsWith("afternoon")){n.assign("meridiem",Va.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",Va.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};yl.default=gl});var Bt=_(li=>{"use strict";Object.defineProperty(li,"__esModule",{value:!0});li.addImpliedTimeUnits=li.reverseTimeUnits=void 0;function hw(r){let e={};for(let t in r)e[t]=-r[t];return e}li.reverseTimeUnits=hw;function mw(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}li.addImpliedTimeUnits=mw});var Ih=_(_l=>{"use strict";Object.defineProperty(_l,"__esModule",{value:!0});var bl=at(),gw=Ie(),yw=q(),Tw=Bt(),bw=new RegExp(`(${bl.TIME_UNITS_PATTERN})\\s{0,5}(?:ago|before|earlier)(?=(?:\\W|$))`,"i"),_w=new RegExp(`(${bl.TIME_UNITS_PATTERN})\\s{0,5}ago(?=(?:\\W|$))`,"i"),Tl=class extends yw.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?_w:bw}innerExtract(e,t){let n=bl.parseTimeUnits(t[1]),i=Tw.reverseTimeUnits(n);return gw.ParsingComponents.createRelativeFromReference(e.reference,i)}};_l.default=Tl});var Fh=_(El=>{"use strict";Object.defineProperty(El,"__esModule",{value:!0});var wl=at(),vw=Ie(),ww=q(),Ew=new RegExp(`(${wl.TIME_UNITS_PATTERN})\\s{0,5}(?:later|after|from now|henceforth|forward|out)(?=(?:\\W|$))`,"i"),kw=new RegExp("("+wl.TIME_UNITS_PATTERN+")(later|from now)(?=(?:\\W|$))","i"),Sw=1,vl=class extends ww.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?kw:Ew}innerExtract(e,t){let n=wl.parseTimeUnits(t[Sw]);return vw.ParsingComponents.createRelativeFromReference(e.reference,n)}};El.default=vl});var di=_(ci=>{"use strict";Object.defineProperty(ci,"__esModule",{value:!0});ci.MergingRefiner=ci.Filter=void 0;var kl=class{refine(e,t){return t.filter(n=>this.isValid(e,n))}};ci.Filter=kl;var Sl=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 ${c}`)}),i=c}}return i!=null&&n.push(i),n}};ci.MergingRefiner=Sl});var Tr=_(Dl=>{"use strict";Object.defineProperty(Dl,"__esModule",{value:!0});var Ow=di(),Ol=class extends Ow.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 Dw=ls&&ls.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ls,"__esModule",{value:!0});var xw=Dw(Tr()),xl=class extends xw.default{patternBetween(){return/^\s*(to|-)\s*$/i}};ls.default=xl});var Uh=_(fi=>{"use strict";Object.defineProperty(fi,"__esModule",{value:!0});fi.mergeDateTimeComponent=fi.mergeDateTimeResult=void 0;var Rw=Be();function Mw(r,e){let t=r.clone(),n=r.start,i=e.start;if(t.start=Rl(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=Rl(s,a);r.end==null&&o.date().getTime(){"use strict";Object.defineProperty(Cl,"__esModule",{value:!0});var Cw=di(),Wh=Uh(),Ml=class extends Cw.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()?Wh.mergeDateTimeResult(t,n):Wh.mergeDateTimeResult(n,t);return i.index=t.index,i.text=t.text+e+n.text,i}};Cl.default=Ml});var qh=_(cs=>{"use strict";var Aw=cs&&cs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(cs,"__esModule",{value:!0});var Pw=Aw(Cr()),Al=class extends Pw.default{patternBetween(){return new RegExp("^\\s*(T|at|after|before|on|of|,|-)?\\s*$")}};cs.default=Al});var $h=_(Nl=>{"use strict";Object.defineProperty(Nl,"__esModule",{value:!0});var Nw=new RegExp("^\\s*,?\\s*\\(?([A-Z]{2,4})\\)?(?=\\W|$)","i"),Iw={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},Pl=class{constructor(e){this.timezone=Object.assign(Object.assign({},Iw),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=Nw.exec(u);if(!l)return;let c=l[1].toUpperCase(),f=(o=(a=i[c])!==null&&a!==void 0?a:this.timezone[c])!==null&&o!==void 0?o:null;if(f===null)return;e.debug(()=>{console.log(`Extracting timezone: '${c}' into: ${f} for: ${s.start}`)});let h=s.start.get("timezoneOffset");h!==null&&f!=h&&(s.start.isCertain("timezoneOffset")||c!=l[1])||s.start.isOnlyDate()&&c!=l[1]||(s.text+=l[0],s.start.isCertain("timezoneOffset")||s.start.assign("timezoneOffset",f),s.end!=null&&!s.end.isCertain("timezoneOffset")&&s.end.assign("timezoneOffset",f))}),t}};Nl.default=Pl});var Ka=_(Fl=>{"use strict";Object.defineProperty(Fl,"__esModule",{value:!0});var Fw=new RegExp("^\\s*(?:\\(?(?:GMT|UTC)\\s?)?([+-])(\\d{1,2})(?::?(\\d{2}))?\\)?","i"),Lw=1,Uw=2,Ww=3,Il=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=Fw.exec(i);if(!s)return;e.debug(()=>{console.log(`Extracting timezone: '${s[0]}' into : ${n}`)});let a=parseInt(s[Uw]),o=parseInt(s[Ww]||"0"),u=a*60+o;u>14*60||(s[Lw]==="-"&&(u=-u),n.end!=null&&n.end.assign("timezoneOffset",u),n.start.assign("timezoneOffset",u),n.text+=s[0])}),t}};Fl.default=Il});var Yh=_(Ul=>{"use strict";Object.defineProperty(Ul,"__esModule",{value:!0});var Ll=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}};Ul.default=Ll});var jh=_(ds=>{"use strict";var qw=ds&&ds.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ds,"__esModule",{value:!0});var $w=qw(ye()),Wl=class{refine(e,t){return e.option.forwardDate&&t.forEach(function(n){let i=$w.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}};ds.default=Wl});var Gh=_($l=>{"use strict";Object.defineProperty($l,"__esModule",{value:!0});var Yw=di(),ql=class extends Yw.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}};$l.default=ql});var Gl=_(jl=>{"use strict";Object.defineProperty(jl,"__esModule",{value:!0});var jw=q(),Gw=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"),Bw=1,Hw=2,zw=3,Bh=4,Vw=5,Hh=6,zh=7,Vh=8,Kh=9,Yl=class extends jw.AbstractParserWithWordBoundaryChecking{innerPattern(){return Gw}innerExtract(e,t){let n={};if(n.year=parseInt(t[Bw]),n.month=parseInt(t[Hw]),n.day=parseInt(t[zw]),t[Bh]!=null)if(n.hour=parseInt(t[Bh]),n.minute=parseInt(t[Vw]),t[Hh]!=null&&(n.second=parseInt(t[Hh])),t[zh]!=null&&(n.millisecond=parseInt(t[zh])),t[Vh]==null)n.timezoneOffset=0;else{let i=parseInt(t[Vh]),s=0;t[Kh]!=null&&(s=parseInt(t[Kh]));let a=i*60;a<0?a-=s:a+=s,n.timezoneOffset=a}return n}};jl.default=Yl});var Qh=_(Hl=>{"use strict";Object.defineProperty(Hl,"__esModule",{value:!0});var Kw=di(),Bl=class extends Kw.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}};Hl.default=Bl});var Ar=_(pi=>{"use strict";var xn=pi&&pi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(pi,"__esModule",{value:!0});pi.includeCommonConfiguration=void 0;var Qw=xn($h()),Xw=xn(Ka()),Xh=xn(Yh()),Zw=xn(jh()),Jw=xn(Gh()),eE=xn(Gl()),tE=xn(Qh());function rE(r,e=!1){return r.parsers.unshift(new eE.default),r.refiners.unshift(new tE.default),r.refiners.unshift(new Qw.default),r.refiners.unshift(new Xw.default),r.refiners.unshift(new Xh.default),r.refiners.push(new Xh.default),r.refiners.push(new Zw.default),r.refiners.push(new Jw.default(e)),r}pi.includeCommonConfiguration=rE});var Nr=_(_e=>{"use strict";var nE=_e&&_e.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(_e,"__esModule",{value:!0});_e.noon=_e.morning=_e.midnight=_e.yesterdayEvening=_e.evening=_e.lastNight=_e.tonight=_e.theDayAfter=_e.tomorrow=_e.theDayBefore=_e.yesterday=_e.today=_e.now=void 0;var br=Ie(),hi=nE(ye()),Pr=Gt(),fs=Be();function iE(r){let e=hi.default(r.instant),t=new br.ParsingComponents(r,{});return Pr.assignSimilarDate(t,e),Pr.assignSimilarTime(t,e),r.timezoneOffset!==null&&t.assign("timezoneOffset",e.utcOffset()),t}_e.now=iE;function sE(r){let e=hi.default(r.instant),t=new br.ParsingComponents(r,{});return Pr.assignSimilarDate(t,e),Pr.implySimilarTime(t,e),t}_e.today=sE;function aE(r){return Zh(r,1)}_e.yesterday=aE;function Zh(r,e){return zl(r,-e)}_e.theDayBefore=Zh;function oE(r){return zl(r,1)}_e.tomorrow=oE;function zl(r,e){let t=hi.default(r.instant),n=new br.ParsingComponents(r,{});return t=t.add(e,"day"),Pr.assignSimilarDate(n,t),Pr.implySimilarTime(n,t),n}_e.theDayAfter=zl;function uE(r,e=22){let t=hi.default(r.instant),n=new br.ParsingComponents(r,{});return n.imply("hour",e),n.imply("meridiem",fs.Meridiem.PM),Pr.assignSimilarDate(n,t),n}_e.tonight=uE;function lE(r,e=0){let t=hi.default(r.instant),n=new br.ParsingComponents(r,{});return t.hour()<6&&(t=t.add(-1,"day")),Pr.assignSimilarDate(n,t),n.imply("hour",e),n}_e.lastNight=lE;function cE(r,e=20){let t=new br.ParsingComponents(r,{});return t.imply("meridiem",fs.Meridiem.PM),t.imply("hour",e),t}_e.evening=cE;function dE(r,e=20){let t=hi.default(r.instant),n=new br.ParsingComponents(r,{});return t=t.add(-1,"day"),Pr.assignSimilarDate(n,t),n.imply("hour",e),n.imply("meridiem",fs.Meridiem.PM),n}_e.yesterdayEvening=dE;function fE(r){let e=new br.ParsingComponents(r,{});return e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e}_e.midnight=fE;function pE(r,e=6){let t=new br.ParsingComponents(r,{});return t.imply("meridiem",fs.Meridiem.AM),t.imply("hour",e),t}_e.morning=pE;function hE(r){let e=new br.ParsingComponents(r,{});return e.imply("meridiem",fs.Meridiem.AM),e.imply("hour",12),e}_e.noon=hE});var Jh=_(rr=>{"use strict";var mE=rr&&rr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),gE=rr&&rr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),yE=rr&&rr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&mE(e,r,t);return gE(e,r),e},TE=rr&&rr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(rr,"__esModule",{value:!0});var bE=TE(ye()),_E=q(),vE=Gt(),ps=yE(Nr()),wE=/(now|today|tonight|tomorrow|tmr|tmrw|yesterday|last\s*night)(?=\W|$)/i,Vl=class extends _E.AbstractParserWithWordBoundaryChecking{innerPattern(e){return wE}innerExtract(e,t){let n=bE.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();switch(i){case"now":return ps.now(e.reference);case"today":return ps.today(e.reference);case"yesterday":return ps.yesterday(e.reference);case"tomorrow":case"tmr":case"tmrw":return ps.tomorrow(e.reference);case"tonight":return ps.tonight(e.reference);default:i.match(/last\s*night/)&&(n.hour()>6&&(n=n.add(-1,"day")),vE.assignSimilarDate(s,n),s.imply("hour",0));break}return s}};rr.default=Vl});var em=_(hs=>{"use strict";var EE=hs&&hs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(hs,"__esModule",{value:!0});var Qa=Be(),kE=q(),SE=EE(ye()),OE=Gt(),DE=/(?:this)?\s{0,3}(morning|afternoon|evening|night|midnight|noon)(?=\W|$)/i,Kl=class extends kE.AbstractParserWithWordBoundaryChecking{innerPattern(){return DE}innerExtract(e,t){let n=SE.default(e.refDate),i=e.createParsingComponents();switch(t[1].toLowerCase()){case"afternoon":i.imply("meridiem",Qa.Meridiem.PM),i.imply("hour",15);break;case"evening":case"night":i.imply("meridiem",Qa.Meridiem.PM),i.imply("hour",20);break;case"midnight":OE.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"morning":i.imply("meridiem",Qa.Meridiem.AM),i.imply("hour",6);break;case"noon":i.imply("meridiem",Qa.Meridiem.AM),i.imply("hour",12);break}return i}};hs.default=Kl});var Rn=_(sn=>{"use strict";var xE=sn&&sn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(sn,"__esModule",{value:!0});sn.toDayJSClosestWeekday=sn.toDayJSWeekday=void 0;var tm=xE(ye());function RE(r,e,t){if(!t)return rm(r,e);let n=tm.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}sn.toDayJSWeekday=RE;function rm(r,e){let t=tm.default(r),n=t.day();return Math.abs(e-7-n){"use strict";Object.defineProperty(Xl,"__esModule",{value:!0});var nm=at(),ME=Ee(),CE=q(),AE=Rn(),PE=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:on\\s*?)?(?:(this|last|past|next)\\s*)?(${ME.matchAnyPattern(nm.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(this|last|past|next)\\s*week)?(?=\\W|$)`,"i"),NE=1,IE=2,FE=3,Ql=class extends CE.AbstractParserWithWordBoundaryChecking{innerPattern(){return PE}innerExtract(e,t){let n=t[IE].toLowerCase(),i=nm.WEEKDAY_DICTIONARY[n],s=t[NE],a=t[FE],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=AE.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Xl.default=Ql});var om=_(ms=>{"use strict";var LE=ms&&ms.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ms,"__esModule",{value:!0});var am=at(),sm=Ie(),UE=LE(ye()),WE=q(),qE=Ee(),$E=new RegExp(`(this|last|past|next|after\\s*this)\\s*(${qE.matchAnyPattern(am.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),YE=1,jE=2,Zl=class extends WE.AbstractParserWithWordBoundaryChecking{innerPattern(){return $E}innerExtract(e,t){let n=t[YE].toLowerCase(),i=t[jE].toLowerCase(),s=am.TIME_UNIT_DICTIONARY[i];if(n=="next"||n.startsWith("after")){let u={};return u[s]=1,sm.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="last"||n=="past"){let u={};return u[s]=-1,sm.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=UE.default(e.reference.instant);return i.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):i.match(/month/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):i.match(/year/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};ms.default=Zl});var nr=_(yi=>{"use strict";Object.defineProperty(yi,"__esModule",{value:!0});yi.ParsingContext=yi.Chrono=void 0;var mi=Ie(),GE=Jl(),gi=class{constructor(e){e=e||GE.createCasualConfiguration(),this.parsers=[...e.parsers],this.refiners=[...e.refiners]}clone(){return new gi({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 Xa(e,t,n),s=[];return this.parsers.forEach(a=>{let o=gi.executeParser(i,a);s=s.concat(o)}),s.sort((a,o)=>a.index-o.index),this.refiners.forEach(function(a){s=a.refine(i,s)}),s}static executeParser(e,t){let n=[],i=t.pattern(e),s=e.text,a=e.text,o=i.exec(a);for(;o;){let u=o.index+s.length-a.length;o.index=u;let l=t.extract(e,o);if(!l){a=s.substring(o.index+1),o=i.exec(a);continue}let c=null;l instanceof mi.ParsingResult?c=l:l instanceof mi.ParsingComponents?(c=e.createParsingResult(o.index,o[0]),c.start=l):c=e.createParsingResult(o.index,o[0],l),e.debug(()=>console.log(`${t.constructor.name} extracted result ${c}`)),n.push(c),a=s.substring(u+c.text.length),o=i.exec(a)}return n}};yi.Chrono=gi;var Xa=class{constructor(e,t,n){this.text=e,this.reference=new mi.ReferenceWithTimezone(t),this.option=n!=null?n:{},this.refDate=this.reference.instant}createParsingComponents(e){return e instanceof mi.ParsingComponents?e:new mi.ParsingComponents(this.reference,e)}createParsingResult(e,t,n,i){let s=typeof t=="string"?t:this.text.substring(e,t),a=n?this.createParsingComponents(n):null,o=i?this.createParsingComponents(i):null;return new mi.ParsingResult(this.reference,e,s,a,o)}debug(e){this.option.debug&&(this.option.debug instanceof Function?this.option.debug(e):this.option.debug.debug(e))}};yi.ParsingContext=Xa});var Mn=_(rc=>{"use strict";Object.defineProperty(rc,"__esModule",{value:!0});var um=st(),BE=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"),Za=1,lm=5,cm=2,dm=3,ec=4,tc=class{constructor(e){this.groupNumberMonth=e?dm:cm,this.groupNumberDay=e?cm:dm}pattern(){return BE}extract(e,t){if(t[Za]=="/"||t[lm]=="/"){t.index+=t[0].length;return}let n=t.index+t[Za].length,i=t[0].substr(t[Za].length,t[0].length-t[Za].length-t[lm].length);if(i.match(/^\d\.\d$/)||i.match(/^\d\.\d{1,2}\.\d{1,2}\s*$/)||!t[ec]&&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[ec]){let u=parseInt(t[ec]),l=um.findMostLikelyADYear(u);s.start.assign("year",l)}else{let u=um.findYearClosestToRef(e.refDate,o,a);s.start.imply("year",u)}return s}};rc.default=tc});var pm=_(ic=>{"use strict";Object.defineProperty(ic,"__esModule",{value:!0});var fm=at(),HE=Ie(),zE=q(),VE=Bt(),KE=new RegExp(`(this|last|past|next|after|\\+|-)\\s*(${fm.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),nc=class extends zE.AbstractParserWithWordBoundaryChecking{innerPattern(){return KE}innerExtract(e,t){let n=t[1].toLowerCase(),i=fm.parseTimeUnits(t[2]);switch(n){case"last":case"past":case"-":i=VE.reverseTimeUnits(i);break}return HE.ParsingComponents.createRelativeFromReference(e.reference,i)}};ic.default=nc});var mm=_(oc=>{"use strict";Object.defineProperty(oc,"__esModule",{value:!0});var QE=di(),sc=Ie(),XE=at(),ZE=Bt();function hm(r){return r.text.match(/\s+(before|from)$/i)!=null}function JE(r){return r.text.match(/\s+(after|since)$/i)!=null}var ac=class extends QE.MergingRefiner{patternBetween(){return/^\s*$/i}shouldMergeResults(e,t,n){return!e.match(this.patternBetween())||!hm(t)&&!JE(t)?!1:!!n.start.get("day")&&!!n.start.get("month")&&!!n.start.get("year")}mergeResults(e,t,n){let i=XE.parseTimeUnits(t.text);hm(t)&&(i=ZE.reverseTimeUnits(i));let s=sc.ParsingComponents.createRelativeFromReference(new sc.ReferenceWithTimezone(n.start.date()),i);return new sc.ParsingResult(n.reference,t.index,`${t.text}${e}${n.text}`,s)}};oc.default=ac});var Jl=_($e=>{"use strict";var ze=$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.GB=$e.strict=$e.casual=void 0;var ek=ze(hh()),tk=ze(_h()),rk=ze(Sh()),nk=ze(xh()),ik=ze(Ch()),sk=ze(Ah()),ak=ze(Nh()),ok=ze(Ih()),uk=ze(Fh()),lk=ze(Lh()),ck=ze(qh()),dk=Ar(),fk=ze(Jh()),pk=ze(em()),hk=ze(im()),mk=ze(om()),uc=nr(),gk=ze(Mn()),yk=ze(pm()),Tk=ze(mm());$e.casual=new uc.Chrono(gm(!1));$e.strict=new uc.Chrono(Ja(!0,!1));$e.GB=new uc.Chrono(Ja(!1,!0));function bk(r,e,t){return $e.casual.parse(r,e,t)}$e.parse=bk;function _k(r,e,t){return $e.casual.parseDate(r,e,t)}$e.parseDate=_k;function gm(r=!1){let e=Ja(!1,r);return e.parsers.unshift(new fk.default),e.parsers.unshift(new pk.default),e.parsers.unshift(new nk.default),e.parsers.unshift(new mk.default),e.parsers.unshift(new yk.default),e}$e.createCasualConfiguration=gm;function Ja(r=!0,e=!1){return dk.includeCommonConfiguration({parsers:[new gk.default(e),new ek.default,new tk.default,new rk.default,new hk.default,new ik.default,new sk.default,new ak.default(r),new ok.default(r),new uk.default(r)],refiners:[new Tk.default,new ck.default,new lk.default]},r)}$e.createConfiguration=Ja});var ym=_(cc=>{"use strict";Object.defineProperty(cc,"__esModule",{value:!0});var vk=Dn(),lc=class extends vk.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:um|von)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|bis)\\s*"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}};cc.default=lc});var gs=_(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.parseTimeUnits=Oe.TIME_UNITS_PATTERN=Oe.parseYear=Oe.YEAR_PATTERN=Oe.parseNumberPattern=Oe.NUMBER_PATTERN=Oe.TIME_UNIT_DICTIONARY=Oe.INTEGER_WORD_DICTIONARY=Oe.MONTH_DICTIONARY=Oe.WEEKDAY_DICTIONARY=void 0;var dc=Ee(),wk=st();Oe.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};Oe.MONTH_DICTIONARY={januar:1,j\u00E4nner:1,janner:1,jan:1,"jan.":1,februar:2,feber:2,feb:2,"feb.":2,m\u00E4rz:3,maerz:3,m\u00E4r:3,"m\xE4r.":3,mrz:3,"mrz.":3,april:4,apr:4,"apr.":4,mai:5,juni:6,jun:6,"jun.":6,juli:7,jul:7,"jul.":7,august:8,aug:8,"aug.":8,september:9,sep:9,"sep.":9,sept:9,"sept.":9,oktober:10,okt:10,"okt.":10,november:11,nov:11,"nov.":11,dezember:12,dez:12,"dez.":12};Oe.INTEGER_WORD_DICTIONARY={eins:1,eine:1,einem:1,einen:1,einer:1,zwei:2,drei:3,vier:4,f\u00FCnf:5,fuenf:5,sechs:6,sieben:7,acht:8,neun:9,zehn:10,elf:11,zw\u00F6lf:12,zwoelf:12};Oe.TIME_UNIT_DICTIONARY={sek:"second",sekunde:"second",sekunden:"second",min:"minute",minute:"minute",minuten:"minute",h:"hour",std:"hour",stunde:"hour",stunden:"hour",tag:"d",tage:"d",tagen:"d",woche:"week",wochen:"week",monat:"month",monate:"month",monaten:"month",monats:"month",quartal:"quarter",quartals:"quarter",quartale:"quarter",quartalen:"quarter",a:"year",j:"year",jr:"year",jahr:"year",jahre:"year",jahren:"year",jahres:"year"};Oe.NUMBER_PATTERN=`(?:${dc.matchAnyPattern(Oe.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s*an?)?|an?\\b(?:\\s*few)?|few|several|a?\\s*couple\\s*(?:of)?)`;function bm(r){let e=r.toLowerCase();return Oe.INTEGER_WORD_DICTIONARY[e]!==void 0?Oe.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)}Oe.parseNumberPattern=bm;Oe.YEAR_PATTERN="(?:[0-9]{1,4}(?:\\s*[vn]\\.?\\s*(?:C(?:hr)?|(?:u\\.?|d\\.?(?:\\s*g\\.?)?)?\\s*Z)\\.?|\\s*(?:u\\.?|d\\.?(?:\\s*g\\.)?)\\s*Z\\.?)?)";function Ek(r){if(/v/i.test(r))return-parseInt(r.replace(/[^0-9]+/gi,""));if(/n/i.test(r))return parseInt(r.replace(/[^0-9]+/gi,""));if(/z/i.test(r))return parseInt(r.replace(/[^0-9]+/gi,""));let e=parseInt(r);return wk.findMostLikelyADYear(e)}Oe.parseYear=Ek;var _m=`(${Oe.NUMBER_PATTERN})\\s{0,5}(${dc.matchAnyPattern(Oe.TIME_UNIT_DICTIONARY)})\\s{0,5}`,Tm=new RegExp(_m,"i");Oe.TIME_UNITS_PATTERN=dc.repeatedTimeunitPattern("",_m);function kk(r){let e={},t=r,n=Tm.exec(t);for(;n;)Sk(e,n),t=t.substring(n[0].length),n=Tm.exec(t);return e}Oe.parseTimeUnits=kk;function Sk(r,e){let t=bm(e[1]),n=Oe.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var wm=_(pc=>{"use strict";Object.defineProperty(pc,"__esModule",{value:!0});var vm=gs(),Ok=Ee(),Dk=q(),xk=Rn(),Rk=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:a[mn]\\s*?)?(?:(diese[mn]|letzte[mn]|n(?:\xE4|ae)chste[mn])\\s*)?(${Ok.matchAnyPattern(vm.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(diese|letzte|n(?:\xE4|ae)chste)\\s*woche)?(?=\\W|$)`,"i"),Mk=1,Ck=3,Ak=2,fc=class extends Dk.AbstractParserWithWordBoundaryChecking{innerPattern(){return Rk}innerExtract(e,t){let n=t[Ak].toLowerCase(),i=vm.WEEKDAY_DICTIONARY[n],s=t[Mk],a=t[Ck],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=xk.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};pc.default=fc});var Om=_(hc=>{"use strict";Object.defineProperty(hc,"__esModule",{value:!0});var an=Be(),Pk=new RegExp("(^|\\s|T)(?:(?:um|von)\\s*)?(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s)?)?(?:\\s*Uhr)?(?:\\s*(morgens|vormittags|nachmittags|abends|nachts|am\\s+(?:Morgen|Vormittag|Nachmittag|Abend)|in\\s+der\\s+Nacht))?(?=\\W|$)","i"),Nk=new RegExp("^\\s*(\\-|\\\u2013|\\~|\\\u301C|bis(?:\\s+um)?|\\?)\\s*(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s)?)?(?:\\s*Uhr)?(?:\\s*(morgens|vormittags|nachmittags|abends|nachts|am\\s+(?:Morgen|Vormittag|Nachmittag|Abend)|in\\s+der\\s+Nacht))?(?=\\W|$)","i"),Ik=2,Em=3,km=4,Sm=5,Ti=class{pattern(e){return Pk}extract(e,t){let n=e.createParsingResult(t.index+t[1].length,t[0].substring(t[1].length));if(n.text.match(/^\d{4}$/)||(n.start=Ti.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let i=e.text.substring(t.index+t[0].length),s=Nk.exec(i);return s&&(n.end=Ti.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[Ik]),t[Em]!=null&&(i=parseInt(t[Em])),i>=60||n>24)return null;if(n>=12&&(s=an.Meridiem.PM),t[Sm]!=null){if(n>12)return null;let a=t[Sm].toLowerCase();a.match(/morgen|vormittag/)&&(s=an.Meridiem.AM,n==12&&(n=0)),a.match(/nachmittag|abend/)&&(s=an.Meridiem.PM,n!=12&&(n+=12)),a.match(/nacht/)&&(n==12?(s=an.Meridiem.AM,n=0):n<6?s=an.Meridiem.AM:(s=an.Meridiem.PM,n+=12))}if(e.assign("hour",n),e.assign("minute",i),s!==null?e.assign("meridiem",s):n<12?e.imply("meridiem",an.Meridiem.AM):e.imply("meridiem",an.Meridiem.PM),t[km]!=null){let a=parseInt(t[km]);if(a>=60)return null;e.assign("second",a)}return e}};hc.default=Ti});var Dm=_(ys=>{"use strict";var Fk=ys&&ys.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ys,"__esModule",{value:!0});var Lk=Fk(Tr()),mc=class extends Lk.default{patternBetween(){return/^\s*(bis(?:\s*(?:am|zum))?|-)\s*$/i}};ys.default=mc});var xm=_(Ts=>{"use strict";var Uk=Ts&&Ts.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ts,"__esModule",{value:!0});var Wk=Uk(Cr()),gc=class extends Wk.default{patternBetween(){return new RegExp("^\\s*(T|um|am|,|-)?\\s*$")}};Ts.default=gc});var yc=_(_s=>{"use strict";var qk=_s&&_s.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(_s,"__esModule",{value:!0});var $k=qk(ye()),Cn=Be(),Yk=q(),jk=Gt(),Gk=Bt(),bs=class extends Yk.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(diesen)?\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht)(?=\W|$)/i}innerExtract(e,t){let n=$k.default(e.refDate),i=t[2].toLowerCase(),s=e.createParsingComponents();return jk.implySimilarTime(s,n),bs.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",Cn.Meridiem.AM);break;case"vormittag":e.imply("hour",9),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Cn.Meridiem.AM);break;case"mittag":case"mittags":e.imply("hour",12),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Cn.Meridiem.AM);break;case"nachmittag":e.imply("hour",15),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Cn.Meridiem.PM);break;case"abend":e.imply("hour",18),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Cn.Meridiem.PM);break;case"nacht":e.imply("hour",22),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Cn.Meridiem.PM);break;case"mitternacht":e.get("hour")>1&&(e=Gk.addImpliedTimeUnits(e,{day:1})),e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Cn.Meridiem.AM);break}return e}};_s.default=bs});var Cm=_(ir=>{"use strict";var Bk=ir&&ir.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Hk=ir&&ir.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),zk=ir&&ir.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&Bk(e,r,t);return Hk(e,r),e},Mm=ir&&ir.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ir,"__esModule",{value:!0});var Vk=Mm(ye()),Kk=q(),An=Gt(),Qk=Mm(yc()),Rm=zk(Nr()),Xk=new RegExp("(jetzt|heute|morgen|\xFCbermorgen|uebermorgen|gestern|vorgestern|letzte\\s*nacht)(?:\\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht))?(?=\\W|$)","i"),Zk=1,Jk=2,Tc=class extends Kk.AbstractParserWithWordBoundaryChecking{innerPattern(e){return Xk}innerExtract(e,t){let n=Vk.default(e.refDate),i=(t[Zk]||"").toLowerCase(),s=(t[Jk]||"").toLowerCase(),a=e.createParsingComponents();switch(i){case"jetzt":a=Rm.now(e.reference);break;case"heute":a=Rm.today(e.reference);break;case"morgen":An.assignTheNextDay(a,n);break;case"\xFCbermorgen":case"uebermorgen":n=n.add(1,"day"),An.assignTheNextDay(a,n);break;case"gestern":n=n.add(-1,"day"),An.assignSimilarDate(a,n),An.implySimilarTime(a,n);break;case"vorgestern":n=n.add(-2,"day"),An.assignSimilarDate(a,n),An.implySimilarTime(a,n);break;default:i.match(/letzte\s*nacht/)&&(n.hour()>6&&(n=n.add(-1,"day")),An.assignSimilarDate(a,n),a.imply("hour",0));break}return s&&(a=Qk.default.extractTimeComponents(a,s)),a}};ir.default=Tc});var Lm=_(_c=>{"use strict";Object.defineProperty(_c,"__esModule",{value:!0});var e1=st(),Im=gs(),Fm=gs(),t1=Ee(),r1=q(),n1=new RegExp(`(?:am\\s*?)?(?:den\\s*?)?([0-9]{1,2})\\.(?:\\s*(?:bis(?:\\s*(?:am|zum))?|\\-|\\\u2013|\\s)\\s*([0-9]{1,2})\\.?)?\\s*(${t1.matchAnyPattern(Im.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${Fm.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Am=1,Pm=2,i1=3,Nm=4,bc=class extends r1.AbstractParserWithWordBoundaryChecking{innerPattern(){return n1}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Im.MONTH_DICTIONARY[t[i1].toLowerCase()],s=parseInt(t[Am]);if(s>31)return t.index=t.index+t[Am].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[Nm]){let a=Fm.parseYear(t[Nm]);n.start.assign("year",a)}else{let a=e1.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[Pm]){let a=parseInt(t[Pm]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};_c.default=bc});var Um=_(wc=>{"use strict";Object.defineProperty(wc,"__esModule",{value:!0});var eo=gs(),s1=Ie(),a1=q(),o1=Bt(),u1=Ee(),vc=class extends a1.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:\\s*((?:n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?|vor|in)\\s*)?(${eo.NUMBER_PATTERN})?(?:\\s*(n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?)?\\s*(${u1.matchAnyPattern(eo.TIME_UNIT_DICTIONARY)})`,"i")}innerExtract(e,t){let n=t[2]?eo.parseNumberPattern(t[2]):1,i=eo.TIME_UNIT_DICTIONARY[t[4].toLowerCase()],s={};s[i]=n;let a=t[1]||t[3]||"";if(a=a.toLowerCase(),!!a)return(/vor/.test(a)||/letzte/.test(a)||/vergangen/.test(a))&&(s=o1.reverseTimeUnits(s)),s1.ParsingComponents.createRelativeFromReference(e.reference,s)}};wc.default=vc});var $m=_(Ve=>{"use strict";var sr=Ve&&Ve.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ve,"__esModule",{value:!0});Ve.createConfiguration=Ve.createCasualConfiguration=Ve.parseDate=Ve.parse=Ve.strict=Ve.casual=void 0;var l1=Ar(),Wm=nr(),c1=sr(Mn()),d1=sr(Gl()),f1=sr(ym()),p1=sr(wm()),h1=sr(Om()),m1=sr(Dm()),g1=sr(xm()),y1=sr(Cm()),T1=sr(yc()),b1=sr(Lm()),_1=sr(Um());Ve.casual=new Wm.Chrono(qm());Ve.strict=new Wm.Chrono(Ec(!0));function v1(r,e,t){return Ve.casual.parse(r,e,t)}Ve.parse=v1;function w1(r,e,t){return Ve.casual.parseDate(r,e,t)}Ve.parseDate=w1;function qm(r=!0){let e=Ec(!1,r);return e.parsers.unshift(new T1.default),e.parsers.unshift(new y1.default),e.parsers.unshift(new _1.default),e}Ve.createCasualConfiguration=qm;function Ec(r=!0,e=!0){return l1.includeCommonConfiguration({parsers:[new d1.default,new c1.default(e),new f1.default,new h1.default,new b1.default,new p1.default],refiners:[new m1.default,new g1.default]},r)}Ve.createConfiguration=Ec});var jm=_(ar=>{"use strict";var E1=ar&&ar.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),k1=ar&&ar.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),S1=ar&&ar.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&E1(e,r,t);return k1(e,r),e},O1=ar&&ar.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ar,"__esModule",{value:!0});var D1=O1(ye()),x1=Be(),R1=q(),Ym=Gt(),to=S1(Nr()),kc=class extends R1.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(maintenant|aujourd'hui|demain|hier|cette\s*nuit|la\s*veille)(?=\W|$)/i}innerExtract(e,t){let n=D1.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();switch(i){case"maintenant":return to.now(e.reference);case"aujourd'hui":return to.today(e.reference);case"hier":return to.yesterday(e.reference);case"demain":return to.tomorrow(e.reference);default:i.match(/cette\s*nuit/)?(Ym.assignSimilarDate(s,n),s.imply("hour",22),s.imply("meridiem",x1.Meridiem.PM)):i.match(/la\s*veille/)&&(n=n.add(-1,"day"),Ym.assignSimilarDate(s,n),s.imply("hour",0))}return s}};ar.default=kc});var Gm=_(Oc=>{"use strict";Object.defineProperty(Oc,"__esModule",{value:!0});var vs=Be(),M1=q(),Sc=class extends M1.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(cet?)?\s*(matin|soir|après-midi|aprem|a midi|à minuit)(?=\W|$)/i}innerExtract(e,t){let n=t[2].toLowerCase(),i=e.createParsingComponents();switch(n){case"apr\xE8s-midi":case"aprem":i.imply("hour",14),i.imply("minute",0),i.imply("meridiem",vs.Meridiem.PM);break;case"soir":i.imply("hour",18),i.imply("minute",0),i.imply("meridiem",vs.Meridiem.PM);break;case"matin":i.imply("hour",8),i.imply("minute",0),i.imply("meridiem",vs.Meridiem.AM);break;case"a midi":i.imply("hour",12),i.imply("minute",0),i.imply("meridiem",vs.Meridiem.AM);break;case"\xE0 minuit":i.imply("hour",0),i.imply("meridiem",vs.Meridiem.AM);break}return i}};Oc.default=Sc});var Bm=_(xc=>{"use strict";Object.defineProperty(xc,"__esModule",{value:!0});var C1=Dn(),Dc=class extends C1.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)}};xc.default=Dc});var Hm=_(ws=>{"use strict";var A1=ws&&ws.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ws,"__esModule",{value:!0});var P1=A1(Cr()),Rc=class extends P1.default{patternBetween(){return new RegExp("^\\s*(T|\xE0|a|vers|de|,|-)?\\s*$")}};ws.default=Rc});var zm=_(Es=>{"use strict";var N1=Es&&Es.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Es,"__esModule",{value:!0});var I1=N1(Tr()),Mc=class extends I1.default{patternBetween(){return/^\s*(à|a|-)\s*$/i}};Es.default=Mc});var on=_(Te=>{"use strict";Object.defineProperty(Te,"__esModule",{value:!0});Te.parseTimeUnits=Te.TIME_UNITS_PATTERN=Te.parseYear=Te.YEAR_PATTERN=Te.parseOrdinalNumberPattern=Te.ORDINAL_NUMBER_PATTERN=Te.parseNumberPattern=Te.NUMBER_PATTERN=Te.TIME_UNIT_DICTIONARY=Te.INTEGER_WORD_DICTIONARY=Te.MONTH_DICTIONARY=Te.WEEKDAY_DICTIONARY=void 0;var Cc=Ee();Te.WEEKDAY_DICTIONARY={dimanche:0,dim:0,lundi:1,lun:1,mardi:2,mar:2,mercredi:3,mer:3,jeudi:4,jeu:4,vendredi:5,ven:5,samedi:6,sam:6};Te.MONTH_DICTIONARY={janvier:1,jan:1,"jan.":1,f\u00E9vrier:2,f\u00E9v:2,"f\xE9v.":2,fevrier:2,fev:2,"fev.":2,mars:3,mar:3,"mar.":3,avril:4,avr:4,"avr.":4,mai:5,juin:6,jun:6,juillet:7,juil:7,jul:7,"jul.":7,ao\u00FBt:8,aout:8,septembre:9,sep:9,"sep.":9,sept:9,"sept.":9,octobre:10,oct:10,"oct.":10,novembre:11,nov:11,"nov.":11,d\u00E9cembre:12,decembre:12,dec:12,"dec.":12};Te.INTEGER_WORD_DICTIONARY={un:1,deux:2,trois:3,quatre:4,cinq:5,six:6,sept:7,huit:8,neuf:9,dix:10,onze:11,douze:12,treize:13};Te.TIME_UNIT_DICTIONARY={sec:"second",seconde:"second",secondes:"second",min:"minute",mins:"minute",minute:"minute",minutes:"minute",h:"hour",hr:"hour",hrs:"hour",heure:"hour",heures:"hour",jour:"d",jours:"d",semaine:"week",semaines:"week",mois:"month",trimestre:"quarter",trimestres:"quarter",ans:"year",ann\u00E9e:"year",ann\u00E9es:"year"};Te.NUMBER_PATTERN=`(?:${Cc.matchAnyPattern(Te.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|une?\\b|quelques?|demi-?)`;function Km(r){let e=r.toLowerCase();return Te.INTEGER_WORD_DICTIONARY[e]!==void 0?Te.INTEGER_WORD_DICTIONARY[e]:e==="une"||e==="un"?1:e.match(/quelques?/)?3:e.match(/demi-?/)?.5:parseFloat(e)}Te.parseNumberPattern=Km;Te.ORDINAL_NUMBER_PATTERN="(?:[0-9]{1,2}(?:er)?)";function F1(r){let e=r.toLowerCase();return e=e.replace(/(?:er)$/i,""),parseInt(e)}Te.parseOrdinalNumberPattern=F1;Te.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:AC|AD|p\\.\\s*C(?:hr?)?\\.\\s*n\\.)|[1-2][0-9]{3}|[5-9][0-9])";function L1(r){if(/AC/i.test(r))return r=r.replace(/BC/i,""),-parseInt(r);if(/AD/i.test(r)||/C/i.test(r))return r=r.replace(/[^\d]+/i,""),parseInt(r);let e=parseInt(r);return e<100&&(e>50?e=e+1900:e=e+2e3),e}Te.parseYear=L1;var Qm=`(${Te.NUMBER_PATTERN})\\s{0,5}(${Cc.matchAnyPattern(Te.TIME_UNIT_DICTIONARY)})\\s{0,5}`,Vm=new RegExp(Qm,"i");Te.TIME_UNITS_PATTERN=Cc.repeatedTimeunitPattern("",Qm);function U1(r){let e={},t=r,n=Vm.exec(t);for(;n;)W1(e,n),t=t.substring(n[0].length),n=Vm.exec(t);return e}Te.parseTimeUnits=U1;function W1(r,e){let t=Km(e[1]),n=Te.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Zm=_(Pc=>{"use strict";Object.defineProperty(Pc,"__esModule",{value:!0});var Xm=on(),q1=Ee(),$1=q(),Y1=Rn(),j1=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(?:ce)\\s*)?(${q1.matchAnyPattern(Xm.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(dernier|prochain)\\s*)?(?=\\W|\\d|$)`,"i"),G1=1,B1=2,Ac=class extends $1.AbstractParserWithWordBoundaryChecking{innerPattern(){return j1}innerExtract(e,t){let n=t[G1].toLowerCase(),i=Xm.WEEKDAY_DICTIONARY[n];if(i===void 0)return null;let s=t[B1];s=s||"",s=s.toLowerCase();let a=null;s=="dernier"?a="last":s=="prochain"&&(a="next");let o=Y1.toDayJSWeekday(e.refDate,i,a);return e.createParsingComponents().assign("weekday",i).imply("day",o.date()).imply("month",o.month()+1).imply("year",o.year())}};Pc.default=Ac});var rg=_(Nc=>{"use strict";Object.defineProperty(Nc,"__esModule",{value:!0});var ks=Be(),H1=new RegExp("(^|\\s|T)(?:(?:[\xE0a])\\s*)?(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s|:)?)?(?:\\s*(A\\.M\\.|P\\.M\\.|AM?|PM?))?(?=\\W|$)","i"),z1=new RegExp("^\\s*(\\-|\\\u2013|\\~|\\\u301C|[\xE0a]|\\?)\\s*(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s|:)?)?(?:\\s*(A\\.M\\.|P\\.M\\.|AM?|PM?))?(?=\\W|$)","i"),V1=2,Jm=3,eg=4,tg=5,bi=class{pattern(e){return H1}extract(e,t){let n=e.createParsingResult(t.index+t[1].length,t[0].substring(t[1].length));if(n.text.match(/^\d{4}$/)||(n.start=bi.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let i=e.text.substring(t.index+t[0].length),s=z1.exec(i);return s&&(n.end=bi.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[V1]),t[Jm]!=null&&(i=parseInt(t[Jm])),i>=60||n>24)return null;if(n>=12&&(s=ks.Meridiem.PM),t[tg]!=null){if(n>12)return null;let a=t[tg][0].toLowerCase();a=="a"&&(s=ks.Meridiem.AM,n==12&&(n=0)),a=="p"&&(s=ks.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",ks.Meridiem.AM):e.imply("meridiem",ks.Meridiem.PM),t[eg]!=null){let a=parseInt(t[eg]);if(a>=60)return null;e.assign("second",a)}return e}};Nc.default=bi});var ug=_(Fc=>{"use strict";Object.defineProperty(Fc,"__esModule",{value:!0});var K1=st(),ag=on(),og=on(),ro=on(),Q1=Ee(),X1=q(),Z1=new RegExp(`(?:on\\s*?)?(${ro.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:au|\\-|\\\u2013|jusqu'au?|\\s)\\s*(${ro.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:de)?\\s*)(${Q1.matchAnyPattern(ag.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${og.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),ng=1,ig=2,J1=3,sg=4,Ic=class extends X1.AbstractParserWithWordBoundaryChecking{innerPattern(){return Z1}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=ag.MONTH_DICTIONARY[t[J1].toLowerCase()],s=ro.parseOrdinalNumberPattern(t[ng]);if(s>31)return t.index=t.index+t[ng].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[sg]){let a=og.parseYear(t[sg]);n.start.assign("year",a)}else{let a=K1.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[ig]){let a=ro.parseOrdinalNumberPattern(t[ig]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Fc.default=Ic});var cg=_(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});var lg=on(),eS=Ie(),tS=q(),rS=Bt(),Lc=class extends tS.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`il y a\\s*(${lg.TIME_UNITS_PATTERN})(?=(?:\\W|$))`,"i")}innerExtract(e,t){let n=lg.parseTimeUnits(t[1]),i=rS.reverseTimeUnits(n);return eS.ParsingComponents.createRelativeFromReference(e.reference,i)}};Uc.default=Lc});var fg=_(qc=>{"use strict";Object.defineProperty(qc,"__esModule",{value:!0});var dg=on(),nS=Ie(),iS=q(),Wc=class extends iS.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp(`(?:dans|en|pour|pendant|de)\\s*(${dg.TIME_UNITS_PATTERN})(?=\\W|$)`,"i")}innerExtract(e,t){let n=dg.parseTimeUnits(t[1]);return nS.ParsingComponents.createRelativeFromReference(e.reference,n)}};qc.default=Wc});var pg=_(Yc=>{"use strict";Object.defineProperty(Yc,"__esModule",{value:!0});var no=on(),sS=Ie(),aS=q(),oS=Bt(),uS=Ee(),$c=class extends aS.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:les?|la|l'|du|des?)\\s*(${no.NUMBER_PATTERN})?(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?\\s*(${uS.matchAnyPattern(no.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]?no.parseNumberPattern(t[1]):1,i=no.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=oS.reverseTimeUnits(s)),sS.ParsingComponents.createRelativeFromReference(e.reference,s)}};Yc.default=$c});var gg=_(Ke=>{"use strict";var Ht=Ke&&Ke.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ke,"__esModule",{value:!0});Ke.createConfiguration=Ke.createCasualConfiguration=Ke.parseDate=Ke.parse=Ke.strict=Ke.casual=void 0;var lS=Ar(),hg=nr(),cS=Ht(jm()),dS=Ht(Gm()),fS=Ht(Mn()),pS=Ht(Bm()),hS=Ht(Hm()),mS=Ht(zm()),gS=Ht(Zm()),yS=Ht(rg()),TS=Ht(ug()),bS=Ht(cg()),_S=Ht(fg()),vS=Ht(pg());Ke.casual=new hg.Chrono(mg());Ke.strict=new hg.Chrono(jc(!0));function wS(r,e,t){return Ke.casual.parse(r,e,t)}Ke.parse=wS;function ES(r,e,t){return Ke.casual.parseDate(r,e,t)}Ke.parseDate=ES;function mg(r=!0){let e=jc(!1,r);return e.parsers.unshift(new cS.default),e.parsers.unshift(new dS.default),e.parsers.unshift(new vS.default),e}Ke.createCasualConfiguration=mg;function jc(r=!0,e=!0){return lS.includeCommonConfiguration({parsers:[new fS.default(e),new TS.default,new pS.default,new yS.default,new bS.default,new _S.default,new gS.default],refiners:[new hS.default,new mS.default]},r)}Ke.createConfiguration=jc});var yg=_(io=>{"use strict";Object.defineProperty(io,"__esModule",{value:!0});io.toHankaku=void 0;function kS(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,SS)}io.toHankaku=kS;function SS(r){return String.fromCharCode(r.charCodeAt(0)-65248)}});var bg=_(Ss=>{"use strict";var OS=Ss&&Ss.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ss,"__esModule",{value:!0});var Gc=yg(),DS=st(),xS=OS(ye()),RS=/(?:(?:([同今本])|((昭和|平成|令和)?([0-90-9]{1,4}|元)))年\s*)?([0-90-9]{1,2})月\s*([0-90-9]{1,2})日/i,Tg=1,MS=2,Bc=3,CS=4,AS=5,PS=6,Hc=class{pattern(){return RS}extract(e,t){let n=parseInt(Gc.toHankaku(t[AS])),i=parseInt(Gc.toHankaku(t[PS])),s=e.createParsingComponents({day:i,month:n});if(t[Tg]&&t[Tg].match("\u540C|\u4ECA|\u672C")){let a=xS.default(e.refDate);s.assign("year",a.year())}if(t[MS]){let a=t[CS],o=a=="\u5143"?1:parseInt(Gc.toHankaku(a));t[Bc]=="\u4EE4\u548C"?o+=2018:t[Bc]=="\u5E73\u6210"?o+=1988:t[Bc]=="\u662D\u548C"&&(o+=1925),s.assign("year",o)}else{let a=DS.findYearClosestToRef(e.refDate,i,n);s.imply("year",a)}return s}};Ss.default=Hc});var _g=_(Os=>{"use strict";var NS=Os&&Os.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Os,"__esModule",{value:!0});var IS=NS(Tr()),zc=class extends IS.default{patternBetween(){return/^\s*(から|ー|-)\s*$/i}};Os.default=zc});var wg=_(or=>{"use strict";var FS=or&&or.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),LS=or&&or.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),US=or&&or.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&FS(e,r,t);return LS(e,r),e},WS=or&&or.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(or,"__esModule",{value:!0});var qS=WS(ye()),vg=Be(),Vc=US(Nr()),$S=/今日|当日|昨日|明日|今夜|今夕|今晩|今朝/i,Kc=class{pattern(){return $S}extract(e,t){let n=t[0],i=qS.default(e.refDate),s=e.createParsingComponents();switch(n){case"\u6628\u65E5":return Vc.yesterday(e.reference);case"\u660E\u65E5":return Vc.tomorrow(e.reference);case"\u4ECA\u65E5":case"\u5F53\u65E5":return Vc.today(e.reference)}return n=="\u4ECA\u591C"||n=="\u4ECA\u5915"||n=="\u4ECA\u6669"?(s.imply("hour",22),s.assign("meridiem",vg.Meridiem.PM)):n.match("\u4ECA\u671D")&&(s.imply("hour",6),s.assign("meridiem",vg.Meridiem.AM)),s.assign("day",i.date()),s.assign("month",i.month()+1),s.assign("year",i.year()),s}};or.default=Kc});var Sg=_(Qe=>{"use strict";var Qc=Qe&&Qe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Qe,"__esModule",{value:!0});Qe.createConfiguration=Qe.createCasualConfiguration=Qe.parseDate=Qe.parse=Qe.strict=Qe.casual=void 0;var YS=Qc(bg()),jS=Qc(_g()),GS=Qc(wg()),Eg=nr();Qe.casual=new Eg.Chrono(kg());Qe.strict=new Eg.Chrono(Xc());function BS(r,e,t){return Qe.casual.parse(r,e,t)}Qe.parse=BS;function HS(r,e,t){return Qe.casual.parseDate(r,e,t)}Qe.parseDate=HS;function kg(){let r=Xc();return r.parsers.unshift(new GS.default),r}Qe.createCasualConfiguration=kg;function Xc(){return{parsers:[new YS.default],refiners:[new jS.default]}}Qe.createConfiguration=Xc});var so=_(_r=>{"use strict";Object.defineProperty(_r,"__esModule",{value:!0});_r.parseYear=_r.YEAR_PATTERN=_r.MONTH_DICTIONARY=_r.WEEKDAY_DICTIONARY=void 0;_r.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};_r.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};_r.YEAR_PATTERN="[0-9]{1,4}(?![^\\s]\\d)(?:\\s*[a|d]\\.?\\s*c\\.?|\\s*a\\.?\\s*d\\.?)?";function zS(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)}_r.parseYear=zS});var Dg=_(Jc=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});var Og=so(),VS=Ee(),KS=q(),QS=Rn(),XS=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(este|esta|passado|pr[o\xF3]ximo)\\s*)?(${VS.matchAnyPattern(Og.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(este|esta|passado|pr[\xF3o]ximo)\\s*semana)?(?=\\W|\\d|$)`,"i"),ZS=1,JS=2,eO=3,Zc=class extends KS.AbstractParserWithWordBoundaryChecking{innerPattern(){return XS}innerExtract(e,t){let n=t[JS].toLowerCase(),i=Og.WEEKDAY_DICTIONARY[n];if(i===void 0)return null;let s=t[ZS],a=t[eO],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=QS.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Jc.default=Zc});var xg=_(td=>{"use strict";Object.defineProperty(td,"__esModule",{value:!0});var tO=Dn(),ed=class extends tO.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:ao?|\xE0s?|das|da|de|do)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|a(?:o)?|\\?)\\s*"}};td.default=ed});var Rg=_(Ds=>{"use strict";var rO=Ds&&Ds.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ds,"__esModule",{value:!0});var nO=rO(Cr()),rd=class extends nO.default{patternBetween(){return new RegExp("^\\s*(?:,|\xE0)?\\s*$")}};Ds.default=rd});var Mg=_(xs=>{"use strict";var iO=xs&&xs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(xs,"__esModule",{value:!0});var sO=iO(Tr()),nd=class extends sO.default{patternBetween(){return/^\s*(?:-)\s*$/i}};xs.default=nd});var Fg=_(sd=>{"use strict";Object.defineProperty(sd,"__esModule",{value:!0});var aO=st(),Ng=so(),Ig=so(),oO=Ee(),uO=q(),lO=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*)(${oO.matchAnyPattern(Ng.MONTH_DICTIONARY)})(?:\\s*(?:de|,)?\\s*(${Ig.YEAR_PATTERN}))?(?=\\W|$)`,"i"),Cg=1,Ag=2,cO=3,Pg=4,id=class extends uO.AbstractParserWithWordBoundaryChecking{innerPattern(){return lO}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Ng.MONTH_DICTIONARY[t[cO].toLowerCase()],s=parseInt(t[Cg]);if(s>31)return t.index=t.index+t[Cg].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[Pg]){let a=Ig.parseYear(t[Pg]);n.start.assign("year",a)}else{let a=aO.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[Ag]){let a=parseInt(t[Ag]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};sd.default=id});var Lg=_(Ir=>{"use strict";var dO=Ir&&Ir.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),fO=Ir&&Ir.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),pO=Ir&&Ir.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&dO(e,r,t);return fO(e,r),e};Object.defineProperty(Ir,"__esModule",{value:!0});var hO=q(),ao=pO(Nr()),ad=class extends hO.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 ao.now(e.reference);case"hoje":return ao.today(e.reference);case"amanha":case"amanh\xE3":return ao.tomorrow(e.reference);case"ontem":return ao.yesterday(e.reference)}return i}};Ir.default=ad});var Ug=_(Rs=>{"use strict";var mO=Rs&&Rs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Rs,"__esModule",{value:!0});var oo=Be(),gO=q(),yO=Gt(),TO=mO(ye()),od=class extends gO.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(?:esta\s*)?(manha|manhã|tarde|meia-noite|meio-dia|noite)(?=\W|$)/i}innerExtract(e,t){let n=TO.default(e.refDate),i=e.createParsingComponents();switch(t[1].toLowerCase()){case"tarde":i.imply("meridiem",oo.Meridiem.PM),i.imply("hour",15);break;case"noite":i.imply("meridiem",oo.Meridiem.PM),i.imply("hour",22);break;case"manha":case"manh\xE3":i.imply("meridiem",oo.Meridiem.AM),i.imply("hour",6);break;case"meia-noite":yO.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"meio-dia":i.imply("meridiem",oo.Meridiem.AM),i.imply("hour",12);break}return i}};Rs.default=od});var $g=_(Xe=>{"use strict";var un=Xe&&Xe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Xe,"__esModule",{value:!0});Xe.createConfiguration=Xe.createCasualConfiguration=Xe.parseDate=Xe.parse=Xe.strict=Xe.casual=void 0;var bO=Ar(),Wg=nr(),_O=un(Mn()),vO=un(Dg()),wO=un(xg()),EO=un(Rg()),kO=un(Mg()),SO=un(Fg()),OO=un(Lg()),DO=un(Ug());Xe.casual=new Wg.Chrono(qg());Xe.strict=new Wg.Chrono(ud(!0));function xO(r,e,t){return Xe.casual.parse(r,e,t)}Xe.parse=xO;function RO(r,e,t){return Xe.casual.parseDate(r,e,t)}Xe.parseDate=RO;function qg(r=!0){let e=ud(!1,r);return e.parsers.push(new OO.default),e.parsers.push(new DO.default),e}Xe.createCasualConfiguration=qg;function ud(r=!0,e=!0){return bO.includeCommonConfiguration({parsers:[new _O.default(e),new vO.default,new wO.default,new SO.default],refiners:[new EO.default,new kO.default]},r)}Xe.createConfiguration=ud});var Yg=_(Ms=>{"use strict";var MO=Ms&&Ms.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ms,"__esModule",{value:!0});var CO=MO(Tr()),ld=class extends CO.default{patternBetween(){return/^\s*(tot|-)\s*$/i}};Ms.default=ld});var jg=_(Cs=>{"use strict";var AO=Cs&&Cs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Cs,"__esModule",{value:!0});var PO=AO(Cr()),cd=class extends PO.default{patternBetween(){return new RegExp("^\\s*(om|na|voor|in de|,|-)?\\s*$")}};Cs.default=cd});var Gg=_(Fr=>{"use strict";var NO=Fr&&Fr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),IO=Fr&&Fr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),FO=Fr&&Fr.__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)&&NO(e,r,t);return IO(e,r),e};Object.defineProperty(Fr,"__esModule",{value:!0});var LO=q(),uo=FO(Nr()),dd=class extends LO.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 uo.now(e.reference);case"vandaag":return uo.today(e.reference);case"morgen":case"morgend":return uo.tomorrow(e.reference);case"gisteren":return uo.yesterday(e.reference)}return i}};Fr.default=dd});var Bg=_(As=>{"use strict";var UO=As&&As.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(As,"__esModule",{value:!0});var lo=Be(),WO=q(),qO=UO(ye()),$O=Gt(),YO=1,jO=2,fd=class extends WO.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(deze)?\s*(namiddag|avond|middernacht|ochtend|middag|'s middags|'s avonds|'s ochtends)(?=\W|$)/i}innerExtract(e,t){let n=qO.default(e.refDate),i=e.createParsingComponents();switch(t[YO]==="deze"&&(i.assign("day",e.refDate.getDate()),i.assign("month",e.refDate.getMonth()+1),i.assign("year",e.refDate.getFullYear())),t[jO].toLowerCase()){case"namiddag":case"'s namiddags":i.imply("meridiem",lo.Meridiem.PM),i.imply("hour",15);break;case"avond":case"'s avonds'":i.imply("meridiem",lo.Meridiem.PM),i.imply("hour",20);break;case"middernacht":$O.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"ochtend":case"'s ochtends":i.imply("meridiem",lo.Meridiem.AM),i.imply("hour",6);break;case"middag":case"'s middags":i.imply("meridiem",lo.Meridiem.AM),i.imply("hour",12);break}return i}};As.default=fd});var Ct=_(ue=>{"use strict";Object.defineProperty(ue,"__esModule",{value:!0});ue.parseTimeUnits=ue.TIME_UNITS_PATTERN=ue.parseYear=ue.YEAR_PATTERN=ue.parseOrdinalNumberPattern=ue.ORDINAL_NUMBER_PATTERN=ue.parseNumberPattern=ue.NUMBER_PATTERN=ue.TIME_UNIT_DICTIONARY=ue.ORDINAL_WORD_DICTIONARY=ue.INTEGER_WORD_DICTIONARY=ue.MONTH_DICTIONARY=ue.WEEKDAY_DICTIONARY=void 0;var co=Ee(),GO=st();ue.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};ue.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};ue.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};ue.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};ue.TIME_UNIT_DICTIONARY={sec:"second",second:"second",seconden:"second",min:"minute",mins:"minute",minute:"minute",minuut:"minute",minuten:"minute",minuutje:"minute",h:"hour",hr:"hour",hrs:"hour",uur:"hour",u:"hour",uren:"hour",dag:"d",dagen:"d",week:"week",weken:"week",maand:"month",maanden:"month",jaar:"year",jr:"year",jaren:"year"};ue.NUMBER_PATTERN=`(?:${co.matchAnyPattern(ue.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+[\\.,][0-9]+|halve?|half|paar)`;function zg(r){let e=r.toLowerCase();return ue.INTEGER_WORD_DICTIONARY[e]!==void 0?ue.INTEGER_WORD_DICTIONARY[e]:e==="paar"?2:e==="half"||e.match(/halve?/)?.5:parseFloat(e.replace(",","."))}ue.parseNumberPattern=zg;ue.ORDINAL_NUMBER_PATTERN=`(?:${co.matchAnyPattern(ue.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:ste|de)?)`;function BO(r){let e=r.toLowerCase();return ue.ORDINAL_WORD_DICTIONARY[e]!==void 0?ue.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:ste|de)$/i,""),parseInt(e))}ue.parseOrdinalNumberPattern=BO;ue.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:voor Christus|na Christus)|[1-2][0-9]{3}|[5-9][0-9])";function HO(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 GO.findMostLikelyADYear(e)}ue.parseYear=HO;var Vg=`(${ue.NUMBER_PATTERN})\\s{0,5}(${co.matchAnyPattern(ue.TIME_UNIT_DICTIONARY)})\\s{0,5}`,Hg=new RegExp(Vg,"i");ue.TIME_UNITS_PATTERN=co.repeatedTimeunitPattern("(?:(?:binnen|in)\\s*)?",Vg);function zO(r){let e={},t=r,n=Hg.exec(t);for(;n;)VO(e,n),t=t.substring(n[0].length),n=Hg.exec(t);return e}ue.parseTimeUnits=zO;function VO(r,e){let t=zg(e[1]),n=ue.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Qg=_(hd=>{"use strict";Object.defineProperty(hd,"__esModule",{value:!0});var Kg=Ct(),KO=Ie(),QO=q(),pd=class extends QO.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(?:binnen|in|binnen de|voor)\\s*("+Kg.TIME_UNITS_PATTERN+")(?=\\W|$)","i")}innerExtract(e,t){let n=Kg.parseTimeUnits(t[1]);return KO.ParsingComponents.createRelativeFromReference(e.reference,n)}};hd.default=pd});var Zg=_(gd=>{"use strict";Object.defineProperty(gd,"__esModule",{value:!0});var Xg=Ct(),XO=Ee(),ZO=q(),JO=Rn(),eD=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:op\\s*?)?(?:(deze|vorige|volgende)\\s*(?:week\\s*)?)?(${XO.matchAnyPattern(Xg.WEEKDAY_DICTIONARY)})(?=\\W|$)`,"i"),tD=1,rD=2,nD=3,md=class extends ZO.AbstractParserWithWordBoundaryChecking{innerPattern(){return eD}innerExtract(e,t){let n=t[rD].toLowerCase(),i=Xg.WEEKDAY_DICTIONARY[n],s=t[tD],a=t[nD],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=JO.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};gd.default=md});var iy=_(Td=>{"use strict";Object.defineProperty(Td,"__esModule",{value:!0});var iD=st(),ry=Ct(),fo=Ct(),ny=Ct(),sD=Ee(),aD=q(),oD=new RegExp(`(?:on\\s*?)?(${fo.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:tot|\\-|\\\u2013|until|through|till|\\s)\\s*(${fo.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:of)?\\s*)(`+sD.matchAnyPattern(ry.MONTH_DICTIONARY)+`)(?:(?:-|/|,?\\s*)(${ny.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),uD=3,Jg=1,ey=2,ty=4,yd=class extends aD.AbstractParserWithWordBoundaryChecking{innerPattern(){return oD}innerExtract(e,t){let n=ry.MONTH_DICTIONARY[t[uD].toLowerCase()],i=fo.parseOrdinalNumberPattern(t[Jg]);if(i>31)return t.index=t.index+t[Jg].length,null;let s=e.createParsingComponents({day:i,month:n});if(t[ty]){let u=ny.parseYear(t[ty]);s.assign("year",u)}else{let u=iD.findYearClosestToRef(e.refDate,i,n);s.imply("year",u)}if(!t[ey])return s;let a=fo.parseOrdinalNumberPattern(t[ey]),o=e.createParsingResult(t.index,t[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",a),o}};Td.default=yd});var uy=_(_d=>{"use strict";Object.defineProperty(_d,"__esModule",{value:!0});var ay=Ct(),lD=st(),cD=Ee(),oy=Ct(),dD=q(),fD=new RegExp(`(${cD.matchAnyPattern(ay.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${oy.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),pD=1,sy=2,bd=class extends dD.AbstractParserWithWordBoundaryChecking{innerPattern(){return fD}innerExtract(e,t){let n=e.createParsingComponents();n.imply("day",1);let i=t[pD],s=ay.MONTH_DICTIONARY[i.toLowerCase()];if(n.assign("month",s),t[sy]){let a=oy.parseYear(t[sy]);n.assign("year",a)}else{let a=lD.findYearClosestToRef(e.refDate,1,s);n.imply("year",a)}return n}};_d.default=bd});var ly=_(wd=>{"use strict";Object.defineProperty(wd,"__esModule",{value:!0});var hD=q(),mD=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),gD=1,yD=2,vd=class extends hD.AbstractParserWithWordBoundaryChecking{innerPattern(){return mD}innerExtract(e,t){let n=parseInt(t[yD]),i=parseInt(t[gD]);return e.createParsingComponents().imply("day",1).assign("month",i).assign("year",n)}};wd.default=vd});var cy=_(kd=>{"use strict";Object.defineProperty(kd,"__esModule",{value:!0});var TD=Dn(),Ed=class extends TD.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:om)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|om|\\?)\\s*"}primarySuffix(){return"(?:\\s*(?:uur))?(?!/)(?=\\W|$)"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}};kd.default=Ed});var py=_(Od=>{"use strict";Object.defineProperty(Od,"__esModule",{value:!0});var fy=Ct(),bD=Ee(),_D=q(),vD=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${bD.matchAnyPattern(fy.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),wD=1,ED=2,dy=3,kD=4,Sd=class extends _D.AbstractParserWithWordBoundaryChecking{innerPattern(){return vD}innerExtract(e,t){let n=t[dy]?parseInt(t[dy]):fy.MONTH_DICTIONARY[t[ED].toLowerCase()];if(n<1||n>12)return null;let i=parseInt(t[wD]);return{day:parseInt(t[kD]),month:n,year:i}}};Od.default=Sd});var hy=_(Ps=>{"use strict";var SD=Ps&&Ps.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ps,"__esModule",{value:!0});var OD=q(),po=Be(),Dd=Gt(),DD=SD(ye()),xD=1,RD=2,xd=class extends OD.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(gisteren|morgen|van)(ochtend|middag|namiddag|avond|nacht)(?=\W|$)/i}innerExtract(e,t){let n=t[xD].toLowerCase(),i=t[RD].toLowerCase(),s=e.createParsingComponents(),a=DD.default(e.refDate);switch(n){case"gisteren":Dd.assignSimilarDate(s,a.add(-1,"day"));break;case"van":Dd.assignSimilarDate(s,a);break;case"morgen":Dd.assignTheNextDay(s,a);break}switch(i){case"ochtend":s.imply("meridiem",po.Meridiem.AM),s.imply("hour",6);break;case"middag":s.imply("meridiem",po.Meridiem.AM),s.imply("hour",12);break;case"namiddag":s.imply("meridiem",po.Meridiem.PM),s.imply("hour",15);break;case"avond":s.imply("meridiem",po.Meridiem.PM),s.imply("hour",20);break}return s}};Ps.default=xd});var gy=_(Md=>{"use strict";Object.defineProperty(Md,"__esModule",{value:!0});var my=Ct(),MD=Ie(),CD=q(),AD=Bt(),PD=new RegExp(`(deze|vorige|afgelopen|komende|over|\\+|-)\\s*(${my.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Rd=class extends CD.AbstractParserWithWordBoundaryChecking{innerPattern(){return PD}innerExtract(e,t){let n=t[1].toLowerCase(),i=my.parseTimeUnits(t[2]);switch(n){case"vorige":case"afgelopen":case"-":i=AD.reverseTimeUnits(i);break}return MD.ParsingComponents.createRelativeFromReference(e.reference,i)}};Md.default=Rd});var by=_(Ns=>{"use strict";var ND=Ns&&Ns.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ns,"__esModule",{value:!0});var Ty=Ct(),yy=Ie(),ID=ND(ye()),FD=q(),LD=Ee(),UD=new RegExp(`(dit|deze|komende|volgend|volgende|afgelopen|vorige)\\s*(${LD.matchAnyPattern(Ty.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),WD=1,qD=2,Cd=class extends FD.AbstractParserWithWordBoundaryChecking{innerPattern(){return UD}innerExtract(e,t){let n=t[WD].toLowerCase(),i=t[qD].toLowerCase(),s=Ty.TIME_UNIT_DICTIONARY[i];if(n=="volgend"||n=="volgende"||n=="komende"){let u={};return u[s]=1,yy.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="afgelopen"||n=="vorige"){let u={};return u[s]=-1,yy.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=ID.default(e.reference.instant);return i.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):i.match(/maand/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):i.match(/jaar/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};Ns.default=Cd});var _y=_(Nd=>{"use strict";Object.defineProperty(Nd,"__esModule",{value:!0});var Pd=Ct(),$D=Ie(),YD=q(),jD=Bt(),GD=new RegExp("("+Pd.TIME_UNITS_PATTERN+")(?:geleden|voor|eerder)(?=(?:\\W|$))","i"),BD=new RegExp("("+Pd.TIME_UNITS_PATTERN+")geleden(?=(?:\\W|$))","i"),Ad=class extends YD.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?BD:GD}innerExtract(e,t){let n=Pd.parseTimeUnits(t[1]),i=jD.reverseTimeUnits(n);return $D.ParsingComponents.createRelativeFromReference(e.reference,i)}};Nd.default=Ad});var vy=_(Ld=>{"use strict";Object.defineProperty(Ld,"__esModule",{value:!0});var Fd=Ct(),HD=Ie(),zD=q(),VD=new RegExp("("+Fd.TIME_UNITS_PATTERN+")(later|na|vanaf nu|voortaan|vooruit|uit)(?=(?:\\W|$))","i"),KD=new RegExp("("+Fd.TIME_UNITS_PATTERN+")(later|vanaf nu)(?=(?:\\W|$))","i"),QD=1,Id=class extends zD.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?KD:VD}innerExtract(e,t){let n=Fd.parseTimeUnits(t[QD]);return HD.ParsingComponents.createRelativeFromReference(e.reference,n)}};Ld.default=Id});var Sy=_(Ze=>{"use strict";var ot=Ze&&Ze.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ze,"__esModule",{value:!0});Ze.createConfiguration=Ze.createCasualConfiguration=Ze.parseDate=Ze.parse=Ze.strict=Ze.casual=void 0;var XD=Ar(),wy=nr(),ZD=ot(Yg()),JD=ot(jg()),e0=ot(Gg()),t0=ot(Bg()),r0=ot(Mn()),n0=ot(Qg()),i0=ot(Zg()),s0=ot(iy()),Ey=ot(uy()),a0=ot(ly()),o0=ot(cy()),u0=ot(py()),l0=ot(hy()),c0=ot(gy()),d0=ot(by()),f0=ot(_y()),p0=ot(vy());Ze.casual=new wy.Chrono(ky());Ze.strict=new wy.Chrono(Ud(!0));function h0(r,e,t){return Ze.casual.parse(r,e,t)}Ze.parse=h0;function m0(r,e,t){return Ze.casual.parseDate(r,e,t)}Ze.parseDate=m0;function ky(r=!0){let e=Ud(!1,r);return e.parsers.unshift(new e0.default),e.parsers.unshift(new t0.default),e.parsers.unshift(new l0.default),e.parsers.unshift(new Ey.default),e.parsers.unshift(new d0.default),e.parsers.unshift(new c0.default),e}Ze.createCasualConfiguration=ky;function Ud(r=!0,e=!0){return XD.includeCommonConfiguration({parsers:[new r0.default(e),new n0.default,new s0.default,new Ey.default,new i0.default,new u0.default,new a0.default,new o0.default(r),new f0.default(r),new p0.default(r)],refiners:[new JD.default,new ZD.default]},r)}Ze.createConfiguration=Ud});var Ry=_(Is=>{"use strict";var g0=Is&&Is.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Is,"__esModule",{value:!0});var y0=g0(ye()),T0=q(),b0=1,Oy=2,_0=3,Dy=4,xy=5,v0=6,Wd=class extends T0.AbstractParserWithWordBoundaryChecking{innerPattern(e){return new RegExp("(\u800C\u5BB6|\u7ACB(?:\u523B|\u5373)|\u5373\u523B)|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s|,|\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?","i")}innerExtract(e,t){let n=t.index,i=e.createParsingResult(n,t[0]),s=y0.default(e.refDate),a=s;if(t[b0])i.start.imply("hour",s.hour()),i.start.imply("minute",s.minute()),i.start.imply("second",s.second()),i.start.imply("millisecond",s.millisecond());else if(t[Oy]){let o=t[Oy],u=t[_0];o=="\u660E"||o=="\u807D"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u5F8C"?a=a.add(2,"day"):o=="\u5927\u5F8C"&&(a=a.add(3,"day")),u=="\u65E9"||u=="\u671D"?i.start.imply("hour",6):u=="\u665A"&&(i.start.imply("hour",22),i.start.imply("meridiem",1))}else if(t[Dy]){let u=t[Dy][0];u=="\u65E9"||u=="\u671D"||u=="\u4E0A"?i.start.imply("hour",6):u=="\u4E0B"||u=="\u664F"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):u=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):u=="\u591C"||u=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):u=="\u51CC"&&i.start.imply("hour",0)}else if(t[xy]){let o=t[xy];o=="\u660E"||o=="\u807D"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u5F8C"?a=a.add(2,"day"):o=="\u5927\u5F8C"&&(a=a.add(3,"day"));let u=t[v0];if(u){let l=u[0];l=="\u65E9"||l=="\u671D"||l=="\u4E0A"?i.start.imply("hour",6):l=="\u4E0B"||l=="\u664F"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):l=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):l=="\u591C"||l=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):l=="\u51CC"&&i.start.imply("hour",0)}}return i.start.assign("day",a.date()),i.start.assign("month",a.month()+1),i.start.assign("year",a.year()),i}};Is.default=Wd});var _i=_(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.zhStringToYear=xt.zhStringToNumber=xt.WEEKDAY_OFFSET=xt.NUMBER=void 0;xt.NUMBER={\u96F6:0,\u4E00:1,\u4E8C:2,\u5169:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6,\u4E03:7,\u516B:8,\u4E5D:9,\u5341:10,\u5EFF:20,\u5345:30};xt.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function w0(r){let e=0;for(let t=0;t{"use strict";var k0=Fs&&Fs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Fs,"__esModule",{value:!0});var S0=k0(ye()),O0=q(),Pn=_i(),qd=1,My=2,$d=3,Yd=class extends O0.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(Pn.NUMBER).join("")+"]{4}|["+Object.keys(Pn.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(Pn.NUMBER).join("")+"]{1,2})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(Pn.NUMBER).join("")+"]{1,2})?(?:\\s*)(?:\u65E5|\u865F)?")}innerExtract(e,t){let n=S0.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=parseInt(t[My]);if(isNaN(s)&&(s=Pn.zhStringToNumber(t[My])),i.start.assign("month",s),t[$d]){let a=parseInt(t[$d]);isNaN(a)&&(a=Pn.zhStringToNumber(t[$d])),i.start.assign("day",a)}else i.start.imply("day",n.date());if(t[qd]){let a=parseInt(t[qd]);isNaN(a)&&(a=Pn.zhStringToYear(t[qd])),i.start.assign("year",a)}else i.start.imply("year",n.year());return i}};Fs.default=Yd});var Py=_(Ls=>{"use strict";var D0=Ls&&Ls.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ls,"__esModule",{value:!0});var x0=D0(ye()),R0=q(),Ay=_i(),M0=new RegExp("(\\d+|["+Object.keys(Ay.NUMBER).join("")+"]+|\u534A|\u5E7E)(?:\\s*)(?:\u500B)?(\u79D2(?:\u9418)?|\u5206\u9418|\u5C0F\u6642|\u9418|\u65E5|\u5929|\u661F\u671F|\u79AE\u62DC|\u6708|\u5E74)(?:(?:\u4E4B|\u904E)?\u5F8C|(?:\u4E4B)?\u5167)","i"),jd=1,C0=2,Gd=class extends R0.AbstractParserWithWordBoundaryChecking{innerPattern(){return M0}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=parseInt(t[jd]);if(isNaN(i)&&(i=Ay.zhStringToNumber(t[jd])),isNaN(i)){let u=t[jd];if(u==="\u5E7E")i=3;else if(u==="\u534A")i=.5;else return null}let s=x0.default(e.refDate),o=t[C0][0];return o.match(/[日天星禮月年]/)?(o=="\u65E5"||o=="\u5929"?s=s.add(i,"d"):o=="\u661F"||o=="\u79AE"?s=s.add(i*7,"d"):o=="\u6708"?s=s.add(i,"month"):o=="\u5E74"&&(s=s.add(i,"year")),n.start.assign("year",s.year()),n.start.assign("month",s.month()+1),n.start.assign("day",s.date()),n):(o=="\u79D2"?s=s.add(i,"second"):o=="\u5206"?s=s.add(i,"minute"):(o=="\u5C0F"||o=="\u9418")&&(s=s.add(i,"hour")),n.start.imply("year",s.year()),n.start.imply("month",s.month()+1),n.start.imply("day",s.date()),n.start.assign("hour",s.hour()),n.start.assign("minute",s.minute()),n.start.assign("second",s.second()),n)}};Ls.default=Gd});var Iy=_(Us=>{"use strict";var A0=Us&&Us.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Us,"__esModule",{value:!0});var P0=A0(ye()),N0=q(),Ny=_i(),I0=new RegExp("(?\u4E0A|\u4ECA|\u4E0B|\u9019|\u5462)(?:\u500B)?(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?"+Object.keys(Ny.WEEKDAY_OFFSET).join("|")+")"),Bd=class extends N0.AbstractParserWithWordBoundaryChecking{innerPattern(){return I0}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=Ny.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=null,o=t.groups.prefix;o=="\u4E0A"?a="last":o=="\u4E0B"?a="next":(o=="\u4ECA"||o=="\u9019"||o=="\u5462")&&(a="this");let u=P0.default(e.refDate),l=!1,c=u.day();return a=="last"||a=="past"?(u=u.day(s-7),l=!0):a=="next"?(u=u.day(s+7),l=!0):a=="this"?u=u.day(s):Math.abs(s-7-c){"use strict";var F0=Ws&&Ws.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ws,"__esModule",{value:!0});var L0=F0(ye()),U0=q(),Vt=_i(),W0=new RegExp("(?:\u7531|\u5F9E|\u81EA)?(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(Vt.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Vt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Vt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),q0=new RegExp("(?:^\\s*(?:\u5230|\u81F3|\\-|\\\u2013|\\~|\\\u301C)\\s*)(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(Vt.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Vt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Vt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),ho=1,mo=2,go=3,yo=4,To=5,bo=6,zt=7,vi=8,_o=9,Hd=class extends U0.AbstractParserWithWordBoundaryChecking{innerPattern(){return W0}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=L0.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=n.clone();if(t[ho]){var a=t[ho];a=="\u660E"||a=="\u807D"?n.hour()>1&&s.add(1,"day"):a=="\u6628"||a=="\u5C0B"||a=="\u7434"?s.add(-1,"day"):a=="\u524D"?s.add(-2,"day"):a=="\u5927\u524D"?s.add(-3,"day"):a=="\u5F8C"?s.add(2,"day"):a=="\u5927\u5F8C"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else if(t[yo]){var o=t[yo];o=="\u660E"||o=="\u807D"?s.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?s.add(-1,"day"):o=="\u524D"?s.add(-2,"day"):o=="\u5927\u524D"?s.add(-3,"day"):o=="\u5F8C"?s.add(2,"day"):o=="\u5927\u5F8C"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else i.start.imply("day",s.date()),i.start.imply("month",s.month()+1),i.start.imply("year",s.year());let u=0,l=0,c=-1;if(t[vi]){var f=parseInt(t[vi]);if(isNaN(f)&&(f=Vt.zhStringToNumber(t[vi])),f>=60)return null;i.start.assign("second",f)}if(u=parseInt(t[bo]),isNaN(u)&&(u=Vt.zhStringToNumber(t[bo])),t[zt]?t[zt]=="\u534A"?l=30:t[zt]=="\u6B63"||t[zt]=="\u6574"?l=0:(l=parseInt(t[zt]),isNaN(l)&&(l=Vt.zhStringToNumber(t[zt]))):u>100&&(l=u%100,u=Math.floor(u/100)),l>=60||u>24)return null;if(u>=12&&(c=1),t[_o]){if(u>12)return null;var h=t[_o][0].toLowerCase();h=="a"&&(c=0,u==12&&(u=0)),h=="p"&&(c=1,u!=12&&(u+=12))}else if(t[mo]){var T=t[mo],y=T[0];y=="\u671D"||y=="\u65E9"?(c=0,u==12&&(u=0)):y=="\u665A"&&(c=1,u!=12&&(u+=12))}else if(t[go]){var w=t[go],D=w[0];D=="\u4E0A"||D=="\u671D"||D=="\u65E9"||D=="\u51CC"?(c=0,u==12&&(u=0)):(D=="\u4E0B"||D=="\u664F"||D=="\u665A")&&(c=1,u!=12&&(u+=12))}else if(t[To]){var C=t[To],N=C[0];N=="\u4E0A"||N=="\u671D"||N=="\u65E9"||N=="\u51CC"?(c=0,u==12&&(u=0)):(N=="\u4E0B"||N=="\u664F"||N=="\u665A")&&(c=1,u!=12&&(u+=12))}if(i.start.assign("hour",u),i.start.assign("minute",l),c>=0?i.start.assign("meridiem",c):u<12?i.start.imply("meridiem",0):i.start.imply("meridiem",1),t=q0.exec(e.text.substring(i.index+i.text.length)),!t)return i.text.match(/^\d+$/)?null:i;let L=s.clone();if(i.end=e.createParsingComponents(),t[ho]){var a=t[ho];a=="\u660E"||a=="\u807D"?n.hour()>1&&L.add(1,"day"):a=="\u6628"||a=="\u5C0B"||a=="\u7434"?L.add(-1,"day"):a=="\u524D"?L.add(-2,"day"):a=="\u5927\u524D"?L.add(-3,"day"):a=="\u5F8C"?L.add(2,"day"):a=="\u5927\u5F8C"&&L.add(3,"day"),i.end.assign("day",L.date()),i.end.assign("month",L.month()+1),i.end.assign("year",L.year())}else if(t[yo]){var o=t[yo];o=="\u660E"||o=="\u807D"?L.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?L.add(-1,"day"):o=="\u524D"?L.add(-2,"day"):o=="\u5927\u524D"?L.add(-3,"day"):o=="\u5F8C"?L.add(2,"day"):o=="\u5927\u5F8C"&&L.add(3,"day"),i.end.assign("day",L.date()),i.end.assign("month",L.month()+1),i.end.assign("year",L.year())}else i.end.imply("day",L.date()),i.end.imply("month",L.month()+1),i.end.imply("year",L.year());if(u=0,l=0,c=-1,t[vi]){var f=parseInt(t[vi]);if(isNaN(f)&&(f=Vt.zhStringToNumber(t[vi])),f>=60)return null;i.end.assign("second",f)}if(u=parseInt(t[bo]),isNaN(u)&&(u=Vt.zhStringToNumber(t[bo])),t[zt]?t[zt]=="\u534A"?l=30:t[zt]=="\u6B63"||t[zt]=="\u6574"?l=0:(l=parseInt(t[zt]),isNaN(l)&&(l=Vt.zhStringToNumber(t[zt]))):u>100&&(l=u%100,u=Math.floor(u/100)),l>=60||u>24)return null;if(u>=12&&(c=1),t[_o]){if(u>12)return null;var h=t[_o][0].toLowerCase();h=="a"&&(c=0,u==12&&(u=0)),h=="p"&&(c=1,u!=12&&(u+=12)),i.start.isCertain("meridiem")||(c==0?(i.start.imply("meridiem",0),i.start.get("hour")==12&&i.start.assign("hour",0)):(i.start.imply("meridiem",1),i.start.get("hour")!=12&&i.start.assign("hour",i.start.get("hour")+12)))}else if(t[mo]){var T=t[mo],y=T[0];y=="\u671D"||y=="\u65E9"?(c=0,u==12&&(u=0)):y=="\u665A"&&(c=1,u!=12&&(u+=12))}else if(t[go]){var w=t[go],D=w[0];D=="\u4E0A"||D=="\u671D"||D=="\u65E9"||D=="\u51CC"?(c=0,u==12&&(u=0)):(D=="\u4E0B"||D=="\u664F"||D=="\u665A")&&(c=1,u!=12&&(u+=12))}else if(t[To]){var C=t[To],N=C[0];N=="\u4E0A"||N=="\u671D"||N=="\u65E9"||N=="\u51CC"?(c=0,u==12&&(u=0)):(N=="\u4E0B"||N=="\u664F"||N=="\u665A")&&(c=1,u!=12&&(u+=12))}return i.text=i.text+t[0],i.end.assign("hour",u),i.end.assign("minute",l),c>=0?i.end.assign("meridiem",c):i.start.isCertain("meridiem")&&i.start.get("meridiem")==1&&i.start.get("hour")>u?i.end.imply("meridiem",0):u>12&&i.end.imply("meridiem",1),i.end.date().getTime(){"use strict";var $0=qs&&qs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(qs,"__esModule",{value:!0});var Y0=$0(ye()),j0=q(),Ly=_i(),G0=new RegExp("(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?"+Object.keys(Ly.WEEKDAY_OFFSET).join("|")+")"),zd=class extends j0.AbstractParserWithWordBoundaryChecking{innerPattern(){return G0}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=Ly.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=Y0.default(e.refDate),o=!1,u=a.day();return Math.abs(s-7-u){"use strict";var B0=$s&&$s.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($s,"__esModule",{value:!0});var H0=B0(Tr()),Vd=class extends H0.default{patternBetween(){return/^\s*(至|到|\-|\~|~|-|ー)\s*$/i}};$s.default=Vd});var qy=_(Ys=>{"use strict";var z0=Ys&&Ys.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ys,"__esModule",{value:!0});var V0=z0(Cr()),Kd=class extends V0.default{patternBetween(){return/^\s*$/i}};Ys.default=Kd});var $y=_(Ye=>{"use strict";var Lr=Ye&&Ye.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ye,"__esModule",{value:!0});Ye.createConfiguration=Ye.createCasualConfiguration=Ye.parseDate=Ye.parse=Ye.strict=Ye.casual=Ye.hant=void 0;var Qd=nr(),K0=Lr(Ka()),Q0=Ar(),X0=Lr(Ry()),Z0=Lr(Cy()),J0=Lr(Py()),ex=Lr(Iy()),tx=Lr(Fy()),rx=Lr(Uy()),nx=Lr(Wy()),ix=Lr(qy());Ye.hant=new Qd.Chrono(Xd());Ye.casual=new Qd.Chrono(Xd());Ye.strict=new Qd.Chrono(Zd());function sx(r,e,t){return Ye.casual.parse(r,e,t)}Ye.parse=sx;function ax(r,e,t){return Ye.casual.parseDate(r,e,t)}Ye.parseDate=ax;function Xd(){let r=Zd();return r.parsers.unshift(new X0.default),r}Ye.createCasualConfiguration=Xd;function Zd(){let r=Q0.includeCommonConfiguration({parsers:[new Z0.default,new ex.default,new rx.default,new tx.default,new J0.default],refiners:[new nx.default,new ix.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof K0.default)),r}Ye.createConfiguration=Zd});var By=_(js=>{"use strict";var ox=js&&js.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(js,"__esModule",{value:!0});var ux=ox(ye()),lx=q(),cx=1,Yy=2,dx=3,jy=4,Gy=5,fx=6,Jd=class extends lx.AbstractParserWithWordBoundaryChecking{innerPattern(e){return new RegExp("(\u73B0\u5728|\u7ACB(?:\u523B|\u5373)|\u5373\u523B)|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s|,|\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?","i")}innerExtract(e,t){let n=t.index,i=e.createParsingResult(n,t[0]),s=ux.default(e.refDate),a=s;if(t[cx])i.start.imply("hour",s.hour()),i.start.imply("minute",s.minute()),i.start.imply("second",s.second()),i.start.imply("millisecond",s.millisecond());else if(t[Yy]){let o=t[Yy],u=t[dx];o=="\u660E"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u540E"?a=a.add(2,"day"):o=="\u5927\u540E"&&(a=a.add(3,"day")),u=="\u65E9"?i.start.imply("hour",6):u=="\u665A"&&(i.start.imply("hour",22),i.start.imply("meridiem",1))}else if(t[jy]){let u=t[jy][0];u=="\u65E9"||u=="\u4E0A"?i.start.imply("hour",6):u=="\u4E0B"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):u=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):u=="\u591C"||u=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):u=="\u51CC"&&i.start.imply("hour",0)}else if(t[Gy]){let o=t[Gy];o=="\u660E"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u540E"?a=a.add(2,"day"):o=="\u5927\u540E"&&(a=a.add(3,"day"));let u=t[fx];if(u){let l=u[0];l=="\u65E9"||l=="\u4E0A"?i.start.imply("hour",6):l=="\u4E0B"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):l=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):l=="\u591C"||l=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):l=="\u51CC"&&i.start.imply("hour",0)}}return i.start.assign("day",a.date()),i.start.assign("month",a.month()+1),i.start.assign("year",a.year()),i}};js.default=Jd});var wi=_(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.zhStringToYear=Rt.zhStringToNumber=Rt.WEEKDAY_OFFSET=Rt.NUMBER=void 0;Rt.NUMBER={\u96F6:0,"\u3007":0,\u4E00:1,\u4E8C:2,\u4E24:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6,\u4E03:7,\u516B:8,\u4E5D:9,\u5341:10};Rt.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function px(r){let e=0;for(let t=0;t{"use strict";var mx=Gs&&Gs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Gs,"__esModule",{value:!0});var gx=mx(ye()),yx=q(),Nn=wi(),ef=1,Hy=2,tf=3,rf=class extends yx.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(Nn.NUMBER).join("")+"]{4}|["+Object.keys(Nn.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(Nn.NUMBER).join("")+"]{1,3})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(Nn.NUMBER).join("")+"]{1,3})?(?:\\s*)(?:\u65E5|\u53F7)?")}innerExtract(e,t){let n=gx.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=parseInt(t[Hy]);if(isNaN(s)&&(s=Nn.zhStringToNumber(t[Hy])),i.start.assign("month",s),t[tf]){let a=parseInt(t[tf]);isNaN(a)&&(a=Nn.zhStringToNumber(t[tf])),i.start.assign("day",a)}else i.start.imply("day",n.date());if(t[ef]){let a=parseInt(t[ef]);isNaN(a)&&(a=Nn.zhStringToYear(t[ef])),i.start.assign("year",a)}else i.start.imply("year",n.year());return i}};Gs.default=rf});var Ky=_(Bs=>{"use strict";var Tx=Bs&&Bs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Bs,"__esModule",{value:!0});var bx=Tx(ye()),_x=q(),Vy=wi(),vx=new RegExp("(\\d+|["+Object.keys(Vy.NUMBER).join("")+"]+|\u534A|\u51E0)(?:\\s*)(?:\u4E2A)?(\u79D2(?:\u949F)?|\u5206\u949F|\u5C0F\u65F6|\u949F|\u65E5|\u5929|\u661F\u671F|\u793C\u62DC|\u6708|\u5E74)(?:(?:\u4E4B|\u8FC7)?\u540E|(?:\u4E4B)?\u5185)","i"),nf=1,wx=2,sf=class extends _x.AbstractParserWithWordBoundaryChecking{innerPattern(){return vx}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=parseInt(t[nf]);if(isNaN(i)&&(i=Vy.zhStringToNumber(t[nf])),isNaN(i)){let u=t[nf];if(u==="\u51E0")i=3;else if(u==="\u534A")i=.5;else return null}let s=bx.default(e.refDate),o=t[wx][0];return o.match(/[日天星礼月年]/)?(o=="\u65E5"||o=="\u5929"?s=s.add(i,"d"):o=="\u661F"||o=="\u793C"?s=s.add(i*7,"d"):o=="\u6708"?s=s.add(i,"month"):o=="\u5E74"&&(s=s.add(i,"year")),n.start.assign("year",s.year()),n.start.assign("month",s.month()+1),n.start.assign("day",s.date()),n):(o=="\u79D2"?s=s.add(i,"second"):o=="\u5206"?s=s.add(i,"minute"):(o=="\u5C0F"||o=="\u949F")&&(s=s.add(i,"hour")),n.start.imply("year",s.year()),n.start.imply("month",s.month()+1),n.start.imply("day",s.date()),n.start.assign("hour",s.hour()),n.start.assign("minute",s.minute()),n.start.assign("second",s.second()),n)}};Bs.default=sf});var Xy=_(Hs=>{"use strict";var Ex=Hs&&Hs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Hs,"__esModule",{value:!0});var kx=Ex(ye()),Sx=q(),Qy=wi(),Ox=new RegExp("(?\u4E0A|\u4E0B|\u8FD9)(?:\u4E2A)?(?:\u661F\u671F|\u793C\u62DC|\u5468)(?"+Object.keys(Qy.WEEKDAY_OFFSET).join("|")+")"),af=class extends Sx.AbstractParserWithWordBoundaryChecking{innerPattern(){return Ox}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=Qy.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=null,o=t.groups.prefix;o=="\u4E0A"?a="last":o=="\u4E0B"?a="next":o=="\u8FD9"&&(a="this");let u=kx.default(e.refDate),l=!1,c=u.day();return a=="last"||a=="past"?(u=u.day(s-7),l=!0):a=="next"?(u=u.day(s+7),l=!0):a=="this"?u=u.day(s):Math.abs(s-7-c){"use strict";var Dx=zs&&zs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(zs,"__esModule",{value:!0});var xx=Dx(ye()),Rx=q(),Qt=wi(),Mx=new RegExp("(?:\u4ECE|\u81EA)?(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(Qt.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Qt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Qt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),Cx=new RegExp("(?:^\\s*(?:\u5230|\u81F3|\\-|\\\u2013|\\~|\\\u301C)\\s*)(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(Qt.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Qt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Qt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),vo=1,wo=2,Eo=3,ko=4,So=5,Oo=6,Kt=7,Ei=8,Do=9,of=class extends Rx.AbstractParserWithWordBoundaryChecking{innerPattern(){return Mx}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=xx.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=n.clone();if(t[vo]){let c=t[vo];c=="\u660E"?n.hour()>1&&s.add(1,"day"):c=="\u6628"?s.add(-1,"day"):c=="\u524D"?s.add(-2,"day"):c=="\u5927\u524D"?s.add(-3,"day"):c=="\u540E"?s.add(2,"day"):c=="\u5927\u540E"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else if(t[ko]){let c=t[ko];c=="\u660E"?s.add(1,"day"):c=="\u6628"?s.add(-1,"day"):c=="\u524D"?s.add(-2,"day"):c=="\u5927\u524D"?s.add(-3,"day"):c=="\u540E"?s.add(2,"day"):c=="\u5927\u540E"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else i.start.imply("day",s.date()),i.start.imply("month",s.month()+1),i.start.imply("year",s.year());let a=0,o=0,u=-1;if(t[Ei]){let c=parseInt(t[Ei]);if(isNaN(c)&&(c=Qt.zhStringToNumber(t[Ei])),c>=60)return null;i.start.assign("second",c)}if(a=parseInt(t[Oo]),isNaN(a)&&(a=Qt.zhStringToNumber(t[Oo])),t[Kt]?t[Kt]=="\u534A"?o=30:t[Kt]=="\u6B63"||t[Kt]=="\u6574"?o=0:(o=parseInt(t[Kt]),isNaN(o)&&(o=Qt.zhStringToNumber(t[Kt]))):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(u=1),t[Do]){if(a>12)return null;let c=t[Do][0].toLowerCase();c=="a"&&(u=0,a==12&&(a=0)),c=="p"&&(u=1,a!=12&&(a+=12))}else if(t[wo]){let f=t[wo][0];f=="\u65E9"?(u=0,a==12&&(a=0)):f=="\u665A"&&(u=1,a!=12&&(a+=12))}else if(t[Eo]){let f=t[Eo][0];f=="\u4E0A"||f=="\u65E9"||f=="\u51CC"?(u=0,a==12&&(a=0)):(f=="\u4E0B"||f=="\u665A")&&(u=1,a!=12&&(a+=12))}else if(t[So]){let f=t[So][0];f=="\u4E0A"||f=="\u65E9"||f=="\u51CC"?(u=0,a==12&&(a=0)):(f=="\u4E0B"||f=="\u665A")&&(u=1,a!=12&&(a+=12))}if(i.start.assign("hour",a),i.start.assign("minute",o),u>=0?i.start.assign("meridiem",u):a<12?i.start.imply("meridiem",0):i.start.imply("meridiem",1),t=Cx.exec(e.text.substring(i.index+i.text.length)),!t)return i.text.match(/^\d+$/)?null:i;let l=s.clone();if(i.end=e.createParsingComponents(),t[vo]){let c=t[vo];c=="\u660E"?n.hour()>1&&l.add(1,"day"):c=="\u6628"?l.add(-1,"day"):c=="\u524D"?l.add(-2,"day"):c=="\u5927\u524D"?l.add(-3,"day"):c=="\u540E"?l.add(2,"day"):c=="\u5927\u540E"&&l.add(3,"day"),i.end.assign("day",l.date()),i.end.assign("month",l.month()+1),i.end.assign("year",l.year())}else if(t[ko]){let c=t[ko];c=="\u660E"?l.add(1,"day"):c=="\u6628"?l.add(-1,"day"):c=="\u524D"?l.add(-2,"day"):c=="\u5927\u524D"?l.add(-3,"day"):c=="\u540E"?l.add(2,"day"):c=="\u5927\u540E"&&l.add(3,"day"),i.end.assign("day",l.date()),i.end.assign("month",l.month()+1),i.end.assign("year",l.year())}else i.end.imply("day",l.date()),i.end.imply("month",l.month()+1),i.end.imply("year",l.year());if(a=0,o=0,u=-1,t[Ei]){let c=parseInt(t[Ei]);if(isNaN(c)&&(c=Qt.zhStringToNumber(t[Ei])),c>=60)return null;i.end.assign("second",c)}if(a=parseInt(t[Oo]),isNaN(a)&&(a=Qt.zhStringToNumber(t[Oo])),t[Kt]?t[Kt]=="\u534A"?o=30:t[Kt]=="\u6B63"||t[Kt]=="\u6574"?o=0:(o=parseInt(t[Kt]),isNaN(o)&&(o=Qt.zhStringToNumber(t[Kt]))):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(u=1),t[Do]){if(a>12)return null;let c=t[Do][0].toLowerCase();c=="a"&&(u=0,a==12&&(a=0)),c=="p"&&(u=1,a!=12&&(a+=12)),i.start.isCertain("meridiem")||(u==0?(i.start.imply("meridiem",0),i.start.get("hour")==12&&i.start.assign("hour",0)):(i.start.imply("meridiem",1),i.start.get("hour")!=12&&i.start.assign("hour",i.start.get("hour")+12)))}else if(t[wo]){let f=t[wo][0];f=="\u65E9"?(u=0,a==12&&(a=0)):f=="\u665A"&&(u=1,a!=12&&(a+=12))}else if(t[Eo]){let f=t[Eo][0];f=="\u4E0A"||f=="\u65E9"||f=="\u51CC"?(u=0,a==12&&(a=0)):(f=="\u4E0B"||f=="\u665A")&&(u=1,a!=12&&(a+=12))}else if(t[So]){let f=t[So][0];f=="\u4E0A"||f=="\u65E9"||f=="\u51CC"?(u=0,a==12&&(a=0)):(f=="\u4E0B"||f=="\u665A")&&(u=1,a!=12&&(a+=12))}return i.text=i.text+t[0],i.end.assign("hour",a),i.end.assign("minute",o),u>=0?i.end.assign("meridiem",u):i.start.isCertain("meridiem")&&i.start.get("meridiem")==1&&i.start.get("hour")>a?i.end.imply("meridiem",0):a>12&&i.end.imply("meridiem",1),i.end.date().getTime(){"use strict";var Ax=Vs&&Vs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Vs,"__esModule",{value:!0});var Px=Ax(ye()),Nx=q(),Jy=wi(),Ix=new RegExp("(?:\u661F\u671F|\u793C\u62DC|\u5468)(?"+Object.keys(Jy.WEEKDAY_OFFSET).join("|")+")"),uf=class extends Nx.AbstractParserWithWordBoundaryChecking{innerPattern(){return Ix}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=Jy.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=Px.default(e.refDate),o=!1,u=a.day();return Math.abs(s-7-u){"use strict";var Fx=Ks&&Ks.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ks,"__esModule",{value:!0});var Lx=Fx(Tr()),lf=class extends Lx.default{patternBetween(){return/^\s*(至|到|-|~|~|-|ー)\s*$/i}};Ks.default=lf});var rT=_(Qs=>{"use strict";var Ux=Qs&&Qs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Qs,"__esModule",{value:!0});var Wx=Ux(Cr()),cf=class extends Wx.default{patternBetween(){return/^\s*$/i}};Qs.default=cf});var nT=_(je=>{"use strict";var Ur=je&&je.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(je,"__esModule",{value:!0});je.createConfiguration=je.createCasualConfiguration=je.parseDate=je.parse=je.strict=je.casual=je.hans=void 0;var df=nr(),qx=Ur(Ka()),$x=Ar(),Yx=Ur(By()),jx=Ur(zy()),Gx=Ur(Ky()),Bx=Ur(Xy()),Hx=Ur(Zy()),zx=Ur(eT()),Vx=Ur(tT()),Kx=Ur(rT());je.hans=new df.Chrono(ff());je.casual=new df.Chrono(ff());je.strict=new df.Chrono(pf());function Qx(r,e,t){return je.casual.parse(r,e,t)}je.parse=Qx;function Xx(r,e,t){return je.casual.parseDate(r,e,t)}je.parseDate=Xx;function ff(){let r=pf();return r.parsers.unshift(new Yx.default),r}je.createCasualConfiguration=ff;function pf(){let r=$x.includeCommonConfiguration({parsers:[new jx.default,new Bx.default,new zx.default,new Hx.default,new Gx.default],refiners:[new Vx.default,new Kx.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof qx.default)),r}je.createConfiguration=pf});var sT=_(At=>{"use strict";var iT=At&&At.__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]}),Zx=At&&At.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Jx=At&&At.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&iT(e,r,t)},eR=At&&At.__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)&&iT(e,r,t);return Zx(e,r),e};Object.defineProperty(At,"__esModule",{value:!0});At.hans=void 0;Jx($y(),At);At.hans=eR(nT())});var Mt=_(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.parseTimeUnits=ee.TIME_UNITS_PATTERN=ee.parseYear=ee.YEAR_PATTERN=ee.parseOrdinalNumberPattern=ee.ORDINAL_NUMBER_PATTERN=ee.parseNumberPattern=ee.NUMBER_PATTERN=ee.TIME_UNIT_DICTIONARY=ee.ORDINAL_WORD_DICTIONARY=ee.INTEGER_WORD_DICTIONARY=ee.MONTH_DICTIONARY=ee.FULL_MONTH_NAME_DICTIONARY=ee.WEEKDAY_DICTIONARY=ee.REGEX_PARTS=void 0;var xo=Ee(),tR=st();ee.REGEX_PARTS={leftBoundary:"([^\\p{L}\\p{N}_]|^)",rightBoundary:"(?=[^\\p{L}\\p{N}_]|$)",flags:"iu"};ee.WEEKDAY_DICTIONARY={\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435:0,\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u044F:0,\u0432\u0441\u043A:0,"\u0432\u0441\u043A.":0,\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A:1,\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A\u0430:1,\u043F\u043D:1,"\u043F\u043D.":1,\u0432\u0442\u043E\u0440\u043D\u0438\u043A:2,\u0432\u0442\u043E\u0440\u043D\u0438\u043A\u0430:2,\u0432\u0442:2,"\u0432\u0442.":2,\u0441\u0440\u0435\u0434\u0430:3,\u0441\u0440\u0435\u0434\u044B:3,\u0441\u0440\u0435\u0434\u0443:3,\u0441\u0440:3,"\u0441\u0440.":3,\u0447\u0435\u0442\u0432\u0435\u0440\u0433:4,\u0447\u0435\u0442\u0432\u0435\u0440\u0433\u0430:4,\u0447\u0442:4,"\u0447\u0442.":4,\u043F\u044F\u0442\u043D\u0438\u0446\u0430:5,\u043F\u044F\u0442\u043D\u0438\u0446\u0443:5,\u043F\u044F\u0442\u043D\u0438\u0446\u044B:5,\u043F\u0442:5,"\u043F\u0442.":5,\u0441\u0443\u0431\u0431\u043E\u0442\u0430:6,\u0441\u0443\u0431\u0431\u043E\u0442\u0443:6,\u0441\u0443\u0431\u0431\u043E\u0442\u044B:6,\u0441\u0431:6,"\u0441\u0431.":6};ee.FULL_MONTH_NAME_DICTIONARY={\u044F\u043D\u0432\u0430\u0440\u044C:1,\u044F\u043D\u0432\u0430\u0440\u044F:1,\u044F\u043D\u0432\u0430\u0440\u0435:1,\u0444\u0435\u0432\u0440\u044F\u043B\u044C:2,\u0444\u0435\u0432\u0440\u044F\u043B\u044F:2,\u0444\u0435\u0432\u0440\u044F\u043B\u0435:2,\u043C\u0430\u0440\u0442:3,\u043C\u0430\u0440\u0442\u0430:3,\u043C\u0430\u0440\u0442\u0435:3,\u0430\u043F\u0440\u0435\u043B\u044C:4,\u0430\u043F\u0440\u0435\u043B\u044F:4,\u0430\u043F\u0440\u0435\u043B\u0435:4,\u043C\u0430\u0439:5,\u043C\u0430\u044F:5,\u043C\u0430\u0435:5,\u0438\u044E\u043D\u044C:6,\u0438\u044E\u043D\u044F:6,\u0438\u044E\u043D\u0435:6,\u0438\u044E\u043B\u044C:7,\u0438\u044E\u043B\u044F:7,\u0438\u044E\u043B\u0435:7,\u0430\u0432\u0433\u0443\u0441\u0442:8,\u0430\u0432\u0433\u0443\u0441\u0442\u0430:8,\u0430\u0432\u0433\u0443\u0441\u0442\u0435:8,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044C:9,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044F:9,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u0435:9,\u043E\u043A\u0442\u044F\u0431\u0440\u044C:10,\u043E\u043A\u0442\u044F\u0431\u0440\u044F:10,\u043E\u043A\u0442\u044F\u0431\u0440\u0435:10,\u043D\u043E\u044F\u0431\u0440\u044C:11,\u043D\u043E\u044F\u0431\u0440\u044F:11,\u043D\u043E\u044F\u0431\u0440\u0435:11,\u0434\u0435\u043A\u0430\u0431\u0440\u044C:12,\u0434\u0435\u043A\u0430\u0431\u0440\u044F:12,\u0434\u0435\u043A\u0430\u0431\u0440\u0435:12};ee.MONTH_DICTIONARY=Object.assign(Object.assign({},ee.FULL_MONTH_NAME_DICTIONARY),{\u044F\u043D\u0432:1,"\u044F\u043D\u0432.":1,\u0444\u0435\u0432:2,"\u0444\u0435\u0432.":2,\u043C\u0430\u0440:3,"\u043C\u0430\u0440.":3,\u0430\u043F\u0440:4,"\u0430\u043F\u0440.":4,\u0430\u0432\u0433:8,"\u0430\u0432\u0433.":8,\u0441\u0435\u043D:9,"\u0441\u0435\u043D.":9,\u043E\u043A\u0442:10,"\u043E\u043A\u0442.":10,\u043D\u043E\u044F:11,"\u043D\u043E\u044F.":11,\u0434\u0435\u043A:12,"\u0434\u0435\u043A.":12});ee.INTEGER_WORD_DICTIONARY={\u043E\u0434\u0438\u043D:1,\u043E\u0434\u043D\u0430:1,\u043E\u0434\u043D\u043E\u0439:1,\u043E\u0434\u043D\u0443:1,\u0434\u0432\u0435:2,\u0434\u0432\u0430:2,\u0434\u0432\u0443\u0445:2,\u0442\u0440\u0438:3,\u0442\u0440\u0435\u0445:3,\u0442\u0440\u0451\u0445:3,\u0447\u0435\u0442\u044B\u0440\u0435:4,\u0447\u0435\u0442\u044B\u0440\u0435\u0445:4,\u0447\u0435\u0442\u044B\u0440\u0451\u0445:4,\u043F\u044F\u0442\u044C:5,\u043F\u044F\u0442\u0438:5,\u0448\u0435\u0441\u0442\u044C:6,\u0448\u0435\u0441\u0442\u0438:6,\u0441\u0435\u043C\u044C:7,\u0441\u0435\u043C\u0438:7,\u0432\u043E\u0441\u0435\u043C\u044C:8,\u0432\u043E\u0441\u0435\u043C\u044C\u043C\u0438:8,\u0434\u0435\u0432\u044F\u0442\u044C:9,\u0434\u0435\u0432\u044F\u0442\u0438:9,\u0434\u0435\u0441\u044F\u0442\u044C:10,\u0434\u0435\u0441\u044F\u0442\u0438:10,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u044C:11,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u0438:11,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u044C:12,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u0438:12};ee.ORDINAL_WORD_DICTIONARY={\u043F\u0435\u0440\u0432\u043E\u0435:1,\u043F\u0435\u0440\u0432\u043E\u0433\u043E:1,\u0432\u0442\u043E\u0440\u043E\u0435:2,\u0432\u0442\u043E\u0440\u043E\u0433\u043E:2,\u0442\u0440\u0435\u0442\u044C\u0435:3,\u0442\u0440\u0435\u0442\u044C\u0435\u0433\u043E:3,\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0435:4,\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0433\u043E:4,\u043F\u044F\u0442\u043E\u0435:5,\u043F\u044F\u0442\u043E\u0433\u043E:5,\u0448\u0435\u0441\u0442\u043E\u0435:6,\u0448\u0435\u0441\u0442\u043E\u0433\u043E:6,\u0441\u0435\u0434\u044C\u043C\u043E\u0435:7,\u0441\u0435\u0434\u044C\u043C\u043E\u0433\u043E:7,\u0432\u043E\u0441\u044C\u043C\u043E\u0435:8,\u0432\u043E\u0441\u044C\u043C\u043E\u0433\u043E:8,\u0434\u0435\u0432\u044F\u0442\u043E\u0435:9,\u0434\u0435\u0432\u044F\u0442\u043E\u0433\u043E:9,\u0434\u0435\u0441\u044F\u0442\u043E\u0435:10,\u0434\u0435\u0441\u044F\u0442\u043E\u0433\u043E:10,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:11,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:11,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:12,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:12,\u0442\u0440\u0438\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:13,\u0442\u0440\u0438\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:13,\u0447\u0435\u0442\u044B\u0440\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:14,\u0447\u0435\u0442\u044B\u0440\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:14,\u043F\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:15,\u043F\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:15,\u0448\u0435\u0441\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:16,\u0448\u0435\u0441\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:16,\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:17,\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:17,\u0432\u043E\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:18,\u0432\u043E\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:18,\u0434\u0435\u0432\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:19,\u0434\u0435\u0432\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:19,\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u043E\u0435:20,\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:20,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0435":21,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0433\u043E":21,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u0442\u043E\u0440\u043E\u0435":22,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u0442\u043E\u0440\u043E\u0433\u043E":22,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0442\u0440\u0435\u0442\u044C\u0435":23,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0442\u0440\u0435\u0442\u044C\u0435\u0433\u043E":23,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0435":24,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0433\u043E":24,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u044F\u0442\u043E\u0435":25,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u044F\u0442\u043E\u0433\u043E":25,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0448\u0435\u0441\u0442\u043E\u0435":26,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0448\u0435\u0441\u0442\u043E\u0433\u043E":26,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0441\u0435\u0434\u044C\u043C\u043E\u0435":27,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0441\u0435\u0434\u044C\u043C\u043E\u0433\u043E":27,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u043E\u0441\u044C\u043C\u043E\u0435":28,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u043E\u0441\u044C\u043C\u043E\u0433\u043E":28,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0434\u0435\u0432\u044F\u0442\u043E\u0435":29,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0434\u0435\u0432\u044F\u0442\u043E\u0433\u043E":29,\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u043E\u0435:30,\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u043E\u0433\u043E:30,"\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0435":31,"\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0433\u043E":31};ee.TIME_UNIT_DICTIONARY={\u0441\u0435\u043A:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u0430:"second",\u0441\u0435\u043A\u0443\u043D\u0434:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u044B:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u0443:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0430:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0438:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u0435\u043A:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0443:"second",\u043C\u0438\u043D:"minute",\u043C\u0438\u043D\u0443\u0442\u0430:"minute",\u043C\u0438\u043D\u0443\u0442:"minute",\u043C\u0438\u043D\u0443\u0442\u044B:"minute",\u043C\u0438\u043D\u0443\u0442\u0443:"minute",\u043C\u0438\u043D\u0443\u0442\u043E\u043A:"minute",\u043C\u0438\u043D\u0443\u0442\u043A\u0438:"minute",\u043C\u0438\u043D\u0443\u0442\u043A\u0443:"minute",\u0447\u0430\u0441:"hour",\u0447\u0430\u0441\u043E\u0432:"hour",\u0447\u0430\u0441\u0430:"hour",\u0447\u0430\u0441\u0443:"hour",\u0447\u0430\u0441\u0438\u043A\u043E\u0432:"hour",\u0447\u0430\u0441\u0438\u043A\u0430:"hour",\u0447\u0430\u0441\u0438\u043A\u0435:"hour",\u0447\u0430\u0441\u0438\u043A:"hour",\u0434\u0435\u043D\u044C:"d",\u0434\u043D\u044F:"d",\u0434\u043D\u0435\u0439:"d",\u0441\u0443\u0442\u043E\u043A:"d",\u0441\u0443\u0442\u043A\u0438:"d",\u043D\u0435\u0434\u0435\u043B\u044F:"week",\u043D\u0435\u0434\u0435\u043B\u0435:"week",\u043D\u0435\u0434\u0435\u043B\u0438:"week",\u043D\u0435\u0434\u0435\u043B\u044E:"week",\u043D\u0435\u0434\u0435\u043B\u044C:"week",\u043D\u0435\u0434\u0435\u043B\u044C\u043A\u0435:"week",\u043D\u0435\u0434\u0435\u043B\u044C\u043A\u0438:"week",\u043D\u0435\u0434\u0435\u043B\u0435\u043A:"week",\u043C\u0435\u0441\u044F\u0446:"month",\u043C\u0435\u0441\u044F\u0446\u0435:"month",\u043C\u0435\u0441\u044F\u0446\u0435\u0432:"month",\u043C\u0435\u0441\u044F\u0446\u0430:"month",\u043A\u0432\u0430\u0440\u0442\u0430\u043B:"quarter",\u043A\u0432\u0430\u0440\u0442\u0430\u043B\u0435:"quarter",\u043A\u0432\u0430\u0440\u0442\u0430\u043B\u043E\u0432:"quarter",\u0433\u043E\u0434:"year",\u0433\u043E\u0434\u0430:"year",\u0433\u043E\u0434\u0443:"year",\u0433\u043E\u0434\u043E\u0432:"year",\u043B\u0435\u0442:"year",\u0433\u043E\u0434\u0438\u043A:"year",\u0433\u043E\u0434\u0438\u043A\u0430:"year",\u0433\u043E\u0434\u0438\u043A\u043E\u0432:"year"};ee.NUMBER_PATTERN=`(?:${xo.matchAnyPattern(ee.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|\u043F\u043E\u043B|\u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E|\u043F\u0430\u0440(?:\u044B|\u0443)|\\s{0,3})`;function oT(r){let e=r.toLowerCase();return ee.INTEGER_WORD_DICTIONARY[e]!==void 0?ee.INTEGER_WORD_DICTIONARY[e]:e.match(/несколько/)?3:e.match(/пол/)?.5:e.match(/пар/)?2:e===""?1:parseFloat(e)}ee.parseNumberPattern=oT;ee.ORDINAL_NUMBER_PATTERN=`(?:${xo.matchAnyPattern(ee.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:\u0433\u043E|\u043E\u0433\u043E|\u0435|\u043E\u0435)?)`;function rR(r){let e=r.toLowerCase();return ee.ORDINAL_WORD_DICTIONARY[e]!==void 0?ee.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}ee.parseOrdinalNumberPattern=rR;var hf="(?:\\s+(?:\u0433\u043E\u0434\u0443|\u0433\u043E\u0434\u0430|\u0433\u043E\u0434|\u0433|\u0433.))?";ee.YEAR_PATTERN=`(?:[1-9][0-9]{0,3}${hf}\\s*(?:\u043D.\u044D.|\u0434\u043E \u043D.\u044D.|\u043D. \u044D.|\u0434\u043E \u043D. \u044D.)|[1-2][0-9]{3}${hf}|[5-9][0-9]${hf})`;function nR(r){if(/(год|года|г|г.)/i.test(r)&&(r=r.replace(/(год|года|г|г.)/i,"")),/(до н.э.|до н. э.)/i.test(r))return r=r.replace(/(до н.э.|до н. э.)/i,""),-parseInt(r);if(/(н. э.|н.э.)/i.test(r))return r=r.replace(/(н. э.|н.э.)/i,""),parseInt(r);let e=parseInt(r);return tR.findMostLikelyADYear(e)}ee.parseYear=nR;var uT=`(${ee.NUMBER_PATTERN})\\s{0,3}(${xo.matchAnyPattern(ee.TIME_UNIT_DICTIONARY)})`,aT=new RegExp(uT,"i");ee.TIME_UNITS_PATTERN=xo.repeatedTimeunitPattern("(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s{0,3})?",uT);function iR(r){let e={},t=r,n=aT.exec(t);for(;n;)sR(e,n),t=t.substring(n[0].length).trim(),n=aT.exec(t);return e}ee.parseTimeUnits=iR;function sR(r,e){let t=oT(e[1]),n=ee.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var cT=_(gf=>{"use strict";Object.defineProperty(gf,"__esModule",{value:!0});var Xs=Mt(),aR=Ie(),oR=q(),lT=`(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s*(?:~\\s*)?)?(${Xs.TIME_UNITS_PATTERN})${Xs.REGEX_PARTS.rightBoundary}`,uR=new RegExp(`(?:\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0435|\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0438)\\s*${lT}`,Xs.REGEX_PARTS.flags),lR=new RegExp(lT,"i"),mf=class extends oR.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Xs.REGEX_PARTS.leftBoundary}innerPattern(e){return e.option.forwardDate?lR:uR}innerExtract(e,t){let n=Xs.parseTimeUnits(t[1]);return aR.ParsingComponents.createRelativeFromReference(e.reference,n)}};gf.default=mf});var mT=_(Tf=>{"use strict";Object.defineProperty(Tf,"__esModule",{value:!0});var cR=st(),Zs=Mt(),hT=Mt(),Ro=Mt(),dR=Ee(),fR=q(),pR=new RegExp(`(?:\u0441)?\\s*(${Ro.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:\u043F\u043E|-|\u2013|\u0434\u043E)?\\s{0,3}(${Ro.ORDINAL_NUMBER_PATTERN}))?(?:-|\\/|\\s{0,3}(?:of)?\\s{0,3})(${dR.matchAnyPattern(Zs.MONTH_DICTIONARY)})(?:(?:-|\\/|,?\\s{0,3})(${hT.YEAR_PATTERN}(?![^\\s]\\d)))?${Zs.REGEX_PARTS.rightBoundary}`,Zs.REGEX_PARTS.flags),dT=1,fT=2,hR=3,pT=4,yf=class extends fR.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Zs.REGEX_PARTS.leftBoundary}innerPattern(){return pR}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Zs.MONTH_DICTIONARY[t[hR].toLowerCase()],s=Ro.parseOrdinalNumberPattern(t[dT]);if(s>31)return t.index=t.index+t[dT].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[pT]){let a=hT.parseYear(t[pT]);n.start.assign("year",a)}else{let a=cR.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[fT]){let a=Ro.parseOrdinalNumberPattern(t[fT]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Tf.default=yf});var TT=_(_f=>{"use strict";Object.defineProperty(_f,"__esModule",{value:!0});var Js=Mt(),mR=st(),gR=Ee(),yT=Mt(),yR=q(),TR=new RegExp(`((?:\u0432)\\s*)?(${gR.matchAnyPattern(Js.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${yT.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,Js.REGEX_PARTS.flags),bR=2,gT=3,bf=class extends yR.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Js.REGEX_PARTS.leftBoundary}innerPattern(){return TR}innerExtract(e,t){let n=t[bR].toLowerCase();if(t[0].length<=3&&!Js.FULL_MONTH_NAME_DICTIONARY[n])return null;let i=e.createParsingResult(t.index,t.index+t[0].length);i.start.imply("day",1);let s=Js.MONTH_DICTIONARY[n];if(i.start.assign("month",s),t[gT]){let a=yT.parseYear(t[gT]);i.start.assign("year",a)}else{let a=mR.findYearClosestToRef(e.refDate,1,s);i.start.imply("year",a)}return i}};_f.default=bf});var _T=_(wf=>{"use strict";Object.defineProperty(wf,"__esModule",{value:!0});var Mo=Be(),_R=Dn(),bT=Mt(),vf=class extends _R.AbstractTimeExpressionParser{constructor(e){super(e)}patternFlags(){return bT.REGEX_PARTS.flags}primaryPatternLeftBoundary(){return"(^|\\s|T|(?:[^\\p{L}\\p{N}_]))"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|\u0434\u043E|\u0438|\u043F\u043E|\\?)\\s*"}primaryPrefix(){return"(?:(?:\u0432|\u0441)\\s*)??"}primarySuffix(){return`(?:\\s*(?:\u0443\u0442\u0440\u0430|\u0432\u0435\u0447\u0435\u0440\u0430|\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F))?(?!\\/)${bT.REGEX_PARTS.rightBoundary}`}extractPrimaryTimeComponents(e,t){let n=super.extractPrimaryTimeComponents(e,t);if(n){if(t[0].endsWith("\u0432\u0435\u0447\u0435\u0440\u0430")){let i=n.get("hour");i>=6&&i<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",Mo.Meridiem.PM)):i<6&&n.assign("meridiem",Mo.Meridiem.AM)}if(t[0].endsWith("\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F")){n.assign("meridiem",Mo.Meridiem.PM);let i=n.get("hour");i>=0&&i<=6&&n.assign("hour",n.get("hour")+12)}t[0].endsWith("\u0443\u0442\u0440\u0430")&&(n.assign("meridiem",Mo.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};wf.default=vf});var vT=_(kf=>{"use strict";Object.defineProperty(kf,"__esModule",{value:!0});var Co=Mt(),vR=Ie(),wR=q(),ER=Bt(),kR=new RegExp(`(${Co.TIME_UNITS_PATTERN})\\s{0,5}\u043D\u0430\u0437\u0430\u0434(?=(?:\\W|$))`,Co.REGEX_PARTS.flags),Ef=class extends wR.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Co.REGEX_PARTS.leftBoundary}innerPattern(){return kR}innerExtract(e,t){let n=Co.parseTimeUnits(t[1]),i=ER.reverseTimeUnits(n);return vR.ParsingComponents.createRelativeFromReference(e.reference,i)}};kf.default=Ef});var wT=_(ea=>{"use strict";var SR=ea&&ea.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ea,"__esModule",{value:!0});var OR=SR(Tr()),Sf=class extends OR.default{patternBetween(){return/^\s*(и до|и по|до|по|-)\s*$/i}};ea.default=Sf});var ET=_(ta=>{"use strict";var DR=ta&&ta.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ta,"__esModule",{value:!0});var xR=DR(Cr()),Of=class extends xR.default{patternBetween(){return new RegExp("^\\s*(T|\u0432|,|-)?\\s*$")}};ta.default=Of});var kT=_(Wr=>{"use strict";var RR=Wr&&Wr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),MR=Wr&&Wr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),CR=Wr&&Wr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&RR(e,r,t);return MR(e,r),e};Object.defineProperty(Wr,"__esModule",{value:!0});var AR=q(),ra=CR(Nr()),Df=Mt(),PR=new RegExp(`(?:\u0441|\u0441\u043E)?\\s*(\u0441\u0435\u0433\u043E\u0434\u043D\u044F|\u0432\u0447\u0435\u0440\u0430|\u0437\u0430\u0432\u0442\u0440\u0430|\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430|\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430)${Df.REGEX_PARTS.rightBoundary}`,Df.REGEX_PARTS.flags),xf=class extends AR.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Df.REGEX_PARTS.leftBoundary}innerPattern(e){return PR}innerExtract(e,t){let n=t[1].toLowerCase(),i=e.createParsingComponents();switch(n){case"\u0441\u0435\u0433\u043E\u0434\u043D\u044F":return ra.today(e.reference);case"\u0432\u0447\u0435\u0440\u0430":return ra.yesterday(e.reference);case"\u0437\u0430\u0432\u0442\u0440\u0430":return ra.tomorrow(e.reference);case"\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430":return ra.theDayAfter(e.reference,2);case"\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430":return ra.theDayBefore(e.reference,2)}return i}};Wr.default=xf});var ST=_(ur=>{"use strict";var NR=ur&&ur.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),IR=ur&&ur.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),FR=ur&&ur.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&NR(e,r,t);return IR(e,r),e},LR=ur&&ur.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ur,"__esModule",{value:!0});var UR=q(),In=FR(Nr()),WR=Gt(),qR=LR(ye()),Rf=Mt(),$R=new RegExp(`(\u0441\u0435\u0439\u0447\u0430\u0441|\u043F\u0440\u043E\u0448\u043B\u044B\u043C\\s*\u0432\u0435\u0447\u0435\u0440\u043E\u043C|\u043F\u0440\u043E\u0448\u043B\u043E\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u0441\u0435\u0433\u043E\u0434\u043D\u044F\\s*\u043D\u043E\u0447\u044C\u044E|\u044D\u0442\u043E\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u043D\u043E\u0447\u044C\u044E|\u044D\u0442\u0438\u043C \u0443\u0442\u0440\u043E\u043C|\u0443\u0442\u0440\u043E\u043C|\u0443\u0442\u0440\u0430|\u0432\\s*\u043F\u043E\u043B\u0434\u0435\u043D\u044C|\u0432\u0435\u0447\u0435\u0440\u043E\u043C|\u0432\u0435\u0447\u0435\u0440\u0430|\u0432\\s*\u043F\u043E\u043B\u043D\u043E\u0447\u044C)${Rf.REGEX_PARTS.rightBoundary}`,Rf.REGEX_PARTS.flags),Mf=class extends UR.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Rf.REGEX_PARTS.leftBoundary}innerPattern(){return $R}innerExtract(e,t){let n=qR.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();if(i==="\u0441\u0435\u0439\u0447\u0430\u0441")return In.now(e.reference);if(i==="\u0432\u0435\u0447\u0435\u0440\u043E\u043C"||i==="\u0432\u0435\u0447\u0435\u0440\u0430")return In.evening(e.reference);if(i.endsWith("\u0443\u0442\u0440\u043E\u043C")||i.endsWith("\u0443\u0442\u0440\u0430"))return In.morning(e.reference);if(i.match(/в\s*полдень/))return In.noon(e.reference);if(i.match(/прошлой\s*ночью/))return In.lastNight(e.reference);if(i.match(/прошлым\s*вечером/))return In.yesterdayEvening(e.reference);if(i.match(/следующей\s*ночью/)){let a=n.hour()<22?1:2;n=n.add(a,"day"),WR.assignSimilarDate(s,n),s.imply("hour",0)}return i.match(/в\s*полночь/)||i.endsWith("\u043D\u043E\u0447\u044C\u044E")?In.midnight(e.reference):s}};ur.default=Mf});var OT=_(Af=>{"use strict";Object.defineProperty(Af,"__esModule",{value:!0});var na=Mt(),YR=Ee(),jR=q(),GR=Rn(),BR=new RegExp(`(?:(?:,|\\(|\uFF08)\\s*)?(?:\u0432\\s*?)?(?:(\u044D\u0442\u0443|\u044D\u0442\u043E\u0442|\u043F\u0440\u043E\u0448\u043B\u044B\u0439|\u043F\u0440\u043E\u0448\u043B\u0443\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E)\\s*)?(${YR.matchAnyPattern(na.WEEKDAY_DICTIONARY)})(?:\\s*(?:,|\\)|\uFF09))?(?:\\s*\u043D\u0430\\s*(\u044D\u0442\u043E\u0439|\u043F\u0440\u043E\u0448\u043B\u043E\u0439|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439)\\s*\u043D\u0435\u0434\u0435\u043B\u0435)?${na.REGEX_PARTS.rightBoundary}`,na.REGEX_PARTS.flags),HR=1,zR=2,VR=3,Cf=class extends jR.AbstractParserWithWordBoundaryChecking{innerPattern(){return BR}patternLeftBoundary(){return na.REGEX_PARTS.leftBoundary}innerExtract(e,t){let n=t[zR].toLowerCase(),i=na.WEEKDAY_DICTIONARY[n],s=t[HR],a=t[VR],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o=="\u043F\u0440\u043E\u0448\u043B\u044B\u0439"||o=="\u043F\u0440\u043E\u0448\u043B\u0443\u044E"||o=="\u043F\u0440\u043E\u0448\u043B\u043E\u0439"?u="last":o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E"?u="next":(o=="\u044D\u0442\u043E\u0442"||o=="\u044D\u0442\u0443"||o=="\u044D\u0442\u043E\u0439")&&(u="this");let l=GR.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Af.default=Cf});var xT=_(sa=>{"use strict";var KR=sa&&sa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(sa,"__esModule",{value:!0});var ia=Mt(),DT=Ie(),QR=KR(ye()),XR=q(),ZR=Ee(),JR=new RegExp(`(\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u043C|\u043D\u0430 \u043F\u0440\u043E\u0448\u043B\u043E\u0439|\u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439|\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C|\u043D\u0430 \u044D\u0442\u043E\u0439|\u0432 \u044D\u0442\u043E\u043C)\\s*(${ZR.matchAnyPattern(ia.TIME_UNIT_DICTIONARY)})(?=\\s*)${ia.REGEX_PARTS.rightBoundary}`,ia.REGEX_PARTS.flags),eM=1,tM=2,Pf=class extends XR.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return ia.REGEX_PARTS.leftBoundary}innerPattern(){return JR}innerExtract(e,t){let n=t[eM].toLowerCase(),i=t[tM].toLowerCase(),s=ia.TIME_UNIT_DICTIONARY[i];if(n=="\u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||n=="\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C"){let u={};return u[s]=1,DT.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u043C"||n=="\u043D\u0430 \u043F\u0440\u043E\u0448\u043B\u043E\u0439"){let u={};return u[s]=-1,DT.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=QR.default(e.reference.instant);return s.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):s.match(/month/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):s.match(/year/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};sa.default=Pf});var RT=_(If=>{"use strict";Object.defineProperty(If,"__esModule",{value:!0});var aa=Mt(),rM=Ie(),nM=q(),iM=Bt(),sM=new RegExp(`(\u044D\u0442\u0438|\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435|\u043F\u0440\u043E\u0448\u043B\u044B\u0435|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0435|\u043F\u043E\u0441\u043B\u0435|\u0447\u0435\u0440\u0435\u0437|\\+|-)\\s*(${aa.TIME_UNITS_PATTERN})${aa.REGEX_PARTS.rightBoundary}`,aa.REGEX_PARTS.flags),Nf=class extends nM.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return aa.REGEX_PARTS.leftBoundary}innerPattern(){return sM}innerExtract(e,t){let n=t[1].toLowerCase(),i=aa.parseTimeUnits(t[2]);switch(n){case"\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435":case"\u043F\u0440\u043E\u0448\u043B\u044B\u0435":case"-":i=iM.reverseTimeUnits(i);break}return rM.ParsingComponents.createRelativeFromReference(e.reference,i)}};If.default=Nf});var AT=_(Je=>{"use strict";var Pt=Je&&Je.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Je,"__esModule",{value:!0});Je.createConfiguration=Je.createCasualConfiguration=Je.parseDate=Je.parse=Je.strict=Je.casual=void 0;var aM=Pt(cT()),oM=Pt(mT()),uM=Pt(TT()),lM=Pt(_T()),cM=Pt(vT()),dM=Pt(wT()),fM=Pt(ET()),pM=Ar(),hM=Pt(kT()),mM=Pt(ST()),gM=Pt(OT()),yM=Pt(xT()),MT=nr(),TM=Pt(Mn()),bM=Pt(RT());Je.casual=new MT.Chrono(CT());Je.strict=new MT.Chrono(Ff(!0));function _M(r,e,t){return Je.casual.parse(r,e,t)}Je.parse=_M;function vM(r,e,t){return Je.casual.parseDate(r,e,t)}Je.parseDate=vM;function CT(){let r=Ff(!1);return r.parsers.unshift(new hM.default),r.parsers.unshift(new mM.default),r.parsers.unshift(new uM.default),r.parsers.unshift(new yM.default),r.parsers.unshift(new bM.default),r}Je.createCasualConfiguration=CT;function Ff(r=!0){return pM.includeCommonConfiguration({parsers:[new TM.default(!0),new aM.default,new oM.default,new gM.default,new lM.default(r),new cM.default],refiners:[new fM.default,new dM.default]},r)}Je.createConfiguration=Ff});var Be=_(ne=>{"use strict";var wM=ne&&ne.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),EM=ne&&ne.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),ln=ne&&ne.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&wM(e,r,t);return EM(e,r),e};Object.defineProperty(ne,"__esModule",{value:!0});ne.parseDate=ne.parse=ne.casual=ne.strict=ne.ru=ne.zh=ne.nl=ne.pt=ne.ja=ne.fr=ne.de=ne.Meridiem=ne.Chrono=ne.en=void 0;var Lf=ln(Jl());ne.en=Lf;var kM=nr();Object.defineProperty(ne,"Chrono",{enumerable:!0,get:function(){return kM.Chrono}});var SM;(function(r){r[r.AM=0]="AM",r[r.PM=1]="PM"})(SM=ne.Meridiem||(ne.Meridiem={}));var OM=ln($m());ne.de=OM;var DM=ln(gg());ne.fr=DM;var xM=ln(Sg());ne.ja=xM;var RM=ln($g());ne.pt=RM;var MM=ln(Sy());ne.nl=MM;var CM=ln(sT());ne.zh=CM;var AM=ln(AT());ne.ru=AM;ne.strict=Lf.strict;ne.casual=Lf.casual;function PM(r,e,t){return ne.casual.parse(r,e,t)}ne.parse=PM;function NM(r,e,t){return ne.casual.parseDate(r,e,t)}ne.parseDate=NM});var Rb=_((Db,xb)=>{(function(r){var e=Object.hasOwnProperty,t=Array.isArray?Array.isArray:function(p){return Object.prototype.toString.call(p)==="[object Array]"},n=10,i=typeof process=="object"&&typeof process.nextTick=="function",s=typeof Symbol=="function",a=typeof Reflect=="object",o=typeof setImmediate=="function",u=o?setImmediate:setTimeout,l=s?a&&typeof Reflect.ownKeys=="function"?Reflect.ownKeys:function(d){var p=Object.getOwnPropertyNames(d);return p.push.apply(p,Object.getOwnPropertySymbols(d)),p}:Object.keys;function c(){this._events={},this._conf&&f.call(this,this._conf)}function f(d){d&&(this._conf=d,d.delimiter&&(this.delimiter=d.delimiter),d.maxListeners!==r&&(this._maxListeners=d.maxListeners),d.wildcard&&(this.wildcard=d.wildcard),d.newListener&&(this._newListener=d.newListener),d.removeListener&&(this._removeListener=d.removeListener),d.verboseMemoryLeak&&(this.verboseMemoryLeak=d.verboseMemoryLeak),d.ignoreErrors&&(this.ignoreErrors=d.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function h(d,p){var m="(node) warning: possible EventEmitter memory leak detected. "+d+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(m+=" Event name: "+p+"."),typeof process!="undefined"&&process.emitWarning){var g=new Error(m);g.name="MaxListenersExceededWarning",g.emitter=this,g.count=d,process.emitWarning(g)}else console.error(m),console.trace&&console.trace()}var T=function(d,p,m){var g=arguments.length;switch(g){case 0:return[];case 1:return[d];case 2:return[d,p];case 3:return[d,p,m];default:for(var b=new Array(g);g--;)b[g]=arguments[g];return b}};function y(d,p){for(var m={},g,b=d.length,v=p?p.length:0,k=0;k0;)d=v[S],k.call(x,d,m[d]);this._listeners={},this._listenersCount=0,O()}}});function D(d,p,m,g){var b=Object.assign({},p);if(!d)return b;if(typeof d!="object")throw TypeError("options must be an object");var v=Object.keys(d),k=v.length,x,S,O;function I(se){throw Error('Invalid "'+x+'" option value'+(se?". Reason: "+se:""))}for(var me=0;me0;)if(x===d[S])return v;k(p)}}var L=N(["function"]),oe=N(["object","function"]);function z(d,p,m){var g,b,v=0,k,x=new d(function(S,O,I){m=D(m,{timeout:0,overload:!1},{timeout:function(De,W){return De*=1,(typeof De!="number"||De<0||!Number.isFinite(De))&&W("timeout must be a positive number"),De}}),g=!m.overload&&typeof d.prototype.cancel=="function"&&typeof I=="function";function me(){b&&(b=null),v&&(clearTimeout(v),v=0)}var se=function(De){me(),S(De)},te=function(De){me(),O(De)};g?p(se,te,I):(b=[function(De){te(De||Error("canceled"))}],p(se,te,function(De){if(k)throw Error("Unable to subscribe on cancel event asynchronously");if(typeof De!="function")throw TypeError("onCancel callback must be a function");b.push(De)}),k=!0),m.timeout>0&&(v=setTimeout(function(){var De=Error("timeout");De.code="ETIMEDOUT",v=0,x.cancel(De),O(De)},m.timeout))});return g||(x.cancel=function(S){if(!!b){for(var O=b.length,I=1;I0;)te=qe[x],te!=="_listeners"&&(Ue=j(d,p,m[te],g+1,b),Ue&&(se?se.push.apply(se,Ue):se=Ue));return se}else if(nt==="**"){for(Ae=g+1===b||g+2===b&&Mr==="*",Ae&&m._listeners&&(se=j(d,p,m,b,b)),qe=l(m),x=qe.length;x-- >0;)te=qe[x],te!=="_listeners"&&(te==="*"||te==="**"?(m[te]._listeners&&!Ae&&(Ue=j(d,p,m[te],b,b),Ue&&(se?se.push.apply(se,Ue):se=Ue)),Ue=j(d,p,m[te],g,b)):te===Mr?Ue=j(d,p,m[te],g+2,b):Ue=j(d,p,m[te],g,b),Ue&&(se?se.push.apply(se,Ue):se=Ue));return se}else m[nt]&&(se=j(d,p,m[nt],g+1,b));if(De=m["*"],De&&j(d,p,De,g+1,b),W=m["**"],W)if(g0;)te=qe[x],te!=="_listeners"&&(te===Mr?j(d,p,W[te],g+2,b):te===nt?j(d,p,W[te],g+1,b):(Re={},Re[te]=W[te],j(d,p,{"**":Re},g+1,b)));else W._listeners?j(d,p,W,b,b):W["*"]&&W["*"]._listeners&&j(d,p,W["*"],b,b);return se}function G(d,p,m){var g=0,b=0,v,k=this.delimiter,x=k.length,S;if(typeof d=="string")if((v=d.indexOf(k))!==-1){S=new Array(5);do S[g++]=d.slice(b,v),b=v+x;while((v=d.indexOf(k,b))!==-1);S[g++]=d.slice(b)}else S=[d],g=1;else S=d,g=d.length;if(g>1){for(v=0;v+10&&O._listeners.length>this._maxListeners&&(O._listeners.warned=!0,h.call(this,O._listeners.length,I))):O._listeners=p,!0;return!0}function Ne(d,p,m,g){for(var b=l(d),v=b.length,k,x,S,O=d._listeners,I;v-- >0;)x=b[v],k=d[x],x==="_listeners"?S=m:S=m?m.concat(x):[x],I=g||typeof x=="symbol",O&&p.push(I?S:S.join(this.delimiter)),typeof k=="object"&&Ne.call(this,k,p,S,I);return p}function Le(d){for(var p=l(d),m=p.length,g,b,v;m-- >0;)b=p[m],g=d[b],g&&(v=!0,b!=="_listeners"&&!Le(g)&&delete d[b]);return v}function B(d,p,m){this.emitter=d,this.event=p,this.listener=m}B.prototype.off=function(){return this.emitter.off(this.event,this.listener),this};function A(d,p,m){if(m===!0)b=!0;else if(m===!1)g=!0;else{if(!m||typeof m!="object")throw TypeError("options should be an object or true");var g=m.async,b=m.promisify,v=m.nextTick,k=m.objectify}if(g||v||b){var x=p,S=p._origin||p;if(v&&!i)throw Error("process.nextTick is not supported");b===r&&(b=p.constructor.name==="AsyncFunction"),p=function(){var O=arguments,I=this,me=this.event;return b?v?Promise.resolve():new Promise(function(se){u(se)}).then(function(){return I.event=me,x.apply(I,O)}):(v?process.nextTick:u)(function(){I.event=me,x.apply(I,O)})},p._async=!0,p._origin=S}return[p,k?new B(this,d,p):this]}function E(d){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,f.call(this,d)}E.EventEmitter2=E,E.prototype.listenTo=function(d,p,m){if(typeof d!="object")throw TypeError("target musts be an object");var g=this;m=D(m,{on:r,off:r,reducers:r},{on:L,off:L,reducers:oe});function b(v){if(typeof v!="object")throw TypeError("events must be an object");var k=m.reducers,x=ie.call(g,d),S;x===-1?S=new w(g,d,m):S=g._observers[x];for(var O=l(v),I=O.length,me,se=typeof k=="function",te=0;te0;)b=m[g],(!d||b._target===d)&&(b.unsubscribe(p),v=!0);return v},E.prototype.delimiter=".",E.prototype.setMaxListeners=function(d){d!==r&&(this._maxListeners=d,this._conf||(this._conf={}),this._conf.maxListeners=d)},E.prototype.getMaxListeners=function(){return this._maxListeners},E.prototype.event="",E.prototype.once=function(d,p,m){return this._once(d,p,!1,m)},E.prototype.prependOnceListener=function(d,p,m){return this._once(d,p,!0,m)},E.prototype._once=function(d,p,m,g){return this._many(d,1,p,m,g)},E.prototype.many=function(d,p,m,g){return this._many(d,p,m,!1,g)},E.prototype.prependMany=function(d,p,m,g){return this._many(d,p,m,!0,g)},E.prototype._many=function(d,p,m,g,b){var v=this;if(typeof m!="function")throw new Error("many only accepts instances of Function");function k(){return--p===0&&v.off(d,k),m.apply(this,arguments)}return k._origin=m,this._on(d,k,g,b)},E.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||c.call(this);var d=arguments[0],p,m=this.wildcard,g,b,v,k,x;if(d==="newListener"&&!this._newListener&&!this._events.newListener)return!1;if(m&&(p=d,d!=="newListener"&&d!=="removeListener"&&typeof d=="object")){if(b=d.length,s){for(v=0;v3)for(g=new Array(S-1),k=1;k3)for(b=new Array(O-1),x=1;x0&&this._events[d].length>this._maxListeners&&(this._events[d].warned=!0,h.call(this,this._events[d].length,d))):this._events[d]=p,b)},E.prototype.off=function(d,p){if(typeof p!="function")throw new Error("removeListener only takes instances of Function");var m,g=[];if(this.wildcard){var b=typeof d=="string"?d.split(this.delimiter):d.slice();if(g=j.call(this,null,b,this.listenerTree,0),!g)return this}else{if(!this._events[d])return this;m=this._events[d],g.push({_listeners:m})}for(var v=0;v0){for(g=this._all,p=0,m=g.length;p0;)g=p[m[v]],typeof g=="function"?b.push(g):b.push.apply(b,g);return b}else{if(this.wildcard){if(k=this.listenerTree,!k)return[];var x=[],S=typeof d=="string"?d.split(this.delimiter):d.slice();return j.call(this,x,S,k,0),x}return p?(g=p[d],g?typeof g=="function"?[g]:g:[]):[]}},E.prototype.eventNames=function(d){var p=this._events;return this.wildcard?Ne.call(this,this.listenerTree,[],null,d):p?l(p):[]},E.prototype.listenerCount=function(d){return this.listeners(d).length},E.prototype.hasListeners=function(d){if(this.wildcard){var p=[],m=typeof d=="string"?d.split(this.delimiter):d.slice();return j.call(this,p,m,this.listenerTree,0),p.length>0}var g=this._events,b=this._all;return!!(b&&b.length||g&&(d===r?l(g).length:g[d]))},E.prototype.listenersAny=function(){return this._all?this._all:[]},E.prototype.waitFor=function(d,p){var m=this,g=typeof p;return g==="number"?p={timeout:p}:g==="function"&&(p={filter:p}),p=D(p,{timeout:0,filter:r,handleError:!1,Promise,overload:!1},{filter:L,Promise:C}),z(p.Promise,function(b,v,k){function x(){var S=p.filter;if(!(S&&!S.apply(m,arguments)))if(m.off(d,x),p.handleError){var O=arguments[0];O?v(O):b(T.apply(null,arguments).slice(1))}else b(T.apply(null,arguments))}k(function(){m.off(d,x)}),m._on(d,x,!1)},{timeout:p.timeout,overload:p.overload})};function H(d,p,m){m=D(m,{Promise,timeout:0,overload:!1},{Promise:C});var g=m.Promise;return z(g,function(b,v,k){var x;if(typeof d.addEventListener=="function"){x=function(){b(T.apply(null,arguments))},k(function(){d.removeEventListener(p,x)}),d.addEventListener(p,x,{once:!0});return}var S=function(){O&&d.removeListener("error",O),b(T.apply(null,arguments))},O;p!=="error"&&(O=function(I){d.removeListener(p,S),v(I)},d.once("error",O)),k(function(){O&&d.removeListener("error",O),d.removeListener(p,S)}),d.once(p,S)},{timeout:m.timeout,overload:m.overload})}var P=E.prototype;if(Object.defineProperties(E,{defaultMaxListeners:{get:function(){return P._maxListeners},set:function(d){if(typeof d!="number"||d<0||Number.isNaN(d))throw TypeError("n must be a non-negative number");P._maxListeners=d},enumerable:!0},once:{value:H,writable:!0,configurable:!0}}),Object.defineProperties(P,{_maxListeners:{value:n,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),typeof define=="function"&&define.amd)define(function(){return E});else if(typeof Db=="object")xb.exports=E;else{var Z=new Function("","return this")();Z.EventEmitter2=E}})()});var r_=_(yp=>{"use strict";Object.defineProperty(yp,"__esModule",{value:!0});var e_=Symbol("MustacheDataPath");function Jb({target:r,propertyName:e}){return[...r[e_]||[],e]}function t_(r,e){return typeof r!="object"?r:new Proxy(r,{get(t,n){let i=t[n];if(i===void 0&&!(n in t)){let s=Jb({target:t,propertyName:n});if(e!=null&&e.handleError)return e.handleError(s),i;throw Error(`Missing Mustache data property: ${s.join(" > ")}`)}return i&&typeof i=="object"?(i[e_]=Jb({target:t,propertyName:n}),t_(i,e)):i}})}yp.default=t_});var Or=_(fr=>{"use strict";fr.__esModule=!0;fr.Tokens=fr.StructuralCharacters=fr.Operators=void 0;var dA;(function(r){r.AND="AND",r.OR="OR",r.XOR="XOR",r.NOT="NOT"})(dA=fr.Operators||(fr.Operators={}));var fA;(function(r){r.OPEN_PARENTHESIS="(",r.CLOSE_PARENTHESIS=")"})(fA=fr.StructuralCharacters||(fr.StructuralCharacters={}));var pA;(function(r){r.IDENTIFIER="IDENTIFIER",r.OPERATOR="OPERATOR",r.STRUCTURAL_CHARACTER="STRUCTURAL_CHARACTER",r.EOF="EOF",r.COMMENT="COMMENT"})(pA=fr.Tokens||(fr.Tokens={}))});var wp=_(Bi=>{"use strict";Bi.__esModule=!0;Bi.VALID_TOKENS=Bi.OPERATOR_PRECEDENCE=void 0;var Fe=Or();Bi.OPERATOR_PRECEDENCE={NOT:0,XOR:1,AND:2,OR:3};Bi.VALID_TOKENS={identifierOnly:[{name:Fe.Tokens.IDENTIFIER},{name:Fe.Tokens.STRUCTURAL_CHARACTER,value:Fe.StructuralCharacters.OPEN_PARENTHESIS}],identifierOrNot:[{name:Fe.Tokens.IDENTIFIER},{name:Fe.Tokens.STRUCTURAL_CHARACTER,value:Fe.StructuralCharacters.OPEN_PARENTHESIS},{name:Fe.Tokens.OPERATOR,value:Fe.Operators.NOT}],binaryOperator:[{name:Fe.Tokens.OPERATOR,value:Fe.Operators.AND},{name:Fe.Tokens.OPERATOR,value:Fe.Operators.OR},{name:Fe.Tokens.OPERATOR,value:Fe.Operators.XOR}],binaryOperatorOrClose:[{name:Fe.Tokens.OPERATOR,value:Fe.Operators.AND},{name:Fe.Tokens.OPERATOR,value:Fe.Operators.OR},{name:Fe.Tokens.OPERATOR,value:Fe.Operators.XOR},{name:Fe.Tokens.STRUCTURAL_CHARACTER,value:Fe.StructuralCharacters.CLOSE_PARENTHESIS}]}});var Ep=_(Tt=>{"use strict";Tt.__esModule=!0;Tt.ESCAPE_CHARACTER=Tt.EOL=Tt.COMMENT_DELIMITER=Tt.QUOTED_IDENTIFIER_DELIMITER=Tt.SEPARATORS=Tt.OPERATORS=Tt.STRUCTURAL_CHARACTERS=void 0;var Hi=Or();Tt.STRUCTURAL_CHARACTERS={"(":Hi.StructuralCharacters.OPEN_PARENTHESIS,")":Hi.StructuralCharacters.CLOSE_PARENTHESIS};Tt.OPERATORS={AND:Hi.Operators.AND,OR:Hi.Operators.OR,XOR:Hi.Operators.XOR,NOT:Hi.Operators.NOT};Tt.SEPARATORS=new Set([32,9,10,13].map(function(r){return String.fromCodePoint(r)}));Tt.QUOTED_IDENTIFIER_DELIMITER=String.fromCodePoint(34);Tt.COMMENT_DELIMITER=String.fromCodePoint(35);Tt.EOL=String.fromCodePoint(10);Tt.ESCAPE_CHARACTER=String.fromCodePoint(92)});var o_=_(er=>{"use strict";var kp=er&&er.__assign||function(){return kp=Object.assign||function(r){for(var e,t=1,n=arguments.length;t{"use strict";bu.__esModule=!0;bu.lex=void 0;var zi=Or(),Wt=Ep(),Vi=o_(),yA=function(r){for(var e=null,t=null,n=null,i=0;i{"use strict";var l_=qt&&qt.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,s;n{"use strict";var Dr=Qi&&Qi.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,s;n{"use strict";bt.__esModule=!0;bt.throwInvalidExpression=bt.isOperator=bt.isIdentifier=bt.notUtil=bt.xorUtil=bt.orUtil=bt.andUtil=void 0;var p_=Or(),kA=function(r,e){return r&&e};bt.andUtil=kA;var SA=function(r,e){return r||e};bt.orUtil=SA;var OA=function(r,e){return r!==e};bt.xorUtil=OA;var DA=function(r){return!r};bt.notUtil=DA;var xA=function(r){var e=r.name,t=r.value;return e===p_.Tokens.IDENTIFIER&&typeof t=="string"};bt.isIdentifier=xA;var RA=function(r){var e=r.name,t=r.value;return e===p_.Tokens.OPERATOR&&typeof t=="string"};bt.isOperator=RA;var MA=function(r){throw new TypeError("Invalid postfix expression: ".concat(r))};bt.throwInvalidExpression=MA});var h_=_(wu=>{"use strict";var Sa;wu.__esModule=!0;wu.OPERATOR_MAP=void 0;var xp=Or(),Rp=Dp();wu.OPERATOR_MAP=(Sa={},Sa[xp.Operators.AND]=Rp.andUtil,Sa[xp.Operators.OR]=Rp.orUtil,Sa[xp.Operators.XOR]=Rp.xorUtil,Sa)});var g_=_(Zr=>{"use strict";var Xi=Zr&&Zr.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,s;n{"use strict";var Mp=xr&&xr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,i)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]});xr.__esModule=!0;xr.parse=xr.evaluate=xr.getEvaluator=void 0;var y_=g_();Mp(xr,y_,"getEvaluator");Mp(xr,y_,"evaluate");var IA=Op();Mp(xr,IA,"parse")});var rP={};pv(rP,{default:()=>ju});module.exports=hv(rP);var sv=require("obsidian");var Ci=require("obsidian");var iP=new Error("timeout while waiting for mutex to become available"),sP=new Error("mutex already locked"),mv=new Error("request for lock canceled"),gv=function(r,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function o(c){try{l(n.next(c))}catch(f){a(f)}}function u(c){try{l(n.throw(c))}catch(f){a(f)}}function l(c){c.done?s(c.value):i(c.value).then(o,u)}l((n=n.apply(r,e||[])).next())})},zu=class{constructor(e,t=mv){this._value=e,this._cancelError=t,this._weightedQueues=[],this._weightedWaiters=[]}acquire(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise((t,n)=>{this._weightedQueues[e-1]||(this._weightedQueues[e-1]=[]),this._weightedQueues[e-1].push({resolve:t,reject:n}),this._dispatch()})}runExclusive(e,t=1){return gv(this,void 0,void 0,function*(){let[n,i]=yield this.acquire(t);try{return yield e(n)}finally{i()}})}waitForUnlock(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise(t=>{this._weightedWaiters[e-1]||(this._weightedWaiters[e-1]=[]),this._weightedWaiters[e-1].push(t),this._dispatch()})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(e){this._value=e,this._dispatch()}release(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);this._value+=e,this._dispatch()}cancel(){this._weightedQueues.forEach(e=>e.forEach(t=>t.reject(this._cancelError))),this._weightedQueues=[]}_dispatch(){var e;for(let t=this._value;t>0;t--){let n=(e=this._weightedQueues[t-1])===null||e===void 0?void 0:e.shift();if(!n)continue;let i=this._value,s=t;this._value-=t,t=this._value+1,n.resolve([i,this._newReleaser(s)])}this._drainUnlockWaiters()}_newReleaser(e){let t=!1;return()=>{t||(t=!0,this.release(e))}}_drainUnlockWaiters(){for(let e=this._value;e>0;e--)!this._weightedWaiters[e-1]||(this._weightedWaiters[e-1].forEach(t=>t()),this._weightedWaiters[e-1]=[])}},yv=function(r,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function o(c){try{l(n.next(c))}catch(f){a(f)}}function u(c){try{l(n.throw(c))}catch(f){a(f)}}function l(c){c.done?s(c.value):i(c.value).then(o,u)}l((n=n.apply(r,e||[])).next())})},Wa=class{constructor(e){this._semaphore=new zu(1,e)}acquire(){return yv(this,void 0,void 0,function*(){let[,e]=yield this._semaphore.acquire();return e})}runExclusive(e){return this._semaphore.runExclusive(()=>e())}isLocked(){return this._semaphore.isLocked()}waitForUnlock(){return this._semaphore.waitForUnlock()}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}};var Ao=as(Be());var Et=class{constructor(e,t){this.start=e,this.end=t,t.isBefore(e)&&(this.start=t,this.end=e),this.start=this.start.startOf("day"),this.end=this.end.startOf("day")}static buildRelative(e){let t=e==="week"?"isoWeek":e;return new Et(window.moment().startOf(t).startOf("day"),window.moment().endOf(t).startOf("day"))}static buildInvalid(){return new Et(window.moment.invalid(),window.moment.invalid())}isValid(){return this.start.isValid()&&this.end.isValid()}moveToPrevious(e){let t=window.moment.duration(1,e);this.start.subtract(t),this.end.subtract(t),(e==="month"||e==="quarter")&&(this.end=this.end.endOf(e).startOf("day"))}moveToNext(e){let t=window.moment.duration(1,e);this.start.add(t),this.end.add(t),(e==="month"||e==="quarter")&&(this.end=this.end.endOf(e).startOf("day"))}};var Nt=class{static parseDate(e,t=!1){return window.moment(Ao.parseDate(e,void 0,{forwardDate:t})).startOf("day")}static parseDateRange(e,t=!1){let n=[Nt.parseRelativeDateRange,Nt.parseNumberedDateRange,Nt.parseAbsoluteDateRange];for(let i of n){let s=i(e,t);if(s.isValid())return s}return Et.buildInvalid()}static parseAbsoluteDateRange(e,t){let n=Ao.parse(e,void 0,{forwardDate:t});if(n.length===0)return Et.buildInvalid();let i=n[0].start,s=n[1]&&n[1].start?n[1].start:i,a=window.moment(i.date()),o=window.moment(s.date());return new Et(a,o)}static parseRelativeDateRange(e,t){let n=/(last|this|next) (week|month|quarter|year)/,i=e.match(n);if(i&&i.length===3){let s=i[1],a=i[2],o=Et.buildRelative(a);switch(s){case"last":o.moveToPrevious(a);break;case"next":o.moveToNext(a);break}return o}return Et.buildInvalid()}static parseNumberedDateRange(e,t){let n=[[/^\s*[0-9]{4}\s*$/,"YYYY","year"],[/^\s*[0-9]{4}-Q[1-4]\s*$/,"YYYY-Q","quarter"],[/^\s*[0-9]{4}-[0-9]{2}\s*$/,"YYYY-MM","month"],[/^\s*[0-9]{4}-W[0-9]{2}\s*$/,"YYYY-WW","isoWeek"]];for(let[i,s,a]of n){let o=e.match(i);if(o){let u=o[0].trim();return new Et(window.moment(u,s).startOf(a),window.moment(u,s).endOf(a))}}return Et.buildInvalid()}};var IM={td:"today",tm:"tomorrow",yd:"yesterday",tw:"this week",nw:"next week",weekend:"sat",we:"sat"};function ki(r){for(let[e,t]of Object.entries(IM))r=r.replace(RegExp(`\\b${e}\\s`,"i"),t);return r}var Po=["MO","TU","WE","TH","FR","SA","SU"],Ge=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(Po.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=Po[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 xe=function(r){return r!=null},It=function(r){return typeof r=="number"},Uf=function(r){return typeof r=="string"&&Po.includes(r)},ut=Array.isArray,Xt=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+=ce(t,e/t.length)),t.slice(0,e)+String(n))}var NT=function(r,e,t){var n=r.split(e);return t?n.slice(0,t).concat([n.slice(t).join(e)]):n},dt=function(r,e){var t=r%e;return t*e<0?t+e:t},No=function(r,e){return{div:Math.floor(r/e),mod:dt(r,e)}},Ft=function(r){return!xe(r)||r.length===0},We=function(r){return!Ft(r)},fe=function(r,e){return We(r)&&r.indexOf(e)!==-1};var vr=function(r,e,t,n,i,s){return n===void 0&&(n=0),i===void 0&&(i=0),s===void 0&&(s=0),new Date(Date.UTC(r,e-1,t,n,i,s))},FM=[31,28,31,30,31,30,31,31,30,31,30,31],LT=1e3*60*60*24,Io=9999,UT=vr(1970,1,1),LM=[6,0,1,2,3,4,5];var Si=function(r){return r%4===0&&r%100!==0||r%400===0},Wf=function(r){return r instanceof Date},Ln=function(r){return Wf(r)&&!isNaN(r.getTime())},IT=function(r){return r.getTimezoneOffset()*60*1e3},UM=function(r,e){var t=r.getTime()-IT(r),n=e.getTime()-IT(e),i=t-n;return Math.round(i/LT)},oa=function(r){return UM(r,UT)},Fo=function(r){return new Date(UT.getTime()+r*LT)},WM=function(r){var e=r.getUTCMonth();return e===1&&Si(r.getUTCFullYear())?29:FM[e]},qr=function(r){return LM[r.getUTCDay()]},qf=function(r,e){var t=vr(r,e+1,1);return[qr(t),WM(t)]},Lo=function(r,e){return e=e||r,new Date(Date.UTC(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()))},Uo=function(r){var e=new Date(r.getTime());return e},$f=function(r){for(var e=[],t=0;tthis.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}(),Yr=qM;var Yf=function(r,e){return Yf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},Yf(r,e)};function Di(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Yf(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var lt=function(){return lt=Object.assign||function(e){for(var t,n=1,i=arguments.length;ne[0].length)&&(e=s,t=i)}if(e!=null&&(this.text=this.text.substr(e[0].length),this.text===""&&(this.done=!0)),e==null){this.done=!0,this.symbol=null,this.value=null;return}}while(t==="SKIP");return this.symbol=t,this.value=e,!0},r.prototype.accept=function(e){if(this.symbol===e){if(this.value){var t=this.value;return this.nextSymbol(),t}return this.nextSymbol(),!0}return!1},r.prototype.acceptNumber=function(){return this.accept("number")},r.prototype.expect=function(e){if(this.accept(e))return!0;throw new Error("expected "+e+" but found "+this.symbol)},r}();function la(r,e){e===void 0&&(e=Un);var t={},n=new HM(e.tokens);if(!n.start(r))return null;return i(),t;function i(){n.expect("every");var h=n.acceptNumber();if(h&&(t.interval=parseInt(h[0],10)),n.isDone())throw new Error("Unexpected end");switch(n.symbol){case"day(s)":t.freq=$.DAILY,n.nextSymbol()&&(a(),f());break;case"weekday(s)":t.freq=$.WEEKLY,t.byweekday=[$.MO,$.TU,$.WE,$.TH,$.FR],n.nextSymbol(),f();break;case"week(s)":t.freq=$.WEEKLY,n.nextSymbol()&&(s(),f());break;case"hour(s)":t.freq=$.HOURLY,n.nextSymbol()&&(s(),f());break;case"minute(s)":t.freq=$.MINUTELY,n.nextSymbol()&&(s(),f());break;case"month(s)":t.freq=$.MONTHLY,n.nextSymbol()&&(s(),f());break;case"year(s)":t.freq=$.YEARLY,n.nextSymbol()&&(s(),f());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":t.freq=$.WEEKLY;var T=n.symbol.substr(0,2).toUpperCase();if(t.byweekday=[$[T]],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var y=u();if(!y)throw new Error("Unexpected symbol "+n.symbol+", expected weekday");t.byweekday.push($[y]),n.nextSymbol()}c(),f();break;case"january":case"february":case"march":case"april":case"may":case"june":case"july":case"august":case"september":case"october":case"november":case"december":if(t.freq=$.YEARLY,t.bymonth=[o()],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var w=o();if(!w)throw new Error("Unexpected symbol "+n.symbol+", expected month");t.bymonth.push(w),n.nextSymbol()}s(),f();break;default:throw new Error("Unknown symbol")}}function s(){var h=n.accept("on"),T=n.accept("the");if(!!(h||T))do{var y=l(),w=u(),D=o();if(y)w?(n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push($[w].nth(y))):(t.bymonthday||(t.bymonthday=[]),t.bymonthday.push(y),n.accept("day(s)"));else if(w)n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push($[w]);else if(n.symbol==="weekday(s)")n.nextSymbol(),t.byweekday||(t.byweekday=[$.MO,$.TU,$.WE,$.TH,$.FR]);else if(n.symbol==="week(s)"){n.nextSymbol();var C=n.acceptNumber();if(!C)throw new Error("Unexpected symbol "+n.symbol+", expected week number");for(t.byweekno=[parseInt(C[0],10)];n.accept("comma");){if(C=n.acceptNumber(),!C)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.byweekno.push(parseInt(C[0],10))}}else if(D)n.nextSymbol(),t.bymonth||(t.bymonth=[]),t.bymonth.push(D);else return}while(n.accept("comma")||n.accept("the")||n.accept("on"))}function a(){var h=n.accept("at");if(!!h)do{var T=n.acceptNumber();if(!T)throw new Error("Unexpected symbol "+n.symbol+", expected hour");for(t.byhour=[parseInt(T[0],10)];n.accept("comma");){if(T=n.acceptNumber(),!T)throw new Error("Unexpected symbol "+n.symbol+"; expected hour");t.byhour.push(parseInt(T[0],10))}}while(n.accept("comma")||n.accept("at"))}function o(){switch(n.symbol){case"january":return 1;case"february":return 2;case"march":return 3;case"april":return 4;case"may":return 5;case"june":return 6;case"july":return 7;case"august":return 8;case"september":return 9;case"october":return 10;case"november":return 11;case"december":return 12;default:return!1}}function u(){switch(n.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return n.symbol.substr(0,2).toUpperCase();default:return!1}}function l(){switch(n.symbol){case"last":return n.nextSymbol(),-1;case"first":return n.nextSymbol(),1;case"second":return n.nextSymbol(),n.accept("last")?-2:2;case"third":return n.nextSymbol(),n.accept("last")?-3:3;case"nth":var h=parseInt(n.value[1],10);if(h<-366||h>366)throw new Error("Nth out of range: "+h);return n.nextSymbol(),n.accept("last")?-h:h;default:return!1}}function c(){n.accept("on"),n.accept("the");var h=l();if(!!h)for(t.bymonthday=[h],n.nextSymbol();n.accept("comma");){if(h=l(),!h)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.bymonthday.push(h),n.nextSymbol()}}function f(){if(n.symbol==="until"){var h=Date.parse(n.text);if(!h)throw new Error("Cannot parse until date:"+n.text);t.until=new Date(h)}else n.accept("for")&&(t.count=parseInt(n.value[0],10),n.expect("number"))}}var ae;(function(r){r[r.YEARLY=0]="YEARLY",r[r.MONTHLY=1]="MONTHLY",r[r.WEEKLY=2]="WEEKLY",r[r.DAILY=3]="DAILY",r[r.HOURLY=4]="HOURLY",r[r.MINUTELY=5]="MINUTELY",r[r.SECONDLY=6]="SECONDLY"})(ae||(ae={}));function ca(r){return r12){var n=Math.floor(this.month/12),i=dt(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=No(this.hour,24),a=s.div,o=s.mod;if(a&&(this.hour=o,this.addDaily(a)),Ft(i)||fe(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=No(this.minute,60),o=a.div,u=a.mod;if(o&&(this.minute=u,this.addHours(o,!1,i)),(Ft(i)||fe(i,this.hour))&&(Ft(s)||fe(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=No(this.second,60),u=o.div,l=o.mod;if(u&&(this.second=l,this.addMinutes(u,!1,i,s)),(Ft(i)||fe(i,this.hour))&&(Ft(s)||fe(s,this.minute))&&(Ft(a)||fe(a,this.second)))break}},e.prototype.fixDay=function(){if(!(this.day<=28)){var t=qf(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>Io))return;t=qf(this.year,this.month-1)[1]}}},e.prototype.add=function(t,n){var i=t.freq,s=t.interval,a=t.wkst,o=t.byhour,u=t.byminute,l=t.bysecond;switch(i){case ae.YEARLY:return this.addYears(s);case ae.MONTHLY:return this.addMonths(s);case ae.WEEKLY:return this.addWeekly(s,a);case ae.DAILY:return this.addDaily(s);case ae.HOURLY:return this.addHours(s,n,o);case ae.MINUTELY:return this.addMinutes(s,n,o,u);case ae.SECONDLY:return this.addSeconds(s,n,o,u,l)}},e}(Ri);function Gf(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)||We(e.byweekno)||We(e.byyearday)||Boolean(e.bymonthday)||We(e.bymonthday)||xe(e.byweekday)||xe(e.byeaster)))switch(e.freq){case $.YEARLY:e.bymonth||(e.bymonth=e.dtstart.getUTCMonth()+1),e.bymonthday=e.dtstart.getUTCDate();break;case $.MONTHLY:e.bymonthday=e.dtstart.getUTCDate();break;case $.WEEKLY:e.byweekday=[qr(e.dtstart)];break}if(xe(e.bymonth)&&!ut(e.bymonth)&&(e.bymonth=[e.bymonth]),xe(e.byyearday)&&!ut(e.byyearday)&&It(e.byyearday)&&(e.byyearday=[e.byyearday]),!xe(e.bymonthday))e.bymonthday=[],e.bynmonthday=[];else if(ut(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(xe(e.byweekno)&&!ut(e.byweekno)&&(e.byweekno=[e.byweekno]),!xe(e.byweekday))e.bynweekday=null;else if(It(e.byweekday))e.byweekday=[e.byweekday],e.bynweekday=null;else if(Uf(e.byweekday))e.byweekday=[Ge.fromStr(e.byweekday).weekday],e.bynweekday=null;else if(e.byweekday instanceof Ge)!e.byweekday.n||e.freq>$.MONTHLY?(e.byweekday=[e.byweekday.weekday],e.bynweekday=null):(e.bynweekday=[[e.byweekday.weekday,e.byweekday.n]],e.byweekday=null);else{for(var a=[],o=[],t=0;t$.MONTHLY?a.push(u.weekday):o.push([u.weekday,u.n])}e.byweekday=We(a)?a:null,e.bynweekday=We(o)?o:null}return xe(e.byhour)?It(e.byhour)&&(e.byhour=[e.byhour]):e.byhour=e.freq<$.HOURLY?[e.dtstart.getUTCHours()]:null,xe(e.byminute)?It(e.byminute)&&(e.byminute=[e.byminute]):e.byminute=e.freq<$.MINUTELY?[e.dtstart.getUTCMinutes()]:null,xe(e.bysecond)?It(e.bysecond)&&(e.bysecond=[e.bysecond]):e.bysecond=e.freq<$.SECONDLY?[e.dtstart.getUTCSeconds()]:null,{parsedOptions:e}}function HT(r){var e=r.dtstart.getTime()%1e3;if(!ca(r.freq))return[];var t=[];return r.byhour.forEach(function(n){r.byminute.forEach(function(i){r.bysecond.forEach(function(s){t.push(new Ri(n,i,s,e))})})}),t}function pa(r){var e=r.split(` -`).map(zM).filter(function(t){return t!==null});return lt(lt({},e[0]),e[1])}function fa(r){var e={},t=/DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec(r);if(!t)return e;var n=t[1],i=t[2];return n&&(e.tzid=n),e.dtstart=ua(i),e}function zM(r){if(r=r.replace(/^\s+|\s+$/,""),!r.length)return null;var e=/^([A-Z]+?)[:;]/.exec(r.toUpperCase());if(!e)return VT(r);var t=e[1];switch(t.toUpperCase()){case"RRULE":case"EXRULE":return VT(r);case"DTSTART":return fa(r);default:throw new Error("Unsupported RFC prop ".concat(t," in ").concat(r))}}function VT(r){var e=r.replace(/^RRULE:/i,""),t=fa(e),n=r.replace(/^(?:RRULE|EXRULE):/i,"").split(";");return n.forEach(function(i){var s=i.split("="),a=s[0],o=s[1];switch(a.toUpperCase()){case"FREQ":t.freq=ae[o.toUpperCase()];break;case"WKST":t.wkst=Zt[o.toUpperCase()];break;case"COUNT":case"INTERVAL":case"BYSETPOS":case"BYMONTH":case"BYMONTHDAY":case"BYYEARDAY":case"BYWEEKNO":case"BYHOUR":case"BYMINUTE":case"BYSECOND":var u=VM(o),l=a.toLowerCase();t[l]=u;break;case"BYWEEKDAY":case"BYDAY":t.byweekday=KM(o);break;case"DTSTART":case"TZID":var c=fa(r);t.tzid=c.tzid,t.dtstart=c.dtstart;break;case"UNTIL":t.until=ua(o);break;case"BYEASTER":t.byeaster=Number(o);break;default:throw new Error("Unknown RRULE property '"+a+"'")}}),t}function VM(r){if(r.indexOf(",")!==-1){var e=r.split(",");return e.map(KT)}return KT(r)}function KT(r){return/^[+-]?\d+$/.test(r)?Number(r):r}function KM(r){var e=r.split(",");return e.map(function(t){if(t.length===2)return Zt[t];var n=t.match(/^([+-]?\d{1,2})([A-Z]{2})$/);if(!n||n.length<3)throw new SyntaxError("Invalid weekday string: ".concat(t));var i=Number(n[1]),s=n[2],a=Zt[s].weekday;return new Ge(a,i)})}var Wn=function(){function r(e,t){if(isNaN(e.getTime()))throw new RangeError("Invalid date passed to DateWithZone");this.date=e,this.tzid=t}return Object.defineProperty(r.prototype,"isUTC",{get:function(){return!this.tzid||this.tzid.toUpperCase()==="UTC"},enumerable:!1,configurable:!0}),r.prototype.toString=function(){var e=Oi(this.date.getTime(),this.isUTC);return this.isUTC?":".concat(e):";TZID=".concat(this.tzid,":").concat(e)},r.prototype.getTime=function(){return this.date.getTime()},r.prototype.rezonedDate=function(){return this.isUTC?this.date:WT(this.date,this.tzid)},r}();function ha(r){for(var e=[],t="",n=Object.keys(r),i=Object.keys(da),s=0;s=4?(c=0,l=o.yearlen+dt(a-e.wkst,7)):l=n-c;for(var f=Math.floor(l/7),h=dt(l,7),T=Math.floor(f+h/4),y=0;y0&&w<=T){var D=void 0;w>1?(D=c+(w-1)*7,c!==u&&(D-=7-u)):D=c;for(var C=0;C<7&&(o.wnomask[D]=1,D++,o.wdaymask[D]!==e.wkst);C++);}}if(fe(e.byweekno,1)){var D=c+T*7;if(c!==u&&(D-=7-u),D=4?(oe=0,ie=z+dt(L-e.wkst,7)):ie=n-c,N=Math.floor(52+dt(ie,7)/4)}if(fe(e.byweekno,N))for(var D=0;Ds)return jr(r);if(N>=t){var L=cb(N,e);if(!r.accept(L)||o&&(--o,!o))return jr(r)}}else for(var C=T;Cs)return jr(r);if(N>=t){var L=cb(N,e);if(!r.accept(L)||o&&(--o,!o))return jr(r)}}}if(e.interval===0||(u.add(e,w),u.year>Io))return jr(r);ca(n)||(c=l.gettimeset(n)(u.hour,u.minute,u.second,0)),l.rebuild(u.year,u.month)}}function iC(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 We(n)&&!fe(n,r.mmask[e])||We(i)&&!r.wnomask[e]||We(s)&&!fe(s,r.wdaymask[e])||We(r.nwdaymask)&&!r.nwdaymask[e]||a!==null&&!fe(r.eastermask,e)||(We(o)||We(u))&&!fe(o,r.mdaymask[e])&&!fe(u,r.nmdaymask[e])||We(l)&&(e=r.yearlen&&!fe(l,e+1-r.yearlen)&&!fe(l,-r.nextyearlen+e-r.yearlen))}function cb(r,e){return new Wn(r,e.tzid).rezonedDate()}function jr(r){return r.getValue()}function sC(r,e,t,n,i){for(var s=!1,a=e;a=$.HOURLY&&We(i)&&!fe(i,e.hour)||n>=$.MINUTELY&&We(s)&&!fe(s,e.minute)||n>=$.SECONDLY&&We(a)&&!fe(a,e.second)?[]:r.gettimeset(n)(e.hour,e.minute,e.second,e.millisecond)}var Zt={MO:new Ge(0),TU:new Ge(1),WE:new Ge(2),TH:new Ge(3),FR:new Ge(4),SA:new Ge(5),SU:new Ge(6)},da={freq:ae.YEARLY,dtstart:null,interval:1,wkst:Zt.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},zT=Object.keys(da),$=function(){function r(e,t){e===void 0&&(e={}),t===void 0&&(t=!1),this._cache=t?null:new QT,this.origOptions=Gf(e);var n=BT(e).parsedOptions;this.options=n}return r.parseText=function(e,t){return la(e,t)},r.fromText=function(e,t){return $T(e,t)},r.fromString=function(e){return new r(r.parseString(e)||void 0)},r.prototype._iter=function(e){return Wo(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 jf("all",{},e));var t=this._cacheGet("all");return t===!1&&(t=this._iter(new Yr("all",{})),this._cacheAdd("all",t)),t},r.prototype.between=function(e,t,n,i){if(n===void 0&&(n=!1),!Ln(e)||!Ln(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 jf("between",s,i));var a=this._cacheGet("between",s);return a===!1&&(a=this._iter(new Yr("between",s)),this._cacheAdd("between",a,s)),a},r.prototype.before=function(e,t){if(t===void 0&&(t=!1),!Ln(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 Yr("before",n)),this._cacheAdd("before",i,n)),i},r.prototype.after=function(e,t){if(t===void 0&&(t=!1),!Ln(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 Yr("after",n)),this._cacheAdd("after",i,n)),i},r.prototype.count=function(){return this.all().length},r.prototype.toString=function(){return ha(this.origOptions)},r.prototype.toText=function(e,t,n){return YT(this,e,t,n)},r.prototype.isFullyConvertibleToText=function(){return jT(this)},r.prototype.clone=function(){return new r(this.origOptions)},r.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],r.YEARLY=ae.YEARLY,r.MONTHLY=ae.MONTHLY,r.WEEKLY=ae.WEEKLY,r.DAILY=ae.DAILY,r.HOURLY=ae.HOURLY,r.MINUTELY=ae.MINUTELY,r.SECONDLY=ae.SECONDLY,r.MO=Zt.MO,r.TU=Zt.TU,r.WE=Zt.WE,r.TH=Zt.TH,r.FR=Zt.FR,r.SA=Zt.SA,r.SU=Zt.SU,r.parseString=pa,r.optionsToString=ha,r}();function db(r,e,t,n,i,s){var a={},o=r.accept;function u(h,T){t.forEach(function(y){y.between(h,T,!0).forEach(function(w){a[Number(w)]=!0})})}i.forEach(function(h){var T=new Wn(h,s).rezonedDate();a[Number(T)]=!0}),r.accept=function(h){var T=Number(h);return isNaN(T)?o.call(this,h):!a[T]&&(u(new Date(T-1),new Date(T+1)),!a[T])?(a[T]=!0,o.call(this,h)):!0},r.method==="between"&&(u(r.args.after,r.args.before),r.accept=function(h){var T=Number(h);return a[T]?!0:(a[T]=!0,o.call(this,h))});for(var l=0;l1||i.length||s.length||a.length){var c=new zf(l);return c.dtstart(o),c.tzid(u||void 0),n.forEach(function(h){c.rrule(new $(Hf(h,o,u),l))}),i.forEach(function(h){c.rdate(h)}),s.forEach(function(h){c.exrule(new $(Hf(h,o,u),l))}),a.forEach(function(h){c.exdate(h)}),e.compatible&&e.dtstart&&c.rdate(o),c}var f=n[0]||{};return new $(Hf(f,f.dtstart||e.dtstart||o,f.tzid||e.tzid||u),l)}function qo(r,e){return e===void 0&&(e={}),uC(r,lC(e))}function Hf(r,e,t){return lt(lt({},r),{dtstart:e,tzid:t})}function lC(r){var e=[],t=Object.keys(r),n=Object.keys(fb);if(t.forEach(function(i){fe(n,i)||e.push(i)}),e.length)throw new Error("Invalid options: "+e.join(", "));return lt(lt({},fb),r)}function cC(r){if(r.indexOf(":")===-1)return{name:"RRULE",value:r};var e=NT(r,":",1),t=e[0],n=e[1];return{name:t,value:n}}function dC(r){var e=cC(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 fC(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 pC(r){r.forEach(function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)})}function pb(r,e){return pC(e),r.split(",").map(function(t){return ua(t)})}function hb(r){var e=this;return function(t){if(t!==void 0&&(e["_".concat(r)]=t),e["_".concat(r)]!==void 0)return e["_".concat(r)];for(var n=0;ne in r?_i(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,ke=(r,e)=>{for(var t in e||(e={}))Cm.call(e,t)&&Mm(r,t,e[t]);if(Rm)for(var t of Rm(e))$v.call(e,t)&&Mm(r,t,e[t]);return r},ot=(r,e)=>qv(r,Yv(e));var b=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),Bv=(r,e)=>{for(var t in e)_i(r,t,{get:e[t],enumerable:!0})},Am=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Gv(e))!Cm.call(r,s)&&s!==t&&_i(r,s,{get:()=>e[s],enumerable:!(n=Wv(e,s))||n.enumerable});return r};var vi=(r,e,t)=>(t=r!=null?Uv(jv(r)):{},Am(e||!r||!r.__esModule?_i(t,"default",{value:r,enumerable:!0}):t,r)),Hv=r=>Am(_i({},"__esModule",{value:!0}),r);var L=(r,e,t)=>new Promise((n,s)=>{var i=u=>{try{o(t.next(u))}catch(l){s(l)}},a=u=>{try{o(t.throw(u))}catch(l){s(l)}},o=u=>u.done?n(u.value):Promise.resolve(u.value).then(i,a);o((t=t.apply(r,e)).next())});var Se=b(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.matchAnyPattern=fn.extractTerms=fn.repeatedTimeunitPattern=void 0;function Qv(r,e){let t=e.replace(/\((?!\?)/g,"(?:");return`${r}${t}\\s{0,5}(?:,?\\s{0,5}${t}){0,10}`}fn.repeatedTimeunitPattern=Qv;function Pm(r){let e;return r instanceof Array?e=[...r]:r instanceof Map?e=Array.from(r.keys()):e=Object.keys(r),e}fn.extractTerms=Pm;function Xv(r){return`(?:${Pm(r).sort((t,n)=>n.length-t.length).join("|").replace(/\./g,"\\.")})`}fn.matchAnyPattern=Xv});var Te=b((pl,ml)=>{(function(r,e){typeof pl=="object"&&typeof ml!="undefined"?ml.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs=e()})(pl,function(){"use strict";var r=1e3,e=6e4,t=36e5,n="millisecond",s="second",i="minute",a="hour",o="day",u="week",l="month",c="quarter",f="year",m="date",y="Invalid Date",k=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,E=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,x={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},v=function($,N,w){var H=String($);return!H||H.length>=N?$:""+Array(N+1-H.length).join(w)+$},I={s:v,z:function($){var N=-$.utcOffset(),w=Math.abs(N),H=Math.floor(w/60),C=w%60;return(N<=0?"+":"-")+v(H,2,"0")+":"+v(C,2,"0")},m:function $(N,w){if(N.date(){"use strict";var Zv=pn&&pn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(pn,"__esModule",{value:!0});pn.findYearClosestToRef=pn.findMostLikelyADYear=void 0;var Jv=Zv(Te());function ew(r){return r<100&&(r>50?r=r+1900:r=r+2e3),r}pn.findMostLikelyADYear=ew;function tw(r,e,t){let n=Jv.default(r),s=n;s=s.month(t-1),s=s.date(e),s=s.year(n.year());let i=s.add(1,"y"),a=s.add(-1,"y");return Math.abs(i.diff(n)){"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.parseTimeUnits=ne.TIME_UNITS_PATTERN=ne.parseYear=ne.YEAR_PATTERN=ne.parseOrdinalNumberPattern=ne.ORDINAL_NUMBER_PATTERN=ne.parseNumberPattern=ne.NUMBER_PATTERN=ne.TIME_UNIT_DICTIONARY=ne.ORDINAL_WORD_DICTIONARY=ne.INTEGER_WORD_DICTIONARY=ne.MONTH_DICTIONARY=ne.FULL_MONTH_NAME_DICTIONARY=ne.WEEKDAY_DICTIONARY=void 0;var ao=Se(),rw=ut();ne.WEEKDAY_DICTIONARY={sunday:0,sun:0,"sun.":0,monday:1,mon:1,"mon.":1,tuesday:2,tue:2,"tue.":2,wednesday:3,wed:3,"wed.":3,thursday:4,thurs:4,"thurs.":4,thur:4,"thur.":4,thu:4,"thu.":4,friday:5,fri:5,"fri.":5,saturday:6,sat:6,"sat.":6};ne.FULL_MONTH_NAME_DICTIONARY={january:1,february:2,march:3,april:4,may:5,june:6,july:7,august:8,september:9,october:10,november:11,december:12};ne.MONTH_DICTIONARY=Object.assign(Object.assign({},ne.FULL_MONTH_NAME_DICTIONARY),{jan:1,"jan.":1,feb:2,"feb.":2,mar:3,"mar.":3,apr:4,"apr.":4,jun:6,"jun.":6,jul:7,"jul.":7,aug:8,"aug.":8,sep:9,"sep.":9,sept:9,"sept.":9,oct:10,"oct.":10,nov:11,"nov.":11,dec:12,"dec.":12});ne.INTEGER_WORD_DICTIONARY={one:1,two:2,three:3,four:4,five:5,six:6,seven:7,eight:8,nine:9,ten:10,eleven:11,twelve:12};ne.ORDINAL_WORD_DICTIONARY={first:1,second:2,third:3,fourth:4,fifth:5,sixth:6,seventh:7,eighth:8,ninth:9,tenth:10,eleventh:11,twelfth:12,thirteenth:13,fourteenth:14,fifteenth:15,sixteenth:16,seventeenth:17,eighteenth:18,nineteenth:19,twentieth:20,"twenty first":21,"twenty-first":21,"twenty second":22,"twenty-second":22,"twenty third":23,"twenty-third":23,"twenty fourth":24,"twenty-fourth":24,"twenty fifth":25,"twenty-fifth":25,"twenty sixth":26,"twenty-sixth":26,"twenty seventh":27,"twenty-seventh":27,"twenty eighth":28,"twenty-eighth":28,"twenty ninth":29,"twenty-ninth":29,thirtieth:30,"thirty first":31,"thirty-first":31};ne.TIME_UNIT_DICTIONARY={sec:"second",second:"second",seconds:"second",min:"minute",mins:"minute",minute:"minute",minutes:"minute",h:"hour",hr:"hour",hrs:"hour",hour:"hour",hours:"hour",day:"d",days:"d",week:"week",weeks:"week",month:"month",months:"month",qtr:"quarter",quarter:"quarter",quarters:"quarter",y:"year",yr:"year",year:"year",years:"year"};ne.NUMBER_PATTERN=`(?:${ao.matchAnyPattern(ne.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s{0,2}an?)?|an?\\b(?:\\s{0,2}few)?|few|several|a?\\s{0,2}couple\\s{0,2}(?:of)?)`;function Im(r){let e=r.toLowerCase();return ne.INTEGER_WORD_DICTIONARY[e]!==void 0?ne.INTEGER_WORD_DICTIONARY[e]:e==="a"||e==="an"?1:e.match(/few/)?3:e.match(/half/)?.5:e.match(/couple/)?2:e.match(/several/)?7:parseFloat(e)}ne.parseNumberPattern=Im;ne.ORDINAL_NUMBER_PATTERN=`(?:${ao.matchAnyPattern(ne.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:st|nd|rd|th)?)`;function nw(r){let e=r.toLowerCase();return ne.ORDINAL_WORD_DICTIONARY[e]!==void 0?ne.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}ne.parseOrdinalNumberPattern=nw;ne.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s{0,2}(?:BE|AD|BC|BCE|CE)|[1-2][0-9]{3}|[5-9][0-9])";function sw(r){if(/BE/i.test(r))return r=r.replace(/BE/i,""),parseInt(r)-543;if(/BCE?/i.test(r))return r=r.replace(/BCE?/i,""),-parseInt(r);if(/(AD|CE)/i.test(r))return r=r.replace(/(AD|CE)/i,""),parseInt(r);let e=parseInt(r);return rw.findMostLikelyADYear(e)}ne.parseYear=sw;var Fm=`(${ne.NUMBER_PATTERN})\\s{0,3}(${ao.matchAnyPattern(ne.TIME_UNIT_DICTIONARY)})`,Nm=new RegExp(Fm,"i");ne.TIME_UNITS_PATTERN=ao.repeatedTimeunitPattern("(?:(?:about|around)\\s{0,3})?",Fm);function iw(r){let e={},t=r,n=Nm.exec(t);for(;n;)aw(e,n),t=t.substring(n[0].length).trim(),n=Nm.exec(t);return e}ne.parseTimeUnits=iw;function aw(r,e){let t=Im(e[1]),n=ne.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Lm=b((hl,gl)=>{(function(r,e){typeof hl=="object"&&typeof gl!="undefined"?gl.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs_plugin_quarterOfYear=e()})(hl,function(){"use strict";var r="month",e="quarter";return function(t,n){var s=n.prototype;s.quarter=function(o){return this.$utils().u(o)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(o-1))};var i=s.add;s.add=function(o,u){return o=Number(o),this.$utils().p(u)===e?this.add(3*o,r):i.bind(this)(o,u)};var a=s.startOf;s.startOf=function(o,u){var l=this.$utils(),c=!!l.u(u)||u;if(l.p(o)===e){var f=this.quarter()-1;return c?this.month(3*f).startOf(r).startOf("day"):this.month(3*f+2).endOf(r).endOf("day")}return a.bind(this)(o,u)}}})});var Kt=b(wr=>{"use strict";Object.defineProperty(wr,"__esModule",{value:!0});wr.implySimilarTime=wr.assignSimilarTime=wr.assignSimilarDate=wr.assignTheNextDay=void 0;var Um=ze();function ow(r,e){e=e.add(1,"day"),qm(r,e),Wm(r,e)}wr.assignTheNextDay=ow;function qm(r,e){r.assign("day",e.date()),r.assign("month",e.month()+1),r.assign("year",e.year())}wr.assignSimilarDate=qm;function uw(r,e){r.assign("hour",e.hour()),r.assign("minute",e.minute()),r.assign("second",e.second()),r.assign("millisecond",e.millisecond()),r.get("hour")<12?r.assign("meridiem",Um.Meridiem.AM):r.assign("meridiem",Um.Meridiem.PM)}wr.assignSimilarTime=uw;function Wm(r,e){r.imply("hour",e.hour()),r.imply("minute",e.minute()),r.imply("second",e.second()),r.imply("millisecond",e.millisecond())}wr.implySimilarTime=Wm});var Ym=b(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});Un.toTimezoneOffset=Un.TIMEZONE_ABBR_MAP=void 0;Un.TIMEZONE_ABBR_MAP={ACDT:630,ACST:570,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,ALMT:360,AMST:-180,AMT:-240,ANAST:720,ANAT:720,AQTT:300,ART:-180,AST:-240,AWDT:540,AWST:480,AZOST:0,AZOT:-60,AZST:300,AZT:240,BNT:480,BOT:-240,BRST:-120,BRT:-180,BST:60,BTT:360,CAST:480,CAT:120,CCT:390,CDT:-300,CEST:120,CET:60,CHADT:825,CHAST:765,CKT:-600,CLST:-180,CLT:-240,COT:-300,CST:-360,CVT:-60,CXT:420,ChST:600,DAVT:420,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEST:180,EET:120,EGST:0,EGT:-60,EST:-300,ET:-300,FJST:780,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GMT:0,GST:240,GYT:-240,HAA:-180,HAC:-300,HADT:-540,HAE:-240,HAP:-420,HAR:-360,HAST:-600,HAT:-90,HAY:-480,HKT:480,HLV:-210,HNA:-240,HNC:-360,HNE:-300,HNP:-480,HNR:-420,HNT:-150,HNY:-540,HOVT:420,ICT:420,IDT:180,IOT:360,IRDT:270,IRKST:540,IRKT:540,IRST:210,IST:330,JST:540,KGT:360,KRAST:480,KRAT:480,KST:540,KUYT:240,LHDT:660,LHST:630,LINT:840,MAGST:720,MAGT:720,MART:-510,MAWT:300,MDT:-360,MESZ:120,MEZ:60,MHT:720,MMT:390,MSD:240,MSK:180,MST:-420,MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:690,NOVST:420,NOVT:360,NPT:345,NST:-150,NUT:-660,NZDT:780,NZST:720,OMSST:420,OMST:420,PDT:-420,PET:-300,PETST:720,PETT:720,PGT:600,PHOT:780,PHT:480,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PT:-480,PWT:540,PYST:-180,PYT:-240,RET:240,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SRT:-180,SST:-660,TAHT:-600,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TVT:720,ULAT:480,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-210,VLAST:660,VLAT:660,VUT:660,WAST:120,WAT:60,WEST:60,WESZ:60,WET:0,WEZ:0,WFT:720,WGST:-120,WGT:-180,WIB:420,WIT:540,WITA:480,WST:780,WT:0,YAKST:600,YAKT:600,YAPT:600,YEKST:360,YEKT:360};function lw(r){var e;return r==null?null:typeof r=="number"?r:(e=Un.TIMEZONE_ABBR_MAP[r])!==null&&e!==void 0?e:null}Un.toTimezoneOffset=lw});var Le=b(Er=>{"use strict";var Gm=Er&&Er.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Er,"__esModule",{value:!0});Er.ParsingResult=Er.ParsingComponents=Er.ReferenceWithTimezone=void 0;var cw=Gm(Lm()),oo=Gm(Te()),yl=Kt(),dw=Ym();oo.default.extend(cw.default);var Tl=class{constructor(e){var t;e=e!=null?e:new Date,e instanceof Date?this.instant=e:(this.instant=(t=e.instant)!==null&&t!==void 0?t:new Date,this.timezoneOffset=dw.toTimezoneOffset(e.timezone))}};Er.ReferenceWithTimezone=Tl;var qn=class{constructor(e,t){if(this.reference=e,this.knownValues={},this.impliedValues={},t)for(let s in t)this.knownValues[s]=t[s];let n=oo.default(e.instant);this.imply("day",n.date()),this.imply("month",n.month()+1),this.imply("year",n.year()),this.imply("hour",12),this.imply("minute",0),this.imply("second",0),this.imply("millisecond",0)}get(e){return e in this.knownValues?this.knownValues[e]:e in this.impliedValues?this.impliedValues[e]:null}isCertain(e){return e in this.knownValues}getCertainComponents(){return Object.keys(this.knownValues)}imply(e,t){return e in this.knownValues?this:(this.impliedValues[e]=t,this)}assign(e,t){return this.knownValues[e]=t,delete this.impliedValues[e],this}delete(e){delete this.knownValues[e],delete this.impliedValues[e]}clone(){let e=new qn(this.reference);e.knownValues={},e.impliedValues={};for(let t in this.knownValues)e.knownValues[t]=this.knownValues[t];for(let t in this.impliedValues)e.impliedValues[t]=this.impliedValues[t];return e}isOnlyDate(){return!this.isCertain("hour")&&!this.isCertain("minute")&&!this.isCertain("second")}isOnlyTime(){return!this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")}isOnlyWeekdayComponent(){return this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")}isOnlyDayMonthComponent(){return this.isCertain("day")&&this.isCertain("month")&&!this.isCertain("year")}isValidDate(){let e=this.dateWithoutTimezoneAdjustment();return!(e.getFullYear()!==this.get("year")||e.getMonth()!==this.get("month")-1||e.getDate()!==this.get("day")||this.get("hour")!=null&&e.getHours()!=this.get("hour")||this.get("minute")!=null&&e.getMinutes()!=this.get("minute"))}toString(){return`[ParsingComponents {knownValues: ${JSON.stringify(this.knownValues)}, impliedValues: ${JSON.stringify(this.impliedValues)}}, reference: ${JSON.stringify(this.reference)}]`}dayjs(){return oo.default(this.date())}date(){let e=this.dateWithoutTimezoneAdjustment();return new Date(e.getTime()+this.getSystemTimezoneAdjustmentMinute(e)*6e4)}dateWithoutTimezoneAdjustment(){let e=new Date(this.get("year"),this.get("month")-1,this.get("day"),this.get("hour"),this.get("minute"),this.get("second"),this.get("millisecond"));return e.setFullYear(this.get("year")),e}getSystemTimezoneAdjustmentMinute(e){var t,n;(!e||e.getTime()<0)&&(e=new Date);let s=-e.getTimezoneOffset(),i=(n=(t=this.get("timezoneOffset"))!==null&&t!==void 0?t:this.reference.timezoneOffset)!==null&&n!==void 0?n:s;return s-i}static createRelativeFromReference(e,t){let n=oo.default(e.instant);for(let i in t)n=n.add(t[i],i);let s=new qn(e);return t.hour||t.minute||t.second?(yl.assignSimilarTime(s,n),yl.assignSimilarDate(s,n),e.timezoneOffset!==null&&s.assign("timezoneOffset",-e.instant.getTimezoneOffset())):(yl.implySimilarTime(s,n),e.timezoneOffset!==null&&s.imply("timezoneOffset",-e.instant.getTimezoneOffset()),t.d?(s.assign("day",n.date()),s.assign("month",n.month()+1),s.assign("year",n.year())):(t.week&&s.imply("weekday",n.day()),s.imply("day",n.date()),t.month?(s.assign("month",n.month()+1),s.assign("year",n.year())):(s.imply("month",n.month()+1),t.year?s.assign("year",n.year()):s.imply("year",n.year())))),s}};Er.ParsingComponents=qn;var wi=class{constructor(e,t,n,s,i){this.reference=e,this.refDate=e.instant,this.index=t,this.text=n,this.start=s||new qn(e),this.end=i}clone(){let e=new wi(this.reference,this.index,this.text);return e.start=this.start?this.start.clone():null,e.end=this.end?this.end.clone():null,e}date(){return this.start.date()}toString(){return`[ParsingResult {index: ${this.index}, text: '${this.text}', ...}]`}};Er.ParsingResult=wi});var Y=b(uo=>{"use strict";Object.defineProperty(uo,"__esModule",{value:!0});uo.AbstractParserWithWordBoundaryChecking=void 0;var bl=class{constructor(){this.cachedInnerPattern=null,this.cachedPattern=null}patternLeftBoundary(){return"(\\W|^)"}pattern(e){let t=this.innerPattern(e);return t==this.cachedInnerPattern?this.cachedPattern:(this.cachedPattern=new RegExp(`${this.patternLeftBoundary()}${t.source}`,t.flags),this.cachedInnerPattern=t,this.cachedPattern)}extract(e,t){var n;let s=(n=t[1])!==null&&n!==void 0?n:"";t.index=t.index+s.length,t[0]=t[0].substring(s.length);for(let i=2;i{"use strict";Object.defineProperty(wl,"__esModule",{value:!0});var vl=lt(),fw=Le(),pw=Y(),mw=new RegExp(`(?:within|in|for)\\s*(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${vl.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),hw=new RegExp(`(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${vl.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),_l=class extends pw.AbstractParserWithWordBoundaryChecking{innerPattern(e){return e.option.forwardDate?hw:mw}innerExtract(e,t){let n=vl.parseTimeUnits(t[1]);return fw.ParsingComponents.createRelativeFromReference(e.reference,n)}};wl.default=_l});var Km=b(kl=>{"use strict";Object.defineProperty(kl,"__esModule",{value:!0});var gw=ut(),zm=lt(),Vm=lt(),lo=lt(),yw=Se(),Tw=Y(),bw=new RegExp(`(?:on\\s{0,3})?(${lo.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:to|\\-|\\\u2013|until|through|till)?\\s{0,3}(${lo.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s{0,3}(?:of)?\\s{0,3})(${yw.matchAnyPattern(zm.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s{0,3})(${Vm.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),$m=1,Bm=2,_w=3,Hm=4,El=class extends Tw.AbstractParserWithWordBoundaryChecking{innerPattern(){return bw}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=zm.MONTH_DICTIONARY[t[_w].toLowerCase()],i=lo.parseOrdinalNumberPattern(t[$m]);if(i>31)return t.index=t.index+t[$m].length,null;if(n.start.assign("month",s),n.start.assign("day",i),t[Hm]){let a=Vm.parseYear(t[Hm]);n.start.assign("year",a)}else{let a=gw.findYearClosestToRef(e.refDate,i,s);n.start.imply("year",a)}if(t[Bm]){let a=lo.parseOrdinalNumberPattern(t[Bm]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};kl.default=El});var eh=b(Ol=>{"use strict";Object.defineProperty(Ol,"__esModule",{value:!0});var vw=ut(),Zm=lt(),co=lt(),Jm=lt(),ww=Se(),Ew=Y(),kw=new RegExp(`(${ww.matchAnyPattern(Zm.MONTH_DICTIONARY)})(?:-|/|\\s*,?\\s*)(${co.ORDINAL_NUMBER_PATTERN})(?!\\s*(?:am|pm))\\s*(?:(?:to|\\-)\\s*(${co.ORDINAL_NUMBER_PATTERN})\\s*)?(?:(?:-|/|\\s*,?\\s*)(${Jm.YEAR_PATTERN}))?(?=\\W|$)(?!\\:\\d)`,"i"),Sw=1,Ow=2,Qm=3,Xm=4,Sl=class extends Ew.AbstractParserWithWordBoundaryChecking{innerPattern(){return kw}innerExtract(e,t){let n=Zm.MONTH_DICTIONARY[t[Sw].toLowerCase()],s=co.parseOrdinalNumberPattern(t[Ow]);if(s>31)return null;let i=e.createParsingComponents({day:s,month:n});if(t[Xm]){let u=Jm.parseYear(t[Xm]);i.assign("year",u)}else{let u=vw.findYearClosestToRef(e.refDate,s,n);i.imply("year",u)}if(!t[Qm])return i;let a=co.parseOrdinalNumberPattern(t[Qm]),o=e.createParsingResult(t.index,t[0]);return o.start=i,o.end=i.clone(),o.end.assign("day",a),o}};Ol.default=Sl});var nh=b(Rl=>{"use strict";Object.defineProperty(Rl,"__esModule",{value:!0});var Dl=lt(),Dw=ut(),xw=Se(),rh=lt(),Rw=Y(),Mw=new RegExp(`((?:in)\\s*)?(${xw.matchAnyPattern(Dl.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${rh.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),Cw=1,Aw=2,th=3,xl=class extends Rw.AbstractParserWithWordBoundaryChecking{innerPattern(){return Mw}innerExtract(e,t){let n=t[Aw].toLowerCase();if(t[0].length<=3&&!Dl.FULL_MONTH_NAME_DICTIONARY[n])return null;let s=e.createParsingResult(t.index+(t[Cw]||"").length,t.index+t[0].length);s.start.imply("day",1);let i=Dl.MONTH_DICTIONARY[n];if(s.start.assign("month",i),t[th]){let a=rh.parseYear(t[th]);s.start.assign("year",a)}else{let a=Dw.findYearClosestToRef(e.refDate,1,i);s.start.imply("year",a)}return s}};Rl.default=xl});var ah=b(Cl=>{"use strict";Object.defineProperty(Cl,"__esModule",{value:!0});var ih=lt(),Pw=Se(),Nw=Y(),Iw=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${Pw.matchAnyPattern(ih.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),Fw=1,Lw=2,sh=3,Uw=4,Ml=class extends Nw.AbstractParserWithWordBoundaryChecking{innerPattern(){return Iw}innerExtract(e,t){let n=t[sh]?parseInt(t[sh]):ih.MONTH_DICTIONARY[t[Lw].toLowerCase()];if(n<1||n>12)return null;let s=parseInt(t[Fw]);return{day:parseInt(t[Uw]),month:n,year:s}}};Cl.default=Ml});var oh=b(Pl=>{"use strict";Object.defineProperty(Pl,"__esModule",{value:!0});var qw=Y(),Ww=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),Yw=1,Gw=2,Al=class extends qw.AbstractParserWithWordBoundaryChecking{innerPattern(){return Ww}innerExtract(e,t){let n=parseInt(t[Gw]),s=parseInt(t[Yw]);return e.createParsingComponents().imply("day",1).assign("month",s).assign("year",n)}};Pl.default=Al});var Wn=b(mo=>{"use strict";Object.defineProperty(mo,"__esModule",{value:!0});mo.AbstractTimeExpressionParser=void 0;var Ot=ze();function jw(r,e,t,n){return new RegExp(`${r}${e}(\\d{1,4})(?:(?:\\.|:|\uFF1A)(\\d{1,2})(?:(?::|\uFF1A)(\\d{2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${t}`,n)}function $w(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 uh=2,bs=3,fo=4,po=5,Ei=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}patternFlags(){return"i"}primaryPatternLeftBoundary(){return"(^|\\s|T|\\b)"}primarySuffix(){return"(?=\\W|$)"}followingSuffix(){return"(?=\\W|$)"}pattern(e){return this.getPrimaryTimePatternThroughCache()}extract(e,t){let n=this.extractPrimaryTimeComponents(e,t);if(!n)return t.index+=t[0].length,null;let s=t.index+t[1].length,i=t[0].substring(t[1].length),a=e.createParsingResult(s,i,n);t.index+=t[0].length;let o=e.text.substring(t.index),l=this.getFollowingTimePatternThroughCache().exec(o);return i.match(/^\d{3,4}/)&&l&&l[0].match(/^\s*([+-])\s*\d{2,4}$/)?null:!l||l[0].match(/^\s*([+-])\s*\d{3,4}$/)?this.checkAndReturnWithoutFollowingPattern(a):(a.end=this.extractFollowingTimeComponents(e,l,a),a.end&&(a.text+=l[0]),this.checkAndReturnWithFollowingPattern(a))}extractPrimaryTimeComponents(e,t,n=!1){let s=e.createParsingComponents(),i=0,a=null,o=parseInt(t[uh]);if(o>100){if(this.strictMode||t[bs]!=null)return null;i=o%100,o=Math.floor(o/100)}if(o>24)return null;if(t[bs]!=null){if(t[bs].length==1&&!t[Ei])return null;i=parseInt(t[bs])}if(i>=60)return null;if(o>12&&(a=Ot.Meridiem.PM),t[Ei]!=null){if(o>12)return null;let u=t[Ei][0].toLowerCase();u=="a"&&(a=Ot.Meridiem.AM,o==12&&(o=0)),u=="p"&&(a=Ot.Meridiem.PM,o!=12&&(o+=12))}if(s.assign("hour",o),s.assign("minute",i),a!==null?s.assign("meridiem",a):o<12?s.imply("meridiem",Ot.Meridiem.AM):s.imply("meridiem",Ot.Meridiem.PM),t[po]!=null){let u=parseInt(t[po].substring(0,3));if(u>=1e3)return null;s.assign("millisecond",u)}if(t[fo]!=null){let u=parseInt(t[fo]);if(u>=60)return null;s.assign("second",u)}return s}extractFollowingTimeComponents(e,t,n){let s=e.createParsingComponents();if(t[po]!=null){let u=parseInt(t[po].substring(0,3));if(u>=1e3)return null;s.assign("millisecond",u)}if(t[fo]!=null){let u=parseInt(t[fo]);if(u>=60)return null;s.assign("second",u)}let i=parseInt(t[uh]),a=0,o=-1;if(t[bs]!=null?a=parseInt(t[bs]):i>100&&(a=i%100,i=Math.floor(i/100)),a>=60||i>24)return null;if(i>=12&&(o=Ot.Meridiem.PM),t[Ei]!=null){if(i>12)return null;let u=t[Ei][0].toLowerCase();u=="a"&&(o=Ot.Meridiem.AM,i==12&&(i=0,s.isCertain("day")||s.imply("day",s.get("day")+1))),u=="p"&&(o=Ot.Meridiem.PM,i!=12&&(i+=12)),n.start.isCertain("meridiem")||(o==Ot.Meridiem.AM?(n.start.imply("meridiem",Ot.Meridiem.AM),n.start.get("hour")==12&&n.start.assign("hour",0)):(n.start.imply("meridiem",Ot.Meridiem.PM),n.start.get("hour")!=12&&n.start.assign("hour",n.start.get("hour")+12)))}return s.assign("hour",i),s.assign("minute",a),o>=0?s.assign("meridiem",o):n.start.isCertain("meridiem")&&n.start.get("hour")>12?n.start.get("hour")-12>i?s.imply("meridiem",Ot.Meridiem.AM):i<=12&&(s.assign("hour",i+12),s.assign("meridiem",Ot.Meridiem.PM)):i>12?s.imply("meridiem",Ot.Meridiem.PM):i<=12&&s.imply("meridiem",Ot.Meridiem.AM),s.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],s=t[2];if(s.includes(".")&&!s.match(/\d(\.\d{2})+$/))return null;let i=parseInt(s),a=parseInt(n);if(i>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=jw(this.primaryPatternLeftBoundary(),e,t,this.patternFlags()),this.cachedPrimaryPrefix=e,this.cachedPrimarySuffix=t,this.cachedPrimaryTimePattern)}getFollowingTimePatternThroughCache(){let e=this.followingPhase(),t=this.followingSuffix();return this.cachedFollowingPhase===e&&this.cachedFollowingSuffix===t?this.cachedFollowingTimePatten:(this.cachedFollowingTimePatten=$w(e,t),this.cachedFollowingPhase=e,this.cachedFollowingSuffix=t,this.cachedFollowingTimePatten)}};mo.AbstractTimeExpressionParser=Nl});var lh=b(Fl=>{"use strict";Object.defineProperty(Fl,"__esModule",{value:!0});var ho=ze(),Bw=Wn(),Il=class extends Bw.AbstractTimeExpressionParser{constructor(e){super(e)}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|to|\\?)\\s*"}primaryPrefix(){return"(?:(?:at|from)\\s*)??"}primarySuffix(){return"(?:\\s*(?:o\\W*clock|at\\s*night|in\\s*the\\s*(?:morning|afternoon)))?(?!/)(?=\\W|$)"}extractPrimaryTimeComponents(e,t){let n=super.extractPrimaryTimeComponents(e,t);if(n){if(t[0].endsWith("night")){let s=n.get("hour");s>=6&&s<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",ho.Meridiem.PM)):s<6&&n.assign("meridiem",ho.Meridiem.AM)}if(t[0].endsWith("afternoon")){n.assign("meridiem",ho.Meridiem.PM);let s=n.get("hour");s>=0&&s<=6&&n.assign("hour",n.get("hour")+12)}t[0].endsWith("morning")&&(n.assign("meridiem",ho.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};Fl.default=Il});var Qt=b(_s=>{"use strict";Object.defineProperty(_s,"__esModule",{value:!0});_s.addImpliedTimeUnits=_s.reverseTimeUnits=void 0;function Hw(r){let e={};for(let t in r)e[t]=-r[t];return e}_s.reverseTimeUnits=Hw;function zw(r,e){let t=r.clone(),n=r.dayjs();for(let s in e)n=n.add(e[s],s);return("day"in e||"d"in e||"week"in e||"month"in e||"year"in e)&&(t.imply("day",n.date()),t.imply("month",n.month()+1),t.imply("year",n.year())),("second"in e||"minute"in e||"hour"in e)&&(t.imply("second",n.second()),t.imply("minute",n.minute()),t.imply("hour",n.hour())),t}_s.addImpliedTimeUnits=zw});var ch=b(ql=>{"use strict";Object.defineProperty(ql,"__esModule",{value:!0});var Ul=lt(),Vw=Le(),Kw=Y(),Qw=Qt(),Xw=new RegExp(`(${Ul.TIME_UNITS_PATTERN})\\s{0,5}(?:ago|before|earlier)(?=(?:\\W|$))`,"i"),Zw=new RegExp(`(${Ul.TIME_UNITS_PATTERN})\\s{0,5}ago(?=(?:\\W|$))`,"i"),Ll=class extends Kw.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?Zw:Xw}innerExtract(e,t){let n=Ul.parseTimeUnits(t[1]),s=Qw.reverseTimeUnits(n);return Vw.ParsingComponents.createRelativeFromReference(e.reference,s)}};ql.default=Ll});var dh=b(Gl=>{"use strict";Object.defineProperty(Gl,"__esModule",{value:!0});var Yl=lt(),Jw=Le(),eE=Y(),tE=new RegExp(`(${Yl.TIME_UNITS_PATTERN})\\s{0,5}(?:later|after|from now|henceforth|forward|out)(?=(?:\\W|$))`,"i"),rE=new RegExp("("+Yl.TIME_UNITS_PATTERN+")(later|from now)(?=(?:\\W|$))","i"),nE=1,Wl=class extends eE.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?rE:tE}innerExtract(e,t){let n=Yl.parseTimeUnits(t[nE]);return Jw.ParsingComponents.createRelativeFromReference(e.reference,n)}};Gl.default=Wl});var ws=b(vs=>{"use strict";Object.defineProperty(vs,"__esModule",{value:!0});vs.MergingRefiner=vs.Filter=void 0;var jl=class{refine(e,t){return t.filter(n=>this.isValid(e,n))}};vs.Filter=jl;var $l=class{refine(e,t){if(t.length<2)return t;let n=[],s=t[0],i=null;for(let a=1;a{console.log(`${this.constructor.name} merged ${u} and ${l} into ${c}`)}),s=c}}return s!=null&&n.push(s),n}};vs.MergingRefiner=$l});var kr=b(Hl=>{"use strict";Object.defineProperty(Hl,"__esModule",{value:!0});var sE=ws(),Bl=class extends sE.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(i=>{t.start.isCertain(i)||t.start.assign(i,n.start.get(i))}),t.start.getCertainComponents().forEach(i=>{n.start.isCertain(i)||n.start.assign(i,t.start.get(i))})),t.start.date().getTime()>n.start.date().getTime()){let i=t.start.dayjs(),a=n.start.dayjs();t.start.isOnlyWeekdayComponent()&&i.add(-7,"days").isBefore(a)?(i=i.add(-7,"days"),t.start.imply("day",i.date()),t.start.imply("month",i.month()+1),t.start.imply("year",i.year())):n.start.isOnlyWeekdayComponent()&&a.add(7,"days").isAfter(i)?(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 s=t.clone();return s.start=t.start,s.end=n.start,s.index=Math.min(t.index,n.index),t.index{"use strict";var iE=ki&&ki.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ki,"__esModule",{value:!0});var aE=iE(kr()),zl=class extends aE.default{patternBetween(){return/^\s*(to|-)\s*$/i}};ki.default=zl});var ph=b(Es=>{"use strict";Object.defineProperty(Es,"__esModule",{value:!0});Es.mergeDateTimeComponent=Es.mergeDateTimeResult=void 0;var oE=ze();function uE(r,e){let t=r.clone(),n=r.start,s=e.start;if(t.start=Vl(n,s),r.end!=null||e.end!=null){let i=r.end==null?r.start:r.end,a=e.end==null?e.start:e.end,o=Vl(i,a);r.end==null&&o.date().getTime(){"use strict";Object.defineProperty(Ql,"__esModule",{value:!0});var lE=ws(),mh=ph(),Kl=class extends lE.MergingRefiner{shouldMergeResults(e,t,n){return(t.start.isOnlyDate()&&n.start.isOnlyTime()||n.start.isOnlyDate()&&t.start.isOnlyTime())&&e.match(this.patternBetween())!=null}mergeResults(e,t,n){let s=t.start.isOnlyDate()?mh.mergeDateTimeResult(t,n):mh.mergeDateTimeResult(n,t);return s.index=t.index,s.text=t.text+e+n.text,s}};Ql.default=Kl});var hh=b(Si=>{"use strict";var cE=Si&&Si.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Si,"__esModule",{value:!0});var dE=cE(Lr()),Xl=class extends dE.default{patternBetween(){return new RegExp("^\\s*(T|at|after|before|on|of|,|-)?\\s*$")}};Si.default=Xl});var gh=b(Jl=>{"use strict";Object.defineProperty(Jl,"__esModule",{value:!0});var fE=new RegExp("^\\s*,?\\s*\\(?([A-Z]{2,4})\\)?(?=\\W|$)","i"),pE={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},Zl=class{constructor(e){this.timezone=Object.assign(Object.assign({},pE),e)}refine(e,t){var n;let s=(n=e.option.timezones)!==null&&n!==void 0?n:{};return t.forEach(i=>{var a,o;let u=e.text.substring(i.index+i.text.length),l=fE.exec(u);if(!l)return;let c=l[1].toUpperCase(),f=(o=(a=s[c])!==null&&a!==void 0?a:this.timezone[c])!==null&&o!==void 0?o:null;if(f===null)return;e.debug(()=>{console.log(`Extracting timezone: '${c}' into: ${f} for: ${i.start}`)});let m=i.start.get("timezoneOffset");m!==null&&f!=m&&(i.start.isCertain("timezoneOffset")||c!=l[1])||i.start.isOnlyDate()&&c!=l[1]||(i.text+=l[0],i.start.isCertain("timezoneOffset")||i.start.assign("timezoneOffset",f),i.end!=null&&!i.end.isCertain("timezoneOffset")&&i.end.assign("timezoneOffset",f))}),t}};Jl.default=Zl});var go=b(tc=>{"use strict";Object.defineProperty(tc,"__esModule",{value:!0});var mE=new RegExp("^\\s*(?:\\(?(?:GMT|UTC)\\s?)?([+-])(\\d{1,2})(?::?(\\d{2}))?\\)?","i"),hE=1,gE=2,yE=3,ec=class{refine(e,t){return t.forEach(function(n){if(n.start.isCertain("timezoneOffset"))return;let s=e.text.substring(n.index+n.text.length),i=mE.exec(s);if(!i)return;e.debug(()=>{console.log(`Extracting timezone: '${i[0]}' into : ${n}`)});let a=parseInt(i[gE]),o=parseInt(i[yE]||"0"),u=a*60+o;u>14*60||(i[hE]==="-"&&(u=-u),n.end!=null&&n.end.assign("timezoneOffset",u),n.start.assign("timezoneOffset",u),n.text+=i[0])}),t}};tc.default=ec});var yh=b(nc=>{"use strict";Object.defineProperty(nc,"__esModule",{value:!0});var rc=class{refine(e,t){if(t.length<2)return t;let n=[],s=t[0];for(let i=1;is.text.length&&(s=a):(n.push(s),s=a)}return s!=null&&n.push(s),n}};nc.default=rc});var Th=b(Oi=>{"use strict";var TE=Oi&&Oi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Oi,"__esModule",{value:!0});var bE=TE(Te()),sc=class{refine(e,t){return e.option.forwardDate&&t.forEach(function(n){let s=bE.default(e.refDate);if(n.start.isOnlyDayMonthComponent()&&s.isAfter(n.start.dayjs()))for(let i=0;i<3&&s.isAfter(n.start.dayjs());i++)n.start.imply("year",n.start.get("year")+1),e.debug(()=>{console.log(`Forward yearly adjusted for ${n} (${n.start})`)}),n.end&&!n.end.isCertain("year")&&(n.end.imply("year",n.end.get("year")+1),e.debug(()=>{console.log(`Forward yearly adjusted for ${n} (${n.end})`)}));n.start.isOnlyWeekdayComponent()&&s.isAfter(n.start.dayjs())&&(s.day()>=n.start.get("weekday")?s=s.day(n.start.get("weekday")+7):s=s.day(n.start.get("weekday")),n.start.imply("day",s.date()),n.start.imply("month",s.month()+1),n.start.imply("year",s.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.start})`)}),n.end&&n.end.isOnlyWeekdayComponent()&&(s.day()>n.end.get("weekday")?s=s.day(n.end.get("weekday")+7):s=s.day(n.end.get("weekday")),n.end.imply("day",s.date()),n.end.imply("month",s.month()+1),n.end.imply("year",s.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.end})`)})))}),t}};Oi.default=sc});var bh=b(ac=>{"use strict";Object.defineProperty(ac,"__esModule",{value:!0});var _E=ws(),ic=class extends _E.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}};ac.default=ic});var lc=b(uc=>{"use strict";Object.defineProperty(uc,"__esModule",{value:!0});var vE=Y(),wE=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"),EE=1,kE=2,SE=3,_h=4,OE=5,vh=6,wh=7,Eh=8,kh=9,oc=class extends vE.AbstractParserWithWordBoundaryChecking{innerPattern(){return wE}innerExtract(e,t){let n={};if(n.year=parseInt(t[EE]),n.month=parseInt(t[kE]),n.day=parseInt(t[SE]),t[_h]!=null)if(n.hour=parseInt(t[_h]),n.minute=parseInt(t[OE]),t[vh]!=null&&(n.second=parseInt(t[vh])),t[wh]!=null&&(n.millisecond=parseInt(t[wh])),t[Eh]==null)n.timezoneOffset=0;else{let s=parseInt(t[Eh]),i=0;t[kh]!=null&&(i=parseInt(t[kh]));let a=s*60;a<0?a-=i:a+=i,n.timezoneOffset=a}return n}};uc.default=oc});var Sh=b(dc=>{"use strict";Object.defineProperty(dc,"__esModule",{value:!0});var DE=ws(),cc=class extends DE.MergingRefiner{mergeResults(e,t,n){let s=n.clone();return s.index=t.index,s.text=t.text+e+s.text,s.start.assign("weekday",t.start.get("weekday")),s.end&&s.end.assign("weekday",t.start.get("weekday")),s}shouldMergeResults(e,t,n){return t.start.isOnlyWeekdayComponent()&&!t.start.isCertain("hour")&&n.start.isCertain("day")&&e.match(/^,?\s*$/)!=null}};dc.default=cc});var Ur=b(ks=>{"use strict";var Yn=ks&&ks.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ks,"__esModule",{value:!0});ks.includeCommonConfiguration=void 0;var xE=Yn(gh()),RE=Yn(go()),Oh=Yn(yh()),ME=Yn(Th()),CE=Yn(bh()),AE=Yn(lc()),PE=Yn(Sh());function NE(r,e=!1){return r.parsers.unshift(new AE.default),r.refiners.unshift(new PE.default),r.refiners.unshift(new xE.default),r.refiners.unshift(new RE.default),r.refiners.unshift(new Oh.default),r.refiners.push(new Oh.default),r.refiners.push(new ME.default),r.refiners.push(new CE.default(e)),r}ks.includeCommonConfiguration=NE});var Wr=b(we=>{"use strict";var IE=we&&we.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(we,"__esModule",{value:!0});we.noon=we.morning=we.midnight=we.yesterdayEvening=we.evening=we.lastNight=we.tonight=we.theDayAfter=we.tomorrow=we.theDayBefore=we.yesterday=we.today=we.now=void 0;var Sr=Le(),Ss=IE(Te()),qr=Kt(),Di=ze();function FE(r){let e=Ss.default(r.instant),t=new Sr.ParsingComponents(r,{});return qr.assignSimilarDate(t,e),qr.assignSimilarTime(t,e),r.timezoneOffset!==null&&t.assign("timezoneOffset",e.utcOffset()),t}we.now=FE;function LE(r){let e=Ss.default(r.instant),t=new Sr.ParsingComponents(r,{});return qr.assignSimilarDate(t,e),qr.implySimilarTime(t,e),t}we.today=LE;function UE(r){return Dh(r,1)}we.yesterday=UE;function Dh(r,e){return fc(r,-e)}we.theDayBefore=Dh;function qE(r){return fc(r,1)}we.tomorrow=qE;function fc(r,e){let t=Ss.default(r.instant),n=new Sr.ParsingComponents(r,{});return t=t.add(e,"day"),qr.assignSimilarDate(n,t),qr.implySimilarTime(n,t),n}we.theDayAfter=fc;function WE(r,e=22){let t=Ss.default(r.instant),n=new Sr.ParsingComponents(r,{});return n.imply("hour",e),n.imply("meridiem",Di.Meridiem.PM),qr.assignSimilarDate(n,t),n}we.tonight=WE;function YE(r,e=0){let t=Ss.default(r.instant),n=new Sr.ParsingComponents(r,{});return t.hour()<6&&(t=t.add(-1,"day")),qr.assignSimilarDate(n,t),n.imply("hour",e),n}we.lastNight=YE;function GE(r,e=20){let t=new Sr.ParsingComponents(r,{});return t.imply("meridiem",Di.Meridiem.PM),t.imply("hour",e),t}we.evening=GE;function jE(r,e=20){let t=Ss.default(r.instant),n=new Sr.ParsingComponents(r,{});return t=t.add(-1,"day"),qr.assignSimilarDate(n,t),n.imply("hour",e),n.imply("meridiem",Di.Meridiem.PM),n}we.yesterdayEvening=jE;function $E(r){let e=new Sr.ParsingComponents(r,{});return e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e}we.midnight=$E;function BE(r,e=6){let t=new Sr.ParsingComponents(r,{});return t.imply("meridiem",Di.Meridiem.AM),t.imply("hour",e),t}we.morning=BE;function HE(r){let e=new Sr.ParsingComponents(r,{});return e.imply("meridiem",Di.Meridiem.AM),e.imply("hour",12),e}we.noon=HE});var xh=b(cr=>{"use strict";var zE=cr&&cr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),VE=cr&&cr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),KE=cr&&cr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&zE(e,r,t);return VE(e,r),e},QE=cr&&cr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(cr,"__esModule",{value:!0});var XE=QE(Te()),ZE=Y(),JE=Kt(),xi=KE(Wr()),ek=/(now|today|tonight|tomorrow|tmr|tmrw|yesterday|last\s*night)(?=\W|$)/i,pc=class extends ZE.AbstractParserWithWordBoundaryChecking{innerPattern(e){return ek}innerExtract(e,t){let n=XE.default(e.refDate),s=t[0].toLowerCase(),i=e.createParsingComponents();switch(s){case"now":return xi.now(e.reference);case"today":return xi.today(e.reference);case"yesterday":return xi.yesterday(e.reference);case"tomorrow":case"tmr":case"tmrw":return xi.tomorrow(e.reference);case"tonight":return xi.tonight(e.reference);default:s.match(/last\s*night/)&&(n.hour()>6&&(n=n.add(-1,"day")),JE.assignSimilarDate(i,n),i.imply("hour",0));break}return i}};cr.default=pc});var Rh=b(Ri=>{"use strict";var tk=Ri&&Ri.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ri,"__esModule",{value:!0});var yo=ze(),rk=Y(),nk=tk(Te()),sk=Kt(),ik=/(?:this)?\s{0,3}(morning|afternoon|evening|night|midnight|noon)(?=\W|$)/i,mc=class extends rk.AbstractParserWithWordBoundaryChecking{innerPattern(){return ik}innerExtract(e,t){let n=nk.default(e.refDate),s=e.createParsingComponents();switch(t[1].toLowerCase()){case"afternoon":s.imply("meridiem",yo.Meridiem.PM),s.imply("hour",15);break;case"evening":case"night":s.imply("meridiem",yo.Meridiem.PM),s.imply("hour",20);break;case"midnight":sk.assignTheNextDay(s,n),s.imply("hour",0),s.imply("minute",0),s.imply("second",0);break;case"morning":s.imply("meridiem",yo.Meridiem.AM),s.imply("hour",6);break;case"noon":s.imply("meridiem",yo.Meridiem.AM),s.imply("hour",12);break}return s}};Ri.default=mc});var Gn=b(mn=>{"use strict";var ak=mn&&mn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(mn,"__esModule",{value:!0});mn.toDayJSClosestWeekday=mn.toDayJSWeekday=void 0;var Mh=ak(Te());function ok(r,e,t){if(!t)return Ch(r,e);let n=Mh.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}mn.toDayJSWeekday=ok;function Ch(r,e){let t=Mh.default(r),n=t.day();return Math.abs(e-7-n){"use strict";Object.defineProperty(gc,"__esModule",{value:!0});var Ah=lt(),uk=Se(),lk=Y(),ck=Gn(),dk=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:on\\s*?)?(?:(this|last|past|next)\\s*)?(${uk.matchAnyPattern(Ah.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(this|last|past|next)\\s*week)?(?=\\W|$)`,"i"),fk=1,pk=2,mk=3,hc=class extends lk.AbstractParserWithWordBoundaryChecking{innerPattern(){return dk}innerExtract(e,t){let n=t[pk].toLowerCase(),s=Ah.WEEKDAY_DICTIONARY[n],i=t[fk],a=t[mk],o=i||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=ck.toDayJSWeekday(e.refDate,s,u);return e.createParsingComponents().assign("weekday",s).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};gc.default=hc});var Fh=b(Mi=>{"use strict";var hk=Mi&&Mi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Mi,"__esModule",{value:!0});var Ih=lt(),Nh=Le(),gk=hk(Te()),yk=Y(),Tk=Se(),bk=new RegExp(`(this|last|past|next|after\\s*this)\\s*(${Tk.matchAnyPattern(Ih.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),_k=1,vk=2,yc=class extends yk.AbstractParserWithWordBoundaryChecking{innerPattern(){return bk}innerExtract(e,t){let n=t[_k].toLowerCase(),s=t[vk].toLowerCase(),i=Ih.TIME_UNIT_DICTIONARY[s];if(n=="next"||n.startsWith("after")){let u={};return u[i]=1,Nh.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="last"||n=="past"){let u={};return u[i]=-1,Nh.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=gk.default(e.reference.instant);return s.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):s.match(/month/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):s.match(/year/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};Mi.default=yc});var dr=b(xs=>{"use strict";Object.defineProperty(xs,"__esModule",{value:!0});xs.ParsingContext=xs.Chrono=void 0;var Os=Le(),wk=Tc(),Ds=class{constructor(e){e=e||wk.createCasualConfiguration(),this.parsers=[...e.parsers],this.refiners=[...e.refiners]}clone(){return new Ds({parsers:[...this.parsers],refiners:[...this.refiners]})}parseDate(e,t,n){let s=this.parse(e,t,n);return s.length>0?s[0].start.date():null}parse(e,t,n){let s=new To(e,t,n),i=[];return this.parsers.forEach(a=>{let o=Ds.executeParser(s,a);i=i.concat(o)}),i.sort((a,o)=>a.index-o.index),this.refiners.forEach(function(a){i=a.refine(s,i)}),i}static executeParser(e,t){let n=[],s=t.pattern(e),i=e.text,a=e.text,o=s.exec(a);for(;o;){let u=o.index+i.length-a.length;o.index=u;let l=t.extract(e,o);if(!l){a=i.substring(o.index+1),o=s.exec(a);continue}let c=null;l instanceof Os.ParsingResult?c=l:l instanceof Os.ParsingComponents?(c=e.createParsingResult(o.index,o[0]),c.start=l):c=e.createParsingResult(o.index,o[0],l),e.debug(()=>console.log(`${t.constructor.name} extracted result ${c}`)),n.push(c),a=i.substring(u+c.text.length),o=s.exec(a)}return n}};xs.Chrono=Ds;var To=class{constructor(e,t,n){this.text=e,this.reference=new Os.ReferenceWithTimezone(t),this.option=n!=null?n:{},this.refDate=this.reference.instant}createParsingComponents(e){return e instanceof Os.ParsingComponents?e:new Os.ParsingComponents(this.reference,e)}createParsingResult(e,t,n,s){let i=typeof t=="string"?t:this.text.substring(e,t),a=n?this.createParsingComponents(n):null,o=s?this.createParsingComponents(s):null;return new Os.ParsingResult(this.reference,e,i,a,o)}debug(e){this.option.debug&&(this.option.debug instanceof Function?this.option.debug(e):this.option.debug.debug(e))}};xs.ParsingContext=To});var jn=b(vc=>{"use strict";Object.defineProperty(vc,"__esModule",{value:!0});var Lh=ut(),Ek=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"),bo=1,Uh=5,qh=2,Wh=3,bc=4,_c=class{constructor(e){this.groupNumberMonth=e?Wh:qh,this.groupNumberDay=e?qh:Wh}pattern(){return Ek}extract(e,t){if(t[bo]=="/"||t[Uh]=="/"){t.index+=t[0].length;return}let n=t.index+t[bo].length,s=t[0].substr(t[bo].length,t[0].length-t[bo].length-t[Uh].length);if(s.match(/^\d\.\d$/)||s.match(/^\d\.\d{1,2}\.\d{1,2}\s*$/)||!t[bc]&&t[0].indexOf("/")<0)return;let i=e.createParsingResult(n,s),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(i.start.assign("day",o),i.start.assign("month",a),t[bc]){let u=parseInt(t[bc]),l=Lh.findMostLikelyADYear(u);i.start.assign("year",l)}else{let u=Lh.findYearClosestToRef(e.refDate,o,a);i.start.imply("year",u)}return i}};vc.default=_c});var Gh=b(Ec=>{"use strict";Object.defineProperty(Ec,"__esModule",{value:!0});var Yh=lt(),kk=Le(),Sk=Y(),Ok=Qt(),Dk=new RegExp(`(this|last|past|next|after|\\+|-)\\s*(${Yh.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),wc=class extends Sk.AbstractParserWithWordBoundaryChecking{innerPattern(){return Dk}innerExtract(e,t){let n=t[1].toLowerCase(),s=Yh.parseTimeUnits(t[2]);switch(n){case"last":case"past":case"-":s=Ok.reverseTimeUnits(s);break}return kk.ParsingComponents.createRelativeFromReference(e.reference,s)}};Ec.default=wc});var $h=b(Oc=>{"use strict";Object.defineProperty(Oc,"__esModule",{value:!0});var xk=ws(),kc=Le(),Rk=lt(),Mk=Qt();function jh(r){return r.text.match(/\s+(before|from)$/i)!=null}function Ck(r){return r.text.match(/\s+(after|since)$/i)!=null}var Sc=class extends xk.MergingRefiner{patternBetween(){return/^\s*$/i}shouldMergeResults(e,t,n){return!e.match(this.patternBetween())||!jh(t)&&!Ck(t)?!1:!!n.start.get("day")&&!!n.start.get("month")&&!!n.start.get("year")}mergeResults(e,t,n){let s=Rk.parseTimeUnits(t.text);jh(t)&&(s=Mk.reverseTimeUnits(s));let i=kc.ParsingComponents.createRelativeFromReference(new kc.ReferenceWithTimezone(n.start.date()),s);return new kc.ParsingResult(n.reference,t.index,`${t.text}${e}${n.text}`,i)}};Oc.default=Sc});var Tc=b(Ge=>{"use strict";var Xe=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.GB=Ge.strict=Ge.casual=void 0;var Ak=Xe(jm()),Pk=Xe(Km()),Nk=Xe(eh()),Ik=Xe(nh()),Fk=Xe(ah()),Lk=Xe(oh()),Uk=Xe(lh()),qk=Xe(ch()),Wk=Xe(dh()),Yk=Xe(fh()),Gk=Xe(hh()),jk=Ur(),$k=Xe(xh()),Bk=Xe(Rh()),Hk=Xe(Ph()),zk=Xe(Fh()),Dc=dr(),Vk=Xe(jn()),Kk=Xe(Gh()),Qk=Xe($h());Ge.casual=new Dc.Chrono(Bh(!1));Ge.strict=new Dc.Chrono(_o(!0,!1));Ge.GB=new Dc.Chrono(_o(!1,!0));function Xk(r,e,t){return Ge.casual.parse(r,e,t)}Ge.parse=Xk;function Zk(r,e,t){return Ge.casual.parseDate(r,e,t)}Ge.parseDate=Zk;function Bh(r=!1){let e=_o(!1,r);return e.parsers.unshift(new $k.default),e.parsers.unshift(new Bk.default),e.parsers.unshift(new Ik.default),e.parsers.unshift(new zk.default),e.parsers.unshift(new Kk.default),e}Ge.createCasualConfiguration=Bh;function _o(r=!0,e=!1){return jk.includeCommonConfiguration({parsers:[new Vk.default(e),new Ak.default,new Pk.default,new Nk.default,new Hk.default,new Fk.default,new Lk.default,new Uk.default(r),new qk.default(r),new Wk.default(r)],refiners:[new Qk.default,new Gk.default,new Yk.default]},r)}Ge.createConfiguration=_o});var Hh=b(Rc=>{"use strict";Object.defineProperty(Rc,"__esModule",{value:!0});var Jk=Wn(),xc=class extends Jk.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:um|von)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|bis)\\s*"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}};Rc.default=xc});var Ci=b(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.parseTimeUnits=xe.TIME_UNITS_PATTERN=xe.parseYear=xe.YEAR_PATTERN=xe.parseNumberPattern=xe.NUMBER_PATTERN=xe.TIME_UNIT_DICTIONARY=xe.INTEGER_WORD_DICTIONARY=xe.MONTH_DICTIONARY=xe.WEEKDAY_DICTIONARY=void 0;var Mc=Se(),e1=ut();xe.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};xe.MONTH_DICTIONARY={januar:1,j\u00E4nner:1,janner:1,jan:1,"jan.":1,februar:2,feber:2,feb:2,"feb.":2,m\u00E4rz:3,maerz:3,m\u00E4r:3,"m\xE4r.":3,mrz:3,"mrz.":3,april:4,apr:4,"apr.":4,mai:5,juni:6,jun:6,"jun.":6,juli:7,jul:7,"jul.":7,august:8,aug:8,"aug.":8,september:9,sep:9,"sep.":9,sept:9,"sept.":9,oktober:10,okt:10,"okt.":10,november:11,nov:11,"nov.":11,dezember:12,dez:12,"dez.":12};xe.INTEGER_WORD_DICTIONARY={eins:1,eine:1,einem:1,einen:1,einer:1,zwei:2,drei:3,vier:4,f\u00FCnf:5,fuenf:5,sechs:6,sieben:7,acht:8,neun:9,zehn:10,elf:11,zw\u00F6lf:12,zwoelf:12};xe.TIME_UNIT_DICTIONARY={sek:"second",sekunde:"second",sekunden:"second",min:"minute",minute:"minute",minuten:"minute",h:"hour",std:"hour",stunde:"hour",stunden:"hour",tag:"d",tage:"d",tagen:"d",woche:"week",wochen:"week",monat:"month",monate:"month",monaten:"month",monats:"month",quartal:"quarter",quartals:"quarter",quartale:"quarter",quartalen:"quarter",a:"year",j:"year",jr:"year",jahr:"year",jahre:"year",jahren:"year",jahres:"year"};xe.NUMBER_PATTERN=`(?:${Mc.matchAnyPattern(xe.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s*an?)?|an?\\b(?:\\s*few)?|few|several|a?\\s*couple\\s*(?:of)?)`;function Vh(r){let e=r.toLowerCase();return xe.INTEGER_WORD_DICTIONARY[e]!==void 0?xe.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)}xe.parseNumberPattern=Vh;xe.YEAR_PATTERN="(?:[0-9]{1,4}(?:\\s*[vn]\\.?\\s*(?:C(?:hr)?|(?:u\\.?|d\\.?(?:\\s*g\\.?)?)?\\s*Z)\\.?|\\s*(?:u\\.?|d\\.?(?:\\s*g\\.)?)\\s*Z\\.?)?)";function t1(r){if(/v/i.test(r))return-parseInt(r.replace(/[^0-9]+/gi,""));if(/n/i.test(r))return parseInt(r.replace(/[^0-9]+/gi,""));if(/z/i.test(r))return parseInt(r.replace(/[^0-9]+/gi,""));let e=parseInt(r);return e1.findMostLikelyADYear(e)}xe.parseYear=t1;var Kh=`(${xe.NUMBER_PATTERN})\\s{0,5}(${Mc.matchAnyPattern(xe.TIME_UNIT_DICTIONARY)})\\s{0,5}`,zh=new RegExp(Kh,"i");xe.TIME_UNITS_PATTERN=Mc.repeatedTimeunitPattern("",Kh);function r1(r){let e={},t=r,n=zh.exec(t);for(;n;)n1(e,n),t=t.substring(n[0].length),n=zh.exec(t);return e}xe.parseTimeUnits=r1;function n1(r,e){let t=Vh(e[1]),n=xe.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Xh=b(Ac=>{"use strict";Object.defineProperty(Ac,"__esModule",{value:!0});var Qh=Ci(),s1=Se(),i1=Y(),a1=Gn(),o1=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:a[mn]\\s*?)?(?:(diese[mn]|letzte[mn]|n(?:\xE4|ae)chste[mn])\\s*)?(${s1.matchAnyPattern(Qh.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(diese|letzte|n(?:\xE4|ae)chste)\\s*woche)?(?=\\W|$)`,"i"),u1=1,l1=3,c1=2,Cc=class extends i1.AbstractParserWithWordBoundaryChecking{innerPattern(){return o1}innerExtract(e,t){let n=t[c1].toLowerCase(),s=Qh.WEEKDAY_DICTIONARY[n],i=t[u1],a=t[l1],o=i||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=a1.toDayJSWeekday(e.refDate,s,u);return e.createParsingComponents().assign("weekday",s).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Ac.default=Cc});var tg=b(Pc=>{"use strict";Object.defineProperty(Pc,"__esModule",{value:!0});var hn=ze(),d1=new RegExp("(^|\\s|T)(?:(?:um|von)\\s*)?(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s)?)?(?:\\s*Uhr)?(?:\\s*(morgens|vormittags|nachmittags|abends|nachts|am\\s+(?:Morgen|Vormittag|Nachmittag|Abend)|in\\s+der\\s+Nacht))?(?=\\W|$)","i"),f1=new RegExp("^\\s*(\\-|\\\u2013|\\~|\\\u301C|bis(?:\\s+um)?|\\?)\\s*(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s)?)?(?:\\s*Uhr)?(?:\\s*(morgens|vormittags|nachmittags|abends|nachts|am\\s+(?:Morgen|Vormittag|Nachmittag|Abend)|in\\s+der\\s+Nacht))?(?=\\W|$)","i"),p1=2,Zh=3,Jh=4,eg=5,Rs=class{pattern(e){return d1}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=Rs.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let s=e.text.substring(t.index+t[0].length),i=f1.exec(s);return i&&(n.end=Rs.extractTimeComponent(n.start.clone(),i),n.end&&(n.text+=i[0])),n}static extractTimeComponent(e,t){let n=0,s=0,i=null;if(n=parseInt(t[p1]),t[Zh]!=null&&(s=parseInt(t[Zh])),s>=60||n>24)return null;if(n>=12&&(i=hn.Meridiem.PM),t[eg]!=null){if(n>12)return null;let a=t[eg].toLowerCase();a.match(/morgen|vormittag/)&&(i=hn.Meridiem.AM,n==12&&(n=0)),a.match(/nachmittag|abend/)&&(i=hn.Meridiem.PM,n!=12&&(n+=12)),a.match(/nacht/)&&(n==12?(i=hn.Meridiem.AM,n=0):n<6?i=hn.Meridiem.AM:(i=hn.Meridiem.PM,n+=12))}if(e.assign("hour",n),e.assign("minute",s),i!==null?e.assign("meridiem",i):n<12?e.imply("meridiem",hn.Meridiem.AM):e.imply("meridiem",hn.Meridiem.PM),t[Jh]!=null){let a=parseInt(t[Jh]);if(a>=60)return null;e.assign("second",a)}return e}};Pc.default=Rs});var rg=b(Ai=>{"use strict";var m1=Ai&&Ai.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ai,"__esModule",{value:!0});var h1=m1(kr()),Nc=class extends h1.default{patternBetween(){return/^\s*(bis(?:\s*(?:am|zum))?|-)\s*$/i}};Ai.default=Nc});var ng=b(Pi=>{"use strict";var g1=Pi&&Pi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Pi,"__esModule",{value:!0});var y1=g1(Lr()),Ic=class extends y1.default{patternBetween(){return new RegExp("^\\s*(T|um|am|,|-)?\\s*$")}};Pi.default=Ic});var Fc=b(Ii=>{"use strict";var T1=Ii&&Ii.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ii,"__esModule",{value:!0});var b1=T1(Te()),$n=ze(),_1=Y(),v1=Kt(),w1=Qt(),Ni=class extends _1.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(diesen)?\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht)(?=\W|$)/i}innerExtract(e,t){let n=b1.default(e.refDate),s=t[2].toLowerCase(),i=e.createParsingComponents();return v1.implySimilarTime(i,n),Ni.extractTimeComponents(i,s)}static extractTimeComponents(e,t){switch(t){case"morgen":e.imply("hour",6),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",$n.Meridiem.AM);break;case"vormittag":e.imply("hour",9),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",$n.Meridiem.AM);break;case"mittag":case"mittags":e.imply("hour",12),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",$n.Meridiem.AM);break;case"nachmittag":e.imply("hour",15),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",$n.Meridiem.PM);break;case"abend":e.imply("hour",18),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",$n.Meridiem.PM);break;case"nacht":e.imply("hour",22),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",$n.Meridiem.PM);break;case"mitternacht":e.get("hour")>1&&(e=w1.addImpliedTimeUnits(e,{day:1})),e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",$n.Meridiem.AM);break}return e}};Ii.default=Ni});var ag=b(fr=>{"use strict";var E1=fr&&fr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),k1=fr&&fr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),S1=fr&&fr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&E1(e,r,t);return k1(e,r),e},ig=fr&&fr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(fr,"__esModule",{value:!0});var O1=ig(Te()),D1=Y(),Bn=Kt(),x1=ig(Fc()),sg=S1(Wr()),R1=new RegExp("(jetzt|heute|morgen|\xFCbermorgen|uebermorgen|gestern|vorgestern|letzte\\s*nacht)(?:\\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht))?(?=\\W|$)","i"),M1=1,C1=2,Lc=class extends D1.AbstractParserWithWordBoundaryChecking{innerPattern(e){return R1}innerExtract(e,t){let n=O1.default(e.refDate),s=(t[M1]||"").toLowerCase(),i=(t[C1]||"").toLowerCase(),a=e.createParsingComponents();switch(s){case"jetzt":a=sg.now(e.reference);break;case"heute":a=sg.today(e.reference);break;case"morgen":Bn.assignTheNextDay(a,n);break;case"\xFCbermorgen":case"uebermorgen":n=n.add(1,"day"),Bn.assignTheNextDay(a,n);break;case"gestern":n=n.add(-1,"day"),Bn.assignSimilarDate(a,n),Bn.implySimilarTime(a,n);break;case"vorgestern":n=n.add(-2,"day"),Bn.assignSimilarDate(a,n),Bn.implySimilarTime(a,n);break;default:s.match(/letzte\s*nacht/)&&(n.hour()>6&&(n=n.add(-1,"day")),Bn.assignSimilarDate(a,n),a.imply("hour",0));break}return i&&(a=x1.default.extractTimeComponents(a,i)),a}};fr.default=Lc});var fg=b(qc=>{"use strict";Object.defineProperty(qc,"__esModule",{value:!0});var A1=ut(),cg=Ci(),dg=Ci(),P1=Se(),N1=Y(),I1=new RegExp(`(?:am\\s*?)?(?:den\\s*?)?([0-9]{1,2})\\.(?:\\s*(?:bis(?:\\s*(?:am|zum))?|\\-|\\\u2013|\\s)\\s*([0-9]{1,2})\\.?)?\\s*(${P1.matchAnyPattern(cg.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${dg.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),og=1,ug=2,F1=3,lg=4,Uc=class extends N1.AbstractParserWithWordBoundaryChecking{innerPattern(){return I1}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=cg.MONTH_DICTIONARY[t[F1].toLowerCase()],i=parseInt(t[og]);if(i>31)return t.index=t.index+t[og].length,null;if(n.start.assign("month",s),n.start.assign("day",i),t[lg]){let a=dg.parseYear(t[lg]);n.start.assign("year",a)}else{let a=A1.findYearClosestToRef(e.refDate,i,s);n.start.imply("year",a)}if(t[ug]){let a=parseInt(t[ug]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};qc.default=Uc});var pg=b(Yc=>{"use strict";Object.defineProperty(Yc,"__esModule",{value:!0});var vo=Ci(),L1=Le(),U1=Y(),q1=Qt(),W1=Se(),Wc=class extends U1.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:\\s*((?:n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?|vor|in)\\s*)?(${vo.NUMBER_PATTERN})?(?:\\s*(n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?)?\\s*(${W1.matchAnyPattern(vo.TIME_UNIT_DICTIONARY)})`,"i")}innerExtract(e,t){let n=t[2]?vo.parseNumberPattern(t[2]):1,s=vo.TIME_UNIT_DICTIONARY[t[4].toLowerCase()],i={};i[s]=n;let a=t[1]||t[3]||"";if(a=a.toLowerCase(),!!a)return(/vor/.test(a)||/letzte/.test(a)||/vergangen/.test(a))&&(i=q1.reverseTimeUnits(i)),L1.ParsingComponents.createRelativeFromReference(e.reference,i)}};Yc.default=Wc});var gg=b(Ze=>{"use strict";var pr=Ze&&Ze.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ze,"__esModule",{value:!0});Ze.createConfiguration=Ze.createCasualConfiguration=Ze.parseDate=Ze.parse=Ze.strict=Ze.casual=void 0;var Y1=Ur(),mg=dr(),G1=pr(jn()),j1=pr(lc()),$1=pr(Hh()),B1=pr(Xh()),H1=pr(tg()),z1=pr(rg()),V1=pr(ng()),K1=pr(ag()),Q1=pr(Fc()),X1=pr(fg()),Z1=pr(pg());Ze.casual=new mg.Chrono(hg());Ze.strict=new mg.Chrono(Gc(!0));function J1(r,e,t){return Ze.casual.parse(r,e,t)}Ze.parse=J1;function eS(r,e,t){return Ze.casual.parseDate(r,e,t)}Ze.parseDate=eS;function hg(r=!0){let e=Gc(!1,r);return e.parsers.unshift(new Q1.default),e.parsers.unshift(new K1.default),e.parsers.unshift(new Z1.default),e}Ze.createCasualConfiguration=hg;function Gc(r=!0,e=!0){return Y1.includeCommonConfiguration({parsers:[new j1.default,new G1.default(e),new $1.default,new H1.default,new X1.default,new B1.default],refiners:[new z1.default,new V1.default]},r)}Ze.createConfiguration=Gc});var Tg=b(mr=>{"use strict";var tS=mr&&mr.__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]}),rS=mr&&mr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),nS=mr&&mr.__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)&&tS(e,r,t);return rS(e,r),e},sS=mr&&mr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(mr,"__esModule",{value:!0});var iS=sS(Te()),aS=ze(),oS=Y(),yg=Kt(),wo=nS(Wr()),jc=class extends oS.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(maintenant|aujourd'hui|demain|hier|cette\s*nuit|la\s*veille)(?=\W|$)/i}innerExtract(e,t){let n=iS.default(e.refDate),s=t[0].toLowerCase(),i=e.createParsingComponents();switch(s){case"maintenant":return wo.now(e.reference);case"aujourd'hui":return wo.today(e.reference);case"hier":return wo.yesterday(e.reference);case"demain":return wo.tomorrow(e.reference);default:s.match(/cette\s*nuit/)?(yg.assignSimilarDate(i,n),i.imply("hour",22),i.imply("meridiem",aS.Meridiem.PM)):s.match(/la\s*veille/)&&(n=n.add(-1,"day"),yg.assignSimilarDate(i,n),i.imply("hour",0))}return i}};mr.default=jc});var bg=b(Bc=>{"use strict";Object.defineProperty(Bc,"__esModule",{value:!0});var Fi=ze(),uS=Y(),$c=class extends uS.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(cet?)?\s*(matin|soir|après-midi|aprem|a midi|à minuit)(?=\W|$)/i}innerExtract(e,t){let n=t[2].toLowerCase(),s=e.createParsingComponents();switch(n){case"apr\xE8s-midi":case"aprem":s.imply("hour",14),s.imply("minute",0),s.imply("meridiem",Fi.Meridiem.PM);break;case"soir":s.imply("hour",18),s.imply("minute",0),s.imply("meridiem",Fi.Meridiem.PM);break;case"matin":s.imply("hour",8),s.imply("minute",0),s.imply("meridiem",Fi.Meridiem.AM);break;case"a midi":s.imply("hour",12),s.imply("minute",0),s.imply("meridiem",Fi.Meridiem.AM);break;case"\xE0 minuit":s.imply("hour",0),s.imply("meridiem",Fi.Meridiem.AM);break}return s}};Bc.default=$c});var _g=b(zc=>{"use strict";Object.defineProperty(zc,"__esModule",{value:!0});var lS=Wn(),Hc=class extends lS.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)}};zc.default=Hc});var vg=b(Li=>{"use strict";var cS=Li&&Li.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Li,"__esModule",{value:!0});var dS=cS(Lr()),Vc=class extends dS.default{patternBetween(){return new RegExp("^\\s*(T|\xE0|a|vers|de|,|-)?\\s*$")}};Li.default=Vc});var wg=b(Ui=>{"use strict";var fS=Ui&&Ui.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ui,"__esModule",{value:!0});var pS=fS(kr()),Kc=class extends pS.default{patternBetween(){return/^\s*(à|a|-)\s*$/i}};Ui.default=Kc});var gn=b(be=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});be.parseTimeUnits=be.TIME_UNITS_PATTERN=be.parseYear=be.YEAR_PATTERN=be.parseOrdinalNumberPattern=be.ORDINAL_NUMBER_PATTERN=be.parseNumberPattern=be.NUMBER_PATTERN=be.TIME_UNIT_DICTIONARY=be.INTEGER_WORD_DICTIONARY=be.MONTH_DICTIONARY=be.WEEKDAY_DICTIONARY=void 0;var Qc=Se();be.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};be.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};be.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};be.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"};be.NUMBER_PATTERN=`(?:${Qc.matchAnyPattern(be.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|une?\\b|quelques?|demi-?)`;function kg(r){let e=r.toLowerCase();return be.INTEGER_WORD_DICTIONARY[e]!==void 0?be.INTEGER_WORD_DICTIONARY[e]:e==="une"||e==="un"?1:e.match(/quelques?/)?3:e.match(/demi-?/)?.5:parseFloat(e)}be.parseNumberPattern=kg;be.ORDINAL_NUMBER_PATTERN="(?:[0-9]{1,2}(?:er)?)";function mS(r){let e=r.toLowerCase();return e=e.replace(/(?:er)$/i,""),parseInt(e)}be.parseOrdinalNumberPattern=mS;be.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 hS(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}be.parseYear=hS;var Sg=`(${be.NUMBER_PATTERN})\\s{0,5}(${Qc.matchAnyPattern(be.TIME_UNIT_DICTIONARY)})\\s{0,5}`,Eg=new RegExp(Sg,"i");be.TIME_UNITS_PATTERN=Qc.repeatedTimeunitPattern("",Sg);function gS(r){let e={},t=r,n=Eg.exec(t);for(;n;)yS(e,n),t=t.substring(n[0].length),n=Eg.exec(t);return e}be.parseTimeUnits=gS;function yS(r,e){let t=kg(e[1]),n=be.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Dg=b(Zc=>{"use strict";Object.defineProperty(Zc,"__esModule",{value:!0});var Og=gn(),TS=Se(),bS=Y(),_S=Gn(),vS=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(?:ce)\\s*)?(${TS.matchAnyPattern(Og.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(dernier|prochain)\\s*)?(?=\\W|\\d|$)`,"i"),wS=1,ES=2,Xc=class extends bS.AbstractParserWithWordBoundaryChecking{innerPattern(){return vS}innerExtract(e,t){let n=t[wS].toLowerCase(),s=Og.WEEKDAY_DICTIONARY[n];if(s===void 0)return null;let i=t[ES];i=i||"",i=i.toLowerCase();let a=null;i=="dernier"?a="last":i=="prochain"&&(a="next");let o=_S.toDayJSWeekday(e.refDate,s,a);return e.createParsingComponents().assign("weekday",s).imply("day",o.date()).imply("month",o.month()+1).imply("year",o.year())}};Zc.default=Xc});var Cg=b(Jc=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});var qi=ze(),kS=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"),SS=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"),OS=2,xg=3,Rg=4,Mg=5,Ms=class{pattern(e){return kS}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=Ms.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let s=e.text.substring(t.index+t[0].length),i=SS.exec(s);return i&&(n.end=Ms.extractTimeComponent(n.start.clone(),i),n.end&&(n.text+=i[0])),n}static extractTimeComponent(e,t){let n=0,s=0,i=null;if(n=parseInt(t[OS]),t[xg]!=null&&(s=parseInt(t[xg])),s>=60||n>24)return null;if(n>=12&&(i=qi.Meridiem.PM),t[Mg]!=null){if(n>12)return null;let a=t[Mg][0].toLowerCase();a=="a"&&(i=qi.Meridiem.AM,n==12&&(n=0)),a=="p"&&(i=qi.Meridiem.PM,n!=12&&(n+=12))}if(e.assign("hour",n),e.assign("minute",s),i!==null?e.assign("meridiem",i):n<12?e.imply("meridiem",qi.Meridiem.AM):e.imply("meridiem",qi.Meridiem.PM),t[Rg]!=null){let a=parseInt(t[Rg]);if(a>=60)return null;e.assign("second",a)}return e}};Jc.default=Ms});var Lg=b(td=>{"use strict";Object.defineProperty(td,"__esModule",{value:!0});var DS=ut(),Ig=gn(),Fg=gn(),Eo=gn(),xS=Se(),RS=Y(),MS=new RegExp(`(?:on\\s*?)?(${Eo.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:au|\\-|\\\u2013|jusqu'au?|\\s)\\s*(${Eo.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:de)?\\s*)(${xS.matchAnyPattern(Ig.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${Fg.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Ag=1,Pg=2,CS=3,Ng=4,ed=class extends RS.AbstractParserWithWordBoundaryChecking{innerPattern(){return MS}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=Ig.MONTH_DICTIONARY[t[CS].toLowerCase()],i=Eo.parseOrdinalNumberPattern(t[Ag]);if(i>31)return t.index=t.index+t[Ag].length,null;if(n.start.assign("month",s),n.start.assign("day",i),t[Ng]){let a=Fg.parseYear(t[Ng]);n.start.assign("year",a)}else{let a=DS.findYearClosestToRef(e.refDate,i,s);n.start.imply("year",a)}if(t[Pg]){let a=Eo.parseOrdinalNumberPattern(t[Pg]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};td.default=ed});var qg=b(nd=>{"use strict";Object.defineProperty(nd,"__esModule",{value:!0});var Ug=gn(),AS=Le(),PS=Y(),NS=Qt(),rd=class extends PS.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`il y a\\s*(${Ug.TIME_UNITS_PATTERN})(?=(?:\\W|$))`,"i")}innerExtract(e,t){let n=Ug.parseTimeUnits(t[1]),s=NS.reverseTimeUnits(n);return AS.ParsingComponents.createRelativeFromReference(e.reference,s)}};nd.default=rd});var Yg=b(id=>{"use strict";Object.defineProperty(id,"__esModule",{value:!0});var Wg=gn(),IS=Le(),FS=Y(),sd=class extends FS.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp(`(?:dans|en|pour|pendant|de)\\s*(${Wg.TIME_UNITS_PATTERN})(?=\\W|$)`,"i")}innerExtract(e,t){let n=Wg.parseTimeUnits(t[1]);return IS.ParsingComponents.createRelativeFromReference(e.reference,n)}};id.default=sd});var Gg=b(od=>{"use strict";Object.defineProperty(od,"__esModule",{value:!0});var ko=gn(),LS=Le(),US=Y(),qS=Qt(),WS=Se(),ad=class extends US.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:les?|la|l'|du|des?)\\s*(${ko.NUMBER_PATTERN})?(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?\\s*(${WS.matchAnyPattern(ko.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]?ko.parseNumberPattern(t[1]):1,s=ko.TIME_UNIT_DICTIONARY[t[3].toLowerCase()],i={};i[s]=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))&&(i=qS.reverseTimeUnits(i)),LS.ParsingComponents.createRelativeFromReference(e.reference,i)}};od.default=ad});var Bg=b(Je=>{"use strict";var Xt=Je&&Je.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Je,"__esModule",{value:!0});Je.createConfiguration=Je.createCasualConfiguration=Je.parseDate=Je.parse=Je.strict=Je.casual=void 0;var YS=Ur(),jg=dr(),GS=Xt(Tg()),jS=Xt(bg()),$S=Xt(jn()),BS=Xt(_g()),HS=Xt(vg()),zS=Xt(wg()),VS=Xt(Dg()),KS=Xt(Cg()),QS=Xt(Lg()),XS=Xt(qg()),ZS=Xt(Yg()),JS=Xt(Gg());Je.casual=new jg.Chrono($g());Je.strict=new jg.Chrono(ud(!0));function eO(r,e,t){return Je.casual.parse(r,e,t)}Je.parse=eO;function tO(r,e,t){return Je.casual.parseDate(r,e,t)}Je.parseDate=tO;function $g(r=!0){let e=ud(!1,r);return e.parsers.unshift(new GS.default),e.parsers.unshift(new jS.default),e.parsers.unshift(new JS.default),e}Je.createCasualConfiguration=$g;function ud(r=!0,e=!0){return YS.includeCommonConfiguration({parsers:[new $S.default(e),new QS.default,new BS.default,new KS.default,new XS.default,new ZS.default,new VS.default],refiners:[new HS.default,new zS.default]},r)}Je.createConfiguration=ud});var Hg=b(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});So.toHankaku=void 0;function rO(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,nO)}So.toHankaku=rO;function nO(r){return String.fromCharCode(r.charCodeAt(0)-65248)}});var Vg=b(Wi=>{"use strict";var sO=Wi&&Wi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Wi,"__esModule",{value:!0});var ld=Hg(),iO=ut(),aO=sO(Te()),oO=/(?:(?:([同今本])|((昭和|平成|令和)?([0-90-9]{1,4}|元)))年\s*)?([0-90-9]{1,2})月\s*([0-90-9]{1,2})日/i,zg=1,uO=2,cd=3,lO=4,cO=5,dO=6,dd=class{pattern(){return oO}extract(e,t){let n=parseInt(ld.toHankaku(t[cO])),s=parseInt(ld.toHankaku(t[dO])),i=e.createParsingComponents({day:s,month:n});if(t[zg]&&t[zg].match("\u540C|\u4ECA|\u672C")){let a=aO.default(e.refDate);i.assign("year",a.year())}if(t[uO]){let a=t[lO],o=a=="\u5143"?1:parseInt(ld.toHankaku(a));t[cd]=="\u4EE4\u548C"?o+=2018:t[cd]=="\u5E73\u6210"?o+=1988:t[cd]=="\u662D\u548C"&&(o+=1925),i.assign("year",o)}else{let a=iO.findYearClosestToRef(e.refDate,s,n);i.imply("year",a)}return i}};Wi.default=dd});var Kg=b(Yi=>{"use strict";var fO=Yi&&Yi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Yi,"__esModule",{value:!0});var pO=fO(kr()),fd=class extends pO.default{patternBetween(){return/^\s*(から|ー|-)\s*$/i}};Yi.default=fd});var Xg=b(hr=>{"use strict";var mO=hr&&hr.__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]}),hO=hr&&hr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),gO=hr&&hr.__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)&&mO(e,r,t);return hO(e,r),e},yO=hr&&hr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(hr,"__esModule",{value:!0});var TO=yO(Te()),Qg=ze(),pd=gO(Wr()),bO=/今日|当日|昨日|明日|今夜|今夕|今晩|今朝/i,md=class{pattern(){return bO}extract(e,t){let n=t[0],s=TO.default(e.refDate),i=e.createParsingComponents();switch(n){case"\u6628\u65E5":return pd.yesterday(e.reference);case"\u660E\u65E5":return pd.tomorrow(e.reference);case"\u4ECA\u65E5":case"\u5F53\u65E5":return pd.today(e.reference)}return n=="\u4ECA\u591C"||n=="\u4ECA\u5915"||n=="\u4ECA\u6669"?(i.imply("hour",22),i.assign("meridiem",Qg.Meridiem.PM)):n.match("\u4ECA\u671D")&&(i.imply("hour",6),i.assign("meridiem",Qg.Meridiem.AM)),i.assign("day",s.date()),i.assign("month",s.month()+1),i.assign("year",s.year()),i}};hr.default=md});var ey=b(et=>{"use strict";var hd=et&&et.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(et,"__esModule",{value:!0});et.createConfiguration=et.createCasualConfiguration=et.parseDate=et.parse=et.strict=et.casual=void 0;var _O=hd(Vg()),vO=hd(Kg()),wO=hd(Xg()),Zg=dr();et.casual=new Zg.Chrono(Jg());et.strict=new Zg.Chrono(gd());function EO(r,e,t){return et.casual.parse(r,e,t)}et.parse=EO;function kO(r,e,t){return et.casual.parseDate(r,e,t)}et.parseDate=kO;function Jg(){let r=gd();return r.parsers.unshift(new wO.default),r}et.createCasualConfiguration=Jg;function gd(){return{parsers:[new _O.default],refiners:[new vO.default]}}et.createConfiguration=gd});var Oo=b(Or=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.parseYear=Or.YEAR_PATTERN=Or.MONTH_DICTIONARY=Or.WEEKDAY_DICTIONARY=void 0;Or.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};Or.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};Or.YEAR_PATTERN="[0-9]{1,4}(?![^\\s]\\d)(?:\\s*[a|d]\\.?\\s*c\\.?|\\s*a\\.?\\s*d\\.?)?";function SO(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)}Or.parseYear=SO});var ry=b(Td=>{"use strict";Object.defineProperty(Td,"__esModule",{value:!0});var ty=Oo(),OO=Se(),DO=Y(),xO=Gn(),RO=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(este|esta|passado|pr[o\xF3]ximo)\\s*)?(${OO.matchAnyPattern(ty.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(este|esta|passado|pr[\xF3o]ximo)\\s*semana)?(?=\\W|\\d|$)`,"i"),MO=1,CO=2,AO=3,yd=class extends DO.AbstractParserWithWordBoundaryChecking{innerPattern(){return RO}innerExtract(e,t){let n=t[CO].toLowerCase(),s=ty.WEEKDAY_DICTIONARY[n];if(s===void 0)return null;let i=t[MO],a=t[AO],o=i||a||"";o=o.toLowerCase();let u=null;o=="passado"?u="this":o=="pr\xF3ximo"||o=="proximo"?u="next":o=="este"&&(u="this");let l=xO.toDayJSWeekday(e.refDate,s,u);return e.createParsingComponents().assign("weekday",s).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Td.default=yd});var ny=b(_d=>{"use strict";Object.defineProperty(_d,"__esModule",{value:!0});var PO=Wn(),bd=class extends PO.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:ao?|\xE0s?|das|da|de|do)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|a(?:o)?|\\?)\\s*"}};_d.default=bd});var sy=b(Gi=>{"use strict";var NO=Gi&&Gi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Gi,"__esModule",{value:!0});var IO=NO(Lr()),vd=class extends IO.default{patternBetween(){return new RegExp("^\\s*(?:,|\xE0)?\\s*$")}};Gi.default=vd});var iy=b(ji=>{"use strict";var FO=ji&&ji.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ji,"__esModule",{value:!0});var LO=FO(kr()),wd=class extends LO.default{patternBetween(){return/^\s*(?:-)\s*$/i}};ji.default=wd});var dy=b(kd=>{"use strict";Object.defineProperty(kd,"__esModule",{value:!0});var UO=ut(),ly=Oo(),cy=Oo(),qO=Se(),WO=Y(),YO=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*)(${qO.matchAnyPattern(ly.MONTH_DICTIONARY)})(?:\\s*(?:de|,)?\\s*(${cy.YEAR_PATTERN}))?(?=\\W|$)`,"i"),ay=1,oy=2,GO=3,uy=4,Ed=class extends WO.AbstractParserWithWordBoundaryChecking{innerPattern(){return YO}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=ly.MONTH_DICTIONARY[t[GO].toLowerCase()],i=parseInt(t[ay]);if(i>31)return t.index=t.index+t[ay].length,null;if(n.start.assign("month",s),n.start.assign("day",i),t[uy]){let a=cy.parseYear(t[uy]);n.start.assign("year",a)}else{let a=UO.findYearClosestToRef(e.refDate,i,s);n.start.imply("year",a)}if(t[oy]){let a=parseInt(t[oy]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};kd.default=Ed});var fy=b(Yr=>{"use strict";var jO=Yr&&Yr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),$O=Yr&&Yr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),BO=Yr&&Yr.__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)&&jO(e,r,t);return $O(e,r),e};Object.defineProperty(Yr,"__esModule",{value:!0});var HO=Y(),Do=BO(Wr()),Sd=class extends HO.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(agora|hoje|amanha|amanhã|ontem)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),s=e.createParsingComponents();switch(n){case"agora":return Do.now(e.reference);case"hoje":return Do.today(e.reference);case"amanha":case"amanh\xE3":return Do.tomorrow(e.reference);case"ontem":return Do.yesterday(e.reference)}return s}};Yr.default=Sd});var py=b($i=>{"use strict";var zO=$i&&$i.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($i,"__esModule",{value:!0});var xo=ze(),VO=Y(),KO=Kt(),QO=zO(Te()),Od=class extends VO.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(?:esta\s*)?(manha|manhã|tarde|meia-noite|meio-dia|noite)(?=\W|$)/i}innerExtract(e,t){let n=QO.default(e.refDate),s=e.createParsingComponents();switch(t[1].toLowerCase()){case"tarde":s.imply("meridiem",xo.Meridiem.PM),s.imply("hour",15);break;case"noite":s.imply("meridiem",xo.Meridiem.PM),s.imply("hour",22);break;case"manha":case"manh\xE3":s.imply("meridiem",xo.Meridiem.AM),s.imply("hour",6);break;case"meia-noite":KO.assignTheNextDay(s,n),s.imply("hour",0),s.imply("minute",0),s.imply("second",0);break;case"meio-dia":s.imply("meridiem",xo.Meridiem.AM),s.imply("hour",12);break}return s}};$i.default=Od});var gy=b(tt=>{"use strict";var yn=tt&&tt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(tt,"__esModule",{value:!0});tt.createConfiguration=tt.createCasualConfiguration=tt.parseDate=tt.parse=tt.strict=tt.casual=void 0;var XO=Ur(),my=dr(),ZO=yn(jn()),JO=yn(ry()),eD=yn(ny()),tD=yn(sy()),rD=yn(iy()),nD=yn(dy()),sD=yn(fy()),iD=yn(py());tt.casual=new my.Chrono(hy());tt.strict=new my.Chrono(Dd(!0));function aD(r,e,t){return tt.casual.parse(r,e,t)}tt.parse=aD;function oD(r,e,t){return tt.casual.parseDate(r,e,t)}tt.parseDate=oD;function hy(r=!0){let e=Dd(!1,r);return e.parsers.push(new sD.default),e.parsers.push(new iD.default),e}tt.createCasualConfiguration=hy;function Dd(r=!0,e=!0){return XO.includeCommonConfiguration({parsers:[new ZO.default(e),new JO.default,new eD.default,new nD.default],refiners:[new tD.default,new rD.default]},r)}tt.createConfiguration=Dd});var yy=b(Bi=>{"use strict";var uD=Bi&&Bi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Bi,"__esModule",{value:!0});var lD=uD(kr()),xd=class extends lD.default{patternBetween(){return/^\s*(tot|-)\s*$/i}};Bi.default=xd});var Ty=b(Hi=>{"use strict";var cD=Hi&&Hi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Hi,"__esModule",{value:!0});var dD=cD(Lr()),Rd=class extends dD.default{patternBetween(){return new RegExp("^\\s*(om|na|voor|in de|,|-)?\\s*$")}};Hi.default=Rd});var by=b(Gr=>{"use strict";var fD=Gr&&Gr.__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]}),pD=Gr&&Gr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),mD=Gr&&Gr.__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)&&fD(e,r,t);return pD(e,r),e};Object.defineProperty(Gr,"__esModule",{value:!0});var hD=Y(),Ro=mD(Wr()),Md=class extends hD.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(nu|vandaag|morgen|morgend|gisteren)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),s=e.createParsingComponents();switch(n){case"nu":return Ro.now(e.reference);case"vandaag":return Ro.today(e.reference);case"morgen":case"morgend":return Ro.tomorrow(e.reference);case"gisteren":return Ro.yesterday(e.reference)}return s}};Gr.default=Md});var _y=b(zi=>{"use strict";var gD=zi&&zi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(zi,"__esModule",{value:!0});var Mo=ze(),yD=Y(),TD=gD(Te()),bD=Kt(),_D=1,vD=2,Cd=class extends yD.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(deze)?\s*(namiddag|avond|middernacht|ochtend|middag|'s middags|'s avonds|'s ochtends)(?=\W|$)/i}innerExtract(e,t){let n=TD.default(e.refDate),s=e.createParsingComponents();switch(t[_D]==="deze"&&(s.assign("day",e.refDate.getDate()),s.assign("month",e.refDate.getMonth()+1),s.assign("year",e.refDate.getFullYear())),t[vD].toLowerCase()){case"namiddag":case"'s namiddags":s.imply("meridiem",Mo.Meridiem.PM),s.imply("hour",15);break;case"avond":case"'s avonds'":s.imply("meridiem",Mo.Meridiem.PM),s.imply("hour",20);break;case"middernacht":bD.assignTheNextDay(s,n),s.imply("hour",0),s.imply("minute",0),s.imply("second",0);break;case"ochtend":case"'s ochtends":s.imply("meridiem",Mo.Meridiem.AM),s.imply("hour",6);break;case"middag":case"'s middags":s.imply("meridiem",Mo.Meridiem.AM),s.imply("hour",12);break}return s}};zi.default=Cd});var Lt=b(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});de.parseTimeUnits=de.TIME_UNITS_PATTERN=de.parseYear=de.YEAR_PATTERN=de.parseOrdinalNumberPattern=de.ORDINAL_NUMBER_PATTERN=de.parseNumberPattern=de.NUMBER_PATTERN=de.TIME_UNIT_DICTIONARY=de.ORDINAL_WORD_DICTIONARY=de.INTEGER_WORD_DICTIONARY=de.MONTH_DICTIONARY=de.WEEKDAY_DICTIONARY=void 0;var Co=Se(),wD=ut();de.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};de.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};de.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};de.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};de.TIME_UNIT_DICTIONARY={sec:"second",second:"second",seconden:"second",min:"minute",mins:"minute",minute:"minute",minuut:"minute",minuten:"minute",minuutje:"minute",h:"hour",hr:"hour",hrs:"hour",uur:"hour",u:"hour",uren:"hour",dag:"d",dagen:"d",week:"week",weken:"week",maand:"month",maanden:"month",jaar:"year",jr:"year",jaren:"year"};de.NUMBER_PATTERN=`(?:${Co.matchAnyPattern(de.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+[\\.,][0-9]+|halve?|half|paar)`;function wy(r){let e=r.toLowerCase();return de.INTEGER_WORD_DICTIONARY[e]!==void 0?de.INTEGER_WORD_DICTIONARY[e]:e==="paar"?2:e==="half"||e.match(/halve?/)?.5:parseFloat(e.replace(",","."))}de.parseNumberPattern=wy;de.ORDINAL_NUMBER_PATTERN=`(?:${Co.matchAnyPattern(de.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:ste|de)?)`;function ED(r){let e=r.toLowerCase();return de.ORDINAL_WORD_DICTIONARY[e]!==void 0?de.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:ste|de)$/i,""),parseInt(e))}de.parseOrdinalNumberPattern=ED;de.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:voor Christus|na Christus)|[1-2][0-9]{3}|[5-9][0-9])";function kD(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 wD.findMostLikelyADYear(e)}de.parseYear=kD;var Ey=`(${de.NUMBER_PATTERN})\\s{0,5}(${Co.matchAnyPattern(de.TIME_UNIT_DICTIONARY)})\\s{0,5}`,vy=new RegExp(Ey,"i");de.TIME_UNITS_PATTERN=Co.repeatedTimeunitPattern("(?:(?:binnen|in)\\s*)?",Ey);function SD(r){let e={},t=r,n=vy.exec(t);for(;n;)OD(e,n),t=t.substring(n[0].length),n=vy.exec(t);return e}de.parseTimeUnits=SD;function OD(r,e){let t=wy(e[1]),n=de.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Sy=b(Pd=>{"use strict";Object.defineProperty(Pd,"__esModule",{value:!0});var ky=Lt(),DD=Le(),xD=Y(),Ad=class extends xD.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(?:binnen|in|binnen de|voor)\\s*("+ky.TIME_UNITS_PATTERN+")(?=\\W|$)","i")}innerExtract(e,t){let n=ky.parseTimeUnits(t[1]);return DD.ParsingComponents.createRelativeFromReference(e.reference,n)}};Pd.default=Ad});var Dy=b(Id=>{"use strict";Object.defineProperty(Id,"__esModule",{value:!0});var Oy=Lt(),RD=Se(),MD=Y(),CD=Gn(),AD=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:op\\s*?)?(?:(deze|vorige|volgende)\\s*(?:week\\s*)?)?(${RD.matchAnyPattern(Oy.WEEKDAY_DICTIONARY)})(?=\\W|$)`,"i"),PD=1,ND=2,ID=3,Nd=class extends MD.AbstractParserWithWordBoundaryChecking{innerPattern(){return AD}innerExtract(e,t){let n=t[ND].toLowerCase(),s=Oy.WEEKDAY_DICTIONARY[n],i=t[PD],a=t[ID],o=i||a;o=o||"",o=o.toLowerCase();let u=null;o=="vorige"?u="last":o=="volgende"?u="next":o=="deze"&&(u="this");let l=CD.toDayJSWeekday(e.refDate,s,u);return e.createParsingComponents().assign("weekday",s).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Id.default=Nd});var Py=b(Ld=>{"use strict";Object.defineProperty(Ld,"__esModule",{value:!0});var FD=ut(),Cy=Lt(),Ao=Lt(),Ay=Lt(),LD=Se(),UD=Y(),qD=new RegExp(`(?:on\\s*?)?(${Ao.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:tot|\\-|\\\u2013|until|through|till|\\s)\\s*(${Ao.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:of)?\\s*)(`+LD.matchAnyPattern(Cy.MONTH_DICTIONARY)+`)(?:(?:-|/|,?\\s*)(${Ay.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),WD=3,xy=1,Ry=2,My=4,Fd=class extends UD.AbstractParserWithWordBoundaryChecking{innerPattern(){return qD}innerExtract(e,t){let n=Cy.MONTH_DICTIONARY[t[WD].toLowerCase()],s=Ao.parseOrdinalNumberPattern(t[xy]);if(s>31)return t.index=t.index+t[xy].length,null;let i=e.createParsingComponents({day:s,month:n});if(t[My]){let u=Ay.parseYear(t[My]);i.assign("year",u)}else{let u=FD.findYearClosestToRef(e.refDate,s,n);i.imply("year",u)}if(!t[Ry])return i;let a=Ao.parseOrdinalNumberPattern(t[Ry]),o=e.createParsingResult(t.index,t[0]);return o.start=i,o.end=i.clone(),o.end.assign("day",a),o}};Ld.default=Fd});var Ly=b(qd=>{"use strict";Object.defineProperty(qd,"__esModule",{value:!0});var Iy=Lt(),YD=ut(),GD=Se(),Fy=Lt(),jD=Y(),$D=new RegExp(`(${GD.matchAnyPattern(Iy.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${Fy.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),BD=1,Ny=2,Ud=class extends jD.AbstractParserWithWordBoundaryChecking{innerPattern(){return $D}innerExtract(e,t){let n=e.createParsingComponents();n.imply("day",1);let s=t[BD],i=Iy.MONTH_DICTIONARY[s.toLowerCase()];if(n.assign("month",i),t[Ny]){let a=Fy.parseYear(t[Ny]);n.assign("year",a)}else{let a=YD.findYearClosestToRef(e.refDate,1,i);n.imply("year",a)}return n}};qd.default=Ud});var Uy=b(Yd=>{"use strict";Object.defineProperty(Yd,"__esModule",{value:!0});var HD=Y(),zD=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),VD=1,KD=2,Wd=class extends HD.AbstractParserWithWordBoundaryChecking{innerPattern(){return zD}innerExtract(e,t){let n=parseInt(t[KD]),s=parseInt(t[VD]);return e.createParsingComponents().imply("day",1).assign("month",s).assign("year",n)}};Yd.default=Wd});var qy=b(jd=>{"use strict";Object.defineProperty(jd,"__esModule",{value:!0});var QD=Wn(),Gd=class extends QD.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:om)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|om|\\?)\\s*"}primarySuffix(){return"(?:\\s*(?:uur))?(?!/)(?=\\W|$)"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}};jd.default=Gd});var Gy=b(Bd=>{"use strict";Object.defineProperty(Bd,"__esModule",{value:!0});var Yy=Lt(),XD=Se(),ZD=Y(),JD=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${XD.matchAnyPattern(Yy.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),e0=1,t0=2,Wy=3,r0=4,$d=class extends ZD.AbstractParserWithWordBoundaryChecking{innerPattern(){return JD}innerExtract(e,t){let n=t[Wy]?parseInt(t[Wy]):Yy.MONTH_DICTIONARY[t[t0].toLowerCase()];if(n<1||n>12)return null;let s=parseInt(t[e0]);return{day:parseInt(t[r0]),month:n,year:s}}};Bd.default=$d});var jy=b(Vi=>{"use strict";var n0=Vi&&Vi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Vi,"__esModule",{value:!0});var s0=Y(),Po=ze(),Hd=Kt(),i0=n0(Te()),a0=1,o0=2,zd=class extends s0.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(gisteren|morgen|van)(ochtend|middag|namiddag|avond|nacht)(?=\W|$)/i}innerExtract(e,t){let n=t[a0].toLowerCase(),s=t[o0].toLowerCase(),i=e.createParsingComponents(),a=i0.default(e.refDate);switch(n){case"gisteren":Hd.assignSimilarDate(i,a.add(-1,"day"));break;case"van":Hd.assignSimilarDate(i,a);break;case"morgen":Hd.assignTheNextDay(i,a);break}switch(s){case"ochtend":i.imply("meridiem",Po.Meridiem.AM),i.imply("hour",6);break;case"middag":i.imply("meridiem",Po.Meridiem.AM),i.imply("hour",12);break;case"namiddag":i.imply("meridiem",Po.Meridiem.PM),i.imply("hour",15);break;case"avond":i.imply("meridiem",Po.Meridiem.PM),i.imply("hour",20);break}return i}};Vi.default=zd});var By=b(Kd=>{"use strict";Object.defineProperty(Kd,"__esModule",{value:!0});var $y=Lt(),u0=Le(),l0=Y(),c0=Qt(),d0=new RegExp(`(deze|vorige|afgelopen|komende|over|\\+|-)\\s*(${$y.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Vd=class extends l0.AbstractParserWithWordBoundaryChecking{innerPattern(){return d0}innerExtract(e,t){let n=t[1].toLowerCase(),s=$y.parseTimeUnits(t[2]);switch(n){case"vorige":case"afgelopen":case"-":s=c0.reverseTimeUnits(s);break}return u0.ParsingComponents.createRelativeFromReference(e.reference,s)}};Kd.default=Vd});var Vy=b(Ki=>{"use strict";var f0=Ki&&Ki.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ki,"__esModule",{value:!0});var zy=Lt(),Hy=Le(),p0=f0(Te()),m0=Y(),h0=Se(),g0=new RegExp(`(dit|deze|komende|volgend|volgende|afgelopen|vorige)\\s*(${h0.matchAnyPattern(zy.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),y0=1,T0=2,Qd=class extends m0.AbstractParserWithWordBoundaryChecking{innerPattern(){return g0}innerExtract(e,t){let n=t[y0].toLowerCase(),s=t[T0].toLowerCase(),i=zy.TIME_UNIT_DICTIONARY[s];if(n=="volgend"||n=="volgende"||n=="komende"){let u={};return u[i]=1,Hy.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="afgelopen"||n=="vorige"){let u={};return u[i]=-1,Hy.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=p0.default(e.reference.instant);return s.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):s.match(/maand/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):s.match(/jaar/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};Ki.default=Qd});var Ky=b(Jd=>{"use strict";Object.defineProperty(Jd,"__esModule",{value:!0});var Zd=Lt(),b0=Le(),_0=Y(),v0=Qt(),w0=new RegExp("("+Zd.TIME_UNITS_PATTERN+")(?:geleden|voor|eerder)(?=(?:\\W|$))","i"),E0=new RegExp("("+Zd.TIME_UNITS_PATTERN+")geleden(?=(?:\\W|$))","i"),Xd=class extends _0.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?E0:w0}innerExtract(e,t){let n=Zd.parseTimeUnits(t[1]),s=v0.reverseTimeUnits(n);return b0.ParsingComponents.createRelativeFromReference(e.reference,s)}};Jd.default=Xd});var Qy=b(rf=>{"use strict";Object.defineProperty(rf,"__esModule",{value:!0});var tf=Lt(),k0=Le(),S0=Y(),O0=new RegExp("("+tf.TIME_UNITS_PATTERN+")(later|na|vanaf nu|voortaan|vooruit|uit)(?=(?:\\W|$))","i"),D0=new RegExp("("+tf.TIME_UNITS_PATTERN+")(later|vanaf nu)(?=(?:\\W|$))","i"),x0=1,ef=class extends S0.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?D0:O0}innerExtract(e,t){let n=tf.parseTimeUnits(t[x0]);return k0.ParsingComponents.createRelativeFromReference(e.reference,n)}};rf.default=ef});var eT=b(rt=>{"use strict";var ct=rt&&rt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(rt,"__esModule",{value:!0});rt.createConfiguration=rt.createCasualConfiguration=rt.parseDate=rt.parse=rt.strict=rt.casual=void 0;var R0=Ur(),Xy=dr(),M0=ct(yy()),C0=ct(Ty()),A0=ct(by()),P0=ct(_y()),N0=ct(jn()),I0=ct(Sy()),F0=ct(Dy()),L0=ct(Py()),Zy=ct(Ly()),U0=ct(Uy()),q0=ct(qy()),W0=ct(Gy()),Y0=ct(jy()),G0=ct(By()),j0=ct(Vy()),$0=ct(Ky()),B0=ct(Qy());rt.casual=new Xy.Chrono(Jy());rt.strict=new Xy.Chrono(nf(!0));function H0(r,e,t){return rt.casual.parse(r,e,t)}rt.parse=H0;function z0(r,e,t){return rt.casual.parseDate(r,e,t)}rt.parseDate=z0;function Jy(r=!0){let e=nf(!1,r);return e.parsers.unshift(new A0.default),e.parsers.unshift(new P0.default),e.parsers.unshift(new Y0.default),e.parsers.unshift(new Zy.default),e.parsers.unshift(new j0.default),e.parsers.unshift(new G0.default),e}rt.createCasualConfiguration=Jy;function nf(r=!0,e=!0){return R0.includeCommonConfiguration({parsers:[new N0.default(e),new I0.default,new L0.default,new Zy.default,new F0.default,new W0.default,new U0.default,new q0.default(r),new $0.default(r),new B0.default(r)],refiners:[new C0.default,new M0.default]},r)}rt.createConfiguration=nf});var sT=b(Qi=>{"use strict";var V0=Qi&&Qi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Qi,"__esModule",{value:!0});var K0=V0(Te()),Q0=Y(),X0=1,tT=2,Z0=3,rT=4,nT=5,J0=6,sf=class extends Q0.AbstractParserWithWordBoundaryChecking{innerPattern(e){return new RegExp("(\u800C\u5BB6|\u7ACB(?:\u523B|\u5373)|\u5373\u523B)|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s|,|\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?","i")}innerExtract(e,t){let n=t.index,s=e.createParsingResult(n,t[0]),i=K0.default(e.refDate),a=i;if(t[X0])s.start.imply("hour",i.hour()),s.start.imply("minute",i.minute()),s.start.imply("second",i.second()),s.start.imply("millisecond",i.millisecond());else if(t[tT]){let o=t[tT],u=t[Z0];o=="\u660E"||o=="\u807D"?i.hour()>1&&(a=a.add(1,"day")):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u5F8C"?a=a.add(2,"day"):o=="\u5927\u5F8C"&&(a=a.add(3,"day")),u=="\u65E9"||u=="\u671D"?s.start.imply("hour",6):u=="\u665A"&&(s.start.imply("hour",22),s.start.imply("meridiem",1))}else if(t[rT]){let u=t[rT][0];u=="\u65E9"||u=="\u671D"||u=="\u4E0A"?s.start.imply("hour",6):u=="\u4E0B"||u=="\u664F"?(s.start.imply("hour",15),s.start.imply("meridiem",1)):u=="\u4E2D"?(s.start.imply("hour",12),s.start.imply("meridiem",1)):u=="\u591C"||u=="\u665A"?(s.start.imply("hour",22),s.start.imply("meridiem",1)):u=="\u51CC"&&s.start.imply("hour",0)}else if(t[nT]){let o=t[nT];o=="\u660E"||o=="\u807D"?i.hour()>1&&(a=a.add(1,"day")):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u5F8C"?a=a.add(2,"day"):o=="\u5927\u5F8C"&&(a=a.add(3,"day"));let u=t[J0];if(u){let l=u[0];l=="\u65E9"||l=="\u671D"||l=="\u4E0A"?s.start.imply("hour",6):l=="\u4E0B"||l=="\u664F"?(s.start.imply("hour",15),s.start.imply("meridiem",1)):l=="\u4E2D"?(s.start.imply("hour",12),s.start.imply("meridiem",1)):l=="\u591C"||l=="\u665A"?(s.start.imply("hour",22),s.start.imply("meridiem",1)):l=="\u51CC"&&s.start.imply("hour",0)}}return s.start.assign("day",a.date()),s.start.assign("month",a.month()+1),s.start.assign("year",a.year()),s}};Qi.default=sf});var Cs=b(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.zhStringToYear=At.zhStringToNumber=At.WEEKDAY_OFFSET=At.NUMBER=void 0;At.NUMBER={\u96F6:0,\u4E00:1,\u4E8C:2,\u5169:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6,\u4E03:7,\u516B:8,\u4E5D:9,\u5341:10,\u5EFF:20,\u5345:30};At.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function ex(r){let e=0;for(let t=0;t{"use strict";var rx=Xi&&Xi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Xi,"__esModule",{value:!0});var nx=rx(Te()),sx=Y(),Hn=Cs(),af=1,iT=2,of=3,uf=class extends sx.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(Hn.NUMBER).join("")+"]{4}|["+Object.keys(Hn.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(Hn.NUMBER).join("")+"]{1,2})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(Hn.NUMBER).join("")+"]{1,2})?(?:\\s*)(?:\u65E5|\u865F)?")}innerExtract(e,t){let n=nx.default(e.refDate),s=e.createParsingResult(t.index,t[0]),i=parseInt(t[iT]);if(isNaN(i)&&(i=Hn.zhStringToNumber(t[iT])),s.start.assign("month",i),t[of]){let a=parseInt(t[of]);isNaN(a)&&(a=Hn.zhStringToNumber(t[of])),s.start.assign("day",a)}else s.start.imply("day",n.date());if(t[af]){let a=parseInt(t[af]);isNaN(a)&&(a=Hn.zhStringToYear(t[af])),s.start.assign("year",a)}else s.start.imply("year",n.year());return s}};Xi.default=uf});var uT=b(Zi=>{"use strict";var ix=Zi&&Zi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Zi,"__esModule",{value:!0});var ax=ix(Te()),ox=Y(),oT=Cs(),ux=new RegExp("(\\d+|["+Object.keys(oT.NUMBER).join("")+"]+|\u534A|\u5E7E)(?:\\s*)(?:\u500B)?(\u79D2(?:\u9418)?|\u5206\u9418|\u5C0F\u6642|\u9418|\u65E5|\u5929|\u661F\u671F|\u79AE\u62DC|\u6708|\u5E74)(?:(?:\u4E4B|\u904E)?\u5F8C|(?:\u4E4B)?\u5167)","i"),lf=1,lx=2,cf=class extends ox.AbstractParserWithWordBoundaryChecking{innerPattern(){return ux}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=parseInt(t[lf]);if(isNaN(s)&&(s=oT.zhStringToNumber(t[lf])),isNaN(s)){let u=t[lf];if(u==="\u5E7E")s=3;else if(u==="\u534A")s=.5;else return null}let i=ax.default(e.refDate),o=t[lx][0];return o.match(/[日天星禮月年]/)?(o=="\u65E5"||o=="\u5929"?i=i.add(s,"d"):o=="\u661F"||o=="\u79AE"?i=i.add(s*7,"d"):o=="\u6708"?i=i.add(s,"month"):o=="\u5E74"&&(i=i.add(s,"year")),n.start.assign("year",i.year()),n.start.assign("month",i.month()+1),n.start.assign("day",i.date()),n):(o=="\u79D2"?i=i.add(s,"second"):o=="\u5206"?i=i.add(s,"minute"):(o=="\u5C0F"||o=="\u9418")&&(i=i.add(s,"hour")),n.start.imply("year",i.year()),n.start.imply("month",i.month()+1),n.start.imply("day",i.date()),n.start.assign("hour",i.hour()),n.start.assign("minute",i.minute()),n.start.assign("second",i.second()),n)}};Zi.default=cf});var cT=b(Ji=>{"use strict";var cx=Ji&&Ji.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ji,"__esModule",{value:!0});var dx=cx(Te()),fx=Y(),lT=Cs(),px=new RegExp("(?\u4E0A|\u4ECA|\u4E0B|\u9019|\u5462)(?:\u500B)?(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?"+Object.keys(lT.WEEKDAY_OFFSET).join("|")+")"),df=class extends fx.AbstractParserWithWordBoundaryChecking{innerPattern(){return px}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=t.groups.weekday,i=lT.WEEKDAY_OFFSET[s];if(i===void 0)return null;let a=null,o=t.groups.prefix;o=="\u4E0A"?a="last":o=="\u4E0B"?a="next":(o=="\u4ECA"||o=="\u9019"||o=="\u5462")&&(a="this");let u=dx.default(e.refDate),l=!1,c=u.day();return a=="last"||a=="past"?(u=u.day(i-7),l=!0):a=="next"?(u=u.day(i+7),l=!0):a=="this"?u=u.day(i):Math.abs(i-7-c){"use strict";var mx=ea&&ea.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ea,"__esModule",{value:!0});var hx=mx(Te()),gx=Y(),Jt=Cs(),yx=new RegExp("(?:\u7531|\u5F9E|\u81EA)?(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(Jt.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Jt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Jt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),Tx=new RegExp("(?:^\\s*(?:\u5230|\u81F3|\\-|\\\u2013|\\~|\\\u301C)\\s*)(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(Jt.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Jt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Jt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),No=1,Io=2,Fo=3,Lo=4,Uo=5,qo=6,Zt=7,As=8,Wo=9,ff=class extends gx.AbstractParserWithWordBoundaryChecking{innerPattern(){return yx}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=hx.default(e.refDate),s=e.createParsingResult(t.index,t[0]),i=n.clone();if(t[No]){var a=t[No];a=="\u660E"||a=="\u807D"?n.hour()>1&&i.add(1,"day"):a=="\u6628"||a=="\u5C0B"||a=="\u7434"?i.add(-1,"day"):a=="\u524D"?i.add(-2,"day"):a=="\u5927\u524D"?i.add(-3,"day"):a=="\u5F8C"?i.add(2,"day"):a=="\u5927\u5F8C"&&i.add(3,"day"),s.start.assign("day",i.date()),s.start.assign("month",i.month()+1),s.start.assign("year",i.year())}else if(t[Lo]){var o=t[Lo];o=="\u660E"||o=="\u807D"?i.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?i.add(-1,"day"):o=="\u524D"?i.add(-2,"day"):o=="\u5927\u524D"?i.add(-3,"day"):o=="\u5F8C"?i.add(2,"day"):o=="\u5927\u5F8C"&&i.add(3,"day"),s.start.assign("day",i.date()),s.start.assign("month",i.month()+1),s.start.assign("year",i.year())}else s.start.imply("day",i.date()),s.start.imply("month",i.month()+1),s.start.imply("year",i.year());let u=0,l=0,c=-1;if(t[As]){var f=parseInt(t[As]);if(isNaN(f)&&(f=Jt.zhStringToNumber(t[As])),f>=60)return null;s.start.assign("second",f)}if(u=parseInt(t[qo]),isNaN(u)&&(u=Jt.zhStringToNumber(t[qo])),t[Zt]?t[Zt]=="\u534A"?l=30:t[Zt]=="\u6B63"||t[Zt]=="\u6574"?l=0:(l=parseInt(t[Zt]),isNaN(l)&&(l=Jt.zhStringToNumber(t[Zt]))):u>100&&(l=u%100,u=Math.floor(u/100)),l>=60||u>24)return null;if(u>=12&&(c=1),t[Wo]){if(u>12)return null;var m=t[Wo][0].toLowerCase();m=="a"&&(c=0,u==12&&(u=0)),m=="p"&&(c=1,u!=12&&(u+=12))}else if(t[Io]){var y=t[Io],k=y[0];k=="\u671D"||k=="\u65E9"?(c=0,u==12&&(u=0)):k=="\u665A"&&(c=1,u!=12&&(u+=12))}else if(t[Fo]){var E=t[Fo],x=E[0];x=="\u4E0A"||x=="\u671D"||x=="\u65E9"||x=="\u51CC"?(c=0,u==12&&(u=0)):(x=="\u4E0B"||x=="\u664F"||x=="\u665A")&&(c=1,u!=12&&(u+=12))}else if(t[Uo]){var v=t[Uo],I=v[0];I=="\u4E0A"||I=="\u671D"||I=="\u65E9"||I=="\u51CC"?(c=0,u==12&&(u=0)):(I=="\u4E0B"||I=="\u664F"||I=="\u665A")&&(c=1,u!=12&&(u+=12))}if(s.start.assign("hour",u),s.start.assign("minute",l),c>=0?s.start.assign("meridiem",c):u<12?s.start.imply("meridiem",0):s.start.imply("meridiem",1),t=Tx.exec(e.text.substring(s.index+s.text.length)),!t)return s.text.match(/^\d+$/)?null:s;let F=i.clone();if(s.end=e.createParsingComponents(),t[No]){var a=t[No];a=="\u660E"||a=="\u807D"?n.hour()>1&&F.add(1,"day"):a=="\u6628"||a=="\u5C0B"||a=="\u7434"?F.add(-1,"day"):a=="\u524D"?F.add(-2,"day"):a=="\u5927\u524D"?F.add(-3,"day"):a=="\u5F8C"?F.add(2,"day"):a=="\u5927\u5F8C"&&F.add(3,"day"),s.end.assign("day",F.date()),s.end.assign("month",F.month()+1),s.end.assign("year",F.year())}else if(t[Lo]){var o=t[Lo];o=="\u660E"||o=="\u807D"?F.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?F.add(-1,"day"):o=="\u524D"?F.add(-2,"day"):o=="\u5927\u524D"?F.add(-3,"day"):o=="\u5F8C"?F.add(2,"day"):o=="\u5927\u5F8C"&&F.add(3,"day"),s.end.assign("day",F.date()),s.end.assign("month",F.month()+1),s.end.assign("year",F.year())}else s.end.imply("day",F.date()),s.end.imply("month",F.month()+1),s.end.imply("year",F.year());if(u=0,l=0,c=-1,t[As]){var f=parseInt(t[As]);if(isNaN(f)&&(f=Jt.zhStringToNumber(t[As])),f>=60)return null;s.end.assign("second",f)}if(u=parseInt(t[qo]),isNaN(u)&&(u=Jt.zhStringToNumber(t[qo])),t[Zt]?t[Zt]=="\u534A"?l=30:t[Zt]=="\u6B63"||t[Zt]=="\u6574"?l=0:(l=parseInt(t[Zt]),isNaN(l)&&(l=Jt.zhStringToNumber(t[Zt]))):u>100&&(l=u%100,u=Math.floor(u/100)),l>=60||u>24)return null;if(u>=12&&(c=1),t[Wo]){if(u>12)return null;var m=t[Wo][0].toLowerCase();m=="a"&&(c=0,u==12&&(u=0)),m=="p"&&(c=1,u!=12&&(u+=12)),s.start.isCertain("meridiem")||(c==0?(s.start.imply("meridiem",0),s.start.get("hour")==12&&s.start.assign("hour",0)):(s.start.imply("meridiem",1),s.start.get("hour")!=12&&s.start.assign("hour",s.start.get("hour")+12)))}else if(t[Io]){var y=t[Io],k=y[0];k=="\u671D"||k=="\u65E9"?(c=0,u==12&&(u=0)):k=="\u665A"&&(c=1,u!=12&&(u+=12))}else if(t[Fo]){var E=t[Fo],x=E[0];x=="\u4E0A"||x=="\u671D"||x=="\u65E9"||x=="\u51CC"?(c=0,u==12&&(u=0)):(x=="\u4E0B"||x=="\u664F"||x=="\u665A")&&(c=1,u!=12&&(u+=12))}else if(t[Uo]){var v=t[Uo],I=v[0];I=="\u4E0A"||I=="\u671D"||I=="\u65E9"||I=="\u51CC"?(c=0,u==12&&(u=0)):(I=="\u4E0B"||I=="\u664F"||I=="\u665A")&&(c=1,u!=12&&(u+=12))}return s.text=s.text+t[0],s.end.assign("hour",u),s.end.assign("minute",l),c>=0?s.end.assign("meridiem",c):s.start.isCertain("meridiem")&&s.start.get("meridiem")==1&&s.start.get("hour")>u?s.end.imply("meridiem",0):u>12&&s.end.imply("meridiem",1),s.end.date().getTime(){"use strict";var bx=ta&&ta.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ta,"__esModule",{value:!0});var _x=bx(Te()),vx=Y(),fT=Cs(),wx=new RegExp("(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?"+Object.keys(fT.WEEKDAY_OFFSET).join("|")+")"),pf=class extends vx.AbstractParserWithWordBoundaryChecking{innerPattern(){return wx}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=t.groups.weekday,i=fT.WEEKDAY_OFFSET[s];if(i===void 0)return null;let a=_x.default(e.refDate),o=!1,u=a.day();return Math.abs(i-7-u){"use strict";var Ex=ra&&ra.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ra,"__esModule",{value:!0});var kx=Ex(kr()),mf=class extends kx.default{patternBetween(){return/^\s*(至|到|\-|\~|~|-|ー)\s*$/i}};ra.default=mf});var hT=b(na=>{"use strict";var Sx=na&&na.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(na,"__esModule",{value:!0});var Ox=Sx(Lr()),hf=class extends Ox.default{patternBetween(){return/^\s*$/i}};na.default=hf});var gT=b(je=>{"use strict";var jr=je&&je.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(je,"__esModule",{value:!0});je.createConfiguration=je.createCasualConfiguration=je.parseDate=je.parse=je.strict=je.casual=je.hant=void 0;var gf=dr(),Dx=jr(go()),xx=Ur(),Rx=jr(sT()),Mx=jr(aT()),Cx=jr(uT()),Ax=jr(cT()),Px=jr(dT()),Nx=jr(pT()),Ix=jr(mT()),Fx=jr(hT());je.hant=new gf.Chrono(yf());je.casual=new gf.Chrono(yf());je.strict=new gf.Chrono(Tf());function Lx(r,e,t){return je.casual.parse(r,e,t)}je.parse=Lx;function Ux(r,e,t){return je.casual.parseDate(r,e,t)}je.parseDate=Ux;function yf(){let r=Tf();return r.parsers.unshift(new Rx.default),r}je.createCasualConfiguration=yf;function Tf(){let r=xx.includeCommonConfiguration({parsers:[new Mx.default,new Ax.default,new Nx.default,new Px.default,new Cx.default],refiners:[new Ix.default,new Fx.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof Dx.default)),r}je.createConfiguration=Tf});var _T=b(sa=>{"use strict";var qx=sa&&sa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(sa,"__esModule",{value:!0});var Wx=qx(Te()),Yx=Y(),Gx=1,yT=2,jx=3,TT=4,bT=5,$x=6,bf=class extends Yx.AbstractParserWithWordBoundaryChecking{innerPattern(e){return new RegExp("(\u73B0\u5728|\u7ACB(?:\u523B|\u5373)|\u5373\u523B)|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s|,|\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?","i")}innerExtract(e,t){let n=t.index,s=e.createParsingResult(n,t[0]),i=Wx.default(e.refDate),a=i;if(t[Gx])s.start.imply("hour",i.hour()),s.start.imply("minute",i.minute()),s.start.imply("second",i.second()),s.start.imply("millisecond",i.millisecond());else if(t[yT]){let o=t[yT],u=t[jx];o=="\u660E"?i.hour()>1&&(a=a.add(1,"day")):o=="\u6628"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u540E"?a=a.add(2,"day"):o=="\u5927\u540E"&&(a=a.add(3,"day")),u=="\u65E9"?s.start.imply("hour",6):u=="\u665A"&&(s.start.imply("hour",22),s.start.imply("meridiem",1))}else if(t[TT]){let u=t[TT][0];u=="\u65E9"||u=="\u4E0A"?s.start.imply("hour",6):u=="\u4E0B"?(s.start.imply("hour",15),s.start.imply("meridiem",1)):u=="\u4E2D"?(s.start.imply("hour",12),s.start.imply("meridiem",1)):u=="\u591C"||u=="\u665A"?(s.start.imply("hour",22),s.start.imply("meridiem",1)):u=="\u51CC"&&s.start.imply("hour",0)}else if(t[bT]){let o=t[bT];o=="\u660E"?i.hour()>1&&(a=a.add(1,"day")):o=="\u6628"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u540E"?a=a.add(2,"day"):o=="\u5927\u540E"&&(a=a.add(3,"day"));let u=t[$x];if(u){let l=u[0];l=="\u65E9"||l=="\u4E0A"?s.start.imply("hour",6):l=="\u4E0B"?(s.start.imply("hour",15),s.start.imply("meridiem",1)):l=="\u4E2D"?(s.start.imply("hour",12),s.start.imply("meridiem",1)):l=="\u591C"||l=="\u665A"?(s.start.imply("hour",22),s.start.imply("meridiem",1)):l=="\u51CC"&&s.start.imply("hour",0)}}return s.start.assign("day",a.date()),s.start.assign("month",a.month()+1),s.start.assign("year",a.year()),s}};sa.default=bf});var Ps=b(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.zhStringToYear=Pt.zhStringToNumber=Pt.WEEKDAY_OFFSET=Pt.NUMBER=void 0;Pt.NUMBER={\u96F6:0,"\u3007":0,\u4E00:1,\u4E8C:2,\u4E24:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6,\u4E03:7,\u516B:8,\u4E5D:9,\u5341:10};Pt.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function Bx(r){let e=0;for(let t=0;t{"use strict";var zx=ia&&ia.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ia,"__esModule",{value:!0});var Vx=zx(Te()),Kx=Y(),zn=Ps(),_f=1,vT=2,vf=3,wf=class extends Kx.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(zn.NUMBER).join("")+"]{4}|["+Object.keys(zn.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(zn.NUMBER).join("")+"]{1,3})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(zn.NUMBER).join("")+"]{1,3})?(?:\\s*)(?:\u65E5|\u53F7)?")}innerExtract(e,t){let n=Vx.default(e.refDate),s=e.createParsingResult(t.index,t[0]),i=parseInt(t[vT]);if(isNaN(i)&&(i=zn.zhStringToNumber(t[vT])),s.start.assign("month",i),t[vf]){let a=parseInt(t[vf]);isNaN(a)&&(a=zn.zhStringToNumber(t[vf])),s.start.assign("day",a)}else s.start.imply("day",n.date());if(t[_f]){let a=parseInt(t[_f]);isNaN(a)&&(a=zn.zhStringToYear(t[_f])),s.start.assign("year",a)}else s.start.imply("year",n.year());return s}};ia.default=wf});var kT=b(aa=>{"use strict";var Qx=aa&&aa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(aa,"__esModule",{value:!0});var Xx=Qx(Te()),Zx=Y(),ET=Ps(),Jx=new RegExp("(\\d+|["+Object.keys(ET.NUMBER).join("")+"]+|\u534A|\u51E0)(?:\\s*)(?:\u4E2A)?(\u79D2(?:\u949F)?|\u5206\u949F|\u5C0F\u65F6|\u949F|\u65E5|\u5929|\u661F\u671F|\u793C\u62DC|\u6708|\u5E74)(?:(?:\u4E4B|\u8FC7)?\u540E|(?:\u4E4B)?\u5185)","i"),Ef=1,eR=2,kf=class extends Zx.AbstractParserWithWordBoundaryChecking{innerPattern(){return Jx}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=parseInt(t[Ef]);if(isNaN(s)&&(s=ET.zhStringToNumber(t[Ef])),isNaN(s)){let u=t[Ef];if(u==="\u51E0")s=3;else if(u==="\u534A")s=.5;else return null}let i=Xx.default(e.refDate),o=t[eR][0];return o.match(/[日天星礼月年]/)?(o=="\u65E5"||o=="\u5929"?i=i.add(s,"d"):o=="\u661F"||o=="\u793C"?i=i.add(s*7,"d"):o=="\u6708"?i=i.add(s,"month"):o=="\u5E74"&&(i=i.add(s,"year")),n.start.assign("year",i.year()),n.start.assign("month",i.month()+1),n.start.assign("day",i.date()),n):(o=="\u79D2"?i=i.add(s,"second"):o=="\u5206"?i=i.add(s,"minute"):(o=="\u5C0F"||o=="\u949F")&&(i=i.add(s,"hour")),n.start.imply("year",i.year()),n.start.imply("month",i.month()+1),n.start.imply("day",i.date()),n.start.assign("hour",i.hour()),n.start.assign("minute",i.minute()),n.start.assign("second",i.second()),n)}};aa.default=kf});var OT=b(oa=>{"use strict";var tR=oa&&oa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(oa,"__esModule",{value:!0});var rR=tR(Te()),nR=Y(),ST=Ps(),sR=new RegExp("(?\u4E0A|\u4E0B|\u8FD9)(?:\u4E2A)?(?:\u661F\u671F|\u793C\u62DC|\u5468)(?"+Object.keys(ST.WEEKDAY_OFFSET).join("|")+")"),Sf=class extends nR.AbstractParserWithWordBoundaryChecking{innerPattern(){return sR}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=t.groups.weekday,i=ST.WEEKDAY_OFFSET[s];if(i===void 0)return null;let a=null,o=t.groups.prefix;o=="\u4E0A"?a="last":o=="\u4E0B"?a="next":o=="\u8FD9"&&(a="this");let u=rR.default(e.refDate),l=!1,c=u.day();return a=="last"||a=="past"?(u=u.day(i-7),l=!0):a=="next"?(u=u.day(i+7),l=!0):a=="this"?u=u.day(i):Math.abs(i-7-c){"use strict";var iR=ua&&ua.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ua,"__esModule",{value:!0});var aR=iR(Te()),oR=Y(),tr=Ps(),uR=new RegExp("(?:\u4ECE|\u81EA)?(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(tr.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(tr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(tr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),lR=new RegExp("(?:^\\s*(?:\u5230|\u81F3|\\-|\\\u2013|\\~|\\\u301C)\\s*)(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(tr.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(tr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(tr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),Yo=1,Go=2,jo=3,$o=4,Bo=5,Ho=6,er=7,Ns=8,zo=9,Of=class extends oR.AbstractParserWithWordBoundaryChecking{innerPattern(){return uR}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=aR.default(e.refDate),s=e.createParsingResult(t.index,t[0]),i=n.clone();if(t[Yo]){let c=t[Yo];c=="\u660E"?n.hour()>1&&i.add(1,"day"):c=="\u6628"?i.add(-1,"day"):c=="\u524D"?i.add(-2,"day"):c=="\u5927\u524D"?i.add(-3,"day"):c=="\u540E"?i.add(2,"day"):c=="\u5927\u540E"&&i.add(3,"day"),s.start.assign("day",i.date()),s.start.assign("month",i.month()+1),s.start.assign("year",i.year())}else if(t[$o]){let c=t[$o];c=="\u660E"?i.add(1,"day"):c=="\u6628"?i.add(-1,"day"):c=="\u524D"?i.add(-2,"day"):c=="\u5927\u524D"?i.add(-3,"day"):c=="\u540E"?i.add(2,"day"):c=="\u5927\u540E"&&i.add(3,"day"),s.start.assign("day",i.date()),s.start.assign("month",i.month()+1),s.start.assign("year",i.year())}else s.start.imply("day",i.date()),s.start.imply("month",i.month()+1),s.start.imply("year",i.year());let a=0,o=0,u=-1;if(t[Ns]){let c=parseInt(t[Ns]);if(isNaN(c)&&(c=tr.zhStringToNumber(t[Ns])),c>=60)return null;s.start.assign("second",c)}if(a=parseInt(t[Ho]),isNaN(a)&&(a=tr.zhStringToNumber(t[Ho])),t[er]?t[er]=="\u534A"?o=30:t[er]=="\u6B63"||t[er]=="\u6574"?o=0:(o=parseInt(t[er]),isNaN(o)&&(o=tr.zhStringToNumber(t[er]))):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(u=1),t[zo]){if(a>12)return null;let c=t[zo][0].toLowerCase();c=="a"&&(u=0,a==12&&(a=0)),c=="p"&&(u=1,a!=12&&(a+=12))}else if(t[Go]){let f=t[Go][0];f=="\u65E9"?(u=0,a==12&&(a=0)):f=="\u665A"&&(u=1,a!=12&&(a+=12))}else if(t[jo]){let f=t[jo][0];f=="\u4E0A"||f=="\u65E9"||f=="\u51CC"?(u=0,a==12&&(a=0)):(f=="\u4E0B"||f=="\u665A")&&(u=1,a!=12&&(a+=12))}else if(t[Bo]){let f=t[Bo][0];f=="\u4E0A"||f=="\u65E9"||f=="\u51CC"?(u=0,a==12&&(a=0)):(f=="\u4E0B"||f=="\u665A")&&(u=1,a!=12&&(a+=12))}if(s.start.assign("hour",a),s.start.assign("minute",o),u>=0?s.start.assign("meridiem",u):a<12?s.start.imply("meridiem",0):s.start.imply("meridiem",1),t=lR.exec(e.text.substring(s.index+s.text.length)),!t)return s.text.match(/^\d+$/)?null:s;let l=i.clone();if(s.end=e.createParsingComponents(),t[Yo]){let c=t[Yo];c=="\u660E"?n.hour()>1&&l.add(1,"day"):c=="\u6628"?l.add(-1,"day"):c=="\u524D"?l.add(-2,"day"):c=="\u5927\u524D"?l.add(-3,"day"):c=="\u540E"?l.add(2,"day"):c=="\u5927\u540E"&&l.add(3,"day"),s.end.assign("day",l.date()),s.end.assign("month",l.month()+1),s.end.assign("year",l.year())}else if(t[$o]){let c=t[$o];c=="\u660E"?l.add(1,"day"):c=="\u6628"?l.add(-1,"day"):c=="\u524D"?l.add(-2,"day"):c=="\u5927\u524D"?l.add(-3,"day"):c=="\u540E"?l.add(2,"day"):c=="\u5927\u540E"&&l.add(3,"day"),s.end.assign("day",l.date()),s.end.assign("month",l.month()+1),s.end.assign("year",l.year())}else s.end.imply("day",l.date()),s.end.imply("month",l.month()+1),s.end.imply("year",l.year());if(a=0,o=0,u=-1,t[Ns]){let c=parseInt(t[Ns]);if(isNaN(c)&&(c=tr.zhStringToNumber(t[Ns])),c>=60)return null;s.end.assign("second",c)}if(a=parseInt(t[Ho]),isNaN(a)&&(a=tr.zhStringToNumber(t[Ho])),t[er]?t[er]=="\u534A"?o=30:t[er]=="\u6B63"||t[er]=="\u6574"?o=0:(o=parseInt(t[er]),isNaN(o)&&(o=tr.zhStringToNumber(t[er]))):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(u=1),t[zo]){if(a>12)return null;let c=t[zo][0].toLowerCase();c=="a"&&(u=0,a==12&&(a=0)),c=="p"&&(u=1,a!=12&&(a+=12)),s.start.isCertain("meridiem")||(u==0?(s.start.imply("meridiem",0),s.start.get("hour")==12&&s.start.assign("hour",0)):(s.start.imply("meridiem",1),s.start.get("hour")!=12&&s.start.assign("hour",s.start.get("hour")+12)))}else if(t[Go]){let f=t[Go][0];f=="\u65E9"?(u=0,a==12&&(a=0)):f=="\u665A"&&(u=1,a!=12&&(a+=12))}else if(t[jo]){let f=t[jo][0];f=="\u4E0A"||f=="\u65E9"||f=="\u51CC"?(u=0,a==12&&(a=0)):(f=="\u4E0B"||f=="\u665A")&&(u=1,a!=12&&(a+=12))}else if(t[Bo]){let f=t[Bo][0];f=="\u4E0A"||f=="\u65E9"||f=="\u51CC"?(u=0,a==12&&(a=0)):(f=="\u4E0B"||f=="\u665A")&&(u=1,a!=12&&(a+=12))}return s.text=s.text+t[0],s.end.assign("hour",a),s.end.assign("minute",o),u>=0?s.end.assign("meridiem",u):s.start.isCertain("meridiem")&&s.start.get("meridiem")==1&&s.start.get("hour")>a?s.end.imply("meridiem",0):a>12&&s.end.imply("meridiem",1),s.end.date().getTime(){"use strict";var cR=la&&la.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(la,"__esModule",{value:!0});var dR=cR(Te()),fR=Y(),xT=Ps(),pR=new RegExp("(?:\u661F\u671F|\u793C\u62DC|\u5468)(?"+Object.keys(xT.WEEKDAY_OFFSET).join("|")+")"),Df=class extends fR.AbstractParserWithWordBoundaryChecking{innerPattern(){return pR}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=t.groups.weekday,i=xT.WEEKDAY_OFFSET[s];if(i===void 0)return null;let a=dR.default(e.refDate),o=!1,u=a.day();return Math.abs(i-7-u){"use strict";var mR=ca&&ca.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ca,"__esModule",{value:!0});var hR=mR(kr()),xf=class extends hR.default{patternBetween(){return/^\s*(至|到|-|~|~|-|ー)\s*$/i}};ca.default=xf});var CT=b(da=>{"use strict";var gR=da&&da.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(da,"__esModule",{value:!0});var yR=gR(Lr()),Rf=class extends yR.default{patternBetween(){return/^\s*$/i}};da.default=Rf});var AT=b($e=>{"use strict";var $r=$e&&$e.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($e,"__esModule",{value:!0});$e.createConfiguration=$e.createCasualConfiguration=$e.parseDate=$e.parse=$e.strict=$e.casual=$e.hans=void 0;var Mf=dr(),TR=$r(go()),bR=Ur(),_R=$r(_T()),vR=$r(wT()),wR=$r(kT()),ER=$r(OT()),kR=$r(DT()),SR=$r(RT()),OR=$r(MT()),DR=$r(CT());$e.hans=new Mf.Chrono(Cf());$e.casual=new Mf.Chrono(Cf());$e.strict=new Mf.Chrono(Af());function xR(r,e,t){return $e.casual.parse(r,e,t)}$e.parse=xR;function RR(r,e,t){return $e.casual.parseDate(r,e,t)}$e.parseDate=RR;function Cf(){let r=Af();return r.parsers.unshift(new _R.default),r}$e.createCasualConfiguration=Cf;function Af(){let r=bR.includeCommonConfiguration({parsers:[new vR.default,new ER.default,new SR.default,new kR.default,new wR.default],refiners:[new OR.default,new DR.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof TR.default)),r}$e.createConfiguration=Af});var NT=b(Ut=>{"use strict";var PT=Ut&&Ut.__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]}),MR=Ut&&Ut.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),CR=Ut&&Ut.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&PT(e,r,t)},AR=Ut&&Ut.__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)&&PT(e,r,t);return MR(e,r),e};Object.defineProperty(Ut,"__esModule",{value:!0});Ut.hans=void 0;CR(gT(),Ut);Ut.hans=AR(AT())});var Nt=b(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.parseTimeUnits=ee.TIME_UNITS_PATTERN=ee.parseYear=ee.YEAR_PATTERN=ee.parseOrdinalNumberPattern=ee.ORDINAL_NUMBER_PATTERN=ee.parseNumberPattern=ee.NUMBER_PATTERN=ee.TIME_UNIT_DICTIONARY=ee.ORDINAL_WORD_DICTIONARY=ee.INTEGER_WORD_DICTIONARY=ee.MONTH_DICTIONARY=ee.FULL_MONTH_NAME_DICTIONARY=ee.WEEKDAY_DICTIONARY=ee.REGEX_PARTS=void 0;var Vo=Se(),PR=ut();ee.REGEX_PARTS={leftBoundary:"([^\\p{L}\\p{N}_]|^)",rightBoundary:"(?=[^\\p{L}\\p{N}_]|$)",flags:"iu"};ee.WEEKDAY_DICTIONARY={\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435:0,\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u044F:0,\u0432\u0441\u043A:0,"\u0432\u0441\u043A.":0,\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A:1,\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A\u0430:1,\u043F\u043D:1,"\u043F\u043D.":1,\u0432\u0442\u043E\u0440\u043D\u0438\u043A:2,\u0432\u0442\u043E\u0440\u043D\u0438\u043A\u0430:2,\u0432\u0442:2,"\u0432\u0442.":2,\u0441\u0440\u0435\u0434\u0430:3,\u0441\u0440\u0435\u0434\u044B:3,\u0441\u0440\u0435\u0434\u0443:3,\u0441\u0440:3,"\u0441\u0440.":3,\u0447\u0435\u0442\u0432\u0435\u0440\u0433:4,\u0447\u0435\u0442\u0432\u0435\u0440\u0433\u0430:4,\u0447\u0442:4,"\u0447\u0442.":4,\u043F\u044F\u0442\u043D\u0438\u0446\u0430:5,\u043F\u044F\u0442\u043D\u0438\u0446\u0443:5,\u043F\u044F\u0442\u043D\u0438\u0446\u044B:5,\u043F\u0442:5,"\u043F\u0442.":5,\u0441\u0443\u0431\u0431\u043E\u0442\u0430:6,\u0441\u0443\u0431\u0431\u043E\u0442\u0443:6,\u0441\u0443\u0431\u0431\u043E\u0442\u044B:6,\u0441\u0431:6,"\u0441\u0431.":6};ee.FULL_MONTH_NAME_DICTIONARY={\u044F\u043D\u0432\u0430\u0440\u044C:1,\u044F\u043D\u0432\u0430\u0440\u044F:1,\u044F\u043D\u0432\u0430\u0440\u0435:1,\u0444\u0435\u0432\u0440\u044F\u043B\u044C:2,\u0444\u0435\u0432\u0440\u044F\u043B\u044F:2,\u0444\u0435\u0432\u0440\u044F\u043B\u0435:2,\u043C\u0430\u0440\u0442:3,\u043C\u0430\u0440\u0442\u0430:3,\u043C\u0430\u0440\u0442\u0435:3,\u0430\u043F\u0440\u0435\u043B\u044C:4,\u0430\u043F\u0440\u0435\u043B\u044F:4,\u0430\u043F\u0440\u0435\u043B\u0435:4,\u043C\u0430\u0439:5,\u043C\u0430\u044F:5,\u043C\u0430\u0435:5,\u0438\u044E\u043D\u044C:6,\u0438\u044E\u043D\u044F:6,\u0438\u044E\u043D\u0435:6,\u0438\u044E\u043B\u044C:7,\u0438\u044E\u043B\u044F:7,\u0438\u044E\u043B\u0435:7,\u0430\u0432\u0433\u0443\u0441\u0442:8,\u0430\u0432\u0433\u0443\u0441\u0442\u0430:8,\u0430\u0432\u0433\u0443\u0441\u0442\u0435:8,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044C:9,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044F:9,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u0435:9,\u043E\u043A\u0442\u044F\u0431\u0440\u044C:10,\u043E\u043A\u0442\u044F\u0431\u0440\u044F:10,\u043E\u043A\u0442\u044F\u0431\u0440\u0435:10,\u043D\u043E\u044F\u0431\u0440\u044C:11,\u043D\u043E\u044F\u0431\u0440\u044F:11,\u043D\u043E\u044F\u0431\u0440\u0435:11,\u0434\u0435\u043A\u0430\u0431\u0440\u044C:12,\u0434\u0435\u043A\u0430\u0431\u0440\u044F:12,\u0434\u0435\u043A\u0430\u0431\u0440\u0435:12};ee.MONTH_DICTIONARY=Object.assign(Object.assign({},ee.FULL_MONTH_NAME_DICTIONARY),{\u044F\u043D\u0432:1,"\u044F\u043D\u0432.":1,\u0444\u0435\u0432:2,"\u0444\u0435\u0432.":2,\u043C\u0430\u0440:3,"\u043C\u0430\u0440.":3,\u0430\u043F\u0440:4,"\u0430\u043F\u0440.":4,\u0430\u0432\u0433:8,"\u0430\u0432\u0433.":8,\u0441\u0435\u043D:9,"\u0441\u0435\u043D.":9,\u043E\u043A\u0442:10,"\u043E\u043A\u0442.":10,\u043D\u043E\u044F:11,"\u043D\u043E\u044F.":11,\u0434\u0435\u043A:12,"\u0434\u0435\u043A.":12});ee.INTEGER_WORD_DICTIONARY={\u043E\u0434\u0438\u043D:1,\u043E\u0434\u043D\u0430:1,\u043E\u0434\u043D\u043E\u0439:1,\u043E\u0434\u043D\u0443:1,\u0434\u0432\u0435:2,\u0434\u0432\u0430:2,\u0434\u0432\u0443\u0445:2,\u0442\u0440\u0438:3,\u0442\u0440\u0435\u0445:3,\u0442\u0440\u0451\u0445:3,\u0447\u0435\u0442\u044B\u0440\u0435:4,\u0447\u0435\u0442\u044B\u0440\u0435\u0445:4,\u0447\u0435\u0442\u044B\u0440\u0451\u0445:4,\u043F\u044F\u0442\u044C:5,\u043F\u044F\u0442\u0438:5,\u0448\u0435\u0441\u0442\u044C:6,\u0448\u0435\u0441\u0442\u0438:6,\u0441\u0435\u043C\u044C:7,\u0441\u0435\u043C\u0438:7,\u0432\u043E\u0441\u0435\u043C\u044C:8,\u0432\u043E\u0441\u0435\u043C\u044C\u043C\u0438:8,\u0434\u0435\u0432\u044F\u0442\u044C:9,\u0434\u0435\u0432\u044F\u0442\u0438:9,\u0434\u0435\u0441\u044F\u0442\u044C:10,\u0434\u0435\u0441\u044F\u0442\u0438:10,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u044C:11,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u0438:11,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u044C:12,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u0438:12};ee.ORDINAL_WORD_DICTIONARY={\u043F\u0435\u0440\u0432\u043E\u0435:1,\u043F\u0435\u0440\u0432\u043E\u0433\u043E:1,\u0432\u0442\u043E\u0440\u043E\u0435:2,\u0432\u0442\u043E\u0440\u043E\u0433\u043E:2,\u0442\u0440\u0435\u0442\u044C\u0435:3,\u0442\u0440\u0435\u0442\u044C\u0435\u0433\u043E:3,\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0435:4,\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0433\u043E:4,\u043F\u044F\u0442\u043E\u0435:5,\u043F\u044F\u0442\u043E\u0433\u043E:5,\u0448\u0435\u0441\u0442\u043E\u0435:6,\u0448\u0435\u0441\u0442\u043E\u0433\u043E:6,\u0441\u0435\u0434\u044C\u043C\u043E\u0435:7,\u0441\u0435\u0434\u044C\u043C\u043E\u0433\u043E:7,\u0432\u043E\u0441\u044C\u043C\u043E\u0435:8,\u0432\u043E\u0441\u044C\u043C\u043E\u0433\u043E:8,\u0434\u0435\u0432\u044F\u0442\u043E\u0435:9,\u0434\u0435\u0432\u044F\u0442\u043E\u0433\u043E:9,\u0434\u0435\u0441\u044F\u0442\u043E\u0435:10,\u0434\u0435\u0441\u044F\u0442\u043E\u0433\u043E:10,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:11,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:11,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:12,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:12,\u0442\u0440\u0438\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:13,\u0442\u0440\u0438\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:13,\u0447\u0435\u0442\u044B\u0440\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:14,\u0447\u0435\u0442\u044B\u0440\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:14,\u043F\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:15,\u043F\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:15,\u0448\u0435\u0441\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:16,\u0448\u0435\u0441\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:16,\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:17,\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:17,\u0432\u043E\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:18,\u0432\u043E\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:18,\u0434\u0435\u0432\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:19,\u0434\u0435\u0432\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:19,\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u043E\u0435:20,\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:20,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0435":21,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0433\u043E":21,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u0442\u043E\u0440\u043E\u0435":22,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u0442\u043E\u0440\u043E\u0433\u043E":22,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0442\u0440\u0435\u0442\u044C\u0435":23,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0442\u0440\u0435\u0442\u044C\u0435\u0433\u043E":23,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0435":24,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0433\u043E":24,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u044F\u0442\u043E\u0435":25,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u044F\u0442\u043E\u0433\u043E":25,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0448\u0435\u0441\u0442\u043E\u0435":26,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0448\u0435\u0441\u0442\u043E\u0433\u043E":26,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0441\u0435\u0434\u044C\u043C\u043E\u0435":27,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0441\u0435\u0434\u044C\u043C\u043E\u0433\u043E":27,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u043E\u0441\u044C\u043C\u043E\u0435":28,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u043E\u0441\u044C\u043C\u043E\u0433\u043E":28,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0434\u0435\u0432\u044F\u0442\u043E\u0435":29,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0434\u0435\u0432\u044F\u0442\u043E\u0433\u043E":29,\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u043E\u0435:30,\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u043E\u0433\u043E:30,"\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0435":31,"\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0433\u043E":31};ee.TIME_UNIT_DICTIONARY={\u0441\u0435\u043A:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u0430:"second",\u0441\u0435\u043A\u0443\u043D\u0434:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u044B:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u0443:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0430:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0438:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u0435\u043A:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0443:"second",\u043C\u0438\u043D:"minute",\u043C\u0438\u043D\u0443\u0442\u0430:"minute",\u043C\u0438\u043D\u0443\u0442:"minute",\u043C\u0438\u043D\u0443\u0442\u044B:"minute",\u043C\u0438\u043D\u0443\u0442\u0443:"minute",\u043C\u0438\u043D\u0443\u0442\u043E\u043A:"minute",\u043C\u0438\u043D\u0443\u0442\u043A\u0438:"minute",\u043C\u0438\u043D\u0443\u0442\u043A\u0443:"minute",\u0447\u0430\u0441:"hour",\u0447\u0430\u0441\u043E\u0432:"hour",\u0447\u0430\u0441\u0430:"hour",\u0447\u0430\u0441\u0443:"hour",\u0447\u0430\u0441\u0438\u043A\u043E\u0432:"hour",\u0447\u0430\u0441\u0438\u043A\u0430:"hour",\u0447\u0430\u0441\u0438\u043A\u0435:"hour",\u0447\u0430\u0441\u0438\u043A:"hour",\u0434\u0435\u043D\u044C:"d",\u0434\u043D\u044F:"d",\u0434\u043D\u0435\u0439:"d",\u0441\u0443\u0442\u043E\u043A:"d",\u0441\u0443\u0442\u043A\u0438:"d",\u043D\u0435\u0434\u0435\u043B\u044F:"week",\u043D\u0435\u0434\u0435\u043B\u0435:"week",\u043D\u0435\u0434\u0435\u043B\u0438:"week",\u043D\u0435\u0434\u0435\u043B\u044E:"week",\u043D\u0435\u0434\u0435\u043B\u044C:"week",\u043D\u0435\u0434\u0435\u043B\u044C\u043A\u0435:"week",\u043D\u0435\u0434\u0435\u043B\u044C\u043A\u0438:"week",\u043D\u0435\u0434\u0435\u043B\u0435\u043A:"week",\u043C\u0435\u0441\u044F\u0446:"month",\u043C\u0435\u0441\u044F\u0446\u0435:"month",\u043C\u0435\u0441\u044F\u0446\u0435\u0432:"month",\u043C\u0435\u0441\u044F\u0446\u0430:"month",\u043A\u0432\u0430\u0440\u0442\u0430\u043B:"quarter",\u043A\u0432\u0430\u0440\u0442\u0430\u043B\u0435:"quarter",\u043A\u0432\u0430\u0440\u0442\u0430\u043B\u043E\u0432:"quarter",\u0433\u043E\u0434:"year",\u0433\u043E\u0434\u0430:"year",\u0433\u043E\u0434\u0443:"year",\u0433\u043E\u0434\u043E\u0432:"year",\u043B\u0435\u0442:"year",\u0433\u043E\u0434\u0438\u043A:"year",\u0433\u043E\u0434\u0438\u043A\u0430:"year",\u0433\u043E\u0434\u0438\u043A\u043E\u0432:"year"};ee.NUMBER_PATTERN=`(?:${Vo.matchAnyPattern(ee.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|\u043F\u043E\u043B|\u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E|\u043F\u0430\u0440(?:\u044B|\u0443)|\\s{0,3})`;function FT(r){let e=r.toLowerCase();return ee.INTEGER_WORD_DICTIONARY[e]!==void 0?ee.INTEGER_WORD_DICTIONARY[e]:e.match(/несколько/)?3:e.match(/пол/)?.5:e.match(/пар/)?2:e===""?1:parseFloat(e)}ee.parseNumberPattern=FT;ee.ORDINAL_NUMBER_PATTERN=`(?:${Vo.matchAnyPattern(ee.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:\u0433\u043E|\u043E\u0433\u043E|\u0435|\u043E\u0435)?)`;function NR(r){let e=r.toLowerCase();return ee.ORDINAL_WORD_DICTIONARY[e]!==void 0?ee.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}ee.parseOrdinalNumberPattern=NR;var Pf="(?:\\s+(?:\u0433\u043E\u0434\u0443|\u0433\u043E\u0434\u0430|\u0433\u043E\u0434|\u0433|\u0433.))?";ee.YEAR_PATTERN=`(?:[1-9][0-9]{0,3}${Pf}\\s*(?:\u043D.\u044D.|\u0434\u043E \u043D.\u044D.|\u043D. \u044D.|\u0434\u043E \u043D. \u044D.)|[1-2][0-9]{3}${Pf}|[5-9][0-9]${Pf})`;function IR(r){if(/(год|года|г|г.)/i.test(r)&&(r=r.replace(/(год|года|г|г.)/i,"")),/(до н.э.|до н. э.)/i.test(r))return r=r.replace(/(до н.э.|до н. э.)/i,""),-parseInt(r);if(/(н. э.|н.э.)/i.test(r))return r=r.replace(/(н. э.|н.э.)/i,""),parseInt(r);let e=parseInt(r);return PR.findMostLikelyADYear(e)}ee.parseYear=IR;var LT=`(${ee.NUMBER_PATTERN})\\s{0,3}(${Vo.matchAnyPattern(ee.TIME_UNIT_DICTIONARY)})`,IT=new RegExp(LT,"i");ee.TIME_UNITS_PATTERN=Vo.repeatedTimeunitPattern("(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s{0,3})?",LT);function FR(r){let e={},t=r,n=IT.exec(t);for(;n;)LR(e,n),t=t.substring(n[0].length).trim(),n=IT.exec(t);return e}ee.parseTimeUnits=FR;function LR(r,e){let t=FT(e[1]),n=ee.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var qT=b(If=>{"use strict";Object.defineProperty(If,"__esModule",{value:!0});var fa=Nt(),UR=Le(),qR=Y(),UT=`(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s*(?:~\\s*)?)?(${fa.TIME_UNITS_PATTERN})${fa.REGEX_PARTS.rightBoundary}`,WR=new RegExp(`(?:\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0435|\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0438)\\s*${UT}`,fa.REGEX_PARTS.flags),YR=new RegExp(UT,"i"),Nf=class extends qR.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return fa.REGEX_PARTS.leftBoundary}innerPattern(e){return e.option.forwardDate?YR:WR}innerExtract(e,t){let n=fa.parseTimeUnits(t[1]);return UR.ParsingComponents.createRelativeFromReference(e.reference,n)}};If.default=Nf});var $T=b(Lf=>{"use strict";Object.defineProperty(Lf,"__esModule",{value:!0});var GR=ut(),pa=Nt(),jT=Nt(),Ko=Nt(),jR=Se(),$R=Y(),BR=new RegExp(`(?:\u0441)?\\s*(${Ko.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:\u043F\u043E|-|\u2013|\u0434\u043E)?\\s{0,3}(${Ko.ORDINAL_NUMBER_PATTERN}))?(?:-|\\/|\\s{0,3}(?:of)?\\s{0,3})(${jR.matchAnyPattern(pa.MONTH_DICTIONARY)})(?:(?:-|\\/|,?\\s{0,3})(${jT.YEAR_PATTERN}(?![^\\s]\\d)))?${pa.REGEX_PARTS.rightBoundary}`,pa.REGEX_PARTS.flags),WT=1,YT=2,HR=3,GT=4,Ff=class extends $R.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return pa.REGEX_PARTS.leftBoundary}innerPattern(){return BR}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=pa.MONTH_DICTIONARY[t[HR].toLowerCase()],i=Ko.parseOrdinalNumberPattern(t[WT]);if(i>31)return t.index=t.index+t[WT].length,null;if(n.start.assign("month",s),n.start.assign("day",i),t[GT]){let a=jT.parseYear(t[GT]);n.start.assign("year",a)}else{let a=GR.findYearClosestToRef(e.refDate,i,s);n.start.imply("year",a)}if(t[YT]){let a=Ko.parseOrdinalNumberPattern(t[YT]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Lf.default=Ff});var zT=b(qf=>{"use strict";Object.defineProperty(qf,"__esModule",{value:!0});var ma=Nt(),zR=ut(),VR=Se(),HT=Nt(),KR=Y(),QR=new RegExp(`((?:\u0432)\\s*)?(${VR.matchAnyPattern(ma.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${HT.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,ma.REGEX_PARTS.flags),XR=2,BT=3,Uf=class extends KR.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return ma.REGEX_PARTS.leftBoundary}innerPattern(){return QR}innerExtract(e,t){let n=t[XR].toLowerCase();if(t[0].length<=3&&!ma.FULL_MONTH_NAME_DICTIONARY[n])return null;let s=e.createParsingResult(t.index,t.index+t[0].length);s.start.imply("day",1);let i=ma.MONTH_DICTIONARY[n];if(s.start.assign("month",i),t[BT]){let a=HT.parseYear(t[BT]);s.start.assign("year",a)}else{let a=zR.findYearClosestToRef(e.refDate,1,i);s.start.imply("year",a)}return s}};qf.default=Uf});var KT=b(Yf=>{"use strict";Object.defineProperty(Yf,"__esModule",{value:!0});var Qo=ze(),ZR=Wn(),VT=Nt(),Wf=class extends ZR.AbstractTimeExpressionParser{constructor(e){super(e)}patternFlags(){return VT.REGEX_PARTS.flags}primaryPatternLeftBoundary(){return"(^|\\s|T|(?:[^\\p{L}\\p{N}_]))"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|\u0434\u043E|\u0438|\u043F\u043E|\\?)\\s*"}primaryPrefix(){return"(?:(?:\u0432|\u0441)\\s*)??"}primarySuffix(){return`(?:\\s*(?:\u0443\u0442\u0440\u0430|\u0432\u0435\u0447\u0435\u0440\u0430|\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F))?(?!\\/)${VT.REGEX_PARTS.rightBoundary}`}extractPrimaryTimeComponents(e,t){let n=super.extractPrimaryTimeComponents(e,t);if(n){if(t[0].endsWith("\u0432\u0435\u0447\u0435\u0440\u0430")){let s=n.get("hour");s>=6&&s<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",Qo.Meridiem.PM)):s<6&&n.assign("meridiem",Qo.Meridiem.AM)}if(t[0].endsWith("\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F")){n.assign("meridiem",Qo.Meridiem.PM);let s=n.get("hour");s>=0&&s<=6&&n.assign("hour",n.get("hour")+12)}t[0].endsWith("\u0443\u0442\u0440\u0430")&&(n.assign("meridiem",Qo.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};Yf.default=Wf});var QT=b(jf=>{"use strict";Object.defineProperty(jf,"__esModule",{value:!0});var Xo=Nt(),JR=Le(),eM=Y(),tM=Qt(),rM=new RegExp(`(${Xo.TIME_UNITS_PATTERN})\\s{0,5}\u043D\u0430\u0437\u0430\u0434(?=(?:\\W|$))`,Xo.REGEX_PARTS.flags),Gf=class extends eM.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Xo.REGEX_PARTS.leftBoundary}innerPattern(){return rM}innerExtract(e,t){let n=Xo.parseTimeUnits(t[1]),s=tM.reverseTimeUnits(n);return JR.ParsingComponents.createRelativeFromReference(e.reference,s)}};jf.default=Gf});var XT=b(ha=>{"use strict";var nM=ha&&ha.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ha,"__esModule",{value:!0});var sM=nM(kr()),$f=class extends sM.default{patternBetween(){return/^\s*(и до|и по|до|по|-)\s*$/i}};ha.default=$f});var ZT=b(ga=>{"use strict";var iM=ga&&ga.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ga,"__esModule",{value:!0});var aM=iM(Lr()),Bf=class extends aM.default{patternBetween(){return new RegExp("^\\s*(T|\u0432|,|-)?\\s*$")}};ga.default=Bf});var JT=b(Br=>{"use strict";var oM=Br&&Br.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),uM=Br&&Br.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),lM=Br&&Br.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&oM(e,r,t);return uM(e,r),e};Object.defineProperty(Br,"__esModule",{value:!0});var cM=Y(),ya=lM(Wr()),Hf=Nt(),dM=new RegExp(`(?:\u0441|\u0441\u043E)?\\s*(\u0441\u0435\u0433\u043E\u0434\u043D\u044F|\u0432\u0447\u0435\u0440\u0430|\u0437\u0430\u0432\u0442\u0440\u0430|\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430|\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430)${Hf.REGEX_PARTS.rightBoundary}`,Hf.REGEX_PARTS.flags),zf=class extends cM.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Hf.REGEX_PARTS.leftBoundary}innerPattern(e){return dM}innerExtract(e,t){let n=t[1].toLowerCase(),s=e.createParsingComponents();switch(n){case"\u0441\u0435\u0433\u043E\u0434\u043D\u044F":return ya.today(e.reference);case"\u0432\u0447\u0435\u0440\u0430":return ya.yesterday(e.reference);case"\u0437\u0430\u0432\u0442\u0440\u0430":return ya.tomorrow(e.reference);case"\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430":return ya.theDayAfter(e.reference,2);case"\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430":return ya.theDayBefore(e.reference,2)}return s}};Br.default=zf});var eb=b(gr=>{"use strict";var fM=gr&&gr.__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]}),pM=gr&&gr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),mM=gr&&gr.__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)&&fM(e,r,t);return pM(e,r),e},hM=gr&&gr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(gr,"__esModule",{value:!0});var gM=Y(),Vn=mM(Wr()),yM=Kt(),TM=hM(Te()),Vf=Nt(),bM=new RegExp(`(\u0441\u0435\u0439\u0447\u0430\u0441|\u043F\u0440\u043E\u0448\u043B\u044B\u043C\\s*\u0432\u0435\u0447\u0435\u0440\u043E\u043C|\u043F\u0440\u043E\u0448\u043B\u043E\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u0441\u0435\u0433\u043E\u0434\u043D\u044F\\s*\u043D\u043E\u0447\u044C\u044E|\u044D\u0442\u043E\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u043D\u043E\u0447\u044C\u044E|\u044D\u0442\u0438\u043C \u0443\u0442\u0440\u043E\u043C|\u0443\u0442\u0440\u043E\u043C|\u0443\u0442\u0440\u0430|\u0432\\s*\u043F\u043E\u043B\u0434\u0435\u043D\u044C|\u0432\u0435\u0447\u0435\u0440\u043E\u043C|\u0432\u0435\u0447\u0435\u0440\u0430|\u0432\\s*\u043F\u043E\u043B\u043D\u043E\u0447\u044C)${Vf.REGEX_PARTS.rightBoundary}`,Vf.REGEX_PARTS.flags),Kf=class extends gM.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Vf.REGEX_PARTS.leftBoundary}innerPattern(){return bM}innerExtract(e,t){let n=TM.default(e.refDate),s=t[0].toLowerCase(),i=e.createParsingComponents();if(s==="\u0441\u0435\u0439\u0447\u0430\u0441")return Vn.now(e.reference);if(s==="\u0432\u0435\u0447\u0435\u0440\u043E\u043C"||s==="\u0432\u0435\u0447\u0435\u0440\u0430")return Vn.evening(e.reference);if(s.endsWith("\u0443\u0442\u0440\u043E\u043C")||s.endsWith("\u0443\u0442\u0440\u0430"))return Vn.morning(e.reference);if(s.match(/в\s*полдень/))return Vn.noon(e.reference);if(s.match(/прошлой\s*ночью/))return Vn.lastNight(e.reference);if(s.match(/прошлым\s*вечером/))return Vn.yesterdayEvening(e.reference);if(s.match(/следующей\s*ночью/)){let a=n.hour()<22?1:2;n=n.add(a,"day"),yM.assignSimilarDate(i,n),i.imply("hour",0)}return s.match(/в\s*полночь/)||s.endsWith("\u043D\u043E\u0447\u044C\u044E")?Vn.midnight(e.reference):i}};gr.default=Kf});var tb=b(Xf=>{"use strict";Object.defineProperty(Xf,"__esModule",{value:!0});var Ta=Nt(),_M=Se(),vM=Y(),wM=Gn(),EM=new RegExp(`(?:(?:,|\\(|\uFF08)\\s*)?(?:\u0432\\s*?)?(?:(\u044D\u0442\u0443|\u044D\u0442\u043E\u0442|\u043F\u0440\u043E\u0448\u043B\u044B\u0439|\u043F\u0440\u043E\u0448\u043B\u0443\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E)\\s*)?(${_M.matchAnyPattern(Ta.WEEKDAY_DICTIONARY)})(?:\\s*(?:,|\\)|\uFF09))?(?:\\s*\u043D\u0430\\s*(\u044D\u0442\u043E\u0439|\u043F\u0440\u043E\u0448\u043B\u043E\u0439|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439)\\s*\u043D\u0435\u0434\u0435\u043B\u0435)?${Ta.REGEX_PARTS.rightBoundary}`,Ta.REGEX_PARTS.flags),kM=1,SM=2,OM=3,Qf=class extends vM.AbstractParserWithWordBoundaryChecking{innerPattern(){return EM}patternLeftBoundary(){return Ta.REGEX_PARTS.leftBoundary}innerExtract(e,t){let n=t[SM].toLowerCase(),s=Ta.WEEKDAY_DICTIONARY[n],i=t[kM],a=t[OM],o=i||a;o=o||"",o=o.toLowerCase();let u=null;o=="\u043F\u0440\u043E\u0448\u043B\u044B\u0439"||o=="\u043F\u0440\u043E\u0448\u043B\u0443\u044E"||o=="\u043F\u0440\u043E\u0448\u043B\u043E\u0439"?u="last":o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E"?u="next":(o=="\u044D\u0442\u043E\u0442"||o=="\u044D\u0442\u0443"||o=="\u044D\u0442\u043E\u0439")&&(u="this");let l=wM.toDayJSWeekday(e.refDate,s,u);return e.createParsingComponents().assign("weekday",s).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Xf.default=Qf});var nb=b(_a=>{"use strict";var DM=_a&&_a.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(_a,"__esModule",{value:!0});var ba=Nt(),rb=Le(),xM=DM(Te()),RM=Y(),MM=Se(),CM=new RegExp(`(\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u043C|\u043D\u0430 \u043F\u0440\u043E\u0448\u043B\u043E\u0439|\u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439|\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C|\u043D\u0430 \u044D\u0442\u043E\u0439|\u0432 \u044D\u0442\u043E\u043C)\\s*(${MM.matchAnyPattern(ba.TIME_UNIT_DICTIONARY)})(?=\\s*)${ba.REGEX_PARTS.rightBoundary}`,ba.REGEX_PARTS.flags),AM=1,PM=2,Zf=class extends RM.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return ba.REGEX_PARTS.leftBoundary}innerPattern(){return CM}innerExtract(e,t){let n=t[AM].toLowerCase(),s=t[PM].toLowerCase(),i=ba.TIME_UNIT_DICTIONARY[s];if(n=="\u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||n=="\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C"){let u={};return u[i]=1,rb.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u043C"||n=="\u043D\u0430 \u043F\u0440\u043E\u0448\u043B\u043E\u0439"){let u={};return u[i]=-1,rb.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=xM.default(e.reference.instant);return i.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):i.match(/month/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):i.match(/year/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};_a.default=Zf});var sb=b(ep=>{"use strict";Object.defineProperty(ep,"__esModule",{value:!0});var va=Nt(),NM=Le(),IM=Y(),FM=Qt(),LM=new RegExp(`(\u044D\u0442\u0438|\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435|\u043F\u0440\u043E\u0448\u043B\u044B\u0435|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0435|\u043F\u043E\u0441\u043B\u0435|\u0447\u0435\u0440\u0435\u0437|\\+|-)\\s*(${va.TIME_UNITS_PATTERN})${va.REGEX_PARTS.rightBoundary}`,va.REGEX_PARTS.flags),Jf=class extends IM.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return va.REGEX_PARTS.leftBoundary}innerPattern(){return LM}innerExtract(e,t){let n=t[1].toLowerCase(),s=va.parseTimeUnits(t[2]);switch(n){case"\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435":case"\u043F\u0440\u043E\u0448\u043B\u044B\u0435":case"-":s=FM.reverseTimeUnits(s);break}return NM.ParsingComponents.createRelativeFromReference(e.reference,s)}};ep.default=Jf});var ob=b(nt=>{"use strict";var qt=nt&&nt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(nt,"__esModule",{value:!0});nt.createConfiguration=nt.createCasualConfiguration=nt.parseDate=nt.parse=nt.strict=nt.casual=void 0;var UM=qt(qT()),qM=qt($T()),WM=qt(zT()),YM=qt(KT()),GM=qt(QT()),jM=qt(XT()),$M=qt(ZT()),BM=Ur(),HM=qt(JT()),zM=qt(eb()),VM=qt(tb()),KM=qt(nb()),ib=dr(),QM=qt(jn()),XM=qt(sb());nt.casual=new ib.Chrono(ab());nt.strict=new ib.Chrono(tp(!0));function ZM(r,e,t){return nt.casual.parse(r,e,t)}nt.parse=ZM;function JM(r,e,t){return nt.casual.parseDate(r,e,t)}nt.parseDate=JM;function ab(){let r=tp(!1);return r.parsers.unshift(new HM.default),r.parsers.unshift(new zM.default),r.parsers.unshift(new WM.default),r.parsers.unshift(new KM.default),r.parsers.unshift(new XM.default),r}nt.createCasualConfiguration=ab;function tp(r=!0){return BM.includeCommonConfiguration({parsers:[new QM.default(!0),new UM.default,new qM.default,new VM.default,new YM.default(r),new GM.default],refiners:[new $M.default,new jM.default]},r)}nt.createConfiguration=tp});var ze=b(se=>{"use strict";var eC=se&&se.__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]}),tC=se&&se.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Tn=se&&se.__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)&&eC(e,r,t);return tC(e,r),e};Object.defineProperty(se,"__esModule",{value:!0});se.parseDate=se.parse=se.casual=se.strict=se.ru=se.zh=se.nl=se.pt=se.ja=se.fr=se.de=se.Meridiem=se.Chrono=se.en=void 0;var rp=Tn(Tc());se.en=rp;var rC=dr();Object.defineProperty(se,"Chrono",{enumerable:!0,get:function(){return rC.Chrono}});var nC;(function(r){r[r.AM=0]="AM",r[r.PM=1]="PM"})(nC=se.Meridiem||(se.Meridiem={}));var sC=Tn(gg());se.de=sC;var iC=Tn(Bg());se.fr=iC;var aC=Tn(ey());se.ja=aC;var oC=Tn(gy());se.pt=oC;var uC=Tn(eT());se.nl=uC;var lC=Tn(NT());se.zh=lC;var cC=Tn(ob());se.ru=cC;se.strict=rp.strict;se.casual=rp.casual;function dC(r,e,t){return se.casual.parse(r,e,t)}se.parse=dC;function fC(r,e,t){return se.casual.parseDate(r,e,t)}se.parseDate=fC});var s_=b((r_,n_)=>{(function(r){var e=Object.hasOwnProperty,t=Array.isArray?Array.isArray:function(p){return Object.prototype.toString.call(p)==="[object Array]"},n=10,s=typeof process=="object"&&typeof process.nextTick=="function",i=typeof Symbol=="function",a=typeof Reflect=="object",o=typeof setImmediate=="function",u=o?setImmediate:setTimeout,l=i?a&&typeof Reflect.ownKeys=="function"?Reflect.ownKeys:function(d){var p=Object.getOwnPropertyNames(d);return p.push.apply(p,Object.getOwnPropertySymbols(d)),p}:Object.keys;function c(){this._events={},this._conf&&f.call(this,this._conf)}function f(d){d&&(this._conf=d,d.delimiter&&(this.delimiter=d.delimiter),d.maxListeners!==r&&(this._maxListeners=d.maxListeners),d.wildcard&&(this.wildcard=d.wildcard),d.newListener&&(this._newListener=d.newListener),d.removeListener&&(this._removeListener=d.removeListener),d.verboseMemoryLeak&&(this.verboseMemoryLeak=d.verboseMemoryLeak),d.ignoreErrors&&(this.ignoreErrors=d.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function m(d,p){var h="(node) warning: possible EventEmitter memory leak detected. "+d+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(h+=" Event name: "+p+"."),typeof process!="undefined"&&process.emitWarning){var g=new Error(h);g.name="MaxListenersExceededWarning",g.emitter=this,g.count=d,process.emitWarning(g)}else console.error(h),console.trace&&console.trace()}var y=function(d,p,h){var g=arguments.length;switch(g){case 0:return[];case 1:return[d];case 2:return[d,p];case 3:return[d,p,h];default:for(var T=new Array(g);g--;)T[g]=arguments[g];return T}};function k(d,p){for(var h={},g,T=d.length,_=p?p.length:0,S=0;S0;)d=_[D],S.call(M,d,h[d]);this._listeners={},this._listenersCount=0,R()}}});function x(d,p,h,g){var T=Object.assign({},p);if(!d)return T;if(typeof d!="object")throw TypeError("options must be an object");var _=Object.keys(d),S=_.length,M,D,R;function U(ae){throw Error('Invalid "'+M+'" option value'+(ae?". Reason: "+ae:""))}for(var ge=0;ge0;)if(M===d[D])return _;S(p)}}var F=I(["function"]),le=I(["object","function"]);function B(d,p,h){var g,T,_=0,S,M=new d(function(D,R,U){h=x(h,{timeout:0,overload:!1},{timeout:function(Re,ve){return Re*=1,(typeof Re!="number"||Re<0||!Number.isFinite(Re))&&ve("timeout must be a positive number"),Re}}),g=!h.overload&&typeof d.prototype.cancel=="function"&&typeof U=="function";function ge(){T&&(T=null),_&&(clearTimeout(_),_=0)}var ae=function(Re){ge(),D(Re)},te=function(Re){ge(),R(Re)};g?p(ae,te,U):(T=[function(Re){te(Re||Error("canceled"))}],p(ae,te,function(Re){if(S)throw Error("Unable to subscribe on cancel event asynchronously");if(typeof Re!="function")throw TypeError("onCancel callback must be a function");T.push(Re)}),S=!0),h.timeout>0&&(_=setTimeout(function(){var Re=Error("timeout");Re.code="ETIMEDOUT",_=0,M.cancel(Re),R(Re)},h.timeout))});return g||(M.cancel=function(D){if(!!T){for(var R=T.length,U=1;U0;)te=Ct[M],te!=="_listeners"&&(qe=W(d,p,h[te],g+1,T),qe&&(ae?ae.push.apply(ae,qe):ae=qe));return ae}else if(Ft==="**"){for(un=g+1===T||g+2===T&&ln==="*",un&&h._listeners&&(ae=W(d,p,h,T,T)),Ct=l(h),M=Ct.length;M-- >0;)te=Ct[M],te!=="_listeners"&&(te==="*"||te==="**"?(h[te]._listeners&&!un&&(qe=W(d,p,h[te],T,T),qe&&(ae?ae.push.apply(ae,qe):ae=qe)),qe=W(d,p,h[te],g,T)):te===ln?qe=W(d,p,h[te],g+2,T):qe=W(d,p,h[te],g,T),qe&&(ae?ae.push.apply(ae,qe):ae=qe));return ae}else h[Ft]&&(ae=W(d,p,h[Ft],g+1,T));if(Re=h["*"],Re&&W(d,p,Re,g+1,T),ve=h["**"],ve)if(g0;)te=Ct[M],te!=="_listeners"&&(te===ln?W(d,p,ve[te],g+2,T):te===Ft?W(d,p,ve[te],g+1,T):(_r={},_r[te]=ve[te],W(d,p,{"**":_r},g+1,T)));else ve._listeners?W(d,p,ve,T,T):ve["*"]&&ve["*"]._listeners&&W(d,p,ve["*"],T,T);return ae}function j(d,p,h){var g=0,T=0,_,S=this.delimiter,M=S.length,D;if(typeof d=="string")if((_=d.indexOf(S))!==-1){D=new Array(5);do D[g++]=d.slice(T,_),T=_+M;while((_=d.indexOf(S,T))!==-1);D[g++]=d.slice(T)}else D=[d],g=1;else D=d,g=d.length;if(g>1){for(_=0;_+10&&R._listeners.length>this._maxListeners&&(R._listeners.warned=!0,m.call(this,R._listeners.length,U))):R._listeners=p,!0;return!0}function ce(d,p,h,g){for(var T=l(d),_=T.length,S,M,D,R=d._listeners,U;_-- >0;)M=T[_],S=d[M],M==="_listeners"?D=h:D=h?h.concat(M):[M],U=g||typeof M=="symbol",R&&p.push(U?D:D.join(this.delimiter)),typeof S=="object"&&ce.call(this,S,p,D,U);return p}function Ie(d){for(var p=l(d),h=p.length,g,T,_;h-- >0;)T=p[h],g=d[T],g&&(_=!0,T!=="_listeners"&&!Ie(g)&&delete d[T]);return _}function $(d,p,h){this.emitter=d,this.event=p,this.listener=h}$.prototype.off=function(){return this.emitter.off(this.event,this.listener),this};function N(d,p,h){if(h===!0)T=!0;else if(h===!1)g=!0;else{if(!h||typeof h!="object")throw TypeError("options should be an object or true");var g=h.async,T=h.promisify,_=h.nextTick,S=h.objectify}if(g||_||T){var M=p,D=p._origin||p;if(_&&!s)throw Error("process.nextTick is not supported");T===r&&(T=p.constructor.name==="AsyncFunction"),p=function(){var R=arguments,U=this,ge=this.event;return T?_?Promise.resolve():new Promise(function(ae){u(ae)}).then(function(){return U.event=ge,M.apply(U,R)}):(_?process.nextTick:u)(function(){U.event=ge,M.apply(U,R)})},p._async=!0,p._origin=D}return[p,S?new $(this,d,p):this]}function w(d){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,f.call(this,d)}w.EventEmitter2=w,w.prototype.listenTo=function(d,p,h){if(typeof d!="object")throw TypeError("target musts be an object");var g=this;h=x(h,{on:r,off:r,reducers:r},{on:F,off:F,reducers:le});function T(_){if(typeof _!="object")throw TypeError("events must be an object");var S=h.reducers,M=ie.call(g,d),D;M===-1?D=new E(g,d,h):D=g._observers[M];for(var R=l(_),U=R.length,ge,ae=typeof S=="function",te=0;te0;)T=h[g],(!d||T._target===d)&&(T.unsubscribe(p),_=!0);return _},w.prototype.delimiter=".",w.prototype.setMaxListeners=function(d){d!==r&&(this._maxListeners=d,this._conf||(this._conf={}),this._conf.maxListeners=d)},w.prototype.getMaxListeners=function(){return this._maxListeners},w.prototype.event="",w.prototype.once=function(d,p,h){return this._once(d,p,!1,h)},w.prototype.prependOnceListener=function(d,p,h){return this._once(d,p,!0,h)},w.prototype._once=function(d,p,h,g){return this._many(d,1,p,h,g)},w.prototype.many=function(d,p,h,g){return this._many(d,p,h,!1,g)},w.prototype.prependMany=function(d,p,h,g){return this._many(d,p,h,!0,g)},w.prototype._many=function(d,p,h,g,T){var _=this;if(typeof h!="function")throw new Error("many only accepts instances of Function");function S(){return--p===0&&_.off(d,S),h.apply(this,arguments)}return S._origin=h,this._on(d,S,g,T)},w.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||c.call(this);var d=arguments[0],p,h=this.wildcard,g,T,_,S,M;if(d==="newListener"&&!this._newListener&&!this._events.newListener)return!1;if(h&&(p=d,d!=="newListener"&&d!=="removeListener"&&typeof d=="object")){if(T=d.length,i){for(_=0;_3)for(g=new Array(D-1),S=1;S3)for(T=new Array(R-1),M=1;M0&&this._events[d].length>this._maxListeners&&(this._events[d].warned=!0,m.call(this,this._events[d].length,d))):this._events[d]=p,T)},w.prototype.off=function(d,p){if(typeof p!="function")throw new Error("removeListener only takes instances of Function");var h,g=[];if(this.wildcard){var T=typeof d=="string"?d.split(this.delimiter):d.slice();if(g=W.call(this,null,T,this.listenerTree,0),!g)return this}else{if(!this._events[d])return this;h=this._events[d],g.push({_listeners:h})}for(var _=0;_0){for(g=this._all,p=0,h=g.length;p0;)g=p[h[_]],typeof g=="function"?T.push(g):T.push.apply(T,g);return T}else{if(this.wildcard){if(S=this.listenerTree,!S)return[];var M=[],D=typeof d=="string"?d.split(this.delimiter):d.slice();return W.call(this,M,D,S,0),M}return p?(g=p[d],g?typeof g=="function"?[g]:g:[]):[]}},w.prototype.eventNames=function(d){var p=this._events;return this.wildcard?ce.call(this,this.listenerTree,[],null,d):p?l(p):[]},w.prototype.listenerCount=function(d){return this.listeners(d).length},w.prototype.hasListeners=function(d){if(this.wildcard){var p=[],h=typeof d=="string"?d.split(this.delimiter):d.slice();return W.call(this,p,h,this.listenerTree,0),p.length>0}var g=this._events,T=this._all;return!!(T&&T.length||g&&(d===r?l(g).length:g[d]))},w.prototype.listenersAny=function(){return this._all?this._all:[]},w.prototype.waitFor=function(d,p){var h=this,g=typeof p;return g==="number"?p={timeout:p}:g==="function"&&(p={filter:p}),p=x(p,{timeout:0,filter:r,handleError:!1,Promise,overload:!1},{filter:F,Promise:v}),B(p.Promise,function(T,_,S){function M(){var D=p.filter;if(!(D&&!D.apply(h,arguments)))if(h.off(d,M),p.handleError){var R=arguments[0];R?_(R):T(y.apply(null,arguments).slice(1))}else T(y.apply(null,arguments))}S(function(){h.off(d,M)}),h._on(d,M,!1)},{timeout:p.timeout,overload:p.overload})};function H(d,p,h){h=x(h,{Promise,timeout:0,overload:!1},{Promise:v});var g=h.Promise;return B(g,function(T,_,S){var M;if(typeof d.addEventListener=="function"){M=function(){T(y.apply(null,arguments))},S(function(){d.removeEventListener(p,M)}),d.addEventListener(p,M,{once:!0});return}var D=function(){R&&d.removeListener("error",R),T(y.apply(null,arguments))},R;p!=="error"&&(R=function(U){d.removeListener(p,D),_(U)},d.once("error",R)),S(function(){R&&d.removeListener("error",R),d.removeListener(p,D)}),d.once(p,D)},{timeout:h.timeout,overload:h.overload})}var C=w.prototype;if(Object.defineProperties(w,{defaultMaxListeners:{get:function(){return C._maxListeners},set:function(d){if(typeof d!="number"||d<0||Number.isNaN(d))throw TypeError("n must be a non-negative number");C._maxListeners=d},enumerable:!0},once:{value:H,writable:!0,configurable:!0}}),Object.defineProperties(C,{_maxListeners:{value:n,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),typeof define=="function"&&define.amd)define(function(){return w});else if(typeof r_=="object")n_.exports=w;else{var X=new Function("","return this")();X.EventEmitter2=w}})()});var C_=b(Lp=>{"use strict";Object.defineProperty(Lp,"__esModule",{value:!0});var R_=Symbol("MustacheDataPath");function x_({target:r,propertyName:e}){return[...r[R_]||[],e]}function M_(r,e){return typeof r!="object"?r:new Proxy(r,{get(t,n){let s=t[n];if(s===void 0&&!(n in t)){let i=x_({target:t,propertyName:n});if(e!=null&&e.handleError)return e.handleError(i),s;throw Error(`Missing Mustache data property: ${i.join(" > ")}`)}return s&&typeof s=="object"?(s[R_]=x_({target:t,propertyName:n}),M_(s,e)):s}})}Lp.default=M_});var Pr=b(Tr=>{"use strict";Tr.__esModule=!0;Tr.Tokens=Tr.StructuralCharacters=Tr.Operators=void 0;var $A;(function(r){r.AND="AND",r.OR="OR",r.XOR="XOR",r.NOT="NOT"})($A=Tr.Operators||(Tr.Operators={}));var BA;(function(r){r.OPEN_PARENTHESIS="(",r.CLOSE_PARENTHESIS=")"})(BA=Tr.StructuralCharacters||(Tr.StructuralCharacters={}));var HA;(function(r){r.IDENTIFIER="IDENTIFIER",r.OPERATOR="OPERATOR",r.STRUCTURAL_CHARACTER="STRUCTURAL_CHARACTER",r.EOF="EOF",r.COMMENT="COMMENT"})(HA=Tr.Tokens||(Tr.Tokens={}))});var Gp=b(ri=>{"use strict";ri.__esModule=!0;ri.VALID_TOKENS=ri.OPERATOR_PRECEDENCE=void 0;var Ue=Pr();ri.OPERATOR_PRECEDENCE={NOT:0,XOR:1,AND:2,OR:3};ri.VALID_TOKENS={identifierOnly:[{name:Ue.Tokens.IDENTIFIER},{name:Ue.Tokens.STRUCTURAL_CHARACTER,value:Ue.StructuralCharacters.OPEN_PARENTHESIS}],identifierOrNot:[{name:Ue.Tokens.IDENTIFIER},{name:Ue.Tokens.STRUCTURAL_CHARACTER,value:Ue.StructuralCharacters.OPEN_PARENTHESIS},{name:Ue.Tokens.OPERATOR,value:Ue.Operators.NOT}],binaryOperator:[{name:Ue.Tokens.OPERATOR,value:Ue.Operators.AND},{name:Ue.Tokens.OPERATOR,value:Ue.Operators.OR},{name:Ue.Tokens.OPERATOR,value:Ue.Operators.XOR}],binaryOperatorOrClose:[{name:Ue.Tokens.OPERATOR,value:Ue.Operators.AND},{name:Ue.Tokens.OPERATOR,value:Ue.Operators.OR},{name:Ue.Tokens.OPERATOR,value:Ue.Operators.XOR},{name:Ue.Tokens.STRUCTURAL_CHARACTER,value:Ue.StructuralCharacters.CLOSE_PARENTHESIS}]}});var jp=b(vt=>{"use strict";vt.__esModule=!0;vt.ESCAPE_CHARACTER=vt.EOL=vt.COMMENT_DELIMITER=vt.QUOTED_IDENTIFIER_DELIMITER=vt.SEPARATORS=vt.OPERATORS=vt.STRUCTURAL_CHARACTERS=void 0;var ni=Pr();vt.STRUCTURAL_CHARACTERS={"(":ni.StructuralCharacters.OPEN_PARENTHESIS,")":ni.StructuralCharacters.CLOSE_PARENTHESIS};vt.OPERATORS={AND:ni.Operators.AND,OR:ni.Operators.OR,XOR:ni.Operators.XOR,NOT:ni.Operators.NOT};vt.SEPARATORS=new Set([32,9,10,13].map(function(r){return String.fromCodePoint(r)}));vt.QUOTED_IDENTIFIER_DELIMITER=String.fromCodePoint(34);vt.COMMENT_DELIMITER=String.fromCodePoint(35);vt.EOL=String.fromCodePoint(10);vt.ESCAPE_CHARACTER=String.fromCodePoint(92)});var F_=b(ir=>{"use strict";var $p=ir&&ir.__assign||function(){return $p=Object.assign||function(r){for(var e,t=1,n=arguments.length;t{"use strict";qu.__esModule=!0;qu.lex=void 0;var si=Pr(),Bt=jp(),ii=F_(),QA=function(r){for(var e=null,t=null,n=null,s=0;s{"use strict";var U_=Ht&&Ht.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,s=e.length,i;n{"use strict";var Nr=oi&&oi.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,s=e.length,i;n{"use strict";wt.__esModule=!0;wt.throwInvalidExpression=wt.isOperator=wt.isIdentifier=wt.notUtil=wt.xorUtil=wt.orUtil=wt.andUtil=void 0;var G_=Pr(),nP=function(r,e){return r&&e};wt.andUtil=nP;var sP=function(r,e){return r||e};wt.orUtil=sP;var iP=function(r,e){return r!==e};wt.xorUtil=iP;var aP=function(r){return!r};wt.notUtil=aP;var oP=function(r){var e=r.name,t=r.value;return e===G_.Tokens.IDENTIFIER&&typeof t=="string"};wt.isIdentifier=oP;var uP=function(r){var e=r.name,t=r.value;return e===G_.Tokens.OPERATOR&&typeof t=="string"};wt.isOperator=uP;var lP=function(r){throw new TypeError("Invalid postfix expression: ".concat(r))};wt.throwInvalidExpression=lP});var j_=b(Gu=>{"use strict";var Wa;Gu.__esModule=!0;Gu.OPERATOR_MAP=void 0;var Vp=Pr(),Kp=zp();Gu.OPERATOR_MAP=(Wa={},Wa[Vp.Operators.AND]=Kp.andUtil,Wa[Vp.Operators.OR]=Kp.orUtil,Wa[Vp.Operators.XOR]=Kp.xorUtil,Wa)});var B_=b(an=>{"use strict";var ui=an&&an.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,s=e.length,i;n{"use strict";var Qp=Ir&&Ir.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]});Ir.__esModule=!0;Ir.parse=Ir.evaluate=Ir.getEvaluator=void 0;var H_=B_();Qp(Ir,H_,"getEvaluator");Qp(Ir,H_,"evaluate");var mP=Hp();Qp(Ir,mP,"parse")});var FP={};Bv(FP,{default:()=>cl});module.exports=Hv(FP);var Lv=require("obsidian");var Ys=require("obsidian");var UP=new Error("timeout while waiting for mutex to become available"),qP=new Error("mutex already locked"),zv=new Error("request for lock canceled"),Vv=function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function o(c){try{l(n.next(c))}catch(f){a(f)}}function u(c){try{l(n.throw(c))}catch(f){a(f)}}function l(c){c.done?i(c.value):s(c.value).then(o,u)}l((n=n.apply(r,e||[])).next())})},fl=class{constructor(e,t=zv){this._value=e,this._cancelError=t,this._weightedQueues=[],this._weightedWaiters=[]}acquire(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise((t,n)=>{this._weightedQueues[e-1]||(this._weightedQueues[e-1]=[]),this._weightedQueues[e-1].push({resolve:t,reject:n}),this._dispatch()})}runExclusive(e,t=1){return Vv(this,void 0,void 0,function*(){let[n,s]=yield this.acquire(t);try{return yield e(n)}finally{s()}})}waitForUnlock(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise(t=>{this._weightedWaiters[e-1]||(this._weightedWaiters[e-1]=[]),this._weightedWaiters[e-1].push(t),this._dispatch()})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(e){this._value=e,this._dispatch()}release(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);this._value+=e,this._dispatch()}cancel(){this._weightedQueues.forEach(e=>e.forEach(t=>t.reject(this._cancelError))),this._weightedQueues=[]}_dispatch(){var e;for(let t=this._value;t>0;t--){let n=(e=this._weightedQueues[t-1])===null||e===void 0?void 0:e.shift();if(!n)continue;let s=this._value,i=t;this._value-=t,t=this._value+1,n.resolve([s,this._newReleaser(i)])}this._drainUnlockWaiters()}_newReleaser(e){let t=!1;return()=>{t||(t=!0,this.release(e))}}_drainUnlockWaiters(){for(let e=this._value;e>0;e--)!this._weightedWaiters[e-1]||(this._weightedWaiters[e-1].forEach(t=>t()),this._weightedWaiters[e-1]=[])}},Kv=function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function o(c){try{l(n.next(c))}catch(f){a(f)}}function u(c){try{l(n.throw(c))}catch(f){a(f)}}function l(c){c.done?i(c.value):s(c.value).then(o,u)}l((n=n.apply(r,e||[])).next())})},io=class{constructor(e){this._semaphore=new fl(1,e)}acquire(){return Kv(this,void 0,void 0,function*(){let[,e]=yield this._semaphore.acquire();return e})}runExclusive(e){return this._semaphore.runExclusive(()=>e())}isLocked(){return this._semaphore.isLocked()}waitForUnlock(){return this._semaphore.waitForUnlock()}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}};var Zo=vi(ze());var Dt=class{constructor(e,t){this.start=e,this.end=t,t.isBefore(e)&&(this.start=t,this.end=e),this.start=this.start.startOf("day"),this.end=this.end.startOf("day")}static buildRelative(e){let t=e==="week"?"isoWeek":e;return new Dt(window.moment().startOf(t).startOf("day"),window.moment().endOf(t).startOf("day"))}static buildInvalid(){return new Dt(window.moment.invalid(),window.moment.invalid())}isValid(){return this.start.isValid()&&this.end.isValid()}moveToPrevious(e){let t=window.moment.duration(1,e);this.start.subtract(t),this.end.subtract(t),(e==="month"||e==="quarter")&&(this.end=this.end.endOf(e).startOf("day"))}moveToNext(e){let t=window.moment.duration(1,e);this.start.add(t),this.end.add(t),(e==="month"||e==="quarter")&&(this.end=this.end.endOf(e).startOf("day"))}};var Wt=class{static parseDate(e,t=!1){return window.moment(Zo.parseDate(e,void 0,{forwardDate:t})).startOf("day")}static parseDateRange(e,t=!1){let n=[Wt.parseRelativeDateRange,Wt.parseNumberedDateRange,Wt.parseAbsoluteDateRange];for(let s of n){let i=s(e,t);if(i.isValid())return i}return Dt.buildInvalid()}static parseAbsoluteDateRange(e,t){let n=Zo.parse(e,void 0,{forwardDate:t});if(n.length===0)return Dt.buildInvalid();let s=n[0].start,i=n[1]&&n[1].start?n[1].start:s,a=window.moment(s.date()),o=window.moment(i.date());return new Dt(a,o)}static parseRelativeDateRange(e,t){let n=/(last|this|next) (week|month|quarter|year)/,s=e.match(n);if(s&&s.length===3){let i=s[1],a=s[2],o=Dt.buildRelative(a);switch(i){case"last":o.moveToPrevious(a);break;case"next":o.moveToNext(a);break}return o}return Dt.buildInvalid()}static parseNumberedDateRange(e,t){let n=[[/^\s*[0-9]{4}\s*$/,"YYYY","year"],[/^\s*[0-9]{4}-Q[1-4]\s*$/,"YYYY-Q","quarter"],[/^\s*[0-9]{4}-[0-9]{2}\s*$/,"YYYY-MM","month"],[/^\s*[0-9]{4}-W[0-9]{2}\s*$/,"YYYY-WW","isoWeek"]];for(let[s,i,a]of n){let o=e.match(s);if(o){let u=o[0].trim();return new Dt(window.moment(u,i).startOf(a),window.moment(u,i).endOf(a))}}return Dt.buildInvalid()}};var pC={td:"today",tm:"tomorrow",yd:"yesterday",tw:"this week",nw:"next week",weekend:"sat",we:"sat"};function Hr(r){for(let[e,t]of Object.entries(pC))r=r.replace(RegExp(`\\b${e}\\s`,"i"),t);return r}var Jo=["MO","TU","WE","TH","FR","SA","SU"],Be=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(Jo.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=Jo[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 Ae=function(r){return r!=null},Yt=function(r){return typeof r=="number"},np=function(r){return typeof r=="string"&&Jo.includes(r)},dt=Array.isArray,rr=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+=pe(t,e/t.length)),t.slice(0,e)+String(n))}var lb=function(r,e,t){var n=r.split(e);return t?n.slice(0,t).concat([n.slice(t).join(e)]):n},gt=function(r,e){var t=r%e;return t*e<0?t+e:t},eu=function(r,e){return{div:Math.floor(r/e),mod:gt(r,e)}},Gt=function(r){return!Ae(r)||r.length===0},We=function(r){return!Gt(r)},he=function(r,e){return We(r)&&r.indexOf(e)!==-1};var Dr=function(r,e,t,n,s,i){return n===void 0&&(n=0),s===void 0&&(s=0),i===void 0&&(i=0),new Date(Date.UTC(r,e-1,t,n,s,i))},mC=[31,28,31,30,31,30,31,31,30,31,30,31],fb=1e3*60*60*24,tu=9999,pb=Dr(1970,1,1),hC=[6,0,1,2,3,4,5];var Is=function(r){return r%4===0&&r%100!==0||r%400===0},sp=function(r){return r instanceof Date},Qn=function(r){return sp(r)&&!isNaN(r.getTime())},cb=function(r){return r.getTimezoneOffset()*60*1e3},gC=function(r,e){var t=r.getTime()-cb(r),n=e.getTime()-cb(e),s=t-n;return Math.round(s/fb)},wa=function(r){return gC(r,pb)},ru=function(r){return new Date(pb.getTime()+r*fb)},yC=function(r){var e=r.getUTCMonth();return e===1&&Is(r.getUTCFullYear())?29:mC[e]},zr=function(r){return hC[r.getUTCDay()]},ip=function(r,e){var t=Dr(r,e+1,1);return[zr(t),yC(t)]},nu=function(r,e){return e=e||r,new Date(Date.UTC(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()))},su=function(r){var e=new Date(r.getTime());return e},ap=function(r){for(var e=[],t=0;tthis.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}(),Kr=TC;var op=function(r,e){return op=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])},op(r,e)};function Ls(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");op(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var ft=function(){return ft=Object.assign||function(e){for(var t,n=1,s=arguments.length;ne[0].length)&&(e=i,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 ka(r,e){e===void 0&&(e=Xn);var t={},n=new kC(e.tokens);if(!n.start(r))return null;return s(),t;function s(){n.expect("every");var m=n.acceptNumber();if(m&&(t.interval=parseInt(m[0],10)),n.isDone())throw new Error("Unexpected end");switch(n.symbol){case"day(s)":t.freq=G.DAILY,n.nextSymbol()&&(a(),f());break;case"weekday(s)":t.freq=G.WEEKLY,t.byweekday=[G.MO,G.TU,G.WE,G.TH,G.FR],n.nextSymbol(),f();break;case"week(s)":t.freq=G.WEEKLY,n.nextSymbol()&&(i(),f());break;case"hour(s)":t.freq=G.HOURLY,n.nextSymbol()&&(i(),f());break;case"minute(s)":t.freq=G.MINUTELY,n.nextSymbol()&&(i(),f());break;case"month(s)":t.freq=G.MONTHLY,n.nextSymbol()&&(i(),f());break;case"year(s)":t.freq=G.YEARLY,n.nextSymbol()&&(i(),f());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":t.freq=G.WEEKLY;var y=n.symbol.substr(0,2).toUpperCase();if(t.byweekday=[G[y]],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var k=u();if(!k)throw new Error("Unexpected symbol "+n.symbol+", expected weekday");t.byweekday.push(G[k]),n.nextSymbol()}c(),f();break;case"january":case"february":case"march":case"april":case"may":case"june":case"july":case"august":case"september":case"october":case"november":case"december":if(t.freq=G.YEARLY,t.bymonth=[o()],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var E=o();if(!E)throw new Error("Unexpected symbol "+n.symbol+", expected month");t.bymonth.push(E),n.nextSymbol()}i(),f();break;default:throw new Error("Unknown symbol")}}function i(){var m=n.accept("on"),y=n.accept("the");if(!!(m||y))do{var k=l(),E=u(),x=o();if(k)E?(n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(G[E].nth(k))):(t.bymonthday||(t.bymonthday=[]),t.bymonthday.push(k),n.accept("day(s)"));else if(E)n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(G[E]);else if(n.symbol==="weekday(s)")n.nextSymbol(),t.byweekday||(t.byweekday=[G.MO,G.TU,G.WE,G.TH,G.FR]);else if(n.symbol==="week(s)"){n.nextSymbol();var v=n.acceptNumber();if(!v)throw new Error("Unexpected symbol "+n.symbol+", expected week number");for(t.byweekno=[parseInt(v[0],10)];n.accept("comma");){if(v=n.acceptNumber(),!v)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.byweekno.push(parseInt(v[0],10))}}else if(x)n.nextSymbol(),t.bymonth||(t.bymonth=[]),t.bymonth.push(x);else return}while(n.accept("comma")||n.accept("the")||n.accept("on"))}function a(){var m=n.accept("at");if(!!m)do{var y=n.acceptNumber();if(!y)throw new Error("Unexpected symbol "+n.symbol+", expected hour");for(t.byhour=[parseInt(y[0],10)];n.accept("comma");){if(y=n.acceptNumber(),!y)throw new Error("Unexpected symbol "+n.symbol+"; expected hour");t.byhour.push(parseInt(y[0],10))}}while(n.accept("comma")||n.accept("at"))}function o(){switch(n.symbol){case"january":return 1;case"february":return 2;case"march":return 3;case"april":return 4;case"may":return 5;case"june":return 6;case"july":return 7;case"august":return 8;case"september":return 9;case"october":return 10;case"november":return 11;case"december":return 12;default:return!1}}function u(){switch(n.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return n.symbol.substr(0,2).toUpperCase();default:return!1}}function l(){switch(n.symbol){case"last":return n.nextSymbol(),-1;case"first":return n.nextSymbol(),1;case"second":return n.nextSymbol(),n.accept("last")?-2:2;case"third":return n.nextSymbol(),n.accept("last")?-3:3;case"nth":var m=parseInt(n.value[1],10);if(m<-366||m>366)throw new Error("Nth out of range: "+m);return n.nextSymbol(),n.accept("last")?-m:m;default:return!1}}function c(){n.accept("on"),n.accept("the");var m=l();if(!!m)for(t.bymonthday=[m],n.nextSymbol();n.accept("comma");){if(m=l(),!m)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.bymonthday.push(m),n.nextSymbol()}}function f(){if(n.symbol==="until"){var m=Date.parse(n.text);if(!m)throw new Error("Cannot parse until date:"+n.text);t.until=new Date(m)}else n.accept("for")&&(t.count=parseInt(n.value[0],10),n.expect("number"))}}var ue;(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"})(ue||(ue={}));function Sa(r){return r12){var n=Math.floor(this.month/12),s=gt(this.month,12);this.month=s,this.year+=n,this.month===0&&(this.month=12,--this.year)}},e.prototype.addWeekly=function(t,n){n>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-n))+t*7:this.day+=-(this.getWeekday()-n)+t*7,this.fixDay()},e.prototype.addDaily=function(t){this.day+=t,this.fixDay()},e.prototype.addHours=function(t,n,s){for(n&&(this.hour+=Math.floor((23-this.hour)/t)*t);;){this.hour+=t;var i=eu(this.hour,24),a=i.div,o=i.mod;if(a&&(this.hour=o,this.addDaily(a)),Gt(s)||he(s,this.hour))break}},e.prototype.addMinutes=function(t,n,s,i){for(n&&(this.minute+=Math.floor((1439-(this.hour*60+this.minute))/t)*t);;){this.minute+=t;var a=eu(this.minute,60),o=a.div,u=a.mod;if(o&&(this.minute=u,this.addHours(o,!1,s)),(Gt(s)||he(s,this.hour))&&(Gt(i)||he(i,this.minute)))break}},e.prototype.addSeconds=function(t,n,s,i,a){for(n&&(this.second+=Math.floor((86399-(this.hour*3600+this.minute*60+this.second))/t)*t);;){this.second+=t;var o=eu(this.second,60),u=o.div,l=o.mod;if(u&&(this.second=l,this.addMinutes(u,!1,s,i)),(Gt(s)||he(s,this.hour))&&(Gt(i)||he(i,this.minute))&&(Gt(a)||he(a,this.second)))break}},e.prototype.fixDay=function(){if(!(this.day<=28)){var t=ip(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>tu))return;t=ip(this.year,this.month-1)[1]}}},e.prototype.add=function(t,n){var s=t.freq,i=t.interval,a=t.wkst,o=t.byhour,u=t.byminute,l=t.bysecond;switch(s){case ue.YEARLY:return this.addYears(i);case ue.MONTHLY:return this.addMonths(i);case ue.WEEKLY:return this.addWeekly(i,a);case ue.DAILY:return this.addDaily(i);case ue.HOURLY:return this.addHours(i,n,o);case ue.MINUTELY:return this.addMinutes(i,n,o,u);case ue.SECONDLY:return this.addSeconds(i,n,o,u,l)}},e}(qs);function lp(r){for(var e=[],t=Object.keys(r),n=0,s=t;n=-366&&n<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}}if(!(Boolean(e.byweekno)||We(e.byweekno)||We(e.byyearday)||Boolean(e.bymonthday)||We(e.bymonthday)||Ae(e.byweekday)||Ae(e.byeaster)))switch(e.freq){case G.YEARLY:e.bymonth||(e.bymonth=e.dtstart.getUTCMonth()+1),e.bymonthday=e.dtstart.getUTCDate();break;case G.MONTHLY:e.bymonthday=e.dtstart.getUTCDate();break;case G.WEEKLY:e.byweekday=[zr(e.dtstart)];break}if(Ae(e.bymonth)&&!dt(e.bymonth)&&(e.bymonth=[e.bymonth]),Ae(e.byyearday)&&!dt(e.byyearday)&&Yt(e.byyearday)&&(e.byyearday=[e.byyearday]),!Ae(e.bymonthday))e.bymonthday=[],e.bynmonthday=[];else if(dt(e.bymonthday)){for(var s=[],i=[],t=0;t0?s.push(n):n<0&&i.push(n)}e.bymonthday=s,e.bynmonthday=i}else e.bymonthday<0?(e.bynmonthday=[e.bymonthday],e.bymonthday=[]):(e.bynmonthday=[],e.bymonthday=[e.bymonthday]);if(Ae(e.byweekno)&&!dt(e.byweekno)&&(e.byweekno=[e.byweekno]),!Ae(e.byweekday))e.bynweekday=null;else if(Yt(e.byweekday))e.byweekday=[e.byweekday],e.bynweekday=null;else if(np(e.byweekday))e.byweekday=[Be.fromStr(e.byweekday).weekday],e.bynweekday=null;else if(e.byweekday instanceof Be)!e.byweekday.n||e.freq>G.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;tG.MONTHLY?a.push(u.weekday):o.push([u.weekday,u.n])}e.byweekday=We(a)?a:null,e.bynweekday=We(o)?o:null}return Ae(e.byhour)?Yt(e.byhour)&&(e.byhour=[e.byhour]):e.byhour=e.freq=4?(c=0,l=o.yearlen+gt(a-e.wkst,7)):l=n-c;for(var f=Math.floor(l/7),m=gt(l,7),y=Math.floor(f+m/4),k=0;k0&&E<=y){var x=void 0;E>1?(x=c+(E-1)*7,c!==u&&(x-=7-u)):x=c;for(var v=0;v<7&&(o.wnomask[x]=1,x++,o.wdaymask[x]!==e.wkst);v++);}}if(he(e.byweekno,1)){var x=c+y*7;if(c!==u&&(x-=7-u),x=4?(le=0,ie=B+gt(F-e.wkst,7)):ie=n-c,I=Math.floor(52+gt(ie,7)/4)}if(he(e.byweekno,I))for(var x=0;xi)return Qr(r);if(I>=t){var F=qb(I,e);if(!r.accept(F)||o&&(--o,!o))return Qr(r)}}else for(var v=y;vi)return Qr(r);if(I>=t){var F=qb(I,e);if(!r.accept(F)||o&&(--o,!o))return Qr(r)}}}if(e.interval===0||(u.add(e,E),u.year>tu))return Qr(r);Sa(n)||(c=l.gettimeset(n)(u.hour,u.minute,u.second,0)),l.rebuild(u.year,u.month)}}function FC(r,e,t){var n=t.bymonth,s=t.byweekno,i=t.byweekday,a=t.byeaster,o=t.bymonthday,u=t.bynmonthday,l=t.byyearday;return We(n)&&!he(n,r.mmask[e])||We(s)&&!r.wnomask[e]||We(i)&&!he(i,r.wdaymask[e])||We(r.nwdaymask)&&!r.nwdaymask[e]||a!==null&&!he(r.eastermask,e)||(We(o)||We(u))&&!he(o,r.mdaymask[e])&&!he(u,r.nmdaymask[e])||We(l)&&(e=r.yearlen&&!he(l,e+1-r.yearlen)&&!he(l,-r.nextyearlen+e-r.yearlen))}function qb(r,e){return new Zn(r,e.tzid).rezonedDate()}function Qr(r){return r.getValue()}function LC(r,e,t,n,s){for(var i=!1,a=e;a=G.HOURLY&&We(s)&&!he(s,e.hour)||n>=G.MINUTELY&&We(i)&&!he(i,e.minute)||n>=G.SECONDLY&&We(a)&&!he(a,e.second)?[]:r.gettimeset(n)(e.hour,e.minute,e.second,e.millisecond)}var nr={MO:new Be(0),TU:new Be(1),WE:new Be(2),TH:new Be(3),FR:new Be(4),SA:new Be(5),SU:new Be(6)},Oa={freq:ue.YEARLY,dtstart:null,interval:1,wkst:nr.MO,count:null,until:null,tzid:null,bysetpos:null,bymonth:null,bymonthday:null,bynmonthday:null,byyearday:null,byweekno:null,byweekday:null,bynweekday:null,byhour:null,byminute:null,bysecond:null,byeaster:null},wb=Object.keys(Oa),G=function(){function r(e,t){e===void 0&&(e={}),t===void 0&&(t=!1),this._cache=t?null:new Sb,this.origOptions=lp(e);var n=_b(e).parsedOptions;this.options=n}return r.parseText=function(e,t){return ka(e,t)},r.fromText=function(e,t){return gb(e,t)},r.fromString=function(e){return new r(r.parseString(e)||void 0)},r.prototype._iter=function(e){return iu(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 up("all",{},e));var t=this._cacheGet("all");return t===!1&&(t=this._iter(new Kr("all",{})),this._cacheAdd("all",t)),t},r.prototype.between=function(e,t,n,s){if(n===void 0&&(n=!1),!Qn(e)||!Qn(t))throw new Error("Invalid date passed in to RRule.between");var i={before:t,after:e,inc:n};if(s)return this._iter(new up("between",i,s));var a=this._cacheGet("between",i);return a===!1&&(a=this._iter(new Kr("between",i)),this._cacheAdd("between",a,i)),a},r.prototype.before=function(e,t){if(t===void 0&&(t=!1),!Qn(e))throw new Error("Invalid date passed in to RRule.before");var n={dt:e,inc:t},s=this._cacheGet("before",n);return s===!1&&(s=this._iter(new Kr("before",n)),this._cacheAdd("before",s,n)),s},r.prototype.after=function(e,t){if(t===void 0&&(t=!1),!Qn(e))throw new Error("Invalid date passed in to RRule.after");var n={dt:e,inc:t},s=this._cacheGet("after",n);return s===!1&&(s=this._iter(new Kr("after",n)),this._cacheAdd("after",s,n)),s},r.prototype.count=function(){return this.all().length},r.prototype.toString=function(){return Ra(this.origOptions)},r.prototype.toText=function(e,t,n){return yb(this,e,t,n)},r.prototype.isFullyConvertibleToText=function(){return Tb(this)},r.prototype.clone=function(){return new r(this.origOptions)},r.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],r.YEARLY=ue.YEARLY,r.MONTHLY=ue.MONTHLY,r.WEEKLY=ue.WEEKLY,r.DAILY=ue.DAILY,r.HOURLY=ue.HOURLY,r.MINUTELY=ue.MINUTELY,r.SECONDLY=ue.SECONDLY,r.MO=nr.MO,r.TU=nr.TU,r.WE=nr.WE,r.TH=nr.TH,r.FR=nr.FR,r.SA=nr.SA,r.SU=nr.SU,r.parseString=xa,r.optionsToString=Ra,r}();function Wb(r,e,t,n,s,i){var a={},o=r.accept;function u(m,y){t.forEach(function(k){k.between(m,y,!0).forEach(function(E){a[Number(E)]=!0})})}s.forEach(function(m){var y=new Zn(m,i).rezonedDate();a[Number(y)]=!0}),r.accept=function(m){var y=Number(m);return isNaN(y)?o.call(this,m):!a[y]&&(u(new Date(y-1),new Date(y+1)),!a[y])?(a[y]=!0,o.call(this,m)):!0},r.method==="between"&&(u(r.args.after,r.args.before),r.accept=function(m){var y=Number(m);return a[y]?!0:(a[y]=!0,o.call(this,m))});for(var l=0;l1||s.length||i.length||a.length){var c=new fp(l);return c.dtstart(o),c.tzid(u||void 0),n.forEach(function(m){c.rrule(new G(dp(m,o,u),l))}),s.forEach(function(m){c.rdate(m)}),i.forEach(function(m){c.exrule(new G(dp(m,o,u),l))}),a.forEach(function(m){c.exdate(m)}),e.compatible&&e.dtstart&&c.rdate(o),c}var f=n[0]||{};return new G(dp(f,f.dtstart||e.dtstart||o,f.tzid||e.tzid||u),l)}function au(r,e){return e===void 0&&(e={}),WC(r,YC(e))}function dp(r,e,t){return ft(ft({},r),{dtstart:e,tzid:t})}function YC(r){var e=[],t=Object.keys(r),n=Object.keys(Yb);if(t.forEach(function(s){he(n,s)||e.push(s)}),e.length)throw new Error("Invalid options: "+e.join(", "));return ft(ft({},Yb),r)}function GC(r){if(r.indexOf(":")===-1)return{name:"RRULE",value:r};var e=lb(r,":",1),t=e[0],n=e[1];return{name:t,value:n}}function jC(r){var e=GC(r),t=e.name,n=e.value,s=t.split(";");if(!s)throw new Error("empty property name");return{name:s[0].toUpperCase(),parms:s.slice(1),value:n}}function $C(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&&s[0]===" "?(t[n-1]+=s.slice(1),t.splice(n,1)):n+=1:t.splice(n,1)}return t}function BC(r){r.forEach(function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)})}function Gb(r,e){return BC(e),r.split(",").map(function(t){return Ea(t)})}function jb(r){var e=this;return function(t){if(t!==void 0&&(e["_".concat(r)]=t),e["_".concat(r)]!==void 0)return e["_".concat(r)];for(var n=0;nn}static nextAfterYears(e,t,n,i){let s=1;for(i!==void 0&&(s=Number.parseInt(i.trim(),10));et.isSkippingTooManyYears(e,t,s);)t=et.fromOneDayEarlier(e,n);return t}static isSkippingTooManyYears(e,t,n){return t.year()-e.year()>n}static fromOneDayEarlier(e,t){e.subtract(1,"days").endOf("day");let n=t.origOptions;return n.dtstart=e.startOf("day").toDate(),t=new $(n),window.moment(t.after(e.toDate()))}static addTimezone(e){return window.moment.utc(e).local(!0).startOf("day")}};function $o(r){return r.replace(/([.*+?^${}()|[\]/\\])/g,"\\$1")}var fn=class{constructor(){this._globalFilter="";this._removeGlobalFilter=!1}static getInstance(){return fn.instance||(fn.instance=new fn),fn.instance}get(){return this._globalFilter}set(e){this._globalFilter=e}reset(){this.set(fn.empty)}isEmpty(){return this.get()===fn.empty}equals(e){return this.get()===e}includedIn(e){let t=this.get();return e.includes(t)}prependTo(e){return this.get()+" "+e}removeAsWordFromDependingOnSettings(e){return this.getRemoveGlobalFilter()?this.removeAsWordFrom(e):e}getRemoveGlobalFilter(){return this._removeGlobalFilter}setRemoveGlobalFilter(e){this._removeGlobalFilter=e}removeAsWordFrom(e){if(this.isEmpty())return e;let t=RegExp("(^|\\s)"+$o(this.get())+"($|\\s)","ug");return e.search(t)>-1&&(e=e.replace(t,"$1$2").replace(" "," ").trim()),e}removeAsSubstringFrom(e){let t=this.get();return e.replace(t,"").trim()}},ge=fn;ge.empty="";var Vf=5;function Kf(r,e){let t=[r.startDateSymbol,r.scheduledDateSymbol,r.dueDateSymbol].join("|");return(n,i,s)=>{let a=[];return a=a.concat(mC(n,i,s,t,e)),a=a.concat(gC(n,i,s,r.recurrenceSymbol)),a=a.concat(hC(n,i,s,r)),a.length>0&&!a.some(o=>o.suggestionType==="match")&&a.unshift({suggestionType:"empty",displayText:"\u23CE",appendText:` -`}),a=a.slice(0,s.autoSuggestMaxItems),a}}function hC(r,e,t,n){let i=u=>Object.values(n.prioritySymbols).some(l=>l.length>0&&u.includes(l)),s=[];if(r.includes(n.dueDateSymbol)||s.push({displayText:`${n.dueDateSymbol} due date`,appendText:`${n.dueDateSymbol} `}),r.includes(n.startDateSymbol)||s.push({displayText:`${n.startDateSymbol} start date`,appendText:`${n.startDateSymbol} `}),r.includes(n.scheduledDateSymbol)||s.push({displayText:`${n.scheduledDateSymbol} scheduled date`,appendText:`${n.scheduledDateSymbol} `}),i(r)||(s.push({displayText:`${n.prioritySymbols.High} high priority`,appendText:`${n.prioritySymbols.High} `}),s.push({displayText:`${n.prioritySymbols.Medium} medium priority`,appendText:`${n.prioritySymbols.Medium} `}),s.push({displayText:`${n.prioritySymbols.Low} low priority`,appendText:`${n.prioritySymbols.Low} `}),s.push({displayText:`${n.prioritySymbols.Highest} highest priority`,appendText:`${n.prioritySymbols.Highest} `}),s.push({displayText:`${n.prioritySymbols.Lowest} lowest priority`,appendText:`${n.prioritySymbols.Lowest} `})),r.includes(n.recurrenceSymbol)||s.push({displayText:`${n.recurrenceSymbol} recurring (repeat)`,appendText:`${n.recurrenceSymbol} `}),!r.includes(n.createdDateSymbol)){let l=Nt.parseDate("today",!0).format(V.dateFormat);s.push({textToMatch:`${n.createdDateSymbol} created`,displayText:`${n.createdDateSymbol} created today (${l})`,appendText:`${n.createdDateSymbol} ${l} `})}let a=Qf(r,/([a-zA-Z'_-]*)/g,e),o=[];if(a&&a.length>0){let u=a[0];if(u.length>=Math.max(1,t.autoSuggestMinMatch)){let l=s.filter(c=>(c.textToMatch||c.displayText).toLowerCase().includes(u.toLowerCase()));for(let c of l)o.push({suggestionType:"match",displayText:c.displayText,appendText:c.appendText,insertAt:a.index,insertSkip:u.length})}}return o.length===0&&t.autoSuggestMinMatch===0?s:o}function mC(r,e,t,n,i){let s=["today","tomorrow","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","next week","next month","next year"],a=[],o=new RegExp(`(${n})\\s*([0-9a-zA-Z ]*)`,"ug"),u=Qf(r,o,e);if(u&&u.length>=2){let l=u[1],c=u[2];if(c.length1?Nt.parseDate(ki(c),!0):null;f&&f.isValid()&&a.push({displayText:`${f.format(V.dateFormat)}`,appendText:`${l} ${f.format(V.dateFormat)} `,insertAt:u.index,insertSkip:u[0].length});let h=1,T=s.filter(y=>c&&c.length>=h&&y.toLowerCase().includes(c.toLowerCase())).slice(0,i);T.length===0&&(T=s.slice(0,i));for(let y of T){let D=`${Nt.parseDate(y,!0).format(V.dateFormat)}`;a.push({suggestionType:"match",displayText:`${y} (${D})`,appendText:`${l} ${D} `,insertAt:u.index,insertSkip:u[0].length})}}return a}function gC(r,e,t,n){var u;let i=["every","every day","every week","every month","every month on the","every year","every week on Sunday","every week on Monday","every week on Tuesday","every week on Wednesday","every week on Thursday","every week on Friday","every week on Saturday"],s=[],a=new RegExp(`(${n})\\s*([0-9a-zA-Z ]*)`,"ug"),o=Qf(r,a,e);if(o&&o.length>=2){let l=o[1],c=o[2];if(c.length0){let y=(u=et.fromText({recurrenceRuleText:c,startDate:null,scheduledDate:null,dueDate:null}))==null?void 0:u.toText();if(y){let w=`${l} ${y} `;if(s.push({suggestionType:"match",displayText:`\u2705 ${y}`,appendText:w,insertAt:o.index,insertSkip:o[0].length}),o[0]==w)return[]}}let f=1,h=t.autoSuggestMaxItems/2,T=i.filter(y=>c&&c.length>=f&&y.toLowerCase().includes(c.toLowerCase())).slice(0,h);T.length===0&&c.trim().length===0&&(T=i.slice(0,h));for(let y of T)s.push({suggestionType:"match",displayText:`${y}`,appendText:`${l} ${y} `,insertAt:o.index,insertSkip:o[0].length})}return s}function Qf(r,e,t){let n=r.matchAll(e);for(let i of n)if((i==null?void 0:i.index)&&i.index<=t&&t<=i.index+i[0].length)return i}function yC(r,e){if(e.length===0)return!1;let t=Object.fromEntries(e.map(([i,s])=>[i,0])),n=Object.fromEntries(e.map(([i,s])=>[s,i]));for(let i of r)i in t?t[i]++:i in n&&(t[n[i]]=Math.max(0,t[n[i]]-1));return Object.values(t).some(i=>i>0)}function bb(r,e){return(t,n,i)=>yC(t.slice(0,n),e)?r(t,n,i):[]}function _b(r,e){return ge.getInstance().includedIn(r)&&TC(r,e)}function TC(r,e){if(r.length===0)return!1;let t=le.extractTaskComponents(r);if(!t)return!1;let n=t.indentation+t.listMarker+" ["+t.status.symbol+"] ";return e>=n.length}var qn=class{constructor(){this.hidePostponeButton=!1;this.hideTaskCount=!1;this.hideBacklinks=!1;this.hidePriority=!1;this.hideCreatedDate=!1;this.hideStartDate=!1;this.hideScheduledDate=!1;this.hideDoneDate=!1;this.hideDueDate=!1;this.hideRecurrenceRule=!1;this.hideEditButton=!1;this.hideUrgency=!0;this.hideTags=!1;this.shortMode=!1;this.explainQuery=!1}},pn=class{constructor(e){this.defaultLayout=["description","priority","recurrenceRule","createdDate","startDate","scheduledDate","dueDate","doneDate","blockLink"];this.hiddenTaskLayoutComponents=[];this.taskListHiddenClasses=[];e?this.options=e:this.options=new qn,this.shownTaskLayoutComponents=this.defaultLayout,this.applyOptions()}applyOptions(){let e=[[this.options.hidePriority,"priority"],[this.options.hideRecurrenceRule,"recurrenceRule"],[this.options.hideCreatedDate,"createdDate"],[this.options.hideStartDate,"startDate"],[this.options.hideScheduledDate,"scheduledDate"],[this.options.hideDueDate,"dueDate"],[this.options.hideDoneDate,"doneDate"]];for(let[n,i]of e)this.hideComponent(n,i),this.generateHiddenClassForTaskList(n,i);let t=[[this.options.hideTags,"tags"],[this.options.hideUrgency,"urgency"],[this.options.hideBacklinks,"backlinks"],[this.options.hideEditButton,"edit-button"],[this.options.hidePostponeButton,"postpone-button"]];for(let[n,i]of t)this.generateHiddenClassForTaskList(n,i);this.options.shortMode&&this.taskListHiddenClasses.push("tasks-layout-short-mode")}generateHiddenClassForTaskList(e,t){e&&this.taskListHiddenClasses.push(`tasks-layout-hide-${t}`)}hideComponent(e,t){e&&(this.hiddenTaskLayoutComponents.push(t),this.shownTaskLayoutComponents=this.shownTaskLayoutComponents.filter(n=>n!=t))}};var Xf={prioritySymbols:{Highest:"\u{1F53A}",High:"\u23EB",Medium:"\u{1F53C}",Low:"\u{1F53D}",Lowest:"\u23EC",None:""},startDateSymbol:"\u{1F6EB}",createdDateSymbol:"\u2795",scheduledDateSymbol:"\u23F3",dueDateSymbol:"\u{1F4C5}",doneDateSymbol:"\u2705",recurrenceSymbol:"\u{1F501}",TaskFormatRegularExpressions:{priorityRegex:/([🔺⏫🔼🔽⏬])$/u,startDateRegex:/🛫 *(\d{4}-\d{2}-\d{2})$/u,createdDateRegex:/➕ *(\d{4}-\d{2}-\d{2})$/u,scheduledDateRegex:/[⏳⌛] *(\d{4}-\d{2}-\d{2})$/u,dueDateRegex:/[📅📆🗓] *(\d{4}-\d{2}-\d{2})$/u,doneDateRegex:/✅ *(\d{4}-\d{2}-\d{2})$/u,recurrenceRegex:/🔁 ?([a-zA-Z0-9, !]+)$/iu}},$n=class{constructor(e){this.symbols=e}serialize(e){let t=new pn,n="";for(let i of t.shownTaskLayoutComponents)n+=this.componentToString(e,t,i);return n}componentToString(e,t,n){var f;let{prioritySymbols:i,startDateSymbol:s,createdDateSymbol:a,scheduledDateSymbol:o,doneDateSymbol:u,recurrenceSymbol:l,dueDateSymbol:c}=this.symbols;switch(n){case"description":return e.description;case"priority":{let h="";return e.priority==="0"?h=" "+i.Highest:e.priority==="1"?h=" "+i.High:e.priority==="2"?h=" "+i.Medium:e.priority==="4"?h=" "+i.Low:e.priority==="5"&&(h=" "+i.Lowest),h}case"startDate":return e.startDate?t.options.shortMode?" "+s:` ${s} ${e.startDate.format(V.dateFormat)}`:"";case"createdDate":return e.createdDate?t.options.shortMode?" "+a:` ${a} ${e.createdDate.format(V.dateFormat)}`:"";case"scheduledDate":return!e.scheduledDate||e.scheduledDateIsInferred?"":t.options.shortMode?" "+o:` ${o} ${e.scheduledDate.format(V.dateFormat)}`;case"doneDate":return e.doneDate?t.options.shortMode?" "+u:` ${u} ${e.doneDate.format(V.dateFormat)}`:"";case"dueDate":return e.dueDate?t.options.shortMode?" "+c:` ${c} ${e.dueDate.format(V.dateFormat)}`:"";case"recurrenceRule":return e.recurrence?t.options.shortMode?" "+l:` ${l} ${e.recurrence.toText()}`:"";case"blockLink":return(f=e.blockLink)!=null?f:"";default:throw new Error(`Don't know how to render task component of type '${n}'`)}}parsePriority(e){let{prioritySymbols:t}=this.symbols;switch(e){case t.Lowest:return"5";case t.Low:return"4";case t.Medium:return"2";case t.High:return"1";case t.Highest:return"0";default:return"3"}}deserialize(e){let{TaskFormatRegularExpressions:t}=this.symbols,n,i="3",s=null,a=null,o=null,u=null,l=null,c="",f=null,h="",T=20,y=0;do{n=!1;let w=e.match(t.priorityRegex);w!==null&&(i=this.parsePriority(w[1]),e=e.replace(t.priorityRegex,"").trim(),n=!0);let D=e.match(t.doneDateRegex);D!==null&&(u=window.moment(D[1],V.dateFormat),e=e.replace(t.doneDateRegex,"").trim(),n=!0);let C=e.match(t.dueDateRegex);C!==null&&(o=window.moment(C[1],V.dateFormat),e=e.replace(t.dueDateRegex,"").trim(),n=!0);let N=e.match(t.scheduledDateRegex);N!==null&&(a=window.moment(N[1],V.dateFormat),e=e.replace(t.scheduledDateRegex,"").trim(),n=!0);let L=e.match(t.startDateRegex);L!==null&&(s=window.moment(L[1],V.dateFormat),e=e.replace(t.startDateRegex,"").trim(),n=!0);let oe=e.match(t.createdDateRegex);oe!==null&&(l=window.moment(oe[1],V.dateFormat),e=e.replace(t.createdDateRegex,"").trim(),n=!0);let z=e.match(t.recurrenceRegex);z!==null&&(c=z[1].trim(),e=e.replace(t.recurrenceRegex,"").trim(),n=!0);let ie=e.match(V.hashTagsFromEnd);if(ie!=null){e=e.replace(V.hashTagsFromEnd,"").trim(),n=!0;let j=ie[0].trim();h=h.length>0?[j,h].join(" "):j}y++}while(n&&y<=T);return c.length>0&&(f=et.fromText({recurrenceRuleText:c,startDate:s,scheduledDate:a,dueDate:o})),h.length>0&&(e+=" "+h),{description:e,priority:i,startDate:s,createdDate:l,scheduledDate:a,dueDate:o,doneDate:u,recurrence:f,tags:le.extractHashtags(e)}}};function Yn(r){let e=["(?:",/(?=[^\]]+\])\[/,"|",/(?=[^)]+\))\(/,")",/ */,r,/ */,/[)\]]/,/(?: *,)?/,/$/].map(t=>t instanceof RegExp?t.source:t).join("");return new RegExp(e,r.flags)}var Zf={prioritySymbols:{Highest:"priority:: highest",High:"priority:: high",Medium:"priority:: medium",Low:"priority:: low",Lowest:"priority:: lowest",None:""},startDateSymbol:"start::",createdDateSymbol:"created::",scheduledDateSymbol:"scheduled::",dueDateSymbol:"due::",doneDateSymbol:"completion::",recurrenceSymbol:"repeat::",TaskFormatRegularExpressions:{priorityRegex:Yn(/priority:: *(highest|high|medium|low|lowest)/),startDateRegex:Yn(/start:: *(\d{4}-\d{2}-\d{2})/),createdDateRegex:Yn(/created:: *(\d{4}-\d{2}-\d{2})/),scheduledDateRegex:Yn(/scheduled:: *(\d{4}-\d{2}-\d{2})/),dueDateRegex:Yn(/due:: *(\d{4}-\d{2}-\d{2})/),doneDateRegex:Yn(/completion:: *(\d{4}-\d{2}-\d{2})/),recurrenceRegex:Yn(/repeat:: *([a-zA-Z0-9, !]+)/)}},Yo=class extends $n{constructor(){super(Zf)}parsePriority(e){switch(e){case"highest":return"0";case"high":return"1";case"medium":return"2";case"low":return"4";case"lowest":return"5";default:return"3"}}componentToString(e,t,n){let i=super.componentToString(e,t,n);return i!==""&&!["blockLink","description"].includes(n)?` [${i.trim()}]`:i}};var Lt=(a=>(a.TODO="TODO",a.DONE="DONE",a.IN_PROGRESS="IN_PROGRESS",a.CANCELLED="CANCELLED",a.NON_TASK="NON_TASK",a.EMPTY="EMPTY",a))(Lt||{}),He=class{constructor(e,t,n,i,s="TODO"){this.symbol=e,this.name=t,this.nextStatusSymbol=n,this.availableAsCommand=i,this.type=s}};var kt=class{get symbol(){return this.configuration.symbol}get name(){return this.configuration.name}get nextStatusSymbol(){return this.configuration.nextStatusSymbol}get nextSymbol(){return this.configuration.nextStatusSymbol}get availableAsCommand(){return this.configuration.availableAsCommand}get type(){return this.configuration.type}get typeGroupText(){let e=this.type,t;switch(e){case"IN_PROGRESS":t="1";break;case"TODO":t="2";break;case"DONE":t="3";break;case"CANCELLED":t="4";break;case"NON_TASK":t="5";break;case"EMPTY":t="6";break}return`%%${t}%%${e}`}constructor(e){this.configuration=e}static makeDone(){return new kt(new He("x","Done"," ",!0,"DONE"))}static makeEmpty(){return new kt(new He("","EMPTY","",!0,"EMPTY"))}static makeTodo(){return new kt(new He(" ","Todo","x",!0,"TODO"))}static makeCancelled(){return new kt(new He("-","Cancelled"," ",!0,"CANCELLED"))}static makeInProgress(){return new kt(new He("/","In Progress","x",!0,"IN_PROGRESS"))}static makeNonTask(){return new kt(new He("Q","Non-Task","A",!0,"NON_TASK"))}static getTypeForUnknownSymbol(e){switch(e){case"x":case"X":return"DONE";case"/":return"IN_PROGRESS";case"-":return"CANCELLED";case"":return"EMPTY";case" ":default:return"TODO"}}static getTypeFromStatusTypeString(e){return Lt[e]||"TODO"}static createUnknownStatus(e){return new kt(new He(e,"Unknown","x",!1,"TODO"))}static createFromImportedValue(e){let t=e[0],n=kt.getTypeFromStatusTypeString(e[3]);return new kt(new He(t,e[1],e[2],!1,n))}isCompleted(){return this.type==="DONE"}identicalTo(e){let t=["symbol","name","nextStatusSymbol","availableAsCommand","type"];for(let n of t)if(this[n]!==e[n])return!1;return!0}previewText(){let e="";return kt.tasksPluginCanCreateCommandsForStatuses()&&this.availableAsCommand&&(e=" Available as a command."),`- [${this.symbol}] => [${this.nextStatusSymbol}], name: '${this.name}', type: '${this.configuration.type}'.${e}`}static tasksPluginCanCreateCommandsForStatuses(){return!1}},X=kt;X.DONE=kt.makeDone(),X.EMPTY=kt.makeEmpty(),X.TODO=kt.makeTodo();var jo=class{constructor(e=!1,t=!1){this.ignoreSortInstructions=e,this.showTaskHiddenData=t}};var Pe=class{constructor(){this.coreStatuses=[X.makeTodo().configuration,X.makeDone().configuration],this.customStatuses=[X.makeInProgress().configuration,X.makeCancelled().configuration]}static addStatus(e,t){e.push(t)}static replaceStatus(e,t,n){let i=this.findStatusIndex(t,e);return i<=-1?!1:(e.splice(i,1,n),!0)}static findStatusIndex(e,t){let n=new X(e);return t.findIndex(i=>new X(i).previewText()==n.previewText())}static deleteStatus(e,t){let n=this.findStatusIndex(t,e);return n<=-1?!1:(e.splice(n,1),!0)}static deleteAllCustomStatuses(e){e.customStatuses.splice(0)}static resetAllCustomStatuses(e){Pe.deleteAllCustomStatuses(e),new Pe().customStatuses.forEach(n=>{Pe.addStatus(e.customStatuses,n)})}static bulkAddStatusCollection(e,t){let n=[];return t.forEach(i=>{e.customStatuses.find(a=>a.symbol==i[0]&&a.name==i[1]&&a.nextStatusSymbol==i[2])?n.push(`The status ${i[1]} (${i[0]}) is already added.`):Pe.addStatus(e.customStatuses,X.createFromImportedValue(i))}),n}static allStatuses(e){return e.coreStatuses.concat(e.customStatuses)}static applyToStatusRegistry(e,t){t.clearStatuses(),Pe.allStatuses(e).forEach(n=>{t.add(n)})}};var vb=[{index:9999,internalName:"INTERNAL_TESTING_ENABLED_BY_DEFAULT",displayName:"Test Item. Used to validate the Feature Framework.",description:"Description",enabledByDefault:!0,stable:!1}];var Br=class{constructor(e,t,n,i,s,a){this.internalName=e;this.index=t;this.description=n;this.displayName=i;this.enabledByDefault=s;this.stable=a}static get values(){let e=[];return vb.forEach(t=>{e=[...e,new Br(t.internalName,t.index,t.description,t.displayName,t.enabledByDefault,t.stable)]}),e}static get settingsFlags(){let e={};return Br.values.forEach(t=>{e[t.internalName]=t.enabledByDefault}),e}static fromString(e){for(let t of Br.values)if(e===t.internalName)return t;throw new RangeError(`Illegal argument passed to fromString(): ${e} does not correspond to any available Feature ${this.prototype.constructor.name}`)}};var Hr={tasksPluginEmoji:{displayName:"Tasks Emoji Format",taskSerializer:new $n(Xf),buildSuggestions:Kf(Xf,Vf)},dataview:{displayName:"Dataview",taskSerializer:new Yo,buildSuggestions:bb(Kf(Zf,Vf),[["(",")"],["[","]"]])}},Eb={globalQuery:"",globalFilter:"",removeGlobalFilter:!1,taskFormat:"tasksPluginEmoji",setCreatedDate:!1,setDoneDate:!0,autoSuggestInEditor:!0,autoSuggestMinMatch:0,autoSuggestMaxItems:6,provideAccessKeys:!0,useFilenameAsScheduledDate:!1,filenameAsDateFolders:[],recurrenceOnNextLine:!1,statusSettings:new Pe,features:Br.settingsFlags,generalSettings:{},headingOpened:{},debugSettings:new jo,loggingOptions:{minLevels:{"":"info",tasks:"info","tasks.Cache":"info","tasks.Events":"info","tasks.File":"info","tasks.Query":"info","tasks.Task":"info"}}},hn=we({},Eb);function wb(r,e){for(let t in r)e[t]===void 0&&(e[t]=r[t])}var Q=()=>(wb(Br.settingsFlags,hn.features),wb(Eb.loggingOptions.minLevels,hn.loggingOptions.minLevels),hn.statusSettings.customStatuses.forEach((r,e,t)=>{var i,s;let n=X.getTypeFromStatusTypeString(r.type);t[e]=new He((i=r.symbol)!=null?i:" ",r.name,(s=r.nextStatusSymbol)!=null?s:"x",r.availableAsCommand,n)}),we({},hn)),tt=r=>(hn=we(we({},hn),r),Q());var jn=(r,e)=>(hn.generalSettings[r]=e,Q()),kb=r=>{var e;return(e=hn.features[r])!=null?e:!1};function ga(){return Hr[Q().taskFormat]}function Go(r){let t={"<":"<",">":">","&":"&",'"':"""}[r];return t!==void 0?t:r}function Sb(r){let e=[...r],t="";return e.forEach(n=>{t+=Go(n)}),t}var ve=class{constructor(){this._registeredStatuses=[];this.addDefaultStatusTypes()}set(e){this.clearStatuses(),e.forEach(t=>{this.add(t)})}get registeredStatuses(){return this._registeredStatuses.filter(({symbol:e})=>e!==X.EMPTY.symbol)}static getInstance(){return ve.instance||(ve.instance=new ve),ve.instance}add(e){this.hasSymbol(e.symbol)||(e instanceof X?this._registeredStatuses.push(e):this._registeredStatuses.push(new X(e)))}bySymbol(e){return this.hasSymbol(e)?this.getSymbol(e):X.EMPTY}bySymbolOrCreate(e){return this.hasSymbol(e)?this.getSymbol(e):X.createUnknownStatus(e)}byName(e){return this._registeredStatuses.filter(({name:t})=>t===e).length>0?this._registeredStatuses.filter(({name:t})=>t===e)[0]:X.EMPTY}resetToDefaultStatuses(){this.clearStatuses(),this.addDefaultStatusTypes()}clearStatuses(){this._registeredStatuses=[]}getNextStatus(e){if(e.nextStatusSymbol!==""){let t=this.bySymbol(e.nextStatusSymbol);if(t!==null)return t}return X.EMPTY}getNextStatusOrCreate(e){let t=this.getNextStatus(e);return t.type!=="EMPTY"?t:X.createUnknownStatus(e.nextStatusSymbol)}findUnknownStatuses(e){let t=e.filter(s=>!this.hasSymbol(s.symbol)),n=new ve,i=[];return t.forEach(s=>{if(n.hasSymbol(s.symbol))return;let a=ve.copyStatusWithNewName(s,`Unknown (${s.symbol})`);i.push(a),n.add(a)}),i.sort((s,a)=>s.symbol.localeCompare(a.symbol,void 0,{numeric:!0}))}static copyStatusWithNewName(e,t){let n=new He(e.symbol,t,e.nextStatusSymbol,e.availableAsCommand,e.type);return new X(n)}getSymbol(e){return this._registeredStatuses.filter(({symbol:t})=>t===e)[0]}hasSymbol(e){return this._registeredStatuses.find(t=>t.symbol===e)!==void 0}addDefaultStatusTypes(){[X.makeTodo(),X.makeInProgress(),X.makeDone(),X.makeCancelled()].forEach(t=>{this.add(t)})}mermaidDiagram(e=!1){let t=this.registeredStatuses,n="mermaid",i=[],s=[];return t.forEach((a,o)=>{let u=this.getMermaidNodeLabel(a,e);i.push(`${o+1}${u}`);let l=this.getNextStatus(a),c=t.findIndex(T=>T.symbol===l.symbol),f=c!==-1,h=l.type!=="EMPTY";f&&h&&s.push(`${o+1} --> ${c+1}`)}),` +`).map(function(s){return s.replace(/^RRULE:/,"EXRULE:")}).filter(function(s){return!/^DTSTART/.test(s)}))}),this._rdate.length&&t.push(Hb("RDATE",this._rdate,this.tzid())),this._exdate.length&&t.push(Hb("EXDATE",this._exdate,this.tzid())),t},e.prototype.toString=function(){return this.valueOf().join(` +`)},e.prototype.clone=function(){var t=new e(!!this._cache);return this._rrule.forEach(function(n){return t.rrule(n.clone())}),this._exrule.forEach(function(n){return t.exrule(n.clone())}),this._rdate.forEach(function(n){return t.rdate(new Date(n.getTime()))}),this._exdate.forEach(function(n){return t.exdate(new Date(n.getTime()))}),t},e}(G);function $b(r,e){if(!(r instanceof G))throw new TypeError(String(r)+" is not RRule instance");he(e.map(String),String(r))||e.push(r)}function Bb(r,e){if(!(r instanceof Date))throw new TypeError(String(r)+" is not Date instance");he(e.map(Number),Number(r))||(e.push(r),Vr(e))}function Hb(r,e,t){var n=!t||t.toUpperCase()==="UTC",s=n?"".concat(r,":"):"".concat(r,";TZID=").concat(t,":"),i=e.map(function(a){return Fs(a.valueOf(),n)}).join(",");return"".concat(s).concat(i)}function Xr(r,e){return r!==null&&e===null?-1:r===null&&e!==null?1:r!==null&&e!==null?r.isValid()&&!e.isValid()?-1:!r.isValid()&&e.isValid()||r.isAfter(e)?1:r.isBefore(e)?-1:0:0}var st=class{constructor({rrule:e,baseOnToday:t,referenceDate:n,startDate:s,scheduledDate:i,dueDate:a}){this.rrule=e,this.baseOnToday=t,this.referenceDate=n,this.startDate=s,this.scheduledDate=i,this.dueDate=a}static fromText({recurrenceRuleText:e,startDate:t,scheduledDate:n,dueDate:s}){try{let i=e.match(/^([a-zA-Z0-9, !]+?)( when done)?$/i);if(i==null)return null;let a=i[1].trim(),o=i[2]!==void 0,u=G.parseText(a);if(u!==null){let l=null;s?l=window.moment(s):n?l=window.moment(n):t&&(l=window.moment(t)),!o&&l!==null?u.dtstart=window.moment(l).startOf("day").utc(!0).toDate():u.dtstart=window.moment().startOf("day").utc(!0).toDate();let c=new G(u);return new st({rrule:c,baseOnToday:o,referenceDate:l,startDate:t,scheduledDate:n,dueDate:s})}}catch(i){i instanceof Error&&console.log(i.message)}return null}toText(){let e=this.rrule.toText();return this.baseOnToday&&(e+=" when done"),e}next(){let e=this.nextReferenceDate();if(e!==null){let t=null,n=null,s=null;if(this.referenceDate){if(this.startDate){let i=window.moment.duration(this.startDate.diff(this.referenceDate));t=window.moment(e),t.add(Math.round(i.asDays()),"days")}if(this.scheduledDate){let i=window.moment.duration(this.scheduledDate.diff(this.referenceDate));n=window.moment(e),n.add(Math.round(i.asDays()),"days")}if(this.dueDate){let i=window.moment.duration(this.dueDate.diff(this.referenceDate));s=window.moment(e),s.add(Math.round(i.asDays()),"days")}}return{startDate:t,scheduledDate:n,dueDate:s}}return null}identicalTo(e){return this.baseOnToday!==e.baseOnToday||Xr(this.startDate,e.startDate)!==0||Xr(this.scheduledDate,e.scheduledDate)!==0||Xr(this.dueDate,e.dueDate)!==0?!1:this.toText()===e.toText()}nextReferenceDate(){if(this.baseOnToday){let e=window.moment();return this.nextReferenceDateFromToday(e).toDate()}else return this.nextReferenceDateFromOriginalReferenceDate().toDate()}nextReferenceDateFromToday(e){let t=new G(ot(ke({},this.rrule.origOptions),{dtstart:e.startOf("day").utc(!0).toDate()}));return this.nextAfter(e.endOf("day"),t)}nextReferenceDateFromOriginalReferenceDate(){var t;let e=window.moment((t=this.referenceDate)!=null?t:void 0).endOf("day");return this.nextAfter(e,this.rrule)}nextAfter(e,t){e.utc(!0);let n=window.moment(t.after(e.toDate())),s=this.toText(),i=s.match(/every( \d+)? month(s)?(.*)?/);i!==null&&(s.includes(" on ")||(n=st.nextAfterMonths(e,n,t,i[1])));let a=s.match(/every( \d+)? year(s)?(.*)?/);return a!==null&&(n=st.nextAfterYears(e,n,t,a[1])),st.addTimezone(n)}static nextAfterMonths(e,t,n,s){let i=1;for(s!==void 0&&(i=Number.parseInt(s.trim(),10));st.isSkippingTooManyMonths(e,t,i);)t=st.fromOneDayEarlier(e,n);return t}static isSkippingTooManyMonths(e,t,n){let s=t.month()-e.month();return s+=(t.year()-e.year())*12,s>n}static nextAfterYears(e,t,n,s){let i=1;for(s!==void 0&&(i=Number.parseInt(s.trim(),10));st.isSkippingTooManyYears(e,t,i);)t=st.fromOneDayEarlier(e,n);return t}static isSkippingTooManyYears(e,t,n){return t.year()-e.year()>n}static fromOneDayEarlier(e,t){e.subtract(1,"days").endOf("day");let n=t.origOptions;return n.dtstart=e.startOf("day").toDate(),t=new G(n),window.moment(t.after(e.toDate()))}static addTimezone(e){return window.moment.utc(e).local(!0).startOf("day")}};function ou(r){return r.replace(/([.*+?^${}()|[\]/\\])/g,"\\$1")}var vn=class{constructor(){this._globalFilter="";this._removeGlobalFilter=!1}static getInstance(){return vn.instance||(vn.instance=new vn),vn.instance}get(){return this._globalFilter}set(e){this._globalFilter=e}reset(){this.set(vn.empty)}isEmpty(){return this.get()===vn.empty}equals(e){return this.get()===e}includedIn(e){let t=this.get();return e.includes(t)}prependTo(e){return this.get()+" "+e}removeAsWordFromDependingOnSettings(e){return this.getRemoveGlobalFilter()?this.removeAsWordFrom(e):e}getRemoveGlobalFilter(){return this._removeGlobalFilter}setRemoveGlobalFilter(e){this._removeGlobalFilter=e}removeAsWordFrom(e){if(this.isEmpty())return e;let t=RegExp("(^|\\s)"+ou(this.get())+"($|\\s)","ug");return e.search(t)>-1&&(e=e.replace(t,"$1$2").replace(" "," ").trim()),e}removeAsSubstringFrom(e){let t=this.get();return e.replace(t,"").trim()}},ye=vn;ye.empty="";var pp=5;function mp(r,e){let t=[r.startDateSymbol,r.scheduledDateSymbol,r.dueDateSymbol].join("|");return(n,s,i)=>{let a=[];return a=a.concat(zC(n,s,i,t,e)),a=a.concat(VC(n,s,i,r.recurrenceSymbol)),a=a.concat(HC(n,s,i,r)),a.length>0&&!a.some(o=>o.suggestionType==="match")&&a.unshift({suggestionType:"empty",displayText:"\u23CE",appendText:` +`}),a=a.slice(0,i.autoSuggestMaxItems),a}}function HC(r,e,t,n){let s=u=>Object.values(n.prioritySymbols).some(l=>l.length>0&&u.includes(l)),i=[];if(r.includes(n.dueDateSymbol)||i.push({displayText:`${n.dueDateSymbol} due date`,appendText:`${n.dueDateSymbol} `}),r.includes(n.startDateSymbol)||i.push({displayText:`${n.startDateSymbol} start date`,appendText:`${n.startDateSymbol} `}),r.includes(n.scheduledDateSymbol)||i.push({displayText:`${n.scheduledDateSymbol} scheduled date`,appendText:`${n.scheduledDateSymbol} `}),s(r)||(i.push({displayText:`${n.prioritySymbols.High} high priority`,appendText:`${n.prioritySymbols.High} `}),i.push({displayText:`${n.prioritySymbols.Medium} medium priority`,appendText:`${n.prioritySymbols.Medium} `}),i.push({displayText:`${n.prioritySymbols.Low} low priority`,appendText:`${n.prioritySymbols.Low} `}),i.push({displayText:`${n.prioritySymbols.Highest} highest priority`,appendText:`${n.prioritySymbols.Highest} `}),i.push({displayText:`${n.prioritySymbols.Lowest} lowest priority`,appendText:`${n.prioritySymbols.Lowest} `})),r.includes(n.recurrenceSymbol)||i.push({displayText:`${n.recurrenceSymbol} recurring (repeat)`,appendText:`${n.recurrenceSymbol} `}),!r.includes(n.createdDateSymbol)){let l=Wt.parseDate("today",!0).format(z.dateFormat);i.push({textToMatch:`${n.createdDateSymbol} created`,displayText:`${n.createdDateSymbol} created today (${l})`,appendText:`${n.createdDateSymbol} ${l} `})}let a=hp(r,/([a-zA-Z'_-]*)/g,e),o=[];if(a&&a.length>0){let u=a[0];if(u.length>=Math.max(1,t.autoSuggestMinMatch)){let l=i.filter(c=>(c.textToMatch||c.displayText).toLowerCase().includes(u.toLowerCase()));for(let c of l)o.push({suggestionType:"match",displayText:c.displayText,appendText:c.appendText,insertAt:a.index,insertSkip:u.length})}}return o.length===0&&t.autoSuggestMinMatch===0?i:o}function zC(r,e,t,n,s){let i=["today","tomorrow","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","next week","next month","next year"],a=[],o=new RegExp(`(${n})\\s*([0-9a-zA-Z ]*)`,"ug"),u=hp(r,o,e);if(u&&u.length>=2){let l=u[1],c=u[2];if(c.length1?Wt.parseDate(Hr(c),!0):null;f&&f.isValid()&&a.push({displayText:`${f.format(z.dateFormat)}`,appendText:`${l} ${f.format(z.dateFormat)} `,insertAt:u.index,insertSkip:u[0].length});let m=1,y=i.filter(k=>c&&c.length>=m&&k.toLowerCase().includes(c.toLowerCase())).slice(0,s);y.length===0&&(y=i.slice(0,s));for(let k of y){let x=`${Wt.parseDate(k,!0).format(z.dateFormat)}`;a.push({suggestionType:"match",displayText:`${k} (${x})`,appendText:`${l} ${x} `,insertAt:u.index,insertSkip:u[0].length})}}return a}function VC(r,e,t,n){var u;let s=["every","every day","every week","every month","every month on the","every year","every week on Sunday","every week on Monday","every week on Tuesday","every week on Wednesday","every week on Thursday","every week on Friday","every week on Saturday"],i=[],a=new RegExp(`(${n})\\s*([0-9a-zA-Z ]*)`,"ug"),o=hp(r,a,e);if(o&&o.length>=2){let l=o[1],c=o[2];if(c.length0){let k=(u=st.fromText({recurrenceRuleText:c,startDate:null,scheduledDate:null,dueDate:null}))==null?void 0:u.toText();if(k){let E=`${l} ${k} `;if(i.push({suggestionType:"match",displayText:`\u2705 ${k}`,appendText:E,insertAt:o.index,insertSkip:o[0].length}),o[0]==E)return[]}}let f=1,m=t.autoSuggestMaxItems/2,y=s.filter(k=>c&&c.length>=f&&k.toLowerCase().includes(c.toLowerCase())).slice(0,m);y.length===0&&c.trim().length===0&&(y=s.slice(0,m));for(let k of y)i.push({suggestionType:"match",displayText:`${k}`,appendText:`${l} ${k} `,insertAt:o.index,insertSkip:o[0].length})}return i}function hp(r,e,t){let n=r.matchAll(e);for(let s of n)if((s==null?void 0:s.index)&&s.index<=t&&t<=s.index+s[0].length)return s}function KC(r,e){if(e.length===0)return!1;let t=Object.fromEntries(e.map(([s,i])=>[s,0])),n=Object.fromEntries(e.map(([s,i])=>[i,s]));for(let s of r)s in t?t[s]++:s in n&&(t[n[s]]=Math.max(0,t[n[s]]-1));return Object.values(t).some(s=>s>0)}function Vb(r,e){return(t,n,s)=>KC(t.slice(0,n),e)?r(t,n,s):[]}function Kb(r,e){return ye.getInstance().includedIn(r)&&QC(r,e)}function QC(r,e){if(r.length===0)return!1;let t=fe.extractTaskComponents(r);if(!t)return!1;let n=t.indentation+t.listMarker+" ["+t.status.symbol+"] ";return e>=n.length}var wn=class{constructor(){this.hidePostponeButton=!1;this.hideTaskCount=!1;this.hideBacklinks=!1;this.hideEditButton=!1;this.hideUrgency=!0;this.shortMode=!1;this.explainQuery=!1}};var Jn=class{constructor(){this.hidePriority=!1;this.hideCreatedDate=!1;this.hideStartDate=!1;this.hideScheduledDate=!1;this.hideDoneDate=!1;this.hideCancelledDate=!1;this.hideDueDate=!1;this.hideRecurrenceRule=!1;this.hideTags=!1}},gp=class{constructor(e){e?this.queryLayoutOptions=e:this.queryLayoutOptions=new wn}applyQueryLayoutOptions(e){let t=[[this.queryLayoutOptions.hideUrgency,"urgency"],[this.queryLayoutOptions.hideBacklinks,"backlinks"],[this.queryLayoutOptions.hideEditButton,"edit-button"],[this.queryLayoutOptions.hidePostponeButton,"postpone-button"]];for(let[n,s]of t)yp(e,n,s);this.queryLayoutOptions.shortMode&&e.push("tasks-layout-short-mode")}};function yp(r,e,t){e&&r.push(XC(t))}function XC(r){return`tasks-layout-hide-${r}`}var En=class extends gp{constructor(t,n){super(n);this.defaultLayout=["description","priority","recurrenceRule","createdDate","startDate","scheduledDate","dueDate","cancelledDate","doneDate","blockLink"];this._hiddenTaskLayoutComponents=[];this._taskListHiddenClasses=[];t?this.taskLayoutOptions=t:this.taskLayoutOptions=new Jn,this._shownTaskLayoutComponents=this.defaultLayout,this.applyOptions()}shownTaskLayoutComponents(){return this._shownTaskLayoutComponents}hiddenTaskLayoutComponents(){return this._hiddenTaskLayoutComponents}taskListHiddenClasses(){return this._taskListHiddenClasses}applyOptions(){this.applyTaskLayoutOptions(),this.applyQueryLayoutOptions(this._taskListHiddenClasses)}applyTaskLayoutOptions(){let t=[[this.taskLayoutOptions.hidePriority,"priority"],[this.taskLayoutOptions.hideRecurrenceRule,"recurrenceRule"],[this.taskLayoutOptions.hideCreatedDate,"createdDate"],[this.taskLayoutOptions.hideStartDate,"startDate"],[this.taskLayoutOptions.hideScheduledDate,"scheduledDate"],[this.taskLayoutOptions.hideDueDate,"dueDate"],[this.taskLayoutOptions.hideCancelledDate,"cancelledDate"],[this.taskLayoutOptions.hideDoneDate,"doneDate"]];for(let[n,s]of t)this.hideComponent(n,s),yp(this._taskListHiddenClasses,n,s);yp(this._taskListHiddenClasses,this.taskLayoutOptions.hideTags,"tags")}hideComponent(t,n){t&&(this._hiddenTaskLayoutComponents.push(n),this._shownTaskLayoutComponents=this._shownTaskLayoutComponents.filter(s=>s!=n))}};var Tp={prioritySymbols:{Highest:"\u{1F53A}",High:"\u23EB",Medium:"\u{1F53C}",Low:"\u{1F53D}",Lowest:"\u23EC",None:""},startDateSymbol:"\u{1F6EB}",createdDateSymbol:"\u2795",scheduledDateSymbol:"\u23F3",dueDateSymbol:"\u{1F4C5}",doneDateSymbol:"\u2705",cancelledDateSymbol:"\u274C",recurrenceSymbol:"\u{1F501}",TaskFormatRegularExpressions:{priorityRegex:/([🔺⏫🔼🔽⏬])$/u,startDateRegex:/🛫 *(\d{4}-\d{2}-\d{2})$/u,createdDateRegex:/➕ *(\d{4}-\d{2}-\d{2})$/u,scheduledDateRegex:/[⏳⌛] *(\d{4}-\d{2}-\d{2})$/u,dueDateRegex:/[📅📆🗓] *(\d{4}-\d{2}-\d{2})$/u,doneDateRegex:/✅ *(\d{4}-\d{2}-\d{2})$/u,cancelledDateRegex:/❌ *(\d{4}-\d{2}-\d{2})$/u,recurrenceRegex:/🔁 ?([a-zA-Z0-9, !]+)$/iu}},es=class{constructor(e){this.symbols=e}serialize(e){let t=new En,n="",s=!1;for(let i of t.shownTaskLayoutComponents())n+=this.componentToString(e,s,i);return n}componentToString(e,t,n){var m;let{prioritySymbols:s,startDateSymbol:i,createdDateSymbol:a,scheduledDateSymbol:o,doneDateSymbol:u,cancelledDateSymbol:l,recurrenceSymbol:c,dueDateSymbol:f}=this.symbols;switch(n){case"description":return e.description;case"priority":{let y="";return e.priority==="0"?y=" "+s.Highest:e.priority==="1"?y=" "+s.High:e.priority==="2"?y=" "+s.Medium:e.priority==="4"?y=" "+s.Low:e.priority==="5"&&(y=" "+s.Lowest),y}case"startDate":return e.startDate?t?" "+i:` ${i} ${e.startDate.format(z.dateFormat)}`:"";case"createdDate":return e.createdDate?t?" "+a:` ${a} ${e.createdDate.format(z.dateFormat)}`:"";case"scheduledDate":return!e.scheduledDate||e.scheduledDateIsInferred?"":t?" "+o:` ${o} ${e.scheduledDate.format(z.dateFormat)}`;case"doneDate":return e.doneDate?t?" "+u:` ${u} ${e.doneDate.format(z.dateFormat)}`:"";case"cancelledDate":return e.cancelledDate?t?" "+l:` ${l} ${e.cancelledDate.format(z.dateFormat)}`:"";case"dueDate":return e.dueDate?t?" "+f:` ${f} ${e.dueDate.format(z.dateFormat)}`:"";case"recurrenceRule":return e.recurrence?t?" "+c:` ${c} ${e.recurrence.toText()}`:"";case"blockLink":return(m=e.blockLink)!=null?m:"";default:throw new Error(`Don't know how to render task component of type '${n}'`)}}parsePriority(e){let{prioritySymbols:t}=this.symbols;switch(e){case t.Lowest:return"5";case t.Low:return"4";case t.Medium:return"2";case t.High:return"1";case t.Highest:return"0";default:return"3"}}deserialize(e){let{TaskFormatRegularExpressions:t}=this.symbols,n,s="3",i=null,a=null,o=null,u=null,l=null,c=null,f="",m=null,y="",k=20,E=0;do{n=!1;let x=e.match(t.priorityRegex);x!==null&&(s=this.parsePriority(x[1]),e=e.replace(t.priorityRegex,"").trim(),n=!0);let v=e.match(t.doneDateRegex);v!==null&&(u=window.moment(v[1],z.dateFormat),e=e.replace(t.doneDateRegex,"").trim(),n=!0);let I=e.match(t.cancelledDateRegex);I!==null&&(l=window.moment(I[1],z.dateFormat),e=e.replace(t.cancelledDateRegex,"").trim(),n=!0);let F=e.match(t.dueDateRegex);F!==null&&(o=window.moment(F[1],z.dateFormat),e=e.replace(t.dueDateRegex,"").trim(),n=!0);let le=e.match(t.scheduledDateRegex);le!==null&&(a=window.moment(le[1],z.dateFormat),e=e.replace(t.scheduledDateRegex,"").trim(),n=!0);let B=e.match(t.startDateRegex);B!==null&&(i=window.moment(B[1],z.dateFormat),e=e.replace(t.startDateRegex,"").trim(),n=!0);let ie=e.match(t.createdDateRegex);ie!==null&&(c=window.moment(ie[1],z.dateFormat),e=e.replace(t.createdDateRegex,"").trim(),n=!0);let W=e.match(t.recurrenceRegex);W!==null&&(f=W[1].trim(),e=e.replace(t.recurrenceRegex,"").trim(),n=!0);let j=e.match(z.hashTagsFromEnd);if(j!=null){e=e.replace(z.hashTagsFromEnd,"").trim(),n=!0;let ce=j[0].trim();y=y.length>0?[ce,y].join(" "):ce}E++}while(n&&E<=k);return f.length>0&&(m=st.fromText({recurrenceRuleText:f,startDate:i,scheduledDate:a,dueDate:o})),y.length>0&&(e+=" "+y),{description:e,priority:s,startDate:i,createdDate:c,scheduledDate:a,dueDate:o,doneDate:u,cancelledDate:l,recurrence:m,tags:fe.extractHashtags(e)}}};function kn(r){let e=["(?:",/(?=[^\]]+\])\[/,"|",/(?=[^)]+\))\(/,")",/ */,r,/ */,/[)\]]/,/(?: *,)?/,/$/].map(t=>t instanceof RegExp?t.source:t).join("");return new RegExp(e,r.flags)}var bp={prioritySymbols:{Highest:"priority:: highest",High:"priority:: high",Medium:"priority:: medium",Low:"priority:: low",Lowest:"priority:: lowest",None:""},startDateSymbol:"start::",createdDateSymbol:"created::",scheduledDateSymbol:"scheduled::",dueDateSymbol:"due::",doneDateSymbol:"completion::",cancelledDateSymbol:"cancelled::",recurrenceSymbol:"repeat::",TaskFormatRegularExpressions:{priorityRegex:kn(/priority:: *(highest|high|medium|low|lowest)/),startDateRegex:kn(/start:: *(\d{4}-\d{2}-\d{2})/),createdDateRegex:kn(/created:: *(\d{4}-\d{2}-\d{2})/),scheduledDateRegex:kn(/scheduled:: *(\d{4}-\d{2}-\d{2})/),dueDateRegex:kn(/due:: *(\d{4}-\d{2}-\d{2})/),doneDateRegex:kn(/completion:: *(\d{4}-\d{2}-\d{2})/),cancelledDateRegex:kn(/cancelled:: *(\d{4}-\d{2}-\d{2})/),recurrenceRegex:kn(/repeat:: *([a-zA-Z0-9, !]+)/)}},uu=class extends es{constructor(){super(bp)}parsePriority(e){switch(e){case"highest":return"0";case"high":return"1";case"medium":return"2";case"low":return"4";case"lowest":return"5";default:return"3"}}componentToString(e,t,n){let s=super.componentToString(e,t,n);return s!==""&&!["blockLink","description"].includes(n)?` [${s.trim()}]`:s}};var jt=(a=>(a.TODO="TODO",a.DONE="DONE",a.IN_PROGRESS="IN_PROGRESS",a.CANCELLED="CANCELLED",a.NON_TASK="NON_TASK",a.EMPTY="EMPTY",a))(jt||{}),Ve=class{constructor(e,t,n,s,i="TODO"){this.symbol=e,this.name=t,this.nextStatusSymbol=n,this.availableAsCommand=s,this.type=i}};var xt=class{get symbol(){return this.configuration.symbol}get name(){return this.configuration.name}get nextStatusSymbol(){return this.configuration.nextStatusSymbol}get nextSymbol(){return this.configuration.nextStatusSymbol}get availableAsCommand(){return this.configuration.availableAsCommand}get type(){return this.configuration.type}get typeGroupText(){let e=this.type,t;switch(e){case"IN_PROGRESS":t="1";break;case"TODO":t="2";break;case"DONE":t="3";break;case"CANCELLED":t="4";break;case"NON_TASK":t="5";break;case"EMPTY":t="6";break}return`%%${t}%%${e}`}constructor(e){this.configuration=e}static makeDone(){return new xt(new Ve("x","Done"," ",!0,"DONE"))}static makeEmpty(){return new xt(new Ve("","EMPTY","",!0,"EMPTY"))}static makeTodo(){return new xt(new Ve(" ","Todo","x",!0,"TODO"))}static makeCancelled(){return new xt(new Ve("-","Cancelled"," ",!0,"CANCELLED"))}static makeInProgress(){return new xt(new Ve("/","In Progress","x",!0,"IN_PROGRESS"))}static makeNonTask(){return new xt(new Ve("Q","Non-Task","A",!0,"NON_TASK"))}static getTypeForUnknownSymbol(e){switch(e){case"x":case"X":return"DONE";case"/":return"IN_PROGRESS";case"-":return"CANCELLED";case"":return"EMPTY";case" ":default:return"TODO"}}static getTypeFromStatusTypeString(e){return jt[e]||"TODO"}static createUnknownStatus(e){return new xt(new Ve(e,"Unknown","x",!1,"TODO"))}static createFromImportedValue(e){let t=e[0],n=xt.getTypeFromStatusTypeString(e[3]);return new xt(new Ve(t,e[1],e[2],!1,n))}isCompleted(){return this.type==="DONE"}isCancelled(){return this.type==="CANCELLED"}identicalTo(e){let t=["symbol","name","nextStatusSymbol","availableAsCommand","type"];for(let n of t)if(this[n]!==e[n])return!1;return!0}previewText(){let e="";return xt.tasksPluginCanCreateCommandsForStatuses()&&this.availableAsCommand&&(e=" Available as a command."),`- [${this.symbol}] => [${this.nextStatusSymbol}], name: '${this.name}', type: '${this.configuration.type}'.${e}`}static tasksPluginCanCreateCommandsForStatuses(){return!1}},Q=xt;Q.DONE=xt.makeDone(),Q.EMPTY=xt.makeEmpty(),Q.TODO=xt.makeTodo();var lu=class{constructor(e=!1,t=!1){this.ignoreSortInstructions=e,this.showTaskHiddenData=t}};var Ne=class{constructor(){this.coreStatuses=[Q.makeTodo().configuration,Q.makeDone().configuration],this.customStatuses=[Q.makeInProgress().configuration,Q.makeCancelled().configuration]}static addStatus(e,t){e.push(t)}static replaceStatus(e,t,n){let s=this.findStatusIndex(t,e);return s<=-1?!1:(e.splice(s,1,n),!0)}static findStatusIndex(e,t){let n=new Q(e);return t.findIndex(s=>new Q(s).previewText()==n.previewText())}static deleteStatus(e,t){let n=this.findStatusIndex(t,e);return n<=-1?!1:(e.splice(n,1),!0)}static deleteAllCustomStatuses(e){e.customStatuses.splice(0)}static resetAllCustomStatuses(e){Ne.deleteAllCustomStatuses(e),new Ne().customStatuses.forEach(n=>{Ne.addStatus(e.customStatuses,n)})}static bulkAddStatusCollection(e,t){let n=[];return t.forEach(s=>{e.customStatuses.find(a=>a.symbol==s[0]&&a.name==s[1]&&a.nextStatusSymbol==s[2])?n.push(`The status ${s[1]} (${s[0]}) is already added.`):Ne.addStatus(e.customStatuses,Q.createFromImportedValue(s))}),n}static allStatuses(e){return e.coreStatuses.concat(e.customStatuses)}static applyToStatusRegistry(e,t){t.clearStatuses(),Ne.allStatuses(e).forEach(n=>{t.add(n)})}};var Qb=[{index:9999,internalName:"INTERNAL_TESTING_ENABLED_BY_DEFAULT",displayName:"Test Item. Used to validate the Feature Framework.",description:"Description",enabledByDefault:!0,stable:!1}];var Zr=class{constructor(e,t,n,s,i,a){this.internalName=e;this.index=t;this.description=n;this.displayName=s;this.enabledByDefault=i;this.stable=a}static get values(){let e=[];return Qb.forEach(t=>{e=[...e,new Zr(t.internalName,t.index,t.description,t.displayName,t.enabledByDefault,t.stable)]}),e}static get settingsFlags(){let e={};return Zr.values.forEach(t=>{e[t.internalName]=t.enabledByDefault}),e}static fromString(e){for(let t of Zr.values)if(e===t.internalName)return t;throw new RangeError(`Illegal argument passed to fromString(): ${e} does not correspond to any available Feature ${this.prototype.constructor.name}`)}};var Jr={tasksPluginEmoji:{displayName:"Tasks Emoji Format",taskSerializer:new es(Tp),buildSuggestions:mp(Tp,pp)},dataview:{displayName:"Dataview",taskSerializer:new uu,buildSuggestions:Vb(mp(bp,pp),[["(",")"],["[","]"]])}},Zb={globalQuery:"",globalFilter:"",removeGlobalFilter:!1,taskFormat:"tasksPluginEmoji",setCreatedDate:!1,setDoneDate:!0,setCancelledDate:!0,autoSuggestInEditor:!0,autoSuggestMinMatch:0,autoSuggestMaxItems:6,provideAccessKeys:!0,useFilenameAsScheduledDate:!1,filenameAsDateFolders:[],recurrenceOnNextLine:!1,statusSettings:new Ne,features:Zr.settingsFlags,generalSettings:{},headingOpened:{},debugSettings:new lu,loggingOptions:{minLevels:{"":"info",tasks:"info","tasks.Cache":"info","tasks.Events":"info","tasks.File":"info","tasks.Query":"info","tasks.Task":"info"}}},Sn=ke({},Zb);function Xb(r,e){for(let t in r)e[t]===void 0&&(e[t]=r[t])}var K=()=>(Xb(Zr.settingsFlags,Sn.features),Xb(Zb.loggingOptions.minLevels,Sn.loggingOptions.minLevels),Sn.statusSettings.customStatuses.forEach((r,e,t)=>{var s,i;let n=Q.getTypeFromStatusTypeString(r.type);t[e]=new Ve((s=r.symbol)!=null?s:" ",r.name,(i=r.nextStatusSymbol)!=null?i:"x",r.availableAsCommand,n)}),ke({},Sn)),Ke=r=>(Sn=ke(ke({},Sn),r),K());var ts=(r,e)=>(Sn.generalSettings[r]=e,K()),Jb=r=>{var e;return(e=Sn.features[r])!=null?e:!1};function Ca(){return Jr[K().taskFormat]}function cu(r){let t={"<":"<",">":">","&":"&",'"':"""}[r];return t!==void 0?t:r}function e_(r){let e=[...r],t="";return e.forEach(n=>{t+=cu(n)}),t}var Ee=class{constructor(){this._registeredStatuses=[];this.addDefaultStatusTypes()}set(e){this.clearStatuses(),e.forEach(t=>{this.add(t)})}get registeredStatuses(){return this._registeredStatuses.filter(({symbol:e})=>e!==Q.EMPTY.symbol)}static getInstance(){return Ee.instance||(Ee.instance=new Ee),Ee.instance}add(e){this.hasSymbol(e.symbol)||(e instanceof Q?this._registeredStatuses.push(e):this._registeredStatuses.push(new Q(e)))}bySymbol(e){return this.hasSymbol(e)?this.getSymbol(e):Q.EMPTY}bySymbolOrCreate(e){return this.hasSymbol(e)?this.getSymbol(e):Q.createUnknownStatus(e)}byName(e){return this._registeredStatuses.filter(({name:t})=>t===e).length>0?this._registeredStatuses.filter(({name:t})=>t===e)[0]:Q.EMPTY}resetToDefaultStatuses(){this.clearStatuses(),this.addDefaultStatusTypes()}clearStatuses(){this._registeredStatuses=[]}getNextStatus(e){if(e.nextStatusSymbol!==""){let t=this.bySymbol(e.nextStatusSymbol);if(t!==null)return t}return Q.EMPTY}getNextStatusOrCreate(e){let t=this.getNextStatus(e);return t.type!=="EMPTY"?t:Q.createUnknownStatus(e.nextStatusSymbol)}getNextRecurrenceStatusOrCreate(e){let t=this.getNextStatusOrCreate(e),n=this.getNextRecurrenceStatusOfType(t,"TODO");if(n)return n;let s=this.getNextRecurrenceStatusOfType(t,"IN_PROGRESS");return s||this.bySymbolOrCreate(" ")}getNextRecurrenceStatusOfType(e,t){if(e.type===t)return e;let n=e;for(let s=0;s!this.hasSymbol(i.symbol)),n=new Ee,s=[];return t.forEach(i=>{if(n.hasSymbol(i.symbol))return;let a=Ee.copyStatusWithNewName(i,`Unknown (${i.symbol})`);s.push(a),n.add(a)}),s.sort((i,a)=>i.symbol.localeCompare(a.symbol,void 0,{numeric:!0}))}static copyStatusWithNewName(e,t){let n=new Ve(e.symbol,t,e.nextStatusSymbol,e.availableAsCommand,e.type);return new Q(n)}getSymbol(e){return this._registeredStatuses.filter(({symbol:t})=>t===e)[0]}hasSymbol(e){return this._registeredStatuses.find(t=>t.symbol===e)!==void 0}addDefaultStatusTypes(){[Q.makeTodo(),Q.makeInProgress(),Q.makeDone(),Q.makeCancelled()].forEach(t=>{this.add(t)})}mermaidDiagram(e=!1){let t=this.registeredStatuses,n="mermaid",s=[],i=[];return t.forEach((a,o)=>{let u=this.getMermaidNodeLabel(a,e);s.push(`${o+1}${u}`);let l=this.getNextStatus(a);if(this.addEdgeIfNotToInternal(t,l,i,o,!1),a.type==="DONE"){let c=this.getNextRecurrenceStatusOrCreate(a);c.symbol!==l.symbol&&this.addEdgeIfNotToInternal(t,c,i,o,!0)}}),` \`\`\`${n} flowchart LR @@ -139,20 +139,20 @@ classDef IN_PROGRESS stroke:#fa0,stroke-width:3px; classDef CANCELLED stroke:#ddd,stroke-width:3px; classDef NON_TASK stroke:#99e,stroke-width:3px; -${i.join(` -`)} ${s.join(` `)} +${i.join(` +`)} linkStyle default stroke:gray \`\`\` -`}getMermaidNodeLabel(e,t){let n=Sb(e.name),i=e.type;if(t){let s=Go(e.symbol),a=Go(e.nextStatusSymbol),o=`[${s}] -> [${a}]`,u=`'${n}'`,l=`(${i})`;return`["${u}
${o}
${l}"]:::${i}`}else return`["${n}"]:::${i}`}};var lr=class{static calculate(e){let t=0;if(e.dueDate!==null){let n=window.moment().startOf("day"),i=Math.round(n.diff(e.dueDate)/lr.milliSecondsPerDay),s;i>=7?s=1:i>=-14?s=(i+14)*.8/21+.2:s=.2,t+=s*lr.dueCoefficient}switch(e.scheduledDate!==null&&window.moment().isSameOrAfter(e.scheduledDate)&&(t+=1*lr.scheduledCoefficient),e.startDate!==null&&window.moment().isBefore(e.startDate)&&(t+=1*lr.startedCoefficient),e.priority){case"0":t+=1.5*lr.priorityCoefficient;break;case"1":t+=1*lr.priorityCoefficient;break;case"2":t+=.65*lr.priorityCoefficient;break;case"3":t+=.325*lr.priorityCoefficient;break;case"5":t-=.3*lr.priorityCoefficient;break}return t}},zr=lr;zr.dueCoefficient=12,zr.scheduledCoefficient=5,zr.startedCoefficient=-3,zr.priorityCoefficient=6,zr.milliSecondsPerDay=1e3*60*60*24;var ht=class{static fromPath(e){let{useFilenameAsScheduledDate:t,filenameAsDateFolders:n}=Q();return!t||!this.matchesAnyFolder(n,e)?null:this.extractDateFromPath(e)}static matchesAnyFolder(e,t){return e.length===0?!0:e.some(n=>t.startsWith(n+"/"))}static extractDateFromPath(e){let t=Math.max(0,e.lastIndexOf("/")+1),n=e.lastIndexOf("."),i=e.substring(t,n),s=/(\d{4})-(\d{2})-(\d{2})/.exec(i);if(s||(s=/(\d{4})(\d{2})(\d{2})/.exec(i)),s){let a=window.moment([parseInt(s[1]),parseInt(s[2])-1,parseInt(s[3])]);if(a.isValid())return a}return null}static canApplyFallback({startDate:e,scheduledDate:t,dueDate:n}){return e===null&&n===null&&t===null}static updateTaskPath(e,t,n){let i=e.scheduledDate,s=e.scheduledDateIsInferred;return n===null?s&&(s=!1,i=null):s?i=n:this.canApplyFallback(e)&&(i=n,s=!0),new le(it(we({},e),{taskLocation:e.taskLocation.fromRenamedFile(t),scheduledDate:i,scheduledDateIsInferred:s}))}static removeInferredStatusIfNeeded(e,t){let n=e.scheduledDateIsInferred?e.scheduledDate:null;return t.map(i=>(n!==null&&!n.isSame(i.scheduledDate,"day")&&(i=new le(it(we({},i),{scheduledDateIsInferred:!1}))),i))}};var Ob=require("obsidian");var Vr=class{constructor(e,t){this.name=e,this.sortOrder=t}get groupText(){return this.name!==""?`%%${this.sortOrder}%% ${this.name}`:""}};var rt=class{constructor(e){this._date=null;this._date=e}get moment(){return this._date}formatAsDate(e=""){return this.format(V.dateFormat,e)}formatAsDateAndTime(e=""){return this.format(V.dateTimeFormat,e)}format(e,t=""){return this._date?this._date.format(e):t}toISOString(e){return this._date?this._date.toISOString(e):""}get category(){let e=window.moment(),t=this.moment;return t?t.isBefore(e,"day")?new Vr("Overdue",1):t.isSame(e,"day")?new Vr("Today",2):new Vr("Future",3):new Vr("Undated",4)}get fromNow(){let e=this.moment;if(!e)return new Vr("",0);let t=this.fromNowOrder(e);return new Vr(e.fromNow(),t)}fromNowOrder(e){let t=window.moment(),n=e.isSameOrBefore(t,"day"),i=this.fromNowStartDateOfGroup(e,n,t);return Number((n?1:3)+i.format("YYYYMMDD"))}fromNowStartDateOfGroup(e,t,n){let i=e.fromNow(!0).split(" "),s,a=Number(i[0]);isNaN(a)?s=1:s=a;let o=i[1];return t?n.subtract(s,o):n.add(s,o)}postpone(e="days",t=1){if(!this._date)throw new Ob.Notice("Cannot postpone a null date");let n=window.moment().startOf("day");return this._date.isSameOrAfter(n,"day")?this._date.clone().add(t,e):n.add(t,e)}};var Mi=class{constructor(e){this._path=e}get path(){return this._path}get pathWithoutExtension(){return this.withoutExtension(this.path)}withoutExtension(e){return e.replace(/\.md$/,"")}get root(){let e=this.path.replace(/\\/g,"/");e.charAt(0)==="/"&&(e=e.substring(1));let t=e.indexOf("/");return t==-1?"/":e.substring(0,t+1)}get folder(){let e=this.path,t=this.filename,n=e.substring(0,e.lastIndexOf(t));return n===""?"/":n}get filename(){let e=this.path.match(/([^/]+)$/);return e!==null?e[1]:""}get filenameWithoutExtension(){return this.withoutExtension(this.filename)}};var Kr=class{static priorityNameUsingNone(e){let t="ERROR";switch(e){case"1":t="High";break;case"0":t="Highest";break;case"2":t="Medium";break;case"3":t="None";break;case"4":t="Low";break;case"5":t="Lowest";break}return t}static priorityNameUsingNormal(e){return Kr.priorityNameUsingNone(e).replace("None","Normal")}};var _C=require("obsidian"),Mb=as(Rb());var Jf=class extends Mb.EventEmitter2{constructor(){super(...arguments);this.options={minLevels:{"":"info",tasks:"info"}};this.consoleLoggerRegistered=!1;this.arrAvg=t=>t.reduce((n,i)=>n+i,0)/t.length}configure(t){return this.options=Object.assign({},this.options,t),this}getLogger(t){let n="none",i="";for(let s in this.options.minLevels)t.startsWith(s)&&s.length>=i.length&&(n=this.options.minLevels[s],i=s);return new ep(this,t,n)}onLogEntry(t){return this.on("log",t),this}registerConsoleLogger(){return this.consoleLoggerRegistered?this:(this.onLogEntry(t=>{let n=`[${window.moment().format("YYYY-MM-DD-HH:mm:ss.SSS")}][${t.level}][${t.module}]`;switch(t.traceId&&(n+=`[${t.traceId}]`),n+=` ${t.message}`,t.objects===void 0&&(t.objects=""),t.level){case"trace":console.trace(n,t.objects);break;case"debug":console.debug(n,t.objects);break;case"info":console.info(n,t.objects);break;case"warn":console.warn(n,t.objects);break;case"error":console.error(n,t.objects);break;default:console.log(`{${t.level}} ${n}`,t.objects)}}),this.consoleLoggerRegistered=!0,this)}},St=new Jf,ep=class{constructor(e,t,n){this.levels={trace:1,debug:2,info:3,warn:4,error:5};this.logManager=e,this.module=t,this.minLevel=this.levelToInt(n)}levelToInt(e){return e.toLowerCase()in this.levels?this.levels[e.toLowerCase()]:99}log(e,t,n){if(this.levelToInt(e){r.debug(`${e} ==> ${i+1} : ${n.toFileLineString()}`)})}var Ut=class{},V=Ut;V.dateFormat="YYYY-MM-DD",V.dateTimeFormat="YYYY-MM-DD HH:mm",V.indentationRegex=/^([\s\t>]*)/,V.listMarkerRegex=/([-*+]|[0-9]+\.)/,V.checkboxRegex=/\[(.)\]/u,V.afterCheckboxRegex=/ *(.*)/u,V.taskRegex=new RegExp(Ut.indentationRegex.source+Ut.listMarkerRegex.source+" +"+Ut.checkboxRegex.source+Ut.afterCheckboxRegex.source,"u"),V.nonTaskRegex=new RegExp(Ut.indentationRegex.source+Ut.listMarkerRegex.source+"? *("+Ut.checkboxRegex.source+")?"+Ut.afterCheckboxRegex.source,"u"),V.listItemRegex=new RegExp(Ut.indentationRegex.source+Ut.listMarkerRegex.source),V.blockLinkRegex=/ \^[a-zA-Z0-9-]+$/u,V.hashTags=/(^|\s)#[^ !@#$%^&*(),.?":{}|<>]+/g,V.hashTagsFromEnd=new RegExp(Ut.hashTags.source+"$");var le=class{constructor({status:e,description:t,taskLocation:n,indentation:i,listMarker:s,priority:a,createdDate:o,startDate:u,scheduledDate:l,dueDate:c,doneDate:f,recurrence:h,blockLink:T,tags:y,originalMarkdown:w,scheduledDateIsInferred:D}){this._urgency=null;this.status=e,this.description=t,this.indentation=i,this.listMarker=s,this.taskLocation=n,this.tags=y,this.priority=a,this.createdDate=o,this.startDate=u,this.scheduledDate=l,this.dueDate=c,this.doneDate=f,this.recurrence=h,this.blockLink=T,this.originalMarkdown=w,this.scheduledDateIsInferred=D}static fromLine({line:e,taskLocation:t,fallbackDate:n}){let i=le.extractTaskComponents(e);return i===null||!ge.getInstance().includedIn(i.body)?null:le.parseTaskSignifiers(e,t,n)}static parseTaskSignifiers(e,t,n){let i=le.extractTaskComponents(e);if(i===null)return null;let{taskSerializer:s}=ga(),a=s.deserialize(i.body),o=!1;return ht.canApplyFallback(a)&&n!==null&&(a.scheduledDate=n,o=!0),a.tags=a.tags.map(u=>u.trim()),a.tags=a.tags.filter(u=>!ge.getInstance().equals(u)),new le(it(we(we({},i),a),{taskLocation:t,originalMarkdown:e,scheduledDateIsInferred:o}))}static extractTaskComponents(e){let t=e.match(V.taskRegex);if(t===null)return null;let n=t[1],i=t[2],s=t[3],a=ve.getInstance().bySymbolOrCreate(s),o=t[4].trim(),u=o.match(V.blockLinkRegex),l=u!==null?u[0]:"";return l!==""&&(o=o.replace(V.blockLinkRegex,"").trim()),{indentation:n,listMarker:i,status:a,body:o,blockLink:l}}toString(){return ga().taskSerializer.serialize(this)}toFileLineString(){return`${this.indentation}${this.listMarker} [${this.status.symbol}] ${this.toString()}`}toggle(){let e=St.getLogger("tasks.Task"),t="toggle()";Bo(e,t,this);let n=ve.getInstance().getNextStatusOrCreate(this.status),i=this.handleNewStatus(n);return Ho(e,t,i),i}handleNewStatus(e){if(e.identicalTo(this.status))return[this];let t=null;if(e.isCompleted())if(this.status.isCompleted())t=this.doneDate;else{let{setDoneDate:a}=Q();a&&(t=window.moment())}let n=null;e.isCompleted()&&!this.status.isCompleted()&&this.recurrence!==null&&(n=this.recurrence.next());let i=new le(it(we({},this),{status:e,doneDate:t})),s=[];if(n!==null){let{setCreatedDate:a}=Q(),o=null;a&&(o=window.moment());let u=ve.getInstance().getNextStatusOrCreate(e),l=new le(it(we(we({},this),n),{status:u,blockLink:"",createdDate:o}));s.push(l)}return s.push(i),s}toggleWithRecurrenceInUsersOrder(){let e=this.toggle(),{recurrenceOnNextLine:t}=Q();return t?e.reverse():e}handleNewStatusWithRecurrenceInUsersOrder(e){St.getLogger("tasks.Task").debug(`changed task ${this.taskLocation.path} ${this.taskLocation.lineNumber} ${this.originalMarkdown} status to ${e}`);let n=this.handleNewStatus(e),{recurrenceOnNextLine:i}=Q();return i?n.reverse():n}get isDone(){return this.status.type==="DONE"||this.status.type==="CANCELLED"||this.status.type==="NON_TASK"}get priorityNumber(){return Number.parseInt(this.priority)}get priorityNameGroupText(){let e=Kr.priorityNameUsingNormal(this.priority);return`%%${this.priority}%%${e} priority`}get descriptionWithoutTags(){return this.description.replace(V.hashTags,"").trim()}get priorityName(){return Kr.priorityNameUsingNormal(this.priority)}get urgency(){return this._urgency===null&&(this._urgency=zr.calculate(this)),this._urgency}get path(){return this.taskLocation.path}get created(){return new rt(this.createdDate)}get done(){return new rt(this.doneDate)}get due(){return new rt(this.dueDate)}get scheduled(){return new rt(this.scheduledDate)}get start(){return new rt(this.startDate)}get happensDates(){return Array.of(this.startDate,this.scheduledDate,this.dueDate)}get happens(){let t=this.happensDates.sort(Gr);return new rt(t[0])}get isRecurring(){return this.recurrence!==null}get recurrenceRule(){return this.recurrence?this.recurrence.toText():""}get heading(){return this.precedingHeader}get hasHeading(){return this.precedingHeader!==null}get file(){return new Mi(this.path)}get filename(){let e=this.path.match(/([^/]+)\.md$/);return e!==null?e[1]:null}get lineNumber(){return this.taskLocation.lineNumber}get sectionStart(){return this.taskLocation.sectionStart}get sectionIndex(){return this.taskLocation.sectionIndex}get precedingHeader(){return this.taskLocation.precedingHeader}getLinkText({isFilenameUnique:e}){let t;return e?t=this.filename:t="/"+this.path,t===null?null:(this.precedingHeader!==null&&this.precedingHeader!==t&&(t=t+" > "+this.precedingHeader),t)}static tasksListsIdentical(e,t){return e.length!==t.length?!1:e.every((n,i)=>n.identicalTo(t[i]))}identicalTo(e){let t=["description","path","indentation","listMarker","lineNumber","sectionStart","sectionIndex","precedingHeader","priority","blockLink","scheduledDateIsInferred"];for(let s of t)if(this[s]!==e[s])return!1;if(!this.status.identicalTo(e.status)||this.tags.length!==e.tags.length||!this.tags.every(function(s,a){return s===e.tags[a]}))return!1;t=le.allDateFields();for(let s of t){let a=this[s],o=e[s];if(Gr(a,o)!==0)return!1}let n=this.recurrence,i=e.recurrence;return n===null&&i!==null||n!==null&&i===null?!1:!(n&&i&&!n.identicalTo(i))}static allDateFields(){return["createdDate","startDate","scheduledDate","dueDate","doneDate"]}static extractHashtags(e){var t,n;return(n=(t=e.match(V.hashTags))==null?void 0:t.map(i=>i.trim()))!=null?n:[]}};var ya=class{constructor(e){this.fetch=e;this._value=void 0}get value(){return this._value===void 0&&(this._value=this.fetch()),this._value}};var ct=class{constructor(e,t,n,i,s){this._path=e,this._lineNumber=t,this._sectionStart=n,this._sectionIndex=i,this._precedingHeader=s}static fromUnknownPosition(e){return new ct(e,0,0,0,null)}fromRenamedFile(e){return new ct(e,this.lineNumber,this.sectionStart,this.sectionIndex,this.precedingHeader)}get path(){return this._path}get lineNumber(){return this._lineNumber}get sectionStart(){return this._sectionStart}get sectionIndex(){return this._sectionIndex}get precedingHeader(){return this._precedingHeader}};var Gn=class{constructor({metadataCache:e,vault:t,events:n}){this.logger=St.getLogger("tasks.Cache");this.logger.debug("Creating Cache object"),this.metadataCache=e,this.metadataCacheEventReferences=[],this.vault=t,this.vaultEventReferences=[],this.events=n,this.eventsEventReferences=[],this.tasksMutex=new Wa,this.state="Cold",this.logger.debug("Cache.constructor(): state = Cold"),this.tasks=[],this.loadedAfterFirstResolve=!1,this.subscribeToCache(),this.subscribeToVault(),this.subscribeToEvents(),this.loadVault()}unload(){this.logger.info("Unloading Cache");for(let e of this.metadataCacheEventReferences)this.metadataCache.offref(e);for(let e of this.vaultEventReferences)this.vault.offref(e);for(let e of this.eventsEventReferences)this.events.off(e)}getTasks(){return this.tasks}getState(){return this.state}notifySubscribers(){this.logger.debug("Cache.notifySubscribers()"),this.events.triggerCacheUpdate({tasks:this.tasks,state:this.state})}subscribeToCache(){this.logger.debug("Cache.subscribeToCache()");let e=this.metadataCache.on("resolved",()=>F(this,null,function*(){this.loadedAfterFirstResolve||(this.loadedAfterFirstResolve=!0,this.loadVault())}));this.metadataCacheEventReferences.push(e);let t=this.metadataCache.on("changed",n=>{this.tasksMutex.runExclusive(()=>{this.indexFile(n)})});this.metadataCacheEventReferences.push(t)}subscribeToVault(){this.logger.debug("Cache.subscribeToVault()");let{useFilenameAsScheduledDate:e}=Q(),t=this.vault.on("create",s=>{s instanceof Ci.TFile&&(this.logger.debug(`Cache.subscribeToVault.createdEventReference() ${s.path}`),this.tasksMutex.runExclusive(()=>{this.indexFile(s)}))});this.vaultEventReferences.push(t);let n=this.vault.on("delete",s=>{s instanceof Ci.TFile&&(this.logger.debug(`Cache.subscribeToVault.deletedEventReference() ${s.path}`),this.tasksMutex.runExclusive(()=>{this.tasks=this.tasks.filter(a=>a.path!==s.path),this.notifySubscribers()}))});this.vaultEventReferences.push(n);let i=this.vault.on("rename",(s,a)=>{s instanceof Ci.TFile&&(this.logger.debug(`Cache.subscribeToVault.renamedEventReference() ${s.path}`),this.tasksMutex.runExclusive(()=>{let o=new ya(()=>ht.fromPath(s.path));this.tasks=this.tasks.map(u=>u.path===a?e?ht.updateTaskPath(u,s.path,o.value):new le(it(we({},u),{taskLocation:u.taskLocation.fromRenamedFile(s.path)})):u),this.notifySubscribers()}))});this.vaultEventReferences.push(i)}subscribeToEvents(){this.logger.debug("Cache.subscribeToEvents()");let e=this.events.onRequestCacheUpdate(t=>{t({tasks:this.tasks,state:this.state})});this.eventsEventReferences.push(e)}loadVault(){return this.logger.debug("Cache.loadVault()"),this.tasksMutex.runExclusive(()=>F(this,null,function*(){this.state="Initializing",this.logger.debug("Cache.loadVault(): state = Initializing"),yield Promise.all(this.vault.getMarkdownFiles().map(e=>this.indexFile(e))),this.state="Warm",this.logger.debug("Cache.loadVault(): state = Warm"),this.notifySubscribers()}))}indexFile(e){return F(this,null,function*(){let t=this.metadataCache.getFileCache(e);if(t==null)return;if(!e.path.endsWith(".md")){this.logger.debug("indexFile: skipping non-markdown file: "+e.path);return}this.logger.debug("Cache.indexFile: "+e.path);let n=this.tasks.filter(a=>a.path===e.path),i=t.listItems,s=[];if(i!==void 0){let a=yield this.vault.cachedRead(e);s=this.getTasksFromFileContent(a,i,t,e)}le.tasksListsIdentical(n,s)||(this.tasks=this.tasks.filter(a=>a.path!==e.path),this.tasks.push(...s),this.logger.debug("Cache.indexFile: "+e.path+`: read ${s.length} task(s)`),this.notifySubscribers())})}getTasksFromFileContent(e,t,n,i){let s=[],a=e.split(` -`),o=a.length,u=new ya(()=>ht.fromPath(i.path)),l=null,c=0;for(let f of t)if(f.task!==void 0){let h=f.position.start.line;if(h>=o)return this.logger.debug(`${i.path} Obsidian gave us a line number ${h} past the end of the file. ${o}.`),s;if((l===null||l.position.end.linel.symbol===t.symbol),o=a!==-1,u=t.type!=="EMPTY";if(o&&u){let l;i?l='-. "\u{1F501}" .-> ':l=" --> ";let c=`${s+1}${l}${a+1}`;n.push(c)}}getMermaidNodeLabel(e,t){let n=e_(e.name),s=e.type;if(t){let i=cu(e.symbol),a=cu(e.nextStatusSymbol),o=`[${i}] -> [${a}]`,u=`'${n}'`,l=`(${s})`;return`["${u}
${o}
${l}"]:::${s}`}else return`["${n}"]:::${s}`}};var yr=class{static calculate(e){let t=0;if(e.dueDate!==null){let n=window.moment().startOf("day"),s=Math.round(n.diff(e.dueDate)/yr.milliSecondsPerDay),i;s>=7?i=1:s>=-14?i=(s+14)*.8/21+.2:i=.2,t+=i*yr.dueCoefficient}switch(e.scheduledDate!==null&&window.moment().isSameOrAfter(e.scheduledDate)&&(t+=1*yr.scheduledCoefficient),e.startDate!==null&&window.moment().isBefore(e.startDate)&&(t+=1*yr.startedCoefficient),e.priority){case"0":t+=1.5*yr.priorityCoefficient;break;case"1":t+=1*yr.priorityCoefficient;break;case"2":t+=.65*yr.priorityCoefficient;break;case"3":t+=.325*yr.priorityCoefficient;break;case"5":t-=.3*yr.priorityCoefficient;break}return t}},en=yr;en.dueCoefficient=12,en.scheduledCoefficient=5,en.startedCoefficient=-3,en.priorityCoefficient=6,en.milliSecondsPerDay=1e3*60*60*24;var bt=class{static fromPath(e){let{useFilenameAsScheduledDate:t,filenameAsDateFolders:n}=K();return!t||!this.matchesAnyFolder(n,e)?null:this.extractDateFromPath(e)}static matchesAnyFolder(e,t){return e.length===0?!0:e.some(n=>t.startsWith(n+"/"))}static extractDateFromPath(e){let t=Math.max(0,e.lastIndexOf("/")+1),n=e.lastIndexOf("."),s=e.substring(t,n),i=/(\d{4})-(\d{2})-(\d{2})/.exec(s);if(i||(i=/(\d{4})(\d{2})(\d{2})/.exec(s)),i){let a=window.moment([parseInt(i[1]),parseInt(i[2])-1,parseInt(i[3])]);if(a.isValid())return a}return null}static canApplyFallback({startDate:e,scheduledDate:t,dueDate:n}){return e===null&&n===null&&t===null}static updateTaskPath(e,t,n){let s=e.scheduledDate,i=e.scheduledDateIsInferred;return n===null?i&&(i=!1,s=null):i?s=n:this.canApplyFallback(e)&&(s=n,i=!0),new fe(ot(ke({},e),{taskLocation:e.taskLocation.fromRenamedFile(t),scheduledDate:s,scheduledDateIsInferred:i}))}static removeInferredStatusIfNeeded(e,t){let n=e.scheduledDateIsInferred?e.scheduledDate:null;return t.map(s=>(n!==null&&!n.isSame(s.scheduledDate,"day")&&(s=new fe(ot(ke({},s),{scheduledDateIsInferred:!1}))),s))}};var t_=require("obsidian");var tn=class{constructor(e,t){this.name=e,this.sortOrder=t}get groupText(){return this.name!==""?`%%${this.sortOrder}%% ${this.name}`:""}};var He=class{constructor(e){this._date=null;this._date=e}get moment(){return this._date}formatAsDate(e=""){return this.format(z.dateFormat,e)}formatAsDateAndTime(e=""){return this.format(z.dateTimeFormat,e)}format(e,t=""){return this._date?this._date.format(e):t}toISOString(e){return this._date?this._date.toISOString(e):""}get category(){let e=window.moment(),t=this.moment;return t?t.isBefore(e,"day")?new tn("Overdue",1):t.isSame(e,"day")?new tn("Today",2):new tn("Future",3):new tn("Undated",4)}get fromNow(){let e=this.moment;if(!e)return new tn("",0);let t=this.fromNowOrder(e);return new tn(e.fromNow(),t)}fromNowOrder(e){let t=window.moment(),n=e.isSameOrBefore(t,"day"),s=this.fromNowStartDateOfGroup(e,n,t);return Number((n?1:3)+s.format("YYYYMMDD"))}fromNowStartDateOfGroup(e,t,n){let s=e.fromNow(!0).split(" "),i,a=Number(s[0]);isNaN(a)?i=1:i=a;let o=s[1];return t?n.subtract(i,o):n.add(i,o)}postpone(e="days",t=1){if(!this._date)throw new t_.Notice("Cannot postpone a null date");let n=window.moment().startOf("day");return this._date.isSameOrAfter(n,"day")?this._date.clone().add(t,e):n.add(t,e)}};var Ws=class{constructor(e){this._path=e}get path(){return this._path}get pathWithoutExtension(){return this.withoutExtension(this.path)}withoutExtension(e){return e.replace(/\.md$/,"")}get root(){let e=this.path.replace(/\\/g,"/");e.charAt(0)==="/"&&(e=e.substring(1));let t=e.indexOf("/");return t==-1?"/":e.substring(0,t+1)}get folder(){let e=this.path,t=this.filename,n=e.substring(0,e.lastIndexOf(t));return n===""?"/":n}get filename(){let e=this.path.match(/([^/]+)$/);return e!==null?e[1]:""}get filenameWithoutExtension(){return this.withoutExtension(this.filename)}};var rn=class{static priorityNameUsingNone(e){let t="ERROR";switch(e){case"1":t="High";break;case"0":t="Highest";break;case"2":t="Medium";break;case"3":t="None";break;case"4":t="Low";break;case"5":t="Lowest";break}return t}static priorityNameUsingNormal(e){return rn.priorityNameUsingNone(e).replace("None","Normal")}};var JC=require("obsidian"),i_=vi(s_());var _p=class extends i_.EventEmitter2{constructor(){super(...arguments);this.options={minLevels:{"":"info",tasks:"info"}};this.consoleLoggerRegistered=!1;this.arrAvg=t=>t.reduce((n,s)=>n+s,0)/t.length}configure(t){return this.options=Object.assign({},this.options,t),this}getLogger(t){let n="none",s="";for(let i in this.options.minLevels)t.startsWith(i)&&i.length>=s.length&&(n=this.options.minLevels[i],s=i);return new vp(this,t,n)}onLogEntry(t){return this.on("log",t),this}registerConsoleLogger(){return this.consoleLoggerRegistered?this:(this.onLogEntry(t=>{let n=`[${window.moment().format("YYYY-MM-DD-HH:mm:ss.SSS")}][${t.level}][${t.module}]`;switch(t.traceId&&(n+=`[${t.traceId}]`),n+=` ${t.message}`,t.objects===void 0&&(t.objects=""),t.level){case"trace":console.trace(n,t.objects);break;case"debug":console.debug(n,t.objects);break;case"info":console.info(n,t.objects);break;case"warn":console.warn(n,t.objects);break;case"error":console.error(n,t.objects);break;default:console.log(`{${t.level}} ${n}`,t.objects)}}),this.consoleLoggerRegistered=!0,this)}},Rt=new _p,vp=class{constructor(e,t,n){this.levels={trace:1,debug:2,info:3,warn:4,error:5};this.logManager=e,this.module=t,this.minLevel=this.levelToInt(n)}levelToInt(e){return e.toLowerCase()in this.levels?this.levels[e.toLowerCase()]:99}log(e,t,n){if(this.levelToInt(e){r.debug(`${e} ==> ${s+1} : ${n.toFileLineString()}`)})}var $t=class{},z=$t;z.dateFormat="YYYY-MM-DD",z.dateTimeFormat="YYYY-MM-DD HH:mm",z.indentationRegex=/^([\s\t>]*)/,z.listMarkerRegex=/([-*+]|[0-9]+\.)/,z.checkboxRegex=/\[(.)\]/u,z.afterCheckboxRegex=/ *(.*)/u,z.taskRegex=new RegExp($t.indentationRegex.source+$t.listMarkerRegex.source+" +"+$t.checkboxRegex.source+$t.afterCheckboxRegex.source,"u"),z.nonTaskRegex=new RegExp($t.indentationRegex.source+$t.listMarkerRegex.source+"? *("+$t.checkboxRegex.source+")?"+$t.afterCheckboxRegex.source,"u"),z.listItemRegex=new RegExp($t.indentationRegex.source+$t.listMarkerRegex.source),z.blockLinkRegex=/ \^[a-zA-Z0-9-]+$/u,z.hashTags=/(^|\s)#[^ !@#$%^&*(),.?":{}|<>]+/g,z.hashTagsFromEnd=new RegExp($t.hashTags.source+"$");var fe=class{constructor({status:e,description:t,taskLocation:n,indentation:s,listMarker:i,priority:a,createdDate:o,startDate:u,scheduledDate:l,dueDate:c,doneDate:f,cancelledDate:m,recurrence:y,blockLink:k,tags:E,originalMarkdown:x,scheduledDateIsInferred:v}){this._urgency=null;this.status=e,this.description=t,this.indentation=s,this.listMarker=i,this.taskLocation=n,this.tags=E,this.priority=a,this.createdDate=o,this.startDate=u,this.scheduledDate=l,this.dueDate=c,this.doneDate=f,this.cancelledDate=m,this.recurrence=y,this.blockLink=k,this.originalMarkdown=x,this.scheduledDateIsInferred=v}static fromLine({line:e,taskLocation:t,fallbackDate:n}){let s=fe.extractTaskComponents(e);return s===null||!ye.getInstance().includedIn(s.body)?null:fe.parseTaskSignifiers(e,t,n)}static parseTaskSignifiers(e,t,n){let s=fe.extractTaskComponents(e);if(s===null)return null;let{taskSerializer:i}=Ca(),a=i.deserialize(s.body),o=!1;return bt.canApplyFallback(a)&&n!==null&&(a.scheduledDate=n,o=!0),a.tags=a.tags.map(u=>u.trim()),a.tags=a.tags.filter(u=>!ye.getInstance().equals(u)),new fe(ot(ke(ke({},s),a),{taskLocation:t,originalMarkdown:e,scheduledDateIsInferred:o}))}static extractTaskComponents(e){let t=e.match(z.taskRegex);if(t===null)return null;let n=t[1],s=t[2],i=t[3],a=Ee.getInstance().bySymbolOrCreate(i),o=t[4].trim(),u=o.match(z.blockLinkRegex),l=u!==null?u[0]:"";return l!==""&&(o=o.replace(z.blockLinkRegex,"").trim()),{indentation:n,listMarker:s,status:a,body:o,blockLink:l}}toString(){return Ca().taskSerializer.serialize(this)}toFileLineString(){return`${this.indentation}${this.listMarker} [${this.status.symbol}] ${this.toString()}`}toggle(){let e=Rt.getLogger("tasks.Task"),t="toggle()";du(e,t,this);let n=Ee.getInstance().getNextStatusOrCreate(this.status),s=this.handleNewStatus(n);return fu(e,t,s),s}handleNewStatus(e){if(e.identicalTo(this.status))return[this];let t=null;if(e.isCompleted())if(this.status.isCompleted())t=this.doneDate;else{let{setDoneDate:o}=K();o&&(t=window.moment())}let n=null;if(e.isCancelled())if(this.status.isCancelled())n=this.cancelledDate;else{let{setCancelledDate:o}=K();o&&(n=window.moment())}let s=null;e.isCompleted()&&!this.status.isCompleted()&&this.recurrence!==null&&(s=this.recurrence.next());let i=new fe(ot(ke({},this),{status:e,doneDate:t,cancelledDate:n})),a=[];if(s!==null){let{setCreatedDate:o}=K(),u=null;o&&(u=window.moment());let l=null,f=Ee.getInstance().getNextRecurrenceStatusOrCreate(e),m=new fe(ot(ke(ke({},this),s),{status:f,blockLink:"",createdDate:u,cancelledDate:l}));a.push(m)}return a.push(i),a}toggleWithRecurrenceInUsersOrder(){let e=this.toggle();return this.putRecurrenceInUsersOrder(e)}handleNewStatusWithRecurrenceInUsersOrder(e){Rt.getLogger("tasks.Task").debug(`changed task ${this.taskLocation.path} ${this.taskLocation.lineNumber} ${this.originalMarkdown} status to '${e.symbol}'`);let n=this.handleNewStatus(e);return this.putRecurrenceInUsersOrder(n)}putRecurrenceInUsersOrder(e){let{recurrenceOnNextLine:t}=K();return t?e.reverse():e}get isDone(){return this.status.type==="DONE"||this.status.type==="CANCELLED"||this.status.type==="NON_TASK"}get priorityNumber(){return Number.parseInt(this.priority)}get priorityNameGroupText(){let e=rn.priorityNameUsingNormal(this.priority);return`%%${this.priority}%%${e} priority`}get descriptionWithoutTags(){return this.description.replace(z.hashTags,"").trim()}get priorityName(){return rn.priorityNameUsingNormal(this.priority)}get urgency(){return this._urgency===null&&(this._urgency=en.calculate(this)),this._urgency}get path(){return this.taskLocation.path}get cancelled(){return new He(this.cancelledDate)}get created(){return new He(this.createdDate)}get done(){return new He(this.doneDate)}get due(){return new He(this.dueDate)}get scheduled(){return new He(this.scheduledDate)}get start(){return new He(this.startDate)}get happensDates(){return Array.of(this.startDate,this.scheduledDate,this.dueDate)}get happens(){let t=this.happensDates.sort(Xr);return new He(t[0])}get isRecurring(){return this.recurrence!==null}get recurrenceRule(){return this.recurrence?this.recurrence.toText():""}get heading(){return this.precedingHeader}get hasHeading(){return this.precedingHeader!==null}get file(){return new Ws(this.path)}get filename(){let e=this.path.match(/([^/]+)\.md$/);return e!==null?e[1]:null}get lineNumber(){return this.taskLocation.lineNumber}get sectionStart(){return this.taskLocation.sectionStart}get sectionIndex(){return this.taskLocation.sectionIndex}get precedingHeader(){return this.taskLocation.precedingHeader}getLinkText({isFilenameUnique:e}){let t;return e?t=this.filename:t="/"+this.path,t===null?null:(this.precedingHeader!==null&&this.precedingHeader!==t&&(t=t+" > "+this.precedingHeader),t)}static tasksListsIdentical(e,t){return e.length!==t.length?!1:e.every((n,s)=>n.identicalTo(t[s]))}identicalTo(e){let t=["description","path","indentation","listMarker","lineNumber","sectionStart","sectionIndex","precedingHeader","priority","blockLink","scheduledDateIsInferred"];for(let i of t)if(this[i]!==e[i])return!1;if(!this.status.identicalTo(e.status)||this.tags.length!==e.tags.length||!this.tags.every(function(i,a){return i===e.tags[a]}))return!1;t=fe.allDateFields();for(let i of t){let a=this[i],o=e[i];if(Xr(a,o)!==0)return!1}let n=this.recurrence,s=e.recurrence;return n===null&&s!==null||n!==null&&s===null?!1:!(n&&s&&!n.identicalTo(s))}static allDateFields(){return["createdDate","startDate","scheduledDate","dueDate","doneDate","cancelledDate"]}static extractHashtags(e){var t,n;return(n=(t=e.match(z.hashTags))==null?void 0:t.map(s=>s.trim()))!=null?n:[]}};var Aa=class{constructor(e){this.fetch=e;this._value=void 0}get value(){return this._value===void 0&&(this._value=this.fetch()),this._value}};var pt=class{constructor(e,t,n,s,i){this._path=e,this._lineNumber=t,this._sectionStart=n,this._sectionIndex=s,this._precedingHeader=i}static fromUnknownPosition(e){return new pt(e,0,0,0,null)}fromRenamedFile(e){return new pt(e,this.lineNumber,this.sectionStart,this.sectionIndex,this.precedingHeader)}get path(){return this._path}get lineNumber(){return this._lineNumber}get sectionStart(){return this._sectionStart}get sectionIndex(){return this._sectionIndex}get precedingHeader(){return this._precedingHeader}};var rs=class{constructor({metadataCache:e,vault:t,events:n}){this.logger=Rt.getLogger("tasks.Cache");this.logger.debug("Creating Cache object"),this.metadataCache=e,this.metadataCacheEventReferences=[],this.vault=t,this.vaultEventReferences=[],this.events=n,this.eventsEventReferences=[],this.tasksMutex=new io,this.state="Cold",this.logger.debug("Cache.constructor(): state = Cold"),this.tasks=[],this.loadedAfterFirstResolve=!1,this.subscribeToCache(),this.subscribeToVault(),this.subscribeToEvents(),this.loadVault()}unload(){this.logger.info("Unloading Cache");for(let e of this.metadataCacheEventReferences)this.metadataCache.offref(e);for(let e of this.vaultEventReferences)this.vault.offref(e);for(let e of this.eventsEventReferences)this.events.off(e)}getTasks(){return this.tasks}getState(){return this.state}notifySubscribers(){this.logger.debug("Cache.notifySubscribers()"),this.events.triggerCacheUpdate({tasks:this.tasks,state:this.state})}subscribeToCache(){this.logger.debug("Cache.subscribeToCache()");let e=this.metadataCache.on("resolved",()=>L(this,null,function*(){this.loadedAfterFirstResolve||(this.loadedAfterFirstResolve=!0,this.loadVault())}));this.metadataCacheEventReferences.push(e);let t=this.metadataCache.on("changed",n=>{this.tasksMutex.runExclusive(()=>{this.indexFile(n)})});this.metadataCacheEventReferences.push(t)}subscribeToVault(){this.logger.debug("Cache.subscribeToVault()");let{useFilenameAsScheduledDate:e}=K(),t=this.vault.on("create",i=>{i instanceof Ys.TFile&&(this.logger.debug(`Cache.subscribeToVault.createdEventReference() ${i.path}`),this.tasksMutex.runExclusive(()=>{this.indexFile(i)}))});this.vaultEventReferences.push(t);let n=this.vault.on("delete",i=>{i instanceof Ys.TFile&&(this.logger.debug(`Cache.subscribeToVault.deletedEventReference() ${i.path}`),this.tasksMutex.runExclusive(()=>{this.tasks=this.tasks.filter(a=>a.path!==i.path),this.notifySubscribers()}))});this.vaultEventReferences.push(n);let s=this.vault.on("rename",(i,a)=>{i instanceof Ys.TFile&&(this.logger.debug(`Cache.subscribeToVault.renamedEventReference() ${i.path}`),this.tasksMutex.runExclusive(()=>{let o=new Aa(()=>bt.fromPath(i.path));this.tasks=this.tasks.map(u=>u.path===a?e?bt.updateTaskPath(u,i.path,o.value):new fe(ot(ke({},u),{taskLocation:u.taskLocation.fromRenamedFile(i.path)})):u),this.notifySubscribers()}))});this.vaultEventReferences.push(s)}subscribeToEvents(){this.logger.debug("Cache.subscribeToEvents()");let e=this.events.onRequestCacheUpdate(t=>{t({tasks:this.tasks,state:this.state})});this.eventsEventReferences.push(e)}loadVault(){return this.logger.debug("Cache.loadVault()"),this.tasksMutex.runExclusive(()=>L(this,null,function*(){this.state="Initializing",this.logger.debug("Cache.loadVault(): state = Initializing"),yield Promise.all(this.vault.getMarkdownFiles().map(e=>this.indexFile(e))),this.state="Warm",this.logger.debug("Cache.loadVault(): state = Warm"),this.notifySubscribers()}))}indexFile(e){return L(this,null,function*(){let t=this.metadataCache.getFileCache(e);if(t==null)return;if(!e.path.endsWith(".md")){this.logger.debug("indexFile: skipping non-markdown file: "+e.path);return}this.logger.debug("Cache.indexFile: "+e.path);let n=this.tasks.filter(a=>a.path===e.path),s=t.listItems,i=[];if(s!==void 0){let a=yield this.vault.cachedRead(e);i=this.getTasksFromFileContent(a,s,t,e)}fe.tasksListsIdentical(n,i)||(this.tasks=this.tasks.filter(a=>a.path!==e.path),this.tasks.push(...i),this.logger.debug("Cache.indexFile: "+e.path+`: read ${i.length} task(s)`),this.notifySubscribers())})}getTasksFromFileContent(e,t,n,s){let i=[],a=e.split(` +`),o=a.length,u=new Aa(()=>bt.fromPath(s.path)),l=null,c=0;for(let f of t)if(f.task!==void 0){let m=f.position.start.line;if(m>=o)return this.logger.debug(`${s.path} Obsidian gave us a line number ${m} past the end of the file. ${o}.`),i;if((l===null||l.position.end.line=e)return n;return null}static getPrecedingHeader(e,t){if(t===void 0)return null;let n=null;for(let i of t){if(i.position.start.line>e)return n;n=i.heading}return n}};var fp=require("obsidian");var Vb=require("obsidian");function Qr(){}function ip(r){return r()}function Cb(){return Object.create(null)}function Hn(r){r.forEach(ip)}function zo(r){return typeof r=="function"}function Pb(r,e){return r!=r?e==e:r!==e||r&&typeof r=="object"||typeof r=="function"}function Nb(r){return Object.keys(r).length===0}var Ib=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global,ba=class{constructor(e){this.options=e,this._listeners="WeakMap"in Ib?new WeakMap:void 0}observe(e,t){return this._listeners.set(e,t),this._getObserver().observe(e,this.options),()=>{this._listeners.delete(e),this._observer.unobserve(e)}}_getObserver(){var e;return(e=this._observer)!==null&&e!==void 0?e:this._observer=new ResizeObserver(t=>{var n;for(let i of t)ba.entries.set(i.target,i),(n=this._listeners.get(i.target))===null||n===void 0||n(i)})}};ba.entries="WeakMap"in Ib?new WeakMap:void 0;var Fb=!1;function wC(){Fb=!0}function EC(){Fb=!1}function R(r,e){r.appendChild(e)}function Ii(r,e,t){r.insertBefore(e,t||null)}function zn(r){r.parentNode&&r.parentNode.removeChild(r)}function sp(r,e){for(let t=0;tr.removeEventListener(e,t,n)}function Lb(r){return function(e){return e.preventDefault(),r.call(this,e)}}function U(r,e,t){t==null?r.removeAttribute(e):r.getAttribute(e)!==t&&r.setAttribute(e,t)}function Ub(r){let e;return{p(...t){e=t,e.forEach(n=>r.push(n))},r(){e.forEach(t=>r.splice(r.indexOf(t),1))}}}function SC(r){return Array.from(r.childNodes)}function ap(r,e){e=""+e,r.data!==e&&(r.data=e)}function cr(r,e){r.value=e==null?"":e}function op(r,e,t){for(let n=0;nr.indexOf(n)===-1?e.push(n):t.push(n)),t.forEach(n=>n()),Ni=e}var CC=new Set;function AC(r,e){r&&r.i&&(CC.delete(r),r.i(e))}var PC=["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"],NU=new Set([...PC]);function NC(r,e,t,n){let{fragment:i,after_update:s}=r.$$;i&&i.m(e,t),n||va(()=>{let a=r.$$.on_mount.map(ip).filter(zo);r.$$.on_destroy?r.$$.on_destroy.push(...a):Hn(a),r.$$.on_mount=[]}),s.forEach(va)}function $b(r,e){let t=r.$$;t.fragment!==null&&(MC(t.after_update),Hn(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function IC(r,e){r.$$.dirty[0]===-1&&(Pi.push(r),xC(),r.$$.dirty.fill(0)),r.$$.dirty[e/31|0]|=1<{let y=T.length?T[0]:h;return l.ctx&&i(l.ctx[f],l.ctx[f]=y)&&(!l.skip_bound&&l.bound[f]&&l.bound[f](y),c&&IC(r,f)),h}):[],l.update(),c=!0,Hn(l.before_update),l.fragment=n?n(l.ctx):!1,e.target){if(e.hydrate){wC();let f=SC(e.target);l.fragment&&l.fragment.l(f),f.forEach(zn)}else l.fragment&&l.fragment.c();e.intro&&AC(r.$$.fragment),NC(r,e.target,e.anchor,e.customElement),EC(),qb()}Ta(u)}var FC;typeof HTMLElement=="function"&&(FC=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){let{on_mount:r}=this.$$;this.$$.on_disconnect=r.map(ip).filter(zo);for(let e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(r,e,t){this[r]=t}disconnectedCallback(){Hn(this.$$.on_disconnect)}$destroy(){$b(this,1),this.$destroy=Qr}$on(r,e){if(!zo(e))return Qr;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&&!Nb(r)&&(this.$$.skip_bound=!0,this.$$set(r),this.$$.skip_bound=!1)}});var Ko=class{$destroy(){$b(this,1),this.$destroy=Qr}$on(e,t){if(!zo(t))return Qr;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&&!Nb(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}};var cp=as(Be());function jb(r,e,t){let n=r.slice();return n[45]=e[t],n}function Gb(r,e,t){let n=r.slice();return n[48]=e[t].value,n[49]=e[t].label,n[50]=e[t].symbol,n[51]=e[t].accessKey,n[52]=e[t].accessKeyIndex,n}function LC(r){let e,t=r[50]+"",n;return{c(){e=K("span"),n=mt(t)},m(i,s){Ii(i,e,s),R(e,n)},p:Qr,d(i){i&&zn(e)}}}function Bb(r){let e,t,n,i,s,a,o,u,l=r[49].substring(0,r[52])+"",c,f,h=r[49].substring(r[52],r[52]+1)+"",T,y,w=r[49].substring(r[52]+1)+"",D,C,N=r[50]&&r[50].charCodeAt(0)>=256,L,oe,z,ie,j,G=N&&LC(r);return z=Ub(r[33][0]),{c(){e=K("span"),t=K("input"),a=pe(),o=K("label"),u=K("span"),c=mt(l),f=K("span"),T=mt(h),y=K("span"),D=mt(w),C=pe(),G&&G.c(),oe=pe(),U(t,"type","radio"),U(t,"id",n="priority-"+r[48]),t.__value=i=r[48],t.value=t.__value,U(t,"accesskey",s=r[15](r[51])),U(f,"class","accesskey"),U(o,"for",L="priority-"+r[48]),z.p(t)},m(Ne,Le){Ii(Ne,e,Le),R(e,t),t.checked=t.__value===r[1].priority,R(e,a),R(e,o),R(o,u),R(u,c),R(o,f),R(f,T),R(o,y),R(y,D),R(o,C),G&&G.m(o,null),R(e,oe),ie||(j=Ot(t,"change",r[32]),ie=!0)},p(Ne,Le){Le[0]&32768&&s!==(s=Ne[15](Ne[51]))&&U(t,"accesskey",s),Le[0]&3&&(t.checked=t.__value===Ne[1].priority),N&&G.p(Ne,Le)},d(Ne){Ne&&zn(e),G&&G.d(),z.r(),ie=!1,j()}}}function Hb(r){let e,t=r[45].name+"",n,i,s=r[45].symbol+"",a,o,u;return{c(){e=K("option"),n=mt(t),i=mt(" ["),a=mt(s),o=mt("]"),e.__value=u=r[45],e.value=e.__value},m(l,c){Ii(l,e,c),R(e,n),R(e,i),R(e,a),R(e,o)},p(l,c){c[0]&1&&t!==(t=l[45].name+"")&&ap(n,t),c[0]&1&&s!==(s=l[45].symbol+"")&&ap(a,s),c[0]&1&&u!==(u=l[45])&&(e.__value=u,e.value=e.__value)},d(l){l&&zn(e)}}}function UC(r){let e,t,n,i,s,a,o,u,l,c,f,h,T,y,w,D,C,N,L,oe,z,ie,j,G,Ne,Le,B,A,E,H,P,Z,d,p,m,g,b,v,k,x,S,O,I,me,se,te,De,W,Re,Ae,nt,Mr,qe,Ue,qp,Ji,Ma,$p,mr,Ca,Yp,ii,Aa,jp,jt,Pa,Gp,en,es,Na,Bp,tn,Ia,Hp,ts,Gu,zp,Fa,Vp,rs,Bu,Kp,La,Qp,si,kn,Xp,Ua,Zp,ns,Hu,Jp,ai=r[20],_t=[];for(let Y=0;Ytion',s=pe(),a=K("textarea"),u=pe(),l=K("div"),c=K("label"),f=mt("Priority"),T=pe();for(let Y=0;Y<_t.length;Y+=1)_t[Y].c();y=pe(),w=K("div"),D=K("label"),D.textContent="Recurs",C=pe(),N=K("input"),oe=pe(),z=K("code"),ie=mt(r[16]),j=pe(),G=new Bn(!1),Ne=pe(),Le=K("label"),Le.textContent="Due",B=pe(),A=K("input"),H=pe(),P=K("code"),Z=mt(r[19]),d=pe(),p=new Bn(!1),m=pe(),g=K("label"),g.textContent="Scheduled",b=pe(),v=K("input"),x=pe(),S=K("code"),O=mt(r[18]),I=pe(),me=new Bn(!1),se=pe(),te=K("label"),te.innerHTML='Start',De=pe(),W=K("input"),Ae=pe(),nt=K("code"),Mr=mt(r[17]),qe=pe(),Ue=new Bn(!1),qp=pe(),Ji=K("div"),Ma=K("label"),Ma.innerHTML=`Only - future dates:`,$p=pe(),mr=K("input"),Yp=pe(),ii=K("div"),Aa=K("label"),Aa.innerHTML='Status',jp=pe(),jt=K("select");for(let Y=0;Yr[39].call(jt)),U(ii,"class","tasks-modal-section"),U(Na,"for","status"),U(tn,"id","status"),U(tn,"type","checkbox"),U(tn,"class","task-list-item-checkbox tasks-modal-checkbox"),tn.checked=Ia=r[1].status.isCompleted(),tn.disabled=!0,U(en,"class","tasks-modal-section tasks-modal-status"),kn.disabled=Ua=!r[14],U(kn,"type","submit"),U(kn,"class","mod-cta"),U(ns,"type","button"),U(si,"class","tasks-modal-section tasks-modal-buttons"),dr(t,"with-accesskeys",r[9]),U(e,"class","tasks-modal")},m(Y,he){Ii(Y,e,he),R(e,t),R(t,n),R(n,i),R(n,s),R(n,a),cr(a,r[1].description),r[31](a),R(t,u),R(t,l),R(l,c),R(c,f),R(l,T);for(let de=0;de<_t.length;de+=1)_t[de]&&_t[de].m(l,null);R(t,y),R(t,w),R(w,D),R(w,C),R(w,N),cr(N,r[1].recurrenceRule),R(w,oe),R(w,z),R(z,ie),R(z,j),G.m(r[12],z),R(w,Ne),R(w,Le),R(w,B),R(w,A),cr(A,r[1].dueDate),R(w,H),R(w,P),R(P,Z),R(P,d),p.m(r[6],P),R(w,m),R(w,g),R(w,b),R(w,v),cr(v,r[1].scheduledDate),R(w,x),R(w,S),R(S,O),R(S,I),me.m(r[4],S),R(w,se),R(w,te),R(w,De),R(w,W),cr(W,r[1].startDate),R(w,Ae),R(w,nt),R(nt,Mr),R(nt,qe),Ue.m(r[2],nt),R(w,qp),R(w,Ji),R(Ji,Ma),R(Ji,$p),R(Ji,mr),mr.checked=r[1].forwardOnly,R(t,Yp),R(t,ii),R(ii,Aa),R(ii,jp),R(ii,jt);for(let de=0;deno ${W} date`;let nt=cp.parseDate(Re,Ae,{forwardDate:Ae!=null});return nt!==null?window.moment(nt).format("YYYY-MM-DD"):`invalid ${W} date`}function P(W,Re){return H(W,Re,y.forwardOnly?new Date:void 0)}function Z(W){let Re=null,Ae=cp.parseDate(W,new Date,{forwardDate:y.forwardOnly});return Ae!==null&&(Re=window.moment(Ae)),Re}up(()=>{let{provideAccessKeys:W}=Q();t(9,B=W);let Re=ge.getInstance().removeAsWordFrom(s.description);(Re!=s.description||!ge.getInstance().includedIn(s.description))&&(Le=!0);let Ae="none";s.priority==="5"?Ae="lowest":s.priority==="4"?Ae="low":s.priority==="2"?Ae="medium":s.priority==="1"?Ae="high":s.priority==="0"&&(Ae="highest"),t(1,y={description:Re,status:s.status,priority:Ae,recurrenceRule:s.recurrence?s.recurrence.toText():"",createdDate:new rt(s.createdDate).formatAsDate(),startDate:new rt(s.startDate).formatAsDate(),scheduledDate:new rt(s.scheduledDate).formatAsDate(),dueDate:new rt(s.dueDate).formatAsDate(),doneDate:new rt(s.doneDate).formatAsDate(),forwardOnly:!0}),setTimeout(()=>{T.focus()},10)});let d=W=>{if(W.key&&!W.altKey&&!W.ctrlKey){let Re=E.find(Ae=>Ae.label.charAt(0).toLowerCase()==W.key);Re&&t(1,y.priority=Re.value,y)}},p=()=>{a([])},m=W=>{W.key==="Enter"&&(W.preventDefault(),A&&b())},g=()=>{setTimeout(()=>{t(1,y.description=y.description.replace(/[\r\n]+/g," "),y)},0)},b=()=>{let W=y.description.trim();Le&&(W=ge.getInstance().prependTo(W));let Re=Z(y.startDate),Ae=Z(y.scheduledDate),nt=Z(y.dueDate),Mr=null;y.recurrenceRule&&(Mr=et.fromText({recurrenceRuleText:y.recurrenceRule,startDate:Re,scheduledDate:Ae,dueDate:nt}));let qe;switch(y.priority){case"lowest":qe="5";break;case"low":qe="4";break;case"medium":qe="2";break;case"high":qe="1";break;case"highest":qe="0";break;default:qe="3"}let Ue=new le(Object.assign(Object.assign({},s),{description:W,status:y.status,priority:qe,recurrence:Mr,startDate:Re,scheduledDate:Ae,dueDate:nt,doneDate:window.moment(y.doneDate,"YYYY-MM-DD").isValid()?window.moment(y.doneDate,"YYYY-MM-DD"):null}));a([Ue])},v=[[]];function k(){y.description=this.value,t(1,y),t(6,z),t(2,C),t(4,L),t(0,o)}function x(W){Vo[W?"unshift":"push"](()=>{T=W,t(10,T)})}function S(){y.priority=this.__value,t(1,y),t(6,z),t(2,C),t(4,L),t(0,o)}function O(){y.recurrenceRule=this.value,t(1,y),t(6,z),t(2,C),t(4,L),t(0,o)}function I(){y.dueDate=this.value,t(1,y),t(6,z),t(2,C),t(4,L),t(0,o)}function me(){y.scheduledDate=this.value,t(1,y),t(6,z),t(2,C),t(4,L),t(0,o)}function se(){y.startDate=this.value,t(1,y),t(6,z),t(2,C),t(4,L),t(0,o)}function te(){y.forwardOnly=this.checked,t(1,y),t(6,z),t(2,C),t(4,L),t(0,o)}function De(){y.status=Wb(this),t(1,y),t(6,z),t(2,C),t(4,L),t(0,o)}return r.$$set=W=>{"task"in W&&t(26,s=W.task),"onSubmit"in W&&t(27,a=W.onSubmit),"statusOptions"in W&&t(0,o=W.statusOptions)},r.$$.update=()=>{if(r.$$.dirty[0]&512){e:t(15,n=W=>B?W:null)}if(r.$$.dirty[0]&66){e:t(1,y.dueDate=ki(y.dueDate),y),t(6,z=P("due",y.dueDate)),t(7,ie=!z.includes("invalid"))}if(r.$$.dirty[0]&6){e:t(1,y.startDate=ki(y.startDate),y),t(2,C=P("start",y.startDate)),t(3,N=!C.includes("invalid"))}if(r.$$.dirty[0]&18){e:t(1,y.scheduledDate=ki(y.scheduledDate),y),t(4,L=P("scheduled",y.scheduledDate)),t(5,oe=!L.includes("invalid"))}if(r.$$.dirty[0]&268435458){e:if(t(8,G=!0),!y.recurrenceRule)t(12,j="not recurring");else{let W=t(28,i=et.fromText({recurrenceRuleText:y.recurrenceRule,startDate:null,scheduledDate:null,dueDate:null}))===null||i===void 0?void 0:i.toText();W?!y.startDate&&!y.scheduledDate&&!y.dueDate?(t(12,j="due, scheduled or start date required"),t(8,G=!1)):t(12,j=W):(t(12,j="invalid recurrence rule"),t(8,G=!1))}}if(r.$$.dirty[0]&2){e:t(29,w=y.description.trim()!=="")}if(r.$$.dirty[0]&536871336){e:t(14,A=ie&&G&&oe&&N&&w)}if(r.$$.dirty[0]&2){e:t(11,D=H("created",y.createdDate)),t(13,Ne=H("done",y.doneDate))}},[o,y,C,N,L,oe,z,ie,G,B,T,D,j,Ne,A,n,l,c,f,h,E,d,p,m,g,b,s,a,i,w,k,x,S,v,O,I,me,se,te,De]}var dp=class extends Ko{constructor(e){super(),Yb(this,e,WC,UC,Pb,{task:26,onSubmit:27,statusOptions:0},null,[-1,-1])}},zb=dp;var mn=class extends Vb.Modal{constructor({app:t,task:n,onSubmit:i}){super(t);this.task=n,this.onSubmit=s=>{s.length&&i(s),this.close()}}onOpen(){this.titleEl.setText("Create or edit Task");let{contentEl:t}=this,n=this.getKnownStatusesAndCurrentTaskStatusIfNotKnown();new zb({target:t,props:{task:this.task,statusOptions:n,onSubmit:this.onSubmit}})}getKnownStatusesAndCurrentTaskStatusIfNotKnown(){let t=ve.getInstance().registeredStatuses;return ve.getInstance().bySymbol(this.task.status.symbol)===X.EMPTY&&t.push(this.task.status),t}onClose(){let{contentEl:t}=this;t.empty()}};function qC(){let{setCreatedDate:r}=Q();return r?window.moment():null}function $C(r){let{setCreatedDate:e}=Q();if(!e||r.createdDate!==null)return!1;let t=r.description==="",n=!ge.getInstance().isEmpty(),i=!ge.getInstance().includedIn(r.description);return t||n&&i}var Qo=({line:r,path:e})=>{var h,T;let t=le.parseTaskSignifiers(r,ct.fromUnknownPosition(e),ht.fromPath(e)),n=qC();if(t!==null)return $C(t)?new le(it(we({},t),{createdDate:n})):t;let i=r.match(V.nonTaskRegex);if(i===null)return console.error("Tasks: Cannot create task on line:",r),new le({status:X.TODO,description:"",taskLocation:ct.fromUnknownPosition(e),indentation:"",listMarker:"-",priority:"3",createdDate:n,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,recurrence:null,blockLink:"",tags:[],originalMarkdown:"",scheduledDateIsInferred:!1});let s=i[1],a=(h=i[2])!=null?h:"-",o=(T=i[4])!=null?T:" ",u=ve.getInstance().bySymbolOrCreate(o),l=i[5],c=r.match(V.blockLinkRegex),f=c!==null?c[0]:"";return f!==""&&(l=l.replace(V.blockLinkRegex,"")),new le({status:u,description:l,taskLocation:ct.fromUnknownPosition(e),indentation:s,listMarker:a,blockLink:f,priority:"3",createdDate:n,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,recurrence:null,tags:[],originalMarkdown:"",scheduledDateIsInferred:!1})};var Kb=(r,e,t,n)=>{var f;if(r)return t instanceof fp.MarkdownView;if(!(t instanceof fp.MarkdownView))return;let i=(f=t.file)==null?void 0:f.path;if(i===void 0)return;let a=e.getCursor().line,o=e.getLine(a),u=Qo({line:o,path:i}),l=h=>{let T=ht.removeInferredStatusIfNeeded(u,h).map(y=>y.toFileLineString()).join(` -`);e.setLine(a,T)};new mn({app:n,task:u,onSubmit:l}).open()};var pp=require("obsidian");var Qb=(r,e,t)=>{var u;if(r)return t instanceof pp.MarkdownView;if(!(t instanceof pp.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=YC(a,n);e.setLine(s,o.text),e.setCursor(jC(i,o))},YC=(r,e)=>{let t=le.fromLine({line:r,taskLocation:ct.fromUnknownPosition(e),fallbackDate:null});if(t!==null){let n=t.toggleWithRecurrenceInUsersOrder().map(i=>i.toFileLineString());return{text:n.join(` -`),moveTo:{line:n.length-1}}}else{let n=r.match(V.taskRegex);if(n!==null){let i=n[3],a=ve.getInstance().bySymbol(i).nextStatusSymbol;return{text:r.replace(V.taskRegex,`$1- [${a}] $4`)}}else if(V.listItemRegex.test(r)){let i=r.replace(V.listItemRegex,"$1$2 [ ]");return{text:i,moveTo:{ch:i.length}}}else{let i=r.replace(V.indentationRegex,"$1- ");return{text:i,moveTo:{ch:i.length}}}}},jC=(r,e)=>{var s;let t={line:0,ch:r.ch},n=we(we({},t),(s=e.moveTo)!=null?s:{}),i=e.text.split(` -`)[n.line].length;return{line:r.line+n.line,ch:Math.min(n.ch,i)}};var Xo=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)=>Kb(t,n,i,this.app)}),e.addCommand({id:"toggle-done",name:"Toggle task done",icon:"check-in-circle",editorCheckCallback:Qb})}};var GC=Object.prototype.toString,Li=Array.isArray||function(e){return GC.call(e)==="[object Array]"};function mp(r){return typeof r=="function"}function BC(r){return Li(r)?"array":typeof r}function hp(r){return r.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Xb(r,e){return r!=null&&typeof r=="object"&&e in r}function HC(r,e){return r!=null&&typeof r!="object"&&r.hasOwnProperty&&r.hasOwnProperty(e)}var zC=RegExp.prototype.test;function VC(r,e){return zC.call(r,e)}var KC=/\S/;function QC(r){return!VC(KC,r)}var XC={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function ZC(r){return String(r).replace(/[&<>"'`=\/]/g,function(t){return XC[t]})}var JC=/\s*/,eA=/\s+/,Zb=/\s*=/,tA=/\s*\}/,rA=/#|\^|\/|>|\{|&|=|!/;function nA(r,e){if(!r)return[];var t=!1,n=[],i=[],s=[],a=!1,o=!1,u="",l=0;function c(){if(a&&!o)for(;s.length;)delete i[s.pop()];else s=[];a=!1,o=!1}var f,h,T;function y(G){if(typeof G=="string"&&(G=G.split(eA,2)),!Li(G)||G.length!==2)throw new Error("Invalid tags: "+G);f=new RegExp(hp(G[0])+"\\s*"),h=new RegExp("\\s*"+hp(G[1])),T=new RegExp("\\s*"+hp("}"+G[1]))}y(e||Jt.tags);for(var w=new Ea(r),D,C,N,L,oe,z;!w.eos();){if(D=w.pos,N=w.scanUntil(f),N)for(var ie=0,j=N.length;ie"?oe=[C,N,D,w.pos,u,l,t]:oe=[C,N,D,w.pos],l++,i.push(oe),C==="#"||C==="^")n.push(oe);else if(C==="/"){if(z=n.pop(),!z)throw new Error('Unopened section "'+N+'" at '+D);if(z[1]!==N)throw new Error('Unclosed section "'+z[1]+'" at '+D)}else C==="name"||C==="{"||C==="&"?o=!0:C==="="&&y(N)}if(c(),z=n.pop(),z)throw new Error('Unclosed section "'+z[1]+'" at '+w.pos);return sA(iA(i))}function iA(r){for(var e=[],t,n,i=0,s=r.length;i0?n[n.length-1][4]:e;break;default:t.push(i)}return e}function Ea(r){this.string=r,this.tail=r,this.pos=0}Ea.prototype.eos=function(){return this.tail===""};Ea.prototype.scan=function(e){var t=this.tail.match(e);if(!t||t.index!==0)return"";var n=t[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n};Ea.prototype.scanUntil=function(e){var t=this.tail.search(e),n;switch(t){case-1:n=this.tail,this.tail="";break;case 0:n="";break;default:n=this.tail.substring(0,t),this.tail=this.tail.substring(t)}return this.pos+=n.length,n};function Fi(r,e){this.view=r,this.cache={".":this.view},this.parent=e}Fi.prototype.push=function(e){return new Fi(e,this)};Fi.prototype.lookup=function(e){var t=this.cache,n;if(t.hasOwnProperty(e))n=t[e];else{for(var i=this,s,a,o,u=!1;i;){if(e.indexOf(".")>0)for(s=i.view,a=e.split("."),o=0;s!=null&&o"?l=this.renderPartial(o,t,n,s):u==="&"?l=this.unescapedValue(o,t):u==="name"?l=this.escapedValue(o,t,s):u==="text"&&(l=this.rawValue(o)),l!==void 0&&(a+=l);return a};Dt.prototype.renderSection=function(e,t,n,i,s){var a=this,o="",u=t.lookup(e[1]);function l(h){return a.render(h,t,n,s)}if(!!u){if(Li(u))for(var c=0,f=u.length;c0||!n)&&(s[a]=i+s[a]);return s.join(` -`)};Dt.prototype.renderPartial=function(e,t,n,i){if(!!n){var s=this.getConfigTags(i),a=mp(n)?n(e[1]):n[e[1]];if(a!=null){var o=e[6],u=e[5],l=e[4],c=a;u==0&&l&&(c=this.indentPartial(a,l,o));var f=this.parse(c,s);return this.renderTokens(f,t,n,c,i)}}};Dt.prototype.unescapedValue=function(e,t){var n=t.lookup(e[1]);if(n!=null)return n};Dt.prototype.escapedValue=function(e,t,n){var i=this.getConfigEscape(n)||Jt.escape,s=t.lookup(e[1]);if(s!=null)return typeof s=="number"&&i===Jt.escape?String(s):i(s)};Dt.prototype.rawValue=function(e){return e[1]};Dt.prototype.getConfigTags=function(e){return Li(e)?e:e&&typeof e=="object"?e.tags:void 0};Dt.prototype.getConfigEscape=function(e){if(e&&typeof e=="object"&&!Li(e))return e.escape};var Jt={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(r){wa.templateCache=r},get templateCache(){return wa.templateCache}},wa=new Dt;Jt.clearCache=function(){return wa.clearCache()};Jt.parse=function(e,t){return wa.parse(e,t)};Jt.render=function(e,t,n,i){if(typeof e!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+BC(e)+'" was given as the first argument for mustache#render(template, view, partials)');return wa.render(e,t,n,i)};Jt.escape=ZC;Jt.Scanner=Ea;Jt.Context=Fi;Jt.Writer=Dt;var gp=Jt;var n_=as(r_());function i_(r,e){gp.escape=function(t){return t};try{return gp.render(r,(0,n_.default)(e))}catch(t){let n="";throw t instanceof Error?n=`There was an error expanding one or more placeholders. +`;this.logger.error(i),e instanceof Error&&this.logger.error(e.stack?e.stack:"Cannot determine stack"),this.state==="Initializing"&&new Ys.Notice(i,1e4)}static getSection(e,t){if(t===void 0)return null;for(let n of t)if(n.position.start.line<=e&&n.position.end.line>=e)return n;return null}static getPrecedingHeader(e,t){if(t===void 0)return null;let n=null;for(let s of t){if(s.position.start.line>e)return n;n=s.heading}return n}};var Ap=require("obsidian");var E_=require("obsidian");function nn(){}function Sp(r){return r()}function a_(){return Object.create(null)}function ns(r){r.forEach(Sp)}function pu(r){return typeof r=="function"}function u_(r,e){return r!=r?e==e:r!==e||r&&typeof r=="object"||typeof r=="function"}function l_(r){return Object.keys(r).length===0}var c_=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global,Na=class{constructor(e){this.options=e,this._listeners="WeakMap"in c_?new WeakMap:void 0}observe(e,t){return this._listeners.set(e,t),this._getObserver().observe(e,this.options),()=>{this._listeners.delete(e),this._observer.unobserve(e)}}_getObserver(){var e;return(e=this._observer)!==null&&e!==void 0?e:this._observer=new ResizeObserver(t=>{var n;for(let s of t)Na.entries.set(s.target,s),(n=this._listeners.get(s.target))===null||n===void 0||n(s)})}};Na.entries="WeakMap"in c_?new WeakMap:void 0;var d_=!1;function tA(){d_=!0}function rA(){d_=!1}function O(r,e){r.appendChild(e)}function Bs(r,e,t){r.insertBefore(e,t||null)}function ss(r){r.parentNode&&r.parentNode.removeChild(r)}function Op(r,e){for(let t=0;tr.removeEventListener(e,t,n)}function f_(r){return function(e){return e.preventDefault(),r.call(this,e)}}function A(r,e,t){t==null?r.removeAttribute(e):r.getAttribute(e)!==t&&r.setAttribute(e,t)}function p_(r){let e;return{p(...t){e=t,e.forEach(n=>r.push(n))},r(){e.forEach(t=>r.splice(r.indexOf(t),1))}}}function sA(r){return Array.from(r.childNodes)}function Dp(r,e){e=""+e,r.data!==e&&(r.data=e)}function mt(r,e){r.value=e==null?"":e}function xp(r,e,t){for(let n=0;nr.indexOf(n)===-1?e.push(n):t.push(n)),t.forEach(n=>n()),$s=e}var cA=new Set;function dA(r,e){r&&r.i&&(cA.delete(r),r.i(e))}var fA=["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"],gq=new Set([...fA]);function pA(r,e,t,n){let{fragment:s,after_update:i}=r.$$;s&&s.m(e,t),n||Fa(()=>{let a=r.$$.on_mount.map(Sp).filter(pu);r.$$.on_destroy?r.$$.on_destroy.push(...a):ns(a),r.$$.on_mount=[]}),i.forEach(Fa)}function g_(r,e){let t=r.$$;t.fragment!==null&&(lA(t.after_update),ns(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function mA(r,e){r.$$.dirty[0]===-1&&(js.push(r),oA(),r.$$.dirty.fill(0)),r.$$.dirty[e/31|0]|=1<{let k=y.length?y[0]:m;return l.ctx&&s(l.ctx[f],l.ctx[f]=k)&&(!l.skip_bound&&l.bound[f]&&l.bound[f](k),c&&mA(r,f)),m}):[],l.update(),c=!0,ns(l.before_update),l.fragment=n?n(l.ctx):!1,e.target){if(e.hydrate){tA();let f=sA(e.target);l.fragment&&l.fragment.l(f),f.forEach(ss)}else l.fragment&&l.fragment.c();e.intro&&dA(r.$$.fragment),pA(r,e.target,e.anchor,e.customElement),rA(),h_()}Pa(u)}var hA;typeof HTMLElement=="function"&&(hA=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){let{on_mount:r}=this.$$;this.$$.on_disconnect=r.map(Sp).filter(pu);for(let e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(r,e,t){this[r]=t}disconnectedCallback(){ns(this.$$.on_disconnect)}$destroy(){g_(this,1),this.$destroy=nn}$on(r,e){if(!pu(e))return nn;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&&!l_(r)&&(this.$$.skip_bound=!0,this.$$set(r),this.$$.skip_bound=!1)}});var hu=class{$destroy(){g_(this,1),this.$destroy=nn}$on(e,t){if(!pu(t))return nn;let n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{let s=n.indexOf(t);s!==-1&&n.splice(s,1)}}$set(e){this.$$set&&!l_(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}};var Mp=vi(ze());function T_(r,e,t){let n=r.slice();return n[55]=e[t],n}function b_(r,e,t){let n=r.slice();return n[58]=e[t].value,n[59]=e[t].label,n[60]=e[t].symbol,n[61]=e[t].accessKey,n[62]=e[t].accessKeyIndex,n}function gA(r){let e,t=r[60]+"",n;return{c(){e=V("span"),n=Qe(t)},m(s,i){Bs(s,e,i),O(e,n)},p:nn,d(s){s&&ss(e)}}}function __(r){let e,t,n,s,i,a,o,u,l=r[59].substring(0,r[62])+"",c,f,m=r[59].substring(r[62],r[62]+1)+"",y,k,E=r[59].substring(r[62]+1)+"",x,v,I=r[60]&&r[60].charCodeAt(0)>=256,F,le,B,ie,W,j=I&&gA(r);return B=p_(r[40][0]),{c(){e=V("span"),t=V("input"),a=Z(),o=V("label"),u=V("span"),c=Qe(l),f=V("span"),y=Qe(m),k=V("span"),x=Qe(E),v=Z(),j&&j.c(),le=Z(),A(t,"type","radio"),A(t,"id",n="priority-"+r[58]),t.__value=s=r[58],t.value=t.__value,A(t,"accesskey",i=r[19](r[61])),A(f,"class","accesskey"),A(o,"for",F="priority-"+r[58]),B.p(t)},m(ce,Ie){Bs(ce,e,Ie),O(e,t),t.checked=t.__value===r[1].priority,O(e,a),O(e,o),O(o,u),O(u,c),O(o,f),O(f,y),O(o,k),O(k,x),O(o,v),j&&j.m(o,null),O(e,le),ie||(W=it(t,"change",r[39]),ie=!0)},p(ce,Ie){Ie[0]&524288&&i!==(i=ce[19](ce[61]))&&A(t,"accesskey",i),Ie[0]&3&&(t.checked=t.__value===ce[1].priority),I&&j.p(ce,Ie)},d(ce){ce&&ss(e),j&&j.d(),B.r(),ie=!1,W()}}}function v_(r){let e,t=r[55].name+"",n,s,i=r[55].symbol+"",a,o,u;return{c(){e=V("option"),n=Qe(t),s=Qe(" ["),a=Qe(i),o=Qe("]"),e.__value=u=r[55],e.value=e.__value},m(l,c){Bs(l,e,c),O(e,n),O(e,s),O(e,a),O(e,o)},p(l,c){c[0]&1&&t!==(t=l[55].name+"")&&Dp(n,t),c[0]&1&&i!==(i=l[55].symbol+"")&&Dp(a,i),c[0]&1&&u!==(u=l[55])&&(e.__value=u,e.value=e.__value)},d(l){l&&ss(e)}}}function yA(r){let e,t,n,s,i,a,o,u,l,c,f,m,y,k,E,x,v,I,F,le,B,ie,W,j,ce,Ie,$,N,w,H,C,X,d,p,h,g,T,_,S,M,D,R,U,ge,ae,te,Re,ve,_r,un,Ft,ln,Ct,qe,Ba,Fn,ms,oe,Me,Fe,cn,vr,hs,Ha,Et,Vt,za,Va,um,Ka,mi,Qa,lm,dn,Xa,cm,Ye,Za,dm,or,fm,hi,pm,mm,Ja,hm,eo,gm,ur,ym,gi,Tm,bm,to,_m,ro,vm,lr,wm,yi,Em,km,no,Sm,gs,Ln,Om,so,Dm,Ti,dl,xm,ys=r[27],kt=[];for(let q=0;qtion',i=Z(),a=V("textarea"),u=Z(),l=V("div"),c=V("label"),f=Qe("Priority"),y=Z();for(let q=0;qart',Re=Z(),ve=V("input"),un=Z(),Ft=V("code"),ln=Qe(r[21]),Ct=Z(),qe=new Rr(!1),Ba=Z(),Fn=V("div"),ms=V("label"),ms.innerHTML=`Only + future dates:`,oe=Z(),Me=V("input"),cn=Z(),vr=V("div"),hs=V("label"),hs.innerHTML='Status',Ha=Z(),Et=V("select");for(let q=0;qr[46].call(Et)),A(Va,"class","tasks-modal-warning"),A(vr,"class","tasks-modal-section"),A(Qa,"for","status"),A(dn,"id","status"),A(dn,"type","checkbox"),A(dn,"class","task-list-item-checkbox tasks-modal-checkbox"),dn.checked=Xa=r[1].status.isCompleted(),dn.disabled=!0,A(Ka,"class","tasks-modal-section tasks-modal-status"),A(Za,"for","created"),A(or,"id","created"),A(or,"type","text"),A(or,"placeholder",Hs),ht(or,"tasks-modal-error",!r[3]),Ja.a=null,A(eo,"for","done"),A(ur,"id","done"),A(ur,"type","text"),A(ur,"placeholder",Hs),ht(ur,"tasks-modal-error",!r[12]),to.a=null,A(ro,"for","cancelled"),A(lr,"id","cancelled"),A(lr,"type","text"),A(lr,"placeholder",Hs),ht(lr,"tasks-modal-error",!r[14]),no.a=null,A(Ye,"class","tasks-modal-section tasks-modal-dates"),Ln.disabled=so=!r[18],A(Ln,"type","submit"),A(Ln,"class","mod-cta"),A(Ti,"type","button"),A(gs,"class","tasks-modal-section tasks-modal-buttons"),ht(t,"with-accesskeys",r[15]),A(e,"class","tasks-modal")},m(q,re){Bs(q,e,re),O(e,t),O(t,n),O(n,s),O(n,i),O(n,a),mt(a,r[1].description),r[38](a),O(t,u),O(t,l),O(l,c),O(c,f),O(l,y);for(let me=0;meno ${oe} date`;let cn=Mp.parseDate(Me,Fe,{forwardDate:Fe!=null});return cn!==null?window.moment(cn).format("YYYY-MM-DD"):`invalid ${oe} date`}function _(oe,Me){return T(oe,Me,v.forwardOnly?new Date:void 0)}function S(oe){let Me=null,Fe=Mp.parseDate(oe,new Date,{forwardDate:v.forwardOnly});return Fe!==null&&(Me=window.moment(Fe)),Me}Rp(()=>{let{provideAccessKeys:oe}=K();t(15,p=oe);let Me=ye.getInstance().removeAsWordFrom(i.description);(Me!=i.description||!ye.getInstance().includedIn(i.description))&&(d=!0);let Fe="none";i.priority==="5"?Fe="lowest":i.priority==="4"?Fe="low":i.priority==="2"?Fe="medium":i.priority==="1"?Fe="high":i.priority==="0"&&(Fe="highest"),t(1,v={description:Me,status:i.status,priority:Fe,recurrenceRule:i.recurrence?i.recurrence.toText():"",createdDate:new He(i.createdDate).formatAsDate(),startDate:new He(i.startDate).formatAsDate(),scheduledDate:new He(i.scheduledDate).formatAsDate(),dueDate:new He(i.dueDate).formatAsDate(),doneDate:new He(i.doneDate).formatAsDate(),cancelledDate:new He(i.cancelledDate).formatAsDate(),forwardOnly:!0}),setTimeout(()=>{x.focus()},10)});let M=oe=>{if(oe.key&&!oe.altKey&&!oe.ctrlKey){let Me=g.find(Fe=>Fe.label.charAt(0).toLowerCase()==oe.key);Me&&t(1,v.priority=Me.value,v)}},D=()=>{a([])},R=oe=>{oe.key==="Enter"&&(oe.preventDefault(),h&&ge())},U=()=>{setTimeout(()=>{t(1,v.description=v.description.replace(/[\r\n]+/g," "),v)},0)},ge=()=>{let oe=v.description.trim();d&&(oe=ye.getInstance().prependTo(oe));let Me=S(v.startDate),Fe=S(v.scheduledDate),cn=S(v.dueDate),vr=S(v.cancelledDate),hs=S(v.createdDate),Ha=S(v.doneDate),Et=null;v.recurrenceRule&&(Et=st.fromText({recurrenceRuleText:v.recurrenceRule,startDate:Me,scheduledDate:Fe,dueDate:cn}));let Vt;switch(v.priority){case"lowest":Vt="5";break;case"low":Vt="4";break;case"medium":Vt="2";break;case"high":Vt="1";break;case"highest":Vt="0";break;default:Vt="3"}let za=new fe(Object.assign(Object.assign({},i),{description:oe,status:v.status,priority:Vt,recurrence:Et,startDate:Me,scheduledDate:Fe,dueDate:cn,doneDate:Ha,createdDate:hs,cancelledDate:vr}));a([za])},ae=[[]];function te(){v.description=this.value,t(1,v),t(8,ce),t(4,B),t(6,W),t(11,w),t(2,F),t(13,C),t(0,o)}function Re(oe){mu[oe?"unshift":"push"](()=>{x=oe,t(16,x)})}function ve(){v.priority=this.__value,t(1,v),t(8,ce),t(4,B),t(6,W),t(11,w),t(2,F),t(13,C),t(0,o)}function _r(){v.recurrenceRule=this.value,t(1,v),t(8,ce),t(4,B),t(6,W),t(11,w),t(2,F),t(13,C),t(0,o)}function un(){v.dueDate=this.value,t(1,v),t(8,ce),t(4,B),t(6,W),t(11,w),t(2,F),t(13,C),t(0,o)}function Ft(){v.scheduledDate=this.value,t(1,v),t(8,ce),t(4,B),t(6,W),t(11,w),t(2,F),t(13,C),t(0,o)}function ln(){v.startDate=this.value,t(1,v),t(8,ce),t(4,B),t(6,W),t(11,w),t(2,F),t(13,C),t(0,o)}function Ct(){v.forwardOnly=this.checked,t(1,v),t(8,ce),t(4,B),t(6,W),t(11,w),t(2,F),t(13,C),t(0,o)}function qe(){v.status=m_(this),t(1,v),t(8,ce),t(4,B),t(6,W),t(11,w),t(2,F),t(13,C),t(0,o)}function Ba(){v.createdDate=this.value,t(1,v),t(8,ce),t(4,B),t(6,W),t(11,w),t(2,F),t(13,C),t(0,o)}function Fn(){v.doneDate=this.value,t(1,v),t(8,ce),t(4,B),t(6,W),t(11,w),t(2,F),t(13,C),t(0,o)}function ms(){v.cancelledDate=this.value,t(1,v),t(8,ce),t(4,B),t(6,W),t(11,w),t(2,F),t(13,C),t(0,o)}return r.$$set=oe=>{"task"in oe&&t(33,i=oe.task),"onSubmit"in oe&&t(34,a=oe.onSubmit),"statusOptions"in oe&&t(0,o=oe.statusOptions)},r.$$.update=()=>{if(r.$$.dirty[0]&32768){e:t(19,n=oe=>p?oe:null)}if(r.$$.dirty[0]&258){e:t(1,v.dueDate=Hr(v.dueDate),v),t(8,ce=_("due",v.dueDate)),t(9,Ie=!ce.includes("invalid"))}if(r.$$.dirty[0]&18){e:t(1,v.startDate=Hr(v.startDate),v),t(4,B=_("start",v.startDate)),t(5,ie=!B.includes("invalid"))}if(r.$$.dirty[0]&66){e:t(1,v.scheduledDate=Hr(v.scheduledDate),v),t(6,W=_("scheduled",v.scheduledDate)),t(7,j=!W.includes("invalid"))}if(r.$$.dirty[0]&2050){e:t(1,v.doneDate=Hr(v.doneDate),v),t(11,w=_("done",v.doneDate)),t(12,H=!w.includes("invalid"))}if(r.$$.dirty[0]&6){e:t(1,v.createdDate=Hr(v.createdDate),v),t(2,F=_("created",v.createdDate)),t(3,le=!F.includes("invalid"))}if(r.$$.dirty[0]&8194){e:t(1,v.cancelledDate=Hr(v.cancelledDate),v),t(13,C=_("cancelled",v.cancelledDate)),t(14,X=!C.includes("invalid"))}if(r.$$.dirty[0]&2|r.$$.dirty[1]&16){e:if(t(10,N=!0),!v.recurrenceRule)t(17,$="not recurring");else{let oe=t(35,s=st.fromText({recurrenceRuleText:v.recurrenceRule,startDate:null,scheduledDate:null,dueDate:null}))===null||s===void 0?void 0:s.toText();oe?!v.startDate&&!v.scheduledDate&&!v.dueDate?(t(17,$="due, scheduled or start date required"),t(10,N=!1)):t(17,$=oe):(t(17,$="invalid recurrence rule"),t(10,N=!1))}}if(r.$$.dirty[0]&2){e:t(36,I=v.description.trim()!=="")}if(r.$$.dirty[0]&22184|r.$$.dirty[1]&32){e:t(18,h=Ie&&N&&j&&ie&&I&&X&&le&&H)}},[o,v,F,le,B,ie,W,j,ce,Ie,N,w,H,C,X,p,x,$,h,n,l,c,f,m,y,k,E,g,M,D,R,U,ge,i,a,s,I,te,Re,ve,ae,_r,un,Ft,ln,Ct,qe,Ba,Fn,ms]}var Cp=class extends hu{constructor(e){super(),y_(this,e,TA,yA,u_,{task:33,onSubmit:34,statusOptions:0},null,[-1,-1,-1])}},w_=Cp;var On=class extends E_.Modal{constructor({app:t,task:n,onSubmit:s}){super(t);this.task=n,this.onSubmit=i=>{i.length&&s(i),this.close()}}onOpen(){this.titleEl.setText("Create or edit Task"),this.modalEl.style.paddingBottom="0";let{contentEl:t}=this;this.contentEl.style.paddingBottom="0";let n=this.getKnownStatusesAndCurrentTaskStatusIfNotKnown();new w_({target:t,props:{task:this.task,statusOptions:n,onSubmit:this.onSubmit}})}getKnownStatusesAndCurrentTaskStatusIfNotKnown(){let t=Ee.getInstance().registeredStatuses;return Ee.getInstance().bySymbol(this.task.status.symbol)===Q.EMPTY&&t.push(this.task.status),t}onClose(){let{contentEl:t}=this;t.empty()}};function bA(){let{setCreatedDate:r}=K();return r?window.moment():null}function _A(r){let{setCreatedDate:e}=K();if(!e||r.createdDate!==null)return!1;let t=r.description==="",n=!ye.getInstance().isEmpty(),s=!ye.getInstance().includedIn(r.description);return t||n&&s}var gu=({line:r,path:e})=>{var m,y;let t=fe.parseTaskSignifiers(r,pt.fromUnknownPosition(e),bt.fromPath(e)),n=bA();if(t!==null)return _A(t)?new fe(ot(ke({},t),{createdDate:n})):t;let s=r.match(z.nonTaskRegex);if(s===null)return console.error("Tasks: Cannot create task on line:",r),new fe({status:Q.TODO,description:"",taskLocation:pt.fromUnknownPosition(e),indentation:"",listMarker:"-",priority:"3",createdDate:n,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,cancelledDate:null,recurrence:null,blockLink:"",tags:[],originalMarkdown:"",scheduledDateIsInferred:!1});let i=s[1],a=(m=s[2])!=null?m:"-",o=(y=s[4])!=null?y:" ",u=Ee.getInstance().bySymbolOrCreate(o),l=s[5],c=r.match(z.blockLinkRegex),f=c!==null?c[0]:"";return f!==""&&(l=l.replace(z.blockLinkRegex,"")),new fe({status:u,description:l,taskLocation:pt.fromUnknownPosition(e),indentation:i,listMarker:a,blockLink:f,priority:"3",createdDate:n,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,cancelledDate:null,recurrence:null,tags:[],originalMarkdown:"",scheduledDateIsInferred:!1})};var k_=(r,e,t,n)=>{var f;if(r)return t instanceof Ap.MarkdownView;if(!(t instanceof Ap.MarkdownView))return;let s=(f=t.file)==null?void 0:f.path;if(s===void 0)return;let a=e.getCursor().line,o=e.getLine(a),u=gu({line:o,path:s}),l=m=>{let y=bt.removeInferredStatusIfNeeded(u,m).map(k=>k.toFileLineString()).join(` +`);e.setLine(a,y)};new On({app:n,task:u,onSubmit:l}).open()};var Pp=require("obsidian");var S_=(r,e,t)=>{var u;if(r)return t instanceof Pp.MarkdownView;if(!(t instanceof Pp.MarkdownView))return;let n=(u=t.file)==null?void 0:u.path;if(n===void 0)return;let s=e.getCursor(),i=s.line,a=e.getLine(i),o=vA(a,n);e.setLine(i,o.text),e.setCursor(wA(s,o))},vA=(r,e)=>{let t=fe.fromLine({line:r,taskLocation:pt.fromUnknownPosition(e),fallbackDate:null});if(t!==null){let n=t.toggleWithRecurrenceInUsersOrder().map(s=>s.toFileLineString());return{text:n.join(` +`),moveTo:{line:n.length-1}}}else{let n=r.match(z.taskRegex);if(n!==null){let s=n[3],a=Ee.getInstance().bySymbol(s).nextStatusSymbol;return{text:r.replace(z.taskRegex,`$1- [${a}] $4`)}}else if(z.listItemRegex.test(r)){let s=r.replace(z.listItemRegex,"$1$2 [ ]");return{text:s,moveTo:{ch:s.length}}}else{let s=r.replace(z.indentationRegex,"$1- ");return{text:s,moveTo:{ch:s.length}}}}},wA=(r,e)=>{var i;let t={line:0,ch:r.ch},n=ke(ke({},t),(i=e.moveTo)!=null?i:{}),s=e.text.split(` +`)[n.line].length;return{line:r.line+n.line,ch:Math.min(n.ch,s)}};var yu=class{get app(){return this.plugin.app}constructor({plugin:e}){this.plugin=e,e.addCommand({id:"edit-task",name:"Create or edit task",icon:"pencil",editorCheckCallback:(t,n,s)=>k_(t,n,s,this.app)}),e.addCommand({id:"toggle-done",name:"Toggle task done",icon:"check-in-circle",editorCheckCallback:S_})}};var EA=Object.prototype.toString,Vs=Array.isArray||function(e){return EA.call(e)==="[object Array]"};function Ip(r){return typeof r=="function"}function kA(r){return Vs(r)?"array":typeof r}function Np(r){return r.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function O_(r,e){return r!=null&&typeof r=="object"&&e in r}function SA(r,e){return r!=null&&typeof r!="object"&&r.hasOwnProperty&&r.hasOwnProperty(e)}var OA=RegExp.prototype.test;function DA(r,e){return OA.call(r,e)}var xA=/\S/;function RA(r){return!DA(xA,r)}var MA={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function CA(r){return String(r).replace(/[&<>"'`=\/]/g,function(t){return MA[t]})}var AA=/\s*/,PA=/\s+/,D_=/\s*=/,NA=/\s*\}/,IA=/#|\^|\/|>|\{|&|=|!/;function FA(r,e){if(!r)return[];var t=!1,n=[],s=[],i=[],a=!1,o=!1,u="",l=0;function c(){if(a&&!o)for(;i.length;)delete s[i.pop()];else i=[];a=!1,o=!1}var f,m,y;function k(j){if(typeof j=="string"&&(j=j.split(PA,2)),!Vs(j)||j.length!==2)throw new Error("Invalid tags: "+j);f=new RegExp(Np(j[0])+"\\s*"),m=new RegExp("\\s*"+Np(j[1])),y=new RegExp("\\s*"+Np("}"+j[1]))}k(e||sr.tags);for(var E=new Ua(r),x,v,I,F,le,B;!E.eos();){if(x=E.pos,I=E.scanUntil(f),I)for(var ie=0,W=I.length;ie"?le=[v,I,x,E.pos,u,l,t]:le=[v,I,x,E.pos],l++,s.push(le),v==="#"||v==="^")n.push(le);else if(v==="/"){if(B=n.pop(),!B)throw new Error('Unopened section "'+I+'" at '+x);if(B[1]!==I)throw new Error('Unclosed section "'+B[1]+'" at '+x)}else v==="name"||v==="{"||v==="&"?o=!0:v==="="&&k(I)}if(c(),B=n.pop(),B)throw new Error('Unclosed section "'+B[1]+'" at '+E.pos);return UA(LA(s))}function LA(r){for(var e=[],t,n,s=0,i=r.length;s0?n[n.length-1][4]:e;break;default:t.push(s)}return e}function Ua(r){this.string=r,this.tail=r,this.pos=0}Ua.prototype.eos=function(){return this.tail===""};Ua.prototype.scan=function(e){var t=this.tail.match(e);if(!t||t.index!==0)return"";var n=t[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n};Ua.prototype.scanUntil=function(e){var t=this.tail.search(e),n;switch(t){case-1:n=this.tail,this.tail="";break;case 0:n="";break;default:n=this.tail.substring(0,t),this.tail=this.tail.substring(t)}return this.pos+=n.length,n};function zs(r,e){this.view=r,this.cache={".":this.view},this.parent=e}zs.prototype.push=function(e){return new zs(e,this)};zs.prototype.lookup=function(e){var t=this.cache,n;if(t.hasOwnProperty(e))n=t[e];else{for(var s=this,i,a,o,u=!1;s;){if(e.indexOf(".")>0)for(i=s.view,a=e.split("."),o=0;i!=null&&o"?l=this.renderPartial(o,t,n,i):u==="&"?l=this.unescapedValue(o,t):u==="name"?l=this.escapedValue(o,t,i):u==="text"&&(l=this.rawValue(o)),l!==void 0&&(a+=l);return a};Mt.prototype.renderSection=function(e,t,n,s,i){var a=this,o="",u=t.lookup(e[1]);function l(m){return a.render(m,t,n,i)}if(!!u){if(Vs(u))for(var c=0,f=u.length;c0||!n)&&(i[a]=s+i[a]);return i.join(` +`)};Mt.prototype.renderPartial=function(e,t,n,s){if(!!n){var i=this.getConfigTags(s),a=Ip(n)?n(e[1]):n[e[1]];if(a!=null){var o=e[6],u=e[5],l=e[4],c=a;u==0&&l&&(c=this.indentPartial(a,l,o));var f=this.parse(c,i);return this.renderTokens(f,t,n,c,s)}}};Mt.prototype.unescapedValue=function(e,t){var n=t.lookup(e[1]);if(n!=null)return n};Mt.prototype.escapedValue=function(e,t,n){var s=this.getConfigEscape(n)||sr.escape,i=t.lookup(e[1]);if(i!=null)return typeof i=="number"&&s===sr.escape?String(i):s(i)};Mt.prototype.rawValue=function(e){return e[1]};Mt.prototype.getConfigTags=function(e){return Vs(e)?e:e&&typeof e=="object"?e.tags:void 0};Mt.prototype.getConfigEscape=function(e){if(e&&typeof e=="object"&&!Vs(e))return e.escape};var sr={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(r){La.templateCache=r},get templateCache(){return La.templateCache}},La=new Mt;sr.clearCache=function(){return La.clearCache()};sr.parse=function(e,t){return La.parse(e,t)};sr.render=function(e,t,n,s){if(typeof e!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+kA(e)+'" was given as the first argument for mustache#render(template, view, partials)');return La.render(e,t,n,s)};sr.escape=CA;sr.Scanner=Ua;sr.Context=zs;sr.Writer=Mt;var Fp=sr;var A_=vi(C_());function P_(r,e){Fp.escape=function(t){return t};try{return Fp.render(r,(0,A_.default)(e))}catch(t){let n="";throw t instanceof Error?n=`There was an error expanding one or more placeholders. The error message was: ${t.message.replace(/ > /g,".").replace("Missing Mustache data property","Unknown property")}`:n="Unknown error expanding placeholders.",n+=` The problem is in: - ${r}`,Error(n)}}function Zo(r){return{query:{file:new Mi(r)}}}function Vn(r,e){let t=`Error: ${r}. + ${r}`,Error(n)}}function Tu(r){return{query:{file:new Ws(r)}}}function is(r,e){let t=`Error: ${r}. The error message was: - `,n="";return e instanceof Error?n+=e:n+="Unknown error",`${t}"${n}"`}var Xr=class{constructor(e,t,n){this.property=e,this.comparator=Xr.maybeReverse(n,t)}static maybeReverse(e,t){return e?Xr.makeReversedComparator(t):t}static makeReversedComparator(e){return(t,n)=>e(t,n)*-1}};var gn=class{constructor(e,t,n){this.property=e,this.grouper=t,this.reverse=n}};var ke=class{canCreateFilterForLine(e){return ke.lineMatchesFilter(this.filterRegExp(),e)}static lineMatchesFilter(e,t){return e?e.test(t):!1}static getMatch(e,t){return e?t.match(e):null}fieldNameSingular(){return this.fieldName()}fieldNameSingularEscaped(){return $o(this.fieldNameSingular())}supportsSorting(){return!1}createSorterFromLine(e){if(!this.supportsSorting())return null;let t=ke.getMatch(this.sorterRegExp(),e);if(t===null)return null;let n=!!t[1];return this.createSorter(n)}sorterRegExp(){if(!this.supportsSorting())throw Error(`sorterRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^sort by ${this.fieldNameSingularEscaped()}( reverse)?`,"i")}comparator(){throw Error(`comparator() unimplemented for ${this.fieldNameSingular()}`)}createSorter(e){return new Xr(this.fieldNameSingular(),this.comparator(),e)}createNormalSorter(){return this.createSorter(!1)}createReverseSorter(){return this.createSorter(!0)}supportsGrouping(){return!1}createGrouperFromLine(e){if(!this.supportsGrouping())return null;let t=ke.getMatch(this.grouperRegExp(),e);if(t===null)return null;let n=!!t[1];return this.createGrouper(n)}grouperRegExp(){if(!this.supportsGrouping())throw Error(`grouperRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^group by ${this.fieldNameSingularEscaped()}( reverse)?$`,"i")}grouper(){throw Error(`grouper() unimplemented for ${this.fieldNameSingular()}`)}createGrouper(e){return new gn(this.fieldNameSingular(),this.grouper(),e)}createNormalGrouper(){return this.createGrouper(!1)}createReverseGrouper(){return this.createGrouper(!0)}};var Se=class{constructor(e,t=[],n=""){this.description=e,this.symbol=n,this.children=t}static booleanAnd(e){return this.combineOrCreateExplanation("All of",e,"AND")}static booleanOr(e){return this.combineOrCreateExplanation("At least one of",e,"OR")}static booleanNot(e){return new Se("None of",e,"NOT")}static booleanXor(e){return new Se("Exactly one of",e,"XOR")}asString(e=""){if(this.children.length==0)return e+this.description;let t=e;this.symbol===""?t+=this.description:(t+=this.symbol,this.children.length>1&&(t+=` (${this.description})`),t+=":");let n=e+" ";for(let i=0;ie(t,n)*-1}};var Dn=class{constructor(e,t,n,s){this.instruction=e,this.property=t,this.grouper=n,this.reverse=s}};var Oe=class{canCreateFilterForLine(e){return Oe.lineMatchesFilter(this.filterRegExp(),e)}static lineMatchesFilter(e,t){return e?e.test(t):!1}static getMatch(e,t){return e?t.match(e):null}fieldNameSingular(){return this.fieldName()}fieldNameSingularEscaped(){return ou(this.fieldNameSingular())}supportsSorting(){return!1}createSorterFromLine(e){if(!this.supportsSorting())return null;let t=Oe.getMatch(this.sorterRegExp(),e);if(t===null)return null;let n=!!t[1];return this.createSorter(n)}sorterRegExp(){if(!this.supportsSorting())throw Error(`sorterRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^sort by ${this.fieldNameSingularEscaped()}( reverse)?`,"i")}sorterInstruction(e){let t=`sort by ${this.fieldNameSingular()}`;return e&&(t+=" reverse"),t}comparator(){throw Error(`comparator() unimplemented for ${this.fieldNameSingular()}`)}createSorter(e){return new sn(this.sorterInstruction(e),this.fieldNameSingular(),this.comparator(),e)}createNormalSorter(){return this.createSorter(!1)}createReverseSorter(){return this.createSorter(!0)}supportsGrouping(){return!1}createGrouperFromLine(e){if(!this.supportsGrouping())return null;let t=Oe.getMatch(this.grouperRegExp(),e);if(t===null)return null;let n=!!t[1];return this.createGrouper(n)}grouperRegExp(){if(!this.supportsGrouping())throw Error(`grouperRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^group by ${this.fieldNameSingularEscaped()}( reverse)?$`,"i")}grouperInstruction(e){let t=`group by ${this.fieldNameSingular()}`;return e&&(t+=" reverse"),t}grouper(){throw Error(`grouper() unimplemented for ${this.fieldNameSingular()}`)}createGrouper(e){return new Dn(this.grouperInstruction(e),this.fieldNameSingular(),this.grouper(),e)}createNormalGrouper(){return this.createGrouper(!1)}createReverseGrouper(){return this.createGrouper(!0)}};var De=class{constructor(e,t=[],n=""){this.description=e,this.symbol=n,this.children=t}static booleanAnd(e){return this.combineOrCreateExplanation("All of",e,"AND")}static booleanOr(e){return this.combineOrCreateExplanation("At least one of",e,"OR")}static booleanNot(e){return new De("None of",e,"NOT")}static booleanXor(e){return new De("Exactly one of",e,"XOR")}asString(e=""){if(this.children.length==0)return e+this.description;let t=e;this.symbol===""?t+=this.description:(t+=this.symbol,this.children.length>1&&(t+=` (${this.description})`),t+=":");let n=e+" ";for(let s=0;s -${t.asString(" ")} -`}};var Er=class{constructor(e){this.instruction=e}get queryComponent(){return this._queryComponent}set queryComponent(e){this._queryComponent=e}get error(){return this._error}set error(e){this._error=e}static fromObject(e,t){let n=new Er(e);return n._queryComponent=t,n}static fromError(e,t){let n=new Er(e);return n._error=t,n}};var J=class{constructor(e){this.object=e}get instruction(){return this.object.instruction}get filter(){return this.object.queryComponent}get error(){return this.object.error}get filterFunction(){if(this.filter)return this.filter.filterFunction}static fromFilter(e){return new J(Er.fromObject(e.instruction,e))}static fromError(e,t){return new J(Er.fromError(e,t))}};var Jo=class{constructor(e,t){this._instruction=e,this._filter=t}canCreateFilterForLine(e){return e.toLocaleLowerCase()===this._instruction.toLocaleLowerCase()}createFilterOrErrorMessage(e){return this.canCreateFilterForLine(e)?J.fromFilter(new gt(e,this._filter,new Se(e))):J.fromError(e,`do not understand filter: ${e}`)}};var kr=class{constructor(){this._filters=[]}add(e,t){this._filters.push(new Jo(e,t))}canCreateFilterForLine(e){for(let t of this._filters)if(t.canCreateFilterForLine(e))return!0;return!1}createFilterOrErrorMessage(e){for(let t of this._filters){let n=t.createFilterOrErrorMessage(e);if(n.error===void 0)return n}return J.fromError(e,`do not understand filter: ${e}`)}};var yn=class extends ke{constructor(){super(...arguments);this._filters=new kr}canCreateFilterForLine(t){return this._filters.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){return this._filters.createFilterOrErrorMessage(t)}filterRegExp(){return null}};var Sr=class extends yn{constructor(){super(),this._filters.add("done",e=>e.isDone),this._filters.add("not done",e=>!e.isDone)}fieldName(){return"status"}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=Sr.oldStatusName(e),i=Sr.oldStatusName(t);return ni?-1:0}}static oldStatusName(e){return e.status.symbol===" "?"Todo":"Done"}supportsGrouping(){return!0}grouper(){return e=>[Sr.oldStatusName(e)]}};var eu=class{findUnexpandedDateText(e){let t=["<%","YYYY-MM-DD"];for(let n of t)if(e.includes(n))return this.unexpandedDateTextMessage(n);return null}unexpandedDateTextMessage(e){return`Instruction contains unexpanded template text: "${e}" - and cannot be interpreted. +${t.asString(e+" ")} +`}};var Mr=class{constructor(e){this.instruction=e}get queryComponent(){return this._queryComponent}set queryComponent(e){this._queryComponent=e}get error(){return this._error}set error(e){this._error=e}static fromObject(e,t){let n=new Mr(e);return n._queryComponent=t,n}static fromError(e,t){let n=new Mr(e);return n._error=t,n}};var J=class{constructor(e){this.object=e}get instruction(){return this.object.instruction}get filter(){return this.object.queryComponent}get error(){return this.object.error}get filterFunction(){if(this.filter)return this.filter.filterFunction}static fromFilter(e){return new J(Mr.fromObject(e.instruction,e))}static fromError(e,t){return new J(Mr.fromError(e,t))}};var bu=class{constructor(e,t){this._instruction=e,this._filter=t}canCreateFilterForLine(e){return e.toLocaleLowerCase()===this._instruction.toLocaleLowerCase()}createFilterOrErrorMessage(e){return this.canCreateFilterForLine(e)?J.fromFilter(new _t(e,this._filter,new De(e))):J.fromError(e,`do not understand filter: ${e}`)}};var Cr=class{constructor(){this._filters=[]}add(e,t){this._filters.push(new bu(e,t))}canCreateFilterForLine(e){for(let t of this._filters)if(t.canCreateFilterForLine(e))return!0;return!1}createFilterOrErrorMessage(e){for(let t of this._filters){let n=t.createFilterOrErrorMessage(e);if(n.error===void 0)return n}return J.fromError(e,`do not understand filter: ${e}`)}};var xn=class extends Oe{constructor(){super(...arguments);this._filters=new Cr}canCreateFilterForLine(t){return this._filters.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){return this._filters.createFilterOrErrorMessage(t)}filterRegExp(){return null}};var Ar=class extends xn{constructor(){super(),this._filters.add("done",e=>e.isDone),this._filters.add("not done",e=>!e.isDone)}fieldName(){return"status"}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=Ar.oldStatusName(e),s=Ar.oldStatusName(t);return ns?-1:0}}static oldStatusName(e){return e.status.symbol===" "?"Todo":"Done"}supportsGrouping(){return!0}grouper(){return e=>[Ar.oldStatusName(e)]}};var _u=class{findUnexpandedDateText(e){let t=["<%","YYYY-MM-DD"];for(let n of t)if(e.includes(n))return this.unexpandedDateTextMessage(n);return null}unexpandedDateTextMessage(e){return`Instruction contains unexpanded template text: "${e}" - and cannot be interpreted. Possible causes: - The query is an a template file, and is not intended to be searched. @@ -195,7 +196,7 @@ Possible causes: instead of in to a template file. See: https://publish.obsidian.md/tasks/Advanced/Instruction+contains+unexpanded+template+text -`}};var yt=class extends ke{constructor(t=null){super();t!==null?this.filterInstructions=t:(this.filterInstructions=new kr,this.filterInstructions.add(`has ${this.fieldName()} date`,n=>this.date(n)!==null),this.filterInstructions.add(`no ${this.fieldName()} date`,n=>this.date(n)===null),this.filterInstructions.add(`${this.fieldName()} date is invalid`,n=>{let i=this.date(n);return i!==null&&!i.isValid()}))}canCreateFilterForLine(t){return this.filterInstructions.canCreateFilterForLine(t)?!0:super.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){var h;let n=this.checkForUnexpandedTemplateText(t);if(n)return J.fromError(t,n);let i=this.filterInstructions.createFilterOrErrorMessage(t);if(i.filter!==void 0)return i;let s=ke.getMatch(this.filterRegExp(),t);if(s===null)return J.fromError(t,"do not understand query filter ("+this.fieldName()+" date)");let a=s[1],o=(h=s[2])==null?void 0:h.toLowerCase(),u=s[3],l=Nt.parseDateRange(u);if(!l.isValid()){let T=Nt.parseDate(a);T.isValid()&&(l=new Et(T,T))}if(!l.isValid())return J.fromError(t,"do not understand "+this.fieldName()+" date");let c=this.buildFilterFunction(o,l),f=yt.buildExplanation(this.fieldNameForExplanation(),o,this.filterResultIfFieldMissing(),l);return J.fromFilter(new gt(t,c,f))}buildFilterFunction(t,n){let i;switch(t){case"before":i=s=>s?s.isBefore(n.start):this.filterResultIfFieldMissing();break;case"after":i=s=>s?s.isAfter(n.end):this.filterResultIfFieldMissing();break;case"on or before":case"in or before":i=s=>s?s.isSameOrBefore(n.end):this.filterResultIfFieldMissing();break;case"on or after":case"in or after":i=s=>s?s.isSameOrAfter(n.start):this.filterResultIfFieldMissing();break;default:i=s=>s?s.isSameOrAfter(n.start)&&s.isSameOrBefore(n.end):this.filterResultIfFieldMissing()}return this.getFilter(i)}getFilter(t){return n=>t(this.date(n))}filterRegExp(){return new RegExp(`^${this.fieldNameForFilterInstruction()} (((?:on|in) or before|before|(?:on|in) or after|after|on|in)? ?(.*))`,"i")}fieldNameForFilterInstruction(){return this.fieldName()}static buildExplanation(t,n,i,s){let a=n,o="YYYY-MM-DD (dddd Do MMMM YYYY)",u;switch(n){case"before":case"on or after":u=s.start.format(o);break;case"after":case"on or before":u=s.end.format(o);break;case"in or before":a="on or before",u=s.end.format(o);break;case"in or after":a="on or after",u=s.start.format(o);break;default:if(!s.start.isSame(s.end)){let c=`${t} date is between:`,f=[new Se(`${s.start.format(o)} and`),new Se(`${s.end.format(o)} inclusive`)];return i&&f.push(new Se(`OR no ${t} date`)),new Se(c,f)}a="on",u=s.start.format(o);break}let l=`${t} date is ${a} ${u}`;return i&&(l+=` OR no ${t} date`),new Se(l)}fieldNameForExplanation(){return this.fieldName()}supportsSorting(){return!0}comparator(){return(t,n)=>Gr(this.date(t),this.date(n))}supportsGrouping(){return!0}grouper(){return t=>{let n=this.date(t);return n===null?["No "+this.fieldName()+" date"]:[n.format("YYYY-MM-DD dddd")]}}checkForUnexpandedTemplateText(t){return new eu().findUnexpandedDateText(t)}};var Ui=class extends yt{fieldName(){return"due"}date(e){return e.dueDate}filterResultIfFieldMissing(){return!1}};var Tp=class extends ke{createFilterOrErrorMessage(e){var n;let t=ke.getMatch(this.filterRegExp(),e);if(t!==null){let i=t[5],s=null;switch(i.toLowerCase()){case"lowest":s="5";break;case"low":s="4";break;case"none":s="3";break;case"medium":s="2";break;case"high":s="1";break;case"highest":s="0";break}if(s===null)return J.fromError(e,"do not understand priority");let a=e,o;switch((n=t[3])==null?void 0:n.toLowerCase()){case"above":o=u=>u.priority.localeCompare(s)<0;break;case"below":o=u=>u.priority.localeCompare(s)>0;break;case"not":o=u=>u.priority!==s;break;default:o=u=>u.priority===s,a=`${this.fieldName()} is ${i}`}return J.fromFilter(new gt(e,o,new Se(a)))}else return J.fromError(e,"do not understand query filter (priority)")}fieldName(){return"priority"}filterRegExp(){return Tp.priorityRegexp}supportsSorting(){return!0}comparator(){return(e,t)=>e.priority.localeCompare(t.priority)}supportsGrouping(){return!0}grouper(){return e=>[e.priorityNameGroupText]}},Kn=Tp;Kn.priorityRegexp=/^priority(\s+is)?(\s+(above|below|not))?(\s+(lowest|low|none|medium|high|highest))$/i;var Wi=class{matchesAnyOf(e){return e.some(t=>this.matches(t))}};var qi=class extends Wi{constructor(t){super();this.stringToFind=t}matches(t){return qi.stringIncludesCaseInsensitive(t,this.stringToFind)}static stringIncludesCaseInsensitive(t,n){return t.toLocaleLowerCase().includes(n.toLocaleLowerCase())}explanation(t){return new Se(t)}};var Tn=class extends Wi{constructor(t){super();this.regex=t}static validateAndConstruct(t){let n=/^\/(.+)\/([^/]*)$/,i=t.match(n);if(i!==null){let s=new RegExp(i[1],i[2]);return new Tn(s)}else return null}matches(t){return t.match(this.regex)!==null}static helpMessage(){return String.raw`See https://publish.obsidian.md/tasks/Queries/Regular+Expressions +`}};var at=class extends Oe{constructor(t=null){super();t!==null?this.filterInstructions=t:(this.filterInstructions=new Cr,this.filterInstructions.add(`has ${this.fieldName()} date`,n=>this.date(n)!==null),this.filterInstructions.add(`no ${this.fieldName()} date`,n=>this.date(n)===null),this.filterInstructions.add(`${this.fieldName()} date is invalid`,n=>{let s=this.date(n);return s!==null&&!s.isValid()}))}canCreateFilterForLine(t){return this.filterInstructions.canCreateFilterForLine(t)?!0:super.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){var m;let n=this.checkForUnexpandedTemplateText(t);if(n)return J.fromError(t,n);let s=this.filterInstructions.createFilterOrErrorMessage(t);if(s.filter!==void 0)return s;let i=Oe.getMatch(this.filterRegExp(),t);if(i===null)return J.fromError(t,"do not understand query filter ("+this.fieldName()+" date)");let a=i[1],o=(m=i[2])==null?void 0:m.toLowerCase(),u=i[3],l=Wt.parseDateRange(u);if(!l.isValid()){let y=Wt.parseDate(a);y.isValid()&&(l=new Dt(y,y))}if(!l.isValid())return J.fromError(t,"do not understand "+this.fieldName()+" date");let c=this.buildFilterFunction(o,l),f=at.buildExplanation(this.fieldNameForExplanation(),o,this.filterResultIfFieldMissing(),l);return J.fromFilter(new _t(t,c,f))}buildFilterFunction(t,n){let s;switch(t){case"before":s=i=>i?i.isBefore(n.start):this.filterResultIfFieldMissing();break;case"after":s=i=>i?i.isAfter(n.end):this.filterResultIfFieldMissing();break;case"on or before":case"in or before":s=i=>i?i.isSameOrBefore(n.end):this.filterResultIfFieldMissing();break;case"on or after":case"in or after":s=i=>i?i.isSameOrAfter(n.start):this.filterResultIfFieldMissing();break;default:s=i=>i?i.isSameOrAfter(n.start)&&i.isSameOrBefore(n.end):this.filterResultIfFieldMissing()}return this.getFilter(s)}getFilter(t){return n=>t(this.date(n))}filterRegExp(){return new RegExp(`^${this.fieldNameForFilterInstruction()} (((?:on|in) or before|before|(?:on|in) or after|after|on|in)? ?(.*))`,"i")}fieldNameForFilterInstruction(){return this.fieldName()}static buildExplanation(t,n,s,i){let a=n,o="YYYY-MM-DD (dddd Do MMMM YYYY)",u;switch(n){case"before":case"on or after":u=i.start.format(o);break;case"after":case"on or before":u=i.end.format(o);break;case"in or before":a="on or before",u=i.end.format(o);break;case"in or after":a="on or after",u=i.start.format(o);break;default:if(!i.start.isSame(i.end)){let c=`${t} date is between:`,f=[new De(`${i.start.format(o)} and`),new De(`${i.end.format(o)} inclusive`)];return s&&f.push(new De(`OR no ${t} date`)),new De(c,f)}a="on",u=i.start.format(o);break}let l=`${t} date is ${a} ${u}`;return s&&(l+=` OR no ${t} date`),new De(l)}fieldNameForExplanation(){return this.fieldName()}supportsSorting(){return!0}comparator(){return(t,n)=>Xr(this.date(t),this.date(n))}supportsGrouping(){return!0}grouper(){return t=>{let n=this.date(t);return n===null?["No "+this.fieldName()+" date"]:[n.format("YYYY-MM-DD dddd")]}}checkForUnexpandedTemplateText(t){return new _u().findUnexpandedDateText(t)}};var Ks=class extends at{fieldName(){return"due"}date(e){return e.dueDate}filterResultIfFieldMissing(){return!1}};var Up=class extends Oe{createFilterOrErrorMessage(e){var n;let t=Oe.getMatch(this.filterRegExp(),e);if(t!==null){let s=t[5],i=null;switch(s.toLowerCase()){case"lowest":i="5";break;case"low":i="4";break;case"none":i="3";break;case"medium":i="2";break;case"high":i="1";break;case"highest":i="0";break}if(i===null)return J.fromError(e,"do not understand priority");let a=e,o;switch((n=t[3])==null?void 0:n.toLowerCase()){case"above":o=u=>u.priority.localeCompare(i)<0;break;case"below":o=u=>u.priority.localeCompare(i)>0;break;case"not":o=u=>u.priority!==i;break;default:o=u=>u.priority===i,a=`${this.fieldName()} is ${s}`}return J.fromFilter(new _t(e,o,new De(a)))}else return J.fromError(e,"do not understand query filter (priority)")}fieldName(){return"priority"}filterRegExp(){return Up.priorityRegexp}supportsSorting(){return!0}comparator(){return(e,t)=>e.priority.localeCompare(t.priority)}supportsGrouping(){return!0}grouper(){return e=>[e.priorityNameGroupText]}},as=Up;as.priorityRegexp=/^priority(\s+is)?(\s+(above|below|not))?(\s+(lowest|low|none|medium|high|highest))$/i;var Qs=class{matchesAnyOf(e){return e.some(t=>this.matches(t))}};var Xs=class extends Qs{constructor(t){super();this.stringToFind=t}matches(t){return Xs.stringIncludesCaseInsensitive(t,this.stringToFind)}static stringIncludesCaseInsensitive(t,n){return t.toLocaleLowerCase().includes(n.toLocaleLowerCase())}explanation(t){return new De(t)}};var Rn=class extends Qs{constructor(t){super();this.regex=t}static validateAndConstruct(t){let n=/^\/(.+)\/([^/]*)$/,s=t.match(n);if(s!==null){let i=new RegExp(s[1],s[2]);return new Rn(i)}else return null}matches(t){return t.match(this.regex)!==null}static helpMessage(){return String.raw`See https://publish.obsidian.md/tasks/Queries/Regular+Expressions Regular expressions must look like this: /pattern/ @@ -221,44 +222,48 @@ to find them literally, you must add a \ before them: CAUTION! Regular expression (or 'regex') searching is a powerful but advanced feature that requires thorough knowledge in order to use successfully, and not miss intended search results. -`}explanation(t){let i=aA(t,"using regex: ",this.regexAsString());return new Se(i)}regexAsString(){let t=`'${this.regex.source}' with `;switch(this.regex.flags.length){case 0:t+="no flags";break;case 1:t+=`flag '${this.regex.flags}'`;break;default:t+=`flags '${this.regex.flags}'`;break}return t}};function aA(r,e,t){var o;let n=r.match(/\//);if(!n)return"Error explaining instruction. Could not find a slash character";let i=2,s=((o=n.index)!=null?o:i)-i;return`${e.padEnd(s)}${t}`}var Me=class extends ke{createFilterOrErrorMessage(e){let t=ke.getMatch(this.filterRegExp(),e);if(t===null)return J.fromError(e,`do not understand query filter (${this.fieldName()})`);let n=t[1].toLowerCase(),i=t[2],s=null;if(n.includes("include"))s=new qi(i);else if(n.includes("regex")){try{s=Tn.validateAndConstruct(i)}catch(u){let l=Vn("Parsing regular expression",u)+` +`}explanation(t){let s=qA(t,"using regex: ",this.regexAsString());return new De(s)}regexAsString(){let t=`'${this.regex.source}' with `;switch(this.regex.flags.length){case 0:t+="no flags";break;case 1:t+=`flag '${this.regex.flags}'`;break;default:t+=`flags '${this.regex.flags}'`;break}return t}};function qA(r,e,t){var o;let n=r.match(/\//);if(!n)return"Error explaining instruction. Could not find a slash character";let s=2,i=((o=n.index)!=null?o:s)-s;return`${e.padEnd(i)}${t}`}var Pe=class extends Oe{createFilterOrErrorMessage(e){let t=Oe.getMatch(this.filterRegExp(),e);if(t===null)return J.fromError(e,`do not understand query filter (${this.fieldName()})`);let n=t[1].toLowerCase(),s=t[2],i=null;if(n.includes("include"))i=new Xs(s);else if(n.includes("regex")){try{i=Rn.validateAndConstruct(s)}catch(u){let l=is("Parsing regular expression",u)+` -${Tn.helpMessage()}`;return J.fromError(e,l)}if(s===null)return J.fromError(e,`Invalid instruction: '${e}' +${Rn.helpMessage()}`;return J.fromError(e,l)}if(i===null)return J.fromError(e,`Invalid instruction: '${e}' -${Tn.helpMessage()}`)}if(s===null)return J.fromError(e,`do not understand query filter (${this.fieldName()})`);let a=n.match(/not/)!==null,o=new gt(e,this.getFilter(s,a),s.explanation(e));return J.fromFilter(o)}fieldPattern(){return this.fieldNameSingularEscaped()}filterOperatorPattern(){return"includes|does not include|regex matches|regex does not match"}filterRegExp(){return new RegExp(`^(?:${this.fieldPattern()}) (${this.filterOperatorPattern()}) (.*)`,"i")}getFilter(e,t){return n=>{let i=e.matches(this.value(n));return t?!i:i}}comparator(){return(e,t)=>this.value(e).localeCompare(this.value(t),void 0,{numeric:!0})}grouper(){return e=>[this.value(e)]}static escapeMarkdownCharacters(e){return e.replace(/\\/g,"\\\\").replace(/_/g,"\\_")}};var $i=class extends Me{fieldName(){return"path"}value(e){return e.path}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return e=>[Me.escapeMarkdownCharacters(e.path.replace(".md",""))]}};var Yi=class extends ke{canCreateFilterForLine(e){return!1}createFilterOrErrorMessage(e){return J.fromError(e,"Filtering by urgency is not yet supported")}fieldName(){return"urgency"}filterRegExp(){throw Error(`filterRegExp() unimplemented for ${this.fieldName()}`)}supportsSorting(){return!0}comparator(){return(e,t)=>t.urgency-e.urgency}supportsGrouping(){return!0}grouper(){return e=>[`${e.urgency.toFixed(2)}`]}createGrouper(e){return super.createGrouper(!e)}};var ji=class{static by(e,t){let n=[new Yi().comparator(),new Sr().comparator(),new Ui().comparator(),new Kn().comparator(),new $i().comparator()],i=[];for(let s of e)i.push(s.comparator);return t.sort(ji.makeCompositeComparator([...i,...n]))}static makeCompositeComparator(e){return(t,n)=>{for(let i of e){let s=i(t,n);if(s!==0)return s}return 0}}};var tu=class{constructor(e,t,n){this.nestingLevel=e,this.displayName=t,this.property=n}};var ru=class{constructor(e,t){this.lastHeadingAtLevel=new Array;this.groupers=t;let i=e.keys().next().value.length;for(let s=0;st.set(o,a)),e.pop();return t}};var iu=class extends nu{},su=class{constructor(e,t,n){this.root=new iu(t),this.buildGroupingTree(e,n)}buildGroupingTree(e,t){let n=[this.root];for(let i of e){let s=[];for(let a of n)for(let o of a.values){let u=i.grouper(o,t);u.length===0&&u.push("");for(let l of u){let c=a.children.get(l);c===void 0&&(c=new iu([]),a.children.set(l,c),s.push(c)),c.values.push(o)}}n=s}}generateTaskTreeStorage(){return this.root.generateAllPaths()}};var au=class{constructor(e,t){this.groups=e,this.groupHeadings=[],this.tasks=t}setGroupHeadings(e){for(let t of e)this.groupHeadings.push(t)}applyTaskLimit(e){this.tasks=this.tasks.slice(0,e)}tasksAsStringOfLines(){let e="";for(let t of this.tasks)e+=t.toFileLineString()+` +${Rn.helpMessage()}`)}if(i===null)return J.fromError(e,`do not understand query filter (${this.fieldName()})`);let a=n.match(/not/)!==null,o=new _t(e,this.getFilter(i,a),i.explanation(e));return J.fromFilter(o)}fieldPattern(){return this.fieldNameSingularEscaped()}filterOperatorPattern(){return"includes|does not include|regex matches|regex does not match"}filterRegExp(){return new RegExp(`^(?:${this.fieldPattern()}) (${this.filterOperatorPattern()}) (.*)`,"i")}getFilter(e,t){return n=>{let s=e.matches(this.value(n));return t?!s:s}}comparator(){return(e,t)=>this.value(e).localeCompare(this.value(t),void 0,{numeric:!0})}grouper(){return e=>[this.value(e)]}static escapeMarkdownCharacters(e){return e.replace(/\\/g,"\\\\").replace(/_/g,"\\_")}};var Zs=class extends Pe{fieldName(){return"path"}value(e){return e.path}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return e=>[Pe.escapeMarkdownCharacters(e.path.replace(".md",""))]}};var Js=class extends Oe{canCreateFilterForLine(e){return!1}createFilterOrErrorMessage(e){return J.fromError(e,"Filtering by urgency is not yet supported")}fieldName(){return"urgency"}filterRegExp(){throw Error(`filterRegExp() unimplemented for ${this.fieldName()}`)}supportsSorting(){return!0}comparator(){return(e,t)=>t.urgency-e.urgency}supportsGrouping(){return!0}grouper(){return e=>[`${e.urgency.toFixed(2)}`]}createGrouper(e){return super.createGrouper(!e)}grouperInstruction(e){return super.grouperInstruction(!e)}};var ei=class{static by(e,t){let n=[new Js().comparator(),new Ar().comparator(),new Ks().comparator(),new as().comparator(),new Zs().comparator()],s=[];for(let i of e)s.push(i.comparator);return t.sort(ei.makeCompositeComparator([...s,...n]))}static makeCompositeComparator(e){return(t,n)=>{for(let s of e){let i=s(t,n);if(i!==0)return i}return 0}}};var vu=class{constructor(e,t,n){this.nestingLevel=e,this.displayName=t,this.property=n}};var wu=class{constructor(e,t){this.lastHeadingAtLevel=new Array;this.groupers=t;let s=e.keys().next().value.length;for(let i=0;it.set(o,a)),e.pop();return t}};var ku=class extends Eu{},Su=class{constructor(e,t,n){this.root=new ku(t),this.buildGroupingTree(e,n)}buildGroupingTree(e,t){let n=[this.root];for(let s of e){let i=[];for(let a of n)for(let o of a.values){let u=s.grouper(o,t);u.length===0&&u.push("");for(let l of u){let c=a.children.get(l);c===void 0&&(c=new ku([]),a.children.set(l,c),i.push(c)),c.values.push(o)}}n=i}}generateTaskTreeStorage(){return this.root.generateAllPaths()}};var Ou=class{constructor(e,t){this.groups=e,this.groupHeadings=[],this.tasks=t}setGroupHeadings(e){for(let t of e)this.groupHeadings.push(t)}applyTaskLimit(e){this.tasks=this.tasks.slice(0,e)}tasksAsStringOfLines(){let e="";for(let t of this.tasks)e+=t.toFileLineString()+` `;return e}toString(){let e=` `;e+=`Group names: [${this.groups}] `;for(let t of this.groupHeadings)e+=`${"#".repeat(4+t.nestingLevel)} [${t.property}] ${t.displayName} -`;return e+=this.tasksAsStringOfLines(),e}};var Gi=class{constructor(e,t,n){this._groups=new Array;this._totalTaskCount=0;this._totalTaskCount=t.length,this._groupers=e;let s=new su(e,t,n).generateTaskTreeStorage();this.addTaskGroups(s),this.sortTaskGroups(),this.setGroupsHeadings(s)}get groupers(){return this._groupers}get groups(){return this._groups}totalTasksCount(){return this._totalTaskCount}toString(){let e="";e+=`Groupers (if any): -`;for(let n of this._groupers){let i=n.reverse?" reverse":"";e+=`- ${n.property}${i} +`;return e+=this.tasksAsStringOfLines(),e}};var ti=class{constructor(e,t,n){this._groups=new Array;this._totalTaskCount=0;this._totalTaskCount=t.length,this._groupers=e;let i=new Su(e,t,n).generateTaskTreeStorage();this.addTaskGroups(i),this.sortTaskGroups(),this.setGroupsHeadings(i)}get groupers(){return this._groupers}get groups(){return this._groups}totalTasksCount(){return this._totalTaskCount}toString(){let e="";e+=`Groupers (if any): +`;for(let n of this._groupers){let s=n.reverse?" reverse":"";e+=`- ${n.property}${s} `}for(let n of this.groups)e+=n.toString(),e+=` --- `;return e+=` ${this.totalTasksCount()} tasks -`,e}addTaskGroups(e){for(let[t,n]of e){let i=new au(t,n);this.addTaskGroup(i)}}addTaskGroup(e){this._groups.push(e)}sortTaskGroups(){let e=(t,n)=>{let i=t.groups,s=n.groups;for(let a=0;a{t.applyTaskLimit(e)}),this.recalculateTotalTaskCount())}recalculateTotalTaskCount(){let e=[];this._groups.forEach(n=>{e=[...e,...n.tasks]});let t=[...new Set(e)];this._totalTaskCount=t.length}};var Qn=class extends Me{fieldName(){return"description"}value(e){return ge.getInstance().removeAsSubstringFrom(e.description)}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=Qn.cleanDescription(e.description),i=Qn.cleanDescription(t.description);return n.localeCompare(i,void 0,{numeric:!0})}}static cleanDescription(e){e=ge.getInstance().removeAsSubstringFrom(e);let t=/^\[\[?([^\]]*)]]?/,n=e.match(t);if(n!==null){let i=n[1];e=i.substring(i.indexOf("|")+1)+e.replace(t,"")}return e=this.replaceFormatting(e,/^\*\*([^*]+)\*\*/),e=this.replaceFormatting(e,/^\*([^*]+)\*/),e=this.replaceFormatting(e,/^==([^=]+)==/),e=this.replaceFormatting(e,/^__([^_]+)__/),e=this.replaceFormatting(e,/^_([^_]+)_/),e}static replaceFormatting(e,t){let n=e.match(t);return n!==null&&(e=n[1]+e.replace(t,"")),e}};var ou=class extends yt{fieldName(){return"created"}date(e){return e.createdDate}filterResultIfFieldMissing(){return!1}};var uu=class extends yt{fieldName(){return"done"}date(e){return e.doneDate}filterResultIfFieldMissing(){return!1}};var lu=class extends yn{constructor(){super(),this._filters.add("exclude sub-items",e=>{if(e.indentation==="")return!0;let t=e.indentation.lastIndexOf(">");return t===-1?!1:/^ ?$/.test(e.indentation.slice(t+1))})}fieldName(){return"exclude"}};var ka=class extends Er{};function bp(r,e){let t=r.map(([n])=>n);try{let n=e.includes("return")?e:`return ${e}`,i=e&&new Function(...t,n);return i instanceof Function?ka.fromObject(e,i):ka.fromError(e,"Error parsing group function")}catch(n){return ka.fromError(e,Vn(`Failed parsing expression "${e}"`,n))}}function _p(r,e){let t=e.map(([n,i])=>i);return r(...t)}function vp(r,e,t){try{return _p(r,e)}catch(n){return Vn(`Failed calculating expression "${t}"`,n)}}function cu(r,e){return[["task",r],["query",e?e.query:null]]}function s_(r,e,t){let n=cu(r,t||null),i=bp(n,e);return i.error?i.error:vp(i.queryComponent,n,e)}var du=class{constructor(e){this.line=e,this.functionOrError=bp(cu(null,null),e)}isValid(){return this.functionOrError.error===void 0}get parseError(){return this.functionOrError.error}evaluate(e,t){if(!this.isValid())throw Error(`Error: Cannot evaluate an expression which is not valid: "${this.line}" gave error: "${this.parseError}"`);return _p(this.functionOrError.queryComponent,cu(e,t||null))}evaluateOrCatch(e,t){return this.isValid()?vp(this.functionOrError.queryComponent,cu(e,t),this.line):`Error: Cannot evaluate an expression which is not valid: "${this.line}" gave error: "${this.parseError}"`}};var fu=class extends ke{createFilterOrErrorMessage(e){let t=ke.getMatch(this.filterRegExp(),e);if(t===null)return J.fromError(e,"Unable to parse line");let n=t[1],i=new du(n);return i.isValid()?J.fromFilter(new gt(e,oA(i),new Se(e))):J.fromError(e,i.parseError)}fieldName(){return"function"}filterRegExp(){return new RegExp(`^filter by ${this.fieldNameSingularEscaped()} (.*)`,"i")}supportsGrouping(){return!0}createGrouperFromLine(e){let t=ke.getMatch(this.grouperRegExp(),e);if(t===null)return null;let n=!!t[1],i=t[2];return new gn("function",lA(i),n)}grouperRegExp(){return new RegExp(`^group by ${this.fieldNameSingularEscaped()}( reverse)? (.*)`,"i")}grouper(){throw Error("grouper() function not valid for FunctionField. Use createGrouperFromLine() instead.")}};function oA(r){return(e,t)=>{let n=t.queryContext();return uA(r,e,n)}}function uA(r,e,t){let n=r.evaluate(e,t);if(typeof n=="boolean")return n;throw Error(`filtering function must return true or false. This returned "${n}".`)}function lA(r){return(e,t)=>{let n=t.queryContext();return cA(e,r,n)}}function cA(r,e,t){try{let n=s_(r,e,t);return Array.isArray(n)?n.map(s=>s.toString()):n===null?[]:[n.toString()]}catch(n){let i=`Error: Failed calculating expression "${e}". The error message was: `;return n instanceof Error?[i+n.message]:[i+"Unknown error"]}}var pu=class extends Me{fieldName(){return"heading"}value(e){return e.precedingHeader?e.precedingHeader:""}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return e=>e.precedingHeader===null||e.precedingHeader.length===0?["(No heading)"]:[e.precedingHeader]}};var hu=class extends yt{fieldName(){return"scheduled"}date(e){return e.scheduledDate}filterResultIfFieldMissing(){return!1}};var mu=class extends yt{fieldName(){return"start"}fieldNameForFilterInstruction(){return"starts"}date(e){return e.startDate}filterResultIfFieldMissing(){return!0}};var gu=class extends yt{constructor(){let e=new kr;e.add("has happens date",t=>this.dates(t).some(n=>n!==null)),e.add("no happens date",t=>!this.dates(t).some(n=>n!==null)),super(e)}fieldName(){return"happens"}fieldNameForExplanation(){return"due, start or scheduled"}date(e){return this.earliestDate(e)}dates(e){return e.happensDates}earliestDate(e){return e.happens.moment}filterResultIfFieldMissing(){return!1}getFilter(e){return t=>this.dates(t).some(n=>e(n))}};var yu=class extends yn{constructor(){super(),this._filters.add("is recurring",e=>e.recurrence!==null),this._filters.add("is not recurring",e=>e.recurrence===null)}fieldName(){return"recurring"}supportsSorting(){return!0}comparator(){return(e,t)=>e.recurrence!==null&&t.recurrence===null?-1:e.recurrence===null&&t.recurrence!==null?1:0}supportsGrouping(){return!0}grouper(){return e=>e.recurrence!==null?["Recurring"]:["Not Recurring"]}};var Tu=class extends Me{fieldNamePlural(){return this.fieldNameSingular()+"s"}fieldName(){return`${this.fieldNameSingular()}/${this.fieldNamePlural()}`}fieldPattern(){return`${this.fieldNameSingular()}|${this.fieldNamePlural()}`}filterOperatorPattern(){return`${super.filterOperatorPattern()}|include|do not include`}value(e){return this.values(e).join(", ")}getFilter(e,t){return n=>{let i=e.matchesAnyOf(this.values(n));return t?!i:i}}createGrouper(e){return new gn(this.fieldNamePlural(),this.grouper(),e)}grouperRegExp(){if(!this.supportsGrouping())throw Error(`grouperRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^group by ${this.fieldNamePlural()}( reverse)?$`,"i")}};var Xn=class extends Tu{constructor(){super();this.filterInstructions=new kr,this.filterInstructions.add(`has ${this.fieldNameSingular()}`,t=>this.values(t).length>0),this.filterInstructions.add(`has ${this.fieldNamePlural()}`,t=>this.values(t).length>0),this.filterInstructions.add(`no ${this.fieldNameSingular()}`,t=>this.values(t).length===0),this.filterInstructions.add(`no ${this.fieldNamePlural()}`,t=>this.values(t).length===0)}createFilterOrErrorMessage(t){let n=this.filterInstructions.createFilterOrErrorMessage(t);return n.filter!==void 0?n:super.createFilterOrErrorMessage(t)}canCreateFilterForLine(t){return this.filterInstructions.canCreateFilterForLine(t)?!0:super.canCreateFilterForLine(t)}fieldNameSingular(){return"tag"}values(t){return t.tags}supportsSorting(){return!0}createSorterFromLine(t){let n=t.match(this.sorterRegExp());if(n===null)return null;let i=!!n[1],s=isNaN(+n[2])?1:+n[2],a=Xn.makeCompareByTagComparator(s);return new Xr(this.fieldNameSingular(),a,i)}sorterRegExp(){return/^sort by tag( reverse)?[\s]*(\d+)?/i}comparator(){return Xn.makeCompareByTagComparator(1)}static makeCompareByTagComparator(t){return(n,i)=>{if(n.tags.length===0&&i.tags.length===0)return 0;if(n.tags.length===0)return 1;if(i.tags.length===0)return-1;let s=t-1;if(n.tags.length=t)return 1;if(i.tags.length=t)return-1;if(n.tags.lengtht.tags.length==0?["(No tags)"]:t.tags}};var b_=as(T_());var Eu=class extends ke{constructor(){super(...arguments);this.basicBooleanRegexp=/(.*(AND|OR|XOR|NOT)\s*[("].*|\(.+\))/g;this.supportedOperators=["AND","OR","XOR","NOT"];this.subFields={}}filterRegExp(){return this.basicBooleanRegexp}createFilterOrErrorMessage(t){return this.parseLine(t)}fieldName(){return"boolean query"}parseLine(t){if(t.length===0)return J.fromError(t,"empty line");let n=this.preprocessExpression(t);try{let i=(0,b_.parse)(n);for(let o of i)if(o.name==="IDENTIFIER"&&o.value){let u=o.value.trim();if(!(u in this.subFields)){let l=ku(u);if(l===null)return J.fromError(t,`couldn't parse sub-expression '${u}'`);if(l.error)return J.fromError(t,`couldn't parse sub-expression '${u}': ${l.error}`);l.filter&&(this.subFields[u]=l.filter)}}else if(o.name==="OPERATOR"){if(o.value==null)return J.fromError(t,"empty operator in boolean query");if(!this.supportedOperators.includes(o.value))return J.fromError(t,`unknown boolean operator '${o.value}'`)}let s=(o,u)=>this.filterTaskWithParsedQuery(o,i,u),a=this.constructExplanation(i);return J.fromFilter(new gt(t,s,a))}catch(i){let s=i instanceof Error?i.message:"unknown error type";return J.fromError(t,`malformed boolean query -- ${s} (check the documentation for guidelines)`)}}preprocessExpression(t){return t.replace(/\(([^()]+)\)/g,'("$1")')}filterTaskWithParsedQuery(t,n,i){let s=u=>u==="true",a=u=>u?"true":"false",o=[];for(let u of n)if(u.name==="IDENTIFIER"){if(u.value==null)throw Error("null token value");let c=this.subFields[u.value.trim()].filterFunction(t,i);o.push(a(c))}else if(u.name==="OPERATOR")if(u.value==="NOT"){let l=s(o.pop());o.push(a(!l))}else if(u.value==="OR"){let l=s(o.pop()),c=s(o.pop());o.push(a(l||c))}else if(u.value==="AND"){let l=s(o.pop()),c=s(o.pop());o.push(a(l&&c))}else if(u.value==="XOR"){let l=s(o.pop()),c=s(o.pop());o.push(a(l&&!c||!l&&c))}else throw Error("Unsupported operator: "+u.value);else throw Error("Unsupported token type: "+u);return s(o[0])}constructExplanation(t){let n=[];for(let i of t)if(i.name==="IDENTIFIER"){if(i.value==null)throw Error("null token value");let s=this.subFields[i.value.trim()];n.push(s.explanation)}else if(i.name==="OPERATOR")if(i.value==="NOT"){let s=n.pop();n.push(Se.booleanNot([s]))}else if(i.value==="OR"){let s=n.pop(),a=n.pop();n.push(Se.booleanOr([a,s]))}else if(i.value==="AND"){let s=n.pop(),a=n.pop();n.push(Se.booleanAnd([a,s]))}else if(i.value==="XOR"){let s=n.pop(),a=n.pop();n.push(Se.booleanXor([a,s]))}else throw Error("Unsupported operator: "+i.value);else throw Error("Unsupported token type: "+i.name);return n[0]}};var Su=class extends Me{fieldName(){return"filename"}value(e){let t=e.filename;return t===null?"":t+".md"}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return e=>{let t=e.filename;return t===null?["Unknown Location"]:["[["+t+"]]"]}}};var Ou=class extends Me{constructor(){super()}fieldName(){return"status.name"}value(e){return e.status.name}supportsSorting(){return!0}supportsGrouping(){return!0}};var bn=class extends ke{canCreateFilterForLine(e){let t=new RegExp(`^(?:${this.fieldNameSingularEscaped()})`,"i");return ke.lineMatchesFilter(t,e)}createFilterOrErrorMessage(e){let t=ke.getMatch(this.filterRegExp(),e);if(t===null)return this.helpMessage(e);let n=t[1].toLowerCase(),i=t[2],s=Lt[i.toUpperCase()];if(!s)return this.helpMessage(e);let a;switch(n){case"is":a=o=>o.status.type===s;break;case"is not":a=o=>o.status.type!==s;break;default:return this.helpMessage(e)}return J.fromFilter(new gt(e,a,new Se(e)))}filterRegExp(){return new RegExp(`^(?:${this.fieldNameSingularEscaped()}) (is|is not) ([^ ]+)$`,"i")}helpMessage(e){let t=Object.values(Lt).filter(i=>i!=="EMPTY").join(" "),n=`Invalid ${this.fieldNameSingular()} instruction: '${e}'. +`,e}addTaskGroups(e){for(let[t,n]of e){let s=new Ou(t,n);this.addTaskGroup(s)}}addTaskGroup(e){this._groups.push(e)}sortTaskGroups(){let e=(t,n)=>{let s=t.groups,i=n.groups;for(let a=0;a{t.applyTaskLimit(e)}),this.recalculateTotalTaskCount())}recalculateTotalTaskCount(){let e=[];this._groups.forEach(n=>{e=[...e,...n.tasks]});let t=[...new Set(e)];this._totalTaskCount=t.length}};var os=class extends Pe{fieldName(){return"description"}value(e){return ye.getInstance().removeAsSubstringFrom(e.description)}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=os.cleanDescription(e.description),s=os.cleanDescription(t.description);return n.localeCompare(s,void 0,{numeric:!0})}}static cleanDescription(e){e=ye.getInstance().removeAsSubstringFrom(e);let t=/^\[\[?([^\]]*)]]?/,n=e.match(t);if(n!==null){let s=n[1];e=s.substring(s.indexOf("|")+1)+e.replace(t,"")}return e=this.replaceFormatting(e,/^\*\*([^*]+)\*\*/),e=this.replaceFormatting(e,/^\*([^*]+)\*/),e=this.replaceFormatting(e,/^==([^=]+)==/),e=this.replaceFormatting(e,/^__([^_]+)__/),e=this.replaceFormatting(e,/^_([^_]+)_/),e}static replaceFormatting(e,t){let n=e.match(t);return n!==null&&(e=n[1]+e.replace(t,"")),e}};var Du=class extends at{fieldName(){return"created"}date(e){return e.createdDate}filterResultIfFieldMissing(){return!1}};var xu=class extends at{fieldName(){return"done"}date(e){return e.doneDate}filterResultIfFieldMissing(){return!1}};var Ru=class extends xn{constructor(){super(),this._filters.add("exclude sub-items",e=>{if(e.indentation==="")return!0;let t=e.indentation.lastIndexOf(">");return t===-1?!1:/^ ?$/.test(e.indentation.slice(t+1))})}fieldName(){return"exclude"}};var qa=class extends Mr{};function qp(r,e){let t=r.map(([n])=>n);try{let n=e.includes("return")?e:`return ${e}`,s=e&&new Function(...t,n);return s instanceof Function?qa.fromObject(e,s):qa.fromError(e,"Error parsing group function")}catch(n){return qa.fromError(e,is(`Failed parsing expression "${e}"`,n))}}function Wp(r,e){let t=e.map(([n,s])=>s);return r(...t)}function Yp(r,e,t){try{return Wp(r,e)}catch(n){return is(`Failed calculating expression "${t}"`,n)}}function Mu(r,e){return[["task",r],["query",e?e.query:null]]}function N_(r,e,t){let n=Mu(r,t||null),s=qp(n,e);return s.error?s.error:Yp(s.queryComponent,n,e)}var Cu=class{constructor(e){this.line=e,this.functionOrError=qp(Mu(null,null),e)}isValid(){return this.functionOrError.error===void 0}get parseError(){return this.functionOrError.error}evaluate(e,t){if(!this.isValid())throw Error(`Error: Cannot evaluate an expression which is not valid: "${this.line}" gave error: "${this.parseError}"`);return Wp(this.functionOrError.queryComponent,Mu(e,t||null))}evaluateOrCatch(e,t){return this.isValid()?Yp(this.functionOrError.queryComponent,Mu(e,t),this.line):`Error: Cannot evaluate an expression which is not valid: "${this.line}" gave error: "${this.parseError}"`}};var Au=class extends Oe{createFilterOrErrorMessage(e){let t=Oe.getMatch(this.filterRegExp(),e);if(t===null)return J.fromError(e,"Unable to parse line");let n=t[1],s=new Cu(n);return s.isValid()?J.fromFilter(new _t(e,WA(s),new De(e))):J.fromError(e,s.parseError)}fieldName(){return"function"}filterRegExp(){return new RegExp(`^filter by ${this.fieldNameSingularEscaped()} (.*)`,"i")}supportsGrouping(){return!0}createGrouperFromLine(e){let t=Oe.getMatch(this.grouperRegExp(),e);if(t===null)return null;let n=!!t[1],s=t[2];return new Dn(e,"function",GA(s),n)}grouperRegExp(){return new RegExp(`^group by ${this.fieldNameSingularEscaped()}( reverse)? (.*)`,"i")}grouper(){throw Error("grouper() function not valid for FunctionField. Use createGrouperFromLine() instead.")}};function WA(r){return(e,t)=>{let n=t.queryContext();return YA(r,e,n)}}function YA(r,e,t){let n=r.evaluate(e,t);if(typeof n=="boolean")return n;throw Error(`filtering function must return true or false. This returned "${n}".`)}function GA(r){return(e,t)=>{let n=t.queryContext();return jA(e,r,n)}}function jA(r,e,t){try{let n=N_(r,e,t);return Array.isArray(n)?n.map(i=>i.toString()):n===null?[]:[n.toString()]}catch(n){let s=`Error: Failed calculating expression "${e}". The error message was: `;return n instanceof Error?[s+n.message]:[s+"Unknown error"]}}var Pu=class extends Pe{fieldName(){return"heading"}value(e){return e.precedingHeader?e.precedingHeader:""}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return e=>e.precedingHeader===null||e.precedingHeader.length===0?["(No heading)"]:[e.precedingHeader]}};var Nu=class extends at{fieldName(){return"scheduled"}date(e){return e.scheduledDate}filterResultIfFieldMissing(){return!1}};var Iu=class extends at{fieldName(){return"start"}fieldNameForFilterInstruction(){return"starts"}date(e){return e.startDate}filterResultIfFieldMissing(){return!0}};var Fu=class extends at{constructor(){let e=new Cr;e.add("has happens date",t=>this.dates(t).some(n=>n!==null)),e.add("no happens date",t=>!this.dates(t).some(n=>n!==null)),super(e)}fieldName(){return"happens"}fieldNameForExplanation(){return"due, start or scheduled"}date(e){return this.earliestDate(e)}dates(e){return e.happensDates}earliestDate(e){return e.happens.moment}filterResultIfFieldMissing(){return!1}getFilter(e){return t=>this.dates(t).some(n=>e(n))}};var Lu=class extends xn{constructor(){super(),this._filters.add("is recurring",e=>e.recurrence!==null),this._filters.add("is not recurring",e=>e.recurrence===null)}fieldName(){return"recurring"}supportsSorting(){return!0}comparator(){return(e,t)=>e.recurrence!==null&&t.recurrence===null?-1:e.recurrence===null&&t.recurrence!==null?1:0}supportsGrouping(){return!0}grouper(){return e=>e.recurrence!==null?["Recurring"]:["Not Recurring"]}};var Uu=class extends Pe{fieldNamePlural(){return this.fieldNameSingular()+"s"}fieldName(){return`${this.fieldNameSingular()}/${this.fieldNamePlural()}`}fieldPattern(){return`${this.fieldNameSingular()}|${this.fieldNamePlural()}`}filterOperatorPattern(){return`${super.filterOperatorPattern()}|include|do not include`}value(e){return this.values(e).join(", ")}getFilter(e,t){return n=>{let s=e.matchesAnyOf(this.values(n));return t?!s:s}}createGrouper(e){return new Dn(this.grouperInstruction(e),this.fieldNamePlural(),this.grouper(),e)}grouperRegExp(){if(!this.supportsGrouping())throw Error(`grouperRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^group by ${this.fieldNamePlural()}( reverse)?$`,"i")}grouperInstruction(e){let t=`group by ${this.fieldNamePlural()}`;return e&&(t+=" reverse"),t}};var us=class extends Uu{constructor(){super();this.filterInstructions=new Cr,this.filterInstructions.add(`has ${this.fieldNameSingular()}`,t=>this.values(t).length>0),this.filterInstructions.add(`has ${this.fieldNamePlural()}`,t=>this.values(t).length>0),this.filterInstructions.add(`no ${this.fieldNameSingular()}`,t=>this.values(t).length===0),this.filterInstructions.add(`no ${this.fieldNamePlural()}`,t=>this.values(t).length===0)}createFilterOrErrorMessage(t){let n=this.filterInstructions.createFilterOrErrorMessage(t);return n.filter!==void 0?n:super.createFilterOrErrorMessage(t)}canCreateFilterForLine(t){return this.filterInstructions.canCreateFilterForLine(t)?!0:super.canCreateFilterForLine(t)}fieldNameSingular(){return"tag"}values(t){return t.tags}supportsSorting(){return!0}createSorterFromLine(t){let n=t.match(this.sorterRegExp());if(n===null)return null;let s=!!n[1],i=isNaN(+n[2])?1:+n[2],a=us.makeCompareByTagComparator(i);return new sn(t,this.fieldNameSingular(),a,s)}sorterRegExp(){return/^sort by tag( reverse)?[\s]*(\d+)?/i}comparator(){return us.makeCompareByTagComparator(1)}static makeCompareByTagComparator(t){return(n,s)=>{if(n.tags.length===0&&s.tags.length===0)return 0;if(n.tags.length===0)return 1;if(s.tags.length===0)return-1;let i=t-1;if(n.tags.length=t)return 1;if(s.tags.length=t)return-1;if(n.tags.lengtht.tags.length==0?["(No tags)"]:t.tags}};var V_=vi(z_());var ju=class extends Oe{constructor(){super(...arguments);this.basicBooleanRegexp=/(.*(AND|OR|XOR|NOT)\s*[("].*|\(.+\))/g;this.supportedOperators=["AND","OR","XOR","NOT"];this.subFields={}}filterRegExp(){return this.basicBooleanRegexp}createFilterOrErrorMessage(t){return this.parseLine(t)}fieldName(){return"boolean query"}parseLine(t){if(t.length===0)return J.fromError(t,"empty line");let n=this.preprocessExpression(t);try{let s=(0,V_.parse)(n);for(let o of s)if(o.name==="IDENTIFIER"&&o.value){let u=o.value.trim();if(!(u in this.subFields)){let l=$u(u);if(l===null)return J.fromError(t,`couldn't parse sub-expression '${u}'`);if(l.error)return J.fromError(t,`couldn't parse sub-expression '${u}': ${l.error}`);l.filter&&(this.subFields[u]=l.filter)}}else if(o.name==="OPERATOR"){if(o.value==null)return J.fromError(t,"empty operator in boolean query");if(!this.supportedOperators.includes(o.value))return J.fromError(t,`unknown boolean operator '${o.value}'`)}let i=(o,u)=>this.filterTaskWithParsedQuery(o,s,u),a=this.constructExplanation(s);return J.fromFilter(new _t(t,i,a))}catch(s){let i=s instanceof Error?s.message:"unknown error type";return J.fromError(t,`malformed boolean query -- ${i} (check the documentation for guidelines)`)}}preprocessExpression(t){return t.replace(/\(([^()]+)\)/g,'("$1")')}filterTaskWithParsedQuery(t,n,s){let i=u=>u==="true",a=u=>u?"true":"false",o=[];for(let u of n)if(u.name==="IDENTIFIER"){if(u.value==null)throw Error("null token value");let c=this.subFields[u.value.trim()].filterFunction(t,s);o.push(a(c))}else if(u.name==="OPERATOR")if(u.value==="NOT"){let l=i(o.pop());o.push(a(!l))}else if(u.value==="OR"){let l=i(o.pop()),c=i(o.pop());o.push(a(l||c))}else if(u.value==="AND"){let l=i(o.pop()),c=i(o.pop());o.push(a(l&&c))}else if(u.value==="XOR"){let l=i(o.pop()),c=i(o.pop());o.push(a(l&&!c||!l&&c))}else throw Error("Unsupported operator: "+u.value);else throw Error("Unsupported token type: "+u);return i(o[0])}constructExplanation(t){let n=[];for(let s of t)if(s.name==="IDENTIFIER"){if(s.value==null)throw Error("null token value");let i=this.subFields[s.value.trim()];n.push(i.explanation)}else if(s.name==="OPERATOR")if(s.value==="NOT"){let i=n.pop();n.push(De.booleanNot([i]))}else if(s.value==="OR"){let i=n.pop(),a=n.pop();n.push(De.booleanOr([a,i]))}else if(s.value==="AND"){let i=n.pop(),a=n.pop();n.push(De.booleanAnd([a,i]))}else if(s.value==="XOR"){let i=n.pop(),a=n.pop();n.push(De.booleanXor([a,i]))}else throw Error("Unsupported operator: "+s.value);else throw Error("Unsupported token type: "+s.name);return n[0]}};var Bu=class extends Pe{fieldName(){return"filename"}value(e){let t=e.filename;return t===null?"":t+".md"}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return e=>{let t=e.filename;return t===null?["Unknown Location"]:["[["+t+"]]"]}}};var Hu=class extends Pe{constructor(){super()}fieldName(){return"status.name"}value(e){return e.status.name}supportsSorting(){return!0}supportsGrouping(){return!0}};var Mn=class extends Oe{canCreateFilterForLine(e){let t=new RegExp(`^(?:${this.fieldNameSingularEscaped()})`,"i");return Oe.lineMatchesFilter(t,e)}createFilterOrErrorMessage(e){let t=Oe.getMatch(this.filterRegExp(),e);if(t===null)return this.helpMessage(e);let n=t[1].toLowerCase(),s=t[2],i=jt[s.toUpperCase()];if(!i)return this.helpMessage(e);let a;switch(n){case"is":a=o=>o.status.type===i;break;case"is not":a=o=>o.status.type!==i;break;default:return this.helpMessage(e)}return J.fromFilter(new _t(e,a,new De(e)))}filterRegExp(){return new RegExp(`^(?:${this.fieldNameSingularEscaped()}) (is|is not) ([^ ]+)$`,"i")}helpMessage(e){let t=Object.values(jt).filter(s=>s!=="EMPTY").join(" "),n=`Invalid ${this.fieldNameSingular()} instruction: '${e}'. Allowed options: 'is' and 'is not' (without quotes). Allowed values: ${t} Note: values are case-insensitive, so 'in_progress' works too, for example. - Example: ${this.fieldNameSingular()} is not NON_TASK`;return J.fromError(e,n)}fieldName(){return"status.type"}value(e){return e.status.type}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=bn.groupName(e),i=bn.groupName(t);return n.localeCompare(i,void 0,{numeric:!0})}}supportsGrouping(){return!0}grouper(){return e=>[bn.groupName(e)]}static groupName(e){return e.status.typeGroupText}};var Du=class extends Me{fieldName(){return"recurrence"}value(e){return e.recurrence!==null?e.recurrence.toText():""}supportsGrouping(){return!0}grouper(){return e=>e.recurrence!==null?[e.recurrence.toText()]:["None"]}};var xu=class extends Me{fieldName(){return"folder"}value(e){return e.file.folder}supportsGrouping(){return!0}grouper(){return e=>[Me.escapeMarkdownCharacters(this.value(e))]}};var Ru=class extends Me{fieldName(){return"root"}value(e){return e.file.root}supportsGrouping(){return!0}grouper(){return e=>[Me.escapeMarkdownCharacters(this.value(e))]}};var Mu=class extends Me{fieldName(){return"backlink"}value(e){let t=e.getLinkText({isFilenameUnique:!0});return t===null?"Unknown Location":t}createFilterOrErrorMessage(e){return J.fromError(e,"backlink field does not support filtering")}canCreateFilterForLine(e){return!1}supportsGrouping(){return!0}grouper(){return e=>{let t=e.filename;if(t===null)return["Unknown Location"];let n=e.precedingHeader;return n===null?["[["+t+"]]"]:[`[[${t}#${n}|${t} > ${n}]]`]}}};var Cp=[()=>new Ou,()=>new bn,()=>new Sr,()=>new yu,()=>new Kn,()=>new gu,()=>new ou,()=>new mu,()=>new hu,()=>new Ui,()=>new uu,()=>new $i,()=>new xu,()=>new Ru,()=>new Mu,()=>new Qn,()=>new Xn,()=>new pu,()=>new lu,()=>new Su,()=>new Yi,()=>new Du,()=>new fu,()=>new Eu];function ku(r){for(let e of Cp){let t=e();if(t.canCreateFilterForLine(r))return t.createFilterOrErrorMessage(r)}return null}function __(r){let e=/^sort by /i;if(r.match(e)===null)return null;for(let t of Cp){let i=t().createSorterFromLine(r);if(i)return i}return null}function v_(r){let e=/^group by /i;if(r.match(e)===null)return null;for(let t of Cp){let i=t().createGrouperFromLine(r);if(i)return i}return null}var _n=class{constructor(e,t){this.queryPath=e,this.allTasks=[...t]}static fromAllTasks(e){return new _n(void 0,e)}queryContext(){return this.queryPath?Zo(this.queryPath):void 0}};function w_(r){return`task${r!==1?"s":""}`}var ei=class{constructor(e,t){this.totalTasksCountBeforeLimit=0;this._searchErrorMessage=void 0;this.taskGroups=e,this.totalTasksCountBeforeLimit=t}get searchErrorMessage(){return this._searchErrorMessage}set searchErrorMessage(e){this._searchErrorMessage=e}get totalTasksCount(){return this.taskGroups.totalTasksCount()}totalTasksCountDisplayText(){let e=this.totalTasksCount,t=this.totalTasksCountBeforeLimit;return e===t?`${e} ${w_(e)}`:`${e} of ${t} ${w_(t)}`}get groups(){return this.taskGroups.groups}static fromError(e){let t=new ei(new Gi([],[],_n.fromAllTasks([])),0);return t._searchErrorMessage=e,t}};function E_(r){return r.endsWith("\\")}function k_(r){return r.endsWith("\\\\")}function LA(r){return r.replace(/^[ \t]*/,"")}function UA(r){return r.replace(/[ \t]*\\$/,"")}function WA(r,e){let t=r;return e&&(t=LA(r)),k_(t)?t=t.slice(0,-1):E_(r)&&(t=UA(t)),t}function qA(r,e,t){e?r[r.length-1]+=" "+t:r.push(t)}function $A(r){let e=[],t=!1;for(let n of r.split(` -`)){let i=WA(n,t);qA(e,t,i),k_(n)?t=!1:t=E_(n)}return e.join(` -`)}function S_(r){return $A(r).split(` -`).map(e=>e.trim()).filter(e=>e!=="")}var Jr=class{constructor(e,t=void 0){this._limit=void 0;this._taskGroupLimit=void 0;this._layoutOptions=new qn;this._filters=[];this._error=void 0;this._sorting=[];this._grouping=[];this._ignoreGlobalQuery=!1;this.hideOptionsRegexp=/^(hide|show) (task count|backlink|priority|created date|start date|scheduled date|done date|due date|recurrence rule|edit button|postpone button|urgency|tags)/i;this.shortModeRegexp=/^short/i;this.explainQueryRegexp=/^explain/i;this.ignoreGlobalQueryRegexp=/^ignore global query/i;this.logger=St.getLogger("tasks.Query");this._queryId="";this.limitRegexp=/^limit (groups )?(to )?(\d+)( tasks?)?/i;this.commentRegexp=/^#.*/;this._queryId=this.generateQueryId(10),this.source=e,this.filePath=t,this.debug(`Creating query: ${this.formatQueryForLogging()}`),S_(e).forEach(n=>{let i=this.expandPlaceholders(n,t);if(this.error===void 0)switch(!0){case this.shortModeRegexp.test(i):this._layoutOptions.shortMode=!0;break;case this.explainQueryRegexp.test(i):this._layoutOptions.explainQuery=!0;break;case this.ignoreGlobalQueryRegexp.test(i):this._ignoreGlobalQuery=!0;break;case this.limitRegexp.test(i):this.parseLimit(i);break;case this.parseSortBy(i):break;case this.parseGroupBy(i):break;case this.hideOptionsRegexp.test(i):this.parseHideOptions(i);break;case this.commentRegexp.test(i):break;case this.parseFilter(i):break;default:this.setError("do not understand query",i)}})}formatQueryForLogging(){return`[${this.source.split(` + Example: ${this.fieldNameSingular()} is not NON_TASK`;return J.fromError(e,n)}fieldName(){return"status.type"}value(e){return e.status.type}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=Mn.groupName(e),s=Mn.groupName(t);return n.localeCompare(s,void 0,{numeric:!0})}}supportsGrouping(){return!0}grouper(){return e=>[Mn.groupName(e)]}static groupName(e){return e.status.typeGroupText}};var zu=class extends Pe{fieldName(){return"recurrence"}value(e){return e.recurrence!==null?e.recurrence.toText():""}supportsGrouping(){return!0}grouper(){return e=>e.recurrence!==null?[e.recurrence.toText()]:["None"]}};var Vu=class extends Pe{fieldName(){return"folder"}value(e){return e.file.folder}supportsGrouping(){return!0}grouper(){return e=>[Pe.escapeMarkdownCharacters(this.value(e))]}};var Ku=class extends Pe{fieldName(){return"root"}value(e){return e.file.root}supportsGrouping(){return!0}grouper(){return e=>[Pe.escapeMarkdownCharacters(this.value(e))]}};var Qu=class extends Pe{fieldName(){return"backlink"}value(e){let t=e.getLinkText({isFilenameUnique:!0});return t===null?"Unknown Location":t}createFilterOrErrorMessage(e){return J.fromError(e,"backlink field does not support filtering")}canCreateFilterForLine(e){return!1}supportsGrouping(){return!0}grouper(){return e=>{let t=e.filename;if(t===null)return["Unknown Location"];let n=e.precedingHeader;return n===null?["[["+t+"]]"]:[`[[${t}#${n}|${t} > ${n}]]`]}}};var Xu=class extends at{fieldName(){return"cancelled"}date(e){return e.cancelledDate}filterResultIfFieldMissing(){return!1}};var Xp=[()=>new Hu,()=>new Mn,()=>new Ar,()=>new Lu,()=>new as,()=>new Fu,()=>new Xu,()=>new Du,()=>new Iu,()=>new Nu,()=>new Ks,()=>new xu,()=>new Zs,()=>new Vu,()=>new Ku,()=>new Qu,()=>new os,()=>new us,()=>new Pu,()=>new Ru,()=>new Bu,()=>new Js,()=>new zu,()=>new Au,()=>new ju];function $u(r){for(let e of Xp){let t=e();if(t.canCreateFilterForLine(r))return t.createFilterOrErrorMessage(r)}return null}function K_(r){let e=/^sort by /i;if(r.match(e)===null)return null;for(let t of Xp){let s=t().createSorterFromLine(r);if(s)return s}return null}function Q_(r){let e=/^group by /i;if(r.match(e)===null)return null;for(let t of Xp){let s=t().createGrouperFromLine(r);if(s)return s}return null}var Cn=class{constructor(e,t){this.queryPath=e,this.allTasks=[...t]}static fromAllTasks(e){return new Cn(void 0,e)}queryContext(){return this.queryPath?Tu(this.queryPath):void 0}};function X_(r){return`task${r!==1?"s":""}`}var ds=class{constructor(e,t){this.totalTasksCountBeforeLimit=0;this._searchErrorMessage=void 0;this.taskGroups=e,this.totalTasksCountBeforeLimit=t}get searchErrorMessage(){return this._searchErrorMessage}set searchErrorMessage(e){this._searchErrorMessage=e}get totalTasksCount(){return this.taskGroups.totalTasksCount()}totalTasksCountDisplayText(){let e=this.totalTasksCount,t=this.totalTasksCountBeforeLimit;return e===t?`${e} ${X_(e)}`:`${e} of ${t} ${X_(t)}`}get groups(){return this.taskGroups.groups}static fromError(e){let t=new ds(new ti([],[],Cn.fromAllTasks([])),0);return t._searchErrorMessage=e,t}};function Z_(r){return r.endsWith("\\")}function J_(r){return r.endsWith("\\\\")}function gP(r){return r.replace(/^[ \t]*/,"")}function yP(r){return r.replace(/[ \t]*\\$/,"")}function TP(r,e){let t=r;return e&&(t=gP(r)),J_(t)?t=t.slice(0,-1):Z_(r)&&(t=yP(t)),t}function bP(r,e,t){e?r[r.length-1]+=" "+t:r.push(t)}function _P(r){let e=[],t=!1;for(let n of r.split(` +`)){let s=TP(n,t);bP(e,t,s),J_(n)?t=!1:t=Z_(n)}return e.join(` +`)}function ev(r){return _P(r).split(` +`).map(e=>e.trim()).filter(e=>e!=="")}var li=class{constructor(e=""){this.indentation=e}explainQuery(e){if(e.error!==void 0)return this.explainError(e);let t=[];return t.push(this.explainFilters(e)),t.push(this.explainGroups(e)),t.push(this.explainSorters(e)),t.push(this.explainQueryLimits(e)),t.push(this.explainDebugSettings()),t.filter(n=>n!=="").join(` +`)}explainError(e){let t="";return t+=`Query has an error: +`,t+=e.error+` +`,t}explainFilters(e){return e.filters.length===0?this.indent(`No filters supplied. All tasks will match the query. +`):e.filters.map(n=>n.explainFilterIndented(this.indentation)).join(` +`)}explainGroups(e){let t=e.grouping.length;if(t===0)return this.indent(`No grouping instructions supplied. +`);let n="";for(let s=0;s{let s=this.expandPlaceholders(n,t);if(this.error===void 0)switch(!0){case this.shortModeRegexp.test(s):this._queryLayoutOptions.shortMode=!0;break;case this.fullModeRegexp.test(s):this._queryLayoutOptions.shortMode=!1;break;case this.explainQueryRegexp.test(s):this._queryLayoutOptions.explainQuery=!0;break;case this.ignoreGlobalQueryRegexp.test(s):this._ignoreGlobalQuery=!0;break;case this.limitRegexp.test(s):this.parseLimit(s);break;case this.parseSortBy(s):break;case this.parseGroupBy(s):break;case this.hideOptionsRegexp.test(s):this.parseHideOptions(s);break;case this.commentRegexp.test(s):break;case this.parseFilter(s):break;default:this.setError("do not understand query",s)}})}formatQueryForLogging(){return`[${this.source.split(` `).join(" ; ")}]`}expandPlaceholders(e,t){if(e.includes("{{")&&e.includes("}}")&&this.filePath===void 0)return this._error=`The query looks like it contains a placeholder, with "{{" and "}}" but no file path has been supplied, so cannot expand placeholder values. The query is: -${e}`,e;let n=e;if(t){let i=Zo(t);try{n=i_(e,i)}catch(s){return s instanceof Error?this._error=s.message:this._error="Internal error. expandPlaceholders() threw something other than Error.",e}}return n}append(e){return this.source===""?e:e.source===""?this:new Jr(`${this.source} -${e.source}`,this.filePath)}explainQuery(){let e="";if(this.error!==void 0)return e+=`Query has an error: -`,e+=this.error+` -`,e;let t=this.filters.length;if(t===0)e+="No filters supplied. All tasks will match the query.";else for(let i=0;i0&&(e+=` -`),e+=this.filters[i].explainFilterIndented("");e+=this.explainQueryLimits();let{debugSettings:n}=Q();return n.ignoreSortInstructions&&(e+=` - -NOTE: All sort instructions, including default sort order, are disabled, due to 'ignoreSortInstructions' setting.`),e}explainQueryLimits(){let e="";function t(n){let i=` - -At most ${n} task`;return n!==1&&(i+="s"),i}return this._limit!==void 0&&(e+=t(this._limit),e+=`. -`),this._taskGroupLimit!==void 0&&(e+=t(this._taskGroupLimit),e+=` per group (if any "group by" options are supplied). -`),e}get limit(){return this._limit}get layoutOptions(){return this._layoutOptions}get filters(){return this._filters}addFilter(e){this._filters.push(e)}get sorting(){return this._sorting}get grouping(){return this._grouping}get error(){return this._error}setError(e,t){this._error=`${e} -Problem line: "${t}"`}get ignoreGlobalQuery(){return this._ignoreGlobalQuery}applyQueryToTasks(e){this.debug(`Executing query: ${this.formatQueryForLogging()}`);let t=new _n(this.filePath,e);try{this.filters.forEach(o=>{e=e.filter(u=>o.filterFunction(u,t))});let{debugSettings:n}=Q(),i=n.ignoreSortInstructions?e:ji.by(this.sorting,e),s=i.slice(0,this.limit),a=new Gi(this.grouping,s,t);return this._taskGroupLimit!==void 0&&a.applyTaskLimit(this._taskGroupLimit),new ei(a,i.length)}catch(n){let i="Search failed";return ei.fromError(Vn(i,n))}}parseHideOptions(e){let t=e.match(this.hideOptionsRegexp);if(t!==null){let n=t[1].toLowerCase()==="hide";switch(t[2].toLowerCase()){case"task count":this._layoutOptions.hideTaskCount=n;break;case"backlink":this._layoutOptions.hideBacklinks=n;break;case"postpone button":this._layoutOptions.hidePostponeButton=n;break;case"priority":this._layoutOptions.hidePriority=n;break;case"created date":this._layoutOptions.hideCreatedDate=n;break;case"start date":this._layoutOptions.hideStartDate=n;break;case"scheduled date":this._layoutOptions.hideScheduledDate=n;break;case"due date":this._layoutOptions.hideDueDate=n;break;case"done date":this._layoutOptions.hideDoneDate=n;break;case"recurrence rule":this._layoutOptions.hideRecurrenceRule=n;break;case"edit button":this._layoutOptions.hideEditButton=n;break;case"urgency":this._layoutOptions.hideUrgency=n;break;case"tags":this._layoutOptions.hideTags=n;break;default:this.setError("do not understand hide/show option",e)}}}parseFilter(e){var n;let t=ku(e);return t!=null?(t.filter?this._filters.push(t.filter):this.setError((n=t.error)!=null?n:"Unknown error",e),!0):!1}parseLimit(e){let t=e.match(this.limitRegexp);if(t===null){this.setError("do not understand query limit",e);return}let n=Number.parseInt(t[3],10);t[1]!==void 0?this._taskGroupLimit=n:this._limit=n}parseSortBy(e){let t=__(e);return t?(this._sorting.push(t),!0):!1}parseGroupBy(e){let t=v_(e);return t?(this._grouping.push(t),!0):!1}generateQueryId(e){let t="AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz1234567890";return Array.from({length:e},()=>t[Math.floor(Math.random()*t.length)]).join("")}debug(e,t){this.logger.debugWithId(this._queryId,`"${this.filePath}": ${e}`,t)}};var vn=class{constructor(e=vn.empty){this._source=e}static getInstance(){return vn.instance||(vn.instance=new vn),vn.instance}set(e){this._source=e}query(e=void 0){return new Jr(this._source,e)}hasInstructions(){return this._source.trim()!==vn.empty}},tr=vn;tr.empty="";var Cu=class{constructor({obsidianEvents:e}){this.logger=St.getLogger("tasks.Events");this.obsidianEvents=e}onCacheUpdate(e){return this.logger.debug("TasksEvents.onCacheUpdate()"),this.obsidianEvents.on("obsidian-tasks-plugin:cache-update",e)}triggerCacheUpdate(e){this.logger.debug("TasksEvents.triggerCacheUpdate()"),this.obsidianEvents.trigger("obsidian-tasks-plugin:cache-update",e)}onRequestCacheUpdate(e){return this.logger.debug("TasksEvents.onRequestCacheUpdate()"),this.obsidianEvents.on("obsidian-tasks-plugin:request-cache-update",e)}triggerRequestCacheUpdate(e){this.logger.debug("TasksEvents.triggerRequestCacheUpdate()"),this.obsidianEvents.trigger("obsidian-tasks-plugin:request-cache-update",e)}off(e){this.logger.debug("TasksEvents.off()"),this.obsidianEvents.offref(e)}};var Da=require("obsidian");var Oa,Ap,Pp,YA=["md"];function Nu(){return St.getLogger("tasks.File")}var O_=({metadataCache:r,vault:e,workspace:t})=>{Oa=r,Ap=e,Pp=t},ti=t=>F(void 0,[t],function*({originalTask:r,newTasks:e}){if(Ap===void 0||Oa===void 0||Pp===void 0){Au("Tasks: cannot use File before initializing it.");return}Array.isArray(e)||(e=[e]);let n=Nu(),i="replaceTaskWithTasks()";Bo(n,i,r),Ho(n,i,e),x_({originalTask:r,newTasks:e,vault:Ap,metadataCache:Oa,workspace:Pp,previousTries:0})});function Au(r){console.error(r),new Da.Notice(r,15e3)}function D_(r){console.warn(r),new Da.Notice(r,1e4)}function jA(r){Nu().debug(r)}var wn=class extends Error{},Pu=class extends Error{},x_=a=>F(void 0,[a],function*({originalTask:r,newTasks:e,vault:t,metadataCache:n,workspace:i,previousTries:s}){let o=Nu();o.debug(`tryRepetitive after ${s} previous tries`);let u=()=>{if(s>10){let c=`Tasks: Could not find the correct task line to update. +${e}`,e;let n=e;if(t){let s=Tu(t);try{n=P_(e,s)}catch(i){return i instanceof Error?this._error=i.message:this._error="Internal error. expandPlaceholders() threw something other than Error.",e}}return n}append(e){return this.source===""?e:e.source===""?this:new on(`${this.source} +${e.source}`,this.filePath)}explainQuery(){return new li().explainQuery(this)}get limit(){return this._limit}get taskGroupLimit(){return this._taskGroupLimit}get taskLayoutOptions(){return this._taskLayoutOptions}get queryLayoutOptions(){return this._queryLayoutOptions}get filters(){return this._filters}addFilter(e){this._filters.push(e)}get sorting(){return this._sorting}get grouping(){return this._grouping}get error(){return this._error}setError(e,t){this._error=`${e} +Problem line: "${t}"`}get ignoreGlobalQuery(){return this._ignoreGlobalQuery}applyQueryToTasks(e){this.debug(`Executing query: ${this.formatQueryForLogging()}`);let t=new Cn(this.filePath,e);try{this.filters.forEach(o=>{e=e.filter(u=>o.filterFunction(u,t))});let{debugSettings:n}=K(),s=n.ignoreSortInstructions?e:ei.by(this.sorting,e),i=s.slice(0,this.limit),a=new ti(this.grouping,i,t);return this._taskGroupLimit!==void 0&&a.applyTaskLimit(this._taskGroupLimit),new ds(a,s.length)}catch(n){let s="Search failed";return ds.fromError(is(s,n))}}parseHideOptions(e){let t=e.match(this.hideOptionsRegexp);if(t!==null){let n=t[1].toLowerCase()==="hide";switch(t[2].toLowerCase()){case"task count":this._queryLayoutOptions.hideTaskCount=n;break;case"backlink":this._queryLayoutOptions.hideBacklinks=n;break;case"postpone button":this._queryLayoutOptions.hidePostponeButton=n;break;case"priority":this._taskLayoutOptions.hidePriority=n;break;case"cancelled date":this._taskLayoutOptions.hideCancelledDate=n;break;case"created date":this._taskLayoutOptions.hideCreatedDate=n;break;case"start date":this._taskLayoutOptions.hideStartDate=n;break;case"scheduled date":this._taskLayoutOptions.hideScheduledDate=n;break;case"due date":this._taskLayoutOptions.hideDueDate=n;break;case"done date":this._taskLayoutOptions.hideDoneDate=n;break;case"recurrence rule":this._taskLayoutOptions.hideRecurrenceRule=n;break;case"edit button":this._queryLayoutOptions.hideEditButton=n;break;case"urgency":this._queryLayoutOptions.hideUrgency=n;break;case"tags":this._taskLayoutOptions.hideTags=n;break;default:this.setError("do not understand hide/show option",e)}}}parseFilter(e){var n;let t=$u(e);return t!=null?(t.filter?this._filters.push(t.filter):this.setError((n=t.error)!=null?n:"Unknown error",e),!0):!1}parseLimit(e){let t=e.match(this.limitRegexp);if(t===null){this.setError("do not understand query limit",e);return}let n=Number.parseInt(t[3],10);t[1]!==void 0?this._taskGroupLimit=n:this._limit=n}parseSortBy(e){let t=K_(e);return t?(this._sorting.push(t),!0):!1}parseGroupBy(e){let t=Q_(e);return t?(this._grouping.push(t),!0):!1}generateQueryId(e){let t="AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz1234567890";return Array.from({length:e},()=>t[Math.floor(Math.random()*t.length)]).join("")}debug(e,t){this.logger.debugWithId(this._queryId,`"${this.filePath}": ${e}`,t)}};var An=class{constructor(e=An.empty){this._source=e}static getInstance(){return An.instance||(An.instance=new An),An.instance}set(e){this._source=e}query(e=void 0){return new on(this._source,e)}hasInstructions(){return this._source.trim()!==An.empty}},ar=An;ar.empty="";var Zu=class{constructor({obsidianEvents:e}){this.logger=Rt.getLogger("tasks.Events");this.obsidianEvents=e}onCacheUpdate(e){return this.logger.debug("TasksEvents.onCacheUpdate()"),this.obsidianEvents.on("obsidian-tasks-plugin:cache-update",e)}triggerCacheUpdate(e){this.logger.debug("TasksEvents.triggerCacheUpdate()"),this.obsidianEvents.trigger("obsidian-tasks-plugin:cache-update",e)}onRequestCacheUpdate(e){return this.logger.debug("TasksEvents.onRequestCacheUpdate()"),this.obsidianEvents.on("obsidian-tasks-plugin:request-cache-update",e)}triggerRequestCacheUpdate(e){this.logger.debug("TasksEvents.triggerRequestCacheUpdate()"),this.obsidianEvents.trigger("obsidian-tasks-plugin:request-cache-update",e)}off(e){this.logger.debug("TasksEvents.off()"),this.obsidianEvents.offref(e)}};var Ga=require("obsidian");var Ya,Zp,Jp,vP=["md"];function tl(){return Rt.getLogger("tasks.File")}var tv=({metadataCache:r,vault:e,workspace:t})=>{Ya=r,Zp=e,Jp=t},ci=t=>L(void 0,[t],function*({originalTask:r,newTasks:e}){if(Zp===void 0||Ya===void 0||Jp===void 0){Ju("Tasks: cannot use File before initializing it.");return}Array.isArray(e)||(e=[e]);let n=tl(),s="replaceTaskWithTasks()";du(n,s,r),fu(n,s,e),nv({originalTask:r,newTasks:e,vault:Zp,metadataCache:Ya,workspace:Jp,previousTries:0})});function Ju(r){console.error(r),new Ga.Notice(r,15e3)}function rv(r){console.warn(r),new Ga.Notice(r,1e4)}function wP(r){tl().debug(r)}var Pn=class extends Error{},el=class extends Error{},nv=a=>L(void 0,[a],function*({originalTask:r,newTasks:e,vault:t,metadataCache:n,workspace:s,previousTries:i}){let o=tl();o.debug(`tryRepetitive after ${i} previous tries`);let u=()=>{if(i>10){let c=`Tasks: Could not find the correct task line to update. The task line not updated is: ${r.originalMarkdown} @@ -273,27 +278,27 @@ Recommendations: 1. Close all panes that have the above file open, and then re-open the file. 2. Check for exactly identical copies of the task line, in this file, and see if you can make them different. -`;Au(c);return}let l=Math.min(Math.pow(10,s),100);o.debug(`timeout = ${l}`),setTimeout(()=>{x_({originalTask:r,newTasks:e,vault:t,metadataCache:n,workspace:i,previousTries:s+1})},l)};try{let[l,c,f]=yield R_(r,t),h=[...f.slice(0,l),...e.map(T=>T.toFileLineString()),...f.slice(l+1)];yield t.modify(c,h.join(` -`))}catch(l){if(l instanceof wn)return l.message&&D_(l.message),u();if(l instanceof Pu)return u();l instanceof Error&&Au(l.message)}});function R_(r,e){return F(this,null,function*(){if(Oa===void 0)throw new wn;let t=e.getAbstractFileByPath(r.path);if(!(t instanceof Da.TFile))throw new wn(`Tasks: No file found for task ${r.description}. Retrying ...`);if(!YA.includes(t.extension))throw new Error(`Tasks: Does not support files with the ${t.extension} file extension.`);let n=Oa.getFileCache(t);if(n==null||n===null)throw new wn(`Tasks: No file cache found for file ${t.path}. Retrying ...`);let i=n.listItems;if(i===void 0||i.length===0)throw new wn(`Tasks: No list items found in file cache of ${t.path}. Retrying ...`);let a=(yield e.read(t)).split(` -`),o=GA(r,a,i,jA);if(o===void 0)throw new Pu;return[o,t,a]})}function Np(r,e){return F(this,null,function*(){try{let[t,n,i]=yield R_(r,e);return[t,n]}catch(t){t instanceof wn?t.message&&D_(t.message):t instanceof Error&&Au(t.message)}})}function M_(r,e){return r{nv({originalTask:r,newTasks:e,vault:t,metadataCache:n,workspace:s,previousTries:i+1})},l)};try{let[l,c,f]=yield sv(r,t),m=[...f.slice(0,l),...e.map(y=>y.toFileLineString()),...f.slice(l+1)];yield t.modify(c,m.join(` +`))}catch(l){if(l instanceof Pn)return l.message&&rv(l.message),u();if(l instanceof el)return u();l instanceof Error&&Ju(l.message)}});function sv(r,e){return L(this,null,function*(){if(Ya===void 0)throw new Pn;let t=e.getAbstractFileByPath(r.path);if(!(t instanceof Ga.TFile))throw new Pn(`Tasks: No file found for task ${r.description}. Retrying ...`);if(!vP.includes(t.extension))throw new Error(`Tasks: Does not support files with the ${t.extension} file extension.`);let n=Ya.getFileCache(t);if(n==null||n===null)throw new Pn(`Tasks: No file cache found for file ${t.path}. Retrying ...`);let s=n.listItems;if(s===void 0||s.length===0)throw new Pn(`Tasks: No list items found in file cache of ${t.path}. Retrying ...`);let a=(yield e.read(t)).split(` +`),o=EP(r,a,s,wP);if(o===void 0)throw new el;return[o,t,a]})}function em(r,e){return L(this,null,function*(){try{let[t,n,s]=yield sv(r,e);return[t,n]}catch(t){t instanceof Pn?t.message&&rv(t.message):t instanceof Error&&Ju(t.message)}})}function iv(r,e){return r"",Ce.dateAttributeCalculator=(e,t)=>{let i="far";function s(o){let u=window.moment().startOf("day"),l="",c=u.diff(o,"days");return isNaN(c)?null:c===0?"today":(c>0?l+="past-":c<0&&(l+="future-"),Math.abs(c)<=7?l+=Math.abs(c).toString()+"d":l+=i,l)}let a=t[e];if(a instanceof window.moment){let o=s(a);if(o)return o}return""};var VA={createdDate:new Ce("task-created","taskCreated",Ce.dateAttributeCalculator),dueDate:new Ce("task-due","taskDue",Ce.dateAttributeCalculator),startDate:new Ce("task-start","taskStart",Ce.dateAttributeCalculator),scheduledDate:new Ce("task-scheduled","taskScheduled",Ce.dateAttributeCalculator),doneDate:new Ce("task-done","taskDone",Ce.dateAttributeCalculator),description:new Ce("task-description",Ce.noAttributeName,Ce.noAttributeValueCalculator),recurrenceRule:new Ce("task-recurring",Ce.noAttributeName,Ce.noAttributeValueCalculator),priority:new Ce("task-priority","taskPriority",(r,e)=>Kr.priorityNameUsingNormal(e.priority).toLocaleLowerCase()),blockLink:new Ce("task-block-link",Ce.noAttributeName,Ce.noAttributeValueCalculator)};var C_=require("obsidian");function A_(r,e){return F(this,null,function*(){yield ti({originalTask:r,newTasks:e})})}var Fu=class extends C_.Menu{constructor(t){super();this.taskSaver=t}};var Lu=class extends Fu{constructor(t,n,i=A_){super(i);this.statusRegistry=t;let s="Change status to:",a=(u,l,c,f)=>{let h=`${s} [${f}] ${c}`;l.setTitle(h).setChecked(f===u.status.symbol).onClick(()=>F(this,null,function*(){if(f!==u.status.symbol){let T=this.statusRegistry.bySymbol(f),y=u.handleNewStatusWithRecurrenceInUsersOrder(T);yield this.taskSaver(u,y)}}))},o=new Pe().coreStatuses.map(u=>u.symbol);for(let u of[!0,!1])for(let l of t.registeredStatuses)o.includes(l.symbol)===u&&this.addItem(c=>a(n,c,l.name,l.symbol))}};var xa=new Iu,En=class{static obsidianMarkdownRenderer(e,t,n,i){return F(this,null,function*(){if(!i)throw new Error("Must call the Obsidian renderer with an Obsidian Component object");yield P_.MarkdownRenderer.renderMarkdown(e,t,n,i)})}constructor({textRenderer:e=En.obsidianMarkdownRenderer,obsidianComponent:t,parentUlElement:n,layoutOptions:i}){this.textRenderer=e,this.obsidianComponent=t,this.parentUlElement=n,this.layoutOptions=i}renderTaskLine(e,t,n){return F(this,null,function*(){let i=document.createElement("li");this.parentUlElement.appendChild(i),i.classList.add("task-list-item","plugin-tasks-list-item");let s=document.createElement("span");i.appendChild(s),s.classList.add("tasks-list-text"),yield this.taskToHtml(e,s,i);let a=document.createElement("input");return i.appendChild(a),a.classList.add("task-list-item-checkbox"),a.type="checkbox",e.status.symbol!==" "&&(a.checked=!0,i.classList.add("is-checked")),a.addEventListener("click",o=>{o.preventDefault(),o.stopPropagation(),a.disabled=!0;let u=e.toggleWithRecurrenceInUsersOrder();ti({originalTask:e,newTasks:u})}),a.addEventListener("contextmenu",o=>{new Lu(ve.getInstance(),e).showAtPosition({x:o.clientX,y:o.clientY})}),a.setAttribute("title","Right-click for options"),i.prepend(a),i.setAttribute("data-task",e.status.symbol.trim()),i.setAttribute("data-line",t.toString()),i.setAttribute("data-task-status-name",e.status.name),i.setAttribute("data-task-status-type",e.status.type),a.setAttribute("data-line",t.toString()),this.layoutOptions.shortMode&&this.addTooltip(e,s,n),i})}taskToHtml(e,t,n){return F(this,null,function*(){let i=new pn(this.layoutOptions),s=Hr.tasksPluginEmoji.taskSerializer;for(let a of i.shownTaskLayoutComponents){let o=s.componentToString(e,i,a);if(o){let u=document.createElement("span");t.appendChild(u);let l=document.createElement("span");u.appendChild(l),yield this.renderComponentText(l,o,a,e),this.addInternalClasses(a,l);let c=xa.className(a);u.classList.add(c),xa.addDataAttribute(u,e,a),xa.addDataAttribute(n,e,a)}}for(let a of i.hiddenTaskLayoutComponents)xa.addDataAttribute(n,e,a);n.dataset.taskPriority===void 0&&xa.addDataAttribute(n,e,"priority")})}renderComponentText(e,t,n,i){return F(this,null,function*(){if(n==="description"){t=ge.getInstance().removeAsWordFromDependingOnSettings(t);let{debugSettings:s}=Q();s.showTaskHiddenData&&(t+=`
\u{1F41B} ${i.lineNumber} . ${i.sectionStart} . ${i.sectionIndex} . '${i.originalMarkdown}'
'${i.path}' > '${i.precedingHeader}'
`),yield this.textRenderer(t,e,i.path,this.obsidianComponent);let a=e.querySelector("blockquote"),o=a!=null?a:e,u=o.querySelector("p");if(u!==null){for(;u.firstChild;)o.insertBefore(u.firstChild,u);u.remove()}e.querySelectorAll("p").forEach(l=>{l.hasChildNodes()||l.remove()}),e.querySelectorAll(".footnotes").forEach(l=>{l.remove()})}else e.innerHTML=t})}addInternalClasses(e,t){function n(i){let s=/["&\x00\r\n]/g,a=i.replace(s,"-");return a=a.replace(/^[-_]+/,""),a.length>0?a:null}if(e==="description"){let i=t.getElementsByClassName("tag");for(let s=0;s{function c(y,w,D){w&&y.createDiv().setText(f({signifier:D,date:w}))}function f({signifier:y,date:w}){return`${y} ${w.format(V.dateFormat)} (${w.from(window.moment().startOf("day"))})`}let h=t.createDiv();h.addClasses(["tooltip","pop-up"]),e.recurrence&&h.createDiv().setText(`${i} ${e.recurrence.toText()}`),c(h,e.createdDate,a),c(h,e.startDate,s),c(h,e.scheduledDate,o),c(h,e.dueDate,u),c(h,e.doneDate,l);let T=e.getLinkText({isFilenameUnique:n});T&&h.createDiv().setText(`\u{1F517} ${T}`),t.addEventListener("mouseleave",()=>{h.remove()})})}};var Uu=class{constructor({plugin:e}){this.markdownPostProcessor=this._markdownPostProcessor.bind(this);e.registerMarkdownPostProcessor(this._markdownPostProcessor.bind(this))}_markdownPostProcessor(e,t){return F(this,null,function*(){var f;let n=new N_.MarkdownRenderChild(e);t.addChild(n);let i=e.findAll(".task-list-item").filter(h=>{var w;let T=(w=h.textContent)==null?void 0:w.split(` -`);if(T===void 0)return!1;let y=null;for(let D=0;DI_.ViewPlugin.fromClass(Fp),Fp=class{constructor(e){this.view=e,this.handleClickEvent=this.handleClickEvent.bind(this),this.view.dom.addEventListener("click",this.handleClickEvent)}destroy(){this.view.dom.removeEventListener("click",this.handleClickEvent)}handleClickEvent(e){let{target:t}=e;if(!t||!(t instanceof HTMLInputElement)||t.type!=="checkbox")return!1;let n=t.closest("ul.plugin-tasks-query-result, div.callout-content");if(n){if(n.matches("div.callout-content")){let h=`obsidian-tasks-plugin warning: Tasks cannot add or remove completion dates or make the next copy of a recurring task for tasks written inside a callout when you click their checkboxes in Live Preview. -If you wanted Tasks to do these things, please undo your change, then either click the line of the task and use the "Toggle Task Done" command, or switch to Reading View to click the checkbox.`;console.warn(h),new F_.Notice(h,45e3)}return!1}let{state:i}=this.view,s=this.view.posAtDOM(t),a=i.doc.lineAt(s),o=le.fromLine({line:a.text,taskLocation:ct.fromUnknownPosition(""),fallbackDate:null});if(o===null)return!1;e.preventDefault();let l=o.toggleWithRecurrenceInUsersOrder().map(h=>h.toFileLineString()).join(i.lineBreak),c=i.update({changes:{from:a.from,to:a.to,insert:l}});this.view.dispatch(c);let f=t.checked;return setTimeout(()=>{t.checked=f},1),!0}};var pr=require("obsidian");function U_(r,e,t,n=void 0){let i="";e.isEmpty()||(i+=`Only tasks containing the global filter '${e.get()}'. +${u}`);return}break}i++}}return s}var lv=require("obsidian");var uv=require("obsidian");var rl=class{constructor(){this.data=DP}addDataAttribute(e,t,n){this.data[n].addDataAttribute(e,t,n)}addClassName(e,t){let n=this.data[t].className;e.classList.add(n)}},tm=class{constructor(e,t,n){if(e==="")throw Error("Developer note: CSS class cannot be an empty string, please specify one.");this.className=e,this.attributeName=t,this.attributeValueCalculator=n}addDataAttribute(e,t,n){if(this.attributeName===tm.noAttributeName)return;let s=this.attributeValueCalculator(n,t);s!==""&&(e.dataset[this.attributeName]=s)}},Ce=tm;Ce.noAttributeName="",Ce.noAttributeValueCalculator=()=>"",Ce.dateAttributeCalculator=(e,t)=>{let s="far";function i(o){let u=window.moment().startOf("day"),l="",c=u.diff(o,"days");return isNaN(c)?null:c===0?"today":(c>0?l+="past-":c<0&&(l+="future-"),Math.abs(c)<=7?l+=Math.abs(c).toString()+"d":l+=s,l)}let a=t[e];if(a instanceof window.moment){let o=i(a);if(o)return o}return""};var DP={createdDate:new Ce("task-created","taskCreated",Ce.dateAttributeCalculator),dueDate:new Ce("task-due","taskDue",Ce.dateAttributeCalculator),startDate:new Ce("task-start","taskStart",Ce.dateAttributeCalculator),scheduledDate:new Ce("task-scheduled","taskScheduled",Ce.dateAttributeCalculator),doneDate:new Ce("task-done","taskDone",Ce.dateAttributeCalculator),cancelledDate:new Ce("task-cancelled","taskCancelled",Ce.dateAttributeCalculator),description:new Ce("task-description",Ce.noAttributeName,Ce.noAttributeValueCalculator),recurrenceRule:new Ce("task-recurring",Ce.noAttributeName,Ce.noAttributeValueCalculator),priority:new Ce("task-priority","taskPriority",(r,e)=>rn.priorityNameUsingNormal(e.priority).toLocaleLowerCase()),blockLink:new Ce("task-block-link",Ce.noAttributeName,Ce.noAttributeValueCalculator)};var rm=class{constructor(e){this.newStatus=e}apply(e){return this.isCheckedForTask(e)?[e]:e.handleNewStatusWithRecurrenceInUsersOrder(this.newStatus)}instructionDisplayName(){return`Change status to: [${this.newStatus.symbol}] ${this.newStatus.name}`}isCheckedForTask(e){return this.newStatus.symbol===e.status.symbol}};function av(r){let e=[],t=new Ne().coreStatuses.map(n=>n.symbol);for(let n of[!0,!1])for(let s of r.registeredStatuses)t.includes(s.symbol)===n&&e.push(new rm(s));return e}var ov=require("obsidian");function ja(r,e){return L(this,null,function*(){yield ci({originalTask:r,newTasks:e})})}var di=class extends ov.Menu{constructor(t){super();this.taskSaver=t}addItemsForInstructions(t,n){for(let s of t)this.addItemForInstruction(n,s)}addItemForInstruction(t,n){this.addItem(s=>this.getMenuItemCallback(t,s,n))}getMenuItemCallback(t,n,s){n.setTitle(s.instructionDisplayName()).setChecked(s.isCheckedForTask(t)).onClick(()=>L(this,null,function*(){let i=s.apply(t);(i.length!==1||!Object.is(i[0],t))&&(yield this.taskSaver(t,i))}))}};var nl=class extends di{constructor(e,t,n=ja){super(n);let s=av(e);this.addItemsForInstructions(s,t)}};var Nn=class{static obsidianMarkdownRenderer(e,t,n,s){return L(this,null,function*(){if(!s)throw new Error("Must call the Obsidian renderer with an Obsidian Component object");yield uv.MarkdownRenderer.renderMarkdown(e,t,n,s)})}constructor({textRenderer:e=Nn.obsidianMarkdownRenderer,obsidianComponent:t,parentUlElement:n,taskLayoutOptions:s,queryLayoutOptions:i}){this.textRenderer=e,this.obsidianComponent=t,this.parentUlElement=n,this.taskLayoutOptions=s,this.queryLayoutOptions=i}renderTaskLine(e,t,n){return L(this,null,function*(){let s=document.createElement("li");this.parentUlElement.appendChild(s),s.classList.add("task-list-item","plugin-tasks-list-item");let i=document.createElement("span");s.appendChild(i),i.classList.add("tasks-list-text"),yield this.taskToHtml(e,i,s);let a=document.createElement("input");return s.appendChild(a),a.classList.add("task-list-item-checkbox"),a.type="checkbox",e.status.symbol!==" "&&(a.checked=!0,s.classList.add("is-checked")),a.addEventListener("click",o=>{o.preventDefault(),o.stopPropagation(),a.disabled=!0;let u=e.toggleWithRecurrenceInUsersOrder();ci({originalTask:e,newTasks:u})}),a.addEventListener("contextmenu",o=>{new nl(Ee.getInstance(),e).showAtPosition({x:o.clientX,y:o.clientY})}),a.setAttribute("title","Right-click for options"),s.prepend(a),s.setAttribute("data-task",e.status.symbol.trim()),s.setAttribute("data-line",t.toString()),s.setAttribute("data-task-status-name",e.status.name),s.setAttribute("data-task-status-type",e.status.type),a.setAttribute("data-line",t.toString()),this.queryLayoutOptions.shortMode&&this.addTooltip(e,i,n),s})}taskToHtml(e,t,n){return L(this,null,function*(){let s=new rl,i=new En(this.taskLayoutOptions,this.queryLayoutOptions),a=Jr.tasksPluginEmoji.taskSerializer;for(let o of i.shownTaskLayoutComponents()){let u=a.componentToString(e,this.queryLayoutOptions.shortMode,o);if(u){let l=document.createElement("span");t.appendChild(l);let c=document.createElement("span");l.appendChild(c),yield this.renderComponentText(c,u,o,e),this.addInternalClasses(o,c),s.addClassName(l,o),s.addDataAttribute(l,e,o),s.addDataAttribute(n,e,o)}}for(let o of i.hiddenTaskLayoutComponents())s.addDataAttribute(n,e,o);n.dataset.taskPriority===void 0&&s.addDataAttribute(n,e,"priority")})}renderComponentText(e,t,n,s){return L(this,null,function*(){if(n==="description"){t=ye.getInstance().removeAsWordFromDependingOnSettings(t);let{debugSettings:i}=K();i.showTaskHiddenData&&(t+=`
\u{1F41B} ${s.lineNumber} . ${s.sectionStart} . ${s.sectionIndex} . '${s.originalMarkdown}'
'${s.path}' > '${s.precedingHeader}'
`),yield this.textRenderer(t,e,s.path,this.obsidianComponent);let a=e.querySelector("blockquote"),o=a!=null?a:e,u=o.querySelector("p");if(u!==null){for(;u.firstChild;)o.insertBefore(u.firstChild,u);u.remove()}e.querySelectorAll("p").forEach(l=>{l.hasChildNodes()||l.remove()}),e.querySelectorAll(".footnotes").forEach(l=>{l.remove()})}else e.innerHTML=t})}addInternalClasses(e,t){function n(s){let i=/["&\x00\r\n]/g,a=s.replace(i,"-");return a=a.replace(/^[-_]+/,""),a.length>0?a:null}if(e==="description"){let s=t.getElementsByClassName("tag");for(let i=0;i{function f(E,x,v){x&&E.createDiv().setText(m({signifier:v,date:x}))}function m({signifier:E,date:x}){return`${E} ${x.format(z.dateFormat)} (${x.from(window.moment().startOf("day"))})`}let y=t.createDiv();y.addClasses(["tooltip","pop-up"]),e.recurrence&&y.createDiv().setText(`${s} ${e.recurrence.toText()}`),f(y,e.createdDate,a),f(y,e.startDate,i),f(y,e.scheduledDate,o),f(y,e.dueDate,u),f(y,e.cancelledDate,l),f(y,e.doneDate,c);let k=e.getLinkText({isFilenameUnique:n});k&&y.createDiv().setText(`\u{1F517} ${k}`),t.addEventListener("mouseleave",()=>{y.remove()})})}};var sl=class{constructor({plugin:e}){this.markdownPostProcessor=this._markdownPostProcessor.bind(this);e.registerMarkdownPostProcessor(this._markdownPostProcessor.bind(this))}_markdownPostProcessor(e,t){return L(this,null,function*(){var f;let n=new lv.MarkdownRenderChild(e);t.addChild(n);let s=e.findAll(".task-list-item").filter(m=>{var E;let y=(E=m.textContent)==null?void 0:E.split(` +`);if(y===void 0)return!1;let k=null;for(let x=0;xcv.ViewPlugin.fromClass(nm),nm=class{constructor(e){this.view=e,this.handleClickEvent=this.handleClickEvent.bind(this),this.view.dom.addEventListener("click",this.handleClickEvent)}destroy(){this.view.dom.removeEventListener("click",this.handleClickEvent)}handleClickEvent(e){let{target:t}=e;if(!t||!(t instanceof HTMLInputElement)||t.type!=="checkbox")return!1;let n=t.closest("ul.plugin-tasks-query-result, div.callout-content");if(n){if(n.matches("div.callout-content")){let m=`obsidian-tasks-plugin warning: Tasks cannot add or remove completion dates or make the next copy of a recurring task for tasks written inside a callout when you click their checkboxes in Live Preview. +If you wanted Tasks to do these things, please undo your change, then either click the line of the task and use the "Toggle Task Done" command, or switch to Reading View to click the checkbox.`;console.warn(m),new dv.Notice(m,45e3)}return!1}let{state:s}=this.view,i=this.view.posAtDOM(t),a=s.doc.lineAt(i),o=fe.fromLine({line:a.text,taskLocation:pt.fromUnknownPosition(""),fallbackDate:null});if(o===null)return!1;e.preventDefault();let l=o.toggleWithRecurrenceInUsersOrder().map(m=>m.toFileLineString()).join(s.lineBreak),c=s.update({changes:{from:a.from,to:a.to,insert:l}});this.view.dispatch(c);let f=t.checked;return setTimeout(()=>{t.checked=f},1),!0}};var fi=require("obsidian");function pv(r,e,t,n=void 0){let s="";e.isEmpty()||(s+=`Only tasks containing the global filter '${e.get()}'. -`);let s=new Jr(r,n);return s.ignoreGlobalQuery||t.hasInstructions()&&(i+=`Explanation of the global query: +`);let i=new li(" "),a=new on(r,n);if(!a.ignoreGlobalQuery&&t.hasInstructions()){let o=t.query(n);s+=`Explanation of the global query: -${t.query(n).explainQuery()} -`),i+=`Explanation of this Tasks code block query: +${i.explainQuery(o)} +`}return s+=`Explanation of this Tasks code block query: -${s.explainQuery()}`,i}function Wu(r,e,t){let n=new Jr(r,t);return n.ignoreGlobalQuery?n:e.query(t).append(n)}function W_(r){for(let t of le.allDateFields()){let n=r[t];if(n&&!n.isValid())return!1}let e=r.happensDates.some(t=>!!(t!=null&&t.isValid()));return!r.isDone&&e}function Lp(r){return r.dueDate?"dueDate":r.scheduledDate?"scheduledDate":r.startDate?"startDate":null}function q_(r,e,t,n){let i=r[e],s=new rt(i).postpone(t,n),a=ht.removeInferredStatusIfNeeded(r,[new le(it(we({},r),{[e]:s}))])[0];return{postponedDate:s,postponedTask:a}}function $_(r,e){let t=r==null?void 0:r.format("DD MMM YYYY");return`Task's ${e} postponed until ${t}`}function Y_(r,e,t){return`\u2139\uFE0F ${Up(r,e,t)} (right-click for more options)`}function Up(r,e,t){function n(l){return l.charAt(0).toUpperCase()+l.slice(1)}let i=Lp(r),s=r[i],o=new rt(s).postpone(t,e).format("ddd Do MMM"),u=e>1?e:"a";return s.isSameOrBefore(window.moment(),"day")?`${n(i.replace("Date",""))} in ${u} ${t}, on ${o}`:`Postpone ${i.replace("Date"," date")} by ${u} ${t}, to ${o}`}var qu=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 F(this,null,function*(){n.addChild(new Wp({app:this.app,events:this.events,container:t,source:e,filePath:n.sourcePath}))})}},Wp=class extends pr.MarkdownRenderChild{constructor({app:t,events:n,container:i,source:s,filePath:a}){super(i);switch(this.app=t,this.events=n,this.source=s,this.filePath=a,this.containerEl.className){case"block-language-tasks":this.query=Wu(this.source,tr.getInstance(),this.filePath),this.queryType="tasks";break;default:this.query=Wu(this.source,tr.getInstance(),this.filePath),this.queryType="tasks";break}}onload(){this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.renderEventRef=this.events.onCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()}onunload(){this.renderEventRef!==void 0&&this.events.off(this.renderEventRef),this.queryReloadTimeout!==void 0&&clearTimeout(this.queryReloadTimeout)}reloadQueryAtMidnight(){let t=new Date;t.setHours(24,0,0,0);let n=new Date,i=t.getTime()-n.getTime();this.queryReloadTimeout=setTimeout(()=>{this.query=Wu(this.source,tr.getInstance(),this.filePath),this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()},i+1e3)}render(i){return F(this,arguments,function*({tasks:t,state:n}){var a;let s=this.containerEl.createEl("div");n==="Warm"&&this.query.error===void 0?yield this.renderQuerySearchResults(t,n,s):this.query.error!==void 0?this.renderErrorMessage(s,this.query.error):this.renderLoadingMessage(s),(a=this.containerEl.firstChild)==null||a.replaceWith(s)})}renderQuerySearchResults(t,n,i){return F(this,null,function*(){this.query.debug(`[render] Render called: plugin state: ${n}; searching ${t.length} tasks`),this.query.layoutOptions.explainQuery&&this.createExplanation(i);let s=this.query.applyQueryToTasks(t);if(s.searchErrorMessage!==void 0){this.renderErrorMessage(i,s.searchErrorMessage);return}yield this.addAllTaskGroups(s.taskGroups,i);let a=s.totalTasksCount;this.addTaskCount(i,s),this.query.debug(`[render] ${a} tasks displayed`)})}renderErrorMessage(t,n){t.createDiv().innerHTML=`
Tasks query: ${n.replace(/\n/g,"
")}
`}renderLoadingMessage(t){t.setText("Loading Tasks ...")}createExplanation(t){let n=U_(this.source,ge.getInstance(),tr.getInstance(),this.filePath),i=t.createEl("pre");i.addClasses(["plugin-tasks-query-explanation"]),i.setText(n),t.appendChild(i)}createTaskList(t,n){return F(this,null,function*(){let i=new pn(this.query.layoutOptions),s=n.createEl("ul");s.addClasses(["contains-task-list","plugin-tasks-query-result"]),s.addClasses(i.taskListHiddenClasses);let a=this.getGroupingAttribute();a&&a.length>0&&(s.dataset.taskGroupBy=a);let o=new En({obsidianComponent:this,parentUlElement:s,layoutOptions:this.query.layoutOptions});for(let[u,l]of t.entries()){let c=this.isFilenameUnique({task:l}),f=yield o.renderTaskLine(l,u,c);f.querySelectorAll("[data-footnote-id]").forEach(w=>w.remove());let T=f.createSpan("task-extras");this.query.layoutOptions.hideUrgency||this.addUrgency(T,l);let y=this.query.layoutOptions.shortMode;this.query.layoutOptions.hideBacklinks||this.addBacklinks(T,l,y,c),this.query.layoutOptions.hideEditButton||this.addEditButton(T,l),!this.query.layoutOptions.hidePostponeButton&&W_(l)&&this.addPostponeButton(T,l,y),s.appendChild(f)}n.appendChild(s)})}addEditButton(t,n){t.createEl("a",{cls:"tasks-edit"}).onClickEvent(s=>{s.preventDefault();let a=u=>F(this,null,function*(){yield ti({originalTask:n,newTasks:ht.removeInferredStatusIfNeeded(n,u)})});new mn({app:this.app,task:n,onSubmit:a}).open()})}addUrgency(t,n){let i=new Intl.NumberFormat().format(n.urgency);t.createSpan({text:i,cls:"tasks-urgency"})}addAllTaskGroups(t,n){return F(this,null,function*(){for(let i of t.groups)yield this.addGroupHeadings(n,i.groupHeadings),yield this.createTaskList(i.tasks,n)})}addGroupHeadings(t,n){return F(this,null,function*(){for(let i of n)yield this.addGroupHeading(t,i)})}addGroupHeading(t,n){return F(this,null,function*(){let i="h6";n.nestingLevel===0?i="h4":n.nestingLevel===1&&(i="h5");let s=t.createEl(i,{cls:"tasks-group-heading"});yield pr.MarkdownRenderer.renderMarkdown(n.displayName,s,this.filePath,this)})}addBacklinks(t,n,i,s){var c;let a=t.createSpan({cls:"tasks-backlink"});i||a.append(" (");let o=a.createEl("a");o.rel="noopener",o.target="_blank",o.addClass("internal-link"),i&&o.addClass("internal-link-short-mode");let u;i?u=" \u{1F517}":u=(c=n.getLinkText({isFilenameUnique:s}))!=null?c:"",o.setText(u);let l=this.app.vault;o.addEventListener("click",f=>F(this,null,function*(){let h=yield Np(n,l);if(h){let[T,y]=h,w=this.app.workspace.getLeaf(pr.Keymap.isModEvent(f));f.preventDefault(),yield w.openFile(y,{eState:{line:T}})}})),o.addEventListener("mousedown",f=>F(this,null,function*(){if(f.button===1){let h=yield Np(n,l);if(h){let[T,y]=h,w=this.app.workspace.getLeaf("tab");f.preventDefault(),yield w.openFile(y,{eState:{line:T}})}}})),i||a.append(")")}addPostponeButton(t,n,i){let a="day",o=Y_(n,1,a),u=t.createEl("button",{attr:{id:"postpone-button",title:o}}),l=i?["tasks-postpone","tasks-postpone-short-mode"]:["tasks-postpone"];u.addClasses(l),u.setText(" \u23E9"),u.addEventListener("click",()=>this.postponeOnClickCallback(u,n,1,a)),u.addEventListener("contextmenu",c=>F(this,null,function*(){let f=new pr.Menu,h=(T,y,w=1)=>{let D=Up(n,w,y);T.setTitle(D).onClick(()=>this.postponeOnClickCallback(u,n,w,y))};f.addItem(T=>h(T,"days",2)),f.addItem(T=>h(T,"days",3)),f.addItem(T=>h(T,"days",4)),f.addItem(T=>h(T,"days",5)),f.addItem(T=>h(T,"days",6)),f.addSeparator(),f.addItem(T=>h(T,"week")),f.addItem(T=>h(T,"weeks",2)),f.addItem(T=>h(T,"weeks",3)),f.addItem(T=>h(T,"month")),f.showAtPosition({x:c.clientX,y:c.clientY})}))}addTaskCount(t,n){this.query.layoutOptions.hideTaskCount||t.createDiv({text:n.totalTasksCountDisplayText(),cls:"tasks-count"})}isFilenameUnique({task:t}){let n=t.path.match(/([^/]*)\..+$/i);if(n===null)return;let i=n[1];return this.app.vault.getMarkdownFiles().filter(a=>{if(a.basename===i)return!0}).length<2}getGroupingAttribute(){let t=[];for(let n of this.query.grouping)t.push(n.property);return t.join(",")}postponeOnClickCallback(t,n,i,s){return F(this,null,function*(){let a=Lp(n);if(a===null){let l="\u26A0\uFE0F Postponement requires a date: due, scheduled or start.";return new pr.Notice(l,1e4)}let{postponedDate:o,postponedTask:u}=q_(n,a,s,i);yield ti({originalTask:n,newTasks:u}),this.postponeSuccessCallback(t,a,o)})}postponeSuccessCallback(t,n,i){t.disabled=!0;let s=$_(i,n);new pr.Notice(s,2e3)}};var be=require("obsidian");var $u=class{constructor(e){this._markdown="";this.columnNames=e,this.addTitleRow()}get markdown(){return this._markdown}addTitleRow(){let e="|",t="|";this.columnNames.forEach(n=>{e+=` ${n} |`,t+=" ----- |"}),this._markdown+=`${e} +${i.explainQuery(a)}`,s}function il(r,e,t){let n=new on(r,t);return n.ignoreGlobalQuery?n:e.query(t).append(n)}function mv(r){for(let t of fe.allDateFields()){let n=r[t];if(n&&!n.isValid())return!1}let e=r.happensDates.some(t=>!!(t!=null&&t.isValid()));return!r.isDone&&e}function al(r){return r.dueDate?"dueDate":r.scheduledDate?"scheduledDate":r.startDate?"startDate":null}function sm(r,e,t,n){let s=r[e];return gv(s,r,e,t,n)}function hv(r,e,t,n){let s=window.moment();return gv(s,r,e,t,n)}function gv(r,e,t,n,s){let i=new He(r).postpone(n,s),a=bt.removeInferredStatusIfNeeded(e,[new fe(ot(ke({},e),{[t]:i}))])[0];return{postponedDate:i,postponedTask:a}}function yv(r,e){let t=r==null?void 0:r.format("DD MMM YYYY");return`Task's ${e} changed to ${t}`}function Tv(r,e,t){return`\u2139\uFE0F ${im(r,e,t)} (right-click for more options)`}function xP(r){return r.charAt(0).toUpperCase()+r.slice(1)}function im(r,e,t){let n=al(r),s=r[n];return _v(n,s,e,t)}function bv(r,e,t){let n=al(r),s=window.moment().startOf("day");return _v(n,s,e,t)}function _v(r,e,t,n){let i=new He(e).postpone(n,t).format("ddd Do MMM"),a=t!=1?t:"a";return e.isSameOrBefore(window.moment(),"day")?`${xP(r.replace("Date",""))} in ${a} ${n}, on ${i}`.replace(" in 0 days"," today").replace("in a day","tomorrow"):`Postpone ${r.replace("Date"," date")} by ${a} ${n}, to ${i}`}var am=require("obsidian");var In=class extends di{constructor(e,t,n=ja){super(n);let s=(l,c,f,m,y,k)=>{let E=y(t,m,f);c.setTitle(E).onClick(()=>In.postponeOnClickCallback(l,t,m,f,k,n))},i=bv,a=hv;this.addItem(l=>s(e,l,"days",0,i,a)),this.addItem(l=>s(e,l,"day",1,i,a)),this.addSeparator();let o=im,u=sm;this.addItem(l=>s(e,l,"days",2,o,u)),this.addItem(l=>s(e,l,"days",3,o,u)),this.addItem(l=>s(e,l,"days",4,o,u)),this.addItem(l=>s(e,l,"days",5,o,u)),this.addItem(l=>s(e,l,"days",6,o,u)),this.addSeparator(),this.addItem(l=>s(e,l,"week",1,o,u)),this.addItem(l=>s(e,l,"weeks",2,o,u)),this.addItem(l=>s(e,l,"weeks",3,o,u)),this.addItem(l=>s(e,l,"month",1,o,u))}static postponeOnClickCallback(o,u,l,c){return L(this,arguments,function*(e,t,n,s,i=sm,a=ja){let f=al(t);if(f===null){let k="\u26A0\uFE0F Postponement requires a date: due, scheduled or start.";return new am.Notice(k,1e4)}let{postponedDate:m,postponedTask:y}=i(t,f,s,n);yield a(t,y),In.postponeSuccessCallback(e,f,m)})}static postponeSuccessCallback(e,t,n){e.disabled=!0;let s=yv(n,t);new am.Notice(s,2e3)}};var ol=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 L(this,null,function*(){n.addChild(new om({app:this.app,events:this.events,container:t,source:e,filePath:n.sourcePath}))})}},om=class extends fi.MarkdownRenderChild{constructor({app:t,events:n,container:s,source:i,filePath:a}){super(s);switch(this.app=t,this.events=n,this.source=i,this.filePath=a,this.containerEl.className){case"block-language-tasks":this.query=il(this.source,ar.getInstance(),this.filePath),this.queryType="tasks";break;default:this.query=il(this.source,ar.getInstance(),this.filePath),this.queryType="tasks";break}}onload(){this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.renderEventRef=this.events.onCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()}onunload(){this.renderEventRef!==void 0&&this.events.off(this.renderEventRef),this.queryReloadTimeout!==void 0&&clearTimeout(this.queryReloadTimeout)}reloadQueryAtMidnight(){let t=new Date;t.setHours(24,0,0,0);let n=new Date,s=t.getTime()-n.getTime();this.queryReloadTimeout=setTimeout(()=>{this.query=il(this.source,ar.getInstance(),this.filePath),this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()},s+1e3)}render(s){return L(this,arguments,function*({tasks:t,state:n}){var a;let i=this.containerEl.createEl("div");n==="Warm"&&this.query.error===void 0?yield this.renderQuerySearchResults(t,n,i):this.query.error!==void 0?this.renderErrorMessage(i,this.query.error):this.renderLoadingMessage(i),(a=this.containerEl.firstChild)==null||a.replaceWith(i)})}renderQuerySearchResults(t,n,s){return L(this,null,function*(){this.query.debug(`[render] Render called: plugin state: ${n}; searching ${t.length} tasks`),this.query.queryLayoutOptions.explainQuery&&this.createExplanation(s);let i=this.query.applyQueryToTasks(t);if(i.searchErrorMessage!==void 0){this.renderErrorMessage(s,i.searchErrorMessage);return}yield this.addAllTaskGroups(i.taskGroups,s);let a=i.totalTasksCount;this.addTaskCount(s,i),this.query.debug(`[render] ${a} tasks displayed`)})}renderErrorMessage(t,n){t.createDiv().innerHTML=`
Tasks query: ${n.replace(/\n/g,"
")}
`}renderLoadingMessage(t){t.setText("Loading Tasks ...")}createExplanation(t){let n=pv(this.source,ye.getInstance(),ar.getInstance(),this.filePath),s=t.createEl("pre");s.addClasses(["plugin-tasks-query-explanation"]),s.setText(n),t.appendChild(s)}createTaskList(t,n){return L(this,null,function*(){let s=new En(this.query.taskLayoutOptions,this.query.queryLayoutOptions),i=n.createEl("ul");i.addClasses(["contains-task-list","plugin-tasks-query-result"]),i.addClasses(s.taskListHiddenClasses());let a=this.getGroupingAttribute();a&&a.length>0&&(i.dataset.taskGroupBy=a);let o=new Nn({obsidianComponent:this,parentUlElement:i,taskLayoutOptions:this.query.taskLayoutOptions,queryLayoutOptions:this.query.queryLayoutOptions});for(let[u,l]of t.entries()){let c=this.isFilenameUnique({task:l}),f=yield o.renderTaskLine(l,u,c);f.querySelectorAll("[data-footnote-id]").forEach(E=>E.remove());let y=f.createSpan("task-extras");this.query.queryLayoutOptions.hideUrgency||this.addUrgency(y,l);let k=this.query.queryLayoutOptions.shortMode;this.query.queryLayoutOptions.hideBacklinks||this.addBacklinks(y,l,k,c),this.query.queryLayoutOptions.hideEditButton||this.addEditButton(y,l),!this.query.queryLayoutOptions.hidePostponeButton&&mv(l)&&this.addPostponeButton(y,l,k),i.appendChild(f)}n.appendChild(i)})}addEditButton(t,n){t.createEl("a",{cls:"tasks-edit"}).onClickEvent(i=>{i.preventDefault();let a=u=>L(this,null,function*(){yield ci({originalTask:n,newTasks:bt.removeInferredStatusIfNeeded(n,u)})});new On({app:this.app,task:n,onSubmit:a}).open()})}addUrgency(t,n){let s=new Intl.NumberFormat().format(n.urgency);t.createSpan({text:s,cls:"tasks-urgency"})}addAllTaskGroups(t,n){return L(this,null,function*(){for(let s of t.groups)yield this.addGroupHeadings(n,s.groupHeadings),yield this.createTaskList(s.tasks,n)})}addGroupHeadings(t,n){return L(this,null,function*(){for(let s of n)yield this.addGroupHeading(t,s)})}addGroupHeading(t,n){return L(this,null,function*(){let s="h6";n.nestingLevel===0?s="h4":n.nestingLevel===1&&(s="h5");let i=t.createEl(s,{cls:"tasks-group-heading"});yield fi.MarkdownRenderer.renderMarkdown(n.displayName,i,this.filePath,this)})}addBacklinks(t,n,s,i){var c;let a=t.createSpan({cls:"tasks-backlink"});s||a.append(" (");let o=a.createEl("a");o.rel="noopener",o.target="_blank",o.addClass("internal-link"),s&&o.addClass("internal-link-short-mode");let u;s?u=" \u{1F517}":u=(c=n.getLinkText({isFilenameUnique:i}))!=null?c:"",o.setText(u);let l=this.app.vault;o.addEventListener("click",f=>L(this,null,function*(){let m=yield em(n,l);if(m){let[y,k]=m,E=this.app.workspace.getLeaf(fi.Keymap.isModEvent(f));f.preventDefault(),yield E.openFile(k,{eState:{line:y}})}})),o.addEventListener("mousedown",f=>L(this,null,function*(){if(f.button===1){let m=yield em(n,l);if(m){let[y,k]=m,E=this.app.workspace.getLeaf("tab");f.preventDefault(),yield E.openFile(k,{eState:{line:y}})}}})),s||a.append(")")}addPostponeButton(t,n,s){let a="day",o=Tv(n,1,a),u=t.createEl("button",{attr:{id:"postpone-button",title:o}}),l=s?["tasks-postpone","tasks-postpone-short-mode"]:["tasks-postpone"];u.addClasses(l),u.setText(" \u23E9"),u.addEventListener("click",c=>{c.preventDefault(),In.postponeOnClickCallback(u,n,1,a)}),u.addEventListener("contextmenu",c=>L(this,null,function*(){c.stopPropagation(),new In(u,n).showAtPosition({x:c.clientX,y:c.clientY})}))}addTaskCount(t,n){this.query.queryLayoutOptions.hideTaskCount||t.createDiv({text:n.totalTasksCountDisplayText(),cls:"tasks-count"})}isFilenameUnique({task:t}){let n=t.path.match(/([^/]*)\..+$/i);if(n===null)return;let s=n[1];return this.app.vault.getMarkdownFiles().filter(a=>{if(a.basename===s)return!0}).length<2}getGroupingAttribute(){let t=[];for(let n of this.query.grouping)t.push(n.property);return t.join(",")}};var _e=require("obsidian");var ul=class{constructor(e){this._markdown="";this.columnNames=e,this.addTitleRow()}get markdown(){return this._markdown}addTitleRow(){let e="|",t="|";this.columnNames.forEach(n=>{e+=` ${n} |`,t+=" ----- |"}),this._markdown+=`${e} `,this._markdown+=`${t} `}addRow(e){let t=this.makeRowText(e);this._markdown+=`${t} `}addRowIfNew(e){let t=this.makeRowText(e);this._markdown.includes(t)||(this._markdown+=`${t} -`)}makeRowText(e){let t="|";return e.forEach(n=>{t+=` ${n} |`}),t}};function j_(r,e){return r.findIndex(t=>t.symbol===e)}function KA(r,e){let t=X.getTypeForUnknownSymbol(r.symbol);r.type!==t&&(t==="TODO"&&r.symbol!==" "||e.push(`For information, the conventional type for status symbol ${Rr(r.symbol)} is ${Rr(t)}: you may wish to review this type.`))}function QA(r,e,t){let n=j_(r,e.nextStatusSymbol);if(n===-1){t.push(`Next symbol ${Rr(e.nextStatusSymbol)} is unknown: create a status with symbol ${Rr(e.nextStatusSymbol)}.`);return}if(e.type!=="DONE")return;let i=r[n];if(i){if(i.type!=="TODO"&&i.type!=="IN_PROGRESS"){let s="https://publish.obsidian.md/tasks/Getting+Started/Statuses/Recurring+Tasks+and+Custom+Statuses";t.push(`This \`DONE\` status is followed by ${Rr(i.type)}, not \`TODO\` or \`IN_PROGRESS\`: this will not work well for recurring tasks. See [Recurring Tasks and Custom Statuses](${s}).`)}}else t.push("Unexpected failure to find the next status.")}function XA(r,e,t){let n=[];return e.symbol===X.EMPTY.symbol?(n.push("Empty symbol: this status will be ignored."),n):j_(r,e.symbol)!=t?(n.push(`Duplicate symbol '${Rr(e.symbol)}': this status will be ignored.`),n):(KA(e,n),QA(r,e,n),n)}function G_(r){let e=new $u(["Status Symbol","Next Status Symbol","Status Name","Status Type","Problems (if any)"]),t=Pe.allStatuses(r);return t.forEach((n,i)=>{e.addRow([Rr(n.symbol),Rr(n.nextStatusSymbol),n.name,Rr(n.type),XA(t,n,i).join("
")])}),e.markdown}function B_(r,e,t,n){let s=G_(r),a=e.mermaidDiagram(!0);return`# ${t} +`)}makeRowText(e){let t="|";return e.forEach(n=>{t+=` ${n} |`}),t}};function vv(r,e){return r.findIndex(t=>t.symbol===e)}function RP(r,e){let t=Q.getTypeForUnknownSymbol(r.symbol);r.type!==t&&(t==="TODO"&&r.symbol!==" "||e.push(`For information, the conventional type for status symbol ${Fr(r.symbol)} is ${Fr(t)}: you may wish to review this type.`))}function MP(r,e,t){let n=vv(r,e.nextStatusSymbol);if(n===-1){t.push(`Next symbol ${Fr(e.nextStatusSymbol)} is unknown: create a status with symbol ${Fr(e.nextStatusSymbol)}.`);return}if(e.type!=="DONE")return;let s=r[n];if(s){if(s.type!=="TODO"&&s.type!=="IN_PROGRESS"){let i="https://publish.obsidian.md/tasks/Getting+Started/Statuses/Recurring+Tasks+and+Custom+Statuses",a=[`This \`DONE\` status is followed by ${Fr(s.type)}, not \`TODO\` or \`IN_PROGRESS\`.`,"If used to complete a recurring task, it will instead be followed by `TODO` or `IN_PROGRESS`, to ensure the next task matches the `not done` filter.",`See [Recurring Tasks and Custom Statuses](${i}).`].join("
");t.push(a)}}else t.push("Unexpected failure to find the next status.")}function CP(r,e,t){let n=[];return e.symbol===Q.EMPTY.symbol?(n.push("Empty symbol: this status will be ignored."),n):vv(r,e.symbol)!=t?(n.push(`Duplicate symbol '${Fr(e.symbol)}': this status will be ignored.`),n):(RP(e,n),MP(r,e,n),n)}function wv(r){let e=new ul(["Status Symbol","Next Status Symbol","Status Name","Status Type","Problems (if any)"]),t=Ne.allStatuses(r);return t.forEach((n,s)=>{e.addRow([Fr(n.symbol),Fr(n.nextStatusSymbol),n.name,Fr(n.type),CP(t,n,s).join("
")])}),e.markdown}function Ev(r,e,t,n){let i=wv(r),a=e.mermaidDiagram(!0);return`# ${t} ## About this file @@ -316,20 +321,20 @@ Obsidian may only render the table correctly in Reading Mode. These are the status values in the Core and Custom statuses sections. -${s} +${i} ## Loaded Settings These are the settings actually used by Tasks. -${a}`}function Rr(r){return r===""?r:"`"+(r!==" "?r:"space")+"`"}function H_(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],[">","Rescheduled","x","TODO"],["<","Scheduled","x","TODO"],["!","Important","x","TODO"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],["?","Question","x","TODO"],["*","Star","x","TODO"],["n","Note","x","TODO"],["l","Location","x","TODO"],["i","Information","x","TODO"],["I","Idea","x","TODO"],["S","Amount","x","TODO"],["p","Pro","x","TODO"],["c","Con","x","TODO"],["b","Bookmark","x","TODO"],['"',"Quote","x","TODO"],["0","Speech bubble 0","0","NON_TASK"],["1","Speech bubble 1","1","NON_TASK"],["2","Speech bubble 2","2","NON_TASK"],["3","Speech bubble 3","3","NON_TASK"],["4","Speech bubble 4","4","NON_TASK"],["5","Speech bubble 5","5","NON_TASK"],["6","Speech bubble 6","6","NON_TASK"],["7","Speech bubble 7","7","NON_TASK"],["8","Speech bubble 8","8","NON_TASK"],["9","Speech bubble 9","9","NON_TASK"]]}function z_(){return[[" ","incomplete","x","TODO"],["x","complete / done"," ","DONE"],["-","cancelled"," ","CANCELLED"],[">","deferred","x","TODO"],["/","in progress, or half-done","x","IN_PROGRESS"],["!","Important","x","TODO"],["?","question","x","TODO"],["R","review","x","TODO"],["+","Inbox / task that should be processed later","x","TODO"],["b","bookmark","x","TODO"],["B","brainstorm","x","TODO"],["D","deferred or scheduled","x","TODO"],["I","Info","x","TODO"],["i","idea","x","TODO"],["N","note","x","TODO"],["Q","quote","x","TODO"],["W","win / success / reward","x","TODO"],["P","pro","x","TODO"],["C","con","x","TODO"]]}function V_(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],[">","Deferred","x","TODO"],["!","Important","x","TODO"],["?","Question","x","TODO"],["r","Review","x","TODO"]]}function K_(){return[[" ","Unchecked","x","TODO"],["x","Regular"," ","DONE"],["X","Checked"," ","DONE"],["-","Dropped"," ","CANCELLED"],[">","Forward","x","TODO"],["D","Date","x","TODO"],["?","Question","x","TODO"],["/","Half Done","x","IN_PROGRESS"],["+","Add","x","TODO"],["R","Research","x","TODO"],["!","Important","x","TODO"],["i","Idea","x","TODO"],["B","Brainstorm","x","TODO"],["P","Pro","x","TODO"],["C","Con","x","TODO"],["Q","Quote","x","TODO"],["N","Note","x","TODO"],["b","Bookmark","x","TODO"],["I","Information","x","TODO"],["p","Paraphrase","x","TODO"],["L","Location","x","TODO"],["E","Example","x","TODO"],["A","Answer","x","TODO"],["r","Reward","x","TODO"],["c","Choice","x","TODO"],["d","Doing","x","IN_PROGRESS"],["T","Time","x","TODO"],["@","Character / Person","x","TODO"],["t","Talk","x","TODO"],["O","Outline / Plot","x","TODO"],["~","Conflict","x","TODO"],["W","World","x","TODO"],["f","Clue / Find","x","TODO"],["F","Foreshadow","x","TODO"],["H","Favorite / Health","x","TODO"],["&","Symbolism","x","TODO"],["s","Secret","x","TODO"]]}function Q_(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],[">","Rescheduled","x","TODO"],["<","Scheduled","x","TODO"],["!","Important","x","TODO"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],["?","Question","x","TODO"],["*","Star","x","TODO"],["n","Note","x","TODO"],["l","Location","x","TODO"],["i","Information","x","TODO"],["I","Idea","x","TODO"],["S","Amount","x","TODO"],["p","Pro","x","TODO"],["c","Con","x","TODO"],["b","Bookmark","x","TODO"],["f","Fire","x","TODO"],["k","Key","x","TODO"],["w","Win","x","TODO"],["u","Up","x","TODO"],["d","Down","x","TODO"]]}function X_(){return[[" ","to-do","x","TODO"],["/","incomplete","x","IN_PROGRESS"],["x","done"," ","DONE"],["-","canceled"," ","CANCELLED"],[">","forwarded","x","TODO"],["<","scheduling","x","TODO"],["?","question","x","TODO"],["!","important","x","TODO"],["*","star","x","TODO"],['"',"quote","x","TODO"],["l","location","x","TODO"],["b","bookmark","x","TODO"],["i","information","x","TODO"],["S","savings","x","TODO"],["I","idea","x","TODO"],["p","pros","x","TODO"],["c","cons","x","TODO"],["f","fire","x","TODO"],["k","key","x","TODO"],["w","win","x","TODO"],["u","up","x","TODO"],["d","down","x","TODO"]]}function Z_(){return[[" ","to-do","x","TODO"],["/","incomplete","x","IN_PROGRESS"],["x","done"," ","DONE"],["-","canceled"," ","CANCELLED"],[">","forwarded","x","TODO"],["<","scheduling","x","TODO"],["?","question","x","TODO"],["!","important","x","TODO"],["*","star","x","TODO"],['"',"quote","x","TODO"],["l","location","x","TODO"],["b","bookmark","x","TODO"],["i","information","x","TODO"],["S","savings","x","TODO"],["I","idea","x","TODO"],["p","pros","x","TODO"],["c","cons","x","TODO"],["f","fire","x","TODO"],["k","key","x","TODO"],["w","win","x","TODO"],["u","up","x","TODO"],["d","down","x","TODO"]]}var J_=[{text:"Core Statuses",level:"h3",class:"",open:!0,notice:{class:"setting-item-description",text:null,html:"

These are the core statuses that Tasks supports natively, with no need for custom CSS styling or theming.

You can add edit and add your own custom statuses in the section below.

"},settings:[{name:"",description:"",type:"function",initialValue:"",placeholder:"",settingName:"insertTaskCoreStatusSettings",featureFlag:"",notice:null}]},{text:"Custom Statuses",level:"h3",class:"",open:!0,notice:{class:"setting-item-description",text:null,html:`

You should first select and install a CSS Snippet or Theme to style custom checkboxes.

Then, use the buttons below to set up your custom statuses, to match your chosen CSS checkboxes.

Note Any statuses with the same symbol as any earlier statuses will be ignored. You can confirm the actually loaded statuses by running the 'Create or edit task' command and looking at the Status drop-down.

See the documentation to get started!

`},settings:[{name:"",description:"",type:"function",initialValue:"",placeholder:"",settingName:"insertCustomTaskStatusSettings",featureFlag:"",notice:null}]}];var hr=require("obsidian");var ri=class{validate(e){let t=[];return t.push(...this.validateSymbol(e)),t.push(...this.validateName(e)),t.push(...this.validateNextSymbol(e)),t}validateStatusCollectionEntry(e){let[t,n,i,s]=e,a=[];if(a.push(...this.validateType(s)),t===i&&s!=="NON_TASK"&&a.push(`Status symbol '${t}' toggles to itself`),a.length>0)return a;let o=X.createFromImportedValue(e).configuration;return a.push(...this.validateSymbolTypeConventions(o)),a.push(...this.validate(o)),a}validateSymbol(e){return ri.validateOneSymbol(e.symbol,"Task Status Symbol")}validateNextSymbol(e){return ri.validateOneSymbol(e.nextStatusSymbol,"Task Next Status Symbol")}validateName(e){let t=[];return e.name.length===0&&t.push("Task Status Name cannot be empty."),t}validateType(e){let t=Lt[e],n=[];return t||n.push(`Status Type "${e}" is not a valid type`),t=="EMPTY"&&n.push('Status Type "EMPTY" is not permitted in user data'),n}validateSymbolTypeConventions(e){let t=[],n=e.symbol,i=new ve,s=n==="X"?"x":n,a=i.bySymbol(s);return a.type!=="EMPTY"&&(e.nextStatusSymbol!==a.nextStatusSymbol&&t.push(`Next Status Symbol for symbol '${n}': '${e.nextStatusSymbol}' is inconsistent with convention '${a.nextStatusSymbol}'`),e.type!==a.type&&t.push(`Status Type for symbol '${n}': '${e.type}' is inconsistent with convention '${a.type}'`)),t}static validateOneSymbol(e,t){let n=[];return e.length===0&&n.push(`${t} cannot be empty.`),e.length>1&&n.push(`${t} ("${e}") must be a single character.`),n}};var ni=new ri,$t=class extends hr.Modal{constructor(t,n,i){super(t.app);this.plugin=t;this.saved=!1;this.error=!1;this.statusSymbol=n.symbol,this.statusName=n.name,this.statusNextSymbol=n.nextStatusSymbol,this.statusAvailableAsCommand=n.availableAsCommand,this.type=n.type,this.isCoreStatus=i}statusConfiguration(){return new He(this.statusSymbol,this.statusName,this.statusNextSymbol,this.statusAvailableAsCommand,this.type)}display(){return F(this,null,function*(){let{contentEl:t}=this;t.empty();let n=t.createDiv(),i;new hr.Setting(n).setName("Task Status Symbol").setDesc("This is the character between the square braces. (It can only be edited for Custom statuses, and not Core statuses.)").addText(l=>{i=l,l.setValue(this.statusSymbol).onChange(c=>{this.statusSymbol=c,$t.setValid(l,ni.validateSymbol(this.statusConfiguration()))})}).setDisabled(this.isCoreStatus).then(l=>{$t.setValid(i,ni.validateSymbol(this.statusConfiguration()))});let s;new hr.Setting(n).setName("Task Status Name").setDesc("This is the friendly name of the task status.").addText(l=>{s=l,l.setValue(this.statusName).onChange(c=>{this.statusName=c,$t.setValid(l,ni.validateName(this.statusConfiguration()))})}).then(l=>{$t.setValid(s,ni.validateName(this.statusConfiguration()))});let a;new hr.Setting(n).setName("Task Next Status Symbol").setDesc("When clicked on this is the symbol that should be used next.").addText(l=>{a=l,l.setValue(this.statusNextSymbol).onChange(c=>{this.statusNextSymbol=c,$t.setValid(l,ni.validateNextSymbol(this.statusConfiguration()))})}).then(l=>{$t.setValid(a,ni.validateNextSymbol(this.statusConfiguration()))}),new hr.Setting(n).setName("Task Status Type").setDesc("Control how the status behaves for searching and toggling.").addDropdown(l=>{["TODO","IN_PROGRESS","DONE","CANCELLED","NON_TASK"].forEach(f=>{l.addOption(f,f)}),l.setValue(this.type).onChange(f=>{this.type=X.getTypeFromStatusTypeString(f)})}),X.tasksPluginCanCreateCommandsForStatuses()&&new hr.Setting(n).setName("Available as command").setDesc("If enabled this status will be available as a command so you can assign a hotkey and toggle the status using it.").addToggle(l=>{l.setValue(this.statusAvailableAsCommand).onChange(c=>F(this,null,function*(){this.statusAvailableAsCommand=c}))});let o=t.createDiv(),u=new hr.Setting(o);u.addButton(l=>(l.setTooltip("Save").setIcon("checkmark").onClick(()=>F(this,null,function*(){let c=ni.validate(this.statusConfiguration());if(c.length>0){let f=c.join(` +${a}`}function Fr(r){return r===""?r:"`"+(r!==" "?r:"space")+"`"}function kv(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],[">","Rescheduled","x","TODO"],["<","Scheduled","x","TODO"],["!","Important","x","TODO"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],["?","Question","x","TODO"],["*","Star","x","TODO"],["n","Note","x","TODO"],["l","Location","x","TODO"],["i","Information","x","TODO"],["I","Idea","x","TODO"],["S","Amount","x","TODO"],["p","Pro","x","TODO"],["c","Con","x","TODO"],["b","Bookmark","x","TODO"],['"',"Quote","x","TODO"],["0","Speech bubble 0","0","NON_TASK"],["1","Speech bubble 1","1","NON_TASK"],["2","Speech bubble 2","2","NON_TASK"],["3","Speech bubble 3","3","NON_TASK"],["4","Speech bubble 4","4","NON_TASK"],["5","Speech bubble 5","5","NON_TASK"],["6","Speech bubble 6","6","NON_TASK"],["7","Speech bubble 7","7","NON_TASK"],["8","Speech bubble 8","8","NON_TASK"],["9","Speech bubble 9","9","NON_TASK"]]}function Sv(){return[[" ","incomplete","x","TODO"],["x","complete / done"," ","DONE"],["-","cancelled"," ","CANCELLED"],[">","deferred","x","TODO"],["/","in progress, or half-done","x","IN_PROGRESS"],["!","Important","x","TODO"],["?","question","x","TODO"],["R","review","x","TODO"],["+","Inbox / task that should be processed later","x","TODO"],["b","bookmark","x","TODO"],["B","brainstorm","x","TODO"],["D","deferred or scheduled","x","TODO"],["I","Info","x","TODO"],["i","idea","x","TODO"],["N","note","x","TODO"],["Q","quote","x","TODO"],["W","win / success / reward","x","TODO"],["P","pro","x","TODO"],["C","con","x","TODO"]]}function Ov(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],[">","Deferred","x","TODO"],["!","Important","x","TODO"],["?","Question","x","TODO"],["r","Review","x","TODO"]]}function Dv(){return[[" ","Unchecked","x","TODO"],["x","Regular"," ","DONE"],["X","Checked"," ","DONE"],["-","Dropped"," ","CANCELLED"],[">","Forward","x","TODO"],["D","Date","x","TODO"],["?","Question","x","TODO"],["/","Half Done","x","IN_PROGRESS"],["+","Add","x","TODO"],["R","Research","x","TODO"],["!","Important","x","TODO"],["i","Idea","x","TODO"],["B","Brainstorm","x","TODO"],["P","Pro","x","TODO"],["C","Con","x","TODO"],["Q","Quote","x","TODO"],["N","Note","x","TODO"],["b","Bookmark","x","TODO"],["I","Information","x","TODO"],["p","Paraphrase","x","TODO"],["L","Location","x","TODO"],["E","Example","x","TODO"],["A","Answer","x","TODO"],["r","Reward","x","TODO"],["c","Choice","x","TODO"],["d","Doing","x","IN_PROGRESS"],["T","Time","x","TODO"],["@","Character / Person","x","TODO"],["t","Talk","x","TODO"],["O","Outline / Plot","x","TODO"],["~","Conflict","x","TODO"],["W","World","x","TODO"],["f","Clue / Find","x","TODO"],["F","Foreshadow","x","TODO"],["H","Favorite / Health","x","TODO"],["&","Symbolism","x","TODO"],["s","Secret","x","TODO"]]}function xv(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],[">","Rescheduled","x","TODO"],["<","Scheduled","x","TODO"],["!","Important","x","TODO"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],["?","Question","x","TODO"],["*","Star","x","TODO"],["n","Note","x","TODO"],["l","Location","x","TODO"],["i","Information","x","TODO"],["I","Idea","x","TODO"],["S","Amount","x","TODO"],["p","Pro","x","TODO"],["c","Con","x","TODO"],["b","Bookmark","x","TODO"],["f","Fire","x","TODO"],["k","Key","x","TODO"],["w","Win","x","TODO"],["u","Up","x","TODO"],["d","Down","x","TODO"]]}function Rv(){return[[" ","to-do","x","TODO"],["/","incomplete","x","IN_PROGRESS"],["x","done"," ","DONE"],["-","canceled"," ","CANCELLED"],[">","forwarded","x","TODO"],["<","scheduling","x","TODO"],["?","question","x","TODO"],["!","important","x","TODO"],["*","star","x","TODO"],['"',"quote","x","TODO"],["l","location","x","TODO"],["b","bookmark","x","TODO"],["i","information","x","TODO"],["S","savings","x","TODO"],["I","idea","x","TODO"],["p","pros","x","TODO"],["c","cons","x","TODO"],["f","fire","x","TODO"],["k","key","x","TODO"],["w","win","x","TODO"],["u","up","x","TODO"],["d","down","x","TODO"]]}function Mv(){return[[" ","to-do","x","TODO"],["/","incomplete","x","IN_PROGRESS"],["x","done"," ","DONE"],["-","canceled"," ","CANCELLED"],[">","forwarded","x","TODO"],["<","scheduling","x","TODO"],["?","question","x","TODO"],["!","important","x","TODO"],["*","star","x","TODO"],['"',"quote","x","TODO"],["l","location","x","TODO"],["b","bookmark","x","TODO"],["i","information","x","TODO"],["S","savings","x","TODO"],["I","idea","x","TODO"],["p","pros","x","TODO"],["c","cons","x","TODO"],["f","fire","x","TODO"],["k","key","x","TODO"],["w","win","x","TODO"],["u","up","x","TODO"],["d","down","x","TODO"]]}var Cv=[{text:"Core Statuses",level:"h3",class:"",open:!0,notice:{class:"setting-item-description",text:null,html:"

These are the core statuses that Tasks supports natively, with no need for custom CSS styling or theming.

You can add edit and add your own custom statuses in the section below.

"},settings:[{name:"",description:"",type:"function",initialValue:"",placeholder:"",settingName:"insertTaskCoreStatusSettings",featureFlag:"",notice:null}]},{text:"Custom Statuses",level:"h3",class:"",open:!0,notice:{class:"setting-item-description",text:null,html:`

You should first select and install a CSS Snippet or Theme to style custom checkboxes.

Then, use the buttons below to set up your custom statuses, to match your chosen CSS checkboxes.

Note Any statuses with the same symbol as any earlier statuses will be ignored. You can confirm the actually loaded statuses by running the 'Create or edit task' command and looking at the Status drop-down.

See the documentation to get started!

`},settings:[{name:"",description:"",type:"function",initialValue:"",placeholder:"",settingName:"insertCustomTaskStatusSettings",featureFlag:"",notice:null}]}];var br=require("obsidian");var fs=class{validate(e){let t=[];return t.push(...this.validateSymbol(e)),t.push(...this.validateName(e)),t.push(...this.validateNextSymbol(e)),t}validateStatusCollectionEntry(e){let[t,n,s,i]=e,a=[];if(a.push(...this.validateType(i)),t===s&&i!=="NON_TASK"&&a.push(`Status symbol '${t}' toggles to itself`),a.length>0)return a;let o=Q.createFromImportedValue(e).configuration;return a.push(...this.validateSymbolTypeConventions(o)),a.push(...this.validate(o)),a}validateSymbol(e){return fs.validateOneSymbol(e.symbol,"Task Status Symbol")}validateNextSymbol(e){return fs.validateOneSymbol(e.nextStatusSymbol,"Task Next Status Symbol")}validateName(e){let t=[];return e.name.length===0&&t.push("Task Status Name cannot be empty."),t}validateType(e){let t=jt[e],n=[];return t||n.push(`Status Type "${e}" is not a valid type`),t=="EMPTY"&&n.push('Status Type "EMPTY" is not permitted in user data'),n}validateSymbolTypeConventions(e){let t=[],n=e.symbol,s=new Ee,i=n==="X"?"x":n,a=s.bySymbol(i);return a.type!=="EMPTY"&&(e.nextStatusSymbol!==a.nextStatusSymbol&&t.push(`Next Status Symbol for symbol '${n}': '${e.nextStatusSymbol}' is inconsistent with convention '${a.nextStatusSymbol}'`),e.type!==a.type&&t.push(`Status Type for symbol '${n}': '${e.type}' is inconsistent with convention '${a.type}'`)),t}static validateOneSymbol(e,t){let n=[];return e.length===0&&n.push(`${t} cannot be empty.`),e.length>1&&n.push(`${t} ("${e}") must be a single character.`),n}};var ps=new fs,zt=class extends br.Modal{constructor(t,n,s){super(t.app);this.plugin=t;this.saved=!1;this.error=!1;this.statusSymbol=n.symbol,this.statusName=n.name,this.statusNextSymbol=n.nextStatusSymbol,this.statusAvailableAsCommand=n.availableAsCommand,this.type=n.type,this.isCoreStatus=s}statusConfiguration(){return new Ve(this.statusSymbol,this.statusName,this.statusNextSymbol,this.statusAvailableAsCommand,this.type)}display(){return L(this,null,function*(){let{contentEl:t}=this;t.empty();let n=t.createDiv(),s;new br.Setting(n).setName("Task Status Symbol").setDesc("This is the character between the square braces. (It can only be edited for Custom statuses, and not Core statuses.)").addText(l=>{s=l,l.setValue(this.statusSymbol).onChange(c=>{this.statusSymbol=c,zt.setValid(l,ps.validateSymbol(this.statusConfiguration()))})}).setDisabled(this.isCoreStatus).then(l=>{zt.setValid(s,ps.validateSymbol(this.statusConfiguration()))});let i;new br.Setting(n).setName("Task Status Name").setDesc("This is the friendly name of the task status.").addText(l=>{i=l,l.setValue(this.statusName).onChange(c=>{this.statusName=c,zt.setValid(l,ps.validateName(this.statusConfiguration()))})}).then(l=>{zt.setValid(i,ps.validateName(this.statusConfiguration()))});let a;new br.Setting(n).setName("Task Next Status Symbol").setDesc("When clicked on this is the symbol that should be used next.").addText(l=>{a=l,l.setValue(this.statusNextSymbol).onChange(c=>{this.statusNextSymbol=c,zt.setValid(l,ps.validateNextSymbol(this.statusConfiguration()))})}).then(l=>{zt.setValid(a,ps.validateNextSymbol(this.statusConfiguration()))}),new br.Setting(n).setName("Task Status Type").setDesc("Control how the status behaves for searching and toggling.").addDropdown(l=>{["TODO","IN_PROGRESS","DONE","CANCELLED","NON_TASK"].forEach(f=>{l.addOption(f,f)}),l.setValue(this.type).onChange(f=>{this.type=Q.getTypeFromStatusTypeString(f)})}),Q.tasksPluginCanCreateCommandsForStatuses()&&new br.Setting(n).setName("Available as command").setDesc("If enabled this status will be available as a command so you can assign a hotkey and toggle the status using it.").addToggle(l=>{l.setValue(this.statusAvailableAsCommand).onChange(c=>L(this,null,function*(){this.statusAvailableAsCommand=c}))});let o=t.createDiv(),u=new br.Setting(o);u.addButton(l=>(l.setTooltip("Save").setIcon("checkmark").onClick(()=>L(this,null,function*(){let c=ps.validate(this.statusConfiguration());if(c.length>0){let f=c.join(` `)+` -Fix errors before saving.`;new hr.Notice(f);return}this.saved=!0,this.close()})),l)),u.addExtraButton(l=>(l.setIcon("cross").setTooltip("Cancel").onClick(()=>{this.saved=!1,this.close()}),l))})}onOpen(){this.display()}static setValidationError(t){t.inputEl.addClass("tasks-settings-is-invalid")}static removeValidationError(t){t.inputEl.removeClass("tasks-settings-is-invalid")}static setValid(t,n){n.length===0?$t.removeValidationError(t):$t.setValidationError(t)}};var Yt=class extends be.PluginSettingTab{constructor({plugin:t}){super(t.app,t);this.customFunctions={insertTaskCoreStatusSettings:this.insertTaskCoreStatusSettings.bind(this),insertCustomTaskStatusSettings:this.insertCustomTaskStatusSettings.bind(this)};this.plugin=t}saveSettings(t){return F(this,null,function*(){yield this.plugin.saveSettings(),t&&this.display()})}display(){let{containerEl:t}=this;t.empty(),this.containerEl.addClass("tasks-settings"),t.createEl("h3",{text:"Tasks Settings"}),t.createEl("p",{cls:"tasks-setting-important",text:"Changing any settings requires a restart of obsidian."}),t.createEl("h4",{text:"Task Format Settings"}),new be.Setting(t).setName("Task Format").setDesc(Yt.createFragmentWithHTML('

The format that Tasks uses to read and write tasks.

Important: Tasks currently only supports one format at a time. Selecting Dataview will currently stop Tasks reading its own emoji signifiers.

See the documentation.

')).addDropdown(i=>{for(let s of Object.keys(Hr))i.addOption(s,Hr[s].displayName);i.setValue(Q().taskFormat).onChange(s=>F(this,null,function*(){tt({taskFormat:s}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Global filter Settings"}),new be.Setting(t).setName("Global task filter").setDesc(Yt.createFragmentWithHTML('

Recommended: Leave empty if you want all checklist items in your vault to be tasks managed by this plugin.

Use a global filter if you want Tasks to only act on a subset of your "- [ ]" checklist items, so that a checklist item must include the specified string in its description in order to be considered a task.

For example, if you set the global filter to #task, the Tasks plugin will only handle checklist items tagged with #task.
Other checklist items will remain normal checklist items and not appear in queries or get a done date set.

See the documentation.

')).addText(i=>{i.setPlaceholder("e.g. #task or TODO").setValue(ge.getInstance().get()).onChange(s=>F(this,null,function*(){tt({globalFilter:s}),ge.getInstance().set(s),yield this.plugin.saveSettings()}))}),new be.Setting(t).setName("Remove global filter from description").setDesc("Enabling this removes the string that you set as global filter from the task description when displaying a task.").addToggle(i=>{let s=Q();i.setValue(s.removeGlobalFilter).onChange(a=>F(this,null,function*(){tt({removeGlobalFilter:a}),ge.getInstance().setRemoveGlobalFilter(a),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Global Query"}),tP(new be.Setting(t).setDesc(Yt.createFragmentWithHTML('

A query that is automatically included at the start of every Tasks block in the vault. Useful for adding default filters, or layout options.

See the documentation.

')).addTextArea(i=>{let s=Q();i.inputEl.rows=4,i.setPlaceholder(`# For example... +Fix errors before saving.`;new br.Notice(f);return}this.saved=!0,this.close()})),l)),u.addExtraButton(l=>(l.setIcon("cross").setTooltip("Cancel").onClick(()=>{this.saved=!1,this.close()}),l))})}onOpen(){this.display()}static setValidationError(t){t.inputEl.addClass("tasks-settings-is-invalid")}static removeValidationError(t){t.inputEl.removeClass("tasks-settings-is-invalid")}static setValid(t,n){n.length===0?zt.removeValidationError(t):zt.setValidationError(t)}};var It=class extends _e.PluginSettingTab{constructor({plugin:t}){super(t.app,t);this.customFunctions={insertTaskCoreStatusSettings:this.insertTaskCoreStatusSettings.bind(this),insertCustomTaskStatusSettings:this.insertCustomTaskStatusSettings.bind(this)};this.plugin=t}saveSettings(t){return L(this,null,function*(){yield this.plugin.saveSettings(),t&&this.display()})}display(){let{containerEl:t}=this;t.empty(),this.containerEl.addClass("tasks-settings"),t.createEl("h3",{text:"Tasks Settings"}),t.createEl("p",{cls:"tasks-setting-important",text:"Changing any settings requires a restart of obsidian."}),t.createEl("h4",{text:"Task Format Settings"}),new _e.Setting(t).setName("Task Format").setDesc(It.createFragmentWithHTML('

The format that Tasks uses to read and write tasks.

Important: Tasks currently only supports one format at a time. Selecting Dataview will currently stop Tasks reading its own emoji signifiers.

See the documentation.

')).addDropdown(s=>{for(let i of Object.keys(Jr))s.addOption(i,Jr[i].displayName);s.setValue(K().taskFormat).onChange(i=>L(this,null,function*(){Ke({taskFormat:i}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Global filter Settings"}),new _e.Setting(t).setName("Global task filter").setDesc(It.createFragmentWithHTML('

Recommended: Leave empty if you want all checklist items in your vault to be tasks managed by this plugin.

Use a global filter if you want Tasks to only act on a subset of your "- [ ]" checklist items, so that a checklist item must include the specified string in its description in order to be considered a task.

For example, if you set the global filter to #task, the Tasks plugin will only handle checklist items tagged with #task.
Other checklist items will remain normal checklist items and not appear in queries or get a done date set.

See the documentation.

')).addText(s=>{s.setPlaceholder("e.g. #task or TODO").setValue(ye.getInstance().get()).onChange(i=>L(this,null,function*(){Ke({globalFilter:i}),ye.getInstance().set(i),yield this.plugin.saveSettings()}))}),new _e.Setting(t).setName("Remove global filter from description").setDesc("Enabling this removes the string that you set as global filter from the task description when displaying a task.").addToggle(s=>{let i=K();s.setValue(i.removeGlobalFilter).onChange(a=>L(this,null,function*(){Ke({removeGlobalFilter:a}),ye.getInstance().setRemoveGlobalFilter(a),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Global Query"}),IP(new _e.Setting(t).setDesc(It.createFragmentWithHTML('

A query that is automatically included at the start of every Tasks block in the vault. Useful for adding default filters, or layout options.

See the documentation.

')).addTextArea(s=>{let i=K();s.inputEl.rows=4,s.setPlaceholder(`# For example... path does not include _templates/ limit 300 -show urgency`).setValue(s.globalQuery).onChange(a=>F(this,null,function*(){tt({globalQuery:a}),tr.getInstance().set(a),yield this.plugin.saveSettings()}))})),t.createEl("h4",{text:"Task Statuses"});let{headingOpened:n}=Q();J_.forEach(i=>{this.addOneSettingsBlock(t,i,n)}),t.createEl("h4",{text:"Date Settings"}),new be.Setting(t).setName("Set created date on every added task").setDesc(Yt.createFragmentWithHTML(`Enabling this will add a timestamp \u2795 YYYY-MM-DD before other date values, when a task is created with 'Create or edit task', or by completing a recurring task.

See the documentation.

`)).addToggle(i=>{let s=Q();i.setValue(s.setCreatedDate).onChange(a=>F(this,null,function*(){tt({setCreatedDate:a}),yield this.plugin.saveSettings()}))}),new be.Setting(t).setName("Set done date on every completed task").setDesc(Yt.createFragmentWithHTML('Enabling this will add a timestamp \u2705 YYYY-MM-DD at the end when a task is toggled to done.

See the documentation.

')).addToggle(i=>{let s=Q();i.setValue(s.setDoneDate).onChange(a=>F(this,null,function*(){tt({setDoneDate:a}),yield this.plugin.saveSettings()}))}),new be.Setting(t).setName("Use filename as Scheduled date for undated tasks").setDesc(Yt.createFragmentWithHTML('Save time entering Scheduled (\u23F3) dates.
If this option is enabled, any undated tasks will be given a default Scheduled date extracted from their file name.
The date in the file name must be in one of YYYY-MM-DD or YYYYMMDD formats.
Undated tasks have none of Due (\u{1F4C5} ), Scheduled (\u23F3) and Start (\u{1F6EB}) dates.

See the documentation.

')).addToggle(i=>{let s=Q();i.setValue(s.useFilenameAsScheduledDate).onChange(a=>F(this,null,function*(){tt({useFilenameAsScheduledDate:a}),yield this.plugin.saveSettings()}))}),new be.Setting(t).setName("Folders with default Scheduled dates").setDesc("Leave empty if you want to use default Scheduled dates everywhere, or enter a comma-separated list of folders.").addText(i=>F(this,null,function*(){let s=Q();yield this.plugin.saveSettings(),i.setValue(Yt.renderFolderArray(s.filenameAsDateFolders)).onChange(a=>F(this,null,function*(){let o=Yt.parseCommaSeparatedFolders(a);tt({filenameAsDateFolders:o}),yield this.plugin.saveSettings()}))})),t.createEl("h4",{text:"Recurring task Settings"}),new be.Setting(t).setName("Next recurrence appears on the line below").setDesc(Yt.createFragmentWithHTML('Enabling this will make the next recurrence of a task appear on the line below the completed task. Otherwise the next recurrence will appear before the completed one.

See the documentation.

')).addToggle(i=>{let{recurrenceOnNextLine:s}=Q();i.setValue(s).onChange(a=>F(this,null,function*(){tt({recurrenceOnNextLine:a}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Auto-suggest Settings"}),new be.Setting(t).setName("Auto-suggest task content").setDesc(Yt.createFragmentWithHTML('Enabling this will open an intelligent suggest menu while typing inside a recognized task line.

See the documentation.

')).addToggle(i=>{let s=Q();i.setValue(s.autoSuggestInEditor).onChange(a=>F(this,null,function*(){tt({autoSuggestInEditor:a}),yield this.plugin.saveSettings()}))}),new be.Setting(t).setName("Minimum match length for auto-suggest").setDesc("If higher than 0, auto-suggest will be triggered only when the beginning of any supported keywords is recognized.").addSlider(i=>{let s=Q();i.setLimits(0,3,1).setValue(s.autoSuggestMinMatch).setDynamicTooltip().onChange(a=>F(this,null,function*(){tt({autoSuggestMinMatch:a}),yield this.plugin.saveSettings()}))}),new be.Setting(t).setName("Maximum number of auto-suggestions to show").setDesc('How many suggestions should be shown when an auto-suggest menu pops up (including the "\u23CE" option).').addSlider(i=>{let s=Q();i.setLimits(3,12,1).setValue(s.autoSuggestMaxItems).setDynamicTooltip().onChange(a=>F(this,null,function*(){tt({autoSuggestMaxItems:a}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Dialog Settings"}),new be.Setting(t).setName("Provide access keys in dialogs").setDesc(Yt.createFragmentWithHTML('If the access keys (keyboard shortcuts) for various controls in dialog boxes conflict with system keyboard shortcuts or assistive technology functionality that is important for you, you may want to deactivate them here.

See the documentation.

')).addToggle(i=>{let s=Q();i.setValue(s.provideAccessKeys).onChange(a=>F(this,null,function*(){tt({provideAccessKeys:a}),yield this.plugin.saveSettings()}))})}addOneSettingsBlock(t,n,i){let s=t.createEl("details",{cls:"tasks-nested-settings",attr:we({},n.open||i[n.text]?{open:!0}:{})});s.empty(),s.ontoggle=()=>{i[n.text]=s.open,tt({headingOpened:i}),this.plugin.saveSettings()};let a=s.createEl("summary");if(new be.Setting(a).setHeading().setName(n.text),a.createDiv("collapser").createDiv("handle"),n.notice!==null){let o=s.createEl("div",{cls:n.notice.class,text:n.notice.text});n.notice.html!==null&&o.insertAdjacentHTML("beforeend",n.notice.html)}n.settings.forEach(o=>{if(!(o.featureFlag!==""&&!kb(o.featureFlag))&&(o.type==="checkbox"?new be.Setting(s).setName(o.name).setDesc(o.description).addToggle(u=>{let l=Q();l.generalSettings[o.settingName]||jn(o.settingName,o.initialValue),u.setValue(l.generalSettings[o.settingName]).onChange(c=>F(this,null,function*(){jn(o.settingName,c),yield this.plugin.saveSettings()}))}):o.type==="text"?new be.Setting(s).setName(o.name).setDesc(o.description).addText(u=>{let l=Q();l.generalSettings[o.settingName]||jn(o.settingName,o.initialValue);let c=f=>F(this,null,function*(){jn(o.settingName,f),yield this.plugin.saveSettings()});u.setPlaceholder(o.placeholder.toString()).setValue(l.generalSettings[o.settingName].toString()).onChange((0,be.debounce)(c,500,!0))}):o.type==="textarea"?new be.Setting(s).setName(o.name).setDesc(o.description).addTextArea(u=>{let l=Q();l.generalSettings[o.settingName]||jn(o.settingName,o.initialValue);let c=f=>F(this,null,function*(){jn(o.settingName,f),yield this.plugin.saveSettings()});u.setPlaceholder(o.placeholder.toString()).setValue(l.generalSettings[o.settingName].toString()).onChange((0,be.debounce)(c,500,!0)),u.inputEl.rows=8,u.inputEl.cols=40}):o.type==="function"&&this.customFunctions[o.settingName](s,this),o.notice!==null)){let u=s.createEl("p",{cls:o.notice.class,text:o.notice.text});o.notice.html!==null&&u.insertAdjacentHTML("beforeend",o.notice.html)}})}static parseCommaSeparatedFolders(t){return t.split(",").map(n=>n.trim()).map(n=>n.replace(/^\/|\/$/g,"")).filter(n=>n!=="")}static renderFolderArray(t){return t.join(",")}insertTaskCoreStatusSettings(t,n){let{statusSettings:i}=Q();i.coreStatuses.forEach(a=>{ev(t,a,i.coreStatuses,i,n,n.plugin,!0)}),new be.Setting(t).addButton(a=>{let o="Review and check your Statuses";a.setButtonText(o).setCta().onClick(()=>F(this,null,function*(){let l=window.moment().format("YYYY-MM-DD HH-mm-ss"),c=`Tasks Plugin - ${o} ${l}.md`,f=this.plugin.manifest.version,h=ve.getInstance(),T=B_(i,h,o,f),y=yield app.vault.create(c,T);yield this.app.workspace.getLeaf(!0).openFile(y)})),a.setTooltip("Create a new file in the root of the vault, containing a Mermaid diagram of the current status settings.")}).infoEl.remove()}insertCustomTaskStatusSettings(t,n){let{statusSettings:i}=Q();i.customStatuses.forEach(l=>{ev(t,l,i.customStatuses,i,n,n.plugin,!1)}),t.createEl("div"),new be.Setting(t).addButton(l=>{l.setButtonText("Add New Task Status").setCta().onClick(()=>F(this,null,function*(){Pe.addStatus(i.customStatuses,new He("","","",!1,"TODO")),yield Zi(i,n)}))}).infoEl.remove();let a=[["AnuPpuccin Theme",H_()],["Aura Theme",z_()],["Ebullientworks Theme",V_()],["ITS Theme & SlRvb Checkboxes",K_()],["Minimal Theme",X_()],["Things Theme",Z_()],["LYT Mode Theme (Dark mode only)",Q_()]];for(let[l,c]of a)new be.Setting(t).addButton(h=>{let T=`${l}: Add ${c.length} supported Statuses`;h.setButtonText(T).onClick(()=>F(this,null,function*(){yield eP(c,i,n)}))}).infoEl.remove();new be.Setting(t).addButton(l=>{l.setButtonText("Add All Unknown Status Types").setCta().onClick(()=>F(this,null,function*(){let f=this.plugin.getTasks().map(T=>T.status),h=ve.getInstance().findUnknownStatuses(f);h.length!==0&&(h.forEach(T=>{Pe.addStatus(i.customStatuses,T)}),yield Zi(i,n))}))}).infoEl.remove(),new be.Setting(t).addButton(l=>{l.setButtonText("Reset Custom Status Types to Defaults").setWarning().onClick(()=>F(this,null,function*(){Pe.resetAllCustomStatuses(i),yield Zi(i,n)}))}).infoEl.remove()}},Ra=Yt;Ra.createFragmentWithHTML=t=>createFragment(n=>n.createDiv().innerHTML=t);function ev(r,e,t,n,i,s,a){let o=r.createEl("pre");o.addClass("row-for-status"),o.textContent=new X(e).previewText();let u=new be.Setting(r);u.infoEl.replaceWith(o),a||u.addExtraButton(l=>{l.setIcon("cross").setTooltip("Delete").onClick(()=>F(this,null,function*(){Pe.deleteStatus(t,e)&&(yield Zi(n,i))}))}),u.addExtraButton(l=>{l.setIcon("pencil").setTooltip("Edit").onClick(()=>F(this,null,function*(){let c=new $t(s,e,a);c.onClose=()=>F(this,null,function*(){c.saved&&Pe.replaceStatus(t,e,c.statusConfiguration())&&(yield Zi(n,i))}),c.open()}))}),u.infoEl.remove()}function eP(r,e,t){return F(this,null,function*(){Pe.bulkAddStatusCollection(e,r).forEach(i=>{new be.Notice(i)}),yield Zi(e,t)})}function Zi(r,e){return F(this,null,function*(){tt({statusSettings:r}),Pe.applyToStatusRegistry(r,ve.getInstance()),yield e.saveSettings(!0)})}function tP(r){let{settingEl:e,infoEl:t,controlEl:n}=r,i=n.querySelector("textarea");i!==null&&(e.style.display="block",t.style.marginRight="0px",i.style.minWidth="-webkit-fill-available")}var tv=require("obsidian");var Yu=class extends tv.EditorSuggest{constructor(t,n){super(t);this.settings=n,t.scope.register([],"Tab",()=>{var s;let i=(s=this.context)==null?void 0:s.editor;return i?(i.exec("indentMore"),!1):!0})}onTrigger(t,n,i){if(!this.settings.autoSuggestInEditor)return null;let s=n.getLine(t.line);return _b(s,t.ch)?{start:{line:t.line,ch:0},end:{line:t.line,ch:s.length},query:s}:null}getSuggestions(t){var a,o,u;let n=t.query,i=t.editor.getCursor();return((u=(o=(a=ga()).buildSuggestions)==null?void 0:o.call(a,n,i.ch,this.settings))!=null?u:[]).map(l=>it(we({},l),{context:t}))}renderSuggestion(t,n){n.setText(t.displayText)}selectSuggestion(t,n){var u,l,c;let i=t.context.editor;if(t.suggestionType==="empty"){this.close();let f=new KeyboardEvent("keydown",{code:"Enter",key:"Enter"});(l=(u=i==null?void 0:i.cm)==null?void 0:u.contentDOM)==null||l.dispatchEvent(f);return}let s=t.context.editor.getCursor(),a={line:s.line,ch:(c=t.insertAt)!=null?c:s.ch},o=t.insertSkip?{line:s.line,ch:a.ch+t.insertSkip}:void 0;t.context.editor.replaceRange(t.appendText,a,o),t.context.editor.setCursor({line:s.line,ch:a.ch+t.appendText.length})}};var rv=(r,e)=>{let t,n=new Promise((a,o)=>{t=a});return e(r,a=>{let o=a.map(u=>u.toFileLineString()).join(` -`);t(o)}).open(),n};var nv=(r,e)=>{let t=Qo({line:"",path:""});return new mn({app:r,task:t,onSubmit:e})};var iv=r=>({createTaskLineModal:()=>rv(r,nv)});var ju=class extends sv.Plugin{get apiV1(){return iv(app)}onload(){return F(this,null,function*(){St.registerConsoleLogger(),tp("info",`loading plugin "${this.manifest.name}" v${this.manifest.version}`),yield this.loadSettings();let{loggingOptions:t}=Q();St.configure(t),this.addSettingTab(new Ra({plugin:this})),O_({metadataCache:this.app.metadataCache,vault:this.app.vault,workspace:this.app.workspace}),yield this.loadTaskStatuses();let n=new Cu({obsidianEvents:this.app.workspace});this.cache=new Gn({metadataCache:this.app.metadataCache,vault:this.app.vault,events:n}),this.inlineRenderer=new Uu({plugin:this}),this.queryRenderer=new qu({plugin:this,events:n}),this.registerEditorExtension(L_()),this.registerEditorSuggest(new Yu(this.app,Q())),new Xo({plugin:this})})}loadTaskStatuses(){return F(this,null,function*(){let{statusSettings:t}=Q();Pe.applyToStatusRegistry(t,ve.getInstance())})}onunload(){var t;tp("info",`unloading plugin "${this.manifest.name}" v${this.manifest.version}`),(t=this.cache)==null||t.unload()}loadSettings(){return F(this,null,function*(){let t=yield this.loadData();tt(t),t=Q(),ge.getInstance().set(t.globalFilter),ge.getInstance().setRemoveGlobalFilter(t.removeGlobalFilter),tr.getInstance().set(t.globalQuery),yield this.loadTaskStatuses()})}saveSettings(){return F(this,null,function*(){yield this.saveData(Q())})}getTasks(){var t;return(t=this.cache)==null?void 0:t.getTasks()}}; +show urgency`).setValue(i.globalQuery).onChange(a=>L(this,null,function*(){Ke({globalQuery:a}),ar.getInstance().set(a),yield this.plugin.saveSettings()}))})),t.createEl("h4",{text:"Task Statuses"});let{headingOpened:n}=K();Cv.forEach(s=>{this.addOneSettingsBlock(t,s,n)}),t.createEl("h4",{text:"Date Settings"}),new _e.Setting(t).setName("Set created date on every added task").setDesc(It.createFragmentWithHTML(`Enabling this will add a timestamp \u2795 YYYY-MM-DD before other date values, when a task is created with 'Create or edit task', or by completing a recurring task.

See the documentation.

`)).addToggle(s=>{let i=K();s.setValue(i.setCreatedDate).onChange(a=>L(this,null,function*(){Ke({setCreatedDate:a}),yield this.plugin.saveSettings()}))}),new _e.Setting(t).setName("Set done date on every completed task").setDesc(It.createFragmentWithHTML('Enabling this will add a timestamp \u2705 YYYY-MM-DD at the end when a task is toggled to done.

See the documentation.

')).addToggle(s=>{let i=K();s.setValue(i.setDoneDate).onChange(a=>L(this,null,function*(){Ke({setDoneDate:a}),yield this.plugin.saveSettings()}))}),new _e.Setting(t).setName("Set cancelled date on every cancelled task").setDesc(It.createFragmentWithHTML('Enabling this will add a timestamp \u274C YYYY-MM-DD at the end when a task is toggled to cancelled.

See the documentation.

')).addToggle(s=>{let i=K();s.setValue(i.setCancelledDate).onChange(a=>L(this,null,function*(){Ke({setCancelledDate:a}),yield this.plugin.saveSettings()}))}),new _e.Setting(t).setName("Use filename as Scheduled date for undated tasks").setDesc(It.createFragmentWithHTML('Save time entering Scheduled (\u23F3) dates.
If this option is enabled, any undated tasks will be given a default Scheduled date extracted from their file name.
The date in the file name must be in one of YYYY-MM-DD or YYYYMMDD formats.
Undated tasks have none of Due (\u{1F4C5} ), Scheduled (\u23F3) and Start (\u{1F6EB}) dates.

See the documentation.

')).addToggle(s=>{let i=K();s.setValue(i.useFilenameAsScheduledDate).onChange(a=>L(this,null,function*(){Ke({useFilenameAsScheduledDate:a}),yield this.plugin.saveSettings()}))}),new _e.Setting(t).setName("Folders with default Scheduled dates").setDesc("Leave empty if you want to use default Scheduled dates everywhere, or enter a comma-separated list of folders.").addText(s=>L(this,null,function*(){let i=K();yield this.plugin.saveSettings(),s.setValue(It.renderFolderArray(i.filenameAsDateFolders)).onChange(a=>L(this,null,function*(){let o=It.parseCommaSeparatedFolders(a);Ke({filenameAsDateFolders:o}),yield this.plugin.saveSettings()}))})),t.createEl("h4",{text:"Recurring task Settings"}),new _e.Setting(t).setName("Next recurrence appears on the line below").setDesc(It.createFragmentWithHTML('Enabling this will make the next recurrence of a task appear on the line below the completed task. Otherwise the next recurrence will appear before the completed one.

See the documentation.

')).addToggle(s=>{let{recurrenceOnNextLine:i}=K();s.setValue(i).onChange(a=>L(this,null,function*(){Ke({recurrenceOnNextLine:a}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Auto-suggest Settings"}),new _e.Setting(t).setName("Auto-suggest task content").setDesc(It.createFragmentWithHTML('Enabling this will open an intelligent suggest menu while typing inside a recognized task line.

See the documentation.

')).addToggle(s=>{let i=K();s.setValue(i.autoSuggestInEditor).onChange(a=>L(this,null,function*(){Ke({autoSuggestInEditor:a}),yield this.plugin.saveSettings()}))}),new _e.Setting(t).setName("Minimum match length for auto-suggest").setDesc("If higher than 0, auto-suggest will be triggered only when the beginning of any supported keywords is recognized.").addSlider(s=>{let i=K();s.setLimits(0,3,1).setValue(i.autoSuggestMinMatch).setDynamicTooltip().onChange(a=>L(this,null,function*(){Ke({autoSuggestMinMatch:a}),yield this.plugin.saveSettings()}))}),new _e.Setting(t).setName("Maximum number of auto-suggestions to show").setDesc('How many suggestions should be shown when an auto-suggest menu pops up (including the "\u23CE" option).').addSlider(s=>{let i=K();s.setLimits(3,12,1).setValue(i.autoSuggestMaxItems).setDynamicTooltip().onChange(a=>L(this,null,function*(){Ke({autoSuggestMaxItems:a}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Dialog Settings"}),new _e.Setting(t).setName("Provide access keys in dialogs").setDesc(It.createFragmentWithHTML('If the access keys (keyboard shortcuts) for various controls in dialog boxes conflict with system keyboard shortcuts or assistive technology functionality that is important for you, you may want to deactivate them here.

See the documentation.

')).addToggle(s=>{let i=K();s.setValue(i.provideAccessKeys).onChange(a=>L(this,null,function*(){Ke({provideAccessKeys:a}),yield this.plugin.saveSettings()}))})}addOneSettingsBlock(t,n,s){let i=t.createEl("details",{cls:"tasks-nested-settings",attr:ke({},n.open||s[n.text]?{open:!0}:{})});i.empty(),i.ontoggle=()=>{s[n.text]=i.open,Ke({headingOpened:s}),this.plugin.saveSettings()};let a=i.createEl("summary");if(new _e.Setting(a).setHeading().setName(n.text),a.createDiv("collapser").createDiv("handle"),n.notice!==null){let o=i.createEl("div",{cls:n.notice.class,text:n.notice.text});n.notice.html!==null&&o.insertAdjacentHTML("beforeend",n.notice.html)}n.settings.forEach(o=>{if(!(o.featureFlag!==""&&!Jb(o.featureFlag))&&(o.type==="checkbox"?new _e.Setting(i).setName(o.name).setDesc(o.description).addToggle(u=>{let l=K();l.generalSettings[o.settingName]||ts(o.settingName,o.initialValue),u.setValue(l.generalSettings[o.settingName]).onChange(c=>L(this,null,function*(){ts(o.settingName,c),yield this.plugin.saveSettings()}))}):o.type==="text"?new _e.Setting(i).setName(o.name).setDesc(o.description).addText(u=>{let l=K();l.generalSettings[o.settingName]||ts(o.settingName,o.initialValue);let c=f=>L(this,null,function*(){ts(o.settingName,f),yield this.plugin.saveSettings()});u.setPlaceholder(o.placeholder.toString()).setValue(l.generalSettings[o.settingName].toString()).onChange((0,_e.debounce)(c,500,!0))}):o.type==="textarea"?new _e.Setting(i).setName(o.name).setDesc(o.description).addTextArea(u=>{let l=K();l.generalSettings[o.settingName]||ts(o.settingName,o.initialValue);let c=f=>L(this,null,function*(){ts(o.settingName,f),yield this.plugin.saveSettings()});u.setPlaceholder(o.placeholder.toString()).setValue(l.generalSettings[o.settingName].toString()).onChange((0,_e.debounce)(c,500,!0)),u.inputEl.rows=8,u.inputEl.cols=40}):o.type==="function"&&this.customFunctions[o.settingName](i,this),o.notice!==null)){let u=i.createEl("p",{cls:o.notice.class,text:o.notice.text});o.notice.html!==null&&u.insertAdjacentHTML("beforeend",o.notice.html)}})}static parseCommaSeparatedFolders(t){return t.split(",").map(n=>n.trim()).map(n=>n.replace(/^\/|\/$/g,"")).filter(n=>n!=="")}static renderFolderArray(t){return t.join(",")}insertTaskCoreStatusSettings(t,n){let{statusSettings:s}=K();s.coreStatuses.forEach(a=>{Av(t,a,s.coreStatuses,s,n,n.plugin,!0)}),new _e.Setting(t).addButton(a=>{let o="Review and check your Statuses";a.setButtonText(o).setCta().onClick(()=>L(this,null,function*(){let l=window.moment().format("YYYY-MM-DD HH-mm-ss"),c=`Tasks Plugin - ${o} ${l}.md`,f=this.plugin.manifest.version,m=Ee.getInstance(),y=Ev(s,m,o,f),k=yield app.vault.create(c,y);yield this.app.workspace.getLeaf(!0).openFile(k)})),a.setTooltip("Create a new file in the root of the vault, containing a Mermaid diagram of the current status settings.")}).infoEl.remove()}insertCustomTaskStatusSettings(t,n){let{statusSettings:s}=K();s.customStatuses.forEach(l=>{Av(t,l,s.customStatuses,s,n,n.plugin,!1)}),t.createEl("div"),new _e.Setting(t).addButton(l=>{l.setButtonText("Add New Task Status").setCta().onClick(()=>L(this,null,function*(){Ne.addStatus(s.customStatuses,new Ve("","","",!1,"TODO")),yield pi(s,n)}))}).infoEl.remove();let a=[["AnuPpuccin Theme",kv()],["Aura Theme",Sv()],["Ebullientworks Theme",Ov()],["ITS Theme & SlRvb Checkboxes",Dv()],["Minimal Theme",Rv()],["Things Theme",Mv()],["LYT Mode Theme (Dark mode only)",xv()]];for(let[l,c]of a)new _e.Setting(t).addButton(m=>{let y=`${l}: Add ${c.length} supported Statuses`;m.setButtonText(y).onClick(()=>L(this,null,function*(){yield NP(c,s,n)}))}).infoEl.remove();new _e.Setting(t).addButton(l=>{l.setButtonText("Add All Unknown Status Types").setCta().onClick(()=>L(this,null,function*(){let f=this.plugin.getTasks().map(y=>y.status),m=Ee.getInstance().findUnknownStatuses(f);m.length!==0&&(m.forEach(y=>{Ne.addStatus(s.customStatuses,y)}),yield pi(s,n))}))}).infoEl.remove(),new _e.Setting(t).addButton(l=>{l.setButtonText("Reset Custom Status Types to Defaults").setWarning().onClick(()=>L(this,null,function*(){Ne.resetAllCustomStatuses(s),yield pi(s,n)}))}).infoEl.remove()}},$a=It;$a.createFragmentWithHTML=t=>createFragment(n=>n.createDiv().innerHTML=t);function Av(r,e,t,n,s,i,a){let o=r.createEl("pre");o.addClass("row-for-status"),o.textContent=new Q(e).previewText();let u=new _e.Setting(r);u.infoEl.replaceWith(o),a||u.addExtraButton(l=>{l.setIcon("cross").setTooltip("Delete").onClick(()=>L(this,null,function*(){Ne.deleteStatus(t,e)&&(yield pi(n,s))}))}),u.addExtraButton(l=>{l.setIcon("pencil").setTooltip("Edit").onClick(()=>L(this,null,function*(){let c=new zt(i,e,a);c.onClose=()=>L(this,null,function*(){c.saved&&Ne.replaceStatus(t,e,c.statusConfiguration())&&(yield pi(n,s))}),c.open()}))}),u.infoEl.remove()}function NP(r,e,t){return L(this,null,function*(){Ne.bulkAddStatusCollection(e,r).forEach(s=>{new _e.Notice(s)}),yield pi(e,t)})}function pi(r,e){return L(this,null,function*(){Ke({statusSettings:r}),Ne.applyToStatusRegistry(r,Ee.getInstance()),yield e.saveSettings(!0)})}function IP(r){let{settingEl:e,infoEl:t,controlEl:n}=r,s=n.querySelector("textarea");s!==null&&(e.style.display="block",t.style.marginRight="0px",s.style.minWidth="-webkit-fill-available")}var Pv=require("obsidian");var ll=class extends Pv.EditorSuggest{constructor(t,n){super(t);this.settings=n,t.scope.register([],"Tab",()=>{var i;let s=(i=this.context)==null?void 0:i.editor;return s?(s.exec("indentMore"),!1):!0})}onTrigger(t,n,s){if(!this.settings.autoSuggestInEditor)return null;let i=n.getLine(t.line);return Kb(i,t.ch)?{start:{line:t.line,ch:0},end:{line:t.line,ch:i.length},query:i}:null}getSuggestions(t){var a,o,u;let n=t.query,s=t.editor.getCursor();return((u=(o=(a=Ca()).buildSuggestions)==null?void 0:o.call(a,n,s.ch,this.settings))!=null?u:[]).map(l=>ot(ke({},l),{context:t}))}renderSuggestion(t,n){n.setText(t.displayText)}selectSuggestion(t,n){var u,l,c;let s=t.context.editor;if(t.suggestionType==="empty"){this.close();let f=new KeyboardEvent("keydown",{code:"Enter",key:"Enter"});(l=(u=s==null?void 0:s.cm)==null?void 0:u.contentDOM)==null||l.dispatchEvent(f);return}let i=t.context.editor.getCursor(),a={line:i.line,ch:(c=t.insertAt)!=null?c:i.ch},o=t.insertSkip?{line:i.line,ch:a.ch+t.insertSkip}:void 0;t.context.editor.replaceRange(t.appendText,a,o),t.context.editor.setCursor({line:i.line,ch:a.ch+t.appendText.length})}};var Nv=(r,e)=>{let t,n=new Promise((a,o)=>{t=a});return e(r,a=>{let o=a.map(u=>u.toFileLineString()).join(` +`);t(o)}).open(),n};var Iv=(r,e)=>{let t=gu({line:"",path:""});return new On({app:r,task:t,onSubmit:e})};var Fv=r=>({createTaskLineModal:()=>Nv(r,Iv)});var cl=class extends Lv.Plugin{get apiV1(){return Fv(app)}onload(){return L(this,null,function*(){Rt.registerConsoleLogger(),wp("info",`loading plugin "${this.manifest.name}" v${this.manifest.version}`),yield this.loadSettings();let{loggingOptions:t}=K();Rt.configure(t),this.addSettingTab(new $a({plugin:this})),tv({metadataCache:this.app.metadataCache,vault:this.app.vault,workspace:this.app.workspace}),yield this.loadTaskStatuses();let n=new Zu({obsidianEvents:this.app.workspace});this.cache=new rs({metadataCache:this.app.metadataCache,vault:this.app.vault,events:n}),this.inlineRenderer=new sl({plugin:this}),this.queryRenderer=new ol({plugin:this,events:n}),this.registerEditorExtension(fv()),this.registerEditorSuggest(new ll(this.app,K())),new yu({plugin:this})})}loadTaskStatuses(){return L(this,null,function*(){let{statusSettings:t}=K();Ne.applyToStatusRegistry(t,Ee.getInstance())})}onunload(){var t;wp("info",`unloading plugin "${this.manifest.name}" v${this.manifest.version}`),(t=this.cache)==null||t.unload()}loadSettings(){return L(this,null,function*(){let t=yield this.loadData();Ke(t),t=K(),ye.getInstance().set(t.globalFilter),ye.getInstance().setRemoveGlobalFilter(t.removeGlobalFilter),ar.getInstance().set(t.globalQuery),yield this.loadTaskStatuses()})}saveSettings(){return L(this,null,function*(){yield this.saveData(K())})}getTasks(){var t;return(t=this.cache)==null?void 0:t.getTasks()}}; /*! * EventEmitter2 * https://github.com/hij1nx/EventEmitter2 diff --git a/.obsidian/plugins/obsidian-tasks-plugin/manifest.json b/.obsidian/plugins/obsidian-tasks-plugin/manifest.json index 087125f..8235e41 100644 --- a/.obsidian/plugins/obsidian-tasks-plugin/manifest.json +++ b/.obsidian/plugins/obsidian-tasks-plugin/manifest.json @@ -1,7 +1,7 @@ { "id": "obsidian-tasks-plugin", "name": "Tasks", - "version": "5.3.0", + "version": "5.6.0", "minAppVersion": "1.1.1", "description": "Task management for Obsidian", "helpUrl": "https://publish.obsidian.md/tasks/", diff --git a/.obsidian/plugins/obsidian-tasks-plugin/styles.css b/.obsidian/plugins/obsidian-tasks-plugin/styles.css index 1aecde8..ec4138f 100644 --- a/.obsidian/plugins/obsidian-tasks-plugin/styles.css +++ b/.obsidian/plugins/obsidian-tasks-plugin/styles.css @@ -138,6 +138,11 @@ ul.contains-task-list .task-list-item-checkbox { } .tasks-modal-buttons { + position: sticky; + bottom: 0; + background-color: var(--modal-background); + padding-bottom: 16px; + padding-top: 16px; display: grid; grid-template-columns: 3fr 1fr; column-gap: .5em; @@ -217,6 +222,8 @@ ul.contains-task-list .task-list-item-checkbox { } .tasks-modal-status { + padding-bottom: 6px; + margin-bottom: -16px; display: flex; justify-content: space-between; } @@ -225,6 +232,11 @@ ul.contains-task-list .task-list-item-checkbox { border: 1px solid red !important; } +.tasks-modal-warning { + color: var(--text-warning) !important; + background-color: rgba(var(--background-modifier-warning-rgb), 0.2) !important; +} + .tasks-modal button:disabled { pointer-events: none !important; opacity: 0.3 !important; diff --git a/.obsidian/plugins/periodic-para/main.js b/.obsidian/plugins/periodic-para/main.js index 6e327c4..2cd7b82 100644 --- a/.obsidian/plugins/periodic-para/main.js +++ b/.obsidian/plugins/periodic-para/main.js @@ -36259,11 +36259,11 @@ var Date2 = class { const [[, year], [, quarter], [, month], [, week], [, day]] = [ (fileName == null ? void 0 : fileName.match(/(^\d{4})/)) || [], // year - (fileName == null ? void 0 : fileName.match(/^\d{4}-Q(\d{1})/)) || [], + (fileName == null ? void 0 : fileName.match(/^\d{4}-Q(\d{1,2})/)) || [], // quarter - (fileName == null ? void 0 : fileName.match(/^\d{4}-(\d{2})/)) || [], + (fileName == null ? void 0 : fileName.match(/^\d{4}-(\d{1,2})/)) || [], // month - (fileName == null ? void 0 : fileName.match(/^\d{4}-W(\d{2})/)) || [], + (fileName == null ? void 0 : fileName.match(/^\d{4}-W(\d{1,2})/)) || [], // week (fileName == null ? void 0 : fileName.match(/^\d{4}-\d{2}-(\d{2})/)) || [] // day @@ -36358,7 +36358,7 @@ var Date2 = class { const quarters = /* @__PURE__ */ new Set(); const currentDate = (0, import_obsidian.moment)(from2).clone(); while (currentDate.isBefore((0, import_obsidian.moment)(to))) { - const weekLink = `${currentDate.weekYear()}-W${String( + const weekLink = `${currentDate.weekYear()}/Weekly/${currentDate.weekYear()}-W${String( currentDate.isoWeek() ).padStart(2, "0")}.md`; const weekFile = this.file.get( @@ -36369,7 +36369,7 @@ var Date2 = class { if (weekFile) { weeks.add(weekFile.path); } - const monthLink = `${currentDate.year()}-${String( + const monthLink = `${currentDate.year()}/Monthly/${currentDate.year()}-${String( currentDate.month() + 1 ).padStart(2, "0")}.md`; const monthFile = this.file.get( @@ -36380,7 +36380,7 @@ var Date2 = class { if (monthFile) { months.add(monthFile.path); } - const quarterLink = `${currentDate.year()}-Q${Math.ceil( + const quarterLink = `${currentDate.year()}/Quarterly/${currentDate.year()}-Q${Math.ceil( (currentDate.month() + 1) / 3 )}.md`; const quarterFile = this.file.get( @@ -36503,7 +36503,7 @@ async function createFile(app, options) { if (!folder || !file) { return; } - let tFile = app.vault.getAbstractFileByPath(file); + const tFile = app.vault.getAbstractFileByPath(file); if (tFile && tFile instanceof import_obsidian4.TFile) { return await app.workspace.getLeaf().openFile(tFile); } @@ -36636,6 +36636,7 @@ var Project = class extends Item { }, header) { const { from: from2, to } = condition; const timeReg = /\d+hr(\d+)?/; + const totalTimeReg = /^\d+hr(\d+)?$/; let day = from2; const projectList = []; const projectTimeConsume = {}; @@ -36643,7 +36644,9 @@ var Project = class extends Item { const tasks = []; while (true) { const momentDay = (0, import_obsidian5.moment)(day); - const link = `${momentDay.format("YYYY-MM-DD")}.md`; + const link = `${momentDay.year()}/Daily/${String( + momentDay.month() + 1 + ).padStart(2, "0")}/${momentDay.format("YYYY-MM-DD")}.md`; const file = this.file.get(link, "", this.settings.periodicNotesPath); if (file instanceof import_obsidian5.TFile) { const reg = generateHeaderRegExp(header); @@ -36658,10 +36661,10 @@ var Project = class extends Item { if (!project) { return; } - if (project.match(timeReg)) { - todayTotalTime = project; + if (project == null ? void 0 : project.trim().match(totalTimeReg)) { + todayTotalTime = project == null ? void 0 : project.trim(); } - const realProject = (_a2 = (project.match(/\[\[(.*)\|?(.*)\]\]/) || [])[1]) == null ? void 0 : _a2.replace(/\|.*/, ""); + const realProject = (_a2 = (project.match(/\d+\. \[\[(.*)\|?(.*)\]\]/) || [])[1]) == null ? void 0 : _a2.replace(/\|.*/, ""); if (!realProject) { return; } @@ -36741,7 +36744,7 @@ var Area = class extends Item { const tasks = []; for (let index2 = 0; index2 < quarterList.length; index2++) { const quarter = quarterList[index2]; - const link = `${year}-${quarter}.md`; + const link = `${year}/Quarterly/${year}-${quarter}.md`; const file = this.file.get(link, "", this.settings.periodicNotesPath); if (file instanceof import_obsidian7.TFile) { const reg = generateHeaderRegExp(header); @@ -36756,7 +36759,7 @@ var Area = class extends Item { if (!area) { return; } - const realArea = (_a2 = (area.match(/\[\[(.*)\|?(.*)\]\]/) || [])[1]) == null ? void 0 : _a2.replace(/\|.*/, ""); + const realArea = (_a2 = (area.match(/\d+\. \[\[(.*)\|?(.*)\]\]/) || [])[1]) == null ? void 0 : _a2.replace(/\|.*/, ""); if (realArea && !areaList.includes(realArea)) { areaList.push(realArea); } @@ -36907,6 +36910,7 @@ var Task = class { const tags = this.file.tags(filepath); const div = el.createEl("div"); const component = new Markdown(div); + const periodicNotesPath = this.settings.periodicNotesPath; if (!tags.length) { return renderError( this.app, @@ -36920,7 +36924,7 @@ var Task = class { }).join(" "); const { values: tasks } = await this.dataview.tryQuery(` TASK -FROM -"Templates" +FROM -"${periodicNotesPath}/Templates" WHERE ${where} AND file.path != "${filepath}" SORT completed ASC `); @@ -36974,6 +36978,7 @@ var Bullet = class { const tags = this.file.tags(filepath); const div = el.createEl("div"); const component = new Markdown(div); + const periodicNotesPath = this.settings.periodicNotesPath; if (!tags.length) { return renderError( this.app, @@ -36991,7 +36996,7 @@ var Bullet = class { const result = await this.dataview.tryQuery( ` TABLE WITHOUT ID rows.L.text AS "Bullet", rows.file.link AS "File" -FROM (${from2}) AND -"Templates" +FROM (${from2}) AND -"${periodicNotesPath}/Templates" FLATTEN file.lists AS L WHERE ${where} AND !L.task AND file.path != "${filepath}" GROUP BY file.link @@ -39145,12 +39150,13 @@ var DailyRecord = class { this.sync(); }; this.sync = async () => { + logMessage("Start sync daily record"); this.offset = 0; this.downloadResource(); this.insertDailyRecord(); }; this.insertDailyRecord = async () => { - var _a, _b, _c; + var _a, _b, _c, _d; const header = this.settings.dailyRecordHeader; const dailyRecordByDay = {}; const records = await this.fetch() || []; @@ -39161,7 +39167,7 @@ var DailyRecord = class { return; } for (const record of records) { - if (!record.content) { + if (!record.content && !((_d = record.resourceList) == null ? void 0 : _d.length)) { continue; } const [date4, timeStamp, formattedRecord] = formatDailyRecord(record); @@ -39176,8 +39182,12 @@ var DailyRecord = class { await Promise.all( Object.keys(dailyRecordByDay).map(async (today) => { var _a2, _b2, _c2; + const momentDay = (0, import_obsidian10.moment)(today); + const link = `${momentDay.year()}/Daily/${String( + momentDay.month() + 1 + ).padStart(2, "0")}/${momentDay.format("YYYY-MM-DD")}.md`; const targetFile = this.file.get( - today, + link, "", this.settings.periodicNotesPath ); @@ -39253,6 +39263,18 @@ ${finalRecordContent} this.offset = this.offset + this.limit; this.insertDailyRecord(); }; + if (!settings.dailyRecordAPI) { + logMessage(ERROR_MESSAGES.NO_DAILY_RECORD_API); + return; + } + if (!settings.dailyRecordToken) { + logMessage(ERROR_MESSAGES.NO_DAILY_RECORD_TOKEN); + return; + } + if (!settings.dailyRecordHeader) { + logMessage(ERROR_MESSAGES.NO_DAILY_RECORD_HEADER); + return; + } this.app = app; this.file = file; this.settings = settings; @@ -39266,19 +39288,6 @@ ${finalRecordContent} Accept: "application/json" } }); - if (!this.settings.dailyRecordAPI) { - logMessage(ERROR_MESSAGES.NO_DAILY_RECORD_API); - return; - } - if (!this.settings.dailyRecordToken) { - logMessage(ERROR_MESSAGES.NO_DAILY_RECORD_TOKEN); - return; - } - if (!this.settings.dailyRecordHeader) { - logMessage(ERROR_MESSAGES.NO_DAILY_RECORD_HEADER); - return; - } - logMessage("Start sync daily record"); } async fetch() { try { @@ -39424,7 +39433,7 @@ var SettingTab = class extends import_obsidian11.PluginSettingTab { }, 500) ) ); - new import_obsidian11.Setting(containerEl).setName("Daily Record").setDesc("Sync daily record by remote API").addToggle( + new import_obsidian11.Setting(containerEl).setName("Daily Record").setDesc("Sync daily record from usememos service").addToggle( (toggle) => toggle.setValue(this.plugin.settings.useDailyRecord).onChange(async (value) => { this.plugin.settings.useDailyRecord = value; await this.plugin.saveSettings(); @@ -39441,7 +39450,9 @@ var SettingTab = class extends import_obsidian11.PluginSettingTab { ) ); new import_obsidian11.Setting(containerEl).setName("API:").setDesc("The daily record API").addText( - (text) => text.setPlaceholder(DEFAULT_SETTINGS.dailyRecordAPI).setValue(this.plugin.settings.dailyRecordAPI).onChange( + (text) => text.setPlaceholder( + DEFAULT_SETTINGS.dailyRecordAPI || "Usememos server + API(https://your-use-memos.com/api/v1/memo)" + ).setValue(this.plugin.settings.dailyRecordAPI).onChange( (0, import_debounce.default)(async (value) => { this.plugin.settings.dailyRecordAPI = value; await this.plugin.saveSettings(); @@ -39449,7 +39460,9 @@ var SettingTab = class extends import_obsidian11.PluginSettingTab { ) ); new import_obsidian11.Setting(containerEl).setName("Token:").setDesc("The token of your API").addText( - (text) => text.setPlaceholder(DEFAULT_SETTINGS.dailyRecordToken).setValue(this.plugin.settings.dailyRecordToken).onChange( + (text) => text.setPlaceholder( + DEFAULT_SETTINGS.dailyRecordToken || "Find token in https://your-use-memos.com/setting" + ).setValue(this.plugin.settings.dailyRecordToken).onChange( (0, import_debounce.default)(async (value) => { this.plugin.settings.dailyRecordToken = value; await this.plugin.saveSettings(); @@ -69763,7 +69776,7 @@ var AddTemplate = () => { let templateFile = ""; let folder = ""; let file = ""; - let year = dates.year(); + const year = dates.year(); let value; if (periodicActiveTab === DAILY) { folder = `${settings.periodicNotesPath}/${year}/${periodicActiveTab}/${String(dates.month() + 1).padStart( @@ -69773,7 +69786,7 @@ var AddTemplate = () => { value = dates.format("YYYY-MM-DD"); } else if (periodicActiveTab === WEEKLY) { folder = `${settings.periodicNotesPath}/${year}/${periodicActiveTab}`; - value = dates.format("gggg-[W]w"); + value = dates.format("gggg-[W]ww"); } else if (periodicActiveTab === MONTHLY) { folder = `${settings.periodicNotesPath}/${year}/${periodicActiveTab}`; value = dates.format("YYYY-MM"); diff --git a/.obsidian/plugins/periodic-para/manifest.json b/.obsidian/plugins/periodic-para/manifest.json index 0ae7a3e..4dfe1cf 100644 --- a/.obsidian/plugins/periodic-para/manifest.json +++ b/.obsidian/plugins/periodic-para/manifest.json @@ -1,7 +1,7 @@ { "id": "periodic-para", "name": "Periodic PARA", - "version": "1.7.5", + "version": "1.7.9", "minAppVersion": "0.15.0", "description": "Assist in practicing the PARA method with periodic notes and usememos.", "author": "YiBing Lin", diff --git a/.obsidian/plugins/templater-obsidian/main.js b/.obsidian/plugins/templater-obsidian/main.js index 443cc44..b987189 100644 --- a/.obsidian/plugins/templater-obsidian/main.js +++ b/.obsidian/plugins/templater-obsidian/main.js @@ -2437,8 +2437,8 @@ var InternalModuleFile = class extends InternalModule { }; } generate_exists() { - return async (filename) => { - const path = (0, import_obsidian8.normalizePath)(filename); + return async (filepath) => { + const path = (0, import_obsidian8.normalizePath)(filepath); return await app.vault.exists(path); }; } @@ -2731,6 +2731,8 @@ var PromptModal = class extends import_obsidian9.Modal { textInput.inputEl.addEventListener("keydown", (evt) => this.enterCallback(evt)); } enterCallback(evt) { + if (evt.isComposing || evt.keyCode === 229) + return; if (this.multi_line) { if (import_obsidian9.Platform.isDesktop) { if (evt.shiftKey && evt.key === "Enter") { @@ -3803,7 +3805,7 @@ var EventHandler = class { this.settings = settings; } setup() { - app.workspace.onLayoutReady(() => { + this.plugin.app.workspace.onLayoutReady(() => { this.update_trigger_file_on_creation(); }); this.update_syntax_highlighting(); @@ -3813,35 +3815,24 @@ var EventHandler = class { const desktopShouldHighlight = this.plugin.editor_handler.desktopShouldHighlight(); const mobileShouldHighlight = this.plugin.editor_handler.mobileShouldHighlight(); if (desktopShouldHighlight || mobileShouldHighlight) { - this.syntax_highlighting_event = app.workspace.on("codemirror", (cm) => { - cm.setOption("mode", "templater"); - }); - app.workspace.iterateCodeMirrors((cm) => { - cm.setOption("mode", "templater"); - }); - this.plugin.registerEvent(this.syntax_highlighting_event); + this.plugin.editor_handler.enable_highlighter(); } else { - if (this.syntax_highlighting_event) { - app.vault.offref(this.syntax_highlighting_event); - } - app.workspace.iterateCodeMirrors((cm) => { - cm.setOption("mode", "hypermd"); - }); + this.plugin.editor_handler.disable_highlighter(); } } update_trigger_file_on_creation() { if (this.settings.trigger_on_file_creation) { - this.trigger_on_file_creation_event = app.vault.on("create", (file) => Templater.on_file_creation(this.templater, file)); + this.trigger_on_file_creation_event = this.plugin.app.vault.on("create", (file) => Templater.on_file_creation(this.templater, file)); this.plugin.registerEvent(this.trigger_on_file_creation_event); } else { if (this.trigger_on_file_creation_event) { - app.vault.offref(this.trigger_on_file_creation_event); + this.plugin.app.vault.offref(this.trigger_on_file_creation_event); this.trigger_on_file_creation_event = void 0; } } } update_file_menu() { - this.plugin.registerEvent(app.workspace.on("file-menu", (menu, file) => { + this.plugin.registerEvent(this.plugin.app.workspace.on("file-menu", (menu, file) => { if (file instanceof import_obsidian13.TFolder) { menu.addItem((item) => { item.setTitle("Create new note from template").setIcon("templater-icon").onClick(() => { @@ -3862,6 +3853,7 @@ var CommandHandler = class { this.plugin.addCommand({ id: "insert-templater", name: "Open Insert Template modal", + icon: "templater-icon", hotkeys: [ { modifiers: ["Alt"], @@ -3875,6 +3867,7 @@ var CommandHandler = class { this.plugin.addCommand({ id: "replace-in-file-templater", name: "Replace templates in the active file", + icon: "templater-icon", hotkeys: [ { modifiers: ["Alt"], @@ -3888,6 +3881,7 @@ var CommandHandler = class { this.plugin.addCommand({ id: "jump-to-next-cursor-location", name: "Jump to next cursor location", + icon: "text-cursor", hotkeys: [ { modifiers: ["Alt"], @@ -3901,6 +3895,7 @@ var CommandHandler = class { this.plugin.addCommand({ id: "create-new-note-from-template", name: "Create new note from template", + icon: "templater-icon", hotkeys: [ { modifiers: ["Alt"], @@ -3926,6 +3921,7 @@ var CommandHandler = class { this.plugin.addCommand({ id: new_template, name: `Insert ${new_template}`, + icon: "templater-icon", callback: () => { const template = errorWrapperSync(() => resolve_tfile(new_template), `Couldn't find the template file associated with this hotkey`); if (!template) { @@ -4038,7 +4034,7 @@ var CursorJumper = class { var import_obsidian15 = __toModule(require("obsidian")); // toml:/home/runner/work/Templater/Templater/docs/documentation.toml -var tp = { config: { name: "config", description: "This module exposes Templater's running configuration.\n\nThis is mostly useful when writing scripts requiring some context information.\n", functions: { template_file: { name: "template_file", description: "The `TFile` object representing the template file.", definition: "tp.config.template_file" }, target_file: { name: "target_file", description: "The `TFile` object representing the target file where the template will be inserted.", definition: "tp.config.target_file" }, run_mode: { name: "run_mode", description: "The `RunMode`, representing the way Templater was launched (Create new from template, Append to active file, ...)", definition: "tp.config.run_mode" }, active_file: { name: "active_file", description: "The active file (if existing) when launching Templater.", definition: "tp.config.active_file?" } } }, date: { name: "date", description: "This module contains every internal function related to dates.", functions: { now: { name: "now", description: "Retrieves the date.", definition: 'tp.date.now(format: string = "YYYY-MM-DD", offset?: number\u23AEstring, reference?: string, reference_format?: string)', args: [{ name: "format", description: "Format for the date, refer to [format reference](https://momentjs.com/docs/#/displaying/format/)" }, { name: "offset", description: "Offset for the day, e.g. set this to `-7` to get last week's date. You can also specify the offset as a string using the ISO 8601 format" }, { name: "reference", description: "The date referential, e.g. set this to the note's title" }, { name: "reference_format", description: "The date reference format." }] }, tomorrow: { name: "tomorrow", description: "Retrieves tomorrow's date.", definition: 'tp.date.tomorrow(format: string = "YYYY-MM-DD")', args: [{ name: "format", description: "Format for the date, refer to [format reference](https://momentjs.com/docs/#/displaying/format/)" }] }, yesterday: { name: "yesterday", description: "Retrieves yesterday's date.", definition: 'tp.date.yesterday(format: string = "YYYY-MM-DD")', args: [{ name: "format", description: "Format for the date, refer to [format reference](https://momentjs.com/docs/#/displaying/format/)" }] }, weekday: { name: "weekday", description: "", definition: 'tp.date.weekday(format: string = "YYYY-MM-DD", weekday: number, reference?: string, reference_format?: string)', args: [{ name: "format", description: "Format for the date, refer to [format reference](https://momentjs.com/docs/#/displaying/format/)" }, { name: "weekday", description: "Week day number. If the locale assigns Monday as the first day of the week, `0` will be Monday, `-7` will be last week's day." }, { name: "reference", description: "The date referential, e.g. set this to the note's title" }, { name: "reference_format", description: "The date reference format." }] } } }, file: { name: "file", description: "This module contains every internal function related to files.", functions: { content: { name: "content", description: "Retrieves the file's content", definition: "tp.file.content" }, create_new: { name: "create_new", description: "Creates a new file using a specified template or with a specified content.", definition: "tp.file.create_new(template: TFile \u23AE string, filename?: string, open_new: boolean = false, folder?: TFolder)", args: [{ name: "template", description: "Either the template used for the new file content, or the file content as a string. If it is the template to use, you retrieve it with `tp.file.find_tfile(TEMPLATENAME)`" }, { name: "filename", description: 'The filename of the new file, defaults to "Untitled".' }, { name: "open_new", description: "Whether to open or not the newly created file. Warning: if you use this option, since commands are executed asynchronously, the file can be opened first and then other commands are appended to that new file and not the previous file." }, { name: "folder", description: 'The folder to put the new file in, defaults to obsidian\'s default location. If you want the file to appear in a different folder, specify it with `app.vault.getAbstractFileByPath("FOLDERNAME")`' }] }, creation_date: { name: "creation_date", description: "Retrieves the file's creation date.", definition: 'tp.file.creation_date(format: string = "YYYY-MM-DD HH:mm")', args: [{ name: "format", description: "Format for the date, refer to format reference" }] }, cursor: { name: "cursor", description: "Sets the cursor to this location after the template has been inserted. \n\nYou can navigate between the different tp.file.cursor using the configured hotkey in obsidian settings.\n", definition: "tp.file.cursor(order?: number)", args: [{ name: "order", description: "The order of the different cursors jump, e.g. it will jump from 1 to 2 to 3, and so on.\nIf you specify multiple tp.file.cursor with the same order, the editor will switch to multi-cursor.\n" }] }, cursor_append: { name: "cursor_append", description: "Appends some content after the active cursor in the file.", definition: "tp.file.cursor_append(content: string)", args: [{ name: "content", description: "The content to append after the active cursor" }] }, exists: { name: "exists", description: "The filename of the file we want to check existence. The fullpath to the file, relative to the Vault and containing the extension, must be provided. e.g. MyFolder/SubFolder/MyFile.", definition: "tp.file.exists(filename: string)", args: [{ name: "filename", description: "The filename of the file we want to check existence, e.g. MyFile." }] }, find_tfile: { name: "find_tfile", description: "Search for a file and returns its `TFile` instance", definition: "tp.file.find_tfile(filename: string)", args: [{ name: "filename", description: "The filename we want to search and resolve as a `TFile`" }] }, folder: { name: "folder", description: "Retrieves the file's folder name.", definition: "tp.file.folder(relative: boolean = false)", args: [{ name: "relative", description: "If set to true, appends the vault relative path to the folder name." }] }, include: { name: "include", description: "Includes the file's link content. Templates in the included content will be resolved.", definition: "tp.file.include(include_link: string \u23AE TFile)", args: [{ name: "include_link", description: "The link to the file to include, e.g. [[MyFile]], or a TFile object. Also supports sections or blocks inclusions, e.g. [[MyFile#Section1]]" }] }, last_modified_date: { name: "last_modified_date", description: "Retrieves the file's last modification date.", definition: 'tp.file.last_modified_date(format: string = "YYYY-MM-DD HH:mm")', args: [{ name: "format", description: "Format for the date, refer to format reference." }] }, move: { name: "functions.move", description: "Moves the file to the desired vault location.", definition: "tp.file.move(new_path: string, file_to_move?: TFile)", example: '<% tp.file.move("/Notes/MyNote") %>', args: [{ name: "new_path", description: 'The new vault relative path of the file, without the file extension. Note: the new path needs to include the folder and the filename, e.g. `"/Notes/MyNote"`' }, { name: "file_to_move", description: "The file to move, defaults to the current file." }] }, path: { name: "path", description: "Retrieves the file's absolute path on the system.", definition: "tp.file.path(relative: boolean = false)", args: [{ name: "relative", description: "If set to true, only retrieves the vault's relative path." }] }, rename: { name: "rename", description: "Renames the file (keeps the same file extension).", definition: "tp.file.rename(new_title: string)", args: [{ name: "new_title", description: "The new file title." }] }, selection: { name: "selection", description: "Retrieves the active file's text selection.", definition: "tp.file.selection()" }, tags: { name: "tags", description: "Retrieves the file's tags (array of string)", definition: "tp.file.tags" }, title: { name: "title", definition: "tp.file.title", description: "Retrieves the file's title." } } }, frontmatter: { name: "frontmatter", description: "This modules exposes all the frontmatter variables of a file as variables." }, hooks: { name: "hooks", description: "This module exposes hooks that allow you to execute code when a Templater event occurs.", functions: { on_all_templates_executed: { name: "on_all_templates_executed", description: "Hooks into when all actively running templates have finished executing. Most of the time this will be a single template, unless you are using `tp.file.include` or `tp.file.create_new`.\n\nMultiple invokations of this method will have their callback functions run in parallel.", definition: "tp.hooks.on_all_templates_executed(callback_function: () => any)", args: [{ name: "callback_function", description: "Callback function that will be executed when all actively running templates have finished executing." }] } } }, obsidian: { name: "obsidian", description: "This module exposes all the functions and classes from the obsidian API." }, system: { name: "system", description: "This module contains system related functions.", functions: { clipboard: { name: "clipboard", description: "Retrieves the clipboard's content", definition: "tp.system.clipboard()" }, prompt: { name: "prompt", description: "Spawns a prompt modal and returns the user's input.", definition: "tp.system.prompt(prompt_text?: string, default_value?: string, throw_on_cancel: boolean = false, multiline?: boolean = false)", args: [{ name: "prompt_text", description: "Text placed above the input field" }, { name: "default_value", description: "A default value for the input field" }, { name: "throw_on_cancel", description: "Throws an error if the prompt is canceled, instead of returning a `null` value" }, { name: "multiline", description: "If set to true, the input field will be a multiline textarea" }] }, suggester: { name: "suggester", description: "Spawns a suggester prompt and returns the user's chosen item.", definition: 'tp.system.suggester(text_items: string[] \u23AE ((item: T) => string), items: T[], throw_on_cancel: boolean = false, placeholder: string = "", limit?: number = undefined)', args: [{ name: "text_items", description: "Array of strings representing the text that will be displayed for each item in the suggester prompt. This can also be a function that maps an item to its text representation." }, { name: "items", description: "Array containing the values of each item in the correct order." }, { name: "throw_on_cancel", description: "Throws an error if the prompt is canceled, instead of returning a `null` value" }, { name: "placeholder", description: "Placeholder string of the prompt" }, { name: "limit", description: "Limit the number of items rendered at once (useful to improve performance when displaying large lists)" }] } } }, web: { name: "web", description: "This modules contains every internal function related to the web (making web requests).", functions: { daily_quote: { name: "daily_quote", description: "Retrieves and parses the daily quote from the API https://api.quotable.io", definition: "tp.web.daily_quote()" }, random_picture: { name: "random_picture", description: "Gets a random image from https://unsplash.com/", definition: "tp.web.random_picture(size?: string, query?: string, include_size?: boolean)", args: [{ name: "size", description: "Image size in the format `x`" }, { name: "query", description: "Limits selection to photos matching a search term. Multiple search terms can be passed separated by a comma `,`" }, { name: "include_size", description: "Optional argument to include the specified size in the image link markdown. Defaults to false" }] } } } }; +var tp = { config: { name: "config", description: "This module exposes Templater's running configuration.\n\nThis is mostly useful when writing scripts requiring some context information.\n", functions: { template_file: { name: "template_file", description: "The `TFile` object representing the template file.", definition: "tp.config.template_file" }, target_file: { name: "target_file", description: "The `TFile` object representing the target file where the template will be inserted.", definition: "tp.config.target_file" }, run_mode: { name: "run_mode", description: "The `RunMode`, representing the way Templater was launched (Create new from template, Append to active file, ...).", definition: "tp.config.run_mode" }, active_file: { name: "active_file", description: "The active file (if existing) when launching Templater.", definition: "tp.config.active_file?" } } }, date: { name: "date", description: "This module contains every internal function related to dates.", functions: { now: { name: "now", description: "Retrieves the date.", definition: 'tp.date.now(format: string = "YYYY-MM-DD", offset?: number\u23AEstring, reference?: string, reference_format?: string)', args: [{ name: "format", description: 'The format for the date. Defaults to `"YYYY-MM-DD"`. Refer to [format reference](https://momentjs.com/docs/#/displaying/format/).' }, { name: "offset", description: "Duration to offset the date from. If a number is provided, duration will be added to the date in days. You can also specify the offset as a string using the ISO 8601 format." }, { name: "reference", description: "The date referential, e.g. set this to the note's title." }, { name: "reference_format", description: "The format for the reference date. Refer to [format reference](https://momentjs.com/docs/#/displaying/format/)." }], examples: [{ name: "Date now", example: "<% tp.date.now() %>" }, { name: "Date now with format", example: '<% tp.date.now("Do MMMM YYYY") %>' }, { name: "Last week", example: '<% tp.date.now("YYYY-MM-DD", -7) %>' }, { name: "Next week", example: '<% tp.date.now("YYYY-MM-DD", 7) %>' }, { name: "Last month", example: '<% tp.date.now("YYYY-MM-DD", "P-1M") %>' }, { name: "Next year", example: '<% tp.date.now("YYYY-MM-DD", "P1Y") %>' }, { name: "File's title date + 1 day (tomorrow)", example: '<% tp.date.now("YYYY-MM-DD", 1, tp.file.title, "YYYY-MM-DD") %>' }, { name: "File's title date - 1 day (yesterday)", example: '<% tp.date.now("YYYY-MM-DD", -1, tp.file.title, "YYYY-MM-DD") %>' }] }, tomorrow: { name: "tomorrow", description: "Retrieves tomorrow's date.", definition: 'tp.date.tomorrow(format: string = "YYYY-MM-DD")', args: [{ name: "format", description: 'The format for the date. Defaults to `"YYYY-MM-DD"`. Refer to [format reference](https://momentjs.com/docs/#/displaying/format/).' }], examples: [{ name: "Date tomorrow", example: "<% tp.date.tomorrow() %>" }, { name: "Date tomorrow with format", example: '<% tp.date.tomorrow("Do MMMM YYYY") %>' }] }, yesterday: { name: "yesterday", description: "Retrieves yesterday's date.", definition: 'tp.date.yesterday(format: string = "YYYY-MM-DD")', args: [{ name: "format", description: 'The format for the date. Defaults to `"YYYY-MM-DD"`. Refer to [format reference](https://momentjs.com/docs/#/displaying/format/).' }], examples: [{ name: "Date yesterday", example: "<% tp.date.yesterday() %>" }, { name: "Date yesterday with format", example: '<% tp.date.yesterday("Do MMMM YYYY") %>' }] }, weekday: { name: "weekday", description: "", definition: 'tp.date.weekday(format: string = "YYYY-MM-DD", weekday: number, reference?: string, reference_format?: string)', args: [{ name: "format", description: 'The format for the date. Defaults to `"YYYY-MM-DD"`. Refer to [format reference](https://momentjs.com/docs/#/displaying/format/).' }, { name: "weekday", description: "Week day number. If the locale assigns Monday as the first day of the week, `0` will be Monday, `-7` will be last week's day." }, { name: "reference", description: "The date referential, e.g. set this to the note's title." }, { name: "reference_format", description: "The format for the reference date. Refer to [format reference](https://momentjs.com/docs/#/displaying/format/)." }], examples: [{ name: "This week's Monday", example: '<% tp.date.weekday("YYYY-MM-DD", 0) %>' }, { name: "Next Monday", example: '<% tp.date.weekday("YYYY-MM-DD", 7) %>' }, { name: "File's title Monday", example: '<% tp.date.weekday("YYYY-MM-DD", 0, tp.file.title, "YYYY-MM-DD") %>' }, { name: "File's title previous Monday", example: '<% tp.date.weekday("YYYY-MM-DD", -7, tp.file.title, "YYYY-MM-DD") %>' }] } } }, file: { name: "file", description: "This module contains every internal function related to files.", functions: { content: { name: "content", description: "The string contents of the file at the time that Templater was executed. Manipulating this string will *not* update the current file.", definition: "tp.file.content", examples: [{ name: "Retrieve file content", example: "<% tp.file.content %>" }] }, create_new: { name: "create_new", description: "Creates a new file using a specified template or with a specified content.", definition: "tp.file.create_new(template: TFile \u23AE string, filename?: string, open_new: boolean = false, folder?: TFolder)", args: [{ name: "template", description: "Either the template used for the new file content, or the file content as a string. If it is the template to use, you retrieve it with `tp.file.find_tfile(TEMPLATENAME)`." }, { name: "filename", description: 'The filename of the new file, defaults to "Untitled".' }, { name: "open_new", description: "Whether to open or not the newly created file. Warning: if you use this option, since commands are executed asynchronously, the file can be opened first and then other commands are appended to that new file and not the previous file." }, { name: "folder", description: 'The folder to put the new file in, defaults to Obsidian\'s default location. If you want the file to appear in a different folder, specify it with `app.vault.getAbstractFileByPath("FOLDERNAME")`.' }], examples: [{ name: "File creation", example: '<%* await tp.file.create_new("MyFileContent", "MyFilename") %>' }, { name: "File creation with template", example: '<%* await tp.file.create_new(tp.file.find_tfile("MyTemplate"), "MyFilename") %>' }, { name: "File creation and open created note", example: '<%* await tp.file.create_new("MyFileContent", "MyFilename", true) %>' }, { name: "File creation in current folder", example: '<%* await tp.file.create_new("MyFileContent", "MyFilename", false, tp.file.folder()) %>' }, { name: "File creation in specified folder", example: '<%* await tp.file.create_new("MyFileContent", "MyFilename", false, app.vault.getAbstractFileByPath("MyFolder")) %>' }, { name: "File creation and append link to current note", example: '[[<% (await tp.file.create_new("MyFileContent", "MyFilename")).basename %>]]' }] }, creation_date: { name: "creation_date", description: "Retrieves the file's creation date.", definition: 'tp.file.creation_date(format: string = "YYYY-MM-DD HH:mm")', args: [{ name: "format", description: 'The format for the date. Defaults to `"YYYY-MM-DD HH:mm"`. Refer to [format reference](https://momentjs.com/docs/#/displaying/format/).' }], examples: [{ name: "File creation date", example: "<% tp.file.creation_date() %>" }, { name: "File creation date with format", example: '<% tp.file.creation_date("dddd Do MMMM YYYY HH:mm") %>' }] }, cursor: { name: "cursor", description: "Sets the cursor to this location after the template has been inserted. \n\nYou can navigate between the different cursors using the configured hotkey in Obsidian settings.\n", definition: "tp.file.cursor(order?: number)", args: [{ name: "order", description: "The order of the different cursors jump, e.g. it will jump from 1 to 2 to 3, and so on.\nIf you specify multiple tp.file.cursor with the same order, the editor will switch to multi-cursor.\n" }], examples: [{ name: "File cursor", example: "<% tp.file.cursor() %>" }, { name: "File multi-cursor", example: "<% tp.file.cursor(1) %>Content<% tp.file.cursor(1) %>" }] }, cursor_append: { name: "cursor_append", description: "Appends some content after the active cursor in the file.", definition: "tp.file.cursor_append(content: string)", args: [{ name: "content", description: "The content to append after the active cursor." }], examples: [{ name: "File cursor append", example: '<% tp.file.cursor_append("Some text") %>' }] }, exists: { name: "exists", description: "Check to see if a file exists by it's file path. The full path to the file, relative to the Vault and containing the extension, must be provided.", definition: "tp.file.exists(filepath: string)", args: [{ name: "filepath", description: "The full file path of the file we want to check existence for." }], examples: [{ name: "File existence", example: '<% await tp.file.exists("MyFolder/MyFile.md") %>' }, { name: "File existence of current file", example: '<% await tp.file.exists(tp.file.folder(true) + "/" + tp.file.title + ".md") %>' }] }, find_tfile: { name: "find_tfile", description: "Search for a file and returns its `TFile` instance.", definition: "tp.file.find_tfile(filename: string)", args: [{ name: "filename", description: "The filename we want to search and resolve as a `TFile`." }], examples: [{ name: "File find TFile", example: '<% tp.file.find_tfile("MyFile").basename %>' }] }, folder: { name: "folder", description: "Retrieves the file's folder name.", definition: "tp.file.folder(relative: boolean = false)", args: [{ name: "relative", description: "If set to `true`, appends the vault relative path to the folder name. If `false`, only retrieves name of folder. Defaults to `false`." }], examples: [{ name: "File folder (Folder)", example: "<% tp.file.folder() %>" }, { name: "File folder with relative path (Path/To/Folder)", example: "<% tp.file.folder(true) %>" }] }, include: { name: "include", description: "Includes the file's link content. Templates in the included content will be resolved.", definition: "tp.file.include(include_link: string \u23AE TFile)", args: [{ name: "include_link", description: 'The link to the file to include, e.g. `"[[MyFile]]"`, or a TFile object. Also supports sections or blocks inclusions.' }], examples: [{ name: "File include", example: '<% tp.file.include("[[Template1]]") %>' }, { name: "File include TFile", example: '<% tp.file.include(tp.file.find_tfile("MyFile")) %>' }, { name: "File include section", example: '<% tp.file.include("[[MyFile#Section1]]") %>' }, { name: "File include block", example: '<% tp.file.include("[[MyFile#^block1]]") %>' }] }, last_modified_date: { name: "last_modified_date", description: "Retrieves the file's last modification date.", definition: 'tp.file.last_modified_date(format: string = "YYYY-MM-DD HH:mm")', args: [{ name: "format", description: 'The format for the date. Defaults to `"YYYY-MM-DD HH:mm"`. Refer to [format reference](https://momentjs.com/docs/#/displaying/format/).' }], examples: [{ name: "File last modified date", example: "<% tp.file.last_modified_date() %>" }, { name: "File last modified date with format", example: '<% tp.file.last_modified_date("dddd Do MMMM YYYY HH:mm") %>' }] }, move: { name: "move", description: "Moves the file to the desired vault location.", definition: "tp.file.move(new_path: string, file_to_move?: TFile)", args: [{ name: "new_path", description: 'The new vault relative path of the file, without the file extension. Note: the new path needs to include the folder and the filename, e.g. `"/Notes/MyNote"`.' }, { name: "file_to_move", description: "The file to move, defaults to the current file." }], examples: [{ name: "File move", example: '<% await tp.file.move("/A/B/" + tp.file.title) %>' }, { name: "File move and rename", example: '<% await tp.file.move("/A/B/NewTitle") %>' }] }, path: { name: "path", description: "Retrieves the file's absolute path on the system.", definition: "tp.file.path(relative: boolean = false)", args: [{ name: "relative", description: "If set to `true`, only retrieves the vault's relative path." }], examples: [{ name: "File path", example: "<% tp.file.path() %>" }, { name: "File relative path (relative to vault root)", example: "<% tp.file.path(true) %>" }] }, rename: { name: "rename", description: "Renames the file (keeps the same file extension).", definition: "tp.file.rename(new_title: string)", args: [{ name: "new_title", description: "The new file title." }], examples: [{ name: "File rename", example: '<% await tp.file.rename("MyNewName") %>' }, { name: "File append a 2 to the file name", example: '<% await tp.file.rename(tp.file.title + "2") %>' }] }, selection: { name: "selection", description: "Retrieves the active file's text selection.", definition: "tp.file.selection()", examples: [{ name: "File selection", example: "<% tp.file.selection() %>" }] }, tags: { name: "tags", description: "Retrieves the file's tags (array of string).", definition: "tp.file.tags", examples: [{ name: "File tags", example: "<% tp.file.tags %>" }] }, title: { name: "title", definition: "tp.file.title", description: "Retrieves the file's title.", examples: [{ name: "File title", example: "<% tp.file.title %>" }, { name: "Strip the Zettelkasten ID of title (if space separated)", example: '<% tp.file.title.split(" ")[1] %>' }] } } }, frontmatter: { name: "frontmatter", description: "This modules exposes all the frontmatter variables of a file as variables." }, hooks: { name: "hooks", description: "This module exposes hooks that allow you to execute code when a Templater event occurs.", functions: { on_all_templates_executed: { name: "on_all_templates_executed", description: "Hooks into when all actively running templates have finished executing. Most of the time this will be a single template, unless you are using `tp.file.include` or `tp.file.create_new`.\n\nMultiple invokations of this method will have their callback functions run in parallel.", definition: "tp.hooks.on_all_templates_executed(callback_function: () => any)", args: [{ name: "callback_function", description: "Callback function that will be executed when all actively running templates have finished executing." }] } } }, obsidian: { name: "obsidian", description: "This module exposes all the functions and classes from the Obsidian API." }, system: { name: "system", description: "This module contains system related functions.", functions: { clipboard: { name: "clipboard", description: "Retrieves the clipboard's content.", definition: "tp.system.clipboard()", examples: [{ name: "Clipboard", example: "<% tp.system.clipboard() %>" }] }, prompt: { name: "prompt", description: "Spawns a prompt modal and returns the user's input.", definition: "tp.system.prompt(prompt_text?: string, default_value?: string, throw_on_cancel: boolean = false, multiline?: boolean = false)", args: [{ name: "prompt_text", description: "Text placed above the input field." }, { name: "default_value", description: "A default value for the input field." }, { name: "throw_on_cancel", description: "Throws an error if the prompt is canceled, instead of returning a `null` value." }, { name: "multiline", description: "If set to `true`, the input field will be a multiline textarea. Defaults to `false`." }], examples: [{ name: "Prompt", example: '<% tp.system.prompt("Please enter a value") %>' }, { name: "Prompt with default value", example: '<% tp.system.prompt("What is your mood today?", "happy") %>' }] }, suggester: { name: "suggester", description: "Spawns a suggester prompt and returns the user's chosen item.", definition: 'tp.system.suggester(text_items: string[] \u23AE ((item: T) => string), items: T[], throw_on_cancel: boolean = false, placeholder: string = "", limit?: number = undefined)', args: [{ name: "text_items", description: "Array of strings representing the text that will be displayed for each item in the suggester prompt. This can also be a function that maps an item to its text representation." }, { name: "items", description: "Array containing the values of each item in the correct order." }, { name: "throw_on_cancel", description: "Throws an error if the prompt is canceled, instead of returning a `null` value." }, { name: "placeholder", description: "Placeholder string of the prompt." }, { name: "limit", description: "Limit the number of items rendered at once (useful to improve performance when displaying large lists)." }], examples: [{ name: "Suggester", example: '<% tp.system.suggester(["Happy", "Sad", "Confused"], ["Happy", "Sad", "Confused"]) %>' }, { name: "Suggester with mapping function (same as above example)", example: '<% tp.system.suggester((item) => item, ["Happy", "Sad", "Confused"]) %>' }, { name: "Suggester for files", example: "[[<% (await tp.system.suggester((item) => item.basename, app.vault.getMarkdownFiles())).basename %>]]" }, { name: "Suggester for tags", example: '<% tp.system.suggester(item => item, Object.keys(app.metadataCache.getTags()).map(x => x.replace("#", ""))) %>' }] } } }, web: { name: "web", description: "This modules contains every internal function related to the web (making web requests).", functions: { daily_quote: { name: "daily_quote", description: "Retrieves and parses the daily quote from the API `https://api.quotable.io` as a callout.", definition: "tp.web.daily_quote()", examples: [{ name: "Daily quote", example: "<% tp.web.daily_quote() %>" }] }, random_picture: { name: "random_picture", description: "Gets a random image from `https://unsplash.com/`.", definition: "tp.web.random_picture(size?: string, query?: string, include_size?: boolean)", args: [{ name: "size", description: "Image size in the format `x`." }, { name: "query", description: "Limits selection to photos matching a search term. Multiple search terms can be passed separated by a comma." }, { name: "include_size", description: "Optional argument to include the specified size in the image link markdown. Defaults to false." }], examples: [{ name: "Random picture", example: "<% tp.web.random_picture() %>" }, { name: "Random picture with size", example: '<% tp.web.random_picture("200x200") %>' }, { name: "Random picture with size and query", example: '<% tp.web.random_picture("200x200", "landscape,water") %>' }] } } } }; var documentation_default = { tp }; // src/editor/TpDocumentation.ts @@ -5440,7 +5436,7 @@ var Autocomplete = class extends import_obsidian15.EditorSuggest { return { state: state.base, mode: base }; }, blankLine: function(state) { - var baseToken, overlayToken; + let baseToken, overlayToken; if (base.blankLine) baseToken = base.blankLine(state.base); if (overlay.blankLine) @@ -5453,6 +5449,8 @@ var Autocomplete = class extends import_obsidian15.EditorSuggest { // src/editor/Editor.ts var import_language = __toModule(require("@codemirror/language")); +var import_state = __toModule(require("@codemirror/state")); +var TEMPLATER_MODE_NAME = "templater"; var TP_CMD_TOKEN_CLASS = "templater-command"; var TP_INLINE_CLASS = "templater-inline"; var TP_OPENING_TAG_TOKEN_CLASS = "templater-opening-tag"; @@ -5463,6 +5461,7 @@ var Editor2 = class { constructor(plugin) { this.plugin = plugin; this.cursor_jumper = new CursorJumper(); + this.activeEditorExtensions = []; } desktopShouldHighlight() { return import_obsidian16.Platform.isDesktopApp && this.plugin.settings.syntax_highlighting; @@ -5471,17 +5470,34 @@ var Editor2 = class { return import_obsidian16.Platform.isMobileApp && this.plugin.settings.syntax_highlighting_mobile; } async setup() { - await this.registerCodeMirrorMode(); this.plugin.registerEditorSuggest(new Autocomplete(this.plugin.settings)); + await this.registerCodeMirrorMode(); + this.templaterLanguage = import_state.Prec.high(import_language.StreamLanguage.define(window.CodeMirror.getMode({}, TEMPLATER_MODE_NAME))); + if (this.templaterLanguage === void 0) { + log_error(new TemplaterError("Unable to enable syntax highlighting. Could not define language.")); + } + this.plugin.registerEditorExtension(this.activeEditorExtensions); if (this.desktopShouldHighlight() || this.mobileShouldHighlight()) { - this.plugin.registerEditorExtension(import_language.StreamLanguage.define(window.CodeMirror.getMode({}, { name: "templater" }))); + await this.enable_highlighter(); + } + } + async enable_highlighter() { + if (this.activeEditorExtensions.length === 0 && this.templaterLanguage) { + this.activeEditorExtensions.push(this.templaterLanguage); + this.plugin.app.workspace.updateOptions(); + } + } + async disable_highlighter() { + if (this.activeEditorExtensions.length > 0) { + this.activeEditorExtensions.pop(); + this.plugin.app.workspace.updateOptions(); } } async jump_to_next_cursor_location(file = null, auto_jump = false) { if (auto_jump && !this.plugin.settings.auto_jump_to_cursor) { return; } - if (file && get_active_file(app) !== file) { + if (file && get_active_file(this.plugin.app) !== file) { return; } await this.cursor_jumper.jump_to_next_cursor_location(); @@ -5500,7 +5516,7 @@ var Editor2 = class { log_error(new TemplaterError("Couldn't find customOverlayMode, can't enable syntax highlighting.")); return; } - window.CodeMirror.defineMode("templater", function(config) { + window.CodeMirror.defineMode(TEMPLATER_MODE_NAME, function(config) { const templaterOverlay = { startState: function() { const js_state = window.CodeMirror.startState(js_mode); diff --git a/.obsidian/plugins/templater-obsidian/manifest.json b/.obsidian/plugins/templater-obsidian/manifest.json index c9404c9..7a7f07b 100644 --- a/.obsidian/plugins/templater-obsidian/manifest.json +++ b/.obsidian/plugins/templater-obsidian/manifest.json @@ -1,9 +1,9 @@ { "id": "templater-obsidian", "name": "Templater", - "version": "1.18.3", + "version": "2.1.0", "description": "Create and use templates", - "minAppVersion": "0.11.13", + "minAppVersion": "1.5.0", "author": "SilentVoid", "authorUrl": "https://github.com/SilentVoid13", "helpUrl": "https://silentvoid13.github.io/Templater/", diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index 3bf53ae..aed6282 100644 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -153,7 +153,9 @@ "state": { "type": "all-properties", "state": { - "sortOrder": "frequency" + "sortOrder": "frequency", + "showSearch": false, + "searchQuery": "" } } } @@ -166,24 +168,28 @@ }, "left-ribbon": { "hiddenItems": { - "switcher:Open quick switcher": false, - "graph:Open graph view": false, - "canvas:Create new canvas": false, - "daily-notes:Open today's daily note": false, - "command-palette:Open command palette": false, - "random-note:Open random note": false, - "workspaces:Manage workspace layouts": false, + "switcher:打开快速切换": false, + "graph:查看关系图谱": false, + "canvas:新建白板": false, + "daily-notes:打开/创建今天的日记": false, + "command-palette:打开命令面板": false, + "random-note:开始漫游笔记": false, + "workspaces:管理工作区布局": false, "templater-obsidian:Templater": false, "periodic-para:Periodic PARA": false } }, - "active": "9110575c83bff6ab", + "active": "1ae82b8d469273d8", "lastOpenFiles": [ + "0. PeriodicNotes/2024/Weekly/2024-W02.md", + "3. Resources/Template.md", + "0. PeriodicNotes/2024/Weekly", + "0. PeriodicNotes/2024", + "0. PeriodicNotes/2024/Weekly/2024-W2.md", "3. Resources/EnglishLearning/README.md", "2. Areas/Life/Life.README.md", "1. Projects/PKM-LifeOS/LifeOS.README.md", "1. Projects/PKM-LifeOS/PeriodicPARA.md", - "3. Resources/Template.md", "5. Express/README.md", "5. Express", "1. Projects/Template.md", @@ -212,10 +218,6 @@ "0. PeriodicNotes/2023/Daily/08/2023-08-26.md", "0. PeriodicNotes/2023/Daily/08", "4. Archives/Template.md", - "2. Areas/Template.md", - "0. PeriodicNotes/Templates/Weekly.md", - "0. PeriodicNotes/Templates", - "Templates/PeriodicNotes", "4. Archives/育儿-宝宝起名/林奕如.png", "4. Archives/育儿-宝宝起名/baby-name.png", "1. Projects/分享-2023 WOT 分享会/架构图/Polyrepo.svg",