/* THIS IS A GENERATED/BUNDLED FILE BY ESBUILD if you want to view the source visit the plugins github repository */ /* License obsidian-tasks: MIT License Copyright (c) 2021 Martin Schenck and Clare Macrae Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* License rrule (included library): rrule.js: Library for working with recurrence rules for calendar dates. ======================================================================= Copyright 2010, Jakub Roztocil and Lars Schöning Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of The author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ./rrule.js and ./test/tests.js is based on python-dateutil. LICENCE: python-dateutil - Extensions to the standard Python datetime module. ==================================================================== Copyright (c) 2003-2011 - Gustavo Niemeyer Copyright (c) 2012 - Tomi Pieviläinen All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* License chrono-node (included library): The MIT License Copyright (c) 2014, Wanasit Tanakitrungruang Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ "use strict";var Ik=Object.create;var Bi=Object.defineProperty,Fk=Object.defineProperties,Lk=Object.getOwnPropertyDescriptor,Yk=Object.getOwnPropertyDescriptors,Uk=Object.getOwnPropertyNames,um=Object.getOwnPropertySymbols,Wk=Object.getPrototypeOf,cm=Object.prototype.hasOwnProperty,qk=Object.prototype.propertyIsEnumerable;var lm=(r,e,t)=>e in r?Bi(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Pe=(r,e)=>{for(var t in e||(e={}))cm.call(e,t)&&lm(r,t,e[t]);if(um)for(var t of um(e))qk.call(e,t)&&lm(r,t,e[t]);return r},tr=(r,e)=>Fk(r,Yk(e));var O=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),jk=(r,e)=>{for(var t in e)Bi(r,t,{get:e[t],enumerable:!0})},dm=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Uk(e))!cm.call(r,s)&&s!==t&&Bi(r,s,{get:()=>e[s],enumerable:!(n=Lk(e,s))||n.enumerable});return r};var Ln=(r,e,t)=>(t=r!=null?Ik(Wk(r)):{},dm(e||!r||!r.__esModule?Bi(t,"default",{value:r,enumerable:!0}):t,r)),$k=r=>dm(Bi({},"__esModule",{value:!0}),r);var Q=(r,e,t)=>new Promise((n,s)=>{var a=c=>{try{l(t.next(c))}catch(f){s(f)}},o=c=>{try{l(t.throw(c))}catch(f){s(f)}},l=c=>c.done?n(c.value):Promise.resolve(c.value).then(a,o);l((t=t.apply(r,e)).next())});var Fe=O(Yn=>{"use strict";Object.defineProperty(Yn,"__esModule",{value:!0});Yn.matchAnyPattern=Yn.extractTerms=Yn.repeatedTimeunitPattern=void 0;function zk(r,e){let t=e.replace(/\((?!\?)/g,"(?:");return`${r}${t}\\s{0,5}(?:,?\\s{0,5}${t}){0,10}`}Yn.repeatedTimeunitPattern=zk;function fm(r){let e;return r instanceof Array?e=[...r]:r instanceof Map?e=Array.from(r.keys()):e=Object.keys(r),e}Yn.extractTerms=fm;function Vk(r){return`(?:${fm(r).sort((t,n)=>n.length-t.length).join("|").replace(/\./g,"\\.")})`}Yn.matchAnyPattern=Vk});var Re=O((jl,$l)=>{(function(r,e){typeof jl=="object"&&typeof $l!="undefined"?$l.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs=e()})(jl,function(){"use strict";var r=1e3,e=6e4,t=36e5,n="millisecond",s="second",a="minute",o="hour",l="day",c="week",f="month",p="quarter",g="year",T="date",S="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,C={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},G=function(z,W,A){var ee=String(z);return!ee||ee.length>=W?z:""+Array(W+1-ee.length).join(A)+z},K={s:G,z:function(z){var W=-z.utcOffset(),A=Math.abs(W),ee=Math.floor(A/60),Y=A%60;return(W<=0?"+":"-")+G(ee,2,"0")+":"+G(Y,2,"0")},m:function z(W,A){if(W.date(){"use strict";var Kk=Un&&Un.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Un,"__esModule",{value:!0});Un.findYearClosestToRef=Un.findMostLikelyADYear=void 0;var Zk=Kk(Re());function Qk(r){return r<100&&(r>50?r=r+1900:r=r+2e3),r}Un.findMostLikelyADYear=Qk;function Xk(r,e,t){let n=Zk.default(r),s=n;s=s.month(t-1),s=s.date(e),s=s.year(n.year());let a=s.add(1,"y"),o=s.add(-1,"y");return Math.abs(a.diff(n)){"use strict";Object.defineProperty(Te,"__esModule",{value:!0});Te.parseTimeUnits=Te.TIME_UNITS_PATTERN=Te.parseYear=Te.YEAR_PATTERN=Te.parseOrdinalNumberPattern=Te.ORDINAL_NUMBER_PATTERN=Te.parseNumberPattern=Te.NUMBER_PATTERN=Te.TIME_UNIT_DICTIONARY=Te.ORDINAL_WORD_DICTIONARY=Te.INTEGER_WORD_DICTIONARY=Te.MONTH_DICTIONARY=Te.FULL_MONTH_NAME_DICTIONARY=Te.WEEKDAY_DICTIONARY=void 0;var No=Fe(),Jk=Nt();Te.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};Te.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};Te.MONTH_DICTIONARY=Object.assign(Object.assign({},Te.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});Te.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};Te.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};Te.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"};Te.NUMBER_PATTERN=`(?:${No.matchAnyPattern(Te.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 pm(r){let e=r.toLowerCase();return Te.INTEGER_WORD_DICTIONARY[e]!==void 0?Te.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)}Te.parseNumberPattern=pm;Te.ORDINAL_NUMBER_PATTERN=`(?:${No.matchAnyPattern(Te.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:st|nd|rd|th)?)`;function eE(r){let e=r.toLowerCase();return Te.ORDINAL_WORD_DICTIONARY[e]!==void 0?Te.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}Te.parseOrdinalNumberPattern=eE;Te.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 tE(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 Jk.findMostLikelyADYear(e)}Te.parseYear=tE;var mm=`(${Te.NUMBER_PATTERN})\\s{0,3}(${No.matchAnyPattern(Te.TIME_UNIT_DICTIONARY)})`,hm=new RegExp(mm,"i");Te.TIME_UNITS_PATTERN=No.repeatedTimeunitPattern("(?:(?:about|around)\\s{0,3})?",mm);function rE(r){let e={},t=r,n=hm.exec(t);for(;n;)nE(e,n),t=t.substring(n[0].length).trim(),n=hm.exec(t);return e}Te.parseTimeUnits=rE;function nE(r,e){let t=pm(e[1]),n=Te.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var ym=O((Gl,Hl)=>{(function(r,e){typeof Gl=="object"&&typeof Hl!="undefined"?Hl.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs_plugin_quarterOfYear=e()})(Gl,function(){"use strict";var r="month",e="quarter";return function(t,n){var s=n.prototype;s.quarter=function(l){return this.$utils().u(l)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(l-1))};var a=s.add;s.add=function(l,c){return l=Number(l),this.$utils().p(c)===e?this.add(3*l,r):a.bind(this)(l,c)};var o=s.startOf;s.startOf=function(l,c){var f=this.$utils(),p=!!f.u(c)||c;if(f.p(l)===e){var g=this.quarter()-1;return p?this.month(3*g).startOf(r).startOf("day"):this.month(3*g+2).endOf(r).endOf("day")}return o.bind(this)(l,c)}}})});var gr=O(jr=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.implySimilarTime=jr.assignSimilarTime=jr.assignSimilarDate=jr.assignTheNextDay=void 0;var gm=_t();function sE(r,e){e=e.add(1,"day"),_m(r,e),Tm(r,e)}jr.assignTheNextDay=sE;function _m(r,e){r.assign("day",e.date()),r.assign("month",e.month()+1),r.assign("year",e.year())}jr.assignSimilarDate=_m;function iE(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",gm.Meridiem.AM):r.assign("meridiem",gm.Meridiem.PM)}jr.assignSimilarTime=iE;function Tm(r,e){r.imply("hour",e.hour()),r.imply("minute",e.minute()),r.imply("second",e.second()),r.imply("millisecond",e.millisecond())}jr.implySimilarTime=Tm});var bm=O(cs=>{"use strict";Object.defineProperty(cs,"__esModule",{value:!0});cs.toTimezoneOffset=cs.TIMEZONE_ABBR_MAP=void 0;cs.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 aE(r){var e;return r==null?null:typeof r=="number"?r:(e=cs.TIMEZONE_ABBR_MAP[r])!==null&&e!==void 0?e:null}cs.toTimezoneOffset=aE});var it=O($r=>{"use strict";var vm=$r&&$r.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($r,"__esModule",{value:!0});$r.ParsingResult=$r.ParsingComponents=$r.ReferenceWithTimezone=void 0;var oE=vm(ym()),Co=vm(Re()),Bl=gr(),uE=bm();Co.default.extend(oE.default);var zl=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=uE.toTimezoneOffset(e.timezone))}};$r.ReferenceWithTimezone=zl;var ds=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=Co.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 ds(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 Co.default(this.date())}date(){let e=this.dateWithoutTimezoneAdjustment();return new Date(e.getTime()+this.getSystemTimezoneAdjustmentMinute(e)*6e4)}dateWithoutTimezoneAdjustment(){let e=new Date(this.get("year"),this.get("month")-1,this.get("day"),this.get("hour"),this.get("minute"),this.get("second"),this.get("millisecond"));return e.setFullYear(this.get("year")),e}getSystemTimezoneAdjustmentMinute(e){var t,n;(!e||e.getTime()<0)&&(e=new Date);let s=-e.getTimezoneOffset(),a=(n=(t=this.get("timezoneOffset"))!==null&&t!==void 0?t:this.reference.timezoneOffset)!==null&&n!==void 0?n:s;return s-a}static createRelativeFromReference(e,t){let n=Co.default(e.instant);for(let a in t)n=n.add(t[a],a);let s=new ds(e);return t.hour||t.minute||t.second?(Bl.assignSimilarTime(s,n),Bl.assignSimilarDate(s,n),e.timezoneOffset!==null&&s.assign("timezoneOffset",-e.instant.getTimezoneOffset())):(Bl.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}};$r.ParsingComponents=ds;var zi=class{constructor(e,t,n,s,a){this.reference=e,this.refDate=e.instant,this.index=t,this.text=n,this.start=s||new ds(e),this.end=a}clone(){let e=new zi(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}', ...}]`}};$r.ParsingResult=zi});var Z=O(Io=>{"use strict";Object.defineProperty(Io,"__esModule",{value:!0});Io.AbstractParserWithWordBoundaryChecking=void 0;var Vl=class{constructor(){this.cachedInnerPattern=null,this.cachedPattern=null}patternLeftBoundary(){return"(\\W|^)"}pattern(e){let t=this.innerPattern(e);return t==this.cachedInnerPattern?this.cachedPattern:(this.cachedPattern=new RegExp(`${this.patternLeftBoundary()}${t.source}`,t.flags),this.cachedInnerPattern=t,this.cachedPattern)}extract(e,t){var n;let s=(n=t[1])!==null&&n!==void 0?n:"";t.index=t.index+s.length,t[0]=t[0].substring(s.length);for(let a=2;a{"use strict";Object.defineProperty(Ql,"__esModule",{value:!0});var Zl=Ct(),lE=it(),cE=Z(),dE=new RegExp(`(?:within|in|for)\\s*(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${Zl.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),fE=new RegExp(`(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${Zl.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Kl=class extends cE.AbstractParserWithWordBoundaryChecking{innerPattern(e){return e.option.forwardDate?fE:dE}innerExtract(e,t){let n=Zl.parseTimeUnits(t[1]);return lE.ParsingComponents.createRelativeFromReference(e.reference,n)}};Ql.default=Kl});var Mm=O(Jl=>{"use strict";Object.defineProperty(Jl,"__esModule",{value:!0});var hE=Nt(),Sm=Ct(),Om=Ct(),Fo=Ct(),pE=Fe(),mE=Z(),yE=new RegExp(`(?:on\\s{0,3})?(${Fo.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:to|\\-|\\\u2013|until|through|till)?\\s{0,3}(${Fo.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s{0,3}(?:of)?\\s{0,3})(${pE.matchAnyPattern(Sm.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s{0,3})(${Om.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),km=1,Em=2,gE=3,Dm=4,Xl=class extends mE.AbstractParserWithWordBoundaryChecking{innerPattern(){return yE}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=Sm.MONTH_DICTIONARY[t[gE].toLowerCase()],a=Fo.parseOrdinalNumberPattern(t[km]);if(a>31)return t.index=t.index+t[km].length,null;if(n.start.assign("month",s),n.start.assign("day",a),t[Dm]){let o=Om.parseYear(t[Dm]);n.start.assign("year",o)}else{let o=hE.findYearClosestToRef(e.refDate,a,s);n.start.imply("year",o)}if(t[Em]){let o=Fo.parseOrdinalNumberPattern(t[Em]);n.end=n.start.clone(),n.end.assign("day",o)}return n}};Jl.default=Xl});var Nm=O(tc=>{"use strict";Object.defineProperty(tc,"__esModule",{value:!0});var _E=Nt(),Am=Ct(),Lo=Ct(),Pm=Ct(),TE=Fe(),bE=Z(),vE=new RegExp(`(${TE.matchAnyPattern(Am.MONTH_DICTIONARY)})(?:-|/|\\s*,?\\s*)(${Lo.ORDINAL_NUMBER_PATTERN})(?!\\s*(?:am|pm))\\s*(?:(?:to|\\-)\\s*(${Lo.ORDINAL_NUMBER_PATTERN})\\s*)?(?:(?:-|/|\\s*,?\\s*)(${Pm.YEAR_PATTERN}))?(?=\\W|$)(?!\\:\\d)`,"i"),wE=1,kE=2,Rm=3,xm=4,ec=class extends bE.AbstractParserWithWordBoundaryChecking{innerPattern(){return vE}innerExtract(e,t){let n=Am.MONTH_DICTIONARY[t[wE].toLowerCase()],s=Lo.parseOrdinalNumberPattern(t[kE]);if(s>31)return null;let a=e.createParsingComponents({day:s,month:n});if(t[xm]){let c=Pm.parseYear(t[xm]);a.assign("year",c)}else{let c=_E.findYearClosestToRef(e.refDate,s,n);a.imply("year",c)}if(!t[Rm])return a;let o=Lo.parseOrdinalNumberPattern(t[Rm]),l=e.createParsingResult(t.index,t[0]);return l.start=a,l.end=a.clone(),l.end.assign("day",o),l}};tc.default=ec});var Fm=O(sc=>{"use strict";Object.defineProperty(sc,"__esModule",{value:!0});var rc=Ct(),EE=Nt(),DE=Fe(),Im=Ct(),SE=Z(),OE=new RegExp(`((?:in)\\s*)?(${DE.matchAnyPattern(rc.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${Im.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),ME=1,RE=2,Cm=3,nc=class extends SE.AbstractParserWithWordBoundaryChecking{innerPattern(){return OE}innerExtract(e,t){let n=t[RE].toLowerCase();if(t[0].length<=3&&!rc.FULL_MONTH_NAME_DICTIONARY[n])return null;let s=e.createParsingResult(t.index+(t[ME]||"").length,t.index+t[0].length);s.start.imply("day",1);let a=rc.MONTH_DICTIONARY[n];if(s.start.assign("month",a),t[Cm]){let o=Im.parseYear(t[Cm]);s.start.assign("year",o)}else{let o=EE.findYearClosestToRef(e.refDate,1,a);s.start.imply("year",o)}return s}};sc.default=nc});var Um=O(ac=>{"use strict";Object.defineProperty(ac,"__esModule",{value:!0});var Ym=Ct(),xE=Fe(),AE=Z(),PE=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${xE.matchAnyPattern(Ym.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),NE=1,CE=2,Lm=3,IE=4,ic=class extends AE.AbstractParserWithWordBoundaryChecking{innerPattern(){return PE}innerExtract(e,t){let n=t[Lm]?parseInt(t[Lm]):Ym.MONTH_DICTIONARY[t[CE].toLowerCase()];if(n<1||n>12)return null;let s=parseInt(t[NE]);return{day:parseInt(t[IE]),month:n,year:s}}};ac.default=ic});var Wm=O(uc=>{"use strict";Object.defineProperty(uc,"__esModule",{value:!0});var FE=Z(),LE=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),YE=1,UE=2,oc=class extends FE.AbstractParserWithWordBoundaryChecking{innerPattern(){return LE}innerExtract(e,t){let n=parseInt(t[UE]),s=parseInt(t[YE]);return e.createParsingComponents().imply("day",1).assign("month",s).assign("year",n)}};uc.default=oc});var fs=O(Wo=>{"use strict";Object.defineProperty(Wo,"__esModule",{value:!0});Wo.AbstractTimeExpressionParser=void 0;var Ht=_t();function WE(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 qE(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 qm=2,Vs=3,Yo=4,Uo=5,Vi=6,lc=class{constructor(e=!1){this.cachedPrimaryPrefix=null,this.cachedPrimarySuffix=null,this.cachedPrimaryTimePattern=null,this.cachedFollowingPhase=null,this.cachedFollowingSuffix=null,this.cachedFollowingTimePatten=null,this.strictMode=e}patternFlags(){return"i"}primaryPatternLeftBoundary(){return"(^|\\s|T|\\b)"}primarySuffix(){return"(?=\\W|$)"}followingSuffix(){return"(?=\\W|$)"}pattern(e){return this.getPrimaryTimePatternThroughCache()}extract(e,t){let n=this.extractPrimaryTimeComponents(e,t);if(!n)return t.index+=t[0].length,null;let s=t.index+t[1].length,a=t[0].substring(t[1].length),o=e.createParsingResult(s,a,n);t.index+=t[0].length;let l=e.text.substring(t.index),f=this.getFollowingTimePatternThroughCache().exec(l);return a.match(/^\d{3,4}/)&&f&&f[0].match(/^\s*([+-])\s*\d{2,4}$/)?null:!f||f[0].match(/^\s*([+-])\s*\d{3,4}$/)?this.checkAndReturnWithoutFollowingPattern(o):(o.end=this.extractFollowingTimeComponents(e,f,o),o.end&&(o.text+=f[0]),this.checkAndReturnWithFollowingPattern(o))}extractPrimaryTimeComponents(e,t,n=!1){let s=e.createParsingComponents(),a=0,o=null,l=parseInt(t[qm]);if(l>100){if(this.strictMode||t[Vs]!=null)return null;a=l%100,l=Math.floor(l/100)}if(l>24)return null;if(t[Vs]!=null){if(t[Vs].length==1&&!t[Vi])return null;a=parseInt(t[Vs])}if(a>=60)return null;if(l>12&&(o=Ht.Meridiem.PM),t[Vi]!=null){if(l>12)return null;let c=t[Vi][0].toLowerCase();c=="a"&&(o=Ht.Meridiem.AM,l==12&&(l=0)),c=="p"&&(o=Ht.Meridiem.PM,l!=12&&(l+=12))}if(s.assign("hour",l),s.assign("minute",a),o!==null?s.assign("meridiem",o):l<12?s.imply("meridiem",Ht.Meridiem.AM):s.imply("meridiem",Ht.Meridiem.PM),t[Uo]!=null){let c=parseInt(t[Uo].substring(0,3));if(c>=1e3)return null;s.assign("millisecond",c)}if(t[Yo]!=null){let c=parseInt(t[Yo]);if(c>=60)return null;s.assign("second",c)}return s}extractFollowingTimeComponents(e,t,n){let s=e.createParsingComponents();if(t[Uo]!=null){let c=parseInt(t[Uo].substring(0,3));if(c>=1e3)return null;s.assign("millisecond",c)}if(t[Yo]!=null){let c=parseInt(t[Yo]);if(c>=60)return null;s.assign("second",c)}let a=parseInt(t[qm]),o=0,l=-1;if(t[Vs]!=null?o=parseInt(t[Vs]):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(l=Ht.Meridiem.PM),t[Vi]!=null){if(a>12)return null;let c=t[Vi][0].toLowerCase();c=="a"&&(l=Ht.Meridiem.AM,a==12&&(a=0,s.isCertain("day")||s.imply("day",s.get("day")+1))),c=="p"&&(l=Ht.Meridiem.PM,a!=12&&(a+=12)),n.start.isCertain("meridiem")||(l==Ht.Meridiem.AM?(n.start.imply("meridiem",Ht.Meridiem.AM),n.start.get("hour")==12&&n.start.assign("hour",0)):(n.start.imply("meridiem",Ht.Meridiem.PM),n.start.get("hour")!=12&&n.start.assign("hour",n.start.get("hour")+12)))}return s.assign("hour",a),s.assign("minute",o),l>=0?s.assign("meridiem",l):n.start.isCertain("meridiem")&&n.start.get("hour")>12?n.start.get("hour")-12>a?s.imply("meridiem",Ht.Meridiem.AM):a<=12&&(s.assign("hour",a+12),s.assign("meridiem",Ht.Meridiem.PM)):a>12?s.imply("meridiem",Ht.Meridiem.PM):a<=12&&s.imply("meridiem",Ht.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 a=parseInt(s),o=parseInt(n);if(a>24||o>24)return null}return e}getPrimaryTimePatternThroughCache(){let e=this.primaryPrefix(),t=this.primarySuffix();return this.cachedPrimaryPrefix===e&&this.cachedPrimarySuffix===t?this.cachedPrimaryTimePattern:(this.cachedPrimaryTimePattern=WE(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=qE(e,t),this.cachedFollowingPhase=e,this.cachedFollowingSuffix=t,this.cachedFollowingTimePatten)}};Wo.AbstractTimeExpressionParser=lc});var jm=O(dc=>{"use strict";Object.defineProperty(dc,"__esModule",{value:!0});var qo=_t(),jE=fs(),cc=class extends jE.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",qo.Meridiem.PM)):s<6&&n.assign("meridiem",qo.Meridiem.AM)}if(t[0].endsWith("afternoon")){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("morning")&&(n.assign("meridiem",qo.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};dc.default=cc});var _r=O(Ks=>{"use strict";Object.defineProperty(Ks,"__esModule",{value:!0});Ks.addImpliedTimeUnits=Ks.reverseTimeUnits=void 0;function $E(r){let e={};for(let t in r)e[t]=-r[t];return e}Ks.reverseTimeUnits=$E;function GE(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}Ks.addImpliedTimeUnits=GE});var $m=O(pc=>{"use strict";Object.defineProperty(pc,"__esModule",{value:!0});var hc=Ct(),HE=it(),BE=Z(),zE=_r(),VE=new RegExp(`(${hc.TIME_UNITS_PATTERN})\\s{0,5}(?:ago|before|earlier)(?=(?:\\W|$))`,"i"),KE=new RegExp(`(${hc.TIME_UNITS_PATTERN})\\s{0,5}ago(?=(?:\\W|$))`,"i"),fc=class extends BE.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?KE:VE}innerExtract(e,t){let n=hc.parseTimeUnits(t[1]),s=zE.reverseTimeUnits(n);return HE.ParsingComponents.createRelativeFromReference(e.reference,s)}};pc.default=fc});var Gm=O(gc=>{"use strict";Object.defineProperty(gc,"__esModule",{value:!0});var yc=Ct(),ZE=it(),QE=Z(),XE=new RegExp(`(${yc.TIME_UNITS_PATTERN})\\s{0,5}(?:later|after|from now|henceforth|forward|out)(?=(?:\\W|$))`,"i"),JE=new RegExp("("+yc.TIME_UNITS_PATTERN+")(later|from now)(?=(?:\\W|$))","i"),eD=1,mc=class extends QE.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?JE:XE}innerExtract(e,t){let n=yc.parseTimeUnits(t[eD]);return ZE.ParsingComponents.createRelativeFromReference(e.reference,n)}};gc.default=mc});var Qs=O(Zs=>{"use strict";Object.defineProperty(Zs,"__esModule",{value:!0});Zs.MergingRefiner=Zs.Filter=void 0;var _c=class{refine(e,t){return t.filter(n=>this.isValid(e,n))}};Zs.Filter=_c;var Tc=class{refine(e,t){if(t.length<2)return t;let n=[],s=t[0],a=null;for(let o=1;o{console.log(`${this.constructor.name} merged ${c} and ${f} into ${p}`)}),s=p}}return s!=null&&n.push(s),n}};Zs.MergingRefiner=Tc});var Gr=O(vc=>{"use strict";Object.defineProperty(vc,"__esModule",{value:!0});var tD=Qs(),bc=class extends tD.MergingRefiner{shouldMergeResults(e,t,n){return!t.end&&!n.end&&e.match(this.patternBetween())!=null}mergeResults(e,t,n){if(!t.start.isOnlyWeekdayComponent()&&!n.start.isOnlyWeekdayComponent()&&(n.start.getCertainComponents().forEach(a=>{t.start.isCertain(a)||t.start.assign(a,n.start.get(a))}),t.start.getCertainComponents().forEach(a=>{n.start.isCertain(a)||n.start.assign(a,t.start.get(a))})),t.start.date().getTime()>n.start.date().getTime()){let a=t.start.dayjs(),o=n.start.dayjs();t.start.isOnlyWeekdayComponent()&&a.add(-7,"days").isBefore(o)?(a=a.add(-7,"days"),t.start.imply("day",a.date()),t.start.imply("month",a.month()+1),t.start.imply("year",a.year())):n.start.isOnlyWeekdayComponent()&&o.add(7,"days").isAfter(a)?(o=o.add(7,"days"),n.start.imply("day",o.date()),n.start.imply("month",o.month()+1),n.start.imply("year",o.year())):[n,t]=[t,n]}let s=t.clone();return s.start=t.start,s.end=n.start,s.index=Math.min(t.index,n.index),t.index{"use strict";var rD=Ki&&Ki.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ki,"__esModule",{value:!0});var nD=rD(Gr()),wc=class extends nD.default{patternBetween(){return/^\s*(to|-)\s*$/i}};Ki.default=wc});var Bm=O(Xs=>{"use strict";Object.defineProperty(Xs,"__esModule",{value:!0});Xs.mergeDateTimeComponent=Xs.mergeDateTimeResult=void 0;var sD=_t();function iD(r,e){let t=r.clone(),n=r.start,s=e.start;if(t.start=kc(n,s),r.end!=null||e.end!=null){let a=r.end==null?r.start:r.end,o=e.end==null?e.start:e.end,l=kc(a,o);r.end==null&&l.date().getTime(){"use strict";Object.defineProperty(Dc,"__esModule",{value:!0});var aD=Qs(),zm=Bm(),Ec=class extends aD.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()?zm.mergeDateTimeResult(t,n):zm.mergeDateTimeResult(n,t);return s.index=t.index,s.text=t.text+e+n.text,s}};Dc.default=Ec});var Vm=O(Zi=>{"use strict";var oD=Zi&&Zi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Zi,"__esModule",{value:!0});var uD=oD(ln()),Sc=class extends uD.default{patternBetween(){return new RegExp("^\\s*(T|at|after|before|on|of|,|-)?\\s*$")}};Zi.default=Sc});var Km=O(Mc=>{"use strict";Object.defineProperty(Mc,"__esModule",{value:!0});var lD=new RegExp("^\\s*,?\\s*\\(?([A-Z]{2,4})\\)?(?=\\W|$)","i"),cD={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},Oc=class{constructor(e){this.timezone=Object.assign(Object.assign({},cD),e)}refine(e,t){var n;let s=(n=e.option.timezones)!==null&&n!==void 0?n:{};return t.forEach(a=>{var o,l;let c=e.text.substring(a.index+a.text.length),f=lD.exec(c);if(!f)return;let p=f[1].toUpperCase(),g=(l=(o=s[p])!==null&&o!==void 0?o:this.timezone[p])!==null&&l!==void 0?l:null;if(g===null)return;e.debug(()=>{console.log(`Extracting timezone: '${p}' into: ${g} for: ${a.start}`)});let T=a.start.get("timezoneOffset");T!==null&&g!=T&&(a.start.isCertain("timezoneOffset")||p!=f[1])||a.start.isOnlyDate()&&p!=f[1]||(a.text+=f[0],a.start.isCertain("timezoneOffset")||a.start.assign("timezoneOffset",g),a.end!=null&&!a.end.isCertain("timezoneOffset")&&a.end.assign("timezoneOffset",g))}),t}};Mc.default=Oc});var jo=O(xc=>{"use strict";Object.defineProperty(xc,"__esModule",{value:!0});var dD=new RegExp("^\\s*(?:\\(?(?:GMT|UTC)\\s?)?([+-])(\\d{1,2})(?::?(\\d{2}))?\\)?","i"),fD=1,hD=2,pD=3,Rc=class{refine(e,t){return t.forEach(function(n){if(n.start.isCertain("timezoneOffset"))return;let s=e.text.substring(n.index+n.text.length),a=dD.exec(s);if(!a)return;e.debug(()=>{console.log(`Extracting timezone: '${a[0]}' into : ${n}`)});let o=parseInt(a[hD]),l=parseInt(a[pD]||"0"),c=o*60+l;c>14*60||(a[fD]==="-"&&(c=-c),n.end!=null&&n.end.assign("timezoneOffset",c),n.start.assign("timezoneOffset",c),n.text+=a[0])}),t}};xc.default=Rc});var Zm=O(Pc=>{"use strict";Object.defineProperty(Pc,"__esModule",{value:!0});var Ac=class{refine(e,t){if(t.length<2)return t;let n=[],s=t[0];for(let a=1;as.text.length&&(s=o):(n.push(s),s=o)}return s!=null&&n.push(s),n}};Pc.default=Ac});var Qm=O(Qi=>{"use strict";var mD=Qi&&Qi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Qi,"__esModule",{value:!0});var yD=mD(Re()),Nc=class{refine(e,t){return e.option.forwardDate&&t.forEach(function(n){let s=yD.default(e.refDate);if(n.start.isOnlyDayMonthComponent()&&s.isAfter(n.start.dayjs()))for(let a=0;a<3&&s.isAfter(n.start.dayjs());a++)n.start.imply("year",n.start.get("year")+1),e.debug(()=>{console.log(`Forward yearly adjusted for ${n} (${n.start})`)}),n.end&&!n.end.isCertain("year")&&(n.end.imply("year",n.end.get("year")+1),e.debug(()=>{console.log(`Forward yearly adjusted for ${n} (${n.end})`)}));n.start.isOnlyWeekdayComponent()&&s.isAfter(n.start.dayjs())&&(s.day()>=n.start.get("weekday")?s=s.day(n.start.get("weekday")+7):s=s.day(n.start.get("weekday")),n.start.imply("day",s.date()),n.start.imply("month",s.month()+1),n.start.imply("year",s.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.start})`)}),n.end&&n.end.isOnlyWeekdayComponent()&&(s.day()>n.end.get("weekday")?s=s.day(n.end.get("weekday")+7):s=s.day(n.end.get("weekday")),n.end.imply("day",s.date()),n.end.imply("month",s.month()+1),n.end.imply("year",s.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.end})`)})))}),t}};Qi.default=Nc});var Xm=O(Ic=>{"use strict";Object.defineProperty(Ic,"__esModule",{value:!0});var gD=Qs(),Cc=class extends gD.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}};Ic.default=Cc});var Yc=O(Lc=>{"use strict";Object.defineProperty(Lc,"__esModule",{value:!0});var _D=Z(),TD=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"),bD=1,vD=2,wD=3,Jm=4,kD=5,ey=6,ty=7,ry=8,ny=9,Fc=class extends _D.AbstractParserWithWordBoundaryChecking{innerPattern(){return TD}innerExtract(e,t){let n={};if(n.year=parseInt(t[bD]),n.month=parseInt(t[vD]),n.day=parseInt(t[wD]),t[Jm]!=null)if(n.hour=parseInt(t[Jm]),n.minute=parseInt(t[kD]),t[ey]!=null&&(n.second=parseInt(t[ey])),t[ty]!=null&&(n.millisecond=parseInt(t[ty])),t[ry]==null)n.timezoneOffset=0;else{let s=parseInt(t[ry]),a=0;t[ny]!=null&&(a=parseInt(t[ny]));let o=s*60;o<0?o-=a:o+=a,n.timezoneOffset=o}return n}};Lc.default=Fc});var sy=O(Wc=>{"use strict";Object.defineProperty(Wc,"__esModule",{value:!0});var ED=Qs(),Uc=class extends ED.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}};Wc.default=Uc});var cn=O(Js=>{"use strict";var hs=Js&&Js.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Js,"__esModule",{value:!0});Js.includeCommonConfiguration=void 0;var DD=hs(Km()),SD=hs(jo()),iy=hs(Zm()),OD=hs(Qm()),MD=hs(Xm()),RD=hs(Yc()),xD=hs(sy());function AD(r,e=!1){return r.parsers.unshift(new RD.default),r.refiners.unshift(new xD.default),r.refiners.unshift(new DD.default),r.refiners.unshift(new SD.default),r.refiners.unshift(new iy.default),r.refiners.push(new iy.default),r.refiners.push(new OD.default),r.refiners.push(new MD.default(e)),r}Js.includeCommonConfiguration=AD});var fn=O(Ne=>{"use strict";var PD=Ne&&Ne.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ne,"__esModule",{value:!0});Ne.noon=Ne.morning=Ne.midnight=Ne.yesterdayEvening=Ne.evening=Ne.lastNight=Ne.tonight=Ne.theDayAfter=Ne.tomorrow=Ne.theDayBefore=Ne.yesterday=Ne.today=Ne.now=void 0;var Hr=it(),ei=PD(Re()),dn=gr(),Xi=_t();function ND(r){let e=ei.default(r.instant),t=new Hr.ParsingComponents(r,{});return dn.assignSimilarDate(t,e),dn.assignSimilarTime(t,e),r.timezoneOffset!==null&&t.assign("timezoneOffset",e.utcOffset()),t}Ne.now=ND;function CD(r){let e=ei.default(r.instant),t=new Hr.ParsingComponents(r,{});return dn.assignSimilarDate(t,e),dn.implySimilarTime(t,e),t}Ne.today=CD;function ID(r){return ay(r,1)}Ne.yesterday=ID;function ay(r,e){return qc(r,-e)}Ne.theDayBefore=ay;function FD(r){return qc(r,1)}Ne.tomorrow=FD;function qc(r,e){let t=ei.default(r.instant),n=new Hr.ParsingComponents(r,{});return t=t.add(e,"day"),dn.assignSimilarDate(n,t),dn.implySimilarTime(n,t),n}Ne.theDayAfter=qc;function LD(r,e=22){let t=ei.default(r.instant),n=new Hr.ParsingComponents(r,{});return n.imply("hour",e),n.imply("meridiem",Xi.Meridiem.PM),dn.assignSimilarDate(n,t),n}Ne.tonight=LD;function YD(r,e=0){let t=ei.default(r.instant),n=new Hr.ParsingComponents(r,{});return t.hour()<6&&(t=t.add(-1,"day")),dn.assignSimilarDate(n,t),n.imply("hour",e),n}Ne.lastNight=YD;function UD(r,e=20){let t=new Hr.ParsingComponents(r,{});return t.imply("meridiem",Xi.Meridiem.PM),t.imply("hour",e),t}Ne.evening=UD;function WD(r,e=20){let t=ei.default(r.instant),n=new Hr.ParsingComponents(r,{});return t=t.add(-1,"day"),dn.assignSimilarDate(n,t),n.imply("hour",e),n.imply("meridiem",Xi.Meridiem.PM),n}Ne.yesterdayEvening=WD;function qD(r){let e=new Hr.ParsingComponents(r,{});return e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e}Ne.midnight=qD;function jD(r,e=6){let t=new Hr.ParsingComponents(r,{});return t.imply("meridiem",Xi.Meridiem.AM),t.imply("hour",e),t}Ne.morning=jD;function $D(r){let e=new Hr.ParsingComponents(r,{});return e.imply("meridiem",Xi.Meridiem.AM),e.imply("hour",12),e}Ne.noon=$D});var oy=O(xr=>{"use strict";var GD=xr&&xr.__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]}),HD=xr&&xr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),BD=xr&&xr.__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)&&GD(e,r,t);return HD(e,r),e},zD=xr&&xr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(xr,"__esModule",{value:!0});var VD=zD(Re()),KD=Z(),ZD=gr(),Ji=BD(fn()),QD=/(now|today|tonight|tomorrow|tmr|tmrw|yesterday|last\s*night)(?=\W|$)/i,jc=class extends KD.AbstractParserWithWordBoundaryChecking{innerPattern(e){return QD}innerExtract(e,t){let n=VD.default(e.refDate),s=t[0].toLowerCase(),a=e.createParsingComponents();switch(s){case"now":return Ji.now(e.reference);case"today":return Ji.today(e.reference);case"yesterday":return Ji.yesterday(e.reference);case"tomorrow":case"tmr":case"tmrw":return Ji.tomorrow(e.reference);case"tonight":return Ji.tonight(e.reference);default:s.match(/last\s*night/)&&(n.hour()>6&&(n=n.add(-1,"day")),ZD.assignSimilarDate(a,n),a.imply("hour",0));break}return a}};xr.default=jc});var uy=O(ea=>{"use strict";var XD=ea&&ea.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ea,"__esModule",{value:!0});var $o=_t(),JD=Z(),eS=XD(Re()),tS=gr(),rS=/(?:this)?\s{0,3}(morning|afternoon|evening|night|midnight|noon)(?=\W|$)/i,$c=class extends JD.AbstractParserWithWordBoundaryChecking{innerPattern(){return rS}innerExtract(e,t){let n=eS.default(e.refDate),s=e.createParsingComponents();switch(t[1].toLowerCase()){case"afternoon":s.imply("meridiem",$o.Meridiem.PM),s.imply("hour",15);break;case"evening":case"night":s.imply("meridiem",$o.Meridiem.PM),s.imply("hour",20);break;case"midnight":tS.assignTheNextDay(s,n),s.imply("hour",0),s.imply("minute",0),s.imply("second",0);break;case"morning":s.imply("meridiem",$o.Meridiem.AM),s.imply("hour",6);break;case"noon":s.imply("meridiem",$o.Meridiem.AM),s.imply("hour",12);break}return s}};ea.default=$c});var ps=O(Wn=>{"use strict";var nS=Wn&&Wn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Wn,"__esModule",{value:!0});Wn.toDayJSClosestWeekday=Wn.toDayJSWeekday=void 0;var ly=nS(Re());function sS(r,e,t){if(!t)return cy(r,e);let n=ly.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}Wn.toDayJSWeekday=sS;function cy(r,e){let t=ly.default(r),n=t.day();return Math.abs(e-7-n){"use strict";Object.defineProperty(Hc,"__esModule",{value:!0});var dy=Ct(),iS=Fe(),aS=Z(),oS=ps(),uS=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:on\\s*?)?(?:(this|last|past|next)\\s*)?(${iS.matchAnyPattern(dy.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(this|last|past|next)\\s*week)?(?=\\W|$)`,"i"),lS=1,cS=2,dS=3,Gc=class extends aS.AbstractParserWithWordBoundaryChecking{innerPattern(){return uS}innerExtract(e,t){let n=t[cS].toLowerCase(),s=dy.WEEKDAY_DICTIONARY[n],a=t[lS],o=t[dS],l=a||o;l=l||"",l=l.toLowerCase();let c=null;l=="last"||l=="past"?c="last":l=="next"?c="next":l=="this"&&(c="this");let f=oS.toDayJSWeekday(e.refDate,s,c);return e.createParsingComponents().assign("weekday",s).imply("day",f.date()).imply("month",f.month()+1).imply("year",f.year())}};Hc.default=Gc});var my=O(ta=>{"use strict";var fS=ta&&ta.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ta,"__esModule",{value:!0});var py=Ct(),hy=it(),hS=fS(Re()),pS=Z(),mS=Fe(),yS=new RegExp(`(this|last|past|next|after\\s*this)\\s*(${mS.matchAnyPattern(py.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),gS=1,_S=2,Bc=class extends pS.AbstractParserWithWordBoundaryChecking{innerPattern(){return yS}innerExtract(e,t){let n=t[gS].toLowerCase(),s=t[_S].toLowerCase(),a=py.TIME_UNIT_DICTIONARY[s];if(n=="next"||n.startsWith("after")){let c={};return c[a]=1,hy.ParsingComponents.createRelativeFromReference(e.reference,c)}if(n=="last"||n=="past"){let c={};return c[a]=-1,hy.ParsingComponents.createRelativeFromReference(e.reference,c)}let o=e.createParsingComponents(),l=hS.default(e.reference.instant);return s.match(/week/i)?(l=l.add(-l.get("d"),"d"),o.imply("day",l.date()),o.imply("month",l.month()+1),o.imply("year",l.year())):s.match(/month/i)?(l=l.add(-l.date()+1,"d"),o.imply("day",l.date()),o.assign("year",l.year()),o.assign("month",l.month()+1)):s.match(/year/i)&&(l=l.add(-l.date()+1,"d"),l=l.add(-l.month(),"month"),o.imply("day",l.date()),o.imply("month",l.month()+1),o.assign("year",l.year())),o}};ta.default=Bc});var Ar=O(ni=>{"use strict";Object.defineProperty(ni,"__esModule",{value:!0});ni.ParsingContext=ni.Chrono=void 0;var ti=it(),TS=zc(),ri=class{constructor(e){e=e||TS.createCasualConfiguration(),this.parsers=[...e.parsers],this.refiners=[...e.refiners]}clone(){return new ri({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 Go(e,t,n),a=[];return this.parsers.forEach(o=>{let l=ri.executeParser(s,o);a=a.concat(l)}),a.sort((o,l)=>o.index-l.index),this.refiners.forEach(function(o){a=o.refine(s,a)}),a}static executeParser(e,t){let n=[],s=t.pattern(e),a=e.text,o=e.text,l=s.exec(o);for(;l;){let c=l.index+a.length-o.length;l.index=c;let f=t.extract(e,l);if(!f){o=a.substring(l.index+1),l=s.exec(o);continue}let p=null;f instanceof ti.ParsingResult?p=f:f instanceof ti.ParsingComponents?(p=e.createParsingResult(l.index,l[0]),p.start=f):p=e.createParsingResult(l.index,l[0],f),e.debug(()=>console.log(`${t.constructor.name} extracted result ${p}`)),n.push(p),o=a.substring(c+p.text.length),l=s.exec(o)}return n}};ni.Chrono=ri;var Go=class{constructor(e,t,n){this.text=e,this.reference=new ti.ReferenceWithTimezone(t),this.option=n!=null?n:{},this.refDate=this.reference.instant}createParsingComponents(e){return e instanceof ti.ParsingComponents?e:new ti.ParsingComponents(this.reference,e)}createParsingResult(e,t,n,s){let a=typeof t=="string"?t:this.text.substring(e,t),o=n?this.createParsingComponents(n):null,l=s?this.createParsingComponents(s):null;return new ti.ParsingResult(this.reference,e,a,o,l)}debug(e){this.option.debug&&(this.option.debug instanceof Function?this.option.debug(e):this.option.debug.debug(e))}};ni.ParsingContext=Go});var ms=O(Zc=>{"use strict";Object.defineProperty(Zc,"__esModule",{value:!0});var yy=Nt(),bS=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"),Ho=1,gy=5,_y=2,Ty=3,Vc=4,Kc=class{constructor(e){this.groupNumberMonth=e?Ty:_y,this.groupNumberDay=e?_y:Ty}pattern(){return bS}extract(e,t){if(t[Ho]=="/"||t[gy]=="/"){t.index+=t[0].length;return}let n=t.index+t[Ho].length,s=t[0].substr(t[Ho].length,t[0].length-t[Ho].length-t[gy].length);if(s.match(/^\d\.\d$/)||s.match(/^\d\.\d{1,2}\.\d{1,2}\s*$/)||!t[Vc]&&t[0].indexOf("/")<0)return;let a=e.createParsingResult(n,s),o=parseInt(t[this.groupNumberMonth]),l=parseInt(t[this.groupNumberDay]);if((o<1||o>12)&&o>12)if(l>=1&&l<=12&&o<=31)[l,o]=[o,l];else return null;if(l<1||l>31)return null;if(a.start.assign("day",l),a.start.assign("month",o),t[Vc]){let c=parseInt(t[Vc]),f=yy.findMostLikelyADYear(c);a.start.assign("year",f)}else{let c=yy.findYearClosestToRef(e.refDate,l,o);a.start.imply("year",c)}return a}};Zc.default=Kc});var vy=O(Xc=>{"use strict";Object.defineProperty(Xc,"__esModule",{value:!0});var by=Ct(),vS=it(),wS=Z(),kS=_r(),ES=new RegExp(`(this|last|past|next|after|\\+|-)\\s*(${by.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Qc=class extends wS.AbstractParserWithWordBoundaryChecking{innerPattern(){return ES}innerExtract(e,t){let n=t[1].toLowerCase(),s=by.parseTimeUnits(t[2]);switch(n){case"last":case"past":case"-":s=kS.reverseTimeUnits(s);break}return vS.ParsingComponents.createRelativeFromReference(e.reference,s)}};Xc.default=Qc});var ky=O(td=>{"use strict";Object.defineProperty(td,"__esModule",{value:!0});var DS=Qs(),Jc=it(),SS=Ct(),OS=_r();function wy(r){return r.text.match(/\s+(before|from)$/i)!=null}function MS(r){return r.text.match(/\s+(after|since)$/i)!=null}var ed=class extends DS.MergingRefiner{patternBetween(){return/^\s*$/i}shouldMergeResults(e,t,n){return!e.match(this.patternBetween())||!wy(t)&&!MS(t)?!1:!!n.start.get("day")&&!!n.start.get("month")&&!!n.start.get("year")}mergeResults(e,t,n){let s=SS.parseTimeUnits(t.text);wy(t)&&(s=OS.reverseTimeUnits(s));let a=Jc.ParsingComponents.createRelativeFromReference(new Jc.ReferenceWithTimezone(n.start.date()),s);return new Jc.ParsingResult(n.reference,t.index,`${t.text}${e}${n.text}`,a)}};td.default=ed});var zc=O(lt=>{"use strict";var wt=lt&<.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(lt,"__esModule",{value:!0});lt.createConfiguration=lt.createCasualConfiguration=lt.parseDate=lt.parse=lt.GB=lt.strict=lt.casual=void 0;var RS=wt(wm()),xS=wt(Mm()),AS=wt(Nm()),PS=wt(Fm()),NS=wt(Um()),CS=wt(Wm()),IS=wt(jm()),FS=wt($m()),LS=wt(Gm()),YS=wt(Hm()),US=wt(Vm()),WS=cn(),qS=wt(oy()),jS=wt(uy()),$S=wt(fy()),GS=wt(my()),rd=Ar(),HS=wt(ms()),BS=wt(vy()),zS=wt(ky());lt.casual=new rd.Chrono(Ey(!1));lt.strict=new rd.Chrono(Bo(!0,!1));lt.GB=new rd.Chrono(Bo(!1,!0));function VS(r,e,t){return lt.casual.parse(r,e,t)}lt.parse=VS;function KS(r,e,t){return lt.casual.parseDate(r,e,t)}lt.parseDate=KS;function Ey(r=!1){let e=Bo(!1,r);return e.parsers.unshift(new qS.default),e.parsers.unshift(new jS.default),e.parsers.unshift(new PS.default),e.parsers.unshift(new GS.default),e.parsers.unshift(new BS.default),e}lt.createCasualConfiguration=Ey;function Bo(r=!0,e=!1){return WS.includeCommonConfiguration({parsers:[new HS.default(e),new RS.default,new xS.default,new AS.default,new $S.default,new NS.default,new CS.default,new IS.default(r),new FS.default(r),new LS.default(r)],refiners:[new zS.default,new US.default,new YS.default]},r)}lt.createConfiguration=Bo});var Dy=O(sd=>{"use strict";Object.defineProperty(sd,"__esModule",{value:!0});var ZS=fs(),nd=class extends ZS.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)}};sd.default=nd});var ra=O(We=>{"use strict";Object.defineProperty(We,"__esModule",{value:!0});We.parseTimeUnits=We.TIME_UNITS_PATTERN=We.parseYear=We.YEAR_PATTERN=We.parseNumberPattern=We.NUMBER_PATTERN=We.TIME_UNIT_DICTIONARY=We.INTEGER_WORD_DICTIONARY=We.MONTH_DICTIONARY=We.WEEKDAY_DICTIONARY=void 0;var id=Fe(),QS=Nt();We.WEEKDAY_DICTIONARY={sonntag:0,so:0,montag:1,mo:1,dienstag:2,di:2,mittwoch:3,mi:3,donnerstag:4,do:4,freitag:5,fr:5,samstag:6,sa:6};We.MONTH_DICTIONARY={januar:1,j\u00E4nner:1,janner:1,jan:1,"jan.":1,februar:2,feber:2,feb:2,"feb.":2,m\u00E4rz:3,maerz:3,m\u00E4r:3,"m\xE4r.":3,mrz:3,"mrz.":3,april:4,apr:4,"apr.":4,mai:5,juni:6,jun:6,"jun.":6,juli:7,jul:7,"jul.":7,august:8,aug:8,"aug.":8,september:9,sep:9,"sep.":9,sept:9,"sept.":9,oktober:10,okt:10,"okt.":10,november:11,nov:11,"nov.":11,dezember:12,dez:12,"dez.":12};We.INTEGER_WORD_DICTIONARY={eins:1,eine:1,einem:1,einen:1,einer:1,zwei:2,drei:3,vier:4,f\u00FCnf:5,fuenf:5,sechs:6,sieben:7,acht:8,neun:9,zehn:10,elf:11,zw\u00F6lf:12,zwoelf:12};We.TIME_UNIT_DICTIONARY={sek:"second",sekunde:"second",sekunden:"second",min:"minute",minute:"minute",minuten:"minute",h:"hour",std:"hour",stunde:"hour",stunden:"hour",tag:"d",tage:"d",tagen:"d",woche:"week",wochen:"week",monat:"month",monate:"month",monaten:"month",monats:"month",quartal:"quarter",quartals:"quarter",quartale:"quarter",quartalen:"quarter",a:"year",j:"year",jr:"year",jahr:"year",jahre:"year",jahren:"year",jahres:"year"};We.NUMBER_PATTERN=`(?:${id.matchAnyPattern(We.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s*an?)?|an?\\b(?:\\s*few)?|few|several|a?\\s*couple\\s*(?:of)?)`;function Oy(r){let e=r.toLowerCase();return We.INTEGER_WORD_DICTIONARY[e]!==void 0?We.INTEGER_WORD_DICTIONARY[e]:e==="a"||e==="an"?1:e.match(/few/)?3:e.match(/half/)?.5:e.match(/couple/)?2:e.match(/several/)?7:parseFloat(e)}We.parseNumberPattern=Oy;We.YEAR_PATTERN="(?:[0-9]{1,4}(?:\\s*[vn]\\.?\\s*(?:C(?:hr)?|(?:u\\.?|d\\.?(?:\\s*g\\.?)?)?\\s*Z)\\.?|\\s*(?:u\\.?|d\\.?(?:\\s*g\\.)?)\\s*Z\\.?)?)";function XS(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 QS.findMostLikelyADYear(e)}We.parseYear=XS;var My=`(${We.NUMBER_PATTERN})\\s{0,5}(${id.matchAnyPattern(We.TIME_UNIT_DICTIONARY)})\\s{0,5}`,Sy=new RegExp(My,"i");We.TIME_UNITS_PATTERN=id.repeatedTimeunitPattern("",My);function JS(r){let e={},t=r,n=Sy.exec(t);for(;n;)eO(e,n),t=t.substring(n[0].length),n=Sy.exec(t);return e}We.parseTimeUnits=JS;function eO(r,e){let t=Oy(e[1]),n=We.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var xy=O(od=>{"use strict";Object.defineProperty(od,"__esModule",{value:!0});var Ry=ra(),tO=Fe(),rO=Z(),nO=ps(),sO=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:a[mn]\\s*?)?(?:(diese[mn]|letzte[mn]|n(?:\xE4|ae)chste[mn])\\s*)?(${tO.matchAnyPattern(Ry.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(diese|letzte|n(?:\xE4|ae)chste)\\s*woche)?(?=\\W|$)`,"i"),iO=1,aO=3,oO=2,ad=class extends rO.AbstractParserWithWordBoundaryChecking{innerPattern(){return sO}innerExtract(e,t){let n=t[oO].toLowerCase(),s=Ry.WEEKDAY_DICTIONARY[n],a=t[iO],o=t[aO],l=a||o;l=l||"",l=l.toLowerCase();let c=null;l.match(/letzte/)?c="last":l.match(/chste/)?c="next":l.match(/diese/)&&(c="this");let f=nO.toDayJSWeekday(e.refDate,s,c);return e.createParsingComponents().assign("weekday",s).imply("day",f.date()).imply("month",f.month()+1).imply("year",f.year())}};od.default=ad});var Cy=O(ud=>{"use strict";Object.defineProperty(ud,"__esModule",{value:!0});var qn=_t(),uO=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"),lO=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"),cO=2,Ay=3,Py=4,Ny=5,si=class{pattern(e){return uO}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=si.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let s=e.text.substring(t.index+t[0].length),a=lO.exec(s);return a&&(n.end=si.extractTimeComponent(n.start.clone(),a),n.end&&(n.text+=a[0])),n}static extractTimeComponent(e,t){let n=0,s=0,a=null;if(n=parseInt(t[cO]),t[Ay]!=null&&(s=parseInt(t[Ay])),s>=60||n>24)return null;if(n>=12&&(a=qn.Meridiem.PM),t[Ny]!=null){if(n>12)return null;let o=t[Ny].toLowerCase();o.match(/morgen|vormittag/)&&(a=qn.Meridiem.AM,n==12&&(n=0)),o.match(/nachmittag|abend/)&&(a=qn.Meridiem.PM,n!=12&&(n+=12)),o.match(/nacht/)&&(n==12?(a=qn.Meridiem.AM,n=0):n<6?a=qn.Meridiem.AM:(a=qn.Meridiem.PM,n+=12))}if(e.assign("hour",n),e.assign("minute",s),a!==null?e.assign("meridiem",a):n<12?e.imply("meridiem",qn.Meridiem.AM):e.imply("meridiem",qn.Meridiem.PM),t[Py]!=null){let o=parseInt(t[Py]);if(o>=60)return null;e.assign("second",o)}return e}};ud.default=si});var Iy=O(na=>{"use strict";var dO=na&&na.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(na,"__esModule",{value:!0});var fO=dO(Gr()),ld=class extends fO.default{patternBetween(){return/^\s*(bis(?:\s*(?:am|zum))?|-)\s*$/i}};na.default=ld});var Fy=O(sa=>{"use strict";var hO=sa&&sa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(sa,"__esModule",{value:!0});var pO=hO(ln()),cd=class extends pO.default{patternBetween(){return new RegExp("^\\s*(T|um|am|,|-)?\\s*$")}};sa.default=cd});var dd=O(aa=>{"use strict";var mO=aa&&aa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(aa,"__esModule",{value:!0});var yO=mO(Re()),ys=_t(),gO=Z(),_O=gr(),TO=_r(),ia=class extends gO.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(diesen)?\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht)(?=\W|$)/i}innerExtract(e,t){let n=yO.default(e.refDate),s=t[2].toLowerCase(),a=e.createParsingComponents();return _O.implySimilarTime(a,n),ia.extractTimeComponents(a,s)}static extractTimeComponents(e,t){switch(t){case"morgen":e.imply("hour",6),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",ys.Meridiem.AM);break;case"vormittag":e.imply("hour",9),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",ys.Meridiem.AM);break;case"mittag":case"mittags":e.imply("hour",12),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",ys.Meridiem.AM);break;case"nachmittag":e.imply("hour",15),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",ys.Meridiem.PM);break;case"abend":e.imply("hour",18),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",ys.Meridiem.PM);break;case"nacht":e.imply("hour",22),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",ys.Meridiem.PM);break;case"mitternacht":e.get("hour")>1&&(e=TO.addImpliedTimeUnits(e,{day:1})),e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",ys.Meridiem.AM);break}return e}};aa.default=ia});var Uy=O(Pr=>{"use strict";var bO=Pr&&Pr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),vO=Pr&&Pr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),wO=Pr&&Pr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&bO(e,r,t);return vO(e,r),e},Yy=Pr&&Pr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Pr,"__esModule",{value:!0});var kO=Yy(Re()),EO=Z(),gs=gr(),DO=Yy(dd()),Ly=wO(fn()),SO=new RegExp("(jetzt|heute|morgen|\xFCbermorgen|uebermorgen|gestern|vorgestern|letzte\\s*nacht)(?:\\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht))?(?=\\W|$)","i"),OO=1,MO=2,fd=class extends EO.AbstractParserWithWordBoundaryChecking{innerPattern(e){return SO}innerExtract(e,t){let n=kO.default(e.refDate),s=(t[OO]||"").toLowerCase(),a=(t[MO]||"").toLowerCase(),o=e.createParsingComponents();switch(s){case"jetzt":o=Ly.now(e.reference);break;case"heute":o=Ly.today(e.reference);break;case"morgen":gs.assignTheNextDay(o,n);break;case"\xFCbermorgen":case"uebermorgen":n=n.add(1,"day"),gs.assignTheNextDay(o,n);break;case"gestern":n=n.add(-1,"day"),gs.assignSimilarDate(o,n),gs.implySimilarTime(o,n);break;case"vorgestern":n=n.add(-2,"day"),gs.assignSimilarDate(o,n),gs.implySimilarTime(o,n);break;default:s.match(/letzte\s*nacht/)&&(n.hour()>6&&(n=n.add(-1,"day")),gs.assignSimilarDate(o,n),o.imply("hour",0));break}return a&&(o=DO.default.extractTimeComponents(o,a)),o}};Pr.default=fd});var Hy=O(pd=>{"use strict";Object.defineProperty(pd,"__esModule",{value:!0});var RO=Nt(),$y=ra(),Gy=ra(),xO=Fe(),AO=Z(),PO=new RegExp(`(?:am\\s*?)?(?:den\\s*?)?([0-9]{1,2})\\.(?:\\s*(?:bis(?:\\s*(?:am|zum))?|\\-|\\\u2013|\\s)\\s*([0-9]{1,2})\\.?)?\\s*(${xO.matchAnyPattern($y.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${Gy.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Wy=1,qy=2,NO=3,jy=4,hd=class extends AO.AbstractParserWithWordBoundaryChecking{innerPattern(){return PO}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=$y.MONTH_DICTIONARY[t[NO].toLowerCase()],a=parseInt(t[Wy]);if(a>31)return t.index=t.index+t[Wy].length,null;if(n.start.assign("month",s),n.start.assign("day",a),t[jy]){let o=Gy.parseYear(t[jy]);n.start.assign("year",o)}else{let o=RO.findYearClosestToRef(e.refDate,a,s);n.start.imply("year",o)}if(t[qy]){let o=parseInt(t[qy]);n.end=n.start.clone(),n.end.assign("day",o)}return n}};pd.default=hd});var By=O(yd=>{"use strict";Object.defineProperty(yd,"__esModule",{value:!0});var zo=ra(),CO=it(),IO=Z(),FO=_r(),LO=Fe(),md=class extends IO.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*)?(${zo.NUMBER_PATTERN})?(?:\\s*(n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?)?\\s*(${LO.matchAnyPattern(zo.TIME_UNIT_DICTIONARY)})`,"i")}innerExtract(e,t){let n=t[2]?zo.parseNumberPattern(t[2]):1,s=zo.TIME_UNIT_DICTIONARY[t[4].toLowerCase()],a={};a[s]=n;let o=t[1]||t[3]||"";if(o=o.toLowerCase(),!!o)return(/vor/.test(o)||/letzte/.test(o)||/vergangen/.test(o))&&(a=FO.reverseTimeUnits(a)),CO.ParsingComponents.createRelativeFromReference(e.reference,a)}};yd.default=md});var Ky=O(kt=>{"use strict";var Nr=kt&&kt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(kt,"__esModule",{value:!0});kt.createConfiguration=kt.createCasualConfiguration=kt.parseDate=kt.parse=kt.strict=kt.casual=void 0;var YO=cn(),zy=Ar(),UO=Nr(ms()),WO=Nr(Yc()),qO=Nr(Dy()),jO=Nr(xy()),$O=Nr(Cy()),GO=Nr(Iy()),HO=Nr(Fy()),BO=Nr(Uy()),zO=Nr(dd()),VO=Nr(Hy()),KO=Nr(By());kt.casual=new zy.Chrono(Vy());kt.strict=new zy.Chrono(gd(!0));function ZO(r,e,t){return kt.casual.parse(r,e,t)}kt.parse=ZO;function QO(r,e,t){return kt.casual.parseDate(r,e,t)}kt.parseDate=QO;function Vy(r=!0){let e=gd(!1,r);return e.parsers.unshift(new zO.default),e.parsers.unshift(new BO.default),e.parsers.unshift(new KO.default),e}kt.createCasualConfiguration=Vy;function gd(r=!0,e=!0){return YO.includeCommonConfiguration({parsers:[new WO.default,new UO.default(e),new qO.default,new $O.default,new VO.default,new jO.default],refiners:[new GO.default,new HO.default]},r)}kt.createConfiguration=gd});var Qy=O(Cr=>{"use strict";var XO=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]}),JO=Cr&&Cr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),eM=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)&&XO(e,r,t);return JO(e,r),e},tM=Cr&&Cr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Cr,"__esModule",{value:!0});var rM=tM(Re()),nM=_t(),sM=Z(),Zy=gr(),Vo=eM(fn()),_d=class extends sM.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(maintenant|aujourd'hui|demain|hier|cette\s*nuit|la\s*veille)(?=\W|$)/i}innerExtract(e,t){let n=rM.default(e.refDate),s=t[0].toLowerCase(),a=e.createParsingComponents();switch(s){case"maintenant":return Vo.now(e.reference);case"aujourd'hui":return Vo.today(e.reference);case"hier":return Vo.yesterday(e.reference);case"demain":return Vo.tomorrow(e.reference);default:s.match(/cette\s*nuit/)?(Zy.assignSimilarDate(a,n),a.imply("hour",22),a.imply("meridiem",nM.Meridiem.PM)):s.match(/la\s*veille/)&&(n=n.add(-1,"day"),Zy.assignSimilarDate(a,n),a.imply("hour",0))}return a}};Cr.default=_d});var Xy=O(bd=>{"use strict";Object.defineProperty(bd,"__esModule",{value:!0});var oa=_t(),iM=Z(),Td=class extends iM.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",oa.Meridiem.PM);break;case"soir":s.imply("hour",18),s.imply("minute",0),s.imply("meridiem",oa.Meridiem.PM);break;case"matin":s.imply("hour",8),s.imply("minute",0),s.imply("meridiem",oa.Meridiem.AM);break;case"a midi":s.imply("hour",12),s.imply("minute",0),s.imply("meridiem",oa.Meridiem.AM);break;case"\xE0 minuit":s.imply("hour",0),s.imply("meridiem",oa.Meridiem.AM);break}return s}};bd.default=Td});var Jy=O(wd=>{"use strict";Object.defineProperty(wd,"__esModule",{value:!0});var aM=fs(),vd=class extends aM.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)}};wd.default=vd});var eg=O(ua=>{"use strict";var oM=ua&&ua.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ua,"__esModule",{value:!0});var uM=oM(ln()),kd=class extends uM.default{patternBetween(){return new RegExp("^\\s*(T|\xE0|a|vers|de|,|-)?\\s*$")}};ua.default=kd});var tg=O(la=>{"use strict";var lM=la&&la.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(la,"__esModule",{value:!0});var cM=lM(Gr()),Ed=class extends cM.default{patternBetween(){return/^\s*(à|a|-)\s*$/i}};la.default=Ed});var jn=O(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.parseTimeUnits=xe.TIME_UNITS_PATTERN=xe.parseYear=xe.YEAR_PATTERN=xe.parseOrdinalNumberPattern=xe.ORDINAL_NUMBER_PATTERN=xe.parseNumberPattern=xe.NUMBER_PATTERN=xe.TIME_UNIT_DICTIONARY=xe.INTEGER_WORD_DICTIONARY=xe.MONTH_DICTIONARY=xe.WEEKDAY_DICTIONARY=void 0;var Dd=Fe();xe.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};xe.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};xe.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};xe.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"};xe.NUMBER_PATTERN=`(?:${Dd.matchAnyPattern(xe.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|une?\\b|quelques?|demi-?)`;function ng(r){let e=r.toLowerCase();return xe.INTEGER_WORD_DICTIONARY[e]!==void 0?xe.INTEGER_WORD_DICTIONARY[e]:e==="une"||e==="un"?1:e.match(/quelques?/)?3:e.match(/demi-?/)?.5:parseFloat(e)}xe.parseNumberPattern=ng;xe.ORDINAL_NUMBER_PATTERN="(?:[0-9]{1,2}(?:er)?)";function dM(r){let e=r.toLowerCase();return e=e.replace(/(?:er)$/i,""),parseInt(e)}xe.parseOrdinalNumberPattern=dM;xe.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 fM(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}xe.parseYear=fM;var sg=`(${xe.NUMBER_PATTERN})\\s{0,5}(${Dd.matchAnyPattern(xe.TIME_UNIT_DICTIONARY)})\\s{0,5}`,rg=new RegExp(sg,"i");xe.TIME_UNITS_PATTERN=Dd.repeatedTimeunitPattern("",sg);function hM(r){let e={},t=r,n=rg.exec(t);for(;n;)pM(e,n),t=t.substring(n[0].length),n=rg.exec(t);return e}xe.parseTimeUnits=hM;function pM(r,e){let t=ng(e[1]),n=xe.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var ag=O(Od=>{"use strict";Object.defineProperty(Od,"__esModule",{value:!0});var ig=jn(),mM=Fe(),yM=Z(),gM=ps(),_M=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(?:ce)\\s*)?(${mM.matchAnyPattern(ig.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(dernier|prochain)\\s*)?(?=\\W|\\d|$)`,"i"),TM=1,bM=2,Sd=class extends yM.AbstractParserWithWordBoundaryChecking{innerPattern(){return _M}innerExtract(e,t){let n=t[TM].toLowerCase(),s=ig.WEEKDAY_DICTIONARY[n];if(s===void 0)return null;let a=t[bM];a=a||"",a=a.toLowerCase();let o=null;a=="dernier"?o="last":a=="prochain"&&(o="next");let l=gM.toDayJSWeekday(e.refDate,s,o);return e.createParsingComponents().assign("weekday",s).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Od.default=Sd});var cg=O(Md=>{"use strict";Object.defineProperty(Md,"__esModule",{value:!0});var ca=_t(),vM=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"),wM=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"),kM=2,og=3,ug=4,lg=5,ii=class{pattern(e){return vM}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=ii.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let s=e.text.substring(t.index+t[0].length),a=wM.exec(s);return a&&(n.end=ii.extractTimeComponent(n.start.clone(),a),n.end&&(n.text+=a[0])),n}static extractTimeComponent(e,t){let n=0,s=0,a=null;if(n=parseInt(t[kM]),t[og]!=null&&(s=parseInt(t[og])),s>=60||n>24)return null;if(n>=12&&(a=ca.Meridiem.PM),t[lg]!=null){if(n>12)return null;let o=t[lg][0].toLowerCase();o=="a"&&(a=ca.Meridiem.AM,n==12&&(n=0)),o=="p"&&(a=ca.Meridiem.PM,n!=12&&(n+=12))}if(e.assign("hour",n),e.assign("minute",s),a!==null?e.assign("meridiem",a):n<12?e.imply("meridiem",ca.Meridiem.AM):e.imply("meridiem",ca.Meridiem.PM),t[ug]!=null){let o=parseInt(t[ug]);if(o>=60)return null;e.assign("second",o)}return e}};Md.default=ii});var yg=O(xd=>{"use strict";Object.defineProperty(xd,"__esModule",{value:!0});var EM=Nt(),pg=jn(),mg=jn(),Ko=jn(),DM=Fe(),SM=Z(),OM=new RegExp(`(?:on\\s*?)?(${Ko.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:au|\\-|\\\u2013|jusqu'au?|\\s)\\s*(${Ko.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:de)?\\s*)(${DM.matchAnyPattern(pg.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${mg.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),dg=1,fg=2,MM=3,hg=4,Rd=class extends SM.AbstractParserWithWordBoundaryChecking{innerPattern(){return OM}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=pg.MONTH_DICTIONARY[t[MM].toLowerCase()],a=Ko.parseOrdinalNumberPattern(t[dg]);if(a>31)return t.index=t.index+t[dg].length,null;if(n.start.assign("month",s),n.start.assign("day",a),t[hg]){let o=mg.parseYear(t[hg]);n.start.assign("year",o)}else{let o=EM.findYearClosestToRef(e.refDate,a,s);n.start.imply("year",o)}if(t[fg]){let o=Ko.parseOrdinalNumberPattern(t[fg]);n.end=n.start.clone(),n.end.assign("day",o)}return n}};xd.default=Rd});var _g=O(Pd=>{"use strict";Object.defineProperty(Pd,"__esModule",{value:!0});var gg=jn(),RM=it(),xM=Z(),AM=_r(),Ad=class extends xM.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`il y a\\s*(${gg.TIME_UNITS_PATTERN})(?=(?:\\W|$))`,"i")}innerExtract(e,t){let n=gg.parseTimeUnits(t[1]),s=AM.reverseTimeUnits(n);return RM.ParsingComponents.createRelativeFromReference(e.reference,s)}};Pd.default=Ad});var bg=O(Cd=>{"use strict";Object.defineProperty(Cd,"__esModule",{value:!0});var Tg=jn(),PM=it(),NM=Z(),Nd=class extends NM.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp(`(?:dans|en|pour|pendant|de)\\s*(${Tg.TIME_UNITS_PATTERN})(?=\\W|$)`,"i")}innerExtract(e,t){let n=Tg.parseTimeUnits(t[1]);return PM.ParsingComponents.createRelativeFromReference(e.reference,n)}};Cd.default=Nd});var vg=O(Fd=>{"use strict";Object.defineProperty(Fd,"__esModule",{value:!0});var Zo=jn(),CM=it(),IM=Z(),FM=_r(),LM=Fe(),Id=class extends IM.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:les?|la|l'|du|des?)\\s*(${Zo.NUMBER_PATTERN})?(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?\\s*(${LM.matchAnyPattern(Zo.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]?Zo.parseNumberPattern(t[1]):1,s=Zo.TIME_UNIT_DICTIONARY[t[3].toLowerCase()],a={};a[s]=n;let o=t[2]||t[4]||"";if(o=o.toLowerCase(),!!o)return(/derni[eè]re?s?/.test(o)||/pass[ée]e?s?/.test(o)||/pr[ée]c[ée]dents?/.test(o))&&(a=FM.reverseTimeUnits(a)),CM.ParsingComponents.createRelativeFromReference(e.reference,a)}};Fd.default=Id});var Eg=O(Et=>{"use strict";var Tr=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 YM=cn(),wg=Ar(),UM=Tr(Qy()),WM=Tr(Xy()),qM=Tr(ms()),jM=Tr(Jy()),$M=Tr(eg()),GM=Tr(tg()),HM=Tr(ag()),BM=Tr(cg()),zM=Tr(yg()),VM=Tr(_g()),KM=Tr(bg()),ZM=Tr(vg());Et.casual=new wg.Chrono(kg());Et.strict=new wg.Chrono(Ld(!0));function QM(r,e,t){return Et.casual.parse(r,e,t)}Et.parse=QM;function XM(r,e,t){return Et.casual.parseDate(r,e,t)}Et.parseDate=XM;function kg(r=!0){let e=Ld(!1,r);return e.parsers.unshift(new UM.default),e.parsers.unshift(new WM.default),e.parsers.unshift(new ZM.default),e}Et.createCasualConfiguration=kg;function Ld(r=!0,e=!0){return YM.includeCommonConfiguration({parsers:[new qM.default(e),new zM.default,new jM.default,new BM.default,new VM.default,new KM.default,new HM.default],refiners:[new $M.default,new GM.default]},r)}Et.createConfiguration=Ld});var Dg=O(Qo=>{"use strict";Object.defineProperty(Qo,"__esModule",{value:!0});Qo.toHankaku=void 0;function JM(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,eR)}Qo.toHankaku=JM;function eR(r){return String.fromCharCode(r.charCodeAt(0)-65248)}});var Og=O(da=>{"use strict";var tR=da&&da.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(da,"__esModule",{value:!0});var Yd=Dg(),rR=Nt(),nR=tR(Re()),sR=/(?:(?:([同今本])|((昭和|平成|令和)?([0-90-9]{1,4}|元)))年\s*)?([0-90-9]{1,2})月\s*([0-90-9]{1,2})日/i,Sg=1,iR=2,Ud=3,aR=4,oR=5,uR=6,Wd=class{pattern(){return sR}extract(e,t){let n=parseInt(Yd.toHankaku(t[oR])),s=parseInt(Yd.toHankaku(t[uR])),a=e.createParsingComponents({day:s,month:n});if(t[Sg]&&t[Sg].match("\u540C|\u4ECA|\u672C")){let o=nR.default(e.refDate);a.assign("year",o.year())}if(t[iR]){let o=t[aR],l=o=="\u5143"?1:parseInt(Yd.toHankaku(o));t[Ud]=="\u4EE4\u548C"?l+=2018:t[Ud]=="\u5E73\u6210"?l+=1988:t[Ud]=="\u662D\u548C"&&(l+=1925),a.assign("year",l)}else{let o=rR.findYearClosestToRef(e.refDate,s,n);a.imply("year",o)}return a}};da.default=Wd});var Mg=O(fa=>{"use strict";var lR=fa&&fa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(fa,"__esModule",{value:!0});var cR=lR(Gr()),qd=class extends cR.default{patternBetween(){return/^\s*(から|ー|-)\s*$/i}};fa.default=qd});var xg=O(Ir=>{"use strict";var dR=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]}),fR=Ir&&Ir.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),hR=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)&&dR(e,r,t);return fR(e,r),e},pR=Ir&&Ir.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ir,"__esModule",{value:!0});var mR=pR(Re()),Rg=_t(),jd=hR(fn()),yR=/今日|当日|昨日|明日|今夜|今夕|今晩|今朝/i,$d=class{pattern(){return yR}extract(e,t){let n=t[0],s=mR.default(e.refDate),a=e.createParsingComponents();switch(n){case"\u6628\u65E5":return jd.yesterday(e.reference);case"\u660E\u65E5":return jd.tomorrow(e.reference);case"\u4ECA\u65E5":case"\u5F53\u65E5":return jd.today(e.reference)}return n=="\u4ECA\u591C"||n=="\u4ECA\u5915"||n=="\u4ECA\u6669"?(a.imply("hour",22),a.assign("meridiem",Rg.Meridiem.PM)):n.match("\u4ECA\u671D")&&(a.imply("hour",6),a.assign("meridiem",Rg.Meridiem.AM)),a.assign("day",s.date()),a.assign("month",s.month()+1),a.assign("year",s.year()),a}};Ir.default=$d});var Ng=O(Dt=>{"use strict";var Gd=Dt&&Dt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Dt,"__esModule",{value:!0});Dt.createConfiguration=Dt.createCasualConfiguration=Dt.parseDate=Dt.parse=Dt.strict=Dt.casual=void 0;var gR=Gd(Og()),_R=Gd(Mg()),TR=Gd(xg()),Ag=Ar();Dt.casual=new Ag.Chrono(Pg());Dt.strict=new Ag.Chrono(Hd());function bR(r,e,t){return Dt.casual.parse(r,e,t)}Dt.parse=bR;function vR(r,e,t){return Dt.casual.parseDate(r,e,t)}Dt.parseDate=vR;function Pg(){let r=Hd();return r.parsers.unshift(new TR.default),r}Dt.createCasualConfiguration=Pg;function Hd(){return{parsers:[new gR.default],refiners:[new _R.default]}}Dt.createConfiguration=Hd});var Xo=O(Br=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.parseYear=Br.YEAR_PATTERN=Br.MONTH_DICTIONARY=Br.WEEKDAY_DICTIONARY=void 0;Br.WEEKDAY_DICTIONARY={domingo:0,dom:0,segunda:1,"segunda-feira":1,seg:1,ter\u00E7a:2,"ter\xE7a-feira":2,ter:2,quarta:3,"quarta-feira":3,qua:3,quinta:4,"quinta-feira":4,qui:4,sexta:5,"sexta-feira":5,sex:5,s\u00E1bado:6,sabado:6,sab:6};Br.MONTH_DICTIONARY={janeiro:1,jan:1,"jan.":1,fevereiro:2,fev:2,"fev.":2,mar\u00E7o:3,mar:3,"mar.":3,abril:4,abr:4,"abr.":4,maio:5,mai:5,"mai.":5,junho:6,jun:6,"jun.":6,julho:7,jul:7,"jul.":7,agosto:8,ago:8,"ago.":8,setembro:9,set:9,"set.":9,outubro:10,out:10,"out.":10,novembro:11,nov:11,"nov.":11,dezembro:12,dez:12,"dez.":12};Br.YEAR_PATTERN="[0-9]{1,4}(?![^\\s]\\d)(?:\\s*[a|d]\\.?\\s*c\\.?|\\s*a\\.?\\s*d\\.?)?";function wR(r){if(r.match(/^[0-9]{1,4}$/)){let e=parseInt(r);return e<100&&(e>50?e=e+1900:e=e+2e3),e}return r.match(/a\.?\s*c\.?/i)?(r=r.replace(/a\.?\s*c\.?/i,""),-parseInt(r)):parseInt(r)}Br.parseYear=wR});var Ig=O(zd=>{"use strict";Object.defineProperty(zd,"__esModule",{value:!0});var Cg=Xo(),kR=Fe(),ER=Z(),DR=ps(),SR=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(este|esta|passado|pr[o\xF3]ximo)\\s*)?(${kR.matchAnyPattern(Cg.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(este|esta|passado|pr[\xF3o]ximo)\\s*semana)?(?=\\W|\\d|$)`,"i"),OR=1,MR=2,RR=3,Bd=class extends ER.AbstractParserWithWordBoundaryChecking{innerPattern(){return SR}innerExtract(e,t){let n=t[MR].toLowerCase(),s=Cg.WEEKDAY_DICTIONARY[n];if(s===void 0)return null;let a=t[OR],o=t[RR],l=a||o||"";l=l.toLowerCase();let c=null;l=="passado"?c="this":l=="pr\xF3ximo"||l=="proximo"?c="next":l=="este"&&(c="this");let f=DR.toDayJSWeekday(e.refDate,s,c);return e.createParsingComponents().assign("weekday",s).imply("day",f.date()).imply("month",f.month()+1).imply("year",f.year())}};zd.default=Bd});var Fg=O(Kd=>{"use strict";Object.defineProperty(Kd,"__esModule",{value:!0});var xR=fs(),Vd=class extends xR.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:ao?|\xE0s?|das|da|de|do)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|a(?:o)?|\\?)\\s*"}};Kd.default=Vd});var Lg=O(ha=>{"use strict";var AR=ha&&ha.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ha,"__esModule",{value:!0});var PR=AR(ln()),Zd=class extends PR.default{patternBetween(){return new RegExp("^\\s*(?:,|\xE0)?\\s*$")}};ha.default=Zd});var Yg=O(pa=>{"use strict";var NR=pa&&pa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(pa,"__esModule",{value:!0});var CR=NR(Gr()),Qd=class extends CR.default{patternBetween(){return/^\s*(?:-)\s*$/i}};pa.default=Qd});var Gg=O(Jd=>{"use strict";Object.defineProperty(Jd,"__esModule",{value:!0});var IR=Nt(),jg=Xo(),$g=Xo(),FR=Fe(),LR=Z(),YR=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*)(${FR.matchAnyPattern(jg.MONTH_DICTIONARY)})(?:\\s*(?:de|,)?\\s*(${$g.YEAR_PATTERN}))?(?=\\W|$)`,"i"),Ug=1,Wg=2,UR=3,qg=4,Xd=class extends LR.AbstractParserWithWordBoundaryChecking{innerPattern(){return YR}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=jg.MONTH_DICTIONARY[t[UR].toLowerCase()],a=parseInt(t[Ug]);if(a>31)return t.index=t.index+t[Ug].length,null;if(n.start.assign("month",s),n.start.assign("day",a),t[qg]){let o=$g.parseYear(t[qg]);n.start.assign("year",o)}else{let o=IR.findYearClosestToRef(e.refDate,a,s);n.start.imply("year",o)}if(t[Wg]){let o=parseInt(t[Wg]);n.end=n.start.clone(),n.end.assign("day",o)}return n}};Jd.default=Xd});var Hg=O(hn=>{"use strict";var WR=hn&&hn.__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]}),qR=hn&&hn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),jR=hn&&hn.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&WR(e,r,t);return qR(e,r),e};Object.defineProperty(hn,"__esModule",{value:!0});var $R=Z(),Jo=jR(fn()),ef=class extends $R.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 Jo.now(e.reference);case"hoje":return Jo.today(e.reference);case"amanha":case"amanh\xE3":return Jo.tomorrow(e.reference);case"ontem":return Jo.yesterday(e.reference)}return s}};hn.default=ef});var Bg=O(ma=>{"use strict";var GR=ma&&ma.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ma,"__esModule",{value:!0});var eu=_t(),HR=Z(),BR=gr(),zR=GR(Re()),tf=class extends HR.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(?:esta\s*)?(manha|manhã|tarde|meia-noite|meio-dia|noite)(?=\W|$)/i}innerExtract(e,t){let n=zR.default(e.refDate),s=e.createParsingComponents();switch(t[1].toLowerCase()){case"tarde":s.imply("meridiem",eu.Meridiem.PM),s.imply("hour",15);break;case"noite":s.imply("meridiem",eu.Meridiem.PM),s.imply("hour",22);break;case"manha":case"manh\xE3":s.imply("meridiem",eu.Meridiem.AM),s.imply("hour",6);break;case"meia-noite":BR.assignTheNextDay(s,n),s.imply("hour",0),s.imply("minute",0),s.imply("second",0);break;case"meio-dia":s.imply("meridiem",eu.Meridiem.AM),s.imply("hour",12);break}return s}};ma.default=tf});var Kg=O(St=>{"use strict";var $n=St&&St.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(St,"__esModule",{value:!0});St.createConfiguration=St.createCasualConfiguration=St.parseDate=St.parse=St.strict=St.casual=void 0;var VR=cn(),zg=Ar(),KR=$n(ms()),ZR=$n(Ig()),QR=$n(Fg()),XR=$n(Lg()),JR=$n(Yg()),ex=$n(Gg()),tx=$n(Hg()),rx=$n(Bg());St.casual=new zg.Chrono(Vg());St.strict=new zg.Chrono(rf(!0));function nx(r,e,t){return St.casual.parse(r,e,t)}St.parse=nx;function sx(r,e,t){return St.casual.parseDate(r,e,t)}St.parseDate=sx;function Vg(r=!0){let e=rf(!1,r);return e.parsers.push(new tx.default),e.parsers.push(new rx.default),e}St.createCasualConfiguration=Vg;function rf(r=!0,e=!0){return VR.includeCommonConfiguration({parsers:[new KR.default(e),new ZR.default,new QR.default,new ex.default],refiners:[new XR.default,new JR.default]},r)}St.createConfiguration=rf});var Zg=O(ya=>{"use strict";var ix=ya&&ya.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ya,"__esModule",{value:!0});var ax=ix(Gr()),nf=class extends ax.default{patternBetween(){return/^\s*(tot|-)\s*$/i}};ya.default=nf});var Qg=O(ga=>{"use strict";var ox=ga&&ga.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ga,"__esModule",{value:!0});var ux=ox(ln()),sf=class extends ux.default{patternBetween(){return new RegExp("^\\s*(om|na|voor|in de|,|-)?\\s*$")}};ga.default=sf});var Xg=O(pn=>{"use strict";var lx=pn&&pn.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),cx=pn&&pn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),dx=pn&&pn.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&lx(e,r,t);return cx(e,r),e};Object.defineProperty(pn,"__esModule",{value:!0});var fx=Z(),tu=dx(fn()),af=class extends fx.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 tu.now(e.reference);case"vandaag":return tu.today(e.reference);case"morgen":case"morgend":return tu.tomorrow(e.reference);case"gisteren":return tu.yesterday(e.reference)}return s}};pn.default=af});var Jg=O(_a=>{"use strict";var hx=_a&&_a.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(_a,"__esModule",{value:!0});var ru=_t(),px=Z(),mx=hx(Re()),yx=gr(),gx=1,_x=2,of=class extends px.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(deze)?\s*(namiddag|avond|middernacht|ochtend|middag|'s middags|'s avonds|'s ochtends)(?=\W|$)/i}innerExtract(e,t){let n=mx.default(e.refDate),s=e.createParsingComponents();switch(t[gx]==="deze"&&(s.assign("day",e.refDate.getDate()),s.assign("month",e.refDate.getMonth()+1),s.assign("year",e.refDate.getFullYear())),t[_x].toLowerCase()){case"namiddag":case"'s namiddags":s.imply("meridiem",ru.Meridiem.PM),s.imply("hour",15);break;case"avond":case"'s avonds'":s.imply("meridiem",ru.Meridiem.PM),s.imply("hour",20);break;case"middernacht":yx.assignTheNextDay(s,n),s.imply("hour",0),s.imply("minute",0),s.imply("second",0);break;case"ochtend":case"'s ochtends":s.imply("meridiem",ru.Meridiem.AM),s.imply("hour",6);break;case"middag":case"'s middags":s.imply("meridiem",ru.Meridiem.AM),s.imply("hour",12);break}return s}};_a.default=of});var rr=O(we=>{"use strict";Object.defineProperty(we,"__esModule",{value:!0});we.parseTimeUnits=we.TIME_UNITS_PATTERN=we.parseYear=we.YEAR_PATTERN=we.parseOrdinalNumberPattern=we.ORDINAL_NUMBER_PATTERN=we.parseNumberPattern=we.NUMBER_PATTERN=we.TIME_UNIT_DICTIONARY=we.ORDINAL_WORD_DICTIONARY=we.INTEGER_WORD_DICTIONARY=we.MONTH_DICTIONARY=we.WEEKDAY_DICTIONARY=void 0;var nu=Fe(),Tx=Nt();we.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};we.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};we.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};we.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};we.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"};we.NUMBER_PATTERN=`(?:${nu.matchAnyPattern(we.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+[\\.,][0-9]+|halve?|half|paar)`;function t_(r){let e=r.toLowerCase();return we.INTEGER_WORD_DICTIONARY[e]!==void 0?we.INTEGER_WORD_DICTIONARY[e]:e==="paar"?2:e==="half"||e.match(/halve?/)?.5:parseFloat(e.replace(",","."))}we.parseNumberPattern=t_;we.ORDINAL_NUMBER_PATTERN=`(?:${nu.matchAnyPattern(we.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:ste|de)?)`;function bx(r){let e=r.toLowerCase();return we.ORDINAL_WORD_DICTIONARY[e]!==void 0?we.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:ste|de)$/i,""),parseInt(e))}we.parseOrdinalNumberPattern=bx;we.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:voor Christus|na Christus)|[1-2][0-9]{3}|[5-9][0-9])";function vx(r){if(/voor Christus/i.test(r))return r=r.replace(/voor Christus/i,""),-parseInt(r);if(/na Christus/i.test(r))return r=r.replace(/na Christus/i,""),parseInt(r);let e=parseInt(r);return Tx.findMostLikelyADYear(e)}we.parseYear=vx;var r_=`(${we.NUMBER_PATTERN})\\s{0,5}(${nu.matchAnyPattern(we.TIME_UNIT_DICTIONARY)})\\s{0,5}`,e_=new RegExp(r_,"i");we.TIME_UNITS_PATTERN=nu.repeatedTimeunitPattern("(?:(?:binnen|in)\\s*)?",r_);function wx(r){let e={},t=r,n=e_.exec(t);for(;n;)kx(e,n),t=t.substring(n[0].length),n=e_.exec(t);return e}we.parseTimeUnits=wx;function kx(r,e){let t=t_(e[1]),n=we.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var s_=O(lf=>{"use strict";Object.defineProperty(lf,"__esModule",{value:!0});var n_=rr(),Ex=it(),Dx=Z(),uf=class extends Dx.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(?:binnen|in|binnen de|voor)\\s*("+n_.TIME_UNITS_PATTERN+")(?=\\W|$)","i")}innerExtract(e,t){let n=n_.parseTimeUnits(t[1]);return Ex.ParsingComponents.createRelativeFromReference(e.reference,n)}};lf.default=uf});var a_=O(df=>{"use strict";Object.defineProperty(df,"__esModule",{value:!0});var i_=rr(),Sx=Fe(),Ox=Z(),Mx=ps(),Rx=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:op\\s*?)?(?:(deze|vorige|volgende)\\s*(?:week\\s*)?)?(${Sx.matchAnyPattern(i_.WEEKDAY_DICTIONARY)})(?=\\W|$)`,"i"),xx=1,Ax=2,Px=3,cf=class extends Ox.AbstractParserWithWordBoundaryChecking{innerPattern(){return Rx}innerExtract(e,t){let n=t[Ax].toLowerCase(),s=i_.WEEKDAY_DICTIONARY[n],a=t[xx],o=t[Px],l=a||o;l=l||"",l=l.toLowerCase();let c=null;l=="vorige"?c="last":l=="volgende"?c="next":l=="deze"&&(c="this");let f=Mx.toDayJSWeekday(e.refDate,s,c);return e.createParsingComponents().assign("weekday",s).imply("day",f.date()).imply("month",f.month()+1).imply("year",f.year())}};df.default=cf});var f_=O(hf=>{"use strict";Object.defineProperty(hf,"__esModule",{value:!0});var Nx=Nt(),c_=rr(),su=rr(),d_=rr(),Cx=Fe(),Ix=Z(),Fx=new RegExp(`(?:on\\s*?)?(${su.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:tot|\\-|\\\u2013|until|through|till|\\s)\\s*(${su.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:of)?\\s*)(`+Cx.matchAnyPattern(c_.MONTH_DICTIONARY)+`)(?:(?:-|/|,?\\s*)(${d_.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Lx=3,o_=1,u_=2,l_=4,ff=class extends Ix.AbstractParserWithWordBoundaryChecking{innerPattern(){return Fx}innerExtract(e,t){let n=c_.MONTH_DICTIONARY[t[Lx].toLowerCase()],s=su.parseOrdinalNumberPattern(t[o_]);if(s>31)return t.index=t.index+t[o_].length,null;let a=e.createParsingComponents({day:s,month:n});if(t[l_]){let c=d_.parseYear(t[l_]);a.assign("year",c)}else{let c=Nx.findYearClosestToRef(e.refDate,s,n);a.imply("year",c)}if(!t[u_])return a;let o=su.parseOrdinalNumberPattern(t[u_]),l=e.createParsingResult(t.index,t[0]);return l.start=a,l.end=a.clone(),l.end.assign("day",o),l}};hf.default=ff});var y_=O(mf=>{"use strict";Object.defineProperty(mf,"__esModule",{value:!0});var p_=rr(),Yx=Nt(),Ux=Fe(),m_=rr(),Wx=Z(),qx=new RegExp(`(${Ux.matchAnyPattern(p_.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${m_.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),jx=1,h_=2,pf=class extends Wx.AbstractParserWithWordBoundaryChecking{innerPattern(){return qx}innerExtract(e,t){let n=e.createParsingComponents();n.imply("day",1);let s=t[jx],a=p_.MONTH_DICTIONARY[s.toLowerCase()];if(n.assign("month",a),t[h_]){let o=m_.parseYear(t[h_]);n.assign("year",o)}else{let o=Yx.findYearClosestToRef(e.refDate,1,a);n.imply("year",o)}return n}};mf.default=pf});var g_=O(gf=>{"use strict";Object.defineProperty(gf,"__esModule",{value:!0});var $x=Z(),Gx=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),Hx=1,Bx=2,yf=class extends $x.AbstractParserWithWordBoundaryChecking{innerPattern(){return Gx}innerExtract(e,t){let n=parseInt(t[Bx]),s=parseInt(t[Hx]);return e.createParsingComponents().imply("day",1).assign("month",s).assign("year",n)}};gf.default=yf});var __=O(Tf=>{"use strict";Object.defineProperty(Tf,"__esModule",{value:!0});var zx=fs(),_f=class extends zx.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)}};Tf.default=_f});var v_=O(vf=>{"use strict";Object.defineProperty(vf,"__esModule",{value:!0});var b_=rr(),Vx=Fe(),Kx=Z(),Zx=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${Vx.matchAnyPattern(b_.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),Qx=1,Xx=2,T_=3,Jx=4,bf=class extends Kx.AbstractParserWithWordBoundaryChecking{innerPattern(){return Zx}innerExtract(e,t){let n=t[T_]?parseInt(t[T_]):b_.MONTH_DICTIONARY[t[Xx].toLowerCase()];if(n<1||n>12)return null;let s=parseInt(t[Qx]);return{day:parseInt(t[Jx]),month:n,year:s}}};vf.default=bf});var w_=O(Ta=>{"use strict";var eA=Ta&&Ta.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ta,"__esModule",{value:!0});var tA=Z(),iu=_t(),wf=gr(),rA=eA(Re()),nA=1,sA=2,kf=class extends tA.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(gisteren|morgen|van)(ochtend|middag|namiddag|avond|nacht)(?=\W|$)/i}innerExtract(e,t){let n=t[nA].toLowerCase(),s=t[sA].toLowerCase(),a=e.createParsingComponents(),o=rA.default(e.refDate);switch(n){case"gisteren":wf.assignSimilarDate(a,o.add(-1,"day"));break;case"van":wf.assignSimilarDate(a,o);break;case"morgen":wf.assignTheNextDay(a,o);break}switch(s){case"ochtend":a.imply("meridiem",iu.Meridiem.AM),a.imply("hour",6);break;case"middag":a.imply("meridiem",iu.Meridiem.AM),a.imply("hour",12);break;case"namiddag":a.imply("meridiem",iu.Meridiem.PM),a.imply("hour",15);break;case"avond":a.imply("meridiem",iu.Meridiem.PM),a.imply("hour",20);break}return a}};Ta.default=kf});var E_=O(Df=>{"use strict";Object.defineProperty(Df,"__esModule",{value:!0});var k_=rr(),iA=it(),aA=Z(),oA=_r(),uA=new RegExp(`(deze|vorige|afgelopen|komende|over|\\+|-)\\s*(${k_.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Ef=class extends aA.AbstractParserWithWordBoundaryChecking{innerPattern(){return uA}innerExtract(e,t){let n=t[1].toLowerCase(),s=k_.parseTimeUnits(t[2]);switch(n){case"vorige":case"afgelopen":case"-":s=oA.reverseTimeUnits(s);break}return iA.ParsingComponents.createRelativeFromReference(e.reference,s)}};Df.default=Ef});var O_=O(ba=>{"use strict";var lA=ba&&ba.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ba,"__esModule",{value:!0});var S_=rr(),D_=it(),cA=lA(Re()),dA=Z(),fA=Fe(),hA=new RegExp(`(dit|deze|komende|volgend|volgende|afgelopen|vorige)\\s*(${fA.matchAnyPattern(S_.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),pA=1,mA=2,Sf=class extends dA.AbstractParserWithWordBoundaryChecking{innerPattern(){return hA}innerExtract(e,t){let n=t[pA].toLowerCase(),s=t[mA].toLowerCase(),a=S_.TIME_UNIT_DICTIONARY[s];if(n=="volgend"||n=="volgende"||n=="komende"){let c={};return c[a]=1,D_.ParsingComponents.createRelativeFromReference(e.reference,c)}if(n=="afgelopen"||n=="vorige"){let c={};return c[a]=-1,D_.ParsingComponents.createRelativeFromReference(e.reference,c)}let o=e.createParsingComponents(),l=cA.default(e.reference.instant);return s.match(/week/i)?(l=l.add(-l.get("d"),"d"),o.imply("day",l.date()),o.imply("month",l.month()+1),o.imply("year",l.year())):s.match(/maand/i)?(l=l.add(-l.date()+1,"d"),o.imply("day",l.date()),o.assign("year",l.year()),o.assign("month",l.month()+1)):s.match(/jaar/i)&&(l=l.add(-l.date()+1,"d"),l=l.add(-l.month(),"month"),o.imply("day",l.date()),o.imply("month",l.month()+1),o.assign("year",l.year())),o}};ba.default=Sf});var M_=O(Rf=>{"use strict";Object.defineProperty(Rf,"__esModule",{value:!0});var Mf=rr(),yA=it(),gA=Z(),_A=_r(),TA=new RegExp("("+Mf.TIME_UNITS_PATTERN+")(?:geleden|voor|eerder)(?=(?:\\W|$))","i"),bA=new RegExp("("+Mf.TIME_UNITS_PATTERN+")geleden(?=(?:\\W|$))","i"),Of=class extends gA.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?bA:TA}innerExtract(e,t){let n=Mf.parseTimeUnits(t[1]),s=_A.reverseTimeUnits(n);return yA.ParsingComponents.createRelativeFromReference(e.reference,s)}};Rf.default=Of});var R_=O(Pf=>{"use strict";Object.defineProperty(Pf,"__esModule",{value:!0});var Af=rr(),vA=it(),wA=Z(),kA=new RegExp("("+Af.TIME_UNITS_PATTERN+")(later|na|vanaf nu|voortaan|vooruit|uit)(?=(?:\\W|$))","i"),EA=new RegExp("("+Af.TIME_UNITS_PATTERN+")(later|vanaf nu)(?=(?:\\W|$))","i"),DA=1,xf=class extends wA.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?EA:kA}innerExtract(e,t){let n=Af.parseTimeUnits(t[DA]);return vA.ParsingComponents.createRelativeFromReference(e.reference,n)}};Pf.default=xf});var N_=O(Ot=>{"use strict";var It=Ot&&Ot.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ot,"__esModule",{value:!0});Ot.createConfiguration=Ot.createCasualConfiguration=Ot.parseDate=Ot.parse=Ot.strict=Ot.casual=void 0;var SA=cn(),x_=Ar(),OA=It(Zg()),MA=It(Qg()),RA=It(Xg()),xA=It(Jg()),AA=It(ms()),PA=It(s_()),NA=It(a_()),CA=It(f_()),A_=It(y_()),IA=It(g_()),FA=It(__()),LA=It(v_()),YA=It(w_()),UA=It(E_()),WA=It(O_()),qA=It(M_()),jA=It(R_());Ot.casual=new x_.Chrono(P_());Ot.strict=new x_.Chrono(Nf(!0));function $A(r,e,t){return Ot.casual.parse(r,e,t)}Ot.parse=$A;function GA(r,e,t){return Ot.casual.parseDate(r,e,t)}Ot.parseDate=GA;function P_(r=!0){let e=Nf(!1,r);return e.parsers.unshift(new RA.default),e.parsers.unshift(new xA.default),e.parsers.unshift(new YA.default),e.parsers.unshift(new A_.default),e.parsers.unshift(new WA.default),e.parsers.unshift(new UA.default),e}Ot.createCasualConfiguration=P_;function Nf(r=!0,e=!0){return SA.includeCommonConfiguration({parsers:[new AA.default(e),new PA.default,new CA.default,new A_.default,new NA.default,new LA.default,new IA.default,new FA.default(r),new qA.default(r),new jA.default(r)],refiners:[new MA.default,new OA.default]},r)}Ot.createConfiguration=Nf});var L_=O(va=>{"use strict";var HA=va&&va.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(va,"__esModule",{value:!0});var BA=HA(Re()),zA=Z(),VA=1,C_=2,KA=3,I_=4,F_=5,ZA=6,Cf=class extends zA.AbstractParserWithWordBoundaryChecking{innerPattern(e){return new RegExp("(\u800C\u5BB6|\u7ACB(?:\u523B|\u5373)|\u5373\u523B)|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s|,|\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?","i")}innerExtract(e,t){let n=t.index,s=e.createParsingResult(n,t[0]),a=BA.default(e.refDate),o=a;if(t[VA])s.start.imply("hour",a.hour()),s.start.imply("minute",a.minute()),s.start.imply("second",a.second()),s.start.imply("millisecond",a.millisecond());else if(t[C_]){let l=t[C_],c=t[KA];l=="\u660E"||l=="\u807D"?a.hour()>1&&(o=o.add(1,"day")):l=="\u6628"||l=="\u5C0B"||l=="\u7434"?o=o.add(-1,"day"):l=="\u524D"?o=o.add(-2,"day"):l=="\u5927\u524D"?o=o.add(-3,"day"):l=="\u5F8C"?o=o.add(2,"day"):l=="\u5927\u5F8C"&&(o=o.add(3,"day")),c=="\u65E9"||c=="\u671D"?s.start.imply("hour",6):c=="\u665A"&&(s.start.imply("hour",22),s.start.imply("meridiem",1))}else if(t[I_]){let c=t[I_][0];c=="\u65E9"||c=="\u671D"||c=="\u4E0A"?s.start.imply("hour",6):c=="\u4E0B"||c=="\u664F"?(s.start.imply("hour",15),s.start.imply("meridiem",1)):c=="\u4E2D"?(s.start.imply("hour",12),s.start.imply("meridiem",1)):c=="\u591C"||c=="\u665A"?(s.start.imply("hour",22),s.start.imply("meridiem",1)):c=="\u51CC"&&s.start.imply("hour",0)}else if(t[F_]){let l=t[F_];l=="\u660E"||l=="\u807D"?a.hour()>1&&(o=o.add(1,"day")):l=="\u6628"||l=="\u5C0B"||l=="\u7434"?o=o.add(-1,"day"):l=="\u524D"?o=o.add(-2,"day"):l=="\u5927\u524D"?o=o.add(-3,"day"):l=="\u5F8C"?o=o.add(2,"day"):l=="\u5927\u5F8C"&&(o=o.add(3,"day"));let c=t[ZA];if(c){let f=c[0];f=="\u65E9"||f=="\u671D"||f=="\u4E0A"?s.start.imply("hour",6):f=="\u4E0B"||f=="\u664F"?(s.start.imply("hour",15),s.start.imply("meridiem",1)):f=="\u4E2D"?(s.start.imply("hour",12),s.start.imply("meridiem",1)):f=="\u591C"||f=="\u665A"?(s.start.imply("hour",22),s.start.imply("meridiem",1)):f=="\u51CC"&&s.start.imply("hour",0)}}return s.start.assign("day",o.date()),s.start.assign("month",o.month()+1),s.start.assign("year",o.year()),s}};va.default=Cf});var ai=O(Kt=>{"use strict";Object.defineProperty(Kt,"__esModule",{value:!0});Kt.zhStringToYear=Kt.zhStringToNumber=Kt.WEEKDAY_OFFSET=Kt.NUMBER=void 0;Kt.NUMBER={\u96F6:0,\u4E00:1,\u4E8C:2,\u5169:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6,\u4E03:7,\u516B:8,\u4E5D:9,\u5341:10,\u5EFF:20,\u5345:30};Kt.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function QA(r){let e=0;for(let t=0;t{"use strict";var JA=wa&&wa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(wa,"__esModule",{value:!0});var eP=JA(Re()),tP=Z(),_s=ai(),If=1,Y_=2,Ff=3,Lf=class extends tP.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(_s.NUMBER).join("")+"]{4}|["+Object.keys(_s.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(_s.NUMBER).join("")+"]{1,2})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(_s.NUMBER).join("")+"]{1,2})?(?:\\s*)(?:\u65E5|\u865F)?")}innerExtract(e,t){let n=eP.default(e.refDate),s=e.createParsingResult(t.index,t[0]),a=parseInt(t[Y_]);if(isNaN(a)&&(a=_s.zhStringToNumber(t[Y_])),s.start.assign("month",a),t[Ff]){let o=parseInt(t[Ff]);isNaN(o)&&(o=_s.zhStringToNumber(t[Ff])),s.start.assign("day",o)}else s.start.imply("day",n.date());if(t[If]){let o=parseInt(t[If]);isNaN(o)&&(o=_s.zhStringToYear(t[If])),s.start.assign("year",o)}else s.start.imply("year",n.year());return s}};wa.default=Lf});var q_=O(ka=>{"use strict";var rP=ka&&ka.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ka,"__esModule",{value:!0});var nP=rP(Re()),sP=Z(),W_=ai(),iP=new RegExp("(\\d+|["+Object.keys(W_.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"),Yf=1,aP=2,Uf=class extends sP.AbstractParserWithWordBoundaryChecking{innerPattern(){return iP}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=parseInt(t[Yf]);if(isNaN(s)&&(s=W_.zhStringToNumber(t[Yf])),isNaN(s)){let c=t[Yf];if(c==="\u5E7E")s=3;else if(c==="\u534A")s=.5;else return null}let a=nP.default(e.refDate),l=t[aP][0];return l.match(/[日天星禮月年]/)?(l=="\u65E5"||l=="\u5929"?a=a.add(s,"d"):l=="\u661F"||l=="\u79AE"?a=a.add(s*7,"d"):l=="\u6708"?a=a.add(s,"month"):l=="\u5E74"&&(a=a.add(s,"year")),n.start.assign("year",a.year()),n.start.assign("month",a.month()+1),n.start.assign("day",a.date()),n):(l=="\u79D2"?a=a.add(s,"second"):l=="\u5206"?a=a.add(s,"minute"):(l=="\u5C0F"||l=="\u9418")&&(a=a.add(s,"hour")),n.start.imply("year",a.year()),n.start.imply("month",a.month()+1),n.start.imply("day",a.date()),n.start.assign("hour",a.hour()),n.start.assign("minute",a.minute()),n.start.assign("second",a.second()),n)}};ka.default=Uf});var $_=O(Ea=>{"use strict";var oP=Ea&&Ea.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ea,"__esModule",{value:!0});var uP=oP(Re()),lP=Z(),j_=ai(),cP=new RegExp("(?\u4E0A|\u4ECA|\u4E0B|\u9019|\u5462)(?:\u500B)?(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?"+Object.keys(j_.WEEKDAY_OFFSET).join("|")+")"),Wf=class extends lP.AbstractParserWithWordBoundaryChecking{innerPattern(){return cP}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=t.groups.weekday,a=j_.WEEKDAY_OFFSET[s];if(a===void 0)return null;let o=null,l=t.groups.prefix;l=="\u4E0A"?o="last":l=="\u4E0B"?o="next":(l=="\u4ECA"||l=="\u9019"||l=="\u5462")&&(o="this");let c=uP.default(e.refDate),f=!1,p=c.day();return o=="last"||o=="past"?(c=c.day(a-7),f=!0):o=="next"?(c=c.day(a+7),f=!0):o=="this"?c=c.day(a):Math.abs(a-7-p){"use strict";var dP=Da&&Da.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Da,"__esModule",{value:!0});var fP=dP(Re()),hP=Z(),vr=ai(),pP=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(vr.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(vr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(vr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),mP=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(vr.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(vr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(vr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),au=1,ou=2,uu=3,lu=4,cu=5,du=6,br=7,oi=8,fu=9,qf=class extends hP.AbstractParserWithWordBoundaryChecking{innerPattern(){return pP}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=fP.default(e.refDate),s=e.createParsingResult(t.index,t[0]),a=n.clone();if(t[au]){var o=t[au];o=="\u660E"||o=="\u807D"?n.hour()>1&&a.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?a.add(-1,"day"):o=="\u524D"?a.add(-2,"day"):o=="\u5927\u524D"?a.add(-3,"day"):o=="\u5F8C"?a.add(2,"day"):o=="\u5927\u5F8C"&&a.add(3,"day"),s.start.assign("day",a.date()),s.start.assign("month",a.month()+1),s.start.assign("year",a.year())}else if(t[lu]){var l=t[lu];l=="\u660E"||l=="\u807D"?a.add(1,"day"):l=="\u6628"||l=="\u5C0B"||l=="\u7434"?a.add(-1,"day"):l=="\u524D"?a.add(-2,"day"):l=="\u5927\u524D"?a.add(-3,"day"):l=="\u5F8C"?a.add(2,"day"):l=="\u5927\u5F8C"&&a.add(3,"day"),s.start.assign("day",a.date()),s.start.assign("month",a.month()+1),s.start.assign("year",a.year())}else s.start.imply("day",a.date()),s.start.imply("month",a.month()+1),s.start.imply("year",a.year());let c=0,f=0,p=-1;if(t[oi]){var g=parseInt(t[oi]);if(isNaN(g)&&(g=vr.zhStringToNumber(t[oi])),g>=60)return null;s.start.assign("second",g)}if(c=parseInt(t[du]),isNaN(c)&&(c=vr.zhStringToNumber(t[du])),t[br]?t[br]=="\u534A"?f=30:t[br]=="\u6B63"||t[br]=="\u6574"?f=0:(f=parseInt(t[br]),isNaN(f)&&(f=vr.zhStringToNumber(t[br]))):c>100&&(f=c%100,c=Math.floor(c/100)),f>=60||c>24)return null;if(c>=12&&(p=1),t[fu]){if(c>12)return null;var T=t[fu][0].toLowerCase();T=="a"&&(p=0,c==12&&(c=0)),T=="p"&&(p=1,c!=12&&(c+=12))}else if(t[ou]){var S=t[ou],b=S[0];b=="\u671D"||b=="\u65E9"?(p=0,c==12&&(c=0)):b=="\u665A"&&(p=1,c!=12&&(c+=12))}else if(t[uu]){var x=t[uu],C=x[0];C=="\u4E0A"||C=="\u671D"||C=="\u65E9"||C=="\u51CC"?(p=0,c==12&&(c=0)):(C=="\u4E0B"||C=="\u664F"||C=="\u665A")&&(p=1,c!=12&&(c+=12))}else if(t[cu]){var G=t[cu],K=G[0];K=="\u4E0A"||K=="\u671D"||K=="\u65E9"||K=="\u51CC"?(p=0,c==12&&(c=0)):(K=="\u4E0B"||K=="\u664F"||K=="\u665A")&&(p=1,c!=12&&(c+=12))}if(s.start.assign("hour",c),s.start.assign("minute",f),p>=0?s.start.assign("meridiem",p):c<12?s.start.imply("meridiem",0):s.start.imply("meridiem",1),t=mP.exec(e.text.substring(s.index+s.text.length)),!t)return s.text.match(/^\d+$/)?null:s;let B=a.clone();if(s.end=e.createParsingComponents(),t[au]){var o=t[au];o=="\u660E"||o=="\u807D"?n.hour()>1&&B.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?B.add(-1,"day"):o=="\u524D"?B.add(-2,"day"):o=="\u5927\u524D"?B.add(-3,"day"):o=="\u5F8C"?B.add(2,"day"):o=="\u5927\u5F8C"&&B.add(3,"day"),s.end.assign("day",B.date()),s.end.assign("month",B.month()+1),s.end.assign("year",B.year())}else if(t[lu]){var l=t[lu];l=="\u660E"||l=="\u807D"?B.add(1,"day"):l=="\u6628"||l=="\u5C0B"||l=="\u7434"?B.add(-1,"day"):l=="\u524D"?B.add(-2,"day"):l=="\u5927\u524D"?B.add(-3,"day"):l=="\u5F8C"?B.add(2,"day"):l=="\u5927\u5F8C"&&B.add(3,"day"),s.end.assign("day",B.date()),s.end.assign("month",B.month()+1),s.end.assign("year",B.year())}else s.end.imply("day",B.date()),s.end.imply("month",B.month()+1),s.end.imply("year",B.year());if(c=0,f=0,p=-1,t[oi]){var g=parseInt(t[oi]);if(isNaN(g)&&(g=vr.zhStringToNumber(t[oi])),g>=60)return null;s.end.assign("second",g)}if(c=parseInt(t[du]),isNaN(c)&&(c=vr.zhStringToNumber(t[du])),t[br]?t[br]=="\u534A"?f=30:t[br]=="\u6B63"||t[br]=="\u6574"?f=0:(f=parseInt(t[br]),isNaN(f)&&(f=vr.zhStringToNumber(t[br]))):c>100&&(f=c%100,c=Math.floor(c/100)),f>=60||c>24)return null;if(c>=12&&(p=1),t[fu]){if(c>12)return null;var T=t[fu][0].toLowerCase();T=="a"&&(p=0,c==12&&(c=0)),T=="p"&&(p=1,c!=12&&(c+=12)),s.start.isCertain("meridiem")||(p==0?(s.start.imply("meridiem",0),s.start.get("hour")==12&&s.start.assign("hour",0)):(s.start.imply("meridiem",1),s.start.get("hour")!=12&&s.start.assign("hour",s.start.get("hour")+12)))}else if(t[ou]){var S=t[ou],b=S[0];b=="\u671D"||b=="\u65E9"?(p=0,c==12&&(c=0)):b=="\u665A"&&(p=1,c!=12&&(c+=12))}else if(t[uu]){var x=t[uu],C=x[0];C=="\u4E0A"||C=="\u671D"||C=="\u65E9"||C=="\u51CC"?(p=0,c==12&&(c=0)):(C=="\u4E0B"||C=="\u664F"||C=="\u665A")&&(p=1,c!=12&&(c+=12))}else if(t[cu]){var G=t[cu],K=G[0];K=="\u4E0A"||K=="\u671D"||K=="\u65E9"||K=="\u51CC"?(p=0,c==12&&(c=0)):(K=="\u4E0B"||K=="\u664F"||K=="\u665A")&&(p=1,c!=12&&(c+=12))}return s.text=s.text+t[0],s.end.assign("hour",c),s.end.assign("minute",f),p>=0?s.end.assign("meridiem",p):s.start.isCertain("meridiem")&&s.start.get("meridiem")==1&&s.start.get("hour")>c?s.end.imply("meridiem",0):c>12&&s.end.imply("meridiem",1),s.end.date().getTime(){"use strict";var yP=Sa&&Sa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Sa,"__esModule",{value:!0});var gP=yP(Re()),_P=Z(),H_=ai(),TP=new RegExp("(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?"+Object.keys(H_.WEEKDAY_OFFSET).join("|")+")"),jf=class extends _P.AbstractParserWithWordBoundaryChecking{innerPattern(){return TP}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=t.groups.weekday,a=H_.WEEKDAY_OFFSET[s];if(a===void 0)return null;let o=gP.default(e.refDate),l=!1,c=o.day();return Math.abs(a-7-c){"use strict";var bP=Oa&&Oa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Oa,"__esModule",{value:!0});var vP=bP(Gr()),$f=class extends vP.default{patternBetween(){return/^\s*(至|到|\-|\~|~|-|ー)\s*$/i}};Oa.default=$f});var V_=O(Ma=>{"use strict";var wP=Ma&&Ma.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ma,"__esModule",{value:!0});var kP=wP(ln()),Gf=class extends kP.default{patternBetween(){return/^\s*$/i}};Ma.default=Gf});var K_=O(ct=>{"use strict";var mn=ct&&ct.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ct,"__esModule",{value:!0});ct.createConfiguration=ct.createCasualConfiguration=ct.parseDate=ct.parse=ct.strict=ct.casual=ct.hant=void 0;var Hf=Ar(),EP=mn(jo()),DP=cn(),SP=mn(L_()),OP=mn(U_()),MP=mn(q_()),RP=mn($_()),xP=mn(G_()),AP=mn(B_()),PP=mn(z_()),NP=mn(V_());ct.hant=new Hf.Chrono(Bf());ct.casual=new Hf.Chrono(Bf());ct.strict=new Hf.Chrono(zf());function CP(r,e,t){return ct.casual.parse(r,e,t)}ct.parse=CP;function IP(r,e,t){return ct.casual.parseDate(r,e,t)}ct.parseDate=IP;function Bf(){let r=zf();return r.parsers.unshift(new SP.default),r}ct.createCasualConfiguration=Bf;function zf(){let r=DP.includeCommonConfiguration({parsers:[new OP.default,new RP.default,new AP.default,new xP.default,new MP.default],refiners:[new PP.default,new NP.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof EP.default)),r}ct.createConfiguration=zf});var J_=O(Ra=>{"use strict";var FP=Ra&&Ra.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ra,"__esModule",{value:!0});var LP=FP(Re()),YP=Z(),UP=1,Z_=2,WP=3,Q_=4,X_=5,qP=6,Vf=class extends YP.AbstractParserWithWordBoundaryChecking{innerPattern(e){return new RegExp("(\u73B0\u5728|\u7ACB(?:\u523B|\u5373)|\u5373\u523B)|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s|,|\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?","i")}innerExtract(e,t){let n=t.index,s=e.createParsingResult(n,t[0]),a=LP.default(e.refDate),o=a;if(t[UP])s.start.imply("hour",a.hour()),s.start.imply("minute",a.minute()),s.start.imply("second",a.second()),s.start.imply("millisecond",a.millisecond());else if(t[Z_]){let l=t[Z_],c=t[WP];l=="\u660E"?a.hour()>1&&(o=o.add(1,"day")):l=="\u6628"?o=o.add(-1,"day"):l=="\u524D"?o=o.add(-2,"day"):l=="\u5927\u524D"?o=o.add(-3,"day"):l=="\u540E"?o=o.add(2,"day"):l=="\u5927\u540E"&&(o=o.add(3,"day")),c=="\u65E9"?s.start.imply("hour",6):c=="\u665A"&&(s.start.imply("hour",22),s.start.imply("meridiem",1))}else if(t[Q_]){let c=t[Q_][0];c=="\u65E9"||c=="\u4E0A"?s.start.imply("hour",6):c=="\u4E0B"?(s.start.imply("hour",15),s.start.imply("meridiem",1)):c=="\u4E2D"?(s.start.imply("hour",12),s.start.imply("meridiem",1)):c=="\u591C"||c=="\u665A"?(s.start.imply("hour",22),s.start.imply("meridiem",1)):c=="\u51CC"&&s.start.imply("hour",0)}else if(t[X_]){let l=t[X_];l=="\u660E"?a.hour()>1&&(o=o.add(1,"day")):l=="\u6628"?o=o.add(-1,"day"):l=="\u524D"?o=o.add(-2,"day"):l=="\u5927\u524D"?o=o.add(-3,"day"):l=="\u540E"?o=o.add(2,"day"):l=="\u5927\u540E"&&(o=o.add(3,"day"));let c=t[qP];if(c){let f=c[0];f=="\u65E9"||f=="\u4E0A"?s.start.imply("hour",6):f=="\u4E0B"?(s.start.imply("hour",15),s.start.imply("meridiem",1)):f=="\u4E2D"?(s.start.imply("hour",12),s.start.imply("meridiem",1)):f=="\u591C"||f=="\u665A"?(s.start.imply("hour",22),s.start.imply("meridiem",1)):f=="\u51CC"&&s.start.imply("hour",0)}}return s.start.assign("day",o.date()),s.start.assign("month",o.month()+1),s.start.assign("year",o.year()),s}};Ra.default=Vf});var ui=O(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.zhStringToYear=Zt.zhStringToNumber=Zt.WEEKDAY_OFFSET=Zt.NUMBER=void 0;Zt.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};Zt.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function jP(r){let e=0;for(let t=0;t{"use strict";var GP=xa&&xa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(xa,"__esModule",{value:!0});var HP=GP(Re()),BP=Z(),Ts=ui(),Kf=1,eT=2,Zf=3,Qf=class extends BP.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(Ts.NUMBER).join("")+"]{4}|["+Object.keys(Ts.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(Ts.NUMBER).join("")+"]{1,3})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(Ts.NUMBER).join("")+"]{1,3})?(?:\\s*)(?:\u65E5|\u53F7)?")}innerExtract(e,t){let n=HP.default(e.refDate),s=e.createParsingResult(t.index,t[0]),a=parseInt(t[eT]);if(isNaN(a)&&(a=Ts.zhStringToNumber(t[eT])),s.start.assign("month",a),t[Zf]){let o=parseInt(t[Zf]);isNaN(o)&&(o=Ts.zhStringToNumber(t[Zf])),s.start.assign("day",o)}else s.start.imply("day",n.date());if(t[Kf]){let o=parseInt(t[Kf]);isNaN(o)&&(o=Ts.zhStringToYear(t[Kf])),s.start.assign("year",o)}else s.start.imply("year",n.year());return s}};xa.default=Qf});var nT=O(Aa=>{"use strict";var zP=Aa&&Aa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Aa,"__esModule",{value:!0});var VP=zP(Re()),KP=Z(),rT=ui(),ZP=new RegExp("(\\d+|["+Object.keys(rT.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"),Xf=1,QP=2,Jf=class extends KP.AbstractParserWithWordBoundaryChecking{innerPattern(){return ZP}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=parseInt(t[Xf]);if(isNaN(s)&&(s=rT.zhStringToNumber(t[Xf])),isNaN(s)){let c=t[Xf];if(c==="\u51E0")s=3;else if(c==="\u534A")s=.5;else return null}let a=VP.default(e.refDate),l=t[QP][0];return l.match(/[日天星礼月年]/)?(l=="\u65E5"||l=="\u5929"?a=a.add(s,"d"):l=="\u661F"||l=="\u793C"?a=a.add(s*7,"d"):l=="\u6708"?a=a.add(s,"month"):l=="\u5E74"&&(a=a.add(s,"year")),n.start.assign("year",a.year()),n.start.assign("month",a.month()+1),n.start.assign("day",a.date()),n):(l=="\u79D2"?a=a.add(s,"second"):l=="\u5206"?a=a.add(s,"minute"):(l=="\u5C0F"||l=="\u949F")&&(a=a.add(s,"hour")),n.start.imply("year",a.year()),n.start.imply("month",a.month()+1),n.start.imply("day",a.date()),n.start.assign("hour",a.hour()),n.start.assign("minute",a.minute()),n.start.assign("second",a.second()),n)}};Aa.default=Jf});var iT=O(Pa=>{"use strict";var XP=Pa&&Pa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Pa,"__esModule",{value:!0});var JP=XP(Re()),eN=Z(),sT=ui(),tN=new RegExp("(?\u4E0A|\u4E0B|\u8FD9)(?:\u4E2A)?(?:\u661F\u671F|\u793C\u62DC|\u5468)(?"+Object.keys(sT.WEEKDAY_OFFSET).join("|")+")"),eh=class extends eN.AbstractParserWithWordBoundaryChecking{innerPattern(){return tN}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=t.groups.weekday,a=sT.WEEKDAY_OFFSET[s];if(a===void 0)return null;let o=null,l=t.groups.prefix;l=="\u4E0A"?o="last":l=="\u4E0B"?o="next":l=="\u8FD9"&&(o="this");let c=JP.default(e.refDate),f=!1,p=c.day();return o=="last"||o=="past"?(c=c.day(a-7),f=!0):o=="next"?(c=c.day(a+7),f=!0):o=="this"?c=c.day(a):Math.abs(a-7-p){"use strict";var rN=Na&&Na.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Na,"__esModule",{value:!0});var nN=rN(Re()),sN=Z(),kr=ui(),iN=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(kr.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(kr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(kr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),aN=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(kr.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(kr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(kr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),hu=1,pu=2,mu=3,yu=4,gu=5,_u=6,wr=7,li=8,Tu=9,th=class extends sN.AbstractParserWithWordBoundaryChecking{innerPattern(){return iN}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=nN.default(e.refDate),s=e.createParsingResult(t.index,t[0]),a=n.clone();if(t[hu]){let p=t[hu];p=="\u660E"?n.hour()>1&&a.add(1,"day"):p=="\u6628"?a.add(-1,"day"):p=="\u524D"?a.add(-2,"day"):p=="\u5927\u524D"?a.add(-3,"day"):p=="\u540E"?a.add(2,"day"):p=="\u5927\u540E"&&a.add(3,"day"),s.start.assign("day",a.date()),s.start.assign("month",a.month()+1),s.start.assign("year",a.year())}else if(t[yu]){let p=t[yu];p=="\u660E"?a.add(1,"day"):p=="\u6628"?a.add(-1,"day"):p=="\u524D"?a.add(-2,"day"):p=="\u5927\u524D"?a.add(-3,"day"):p=="\u540E"?a.add(2,"day"):p=="\u5927\u540E"&&a.add(3,"day"),s.start.assign("day",a.date()),s.start.assign("month",a.month()+1),s.start.assign("year",a.year())}else s.start.imply("day",a.date()),s.start.imply("month",a.month()+1),s.start.imply("year",a.year());let o=0,l=0,c=-1;if(t[li]){let p=parseInt(t[li]);if(isNaN(p)&&(p=kr.zhStringToNumber(t[li])),p>=60)return null;s.start.assign("second",p)}if(o=parseInt(t[_u]),isNaN(o)&&(o=kr.zhStringToNumber(t[_u])),t[wr]?t[wr]=="\u534A"?l=30:t[wr]=="\u6B63"||t[wr]=="\u6574"?l=0:(l=parseInt(t[wr]),isNaN(l)&&(l=kr.zhStringToNumber(t[wr]))):o>100&&(l=o%100,o=Math.floor(o/100)),l>=60||o>24)return null;if(o>=12&&(c=1),t[Tu]){if(o>12)return null;let p=t[Tu][0].toLowerCase();p=="a"&&(c=0,o==12&&(o=0)),p=="p"&&(c=1,o!=12&&(o+=12))}else if(t[pu]){let g=t[pu][0];g=="\u65E9"?(c=0,o==12&&(o=0)):g=="\u665A"&&(c=1,o!=12&&(o+=12))}else if(t[mu]){let g=t[mu][0];g=="\u4E0A"||g=="\u65E9"||g=="\u51CC"?(c=0,o==12&&(o=0)):(g=="\u4E0B"||g=="\u665A")&&(c=1,o!=12&&(o+=12))}else if(t[gu]){let g=t[gu][0];g=="\u4E0A"||g=="\u65E9"||g=="\u51CC"?(c=0,o==12&&(o=0)):(g=="\u4E0B"||g=="\u665A")&&(c=1,o!=12&&(o+=12))}if(s.start.assign("hour",o),s.start.assign("minute",l),c>=0?s.start.assign("meridiem",c):o<12?s.start.imply("meridiem",0):s.start.imply("meridiem",1),t=aN.exec(e.text.substring(s.index+s.text.length)),!t)return s.text.match(/^\d+$/)?null:s;let f=a.clone();if(s.end=e.createParsingComponents(),t[hu]){let p=t[hu];p=="\u660E"?n.hour()>1&&f.add(1,"day"):p=="\u6628"?f.add(-1,"day"):p=="\u524D"?f.add(-2,"day"):p=="\u5927\u524D"?f.add(-3,"day"):p=="\u540E"?f.add(2,"day"):p=="\u5927\u540E"&&f.add(3,"day"),s.end.assign("day",f.date()),s.end.assign("month",f.month()+1),s.end.assign("year",f.year())}else if(t[yu]){let p=t[yu];p=="\u660E"?f.add(1,"day"):p=="\u6628"?f.add(-1,"day"):p=="\u524D"?f.add(-2,"day"):p=="\u5927\u524D"?f.add(-3,"day"):p=="\u540E"?f.add(2,"day"):p=="\u5927\u540E"&&f.add(3,"day"),s.end.assign("day",f.date()),s.end.assign("month",f.month()+1),s.end.assign("year",f.year())}else s.end.imply("day",f.date()),s.end.imply("month",f.month()+1),s.end.imply("year",f.year());if(o=0,l=0,c=-1,t[li]){let p=parseInt(t[li]);if(isNaN(p)&&(p=kr.zhStringToNumber(t[li])),p>=60)return null;s.end.assign("second",p)}if(o=parseInt(t[_u]),isNaN(o)&&(o=kr.zhStringToNumber(t[_u])),t[wr]?t[wr]=="\u534A"?l=30:t[wr]=="\u6B63"||t[wr]=="\u6574"?l=0:(l=parseInt(t[wr]),isNaN(l)&&(l=kr.zhStringToNumber(t[wr]))):o>100&&(l=o%100,o=Math.floor(o/100)),l>=60||o>24)return null;if(o>=12&&(c=1),t[Tu]){if(o>12)return null;let p=t[Tu][0].toLowerCase();p=="a"&&(c=0,o==12&&(o=0)),p=="p"&&(c=1,o!=12&&(o+=12)),s.start.isCertain("meridiem")||(c==0?(s.start.imply("meridiem",0),s.start.get("hour")==12&&s.start.assign("hour",0)):(s.start.imply("meridiem",1),s.start.get("hour")!=12&&s.start.assign("hour",s.start.get("hour")+12)))}else if(t[pu]){let g=t[pu][0];g=="\u65E9"?(c=0,o==12&&(o=0)):g=="\u665A"&&(c=1,o!=12&&(o+=12))}else if(t[mu]){let g=t[mu][0];g=="\u4E0A"||g=="\u65E9"||g=="\u51CC"?(c=0,o==12&&(o=0)):(g=="\u4E0B"||g=="\u665A")&&(c=1,o!=12&&(o+=12))}else if(t[gu]){let g=t[gu][0];g=="\u4E0A"||g=="\u65E9"||g=="\u51CC"?(c=0,o==12&&(o=0)):(g=="\u4E0B"||g=="\u665A")&&(c=1,o!=12&&(o+=12))}return s.text=s.text+t[0],s.end.assign("hour",o),s.end.assign("minute",l),c>=0?s.end.assign("meridiem",c):s.start.isCertain("meridiem")&&s.start.get("meridiem")==1&&s.start.get("hour")>o?s.end.imply("meridiem",0):o>12&&s.end.imply("meridiem",1),s.end.date().getTime(){"use strict";var oN=Ca&&Ca.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ca,"__esModule",{value:!0});var uN=oN(Re()),lN=Z(),oT=ui(),cN=new RegExp("(?:\u661F\u671F|\u793C\u62DC|\u5468)(?"+Object.keys(oT.WEEKDAY_OFFSET).join("|")+")"),rh=class extends lN.AbstractParserWithWordBoundaryChecking{innerPattern(){return cN}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=t.groups.weekday,a=oT.WEEKDAY_OFFSET[s];if(a===void 0)return null;let o=uN.default(e.refDate),l=!1,c=o.day();return Math.abs(a-7-c){"use strict";var dN=Ia&&Ia.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ia,"__esModule",{value:!0});var fN=dN(Gr()),nh=class extends fN.default{patternBetween(){return/^\s*(至|到|-|~|~|-|ー)\s*$/i}};Ia.default=nh});var cT=O(Fa=>{"use strict";var hN=Fa&&Fa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Fa,"__esModule",{value:!0});var pN=hN(ln()),sh=class extends pN.default{patternBetween(){return/^\s*$/i}};Fa.default=sh});var dT=O(dt=>{"use strict";var yn=dt&&dt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(dt,"__esModule",{value:!0});dt.createConfiguration=dt.createCasualConfiguration=dt.parseDate=dt.parse=dt.strict=dt.casual=dt.hans=void 0;var ih=Ar(),mN=yn(jo()),yN=cn(),gN=yn(J_()),_N=yn(tT()),TN=yn(nT()),bN=yn(iT()),vN=yn(aT()),wN=yn(uT()),kN=yn(lT()),EN=yn(cT());dt.hans=new ih.Chrono(ah());dt.casual=new ih.Chrono(ah());dt.strict=new ih.Chrono(oh());function DN(r,e,t){return dt.casual.parse(r,e,t)}dt.parse=DN;function SN(r,e,t){return dt.casual.parseDate(r,e,t)}dt.parseDate=SN;function ah(){let r=oh();return r.parsers.unshift(new gN.default),r}dt.createCasualConfiguration=ah;function oh(){let r=yN.includeCommonConfiguration({parsers:[new _N.default,new bN.default,new wN.default,new vN.default,new TN.default],refiners:[new kN.default,new EN.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof mN.default)),r}dt.createConfiguration=oh});var hT=O(nr=>{"use strict";var fT=nr&&nr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),ON=nr&&nr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),MN=nr&&nr.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&fT(e,r,t)},RN=nr&&nr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&fT(e,r,t);return ON(e,r),e};Object.defineProperty(nr,"__esModule",{value:!0});nr.hans=void 0;MN(K_(),nr);nr.hans=RN(dT())});var Qt=O(pe=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.parseTimeUnits=pe.TIME_UNITS_PATTERN=pe.parseYear=pe.YEAR_PATTERN=pe.parseOrdinalNumberPattern=pe.ORDINAL_NUMBER_PATTERN=pe.parseNumberPattern=pe.NUMBER_PATTERN=pe.TIME_UNIT_DICTIONARY=pe.ORDINAL_WORD_DICTIONARY=pe.INTEGER_WORD_DICTIONARY=pe.MONTH_DICTIONARY=pe.FULL_MONTH_NAME_DICTIONARY=pe.WEEKDAY_DICTIONARY=pe.REGEX_PARTS=void 0;var bu=Fe(),xN=Nt();pe.REGEX_PARTS={leftBoundary:"([^\\p{L}\\p{N}_]|^)",rightBoundary:"(?=[^\\p{L}\\p{N}_]|$)",flags:"iu"};pe.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};pe.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};pe.MONTH_DICTIONARY=Object.assign(Object.assign({},pe.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});pe.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};pe.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};pe.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"};pe.NUMBER_PATTERN=`(?:${bu.matchAnyPattern(pe.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 mT(r){let e=r.toLowerCase();return pe.INTEGER_WORD_DICTIONARY[e]!==void 0?pe.INTEGER_WORD_DICTIONARY[e]:e.match(/несколько/)?3:e.match(/пол/)?.5:e.match(/пар/)?2:e===""?1:parseFloat(e)}pe.parseNumberPattern=mT;pe.ORDINAL_NUMBER_PATTERN=`(?:${bu.matchAnyPattern(pe.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:\u0433\u043E|\u043E\u0433\u043E|\u0435|\u043E\u0435)?)`;function AN(r){let e=r.toLowerCase();return pe.ORDINAL_WORD_DICTIONARY[e]!==void 0?pe.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}pe.parseOrdinalNumberPattern=AN;var uh="(?:\\s+(?:\u0433\u043E\u0434\u0443|\u0433\u043E\u0434\u0430|\u0433\u043E\u0434|\u0433|\u0433.))?";pe.YEAR_PATTERN=`(?:[1-9][0-9]{0,3}${uh}\\s*(?:\u043D.\u044D.|\u0434\u043E \u043D.\u044D.|\u043D. \u044D.|\u0434\u043E \u043D. \u044D.)|[1-2][0-9]{3}${uh}|[5-9][0-9]${uh})`;function PN(r){if(/(год|года|г|г.)/i.test(r)&&(r=r.replace(/(год|года|г|г.)/i,"")),/(до н.э.|до н. э.)/i.test(r))return r=r.replace(/(до н.э.|до н. э.)/i,""),-parseInt(r);if(/(н. э.|н.э.)/i.test(r))return r=r.replace(/(н. э.|н.э.)/i,""),parseInt(r);let e=parseInt(r);return xN.findMostLikelyADYear(e)}pe.parseYear=PN;var yT=`(${pe.NUMBER_PATTERN})\\s{0,3}(${bu.matchAnyPattern(pe.TIME_UNIT_DICTIONARY)})`,pT=new RegExp(yT,"i");pe.TIME_UNITS_PATTERN=bu.repeatedTimeunitPattern("(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s{0,3})?",yT);function NN(r){let e={},t=r,n=pT.exec(t);for(;n;)CN(e,n),t=t.substring(n[0].length).trim(),n=pT.exec(t);return e}pe.parseTimeUnits=NN;function CN(r,e){let t=mT(e[1]),n=pe.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var _T=O(ch=>{"use strict";Object.defineProperty(ch,"__esModule",{value:!0});var La=Qt(),IN=it(),FN=Z(),gT=`(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s*(?:~\\s*)?)?(${La.TIME_UNITS_PATTERN})${La.REGEX_PARTS.rightBoundary}`,LN=new RegExp(`(?:\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0435|\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0438)\\s*${gT}`,La.REGEX_PARTS.flags),YN=new RegExp(gT,"i"),lh=class extends FN.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return La.REGEX_PARTS.leftBoundary}innerPattern(e){return e.option.forwardDate?YN:LN}innerExtract(e,t){let n=La.parseTimeUnits(t[1]);return IN.ParsingComponents.createRelativeFromReference(e.reference,n)}};ch.default=lh});var kT=O(fh=>{"use strict";Object.defineProperty(fh,"__esModule",{value:!0});var UN=Nt(),Ya=Qt(),wT=Qt(),vu=Qt(),WN=Fe(),qN=Z(),jN=new RegExp(`(?:\u0441)?\\s*(${vu.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:\u043F\u043E|-|\u2013|\u0434\u043E)?\\s{0,3}(${vu.ORDINAL_NUMBER_PATTERN}))?(?:-|\\/|\\s{0,3}(?:of)?\\s{0,3})(${WN.matchAnyPattern(Ya.MONTH_DICTIONARY)})(?:(?:-|\\/|,?\\s{0,3})(${wT.YEAR_PATTERN}(?![^\\s]\\d)))?${Ya.REGEX_PARTS.rightBoundary}`,Ya.REGEX_PARTS.flags),TT=1,bT=2,$N=3,vT=4,dh=class extends qN.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Ya.REGEX_PARTS.leftBoundary}innerPattern(){return jN}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=Ya.MONTH_DICTIONARY[t[$N].toLowerCase()],a=vu.parseOrdinalNumberPattern(t[TT]);if(a>31)return t.index=t.index+t[TT].length,null;if(n.start.assign("month",s),n.start.assign("day",a),t[vT]){let o=wT.parseYear(t[vT]);n.start.assign("year",o)}else{let o=UN.findYearClosestToRef(e.refDate,a,s);n.start.imply("year",o)}if(t[bT]){let o=vu.parseOrdinalNumberPattern(t[bT]);n.end=n.start.clone(),n.end.assign("day",o)}return n}};fh.default=dh});var ST=O(ph=>{"use strict";Object.defineProperty(ph,"__esModule",{value:!0});var Ua=Qt(),GN=Nt(),HN=Fe(),DT=Qt(),BN=Z(),zN=new RegExp(`((?:\u0432)\\s*)?(${HN.matchAnyPattern(Ua.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${DT.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,Ua.REGEX_PARTS.flags),VN=2,ET=3,hh=class extends BN.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Ua.REGEX_PARTS.leftBoundary}innerPattern(){return zN}innerExtract(e,t){let n=t[VN].toLowerCase();if(t[0].length<=3&&!Ua.FULL_MONTH_NAME_DICTIONARY[n])return null;let s=e.createParsingResult(t.index,t.index+t[0].length);s.start.imply("day",1);let a=Ua.MONTH_DICTIONARY[n];if(s.start.assign("month",a),t[ET]){let o=DT.parseYear(t[ET]);s.start.assign("year",o)}else{let o=GN.findYearClosestToRef(e.refDate,1,a);s.start.imply("year",o)}return s}};ph.default=hh});var MT=O(yh=>{"use strict";Object.defineProperty(yh,"__esModule",{value:!0});var wu=_t(),KN=fs(),OT=Qt(),mh=class extends KN.AbstractTimeExpressionParser{constructor(e){super(e)}patternFlags(){return OT.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))?(?!\\/)${OT.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",wu.Meridiem.PM)):s<6&&n.assign("meridiem",wu.Meridiem.AM)}if(t[0].endsWith("\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F")){n.assign("meridiem",wu.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",wu.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};yh.default=mh});var RT=O(_h=>{"use strict";Object.defineProperty(_h,"__esModule",{value:!0});var ku=Qt(),ZN=it(),QN=Z(),XN=_r(),JN=new RegExp(`(${ku.TIME_UNITS_PATTERN})\\s{0,5}\u043D\u0430\u0437\u0430\u0434(?=(?:\\W|$))`,ku.REGEX_PARTS.flags),gh=class extends QN.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return ku.REGEX_PARTS.leftBoundary}innerPattern(){return JN}innerExtract(e,t){let n=ku.parseTimeUnits(t[1]),s=XN.reverseTimeUnits(n);return ZN.ParsingComponents.createRelativeFromReference(e.reference,s)}};_h.default=gh});var xT=O(Wa=>{"use strict";var eC=Wa&&Wa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Wa,"__esModule",{value:!0});var tC=eC(Gr()),Th=class extends tC.default{patternBetween(){return/^\s*(и до|и по|до|по|-)\s*$/i}};Wa.default=Th});var AT=O(qa=>{"use strict";var rC=qa&&qa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(qa,"__esModule",{value:!0});var nC=rC(ln()),bh=class extends nC.default{patternBetween(){return new RegExp("^\\s*(T|\u0432|,|-)?\\s*$")}};qa.default=bh});var PT=O(gn=>{"use strict";var sC=gn&&gn.__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]}),iC=gn&&gn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),aC=gn&&gn.__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)&&sC(e,r,t);return iC(e,r),e};Object.defineProperty(gn,"__esModule",{value:!0});var oC=Z(),ja=aC(fn()),vh=Qt(),uC=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)${vh.REGEX_PARTS.rightBoundary}`,vh.REGEX_PARTS.flags),wh=class extends oC.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return vh.REGEX_PARTS.leftBoundary}innerPattern(e){return uC}innerExtract(e,t){let n=t[1].toLowerCase(),s=e.createParsingComponents();switch(n){case"\u0441\u0435\u0433\u043E\u0434\u043D\u044F":return ja.today(e.reference);case"\u0432\u0447\u0435\u0440\u0430":return ja.yesterday(e.reference);case"\u0437\u0430\u0432\u0442\u0440\u0430":return ja.tomorrow(e.reference);case"\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430":return ja.theDayAfter(e.reference,2);case"\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430":return ja.theDayBefore(e.reference,2)}return s}};gn.default=wh});var NT=O(Fr=>{"use strict";var lC=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]}),cC=Fr&&Fr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),dC=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)&&lC(e,r,t);return cC(e,r),e},fC=Fr&&Fr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Fr,"__esModule",{value:!0});var hC=Z(),bs=dC(fn()),pC=gr(),mC=fC(Re()),kh=Qt(),yC=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)${kh.REGEX_PARTS.rightBoundary}`,kh.REGEX_PARTS.flags),Eh=class extends hC.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return kh.REGEX_PARTS.leftBoundary}innerPattern(){return yC}innerExtract(e,t){let n=mC.default(e.refDate),s=t[0].toLowerCase(),a=e.createParsingComponents();if(s==="\u0441\u0435\u0439\u0447\u0430\u0441")return bs.now(e.reference);if(s==="\u0432\u0435\u0447\u0435\u0440\u043E\u043C"||s==="\u0432\u0435\u0447\u0435\u0440\u0430")return bs.evening(e.reference);if(s.endsWith("\u0443\u0442\u0440\u043E\u043C")||s.endsWith("\u0443\u0442\u0440\u0430"))return bs.morning(e.reference);if(s.match(/в\s*полдень/))return bs.noon(e.reference);if(s.match(/прошлой\s*ночью/))return bs.lastNight(e.reference);if(s.match(/прошлым\s*вечером/))return bs.yesterdayEvening(e.reference);if(s.match(/следующей\s*ночью/)){let o=n.hour()<22?1:2;n=n.add(o,"day"),pC.assignSimilarDate(a,n),a.imply("hour",0)}return s.match(/в\s*полночь/)||s.endsWith("\u043D\u043E\u0447\u044C\u044E")?bs.midnight(e.reference):a}};Fr.default=Eh});var CT=O(Sh=>{"use strict";Object.defineProperty(Sh,"__esModule",{value:!0});var $a=Qt(),gC=Fe(),_C=Z(),TC=ps(),bC=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*)?(${gC.matchAnyPattern($a.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)?${$a.REGEX_PARTS.rightBoundary}`,$a.REGEX_PARTS.flags),vC=1,wC=2,kC=3,Dh=class extends _C.AbstractParserWithWordBoundaryChecking{innerPattern(){return bC}patternLeftBoundary(){return $a.REGEX_PARTS.leftBoundary}innerExtract(e,t){let n=t[wC].toLowerCase(),s=$a.WEEKDAY_DICTIONARY[n],a=t[vC],o=t[kC],l=a||o;l=l||"",l=l.toLowerCase();let c=null;l=="\u043F\u0440\u043E\u0448\u043B\u044B\u0439"||l=="\u043F\u0440\u043E\u0448\u043B\u0443\u044E"||l=="\u043F\u0440\u043E\u0448\u043B\u043E\u0439"?c="last":l=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439"||l=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E"||l=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||l=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E"?c="next":(l=="\u044D\u0442\u043E\u0442"||l=="\u044D\u0442\u0443"||l=="\u044D\u0442\u043E\u0439")&&(c="this");let f=TC.toDayJSWeekday(e.refDate,s,c);return e.createParsingComponents().assign("weekday",s).imply("day",f.date()).imply("month",f.month()+1).imply("year",f.year())}};Sh.default=Dh});var FT=O(Ha=>{"use strict";var EC=Ha&&Ha.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ha,"__esModule",{value:!0});var Ga=Qt(),IT=it(),DC=EC(Re()),SC=Z(),OC=Fe(),MC=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*(${OC.matchAnyPattern(Ga.TIME_UNIT_DICTIONARY)})(?=\\s*)${Ga.REGEX_PARTS.rightBoundary}`,Ga.REGEX_PARTS.flags),RC=1,xC=2,Oh=class extends SC.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Ga.REGEX_PARTS.leftBoundary}innerPattern(){return MC}innerExtract(e,t){let n=t[RC].toLowerCase(),s=t[xC].toLowerCase(),a=Ga.TIME_UNIT_DICTIONARY[s];if(n=="\u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||n=="\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C"){let c={};return c[a]=1,IT.ParsingComponents.createRelativeFromReference(e.reference,c)}if(n=="\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u043C"||n=="\u043D\u0430 \u043F\u0440\u043E\u0448\u043B\u043E\u0439"){let c={};return c[a]=-1,IT.ParsingComponents.createRelativeFromReference(e.reference,c)}let o=e.createParsingComponents(),l=DC.default(e.reference.instant);return a.match(/week/i)?(l=l.add(-l.get("d"),"d"),o.imply("day",l.date()),o.imply("month",l.month()+1),o.imply("year",l.year())):a.match(/month/i)?(l=l.add(-l.date()+1,"d"),o.imply("day",l.date()),o.assign("year",l.year()),o.assign("month",l.month()+1)):a.match(/year/i)&&(l=l.add(-l.date()+1,"d"),l=l.add(-l.month(),"month"),o.imply("day",l.date()),o.imply("month",l.month()+1),o.assign("year",l.year())),o}};Ha.default=Oh});var LT=O(Rh=>{"use strict";Object.defineProperty(Rh,"__esModule",{value:!0});var Ba=Qt(),AC=it(),PC=Z(),NC=_r(),CC=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*(${Ba.TIME_UNITS_PATTERN})${Ba.REGEX_PARTS.rightBoundary}`,Ba.REGEX_PARTS.flags),Mh=class extends PC.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Ba.REGEX_PARTS.leftBoundary}innerPattern(){return CC}innerExtract(e,t){let n=t[1].toLowerCase(),s=Ba.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=NC.reverseTimeUnits(s);break}return AC.ParsingComponents.createRelativeFromReference(e.reference,s)}};Rh.default=Mh});var WT=O(Mt=>{"use strict";var sr=Mt&&Mt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Mt,"__esModule",{value:!0});Mt.createConfiguration=Mt.createCasualConfiguration=Mt.parseDate=Mt.parse=Mt.strict=Mt.casual=void 0;var IC=sr(_T()),FC=sr(kT()),LC=sr(ST()),YC=sr(MT()),UC=sr(RT()),WC=sr(xT()),qC=sr(AT()),jC=cn(),$C=sr(PT()),GC=sr(NT()),HC=sr(CT()),BC=sr(FT()),YT=Ar(),zC=sr(ms()),VC=sr(LT());Mt.casual=new YT.Chrono(UT());Mt.strict=new YT.Chrono(xh(!0));function KC(r,e,t){return Mt.casual.parse(r,e,t)}Mt.parse=KC;function ZC(r,e,t){return Mt.casual.parseDate(r,e,t)}Mt.parseDate=ZC;function UT(){let r=xh(!1);return r.parsers.unshift(new $C.default),r.parsers.unshift(new GC.default),r.parsers.unshift(new LC.default),r.parsers.unshift(new BC.default),r.parsers.unshift(new VC.default),r}Mt.createCasualConfiguration=UT;function xh(r=!0){return jC.includeCommonConfiguration({parsers:[new zC.default(!0),new IC.default,new FC.default,new HC.default,new YC.default(r),new UC.default],refiners:[new qC.default,new WC.default]},r)}Mt.createConfiguration=xh});var _t=O(be=>{"use strict";var QC=be&&be.__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]}),XC=be&&be.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Gn=be&&be.__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)&&QC(e,r,t);return XC(e,r),e};Object.defineProperty(be,"__esModule",{value:!0});be.parseDate=be.parse=be.casual=be.strict=be.ru=be.zh=be.nl=be.pt=be.ja=be.fr=be.de=be.Meridiem=be.Chrono=be.en=void 0;var Ah=Gn(zc());be.en=Ah;var JC=Ar();Object.defineProperty(be,"Chrono",{enumerable:!0,get:function(){return JC.Chrono}});var eI;(function(r){r[r.AM=0]="AM",r[r.PM=1]="PM"})(eI=be.Meridiem||(be.Meridiem={}));var tI=Gn(Ky());be.de=tI;var rI=Gn(Eg());be.fr=rI;var nI=Gn(Ng());be.ja=nI;var sI=Gn(Kg());be.pt=sI;var iI=Gn(N_());be.nl=iI;var aI=Gn(hT());be.zh=aI;var oI=Gn(WT());be.ru=oI;be.strict=Ah.strict;be.casual=Ah.casual;function uI(r,e,t){return be.casual.parse(r,e,t)}be.parse=uI;function lI(r,e,t){return be.casual.parseDate(r,e,t)}be.parseDate=lI});var Eu=O((Ph,ci)=>{(function(r,e){typeof Ph=="object"&&typeof ci!="undefined"?ci.exports=e():typeof define=="function"&&define.amd?define(e):r.moment=e()})(Ph,function(){"use strict";var r;function e(){return r.apply(null,arguments)}function t(i){r=i}function n(i){return i instanceof Array||Object.prototype.toString.call(i)==="[object Array]"}function s(i){return i!=null&&Object.prototype.toString.call(i)==="[object Object]"}function a(i,u){return Object.prototype.hasOwnProperty.call(i,u)}function o(i){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(i).length===0;var u;for(u in i)if(a(i,u))return!1;return!0}function l(i){return i===void 0}function c(i){return typeof i=="number"||Object.prototype.toString.call(i)==="[object Number]"}function f(i){return i instanceof Date||Object.prototype.toString.call(i)==="[object Date]"}function p(i,u){var d=[],h,m=i.length;for(h=0;h>>0,h;for(h=0;h0)for(d=0;d=0;return(v?d?"+":"":"-")+Math.pow(10,Math.max(0,m)).toString().substr(1)+h}var w=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,k=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,D={},M={};function E(i,u,d,h){var m=h;typeof h=="string"&&(m=function(){return this[h]()}),i&&(M[i]=m),u&&(M[u[0]]=function(){return _(m.apply(this,arguments),u[1],u[2])}),d&&(M[d]=function(){return this.localeData().ordinal(m.apply(this,arguments),i)})}function I(i){return i.match(/\[[\s\S]/)?i.replace(/^\[|\]$/g,""):i.replace(/\\/g,"")}function P(i){var u=i.match(w),d,h;for(d=0,h=u.length;d=0&&k.test(i);)i=i.replace(k,h),k.lastIndex=0,d-=1;return i}var Ee={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function ge(i){var u=this._longDateFormat[i],d=this._longDateFormat[i.toUpperCase()];return u||!d?u:(this._longDateFormat[i]=d.match(w).map(function(h){return h==="MMMM"||h==="MM"||h==="DD"||h==="dddd"?h.slice(1):h}).join(""),this._longDateFormat[i])}var fe="Invalid date";function Ie(){return this._invalidDate}var V="%d",qe=/\d{1,2}/;function ze(i){return this._ordinal.replace("%d",i)}var pt={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Mr(i,u,d,h){var m=this._relativeTime[d];return z(m)?m(i,u,d,h):m.replace(/%d/i,i)}function st(i,u){var d=this._relativeTime[i>0?"future":"past"];return z(d)?d(u):d.replace(/%s/i,u)}var je={};function mt(i,u){var d=i.toLowerCase();je[d]=je[d+"s"]=je[u]=i}function bt(i){return typeof i=="string"?je[i]||je[i.toLowerCase()]:void 0}function Rn(i){var u={},d,h;for(h in i)a(i,h)&&(d=bt(h),d&&(u[d]=i[h]));return u}var Yi={};function $e(i,u){Yi[i]=u}function Ws(i){var u=[],d;for(d in i)a(i,d)&&u.push({unit:d,priority:Yi[d]});return u.sort(function(h,m){return h.priority-m.priority}),u}function rs(i){return i%4===0&&i%100!==0||i%400===0}function yt(i){return i<0?Math.ceil(i)||0:Math.floor(i)}function he(i){var u=+i,d=0;return u!==0&&isFinite(u)&&(d=yt(u)),d}function Jr(i,u){return function(d){return d!=null?(ns(this,i,d),e.updateOffset(this,u),this):At(this,i)}}function At(i,u){return i.isValid()?i._d["get"+(i._isUTC?"UTC":"")+u]():NaN}function ns(i,u,d){i.isValid()&&!isNaN(d)&&(u==="FullYear"&&rs(i.year())&&i.month()===1&&i.date()===29?(d=he(d),i._d["set"+(i._isUTC?"UTC":"")+u](d,i.month(),bo(d,i.month()))):i._d["set"+(i._isUTC?"UTC":"")+u](d))}function yo(i){return i=bt(i),z(this[i])?this[i]():this}function qr(i,u){if(typeof i=="object"){i=Rn(i);var d=Ws(i),h,m=d.length;for(h=0;h68?1900:2e3)};var xp=Jr("FullYear",!0);function Tw(){return rs(this.year())}function bw(i,u,d,h,m,v,R){var re;return i<100&&i>=0?(re=new Date(i+400,u,d,h,m,v,R),isFinite(re.getFullYear())&&re.setFullYear(i)):re=new Date(i,u,d,h,m,v,R),re}function qi(i){var u,d;return i<100&&i>=0?(d=Array.prototype.slice.call(arguments),d[0]=i+400,u=new Date(Date.UTC.apply(null,d)),isFinite(u.getUTCFullYear())&&u.setUTCFullYear(i)):u=new Date(Date.UTC.apply(null,arguments)),u}function vo(i,u,d){var h=7+u-d,m=(7+qi(i,0,h).getUTCDay()-u)%7;return-m+h-1}function Ap(i,u,d,h,m){var v=(7+d-h)%7,R=vo(i,h,m),re=1+7*(u-1)+v+R,_e,Ue;return re<=0?(_e=i-1,Ue=Wi(_e)+re):re>Wi(i)?(_e=i+1,Ue=re-Wi(i)):(_e=i,Ue=re),{year:_e,dayOfYear:Ue}}function ji(i,u,d){var h=vo(i.year(),u,d),m=Math.floor((i.dayOfYear()-h-1)/7)+1,v,R;return m<1?(R=i.year()-1,v=m+rn(R,u,d)):m>rn(i.year(),u,d)?(v=m-rn(i.year(),u,d),R=i.year()+1):(R=i.year(),v=m),{week:v,year:R}}function rn(i,u,d){var h=vo(i,u,d),m=vo(i+1,u,d);return(Wi(i)-h+m)/7}E("w",["ww",2],"wo","week"),E("W",["WW",2],"Wo","isoWeek"),mt("week","w"),mt("isoWeek","W"),$e("week",5),$e("isoWeek",5),$("w",Ye),$("ww",Ye,vt),$("W",Ye),$("WW",Ye,vt),yr(["w","ww","W","WW"],function(i,u,d,h){u[h.substr(0,1)]=he(i)});function vw(i){return ji(i,this._week.dow,this._week.doy).week}var ww={dow:0,doy:6};function kw(){return this._week.dow}function Ew(){return this._week.doy}function Dw(i){var u=this.localeData().week(this);return i==null?u:this.add((i-u)*7,"d")}function Sw(i){var u=ji(this,1,4).week;return i==null?u:this.add((i-u)*7,"d")}E("d",0,"do","day"),E("dd",0,0,function(i){return this.localeData().weekdaysMin(this,i)}),E("ddd",0,0,function(i){return this.localeData().weekdaysShort(this,i)}),E("dddd",0,0,function(i){return this.localeData().weekdays(this,i)}),E("e",0,0,"weekday"),E("E",0,0,"isoWeekday"),mt("day","d"),mt("weekday","e"),mt("isoWeekday","E"),$e("day",11),$e("weekday",11),$e("isoWeekday",11),$("d",Ye),$("e",Ye),$("E",Ye),$("dd",function(i,u){return u.weekdaysMinRegex(i)}),$("ddd",function(i,u){return u.weekdaysShortRegex(i)}),$("dddd",function(i,u){return u.weekdaysRegex(i)}),yr(["dd","ddd","dddd"],function(i,u,d,h){var m=d._locale.weekdaysParse(i,h,d._strict);m!=null?u.d=m:b(d).invalidWeekday=i}),yr(["d","e","E"],function(i,u,d,h){u[h]=he(i)});function Ow(i,u){return typeof i!="string"?i:isNaN(i)?(i=u.weekdaysParse(i),typeof i=="number"?i:null):parseInt(i,10)}function Mw(i,u){return typeof i=="string"?u.weekdaysParse(i)%7||7:isNaN(i)?null:i}function El(i,u){return i.slice(u,7).concat(i.slice(0,u))}var Rw="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Pp="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),xw="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Aw=pr,Pw=pr,Nw=pr;function Cw(i,u){var d=n(this._weekdays)?this._weekdays:this._weekdays[i&&i!==!0&&this._weekdays.isFormat.test(u)?"format":"standalone"];return i===!0?El(d,this._week.dow):i?d[i.day()]:d}function Iw(i){return i===!0?El(this._weekdaysShort,this._week.dow):i?this._weekdaysShort[i.day()]:this._weekdaysShort}function Fw(i){return i===!0?El(this._weekdaysMin,this._week.dow):i?this._weekdaysMin[i.day()]:this._weekdaysMin}function Lw(i,u,d){var h,m,v,R=i.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],h=0;h<7;++h)v=T([2e3,1]).day(h),this._minWeekdaysParse[h]=this.weekdaysMin(v,"").toLocaleLowerCase(),this._shortWeekdaysParse[h]=this.weekdaysShort(v,"").toLocaleLowerCase(),this._weekdaysParse[h]=this.weekdays(v,"").toLocaleLowerCase();return d?u==="dddd"?(m=ot.call(this._weekdaysParse,R),m!==-1?m:null):u==="ddd"?(m=ot.call(this._shortWeekdaysParse,R),m!==-1?m:null):(m=ot.call(this._minWeekdaysParse,R),m!==-1?m:null):u==="dddd"?(m=ot.call(this._weekdaysParse,R),m!==-1||(m=ot.call(this._shortWeekdaysParse,R),m!==-1)?m:(m=ot.call(this._minWeekdaysParse,R),m!==-1?m:null)):u==="ddd"?(m=ot.call(this._shortWeekdaysParse,R),m!==-1||(m=ot.call(this._weekdaysParse,R),m!==-1)?m:(m=ot.call(this._minWeekdaysParse,R),m!==-1?m:null)):(m=ot.call(this._minWeekdaysParse,R),m!==-1||(m=ot.call(this._weekdaysParse,R),m!==-1)?m:(m=ot.call(this._shortWeekdaysParse,R),m!==-1?m:null))}function Yw(i,u,d){var h,m,v;if(this._weekdaysParseExact)return Lw.call(this,i,u,d);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),h=0;h<7;h++){if(m=T([2e3,1]).day(h),d&&!this._fullWeekdaysParse[h]&&(this._fullWeekdaysParse[h]=new RegExp("^"+this.weekdays(m,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[h]=new RegExp("^"+this.weekdaysShort(m,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[h]=new RegExp("^"+this.weekdaysMin(m,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[h]||(v="^"+this.weekdays(m,"")+"|^"+this.weekdaysShort(m,"")+"|^"+this.weekdaysMin(m,""),this._weekdaysParse[h]=new RegExp(v.replace(".",""),"i")),d&&u==="dddd"&&this._fullWeekdaysParse[h].test(i))return h;if(d&&u==="ddd"&&this._shortWeekdaysParse[h].test(i))return h;if(d&&u==="dd"&&this._minWeekdaysParse[h].test(i))return h;if(!d&&this._weekdaysParse[h].test(i))return h}}function Uw(i){if(!this.isValid())return i!=null?this:NaN;var u=this._isUTC?this._d.getUTCDay():this._d.getDay();return i!=null?(i=Ow(i,this.localeData()),this.add(i-u,"d")):u}function Ww(i){if(!this.isValid())return i!=null?this:NaN;var u=(this.day()+7-this.localeData()._week.dow)%7;return i==null?u:this.add(i-u,"d")}function qw(i){if(!this.isValid())return i!=null?this:NaN;if(i!=null){var u=Mw(i,this.localeData());return this.day(this.day()%7?u:u-7)}else return this.day()||7}function jw(i){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||Dl.call(this),i?this._weekdaysStrictRegex:this._weekdaysRegex):(a(this,"_weekdaysRegex")||(this._weekdaysRegex=Aw),this._weekdaysStrictRegex&&i?this._weekdaysStrictRegex:this._weekdaysRegex)}function $w(i){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||Dl.call(this),i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(a(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Pw),this._weekdaysShortStrictRegex&&i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Gw(i){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||Dl.call(this),i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(a(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Nw),this._weekdaysMinStrictRegex&&i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Dl(){function i(Gt,un){return un.length-Gt.length}var u=[],d=[],h=[],m=[],v,R,re,_e,Ue;for(v=0;v<7;v++)R=T([2e3,1]).day(v),re=gt(this.weekdaysMin(R,"")),_e=gt(this.weekdaysShort(R,"")),Ue=gt(this.weekdays(R,"")),u.push(re),d.push(_e),h.push(Ue),m.push(re),m.push(_e),m.push(Ue);u.sort(i),d.sort(i),h.sort(i),m.sort(i),this._weekdaysRegex=new RegExp("^("+m.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+h.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+u.join("|")+")","i")}function Sl(){return this.hours()%12||12}function Hw(){return this.hours()||24}E("H",["HH",2],0,"hour"),E("h",["hh",2],0,Sl),E("k",["kk",2],0,Hw),E("hmm",0,0,function(){return""+Sl.apply(this)+_(this.minutes(),2)}),E("hmmss",0,0,function(){return""+Sl.apply(this)+_(this.minutes(),2)+_(this.seconds(),2)}),E("Hmm",0,0,function(){return""+this.hours()+_(this.minutes(),2)}),E("Hmmss",0,0,function(){return""+this.hours()+_(this.minutes(),2)+_(this.seconds(),2)});function Np(i,u){E(i,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),u)})}Np("a",!0),Np("A",!1),mt("hour","h"),$e("hour",13);function Cp(i,u){return u._meridiemParse}$("a",Cp),$("A",Cp),$("H",Ye),$("h",Ye),$("k",Ye),$("HH",Ye,vt),$("hh",Ye,vt),$("kk",Ye,vt),$("hmm",An),$("hmmss",qs),$("Hmm",An),$("Hmmss",qs),Ae(["H","HH"],ne),Ae(["k","kk"],function(i,u,d){var h=he(i);u[ne]=h===24?0:h}),Ae(["a","A"],function(i,u,d){d._isPm=d._locale.isPM(i),d._meridiem=i}),Ae(["h","hh"],function(i,u,d){u[ne]=he(i),b(d).bigHour=!0}),Ae("hmm",function(i,u,d){var h=i.length-2;u[ne]=he(i.substr(0,h)),u[oe]=he(i.substr(h)),b(d).bigHour=!0}),Ae("hmmss",function(i,u,d){var h=i.length-4,m=i.length-2;u[ne]=he(i.substr(0,h)),u[oe]=he(i.substr(h,2)),u[$t]=he(i.substr(m)),b(d).bigHour=!0}),Ae("Hmm",function(i,u,d){var h=i.length-2;u[ne]=he(i.substr(0,h)),u[oe]=he(i.substr(h))}),Ae("Hmmss",function(i,u,d){var h=i.length-4,m=i.length-2;u[ne]=he(i.substr(0,h)),u[oe]=he(i.substr(h,2)),u[$t]=he(i.substr(m))});function Bw(i){return(i+"").toLowerCase().charAt(0)==="p"}var zw=/[ap]\.?m?\.?/i,Vw=Jr("Hours",!0);function Kw(i,u,d){return i>11?d?"pm":"PM":d?"am":"AM"}var Ip={calendar:ce,longDateFormat:Ee,invalidDate:fe,ordinal:V,dayOfMonthOrdinalParse:qe,relativeTime:pt,months:lw,monthsShort:Dp,week:ww,weekdays:Rw,weekdaysMin:xw,weekdaysShort:Pp,meridiemParse:zw},rt={},$i={},Gi;function Zw(i,u){var d,h=Math.min(i.length,u.length);for(d=0;d0;){if(m=wo(v.slice(0,d).join("-")),m)return m;if(h&&h.length>=d&&Zw(v,h)>=d-1)break;d--}u++}return Gi}function Xw(i){return i.match("^[^/\\\\]*$")!=null}function wo(i){var u=null,d;if(rt[i]===void 0&&typeof ci!="undefined"&&ci&&ci.exports&&Xw(i))try{u=Gi._abbr,d=require,d("./locale/"+i),Cn(u)}catch(h){rt[i]=null}return rt[i]}function Cn(i,u){var d;return i&&(l(u)?d=nn(i):d=Ol(i,u),d?Gi=d:typeof console!="undefined"&&console.warn&&console.warn("Locale "+i+" not found. Did you forget to load it?")),Gi._abbr}function Ol(i,u){if(u!==null){var d,h=Ip;if(u.abbr=i,rt[i]!=null)tt("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),h=rt[i]._config;else if(u.parentLocale!=null)if(rt[u.parentLocale]!=null)h=rt[u.parentLocale]._config;else if(d=wo(u.parentLocale),d!=null)h=d._config;else return $i[u.parentLocale]||($i[u.parentLocale]=[]),$i[u.parentLocale].push({name:i,config:u}),null;return rt[i]=new ee(A(h,u)),$i[i]&&$i[i].forEach(function(m){Ol(m.name,m.config)}),Cn(i),rt[i]}else return delete rt[i],null}function Jw(i,u){if(u!=null){var d,h,m=Ip;rt[i]!=null&&rt[i].parentLocale!=null?rt[i].set(A(rt[i]._config,u)):(h=wo(i),h!=null&&(m=h._config),u=A(m,u),h==null&&(u.abbr=i),d=new ee(u),d.parentLocale=rt[i],rt[i]=d),Cn(i)}else rt[i]!=null&&(rt[i].parentLocale!=null?(rt[i]=rt[i].parentLocale,i===Cn()&&Cn(i)):rt[i]!=null&&delete rt[i]);return rt[i]}function nn(i){var u;if(i&&i._locale&&i._locale._abbr&&(i=i._locale._abbr),!i)return Gi;if(!n(i)){if(u=wo(i),u)return u;i=[i]}return Qw(i)}function e0(){return Y(rt)}function Ml(i){var u,d=i._a;return d&&b(i).overflow===-2&&(u=d[Qe]<0||d[Qe]>11?Qe:d[j]<1||d[j]>bo(d[nt],d[Qe])?j:d[ne]<0||d[ne]>24||d[ne]===24&&(d[oe]!==0||d[$t]!==0||d[os]!==0)?ne:d[oe]<0||d[oe]>59?oe:d[$t]<0||d[$t]>59?$t:d[os]<0||d[os]>999?os:-1,b(i)._overflowDayOfYear&&(uj)&&(u=j),b(i)._overflowWeeks&&u===-1&&(u=aw),b(i)._overflowWeekday&&u===-1&&(u=ow),b(i).overflow=u),i}var t0=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,r0=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,n0=/Z|[+-]\d\d(?::?\d\d)?/,ko=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Rl=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],s0=/^\/?Date\((-?\d+)/i,i0=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,a0={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Lp(i){var u,d,h=i._i,m=t0.exec(h)||r0.exec(h),v,R,re,_e,Ue=ko.length,Gt=Rl.length;if(m){for(b(i).iso=!0,u=0,d=Ue;uWi(R)||i._dayOfYear===0)&&(b(i)._overflowDayOfYear=!0),d=qi(R,0,i._dayOfYear),i._a[Qe]=d.getUTCMonth(),i._a[j]=d.getUTCDate()),u=0;u<3&&i._a[u]==null;++u)i._a[u]=h[u]=m[u];for(;u<7;u++)i._a[u]=h[u]=i._a[u]==null?u===2?1:0:i._a[u];i._a[ne]===24&&i._a[oe]===0&&i._a[$t]===0&&i._a[os]===0&&(i._nextDay=!0,i._a[ne]=0),i._d=(i._useUTC?qi:bw).apply(null,h),v=i._useUTC?i._d.getUTCDay():i._d.getDay(),i._tzm!=null&&i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),i._nextDay&&(i._a[ne]=24),i._w&&typeof i._w.d!="undefined"&&i._w.d!==v&&(b(i).weekdayMismatch=!0)}}function p0(i){var u,d,h,m,v,R,re,_e,Ue;u=i._w,u.GG!=null||u.W!=null||u.E!=null?(v=1,R=4,d=$s(u.GG,i._a[nt],ji(Xe(),1,4).year),h=$s(u.W,1),m=$s(u.E,1),(m<1||m>7)&&(_e=!0)):(v=i._locale._week.dow,R=i._locale._week.doy,Ue=ji(Xe(),v,R),d=$s(u.gg,i._a[nt],Ue.year),h=$s(u.w,Ue.week),u.d!=null?(m=u.d,(m<0||m>6)&&(_e=!0)):u.e!=null?(m=u.e+v,(u.e<0||u.e>6)&&(_e=!0)):m=v),h<1||h>rn(d,v,R)?b(i)._overflowWeeks=!0:_e!=null?b(i)._overflowWeekday=!0:(re=Ap(d,h,m,v,R),i._a[nt]=re.year,i._dayOfYear=re.dayOfYear)}e.ISO_8601=function(){},e.RFC_2822=function(){};function Al(i){if(i._f===e.ISO_8601){Lp(i);return}if(i._f===e.RFC_2822){Yp(i);return}i._a=[],b(i).empty=!0;var u=""+i._i,d,h,m,v,R,re=u.length,_e=0,Ue,Gt;for(m=q(i._f,i._locale).match(w)||[],Gt=m.length,d=0;d0&&b(i).unusedInput.push(R),u=u.slice(u.indexOf(h)+h.length),_e+=h.length),M[v]?(h?b(i).empty=!1:b(i).unusedTokens.push(v),Pt(v,h,i)):i._strict&&!h&&b(i).unusedTokens.push(v);b(i).charsLeftOver=re-_e,u.length>0&&b(i).unusedInput.push(u),i._a[ne]<=12&&b(i).bigHour===!0&&i._a[ne]>0&&(b(i).bigHour=void 0),b(i).parsedDateParts=i._a.slice(0),b(i).meridiem=i._meridiem,i._a[ne]=m0(i._locale,i._a[ne],i._meridiem),Ue=b(i).era,Ue!==null&&(i._a[nt]=i._locale.erasConvertYear(Ue,i._a[nt])),xl(i),Ml(i)}function m0(i,u,d){var h;return d==null?u:i.meridiemHour!=null?i.meridiemHour(u,d):(i.isPM!=null&&(h=i.isPM(d),h&&u<12&&(u+=12),!h&&u===12&&(u=0)),u)}function y0(i){var u,d,h,m,v,R,re=!1,_e=i._f.length;if(_e===0){b(i).invalidFormat=!0,i._d=new Date(NaN);return}for(m=0;m<_e;m++)v=0,R=!1,u=de({},i),i._useUTC!=null&&(u._useUTC=i._useUTC),u._f=i._f[m],Al(u),C(u)&&(R=!0),v+=b(u).charsLeftOver,v+=b(u).unusedTokens.length*10,b(u).score=v,re?vthis?this:i:G()});function qp(i,u){var d,h;if(u.length===1&&n(u[0])&&(u=u[0]),!u.length)return Xe();for(d=u[0],h=1;hthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function L0(){if(!l(this._isDSTShifted))return this._isDSTShifted;var i={},u;return de(i,this),i=Up(i),i._a?(u=i._isUTC?T(i._a):Xe(i._a),this._isDSTShifted=this.isValid()&&M0(i._a,u.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Y0(){return this.isValid()?!this._isUTC:!1}function U0(){return this.isValid()?this._isUTC:!1}function $p(){return this.isValid()?this._isUTC&&this._offset===0:!1}var W0=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,q0=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Rr(i,u){var d=i,h=null,m,v,R;return Do(i)?d={ms:i._milliseconds,d:i._days,M:i._months}:c(i)||!isNaN(+i)?(d={},u?d[u]=+i:d.milliseconds=+i):(h=W0.exec(i))?(m=h[1]==="-"?-1:1,d={y:0,d:he(h[j])*m,h:he(h[ne])*m,m:he(h[oe])*m,s:he(h[$t])*m,ms:he(Pl(h[os]*1e3))*m}):(h=q0.exec(i))?(m=h[1]==="-"?-1:1,d={y:us(h[2],m),M:us(h[3],m),w:us(h[4],m),d:us(h[5],m),h:us(h[6],m),m:us(h[7],m),s:us(h[8],m)}):d==null?d={}:typeof d=="object"&&("from"in d||"to"in d)&&(R=j0(Xe(d.from),Xe(d.to)),d={},d.ms=R.milliseconds,d.M=R.months),v=new Eo(d),Do(i)&&a(i,"_locale")&&(v._locale=i._locale),Do(i)&&a(i,"_isValid")&&(v._isValid=i._isValid),v}Rr.fn=Eo.prototype,Rr.invalid=O0;function us(i,u){var d=i&&parseFloat(i.replace(",","."));return(isNaN(d)?0:d)*u}function Gp(i,u){var d={};return d.months=u.month()-i.month()+(u.year()-i.year())*12,i.clone().add(d.months,"M").isAfter(u)&&--d.months,d.milliseconds=+u-+i.clone().add(d.months,"M"),d}function j0(i,u){var d;return i.isValid()&&u.isValid()?(u=Cl(u,i),i.isBefore(u)?d=Gp(i,u):(d=Gp(u,i),d.milliseconds=-d.milliseconds,d.months=-d.months),d):{milliseconds:0,months:0}}function Hp(i,u){return function(d,h){var m,v;return h!==null&&!isNaN(+h)&&(tt(u,"moment()."+u+"(period, number) is deprecated. Please use moment()."+u+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),v=d,d=h,h=v),m=Rr(d,h),Bp(this,m,i),this}}function Bp(i,u,d,h){var m=u._milliseconds,v=Pl(u._days),R=Pl(u._months);!i.isValid()||(h=h==null?!0:h,R&&Op(i,At(i,"Month")+R*d),v&&ns(i,"Date",At(i,"Date")+v*d),m&&i._d.setTime(i._d.valueOf()+m*d),h&&e.updateOffset(i,v||R))}var $0=Hp(1,"add"),G0=Hp(-1,"subtract");function zp(i){return typeof i=="string"||i instanceof String}function H0(i){return ye(i)||f(i)||zp(i)||c(i)||z0(i)||B0(i)||i===null||i===void 0}function B0(i){var u=s(i)&&!o(i),d=!1,h=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],m,v,R=h.length;for(m=0;md.valueOf():d.valueOf()9999?N(d,u?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):z(Date.prototype.toISOString)?u?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",N(d,"Z")):N(d,u?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function o1(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var i="moment",u="",d,h,m,v;return this.isLocal()||(i=this.utcOffset()===0?"moment.utc":"moment.parseZone",u="Z"),d="["+i+'("]',h=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",m="-MM-DD[T]HH:mm:ss.SSS",v=u+'[")]',this.format(d+h+m+v)}function u1(i){i||(i=this.isUtc()?e.defaultFormatUtc:e.defaultFormat);var u=N(this,i);return this.localeData().postformat(u)}function l1(i,u){return this.isValid()&&(ye(i)&&i.isValid()||Xe(i).isValid())?Rr({to:this,from:i}).locale(this.locale()).humanize(!u):this.localeData().invalidDate()}function c1(i){return this.from(Xe(),i)}function d1(i,u){return this.isValid()&&(ye(i)&&i.isValid()||Xe(i).isValid())?Rr({from:this,to:i}).locale(this.locale()).humanize(!u):this.localeData().invalidDate()}function f1(i){return this.to(Xe(),i)}function Vp(i){var u;return i===void 0?this._locale._abbr:(u=nn(i),u!=null&&(this._locale=u),this)}var Kp=J("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(i){return i===void 0?this.localeData():this.locale(i)});function Zp(){return this._locale}var Oo=1e3,Gs=60*Oo,Mo=60*Gs,Qp=(365*400+97)*24*Mo;function Hs(i,u){return(i%u+u)%u}function Xp(i,u,d){return i<100&&i>=0?new Date(i+400,u,d)-Qp:new Date(i,u,d).valueOf()}function Jp(i,u,d){return i<100&&i>=0?Date.UTC(i+400,u,d)-Qp:Date.UTC(i,u,d)}function h1(i){var u,d;if(i=bt(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(d=this._isUTC?Jp:Xp,i){case"year":u=d(this.year(),0,1);break;case"quarter":u=d(this.year(),this.month()-this.month()%3,1);break;case"month":u=d(this.year(),this.month(),1);break;case"week":u=d(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":u=d(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":u=d(this.year(),this.month(),this.date());break;case"hour":u=this._d.valueOf(),u-=Hs(u+(this._isUTC?0:this.utcOffset()*Gs),Mo);break;case"minute":u=this._d.valueOf(),u-=Hs(u,Gs);break;case"second":u=this._d.valueOf(),u-=Hs(u,Oo);break}return this._d.setTime(u),e.updateOffset(this,!0),this}function p1(i){var u,d;if(i=bt(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(d=this._isUTC?Jp:Xp,i){case"year":u=d(this.year()+1,0,1)-1;break;case"quarter":u=d(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":u=d(this.year(),this.month()+1,1)-1;break;case"week":u=d(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":u=d(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":u=d(this.year(),this.month(),this.date()+1)-1;break;case"hour":u=this._d.valueOf(),u+=Mo-Hs(u+(this._isUTC?0:this.utcOffset()*Gs),Mo)-1;break;case"minute":u=this._d.valueOf(),u+=Gs-Hs(u,Gs)-1;break;case"second":u=this._d.valueOf(),u+=Oo-Hs(u,Oo)-1;break}return this._d.setTime(u),e.updateOffset(this,!0),this}function m1(){return this._d.valueOf()-(this._offset||0)*6e4}function y1(){return Math.floor(this.valueOf()/1e3)}function g1(){return new Date(this.valueOf())}function _1(){var i=this;return[i.year(),i.month(),i.date(),i.hour(),i.minute(),i.second(),i.millisecond()]}function T1(){var i=this;return{years:i.year(),months:i.month(),date:i.date(),hours:i.hours(),minutes:i.minutes(),seconds:i.seconds(),milliseconds:i.milliseconds()}}function b1(){return this.isValid()?this.toISOString():null}function v1(){return C(this)}function w1(){return g({},b(this))}function k1(){return b(this).overflow}function E1(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}E("N",0,0,"eraAbbr"),E("NN",0,0,"eraAbbr"),E("NNN",0,0,"eraAbbr"),E("NNNN",0,0,"eraName"),E("NNNNN",0,0,"eraNarrow"),E("y",["y",1],"yo","eraYear"),E("y",["yy",2],0,"eraYear"),E("y",["yyy",3],0,"eraYear"),E("y",["yyyy",4],0,"eraYear"),$("N",Fl),$("NN",Fl),$("NNN",Fl),$("NNNN",I1),$("NNNNN",F1),Ae(["N","NN","NNN","NNNN","NNNNN"],function(i,u,d,h){var m=d._locale.erasParse(i,h,d._strict);m?b(d).era=m:b(d).invalidEra=i}),$("y",hr),$("yy",hr),$("yyy",hr),$("yyyy",hr),$("yo",L1),Ae(["y","yy","yyy","yyyy"],nt),Ae(["yo"],function(i,u,d,h){var m;d._locale._eraYearOrdinalRegex&&(m=i.match(d._locale._eraYearOrdinalRegex)),d._locale.eraYearOrdinalParse?u[nt]=d._locale.eraYearOrdinalParse(i,m):u[nt]=parseInt(i,10)});function D1(i,u){var d,h,m,v=this._eras||nn("en")._eras;for(d=0,h=v.length;d=0)return v[h]}function O1(i,u){var d=i.since<=i.until?1:-1;return u===void 0?e(i.since).year():e(i.since).year()+(u-i.offset)*d}function M1(){var i,u,d,h=this.localeData().eras();for(i=0,u=h.length;iv&&(u=v),G1.call(this,i,u,d,h,m))}function G1(i,u,d,h,m){var v=Ap(i,u,d,h,m),R=qi(v.year,0,v.dayOfYear);return this.year(R.getUTCFullYear()),this.month(R.getUTCMonth()),this.date(R.getUTCDate()),this}E("Q",0,"Qo","quarter"),mt("quarter","Q"),$e("quarter",7),$("Q",xn),Ae("Q",function(i,u){u[Qe]=(he(i)-1)*3});function H1(i){return i==null?Math.ceil((this.month()+1)/3):this.month((i-1)*3+this.month()%3)}E("D",["DD",2],"Do","date"),mt("date","D"),$e("date",9),$("D",Ye),$("DD",Ye,vt),$("Do",function(i,u){return i?u._dayOfMonthOrdinalParse||u._ordinalParse:u._dayOfMonthOrdinalParseLenient}),Ae(["D","DD"],j),Ae("Do",function(i,u){u[j]=he(i.match(Ye)[0])});var tm=Jr("Date",!0);E("DDD",["DDDD",3],"DDDo","dayOfYear"),mt("dayOfYear","DDD"),$e("dayOfYear",4),$("DDD",ss),$("DDDD",Ui),Ae(["DDD","DDDD"],function(i,u,d){d._dayOfYear=he(i)});function B1(i){var u=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return i==null?u:this.add(i-u,"d")}E("m",["mm",2],0,"minute"),mt("minute","m"),$e("minute",14),$("m",Ye),$("mm",Ye,vt),Ae(["m","mm"],oe);var z1=Jr("Minutes",!1);E("s",["ss",2],0,"second"),mt("second","s"),$e("second",15),$("s",Ye),$("ss",Ye,vt),Ae(["s","ss"],$t);var V1=Jr("Seconds",!1);E("S",0,0,function(){return~~(this.millisecond()/100)}),E(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),E(0,["SSS",3],0,"millisecond"),E(0,["SSSS",4],0,function(){return this.millisecond()*10}),E(0,["SSSSS",5],0,function(){return this.millisecond()*100}),E(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),E(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),E(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),E(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),mt("millisecond","ms"),$e("millisecond",16),$("S",ss,xn),$("SS",ss,vt),$("SSS",ss,Ui);var In,rm;for(In="SSSS";In.length<=9;In+="S")$(In,hr);function K1(i,u){u[os]=he(("0."+i)*1e3)}for(In="S";In.length<=9;In+="S")Ae(In,K1);rm=Jr("Milliseconds",!1),E("z",0,0,"zoneAbbr"),E("zz",0,0,"zoneName");function Z1(){return this._isUTC?"UTC":""}function Q1(){return this._isUTC?"Coordinated Universal Time":""}var F=le.prototype;F.add=$0,F.calendar=Z0,F.clone=Q0,F.diff=s1,F.endOf=p1,F.format=u1,F.from=l1,F.fromNow=c1,F.to=d1,F.toNow=f1,F.get=yo,F.invalidAt=k1,F.isAfter=X0,F.isBefore=J0,F.isBetween=e1,F.isSame=t1,F.isSameOrAfter=r1,F.isSameOrBefore=n1,F.isValid=v1,F.lang=Kp,F.locale=Vp,F.localeData=Zp,F.max=v0,F.min=b0,F.parsingFlags=w1,F.set=qr,F.startOf=h1,F.subtract=G0,F.toArray=_1,F.toObject=T1,F.toDate=g1,F.toISOString=a1,F.inspect=o1,typeof Symbol!="undefined"&&Symbol.for!=null&&(F[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),F.toJSON=b1,F.toString=i1,F.unix=y1,F.valueOf=m1,F.creationData=E1,F.eraName=M1,F.eraNarrow=R1,F.eraAbbr=x1,F.eraYear=A1,F.year=xp,F.isLeapYear=Tw,F.weekYear=Y1,F.isoWeekYear=U1,F.quarter=F.quarters=H1,F.month=Mp,F.daysInMonth=yw,F.week=F.weeks=Dw,F.isoWeek=F.isoWeeks=Sw,F.weeksInYear=j1,F.weeksInWeekYear=$1,F.isoWeeksInYear=W1,F.isoWeeksInISOWeekYear=q1,F.date=tm,F.day=F.days=Uw,F.weekday=Ww,F.isoWeekday=qw,F.dayOfYear=B1,F.hour=F.hours=Vw,F.minute=F.minutes=z1,F.second=F.seconds=V1,F.millisecond=F.milliseconds=rm,F.utcOffset=x0,F.utc=P0,F.local=N0,F.parseZone=C0,F.hasAlignedHourOffset=I0,F.isDST=F0,F.isLocal=Y0,F.isUtcOffset=U0,F.isUtc=$p,F.isUTC=$p,F.zoneAbbr=Z1,F.zoneName=Q1,F.dates=J("dates accessor is deprecated. Use date instead.",tm),F.months=J("months accessor is deprecated. Use month instead",Mp),F.years=J("years accessor is deprecated. Use year instead",xp),F.zone=J("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",A0),F.isDSTShifted=J("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",L0);function X1(i){return Xe(i*1e3)}function J1(){return Xe.apply(null,arguments).parseZone()}function nm(i){return i}var Me=ee.prototype;Me.calendar=y,Me.longDateFormat=ge,Me.invalidDate=Ie,Me.ordinal=ze,Me.preparse=nm,Me.postformat=nm,Me.relativeTime=Mr,Me.pastFuture=st,Me.set=W,Me.eras=D1,Me.erasParse=S1,Me.erasConvertYear=O1,Me.erasAbbrRegex=N1,Me.erasNameRegex=P1,Me.erasNarrowRegex=C1,Me.months=fw,Me.monthsShort=hw,Me.monthsParse=mw,Me.monthsRegex=_w,Me.monthsShortRegex=gw,Me.week=vw,Me.firstDayOfYear=Ew,Me.firstDayOfWeek=kw,Me.weekdays=Cw,Me.weekdaysMin=Fw,Me.weekdaysShort=Iw,Me.weekdaysParse=Yw,Me.weekdaysRegex=jw,Me.weekdaysShortRegex=$w,Me.weekdaysMinRegex=Gw,Me.isPM=Bw,Me.meridiem=Kw;function xo(i,u,d,h){var m=nn(),v=T().set(h,u);return m[d](v,i)}function sm(i,u,d){if(c(i)&&(u=i,i=void 0),i=i||"",u!=null)return xo(i,u,d,"month");var h,m=[];for(h=0;h<12;h++)m[h]=xo(i,h,d,"month");return m}function Yl(i,u,d,h){typeof i=="boolean"?(c(u)&&(d=u,u=void 0),u=u||""):(u=i,d=u,i=!1,c(u)&&(d=u,u=void 0),u=u||"");var m=nn(),v=i?m._week.dow:0,R,re=[];if(d!=null)return xo(u,(d+v)%7,h,"day");for(R=0;R<7;R++)re[R]=xo(u,(R+v)%7,h,"day");return re}function ek(i,u){return sm(i,u,"months")}function tk(i,u){return sm(i,u,"monthsShort")}function rk(i,u,d){return Yl(i,u,d,"weekdays")}function nk(i,u,d){return Yl(i,u,d,"weekdaysShort")}function sk(i,u,d){return Yl(i,u,d,"weekdaysMin")}Cn("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(i){var u=i%10,d=he(i%100/10)===1?"th":u===1?"st":u===2?"nd":u===3?"rd":"th";return i+d}}),e.lang=J("moment.lang is deprecated. Use moment.locale instead.",Cn),e.langData=J("moment.langData is deprecated. Use moment.localeData instead.",nn);var sn=Math.abs;function ik(){var i=this._data;return this._milliseconds=sn(this._milliseconds),this._days=sn(this._days),this._months=sn(this._months),i.milliseconds=sn(i.milliseconds),i.seconds=sn(i.seconds),i.minutes=sn(i.minutes),i.hours=sn(i.hours),i.months=sn(i.months),i.years=sn(i.years),this}function im(i,u,d,h){var m=Rr(u,d);return i._milliseconds+=h*m._milliseconds,i._days+=h*m._days,i._months+=h*m._months,i._bubble()}function ak(i,u){return im(this,i,u,1)}function ok(i,u){return im(this,i,u,-1)}function am(i){return i<0?Math.floor(i):Math.ceil(i)}function uk(){var i=this._milliseconds,u=this._days,d=this._months,h=this._data,m,v,R,re,_e;return i>=0&&u>=0&&d>=0||i<=0&&u<=0&&d<=0||(i+=am(Ul(d)+u)*864e5,u=0,d=0),h.milliseconds=i%1e3,m=yt(i/1e3),h.seconds=m%60,v=yt(m/60),h.minutes=v%60,R=yt(v/60),h.hours=R%24,u+=yt(R/24),_e=yt(om(u)),d+=_e,u-=am(Ul(_e)),re=yt(d/12),d%=12,h.days=u,h.months=d,h.years=re,this}function om(i){return i*4800/146097}function Ul(i){return i*146097/4800}function lk(i){if(!this.isValid())return NaN;var u,d,h=this._milliseconds;if(i=bt(i),i==="month"||i==="quarter"||i==="year")switch(u=this._days+h/864e5,d=this._months+om(u),i){case"month":return d;case"quarter":return d/3;case"year":return d/12}else switch(u=this._days+Math.round(Ul(this._months)),i){case"week":return u/7+h/6048e5;case"day":return u+h/864e5;case"hour":return u*24+h/36e5;case"minute":return u*1440+h/6e4;case"second":return u*86400+h/1e3;case"millisecond":return Math.floor(u*864e5)+h;default:throw new Error("Unknown unit "+i)}}function ck(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+he(this._months/12)*31536e6:NaN}function an(i){return function(){return this.as(i)}}var dk=an("ms"),fk=an("s"),hk=an("m"),pk=an("h"),mk=an("d"),yk=an("w"),gk=an("M"),_k=an("Q"),Tk=an("y");function bk(){return Rr(this)}function vk(i){return i=bt(i),this.isValid()?this[i+"s"]():NaN}function ls(i){return function(){return this.isValid()?this._data[i]:NaN}}var wk=ls("milliseconds"),kk=ls("seconds"),Ek=ls("minutes"),Dk=ls("hours"),Sk=ls("days"),Ok=ls("months"),Mk=ls("years");function Rk(){return yt(this.days()/7)}var on=Math.round,Bs={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function xk(i,u,d,h,m){return m.relativeTime(u||1,!!d,i,h)}function Ak(i,u,d,h){var m=Rr(i).abs(),v=on(m.as("s")),R=on(m.as("m")),re=on(m.as("h")),_e=on(m.as("d")),Ue=on(m.as("M")),Gt=on(m.as("w")),un=on(m.as("y")),Fn=v<=d.ss&&["s",v]||v0,Fn[4]=h,xk.apply(null,Fn)}function Pk(i){return i===void 0?on:typeof i=="function"?(on=i,!0):!1}function Nk(i,u){return Bs[i]===void 0?!1:u===void 0?Bs[i]:(Bs[i]=u,i==="s"&&(Bs.ss=u-1),!0)}function Ck(i,u){if(!this.isValid())return this.localeData().invalidDate();var d=!1,h=Bs,m,v;return typeof i=="object"&&(u=i,i=!1),typeof i=="boolean"&&(d=i),typeof u=="object"&&(h=Object.assign({},Bs,u),u.s!=null&&u.ss==null&&(h.ss=u.s-1)),m=this.localeData(),v=Ak(this,!d,h,m),d&&(v=m.pastFuture(+this,v)),m.postformat(v)}var Wl=Math.abs;function zs(i){return(i>0)-(i<0)||+i}function Ao(){if(!this.isValid())return this.localeData().invalidDate();var i=Wl(this._milliseconds)/1e3,u=Wl(this._days),d=Wl(this._months),h,m,v,R,re=this.asSeconds(),_e,Ue,Gt,un;return re?(h=yt(i/60),m=yt(h/60),i%=60,h%=60,v=yt(d/12),d%=12,R=i?i.toFixed(3).replace(/\.?0+$/,""):"",_e=re<0?"-":"",Ue=zs(this._months)!==zs(re)?"-":"",Gt=zs(this._days)!==zs(re)?"-":"",un=zs(this._milliseconds)!==zs(re)?"-":"",_e+"P"+(v?Ue+v+"Y":"")+(d?Ue+d+"M":"")+(u?Gt+u+"D":"")+(m||h||i?"T":"")+(m?un+m+"H":"")+(h?un+h+"M":"")+(i?un+R+"S":"")):"P0D"}var Oe=Eo.prototype;Oe.isValid=S0,Oe.abs=ik,Oe.add=ak,Oe.subtract=ok,Oe.as=lk,Oe.asMilliseconds=dk,Oe.asSeconds=fk,Oe.asMinutes=hk,Oe.asHours=pk,Oe.asDays=mk,Oe.asWeeks=yk,Oe.asMonths=gk,Oe.asQuarters=_k,Oe.asYears=Tk,Oe.valueOf=ck,Oe._bubble=uk,Oe.clone=bk,Oe.get=vk,Oe.milliseconds=wk,Oe.seconds=kk,Oe.minutes=Ek,Oe.hours=Dk,Oe.days=Sk,Oe.weeks=Rk,Oe.months=Ok,Oe.years=Mk,Oe.humanize=Ck,Oe.toISOString=Ao,Oe.toString=Ao,Oe.toJSON=Ao,Oe.locale=Vp,Oe.localeData=Zp,Oe.toIsoString=J("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Ao),Oe.lang=Kp,E("X",0,0,"unix"),E("x",0,0,"valueOf"),$("x",Nn),$("X",_o),Ae("X",function(i,u,d){d._d=new Date(parseFloat(i)*1e3)}),Ae("x",function(i,u,d){d._d=new Date(he(i))});return e.version="2.29.4",t(Xe),e.fn=F,e.min=w0,e.max=k0,e.now=E0,e.utc=T,e.unix=X1,e.months=ek,e.isDate=f,e.locale=Cn,e.invalid=G,e.duration=Rr,e.isMoment=ye,e.weekdays=rk,e.parseZone=J1,e.localeData=nn,e.isDuration=Do,e.monthsShort=tk,e.weekdaysMin=sk,e.defineLocale=Ol,e.updateLocale=Jw,e.locales=e0,e.weekdaysShort=nk,e.normalizeUnits=bt,e.relativeTimeRounding=Pk,e.relativeTimeThreshold=Nk,e.calendarFormat=K0,e.prototype=F,e.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},e})});var cb=O((OY,xu)=>{var $T,GT,HT,BT,zT,VT,KT,ZT,QT,Mu,Ch,XT,JT,eb,hi,tb,rb,nb,sb,ib,ab,ob,ub,lb,Ru;(function(r){var e=typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:{};typeof define=="function"&&define.amd?define("tslib",["exports"],function(n){r(t(e,t(n)))}):typeof xu=="object"&&typeof xu.exports=="object"?r(t(e,t(xu.exports))):r(t(e));function t(n,s){return n!==e&&(typeof Object.create=="function"?Object.defineProperty(n,"__esModule",{value:!0}):n.__esModule=!0),function(a,o){return n[a]=s?s(a,o):o}}})(function(r){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var a in s)Object.prototype.hasOwnProperty.call(s,a)&&(n[a]=s[a])};$T=function(n,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");e(n,s);function a(){this.constructor=n}n.prototype=s===null?Object.create(s):(a.prototype=s.prototype,new a)},GT=Object.assign||function(n){for(var s,a=1,o=arguments.length;a=0;p--)(f=n[p])&&(c=(l<3?f(c):l>3?f(s,a,c):f(s,a))||c);return l>3&&c&&Object.defineProperty(s,a,c),c},zT=function(n,s){return function(a,o){s(a,o,n)}},VT=function(n,s){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,s)},KT=function(n,s,a,o){function l(c){return c instanceof a?c:new a(function(f){f(c)})}return new(a||(a=Promise))(function(c,f){function p(S){try{T(o.next(S))}catch(b){f(b)}}function g(S){try{T(o.throw(S))}catch(b){f(b)}}function T(S){S.done?c(S.value):l(S.value).then(p,g)}T((o=o.apply(n,s||[])).next())})},ZT=function(n,s){var a={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},o,l,c,f;return f={next:p(0),throw:p(1),return:p(2)},typeof Symbol=="function"&&(f[Symbol.iterator]=function(){return this}),f;function p(T){return function(S){return g([T,S])}}function g(T){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,l&&(c=T[0]&2?l.return:T[0]?l.throw||((c=l.return)&&c.call(l),0):l.next)&&!(c=c.call(l,T[1])).done)return c;switch(l=0,c&&(T=[T[0]&2,c.value]),T[0]){case 0:case 1:c=T;break;case 4:return a.label++,{value:T[1],done:!1};case 5:a.label++,l=T[1],T=[0];continue;case 7:T=a.ops.pop(),a.trys.pop();continue;default:if(c=a.trys,!(c=c.length>0&&c[c.length-1])&&(T[0]===6||T[0]===2)){a=0;continue}if(T[0]===3&&(!c||T[1]>c[0]&&T[1]=n.length&&(n=void 0),{value:n&&n[o++],done:!n}}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")},Ch=function(n,s){var a=typeof Symbol=="function"&&n[Symbol.iterator];if(!a)return n;var o=a.call(n),l,c=[],f;try{for(;(s===void 0||s-- >0)&&!(l=o.next()).done;)c.push(l.value)}catch(p){f={error:p}}finally{try{l&&!l.done&&(a=o.return)&&a.call(o)}finally{if(f)throw f.error}}return c},XT=function(){for(var n=[],s=0;s1||p(x,C)})})}function p(x,C){try{g(o[x](C))}catch(G){b(c[0][3],G)}}function g(x){x.value instanceof hi?Promise.resolve(x.value.v).then(T,S):b(c[0][2],x)}function T(x){p("next",x)}function S(x){p("throw",x)}function b(x,C){x(C),c.shift(),c.length&&p(c[0][0],c[0][1])}},rb=function(n){var s,a;return s={},o("next"),o("throw",function(l){throw l}),o("return"),s[Symbol.iterator]=function(){return this},s;function o(l,c){s[l]=n[l]?function(f){return(a=!a)?{value:hi(n[l](f)),done:l==="return"}:c?c(f):f}:c}},nb=function(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s=n[Symbol.asyncIterator],a;return s?s.call(n):(n=typeof Mu=="function"?Mu(n):n[Symbol.iterator](),a={},o("next"),o("throw"),o("return"),a[Symbol.asyncIterator]=function(){return this},a);function o(c){a[c]=n[c]&&function(f){return new Promise(function(p,g){f=n[c](f),l(p,g,f.done,f.value)})}}function l(c,f,p,g){Promise.resolve(g).then(function(T){c({value:T,done:p})},f)}},sb=function(n,s){return Object.defineProperty?Object.defineProperty(n,"raw",{value:s}):n.raw=s,n};var t=Object.create?function(n,s){Object.defineProperty(n,"default",{enumerable:!0,value:s})}:function(n,s){n.default=s};ib=function(n){if(n&&n.__esModule)return n;var s={};if(n!=null)for(var a in n)a!=="default"&&Object.prototype.hasOwnProperty.call(n,a)&&Ru(s,n,a);return t(s,n),s},ab=function(n){return n&&n.__esModule?n:{default:n}},ob=function(n,s,a,o){if(a==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof s=="function"?n!==s||!o:!s.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return a==="m"?o:a==="a"?o.call(n):o?o.value:s.get(n)},ub=function(n,s,a,o,l){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!l)throw new TypeError("Private accessor was defined without a setter");if(typeof s=="function"?n!==s||!l:!s.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?l.call(n,a):l?l.value=a:s.set(n,a),a},lb=function(n,s){if(s===null||typeof s!="object"&&typeof s!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof n=="function"?s===n:n.has(s)},r("__extends",$T),r("__assign",GT),r("__rest",HT),r("__decorate",BT),r("__param",zT),r("__metadata",VT),r("__awaiter",KT),r("__generator",ZT),r("__exportStar",QT),r("__createBinding",Ru),r("__values",Mu),r("__read",Ch),r("__spread",XT),r("__spreadArrays",JT),r("__spreadArray",eb),r("__await",hi),r("__asyncGenerator",tb),r("__asyncDelegator",rb),r("__asyncValues",nb),r("__makeTemplateObject",sb),r("__importStar",ib),r("__importDefault",ab),r("__classPrivateFieldGet",ob),r("__classPrivateFieldSet",ub),r("__classPrivateFieldIn",lb)})});var Kb=O((zb,Vb)=>{(function(r){var e=Object.hasOwnProperty,t=Array.isArray?Array.isArray:function(_){return Object.prototype.toString.call(_)==="[object Array]"},n=10,s=typeof process=="object"&&typeof process.nextTick=="function",a=typeof Symbol=="function",o=typeof Reflect=="object",l=typeof setImmediate=="function",c=l?setImmediate:setTimeout,f=a?o&&typeof Reflect.ownKeys=="function"?Reflect.ownKeys:function(y){var _=Object.getOwnPropertyNames(y);return _.push.apply(_,Object.getOwnPropertySymbols(y)),_}:Object.keys;function p(){this._events={},this._conf&&g.call(this,this._conf)}function g(y){y&&(this._conf=y,y.delimiter&&(this.delimiter=y.delimiter),y.maxListeners!==r&&(this._maxListeners=y.maxListeners),y.wildcard&&(this.wildcard=y.wildcard),y.newListener&&(this._newListener=y.newListener),y.removeListener&&(this._removeListener=y.removeListener),y.verboseMemoryLeak&&(this.verboseMemoryLeak=y.verboseMemoryLeak),y.ignoreErrors&&(this.ignoreErrors=y.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function T(y,_){var w="(node) warning: possible EventEmitter memory leak detected. "+y+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(w+=" Event name: "+_+"."),typeof process!="undefined"&&process.emitWarning){var k=new Error(w);k.name="MaxListenersExceededWarning",k.emitter=this,k.count=y,process.emitWarning(k)}else console.error(w),console.trace&&console.trace()}var S=function(y,_,w){var k=arguments.length;switch(k){case 0:return[];case 1:return[y];case 2:return[y,_];case 3:return[y,_,w];default:for(var D=new Array(k);k--;)D[k]=arguments[k];return D}};function b(y,_){for(var w={},k,D=y.length,M=_?_.length:0,E=0;E0;)y=M[P],E.call(I,y,w[y]);this._listeners={},this._listenersCount=0,N()}}});function C(y,_,w,k){var D=Object.assign({},_);if(!y)return D;if(typeof y!="object")throw TypeError("options must be an object");var M=Object.keys(y),E=M.length,I,P,N;function q(ge){throw Error('Invalid "'+I+'" option value'+(ge?". Reason: "+ge:""))}for(var Ee=0;Ee0;)if(I===y[P])return M;E(_)}}var B=K(["function"]),de=K(["object","function"]);function le(y,_,w){var k,D,M=0,E,I=new y(function(P,N,q){w=C(w,{timeout:0,overload:!1},{timeout:function(Ie,V){return Ie*=1,(typeof Ie!="number"||Ie<0||!Number.isFinite(Ie))&&V("timeout must be a positive number"),Ie}}),k=!w.overload&&typeof y.prototype.cancel=="function"&&typeof q=="function";function Ee(){D&&(D=null),M&&(clearTimeout(M),M=0)}var ge=function(Ie){Ee(),P(Ie)},fe=function(Ie){Ee(),N(Ie)};k?_(ge,fe,q):(D=[function(Ie){fe(Ie||Error("canceled"))}],_(ge,fe,function(Ie){if(E)throw Error("Unable to subscribe on cancel event asynchronously");if(typeof Ie!="function")throw TypeError("onCancel callback must be a function");D.push(Ie)}),E=!0),w.timeout>0&&(M=setTimeout(function(){var Ie=Error("timeout");Ie.code="ETIMEDOUT",M=0,I.cancel(Ie),N(Ie)},w.timeout))});return k||(I.cancel=function(P){if(!!D){for(var N=D.length,q=1;q0;)fe=st[I],fe!=="_listeners"&&(je=te(y,_,w[fe],k+1,D),je&&(ge?ge.push.apply(ge,je):ge=je));return ge}else if(pt==="**"){for(ze=k+1===D||k+2===D&&Mr==="*",ze&&w._listeners&&(ge=te(y,_,w,D,D)),st=f(w),I=st.length;I-- >0;)fe=st[I],fe!=="_listeners"&&(fe==="*"||fe==="**"?(w[fe]._listeners&&!ze&&(je=te(y,_,w[fe],D,D),je&&(ge?ge.push.apply(ge,je):ge=je)),je=te(y,_,w[fe],k,D)):fe===Mr?je=te(y,_,w[fe],k+2,D):je=te(y,_,w[fe],k,D),je&&(ge?ge.push.apply(ge,je):ge=je));return ge}else w[pt]&&(ge=te(y,_,w[pt],k+1,D));if(Ie=w["*"],Ie&&te(y,_,Ie,k+1,D),V=w["**"],V)if(k0;)fe=st[I],fe!=="_listeners"&&(fe===Mr?te(y,_,V[fe],k+2,D):fe===pt?te(y,_,V[fe],k+1,D):(qe={},qe[fe]=V[fe],te(y,_,{"**":qe},k+1,D)));else V._listeners?te(y,_,V,D,D):V["*"]&&V["*"]._listeners&&te(y,_,V["*"],D,D);return ge}function J(y,_,w){var k=0,D=0,M,E=this.delimiter,I=E.length,P;if(typeof y=="string")if((M=y.indexOf(E))!==-1){P=new Array(5);do P[k++]=y.slice(D,M),D=M+I;while((M=y.indexOf(E,D))!==-1);P[k++]=y.slice(D)}else P=[y],k=1;else P=y,k=y.length;if(k>1){for(M=0;M+10&&N._listeners.length>this._maxListeners&&(N._listeners.warned=!0,T.call(this,N._listeners.length,q))):N._listeners=_,!0;return!0}function Ze(y,_,w,k){for(var D=f(y),M=D.length,E,I,P,N=y._listeners,q;M-- >0;)I=D[M],E=y[I],I==="_listeners"?P=w:P=w?w.concat(I):[I],q=k||typeof I=="symbol",N&&_.push(q?P:P.join(this.delimiter)),typeof E=="object"&&Ze.call(this,E,_,P,q);return _}function tt(y){for(var _=f(y),w=_.length,k,D,M;w-- >0;)D=_[w],k=y[D],k&&(M=!0,D!=="_listeners"&&!tt(k)&&delete y[D]);return M}function z(y,_,w){this.emitter=y,this.event=_,this.listener=w}z.prototype.off=function(){return this.emitter.off(this.event,this.listener),this};function W(y,_,w){if(w===!0)D=!0;else if(w===!1)k=!0;else{if(!w||typeof w!="object")throw TypeError("options should be an object or true");var k=w.async,D=w.promisify,M=w.nextTick,E=w.objectify}if(k||M||D){var I=_,P=_._origin||_;if(M&&!s)throw Error("process.nextTick is not supported");D===r&&(D=_.constructor.name==="AsyncFunction"),_=function(){var N=arguments,q=this,Ee=this.event;return D?M?Promise.resolve():new Promise(function(ge){c(ge)}).then(function(){return q.event=Ee,I.apply(q,N)}):(M?process.nextTick:c)(function(){q.event=Ee,I.apply(q,N)})},_._async=!0,_._origin=P}return[_,E?new z(this,y,_):this]}function A(y){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,g.call(this,y)}A.EventEmitter2=A,A.prototype.listenTo=function(y,_,w){if(typeof y!="object")throw TypeError("target musts be an object");var k=this;w=C(w,{on:r,off:r,reducers:r},{on:B,off:B,reducers:de});function D(M){if(typeof M!="object")throw TypeError("events must be an object");var E=w.reducers,I=ye.call(k,y),P;I===-1?P=new x(k,y,w):P=k._observers[I];for(var N=f(M),q=N.length,Ee,ge=typeof E=="function",fe=0;fe0;)D=w[k],(!y||D._target===y)&&(D.unsubscribe(_),M=!0);return M},A.prototype.delimiter=".",A.prototype.setMaxListeners=function(y){y!==r&&(this._maxListeners=y,this._conf||(this._conf={}),this._conf.maxListeners=y)},A.prototype.getMaxListeners=function(){return this._maxListeners},A.prototype.event="",A.prototype.once=function(y,_,w){return this._once(y,_,!1,w)},A.prototype.prependOnceListener=function(y,_,w){return this._once(y,_,!0,w)},A.prototype._once=function(y,_,w,k){return this._many(y,1,_,w,k)},A.prototype.many=function(y,_,w,k){return this._many(y,_,w,!1,k)},A.prototype.prependMany=function(y,_,w,k){return this._many(y,_,w,!0,k)},A.prototype._many=function(y,_,w,k,D){var M=this;if(typeof w!="function")throw new Error("many only accepts instances of Function");function E(){return--_===0&&M.off(y,E),w.apply(this,arguments)}return E._origin=w,this._on(y,E,k,D)},A.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||p.call(this);var y=arguments[0],_,w=this.wildcard,k,D,M,E,I;if(y==="newListener"&&!this._newListener&&!this._events.newListener)return!1;if(w&&(_=y,y!=="newListener"&&y!=="removeListener"&&typeof y=="object")){if(D=y.length,a){for(M=0;M3)for(k=new Array(P-1),E=1;E3)for(D=new Array(N-1),I=1;I0&&this._events[y].length>this._maxListeners&&(this._events[y].warned=!0,T.call(this,this._events[y].length,y))):this._events[y]=_,D)},A.prototype.off=function(y,_){if(typeof _!="function")throw new Error("removeListener only takes instances of Function");var w,k=[];if(this.wildcard){var D=typeof y=="string"?y.split(this.delimiter):y.slice();if(k=te.call(this,null,D,this.listenerTree,0),!k)return this}else{if(!this._events[y])return this;w=this._events[y],k.push({_listeners:w})}for(var M=0;M0){for(k=this._all,_=0,w=k.length;_0;)k=_[w[M]],typeof k=="function"?D.push(k):D.push.apply(D,k);return D}else{if(this.wildcard){if(E=this.listenerTree,!E)return[];var I=[],P=typeof y=="string"?y.split(this.delimiter):y.slice();return te.call(this,I,P,E,0),I}return _?(k=_[y],k?typeof k=="function"?[k]:k:[]):[]}},A.prototype.eventNames=function(y){var _=this._events;return this.wildcard?Ze.call(this,this.listenerTree,[],null,y):_?f(_):[]},A.prototype.listenerCount=function(y){return this.listeners(y).length},A.prototype.hasListeners=function(y){if(this.wildcard){var _=[],w=typeof y=="string"?y.split(this.delimiter):y.slice();return te.call(this,_,w,this.listenerTree,0),_.length>0}var k=this._events,D=this._all;return!!(D&&D.length||k&&(y===r?f(k).length:k[y]))},A.prototype.listenersAny=function(){return this._all?this._all:[]},A.prototype.waitFor=function(y,_){var w=this,k=typeof _;return k==="number"?_={timeout:_}:k==="function"&&(_={filter:_}),_=C(_,{timeout:0,filter:r,handleError:!1,Promise,overload:!1},{filter:B,Promise:G}),le(_.Promise,function(D,M,E){function I(){var P=_.filter;if(!(P&&!P.apply(w,arguments)))if(w.off(y,I),_.handleError){var N=arguments[0];N?M(N):D(S.apply(null,arguments).slice(1))}else D(S.apply(null,arguments))}E(function(){w.off(y,I)}),w._on(y,I,!1)},{timeout:_.timeout,overload:_.overload})};function ee(y,_,w){w=C(w,{Promise,timeout:0,overload:!1},{Promise:G});var k=w.Promise;return le(k,function(D,M,E){var I;if(typeof y.addEventListener=="function"){I=function(){D(S.apply(null,arguments))},E(function(){y.removeEventListener(_,I)}),y.addEventListener(_,I,{once:!0});return}var P=function(){N&&y.removeListener("error",N),D(S.apply(null,arguments))},N;_!=="error"&&(N=function(q){y.removeListener(_,P),M(q)},y.once("error",N)),E(function(){N&&y.removeListener("error",N),y.removeListener(_,P)}),y.once(_,P)},{timeout:w.timeout,overload:w.overload})}var Y=A.prototype;if(Object.defineProperties(A,{defaultMaxListeners:{get:function(){return Y._maxListeners},set:function(y){if(typeof y!="number"||y<0||Number.isNaN(y))throw TypeError("n must be a non-negative number");Y._maxListeners=y},enumerable:!0},once:{value:ee,writable:!0,configurable:!0}}),Object.defineProperties(Y,{_maxListeners:{value:n,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),typeof define=="function"&&define.amd)define(function(){return A});else if(typeof zb=="object")Vb.exports=A;else{var ce=new Function("","return this")();ce.EventEmitter2=A}})()});var Xr=O(es=>{"use strict";es.__esModule=!0;var SF;(function(r){r.AND="AND",r.OR="OR",r.XOR="XOR",r.NOT="NOT"})(SF=es.Operators||(es.Operators={}));var OF;(function(r){r.OPEN_PARENTHESIS="(",r.CLOSE_PARENTHESIS=")"})(OF=es.StructuralCharacters||(es.StructuralCharacters={}));var MF;(function(r){r.IDENTIFIER="IDENTIFIER",r.OPERATOR="OPERATOR",r.STRUCTURAL_CHARACTER="STRUCTURAL_CHARACTER",r.EOF="EOF",r.COMMENT="COMMENT"})(MF=es.Tokens||(es.Tokens={}))});var fp=O(ll=>{"use strict";ll.__esModule=!0;var at=Xr();ll.OPERATOR_PRECEDENCE={NOT:0,XOR:1,AND:2,OR:3};ll.VALID_TOKENS={identifierOnly:[{name:at.Tokens.IDENTIFIER},{name:at.Tokens.STRUCTURAL_CHARACTER,value:at.StructuralCharacters.OPEN_PARENTHESIS}],identifierOrNot:[{name:at.Tokens.IDENTIFIER},{name:at.Tokens.STRUCTURAL_CHARACTER,value:at.StructuralCharacters.OPEN_PARENTHESIS},{name:at.Tokens.OPERATOR,value:at.Operators.NOT}],binaryOperator:[{name:at.Tokens.OPERATOR,value:at.Operators.AND},{name:at.Tokens.OPERATOR,value:at.Operators.OR},{name:at.Tokens.OPERATOR,value:at.Operators.XOR}],binaryOperatorOrClose:[{name:at.Tokens.OPERATOR,value:at.Operators.AND},{name:at.Tokens.OPERATOR,value:at.Operators.OR},{name:at.Tokens.OPERATOR,value:at.Operators.XOR},{name:at.Tokens.STRUCTURAL_CHARACTER,value:at.StructuralCharacters.CLOSE_PARENTHESIS}]}});var hp=O(En=>{"use strict";En.__esModule=!0;var Ai=Xr();En.STRUCTURAL_CHARACTERS={"(":Ai.StructuralCharacters.OPEN_PARENTHESIS,")":Ai.StructuralCharacters.CLOSE_PARENTHESIS};En.OPERATORS={AND:Ai.Operators.AND,OR:Ai.Operators.OR,XOR:Ai.Operators.XOR,NOT:Ai.Operators.NOT};En.SEPARATORS=new Set([32,9,10,13].map(function(r){return String.fromCodePoint(r)}));En.QUOTED_IDENTIFIER_DELIMITER=String.fromCodePoint(34);En.COMMENT_DELIMITER=String.fromCodePoint(35);En.EOL=String.fromCodePoint(10);En.ESCAPE_CHARACTER=String.fromCodePoint(92)});var Av=O(Dn=>{"use strict";var pp=Dn&&Dn.__assign||function(){return pp=Object.assign||function(r){for(var e,t=1,n=arguments.length;t{"use strict";mp.__esModule=!0;var Pi=Xr(),lr=hp(),Ni=Av();mp.lex=function(r){for(var e=null,t=null,n=null,s=0;s{"use strict";var RF=Sn&&Sn.__spreadArrays||function(){for(var r=0,e=0,t=arguments.length;e{"use strict";var Ii=fo&&fo.__spreadArrays||function(){for(var r=0,e=0,t=arguments.length;e{"use strict";On.__esModule=!0;var Fv=Xr();On.andUtil=function(r,e){return r&&e};On.orUtil=function(r,e){return r||e};On.xorUtil=function(r,e){return r!==e};On.notUtil=function(r){return!r};On.isIdentifier=function(r){var e=r.name,t=r.value;return e===Fv.Tokens.IDENTIFIER&&typeof t=="string"};On.isOperator=function(r){var e=r.name,t=r.value;return e===Fv.Tokens.OPERATOR&&typeof t=="string"};On.throwInvalidExpression=function(r){throw new TypeError("Invalid postfix expression: "+r)}});var Lv=O(vp=>{"use strict";var ho;vp.__esModule=!0;var Tp=Xr(),bp=_p();vp.OPERATOR_MAP=(ho={},ho[Tp.Operators.AND]=bp.andUtil,ho[Tp.Operators.OR]=bp.orUtil,ho[Tp.Operators.XOR]=bp.xorUtil,ho)});var Uv=O(Ls=>{"use strict";var wp=Ls&&Ls.__spreadArrays||function(){for(var r=0,e=0,t=arguments.length;e{"use strict";po.__esModule=!0;var Wv=Uv();po.getEvaluator=Wv.getEvaluator;po.evaluate=Wv.evaluate;var NF=gp();po.parse=NF.parse});var UF={};jk(UF,{default:()=>kl});module.exports=$k(UF);var iw=require("obsidian");var gi=require("obsidian");var qF=new Error("timeout while waiting for mutex to become available"),jF=new Error("mutex already locked"),Gk=new Error("request for lock canceled"),Hk=function(r,e,t,n){function s(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function l(p){try{f(n.next(p))}catch(g){o(g)}}function c(p){try{f(n.throw(p))}catch(g){o(g)}}function f(p){p.done?a(p.value):s(p.value).then(l,c)}f((n=n.apply(r,e||[])).next())})},ql=class{constructor(e,t=Gk){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 Hk(this,void 0,void 0,function*(){let[n,s]=yield this.acquire(t);try{return yield e(n)}finally{s()}})}waitForUnlock(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise(t=>{this._weightedWaiters[e-1]||(this._weightedWaiters[e-1]=[]),this._weightedWaiters[e-1].push(t),this._dispatch()})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(e){this._value=e,this._dispatch()}release(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);this._value+=e,this._dispatch()}cancel(){this._weightedQueues.forEach(e=>e.forEach(t=>t.reject(this._cancelError))),this._weightedQueues=[]}_dispatch(){var e;for(let t=this._value;t>0;t--){let n=(e=this._weightedQueues[t-1])===null||e===void 0?void 0:e.shift();if(!n)continue;let s=this._value,a=t;this._value-=t,t=this._value+1,n.resolve([s,this._newReleaser(a)])}this._drainUnlockWaiters()}_newReleaser(e){let t=!1;return()=>{t||(t=!0,this.release(e))}}_drainUnlockWaiters(){for(let e=this._value;e>0;e--)!this._weightedWaiters[e-1]||(this._weightedWaiters[e-1].forEach(t=>t()),this._weightedWaiters[e-1]=[])}},Bk=function(r,e,t,n){function s(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function l(p){try{f(n.next(p))}catch(g){o(g)}}function c(p){try{f(n.throw(p))}catch(g){o(g)}}function f(p){p.done?a(p.value):s(p.value).then(l,c)}f((n=n.apply(r,e||[])).next())})},Po=class{constructor(e){this._semaphore=new ql(1,e)}acquire(){return Bk(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 Du=Ln(_t()),di=Ln(Eu());var vs=Ln(Eu()),Bt=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 Bt((0,vs.default)().startOf(t).startOf("day"),(0,vs.default)().endOf(t).startOf("day"))}static buildInvalid(){return new Bt(vs.default.invalid(),vs.default.invalid())}isValid(){return this.start.isValid()&&this.end.isValid()}moveToPrevious(e){let t=vs.default.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=vs.default.duration(1,e);this.start.add(t),this.end.add(t),(e==="month"||e==="quarter")&&(this.end=this.end.endOf(e).startOf("day"))}};var ir=class{static parseDate(e,t=!1){return(0,di.default)(Du.parseDate(e,void 0,{forwardDate:t})).startOf("day")}static parseDateRange(e,t=!1){let n=[ir.parseRelativeDateRange,ir.parseNumberedDateRange,ir.parseAbsoluteDateRange];for(let s of n){let a=s(e,t);if(a.isValid())return a}return Bt.buildInvalid()}static parseAbsoluteDateRange(e,t){let n=Du.parse(e,void 0,{forwardDate:t});if(n.length===0)return Bt.buildInvalid();let s=n[0].start,a=n[1]&&n[1].start?n[1].start:s,o=(0,di.default)(s.date()),l=(0,di.default)(a.date());return new Bt(o,l)}static parseRelativeDateRange(e,t){let n=/(last|this|next) (week|month|quarter|year)/,s=e.match(n);if(s&&s.length===3){let a=s[1],o=s[2],l=Bt.buildRelative(o);switch(a){case"last":l.moveToPrevious(o);break;case"next":l.moveToNext(o);break}return l}return Bt.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,a,o]of n){let l=e.match(s);if(l){let c=l[0].trim();return new Bt((0,di.default)(c,a).startOf(o),(0,di.default)(c,a).endOf(o))}}return Bt.buildInvalid()}};var cI={td:"today",tm:"tomorrow",yd:"yesterday",tw:"this week",nw:"next week",weekend:"sat",we:"sat"};function fi(r){for(let[e,t]of Object.entries(cI))r=r.replace(RegExp(`\\b${e}\\s`,"i"),t);return r}var Su=["MO","TU","WE","TH","FR","SA","SU"],ft=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(Su.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=Su[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 Ve=function(r){return r!=null},ar=function(r){return typeof r=="number"},Nh=function(r){return typeof r=="string"&&Su.includes(r)},Ft=Array.isArray,Er=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+=ke(t,e/t.length)),t.slice(0,e)+String(n))}var jT=function(r,e,t){var n=r.split(e);return t?n.slice(0,t).concat([n.slice(t).join(e)]):n},Yt=function(r,e){var t=r%e;return t*e<0?t+e:t},Ou=function(r,e){return{div:Math.floor(r/e),mod:Yt(r,e)}},or=function(r){return!Ve(r)||r.length===0},ut=function(r){return!or(r)},De=function(r,e){return ut(r)&&r.indexOf(e)!==-1};var Hn;(function(r){r.MONTH_DAYS=[31,28,31,30,31,30,31,31,30,31,30,31],r.ONE_DAY=1e3*60*60*24,r.MAXYEAR=9999,r.ORDINAL_BASE=new Date(Date.UTC(1970,0,1)),r.PY_WEEKDAYS=[6,0,1,2,3,4,5],r.getYearDay=function(e){var t=new Date(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate());return Math.ceil((t.valueOf()-new Date(e.getUTCFullYear(),0,1).valueOf())/r.ONE_DAY)+1},r.isLeapYear=function(e){return e%4===0&&e%100!==0||e%400===0},r.isDate=function(e){return e instanceof Date},r.isValidDate=function(e){return r.isDate(e)&&!isNaN(e.getTime())},r.tzOffset=function(e){return e.getTimezoneOffset()*60*1e3},r.daysBetween=function(e,t){var n=e.getTime()-r.tzOffset(e),s=t.getTime()-r.tzOffset(t),a=n-s;return Math.round(a/r.ONE_DAY)},r.toOrdinal=function(e){return r.daysBetween(e,r.ORDINAL_BASE)},r.fromOrdinal=function(e){return new Date(r.ORDINAL_BASE.getTime()+e*r.ONE_DAY)},r.getMonthDays=function(e){var t=e.getUTCMonth();return t===1&&r.isLeapYear(e.getUTCFullYear())?29:r.MONTH_DAYS[t]},r.getWeekday=function(e){return r.PY_WEEKDAYS[e.getUTCDay()]},r.monthRange=function(e,t){var n=new Date(Date.UTC(e,t,1));return[r.getWeekday(n),r.getMonthDays(n)]},r.combine=function(e,t){return t=t||e,new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))},r.clone=function(e){var t=new Date(e.getTime());return t},r.cloneDates=function(e){for(var t=[],n=0;nthis.maxDate;if(this.method==="between"){if(t)return!0;if(n)return!1}else if(this.method==="before"){if(n)return!1}else if(this.method==="after")return t?!0:(this.add(e),!1);return this.add(e)},r.prototype.add=function(e){return this._result.push(e),!0},r.prototype.getValue=function(){var e=this._result;switch(this.method){case"all":case"between":return e;case"before":case"after":default:return e.length?e[e.length-1]:null}},r.prototype.clone=function(){return new r(this.method,this.args)},r}(),_n=dI;var db=Ln(cb(),1),{__extends:pi,__assign:zt,__rest:MY,__decorate:RY,__param:xY,__metadata:AY,__awaiter:PY,__generator:NY,__exportStar:CY,__createBinding:IY,__values:FY,__read:LY,__spread:YY,__spreadArrays:UY,__spreadArray:U,__await:WY,__asyncGenerator:qY,__asyncDelegator:jY,__asyncValues:$Y,__makeTemplateObject:GY,__importStar:HY,__importDefault:BY,__classPrivateFieldGet:zY,__classPrivateFieldSet:VY,__classPrivateFieldIn:KY}=db.default;var fI=function(r){pi(e,r);function e(t,n,s){var a=r.call(this,t,n)||this;return a.iterator=s,a}return e.prototype.add=function(t){return this.iterator(t,this._result.length)?(this._result.push(t),!0):!1},e}(_n),Ih=fI;var hI={dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],tokens:{SKIP:/^[ \r\n\t]+|^\.$/,number:/^[1-9][0-9]*/,numberAsText:/^(one|two|three)/i,every:/^every/i,"day(s)":/^days?/i,"weekday(s)":/^weekdays?/i,"week(s)":/^weeks?/i,"hour(s)":/^hours?/i,"minute(s)":/^minutes?/i,"month(s)":/^months?/i,"year(s)":/^years?/i,on:/^(on|in)/i,at:/^(at)/i,the:/^the/i,first:/^first/i,second:/^second/i,third:/^third/i,nth:/^([1-9][0-9]*)(\.|th|nd|rd|st)/i,last:/^last/i,for:/^for/i,"time(s)":/^times?/i,until:/^(un)?til/i,monday:/^mo(n(day)?)?/i,tuesday:/^tu(e(s(day)?)?)?/i,wednesday:/^we(d(n(esday)?)?)?/i,thursday:/^th(u(r(sday)?)?)?/i,friday:/^fr(i(day)?)?/i,saturday:/^sa(t(urday)?)?/i,sunday:/^su(n(day)?)?/i,january:/^jan(uary)?/i,february:/^feb(ruary)?/i,march:/^mar(ch)?/i,april:/^apr(il)?/i,may:/^may/i,june:/^june?/i,july:/^july?/i,august:/^aug(ust)?/i,september:/^sep(t(ember)?)?/i,october:/^oct(ober)?/i,november:/^nov(ember)?/i,december:/^dec(ember)?/i,comma:/^(,\s*|(and|or)\s*)+/i}},ks=hI;var fb=function(r,e){return r.indexOf(e)!==-1},pI=function(r){return r.toString()},mI=function(r,e,t){return"".concat(e," ").concat(t,", ").concat(r)},yI=function(){function r(e,t,n,s){if(t===void 0&&(t=pI),n===void 0&&(n=ks),s===void 0&&(s=mI),this.text=[],this.language=n||ks,this.gettext=t,this.dateFormatter=s,this.rrule=e,this.options=e.options,this.origOptions=e.origOptions,this.origOptions.bymonthday){var a=[].concat(this.options.bymonthday),o=[].concat(this.options.bynmonthday);a.sort(function(p,g){return p-g}),o.sort(function(p,g){return g-p}),this.bymonthday=a.concat(o),this.bymonthday.length||(this.bymonthday=null)}if(Ve(this.origOptions.byweekday)){var l=Ft(this.origOptions.byweekday)?this.origOptions.byweekday:[this.origOptions.byweekday],c=String(l);this.byweekday={allWeeks:l.filter(function(p){return!p.n}),someWeeks:l.filter(function(p){return Boolean(p.n)}),isWeekdays:c.indexOf("MO")!==-1&&c.indexOf("TU")!==-1&&c.indexOf("WE")!==-1&&c.indexOf("TH")!==-1&&c.indexOf("FR")!==-1&&c.indexOf("SA")===-1&&c.indexOf("SU")===-1,isEveryDay:c.indexOf("MO")!==-1&&c.indexOf("TU")!==-1&&c.indexOf("WE")!==-1&&c.indexOf("TH")!==-1&&c.indexOf("FR")!==-1&&c.indexOf("SA")!==-1&&c.indexOf("SU")!==-1};var f=function(p,g){return p.weekday-g.weekday};this.byweekday.allWeeks.sort(f),this.byweekday.someWeeks.sort(f),this.byweekday.allWeeks.length||(this.byweekday.allWeeks=null),this.byweekday.someWeeks.length||(this.byweekday.someWeeks=null)}else this.byweekday=null}return r.isFullyConvertible=function(e){var t=!0;if(!(e.options.freq in r.IMPLEMENTED)||e.origOptions.until&&e.origOptions.count)return!1;for(var n in e.origOptions){if(fb(["dtstart","wkst","freq"],n))return!0;if(!fb(r.IMPLEMENTED[e.options.freq],n))return!1}return t},r.prototype.isFullyConvertible=function(){return r.isFullyConvertible(this.rrule)},r.prototype.toString=function(){var e=this.gettext;if(!(this.options.freq in r.IMPLEMENTED))return e("RRule error: Unable to fully convert this rrule to text");if(this.text=[e("every")],this[X.FREQUENCIES[this.options.freq]](),this.options.until){this.add(e("until"));var t=this.options.until;this.add(this.dateFormatter(t.getUTCFullYear(),this.language.monthNames[t.getUTCMonth()],t.getUTCDate()))}else this.options.count&&this.add(e("for")).add(this.options.count.toString()).add(this.plural(this.options.count)?e("times"):e("time"));return this.isFullyConvertible()||this.add(e("(~ approximate)")),this.text.join("")},r.prototype.HOURLY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("hours"):e("hour"))},r.prototype.MINUTELY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("minutes"):e("minute"))},r.prototype.DAILY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.byweekday&&this.byweekday.isWeekdays?this.add(this.plural(this.options.interval)?e("weekdays"):e("weekday")):this.add(this.plural(this.options.interval)?e("days"):e("day")),this.origOptions.bymonth&&(this.add(e("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday?this._byweekday():this.origOptions.byhour&&this._byhour()},r.prototype.WEEKLY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()).add(this.plural(this.options.interval)?e("weeks"):e("week")),this.byweekday&&this.byweekday.isWeekdays?this.options.interval===1?this.add(this.plural(this.options.interval)?e("weekdays"):e("weekday")):this.add(e("on")).add(e("weekdays")):this.byweekday&&this.byweekday.isEveryDay?this.add(this.plural(this.options.interval)?e("days"):e("day")):(this.options.interval===1&&this.add(e("week")),this.origOptions.bymonth&&(this.add(e("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday())},r.prototype.MONTHLY=function(){var e=this.gettext;this.origOptions.bymonth?(this.options.interval!==1&&(this.add(this.options.interval.toString()).add(e("months")),this.plural(this.options.interval)&&this.add(e("in"))),this._bymonth()):(this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("months"):e("month"))),this.bymonthday?this._bymonthday():this.byweekday&&this.byweekday.isWeekdays?this.add(e("on")).add(e("weekdays")):this.byweekday&&this._byweekday()},r.prototype.YEARLY=function(){var e=this.gettext;this.origOptions.bymonth?(this.options.interval!==1&&(this.add(this.options.interval.toString()),this.add(e("years"))),this._bymonth()):(this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("years"):e("year"))),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.options.byyearday&&this.add(e("on the")).add(this.list(this.options.byyearday,this.nth,e("and"))).add(e("day")),this.options.byweekno&&this.add(e("in")).add(this.plural(this.options.byweekno.length)?e("weeks"):e("week")).add(this.list(this.options.byweekno,void 0,e("and")))},r.prototype._bymonthday=function(){var e=this.gettext;this.byweekday&&this.byweekday.allWeeks?this.add(e("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext,e("or"))).add(e("the")).add(this.list(this.bymonthday,this.nth,e("or"))):this.add(e("on the")).add(this.list(this.bymonthday,this.nth,e("and")))},r.prototype._byweekday=function(){var e=this.gettext;this.byweekday.allWeeks&&!this.byweekday.isWeekdays&&this.add(e("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext)),this.byweekday.someWeeks&&(this.byweekday.allWeeks&&this.add(e("and")),this.add(e("on the")).add(this.list(this.byweekday.someWeeks,this.weekdaytext,e("and"))))},r.prototype._byhour=function(){var e=this.gettext;this.add(e("at")).add(this.list(this.origOptions.byhour,void 0,e("and")))},r.prototype._bymonth=function(){this.add(this.list(this.options.bymonth,this.monthtext,this.gettext("and")))},r.prototype.nth=function(e){e=parseInt(e.toString(),10);var t,n=this.gettext;if(e===-1)return n("last");var s=Math.abs(e);switch(s){case 1:case 21:case 31:t=s+n("st");break;case 2:case 22:t=s+n("nd");break;case 3:case 23:t=s+n("rd");break;default:t=s+n("th")}return e<0?t+" "+n("last"):t},r.prototype.monthtext=function(e){return this.language.monthNames[e-1]},r.prototype.weekdaytext=function(e){var t=ar(e)?(e+1)%7:e.getJsWeekday();return(e.n?this.nth(e.n)+" ":"")+this.language.dayNames[t]},r.prototype.plural=function(e){return e%100!==1},r.prototype.add=function(e){return this.text.push(" "),this.text.push(e),this},r.prototype.list=function(e,t,n,s){var a=this;s===void 0&&(s=","),Ft(e)||(e=[e]);var o=function(c,f,p){for(var g="",T=0;Te[0].length)&&(e=a,t=s)}if(e!=null&&(this.text=this.text.substr(e[0].length),this.text===""&&(this.done=!0)),e==null){this.done=!0,this.symbol=null,this.value=null;return}}while(t==="SKIP");return this.symbol=t,this.value=e,!0},r.prototype.accept=function(e){if(this.symbol===e){if(this.value){var t=this.value;return this.nextSymbol(),t}return this.nextSymbol(),!0}return!1},r.prototype.acceptNumber=function(){return this.accept("number")},r.prototype.expect=function(e){if(this.accept(e))return!0;throw new Error("expected "+e+" but found "+this.symbol)},r}();function za(r,e){e===void 0&&(e=ks);var t={},n=new gI(e.tokens);if(!n.start(r))return null;return s(),t;function s(){n.expect("every");var T=n.acceptNumber();if(T&&(t.interval=parseInt(T[0],10)),n.isDone())throw new Error("Unexpected end");switch(n.symbol){case"day(s)":t.freq=X.DAILY,n.nextSymbol()&&(o(),g());break;case"weekday(s)":t.freq=X.WEEKLY,t.byweekday=[X.MO,X.TU,X.WE,X.TH,X.FR],n.nextSymbol(),g();break;case"week(s)":t.freq=X.WEEKLY,n.nextSymbol()&&(a(),g());break;case"hour(s)":t.freq=X.HOURLY,n.nextSymbol()&&(a(),g());break;case"minute(s)":t.freq=X.MINUTELY,n.nextSymbol()&&(a(),g());break;case"month(s)":t.freq=X.MONTHLY,n.nextSymbol()&&(a(),g());break;case"year(s)":t.freq=X.YEARLY,n.nextSymbol()&&(a(),g());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":t.freq=X.WEEKLY;var S=n.symbol.substr(0,2).toUpperCase();if(t.byweekday=[X[S]],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var b=c();if(!b)throw new Error("Unexpected symbol "+n.symbol+", expected weekday");t.byweekday.push(X[b]),n.nextSymbol()}p(),g();break;case"january":case"february":case"march":case"april":case"may":case"june":case"july":case"august":case"september":case"october":case"november":case"december":if(t.freq=X.YEARLY,t.bymonth=[l()],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var x=l();if(!x)throw new Error("Unexpected symbol "+n.symbol+", expected month");t.bymonth.push(x),n.nextSymbol()}a(),g();break;default:throw new Error("Unknown symbol")}}function a(){var T=n.accept("on"),S=n.accept("the");if(!!(T||S))do{var b=f(),x=c(),C=l();if(b)x?(n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(X[x].nth(b))):(t.bymonthday||(t.bymonthday=[]),t.bymonthday.push(b),n.accept("day(s)"));else if(x)n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(X[x]);else if(n.symbol==="weekday(s)")n.nextSymbol(),t.byweekday||(t.byweekday=[X.MO,X.TU,X.WE,X.TH,X.FR]);else if(n.symbol==="week(s)"){n.nextSymbol();var G=n.acceptNumber();if(!G)throw new Error("Unexpected symbol "+n.symbol+", expected week number");for(t.byweekno=[parseInt(G[0],10)];n.accept("comma");){if(G=n.acceptNumber(),!G)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.byweekno.push(parseInt(G[0],10))}}else if(C)n.nextSymbol(),t.bymonth||(t.bymonth=[]),t.bymonth.push(C);else return}while(n.accept("comma")||n.accept("the")||n.accept("on"))}function o(){var T=n.accept("at");if(!!T)do{var S=n.acceptNumber();if(!S)throw new Error("Unexpected symbol "+n.symbol+", expected hour");for(t.byhour=[parseInt(S[0],10)];n.accept("comma");){if(S=n.acceptNumber(),!S)throw new Error("Unexpected symbol "+n.symbol+"; expected hour");t.byhour.push(parseInt(S[0],10))}}while(n.accept("comma")||n.accept("at"))}function l(){switch(n.symbol){case"january":return 1;case"february":return 2;case"march":return 3;case"april":return 4;case"may":return 5;case"june":return 6;case"july":return 7;case"august":return 8;case"september":return 9;case"october":return 10;case"november":return 11;case"december":return 12;default:return!1}}function c(){switch(n.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return n.symbol.substr(0,2).toUpperCase();default:return!1}}function f(){switch(n.symbol){case"last":return n.nextSymbol(),-1;case"first":return n.nextSymbol(),1;case"second":return n.nextSymbol(),n.accept("last")?-2:2;case"third":return n.nextSymbol(),n.accept("last")?-3:3;case"nth":var T=parseInt(n.value[1],10);if(T<-366||T>366)throw new Error("Nth out of range: "+T);return n.nextSymbol(),n.accept("last")?-T:T;default:return!1}}function p(){n.accept("on"),n.accept("the");var T=f();if(!!T)for(t.bymonthday=[T],n.nextSymbol();n.accept("comma");){if(T=f(),!T)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.bymonthday.push(T),n.nextSymbol()}}function g(){if(n.symbol==="until"){var T=Date.parse(n.text);if(!T)throw new Error("Cannot parse until date:"+n.text);t.until=new Date(T)}else n.accept("for")&&(t.count=parseInt(n.value[0],10),n.expect("number"))}}var ve;(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"})(ve||(ve={}));function Va(r){return r12){var n=Math.floor(this.month/12),s=Yt(this.month,12);this.month=s,this.year+=n,this.month===0&&(this.month=12,--this.year)}},e.prototype.addWeekly=function(t,n){n>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-n))+t*7:this.day+=-(this.getWeekday()-n)+t*7,this.fixDay()},e.prototype.addDaily=function(t){this.day+=t,this.fixDay()},e.prototype.addHours=function(t,n,s){for(n&&(this.hour+=Math.floor((23-this.hour)/t)*t);;){this.hour+=t;var a=Ou(this.hour,24),o=a.div,l=a.mod;if(o&&(this.hour=l,this.addDaily(o)),or(s)||De(s,this.hour))break}},e.prototype.addMinutes=function(t,n,s,a){for(n&&(this.minute+=Math.floor((1439-(this.hour*60+this.minute))/t)*t);;){this.minute+=t;var o=Ou(this.minute,60),l=o.div,c=o.mod;if(l&&(this.minute=c,this.addHours(l,!1,s)),(or(s)||De(s,this.hour))&&(or(a)||De(a,this.minute)))break}},e.prototype.addSeconds=function(t,n,s,a,o){for(n&&(this.second+=Math.floor((86399-(this.hour*3600+this.minute*60+this.second))/t)*t);;){this.second+=t;var l=Ou(this.second,60),c=l.div,f=l.mod;if(c&&(this.second=f,this.addMinutes(c,!1,s,a)),(or(s)||De(s,this.hour))&&(or(a)||De(a,this.minute))&&(or(o)||De(o,this.second)))break}},e.prototype.fixDay=function(){if(!(this.day<=28)){var t=Hn.monthRange(this.year,this.month-1)[1];if(!(this.day<=t))for(;this.day>t;){if(this.day-=t,++this.month,this.month===13&&(this.month=1,++this.year,this.year>Hn.MAXYEAR))return;t=Hn.monthRange(this.year,this.month-1)[1]}}},e.prototype.add=function(t,n){var s=t.freq,a=t.interval,o=t.wkst,l=t.byhour,c=t.byminute,f=t.bysecond;switch(s){case ve.YEARLY:return this.addYears(a);case ve.MONTHLY:return this.addMonths(a);case ve.WEEKLY:return this.addWeekly(a,o);case ve.DAILY:return this.addDaily(a);case ve.HOURLY:return this.addHours(a,n,l);case ve.MINUTELY:return this.addMinutes(a,n,l,c);case ve.SECONDLY:return this.addSeconds(a,n,l,c,f)}},e}(yi);function Fh(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)||ut(e.byweekno)||ut(e.byyearday)||Boolean(e.bymonthday)||ut(e.bymonthday)||Ve(e.byweekday)||Ve(e.byeaster)))switch(e.freq){case X.YEARLY:e.bymonth||(e.bymonth=e.dtstart.getUTCMonth()+1),e.bymonthday=e.dtstart.getUTCDate();break;case X.MONTHLY:e.bymonthday=e.dtstart.getUTCDate();break;case X.WEEKLY:e.byweekday=[se.getWeekday(e.dtstart)];break}if(Ve(e.bymonth)&&!Ft(e.bymonth)&&(e.bymonth=[e.bymonth]),Ve(e.byyearday)&&!Ft(e.byyearday)&&ar(e.byyearday)&&(e.byyearday=[e.byyearday]),!Ve(e.bymonthday))e.bymonthday=[],e.bynmonthday=[];else if(Ft(e.bymonthday)){for(var s=[],a=[],t=0;t0?s.push(n):n<0&&a.push(n)}e.bymonthday=s,e.bynmonthday=a}else e.bymonthday<0?(e.bynmonthday=[e.bymonthday],e.bymonthday=[]):(e.bynmonthday=[],e.bymonthday=[e.bymonthday]);if(Ve(e.byweekno)&&!Ft(e.byweekno)&&(e.byweekno=[e.byweekno]),!Ve(e.byweekday))e.bynweekday=null;else if(ar(e.byweekday))e.byweekday=[e.byweekday],e.bynweekday=null;else if(Nh(e.byweekday))e.byweekday=[ft.fromStr(e.byweekday).weekday],e.bynweekday=null;else if(e.byweekday instanceof ft)!e.byweekday.n||e.freq>X.MONTHLY?(e.byweekday=[e.byweekday.weekday],e.bynweekday=null):(e.bynweekday=[[e.byweekday.weekday,e.byweekday.n]],e.byweekday=null);else{for(var o=[],l=[],t=0;tX.MONTHLY?o.push(c.weekday):l.push([c.weekday,c.n])}e.byweekday=ut(o)?o:null,e.bynweekday=ut(l)?l:null}return Ve(e.byhour)?ar(e.byhour)&&(e.byhour=[e.byhour]):e.byhour=e.freq=4?(p=0,f=l.yearlen+Yt(o-e.wkst,7)):f=n-p;for(var g=Math.floor(f/7),T=Yt(f,7),S=Math.floor(g+T/4),b=0;b0&&x<=S){var C=void 0;x>1?(C=p+(x-1)*7,p!==c&&(C-=7-c)):C=p;for(var G=0;G<7&&(l.wnomask[C]=1,C++,l.wdaymask[C]!==e.wkst);G++);}}if(De(e.byweekno,1)){var C=p+S*7;if(p!==c&&(C-=7-c),C=4?(de=0,ye=le+Yt(B-e.wkst,7)):ye=n-p,K=Math.floor(52+Yt(ye,7)/4)}if(De(e.byweekno,K))for(var C=0;Ca)return Tn(r);if(K>=t){var B=Fb(K,e);if(!r.accept(B)||l&&(--l,!l))return Tn(r)}}else for(var G=S;Ga)return Tn(r);if(K>=t){var B=Fb(K,e);if(!r.accept(B)||l&&(--l,!l))return Tn(r)}}}if(e.interval===0||(c.add(e,x),c.year>se.MAXYEAR))return Tn(r);Va(n)||(p=f.gettimeset(n)(c.hour,c.minute,c.second,0)),f.rebuild(c.year,c.month)}}function RI(r,e,t){var n=t.bymonth,s=t.byweekno,a=t.byweekday,o=t.byeaster,l=t.bymonthday,c=t.bynmonthday,f=t.byyearday;return ut(n)&&!De(n,r.mmask[e])||ut(s)&&!r.wnomask[e]||ut(a)&&!De(a,r.wdaymask[e])||ut(r.nwdaymask)&&!r.nwdaymask[e]||o!==null&&!De(r.eastermask,e)||(ut(l)||ut(c))&&!De(l,r.mdaymask[e])&&!De(c,r.nmdaymask[e])||ut(f)&&(e=r.yearlen&&!De(f,e+1-r.yearlen)&&!De(f,-r.nextyearlen+e-r.yearlen))}function Fb(r,e){return new Es(r,e.tzid).rezonedDate()}function Tn(r){return r.getValue()}function xI(r,e,t,n,s){for(var a=!1,o=e;o=X.HOURLY&&ut(s)&&!De(s,e.hour)||n>=X.MINUTELY&&ut(a)&&!De(a,e.minute)||n>=X.SECONDLY&&ut(o)&&!De(o,e.second)?[]:r.gettimeset(n)(e.hour,e.minute,e.second,e.millisecond)}var Dr={MO:new ft(0),TU:new ft(1),WE:new ft(2),TH:new ft(3),FR:new ft(4),SA:new ft(5),SU:new ft(6)},Ka={freq:ve.YEARLY,dtstart:null,interval:1,wkst:Dr.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},Tb=Object.keys(Ka),X=function(){function r(e,t){e===void 0&&(e={}),t===void 0&&(t=!1),this._cache=t?null:new wb,this.origOptions=Fh(e);var n=gb(e).parsedOptions;this.options=n}return r.parseText=function(e,t){return za(e,t)},r.fromText=function(e,t){return hb(e,t)},r.fromString=function(e){return new r(r.parseString(e)||void 0)},r.prototype._iter=function(e){return Au(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 Ih("all",{},e));var t=this._cacheGet("all");return t===!1&&(t=this._iter(new _n("all",{})),this._cacheAdd("all",t)),t},r.prototype.between=function(e,t,n,s){if(n===void 0&&(n=!1),!se.isValidDate(e)||!se.isValidDate(t))throw new Error("Invalid date passed in to RRule.between");var a={before:t,after:e,inc:n};if(s)return this._iter(new Ih("between",a,s));var o=this._cacheGet("between",a);return o===!1&&(o=this._iter(new _n("between",a)),this._cacheAdd("between",o,a)),o},r.prototype.before=function(e,t){if(t===void 0&&(t=!1),!se.isValidDate(e))throw new Error("Invalid date passed in to RRule.before");var n={dt:e,inc:t},s=this._cacheGet("before",n);return s===!1&&(s=this._iter(new _n("before",n)),this._cacheAdd("before",s,n)),s},r.prototype.after=function(e,t){if(t===void 0&&(t=!1),!se.isValidDate(e))throw new Error("Invalid date passed in to RRule.after");var n={dt:e,inc:t},s=this._cacheGet("after",n);return s===!1&&(s=this._iter(new _n("after",n)),this._cacheAdd("after",s,n)),s},r.prototype.count=function(){return this.all().length},r.prototype.toString=function(){return Xa(this.origOptions)},r.prototype.toText=function(e,t,n){return pb(this,e,t,n)},r.prototype.isFullyConvertibleToText=function(){return mb(this)},r.prototype.clone=function(){return new r(this.origOptions)},r.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],r.YEARLY=ve.YEARLY,r.MONTHLY=ve.MONTHLY,r.WEEKLY=ve.WEEKLY,r.DAILY=ve.DAILY,r.HOURLY=ve.HOURLY,r.MINUTELY=ve.MINUTELY,r.SECONDLY=ve.SECONDLY,r.MO=Dr.MO,r.TU=Dr.TU,r.WE=Dr.WE,r.TH=Dr.TH,r.FR=Dr.FR,r.SA=Dr.SA,r.SU=Dr.SU,r.parseString=Qa,r.optionsToString=Xa,r}();function Lb(r,e,t,n,s,a){var o={},l=r.accept;function c(T,S){t.forEach(function(b){b.between(T,S,!0).forEach(function(x){o[Number(x)]=!0})})}s.forEach(function(T){var S=new Es(T,a).rezonedDate();o[Number(S)]=!0}),r.accept=function(T){var S=Number(T);return isNaN(S)?l.call(this,T):!o[S]&&(c(new Date(S-1),new Date(S+1)),!o[S])?(o[S]=!0,l.call(this,T)):!0},r.method==="between"&&(c(r.args.after,r.args.before),r.accept=function(T){var S=Number(T);return o[S]?!0:(o[S]=!0,l.call(this,T))});for(var f=0;f1||s.length||a.length||o.length){var p=new Uh(f);return p.dtstart(l),p.tzid(c||void 0),n.forEach(function(T){p.rrule(new X(Yh(T,l,c),f))}),s.forEach(function(T){p.rdate(T)}),a.forEach(function(T){p.exrule(new X(Yh(T,l,c),f))}),o.forEach(function(T){p.exdate(T)}),e.compatible&&e.dtstart&&p.rdate(l),p}var g=n[0]||{};return new X(Yh(g,g.dtstart||e.dtstart||l,g.tzid||e.tzid||c),f)}function Pu(r,e){return e===void 0&&(e={}),NI(r,CI(e))}function Yh(r,e,t){return zt(zt({},r),{dtstart:e,tzid:t})}function CI(r){var e=[],t=Object.keys(r),n=Object.keys(Yb);if(t.forEach(function(s){De(n,s)||e.push(s)}),e.length)throw new Error("Invalid options: "+e.join(", "));return zt(zt({},Yb),r)}function II(r){if(r.indexOf(":")===-1)return{name:"RRULE",value:r};var e=jT(r,":",1),t=e[0],n=e[1];return{name:t,value:n}}function FI(r){var e=II(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 LI(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 YI(r){r.forEach(function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)})}function Ub(r,e){return YI(e),r.split(",").map(function(t){return se.untilStringToDate(t)})}function Wb(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,s){let a=1;for(s!==void 0&&(a=Number.parseInt(s.trim(),10));Rt.isSkippingTooManyYears(e,t,a);)t=Rt.fromOneDayEarlier(e,n);return t}static isSkippingTooManyYears(e,t,n){return t.year()-e.year()>n}static fromOneDayEarlier(e,t){e.subtract(1,"days").endOf("day");let n=t.origOptions;return n.dtstart=e.startOf("day").toDate(),t=new X(n),window.moment(t.after(e.toDate()))}static addTimezone(e){return window.moment.utc(e).local(!0).startOf("day")}};var Wh=5;function qh(r,e){let t=[r.startDateSymbol,r.scheduledDateSymbol,r.dueDateSymbol].join("|");return(n,s,a)=>{let o=[];return o=o.concat(WI(n,s,a,t,e)),o=o.concat(qI(n,s,a,r.recurrenceSymbol)),o=o.concat(UI(n,s,a,r)),o.length>0&&!o.some(l=>l.suggestionType==="match")&&o.unshift({suggestionType:"empty",displayText:"\u23CE",appendText:` `}),o=o.slice(0,a.autoSuggestMaxItems),o}}function UI(r,e,t,n){let s=c=>Object.values(n.prioritySymbols).some(f=>f.length>0&&c.includes(f)),a=[];if(r.includes(n.dueDateSymbol)||a.push({displayText:`${n.dueDateSymbol} due date`,appendText:`${n.dueDateSymbol} `}),r.includes(n.startDateSymbol)||a.push({displayText:`${n.startDateSymbol} start date`,appendText:`${n.startDateSymbol} `}),r.includes(n.scheduledDateSymbol)||a.push({displayText:`${n.scheduledDateSymbol} scheduled date`,appendText:`${n.scheduledDateSymbol} `}),s(r)||(a.push({displayText:`${n.prioritySymbols.High} high priority`,appendText:`${n.prioritySymbols.High} `}),a.push({displayText:`${n.prioritySymbols.Medium} medium priority`,appendText:`${n.prioritySymbols.Medium} `}),a.push({displayText:`${n.prioritySymbols.Low} low priority`,appendText:`${n.prioritySymbols.Low} `}),a.push({displayText:`${n.prioritySymbols.Highest} highest priority`,appendText:`${n.prioritySymbols.Highest} `}),a.push({displayText:`${n.prioritySymbols.Lowest} lowest priority`,appendText:`${n.prioritySymbols.Lowest} `})),r.includes(n.recurrenceSymbol)||a.push({displayText:`${n.recurrenceSymbol} recurring (repeat)`,appendText:`${n.recurrenceSymbol} `}),!r.includes(n.createdDateSymbol)){let f=ir.parseDate("today",!0).format(ie.dateFormat);a.push({textToMatch:`${n.createdDateSymbol} created`,displayText:`${n.createdDateSymbol} created today (${f})`,appendText:`${n.createdDateSymbol} ${f} `})}let o=jh(r,/([a-zA-Z'_-]*)/g,e),l=[];if(o&&o.length>0){let c=o[0];if(c.length>=Math.max(1,t.autoSuggestMinMatch)){let f=a.filter(p=>(p.textToMatch||p.displayText).toLowerCase().includes(c.toLowerCase()));for(let p of f)l.push({suggestionType:"match",displayText:p.displayText,appendText:p.appendText,insertAt:o.index,insertSkip:c.length})}}return l.length===0&&t.autoSuggestMinMatch===0?a:l}function WI(r,e,t,n,s){let a=["today","tomorrow","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","next week","next month","next year"],o=[],l=new RegExp(`(${n})\\s*([0-9a-zA-Z ]*)`,"ug"),c=jh(r,l,e);if(c&&c.length>=2){let f=c[1],p=c[2];if(p.length1?ir.parseDate(fi(p),!0):null;g&&g.isValid()&&o.push({displayText:`${g.format(ie.dateFormat)}`,appendText:`${f} ${g.format(ie.dateFormat)} `,insertAt:c.index,insertSkip:c[0].length});let T=1,S=a.filter(b=>p&&p.length>=T&&b.toLowerCase().includes(p.toLowerCase())).slice(0,s);S.length===0&&(S=a.slice(0,s));for(let b of S){let C=`${ir.parseDate(b,!0).format(ie.dateFormat)}`;o.push({suggestionType:"match",displayText:`${b} (${C})`,appendText:`${f} ${C} `,insertAt:c.index,insertSkip:c[0].length})}}return o}function qI(r,e,t,n){var c;let s=["every","every day","every week","every month","every month on the","every year","every week on Sunday","every week on Monday","every week on Tuesday","every week on Wednesday","every week on Thursday","every week on Friday","every week on Saturday"],a=[],o=new RegExp(`(${n})\\s*([0-9a-zA-Z ]*)`,"ug"),l=jh(r,o,e);if(l&&l.length>=2){let f=l[1],p=l[2];if(p.length0){let b=(c=Rt.fromText({recurrenceRuleText:p,startDate:null,scheduledDate:null,dueDate:null}))==null?void 0:c.toText();if(b){let x=`${f} ${b} `;if(a.push({suggestionType:"match",displayText:`\u2705 ${b}`,appendText:x,insertAt:l.index,insertSkip:l[0].length}),l[0]==x)return[]}}let g=1,T=t.autoSuggestMaxItems/2,S=s.filter(b=>p&&p.length>=g&&b.toLowerCase().includes(p.toLowerCase())).slice(0,T);S.length===0&&p.trim().length===0&&(S=s.slice(0,T));for(let b of S)a.push({suggestionType:"match",displayText:`${b}`,appendText:`${f} ${b} `,insertAt:l.index,insertSkip:l[0].length})}return a}function jh(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}var Ja=class{constructor(){this.hideTaskCount=!1;this.hideBacklinks=!1;this.hidePriority=!1;this.hideCreatedDate=!1;this.hideStartDate=!1;this.hideScheduledDate=!1;this.hideDoneDate=!1;this.hideDueDate=!1;this.hideRecurrenceRule=!1;this.hideEditButton=!1;this.hideUrgency=!0;this.shortMode=!1;this.explainQuery=!1}},Vn=class{constructor(e,t){this.defaultLayout=["description","priority","recurrenceRule","createdDate","startDate","scheduledDate","dueDate","doneDate","blockLink"];this.hiddenComponents=[];this.specificClasses=[];e?this.options=e:this.options=new Ja,t?this.layoutComponents=t:this.layoutComponents=this.defaultLayout,this.layoutComponents=this.applyOptions(this.options)}applyOptions(e){let t=(a,o,l)=>o?(this.specificClasses.push(`tasks-layout-hide-${l}`),this.hiddenComponents.push(l),a.filter(c=>c!=l)):a,n=(a,o)=>{a&&this.specificClasses.push(`tasks-layout-hide-${o}`)},s=this.layoutComponents;return s=t(s,e.hidePriority,"priority"),s=t(s,e.hideRecurrenceRule,"recurrenceRule"),s=t(s,e.hideCreatedDate,"createdDate"),s=t(s,e.hideStartDate,"startDate"),s=t(s,e.hideScheduledDate,"scheduledDate"),s=t(s,e.hideDueDate,"dueDate"),s=t(s,e.hideDoneDate,"doneDate"),n(e.hideUrgency,"urgency"),n(e.hideBacklinks,"backlinks"),n(e.hideEditButton,"edit-button"),e.shortMode&&this.specificClasses.push("tasks-layout-short-mode"),s}};var $h={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}},Ds=class{constructor(e){this.symbols=e}serialize(e){let t=new Vn,n="";for(let s of t.layoutComponents)n+=this.componentToString(e,t,s);return n}componentToString(e,t,n){var g;let{prioritySymbols:s,startDateSymbol:a,createdDateSymbol:o,scheduledDateSymbol:l,doneDateSymbol:c,recurrenceSymbol:f,dueDateSymbol:p}=this.symbols;switch(n){case"description":return e.description;case"priority":{let T="";return e.priority==="0"?T=" "+s.Highest:e.priority==="1"?T=" "+s.High:e.priority==="2"?T=" "+s.Medium:e.priority==="4"?T=" "+s.Low:e.priority==="5"&&(T=" "+s.Lowest),T}case"startDate":return e.startDate?t.options.shortMode?" "+a:` ${a} ${e.startDate.format(ie.dateFormat)}`:"";case"createdDate":return e.createdDate?t.options.shortMode?" "+o:` ${o} ${e.createdDate.format(ie.dateFormat)}`:"";case"scheduledDate":return!e.scheduledDate||e.scheduledDateIsInferred?"":t.options.shortMode?" "+l:` ${l} ${e.scheduledDate.format(ie.dateFormat)}`;case"doneDate":return e.doneDate?t.options.shortMode?" "+c:` ${c} ${e.doneDate.format(ie.dateFormat)}`:"";case"dueDate":return e.dueDate?t.options.shortMode?" "+p:` ${p} ${e.dueDate.format(ie.dateFormat)}`:"";case"recurrenceRule":return e.recurrence?t.options.shortMode?" "+f:` ${f} ${e.recurrence.toText()}`:"";case"blockLink":return(g=e.blockLink)!=null?g:"";default:throw new Error(`Don't know how to render task component of type '${n}'`)}}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",a=null,o=null,l=null,c=null,f=null,p="",g=null,T="",S=20,b=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 C=e.match(t.doneDateRegex);C!==null&&(c=window.moment(C[1],ie.dateFormat),e=e.replace(t.doneDateRegex,"").trim(),n=!0);let G=e.match(t.dueDateRegex);G!==null&&(l=window.moment(G[1],ie.dateFormat),e=e.replace(t.dueDateRegex,"").trim(),n=!0);let K=e.match(t.scheduledDateRegex);K!==null&&(o=window.moment(K[1],ie.dateFormat),e=e.replace(t.scheduledDateRegex,"").trim(),n=!0);let B=e.match(t.startDateRegex);B!==null&&(a=window.moment(B[1],ie.dateFormat),e=e.replace(t.startDateRegex,"").trim(),n=!0);let de=e.match(t.createdDateRegex);de!==null&&(f=window.moment(de[1],ie.dateFormat),e=e.replace(t.createdDateRegex,"").trim(),n=!0);let le=e.match(t.recurrenceRegex);le!==null&&(p=le[1].trim(),e=e.replace(t.recurrenceRegex,"").trim(),n=!0);let ye=e.match(ie.hashTagsFromEnd);if(ye!=null){e=e.replace(ie.hashTagsFromEnd,"").trim(),n=!0;let te=ye[0].trim();T=T.length>0?[te,T].join(" "):te}b++}while(n&&b<=S);return p.length>0&&(g=Rt.fromText({recurrenceRuleText:p,startDate:a,scheduledDate:o,dueDate:l})),T.length>0&&(e+=" "+T),{description:e,priority:s,startDate:a,createdDate:f,scheduledDate:o,dueDate:l,doneDate:c,recurrence:g,tags:Ge.extractHashtags(e)}}};function Ss(r){let e=["(?:",/(?=[^\]]+\])\[/,"|",/(?=[^)]+\))\(/,")",/ */,r,/ */,/[)\]]/,/(?: *,)?/,/$/].map(t=>t instanceof RegExp?t.source:t).join("");return new RegExp(e,r.flags)}var Gh={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:Ss(/priority:: *(highest|high|medium|low|lowest)/),startDateRegex:Ss(/start:: *(\d{4}-\d{2}-\d{2})/),createdDateRegex:Ss(/created:: *(\d{4}-\d{2}-\d{2})/),scheduledDateRegex:Ss(/scheduled:: *(\d{4}-\d{2}-\d{2})/),dueDateRegex:Ss(/due:: *(\d{4}-\d{2}-\d{2})/),doneDateRegex:Ss(/completion:: *(\d{4}-\d{2}-\d{2})/),recurrenceRegex:Ss(/repeat:: *([a-zA-Z0-9, !]+)/)}},Nu=class extends Ds{constructor(){super(Gh)}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 Sr=(o=>(o.TODO="TODO",o.DONE="DONE",o.IN_PROGRESS="IN_PROGRESS",o.CANCELLED="CANCELLED",o.NON_TASK="NON_TASK",o.EMPTY="EMPTY",o))(Sr||{}),xt=class{constructor(e,t,n,s,a="TODO"){this.symbol=e,this.name=t,this.nextStatusSymbol=n,this.availableAsCommand=s,this.type=a}};var Xt=class{get symbol(){return this.configuration.symbol}get name(){return this.configuration.name}get nextStatusSymbol(){return this.configuration.nextStatusSymbol}get availableAsCommand(){return this.configuration.availableAsCommand}get type(){return this.configuration.type}constructor(e){this.configuration=e}static makeDone(){return new Xt(new xt("x","Done"," ",!0,"DONE"))}static makeEmpty(){return new Xt(new xt("","EMPTY","",!0,"EMPTY"))}static makeTodo(){return new Xt(new xt(" ","Todo","x",!0,"TODO"))}static makeCancelled(){return new Xt(new xt("-","Cancelled"," ",!0,"CANCELLED"))}static makeInProgress(){return new Xt(new xt("/","In Progress","x",!0,"IN_PROGRESS"))}static getTypeForUnknownSymbol(e){switch(e){case"x":case"X":return"DONE";case"/":return"IN_PROGRESS";case"-":return"CANCELLED";case"":return"EMPTY";case" ":default:return"TODO"}}static getTypeFromStatusTypeString(e){return Sr[e]||"TODO"}static createUnknownStatus(e){return new Xt(new xt(e,"Unknown","x",!1,"TODO"))}static createFromImportedValue(e){let t=e[0],n=Xt.getTypeFromStatusTypeString(e[3]);return new Xt(new xt(t,e[1],e[2],!1,n))}isCompleted(){return this.type==="DONE"}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}},me=Xt;me.DONE=Xt.makeDone(),me.EMPTY=Xt.makeEmpty(),me.TODO=Xt.makeTodo();var Cu=class{constructor(e=!1,t=!1){this.ignoreSortInstructions=e,this.showTaskHiddenData=t}};var Tt=class{constructor(){this.coreStatuses=[me.makeTodo().configuration,me.makeDone().configuration],this.customStatuses=[me.makeInProgress().configuration,me.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 me(e);return t.findIndex(s=>new me(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){Tt.deleteAllCustomStatuses(e),new Tt().customStatuses.forEach(n=>{Tt.addStatus(e.customStatuses,n)})}static bulkAddStatusCollection(e,t){let n=[];return t.forEach(s=>{e.customStatuses.find(o=>o.symbol==s[0]&&o.name==s[1]&&o.nextStatusSymbol==s[2])?n.push(`The status ${s[1]} (${s[0]}) is already added.`):Tt.addStatus(e.customStatuses,me.createFromImportedValue(s))}),n}static applyToStatusRegistry(e,t){t.clearStatuses(),e.coreStatuses.forEach(n=>{t.add(n)}),e.customStatuses.forEach(n=>{t.add(n)})}};var Gb=[{index:9999,internalName:"INTERNAL_TESTING_ENABLED_BY_DEFAULT",displayName:"Test Item. Used to validate the Feature Framework.",description:"Description",enabledByDefault:!0,stable:!1}];var Kr=class{constructor(e,t,n,s,a,o){this.internalName=e;this.index=t;this.description=n;this.displayName=s;this.enabledByDefault=a;this.stable=o}static get values(){let e=[];return Gb.forEach(t=>{e=[...e,new Kr(t.internalName,t.index,t.description,t.displayName,t.enabledByDefault,t.stable)]}),e}static get settingsFlags(){let e={};return Kr.values.forEach(t=>{e[t.internalName]=t.enabledByDefault}),e}static fromString(e){for(let t of Kr.values)if(e===t.internalName)return t;throw new RangeError(`Illegal argument passed to fromString(): ${e} does not correspond to any available Feature ${this.prototype.constructor.name}`)}};function Iu(r){return r.replace(/([.*+?^${}()|[\]/\\])/g,"\\$1")}var Or=class{static get(){let{globalFilter:e}=ue();return e}static set(e){ht({globalFilter:e})}static reset(){ht({globalFilter:Or.empty})}static isEmpty(){return Or.get()===Or.empty}static equals(e){return Or.get()===e}static includedIn(e){let t=Or.get();return e.includes(t)}static prependTo(e){return Or.get()+" "+e}static removeAsWordFrom(e){if(Or.isEmpty())return e;let t=RegExp("(^|\\s)"+Iu(Or.get())+"($|\\s)","ug");return e.search(t)>-1&&(e=e.replace(t,"$1$2").replace(" "," ").trim()),e}static removeAsSubstringFrom(e){let t=Or.get();return e.replace(t,"").trim()}static removeAsSubstringFromDependingOnSettings(e){let{removeGlobalFilter:t}=ue();return t?Or.removeAsSubstringFrom(e):e}},Le=Or;Le.empty="";var bn={tasksPluginEmoji:{displayName:"Tasks Emoji Format",taskSerializer:new Ds($h),buildSuggestions:qh($h,Wh)},dataview:{displayName:"Dataview",taskSerializer:new Nu,buildSuggestions:qh(Gh,Wh)}},$I={globalQuery:"",globalFilter:Le.empty,removeGlobalFilter:!1,taskFormat:"tasksPluginEmoji",setCreatedDate:!1,setDoneDate:!0,autoSuggestInEditor:!0,autoSuggestMinMatch:0,autoSuggestMaxItems:6,provideAccessKeys:!0,useFilenameAsScheduledDate:!1,filenameAsDateFolders:[],recurrenceOnNextLine:!1,statusSettings:new Tt,features:Kr.settingsFlags,generalSettings:{},headingOpened:{},debugSettings:new Cu},Kn=Pe({},$I),ue=()=>{for(let r in Kr.settingsFlags)Kn.features[r]===void 0&&(Kn.features[r]=Kr.settingsFlags[r]);return Kn.statusSettings.customStatuses.forEach((r,e,t)=>{var s,a;let n=me.getTypeFromStatusTypeString(r.type);t[e]=new xt((s=r.symbol)!=null?s:" ",r.name,(a=r.nextStatusSymbol)!=null?a:"x",r.availableAsCommand,n)}),Pe({},Kn)},ht=r=>(Kn=Pe(Pe({},Kn),r),ue());var Os=(r,e)=>(Kn.generalSettings[r]=e,ue()),Bb=r=>{var e;return(e=Kn.features[r])!=null?e:!1};function to(){return bn[ue().taskFormat]}function Hh(){return{source:ue().globalQuery}}var He=class{constructor(){this._registeredStatuses=[];this.addDefaultStatusTypes()}get registeredStatuses(){return this._registeredStatuses.filter(({symbol:e})=>e!==me.EMPTY.symbol)}static getInstance(){return He.instance||(He.instance=new He),He.instance}add(e){this.hasSymbol(e.symbol)||(e instanceof me?this._registeredStatuses.push(e):this._registeredStatuses.push(new me(e)))}bySymbol(e){return this.hasSymbol(e)?this.getSymbol(e):me.EMPTY}bySymbolOrCreate(e){return this.hasSymbol(e)?this.getSymbol(e):me.createUnknownStatus(e)}byName(e){return this._registeredStatuses.filter(({name:t})=>t===e).length>0?this._registeredStatuses.filter(({name:t})=>t===e)[0]:me.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 me.EMPTY}getNextStatusOrCreate(e){let t=this.getNextStatus(e);return t.type!=="EMPTY"?t:me.createUnknownStatus(e.nextStatusSymbol)}findUnknownStatuses(e){let t=e.filter(a=>!this.hasSymbol(a.symbol)),n=new He,s=[];return t.forEach(a=>{if(n.hasSymbol(a.symbol))return;let o=He.copyStatusWithNewName(a,`Unknown (${a.symbol})`);s.push(o),n.add(o)}),s}static copyStatusWithNewName(e,t){let n=new xt(e.symbol,t,e.nextStatusSymbol,e.availableAsCommand,e.type);return new me(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(){[me.makeTodo(),me.makeInProgress(),me.makeDone(),me.makeCancelled()].forEach(t=>{this.add(t)})}};var Lr=class{static calculate(e){let t=0;if(e.dueDate!==null){let n=Math.round(window.moment().diff(e.dueDate)/Lr.milliSecondsPerDay),s;n>=7?s=1:n>=-14?s=(n+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}},vn=Lr;vn.dueCoefficient=12,vn.scheduledCoefficient=5,vn.startedCoefficient=-3,vn.priorityCoefficient=6,vn.milliSecondsPerDay=1e3*60*60*24;var nv=require("obsidian");var so=require("obsidian");var Zb=Ln(Eu()),GI=require("obsidian"),Qb=Ln(Kb());var Bh=class extends Qb.EventEmitter2{constructor(){super(...arguments);this.options={minLevels:{"":"info",tasks:"info"}};this.consoleLoggerRegistered=!1;this.arrAvg=t=>t.reduce((n,s)=>n+s,0)/t.length}configure(t){return this.options=Object.assign({},this.options,t),this}getLogger(t){let n="none",s="";for(let a in this.options.minLevels)t.startsWith(a)&&a.length>=s.length&&(n=this.options.minLevels[a],s=a);return new zh(this,t,n)}onLogEntry(t){return this.on("log",t),this}registerConsoleLogger(){return this.consoleLoggerRegistered?this:(this.onLogEntry(t=>{let n=`[${(0,Zb.default)().format("YYYY-MM-DD-HH:mm:ss.SSS")}][${t.level}][${t.module}]`;switch(t.traceId&&(n+=`[${t.traceId}]`),n+=` ${t.message}`,t.objects===void 0&&(t.objects=""),t.level){case"trace":console.trace(n,t.objects);break;case"debug":console.debug(n,t.objects);break;case"info":console.info(n,t.objects);break;case"warn":console.warn(n,t.objects);break;case"error":console.error(n,t.objects);break;default:console.log(`{${t.level}} ${n}`,t.objects)}}),this.consoleLoggerRegistered=!0,this)}},Fu=new Bh,zh=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){ro=r,Vh=e,Kh=t},Uu=t=>Q(void 0,[t],function*({originalTask:r,newTasks:e}){if(Vh===void 0||ro===void 0||Kh===void 0){Lu("Tasks: cannot use File before initializing it.");return}Array.isArray(e)||(e=[e]),no.debug(`replaceTaskWithTasks entered. ${r.path}`),ev({originalTask:r,newTasks:e,vault:Vh,metadataCache:ro,workspace:Kh,previousTries:0})});function Lu(r){console.error(r),new so.Notice(r,15e3)}function Jb(r){console.warn(r),new so.Notice(r,1e4)}function BI(r){no.debug(r)}var Zn=class extends Error{},Yu=class extends Error{},ev=o=>Q(void 0,[o],function*({originalTask:r,newTasks:e,vault:t,metadataCache:n,workspace:s,previousTries:a}){no.debug(`tryRepetitive after ${a} previous tries`);let l=()=>{if(a>10){let f=`Tasks: Could not find the correct task line to update. The task line not updated is: ${r.originalMarkdown} In this markdown file: "${r.taskLocation.path}" Note: further clicks on this checkbox will usually now be ignored until the file is opened (or certain, specific edits are made - it's complicated). Recommendations: 1. Close all panes that have the above file open, and then re-open the file. 2. Check for exactly identical copies of the task line, in this file, and see if you can make them different. `;Lu(f);return}let c=Math.min(Math.pow(10,a),100);no.debug(`timeout = ${c}`),setTimeout(()=>{ev({originalTask:r,newTasks:e,vault:t,metadataCache:n,workspace:s,previousTries:a+1})},c)};try{let[c,f,p]=yield tv(r,t),g=[...p.slice(0,c),...e.map(T=>T.toFileLineString()),...p.slice(c+1)];yield t.modify(f,g.join(` `))}catch(c){if(c instanceof Zn)return c.message&&Jb(c.message),l();if(c instanceof Yu)return l();c instanceof Error&&Lu(c.message)}});function tv(r,e){return Q(this,null,function*(){if(ro===void 0)throw new Zn;let t=e.getAbstractFileByPath(r.path);if(!(t instanceof so.TFile))throw new Zn(`Tasks: No file found for task ${r.description}. Retrying ...`);if(!HI.includes(t.extension))throw new Error(`Tasks: Does not support files with the ${t.extension} file extension.`);let n=ro.getFileCache(t);if(n==null||n===null)throw new Zn(`Tasks: No file cache found for file ${t.path}. Retrying ...`);let s=n.listItems;if(s===void 0||s.length===0)throw new Zn(`Tasks: No list items found in file cache of ${t.path}. Retrying ...`);let o=(yield e.read(t)).split(` `),l=zI(r,o,s,BI);if(l===void 0)throw new Yu;return[l,t,o]})}function Zh(r,e){return Q(this,null,function*(){try{let[t,n,s]=yield tv(r,e);return[t,n]}catch(t){t instanceof Zn?t.message&&Jb(t.message):t instanceof Error&&Lu(t.message)}})}function rv(r,e){return r{c.preventDefault(),c.stopPropagation(),o.disabled=!0;let f=r.toggleWithRecurrenceInUsersOrder();Uu({originalTask:r,newTasks:f})}),n.prepend(o),n.setAttribute("data-task",r.status.symbol.trim()),n.setAttribute("data-line",e.listIndex.toString()),n.setAttribute("data-task-status-name",r.status.name),n.setAttribute("data-task-status-type",r.status.type),o.setAttribute("data-line",e.listIndex.toString()),(l=e.layoutOptions)!=null&&l.shortMode&&iF({task:r,element:s,isFilenameUnique:e.isFilenameUnique}),n})}function eF(r,e,t,n){return Q(this,null,function*(){let s={},a=new Vn(e.layoutOptions),o=bn.tasksPluginEmoji.taskSerializer;for(let l of a.layoutComponents){let c=o.componentToString(r,a,l);if(c){l==="description"&&(c=Le.removeAsSubstringFromDependingOnSettings(c));let f=document.createElement("span");if(t.appendChild(f),f){let p=document.createElement("span");f.appendChild(p),yield tF(p,c,l,r,n,e.obsidianComponent);let[g,T]=Qh(l,r);rF(l,p),f.classList.add(...g);for(let S in T)f.dataset[S]=T[S];s=Pe(Pe({},s),T)}}}for(let l of a.hiddenComponents){let[c,f]=Qh(l,r);s=Pe(Pe({},s),f)}if(s.taskPriority===void 0){let[l,c]=Qh("priority",r);s=Pe(Pe({},s),c)}return s})}function tF(r,e,t,n,s,a){return Q(this,null,function*(){if(t==="description"){let{debugSettings:o}=ue();o.showTaskHiddenData&&(e+=`
\u{1F41B} ${n.lineNumber} . ${n.sectionStart} . ${n.sectionIndex} . '${n.originalMarkdown}'
'${n.path}' > '${n.precedingHeader}'
`),yield s(e,r,n.path,a);let l=r.querySelector("blockquote"),c=l!=null?l:r,f=c.querySelector("p");if(f!==null){for(;f.firstChild;)c.insertBefore(f.firstChild,f);f.remove()}r.querySelectorAll("p").forEach(p=>{p.hasChildNodes()||p.remove()}),r.querySelectorAll(".footnotes").forEach(p=>{p.remove()})}else r.innerHTML=e})}function Qh(r,e){let t=[],n={},s=(a,o)=>{let l=nF(a);l&&(n[o]=l)};switch(r){case"description":t.push(Qn.description);break;case"priority":{let a=null;e.priority==="0"?a="highest":e.priority==="1"?a="high":e.priority==="2"?a="medium":e.priority==="4"?a="low":e.priority==="5"?a="lowest":a="normal",n.taskPriority=a,t.push(Qn.priority);break}case"createdDate":{let a=e.createdDate;a&&(t.push(Qn.createdDate),s(a,"taskCreated"));break}case"dueDate":{let a=e.dueDate;a&&(t.push(Qn.dueDate),s(a,"taskDue"));break}case"startDate":{let a=e.startDate;a&&(t.push(Qn.startDate),s(a,"taskStart"));break}case"scheduledDate":{let a=e.scheduledDate;a&&(t.push(Qn.scheduledDate),s(a,"taskScheduled"));break}case"doneDate":{let a=e.doneDate;a&&(t.push(Qn.doneDate),s(a,"taskDone"));break}case"recurrenceRule":{t.push(Qn.recurrenceRule);break}}return[t,n]}function rF(r,e){if(r==="description"){let t=e.getElementsByClassName("tag");for(let n=0;n0?t+="past-":n<0&&(t+="future-"),Math.abs(n)<=QI?t+=Math.abs(n).toString()+"d":t+=XI,t)}function sF(r){let e=/["&\x00\r\n]/g,t=r.replace(e,"-");return t=t.replace(/^[-_]+/,""),t.length>0?t:null}function iF({task:r,element:e,isFilenameUnique:t}){let{recurrenceSymbol:n,startDateSymbol:s,createdDateSymbol:a,scheduledDateSymbol:o,dueDateSymbol:l,doneDateSymbol:c}=bn.tasksPluginEmoji.taskSerializer.symbols;e.addEventListener("mouseenter",()=>{let f=e.createDiv();f.addClasses(["tooltip","pop-up"]),r.recurrence&&f.createDiv().setText(`${n} ${r.recurrence.toText()}`),r.createdDate&&f.createDiv().setText(io({signifier:a,date:r.createdDate})),r.startDate&&f.createDiv().setText(io({signifier:s,date:r.startDate})),r.scheduledDate&&f.createDiv().setText(io({signifier:o,date:r.scheduledDate})),r.dueDate&&f.createDiv().setText(io({signifier:l,date:r.dueDate})),r.doneDate&&f.createDiv().setText(io({signifier:c,date:r.doneDate}));let p=r.getLinkText({isFilenameUnique:t});p&&f.createDiv().setText(`\u{1F517} ${p}`),e.addEventListener("mouseleave",()=>{f.remove()})})}function io({signifier:r,date:e}){return`${r} ${e.format(ie.dateFormat)} (${e.from(window.moment().startOf("day"))})`}var Jt=class{static fromPath(e){let{useFilenameAsScheduledDate:t,filenameAsDateFolders:n}=ue();return!t||!this.matchesAnyFolder(n,e)?null:this.extractDateFromPath(e)}static matchesAnyFolder(e,t){return e.length===0?!0:e.some(n=>t.startsWith(n+"/"))}static extractDateFromPath(e){let t=Math.max(0,e.lastIndexOf("/")+1),n=e.lastIndexOf("."),s=e.substring(t,n),a=/(\d{4})-(\d{2})-(\d{2})/.exec(s);if(a||(a=/(\d{4})(\d{2})(\d{2})/.exec(s)),a){let o=window.moment([parseInt(a[1]),parseInt(a[2])-1,parseInt(a[3])]);if(o.isValid())return o}return null}static canApplyFallback({startDate:e,scheduledDate:t,dueDate:n}){return e===null&&n===null&&t===null}static updateTaskPath(e,t,n){let s=e.scheduledDate,a=e.scheduledDateIsInferred;return n===null?a&&(a=!1,s=null):a?s=n:this.canApplyFallback(e)&&(s=n,a=!0),new Ge(tr(Pe({},e),{taskLocation:e.taskLocation.fromRenamedFile(t),scheduledDate:s,scheduledDateIsInferred:a}))}static removeInferredStatusIfNeeded(e,t){let n=e.scheduledDateIsInferred?e.scheduledDate:null;return t.map(s=>(n!==null&&!n.isSame(s.scheduledDate,"day")&&(s=new Ge(tr(Pe({},s),{scheduledDateIsInferred:!1}))),s))}};var ur=class{},ie=ur;ie.dateFormat="YYYY-MM-DD",ie.indentationRegex=/^([\s\t>]*)/,ie.listMarkerRegex=/([-*]|[0-9]+\.)/,ie.checkboxRegex=/\[(.)\]/u,ie.afterCheckboxRegex=/ *(.*)/u,ie.taskRegex=new RegExp(ur.indentationRegex.source+ur.listMarkerRegex.source+" +"+ur.checkboxRegex.source+ur.afterCheckboxRegex.source,"u"),ie.nonTaskRegex=new RegExp(ur.indentationRegex.source+ur.listMarkerRegex.source+"? *("+ur.checkboxRegex.source+")?"+ur.afterCheckboxRegex.source,"u"),ie.listItemRegex=new RegExp(ur.indentationRegex.source+ur.listMarkerRegex.source),ie.blockLinkRegex=/ \^[a-zA-Z0-9-]+$/u,ie.hashTags=/(^|\s)#[^ !@#$%^&*(),.?":{}|<>]*/g,ie.hashTagsFromEnd=new RegExp(ur.hashTags.source+"$");var Ge=class{constructor({status:e,description:t,taskLocation:n,indentation:s,listMarker:a,priority:o,createdDate:l,startDate:c,scheduledDate:f,dueDate:p,doneDate:g,recurrence:T,blockLink:S,tags:b,originalMarkdown:x,scheduledDateIsInferred:C}){this._urgency=null;this.status=e,this.description=t,this.indentation=s,this.listMarker=a,this.taskLocation=n,this.tags=b,this.priority=o,this.createdDate=l,this.startDate=c,this.scheduledDate=f,this.dueDate=p,this.doneDate=g,this.recurrence=T,this.blockLink=S,this.originalMarkdown=x,this.scheduledDateIsInferred=C}static fromLine({line:e,taskLocation:t,fallbackDate:n}){let s=e.match(ie.taskRegex);if(s===null)return null;let a=s[4].trim();if(!Le.includedIn(a))return null;let o=a,l=s[1],c=s[2],f=s[3],p=He.getInstance().bySymbolOrCreate(f),g=o.match(ie.blockLinkRegex),T=g!==null?g[0]:"";T!==""&&(o=o.replace(ie.blockLinkRegex,"").trim());let{taskSerializer:S}=to(),b=S.deserialize(o),x=!1;return Jt.canApplyFallback(b)&&n!==null&&(b.scheduledDate=n,x=!0),b.tags=b.tags.map(C=>C.trim()),b.tags=b.tags.filter(C=>!Le.equals(C)),new Ge(tr(Pe({},b),{status:p,indentation:l,listMarker:c,taskLocation:t,blockLink:T,originalMarkdown:e,scheduledDateIsInferred:x}))}toLi(e){return Q(this,null,function*(){return sv(this,e)})}toString(){return to().taskSerializer.serialize(this)}toFileLineString(){return`${this.indentation}${this.listMarker} [${this.status.symbol}] ${this.toString()}`}toggle(){let e=He.getInstance().getNextStatusOrCreate(this.status),t=null,n=null;if(e.isCompleted()){let{setDoneDate:o}=ue();o&&(t=window.moment()),this.recurrence!==null&&(n=this.recurrence.next())}let s=new Ge(tr(Pe({},this),{status:e,doneDate:t})),a=[];if(n!==null){let{setCreatedDate:o}=ue(),l=null;o&&(l=window.moment());let c=He.getInstance().getNextStatusOrCreate(e),f=new Ge(tr(Pe(Pe({},this),n),{status:c,blockLink:"",createdDate:l}));a.push(f)}return a.push(s),a}toggleWithRecurrenceInUsersOrder(){let e=this.toggle(),{recurrenceOnNextLine:t}=ue();return t?e.reverse():e}get urgency(){return this._urgency===null&&(this._urgency=vn.calculate(this)),this._urgency}get path(){return this.taskLocation.path}get filename(){let e=this.path.match(/([^/]+)\.md$/);return e!==null?e[1]:null}get lineNumber(){return this.taskLocation.lineNumber}get sectionStart(){return this.taskLocation.sectionStart}get sectionIndex(){return this.taskLocation.sectionIndex}get precedingHeader(){return this.taskLocation.precedingHeader}getLinkText({isFilenameUnique:e}){let t;return e?t=this.filename:t="/"+this.path,t===null?null:(this.precedingHeader!==null&&this.precedingHeader!==t&&(t=t+" > "+this.precedingHeader),t)}static tasksListsIdentical(e,t){return e.length!==t.length?!1:e.every((n,s)=>n.identicalTo(t[s]))}identicalTo(e){let t=["status","description","path","indentation","listMarker","lineNumber","sectionStart","sectionIndex","precedingHeader","priority","blockLink","scheduledDateIsInferred"];for(let a of t)if(this[a]!==e[a])return!1;if(this.tags.length!==e.tags.length||!this.tags.every(function(a,o){return a===e.tags[o]}))return!1;t=["createdDate","startDate","scheduledDate","dueDate","doneDate"];for(let a of t){let o=this[a],l=e[a];if(Vr(o,l)!==0)return!1}let n=this.recurrence,s=e.recurrence;return n===null&&s!==null||n!==null&&s===null?!1:!(n&&s&&!n.identicalTo(s))}static extractHashtags(e){var t,n;return(n=(t=e.match(ie.hashTags))==null?void 0:t.map(s=>s.trim()))!=null?n:[]}};var ao=class{constructor(e){this.fetch=e;this._value=void 0}get value(){return this._value===void 0&&(this._value=this.fetch()),this._value}};var Lt=class{constructor(e,t,n,s,a){this._path=e,this._lineNumber=t,this._sectionStart=n,this._sectionIndex=s,this._precedingHeader=a}static fromUnknownPosition(e){return new Lt(e,0,0,0,null)}fromRenamedFile(e){return new Lt(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 Ms=class{constructor({metadataCache:e,vault:t,events:n}){this.metadataCache=e,this.metadataCacheEventReferences=[],this.vault=t,this.vaultEventReferences=[],this.events=n,this.eventsEventReferences=[],this.tasksMutex=new Po,this.state="Cold",this.tasks=[],this.loadedAfterFirstResolve=!1,this.subscribeToCache(),this.subscribeToVault(),this.subscribeToEvents(),this.loadVault()}unload(){for(let e of this.metadataCacheEventReferences)this.metadataCache.offref(e);for(let e of this.vaultEventReferences)this.vault.offref(e);for(let e of this.eventsEventReferences)this.events.off(e)}getTasks(){return this.tasks}getState(){return this.state}notifySubscribers(){this.events.triggerCacheUpdate({tasks:this.tasks,state:this.state})}subscribeToCache(){let e=this.metadataCache.on("resolved",()=>Q(this,null,function*(){this.loadedAfterFirstResolve||(this.loadedAfterFirstResolve=!0,this.loadVault())}));this.metadataCacheEventReferences.push(e);let t=this.metadataCache.on("changed",n=>{this.tasksMutex.runExclusive(()=>{this.indexFile(n)})});this.metadataCacheEventReferences.push(t)}subscribeToVault(){let{useFilenameAsScheduledDate:e}=ue(),t=this.vault.on("create",a=>{a instanceof gi.TFile&&this.tasksMutex.runExclusive(()=>{this.indexFile(a)})});this.vaultEventReferences.push(t);let n=this.vault.on("delete",a=>{a instanceof gi.TFile&&this.tasksMutex.runExclusive(()=>{this.tasks=this.tasks.filter(o=>o.path!==a.path),this.notifySubscribers()})});this.vaultEventReferences.push(n);let s=this.vault.on("rename",(a,o)=>{a instanceof gi.TFile&&this.tasksMutex.runExclusive(()=>{let l=new ao(()=>Jt.fromPath(a.path));this.tasks=this.tasks.map(c=>c.path===o?e?Jt.updateTaskPath(c,a.path,l.value):new Ge(tr(Pe({},c),{taskLocation:c.taskLocation.fromRenamedFile(a.path)})):c),this.notifySubscribers()})});this.vaultEventReferences.push(s)}subscribeToEvents(){let e=this.events.onRequestCacheUpdate(t=>{t({tasks:this.tasks,state:this.state})});this.eventsEventReferences.push(e)}loadVault(){return this.tasksMutex.runExclusive(()=>Q(this,null,function*(){this.state="Initializing",yield Promise.all(this.vault.getMarkdownFiles().map(e=>this.indexFile(e))),this.state="Warm",this.notifySubscribers()}))}indexFile(e){return Q(this,null,function*(){let t=this.metadataCache.getFileCache(e);if(t==null)return;let n=this.tasks.filter(o=>o.path===e.path),s=t.listItems,a=[];if(s!==void 0){let o=yield this.vault.cachedRead(e);a=this.getTasksFromFileContent(o,s,t,e)}Ge.tasksListsIdentical(n,a)||(this.getState()=="Warm"&&console.debug(`At least one task, its line number or its heading has changed in ${e.path}: triggering a refresh of all active Tasks blocks in Live Preview and Reading mode views.`),this.tasks=this.tasks.filter(o=>o.path!==e.path),this.tasks.push(...a),this.notifySubscribers())})}getTasksFromFileContent(e,t,n,s){let a=[],o=e.split(` `),l=o.length,c=new ao(()=>Jt.fromPath(s.path)),f=null,p=0;for(let g of t)if(g.task!==void 0){let T=g.position.start.line;if(T>=l)return console.log(`${s.path} Obsidian gave us a line number ${T} past the end of the file. ${l}.`),a;if((f===null||f.position.end.line=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 up=require("obsidian");var kv=require("obsidian");function wn(){}function ep(r){return r()}function av(){return Object.create(null)}function xs(r){r.forEach(ep)}function Wu(r){return typeof r=="function"}function uv(r,e){return r!=r?e==e:r!==e||r&&typeof r=="object"||typeof r=="function"}function lv(r){return Object.keys(r).length===0}var cv=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global,uo=class{constructor(e){this.options=e,this._listeners="WeakMap"in cv?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)uo.entries.set(s.target,s),(n=this._listeners.get(s.target))===null||n===void 0||n(s)})}};uo.entries="WeakMap"in cv?new WeakMap:void 0;var dv=!1;function aF(){dv=!0}function oF(){dv=!1}function L(r,e){r.appendChild(e)}function vi(r,e,t){r.insertBefore(e,t||null)}function As(r){r.parentNode&&r.parentNode.removeChild(r)}function tp(r,e){for(let t=0;tr.removeEventListener(e,t,n)}function fv(r){return function(e){return e.preventDefault(),r.call(this,e)}}function H(r,e,t){t==null?r.removeAttribute(e):r.getAttribute(e)!==t&&r.setAttribute(e,t)}function hv(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 lF(r){return Array.from(r.childNodes)}function rp(r,e){e=""+e,r.data!==e&&(r.data=e)}function Yr(r,e){r.value=e==null?"":e}function np(r,e,t){for(let n=0;nr.indexOf(n)===-1?e.push(n):t.push(n)),t.forEach(n=>n()),bi=e}var mF=new Set;function yF(r,e){r&&r.i&&(mF.delete(r),r.i(e))}var gF=["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"],Uj=new Set([...gF]);function _F(r,e,t,n){let{fragment:s,after_update:a}=r.$$;s&&s.m(e,t),n||co(()=>{let o=r.$$.on_mount.map(ep).filter(Wu);r.$$.on_destroy?r.$$.on_destroy.push(...o):xs(o),r.$$.on_mount=[]}),a.forEach(co)}function yv(r,e){let t=r.$$;t.fragment!==null&&(pF(t.after_update),xs(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function TF(r,e){r.$$.dirty[0]===-1&&(Ti.push(r),fF(),r.$$.dirty.fill(0)),r.$$.dirty[e/31|0]|=1<{let b=S.length?S[0]:T;return f.ctx&&s(f.ctx[g],f.ctx[g]=b)&&(!f.skip_bound&&f.bound[g]&&f.bound[g](b),p&&TF(r,g)),T}):[],f.update(),p=!0,xs(f.before_update),f.fragment=n?n(f.ctx):!1,e.target){if(e.hydrate){aF();let g=lF(e.target);f.fragment&&f.fragment.l(g),g.forEach(As)}else f.fragment&&f.fragment.c();e.intro&&yF(r.$$.fragment),_F(r,e.target,e.anchor,e.customElement),oF(),mv()}oo(c)}var bF;typeof HTMLElement=="function"&&(bF=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){let{on_mount:r}=this.$$;this.$$.on_disconnect=r.map(ep).filter(Wu);for(let e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(r,e,t){this[r]=t}disconnectedCallback(){xs(this.$$.on_disconnect)}$destroy(){yv(this,1),this.$destroy=wn}$on(r,e){if(!Wu(e))return wn;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&&!lv(r)&&(this.$$.skip_bound=!0,this.$$set(r),this.$$.skip_bound=!1)}});var ju=class{$destroy(){yv(this,1),this.$destroy=wn}$on(e,t){if(!Wu(t))return wn;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&&!lv(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}};var ap=Ln(_t());function _v(r,e,t){let n=r.slice();return n[45]=e[t],n}function Tv(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 vF(r){let e,t=r[50]+"",n;return{c(){e=ae("span"),n=qt(t)},m(s,a){vi(s,e,a),L(e,n)},p:wn,d(s){s&&As(e)}}}function bv(r){let e,t,n,s,a,o,l,c,f=r[49].substring(0,r[52])+"",p,g,T=r[49].substring(r[52],r[52]+1)+"",S,b,x=r[49].substring(r[52]+1)+"",C,G,K=r[50]&&r[50].charCodeAt(0)>=256,B,de,le,ye,te,J=K&&vF(r);return le=hv(r[33][0]),{c(){e=ae("span"),t=ae("input"),o=Se(),l=ae("label"),c=ae("span"),p=qt(f),g=ae("span"),S=qt(T),b=ae("span"),C=qt(x),G=Se(),J&&J.c(),de=Se(),H(t,"type","radio"),H(t,"id",n="priority-"+r[48]),t.__value=s=r[48],t.value=t.__value,H(t,"accesskey",a=r[15](r[51])),H(g,"class","accesskey"),H(l,"for",B="priority-"+r[48]),le.p(t)},m(Ze,tt){vi(Ze,e,tt),L(e,t),t.checked=t.__value===r[1].priority,L(e,o),L(e,l),L(l,c),L(c,p),L(l,g),L(g,S),L(l,b),L(b,C),L(l,G),J&&J.m(l,null),L(e,de),ye||(te=Vt(t,"change",r[32]),ye=!0)},p(Ze,tt){tt[0]&32768&&a!==(a=Ze[15](Ze[51]))&&H(t,"accesskey",a),tt[0]&3&&(t.checked=t.__value===Ze[1].priority),K&&J.p(Ze,tt)},d(Ze){Ze&&As(e),J&&J.d(),le.r(),ye=!1,te()}}}function vv(r){let e,t=r[45].name+"",n,s,a=r[45].symbol+"",o,l,c;return{c(){e=ae("option"),n=qt(t),s=qt(" ["),o=qt(a),l=qt("]"),e.__value=c=r[45],e.value=e.__value},m(f,p){vi(f,e,p),L(e,n),L(e,s),L(e,o),L(e,l)},p(f,p){p[0]&1&&t!==(t=f[45].name+"")&&rp(n,t),p[0]&1&&a!==(a=f[45].symbol+"")&&rp(o,a),p[0]&1&&c!==(c=f[45])&&(e.__value=c,e.value=e.__value)},d(f){f&&As(e)}}}function wF(r){let e,t,n,s,a,o,l,c,f,p,g,T,S,b,x,C,G,K,B,de,le,ye,te,J,Ze,tt,z,W,A,ee,Y,ce,y,_,w,k,D,M,E,I,P,N,q,Ee,ge,fe,Ie,V,qe,ze,pt,Mr,st,je,mt,bt,Rn,Yi,$e,Ws,rs,yt,he,Jr,At,ns,yo,qr,xn,vt,Ui,fr,en,Ye,An,qs,ss,Pn,is,hr,Nn,go,tn,_o,pr,mr,$,js,To,gt,as,Ae,yr=r[20],Pt=[];for(let j=0;jtion',a=Se(),o=ae("textarea"),c=Se(),f=ae("div"),p=ae("label"),g=qt("Priority"),S=Se();for(let j=0;jart',Ie=Se(),V=ae("input"),ze=Se(),pt=ae("code"),Mr=qt(r[17]),st=Se(),je=new Rs(!1),mt=Se(),bt=ae("div"),Rn=ae("label"),Rn.innerHTML=`Only future dates:`,Yi=Se(),$e=ae("input"),rs=Se(),yt=ae("div"),he=ae("label"),he.innerHTML='Status',Jr=Se(),At=ae("select");for(let j=0;jr[39].call(At)),H(yt,"class","tasks-modal-section"),H(vt,"for","status"),H(fr,"id","status"),H(fr,"type","checkbox"),H(fr,"class","task-list-item-checkbox tasks-modal-checkbox"),fr.checked=en=r[1].status.isCompleted(),fr.disabled=!0,H(qr,"class","tasks-modal-section tasks-modal-status"),mr.disabled=js=!r[14],H(mr,"type","submit"),H(mr,"class","mod-cta"),H(gt,"type","button"),H(pr,"class","tasks-modal-section tasks-modal-buttons"),Ur(t,"with-accesskeys",r[9]),H(e,"class","tasks-modal")},m(j,ne){vi(j,e,ne),L(e,t),L(t,n),L(n,s),L(n,a),L(n,o),Yr(o,r[1].description),r[31](o),L(t,c),L(t,f),L(f,p),L(p,g),L(f,S);for(let oe=0;oeno ${V} date`;let pt=ap.parseDate(qe,ze,{forwardDate:ze!=null});return pt!==null?window.moment(pt).format("YYYY-MM-DD"):`invalid ${V} date`}function Y(V,qe){return ee(V,qe,b.forwardOnly?new Date:void 0)}function ce(V){let qe=null,ze=ap.parseDate(V,new Date,{forwardDate:b.forwardOnly});return ze!==null&&(qe=window.moment(ze)),qe}sp(()=>{let{provideAccessKeys:V}=ue();t(9,z=V);let qe=Le.removeAsWordFrom(a.description);(qe!=a.description||!Le.includedIn(a.description))&&(tt=!0);let ze="none";a.priority==="5"?ze="lowest":a.priority==="4"?ze="low":a.priority==="2"?ze="medium":a.priority==="1"?ze="high":a.priority==="0"&&(ze="highest"),t(1,b={description:qe,status:a.status,priority:ze,recurrenceRule:a.recurrence?a.recurrence.toText():"",createdDate:a.createdDate?a.createdDate.format("YYYY-MM-DD"):"",startDate:a.startDate?a.startDate.format("YYYY-MM-DD"):"",scheduledDate:a.scheduledDate?a.scheduledDate.format("YYYY-MM-DD"):"",dueDate:a.dueDate?a.dueDate.format("YYYY-MM-DD"):"",doneDate:a.doneDate?a.doneDate.format("YYYY-MM-DD"):"",forwardOnly:!0}),setTimeout(()=>{S.focus()},10)});let y=V=>{if(V.key&&!V.altKey&&!V.ctrlKey){let qe=A.find(ze=>ze.label.charAt(0).toLowerCase()==V.key);qe&&t(1,b.priority=qe.value,b)}},_=()=>{o([])},w=V=>{V.key==="Enter"&&(V.preventDefault(),W&&D())},k=()=>{setTimeout(()=>{t(1,b.description=b.description.replace(/[\r\n]+/g," "),b)},0)},D=()=>{let V=b.description.trim();tt&&(V=Le.prependTo(V));let qe=ce(b.startDate),ze=ce(b.scheduledDate),pt=ce(b.dueDate),Mr=null;b.recurrenceRule&&(Mr=Rt.fromText({recurrenceRuleText:b.recurrenceRule,startDate:qe,scheduledDate:ze,dueDate:pt}));let st;switch(b.priority){case"lowest":st="5";break;case"low":st="4";break;case"medium":st="2";break;case"high":st="1";break;case"highest":st="0";break;default:st="3"}let je=new Ge(Object.assign(Object.assign({},a),{description:V,status:b.status,priority:st,recurrence:Mr,startDate:qe,scheduledDate:ze,dueDate:pt,doneDate:window.moment(b.doneDate,"YYYY-MM-DD").isValid()?window.moment(b.doneDate,"YYYY-MM-DD"):null}));o([je])},M=[[]];function E(){b.description=this.value,t(1,b),t(6,le),t(2,G),t(4,B),t(0,l)}function I(V){qu[V?"unshift":"push"](()=>{S=V,t(10,S)})}function P(){b.priority=this.__value,t(1,b),t(6,le),t(2,G),t(4,B),t(0,l)}function N(){b.recurrenceRule=this.value,t(1,b),t(6,le),t(2,G),t(4,B),t(0,l)}function q(){b.dueDate=this.value,t(1,b),t(6,le),t(2,G),t(4,B),t(0,l)}function Ee(){b.scheduledDate=this.value,t(1,b),t(6,le),t(2,G),t(4,B),t(0,l)}function ge(){b.startDate=this.value,t(1,b),t(6,le),t(2,G),t(4,B),t(0,l)}function fe(){b.forwardOnly=this.checked,t(1,b),t(6,le),t(2,G),t(4,B),t(0,l)}function Ie(){b.status=pv(this),t(1,b),t(6,le),t(2,G),t(4,B),t(0,l)}return r.$$set=V=>{"task"in V&&t(26,a=V.task),"onSubmit"in V&&t(27,o=V.onSubmit),"statusOptions"in V&&t(0,l=V.statusOptions)},r.$$.update=()=>{if(r.$$.dirty[0]&512){e:t(15,n=V=>z?V:null)}if(r.$$.dirty[0]&66){e:t(1,b.dueDate=fi(b.dueDate),b),t(6,le=Y("due",b.dueDate)),t(7,ye=!le.includes("invalid"))}if(r.$$.dirty[0]&6){e:t(1,b.startDate=fi(b.startDate),b),t(2,G=Y("start",b.startDate)),t(3,K=!G.includes("invalid"))}if(r.$$.dirty[0]&18){e:t(1,b.scheduledDate=fi(b.scheduledDate),b),t(4,B=Y("scheduled",b.scheduledDate)),t(5,de=!B.includes("invalid"))}if(r.$$.dirty[0]&268435458){e:if(t(8,J=!0),!b.recurrenceRule)t(12,te="not recurring");else{let V=t(28,s=Rt.fromText({recurrenceRuleText:b.recurrenceRule,startDate:null,scheduledDate:null,dueDate:null}))===null||s===void 0?void 0:s.toText();V?t(12,te=V):(t(12,te="invalid recurrence rule"),t(8,J=!1))}}if(r.$$.dirty[0]&2){e:t(29,x=b.description.trim()!=="")}if(r.$$.dirty[0]&536871336){e:t(14,W=ye&&J&&de&&K&&x)}if(r.$$.dirty[0]&2){e:t(11,C=ee("created",b.createdDate)),t(13,Ze=ee("done",b.doneDate))}},[l,b,G,K,B,de,le,ye,J,z,S,C,te,Ze,W,n,f,p,g,T,A,y,_,w,k,D,a,o,s,x,E,I,P,M,N,q,Ee,ge,fe,Ie]}var op=class extends ju{constructor(e){super(),gv(this,e,kF,wF,uv,{task:26,onSubmit:27,statusOptions:0},null,[-1,-1])}},wv=op;var Xn=class extends kv.Modal{constructor({app:t,task:n,onSubmit:s}){super(t);this.task=n,this.onSubmit=a=>{a.length&&s(a),this.close()}}onOpen(){this.titleEl.setText("Create or edit Task");let{contentEl:t}=this,n=this.getKnownStatusesAndCurrentTaskStatusIfNotKnown();new wv({target:t,props:{task:this.task,statusOptions:n,onSubmit:this.onSubmit}})}getKnownStatusesAndCurrentTaskStatusIfNotKnown(){let t=He.getInstance().registeredStatuses;return He.getInstance().bySymbol(this.task.status.symbol)===me.EMPTY&&t.push(this.task.status),t}onClose(){let{contentEl:t}=this;t.empty()}};var $u=({line:r,path:e})=>{var b,x;let t=Jt.fromPath(e),n=Ge.fromLine({line:r,taskLocation:Lt.fromUnknownPosition(e),fallbackDate:t});if(n!==null)return n;let{setCreatedDate:s}=ue(),a=null;s&&(a=window.moment());let o=r.match(ie.nonTaskRegex);if(o===null)return console.error("Tasks: Cannot create task on line:",r),new Ge({status:me.TODO,description:"",taskLocation:Lt.fromUnknownPosition(e),indentation:"",listMarker:"-",priority:"3",createdDate:a,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,recurrence:null,blockLink:"",tags:[],originalMarkdown:"",scheduledDateIsInferred:!1});let l=o[1],c=(b=o[2])!=null?b:"-",f=(x=o[4])!=null?x:" ",p=He.getInstance().bySymbolOrCreate(f),g=o[5],T=r.match(ie.blockLinkRegex),S=T!==null?T[0]:"";return S!==""&&(g=g.replace(ie.blockLinkRegex,"")),new Ge({status:p,description:g,taskLocation:Lt.fromUnknownPosition(e),indentation:l,listMarker:c,blockLink:S,priority:"3",createdDate:a,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,recurrence:null,tags:[],originalMarkdown:"",scheduledDateIsInferred:!1})};var Ev=(r,e,t,n)=>{var g;if(r)return t instanceof up.MarkdownView;if(!(t instanceof up.MarkdownView))return;let s=(g=t.file)==null?void 0:g.path;if(s===void 0)return;let o=e.getCursor().line,l=e.getLine(o),c=$u({line:l,path:s}),f=T=>{let S=Jt.removeInferredStatusIfNeeded(c,T).map(b=>b.toFileLineString()).join(` `);e.setLine(o,S)};new Xn({app:n,task:c,onSubmit:f}).open()};var lp=require("obsidian");var Dv=(r,e,t)=>{var c;if(r)return t instanceof lp.MarkdownView;if(!(t instanceof lp.MarkdownView))return;let n=(c=t.file)==null?void 0:c.path;if(n===void 0)return;let s=e.getCursor(),a=s.line,o=e.getLine(a),l=EF(o,n);e.setLine(a,l.text),e.setCursor(DF(s,l))},EF=(r,e)=>{let t=Ge.fromLine({line:r,taskLocation:Lt.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(ie.taskRegex);if(n!==null){let s=n[3],o=He.getInstance().bySymbol(s).nextStatusSymbol;return{text:r.replace(ie.taskRegex,`$1- [${o}] $4`)}}else if(ie.listItemRegex.test(r)){let s=r.replace(ie.listItemRegex,"$1$2 [ ]");return{text:s,moveTo:{ch:s.length}}}else{let s=r.replace(ie.indentationRegex,"$1- ");return{text:s,moveTo:{ch:s.length}}}}},DF=(r,e)=>{var a;let t={line:0,ch:r.ch},n=Pe(Pe({},t),(a=e.moveTo)!=null?a:{}),s=e.text.split(` `)[n.line].length;return{line:r.line+n.line,ch:Math.min(n.ch,s)}};var Gu=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)=>Ev(t,n,s,this.app)}),e.addCommand({id:"toggle-done",name:"Toggle task done",icon:"check-in-circle",editorCheckCallback:Dv})}};var Hu=class{constructor({obsidianEvents:e}){this.obsidianEvents=e}onCacheUpdate(e){return this.obsidianEvents.on("obsidian-tasks-plugin:cache-update",e)}triggerCacheUpdate(e){this.obsidianEvents.trigger("obsidian-tasks-plugin:cache-update",e)}onRequestCacheUpdate(e){return this.obsidianEvents.on("obsidian-tasks-plugin:request-cache-update",e)}triggerRequestCacheUpdate(e){this.obsidianEvents.trigger("obsidian-tasks-plugin:request-cache-update",e)}off(e){this.obsidianEvents.offref(e)}};var Sv=require("obsidian");var Bu=class{constructor({plugin:e}){this.markdownPostProcessor=this._markdownPostProcessor.bind(this);e.registerMarkdownPostProcessor(this._markdownPostProcessor.bind(this))}_markdownPostProcessor(e,t){return Q(this,null,function*(){var p;let n=new Sv.MarkdownRenderChild(e);t.addChild(n);let s=e.findAll(".task-list-item").filter(g=>{var b;let T=(b=g.textContent)==null?void 0:b.split(` `);if(T===void 0)return!1;let S=null;for(let x=0;xOv.ViewPlugin.fromClass(cp),cp=class{constructor(e){this.view=e,this.handleClickEvent=this.handleClickEvent.bind(this),this.view.dom.addEventListener("click",this.handleClickEvent)}destroy(){this.view.dom.removeEventListener("click",this.handleClickEvent)}handleClickEvent(e){let{target:t}=e;if(!t||!(t instanceof HTMLInputElement)||t.type!=="checkbox")return!1;let n=t.closest("ul.plugin-tasks-query-result, div.callout-content");if(n){if(n.matches("div.callout-content")){let T=`obsidian-tasks-plugin warning: Tasks cannot add or remove completion dates or make the next copy of a recurring task for tasks written inside a callout when you click their checkboxes in Live Preview. If you wanted Tasks to do these things, please undo your change, then either click the line of the task and use the "Toggle Task Done" command, or switch to Reading View to click the checkbox.`;console.warn(T),new Mv.Notice(T,45e3)}return!1}let{state:s}=this.view,a=this.view.posAtDOM(t),o=s.doc.lineAt(a),l=Ge.fromLine({line:o.text,taskLocation:Lt.fromUnknownPosition(""),fallbackDate:null});if(console.debug(`Live Preview Extension: toggle called. Position: ${a} Line: ${o.text}`),l===null)return!1;e.preventDefault();let f=l.toggleWithRecurrenceInUsersOrder().map(T=>T.toFileLineString()).join(s.lineBreak),p=s.update({changes:{from:o.from,to:o.to,insert:f}});this.view.dispatch(p);let g=t.checked;return setTimeout(()=>{t.checked=g},1),!0}};var Fi=require("obsidian");var kn=class{constructor(e,t,n){this.property=e,this.comparator=kn.maybeReverse(n,t)}static maybeReverse(e,t){return e?kn.makeReversedComparator(t):t}static makeReversedComparator(e){return(t,n)=>e(t,n)*-1}};var wi=class{constructor(e,t,n){this.property=e,this.grouper=t,this.reverse=n}};var Je=class{canCreateFilterForLine(e){return Je.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 Iu(this.fieldNameSingular())}supportsSorting(){return!1}createSorterFromLine(e){if(!this.supportsSorting())return null;let t=Je.getMatch(this.sorterRegExp(),e);if(t===null)return null;let n=!!t[1];return this.createSorter(n)}sorterRegExp(){if(!this.supportsSorting())throw Error(`sorterRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^sort by ${this.fieldNameSingularEscaped()}( reverse)?`)}comparator(){throw Error(`comparator() unimplemented for ${this.fieldNameSingular()}`)}createSorter(e){return new kn(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=Je.getMatch(this.grouperRegExp(),e);if(t===null)return null;let n=!!t[1];return this.createGrouper(n)}grouperRegExp(){if(!this.supportsGrouping())throw Error(`grouperRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^group by ${this.fieldNameSingularEscaped()}( reverse)?$`)}grouper(){throw Error(`grouper() unimplemented for ${this.fieldNameSingular()}`)}createGrouper(e){return new wi(this.fieldNameSingular(),this.grouper(),e)}createNormalGrouper(){return this.createGrouper(!1)}createReverseGrouper(){return this.createGrouper(!0)}};var et=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 et("None of",e,"NOT")}static booleanXor(e){return new et("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(" ")} `}},Be=class{constructor(e){this.instruction=e}get filter(){return this._filter}set filter(e){this._filter=e}get filterFunction(){if(this._filter)return this._filter.filterFunction}static fromFilter(e){let t=new Be(e.instruction);return t.filter=e,t}static fromError(e,t){let n=new Be(e);return n.error=t,n}};var zu=class{constructor(e,t){this._instruction=e,this._filter=t}canCreateFilterForLine(e){return e==this._instruction}createFilterOrErrorMessage(e){let t=new Be(e);return e===this._instruction?(t.filter=new er(e,this._filter,new et(e)),t):(t.error=`do not understand filter: ${e}`,t)}};var Zr=class{constructor(){this._filters=[]}add(e,t){this._filters.push(new zu(e,t))}canCreateFilterForLine(e){for(let t of this._filters)if(t.canCreateFilterForLine(e))return!0;return!1}createFilterOrErrorMessage(e){for(let n of this._filters){let s=n.createFilterOrErrorMessage(e);if(s.error===void 0)return s}let t=new Be(e);return t.error=`do not understand filter: ${e}`,t}};var Jn=class extends Je{constructor(){super(...arguments);this._filters=new Zr}canCreateFilterForLine(t){return this._filters.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){return this._filters.createFilterOrErrorMessage(t)}filterRegExp(){return null}};var Qr=class extends Jn{constructor(){super(),this._filters.add("done",e=>e.status.type==="DONE"||e.status.type==="CANCELLED"||e.status.type==="NON_TASK"),this._filters.add("not done",e=>e.status.type==="TODO"||e.status.type==="IN_PROGRESS")}fieldName(){return"status"}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=Qr.oldStatusName(e),s=Qr.oldStatusName(t);return ns?-1:0}}static oldStatusName(e){return e.status.symbol===" "?"Todo":"Done"}supportsGrouping(){return!0}grouper(){return e=>[Qr.oldStatusName(e)]}};var jt=class extends Je{constructor(t=null){super();t!==null?this.filterInstructions=t:(this.filterInstructions=new Zr,this.filterInstructions.add(`has ${this.fieldName()} date`,n=>this.date(n)!==null),this.filterInstructions.add(`no ${this.fieldName()} date`,n=>this.date(n)===null),this.filterInstructions.add(`${this.fieldName()} date is invalid`,n=>{let s=this.date(n);return s!==null&&!s.isValid()}))}canCreateFilterForLine(t){return this.filterInstructions.canCreateFilterForLine(t)?!0:super.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){let n=this.filterInstructions.createFilterOrErrorMessage(t);if(n.filter!==void 0)return n;let s=new Be(t),a=Je.getMatch(this.filterRegExp(),t);if(a!==null){let o=a[1],l=a[2],c=a[3],f=ir.parseDateRange(c);if(!f.isValid()){let p=ir.parseDate(o);p.isValid()&&(f=new Bt(p,p))}if(!f.isValid())s.error="do not understand "+this.fieldName()+" date";else{let p=this.buildFilterFunction(l,f),g=jt.buildExplanation(this.fieldNameForExplanation(),l,this.filterResultIfFieldMissing(),f);s.filter=new er(t,p,g)}}else s.error="do not understand query filter ("+this.fieldName()+" date)";return s}buildFilterFunction(t,n){let s;return t==="before"?s=a=>a?a.isBefore(n.start):this.filterResultIfFieldMissing():t==="after"?s=a=>a?a.isAfter(n.end):this.filterResultIfFieldMissing():s=a=>a?a.isSameOrAfter(n.start)&&a.isSameOrBefore(n.end):this.filterResultIfFieldMissing(),this.getFilter(s)}getFilter(t){return n=>t(this.date(n))}filterRegExp(){return new RegExp(`^${this.fieldNameForFilterInstruction()} ((before|after|on|in)? ?(.*))`)}fieldNameForFilterInstruction(){return this.fieldName()}static buildExplanation(t,n,s,a){let o,l="YYYY-MM-DD (dddd Do MMMM YYYY)",c;switch(n){case"before":o=n,c=a.start.format(l);break;case"after":o=n,c=a.end.format(l);break;default:if(a.start.isSame(a.end))o="on",c=a.start.format(l);else{let p=`${t} date is between:`,g=[new et(`${a.start.format(l)} and`),new et(`${a.end.format(l)} inclusive`)];return s&&g.push(new et(`OR no ${t} date`)),new et(p,g)}break}let f=`${t} date is ${o} ${c}`;return s&&(f+=` OR no ${t} date`),new et(f)}fieldNameForExplanation(){return this.fieldName()}supportsSorting(){return!0}comparator(){return(t,n)=>Vr(this.date(t),this.date(n))}supportsGrouping(){return!0}grouper(){return t=>{let n=this.date(t);return n===null?["No "+this.fieldName()+" date"]:[n.format("YYYY-MM-DD dddd")]}}};var ki=class extends jt{fieldName(){return"due"}date(e){return e.dueDate}filterResultIfFieldMissing(){return!1}};var dp=class extends Je{createFilterOrErrorMessage(e){let t=new Be(e),n=Je.getMatch(this.filterRegExp(),e);if(n!==null){let s=n[5],a=null;switch(s){case"lowest":a="5";break;case"low":a="4";break;case"none":a="3";break;case"medium":a="2";break;case"high":a="1";break;case"highest":a="0";break}if(a===null)return t.error="do not understand priority",t;let o=e,l;switch(n[3]){case"above":l=c=>c.priority.localeCompare(a)<0;break;case"below":l=c=>c.priority.localeCompare(a)>0;break;case"not":l=c=>c.priority!==a;break;default:l=c=>c.priority===a,o=`${this.fieldName()} is ${s}`}t.filter=new er(e,l,new et(o))}else t.error="do not understand query filter (priority)";return t}fieldName(){return"priority"}filterRegExp(){return dp.priorityRegexp}supportsSorting(){return!0}comparator(){return(e,t)=>e.priority.localeCompare(t.priority)}supportsGrouping(){return!0}grouper(){return e=>{let t="ERROR";switch(e.priority){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[`Priority ${e.priority}: ${t}`]}}},Ps=dp;Ps.priorityRegexp=/^priority(\s+is)?(\s+(above|below|not))?(\s+(lowest|low|none|medium|high|highest))$/;var Ei=class{matchesAnyOf(e){return e.some(t=>this.matches(t))}};var Di=class extends Ei{constructor(t){super();this.stringToFind=t}matches(t){return Di.stringIncludesCaseInsensitive(t,this.stringToFind)}static stringIncludesCaseInsensitive(t,n){return t.toLocaleLowerCase().includes(n.toLocaleLowerCase())}};var Si=class extends Ei{constructor(t){super();this.regex=t}static validateAndConstruct(t){let n=/\/((?![*+?])(?:[^\r\n[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*])+)\/((?:g(?:im?|mi?)?|i(?:gm?|mg?)?|m(?:gi?|ig?)?)?)/,s=t.match(n);if(s!==null){let a=new RegExp(s[1],s[2]);return new Si(a)}else return null}matches(t){return t.match(this.regex)!==null}};var Ke=class extends Je{createFilterOrErrorMessage(e){let t=Je.getMatch(this.filterRegExp(),e);if(t===null)return Be.fromError(e,`do not understand query filter (${this.fieldName()})`);let[n,s,a]=t,o=null;if(s.includes("include"))o=new Di(a);else if(s.includes("regex")&&(o=Si.validateAndConstruct(a),o===null))return Be.fromError(e,`cannot parse regex (${this.fieldName()}); check your leading and trailing slashes for your query`);if(o===null)return Be.fromError(e,`do not understand query filter (${this.fieldName()})`);let l=s.match(/not/)!==null,c=new er(e,this.getFilter(o,l),new et(e));return Be.fromFilter(c)}fieldPattern(){return this.fieldNameSingularEscaped()}filterOperatorPattern(){return"includes|does not include|regex matches|regex does not match"}filterRegExp(){return new RegExp(`^(?:${this.fieldPattern()}) (${this.filterOperatorPattern()}) (.*)`)}getFilter(e,t){return n=>{let s=e.matches(this.value(n));return t?!s:s}}comparator(){return(e,t)=>this.value(e).localeCompare(this.value(t),void 0,{numeric:!0})}grouper(){return e=>[this.value(e)]}static escapeMarkdownCharacters(e){return e.replace(/\\/g,"\\\\").replace(/_/g,"\\_")}};var Oi=class extends Ke{fieldName(){return"path"}value(e){return e.path}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return e=>[Ke.escapeMarkdownCharacters(e.path.replace(".md",""))]}};var Mi=class extends Je{canCreateFilterForLine(e){return!1}createFilterOrErrorMessage(e){return Be.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)}`]}};var Ri=class{static by(e,t){let n=[new Mi().comparator(),new Qr().comparator(),new ki().comparator(),new Ps().comparator(),new Oi().comparator()],s=[];for(let a of e)s.push(a.comparator);return t.sort(Ri.makeCompositeComparator([...s,...n]))}static makeCompositeComparator(e){return(t,n)=>{for(let s of e){let a=s(t,n);if(a!==0)return a}return 0}}};var Vu=class{constructor(e,t,n){this.nestingLevel=e,this.displayName=t,this.property=n}};var Ku=class{constructor(e,t){this.lastHeadingAtLevel=new Array;this.groupers=t;let s=e.keys().next().value.length;for(let a=0;at.set(l,o)),e.pop();return t}};var Qu=class extends Zu{},Xu=class{constructor(e,t){this.root=new Qu(t),this.buildGroupingTree(e)}buildGroupingTree(e){let t=[this.root];for(let n of e){let s=[];for(let a of t)for(let o of a.values){let l=n.grouper(o);for(let c of l){let f=a.children.get(c);f===void 0&&(f=new Qu([]),a.children.set(c,f),s.push(f)),f.values.push(o)}}t=s}}generateTaskTreeStorage(){return this.root.generateAllPaths()}};var Ju=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 el=class{constructor(e,t){this._groups=new Array;this._totalTaskCount=0;this._totalTaskCount=t.length,this._groupers=e;let s=new Xu(e,t).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 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 s=new Ju(t,n);this.addTaskGroup(s)}}addTaskGroup(e){this._groups.push(e)}sortTaskGroups(){let e=(t,n)=>{let s=t.groups,a=n.groups;for(let o=0;o{t.applyTaskLimit(e)}),this.calculateTotalTaskCount())}calculateTotalTaskCount(){let e=[];this._groups.forEach(n=>{e=[...e,...n.tasks]});let t=[...new Set(e)];this._totalTaskCount=t.length}};var Ns=class extends Ke{fieldName(){return"description"}value(e){return Le.removeAsSubstringFrom(e.description)}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=Ns.cleanDescription(e.description),s=Ns.cleanDescription(t.description);return n.localeCompare(s,void 0,{numeric:!0})}}static cleanDescription(e){e=Le.removeAsSubstringFrom(e);let t=/^\[\[?([^\]]*)]]?/,n=e.match(t);if(n!==null){let s=n[1];e=s.substring(s.indexOf("|")+1)+e.replace(t,"")}return e=this.replaceFormatting(e,/^\*\*([^*]+)\*\*/),e=this.replaceFormatting(e,/^\*([^*]+)\*/),e=this.replaceFormatting(e,/^==([^=]+)==/),e=this.replaceFormatting(e,/^__([^_]+)__/),e=this.replaceFormatting(e,/^_([^_]+)_/),e}static replaceFormatting(e,t){let n=e.match(t);return n!==null&&(e=n[1]+e.replace(t,"")),e}};var tl=class extends jt{fieldName(){return"created"}date(e){return e.createdDate}filterResultIfFieldMissing(){return!1}};var rl=class extends jt{fieldName(){return"done"}date(e){return e.doneDate}filterResultIfFieldMissing(){return!1}};var nl=class extends Jn{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 sl=class extends Ke{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 il=class extends jt{fieldName(){return"scheduled"}date(e){return e.scheduledDate}filterResultIfFieldMissing(){return!1}};var al=class extends jt{fieldName(){return"start"}fieldNameForFilterInstruction(){return"starts"}date(e){return e.startDate}filterResultIfFieldMissing(){return!0}};var xi=class extends jt{constructor(){let e=new Zr;e.add("has happens date",t=>this.dates(t).some(n=>n!==null)),e.add("no happens date",t=>!this.dates(t).some(n=>n!==null)),super(e)}fieldName(){return"happens"}fieldNameForExplanation(){return"due, start or scheduled"}date(e){return this.earliestDate(e)}dates(e){return Array.of(e.startDate,e.scheduledDate,e.dueDate)}earliestDate(e){return new xi().dates(e).sort(Vr)[0]}filterResultIfFieldMissing(){return!1}getFilter(e){return t=>this.dates(t).some(n=>e(n))}};var ol=class extends Jn{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 ul=class extends Ke{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 wi(this.fieldNamePlural(),this.grouper(),e)}grouperRegExp(){if(!this.supportsGrouping())throw Error(`grouperRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^group by ${this.fieldNamePlural()}( reverse)?$`)}};var Cs=class extends ul{constructor(){super();this.filterInstructions=new Zr,this.filterInstructions.add(`has ${this.fieldNameSingular()}`,t=>this.values(t).length>0),this.filterInstructions.add(`has ${this.fieldNamePlural()}`,t=>this.values(t).length>0),this.filterInstructions.add(`no ${this.fieldNameSingular()}`,t=>this.values(t).length===0),this.filterInstructions.add(`no ${this.fieldNamePlural()}`,t=>this.values(t).length===0)}createFilterOrErrorMessage(t){let n=this.filterInstructions.createFilterOrErrorMessage(t);return n.filter!==void 0?n:super.createFilterOrErrorMessage(t)}canCreateFilterForLine(t){return this.filterInstructions.canCreateFilterForLine(t)?!0:super.canCreateFilterForLine(t)}fieldNameSingular(){return"tag"}values(t){return t.tags}supportsSorting(){return!0}createSorterFromLine(t){let n=t.match(this.sorterRegExp());if(n===null)return null;let s=!!n[1],a=isNaN(+n[2])?1:+n[2],o=Cs.makeCompareByTagComparator(a);return new kn(this.fieldNameSingular(),o,s)}sorterRegExp(){return/^sort by tag( reverse)?[\s]*(\d+)?/}comparator(){return Cs.makeCompareByTagComparator(1)}static makeCompareByTagComparator(t){return(n,s)=>{if(n.tags.length===0&&s.tags.length===0)return 0;if(n.tags.length===0)return 1;if(s.tags.length===0)return-1;let a=t-1;if(n.tags.length=t)return 1;if(s.tags.length=t)return-1;if(n.tags.lengtht.tags.length==0?["(No tags)"]:t.tags}};var jv=Ln(qv());var fl=class extends Je{constructor(){super(...arguments);this.basicBooleanRegexp=/(.*(AND|OR|XOR|NOT)\s*[("].*|\(.+\))/g;this.supportedOperators=["AND","OR","XOR","NOT"];this.subFields={}}filterRegExp(){return this.basicBooleanRegexp}createFilterOrErrorMessage(t){return this.parseLine(t)}fieldName(){return"boolean query"}parseLine(t){let n=new Be(t);if(t.length===0)return n.error="empty line",n;let s=this.preprocessExpression(t);try{let a=(0,jv.parse)(s);for(let c of a)if(c.name==="IDENTIFIER"&&c.value){let f=c.value.trim();if(!(f in this.subFields)){let p=hl(f);if(p===null)return n.error=`couldn't parse sub-expression '${f}'`,n;if(p.error)return n.error=`couldn't parse sub-expression '${f}': ${p.error}`,n;p.filter&&(this.subFields[f]=p.filter)}}else if(c.name==="OPERATOR"){if(c.value==null)return n.error="empty operator in boolean query",n;if(!this.supportedOperators.includes(c.value))return n.error=`unknown boolean operator '${c.value}'`,n}let o=c=>this.filterTaskWithParsedQuery(c,a),l=this.constructExplanation(a);return n.filter=new er(t,o,l),n}catch(a){let o=a instanceof Error?a.message:"unknown error type";return n.error=`malformed boolean query -- ${o} (check the documentation for guidelines)`,n}return n}preprocessExpression(t){return t.replace(/\(([^()]+)\)/g,'("$1")')}filterTaskWithParsedQuery(t,n){let s=l=>l==="true",a=l=>l?"true":"false",o=[];for(let l of n)if(l.name==="IDENTIFIER"){if(l.value==null)throw Error("null token value");let f=this.subFields[l.value.trim()].filterFunction(t);o.push(a(f))}else if(l.name==="OPERATOR")if(l.value==="NOT"){let c=s(o.pop());o.push(a(!c))}else if(l.value==="OR"){let c=s(o.pop()),f=s(o.pop());o.push(a(c||f))}else if(l.value==="AND"){let c=s(o.pop()),f=s(o.pop());o.push(a(c&&f))}else if(l.value==="XOR"){let c=s(o.pop()),f=s(o.pop());o.push(a(c&&!f||!c&&f))}else throw Error("Unsupported operator: "+l.value);else throw Error("Unsupported token type: "+l);return s(o[0])}constructExplanation(t){let n=[];for(let s of t)if(s.name==="IDENTIFIER"){if(s.value==null)throw Error("null token value");let a=this.subFields[s.value.trim()];n.push(a.explanation)}else if(s.name==="OPERATOR")if(s.value==="NOT"){let a=n.pop();n.push(et.booleanNot([a]))}else if(s.value==="OR"){let a=n.pop(),o=n.pop();n.push(et.booleanOr([o,a]))}else if(s.value==="AND"){let a=n.pop(),o=n.pop();n.push(et.booleanAnd([o,a]))}else if(s.value==="XOR"){let a=n.pop(),o=n.pop();n.push(et.booleanXor([o,a]))}else throw Error("Unsupported operator: "+s.value);else throw Error("Unsupported token type: "+s);return n[0]}};var pl=class extends Ke{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 ml=class extends Ke{constructor(){super()}fieldName(){return"status.name"}value(e){return e.status.name}supportsSorting(){return!0}supportsGrouping(){return!0}};var ts=class extends Je{canCreateFilterForLine(e){let t=new RegExp(`^(?:${this.fieldNameSingularEscaped()})`);return Je.lineMatchesFilter(t,e)}createFilterOrErrorMessage(e){let t=Je.getMatch(this.filterRegExp(),e);if(t===null)return this.helpMessage(e);let[n,s,a]=t,o=Sr[a.toUpperCase()];if(!o)return this.helpMessage(e);let l;switch(s){case"is":l=c=>c.status.type===o;break;case"is not":l=c=>c.status.type!==o;break;default:return this.helpMessage(e)}return Be.fromFilter(new er(e,l,new et(e)))}filterRegExp(){return new RegExp(`^(?:${this.fieldNameSingularEscaped()}) (is|is not) ([^ ]+)$`)}helpMessage(e){let t=Object.values(Sr).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 Be.fromError(e,n)}fieldName(){return"status.type"}value(e){return e.status.type}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=ts.groupName(e),s=ts.groupName(t);return n.localeCompare(s,void 0,{numeric:!0})}}supportsGrouping(){return!0}grouper(){return e=>[ts.groupName(e)]}static groupName(e){let t;switch(e.status.type){case"IN_PROGRESS":t="1";break;case"TODO":t="2";break;case"DONE":t="3";break;case"CANCELLED":t="4";break;case"NON_TASK":t="5";break;case"EMPTY":t="6";break}return t+" "+e.status.type}};var yl=class extends Ke{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 gl=class extends Ke{fieldName(){return"folder"}value(e){let t=e.path,n=e.filename+".md",s=t.substring(0,t.lastIndexOf(n));return s===""?"/":s}supportsGrouping(){return!0}grouper(){return e=>[Ke.escapeMarkdownCharacters(this.value(e))]}};var _l=class extends Ke{fieldName(){return"root"}value(e){let t=e.path.replace(/\\/g,"/");t.charAt(0)==="/"&&(t=t.substring(1));let n=t.indexOf("/");return n==-1?"/":t.substring(0,n+1)}supportsGrouping(){return!0}grouper(){return e=>[Ke.escapeMarkdownCharacters(this.value(e))]}};var Tl=class extends Ke{fieldName(){return"backlink"}value(e){let t=e.getLinkText({isFilenameUnique:!0});return t===null?"Unknown Location":t}createFilterOrErrorMessage(e){return Be.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=Ke.escapeMarkdownCharacters(t);return e.precedingHeader&&e.precedingHeader!==t&&(n+=" > "+e.precedingHeader),[n]}}};var kp=[()=>new ml,()=>new ts,()=>new Qr,()=>new ol,()=>new Ps,()=>new xi,()=>new tl,()=>new al,()=>new il,()=>new ki,()=>new rl,()=>new Oi,()=>new gl,()=>new _l,()=>new Tl,()=>new Ns,()=>new Cs,()=>new sl,()=>new nl,()=>new pl,()=>new Mi,()=>new yl,()=>new fl];function hl(r){for(let e of kp){let t=e();if(t.canCreateFilterForLine(r))return t.createFilterOrErrorMessage(r)}return null}function $v(r){let e=/^sort by /;if(r.match(e)===null)return null;for(let t of kp){let s=t().createSorterFromLine(r);if(s)return s}return null}function Gv(r){let e=/^group by /;if(r.match(e)===null)return null;for(let t of kp){let s=t().createGrouperFromLine(r);if(s)return s}return null}var Mn=class{constructor({source:e}){this._limit=void 0;this._taskGroupLimit=void 0;this._layoutOptions=new Ja;this._filters=[];this._error=void 0;this._sorting=[];this._grouping=[];this.hideOptionsRegexp=/^(hide|show) (task count|backlink|priority|created date|start date|scheduled date|done date|due date|recurrence rule|edit button|urgency)/;this.shortModeRegexp=/^short/;this.explainQueryRegexp=/^explain/;this.limitRegexp=/^limit (groups )?(to )?(\d+)( tasks?)?/;this.commentRegexp=/^#.*/;this.source=e,e.split(` `).map(t=>t.trim()).forEach(t=>{switch(!0){case t==="":break;case this.shortModeRegexp.test(t):this._layoutOptions.shortMode=!0;break;case this.explainQueryRegexp.test(t):this._layoutOptions.explainQuery=!0;break;case this.limitRegexp.test(t):this.parseLimit({line:t});break;case this.parseSortBy({line:t}):break;case this.parseGroupBy({line:t}):break;case this.hideOptionsRegexp.test(t):this.parseHideOptions({line:t});break;case this.commentRegexp.test(t):break;case this.parseFilter(t):break;default:this._error=`do not understand query: ${t}`}})}append(e){return this.source===""?e:e.source===""?this:new Mn({source:`${this.source} ${e.source}`})}explainQuery(){let e="",t=this.filters.length;if(t===0)e+="No filters supplied. All tasks will match the query.";else for(let s=0;s0&&(e+=` `),e+=this.filters[s].explainFilterIndented("");e+=this.explainQueryLimits();let{debugSettings:n}=ue();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 s=` At most ${n} task`;return n!==1&&(s+="s"),s}return this._limit!==void 0&&(e+=t(this._limit),e+=`. `),this._taskGroupLimit!==void 0&&(e+=t(this._taskGroupLimit),e+=` per group (if any "group by" options are supplied). `),e}get limit(){return this._limit}get layoutOptions(){return this._layoutOptions}get filters(){return this._filters}get sorting(){return this._sorting}get grouping(){return this._grouping}get error(){return this._error}applyQueryToTasks(e){this.filters.forEach(o=>{e=e.filter(o.filterFunction)});let{debugSettings:t}=ue(),s=(t.ignoreSortInstructions?e:Ri.by(this.sorting,e)).slice(0,this.limit),a=new el(this.grouping,s);return this._taskGroupLimit!==void 0&&a.applyTaskLimit(this._taskGroupLimit),a}parseHideOptions({line:e}){let t=e.match(this.hideOptionsRegexp);if(t!==null){let n=t[1]==="hide";switch(t[2]){case"task count":this._layoutOptions.hideTaskCount=n;break;case"backlink":this._layoutOptions.hideBacklinks=n;break;case"priority":this._layoutOptions.hidePriority=n;break;case"created date":this._layoutOptions.hideCreatedDate=n;break;case"start date":this._layoutOptions.hideStartDate=n;break;case"scheduled date":this._layoutOptions.hideScheduledDate=n;break;case"due date":this._layoutOptions.hideDueDate=n;break;case"done date":this._layoutOptions.hideDoneDate=n;break;case"recurrence rule":this._layoutOptions.hideRecurrenceRule=n;break;case"edit button":this._layoutOptions.hideEditButton=n;break;case"urgency":this._layoutOptions.hideUrgency=n;break;default:this._error="do not understand hide/show option"}}}parseFilter(e){let t=hl(e);return t!=null?(t.filter?this._filters.push(t.filter):this._error=t.error,!0):!1}parseLimit({line:e}){let t=e.match(this.limitRegexp);if(t===null){this._error="do not understand query limit";return}let n=Number.parseInt(t[3],10);t[1]!==void 0?this._taskGroupLimit=n:this._limit=n}parseSortBy({line:e}){let t=$v(e);return t?(this._sorting.push(t),!0):!1}parseGroupBy({line:e}){let t=Gv(e);return t?(this._grouping.push(t),!0):!1}};function Hv(r){let e="";Le.isEmpty()||(e+=`Only tasks containing the global filter '${Le.get()}'. `);let t=new Mn(Hh());return t.source.trim()!==""&&(e+=`Explanation of the global query: ${t.explainQuery()} `),e+=`Explanation of this Tasks code block query: ${new Mn({source:r}).explainQuery()}`,e}function bl(r){return new Mn(Hh()).append(new Mn({source:r}))}var vl=class{constructor({plugin:e,events:t}){this.addQueryRenderChild=this._addQueryRenderChild.bind(this);this.app=e.app,this.events=t,e.registerMarkdownCodeBlockProcessor("tasks",this._addQueryRenderChild.bind(this))}_addQueryRenderChild(e,t,n){return Q(this,null,function*(){n.addChild(new Ep({app:this.app,events:this.events,container:t,source:e,filePath:n.sourcePath}))})}},Ep=class extends Fi.MarkdownRenderChild{constructor({app:t,events:n,container:s,source:a,filePath:o}){super(s);switch(this.app=t,this.events=n,this.source=a,this.filePath=o,this.containerEl.className){case"block-language-tasks":this.query=bl(this.source),this.queryType="tasks";break;default:this.query=bl(this.source),this.queryType="tasks";break}}onload(){this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.renderEventRef=this.events.onCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()}onunload(){this.renderEventRef!==void 0&&this.events.off(this.renderEventRef),this.queryReloadTimeout!==void 0&&clearTimeout(this.queryReloadTimeout)}reloadQueryAtMidnight(){let t=new Date;t.setHours(24,0,0,0);let n=new Date,s=t.getTime()-n.getTime();this.queryReloadTimeout=setTimeout(()=>{this.query=bl(this.source),this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()},s+1e3)}render(s){return Q(this,arguments,function*({tasks:t,state:n}){var o;let a=this.containerEl.createEl("div");if(n==="Warm"&&this.query.error===void 0){console.debug(`Render ${this.queryType} called for a block in active file "${this.filePath}", to select from ${t.length} tasks: plugin state: ${n}`),this.query.layoutOptions.explainQuery&&this.createExplanation(a);let l=this.query.applyQueryToTasks(t);for(let f of l.groups){this.addGroupHeadings(a,f.groupHeadings);let{taskList:p}=yield this.createTasksList({tasks:f.tasks,content:a});a.appendChild(p)}let c=l.totalTasksCount();console.debug(`${c} of ${t.length} tasks displayed in a block in "${this.filePath}"`),this.addTaskCount(a,c)}else this.query.error!==void 0?a.createDiv().innerHTML=`
Tasks query: ${this.query.error.replace(/\n/g,"
")}
`:a.setText("Loading Tasks ...");(o=this.containerEl.firstChild)==null||o.replaceWith(a)})}createExplanation(t){let n=Hv(this.source),s=t.createEl("pre");s.addClasses(["plugin-tasks-query-explanation"]),s.setText(n),t.appendChild(s)}createTasksList(s){return Q(this,arguments,function*({tasks:t,content:n}){let a=t.length,o=new Vn(this.query.layoutOptions),l=n.createEl("ul");l.addClasses(["contains-task-list","plugin-tasks-query-result"]),l.addClasses(o.specificClasses);let c=this.getGroupingAttribute();c&&c.length>0&&(l.dataset.taskGroupBy=c);for(let f=0;fC.remove());let b=this.query.layoutOptions.shortMode,x=T.createSpan("task-extras");this.query.layoutOptions.hideUrgency||this.addUrgency(x,p),this.query.layoutOptions.hideBacklinks||this.addBacklinks(x,p,b,g),this.query.layoutOptions.hideEditButton||this.addEditButton(x,p),l.appendChild(T)}return{taskList:l,tasksCount:a}})}addEditButton(t,n){t.createEl("a",{cls:"tasks-edit"}).onClickEvent(a=>{a.preventDefault();let o=c=>{Uu({originalTask:n,newTasks:Jt.removeInferredStatusIfNeeded(n,c)})};new Xn({app:this.app,task:n,onSubmit:o}).open()})}addUrgency(t,n){let s=new Intl.NumberFormat().format(n.urgency);t.createSpan({text:s,cls:"tasks-urgency"})}addGroupHeadings(t,n){for(let s of n)this.addGroupHeading(t,s)}addGroupHeading(t,n){return Q(this,null,function*(){let s="h6";n.nestingLevel===0?s="h4":n.nestingLevel===1&&(s="h5");let a=t.createEl(s,{cls:"tasks-group-heading"});yield Fi.MarkdownRenderer.renderMarkdown(n.displayName,a,this.filePath,this)})}addBacklinks(t,n,s,a){var p;let o=t.createSpan({cls:"tasks-backlink"});s||o.append(" (");let l=o.createEl("a");l.rel="noopener",l.target="_blank",l.addClass("internal-link"),s&&l.addClass("internal-link-short-mode");let c;s?c=" \u{1F517}":c=(p=n.getLinkText({isFilenameUnique:a}))!=null?p:"",l.setText(c);let f=this.app.vault;l.addEventListener("click",g=>Q(this,null,function*(){let T=yield Zh(n,f);if(T){let[S,b]=T;yield this.app.workspace.getLeaf(Fi.Keymap.isModEvent(g)).openFile(b,{eState:{line:S}})}})),l.addEventListener("mousedown",g=>Q(this,null,function*(){if(g.button===1){let T=yield Zh(n,f);if(T){let[S,b]=T;yield this.app.workspace.getLeaf("tab").openFile(b,{eState:{line:S}})}}})),s||o.append(")")}addTaskCount(t,n){this.query.layoutOptions.hideTaskCount||t.createDiv({text:`${n} task${n!==1?"s":""}`,cls:"tasks-count"})}isFilenameUnique({task:t}){let n=t.path.match(/([^/]*)\..+$/i);if(n===null)return;let s=n[1];return this.app.vault.getMarkdownFiles().filter(o=>{if(o.basename===s)return!0}).length<2}getGroupingAttribute(){let t=[];for(let n of this.query.grouping)t.push(n.property);return t.join(",")}};var Ce=require("obsidian");function Bv(){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 zv(){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 Vv(){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 Kv(){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 Zv(){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 Qv(){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 Xv(){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 Jv=[{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 Wr=require("obsidian");var Ys=class{validate(e){let t=[];return t.push(...this.validateSymbol(e)),t.push(...this.validateName(e)),t.push(...this.validateNextSymbol(e)),t}validateStatusCollectionEntry(e){let[t,n,s,a]=e,o=[];if(o.push(...this.validateType(a)),t===s&&a!=="NON_TASK"&&o.push(`Status symbol '${t}' toggles to itself`),o.length>0)return o;let l=me.createFromImportedValue(e).configuration;return o.push(...this.validateSymbolTypeConventions(l)),o.push(...this.validate(l)),o}validateSymbol(e){return Ys.validateOneSymbol(e.symbol,"Task Status Symbol")}validateNextSymbol(e){return Ys.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=Sr[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 He,a=n==="X"?"x":n,o=s.bySymbol(a);return o.type!=="EMPTY"&&(e.nextStatusSymbol!==o.nextStatusSymbol&&t.push(`Next Status Symbol for symbol '${n}': '${e.nextStatusSymbol}' is inconsistent with convention '${o.nextStatusSymbol}'`),e.type!==o.type&&t.push(`Status Type for symbol '${n}': '${e.type}' is inconsistent with convention '${o.type}'`)),t}static validateOneSymbol(e,t){let n=[];return e.length===0&&n.push(`${t} cannot be empty.`),e.length>1&&n.push(`${t} ("${e}") must be a single character.`),n}};var Us=new Ys,cr=class extends Wr.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 xt(this.statusSymbol,this.statusName,this.statusNextSymbol,this.statusAvailableAsCommand,this.type)}display(){return Q(this,null,function*(){let{contentEl:t}=this;t.empty();let n=t.createDiv(),s;new Wr.Setting(n).setName("Task Status Symbol").setDesc("This is the character between the square braces. (It can only be edited for Custom statuses, and not Core statuses.)").addText(f=>{s=f,f.setValue(this.statusSymbol).onChange(p=>{this.statusSymbol=p,cr.setValid(f,Us.validateSymbol(this.statusConfiguration()))})}).setDisabled(this.isCoreStatus).then(f=>{cr.setValid(s,Us.validateSymbol(this.statusConfiguration()))});let a;new Wr.Setting(n).setName("Task Status Name").setDesc("This is the friendly name of the task status.").addText(f=>{a=f,f.setValue(this.statusName).onChange(p=>{this.statusName=p,cr.setValid(f,Us.validateName(this.statusConfiguration()))})}).then(f=>{cr.setValid(a,Us.validateName(this.statusConfiguration()))});let o;new Wr.Setting(n).setName("Task Next Status Symbol").setDesc("When clicked on this is the symbol that should be used next.").addText(f=>{o=f,f.setValue(this.statusNextSymbol).onChange(p=>{this.statusNextSymbol=p,cr.setValid(f,Us.validateNextSymbol(this.statusConfiguration()))})}).then(f=>{cr.setValid(o,Us.validateNextSymbol(this.statusConfiguration()))}),new Wr.Setting(n).setName("Task Status Type").setDesc("Control how the status behaves for searching and toggling.").addDropdown(f=>{["TODO","IN_PROGRESS","DONE","CANCELLED","NON_TASK"].forEach(g=>{f.addOption(g,g)}),f.setValue(this.type).onChange(g=>{this.type=me.getTypeFromStatusTypeString(g)})}),me.tasksPluginCanCreateCommandsForStatuses()&&new Wr.Setting(n).setName("Available as command").setDesc("If enabled this status will be available as a command so you can assign a hotkey and toggle the status using it.").addToggle(f=>{f.setValue(this.statusAvailableAsCommand).onChange(p=>Q(this,null,function*(){this.statusAvailableAsCommand=p}))});let l=t.createDiv(),c=new Wr.Setting(l);c.addButton(f=>(f.setTooltip("Save").setIcon("checkmark").onClick(()=>Q(this,null,function*(){let p=Us.validate(this.statusConfiguration());if(p.length>0){let g=p.join(` `)+` Fix errors before saving.`;new Wr.Notice(g);return}this.saved=!0,this.close()})),f)),c.addExtraButton(f=>(f.setIcon("cross").setTooltip("Cancel").onClick(()=>{this.saved=!1,this.close()}),f))})}onOpen(){this.display()}static setValidationError(t){t.inputEl.addClass("tasks-settings-is-invalid")}static removeValidationError(t){t.inputEl.removeClass("tasks-settings-is-invalid")}static setValid(t,n){n.length===0?cr.removeValidationError(t):cr.setValidationError(t)}};var dr=class extends Ce.PluginSettingTab{constructor({plugin:t}){super(t.app,t);this.customFunctions={insertTaskCoreStatusSettings:this.insertTaskCoreStatusSettings.bind(this),insertCustomTaskStatusSettings:this.insertCustomTaskStatusSettings.bind(this)};this.plugin=t}saveSettings(t){return Q(this,null,function*(){yield this.plugin.saveSettings(),t&&this.display()})}display(){let{containerEl:t}=this;t.empty(),this.containerEl.addClass("tasks-settings"),t.createEl("h3",{text:"Tasks Settings"}),t.createEl("p",{cls:"tasks-setting-important",text:"Changing any settings requires a restart of obsidian."}),t.createEl("h4",{text:"Task Format Settings"}),new Ce.Setting(t).setName("Task Format").setDesc(dr.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 a of Object.keys(bn))s.addOption(a,bn[a].displayName);s.setValue(ue().taskFormat).onChange(a=>Q(this,null,function*(){ht({taskFormat:a}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Global filter Settings"}),new Ce.Setting(t).setName("Global task filter").setDesc(dr.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(Le.get()).onChange(a=>Q(this,null,function*(){Le.set(a),yield this.plugin.saveSettings()}))}),new Ce.Setting(t).setName("Remove global filter from description").setDesc("Enabling this removes the string that you set as global filter from the task description when displaying a task.").addToggle(s=>{let a=ue();s.setValue(a.removeGlobalFilter).onChange(o=>Q(this,null,function*(){ht({removeGlobalFilter:o}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Global Query"}),YF(new Ce.Setting(t).setDesc(dr.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 a=ue();s.inputEl.rows=4,s.setPlaceholder(`# For example... path does not include _templates/ limit 300 show urgency`).setValue(a.globalQuery).onChange(o=>Q(this,null,function*(){ht({globalQuery:o}),yield this.plugin.saveSettings()}))})),t.createEl("h4",{text:"Task Statuses"});let{headingOpened:n}=ue();Jv.forEach(s=>{this.addOneSettingsBlock(t,s,n)}),t.createEl("h4",{text:"Date Settings"}),new Ce.Setting(t).setName("Set created date on every added task").setDesc(dr.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 a=ue();s.setValue(a.setCreatedDate).onChange(o=>Q(this,null,function*(){ht({setCreatedDate:o}),yield this.plugin.saveSettings()}))}),new Ce.Setting(t).setName("Set done date on every completed task").setDesc(dr.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 a=ue();s.setValue(a.setDoneDate).onChange(o=>Q(this,null,function*(){ht({setDoneDate:o}),yield this.plugin.saveSettings()}))}),new Ce.Setting(t).setName("Use filename as Scheduled date for undated tasks").setDesc(dr.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 a=ue();s.setValue(a.useFilenameAsScheduledDate).onChange(o=>Q(this,null,function*(){ht({useFilenameAsScheduledDate:o}),yield this.plugin.saveSettings()}))}),new Ce.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=>Q(this,null,function*(){let a=ue();yield this.plugin.saveSettings(),s.setValue(dr.renderFolderArray(a.filenameAsDateFolders)).onChange(o=>Q(this,null,function*(){let l=dr.parseCommaSeparatedFolders(o);ht({filenameAsDateFolders:l}),yield this.plugin.saveSettings()}))})),t.createEl("h4",{text:"Recurring task Settings"}),new Ce.Setting(t).setName("Next recurrence appears on the line below").setDesc(dr.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:a}=ue();s.setValue(a).onChange(o=>Q(this,null,function*(){ht({recurrenceOnNextLine:o}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Auto-suggest Settings"}),new Ce.Setting(t).setName("Auto-suggest task content").setDesc(dr.createFragmentWithHTML('Enabling this will open an intelligent suggest menu while typing inside a recognized task line.

See the documentation.

')).addToggle(s=>{let a=ue();s.setValue(a.autoSuggestInEditor).onChange(o=>Q(this,null,function*(){ht({autoSuggestInEditor:o}),yield this.plugin.saveSettings()}))}),new Ce.Setting(t).setName("Minimum match length for auto-suggest").setDesc("If higher than 0, auto-suggest will be triggered only when the beginning of any supported keywords is recognized.").addSlider(s=>{let a=ue();s.setLimits(0,3,1).setValue(a.autoSuggestMinMatch).setDynamicTooltip().onChange(o=>Q(this,null,function*(){ht({autoSuggestMinMatch:o}),yield this.plugin.saveSettings()}))}),new Ce.Setting(t).setName("Maximum number of auto-suggestions to show").setDesc('How many suggestions should be shown when an auto-suggest menu pops up (including the "\u23CE" option).').addSlider(s=>{let a=ue();s.setLimits(3,12,1).setValue(a.autoSuggestMaxItems).setDynamicTooltip().onChange(o=>Q(this,null,function*(){ht({autoSuggestMaxItems:o}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Dialog Settings"}),new Ce.Setting(t).setName("Provide access keys in dialogs").setDesc(dr.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 a=ue();s.setValue(a.provideAccessKeys).onChange(o=>Q(this,null,function*(){ht({provideAccessKeys:o}),yield this.plugin.saveSettings()}))})}addOneSettingsBlock(t,n,s){let a=t.createEl("details",{cls:"tasks-nested-settings",attr:Pe({},n.open||s[n.text]?{open:!0}:{})});a.empty(),a.ontoggle=()=>{s[n.text]=a.open,ht({headingOpened:s}),this.plugin.saveSettings()};let o=a.createEl("summary");if(new Ce.Setting(o).setHeading().setName(n.text),o.createDiv("collapser").createDiv("handle"),n.notice!==null){let l=a.createEl("div",{cls:n.notice.class,text:n.notice.text});n.notice.html!==null&&l.insertAdjacentHTML("beforeend",n.notice.html)}n.settings.forEach(l=>{if(!(l.featureFlag!==""&&!Bb(l.featureFlag))&&(l.type==="checkbox"?new Ce.Setting(a).setName(l.name).setDesc(l.description).addToggle(c=>{let f=ue();f.generalSettings[l.settingName]||Os(l.settingName,l.initialValue),c.setValue(f.generalSettings[l.settingName]).onChange(p=>Q(this,null,function*(){Os(l.settingName,p),yield this.plugin.saveSettings()}))}):l.type==="text"?new Ce.Setting(a).setName(l.name).setDesc(l.description).addText(c=>{let f=ue();f.generalSettings[l.settingName]||Os(l.settingName,l.initialValue);let p=g=>Q(this,null,function*(){Os(l.settingName,g),yield this.plugin.saveSettings()});c.setPlaceholder(l.placeholder.toString()).setValue(f.generalSettings[l.settingName].toString()).onChange((0,Ce.debounce)(p,500,!0))}):l.type==="textarea"?new Ce.Setting(a).setName(l.name).setDesc(l.description).addTextArea(c=>{let f=ue();f.generalSettings[l.settingName]||Os(l.settingName,l.initialValue);let p=g=>Q(this,null,function*(){Os(l.settingName,g),yield this.plugin.saveSettings()});c.setPlaceholder(l.placeholder.toString()).setValue(f.generalSettings[l.settingName].toString()).onChange((0,Ce.debounce)(p,500,!0)),c.inputEl.rows=8,c.inputEl.cols=40}):l.type==="function"&&this.customFunctions[l.settingName](a,this),l.notice!==null)){let c=a.createEl("p",{cls:l.notice.class,text:l.notice.text});l.notice.html!==null&&c.insertAdjacentHTML("beforeend",l.notice.html)}})}static parseCommaSeparatedFolders(t){return t.split(",").map(n=>n.trim()).map(n=>n.replace(/^\/|\/$/g,"")).filter(n=>n!=="")}static renderFolderArray(t){return t.join(",")}insertTaskCoreStatusSettings(t,n){let{statusSettings:s}=ue();s.coreStatuses.forEach(a=>{ew(t,a,s.coreStatuses,s,n,n.plugin,!0)})}insertCustomTaskStatusSettings(t,n){let{statusSettings:s}=ue();s.customStatuses.forEach(f=>{ew(t,f,s.customStatuses,s,n,n.plugin,!1)}),t.createEl("div"),new Ce.Setting(t).addButton(f=>{f.setButtonText("Add New Task Status").setCta().onClick(()=>Q(this,null,function*(){Tt.addStatus(s.customStatuses,new xt("","","",!1,"TODO")),yield Li(s,n)}))}).infoEl.remove();let o=[["AnuPpuccin Theme",Bv()],["Aura Theme",zv()],["Ebullientworks Theme",Vv()],["ITS Theme & SlRvb Checkboxes",Kv()],["Minimal Theme",Qv()],["Things Theme",Xv()],["LYT Mode Theme (Dark mode only)",Zv()]];for(let[f,p]of o)new Ce.Setting(t).addButton(T=>{let S=`${f}: Add ${p.length} supported Statuses`;T.setButtonText(S).onClick(()=>Q(this,null,function*(){yield LF(p,s,n)}))}).infoEl.remove();new Ce.Setting(t).addButton(f=>{f.setButtonText("Add All Unknown Status Types").setCta().onClick(()=>Q(this,null,function*(){let g=this.plugin.getTasks().map(S=>S.status),T=He.getInstance().findUnknownStatuses(g);T.length!==0&&(T.forEach(S=>{Tt.addStatus(s.customStatuses,S)}),yield Li(s,n))}))}).infoEl.remove(),new Ce.Setting(t).addButton(f=>{f.setButtonText("Reset Custom Status Types to Defaults").setWarning().onClick(()=>Q(this,null,function*(){Tt.resetAllCustomStatuses(s),yield Li(s,n)}))}).infoEl.remove()}},mo=dr;mo.createFragmentWithHTML=t=>createFragment(n=>n.createDiv().innerHTML=t);function ew(r,e,t,n,s,a,o){let l=r.createEl("pre");l.addClass("row-for-status"),l.textContent=new me(e).previewText();let c=new Ce.Setting(r);c.infoEl.replaceWith(l),o||c.addExtraButton(f=>{f.setIcon("cross").setTooltip("Delete").onClick(()=>Q(this,null,function*(){Tt.deleteStatus(t,e)&&(yield Li(n,s))}))}),c.addExtraButton(f=>{f.setIcon("pencil").setTooltip("Edit").onClick(()=>Q(this,null,function*(){let p=new cr(a,e,o);p.onClose=()=>Q(this,null,function*(){p.saved&&Tt.replaceStatus(t,e,p.statusConfiguration())&&(yield Li(n,s))}),p.open()}))}),c.infoEl.remove()}function LF(r,e,t){return Q(this,null,function*(){Tt.bulkAddStatusCollection(e,r).forEach(s=>{new Ce.Notice(s)}),yield Li(e,t)})}function Li(r,e){return Q(this,null,function*(){ht({statusSettings:r}),Tt.applyToStatusRegistry(r,He.getInstance()),yield e.saveSettings(!0)})}function YF(r){let{settingEl:e,infoEl:t,controlEl:n}=r,s=n.querySelector("textarea");console.log({settingEl:e,infoEl:t,controlEl:n,textEl:s}),s!==null&&(e.style.display="block",t.style.marginRight="0px",s.style.minWidth="-webkit-fill-available")}var tw=require("obsidian");var wl=class extends tw.EditorSuggest{constructor(t,n){super(t);this.settings=n}onTrigger(t,n,s){if(!this.settings.autoSuggestInEditor)return null;let a=n.getLine(t.line);return Le.includedIn(a)&&a.match(ie.taskRegex)?{start:{line:t.line,ch:0},end:{line:t.line,ch:a.length},query:a}:null}getSuggestions(t){var o,l,c;let n=t.query,s=t.editor.getCursor();return((c=(l=(o=to()).buildSuggestions)==null?void 0:l.call(o,n,s.ch,this.settings))!=null?c:[]).map(f=>tr(Pe({},f),{context:t}))}renderSuggestion(t,n){n.setText(t.displayText)}selectSuggestion(t,n){var c,f,p;let s=t.context.editor;if(t.suggestionType==="empty"){this.close();let g=new KeyboardEvent("keydown",{code:"Enter",key:"Enter"});(f=(c=s==null?void 0:s.cm)==null?void 0:c.contentDOM)==null||f.dispatchEvent(g);return}let a=t.context.editor.getCursor(),o={line:a.line,ch:(p=t.insertAt)!=null?p:a.ch},l=t.insertSkip?{line:a.line,ch:o.ch+t.insertSkip}:void 0;t.context.editor.replaceRange(t.appendText,o,l),t.context.editor.setCursor({line:a.line,ch:o.ch+t.appendText.length})}};var rw=(r,e)=>{let t,n=new Promise((o,l)=>{t=o});return e(r,o=>{let l=o.map(c=>c.toFileLineString()).join(` `);t(l)}).open(),n};var nw=(r,e)=>{let t=$u({line:"",path:""});return new Xn({app:r,task:t,onSubmit:e})};var sw=r=>({createTaskLineModal:()=>rw(r,nw)});var kl=class extends iw.Plugin{get apiV1(){return sw(app)}onload(){return Q(this,null,function*(){Fu.registerConsoleLogger(),console.log('loading plugin "tasks"'),yield this.loadSettings(),this.addSettingTab(new mo({plugin:this})),Xb({metadataCache:this.app.metadataCache,vault:this.app.vault,workspace:this.app.workspace}),yield this.loadTaskStatuses();let t=new Hu({obsidianEvents:this.app.workspace});this.cache=new Ms({metadataCache:this.app.metadataCache,vault:this.app.vault,events:t}),this.inlineRenderer=new Bu({plugin:this}),this.queryRenderer=new vl({plugin:this,events:t}),this.registerEditorExtension(Rv()),this.registerEditorSuggest(new wl(this.app,ue())),new Gu({plugin:this})})}loadTaskStatuses(){return Q(this,null,function*(){let{statusSettings:t}=ue();Tt.applyToStatusRegistry(t,He.getInstance())})}onunload(){var t;console.log('unloading plugin "tasks"'),(t=this.cache)==null||t.unload()}loadSettings(){return Q(this,null,function*(){let t=yield this.loadData();ht(t),yield this.loadTaskStatuses()})}saveSettings(){return Q(this,null,function*(){yield this.saveData(ue())})}getTasks(){var t;return(t=this.cache)==null?void 0:t.getTasks()}}; /*! * EventEmitter2 * https://github.com/hij1nx/EventEmitter2 * * Copyright (c) 2013 hij1nx * Licensed under the MIT license. */ //! authors : Tim Wood, Iskren Chernev, Moment.js contributors //! license : MIT //! moment.js //! momentjs.com //! version : 2.29.4