vault backup: 2025-07-04 10:29:10

This commit is contained in:
CrazyJasonwell committed 2025-07-04 10:29:10 +08:00
1 parent df7c12fcd2
commit 7bcb65cf24
41 files changed
+415 -11

No files matched your search

+42
View File
@@ -0,0 +1,42 @@
/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source, please visit the github repository of this plugin
*/
"use strict";var Qf=Object.create;var Yr=Object.defineProperty;var Lf=Object.getOwnPropertyDescriptor;var Nf=Object.getOwnPropertyNames;var Cf=Object.getPrototypeOf,If=Object.prototype.hasOwnProperty;var Bf=(n,e,r)=>e in n?Yr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[e]=r;var Pf=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),Af=(n,e)=>{for(var r in e)Yr(n,r,{get:e[r],enumerable:!0})},Io=(n,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Nf(e))!If.call(n,o)&&o!==r&&Yr(n,o,{get:()=>e[o],enumerable:!(i=Lf(e,o))||i.enumerable});return n};var At=(n,e,r)=>(r=n!=null?Qf(Cf(n)):{},Io(e||!n||!n.__esModule?Yr(r,"default",{value:n,enumerable:!0}):r,n)),Wf=n=>Io(Yr({},"__esModule",{value:!0}),n);var g=(n,e,r)=>Bf(n,typeof e!="symbol"?e+"":e,r);var Mt=Pf((Gi,ar)=>{(function(n,e){typeof Gi=="object"&&typeof ar!="undefined"?ar.exports=e():typeof define=="function"&&define.amd?define(e):n.moment=e()})(Gi,function(){"use strict";var n;function e(){return n.apply(null,arguments)}function r(t){n=t}function i(t){return t instanceof Array||Object.prototype.toString.call(t)==="[object Array]"}function o(t){return t!=null&&Object.prototype.toString.call(t)==="[object Object]"}function l(t,s){return Object.prototype.hasOwnProperty.call(t,s)}function c(t){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(t).length===0;var s;for(s in t)if(l(t,s))return!1;return!0}function f(t){return t===void 0}function m(t){return typeof t=="number"||Object.prototype.toString.call(t)==="[object Number]"}function h(t){return t instanceof Date||Object.prototype.toString.call(t)==="[object Date]"}function y(t,s){var a=[],u,d=t.length;for(u=0;u<d;++u)a.push(s(t[u],u));return a}function w(t,s){for(var a in s)l(s,a)&&(t[a]=s[a]);return l(s,"toString")&&(t.toString=s.toString),l(s,"valueOf")&&(t.valueOf=s.valueOf),t}function _(t,s,a,u){return yo(t,s,a,u,!0).utc()}function x(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function b(t){return t._pf==null&&(t._pf=x()),t._pf}var T;Array.prototype.some?T=Array.prototype.some:T=function(t){var s=Object(this),a=s.length>>>0,u;for(u=0;u<a;u++)if(u in s&&t.call(this,s[u],u,s))return!0;return!1};function F(t){if(t._isValid==null){var s=b(t),a=T.call(s.parsedDateParts,function(d){return d!=null}),u=!isNaN(t._d.getTime())&&s.overflow<0&&!s.empty&&!s.invalidEra&&!s.invalidMonth&&!s.invalidWeekday&&!s.weekdayMismatch&&!s.nullInput&&!s.invalidFormat&&!s.userInvalidated&&(!s.meridiem||s.meridiem&&a);if(t._strict&&(u=u&&s.charsLeftOver===0&&s.unusedTokens.length===0&&s.bigHour===void 0),Object.isFrozen==null||!Object.isFrozen(t))t._isValid=u;else return u}return t._isValid}function S(t){var s=_(NaN);return t!=null?w(b(s),t):b(s).userInvalidated=!0,s}var W=e.momentProperties=[],J=!1;function L(t,s){var a,u,d,p=W.length;if(f(s._isAMomentObject)||(t._isAMomentObject=s._isAMomentObject),f(s._i)||(t._i=s._i),f(s._f)||(t._f=s._f),f(s._l)||(t._l=s._l),f(s._strict)||(t._strict=s._strict),f(s._tzm)||(t._tzm=s._tzm),f(s._isUTC)||(t._isUTC=s._isUTC),f(s._offset)||(t._offset=s._offset),f(s._pf)||(t._pf=b(s)),f(s._locale)||(t._locale=s._locale),p>0)for(a=0;a<p;a++)u=W[a],d=s[u],f(d)||(t[u]=d);return t}function I(t){L(this,t),this._d=new Date(t._d!=null?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),J===!1&&(J=!0,e.updateOffset(this),J=!1)}function C(t){return t instanceof I||t!=null&&t._isAMomentObject!=null}function A(t){e.suppressDeprecationWarnings===!1&&typeof console!="undefined"&&console.warn&&console.warn("Deprecation warning: "+t)}function ee(t,s){var a=!0;return w(function(){if(e.deprecationHandler!=null&&e.deprecationHandler(null,t),a){var u=[],d,p,v,Q=arguments.length;for(p=0;p<Q;p++){if(d="",typeof arguments[p]=="object"){d+=`
[`+p+"] ";for(v in arguments[0])l(arguments[0],v)&&(d+=v+": "+arguments[0][v]+", ");d=d.slice(0,-2)}else d=arguments[p];u.push(d)}A(t+`
Arguments: `+Array.prototype.slice.call(u).join("")+`
`+new Error().stack),a=!1}return s.apply(this,arguments)},s)}var R={};function xe(t,s){e.deprecationHandler!=null&&e.deprecationHandler(t,s),R[t]||(A(s),R[t]=!0)}e.suppressDeprecationWarnings=!1,e.deprecationHandler=null;function B(t){return typeof Function!="undefined"&&t instanceof Function||Object.prototype.toString.call(t)==="[object Function]"}function j(t){var s,a;for(a in t)l(t,a)&&(s=t[a],B(s)?this[a]=s:this["_"+a]=s);this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function He(t,s){var a=w({},t),u;for(u in s)l(s,u)&&(o(t[u])&&o(s[u])?(a[u]={},w(a[u],t[u]),w(a[u],s[u])):s[u]!=null?a[u]=s[u]:delete a[u]);for(u in t)l(t,u)&&!l(s,u)&&o(t[u])&&(a[u]=w({},a[u]));return a}function he(t){t!=null&&this.set(t)}var qt;Object.keys?qt=Object.keys:qt=function(t){var s,a=[];for(s in t)l(t,s)&&a.push(s);return a};var Nl={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function Cl(t,s,a){var u=this._calendar[t]||this._calendar.sameElse;return B(u)?u.call(s,a):u}function it(t,s,a){var u=""+Math.abs(t),d=s-u.length,p=t>=0;return(p?a?"+":"":"-")+Math.pow(10,Math.max(0,d)).toString().substr(1)+u}var Ti=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,on=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Di={},Kt={};function Y(t,s,a,u){var d=u;typeof u=="string"&&(d=function(){return this[u]()}),t&&(Kt[t]=d),s&&(Kt[s[0]]=function(){return it(d.apply(this,arguments),s[1],s[2])}),a&&(Kt[a]=function(){return this.localeData().ordinal(d.apply(this,arguments),t)})}function Il(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function Bl(t){var s=t.match(Ti),a,u;for(a=0,u=s.length;a<u;a++)Kt[s[a]]?s[a]=Kt[s[a]]:s[a]=Il(s[a]);return function(d){var p="",v;for(v=0;v<u;v++)p+=B(s[v])?s[v].call(d,t):s[v];return p}}function an(t,s){return t.isValid()?(s=Gs(s,t.localeData()),Di[s]=Di[s]||Bl(s),Di[s](t)):t.localeData().invalidDate()}function Gs(t,s){var a=5;function u(d){return s.longDateFormat(d)||d}for(on.lastIndex=0;a>=0&&on.test(t);)t=t.replace(on,u),on.lastIndex=0,a-=1;return t}var Pl={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function Al(t){var s=this._longDateFormat[t],a=this._longDateFormat[t.toUpperCase()];return s||!a?s:(this._longDateFormat[t]=a.match(Ti).map(function(u){return u==="MMMM"||u==="MM"||u==="DD"||u==="dddd"?u.slice(1):u}).join(""),this._longDateFormat[t])}var Wl="Invalid date";function $l(){return this._invalidDate}var Vl="%d",jl=/\d{1,2}/;function Hl(t){return this._ordinal.replace("%d",t)}var Gl={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function zl(t,s,a,u){var d=this._relativeTime[a];return B(d)?d(t,s,a,u):d.replace(/%d/i,t)}function Zl(t,s){var a=this._relativeTime[t>0?"future":"past"];return B(a)?a(s):a.replace(/%s/i,s)}var Tr={};function De(t,s){var a=t.toLowerCase();Tr[a]=Tr[a+"s"]=Tr[s]=t}function Ge(t){return typeof t=="string"?Tr[t]||Tr[t.toLowerCase()]:void 0}function Si(t){var s={},a,u;for(u in t)l(t,u)&&(a=Ge(u),a&&(s[a]=t[u]));return s}var zs={};function Se(t,s){zs[t]=s}function Jl(t){var s=[],a;for(a in t)l(t,a)&&s.push({unit:a,priority:zs[a]});return s.sort(function(u,d){return u.priority-d.priority}),s}function ln(t){return t%4===0&&t%100!==0||t%400===0}function ze(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function $(t){var s=+t,a=0;return s!==0&&isFinite(s)&&(a=ze(s)),a}function Xt(t,s){return function(a){return a!=null?(Zs(this,t,a),e.updateOffset(this,s),this):un(this,t)}}function un(t,s){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+s]():NaN}function Zs(t,s,a){t.isValid()&&!isNaN(a)&&(s==="FullYear"&&ln(t.year())&&t.month()===1&&t.date()===29?(a=$(a),t._d["set"+(t._isUTC?"UTC":"")+s](a,t.month(),yn(a,t.month()))):t._d["set"+(t._isUTC?"UTC":"")+s](a))}function ql(t){return t=Ge(t),B(this[t])?this[t]():this}function Kl(t,s){if(typeof t=="object"){t=Si(t);var a=Jl(t),u,d=a.length;for(u=0;u<d;u++)this[a[u].unit](t[a[u].unit])}else if(t=Ge(t),B(this[t]))return this[t](s);return this}var Js=/\d/,Pe=/\d\d/,qs=/\d{3}/,Fi=/\d{4}/,cn=/[+-]?\d{6}/,le=/\d\d?/,Ks=/\d\d\d\d?/,Xs=/\d\d\d\d\d\d?/,dn=/\d{1,3}/,Ri=/\d{1,4}/,fn=/[+-]?\d{1,6}/,er=/\d+/,mn=/[+-]?\d+/,Xl=/Z|[+-]\d\d:?\d\d/gi,hn=/Z|[+-]\d\d(?::?\d\d)?/gi,eu=/[+-]?\d+(\.\d{1,3})?/,Dr=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,pn;pn={};function M(t,s,a){pn[t]=B(s)?s:function(u,d){return u&&a?a:s}}function tu(t,s){ret Line truncated
`),this.todos=[],this.lines.forEach((r,i)=>{let o=Lr.parse(i,r);o&&this.todos.push(o)})}getTodos(){return this.todos}insertTodo(e,r){r.lineIndex=e,this.lines.splice(e,0,r.toMarkdown());let i=-1;for(let o in this.todos){let l=this.todos[o];l.lineIndex>=e&&(i<0&&(i=parseInt(o)),l.lineIndex++)}i<=0?this.todos.splice(0,0,r):this.todos.splice(i,0,r)}getTodo(e){let r=this.todos.find(i=>i.lineIndex===e);return r==null?null:r}applyChanges(){this.todos.forEach(e=>{this.lines[e.lineIndex]=e.toMarkdown()})}toMarkdown(){return this.applyChanges(),this.lines.join(`
`)}};var or=class{constructor(e){this._value=e}get value(){return this._value}},Wt=class{constructor(e){this._value=e;g(this,"onChangeFunctions",[])}onChanged(e){this.onChangeFunctions.push(e)}get value(){return this._value}set value(e){let r=this._value;this._value=e,this.onChangeFunctions.forEach(i=>{i(r,e)})}};var Ze=At(Mt(),1);var G=class n{constructor(e,r){this.time=e;this._hasTimePart=r}static now(){return new n((0,Ze.default)(),!0)}static parse(e){return e.length>10?new n((0,Ze.default)(e,"YYYY-MM-DD HH:mm"),!0):new n((0,Ze.default)(e,"YYYY-MM-DD"),!1)}static duration(e,r,i,o){return r.fixedTime(o).diff(e.fixedTime(o),i)}getTimeInMillis(e){return this.fixedTime(e).valueOf()}format(e,r){return this.fixedTime(r).format(e)}toYYYYMMMM(e){return this.fixedTime(e).format("YYYY, MMMM")}toYYYYMMDD(e){return this.fixedTime(e).format("YYYY-MM-DD")}add(e,r,i){return new n(this.fixedTime(i).clone().add(e,r),this._hasTimePart)}fixedTime(e){return this._hasTimePart?this.time:e===void 0?this.time:this.time.clone().add(e.minutes,"minutes")}get hasTimePart(){return this._hasTimePart}moment(){return this.time}isValid(){return this.time.isValid()}clone(e){let r=e==null?this._hasTimePart:e,i=this.time.clone();return new n(i,r)}toString(){return this._hasTimePart?this.format("YYYY-MM-DD HH:mm"):this.format("YYYY-MM-DD")}equals(e){return this._hasTimePart===e._hasTimePart&&this.time.isSame(e.time)}},Rn=class n{constructor(e,r){this.hour=e;this.minute=r}static parse(e){if(!e.match(/^\d{1,2}:\d{1,2}$/))throw`Unexpected format time(${e}). Time must be HH:mm.`;let r=e.split(":");if(r.length!==2)throw`Unexpected format time(${e}). time must be HH:mm.`;let i=parseInt(r[0]),o=parseInt(r[1]);if(i>23||i<0)throw"hour must be 0~23";if(o>59||o<0)throw"minute must be 0~59";return new n(i,o)}get minutes(){return this.hour*60+this.minute}toString(){let e=r=>r<10?"0"+r:""+r;return`${e(this.hour)}:${e(this.minute)}`}};function lr(n,e){return()=>new G((0,Ze.default)(),!0).add(n,e)}function $o(n){return lr(n,"minutes")}function zi(n){return lr(n,"hours")}function $f(n){return lr(n,"days")}function Vf(n){return lr(n,"weeks")}function jf(n){return lr(n,"months")}function Hf(n){return lr(n,"years")}function $t(n){return()=>{let e=(0,Ze.default)();return e.isoWeekday()<=n?new G(e.isoWeekday(n),!1):new G(e.add(1,"weeks").isoWeekday(n),!1)}}function Zi(){return()=>new G((0,Ze.default)().add(1,"days"),!1)}function Vo(){return()=>new G((0,Ze.default)().add(1,"weeks"),!1)}function Gf(){return()=>new G((0,Ze.default)().add(1,"months"),!1)}function zf(){return()=>new G((0,Ze.default)().add(1,"years"),!1)}var ce=class{constructor(e,r){this.label=e;this.later=r}};function jo(n){return n.split(`
`).map(e=>Zf(e.trim()))}function Zf(n){if(n=n.toLowerCase(),n.startsWith("in")){let e=n.split(" ");if(e.length!==3)throw"Unsupported format. Should be 'In N (minutes|hours)'";let r=e[1]==="a"||e[1]==="an"?1:parseInt(e[1]);switch(e[2]){case"minute":case"minutes":{let i=r==1?"minute":"minutes";return new ce(`In ${r} ${i}`,$o(r))}case"hour":case"hours":{let i=r==1?"hour":"hours";return new ce(`In ${r} ${i}`,zi(r))}case"day":case"days":{let i=r==1?"day":"days";return new ce(`In ${r} ${i}`,$f(r))}case"week":case"weeks":{let i=r==1?"week":"weeks";return new ce(`In ${r} ${i}`,Vf(r))}case"month":case"months":{let i=r==1?"month":"months";return new ce(`In ${r} ${i}`,jf(r))}case"year":case"years":{let i=r==1?"year":"years";return new ce(`In ${r} ${i}`,Hf(r))}}}else if(n.startsWith("next")){let e=n.substring(5);switch(e){case"sunday":return new ce("Next Sunday",$t(0));case"monday":return new ce("Next Monday",$t(1));case"tuesday":return new ce("Next Tuesday",$t(2));case"wednesday":return new ce("Next Wednesday",$t(3));case"thursday":return new ce("Next Thursday",$t(4));case"friday":return new ce("Next Friday",$t(5));case"saturday":return new ce("Next Saturday",$t(6));case"day":return new ce("Tomorrow",Zi());case"week":return new ce("Next week",Vo());case"month":return new ce("Next month",Gf());case"year":return new ce("Next year",zf());default:throw`Unsupported weekday: ${e}`}}else if(n==="tomorrow")return new ce("Tomorrow",Zi());throw`Unsupported format: ${n}`}var kh=[new ce("In 30 minutes",$o(30)),new ce("In 1 hours",zi(1)),new ce("In 3 hours",zi(3)),new ce("Tomorrow",Zi()),new ce("Next week",Vo())],Ji=class{constructor(){g(this,"dateFormat",new or("YYYY-MM-DD"));g(this,"dateTimeFormat",new or("YYYY-MM-DD HH:mm"));g(this,"strict",new or(!1))}setTimeFormat(e,r,i){this.dateFormat=e,this.dateTimeFormat=r,this.strict=i}parse(e){let r=this.doParse(e,!0);return r!=null?r:this.strict.value?null:this.doParse(e,!1)}doParse(e,r){let i=(0,Ze.default)(e,this.dateTimeFormat.value,r);if(i.isValid())return new G(i,!0);let o=(0,Ze.default)(e,this.dateFormat.value,r);return o.isValid()?new G(o,!1):null}toString(e){return e.hasTimePart?e.format(this.dateTimeFormat.value):e.format(this.dateFormat.value)}},ot=new Ji;var ur=class{constructor(e,r,i,o,l){this.file=e;this.title=r;this.time=i;this.rowNumber=o;this.done=l;g(this,"muteNotification",!1);g(this,"beingDisplayed",!1)}key(){return this.file+this.title+this.time.toString()}equals(e){return this.rowNumber===e.rowNumber&&this.title===e.title&&this.time.equals(e.time)&&this.file===e.file}getFileName(){let e=this.file.split(/[/\\]/);return e[e.length-1].replace(/^(.*?)(\..+)?$/,"$1")}static extractFileName(e){let r=e.split(/[/\\]/);return r[r.length-1].replace(/^(.*?)(\..+)?$/,"$1")}},En=class{constructor(e){this.onChange=e;g(this,"fileToReminders",new Map);g(this,"reminders",[]);g(this,"reminderTime")}getExpiredReminders(e){let r=new Date().getTime(),i=[];for(let o=0;o<this.reminders.length;o++){let l=this.reminders[o];if(l.time.getTimeInMillis(e)<=r)i.push(l);else break}return i}byDate(e){return this.reminders.filter(r=>r.time.toYYYYMMDD()===e.toYYYYMMDD())}removeReminder(e){console.debug("Remove reminder: %o",e),this.reminders.remove(e);let r=this.fileToReminders.get(e.file);r&&(r.remove(e),r.length===0&&this.fileToReminders.delete(e.file)),this.onChange()}clear(){this.fileToReminders.clear(),this.reminders=[],this.onChange()}removeByFile(e){return this.fileToReminders.delete(e)?(this.sortReminders(),!0):!1}replaceFile(e,r){let i=this.fileToReminders.get(e);if(i){if(this.equals(i,r))return!1;let o=new Map;for(let l of i)o.set(l.key(),l.muteNotification);for(let l of r){let c=o.get(l.key());o.set(l.key(),l.muteNotification),c!==void 0&&(l.muteNotification=c)}}return this.fileToReminders.set(e,r),this.sortReminders(),!0}equals(e,r){if(e.length!==r.length)return!1;this.sort(e),this.sort(r);for(let i in e){let o=e[i],l=r[i];if(o==null&&l!=null||l==null&&o!=null)return!1;if(!(o==null&&l==null)&&!o.equals(l))return!1}return!0}sortReminders(){let e=[];for(let r of this.fileToReminders.values())e.push(...r);this.sort(e),this.reminders=e,this.onChange()}sort(e){e.sort((r,i)=>{var l,c;let o=r.time.getTimeInMillis((l=this.reminderTime)==null?void 0:l.value)-i.time.getTimeInMillis((c=this.reminderTime)==null?void 0:c.value);return o>0?1:o<0?-1:0})}};function Ho(n,e,r){let i=G.duration(e,n,"days",r);if(i>30)return new Ut(n.toYYYYMMMM(r),o=>o.format("MM/DD",r));if(i>=7)return new Ut("Over 1 week",o=>o.format("MM/DD",r));if(n.toYYYYMMDD(r)===e.toYYYYMMDD(r)){let o=new Ut("Today",l=>l.format("HH:mm",r));return o.isToday=!0,o}return n.toYYYYMMDD(r)===e.add(1,"days",r).toYYYYMMDD()?new Ut("Tomorrow",o=>o.format("HH:mm",r)):new Ut(n.format("M/DD (ddd)",r),o=>o.format("HH:mm",r))}var Ut=class{constructor(e,r){this.name=e;this.timeToStringFunc=r;g(this,"isToday",!1);g(this,"isOverdue",!1)}timeToString(e){return this.timeToStringFunc(e)}};function Go(n,e){let r=G.now(),i=[],o=[],l=[],c=Ho(r,r,e);for(let Line truncated
`).map(lm).filter(function(r){return r!==null});return Te(Te({},e[0]),e[1])}function Hr(n){var e={},r=/DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec(n);if(!r)return e;var i=r[1],o=r[2];return i&&(e.tzid=i),e.dtstart=Wr(o),e}function lm(n){if(n=n.replace(/^\s+|\s+$/,""),!n.length)return null;var e=/^([A-Z]+?)[:;]/.exec(n.toUpperCase());if(!e)return la(n);var r=e[1];switch(r.toUpperCase()){case"RRULE":case"EXRULE":return la(n);case"DTSTART":return Hr(n);default:throw new Error("Unsupported RFC prop ".concat(r," in ").concat(n))}}function la(n){var e=n.replace(/^RRULE:/i,""),r=Hr(e),i=n.replace(/^(?:RRULE|EXRULE):/i,"").split(";");return i.forEach(function(o){var l=o.split("="),c=l[0],f=l[1];switch(c.toUpperCase()){case"FREQ":r.freq=V[f.toUpperCase()];break;case"WKST":r.wkst=Ke[f.toUpperCase()];break;case"COUNT":case"INTERVAL":case"BYSETPOS":case"BYMONTH":case"BYMONTHDAY":case"BYYEARDAY":case"BYWEEKNO":case"BYHOUR":case"BYMINUTE":case"BYSECOND":var m=um(f),h=c.toLowerCase();r[h]=m;break;case"BYWEEKDAY":case"BYDAY":r.byweekday=cm(f);break;case"DTSTART":case"TZID":var y=Hr(n);r.tzid=y.tzid,r.dtstart=y.dtstart;break;case"UNTIL":r.until=Wr(f);break;case"BYEASTER":r.byeaster=Number(f);break;default:throw new Error("Unknown RRULE property '"+c+"'")}}),r}function um(n){if(n.indexOf(",")!==-1){var e=n.split(",");return e.map(ua)}return ua(n)}function ua(n){return/^[+-]?\d+$/.test(n)?Number(n):n}function cm(n){var e=n.split(",");return e.map(function(r){if(r.length===2)return Ke[r];var i=r.match(/^([+-]?\d{1,2})([A-Z]{2})$/);if(!i||i.length<3)throw new SyntaxError("Invalid weekday string: ".concat(r));var o=Number(i[1]),l=i[2],c=Ke[l].weekday;return new ge(c,o)})}var Gt=function(){function n(e,r){if(isNaN(e.getTime()))throw new RangeError("Invalid date passed to DateWithZone");this.date=e,this.tzid=r}return Object.defineProperty(n.prototype,"isUTC",{get:function(){return!this.tzid||this.tzid.toUpperCase()==="UTC"},enumerable:!1,configurable:!0}),n.prototype.toString=function(){var e=fr(this.date.getTime(),this.isUTC);return this.isUTC?":".concat(e):";TZID=".concat(this.tzid,":").concat(e)},n.prototype.getTime=function(){return this.date.getTime()},n.prototype.rezonedDate=function(){return this.isUTC?this.date:Xo(this.date,this.tzid)},n}();function zr(n){for(var e=[],r="",i=Object.keys(n),o=Object.keys(jr),l=0;l<i.length;l++)if(i[l]!=="tzid"&&z(o,i[l])){var c=i[l].toUpperCase(),f=n[i[l]],m="";if(!(!se(f)||ke(f)&&!f.length)){switch(c){case"FREQ":m=U.FREQUENCIES[n.freq];break;case"WKST":We(f)?m=new ge(f).toString():m=f.toString();break;case"BYWEEKDAY":c="BYDAY",m=zo(f).map(function(x){return x instanceof ge?x:ke(x)?new ge(x[0],x[1]):new ge(x)}).toString();break;case"DTSTART":r=dm(f,n.tzid);break;case"UNTIL":m=fr(f,!n.tzid);break;default:if(ke(f)){for(var h=[],y=0;y<f.length;y++)h[y]=String(f[y]);m=h.toString()}else m=String(f)}m&&e.push([c,m])}}var w=e.map(function(x){var b=x[0],T=x[1];return"".concat(b,"=").concat(T.toString())}).join(";"),_="";return w!==""&&(_="RRULE:".concat(w)),[r,_].filter(function(x){return!!x}).join(`
`)}function dm(n,e){return n?"DTSTART"+new Gt(new Date(n),e).toString():""}function fm(n,e){return Array.isArray(n)?!Array.isArray(e)||n.length!==e.length?!1:n.every(function(r,i){return r.getTime()===e[i].getTime()}):n instanceof Date?e instanceof Date&&n.getTime()===e.getTime():n===e}var ca=function(){function n(){this.all=!1,this.before=[],this.after=[],this.between=[]}return n.prototype._cacheAdd=function(e,r,i){r&&(r=r instanceof Date?$n(r):ts(r)),e==="all"?this.all=r:(i._value=r,this[e].push(i))},n.prototype._cacheGet=function(e,r){var i=!1,o=r?Object.keys(r):[],l=function(y){for(var w=0;w<o.length;w++){var _=o[w];if(!fm(r[_],y[_]))return!0}return!1},c=this[e];if(e==="all")i=this.all;else if(ke(c))for(var f=0;f<c.length;f++){var m=c[f];if(!(o.length&&l(m))){i=m._value;break}}if(!i&&this.all){for(var h=new wt(e,r),f=0;f<this.all.length&&h.accept(this.all[f]);f++);i=h.getValue(),this._cacheAdd(e,i,r)}return ke(i)?ts(i):i instanceof Date?$n(i):i},n}();var da=D(D(D(D(D(D(D(D(D(D(D(D(D([],H(1,31),!0),H(2,28),!0),H(3,31),!0),H(4,30),!0),H(5,31),!0),H(6,30),!0),H(7,31),!0),H(8,31),!0),H(9,30),!0),H(10,31),!0),H(11,30),!0),H(12,31),!0),H(1,7),!0),fa=D(D(D(D(D(D(D(D(D(D(D(D(D([],H(1,31),!0),H(2,29),!0),H(3,31),!0),H(4,30),!0),H(5,31),!0),H(6,30),!0),H(7,31),!0),H(8,31),!0),H(9,30),!0),H(10,31),!0),H(11,30),!0),H(12,31),!0),H(1,7),!0),mm=qe(1,29),hm=qe(1,30),Yt=qe(1,31),Ee=qe(1,32),ma=D(D(D(D(D(D(D(D(D(D(D(D(D([],Ee,!0),hm,!0),Ee,!0),Yt,!0),Ee,!0),Yt,!0),Ee,!0),Ee,!0),Yt,!0),Ee,!0),Yt,!0),Ee,!0),Ee.slice(0,7),!0),ha=D(D(D(D(D(D(D(D(D(D(D(D(D([],Ee,!0),mm,!0),Ee,!0),Yt,!0),Ee,!0),Yt,!0),Ee,!0),Ee,!0),Yt,!0),Ee,!0),Yt,!0),Ee,!0),Ee.slice(0,7),!0),pm=qe(-28,0),ym=qe(-29,0),Qt=qe(-30,0),Me=qe(-31,0),pa=D(D(D(D(D(D(D(D(D(D(D(D(D([],Me,!0),ym,!0),Me,!0),Qt,!0),Me,!0),Qt,!0),Me,!0),Me,!0),Qt,!0),Me,!0),Qt,!0),Me,!0),Me.slice(0,7),!0),ya=D(D(D(D(D(D(D(D(D(D(D(D(D([],Me,!0),pm,!0),Me,!0),Qt,!0),Me,!0),Qt,!0),Me,!0),Me,!0),Qt,!0),Me,!0),Qt,!0),Me,!0),Me.slice(0,7),!0),ga=[0,31,60,91,121,152,182,213,244,274,305,335,366],ba=[0,31,59,90,120,151,181,212,243,273,304,334,365],ss=function(){for(var n=[],e=0;e<55;e++)n=n.concat(qe(7));return n}();function va(n,e){var r=at(n,1,1),i=dr(n)?366:365,o=dr(n+1)?366:365,l=Ar(r),c=vt(r),f=Te(Te({yearlen:i,nextyearlen:o,yearordinal:l,yearweekday:c},gm(n)),{wnomask:null});if($e(e.byweekno))return f;f.wnomask=H(0,i+7);var m,h,y=m=Re(7-c+e.wkst,7);y>=4?(y=0,h=f.yearlen+Re(c-e.wkst,7)):h=i-y;for(var w=Math.floor(h/7),_=Re(h,7),x=Math.floor(w+_/4),b=0;b<e.byweekno.length;b++){var T=e.byweekno[b];if(T<0&&(T+=x+1),T>0&&T<=x){var F=void 0;T>1?(F=y+(T-1)*7,y!==m&&(F-=7-m)):F=y;for(var S=0;S<7&&(f.wnomask[F]=1,F++,f.wdaymask[F]!==e.wkst);S++);}}if(z(e.byweekno,1)){var F=y+x*7;if(y!==m&&(F-=7-m),F<i)for(var b=0;b<7&&(f.wnomask[F]=1,F+=1,f.wdaymask[F]!==e.wkst);b++);}if(y){var W=void 0;if(z(e.byweekno,-1))W=-1;else{var J=vt(at(n-1,1,1)),L=Re(7-J.valueOf()+e.wkst,7),I=dr(n-1)?366:365,C=void 0;L>=4?(L=0,C=I+Re(J-e.wkst,7)):C=i-y,W=Math.floor(52+Re(C,7)/4)}if(z(e.byweekno,W))for(var F=0;F<y;F++)f.wnomask[F]=1}return f}function gm(n){var e=dr(n)?366:365,r=at(n,1,1),i=vt(r);return e===365?{mmask:da,mdaymask:ha,nmdaymask:ya,wdaymask:ss.slice(i),mrange:ba}:{mmask:fa,mdaymask:ma,nmdaymask:pa,wdaymask:ss.slice(i),mrange:ga}}function _a(n,e,r,i,o,l){var c={lastyear:n,lastmonth:e,nwdaymask:[]},f=[];if(l.freq===U.YEARLY)if($e(l.bymonth))f=[[0,r]];else for(var m=0;m<l.bymonth.length;m++)e=l.bymonth[m],f.push(i.slice(e-1,e+1));else l.freq===U.MONTHLY&&(f=[i.slice(e-1,e+1)]);if($e(f))return c;c.nwdaymask=H(0,r);for(var m=0;m<f.length;m++)for(var h=f[m],y=h[0],w=h[1]-1,_=0;_<l.bynweekday.length;_++){var x=void 0,b=l.bynweekday[_],T=b[0],F=b[1];F<0?(x=w+(F+1)*7,x-=Re(o[x]-T,7)):(x=y+(F-1)*7,x+=Re(7-o[x]+T,7)),y<=x&&x<=w&&(c.nwdaymask[x]=1)}return c}function wa(n,e){e===void 0&&(e=0);var r=n%19,i=Math.floor(n/100),o=n%100,l=Math.floor(i/4),c=i%4,f=Math.floor((i+8)/25),m=Math.floor((i-f+1)/3),h=Math.floor(19*r+i-l-m+15)%30,y=Math.floor(o/4),w=o%4,_=Math.floor(32+2*c+2*y-h-w)%7,x=Math.floor((r+11*h+22*_)/451),b=Math.floor((h+_-7*x+114)/31),T=(h+_-7*x+114)%31+1,F=Date.UTC(n,b-1,T+e),S=Date.UTC(n,0,1);return[Math.ceil((F-S)/(1e3*60*60*24))]}var bm=function(){function n(e){this.options=e}return n.prototype.rebuild=function(e,r){var i=this.options;if(e!==this.lastyear&&(this.yearinfo=va(e,i)),ye(i.bynweekday)&&(r!==this.lastmonth||e!==this.lastyear)){var o=this.yearinfo,l=o.yearlen,c=o.mrange,f=o.wdaymask;this.monthinfo=_a(e,r,l,c,f,i)}se(i.byeaster)&&(this.eastermask=wa(e,i.byeaster))},Object.defineProperty(n.prototype,"lastyear",{get:function(){return this.monthinfo?this.monthinfo.lastyear:null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"lastmonth",{get:function(){return this.monthinfo?this.monthinfo.lastmonth:null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"yearlen",{get:function(){return this.yearinfo.yearlen},enumerable:!1,configurable:!0}),Object.defineProperty(n.protot Line truncated
`),i=0;i<r.length;){var o=r[i]=r[i].replace(/\s+$/g,"");o?i>0&&o[0]===" "?(r[i-1]+=o.slice(1),r.splice(i,1)):i+=1:r.splice(i,1)}return r}function Rm(n){n.forEach(function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)})}function Fa(n,e){return Rm(e),n.split(",").map(function(r){return Wr(r)})}function Ra(n){var e=this;return function(r){if(r!==void 0&&(e["_".concat(n)]=r),e["_".concat(n)]!==void 0)return e["_".concat(n)];for(var i=0;i<e._rrule.length;i++){var o=e._rrule[i].origOptions[n];if(o)return o}}}var as=function(n){mr(e,n);function e(r){r===void 0&&(r=!1);var i=n.call(this,{},r)||this;return i.dtstart=Ra.apply(i,["dtstart"]),i.tzid=Ra.apply(i,["tzid"]),i._rrule=[],i._rdate=[],i._exrule=[],i._exdate=[],i}return e.prototype._iter=function(r){return Da(r,this._rrule,this._exrule,this._rdate,this._exdate,this.tzid())},e.prototype.rrule=function(r){Ea(r,this._rrule)},e.prototype.exrule=function(r){Ea(r,this._exrule)},e.prototype.rdate=function(r){Ma(r,this._rdate)},e.prototype.exdate=function(r){Ma(r,this._exdate)},e.prototype.rrules=function(){return this._rrule.map(function(r){return jn(r.toString())})},e.prototype.exrules=function(){return this._exrule.map(function(r){return jn(r.toString())})},e.prototype.rdates=function(){return this._rdate.map(function(r){return new Date(r.getTime())})},e.prototype.exdates=function(){return this._exdate.map(function(r){return new Date(r.getTime())})},e.prototype.valueOf=function(){var r=[];return!this._rrule.length&&this._dtstart&&(r=r.concat(zr({dtstart:this._dtstart}))),this._rrule.forEach(function(i){r=r.concat(i.toString().split(`
`))}),this._exrule.forEach(function(i){r=r.concat(i.toString().split(`
`).map(function(o){return o.replace(/^RRULE:/,"EXRULE:")}).filter(function(o){return!/^DTSTART/.test(o)}))}),this._rdate.length&&r.push(Ua("RDATE",this._rdate,this.tzid())),this._exdate.length&&r.push(Ua("EXDATE",this._exdate,this.tzid())),r},e.prototype.toString=function(){return this.valueOf().join(`
`)},e.prototype.clone=function(){var r=new e(!!this._cache);return this._rrule.forEach(function(i){return r.rrule(i.clone())}),this._exrule.forEach(function(i){return r.exrule(i.clone())}),this._rdate.forEach(function(i){return r.rdate(new Date(i.getTime()))}),this._exdate.forEach(function(i){return r.exdate(new Date(i.getTime()))}),r},e}(U);function Ea(n,e){if(!(n instanceof U))throw new TypeError(String(n)+" is not RRule instance");z(e.map(String),String(n))||e.push(n)}function Ma(n,e){if(!(n instanceof Date))throw new TypeError(String(n)+" is not Date instance");z(e.map(Number),Number(n))||(e.push(n),_t(e))}function Ua(n,e,r){var i=!r||r.toUpperCase()==="UTC",o=i?"".concat(n,":"):"".concat(n,";TZID=").concat(r,":"),l=e.map(function(c){return fr(c.valueOf(),i)}).join(",");return"".concat(o).concat(l)}var rt=class n{constructor(e,r){this.primary=e;this.func=r}static ofChar(e){return new n(e,r=>r===e)}static ofChars(e){if(e.length===0)throw"empty symbol";if(e[0]==null)throw"ch mustn't be null";return e.length===0?this.ofChar(e[0]):new n(e[0],r=>e.filter(i=>r===i).length>0)}isSymbol(e){return this.func(e)}},Hn=class{constructor(e){this.tokens=e}setTokenText(e,r,i=!1,o=!1,l=!1,c){let f=this.getToken(e);if(f===null){if(!o)return null;if(e instanceof rt?f={symbol:e.primary,text:r}:f={symbol:e,text:r},l&&f.symbol!==""&&!f.text.startsWith(" ")&&(f.text=" "+f.text),this.tokens.length>0){let m=this.tokens[this.tokens.length-1];this.isTokenEndsWithSpace(m)||(m.text+=" ")}if(c==null)this.tokens.push(f);else{let m=0,h=-1,y=0;for(let w of this.tokens){let _=m+w.symbol.length+w.text.length;if(y>0&&_>c){h=y;break}m=_,y++}h==-1?this.tokens.push(f):(this.tokens.splice(h,0,f),h<this.tokens.length-1&&(f.text=f.text+" "))}return f}return this.replaceTokenText(f,r,i),f}length(){return this.tokens.length}replaceTokenText(e,r,i=!1){if(!i){e.text=r;return}e.text=e.text.replace(/^(\s*).*?(\s*)$/,`$1${r}$2`)}isTokenEndsWithSpace(e){return e.text.match(/^.*\s$/)}getToken(e){for(let r of this.tokens)if(e instanceof rt){if(e.isSymbol(r.symbol))return r}else if(e===r.symbol)return r;return null}getTokenText(e,r=!1){let i=this.getToken(e);return i===null?null:r?i.text.replace(/^\s*(.*?)\s*$/,"$1"):i.text}removeToken(e){this.tokens=this.tokens.filter(r=>!e.isSymbol(r.symbol))}forEachTokens(e){this.tokens.forEach(e)}rangeOfSymbol(e){let r=0;for(let i of this.tokens){let o=r+i.symbol.length+i.text.length;if(e.isSymbol(i.symbol))return{start:r,end:o};r=o}}join(){return this.tokens.map(e=>e.symbol+e.text).join("")}};function Oa(n,e){let r=[...n],i="",o=null,l=[],c=()=>{o===null?l.push({symbol:"",text:i}):o.text=i};return r.forEach(f=>{e.filter(h=>h.isSymbol(f)).length>0?(c(),o={symbol:f,text:""},l.push(o),i=""):i+=f}),i.length>0&&c(),l}function Em(n){return n.replace(/#\w+/g,"")}var K=class K{constructor(e,r,i,o){this.useCustomEmoji=e;this.removeTags=r;this.strictDateFormat=i;this.tokens=o}static parse(e,r,i,o){return new K(r!=null?r:!1,i!=null?i:!1,o!=null?o:!0,new Hn(Oa(e,this.allSymbols)))}getTitle(){let e=this.tokens.getTokenText("",!0);return e!=null&&this.removeTags&&(e=Em(e)),e}getTime(){return this.getDate(this.getReminderSymbol())}setTime(e,r){this.useCustomEmoji?this.setDate(this.getReminderSymbol(),e,1):this.setDate(this.getReminderSymbol(),e,r)}getDueDate(){return this.getDate(K.symbolDueDate)}setDueDate(e){this.setDate(K.symbolDueDate,e)}setRawTime(e){return this.setDate(this.getReminderSymbol(),e),!0}getReminderSymbol(){return this.useCustomEmoji?K.symbolReminder:K.symbolDueDate}getEndOfTimeTextIndex(){let e=K.symbolDueDate;this.useCustomEmoji&&(e=K.symbolReminder);let r=this.tokens.rangeOfSymbol(e);return r!=null?r.end:this.toMarkdown().length}toMarkdown(){return this.tokens.join()}setTitle(e){this.tokens.setTokenText("",e,!0,!0)}getDoneDate(){return this.getDate(K.symbolDoneDate)}setDoneDate(e){this.setDate(K.symbolDoneDate,e)}getRecurrence(){return this.tokens.getTokenText(K.symbolRecurrence,!0)}clone(){return K.parse(this.toMarkdown(),this.useCustomEmoji,this.removeTags,this.strictDateFormat)}getDate(e){let r=this.tokens.getTokenText(e,!0);if(r===null)return null;if(e===K.symbolReminder)return ot.parse(r);{let i=(0,Zr.default)(r,K.dateFormat,this.strictDateFormat);return i.isValid()?new G(i,!1):null}}setDate(e,r,i){if(r==null){this.tokens.removeToken(e);return}let o;r instanceof G?e===K.symbolReminder?o=ot.toString(r):o=r.format(K.dateFormat):o=r,this.tokens.setTokenText(e,o,!0,!0,this.shouldSplitBetweenSymbolAndText(),i)}shouldSplitBetweenSymbolAndText(){let e=0,r=0;return this.tokens.forEachTokens(i=>{i.symbol!==""&&(i.text.match(/^\s.*$/)?e+=1:r++)}),e>r?!0:!(e<r)}};g(K,"dateFormat","YYYY-MM-DD"),g(K,"symbolDueDate",rt.ofChars([..."\u{1F4C5}\u{1F4C6}\u{1F5D3}"])),g(K,"symbolDoneDate",rt.ofChar("\u2705")),g(K,"symbolRecurrence",rt.ofChar("\u{1F501}")),g(K,"symbolReminder",rt.ofChar("\u23F0")),g(K,"symbolScheduled",rt.ofChar("\u23F3")),g(K,"symbolStart",rt.ofChar("\u{1F6EB}")),g(K,"allSymbols",[K.symbolDueDate,K.symbolDon Line truncated
[${o}]`);for(let c of l)r.push(String(c));n.app.vault.adapter.write(e,r.join(" "))};console.debug=i("debug"),console.error=i("error"),console.info=i("info"),console.log=i("log"),console.warn=i("warn")}var ut="reminder-list";var li=require("obsidian");function me(){}function Om(n,e){for(let r in e)n[r]=e[r];return n}function ds(n){return n()}function qn(){return Object.create(null)}function ve(n){n.forEach(ds)}function Lt(n){return typeof n=="function"}function Ue(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}function Ha(n){return Object.keys(n).length===0}function Ga(n,e,r,i){if(n){let o=za(n,e,r,i);return n[0](o)}}function za(n,e,r,i){return n[1]&&i?Om(r.ctx.slice(),n[1](i(e))):r.ctx}function Za(n,e,r,i){if(n[2]&&i){let o=n[2](i(r));if(e.dirty===void 0)return o;if(typeof o=="object"){let l=[],c=Math.max(e.dirty.length,o.length);for(let f=0;f<c;f+=1)l[f]=e.dirty[f]|o[f];return l}return e.dirty|o}return e.dirty}function Ja(n,e,r,i,o,l){if(o){let c=za(e,r,i,l);n.p(c,o)}}function qa(n){if(n.ctx.length>32){let e=[],r=n.ctx.length/32;for(let i=0;i<r;i++)e[i]=-1;return e}return-1}var fs=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global;var Kn=class n{constructor(e){g(this,"_listeners","WeakMap"in fs?new WeakMap:void 0);g(this,"_observer");g(this,"options");this.options=e}observe(e,r){return this._listeners.set(e,r),this._getObserver().observe(e,this.options),()=>{this._listeners.delete(e),this._observer.unobserve(e)}}_getObserver(){var e;return(e=this._observer)!=null?e:this._observer=new ResizeObserver(r=>{var i;for(let o of r)n.entries.set(o.target,o),(i=this._listeners.get(o.target))==null||i(o)})}};Kn.entries="WeakMap"in fs?new WeakMap:void 0;var Ka=!1;function Xa(){Ka=!0}function el(){Ka=!1}function E(n,e){n.appendChild(e)}function te(n,e,r){n.insertBefore(e,r||null)}function X(n){n.parentNode&&n.parentNode.removeChild(n)}function nt(n,e){for(let r=0;r<n.length;r+=1)n[r]&&n[r].d(e)}function O(n){return document.createElement(n)}function Oe(n){return document.createTextNode(n)}function oe(){return Oe(" ")}function ae(n,e,r,i){return n.addEventListener(e,r,i),()=>n.removeEventListener(e,r,i)}function N(n,e,r){r==null?n.removeAttribute(e):n.getAttribute(e)!==r&&n.setAttribute(e,r)}function tl(n){return Array.from(n.childNodes)}function Ve(n,e){e=""+e,n.data!==e&&(n.data=e)}function Kr(n,e){n.value=e==null?"":e}function gr(n,e,r){for(let i=0;i<n.options.length;i+=1){let o=n.options[i];if(o.__value===e){o.selected=!0;return}}(!r||e!==void 0)&&(n.selectedIndex=-1)}function Xn(n){let e=n.querySelector(":checked");return e&&e.__value}function Xe(n,e,r){n.classList.toggle(e,!!r)}function ei(n,e,{bubbles:r=!1,cancelable:i=!1}={}){return new CustomEvent(n,{detail:e,bubbles:r,cancelable:i})}function rl(n){let e={};return n.childNodes.forEach(r=>{e[r.slot||"default"]=!0}),e}var Nt;function Tt(n){Nt=n}function ti(){if(!Nt)throw new Error("Function called outside component initialization");return Nt}function zt(n){ti().$$.on_mount.push(n)}function ms(n){ti().$$.after_update.push(n)}function Xr(){let n=ti();return(e,r,{cancelable:i=!1}={})=>{let o=n.$$.callbacks[e];if(o){let l=ei(e,r,{cancelable:i});return o.slice().forEach(c=>{c.call(n,l)}),!l.defaultPrevented}return!0}}var Zt=[];var Ce=[],vr=[],ps=[],nl=Promise.resolve(),ys=!1;function gs(){ys||(ys=!0,nl.then(ri))}function bs(){return gs(),nl}function Dt(n){vr.push(n)}function vs(n){ps.push(n)}var hs=new Set,br=0;function ri(){if(br!==0)return;let n=Nt;do{try{for(;br<Zt.length;){let e=Zt[br];br++,Tt(e),Pm(e.$$)}}catch(e){throw Zt.length=0,br=0,e}for(Tt(null),Zt.length=0,br=0;Ce.length;)Ce.pop()();for(let e=0;e<vr.length;e+=1){let r=vr[e];hs.has(r)||(hs.add(r),r())}vr.length=0}while(Zt.length);for(;ps.length;)ps.pop()();ys=!1,hs.clear(),Tt(n)}function Pm(n){if(n.fragment!==null){n.update(),ve(n.before_update);let e=n.dirty;n.dirty=[-1],n.fragment&&n.fragment.p(n.ctx,e),n.after_update.forEach(Dt)}}function il(n){let e=[],r=[];vr.forEach(i=>n.indexOf(i)===-1?e.push(i):r.push(i)),r.forEach(i=>i()),vr=e}var ni=new Set,Jt;function _r(){Jt={r:0,c:[],p:Jt}}function wr(){Jt.r||ve(Jt.c),Jt=Jt.p}function ie(n,e){n&&n.i&&(ni.delete(n),n.i(e))}function fe(n,e,r,i){if(n&&n.o){if(ni.has(n))return;ni.add(n),Jt.c.push(()=>{ni.delete(n),i&&(r&&n.d(1),i())}),n.o(e)}else i&&i()}function _e(n){return(n==null?void 0:n.length)!==void 0?n:Array.from(n)}var Am=["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"],Wm=new Set([...Am]);function ws(n,e,r){let i=n.$$.props[e];i!==void 0&&(n.$$.bound[i]=r,r(n.$$.ctx[i]))}function je(n){n&&n.c()}function Ie(n,e,r){let{fragment:i,after_update:o}=n.$$;i&&i.m(e,r),Dt(()=>{let l=n.$$.on_mount.map(ds).filter(Lt);n.$$.on_destroy?n.$$.on_destroy.push(...l):ve(l),n.$$.on_mount=[] Line truncated
Sun Mon Tue Wed Thu Fri Sat
`;return this._current.weeks.forEach(r=>{let i=" ";r.days.forEach(o=>{let l;o.date&&this._current.isThisMonth(o.date)?l=o.date.format("DD"):l=" ",i=i+l+" "}),e=e+i+`
`}),e}get current(){return this._current}};var xr=class{constructor(){g(this,"digits",[]);g(this,"lastInput",0)}handle(e){let r=new Date().getTime();return r-this.lastInput>1e3&&this.clear(),this.lastInput=r,this.digits.push(e),this.digits.join("")}clear(){this.digits=[]}};var eh=n=>({}),ml=n=>({});function hl(n,e,r){let i=n.slice();return i[22]=e[r],i}function pl(n,e,r){let i=n.slice();return i[25]=e[r],i}function yl(n){let e,r,i=n[25].date.format("D")+"",o,l,c;function f(){return n[14](n[25])}function m(){return n[15](n[25])}return{c(){e=O("td"),r=O("button"),o=Oe(i),N(r,"tabindex","-1"),N(r,"class","calendar-date svelte-kmxndl"),Xe(r,"is-selected",n[25].isToday(n[0])),Xe(r,"other-month",!n[3].current.isThisMonth(n[25].date)),Xe(r,"is-holiday",n[25].isHoliday()),Xe(r,"is-past",n[25].date.isBefore(n[3].today))},m(h,y){te(h,e,y),E(e,r),E(r,o),l||(c=[ae(r,"click",f),ae(r,"dblclick",m)],l=!0)},p(h,y){n=h,y&8&&i!==(i=n[25].date.format("D")+"")&&Ve(o,i),y&9&&Xe(r,"is-selected",n[25].isToday(n[0])),y&8&&Xe(r,"other-month",!n[3].current.isThisMonth(n[25].date)),y&8&&Xe(r,"is-holiday",n[25].isHoliday()),y&8&&Xe(r,"is-past",n[25].date.isBefore(n[3].today))},d(h){h&&X(e),l=!1,ve(c)}}}function gl(n){let e,r,i=_e(n[22].days),o=[];for(let l=0;l<i.length;l+=1)o[l]=yl(pl(n,i,l));return{c(){e=O("tr");for(let l=0;l<o.length;l+=1)o[l].c();r=oe()},m(l,c){te(l,e,c);for(let f=0;f<o.length;f+=1)o[f]&&o[f].m(e,null);E(e,r)},p(l,c){if(c&105){i=_e(l[22].days);let f;for(f=0;f<i.length;f+=1){let m=pl(l,i,f);o[f]?o[f].p(m,c):(o[f]=yl(m),o[f].c(),o[f].m(e,r))}for(;f<o.length;f+=1)o[f].d(1);o.length=i.length}},d(l){l&&X(e),nt(o,l)}}}function th(n){let e,r,i,o,l,c=n[3].current.monthStart.format("MMM")+"",f,m,h,y=n[3].current.monthStart.format("YYYY")+"",w,_,x,b,T,F,S,W,J,L,I,C,A,ee=_e(n[3].current.weeks),R=[];for(let j=0;j<ee.length;j+=1)R[j]=gl(hl(n,ee,j));let xe=n[11].footer,B=Ga(xe,n,n[10],ml);return{c(){e=O("div"),r=O("div"),i=O("button"),i.textContent="<",o=oe(),l=O("span"),f=Oe(c),m=oe(),h=O("span"),w=Oe(y),_=oe(),x=O("button"),x.textContent=">",b=oe(),T=O("table"),F=O("thead"),F.innerHTML='<tr><th class="svelte-kmxndl">SUN</th> <th class="svelte-kmxndl">MON</th> <th class="svelte-kmxndl">TUE</th> <th class="svelte-kmxndl">WED</th> <th class="svelte-kmxndl">THU</th> <th class="svelte-kmxndl">FRI</th> <th class="svelte-kmxndl">SAT</th></tr>',S=oe(),W=O("tbody");for(let j=0;j<R.length;j+=1)R[j].c();J=oe(),L=O("div"),B&&B.c(),N(i,"tabindex","-1"),N(i,"class","month-nav svelte-kmxndl"),N(l,"class","month svelte-kmxndl"),N(h,"class","year svelte-kmxndl"),N(x,"tabindex","-1"),N(x,"class","month-nav svelte-kmxndl"),N(r,"class","year-month svelte-kmxndl"),N(L,"class","footer"),N(e,"class","reminder-calendar svelte-kmxndl"),N(e,"tabindex","0"),N(e,"role","grid")},m(j,He){te(j,e,He),E(e,r),E(r,i),E(r,o),E(r,l),E(l,f),E(r,m),E(r,h),E(h,w),E(r,_),E(r,x),E(e,b),E(e,T),E(T,F),E(T,S),E(T,W);for(let he=0;he<R.length;he+=1)R[he]&&R[he].m(W,null);n[16](T),E(e,J),E(e,L),B&&B.m(L,null),n[17](L),I=!0,C||(A=[ae(i,"click",n[12]),ae(x,"click",n[13]),ae(e,"focus",n[18]),ae(e,"blur",n[19]),ae(e,"keydown",n[9])],C=!0)},p(j,[He]){if((!I||He&8)&&c!==(c=j[3].current.monthStart.format("MMM")+"")&&Ve(f,c),(!I||He&8)&&y!==(y=j[3].current.monthStart.format("YYYY")+"")&&Ve(w,y),He&105){ee=_e(j[3].current.weeks);let he;for(he=0;he<ee.length;he+=1){let qt=hl(j,ee,he);R[he]?R[he].p(qt,He):(R[he]=gl(qt),R[he].c(),R[he].m(W,null))}for(;he<R.length;he+=1)R[he].d(1);R.length=ee.length}B&&B.p&&(!I||He&1024)&&Ja(B,xe,j,j[10],I?Za(xe,j[10],He,eh):qa(j[10]),ml)},i(j){I||(ie(B,j),I=!0)},o(j){fe(B,j),I=!1},d(j){j&&X(e),nt(R,j),n[16](null),B&&B.d(j),n[17](null),C=!1,ve(A)}}}function rh(n,e,r){let i,{$$slots:o={},$$scope:l}=e,{value:c=(0,Fs.default)()}=e,f=Xr(),m,h;function y(R){r(0,c=R)}function w(R){r(0,c=R),b()}function _(){r(0,c=c.add(-1,"month"))}function x(){r(0,c=c.add(1,"month"))}function b(){f("select",c)}let T=new xr;function F(R){if(R.key>="0"&&R.key<="9"){R.preventDefault();let xe=T.handle(R.key);switch(xe.length){case 1:{let B=parseInt(xe);B>0&&r(0,c=c.set("date",B));break}case 2:xe.startsWith("0")&&(xe=xe.slice(1)),r(0,c=c.set("date",parseInt(xe)));break;case 4:{let B=xe.slice(0,2),j=xe.slice(2,4);B.startsWith("0")&&(B=B.slice(1)),j.startsWith("0")&&(j=j.slice(1)),r(0,c=c.set("month",parseInt(B)-1)),r(0,c=c.set("date",parseInt(j)))}break}return}T.clear(),R.key==="ArrowLeft"||R.ctrlKey&&R.key==="B"?(r(0,c=c.add(-1,"day")),R.preventDefault()):R.key==="ArrowRight"||R.ctrlKey&&R.key==="F"?(r(0,c=c.add(1,"day")),R.preventDefault()):R.key==="ArrowUp"||R.ctrlKey&&R.key==="P"?r(0,c=c.add(-7,"day")):R.key==="ArrowDown"||R.ctrlKey&&R.key==="N"?(r(0,c=c.add(7,"day")),R.preventDefault()):R.key==="Enter"&&(b(),R.preventDefault())}zt(()=>{r(2,h.style.width=m.clientWidth+"px",h)});let S=()=>_(),W=()=>x(),J=R=>y(R.date),L=R=>w(R.date);function I(R){Ce[R?"unshift":"push"](()=>{m=R,r(1,m)})}function C(R){Ce[R?"unshift":"push"](()=>{h=R,r(2,h)})}let A=()=>{f("focus")},ee=()=>{f("blur Line truncated
`)}},wi=class{unmarshal(e){return qr.find(i=>i.name===e)}marshal(e){return e.name}};var ct="re-scan",xi=class{constructor(){g(this,"settings",new bi);g(this,"reminderTime");g(this,"reminderTimeStep");g(this,"useSystemNotification");g(this,"laters");g(this,"dateFormat");g(this,"dateTimeFormat");g(this,"strictDateFormat");g(this,"autoCompleteTrigger");g(this,"primaryFormat");g(this,"useCustomEmojiForTasksPlugin");g(this,"removeTagsForTasksPlugin");g(this,"linkDatesToDailyNotes");g(this,"editDetectionSec");g(this,"reminderCheckIntervalSec");let e=new Hs(this.settings);this.reminderTime=this.settings.newSettingBuilder().key("reminderTime").name("Reminder Time").desc("Time when a reminder with no time part will show").tag(ct).text("09:00").placeHolder("Time (hh:mm)").build(new vi),this.reminderTimeStep=this.settings.newSettingBuilder().key("reminderTimeStep").name("Reminder Time Step (minutes)").desc("Step of time for reminder time (minutes)").number(15).build(new Ne),this.useSystemNotification=this.settings.newSettingBuilder().key("useSystemNotification").name("Use system notification").desc("Use system notification for reminder notifications").toggle(!1).build(new Ne),this.laters=this.settings.newSettingBuilder().key("laters").name("Remind me later").desc("Line-separated list of remind me later items").textArea(`In 30 minutes
In 1 hour
In 3 hours
Tomorrow
Next week`).placeHolder(`In 30 minutes
In 1 hour
In 3 hours
Tomorrow
Next week`).build(new _i),this.dateFormat=this.settings.newSettingBuilder().key("dateFormat").name("Date format").desc("moment style date format: https://momentjs.com/docs/#/displaying/format/").tag(ct).text("YYYY-MM-DD").placeHolder("YYYY-MM-DD").onAnyValueChanged(o=>{o.setEnabled(e.enableReminderPluginReminderFormat.value)}).build(new Ne),this.strictDateFormat=this.settings.newSettingBuilder().key("strictDateFormat").name("Strict Date format").desc("Strictly parse the date and time").tag(ct).toggle(!1).build(new Ne),this.dateTimeFormat=this.settings.newSettingBuilder().key("dateTimeFormat").name("Date and time format").desc("moment() style date time format: https://momentjs.com/docs/#/displaying/format/").tag(ct).text("YYYY-MM-DD HH:mm").placeHolder("YYYY-MM-DD HH:mm").onAnyValueChanged(o=>{o.setEnabled(e.enableReminderPluginReminderFormat.value)}).build(new Ne),this.linkDatesToDailyNotes=this.settings.newSettingBuilder().key("linkDatesToDailyNotes").name("Link dates to daily notes").desc("When toggled, Dates link to daily notes.").tag(ct).toggle(!1).onAnyValueChanged(o=>{o.setEnabled(e.enableReminderPluginReminderFormat.value)}).build(new Ne),this.autoCompleteTrigger=this.settings.newSettingBuilder().key("autoCompleteTrigger").name("Calendar popup trigger").desc("Trigger text to show calendar popup").text("(@").placeHolder("(@").onAnyValueChanged(o=>{let l=this.autoCompleteTrigger.value;o.setInfo(`Popup is ${l.length===0?"disabled":"enabled"}`)}).build(new Ne);let r=this.settings.newSettingBuilder().key("primaryReminderFormat").name("Primary reminder format").desc("Reminder format for generated reminder by calendar popup").dropdown(qr[0].name);qr.forEach(o=>r.addOption(`${o.description} - ${o.example}`,o.name)),this.primaryFormat=r.build(new wi),this.useCustomEmojiForTasksPlugin=this.settings.newSettingBuilder().key("useCustomEmojiForTasksPlugin").name("Distinguish between reminder date and due date").desc("Use custom emoji \u23F0 instead of \u{1F4C5} and distinguish between reminder date/time and Tasks Plugin's due date.").tag(ct).toggle(!1).onAnyValueChanged(o=>{o.setEnabled(e.enableTasksPluginReminderFormat.value)}).build(new Ne),this.removeTagsForTasksPlugin=this.settings.newSettingBuilder().key("removeTagsForTasksPlugin").name("Remove tags from reminder title").desc("If checked, tags(#xxx) are removed from the reminder list view and notification.").tag(ct).toggle(!1).onAnyValueChanged(o=>{o.setEnabled(e.enableTasksPluginReminderFormat.value)}).build(new Ne),this.editDetectionSec=this.settings.newSettingBuilder().key("editDetectionSec").name("Edit Detection Time").desc("The minimum amount of time (in seconds) after a key is typed that it will be identified as notifiable.").number(10).build(new Ne),this.reminderCheckIntervalSec=this.settings.newSettingBuilder().key("reminderCheckIntervalSec").name("Reminder check interval").desc("Interval(in seconds) to periodically check whether or not you should be notified of reminders. You will need to restart Obsidian for this setting to take effect.").number(5).build(new Ne),this.settings.newGroup("Notification Settings").addSettings(this.reminderTime,this.reminderTimeStep,this.laters,this.useSystemNotification),this.settings.newGroup("Editor").addSettings(this.autoCompleteTrigger,this.primaryFormat),this.settings.newGroup("Reminder Format - Reminder Plugin").addSettings(e.enableReminderPluginReminderFormat,this.dateFormat,this.dateTimeFormat,this.strictDateFormat,this.linkDatesToDailyNotes),this.settings.newGroup("Reminder Format - Tasks Plugin").addSettings(e.enableTasksPluginReminderFormat,this.useCustomEmojiForTasksPlugin,this.removeTagsForTasksPlugin),this.settings.newGroup("Reminder Format - Kanban Plugin").addSettings(e.enableKanbanPluginReminderFormat),this.settings.newGroup("Advanced").addSettings(this.editDetectionSec,this.reminderCheckIntervalSec);let i=new Ir;i.setParameterFunc(Le.now,()=>G.now()),i.setParameter(Le.useCustomEmojiForTasksPlugin,this.useCustomEmojiForTasksPlugin),i.setParameter(Le.linkDatesToDailyNotes,this.linkDatesToDailyNotes),i.setParameter(Le.removeTagsForTasksPlugin,this.removeTagsForTasksPlugin),Na(i)}forEach(e){this.settings.forEach(e)}},Hs=class{constructor(e){this.settings=e;g(this,"settingKeyToFormatName",new Map);g(this,"reminderFormatSettings",[]);g(this,"enableReminderPluginReminderFormat");g(this,"enableTasksPluginReminderFormat");g(this,"enableKanbanPluginReminderFormat");this.enableReminderPluginReminderFormat=this.createUseReminderFormatSetting(ls),this.enableTasksPluginReminderFormat=this.createUseReminderFormatSetting(us),this.enableKanbanPluginReminderFormat=this.createUseReminderFormatSetting(cs)}createUseReminderFormatSetting(e){let r=`enable${e.name}`,i=this.settings.newSettingBuilder().key(r).name(`Enable ${e.description}`).desc(`Enable ${e.description}`).tag(ct).toggle(e.defaultEnabled).onAnyValueChanged(o=>{var l;o.setInfo(`Example: ${(l=e.format.appendReminder("- [ ] Task 1",G.now()))==null?void 0:l.insertLine truncated
/*! Bundled license information:
moment/moment.js:
(*! moment.js *)
(*! version : 2.29.4 *)
(*! authors : Tim Wood, Iskren Chernev, Moment.js contributors *)
(*! license : MIT *)
(*! momentjs.com *)
*/
/* nosourcemap */