notes/.obsidian/plugins/obsidian-tasks-plugin/main.js

164 lines
315 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source visit the plugins github repository
*/
/*
License obsidian-tasks:
MIT License
Copyright (c) 2021 Martin Schenck
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
/*
License rrule (included library):
rrule.js: Library for working with recurrence rules for calendar dates.
=======================================================================
Copyright 2010, Jakub Roztocil <jakub@roztocil.name> and Lars Schöning
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of The author nor the names of its contributors may
be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR AND CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
./rrule.js and ./test/tests.js is based on python-dateutil. LICENCE:
python-dateutil - Extensions to the standard Python datetime module.
====================================================================
Copyright (c) 2003-2011 - Gustavo Niemeyer <gustavo@niemeyer.net>
Copyright (c) 2012 - Tomi Pieviläinen <tomi.pievilainen@iki.fi>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
License chrono-node (included library):
The MIT License
Copyright (c) 2014, Wanasit Tanakitrungruang
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
"use strict";var F_=Object.create;var Zn=Object.defineProperty,U_=Object.defineProperties,q_=Object.getOwnPropertyDescriptor,L_=Object.getOwnPropertyDescriptors,W_=Object.getOwnPropertyNames,af=Object.getOwnPropertySymbols,Y_=Object.getPrototypeOf,uf=Object.prototype.hasOwnProperty,$_=Object.prototype.propertyIsEnumerable;var of=(r,e,t)=>e in r?Zn(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Me=(r,e)=>{for(var t in e||(e={}))uf.call(e,t)&&of(r,t,e[t]);if(af)for(var t of af(e))$_.call(e,t)&&of(r,t,e[t]);return r},dt=(r,e)=>U_(r,L_(e));var p=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),j_=(r,e)=>{for(var t in e)Zn(r,t,{get:e[t],enumerable:!0})},lf=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of W_(e))!uf.call(r,i)&&i!==t&&Zn(r,i,{get:()=>e[i],enumerable:!(n=q_(e,i))||n.enumerable});return r};var Os=(r,e,t)=>(t=r!=null?F_(Y_(r)):{},lf(e||!r||!r.__esModule?Zn(t,"default",{value:r,enumerable:!0}):t,r)),B_=r=>lf(Zn({},"__esModule",{value:!0}),r);var B=(r,e,t)=>new Promise((n,i)=>{var s=u=>{try{o(t.next(u))}catch(l){i(l)}},a=u=>{try{o(t.throw(u))}catch(l){i(l)}},o=u=>u.done?n(u.value):Promise.resolve(u.value).then(s,a);o((t=t.apply(r,e)).next())});var Cf=p((Fk,xs)=>{var pf,hf,mf,yf,gf,_f,Tf,bf,vf,Ss,mo,Ef,wf,Rf,ln,Mf,Df,Of,Pf,kf,Af,Sf,Nf,xf,Ns;(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 xs=="object"&&typeof xs.exports=="object"?r(t(e,t(xs.exports))):r(t(e));function t(n,i){return n!==e&&(typeof Object.create=="function"?Object.defineProperty(n,"__esModule",{value:!0}):n.__esModule=!0),function(s,a){return n[s]=i?i(s,a):a}}})(function(r){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])};pf=function(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");e(n,i);function s(){this.constructor=n}n.prototype=i===null?Object.create(i):(s.prototype=i.prototype,new s)},hf=Object.assign||function(n){for(var i,s=1,a=arguments.length;s<a;s++){i=arguments[s];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])}return n},mf=function(n,i){var s={};for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&i.indexOf(a)<0&&(s[a]=n[a]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,a=Object.getOwnPropertySymbols(n);o<a.length;o++)i.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(n,a[o])&&(s[a[o]]=n[a[o]]);return s},yf=function(n,i,s,a){var o=arguments.length,u=o<3?i:a===null?a=Object.getOwnPropertyDescriptor(i,s):a,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,i,s,a);else for(var c=n.length-1;c>=0;c--)(l=n[c])&&(u=(o<3?l(u):o>3?l(i,s,u):l(i,s))||u);return o>3&&u&&Object.defineProperty(i,s,u),u},gf=function(n,i){return function(s,a){i(s,a,n)}},_f=function(n,i){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,i)},Tf=function(n,i,s,a){function o(u){return u instanceof s?u:new s(function(l){l(u)})}return new(s||(s=Promise))(function(u,l){function c(h){try{f(a.next(h))}catch(_){l(_)}}function d(h){try{f(a.throw(h))}catch(_){l(_)}}function f(h){h.done?u(h.value):o(h.value).then(c,d)}f((a=a.apply(n,i||[])).next())})},bf=function(n,i){var s={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},a,o,u,l;return l={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function c(f){return function(h){return d([f,h])}}function d(f){if(a)throw new TypeError("Generator is already executing.");for(;s;)try{if(a=1,o&&(u=f[0]&2?o.return:f[0]?o.throw||((u=o.return)&&u.call(o),0):o.next)&&!(u=u.call(o,f[1])).done)return u;switch(o=0,u&&(f=[f[0]&2,u.value]),f[0]){case 0:case 1:u=f;break;case 4:return s.label++,{value:f[1],done:!1};case 5:s.label++,o=f[1],f=[0];continue;case 7:f=s.ops.pop(),s.trys.pop();continue;default:if(u=s.trys,!(u=u.length>0&&u[u.length-1])&&(f[0]===6||f[0]===2)){s=0;continue}if(f[0]===3&&(!u||f[1]>u[0]&&f[1]<u[3])){s.label=f[1];break}if(f[0]===6&&s.label<u[1]){s.label=u[1],u=f;break}if(u&&s.label<u[2]){s.label=u[2],s.ops.push(f);break}u[2]&&s.ops.pop(),s.trys.pop();continue}f=i.call(n,s)}catch(h){f=[6,h],o=0}finally{a=u=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},vf=function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&Ns(i,n,s)},Ns=Object.create?function(n,i,s,a){a===void 0&&(a=s);var o=Object.getOwnPropertyDescriptor(i,s);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,a,o)}:function(n,i,s,a){a===void 0&&(a=s),n[a]=i[s]},Ss=function(n){var i=typeof Symbol=="function"&&Symbol.iterator,s=i&&n[i],a=0;if(s)return s.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&a>=n.length&&(n=void 0),{value:n&&n[a++],done:!n}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")},mo=function(n,i){var s=typeof Symbol=="function"&&n[Symbol.iterator];if(!s)return n;var a=s.call(n),o,u=[],l;try{for(;(i===void 0||i-- >0)&&!(o=a.next()).done;)u.push(o.value)}catch(c){l={error:c}}finally{try{o&&!o.done&&(s=a.return)&&s.call(a)}finally{if(l)throw l.error}}return u},Ef=function(){for(var n=[],i=0;i<arguments.length;i++)n=n.concat(mo(arguments[i]));return n},wf=function(){for(var n=0,i=0,s=arguments.length;i<s;i++)n+=arguments[i].length;for(var a=Array(n),o=0,i=0;i<s;i++)for(var u=arguments[i],l=0,c=u.length;l<c;l++,o++)a[o]=u[l];return a},Rf=function(n,i,s){if(s||arguments.length===2)for(var a=0,o=i.length,u;a<o;a++)(u||!(a in i))&&(u||(u=Array.prototype.slice.call(i,0,a)),u[a]=i[a]);return n.concat(u||Array.prototype.slice.call(i))},ln=function(n){return this instanceof ln?(this.v=n,this):new ln(n)},Mf=function(n,i,s){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a=s.apply(n,i||[]),o,u=[];return o={},l("next"),l("throw"),l("return"),o[Symbol.asyncIterator]=function(){return this},o;function l(m){a[m]&&(o[m]=function(g){return new Promise(function(R,w){u.push([m,g,R,w])>1||c(m,g)})})}function c(m,g){try{d(a[m](g))}catch(R){_(u[0][3],R)}}function d(m){m.value instanceof ln?Promise.resolve(m.value.v).then(f,h):_(u[0][2],m)}function f(m){c("next",m)}function h(m){c("throw",m)}function _(m,g){m(g),u.shift(),u.length&&c(u[0][0],u[0][1])}},Df=function(n){var i,s;return i={},a("next"),a("throw",function(o){throw o}),a("return"),i[Symbol.iterator]=function(){return this},i;function a(o,u){i[o]=n[o]?function(l){return(s=!s)?{value:ln(n[o](l)),done:o==="return"}:u?u(l):l}:u}},Of=function(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=n[Symbol.asyncIterator],s;return i?i.call(n):(n=typeof Ss=="function"?Ss(n):n[Symbol.iterator](),s={},a("next"),a("throw"),a("return"),s[Symbol.asyncIterator]=function(){return this},s);function a(u){s[u]=n[u]&&function(l){return new Promise(function(c,d){l=n[u](l),o(c,d,l.done,l.value)})}}function o(u,l,c,d){Promise.resolve(d).then(function(f){u({value:f,done:c})},l)}},Pf=function(n,i){return Object.defineProperty?Object.defineProperty(n,"raw",{value:i}):n.raw=i,n};var t=Object.create?function(n,i){Object.defineProperty(n,"default",{enumerable:!0,value:i})}:function(n,i){n.default=i};kf=function(n){if(n&&n.__esModule)return n;var i={};if(n!=null)for(var s in n)s!=="default"&&Object.prototype.hasOwnProperty.call(n,s)&&Ns(i,n,s);return t(i,n),i},Af=function(n){return n&&n.__esModule?n:{default:n}},Sf=function(n,i,s,a){if(s==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof i=="function"?n!==i||!a:!i.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?a:s==="a"?a.call(n):a?a.value:i.get(n)},Nf=function(n,i,s,a,o){if(a==="m")throw new TypeError("Private method is not writable");if(a==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof i=="function"?n!==i||!o:!i.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return a==="a"?o.call(n,s):o?o.value=s:i.set(n,s),s},xf=function(n,i){if(i===null||typeof i!="object"&&typeof i!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof n=="function"?i===n:n.has(i)},r("__extends",pf),r("__assign",hf),r("__rest",mf),r("__decorate",yf),r("__param",gf),r("__metadata",_f),r("__awaiter",Tf),r("__generator",bf),r("__exportStar",vf),r("__createBinding",Ns),r("__values",Ss),r("__read",mo),r("__spread",Ef),r("__spreadArrays",wf),r("__spreadArray",Rf),r("__await",ln),r("__asyncGenerator",Mf),r("__asyncDelegator",Df),r("__asyncValues",Of),r("__makeTemplateObject",Pf),r("__importStar",kf),r("__importDefault",Af),r("__classPrivateFieldGet",Sf),r("__classPrivateFieldSet",Nf),r("__classPrivateFieldIn",xf)})});var re=p(Tr=>{"use strict";Object.defineProperty(Tr,"__esModule",{value:!0});Tr.matchAnyPattern=Tr.extractTerms=Tr.repeatedTimeunitPattern=void 0;function vT(r,e){let t=e.replace(/\((?!\?)/g,"(?:");return`${r}${t}\\s{0,5}(?:,?\\s{0,5}${t}){0,10}`}Tr.repeatedTimeunitPattern=vT;function hp(r){let e;return r instanceof Array?e=[...r]:r instanceof Map?e=Array.from(r.keys()):e=Object.keys(r),e}Tr.extractTerms=hp;function ET(r){return`(?:${hp(r).sort((t,n)=>n.length-t.length).join("|").replace(/\./g,"\\.")})`}Tr.matchAnyPattern=ET});var X=p((vo,Eo)=>{(function(r,e){typeof vo=="object"&&typeof Eo!="undefined"?Eo.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs=e()})(vo,function(){"use strict";var r=1e3,e=6e4,t=36e5,n="millisecond",i="second",s="minute",a="hour",o="day",u="week",l="month",c="quarter",d="year",f="date",h="Invalid Date",_=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|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,g={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("_")},R=function(A,E,b){var N=String(A);return!N||N.length>=E?A:""+Array(E+1-N.length).join(b)+A},w={s:R,z:function(A){var E=-A.utcOffset(),b=Math.abs(E),N=Math.floor(b/60),y=b%60;return(E<=0?"+":"-")+R(N,2,"0")+":"+R(y,2,"0")},m:function A(E,b){if(E.date()<b.date())return-A(b,E);var N=12*(b.year()-E.year())+(b.month()-E.month()),y=E.clone().add(N,l),x=b-y<0,S=E.clone().add(N+(x?-1:1),l);return+(-(N+(b-y)/(x?y-S:S-y))||0)},a:function(A){return A<0?Math.ceil(A)||0:Math.floor(A)},p:function(A){return{M:l,y:d,w:u,d:o,D:f,h:a,m:s,s:i,ms:n,Q:c}[A]||String(A||"").toLowerCase().replace(/s$/,"")},u:function(A){return A===void 0}},k="en",z={};z[k]=g;var fe=function(A){return A instanceof ct},he=function(A,E,b){var N;if(!A)return k;if(typeof A=="string")z[A]&&(N=A),E&&(z[A]=E,N=A);else{var y=A.name;z[y]=A,N=y}return!b&&N&&(k=N),N||!b&&k},ne=function(A,E){if(fe(A))return A.clone();var b=typeof E=="object"?E:{};return b.date=A,b.args=arguments,new ct(b)},Y=w;Y.l=he,Y.i=fe,Y.w=function(A,E){return ne(A,{locale:E.$L,utc:E.$u,x:E.$x,$offset:E.$offset})};var ct=function(){function A(b){this.$L=he(b.locale,null,!0),this.parse(b)}var E=A.prototype;return E.parse=function(b){this.$d=function(N){var y=N.date,x=N.utc;if(y===null)return new Date(NaN);if(Y.u(y))return new Date;if(y instanceof Date)return new Date(y);if(typeof y=="string"&&!/Z$/i.test(y)){var S=y.match(_);if(S){var I=S[2]-1||0,ee=(S[7]||"0").substring(0,3);return x?new Date(Date.UTC(S[1],I,S[3]||1,S[4]||0,S[5]||0,S[6]||0,ee)):new Date(S[1],I,S[3]||1,S[4]||0,S[5]||0,S[6]||0,ee)}}return new Date(y)}(b),this.$x=b.x||{},this.init()},E.init=function(){var b=this.$d;this.$y=b.getFullYear(),this.$M=b.getMonth(),this.$D=b.getDate(),this.$W=b.getDay(),this.$H=b.getHours(),this.$m=b.getMinutes(),this.$s=b.getSeconds(),this.$ms=b.getMilliseconds()},E.$utils=function(){return Y},E.isValid=function(){return this.$d.toString()!==h},E.isSame=function(b,N){var y=ne(b);return this.startOf(N)<=y&&y<=this.endOf(N)},E.isAfter=function(b,N){return ne(b)<this.startOf(N)},E.isBefore=function(b,N){return this.endOf(N)<ne(b)},E.$g=function(b,N,y){return Y.u(b)?this[N]:this.set(y,b)},E.unix=function(){return Math.floor(this.valueOf()/1e3)},E.valueOf=function(){return this.$d.getTime()},E.startOf=function(b,N){var y=this,x=!!Y.u(N)||N,S=Y.p(b),I=function(zt,Ie){var rt=Y.w(y.$u?Date.UTC(y.$y,Ie,zt):new Date(y.$y,Ie,zt),y);return x?rt:rt.endOf(o)},ee=function(zt,Ie){return Y.w(y.toDate()[zt].apply(y.toDate("s"),(x?[0,0,0,0]:[23,59,59,999]).slice(Ie)),y)},V=this.$W,se=this.$M,ae=this.$D,Ce="set"+(this.$u?"UTC":"");switch(S){case d:return x?I(1,0):I(31,11);case l:return x?I(1,se):I(0,se+1);case u:var He=this.$locale().weekStart||0,tt=(V<He?V+7:V)-He;return I(x?ae-tt:ae+(6-tt),se);case o:case f:return ee(Ce+"Hours",0);case a:return ee(Ce+"Minutes",1);case s:return ee(Ce+"Seconds",2);case i:return ee(Ce+"Milliseconds",3);default:return this.clone()}},E.endOf=function(b){return this.startOf(b,!1)},E.$set=function(b,N){var y,x=Y.p(b),S="set"+(this.$u?"UTC":""),I=(y={},y[o]=S+"Date",y[f]=S+"Date",y[l]=S+"Month",y[d]=S+"FullYear",y[a]=S+"Hours",y[s]=S+"Minutes",y[i]=S+"Seconds",y[n]=S+"Milliseconds",y)[x],ee=x===o?this.$D+(N-this.$W):N;if(x===l||x===d){var V=this.clone().set(f,1);V.$d[I](ee),V.init(),this.$d=V.set(f,Math.min(this.$D,V.daysInMonth())).$d}else I&&this.$d[I](ee);return this.init(),this},E.set=function(b,N){return this.clone().$set(b,N)},E.get=function(b){return this[Y.p(b)]()},E.add=function(b,N){var y,x=this;b=Number(b);var S=Y.p(N),I=function(se){var ae=ne(x);return Y.w(ae.date(ae.date()+Math.round(se*b)),x)};if(S===l)return this.set(l,this.$M+b);if(S===d)return this.set(d,this.$y+b);if(S===o)return I(1);if(S===u)return I(7);var ee=(y={},y[s]=e,y[a]=t,y[i]=r,y)[S]||1,V=this.$d.getTime()+b*ee;return Y.w(V,this)},E.subtract=function(b,N){return this.add(-1*b,N)},E.format=function(b){var N=this,y=this.$locale();if(!this.isValid())return y.invalidDate||h;var x=b||"YYYY-MM-DDTHH:mm:ssZ",S=Y.z(this),I=this.$H,ee=this.$m,V=this.$M,se=y.weekdays,ae=y.months,Ce=function(Ie,rt,nn,Kt){return Ie&&(Ie[rt]||Ie(N,x))||nn[rt].substr(0,Kt)},He=function(Ie){return Y.s(I%12||12,Ie,"0")},tt=y.meridiem||function(Ie,rt,nn){var Kt=Ie<12?"AM":"PM";return nn?Kt.toLowerCase():Kt},zt={YY:String(this.$y).slice(-2),YYYY:this.$y,M:V+1,MM:Y.s(V+1,2,"0"),MMM:Ce(y.monthsShort,V,ae,3),MMMM:Ce(ae,V),D:this.$D,DD:Y.s(this.$D,2,"0"),d:String(this.$W),dd:Ce(y.weekdaysMin,this.$W,se,2),ddd:Ce(y.weekdaysShort,this.$W,se,3),dddd:se[this.$W],H:String(I),HH:Y.s(I,2,"0"),h:He(1),hh:He(2),a:tt(I,ee,!0),A:tt(I,ee,!1),m:String(ee),mm:Y.s(ee,2,"0"),s:String(this.$s),ss:Y.s(this.$s,2,"0"),SSS:Y.s(this.$ms,3,"0"),Z:S};return x.replace(m,function(Ie,rt){return rt||zt[Ie]||S.replace(":","")})},E.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},E.diff=function(b,N,y){var x,S=Y.p(N),I=ne(b),ee=(I.utcOffset()-this.utcOffset())*e,V=this-I,se=Y.m(this,I);return se=(x={},x[d]=se/12,x[l]=se,x[c]=se/3,x[u]=(V-ee)/6048e5,x[o]=(V-ee)/864e5,x[a]=V/t,x[s]=V/e,x[i]=V/r,x)[S]||V,y?se:Y.a(se)},E.daysInMonth=function(){return this.endOf(l).$D},E.$locale=function(){return z[this.$L]},E.locale=function(b,N){if(!b)return this.$L;var y=this.clone(),x=he(b,N,!0);return x&&(y.$L=x),y},E.clone=function(){return Y.w(this.$d,this)},E.toDate=function(){return new Date(this.valueOf())},E.toJSON=function(){return this.isValid()?this.toISOString():null},E.toISOString=function(){return this.$d.toISOString()},E.toString=function(){return this.$d.toUTCString()},A}(),et=ct.prototype;return ne.prototype=et,[["$ms",n],["$s",i],["$m",s],["$H",a],["$W",o],["$M",l],["$y",d],["$D",f]].forEach(function(A){et[A[1]]=function(E){return this.$g(E,A[0],A[1])}}),ne.extend=function(A,E){return A.$i||(A(E,ct,ne),A.$i=!0),ne},ne.locale=he,ne.isDayjs=fe,ne.unix=function(A){return ne(1e3*A)},ne.en=z[k],ne.Ls=z,ne.p={},ne})});var Ue=p(br=>{"use strict";var wT=br&&br.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(br,"__esModule",{value:!0});br.findYearClosestToRef=br.findMostLikelyADYear=void 0;var RT=wT(X());function MT(r){return r<100&&(r>50?r=r+1900:r=r+2e3),r}br.findMostLikelyADYear=MT;function DT(r,e,t){let n=RT.default(r),i=n;i=i.month(t-1),i=i.date(e),i=i.year(n.year());let s=i.add(1,"y"),a=i.add(-1,"y");return Math.abs(s.diff(n))<Math.abs(i.diff(n))?i=s:Math.abs(a.diff(n))<Math.abs(i.diff(n))&&(i=a),i.year()}br.findYearClosestToRef=DT});var qe=p(L=>{"use strict";Object.defineProperty(L,"__esModule",{value:!0});L.parseTimeUnits=L.TIME_UNITS_PATTERN=L.parseYear=L.YEAR_PATTERN=L.parseOrdinalNumberPattern=L.ORDINAL_NUMBER_PATTERN=L.parseNumberPattern=L.NUMBER_PATTERN=L.TIME_UNIT_DICTIONARY=L.ORDINAL_WORD_DICTIONARY=L.INTEGER_WORD_DICTIONARY=L.MONTH_DICTIONARY=L.FULL_MONTH_NAME_DICTIONARY=L.WEEKDAY_DICTIONARY=void 0;var Fs=re(),OT=Ue();L.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};L.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};L.MONTH_DICTIONARY=Object.assign(Object.assign({},L.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});L.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};L.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};L.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"};L.NUMBER_PATTERN=`(?:${Fs.matchAnyPattern(L.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 yp(r){let e=r.toLowerCase();return L.INTEGER_WORD_DICTIONARY[e]!==void 0?L.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)}L.parseNumberPattern=yp;L.ORDINAL_NUMBER_PATTERN=`(?:${Fs.matchAnyPattern(L.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:st|nd|rd|th)?)`;function PT(r){let e=r.toLowerCase();return L.ORDINAL_WORD_DICTIONARY[e]!==void 0?L.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}L.parseOrdinalNumberPattern=PT;L.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 kT(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 OT.findMostLikelyADYear(e)}L.parseYear=kT;var gp=`(${L.NUMBER_PATTERN})\\s{0,3}(${Fs.matchAnyPattern(L.TIME_UNIT_DICTIONARY)})`,mp=new RegExp(gp,"i");L.TIME_UNITS_PATTERN=Fs.repeatedTimeunitPattern("(?:(?:about|around)\\s{0,3})?",gp);function AT(r){let e={},t=r,n=mp.exec(t);for(;n;)ST(e,n),t=t.substring(n[0].length).trim(),n=mp.exec(t);return e}L.parseTimeUnits=AT;function ST(r,e){let t=yp(e[1]),n=L.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var _p=p((wo,Ro)=>{(function(r,e){typeof wo=="object"&&typeof Ro!="undefined"?Ro.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs_plugin_quarterOfYear=e()})(wo,function(){"use strict";var r="month",e="quarter";return function(t,n){var i=n.prototype;i.quarter=function(o){return this.$utils().u(o)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(o-1))};var s=i.add;i.add=function(o,u){return o=Number(o),this.$utils().p(u)===e?this.add(3*o,r):s.bind(this)(o,u)};var a=i.startOf;i.startOf=function(o,u){var l=this.$utils(),c=!!l.u(u)||u;if(l.p(o)===e){var d=this.quarter()-1;return c?this.month(3*d).startOf(r).startOf("day"):this.month(3*d+2).endOf(r).endOf("day")}return a.bind(this)(o,u)}}})});var ht=p(Lt=>{"use strict";Object.defineProperty(Lt,"__esModule",{value:!0});Lt.implySimilarTime=Lt.assignSimilarTime=Lt.assignSimilarDate=Lt.assignTheNextDay=void 0;var Tp=we();function NT(r,e){e=e.add(1,"day"),bp(r,e),vp(r,e)}Lt.assignTheNextDay=NT;function bp(r,e){r.assign("day",e.date()),r.assign("month",e.month()+1),r.assign("year",e.year())}Lt.assignSimilarDate=bp;function xT(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",Tp.Meridiem.AM):r.assign("meridiem",Tp.Meridiem.PM)}Lt.assignSimilarTime=xT;function vp(r,e){r.imply("hour",e.hour()),r.imply("minute",e.minute()),r.imply("second",e.second()),r.imply("millisecond",e.millisecond())}Lt.implySimilarTime=vp});var Ep=p(Ir=>{"use strict";Object.defineProperty(Ir,"__esModule",{value:!0});Ir.toTimezoneOffset=Ir.TIMEZONE_ABBR_MAP=void 0;Ir.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 CT(r){var e;return r==null?null:typeof r=="number"?r:(e=Ir.TIMEZONE_ABBR_MAP[r])!==null&&e!==void 0?e:null}Ir.toTimezoneOffset=CT});var me=p(Wt=>{"use strict";var wp=Wt&&Wt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Wt,"__esModule",{value:!0});Wt.ParsingResult=Wt.ParsingComponents=Wt.ReferenceWithTimezone=void 0;var IT=wp(_p()),Us=wp(X()),Mo=ht(),FT=Ep();Us.default.extend(IT.default);var Do=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=FT.toTimezoneOffset(e.timezone))}};Wt.ReferenceWithTimezone=Do;var Fr=class{constructor(e,t){if(this.reference=e,this.knownValues={},this.impliedValues={},t)for(let i in t)this.knownValues[i]=t[i];let n=Us.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 Fr(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 Us.default(this.date())}date(){let e=this.dateWithoutTimezoneAdjustment();return new Date(e.getTime()+this.getSystemTimezoneAdjustmentMinute(e)*6e4)}dateWithoutTimezoneAdjustment(){let e=new Date(this.get("year"),this.get("month")-1,this.get("day"),this.get("hour"),this.get("minute"),this.get("second"),this.get("millisecond"));return e.setFullYear(this.get("year")),e}getSystemTimezoneAdjustmentMinute(e){var t,n;(!e||e.getTime()<0)&&(e=new Date);let i=-e.getTimezoneOffset(),s=(n=(t=this.get("timezoneOffset"))!==null&&t!==void 0?t:this.reference.timezoneOffset)!==null&&n!==void 0?n:i;return i-s}static createRelativeFromReference(e,t){let n=Us.default(e.instant);for(let s in t)n=n.add(t[s],s);let i=new Fr(e);return t.hour||t.minute||t.second?(Mo.assignSimilarTime(i,n),Mo.assignSimilarDate(i,n),e.timezoneOffset!==null&&i.assign("timezoneOffset",-e.instant.getTimezoneOffset())):(Mo.implySimilarTime(i,n),e.timezoneOffset!==null&&i.imply("timezoneOffset",-e.instant.getTimezoneOffset()),t.d?(i.assign("day",n.date()),i.assign("month",n.month()+1),i.assign("year",n.year())):(t.week&&i.imply("weekday",n.day()),i.imply("day",n.date()),t.month?(i.assign("month",n.month()+1),i.assign("year",n.year())):(i.imply("month",n.month()+1),t.year?i.assign("year",n.year()):i.imply("year",n.year())))),i}};Wt.ParsingComponents=Fr;var si=class{constructor(e,t,n,i,s){this.reference=e,this.refDate=e.instant,this.index=t,this.text=n,this.start=i||new Fr(e),this.end=s}clone(){let e=new si(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}', ...}]`}};Wt.ParsingResult=si});var M=p(qs=>{"use strict";Object.defineProperty(qs,"__esModule",{value:!0});qs.AbstractParserWithWordBoundaryChecking=void 0;var Oo=class{constructor(){this.cachedInnerPattern=null,this.cachedPattern=null}patternLeftBoundary(){return"(\\W|^)"}pattern(e){let t=this.innerPattern(e);return t==this.cachedInnerPattern?this.cachedPattern:(this.cachedPattern=new RegExp(`${this.patternLeftBoundary()}${t.source}`,t.flags),this.cachedInnerPattern=t,this.cachedPattern)}extract(e,t){var n;let i=(n=t[1])!==null&&n!==void 0?n:"";t.index=t.index+i.length,t[0]=t[0].substring(i.length);for(let s=2;s<t.length;s++)t[s-1]=t[s];return this.innerExtract(e,t)}};qs.AbstractParserWithWordBoundaryChecking=Oo});var Rp=p(Ao=>{"use strict";Object.defineProperty(Ao,"__esModule",{value:!0});var ko=qe(),UT=me(),qT=M(),LT=new RegExp(`(?:within|in|for)\\s*(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${ko.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),WT=new RegExp(`(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${ko.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Po=class extends qT.AbstractParserWithWordBoundaryChecking{innerPattern(e){return e.option.forwardDate?WT:LT}innerExtract(e,t){let n=ko.parseTimeUnits(t[1]);return UT.ParsingComponents.createRelativeFromReference(e.reference,n)}};Ao.default=Po});var Ap=p(No=>{"use strict";Object.defineProperty(No,"__esModule",{value:!0});var YT=Ue(),Pp=qe(),kp=qe(),Ls=qe(),$T=re(),jT=M(),BT=new RegExp(`(?:on\\s{0,3})?(${Ls.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:to|\\-|\\\u2013|until|through|till)?\\s{0,3}(${Ls.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s{0,3}(?:of)?\\s{0,3})(${$T.matchAnyPattern(Pp.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s{0,3})(${kp.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Mp=1,Dp=2,GT=3,Op=4,So=class extends jT.AbstractParserWithWordBoundaryChecking{innerPattern(){return BT}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Pp.MONTH_DICTIONARY[t[GT].toLowerCase()],s=Ls.parseOrdinalNumberPattern(t[Mp]);if(s>31)return t.index=t.index+t[Mp].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[Op]){let a=kp.parseYear(t[Op]);n.start.assign("year",a)}else{let a=YT.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[Dp]){let a=Ls.parseOrdinalNumberPattern(t[Dp]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};No.default=So});var Ip=p(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});var HT=Ue(),xp=qe(),Ws=qe(),Cp=qe(),zT=re(),KT=M(),VT=new RegExp(`(${zT.matchAnyPattern(xp.MONTH_DICTIONARY)})(?:-|/|\\s*,?\\s*)(${Ws.ORDINAL_NUMBER_PATTERN})(?!\\s*(?:am|pm))\\s*(?:(?:to|\\-)\\s*(${Ws.ORDINAL_NUMBER_PATTERN})\\s*)?(?:(?:-|/|\\s*,?\\s*)(${Cp.YEAR_PATTERN}))?(?=\\W|$)(?!\\:\\d)`,"i"),XT=1,ZT=2,Sp=3,Np=4,xo=class extends KT.AbstractParserWithWordBoundaryChecking{innerPattern(){return VT}innerExtract(e,t){let n=xp.MONTH_DICTIONARY[t[XT].toLowerCase()],i=Ws.parseOrdinalNumberPattern(t[ZT]);if(i>31)return null;let s=e.createParsingComponents({day:i,month:n});if(t[Np]){let u=Cp.parseYear(t[Np]);s.assign("year",u)}else{let u=HT.findYearClosestToRef(e.refDate,i,n);s.imply("year",u)}if(!t[Sp])return s;let a=Ws.parseOrdinalNumberPattern(t[Sp]),o=e.createParsingResult(t.index,t[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",a),o}};Co.default=xo});var qp=p(Uo=>{"use strict";Object.defineProperty(Uo,"__esModule",{value:!0});var Io=qe(),QT=Ue(),JT=re(),Up=qe(),eb=M(),tb=new RegExp(`((?:in)\\s*)?(${JT.matchAnyPattern(Io.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${Up.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),rb=1,nb=2,Fp=3,Fo=class extends eb.AbstractParserWithWordBoundaryChecking{innerPattern(){return tb}innerExtract(e,t){let n=t[nb].toLowerCase();if(t[0].length<=3&&!Io.FULL_MONTH_NAME_DICTIONARY[n])return null;let i=e.createParsingResult(t.index+(t[rb]||"").length,t.index+t[0].length);i.start.imply("day",1);let s=Io.MONTH_DICTIONARY[n];if(i.start.assign("month",s),t[Fp]){let a=Up.parseYear(t[Fp]);i.start.assign("year",a)}else{let a=QT.findYearClosestToRef(e.refDate,1,s);i.start.imply("year",a)}return i}};Uo.default=Fo});var Yp=p(Lo=>{"use strict";Object.defineProperty(Lo,"__esModule",{value:!0});var Wp=qe(),ib=re(),sb=M(),ab=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${ib.matchAnyPattern(Wp.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),ob=1,ub=2,Lp=3,lb=4,qo=class extends sb.AbstractParserWithWordBoundaryChecking{innerPattern(){return ab}innerExtract(e,t){let n=t[Lp]?parseInt(t[Lp]):Wp.MONTH_DICTIONARY[t[ub].toLowerCase()];if(n<1||n>12)return null;let i=parseInt(t[ob]);return{day:parseInt(t[lb]),month:n,year:i}}};Lo.default=qo});var $p=p(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});var cb=M(),db=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),fb=1,pb=2,Wo=class extends cb.AbstractParserWithWordBoundaryChecking{innerPattern(){return db}innerExtract(e,t){let n=parseInt(t[pb]),i=parseInt(t[fb]);return e.createParsingComponents().imply("day",1).assign("month",i).assign("year",n)}};Yo.default=Wo});var Ur=p(js=>{"use strict";Object.defineProperty(js,"__esModule",{value:!0});js.AbstractTimeExpressionParser=void 0;var Ge=we();function hb(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 mb(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 jp=2,pn=3,Ys=4,$s=5,ai=6,$o=class{constructor(e=!1){this.cachedPrimaryPrefix=null,this.cachedPrimarySuffix=null,this.cachedPrimaryTimePattern=null,this.cachedFollowingPhase=null,this.cachedFollowingSuffix=null,this.cachedFollowingTimePatten=null,this.strictMode=e}patternFlags(){return"i"}primaryPatternLeftBoundary(){return"(^|\\s|T|\\b)"}primarySuffix(){return"(?=\\W|$)"}followingSuffix(){return"(?=\\W|$)"}pattern(e){return this.getPrimaryTimePatternThroughCache()}extract(e,t){let n=this.extractPrimaryTimeComponents(e,t);if(!n)return t.index+=t[0].length,null;let i=t.index+t[1].length,s=t[0].substring(t[1].length),a=e.createParsingResult(i,s,n);t.index+=t[0].length;let o=e.text.substring(t.index),l=this.getFollowingTimePatternThroughCache().exec(o);return s.match(/^\d{3,4}/)&&l&&l[0].match(/^\s*([+-])\s*\d{2,4}$/)?null:!l||l[0].match(/^\s*([+-])\s*\d{3,4}$/)?this.checkAndReturnWithoutFollowingPattern(a):(a.end=this.extractFollowingTimeComponents(e,l,a),a.end&&(a.text+=l[0]),this.checkAndReturnWithFollowingPattern(a))}extractPrimaryTimeComponents(e,t,n=!1){let i=e.createParsingComponents(),s=0,a=null,o=parseInt(t[jp]);if(o>100){if(this.strictMode||t[pn]!=null)return null;s=o%100,o=Math.floor(o/100)}if(o>24)return null;if(t[pn]!=null){if(t[pn].length==1&&!t[ai])return null;s=parseInt(t[pn])}if(s>=60)return null;if(o>12&&(a=Ge.Meridiem.PM),t[ai]!=null){if(o>12)return null;let u=t[ai][0].toLowerCase();u=="a"&&(a=Ge.Meridiem.AM,o==12&&(o=0)),u=="p"&&(a=Ge.Meridiem.PM,o!=12&&(o+=12))}if(i.assign("hour",o),i.assign("minute",s),a!==null?i.assign("meridiem",a):o<12?i.imply("meridiem",Ge.Meridiem.AM):i.imply("meridiem",Ge.Meridiem.PM),t[$s]!=null){let u=parseInt(t[$s].substring(0,3));if(u>=1e3)return null;i.assign("millisecond",u)}if(t[Ys]!=null){let u=parseInt(t[Ys]);if(u>=60)return null;i.assign("second",u)}return i}extractFollowingTimeComponents(e,t,n){let i=e.createParsingComponents();if(t[$s]!=null){let u=parseInt(t[$s].substring(0,3));if(u>=1e3)return null;i.assign("millisecond",u)}if(t[Ys]!=null){let u=parseInt(t[Ys]);if(u>=60)return null;i.assign("second",u)}let s=parseInt(t[jp]),a=0,o=-1;if(t[pn]!=null?a=parseInt(t[pn]):s>100&&(a=s%100,s=Math.floor(s/100)),a>=60||s>24)return null;if(s>=12&&(o=Ge.Meridiem.PM),t[ai]!=null){if(s>12)return null;let u=t[ai][0].toLowerCase();u=="a"&&(o=Ge.Meridiem.AM,s==12&&(s=0,i.isCertain("day")||i.imply("day",i.get("day")+1))),u=="p"&&(o=Ge.Meridiem.PM,s!=12&&(s+=12)),n.start.isCertain("meridiem")||(o==Ge.Meridiem.AM?(n.start.imply("meridiem",Ge.Meridiem.AM),n.start.get("hour")==12&&n.start.assign("hour",0)):(n.start.imply("meridiem",Ge.Meridiem.PM),n.start.get("hour")!=12&&n.start.assign("hour",n.start.get("hour")+12)))}return i.assign("hour",s),i.assign("minute",a),o>=0?i.assign("meridiem",o):n.start.isCertain("meridiem")&&n.start.get("hour")>12?n.start.get("hour")-12>s?i.imply("meridiem",Ge.Meridiem.AM):s<=12&&(i.assign("hour",s+12),i.assign("meridiem",Ge.Meridiem.PM)):s>12?i.imply("meridiem",Ge.Meridiem.PM):s<=12&&i.imply("meridiem",Ge.Meridiem.AM),i.date().getTime()<n.start.date().getTime()&&i.imply("day",i.get("day")+1),i}checkAndReturnWithoutFollowingPattern(e){if(e.text.match(/^\d$/)||e.text.match(/^\d\d\d+$/)||e.text.match(/\d[apAP]$/))return null;let t=e.text.match(/[^\d:.](\d[\d.]+)$/);if(t){let n=t[1];if(this.strictMode||n.includes(".")&&!n.match(/\d(\.\d{2})+$/)||parseInt(n)>24)return null}return e}checkAndReturnWithFollowingPattern(e){if(e.text.match(/^\d+-\d+$/))return null;let t=e.text.match(/[^\d:.](\d[\d.]+)\s*-\s*(\d[\d.]+)$/);if(t){if(this.strictMode)return null;let n=t[1],i=t[2];if(i.includes(".")&&!i.match(/\d(\.\d{2})+$/))return null;let s=parseInt(i),a=parseInt(n);if(s>24||a>24)return null}return e}getPrimaryTimePatternThroughCache(){let e=this.primaryPrefix(),t=this.primarySuffix();return this.cachedPrimaryPrefix===e&&this.cachedPrimarySuffix===t?this.cachedPrimaryTimePattern:(this.cachedPrimaryTimePattern=hb(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=mb(e,t),this.cachedFollowingPhase=e,this.cachedFollowingSuffix=t,this.cachedFollowingTimePatten)}};js.AbstractTimeExpressionParser=$o});var Bp=p(Bo=>{"use strict";Object.defineProperty(Bo,"__esModule",{value:!0});var Bs=we(),yb=Ur(),jo=class extends yb.AbstractTimeExpressionParser{constructor(e){super(e)}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|to|\\?)\\s*"}primaryPrefix(){return"(?:(?:at|from)\\s*)??"}primarySuffix(){return"(?:\\s*(?:o\\W*clock|at\\s*night|in\\s*the\\s*(?:morning|afternoon)))?(?!/)(?=\\W|$)"}extractPrimaryTimeComponents(e,t){let n=super.extractPrimaryTimeComponents(e,t);if(n){if(t[0].endsWith("night")){let i=n.get("hour");i>=6&&i<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",Bs.Meridiem.PM)):i<6&&n.assign("meridiem",Bs.Meridiem.AM)}if(t[0].endsWith("afternoon")){n.assign("meridiem",Bs.Meridiem.PM);let i=n.get("hour");i>=0&&i<=6&&n.assign("hour",n.get("hour")+12)}t[0].endsWith("morning")&&(n.assign("meridiem",Bs.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};Bo.default=jo});var mt=p(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.addImpliedTimeUnits=hn.reverseTimeUnits=void 0;function gb(r){let e={};for(let t in r)e[t]=-r[t];return e}hn.reverseTimeUnits=gb;function _b(r,e){let t=r.clone(),n=r.dayjs();for(let i in e)n=n.add(e[i],i);return("day"in e||"d"in e||"week"in e||"month"in e||"year"in e)&&(t.imply("day",n.date()),t.imply("month",n.month()+1),t.imply("year",n.year())),("second"in e||"minute"in e||"hour"in e)&&(t.imply("second",n.second()),t.imply("minute",n.minute()),t.imply("hour",n.hour())),t}hn.addImpliedTimeUnits=_b});var Gp=p(zo=>{"use strict";Object.defineProperty(zo,"__esModule",{value:!0});var Ho=qe(),Tb=me(),bb=M(),vb=mt(),Eb=new RegExp(`(${Ho.TIME_UNITS_PATTERN})\\s{0,5}(?:ago|before|earlier)(?=(?:\\W|$))`,"i"),wb=new RegExp(`(${Ho.TIME_UNITS_PATTERN})\\s{0,5}ago(?=(?:\\W|$))`,"i"),Go=class extends bb.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?wb:Eb}innerExtract(e,t){let n=Ho.parseTimeUnits(t[1]),i=vb.reverseTimeUnits(n);return Tb.ParsingComponents.createRelativeFromReference(e.reference,i)}};zo.default=Go});var Hp=p(Xo=>{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});var Vo=qe(),Rb=me(),Mb=M(),Db=new RegExp(`(${Vo.TIME_UNITS_PATTERN})\\s{0,5}(?:later|after|from now|henceforth|forward|out)(?=(?:\\W|$))`,"i"),Ob=new RegExp("("+Vo.TIME_UNITS_PATTERN+")(later|from now)(?=(?:\\W|$))","i"),Pb=1,Ko=class extends Mb.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?Ob:Db}innerExtract(e,t){let n=Vo.parseTimeUnits(t[Pb]);return Rb.ParsingComponents.createRelativeFromReference(e.reference,n)}};Xo.default=Ko});var yn=p(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.MergingRefiner=mn.Filter=void 0;var Zo=class{refine(e,t){return t.filter(n=>this.isValid(e,n))}};mn.Filter=Zo;var Qo=class{refine(e,t){if(t.length<2)return t;let n=[],i=t[0],s=null;for(let a=1;a<t.length;a++){s=t[a];let o=e.text.substring(i.index+i.text.length,s.index);if(!this.shouldMergeResults(o,i,s,e))n.push(i),i=s;else{let u=i,l=s,c=this.mergeResults(o,u,l,e);e.debug(()=>{console.log(`${this.constructor.name} merged ${u} and ${l} into ${c}`)}),i=c}}return i!=null&&n.push(i),n}};mn.MergingRefiner=Qo});var Yt=p(eu=>{"use strict";Object.defineProperty(eu,"__esModule",{value:!0});var kb=yn(),Jo=class extends kb.MergingRefiner{shouldMergeResults(e,t,n){return!t.end&&!n.end&&e.match(this.patternBetween())!=null}mergeResults(e,t,n){if(!t.start.isOnlyWeekdayComponent()&&!n.start.isOnlyWeekdayComponent()&&(n.start.getCertainComponents().forEach(s=>{t.start.isCertain(s)||t.start.assign(s,n.start.get(s))}),t.start.getCertainComponents().forEach(s=>{n.start.isCertain(s)||n.start.assign(s,t.start.get(s))})),t.start.date().getTime()>n.start.date().getTime()){let s=t.start.dayjs(),a=n.start.dayjs();t.start.isOnlyWeekdayComponent()&&s.add(-7,"days").isBefore(a)?(s=s.add(-7,"days"),t.start.imply("day",s.date()),t.start.imply("month",s.month()+1),t.start.imply("year",s.year())):n.start.isOnlyWeekdayComponent()&&a.add(7,"days").isAfter(s)?(a=a.add(7,"days"),n.start.imply("day",a.date()),n.start.imply("month",a.month()+1),n.start.imply("year",a.year())):[n,t]=[t,n]}let i=t.clone();return i.start=t.start,i.end=n.start,i.index=Math.min(t.index,n.index),t.index<n.index?i.text=t.text+e+n.text:i.text=n.text+e+t.text,i}};eu.default=Jo});var zp=p(oi=>{"use strict";var Ab=oi&&oi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(oi,"__esModule",{value:!0});var Sb=Ab(Yt()),tu=class extends Sb.default{patternBetween(){return/^\s*(to|-)\s*$/i}};oi.default=tu});var Kp=p(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.mergeDateTimeComponent=gn.mergeDateTimeResult=void 0;var Nb=we();function xb(r,e){let t=r.clone(),n=r.start,i=e.start;if(t.start=ru(n,i),r.end!=null||e.end!=null){let s=r.end==null?r.start:r.end,a=e.end==null?e.start:e.end,o=ru(s,a);r.end==null&&o.date().getTime()<t.start.date().getTime()&&(o.isCertain("day")?o.assign("day",o.get("day")+1):o.imply("day",o.get("day")+1)),t.end=o}return t}gn.mergeDateTimeResult=xb;function ru(r,e){let t=r.clone();return e.isCertain("hour")?(t.assign("hour",e.get("hour")),t.assign("minute",e.get("minute")),e.isCertain("second")?(t.assign("second",e.get("second")),e.isCertain("millisecond")?t.assign("millisecond",e.get("millisecond")):t.imply("millisecond",e.get("millisecond"))):(t.imply("second",e.get("second")),t.imply("millisecond",e.get("millisecond")))):(t.imply("hour",e.get("hour")),t.imply("minute",e.get("minute")),t.imply("second",e.get("second")),t.imply("millisecond",e.get("millisecond"))),e.isCertain("timezoneOffset")&&t.assign("timezoneOffset",e.get("timezoneOffset")),e.isCertain("meridiem")?t.assign("meridiem",e.get("meridiem")):e.get("meridiem")!=null&&t.get("meridiem")==null&&t.imply("meridiem",e.get("meridiem")),t.get("meridiem")==Nb.Meridiem.PM&&t.get("hour")<12&&(e.isCertain("hour")?t.assign("hour",t.get("hour")+12):t.imply("hour",t.get("hour")+12)),t}gn.mergeDateTimeComponent=ru});var Zt=p(iu=>{"use strict";Object.defineProperty(iu,"__esModule",{value:!0});var Cb=yn(),Vp=Kp(),nu=class extends Cb.MergingRefiner{shouldMergeResults(e,t,n){return(t.start.isOnlyDate()&&n.start.isOnlyTime()||n.start.isOnlyDate()&&t.start.isOnlyTime())&&e.match(this.patternBetween())!=null}mergeResults(e,t,n){let i=t.start.isOnlyDate()?Vp.mergeDateTimeResult(t,n):Vp.mergeDateTimeResult(n,t);return i.index=t.index,i.text=t.text+e+n.text,i}};iu.default=nu});var Xp=p(ui=>{"use strict";var Ib=ui&&ui.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ui,"__esModule",{value:!0});var Fb=Ib(Zt()),su=class extends Fb.default{patternBetween(){return new RegExp("^\\s*(T|at|after|before|on|of|,|-)?\\s*$")}};ui.default=su});var Zp=p(ou=>{"use strict";Object.defineProperty(ou,"__esModule",{value:!0});var Ub=new RegExp("^\\s*,?\\s*\\(?([A-Z]{2,4})\\)?(?=\\W|$)","i"),qb={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},au=class{constructor(e){this.timezone=Object.assign(Object.assign({},qb),e)}refine(e,t){var n;let i=(n=e.option.timezones)!==null&&n!==void 0?n:{};return t.forEach(s=>{var a,o;let u=e.text.substring(s.index+s.text.length),l=Ub.exec(u);if(!l)return;let c=l[1].toUpperCase(),d=(o=(a=i[c])!==null&&a!==void 0?a:this.timezone[c])!==null&&o!==void 0?o:null;if(d===null)return;e.debug(()=>{console.log(`Extracting timezone: '${c}' into: ${d} for: ${s.start}`)});let f=s.start.get("timezoneOffset");f!==null&&d!=f&&(s.start.isCertain("timezoneOffset")||c!=l[1])||s.start.isOnlyDate()&&c!=l[1]||(s.text+=l[0],s.start.isCertain("timezoneOffset")||s.start.assign("timezoneOffset",d),s.end!=null&&!s.end.isCertain("timezoneOffset")&&s.end.assign("timezoneOffset",d))}),t}};ou.default=au});var Gs=p(lu=>{"use strict";Object.defineProperty(lu,"__esModule",{value:!0});var Lb=new RegExp("^\\s*(?:\\(?(?:GMT|UTC)\\s?)?([+-])(\\d{1,2})(?::?(\\d{2}))?\\)?","i"),Wb=1,Yb=2,$b=3,uu=class{refine(e,t){return t.forEach(function(n){if(n.start.isCertain("timezoneOffset"))return;let i=e.text.substring(n.index+n.text.length),s=Lb.exec(i);if(!s)return;e.debug(()=>{console.log(`Extracting timezone: '${s[0]}' into : ${n}`)});let a=parseInt(s[Yb]),o=parseInt(s[$b]||"0"),u=a*60+o;u>14*60||(s[Wb]==="-"&&(u=-u),n.end!=null&&n.end.assign("timezoneOffset",u),n.start.assign("timezoneOffset",u),n.text+=s[0])}),t}};lu.default=uu});var Qp=p(du=>{"use strict";Object.defineProperty(du,"__esModule",{value:!0});var cu=class{refine(e,t){if(t.length<2)return t;let n=[],i=t[0];for(let s=1;s<t.length;s++){let a=t[s];a.index<i.index+i.text.length?a.text.length>i.text.length&&(i=a):(n.push(i),i=a)}return i!=null&&n.push(i),n}};du.default=cu});var Jp=p(li=>{"use strict";var jb=li&&li.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(li,"__esModule",{value:!0});var Bb=jb(X()),fu=class{refine(e,t){return e.option.forwardDate&&t.forEach(function(n){let i=Bb.default(e.refDate);if(n.start.isOnlyDayMonthComponent()&&i.isAfter(n.start.dayjs()))for(let s=0;s<3&&i.isAfter(n.start.dayjs());s++)n.start.imply("year",n.start.get("year")+1),e.debug(()=>{console.log(`Forward yearly adjusted for ${n} (${n.start})`)}),n.end&&!n.end.isCertain("year")&&(n.end.imply("year",n.end.get("year")+1),e.debug(()=>{console.log(`Forward yearly adjusted for ${n} (${n.end})`)}));n.start.isOnlyWeekdayComponent()&&i.isAfter(n.start.dayjs())&&(i.day()>=n.start.get("weekday")?i=i.day(n.start.get("weekday")+7):i=i.day(n.start.get("weekday")),n.start.imply("day",i.date()),n.start.imply("month",i.month()+1),n.start.imply("year",i.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.start})`)}),n.end&&n.end.isOnlyWeekdayComponent()&&(i.day()>n.end.get("weekday")?i=i.day(n.end.get("weekday")+7):i=i.day(n.end.get("weekday")),n.end.imply("day",i.date()),n.end.imply("month",i.month()+1),n.end.imply("year",i.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.end})`)})))}),t}};li.default=fu});var eh=p(hu=>{"use strict";Object.defineProperty(hu,"__esModule",{value:!0});var Gb=yn(),pu=class extends Gb.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}};hu.default=pu});var gu=p(yu=>{"use strict";Object.defineProperty(yu,"__esModule",{value:!0});var Hb=M(),zb=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"),Kb=1,Vb=2,Xb=3,th=4,Zb=5,rh=6,nh=7,ih=8,sh=9,mu=class extends Hb.AbstractParserWithWordBoundaryChecking{innerPattern(){return zb}innerExtract(e,t){let n={};if(n.year=parseInt(t[Kb]),n.month=parseInt(t[Vb]),n.day=parseInt(t[Xb]),t[th]!=null)if(n.hour=parseInt(t[th]),n.minute=parseInt(t[Zb]),t[rh]!=null&&(n.second=parseInt(t[rh])),t[nh]!=null&&(n.millisecond=parseInt(t[nh])),t[ih]==null)n.timezoneOffset=0;else{let i=parseInt(t[ih]),s=0;t[sh]!=null&&(s=parseInt(t[sh]));let a=i*60;a<0?a-=s:a+=s,n.timezoneOffset=a}return n}};yu.default=mu});var ah=p(Tu=>{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});var Qb=yn(),_u=class extends Qb.MergingRefiner{mergeResults(e,t,n){let i=n.clone();return i.index=t.index,i.text=t.text+e+i.text,i.start.assign("weekday",t.start.get("weekday")),i.end&&i.end.assign("weekday",t.start.get("weekday")),i}shouldMergeResults(e,t,n){return t.start.isOnlyWeekdayComponent()&&!t.start.isCertain("hour")&&n.start.isCertain("day")&&e.match(/^,?\s*$/)!=null}};Tu.default=_u});var Qt=p(_n=>{"use strict";var qr=_n&&_n.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(_n,"__esModule",{value:!0});_n.includeCommonConfiguration=void 0;var Jb=qr(Zp()),ev=qr(Gs()),oh=qr(Qp()),tv=qr(Jp()),rv=qr(eh()),nv=qr(gu()),iv=qr(ah());function sv(r,e=!1){return r.parsers.unshift(new nv.default),r.refiners.unshift(new iv.default),r.refiners.unshift(new Jb.default),r.refiners.unshift(new ev.default),r.refiners.unshift(new oh.default),r.refiners.push(new oh.default),r.refiners.push(new tv.default),r.refiners.push(new rv.default(e)),r}_n.includeCommonConfiguration=sv});var er=p(te=>{"use strict";var av=te&&te.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(te,"__esModule",{value:!0});te.noon=te.morning=te.midnight=te.yesterdayEvening=te.evening=te.lastNight=te.tonight=te.theDayAfter=te.tomorrow=te.theDayBefore=te.yesterday=te.today=te.now=void 0;var $t=me(),Tn=av(X()),Jt=ht(),ci=we();function ov(r){let e=Tn.default(r.instant),t=new $t.ParsingComponents(r,{});return Jt.assignSimilarDate(t,e),Jt.assignSimilarTime(t,e),r.timezoneOffset!==null&&t.assign("timezoneOffset",e.utcOffset()),t}te.now=ov;function uv(r){let e=Tn.default(r.instant),t=new $t.ParsingComponents(r,{});return Jt.assignSimilarDate(t,e),Jt.implySimilarTime(t,e),t}te.today=uv;function lv(r){return uh(r,1)}te.yesterday=lv;function uh(r,e){return bu(r,-e)}te.theDayBefore=uh;function cv(r){return bu(r,1)}te.tomorrow=cv;function bu(r,e){let t=Tn.default(r.instant),n=new $t.ParsingComponents(r,{});return t=t.add(e,"day"),Jt.assignSimilarDate(n,t),Jt.implySimilarTime(n,t),n}te.theDayAfter=bu;function dv(r,e=22){let t=Tn.default(r.instant),n=new $t.ParsingComponents(r,{});return n.imply("hour",e),n.imply("meridiem",ci.Meridiem.PM),Jt.assignSimilarDate(n,t),n}te.tonight=dv;function fv(r,e=0){let t=Tn.default(r.instant),n=new $t.ParsingComponents(r,{});return t.hour()<6&&(t=t.add(-1,"day")),Jt.assignSimilarDate(n,t),n.imply("hour",e),n}te.lastNight=fv;function pv(r,e=20){let t=new $t.ParsingComponents(r,{});return t.imply("meridiem",ci.Meridiem.PM),t.imply("hour",e),t}te.evening=pv;function hv(r,e=20){let t=Tn.default(r.instant),n=new $t.ParsingComponents(r,{});return t=t.add(-1,"day"),Jt.assignSimilarDate(n,t),n.imply("hour",e),n.imply("meridiem",ci.Meridiem.PM),n}te.yesterdayEvening=hv;function mv(r){let e=new $t.ParsingComponents(r,{});return e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e}te.midnight=mv;function yv(r,e=6){let t=new $t.ParsingComponents(r,{});return t.imply("meridiem",ci.Meridiem.AM),t.imply("hour",e),t}te.morning=yv;function gv(r){let e=new $t.ParsingComponents(r,{});return e.imply("meridiem",ci.Meridiem.AM),e.imply("hour",12),e}te.noon=gv});var lh=p(Rt=>{"use strict";var _v=Rt&&Rt.__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]}),Tv=Rt&&Rt.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),bv=Rt&&Rt.__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)&&_v(e,r,t);return Tv(e,r),e},vv=Rt&&Rt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Rt,"__esModule",{value:!0});var Ev=vv(X()),wv=M(),Rv=ht(),di=bv(er()),Mv=/(now|today|tonight|tomorrow|tmr|tmrw|yesterday|last\s*night)(?=\W|$)/i,vu=class extends wv.AbstractParserWithWordBoundaryChecking{innerPattern(e){return Mv}innerExtract(e,t){let n=Ev.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();switch(i){case"now":return di.now(e.reference);case"today":return di.today(e.reference);case"yesterday":return di.yesterday(e.reference);case"tomorrow":case"tmr":case"tmrw":return di.tomorrow(e.reference);case"tonight":return di.tonight(e.reference);default:i.match(/last\s*night/)&&(n.hour()>6&&(n=n.add(-1,"day")),Rv.assignSimilarDate(s,n),s.imply("hour",0));break}return s}};Rt.default=vu});var ch=p(fi=>{"use strict";var Dv=fi&&fi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(fi,"__esModule",{value:!0});var Hs=we(),Ov=M(),Pv=Dv(X()),kv=ht(),Av=/(?:this)?\s{0,3}(morning|afternoon|evening|night|midnight|noon)(?=\W|$)/i,Eu=class extends Ov.AbstractParserWithWordBoundaryChecking{innerPattern(){return Av}innerExtract(e,t){let n=Pv.default(e.refDate),i=e.createParsingComponents();switch(t[1].toLowerCase()){case"afternoon":i.imply("meridiem",Hs.Meridiem.PM),i.imply("hour",15);break;case"evening":case"night":i.imply("meridiem",Hs.Meridiem.PM),i.imply("hour",20);break;case"midnight":kv.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"morning":i.imply("meridiem",Hs.Meridiem.AM),i.imply("hour",6);break;case"noon":i.imply("meridiem",Hs.Meridiem.AM),i.imply("hour",12);break}return i}};fi.default=Eu});var Lr=p(vr=>{"use strict";var Sv=vr&&vr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(vr,"__esModule",{value:!0});vr.toDayJSClosestWeekday=vr.toDayJSWeekday=void 0;var dh=Sv(X());function Nv(r,e,t){if(!t)return fh(r,e);let n=dh.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}vr.toDayJSWeekday=Nv;function fh(r,e){let t=dh.default(r),n=t.day();return Math.abs(e-7-n)<Math.abs(e-n)?t=t.day(e-7):Math.abs(e+7-n)<Math.abs(e-n)?t=t.day(e+7):t=t.day(e),t}vr.toDayJSClosestWeekday=fh});var hh=p(Ru=>{"use strict";Object.defineProperty(Ru,"__esModule",{value:!0});var ph=qe(),xv=re(),Cv=M(),Iv=Lr(),Fv=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:on\\s*?)?(?:(this|last|past|next)\\s*)?(${xv.matchAnyPattern(ph.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(this|last|past|next)\\s*week)?(?=\\W|$)`,"i"),Uv=1,qv=2,Lv=3,wu=class extends Cv.AbstractParserWithWordBoundaryChecking{innerPattern(){return Fv}innerExtract(e,t){let n=t[qv].toLowerCase(),i=ph.WEEKDAY_DICTIONARY[n],s=t[Uv],a=t[Lv],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o=="last"||o=="past"?u="last":o=="next"?u="next":o=="this"&&(u="this");let l=Iv.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Ru.default=wu});var gh=p(pi=>{"use strict";var Wv=pi&&pi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(pi,"__esModule",{value:!0});var yh=qe(),mh=me(),Yv=Wv(X()),$v=M(),jv=re(),Bv=new RegExp(`(this|last|past|next|after\\s*this)\\s*(${jv.matchAnyPattern(yh.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),Gv=1,Hv=2,Mu=class extends $v.AbstractParserWithWordBoundaryChecking{innerPattern(){return Bv}innerExtract(e,t){let n=t[Gv].toLowerCase(),i=t[Hv].toLowerCase(),s=yh.TIME_UNIT_DICTIONARY[i];if(n=="next"||n.startsWith("after")){let u={};return u[s]=1,mh.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="last"||n=="past"){let u={};return u[s]=-1,mh.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=Yv.default(e.reference.instant);return i.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):i.match(/month/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):i.match(/year/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};pi.default=Mu});var Mt=p(En=>{"use strict";Object.defineProperty(En,"__esModule",{value:!0});En.ParsingContext=En.Chrono=void 0;var bn=me(),zv=Du(),vn=class{constructor(e){e=e||zv.createCasualConfiguration(),this.parsers=[...e.parsers],this.refiners=[...e.refiners]}clone(){return new vn({parsers:[...this.parsers],refiners:[...this.refiners]})}parseDate(e,t,n){let i=this.parse(e,t,n);return i.length>0?i[0].start.date():null}parse(e,t,n){let i=new zs(e,t,n),s=[];return this.parsers.forEach(a=>{let o=vn.executeParser(i,a);s=s.concat(o)}),s.sort((a,o)=>a.index-o.index),this.refiners.forEach(function(a){s=a.refine(i,s)}),s}static executeParser(e,t){let n=[],i=t.pattern(e),s=e.text,a=e.text,o=i.exec(a);for(;o;){let u=o.index+s.length-a.length;o.index=u;let l=t.extract(e,o);if(!l){a=s.substring(o.index+1),o=i.exec(a);continue}let c=null;l instanceof bn.ParsingResult?c=l:l instanceof bn.ParsingComponents?(c=e.createParsingResult(o.index,o[0]),c.start=l):c=e.createParsingResult(o.index,o[0],l),e.debug(()=>console.log(`${t.constructor.name} extracted result ${c}`)),n.push(c),a=s.substring(u+c.text.length),o=i.exec(a)}return n}};En.Chrono=vn;var zs=class{constructor(e,t,n){this.text=e,this.reference=new bn.ReferenceWithTimezone(t),this.option=n!=null?n:{},this.refDate=this.reference.instant}createParsingComponents(e){return e instanceof bn.ParsingComponents?e:new bn.ParsingComponents(this.reference,e)}createParsingResult(e,t,n,i){let s=typeof t=="string"?t:this.text.substring(e,t),a=n?this.createParsingComponents(n):null,o=i?this.createParsingComponents(i):null;return new bn.ParsingResult(this.reference,e,s,a,o)}debug(e){this.option.debug&&(this.option.debug instanceof Function?this.option.debug(e):this.option.debug.debug(e))}};En.ParsingContext=zs});var Wr=p(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});var _h=Ue(),Kv=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"),Ks=1,Th=5,bh=2,vh=3,Ou=4,Pu=class{constructor(e){this.groupNumberMonth=e?vh:bh,this.groupNumberDay=e?bh:vh}pattern(){return Kv}extract(e,t){if(t[Ks]=="/"||t[Th]=="/"){t.index+=t[0].length;return}let n=t.index+t[Ks].length,i=t[0].substr(t[Ks].length,t[0].length-t[Ks].length-t[Th].length);if(i.match(/^\d\.\d$/)||i.match(/^\d\.\d{1,2}\.\d{1,2}\s*$/)||!t[Ou]&&t[0].indexOf("/")<0)return;let s=e.createParsingResult(n,i),a=parseInt(t[this.groupNumberMonth]),o=parseInt(t[this.groupNumberDay]);if((a<1||a>12)&&a>12)if(o>=1&&o<=12&&a<=31)[o,a]=[a,o];else return null;if(o<1||o>31)return null;if(s.start.assign("day",o),s.start.assign("month",a),t[Ou]){let u=parseInt(t[Ou]),l=_h.findMostLikelyADYear(u);s.start.assign("year",l)}else{let u=_h.findYearClosestToRef(e.refDate,o,a);s.start.imply("year",u)}return s}};ku.default=Pu});var wh=p(Su=>{"use strict";Object.defineProperty(Su,"__esModule",{value:!0});var Eh=qe(),Vv=me(),Xv=M(),Zv=mt(),Qv=new RegExp(`(this|last|past|next|after|\\+|-)\\s*(${Eh.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Au=class extends Xv.AbstractParserWithWordBoundaryChecking{innerPattern(){return Qv}innerExtract(e,t){let n=t[1].toLowerCase(),i=Eh.parseTimeUnits(t[2]);switch(n){case"last":case"past":case"-":i=Zv.reverseTimeUnits(i);break}return Vv.ParsingComponents.createRelativeFromReference(e.reference,i)}};Su.default=Au});var Mh=p(Cu=>{"use strict";Object.defineProperty(Cu,"__esModule",{value:!0});var Jv=yn(),Nu=me(),e1=qe(),t1=mt();function Rh(r){return r.text.match(/\s+(before|from)$/i)!=null}function r1(r){return r.text.match(/\s+(after|since)$/i)!=null}var xu=class extends Jv.MergingRefiner{patternBetween(){return/^\s*$/i}shouldMergeResults(e,t,n){return!e.match(this.patternBetween())||!Rh(t)&&!r1(t)?!1:!!n.start.get("day")&&!!n.start.get("month")&&!!n.start.get("year")}mergeResults(e,t,n){let i=e1.parseTimeUnits(t.text);Rh(t)&&(i=t1.reverseTimeUnits(i));let s=Nu.ParsingComponents.createRelativeFromReference(new Nu.ReferenceWithTimezone(n.start.date()),i);return new Nu.ParsingResult(n.reference,t.index,`${t.text}${e}${n.text}`,s)}};Cu.default=xu});var Du=p(be=>{"use strict";var De=be&&be.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(be,"__esModule",{value:!0});be.createConfiguration=be.createCasualConfiguration=be.parseDate=be.parse=be.GB=be.strict=be.casual=void 0;var n1=De(Rp()),i1=De(Ap()),s1=De(Ip()),a1=De(qp()),o1=De(Yp()),u1=De($p()),l1=De(Bp()),c1=De(Gp()),d1=De(Hp()),f1=De(zp()),p1=De(Xp()),h1=Qt(),m1=De(lh()),y1=De(ch()),g1=De(hh()),_1=De(gh()),Iu=Mt(),T1=De(Wr()),b1=De(wh()),v1=De(Mh());be.casual=new Iu.Chrono(Dh(!1));be.strict=new Iu.Chrono(Vs(!0,!1));be.GB=new Iu.Chrono(Vs(!1,!0));function E1(r,e,t){return be.casual.parse(r,e,t)}be.parse=E1;function w1(r,e,t){return be.casual.parseDate(r,e,t)}be.parseDate=w1;function Dh(r=!1){let e=Vs(!1,r);return e.parsers.unshift(new m1.default),e.parsers.unshift(new y1.default),e.parsers.unshift(new a1.default),e.parsers.unshift(new _1.default),e.parsers.unshift(new b1.default),e}be.createCasualConfiguration=Dh;function Vs(r=!0,e=!1){return h1.includeCommonConfiguration({parsers:[new T1.default(e),new n1.default,new i1.default,new s1.default,new g1.default,new o1.default,new u1.default,new l1.default(r),new c1.default(r),new d1.default(r)],refiners:[new v1.default,new p1.default,new f1.default]},r)}be.createConfiguration=Vs});var Oh=p(Uu=>{"use strict";Object.defineProperty(Uu,"__esModule",{value:!0});var R1=Ur(),Fu=class extends R1.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)}};Uu.default=Fu});var hi=p(ie=>{"use strict";Object.defineProperty(ie,"__esModule",{value:!0});ie.parseTimeUnits=ie.TIME_UNITS_PATTERN=ie.parseYear=ie.YEAR_PATTERN=ie.parseNumberPattern=ie.NUMBER_PATTERN=ie.TIME_UNIT_DICTIONARY=ie.INTEGER_WORD_DICTIONARY=ie.MONTH_DICTIONARY=ie.WEEKDAY_DICTIONARY=void 0;var qu=re(),M1=Ue();ie.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};ie.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};ie.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};ie.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"};ie.NUMBER_PATTERN=`(?:${qu.matchAnyPattern(ie.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s*an?)?|an?\\b(?:\\s*few)?|few|several|a?\\s*couple\\s*(?:of)?)`;function kh(r){let e=r.toLowerCase();return ie.INTEGER_WORD_DICTIONARY[e]!==void 0?ie.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)}ie.parseNumberPattern=kh;ie.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 D1(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 M1.findMostLikelyADYear(e)}ie.parseYear=D1;var Ah=`(${ie.NUMBER_PATTERN})\\s{0,5}(${qu.matchAnyPattern(ie.TIME_UNIT_DICTIONARY)})\\s{0,5}`,Ph=new RegExp(Ah,"i");ie.TIME_UNITS_PATTERN=qu.repeatedTimeunitPattern("",Ah);function O1(r){let e={},t=r,n=Ph.exec(t);for(;n;)P1(e,n),t=t.substring(n[0].length),n=Ph.exec(t);return e}ie.parseTimeUnits=O1;function P1(r,e){let t=kh(e[1]),n=ie.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Nh=p(Wu=>{"use strict";Object.defineProperty(Wu,"__esModule",{value:!0});var Sh=hi(),k1=re(),A1=M(),S1=Lr(),N1=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:a[mn]\\s*?)?(?:(diese[mn]|letzte[mn]|n(?:\xE4|ae)chste[mn])\\s*)?(${k1.matchAnyPattern(Sh.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(diese|letzte|n(?:\xE4|ae)chste)\\s*woche)?(?=\\W|$)`,"i"),x1=1,C1=3,I1=2,Lu=class extends A1.AbstractParserWithWordBoundaryChecking{innerPattern(){return N1}innerExtract(e,t){let n=t[I1].toLowerCase(),i=Sh.WEEKDAY_DICTIONARY[n],s=t[x1],a=t[C1],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o.match(/letzte/)?u="last":o.match(/chste/)?u="next":o.match(/diese/)&&(u="this");let l=S1.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Wu.default=Lu});var Fh=p(Yu=>{"use strict";Object.defineProperty(Yu,"__esModule",{value:!0});var Er=we(),F1=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"),U1=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"),q1=2,xh=3,Ch=4,Ih=5,wn=class{pattern(e){return F1}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=wn.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let i=e.text.substring(t.index+t[0].length),s=U1.exec(i);return s&&(n.end=wn.extractTimeComponent(n.start.clone(),s),n.end&&(n.text+=s[0])),n}static extractTimeComponent(e,t){let n=0,i=0,s=null;if(n=parseInt(t[q1]),t[xh]!=null&&(i=parseInt(t[xh])),i>=60||n>24)return null;if(n>=12&&(s=Er.Meridiem.PM),t[Ih]!=null){if(n>12)return null;let a=t[Ih].toLowerCase();a.match(/morgen|vormittag/)&&(s=Er.Meridiem.AM,n==12&&(n=0)),a.match(/nachmittag|abend/)&&(s=Er.Meridiem.PM,n!=12&&(n+=12)),a.match(/nacht/)&&(n==12?(s=Er.Meridiem.AM,n=0):n<6?s=Er.Meridiem.AM:(s=Er.Meridiem.PM,n+=12))}if(e.assign("hour",n),e.assign("minute",i),s!==null?e.assign("meridiem",s):n<12?e.imply("meridiem",Er.Meridiem.AM):e.imply("meridiem",Er.Meridiem.PM),t[Ch]!=null){let a=parseInt(t[Ch]);if(a>=60)return null;e.assign("second",a)}return e}};Yu.default=wn});var Uh=p(mi=>{"use strict";var L1=mi&&mi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(mi,"__esModule",{value:!0});var W1=L1(Yt()),$u=class extends W1.default{patternBetween(){return/^\s*(bis(?:\s*(?:am|zum))?|-)\s*$/i}};mi.default=$u});var qh=p(yi=>{"use strict";var Y1=yi&&yi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(yi,"__esModule",{value:!0});var $1=Y1(Zt()),ju=class extends $1.default{patternBetween(){return new RegExp("^\\s*(T|um|am|,|-)?\\s*$")}};yi.default=ju});var Bu=p(_i=>{"use strict";var j1=_i&&_i.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(_i,"__esModule",{value:!0});var B1=j1(X()),Yr=we(),G1=M(),H1=ht(),z1=mt(),gi=class extends G1.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(diesen)?\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht)(?=\W|$)/i}innerExtract(e,t){let n=B1.default(e.refDate),i=t[2].toLowerCase(),s=e.createParsingComponents();return H1.implySimilarTime(s,n),gi.extractTimeComponents(s,i)}static extractTimeComponents(e,t){switch(t){case"morgen":e.imply("hour",6),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Yr.Meridiem.AM);break;case"vormittag":e.imply("hour",9),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Yr.Meridiem.AM);break;case"mittag":case"mittags":e.imply("hour",12),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Yr.Meridiem.AM);break;case"nachmittag":e.imply("hour",15),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Yr.Meridiem.PM);break;case"abend":e.imply("hour",18),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Yr.Meridiem.PM);break;case"nacht":e.imply("hour",22),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Yr.Meridiem.PM);break;case"mitternacht":e.get("hour")>1&&(e=z1.addImpliedTimeUnits(e,{day:1})),e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Yr.Meridiem.AM);break}return e}};_i.default=gi});var Yh=p(Dt=>{"use strict";var K1=Dt&&Dt.__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]}),V1=Dt&&Dt.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),X1=Dt&&Dt.__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)&&K1(e,r,t);return V1(e,r),e},Wh=Dt&&Dt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Dt,"__esModule",{value:!0});var Z1=Wh(X()),Q1=M(),$r=ht(),J1=Wh(Bu()),Lh=X1(er()),eE=new RegExp("(jetzt|heute|morgen|\xFCbermorgen|uebermorgen|gestern|vorgestern|letzte\\s*nacht)(?:\\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht))?(?=\\W|$)","i"),tE=1,rE=2,Gu=class extends Q1.AbstractParserWithWordBoundaryChecking{innerPattern(e){return eE}innerExtract(e,t){let n=Z1.default(e.refDate),i=(t[tE]||"").toLowerCase(),s=(t[rE]||"").toLowerCase(),a=e.createParsingComponents();switch(i){case"jetzt":a=Lh.now(e.reference);break;case"heute":a=Lh.today(e.reference);break;case"morgen":$r.assignTheNextDay(a,n);break;case"\xFCbermorgen":case"uebermorgen":n=n.add(1,"day"),$r.assignTheNextDay(a,n);break;case"gestern":n=n.add(-1,"day"),$r.assignSimilarDate(a,n),$r.implySimilarTime(a,n);break;case"vorgestern":n=n.add(-2,"day"),$r.assignSimilarDate(a,n),$r.implySimilarTime(a,n);break;default:i.match(/letzte\s*nacht/)&&(n.hour()>6&&(n=n.add(-1,"day")),$r.assignSimilarDate(a,n),a.imply("hour",0));break}return s&&(a=J1.default.extractTimeComponents(a,s)),a}};Dt.default=Gu});var zh=p(zu=>{"use strict";Object.defineProperty(zu,"__esModule",{value:!0});var nE=Ue(),Gh=hi(),Hh=hi(),iE=re(),sE=M(),aE=new RegExp(`(?:am\\s*?)?(?:den\\s*?)?([0-9]{1,2})\\.(?:\\s*(?:bis(?:\\s*(?:am|zum))?|\\-|\\\u2013|\\s)\\s*([0-9]{1,2})\\.?)?\\s*(${iE.matchAnyPattern(Gh.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${Hh.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),$h=1,jh=2,oE=3,Bh=4,Hu=class extends sE.AbstractParserWithWordBoundaryChecking{innerPattern(){return aE}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Gh.MONTH_DICTIONARY[t[oE].toLowerCase()],s=parseInt(t[$h]);if(s>31)return t.index=t.index+t[$h].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[Bh]){let a=Hh.parseYear(t[Bh]);n.start.assign("year",a)}else{let a=nE.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[jh]){let a=parseInt(t[jh]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};zu.default=Hu});var Kh=p(Vu=>{"use strict";Object.defineProperty(Vu,"__esModule",{value:!0});var Xs=hi(),uE=me(),lE=M(),cE=mt(),dE=re(),Ku=class extends lE.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*)?(${Xs.NUMBER_PATTERN})?(?:\\s*(n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?)?\\s*(${dE.matchAnyPattern(Xs.TIME_UNIT_DICTIONARY)})`,"i")}innerExtract(e,t){let n=t[2]?Xs.parseNumberPattern(t[2]):1,i=Xs.TIME_UNIT_DICTIONARY[t[4].toLowerCase()],s={};s[i]=n;let a=t[1]||t[3]||"";if(a=a.toLowerCase(),!!a)return(/vor/.test(a)||/letzte/.test(a)||/vergangen/.test(a))&&(s=cE.reverseTimeUnits(s)),uE.ParsingComponents.createRelativeFromReference(e.reference,s)}};Vu.default=Ku});var Zh=p(Oe=>{"use strict";var Ot=Oe&&Oe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Oe,"__esModule",{value:!0});Oe.createConfiguration=Oe.createCasualConfiguration=Oe.parseDate=Oe.parse=Oe.strict=Oe.casual=void 0;var fE=Qt(),Vh=Mt(),pE=Ot(Wr()),hE=Ot(gu()),mE=Ot(Oh()),yE=Ot(Nh()),gE=Ot(Fh()),_E=Ot(Uh()),TE=Ot(qh()),bE=Ot(Yh()),vE=Ot(Bu()),EE=Ot(zh()),wE=Ot(Kh());Oe.casual=new Vh.Chrono(Xh());Oe.strict=new Vh.Chrono(Xu(!0));function RE(r,e,t){return Oe.casual.parse(r,e,t)}Oe.parse=RE;function ME(r,e,t){return Oe.casual.parseDate(r,e,t)}Oe.parseDate=ME;function Xh(r=!0){let e=Xu(!1,r);return e.parsers.unshift(new vE.default),e.parsers.unshift(new bE.default),e.parsers.unshift(new wE.default),e}Oe.createCasualConfiguration=Xh;function Xu(r=!0,e=!0){return fE.includeCommonConfiguration({parsers:[new hE.default,new pE.default(e),new mE.default,new gE.default,new EE.default,new yE.default],refiners:[new _E.default,new TE.default]},r)}Oe.createConfiguration=Xu});var Jh=p(Pt=>{"use strict";var DE=Pt&&Pt.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),OE=Pt&&Pt.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),PE=Pt&&Pt.__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)&&DE(e,r,t);return OE(e,r),e},kE=Pt&&Pt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Pt,"__esModule",{value:!0});var AE=kE(X()),SE=we(),NE=M(),Qh=ht(),Zs=PE(er()),Zu=class extends NE.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(maintenant|aujourd'hui|demain|hier|cette\s*nuit|la\s*veille)(?=\W|$)/i}innerExtract(e,t){let n=AE.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();switch(i){case"maintenant":return Zs.now(e.reference);case"aujourd'hui":return Zs.today(e.reference);case"hier":return Zs.yesterday(e.reference);case"demain":return Zs.tomorrow(e.reference);default:i.match(/cette\s*nuit/)?(Qh.assignSimilarDate(s,n),s.imply("hour",22),s.imply("meridiem",SE.Meridiem.PM)):i.match(/la\s*veille/)&&(n=n.add(-1,"day"),Qh.assignSimilarDate(s,n),s.imply("hour",0))}return s}};Pt.default=Zu});var em=p(Ju=>{"use strict";Object.defineProperty(Ju,"__esModule",{value:!0});var Ti=we(),xE=M(),Qu=class extends xE.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(cet?)?\s*(matin|soir|après-midi|aprem|a midi|à minuit)(?=\W|$)/i}innerExtract(e,t){let n=t[2].toLowerCase(),i=e.createParsingComponents();switch(n){case"apr\xE8s-midi":case"aprem":i.imply("hour",14),i.imply("minute",0),i.imply("meridiem",Ti.Meridiem.PM);break;case"soir":i.imply("hour",18),i.imply("minute",0),i.imply("meridiem",Ti.Meridiem.PM);break;case"matin":i.imply("hour",8),i.imply("minute",0),i.imply("meridiem",Ti.Meridiem.AM);break;case"a midi":i.imply("hour",12),i.imply("minute",0),i.imply("meridiem",Ti.Meridiem.AM);break;case"\xE0 minuit":i.imply("hour",0),i.imply("meridiem",Ti.Meridiem.AM);break}return i}};Ju.default=Qu});var tm=p(tl=>{"use strict";Object.defineProperty(tl,"__esModule",{value:!0});var CE=Ur(),el=class extends CE.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)}};tl.default=el});var rm=p(bi=>{"use strict";var IE=bi&&bi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(bi,"__esModule",{value:!0});var FE=IE(Zt()),rl=class extends FE.default{patternBetween(){return new RegExp("^\\s*(T|\xE0|a|vers|de|,|-)?\\s*$")}};bi.default=rl});var nm=p(vi=>{"use strict";var UE=vi&&vi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(vi,"__esModule",{value:!0});var qE=UE(Yt()),nl=class extends qE.default{patternBetween(){return/^\s*(à|a|-)\s*$/i}};vi.default=nl});var wr=p(Z=>{"use strict";Object.defineProperty(Z,"__esModule",{value:!0});Z.parseTimeUnits=Z.TIME_UNITS_PATTERN=Z.parseYear=Z.YEAR_PATTERN=Z.parseOrdinalNumberPattern=Z.ORDINAL_NUMBER_PATTERN=Z.parseNumberPattern=Z.NUMBER_PATTERN=Z.TIME_UNIT_DICTIONARY=Z.INTEGER_WORD_DICTIONARY=Z.MONTH_DICTIONARY=Z.WEEKDAY_DICTIONARY=void 0;var il=re();Z.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};Z.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};Z.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};Z.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"};Z.NUMBER_PATTERN=`(?:${il.matchAnyPattern(Z.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|une?\\b|quelques?|demi-?)`;function sm(r){let e=r.toLowerCase();return Z.INTEGER_WORD_DICTIONARY[e]!==void 0?Z.INTEGER_WORD_DICTIONARY[e]:e==="une"||e==="un"?1:e.match(/quelques?/)?3:e.match(/demi-?/)?.5:parseFloat(e)}Z.parseNumberPattern=sm;Z.ORDINAL_NUMBER_PATTERN="(?:[0-9]{1,2}(?:er)?)";function LE(r){let e=r.toLowerCase();return e=e.replace(/(?:er)$/i,""),parseInt(e)}Z.parseOrdinalNumberPattern=LE;Z.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 WE(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}Z.parseYear=WE;var am=`(${Z.NUMBER_PATTERN})\\s{0,5}(${il.matchAnyPattern(Z.TIME_UNIT_DICTIONARY)})\\s{0,5}`,im=new RegExp(am,"i");Z.TIME_UNITS_PATTERN=il.repeatedTimeunitPattern("",am);function YE(r){let e={},t=r,n=im.exec(t);for(;n;)$E(e,n),t=t.substring(n[0].length),n=im.exec(t);return e}Z.parseTimeUnits=YE;function $E(r,e){let t=sm(e[1]),n=Z.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var um=p(al=>{"use strict";Object.defineProperty(al,"__esModule",{value:!0});var om=wr(),jE=re(),BE=M(),GE=Lr(),HE=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(?:ce)\\s*)?(${jE.matchAnyPattern(om.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(dernier|prochain)\\s*)?(?=\\W|\\d|$)`,"i"),zE=1,KE=2,sl=class extends BE.AbstractParserWithWordBoundaryChecking{innerPattern(){return HE}innerExtract(e,t){let n=t[zE].toLowerCase(),i=om.WEEKDAY_DICTIONARY[n];if(i===void 0)return null;let s=t[KE];s=s||"",s=s.toLowerCase();let a=null;s=="dernier"?a="last":s=="prochain"&&(a="next");let o=GE.toDayJSWeekday(e.refDate,i,a);return e.createParsingComponents().assign("weekday",i).imply("day",o.date()).imply("month",o.month()+1).imply("year",o.year())}};al.default=sl});var fm=p(ol=>{"use strict";Object.defineProperty(ol,"__esModule",{value:!0});var Ei=we(),VE=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"),XE=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"),ZE=2,lm=3,cm=4,dm=5,Rn=class{pattern(e){return VE}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=Rn.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let i=e.text.substring(t.index+t[0].length),s=XE.exec(i);return s&&(n.end=Rn.extractTimeComponent(n.start.clone(),s),n.end&&(n.text+=s[0])),n}static extractTimeComponent(e,t){let n=0,i=0,s=null;if(n=parseInt(t[ZE]),t[lm]!=null&&(i=parseInt(t[lm])),i>=60||n>24)return null;if(n>=12&&(s=Ei.Meridiem.PM),t[dm]!=null){if(n>12)return null;let a=t[dm][0].toLowerCase();a=="a"&&(s=Ei.Meridiem.AM,n==12&&(n=0)),a=="p"&&(s=Ei.Meridiem.PM,n!=12&&(n+=12))}if(e.assign("hour",n),e.assign("minute",i),s!==null?e.assign("meridiem",s):n<12?e.imply("meridiem",Ei.Meridiem.AM):e.imply("meridiem",Ei.Meridiem.PM),t[cm]!=null){let a=parseInt(t[cm]);if(a>=60)return null;e.assign("second",a)}return e}};ol.default=Rn});var _m=p(ll=>{"use strict";Object.defineProperty(ll,"__esModule",{value:!0});var QE=Ue(),ym=wr(),gm=wr(),Qs=wr(),JE=re(),e0=M(),t0=new RegExp(`(?:on\\s*?)?(${Qs.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:au|\\-|\\\u2013|jusqu'au?|\\s)\\s*(${Qs.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:de)?\\s*)(${JE.matchAnyPattern(ym.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${gm.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),pm=1,hm=2,r0=3,mm=4,ul=class extends e0.AbstractParserWithWordBoundaryChecking{innerPattern(){return t0}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=ym.MONTH_DICTIONARY[t[r0].toLowerCase()],s=Qs.parseOrdinalNumberPattern(t[pm]);if(s>31)return t.index=t.index+t[pm].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[mm]){let a=gm.parseYear(t[mm]);n.start.assign("year",a)}else{let a=QE.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[hm]){let a=Qs.parseOrdinalNumberPattern(t[hm]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};ll.default=ul});var bm=p(dl=>{"use strict";Object.defineProperty(dl,"__esModule",{value:!0});var Tm=wr(),n0=me(),i0=M(),s0=mt(),cl=class extends i0.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`il y a\\s*(${Tm.TIME_UNITS_PATTERN})(?=(?:\\W|$))`,"i")}innerExtract(e,t){let n=Tm.parseTimeUnits(t[1]),i=s0.reverseTimeUnits(n);return n0.ParsingComponents.createRelativeFromReference(e.reference,i)}};dl.default=cl});var Em=p(pl=>{"use strict";Object.defineProperty(pl,"__esModule",{value:!0});var vm=wr(),a0=me(),o0=M(),fl=class extends o0.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp(`(?:dans|en|pour|pendant|de)\\s*(${vm.TIME_UNITS_PATTERN})(?=\\W|$)`,"i")}innerExtract(e,t){let n=vm.parseTimeUnits(t[1]);return a0.ParsingComponents.createRelativeFromReference(e.reference,n)}};pl.default=fl});var wm=p(ml=>{"use strict";Object.defineProperty(ml,"__esModule",{value:!0});var Js=wr(),u0=me(),l0=M(),c0=mt(),d0=re(),hl=class extends l0.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:les?|la|l'|du|des?)\\s*(${Js.NUMBER_PATTERN})?(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?\\s*(${d0.matchAnyPattern(Js.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]?Js.parseNumberPattern(t[1]):1,i=Js.TIME_UNIT_DICTIONARY[t[3].toLowerCase()],s={};s[i]=n;let a=t[2]||t[4]||"";if(a=a.toLowerCase(),!!a)return(/derni[eè]re?s?/.test(a)||/pass[ée]e?s?/.test(a)||/pr[ée]c[ée]dents?/.test(a))&&(s=c0.reverseTimeUnits(s)),u0.ParsingComponents.createRelativeFromReference(e.reference,s)}};ml.default=hl});var Dm=p(Pe=>{"use strict";var yt=Pe&&Pe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Pe,"__esModule",{value:!0});Pe.createConfiguration=Pe.createCasualConfiguration=Pe.parseDate=Pe.parse=Pe.strict=Pe.casual=void 0;var f0=Qt(),Rm=Mt(),p0=yt(Jh()),h0=yt(em()),m0=yt(Wr()),y0=yt(tm()),g0=yt(rm()),_0=yt(nm()),T0=yt(um()),b0=yt(fm()),v0=yt(_m()),E0=yt(bm()),w0=yt(Em()),R0=yt(wm());Pe.casual=new Rm.Chrono(Mm());Pe.strict=new Rm.Chrono(yl(!0));function M0(r,e,t){return Pe.casual.parse(r,e,t)}Pe.parse=M0;function D0(r,e,t){return Pe.casual.parseDate(r,e,t)}Pe.parseDate=D0;function Mm(r=!0){let e=yl(!1,r);return e.parsers.unshift(new p0.default),e.parsers.unshift(new h0.default),e.parsers.unshift(new R0.default),e}Pe.createCasualConfiguration=Mm;function yl(r=!0,e=!0){return f0.includeCommonConfiguration({parsers:[new m0.default(e),new v0.default,new y0.default,new b0.default,new E0.default,new w0.default,new T0.default],refiners:[new g0.default,new _0.default]},r)}Pe.createConfiguration=yl});var Om=p(ea=>{"use strict";Object.defineProperty(ea,"__esModule",{value:!0});ea.toHankaku=void 0;function O0(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,P0)}ea.toHankaku=O0;function P0(r){return String.fromCharCode(r.charCodeAt(0)-65248)}});var km=p(wi=>{"use strict";var k0=wi&&wi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(wi,"__esModule",{value:!0});var gl=Om(),A0=Ue(),S0=k0(X()),N0=/(?:(?:([同今本])|((昭和|平成|令和)?([0-9-]{1,4}|元)))年\s*)?([0-9-]{1,2})月\s*([0-9-]{1,2})日/i,Pm=1,x0=2,_l=3,C0=4,I0=5,F0=6,Tl=class{pattern(){return N0}extract(e,t){let n=parseInt(gl.toHankaku(t[I0])),i=parseInt(gl.toHankaku(t[F0])),s=e.createParsingComponents({day:i,month:n});if(t[Pm]&&t[Pm].match("\u540C|\u4ECA|\u672C")){let a=S0.default(e.refDate);s.assign("year",a.year())}if(t[x0]){let a=t[C0],o=a=="\u5143"?1:parseInt(gl.toHankaku(a));t[_l]=="\u4EE4\u548C"?o+=2018:t[_l]=="\u5E73\u6210"?o+=1988:t[_l]=="\u662D\u548C"&&(o+=1925),s.assign("year",o)}else{let a=A0.findYearClosestToRef(e.refDate,i,n);s.imply("year",a)}return s}};wi.default=Tl});var Am=p(Ri=>{"use strict";var U0=Ri&&Ri.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ri,"__esModule",{value:!0});var q0=U0(Yt()),bl=class extends q0.default{patternBetween(){return/^\s*(から|ー|-)\s*$/i}};Ri.default=bl});var Nm=p(kt=>{"use strict";var L0=kt&&kt.__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]}),W0=kt&&kt.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Y0=kt&&kt.__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)&&L0(e,r,t);return W0(e,r),e},$0=kt&&kt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(kt,"__esModule",{value:!0});var j0=$0(X()),Sm=we(),vl=Y0(er()),B0=/今日|当日|昨日|明日|今夜|今夕|今晩|今朝/i,El=class{pattern(){return B0}extract(e,t){let n=t[0],i=j0.default(e.refDate),s=e.createParsingComponents();switch(n){case"\u6628\u65E5":return vl.yesterday(e.reference);case"\u660E\u65E5":return vl.tomorrow(e.reference);case"\u4ECA\u65E5":case"\u5F53\u65E5":return vl.today(e.reference)}return n=="\u4ECA\u591C"||n=="\u4ECA\u5915"||n=="\u4ECA\u6669"?(s.imply("hour",22),s.assign("meridiem",Sm.Meridiem.PM)):n.match("\u4ECA\u671D")&&(s.imply("hour",6),s.assign("meridiem",Sm.Meridiem.AM)),s.assign("day",i.date()),s.assign("month",i.month()+1),s.assign("year",i.year()),s}};kt.default=El});var Im=p(ke=>{"use strict";var wl=ke&&ke.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ke,"__esModule",{value:!0});ke.createConfiguration=ke.createCasualConfiguration=ke.parseDate=ke.parse=ke.strict=ke.casual=void 0;var G0=wl(km()),H0=wl(Am()),z0=wl(Nm()),xm=Mt();ke.casual=new xm.Chrono(Cm());ke.strict=new xm.Chrono(Rl());function K0(r,e,t){return ke.casual.parse(r,e,t)}ke.parse=K0;function V0(r,e,t){return ke.casual.parseDate(r,e,t)}ke.parseDate=V0;function Cm(){let r=Rl();return r.parsers.unshift(new z0.default),r}ke.createCasualConfiguration=Cm;function Rl(){return{parsers:[new G0.default],refiners:[new H0.default]}}ke.createConfiguration=Rl});var ta=p(jt=>{"use strict";Object.defineProperty(jt,"__esModule",{value:!0});jt.parseYear=jt.YEAR_PATTERN=jt.MONTH_DICTIONARY=jt.WEEKDAY_DICTIONARY=void 0;jt.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};jt.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};jt.YEAR_PATTERN="[0-9]{1,4}(?![^\\s]\\d)(?:\\s*[a|d]\\.?\\s*c\\.?|\\s*a\\.?\\s*d\\.?)?";function X0(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)}jt.parseYear=X0});var Um=p(Dl=>{"use strict";Object.defineProperty(Dl,"__esModule",{value:!0});var Fm=ta(),Z0=re(),Q0=M(),J0=Lr(),ew=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(este|esta|passado|pr[o\xF3]ximo)\\s*)?(${Z0.matchAnyPattern(Fm.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(este|esta|passado|pr[\xF3o]ximo)\\s*semana)?(?=\\W|\\d|$)`,"i"),tw=1,rw=2,nw=3,Ml=class extends Q0.AbstractParserWithWordBoundaryChecking{innerPattern(){return ew}innerExtract(e,t){let n=t[rw].toLowerCase(),i=Fm.WEEKDAY_DICTIONARY[n];if(i===void 0)return null;let s=t[tw],a=t[nw],o=s||a||"";o=o.toLowerCase();let u=null;o=="passado"?u="this":o=="pr\xF3ximo"||o=="proximo"?u="next":o=="este"&&(u="this");let l=J0.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Dl.default=Ml});var qm=p(Pl=>{"use strict";Object.defineProperty(Pl,"__esModule",{value:!0});var iw=Ur(),Ol=class extends iw.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:ao?|\xE0s?|das|da|de|do)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|a(?:o)?|\\?)\\s*"}};Pl.default=Ol});var Lm=p(Mi=>{"use strict";var sw=Mi&&Mi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Mi,"__esModule",{value:!0});var aw=sw(Zt()),kl=class extends aw.default{patternBetween(){return new RegExp("^\\s*(?:,|\xE0)?\\s*$")}};Mi.default=kl});var Wm=p(Di=>{"use strict";var ow=Di&&Di.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Di,"__esModule",{value:!0});var uw=ow(Yt()),Al=class extends uw.default{patternBetween(){return/^\s*(?:-)\s*$/i}};Di.default=Al});var Hm=p(Nl=>{"use strict";Object.defineProperty(Nl,"__esModule",{value:!0});var lw=Ue(),Bm=ta(),Gm=ta(),cw=re(),dw=M(),fw=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*)(${cw.matchAnyPattern(Bm.MONTH_DICTIONARY)})(?:\\s*(?:de|,)?\\s*(${Gm.YEAR_PATTERN}))?(?=\\W|$)`,"i"),Ym=1,$m=2,pw=3,jm=4,Sl=class extends dw.AbstractParserWithWordBoundaryChecking{innerPattern(){return fw}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Bm.MONTH_DICTIONARY[t[pw].toLowerCase()],s=parseInt(t[Ym]);if(s>31)return t.index=t.index+t[Ym].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[jm]){let a=Gm.parseYear(t[jm]);n.start.assign("year",a)}else{let a=lw.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[$m]){let a=parseInt(t[$m]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Nl.default=Sl});var zm=p(tr=>{"use strict";var hw=tr&&tr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),mw=tr&&tr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),yw=tr&&tr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&hw(e,r,t);return mw(e,r),e};Object.defineProperty(tr,"__esModule",{value:!0});var gw=M(),ra=yw(er()),xl=class extends gw.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(agora|hoje|amanha|amanhã|ontem)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),i=e.createParsingComponents();switch(n){case"agora":return ra.now(e.reference);case"hoje":return ra.today(e.reference);case"amanha":case"amanh\xE3":return ra.tomorrow(e.reference);case"ontem":return ra.yesterday(e.reference)}return i}};tr.default=xl});var Km=p(Oi=>{"use strict";var _w=Oi&&Oi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Oi,"__esModule",{value:!0});var na=we(),Tw=M(),bw=ht(),vw=_w(X()),Cl=class extends Tw.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(?:esta\s*)?(manha|manhã|tarde|meia-noite|meio-dia|noite)(?=\W|$)/i}innerExtract(e,t){let n=vw.default(e.refDate),i=e.createParsingComponents();switch(t[1].toLowerCase()){case"tarde":i.imply("meridiem",na.Meridiem.PM),i.imply("hour",15);break;case"noite":i.imply("meridiem",na.Meridiem.PM),i.imply("hour",22);break;case"manha":case"manh\xE3":i.imply("meridiem",na.Meridiem.AM),i.imply("hour",6);break;case"meia-noite":bw.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"meio-dia":i.imply("meridiem",na.Meridiem.AM),i.imply("hour",12);break}return i}};Oi.default=Cl});var Zm=p(Ae=>{"use strict";var Rr=Ae&&Ae.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ae,"__esModule",{value:!0});Ae.createConfiguration=Ae.createCasualConfiguration=Ae.parseDate=Ae.parse=Ae.strict=Ae.casual=void 0;var Ew=Qt(),Vm=Mt(),ww=Rr(Wr()),Rw=Rr(Um()),Mw=Rr(qm()),Dw=Rr(Lm()),Ow=Rr(Wm()),Pw=Rr(Hm()),kw=Rr(zm()),Aw=Rr(Km());Ae.casual=new Vm.Chrono(Xm());Ae.strict=new Vm.Chrono(Il(!0));function Sw(r,e,t){return Ae.casual.parse(r,e,t)}Ae.parse=Sw;function Nw(r,e,t){return Ae.casual.parseDate(r,e,t)}Ae.parseDate=Nw;function Xm(r=!0){let e=Il(!1,r);return e.parsers.push(new kw.default),e.parsers.push(new Aw.default),e}Ae.createCasualConfiguration=Xm;function Il(r=!0,e=!0){return Ew.includeCommonConfiguration({parsers:[new ww.default(e),new Rw.default,new Mw.default,new Pw.default],refiners:[new Dw.default,new Ow.default]},r)}Ae.createConfiguration=Il});var Qm=p(Pi=>{"use strict";var xw=Pi&&Pi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Pi,"__esModule",{value:!0});var Cw=xw(Yt()),Fl=class extends Cw.default{patternBetween(){return/^\s*(tot|-)\s*$/i}};Pi.default=Fl});var Jm=p(ki=>{"use strict";var Iw=ki&&ki.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ki,"__esModule",{value:!0});var Fw=Iw(Zt()),Ul=class extends Fw.default{patternBetween(){return new RegExp("^\\s*(om|na|voor|in de|,|-)?\\s*$")}};ki.default=Ul});var ey=p(rr=>{"use strict";var Uw=rr&&rr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),qw=rr&&rr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Lw=rr&&rr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&Uw(e,r,t);return qw(e,r),e};Object.defineProperty(rr,"__esModule",{value:!0});var Ww=M(),ia=Lw(er()),ql=class extends Ww.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(nu|vandaag|morgen|morgend|gisteren)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),i=e.createParsingComponents();switch(n){case"nu":return ia.now(e.reference);case"vandaag":return ia.today(e.reference);case"morgen":case"morgend":return ia.tomorrow(e.reference);case"gisteren":return ia.yesterday(e.reference)}return i}};rr.default=ql});var ty=p(Ai=>{"use strict";var Yw=Ai&&Ai.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ai,"__esModule",{value:!0});var sa=we(),$w=M(),jw=Yw(X()),Bw=ht(),Gw=1,Hw=2,Ll=class extends $w.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(deze)?\s*(namiddag|avond|middernacht|ochtend|middag|'s middags|'s avonds|'s ochtends)(?=\W|$)/i}innerExtract(e,t){let n=jw.default(e.refDate),i=e.createParsingComponents();switch(t[Gw]==="deze"&&(i.assign("day",e.refDate.getDate()),i.assign("month",e.refDate.getMonth()+1),i.assign("year",e.refDate.getFullYear())),t[Hw].toLowerCase()){case"namiddag":case"'s namiddags":i.imply("meridiem",sa.Meridiem.PM),i.imply("hour",15);break;case"avond":case"'s avonds'":i.imply("meridiem",sa.Meridiem.PM),i.imply("hour",20);break;case"middernacht":Bw.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"ochtend":case"'s ochtends":i.imply("meridiem",sa.Meridiem.AM),i.imply("hour",6);break;case"middag":case"'s middags":i.imply("meridiem",sa.Meridiem.AM),i.imply("hour",12);break}return i}};Ai.default=Ll});var st=p(j=>{"use strict";Object.defineProperty(j,"__esModule",{value:!0});j.parseTimeUnits=j.TIME_UNITS_PATTERN=j.parseYear=j.YEAR_PATTERN=j.parseOrdinalNumberPattern=j.ORDINAL_NUMBER_PATTERN=j.parseNumberPattern=j.NUMBER_PATTERN=j.TIME_UNIT_DICTIONARY=j.ORDINAL_WORD_DICTIONARY=j.INTEGER_WORD_DICTIONARY=j.MONTH_DICTIONARY=j.WEEKDAY_DICTIONARY=void 0;var aa=re(),zw=Ue();j.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};j.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};j.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};j.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};j.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"};j.NUMBER_PATTERN=`(?:${aa.matchAnyPattern(j.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+[\\.,][0-9]+|halve?|half|paar)`;function ny(r){let e=r.toLowerCase();return j.INTEGER_WORD_DICTIONARY[e]!==void 0?j.INTEGER_WORD_DICTIONARY[e]:e==="paar"?2:e==="half"||e.match(/halve?/)?.5:parseFloat(e.replace(",","."))}j.parseNumberPattern=ny;j.ORDINAL_NUMBER_PATTERN=`(?:${aa.matchAnyPattern(j.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:ste|de)?)`;function Kw(r){let e=r.toLowerCase();return j.ORDINAL_WORD_DICTIONARY[e]!==void 0?j.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:ste|de)$/i,""),parseInt(e))}j.parseOrdinalNumberPattern=Kw;j.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:voor Christus|na Christus)|[1-2][0-9]{3}|[5-9][0-9])";function Vw(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 zw.findMostLikelyADYear(e)}j.parseYear=Vw;var iy=`(${j.NUMBER_PATTERN})\\s{0,5}(${aa.matchAnyPattern(j.TIME_UNIT_DICTIONARY)})\\s{0,5}`,ry=new RegExp(iy,"i");j.TIME_UNITS_PATTERN=aa.repeatedTimeunitPattern("(?:(?:binnen|in)\\s*)?",iy);function Xw(r){let e={},t=r,n=ry.exec(t);for(;n;)Zw(e,n),t=t.substring(n[0].length),n=ry.exec(t);return e}j.parseTimeUnits=Xw;function Zw(r,e){let t=ny(e[1]),n=j.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var ay=p(Yl=>{"use strict";Object.defineProperty(Yl,"__esModule",{value:!0});var sy=st(),Qw=me(),Jw=M(),Wl=class extends Jw.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(?:binnen|in|binnen de|voor)\\s*("+sy.TIME_UNITS_PATTERN+")(?=\\W|$)","i")}innerExtract(e,t){let n=sy.parseTimeUnits(t[1]);return Qw.ParsingComponents.createRelativeFromReference(e.reference,n)}};Yl.default=Wl});var uy=p(jl=>{"use strict";Object.defineProperty(jl,"__esModule",{value:!0});var oy=st(),eR=re(),tR=M(),rR=Lr(),nR=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:op\\s*?)?(?:(deze|vorige|volgende)\\s*(?:week\\s*)?)?(${eR.matchAnyPattern(oy.WEEKDAY_DICTIONARY)})(?=\\W|$)`,"i"),iR=1,sR=2,aR=3,$l=class extends tR.AbstractParserWithWordBoundaryChecking{innerPattern(){return nR}innerExtract(e,t){let n=t[sR].toLowerCase(),i=oy.WEEKDAY_DICTIONARY[n],s=t[iR],a=t[aR],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o=="vorige"?u="last":o=="volgende"?u="next":o=="deze"&&(u="this");let l=rR.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};jl.default=$l});var hy=p(Gl=>{"use strict";Object.defineProperty(Gl,"__esModule",{value:!0});var oR=Ue(),fy=st(),oa=st(),py=st(),uR=re(),lR=M(),cR=new RegExp(`(?:on\\s*?)?(${oa.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:tot|\\-|\\\u2013|until|through|till|\\s)\\s*(${oa.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:of)?\\s*)(`+uR.matchAnyPattern(fy.MONTH_DICTIONARY)+`)(?:(?:-|/|,?\\s*)(${py.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),dR=3,ly=1,cy=2,dy=4,Bl=class extends lR.AbstractParserWithWordBoundaryChecking{innerPattern(){return cR}innerExtract(e,t){let n=fy.MONTH_DICTIONARY[t[dR].toLowerCase()],i=oa.parseOrdinalNumberPattern(t[ly]);if(i>31)return t.index=t.index+t[ly].length,null;let s=e.createParsingComponents({day:i,month:n});if(t[dy]){let u=py.parseYear(t[dy]);s.assign("year",u)}else{let u=oR.findYearClosestToRef(e.refDate,i,n);s.imply("year",u)}if(!t[cy])return s;let a=oa.parseOrdinalNumberPattern(t[cy]),o=e.createParsingResult(t.index,t[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",a),o}};Gl.default=Bl});var _y=p(zl=>{"use strict";Object.defineProperty(zl,"__esModule",{value:!0});var yy=st(),fR=Ue(),pR=re(),gy=st(),hR=M(),mR=new RegExp(`(${pR.matchAnyPattern(yy.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${gy.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),yR=1,my=2,Hl=class extends hR.AbstractParserWithWordBoundaryChecking{innerPattern(){return mR}innerExtract(e,t){let n=e.createParsingComponents();n.imply("day",1);let i=t[yR],s=yy.MONTH_DICTIONARY[i.toLowerCase()];if(n.assign("month",s),t[my]){let a=gy.parseYear(t[my]);n.assign("year",a)}else{let a=fR.findYearClosestToRef(e.refDate,1,s);n.imply("year",a)}return n}};zl.default=Hl});var Ty=p(Vl=>{"use strict";Object.defineProperty(Vl,"__esModule",{value:!0});var gR=M(),_R=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),TR=1,bR=2,Kl=class extends gR.AbstractParserWithWordBoundaryChecking{innerPattern(){return _R}innerExtract(e,t){let n=parseInt(t[bR]),i=parseInt(t[TR]);return e.createParsingComponents().imply("day",1).assign("month",i).assign("year",n)}};Vl.default=Kl});var by=p(Zl=>{"use strict";Object.defineProperty(Zl,"__esModule",{value:!0});var vR=Ur(),Xl=class extends vR.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)}};Zl.default=Xl});var wy=p(Jl=>{"use strict";Object.defineProperty(Jl,"__esModule",{value:!0});var Ey=st(),ER=re(),wR=M(),RR=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${ER.matchAnyPattern(Ey.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),MR=1,DR=2,vy=3,OR=4,Ql=class extends wR.AbstractParserWithWordBoundaryChecking{innerPattern(){return RR}innerExtract(e,t){let n=t[vy]?parseInt(t[vy]):Ey.MONTH_DICTIONARY[t[DR].toLowerCase()];if(n<1||n>12)return null;let i=parseInt(t[MR]);return{day:parseInt(t[OR]),month:n,year:i}}};Jl.default=Ql});var Ry=p(Si=>{"use strict";var PR=Si&&Si.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Si,"__esModule",{value:!0});var kR=M(),ua=we(),ec=ht(),AR=PR(X()),SR=1,NR=2,tc=class extends kR.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(gisteren|morgen|van)(ochtend|middag|namiddag|avond|nacht)(?=\W|$)/i}innerExtract(e,t){let n=t[SR].toLowerCase(),i=t[NR].toLowerCase(),s=e.createParsingComponents(),a=AR.default(e.refDate);switch(n){case"gisteren":ec.assignSimilarDate(s,a.add(-1,"day"));break;case"van":ec.assignSimilarDate(s,a);break;case"morgen":ec.assignTheNextDay(s,a);break}switch(i){case"ochtend":s.imply("meridiem",ua.Meridiem.AM),s.imply("hour",6);break;case"middag":s.imply("meridiem",ua.Meridiem.AM),s.imply("hour",12);break;case"namiddag":s.imply("meridiem",ua.Meridiem.PM),s.imply("hour",15);break;case"avond":s.imply("meridiem",ua.Meridiem.PM),s.imply("hour",20);break}return s}};Si.default=tc});var Dy=p(nc=>{"use strict";Object.defineProperty(nc,"__esModule",{value:!0});var My=st(),xR=me(),CR=M(),IR=mt(),FR=new RegExp(`(deze|vorige|afgelopen|komende|over|\\+|-)\\s*(${My.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),rc=class extends CR.AbstractParserWithWordBoundaryChecking{innerPattern(){return FR}innerExtract(e,t){let n=t[1].toLowerCase(),i=My.parseTimeUnits(t[2]);switch(n){case"vorige":case"afgelopen":case"-":i=IR.reverseTimeUnits(i);break}return xR.ParsingComponents.createRelativeFromReference(e.reference,i)}};nc.default=rc});var ky=p(Ni=>{"use strict";var UR=Ni&&Ni.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ni,"__esModule",{value:!0});var Py=st(),Oy=me(),qR=UR(X()),LR=M(),WR=re(),YR=new RegExp(`(dit|deze|komende|volgend|volgende|afgelopen|vorige)\\s*(${WR.matchAnyPattern(Py.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),$R=1,jR=2,ic=class extends LR.AbstractParserWithWordBoundaryChecking{innerPattern(){return YR}innerExtract(e,t){let n=t[$R].toLowerCase(),i=t[jR].toLowerCase(),s=Py.TIME_UNIT_DICTIONARY[i];if(n=="volgend"||n=="volgende"||n=="komende"){let u={};return u[s]=1,Oy.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="afgelopen"||n=="vorige"){let u={};return u[s]=-1,Oy.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=qR.default(e.reference.instant);return i.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):i.match(/maand/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):i.match(/jaar/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};Ni.default=ic});var Ay=p(oc=>{"use strict";Object.defineProperty(oc,"__esModule",{value:!0});var ac=st(),BR=me(),GR=M(),HR=mt(),zR=new RegExp("("+ac.TIME_UNITS_PATTERN+")(?:geleden|voor|eerder)(?=(?:\\W|$))","i"),KR=new RegExp("("+ac.TIME_UNITS_PATTERN+")geleden(?=(?:\\W|$))","i"),sc=class extends GR.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?KR:zR}innerExtract(e,t){let n=ac.parseTimeUnits(t[1]),i=HR.reverseTimeUnits(n);return BR.ParsingComponents.createRelativeFromReference(e.reference,i)}};oc.default=sc});var Sy=p(cc=>{"use strict";Object.defineProperty(cc,"__esModule",{value:!0});var lc=st(),VR=me(),XR=M(),ZR=new RegExp("("+lc.TIME_UNITS_PATTERN+")(later|na|vanaf nu|voortaan|vooruit|uit)(?=(?:\\W|$))","i"),QR=new RegExp("("+lc.TIME_UNITS_PATTERN+")(later|vanaf nu)(?=(?:\\W|$))","i"),JR=1,uc=class extends XR.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?QR:ZR}innerExtract(e,t){let n=lc.parseTimeUnits(t[JR]);return VR.ParsingComponents.createRelativeFromReference(e.reference,n)}};cc.default=uc});var Iy=p(Se=>{"use strict";var Le=Se&&Se.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Se,"__esModule",{value:!0});Se.createConfiguration=Se.createCasualConfiguration=Se.parseDate=Se.parse=Se.strict=Se.casual=void 0;var eM=Qt(),Ny=Mt(),tM=Le(Qm()),rM=Le(Jm()),nM=Le(ey()),iM=Le(ty()),sM=Le(Wr()),aM=Le(ay()),oM=Le(uy()),uM=Le(hy()),xy=Le(_y()),lM=Le(Ty()),cM=Le(by()),dM=Le(wy()),fM=Le(Ry()),pM=Le(Dy()),hM=Le(ky()),mM=Le(Ay()),yM=Le(Sy());Se.casual=new Ny.Chrono(Cy());Se.strict=new Ny.Chrono(dc(!0));function gM(r,e,t){return Se.casual.parse(r,e,t)}Se.parse=gM;function _M(r,e,t){return Se.casual.parseDate(r,e,t)}Se.parseDate=_M;function Cy(r=!0){let e=dc(!1,r);return e.parsers.unshift(new nM.default),e.parsers.unshift(new iM.default),e.parsers.unshift(new fM.default),e.parsers.unshift(new xy.default),e.parsers.unshift(new hM.default),e.parsers.unshift(new pM.default),e}Se.createCasualConfiguration=Cy;function dc(r=!0,e=!0){return eM.includeCommonConfiguration({parsers:[new sM.default(e),new aM.default,new uM.default,new xy.default,new oM.default,new dM.default,new lM.default,new cM.default(r),new mM.default(r),new yM.default(r)],refiners:[new rM.default,new tM.default]},r)}Se.createConfiguration=dc});var Ly=p(xi=>{"use strict";var TM=xi&&xi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(xi,"__esModule",{value:!0});var bM=TM(X()),vM=M(),EM=1,Fy=2,wM=3,Uy=4,qy=5,RM=6,fc=class extends vM.AbstractParserWithWordBoundaryChecking{innerPattern(e){return new RegExp("(\u800C\u5BB6|\u7ACB(?:\u523B|\u5373)|\u5373\u523B)|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s|,|\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?","i")}innerExtract(e,t){let n=t.index,i=e.createParsingResult(n,t[0]),s=bM.default(e.refDate),a=s;if(t[EM])i.start.imply("hour",s.hour()),i.start.imply("minute",s.minute()),i.start.imply("second",s.second()),i.start.imply("millisecond",s.millisecond());else if(t[Fy]){let o=t[Fy],u=t[wM];o=="\u660E"||o=="\u807D"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u5F8C"?a=a.add(2,"day"):o=="\u5927\u5F8C"&&(a=a.add(3,"day")),u=="\u65E9"||u=="\u671D"?i.start.imply("hour",6):u=="\u665A"&&(i.start.imply("hour",22),i.start.imply("meridiem",1))}else if(t[Uy]){let u=t[Uy][0];u=="\u65E9"||u=="\u671D"||u=="\u4E0A"?i.start.imply("hour",6):u=="\u4E0B"||u=="\u664F"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):u=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):u=="\u591C"||u=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):u=="\u51CC"&&i.start.imply("hour",0)}else if(t[qy]){let o=t[qy];o=="\u660E"||o=="\u807D"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u5F8C"?a=a.add(2,"day"):o=="\u5927\u5F8C"&&(a=a.add(3,"day"));let u=t[RM];if(u){let l=u[0];l=="\u65E9"||l=="\u671D"||l=="\u4E0A"?i.start.imply("hour",6):l=="\u4E0B"||l=="\u664F"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):l=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):l=="\u591C"||l=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):l=="\u51CC"&&i.start.imply("hour",0)}}return i.start.assign("day",a.date()),i.start.assign("month",a.month()+1),i.start.assign("year",a.year()),i}};xi.default=fc});var Mn=p(Ke=>{"use strict";Object.defineProperty(Ke,"__esModule",{value:!0});Ke.zhStringToYear=Ke.zhStringToNumber=Ke.WEEKDAY_OFFSET=Ke.NUMBER=void 0;Ke.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};Ke.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function MM(r){let e=0;for(let t=0;t<r.length;t++){let n=r[t];n==="\u5341"?e=e===0?Ke.NUMBER[n]:e*Ke.NUMBER[n]:e+=Ke.NUMBER[n]}return e}Ke.zhStringToNumber=MM;function DM(r){let e="";for(let t=0;t<r.length;t++){let n=r[t];e=e+Ke.NUMBER[n]}return parseInt(e)}Ke.zhStringToYear=DM});var Yy=p(Ci=>{"use strict";var OM=Ci&&Ci.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ci,"__esModule",{value:!0});var PM=OM(X()),kM=M(),jr=Mn(),pc=1,Wy=2,hc=3,mc=class extends kM.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(jr.NUMBER).join("")+"]{4}|["+Object.keys(jr.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(jr.NUMBER).join("")+"]{1,2})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(jr.NUMBER).join("")+"]{1,2})?(?:\\s*)(?:\u65E5|\u865F)?")}innerExtract(e,t){let n=PM.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=parseInt(t[Wy]);if(isNaN(s)&&(s=jr.zhStringToNumber(t[Wy])),i.start.assign("month",s),t[hc]){let a=parseInt(t[hc]);isNaN(a)&&(a=jr.zhStringToNumber(t[hc])),i.start.assign("day",a)}else i.start.imply("day",n.date());if(t[pc]){let a=parseInt(t[pc]);isNaN(a)&&(a=jr.zhStringToYear(t[pc])),i.start.assign("year",a)}else i.start.imply("year",n.year());return i}};Ci.default=mc});var jy=p(Ii=>{"use strict";var AM=Ii&&Ii.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ii,"__esModule",{value:!0});var SM=AM(X()),NM=M(),$y=Mn(),xM=new RegExp("(\\d+|["+Object.keys($y.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"),yc=1,CM=2,gc=class extends NM.AbstractParserWithWordBoundaryChecking{innerPattern(){return xM}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=parseInt(t[yc]);if(isNaN(i)&&(i=$y.zhStringToNumber(t[yc])),isNaN(i)){let u=t[yc];if(u==="\u5E7E")i=3;else if(u==="\u534A")i=.5;else return null}let s=SM.default(e.refDate),o=t[CM][0];return o.match(/[日天星禮月年]/)?(o=="\u65E5"||o=="\u5929"?s=s.add(i,"d"):o=="\u661F"||o=="\u79AE"?s=s.add(i*7,"d"):o=="\u6708"?s=s.add(i,"month"):o=="\u5E74"&&(s=s.add(i,"year")),n.start.assign("year",s.year()),n.start.assign("month",s.month()+1),n.start.assign("day",s.date()),n):(o=="\u79D2"?s=s.add(i,"second"):o=="\u5206"?s=s.add(i,"minute"):(o=="\u5C0F"||o=="\u9418")&&(s=s.add(i,"hour")),n.start.imply("year",s.year()),n.start.imply("month",s.month()+1),n.start.imply("day",s.date()),n.start.assign("hour",s.hour()),n.start.assign("minute",s.minute()),n.start.assign("second",s.second()),n)}};Ii.default=gc});var Gy=p(Fi=>{"use strict";var IM=Fi&&Fi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Fi,"__esModule",{value:!0});var FM=IM(X()),UM=M(),By=Mn(),qM=new RegExp("(?<prefix>\u4E0A|\u4ECA|\u4E0B|\u9019|\u5462)(?:\u500B)?(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?<weekday>"+Object.keys(By.WEEKDAY_OFFSET).join("|")+")"),_c=class extends UM.AbstractParserWithWordBoundaryChecking{innerPattern(){return qM}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=By.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=null,o=t.groups.prefix;o=="\u4E0A"?a="last":o=="\u4E0B"?a="next":(o=="\u4ECA"||o=="\u9019"||o=="\u5462")&&(a="this");let u=FM.default(e.refDate),l=!1,c=u.day();return a=="last"||a=="past"?(u=u.day(s-7),l=!0):a=="next"?(u=u.day(s+7),l=!0):a=="this"?u=u.day(s):Math.abs(s-7-c)<Math.abs(s-c)?u=u.day(s-7):Math.abs(s+7-c)<Math.abs(s-c)?u=u.day(s+7):u=u.day(s),n.start.assign("weekday",s),l?(n.start.assign("day",u.date()),n.start.assign("month",u.month()+1),n.start.assign("year",u.year())):(n.start.imply("day",u.date()),n.start.imply("month",u.month()+1),n.start.imply("year",u.year())),n}};Fi.default=_c});var Hy=p(Ui=>{"use strict";var LM=Ui&&Ui.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ui,"__esModule",{value:!0});var WM=LM(X()),YM=M(),_t=Mn(),$M=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(_t.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(_t.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(_t.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),jM=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(_t.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(_t.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(_t.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),la=1,ca=2,da=3,fa=4,pa=5,ha=6,gt=7,Dn=8,ma=9,Tc=class extends YM.AbstractParserWithWordBoundaryChecking{innerPattern(){return $M}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=WM.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=n.clone();if(t[la]){var a=t[la];a=="\u660E"||a=="\u807D"?n.hour()>1&&s.add(1,"day"):a=="\u6628"||a=="\u5C0B"||a=="\u7434"?s.add(-1,"day"):a=="\u524D"?s.add(-2,"day"):a=="\u5927\u524D"?s.add(-3,"day"):a=="\u5F8C"?s.add(2,"day"):a=="\u5927\u5F8C"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else if(t[fa]){var o=t[fa];o=="\u660E"||o=="\u807D"?s.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?s.add(-1,"day"):o=="\u524D"?s.add(-2,"day"):o=="\u5927\u524D"?s.add(-3,"day"):o=="\u5F8C"?s.add(2,"day"):o=="\u5927\u5F8C"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else i.start.imply("day",s.date()),i.start.imply("month",s.month()+1),i.start.imply("year",s.year());let u=0,l=0,c=-1;if(t[Dn]){var d=parseInt(t[Dn]);if(isNaN(d)&&(d=_t.zhStringToNumber(t[Dn])),d>=60)return null;i.start.assign("second",d)}if(u=parseInt(t[ha]),isNaN(u)&&(u=_t.zhStringToNumber(t[ha])),t[gt]?t[gt]=="\u534A"?l=30:t[gt]=="\u6B63"||t[gt]=="\u6574"?l=0:(l=parseInt(t[gt]),isNaN(l)&&(l=_t.zhStringToNumber(t[gt]))):u>100&&(l=u%100,u=Math.floor(u/100)),l>=60||u>24)return null;if(u>=12&&(c=1),t[ma]){if(u>12)return null;var f=t[ma][0].toLowerCase();f=="a"&&(c=0,u==12&&(u=0)),f=="p"&&(c=1,u!=12&&(u+=12))}else if(t[ca]){var h=t[ca],_=h[0];_=="\u671D"||_=="\u65E9"?(c=0,u==12&&(u=0)):_=="\u665A"&&(c=1,u!=12&&(u+=12))}else if(t[da]){var m=t[da],g=m[0];g=="\u4E0A"||g=="\u671D"||g=="\u65E9"||g=="\u51CC"?(c=0,u==12&&(u=0)):(g=="\u4E0B"||g=="\u664F"||g=="\u665A")&&(c=1,u!=12&&(u+=12))}else if(t[pa]){var R=t[pa],w=R[0];w=="\u4E0A"||w=="\u671D"||w=="\u65E9"||w=="\u51CC"?(c=0,u==12&&(u=0)):(w=="\u4E0B"||w=="\u664F"||w=="\u665A")&&(c=1,u!=12&&(u+=12))}if(i.start.assign("hour",u),i.start.assign("minute",l),c>=0?i.start.assign("meridiem",c):u<12?i.start.imply("meridiem",0):i.start.imply("meridiem",1),t=jM.exec(e.text.substring(i.index+i.text.length)),!t)return i.text.match(/^\d+$/)?null:i;let k=s.clone();if(i.end=e.createParsingComponents(),t[la]){var a=t[la];a=="\u660E"||a=="\u807D"?n.hour()>1&&k.add(1,"day"):a=="\u6628"||a=="\u5C0B"||a=="\u7434"?k.add(-1,"day"):a=="\u524D"?k.add(-2,"day"):a=="\u5927\u524D"?k.add(-3,"day"):a=="\u5F8C"?k.add(2,"day"):a=="\u5927\u5F8C"&&k.add(3,"day"),i.end.assign("day",k.date()),i.end.assign("month",k.month()+1),i.end.assign("year",k.year())}else if(t[fa]){var o=t[fa];o=="\u660E"||o=="\u807D"?k.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?k.add(-1,"day"):o=="\u524D"?k.add(-2,"day"):o=="\u5927\u524D"?k.add(-3,"day"):o=="\u5F8C"?k.add(2,"day"):o=="\u5927\u5F8C"&&k.add(3,"day"),i.end.assign("day",k.date()),i.end.assign("month",k.month()+1),i.end.assign("year",k.year())}else i.end.imply("day",k.date()),i.end.imply("month",k.month()+1),i.end.imply("year",k.year());if(u=0,l=0,c=-1,t[Dn]){var d=parseInt(t[Dn]);if(isNaN(d)&&(d=_t.zhStringToNumber(t[Dn])),d>=60)return null;i.end.assign("second",d)}if(u=parseInt(t[ha]),isNaN(u)&&(u=_t.zhStringToNumber(t[ha])),t[gt]?t[gt]=="\u534A"?l=30:t[gt]=="\u6B63"||t[gt]=="\u6574"?l=0:(l=parseInt(t[gt]),isNaN(l)&&(l=_t.zhStringToNumber(t[gt]))):u>100&&(l=u%100,u=Math.floor(u/100)),l>=60||u>24)return null;if(u>=12&&(c=1),t[ma]){if(u>12)return null;var f=t[ma][0].toLowerCase();f=="a"&&(c=0,u==12&&(u=0)),f=="p"&&(c=1,u!=12&&(u+=12)),i.start.isCertain("meridiem")||(c==0?(i.start.imply("meridiem",0),i.start.get("hour")==12&&i.start.assign("hour",0)):(i.start.imply("meridiem",1),i.start.get("hour")!=12&&i.start.assign("hour",i.start.get("hour")+12)))}else if(t[ca]){var h=t[ca],_=h[0];_=="\u671D"||_=="\u65E9"?(c=0,u==12&&(u=0)):_=="\u665A"&&(c=1,u!=12&&(u+=12))}else if(t[da]){var m=t[da],g=m[0];g=="\u4E0A"||g=="\u671D"||g=="\u65E9"||g=="\u51CC"?(c=0,u==12&&(u=0)):(g=="\u4E0B"||g=="\u664F"||g=="\u665A")&&(c=1,u!=12&&(u+=12))}else if(t[pa]){var R=t[pa],w=R[0];w=="\u4E0A"||w=="\u671D"||w=="\u65E9"||w=="\u51CC"?(c=0,u==12&&(u=0)):(w=="\u4E0B"||w=="\u664F"||w=="\u665A")&&(c=1,u!=12&&(u+=12))}return i.text=i.text+t[0],i.end.assign("hour",u),i.end.assign("minute",l),c>=0?i.end.assign("meridiem",c):i.start.isCertain("meridiem")&&i.start.get("meridiem")==1&&i.start.get("hour")>u?i.end.imply("meridiem",0):u>12&&i.end.imply("meridiem",1),i.end.date().getTime()<i.start.date().getTime()&&i.end.imply("day",i.end.get("day")+1),i}};Ui.default=Tc});var Ky=p(qi=>{"use strict";var BM=qi&&qi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(qi,"__esModule",{value:!0});var GM=BM(X()),HM=M(),zy=Mn(),zM=new RegExp("(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?<weekday>"+Object.keys(zy.WEEKDAY_OFFSET).join("|")+")"),bc=class extends HM.AbstractParserWithWordBoundaryChecking{innerPattern(){return zM}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=zy.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=GM.default(e.refDate),o=!1,u=a.day();return Math.abs(s-7-u)<Math.abs(s-u)?a=a.day(s-7):Math.abs(s+7-u)<Math.abs(s-u)?a=a.day(s+7):a=a.day(s),n.start.assign("weekday",s),o?(n.start.assign("day",a.date()),n.start.assign("month",a.month()+1),n.start.assign("year",a.year())):(n.start.imply("day",a.date()),n.start.imply("month",a.month()+1),n.start.imply("year",a.year())),n}};qi.default=bc});var Vy=p(Li=>{"use strict";var KM=Li&&Li.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Li,"__esModule",{value:!0});var VM=KM(Yt()),vc=class extends VM.default{patternBetween(){return/^\s*(至|到|\-|\~|||ー)\s*$/i}};Li.default=vc});var Xy=p(Wi=>{"use strict";var XM=Wi&&Wi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Wi,"__esModule",{value:!0});var ZM=XM(Zt()),Ec=class extends ZM.default{patternBetween(){return/^\s*$/i}};Wi.default=Ec});var Zy=p(ve=>{"use strict";var nr=ve&&ve.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ve,"__esModule",{value:!0});ve.createConfiguration=ve.createCasualConfiguration=ve.parseDate=ve.parse=ve.strict=ve.casual=ve.hant=void 0;var wc=Mt(),QM=nr(Gs()),JM=Qt(),eD=nr(Ly()),tD=nr(Yy()),rD=nr(jy()),nD=nr(Gy()),iD=nr(Hy()),sD=nr(Ky()),aD=nr(Vy()),oD=nr(Xy());ve.hant=new wc.Chrono(Rc());ve.casual=new wc.Chrono(Rc());ve.strict=new wc.Chrono(Mc());function uD(r,e,t){return ve.casual.parse(r,e,t)}ve.parse=uD;function lD(r,e,t){return ve.casual.parseDate(r,e,t)}ve.parseDate=lD;function Rc(){let r=Mc();return r.parsers.unshift(new eD.default),r}ve.createCasualConfiguration=Rc;function Mc(){let r=JM.includeCommonConfiguration({parsers:[new tD.default,new nD.default,new sD.default,new iD.default,new rD.default],refiners:[new aD.default,new oD.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof QM.default)),r}ve.createConfiguration=Mc});var tg=p(Yi=>{"use strict";var cD=Yi&&Yi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Yi,"__esModule",{value:!0});var dD=cD(X()),fD=M(),pD=1,Qy=2,hD=3,Jy=4,eg=5,mD=6,Dc=class extends fD.AbstractParserWithWordBoundaryChecking{innerPattern(e){return new RegExp("(\u73B0\u5728|\u7ACB(?:\u523B|\u5373)|\u5373\u523B)|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s|,|\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?","i")}innerExtract(e,t){let n=t.index,i=e.createParsingResult(n,t[0]),s=dD.default(e.refDate),a=s;if(t[pD])i.start.imply("hour",s.hour()),i.start.imply("minute",s.minute()),i.start.imply("second",s.second()),i.start.imply("millisecond",s.millisecond());else if(t[Qy]){let o=t[Qy],u=t[hD];o=="\u660E"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u540E"?a=a.add(2,"day"):o=="\u5927\u540E"&&(a=a.add(3,"day")),u=="\u65E9"?i.start.imply("hour",6):u=="\u665A"&&(i.start.imply("hour",22),i.start.imply("meridiem",1))}else if(t[Jy]){let u=t[Jy][0];u=="\u65E9"||u=="\u4E0A"?i.start.imply("hour",6):u=="\u4E0B"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):u=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):u=="\u591C"||u=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):u=="\u51CC"&&i.start.imply("hour",0)}else if(t[eg]){let o=t[eg];o=="\u660E"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u540E"?a=a.add(2,"day"):o=="\u5927\u540E"&&(a=a.add(3,"day"));let u=t[mD];if(u){let l=u[0];l=="\u65E9"||l=="\u4E0A"?i.start.imply("hour",6):l=="\u4E0B"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):l=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):l=="\u591C"||l=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):l=="\u51CC"&&i.start.imply("hour",0)}}return i.start.assign("day",a.date()),i.start.assign("month",a.month()+1),i.start.assign("year",a.year()),i}};Yi.default=Dc});var On=p(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.zhStringToYear=Ve.zhStringToNumber=Ve.WEEKDAY_OFFSET=Ve.NUMBER=void 0;Ve.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};Ve.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function yD(r){let e=0;for(let t=0;t<r.length;t++){let n=r[t];n==="\u5341"?e=e===0?Ve.NUMBER[n]:e*Ve.NUMBER[n]:e+=Ve.NUMBER[n]}return e}Ve.zhStringToNumber=yD;function gD(r){let e="";for(let t=0;t<r.length;t++){let n=r[t];e=e+Ve.NUMBER[n]}return parseInt(e)}Ve.zhStringToYear=gD});var ng=p($i=>{"use strict";var _D=$i&&$i.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($i,"__esModule",{value:!0});var TD=_D(X()),bD=M(),Br=On(),Oc=1,rg=2,Pc=3,kc=class extends bD.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(Br.NUMBER).join("")+"]{4}|["+Object.keys(Br.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(Br.NUMBER).join("")+"]{1,3})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(Br.NUMBER).join("")+"]{1,3})?(?:\\s*)(?:\u65E5|\u53F7)?")}innerExtract(e,t){let n=TD.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=parseInt(t[rg]);if(isNaN(s)&&(s=Br.zhStringToNumber(t[rg])),i.start.assign("month",s),t[Pc]){let a=parseInt(t[Pc]);isNaN(a)&&(a=Br.zhStringToNumber(t[Pc])),i.start.assign("day",a)}else i.start.imply("day",n.date());if(t[Oc]){let a=parseInt(t[Oc]);isNaN(a)&&(a=Br.zhStringToYear(t[Oc])),i.start.assign("year",a)}else i.start.imply("year",n.year());return i}};$i.default=kc});var sg=p(ji=>{"use strict";var vD=ji&&ji.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ji,"__esModule",{value:!0});var ED=vD(X()),wD=M(),ig=On(),RD=new RegExp("(\\d+|["+Object.keys(ig.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"),Ac=1,MD=2,Sc=class extends wD.AbstractParserWithWordBoundaryChecking{innerPattern(){return RD}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=parseInt(t[Ac]);if(isNaN(i)&&(i=ig.zhStringToNumber(t[Ac])),isNaN(i)){let u=t[Ac];if(u==="\u51E0")i=3;else if(u==="\u534A")i=.5;else return null}let s=ED.default(e.refDate),o=t[MD][0];return o.match(/[日天星礼月年]/)?(o=="\u65E5"||o=="\u5929"?s=s.add(i,"d"):o=="\u661F"||o=="\u793C"?s=s.add(i*7,"d"):o=="\u6708"?s=s.add(i,"month"):o=="\u5E74"&&(s=s.add(i,"year")),n.start.assign("year",s.year()),n.start.assign("month",s.month()+1),n.start.assign("day",s.date()),n):(o=="\u79D2"?s=s.add(i,"second"):o=="\u5206"?s=s.add(i,"minute"):(o=="\u5C0F"||o=="\u949F")&&(s=s.add(i,"hour")),n.start.imply("year",s.year()),n.start.imply("month",s.month()+1),n.start.imply("day",s.date()),n.start.assign("hour",s.hour()),n.start.assign("minute",s.minute()),n.start.assign("second",s.second()),n)}};ji.default=Sc});var og=p(Bi=>{"use strict";var DD=Bi&&Bi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Bi,"__esModule",{value:!0});var OD=DD(X()),PD=M(),ag=On(),kD=new RegExp("(?<prefix>\u4E0A|\u4E0B|\u8FD9)(?:\u4E2A)?(?:\u661F\u671F|\u793C\u62DC|\u5468)(?<weekday>"+Object.keys(ag.WEEKDAY_OFFSET).join("|")+")"),Nc=class extends PD.AbstractParserWithWordBoundaryChecking{innerPattern(){return kD}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=ag.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=null,o=t.groups.prefix;o=="\u4E0A"?a="last":o=="\u4E0B"?a="next":o=="\u8FD9"&&(a="this");let u=OD.default(e.refDate),l=!1,c=u.day();return a=="last"||a=="past"?(u=u.day(s-7),l=!0):a=="next"?(u=u.day(s+7),l=!0):a=="this"?u=u.day(s):Math.abs(s-7-c)<Math.abs(s-c)?u=u.day(s-7):Math.abs(s+7-c)<Math.abs(s-c)?u=u.day(s+7):u=u.day(s),n.start.assign("weekday",s),l?(n.start.assign("day",u.date()),n.start.assign("month",u.month()+1),n.start.assign("year",u.year())):(n.start.imply("day",u.date()),n.start.imply("month",u.month()+1),n.start.imply("year",u.year())),n}};Bi.default=Nc});var ug=p(Gi=>{"use strict";var AD=Gi&&Gi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Gi,"__esModule",{value:!0});var SD=AD(X()),ND=M(),bt=On(),xD=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(bt.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(bt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(bt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),CD=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(bt.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(bt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(bt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),ya=1,ga=2,_a=3,Ta=4,ba=5,va=6,Tt=7,Pn=8,Ea=9,xc=class extends ND.AbstractParserWithWordBoundaryChecking{innerPattern(){return xD}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=SD.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=n.clone();if(t[ya]){let c=t[ya];c=="\u660E"?n.hour()>1&&s.add(1,"day"):c=="\u6628"?s.add(-1,"day"):c=="\u524D"?s.add(-2,"day"):c=="\u5927\u524D"?s.add(-3,"day"):c=="\u540E"?s.add(2,"day"):c=="\u5927\u540E"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else if(t[Ta]){let c=t[Ta];c=="\u660E"?s.add(1,"day"):c=="\u6628"?s.add(-1,"day"):c=="\u524D"?s.add(-2,"day"):c=="\u5927\u524D"?s.add(-3,"day"):c=="\u540E"?s.add(2,"day"):c=="\u5927\u540E"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else i.start.imply("day",s.date()),i.start.imply("month",s.month()+1),i.start.imply("year",s.year());let a=0,o=0,u=-1;if(t[Pn]){let c=parseInt(t[Pn]);if(isNaN(c)&&(c=bt.zhStringToNumber(t[Pn])),c>=60)return null;i.start.assign("second",c)}if(a=parseInt(t[va]),isNaN(a)&&(a=bt.zhStringToNumber(t[va])),t[Tt]?t[Tt]=="\u534A"?o=30:t[Tt]=="\u6B63"||t[Tt]=="\u6574"?o=0:(o=parseInt(t[Tt]),isNaN(o)&&(o=bt.zhStringToNumber(t[Tt]))):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(u=1),t[Ea]){if(a>12)return null;let c=t[Ea][0].toLowerCase();c=="a"&&(u=0,a==12&&(a=0)),c=="p"&&(u=1,a!=12&&(a+=12))}else if(t[ga]){let d=t[ga][0];d=="\u65E9"?(u=0,a==12&&(a=0)):d=="\u665A"&&(u=1,a!=12&&(a+=12))}else if(t[_a]){let d=t[_a][0];d=="\u4E0A"||d=="\u65E9"||d=="\u51CC"?(u=0,a==12&&(a=0)):(d=="\u4E0B"||d=="\u665A")&&(u=1,a!=12&&(a+=12))}else if(t[ba]){let d=t[ba][0];d=="\u4E0A"||d=="\u65E9"||d=="\u51CC"?(u=0,a==12&&(a=0)):(d=="\u4E0B"||d=="\u665A")&&(u=1,a!=12&&(a+=12))}if(i.start.assign("hour",a),i.start.assign("minute",o),u>=0?i.start.assign("meridiem",u):a<12?i.start.imply("meridiem",0):i.start.imply("meridiem",1),t=CD.exec(e.text.substring(i.index+i.text.length)),!t)return i.text.match(/^\d+$/)?null:i;let l=s.clone();if(i.end=e.createParsingComponents(),t[ya]){let c=t[ya];c=="\u660E"?n.hour()>1&&l.add(1,"day"):c=="\u6628"?l.add(-1,"day"):c=="\u524D"?l.add(-2,"day"):c=="\u5927\u524D"?l.add(-3,"day"):c=="\u540E"?l.add(2,"day"):c=="\u5927\u540E"&&l.add(3,"day"),i.end.assign("day",l.date()),i.end.assign("month",l.month()+1),i.end.assign("year",l.year())}else if(t[Ta]){let c=t[Ta];c=="\u660E"?l.add(1,"day"):c=="\u6628"?l.add(-1,"day"):c=="\u524D"?l.add(-2,"day"):c=="\u5927\u524D"?l.add(-3,"day"):c=="\u540E"?l.add(2,"day"):c=="\u5927\u540E"&&l.add(3,"day"),i.end.assign("day",l.date()),i.end.assign("month",l.month()+1),i.end.assign("year",l.year())}else i.end.imply("day",l.date()),i.end.imply("month",l.month()+1),i.end.imply("year",l.year());if(a=0,o=0,u=-1,t[Pn]){let c=parseInt(t[Pn]);if(isNaN(c)&&(c=bt.zhStringToNumber(t[Pn])),c>=60)return null;i.end.assign("second",c)}if(a=parseInt(t[va]),isNaN(a)&&(a=bt.zhStringToNumber(t[va])),t[Tt]?t[Tt]=="\u534A"?o=30:t[Tt]=="\u6B63"||t[Tt]=="\u6574"?o=0:(o=parseInt(t[Tt]),isNaN(o)&&(o=bt.zhStringToNumber(t[Tt]))):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(u=1),t[Ea]){if(a>12)return null;let c=t[Ea][0].toLowerCase();c=="a"&&(u=0,a==12&&(a=0)),c=="p"&&(u=1,a!=12&&(a+=12)),i.start.isCertain("meridiem")||(u==0?(i.start.imply("meridiem",0),i.start.get("hour")==12&&i.start.assign("hour",0)):(i.start.imply("meridiem",1),i.start.get("hour")!=12&&i.start.assign("hour",i.start.get("hour")+12)))}else if(t[ga]){let d=t[ga][0];d=="\u65E9"?(u=0,a==12&&(a=0)):d=="\u665A"&&(u=1,a!=12&&(a+=12))}else if(t[_a]){let d=t[_a][0];d=="\u4E0A"||d=="\u65E9"||d=="\u51CC"?(u=0,a==12&&(a=0)):(d=="\u4E0B"||d=="\u665A")&&(u=1,a!=12&&(a+=12))}else if(t[ba]){let d=t[ba][0];d=="\u4E0A"||d=="\u65E9"||d=="\u51CC"?(u=0,a==12&&(a=0)):(d=="\u4E0B"||d=="\u665A")&&(u=1,a!=12&&(a+=12))}return i.text=i.text+t[0],i.end.assign("hour",a),i.end.assign("minute",o),u>=0?i.end.assign("meridiem",u):i.start.isCertain("meridiem")&&i.start.get("meridiem")==1&&i.start.get("hour")>a?i.end.imply("meridiem",0):a>12&&i.end.imply("meridiem",1),i.end.date().getTime()<i.start.date().getTime()&&i.end.imply("day",i.end.get("day")+1),i}};Gi.default=xc});var cg=p(Hi=>{"use strict";var ID=Hi&&Hi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Hi,"__esModule",{value:!0});var FD=ID(X()),UD=M(),lg=On(),qD=new RegExp("(?:\u661F\u671F|\u793C\u62DC|\u5468)(?<weekday>"+Object.keys(lg.WEEKDAY_OFFSET).join("|")+")"),Cc=class extends UD.AbstractParserWithWordBoundaryChecking{innerPattern(){return qD}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=lg.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=FD.default(e.refDate),o=!1,u=a.day();return Math.abs(s-7-u)<Math.abs(s-u)?a=a.day(s-7):Math.abs(s+7-u)<Math.abs(s-u)?a=a.day(s+7):a=a.day(s),n.start.assign("weekday",s),o?(n.start.assign("day",a.date()),n.start.assign("month",a.month()+1),n.start.assign("year",a.year())):(n.start.imply("day",a.date()),n.start.imply("month",a.month()+1),n.start.imply("year",a.year())),n}};Hi.default=Cc});var dg=p(zi=>{"use strict";var LD=zi&&zi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(zi,"__esModule",{value:!0});var WD=LD(Yt()),Ic=class extends WD.default{patternBetween(){return/^\s*(至|到|-|~|||ー)\s*$/i}};zi.default=Ic});var fg=p(Ki=>{"use strict";var YD=Ki&&Ki.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ki,"__esModule",{value:!0});var $D=YD(Zt()),Fc=class extends $D.default{patternBetween(){return/^\s*$/i}};Ki.default=Fc});var pg=p(Ee=>{"use strict";var ir=Ee&&Ee.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ee,"__esModule",{value:!0});Ee.createConfiguration=Ee.createCasualConfiguration=Ee.parseDate=Ee.parse=Ee.strict=Ee.casual=Ee.hans=void 0;var Uc=Mt(),jD=ir(Gs()),BD=Qt(),GD=ir(tg()),HD=ir(ng()),zD=ir(sg()),KD=ir(og()),VD=ir(ug()),XD=ir(cg()),ZD=ir(dg()),QD=ir(fg());Ee.hans=new Uc.Chrono(qc());Ee.casual=new Uc.Chrono(qc());Ee.strict=new Uc.Chrono(Lc());function JD(r,e,t){return Ee.casual.parse(r,e,t)}Ee.parse=JD;function eO(r,e,t){return Ee.casual.parseDate(r,e,t)}Ee.parseDate=eO;function qc(){let r=Lc();return r.parsers.unshift(new GD.default),r}Ee.createCasualConfiguration=qc;function Lc(){let r=BD.includeCommonConfiguration({parsers:[new HD.default,new KD.default,new XD.default,new VD.default,new zD.default],refiners:[new ZD.default,new QD.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof jD.default)),r}Ee.createConfiguration=Lc});var mg=p(at=>{"use strict";var hg=at&&at.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),tO=at&&at.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),rO=at&&at.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&hg(e,r,t)},nO=at&&at.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&hg(e,r,t);return tO(e,r),e};Object.defineProperty(at,"__esModule",{value:!0});at.hans=void 0;rO(Zy(),at);at.hans=nO(pg())});var Xe=p(U=>{"use strict";Object.defineProperty(U,"__esModule",{value:!0});U.parseTimeUnits=U.TIME_UNITS_PATTERN=U.parseYear=U.YEAR_PATTERN=U.parseOrdinalNumberPattern=U.ORDINAL_NUMBER_PATTERN=U.parseNumberPattern=U.NUMBER_PATTERN=U.TIME_UNIT_DICTIONARY=U.ORDINAL_WORD_DICTIONARY=U.INTEGER_WORD_DICTIONARY=U.MONTH_DICTIONARY=U.FULL_MONTH_NAME_DICTIONARY=U.WEEKDAY_DICTIONARY=U.REGEX_PARTS=void 0;var wa=re(),iO=Ue();U.REGEX_PARTS={leftBoundary:"([^\\p{L}\\p{N}_]|^)",rightBoundary:"(?=[^\\p{L}\\p{N}_]|$)",flags:"iu"};U.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};U.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};U.MONTH_DICTIONARY=Object.assign(Object.assign({},U.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});U.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};U.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};U.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"};U.NUMBER_PATTERN=`(?:${wa.matchAnyPattern(U.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 gg(r){let e=r.toLowerCase();return U.INTEGER_WORD_DICTIONARY[e]!==void 0?U.INTEGER_WORD_DICTIONARY[e]:e.match(/несколько/)?3:e.match(/пол/)?.5:e.match(/пар/)?2:e===""?1:parseFloat(e)}U.parseNumberPattern=gg;U.ORDINAL_NUMBER_PATTERN=`(?:${wa.matchAnyPattern(U.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:\u0433\u043E|\u043E\u0433\u043E|\u0435|\u043E\u0435)?)`;function sO(r){let e=r.toLowerCase();return U.ORDINAL_WORD_DICTIONARY[e]!==void 0?U.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}U.parseOrdinalNumberPattern=sO;var Wc="(?:\\s+(?:\u0433\u043E\u0434\u0443|\u0433\u043E\u0434\u0430|\u0433\u043E\u0434|\u0433|\u0433.))?";U.YEAR_PATTERN=`(?:[1-9][0-9]{0,3}${Wc}\\s*(?:\u043D.\u044D.|\u0434\u043E \u043D.\u044D.|\u043D. \u044D.|\u0434\u043E \u043D. \u044D.)|[1-2][0-9]{3}${Wc}|[5-9][0-9]${Wc})`;function aO(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 iO.findMostLikelyADYear(e)}U.parseYear=aO;var _g=`(${U.NUMBER_PATTERN})\\s{0,3}(${wa.matchAnyPattern(U.TIME_UNIT_DICTIONARY)})`,yg=new RegExp(_g,"i");U.TIME_UNITS_PATTERN=wa.repeatedTimeunitPattern("(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s{0,3})?",_g);function oO(r){let e={},t=r,n=yg.exec(t);for(;n;)uO(e,n),t=t.substring(n[0].length).trim(),n=yg.exec(t);return e}U.parseTimeUnits=oO;function uO(r,e){let t=gg(e[1]),n=U.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var bg=p($c=>{"use strict";Object.defineProperty($c,"__esModule",{value:!0});var Vi=Xe(),lO=me(),cO=M(),Tg=`(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s*(?:~\\s*)?)?(${Vi.TIME_UNITS_PATTERN})${Vi.REGEX_PARTS.rightBoundary}`,dO=new RegExp(`(?:\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0435|\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0438)\\s*${Tg}`,Vi.REGEX_PARTS.flags),fO=new RegExp(Tg,"i"),Yc=class extends cO.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Vi.REGEX_PARTS.leftBoundary}innerPattern(e){return e.option.forwardDate?fO:dO}innerExtract(e,t){let n=Vi.parseTimeUnits(t[1]);return lO.ParsingComponents.createRelativeFromReference(e.reference,n)}};$c.default=Yc});var Mg=p(Bc=>{"use strict";Object.defineProperty(Bc,"__esModule",{value:!0});var pO=Ue(),Xi=Xe(),Rg=Xe(),Ra=Xe(),hO=re(),mO=M(),yO=new RegExp(`(?:\u0441)?\\s*(${Ra.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:\u043F\u043E|-|\u2013|\u0434\u043E)?\\s{0,3}(${Ra.ORDINAL_NUMBER_PATTERN}))?(?:-|\\/|\\s{0,3}(?:of)?\\s{0,3})(${hO.matchAnyPattern(Xi.MONTH_DICTIONARY)})(?:(?:-|\\/|,?\\s{0,3})(${Rg.YEAR_PATTERN}(?![^\\s]\\d)))?${Xi.REGEX_PARTS.rightBoundary}`,Xi.REGEX_PARTS.flags),vg=1,Eg=2,gO=3,wg=4,jc=class extends mO.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Xi.REGEX_PARTS.leftBoundary}innerPattern(){return yO}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Xi.MONTH_DICTIONARY[t[gO].toLowerCase()],s=Ra.parseOrdinalNumberPattern(t[vg]);if(s>31)return t.index=t.index+t[vg].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[wg]){let a=Rg.parseYear(t[wg]);n.start.assign("year",a)}else{let a=pO.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[Eg]){let a=Ra.parseOrdinalNumberPattern(t[Eg]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Bc.default=jc});var Pg=p(Hc=>{"use strict";Object.defineProperty(Hc,"__esModule",{value:!0});var Zi=Xe(),_O=Ue(),TO=re(),Og=Xe(),bO=M(),vO=new RegExp(`((?:\u0432)\\s*)?(${TO.matchAnyPattern(Zi.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${Og.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,Zi.REGEX_PARTS.flags),EO=2,Dg=3,Gc=class extends bO.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Zi.REGEX_PARTS.leftBoundary}innerPattern(){return vO}innerExtract(e,t){let n=t[EO].toLowerCase();if(t[0].length<=3&&!Zi.FULL_MONTH_NAME_DICTIONARY[n])return null;let i=e.createParsingResult(t.index,t.index+t[0].length);i.start.imply("day",1);let s=Zi.MONTH_DICTIONARY[n];if(i.start.assign("month",s),t[Dg]){let a=Og.parseYear(t[Dg]);i.start.assign("year",a)}else{let a=_O.findYearClosestToRef(e.refDate,1,s);i.start.imply("year",a)}return i}};Hc.default=Gc});var Ag=p(Kc=>{"use strict";Object.defineProperty(Kc,"__esModule",{value:!0});var Ma=we(),wO=Ur(),kg=Xe(),zc=class extends wO.AbstractTimeExpressionParser{constructor(e){super(e)}patternFlags(){return kg.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))?(?!\\/)${kg.REGEX_PARTS.rightBoundary}`}extractPrimaryTimeComponents(e,t){let n=super.extractPrimaryTimeComponents(e,t);if(n){if(t[0].endsWith("\u0432\u0435\u0447\u0435\u0440\u0430")){let i=n.get("hour");i>=6&&i<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",Ma.Meridiem.PM)):i<6&&n.assign("meridiem",Ma.Meridiem.AM)}if(t[0].endsWith("\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F")){n.assign("meridiem",Ma.Meridiem.PM);let i=n.get("hour");i>=0&&i<=6&&n.assign("hour",n.get("hour")+12)}t[0].endsWith("\u0443\u0442\u0440\u0430")&&(n.assign("meridiem",Ma.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};Kc.default=zc});var Sg=p(Xc=>{"use strict";Object.defineProperty(Xc,"__esModule",{value:!0});var Da=Xe(),RO=me(),MO=M(),DO=mt(),OO=new RegExp(`(${Da.TIME_UNITS_PATTERN})\\s{0,5}\u043D\u0430\u0437\u0430\u0434(?=(?:\\W|$))`,Da.REGEX_PARTS.flags),Vc=class extends MO.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Da.REGEX_PARTS.leftBoundary}innerPattern(){return OO}innerExtract(e,t){let n=Da.parseTimeUnits(t[1]),i=DO.reverseTimeUnits(n);return RO.ParsingComponents.createRelativeFromReference(e.reference,i)}};Xc.default=Vc});var Ng=p(Qi=>{"use strict";var PO=Qi&&Qi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Qi,"__esModule",{value:!0});var kO=PO(Yt()),Zc=class extends kO.default{patternBetween(){return/^\s*(и до|и по|до|по|-)\s*$/i}};Qi.default=Zc});var xg=p(Ji=>{"use strict";var AO=Ji&&Ji.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ji,"__esModule",{value:!0});var SO=AO(Zt()),Qc=class extends SO.default{patternBetween(){return new RegExp("^\\s*(T|\u0432|,|-)?\\s*$")}};Ji.default=Qc});var Cg=p(sr=>{"use strict";var NO=sr&&sr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),xO=sr&&sr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),CO=sr&&sr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&NO(e,r,t);return xO(e,r),e};Object.defineProperty(sr,"__esModule",{value:!0});var IO=M(),es=CO(er()),Jc=Xe(),FO=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)${Jc.REGEX_PARTS.rightBoundary}`,Jc.REGEX_PARTS.flags),ed=class extends IO.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Jc.REGEX_PARTS.leftBoundary}innerPattern(e){return FO}innerExtract(e,t){let n=t[1].toLowerCase(),i=e.createParsingComponents();switch(n){case"\u0441\u0435\u0433\u043E\u0434\u043D\u044F":return es.today(e.reference);case"\u0432\u0447\u0435\u0440\u0430":return es.yesterday(e.reference);case"\u0437\u0430\u0432\u0442\u0440\u0430":return es.tomorrow(e.reference);case"\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430":return es.theDayAfter(e.reference,2);case"\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430":return es.theDayBefore(e.reference,2)}return i}};sr.default=ed});var Ig=p(At=>{"use strict";var UO=At&&At.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),qO=At&&At.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),LO=At&&At.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&UO(e,r,t);return qO(e,r),e},WO=At&&At.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(At,"__esModule",{value:!0});var YO=M(),Gr=LO(er()),$O=ht(),jO=WO(X()),td=Xe(),BO=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)${td.REGEX_PARTS.rightBoundary}`,td.REGEX_PARTS.flags),rd=class extends YO.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return td.REGEX_PARTS.leftBoundary}innerPattern(){return BO}innerExtract(e,t){let n=jO.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();if(i==="\u0441\u0435\u0439\u0447\u0430\u0441")return Gr.now(e.reference);if(i==="\u0432\u0435\u0447\u0435\u0440\u043E\u043C"||i==="\u0432\u0435\u0447\u0435\u0440\u0430")return Gr.evening(e.reference);if(i.endsWith("\u0443\u0442\u0440\u043E\u043C")||i.endsWith("\u0443\u0442\u0440\u0430"))return Gr.morning(e.reference);if(i.match(/в\s*полдень/))return Gr.noon(e.reference);if(i.match(/прошлой\s*ночью/))return Gr.lastNight(e.reference);if(i.match(/прошлым\s*вечером/))return Gr.yesterdayEvening(e.reference);if(i.match(/следующей\s*ночью/)){let a=n.hour()<22?1:2;n=n.add(a,"day"),$O.assignSimilarDate(s,n),s.imply("hour",0)}return i.match(/в\s*полночь/)||i.endsWith("\u043D\u043E\u0447\u044C\u044E")?Gr.midnight(e.reference):s}};At.default=rd});var Fg=p(id=>{"use strict";Object.defineProperty(id,"__esModule",{value:!0});var ts=Xe(),GO=re(),HO=M(),zO=Lr(),KO=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*)?(${GO.matchAnyPattern(ts.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)?${ts.REGEX_PARTS.rightBoundary}`,ts.REGEX_PARTS.flags),VO=1,XO=2,ZO=3,nd=class extends HO.AbstractParserWithWordBoundaryChecking{innerPattern(){return KO}patternLeftBoundary(){return ts.REGEX_PARTS.leftBoundary}innerExtract(e,t){let n=t[XO].toLowerCase(),i=ts.WEEKDAY_DICTIONARY[n],s=t[VO],a=t[ZO],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o=="\u043F\u0440\u043E\u0448\u043B\u044B\u0439"||o=="\u043F\u0440\u043E\u0448\u043B\u0443\u044E"||o=="\u043F\u0440\u043E\u0448\u043B\u043E\u0439"?u="last":o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E"?u="next":(o=="\u044D\u0442\u043E\u0442"||o=="\u044D\u0442\u0443"||o=="\u044D\u0442\u043E\u0439")&&(u="this");let l=zO.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};id.default=nd});var qg=p(ns=>{"use strict";var QO=ns&&ns.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ns,"__esModule",{value:!0});var rs=Xe(),Ug=me(),JO=QO(X()),eP=M(),tP=re(),rP=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*(${tP.matchAnyPattern(rs.TIME_UNIT_DICTIONARY)})(?=\\s*)${rs.REGEX_PARTS.rightBoundary}`,rs.REGEX_PARTS.flags),nP=1,iP=2,sd=class extends eP.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return rs.REGEX_PARTS.leftBoundary}innerPattern(){return rP}innerExtract(e,t){let n=t[nP].toLowerCase(),i=t[iP].toLowerCase(),s=rs.TIME_UNIT_DICTIONARY[i];if(n=="\u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||n=="\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C"){let u={};return u[s]=1,Ug.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u043C"||n=="\u043D\u0430 \u043F\u0440\u043E\u0448\u043B\u043E\u0439"){let u={};return u[s]=-1,Ug.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=JO.default(e.reference.instant);return s.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):s.match(/month/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):s.match(/year/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};ns.default=sd});var Lg=p(od=>{"use strict";Object.defineProperty(od,"__esModule",{value:!0});var is=Xe(),sP=me(),aP=M(),oP=mt(),uP=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*(${is.TIME_UNITS_PATTERN})${is.REGEX_PARTS.rightBoundary}`,is.REGEX_PARTS.flags),ad=class extends aP.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return is.REGEX_PARTS.leftBoundary}innerPattern(){return uP}innerExtract(e,t){let n=t[1].toLowerCase(),i=is.parseTimeUnits(t[2]);switch(n){case"\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435":case"\u043F\u0440\u043E\u0448\u043B\u044B\u0435":case"-":i=oP.reverseTimeUnits(i);break}return sP.ParsingComponents.createRelativeFromReference(e.reference,i)}};od.default=ad});var $g=p(Ne=>{"use strict";var ot=Ne&&Ne.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ne,"__esModule",{value:!0});Ne.createConfiguration=Ne.createCasualConfiguration=Ne.parseDate=Ne.parse=Ne.strict=Ne.casual=void 0;var lP=ot(bg()),cP=ot(Mg()),dP=ot(Pg()),fP=ot(Ag()),pP=ot(Sg()),hP=ot(Ng()),mP=ot(xg()),yP=Qt(),gP=ot(Cg()),_P=ot(Ig()),TP=ot(Fg()),bP=ot(qg()),Wg=Mt(),vP=ot(Wr()),EP=ot(Lg());Ne.casual=new Wg.Chrono(Yg());Ne.strict=new Wg.Chrono(ud(!0));function wP(r,e,t){return Ne.casual.parse(r,e,t)}Ne.parse=wP;function RP(r,e,t){return Ne.casual.parseDate(r,e,t)}Ne.parseDate=RP;function Yg(){let r=ud(!1);return r.parsers.unshift(new gP.default),r.parsers.unshift(new _P.default),r.parsers.unshift(new dP.default),r.parsers.unshift(new bP.default),r.parsers.unshift(new EP.default),r}Ne.createCasualConfiguration=Yg;function ud(r=!0){return yP.includeCommonConfiguration({parsers:[new vP.default(!0),new lP.default,new cP.default,new TP.default,new fP.default(r),new pP.default],refiners:[new mP.default,new hP.default]},r)}Ne.createConfiguration=ud});var we=p(W=>{"use strict";var MP=W&&W.__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]}),DP=W&&W.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Mr=W&&W.__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)&&MP(e,r,t);return DP(e,r),e};Object.defineProperty(W,"__esModule",{value:!0});W.parseDate=W.parse=W.casual=W.strict=W.ru=W.zh=W.nl=W.pt=W.ja=W.fr=W.de=W.Meridiem=W.Chrono=W.en=void 0;var ld=Mr(Du());W.en=ld;var OP=Mt();Object.defineProperty(W,"Chrono",{enumerable:!0,get:function(){return OP.Chrono}});var PP;(function(r){r[r.AM=0]="AM",r[r.PM=1]="PM"})(PP=W.Meridiem||(W.Meridiem={}));var kP=Mr(Zh());W.de=kP;var AP=Mr(Dm());W.fr=AP;var SP=Mr(Im());W.ja=SP;var NP=Mr(Zm());W.pt=NP;var xP=Mr(Iy());W.nl=xP;var CP=Mr(mg());W.zh=CP;var IP=Mr($g());W.ru=IP;W.strict=ld.strict;W.casual=ld.casual;function FP(r,e,t){return W.casual.parse(r,e,t)}W.parse=FP;function UP(r,e,t){return W.casual.parseDate(r,e,t)}W.parseDate=UP});var Ht=p(kr=>{"use strict";kr.__esModule=!0;var dk;(function(r){r.AND="AND",r.OR="OR",r.XOR="XOR",r.NOT="NOT"})(dk=kr.Operators||(kr.Operators={}));var fk;(function(r){r.OPEN_PARENTHESIS="(",r.CLOSE_PARENTHESIS=")"})(fk=kr.StructuralCharacters||(kr.StructuralCharacters={}));var pk;(function(r){r.IDENTIFIER="IDENTIFIER",r.OPERATOR="OPERATOR",r.STRUCTURAL_CHARACTER="STRUCTURAL_CHARACTER",r.EOF="EOF",r.COMMENT="COMMENT"})(pk=kr.Tokens||(kr.Tokens={}))});var Sd=p(ja=>{"use strict";ja.__esModule=!0;var ye=Ht();ja.OPERATOR_PRECEDENCE={NOT:0,XOR:1,AND:2,OR:3};ja.VALID_TOKENS={identifierOnly:[{name:ye.Tokens.IDENTIFIER},{name:ye.Tokens.STRUCTURAL_CHARACTER,value:ye.StructuralCharacters.OPEN_PARENTHESIS}],identifierOrNot:[{name:ye.Tokens.IDENTIFIER},{name:ye.Tokens.STRUCTURAL_CHARACTER,value:ye.StructuralCharacters.OPEN_PARENTHESIS},{name:ye.Tokens.OPERATOR,value:ye.Operators.NOT}],binaryOperator:[{name:ye.Tokens.OPERATOR,value:ye.Operators.AND},{name:ye.Tokens.OPERATOR,value:ye.Operators.OR},{name:ye.Tokens.OPERATOR,value:ye.Operators.XOR}],binaryOperatorOrClose:[{name:ye.Tokens.OPERATOR,value:ye.Operators.AND},{name:ye.Tokens.OPERATOR,value:ye.Operators.OR},{name:ye.Tokens.OPERATOR,value:ye.Operators.XOR},{name:ye.Tokens.STRUCTURAL_CHARACTER,value:ye.StructuralCharacters.CLOSE_PARENTHESIS}]}});var Nd=p(dr=>{"use strict";dr.__esModule=!0;var Ln=Ht();dr.STRUCTURAL_CHARACTERS={"(":Ln.StructuralCharacters.OPEN_PARENTHESIS,")":Ln.StructuralCharacters.CLOSE_PARENTHESIS};dr.OPERATORS={AND:Ln.Operators.AND,OR:Ln.Operators.OR,XOR:Ln.Operators.XOR,NOT:Ln.Operators.NOT};dr.SEPARATORS=new Set([32,9,10,13].map(function(r){return String.fromCodePoint(r)}));dr.QUOTED_IDENTIFIER_DELIMITER=String.fromCodePoint(34);dr.COMMENT_DELIMITER=String.fromCodePoint(35);dr.EOL=String.fromCodePoint(10);dr.ESCAPE_CHARACTER=String.fromCodePoint(92)});var T_=p(fr=>{"use strict";var xd=fr&&fr.__assign||function(){return xd=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}return r},xd.apply(this,arguments)};fr.__esModule=!0;var __=Ht(),en=Nd();fr.createResult=function(r,e,t){return{token:xd({name:r},e!==null?{value:e}:{}),remainingString:t}};fr.getComment=function(r){for(var e=r.length,t=0;t<r.length;t+=1){var n=r[t];if(n===en.EOL){e=t;break}}return fr.createResult(__.Tokens.COMMENT,r.slice(0,e),r.slice(e+1))};fr.getQuotedIdentifier=function(r){for(var e=!1,t="",n=null,i=0;i<r.length;i+=1){var s=r[i];if(n===null)s===en.QUOTED_IDENTIFIER_DELIMITER?e?t=t.slice(-1)+en.QUOTED_IDENTIFIER_DELIMITER:n=i:(s===en.ESCAPE_CHARACTER?e=!0:e=!1,t=t+=s);else{if(!en.SEPARATORS.has(s)&&!en.STRUCTURAL_CHARACTERS[s])throw new Error("Unexpected character: "+s+" Expected ) character or separator");break}}if(n===null)throw new Error("Unexpected end of expression: expected "+en.QUOTED_IDENTIFIER_DELIMITER+" character");return fr.createResult(__.Tokens.IDENTIFIER,t,r.slice(n+1))}});var b_=p(Cd=>{"use strict";Cd.__esModule=!0;var Wn=Ht(),lt=Nd(),Yn=T_();Cd.lex=function(r){for(var e=null,t=null,n=null,i=0;i<r.length;i+=1){var s=r[i];if(e===null){if(!lt.SEPARATORS.has(s)){var a=lt.STRUCTURAL_CHARACTERS[s];if(a){var o=r[i+1];if(a===Wn.StructuralCharacters.CLOSE_PARENTHESIS&&o&&!lt.SEPARATORS.has(o)&&o!==Wn.StructuralCharacters.CLOSE_PARENTHESIS)throw new Error("Unexpected character: "+o+". A closing parenthesis should be followed by another closing parenthesis or whitespace");return Yn.createResult(Wn.Tokens.STRUCTURAL_CHARACTER,lt.STRUCTURAL_CHARACTERS[s],r.slice(i+1))}if(s===lt.QUOTED_IDENTIFIER_DELIMITER)return Yn.getQuotedIdentifier(r.slice(i+1));if(s===lt.COMMENT_DELIMITER)return Yn.getComment(r.slice(i+1));e=i}}else if(lt.SEPARATORS.has(s)||lt.STRUCTURAL_CHARACTERS[s]){t=i,n=s;break}else if(s===lt.QUOTED_IDENTIFIER_DELIMITER||s===lt.COMMENT_DELIMITER)throw new Error("Unexpected character: "+s)}if(e!==null){t=t!=null?t:r.length;var u=r.slice(e,t),l=r.slice(t);if(lt.OPERATORS[u]){if(n&&!lt.SEPARATORS.has(n))throw new Error("Unexpected character: "+n+". Operators should be separated using whitespace");return Yn.createResult(Wn.Tokens.OPERATOR,lt.OPERATORS[u],l)}else return Yn.createResult(Wn.Tokens.IDENTIFIER,u,l)}return Yn.createResult(Wn.Tokens.EOF,null,"")}});var v_=p(pr=>{"use strict";var hk=pr&&pr.__spreadArrays||function(){for(var r=0,e=0,t=arguments.length;e<t;e++)r+=arguments[e].length;for(var n=Array(r),i=0,e=0;e<t;e++)for(var s=arguments[e],a=0,o=s.length;a<o;a++,i++)n[i]=s[a];return n};pr.__esModule=!0;var mk=b_(),$n=Ht(),Ba=Sd();pr.newTokenGenerator=function(r){var e=r;return function(t,n){for(n===void 0&&(n=!1);;){var i=mk.lex(e),s=i.token,a=i.remainingString;if(e=a,s.name!==$n.Tokens.COMMENT)return pr.validateToken(s,t,n),s}}};pr.getValue=function(r,e){var t=r(Ba.VALID_TOKENS.identifierOrNot),n=t.value===$n.Operators.NOT;n&&(t=r(Ba.VALID_TOKENS.identifierOnly));var i=t.name===$n.Tokens.STRUCTURAL_CHARACTER?e(r,!0):[t];return n?hk(i,[{name:$n.Tokens.OPERATOR,value:$n.Operators.NOT}]):i};pr.previousOperatorTakesPrecedent=function(r,e){return Ba.OPERATOR_PRECEDENCE[r]<=Ba.OPERATOR_PRECEDENCE[e]};pr.validateToken=function(r,e,t){if(t===void 0&&(t=!1),r.name===$n.Tokens.EOF){if(t)return;throw new Error("Unexpected end of expression")}for(var n=0,i=e;n<i.length;n++){var s=i[n];if(s.name===r.name&&(!s.value||s.value===r.value))return}throw new TypeError("Invalid token")}});var Fd=p(ms=>{"use strict";var jn=ms&&ms.__spreadArrays||function(){for(var r=0,e=0,t=arguments.length;e<t;e++)r+=arguments[e].length;for(var n=Array(r),i=0,e=0;e<t;e++)for(var s=arguments[e],a=0,o=s.length;a<o;a++,i++)n[i]=s[a];return n};ms.__esModule=!0;var E_=Ht(),w_=Sd(),Ga=v_();ms.parse=function(r){if(typeof r!="string")throw new Error("Expected string but received "+typeof r);var e=Ga.newTokenGenerator(r);return Id(e)};var Id=function(r,e){e===void 0&&(e=!1);for(var t=jn(Ga.getValue(r,Id)),n=[];;){var i=e?w_.VALID_TOKENS.binaryOperatorOrClose:w_.VALID_TOKENS.binaryOperator,s=r(i,!e);if(s.name===E_.Tokens.EOF||s.name===E_.Tokens.STRUCTURAL_CHARACTER)return jn(t,jn(n).reverse());for(;n.length;){var a=n[n.length-1]||null;if(a&&Ga.previousOperatorTakesPrecedent(a.value,s.value))t=jn(t,[a]),n=n.slice(0,-1);else break}n=jn(n,[s]),t=jn(t,Ga.getValue(r,Id))}}});var Ud=p(hr=>{"use strict";hr.__esModule=!0;var R_=Ht();hr.andUtil=function(r,e){return r&&e};hr.orUtil=function(r,e){return r||e};hr.xorUtil=function(r,e){return r!==e};hr.notUtil=function(r){return!r};hr.isIdentifier=function(r){var e=r.name,t=r.value;return e===R_.Tokens.IDENTIFIER&&typeof t=="string"};hr.isOperator=function(r){var e=r.name,t=r.value;return e===R_.Tokens.OPERATOR&&typeof t=="string"};hr.throwInvalidExpression=function(r){throw new TypeError("Invalid postfix expression: "+r)}});var M_=p(Wd=>{"use strict";var ys;Wd.__esModule=!0;var qd=Ht(),Ld=Ud();Wd.OPERATOR_MAP=(ys={},ys[qd.Operators.AND]=Ld.andUtil,ys[qd.Operators.OR]=Ld.orUtil,ys[qd.Operators.XOR]=Ld.xorUtil,ys)});var O_=p(rn=>{"use strict";var Yd=rn&&rn.__spreadArrays||function(){for(var r=0,e=0,t=arguments.length;e<t;e++)r+=arguments[e].length;for(var n=Array(r),i=0,e=0;e<t;e++)for(var s=arguments[e],a=0,o=s.length;a<o;a++,i++)n[i]=s[a];return n};rn.__esModule=!0;var yk=Fd(),D_=Ht(),gk=M_(),tn=Ud();rn.getEvaluator=function(r){var e=yk.parse(r);return function(t){return rn.evaluate(e,t)}};rn.evaluate=function(r,e){if(!Array.isArray(r))throw new Error(r+" should be an array. evaluate takes in a parsed expression. Use in combination with parse or use getEvaluator");var t=r.reduce(function(n,i,s){if(!(i&&(tn.isIdentifier(i)||tn.isOperator(i))))throw new Error("Invalid token: "+i+". Found in parsed expression at index "+s);if(i.name===D_.Tokens.IDENTIFIER)return Yd(n,[Boolean(e[i.value])]);var a=n[n.length-2],o=n[n.length-1];if(i.value===D_.Operators.NOT)return o===void 0&&tn.throwInvalidExpression("missing identifier"),Yd(n.slice(0,-1),[tn.notUtil(o)]);(o===void 0||a===void 0)&&tn.throwInvalidExpression("missing identifier");var u=gk.OPERATOR_MAP[i.value];return u||tn.throwInvalidExpression("unknown operator"),Yd(n.slice(0,-2),[u(a,o)])},[]);return t.length!==1&&tn.throwInvalidExpression("too many identifiers after evaluation"),t[0]}});var k_=p(gs=>{"use strict";gs.__esModule=!0;var P_=O_();gs.getEvaluator=P_.getEvaluator;gs.evaluate=P_.evaluate;var _k=Fd();gs.parse=_k.parse});var Rk={};j_(Rk,{default:()=>oo});module.exports=B_(Rk);var I_=require("obsidian");var Sa=require("obsidian");var Dk=new Error("timeout while waiting for mutex to become available"),Ok=new Error("mutex already locked"),G_=new Error("request for lock canceled"),cf=function(r,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function u(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?s(c.value):i(c.value).then(o,u)}l((n=n.apply(r,e||[])).next())})},po=class{constructor(e,t=G_){if(this._maxConcurrency=e,this._cancelError=t,this._queue=[],this._waiters=[],e<=0)throw new Error("semaphore must be initialized to a positive value");this._value=e}acquire(){let e=this.isLocked(),t=new Promise((n,i)=>this._queue.push({resolve:n,reject:i}));return e||this._dispatch(),t}runExclusive(e){return cf(this,void 0,void 0,function*(){let[t,n]=yield this.acquire();try{return yield e(t)}finally{n()}})}waitForUnlock(){return cf(this,void 0,void 0,function*(){return this.isLocked()?new Promise(t=>this._waiters.push({resolve:t})):Promise.resolve()})}isLocked(){return this._value<=0}release(){if(this._maxConcurrency>1)throw new Error("this method is unavailable on semaphores with concurrency > 1; use the scoped release returned by acquire instead");if(this._currentReleaser){let e=this._currentReleaser;this._currentReleaser=void 0,e()}}cancel(){this._queue.forEach(e=>e.reject(this._cancelError)),this._queue=[]}_dispatch(){let e=this._queue.shift();if(!e)return;let t=!1;this._currentReleaser=()=>{t||(t=!0,this._value++,this._resolveWaiters(),this._dispatch())},e.resolve([this._value--,this._currentReleaser])}_resolveWaiters(){this._waiters.forEach(e=>e.resolve()),this._waiters=[]}},H_=function(r,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function u(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?s(c.value):i(c.value).then(o,u)}l((n=n.apply(r,e||[])).next())})},Ps=class{constructor(e){this._semaphore=new po(1,e)}acquire(){return H_(this,void 0,void 0,function*(){let[,e]=yield this._semaphore.acquire();return e})}runExclusive(e){return this._semaphore.runExclusive(()=>e())}isLocked(){return this._semaphore.isLocked()}waitForUnlock(){return this._semaphore.waitForUnlock()}release(){this._semaphore.release()}cancel(){return this._semaphore.cancel()}};var Qn=class{constructor(){this.hideTaskCount=!1;this.hideBacklinks=!1;this.hidePriority=!1;this.hideStartDate=!1;this.hideScheduledDate=!1;this.hideDoneDate=!1;this.hideDueDate=!1;this.hideRecurrenceRule=!1;this.hideEditButton=!1;this.hideUrgency=!0;this.shortMode=!1;this.explainQuery=!1}},un=class{constructor(e,t){this.defaultLayout=["description","priority","recurrenceRule","startDate","scheduledDate","dueDate","doneDate","blockLink"];e?this.options=e:this.options=new Qn,t?this.layoutComponents=t:this.layoutComponents=this.defaultLayout,this.layoutComponents=this.applyOptions(this.options)}applyOptions(e){let t=(i,s,a)=>s?i.filter(o=>o!=a):i,n=this.layoutComponents;return n=t(n,e.hidePriority,"priority"),n=t(n,e.hideRecurrenceRule,"recurrenceRule"),n=t(n,e.hideStartDate,"startDate"),n=t(n,e.hideScheduledDate,"scheduledDate"),n=t(n,e.hideDueDate,"dueDate"),n=t(n,e.hideDoneDate,"doneDate"),n}};var ks=["MO","TU","WE","TH","FR","SA","SU"],Te=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(ks.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=ks[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 oe=function(r){return r!=null},nt=function(r){return typeof r=="number"},ho=function(r){return typeof r=="string"&&ks.includes(r)},Fe=Array.isArray,ft=function(r,e){e===void 0&&(e=r),arguments.length===1&&(e=r,r=0);for(var t=[],n=r;n<e;n++)t.push(n);return t};var G=function(r,e){var t=0,n=[];if(Fe(r))for(;t<e;t++)n[t]=[].concat(r);else for(;t<e;t++)n[t]=r;return n},df=function(r){return Fe(r)?r:[r]};function Nr(r,e,t){t===void 0&&(t=" ");var n=String(r);return e=e>>0,n.length>e?String(n):(e=e-n.length,e>t.length&&(t+=G(t,e/t.length)),t.slice(0,e)+String(n))}var ff=function(r,e,t){var n=r.split(e);return t?n.slice(0,t).concat([n.slice(t).join(e)]):n},Ye=function(r,e){var t=r%e;return t*e<0?t+e:t},As=function(r,e){return{div:Math.floor(r/e),mod:Ye(r,e)}},it=function(r){return!oe(r)||r.length===0},ge=function(r){return!it(r)},K=function(r,e){return ge(r)&&r.indexOf(e)!==-1};var yr;(function(r){r.MONTH_DAYS=[31,28,31,30,31,30,31,31,30,31,30,31],r.ONE_DAY=1e3*60*60*24,r.MAXYEAR=9999,r.ORDINAL_BASE=new Date(Date.UTC(1970,0,1)),r.PY_WEEKDAYS=[6,0,1,2,3,4,5],r.getYearDay=function(e){var t=new Date(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate());return Math.ceil((t.valueOf()-new Date(e.getUTCFullYear(),0,1).valueOf())/r.ONE_DAY)+1},r.isLeapYear=function(e){return e%4===0&&e%100!==0||e%400===0},r.isDate=function(e){return e instanceof Date},r.isValidDate=function(e){return r.isDate(e)&&!isNaN(e.getTime())},r.tzOffset=function(e){return e.getTimezoneOffset()*60*1e3},r.daysBetween=function(e,t){var n=e.getTime()-r.tzOffset(e),i=t.getTime()-r.tzOffset(t),s=n-i;return Math.round(s/r.ONE_DAY)},r.toOrdinal=function(e){return r.daysBetween(e,r.ORDINAL_BASE)},r.fromOrdinal=function(e){return new Date(r.ORDINAL_BASE.getTime()+e*r.ONE_DAY)},r.getMonthDays=function(e){var t=e.getUTCMonth();return t===1&&r.isLeapYear(e.getUTCFullYear())?29:r.MONTH_DAYS[t]},r.getWeekday=function(e){return r.PY_WEEKDAYS[e.getUTCDay()]},r.monthRange=function(e,t){var n=new Date(Date.UTC(e,t,1));return[r.getWeekday(n),r.getMonthDays(n)]},r.combine=function(e,t){return t=t||e,new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))},r.clone=function(e){var t=new Date(e.getTime());return t},r.cloneDates=function(e){for(var t=[],n=0;n<e.length;n++)t.push(r.clone(e[n]));return t},r.sort=function(e){e.sort(function(t,n){return t.getTime()-n.getTime()})},r.timeToUntilString=function(e,t){t===void 0&&(t=!0);var n=new Date(e);return[Nr(n.getUTCFullYear().toString(),4,"0"),Nr(n.getUTCMonth()+1,2,"0"),Nr(n.getUTCDate(),2,"0"),"T",Nr(n.getUTCHours(),2,"0"),Nr(n.getUTCMinutes(),2,"0"),Nr(n.getUTCSeconds(),2,"0"),t?"Z":""].join("")},r.untilStringToDate=function(e){var t=/^(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2})Z?)?$/,n=t.exec(e);if(!n)throw new Error("Invalid UNTIL value: ".concat(e));return new Date(Date.UTC(parseInt(n[1],10),parseInt(n[2],10)-1,parseInt(n[3],10),parseInt(n[5],10)||0,parseInt(n[6],10)||0,parseInt(n[7],10)||0))}})(yr||(yr={}));var C=yr;var z_=function(){function r(e,t){this.minDate=null,this.maxDate=null,this._result=[],this.total=0,this.method=e,this.args=t,e==="between"?(this.maxDate=t.inc?t.before:new Date(t.before.getTime()-1),this.minDate=t.inc?t.after:new Date(t.after.getTime()+1)):e==="before"?this.maxDate=t.inc?t.dt:new Date(t.dt.getTime()-1):e==="after"&&(this.minDate=t.inc?t.dt:new Date(t.dt.getTime()+1))}return r.prototype.accept=function(e){++this.total;var t=this.minDate&&e<this.minDate,n=this.maxDate&&e>this.maxDate;if(this.method==="between"){if(t)return!0;if(n)return!1}else if(this.method==="before"){if(n)return!1}else if(this.method==="after")return t?!0:(this.add(e),!1);return this.add(e)},r.prototype.add=function(e){return this._result.push(e),!0},r.prototype.getValue=function(){var e=this._result;switch(this.method){case"all":case"between":return e;case"before":case"after":default:return e.length?e[e.length-1]:null}},r.prototype.clone=function(){return new r(this.method,this.args)},r}(),Vt=z_;var If=Os(Cf(),1),{__extends:cn,__assign:Be,__rest:Uk,__decorate:qk,__param:Lk,__metadata:Wk,__awaiter:Yk,__generator:$k,__exportStar:jk,__createBinding:Bk,__values:Gk,__read:Hk,__spread:zk,__spreadArrays:Kk,__spreadArray:T,__await:Vk,__asyncGenerator:Xk,__asyncDelegator:Zk,__asyncValues:Qk,__makeTemplateObject:Jk,__importStar:eA,__importDefault:tA,__classPrivateFieldGet:rA,__classPrivateFieldSet:nA,__classPrivateFieldIn:iA}=If.default;var K_=function(r){cn(e,r);function e(t,n,i){var s=r.call(this,t,n)||this;return s.iterator=i,s}return e.prototype.add=function(t){return this.iterator(t,this._result.length)?(this._result.push(t),!0):!1},e}(Vt),yo=K_;var V_={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}},xr=V_;var Ff=function(r,e){return r.indexOf(e)!==-1},X_=function(r){return r.toString()},Z_=function(r,e,t){return"".concat(e," ").concat(t,", ").concat(r)},Q_=function(){function r(e,t,n,i){if(t===void 0&&(t=X_),n===void 0&&(n=xr),i===void 0&&(i=Z_),this.text=[],this.language=n||xr,this.gettext=t,this.dateFormatter=i,this.rrule=e,this.options=e.options,this.origOptions=e.origOptions,this.origOptions.bymonthday){var s=[].concat(this.options.bymonthday),a=[].concat(this.options.bynmonthday);s.sort(function(c,d){return c-d}),a.sort(function(c,d){return d-c}),this.bymonthday=s.concat(a),this.bymonthday.length||(this.bymonthday=null)}if(oe(this.origOptions.byweekday)){var o=Fe(this.origOptions.byweekday)?this.origOptions.byweekday:[this.origOptions.byweekday],u=String(o);this.byweekday={allWeeks:o.filter(function(c){return!c.n}),someWeeks:o.filter(function(c){return Boolean(c.n)}),isWeekdays:u.indexOf("MO")!==-1&&u.indexOf("TU")!==-1&&u.indexOf("WE")!==-1&&u.indexOf("TH")!==-1&&u.indexOf("FR")!==-1&&u.indexOf("SA")===-1&&u.indexOf("SU")===-1,isEveryDay:u.indexOf("MO")!==-1&&u.indexOf("TU")!==-1&&u.indexOf("WE")!==-1&&u.indexOf("TH")!==-1&&u.indexOf("FR")!==-1&&u.indexOf("SA")!==-1&&u.indexOf("SU")!==-1};var l=function(c,d){return c.weekday-d.weekday};this.byweekday.allWeeks.sort(l),this.byweekday.someWeeks.sort(l),this.byweekday.allWeeks.length||(this.byweekday.allWeeks=null),this.byweekday.someWeeks.length||(this.byweekday.someWeeks=null)}else this.byweekday=null}return r.isFullyConvertible=function(e){var t=!0;if(!(e.options.freq in r.IMPLEMENTED)||e.origOptions.until&&e.origOptions.count)return!1;for(var n in e.origOptions){if(Ff(["dtstart","wkst","freq"],n))return!0;if(!Ff(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[O.FREQUENCIES[this.options.freq]](),this.options.until){this.add(e("until"));var t=this.options.until;this.add(this.dateFormatter(t.getUTCFullYear(),this.language.monthNames[t.getUTCMonth()],t.getUTCDate()))}else this.options.count&&this.add(e("for")).add(this.options.count.toString()).add(this.plural(this.options.count)?e("times"):e("time"));return this.isFullyConvertible()||this.add(e("(~ approximate)")),this.text.join("")},r.prototype.HOURLY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("hours"):e("hour"))},r.prototype.MINUTELY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("minutes"):e("minute"))},r.prototype.DAILY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.byweekday&&this.byweekday.isWeekdays?this.add(this.plural(this.options.interval)?e("weekdays"):e("weekday")):this.add(this.plural(this.options.interval)?e("days"):e("day")),this.origOptions.bymonth&&(this.add(e("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday?this._byweekday():this.origOptions.byhour&&this._byhour()},r.prototype.WEEKLY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()).add(this.plural(this.options.interval)?e("weeks"):e("week")),this.byweekday&&this.byweekday.isWeekdays?this.options.interval===1?this.add(this.plural(this.options.interval)?e("weekdays"):e("weekday")):this.add(e("on")).add(e("weekdays")):this.byweekday&&this.byweekday.isEveryDay?this.add(this.plural(this.options.interval)?e("days"):e("day")):(this.options.interval===1&&this.add(e("week")),this.origOptions.bymonth&&(this.add(e("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday())},r.prototype.MONTHLY=function(){var e=this.gettext;this.origOptions.bymonth?(this.options.interval!==1&&(this.add(this.options.interval.toString()).add(e("months")),this.plural(this.options.interval)&&this.add(e("in"))),this._bymonth()):(this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("months"):e("month"))),this.bymonthday?this._bymonthday():this.byweekday&&this.byweekday.isWeekdays?this.add(e("on")).add(e("weekdays")):this.byweekday&&this._byweekday()},r.prototype.YEARLY=function(){var e=this.gettext;this.origOptions.bymonth?(this.options.interval!==1&&(this.add(this.options.interval.toString()),this.add(e("years"))),this._bymonth()):(this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("years"):e("year"))),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.options.byyearday&&this.add(e("on the")).add(this.list(this.options.byyearday,this.nth,e("and"))).add(e("day")),this.options.byweekno&&this.add(e("in")).add(this.plural(this.options.byweekno.length)?e("weeks"):e("week")).add(this.list(this.options.byweekno,void 0,e("and")))},r.prototype._bymonthday=function(){var e=this.gettext;this.byweekday&&this.byweekday.allWeeks?this.add(e("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext,e("or"))).add(e("the")).add(this.list(this.bymonthday,this.nth,e("or"))):this.add(e("on the")).add(this.list(this.bymonthday,this.nth,e("and")))},r.prototype._byweekday=function(){var e=this.gettext;this.byweekday.allWeeks&&!this.byweekday.isWeekdays&&this.add(e("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext)),this.byweekday.someWeeks&&(this.byweekday.allWeeks&&this.add(e("and")),this.add(e("on the")).add(this.list(this.byweekday.someWeeks,this.weekdaytext,e("and"))))},r.prototype._byhour=function(){var e=this.gettext;this.add(e("at")).add(this.list(this.origOptions.byhour,void 0,e("and")))},r.prototype._bymonth=function(){this.add(this.list(this.options.bymonth,this.monthtext,this.gettext("and")))},r.prototype.nth=function(e){e=parseInt(e.toString(),10);var t,n=this.gettext;if(e===-1)return n("last");var i=Math.abs(e);switch(i){case 1:case 21:case 31:t=i+n("st");break;case 2:case 22:t=i+n("nd");break;case 3:case 23:t=i+n("rd");break;default:t=i+n("th")}return e<0?t+" "+n("last"):t},r.prototype.monthtext=function(e){return this.language.monthNames[e-1]},r.prototype.weekdaytext=function(e){var t=nt(e)?(e+1)%7:e.getJsWeekday();return(e.n?this.nth(e.n)+" ":"")+this.language.dayNames[t]},r.prototype.plural=function(e){return e%100!==1},r.prototype.add=function(e){return this.text.push(" "),this.text.push(e),this},r.prototype.list=function(e,t,n,i){var s=this;i===void 0&&(i=","),Fe(e)||(e=[e]);var a=function(u,l,c){for(var d="",f=0;f<u.length;f++)f!==0&&(f===u.length-1?d+=" "+c+" ":d+=l+" "),d+=u[f];return d};t=t||function(u){return u.toString()};var o=function(u){return t&&t.call(s,u)};return n?a(e.map(o),i,n):e.map(o).join(i+" ")},r}(),qt=Q_;var J_=function(){function r(e){this.done=!0,this.rules=e}return r.prototype.start=function(e){return this.text=e,this.done=!1,this.nextSymbol()},r.prototype.isDone=function(){return this.done&&this.symbol===null},r.prototype.nextSymbol=function(){var e,t;this.symbol=null,this.value=null;do{if(this.done)return!1;var n=void 0;e=null;for(var i in this.rules){n=this.rules[i];var s=n.exec(this.text);s&&(e===null||s[0].length>e[0].length)&&(e=s,t=i)}if(e!=null&&(this.text=this.text.substr(e[0].length),this.text===""&&(this.done=!0)),e==null){this.done=!0,this.symbol=null,this.value=null;return}}while(t==="SKIP");return this.symbol=t,this.value=e,!0},r.prototype.accept=function(e){if(this.symbol===e){if(this.value){var t=this.value;return this.nextSymbol(),t}return this.nextSymbol(),!0}return!1},r.prototype.acceptNumber=function(){return this.accept("number")},r.prototype.expect=function(e){if(this.accept(e))return!0;throw new Error("expected "+e+" but found "+this.symbol)},r}();function Jn(r,e){e===void 0&&(e=xr);var t={},n=new J_(e.tokens);if(!n.start(r))return null;return i(),t;function i(){n.expect("every");var f=n.acceptNumber();if(f&&(t.interval=parseInt(f[0],10)),n.isDone())throw new Error("Unexpected end");switch(n.symbol){case"day(s)":t.freq=O.DAILY,n.nextSymbol()&&(a(),d());break;case"weekday(s)":t.freq=O.WEEKLY,t.byweekday=[O.MO,O.TU,O.WE,O.TH,O.FR],n.nextSymbol(),d();break;case"week(s)":t.freq=O.WEEKLY,n.nextSymbol()&&(s(),d());break;case"hour(s)":t.freq=O.HOURLY,n.nextSymbol()&&(s(),d());break;case"minute(s)":t.freq=O.MINUTELY,n.nextSymbol()&&(s(),d());break;case"month(s)":t.freq=O.MONTHLY,n.nextSymbol()&&(s(),d());break;case"year(s)":t.freq=O.YEARLY,n.nextSymbol()&&(s(),d());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":t.freq=O.WEEKLY;var h=n.symbol.substr(0,2).toUpperCase();if(t.byweekday=[O[h]],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var _=u();if(!_)throw new Error("Unexpected symbol "+n.symbol+", expected weekday");t.byweekday.push(O[_]),n.nextSymbol()}c(),d();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=O.YEARLY,t.bymonth=[o()],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var m=o();if(!m)throw new Error("Unexpected symbol "+n.symbol+", expected month");t.bymonth.push(m),n.nextSymbol()}s(),d();break;default:throw new Error("Unknown symbol")}}function s(){var f=n.accept("on"),h=n.accept("the");if(!!(f||h))do{var _=l(),m=u(),g=o();if(_)m?(n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(O[m].nth(_))):(t.bymonthday||(t.bymonthday=[]),t.bymonthday.push(_),n.accept("day(s)"));else if(m)n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(O[m]);else if(n.symbol==="weekday(s)")n.nextSymbol(),t.byweekday||(t.byweekday=[O.MO,O.TU,O.WE,O.TH,O.FR]);else if(n.symbol==="week(s)"){n.nextSymbol();var R=n.acceptNumber();if(!R)throw new Error("Unexpected symbol "+n.symbol+", expected week number");for(t.byweekno=[parseInt(R[0],10)];n.accept("comma");){if(R=n.acceptNumber(),!R)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.byweekno.push(parseInt(R[0],10))}}else if(g)n.nextSymbol(),t.bymonth||(t.bymonth=[]),t.bymonth.push(g);else return}while(n.accept("comma")||n.accept("the")||n.accept("on"))}function a(){var f=n.accept("at");if(!!f)do{var h=n.acceptNumber();if(!h)throw new Error("Unexpected symbol "+n.symbol+", expected hour");for(t.byhour=[parseInt(h[0],10)];n.accept("comma");){if(h=n.acceptNumber(),!h)throw new Error("Unexpected symbol "+n.symbol+"; expected hour");t.byhour.push(parseInt(h[0],10))}}while(n.accept("comma")||n.accept("at"))}function o(){switch(n.symbol){case"january":return 1;case"february":return 2;case"march":return 3;case"april":return 4;case"may":return 5;case"june":return 6;case"july":return 7;case"august":return 8;case"september":return 9;case"october":return 10;case"november":return 11;case"december":return 12;default:return!1}}function u(){switch(n.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return n.symbol.substr(0,2).toUpperCase();default:return!1}}function l(){switch(n.symbol){case"last":return n.nextSymbol(),-1;case"first":return n.nextSymbol(),1;case"second":return n.nextSymbol(),n.accept("last")?-2:2;case"third":return n.nextSymbol(),n.accept("last")?-3:3;case"nth":var f=parseInt(n.value[1],10);if(f<-366||f>366)throw new Error("Nth out of range: "+f);return n.nextSymbol(),n.accept("last")?-f:f;default:return!1}}function c(){n.accept("on"),n.accept("the");var f=l();if(!!f)for(t.bymonthday=[f],n.nextSymbol();n.accept("comma");){if(f=l(),!f)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.bymonthday.push(f),n.nextSymbol()}}function d(){if(n.symbol==="until"){var f=Date.parse(n.text);if(!f)throw new Error("Cannot parse until date:"+n.text);t.until=new Date(f)}else n.accept("for")&&(t.count=parseInt(n.value[0],10),n.expect("number"))}}var $;(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"})($||($={}));function ei(r){return r<$.HOURLY}var Uf=function(r,e){return e===void 0&&(e=xr),new O(Jn(r,e)||void 0)},dn=["count","until","interval","byweekday","bymonthday","bymonth"];qt.IMPLEMENTED=[];qt.IMPLEMENTED[$.HOURLY]=dn;qt.IMPLEMENTED[$.MINUTELY]=dn;qt.IMPLEMENTED[$.DAILY]=["byhour"].concat(dn);qt.IMPLEMENTED[$.WEEKLY]=dn;qt.IMPLEMENTED[$.MONTHLY]=dn;qt.IMPLEMENTED[$.YEARLY]=["byweekno","byyearday"].concat(dn);var qf=function(r,e,t,n){return new qt(r,e,t,n).toString()},Lf=qt.isFullyConvertible;var fn=function(){function r(e,t,n,i){this.hour=e,this.minute=t,this.second=n,this.millisecond=i||0}return r.prototype.getHours=function(){return this.hour},r.prototype.getMinutes=function(){return this.minute},r.prototype.getSeconds=function(){return this.second},r.prototype.getMilliseconds=function(){return this.millisecond},r.prototype.getTime=function(){return(this.hour*60*60+this.minute*60+this.second)*1e3+this.millisecond},r}();var Wf=function(r){cn(e,r);function e(t,n,i,s,a,o,u){var l=r.call(this,s,a,o,u)||this;return l.year=t,l.month=n,l.day=i,l}return e.fromDate=function(t){return new this(t.getUTCFullYear(),t.getUTCMonth()+1,t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.valueOf()%1e3)},e.prototype.getWeekday=function(){return yr.getWeekday(new Date(this.getTime()))},e.prototype.getTime=function(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second,this.millisecond)).getTime()},e.prototype.getDay=function(){return this.day},e.prototype.getMonth=function(){return this.month},e.prototype.getYear=function(){return this.year},e.prototype.addYears=function(t){this.year+=t},e.prototype.addMonths=function(t){if(this.month+=t,this.month>12){var n=Math.floor(this.month/12),i=Ye(this.month,12);this.month=i,this.year+=n,this.month===0&&(this.month=12,--this.year)}},e.prototype.addWeekly=function(t,n){n>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-n))+t*7:this.day+=-(this.getWeekday()-n)+t*7,this.fixDay()},e.prototype.addDaily=function(t){this.day+=t,this.fixDay()},e.prototype.addHours=function(t,n,i){for(n&&(this.hour+=Math.floor((23-this.hour)/t)*t);;){this.hour+=t;var s=As(this.hour,24),a=s.div,o=s.mod;if(a&&(this.hour=o,this.addDaily(a)),it(i)||K(i,this.hour))break}},e.prototype.addMinutes=function(t,n,i,s){for(n&&(this.minute+=Math.floor((1439-(this.hour*60+this.minute))/t)*t);;){this.minute+=t;var a=As(this.minute,60),o=a.div,u=a.mod;if(o&&(this.minute=u,this.addHours(o,!1,i)),(it(i)||K(i,this.hour))&&(it(s)||K(s,this.minute)))break}},e.prototype.addSeconds=function(t,n,i,s,a){for(n&&(this.second+=Math.floor((86399-(this.hour*3600+this.minute*60+this.second))/t)*t);;){this.second+=t;var o=As(this.second,60),u=o.div,l=o.mod;if(u&&(this.second=l,this.addMinutes(u,!1,i,s)),(it(i)||K(i,this.hour))&&(it(s)||K(s,this.minute))&&(it(a)||K(a,this.second)))break}},e.prototype.fixDay=function(){if(!(this.day<=28)){var t=yr.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>yr.MAXYEAR))return;t=yr.monthRange(this.year,this.month-1)[1]}}},e.prototype.add=function(t,n){var i=t.freq,s=t.interval,a=t.wkst,o=t.byhour,u=t.byminute,l=t.bysecond;switch(i){case $.YEARLY:return this.addYears(s);case $.MONTHLY:return this.addMonths(s);case $.WEEKLY:return this.addWeekly(s,a);case $.DAILY:return this.addDaily(s);case $.HOURLY:return this.addHours(s,n,o);case $.MINUTELY:return this.addMinutes(s,n,o,u);case $.SECONDLY:return this.addSeconds(s,n,o,u,l)}},e}(fn);function go(r){for(var e=[],t=Object.keys(r),n=0,i=t;n<i.length;n++){var s=i[n];K(jf,s)||e.push(s),C.isDate(r[s])&&!C.isValidDate(r[s])&&e.push(s)}if(e.length)throw new Error("Invalid options: "+e.join(", "));return Be({},r)}function Yf(r){var e=Be(Be({},ti),go(r));if(oe(e.byeaster)&&(e.freq=O.YEARLY),!(oe(e.freq)&&O.FREQUENCIES[e.freq]))throw new Error("Invalid frequency: ".concat(e.freq," ").concat(r.freq));if(e.dtstart||(e.dtstart=new Date(new Date().setMilliseconds(0))),oe(e.wkst)?nt(e.wkst)||(e.wkst=e.wkst.weekday):e.wkst=O.MO.weekday,oe(e.bysetpos)){nt(e.bysetpos)&&(e.bysetpos=[e.bysetpos]);for(var t=0;t<e.bysetpos.length;t++){var n=e.bysetpos[t];if(n===0||!(n>=-366&&n<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}}if(!(Boolean(e.byweekno)||ge(e.byweekno)||ge(e.byyearday)||Boolean(e.bymonthday)||ge(e.bymonthday)||oe(e.byweekday)||oe(e.byeaster)))switch(e.freq){case O.YEARLY:e.bymonth||(e.bymonth=e.dtstart.getUTCMonth()+1),e.bymonthday=e.dtstart.getUTCDate();break;case O.MONTHLY:e.bymonthday=e.dtstart.getUTCDate();break;case O.WEEKLY:e.byweekday=[C.getWeekday(e.dtstart)];break}if(oe(e.bymonth)&&!Fe(e.bymonth)&&(e.bymonth=[e.bymonth]),oe(e.byyearday)&&!Fe(e.byyearday)&&nt(e.byyearday)&&(e.byyearday=[e.byyearday]),!oe(e.bymonthday))e.bymonthday=[],e.bynmonthday=[];else if(Fe(e.bymonthday)){for(var i=[],s=[],t=0;t<e.bymonthday.length;t++){var n=e.bymonthday[t];n>0?i.push(n):n<0&&s.push(n)}e.bymonthday=i,e.bynmonthday=s}else e.bymonthday<0?(e.bynmonthday=[e.bymonthday],e.bymonthday=[]):(e.bynmonthday=[],e.bymonthday=[e.bymonthday]);if(oe(e.byweekno)&&!Fe(e.byweekno)&&(e.byweekno=[e.byweekno]),!oe(e.byweekday))e.bynweekday=null;else if(nt(e.byweekday))e.byweekday=[e.byweekday],e.bynweekday=null;else if(ho(e.byweekday))e.byweekday=[Te.fromStr(e.byweekday).weekday],e.bynweekday=null;else if(e.byweekday instanceof Te)!e.byweekday.n||e.freq>O.MONTHLY?(e.byweekday=[e.byweekday.weekday],e.bynweekday=null):(e.bynweekday=[[e.byweekday.weekday,e.byweekday.n]],e.byweekday=null);else{for(var a=[],o=[],t=0;t<e.byweekday.length;t++){var u=e.byweekday[t];if(nt(u)){a.push(u);continue}else if(ho(u)){a.push(Te.fromStr(u).weekday);continue}!u.n||e.freq>O.MONTHLY?a.push(u.weekday):o.push([u.weekday,u.n])}e.byweekday=ge(a)?a:null,e.bynweekday=ge(o)?o:null}return oe(e.byhour)?nt(e.byhour)&&(e.byhour=[e.byhour]):e.byhour=e.freq<O.HOURLY?[e.dtstart.getUTCHours()]:null,oe(e.byminute)?nt(e.byminute)&&(e.byminute=[e.byminute]):e.byminute=e.freq<O.MINUTELY?[e.dtstart.getUTCMinutes()]:null,oe(e.bysecond)?nt(e.bysecond)&&(e.bysecond=[e.bysecond]):e.bysecond=e.freq<O.SECONDLY?[e.dtstart.getUTCSeconds()]:null,{parsedOptions:e}}function $f(r){var e=r.dtstart.getTime()%1e3;if(!ei(r.freq))return[];var t=[];return r.byhour.forEach(function(n){r.byminute.forEach(function(i){r.bysecond.forEach(function(s){t.push(new fn(n,i,s,e))})})}),t}function ni(r){var e=r.split(`
`).map(eT).filter(function(t){return t!==null});return Be(Be({},e[0]),e[1])}function ri(r){var e={},t=/DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec(r);if(!t)return e;var n=t[1],i=t[2];return n&&(e.tzid=n),e.dtstart=C.untilStringToDate(i),e}function eT(r){if(r=r.replace(/^\s+|\s+$/,""),!r.length)return null;var e=/^([A-Z]+?)[:;]/.exec(r.toUpperCase());if(!e)return Bf(r);var t=e[1];switch(t.toUpperCase()){case"RRULE":case"EXRULE":return Bf(r);case"DTSTART":return ri(r);default:throw new Error("Unsupported RFC prop ".concat(t," in ").concat(r))}}function Bf(r){var e=r.replace(/^RRULE:/i,""),t=ri(e),n=r.replace(/^(?:RRULE|EXRULE):/i,"").split(";");return n.forEach(function(i){var s=i.split("="),a=s[0],o=s[1];switch(a.toUpperCase()){case"FREQ":t.freq=$[o.toUpperCase()];break;case"WKST":t.wkst=pt[o.toUpperCase()];break;case"COUNT":case"INTERVAL":case"BYSETPOS":case"BYMONTH":case"BYMONTHDAY":case"BYYEARDAY":case"BYWEEKNO":case"BYHOUR":case"BYMINUTE":case"BYSECOND":var u=tT(o),l=a.toLowerCase();t[l]=u;break;case"BYWEEKDAY":case"BYDAY":t.byweekday=rT(o);break;case"DTSTART":case"TZID":var c=ri(r);t.tzid=c.tzid,t.dtstart=c.dtstart;break;case"UNTIL":t.until=C.untilStringToDate(o);break;case"BYEASTER":t.byeaster=Number(o);break;default:throw new Error("Unknown RRULE property '"+a+"'")}}),t}function tT(r){if(r.indexOf(",")!==-1){var e=r.split(",");return e.map(Gf)}return Gf(r)}function Gf(r){return/^[+-]?\d+$/.test(r)?Number(r):r}function rT(r){var e=r.split(",");return e.map(function(t){if(t.length===2)return pt[t];var n=t.match(/^([+-]?\d{1,2})([A-Z]{2})$/);if(!n||n.length<3)throw new SyntaxError("Invalid weekday string: ".concat(t));var i=Number(n[1]),s=n[2],a=pt[s].weekday;return new Te(a,i)})}var Cr=function(){function r(e,t){if(isNaN(e.getTime()))throw new RangeError("Invalid date passed to DateWithZone");this.date=e,this.tzid=t}return Object.defineProperty(r.prototype,"isUTC",{get:function(){return!this.tzid||this.tzid.toUpperCase()==="UTC"},enumerable:!1,configurable:!0}),r.prototype.toString=function(){var e=C.timeToUntilString(this.date.getTime(),this.isUTC);return this.isUTC?":".concat(e):";TZID=".concat(this.tzid,":").concat(e)},r.prototype.getTime=function(){return this.date.getTime()},r.prototype.rezonedDate=function(){var e;if(this.isUTC)return this.date;var t=Intl.DateTimeFormat().resolvedOptions().timeZone,n=new Date(this.date.toLocaleString(void 0,{timeZone:t})),i=new Date(this.date.toLocaleString(void 0,{timeZone:(e=this.tzid)!==null&&e!==void 0?e:"UTC"})),s=i.getTime()-n.getTime();return new Date(this.date.getTime()-s)},r}();function ii(r){for(var e=[],t="",n=Object.keys(r),i=Object.keys(ti),s=0;s<n.length;s++)if(n[s]!=="tzid"&&!!K(i,n[s])){var a=n[s].toUpperCase(),o=r[n[s]],u="";if(!(!oe(o)||Fe(o)&&!o.length)){switch(a){case"FREQ":u=O.FREQUENCIES[r.freq];break;case"WKST":nt(o)?u=new Te(o).toString():u=o.toString();break;case"BYWEEKDAY":a="BYDAY",u=df(o).map(function(h){return h instanceof Te?h:Fe(h)?new Te(h[0],h[1]):new Te(h)}).toString();break;case"DTSTART":t=nT(o,r.tzid);break;case"UNTIL":u=C.timeToUntilString(o,!r.tzid);break;default:if(Fe(o)){for(var l=[],c=0;c<o.length;c++)l[c]=String(o[c]);u=l.toString()}else u=String(o)}u&&e.push([a,u])}}var d=e.map(function(h){var _=h[0],m=h[1];return"".concat(_,"=").concat(m.toString())}).join(";"),f="";return d!==""&&(f="RRULE:".concat(d)),[t,f].filter(function(h){return!!h}).join(`
`)}function nT(r,e){return r?"DTSTART"+new Cr(new Date(r),e).toString():""}function iT(r,e){return Array.isArray(r)?!Array.isArray(e)||r.length!==e.length?!1:r.every(function(t,n){return t.getTime()===e[n].getTime()}):r instanceof Date?e instanceof Date&&r.getTime()===e.getTime():r===e}var Hf=function(){function r(){this.all=!1,this.before=[],this.after=[],this.between=[]}return r.prototype._cacheAdd=function(e,t,n){t&&(t=t instanceof Date?C.clone(t):C.cloneDates(t)),e==="all"?this.all=t:(n._value=t,this[e].push(n))},r.prototype._cacheGet=function(e,t){var n=!1,i=t?Object.keys(t):[],s=function(c){for(var d=0;d<i.length;d++){var f=i[d];if(!iT(t[f],c[f]))return!0}return!1},a=this[e];if(e==="all")n=this.all;else if(Fe(a))for(var o=0;o<a.length;o++){var u=a[o];if(!(i.length&&s(u))){n=u._value;break}}if(!n&&this.all){for(var l=new Vt(e,t),o=0;o<this.all.length&&l.accept(this.all[o]);o++);n=l.getValue(),this._cacheAdd(e,n,t)}return Fe(n)?C.cloneDates(n):n instanceof Date?C.clone(n):n},r}();var zf=T(T(T(T(T(T(T(T(T(T(T(T(T([],G(1,31),!0),G(2,28),!0),G(3,31),!0),G(4,30),!0),G(5,31),!0),G(6,30),!0),G(7,31),!0),G(8,31),!0),G(9,30),!0),G(10,31),!0),G(11,30),!0),G(12,31),!0),G(1,7),!0),Kf=T(T(T(T(T(T(T(T(T(T(T(T(T([],G(1,31),!0),G(2,29),!0),G(3,31),!0),G(4,30),!0),G(5,31),!0),G(6,30),!0),G(7,31),!0),G(8,31),!0),G(9,30),!0),G(10,31),!0),G(11,30),!0),G(12,31),!0),G(1,7),!0),sT=ft(1,29),aT=ft(1,30),gr=ft(1,31),$e=ft(1,32),Vf=T(T(T(T(T(T(T(T(T(T(T(T(T([],$e,!0),aT,!0),$e,!0),gr,!0),$e,!0),gr,!0),$e,!0),$e,!0),gr,!0),$e,!0),gr,!0),$e,!0),$e.slice(0,7),!0),Xf=T(T(T(T(T(T(T(T(T(T(T(T(T([],$e,!0),sT,!0),$e,!0),gr,!0),$e,!0),gr,!0),$e,!0),$e,!0),gr,!0),$e,!0),gr,!0),$e,!0),$e.slice(0,7),!0),oT=ft(-28,0),uT=ft(-29,0),_r=ft(-30,0),je=ft(-31,0),Zf=T(T(T(T(T(T(T(T(T(T(T(T(T([],je,!0),uT,!0),je,!0),_r,!0),je,!0),_r,!0),je,!0),je,!0),_r,!0),je,!0),_r,!0),je,!0),je.slice(0,7),!0),Qf=T(T(T(T(T(T(T(T(T(T(T(T(T([],je,!0),oT,!0),je,!0),_r,!0),je,!0),_r,!0),je,!0),je,!0),_r,!0),je,!0),_r,!0),je,!0),je.slice(0,7),!0),Jf=[0,31,60,91,121,152,182,213,244,274,305,335,366],ep=[0,31,59,90,120,151,181,212,243,273,304,334,365],_o=function(){for(var r=[],e=0;e<55;e++)r=r.concat(ft(7));return r}();function tp(r,e){var t=new Date(Date.UTC(r,0,1)),n=C.isLeapYear(r)?366:365,i=C.isLeapYear(r+1)?366:365,s=C.toOrdinal(t),a=C.getWeekday(t),o=Be(Be({yearlen:n,nextyearlen:i,yearordinal:s,yearweekday:a},lT(r)),{wnomask:null});if(it(e.byweekno))return o;o.wnomask=G(0,n+7);var u,l,c=u=Ye(7-a+e.wkst,7);c>=4?(c=0,l=o.yearlen+Ye(a-e.wkst,7)):l=n-c;for(var d=Math.floor(l/7),f=Ye(l,7),h=Math.floor(d+f/4),_=0;_<e.byweekno.length;_++){var m=e.byweekno[_];if(m<0&&(m+=h+1),m>0&&m<=h){var g=void 0;m>1?(g=c+(m-1)*7,c!==u&&(g-=7-u)):g=c;for(var R=0;R<7&&(o.wnomask[g]=1,g++,o.wdaymask[g]!==e.wkst);R++);}}if(K(e.byweekno,1)){var g=c+h*7;if(c!==u&&(g-=7-u),g<n)for(var _=0;_<7&&(o.wnomask[g]=1,g+=1,o.wdaymask[g]!==e.wkst);_++);}if(c){var w=void 0;if(K(e.byweekno,-1))w=-1;else{var k=C.getWeekday(new Date(Date.UTC(r-1,0,1))),z=Ye(7-k.valueOf()+e.wkst,7),fe=C.isLeapYear(r-1)?366:365,he=void 0;z>=4?(z=0,he=fe+Ye(k-e.wkst,7)):he=n-c,w=Math.floor(52+Ye(he,7)/4)}if(K(e.byweekno,w))for(var g=0;g<c;g++)o.wnomask[g]=1}return o}function lT(r){var e=C.isLeapYear(r)?366:365,t=new Date(Date.UTC(r,0,1)),n=C.getWeekday(t);return e===365?{mmask:zf,mdaymask:Xf,nmdaymask:Qf,wdaymask:_o.slice(n),mrange:ep}:{mmask:Kf,mdaymask:Vf,nmdaymask:Zf,wdaymask:_o.slice(n),mrange:Jf}}function rp(r,e,t,n,i,s){var a={lastyear:r,lastmonth:e,nwdaymask:[]},o=[];if(s.freq===O.YEARLY)if(it(s.bymonth))o=[[0,t]];else for(var u=0;u<s.bymonth.length;u++)e=s.bymonth[u],o.push(n.slice(e-1,e+1));else s.freq===O.MONTHLY&&(o=[n.slice(e-1,e+1)]);if(it(o))return a;a.nwdaymask=G(0,t);for(var u=0;u<o.length;u++)for(var l=o[u],c=l[0],d=l[1]-1,f=0;f<s.bynweekday.length;f++){var h=void 0,_=s.bynweekday[f],m=_[0],g=_[1];g<0?(h=d+(g+1)*7,h-=Ye(i[h]-m,7)):(h=c+(g-1)*7,h+=Ye(7-i[h]+m,7)),c<=h&&h<=d&&(a.nwdaymask[h]=1)}return a}function np(r,e){e===void 0&&(e=0);var t=r%19,n=Math.floor(r/100),i=r%100,s=Math.floor(n/4),a=n%4,o=Math.floor((n+8)/25),u=Math.floor((n-o+1)/3),l=Math.floor(19*t+n-s-u+15)%30,c=Math.floor(i/4),d=i%4,f=Math.floor(32+2*a+2*c-l-d)%7,h=Math.floor((t+11*l+22*f)/451),_=Math.floor((l+f-7*h+114)/31),m=(l+f-7*h+114)%31+1,g=Date.UTC(r,_-1,m+e),R=Date.UTC(r,0,1);return[Math.ceil((g-R)/(1e3*60*60*24))]}var cT=function(){function r(e){this.options=e}return r.prototype.rebuild=function(e,t){var n=this.options;if(e!==this.lastyear&&(this.yearinfo=tp(e,n)),ge(n.bynweekday)&&(t!==this.lastmonth||e!==this.lastyear)){var i=this.yearinfo,s=i.yearlen,a=i.mrange,o=i.wdaymask;this.monthinfo=rp(e,t,s,a,o,n)}oe(n.byeaster)&&(this.eastermask=np(e,n.byeaster))},Object.defineProperty(r.prototype,"lastyear",{get:function(){return this.monthinfo?this.monthinfo.lastyear:null},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"lastmonth",{get:function(){return this.monthinfo?this.monthinfo.lastmonth:null},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"yearlen",{get:function(){return this.yearinfo.yearlen},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"yearordinal",{get:function(){return this.yearinfo.yearordinal},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"mrange",{get:function(){return this.yearinfo.mrange},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"wdaymask",{get:function(){return this.yearinfo.wdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"mmask",{get:function(){return this.yearinfo.mmask},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"wnomask",{get:function(){return this.yearinfo.wnomask},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"nwdaymask",{get:function(){return this.monthinfo?this.monthinfo.nwdaymask:[]},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"nextyearlen",{get:function(){return this.yearinfo.nextyearlen},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"mdaymask",{get:function(){return this.yearinfo.mdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"nmdaymask",{get:function(){return this.yearinfo.nmdaymask},enumerable:!1,configurable:!0}),r.prototype.ydayset=function(){return[ft(this.yearlen),0,this.yearlen]},r.prototype.mdayset=function(e,t){for(var n=this.mrange[t-1],i=this.mrange[t],s=G(null,this.yearlen),a=n;a<i;a++)s[a]=a;return[s,n,i]},r.prototype.wdayset=function(e,t,n){for(var i=G(null,this.yearlen+7),s=C.toOrdinal(new Date(Date.UTC(e,t-1,n)))-this.yearordinal,a=s,o=0;o<7&&(i[s]=s,++s,this.wdaymask[s]!==this.options.wkst);o++);return[i,a,s]},r.prototype.ddayset=function(e,t,n){var i=G(null,this.yearlen),s=C.toOrdinal(new Date(Date.UTC(e,t-1,n)))-this.yearordinal;return i[s]=s,[i,s,s+1]},r.prototype.htimeset=function(e,t,n,i){var s=this,a=[];return this.options.byminute.forEach(function(o){a=a.concat(s.mtimeset(e,o,n,i))}),C.sort(a),a},r.prototype.mtimeset=function(e,t,n,i){var s=this.options.bysecond.map(function(a){return new fn(e,t,a,i)});return C.sort(s),s},r.prototype.stimeset=function(e,t,n,i){return[new fn(e,t,n,i)]},r.prototype.getdayset=function(e){switch(e){case $.YEARLY:return this.ydayset.bind(this);case $.MONTHLY:return this.mdayset.bind(this);case $.WEEKLY:return this.wdayset.bind(this);case $.DAILY:return this.ddayset.bind(this);default:return this.ddayset.bind(this)}},r.prototype.gettimeset=function(e){switch(e){case $.HOURLY:return this.htimeset.bind(this);case $.MINUTELY:return this.mtimeset.bind(this);case $.SECONDLY:return this.stimeset.bind(this)}},r}(),ip=cT;function sp(r,e,t,n,i,s){for(var a=[],o=0;o<r.length;o++){var u=void 0,l=void 0,c=r[o];c<0?(u=Math.floor(c/e.length),l=Ye(c,e.length)):(u=Math.floor((c-1)/e.length),l=Ye(c-1,e.length));for(var d=[],f=t;f<n;f++){var h=s[f];!oe(h)||d.push(h)}var _=void 0;u<0?_=d.slice(u)[0]:_=d[u];var m=e[l],g=C.fromOrdinal(i.yearordinal+_),R=C.combine(g,m);K(a,R)||a.push(R)}return C.sort(a),a}function Cs(r,e){var t=e.dtstart,n=e.freq,i=e.interval,s=e.until,a=e.bysetpos,o=e.count;if(o===0||i===0)return Xt(r);var u=Wf.fromDate(t),l=new ip(e);l.rebuild(u.year,u.month);for(var c=pT(l,u,e);;){var d=l.getdayset(n)(u.year,u.month,u.day),f=d[0],h=d[1],_=d[2],m=fT(f,h,_,l,e);if(ge(a))for(var g=sp(a,c,h,_,l,f),R=0;R<g.length;R++){var w=g[R];if(s&&w>s)return Xt(r);if(w>=t){var k=ap(w,e);if(!r.accept(k)||o&&(--o,!o))return Xt(r)}}else for(var R=h;R<_;R++){var z=f[R];if(!!oe(z))for(var fe=C.fromOrdinal(l.yearordinal+z),he=0;he<c.length;he++){var ne=c[he],w=C.combine(fe,ne);if(s&&w>s)return Xt(r);if(w>=t){var k=ap(w,e);if(!r.accept(k)||o&&(--o,!o))return Xt(r)}}}if(e.interval===0||(u.add(e,m),u.year>C.MAXYEAR))return Xt(r);ei(n)||(c=l.gettimeset(n)(u.hour,u.minute,u.second,0)),l.rebuild(u.year,u.month)}}function dT(r,e,t){var n=t.bymonth,i=t.byweekno,s=t.byweekday,a=t.byeaster,o=t.bymonthday,u=t.bynmonthday,l=t.byyearday;return ge(n)&&!K(n,r.mmask[e])||ge(i)&&!r.wnomask[e]||ge(s)&&!K(s,r.wdaymask[e])||ge(r.nwdaymask)&&!r.nwdaymask[e]||a!==null&&!K(r.eastermask,e)||(ge(o)||ge(u))&&!K(o,r.mdaymask[e])&&!K(u,r.nmdaymask[e])||ge(l)&&(e<r.yearlen&&!K(l,e+1)&&!K(l,-r.yearlen+e)||e>=r.yearlen&&!K(l,e+1-r.yearlen)&&!K(l,-r.nextyearlen+e-r.yearlen))}function ap(r,e){return new Cr(r,e.tzid).rezonedDate()}function Xt(r){return r.getValue()}function fT(r,e,t,n,i){for(var s=!1,a=e;a<t;a++){var o=r[a];s=dT(n,o,i),s&&(r[o]=null)}return s}function pT(r,e,t){var n=t.freq,i=t.byhour,s=t.byminute,a=t.bysecond;return ei(n)?$f(t):n>=O.HOURLY&&ge(i)&&!K(i,e.hour)||n>=O.MINUTELY&&ge(s)&&!K(s,e.minute)||n>=O.SECONDLY&&ge(a)&&!K(a,e.second)?[]:r.gettimeset(n)(e.hour,e.minute,e.second,e.millisecond)}var pt={MO:new Te(0),TU:new Te(1),WE:new Te(2),TH:new Te(3),FR:new Te(4),SA:new Te(5),SU:new Te(6)},ti={freq:$.YEARLY,dtstart:null,interval:1,wkst:pt.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},jf=Object.keys(ti),O=function(){function r(e,t){e===void 0&&(e={}),t===void 0&&(t=!1),this._cache=t?null:new Hf,this.origOptions=go(e);var n=Yf(e).parsedOptions;this.options=n}return r.parseText=function(e,t){return Jn(e,t)},r.fromText=function(e,t){return Uf(e,t)},r.fromString=function(e){return new r(r.parseString(e)||void 0)},r.prototype._iter=function(e){return Cs(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 yo("all",{},e));var t=this._cacheGet("all");return t===!1&&(t=this._iter(new Vt("all",{})),this._cacheAdd("all",t)),t},r.prototype.between=function(e,t,n,i){if(n===void 0&&(n=!1),!C.isValidDate(e)||!C.isValidDate(t))throw new Error("Invalid date passed in to RRule.between");var s={before:t,after:e,inc:n};if(i)return this._iter(new yo("between",s,i));var a=this._cacheGet("between",s);return a===!1&&(a=this._iter(new Vt("between",s)),this._cacheAdd("between",a,s)),a},r.prototype.before=function(e,t){if(t===void 0&&(t=!1),!C.isValidDate(e))throw new Error("Invalid date passed in to RRule.before");var n={dt:e,inc:t},i=this._cacheGet("before",n);return i===!1&&(i=this._iter(new Vt("before",n)),this._cacheAdd("before",i,n)),i},r.prototype.after=function(e,t){if(t===void 0&&(t=!1),!C.isValidDate(e))throw new Error("Invalid date passed in to RRule.after");var n={dt:e,inc:t},i=this._cacheGet("after",n);return i===!1&&(i=this._iter(new Vt("after",n)),this._cacheAdd("after",i,n)),i},r.prototype.count=function(){return this.all().length},r.prototype.toString=function(){return ii(this.origOptions)},r.prototype.toText=function(e,t,n){return qf(this,e,t,n)},r.prototype.isFullyConvertibleToText=function(){return Lf(this)},r.prototype.clone=function(){return new r(this.origOptions)},r.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],r.YEARLY=$.YEARLY,r.MONTHLY=$.MONTHLY,r.WEEKLY=$.WEEKLY,r.DAILY=$.DAILY,r.HOURLY=$.HOURLY,r.MINUTELY=$.MINUTELY,r.SECONDLY=$.SECONDLY,r.MO=pt.MO,r.TU=pt.TU,r.WE=pt.WE,r.TH=pt.TH,r.FR=pt.FR,r.SA=pt.SA,r.SU=pt.SU,r.parseString=ni,r.optionsToString=ii,r}();function op(r,e,t,n,i,s){var a={},o=r.accept;function u(f,h){t.forEach(function(_){_.between(f,h,!0).forEach(function(m){a[Number(m)]=!0})})}i.forEach(function(f){var h=new Cr(f,s).rezonedDate();a[Number(h)]=!0}),r.accept=function(f){var h=Number(f);return isNaN(h)?o.call(this,f):!a[h]&&(u(new Date(h-1),new Date(h+1)),!a[h])?(a[h]=!0,o.call(this,f)):!0},r.method==="between"&&(u(r.args.after,r.args.before),r.accept=function(f){var h=Number(f);return a[h]?!0:(a[h]=!0,o.call(this,f))});for(var l=0;l<n.length;l++){var c=new Cr(n[l],s).rezonedDate();if(!r.accept(new Date(c.getTime())))break}e.forEach(function(f){Cs(r,f.options)});var d=r._result;switch(C.sort(d),r.method){case"all":case"between":return d;case"before":return d.length&&d[d.length-1]||null;case"after":default:return d.length&&d[0]||null}}var up={dtstart:null,cache:!1,unfold:!1,forceset:!1,compatible:!1,tzid:null};function hT(r,e){var t=[],n=[],i=[],s=[],a=ri(r),o=a.dtstart,u=a.tzid,l=TT(r,e.unfold);return l.forEach(function(c){var d;if(!!c){var f=_T(c),h=f.name,_=f.parms,m=f.value;switch(h.toUpperCase()){case"RRULE":if(_.length)throw new Error("unsupported RRULE parm: ".concat(_.join(",")));t.push(ni(c));break;case"RDATE":var g=(d=/RDATE(?:;TZID=([^:=]+))?/i.exec(c))!==null&&d!==void 0?d:[],R=g[1];R&&!u&&(u=R),n=n.concat(lp(m,_));break;case"EXRULE":if(_.length)throw new Error("unsupported EXRULE parm: ".concat(_.join(",")));i.push(ni(m));break;case"EXDATE":s=s.concat(lp(m,_));break;case"DTSTART":break;default:throw new Error("unsupported property: "+h)}}}),{dtstart:o,tzid:u,rrulevals:t,rdatevals:n,exrulevals:i,exdatevals:s}}function mT(r,e){var t=hT(r,e),n=t.rrulevals,i=t.rdatevals,s=t.exrulevals,a=t.exdatevals,o=t.dtstart,u=t.tzid,l=e.cache===!1;if(e.compatible&&(e.forceset=!0,e.unfold=!0),e.forceset||n.length>1||i.length||s.length||a.length){var c=new bo(l);return c.dtstart(o),c.tzid(u||void 0),n.forEach(function(f){c.rrule(new O(To(f,o,u),l))}),i.forEach(function(f){c.rdate(f)}),s.forEach(function(f){c.exrule(new O(To(f,o,u),l))}),a.forEach(function(f){c.exdate(f)}),e.compatible&&e.dtstart&&c.rdate(o),c}var d=n[0]||{};return new O(To(d,d.dtstart||e.dtstart||o,d.tzid||e.tzid||u),l)}function Is(r,e){return e===void 0&&(e={}),mT(r,yT(e))}function To(r,e,t){return Be(Be({},r),{dtstart:e,tzid:t})}function yT(r){var e=[],t=Object.keys(r),n=Object.keys(up);if(t.forEach(function(i){K(n,i)||e.push(i)}),e.length)throw new Error("Invalid options: "+e.join(", "));return Be(Be({},up),r)}function gT(r){if(r.indexOf(":")===-1)return{name:"RRULE",value:r};var e=ff(r,":",1),t=e[0],n=e[1];return{name:t,value:n}}function _T(r){var e=gT(r),t=e.name,n=e.value,i=t.split(";");if(!i)throw new Error("empty property name");return{name:i[0].toUpperCase(),parms:i.slice(1),value:n}}function TT(r,e){if(e===void 0&&(e=!1),r=r&&r.trim(),!r)throw new Error("Invalid empty string");if(!e)return r.split(/\s/);for(var t=r.split(`
`),n=0;n<t.length;){var i=t[n]=t[n].replace(/\s+$/g,"");i?n>0&&i[0]===" "?(t[n-1]+=i.slice(1),t.splice(n,1)):n+=1:t.splice(n,1)}return t}function bT(r){r.forEach(function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)})}function lp(r,e){return bT(e),r.split(",").map(function(t){return C.untilStringToDate(t)})}function cp(r){var e=this;return function(t){if(t!==void 0&&(e["_".concat(r)]=t),e["_".concat(r)]!==void 0)return e["_".concat(r)];for(var n=0;n<e._rrule.length;n++){var i=e._rrule[n].origOptions[r];if(i)return i}}}var bo=function(r){cn(e,r);function e(t){t===void 0&&(t=!1);var n=r.call(this,{},t)||this;return n.dtstart=cp.apply(n,["dtstart"]),n.tzid=cp.apply(n,["tzid"]),n._rrule=[],n._rdate=[],n._exrule=[],n._exdate=[],n}return e.prototype._iter=function(t){return op(t,this._rrule,this._exrule,this._rdate,this._exdate,this.tzid())},e.prototype.rrule=function(t){dp(t,this._rrule)},e.prototype.exrule=function(t){dp(t,this._exrule)},e.prototype.rdate=function(t){fp(t,this._rdate)},e.prototype.exdate=function(t){fp(t,this._exdate)},e.prototype.rrules=function(){return this._rrule.map(function(t){return Is(t.toString())})},e.prototype.exrules=function(){return this._exrule.map(function(t){return Is(t.toString())})},e.prototype.rdates=function(){return this._rdate.map(function(t){return new Date(t.getTime())})},e.prototype.exdates=function(){return this._exdate.map(function(t){return new Date(t.getTime())})},e.prototype.valueOf=function(){var t=[];return!this._rrule.length&&this._dtstart&&(t=t.concat(ii({dtstart:this._dtstart}))),this._rrule.forEach(function(n){t=t.concat(n.toString().split(`
`))}),this._exrule.forEach(function(n){t=t.concat(n.toString().split(`
`).map(function(i){return i.replace(/^RRULE:/,"EXRULE:")}).filter(function(i){return!/^DTSTART/.test(i)}))}),this._rdate.length&&t.push(pp("RDATE",this._rdate,this.tzid())),this._exdate.length&&t.push(pp("EXDATE",this._exdate,this.tzid())),t},e.prototype.toString=function(){return this.valueOf().join(`
`)},e.prototype.clone=function(){var t=new e(!!this._cache);return this._rrule.forEach(function(n){return t.rrule(n.clone())}),this._exrule.forEach(function(n){return t.exrule(n.clone())}),this._rdate.forEach(function(n){return t.rdate(new Date(n.getTime()))}),this._exdate.forEach(function(n){return t.exdate(new Date(n.getTime()))}),t},e}(O);function dp(r,e){if(!(r instanceof O))throw new TypeError(String(r)+" is not RRule instance");K(e.map(String),String(r))||e.push(r)}function fp(r,e){if(!(r instanceof Date))throw new TypeError(String(r)+" is not Date instance");K(e.map(Number),Number(r))||(e.push(r),C.sort(e))}function pp(r,e,t){var n=!t||t.toUpperCase()==="UTC",i=n?"".concat(r,":"):"".concat(r,";TZID=").concat(t,":"),s=e.map(function(a){return C.timeToUntilString(a.valueOf(),n)}).join(",");return"".concat(i).concat(s)}var jg=Os(we()),ar=class{static parseDate(e,t=!1){return window.moment(jg.parseDate(e,void 0,{forwardDate:t})).startOf("day")}};var _e=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 _e("None of",e,"NOT")}static booleanXor(e){return new _e("Exactly one of",e,"XOR")}asString(e=""){if(this.children.length==0)return e+this.description;let t=e+`${this.symbol}`;this.children.length>1&&(t+=` (${this.description})`),t+=":";let n=e+" ";for(let i=0;i<this.children.length;i++)t+=`
${this.children[i].asString(n)}`;return t}static combineOrCreateExplanation(e,t,n){if(t.length===2){let i=t[0],s=t[1];if(i.symbol===n&&s.symbol==="")return i.children.push(s),i}return new _e(e,t,n)}};var or=class{constructor(e,t,n){this.property=e,this.comparator=or.maybeReverse(n,t)}static maybeReverse(e,t){return e?or.makeReversedComparator(t):t}static makeReversedComparator(e){return(t,n)=>e(t,n)*-1}};var ce=class{canCreateFilterForLine(e){return ce.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()}supportsSorting(){return!1}parseSortLine(e){return!this.supportsSorting()||!this.canCreateSorterForLine(e)?null:this.createSorterFromLine(e)}canCreateSorterForLine(e){return this.supportsSorting()?ce.lineMatchesFilter(this.sorterRegExp(),e):!1}createSorterFromLine(e){if(!this.supportsSorting())return null;let t=ce.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.fieldNameSingular()}( reverse)?`)}comparator(){throw Error(`comparator() unimplemented for ${this.fieldNameSingular()}`)}createSorter(e){return new or(this.fieldNameSingular(),this.comparator(),e)}createNormalSorter(){return this.createSorter(!1)}createReverseSorter(){return this.createSorter(!0)}};var Ze=class{constructor(e,t,n){this.instruction=e,this.explanation=n,this.filterFunction=t}explainFilterIndented(e){let t=this.explanation;return t.asString()===this.instruction?`${e}${this.instruction}
`:`${e}${this.instruction} =>
${t.asString(" ")}
`}},de=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 de(e.instruction);return t.filter=e,t}static fromError(e,t){let n=new de(e);return n.error=t,n}};var Oa=class{constructor(e,t){this._instruction=e,this._filter=t}canCreateFilterForLine(e){return e==this._instruction}createFilterOrErrorMessage(e){let t=new de(e);return e===this._instruction?(t.filter=new Ze(e,this._filter,new _e(e)),t):(t.error=`do not understand filter: ${e}`,t)}};var Dr=class{constructor(){this._filters=[]}add(e,t){this._filters.push(new Oa(e,t))}canCreateFilterForLine(e){for(let t of this._filters)if(t.canCreateFilterForLine(e))return!0;return!1}createFilterOrErrorMessage(e){for(let n of this._filters){let i=n.createFilterOrErrorMessage(e);if(i.error===void 0)return i}let t=new de(e);return t.error=`do not understand filter: ${e}`,t}};var pe=class extends ce{constructor(){super();this.filterInstructions=new Dr,this.filterInstructions.add(`has ${this.fieldName()} date`,t=>this.date(t)!==null),this.filterInstructions.add(`no ${this.fieldName()} date`,t=>this.date(t)===null),this.filterInstructions.add(`${this.fieldName()} date is invalid`,t=>{let n=this.date(t);return n!==null&&!n.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 i=new de(t),s=ce.getMatch(this.filterRegExp(),t),a;if(s!==null){let o=ar.parseDate(s[2]);if(!o.isValid())i.error="do not understand "+this.fieldName()+" date";else{let u;s[1]==="before"?(a=c=>{let d=this.date(c);return d?d.isBefore(o):this.filterResultIfFieldMissing()},u=" "+s[1]):s[1]==="after"?(a=c=>{let d=this.date(c);return d?d.isAfter(o):this.filterResultIfFieldMissing()},u=" "+s[1]):(a=c=>{let d=this.date(c);return d?d.isSame(o):this.filterResultIfFieldMissing()},u=" on");let l=pe.getExplanationString(this.fieldName(),u,this.filterResultIfFieldMissing(),o);i.filter=new Ze(t,a,new _e(l))}}else i.error="do not understand query filter ("+this.fieldName()+" date)";return i}static getExplanationString(t,n,i,s){let a=s.format("YYYY-MM-DD (dddd Do MMMM YYYY)"),o=`${t} date is${n} ${a}`;return i&&(o+=` OR no ${t} date`),o}supportsSorting(){return!0}comparator(){return(t,n)=>pe.compareByDate(this.date(t),this.date(n))}static compareByDate(t,n){return t!==null&&n===null?-1:t===null&&n!==null?1:t!==null&&n!==null?t.isValid()&&!n.isValid()?-1:!t.isValid()&&n.isValid()||t.isAfter(n)?1:t.isBefore(n)?-1:0:0}};var xe=class{constructor({rrule:e,baseOnToday:t,referenceDate:n,startDate:i,scheduledDate:s,dueDate:a}){this.rrule=e,this.baseOnToday=t,this.referenceDate=n,this.startDate=i,this.scheduledDate=s,this.dueDate=a}static fromText({recurrenceRuleText:e,startDate:t,scheduledDate:n,dueDate:i}){try{let s=e.match(/^([a-zA-Z0-9, !]+?)( when done)?$/i);if(s==null)return null;let a=s[1].trim(),o=s[2]!==void 0,u=O.parseText(a);if(u!==null){let l=null;i?l=window.moment(i):n?l=window.moment(n):t&&(l=window.moment(t)),!o&&l!==null?u.dtstart=window.moment(l).startOf("day").utc(!0).toDate():u.dtstart=window.moment().startOf("day").utc(!0).toDate();let c=new O(u);return new xe({rrule:c,baseOnToday:o,referenceDate:l,startDate:t,scheduledDate:n,dueDate:i})}}catch(s){}return null}toText(){let e=this.rrule.toText();return this.baseOnToday&&(e+=" when done"),e}next(){var t;let e;if(this.baseOnToday){let n=window.moment(),i=new O(dt(Me({},this.rrule.origOptions),{dtstart:n.startOf("day").utc(!0).toDate()}));e=this.nextAfter(n.endOf("day"),i)}else{let n=window.moment((t=this.referenceDate)!=null?t:void 0).endOf("day");e=this.nextAfter(n,this.rrule)}if(e!==null){let n=null,i=null,s=null;if(this.referenceDate){if(this.startDate){let a=window.moment.duration(this.startDate.diff(this.referenceDate));n=window.moment(e),n.add(Math.round(a.asDays()),"days")}if(this.scheduledDate){let a=window.moment.duration(this.scheduledDate.diff(this.referenceDate));i=window.moment(e),i.add(Math.round(a.asDays()),"days")}if(this.dueDate){let a=window.moment.duration(this.dueDate.diff(this.referenceDate));s=window.moment(e),s.add(Math.round(a.asDays()),"days")}}return{startDate:n,scheduledDate:i,dueDate:s}}return null}identicalTo(e){return this.baseOnToday!==e.baseOnToday||pe.compareByDate(this.startDate,e.startDate)!==0||pe.compareByDate(this.scheduledDate,e.scheduledDate)!==0||pe.compareByDate(this.dueDate,e.dueDate)!==0?!1:this.toText()===e.toText()}nextAfter(e,t){e.utc(!0);let n=window.moment(t.after(e.toDate())),i=this.toText(),s=i.match(/every( \d+)? month(s)?(.*)?/);s!==null&&(i.includes(" on ")||(n=xe.nextAfterMonths(e,n,t,s[1])));let a=i.match(/every( \d+)? year(s)?(.*)?/);return a!==null&&(n=xe.nextAfterYears(e,n,t,a[1])),xe.addTimezone(n).toDate()}static nextAfterMonths(e,t,n,i){let s=1;for(i!==void 0&&(s=Number.parseInt(i.trim(),10));xe.isSkippingTooManyMonths(e,t,s);)t=xe.fromOneDayEarlier(e,n);return t}static isSkippingTooManyMonths(e,t,n){let i=t.month()-e.month();return i+=(t.year()-e.year())*12,i>n}static nextAfterYears(e,t,n,i){let s=1;for(i!==void 0&&(s=Number.parseInt(i.trim(),10));xe.isSkippingTooManyYears(e,t,s);)t=xe.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 O(n),window.moment(t.after(e.toDate()))}static addTimezone(e){return window.moment.utc(e).local(!0).startOf("day")}};var Bg=[{index:9999,internalName:"INTERNAL_TESTING_ENABLED_BY_DEFAULT",displayName:"Test Item. Used to validate the Feature Framework.",description:"Description",enabledByDefault:!0,stable:!1}];var Bt=class{constructor(e,t,n,i,s,a){this.internalName=e;this.index=t;this.description=n;this.displayName=i;this.enabledByDefault=s;this.stable=a}static get values(){let e=[];return Bg.forEach(t=>{e=[...e,new Bt(t.internalName,t.index,t.description,t.displayName,t.enabledByDefault,t.stable)]}),e}static get settingsFlags(){let e={};return Bt.values.forEach(t=>{e[t.internalName]=t.enabledByDefault}),e}static fromString(e){for(let t of Bt.values)if(e===t.internalName)return t;throw new RangeError(`Illegal argument passed to fromString(): ${e} does not correspond to any available Feature ${this.prototype.constructor.name}`)}};var LP={globalFilter:"",removeGlobalFilter:!1,setDoneDate:!0,autoSuggestInEditor:!0,autoSuggestMinMatch:0,autoSuggestMaxItems:6,provideAccessKeys:!0,useFilenameAsScheduledDate:!1,filenameAsDateFolders:[],features:Bt.settingsFlags},ss=Me({},LP),H=()=>{for(let r in Bt.settingsFlags)ss.features[r]===void 0&&(ss.features[r]=Bt.settingsFlags[r]);return Me({},ss)},vt=r=>(ss=Me(Me({},ss),r),H());var lr=class{static calculate(e){let t=0;if(e.dueDate!==null){let n=Math.round(window.moment().diff(e.dueDate)/lr.milliSecondsPerDay),i;n>=7?i=1:n>=-14?i=(n+14)*.8/21+.2:i=.2,t+=i*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"1":t+=1*lr.priorityCoefficient;break;case"2":t+=.65*lr.priorityCoefficient;break;case"3":t+=.325*lr.priorityCoefficient;break}return t}},ur=lr;ur.dueCoefficient=12,ur.scheduledCoefficient=5,ur.startedCoefficient=-3,ur.priorityCoefficient=6,ur.milliSecondsPerDay=1e3*60*60*24;var Kg=require("obsidian");var Gg=require("obsidian");var cd,dd,Hg=({metadataCache:r,vault:e})=>{cd=r,dd=e},Pa=t=>B(void 0,[t],function*({originalTask:r,newTasks:e}){if(dd===void 0||cd===void 0){console.error("Tasks: cannot use File before initializing it.");return}Array.isArray(e)||(e=[e]),zg({originalTask:r,newTasks:e,vault:dd,metadataCache:cd,previousTries:0})}),zg=s=>B(void 0,[s],function*({originalTask:r,newTasks:e,vault:t,metadataCache:n,previousTries:i}){let a=()=>{if(i>10){console.error("Tasks: Too many retries. File update not possible ...");return}let g=Math.min(Math.pow(10,i),100);setTimeout(()=>{zg({originalTask:r,newTasks:e,vault:t,metadataCache:n,previousTries:i+1})},g)},o=t.getAbstractFileByPath(r.path);if(!(o instanceof Gg.TFile))return console.warn(`Tasks: No file found for task ${r.description}. Retrying ...`),a();if(o.extension!=="md"){console.error("Tasks: Only supporting files with the .md file extension.");return}let u=n.getFileCache(o);if(u==null||u===null)return console.warn(`Tasks: No file cache found for file ${o.path}. Retrying ...`),a();let l=u.listItems;if(l===void 0||l.length===0)return console.warn(`Tasks: No list items found in file cache of ${o.path}. Retrying ...`),a();let d=(yield t.read(o)).split(`
`),{globalFilter:f}=H(),h,_=0;for(let g of l){if(g.position.start.line<r.sectionStart||g.task===void 0)continue;if(d[g.position.start.line].includes(f)){if(_===r.sectionIndex){h=g;break}_++}}if(h===void 0){console.error("Tasks: could not find task to toggle in the file.");return}let m=[...d.slice(0,h.position.start.line),...e.map(g=>g.toFileLineString()),...d.slice(h.position.start.line+1)];yield t.modify(o,m.join(`
`))});function WP(r,e,t){return B(this,null,function*(){yield Kg.MarkdownRenderer.renderMarkdown(r,e,t,null)})}function Vg(r,e,t=null){return B(this,null,function*(){var a;t||(t=WP);let n=document.createElement("li");e.parentUlElement.appendChild(n),n.classList.add("task-list-item","plugin-tasks-list-item");let i=document.createElement("span");n.appendChild(i),i.classList.add("tasks-list-text"),yield YP(r,e,i,t);let s=document.createElement("input");return n.appendChild(s),s.classList.add("task-list-item-checkbox"),s.type="checkbox",r.status!=="Todo"&&(s.checked=!0,n.classList.add("is-checked")),s.addEventListener("click",o=>{o.preventDefault(),o.stopPropagation(),s.disabled=!0;let u=r.toggle();Pa({originalTask:r,newTasks:u})}),n.prepend(s),n.setAttribute("data-task",r.originalStatusCharacter.trim()),n.setAttribute("data-line",e.listIndex.toString()),s.setAttribute("data-line",e.listIndex.toString()),(a=e.layoutOptions)!=null&&a.shortMode&&jP({task:r,element:i,isFilenameUnique:e.isFilenameUnique}),n})}function YP(r,e,t,n){return B(this,null,function*(){let i="",s=new un(e.layoutOptions);for(let a of s.layoutComponents){let o=r.componentToString(s,a);o&&(a==="description"&&(o=BP(o)),i+=o)}yield $P(t,i,"description",r,n)})}function $P(r,e,t,n,i){return B(this,null,function*(){if(t==="description"){yield i(e,r,n.path);let s=r.querySelector("blockquote"),a=s!=null?s:r,o=a.querySelector("p");if(o!==null){for(;o.firstChild;)a.insertBefore(o.firstChild,o);o.remove()}r.querySelectorAll("p").forEach(u=>{u.hasChildNodes()||u.remove()}),r.querySelectorAll(".footnotes").forEach(u=>{u.remove()})}else r.innerHTML=e})}function jP({task:r,element:e,isFilenameUnique:t}){e.addEventListener("mouseenter",()=>{let n=e.createDiv();n.addClasses(["tooltip","mod-right"]),r.recurrence&&n.createDiv().setText(`${St} ${r.recurrence.toText()}`),r.startDate&&n.createDiv().setText(ka({signifier:Nt,date:r.startDate})),r.scheduledDate&&n.createDiv().setText(ka({signifier:xt,date:r.scheduledDate})),r.dueDate&&n.createDiv().setText(ka({signifier:Ct,date:r.dueDate})),r.doneDate&&n.createDiv().setText(ka({signifier:Aa,date:r.doneDate}));let i=r.getLinkText({isFilenameUnique:t});i&&n.createDiv().setText(`\u{1F517} ${i}`),e.addEventListener("mouseleave",()=>{n.remove()})})}function ka({signifier:r,date:e}){return`${r} ${e.format(D.dateFormat)} (${e.from(window.moment().startOf("day"))})`}function BP(r){let{globalFilter:e,removeGlobalFilter:t}=H();return t?r.replace(e,"").trim():r}var Qe=class{static fromPath(e){let{useFilenameAsScheduledDate:t,filenameAsDateFolders:n}=H();return!t||!this.matchesAnyFolder(n,e)?null:this.extractDateFromPath(e)}static matchesAnyFolder(e,t){return e.length===0?!0:e.some(n=>t.startsWith(n+"/"))}static extractDateFromPath(e){let t=Math.max(0,e.lastIndexOf("/")+1),n=e.lastIndexOf("."),i=e.substring(t,n),s=/(\d{4})-(\d{2})-(\d{2})/.exec(i);if(s||(s=/(\d{4})(\d{2})(\d{2})/.exec(i)),s){let a=window.moment([parseInt(s[1]),parseInt(s[2])-1,parseInt(s[3])]);if(a.isValid())return a}return null}static canApplyFallback({startDate:e,scheduledDate:t,dueDate:n}){return e===null&&n===null&&t===null}static updateTaskPath(e,t,n){let i=e.scheduledDate,s=e.scheduledDateIsInferred;return n===null?s&&(s=!1,i=null):s?i=n:this.canApplyFallback(e)&&(i=n,s=!0),new le(dt(Me({},e),{path:t,scheduledDate:i,scheduledDateIsInferred:s}))}static removeInferredStatusIfNeeded(e,t){let n=e.scheduledDateIsInferred?e.scheduledDate:null;return t.map(i=>(n!==null&&!n.isSame(i.scheduledDate,"day")&&(i=new le(dt(Me({},i),{scheduledDateIsInferred:!1}))),i))}};var Re={High:"\u23EB",Medium:"\u{1F53C}",Low:"\u{1F53D}",None:""},St="\u{1F501}",Nt="\u{1F6EB}",xt="\u23F3",Ct="\u{1F4C5}",Aa="\u2705",ut=class{},D=ut;D.dateFormat="YYYY-MM-DD",D.indentationRegex=/^([\s\t>]*)/,D.listMarkerRegex=/([-*]|[0-9]+\.)/,D.checkboxRegex=/\[(.)\]/u,D.afterCheckboxRegex=/ *(.*)/u,D.taskRegex=new RegExp(ut.indentationRegex.source+ut.listMarkerRegex.source+" +"+ut.checkboxRegex.source+ut.afterCheckboxRegex.source,"u"),D.nonTaskRegex=new RegExp(ut.indentationRegex.source+ut.listMarkerRegex.source+"? *("+ut.checkboxRegex.source+")?"+ut.afterCheckboxRegex.source,"u"),D.listItemRegex=new RegExp(ut.indentationRegex.source+ut.listMarkerRegex.source),D.blockLinkRegex=/ \^[a-zA-Z0-9-]+$/u,D.priorityRegex=/([⏫🔼🔽])$/u,D.startDateRegex=/🛫 *(\d{4}-\d{2}-\d{2})$/u,D.scheduledDateRegex=/[⏳⌛] *(\d{4}-\d{2}-\d{2})$/u,D.dueDateRegex=/[📅📆🗓] *(\d{4}-\d{2}-\d{2})$/u,D.doneDateRegex=/✅ *(\d{4}-\d{2}-\d{2})$/u,D.recurrenceRegex=/🔁 ?([a-zA-Z0-9, !]+)$/iu,D.hashTags=/(^|\s)#[^ !@#$%^&*(),.?":{}|<>]*/g,D.hashTagsFromEnd=new RegExp(ut.hashTags.source+"$");var le=class{constructor({status:e,description:t,path:n,indentation:i,listMarker:s,sectionStart:a,sectionIndex:o,originalStatusCharacter:u,precedingHeader:l,priority:c,startDate:d,scheduledDate:f,dueDate:h,doneDate:_,recurrence:m,blockLink:g,tags:R,originalMarkdown:w,scheduledDateIsInferred:k}){this._urgency=null;this.status=e,this.description=t,this.path=n,this.indentation=i,this.listMarker=s,this.sectionStart=a,this.sectionIndex=o,this.originalStatusCharacter=u,this.precedingHeader=l,this.tags=R,this.priority=c,this.startDate=d,this.scheduledDate=f,this.dueDate=h,this.doneDate=_,this.recurrence=m,this.blockLink=g,this.originalMarkdown=w,this.scheduledDateIsInferred=k}static fromLine({line:e,path:t,sectionStart:n,sectionIndex:i,precedingHeader:s,fallbackDate:a}){let o=e.match(D.taskRegex);if(o===null)return null;let u=o[4].trim(),{globalFilter:l}=H();if(!u.includes(l))return null;let c=u,d=o[1],f=o[2],h=o[3],_;switch(h){case" ":_="Todo";break;default:_="Done"}let m=c.match(D.blockLinkRegex),g=m!==null?m[0]:"";g!==""&&(c=c.replace(D.blockLinkRegex,"").trim());let R,w="3",k=null,z=null,fe=!1,he=null,ne=null,Y="",ct=null,et=[],A="",E=20,b=0;do{R=!1;let y=c.match(D.priorityRegex);if(y!==null){switch(y[1]){case Re.Low:w="4";break;case Re.Medium:w="2";break;case Re.High:w="1";break}c=c.replace(D.priorityRegex,"").trim(),R=!0}let x=c.match(D.doneDateRegex);x!==null&&(ne=window.moment(x[1],D.dateFormat),c=c.replace(D.doneDateRegex,"").trim(),R=!0);let S=c.match(D.dueDateRegex);S!==null&&(he=window.moment(S[1],D.dateFormat),c=c.replace(D.dueDateRegex,"").trim(),R=!0);let I=c.match(D.scheduledDateRegex);I!==null&&(z=window.moment(I[1],D.dateFormat),c=c.replace(D.scheduledDateRegex,"").trim(),R=!0);let ee=c.match(D.startDateRegex);ee!==null&&(k=window.moment(ee[1],D.dateFormat),c=c.replace(D.startDateRegex,"").trim(),R=!0);let V=c.match(D.recurrenceRegex);V!==null&&(Y=V[1].trim(),c=c.replace(D.recurrenceRegex,"").trim(),R=!0);let se=c.match(D.hashTagsFromEnd);if(se!=null){c=c.replace(D.hashTagsFromEnd,"").trim(),R=!0;let ae=se[0].trim();A=A.length>0?[ae,A].join(" "):ae}b++}while(R&&b<=E);Y.length>0&&(ct=xe.fromText({recurrenceRuleText:Y,startDate:k,scheduledDate:z,dueDate:he})),Qe.canApplyFallback({startDate:k,scheduledDate:z,dueDate:he})&&a!==null&&(z=a,fe=!0),A.length>0&&(c+=" "+A);let N=c.match(D.hashTags);return N!==null&&(et=N.filter(y=>y!==l).map(y=>y.trim())),new le({status:_,description:c,path:t,indentation:d,listMarker:f,sectionStart:n,sectionIndex:i,originalStatusCharacter:h,precedingHeader:s,priority:w,startDate:k,scheduledDate:z,dueDate:he,doneDate:ne,recurrence:ct,blockLink:g,tags:et,originalMarkdown:e,scheduledDateIsInferred:fe})}toLi(e){return B(this,null,function*(){return Vg(this,e)})}toString(e){let t=new un(e),n="";for(let i of t.layoutComponents)n+=this.componentToString(t,i);return n}componentToString(e,t){var n;switch(t){case"description":return this.description;case"priority":{let i="";return this.priority==="1"?i=" "+Re.High:this.priority==="2"?i=" "+Re.Medium:this.priority==="4"&&(i=" "+Re.Low),i}case"startDate":return this.startDate?e.options.shortMode?" "+Nt:` ${Nt} ${this.startDate.format(D.dateFormat)}`:"";case"scheduledDate":return!this.scheduledDate||this.scheduledDateIsInferred?"":e.options.shortMode?" "+xt:` ${xt} ${this.scheduledDate.format(D.dateFormat)}`;case"doneDate":return this.doneDate?e.options.shortMode?" "+Aa:` ${Aa} ${this.doneDate.format(D.dateFormat)}`:"";case"dueDate":return this.dueDate?e.options.shortMode?" "+Ct:` ${Ct} ${this.dueDate.format(D.dateFormat)}`:"";case"recurrenceRule":return this.recurrence?e.options.shortMode?" "+St:` ${St} ${this.recurrence.toText()}`:"";case"blockLink":return(n=this.blockLink)!=null?n:"";default:throw new Error(`Don't know how to render task component of type '${t}'`)}}toFileLineString(){return`${this.indentation}${this.listMarker} [${this.originalStatusCharacter}] ${this.toString()}`}toggle(){let e=this.status==="Todo"?"Done":"Todo",t=null,n=null;if(e!=="Todo"){let{setDoneDate:a}=H();a&&(t=window.moment()),this.recurrence!==null&&(n=this.recurrence.next())}let i=new le(dt(Me({},this),{status:e,doneDate:t,originalStatusCharacter:e==="Done"?"x":" "})),s=[];if(n!==null){let a=new le(dt(Me(Me({},this),n),{blockLink:""}));s.push(a)}return s.push(i),s}get urgency(){return this._urgency===null&&(this._urgency=ur.calculate(this)),this._urgency}get filename(){let e=this.path.match(/([^/]+)\.md$/);return e!==null?e[1]:null}getLinkText({isFilenameUnique:e}){let t;return e?t=this.filename:t="/"+this.path,t===null?null:(this.precedingHeader!==null&&this.precedingHeader!==t&&(t=t+" > "+this.precedingHeader),t)}static tasksListsIdentical(e,t){return e.length!==t.length?!1:e.every((n,i)=>n.identicalTo(t[i]))}identicalTo(e){let t=["status","description","path","indentation","listMarker","sectionStart","sectionIndex","originalStatusCharacter","precedingHeader","priority","blockLink","scheduledDateIsInferred"];for(let s of t)if(this[s]!==e[s])return!1;if(this.tags.length!==e.tags.length||!this.tags.every(function(s,a){return s===e.tags[a]}))return!1;t=["startDate","scheduledDate","dueDate","doneDate"];for(let s of t){let a=this[s],o=e[s];if(pe.compareByDate(a,o)!==0)return!1}let n=this.recurrence,i=e.recurrence;return n===null&&i!==null||n!==null&&i===null?!1:!(n&&i&&!n.identicalTo(i))}escapeRegExp(e){return e.replace(/([.*+?^${}()|[\]/\\])/g,"\\$1")}getDescriptionWithoutGlobalFilter(){let{globalFilter:e}=H(),t=this.description;if(e.length===0)return t;let n=RegExp("(^|\\s)"+this.escapeRegExp(e)+"($|\\s)","ug");return this.description.search(n)>-1&&(t=t.replace(n,"$1$2").replace(" "," ").trim()),t}};var as=class{constructor(e){this.fetch=e;this._value=void 0}get value(){return this._value===void 0&&(this._value=this.fetch()),this._value}};var Or=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 Ps,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",()=>B(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}=H(),t=this.vault.on("create",s=>{s instanceof Sa.TFile&&this.tasksMutex.runExclusive(()=>{this.indexFile(s)})});this.vaultEventReferences.push(t);let n=this.vault.on("delete",s=>{s instanceof Sa.TFile&&this.tasksMutex.runExclusive(()=>{this.tasks=this.tasks.filter(a=>a.path!==s.path),this.notifySubscribers()})});this.vaultEventReferences.push(n);let i=this.vault.on("rename",(s,a)=>{s instanceof Sa.TFile&&this.tasksMutex.runExclusive(()=>{let o=new as(()=>Qe.fromPath(s.path));this.tasks=this.tasks.map(u=>u.path===a?e?Qe.updateTaskPath(u,s.path,o.value):new le(dt(Me({},u),{path:s.path})):u),this.notifySubscribers()})});this.vaultEventReferences.push(i)}subscribeToEvents(){let e=this.events.onRequestCacheUpdate(t=>{t({tasks:this.tasks,state:this.state})});this.eventsEventReferences.push(e)}loadVault(){return this.tasksMutex.runExclusive(()=>B(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 B(this,null,function*(){let t=this.metadataCache.getFileCache(e);if(t==null)return;let n=this.tasks.filter(a=>a.path===e.path),i=t.listItems,s=[];if(i!==void 0){let a=yield this.vault.cachedRead(e);s=Or.getTasksFromFileContent(a,i,t,e)}le.tasksListsIdentical(n,s)||(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(a=>a.path!==e.path),this.tasks.push(...s),this.notifySubscribers())})}static getTasksFromFileContent(e,t,n,i){let s=[],a=e.split(`
`),o=new as(()=>Qe.fromPath(i.path)),u=null,l=0;for(let c of t)if(c.task!==void 0){if((u===null||u.position.end.line<c.position.start.line)&&(u=Or.getSection(c.position.start.line,n.sections),l=0),u===null)continue;let d=a[c.position.start.line],f=le.fromLine({line:d,path:i.path,sectionStart:u.position.start.line,sectionIndex:l,precedingHeader:Or.getPrecedingHeader(c.position.start.line,n.headings),fallbackDate:o.value});f!==null&&(l++,s.push(f))}return s}static getSection(e,t){if(t===void 0)return null;for(let n of t)if(n.position.start.line<=e&&n.position.end.line>=e)return n;return null}static getPrecedingHeader(e,t){if(t===void 0)return null;let n=null;for(let i of t){if(i.position.start.line>e)return n;n=i.heading}return n}};var wd=require("obsidian");var d_=require("obsidian");function zr(){}function gd(r){return r()}function Xg(){return Object.create(null)}function Kr(r){r.forEach(gd)}function Qg(r){return typeof r=="function"}function Jg(r,e){return r!=r?e==e:r!==e||r&&typeof r=="object"||typeof r=="function"}function e_(r){return Object.keys(r).length===0}var t_=!1;function GP(){t_=!0}function HP(){t_=!1}function v(r,e){r.appendChild(e)}function cs(r,e,t){r.insertBefore(e,t||null)}function kn(r){r.parentNode.removeChild(r)}function r_(r,e){for(let t=0;t<r.length;t+=1)r[t]&&r[t].d(e)}function q(r){return document.createElement(r)}function zP(r){return document.createElementNS("http://www.w3.org/2000/svg",r)}function Gt(r){return document.createTextNode(r)}function Q(){return Gt(" ")}function It(r,e,t,n){return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}function n_(r){return function(e){return e.preventDefault(),r.call(this,e)}}function P(r,e,t){t==null?r.removeAttribute(e):r.getAttribute(e)!==t&&r.setAttribute(e,t)}function KP(r){return Array.from(r.childNodes)}function i_(r,e){e=""+e,r.wholeText!==e&&(r.data=e)}function Ft(r,e){r.value=e==null?"":e}function _d(r,e,t){r.classList[t?"add":"remove"](e)}var Hr=class{constructor(e=!1){this.is_svg=!1,this.is_svg=e,this.e=this.n=null}c(e){this.h(e)}m(e,t,n=null){this.e||(this.is_svg?this.e=zP(t.nodeName):this.e=q(t.nodeName),this.t=t,this.c(e)),this.i(n)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.childNodes)}i(e){for(let t=0;t<this.n.length;t+=1)cs(this.t,this.n[t],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(kn)}};var ls;function us(r){ls=r}function VP(){if(!ls)throw new Error("Function called outside component initialization");return ls}function Td(r){VP().$$.on_mount.push(r)}var os=[];var Ca=[],xa=[],Zg=[],XP=Promise.resolve(),md=!1;function ZP(){md||(md=!0,XP.then(s_))}function yd(r){xa.push(r)}var hd=new Set,Na=0;function s_(){let r=ls;do{for(;Na<os.length;){let e=os[Na];Na++,us(e),QP(e.$$)}for(us(null),os.length=0,Na=0;Ca.length;)Ca.pop()();for(let e=0;e<xa.length;e+=1){let t=xa[e];hd.has(t)||(hd.add(t),t())}xa.length=0}while(os.length);for(;Zg.length;)Zg.pop()();md=!1,hd.clear(),us(r)}function QP(r){if(r.fragment!==null){r.update(),Kr(r.before_update);let e=r.dirty;r.dirty=[-1],r.fragment&&r.fragment.p(r.ctx,e),r.after_update.forEach(yd)}}var JP=new Set;function ek(r,e){r&&r.i&&(JP.delete(r),r.i(e))}var zI=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global;function tk(r,e,t,n){let{fragment:i,on_mount:s,on_destroy:a,after_update:o}=r.$$;i&&i.m(e,t),n||yd(()=>{let u=s.map(gd).filter(Qg);a?a.push(...u):Kr(u),r.$$.on_mount=[]}),o.forEach(yd)}function a_(r,e){let t=r.$$;t.fragment!==null&&(Kr(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function rk(r,e){r.$$.dirty[0]===-1&&(os.push(r),ZP(),r.$$.dirty.fill(0)),r.$$.dirty[e/31|0]|=1<<e%31}function o_(r,e,t,n,i,s,a,o=[-1]){let u=ls;us(r);let l=r.$$={fragment:null,ctx:null,props:s,update:zr,not_equal:i,bound:Xg(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(u?u.$$.context:[])),callbacks:Xg(),dirty:o,skip_bound:!1,root:e.target||u.$$.root};a&&a(l.root);let c=!1;if(l.ctx=t?t(r,e.props||{},(d,f,...h)=>{let _=h.length?h[0]:f;return l.ctx&&i(l.ctx[d],l.ctx[d]=_)&&(!l.skip_bound&&l.bound[d]&&l.bound[d](_),c&&rk(r,d)),f}):[],l.update(),c=!0,Kr(l.before_update),l.fragment=n?n(l.ctx):!1,e.target){if(e.hydrate){GP();let d=KP(e.target);l.fragment&&l.fragment.l(d),d.forEach(kn)}else l.fragment&&l.fragment.c();e.intro&&ek(r.$$.fragment),tk(r,e.target,e.anchor,e.customElement),HP(),s_()}us(u)}var nk;typeof HTMLElement=="function"&&(nk=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){let{on_mount:r}=this.$$;this.$$.on_disconnect=r.map(gd).filter(Qg);for(let e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(r,e,t){this[r]=t}disconnectedCallback(){Kr(this.$$.on_disconnect)}$destroy(){a_(this,1),this.$destroy=zr}$on(r,e){let t=this.$$.callbacks[r]||(this.$$.callbacks[r]=[]);return t.push(e),()=>{let n=t.indexOf(e);n!==-1&&t.splice(n,1)}}$set(r){this.$$set&&!e_(r)&&(this.$$.skip_bound=!0,this.$$set(r),this.$$.skip_bound=!1)}});var Ia=class{$destroy(){a_(this,1),this.$destroy=zr}$on(e,t){let n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{let i=n.indexOf(t);i!==-1&&n.splice(i,1)}}$set(e){this.$$set&&!e_(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}};var ds=Os(we());var ik={td:"today",tm:"tomorrow",yd:"yesterday",tw:"this week",nw:"next week",weekend:"sat",we:"sat"};function An(r){for(let[e,t]of Object.entries(ik))r=r.replace(RegExp(`\\b${e}\\s`,"i"),t);return r}function u_(r,e,t){let n=r.slice();return n[28]=e[t].value,n[29]=e[t].label,n[30]=e[t].symbol,n}function sk(r){let e,t=r[30]+"",n;return{c(){e=q("span"),n=Gt(t)},m(i,s){cs(i,e,s),v(e,n)},p:zr,d(i){i&&kn(e)}}}function l_(r){let e,t,n,i,s,a,o,u,l=r[29]+"",c,d,f=r[30]&&r[30].charCodeAt(0)>=256,h,_,m,g,R=f&&sk(r);return{c(){e=q("span"),t=q("input"),a=Q(),o=q("label"),u=q("span"),c=Gt(l),d=Q(),R&&R.c(),_=Q(),P(t,"type","radio"),P(t,"id",n="priority-"+r[28]),t.__value=i=r[28],t.value=t.__value,P(t,"accesskey",s=r[8](r[29].charAt(0).toLowerCase())),r[20][0].push(t),P(u,"class","accesskey-first"),P(o,"for",h="priority-"+r[28])},m(w,k){cs(w,e,k),v(e,t),t.checked=t.__value===r[0].priority,v(e,a),v(e,o),v(o,u),v(u,c),v(o,d),R&&R.m(o,null),v(e,_),m||(g=It(t,"change",r[19]),m=!0)},p(w,k){k[0]&256&&s!==(s=w[8](w[29].charAt(0).toLowerCase()))&&P(t,"accesskey",s),k[0]&1&&(t.checked=t.__value===w[0].priority),f&&R.p(w,k)},d(w){w&&kn(e),r[20][0].splice(r[20][0].indexOf(t),1),R&&R.d(),m=!1,g()}}}function ak(r){let e,t,n,i,s,a,o,u,l,c,d,f,h,_,m,g,R,w,k,z,fe,he,ne,Y,ct,et,A,E,b,N,y,x,S,I,ee,V,se,ae,Ce,He,tt,zt,Ie,rt,nn,Kt,Bd,wt,Ts,Gd,Hn,Hd,zd,bs,Kd,zn,vs,Vd,Ut,Es,Xd,sn,Sr,ws,Zd,mr,Rs,Qd,uo,Ms=r[0].status+"",lo,Jd,Kn,co,ef,Ds,tf,an,Vn,rf,Xn,fo,nf,on=r[9],ze=[];for(let F=0;F<on.length;F+=1)ze[F]=l_(u_(r,on,F));return{c(){e=q("div"),t=q("form"),n=q("div"),i=q("label"),i.innerHTML='Descrip<span class="accesskey">t</span>ion',s=Q(),a=q("input"),u=Q(),l=q("div"),c=q("label"),d=Gt("Priority"),h=Q();for(let F=0;F<ze.length;F+=1)ze[F].c();_=Q(),m=q("div"),g=q("label"),g.textContent="Recurs",R=Q(),w=q("input"),z=Q(),fe=q("code"),he=Gt(St),ne=Q(),Y=new Hr(!1),ct=Q(),et=q("label"),et.textContent="Due",A=Q(),E=q("input"),N=Q(),y=q("code"),x=Gt(Ct),S=Q(),I=new Hr(!1),ee=Q(),V=q("label"),V.textContent="Scheduled",se=Q(),ae=q("input"),He=Q(),tt=q("code"),zt=Gt(xt),Ie=Q(),rt=new Hr(!1),nn=Q(),Kt=q("label"),Kt.innerHTML='St<span class="accesskey">a</span>rt',Bd=Q(),wt=q("input"),Gd=Q(),Hn=q("code"),Hd=Gt(Nt),zd=Q(),bs=new Hr(!1),Kd=Q(),zn=q("div"),vs=q("label"),vs.innerHTML=`Only
<span class="accesskey-first">future</span> dates:`,Vd=Q(),Ut=q("input"),Xd=Q(),sn=q("div"),Sr=q("div"),ws=q("label"),ws.textContent="Status:",Zd=Q(),mr=q("input"),Qd=Q(),uo=q("code"),lo=Gt(Ms),Jd=Q(),Kn=q("div"),co=q("span"),co.textContent="Done on:",ef=Q(),Ds=q("code"),tf=Q(),an=q("div"),Vn=q("button"),Vn.textContent="Apply",rf=Q(),Xn=q("button"),Xn.textContent="Cancel",P(i,"for","description"),P(a,"id","description"),P(a,"type","text"),P(a,"class","tasks-modal-description"),P(a,"placeholder","Take out the trash"),P(a,"accesskey",o=r[8]("t")),P(n,"class","tasks-modal-section"),P(c,"for",f="priority-"+r[0].priority),P(l,"class","tasks-modal-section tasks-modal-priorities"),P(g,"for","recurrence"),P(g,"class","accesskey-first"),P(w,"id","description"),P(w,"type","text"),P(w,"placeholder","Try 'every 2 weeks on Thursday'."),P(w,"accesskey",k=r[8]("r")),Y.a=null,P(et,"for","due"),P(et,"class","accesskey-first"),P(E,"id","due"),P(E,"type","text"),P(E,"placeholder",bd),P(E,"accesskey",b=r[8]("d")),I.a=null,P(V,"for","scheduled"),P(V,"class","accesskey-first"),P(ae,"id","scheduled"),P(ae,"type","text"),P(ae,"placeholder",bd),P(ae,"accesskey",Ce=r[8]("s")),rt.a=null,P(Kt,"for","start"),P(wt,"id","start"),P(wt,"type","text"),P(wt,"placeholder",bd),P(wt,"accesskey",Ts=r[8]("a")),bs.a=null,P(vs,"for","forwardOnly"),P(Ut,"id","forwardOnly"),P(Ut,"type","checkbox"),P(Ut,"class","task-list-item-checkbox tasks-modal-checkbox"),P(Ut,"accesskey",Es=r[8]("f")),P(m,"class","tasks-modal-section tasks-modal-dates"),P(ws,"for","status"),P(mr,"id","status"),P(mr,"type","checkbox"),P(mr,"class","task-list-item-checkbox tasks-modal-checkbox"),mr.checked=Rs=r[0].status==="Done",mr.disabled=!0,P(sn,"class","tasks-modal-section tasks-modal-status"),P(Vn,"type","submit"),P(Vn,"class","mod-cta"),P(Xn,"type","button"),P(an,"class","tasks-modal-section tasks-modal-buttons"),_d(t,"with-accesskeys",r[1]),P(e,"class","tasks-modal")},m(F,ue){cs(F,e,ue),v(e,t),v(t,n),v(n,i),v(n,s),v(n,a),Ft(a,r[0].description),r[18](a),v(t,u),v(t,l),v(l,c),v(c,d),v(l,h);for(let We=0;We<ze.length;We+=1)ze[We].m(l,null);v(t,_),v(t,m),v(m,g),v(m,R),v(m,w),Ft(w,r[0].recurrenceRule),v(m,z),v(m,fe),v(fe,he),v(fe,ne),Y.m(r[6],fe),v(m,ct),v(m,et),v(m,A),v(m,E),Ft(E,r[0].dueDate),v(m,N),v(m,y),v(y,x),v(y,S),I.m(r[5],y),v(m,ee),v(m,V),v(m,se),v(m,ae),Ft(ae,r[0].scheduledDate),v(m,He),v(m,tt),v(tt,zt),v(tt,Ie),rt.m(r[4],tt),v(m,nn),v(m,Kt),v(m,Bd),v(m,wt),Ft(wt,r[0].startDate),v(m,Gd),v(m,Hn),v(Hn,Hd),v(Hn,zd),bs.m(r[3],Hn),v(m,Kd),v(m,zn),v(zn,vs),v(zn,Vd),v(zn,Ut),Ut.checked=r[0].forwardOnly,v(t,Xd),v(t,sn),v(sn,Sr),v(Sr,ws),v(Sr,Zd),v(Sr,mr),v(Sr,Qd),v(Sr,uo),v(uo,lo),v(sn,Jd),v(sn,Kn),v(Kn,co),v(Kn,ef),v(Kn,Ds),Ds.innerHTML=r[7],v(t,tf),v(t,an),v(an,Vn),v(an,rf),v(an,Xn),fo||(nf=[It(a,"input",r[17]),It(l,"keyup",r[10]),It(w,"input",r[21]),It(E,"input",r[22]),It(ae,"input",r[23]),It(wt,"input",r[24]),It(Ut,"change",r[25]),It(Xn,"click",r[11]),It(t,"submit",n_(r[12]))],fo=!0)},p(F,ue){if(ue[0]&256&&o!==(o=F[8]("t"))&&P(a,"accesskey",o),ue[0]&1&&a.value!==F[0].description&&Ft(a,F[0].description),ue[0]&1&&f!==(f="priority-"+F[0].priority)&&P(c,"for",f),ue[0]&769){on=F[9];let We;for(We=0;We<on.length;We+=1){let sf=u_(F,on,We);ze[We]?ze[We].p(sf,ue):(ze[We]=l_(sf),ze[We].c(),ze[We].m(l,null))}for(;We<ze.length;We+=1)ze[We].d(1);ze.length=on.length}ue[0]&256&&k!==(k=F[8]("r"))&&P(w,"accesskey",k),ue[0]&1&&w.value!==F[0].recurrenceRule&&Ft(w,F[0].recurrenceRule),ue[0]&64&&Y.p(F[6]),ue[0]&256&&b!==(b=F[8]("d"))&&P(E,"accesskey",b),ue[0]&1&&E.value!==F[0].dueDate&&Ft(E,F[0].dueDate),ue[0]&32&&I.p(F[5]),ue[0]&256&&Ce!==(Ce=F[8]("s"))&&P(ae,"accesskey",Ce),ue[0]&1&&ae.value!==F[0].scheduledDate&&Ft(ae,F[0].scheduledDate),ue[0]&16&&rt.p(F[4]),ue[0]&256&&Ts!==(Ts=F[8]("a"))&&P(wt,"accesskey",Ts),ue[0]&1&&wt.value!==F[0].startDate&&Ft(wt,F[0].startDate),ue[0]&8&&bs.p(F[3]),ue[0]&256&&Es!==(Es=F[8]("f"))&&P(Ut,"accesskey",Es),ue[0]&1&&(Ut.checked=F[0].forwardOnly),ue[0]&1&&Rs!==(Rs=F[0].status==="Done")&&(mr.checked=Rs),ue[0]&1&&Ms!==(Ms=F[0].status+"")&&i_(lo,Ms),ue[0]&128&&(Ds.innerHTML=F[7]),ue[0]&2&&_d(t,"with-accesskeys",F[1])},i:zr,o:zr,d(F){F&&kn(e),r[18](null),r_(ze,F),fo=!1,Kr(nf)}}}var bd="Try 'Monday' or 'tomorrow', or [td|tm|yd|tw|nw|we] then space.";function ok(r,e,t){let n;var i,s;let{task:a}=e,{onSubmit:o}=e,u,l={description:"",status:"Todo",priority:"none",recurrenceRule:"",startDate:"",scheduledDate:"",dueDate:"",doneDate:"",forwardOnly:!0},c="",d="",f="",h="",_="",m=!1,g=!0,R=[{value:"low",label:"Low",symbol:Re.Low},{value:"none",label:"Normal",symbol:Re.None},{value:"medium",label:"Medium",symbol:Re.Medium},{value:"high",label:"High",symbol:Re.High}];function w(y,x,S=void 0){if(!x)return`<i>no ${y} date</i>`;let I=ds.parseDate(x,S,{forwardDate:S!=null});return I!==null?window.moment(I).format("YYYY-MM-DD"):`<i>invalid ${y} date</i>`}Td(()=>{let{globalFilter:y,provideAccessKeys:x}=H();t(1,g=x);let S=a.getDescriptionWithoutGlobalFilter();(S!=a.description||S.indexOf(y)==-1)&&(m=!0);let I="none";a.priority==="4"?I="low":a.priority==="2"?I="medium":a.priority==="1"&&(I="high"),t(0,l={description:S,status:a.status,priority:I,recurrenceRule:a.recurrence?a.recurrence.toText():"",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(()=>{u.focus()},10)});let k=y=>{if(y.key&&!y.altKey&&!y.ctrlKey){let x=R.find(S=>S.label.charAt(0).toLowerCase()==y.key);x&&t(0,l.priority=x.value,l)}},z=()=>{o([])},fe=()=>{let{globalFilter:y}=H(),x=l.description.trim();m&&(x=y+" "+x);let S=null,I=ds.parseDate(l.startDate,new Date,{forwardDate:l.forwardOnly});I!==null&&(S=window.moment(I));let ee=null,V=ds.parseDate(l.scheduledDate,new Date,{forwardDate:l.forwardOnly});V!==null&&(ee=window.moment(V));let se=null,ae=ds.parseDate(l.dueDate,new Date,{forwardDate:l.forwardOnly});ae!==null&&(se=window.moment(ae));let Ce=null;l.recurrenceRule&&(Ce=xe.fromText({recurrenceRuleText:l.recurrenceRule,startDate:S,scheduledDate:ee,dueDate:se}));let He;switch(l.priority){case"low":He="4";break;case"medium":He="2";break;case"high":He="1";break;default:He="3"}let tt=new le(Object.assign(Object.assign({},a),{description:x,status:l.status,priority:He,recurrence:Ce,startDate:S,scheduledDate:ee,dueDate:se,doneDate:window.moment(l.doneDate,"YYYY-MM-DD").isValid()?window.moment(l.doneDate,"YYYY-MM-DD"):null}));o([tt])},he=[[]];function ne(){l.description=this.value,t(0,l)}function Y(y){Ca[y?"unshift":"push"](()=>{u=y,t(2,u)})}function ct(){l.priority=this.__value,t(0,l)}function et(){l.recurrenceRule=this.value,t(0,l)}function A(){l.dueDate=this.value,t(0,l)}function E(){l.scheduledDate=this.value,t(0,l)}function b(){l.startDate=this.value,t(0,l)}function N(){l.forwardOnly=this.checked,t(0,l)}return r.$$set=y=>{"task"in y&&t(13,a=y.task),"onSubmit"in y&&t(14,o=y.onSubmit)},r.$$.update=()=>{if(r.$$.dirty[0]&2){e:t(8,n=y=>g?y:null)}if(r.$$.dirty[0]&1){e:t(0,l.startDate=An(l.startDate),l),t(3,c=w("start",l.startDate,l.forwardOnly?new Date:void 0))}if(r.$$.dirty[0]&1){e:t(0,l.scheduledDate=An(l.scheduledDate),l),t(4,d=w("scheduled",l.scheduledDate,l.forwardOnly?new Date:void 0))}if(r.$$.dirty[0]&1){e:t(0,l.dueDate=An(l.dueDate),l),t(5,f=w("due",l.dueDate,l.forwardOnly?new Date:void 0))}if(r.$$.dirty[0]&98305){e:l.recurrenceRule?t(6,h=t(16,s=t(15,i=xe.fromText({recurrenceRuleText:l.recurrenceRule,startDate:null,scheduledDate:null,dueDate:null}))===null||i===void 0?void 0:i.toText())!==null&&s!==void 0?s:"<i>invalid recurrence rule</i>"):t(6,h="<i>not recurring</>")}if(r.$$.dirty[0]&1){e:t(7,_=w("done",l.doneDate))}},[l,g,u,c,d,f,h,_,n,R,k,z,fe,a,o,i,s,ne,Y,ct,he,et,A,E,b,N]}var vd=class extends Ia{constructor(e){super(),o_(this,e,ok,ak,Jg,{task:13,onSubmit:14},null,[-1,-1])}},c_=vd;var Sn=class extends d_.Modal{constructor({app:t,task:n,onSubmit:i}){super(t);this.task=n,this.onSubmit=s=>{s.length&&i(s),this.close()}}onOpen(){this.titleEl.setText("Create or edit Task");let{contentEl:t}=this;new c_({target:t,props:{task:this.task,onSubmit:this.onSubmit}})}onClose(){let{contentEl:t}=this;t.empty()}};var f_=({line:r,path:e})=>{var f,h;let t=Qe.fromPath(e),n=le.fromLine({line:r,path:e,sectionStart:0,sectionIndex:0,precedingHeader:null,fallbackDate:t});if(n!==null)return n;let i=r.match(D.nonTaskRegex);if(i===null)return console.error("Tasks: Cannot create task on line:",r),new le({status:"Todo",description:"",path:e,indentation:"",listMarker:"-",originalStatusCharacter:" ",priority:"3",startDate:null,scheduledDate:null,dueDate:null,doneDate:null,recurrence:null,sectionStart:0,sectionIndex:0,precedingHeader:null,blockLink:"",tags:[],originalMarkdown:"",scheduledDateIsInferred:!1});let s=i[1],a=(f=i[2])!=null?f:"-",o=(h=i[4])!=null?h:" ",u=o===" "?"Todo":"Done",l=i[5],c=r.match(D.blockLinkRegex),d=c!==null?c[0]:"";return d!==""&&(l=l.replace(D.blockLinkRegex,"")),new le({status:u,description:l,path:e,indentation:s,listMarker:a,originalStatusCharacter:o,blockLink:d,priority:"3",startDate:null,scheduledDate:null,dueDate:null,doneDate:null,recurrence:null,sectionStart:0,sectionIndex:0,precedingHeader:null,tags:[],originalMarkdown:"",scheduledDateIsInferred:!1})};var p_=(r,e,t,n)=>{var d;if(r)return t instanceof wd.MarkdownView;if(!(t instanceof wd.MarkdownView))return;let i=(d=t.file)==null?void 0:d.path;if(i===void 0)return;let a=e.getCursor().line,o=e.getLine(a),u=f_({line:o,path:i}),l=f=>{let h=Qe.removeInferredStatusIfNeeded(u,f).map(_=>_.toFileLineString()).join(`
`);e.setLine(a,h)};new Sn({app:n,task:u,onSubmit:l}).open()};var Rd=require("obsidian");var h_=(r,e,t)=>{var u;if(r)return t instanceof Rd.MarkdownView;if(!(t instanceof Rd.MarkdownView))return;let n=(u=t.file)==null?void 0:u.path;if(n===void 0)return;let i=e.getCursor(),s=i.line,a=e.getLine(s),o=uk(a,n);e.setLine(s,o),e.setCursor({line:i.line,ch:ck(i.ch,a,o)})},uk=(r,e)=>{let t=r,n=le.fromLine({line:r,path:e,sectionStart:0,sectionIndex:0,precedingHeader:null,fallbackDate:null});if(n!==null)t=lk(n);else{let i=r.match(D.taskRegex);if(i!==null){let a=i[3].toLowerCase()===" "?"x":" ";t=r.replace(D.taskRegex,`$1- [${a}] $4`)}else D.listItemRegex.test(r)?t=r.replace(D.listItemRegex,"$1$2 [ ]"):t=r.replace(D.indentationRegex,"$1- ")}return t},lk=r=>r.toggle().map(n=>n.toFileLineString()).join(`
`),ck=(r,e,t)=>{let n=t.length;if(n<=e.length)return r>=t.length?n:r;let i=13;if(t.match(D.doneDateRegex)&&n-e.length>=i&&(n-=i),n>=2*e.length&&t.search(`.+
.+`)!==-1)return r+n-e.length;let s=t.search(/[-*]/);return r<s?r:r+n-e.length};var Fa=class{get app(){return this.plugin.app}constructor({plugin:e}){this.plugin=e,e.addCommand({id:"edit-task",name:"Create or edit task",icon:"pencil",editorCheckCallback:(t,n,i)=>p_(t,n,i,this.app)}),e.addCommand({id:"toggle-done",name:"Toggle task done",icon:"check-in-circle",editorCheckCallback:h_})}};var Ua=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 qa=class{constructor({plugin:e}){this.markdownPostProcessor=this._markdownPostProcessor.bind(this);e.registerMarkdownPostProcessor(this._markdownPostProcessor.bind(this))}_markdownPostProcessor(e,t){return B(this,null,function*(){var c;let{globalFilter:n}=H(),i=e.findAll(".task-list-item").filter(d=>{var _;let f=(_=d.textContent)==null?void 0:_.split(`
`);if(f===void 0)return!1;let h=null;for(let m=0;m<f.length;m=m+1)if(f[m]!==""){h=f[m];break}return h===null?!1:h.includes(n)});if(i.length===0)return;let s=t.sourcePath,a=t.getSectionInfo(e);if(a===null)return;let o=a.text.split(`
`),u=0,l=[];for(let d=a.lineStart;d<=a.lineEnd;d++){let f=o[d];if(f===void 0)continue;let h=le.fromLine({line:f,path:s,sectionStart:a.lineStart,sectionIndex:u,precedingHeader:null,fallbackDate:null});h!==null&&(l.push(h),u++)}for(let d=0;d<i.length;d++){let f=l[d],h=i[d];if(f===void 0||h===void 0)continue;let _=(c=h.getAttr("data-line"))!=null?c:"0",m=Number.parseInt(_,10),g=yield f.toLi({parentUlElement:e,listIndex:m}),R=h.childNodes;for(let z=0;z<R.length;z=z+1){let fe=R[z];fe.nodeName.toLowerCase()==="div"?g.prepend(fe):fe.nodeName.toLowerCase()==="ul"&&g.append(fe)}let w=h.querySelectorAll("[data-footnote-id]"),k=g.querySelectorAll("[data-footnote-id]");if(w.length===k.length)for(let z=0;z<w.length;z++)k[z].replaceWith(w[z]);h.replaceWith(g)}})}};var m_=require("@codemirror/view"),y_=require("obsidian");var g_=()=>m_.ViewPlugin.fromClass(Md),Md=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 f=`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(f),new y_.Notice(f,45e3)}return!1}let{state:i}=this.view,s=this.view.posAtDOM(t),a=i.doc.lineAt(s),o=le.fromLine({line:a.text,path:"",sectionStart:0,sectionIndex:0,precedingHeader:null,fallbackDate:null});if(console.debug(`Live Preview Extension: toggle called. Position: ${s} Line: ${a.text}`),o===null)return!1;e.preventDefault();let l=o.toggle().map(f=>f.toFileLineString()).join(i.lineBreak),c=i.update({changes:{from:a.from,to:a.to,insert:l}});this.view.dispatch(c);let d=t.checked;return setTimeout(()=>{t.checked=d},1),!0}};var so=require("obsidian");var Pr=class extends ce{constructor(){super(...arguments);this._filters=new Dr}canCreateFilterForLine(t){return this._filters.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){return this._filters.createFilterOrErrorMessage(t)}filterRegExp(){return null}};var Nn=class extends Pr{constructor(){super(),this._filters.add("done",e=>e.status==="Done"),this._filters.add("not done",e=>e.status!=="Done")}fieldName(){return"status"}supportsSorting(){return!0}comparator(){return(e,t)=>e.status<t.status?1:e.status>t.status?-1:0}};var Dd=class extends pe{filterRegExp(){return Dd.dueRegexp}fieldName(){return"due"}date(e){return e.dueDate}filterResultIfFieldMissing(){return!1}},Vr=Dd;Vr.dueRegexp=/^due (before|after|on)? ?(.*)/;var Od=class extends ce{createFilterOrErrorMessage(e){let t=new de(e),n=ce.getMatch(this.filterRegExp(),e);if(n!==null){let i=n[5],s=null;switch(i){case"low":s="4";break;case"none":s="3";break;case"medium":s="2";break;case"high":s="1";break}if(s===null)return t.error="do not understand priority",t;let a=e,o;switch(n[3]){case"above":o=u=>u.priority.localeCompare(s)<0;break;case"below":o=u=>u.priority.localeCompare(s)>0;break;case"not":o=u=>u.priority!==s;break;default:o=u=>u.priority===s,a=`${this.fieldName()} is ${i}`}t.filter=new Ze(e,o,new _e(a))}else t.error="do not understand query filter (priority)";return t}fieldName(){return"priority"}filterRegExp(){return Od.priorityRegexp}supportsSorting(){return!0}comparator(){return(e,t)=>e.priority.localeCompare(t.priority)}},Xr=Od;Xr.priorityRegexp=/^priority(\s+is)?(\s+(above|below|not))?(\s+(low|none|medium|high))$/;var xn=class{matchesAnyOf(e){return e.some(t=>this.matches(t))}};var Zr=class extends xn{constructor(t){super();this.stringToFind=t}matches(t){return Zr.stringIncludesCaseInsensitive(t,this.stringToFind)}static stringIncludesCaseInsensitive(t,n){return t.toLocaleLowerCase().includes(n.toLocaleLowerCase())}};var Cn=class extends xn{constructor(t){super();this.regex=t}static validateAndConstruct(t){let n=/\/((?![*+?])(?:[^\r\n[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*])+)\/((?:g(?:im?|mi?)?|i(?:gm?|mg?)?|m(?:gi?|ig?)?)?)/,i=t.match(n);if(i!==null){let s=new RegExp(i[1],i[2]);return new Cn(s)}else return null}matches(t){return t.match(this.regex)!==null}};var Je=class extends ce{createFilterOrErrorMessage(e){let t=ce.getMatch(this.filterRegExp(),e);if(t===null)return de.fromError(e,`do not understand query filter (${this.fieldName()})`);let[n,i,s]=t,a=null;if(i.includes("include"))a=new Zr(s);else if(i.includes("regex")&&(a=Cn.validateAndConstruct(s),a===null))return de.fromError(e,`cannot parse regex (${this.fieldName()}); check your leading and trailing slashes for your query`);if(a===null)return de.fromError(e,`do not understand query filter (${this.fieldName()})`);let o=i.match(/not/)!==null,u=new Ze(e,this.getFilter(a,o),new _e(e));return de.fromFilter(u)}static stringIncludesCaseInsensitive(e,t){return Zr.stringIncludesCaseInsensitive(e,t)}fieldPattern(){return this.fieldName()}filterOperatorPattern(){return"includes|does not include|regex matches|regex does not match"}filterRegExp(){return new RegExp(`^(?:${this.fieldPattern()}) (${this.filterOperatorPattern()}) (.*)`)}getFilter(e,t){return n=>{let i=e.matches(this.value(n));return t?!i:i}}comparator(){return(e,t)=>this.value(e).localeCompare(this.value(t),void 0,{numeric:!0})}};var In=class extends Je{fieldName(){return"path"}value(e){return e.path}supportsSorting(){return!0}};var Fn=class extends ce{canCreateFilterForLine(e){return!1}createFilterOrErrorMessage(e){return de.fromError(e,"Filtering by urgency is not yet supported")}fieldName(){return"urgency"}filterRegExp(){throw Error(`filterRegExp() unimplemented for ${this.fieldName()}`)}supportsSorting(){return!0}comparator(){return(e,t)=>t.urgency-e.urgency}};var Un=class{static by(e,t){let n=[new Fn().comparator(),new Nn().comparator(),new Vr().comparator(),new Xr().comparator(),new In().comparator()],i=[];for(let s of e)i.push(s.comparator);return t.sort(Un.makeCompositeComparator([...i,...n]))}static makeCompositeComparator(e){return(t,n)=>{for(let i of e){let s=i(t,n);if(s!==0)return s}return 0}}};var Qr=class extends Je{fieldName(){return"description"}value(e){let t=H().globalFilter;return e.description.replace(t,"").trim()}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=Qr.cleanDescription(e.description),i=Qr.cleanDescription(t.description);return n.localeCompare(i,void 0,{numeric:!0})}}static cleanDescription(e){let t=H().globalFilter;e=e.replace(t,"").trim();let n=/^\[\[?([^\]]*)]]?/,i=e.match(n);if(i!==null){let s=i[1];e=s.substring(s.indexOf("|")+1)+e.replace(n,"")}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 Pd=class extends pe{filterRegExp(){return Pd.doneRegexp}fieldName(){return"done"}date(e){return e.doneDate}filterResultIfFieldMissing(){return!1}},fs=Pd;fs.doneRegexp=/^done (before|after|on)? ?(.*)/;var La=class extends Pr{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 Wa=class extends Je{fieldName(){return"heading"}value(e){return e.precedingHeader?e.precedingHeader:""}supportsSorting(){return!0}};var kd=class extends pe{filterRegExp(){return kd.scheduledRegexp}fieldName(){return"scheduled"}date(e){return e.scheduledDate}filterResultIfFieldMissing(){return!1}},ps=kd;ps.scheduledRegexp=/^scheduled (before|after|on)? ?(.*)/;var Ad=class extends pe{filterRegExp(){return Ad.startRegexp}fieldName(){return"start"}date(e){return e.startDate}filterResultIfFieldMissing(){return!0}},hs=Ad;hs.startRegexp=/^starts (before|after|on)? ?(.*)/;var qn=class extends ce{constructor(){super();this.filterInstructions=new Dr,this.filterInstructions.add(qn.instructionForFieldPresence,t=>this.dates(t).some(n=>n!==null)),this.filterInstructions.add(qn.instructionForFieldAbsence,t=>!this.dates(t).some(n=>n!==null))}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 i=new de(t),s=ce.getMatch(this.filterRegExp(),t);if(s!==null){let a=ar.parseDate(s[2]);if(!a.isValid())i.error="do not understand happens date";else{let o,u;s[1]==="before"?(o=c=>this.dates(c).some(d=>d&&d.isBefore(a)),u=" "+s[1]):s[1]==="after"?(o=c=>this.dates(c).some(d=>d&&d.isAfter(a)),u=" "+s[1]):(o=c=>this.dates(c).some(d=>d&&d.isSame(a)),u=" on");let l=pe.getExplanationString("due, start or scheduled",u,!1,a);i.filter=new Ze(t,o,new _e(l))}}else i.error="do not understand query filter (happens date)";return i}earliestDate(t){return new qn().dates(t).sort(pe.compareByDate)[0]}filterRegExp(){return qn.happensRegexp}dates(t){return Array.of(t.startDate,t.scheduledDate,t.dueDate)}fieldName(){return"happens"}supportsSorting(){return!0}comparator(){return(t,n)=>pe.compareByDate(this.earliestDate(t),this.earliestDate(n))}},cr=qn;cr.happensRegexp=/^happens (before|after|on)? ?(.*)/,cr.instructionForFieldPresence="has happens date",cr.instructionForFieldAbsence="no happens date";var Ya=class extends Pr{constructor(){super(),this._filters.add("is recurring",e=>e.recurrence!==null),this._filters.add("is not recurring",e=>e.recurrence===null)}fieldName(){return"recurring"}};var $a=class extends Je{fieldNamePlural(){return this.fieldNameSingular()+"s"}fieldName(){return`${this.fieldNameSingular()}/${this.fieldNamePlural()}`}fieldPattern(){return`${this.fieldNameSingular()}|${this.fieldNamePlural()}`}filterOperatorPattern(){return`${super.filterOperatorPattern()}|include|do not include`}value(e){return this.values(e).join(", ")}getFilter(e,t){return n=>{let i=e.matchesAnyOf(this.values(n));return t?!i:i}}};var Jr=class extends $a{fieldNameSingular(){return"tag"}values(e){return e.tags}supportsSorting(){return!0}createSorterFromLine(e){let t=e.match(this.sorterRegExp());if(t===null)return null;let n=!!t[1],i=isNaN(+t[2])?1:+t[2],s=Jr.makeCompareByTagComparator(i);return new or(this.fieldNameSingular(),s,n)}sorterRegExp(){return/^sort by tag( reverse)?[\s]*(\d+)?/}comparator(){return Jr.makeCompareByTagComparator(1)}static makeCompareByTagComparator(e){return(t,n)=>{if(t.tags.length===0&&n.tags.length===0)return 0;if(t.tags.length===0)return 1;if(n.tags.length===0)return-1;let i=e-1;if(t.tags.length<e&&n.tags.length>=e)return 1;if(n.tags.length<e&&t.tags.length>=e)return-1;if(t.tags.length<e&&n.tags.length<e)return 0;let s=t.tags[i],a=n.tags[i];return s.localeCompare(a,void 0,{numeric:!0})}}};var A_=Os(k_());var Ha=class extends ce{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 de(t);if(t.length===0)return n.error="empty line",n;let i=this.preprocessExpression(t);try{let s=(0,A_.parse)(i);for(let u of s)if(u.name==="IDENTIFIER"&&u.value){let l=u.value.trim();if(!(l in this.subFields)){let c=za(l);if(c===null)return n.error=`couldn't parse sub-expression '${l}'`,n;if(c.error)return n.error=`couldn't parse sub-expression '${l}': ${c.error}`,n;c.filter&&(this.subFields[l]=c.filter)}}else if(u.name==="OPERATOR"){if(u.value==null)return n.error="empty operator in boolean query",n;if(!this.supportedOperators.includes(u.value))return n.error=`unknown boolean operator '${u.value}'`,n}let a=u=>this.filterTaskWithParsedQuery(u,s),o=this.constructExplanation(s);return n.filter=new Ze(t,a,o),n}catch(s){let a=s instanceof Error?s.message:"unknown error type";return n.error=`malformed boolean query -- ${a} (check the documentation for guidelines)`,n}return n}preprocessExpression(t){return t.replace(/\(([^()]+)\)/g,'("$1")')}filterTaskWithParsedQuery(t,n){let i=o=>o==="true",s=o=>o?"true":"false",a=[];for(let o of n)if(o.name==="IDENTIFIER"){if(o.value==null)throw Error("null token value");let l=this.subFields[o.value.trim()].filterFunction(t);a.push(s(l))}else if(o.name==="OPERATOR")if(o.value==="NOT"){let u=i(a.pop());a.push(s(!u))}else if(o.value==="OR"){let u=i(a.pop()),l=i(a.pop());a.push(s(u||l))}else if(o.value==="AND"){let u=i(a.pop()),l=i(a.pop());a.push(s(u&&l))}else if(o.value==="XOR"){let u=i(a.pop()),l=i(a.pop());a.push(s(u&&!l||!u&&l))}else throw Error("Unsupported operator: "+o.value);else throw Error("Unsupported token type: "+o);return i(a[0])}constructExplanation(t){let n=[];for(let i of t)if(i.name==="IDENTIFIER"){if(i.value==null)throw Error("null token value");let s=this.subFields[i.value.trim()];n.push(s.explanation)}else if(i.name==="OPERATOR")if(i.value==="NOT"){let s=n.pop();n.push(_e.booleanNot([s]))}else if(i.value==="OR"){let s=n.pop(),a=n.pop();n.push(_e.booleanOr([a,s]))}else if(i.value==="AND"){let s=n.pop(),a=n.pop();n.push(_e.booleanAnd([a,s]))}else if(i.value==="XOR"){let s=n.pop(),a=n.pop();n.push(_e.booleanXor([a,s]))}else throw Error("Unsupported operator: "+i.value);else throw Error("Unsupported token type: "+i);return n[0]}};var Ka=class extends Je{fieldName(){return"filename"}value(e){let t=e.filename;return t===null?"":t+".md"}supportsSorting(){return!0}};var Va=class extends Je{fieldName(){return"recurrence"}value(e){return e.recurrence!==null?e.recurrence.toText():""}};var S_=[()=>new Nn,()=>new Ya,()=>new Xr,()=>new cr,()=>new hs,()=>new ps,()=>new Vr,()=>new fs,()=>new In,()=>new Qr,()=>new Jr,()=>new Wa,()=>new La,()=>new Ha,()=>new Ka,()=>new Fn,()=>new Va];function za(r){for(let e of S_){let t=e();if(t.canCreateFilterForLine(r))return t.createFilterOrErrorMessage(r)}return null}function N_(r){let e=/^sort by /;if(r.match(e)===null)return null;for(let t of S_){let i=t().parseSortLine(r);if(i)return i}return null}var Xa=class{constructor(e,t){this.nestingLevel=e,this.name=t}};var Za=class{constructor(e){this.lastHeadingAtLevel=new Array;let n=e.keys().next().value.length;for(let i=0;i<n;i++)this.lastHeadingAtLevel.push("")}getHeadingsForTaskGroup(e){let t=new Array;for(let n=0;n<e.length;n++){let i=e[n];if(i!=this.lastHeadingAtLevel[n]){t.push(new Xa(n,i));for(let s=n;s<e.length;s++)this.lastHeadingAtLevel[s]="";this.lastHeadingAtLevel[n]=i}}return t}};var Qa=class{constructor(e){this.children=new Map;this.values=[];this.values=e}generateAllPaths(e=[]){let t=new Map;if(this.children.size==0)return t.set([...e],this.values),t;for(let[n,i]of this.children)e.push(n),i.generateAllPaths(e).forEach((a,o)=>t.set(o,a)),e.pop();return t}};var Ja=class extends Map{},eo=class extends Qa{},to=class{constructor(e,t){this.groups=new Ja;let n=this.buildGroupingTree(e,t);this.groups=n.generateAllPaths(),this.groups=this.getSortedGroups()}buildGroupingTree(e,t){let n=new eo(t),i=[n];for(let s of e){let a=[];for(let o of i)for(let u of o.values){let l=Ar.getGroupNamesForTask(s.property,u);for(let c of l){let d=o.children.get(c);d===void 0&&(d=new eo([]),o.children.set(c,d),a.push(d)),d.values.push(u)}}i=a}return n}getSortedGroups(){return new Ja([...this.groups.entries()].sort())}};var ro=class{constructor(e,t,n){this.groups=e,this.groupHeadings=t,this.tasks=n}tasksAsStringOfLines(){let e="";for(let t of this.tasks)e+=t.toFileLineString()+`
`;return e}toString(){let e=`
`;e+=`Group names: [${this.groups}]
`;for(let t of this.groupHeadings)e+=`${"#".repeat(4+t.nestingLevel)} ${t.name}
`;return e+=this.tasksAsStringOfLines(),e}};var no=class{constructor(e,t){this._groups=new Array;this._totalTaskCount=0;this._totalTaskCount=t.length;let n=new to(e,t);this.addTasks(n)}get groups(){return this._groups}totalTasksCount(){return this._totalTaskCount}toString(){let e="";for(let n of this.groups)e+=n.toString(),e+=`
---
`;return e+=`
${this.totalTasksCount()} tasks
`,e}addTasks(e){let t=new Za(e.groups);for(let[n,i]of e.groups){let s=t.getHeadingsForTaskGroup(n),a=new ro(n,s,i);this.add(a)}}add(e){this._groups.push(e)}};var J=class{static by(e,t){return new no(e,t)}static getGroupNamesForTask(e,t){let n=J.groupers[e];return n(t)}static escapeMarkdownCharacters(e){return e.replace(/\\/g,"\\\\").replace(/_/g,"\\_")}static groupByPriority(e){let t="ERROR";switch(e.priority){case"1":t="High";break;case"2":t="Medium";break;case"3":t="None";break;case"4":t="Low";break}return[`Priority ${e.priority}: ${t}`]}static groupByRecurrence(e){return e.recurrence!==null?[e.recurrence.toText()]:["None"]}static groupByRecurring(e){return e.recurrence!==null?["Recurring"]:["Not Recurring"]}static groupByStartDate(e){return[J.stringFromDate(e.startDate,"start")]}static groupByScheduledDate(e){return[J.stringFromDate(e.scheduledDate,"scheduled")]}static groupByDueDate(e){return[J.stringFromDate(e.dueDate,"due")]}static groupByDoneDate(e){return[J.stringFromDate(e.doneDate,"done")]}static groupByHappensDate(e){let t=new cr().earliestDate(e);return[J.stringFromDate(t,"happens")]}static stringFromDate(e,t){return e===null?"No "+t+" date":e.format(J.groupDateFormat)}static groupByPath(e){return[J.escapeMarkdownCharacters(e.path.replace(".md",""))]}static groupByFolder(e){let t=e.path,n=e.filename+".md",i=t.substring(0,t.lastIndexOf(n));return i===""?["/"]:[J.escapeMarkdownCharacters(i)]}static groupByFileName(e){let t=e.filename;return t===null?["Unknown Location"]:["[["+J.escapeMarkdownCharacters(t)+"]]"]}static groupByRoot(e){let t=e.path.replace(/\\/g,"/"),n=t.indexOf("/");return n==-1?["/"]:[J.escapeMarkdownCharacters(t.substring(0,n+1))]}static groupByBacklink(e){if(e.getLinkText({isFilenameUnique:!0})===null)return["Unknown Location"];let n="Unknown Location";if(e.filename!==null&&(n=J.escapeMarkdownCharacters(e.filename)),e.precedingHeader===null||e.precedingHeader.length===0)return[n];let i=J.groupByHeading(e)[0];return n===i?[n]:[`${n} > ${i}`]}static groupByStatus(e){return[e.status]}static groupByHeading(e){return e.precedingHeader===null||e.precedingHeader.length===0?["(No heading)"]:[e.precedingHeader]}static groupByTags(e){return e.tags.length==0?["(No tags)"]:e.tags}},Ar=J;Ar.groupDateFormat="YYYY-MM-DD dddd",Ar.groupers={backlink:J.groupByBacklink,done:J.groupByDoneDate,due:J.groupByDueDate,filename:J.groupByFileName,folder:J.groupByFolder,happens:J.groupByHappensDate,heading:J.groupByHeading,path:J.groupByPath,priority:J.groupByPriority,recurrence:J.groupByRecurrence,recurring:J.groupByRecurring,root:J.groupByRoot,scheduled:J.groupByScheduledDate,start:J.groupByStartDate,status:J.groupByStatus,tags:J.groupByTags};var Bn=class{constructor({source:e}){this._limit=void 0;this._layoutOptions=new Qn;this._filters=[];this._error=void 0;this._sorting=[];this._grouping=[];this.groupByRegexp=/^group by (backlink|done|due|filename|folder|happens|heading|path|priority|recurrence|recurring|root|scheduled|start|status|tags)/;this.hideOptionsRegexp=/^(hide|show) (task count|backlink|priority|start date|scheduled date|done date|due date|recurrence rule|edit button|urgency)/;this.shortModeRegexp=/^short/;this.explainQueryRegexp=/^explain/;this.limitRegexp=/^limit (to )?(\d+)( tasks?)?/;this.commentRegexp=/^#.*/;this.source=e,e.split(`
`).map(t=>t.trim()).forEach(t=>{switch(!0){case t==="":break;case this.shortModeRegexp.test(t):this._layoutOptions.shortMode=!0;break;case this.explainQueryRegexp.test(t):this._layoutOptions.explainQuery=!0;break;case this.limitRegexp.test(t):this.parseLimit({line:t});break;case this.parseSortBy({line:t}):break;case this.groupByRegexp.test(t):this.parseGroupBy({line:t});break;case this.hideOptionsRegexp.test(t):this.parseHideOptions({line:t});break;case this.commentRegexp.test(t):break;case this.parseFilter(t):break;default:this._error=`do not understand query: ${t}`}})}explainQuery(){return`Explanation of this Tasks code block query:
`+this.explainQueryWithoutIntroduction()}explainQueryWithoutIntroduction(){let e="",{globalFilter:t}=H();t.length!==0&&(e+=`Only tasks containing the global filter '${t}'.
`);let n=this.filters.length;if(n===0)e+="No filters supplied. All tasks will match the query.";else for(let i=0;i<n;i++)i>0&&(e+=`
`),e+=this.filters[i].explainFilterIndented("");return this._limit!==void 0&&(e+=`
At most ${this._limit} task`,this._limit!==1&&(e+="s"),e+=`.
`),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(n=>{e=e.filter(n.filterFunction)});let t=Un.by(this.sorting,e).slice(0,this.limit);return Ar.by(this.grouping,t)}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"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=za(e);return t!=null?(t.filter?this._filters.push(t.filter):this._error=t.error,!0):!1}parseLimit({line:e}){let t=e.match(this.limitRegexp);t!==null?this._limit=Number.parseInt(t[2],10):this._error="do not understand query limit"}parseSortBy({line:e}){let t=N_(e);return t?(this._sorting.push(t),!0):!1}parseGroupBy({line:e}){let t=e.match(this.groupByRegexp);t!==null?this._grouping.push({property:t[1]}):this._error="do not understand query grouping"}};var io=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 B(this,null,function*(){n.addChild(new $d({app:this.app,events:this.events,container:t,source:e,filePath:n.sourcePath}))})}},$d=class extends so.MarkdownRenderChild{constructor({app:t,events:n,container:i,source:s,filePath:a}){super(i);switch(this.app=t,this.events=n,this.source=s,this.filePath=a,this.containerEl.className){case"block-language-tasks":this.query=new Bn({source:s}),this.queryType="tasks";break;default:this.query=new Bn({source:s}),this.queryType="tasks";break}}onload(){this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.renderEventRef=this.events.onCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()}onunload(){this.renderEventRef!==void 0&&this.events.off(this.renderEventRef),this.queryReloadTimeout!==void 0&&clearTimeout(this.queryReloadTimeout)}reloadQueryAtMidnight(){let t=new Date;t.setHours(24,0,0,0);let n=new Date,i=t.getTime()-n.getTime();this.queryReloadTimeout=setTimeout(()=>{this.query=new Bn({source:this.source}),this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()},i+1e3)}render(i){return B(this,arguments,function*({tasks:t,state:n}){var a;let s=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(s);let o=this.query.applyQueryToTasks(t);for(let l of o.groups){this.addGroupHeadings(s,l.groupHeadings);let{taskList:c}=yield this.createTasksList({tasks:l.tasks,content:s});s.appendChild(c)}let u=o.totalTasksCount();console.debug(`${u} of ${t.length} tasks displayed in a block in "${this.filePath}"`),this.addTaskCount(s,u)}else this.query.error!==void 0?s.setText(`Tasks query: ${this.query.error}`):s.setText("Loading Tasks ...");(a=this.containerEl.firstChild)==null||a.replaceWith(s)})}createExplanation(t){let n=this.query.explainQuery(),i=t.createEl("pre");i.addClasses(["plugin-tasks-query-explanation"]),i.setText(n),t.appendChild(i)}createTasksList(i){return B(this,arguments,function*({tasks:t,content:n}){let s=t.length,a=n.createEl("ul");a.addClasses(["contains-task-list","plugin-tasks-query-result"]);for(let o=0;o<s;o++){let u=t[o],l=this.isFilenameUnique({task:u}),c=yield u.toLi({parentUlElement:a,listIndex:o,layoutOptions:this.query.layoutOptions,isFilenameUnique:l});c.querySelectorAll("[data-footnote-id]").forEach(h=>h.remove());let f=this.query.layoutOptions.shortMode;this.query.layoutOptions.hideUrgency||this.addUrgency(c,u),this.query.layoutOptions.hideBacklinks||this.addBacklinks(c,u,f,l),this.query.layoutOptions.hideEditButton||this.addEditButton(c,u),a.appendChild(c)}return{taskList:a,tasksCount:s}})}addEditButton(t,n){t.createEl("a",{cls:"tasks-edit"}).onClickEvent(s=>{s.preventDefault();let a=u=>{Pa({originalTask:n,newTasks:Qe.removeInferredStatusIfNeeded(n,u)})};new Sn({app:this.app,task:n,onSubmit:a}).open()})}addUrgency(t,n){let i=new Intl.NumberFormat().format(n.urgency);t.createSpan({text:i,cls:"tasks-urgency"})}addGroupHeadings(t,n){for(let i of n)this.addGroupHeading(t,i)}addGroupHeading(t,n){return B(this,null,function*(){let i;n.nestingLevel===0?i=t.createEl("h4",{cls:"tasks-group-heading"}):n.nestingLevel===1?i=t.createEl("h5",{cls:"tasks-group-heading"}):i=t.createEl("h6",{cls:"tasks-group-heading"}),yield so.MarkdownRenderer.renderMarkdown(n.name,i,this.filePath,this)})}addBacklinks(t,n,i,s){var l;let a=t.createSpan({cls:"tasks-backlink"});i||a.append(" (");let o=a.createEl("a");if(o.href=n.path,o.setAttribute("data-href",n.path),o.rel="noopener",o.target="_blank",o.addClass("internal-link"),i&&o.addClass("internal-link-short-mode"),n.precedingHeader!==null){let c=n.precedingHeader.replace(/#/g,"");o.href=o.href+"#"+c,o.setAttribute("data-href",o.getAttribute("data-href")+"#"+c)}let u;i?u=" \u{1F517}":u=(l=n.getLinkText({isFilenameUnique:s}))!=null?l:"",o.setText(u),i||a.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 i=n[1];return this.app.vault.getMarkdownFiles().filter(a=>{if(a.basename===i)return!0}).length<2}};var Et=require("obsidian");var Gn=class extends Et.PluginSettingTab{constructor({plugin:t}){super(t.app,t);this.plugin=t}display(){let{containerEl:t}=this;t.empty(),t.createEl("h3",{text:"Tasks Settings"}),t.createEl("p",{cls:"tasks-setting-important",text:"Changing any settings requires a restart of obsidian."}),t.createEl("h4",{text:"Global filter Settings"}),new Et.Setting(t).setName("Global task filter").setDesc(Gn.createFragmentWithHTML('<p><b>Recommended: Leave empty if you want all checklist items in your vault to be tasks managed by this plugin.</b></p><p>Use a global filter if you want Tasks to only act on a subset of your "<code>- [ ]</code>" checklist items, so that a checklist item must include the specified string in its description in order to be considered a task.<p><p>For example, if you set the global filter to <code>#task</code>, the Tasks plugin will only handle checklist items tagged with <code>#task</code>.</br>Other checklist items will remain normal checklist items and not appear in queries or get a done date set.</p><p>See the <a href="https://obsidian-tasks-group.github.io/obsidian-tasks/getting-started/global-filter/">documentation</a>.</p>')).addText(n=>{let i=H();n.setPlaceholder("e.g. #task or TODO").setValue(i.globalFilter).onChange(s=>B(this,null,function*(){vt({globalFilter:s}),yield this.plugin.saveSettings()}))}),new Et.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(n=>{let i=H();n.setValue(i.removeGlobalFilter).onChange(s=>B(this,null,function*(){vt({removeGlobalFilter:s}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Date Settings"}),new Et.Setting(t).setName("Set done date on every completed task").setDesc("Enabling this will add a timestamp \u2705 YYYY-MM-DD at the end when a task is toggled to done").addToggle(n=>{let i=H();n.setValue(i.setDoneDate).onChange(s=>B(this,null,function*(){vt({setDoneDate:s}),yield this.plugin.saveSettings()}))}),new Et.Setting(t).setName("Use filename as Scheduled date for undated tasks").setDesc(Gn.createFragmentWithHTML('Save time entering Scheduled (\u23F3) dates.</br>If this option is enabled, any undated tasks will be given a default Scheduled date extracted from their file name.</br>The date in the file name must be in one of <code>YYYY-MM-DD</code> or <code>YYYYMMDD</code> formats.</br>Undated tasks have none of Due (\u{1F4C5} ), Scheduled (\u23F3) and Start (\u{1F6EB}) dates.</br><p>See the <a href="https://obsidian-tasks-group.github.io/obsidian-tasks/getting-started/use-filename-as-default-date/">documentation</a>.</p>')).addToggle(n=>{let i=H();n.setValue(i.useFilenameAsScheduledDate).onChange(s=>B(this,null,function*(){vt({useFilenameAsScheduledDate:s}),yield this.plugin.saveSettings()}))}),new Et.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(n=>B(this,null,function*(){let i=H();yield this.plugin.saveSettings(),n.setValue(Gn.renderFolderArray(i.filenameAsDateFolders)).onChange(s=>B(this,null,function*(){let a=Gn.parseCommaSeparatedFolders(s);vt({filenameAsDateFolders:a}),yield this.plugin.saveSettings()}))})),t.createEl("h4",{text:"Auto-suggest Settings"}),new Et.Setting(t).setName("Auto-suggest task content").setDesc("Enabling this will open an intelligent suggest menu while typing inside a recognized task line.").addToggle(n=>{let i=H();n.setValue(i.autoSuggestInEditor).onChange(s=>B(this,null,function*(){vt({autoSuggestInEditor:s}),yield this.plugin.saveSettings()}))}),new Et.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(n=>{let i=H();n.setLimits(0,3,1).setValue(i.autoSuggestMinMatch).setDynamicTooltip().onChange(s=>B(this,null,function*(){vt({autoSuggestMinMatch:s}),yield this.plugin.saveSettings()}))}),new Et.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(n=>{let i=H();n.setLimits(3,12,1).setValue(i.autoSuggestMaxItems).setDynamicTooltip().onChange(s=>B(this,null,function*(){vt({autoSuggestMaxItems:s}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Dialog Settings"}),new Et.Setting(t).setName("Provide access keys in dialogs").setDesc("If the access keys (keyboard shortcuts) for various controls in dialog boxes conflict with system keyboard shortcuts or assistive technology functionality that is important for you, you may want to deactivate them here.").addToggle(n=>{let i=H();n.setValue(i.provideAccessKeys).onChange(s=>B(this,null,function*(){vt({provideAccessKeys:s}),yield this.plugin.saveSettings()}))})}static parseCommaSeparatedFolders(t){return t.split(",").map(n=>n.trim()).map(n=>n.replace(/^\/|\/$/g,"")).filter(n=>n!=="")}static renderFolderArray(t){return t.join(",")}},_s=Gn;_s.createFragmentWithHTML=t=>createFragment(n=>n.createDiv().innerHTML=t);var C_=require("obsidian");var Tk=`${Nt}${xt}${Ct}`;function x_(r,e,t){let n=[];n=n.concat(Ek(r,e,t)),n=n.concat(wk(r,e,t));let i=vk(r,t),s=jd(r,/([a-zA-Z'_-]*)/g,e),a=!1;if(s&&s.length>0){let o=s[0];if(o.length>=Math.max(1,t.autoSuggestMinMatch)){let u=i.filter(l=>l.displayText.toLowerCase().includes(o.toLowerCase()));for(let l of u)n.push({suggestionType:"match",displayText:l.displayText,appendText:l.appendText,insertAt:s.index,insertSkip:o.length}),a=!0}}return!a&&t.autoSuggestMinMatch===0&&(n=n.concat(i)),n.length>0&&!n.some(o=>o.suggestionType==="match")&&n.unshift({suggestionType:"empty",displayText:"\u23CE",appendText:`
`}),n=n.slice(0,t.autoSuggestMaxItems),n}function bk(r){if(Object.values(Re).some(e=>e.length>0&&r.includes(e)))return!0}function vk(r,e){let t=[];return r.includes(Ct)||t.push({displayText:`${Ct} due date`,appendText:`${Ct} `}),r.includes(Nt)||t.push({displayText:`${Nt} start date`,appendText:`${Nt} `}),r.includes(xt)||t.push({displayText:`${xt} scheduled date`,appendText:`${xt} `}),bk(r)||(t.push({displayText:`${Re.High} high priority`,appendText:`${Re.High} `}),t.push({displayText:`${Re.Medium} medium priority`,appendText:`${Re.Medium} `}),t.push({displayText:`${Re.Low} low priority`,appendText:`${Re.Low} `})),r.includes(St)||t.push({displayText:`${St} recurring (repeat)`,appendText:`${St} `}),t}function Ek(r,e,t){let n=["today","tomorrow","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","next week","next month","next year"],i=[],s=new RegExp(`([${Tk}])\\s*([0-9a-zA-Z ]*)`,"ug"),a=jd(r,s,e);if(a&&a.length>=2){let o=a[1],u=a[2];if(u.length<t.autoSuggestMinMatch)return[];let l=u&&u.length>1?ar.parseDate(An(u),!0):null;l&&l.isValid()&&i.push({displayText:`${l.format(D.dateFormat)}`,appendText:`${o} ${l.format(D.dateFormat)} `,insertAt:a.index,insertSkip:a[0].length});let c=1,d=5,f=n.filter(h=>u&&u.length>=c&&h.toLowerCase().includes(u.toLowerCase())).slice(0,d);f.length===0&&(f=n.slice(0,d));for(let h of f){let m=`${ar.parseDate(h,!0).format(D.dateFormat)}`;i.push({suggestionType:"match",displayText:`${h} (${m})`,appendText:`${o} ${m} `,insertAt:a.index,insertSkip:a[0].length})}}return i}function wk(r,e,t){var o;let n=["every","every day","every week","every month","every month on the","every year","every week on Sunday","every week on Monday","every week on Tuesday","every week on Wednesday","every week on Thursday","every week on Friday","every week on Saturday"],i=[],s=new RegExp(`(${St})\\s*([0-9a-zA-Z ]*)`,"ug"),a=jd(r,s,e);if(a&&a.length>=2){let u=a[1],l=a[2];if(l.length<t.autoSuggestMinMatch)return[];if(l.length>0){let h=(o=xe.fromText({recurrenceRuleText:l,startDate:null,scheduledDate:null,dueDate:null}))==null?void 0:o.toText();if(h){let _=`${u} ${h} `;if(i.push({suggestionType:"match",displayText:`\u2705 ${h}`,appendText:_,insertAt:a.index,insertSkip:a[0].length}),a[0]==_)return[]}}let c=1,d=t.autoSuggestMaxItems/2,f=n.filter(h=>l&&l.length>=c&&h.toLowerCase().includes(l.toLowerCase())).slice(0,d);f.length===0&&l.trim().length===0&&(f=n.slice(0,d));for(let h of f)i.push({suggestionType:"match",displayText:`${h}`,appendText:`${u} ${h} `,insertAt:a.index,insertSkip:a[0].length})}return i}function jd(r,e,t){let n=r.matchAll(e);for(let i of n)if((i==null?void 0:i.index)&&i.index<=t&&t<=i.index+i[0].length)return i;return[]}var ao=class extends C_.EditorSuggest{constructor(t,n){super(t);this.settings=n}onTrigger(t,n,i){if(!this.settings.autoSuggestInEditor)return null;let s=n.getLine(t.line);return s.contains(this.settings.globalFilter)&&s.match(D.taskRegex)?{start:{line:t.line,ch:0},end:{line:t.line,ch:s.length},query:s}:null}getSuggestions(t){let n=t.query,i=t.editor.getCursor(),s=x_(n,i.ch,this.settings),a=[];for(let o of s)a.push(dt(Me({},o),{context:t}));return a}renderSuggestion(t,n){n.setText(t.displayText)}selectSuggestion(t,n){var u,l,c;let i=t.context.editor;if(t.suggestionType==="empty"){this.close();let d=new KeyboardEvent("keydown",{code:"Enter",key:"Enter"});(l=(u=i==null?void 0:i.cm)==null?void 0:u.contentDOM)==null||l.dispatchEvent(d);return}let s=t.context.editor.getCursor(),a={line:s.line,ch:(c=t.insertAt)!=null?c:s.ch},o=t.insertSkip?{line:s.line,ch:a.ch+t.insertSkip}:void 0;t.context.editor.replaceRange(t.appendText,a,o),t.context.editor.setCursor({line:s.line,ch:a.ch+t.appendText.length})}};var oo=class extends I_.Plugin{onload(){return B(this,null,function*(){console.log('loading plugin "tasks"'),yield this.loadSettings(),this.addSettingTab(new _s({plugin:this})),Hg({metadataCache:this.app.metadataCache,vault:this.app.vault});let t=new Ua({obsidianEvents:this.app.workspace});this.cache=new Or({metadataCache:this.app.metadataCache,vault:this.app.vault,events:t}),this.inlineRenderer=new qa({plugin:this}),this.queryRenderer=new io({plugin:this,events:t}),this.registerEditorExtension(g_()),this.registerEditorSuggest(new ao(this.app,H())),new Fa({plugin:this})})}onunload(){var t;console.log('unloading plugin "tasks"'),(t=this.cache)==null||t.unload()}loadSettings(){return B(this,null,function*(){let t=yield this.loadData();vt(t)})}saveSettings(){return B(this,null,function*(){yield this.saveData(H())})}};