diff --git a/ObsidianRnDVault/.obsidian/plugins/metadata-menu/data.json b/ObsidianRnDVault/.obsidian/plugins/metadata-menu/data.json index 026706f..aed9a3b 100644 --- a/ObsidianRnDVault/.obsidian/plugins/metadata-menu/data.json +++ b/ObsidianRnDVault/.obsidian/plugins/metadata-menu/data.json @@ -18,5 +18,5 @@ "enableSearch": false, "buttonIcon": "clipboard-list", "tableViewMaxRecords": 100, - "frontmatterListDisplay": "asArray" + "frontmatterListDisplay": "asList" } \ No newline at end of file diff --git a/ObsidianRnDVault/.obsidian/plugins/metaedit/data.json b/ObsidianRnDVault/.obsidian/plugins/metaedit/data.json new file mode 100644 index 0000000..e95f9d8 --- /dev/null +++ b/ObsidianRnDVault/.obsidian/plugins/metaedit/data.json @@ -0,0 +1,38 @@ +{ + "ProgressProperties": { + "enabled": true, + "properties": [ + { + "name": "numberOfTasks", + "type": "Total Tasks" + }, + { + "name": "numberOfCompletedTasks", + "type": "Completed Tasks" + }, + { + "name": "numberOfNotCompletedTasks", + "type": "Incomplete Tasks" + } + ] + }, + "IgnoredProperties": { + "enabled": false, + "properties": [] + }, + "AutoProperties": { + "enabled": false, + "properties": [] + }, + "EditMode": { + "mode": "Some Multi", + "properties": [] + }, + "KanbanHelper": { + "enabled": false, + "boards": [] + }, + "UIElements": { + "enabled": true + } +} \ No newline at end of file diff --git a/ObsidianRnDVault/.obsidian/plugins/metaedit/manifest.json b/ObsidianRnDVault/.obsidian/plugins/metaedit/manifest.json new file mode 100644 index 0000000..a04a992 --- /dev/null +++ b/ObsidianRnDVault/.obsidian/plugins/metaedit/manifest.json @@ -0,0 +1,10 @@ +{ + "id": "metaedit", + "name": "MetaEdit", + "version": "1.8.2", + "minAppVersion": "1.4.1", + "description": "MetaEdit helps you manage your metadata.", + "author": "Christian B. B. Houmann", + "authorUrl": "https://bagerbach.com", + "isDesktopOnly": false +} \ No newline at end of file diff --git a/ObsidianRnDVault/.obsidian/plugins/obsidian-admonition/manifest.json b/ObsidianRnDVault/.obsidian/plugins/obsidian-admonition/manifest.json new file mode 100644 index 0000000..7539707 --- /dev/null +++ b/ObsidianRnDVault/.obsidian/plugins/obsidian-admonition/manifest.json @@ -0,0 +1,10 @@ +{ + "id": "obsidian-admonition", + "name": "Admonition", + "version": "10.1.1", + "minAppVersion": "1.1.0", + "description": "Enhanced callouts for Obsidian.md", + "author": "Jeremy Valentine", + "authorUrl": "", + "isDesktopOnly": false +} diff --git a/ObsidianRnDVault/.obsidian/plugins/obsidian-charts/data.json b/ObsidianRnDVault/.obsidian/plugins/obsidian-charts/data.json new file mode 100644 index 0000000..568a1c5 --- /dev/null +++ b/ObsidianRnDVault/.obsidian/plugins/obsidian-charts/data.json @@ -0,0 +1,16 @@ +{ + "colors": [ + "rgba(255, 99, 132, 1)", + "rgba(54, 162, 235, 1)", + "rgba(255, 206, 86, 1)", + "rgba(75, 192, 192, 1)", + "rgba(153, 102, 255, 1)", + "rgba(255, 159, 64, 1)" + ], + "contextMenu": true, + "imageSettings": { + "format": "image/webp", + "quality": 0.92 + }, + "themeable": false +} \ No newline at end of file diff --git a/ObsidianRnDVault/.obsidian/plugins/obsidian-charts/manifest.json b/ObsidianRnDVault/.obsidian/plugins/obsidian-charts/manifest.json new file mode 100644 index 0000000..440e27b --- /dev/null +++ b/ObsidianRnDVault/.obsidian/plugins/obsidian-charts/manifest.json @@ -0,0 +1,11 @@ +{ + "id": "obsidian-charts", + "name": "Obsidian Charts", + "version": "3.7.2", + "minAppVersion": "0.12.7", + "description": "This Plugin lets you create Charts within Obsidian", + "author": "phibr0", + "authorUrl": "https://github.com/phibr0", + "isDesktopOnly": false, + "fundingUrl": "https://ko-fi.com/phibr0" +} diff --git a/ObsidianRnDVault/.obsidian/plugins/obsidian-custom-file-extensions-plugin/data.json b/ObsidianRnDVault/.obsidian/plugins/obsidian-custom-file-extensions-plugin/data.json index 8805e62..904c97a 100644 --- a/ObsidianRnDVault/.obsidian/plugins/obsidian-custom-file-extensions-plugin/data.json +++ b/ObsidianRnDVault/.obsidian/plugins/obsidian-custom-file-extensions-plugin/data.json @@ -2,6 +2,7 @@ "additionalFileTypes": { "markdown": [ "", + "js", "mjs", "py", "json" diff --git a/ObsidianRnDVault/.obsidian/plugins/obsidian-linter/data.json b/ObsidianRnDVault/.obsidian/plugins/obsidian-linter/data.json index eb7d78b..5560fdd 100644 --- a/ObsidianRnDVault/.obsidian/plugins/obsidian-linter/data.json +++ b/ObsidianRnDVault/.obsidian/plugins/obsidian-linter/data.json @@ -62,8 +62,8 @@ "capitalize-headings": { "enabled": true, "style": "First letter", - "ignore-case-words": false, - "ignore-words": "macOS, iOS, iPhone, iPad, JavaScript, TypeScript, AppleScript, I", + "ignore-case-words": true, + "ignore-words": "macOS, iOS, iPhone, iPad, JavaScript, TypeScript, AppleScript, I, HTML, API", "lowercase-words": "a, an, the, aboard, about, abt., above, abreast, absent, across, after, against, along, aloft, alongside, amid, amidst, mid, midst, among, amongst, anti, apropos, around, round, as, aslant, astride, at, atop, ontop, bar, barring, before, B4, behind, below, beneath, neath, beside, besides, between, 'tween, beyond, but, by, chez, circa, c., ca., come, concerning, contra, counting, cum, despite, spite, down, during, effective, ere, except, excepting, excluding, failing, following, for, from, in, including, inside, into, less, like, minus, modulo, mod, near, nearer, nearest, next, notwithstanding, of, o', off, offshore, on, onto, opposite, out, outside, over, o'er, pace, past, pending, per, plus, post, pre, pro, qua, re, regarding, respecting, sans, save, saving, short, since, sub, than, through, thru, throughout, thruout, till, times, to, t', touching, toward, towards, under, underneath, unlike, until, unto, up, upon, versus, vs., v., via, vice, vis-à-vis, wanting, with, w/, w., c̄, within, w/i, without, 'thout, w/o, abroad, adrift, aft, afterward, afterwards, ahead, apart, ashore, aside, away, back, backward, backwards, beforehand, downhill, downstage, downstairs, downstream, downward, downwards, downwind, east, eastward, eastwards, forth, forward, forwards, heavenward, heavenwards, hence, henceforth, here, hereby, herein, hereof, hereto, herewith, home, homeward, homewards, indoors, inward, inwards, leftward, leftwards, north, northeast, northward, northwards, northwest, now, onward, onwards, outdoors, outward, outwards, overboard, overhead, overland, overseas, rightward, rightwards, seaward, seawards, skywards, skyward, south, southeast, southwards, southward, southwest, then, thence, thenceforth, there, thereby, therein, thereof, thereto, therewith, together, underfoot, underground, uphill, upstage, upstairs, upstream, upward, upwards, upwind, west, westward, westwards, when, whence, where, whereby, wherein, whereto, wherewith, although, because, considering, given, granted, if, lest, once, provided, providing, seeing, so, supposing, though, unless, whenever, whereas, wherever, while, whilst, ago, according to, as regards, counter to, instead of, owing to, pertaining to, at the behest of, at the expense of, at the hands of, at risk of, at the risk of, at variance with, by dint of, by means of, by virtue of, by way of, for the sake of, for sake of, for lack of, for want of, from want of, in accordance with, in addition to, in case of, in charge of, in compliance with, in conformity with, in contact with, in exchange for, in favor of, in front of, in lieu of, in light of, in the light of, in line with, in place of, in point of, in quest of, in relation to, in regard to, with regard to, in respect to, with respect to, in return for, in search of, in step with, in touch with, in terms of, in the name of, in view of, on account of, on behalf of, on grounds of, on the grounds of, on the part of, on top of, with a view to, with the exception of, à la, a la, as soon as, as well as, close to, due to, far from, in case, other than, prior to, pursuant to, regardless of, subsequent to, as long as, as much as, as far as, by the time, in as much as, inasmuch, in order to, in order that, even, provide that, if only, whether, whose, whoever, why, how, or not, whatever, what, both, and, or, not only, but also, either, neither, nor, just, rather, no sooner, such, that, yet, is, it" }, "file-name-heading": { @@ -95,7 +95,7 @@ }, "blockquote-style": { "enabled": true, - "style": "space" + "style": "no space" }, "convert-bullet-list-markers": { "enabled": true @@ -220,7 +220,7 @@ "enabled": true }, "proper-ellipsis-on-paste": { - "enabled": true + "enabled": false }, "remove-hyphens-on-paste": { "enabled": true diff --git a/ObsidianRnDVault/.obsidian/plugins/obsidian-minimal-settings/manifest.json b/ObsidianRnDVault/.obsidian/plugins/obsidian-minimal-settings/manifest.json index 0fe1cd9..f0ccbe1 100644 --- a/ObsidianRnDVault/.obsidian/plugins/obsidian-minimal-settings/manifest.json +++ b/ObsidianRnDVault/.obsidian/plugins/obsidian-minimal-settings/manifest.json @@ -1,7 +1,7 @@ { "id": "obsidian-minimal-settings", "name": "Minimal Theme Settings", - "version": "7.2.2", + "version": "7.2.4", "minAppVersion": "1.1.9", "description": "Change the colors, fonts and features of Minimal Theme.", "author": "@kepano", diff --git a/ObsidianRnDVault/.obsidian/plugins/obsidian-style-settings/data.json b/ObsidianRnDVault/.obsidian/plugins/obsidian-style-settings/data.json index 6242cbe..a840ac0 100644 --- a/ObsidianRnDVault/.obsidian/plugins/obsidian-style-settings/data.json +++ b/ObsidianRnDVault/.obsidian/plugins/obsidian-style-settings/data.json @@ -6,5 +6,6 @@ "minimal-style@@icon-muted": 0.5, "minimal-style@@sidebar-lines-off": false, "minimal-style@@sidebar-tabs-style": "sidebar-tabs-index", - "minimal-style@@embed-strict": true + "minimal-style@@embed-strict": true, + "minimal-style@@active-line-on": true } \ No newline at end of file diff --git a/ObsidianRnDVault/.obsidian/plugins/obsidian-tagfolder/manifest.json b/ObsidianRnDVault/.obsidian/plugins/obsidian-tagfolder/manifest.json index 5d55518..77bedfc 100644 --- a/ObsidianRnDVault/.obsidian/plugins/obsidian-tagfolder/manifest.json +++ b/ObsidianRnDVault/.obsidian/plugins/obsidian-tagfolder/manifest.json @@ -1,10 +1,10 @@ { "id": "obsidian-tagfolder", "name": "TagFolder", - "version": "0.18.0", + "version": "0.18.1", "minAppVersion": "0.12.0", "description": "Show tags as folder", "author": "vorotamoroz", "authorUrl": "https://github.com/vrtmrz", "isDesktopOnly": false -} +} \ No newline at end of file diff --git a/ObsidianRnDVault/.obsidian/plugins/obsidian-tasks-plugin/main.js b/ObsidianRnDVault/.obsidian/plugins/obsidian-tasks-plugin/main.js deleted file mode 100644 index f5d90b5..0000000 --- a/ObsidianRnDVault/.obsidian/plugins/obsidian-tasks-plugin/main.js +++ /dev/null @@ -1,279 +0,0 @@ -/* -THIS IS A GENERATED/BUNDLED FILE BY ESBUILD -if you want to view the source visit the plugins github repository -*/ - -/* -License obsidian-tasks: -MIT License - -Copyright (c) 2021 Martin Schenck and Clare Macrae - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -/* -License rrule (included library): -rrule.js: Library for working with recurrence rules for calendar dates. -======================================================================= - -Copyright 2010, Jakub Roztocil and Lars Schöning - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - 3. Neither the name of The author nor the names of its contributors may - be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE AUTHOR AND CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - - -./rrule.js and ./test/tests.js is based on python-dateutil. LICENCE: - -python-dateutil - Extensions to the standard Python datetime module. -==================================================================== - -Copyright (c) 2003-2011 - Gustavo Niemeyer -Copyright (c) 2012 - Tomi Pieviläinen - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/* -License chrono-node (included library): -The MIT License - -Copyright (c) 2014, Wanasit Tanakitrungruang - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -"use strict";var M_=Object.create;var Xi=Object.defineProperty,x_=Object.defineProperties,A_=Object.getOwnPropertyDescriptor,C_=Object.getOwnPropertyDescriptors,P_=Object.getOwnPropertyNames,Up=Object.getOwnPropertySymbols,N_=Object.getPrototypeOf,qp=Object.prototype.hasOwnProperty,I_=Object.prototype.propertyIsEnumerable;var Wp=(r,e,t)=>e in r?Xi(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,pe=(r,e)=>{for(var t in e||(e={}))qp.call(e,t)&&Wp(r,t,e[t]);if(Up)for(var t of Up(e))I_.call(e,t)&&Wp(r,t,e[t]);return r},Tt=(r,e)=>x_(r,C_(e));var b=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),F_=(r,e)=>{for(var t in e)Xi(r,t,{get:e[t],enumerable:!0})},$p=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of P_(e))!qp.call(r,i)&&i!==t&&Xi(r,i,{get:()=>e[i],enumerable:!(n=A_(e,i))||n.enumerable});return r};var Zi=(r,e,t)=>(t=r!=null?M_(N_(r)):{},$p(e||!r||!r.__esModule?Xi(t,"default",{value:r,enumerable:!0}):t,r)),L_=r=>$p(Xi({},"__esModule",{value:!0}),r);var q=(r,e,t)=>new Promise((n,i)=>{var s=u=>{try{o(t.next(u))}catch(l){i(l)}},a=u=>{try{o(t.throw(u))}catch(l){i(l)}},o=u=>u.done?n(u.value):Promise.resolve(u.value).then(s,a);o((t=t.apply(r,e)).next())});var Ee=b(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.matchAnyPattern=Xr.extractTerms=Xr.repeatedTimeunitPattern=void 0;function $_(r,e){let t=e.replace(/\((?!\?)/g,"(?:");return`${r}${t}\\s{0,5}(?:,?\\s{0,5}${t}){0,10}`}Xr.repeatedTimeunitPattern=$_;function Yp(r){let e;return r instanceof Array?e=[...r]:r instanceof Map?e=Array.from(r.keys()):e=Object.keys(r),e}Xr.extractTerms=Yp;function Y_(r){return`(?:${Yp(r).sort((t,n)=>n.length-t.length).join("|").replace(/\./g,"\\.")})`}Xr.matchAnyPattern=Y_});var Te=b((Iu,Fu)=>{(function(r,e){typeof Iu=="object"&&typeof Fu!="undefined"?Fu.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs=e()})(Iu,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",p="year",h="date",_="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={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("_")},P=function(B,A,E){var H=String(B);return!H||H.length>=A?B:""+Array(A+1-H.length).join(E)+B},N={s:P,z:function(B){var A=-B.utcOffset(),E=Math.abs(A),H=Math.floor(E/60),C=E%60;return(A<=0?"+":"-")+P(H,2,"0")+":"+P(C,2,"0")},m:function B(A,E){if(A.date(){"use strict";var j_=Zr&&Zr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Zr,"__esModule",{value:!0});Zr.findYearClosestToRef=Zr.findMostLikelyADYear=void 0;var G_=j_(Te());function B_(r){return r<100&&(r>50?r=r+1900:r=r+2e3),r}Zr.findMostLikelyADYear=B_;function H_(r,e,t){let n=G_.default(r),i=n;i=i.month(t-1),i=i.date(e),i=i.year(n.year());let s=i.add(1,"y"),a=i.add(-1,"y");return Math.abs(s.diff(n)){"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.parseTimeUnits=ne.TIME_UNITS_PATTERN=ne.parseYear=ne.YEAR_PATTERN=ne.parseOrdinalNumberPattern=ne.ORDINAL_NUMBER_PATTERN=ne.parseNumberPattern=ne.NUMBER_PATTERN=ne.TIME_UNIT_DICTIONARY=ne.ORDINAL_WORD_DICTIONARY=ne.INTEGER_WORD_DICTIONARY=ne.MONTH_DICTIONARY=ne.FULL_MONTH_NAME_DICTIONARY=ne.WEEKDAY_DICTIONARY=void 0;var Ia=Ee(),z_=rt();ne.WEEKDAY_DICTIONARY={sunday:0,sun:0,"sun.":0,monday:1,mon:1,"mon.":1,tuesday:2,tue:2,"tue.":2,wednesday:3,wed:3,"wed.":3,thursday:4,thurs:4,"thurs.":4,thur:4,"thur.":4,thu:4,"thu.":4,friday:5,fri:5,"fri.":5,saturday:6,sat:6,"sat.":6};ne.FULL_MONTH_NAME_DICTIONARY={january:1,february:2,march:3,april:4,may:5,june:6,july:7,august:8,september:9,october:10,november:11,december:12};ne.MONTH_DICTIONARY=Object.assign(Object.assign({},ne.FULL_MONTH_NAME_DICTIONARY),{jan:1,"jan.":1,feb:2,"feb.":2,mar:3,"mar.":3,apr:4,"apr.":4,jun:6,"jun.":6,jul:7,"jul.":7,aug:8,"aug.":8,sep:9,"sep.":9,sept:9,"sept.":9,oct:10,"oct.":10,nov:11,"nov.":11,dec:12,"dec.":12});ne.INTEGER_WORD_DICTIONARY={one:1,two:2,three:3,four:4,five:5,six:6,seven:7,eight:8,nine:9,ten:10,eleven:11,twelve:12};ne.ORDINAL_WORD_DICTIONARY={first:1,second:2,third:3,fourth:4,fifth:5,sixth:6,seventh:7,eighth:8,ninth:9,tenth:10,eleventh:11,twelfth:12,thirteenth:13,fourteenth:14,fifteenth:15,sixteenth:16,seventeenth:17,eighteenth:18,nineteenth:19,twentieth:20,"twenty first":21,"twenty-first":21,"twenty second":22,"twenty-second":22,"twenty third":23,"twenty-third":23,"twenty fourth":24,"twenty-fourth":24,"twenty fifth":25,"twenty-fifth":25,"twenty sixth":26,"twenty-sixth":26,"twenty seventh":27,"twenty-seventh":27,"twenty eighth":28,"twenty-eighth":28,"twenty ninth":29,"twenty-ninth":29,thirtieth:30,"thirty first":31,"thirty-first":31};ne.TIME_UNIT_DICTIONARY={sec:"second",second:"second",seconds:"second",min:"minute",mins:"minute",minute:"minute",minutes:"minute",h:"hour",hr:"hour",hrs:"hour",hour:"hour",hours:"hour",day:"d",days:"d",week:"week",weeks:"week",month:"month",months:"month",qtr:"quarter",quarter:"quarter",quarters:"quarter",y:"year",yr:"year",year:"year",years:"year"};ne.NUMBER_PATTERN=`(?:${Ia.matchAnyPattern(ne.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s{0,2}an?)?|an?\\b(?:\\s{0,2}few)?|few|several|a?\\s{0,2}couple\\s{0,2}(?:of)?)`;function Gp(r){let e=r.toLowerCase();return ne.INTEGER_WORD_DICTIONARY[e]!==void 0?ne.INTEGER_WORD_DICTIONARY[e]:e==="a"||e==="an"?1:e.match(/few/)?3:e.match(/half/)?.5:e.match(/couple/)?2:e.match(/several/)?7:parseFloat(e)}ne.parseNumberPattern=Gp;ne.ORDINAL_NUMBER_PATTERN=`(?:${Ia.matchAnyPattern(ne.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:st|nd|rd|th)?)`;function K_(r){let e=r.toLowerCase();return ne.ORDINAL_WORD_DICTIONARY[e]!==void 0?ne.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}ne.parseOrdinalNumberPattern=K_;ne.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s{0,2}(?:BE|AD|BC|BCE|CE)|[1-2][0-9]{3}|[5-9][0-9])";function V_(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 z_.findMostLikelyADYear(e)}ne.parseYear=V_;var Bp=`(${ne.NUMBER_PATTERN})\\s{0,3}(${Ia.matchAnyPattern(ne.TIME_UNIT_DICTIONARY)})`,jp=new RegExp(Bp,"i");ne.TIME_UNITS_PATTERN=Ia.repeatedTimeunitPattern("(?:(?:about|around)\\s{0,3})?",Bp);function Q_(r){let e={},t=r,n=jp.exec(t);for(;n;)X_(e,n),t=t.substring(n[0].length).trim(),n=jp.exec(t);return e}ne.parseTimeUnits=Q_;function X_(r,e){let t=Gp(e[1]),n=ne.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Hp=b((Lu,Uu)=>{(function(r,e){typeof Lu=="object"&&typeof Uu!="undefined"?Uu.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs_plugin_quarterOfYear=e()})(Lu,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 p=this.quarter()-1;return c?this.month(3*p).startOf(r).startOf("day"):this.month(3*p+2).endOf(r).endOf("day")}return a.bind(this)(o,u)}}})});var $t=b(pr=>{"use strict";Object.defineProperty(pr,"__esModule",{value:!0});pr.implySimilarTime=pr.assignSimilarTime=pr.assignSimilarDate=pr.assignTheNextDay=void 0;var zp=je();function Z_(r,e){e=e.add(1,"day"),Kp(r,e),Vp(r,e)}pr.assignTheNextDay=Z_;function Kp(r,e){r.assign("day",e.date()),r.assign("month",e.month()+1),r.assign("year",e.year())}pr.assignSimilarDate=Kp;function J_(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",zp.Meridiem.AM):r.assign("meridiem",zp.Meridiem.PM)}pr.assignSimilarTime=J_;function Vp(r,e){r.imply("hour",e.hour()),r.imply("minute",e.minute()),r.imply("second",e.second()),r.imply("millisecond",e.millisecond())}pr.implySimilarTime=Vp});var Qp=b(Tn=>{"use strict";Object.defineProperty(Tn,"__esModule",{value:!0});Tn.toTimezoneOffset=Tn.TIMEZONE_ABBR_MAP=void 0;Tn.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 ev(r){var e;return r==null?null:typeof r=="number"?r:(e=Tn.TIMEZONE_ABBR_MAP[r])!==null&&e!==void 0?e:null}Tn.toTimezoneOffset=ev});var Pe=b(hr=>{"use strict";var Xp=hr&&hr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(hr,"__esModule",{value:!0});hr.ParsingResult=hr.ParsingComponents=hr.ReferenceWithTimezone=void 0;var tv=Xp(Hp()),Fa=Xp(Te()),Wu=$t(),rv=Qp();Fa.default.extend(tv.default);var qu=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=rv.toTimezoneOffset(e.timezone))}};hr.ReferenceWithTimezone=qu;var bn=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=Fa.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 bn(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 Fa.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=Fa.default(e.instant);for(let s in t)n=n.add(t[s],s);let i=new bn(e);return t.hour||t.minute||t.second?(Wu.assignSimilarTime(i,n),Wu.assignSimilarDate(i,n),e.timezoneOffset!==null&&i.assign("timezoneOffset",-e.instant.getTimezoneOffset())):(Wu.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}};hr.ParsingComponents=bn;var Ji=class{constructor(e,t,n,i,s){this.reference=e,this.refDate=e.instant,this.index=t,this.text=n,this.start=i||new bn(e),this.end=s}clone(){let e=new Ji(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}', ...}]`}};hr.ParsingResult=Ji});var W=b(La=>{"use strict";Object.defineProperty(La,"__esModule",{value:!0});La.AbstractParserWithWordBoundaryChecking=void 0;var $u=class{constructor(){this.cachedInnerPattern=null,this.cachedPattern=null}patternLeftBoundary(){return"(\\W|^)"}pattern(e){let t=this.innerPattern(e);return t==this.cachedInnerPattern?this.cachedPattern:(this.cachedPattern=new RegExp(`${this.patternLeftBoundary()}${t.source}`,t.flags),this.cachedInnerPattern=t,this.cachedPattern)}extract(e,t){var n;let i=(n=t[1])!==null&&n!==void 0?n:"";t.index=t.index+i.length,t[0]=t[0].substring(i.length);for(let s=2;s{"use strict";Object.defineProperty(Gu,"__esModule",{value:!0});var ju=nt(),nv=Pe(),iv=W(),sv=new RegExp(`(?:within|in|for)\\s*(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${ju.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),av=new RegExp(`(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${ju.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Yu=class extends iv.AbstractParserWithWordBoundaryChecking{innerPattern(e){return e.option.forwardDate?av:sv}innerExtract(e,t){let n=ju.parseTimeUnits(t[1]);return nv.ParsingComponents.createRelativeFromReference(e.reference,n)}};Gu.default=Yu});var ih=b(Hu=>{"use strict";Object.defineProperty(Hu,"__esModule",{value:!0});var ov=rt(),rh=nt(),nh=nt(),Ua=nt(),uv=Ee(),lv=W(),cv=new RegExp(`(?:on\\s{0,3})?(${Ua.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:to|\\-|\\\u2013|until|through|till)?\\s{0,3}(${Ua.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s{0,3}(?:of)?\\s{0,3})(${uv.matchAnyPattern(rh.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s{0,3})(${nh.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Jp=1,eh=2,dv=3,th=4,Bu=class extends lv.AbstractParserWithWordBoundaryChecking{innerPattern(){return cv}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=rh.MONTH_DICTIONARY[t[dv].toLowerCase()],s=Ua.parseOrdinalNumberPattern(t[Jp]);if(s>31)return t.index=t.index+t[Jp].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[th]){let a=nh.parseYear(t[th]);n.start.assign("year",a)}else{let a=ov.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[eh]){let a=Ua.parseOrdinalNumberPattern(t[eh]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Hu.default=Bu});var lh=b(Ku=>{"use strict";Object.defineProperty(Ku,"__esModule",{value:!0});var fv=rt(),oh=nt(),Wa=nt(),uh=nt(),pv=Ee(),hv=W(),mv=new RegExp(`(${pv.matchAnyPattern(oh.MONTH_DICTIONARY)})(?:-|/|\\s*,?\\s*)(${Wa.ORDINAL_NUMBER_PATTERN})(?!\\s*(?:am|pm))\\s*(?:(?:to|\\-)\\s*(${Wa.ORDINAL_NUMBER_PATTERN})\\s*)?(?:(?:-|/|\\s*,?\\s*)(${uh.YEAR_PATTERN}))?(?=\\W|$)(?!\\:\\d)`,"i"),gv=1,yv=2,sh=3,ah=4,zu=class extends hv.AbstractParserWithWordBoundaryChecking{innerPattern(){return mv}innerExtract(e,t){let n=oh.MONTH_DICTIONARY[t[gv].toLowerCase()],i=Wa.parseOrdinalNumberPattern(t[yv]);if(i>31)return null;let s=e.createParsingComponents({day:i,month:n});if(t[ah]){let u=uh.parseYear(t[ah]);s.assign("year",u)}else{let u=fv.findYearClosestToRef(e.refDate,i,n);s.imply("year",u)}if(!t[sh])return s;let a=Wa.parseOrdinalNumberPattern(t[sh]),o=e.createParsingResult(t.index,t[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",a),o}};Ku.default=zu});var fh=b(Xu=>{"use strict";Object.defineProperty(Xu,"__esModule",{value:!0});var Vu=nt(),Tv=rt(),bv=Ee(),dh=nt(),_v=W(),vv=new RegExp(`((?:in)\\s*)?(${bv.matchAnyPattern(Vu.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${dh.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),Ev=1,wv=2,ch=3,Qu=class extends _v.AbstractParserWithWordBoundaryChecking{innerPattern(){return vv}innerExtract(e,t){let n=t[wv].toLowerCase();if(t[0].length<=3&&!Vu.FULL_MONTH_NAME_DICTIONARY[n])return null;let i=e.createParsingResult(t.index+(t[Ev]||"").length,t.index+t[0].length);i.start.imply("day",1);let s=Vu.MONTH_DICTIONARY[n];if(i.start.assign("month",s),t[ch]){let a=dh.parseYear(t[ch]);i.start.assign("year",a)}else{let a=Tv.findYearClosestToRef(e.refDate,1,s);i.start.imply("year",a)}return i}};Xu.default=Qu});var mh=b(Ju=>{"use strict";Object.defineProperty(Ju,"__esModule",{value:!0});var hh=nt(),kv=Ee(),Ov=W(),Sv=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${kv.matchAnyPattern(hh.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),Dv=1,Rv=2,ph=3,Mv=4,Zu=class extends Ov.AbstractParserWithWordBoundaryChecking{innerPattern(){return Sv}innerExtract(e,t){let n=t[ph]?parseInt(t[ph]):hh.MONTH_DICTIONARY[t[Rv].toLowerCase()];if(n<1||n>12)return null;let i=parseInt(t[Dv]);return{day:parseInt(t[Mv]),month:n,year:i}}};Ju.default=Zu});var gh=b(tl=>{"use strict";Object.defineProperty(tl,"__esModule",{value:!0});var xv=W(),Av=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),Cv=1,Pv=2,el=class extends xv.AbstractParserWithWordBoundaryChecking{innerPattern(){return Av}innerExtract(e,t){let n=parseInt(t[Pv]),i=parseInt(t[Cv]);return e.createParsingComponents().imply("day",1).assign("month",i).assign("year",n)}};tl.default=el});var _n=b(Ya=>{"use strict";Object.defineProperty(Ya,"__esModule",{value:!0});Ya.AbstractTimeExpressionParser=void 0;var bt=je();function Nv(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 Iv(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 yh=2,Jn=3,qa=4,$a=5,es=6,rl=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[yh]);if(o>100){if(this.strictMode||t[Jn]!=null)return null;s=o%100,o=Math.floor(o/100)}if(o>24)return null;if(t[Jn]!=null){if(t[Jn].length==1&&!t[es])return null;s=parseInt(t[Jn])}if(s>=60)return null;if(o>12&&(a=bt.Meridiem.PM),t[es]!=null){if(o>12)return null;let u=t[es][0].toLowerCase();u=="a"&&(a=bt.Meridiem.AM,o==12&&(o=0)),u=="p"&&(a=bt.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",bt.Meridiem.AM):i.imply("meridiem",bt.Meridiem.PM),t[$a]!=null){let u=parseInt(t[$a].substring(0,3));if(u>=1e3)return null;i.assign("millisecond",u)}if(t[qa]!=null){let u=parseInt(t[qa]);if(u>=60)return null;i.assign("second",u)}return i}extractFollowingTimeComponents(e,t,n){let i=e.createParsingComponents();if(t[$a]!=null){let u=parseInt(t[$a].substring(0,3));if(u>=1e3)return null;i.assign("millisecond",u)}if(t[qa]!=null){let u=parseInt(t[qa]);if(u>=60)return null;i.assign("second",u)}let s=parseInt(t[yh]),a=0,o=-1;if(t[Jn]!=null?a=parseInt(t[Jn]):s>100&&(a=s%100,s=Math.floor(s/100)),a>=60||s>24)return null;if(s>=12&&(o=bt.Meridiem.PM),t[es]!=null){if(s>12)return null;let u=t[es][0].toLowerCase();u=="a"&&(o=bt.Meridiem.AM,s==12&&(s=0,i.isCertain("day")||i.imply("day",i.get("day")+1))),u=="p"&&(o=bt.Meridiem.PM,s!=12&&(s+=12)),n.start.isCertain("meridiem")||(o==bt.Meridiem.AM?(n.start.imply("meridiem",bt.Meridiem.AM),n.start.get("hour")==12&&n.start.assign("hour",0)):(n.start.imply("meridiem",bt.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",bt.Meridiem.AM):s<=12&&(i.assign("hour",s+12),i.assign("meridiem",bt.Meridiem.PM)):s>12?i.imply("meridiem",bt.Meridiem.PM):s<=12&&i.imply("meridiem",bt.Meridiem.AM),i.date().getTime()24)return null}return e}checkAndReturnWithFollowingPattern(e){if(e.text.match(/^\d+-\d+$/))return null;let t=e.text.match(/[^\d:.](\d[\d.]+)\s*-\s*(\d[\d.]+)$/);if(t){if(this.strictMode)return null;let n=t[1],i=t[2];if(i.includes(".")&&!i.match(/\d(\.\d{2})+$/))return null;let s=parseInt(i),a=parseInt(n);if(s>24||a>24)return null}return e}getPrimaryTimePatternThroughCache(){let e=this.primaryPrefix(),t=this.primarySuffix();return this.cachedPrimaryPrefix===e&&this.cachedPrimarySuffix===t?this.cachedPrimaryTimePattern:(this.cachedPrimaryTimePattern=Nv(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=Iv(e,t),this.cachedFollowingPhase=e,this.cachedFollowingSuffix=t,this.cachedFollowingTimePatten)}};Ya.AbstractTimeExpressionParser=rl});var Th=b(il=>{"use strict";Object.defineProperty(il,"__esModule",{value:!0});var ja=je(),Fv=_n(),nl=class extends Fv.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",ja.Meridiem.PM)):i<6&&n.assign("meridiem",ja.Meridiem.AM)}if(t[0].endsWith("afternoon")){n.assign("meridiem",ja.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",ja.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};il.default=nl});var Yt=b(ei=>{"use strict";Object.defineProperty(ei,"__esModule",{value:!0});ei.addImpliedTimeUnits=ei.reverseTimeUnits=void 0;function Lv(r){let e={};for(let t in r)e[t]=-r[t];return e}ei.reverseTimeUnits=Lv;function Uv(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}ei.addImpliedTimeUnits=Uv});var bh=b(ol=>{"use strict";Object.defineProperty(ol,"__esModule",{value:!0});var al=nt(),Wv=Pe(),qv=W(),$v=Yt(),Yv=new RegExp(`(${al.TIME_UNITS_PATTERN})\\s{0,5}(?:ago|before|earlier)(?=(?:\\W|$))`,"i"),jv=new RegExp(`(${al.TIME_UNITS_PATTERN})\\s{0,5}ago(?=(?:\\W|$))`,"i"),sl=class extends qv.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?jv:Yv}innerExtract(e,t){let n=al.parseTimeUnits(t[1]),i=$v.reverseTimeUnits(n);return Wv.ParsingComponents.createRelativeFromReference(e.reference,i)}};ol.default=sl});var _h=b(cl=>{"use strict";Object.defineProperty(cl,"__esModule",{value:!0});var ll=nt(),Gv=Pe(),Bv=W(),Hv=new RegExp(`(${ll.TIME_UNITS_PATTERN})\\s{0,5}(?:later|after|from now|henceforth|forward|out)(?=(?:\\W|$))`,"i"),zv=new RegExp("("+ll.TIME_UNITS_PATTERN+")(later|from now)(?=(?:\\W|$))","i"),Kv=1,ul=class extends Bv.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?zv:Hv}innerExtract(e,t){let n=ll.parseTimeUnits(t[Kv]);return Gv.ParsingComponents.createRelativeFromReference(e.reference,n)}};cl.default=ul});var ri=b(ti=>{"use strict";Object.defineProperty(ti,"__esModule",{value:!0});ti.MergingRefiner=ti.Filter=void 0;var dl=class{refine(e,t){return t.filter(n=>this.isValid(e,n))}};ti.Filter=dl;var fl=class{refine(e,t){if(t.length<2)return t;let n=[],i=t[0],s=null;for(let a=1;a{console.log(`${this.constructor.name} merged ${u} and ${l} into ${c}`)}),i=c}}return i!=null&&n.push(i),n}};ti.MergingRefiner=fl});var mr=b(hl=>{"use strict";Object.defineProperty(hl,"__esModule",{value:!0});var Vv=ri(),pl=class extends Vv.MergingRefiner{shouldMergeResults(e,t,n){return!t.end&&!n.end&&e.match(this.patternBetween())!=null}mergeResults(e,t,n){if(!t.start.isOnlyWeekdayComponent()&&!n.start.isOnlyWeekdayComponent()&&(n.start.getCertainComponents().forEach(s=>{t.start.isCertain(s)||t.start.assign(s,n.start.get(s))}),t.start.getCertainComponents().forEach(s=>{n.start.isCertain(s)||n.start.assign(s,t.start.get(s))})),t.start.date().getTime()>n.start.date().getTime()){let s=t.start.dayjs(),a=n.start.dayjs();t.start.isOnlyWeekdayComponent()&&s.add(-7,"days").isBefore(a)?(s=s.add(-7,"days"),t.start.imply("day",s.date()),t.start.imply("month",s.month()+1),t.start.imply("year",s.year())):n.start.isOnlyWeekdayComponent()&&a.add(7,"days").isAfter(s)?(a=a.add(7,"days"),n.start.imply("day",a.date()),n.start.imply("month",a.month()+1),n.start.imply("year",a.year())):[n,t]=[t,n]}let i=t.clone();return i.start=t.start,i.end=n.start,i.index=Math.min(t.index,n.index),t.index{"use strict";var Qv=ts&&ts.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ts,"__esModule",{value:!0});var Xv=Qv(mr()),ml=class extends Xv.default{patternBetween(){return/^\s*(to|-)\s*$/i}};ts.default=ml});var Eh=b(ni=>{"use strict";Object.defineProperty(ni,"__esModule",{value:!0});ni.mergeDateTimeComponent=ni.mergeDateTimeResult=void 0;var Zv=je();function Jv(r,e){let t=r.clone(),n=r.start,i=e.start;if(t.start=gl(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=gl(s,a);r.end==null&&o.date().getTime(){"use strict";Object.defineProperty(Tl,"__esModule",{value:!0});var eE=ri(),wh=Eh(),yl=class extends eE.MergingRefiner{shouldMergeResults(e,t,n){return(t.start.isOnlyDate()&&n.start.isOnlyTime()||n.start.isOnlyDate()&&t.start.isOnlyTime())&&e.match(this.patternBetween())!=null}mergeResults(e,t,n){let i=t.start.isOnlyDate()?wh.mergeDateTimeResult(t,n):wh.mergeDateTimeResult(n,t);return i.index=t.index,i.text=t.text+e+n.text,i}};Tl.default=yl});var kh=b(rs=>{"use strict";var tE=rs&&rs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(rs,"__esModule",{value:!0});var rE=tE(Mr()),bl=class extends rE.default{patternBetween(){return new RegExp("^\\s*(T|at|after|before|on|of|,|-)?\\s*$")}};rs.default=bl});var Oh=b(vl=>{"use strict";Object.defineProperty(vl,"__esModule",{value:!0});var nE=new RegExp("^\\s*,?\\s*\\(?([A-Z]{2,4})\\)?(?=\\W|$)","i"),iE={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},_l=class{constructor(e){this.timezone=Object.assign(Object.assign({},iE),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=nE.exec(u);if(!l)return;let c=l[1].toUpperCase(),p=(o=(a=i[c])!==null&&a!==void 0?a:this.timezone[c])!==null&&o!==void 0?o:null;if(p===null)return;e.debug(()=>{console.log(`Extracting timezone: '${c}' into: ${p} for: ${s.start}`)});let h=s.start.get("timezoneOffset");h!==null&&p!=h&&(s.start.isCertain("timezoneOffset")||c!=l[1])||s.start.isOnlyDate()&&c!=l[1]||(s.text+=l[0],s.start.isCertain("timezoneOffset")||s.start.assign("timezoneOffset",p),s.end!=null&&!s.end.isCertain("timezoneOffset")&&s.end.assign("timezoneOffset",p))}),t}};vl.default=_l});var Ga=b(wl=>{"use strict";Object.defineProperty(wl,"__esModule",{value:!0});var sE=new RegExp("^\\s*(?:\\(?(?:GMT|UTC)\\s?)?([+-])(\\d{1,2})(?::?(\\d{2}))?\\)?","i"),aE=1,oE=2,uE=3,El=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=sE.exec(i);if(!s)return;e.debug(()=>{console.log(`Extracting timezone: '${s[0]}' into : ${n}`)});let a=parseInt(s[oE]),o=parseInt(s[uE]||"0"),u=a*60+o;u>14*60||(s[aE]==="-"&&(u=-u),n.end!=null&&n.end.assign("timezoneOffset",u),n.start.assign("timezoneOffset",u),n.text+=s[0])}),t}};wl.default=El});var Sh=b(Ol=>{"use strict";Object.defineProperty(Ol,"__esModule",{value:!0});var kl=class{refine(e,t){if(t.length<2)return t;let n=[],i=t[0];for(let s=1;si.text.length&&(i=a):(n.push(i),i=a)}return i!=null&&n.push(i),n}};Ol.default=kl});var Dh=b(ns=>{"use strict";var lE=ns&&ns.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ns,"__esModule",{value:!0});var cE=lE(Te()),Sl=class{refine(e,t){return e.option.forwardDate&&t.forEach(function(n){let i=cE.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}};ns.default=Sl});var Rh=b(Rl=>{"use strict";Object.defineProperty(Rl,"__esModule",{value:!0});var dE=ri(),Dl=class extends dE.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}};Rl.default=Dl});var Al=b(xl=>{"use strict";Object.defineProperty(xl,"__esModule",{value:!0});var fE=W(),pE=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"),hE=1,mE=2,gE=3,Mh=4,yE=5,xh=6,Ah=7,Ch=8,Ph=9,Ml=class extends fE.AbstractParserWithWordBoundaryChecking{innerPattern(){return pE}innerExtract(e,t){let n={};if(n.year=parseInt(t[hE]),n.month=parseInt(t[mE]),n.day=parseInt(t[gE]),t[Mh]!=null)if(n.hour=parseInt(t[Mh]),n.minute=parseInt(t[yE]),t[xh]!=null&&(n.second=parseInt(t[xh])),t[Ah]!=null&&(n.millisecond=parseInt(t[Ah])),t[Ch]==null)n.timezoneOffset=0;else{let i=parseInt(t[Ch]),s=0;t[Ph]!=null&&(s=parseInt(t[Ph]));let a=i*60;a<0?a-=s:a+=s,n.timezoneOffset=a}return n}};xl.default=Ml});var Nh=b(Pl=>{"use strict";Object.defineProperty(Pl,"__esModule",{value:!0});var TE=ri(),Cl=class extends TE.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}};Pl.default=Cl});var xr=b(ii=>{"use strict";var vn=ii&&ii.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ii,"__esModule",{value:!0});ii.includeCommonConfiguration=void 0;var bE=vn(Oh()),_E=vn(Ga()),Ih=vn(Sh()),vE=vn(Dh()),EE=vn(Rh()),wE=vn(Al()),kE=vn(Nh());function OE(r,e=!1){return r.parsers.unshift(new wE.default),r.refiners.unshift(new kE.default),r.refiners.unshift(new bE.default),r.refiners.unshift(new _E.default),r.refiners.unshift(new Ih.default),r.refiners.push(new Ih.default),r.refiners.push(new vE.default),r.refiners.push(new EE.default(e)),r}ii.includeCommonConfiguration=OE});var Cr=b(_e=>{"use strict";var SE=_e&&_e.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(_e,"__esModule",{value:!0});_e.noon=_e.morning=_e.midnight=_e.yesterdayEvening=_e.evening=_e.lastNight=_e.tonight=_e.theDayAfter=_e.tomorrow=_e.theDayBefore=_e.yesterday=_e.today=_e.now=void 0;var gr=Pe(),si=SE(Te()),Ar=$t(),is=je();function DE(r){let e=si.default(r.instant),t=new gr.ParsingComponents(r,{});return Ar.assignSimilarDate(t,e),Ar.assignSimilarTime(t,e),r.timezoneOffset!==null&&t.assign("timezoneOffset",e.utcOffset()),t}_e.now=DE;function RE(r){let e=si.default(r.instant),t=new gr.ParsingComponents(r,{});return Ar.assignSimilarDate(t,e),Ar.implySimilarTime(t,e),t}_e.today=RE;function ME(r){return Fh(r,1)}_e.yesterday=ME;function Fh(r,e){return Nl(r,-e)}_e.theDayBefore=Fh;function xE(r){return Nl(r,1)}_e.tomorrow=xE;function Nl(r,e){let t=si.default(r.instant),n=new gr.ParsingComponents(r,{});return t=t.add(e,"day"),Ar.assignSimilarDate(n,t),Ar.implySimilarTime(n,t),n}_e.theDayAfter=Nl;function AE(r,e=22){let t=si.default(r.instant),n=new gr.ParsingComponents(r,{});return n.imply("hour",e),n.imply("meridiem",is.Meridiem.PM),Ar.assignSimilarDate(n,t),n}_e.tonight=AE;function CE(r,e=0){let t=si.default(r.instant),n=new gr.ParsingComponents(r,{});return t.hour()<6&&(t=t.add(-1,"day")),Ar.assignSimilarDate(n,t),n.imply("hour",e),n}_e.lastNight=CE;function PE(r,e=20){let t=new gr.ParsingComponents(r,{});return t.imply("meridiem",is.Meridiem.PM),t.imply("hour",e),t}_e.evening=PE;function NE(r,e=20){let t=si.default(r.instant),n=new gr.ParsingComponents(r,{});return t=t.add(-1,"day"),Ar.assignSimilarDate(n,t),n.imply("hour",e),n.imply("meridiem",is.Meridiem.PM),n}_e.yesterdayEvening=NE;function IE(r){let e=new gr.ParsingComponents(r,{});return e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e}_e.midnight=IE;function FE(r,e=6){let t=new gr.ParsingComponents(r,{});return t.imply("meridiem",is.Meridiem.AM),t.imply("hour",e),t}_e.morning=FE;function LE(r){let e=new gr.ParsingComponents(r,{});return e.imply("meridiem",is.Meridiem.AM),e.imply("hour",12),e}_e.noon=LE});var Lh=b(er=>{"use strict";var UE=er&&er.__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]}),WE=er&&er.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),qE=er&&er.__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)&&UE(e,r,t);return WE(e,r),e},$E=er&&er.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(er,"__esModule",{value:!0});var YE=$E(Te()),jE=W(),GE=$t(),ss=qE(Cr()),BE=/(now|today|tonight|tomorrow|tmr|tmrw|yesterday|last\s*night)(?=\W|$)/i,Il=class extends jE.AbstractParserWithWordBoundaryChecking{innerPattern(e){return BE}innerExtract(e,t){let n=YE.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();switch(i){case"now":return ss.now(e.reference);case"today":return ss.today(e.reference);case"yesterday":return ss.yesterday(e.reference);case"tomorrow":case"tmr":case"tmrw":return ss.tomorrow(e.reference);case"tonight":return ss.tonight(e.reference);default:i.match(/last\s*night/)&&(n.hour()>6&&(n=n.add(-1,"day")),GE.assignSimilarDate(s,n),s.imply("hour",0));break}return s}};er.default=Il});var Uh=b(as=>{"use strict";var HE=as&&as.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(as,"__esModule",{value:!0});var Ba=je(),zE=W(),KE=HE(Te()),VE=$t(),QE=/(?:this)?\s{0,3}(morning|afternoon|evening|night|midnight|noon)(?=\W|$)/i,Fl=class extends zE.AbstractParserWithWordBoundaryChecking{innerPattern(){return QE}innerExtract(e,t){let n=KE.default(e.refDate),i=e.createParsingComponents();switch(t[1].toLowerCase()){case"afternoon":i.imply("meridiem",Ba.Meridiem.PM),i.imply("hour",15);break;case"evening":case"night":i.imply("meridiem",Ba.Meridiem.PM),i.imply("hour",20);break;case"midnight":VE.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"morning":i.imply("meridiem",Ba.Meridiem.AM),i.imply("hour",6);break;case"noon":i.imply("meridiem",Ba.Meridiem.AM),i.imply("hour",12);break}return i}};as.default=Fl});var En=b(Jr=>{"use strict";var XE=Jr&&Jr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Jr,"__esModule",{value:!0});Jr.toDayJSClosestWeekday=Jr.toDayJSWeekday=void 0;var Wh=XE(Te());function ZE(r,e,t){if(!t)return qh(r,e);let n=Wh.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}Jr.toDayJSWeekday=ZE;function qh(r,e){let t=Wh.default(r),n=t.day();return Math.abs(e-7-n){"use strict";Object.defineProperty(Ul,"__esModule",{value:!0});var $h=nt(),JE=Ee(),ew=W(),tw=En(),rw=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:on\\s*?)?(?:(this|last|past|next)\\s*)?(${JE.matchAnyPattern($h.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(this|last|past|next)\\s*week)?(?=\\W|$)`,"i"),nw=1,iw=2,sw=3,Ll=class extends ew.AbstractParserWithWordBoundaryChecking{innerPattern(){return rw}innerExtract(e,t){let n=t[iw].toLowerCase(),i=$h.WEEKDAY_DICTIONARY[n],s=t[nw],a=t[sw],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=tw.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Ul.default=Ll});var Bh=b(os=>{"use strict";var aw=os&&os.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(os,"__esModule",{value:!0});var Gh=nt(),jh=Pe(),ow=aw(Te()),uw=W(),lw=Ee(),cw=new RegExp(`(this|last|past|next|after\\s*this)\\s*(${lw.matchAnyPattern(Gh.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),dw=1,fw=2,Wl=class extends uw.AbstractParserWithWordBoundaryChecking{innerPattern(){return cw}innerExtract(e,t){let n=t[dw].toLowerCase(),i=t[fw].toLowerCase(),s=Gh.TIME_UNIT_DICTIONARY[i];if(n=="next"||n.startsWith("after")){let u={};return u[s]=1,jh.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="last"||n=="past"){let u={};return u[s]=-1,jh.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=ow.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}};os.default=Wl});var tr=b(ui=>{"use strict";Object.defineProperty(ui,"__esModule",{value:!0});ui.ParsingContext=ui.Chrono=void 0;var ai=Pe(),pw=ql(),oi=class{constructor(e){e=e||pw.createCasualConfiguration(),this.parsers=[...e.parsers],this.refiners=[...e.refiners]}clone(){return new oi({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 Ha(e,t,n),s=[];return this.parsers.forEach(a=>{let o=oi.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 ai.ParsingResult?c=l:l instanceof ai.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}};ui.Chrono=oi;var Ha=class{constructor(e,t,n){this.text=e,this.reference=new ai.ReferenceWithTimezone(t),this.option=n!=null?n:{},this.refDate=this.reference.instant}createParsingComponents(e){return e instanceof ai.ParsingComponents?e:new ai.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 ai.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))}};ui.ParsingContext=Ha});var wn=b(jl=>{"use strict";Object.defineProperty(jl,"__esModule",{value:!0});var Hh=rt(),hw=new RegExp("([^\\d]|^)([0-3]{0,1}[0-9]{1})[\\/\\.\\-]([0-3]{0,1}[0-9]{1})(?:[\\/\\.\\-]([0-9]{4}|[0-9]{2}))?(\\W|$)","i"),za=1,zh=5,Kh=2,Vh=3,$l=4,Yl=class{constructor(e){this.groupNumberMonth=e?Vh:Kh,this.groupNumberDay=e?Kh:Vh}pattern(){return hw}extract(e,t){if(t[za]=="/"||t[zh]=="/"){t.index+=t[0].length;return}let n=t.index+t[za].length,i=t[0].substr(t[za].length,t[0].length-t[za].length-t[zh].length);if(i.match(/^\d\.\d$/)||i.match(/^\d\.\d{1,2}\.\d{1,2}\s*$/)||!t[$l]&&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[$l]){let u=parseInt(t[$l]),l=Hh.findMostLikelyADYear(u);s.start.assign("year",l)}else{let u=Hh.findYearClosestToRef(e.refDate,o,a);s.start.imply("year",u)}return s}};jl.default=Yl});var Xh=b(Bl=>{"use strict";Object.defineProperty(Bl,"__esModule",{value:!0});var Qh=nt(),mw=Pe(),gw=W(),yw=Yt(),Tw=new RegExp(`(this|last|past|next|after|\\+|-)\\s*(${Qh.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Gl=class extends gw.AbstractParserWithWordBoundaryChecking{innerPattern(){return Tw}innerExtract(e,t){let n=t[1].toLowerCase(),i=Qh.parseTimeUnits(t[2]);switch(n){case"last":case"past":case"-":i=yw.reverseTimeUnits(i);break}return mw.ParsingComponents.createRelativeFromReference(e.reference,i)}};Bl.default=Gl});var Jh=b(Kl=>{"use strict";Object.defineProperty(Kl,"__esModule",{value:!0});var bw=ri(),Hl=Pe(),_w=nt(),vw=Yt();function Zh(r){return r.text.match(/\s+(before|from)$/i)!=null}function Ew(r){return r.text.match(/\s+(after|since)$/i)!=null}var zl=class extends bw.MergingRefiner{patternBetween(){return/^\s*$/i}shouldMergeResults(e,t,n){return!e.match(this.patternBetween())||!Zh(t)&&!Ew(t)?!1:!!n.start.get("day")&&!!n.start.get("month")&&!!n.start.get("year")}mergeResults(e,t,n){let i=_w.parseTimeUnits(t.text);Zh(t)&&(i=vw.reverseTimeUnits(i));let s=Hl.ParsingComponents.createRelativeFromReference(new Hl.ReferenceWithTimezone(n.start.date()),i);return new Hl.ParsingResult(n.reference,t.index,`${t.text}${e}${n.text}`,s)}};Kl.default=zl});var ql=b(We=>{"use strict";var Be=We&&We.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(We,"__esModule",{value:!0});We.createConfiguration=We.createCasualConfiguration=We.parseDate=We.parse=We.GB=We.strict=We.casual=void 0;var ww=Be(Zp()),kw=Be(ih()),Ow=Be(lh()),Sw=Be(fh()),Dw=Be(mh()),Rw=Be(gh()),Mw=Be(Th()),xw=Be(bh()),Aw=Be(_h()),Cw=Be(vh()),Pw=Be(kh()),Nw=xr(),Iw=Be(Lh()),Fw=Be(Uh()),Lw=Be(Yh()),Uw=Be(Bh()),Vl=tr(),Ww=Be(wn()),qw=Be(Xh()),$w=Be(Jh());We.casual=new Vl.Chrono(em(!1));We.strict=new Vl.Chrono(Ka(!0,!1));We.GB=new Vl.Chrono(Ka(!1,!0));function Yw(r,e,t){return We.casual.parse(r,e,t)}We.parse=Yw;function jw(r,e,t){return We.casual.parseDate(r,e,t)}We.parseDate=jw;function em(r=!1){let e=Ka(!1,r);return e.parsers.unshift(new Iw.default),e.parsers.unshift(new Fw.default),e.parsers.unshift(new Sw.default),e.parsers.unshift(new Uw.default),e.parsers.unshift(new qw.default),e}We.createCasualConfiguration=em;function Ka(r=!0,e=!1){return Nw.includeCommonConfiguration({parsers:[new Ww.default(e),new ww.default,new kw.default,new Ow.default,new Lw.default,new Dw.default,new Rw.default,new Mw.default(r),new xw.default(r),new Aw.default(r)],refiners:[new $w.default,new Pw.default,new Cw.default]},r)}We.createConfiguration=Ka});var tm=b(Xl=>{"use strict";Object.defineProperty(Xl,"__esModule",{value:!0});var Gw=_n(),Ql=class extends Gw.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)}};Xl.default=Ql});var us=b(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.parseTimeUnits=Oe.TIME_UNITS_PATTERN=Oe.parseYear=Oe.YEAR_PATTERN=Oe.parseNumberPattern=Oe.NUMBER_PATTERN=Oe.TIME_UNIT_DICTIONARY=Oe.INTEGER_WORD_DICTIONARY=Oe.MONTH_DICTIONARY=Oe.WEEKDAY_DICTIONARY=void 0;var Zl=Ee(),Bw=rt();Oe.WEEKDAY_DICTIONARY={sonntag:0,so:0,montag:1,mo:1,dienstag:2,di:2,mittwoch:3,mi:3,donnerstag:4,do:4,freitag:5,fr:5,samstag:6,sa:6};Oe.MONTH_DICTIONARY={januar:1,j\u00E4nner:1,janner:1,jan:1,"jan.":1,februar:2,feber:2,feb:2,"feb.":2,m\u00E4rz:3,maerz:3,m\u00E4r:3,"m\xE4r.":3,mrz:3,"mrz.":3,april:4,apr:4,"apr.":4,mai:5,juni:6,jun:6,"jun.":6,juli:7,jul:7,"jul.":7,august:8,aug:8,"aug.":8,september:9,sep:9,"sep.":9,sept:9,"sept.":9,oktober:10,okt:10,"okt.":10,november:11,nov:11,"nov.":11,dezember:12,dez:12,"dez.":12};Oe.INTEGER_WORD_DICTIONARY={eins:1,eine:1,einem:1,einen:1,einer:1,zwei:2,drei:3,vier:4,f\u00FCnf:5,fuenf:5,sechs:6,sieben:7,acht:8,neun:9,zehn:10,elf:11,zw\u00F6lf:12,zwoelf:12};Oe.TIME_UNIT_DICTIONARY={sek:"second",sekunde:"second",sekunden:"second",min:"minute",minute:"minute",minuten:"minute",h:"hour",std:"hour",stunde:"hour",stunden:"hour",tag:"d",tage:"d",tagen:"d",woche:"week",wochen:"week",monat:"month",monate:"month",monaten:"month",monats:"month",quartal:"quarter",quartals:"quarter",quartale:"quarter",quartalen:"quarter",a:"year",j:"year",jr:"year",jahr:"year",jahre:"year",jahren:"year",jahres:"year"};Oe.NUMBER_PATTERN=`(?:${Zl.matchAnyPattern(Oe.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s*an?)?|an?\\b(?:\\s*few)?|few|several|a?\\s*couple\\s*(?:of)?)`;function nm(r){let e=r.toLowerCase();return Oe.INTEGER_WORD_DICTIONARY[e]!==void 0?Oe.INTEGER_WORD_DICTIONARY[e]:e==="a"||e==="an"?1:e.match(/few/)?3:e.match(/half/)?.5:e.match(/couple/)?2:e.match(/several/)?7:parseFloat(e)}Oe.parseNumberPattern=nm;Oe.YEAR_PATTERN="(?:[0-9]{1,4}(?:\\s*[vn]\\.?\\s*(?:C(?:hr)?|(?:u\\.?|d\\.?(?:\\s*g\\.?)?)?\\s*Z)\\.?|\\s*(?:u\\.?|d\\.?(?:\\s*g\\.)?)\\s*Z\\.?)?)";function Hw(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 Bw.findMostLikelyADYear(e)}Oe.parseYear=Hw;var im=`(${Oe.NUMBER_PATTERN})\\s{0,5}(${Zl.matchAnyPattern(Oe.TIME_UNIT_DICTIONARY)})\\s{0,5}`,rm=new RegExp(im,"i");Oe.TIME_UNITS_PATTERN=Zl.repeatedTimeunitPattern("",im);function zw(r){let e={},t=r,n=rm.exec(t);for(;n;)Kw(e,n),t=t.substring(n[0].length),n=rm.exec(t);return e}Oe.parseTimeUnits=zw;function Kw(r,e){let t=nm(e[1]),n=Oe.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var am=b(ec=>{"use strict";Object.defineProperty(ec,"__esModule",{value:!0});var sm=us(),Vw=Ee(),Qw=W(),Xw=En(),Zw=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:a[mn]\\s*?)?(?:(diese[mn]|letzte[mn]|n(?:\xE4|ae)chste[mn])\\s*)?(${Vw.matchAnyPattern(sm.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(diese|letzte|n(?:\xE4|ae)chste)\\s*woche)?(?=\\W|$)`,"i"),Jw=1,ek=3,tk=2,Jl=class extends Qw.AbstractParserWithWordBoundaryChecking{innerPattern(){return Zw}innerExtract(e,t){let n=t[tk].toLowerCase(),i=sm.WEEKDAY_DICTIONARY[n],s=t[Jw],a=t[ek],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=Xw.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};ec.default=Jl});var cm=b(tc=>{"use strict";Object.defineProperty(tc,"__esModule",{value:!0});var en=je(),rk=new RegExp("(^|\\s|T)(?:(?:um|von)\\s*)?(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s)?)?(?:\\s*Uhr)?(?:\\s*(morgens|vormittags|nachmittags|abends|nachts|am\\s+(?:Morgen|Vormittag|Nachmittag|Abend)|in\\s+der\\s+Nacht))?(?=\\W|$)","i"),nk=new RegExp("^\\s*(\\-|\\\u2013|\\~|\\\u301C|bis(?:\\s+um)?|\\?)\\s*(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s)?)?(?:\\s*Uhr)?(?:\\s*(morgens|vormittags|nachmittags|abends|nachts|am\\s+(?:Morgen|Vormittag|Nachmittag|Abend)|in\\s+der\\s+Nacht))?(?=\\W|$)","i"),ik=2,om=3,um=4,lm=5,li=class{pattern(e){return rk}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=li.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let i=e.text.substring(t.index+t[0].length),s=nk.exec(i);return s&&(n.end=li.extractTimeComponent(n.start.clone(),s),n.end&&(n.text+=s[0])),n}static extractTimeComponent(e,t){let n=0,i=0,s=null;if(n=parseInt(t[ik]),t[om]!=null&&(i=parseInt(t[om])),i>=60||n>24)return null;if(n>=12&&(s=en.Meridiem.PM),t[lm]!=null){if(n>12)return null;let a=t[lm].toLowerCase();a.match(/morgen|vormittag/)&&(s=en.Meridiem.AM,n==12&&(n=0)),a.match(/nachmittag|abend/)&&(s=en.Meridiem.PM,n!=12&&(n+=12)),a.match(/nacht/)&&(n==12?(s=en.Meridiem.AM,n=0):n<6?s=en.Meridiem.AM:(s=en.Meridiem.PM,n+=12))}if(e.assign("hour",n),e.assign("minute",i),s!==null?e.assign("meridiem",s):n<12?e.imply("meridiem",en.Meridiem.AM):e.imply("meridiem",en.Meridiem.PM),t[um]!=null){let a=parseInt(t[um]);if(a>=60)return null;e.assign("second",a)}return e}};tc.default=li});var dm=b(ls=>{"use strict";var sk=ls&&ls.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ls,"__esModule",{value:!0});var ak=sk(mr()),rc=class extends ak.default{patternBetween(){return/^\s*(bis(?:\s*(?:am|zum))?|-)\s*$/i}};ls.default=rc});var fm=b(cs=>{"use strict";var ok=cs&&cs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(cs,"__esModule",{value:!0});var uk=ok(Mr()),nc=class extends uk.default{patternBetween(){return new RegExp("^\\s*(T|um|am|,|-)?\\s*$")}};cs.default=nc});var ic=b(fs=>{"use strict";var lk=fs&&fs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(fs,"__esModule",{value:!0});var ck=lk(Te()),kn=je(),dk=W(),fk=$t(),pk=Yt(),ds=class extends dk.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(diesen)?\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht)(?=\W|$)/i}innerExtract(e,t){let n=ck.default(e.refDate),i=t[2].toLowerCase(),s=e.createParsingComponents();return fk.implySimilarTime(s,n),ds.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",kn.Meridiem.AM);break;case"vormittag":e.imply("hour",9),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",kn.Meridiem.AM);break;case"mittag":case"mittags":e.imply("hour",12),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",kn.Meridiem.AM);break;case"nachmittag":e.imply("hour",15),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",kn.Meridiem.PM);break;case"abend":e.imply("hour",18),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",kn.Meridiem.PM);break;case"nacht":e.imply("hour",22),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",kn.Meridiem.PM);break;case"mitternacht":e.get("hour")>1&&(e=pk.addImpliedTimeUnits(e,{day:1})),e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",kn.Meridiem.AM);break}return e}};fs.default=ds});var mm=b(rr=>{"use strict";var hk=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]}),mk=rr&&rr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),gk=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)&&hk(e,r,t);return mk(e,r),e},hm=rr&&rr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(rr,"__esModule",{value:!0});var yk=hm(Te()),Tk=W(),On=$t(),bk=hm(ic()),pm=gk(Cr()),_k=new RegExp("(jetzt|heute|morgen|\xFCbermorgen|uebermorgen|gestern|vorgestern|letzte\\s*nacht)(?:\\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht))?(?=\\W|$)","i"),vk=1,Ek=2,sc=class extends Tk.AbstractParserWithWordBoundaryChecking{innerPattern(e){return _k}innerExtract(e,t){let n=yk.default(e.refDate),i=(t[vk]||"").toLowerCase(),s=(t[Ek]||"").toLowerCase(),a=e.createParsingComponents();switch(i){case"jetzt":a=pm.now(e.reference);break;case"heute":a=pm.today(e.reference);break;case"morgen":On.assignTheNextDay(a,n);break;case"\xFCbermorgen":case"uebermorgen":n=n.add(1,"day"),On.assignTheNextDay(a,n);break;case"gestern":n=n.add(-1,"day"),On.assignSimilarDate(a,n),On.implySimilarTime(a,n);break;case"vorgestern":n=n.add(-2,"day"),On.assignSimilarDate(a,n),On.implySimilarTime(a,n);break;default:i.match(/letzte\s*nacht/)&&(n.hour()>6&&(n=n.add(-1,"day")),On.assignSimilarDate(a,n),a.imply("hour",0));break}return s&&(a=bk.default.extractTimeComponents(a,s)),a}};rr.default=sc});var vm=b(oc=>{"use strict";Object.defineProperty(oc,"__esModule",{value:!0});var wk=rt(),bm=us(),_m=us(),kk=Ee(),Ok=W(),Sk=new RegExp(`(?:am\\s*?)?(?:den\\s*?)?([0-9]{1,2})\\.(?:\\s*(?:bis(?:\\s*(?:am|zum))?|\\-|\\\u2013|\\s)\\s*([0-9]{1,2})\\.?)?\\s*(${kk.matchAnyPattern(bm.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${_m.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),gm=1,ym=2,Dk=3,Tm=4,ac=class extends Ok.AbstractParserWithWordBoundaryChecking{innerPattern(){return Sk}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=bm.MONTH_DICTIONARY[t[Dk].toLowerCase()],s=parseInt(t[gm]);if(s>31)return t.index=t.index+t[gm].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[Tm]){let a=_m.parseYear(t[Tm]);n.start.assign("year",a)}else{let a=wk.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[ym]){let a=parseInt(t[ym]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};oc.default=ac});var Em=b(lc=>{"use strict";Object.defineProperty(lc,"__esModule",{value:!0});var Va=us(),Rk=Pe(),Mk=W(),xk=Yt(),Ak=Ee(),uc=class extends Mk.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*)?(${Va.NUMBER_PATTERN})?(?:\\s*(n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?)?\\s*(${Ak.matchAnyPattern(Va.TIME_UNIT_DICTIONARY)})`,"i")}innerExtract(e,t){let n=t[2]?Va.parseNumberPattern(t[2]):1,i=Va.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=xk.reverseTimeUnits(s)),Rk.ParsingComponents.createRelativeFromReference(e.reference,s)}};lc.default=uc});var Om=b(He=>{"use strict";var nr=He&&He.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(He,"__esModule",{value:!0});He.createConfiguration=He.createCasualConfiguration=He.parseDate=He.parse=He.strict=He.casual=void 0;var Ck=xr(),wm=tr(),Pk=nr(wn()),Nk=nr(Al()),Ik=nr(tm()),Fk=nr(am()),Lk=nr(cm()),Uk=nr(dm()),Wk=nr(fm()),qk=nr(mm()),$k=nr(ic()),Yk=nr(vm()),jk=nr(Em());He.casual=new wm.Chrono(km());He.strict=new wm.Chrono(cc(!0));function Gk(r,e,t){return He.casual.parse(r,e,t)}He.parse=Gk;function Bk(r,e,t){return He.casual.parseDate(r,e,t)}He.parseDate=Bk;function km(r=!0){let e=cc(!1,r);return e.parsers.unshift(new $k.default),e.parsers.unshift(new qk.default),e.parsers.unshift(new jk.default),e}He.createCasualConfiguration=km;function cc(r=!0,e=!0){return Ck.includeCommonConfiguration({parsers:[new Nk.default,new Pk.default(e),new Ik.default,new Lk.default,new Yk.default,new Fk.default],refiners:[new Uk.default,new Wk.default]},r)}He.createConfiguration=cc});var Dm=b(ir=>{"use strict";var Hk=ir&&ir.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),zk=ir&&ir.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Kk=ir&&ir.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&Hk(e,r,t);return zk(e,r),e},Vk=ir&&ir.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ir,"__esModule",{value:!0});var Qk=Vk(Te()),Xk=je(),Zk=W(),Sm=$t(),Qa=Kk(Cr()),dc=class extends Zk.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(maintenant|aujourd'hui|demain|hier|cette\s*nuit|la\s*veille)(?=\W|$)/i}innerExtract(e,t){let n=Qk.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();switch(i){case"maintenant":return Qa.now(e.reference);case"aujourd'hui":return Qa.today(e.reference);case"hier":return Qa.yesterday(e.reference);case"demain":return Qa.tomorrow(e.reference);default:i.match(/cette\s*nuit/)?(Sm.assignSimilarDate(s,n),s.imply("hour",22),s.imply("meridiem",Xk.Meridiem.PM)):i.match(/la\s*veille/)&&(n=n.add(-1,"day"),Sm.assignSimilarDate(s,n),s.imply("hour",0))}return s}};ir.default=dc});var Rm=b(pc=>{"use strict";Object.defineProperty(pc,"__esModule",{value:!0});var ps=je(),Jk=W(),fc=class extends Jk.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",ps.Meridiem.PM);break;case"soir":i.imply("hour",18),i.imply("minute",0),i.imply("meridiem",ps.Meridiem.PM);break;case"matin":i.imply("hour",8),i.imply("minute",0),i.imply("meridiem",ps.Meridiem.AM);break;case"a midi":i.imply("hour",12),i.imply("minute",0),i.imply("meridiem",ps.Meridiem.AM);break;case"\xE0 minuit":i.imply("hour",0),i.imply("meridiem",ps.Meridiem.AM);break}return i}};pc.default=fc});var Mm=b(mc=>{"use strict";Object.defineProperty(mc,"__esModule",{value:!0});var e1=_n(),hc=class extends e1.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)}};mc.default=hc});var xm=b(hs=>{"use strict";var t1=hs&&hs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(hs,"__esModule",{value:!0});var r1=t1(Mr()),gc=class extends r1.default{patternBetween(){return new RegExp("^\\s*(T|\xE0|a|vers|de|,|-)?\\s*$")}};hs.default=gc});var Am=b(ms=>{"use strict";var n1=ms&&ms.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ms,"__esModule",{value:!0});var i1=n1(mr()),yc=class extends i1.default{patternBetween(){return/^\s*(à|a|-)\s*$/i}};ms.default=yc});var tn=b(be=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});be.parseTimeUnits=be.TIME_UNITS_PATTERN=be.parseYear=be.YEAR_PATTERN=be.parseOrdinalNumberPattern=be.ORDINAL_NUMBER_PATTERN=be.parseNumberPattern=be.NUMBER_PATTERN=be.TIME_UNIT_DICTIONARY=be.INTEGER_WORD_DICTIONARY=be.MONTH_DICTIONARY=be.WEEKDAY_DICTIONARY=void 0;var Tc=Ee();be.WEEKDAY_DICTIONARY={dimanche:0,dim:0,lundi:1,lun:1,mardi:2,mar:2,mercredi:3,mer:3,jeudi:4,jeu:4,vendredi:5,ven:5,samedi:6,sam:6};be.MONTH_DICTIONARY={janvier:1,jan:1,"jan.":1,f\u00E9vrier:2,f\u00E9v:2,"f\xE9v.":2,fevrier:2,fev:2,"fev.":2,mars:3,mar:3,"mar.":3,avril:4,avr:4,"avr.":4,mai:5,juin:6,jun:6,juillet:7,juil:7,jul:7,"jul.":7,ao\u00FBt:8,aout:8,septembre:9,sep:9,"sep.":9,sept:9,"sept.":9,octobre:10,oct:10,"oct.":10,novembre:11,nov:11,"nov.":11,d\u00E9cembre:12,decembre:12,dec:12,"dec.":12};be.INTEGER_WORD_DICTIONARY={un:1,deux:2,trois:3,quatre:4,cinq:5,six:6,sept:7,huit:8,neuf:9,dix:10,onze:11,douze:12,treize:13};be.TIME_UNIT_DICTIONARY={sec:"second",seconde:"second",secondes:"second",min:"minute",mins:"minute",minute:"minute",minutes:"minute",h:"hour",hr:"hour",hrs:"hour",heure:"hour",heures:"hour",jour:"d",jours:"d",semaine:"week",semaines:"week",mois:"month",trimestre:"quarter",trimestres:"quarter",ans:"year",ann\u00E9e:"year",ann\u00E9es:"year"};be.NUMBER_PATTERN=`(?:${Tc.matchAnyPattern(be.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|une?\\b|quelques?|demi-?)`;function Pm(r){let e=r.toLowerCase();return be.INTEGER_WORD_DICTIONARY[e]!==void 0?be.INTEGER_WORD_DICTIONARY[e]:e==="une"||e==="un"?1:e.match(/quelques?/)?3:e.match(/demi-?/)?.5:parseFloat(e)}be.parseNumberPattern=Pm;be.ORDINAL_NUMBER_PATTERN="(?:[0-9]{1,2}(?:er)?)";function s1(r){let e=r.toLowerCase();return e=e.replace(/(?:er)$/i,""),parseInt(e)}be.parseOrdinalNumberPattern=s1;be.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:AC|AD|p\\.\\s*C(?:hr?)?\\.\\s*n\\.)|[1-2][0-9]{3}|[5-9][0-9])";function a1(r){if(/AC/i.test(r))return r=r.replace(/BC/i,""),-parseInt(r);if(/AD/i.test(r)||/C/i.test(r))return r=r.replace(/[^\d]+/i,""),parseInt(r);let e=parseInt(r);return e<100&&(e>50?e=e+1900:e=e+2e3),e}be.parseYear=a1;var Nm=`(${be.NUMBER_PATTERN})\\s{0,5}(${Tc.matchAnyPattern(be.TIME_UNIT_DICTIONARY)})\\s{0,5}`,Cm=new RegExp(Nm,"i");be.TIME_UNITS_PATTERN=Tc.repeatedTimeunitPattern("",Nm);function o1(r){let e={},t=r,n=Cm.exec(t);for(;n;)u1(e,n),t=t.substring(n[0].length),n=Cm.exec(t);return e}be.parseTimeUnits=o1;function u1(r,e){let t=Pm(e[1]),n=be.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Fm=b(_c=>{"use strict";Object.defineProperty(_c,"__esModule",{value:!0});var Im=tn(),l1=Ee(),c1=W(),d1=En(),f1=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(?:ce)\\s*)?(${l1.matchAnyPattern(Im.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(dernier|prochain)\\s*)?(?=\\W|\\d|$)`,"i"),p1=1,h1=2,bc=class extends c1.AbstractParserWithWordBoundaryChecking{innerPattern(){return f1}innerExtract(e,t){let n=t[p1].toLowerCase(),i=Im.WEEKDAY_DICTIONARY[n];if(i===void 0)return null;let s=t[h1];s=s||"",s=s.toLowerCase();let a=null;s=="dernier"?a="last":s=="prochain"&&(a="next");let o=d1.toDayJSWeekday(e.refDate,i,a);return e.createParsingComponents().assign("weekday",i).imply("day",o.date()).imply("month",o.month()+1).imply("year",o.year())}};_c.default=bc});var qm=b(vc=>{"use strict";Object.defineProperty(vc,"__esModule",{value:!0});var gs=je(),m1=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"),g1=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"),y1=2,Lm=3,Um=4,Wm=5,ci=class{pattern(e){return m1}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=ci.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=g1.exec(i);return s&&(n.end=ci.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[y1]),t[Lm]!=null&&(i=parseInt(t[Lm])),i>=60||n>24)return null;if(n>=12&&(s=gs.Meridiem.PM),t[Wm]!=null){if(n>12)return null;let a=t[Wm][0].toLowerCase();a=="a"&&(s=gs.Meridiem.AM,n==12&&(n=0)),a=="p"&&(s=gs.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",gs.Meridiem.AM):e.imply("meridiem",gs.Meridiem.PM),t[Um]!=null){let a=parseInt(t[Um]);if(a>=60)return null;e.assign("second",a)}return e}};vc.default=ci});var Hm=b(wc=>{"use strict";Object.defineProperty(wc,"__esModule",{value:!0});var T1=rt(),Gm=tn(),Bm=tn(),Xa=tn(),b1=Ee(),_1=W(),v1=new RegExp(`(?:on\\s*?)?(${Xa.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:au|\\-|\\\u2013|jusqu'au?|\\s)\\s*(${Xa.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:de)?\\s*)(${b1.matchAnyPattern(Gm.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${Bm.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),$m=1,Ym=2,E1=3,jm=4,Ec=class extends _1.AbstractParserWithWordBoundaryChecking{innerPattern(){return v1}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Gm.MONTH_DICTIONARY[t[E1].toLowerCase()],s=Xa.parseOrdinalNumberPattern(t[$m]);if(s>31)return t.index=t.index+t[$m].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[jm]){let a=Bm.parseYear(t[jm]);n.start.assign("year",a)}else{let a=T1.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[Ym]){let a=Xa.parseOrdinalNumberPattern(t[Ym]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};wc.default=Ec});var Km=b(Oc=>{"use strict";Object.defineProperty(Oc,"__esModule",{value:!0});var zm=tn(),w1=Pe(),k1=W(),O1=Yt(),kc=class extends k1.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`il y a\\s*(${zm.TIME_UNITS_PATTERN})(?=(?:\\W|$))`,"i")}innerExtract(e,t){let n=zm.parseTimeUnits(t[1]),i=O1.reverseTimeUnits(n);return w1.ParsingComponents.createRelativeFromReference(e.reference,i)}};Oc.default=kc});var Qm=b(Dc=>{"use strict";Object.defineProperty(Dc,"__esModule",{value:!0});var Vm=tn(),S1=Pe(),D1=W(),Sc=class extends D1.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 S1.ParsingComponents.createRelativeFromReference(e.reference,n)}};Dc.default=Sc});var Xm=b(Mc=>{"use strict";Object.defineProperty(Mc,"__esModule",{value:!0});var Za=tn(),R1=Pe(),M1=W(),x1=Yt(),A1=Ee(),Rc=class extends M1.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:les?|la|l'|du|des?)\\s*(${Za.NUMBER_PATTERN})?(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?\\s*(${A1.matchAnyPattern(Za.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]?Za.parseNumberPattern(t[1]):1,i=Za.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=x1.reverseTimeUnits(s)),R1.ParsingComponents.createRelativeFromReference(e.reference,s)}};Mc.default=Rc});var eg=b(ze=>{"use strict";var jt=ze&&ze.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ze,"__esModule",{value:!0});ze.createConfiguration=ze.createCasualConfiguration=ze.parseDate=ze.parse=ze.strict=ze.casual=void 0;var C1=xr(),Zm=tr(),P1=jt(Dm()),N1=jt(Rm()),I1=jt(wn()),F1=jt(Mm()),L1=jt(xm()),U1=jt(Am()),W1=jt(Fm()),q1=jt(qm()),$1=jt(Hm()),Y1=jt(Km()),j1=jt(Qm()),G1=jt(Xm());ze.casual=new Zm.Chrono(Jm());ze.strict=new Zm.Chrono(xc(!0));function B1(r,e,t){return ze.casual.parse(r,e,t)}ze.parse=B1;function H1(r,e,t){return ze.casual.parseDate(r,e,t)}ze.parseDate=H1;function Jm(r=!0){let e=xc(!1,r);return e.parsers.unshift(new P1.default),e.parsers.unshift(new N1.default),e.parsers.unshift(new G1.default),e}ze.createCasualConfiguration=Jm;function xc(r=!0,e=!0){return C1.includeCommonConfiguration({parsers:[new I1.default(e),new $1.default,new F1.default,new q1.default,new Y1.default,new j1.default,new W1.default],refiners:[new L1.default,new U1.default]},r)}ze.createConfiguration=xc});var tg=b(Ja=>{"use strict";Object.defineProperty(Ja,"__esModule",{value:!0});Ja.toHankaku=void 0;function z1(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,K1)}Ja.toHankaku=z1;function K1(r){return String.fromCharCode(r.charCodeAt(0)-65248)}});var ng=b(ys=>{"use strict";var V1=ys&&ys.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ys,"__esModule",{value:!0});var Ac=tg(),Q1=rt(),X1=V1(Te()),Z1=/(?:(?:([同今本])|((昭和|平成|令和)?([0-90-9]{1,4}|元)))年\s*)?([0-90-9]{1,2})月\s*([0-90-9]{1,2})日/i,rg=1,J1=2,Cc=3,eO=4,tO=5,rO=6,Pc=class{pattern(){return Z1}extract(e,t){let n=parseInt(Ac.toHankaku(t[tO])),i=parseInt(Ac.toHankaku(t[rO])),s=e.createParsingComponents({day:i,month:n});if(t[rg]&&t[rg].match("\u540C|\u4ECA|\u672C")){let a=X1.default(e.refDate);s.assign("year",a.year())}if(t[J1]){let a=t[eO],o=a=="\u5143"?1:parseInt(Ac.toHankaku(a));t[Cc]=="\u4EE4\u548C"?o+=2018:t[Cc]=="\u5E73\u6210"?o+=1988:t[Cc]=="\u662D\u548C"&&(o+=1925),s.assign("year",o)}else{let a=Q1.findYearClosestToRef(e.refDate,i,n);s.imply("year",a)}return s}};ys.default=Pc});var ig=b(Ts=>{"use strict";var nO=Ts&&Ts.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ts,"__esModule",{value:!0});var iO=nO(mr()),Nc=class extends iO.default{patternBetween(){return/^\s*(から|ー|-)\s*$/i}};Ts.default=Nc});var ag=b(sr=>{"use strict";var sO=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]}),aO=sr&&sr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),oO=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)&&sO(e,r,t);return aO(e,r),e},uO=sr&&sr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(sr,"__esModule",{value:!0});var lO=uO(Te()),sg=je(),Ic=oO(Cr()),cO=/今日|当日|昨日|明日|今夜|今夕|今晩|今朝/i,Fc=class{pattern(){return cO}extract(e,t){let n=t[0],i=lO.default(e.refDate),s=e.createParsingComponents();switch(n){case"\u6628\u65E5":return Ic.yesterday(e.reference);case"\u660E\u65E5":return Ic.tomorrow(e.reference);case"\u4ECA\u65E5":case"\u5F53\u65E5":return Ic.today(e.reference)}return n=="\u4ECA\u591C"||n=="\u4ECA\u5915"||n=="\u4ECA\u6669"?(s.imply("hour",22),s.assign("meridiem",sg.Meridiem.PM)):n.match("\u4ECA\u671D")&&(s.imply("hour",6),s.assign("meridiem",sg.Meridiem.AM)),s.assign("day",i.date()),s.assign("month",i.month()+1),s.assign("year",i.year()),s}};sr.default=Fc});var lg=b(Ke=>{"use strict";var Lc=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 dO=Lc(ng()),fO=Lc(ig()),pO=Lc(ag()),og=tr();Ke.casual=new og.Chrono(ug());Ke.strict=new og.Chrono(Uc());function hO(r,e,t){return Ke.casual.parse(r,e,t)}Ke.parse=hO;function mO(r,e,t){return Ke.casual.parseDate(r,e,t)}Ke.parseDate=mO;function ug(){let r=Uc();return r.parsers.unshift(new pO.default),r}Ke.createCasualConfiguration=ug;function Uc(){return{parsers:[new dO.default],refiners:[new fO.default]}}Ke.createConfiguration=Uc});var eo=b(yr=>{"use strict";Object.defineProperty(yr,"__esModule",{value:!0});yr.parseYear=yr.YEAR_PATTERN=yr.MONTH_DICTIONARY=yr.WEEKDAY_DICTIONARY=void 0;yr.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};yr.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};yr.YEAR_PATTERN="[0-9]{1,4}(?![^\\s]\\d)(?:\\s*[a|d]\\.?\\s*c\\.?|\\s*a\\.?\\s*d\\.?)?";function gO(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)}yr.parseYear=gO});var dg=b(qc=>{"use strict";Object.defineProperty(qc,"__esModule",{value:!0});var cg=eo(),yO=Ee(),TO=W(),bO=En(),_O=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(este|esta|passado|pr[o\xF3]ximo)\\s*)?(${yO.matchAnyPattern(cg.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(este|esta|passado|pr[\xF3o]ximo)\\s*semana)?(?=\\W|\\d|$)`,"i"),vO=1,EO=2,wO=3,Wc=class extends TO.AbstractParserWithWordBoundaryChecking{innerPattern(){return _O}innerExtract(e,t){let n=t[EO].toLowerCase(),i=cg.WEEKDAY_DICTIONARY[n];if(i===void 0)return null;let s=t[vO],a=t[wO],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=bO.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};qc.default=Wc});var fg=b(Yc=>{"use strict";Object.defineProperty(Yc,"__esModule",{value:!0});var kO=_n(),$c=class extends kO.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:ao?|\xE0s?|das|da|de|do)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|a(?:o)?|\\?)\\s*"}};Yc.default=$c});var pg=b(bs=>{"use strict";var OO=bs&&bs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(bs,"__esModule",{value:!0});var SO=OO(Mr()),jc=class extends SO.default{patternBetween(){return new RegExp("^\\s*(?:,|\xE0)?\\s*$")}};bs.default=jc});var hg=b(_s=>{"use strict";var DO=_s&&_s.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(_s,"__esModule",{value:!0});var RO=DO(mr()),Gc=class extends RO.default{patternBetween(){return/^\s*(?:-)\s*$/i}};_s.default=Gc});var _g=b(Hc=>{"use strict";Object.defineProperty(Hc,"__esModule",{value:!0});var MO=rt(),Tg=eo(),bg=eo(),xO=Ee(),AO=W(),CO=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*)(${xO.matchAnyPattern(Tg.MONTH_DICTIONARY)})(?:\\s*(?:de|,)?\\s*(${bg.YEAR_PATTERN}))?(?=\\W|$)`,"i"),mg=1,gg=2,PO=3,yg=4,Bc=class extends AO.AbstractParserWithWordBoundaryChecking{innerPattern(){return CO}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Tg.MONTH_DICTIONARY[t[PO].toLowerCase()],s=parseInt(t[mg]);if(s>31)return t.index=t.index+t[mg].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[yg]){let a=bg.parseYear(t[yg]);n.start.assign("year",a)}else{let a=MO.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[gg]){let a=parseInt(t[gg]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Hc.default=Bc});var vg=b(Pr=>{"use strict";var NO=Pr&&Pr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),IO=Pr&&Pr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),FO=Pr&&Pr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&NO(e,r,t);return IO(e,r),e};Object.defineProperty(Pr,"__esModule",{value:!0});var LO=W(),to=FO(Cr()),zc=class extends LO.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 to.now(e.reference);case"hoje":return to.today(e.reference);case"amanha":case"amanh\xE3":return to.tomorrow(e.reference);case"ontem":return to.yesterday(e.reference)}return i}};Pr.default=zc});var Eg=b(vs=>{"use strict";var UO=vs&&vs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(vs,"__esModule",{value:!0});var ro=je(),WO=W(),qO=$t(),$O=UO(Te()),Kc=class extends WO.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(?:esta\s*)?(manha|manhã|tarde|meia-noite|meio-dia|noite)(?=\W|$)/i}innerExtract(e,t){let n=$O.default(e.refDate),i=e.createParsingComponents();switch(t[1].toLowerCase()){case"tarde":i.imply("meridiem",ro.Meridiem.PM),i.imply("hour",15);break;case"noite":i.imply("meridiem",ro.Meridiem.PM),i.imply("hour",22);break;case"manha":case"manh\xE3":i.imply("meridiem",ro.Meridiem.AM),i.imply("hour",6);break;case"meia-noite":qO.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"meio-dia":i.imply("meridiem",ro.Meridiem.AM),i.imply("hour",12);break}return i}};vs.default=Kc});var Og=b(Ve=>{"use strict";var rn=Ve&&Ve.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ve,"__esModule",{value:!0});Ve.createConfiguration=Ve.createCasualConfiguration=Ve.parseDate=Ve.parse=Ve.strict=Ve.casual=void 0;var YO=xr(),wg=tr(),jO=rn(wn()),GO=rn(dg()),BO=rn(fg()),HO=rn(pg()),zO=rn(hg()),KO=rn(_g()),VO=rn(vg()),QO=rn(Eg());Ve.casual=new wg.Chrono(kg());Ve.strict=new wg.Chrono(Vc(!0));function XO(r,e,t){return Ve.casual.parse(r,e,t)}Ve.parse=XO;function ZO(r,e,t){return Ve.casual.parseDate(r,e,t)}Ve.parseDate=ZO;function kg(r=!0){let e=Vc(!1,r);return e.parsers.push(new VO.default),e.parsers.push(new QO.default),e}Ve.createCasualConfiguration=kg;function Vc(r=!0,e=!0){return YO.includeCommonConfiguration({parsers:[new jO.default(e),new GO.default,new BO.default,new KO.default],refiners:[new HO.default,new zO.default]},r)}Ve.createConfiguration=Vc});var Sg=b(Es=>{"use strict";var JO=Es&&Es.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Es,"__esModule",{value:!0});var e0=JO(mr()),Qc=class extends e0.default{patternBetween(){return/^\s*(tot|-)\s*$/i}};Es.default=Qc});var Dg=b(ws=>{"use strict";var t0=ws&&ws.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ws,"__esModule",{value:!0});var r0=t0(Mr()),Xc=class extends r0.default{patternBetween(){return new RegExp("^\\s*(om|na|voor|in de|,|-)?\\s*$")}};ws.default=Xc});var Rg=b(Nr=>{"use strict";var n0=Nr&&Nr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),i0=Nr&&Nr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),s0=Nr&&Nr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&n0(e,r,t);return i0(e,r),e};Object.defineProperty(Nr,"__esModule",{value:!0});var a0=W(),no=s0(Cr()),Zc=class extends a0.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 no.now(e.reference);case"vandaag":return no.today(e.reference);case"morgen":case"morgend":return no.tomorrow(e.reference);case"gisteren":return no.yesterday(e.reference)}return i}};Nr.default=Zc});var Mg=b(ks=>{"use strict";var o0=ks&&ks.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ks,"__esModule",{value:!0});var io=je(),u0=W(),l0=o0(Te()),c0=$t(),d0=1,f0=2,Jc=class extends u0.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(deze)?\s*(namiddag|avond|middernacht|ochtend|middag|'s middags|'s avonds|'s ochtends)(?=\W|$)/i}innerExtract(e,t){let n=l0.default(e.refDate),i=e.createParsingComponents();switch(t[d0]==="deze"&&(i.assign("day",e.refDate.getDate()),i.assign("month",e.refDate.getMonth()+1),i.assign("year",e.refDate.getFullYear())),t[f0].toLowerCase()){case"namiddag":case"'s namiddags":i.imply("meridiem",io.Meridiem.PM),i.imply("hour",15);break;case"avond":case"'s avonds'":i.imply("meridiem",io.Meridiem.PM),i.imply("hour",20);break;case"middernacht":c0.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"ochtend":case"'s ochtends":i.imply("meridiem",io.Meridiem.AM),i.imply("hour",6);break;case"middag":case"'s middags":i.imply("meridiem",io.Meridiem.AM),i.imply("hour",12);break}return i}};ks.default=Jc});var Mt=b(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.parseTimeUnits=oe.TIME_UNITS_PATTERN=oe.parseYear=oe.YEAR_PATTERN=oe.parseOrdinalNumberPattern=oe.ORDINAL_NUMBER_PATTERN=oe.parseNumberPattern=oe.NUMBER_PATTERN=oe.TIME_UNIT_DICTIONARY=oe.ORDINAL_WORD_DICTIONARY=oe.INTEGER_WORD_DICTIONARY=oe.MONTH_DICTIONARY=oe.WEEKDAY_DICTIONARY=void 0;var so=Ee(),p0=rt();oe.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};oe.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};oe.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};oe.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};oe.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"};oe.NUMBER_PATTERN=`(?:${so.matchAnyPattern(oe.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+[\\.,][0-9]+|halve?|half|paar)`;function Ag(r){let e=r.toLowerCase();return oe.INTEGER_WORD_DICTIONARY[e]!==void 0?oe.INTEGER_WORD_DICTIONARY[e]:e==="paar"?2:e==="half"||e.match(/halve?/)?.5:parseFloat(e.replace(",","."))}oe.parseNumberPattern=Ag;oe.ORDINAL_NUMBER_PATTERN=`(?:${so.matchAnyPattern(oe.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:ste|de)?)`;function h0(r){let e=r.toLowerCase();return oe.ORDINAL_WORD_DICTIONARY[e]!==void 0?oe.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:ste|de)$/i,""),parseInt(e))}oe.parseOrdinalNumberPattern=h0;oe.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:voor Christus|na Christus)|[1-2][0-9]{3}|[5-9][0-9])";function m0(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 p0.findMostLikelyADYear(e)}oe.parseYear=m0;var Cg=`(${oe.NUMBER_PATTERN})\\s{0,5}(${so.matchAnyPattern(oe.TIME_UNIT_DICTIONARY)})\\s{0,5}`,xg=new RegExp(Cg,"i");oe.TIME_UNITS_PATTERN=so.repeatedTimeunitPattern("(?:(?:binnen|in)\\s*)?",Cg);function g0(r){let e={},t=r,n=xg.exec(t);for(;n;)y0(e,n),t=t.substring(n[0].length),n=xg.exec(t);return e}oe.parseTimeUnits=g0;function y0(r,e){let t=Ag(e[1]),n=oe.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Ng=b(td=>{"use strict";Object.defineProperty(td,"__esModule",{value:!0});var Pg=Mt(),T0=Pe(),b0=W(),ed=class extends b0.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(?:binnen|in|binnen de|voor)\\s*("+Pg.TIME_UNITS_PATTERN+")(?=\\W|$)","i")}innerExtract(e,t){let n=Pg.parseTimeUnits(t[1]);return T0.ParsingComponents.createRelativeFromReference(e.reference,n)}};td.default=ed});var Fg=b(nd=>{"use strict";Object.defineProperty(nd,"__esModule",{value:!0});var Ig=Mt(),_0=Ee(),v0=W(),E0=En(),w0=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:op\\s*?)?(?:(deze|vorige|volgende)\\s*(?:week\\s*)?)?(${_0.matchAnyPattern(Ig.WEEKDAY_DICTIONARY)})(?=\\W|$)`,"i"),k0=1,O0=2,S0=3,rd=class extends v0.AbstractParserWithWordBoundaryChecking{innerPattern(){return w0}innerExtract(e,t){let n=t[O0].toLowerCase(),i=Ig.WEEKDAY_DICTIONARY[n],s=t[k0],a=t[S0],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=E0.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};nd.default=rd});var Yg=b(sd=>{"use strict";Object.defineProperty(sd,"__esModule",{value:!0});var D0=rt(),qg=Mt(),ao=Mt(),$g=Mt(),R0=Ee(),M0=W(),x0=new RegExp(`(?:on\\s*?)?(${ao.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:tot|\\-|\\\u2013|until|through|till|\\s)\\s*(${ao.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:of)?\\s*)(`+R0.matchAnyPattern(qg.MONTH_DICTIONARY)+`)(?:(?:-|/|,?\\s*)(${$g.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),A0=3,Lg=1,Ug=2,Wg=4,id=class extends M0.AbstractParserWithWordBoundaryChecking{innerPattern(){return x0}innerExtract(e,t){let n=qg.MONTH_DICTIONARY[t[A0].toLowerCase()],i=ao.parseOrdinalNumberPattern(t[Lg]);if(i>31)return t.index=t.index+t[Lg].length,null;let s=e.createParsingComponents({day:i,month:n});if(t[Wg]){let u=$g.parseYear(t[Wg]);s.assign("year",u)}else{let u=D0.findYearClosestToRef(e.refDate,i,n);s.imply("year",u)}if(!t[Ug])return s;let a=ao.parseOrdinalNumberPattern(t[Ug]),o=e.createParsingResult(t.index,t[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",a),o}};sd.default=id});var Hg=b(od=>{"use strict";Object.defineProperty(od,"__esModule",{value:!0});var Gg=Mt(),C0=rt(),P0=Ee(),Bg=Mt(),N0=W(),I0=new RegExp(`(${P0.matchAnyPattern(Gg.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${Bg.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),F0=1,jg=2,ad=class extends N0.AbstractParserWithWordBoundaryChecking{innerPattern(){return I0}innerExtract(e,t){let n=e.createParsingComponents();n.imply("day",1);let i=t[F0],s=Gg.MONTH_DICTIONARY[i.toLowerCase()];if(n.assign("month",s),t[jg]){let a=Bg.parseYear(t[jg]);n.assign("year",a)}else{let a=C0.findYearClosestToRef(e.refDate,1,s);n.imply("year",a)}return n}};od.default=ad});var zg=b(ld=>{"use strict";Object.defineProperty(ld,"__esModule",{value:!0});var L0=W(),U0=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),W0=1,q0=2,ud=class extends L0.AbstractParserWithWordBoundaryChecking{innerPattern(){return U0}innerExtract(e,t){let n=parseInt(t[q0]),i=parseInt(t[W0]);return e.createParsingComponents().imply("day",1).assign("month",i).assign("year",n)}};ld.default=ud});var Kg=b(dd=>{"use strict";Object.defineProperty(dd,"__esModule",{value:!0});var $0=_n(),cd=class extends $0.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)}};dd.default=cd});var Xg=b(pd=>{"use strict";Object.defineProperty(pd,"__esModule",{value:!0});var Qg=Mt(),Y0=Ee(),j0=W(),G0=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${Y0.matchAnyPattern(Qg.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),B0=1,H0=2,Vg=3,z0=4,fd=class extends j0.AbstractParserWithWordBoundaryChecking{innerPattern(){return G0}innerExtract(e,t){let n=t[Vg]?parseInt(t[Vg]):Qg.MONTH_DICTIONARY[t[H0].toLowerCase()];if(n<1||n>12)return null;let i=parseInt(t[B0]);return{day:parseInt(t[z0]),month:n,year:i}}};pd.default=fd});var Zg=b(Os=>{"use strict";var K0=Os&&Os.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Os,"__esModule",{value:!0});var V0=W(),oo=je(),hd=$t(),Q0=K0(Te()),X0=1,Z0=2,md=class extends V0.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(gisteren|morgen|van)(ochtend|middag|namiddag|avond|nacht)(?=\W|$)/i}innerExtract(e,t){let n=t[X0].toLowerCase(),i=t[Z0].toLowerCase(),s=e.createParsingComponents(),a=Q0.default(e.refDate);switch(n){case"gisteren":hd.assignSimilarDate(s,a.add(-1,"day"));break;case"van":hd.assignSimilarDate(s,a);break;case"morgen":hd.assignTheNextDay(s,a);break}switch(i){case"ochtend":s.imply("meridiem",oo.Meridiem.AM),s.imply("hour",6);break;case"middag":s.imply("meridiem",oo.Meridiem.AM),s.imply("hour",12);break;case"namiddag":s.imply("meridiem",oo.Meridiem.PM),s.imply("hour",15);break;case"avond":s.imply("meridiem",oo.Meridiem.PM),s.imply("hour",20);break}return s}};Os.default=md});var ey=b(yd=>{"use strict";Object.defineProperty(yd,"__esModule",{value:!0});var Jg=Mt(),J0=Pe(),eS=W(),tS=Yt(),rS=new RegExp(`(deze|vorige|afgelopen|komende|over|\\+|-)\\s*(${Jg.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),gd=class extends eS.AbstractParserWithWordBoundaryChecking{innerPattern(){return rS}innerExtract(e,t){let n=t[1].toLowerCase(),i=Jg.parseTimeUnits(t[2]);switch(n){case"vorige":case"afgelopen":case"-":i=tS.reverseTimeUnits(i);break}return J0.ParsingComponents.createRelativeFromReference(e.reference,i)}};yd.default=gd});var ny=b(Ss=>{"use strict";var nS=Ss&&Ss.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ss,"__esModule",{value:!0});var ry=Mt(),ty=Pe(),iS=nS(Te()),sS=W(),aS=Ee(),oS=new RegExp(`(dit|deze|komende|volgend|volgende|afgelopen|vorige)\\s*(${aS.matchAnyPattern(ry.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),uS=1,lS=2,Td=class extends sS.AbstractParserWithWordBoundaryChecking{innerPattern(){return oS}innerExtract(e,t){let n=t[uS].toLowerCase(),i=t[lS].toLowerCase(),s=ry.TIME_UNIT_DICTIONARY[i];if(n=="volgend"||n=="volgende"||n=="komende"){let u={};return u[s]=1,ty.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="afgelopen"||n=="vorige"){let u={};return u[s]=-1,ty.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=iS.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}};Ss.default=Td});var iy=b(vd=>{"use strict";Object.defineProperty(vd,"__esModule",{value:!0});var _d=Mt(),cS=Pe(),dS=W(),fS=Yt(),pS=new RegExp("("+_d.TIME_UNITS_PATTERN+")(?:geleden|voor|eerder)(?=(?:\\W|$))","i"),hS=new RegExp("("+_d.TIME_UNITS_PATTERN+")geleden(?=(?:\\W|$))","i"),bd=class extends dS.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?hS:pS}innerExtract(e,t){let n=_d.parseTimeUnits(t[1]),i=fS.reverseTimeUnits(n);return cS.ParsingComponents.createRelativeFromReference(e.reference,i)}};vd.default=bd});var sy=b(kd=>{"use strict";Object.defineProperty(kd,"__esModule",{value:!0});var wd=Mt(),mS=Pe(),gS=W(),yS=new RegExp("("+wd.TIME_UNITS_PATTERN+")(later|na|vanaf nu|voortaan|vooruit|uit)(?=(?:\\W|$))","i"),TS=new RegExp("("+wd.TIME_UNITS_PATTERN+")(later|vanaf nu)(?=(?:\\W|$))","i"),bS=1,Ed=class extends gS.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?TS:yS}innerExtract(e,t){let n=wd.parseTimeUnits(t[bS]);return mS.ParsingComponents.createRelativeFromReference(e.reference,n)}};kd.default=Ed});var ly=b(Qe=>{"use strict";var it=Qe&&Qe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Qe,"__esModule",{value:!0});Qe.createConfiguration=Qe.createCasualConfiguration=Qe.parseDate=Qe.parse=Qe.strict=Qe.casual=void 0;var _S=xr(),ay=tr(),vS=it(Sg()),ES=it(Dg()),wS=it(Rg()),kS=it(Mg()),OS=it(wn()),SS=it(Ng()),DS=it(Fg()),RS=it(Yg()),oy=it(Hg()),MS=it(zg()),xS=it(Kg()),AS=it(Xg()),CS=it(Zg()),PS=it(ey()),NS=it(ny()),IS=it(iy()),FS=it(sy());Qe.casual=new ay.Chrono(uy());Qe.strict=new ay.Chrono(Od(!0));function LS(r,e,t){return Qe.casual.parse(r,e,t)}Qe.parse=LS;function US(r,e,t){return Qe.casual.parseDate(r,e,t)}Qe.parseDate=US;function uy(r=!0){let e=Od(!1,r);return e.parsers.unshift(new wS.default),e.parsers.unshift(new kS.default),e.parsers.unshift(new CS.default),e.parsers.unshift(new oy.default),e.parsers.unshift(new NS.default),e.parsers.unshift(new PS.default),e}Qe.createCasualConfiguration=uy;function Od(r=!0,e=!0){return _S.includeCommonConfiguration({parsers:[new OS.default(e),new SS.default,new RS.default,new oy.default,new DS.default,new AS.default,new MS.default,new xS.default(r),new IS.default(r),new FS.default(r)],refiners:[new ES.default,new vS.default]},r)}Qe.createConfiguration=Od});var py=b(Ds=>{"use strict";var WS=Ds&&Ds.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ds,"__esModule",{value:!0});var qS=WS(Te()),$S=W(),YS=1,cy=2,jS=3,dy=4,fy=5,GS=6,Sd=class extends $S.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=qS.default(e.refDate),a=s;if(t[YS])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[cy]){let o=t[cy],u=t[jS];o=="\u660E"||o=="\u807D"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u5F8C"?a=a.add(2,"day"):o=="\u5927\u5F8C"&&(a=a.add(3,"day")),u=="\u65E9"||u=="\u671D"?i.start.imply("hour",6):u=="\u665A"&&(i.start.imply("hour",22),i.start.imply("meridiem",1))}else if(t[dy]){let u=t[dy][0];u=="\u65E9"||u=="\u671D"||u=="\u4E0A"?i.start.imply("hour",6):u=="\u4E0B"||u=="\u664F"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):u=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):u=="\u591C"||u=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):u=="\u51CC"&&i.start.imply("hour",0)}else if(t[fy]){let o=t[fy];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[GS];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}};Ds.default=Sd});var di=b(kt=>{"use strict";Object.defineProperty(kt,"__esModule",{value:!0});kt.zhStringToYear=kt.zhStringToNumber=kt.WEEKDAY_OFFSET=kt.NUMBER=void 0;kt.NUMBER={\u96F6:0,\u4E00:1,\u4E8C:2,\u5169:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6,\u4E03:7,\u516B:8,\u4E5D:9,\u5341:10,\u5EFF:20,\u5345:30};kt.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function BS(r){let e=0;for(let t=0;t{"use strict";var zS=Rs&&Rs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Rs,"__esModule",{value:!0});var KS=zS(Te()),VS=W(),Sn=di(),Dd=1,hy=2,Rd=3,Md=class extends VS.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(Sn.NUMBER).join("")+"]{4}|["+Object.keys(Sn.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(Sn.NUMBER).join("")+"]{1,2})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(Sn.NUMBER).join("")+"]{1,2})?(?:\\s*)(?:\u65E5|\u865F)?")}innerExtract(e,t){let n=KS.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=parseInt(t[hy]);if(isNaN(s)&&(s=Sn.zhStringToNumber(t[hy])),i.start.assign("month",s),t[Rd]){let a=parseInt(t[Rd]);isNaN(a)&&(a=Sn.zhStringToNumber(t[Rd])),i.start.assign("day",a)}else i.start.imply("day",n.date());if(t[Dd]){let a=parseInt(t[Dd]);isNaN(a)&&(a=Sn.zhStringToYear(t[Dd])),i.start.assign("year",a)}else i.start.imply("year",n.year());return i}};Rs.default=Md});var yy=b(Ms=>{"use strict";var QS=Ms&&Ms.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ms,"__esModule",{value:!0});var XS=QS(Te()),ZS=W(),gy=di(),JS=new RegExp("(\\d+|["+Object.keys(gy.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"),xd=1,eD=2,Ad=class extends ZS.AbstractParserWithWordBoundaryChecking{innerPattern(){return JS}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=parseInt(t[xd]);if(isNaN(i)&&(i=gy.zhStringToNumber(t[xd])),isNaN(i)){let u=t[xd];if(u==="\u5E7E")i=3;else if(u==="\u534A")i=.5;else return null}let s=XS.default(e.refDate),o=t[eD][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)}};Ms.default=Ad});var by=b(xs=>{"use strict";var tD=xs&&xs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(xs,"__esModule",{value:!0});var rD=tD(Te()),nD=W(),Ty=di(),iD=new RegExp("(?\u4E0A|\u4ECA|\u4E0B|\u9019|\u5462)(?:\u500B)?(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?"+Object.keys(Ty.WEEKDAY_OFFSET).join("|")+")"),Cd=class extends nD.AbstractParserWithWordBoundaryChecking{innerPattern(){return iD}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=Ty.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=rD.default(e.refDate),l=!1,c=u.day();return a=="last"||a=="past"?(u=u.day(s-7),l=!0):a=="next"?(u=u.day(s+7),l=!0):a=="this"?u=u.day(s):Math.abs(s-7-c){"use strict";var sD=As&&As.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(As,"__esModule",{value:!0});var aD=sD(Te()),oD=W(),Bt=di(),uD=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(Bt.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\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"),lD=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(Bt.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\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"),uo=1,lo=2,co=3,fo=4,po=5,ho=6,Gt=7,fi=8,mo=9,Pd=class extends oD.AbstractParserWithWordBoundaryChecking{innerPattern(){return uD}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=aD.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=n.clone();if(t[uo]){var a=t[uo];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[fo]){var o=t[fo];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[fi]){var p=parseInt(t[fi]);if(isNaN(p)&&(p=Bt.zhStringToNumber(t[fi])),p>=60)return null;i.start.assign("second",p)}if(u=parseInt(t[ho]),isNaN(u)&&(u=Bt.zhStringToNumber(t[ho])),t[Gt]?t[Gt]=="\u534A"?l=30:t[Gt]=="\u6B63"||t[Gt]=="\u6574"?l=0:(l=parseInt(t[Gt]),isNaN(l)&&(l=Bt.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[mo]){if(u>12)return null;var h=t[mo][0].toLowerCase();h=="a"&&(c=0,u==12&&(u=0)),h=="p"&&(c=1,u!=12&&(u+=12))}else if(t[lo]){var _=t[lo],y=_[0];y=="\u671D"||y=="\u65E9"?(c=0,u==12&&(u=0)):y=="\u665A"&&(c=1,u!=12&&(u+=12))}else if(t[co]){var w=t[co],M=w[0];M=="\u4E0A"||M=="\u671D"||M=="\u65E9"||M=="\u51CC"?(c=0,u==12&&(u=0)):(M=="\u4E0B"||M=="\u664F"||M=="\u665A")&&(c=1,u!=12&&(u+=12))}else if(t[po]){var P=t[po],N=P[0];N=="\u4E0A"||N=="\u671D"||N=="\u65E9"||N=="\u51CC"?(c=0,u==12&&(u=0)):(N=="\u4E0B"||N=="\u664F"||N=="\u665A")&&(c=1,u!=12&&(u+=12))}if(i.start.assign("hour",u),i.start.assign("minute",l),c>=0?i.start.assign("meridiem",c):u<12?i.start.imply("meridiem",0):i.start.imply("meridiem",1),t=lD.exec(e.text.substring(i.index+i.text.length)),!t)return i.text.match(/^\d+$/)?null:i;let F=s.clone();if(i.end=e.createParsingComponents(),t[uo]){var a=t[uo];a=="\u660E"||a=="\u807D"?n.hour()>1&&F.add(1,"day"):a=="\u6628"||a=="\u5C0B"||a=="\u7434"?F.add(-1,"day"):a=="\u524D"?F.add(-2,"day"):a=="\u5927\u524D"?F.add(-3,"day"):a=="\u5F8C"?F.add(2,"day"):a=="\u5927\u5F8C"&&F.add(3,"day"),i.end.assign("day",F.date()),i.end.assign("month",F.month()+1),i.end.assign("year",F.year())}else if(t[fo]){var o=t[fo];o=="\u660E"||o=="\u807D"?F.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?F.add(-1,"day"):o=="\u524D"?F.add(-2,"day"):o=="\u5927\u524D"?F.add(-3,"day"):o=="\u5F8C"?F.add(2,"day"):o=="\u5927\u5F8C"&&F.add(3,"day"),i.end.assign("day",F.date()),i.end.assign("month",F.month()+1),i.end.assign("year",F.year())}else i.end.imply("day",F.date()),i.end.imply("month",F.month()+1),i.end.imply("year",F.year());if(u=0,l=0,c=-1,t[fi]){var p=parseInt(t[fi]);if(isNaN(p)&&(p=Bt.zhStringToNumber(t[fi])),p>=60)return null;i.end.assign("second",p)}if(u=parseInt(t[ho]),isNaN(u)&&(u=Bt.zhStringToNumber(t[ho])),t[Gt]?t[Gt]=="\u534A"?l=30:t[Gt]=="\u6B63"||t[Gt]=="\u6574"?l=0:(l=parseInt(t[Gt]),isNaN(l)&&(l=Bt.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[mo]){if(u>12)return null;var h=t[mo][0].toLowerCase();h=="a"&&(c=0,u==12&&(u=0)),h=="p"&&(c=1,u!=12&&(u+=12)),i.start.isCertain("meridiem")||(c==0?(i.start.imply("meridiem",0),i.start.get("hour")==12&&i.start.assign("hour",0)):(i.start.imply("meridiem",1),i.start.get("hour")!=12&&i.start.assign("hour",i.start.get("hour")+12)))}else if(t[lo]){var _=t[lo],y=_[0];y=="\u671D"||y=="\u65E9"?(c=0,u==12&&(u=0)):y=="\u665A"&&(c=1,u!=12&&(u+=12))}else if(t[co]){var w=t[co],M=w[0];M=="\u4E0A"||M=="\u671D"||M=="\u65E9"||M=="\u51CC"?(c=0,u==12&&(u=0)):(M=="\u4E0B"||M=="\u664F"||M=="\u665A")&&(c=1,u!=12&&(u+=12))}else if(t[po]){var P=t[po],N=P[0];N=="\u4E0A"||N=="\u671D"||N=="\u65E9"||N=="\u51CC"?(c=0,u==12&&(u=0)):(N=="\u4E0B"||N=="\u664F"||N=="\u665A")&&(c=1,u!=12&&(u+=12))}return i.text=i.text+t[0],i.end.assign("hour",u),i.end.assign("minute",l),c>=0?i.end.assign("meridiem",c):i.start.isCertain("meridiem")&&i.start.get("meridiem")==1&&i.start.get("hour")>u?i.end.imply("meridiem",0):u>12&&i.end.imply("meridiem",1),i.end.date().getTime(){"use strict";var cD=Cs&&Cs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Cs,"__esModule",{value:!0});var dD=cD(Te()),fD=W(),vy=di(),pD=new RegExp("(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?"+Object.keys(vy.WEEKDAY_OFFSET).join("|")+")"),Nd=class extends fD.AbstractParserWithWordBoundaryChecking{innerPattern(){return pD}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=vy.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=dD.default(e.refDate),o=!1,u=a.day();return Math.abs(s-7-u){"use strict";var hD=Ps&&Ps.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ps,"__esModule",{value:!0});var mD=hD(mr()),Id=class extends mD.default{patternBetween(){return/^\s*(至|到|\-|\~|~|-|ー)\s*$/i}};Ps.default=Id});var ky=b(Ns=>{"use strict";var gD=Ns&&Ns.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ns,"__esModule",{value:!0});var yD=gD(Mr()),Fd=class extends yD.default{patternBetween(){return/^\s*$/i}};Ns.default=Fd});var Oy=b(qe=>{"use strict";var Ir=qe&&qe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(qe,"__esModule",{value:!0});qe.createConfiguration=qe.createCasualConfiguration=qe.parseDate=qe.parse=qe.strict=qe.casual=qe.hant=void 0;var Ld=tr(),TD=Ir(Ga()),bD=xr(),_D=Ir(py()),vD=Ir(my()),ED=Ir(yy()),wD=Ir(by()),kD=Ir(_y()),OD=Ir(Ey()),SD=Ir(wy()),DD=Ir(ky());qe.hant=new Ld.Chrono(Ud());qe.casual=new Ld.Chrono(Ud());qe.strict=new Ld.Chrono(Wd());function RD(r,e,t){return qe.casual.parse(r,e,t)}qe.parse=RD;function MD(r,e,t){return qe.casual.parseDate(r,e,t)}qe.parseDate=MD;function Ud(){let r=Wd();return r.parsers.unshift(new _D.default),r}qe.createCasualConfiguration=Ud;function Wd(){let r=bD.includeCommonConfiguration({parsers:[new vD.default,new wD.default,new OD.default,new kD.default,new ED.default],refiners:[new SD.default,new DD.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof TD.default)),r}qe.createConfiguration=Wd});var My=b(Is=>{"use strict";var xD=Is&&Is.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Is,"__esModule",{value:!0});var AD=xD(Te()),CD=W(),PD=1,Sy=2,ND=3,Dy=4,Ry=5,ID=6,qd=class extends CD.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=AD.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[Sy]){let o=t[Sy],u=t[ND];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[Dy]){let u=t[Dy][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[Ry]){let o=t[Ry];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[ID];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}};Is.default=qd});var pi=b(Ot=>{"use strict";Object.defineProperty(Ot,"__esModule",{value:!0});Ot.zhStringToYear=Ot.zhStringToNumber=Ot.WEEKDAY_OFFSET=Ot.NUMBER=void 0;Ot.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};Ot.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function FD(r){let e=0;for(let t=0;t{"use strict";var UD=Fs&&Fs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Fs,"__esModule",{value:!0});var WD=UD(Te()),qD=W(),Dn=pi(),$d=1,xy=2,Yd=3,jd=class extends qD.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(Dn.NUMBER).join("")+"]{4}|["+Object.keys(Dn.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(Dn.NUMBER).join("")+"]{1,3})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(Dn.NUMBER).join("")+"]{1,3})?(?:\\s*)(?:\u65E5|\u53F7)?")}innerExtract(e,t){let n=WD.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=parseInt(t[xy]);if(isNaN(s)&&(s=Dn.zhStringToNumber(t[xy])),i.start.assign("month",s),t[Yd]){let a=parseInt(t[Yd]);isNaN(a)&&(a=Dn.zhStringToNumber(t[Yd])),i.start.assign("day",a)}else i.start.imply("day",n.date());if(t[$d]){let a=parseInt(t[$d]);isNaN(a)&&(a=Dn.zhStringToYear(t[$d])),i.start.assign("year",a)}else i.start.imply("year",n.year());return i}};Fs.default=jd});var Py=b(Ls=>{"use strict";var $D=Ls&&Ls.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ls,"__esModule",{value:!0});var YD=$D(Te()),jD=W(),Cy=pi(),GD=new RegExp("(\\d+|["+Object.keys(Cy.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"),Gd=1,BD=2,Bd=class extends jD.AbstractParserWithWordBoundaryChecking{innerPattern(){return GD}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=parseInt(t[Gd]);if(isNaN(i)&&(i=Cy.zhStringToNumber(t[Gd])),isNaN(i)){let u=t[Gd];if(u==="\u51E0")i=3;else if(u==="\u534A")i=.5;else return null}let s=YD.default(e.refDate),o=t[BD][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)}};Ls.default=Bd});var Iy=b(Us=>{"use strict";var HD=Us&&Us.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Us,"__esModule",{value:!0});var zD=HD(Te()),KD=W(),Ny=pi(),VD=new RegExp("(?\u4E0A|\u4E0B|\u8FD9)(?:\u4E2A)?(?:\u661F\u671F|\u793C\u62DC|\u5468)(?"+Object.keys(Ny.WEEKDAY_OFFSET).join("|")+")"),Hd=class extends KD.AbstractParserWithWordBoundaryChecking{innerPattern(){return VD}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=Ny.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=null,o=t.groups.prefix;o=="\u4E0A"?a="last":o=="\u4E0B"?a="next":o=="\u8FD9"&&(a="this");let u=zD.default(e.refDate),l=!1,c=u.day();return a=="last"||a=="past"?(u=u.day(s-7),l=!0):a=="next"?(u=u.day(s+7),l=!0):a=="this"?u=u.day(s):Math.abs(s-7-c){"use strict";var QD=Ws&&Ws.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ws,"__esModule",{value:!0});var XD=QD(Te()),ZD=W(),zt=pi(),JD=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(zt.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(zt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(zt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),eR=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(zt.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(zt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(zt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),go=1,yo=2,To=3,bo=4,_o=5,vo=6,Ht=7,hi=8,Eo=9,zd=class extends ZD.AbstractParserWithWordBoundaryChecking{innerPattern(){return JD}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=XD.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=n.clone();if(t[go]){let c=t[go];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[bo]){let c=t[bo];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[hi]){let c=parseInt(t[hi]);if(isNaN(c)&&(c=zt.zhStringToNumber(t[hi])),c>=60)return null;i.start.assign("second",c)}if(a=parseInt(t[vo]),isNaN(a)&&(a=zt.zhStringToNumber(t[vo])),t[Ht]?t[Ht]=="\u534A"?o=30:t[Ht]=="\u6B63"||t[Ht]=="\u6574"?o=0:(o=parseInt(t[Ht]),isNaN(o)&&(o=zt.zhStringToNumber(t[Ht]))):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(u=1),t[Eo]){if(a>12)return null;let c=t[Eo][0].toLowerCase();c=="a"&&(u=0,a==12&&(a=0)),c=="p"&&(u=1,a!=12&&(a+=12))}else if(t[yo]){let p=t[yo][0];p=="\u65E9"?(u=0,a==12&&(a=0)):p=="\u665A"&&(u=1,a!=12&&(a+=12))}else if(t[To]){let p=t[To][0];p=="\u4E0A"||p=="\u65E9"||p=="\u51CC"?(u=0,a==12&&(a=0)):(p=="\u4E0B"||p=="\u665A")&&(u=1,a!=12&&(a+=12))}else if(t[_o]){let p=t[_o][0];p=="\u4E0A"||p=="\u65E9"||p=="\u51CC"?(u=0,a==12&&(a=0)):(p=="\u4E0B"||p=="\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=eR.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[go]){let c=t[go];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[bo]){let c=t[bo];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[hi]){let c=parseInt(t[hi]);if(isNaN(c)&&(c=zt.zhStringToNumber(t[hi])),c>=60)return null;i.end.assign("second",c)}if(a=parseInt(t[vo]),isNaN(a)&&(a=zt.zhStringToNumber(t[vo])),t[Ht]?t[Ht]=="\u534A"?o=30:t[Ht]=="\u6B63"||t[Ht]=="\u6574"?o=0:(o=parseInt(t[Ht]),isNaN(o)&&(o=zt.zhStringToNumber(t[Ht]))):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(u=1),t[Eo]){if(a>12)return null;let c=t[Eo][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[yo]){let p=t[yo][0];p=="\u65E9"?(u=0,a==12&&(a=0)):p=="\u665A"&&(u=1,a!=12&&(a+=12))}else if(t[To]){let p=t[To][0];p=="\u4E0A"||p=="\u65E9"||p=="\u51CC"?(u=0,a==12&&(a=0)):(p=="\u4E0B"||p=="\u665A")&&(u=1,a!=12&&(a+=12))}else if(t[_o]){let p=t[_o][0];p=="\u4E0A"||p=="\u65E9"||p=="\u51CC"?(u=0,a==12&&(a=0)):(p=="\u4E0B"||p=="\u665A")&&(u=1,a!=12&&(a+=12))}return i.text=i.text+t[0],i.end.assign("hour",a),i.end.assign("minute",o),u>=0?i.end.assign("meridiem",u):i.start.isCertain("meridiem")&&i.start.get("meridiem")==1&&i.start.get("hour")>a?i.end.imply("meridiem",0):a>12&&i.end.imply("meridiem",1),i.end.date().getTime(){"use strict";var tR=qs&&qs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(qs,"__esModule",{value:!0});var rR=tR(Te()),nR=W(),Ly=pi(),iR=new RegExp("(?:\u661F\u671F|\u793C\u62DC|\u5468)(?"+Object.keys(Ly.WEEKDAY_OFFSET).join("|")+")"),Kd=class extends nR.AbstractParserWithWordBoundaryChecking{innerPattern(){return iR}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=Ly.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=rR.default(e.refDate),o=!1,u=a.day();return Math.abs(s-7-u){"use strict";var sR=$s&&$s.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($s,"__esModule",{value:!0});var aR=sR(mr()),Vd=class extends aR.default{patternBetween(){return/^\s*(至|到|-|~|~|-|ー)\s*$/i}};$s.default=Vd});var qy=b(Ys=>{"use strict";var oR=Ys&&Ys.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ys,"__esModule",{value:!0});var uR=oR(Mr()),Qd=class extends uR.default{patternBetween(){return/^\s*$/i}};Ys.default=Qd});var $y=b($e=>{"use strict";var Fr=$e&&$e.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($e,"__esModule",{value:!0});$e.createConfiguration=$e.createCasualConfiguration=$e.parseDate=$e.parse=$e.strict=$e.casual=$e.hans=void 0;var Xd=tr(),lR=Fr(Ga()),cR=xr(),dR=Fr(My()),fR=Fr(Ay()),pR=Fr(Py()),hR=Fr(Iy()),mR=Fr(Fy()),gR=Fr(Uy()),yR=Fr(Wy()),TR=Fr(qy());$e.hans=new Xd.Chrono(Zd());$e.casual=new Xd.Chrono(Zd());$e.strict=new Xd.Chrono(Jd());function bR(r,e,t){return $e.casual.parse(r,e,t)}$e.parse=bR;function _R(r,e,t){return $e.casual.parseDate(r,e,t)}$e.parseDate=_R;function Zd(){let r=Jd();return r.parsers.unshift(new dR.default),r}$e.createCasualConfiguration=Zd;function Jd(){let r=cR.includeCommonConfiguration({parsers:[new fR.default,new hR.default,new gR.default,new mR.default,new pR.default],refiners:[new yR.default,new TR.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof lR.default)),r}$e.createConfiguration=Jd});var jy=b(xt=>{"use strict";var Yy=xt&&xt.__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]}),vR=xt&&xt.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),ER=xt&&xt.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Yy(e,r,t)},wR=xt&&xt.__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)&&Yy(e,r,t);return vR(e,r),e};Object.defineProperty(xt,"__esModule",{value:!0});xt.hans=void 0;ER(Oy(),xt);xt.hans=wR($y())});var St=b(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.parseTimeUnits=ee.TIME_UNITS_PATTERN=ee.parseYear=ee.YEAR_PATTERN=ee.parseOrdinalNumberPattern=ee.ORDINAL_NUMBER_PATTERN=ee.parseNumberPattern=ee.NUMBER_PATTERN=ee.TIME_UNIT_DICTIONARY=ee.ORDINAL_WORD_DICTIONARY=ee.INTEGER_WORD_DICTIONARY=ee.MONTH_DICTIONARY=ee.FULL_MONTH_NAME_DICTIONARY=ee.WEEKDAY_DICTIONARY=ee.REGEX_PARTS=void 0;var wo=Ee(),kR=rt();ee.REGEX_PARTS={leftBoundary:"([^\\p{L}\\p{N}_]|^)",rightBoundary:"(?=[^\\p{L}\\p{N}_]|$)",flags:"iu"};ee.WEEKDAY_DICTIONARY={\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435:0,\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u044F:0,\u0432\u0441\u043A:0,"\u0432\u0441\u043A.":0,\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A:1,\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A\u0430:1,\u043F\u043D:1,"\u043F\u043D.":1,\u0432\u0442\u043E\u0440\u043D\u0438\u043A:2,\u0432\u0442\u043E\u0440\u043D\u0438\u043A\u0430:2,\u0432\u0442:2,"\u0432\u0442.":2,\u0441\u0440\u0435\u0434\u0430:3,\u0441\u0440\u0435\u0434\u044B:3,\u0441\u0440\u0435\u0434\u0443:3,\u0441\u0440:3,"\u0441\u0440.":3,\u0447\u0435\u0442\u0432\u0435\u0440\u0433:4,\u0447\u0435\u0442\u0432\u0435\u0440\u0433\u0430:4,\u0447\u0442:4,"\u0447\u0442.":4,\u043F\u044F\u0442\u043D\u0438\u0446\u0430:5,\u043F\u044F\u0442\u043D\u0438\u0446\u0443:5,\u043F\u044F\u0442\u043D\u0438\u0446\u044B:5,\u043F\u0442:5,"\u043F\u0442.":5,\u0441\u0443\u0431\u0431\u043E\u0442\u0430:6,\u0441\u0443\u0431\u0431\u043E\u0442\u0443:6,\u0441\u0443\u0431\u0431\u043E\u0442\u044B:6,\u0441\u0431:6,"\u0441\u0431.":6};ee.FULL_MONTH_NAME_DICTIONARY={\u044F\u043D\u0432\u0430\u0440\u044C:1,\u044F\u043D\u0432\u0430\u0440\u044F:1,\u044F\u043D\u0432\u0430\u0440\u0435:1,\u0444\u0435\u0432\u0440\u044F\u043B\u044C:2,\u0444\u0435\u0432\u0440\u044F\u043B\u044F:2,\u0444\u0435\u0432\u0440\u044F\u043B\u0435:2,\u043C\u0430\u0440\u0442:3,\u043C\u0430\u0440\u0442\u0430:3,\u043C\u0430\u0440\u0442\u0435:3,\u0430\u043F\u0440\u0435\u043B\u044C:4,\u0430\u043F\u0440\u0435\u043B\u044F:4,\u0430\u043F\u0440\u0435\u043B\u0435:4,\u043C\u0430\u0439:5,\u043C\u0430\u044F:5,\u043C\u0430\u0435:5,\u0438\u044E\u043D\u044C:6,\u0438\u044E\u043D\u044F:6,\u0438\u044E\u043D\u0435:6,\u0438\u044E\u043B\u044C:7,\u0438\u044E\u043B\u044F:7,\u0438\u044E\u043B\u0435:7,\u0430\u0432\u0433\u0443\u0441\u0442:8,\u0430\u0432\u0433\u0443\u0441\u0442\u0430:8,\u0430\u0432\u0433\u0443\u0441\u0442\u0435:8,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044C:9,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044F:9,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u0435:9,\u043E\u043A\u0442\u044F\u0431\u0440\u044C:10,\u043E\u043A\u0442\u044F\u0431\u0440\u044F:10,\u043E\u043A\u0442\u044F\u0431\u0440\u0435:10,\u043D\u043E\u044F\u0431\u0440\u044C:11,\u043D\u043E\u044F\u0431\u0440\u044F:11,\u043D\u043E\u044F\u0431\u0440\u0435:11,\u0434\u0435\u043A\u0430\u0431\u0440\u044C:12,\u0434\u0435\u043A\u0430\u0431\u0440\u044F:12,\u0434\u0435\u043A\u0430\u0431\u0440\u0435:12};ee.MONTH_DICTIONARY=Object.assign(Object.assign({},ee.FULL_MONTH_NAME_DICTIONARY),{\u044F\u043D\u0432:1,"\u044F\u043D\u0432.":1,\u0444\u0435\u0432:2,"\u0444\u0435\u0432.":2,\u043C\u0430\u0440:3,"\u043C\u0430\u0440.":3,\u0430\u043F\u0440:4,"\u0430\u043F\u0440.":4,\u0430\u0432\u0433:8,"\u0430\u0432\u0433.":8,\u0441\u0435\u043D:9,"\u0441\u0435\u043D.":9,\u043E\u043A\u0442:10,"\u043E\u043A\u0442.":10,\u043D\u043E\u044F:11,"\u043D\u043E\u044F.":11,\u0434\u0435\u043A:12,"\u0434\u0435\u043A.":12});ee.INTEGER_WORD_DICTIONARY={\u043E\u0434\u0438\u043D:1,\u043E\u0434\u043D\u0430:1,\u043E\u0434\u043D\u043E\u0439:1,\u043E\u0434\u043D\u0443:1,\u0434\u0432\u0435:2,\u0434\u0432\u0430:2,\u0434\u0432\u0443\u0445:2,\u0442\u0440\u0438:3,\u0442\u0440\u0435\u0445:3,\u0442\u0440\u0451\u0445:3,\u0447\u0435\u0442\u044B\u0440\u0435:4,\u0447\u0435\u0442\u044B\u0440\u0435\u0445:4,\u0447\u0435\u0442\u044B\u0440\u0451\u0445:4,\u043F\u044F\u0442\u044C:5,\u043F\u044F\u0442\u0438:5,\u0448\u0435\u0441\u0442\u044C:6,\u0448\u0435\u0441\u0442\u0438:6,\u0441\u0435\u043C\u044C:7,\u0441\u0435\u043C\u0438:7,\u0432\u043E\u0441\u0435\u043C\u044C:8,\u0432\u043E\u0441\u0435\u043C\u044C\u043C\u0438:8,\u0434\u0435\u0432\u044F\u0442\u044C:9,\u0434\u0435\u0432\u044F\u0442\u0438:9,\u0434\u0435\u0441\u044F\u0442\u044C:10,\u0434\u0435\u0441\u044F\u0442\u0438:10,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u044C:11,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u0438:11,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u044C:12,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u0438:12};ee.ORDINAL_WORD_DICTIONARY={\u043F\u0435\u0440\u0432\u043E\u0435:1,\u043F\u0435\u0440\u0432\u043E\u0433\u043E:1,\u0432\u0442\u043E\u0440\u043E\u0435:2,\u0432\u0442\u043E\u0440\u043E\u0433\u043E:2,\u0442\u0440\u0435\u0442\u044C\u0435:3,\u0442\u0440\u0435\u0442\u044C\u0435\u0433\u043E:3,\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0435:4,\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0433\u043E:4,\u043F\u044F\u0442\u043E\u0435:5,\u043F\u044F\u0442\u043E\u0433\u043E:5,\u0448\u0435\u0441\u0442\u043E\u0435:6,\u0448\u0435\u0441\u0442\u043E\u0433\u043E:6,\u0441\u0435\u0434\u044C\u043C\u043E\u0435:7,\u0441\u0435\u0434\u044C\u043C\u043E\u0433\u043E:7,\u0432\u043E\u0441\u044C\u043C\u043E\u0435:8,\u0432\u043E\u0441\u044C\u043C\u043E\u0433\u043E:8,\u0434\u0435\u0432\u044F\u0442\u043E\u0435:9,\u0434\u0435\u0432\u044F\u0442\u043E\u0433\u043E:9,\u0434\u0435\u0441\u044F\u0442\u043E\u0435:10,\u0434\u0435\u0441\u044F\u0442\u043E\u0433\u043E:10,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:11,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:11,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:12,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:12,\u0442\u0440\u0438\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:13,\u0442\u0440\u0438\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:13,\u0447\u0435\u0442\u044B\u0440\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:14,\u0447\u0435\u0442\u044B\u0440\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:14,\u043F\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:15,\u043F\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:15,\u0448\u0435\u0441\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:16,\u0448\u0435\u0441\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:16,\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:17,\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:17,\u0432\u043E\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:18,\u0432\u043E\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:18,\u0434\u0435\u0432\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:19,\u0434\u0435\u0432\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:19,\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u043E\u0435:20,\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:20,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0435":21,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0433\u043E":21,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u0442\u043E\u0440\u043E\u0435":22,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u0442\u043E\u0440\u043E\u0433\u043E":22,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0442\u0440\u0435\u0442\u044C\u0435":23,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0442\u0440\u0435\u0442\u044C\u0435\u0433\u043E":23,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0435":24,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0433\u043E":24,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u044F\u0442\u043E\u0435":25,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u044F\u0442\u043E\u0433\u043E":25,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0448\u0435\u0441\u0442\u043E\u0435":26,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0448\u0435\u0441\u0442\u043E\u0433\u043E":26,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0441\u0435\u0434\u044C\u043C\u043E\u0435":27,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0441\u0435\u0434\u044C\u043C\u043E\u0433\u043E":27,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u043E\u0441\u044C\u043C\u043E\u0435":28,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u043E\u0441\u044C\u043C\u043E\u0433\u043E":28,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0434\u0435\u0432\u044F\u0442\u043E\u0435":29,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0434\u0435\u0432\u044F\u0442\u043E\u0433\u043E":29,\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u043E\u0435:30,\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u043E\u0433\u043E:30,"\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0435":31,"\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0433\u043E":31};ee.TIME_UNIT_DICTIONARY={\u0441\u0435\u043A:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u0430:"second",\u0441\u0435\u043A\u0443\u043D\u0434:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u044B:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u0443:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0430:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0438:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u0435\u043A:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0443:"second",\u043C\u0438\u043D:"minute",\u043C\u0438\u043D\u0443\u0442\u0430:"minute",\u043C\u0438\u043D\u0443\u0442:"minute",\u043C\u0438\u043D\u0443\u0442\u044B:"minute",\u043C\u0438\u043D\u0443\u0442\u0443:"minute",\u043C\u0438\u043D\u0443\u0442\u043E\u043A:"minute",\u043C\u0438\u043D\u0443\u0442\u043A\u0438:"minute",\u043C\u0438\u043D\u0443\u0442\u043A\u0443:"minute",\u0447\u0430\u0441:"hour",\u0447\u0430\u0441\u043E\u0432:"hour",\u0447\u0430\u0441\u0430:"hour",\u0447\u0430\u0441\u0443:"hour",\u0447\u0430\u0441\u0438\u043A\u043E\u0432:"hour",\u0447\u0430\u0441\u0438\u043A\u0430:"hour",\u0447\u0430\u0441\u0438\u043A\u0435:"hour",\u0447\u0430\u0441\u0438\u043A:"hour",\u0434\u0435\u043D\u044C:"d",\u0434\u043D\u044F:"d",\u0434\u043D\u0435\u0439:"d",\u0441\u0443\u0442\u043E\u043A:"d",\u0441\u0443\u0442\u043A\u0438:"d",\u043D\u0435\u0434\u0435\u043B\u044F:"week",\u043D\u0435\u0434\u0435\u043B\u0435:"week",\u043D\u0435\u0434\u0435\u043B\u0438:"week",\u043D\u0435\u0434\u0435\u043B\u044E:"week",\u043D\u0435\u0434\u0435\u043B\u044C:"week",\u043D\u0435\u0434\u0435\u043B\u044C\u043A\u0435:"week",\u043D\u0435\u0434\u0435\u043B\u044C\u043A\u0438:"week",\u043D\u0435\u0434\u0435\u043B\u0435\u043A:"week",\u043C\u0435\u0441\u044F\u0446:"month",\u043C\u0435\u0441\u044F\u0446\u0435:"month",\u043C\u0435\u0441\u044F\u0446\u0435\u0432:"month",\u043C\u0435\u0441\u044F\u0446\u0430:"month",\u043A\u0432\u0430\u0440\u0442\u0430\u043B:"quarter",\u043A\u0432\u0430\u0440\u0442\u0430\u043B\u0435:"quarter",\u043A\u0432\u0430\u0440\u0442\u0430\u043B\u043E\u0432:"quarter",\u0433\u043E\u0434:"year",\u0433\u043E\u0434\u0430:"year",\u0433\u043E\u0434\u0443:"year",\u0433\u043E\u0434\u043E\u0432:"year",\u043B\u0435\u0442:"year",\u0433\u043E\u0434\u0438\u043A:"year",\u0433\u043E\u0434\u0438\u043A\u0430:"year",\u0433\u043E\u0434\u0438\u043A\u043E\u0432:"year"};ee.NUMBER_PATTERN=`(?:${wo.matchAnyPattern(ee.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|\u043F\u043E\u043B|\u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E|\u043F\u0430\u0440(?:\u044B|\u0443)|\\s{0,3})`;function By(r){let e=r.toLowerCase();return ee.INTEGER_WORD_DICTIONARY[e]!==void 0?ee.INTEGER_WORD_DICTIONARY[e]:e.match(/несколько/)?3:e.match(/пол/)?.5:e.match(/пар/)?2:e===""?1:parseFloat(e)}ee.parseNumberPattern=By;ee.ORDINAL_NUMBER_PATTERN=`(?:${wo.matchAnyPattern(ee.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:\u0433\u043E|\u043E\u0433\u043E|\u0435|\u043E\u0435)?)`;function OR(r){let e=r.toLowerCase();return ee.ORDINAL_WORD_DICTIONARY[e]!==void 0?ee.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}ee.parseOrdinalNumberPattern=OR;var ef="(?:\\s+(?:\u0433\u043E\u0434\u0443|\u0433\u043E\u0434\u0430|\u0433\u043E\u0434|\u0433|\u0433.))?";ee.YEAR_PATTERN=`(?:[1-9][0-9]{0,3}${ef}\\s*(?:\u043D.\u044D.|\u0434\u043E \u043D.\u044D.|\u043D. \u044D.|\u0434\u043E \u043D. \u044D.)|[1-2][0-9]{3}${ef}|[5-9][0-9]${ef})`;function SR(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 kR.findMostLikelyADYear(e)}ee.parseYear=SR;var Hy=`(${ee.NUMBER_PATTERN})\\s{0,3}(${wo.matchAnyPattern(ee.TIME_UNIT_DICTIONARY)})`,Gy=new RegExp(Hy,"i");ee.TIME_UNITS_PATTERN=wo.repeatedTimeunitPattern("(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s{0,3})?",Hy);function DR(r){let e={},t=r,n=Gy.exec(t);for(;n;)RR(e,n),t=t.substring(n[0].length).trim(),n=Gy.exec(t);return e}ee.parseTimeUnits=DR;function RR(r,e){let t=By(e[1]),n=ee.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Ky=b(rf=>{"use strict";Object.defineProperty(rf,"__esModule",{value:!0});var js=St(),MR=Pe(),xR=W(),zy=`(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s*(?:~\\s*)?)?(${js.TIME_UNITS_PATTERN})${js.REGEX_PARTS.rightBoundary}`,AR=new RegExp(`(?:\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0435|\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0438)\\s*${zy}`,js.REGEX_PARTS.flags),CR=new RegExp(zy,"i"),tf=class extends xR.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return js.REGEX_PARTS.leftBoundary}innerPattern(e){return e.option.forwardDate?CR:AR}innerExtract(e,t){let n=js.parseTimeUnits(t[1]);return MR.ParsingComponents.createRelativeFromReference(e.reference,n)}};rf.default=tf});var Jy=b(sf=>{"use strict";Object.defineProperty(sf,"__esModule",{value:!0});var PR=rt(),Gs=St(),Zy=St(),ko=St(),NR=Ee(),IR=W(),FR=new RegExp(`(?:\u0441)?\\s*(${ko.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:\u043F\u043E|-|\u2013|\u0434\u043E)?\\s{0,3}(${ko.ORDINAL_NUMBER_PATTERN}))?(?:-|\\/|\\s{0,3}(?:of)?\\s{0,3})(${NR.matchAnyPattern(Gs.MONTH_DICTIONARY)})(?:(?:-|\\/|,?\\s{0,3})(${Zy.YEAR_PATTERN}(?![^\\s]\\d)))?${Gs.REGEX_PARTS.rightBoundary}`,Gs.REGEX_PARTS.flags),Vy=1,Qy=2,LR=3,Xy=4,nf=class extends IR.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Gs.REGEX_PARTS.leftBoundary}innerPattern(){return FR}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Gs.MONTH_DICTIONARY[t[LR].toLowerCase()],s=ko.parseOrdinalNumberPattern(t[Vy]);if(s>31)return t.index=t.index+t[Vy].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[Xy]){let a=Zy.parseYear(t[Xy]);n.start.assign("year",a)}else{let a=PR.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[Qy]){let a=ko.parseOrdinalNumberPattern(t[Qy]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};sf.default=nf});var rT=b(of=>{"use strict";Object.defineProperty(of,"__esModule",{value:!0});var Bs=St(),UR=rt(),WR=Ee(),tT=St(),qR=W(),$R=new RegExp(`((?:\u0432)\\s*)?(${WR.matchAnyPattern(Bs.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${tT.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,Bs.REGEX_PARTS.flags),YR=2,eT=3,af=class extends qR.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Bs.REGEX_PARTS.leftBoundary}innerPattern(){return $R}innerExtract(e,t){let n=t[YR].toLowerCase();if(t[0].length<=3&&!Bs.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=Bs.MONTH_DICTIONARY[n];if(i.start.assign("month",s),t[eT]){let a=tT.parseYear(t[eT]);i.start.assign("year",a)}else{let a=UR.findYearClosestToRef(e.refDate,1,s);i.start.imply("year",a)}return i}};of.default=af});var iT=b(lf=>{"use strict";Object.defineProperty(lf,"__esModule",{value:!0});var Oo=je(),jR=_n(),nT=St(),uf=class extends jR.AbstractTimeExpressionParser{constructor(e){super(e)}patternFlags(){return nT.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))?(?!\\/)${nT.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",Oo.Meridiem.PM)):i<6&&n.assign("meridiem",Oo.Meridiem.AM)}if(t[0].endsWith("\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F")){n.assign("meridiem",Oo.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",Oo.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};lf.default=uf});var sT=b(df=>{"use strict";Object.defineProperty(df,"__esModule",{value:!0});var So=St(),GR=Pe(),BR=W(),HR=Yt(),zR=new RegExp(`(${So.TIME_UNITS_PATTERN})\\s{0,5}\u043D\u0430\u0437\u0430\u0434(?=(?:\\W|$))`,So.REGEX_PARTS.flags),cf=class extends BR.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return So.REGEX_PARTS.leftBoundary}innerPattern(){return zR}innerExtract(e,t){let n=So.parseTimeUnits(t[1]),i=HR.reverseTimeUnits(n);return GR.ParsingComponents.createRelativeFromReference(e.reference,i)}};df.default=cf});var aT=b(Hs=>{"use strict";var KR=Hs&&Hs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Hs,"__esModule",{value:!0});var VR=KR(mr()),ff=class extends VR.default{patternBetween(){return/^\s*(и до|и по|до|по|-)\s*$/i}};Hs.default=ff});var oT=b(zs=>{"use strict";var QR=zs&&zs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(zs,"__esModule",{value:!0});var XR=QR(Mr()),pf=class extends XR.default{patternBetween(){return new RegExp("^\\s*(T|\u0432|,|-)?\\s*$")}};zs.default=pf});var uT=b(Lr=>{"use strict";var ZR=Lr&&Lr.__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]}),JR=Lr&&Lr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),eM=Lr&&Lr.__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)&&ZR(e,r,t);return JR(e,r),e};Object.defineProperty(Lr,"__esModule",{value:!0});var tM=W(),Ks=eM(Cr()),hf=St(),rM=new RegExp(`(?:\u0441|\u0441\u043E)?\\s*(\u0441\u0435\u0433\u043E\u0434\u043D\u044F|\u0432\u0447\u0435\u0440\u0430|\u0437\u0430\u0432\u0442\u0440\u0430|\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430|\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430)${hf.REGEX_PARTS.rightBoundary}`,hf.REGEX_PARTS.flags),mf=class extends tM.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return hf.REGEX_PARTS.leftBoundary}innerPattern(e){return rM}innerExtract(e,t){let n=t[1].toLowerCase(),i=e.createParsingComponents();switch(n){case"\u0441\u0435\u0433\u043E\u0434\u043D\u044F":return Ks.today(e.reference);case"\u0432\u0447\u0435\u0440\u0430":return Ks.yesterday(e.reference);case"\u0437\u0430\u0432\u0442\u0440\u0430":return Ks.tomorrow(e.reference);case"\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430":return Ks.theDayAfter(e.reference,2);case"\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430":return Ks.theDayBefore(e.reference,2)}return i}};Lr.default=mf});var lT=b(ar=>{"use strict";var nM=ar&&ar.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),iM=ar&&ar.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),sM=ar&&ar.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&nM(e,r,t);return iM(e,r),e},aM=ar&&ar.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ar,"__esModule",{value:!0});var oM=W(),Rn=sM(Cr()),uM=$t(),lM=aM(Te()),gf=St(),cM=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)${gf.REGEX_PARTS.rightBoundary}`,gf.REGEX_PARTS.flags),yf=class extends oM.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return gf.REGEX_PARTS.leftBoundary}innerPattern(){return cM}innerExtract(e,t){let n=lM.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();if(i==="\u0441\u0435\u0439\u0447\u0430\u0441")return Rn.now(e.reference);if(i==="\u0432\u0435\u0447\u0435\u0440\u043E\u043C"||i==="\u0432\u0435\u0447\u0435\u0440\u0430")return Rn.evening(e.reference);if(i.endsWith("\u0443\u0442\u0440\u043E\u043C")||i.endsWith("\u0443\u0442\u0440\u0430"))return Rn.morning(e.reference);if(i.match(/в\s*полдень/))return Rn.noon(e.reference);if(i.match(/прошлой\s*ночью/))return Rn.lastNight(e.reference);if(i.match(/прошлым\s*вечером/))return Rn.yesterdayEvening(e.reference);if(i.match(/следующей\s*ночью/)){let a=n.hour()<22?1:2;n=n.add(a,"day"),uM.assignSimilarDate(s,n),s.imply("hour",0)}return i.match(/в\s*полночь/)||i.endsWith("\u043D\u043E\u0447\u044C\u044E")?Rn.midnight(e.reference):s}};ar.default=yf});var cT=b(bf=>{"use strict";Object.defineProperty(bf,"__esModule",{value:!0});var Vs=St(),dM=Ee(),fM=W(),pM=En(),hM=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*)?(${dM.matchAnyPattern(Vs.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)?${Vs.REGEX_PARTS.rightBoundary}`,Vs.REGEX_PARTS.flags),mM=1,gM=2,yM=3,Tf=class extends fM.AbstractParserWithWordBoundaryChecking{innerPattern(){return hM}patternLeftBoundary(){return Vs.REGEX_PARTS.leftBoundary}innerExtract(e,t){let n=t[gM].toLowerCase(),i=Vs.WEEKDAY_DICTIONARY[n],s=t[mM],a=t[yM],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=pM.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};bf.default=Tf});var fT=b(Xs=>{"use strict";var TM=Xs&&Xs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Xs,"__esModule",{value:!0});var Qs=St(),dT=Pe(),bM=TM(Te()),_M=W(),vM=Ee(),EM=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*(${vM.matchAnyPattern(Qs.TIME_UNIT_DICTIONARY)})(?=\\s*)${Qs.REGEX_PARTS.rightBoundary}`,Qs.REGEX_PARTS.flags),wM=1,kM=2,_f=class extends _M.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Qs.REGEX_PARTS.leftBoundary}innerPattern(){return EM}innerExtract(e,t){let n=t[wM].toLowerCase(),i=t[kM].toLowerCase(),s=Qs.TIME_UNIT_DICTIONARY[i];if(n=="\u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||n=="\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C"){let u={};return u[s]=1,dT.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u043C"||n=="\u043D\u0430 \u043F\u0440\u043E\u0448\u043B\u043E\u0439"){let u={};return u[s]=-1,dT.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=bM.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}};Xs.default=_f});var pT=b(Ef=>{"use strict";Object.defineProperty(Ef,"__esModule",{value:!0});var Zs=St(),OM=Pe(),SM=W(),DM=Yt(),RM=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*(${Zs.TIME_UNITS_PATTERN})${Zs.REGEX_PARTS.rightBoundary}`,Zs.REGEX_PARTS.flags),vf=class extends SM.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Zs.REGEX_PARTS.leftBoundary}innerPattern(){return RM}innerExtract(e,t){let n=t[1].toLowerCase(),i=Zs.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=DM.reverseTimeUnits(i);break}return OM.ParsingComponents.createRelativeFromReference(e.reference,i)}};Ef.default=vf});var gT=b(Xe=>{"use strict";var At=Xe&&Xe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Xe,"__esModule",{value:!0});Xe.createConfiguration=Xe.createCasualConfiguration=Xe.parseDate=Xe.parse=Xe.strict=Xe.casual=void 0;var MM=At(Ky()),xM=At(Jy()),AM=At(rT()),CM=At(iT()),PM=At(sT()),NM=At(aT()),IM=At(oT()),FM=xr(),LM=At(uT()),UM=At(lT()),WM=At(cT()),qM=At(fT()),hT=tr(),$M=At(wn()),YM=At(pT());Xe.casual=new hT.Chrono(mT());Xe.strict=new hT.Chrono(wf(!0));function jM(r,e,t){return Xe.casual.parse(r,e,t)}Xe.parse=jM;function GM(r,e,t){return Xe.casual.parseDate(r,e,t)}Xe.parseDate=GM;function mT(){let r=wf(!1);return r.parsers.unshift(new LM.default),r.parsers.unshift(new UM.default),r.parsers.unshift(new AM.default),r.parsers.unshift(new qM.default),r.parsers.unshift(new YM.default),r}Xe.createCasualConfiguration=mT;function wf(r=!0){return FM.includeCommonConfiguration({parsers:[new $M.default(!0),new MM.default,new xM.default,new WM.default,new CM.default(r),new PM.default],refiners:[new IM.default,new NM.default]},r)}Xe.createConfiguration=wf});var je=b(ie=>{"use strict";var BM=ie&&ie.__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]}),HM=ie&&ie.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),nn=ie&&ie.__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)&&BM(e,r,t);return HM(e,r),e};Object.defineProperty(ie,"__esModule",{value:!0});ie.parseDate=ie.parse=ie.casual=ie.strict=ie.ru=ie.zh=ie.nl=ie.pt=ie.ja=ie.fr=ie.de=ie.Meridiem=ie.Chrono=ie.en=void 0;var kf=nn(ql());ie.en=kf;var zM=tr();Object.defineProperty(ie,"Chrono",{enumerable:!0,get:function(){return zM.Chrono}});var KM;(function(r){r[r.AM=0]="AM",r[r.PM=1]="PM"})(KM=ie.Meridiem||(ie.Meridiem={}));var VM=nn(Om());ie.de=VM;var QM=nn(eg());ie.fr=QM;var XM=nn(lg());ie.ja=XM;var ZM=nn(Og());ie.pt=ZM;var JM=nn(ly());ie.nl=JM;var ex=nn(jy());ie.zh=ex;var tx=nn(gT());ie.ru=tx;ie.strict=kf.strict;ie.casual=kf.casual;function rx(r,e,t){return ie.casual.parse(r,e,t)}ie.parse=rx;function nx(r,e,t){return ie.casual.parseDate(r,e,t)}ie.parseDate=nx});var Cb=b(tp=>{"use strict";Object.defineProperty(tp,"__esModule",{value:!0});var xb=Symbol("MustacheDataPath");function Mb({target:r,propertyName:e}){return[...r[xb]||[],e]}function Ab(r,e){return typeof r!="object"?r:new Proxy(r,{get(t,n){let i=t[n];if(i===void 0&&!(n in t)){let s=Mb({target:t,propertyName:n});if(e!=null&&e.handleError)return e.handleError(s),i;throw Error(`Missing Mustache data property: ${s.join(" > ")}`)}return i&&typeof i=="object"?(i[xb]=Mb({target:t,propertyName:n}),Ab(i,e)):i}})}tp.default=Ab});var Or=b(cr=>{"use strict";cr.__esModule=!0;cr.Tokens=cr.StructuralCharacters=cr.Operators=void 0;var NA;(function(r){r.AND="AND",r.OR="OR",r.XOR="XOR",r.NOT="NOT"})(NA=cr.Operators||(cr.Operators={}));var IA;(function(r){r.OPEN_PARENTHESIS="(",r.CLOSE_PARENTHESIS=")"})(IA=cr.StructuralCharacters||(cr.StructuralCharacters={}));var FA;(function(r){r.IDENTIFIER="IDENTIFIER",r.OPERATOR="OPERATOR",r.STRUCTURAL_CHARACTER="STRUCTURAL_CHARACTER",r.EOF="EOF",r.COMMENT="COMMENT"})(FA=cr.Tokens||(cr.Tokens={}))});var ap=b(Fi=>{"use strict";Fi.__esModule=!0;Fi.VALID_TOKENS=Fi.OPERATOR_PRECEDENCE=void 0;var Ne=Or();Fi.OPERATOR_PRECEDENCE={NOT:0,XOR:1,AND:2,OR:3};Fi.VALID_TOKENS={identifierOnly:[{name:Ne.Tokens.IDENTIFIER},{name:Ne.Tokens.STRUCTURAL_CHARACTER,value:Ne.StructuralCharacters.OPEN_PARENTHESIS}],identifierOrNot:[{name:Ne.Tokens.IDENTIFIER},{name:Ne.Tokens.STRUCTURAL_CHARACTER,value:Ne.StructuralCharacters.OPEN_PARENTHESIS},{name:Ne.Tokens.OPERATOR,value:Ne.Operators.NOT}],binaryOperator:[{name:Ne.Tokens.OPERATOR,value:Ne.Operators.AND},{name:Ne.Tokens.OPERATOR,value:Ne.Operators.OR},{name:Ne.Tokens.OPERATOR,value:Ne.Operators.XOR}],binaryOperatorOrClose:[{name:Ne.Tokens.OPERATOR,value:Ne.Operators.AND},{name:Ne.Tokens.OPERATOR,value:Ne.Operators.OR},{name:Ne.Tokens.OPERATOR,value:Ne.Operators.XOR},{name:Ne.Tokens.STRUCTURAL_CHARACTER,value:Ne.StructuralCharacters.CLOSE_PARENTHESIS}]}});var op=b(ht=>{"use strict";ht.__esModule=!0;ht.ESCAPE_CHARACTER=ht.EOL=ht.COMMENT_DELIMITER=ht.QUOTED_IDENTIFIER_DELIMITER=ht.SEPARATORS=ht.OPERATORS=ht.STRUCTURAL_CHARACTERS=void 0;var Li=Or();ht.STRUCTURAL_CHARACTERS={"(":Li.StructuralCharacters.OPEN_PARENTHESIS,")":Li.StructuralCharacters.CLOSE_PARENTHESIS};ht.OPERATORS={AND:Li.Operators.AND,OR:Li.Operators.OR,XOR:Li.Operators.XOR,NOT:Li.Operators.NOT};ht.SEPARATORS=new Set([32,9,10,13].map(function(r){return String.fromCodePoint(r)}));ht.QUOTED_IDENTIFIER_DELIMITER=String.fromCodePoint(34);ht.COMMENT_DELIMITER=String.fromCodePoint(35);ht.EOL=String.fromCodePoint(10);ht.ESCAPE_CHARACTER=String.fromCodePoint(92)});var Ub=b(Zt=>{"use strict";var up=Zt&&Zt.__assign||function(){return up=Object.assign||function(r){for(var e,t=1,n=arguments.length;t{"use strict";uu.__esModule=!0;uu.lex=void 0;var Ui=Or(),Ft=op(),Wi=Ub(),qA=function(r){for(var e=null,t=null,n=null,i=0;i{"use strict";var qb=Lt&&Lt.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,s;n{"use strict";var Sr=$i&&$i.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,s;n{"use strict";mt.__esModule=!0;mt.throwInvalidExpression=mt.isOperator=mt.isIdentifier=mt.notUtil=mt.xorUtil=mt.orUtil=mt.andUtil=void 0;var Gb=Or(),zA=function(r,e){return r&&e};mt.andUtil=zA;var KA=function(r,e){return r||e};mt.orUtil=KA;var VA=function(r,e){return r!==e};mt.xorUtil=VA;var QA=function(r){return!r};mt.notUtil=QA;var XA=function(r){var e=r.name,t=r.value;return e===Gb.Tokens.IDENTIFIER&&typeof t=="string"};mt.isIdentifier=XA;var ZA=function(r){var e=r.name,t=r.value;return e===Gb.Tokens.OPERATOR&&typeof t=="string"};mt.isOperator=ZA;var JA=function(r){throw new TypeError("Invalid postfix expression: ".concat(r))};mt.throwInvalidExpression=JA});var Bb=b(du=>{"use strict";var ba;du.__esModule=!0;du.OPERATOR_MAP=void 0;var fp=Or(),pp=dp();du.OPERATOR_MAP=(ba={},ba[fp.Operators.AND]=pp.andUtil,ba[fp.Operators.OR]=pp.orUtil,ba[fp.Operators.XOR]=pp.xorUtil,ba)});var zb=b(zr=>{"use strict";var Yi=zr&&zr.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,s;n{"use strict";var hp=Dr&&Dr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,i)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]});Dr.__esModule=!0;Dr.parse=Dr.evaluate=Dr.getEvaluator=void 0;var Kb=zb();hp(Dr,Kb,"getEvaluator");hp(Dr,Kb,"evaluate");var iC=cp();hp(Dr,iC,"parse")});var r_=b((e_,t_)=>{(function(r){var e=Object.hasOwnProperty,t=Array.isArray?Array.isArray:function(f){return Object.prototype.toString.call(f)==="[object Array]"},n=10,i=typeof process=="object"&&typeof process.nextTick=="function",s=typeof Symbol=="function",a=typeof Reflect=="object",o=typeof setImmediate=="function",u=o?setImmediate:setTimeout,l=s?a&&typeof Reflect.ownKeys=="function"?Reflect.ownKeys:function(d){var f=Object.getOwnPropertyNames(d);return f.push.apply(f,Object.getOwnPropertySymbols(d)),f}:Object.keys;function c(){this._events={},this._conf&&p.call(this,this._conf)}function p(d){d&&(this._conf=d,d.delimiter&&(this.delimiter=d.delimiter),d.maxListeners!==r&&(this._maxListeners=d.maxListeners),d.wildcard&&(this.wildcard=d.wildcard),d.newListener&&(this._newListener=d.newListener),d.removeListener&&(this._removeListener=d.removeListener),d.verboseMemoryLeak&&(this.verboseMemoryLeak=d.verboseMemoryLeak),d.ignoreErrors&&(this.ignoreErrors=d.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function h(d,f){var m="(node) warning: possible EventEmitter memory leak detected. "+d+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(m+=" Event name: "+f+"."),typeof process!="undefined"&&process.emitWarning){var g=new Error(m);g.name="MaxListenersExceededWarning",g.emitter=this,g.count=d,process.emitWarning(g)}else console.error(m),console.trace&&console.trace()}var _=function(d,f,m){var g=arguments.length;switch(g){case 0:return[];case 1:return[d];case 2:return[d,f];case 3:return[d,f,m];default:for(var T=new Array(g);g--;)T[g]=arguments[g];return T}};function y(d,f){for(var m={},g,T=d.length,v=f?f.length:0,k=0;k0;)d=v[O],k.call(D,d,m[d]);this._listeners={},this._listenersCount=0,S()}}});function M(d,f,m,g){var T=Object.assign({},f);if(!d)return T;if(typeof d!="object")throw TypeError("options must be an object");var v=Object.keys(d),k=v.length,D,O,S;function I(se){throw Error('Invalid "'+D+'" option value'+(se?". Reason: "+se:""))}for(var me=0;me0;)if(D===d[O])return v;k(f)}}var F=N(["function"]),X=N(["object","function"]);function V(d,f,m){var g,T,v=0,k,D=new d(function(O,S,I){m=M(m,{timeout:0,overload:!1},{timeout:function(Se,U){return Se*=1,(typeof Se!="number"||Se<0||!Number.isFinite(Se))&&U("timeout must be a positive number"),Se}}),g=!m.overload&&typeof d.prototype.cancel=="function"&&typeof I=="function";function me(){T&&(T=null),v&&(clearTimeout(v),v=0)}var se=function(Se){me(),O(Se)},re=function(Se){me(),S(Se)};g?f(se,re,I):(T=[function(Se){re(Se||Error("canceled"))}],f(se,re,function(Se){if(k)throw Error("Unable to subscribe on cancel event asynchronously");if(typeof Se!="function")throw TypeError("onCancel callback must be a function");T.push(Se)}),k=!0),m.timeout>0&&(v=setTimeout(function(){var Se=Error("timeout");Se.code="ETIMEDOUT",v=0,D.cancel(Se),S(Se)},m.timeout))});return g||(D.cancel=function(O){if(!!T){for(var S=T.length,I=1;I0;)re=Ue[D],re!=="_listeners"&&(Fe=j(d,f,m[re],g+1,T),Fe&&(se?se.push.apply(se,Fe):se=Fe));return se}else if(tt==="**"){for(Ae=g+1===T||g+2===T&&Rr==="*",Ae&&m._listeners&&(se=j(d,f,m,T,T)),Ue=l(m),D=Ue.length;D-- >0;)re=Ue[D],re!=="_listeners"&&(re==="*"||re==="**"?(m[re]._listeners&&!Ae&&(Fe=j(d,f,m[re],T,T),Fe&&(se?se.push.apply(se,Fe):se=Fe)),Fe=j(d,f,m[re],g,T)):re===Rr?Fe=j(d,f,m[re],g+2,T):Fe=j(d,f,m[re],g,T),Fe&&(se?se.push.apply(se,Fe):se=Fe));return se}else m[tt]&&(se=j(d,f,m[tt],g+1,T));if(Se=m["*"],Se&&j(d,f,Se,g+1,T),U=m["**"],U)if(g0;)re=Ue[D],re!=="_listeners"&&(re===Rr?j(d,f,U[re],g+2,T):re===tt?j(d,f,U[re],g+1,T):(Me={},Me[re]=U[re],j(d,f,{"**":Me},g+1,T)));else U._listeners?j(d,f,U,T,T):U["*"]&&U["*"]._listeners&&j(d,f,U["*"],T,T);return se}function G(d,f,m){var g=0,T=0,v,k=this.delimiter,D=k.length,O;if(typeof d=="string")if((v=d.indexOf(k))!==-1){O=new Array(5);do O[g++]=d.slice(T,v),T=v+D;while((v=d.indexOf(k,T))!==-1);O[g++]=d.slice(T)}else O=[d],g=1;else O=d,g=d.length;if(g>1){for(v=0;v+10&&S._listeners.length>this._maxListeners&&(S._listeners.warned=!0,h.call(this,S._listeners.length,I))):S._listeners=f,!0;return!0}function Ce(d,f,m,g){for(var T=l(d),v=T.length,k,D,O,S=d._listeners,I;v-- >0;)D=T[v],k=d[D],D==="_listeners"?O=m:O=m?m.concat(D):[D],I=g||typeof D=="symbol",S&&f.push(I?O:O.join(this.delimiter)),typeof k=="object"&&Ce.call(this,k,f,O,I);return f}function Ie(d){for(var f=l(d),m=f.length,g,T,v;m-- >0;)T=f[m],g=d[T],g&&(v=!0,T!=="_listeners"&&!Ie(g)&&delete d[T]);return v}function B(d,f,m){this.emitter=d,this.event=f,this.listener=m}B.prototype.off=function(){return this.emitter.off(this.event,this.listener),this};function A(d,f,m){if(m===!0)T=!0;else if(m===!1)g=!0;else{if(!m||typeof m!="object")throw TypeError("options should be an object or true");var g=m.async,T=m.promisify,v=m.nextTick,k=m.objectify}if(g||v||T){var D=f,O=f._origin||f;if(v&&!i)throw Error("process.nextTick is not supported");T===r&&(T=f.constructor.name==="AsyncFunction"),f=function(){var S=arguments,I=this,me=this.event;return T?v?Promise.resolve():new Promise(function(se){u(se)}).then(function(){return I.event=me,D.apply(I,S)}):(v?process.nextTick:u)(function(){I.event=me,D.apply(I,S)})},f._async=!0,f._origin=O}return[f,k?new B(this,d,f):this]}function E(d){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,p.call(this,d)}E.EventEmitter2=E,E.prototype.listenTo=function(d,f,m){if(typeof d!="object")throw TypeError("target musts be an object");var g=this;m=M(m,{on:r,off:r,reducers:r},{on:F,off:F,reducers:X});function T(v){if(typeof v!="object")throw TypeError("events must be an object");var k=m.reducers,D=he.call(g,d),O;D===-1?O=new w(g,d,m):O=g._observers[D];for(var S=l(v),I=S.length,me,se=typeof k=="function",re=0;re0;)T=m[g],(!d||T._target===d)&&(T.unsubscribe(f),v=!0);return v},E.prototype.delimiter=".",E.prototype.setMaxListeners=function(d){d!==r&&(this._maxListeners=d,this._conf||(this._conf={}),this._conf.maxListeners=d)},E.prototype.getMaxListeners=function(){return this._maxListeners},E.prototype.event="",E.prototype.once=function(d,f,m){return this._once(d,f,!1,m)},E.prototype.prependOnceListener=function(d,f,m){return this._once(d,f,!0,m)},E.prototype._once=function(d,f,m,g){return this._many(d,1,f,m,g)},E.prototype.many=function(d,f,m,g){return this._many(d,f,m,!1,g)},E.prototype.prependMany=function(d,f,m,g){return this._many(d,f,m,!0,g)},E.prototype._many=function(d,f,m,g,T){var v=this;if(typeof m!="function")throw new Error("many only accepts instances of Function");function k(){return--f===0&&v.off(d,k),m.apply(this,arguments)}return k._origin=m,this._on(d,k,g,T)},E.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||c.call(this);var d=arguments[0],f,m=this.wildcard,g,T,v,k,D;if(d==="newListener"&&!this._newListener&&!this._events.newListener)return!1;if(m&&(f=d,d!=="newListener"&&d!=="removeListener"&&typeof d=="object")){if(T=d.length,s){for(v=0;v3)for(g=new Array(O-1),k=1;k3)for(T=new Array(S-1),D=1;D0&&this._events[d].length>this._maxListeners&&(this._events[d].warned=!0,h.call(this,this._events[d].length,d))):this._events[d]=f,T)},E.prototype.off=function(d,f){if(typeof f!="function")throw new Error("removeListener only takes instances of Function");var m,g=[];if(this.wildcard){var T=typeof d=="string"?d.split(this.delimiter):d.slice();if(g=j.call(this,null,T,this.listenerTree,0),!g)return this}else{if(!this._events[d])return this;m=this._events[d],g.push({_listeners:m})}for(var v=0;v0){for(g=this._all,f=0,m=g.length;f0;)g=f[m[v]],typeof g=="function"?T.push(g):T.push.apply(T,g);return T}else{if(this.wildcard){if(k=this.listenerTree,!k)return[];var D=[],O=typeof d=="string"?d.split(this.delimiter):d.slice();return j.call(this,D,O,k,0),D}return f?(g=f[d],g?typeof g=="function"?[g]:g:[]):[]}},E.prototype.eventNames=function(d){var f=this._events;return this.wildcard?Ce.call(this,this.listenerTree,[],null,d):f?l(f):[]},E.prototype.listenerCount=function(d){return this.listeners(d).length},E.prototype.hasListeners=function(d){if(this.wildcard){var f=[],m=typeof d=="string"?d.split(this.delimiter):d.slice();return j.call(this,f,m,this.listenerTree,0),f.length>0}var g=this._events,T=this._all;return!!(T&&T.length||g&&(d===r?l(g).length:g[d]))},E.prototype.listenersAny=function(){return this._all?this._all:[]},E.prototype.waitFor=function(d,f){var m=this,g=typeof f;return g==="number"?f={timeout:f}:g==="function"&&(f={filter:f}),f=M(f,{timeout:0,filter:r,handleError:!1,Promise,overload:!1},{filter:F,Promise:P}),V(f.Promise,function(T,v,k){function D(){var O=f.filter;if(!(O&&!O.apply(m,arguments)))if(m.off(d,D),f.handleError){var S=arguments[0];S?v(S):T(_.apply(null,arguments).slice(1))}else T(_.apply(null,arguments))}k(function(){m.off(d,D)}),m._on(d,D,!1)},{timeout:f.timeout,overload:f.overload})};function H(d,f,m){m=M(m,{Promise,timeout:0,overload:!1},{Promise:P});var g=m.Promise;return V(g,function(T,v,k){var D;if(typeof d.addEventListener=="function"){D=function(){T(_.apply(null,arguments))},k(function(){d.removeEventListener(f,D)}),d.addEventListener(f,D,{once:!0});return}var O=function(){S&&d.removeListener("error",S),T(_.apply(null,arguments))},S;f!=="error"&&(S=function(I){d.removeListener(f,O),v(I)},d.once("error",S)),k(function(){S&&d.removeListener("error",S),d.removeListener(f,O)}),d.once(f,O)},{timeout:m.timeout,overload:m.overload})}var C=E.prototype;if(Object.defineProperties(E,{defaultMaxListeners:{get:function(){return C._maxListeners},set:function(d){if(typeof d!="number"||d<0||Number.isNaN(d))throw TypeError("n must be a non-negative number");C._maxListeners=d},enumerable:!0},once:{value:H,writable:!0,configurable:!0}}),Object.defineProperties(C,{_maxListeners:{value:n,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),typeof define=="function"&&define.amd)define(function(){return E});else if(typeof e_=="object")t_.exports=E;else{var Z=new Function("","return this")();Z.EventEmitter2=E}})()});var MC={};F_(MC,{default:()=>xu});module.exports=L_(MC);var R_=require("obsidian");var Ei=require("obsidian");var AC=new Error("timeout while waiting for mutex to become available"),CC=new Error("mutex already locked"),U_=new Error("request for lock canceled"),W_=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(p){a(p)}}function u(c){try{l(n.throw(c))}catch(p){a(p)}}function l(c){c.done?s(c.value):i(c.value).then(o,u)}l((n=n.apply(r,e||[])).next())})},Nu=class{constructor(e,t=U_){this._value=e,this._cancelError=t,this._weightedQueues=[],this._weightedWaiters=[]}acquire(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise((t,n)=>{this._weightedQueues[e-1]||(this._weightedQueues[e-1]=[]),this._weightedQueues[e-1].push({resolve:t,reject:n}),this._dispatch()})}runExclusive(e,t=1){return W_(this,void 0,void 0,function*(){let[n,i]=yield this.acquire(t);try{return yield e(n)}finally{i()}})}waitForUnlock(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise(t=>{this._weightedWaiters[e-1]||(this._weightedWaiters[e-1]=[]),this._weightedWaiters[e-1].push(t),this._dispatch()})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(e){this._value=e,this._dispatch()}release(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);this._value+=e,this._dispatch()}cancel(){this._weightedQueues.forEach(e=>e.forEach(t=>t.reject(this._cancelError))),this._weightedQueues=[]}_dispatch(){var e;for(let t=this._value;t>0;t--){let n=(e=this._weightedQueues[t-1])===null||e===void 0?void 0:e.shift();if(!n)continue;let i=this._value,s=t;this._value-=t,t=this._value+1,n.resolve([i,this._newReleaser(s)])}this._drainUnlockWaiters()}_newReleaser(e){let t=!1;return()=>{t||(t=!0,this.release(e))}}_drainUnlockWaiters(){for(let e=this._value;e>0;e--)!this._weightedWaiters[e-1]||(this._weightedWaiters[e-1].forEach(t=>t()),this._weightedWaiters[e-1]=[])}},q_=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(p){a(p)}}function u(c){try{l(n.throw(c))}catch(p){a(p)}}function l(c){c.done?s(c.value):i(c.value).then(o,u)}l((n=n.apply(r,e||[])).next())})},Na=class{constructor(e){this._semaphore=new Nu(1,e)}acquire(){return q_(this,void 0,void 0,function*(){let[,e]=yield this._semaphore.acquire();return e})}runExclusive(e){return this._semaphore.runExclusive(()=>e())}isLocked(){return this._semaphore.isLocked()}waitForUnlock(){return this._semaphore.waitForUnlock()}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}};var Do=Zi(je());var _t=class{constructor(e,t){this.start=e,this.end=t,t.isBefore(e)&&(this.start=t,this.end=e),this.start=this.start.startOf("day"),this.end=this.end.startOf("day")}static buildRelative(e){let t=e==="week"?"isoWeek":e;return new _t(window.moment().startOf(t).startOf("day"),window.moment().endOf(t).startOf("day"))}static buildInvalid(){return new _t(window.moment.invalid(),window.moment.invalid())}isValid(){return this.start.isValid()&&this.end.isValid()}moveToPrevious(e){let t=window.moment.duration(1,e);this.start.subtract(t),this.end.subtract(t),(e==="month"||e==="quarter")&&(this.end=this.end.endOf(e).startOf("day"))}moveToNext(e){let t=window.moment.duration(1,e);this.start.add(t),this.end.add(t),(e==="month"||e==="quarter")&&(this.end=this.end.endOf(e).startOf("day"))}};var Ct=class{static parseDate(e,t=!1){return window.moment(Do.parseDate(e,void 0,{forwardDate:t})).startOf("day")}static parseDateRange(e,t=!1){let n=[Ct.parseRelativeDateRange,Ct.parseNumberedDateRange,Ct.parseAbsoluteDateRange];for(let i of n){let s=i(e,t);if(s.isValid())return s}return _t.buildInvalid()}static parseAbsoluteDateRange(e,t){let n=Do.parse(e,void 0,{forwardDate:t});if(n.length===0)return _t.buildInvalid();let i=n[0].start,s=n[1]&&n[1].start?n[1].start:i,a=window.moment(i.date()),o=window.moment(s.date());return new _t(a,o)}static parseRelativeDateRange(e,t){let n=/(last|this|next) (week|month|quarter|year)/,i=e.match(n);if(i&&i.length===3){let s=i[1],a=i[2],o=_t.buildRelative(a);switch(s){case"last":o.moveToPrevious(a);break;case"next":o.moveToNext(a);break}return o}return _t.buildInvalid()}static parseNumberedDateRange(e,t){let n=[[/^\s*[0-9]{4}\s*$/,"YYYY","year"],[/^\s*[0-9]{4}-Q[1-4]\s*$/,"YYYY-Q","quarter"],[/^\s*[0-9]{4}-[0-9]{2}\s*$/,"YYYY-MM","month"],[/^\s*[0-9]{4}-W[0-9]{2}\s*$/,"YYYY-WW","isoWeek"]];for(let[i,s,a]of n){let o=e.match(i);if(o){let u=o[0].trim();return new _t(window.moment(u,s).startOf(a),window.moment(u,s).endOf(a))}}return _t.buildInvalid()}};var ix={td:"today",tm:"tomorrow",yd:"yesterday",tw:"this week",nw:"next week",weekend:"sat",we:"sat"};function mi(r){for(let[e,t]of Object.entries(ix))r=r.replace(RegExp(`\\b${e}\\s`,"i"),t);return r}var Ro=["MO","TU","WE","TH","FR","SA","SU"],Ye=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(Ro.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=Ro[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 Re=function(r){return r!=null},Pt=function(r){return typeof r=="number"},Of=function(r){return typeof r=="string"&&Ro.includes(r)},st=Array.isArray,Kt=function(r,e){e===void 0&&(e=r),arguments.length===1&&(e=r,r=0);for(var t=[],n=r;n>0,n.length>e?String(n):(e=e-n.length,e>t.length&&(t+=ue(t,e/t.length)),t.slice(0,e)+String(n))}var TT=function(r,e,t){var n=r.split(e);return t?n.slice(0,t).concat([n.slice(t).join(e)]):n},ut=function(r,e){var t=r%e;return t*e<0?t+e:t},Mo=function(r,e){return{div:Math.floor(r/e),mod:ut(r,e)}},Nt=function(r){return!Re(r)||r.length===0},Le=function(r){return!Nt(r)},ce=function(r,e){return Le(r)&&r.indexOf(e)!==-1};var Tr=function(r,e,t,n,i,s){return n===void 0&&(n=0),i===void 0&&(i=0),s===void 0&&(s=0),new Date(Date.UTC(r,e-1,t,n,i,s))},sx=[31,28,31,30,31,30,31,31,30,31,30,31],vT=1e3*60*60*24,xo=9999,ET=Tr(1970,1,1),ax=[6,0,1,2,3,4,5];var gi=function(r){return r%4===0&&r%100!==0||r%400===0},Sf=function(r){return r instanceof Date},xn=function(r){return Sf(r)&&!isNaN(r.getTime())},bT=function(r){return r.getTimezoneOffset()*60*1e3},ox=function(r,e){var t=r.getTime()-bT(r),n=e.getTime()-bT(e),i=t-n;return Math.round(i/vT)},Js=function(r){return ox(r,ET)},Ao=function(r){return new Date(ET.getTime()+r*vT)},ux=function(r){var e=r.getUTCMonth();return e===1&&gi(r.getUTCFullYear())?29:sx[e]},Ur=function(r){return ax[r.getUTCDay()]},Df=function(r,e){var t=Tr(r,e+1,1);return[Ur(t),ux(t)]},Co=function(r,e){return e=e||r,new Date(Date.UTC(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()))},Po=function(r){var e=new Date(r.getTime());return e},Rf=function(r){for(var e=[],t=0;tthis.maxDate;if(this.method==="between"){if(t)return!0;if(n)return!1}else if(this.method==="before"){if(n)return!1}else if(this.method==="after")return t?!0:(this.add(e),!1);return this.add(e)},r.prototype.add=function(e){return this._result.push(e),!0},r.prototype.getValue=function(){var e=this._result;switch(this.method){case"all":case"between":return e;case"before":case"after":default:return e.length?e[e.length-1]:null}},r.prototype.clone=function(){return new r(this.method,this.args)},r}(),qr=lx;var Mf=function(r,e){return Mf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},Mf(r,e)};function Ti(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Mf(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var at=function(){return at=Object.assign||function(e){for(var t,n=1,i=arguments.length;ne[0].length)&&(e=s,t=i)}if(e!=null&&(this.text=this.text.substr(e[0].length),this.text===""&&(this.done=!0)),e==null){this.done=!0,this.symbol=null,this.value=null;return}}while(t==="SKIP");return this.symbol=t,this.value=e,!0},r.prototype.accept=function(e){if(this.symbol===e){if(this.value){var t=this.value;return this.nextSymbol(),t}return this.nextSymbol(),!0}return!1},r.prototype.acceptNumber=function(){return this.accept("number")},r.prototype.expect=function(e){if(this.accept(e))return!0;throw new Error("expected "+e+" but found "+this.symbol)},r}();function ta(r,e){e===void 0&&(e=An);var t={},n=new mx(e.tokens);if(!n.start(r))return null;return i(),t;function i(){n.expect("every");var h=n.acceptNumber();if(h&&(t.interval=parseInt(h[0],10)),n.isDone())throw new Error("Unexpected end");switch(n.symbol){case"day(s)":t.freq=$.DAILY,n.nextSymbol()&&(a(),p());break;case"weekday(s)":t.freq=$.WEEKLY,t.byweekday=[$.MO,$.TU,$.WE,$.TH,$.FR],n.nextSymbol(),p();break;case"week(s)":t.freq=$.WEEKLY,n.nextSymbol()&&(s(),p());break;case"hour(s)":t.freq=$.HOURLY,n.nextSymbol()&&(s(),p());break;case"minute(s)":t.freq=$.MINUTELY,n.nextSymbol()&&(s(),p());break;case"month(s)":t.freq=$.MONTHLY,n.nextSymbol()&&(s(),p());break;case"year(s)":t.freq=$.YEARLY,n.nextSymbol()&&(s(),p());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":t.freq=$.WEEKLY;var _=n.symbol.substr(0,2).toUpperCase();if(t.byweekday=[$[_]],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var y=u();if(!y)throw new Error("Unexpected symbol "+n.symbol+", expected weekday");t.byweekday.push($[y]),n.nextSymbol()}c(),p();break;case"january":case"february":case"march":case"april":case"may":case"june":case"july":case"august":case"september":case"october":case"november":case"december":if(t.freq=$.YEARLY,t.bymonth=[o()],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var w=o();if(!w)throw new Error("Unexpected symbol "+n.symbol+", expected month");t.bymonth.push(w),n.nextSymbol()}s(),p();break;default:throw new Error("Unknown symbol")}}function s(){var h=n.accept("on"),_=n.accept("the");if(!!(h||_))do{var y=l(),w=u(),M=o();if(y)w?(n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push($[w].nth(y))):(t.bymonthday||(t.bymonthday=[]),t.bymonthday.push(y),n.accept("day(s)"));else if(w)n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push($[w]);else if(n.symbol==="weekday(s)")n.nextSymbol(),t.byweekday||(t.byweekday=[$.MO,$.TU,$.WE,$.TH,$.FR]);else if(n.symbol==="week(s)"){n.nextSymbol();var P=n.acceptNumber();if(!P)throw new Error("Unexpected symbol "+n.symbol+", expected week number");for(t.byweekno=[parseInt(P[0],10)];n.accept("comma");){if(P=n.acceptNumber(),!P)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.byweekno.push(parseInt(P[0],10))}}else if(M)n.nextSymbol(),t.bymonth||(t.bymonth=[]),t.bymonth.push(M);else return}while(n.accept("comma")||n.accept("the")||n.accept("on"))}function a(){var h=n.accept("at");if(!!h)do{var _=n.acceptNumber();if(!_)throw new Error("Unexpected symbol "+n.symbol+", expected hour");for(t.byhour=[parseInt(_[0],10)];n.accept("comma");){if(_=n.acceptNumber(),!_)throw new Error("Unexpected symbol "+n.symbol+"; expected hour");t.byhour.push(parseInt(_[0],10))}}while(n.accept("comma")||n.accept("at"))}function o(){switch(n.symbol){case"january":return 1;case"february":return 2;case"march":return 3;case"april":return 4;case"may":return 5;case"june":return 6;case"july":return 7;case"august":return 8;case"september":return 9;case"october":return 10;case"november":return 11;case"december":return 12;default:return!1}}function u(){switch(n.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return n.symbol.substr(0,2).toUpperCase();default:return!1}}function l(){switch(n.symbol){case"last":return n.nextSymbol(),-1;case"first":return n.nextSymbol(),1;case"second":return n.nextSymbol(),n.accept("last")?-2:2;case"third":return n.nextSymbol(),n.accept("last")?-3:3;case"nth":var h=parseInt(n.value[1],10);if(h<-366||h>366)throw new Error("Nth out of range: "+h);return n.nextSymbol(),n.accept("last")?-h:h;default:return!1}}function c(){n.accept("on"),n.accept("the");var h=l();if(!!h)for(t.bymonthday=[h],n.nextSymbol();n.accept("comma");){if(h=l(),!h)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.bymonthday.push(h),n.nextSymbol()}}function p(){if(n.symbol==="until"){var h=Date.parse(n.text);if(!h)throw new Error("Cannot parse until date:"+n.text);t.until=new Date(h)}else n.accept("for")&&(t.count=parseInt(n.value[0],10),n.expect("number"))}}var ae;(function(r){r[r.YEARLY=0]="YEARLY",r[r.MONTHLY=1]="MONTHLY",r[r.WEEKLY=2]="WEEKLY",r[r.DAILY=3]="DAILY",r[r.HOURLY=4]="HOURLY",r[r.MINUTELY=5]="MINUTELY",r[r.SECONDLY=6]="SECONDLY"})(ae||(ae={}));function ra(r){return r12){var n=Math.floor(this.month/12),i=ut(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=Mo(this.hour,24),a=s.div,o=s.mod;if(a&&(this.hour=o,this.addDaily(a)),Nt(i)||ce(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=Mo(this.minute,60),o=a.div,u=a.mod;if(o&&(this.minute=u,this.addHours(o,!1,i)),(Nt(i)||ce(i,this.hour))&&(Nt(s)||ce(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=Mo(this.second,60),u=o.div,l=o.mod;if(u&&(this.second=l,this.addMinutes(u,!1,i,s)),(Nt(i)||ce(i,this.hour))&&(Nt(s)||ce(s,this.minute))&&(Nt(a)||ce(a,this.second)))break}},e.prototype.fixDay=function(){if(!(this.day<=28)){var t=Df(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>xo))return;t=Df(this.year,this.month-1)[1]}}},e.prototype.add=function(t,n){var i=t.freq,s=t.interval,a=t.wkst,o=t.byhour,u=t.byminute,l=t.bysecond;switch(i){case ae.YEARLY:return this.addYears(s);case ae.MONTHLY:return this.addMonths(s);case ae.WEEKLY:return this.addWeekly(s,a);case ae.DAILY:return this.addDaily(s);case ae.HOURLY:return this.addHours(s,n,o);case ae.MINUTELY:return this.addMinutes(s,n,o,u);case ae.SECONDLY:return this.addSeconds(s,n,o,u,l)}},e}(_i);function Af(r){for(var e=[],t=Object.keys(r),n=0,i=t;n=-366&&n<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}}if(!(Boolean(e.byweekno)||Le(e.byweekno)||Le(e.byyearday)||Boolean(e.bymonthday)||Le(e.bymonthday)||Re(e.byweekday)||Re(e.byeaster)))switch(e.freq){case $.YEARLY:e.bymonth||(e.bymonth=e.dtstart.getUTCMonth()+1),e.bymonthday=e.dtstart.getUTCDate();break;case $.MONTHLY:e.bymonthday=e.dtstart.getUTCDate();break;case $.WEEKLY:e.byweekday=[Ur(e.dtstart)];break}if(Re(e.bymonth)&&!st(e.bymonth)&&(e.bymonth=[e.bymonth]),Re(e.byyearday)&&!st(e.byyearday)&&Pt(e.byyearday)&&(e.byyearday=[e.byyearday]),!Re(e.bymonthday))e.bymonthday=[],e.bynmonthday=[];else if(st(e.bymonthday)){for(var i=[],s=[],t=0;t0?i.push(n):n<0&&s.push(n)}e.bymonthday=i,e.bynmonthday=s}else e.bymonthday<0?(e.bynmonthday=[e.bymonthday],e.bymonthday=[]):(e.bynmonthday=[],e.bymonthday=[e.bymonthday]);if(Re(e.byweekno)&&!st(e.byweekno)&&(e.byweekno=[e.byweekno]),!Re(e.byweekday))e.bynweekday=null;else if(Pt(e.byweekday))e.byweekday=[e.byweekday],e.bynweekday=null;else if(Of(e.byweekday))e.byweekday=[Ye.fromStr(e.byweekday).weekday],e.bynweekday=null;else if(e.byweekday instanceof Ye)!e.byweekday.n||e.freq>$.MONTHLY?(e.byweekday=[e.byweekday.weekday],e.bynweekday=null):(e.bynweekday=[[e.byweekday.weekday,e.byweekday.n]],e.byweekday=null);else{for(var a=[],o=[],t=0;t$.MONTHLY?a.push(u.weekday):o.push([u.weekday,u.n])}e.byweekday=Le(a)?a:null,e.bynweekday=Le(o)?o:null}return Re(e.byhour)?Pt(e.byhour)&&(e.byhour=[e.byhour]):e.byhour=e.freq<$.HOURLY?[e.dtstart.getUTCHours()]:null,Re(e.byminute)?Pt(e.byminute)&&(e.byminute=[e.byminute]):e.byminute=e.freq<$.MINUTELY?[e.dtstart.getUTCMinutes()]:null,Re(e.bysecond)?Pt(e.bysecond)&&(e.bysecond=[e.bysecond]):e.bysecond=e.freq<$.SECONDLY?[e.dtstart.getUTCSeconds()]:null,{parsedOptions:e}}function xT(r){var e=r.dtstart.getTime()%1e3;if(!ra(r.freq))return[];var t=[];return r.byhour.forEach(function(n){r.byminute.forEach(function(i){r.bysecond.forEach(function(s){t.push(new _i(n,i,s,e))})})}),t}function sa(r){var e=r.split(` -`).map(gx).filter(function(t){return t!==null});return at(at({},e[0]),e[1])}function ia(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=ea(i),e}function gx(r){if(r=r.replace(/^\s+|\s+$/,""),!r.length)return null;var e=/^([A-Z]+?)[:;]/.exec(r.toUpperCase());if(!e)return CT(r);var t=e[1];switch(t.toUpperCase()){case"RRULE":case"EXRULE":return CT(r);case"DTSTART":return ia(r);default:throw new Error("Unsupported RFC prop ".concat(t," in ").concat(r))}}function CT(r){var e=r.replace(/^RRULE:/i,""),t=ia(e),n=r.replace(/^(?:RRULE|EXRULE):/i,"").split(";");return n.forEach(function(i){var s=i.split("="),a=s[0],o=s[1];switch(a.toUpperCase()){case"FREQ":t.freq=ae[o.toUpperCase()];break;case"WKST":t.wkst=Vt[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=yx(o),l=a.toLowerCase();t[l]=u;break;case"BYWEEKDAY":case"BYDAY":t.byweekday=Tx(o);break;case"DTSTART":case"TZID":var c=ia(r);t.tzid=c.tzid,t.dtstart=c.dtstart;break;case"UNTIL":t.until=ea(o);break;case"BYEASTER":t.byeaster=Number(o);break;default:throw new Error("Unknown RRULE property '"+a+"'")}}),t}function yx(r){if(r.indexOf(",")!==-1){var e=r.split(",");return e.map(PT)}return PT(r)}function PT(r){return/^[+-]?\d+$/.test(r)?Number(r):r}function Tx(r){var e=r.split(",");return e.map(function(t){if(t.length===2)return Vt[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=Vt[s].weekday;return new Ye(a,i)})}var Cn=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=yi(this.date.getTime(),this.isUTC);return this.isUTC?":".concat(e):";TZID=".concat(this.tzid,":").concat(e)},r.prototype.getTime=function(){return this.date.getTime()},r.prototype.rezonedDate=function(){return this.isUTC?this.date:wT(this.date,this.tzid)},r}();function aa(r){for(var e=[],t="",n=Object.keys(r),i=Object.keys(na),s=0;s=4?(c=0,l=o.yearlen+ut(a-e.wkst,7)):l=n-c;for(var p=Math.floor(l/7),h=ut(l,7),_=Math.floor(p+h/4),y=0;y0&&w<=_){var M=void 0;w>1?(M=c+(w-1)*7,c!==u&&(M-=7-u)):M=c;for(var P=0;P<7&&(o.wnomask[M]=1,M++,o.wdaymask[M]!==e.wkst);P++);}}if(ce(e.byweekno,1)){var M=c+_*7;if(c!==u&&(M-=7-u),M=4?(X=0,he=V+ut(F-e.wkst,7)):he=n-c,N=Math.floor(52+ut(he,7)/4)}if(ce(e.byweekno,N))for(var M=0;Ms)return $r(r);if(N>=t){var F=KT(N,e);if(!r.accept(F)||o&&(--o,!o))return $r(r)}}else for(var P=_;Ps)return $r(r);if(N>=t){var F=KT(N,e);if(!r.accept(F)||o&&(--o,!o))return $r(r)}}}if(e.interval===0||(u.add(e,w),u.year>xo))return $r(r);ra(n)||(c=l.gettimeset(n)(u.hour,u.minute,u.second,0)),l.rebuild(u.year,u.month)}}function Dx(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 Le(n)&&!ce(n,r.mmask[e])||Le(i)&&!r.wnomask[e]||Le(s)&&!ce(s,r.wdaymask[e])||Le(r.nwdaymask)&&!r.nwdaymask[e]||a!==null&&!ce(r.eastermask,e)||(Le(o)||Le(u))&&!ce(o,r.mdaymask[e])&&!ce(u,r.nmdaymask[e])||Le(l)&&(e=r.yearlen&&!ce(l,e+1-r.yearlen)&&!ce(l,-r.nextyearlen+e-r.yearlen))}function KT(r,e){return new Cn(r,e.tzid).rezonedDate()}function $r(r){return r.getValue()}function Rx(r,e,t,n,i){for(var s=!1,a=e;a=$.HOURLY&&Le(i)&&!ce(i,e.hour)||n>=$.MINUTELY&&Le(s)&&!ce(s,e.minute)||n>=$.SECONDLY&&Le(a)&&!ce(a,e.second)?[]:r.gettimeset(n)(e.hour,e.minute,e.second,e.millisecond)}var Vt={MO:new Ye(0),TU:new Ye(1),WE:new Ye(2),TH:new Ye(3),FR:new Ye(4),SA:new Ye(5),SU:new Ye(6)},na={freq:ae.YEARLY,dtstart:null,interval:1,wkst:Vt.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},AT=Object.keys(na),$=function(){function r(e,t){e===void 0&&(e={}),t===void 0&&(t=!1),this._cache=t?null:new NT,this.origOptions=Af(e);var n=MT(e).parsedOptions;this.options=n}return r.parseText=function(e,t){return ta(e,t)},r.fromText=function(e,t){return OT(e,t)},r.fromString=function(e){return new r(r.parseString(e)||void 0)},r.prototype._iter=function(e){return No(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 xf("all",{},e));var t=this._cacheGet("all");return t===!1&&(t=this._iter(new qr("all",{})),this._cacheAdd("all",t)),t},r.prototype.between=function(e,t,n,i){if(n===void 0&&(n=!1),!xn(e)||!xn(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 xf("between",s,i));var a=this._cacheGet("between",s);return a===!1&&(a=this._iter(new qr("between",s)),this._cacheAdd("between",a,s)),a},r.prototype.before=function(e,t){if(t===void 0&&(t=!1),!xn(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 qr("before",n)),this._cacheAdd("before",i,n)),i},r.prototype.after=function(e,t){if(t===void 0&&(t=!1),!xn(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 qr("after",n)),this._cacheAdd("after",i,n)),i},r.prototype.count=function(){return this.all().length},r.prototype.toString=function(){return aa(this.origOptions)},r.prototype.toText=function(e,t,n){return ST(this,e,t,n)},r.prototype.isFullyConvertibleToText=function(){return DT(this)},r.prototype.clone=function(){return new r(this.origOptions)},r.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],r.YEARLY=ae.YEARLY,r.MONTHLY=ae.MONTHLY,r.WEEKLY=ae.WEEKLY,r.DAILY=ae.DAILY,r.HOURLY=ae.HOURLY,r.MINUTELY=ae.MINUTELY,r.SECONDLY=ae.SECONDLY,r.MO=Vt.MO,r.TU=Vt.TU,r.WE=Vt.WE,r.TH=Vt.TH,r.FR=Vt.FR,r.SA=Vt.SA,r.SU=Vt.SU,r.parseString=sa,r.optionsToString=aa,r}();function VT(r,e,t,n,i,s){var a={},o=r.accept;function u(h,_){t.forEach(function(y){y.between(h,_,!0).forEach(function(w){a[Number(w)]=!0})})}i.forEach(function(h){var _=new Cn(h,s).rezonedDate();a[Number(_)]=!0}),r.accept=function(h){var _=Number(h);return isNaN(_)?o.call(this,h):!a[_]&&(u(new Date(_-1),new Date(_+1)),!a[_])?(a[_]=!0,o.call(this,h)):!0},r.method==="between"&&(u(r.args.after,r.args.before),r.accept=function(h){var _=Number(h);return a[_]?!0:(a[_]=!0,o.call(this,h))});for(var l=0;l1||i.length||s.length||a.length){var c=new Nf(l);return c.dtstart(o),c.tzid(u||void 0),n.forEach(function(h){c.rrule(new $(Pf(h,o,u),l))}),i.forEach(function(h){c.rdate(h)}),s.forEach(function(h){c.exrule(new $(Pf(h,o,u),l))}),a.forEach(function(h){c.exdate(h)}),e.compatible&&e.dtstart&&c.rdate(o),c}var p=n[0]||{};return new $(Pf(p,p.dtstart||e.dtstart||o,p.tzid||e.tzid||u),l)}function Io(r,e){return e===void 0&&(e={}),Ax(r,Cx(e))}function Pf(r,e,t){return at(at({},r),{dtstart:e,tzid:t})}function Cx(r){var e=[],t=Object.keys(r),n=Object.keys(QT);if(t.forEach(function(i){ce(n,i)||e.push(i)}),e.length)throw new Error("Invalid options: "+e.join(", "));return at(at({},QT),r)}function Px(r){if(r.indexOf(":")===-1)return{name:"RRULE",value:r};var e=TT(r,":",1),t=e[0],n=e[1];return{name:t,value:n}}function Nx(r){var e=Px(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 Ix(r,e){if(e===void 0&&(e=!1),r=r&&r.trim(),!r)throw new Error("Invalid empty string");if(!e)return r.split(/\s/);for(var t=r.split(` -`),n=0;n0&&i[0]===" "?(t[n-1]+=i.slice(1),t.splice(n,1)):n+=1:t.splice(n,1)}return t}function Fx(r){r.forEach(function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)})}function XT(r,e){return Fx(e),r.split(",").map(function(t){return ea(t)})}function ZT(r){var e=this;return function(t){if(t!==void 0&&(e["_".concat(r)]=t),e["_".concat(r)]!==void 0)return e["_".concat(r)];for(var n=0;nn}static nextAfterYears(e,t,n,i){let s=1;for(i!==void 0&&(s=Number.parseInt(i.trim(),10));Ze.isSkippingTooManyYears(e,t,s);)t=Ze.fromOneDayEarlier(e,n);return t}static isSkippingTooManyYears(e,t,n){return t.year()-e.year()>n}static fromOneDayEarlier(e,t){e.subtract(1,"days").endOf("day");let n=t.origOptions;return n.dtstart=e.startOf("day").toDate(),t=new $(n),window.moment(t.after(e.toDate()))}static addTimezone(e){return window.moment.utc(e).local(!0).startOf("day")}};function Fo(r){return r.replace(/([.*+?^${}()|[\]/\\])/g,"\\$1")}var on=class{constructor(){this._globalFilter="";this._removeGlobalFilter=!1}static getInstance(){return on.instance||(on.instance=new on),on.instance}get(){return this._globalFilter}set(e){this._globalFilter=e}reset(){this.set(on.empty)}isEmpty(){return this.get()===on.empty}equals(e){return this.get()===e}includedIn(e){let t=this.get();return e.includes(t)}prependTo(e){return this.get()+" "+e}removeAsWordFromDependingOnSettings(e){return this.getRemoveGlobalFilter()?this.removeAsWordFrom(e):e}getRemoveGlobalFilter(){return this._removeGlobalFilter}setRemoveGlobalFilter(e){this._removeGlobalFilter=e}removeAsWordFrom(e){if(this.isEmpty())return e;let t=RegExp("(^|\\s)"+Fo(this.get())+"($|\\s)","ug");return e.search(t)>-1&&(e=e.replace(t,"$1$2").replace(" "," ").trim()),e}removeAsSubstringFrom(e){let t=this.get();return e.replace(t,"").trim()}},ge=on;ge.empty="";var If=5;function Ff(r,e){let t=[r.startDateSymbol,r.scheduledDateSymbol,r.dueDateSymbol].join("|");return(n,i,s)=>{let a=[];return a=a.concat(Ux(n,i,s,t,e)),a=a.concat(Wx(n,i,s,r.recurrenceSymbol)),a=a.concat(Lx(n,i,s,r)),a.length>0&&!a.some(o=>o.suggestionType==="match")&&a.unshift({suggestionType:"empty",displayText:"\u23CE",appendText:` -`}),a=a.slice(0,s.autoSuggestMaxItems),a}}function Lx(r,e,t,n){let i=u=>Object.values(n.prioritySymbols).some(l=>l.length>0&&u.includes(l)),s=[];if(r.includes(n.dueDateSymbol)||s.push({displayText:`${n.dueDateSymbol} due date`,appendText:`${n.dueDateSymbol} `}),r.includes(n.startDateSymbol)||s.push({displayText:`${n.startDateSymbol} start date`,appendText:`${n.startDateSymbol} `}),r.includes(n.scheduledDateSymbol)||s.push({displayText:`${n.scheduledDateSymbol} scheduled date`,appendText:`${n.scheduledDateSymbol} `}),i(r)||(s.push({displayText:`${n.prioritySymbols.High} high priority`,appendText:`${n.prioritySymbols.High} `}),s.push({displayText:`${n.prioritySymbols.Medium} medium priority`,appendText:`${n.prioritySymbols.Medium} `}),s.push({displayText:`${n.prioritySymbols.Low} low priority`,appendText:`${n.prioritySymbols.Low} `}),s.push({displayText:`${n.prioritySymbols.Highest} highest priority`,appendText:`${n.prioritySymbols.Highest} `}),s.push({displayText:`${n.prioritySymbols.Lowest} lowest priority`,appendText:`${n.prioritySymbols.Lowest} `})),r.includes(n.recurrenceSymbol)||s.push({displayText:`${n.recurrenceSymbol} recurring (repeat)`,appendText:`${n.recurrenceSymbol} `}),!r.includes(n.createdDateSymbol)){let l=Ct.parseDate("today",!0).format(z.dateFormat);s.push({textToMatch:`${n.createdDateSymbol} created`,displayText:`${n.createdDateSymbol} created today (${l})`,appendText:`${n.createdDateSymbol} ${l} `})}let a=Lf(r,/([a-zA-Z'_-]*)/g,e),o=[];if(a&&a.length>0){let u=a[0];if(u.length>=Math.max(1,t.autoSuggestMinMatch)){let l=s.filter(c=>(c.textToMatch||c.displayText).toLowerCase().includes(u.toLowerCase()));for(let c of l)o.push({suggestionType:"match",displayText:c.displayText,appendText:c.appendText,insertAt:a.index,insertSkip:u.length})}}return o.length===0&&t.autoSuggestMinMatch===0?s:o}function Ux(r,e,t,n,i){let s=["today","tomorrow","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","next week","next month","next year"],a=[],o=new RegExp(`(${n})\\s*([0-9a-zA-Z ]*)`,"ug"),u=Lf(r,o,e);if(u&&u.length>=2){let l=u[1],c=u[2];if(c.length1?Ct.parseDate(mi(c),!0):null;p&&p.isValid()&&a.push({displayText:`${p.format(z.dateFormat)}`,appendText:`${l} ${p.format(z.dateFormat)} `,insertAt:u.index,insertSkip:u[0].length});let h=1,_=s.filter(y=>c&&c.length>=h&&y.toLowerCase().includes(c.toLowerCase())).slice(0,i);_.length===0&&(_=s.slice(0,i));for(let y of _){let M=`${Ct.parseDate(y,!0).format(z.dateFormat)}`;a.push({suggestionType:"match",displayText:`${y} (${M})`,appendText:`${l} ${M} `,insertAt:u.index,insertSkip:u[0].length})}}return a}function Wx(r,e,t,n){var u;let i=["every","every day","every week","every month","every month on the","every year","every week on Sunday","every week on Monday","every week on Tuesday","every week on Wednesday","every week on Thursday","every week on Friday","every week on Saturday"],s=[],a=new RegExp(`(${n})\\s*([0-9a-zA-Z ]*)`,"ug"),o=Lf(r,a,e);if(o&&o.length>=2){let l=o[1],c=o[2];if(c.length0){let y=(u=Ze.fromText({recurrenceRuleText:c,startDate:null,scheduledDate:null,dueDate:null}))==null?void 0:u.toText();if(y){let w=`${l} ${y} `;if(s.push({suggestionType:"match",displayText:`\u2705 ${y}`,appendText:w,insertAt:o.index,insertSkip:o[0].length}),o[0]==w)return[]}}let p=1,h=t.autoSuggestMaxItems/2,_=i.filter(y=>c&&c.length>=p&&y.toLowerCase().includes(c.toLowerCase())).slice(0,h);_.length===0&&c.trim().length===0&&(_=i.slice(0,h));for(let y of _)s.push({suggestionType:"match",displayText:`${y}`,appendText:`${l} ${y} `,insertAt:o.index,insertSkip:o[0].length})}return s}function Lf(r,e,t){let n=r.matchAll(e);for(let i of n)if((i==null?void 0:i.index)&&i.index<=t&&t<=i.index+i[0].length)return i}function qx(r,e){if(e.length===0)return!1;let t=Object.fromEntries(e.map(([i,s])=>[i,0])),n=Object.fromEntries(e.map(([i,s])=>[s,i]));for(let i of r)i in t?t[i]++:i in n&&(t[n[i]]=Math.max(0,t[n[i]]-1));return Object.values(t).some(i=>i>0)}function nb(r,e){return(t,n,i)=>qx(t.slice(0,n),e)?r(t,n,i):[]}function ib(r,e){return ge.getInstance().includedIn(r)&&$x(r,e)}function $x(r,e){if(r.length===0)return!1;let t=ye.extractTaskComponents(r);if(!t)return!1;let n=t.indentation+t.listMarker+" ["+t.status.symbol+"] ";return e>=n.length}var oa=class{constructor(){this.hideTaskCount=!1;this.hideBacklinks=!1;this.hidePriority=!1;this.hideCreatedDate=!1;this.hideStartDate=!1;this.hideScheduledDate=!1;this.hideDoneDate=!1;this.hideDueDate=!1;this.hideRecurrenceRule=!1;this.hideEditButton=!1;this.hideUrgency=!0;this.hideTags=!1;this.shortMode=!1;this.explainQuery=!1}},un=class{constructor(e){this.defaultLayout=["description","priority","recurrenceRule","createdDate","startDate","scheduledDate","dueDate","doneDate","blockLink"];this.hiddenTaskLayoutComponents=[];this.taskListHiddenClasses=[];e?this.options=e:this.options=new oa,this.shownTaskLayoutComponents=this.defaultLayout,this.applyOptions()}applyOptions(){let e=[[this.options.hidePriority,"priority"],[this.options.hideRecurrenceRule,"recurrenceRule"],[this.options.hideCreatedDate,"createdDate"],[this.options.hideStartDate,"startDate"],[this.options.hideScheduledDate,"scheduledDate"],[this.options.hideDueDate,"dueDate"],[this.options.hideDoneDate,"doneDate"]];for(let[n,i]of e)this.hideComponent(n,i),this.generateHiddenClassForTaskList(n,i);let t=[[this.options.hideTags,"tags"],[this.options.hideUrgency,"urgency"],[this.options.hideBacklinks,"backlinks"],[this.options.hideEditButton,"edit-button"]];for(let[n,i]of t)this.generateHiddenClassForTaskList(n,i);this.options.shortMode&&this.taskListHiddenClasses.push("tasks-layout-short-mode")}generateHiddenClassForTaskList(e,t){e&&this.taskListHiddenClasses.push(`tasks-layout-hide-${t}`)}hideComponent(e,t){e&&(this.hiddenTaskLayoutComponents.push(t),this.shownTaskLayoutComponents=this.shownTaskLayoutComponents.filter(n=>n!=t))}};var Uf={prioritySymbols:{Highest:"\u{1F53A}",High:"\u23EB",Medium:"\u{1F53C}",Low:"\u{1F53D}",Lowest:"\u23EC",None:""},startDateSymbol:"\u{1F6EB}",createdDateSymbol:"\u2795",scheduledDateSymbol:"\u23F3",dueDateSymbol:"\u{1F4C5}",doneDateSymbol:"\u2705",recurrenceSymbol:"\u{1F501}",TaskFormatRegularExpressions:{priorityRegex:/([🔺⏫🔼🔽⏬])$/u,startDateRegex:/🛫 *(\d{4}-\d{2}-\d{2})$/u,createdDateRegex:/➕ *(\d{4}-\d{2}-\d{2})$/u,scheduledDateRegex:/[⏳⌛] *(\d{4}-\d{2}-\d{2})$/u,dueDateRegex:/[📅📆🗓] *(\d{4}-\d{2}-\d{2})$/u,doneDateRegex:/✅ *(\d{4}-\d{2}-\d{2})$/u,recurrenceRegex:/🔁 ?([a-zA-Z0-9, !]+)$/iu}},Pn=class{constructor(e){this.symbols=e}serialize(e){let t=new un,n="";for(let i of t.shownTaskLayoutComponents)n+=this.componentToString(e,t,i);return n}componentToString(e,t,n){var p;let{prioritySymbols:i,startDateSymbol:s,createdDateSymbol:a,scheduledDateSymbol:o,doneDateSymbol:u,recurrenceSymbol:l,dueDateSymbol:c}=this.symbols;switch(n){case"description":return e.description;case"priority":{let h="";return e.priority==="0"?h=" "+i.Highest:e.priority==="1"?h=" "+i.High:e.priority==="2"?h=" "+i.Medium:e.priority==="4"?h=" "+i.Low:e.priority==="5"&&(h=" "+i.Lowest),h}case"startDate":return e.startDate?t.options.shortMode?" "+s:` ${s} ${e.startDate.format(z.dateFormat)}`:"";case"createdDate":return e.createdDate?t.options.shortMode?" "+a:` ${a} ${e.createdDate.format(z.dateFormat)}`:"";case"scheduledDate":return!e.scheduledDate||e.scheduledDateIsInferred?"":t.options.shortMode?" "+o:` ${o} ${e.scheduledDate.format(z.dateFormat)}`;case"doneDate":return e.doneDate?t.options.shortMode?" "+u:` ${u} ${e.doneDate.format(z.dateFormat)}`:"";case"dueDate":return e.dueDate?t.options.shortMode?" "+c:` ${c} ${e.dueDate.format(z.dateFormat)}`:"";case"recurrenceRule":return e.recurrence?t.options.shortMode?" "+l:` ${l} ${e.recurrence.toText()}`:"";case"blockLink":return(p=e.blockLink)!=null?p:"";default:throw new Error(`Don't know how to render task component of type '${n}'`)}}parsePriority(e){let{prioritySymbols:t}=this.symbols;switch(e){case t.Lowest:return"5";case t.Low:return"4";case t.Medium:return"2";case t.High:return"1";case t.Highest:return"0";default:return"3"}}deserialize(e){let{TaskFormatRegularExpressions:t}=this.symbols,n,i="3",s=null,a=null,o=null,u=null,l=null,c="",p=null,h="",_=20,y=0;do{n=!1;let w=e.match(t.priorityRegex);w!==null&&(i=this.parsePriority(w[1]),e=e.replace(t.priorityRegex,"").trim(),n=!0);let M=e.match(t.doneDateRegex);M!==null&&(u=window.moment(M[1],z.dateFormat),e=e.replace(t.doneDateRegex,"").trim(),n=!0);let P=e.match(t.dueDateRegex);P!==null&&(o=window.moment(P[1],z.dateFormat),e=e.replace(t.dueDateRegex,"").trim(),n=!0);let N=e.match(t.scheduledDateRegex);N!==null&&(a=window.moment(N[1],z.dateFormat),e=e.replace(t.scheduledDateRegex,"").trim(),n=!0);let F=e.match(t.startDateRegex);F!==null&&(s=window.moment(F[1],z.dateFormat),e=e.replace(t.startDateRegex,"").trim(),n=!0);let X=e.match(t.createdDateRegex);X!==null&&(l=window.moment(X[1],z.dateFormat),e=e.replace(t.createdDateRegex,"").trim(),n=!0);let V=e.match(t.recurrenceRegex);V!==null&&(c=V[1].trim(),e=e.replace(t.recurrenceRegex,"").trim(),n=!0);let he=e.match(z.hashTagsFromEnd);if(he!=null){e=e.replace(z.hashTagsFromEnd,"").trim(),n=!0;let j=he[0].trim();h=h.length>0?[j,h].join(" "):j}y++}while(n&&y<=_);return c.length>0&&(p=Ze.fromText({recurrenceRuleText:c,startDate:s,scheduledDate:a,dueDate:o})),h.length>0&&(e+=" "+h),{description:e,priority:i,startDate:s,createdDate:l,scheduledDate:a,dueDate:o,doneDate:u,recurrence:p,tags:ye.extractHashtags(e)}}};function Nn(r){let e=["(?:",/(?=[^\]]+\])\[/,"|",/(?=[^)]+\))\(/,")",/ */,r,/ */,/[)\]]/,/(?: *,)?/,/$/].map(t=>t instanceof RegExp?t.source:t).join("");return new RegExp(e,r.flags)}var Wf={prioritySymbols:{Highest:"priority:: highest",High:"priority:: high",Medium:"priority:: medium",Low:"priority:: low",Lowest:"priority:: lowest",None:""},startDateSymbol:"start::",createdDateSymbol:"created::",scheduledDateSymbol:"scheduled::",dueDateSymbol:"due::",doneDateSymbol:"completion::",recurrenceSymbol:"repeat::",TaskFormatRegularExpressions:{priorityRegex:Nn(/priority:: *(highest|high|medium|low|lowest)/),startDateRegex:Nn(/start:: *(\d{4}-\d{2}-\d{2})/),createdDateRegex:Nn(/created:: *(\d{4}-\d{2}-\d{2})/),scheduledDateRegex:Nn(/scheduled:: *(\d{4}-\d{2}-\d{2})/),dueDateRegex:Nn(/due:: *(\d{4}-\d{2}-\d{2})/),doneDateRegex:Nn(/completion:: *(\d{4}-\d{2}-\d{2})/),recurrenceRegex:Nn(/repeat:: *([a-zA-Z0-9, !]+)/)}},Lo=class extends Pn{constructor(){super(Wf)}parsePriority(e){switch(e){case"highest":return"0";case"high":return"1";case"medium":return"2";case"low":return"4";case"lowest":return"5";default:return"3"}}componentToString(e,t,n){let i=super.componentToString(e,t,n);return i!==""&&!["blockLink","description"].includes(n)?` [${i.trim()}]`:i}};var Qt=(a=>(a.TODO="TODO",a.DONE="DONE",a.IN_PROGRESS="IN_PROGRESS",a.CANCELLED="CANCELLED",a.NON_TASK="NON_TASK",a.EMPTY="EMPTY",a))(Qt||{}),Je=class{constructor(e,t,n,i,s="TODO"){this.symbol=e,this.name=t,this.nextStatusSymbol=n,this.availableAsCommand=i,this.type=s}};var Dt=class{get symbol(){return this.configuration.symbol}get name(){return this.configuration.name}get nextStatusSymbol(){return this.configuration.nextStatusSymbol}get nextSymbol(){return this.configuration.nextStatusSymbol}get availableAsCommand(){return this.configuration.availableAsCommand}get type(){return this.configuration.type}constructor(e){this.configuration=e}static makeDone(){return new Dt(new Je("x","Done"," ",!0,"DONE"))}static makeEmpty(){return new Dt(new Je("","EMPTY","",!0,"EMPTY"))}static makeTodo(){return new Dt(new Je(" ","Todo","x",!0,"TODO"))}static makeCancelled(){return new Dt(new Je("-","Cancelled"," ",!0,"CANCELLED"))}static makeInProgress(){return new Dt(new Je("/","In Progress","x",!0,"IN_PROGRESS"))}static getTypeForUnknownSymbol(e){switch(e){case"x":case"X":return"DONE";case"/":return"IN_PROGRESS";case"-":return"CANCELLED";case"":return"EMPTY";case" ":default:return"TODO"}}static getTypeFromStatusTypeString(e){return Qt[e]||"TODO"}static createUnknownStatus(e){return new Dt(new Je(e,"Unknown","x",!1,"TODO"))}static createFromImportedValue(e){let t=e[0],n=Dt.getTypeFromStatusTypeString(e[3]);return new Dt(new Je(t,e[1],e[2],!1,n))}isCompleted(){return this.type==="DONE"}identicalTo(e){let t=["symbol","name","nextStatusSymbol","availableAsCommand","type"];for(let n of t)if(this[n]!==e[n])return!1;return!0}previewText(){let e="";return Dt.tasksPluginCanCreateCommandsForStatuses()&&this.availableAsCommand&&(e=" Available as a command."),`- [${this.symbol}] => [${this.nextStatusSymbol}], name: '${this.name}', type: '${this.configuration.type}'.${e}`}static tasksPluginCanCreateCommandsForStatuses(){return!1}},te=Dt;te.DONE=Dt.makeDone(),te.EMPTY=Dt.makeEmpty(),te.TODO=Dt.makeTodo();var Uo=class{constructor(e=!1,t=!1){this.ignoreSortInstructions=e,this.showTaskHiddenData=t}};var Ge=class{constructor(){this.coreStatuses=[te.makeTodo().configuration,te.makeDone().configuration],this.customStatuses=[te.makeInProgress().configuration,te.makeCancelled().configuration]}static addStatus(e,t){e.push(t)}static replaceStatus(e,t,n){let i=this.findStatusIndex(t,e);return i<=-1?!1:(e.splice(i,1,n),!0)}static findStatusIndex(e,t){let n=new te(e);return t.findIndex(i=>new te(i).previewText()==n.previewText())}static deleteStatus(e,t){let n=this.findStatusIndex(t,e);return n<=-1?!1:(e.splice(n,1),!0)}static deleteAllCustomStatuses(e){e.customStatuses.splice(0)}static resetAllCustomStatuses(e){Ge.deleteAllCustomStatuses(e),new Ge().customStatuses.forEach(n=>{Ge.addStatus(e.customStatuses,n)})}static bulkAddStatusCollection(e,t){let n=[];return t.forEach(i=>{e.customStatuses.find(a=>a.symbol==i[0]&&a.name==i[1]&&a.nextStatusSymbol==i[2])?n.push(`The status ${i[1]} (${i[0]}) is already added.`):Ge.addStatus(e.customStatuses,te.createFromImportedValue(i))}),n}static applyToStatusRegistry(e,t){t.clearStatuses(),e.coreStatuses.forEach(n=>{t.add(n)}),e.customStatuses.forEach(n=>{t.add(n)})}};var sb=[{index:9999,internalName:"INTERNAL_TESTING_ENABLED_BY_DEFAULT",displayName:"Test Item. Used to validate the Feature Framework.",description:"Description",enabledByDefault:!0,stable:!1}];var _r=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 sb.forEach(t=>{e=[...e,new _r(t.internalName,t.index,t.description,t.displayName,t.enabledByDefault,t.stable)]}),e}static get settingsFlags(){let e={};return _r.values.forEach(t=>{e[t.internalName]=t.enabledByDefault}),e}static fromString(e){for(let t of _r.values)if(e===t.internalName)return t;throw new RangeError(`Illegal argument passed to fromString(): ${e} does not correspond to any available Feature ${this.prototype.constructor.name}`)}};var jr={tasksPluginEmoji:{displayName:"Tasks Emoji Format",taskSerializer:new Pn(Uf),buildSuggestions:Ff(Uf,If)},dataview:{displayName:"Dataview",taskSerializer:new Lo,buildSuggestions:nb(Ff(Wf,If),[["(",")"],["[","]"]])}},jx={globalQuery:"",globalFilter:"",removeGlobalFilter:!1,taskFormat:"tasksPluginEmoji",setCreatedDate:!1,setDoneDate:!0,autoSuggestInEditor:!0,autoSuggestMinMatch:0,autoSuggestMaxItems:6,provideAccessKeys:!0,useFilenameAsScheduledDate:!1,filenameAsDateFolders:[],recurrenceOnNextLine:!1,statusSettings:new Ge,features:_r.settingsFlags,generalSettings:{},headingOpened:{},debugSettings:new Uo},ln=pe({},jx),Q=()=>{for(let r in _r.settingsFlags)ln.features[r]===void 0&&(ln.features[r]=_r.settingsFlags[r]);return ln.statusSettings.customStatuses.forEach((r,e,t)=>{var i,s;let n=te.getTypeFromStatusTypeString(r.type);t[e]=new Je((i=r.symbol)!=null?i:" ",r.name,(s=r.nextStatusSymbol)!=null?s:"x",r.availableAsCommand,n)}),pe({},ln)},et=r=>(ln=pe(pe({},ln),r),Q());var In=(r,e)=>(ln.generalSettings[r]=e,Q()),ab=r=>{var e;return(e=ln.features[r])!=null?e:!1};function la(){return jr[Q().taskFormat]}var De=class{constructor(){this._registeredStatuses=[];this.addDefaultStatusTypes()}get registeredStatuses(){return this._registeredStatuses.filter(({symbol:e})=>e!==te.EMPTY.symbol)}static getInstance(){return De.instance||(De.instance=new De),De.instance}add(e){this.hasSymbol(e.symbol)||(e instanceof te?this._registeredStatuses.push(e):this._registeredStatuses.push(new te(e)))}bySymbol(e){return this.hasSymbol(e)?this.getSymbol(e):te.EMPTY}bySymbolOrCreate(e){return this.hasSymbol(e)?this.getSymbol(e):te.createUnknownStatus(e)}byName(e){return this._registeredStatuses.filter(({name:t})=>t===e).length>0?this._registeredStatuses.filter(({name:t})=>t===e)[0]:te.EMPTY}resetToDefaultStatuses(){this.clearStatuses(),this.addDefaultStatusTypes()}clearStatuses(){this._registeredStatuses=[]}getNextStatus(e){if(e.nextStatusSymbol!==""){let t=this.bySymbol(e.nextStatusSymbol);if(t!==null)return t}return te.EMPTY}getNextStatusOrCreate(e){let t=this.getNextStatus(e);return t.type!=="EMPTY"?t:te.createUnknownStatus(e.nextStatusSymbol)}findUnknownStatuses(e){let t=e.filter(s=>!this.hasSymbol(s.symbol)),n=new De,i=[];return t.forEach(s=>{if(n.hasSymbol(s.symbol))return;let a=De.copyStatusWithNewName(s,`Unknown (${s.symbol})`);i.push(a),n.add(a)}),i}static copyStatusWithNewName(e,t){let n=new Je(e.symbol,t,e.nextStatusSymbol,e.availableAsCommand,e.type);return new te(n)}getSymbol(e){return this._registeredStatuses.filter(({symbol:t})=>t===e)[0]}hasSymbol(e){return this._registeredStatuses.find(t=>t.symbol===e)!==void 0}addDefaultStatusTypes(){[te.makeTodo(),te.makeInProgress(),te.makeDone(),te.makeCancelled()].forEach(t=>{this.add(t)})}};var or=class{static calculate(e){let t=0;if(e.dueDate!==null){let n=window.moment().startOf("day"),i=Math.round(n.diff(e.dueDate)/or.milliSecondsPerDay),s;i>=7?s=1:i>=-14?s=(i+14)*.8/21+.2:s=.2,t+=s*or.dueCoefficient}switch(e.scheduledDate!==null&&window.moment().isSameOrAfter(e.scheduledDate)&&(t+=1*or.scheduledCoefficient),e.startDate!==null&&window.moment().isBefore(e.startDate)&&(t+=1*or.startedCoefficient),e.priority){case"0":t+=1.5*or.priorityCoefficient;break;case"1":t+=1*or.priorityCoefficient;break;case"2":t+=.65*or.priorityCoefficient;break;case"3":t+=.325*or.priorityCoefficient;break;case"5":t-=.3*or.priorityCoefficient;break}return t}},Gr=or;Gr.dueCoefficient=12,Gr.scheduledCoefficient=5,Gr.startedCoefficient=-3,Gr.priorityCoefficient=6,Gr.milliSecondsPerDay=1e3*60*60*24;var Rt=class{static fromPath(e){let{useFilenameAsScheduledDate:t,filenameAsDateFolders:n}=Q();return!t||!this.matchesAnyFolder(n,e)?null:this.extractDateFromPath(e)}static matchesAnyFolder(e,t){return e.length===0?!0:e.some(n=>t.startsWith(n+"/"))}static extractDateFromPath(e){let t=Math.max(0,e.lastIndexOf("/")+1),n=e.lastIndexOf("."),i=e.substring(t,n),s=/(\d{4})-(\d{2})-(\d{2})/.exec(i);if(s||(s=/(\d{4})(\d{2})(\d{2})/.exec(i)),s){let a=window.moment([parseInt(s[1]),parseInt(s[2])-1,parseInt(s[3])]);if(a.isValid())return a}return null}static canApplyFallback({startDate:e,scheduledDate:t,dueDate:n}){return e===null&&n===null&&t===null}static updateTaskPath(e,t,n){let i=e.scheduledDate,s=e.scheduledDateIsInferred;return n===null?s&&(s=!1,i=null):s?i=n:this.canApplyFallback(e)&&(i=n,s=!0),new ye(Tt(pe({},e),{taskLocation:e.taskLocation.fromRenamedFile(t),scheduledDate:i,scheduledDateIsInferred:s}))}static removeInferredStatusIfNeeded(e,t){let n=e.scheduledDateIsInferred?e.scheduledDate:null;return t.map(i=>(n!==null&&!n.isSame(i.scheduledDate,"day")&&(i=new ye(Tt(pe({},i),{scheduledDateIsInferred:!1}))),i))}};var vt=class{constructor(e){this._date=null;this._date=e}get moment(){return this._date}formatAsDate(e=""){return this.format(z.dateFormat,e)}formatAsDateAndTime(e=""){return this.format(z.dateTimeFormat,e)}format(e,t=""){return this._date?this._date.format(e):t}toISOString(e){return this._date?this._date.toISOString(e):""}};var vi=class{constructor(e){this._path=e}get path(){return this._path}get pathWithoutExtension(){return this.withoutExtension(this.path)}withoutExtension(e){return e.replace(/\.md$/,"")}get root(){let e=this.path.replace(/\\/g,"/");e.charAt(0)==="/"&&(e=e.substring(1));let t=e.indexOf("/");return t==-1?"/":e.substring(0,t+1)}get folder(){let e=this.path,t=this.filename,n=e.substring(0,e.lastIndexOf(t));return n===""?"/":n}get filename(){let e=this.path.match(/([^/]+)$/);return e!==null?e[1]:""}get filenameWithoutExtension(){return this.withoutExtension(this.filename)}};var vr=class{static priorityNameUsingNone(e){let t="ERROR";switch(e){case"1":t="High";break;case"0":t="Highest";break;case"2":t="Medium";break;case"3":t="None";break;case"4":t="Low";break;case"5":t="Lowest";break}return t}static priorityNameUsingNormal(e){return vr.priorityNameUsingNone(e).replace("None","Normal")}};var It=class{},z=It;z.dateFormat="YYYY-MM-DD",z.dateTimeFormat="YYYY-MM-DD HH:mm",z.indentationRegex=/^([\s\t>]*)/,z.listMarkerRegex=/([-*+]|[0-9]+\.)/,z.checkboxRegex=/\[(.)\]/u,z.afterCheckboxRegex=/ *(.*)/u,z.taskRegex=new RegExp(It.indentationRegex.source+It.listMarkerRegex.source+" +"+It.checkboxRegex.source+It.afterCheckboxRegex.source,"u"),z.nonTaskRegex=new RegExp(It.indentationRegex.source+It.listMarkerRegex.source+"? *("+It.checkboxRegex.source+")?"+It.afterCheckboxRegex.source,"u"),z.listItemRegex=new RegExp(It.indentationRegex.source+It.listMarkerRegex.source),z.blockLinkRegex=/ \^[a-zA-Z0-9-]+$/u,z.hashTags=/(^|\s)#[^ !@#$%^&*(),.?":{}|<>]+/g,z.hashTagsFromEnd=new RegExp(It.hashTags.source+"$");var ye=class{constructor({status:e,description:t,taskLocation:n,indentation:i,listMarker:s,priority:a,createdDate:o,startDate:u,scheduledDate:l,dueDate:c,doneDate:p,recurrence:h,blockLink:_,tags:y,originalMarkdown:w,scheduledDateIsInferred:M}){this._urgency=null;this.status=e,this.description=t,this.indentation=i,this.listMarker=s,this.taskLocation=n,this.tags=y,this.priority=a,this.createdDate=o,this.startDate=u,this.scheduledDate=l,this.dueDate=c,this.doneDate=p,this.recurrence=h,this.blockLink=_,this.originalMarkdown=w,this.scheduledDateIsInferred=M}static fromLine({line:e,taskLocation:t,fallbackDate:n}){let i=ye.extractTaskComponents(e);return i===null||!ge.getInstance().includedIn(i.body)?null:ye.parseTaskSignifiers(e,t,n)}static parseTaskSignifiers(e,t,n){let i=ye.extractTaskComponents(e);if(i===null)return null;let{taskSerializer:s}=la(),a=s.deserialize(i.body),o=!1;return Rt.canApplyFallback(a)&&n!==null&&(a.scheduledDate=n,o=!0),a.tags=a.tags.map(u=>u.trim()),a.tags=a.tags.filter(u=>!ge.getInstance().equals(u)),new ye(Tt(pe(pe({},i),a),{taskLocation:t,originalMarkdown:e,scheduledDateIsInferred:o}))}static extractTaskComponents(e){let t=e.match(z.taskRegex);if(t===null)return null;let n=t[1],i=t[2],s=t[3],a=De.getInstance().bySymbolOrCreate(s),o=t[4].trim(),u=o.match(z.blockLinkRegex),l=u!==null?u[0]:"";return l!==""&&(o=o.replace(z.blockLinkRegex,"").trim()),{indentation:n,listMarker:i,status:a,body:o,blockLink:l}}toString(){return la().taskSerializer.serialize(this)}toFileLineString(){return`${this.indentation}${this.listMarker} [${this.status.symbol}] ${this.toString()}`}toggle(){let e=De.getInstance().getNextStatusOrCreate(this.status),t=null,n=null;if(e.isCompleted()){let{setDoneDate:a}=Q();a&&(t=window.moment()),this.recurrence!==null&&(n=this.recurrence.next())}let i=new ye(Tt(pe({},this),{status:e,doneDate:t})),s=[];if(n!==null){let{setCreatedDate:a}=Q(),o=null;a&&(o=window.moment());let u=De.getInstance().getNextStatusOrCreate(e),l=new ye(Tt(pe(pe({},this),n),{status:u,blockLink:"",createdDate:o}));s.push(l)}return s.push(i),s}toggleWithRecurrenceInUsersOrder(){let e=this.toggle(),{recurrenceOnNextLine:t}=Q();return t?e.reverse():e}get isDone(){return this.status.type==="DONE"||this.status.type==="CANCELLED"||this.status.type==="NON_TASK"}get priorityNumber(){return Number.parseInt(this.priority)}get descriptionWithoutTags(){return this.description.replace(z.hashTags,"").trim()}get priorityName(){return vr.priorityNameUsingNormal(this.priority)}get urgency(){return this._urgency===null&&(this._urgency=Gr.calculate(this)),this._urgency}get path(){return this.taskLocation.path}get created(){return new vt(this.createdDate)}get done(){return new vt(this.doneDate)}get due(){return new vt(this.dueDate)}get scheduled(){return new vt(this.scheduledDate)}get start(){return new vt(this.startDate)}get happensDates(){return Array.of(this.startDate,this.scheduledDate,this.dueDate)}get happens(){let t=this.happensDates.sort(Yr);return new vt(t[0])}get isRecurring(){return this.recurrence!==null}get recurrenceRule(){return this.recurrence?this.recurrence.toText():""}get heading(){return this.precedingHeader}get hasHeading(){return this.precedingHeader!==null}get file(){return new vi(this.path)}get filename(){let e=this.path.match(/([^/]+)\.md$/);return e!==null?e[1]:null}get lineNumber(){return this.taskLocation.lineNumber}get sectionStart(){return this.taskLocation.sectionStart}get sectionIndex(){return this.taskLocation.sectionIndex}get precedingHeader(){return this.taskLocation.precedingHeader}getLinkText({isFilenameUnique:e}){let t;return e?t=this.filename:t="/"+this.path,t===null?null:(this.precedingHeader!==null&&this.precedingHeader!==t&&(t=t+" > "+this.precedingHeader),t)}static tasksListsIdentical(e,t){return e.length!==t.length?!1:e.every((n,i)=>n.identicalTo(t[i]))}identicalTo(e){let t=["description","path","indentation","listMarker","lineNumber","sectionStart","sectionIndex","precedingHeader","priority","blockLink","scheduledDateIsInferred"];for(let s of t)if(this[s]!==e[s])return!1;if(!this.status.identicalTo(e.status)||this.tags.length!==e.tags.length||!this.tags.every(function(s,a){return s===e.tags[a]}))return!1;t=["createdDate","startDate","scheduledDate","dueDate","doneDate"];for(let s of t){let a=this[s],o=e[s];if(Yr(a,o)!==0)return!1}let n=this.recurrence,i=e.recurrence;return n===null&&i!==null||n!==null&&i===null?!1:!(n&&i&&!n.identicalTo(i))}static extractHashtags(e){var t,n;return(n=(t=e.match(z.hashTags))==null?void 0:t.map(i=>i.trim()))!=null?n:[]}};var ca=class{constructor(e){this.fetch=e;this._value=void 0}get value(){return this._value===void 0&&(this._value=this.fetch()),this._value}};var ot=class{constructor(e,t,n,i,s){this._path=e,this._lineNumber=t,this._sectionStart=n,this._sectionIndex=i,this._precedingHeader=s}static fromUnknownPosition(e){return new ot(e,0,0,0,null)}fromRenamedFile(e){return new ot(e,this.lineNumber,this.sectionStart,this.sectionIndex,this.precedingHeader)}get path(){return this._path}get lineNumber(){return this._lineNumber}get sectionStart(){return this._sectionStart}get sectionIndex(){return this._sectionIndex}get precedingHeader(){return this._precedingHeader}};var Fn=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 Na,this.state="Cold",this.tasks=[],this.loadedAfterFirstResolve=!1,this.subscribeToCache(),this.subscribeToVault(),this.subscribeToEvents(),this.loadVault()}unload(){for(let e of this.metadataCacheEventReferences)this.metadataCache.offref(e);for(let e of this.vaultEventReferences)this.vault.offref(e);for(let e of this.eventsEventReferences)this.events.off(e)}getTasks(){return this.tasks}getState(){return this.state}notifySubscribers(){this.events.triggerCacheUpdate({tasks:this.tasks,state:this.state})}subscribeToCache(){let e=this.metadataCache.on("resolved",()=>q(this,null,function*(){this.loadedAfterFirstResolve||(this.loadedAfterFirstResolve=!0,this.loadVault())}));this.metadataCacheEventReferences.push(e);let t=this.metadataCache.on("changed",n=>{this.tasksMutex.runExclusive(()=>{this.indexFile(n)})});this.metadataCacheEventReferences.push(t)}subscribeToVault(){let{useFilenameAsScheduledDate:e}=Q(),t=this.vault.on("create",s=>{s instanceof Ei.TFile&&this.tasksMutex.runExclusive(()=>{this.indexFile(s)})});this.vaultEventReferences.push(t);let n=this.vault.on("delete",s=>{s instanceof Ei.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 Ei.TFile&&this.tasksMutex.runExclusive(()=>{let o=new ca(()=>Rt.fromPath(s.path));this.tasks=this.tasks.map(u=>u.path===a?e?Rt.updateTaskPath(u,s.path,o.value):new ye(Tt(pe({},u),{taskLocation:u.taskLocation.fromRenamedFile(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(()=>q(this,null,function*(){this.state="Initializing",yield Promise.all(this.vault.getMarkdownFiles().map(e=>this.indexFile(e))),this.state="Warm",this.notifySubscribers()}))}indexFile(e){return q(this,null,function*(){let t=this.metadataCache.getFileCache(e);if(t==null)return;let n=this.tasks.filter(a=>a.path===e.path),i=t.listItems,s=[];if(i!==void 0){let a=yield this.vault.cachedRead(e);s=this.getTasksFromFileContent(a,i,t,e)}ye.tasksListsIdentical(n,s)||(this.tasks=this.tasks.filter(a=>a.path!==e.path),this.tasks.push(...s),this.notifySubscribers())})}getTasksFromFileContent(e,t,n,i){let s=[],a=e.split(` -`),o=a.length,u=new ca(()=>Rt.fromPath(i.path)),l=null,c=0;for(let p of t)if(p.task!==void 0){let h=p.position.start.line;if(h>=o)return console.log(`${i.path} Obsidian gave us a line number ${h} past the end of the file. ${o}.`),s;if((l===null||l.position.end.line=e)return n;return null}static getPrecedingHeader(e,t){if(t===void 0)return null;let n=null;for(let i of t){if(i.position.start.line>e)return n;n=i.heading}return n}};var Qf=require("obsidian");var kb=require("obsidian");function Br(){}function Yf(r){return r()}function ob(){return Object.create(null)}function Un(r){r.forEach(Yf)}function Wo(r){return typeof r=="function"}function lb(r,e){return r!=r?e==e:r!==e||r&&typeof r=="object"||typeof r=="function"}function cb(r){return Object.keys(r).length===0}var db=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global,fa=class{constructor(e){this.options=e,this._listeners="WeakMap"in db?new WeakMap:void 0}observe(e,t){return this._listeners.set(e,t),this._getObserver().observe(e,this.options),()=>{this._listeners.delete(e),this._observer.unobserve(e)}}_getObserver(){var e;return(e=this._observer)!==null&&e!==void 0?e:this._observer=new ResizeObserver(t=>{var n;for(let i of t)fa.entries.set(i.target,i),(n=this._listeners.get(i.target))===null||n===void 0||n(i)})}};fa.entries="WeakMap"in db?new WeakMap:void 0;var fb=!1;function Bx(){fb=!0}function Hx(){fb=!1}function R(r,e){r.appendChild(e)}function Si(r,e,t){r.insertBefore(e,t||null)}function Wn(r){r.parentNode&&r.parentNode.removeChild(r)}function jf(r,e){for(let t=0;tr.removeEventListener(e,t,n)}function pb(r){return function(e){return e.preventDefault(),r.call(this,e)}}function L(r,e,t){t==null?r.removeAttribute(e):r.getAttribute(e)!==t&&r.setAttribute(e,t)}function hb(r){let e;return{p(...t){e=t,e.forEach(n=>r.push(n))},r(){e.forEach(t=>r.splice(r.indexOf(t),1))}}}function Kx(r){return Array.from(r.childNodes)}function Gf(r,e){e=""+e,r.data!==e&&(r.data=e)}function ur(r,e){r.value=e==null?"":e}function Bf(r,e,t){for(let n=0;nr.indexOf(n)===-1?e.push(n):t.push(n)),t.forEach(n=>n()),Oi=e}var eA=new Set;function tA(r,e){r&&r.i&&(eA.delete(r),r.i(e))}var rA=["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"],X2=new Set([...rA]);function nA(r,e,t,n){let{fragment:i,after_update:s}=r.$$;i&&i.m(e,t),n||ha(()=>{let a=r.$$.on_mount.map(Yf).filter(Wo);r.$$.on_destroy?r.$$.on_destroy.push(...a):Un(a),r.$$.on_mount=[]}),s.forEach(ha)}function yb(r,e){let t=r.$$;t.fragment!==null&&(Jx(t.after_update),Un(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function iA(r,e){r.$$.dirty[0]===-1&&(ki.push(r),Xx(),r.$$.dirty.fill(0)),r.$$.dirty[e/31|0]|=1<{let y=_.length?_[0]:h;return l.ctx&&i(l.ctx[p],l.ctx[p]=y)&&(!l.skip_bound&&l.bound[p]&&l.bound[p](y),c&&iA(r,p)),h}):[],l.update(),c=!0,Un(l.before_update),l.fragment=n?n(l.ctx):!1,e.target){if(e.hydrate){Bx();let p=Kx(e.target);l.fragment&&l.fragment.l(p),p.forEach(Wn)}else l.fragment&&l.fragment.c();e.intro&&tA(r.$$.fragment),nA(r,e.target,e.anchor,e.customElement),Hx(),gb()}da(u)}var sA;typeof HTMLElement=="function"&&(sA=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){let{on_mount:r}=this.$$;this.$$.on_disconnect=r.map(Yf).filter(Wo);for(let e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(r,e,t){this[r]=t}disconnectedCallback(){Un(this.$$.on_disconnect)}$destroy(){yb(this,1),this.$destroy=Br}$on(r,e){if(!Wo(e))return Br;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&&!cb(r)&&(this.$$.skip_bound=!0,this.$$set(r),this.$$.skip_bound=!1)}});var $o=class{$destroy(){yb(this,1),this.$destroy=Br}$on(e,t){if(!Wo(t))return Br;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&&!cb(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}};var Kf=Zi(je());function bb(r,e,t){let n=r.slice();return n[45]=e[t],n}function _b(r,e,t){let n=r.slice();return n[48]=e[t].value,n[49]=e[t].label,n[50]=e[t].symbol,n[51]=e[t].accessKey,n[52]=e[t].accessKeyIndex,n}function aA(r){let e,t=r[50]+"",n;return{c(){e=K("span"),n=dt(t)},m(i,s){Si(i,e,s),R(e,n)},p:Br,d(i){i&&Wn(e)}}}function vb(r){let e,t,n,i,s,a,o,u,l=r[49].substring(0,r[52])+"",c,p,h=r[49].substring(r[52],r[52]+1)+"",_,y,w=r[49].substring(r[52]+1)+"",M,P,N=r[50]&&r[50].charCodeAt(0)>=256,F,X,V,he,j,G=N&&aA(r);return V=hb(r[33][0]),{c(){e=K("span"),t=K("input"),a=de(),o=K("label"),u=K("span"),c=dt(l),p=K("span"),_=dt(h),y=K("span"),M=dt(w),P=de(),G&&G.c(),X=de(),L(t,"type","radio"),L(t,"id",n="priority-"+r[48]),t.__value=i=r[48],t.value=t.__value,L(t,"accesskey",s=r[15](r[51])),L(p,"class","accesskey"),L(o,"for",F="priority-"+r[48]),V.p(t)},m(Ce,Ie){Si(Ce,e,Ie),R(e,t),t.checked=t.__value===r[1].priority,R(e,a),R(e,o),R(o,u),R(u,c),R(o,p),R(p,_),R(o,y),R(y,M),R(o,P),G&&G.m(o,null),R(e,X),he||(j=Et(t,"change",r[32]),he=!0)},p(Ce,Ie){Ie[0]&32768&&s!==(s=Ce[15](Ce[51]))&&L(t,"accesskey",s),Ie[0]&3&&(t.checked=t.__value===Ce[1].priority),N&&G.p(Ce,Ie)},d(Ce){Ce&&Wn(e),G&&G.d(),V.r(),he=!1,j()}}}function Eb(r){let e,t=r[45].name+"",n,i,s=r[45].symbol+"",a,o,u;return{c(){e=K("option"),n=dt(t),i=dt(" ["),a=dt(s),o=dt("]"),e.__value=u=r[45],e.value=e.__value},m(l,c){Si(l,e,c),R(e,n),R(e,i),R(e,a),R(e,o)},p(l,c){c[0]&1&&t!==(t=l[45].name+"")&&Gf(n,t),c[0]&1&&s!==(s=l[45].symbol+"")&&Gf(a,s),c[0]&1&&u!==(u=l[45])&&(e.__value=u,e.value=e.__value)},d(l){l&&Wn(e)}}}function oA(r){let e,t,n,i,s,a,o,u,l,c,p,h,_,y,w,M,P,N,F,X,V,he,j,G,Ce,Ie,B,A,E,H,C,Z,d,f,m,g,T,v,k,D,O,S,I,me,se,re,Se,U,Me,Ae,tt,Rr,Ue,Fe,kp,Bi,Oa,Op,fr,Sa,Sp,Vn,Da,Dp,qt,Ra,Rp,Vr,Hi,Ma,Mp,Qr,xa,xp,zi,Au,Ap,Aa,Cp,Ki,Cu,Pp,Ca,Np,Qn,yn,Ip,Pa,Fp,Vi,Pu,Lp,Xn=r[20],gt=[];for(let Y=0;Ytion',s=de(),a=K("textarea"),u=de(),l=K("div"),c=K("label"),p=dt("Priority"),_=de();for(let Y=0;Yart',Se=de(),U=K("input"),Ae=de(),tt=K("code"),Rr=dt(r[17]),Ue=de(),Fe=new Ln(!1),kp=de(),Bi=K("div"),Oa=K("label"),Oa.innerHTML=`Only - future dates:`,Op=de(),fr=K("input"),Sp=de(),Vn=K("div"),Da=K("label"),Da.innerHTML='Status',Dp=de(),qt=K("select");for(let Y=0;Yr[39].call(qt)),L(Vn,"class","tasks-modal-section"),L(Ma,"for","status"),L(Qr,"id","status"),L(Qr,"type","checkbox"),L(Qr,"class","task-list-item-checkbox tasks-modal-checkbox"),Qr.checked=xa=r[1].status.isCompleted(),Qr.disabled=!0,L(Vr,"class","tasks-modal-section tasks-modal-status"),yn.disabled=Pa=!r[14],L(yn,"type","submit"),L(yn,"class","mod-cta"),L(Vi,"type","button"),L(Qn,"class","tasks-modal-section tasks-modal-buttons"),lr(t,"with-accesskeys",r[9]),L(e,"class","tasks-modal")},m(Y,fe){Si(Y,e,fe),R(e,t),R(t,n),R(n,i),R(n,s),R(n,a),ur(a,r[1].description),r[31](a),R(t,u),R(t,l),R(l,c),R(c,p),R(l,_);for(let le=0;leno ${U} date`;let tt=Kf.parseDate(Me,Ae,{forwardDate:Ae!=null});return tt!==null?window.moment(tt).format("YYYY-MM-DD"):`invalid ${U} date`}function C(U,Me){return H(U,Me,y.forwardOnly?new Date:void 0)}function Z(U){let Me=null,Ae=Kf.parseDate(U,new Date,{forwardDate:y.forwardOnly});return Ae!==null&&(Me=window.moment(Ae)),Me}Hf(()=>{let{provideAccessKeys:U}=Q();t(9,B=U);let Me=ge.getInstance().removeAsWordFrom(s.description);(Me!=s.description||!ge.getInstance().includedIn(s.description))&&(Ie=!0);let Ae="none";s.priority==="5"?Ae="lowest":s.priority==="4"?Ae="low":s.priority==="2"?Ae="medium":s.priority==="1"?Ae="high":s.priority==="0"&&(Ae="highest"),t(1,y={description:Me,status:s.status,priority:Ae,recurrenceRule:s.recurrence?s.recurrence.toText():"",createdDate:new vt(s.createdDate).formatAsDate(),startDate:new vt(s.startDate).formatAsDate(),scheduledDate:new vt(s.scheduledDate).formatAsDate(),dueDate:new vt(s.dueDate).formatAsDate(),doneDate:new vt(s.doneDate).formatAsDate(),forwardOnly:!0}),setTimeout(()=>{_.focus()},10)});let d=U=>{if(U.key&&!U.altKey&&!U.ctrlKey){let Me=E.find(Ae=>Ae.label.charAt(0).toLowerCase()==U.key);Me&&t(1,y.priority=Me.value,y)}},f=()=>{a([])},m=U=>{U.key==="Enter"&&(U.preventDefault(),A&&T())},g=()=>{setTimeout(()=>{t(1,y.description=y.description.replace(/[\r\n]+/g," "),y)},0)},T=()=>{let U=y.description.trim();Ie&&(U=ge.getInstance().prependTo(U));let Me=Z(y.startDate),Ae=Z(y.scheduledDate),tt=Z(y.dueDate),Rr=null;y.recurrenceRule&&(Rr=Ze.fromText({recurrenceRuleText:y.recurrenceRule,startDate:Me,scheduledDate:Ae,dueDate:tt}));let Ue;switch(y.priority){case"lowest":Ue="5";break;case"low":Ue="4";break;case"medium":Ue="2";break;case"high":Ue="1";break;case"highest":Ue="0";break;default:Ue="3"}let Fe=new ye(Object.assign(Object.assign({},s),{description:U,status:y.status,priority:Ue,recurrence:Rr,startDate:Me,scheduledDate:Ae,dueDate:tt,doneDate:window.moment(y.doneDate,"YYYY-MM-DD").isValid()?window.moment(y.doneDate,"YYYY-MM-DD"):null}));a([Fe])},v=[[]];function k(){y.description=this.value,t(1,y),t(6,V),t(2,P),t(4,F),t(0,o)}function D(U){qo[U?"unshift":"push"](()=>{_=U,t(10,_)})}function O(){y.priority=this.__value,t(1,y),t(6,V),t(2,P),t(4,F),t(0,o)}function S(){y.recurrenceRule=this.value,t(1,y),t(6,V),t(2,P),t(4,F),t(0,o)}function I(){y.dueDate=this.value,t(1,y),t(6,V),t(2,P),t(4,F),t(0,o)}function me(){y.scheduledDate=this.value,t(1,y),t(6,V),t(2,P),t(4,F),t(0,o)}function se(){y.startDate=this.value,t(1,y),t(6,V),t(2,P),t(4,F),t(0,o)}function re(){y.forwardOnly=this.checked,t(1,y),t(6,V),t(2,P),t(4,F),t(0,o)}function Se(){y.status=mb(this),t(1,y),t(6,V),t(2,P),t(4,F),t(0,o)}return r.$$set=U=>{"task"in U&&t(26,s=U.task),"onSubmit"in U&&t(27,a=U.onSubmit),"statusOptions"in U&&t(0,o=U.statusOptions)},r.$$.update=()=>{if(r.$$.dirty[0]&512){e:t(15,n=U=>B?U:null)}if(r.$$.dirty[0]&66){e:t(1,y.dueDate=mi(y.dueDate),y),t(6,V=C("due",y.dueDate)),t(7,he=!V.includes("invalid"))}if(r.$$.dirty[0]&6){e:t(1,y.startDate=mi(y.startDate),y),t(2,P=C("start",y.startDate)),t(3,N=!P.includes("invalid"))}if(r.$$.dirty[0]&18){e:t(1,y.scheduledDate=mi(y.scheduledDate),y),t(4,F=C("scheduled",y.scheduledDate)),t(5,X=!F.includes("invalid"))}if(r.$$.dirty[0]&268435458){e:if(t(8,G=!0),!y.recurrenceRule)t(12,j="not recurring");else{let U=t(28,i=Ze.fromText({recurrenceRuleText:y.recurrenceRule,startDate:null,scheduledDate:null,dueDate:null}))===null||i===void 0?void 0:i.toText();U?t(12,j=U):(t(12,j="invalid recurrence rule"),t(8,G=!1))}}if(r.$$.dirty[0]&2){e:t(29,w=y.description.trim()!=="")}if(r.$$.dirty[0]&536871336){e:t(14,A=he&&G&&X&&N&&w)}if(r.$$.dirty[0]&2){e:t(11,M=H("created",y.createdDate)),t(13,Ce=H("done",y.doneDate))}},[o,y,P,N,F,X,V,he,G,B,_,M,j,Ce,A,n,l,c,p,h,E,d,f,m,g,T,s,a,i,w,k,D,O,v,S,I,me,se,re,Se]}var Vf=class extends $o{constructor(e){super(),Tb(this,e,uA,oA,lb,{task:26,onSubmit:27,statusOptions:0},null,[-1,-1])}},wb=Vf;var cn=class extends kb.Modal{constructor({app:t,task:n,onSubmit:i}){super(t);this.task=n,this.onSubmit=s=>{s.length&&i(s),this.close()}}onOpen(){this.titleEl.setText("Create or edit Task");let{contentEl:t}=this,n=this.getKnownStatusesAndCurrentTaskStatusIfNotKnown();new wb({target:t,props:{task:this.task,statusOptions:n,onSubmit:this.onSubmit}})}getKnownStatusesAndCurrentTaskStatusIfNotKnown(){let t=De.getInstance().registeredStatuses;return De.getInstance().bySymbol(this.task.status.symbol)===te.EMPTY&&t.push(this.task.status),t}onClose(){let{contentEl:t}=this;t.empty()}};function lA(){let{setCreatedDate:r}=Q();return r?window.moment():null}function cA(r){let{setCreatedDate:e}=Q();if(!e||r.createdDate!==null)return!1;let t=r.description==="",n=!ge.getInstance().isEmpty(),i=!ge.getInstance().includedIn(r.description);return t||n&&i}var Yo=({line:r,path:e})=>{var h,_;let t=ye.parseTaskSignifiers(r,ot.fromUnknownPosition(e),Rt.fromPath(e)),n=lA();if(t!==null)return cA(t)?new ye(Tt(pe({},t),{createdDate:n})):t;let i=r.match(z.nonTaskRegex);if(i===null)return console.error("Tasks: Cannot create task on line:",r),new ye({status:te.TODO,description:"",taskLocation:ot.fromUnknownPosition(e),indentation:"",listMarker:"-",priority:"3",createdDate:n,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,recurrence:null,blockLink:"",tags:[],originalMarkdown:"",scheduledDateIsInferred:!1});let s=i[1],a=(h=i[2])!=null?h:"-",o=(_=i[4])!=null?_:" ",u=De.getInstance().bySymbolOrCreate(o),l=i[5],c=r.match(z.blockLinkRegex),p=c!==null?c[0]:"";return p!==""&&(l=l.replace(z.blockLinkRegex,"")),new ye({status:u,description:l,taskLocation:ot.fromUnknownPosition(e),indentation:s,listMarker:a,blockLink:p,priority:"3",createdDate:n,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,recurrence:null,tags:[],originalMarkdown:"",scheduledDateIsInferred:!1})};var Ob=(r,e,t,n)=>{var p;if(r)return t instanceof Qf.MarkdownView;if(!(t instanceof Qf.MarkdownView))return;let i=(p=t.file)==null?void 0:p.path;if(i===void 0)return;let a=e.getCursor().line,o=e.getLine(a),u=Yo({line:o,path:i}),l=h=>{let _=Rt.removeInferredStatusIfNeeded(u,h).map(y=>y.toFileLineString()).join(` -`);e.setLine(a,_)};new cn({app:n,task:u,onSubmit:l}).open()};var Xf=require("obsidian");var Sb=(r,e,t)=>{var u;if(r)return t instanceof Xf.MarkdownView;if(!(t instanceof Xf.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=dA(a,n);e.setLine(s,o.text),e.setCursor(fA(i,o))},dA=(r,e)=>{let t=ye.fromLine({line:r,taskLocation:ot.fromUnknownPosition(e),fallbackDate:null});if(t!==null){let n=t.toggleWithRecurrenceInUsersOrder().map(i=>i.toFileLineString());return{text:n.join(` -`),moveTo:{line:n.length-1}}}else{let n=r.match(z.taskRegex);if(n!==null){let i=n[3],a=De.getInstance().bySymbol(i).nextStatusSymbol;return{text:r.replace(z.taskRegex,`$1- [${a}] $4`)}}else if(z.listItemRegex.test(r)){let i=r.replace(z.listItemRegex,"$1$2 [ ]");return{text:i,moveTo:{ch:i.length}}}else{let i=r.replace(z.indentationRegex,"$1- ");return{text:i,moveTo:{ch:i.length}}}}},fA=(r,e)=>{var s;let t={line:0,ch:r.ch},n=pe(pe({},t),(s=e.moveTo)!=null?s:{}),i=e.text.split(` -`)[n.line].length;return{line:r.line+n.line,ch:Math.min(n.ch,i)}};var jo=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)=>Ob(t,n,i,this.app)}),e.addCommand({id:"toggle-done",name:"Toggle task done",icon:"check-in-circle",editorCheckCallback:Sb})}};var pA=Object.prototype.toString,Ri=Array.isArray||function(e){return pA.call(e)==="[object Array]"};function Jf(r){return typeof r=="function"}function hA(r){return Ri(r)?"array":typeof r}function Zf(r){return r.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Db(r,e){return r!=null&&typeof r=="object"&&e in r}function mA(r,e){return r!=null&&typeof r!="object"&&r.hasOwnProperty&&r.hasOwnProperty(e)}var gA=RegExp.prototype.test;function yA(r,e){return gA.call(r,e)}var TA=/\S/;function bA(r){return!yA(TA,r)}var _A={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function vA(r){return String(r).replace(/[&<>"'`=\/]/g,function(t){return _A[t]})}var EA=/\s*/,wA=/\s+/,Rb=/\s*=/,kA=/\s*\}/,OA=/#|\^|\/|>|\{|&|=|!/;function SA(r,e){if(!r)return[];var t=!1,n=[],i=[],s=[],a=!1,o=!1,u="",l=0;function c(){if(a&&!o)for(;s.length;)delete i[s.pop()];else s=[];a=!1,o=!1}var p,h,_;function y(G){if(typeof G=="string"&&(G=G.split(wA,2)),!Ri(G)||G.length!==2)throw new Error("Invalid tags: "+G);p=new RegExp(Zf(G[0])+"\\s*"),h=new RegExp("\\s*"+Zf(G[1])),_=new RegExp("\\s*"+Zf("}"+G[1]))}y(e||Xt.tags);for(var w=new ga(r),M,P,N,F,X,V;!w.eos();){if(M=w.pos,N=w.scanUntil(p),N)for(var he=0,j=N.length;he"?X=[P,N,M,w.pos,u,l,t]:X=[P,N,M,w.pos],l++,i.push(X),P==="#"||P==="^")n.push(X);else if(P==="/"){if(V=n.pop(),!V)throw new Error('Unopened section "'+N+'" at '+M);if(V[1]!==N)throw new Error('Unclosed section "'+V[1]+'" at '+M)}else P==="name"||P==="{"||P==="&"?o=!0:P==="="&&y(N)}if(c(),V=n.pop(),V)throw new Error('Unclosed section "'+V[1]+'" at '+w.pos);return RA(DA(i))}function DA(r){for(var e=[],t,n,i=0,s=r.length;i0?n[n.length-1][4]:e;break;default:t.push(i)}return e}function ga(r){this.string=r,this.tail=r,this.pos=0}ga.prototype.eos=function(){return this.tail===""};ga.prototype.scan=function(e){var t=this.tail.match(e);if(!t||t.index!==0)return"";var n=t[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n};ga.prototype.scanUntil=function(e){var t=this.tail.search(e),n;switch(t){case-1:n=this.tail,this.tail="";break;case 0:n="";break;default:n=this.tail.substring(0,t),this.tail=this.tail.substring(t)}return this.pos+=n.length,n};function Di(r,e){this.view=r,this.cache={".":this.view},this.parent=e}Di.prototype.push=function(e){return new Di(e,this)};Di.prototype.lookup=function(e){var t=this.cache,n;if(t.hasOwnProperty(e))n=t[e];else{for(var i=this,s,a,o,u=!1;i;){if(e.indexOf(".")>0)for(s=i.view,a=e.split("."),o=0;s!=null&&o"?l=this.renderPartial(o,t,n,s):u==="&"?l=this.unescapedValue(o,t):u==="name"?l=this.escapedValue(o,t,s):u==="text"&&(l=this.rawValue(o)),l!==void 0&&(a+=l);return a};wt.prototype.renderSection=function(e,t,n,i,s){var a=this,o="",u=t.lookup(e[1]);function l(h){return a.render(h,t,n,s)}if(!!u){if(Ri(u))for(var c=0,p=u.length;c0||!n)&&(s[a]=i+s[a]);return s.join(` -`)};wt.prototype.renderPartial=function(e,t,n,i){if(!!n){var s=this.getConfigTags(i),a=Jf(n)?n(e[1]):n[e[1]];if(a!=null){var o=e[6],u=e[5],l=e[4],c=a;u==0&&l&&(c=this.indentPartial(a,l,o));var p=this.parse(c,s);return this.renderTokens(p,t,n,c,i)}}};wt.prototype.unescapedValue=function(e,t){var n=t.lookup(e[1]);if(n!=null)return n};wt.prototype.escapedValue=function(e,t,n){var i=this.getConfigEscape(n)||Xt.escape,s=t.lookup(e[1]);if(s!=null)return typeof s=="number"&&i===Xt.escape?String(s):i(s)};wt.prototype.rawValue=function(e){return e[1]};wt.prototype.getConfigTags=function(e){return Ri(e)?e:e&&typeof e=="object"?e.tags:void 0};wt.prototype.getConfigEscape=function(e){if(e&&typeof e=="object"&&!Ri(e))return e.escape};var Xt={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(r){ma.templateCache=r},get templateCache(){return ma.templateCache}},ma=new wt;Xt.clearCache=function(){return ma.clearCache()};Xt.parse=function(e,t){return ma.parse(e,t)};Xt.render=function(e,t,n,i){if(typeof e!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+hA(e)+'" was given as the first argument for mustache#render(template, view, partials)');return ma.render(e,t,n,i)};Xt.escape=vA;Xt.Scanner=ga;Xt.Context=Di;Xt.Writer=wt;var ep=Xt;var Pb=Zi(Cb());function Nb(r,e){ep.escape=function(t){return t};try{return ep.render(r,(0,Pb.default)(e))}catch(t){let n="";throw t instanceof Error?n=`There was an error expanding one or more placeholders. - -The error message was: - ${t.message.replace(/ > /g,".").replace("Missing Mustache data property","Unknown property")}`:n="Unknown error expanding placeholders.",n+=` - -The problem is in: - ${r}`,Error(n)}}function Ib(r){return{query:{file:new vi(r)}}}function qn(r,e){let t=`Error: ${r}. -The error message was: - `,n="";return e instanceof Error?n+=e:n+="Unknown error",`${t}"${n}"`}var Hr=class{constructor(e,t,n){this.property=e,this.comparator=Hr.maybeReverse(n,t)}static maybeReverse(e,t){return e?Hr.makeReversedComparator(t):t}static makeReversedComparator(e){return(t,n)=>e(t,n)*-1}};var dn=class{constructor(e,t,n){this.property=e,this.grouper=t,this.reverse=n}};var we=class{canCreateFilterForLine(e){return we.lineMatchesFilter(this.filterRegExp(),e)}static lineMatchesFilter(e,t){return e?e.test(t):!1}static getMatch(e,t){return e?t.match(e):null}fieldNameSingular(){return this.fieldName()}fieldNameSingularEscaped(){return Fo(this.fieldNameSingular())}supportsSorting(){return!1}createSorterFromLine(e){if(!this.supportsSorting())return null;let t=we.getMatch(this.sorterRegExp(),e);if(t===null)return null;let n=!!t[1];return this.createSorter(n)}sorterRegExp(){if(!this.supportsSorting())throw Error(`sorterRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^sort by ${this.fieldNameSingularEscaped()}( reverse)?`)}comparator(){throw Error(`comparator() unimplemented for ${this.fieldNameSingular()}`)}createSorter(e){return new Hr(this.fieldNameSingular(),this.comparator(),e)}createNormalSorter(){return this.createSorter(!1)}createReverseSorter(){return this.createSorter(!0)}supportsGrouping(){return!1}createGrouperFromLine(e){if(!this.supportsGrouping())return null;let t=we.getMatch(this.grouperRegExp(),e);if(t===null)return null;let n=!!t[1];return this.createGrouper(n)}grouperRegExp(){if(!this.supportsGrouping())throw Error(`grouperRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^group by ${this.fieldNameSingularEscaped()}( reverse)?$`)}grouper(){throw Error(`grouper() unimplemented for ${this.fieldNameSingular()}`)}createGrouper(e){return new dn(this.fieldNameSingular(),this.grouper(),e)}createNormalGrouper(){return this.createGrouper(!1)}createReverseGrouper(){return this.createGrouper(!0)}};var ke=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 ke("None of",e,"NOT")}static booleanXor(e){return new ke("Exactly one of",e,"XOR")}asString(e=""){if(this.children.length==0)return e+this.description;let t=e;this.symbol===""?t+=this.description:(t+=this.symbol,this.children.length>1&&(t+=` (${this.description})`),t+=":");let n=e+" ";for(let i=0;i -${t.asString(" ")} -`}};var Er=class{constructor(e){this.instruction=e}get queryComponent(){return this._queryComponent}set queryComponent(e){this._queryComponent=e}get error(){return this._error}set error(e){this._error=e}static fromObject(e,t){let n=new Er(e);return n._queryComponent=t,n}static fromError(e,t){let n=new Er(e);return n._error=t,n}};var J=class{constructor(e){this.object=e}get instruction(){return this.object.instruction}get filter(){return this.object.queryComponent}get error(){return this.object.error}get filterFunction(){if(this.filter)return this.filter.filterFunction}static fromFilter(e){return new J(Er.fromObject(e.instruction,e))}static fromError(e,t){return new J(Er.fromError(e,t))}};var Go=class{constructor(e,t){this._instruction=e,this._filter=t}canCreateFilterForLine(e){return e==this._instruction}createFilterOrErrorMessage(e){return e===this._instruction?J.fromFilter(new ft(e,this._filter,new ke(e))):J.fromError(e,`do not understand filter: ${e}`)}};var wr=class{constructor(){this._filters=[]}add(e,t){this._filters.push(new Go(e,t))}canCreateFilterForLine(e){for(let t of this._filters)if(t.canCreateFilterForLine(e))return!0;return!1}createFilterOrErrorMessage(e){for(let t of this._filters){let n=t.createFilterOrErrorMessage(e);if(n.error===void 0)return n}return J.fromError(e,`do not understand filter: ${e}`)}};var fn=class extends we{constructor(){super(...arguments);this._filters=new wr}canCreateFilterForLine(t){return this._filters.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){return this._filters.createFilterOrErrorMessage(t)}filterRegExp(){return null}};var kr=class extends fn{constructor(){super(),this._filters.add("done",e=>e.isDone),this._filters.add("not done",e=>!e.isDone)}fieldName(){return"status"}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=kr.oldStatusName(e),i=kr.oldStatusName(t);return ni?-1:0}}static oldStatusName(e){return e.status.symbol===" "?"Todo":"Done"}supportsGrouping(){return!0}grouper(){return e=>[kr.oldStatusName(e)]}};var pt=class extends we{constructor(t=null){super();t!==null?this.filterInstructions=t:(this.filterInstructions=new wr,this.filterInstructions.add(`has ${this.fieldName()} date`,n=>this.date(n)!==null),this.filterInstructions.add(`no ${this.fieldName()} date`,n=>this.date(n)===null),this.filterInstructions.add(`${this.fieldName()} date is invalid`,n=>{let i=this.date(n);return i!==null&&!i.isValid()}))}canCreateFilterForLine(t){return this.filterInstructions.canCreateFilterForLine(t)?!0:super.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){let n=this.filterInstructions.createFilterOrErrorMessage(t);if(n.filter!==void 0)return n;let i=we.getMatch(this.filterRegExp(),t);if(i===null)return J.fromError(t,"do not understand query filter ("+this.fieldName()+" date)");let s=i[1],a=i[2],o=i[3],u=Ct.parseDateRange(o);if(!u.isValid()){let p=Ct.parseDate(s);p.isValid()&&(u=new _t(p,p))}if(!u.isValid())return J.fromError(t,"do not understand "+this.fieldName()+" date");let l=this.buildFilterFunction(a,u),c=pt.buildExplanation(this.fieldNameForExplanation(),a,this.filterResultIfFieldMissing(),u);return J.fromFilter(new ft(t,l,c))}buildFilterFunction(t,n){let i;switch(t){case"before":i=s=>s?s.isBefore(n.start):this.filterResultIfFieldMissing();break;case"after":i=s=>s?s.isAfter(n.end):this.filterResultIfFieldMissing();break;case"on or before":case"in or before":i=s=>s?s.isSameOrBefore(n.end):this.filterResultIfFieldMissing();break;case"on or after":case"in or after":i=s=>s?s.isSameOrAfter(n.start):this.filterResultIfFieldMissing();break;default:i=s=>s?s.isSameOrAfter(n.start)&&s.isSameOrBefore(n.end):this.filterResultIfFieldMissing()}return this.getFilter(i)}getFilter(t){return n=>t(this.date(n))}filterRegExp(){return new RegExp(`^${this.fieldNameForFilterInstruction()} (((?:on|in) or before|before|(?:on|in) or after|after|on|in)? ?(.*))`)}fieldNameForFilterInstruction(){return this.fieldName()}static buildExplanation(t,n,i,s){let a=n,o="YYYY-MM-DD (dddd Do MMMM YYYY)",u;switch(n){case"before":case"on or after":u=s.start.format(o);break;case"after":case"on or before":u=s.end.format(o);break;case"in or before":a="on or before",u=s.end.format(o);break;case"in or after":a="on or after",u=s.start.format(o);break;default:if(!s.start.isSame(s.end)){let c=`${t} date is between:`,p=[new ke(`${s.start.format(o)} and`),new ke(`${s.end.format(o)} inclusive`)];return i&&p.push(new ke(`OR no ${t} date`)),new ke(c,p)}a="on",u=s.start.format(o);break}let l=`${t} date is ${a} ${u}`;return i&&(l+=` OR no ${t} date`),new ke(l)}fieldNameForExplanation(){return this.fieldName()}supportsSorting(){return!0}comparator(){return(t,n)=>Yr(this.date(t),this.date(n))}supportsGrouping(){return!0}grouper(){return t=>{let n=this.date(t);return n===null?["No "+this.fieldName()+" date"]:[n.format("YYYY-MM-DD dddd")]}}};var Mi=class extends pt{fieldName(){return"due"}date(e){return e.dueDate}filterResultIfFieldMissing(){return!1}};var rp=class extends we{createFilterOrErrorMessage(e){let t=we.getMatch(this.filterRegExp(),e);if(t!==null){let n=t[5],i=null;switch(n){case"lowest":i="5";break;case"low":i="4";break;case"none":i="3";break;case"medium":i="2";break;case"high":i="1";break;case"highest":i="0";break}if(i===null)return J.fromError(e,"do not understand priority");let s=e,a;switch(t[3]){case"above":a=o=>o.priority.localeCompare(i)<0;break;case"below":a=o=>o.priority.localeCompare(i)>0;break;case"not":a=o=>o.priority!==i;break;default:a=o=>o.priority===i,s=`${this.fieldName()} is ${n}`}return J.fromFilter(new ft(e,a,new ke(s)))}else return J.fromError(e,"do not understand query filter (priority)")}fieldName(){return"priority"}filterRegExp(){return rp.priorityRegexp}supportsSorting(){return!0}comparator(){return(e,t)=>e.priority.localeCompare(t.priority)}supportsGrouping(){return!0}grouper(){return e=>{let t=vr.priorityNameUsingNormal(e.priority);return[`%%${e.priority}%%${t} priority`]}}},$n=rp;$n.priorityRegexp=/^priority(\s+is)?(\s+(above|below|not))?(\s+(lowest|low|none|medium|high|highest))$/;var xi=class{matchesAnyOf(e){return e.some(t=>this.matches(t))}};var Ai=class extends xi{constructor(t){super();this.stringToFind=t}matches(t){return Ai.stringIncludesCaseInsensitive(t,this.stringToFind)}static stringIncludesCaseInsensitive(t,n){return t.toLocaleLowerCase().includes(n.toLocaleLowerCase())}explanation(t){return new ke(t)}};var pn=class extends xi{constructor(t){super();this.regex=t}static validateAndConstruct(t){let n=/^\/(.+)\/([^/]*)$/,i=t.match(n);if(i!==null){let s=new RegExp(i[1],i[2]);return new pn(s)}else return null}matches(t){return t.match(this.regex)!==null}static helpMessage(){return String.raw`See https://publish.obsidian.md/tasks/Queries/Regular+Expressions - -Regular expressions must look like this: - /pattern/ -or this: - /pattern/flags - -Where: -- pattern: The 'regular expression' pattern to search for. -- flags: Optional characters that modify the search. - i => make the search case-insensitive - u => add Unicode support - -Examples: /^Log/ - /^Log/i - /File Name\.md/ - /waiting|waits|waited/i - /\d\d:\d\d/ - -The following characters have special meaning in the pattern: -to find them literally, you must add a \ before them: - [\^$.|?*+() - -CAUTION! Regular expression (or 'regex') searching is a powerful -but advanced feature that requires thorough knowledge in order to -use successfully, and not miss intended search results. -`}explanation(t){let i=MA(t,"using regex: ",this.regexAsString());return new ke(i)}regexAsString(){let t=`'${this.regex.source}' with `;switch(this.regex.flags.length){case 0:t+="no flags";break;case 1:t+=`flag '${this.regex.flags}'`;break;default:t+=`flags '${this.regex.flags}'`;break}return t}};function MA(r,e,t){var o;let n=r.match(/\//);if(!n)return"Error explaining instruction. Could not find a slash character";let i=2,s=((o=n.index)!=null?o:i)-i;return`${e.padEnd(s)}${t}`}var xe=class extends we{createFilterOrErrorMessage(e){let t=we.getMatch(this.filterRegExp(),e);if(t===null)return J.fromError(e,`do not understand query filter (${this.fieldName()})`);let[n,i,s]=t,a=null;if(i.includes("include"))a=new Ai(s);else if(i.includes("regex")){try{a=pn.validateAndConstruct(s)}catch(l){let c=qn("Parsing regular expression",l)+` - -${pn.helpMessage()}`;return J.fromError(e,c)}if(a===null)return J.fromError(e,`Invalid instruction: '${e}' - -${pn.helpMessage()}`)}if(a===null)return J.fromError(e,`do not understand query filter (${this.fieldName()})`);let o=i.match(/not/)!==null,u=new ft(e,this.getFilter(a,o),a.explanation(e));return J.fromFilter(u)}fieldPattern(){return this.fieldNameSingularEscaped()}filterOperatorPattern(){return"includes|does not include|regex matches|regex does not match"}filterRegExp(){return new RegExp(`^(?:${this.fieldPattern()}) (${this.filterOperatorPattern()}) (.*)`)}getFilter(e,t){return n=>{let i=e.matches(this.value(n));return t?!i:i}}comparator(){return(e,t)=>this.value(e).localeCompare(this.value(t),void 0,{numeric:!0})}grouper(){return e=>[this.value(e)]}static escapeMarkdownCharacters(e){return e.replace(/\\/g,"\\\\").replace(/_/g,"\\_")}};var Ci=class extends xe{fieldName(){return"path"}value(e){return e.path}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return e=>[xe.escapeMarkdownCharacters(e.path.replace(".md",""))]}};var Pi=class extends we{canCreateFilterForLine(e){return!1}createFilterOrErrorMessage(e){return J.fromError(e,"Filtering by urgency is not yet supported")}fieldName(){return"urgency"}filterRegExp(){throw Error(`filterRegExp() unimplemented for ${this.fieldName()}`)}supportsSorting(){return!0}comparator(){return(e,t)=>t.urgency-e.urgency}supportsGrouping(){return!0}grouper(){return e=>[`${e.urgency.toFixed(2)}`]}createGrouper(e){return super.createGrouper(!e)}};var Ni=class{static by(e,t){let n=[new Pi().comparator(),new kr().comparator(),new Mi().comparator(),new $n().comparator(),new Ci().comparator()],i=[];for(let s of e)i.push(s.comparator);return t.sort(Ni.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 Bo=class{constructor(e,t,n){this.nestingLevel=e,this.displayName=t,this.property=n}};var Ho=class{constructor(e,t){this.lastHeadingAtLevel=new Array;this.groupers=t;let i=e.keys().next().value.length;for(let s=0;st.set(o,a)),e.pop();return t}};var Ko=class extends zo{},Vo=class{constructor(e,t){this.root=new Ko(t),this.buildGroupingTree(e)}buildGroupingTree(e){let t=[this.root];for(let n of e){let i=[];for(let s of t)for(let a of s.values){let o=n.grouper(a);o.length===0&&o.push("");for(let u of o){let l=s.children.get(u);l===void 0&&(l=new Ko([]),s.children.set(u,l),i.push(l)),l.values.push(a)}}t=i}}generateTaskTreeStorage(){return this.root.generateAllPaths()}};var Qo=class{constructor(e,t){this.groups=e,this.groupHeadings=[],this.tasks=t}setGroupHeadings(e){for(let t of e)this.groupHeadings.push(t)}applyTaskLimit(e){this.tasks=this.tasks.slice(0,e)}tasksAsStringOfLines(){let e="";for(let t of this.tasks)e+=t.toFileLineString()+` -`;return e}toString(){let e=` -`;e+=`Group names: [${this.groups}] -`;for(let t of this.groupHeadings)e+=`${"#".repeat(4+t.nestingLevel)} [${t.property}] ${t.displayName} -`;return e+=this.tasksAsStringOfLines(),e}};var Ii=class{constructor(e,t){this._groups=new Array;this._totalTaskCount=0;this._totalTaskCount=t.length,this._groupers=e;let i=new Vo(e,t).generateTaskTreeStorage();this.addTaskGroups(i),this.sortTaskGroups(),this.setGroupsHeadings(i)}get groupers(){return this._groupers}get groups(){return this._groups}totalTasksCount(){return this._totalTaskCount}toString(){let e="";e+=`Groupers (if any): -`;for(let n of this._groupers){let i=n.reverse?" reverse":"";e+=`- ${n.property}${i} -`}for(let n of this.groups)e+=n.toString(),e+=` ---- -`;return e+=` -${this.totalTasksCount()} tasks -`,e}addTaskGroups(e){for(let[t,n]of e){let i=new Qo(t,n);this.addTaskGroup(i)}}addTaskGroup(e){this._groups.push(e)}sortTaskGroups(){let e=(t,n)=>{let i=t.groups,s=n.groups;for(let a=0;a{t.applyTaskLimit(e)}),this.recalculateTotalTaskCount())}recalculateTotalTaskCount(){let e=[];this._groups.forEach(n=>{e=[...e,...n.tasks]});let t=[...new Set(e)];this._totalTaskCount=t.length}};var Yn=class extends xe{fieldName(){return"description"}value(e){return ge.getInstance().removeAsSubstringFrom(e.description)}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=Yn.cleanDescription(e.description),i=Yn.cleanDescription(t.description);return n.localeCompare(i,void 0,{numeric:!0})}}static cleanDescription(e){e=ge.getInstance().removeAsSubstringFrom(e);let t=/^\[\[?([^\]]*)]]?/,n=e.match(t);if(n!==null){let i=n[1];e=i.substring(i.indexOf("|")+1)+e.replace(t,"")}return e=this.replaceFormatting(e,/^\*\*([^*]+)\*\*/),e=this.replaceFormatting(e,/^\*([^*]+)\*/),e=this.replaceFormatting(e,/^==([^=]+)==/),e=this.replaceFormatting(e,/^__([^_]+)__/),e=this.replaceFormatting(e,/^_([^_]+)_/),e}static replaceFormatting(e,t){let n=e.match(t);return n!==null&&(e=n[1]+e.replace(t,"")),e}};var Xo=class extends pt{fieldName(){return"created"}date(e){return e.createdDate}filterResultIfFieldMissing(){return!1}};var Zo=class extends pt{fieldName(){return"done"}date(e){return e.doneDate}filterResultIfFieldMissing(){return!1}};var Jo=class extends fn{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 ya=class extends Er{};function Ta(r){return[["task",r]]}function np(r,e){let t=r.map(([n])=>n);try{let n=e.includes("return")?e:`return ${e}`,i=e&&new Function(...t,n);return i instanceof Function?ya.fromObject(e,i):ya.fromError(e,"Error parsing group function")}catch(n){return ya.fromError(e,qn(`Failed parsing expression "${e}"`,n))}}function ip(r,e){let t=e.map(([n,i])=>i);return r(...t)}function sp(r,e,t){try{return ip(r,e)}catch(n){return qn(`Failed calculating expression "${t}"`,n)}}function Fb(r,e){let t=Ta(r),n=np(t,e);return n.error?n.error:sp(n.queryComponent,t,e)}var eu=class{constructor(e){this.line=e,this.functionOrError=np(Ta(null),e)}isValid(){return this.functionOrError.error===void 0}get parseError(){return this.functionOrError.error}evaluate(e){if(!this.isValid())throw Error(`Error: Cannot evaluate an expression which is not valid: "${this.line}" gave error: "${this.parseError}"`);return ip(this.functionOrError.queryComponent,Ta(e))}evaluateOrCatch(e){return this.isValid()?sp(this.functionOrError.queryComponent,Ta(e),this.line):`Error: Cannot evaluate an expression which is not valid: "${this.line}" gave error: "${this.parseError}"`}};var tu=class extends we{createFilterOrErrorMessage(e){let t=we.getMatch(this.filterRegExp(),e);if(t===null)return J.fromError(e,"Unable to parse line");let n=t[1],i=new eu(n);return i.isValid()?J.fromFilter(new ft(e,xA(i),new ke(e))):J.fromError(e,i.parseError)}fieldName(){return"function"}filterRegExp(){return new RegExp(`^filter by ${this.fieldNameSingularEscaped()} (.*)`)}supportsGrouping(){return!0}createGrouperFromLine(e){let t=we.getMatch(this.grouperRegExp(),e);if(t===null)return null;let n=!!t[1],i=t[2];return new dn("function",CA(i),n)}grouperRegExp(){return new RegExp(`^group by ${this.fieldNameSingularEscaped()}( reverse)? (.*)`)}grouper(){throw Error("grouper() function not valid for FunctionField. Use createGrouperFromLine() instead.")}};function xA(r){return e=>AA(r,e)}function AA(r,e){let t=r.evaluate(e);if(typeof t=="boolean")return t;throw Error(`filtering function must return true or false. This returned "${t}".`)}function CA(r){return e=>PA(e,r)}function PA(r,e){try{let t=Fb(r,e);return Array.isArray(t)?t.map(i=>i.toString()):t===null?[]:[t.toString()]}catch(t){let n=`Error: Failed calculating expression "${e}". The error message was: `;return t instanceof Error?[n+t.message]:[n+"Unknown error"]}}var ru=class extends xe{fieldName(){return"heading"}value(e){return e.precedingHeader?e.precedingHeader:""}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return e=>e.precedingHeader===null||e.precedingHeader.length===0?["(No heading)"]:[e.precedingHeader]}};var nu=class extends pt{fieldName(){return"scheduled"}date(e){return e.scheduledDate}filterResultIfFieldMissing(){return!1}};var iu=class extends pt{fieldName(){return"start"}fieldNameForFilterInstruction(){return"starts"}date(e){return e.startDate}filterResultIfFieldMissing(){return!0}};var su=class extends pt{constructor(){let e=new wr;e.add("has happens date",t=>this.dates(t).some(n=>n!==null)),e.add("no happens date",t=>!this.dates(t).some(n=>n!==null)),super(e)}fieldName(){return"happens"}fieldNameForExplanation(){return"due, start or scheduled"}date(e){return this.earliestDate(e)}dates(e){return e.happensDates}earliestDate(e){return e.happens.moment}filterResultIfFieldMissing(){return!1}getFilter(e){return t=>this.dates(t).some(n=>e(n))}};var au=class extends fn{constructor(){super(),this._filters.add("is recurring",e=>e.recurrence!==null),this._filters.add("is not recurring",e=>e.recurrence===null)}fieldName(){return"recurring"}supportsSorting(){return!0}comparator(){return(e,t)=>e.recurrence!==null&&t.recurrence===null?-1:e.recurrence===null&&t.recurrence!==null?1:0}supportsGrouping(){return!0}grouper(){return e=>e.recurrence!==null?["Recurring"]:["Not Recurring"]}};var ou=class extends xe{fieldNamePlural(){return this.fieldNameSingular()+"s"}fieldName(){return`${this.fieldNameSingular()}/${this.fieldNamePlural()}`}fieldPattern(){return`${this.fieldNameSingular()}|${this.fieldNamePlural()}`}filterOperatorPattern(){return`${super.filterOperatorPattern()}|include|do not include`}value(e){return this.values(e).join(", ")}getFilter(e,t){return n=>{let i=e.matchesAnyOf(this.values(n));return t?!i:i}}createGrouper(e){return new dn(this.fieldNamePlural(),this.grouper(),e)}grouperRegExp(){if(!this.supportsGrouping())throw Error(`grouperRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^group by ${this.fieldNamePlural()}( reverse)?$`)}};var jn=class extends ou{constructor(){super();this.filterInstructions=new wr,this.filterInstructions.add(`has ${this.fieldNameSingular()}`,t=>this.values(t).length>0),this.filterInstructions.add(`has ${this.fieldNamePlural()}`,t=>this.values(t).length>0),this.filterInstructions.add(`no ${this.fieldNameSingular()}`,t=>this.values(t).length===0),this.filterInstructions.add(`no ${this.fieldNamePlural()}`,t=>this.values(t).length===0)}createFilterOrErrorMessage(t){let n=this.filterInstructions.createFilterOrErrorMessage(t);return n.filter!==void 0?n:super.createFilterOrErrorMessage(t)}canCreateFilterForLine(t){return this.filterInstructions.canCreateFilterForLine(t)?!0:super.canCreateFilterForLine(t)}fieldNameSingular(){return"tag"}values(t){return t.tags}supportsSorting(){return!0}createSorterFromLine(t){let n=t.match(this.sorterRegExp());if(n===null)return null;let i=!!n[1],s=isNaN(+n[2])?1:+n[2],a=jn.makeCompareByTagComparator(s);return new Hr(this.fieldNameSingular(),a,i)}sorterRegExp(){return/^sort by tag( reverse)?[\s]*(\d+)?/}comparator(){return jn.makeCompareByTagComparator(1)}static makeCompareByTagComparator(t){return(n,i)=>{if(n.tags.length===0&&i.tags.length===0)return 0;if(n.tags.length===0)return 1;if(i.tags.length===0)return-1;let s=t-1;if(n.tags.length=t)return 1;if(i.tags.length=t)return-1;if(n.tags.lengtht.tags.length==0?["(No tags)"]:t.tags}};var Qb=Zi(Vb());var fu=class extends we{constructor(){super(...arguments);this.basicBooleanRegexp=/(.*(AND|OR|XOR|NOT)\s*[("].*|\(.+\))/g;this.supportedOperators=["AND","OR","XOR","NOT"];this.subFields={}}filterRegExp(){return this.basicBooleanRegexp}createFilterOrErrorMessage(t){return this.parseLine(t)}fieldName(){return"boolean query"}parseLine(t){if(t.length===0)return J.fromError(t,"empty line");let n=this.preprocessExpression(t);try{let i=(0,Qb.parse)(n);for(let o of i)if(o.name==="IDENTIFIER"&&o.value){let u=o.value.trim();if(!(u in this.subFields)){let l=pu(u);if(l===null)return J.fromError(t,`couldn't parse sub-expression '${u}'`);if(l.error)return J.fromError(t,`couldn't parse sub-expression '${u}': ${l.error}`);l.filter&&(this.subFields[u]=l.filter)}}else if(o.name==="OPERATOR"){if(o.value==null)return J.fromError(t,"empty operator in boolean query");if(!this.supportedOperators.includes(o.value))return J.fromError(t,`unknown boolean operator '${o.value}'`)}let s=o=>this.filterTaskWithParsedQuery(o,i),a=this.constructExplanation(i);return J.fromFilter(new ft(t,s,a))}catch(i){let s=i instanceof Error?i.message:"unknown error type";return J.fromError(t,`malformed boolean query -- ${s} (check the documentation for guidelines)`)}}preprocessExpression(t){return t.replace(/\(([^()]+)\)/g,'("$1")')}filterTaskWithParsedQuery(t,n){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(ke.booleanNot([s]))}else if(i.value==="OR"){let s=n.pop(),a=n.pop();n.push(ke.booleanOr([a,s]))}else if(i.value==="AND"){let s=n.pop(),a=n.pop();n.push(ke.booleanAnd([a,s]))}else if(i.value==="XOR"){let s=n.pop(),a=n.pop();n.push(ke.booleanXor([a,s]))}else throw Error("Unsupported operator: "+i.value);else throw Error("Unsupported token type: "+i.name);return n[0]}};var hu=class extends xe{fieldName(){return"filename"}value(e){let t=e.filename;return t===null?"":t+".md"}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return e=>{let t=e.filename;return t===null?["Unknown Location"]:["[["+t+"]]"]}}};var mu=class extends xe{constructor(){super()}fieldName(){return"status.name"}value(e){return e.status.name}supportsSorting(){return!0}supportsGrouping(){return!0}};var hn=class extends we{canCreateFilterForLine(e){let t=new RegExp(`^(?:${this.fieldNameSingularEscaped()})`);return we.lineMatchesFilter(t,e)}createFilterOrErrorMessage(e){let t=we.getMatch(this.filterRegExp(),e);if(t===null)return this.helpMessage(e);let[n,i,s]=t,a=Qt[s.toUpperCase()];if(!a)return this.helpMessage(e);let o;switch(i){case"is":o=u=>u.status.type===a;break;case"is not":o=u=>u.status.type!==a;break;default:return this.helpMessage(e)}return J.fromFilter(new ft(e,o,new ke(e)))}filterRegExp(){return new RegExp(`^(?:${this.fieldNameSingularEscaped()}) (is|is not) ([^ ]+)$`)}helpMessage(e){let t=Object.values(Qt).filter(i=>i!=="EMPTY").join(" "),n=`Invalid ${this.fieldNameSingular()} instruction: '${e}'. - Allowed options: 'is' and 'is not' (without quotes). - Allowed values: ${t} - Note: values are case-insensitive, - so 'in_progress' works too, for example. - Example: ${this.fieldNameSingular()} is not NON_TASK`;return J.fromError(e,n)}fieldName(){return"status.type"}value(e){return e.status.type}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=hn.groupName(e),i=hn.groupName(t);return n.localeCompare(i,void 0,{numeric:!0})}}supportsGrouping(){return!0}grouper(){return e=>[hn.groupName(e)]}static groupName(e){let t;switch(e.status.type){case"IN_PROGRESS":t="1";break;case"TODO":t="2";break;case"DONE":t="3";break;case"CANCELLED":t="4";break;case"NON_TASK":t="5";break;case"EMPTY":t="6";break}return`%%${t}%%${e.status.type}`}};var gu=class extends xe{fieldName(){return"recurrence"}value(e){return e.recurrence!==null?e.recurrence.toText():""}supportsGrouping(){return!0}grouper(){return e=>e.recurrence!==null?[e.recurrence.toText()]:["None"]}};var yu=class extends xe{fieldName(){return"folder"}value(e){return e.file.folder}supportsGrouping(){return!0}grouper(){return e=>[xe.escapeMarkdownCharacters(this.value(e))]}};var Tu=class extends xe{fieldName(){return"root"}value(e){return e.file.root}supportsGrouping(){return!0}grouper(){return e=>[xe.escapeMarkdownCharacters(this.value(e))]}};var bu=class extends xe{fieldName(){return"backlink"}value(e){let t=e.getLinkText({isFilenameUnique:!0});return t===null?"Unknown Location":t}createFilterOrErrorMessage(e){return J.fromError(e,"backlink field does not support filtering")}canCreateFilterForLine(e){return!1}supportsGrouping(){return!0}grouper(){return e=>{let t=e.filename;if(t===null)return["Unknown Location"];let n=e.precedingHeader;return n===null?["[["+t+"]]"]:[`[[${t}#${n}|${t} > ${n}]]`]}}};var mp=[()=>new mu,()=>new hn,()=>new kr,()=>new au,()=>new $n,()=>new su,()=>new Xo,()=>new iu,()=>new nu,()=>new Mi,()=>new Zo,()=>new Ci,()=>new yu,()=>new Tu,()=>new bu,()=>new Yn,()=>new jn,()=>new ru,()=>new Jo,()=>new hu,()=>new Pi,()=>new gu,()=>new tu,()=>new fu];function pu(r){for(let e of mp){let t=e();if(t.canCreateFilterForLine(r))return t.createFilterOrErrorMessage(r)}return null}function Xb(r){let e=/^sort by /;if(r.match(e)===null)return null;for(let t of mp){let i=t().createSorterFromLine(r);if(i)return i}return null}function Zb(r){let e=/^group by /;if(r.match(e)===null)return null;for(let t of mp){let i=t().createGrouperFromLine(r);if(i)return i}return null}function Jb(r){return`task${r!==1?"s":""}`}var Hn=class{constructor(e,t){this.totalTasksCountBeforeLimit=0;this._searchErrorMessage=void 0;this.taskGroups=e,this.totalTasksCountBeforeLimit=t}get searchErrorMessage(){return this._searchErrorMessage}set searchErrorMessage(e){this._searchErrorMessage=e}get totalTasksCount(){return this.taskGroups.totalTasksCount()}totalTasksCountDisplayText(){let e=this.totalTasksCount,t=this.totalTasksCountBeforeLimit;return e===t?`${e} ${Jb(e)}`:`${e} of ${t} ${Jb(t)}`}get groups(){return this.taskGroups.groups}static fromError(e){let t=new Hn(new Ii([],[]),0);return t._searchErrorMessage=e,t}};var Kr=class{constructor(e,t=void 0){this._limit=void 0;this._taskGroupLimit=void 0;this._layoutOptions=new oa;this._filters=[];this._error=void 0;this._sorting=[];this._grouping=[];this._ignoreGlobalQuery=!1;this.hideOptionsRegexp=/^(hide|show) (task count|backlink|priority|created date|start date|scheduled date|done date|due date|recurrence rule|edit button|urgency|tags)/;this.shortModeRegexp=/^short/;this.explainQueryRegexp=/^explain/;this.ignoreGlobalQueryRegexp=/^ignore global query/;this.limitRegexp=/^limit (groups )?(to )?(\d+)( tasks?)?/;this.commentRegexp=/^#.*/;this.source=e,this.filePath=t,e.split(` -`).map(n=>n.trim()).forEach(n=>{let i=this.expandPlaceholders(n,t);if(this.error===void 0)switch(!0){case i==="":break;case this.shortModeRegexp.test(i):this._layoutOptions.shortMode=!0;break;case this.explainQueryRegexp.test(i):this._layoutOptions.explainQuery=!0;break;case this.ignoreGlobalQueryRegexp.test(i):this._ignoreGlobalQuery=!0;break;case this.limitRegexp.test(i):this.parseLimit(i);break;case this.parseSortBy(i):break;case this.parseGroupBy(i):break;case this.hideOptionsRegexp.test(i):this.parseHideOptions(i);break;case this.commentRegexp.test(i):break;case this.parseFilter(i):break;default:this.setError("do not understand query",i)}})}expandPlaceholders(e,t){if(e.includes("{{")&&e.includes("}}")&&this.filePath===void 0)return this._error=`The query looks like it contains a placeholder, with "{{" and "}}" -but no file path has been supplied, so cannot expand placeholder values. -The query is: -${e}`,e;let n=e;if(t){let i=Ib(t);try{n=Nb(e,i)}catch(s){return s instanceof Error?this._error=s.message:this._error="Internal error. expandPlaceholders() threw something other than Error.",e}}return n}append(e){return this.source===""?e:e.source===""?this:new Kr(`${this.source} -${e.source}`,this.filePath)}explainQuery(){let e="";if(this.error!==void 0)return e+=`Query has an error: -`,e+=this.error+` -`,e;let t=this.filters.length;if(t===0)e+="No filters supplied. All tasks will match the query.";else for(let i=0;i0&&(e+=` -`),e+=this.filters[i].explainFilterIndented("");e+=this.explainQueryLimits();let{debugSettings:n}=Q();return n.ignoreSortInstructions&&(e+=` - -NOTE: All sort instructions, including default sort order, are disabled, due to 'ignoreSortInstructions' setting.`),e}explainQueryLimits(){let e="";function t(n){let i=` - -At most ${n} task`;return n!==1&&(i+="s"),i}return this._limit!==void 0&&(e+=t(this._limit),e+=`. -`),this._taskGroupLimit!==void 0&&(e+=t(this._taskGroupLimit),e+=` per group (if any "group by" options are supplied). -`),e}get limit(){return this._limit}get layoutOptions(){return this._layoutOptions}get filters(){return this._filters}get sorting(){return this._sorting}get grouping(){return this._grouping}get error(){return this._error}setError(e,t){this._error=`${e} -Problem line: "${t}"`}get ignoreGlobalQuery(){return this._ignoreGlobalQuery}applyQueryToTasks(e){try{this.filters.forEach(a=>{e=e.filter(a.filterFunction)});let{debugSettings:t}=Q(),n=t.ignoreSortInstructions?e:Ni.by(this.sorting,e),i=n.slice(0,this.limit),s=new Ii(this.grouping,i);return this._taskGroupLimit!==void 0&&s.applyTaskLimit(this._taskGroupLimit),new Hn(s,n.length)}catch(t){let n="Search failed";return Hn.fromError(qn(n,t))}}parseHideOptions(e){let t=e.match(this.hideOptionsRegexp);if(t!==null){let n=t[1]==="hide";switch(t[2]){case"task count":this._layoutOptions.hideTaskCount=n;break;case"backlink":this._layoutOptions.hideBacklinks=n;break;case"priority":this._layoutOptions.hidePriority=n;break;case"created date":this._layoutOptions.hideCreatedDate=n;break;case"start date":this._layoutOptions.hideStartDate=n;break;case"scheduled date":this._layoutOptions.hideScheduledDate=n;break;case"due date":this._layoutOptions.hideDueDate=n;break;case"done date":this._layoutOptions.hideDoneDate=n;break;case"recurrence rule":this._layoutOptions.hideRecurrenceRule=n;break;case"edit button":this._layoutOptions.hideEditButton=n;break;case"urgency":this._layoutOptions.hideUrgency=n;break;case"tags":this._layoutOptions.hideTags=n;break;default:this.setError("do not understand hide/show option",e)}}}parseFilter(e){var n;let t=pu(e);return t!=null?(t.filter?this._filters.push(t.filter):this.setError((n=t.error)!=null?n:"Unknown error",e),!0):!1}parseLimit(e){let t=e.match(this.limitRegexp);if(t===null){this.setError("do not understand query limit",e);return}let n=Number.parseInt(t[3],10);t[1]!==void 0?this._taskGroupLimit=n:this._limit=n}parseSortBy(e){let t=Xb(e);return t?(this._sorting.push(t),!0):!1}parseGroupBy(e){let t=Zb(e);return t?(this._grouping.push(t),!0):!1}};var mn=class{constructor(e=mn.empty){this._source=e}static getInstance(){return mn.instance||(mn.instance=new mn),mn.instance}set(e){this._source=e}query(e=void 0){return new Kr(this._source,e)}hasInstructions(){return this._source.trim()!==mn.empty}},Jt=mn;Jt.empty="";var _u=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 Ea=require("obsidian");var aC=require("obsidian"),n_=Zi(r_());var gp=class extends n_.EventEmitter2{constructor(){super(...arguments);this.options={minLevels:{"":"info",tasks:"info"}};this.consoleLoggerRegistered=!1;this.arrAvg=t=>t.reduce((n,i)=>n+i,0)/t.length}configure(t){return this.options=Object.assign({},this.options,t),this}getLogger(t){let n="none",i="";for(let s in this.options.minLevels)t.startsWith(s)&&s.length>=i.length&&(n=this.options.minLevels[s],i=s);return new yp(this,t,n)}onLogEntry(t){return this.on("log",t),this}registerConsoleLogger(){return this.consoleLoggerRegistered?this:(this.onLogEntry(t=>{let n=`[${window.moment().format("YYYY-MM-DD-HH:mm:ss.SSS")}][${t.level}][${t.module}]`;switch(t.traceId&&(n+=`[${t.traceId}]`),n+=` ${t.message}`,t.objects===void 0&&(t.objects=""),t.level){case"trace":console.trace(n,t.objects);break;case"debug":console.debug(n,t.objects);break;case"info":console.info(n,t.objects);break;case"warn":console.warn(n,t.objects);break;case"error":console.error(n,t.objects);break;default:console.log(`{${t.level}} ${n}`,t.objects)}}),this.consoleLoggerRegistered=!0,this)}},vu=new gp,yp=class{constructor(e,t,n){this.levels={trace:1,debug:2,info:3,warn:4,error:5};this.logManager=e,this.module=t,this.minLevel=this.levelToInt(n)}levelToInt(e){return e.toLowerCase()in this.levels?this.levels[e.toLowerCase()]:99}log(e,t,n){if(this.levelToInt(e){_a=r,Tp=e,bp=t},ku=t=>q(void 0,[t],function*({originalTask:r,newTasks:e}){if(Tp===void 0||_a===void 0||bp===void 0){Eu("Tasks: cannot use File before initializing it.");return}Array.isArray(e)||(e=[e]),va.debug(`replaceTaskWithTasks entered. ${r.path}`),a_({originalTask:r,newTasks:e,vault:Tp,metadataCache:_a,workspace:bp,previousTries:0})});function Eu(r){console.error(r),new Ea.Notice(r,15e3)}function s_(r){console.warn(r),new Ea.Notice(r,1e4)}function uC(r){va.debug(r)}var gn=class extends Error{},wu=class extends Error{},a_=a=>q(void 0,[a],function*({originalTask:r,newTasks:e,vault:t,metadataCache:n,workspace:i,previousTries:s}){va.debug(`tryRepetitive after ${s} previous tries`);let o=()=>{if(s>10){let l=`Tasks: Could not find the correct task line to update. - -The task line not updated is: -${r.originalMarkdown} - -In this markdown file: -"${r.taskLocation.path}" - -Note: further clicks on this checkbox will usually now be ignored until the file is opened (or certain, specific edits are made - it's complicated). - -Recommendations: - -1. Close all panes that have the above file open, and then re-open the file. - -2. Check for exactly identical copies of the task line, in this file, and see if you can make them different. -`;Eu(l);return}let u=Math.min(Math.pow(10,s),100);va.debug(`timeout = ${u}`),setTimeout(()=>{a_({originalTask:r,newTasks:e,vault:t,metadataCache:n,workspace:i,previousTries:s+1})},u)};try{let[u,l,c]=yield o_(r,t),p=[...c.slice(0,u),...e.map(h=>h.toFileLineString()),...c.slice(u+1)];yield t.modify(l,p.join(` -`))}catch(u){if(u instanceof gn)return u.message&&s_(u.message),o();if(u instanceof wu)return o();u instanceof Error&&Eu(u.message)}});function o_(r,e){return q(this,null,function*(){if(_a===void 0)throw new gn;let t=e.getAbstractFileByPath(r.path);if(!(t instanceof Ea.TFile))throw new gn(`Tasks: No file found for task ${r.description}. Retrying ...`);if(!oC.includes(t.extension))throw new Error(`Tasks: Does not support files with the ${t.extension} file extension.`);let n=_a.getFileCache(t);if(n==null||n===null)throw new gn(`Tasks: No file cache found for file ${t.path}. Retrying ...`);let i=n.listItems;if(i===void 0||i.length===0)throw new gn(`Tasks: No list items found in file cache of ${t.path}. Retrying ...`);let a=(yield e.read(t)).split(` -`),o=lC(r,a,i,uC);if(o===void 0)throw new wu;return[o,t,a]})}function _p(r,e){return q(this,null,function*(){try{let[t,n,i]=yield o_(r,e);return[t,n]}catch(t){t instanceof gn?t.message&&s_(t.message):t instanceof Error&&Eu(t.message)}})}function u_(r,e){return r{u.preventDefault(),u.stopPropagation(),a.disabled=!0;let l=r.toggleWithRecurrenceInUsersOrder();ku({originalTask:r,newTasks:l})}),n.prepend(a),n.setAttribute("data-task",r.status.symbol.trim()),n.setAttribute("data-line",e.listIndex.toString()),n.setAttribute("data-task-status-name",r.status.name),n.setAttribute("data-task-status-type",r.status.type),a.setAttribute("data-line",e.listIndex.toString()),(o=e.layoutOptions)!=null&&o.shortMode&&wC({task:r,element:i,isFilenameUnique:e.isFilenameUnique}),n})}function yC(r,e,t,n){return q(this,null,function*(){let i={},s=new un(e.layoutOptions),a=jr.tasksPluginEmoji.taskSerializer;for(let o of s.shownTaskLayoutComponents){let u=a.componentToString(r,s,o);if(u){o==="description"&&(u=ge.getInstance().removeAsWordFromDependingOnSettings(u));let l=document.createElement("span");if(t.appendChild(l),l){let c=document.createElement("span");l.appendChild(c),yield TC(c,u,o,r,n,e.obsidianComponent),_C(o,c);let p=bC(o,r);l.classList.add(...p);let h=vp(o,r);for(let _ in h)l.dataset[_]=h[_];i=pe(pe({},i),h)}}}for(let o of s.hiddenTaskLayoutComponents){let u=vp(o,r);i=pe(pe({},i),u)}if(i.taskPriority===void 0){let o=vp("priority",r);i=pe(pe({},i),o)}return i})}function TC(r,e,t,n,i,s){return q(this,null,function*(){if(t==="description"){let{debugSettings:a}=Q();a.showTaskHiddenData&&(e+=`
\u{1F41B} ${n.lineNumber} . ${n.sectionStart} . ${n.sectionIndex} . '${n.originalMarkdown}'
'${n.path}' > '${n.precedingHeader}'
`),yield i(e,r,n.path,s);let o=r.querySelector("blockquote"),u=o!=null?o:r,l=u.querySelector("p");if(l!==null){for(;l.firstChild;)u.insertBefore(l.firstChild,l);l.remove()}r.querySelectorAll("p").forEach(c=>{c.hasChildNodes()||c.remove()}),r.querySelectorAll(".footnotes").forEach(c=>{c.remove()})}else r.innerHTML=e})}function bC(r,e){let t=[],n=pC[r];switch(r){case"blockLink":break;case"description":case"priority":case"recurrenceRule":t.push(n);break;case"createdDate":case"dueDate":case"startDate":case"scheduledDate":case"doneDate":{e[r]&&t.push(n);break}}return t}function vp(r,e){let t={},n={createdDate:"taskCreated",dueDate:"taskDue",startDate:"taskStart",scheduledDate:"taskScheduled",doneDate:"taskDone",priority:"taskPriority",description:"",recurrenceRule:"",blockLink:""};switch(r){case"description":case"recurrenceRule":case"blockLink":break;case"priority":{let i=n[r];t[i]=vr.priorityNameUsingNormal(e.priority).toLocaleLowerCase();break}case"createdDate":case"dueDate":case"startDate":case"scheduledDate":case"doneDate":{let i=e[r];if(i){let s=vC(i);if(s){let a=n[r];t[a]=s}}break}}return t}function _C(r,e){if(r==="description"){let t=e.getElementsByClassName("tag");for(let n=0;n0?t+="past-":n<0&&(t+="future-"),Math.abs(n)<=hC?t+=Math.abs(n).toString()+"d":t+=mC,t)}function EC(r){let e=/["&\x00\r\n]/g,t=r.replace(e,"-");return t=t.replace(/^[-_]+/,""),t.length>0?t:null}function wC({task:r,element:e,isFilenameUnique:t}){let{recurrenceSymbol:n,startDateSymbol:i,createdDateSymbol:s,scheduledDateSymbol:a,dueDateSymbol:o,doneDateSymbol:u}=jr.tasksPluginEmoji.taskSerializer.symbols;e.addEventListener("mouseenter",()=>{let l=e.createDiv();l.addClasses(["tooltip","pop-up"]),r.recurrence&&l.createDiv().setText(`${n} ${r.recurrence.toText()}`),wa(l,r.createdDate,s),wa(l,r.startDate,i),wa(l,r.scheduledDate,a),wa(l,r.dueDate,o),wa(l,r.doneDate,u);let c=r.getLinkText({isFilenameUnique:t});c&&l.createDiv().setText(`\u{1F517} ${c}`),e.addEventListener("mouseleave",()=>{l.remove()})})}function wa(r,e,t){e&&r.createDiv().setText(kC({signifier:t,date:e}))}function kC({signifier:r,date:e}){return`${r} ${e.format(z.dateFormat)} (${e.from(window.moment().startOf("day"))})`}function Ou(r,e){function t(n,i,s,a){return q(this,null,function*(){if(!a)throw new Error("Must call the Obsidian renderer with an Obsidian Component object");yield l_.MarkdownRenderer.renderMarkdown(n,i,s,a)})}return gC(r,e,t)}var Su=class{constructor({plugin:e}){this.markdownPostProcessor=this._markdownPostProcessor.bind(this);e.registerMarkdownPostProcessor(this._markdownPostProcessor.bind(this))}_markdownPostProcessor(e,t){return q(this,null,function*(){var c;let n=new c_.MarkdownRenderChild(e);t.addChild(n);let i=e.findAll(".task-list-item").filter(p=>{var y;let h=(y=p.textContent)==null?void 0:y.split(` -`);if(h===void 0)return!1;let _=null;for(let w=0;wd_.ViewPlugin.fromClass(Ep),Ep=class{constructor(e){this.view=e,this.handleClickEvent=this.handleClickEvent.bind(this),this.view.dom.addEventListener("click",this.handleClickEvent)}destroy(){this.view.dom.removeEventListener("click",this.handleClickEvent)}handleClickEvent(e){let{target:t}=e;if(!t||!(t instanceof HTMLInputElement)||t.type!=="checkbox")return!1;let n=t.closest("ul.plugin-tasks-query-result, div.callout-content");if(n){if(n.matches("div.callout-content")){let h=`obsidian-tasks-plugin warning: Tasks cannot add or remove completion dates or make the next copy of a recurring task for tasks written inside a callout when you click their checkboxes in Live Preview. -If you wanted Tasks to do these things, please undo your change, then either click the line of the task and use the "Toggle Task Done" command, or switch to Reading View to click the checkbox.`;console.warn(h),new f_.Notice(h,45e3)}return!1}let{state:i}=this.view,s=this.view.posAtDOM(t),a=i.doc.lineAt(s),o=ye.fromLine({line:a.text,taskLocation:ot.fromUnknownPosition(""),fallbackDate:null});if(o===null)return!1;e.preventDefault();let l=o.toggleWithRecurrenceInUsersOrder().map(h=>h.toFileLineString()).join(i.lineBreak),c=i.update({changes:{from:a.from,to:a.to,insert:l}});this.view.dispatch(c);let p=t.checked;return setTimeout(()=>{t.checked=p},1),!0}};var ji=require("obsidian");function h_(r,e,t,n=void 0){let i="";e.isEmpty()||(i+=`Only tasks containing the global filter '${e.get()}'. - -`);let s=new Kr(r,n);return s.ignoreGlobalQuery||t.hasInstructions()&&(i+=`Explanation of the global query: - -${t.query(n).explainQuery()} -`),i+=`Explanation of this Tasks code block query: - -${s.explainQuery()}`,i}function Du(r,e,t){let n=new Kr(r,t);return n.ignoreGlobalQuery?n:e.query(t).append(n)}var Ru=class{constructor({plugin:e,events:t}){this.addQueryRenderChild=this._addQueryRenderChild.bind(this);this.app=e.app,this.events=t,e.registerMarkdownCodeBlockProcessor("tasks",this._addQueryRenderChild.bind(this))}_addQueryRenderChild(e,t,n){return q(this,null,function*(){n.addChild(new wp({app:this.app,events:this.events,container:t,source:e,filePath:n.sourcePath}))})}},wp=class extends ji.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=Du(this.source,Jt.getInstance(),this.filePath),this.queryType="tasks";break;default:this.query=Du(this.source,Jt.getInstance(),this.filePath),this.queryType="tasks";break}}onload(){this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.renderEventRef=this.events.onCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()}onunload(){this.renderEventRef!==void 0&&this.events.off(this.renderEventRef),this.queryReloadTimeout!==void 0&&clearTimeout(this.queryReloadTimeout)}reloadQueryAtMidnight(){let t=new Date;t.setHours(24,0,0,0);let n=new Date,i=t.getTime()-n.getTime();this.queryReloadTimeout=setTimeout(()=>{this.query=Du(this.source,Jt.getInstance(),this.filePath),this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()},i+1e3)}render(i){return q(this,arguments,function*({tasks:t,state:n}){var a;let s=this.containerEl.createEl("div");n==="Warm"&&this.query.error===void 0?yield this.renderQuerySearchResults(t,n,s):this.query.error!==void 0?this.renderErrorMessage(s,this.query.error):this.renderLoadingMessage(s),(a=this.containerEl.firstChild)==null||a.replaceWith(s)})}renderQuerySearchResults(t,n,i){return q(this,null,function*(){this.query.layoutOptions.explainQuery&&this.createExplanation(i);let a=this.query.applyQueryToTasks(t);if(a.searchErrorMessage!==void 0){this.renderErrorMessage(i,a.searchErrorMessage);return}yield this.addAllTaskGroups(a.taskGroups,i);let o=a.totalTasksCount;this.addTaskCount(i,a)})}renderErrorMessage(t,n){t.createDiv().innerHTML=`
Tasks query: ${n.replace(/\n/g,"
")}
`}renderLoadingMessage(t){t.setText("Loading Tasks ...")}createExplanation(t){let n=h_(this.source,ge.getInstance(),Jt.getInstance(),this.filePath),i=t.createEl("pre");i.addClasses(["plugin-tasks-query-explanation"]),i.setText(n),t.appendChild(i)}createTaskList(t,n){return q(this,null,function*(){let i=new un(this.query.layoutOptions),s=n.createEl("ul");s.addClasses(["contains-task-list","plugin-tasks-query-result"]),s.addClasses(i.taskListHiddenClasses);let a=this.getGroupingAttribute();a&&a.length>0&&(s.dataset.taskGroupBy=a);for(let[o,u]of t.entries()){let l=this.isFilenameUnique({task:u}),c=yield Ou(u,{parentUlElement:s,listIndex:o,layoutOptions:this.query.layoutOptions,isFilenameUnique:l,taskLayout:i,obsidianComponent:this});c.querySelectorAll("[data-footnote-id]").forEach(_=>_.remove());let h=c.createSpan("task-extras");if(this.query.layoutOptions.hideUrgency||this.addUrgency(h,u),!this.query.layoutOptions.hideBacklinks){let _=this.query.layoutOptions.shortMode;this.addBacklinks(h,u,_,l)}this.query.layoutOptions.hideEditButton||this.addEditButton(h,u),s.appendChild(c)}n.appendChild(s)})}addEditButton(t,n){t.createEl("a",{cls:"tasks-edit"}).onClickEvent(s=>{s.preventDefault();let a=u=>{ku({originalTask:n,newTasks:Rt.removeInferredStatusIfNeeded(n,u)})};new cn({app:this.app,task:n,onSubmit:a}).open()})}addUrgency(t,n){let i=new Intl.NumberFormat().format(n.urgency);t.createSpan({text:i,cls:"tasks-urgency"})}addAllTaskGroups(t,n){return q(this,null,function*(){for(let i of t.groups)this.addGroupHeadings(n,i.groupHeadings),yield this.createTaskList(i.tasks,n)})}addGroupHeadings(t,n){for(let i of n)this.addGroupHeading(t,i)}addGroupHeading(t,n){return q(this,null,function*(){let i="h6";n.nestingLevel===0?i="h4":n.nestingLevel===1&&(i="h5");let s=t.createEl(i,{cls:"tasks-group-heading"});yield ji.MarkdownRenderer.renderMarkdown(n.displayName,s,this.filePath,this)})}addBacklinks(t,n,i,s){var c;let a=t.createSpan({cls:"tasks-backlink"});i||a.append(" (");let o=a.createEl("a");o.rel="noopener",o.target="_blank",o.addClass("internal-link"),i&&o.addClass("internal-link-short-mode");let u;i?u=" \u{1F517}":u=(c=n.getLinkText({isFilenameUnique:s}))!=null?c:"",o.setText(u);let l=this.app.vault;o.addEventListener("click",p=>q(this,null,function*(){let h=yield _p(n,l);if(h){let[_,y]=h;yield this.app.workspace.getLeaf(ji.Keymap.isModEvent(p)).openFile(y,{eState:{line:_}})}})),o.addEventListener("mousedown",p=>q(this,null,function*(){if(p.button===1){let h=yield _p(n,l);if(h){let[_,y]=h;yield this.app.workspace.getLeaf("tab").openFile(y,{eState:{line:_}})}}})),i||a.append(")")}addTaskCount(t,n){this.query.layoutOptions.hideTaskCount||t.createDiv({text:n.totalTasksCountDisplayText(),cls:"tasks-count"})}isFilenameUnique({task:t}){let n=t.path.match(/([^/]*)\..+$/i);if(n===null)return;let i=n[1];return this.app.vault.getMarkdownFiles().filter(a=>{if(a.basename===i)return!0}).length<2}getGroupingAttribute(){let t=[];for(let n of this.query.grouping)t.push(n.property);return t.join(",")}};var ve=require("obsidian");function m_(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],[">","Rescheduled","x","TODO"],["<","Scheduled","x","TODO"],["!","Important","x","TODO"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],["?","Question","x","TODO"],["*","Star","x","TODO"],["n","Note","x","TODO"],["l","Location","x","TODO"],["i","Information","x","TODO"],["I","Idea","x","TODO"],["S","Amount","x","TODO"],["p","Pro","x","TODO"],["c","Con","x","TODO"],["b","Bookmark","x","TODO"],['"',"Quote","x","TODO"],["0","Speech bubble 0","0","NON_TASK"],["1","Speech bubble 1","1","NON_TASK"],["2","Speech bubble 2","2","NON_TASK"],["3","Speech bubble 3","3","NON_TASK"],["4","Speech bubble 4","4","NON_TASK"],["5","Speech bubble 5","5","NON_TASK"],["6","Speech bubble 6","6","NON_TASK"],["7","Speech bubble 7","7","NON_TASK"],["8","Speech bubble 8","8","NON_TASK"],["9","Speech bubble 9","9","NON_TASK"]]}function g_(){return[[" ","incomplete","x","TODO"],["x","complete / done"," ","DONE"],["-","cancelled"," ","CANCELLED"],[">","deferred","x","TODO"],["/","in progress, or half-done","x","IN_PROGRESS"],["!","Important","x","TODO"],["?","question","x","TODO"],["R","review","x","TODO"],["+","Inbox / task that should be processed later","x","TODO"],["b","bookmark","x","TODO"],["B","brainstorm","x","TODO"],["D","deferred or scheduled","x","TODO"],["I","Info","x","TODO"],["i","idea","x","TODO"],["N","note","x","TODO"],["Q","quote","x","TODO"],["W","win / success / reward","x","TODO"],["P","pro","x","TODO"],["C","con","x","TODO"]]}function y_(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],[">","Deferred","x","TODO"],["!","Important","x","TODO"],["?","Question","x","TODO"],["r","Review","x","TODO"]]}function T_(){return[[" ","Unchecked","x","TODO"],["x","Regular"," ","DONE"],["X","Checked"," ","DONE"],["-","Dropped"," ","CANCELLED"],[">","Forward","x","TODO"],["D","Date","x","TODO"],["?","Question","x","TODO"],["/","Half Done","x","IN_PROGRESS"],["+","Add","x","TODO"],["R","Research","x","TODO"],["!","Important","x","TODO"],["i","Idea","x","TODO"],["B","Brainstorm","x","TODO"],["P","Pro","x","TODO"],["C","Con","x","TODO"],["Q","Quote","x","TODO"],["N","Note","x","TODO"],["b","Bookmark","x","TODO"],["I","Information","x","TODO"],["p","Paraphrase","x","TODO"],["L","Location","x","TODO"],["E","Example","x","TODO"],["A","Answer","x","TODO"],["r","Reward","x","TODO"],["c","Choice","x","TODO"],["d","Doing","x","IN_PROGRESS"],["T","Time","x","TODO"],["@","Character / Person","x","TODO"],["t","Talk","x","TODO"],["O","Outline / Plot","x","TODO"],["~","Conflict","x","TODO"],["W","World","x","TODO"],["f","Clue / Find","x","TODO"],["F","Foreshadow","x","TODO"],["H","Favorite / Health","x","TODO"],["&","Symbolism","x","TODO"],["s","Secret","x","TODO"]]}function b_(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],[">","Rescheduled","x","TODO"],["<","Scheduled","x","TODO"],["!","Important","x","TODO"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],["?","Question","x","TODO"],["*","Star","x","TODO"],["n","Note","x","TODO"],["l","Location","x","TODO"],["i","Information","x","TODO"],["I","Idea","x","TODO"],["S","Amount","x","TODO"],["p","Pro","x","TODO"],["c","Con","x","TODO"],["b","Bookmark","x","TODO"],["f","Fire","x","TODO"],["k","Key","x","TODO"],["w","Win","x","TODO"],["u","Up","x","TODO"],["d","Down","x","TODO"]]}function __(){return[[" ","to-do","x","TODO"],["/","incomplete","x","IN_PROGRESS"],["x","done"," ","DONE"],["-","canceled"," ","CANCELLED"],[">","forwarded","x","TODO"],["<","scheduling","x","TODO"],["?","question","x","TODO"],["!","important","x","TODO"],["*","star","x","TODO"],['"',"quote","x","TODO"],["l","location","x","TODO"],["b","bookmark","x","TODO"],["i","information","x","TODO"],["S","savings","x","TODO"],["I","idea","x","TODO"],["p","pros","x","TODO"],["c","cons","x","TODO"],["f","fire","x","TODO"],["k","key","x","TODO"],["w","win","x","TODO"],["u","up","x","TODO"],["d","down","x","TODO"]]}function v_(){return[[" ","to-do","x","TODO"],["/","incomplete","x","IN_PROGRESS"],["x","done"," ","DONE"],["-","canceled"," ","CANCELLED"],[">","forwarded","x","TODO"],["<","scheduling","x","TODO"],["?","question","x","TODO"],["!","important","x","TODO"],["*","star","x","TODO"],['"',"quote","x","TODO"],["l","location","x","TODO"],["b","bookmark","x","TODO"],["i","information","x","TODO"],["S","savings","x","TODO"],["I","idea","x","TODO"],["p","pros","x","TODO"],["c","cons","x","TODO"],["f","fire","x","TODO"],["k","key","x","TODO"],["w","win","x","TODO"],["u","up","x","TODO"],["d","down","x","TODO"]]}var E_=[{text:"Core Statuses",level:"h3",class:"",open:!0,notice:{class:"setting-item-description",text:null,html:"

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

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

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

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

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

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

See the documentation to get started!

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

The format that Tasks uses to read and write tasks.

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

See the documentation.

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

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

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

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

See the documentation.

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

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

See the documentation.

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

See the documentation.

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

See the documentation.

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

See the documentation.

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

See the documentation.

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

See the documentation.

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

See the documentation.

')).addToggle(i=>{let s=Q();i.setValue(s.provideAccessKeys).onChange(a=>q(this,null,function*(){et({provideAccessKeys:a}),yield this.plugin.saveSettings()}))})}addOneSettingsBlock(t,n,i){let s=t.createEl("details",{cls:"tasks-nested-settings",attr:pe({},n.open||i[n.text]?{open:!0}:{})});s.empty(),s.ontoggle=()=>{i[n.text]=s.open,et({headingOpened:i}),this.plugin.saveSettings()};let a=s.createEl("summary");if(new ve.Setting(a).setHeading().setName(n.text),a.createDiv("collapser").createDiv("handle"),n.notice!==null){let o=s.createEl("div",{cls:n.notice.class,text:n.notice.text});n.notice.html!==null&&o.insertAdjacentHTML("beforeend",n.notice.html)}n.settings.forEach(o=>{if(!(o.featureFlag!==""&&!ab(o.featureFlag))&&(o.type==="checkbox"?new ve.Setting(s).setName(o.name).setDesc(o.description).addToggle(u=>{let l=Q();l.generalSettings[o.settingName]||In(o.settingName,o.initialValue),u.setValue(l.generalSettings[o.settingName]).onChange(c=>q(this,null,function*(){In(o.settingName,c),yield this.plugin.saveSettings()}))}):o.type==="text"?new ve.Setting(s).setName(o.name).setDesc(o.description).addText(u=>{let l=Q();l.generalSettings[o.settingName]||In(o.settingName,o.initialValue);let c=p=>q(this,null,function*(){In(o.settingName,p),yield this.plugin.saveSettings()});u.setPlaceholder(o.placeholder.toString()).setValue(l.generalSettings[o.settingName].toString()).onChange((0,ve.debounce)(c,500,!0))}):o.type==="textarea"?new ve.Setting(s).setName(o.name).setDesc(o.description).addTextArea(u=>{let l=Q();l.generalSettings[o.settingName]||In(o.settingName,o.initialValue);let c=p=>q(this,null,function*(){In(o.settingName,p),yield this.plugin.saveSettings()});u.setPlaceholder(o.placeholder.toString()).setValue(l.generalSettings[o.settingName].toString()).onChange((0,ve.debounce)(c,500,!0)),u.inputEl.rows=8,u.inputEl.cols=40}):o.type==="function"&&this.customFunctions[o.settingName](s,this),o.notice!==null)){let u=s.createEl("p",{cls:o.notice.class,text:o.notice.text});o.notice.html!==null&&u.insertAdjacentHTML("beforeend",o.notice.html)}})}static parseCommaSeparatedFolders(t){return t.split(",").map(n=>n.trim()).map(n=>n.replace(/^\/|\/$/g,"")).filter(n=>n!=="")}static renderFolderArray(t){return t.join(",")}insertTaskCoreStatusSettings(t,n){let{statusSettings:i}=Q();i.coreStatuses.forEach(s=>{w_(t,s,i.coreStatuses,i,n,n.plugin,!0)})}insertCustomTaskStatusSettings(t,n){let{statusSettings:i}=Q();i.customStatuses.forEach(l=>{w_(t,l,i.customStatuses,i,n,n.plugin,!1)}),t.createEl("div"),new ve.Setting(t).addButton(l=>{l.setButtonText("Add New Task Status").setCta().onClick(()=>q(this,null,function*(){Ge.addStatus(i.customStatuses,new Je("","","",!1,"TODO")),yield Gi(i,n)}))}).infoEl.remove();let a=[["AnuPpuccin Theme",m_()],["Aura Theme",g_()],["Ebullientworks Theme",y_()],["ITS Theme & SlRvb Checkboxes",T_()],["Minimal Theme",__()],["Things Theme",v_()],["LYT Mode Theme (Dark mode only)",b_()]];for(let[l,c]of a)new ve.Setting(t).addButton(h=>{let _=`${l}: Add ${c.length} supported Statuses`;h.setButtonText(_).onClick(()=>q(this,null,function*(){yield DC(c,i,n)}))}).infoEl.remove();new ve.Setting(t).addButton(l=>{l.setButtonText("Add All Unknown Status Types").setCta().onClick(()=>q(this,null,function*(){let p=this.plugin.getTasks().map(_=>_.status),h=De.getInstance().findUnknownStatuses(p);h.length!==0&&(h.forEach(_=>{Ge.addStatus(i.customStatuses,_)}),yield Gi(i,n))}))}).infoEl.remove(),new ve.Setting(t).addButton(l=>{l.setButtonText("Reset Custom Status Types to Defaults").setWarning().onClick(()=>q(this,null,function*(){Ge.resetAllCustomStatuses(i),yield Gi(i,n)}))}).infoEl.remove()}},ka=Wt;ka.createFragmentWithHTML=t=>createFragment(n=>n.createDiv().innerHTML=t);function w_(r,e,t,n,i,s,a){let o=r.createEl("pre");o.addClass("row-for-status"),o.textContent=new te(e).previewText();let u=new ve.Setting(r);u.infoEl.replaceWith(o),a||u.addExtraButton(l=>{l.setIcon("cross").setTooltip("Delete").onClick(()=>q(this,null,function*(){Ge.deleteStatus(t,e)&&(yield Gi(n,i))}))}),u.addExtraButton(l=>{l.setIcon("pencil").setTooltip("Edit").onClick(()=>q(this,null,function*(){let c=new Ut(s,e,a);c.onClose=()=>q(this,null,function*(){c.saved&&Ge.replaceStatus(t,e,c.statusConfiguration())&&(yield Gi(n,i))}),c.open()}))}),u.infoEl.remove()}function DC(r,e,t){return q(this,null,function*(){Ge.bulkAddStatusCollection(e,r).forEach(i=>{new ve.Notice(i)}),yield Gi(e,t)})}function Gi(r,e){return q(this,null,function*(){et({statusSettings:r}),Ge.applyToStatusRegistry(r,De.getInstance()),yield e.saveSettings(!0)})}function RC(r){let{settingEl:e,infoEl:t,controlEl:n}=r,i=n.querySelector("textarea");i!==null&&(e.style.display="block",t.style.marginRight="0px",i.style.minWidth="-webkit-fill-available")}var k_=require("obsidian");var Mu=class extends k_.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 ib(s,t.ch)?{start:{line:t.line,ch:0},end:{line:t.line,ch:s.length},query:s}:null}getSuggestions(t){var a,o,u;let n=t.query,i=t.editor.getCursor();return((u=(o=(a=la()).buildSuggestions)==null?void 0:o.call(a,n,i.ch,this.settings))!=null?u:[]).map(l=>Tt(pe({},l),{context:t}))}renderSuggestion(t,n){n.setText(t.displayText)}selectSuggestion(t,n){var u,l,c;let i=t.context.editor;if(t.suggestionType==="empty"){this.close();let p=new KeyboardEvent("keydown",{code:"Enter",key:"Enter"});(l=(u=i==null?void 0:i.cm)==null?void 0:u.contentDOM)==null||l.dispatchEvent(p);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 O_=(r,e)=>{let t,n=new Promise((a,o)=>{t=a});return e(r,a=>{let o=a.map(u=>u.toFileLineString()).join(` -`);t(o)}).open(),n};var S_=(r,e)=>{let t=Yo({line:"",path:""});return new cn({app:r,task:t,onSubmit:e})};var D_=r=>({createTaskLineModal:()=>O_(r,S_)});var xu=class extends R_.Plugin{get apiV1(){return D_(app)}onload(){return q(this,null,function*(){vu.registerConsoleLogger(),console.log('loading plugin "tasks"'),yield this.loadSettings(),this.addSettingTab(new ka({plugin:this})),i_({metadataCache:this.app.metadataCache,vault:this.app.vault,workspace:this.app.workspace}),yield this.loadTaskStatuses();let t=new _u({obsidianEvents:this.app.workspace});this.cache=new Fn({metadataCache:this.app.metadataCache,vault:this.app.vault,events:t}),this.inlineRenderer=new Su({plugin:this}),this.queryRenderer=new Ru({plugin:this,events:t}),this.registerEditorExtension(p_()),this.registerEditorSuggest(new Mu(this.app,Q())),new jo({plugin:this})})}loadTaskStatuses(){return q(this,null,function*(){let{statusSettings:t}=Q();Ge.applyToStatusRegistry(t,De.getInstance())})}onunload(){var t;console.log('unloading plugin "tasks"'),(t=this.cache)==null||t.unload()}loadSettings(){return q(this,null,function*(){let t=yield this.loadData();et(t),t=Q(),ge.getInstance().set(t.globalFilter),ge.getInstance().setRemoveGlobalFilter(t.removeGlobalFilter),Jt.getInstance().set(t.globalQuery),yield this.loadTaskStatuses()})}saveSettings(){return q(this,null,function*(){yield this.saveData(Q())})}getTasks(){var t;return(t=this.cache)==null?void 0:t.getTasks()}}; -/*! - * EventEmitter2 - * https://github.com/hij1nx/EventEmitter2 - * - * Copyright (c) 2013 hij1nx - * Licensed under the MIT license. - */ -/*! - * mustache.js - Logic-less {{mustache}} templates with JavaScript - * http://github.com/janl/mustache.js - */ diff --git a/ObsidianRnDVault/.obsidian/plugins/obsidian-tasks-plugin/manifest.json b/ObsidianRnDVault/.obsidian/plugins/obsidian-tasks-plugin/manifest.json index 693a9bb..24c1adf 100644 --- a/ObsidianRnDVault/.obsidian/plugins/obsidian-tasks-plugin/manifest.json +++ b/ObsidianRnDVault/.obsidian/plugins/obsidian-tasks-plugin/manifest.json @@ -1,7 +1,7 @@ { "id": "obsidian-tasks-plugin", "name": "Tasks", - "version": "4.8.1", + "version": "4.9.0", "minAppVersion": "1.1.1", "description": "Task management for Obsidian", "author": "Martin Schenck and Clare Macrae", diff --git a/ObsidianRnDVault/.obsidian/plugins/open-gate/data.json b/ObsidianRnDVault/.obsidian/plugins/open-gate/data.json index 69ccb00..ed7e5c8 100644 --- a/ObsidianRnDVault/.obsidian/plugins/open-gate/data.json +++ b/ObsidianRnDVault/.obsidian/plugins/open-gate/data.json @@ -1,4 +1,16 @@ { "uuid": "o2b9ui64cmi1ndxhwxxskn", - "gates": {} + "gates": { + "aHR0cHM6Ly9pY29uZXMuanMub3JnL2NvbGxlY3Rpb24vYWxscHVibGlj": { + "id": "aHR0cHM6Ly9pY29uZXMuanMub3JnL2NvbGxlY3Rpb24vYWxscHVibGlj", + "title": "Iconify", + "icon": "", + "hasRibbon": true, + "position": "right", + "profileKey": "public", + "url": "https://icon-sets.iconify.design/", + "zoomFactor": 1, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36" + } + } } \ No newline at end of file diff --git a/ObsidianRnDVault/.obsidian/plugins/periodic-notes/data.json b/ObsidianRnDVault/.obsidian/plugins/periodic-notes/data.json index f49f5a2..22b0a3f 100644 --- a/ObsidianRnDVault/.obsidian/plugins/periodic-notes/data.json +++ b/ObsidianRnDVault/.obsidian/plugins/periodic-notes/data.json @@ -4,13 +4,13 @@ "hasMigratedWeeklyNoteSettings": false, "daily": { "format": "YYYY/MM/YYYY-MM-DD", - "template": "System/templates/journal/Daily Journal Template.md", + "template": "System/templates/Journal/Daily/Daily Journal Template.md", "folder": "Journal/Daily", "enabled": true }, "weekly": { "format": "gggg/gggg-[v]ww", - "template": "System/templates/journal/Weekly Journal Template.md", + "template": "System/templates/Journal/Weekly/Weekly Journal Template.md", "folder": "Journal/Weekly", "enabled": true }, @@ -27,7 +27,7 @@ }, "yearly": { "format": "YYYY", - "template": "System/templates/journal/Yearly Journal Template.md", + "template": "System/templates/Journal/Yearly/Yearly Journal Template.md", "folder": "Journal/Yearly", "enabled": true } diff --git a/ObsidianRnDVault/.obsidian/plugins/quickadd/data.json b/ObsidianRnDVault/.obsidian/plugins/quickadd/data.json new file mode 100644 index 0000000..739c648 --- /dev/null +++ b/ObsidianRnDVault/.obsidian/plugins/quickadd/data.json @@ -0,0 +1,24 @@ +{ + "choices": [], + "macros": [], + "inputPrompt": "single-line", + "devMode": false, + "templateFolderPath": "System/templates", + "announceUpdates": true, + "version": "1.3.0", + "disableOnlineFeatures": true, + "ai": { + "OpenAIApiKey": "", + "defaultModel": "Ask me", + "defaultSystemPrompt": "As an AI assistant within Obsidian, your primary goal is to help users manage their ideas and knowledge more effectively. Format your responses using Markdown syntax. Please use the [[Obsidian]] link format. You can write aliases for the links by writing [[Obsidian|the alias after the pipe symbol]]. To use mathematical notation, use LaTeX syntax. LaTeX syntax for larger equations should be on separate lines, surrounded with double dollar signs ($$). You can also inline math expressions by wrapping it in $ symbols. For example, use $$w_{ij}^{\text{new}}:=w_{ij}^{\text{current}}+etacdotdelta_jcdot x_{ij}$$ on a separate line, but you can write \"($eta$ = learning rate, $delta_j$ = error term, $x_{ij}$ = input)\" inline.", + "promptTemplatesFolderPath": "", + "showAssistant": true + }, + "migrations": { + "migrateToMacroIDFromEmbeddedMacro": true, + "useQuickAddTemplateFolder": true, + "incrementFileNameSettingMoveToDefaultBehavior": true, + "mutualExclusionInsertAfterAndWriteToBottomOfFile": true, + "setVersionAfterUpdateModalRelease": true + } +} \ No newline at end of file diff --git a/ObsidianRnDVault/.obsidian/plugins/quickadd/manifest.json b/ObsidianRnDVault/.obsidian/plugins/quickadd/manifest.json new file mode 100644 index 0000000..fdccc40 --- /dev/null +++ b/ObsidianRnDVault/.obsidian/plugins/quickadd/manifest.json @@ -0,0 +1,11 @@ +{ + "id": "quickadd", + "name": "QuickAdd", + "version": "1.3.0", + "minAppVersion": "0.13.19", + "description": "Quickly add new pages or content to your vault.", + "author": "Christian B. B. Houmann", + "authorUrl": "https://bagerbach.com", + "fundingUrl": "https://www.buymeacoffee.com/chhoumann", + "isDesktopOnly": false +} \ No newline at end of file diff --git a/ObsidianRnDVault/.obsidian/plugins/settings-search/main.js b/ObsidianRnDVault/.obsidian/plugins/settings-search/main.js deleted file mode 100644 index 814d9be..0000000 --- a/ObsidianRnDVault/.obsidian/plugins/settings-search/main.js +++ /dev/null @@ -1,506 +0,0 @@ -/* -THIS IS A GENERATED/BUNDLED FILE BY ESBUILD -if you want to view the source, please visit the github repository of this plugin -*/ - -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; -var __markAsModule = (target) => __defProp(target, "__esModule", { value: true }); -var __export = (target, all) => { - __markAsModule(target); - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __reExport = (target, module2, desc) => { - if (module2 && typeof module2 === "object" || typeof module2 === "function") { - for (let key of __getOwnPropNames(module2)) - if (!__hasOwnProp.call(target, key) && key !== "default") - __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable }); - } - return target; -}; -var __toModule = (module2) => { - return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2); -}; -var __publicField = (obj, key, value) => { - __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); - return value; -}; - -// src/main.ts -__export(exports, { - default: () => SettingsSearch -}); -var import_obsidian = __toModule(require("obsidian")); - -// node_modules/monkey-around/mjs/index.js -function around(obj, factories) { - const removers = Object.keys(factories).map((key) => around1(obj, key, factories[key])); - return removers.length === 1 ? removers[0] : function() { - removers.forEach((r) => r()); - }; -} -function around1(obj, method, createWrapper) { - const original = obj[method], hadOwn = obj.hasOwnProperty(method); - let current = createWrapper(original); - if (original) - Object.setPrototypeOf(current, original); - Object.setPrototypeOf(wrapper, current); - obj[method] = wrapper; - return remove; - function wrapper(...args) { - if (current === original && obj[method] === wrapper) - remove(); - return current.apply(this, args); - } - function remove() { - if (obj[method] === wrapper) { - if (hadOwn) - obj[method] = original; - else - delete obj[method]; - } - if (current === original) - return; - current = original; - Object.setPrototypeOf(wrapper, original || Function); - } -} - -// src/main.ts -var SettingsSearch = class extends import_obsidian.Plugin { - constructor() { - super(...arguments); - __publicField(this, "settingsSearchEl", createDiv("settings-search-container vertical-tab-header-group")); - __publicField(this, "settingsResultsContainerEl", createDiv("settings-search-results-container vertical-tab-content")); - __publicField(this, "settingsNavItemContainer", this.settingsSearchEl.createDiv("vertical-tab-header-group-items").createDiv("vertical-tab-nav-item settings-search-input")); - __publicField(this, "settingsResultsEl"); - __publicField(this, "search"); - __publicField(this, "locale"); - __publicField(this, "resources", []); - __publicField(this, "results", []); - __publicField(this, "loaded", false); - __publicField(this, "tabIndex", 0); - __publicField(this, "pluginTabIndex", 0); - __publicField(this, "settingCache", new Map()); - __publicField(this, "searchAppended", false); - __publicField(this, "activeIndex", -1); - __publicField(this, "activeSetting"); - __publicField(this, "scope", new import_obsidian.Scope(this.app.scope)); - __publicField(this, "mobileContainers", []); - } - async onload() { - (window["SettingsSearch"] = { - addResources: this.addResources.bind(this), - removeResources: this.removeResources.bind(this), - removeTabResources: this.removeTabResources.bind(this) - }) && this.register(() => delete window["SettingsSearch"]); - this.app.workspace.onLayoutReady(async () => { - this.settingsResultsContainerEl.createEl("h3", { - text: "Settings Search Results" - }); - this.settingsResultsEl = this.settingsResultsContainerEl.createDiv("settings-search-results"); - this.buildScope(); - this.buildSearch(); - this.buildResources(); - this.buildPluginResources(); - this.patchSettings(); - this.loaded = true; - this.app.workspace.trigger("settings-search-loaded"); - }); - } - buildResources() { - const tab = this.app.setting.settingTabs[this.tabIndex]; - if (tab) { - this.getTabResources(tab); - this.tabIndex++; - setTimeout(() => this.buildResources()); - } - } - buildPluginResources() { - const tab = this.app.setting.pluginTabs[this.pluginTabIndex]; - if (tab) { - this.getTabResources(tab); - this.pluginTabIndex++; - setTimeout(() => this.buildPluginResources()); - } - } - get manifests() { - return Object.values(this.app.plugins.manifests); - } - addResourceToCache(resource) { - if (!resource || !resource.text || !resource.name || !resource.tab) { - return new Error("A valid resource must be provided."); - } - let name; - if (resource.external) { - name = createFragment((el) => { - (0, import_obsidian.setIcon)(el.createSpan({ - attr: { - "aria-label": "This setting was added by another plugin." - } - }), "info"); - el.createSpan({ text: resource.text }); - }); - } else { - name = resource.text; - } - const setting = new import_obsidian.Setting(createDiv()).setName(name).setDesc(createFragment((e) => e.createDiv().innerHTML = resource.desc ?? "")); - if (resource.external) { - setting.settingEl.addClass("set-externally"); - } - if (resource.tab == "community-plugins") { - let plugin = this.manifests.find((p) => p.name == resource.text); - if (plugin && this.app.plugins.getPlugin(plugin.id)?._loaded && this.app.setting.pluginTabs.find((t) => t.id == plugin.id)) { - setting.addExtraButton((b) => { - b.setTooltip(`Open ${resource.text} Settings`).onClick(() => { - this.app.setting.openTabById(plugin.id); - }); - }); - } - } - if (resource.tab == "plugins") { - const plugins = Object.values(this.app.internalPlugins.plugins); - const plugin = plugins.find((p) => p._loaded && p.instance.name == resource.text); - if (plugin && this.app.setting.pluginTabs.find((t) => t.id == plugin.instance.id)) { - setting.addExtraButton((b) => { - b.setTooltip(`Open ${resource.text} Settings`).onClick(() => { - this.app.setting.openTabById(plugin.instance.id); - }); - }); - } - } - setting.addExtraButton((b) => { - b.setIcon("forward-arrow").onClick(() => { - this.showResult(resource); - }); - }); - this.settingCache.set(resource, setting); - } - getResourceFromCache(resource) { - if (!this.settingCache.has(resource)) { - this.addResourceToCache(resource); - } - return this.settingCache.get(resource); - } - removeResourcesFromCache(resources) { - for (const resource of resources) { - this.settingCache.delete(resource); - } - } - addResources(...resources) { - for (const resource of resources) { - resource.external = true; - if (this.resources.find((k) => this.equivalent(resource, k))) - continue; - this.resources.push(resource); - this.addResourceToCache(resource); - } - return () => this.removeResources(...resources); - } - equivalent(resource1, resource2) { - return resource1.name == resource2.name && resource1.tab == resource2.tab && resource1.text == resource2.text && resource1.desc == resource2.desc && resource1.external == resource2.external; - } - removeResources(...resources) { - const removing = []; - const keys = [...this.settingCache.keys()]; - for (const resource of resources) { - if (!resource || !resource.text || !resource.name || !resource.tab) { - continue; - } - resource.external = true; - this.resources = this.resources.filter((r) => !this.equivalent(resource, r)); - removing.push(...keys.filter((k) => k == resource || this.equivalent(resource, k))); - } - this.removeResourcesFromCache(removing); - } - removeTabResources(tab) { - const removing = this.resources.filter((t) => t.tab == tab); - this.resources = this.resources.filter((t) => t.tab != tab); - this.removeResourcesFromCache(removing); - } - async getTabResources(tab) { - await tab.display(); - const settings = tab.containerEl.querySelectorAll(".setting-item:not(.setting-item-header)"); - for (const el of Array.from(settings)) { - const text = el.querySelector(".setting-item-name")?.textContent; - if (!text) - continue; - const desc = el.querySelector(".setting-item-description")?.innerHTML ?? ""; - const resource = { - tab: tab.id, - name: tab.name, - text, - desc - }; - this.resources.push(resource); - this.addResourceToCache(resource); - } - if (this.app.setting.activeTab?.id == tab.id) - return; - tab.containerEl.detach(); - tab.hide(); - } - patchSettings() { - const self = this; - this.register(around(this.app.setting, { - onOpen: function(next) { - return function() { - next.apply(this); - if (!import_obsidian.Platform.isMobile) - self.search.inputEl.focus(); - return next; - }; - } - })); - this.register(around(this.app.setting, { - addSettingTab: function(next) { - return function(tab) { - self.getTabResources(tab); - return next.call(this, tab); - }; - } - })); - this.register(around(this.app.setting, { - removeSettingTab: function(next) { - return function(tab) { - if (this.isPluginSettingTab(tab)) { - self.removeTabResources(tab.id); - } - return next.call(this, tab); - }; - } - })); - this.register(around(this.app.setting, { - openTab: function(next) { - return function(tab) { - self.searchAppended = false; - self.app.keymap.popScope(self.scope); - return next.call(this, tab); - }; - }, - openTabById: function(next) { - return function(tab) { - self.searchAppended = false; - self.app.keymap.popScope(self.scope); - return next.call(this, tab); - }; - }, - onClose: function(next) { - return function() { - if (import_obsidian.Platform.isMobile) { - self.detach(); - } - return next.call(this); - }; - } - })); - } - buildSearch() { - const tempSetting = new import_obsidian.Setting(createDiv()).addSearch((s) => { - this.search = s; - }); - this.settingsNavItemContainer.append(tempSetting.controlEl); - tempSetting.settingEl.detach(); - this.search.onChange((v) => { - this.onChange(v); - }); - this.search.setPlaceholder("Search settings..."); - this.app.setting.tabHeadersEl.prepend(this.settingsSearchEl); - } - buildScope() { - this.scope.register(["Ctrl"], "N", () => { - if (this.activeSetting) { - this.activeSetting.settingEl.removeClass("active"); - } - this.activeIndex = ((this.activeIndex + 1) % this.results.length + this.results.length) % this.results.length; - this.centerActiveSetting(); - }); - this.scope.register([], "ArrowDown", () => { - if (this.activeSetting) { - this.activeSetting.settingEl.removeClass("active"); - } - this.activeIndex = ((this.activeIndex + 1) % this.results.length + this.results.length) % this.results.length; - this.centerActiveSetting(); - }); - this.scope.register(["Ctrl"], "P", () => { - if (this.activeSetting) { - this.activeSetting.settingEl.removeClass("active"); - } - this.activeIndex = ((this.activeIndex - 1) % this.results.length + this.results.length) % this.results.length; - this.centerActiveSetting(); - }); - this.scope.register([], "ArrowUp", () => { - if (this.activeSetting) { - this.activeSetting.settingEl.removeClass("active"); - } - this.activeIndex = ((this.activeIndex - 1) % this.results.length + this.results.length) % this.results.length; - this.centerActiveSetting(); - }); - this.scope.register([], "Enter", () => { - if (this.activeSetting) { - this.showResult(this.results[this.activeIndex]); - } - }); - } - centerActiveSetting() { - const result = this.results[this.activeIndex]; - this.activeSetting = this.getResourceFromCache(result); - this.activeSetting.settingEl.addClass("active"); - this.activeSetting.settingEl.scrollIntoView({ - behavior: "auto", - block: "nearest" - }); - } - detachFromMobile() { - if (import_obsidian.Platform.isMobile) { - this.settingsResultsContainerEl.detach(); - for (const header of this.mobileContainers) { - this.app.setting.tabHeadersEl.append(header); - } - this.search.setValue(""); - } - } - detachFromDesktop() { - if (import_obsidian.Platform.isDesktop) { - this.app.setting.openTabById(this.app.setting.lastTabId); - } - } - detach() { - this.detachFromDesktop(); - this.detachFromMobile(); - this.searchAppended = false; - } - onChange(v) { - if (!v) { - this.detach(); - this.app.keymap.popScope(this.scope); - return; - } - if (!this.searchAppended) { - this.activeIndex = -1; - this.app.keymap.popScope(this.scope); - this.app.keymap.pushScope(this.scope); - if (this.activeSetting) { - this.activeSetting.settingEl.removeClass("active"); - this.activeSetting = null; - } - if (!import_obsidian.Platform.isMobile) { - this.app.setting.activeTab.navEl.removeClass("is-active"); - this.app.setting.tabContentContainer.empty(); - this.app.setting.tabContentContainer.append(this.settingsResultsContainerEl); - } else { - const headers = this.app.setting.tabHeadersEl.querySelectorAll(".vertical-tab-header-group:not(.settings-search-container)"); - for (const header of Array.from(headers)) { - this.mobileContainers.push(header); - header.detach(); - } - this.app.setting.tabHeadersEl.append(this.settingsResultsContainerEl); - } - this.searchAppended = true; - } - this.appendResults(this.performFuzzySearch(v)); - } - getMatchText(text, result) { - const matchElements = {}; - return createFragment((content) => { - for (let i = 0; i < text.length; i++) { - let match = result.matches.find((m) => m[0] === i); - if (match) { - const index = result.matches.indexOf(match); - if (!matchElements[index]) { - matchElements[index] = createSpan("suggestion-highlight"); - } - let element = matchElements[index]; - content.appendChild(element); - element.appendText(text.substring(match[0], match[1])); - i += match[1] - match[0] - 1; - continue; - } - content.appendText(text[i]); - } - }); - } - appendResults(results) { - this.settingsResultsEl.empty(); - if (results.length) { - const headers = {}; - for (const resource of results) { - if (!(resource.tab in headers)) { - headers[resource.tab] = this.settingsResultsEl.createDiv(); - new import_obsidian.Setting(headers[resource.tab]).setHeading().setName(resource.name); - } - const setting = this.getResourceFromCache(resource); - headers[resource.tab].append(setting.settingEl); - } - } else { - this.settingsResultsEl.setText("No results found :("); - } - } - showResult(result) { - this.search.setValue(""); - const tab = this.app.setting.settingTabs.find((t) => t.id == result.tab) ?? this.app.setting.pluginTabs.find((t) => t.id == result.tab); - if (!tab) { - new import_obsidian.Notice("There was an issue opening the setting tab."); - return; - } - this.app.setting.openTabById(tab.id); - this.app.keymap.popScope(this.scope); - this.detach(); - try { - const names = tab.containerEl.querySelectorAll(".setting-item-name"); - const el = Array.from(names).find((n) => n.textContent == result.text); - if (!el) - return; - const setting = el.closest(".setting-item"); - if (!setting) - return; - if (tab.id == "obsidian-style-settings") { - let collapsed = setting.closest(".style-settings-container"); - let previous = collapsed?.previousElementSibling; - while (previous != null && previous.hasClass("is-collapsed") && previous.hasClass("style-settings-heading")) { - previous.removeClass("is-collapsed"); - collapsed = collapsed.parentElement?.closest(".style-settings-container"); - previous = collapsed?.previousElementSibling; - } - } - let details = setting.closest("details"); - while (details) { - details.setAttr("open", "open"); - details = details.parentElement?.closest("details"); - } - setting.scrollIntoView(true); - setting.addClass("is-flashing"); - window.setTimeout(() => setting.removeClass("is-flashing"), 3e3); - } catch (e) { - console.error(e); - } - } - performFuzzySearch(input) { - const results = [], hotkeys = []; - for (const resource of this.resources) { - let result = (0, import_obsidian.prepareSimpleSearch)(input)(resource.text) ?? (0, import_obsidian.prepareSimpleSearch)(input)(resource.desc); - if (result) { - if (resource.tab == "hotkeys") { - hotkeys.push(resource); - } else { - results.push(resource); - } - } - } - this.results = [...results, ...hotkeys]; - return this.results; - } - onunload() { - this.settingsSearchEl.detach(); - this.settingsResultsEl.detach(); - this.detach(); - if (this.searchAppended && import_obsidian.Platform.isDesktop) - this.app.setting.openTabById(this.app.setting.lastTabId); - } -}; diff --git a/ObsidianRnDVault/.obsidian/plugins/settings-search/manifest.json b/ObsidianRnDVault/.obsidian/plugins/settings-search/manifest.json index f475f06..1b21d43 100644 --- a/ObsidianRnDVault/.obsidian/plugins/settings-search/manifest.json +++ b/ObsidianRnDVault/.obsidian/plugins/settings-search/manifest.json @@ -1,7 +1,7 @@ { "id": "settings-search", "name": "Settings Search", - "version": "1.3.8", + "version": "1.3.9", "minAppVersion": "0.12.17", "author": "Jeremy Valentine", "description": "Globally search settings in Obsidian.md", diff --git a/ObsidianRnDVault/.obsidian/plugins/tag-wrangler/main.js b/ObsidianRnDVault/.obsidian/plugins/tag-wrangler/main.js deleted file mode 100644 index 64fce37..0000000 --- a/ObsidianRnDVault/.obsidian/plugins/tag-wrangler/main.js +++ /dev/null @@ -1,135 +0,0 @@ -var rt=Object.defineProperty;var gn=Object.getOwnPropertyDescriptor;var yn=Object.getOwnPropertyNames;var bn=Object.prototype.hasOwnProperty;var wn=(n,e,t)=>e in n?rt(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var vs=(n,e)=>{for(var t in e)rt(n,t,{get:e[t],enumerable:!0})},Sn=(n,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of yn(e))!bn.call(n,i)&&i!==t&&rt(n,i,{get:()=>e[i],enumerable:!(s=gn(e,i))||s.enumerable});return n};var kn=n=>Sn(rt({},"__esModule",{value:!0}),n);var ye=(n,e,t)=>(wn(n,typeof e!="symbol"?e+"":e,t),t);var hi={};vs(hi,{default:()=>Ut});module.exports=kn(hi);var M=require("obsidian");function ot(){let n,e,t=new Promise((s,i)=>{n=s,e=i});return{resolve:n,reject:e,promise:t}}function Es(n,e){let t=Object.keys(e).map(s=>vn(n,s,e[s]));return t.length===1?t[0]:function(){t.forEach(s=>s())}}function vn(n,e,t){let s=n[e],i=n.hasOwnProperty(e),r=t(s);return s&&Object.setPrototypeOf(r,s),Object.setPrototypeOf(o,r),n[e]=o,a;function o(...l){return r===s&&n[e]===o&&a(),r.apply(this,l)}function a(){n[e]===o&&(i?n[e]=s:delete n[e]),r!==s&&(r=s,Object.setPrototypeOf(o,s||Function))}}var at;(n=>Object.assign(n,require("obsidian")))(at||(at={}));var le=class extends at.Modal{constructor(){super(app);this.buttonContainerEl=this.modalEl.createDiv("modal-button-container");this.textContentEl=this.contentEl.createDiv("dialog-text");this.okButton=this.buttonContainerEl.createEl("button",{cls:"mod-cta",text:i18next.t("dialogue.button-continue")},t=>{t.addEventListener("click",async s=>{var i;await((i=this.onOK)==null?void 0:i.call(this,s))||this.close()})});this.containerEl.addClass("mod-confirmation"),this.containerEl.addClass("ophidian-dialog")}onOK(t){return!1}setOk(t){this.okButton.textContent=t}addButton(t,s,i,r){return this.buttonContainerEl.createEl("button",{cls:t,text:s},r).addEventListener("click",async o=>{await i(o)||this.close()}),this}addCancelButton(t){return this.addButton("",i18next.t("dialogue.button-cancel"),()=>(this.close(),t&&t()))}setContent(t){return String.isString(t)?this.textContentEl.setText(t):this.textContentEl.appendChild(t),this}setTitle(t){return this.titleEl.setText(t),this}setup(t){return t&&t(this),this}};var lt=class extends le{constructor(){super(...arguments);this.value=!1}onOK(t){this.value=!0}confirm(){this.addCancelButton();let{resolve:t,promise:s}=ot();return this.onClose=()=>t(this.value),this.open(),s}};var ct=class extends le{constructor(){super(...arguments);this.value=!1;this.setting=this.contentEl.createDiv("is-mobile");this.inputEl=this.setting.createEl("input",{type:"text"},t=>{t.addEventListener("keypress",async s=>{var i;s.key==="Enter"&&!s.isComposing&&(await((i=this.onOK)==null?void 0:i.call(this,s))||this.close())})})}onOK(t){let{value:s}=this.inputEl;if(!this.isValid(s))return this.handleInvalidEntry(s),!0;this.value=this.inputEl.value}isValid(t){return!0}handleInvalidEntry(t){}setPlaceholder(t){return t?this.inputEl.placeholder=t:this.inputEl.removeAttribute("placeholder"),this}setValue(t){return this.inputEl.value=t,this}setPattern(t){return this.inputEl.pattern=t,this.setValidator(s=>new RegExp(`^${t}$`).test(s))}setValidator(t){return this.isValid=t,this.inputEl.oninput=()=>this.inputEl.setAttribute("aria-invalid",""+!t(this.inputEl.value)),this}onInvalidEntry(t){return this.handleInvalidEntry=t,this}prompt(){this.addCancelButton();let{resolve:t,promise:s}=ot();return this.onClose=()=>t(this.value),this.open(),this.inputEl.select(),this.inputEl.focus(),s}};var Ht=class extends le{constructor(t){super();ye(this,"progressEl",this.contentEl.createEl("progress",{value:0,attr:{style:"width: 100%",max:100}}));ye(this,"counterEl",this.contentEl.createDiv({text:"0%"}));this.okButton.detach(),this.addCancelButton(),this.onClose=t}setProgress(t){this.counterEl.textContent=`${t}%`,this.progressEl.value=t}},Le=class{constructor(e,t){ye(this,"aborted",!1);this.progress=new Ht(()=>this.aborted=!0).setTitle(e).setContent(t),this.progress.open()}async forEach(e,t){try{if(this.aborted)return;let s=0,i=e.length,r=0,o=0;for(let a of e){if(await t(a,s++,e,this),this.aborted)return;if(r+=100,r>i){let l=r%i,c=(r-l)/i;this.progress.setProgress(o+=c),r=l}}return o<100&&this.progress.setProgress(100),this}finally{this.progress.onClose=()=>null,this.progress.close()}}set title(e){this.progress.setTitle(e)}set message(e){this.progress.setContent(e)}};var ge=require("obsidian");var En=/^#[^\u2000-\u206F\u2E00-\u2E7F'!"#$%&()*+,.:;<=>?@^`{|}~\[\]\\\s]+$/,I=class{constructor(e){let t=this.tag=I.toTag(e),s=this.canonical=t.toLowerCase(),i=this.canonical_prefix=s+"/";this.name=t.slice(1),this.matches=function(r){return r=r.toLowerCase(),r==s||r.startsWith(i)}}toString(){return this.tag}static isTag(e){return En.test(e)}static toTag(e){for(;e.startsWith("##");)e=e.slice(1);return e.startsWith("#")?e:"#"+e}static canonical(e){return I.toTag(e).toLowerCase()}},ft=class{constructor(e,t){let s=Object.assign(Object.create(null),{[e.tag]:t.tag,[e.name]:t.name});this.inString=function(i,r=0){return i.slice(0,r)+t.tag+i.slice(r+e.tag.length)},this.inArray=(i,r,o)=>i.map((a,l)=>{if(r&&l&1||!a||typeof a!="string")return a;if(o){if(!a.startsWith("#")||!I.isTag(a))return a}else if(/[ ,\n]/.test(a))return this.inArray(a.split(/([, \n]+)/),!0).join("");if(s[a])return s[a];let c=a.toLowerCase();return s[c]?s[a]=s[c]:c.startsWith(e.canonical_prefix)?s[a]=s[c]=this.inString(a):("#"+c).startsWith(e.canonical_prefix)?s[a]=s[c]=this.inString("#"+a).slice(1):s[a]=s[c]=a}),this.willMergeTags=function(i){if(e.canonical===t.canonical)return;let r=new Set(i.map(o=>o.toLowerCase()));for(let o of i.filter(e.matches)){let a=this.inString(o);if(r.has(a.toLowerCase()))return[new I(o),new I(a)]}}}};var Ss=require("obsidian");var ut=Symbol.for("yaml.alias"),ht=Symbol.for("yaml.document"),q=Symbol.for("yaml.map"),Jt=Symbol.for("yaml.pair"),R=Symbol.for("yaml.scalar"),se=Symbol.for("yaml.seq"),_=Symbol.for("yaml.node.type"),V=n=>!!n&&typeof n=="object"&&n[_]===ut,ke=n=>!!n&&typeof n=="object"&&n[_]===ht,D=n=>!!n&&typeof n=="object"&&n[_]===q,N=n=>!!n&&typeof n=="object"&&n[_]===Jt,E=n=>!!n&&typeof n=="object"&&n[_]===R,U=n=>!!n&&typeof n=="object"&&n[_]===se;function O(n){if(n&&typeof n=="object")switch(n[_]){case q:case se:return!0}return!1}function T(n){if(n&&typeof n=="object")switch(n[_]){case ut:case q:case R:case se:return!0}return!1}var Ns=n=>(E(n)||O(n))&&!!n.anchor,ce=class{constructor(e){Object.defineProperty(this,_,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}};var be=Symbol("break visit"),Nn=Symbol("skip children"),Pe=Symbol("remove node");function W(n,e){typeof e=="object"&&(e.Collection||e.Node||e.Value)&&(e=Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e)),ke(n)?ve(null,n.contents,e,Object.freeze([n]))===Pe&&(n.contents=null):ve(null,n,e,Object.freeze([]))}W.BREAK=be;W.SKIP=Nn;W.REMOVE=Pe;function ve(n,e,t,s){let i;if(typeof t=="function"?i=t(n,e,s):D(e)?t.Map&&(i=t.Map(n,e,s)):U(e)?t.Seq&&(i=t.Seq(n,e,s)):N(e)?t.Pair&&(i=t.Pair(n,e,s)):E(e)?t.Scalar&&(i=t.Scalar(n,e,s)):V(e)&&t.Alias&&(i=t.Alias(n,e,s)),T(i)||N(i)){let r=s[s.length-1];if(O(r))r.items[n]=i;else if(N(r))n==="key"?r.key=i:r.value=i;else if(ke(r))r.contents=i;else{let o=V(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${o} parent`)}return ve(n,i,t,s)}if(typeof i!="symbol"){if(O(e)){s=Object.freeze(s.concat(e));for(let r=0;rn.replace(/[!,[\]{}]/g,e=>Cn[e]),L=class{constructor(e,t){this.marker=null,this.yaml=Object.assign({},L.defaultYaml,e),this.tags=Object.assign({},L.defaultTags,t)}clone(){let e=new L(this.yaml,this.tags);return e.marker=this.marker,e}atDocument(){let e=new L(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:L.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},L.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:L.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},L.defaultTags),this.atNextDocument=!1);let s=e.trim().split(/[ \t]+/),i=s.shift();switch(i){case"%TAG":{if(s.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),s.length<2))return!1;let[r,o]=s;return this.tags[r]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,s.length<1)return t(0,"%YAML directive should contain exactly one part"),!1;let[r]=s;return r==="1.1"||r==="1.2"?(this.yaml.version=r,!0):(t(6,`Unsupported YAML version ${r}`,!0),!1)}default:return t(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let o=e.slice(2,-1);return o==="!"||o==="!!"?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&t("Verbatim tags must end with a >"),o)}let[,s,i]=e.match(/^(.*!)([^!]*)$/);i||t(`The ${e} tag has no suffix`);let r=this.tags[s];return r?r+decodeURIComponent(i):s==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,s]of Object.entries(this.tags))if(e.startsWith(s))return t+Tn(e.substring(s.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],s=Object.entries(this.tags),i;if(e&&s.length>0&&T(e.contents)){let r={};W(e.contents,(o,a)=>{T(a)&&a.tag&&(r[a.tag]=!0)}),i=Object.keys(r)}else i=[];for(let[r,o]of s)r==="!!"&&o==="tag:yaml.org,2002:"||(!e||i.some(a=>a.startsWith(o)))&&t.push(`%TAG ${r} ${o}`);return t.join(` -`)}};L.defaultYaml={explicit:!1,version:"1.2"};L.defaultTags={"!!":"tag:yaml.org,2002:"};function pt(n){if(/[\x00-\x19\s,[\]{}]/.test(n)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(n)}`;throw new Error(t)}return!0}function Yt(n){let e=new Set;return W(n,{Value(t,s){s.anchor&&e.add(s.anchor)}}),e}function Qt(n,e){for(let t=1;;++t){let s=`${n}${t}`;if(!e.has(s))return s}}function Cs(n,e){let t=[],s=new Map,i=null;return{onAnchor(r){t.push(r),i||(i=Yt(n));let o=Qt(e,i);return i.add(o),o},setAnchors(){for(let r of t){let o=s.get(r);if(typeof o=="object"&&o.anchor&&(E(o.node)||O(o.node)))o.node.anchor=o.anchor;else{let a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=r,a}}},sourceObjects:s}}var ne=class extends ce{constructor(e){super(ut),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let t;return W(e,{Node:(s,i)=>{if(i===this)return W.BREAK;i.anchor===this.source&&(t=i)}}),t}toJSON(e,t){if(!t)return{source:this.source};let{anchors:s,doc:i,maxAliasCount:r}=t,o=this.resolve(i);if(!o){let l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let a=s.get(o);if(!a||a.res===void 0){let l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(r>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=dt(i,o,s)),a.count*a.aliasCount>r)){let l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return a.res}toString(e,t,s){let i=`*${this.source}`;if(e){if(pt(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let r=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(r)}if(e.implicitKey)return`${i} `}return i}};function dt(n,e,t){if(V(e)){let s=e.resolve(n),i=t&&s&&t.get(s);return i?i.count*i.aliasCount:0}else if(O(e)){let s=0;for(let i of e.items){let r=dt(n,i,t);r>s&&(s=r)}return s}else if(N(e)){let s=dt(n,e.key,t),i=dt(n,e.value,t);return Math.max(s,i)}return 1}function x(n,e,t){if(Array.isArray(n))return n.map((s,i)=>x(s,String(i),t));if(n&&typeof n.toJSON=="function"){if(!t||!Ns(n))return n.toJSON(e,t);let s={aliasCount:0,count:1,res:void 0};t.anchors.set(n,s),t.onCreate=r=>{s.res=r,delete t.onCreate};let i=n.toJSON(e,t);return t.onCreate&&t.onCreate(i),i}return typeof n=="bigint"&&!(t&&t.keep)?Number(n):n}var mt=n=>!n||typeof n!="function"&&typeof n!="object",S=class extends ce{constructor(e){super(R),this.value=e}toJSON(e,t){return t&&t.keep?this.value:x(this.value,e,t)}toString(){return String(this.value)}};S.BLOCK_FOLDED="BLOCK_FOLDED";S.BLOCK_LITERAL="BLOCK_LITERAL";S.PLAIN="PLAIN";S.QUOTE_DOUBLE="QUOTE_DOUBLE";S.QUOTE_SINGLE="QUOTE_SINGLE";var On="tag:yaml.org,2002:";function An(n,e,t){if(e){let s=t.filter(r=>r.tag===e),i=s.find(r=>!r.format)||s[0];if(!i)throw new Error(`Tag ${e} not found`);return i}return t.find(s=>s.identify&&s.identify(n)&&!s.format)}function ie(n,e,t){var s,i;if(ke(n)&&(n=n.contents),T(n))return n;if(N(n)){let p=(i=(s=t.schema[q]).createNode)===null||i===void 0?void 0:i.call(s,t.schema,null,t);return p.items.push(n),p}(n instanceof String||n instanceof Number||n instanceof Boolean||typeof BigInt=="function"&&n instanceof BigInt)&&(n=n.valueOf());let{aliasDuplicateObjects:r,onAnchor:o,onTagObj:a,schema:l,sourceObjects:c}=t,f;if(r&&n&&typeof n=="object"){if(f=c.get(n),f)return f.anchor||(f.anchor=o(n)),new ne(f.anchor);f={anchor:null,node:null},c.set(n,f)}e&&e.startsWith("!!")&&(e=On+e.slice(2));let h=An(n,e,l.tags);if(!h){if(n&&typeof n.toJSON=="function"&&(n=n.toJSON()),!n||typeof n!="object"){let p=new S(n);return f&&(f.node=p),p}h=n instanceof Map?l[q]:Symbol.iterator in Object(n)?l[se]:l[q]}a&&(a(h),delete t.onTagObj);let u=h!=null&&h.createNode?h.createNode(t.schema,n,t):new S(n);return e&&(u.tag=e),f&&(f.node=u),u}function Me(n,e,t){let s=t;for(let i=e.length-1;i>=0;--i){let r=e[i];if(typeof r=="number"&&Number.isInteger(r)&&r>=0){let o=[];o[r]=s,s=o}else s=new Map([[r,s]])}return ie(s,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:n,sourceObjects:new Map})}var Ee=n=>n==null||typeof n=="object"&&!!n[Symbol.iterator]().next().done,re=class extends ce{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(s=>T(s)||N(s)?s.clone(e):s),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(Ee(e))this.add(t);else{let[s,...i]=e,r=this.get(s,!0);if(O(r))r.addIn(i,t);else if(r===void 0&&this.schema)this.set(s,Me(this.schema,i,t));else throw new Error(`Expected YAML collection at ${s}. Remaining path: ${i}`)}}deleteIn(e){let[t,...s]=e;if(s.length===0)return this.delete(t);let i=this.get(t,!0);if(O(i))return i.deleteIn(s);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${s}`)}getIn(e,t){let[s,...i]=e,r=this.get(s,!0);return i.length===0?!t&&E(r)?r.value:r:O(r)?r.getIn(i,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!N(t))return!1;let s=t.value;return s==null||e&&E(s)&&s.value==null&&!s.commentBefore&&!s.comment&&!s.tag})}hasIn(e){let[t,...s]=e;if(s.length===0)return this.has(t);let i=this.get(t,!0);return O(i)?i.hasIn(s):!1}setIn(e,t){let[s,...i]=e;if(i.length===0)this.set(s,t);else{let r=this.get(s,!0);if(O(r))r.setIn(i,t);else if(r===void 0&&this.schema)this.set(s,Me(this.schema,i,t));else throw new Error(`Expected YAML collection at ${s}. Remaining path: ${i}`)}}};re.maxFlowStringSingleLineLength=60;var Ts=n=>n.replace(/^(?!$)(?: $)?/gm,"#");function z(n,e){return/^\n+$/.test(n)?n.substring(1):e?n.replace(/^(?! *$)/gm,e):n}var H=(n,e,t)=>t.includes(` -`)?` -`+z(t,e):(n.endsWith(" ")?"":" ")+t;var Gt="flow",gt="block",$e="quoted";function xe(n,e,t="flow",{indentAtStart:s,lineWidth:i=80,minContentWidth:r=20,onFold:o,onOverflow:a}={}){if(!i||i<0)return n;let l=Math.max(1+r,1+i-e.length);if(n.length<=l)return n;let c=[],f={},h=i-e.length;typeof s=="number"&&(s>i-Math.max(2,r)?c.push(0):h=i-s);let u,p,y=!1,d=-1,m=-1,g=-1;t===gt&&(d=Os(n,d),d!==-1&&(h=d+l));for(let v;v=n[d+=1];){if(t===$e&&v==="\\"){switch(m=d,n[d+1]){case"x":d+=3;break;case"u":d+=5;break;case"U":d+=9;break;default:d+=1}g=d}if(v===` -`)t===gt&&(d=Os(n,d)),h=d+l,u=void 0;else{if(v===" "&&p&&p!==" "&&p!==` -`&&p!==" "){let b=n[d+1];b&&b!==" "&&b!==` -`&&b!==" "&&(u=d)}if(d>=h)if(u)c.push(u),h=u+l,u=void 0;else if(t===$e){for(;p===" "||p===" ";)p=v,v=n[d+=1],y=!0;let b=d>g+1?d-2:m-1;if(f[b])return n;c.push(b),f[b]=!0,h=b+l,u=void 0}else y=!0}p=v}if(y&&a&&a(),c.length===0)return n;o&&o();let w=n.slice(0,c[0]);for(let v=0;v({indentAtStart:n.indentAtStart,lineWidth:n.options.lineWidth,minContentWidth:n.options.minContentWidth}),wt=n=>/^(%|---|\.\.\.)/m.test(n);function In(n,e,t){if(!e||e<0)return!1;let s=e-t,i=n.length;if(i<=s)return!1;for(let r=0,o=0;rs)return!0;if(o=r+1,i-o<=s)return!1}return!0}function _e(n,e){let t=JSON.stringify(n);if(e.options.doubleQuotedAsJSON)return t;let{implicitKey:s}=e,i=e.options.doubleQuotedMinMultiLineLength,r=e.indent||(wt(n)?" ":""),o="",a=0;for(let l=0,c=t[l];c;c=t[++l])if(c===" "&&t[l+1]==="\\"&&t[l+2]==="n"&&(o+=t.slice(a,l)+"\\ ",l+=1,a=l,c="\\"),c==="\\")switch(t[l+1]){case"u":{o+=t.slice(a,l);let f=t.substr(l+2,4);switch(f){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:f.substr(0,2)==="00"?o+="\\x"+f.substr(2):o+=t.substr(l,6)}l+=5,a=l+1}break;case"n":if(s||t[l+2]==='"'||t.length -`;let h,u;for(u=t.length;u>0;--u){let C=t[u-1];if(C!==` -`&&C!==" "&&C!==" ")break}let p=t.substring(u),y=p.indexOf(` -`);y===-1?h="-":t===p||y!==p.length-1?(h="+",r&&r()):h="",p&&(t=t.slice(0,-p.length),p[p.length-1]===` -`&&(p=p.slice(0,-1)),p=p.replace(/\n+(?!\n|$)/g,`$&${c}`));let d=!1,m,g=-1;for(m=0;m")+(d?c?"2":"1":"")+h;if(n&&(b+=" "+a(n.replace(/ ?[\r\n]+/g," ")),i&&i()),f)return t=t.replace(/\n+/g,`$&${c}`),`${b} -${c}${w}${t}${p}`;t=t.replace(/\n+/g,` -$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`);let k=xe(`${w}${t}${p}`,c,gt,bt(s));return`${b} -${c}${k}`}function Ln(n,e,t,s){let{type:i,value:r}=n,{actualString:o,implicitKey:a,indent:l,inFlow:c}=e;if(a&&/[\n[\]{},]/.test(r)||c&&/[[\]{},]/.test(r))return Be(r,e);if(!r||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(r))return a||c||r.indexOf(` -`)===-1?Be(r,e):yt(n,e,t,s);if(!a&&!c&&i!==S.PLAIN&&r.indexOf(` -`)!==-1)return yt(n,e,t,s);if(l===""&&wt(r))return e.forceBlockIndent=!0,yt(n,e,t,s);let f=r.replace(/\n+/g,`$& -${l}`);if(o){let h=y=>{var d;return y.default&&y.tag!=="tag:yaml.org,2002:str"&&((d=y.test)===null||d===void 0?void 0:d.test(f))},{compat:u,tags:p}=e.doc.schema;if(p.some(h)||u!=null&&u.some(h))return Be(r,e)}return a?f:xe(f,l,Gt,bt(e))}function oe(n,e,t,s){let{implicitKey:i,inFlow:r}=e,o=typeof n.value=="string"?n:Object.assign({},n,{value:String(n.value)}),{type:a}=n;a!==S.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(a=S.QUOTE_DOUBLE);let l=f=>{switch(f){case S.BLOCK_FOLDED:case S.BLOCK_LITERAL:return i||r?Be(o.value,e):yt(o,e,t,s);case S.QUOTE_DOUBLE:return _e(o.value,e);case S.QUOTE_SINGLE:return zt(o.value,e);case S.PLAIN:return Ln(o,e,t,s);default:return null}},c=l(a);if(c===null){let{defaultKeyType:f,defaultStringType:h}=e.options,u=i&&f||h;if(c=l(u),c===null)throw new Error(`Unsupported default string type ${u}`)}return c}function St(n,e){let t=Object.assign({blockQuote:!0,commentString:Ts,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},n.schema.toStringOptions,e),s;switch(t.collectionStyle){case"block":s=!1;break;case"flow":s=!0;break;default:s=null}return{anchors:new Set,doc:n,indent:"",indentStep:typeof t.indent=="number"?" ".repeat(t.indent):" ",inFlow:s,options:t}}function Pn(n,e){if(e.tag){let i=n.filter(r=>r.tag===e.tag);if(i.length>0)return i.find(r=>r.format===e.format)||i[0]}let t,s;if(E(e)){s=e.value;let i=n.filter(r=>r.identify&&r.identify(s));t=i.find(r=>r.format===e.format)||i.find(r=>!r.format)}else s=e,t=n.find(i=>i.nodeClass&&s instanceof i.nodeClass);if(!t){let i=s&&s.constructor?s.constructor.name:typeof s;throw new Error(`Tag not resolved for ${i} value`)}return t}function Mn(n,e,{anchors:t,doc:s}){if(!s.directives)return"";let i=[],r=(E(n)||O(n))&&n.anchor;r&&pt(r)&&(t.add(r),i.push(`&${r}`));let o=n.tag||(e.default?null:e.tag);return o&&i.push(s.directives.tagString(o)),i.join(" ")}function J(n,e,t,s){var i;if(N(n))return n.toString(e,t,s);if(V(n)){if(e.doc.directives)return n.toString(e);if(!((i=e.resolvedAliases)===null||i===void 0)&&i.has(n))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(n):e.resolvedAliases=new Set([n]),n=n.resolve(e.doc)}let r,o=T(n)?n:e.doc.createNode(n,{onTagObj:c=>r=c});r||(r=Pn(e.doc.schema.tags,o));let a=Mn(o,r,e);a.length>0&&(e.indentAtStart=(e.indentAtStart||0)+a.length+1);let l=typeof r.stringify=="function"?r.stringify(o,e,t,s):E(o)?oe(o,e,t,s):o.toString(e,t,s);return a?E(o)||l[0]==="{"||l[0]==="["?`${a} ${l}`:`${a} -${e.indent}${l}`:l}function As({key:n,value:e},t,s,i){let{allNullValues:r,doc:o,indent:a,indentStep:l,options:{commentString:c,indentSeq:f,simpleKeys:h}}=t,u=T(n)&&n.comment||null;if(h){if(u)throw new Error("With simple keys, key nodes cannot have comments");if(O(n)){let C="With simple keys, collection cannot be used as a key value";throw new Error(C)}}let p=!h&&(!n||u&&e==null&&!t.inFlow||O(n)||(E(n)?n.type===S.BLOCK_FOLDED||n.type===S.BLOCK_LITERAL:typeof n=="object"));t=Object.assign({},t,{allNullValues:!1,implicitKey:!p&&(h||!r),indent:a+l});let y=!1,d=!1,m=J(n,t,()=>y=!0,()=>d=!0);if(!p&&!t.inFlow&&m.length>1024){if(h)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");p=!0}if(t.inFlow){if(r||e==null)return y&&s&&s(),p?`? ${m}`:m}else if(r&&!h||e==null&&p)return m=`? ${m}`,u&&!y?m+=H(m,t.indent,c(u)):d&&i&&i(),m;y&&(u=null),p?(u&&(m+=H(m,t.indent,c(u))),m=`? ${m} -${a}:`):(m=`${m}:`,u&&(m+=H(m,t.indent,c(u))));let g="",w=null;if(T(e)){if(e.spaceBefore&&(g=` -`),e.commentBefore){let C=c(e.commentBefore);g+=` -${z(C,t.indent)}`}w=e.comment}else e&&typeof e=="object"&&(e=o.createNode(e));t.implicitKey=!1,!p&&!u&&E(e)&&(t.indentAtStart=m.length+1),d=!1,!f&&l.length>=2&&!t.inFlow&&!p&&U(e)&&!e.flow&&!e.tag&&!e.anchor&&(t.indent=t.indent.substr(2));let v=!1,b=J(e,t,()=>v=!0,()=>d=!0),k=" ";return g||u?k=b===""&&!t.inFlow?g:`${g} -${t.indent}`:!p&&O(e)?(!(b[0]==="["||b[0]==="{")||b.includes(` -`))&&(k=` -${t.indent}`):(b===""||b[0]===` -`)&&(k=""),m+=k+b,t.inFlow?v&&s&&s():w&&!v?m+=H(m,t.indent,c(w)):d&&i&&i(),m}function Xt(n,e){(n==="debug"||n==="warn")&&(typeof process!="undefined"&&process.emitWarning?process.emitWarning(e):console.warn(e))}var Is="<<";function kt(n,e,{key:t,value:s}){if(n&&n.doc.schema.merge&&$n(t))if(s=V(s)?s.resolve(n.doc):s,U(s))for(let i of s.items)Zt(n,e,i);else if(Array.isArray(s))for(let i of s)Zt(n,e,i);else Zt(n,e,s);else{let i=x(t,"",n);if(e instanceof Map)e.set(i,x(s,i,n));else if(e instanceof Set)e.add(i);else{let r=xn(t,i,n),o=x(s,r,n);r in e?Object.defineProperty(e,r,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[r]=o}}return e}var $n=n=>n===Is||E(n)&&n.value===Is&&(!n.type||n.type===S.PLAIN);function Zt(n,e,t){let s=n&&V(t)?t.resolve(n.doc):t;if(!D(s))throw new Error("Merge sources must be maps or map aliases");let i=s.toJSON(null,n,Map);for(let[r,o]of i)e instanceof Map?e.has(r)||e.set(r,o):e instanceof Set?e.add(r):Object.prototype.hasOwnProperty.call(e,r)||Object.defineProperty(e,r,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}function xn(n,e,t){if(e===null)return"";if(typeof e!="object")return String(e);if(T(n)&&t&&t.doc){let s=St(t.doc,{});s.anchors=new Set;for(let r of t.anchors.keys())s.anchors.add(r.anchor);s.inFlow=!0,s.inStringifyKey=!0;let i=n.toString(s);if(!t.mapKeyWarned){let r=JSON.stringify(i);r.length>40&&(r=r.substring(0,36)+'..."'),Xt(t.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${r}. Set mapAsMap: true to use object keys.`),t.mapKeyWarned=!0}return i}return JSON.stringify(e)}function Ne(n,e,t){let s=ie(n,void 0,t),i=ie(e,void 0,t);return new A(s,i)}var A=class{constructor(e,t=null){Object.defineProperty(this,_,{value:Jt}),this.key=e,this.value=t}clone(e){let{key:t,value:s}=this;return T(t)&&(t=t.clone(e)),T(s)&&(s=s.clone(e)),new A(t,s)}toJSON(e,t){let s=t&&t.mapAsMap?new Map:{};return kt(t,s,this)}toString(e,t,s){return e&&e.doc?As(this,e,t,s):JSON.stringify(this)}};var Fe={intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,uniqueKeys:!0,version:"1.2"};function Et(n,e,t){var s;return(((s=e.inFlow)!==null&&s!==void 0?s:n.flow)?Bn:_n)(n,e,t)}function _n({comment:n,items:e},t,{blockItemPrefix:s,flowChars:i,itemIndent:r,onChompKeep:o,onComment:a}){let{indent:l,options:{commentString:c}}=t,f=Object.assign({},t,{indent:r,type:null}),h=!1,u=[];for(let y=0;ym=null,()=>h=!0);m&&(g+=H(g,r,c(m))),h&&m&&(h=!1),u.push(s+g)}let p;if(u.length===0)p=i.start+i.end;else{p=u[0];for(let y=1;yw=null);mh||v.includes(` -`))&&(f=!0),u.push(v),h=u.length}let p,{start:y,end:d}=s;if(u.length===0)p=y+d;else if(f||(f=u.reduce((g,w)=>g+w.length+2,2)>re.maxFlowStringSingleLineLength),f){p=y;for(let m of u)p+=m?` -${a}${o}${m}`:` -`;p+=` -${o}${d}`}else p=`${y} ${u.join(" ")} ${d}`;return n&&(p+=H(p,l(n),o),r&&r()),p}function vt({indent:n,options:{commentString:e}},t,s,i){if(s&&i&&(s=s.replace(/^\n+/,"")),s){let r=z(e(s),n);t.push(r.trimStart())}}function fe(n,e){let t=E(e)?e.value:e;for(let s of n)if(N(s)&&(s.key===e||s.key===t||E(s.key)&&s.key.value===t))return s}var P=class extends re{constructor(e){super(q,e),this.items=[]}static get tagName(){return"tag:yaml.org,2002:map"}add(e,t){let s;N(e)?s=e:!e||typeof e!="object"||!("key"in e)?s=new A(e,e.value):s=new A(e.key,e.value);let i=fe(this.items,s.key),r=this.schema&&this.schema.sortMapEntries;if(i){if(!t)throw new Error(`Key ${s.key} already set`);E(i.value)&&mt(s.value)?i.value.value=s.value:i.value=s.value}else if(r){let o=this.items.findIndex(a=>r(s,a)<0);o===-1?this.items.push(s):this.items.splice(o,0,s)}else this.items.push(s)}delete(e){let t=fe(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let s=fe(this.items,e),i=s&&s.value;return!t&&E(i)?i.value:i}has(e){return!!fe(this.items,e)}set(e,t){this.add(new A(e,t),!0)}toJSON(e,t,s){let i=s?new s:t&&t.mapAsMap?new Map:{};t&&t.onCreate&&t.onCreate(i);for(let r of this.items)kt(t,i,r);return i}toString(e,t,s){if(!e)return JSON.stringify(this);for(let i of this.items)if(!N(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Et(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:s,onComment:t})}};function Fn(n,e,t){let{keepUndefined:s,replacer:i}=t,r=new P(n),o=(a,l)=>{if(typeof i=="function")l=i.call(e,a,l);else if(Array.isArray(i)&&!i.includes(a))return;(l!==void 0||s)&&r.items.push(Ne(a,l,t))};if(e instanceof Map)for(let[a,l]of e)o(a,l);else if(e&&typeof e=="object")for(let a of Object.keys(e))o(a,e[a]);return typeof n.sortMapEntries=="function"&&r.items.sort(n.sortMapEntries),r}var Y={collection:"map",createNode:Fn,default:!0,nodeClass:P,tag:"tag:yaml.org,2002:map",resolve(n,e){return D(n)||e("Expected a mapping for this tag"),n}};var B=class extends re{constructor(e){super(se,e),this.items=[]}static get tagName(){return"tag:yaml.org,2002:seq"}add(e){this.items.push(e)}delete(e){let t=Nt(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){let s=Nt(e);if(typeof s!="number")return;let i=this.items[s];return!t&&E(i)?i.value:i}has(e){let t=Nt(e);return typeof t=="number"&&t=0?e:null}function Dn(n,e,t){let{replacer:s}=t,i=new B(n);if(e&&Symbol.iterator in Object(e)){let r=0;for(let o of e){if(typeof s=="function"){let a=e instanceof Set?o:String(r++);o=s.call(e,a,o)}i.items.push(ie(o,void 0,t))}}return i}var Q={collection:"seq",createNode:Dn,default:!0,nodeClass:B,tag:"tag:yaml.org,2002:seq",resolve(n,e){return U(n)||e("Expected a sequence for this tag"),n}};var ue={identify:n=>typeof n=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:n=>n,stringify(n,e,t,s){return e=Object.assign({actualString:!0},e),oe(n,e,t,s)}};var we={identify:n=>n==null,createNode:()=>new S(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new S(null),stringify:({source:n},e)=>n&&we.test.test(n)?n:e.options.nullStr};var De={identify:n=>typeof n=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:n=>new S(n[0]==="t"||n[0]==="T"),stringify({source:n,value:e},t){if(n&&De.test.test(n)){let s=n[0]==="t"||n[0]==="T";if(e===s)return n}return e?t.options.trueStr:t.options.falseStr}};function $({format:n,minFractionDigits:e,tag:t,value:s}){if(typeof s=="bigint")return String(s);let i=typeof s=="number"?s:Number(s);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let r=JSON.stringify(s);if(!n&&e&&(!t||t==="tag:yaml.org,2002:float")&&/^\d/.test(r)){let o=r.indexOf(".");o<0&&(o=r.length,r+=".");let a=e-(r.length-o-1);for(;a-- >0;)r+="0"}return r}var Ct={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN))$/,resolve:n=>n.slice(-3).toLowerCase()==="nan"?NaN:n[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:$},Tt={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:n=>parseFloat(n),stringify(n){let e=Number(n.value);return isFinite(e)?e.toExponential():$(n)}},Ot={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(n){let e=new S(parseFloat(n)),t=n.indexOf(".");return t!==-1&&n[n.length-1]==="0"&&(e.minFractionDigits=n.length-t-1),e},stringify:$};var At=n=>typeof n=="bigint"||Number.isInteger(n),es=(n,e,t,{intAsBigInt:s})=>s?BigInt(n):parseInt(n.substring(e),t);function Ls(n,e,t){let{value:s}=n;return At(s)&&s>=0?t+s.toString(e):$(n)}var It={identify:n=>At(n)&&n>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(n,e,t)=>es(n,2,8,t),stringify:n=>Ls(n,8,"0o")},Lt={identify:At,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(n,e,t)=>es(n,0,10,t),stringify:$},Pt={identify:n=>At(n)&&n>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(n,e,t)=>es(n,2,16,t),stringify:n=>Ls(n,16,"0x")};var Ps=[Y,Q,ue,we,De,It,Lt,Pt,Ct,Tt,Ot];function Ms(n){return typeof n=="bigint"||Number.isInteger(n)}var Mt=({value:n})=>JSON.stringify(n),Rn=[{identify:n=>typeof n=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:n=>n,stringify:Mt},{identify:n=>n==null,createNode:()=>new S(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Mt},{identify:n=>typeof n=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:n=>n==="true",stringify:Mt},{identify:Ms,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(n,e,{intAsBigInt:t})=>t?BigInt(n):parseInt(n,10),stringify:({value:n})=>Ms(n)?n.toString():JSON.stringify(n)},{identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:n=>parseFloat(n),stringify:Mt}],jn={default:!0,tag:"",test:/^/,resolve(n,e){return e(`Unresolved plain scalar ${JSON.stringify(n)}`),n}},$s=[Y,Q].concat(Rn,jn);var Re={identify:n=>n instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(n,e){if(typeof Buffer=="function")return Buffer.from(n,"base64");if(typeof atob=="function"){let t=atob(n.replace(/[\n\r]/g,"")),s=new Uint8Array(t.length);for(let i=0;i1&&e("Each pair must have its own sequence indicator");let i=s.items[0]||new A(new S(null));if(s.commentBefore&&(i.key.commentBefore=i.key.commentBefore?`${s.commentBefore} -${i.key.commentBefore}`:s.commentBefore),s.comment){let r=i.value||i.key;r.comment=r.comment?`${s.comment} -${r.comment}`:s.comment}s=i}n.items[t]=N(s)?s:new A(s)}}else e("Expected a sequence for this tag");return n}function ss(n,e,t){let{replacer:s}=t,i=new B(n);i.tag="tag:yaml.org,2002:pairs";let r=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof s=="function"&&(o=s.call(e,String(r++),o));let a,l;if(Array.isArray(o))if(o.length===2)a=o[0],l=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){let c=Object.keys(o);if(c.length===1)a=c[0],l=o[a];else throw new TypeError(`Expected { key: value } tuple: ${o}`)}else a=o;i.items.push(Ne(a,l,t))}return i}var je={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:ts,createNode:ss};var he=class extends B{constructor(){super(),this.add=P.prototype.add.bind(this),this.delete=P.prototype.delete.bind(this),this.get=P.prototype.get.bind(this),this.has=P.prototype.has.bind(this),this.set=P.prototype.set.bind(this),this.tag=he.tag}toJSON(e,t){if(!t)return super.toJSON(e);let s=new Map;t&&t.onCreate&&t.onCreate(s);for(let i of this.items){let r,o;if(N(i)?(r=x(i.key,"",t),o=x(i.value,r,t)):r=x(i,"",t),s.has(r))throw new Error("Ordered maps must not include duplicate keys");s.set(r,o)}return s}};he.tag="tag:yaml.org,2002:omap";var Ke={collection:"seq",identify:n=>n instanceof Map,nodeClass:he,default:!1,tag:"tag:yaml.org,2002:omap",resolve(n,e){let t=ts(n,e),s=[];for(let{key:i}of t.items)E(i)&&(s.includes(i.value)?e(`Ordered maps must not include duplicate keys: ${i.value}`):s.push(i.value));return Object.assign(new he,t)},createNode(n,e,t){let s=ss(n,e,t),i=new he;return i.items=s.items,i}};function xs({value:n,source:e},t){return e&&(n?ns:is).test.test(e)?e:n?t.options.trueStr:t.options.falseStr}var ns={identify:n=>n===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new S(!0),stringify:xs},is={identify:n=>n===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>new S(!1),stringify:xs};var _s={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN)$/,resolve:n=>n.slice(-3).toLowerCase()==="nan"?NaN:n[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:$},Bs={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:n=>parseFloat(n.replace(/_/g,"")),stringify(n){let e=Number(n.value);return isFinite(e)?e.toExponential():$(n)}},Fs={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(n){let e=new S(parseFloat(n.replace(/_/g,""))),t=n.indexOf(".");if(t!==-1){let s=n.substring(t+1).replace(/_/g,"");s[s.length-1]==="0"&&(e.minFractionDigits=s.length)}return e},stringify:$};var qe=n=>typeof n=="bigint"||Number.isInteger(n);function $t(n,e,t,{intAsBigInt:s}){let i=n[0];if((i==="-"||i==="+")&&(e+=1),n=n.substring(e).replace(/_/g,""),s){switch(t){case 2:n=`0b${n}`;break;case 8:n=`0o${n}`;break;case 16:n=`0x${n}`;break}let o=BigInt(n);return i==="-"?BigInt(-1)*o:o}let r=parseInt(n,t);return i==="-"?-1*r:r}function rs(n,e,t){let{value:s}=n;if(qe(s)){let i=s.toString(e);return s<0?"-"+t+i.substr(1):t+i}return $(n)}var Ds={identify:qe,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(n,e,t)=>$t(n,2,2,t),stringify:n=>rs(n,2,"0b")},Rs={identify:qe,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(n,e,t)=>$t(n,1,8,t),stringify:n=>rs(n,8,"0")},js={identify:qe,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(n,e,t)=>$t(n,0,10,t),stringify:$},Ks={identify:qe,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(n,e,t)=>$t(n,2,16,t),stringify:n=>rs(n,16,"0x")};var pe=class extends P{constructor(e){super(e),this.tag=pe.tag}add(e){let t;N(e)?t=e:typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new A(e.key,null):t=new A(e,null),fe(this.items,t.key)||this.items.push(t)}get(e,t){let s=fe(this.items,e);return!t&&N(s)?E(s.key)?s.key.value:s.key:s}set(e,t){if(typeof t!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let s=fe(this.items,e);s&&!t?this.items.splice(this.items.indexOf(s),1):!s&&t&&this.items.push(new A(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,s){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,s);throw new Error("Set items must all have null values")}};pe.tag="tag:yaml.org,2002:set";var Ve={collection:"map",identify:n=>n instanceof Set,nodeClass:pe,default:!1,tag:"tag:yaml.org,2002:set",resolve(n,e){if(D(n)){if(n.hasAllNullValues(!0))return Object.assign(new pe,n);e("Set items must all have null values")}else e("Expected a mapping for this tag");return n},createNode(n,e,t){let{replacer:s}=t,i=new pe(n);if(e&&Symbol.iterator in Object(e))for(let r of e)typeof s=="function"&&(r=s.call(e,r,r)),i.items.push(Ne(r,null,t));return i}};function os(n,e){let t=n[0],s=t==="-"||t==="+"?n.substring(1):n,i=o=>e?BigInt(o):Number(o),r=s.replace(/_/g,"").split(":").reduce((o,a)=>o*i(60)+i(a),i(0));return t==="-"?i(-1)*r:r}function qs(n){let{value:e}=n,t=o=>o;if(typeof e=="bigint")t=o=>BigInt(o);else if(isNaN(e)||!isFinite(e))return $(n);let s="";e<0&&(s="-",e*=t(-1));let i=t(60),r=[e%i];return e<60?r.unshift(0):(e=(e-r[0])/i,r.unshift(e%i),e>=60&&(e=(e-r[0])/i,r.unshift(e))),s+r.map(o=>o<10?"0"+String(o):String(o)).join(":").replace(/000000\d*$/,"")}var xt={identify:n=>typeof n=="bigint"||Number.isInteger(n),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(n,e,{intAsBigInt:t})=>os(n,t),stringify:qs},_t={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:n=>os(n,!1),stringify:qs},Ce={identify:n=>n instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(n){let e=n.match(Ce.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,t,s,i,r,o,a]=e.map(Number),l=e[7]?Number((e[7]+"00").substr(1,3)):0,c=Date.UTC(t,s-1,i,r||0,o||0,a||0,l),f=e[8];if(f&&f!=="Z"){let h=os(f,!1);Math.abs(h)<30&&(h*=60),c-=6e4*h}return new Date(c)},stringify:({value:n})=>n.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};var as=[Y,Q,ue,we,ns,is,Ds,Rs,js,Ks,_s,Bs,Fs,Re,Ke,je,Ve,xt,_t,Ce];var Vs=new Map([["core",Ps],["failsafe",[Y,Q,ue]],["json",$s],["yaml11",as],["yaml-1.1",as]]),Us={binary:Re,bool:De,float:Ot,floatExp:Tt,floatNaN:Ct,floatTime:_t,int:Lt,intHex:Pt,intOct:It,intTime:xt,map:Y,null:we,omap:Ke,pairs:je,seq:Q,set:Ve,timestamp:Ce},Ws={"tag:yaml.org,2002:binary":Re,"tag:yaml.org,2002:omap":Ke,"tag:yaml.org,2002:pairs":je,"tag:yaml.org,2002:set":Ve,"tag:yaml.org,2002:timestamp":Ce};function Bt(n,e){let t=Vs.get(e);if(!t)if(Array.isArray(n))t=[];else{let s=Array.from(Vs.keys()).filter(i=>i!=="yaml11").map(i=>JSON.stringify(i)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${s} or define customTags array`)}if(Array.isArray(n))for(let s of n)t=t.concat(s);else typeof n=="function"&&(t=n(t.slice()));return t.map(s=>{if(typeof s!="string")return s;let i=Us[s];if(i)return i;let r=Object.keys(Us).map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown custom tag "${s}"; use one of ${r}`)})}var Kn=(n,e)=>n.keye.key?1:0,Se=class{constructor({compat:e,customTags:t,merge:s,resolveKnownTags:i,schema:r,sortMapEntries:o,toStringDefaults:a}){this.compat=Array.isArray(e)?Bt(e,"compat"):e?Bt(null,e):null,this.merge=!!s,this.name=typeof r=="string"&&r||"core",this.knownTags=i?Ws:{},this.tags=Bt(t,this.name),this.toStringOptions=a||null,Object.defineProperty(this,q,{value:Y}),Object.defineProperty(this,R,{value:ue}),Object.defineProperty(this,se,{value:Q}),this.sortMapEntries=o===!0?Kn:o||null}clone(){let e=Object.create(Se.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};function Hs(n,e){let t=[],s=e.directives===!0;if(e.directives!==!1&&n.directives){let c=n.directives.toString(n);c?(t.push(c),s=!0):n.directives.marker&&(s=!0)}s&&t.push("---");let i=St(n,e),{commentString:r}=i.options;if(n.commentBefore){t.length!==1&&t.unshift("");let c=r(n.commentBefore);t.unshift(z(c,""))}let o=!1,a=null;if(n.contents){if(T(n.contents)){if(n.contents.spaceBefore&&s&&t.push(""),n.contents.commentBefore){let h=r(n.contents.commentBefore);t.push(z(h,""))}i.forceBlockIndent=!!n.comment,a=n.contents.comment}let c=a?void 0:()=>o=!0,f=J(n.contents,i,()=>a=null,c);a&&(f+=H(f,"",r(a))),(f[0]==="|"||f[0]===">")&&t[t.length-1]==="---"?t[t.length-1]=`--- ${f}`:t.push(f)}else t.push(J(n.contents,i));let l=n.comment;return l&&o&&(l=l.replace(/^\n+/,"")),l&&((!o||a)&&t[t.length-1]!==""&&t.push(""),t.push(z(r(l),""))),t.join(` -`)+` -`}function Te(n,e,t,s){if(s&&typeof s=="object")if(Array.isArray(s))for(let i=0,r=s.length;itypeof w=="number"||w instanceof String||w instanceof Number,g=t.filter(m).map(String);g.length>0&&(t=t.concat(g)),i=t}else s===void 0&&t&&(s=t,t=void 0);let{aliasDuplicateObjects:r,anchorPrefix:o,flow:a,keepUndefined:l,onTagObj:c,tag:f}=s||{},{onAnchor:h,setAnchors:u,sourceObjects:p}=Cs(this,o||"a"),y={aliasDuplicateObjects:r!=null?r:!0,keepUndefined:l!=null?l:!1,onAnchor:h,onTagObj:c,replacer:i,schema:this.schema,sourceObjects:p},d=ie(e,f,y);return a&&O(d)&&(d.flow=!0),u(),d}createPair(e,t,s={}){let i=this.createNode(e,null,s),r=this.createNode(t,null,s);return new A(i,r)}delete(e){return Oe(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Ee(e)?this.contents==null?!1:(this.contents=null,!0):Oe(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return O(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return Ee(e)?!t&&E(this.contents)?this.contents.value:this.contents:O(this.contents)?this.contents.getIn(e,t):void 0}has(e){return O(this.contents)?this.contents.has(e):!1}hasIn(e){return Ee(e)?this.contents!==void 0:O(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=Me(this.schema,[e],t):Oe(this.contents)&&this.contents.set(e,t)}setIn(e,t){Ee(e)?this.contents=t:this.contents==null?this.contents=Me(this.schema,Array.from(e),t):Oe(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e=="number"&&(e=String(e));let s;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new L({version:"1.1"}),s={merge:!0,resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":this.directives?this.directives.yaml.version="1.2":this.directives=new L({version:"1.2"}),s={merge:!1,resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,s=null;break;default:{let i=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(s)this.schema=new Se(Object.assign(s,t));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:s,maxAliasCount:i,onAnchor:r,reviver:o}={}){let a={anchors:new Map,doc:this,keep:!e,mapAsMap:s===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100,stringify:J},l=x(this.contents,t||"",a);if(typeof r=="function")for(let{count:c,res:f}of a.anchors.values())r(f,c);return typeof o=="function"?Te(o,{"":l},"",l):l}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return Hs(this,e)}};function Oe(n){if(O(n))return!0;throw new Error("Expected a YAML collection as document contents")}var Ue=class extends Error{constructor(e,t,s,i){super(),this.name=e,this.code=s,this.message=i,this.pos=t}},j=class extends Ue{constructor(e,t,s){super("YAMLParseError",e,t,s)}},We=class extends Ue{constructor(e,t,s){super("YAMLWarning",e,t,s)}},ls=(n,e)=>t=>{if(t.pos[0]===-1)return;t.linePos=t.pos.map(a=>e.linePos(a));let{line:s,col:i}=t.linePos[0];t.message+=` at line ${s}, column ${i}`;let r=i-1,o=n.substring(e.lineStarts[s-1],e.lineStarts[s]).replace(/[\n\r]+$/,"");if(r>=60&&o.length>80){let a=Math.min(r-39,o.length-79);o="\u2026"+o.substring(a),r-=a-1}if(o.length>80&&(o=o.substring(0,79)+"\u2026"),s>1&&/^ *$/.test(o.substring(0,r))){let a=n.substring(e.lineStarts[s-2],e.lineStarts[s-1]);a.length>80&&(a=a.substring(0,79)+`\u2026 -`),o=a+o}if(/[^ ]/.test(o)){let a=1,l=t.linePos[1];l&&l.line===s&&l.col>i&&(a=Math.min(l.col-i,80-r));let c=" ".repeat(r)+"^".repeat(a);t.message+=`: - -${o} -${c} -`}};function Z(n,{flow:e,indicator:t,next:s,offset:i,onError:r,startOnNewline:o}){let a=!1,l=o,c=o,f="",h="",u=!1,p=!1,y=null,d=null,m=null,g=null,w=null;for(let k of n)switch(p&&(k.type!=="space"&&k.type!=="newline"&&k.type!=="comma"&&r(k.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),p=!1),k.type){case"space":!e&&l&&t!=="doc-start"&&k.source[0]===" "&&r(k,"TAB_AS_INDENT","Tabs are not allowed as indentation"),c=!0;break;case"comment":{c||r(k,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let C=k.source.substring(1)||" ";f?f+=h+C:f=C,h="",l=!1;break}case"newline":l?f?f+=k.source:a=!0:h+=k.source,l=!0,u=!0,c=!0;break;case"anchor":y&&r(k,"MULTIPLE_ANCHORS","A node can have at most one anchor"),y=k,w===null&&(w=k.offset),l=!1,c=!1,p=!0;break;case"tag":{d&&r(k,"MULTIPLE_TAGS","A node can have at most one tag"),d=k,w===null&&(w=k.offset),l=!1,c=!1,p=!0;break}case t:(y||d)&&r(k,"BAD_PROP_ORDER",`Anchors and tags must be after the ${k.source} indicator`),g&&r(k,"UNEXPECTED_TOKEN",`Unexpected ${k.source} in ${e||"collection"}`),g=k,l=!1,c=!1;break;case"comma":if(e){m&&r(k,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),m=k,l=!1,c=!1;break}default:r(k,"UNEXPECTED_TOKEN",`Unexpected ${k.type} token`),l=!1,c=!1}let v=n[n.length-1],b=v?v.offset+v.source.length:i;return p&&s&&s.type!=="space"&&s.type!=="newline"&&s.type!=="comma"&&(s.type!=="scalar"||s.source!=="")&&r(s.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),{comma:m,found:g,spaceBefore:a,comment:f,hasNewline:u,anchor:y,tag:d,end:b,start:w!=null?w:b}}function de(n){if(!n)return null;switch(n.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(n.source.includes(` -`))return!0;if(n.end){for(let e of n.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of n.items){for(let t of e.start)if(t.type==="newline")return!0;if(e.sep){for(let t of e.sep)if(t.type==="newline")return!0}if(de(e.key)||de(e.value))return!0}return!1;default:return!0}}function He(n,e,t){if((e==null?void 0:e.type)==="flow-collection"){let s=e.end[0];s.indent===n&&(s.source==="]"||s.source==="}")&&de(e)&&t(s,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function Ft(n,e,t){let{uniqueKeys:s}=n.options;if(s===!1)return!1;let i=typeof s=="function"?s:(r,o)=>r===o||E(r)&&E(o)&&r.value===o.value&&!(r.value==="<<"&&n.schema.merge);return e.some(r=>i(r.key,t))}var Js="All mapping items must start at the same column";function Ys({composeNode:n,composeEmptyNode:e},t,s,i){var r;let o=new P(t.schema);t.atRoot&&(t.atRoot=!1);let a=s.offset;for(let l of s.items){let{start:c,key:f,sep:h,value:u}=l,p=Z(c,{indicator:"explicit-key-ind",next:f||(h==null?void 0:h[0]),offset:a,onError:i,startOnNewline:!0}),y=!p.found;if(y){if(f&&(f.type==="block-seq"?i(a,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in f&&f.indent!==s.indent&&i(a,"BAD_INDENT",Js)),!p.anchor&&!p.tag&&!h){p.comment&&(o.comment?o.comment+=` -`+p.comment:o.comment=p.comment);continue}}else((r=p.found)===null||r===void 0?void 0:r.indent)!==s.indent&&i(a,"BAD_INDENT",Js);y&&de(f)&&i(f,"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line");let d=p.end,m=f?n(t,f,p,i):e(t,d,c,null,p,i);t.schema.compat&&He(s.indent,f,i),Ft(t,o.items,m)&&i(d,"DUPLICATE_KEY","Map keys must be unique");let g=Z(h||[],{indicator:"map-value-ind",next:u,offset:m.range[2],onError:i,startOnNewline:!f||f.type==="block-scalar"});if(a=g.end,g.found){y&&((u==null?void 0:u.type)==="block-map"&&!g.hasNewline&&i(a,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),t.options.strict&&p.startn&&(n.type==="block-map"||n.type==="block-seq");function Gs({composeNode:n,composeEmptyNode:e},t,s,i){let r=s.start.source==="{",o=r?"flow map":"flow sequence",a=r?new P(t.schema):new B(t.schema);a.flow=!0;let l=t.atRoot;l&&(t.atRoot=!1);let c=s.offset+s.start.source.length;for(let y=0;y0){let y=ee(u,p,t.options.strict,i);y.comment&&(a.comment?a.comment+=` -`+y.comment:a.comment=y.comment),a.range=[s.offset,p,y.offset]}else a.range=[s.offset,p,p];return a}function zs(n,e,t,s,i){let r;switch(t.type){case"block-map":{r=Ys(n,e,t,i);break}case"block-seq":{r=Qs(n,e,t,i);break}case"flow-collection":{r=Gs(n,e,t,i);break}}if(!s)return r;let o=e.directives.tagName(s.source,u=>i(s,"TAG_RESOLVE_FAILED",u));if(!o)return r;let a=r.constructor;if(o==="!"||o===a.tagName)return r.tag=a.tagName,r;let l=D(r)?"map":"seq",c=e.schema.tags.find(u=>u.collection===l&&u.tag===o);if(!c){let u=e.schema.knownTags[o];if(u&&u.collection===l)e.schema.tags.push(Object.assign({},u,{default:!1})),c=u;else return i(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),r.tag=o,r}let f=c.resolve(r,u=>i(s,"TAG_RESOLVE_FAILED",u),e.options),h=T(f)?f:new S(f);return h.range=r.range,h.tag=o,c!=null&&c.format&&(h.format=c.format),h}function Dt(n,e,t){let s=n.offset,i=qn(n,e,t);if(!i)return{value:"",type:null,comment:"",range:[s,s,s]};let r=i.mode===">"?S.BLOCK_FOLDED:S.BLOCK_LITERAL,o=n.source?Vn(n.source):[],a=o.length;for(let d=o.length-1;d>=0;--d){let m=o[d][1];if(m===""||m==="\r")a=d;else break}if(!n.source||a===0){let d=i.chomp==="+"?` -`.repeat(Math.max(0,o.length-1)):"",m=s+i.length;return n.source&&(m+=n.source.length),{value:d,type:r,comment:i.comment,range:[s,m,m]}}let l=n.indent+i.indent,c=n.offset+i.length,f=0;for(let d=0;dl&&(l=m.length);else{if(m.lengthl||g[0]===" "?(u===" "?u=` -`:!p&&u===` -`&&(u=` - -`),h+=u+m.slice(l)+g,u=` -`,p=!0):g===""?u===` -`?h+=` -`:u=` -`:(h+=u+g,u=" ",p=!1)}switch(i.chomp){case"-":break;case"+":for(let d=a;dt(s+u,p,y);switch(i){case"scalar":a=S.PLAIN,l=Un(r,c);break;case"single-quoted-scalar":a=S.QUOTE_SINGLE,l=Wn(r,c);break;case"double-quoted-scalar":a=S.QUOTE_DOUBLE,l=Hn(r,c);break;default:return t(n,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[s,s+r.length,s+r.length]}}let f=s+r.length,h=ee(o,f,e,t);return{value:l,type:a,comment:h.comment,range:[s,f,h.offset]}}function Un(n,e){let t="";switch(n[0]){case" ":t="a tab character";break;case",":t="flow indicator character ,";break;case"%":t="directive indicator character %";break;case"|":case">":{t=`block scalar indicator ${n[0]}`;break}case"@":case"`":{t=`reserved character ${n[0]}`;break}}return t&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${t}`),Xs(n)}function Wn(n,e){return(n[n.length-1]!=="'"||n.length===1)&&e(n.length,"MISSING_CHAR","Missing closing 'quote"),Xs(n.slice(1,-1)).replace(/''/g,"'")}function Xs(n){let e,t;try{e=new RegExp(`(.*?)(?r?n.slice(r,s+1):i)}else t+=i}return(n[n.length-1]!=='"'||n.length===1)&&e(n.length,"MISSING_CHAR",'Missing closing "quote'),t}function Jn(n,e){let t="",s=n[e+1];for(;(s===" "||s===" "||s===` -`||s==="\r")&&!(s==="\r"&&n[e+2]!==` -`);)s===` -`&&(t+=` -`),e+=1,s=n[e+1];return t||(t=" "),{fold:t,offset:e}}var Yn={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:` -`,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function Qn(n,e,t,s){let i=n.substr(e,t),o=i.length===t&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(o)){let a=n.substr(e-2,t+2);return s(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}return String.fromCodePoint(o)}function us(n,e,t,s){let{value:i,type:r,comment:o,range:a}=e.type==="block-scalar"?Dt(e,n.options.strict,s):Rt(e,n.options.strict,s),l=t?n.directives.tagName(t.source,h=>s(t,"TAG_RESOLVE_FAILED",h)):null,c=t&&l?Gn(n.schema,i,l,t,s):e.type==="scalar"?zn(n,i,e,s):n.schema[R],f;try{let h=c.resolve(i,u=>s(t||e,"TAG_RESOLVE_FAILED",u),n.options);f=E(h)?h:new S(h)}catch(h){let u=h instanceof Error?h.message:String(h);s(t||e,"TAG_RESOLVE_FAILED",u),f=new S(i)}return f.range=a,f.source=i,r&&(f.type=r),l&&(f.tag=l),c.format&&(f.format=c.format),o&&(f.comment=o),f}function Gn(n,e,t,s,i){var r;if(t==="!")return n[R];let o=[];for(let l of n.tags)if(!l.collection&&l.tag===t)if(l.default&&l.test)o.push(l);else return l;for(let l of o)if(!((r=l.test)===null||r===void 0)&&r.test(e))return l;let a=n.knownTags[t];return a&&!a.collection?(n.tags.push(Object.assign({},a,{default:!1,test:void 0})),a):(i(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${t}`,t!=="tag:yaml.org,2002:str"),n[R])}function zn({directives:n,schema:e},t,s,i){let r=e.tags.find(o=>{var a;return o.default&&((a=o.test)===null||a===void 0?void 0:a.test(t))})||e[R];if(e.compat){let o=e.compat.find(a=>{var l;return a.default&&((l=a.test)===null||l===void 0?void 0:l.test(t))})||e[R];if(r.tag!==o.tag){let a=n.tagString(r.tag),l=n.tagString(o.tag),c=`Value may be parsed as either ${a} or ${l}`;i(s,"TAG_RESOLVE_FAILED",c,!0)}}return r}function Zs(n,e,t){if(e){t===null&&(t=e.length);for(let s=t-1;s>=0;--s){let i=e[s];switch(i.type){case"space":case"comment":case"newline":n-=i.source.length;continue}for(i=e[++s];(i==null?void 0:i.type)==="space";)n+=i.source.length,i=e[++s];break}}return n}var Xn={composeNode:hs,composeEmptyNode:ps};function hs(n,e,t,s){let{spaceBefore:i,comment:r,anchor:o,tag:a}=t,l;switch(e.type){case"alias":l=Zn(n,e,s),(o||a)&&s(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":l=us(n,e,a,s),o&&(l.anchor=o.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":l=zs(Xn,n,e,a,s),o&&(l.anchor=o.source.substring(1));break;default:throw console.log(e),new Error(`Unsupporten token type: ${e.type}`)}return o&&l.anchor===""&&s(o,"BAD_ALIAS","Anchor cannot be an empty string"),i&&(l.spaceBefore=!0),r&&(e.type==="scalar"&&e.source===""?l.comment=r:l.commentBefore=r),n.options.keepSourceTokens&&(l.srcToken=e),l}function ps(n,e,t,s,{spaceBefore:i,comment:r,anchor:o,tag:a},l){let c={type:"scalar",offset:Zs(e,t,s),indent:-1,source:""},f=us(n,c,a,l);return o&&(f.anchor=o.source.substring(1),f.anchor===""&&l(o,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(f.spaceBefore=!0),r&&(f.comment=r),f}function Zn({options:n},{offset:e,source:t,end:s},i){let r=new ne(t.substring(1));r.source===""&&i(e,"BAD_ALIAS","Alias cannot be an empty string");let o=e+t.length,a=ee(s,o,n.strict,i);return r.range=[e,o,a.offset],a.comment&&(r.comment=a.comment),r}function en(n,e,{offset:t,start:s,value:i,end:r},o){let a=Object.assign({directives:e},n),l=new X(void 0,a),c={atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},f=Z(s,{indicator:"doc-start",next:i||(r==null?void 0:r[0]),offset:t,onError:o,startOnNewline:!0});f.found&&(l.directives.marker=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!f.hasNewline&&o(f.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=i?hs(c,i,f,o):ps(c,f.end,s,null,f,o);let h=l.contents.range[2],u=ee(r,h,!1,o);return u.comment&&(l.comment=u.comment),l.range=[t,h,u.offset],l}function Je(n){if(typeof n=="number")return[n,n+1];if(Array.isArray(n))return n.length===2?n:[n[0],n[1]];let{offset:e,source:t}=n;return[e,e+(typeof t=="string"?t.length:1)]}function tn(n){var e;let t="",s=!1,i=!1;for(let r=0;r{let o=Je(t);r?this.warnings.push(new We(o,s,i)):this.errors.push(new j(o,s,i))},this.directives=new L({version:e.version||Fe.version}),this.options=e}decorate(e,t){let{comment:s,afterEmptyLine:i}=tn(this.prelude);if(s){let r=e.contents;if(t)e.comment=e.comment?`${e.comment} -${s}`:s;else if(i||e.directives.marker||!r)e.commentBefore=s;else if(O(r)&&!r.flow&&r.items.length>0){let o=r.items[0];N(o)&&(o=o.key);let a=o.commentBefore;o.commentBefore=a?`${s} -${a}`:s}else{let o=r.commentBefore;r.commentBefore=o?`${s} -${o}`:s}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:tn(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,s=-1){for(let i of e)yield*this.next(i);yield*this.end(t,s)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(t,s,i)=>{let r=Je(e);r[0]+=t,this.onError(r,"BAD_DIRECTIVE",s,i)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let t=en(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.marker&&this.onError(e,"MISSING_CHAR","Missing directives-end indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,s=new j(Je(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(s):this.doc.errors.push(s);break}case"doc-end":{if(!this.doc){let s="Unexpected doc-end without preceding document";this.errors.push(new j(Je(e),"UNEXPECTED_TOKEN",s));break}let t=ee(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let s=this.doc.comment;this.doc.comment=s?`${s} -${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new j(Je(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let s=Object.assign({directives:this.directives},this.options),i=new X(void 0,s);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),i.range=[0,t,t],this.decorate(i,!1),yield i}}};var Xe={};vs(Xe,{BOM:()=>Qe,DOCUMENT:()=>Ge,FLOW_END:()=>ze,SCALAR:()=>Ae,createScalarToken:()=>nn,isCollection:()=>si,isScalar:()=>ni,prettyToken:()=>ii,resolveAsScalar:()=>sn,setScalarValue:()=>rn,stringify:()=>an,tokenType:()=>gs,visit:()=>me});function sn(n,e=!0,t){if(n){let s=(i,r,o)=>{let a=typeof i=="number"?i:Array.isArray(i)?i[0]:i.offset;if(t)t(a,r,o);else throw new j([a,a+1],r,o)};switch(n.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return Rt(n,e,s);case"block-scalar":return Dt(n,e,s)}}return null}function nn(n,e){var t;let{implicitKey:s=!1,indent:i,inFlow:r=!1,offset:o=-1,type:a="PLAIN"}=e,l=oe({type:a,value:n},{implicitKey:s,indent:i>0?" ".repeat(i):"",inFlow:r,options:{blockQuote:!0,lineWidth:-1}}),c=(t=e.end)!==null&&t!==void 0?t:[{type:"newline",offset:-1,indent:i,source:` -`}];switch(l[0]){case"|":case">":{let f=l.indexOf(` -`),h=l.substring(0,f),u=l.substring(f+1)+` -`,p=[{type:"block-scalar-header",offset:o,indent:i,source:h}];return on(p,c)||p.push({type:"newline",offset:-1,indent:i,source:` -`}),{type:"block-scalar",offset:o,indent:i,props:p,source:u}}case'"':return{type:"double-quoted-scalar",offset:o,indent:i,source:l,end:c};case"'":return{type:"single-quoted-scalar",offset:o,indent:i,source:l,end:c};default:return{type:"scalar",offset:o,indent:i,source:l,end:c}}}function rn(n,e,t={}){let{afterKey:s=!1,implicitKey:i=!1,inFlow:r=!1,type:o}=t,a="indent"in n?n.indent:null;if(s&&typeof a=="number"&&(a+=2),!o)switch(n.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{let c=n.props[0];if(c.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o=c.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}let l=oe({type:o,value:e},{implicitKey:i||a===null,indent:a!==null&&a>0?" ".repeat(a):"",inFlow:r,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":ei(n,l);break;case'"':ds(n,l,"double-quoted-scalar");break;case"'":ds(n,l,"single-quoted-scalar");break;default:ds(n,l,"scalar")}}function ei(n,e){let t=e.indexOf(` -`),s=e.substring(0,t),i=e.substring(t+1)+` -`;if(n.type==="block-scalar"){let r=n.props[0];if(r.type!=="block-scalar-header")throw new Error("Invalid block scalar header");r.source=s,n.source=i}else{let{offset:r}=n,o="indent"in n?n.indent:-1,a=[{type:"block-scalar-header",offset:r,indent:o,source:s}];on(a,"end"in n?n.end:void 0)||a.push({type:"newline",offset:-1,indent:o,source:` -`});for(let l of Object.keys(n))l!=="type"&&l!=="offset"&&delete n[l];Object.assign(n,{type:"block-scalar",indent:o,props:a,source:i})}}function on(n,e){if(e)for(let t of e)switch(t.type){case"space":case"comment":n.push(t);break;case"newline":return n.push(t),!0}return!1}function ds(n,e,t){switch(n.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":n.type=t,n.source=e;break;case"block-scalar":{let s=n.props.slice(1),i=e.length;n.props[0].type==="block-scalar-header"&&(i-=n.props[0].source.length);for(let r of s)r.offset+=i;delete n.props,Object.assign(n,{type:t,source:e,end:s});break}case"block-map":case"block-seq":{let i={type:"newline",offset:n.offset+e.length,indent:n.indent,source:` -`};delete n.items,Object.assign(n,{type:t,source:e,end:[i]});break}default:{let s="indent"in n?n.indent:-1,i="end"in n&&Array.isArray(n.end)?n.end.filter(r=>r.type==="space"||r.type==="comment"||r.type==="newline"):[];for(let r of Object.keys(n))r!=="type"&&r!=="offset"&&delete n[r];Object.assign(n,{type:t,indent:s,source:e,end:i})}}}var an=n=>"type"in n?Kt(n):jt(n);function Kt(n){switch(n.type){case"block-scalar":{let e="";for(let t of n.props)e+=Kt(t);return e+n.source}case"block-map":case"block-seq":{let e="";for(let t of n.items)e+=jt(t);return e}case"flow-collection":{let e=n.start.source;for(let t of n.items)e+=jt(t);for(let t of n.end)e+=t.source;return e}case"document":{let e=jt(n);if(n.end)for(let t of n.end)e+=t.source;return e}default:{let e=n.source;if("end"in n&&n.end)for(let t of n.end)e+=t.source;return e}}}function jt({start:n,key:e,sep:t,value:s}){let i="";for(let r of n)i+=r.source;if(e&&(i+=Kt(e)),t)for(let r of t)i+=r.source;return s&&(i+=Kt(s)),i}var ms=Symbol("break visit"),ti=Symbol("skip children"),ln=Symbol("remove item");function me(n,e){"type"in n&&n.type==="document"&&(n={start:n.start,value:n.value}),cn(Object.freeze([]),n,e)}me.BREAK=ms;me.SKIP=ti;me.REMOVE=ln;me.itemAtPath=(n,e)=>{let t=n;for(let[s,i]of e){let r=t&&t[s];if(r&&"items"in r)t=r.items[i];else return}return t};me.parentCollection=(n,e)=>{let t=me.itemAtPath(n,e.slice(0,-1)),s=e[e.length-1][0],i=t&&t[s];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function cn(n,e,t){let s=t(e,n);if(typeof s=="symbol")return s;for(let i of["key","value"]){let r=e[i];if(r&&"items"in r){for(let o=0;o!!n&&"items"in n,ni=n=>!!n&&(n.type==="scalar"||n.type==="single-quoted-scalar"||n.type==="double-quoted-scalar"||n.type==="block-scalar");function ii(n){switch(n){case Qe:return"";case Ge:return"";case ze:return"";case Ae:return"";default:return JSON.stringify(n)}}function gs(n){switch(n){case Qe:return"byte-order-mark";case Ge:return"doc-mode";case ze:return"flow-error-end";case Ae:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case` -`:case`\r -`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(n[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function K(n){switch(n){case void 0:case" ":case` -`:case"\r":case" ":return!0;default:return!1}}var fn="0123456789ABCDEFabcdef".split(""),ri="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()".split(""),un=",[]{}".split(""),oi=` ,[]{} -\r `.split(""),ys=n=>!n||oi.includes(n),Ze=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){e&&(this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null),this.atEnd=!t;let s=this.next||"stream";for(;s&&(t||this.hasChars(1));)s=yield*this.parseNext(s)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===" "||t===" ";)t=this.buffer[++e];return!t||t==="#"||t===` -`?!0:t==="\r"?this.buffer[e+1]===` -`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let s=0;for(;t===" ";)t=this.buffer[++s+e];if(t==="\r"){let i=this.buffer[s+e+1];if(i===` -`||!i&&!this.atEnd)return e+s+1}return t===` -`||s>=this.indentNext||!t&&!this.atEnd?e+s:-1}if(t==="-"||t==="."){let s=this.buffer.substr(e,3);if((s==="---"||s==="...")&&K(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&ethis.indentValue&&!K(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&K(t)){let s=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=s,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(ys),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,s=-1;do e=yield*this.pushNewline(),t=yield*this.pushSpaces(!0),e>0&&(this.indentValue=s=t);while(e+t>0);let i=this.getLine();if(i===null)return this.setNext("flow");if((s!==-1&&s"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil(t=>K(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,s;e:for(let i=this.pos;s=this.buffer[i];++i)switch(s){case" ":t+=1;break;case` -`:e=i,t=0;break;case"\r":{let r=this.buffer[i+1];if(!r&&!this.atEnd)return this.setNext("block-scalar");if(r===` -`)break}default:break e}if(!s&&!this.atEnd)return this.setNext("block-scalar");if(t>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=t:this.indentNext+=this.blockScalarIndent;do{let i=this.continueScalar(e+1);if(i===-1)break;e=this.buffer.indexOf(` -`,i)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}if(!this.blockScalarKeep)do{let i=e-1,r=this.buffer[i];for(r==="\r"&&(r=this.buffer[--i]);r===" "||r===" ";)r=this.buffer[--i];if(r===` -`&&i>=this.pos)e=i;else break}while(!0);return yield Ae,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,s=this.pos-1,i;for(;i=this.buffer[++s];)if(i===":"){let r=this.buffer[s+1];if(K(r)||e&&r===",")break;t=s}else if(K(i)){let r=this.buffer[s+1];if(i==="\r"&&(r===` -`?(s+=1,i=` -`,r=this.buffer[s+1]):t=s),r==="#"||e&&un.includes(r))break;if(i===` -`){let o=this.continueScalar(s+1);if(o===-1)break;s=Math.max(s,o-2)}}else{if(e&&un.includes(i))break;t=s}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield Ae,yield*this.pushToIndex(t+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let s=this.buffer.slice(this.pos,e);return s?(yield s,this.pos+=s.length,s.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(ys))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case":":case"?":case"-":if(K(this.charAt(1)))return this.flowLevel===0?this.indentNext=this.indentValue+1:this.flowKey&&(this.flowKey=!1),(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,t=this.buffer[e];for(;!K(t)&&t!==">";)t=this.buffer[++e];return yield*this.pushToIndex(t===">"?e+1:e,!1)}else{let e=this.pos+1,t=this.buffer[e];for(;t;)if(ri.includes(t))t=this.buffer[++e];else if(t==="%"&&fn.includes(this.buffer[e+1])&&fn.includes(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===` -`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===` -`?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,s;do s=this.buffer[++t];while(s===" "||e&&s===" ");let i=t-this.pos;return i>0&&(yield this.buffer.substr(this.pos,i),this.pos=t),i}*pushUntil(e){let t=this.pos,s=this.buffer[t];for(;!e(s);)s=this.buffer[++t];return yield*this.pushToIndex(t,!1)}};var et=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,s=this.lineStarts.length;for(;t>1;this.lineStarts[r]=0;)switch(n[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((e=n[++t])===null||e===void 0?void 0:e.type)==="space";);return n.splice(t,n.length)}function hn(n){if(n.start.type==="flow-seq-start")for(let e of n.items)e.sep&&!e.value&&!te(e.start,"explicit-key-ind")&&!te(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,pn(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}var st=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Ze,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let s of this.lexer.lex(e,t))yield*this.next(s);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=gs(e);if(t)if(t==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let s=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:s,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type==="doc-end"&&(!e||e.type!=="doc-end")){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e||this.stack.pop();if(t)if(this.stack.length===0)yield t;else{let s=this.peek(1);switch(t.type==="block-scalar"?t.indent="indent"in s?s.indent:0:t.type==="flow-collection"&&s.type==="document"&&(t.indent=0),t.type==="flow-collection"&&hn(t),s.type){case"document":s.value=t;break;case"block-scalar":s.props.push(t);break;case"block-map":{let i=s.items[s.items.length-1];if(i.value){s.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(i.sep)i.value=t;else{Object.assign(i,{key:t,sep:[]}),this.onKeyLine=!te(i.start,"explicit-key-ind");return}break}case"block-seq":{let i=s.items[s.items.length-1];i.value?s.items.push({start:[],value:t}):i.value=t;break}case"flow-collection":{let i=s.items[s.items.length-1];!i||i.value?s.items.push({start:[],key:t,sep:[]}):i.sep?i.value=t:Object.assign(i,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((s.type==="document"||s.type==="block-map"||s.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){let i=t.items[t.items.length-1];i&&!i.sep&&!i.value&&i.start.length>0&&!bs(i.start)&&(t.indent===0||i.start.every(r=>r.type!=="comment"||r.indent=e.indent){let i=!this.onKeyLine&&this.indent===e.indent&&(s.sep||bs(s.start));switch(this.type){case"anchor":case"tag":i||s.value?(e.items.push({start:[this.sourceToken]}),this.onKeyLine=!0):s.sep?s.sep.push(this.sourceToken):s.start.push(this.sourceToken);return;case"explicit-key-ind":!s.sep&&!te(s.start,"explicit-key-ind")?s.start.push(this.sourceToken):i||s.value?e.items.push({start:[this.sourceToken]}):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]}),this.onKeyLine=!0;return;case"map-value-ind":if(!s.sep)Object.assign(s,{key:null,sep:[this.sourceToken]});else if(s.value||i&&!te(s.start,"explicit-key-ind"))e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(te(s.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]});else if(te(s.start,"explicit-key-ind")&&pn(s.key)&&!te(s.sep,"newline")){let r=tt(s.start),o=s.key,a=s.sep;a.push(this.sourceToken),delete s.key,delete s.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:o,sep:a}]})}else s.sep.push(this.sourceToken);this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let r=this.flowScalar(this.type);i||s.value?(e.items.push({start:[],key:r,sep:[]}),this.onKeyLine=!0):s.sep?this.stack.push(r):(Object.assign(s,{key:r,sep:[]}),this.onKeyLine=!0);return}default:{let r=this.startBlockValue(e);if(r){i&&r.type!=="block-seq"&&te(s.start,"explicit-key-ind")&&e.items.push({start:[]}),this.stack.push(r);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var t;let s=e.items[e.items.length-1];switch(this.type){case"newline":if(s.value){let i="end"in s.value?s.value.end:void 0,r=Array.isArray(i)?i[i.length-1]:void 0;(r==null?void 0:r.type)==="comment"?i==null||i.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else s.start.push(this.sourceToken);return;case"space":case"comment":if(s.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(s.start,e.indent)){let i=e.items[e.items.length-2],r=(t=i==null?void 0:i.value)===null||t===void 0?void 0:t.end;if(Array.isArray(r)){Array.prototype.push.apply(r,s.start),r.push(this.sourceToken),e.items.pop();return}}s.start.push(this.sourceToken)}return;case"anchor":case"tag":if(s.value||this.indent<=e.indent)break;s.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;s.value||te(s.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):s.start.push(this.sourceToken);return}if(this.indent>e.indent){let i=this.startBlockValue(e);if(i){this.stack.push(i);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let s;do yield*this.pop(),s=this.peek(1);while(s&&s.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case"map-value-ind":!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let i=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:i,sep:[]}):t.sep?this.stack.push(i):Object.assign(t,{key:i,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let s=this.startBlockValue(e);s?this.stack.push(s):(yield*this.pop(),yield*this.step())}else{let s=this.peek(2);if(s.type==="block-map"&&(this.type==="map-value-ind"||this.type==="newline"&&!s.items[s.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&s.type!=="flow-collection"){let i=qt(s),r=tt(i);hn(e);let o=e.end.splice(1,e.end.length);o.push(this.sourceToken);let a={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let t=this.source.indexOf(` -`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(` -`,t)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let t=qt(e),s=tt(t);return s.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s}]}}case"map-value-ind":{this.onKeyLine=!0;let t=qt(e),s=tt(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(s=>s.type==="newline"||s.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};function ai(n){let e=n.prettyErrors!==!1;return{lineCounter:n.lineCounter||e&&new et||null,prettyErrors:e}}function ws(n,e={}){let{lineCounter:t,prettyErrors:s}=ai(e),i=new st(t==null?void 0:t.addNewLine),r=new Ye(e),o=null;for(let a of r.compose(i.parse(n),!0,n.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new j(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return s&&t&&(o.errors.forEach(ls(n,t)),o.warnings.forEach(ls(n,t))),o}var Vt=class{constructor(e,t,s,i){this.app=e,this.filename=t,this.basename=t.split("/").pop(),this.tagPositions=s,this.hasFrontMatter=!!i}async renamed(e){let t=this.app.vault.getAbstractFileByPath(this.filename),s=await this.app.vault.read(t),i=s;for(let{position:{start:r,end:o},tag:a}of this.tagPositions){if(i.slice(r.offset,o.offset)!==a){let l=`File ${this.filename} has changed; skipping`;new Ss.Notice(l),console.error(l),console.debug(i.slice(r.offset,o.offset),a);return}i=e.inString(i,r.offset)}if(this.hasFrontMatter&&(i=this.replaceInFrontMatter(i,e)),i!==s)return await this.app.vault.modify(t,i),!0}replaceInFrontMatter(e,t){let[s,i]=e.split(/^---\r?$\n?/m,2);if(s.trim()!==""||!i.trim()||!i.endsWith(` -`))return e;let r=ws(i,{keepSourceTokens:!0});if(r.errors.length){let f=`YAML issue with ${this.filename}: ${r.errors[0]}`;console.error(f),new Ss.Notice(f+"; skipping frontmatter");return}let o=!1,a=r.toJSON();function l(f,h,u=!1){Xe.setScalarValue(f.srcToken,h,{afterKey:u}),o=!0,f.value=h}function c(f,h){let u=r.get(f,!0);if(!u)return;let p=a[f];if(!(!p||!p.length))if(typeof p=="string"){let y=p.split(h?/(^\s+|\s*,\s*|\s+$)/:/([\s,]+)/),d=t.inArray(y,!0,h).join("");p!=d&&l(u,d,!0)}else Array.isArray(p)&&t.inArray(p,!1,h).forEach((y,d)=>{p[d]!==y&&l(u.get(d,!0),y)})}for(let{key:{value:f}}of r.contents.items)/^tags?$/i.test(f)?c(f,!1):/^alias(es)?$/i.test(f)&&c(f,!0);return o?e.replace(i,Xe.stringify(r.contents.srcToken)):e}};async function dn(n,e,t=e){let s=await fi(e,t);if(s===!1)return;if(!s||s===e)return new ge.Notice("Unchanged or empty tag: No changes made.");let i=new I(e),r=new I(s),o=new ft(i,r),a=o.willMergeTags(ci(n).reverse());if(a&&await ui(a,i,r))return;let c=await ks(n,i);if(!c)return;let f=new Le(`Renaming to #${s}/*`,"Processing files..."),h=0;return await f.forEach(c,async u=>{f.message="Processing "+u.basename,await u.renamed(o)&&h++}),new ge.Notice(`Operation ${f.aborted?"cancelled":"complete"}: ${h} file(s) updated`)}function ci(n){return Object.keys(n.metadataCache.getTags())}async function ks(n,e){let t=[],s=new Le(`Searching for ${e}/*`,"Matching files...");if(await s.forEach(n.metadataCache.getCachedFiles(),i=>{let{frontmatter:r,tags:o}=n.metadataCache.getCache(i)||{};o=(o||[]).filter(c=>c.tag&&e.matches(c.tag)).reverse();let a=((0,ge.parseFrontMatterTags)(r)||[]).filter(e.matches),l=((0,ge.parseFrontMatterAliases)(r)||[]).filter(I.isTag).filter(e.matches);(o.length||a.length||l.length)&&t.push(new Vt(n,i,o,a.length+l.length))}),!s.aborted)return t}async function fi(n,e=n){return await new ct().setTitle(`Renaming #${n} (and any sub-tags)`).setContent(`Enter new name (must be a valid Obsidian tag name): -`).setPattern("[^\u2000-\u206F\u2E00-\u2E7F'!\"#$%&()*+,.:;<=>?@^`{|}~\\[\\]\\\\\\s]+").onInvalidEntry(t=>new ge.Notice(`"${t}" is not a valid Obsidian tag name`)).setValue(e).prompt()}async function ui([n,e],t,s){return!await new lt().setTitle("WARNING: No Undo!").setContent(activeWindow.createEl("p",void 0,i=>{i.innerHTML=`Renaming ${t} to ${s} will merge ${n.canonical===t.canonical?"these tags":`multiple tags - into existing tags (such as ${n} - merging with ${e})`}.

- This cannot be undone. Do you wish to proceed?`})).setup(i=>i.okButton.addClass("mod-warning")).confirm()}var mn="tag-wrangler:tag-pane";function nt(n,e,t,s,i){return n.on(e,t,s,i),()=>n.off(e,t,s,i)}var Ut=class extends M.Plugin{constructor(){super(...arguments);ye(this,"pageAliases",new Map);ye(this,"tagPages",new Map)}tagPage(t){return Array.from(this.tagPages.get(I.canonical(t))||"")[0]}openTagPage(t,s,i){let r={eState:s?{rename:"all"}:{focus:!0},...s?{state:{mode:"source"}}:{}};return this.app.workspace.getLeaf(i).openFile(t,r)}async createTagPage(t,s){var a;let r={tag:new I(t).canonical,file:void 0};app.workspace.trigger("tag-page:will-create",r);let o=r.file&&await r.file;if(!o){let l=new I(t).name.split("/").join(" "),c=this.app.fileManager.getNewFileParent(((a=this.app.workspace.getActiveFile())==null?void 0:a.path)||""),f=this.app.vault.getAvailablePath(c.getParentPrefix()+l,"md");o=await this.app.vault.create(f,["---",`Aliases: [ ${JSON.stringify(I.toTag(t))} ]`,"---",""].join(` -`))}r.file=o,await this.openTagPage(o,!0,s),app.workspace.trigger("tag-page:did-create",r)}async onload(){this.register(nt(document,"contextmenu",".tag-pane-tag",this.onMenu.bind(this),{capture:!0})),this.app.workspace.registerHoverLinkSource(mn,{display:"Tag pane",defaultMod:!0}),this.addChild(new it(this,{hoverSource:mn,selector:".tag-pane-tag",container:".tag-container",toTag(i){var r;return(r=i.find(".tag-pane-tag-text, tag-pane-tag-text, .tag-pane-tag .tree-item-inner-text"))==null?void 0:r.textContent}})),this.addChild(new it(this,{hoverSource:"preview",selector:'a.tag[href^="#"]',container:".markdown-preview-view, .markdown-embed, .workspace-leaf-content",toTag(i){return i.getAttribute("href")}})),this.addChild(new it(this,{hoverSource:"editor",selector:"span.cm-hashtag",container:".markdown-source-view",toTag(i){let r=i.textContent;if(!i.matches(".cm-formatting"))for(let o=i.previousElementSibling;o!=null&&o.matches("span.cm-hashtag:not(.cm-formatting)");o=o.previousElementSibling)r=o.textContent+r;for(let o=i.nextElementSibling;o!=null&&o.matches("span.cm-hashtag:not(.cm-formatting)");o=o.nextElementSibling)r+=o.textContent;return r}})),this.register(nt(document,"pointerdown",".tag-pane-tag",(i,r)=>{r.draggable="true"},{capture:!0})),this.register(nt(document,"dragstart",".tag-pane-tag",(i,r)=>{var l;let o=(l=r.find(".tag-pane-tag-text, tag-pane-tag-text, .tag-pane-tag .tree-item-inner-text"))==null?void 0:l.textContent;i.dataTransfer.setData("text/plain","#"+o),app.dragManager.onDragStart(i,{source:"tag-wrangler",type:"text",title:o,icon:"hashtag"}),window.addEventListener("dragend",a,!0),window.addEventListener("drop",a,!0);function a(){app.dragManager.draggable=null,window.removeEventListener("dragend",a,!0),window.removeEventListener("drop",a,!0)}},{capture:!1}));let t=this.app.metadataCache,s=this;this.register(Es(t,{getTags(i){return function(){let o=i.call(this),a=new Set(Object.keys(o).map(l=>l.toLowerCase()));for(let l of s.tagPages.keys())a.has(l)||(o[s.tagPages.get(l).tag]=0);return o}}})),this.app.workspace.onLayoutReady(()=>{t.getCachedFiles().forEach(i=>{var o,a;let r=(o=t.getCache(i))==null?void 0:o.frontmatter;r&&((a=(0,M.parseFrontMatterAliases)(r))!=null&&a.filter(I.isTag))&&this.updatePage(this.app.vault.getAbstractFileByPath(i),r)}),this.registerEvent(t.on("changed",(i,r,o)=>this.updatePage(i,o==null?void 0:o.frontmatter))),this.registerEvent(this.app.vault.on("delete",i=>this.updatePage(i))),app.workspace.getLeavesOfType("tag").forEach(i=>{var r,o;(o=(r=i==null?void 0:i.view)==null?void 0:r.requestUpdateTags)==null||o.call(r)})})}updatePage(t,s){var r;let i=((r=(0,M.parseFrontMatterAliases)(s))==null?void 0:r.filter(I.isTag))||[];if(this.pageAliases.has(t)){let o=new Set(i||[]);for(let a of this.pageAliases.get(t)){if(o.has(a))continue;let l=I.canonical(a),c=this.tagPages.get(l);c&&(c.delete(t),c.size||this.tagPages.delete(l))}i.length||this.pageAliases.delete(t)}if(i.length){this.pageAliases.set(t,i);for(let o of i){let a=I.canonical(o);if(this.tagPages.has(a))this.tagPages.get(a).add(t);else{let l=new Set([t]);l.tag=I.toTag(o),this.tagPages.set(a,l)}}}}onMenu(t,s){t.obsidian_contextmenu||(t.obsidian_contextmenu=new M.Menu(this.app),setTimeout(()=>h.showAtPosition({x:t.pageX,y:t.pageY}),0));let i=s.find(".tag-pane-tag-text, .tag-pane-tag .tree-item-inner-text").textContent,r=this.tagPage(i),o=s.parentElement.parentElement.find(".collapse-icon"),a=this.app.internalPlugins.getPluginById("global-search"),l=a&&a.instance,c=l&&l.getGlobalSearchQuery(),f=this.app.plugins.plugins["smart-random-note"],h=t.obsidian_contextmenu.addItem(ae("pencil","Rename #"+i,()=>this.rename(i)));if(h.addSeparator(),r?h.addItem(ae("popup-open","Open tag page",u=>this.openTagPage(r,!1,M.Keymap.isModEvent(u)))):h.addItem(ae("create-new","Create tag page",u=>this.createTagPage(i,M.Keymap.isModEvent(u)))),l&&(h.addSeparator().addItem(ae("magnifying-glass","New search for #"+i,()=>l.openGlobalSearch("tag:"+i))),c&&h.addItem(ae("sheets-in-box","Require #"+i+" in search",()=>l.openGlobalSearch(c+" tag:"+i))),h.addItem(ae("crossed-star","Exclude #"+i+" from search",()=>l.openGlobalSearch(c+" -tag:"+i)))),f&&h.addSeparator().addItem(ae("dice","Open random note",async()=>{let u=await ks(this.app,new I(i));f.openRandomNote(u.map(p=>this.app.vault.getAbstractFileByPath(p.filename)))})),this.app.workspace.trigger("tag-wrangler:contextmenu",h,i,{search:l,query:c,isHierarchy:o,tagPage:r}),o){let d=function(m){var g;for(let w of(g=y.children)!=null?g:y.vChildren.children)w.setCollapsed(m)},u=i.split("/").slice(0,-1).join("/"),p=this.leafView(s.matchParent(".workspace-leaf")),y=u?p.tagDoms["#"+u.toLowerCase()]:p.root;h.addSeparator().addItem(ae("vertical-three-dots","Collapse tags at this level",()=>d(!0))).addItem(ae("expand-vertically","Expand tags at this level",()=>d(!1)))}}leafView(t){let s;return this.app.workspace.iterateAllLeaves(i=>{if(i.containerEl===t)return s=i.view,!0}),s}async rename(t){let s=new M.Scope;this.app.keymap.pushScope(s);try{await dn(this.app,t)}catch(i){console.error(i),new M.Notice("error: "+i)}this.app.keymap.popScope(s)}};function ae(n,e,t){return s=>s.setIcon(n).setTitle(e).onClick(t)}var it=class extends M.Component{constructor(e,t){super(),this.opts=t,this.plugin=e}onload(){let{selector:e,container:t,hoverSource:s,toTag:i}=this.opts;this.register(nt(document,"mouseover",e,(r,o)=>{let a=i(o),l=a&&this.plugin.tagPage(a);l&&this.plugin.app.workspace.trigger("hover-link",{event:r,source:s,targetEl:o,linktext:l.path,hoverParent:o.matchParent(t)})},{capture:!1})),this.register(nt(document,"click",e,(r,o)=>{let{altKey:a}=r;if(!M.Keymap.isModEvent(r)&&!a)return;let l=i(o),c=l&&this.plugin.tagPage(l);if(c)return this.plugin.openTagPage(c,!1,M.Keymap.isModEvent(r)),r.preventDefault(),r.stopPropagation(),!1},{capture:!0}))}}; diff --git a/ObsidianRnDVault/.obsidian/plugins/tag-wrangler/manifest.json b/ObsidianRnDVault/.obsidian/plugins/tag-wrangler/manifest.json index af77857..1fe258d 100644 --- a/ObsidianRnDVault/.obsidian/plugins/tag-wrangler/manifest.json +++ b/ObsidianRnDVault/.obsidian/plugins/tag-wrangler/manifest.json @@ -3,8 +3,9 @@ "name": "Tag Wrangler", "author": "PJ Eby", "authorUrl": "https://github.com/pjeby", - "version": "0.5.13", + "version": "0.6.1", "minAppVersion": "1.2.8", "description": "Rename, merge, toggle, and search tags from the tag pane", + "fundingUrl": "https://dirtsimple.org/tips/tag-wrangler", "isDesktopOnly": false } diff --git a/ObsidianRnDVault/.obsidian/plugins/templater-obsidian/data.json b/ObsidianRnDVault/.obsidian/plugins/templater-obsidian/data.json index 26c21c7..56bd0ec 100644 --- a/ObsidianRnDVault/.obsidian/plugins/templater-obsidian/data.json +++ b/ObsidianRnDVault/.obsidian/plugins/templater-obsidian/data.json @@ -20,11 +20,11 @@ }, { "folder": "Journal/Daily", - "template": "System/templates/journal/Daily Journal Template.md" + "template": "System/templates/Journal/Daily/Daily Journal Template.md" }, { "folder": "Journal/Weekly", - "template": "System/templates/journal/Weekly Journal Template.md" + "template": "System/templates/Journal/Weekly/Weekly Journal Template.md" } ], "syntax_highlighting": true, diff --git a/ObsidianRnDVault/.obsidian/plugins/templater-obsidian/main.js b/ObsidianRnDVault/.obsidian/plugins/templater-obsidian/main.js deleted file mode 100644 index cdfe639..0000000 --- a/ObsidianRnDVault/.obsidian/plugins/templater-obsidian/main.js +++ /dev/null @@ -1,5492 +0,0 @@ -/* -THIS IS A GENERATED/BUNDLED FILE BY ESBUILD -if you want to view the source, please visit the github repository of this plugin -*/ - -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __markAsModule = (target) => __defProp(target, "__esModule", { value: true }); -var __export = (target, all) => { - __markAsModule(target); - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __reExport = (target, module2, desc) => { - if (module2 && typeof module2 === "object" || typeof module2 === "function") { - for (let key of __getOwnPropNames(module2)) - if (!__hasOwnProp.call(target, key) && key !== "default") - __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable }); - } - return target; -}; -var __toModule = (module2) => { - return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2); -}; -var __toBinary = /* @__PURE__ */ (() => { - var table = new Uint8Array(128); - for (var i = 0; i < 64; i++) - table[i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i * 4 - 205] = i; - return (base64) => { - var n = base64.length, bytes = new Uint8Array((n - (base64[n - 1] == "=") - (base64[n - 2] == "=")) * 3 / 4 | 0); - for (var i2 = 0, j = 0; i2 < n; ) { - var c0 = table[base64.charCodeAt(i2++)], c1 = table[base64.charCodeAt(i2++)]; - var c2 = table[base64.charCodeAt(i2++)], c3 = table[base64.charCodeAt(i2++)]; - bytes[j++] = c0 << 2 | c1 >> 4; - bytes[j++] = c1 << 4 | c2 >> 2; - bytes[j++] = c2 << 6 | c3; - } - return bytes; - }; -})(); - -// src/main.ts -__export(exports, { - default: () => TemplaterPlugin -}); -var import_obsidian17 = __toModule(require("obsidian")); - -// src/settings/Settings.ts -var import_obsidian6 = __toModule(require("obsidian")); - -// src/utils/Log.ts -var import_obsidian = __toModule(require("obsidian")); -function log_error(e) { - const notice = new import_obsidian.Notice("", 8e3); - if (e instanceof TemplaterError && e.console_msg) { - notice.noticeEl.innerHTML = `Templater Error:
${e.message}
Check console for more information`; - console.error(`Templater Error:`, e.message, "\n", e.console_msg); - } else { - notice.noticeEl.innerHTML = `Templater Error:
${e.message}`; - } -} - -// src/utils/Error.ts -var TemplaterError = class extends Error { - constructor(msg, console_msg) { - super(msg); - this.console_msg = console_msg; - this.name = this.constructor.name; - Error.captureStackTrace(this, this.constructor); - } -}; -async function errorWrapper(fn2, msg) { - try { - return await fn2(); - } catch (e) { - if (!(e instanceof TemplaterError)) { - log_error(new TemplaterError(msg, e.message)); - } else { - log_error(e); - } - return null; - } -} -function errorWrapperSync(fn2, msg) { - try { - return fn2(); - } catch (e) { - log_error(new TemplaterError(msg, e.message)); - return null; - } -} - -// src/settings/suggesters/FolderSuggester.ts -var import_obsidian3 = __toModule(require("obsidian")); - -// src/settings/suggesters/suggest.ts -var import_obsidian2 = __toModule(require("obsidian")); - -// node_modules/@popperjs/core/lib/enums.js -var top = "top"; -var bottom = "bottom"; -var right = "right"; -var left = "left"; -var auto = "auto"; -var basePlacements = [top, bottom, right, left]; -var start = "start"; -var end = "end"; -var clippingParents = "clippingParents"; -var viewport = "viewport"; -var popper = "popper"; -var reference = "reference"; -var variationPlacements = /* @__PURE__ */ basePlacements.reduce(function(acc, placement) { - return acc.concat([placement + "-" + start, placement + "-" + end]); -}, []); -var placements = /* @__PURE__ */ [].concat(basePlacements, [auto]).reduce(function(acc, placement) { - return acc.concat([placement, placement + "-" + start, placement + "-" + end]); -}, []); -var beforeRead = "beforeRead"; -var read = "read"; -var afterRead = "afterRead"; -var beforeMain = "beforeMain"; -var main = "main"; -var afterMain = "afterMain"; -var beforeWrite = "beforeWrite"; -var write = "write"; -var afterWrite = "afterWrite"; -var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite]; - -// node_modules/@popperjs/core/lib/dom-utils/getNodeName.js -function getNodeName(element) { - return element ? (element.nodeName || "").toLowerCase() : null; -} - -// node_modules/@popperjs/core/lib/dom-utils/getWindow.js -function getWindow(node) { - if (node == null) { - return window; - } - if (node.toString() !== "[object Window]") { - var ownerDocument = node.ownerDocument; - return ownerDocument ? ownerDocument.defaultView || window : window; - } - return node; -} - -// node_modules/@popperjs/core/lib/dom-utils/instanceOf.js -function isElement(node) { - var OwnElement = getWindow(node).Element; - return node instanceof OwnElement || node instanceof Element; -} -function isHTMLElement(node) { - var OwnElement = getWindow(node).HTMLElement; - return node instanceof OwnElement || node instanceof HTMLElement; -} -function isShadowRoot(node) { - if (typeof ShadowRoot === "undefined") { - return false; - } - var OwnElement = getWindow(node).ShadowRoot; - return node instanceof OwnElement || node instanceof ShadowRoot; -} - -// node_modules/@popperjs/core/lib/modifiers/applyStyles.js -function applyStyles(_ref) { - var state = _ref.state; - Object.keys(state.elements).forEach(function(name) { - var style = state.styles[name] || {}; - var attributes = state.attributes[name] || {}; - var element = state.elements[name]; - if (!isHTMLElement(element) || !getNodeName(element)) { - return; - } - Object.assign(element.style, style); - Object.keys(attributes).forEach(function(name2) { - var value = attributes[name2]; - if (value === false) { - element.removeAttribute(name2); - } else { - element.setAttribute(name2, value === true ? "" : value); - } - }); - }); -} -function effect(_ref2) { - var state = _ref2.state; - var initialStyles = { - popper: { - position: state.options.strategy, - left: "0", - top: "0", - margin: "0" - }, - arrow: { - position: "absolute" - }, - reference: {} - }; - Object.assign(state.elements.popper.style, initialStyles.popper); - state.styles = initialStyles; - if (state.elements.arrow) { - Object.assign(state.elements.arrow.style, initialStyles.arrow); - } - return function() { - Object.keys(state.elements).forEach(function(name) { - var element = state.elements[name]; - var attributes = state.attributes[name] || {}; - var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); - var style = styleProperties.reduce(function(style2, property) { - style2[property] = ""; - return style2; - }, {}); - if (!isHTMLElement(element) || !getNodeName(element)) { - return; - } - Object.assign(element.style, style); - Object.keys(attributes).forEach(function(attribute) { - element.removeAttribute(attribute); - }); - }); - }; -} -var applyStyles_default = { - name: "applyStyles", - enabled: true, - phase: "write", - fn: applyStyles, - effect, - requires: ["computeStyles"] -}; - -// node_modules/@popperjs/core/lib/utils/getBasePlacement.js -function getBasePlacement(placement) { - return placement.split("-")[0]; -} - -// node_modules/@popperjs/core/lib/utils/math.js -var max = Math.max; -var min = Math.min; -var round = Math.round; - -// node_modules/@popperjs/core/lib/utils/userAgent.js -function getUAString() { - var uaData = navigator.userAgentData; - if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) { - return uaData.brands.map(function(item) { - return item.brand + "/" + item.version; - }).join(" "); - } - return navigator.userAgent; -} - -// node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js -function isLayoutViewport() { - return !/^((?!chrome|android).)*safari/i.test(getUAString()); -} - -// node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js -function getBoundingClientRect(element, includeScale, isFixedStrategy) { - if (includeScale === void 0) { - includeScale = false; - } - if (isFixedStrategy === void 0) { - isFixedStrategy = false; - } - var clientRect = element.getBoundingClientRect(); - var scaleX = 1; - var scaleY = 1; - if (includeScale && isHTMLElement(element)) { - scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1; - scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1; - } - var _ref = isElement(element) ? getWindow(element) : window, visualViewport = _ref.visualViewport; - var addVisualOffsets = !isLayoutViewport() && isFixedStrategy; - var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX; - var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY; - var width = clientRect.width / scaleX; - var height = clientRect.height / scaleY; - return { - width, - height, - top: y, - right: x + width, - bottom: y + height, - left: x, - x, - y - }; -} - -// node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js -function getLayoutRect(element) { - var clientRect = getBoundingClientRect(element); - var width = element.offsetWidth; - var height = element.offsetHeight; - if (Math.abs(clientRect.width - width) <= 1) { - width = clientRect.width; - } - if (Math.abs(clientRect.height - height) <= 1) { - height = clientRect.height; - } - return { - x: element.offsetLeft, - y: element.offsetTop, - width, - height - }; -} - -// node_modules/@popperjs/core/lib/dom-utils/contains.js -function contains(parent, child) { - var rootNode = child.getRootNode && child.getRootNode(); - if (parent.contains(child)) { - return true; - } else if (rootNode && isShadowRoot(rootNode)) { - var next = child; - do { - if (next && parent.isSameNode(next)) { - return true; - } - next = next.parentNode || next.host; - } while (next); - } - return false; -} - -// node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js -function getComputedStyle(element) { - return getWindow(element).getComputedStyle(element); -} - -// node_modules/@popperjs/core/lib/dom-utils/isTableElement.js -function isTableElement(element) { - return ["table", "td", "th"].indexOf(getNodeName(element)) >= 0; -} - -// node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js -function getDocumentElement(element) { - return ((isElement(element) ? element.ownerDocument : element.document) || window.document).documentElement; -} - -// node_modules/@popperjs/core/lib/dom-utils/getParentNode.js -function getParentNode(element) { - if (getNodeName(element) === "html") { - return element; - } - return element.assignedSlot || element.parentNode || (isShadowRoot(element) ? element.host : null) || getDocumentElement(element); -} - -// node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js -function getTrueOffsetParent(element) { - if (!isHTMLElement(element) || getComputedStyle(element).position === "fixed") { - return null; - } - return element.offsetParent; -} -function getContainingBlock(element) { - var isFirefox = /firefox/i.test(getUAString()); - var isIE = /Trident/i.test(getUAString()); - if (isIE && isHTMLElement(element)) { - var elementCss = getComputedStyle(element); - if (elementCss.position === "fixed") { - return null; - } - } - var currentNode = getParentNode(element); - if (isShadowRoot(currentNode)) { - currentNode = currentNode.host; - } - while (isHTMLElement(currentNode) && ["html", "body"].indexOf(getNodeName(currentNode)) < 0) { - var css = getComputedStyle(currentNode); - if (css.transform !== "none" || css.perspective !== "none" || css.contain === "paint" || ["transform", "perspective"].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === "filter" || isFirefox && css.filter && css.filter !== "none") { - return currentNode; - } else { - currentNode = currentNode.parentNode; - } - } - return null; -} -function getOffsetParent(element) { - var window2 = getWindow(element); - var offsetParent = getTrueOffsetParent(element); - while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === "static") { - offsetParent = getTrueOffsetParent(offsetParent); - } - if (offsetParent && (getNodeName(offsetParent) === "html" || getNodeName(offsetParent) === "body" && getComputedStyle(offsetParent).position === "static")) { - return window2; - } - return offsetParent || getContainingBlock(element) || window2; -} - -// node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js -function getMainAxisFromPlacement(placement) { - return ["top", "bottom"].indexOf(placement) >= 0 ? "x" : "y"; -} - -// node_modules/@popperjs/core/lib/utils/within.js -function within(min2, value, max2) { - return max(min2, min(value, max2)); -} -function withinMaxClamp(min2, value, max2) { - var v = within(min2, value, max2); - return v > max2 ? max2 : v; -} - -// node_modules/@popperjs/core/lib/utils/getFreshSideObject.js -function getFreshSideObject() { - return { - top: 0, - right: 0, - bottom: 0, - left: 0 - }; -} - -// node_modules/@popperjs/core/lib/utils/mergePaddingObject.js -function mergePaddingObject(paddingObject) { - return Object.assign({}, getFreshSideObject(), paddingObject); -} - -// node_modules/@popperjs/core/lib/utils/expandToHashMap.js -function expandToHashMap(value, keys) { - return keys.reduce(function(hashMap, key) { - hashMap[key] = value; - return hashMap; - }, {}); -} - -// node_modules/@popperjs/core/lib/modifiers/arrow.js -var toPaddingObject = function toPaddingObject2(padding, state) { - padding = typeof padding === "function" ? padding(Object.assign({}, state.rects, { - placement: state.placement - })) : padding; - return mergePaddingObject(typeof padding !== "number" ? padding : expandToHashMap(padding, basePlacements)); -}; -function arrow(_ref) { - var _state$modifiersData$; - var state = _ref.state, name = _ref.name, options = _ref.options; - var arrowElement = state.elements.arrow; - var popperOffsets2 = state.modifiersData.popperOffsets; - var basePlacement = getBasePlacement(state.placement); - var axis = getMainAxisFromPlacement(basePlacement); - var isVertical = [left, right].indexOf(basePlacement) >= 0; - var len = isVertical ? "height" : "width"; - if (!arrowElement || !popperOffsets2) { - return; - } - var paddingObject = toPaddingObject(options.padding, state); - var arrowRect = getLayoutRect(arrowElement); - var minProp = axis === "y" ? top : left; - var maxProp = axis === "y" ? bottom : right; - var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets2[axis] - state.rects.popper[len]; - var startDiff = popperOffsets2[axis] - state.rects.reference[axis]; - var arrowOffsetParent = getOffsetParent(arrowElement); - var clientSize = arrowOffsetParent ? axis === "y" ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0; - var centerToReference = endDiff / 2 - startDiff / 2; - var min2 = paddingObject[minProp]; - var max2 = clientSize - arrowRect[len] - paddingObject[maxProp]; - var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference; - var offset2 = within(min2, center, max2); - var axisProp = axis; - state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset2, _state$modifiersData$.centerOffset = offset2 - center, _state$modifiersData$); -} -function effect2(_ref2) { - var state = _ref2.state, options = _ref2.options; - var _options$element = options.element, arrowElement = _options$element === void 0 ? "[data-popper-arrow]" : _options$element; - if (arrowElement == null) { - return; - } - if (typeof arrowElement === "string") { - arrowElement = state.elements.popper.querySelector(arrowElement); - if (!arrowElement) { - return; - } - } - if (!contains(state.elements.popper, arrowElement)) { - return; - } - state.elements.arrow = arrowElement; -} -var arrow_default = { - name: "arrow", - enabled: true, - phase: "main", - fn: arrow, - effect: effect2, - requires: ["popperOffsets"], - requiresIfExists: ["preventOverflow"] -}; - -// node_modules/@popperjs/core/lib/utils/getVariation.js -function getVariation(placement) { - return placement.split("-")[1]; -} - -// node_modules/@popperjs/core/lib/modifiers/computeStyles.js -var unsetSides = { - top: "auto", - right: "auto", - bottom: "auto", - left: "auto" -}; -function roundOffsetsByDPR(_ref, win) { - var x = _ref.x, y = _ref.y; - var dpr = win.devicePixelRatio || 1; - return { - x: round(x * dpr) / dpr || 0, - y: round(y * dpr) / dpr || 0 - }; -} -function mapToStyles(_ref2) { - var _Object$assign2; - var popper2 = _ref2.popper, popperRect = _ref2.popperRect, placement = _ref2.placement, variation = _ref2.variation, offsets = _ref2.offsets, position = _ref2.position, gpuAcceleration = _ref2.gpuAcceleration, adaptive = _ref2.adaptive, roundOffsets = _ref2.roundOffsets, isFixed = _ref2.isFixed; - var _offsets$x = offsets.x, x = _offsets$x === void 0 ? 0 : _offsets$x, _offsets$y = offsets.y, y = _offsets$y === void 0 ? 0 : _offsets$y; - var _ref3 = typeof roundOffsets === "function" ? roundOffsets({ - x, - y - }) : { - x, - y - }; - x = _ref3.x; - y = _ref3.y; - var hasX = offsets.hasOwnProperty("x"); - var hasY = offsets.hasOwnProperty("y"); - var sideX = left; - var sideY = top; - var win = window; - if (adaptive) { - var offsetParent = getOffsetParent(popper2); - var heightProp = "clientHeight"; - var widthProp = "clientWidth"; - if (offsetParent === getWindow(popper2)) { - offsetParent = getDocumentElement(popper2); - if (getComputedStyle(offsetParent).position !== "static" && position === "absolute") { - heightProp = "scrollHeight"; - widthProp = "scrollWidth"; - } - } - offsetParent = offsetParent; - if (placement === top || (placement === left || placement === right) && variation === end) { - sideY = bottom; - var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : offsetParent[heightProp]; - y -= offsetY - popperRect.height; - y *= gpuAcceleration ? 1 : -1; - } - if (placement === left || (placement === top || placement === bottom) && variation === end) { - sideX = right; - var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : offsetParent[widthProp]; - x -= offsetX - popperRect.width; - x *= gpuAcceleration ? 1 : -1; - } - } - var commonStyles = Object.assign({ - position - }, adaptive && unsetSides); - var _ref4 = roundOffsets === true ? roundOffsetsByDPR({ - x, - y - }, getWindow(popper2)) : { - x, - y - }; - x = _ref4.x; - y = _ref4.y; - if (gpuAcceleration) { - var _Object$assign; - return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? "0" : "", _Object$assign[sideX] = hasX ? "0" : "", _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign)); - } - return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : "", _Object$assign2[sideX] = hasX ? x + "px" : "", _Object$assign2.transform = "", _Object$assign2)); -} -function computeStyles(_ref5) { - var state = _ref5.state, options = _ref5.options; - var _options$gpuAccelerat = options.gpuAcceleration, gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat, _options$adaptive = options.adaptive, adaptive = _options$adaptive === void 0 ? true : _options$adaptive, _options$roundOffsets = options.roundOffsets, roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets; - var commonStyles = { - placement: getBasePlacement(state.placement), - variation: getVariation(state.placement), - popper: state.elements.popper, - popperRect: state.rects.popper, - gpuAcceleration, - isFixed: state.options.strategy === "fixed" - }; - if (state.modifiersData.popperOffsets != null) { - state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, { - offsets: state.modifiersData.popperOffsets, - position: state.options.strategy, - adaptive, - roundOffsets - }))); - } - if (state.modifiersData.arrow != null) { - state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, { - offsets: state.modifiersData.arrow, - position: "absolute", - adaptive: false, - roundOffsets - }))); - } - state.attributes.popper = Object.assign({}, state.attributes.popper, { - "data-popper-placement": state.placement - }); -} -var computeStyles_default = { - name: "computeStyles", - enabled: true, - phase: "beforeWrite", - fn: computeStyles, - data: {} -}; - -// node_modules/@popperjs/core/lib/modifiers/eventListeners.js -var passive = { - passive: true -}; -function effect3(_ref) { - var state = _ref.state, instance = _ref.instance, options = _ref.options; - var _options$scroll = options.scroll, scroll = _options$scroll === void 0 ? true : _options$scroll, _options$resize = options.resize, resize = _options$resize === void 0 ? true : _options$resize; - var window2 = getWindow(state.elements.popper); - var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper); - if (scroll) { - scrollParents.forEach(function(scrollParent) { - scrollParent.addEventListener("scroll", instance.update, passive); - }); - } - if (resize) { - window2.addEventListener("resize", instance.update, passive); - } - return function() { - if (scroll) { - scrollParents.forEach(function(scrollParent) { - scrollParent.removeEventListener("scroll", instance.update, passive); - }); - } - if (resize) { - window2.removeEventListener("resize", instance.update, passive); - } - }; -} -var eventListeners_default = { - name: "eventListeners", - enabled: true, - phase: "write", - fn: function fn() { - }, - effect: effect3, - data: {} -}; - -// node_modules/@popperjs/core/lib/utils/getOppositePlacement.js -var hash = { - left: "right", - right: "left", - bottom: "top", - top: "bottom" -}; -function getOppositePlacement(placement) { - return placement.replace(/left|right|bottom|top/g, function(matched) { - return hash[matched]; - }); -} - -// node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js -var hash2 = { - start: "end", - end: "start" -}; -function getOppositeVariationPlacement(placement) { - return placement.replace(/start|end/g, function(matched) { - return hash2[matched]; - }); -} - -// node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js -function getWindowScroll(node) { - var win = getWindow(node); - var scrollLeft = win.pageXOffset; - var scrollTop = win.pageYOffset; - return { - scrollLeft, - scrollTop - }; -} - -// node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js -function getWindowScrollBarX(element) { - return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft; -} - -// node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js -function getViewportRect(element, strategy) { - var win = getWindow(element); - var html = getDocumentElement(element); - var visualViewport = win.visualViewport; - var width = html.clientWidth; - var height = html.clientHeight; - var x = 0; - var y = 0; - if (visualViewport) { - width = visualViewport.width; - height = visualViewport.height; - var layoutViewport = isLayoutViewport(); - if (layoutViewport || !layoutViewport && strategy === "fixed") { - x = visualViewport.offsetLeft; - y = visualViewport.offsetTop; - } - } - return { - width, - height, - x: x + getWindowScrollBarX(element), - y - }; -} - -// node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js -function getDocumentRect(element) { - var _element$ownerDocumen; - var html = getDocumentElement(element); - var winScroll = getWindowScroll(element); - var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body; - var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0); - var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0); - var x = -winScroll.scrollLeft + getWindowScrollBarX(element); - var y = -winScroll.scrollTop; - if (getComputedStyle(body || html).direction === "rtl") { - x += max(html.clientWidth, body ? body.clientWidth : 0) - width; - } - return { - width, - height, - x, - y - }; -} - -// node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js -function isScrollParent(element) { - var _getComputedStyle = getComputedStyle(element), overflow = _getComputedStyle.overflow, overflowX = _getComputedStyle.overflowX, overflowY = _getComputedStyle.overflowY; - return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX); -} - -// node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js -function getScrollParent(node) { - if (["html", "body", "#document"].indexOf(getNodeName(node)) >= 0) { - return node.ownerDocument.body; - } - if (isHTMLElement(node) && isScrollParent(node)) { - return node; - } - return getScrollParent(getParentNode(node)); -} - -// node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js -function listScrollParents(element, list) { - var _element$ownerDocumen; - if (list === void 0) { - list = []; - } - var scrollParent = getScrollParent(element); - var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body); - var win = getWindow(scrollParent); - var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent; - var updatedList = list.concat(target); - return isBody ? updatedList : updatedList.concat(listScrollParents(getParentNode(target))); -} - -// node_modules/@popperjs/core/lib/utils/rectToClientRect.js -function rectToClientRect(rect) { - return Object.assign({}, rect, { - left: rect.x, - top: rect.y, - right: rect.x + rect.width, - bottom: rect.y + rect.height - }); -} - -// node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js -function getInnerBoundingClientRect(element, strategy) { - var rect = getBoundingClientRect(element, false, strategy === "fixed"); - rect.top = rect.top + element.clientTop; - rect.left = rect.left + element.clientLeft; - rect.bottom = rect.top + element.clientHeight; - rect.right = rect.left + element.clientWidth; - rect.width = element.clientWidth; - rect.height = element.clientHeight; - rect.x = rect.left; - rect.y = rect.top; - return rect; -} -function getClientRectFromMixedType(element, clippingParent, strategy) { - return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element))); -} -function getClippingParents(element) { - var clippingParents2 = listScrollParents(getParentNode(element)); - var canEscapeClipping = ["absolute", "fixed"].indexOf(getComputedStyle(element).position) >= 0; - var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element; - if (!isElement(clipperElement)) { - return []; - } - return clippingParents2.filter(function(clippingParent) { - return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== "body"; - }); -} -function getClippingRect(element, boundary, rootBoundary, strategy) { - var mainClippingParents = boundary === "clippingParents" ? getClippingParents(element) : [].concat(boundary); - var clippingParents2 = [].concat(mainClippingParents, [rootBoundary]); - var firstClippingParent = clippingParents2[0]; - var clippingRect = clippingParents2.reduce(function(accRect, clippingParent) { - var rect = getClientRectFromMixedType(element, clippingParent, strategy); - accRect.top = max(rect.top, accRect.top); - accRect.right = min(rect.right, accRect.right); - accRect.bottom = min(rect.bottom, accRect.bottom); - accRect.left = max(rect.left, accRect.left); - return accRect; - }, getClientRectFromMixedType(element, firstClippingParent, strategy)); - clippingRect.width = clippingRect.right - clippingRect.left; - clippingRect.height = clippingRect.bottom - clippingRect.top; - clippingRect.x = clippingRect.left; - clippingRect.y = clippingRect.top; - return clippingRect; -} - -// node_modules/@popperjs/core/lib/utils/computeOffsets.js -function computeOffsets(_ref) { - var reference2 = _ref.reference, element = _ref.element, placement = _ref.placement; - var basePlacement = placement ? getBasePlacement(placement) : null; - var variation = placement ? getVariation(placement) : null; - var commonX = reference2.x + reference2.width / 2 - element.width / 2; - var commonY = reference2.y + reference2.height / 2 - element.height / 2; - var offsets; - switch (basePlacement) { - case top: - offsets = { - x: commonX, - y: reference2.y - element.height - }; - break; - case bottom: - offsets = { - x: commonX, - y: reference2.y + reference2.height - }; - break; - case right: - offsets = { - x: reference2.x + reference2.width, - y: commonY - }; - break; - case left: - offsets = { - x: reference2.x - element.width, - y: commonY - }; - break; - default: - offsets = { - x: reference2.x, - y: reference2.y - }; - } - var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null; - if (mainAxis != null) { - var len = mainAxis === "y" ? "height" : "width"; - switch (variation) { - case start: - offsets[mainAxis] = offsets[mainAxis] - (reference2[len] / 2 - element[len] / 2); - break; - case end: - offsets[mainAxis] = offsets[mainAxis] + (reference2[len] / 2 - element[len] / 2); - break; - default: - } - } - return offsets; -} - -// node_modules/@popperjs/core/lib/utils/detectOverflow.js -function detectOverflow(state, options) { - if (options === void 0) { - options = {}; - } - var _options = options, _options$placement = _options.placement, placement = _options$placement === void 0 ? state.placement : _options$placement, _options$strategy = _options.strategy, strategy = _options$strategy === void 0 ? state.strategy : _options$strategy, _options$boundary = _options.boundary, boundary = _options$boundary === void 0 ? clippingParents : _options$boundary, _options$rootBoundary = _options.rootBoundary, rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary, _options$elementConte = _options.elementContext, elementContext = _options$elementConte === void 0 ? popper : _options$elementConte, _options$altBoundary = _options.altBoundary, altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary, _options$padding = _options.padding, padding = _options$padding === void 0 ? 0 : _options$padding; - var paddingObject = mergePaddingObject(typeof padding !== "number" ? padding : expandToHashMap(padding, basePlacements)); - var altContext = elementContext === popper ? reference : popper; - var popperRect = state.rects.popper; - var element = state.elements[altBoundary ? altContext : elementContext]; - var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy); - var referenceClientRect = getBoundingClientRect(state.elements.reference); - var popperOffsets2 = computeOffsets({ - reference: referenceClientRect, - element: popperRect, - strategy: "absolute", - placement - }); - var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets2)); - var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; - var overflowOffsets = { - top: clippingClientRect.top - elementClientRect.top + paddingObject.top, - bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom, - left: clippingClientRect.left - elementClientRect.left + paddingObject.left, - right: elementClientRect.right - clippingClientRect.right + paddingObject.right - }; - var offsetData = state.modifiersData.offset; - if (elementContext === popper && offsetData) { - var offset2 = offsetData[placement]; - Object.keys(overflowOffsets).forEach(function(key) { - var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1; - var axis = [top, bottom].indexOf(key) >= 0 ? "y" : "x"; - overflowOffsets[key] += offset2[axis] * multiply; - }); - } - return overflowOffsets; -} - -// node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js -function computeAutoPlacement(state, options) { - if (options === void 0) { - options = {}; - } - var _options = options, placement = _options.placement, boundary = _options.boundary, rootBoundary = _options.rootBoundary, padding = _options.padding, flipVariations = _options.flipVariations, _options$allowedAutoP = _options.allowedAutoPlacements, allowedAutoPlacements = _options$allowedAutoP === void 0 ? placements : _options$allowedAutoP; - var variation = getVariation(placement); - var placements2 = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function(placement2) { - return getVariation(placement2) === variation; - }) : basePlacements; - var allowedPlacements = placements2.filter(function(placement2) { - return allowedAutoPlacements.indexOf(placement2) >= 0; - }); - if (allowedPlacements.length === 0) { - allowedPlacements = placements2; - } - var overflows = allowedPlacements.reduce(function(acc, placement2) { - acc[placement2] = detectOverflow(state, { - placement: placement2, - boundary, - rootBoundary, - padding - })[getBasePlacement(placement2)]; - return acc; - }, {}); - return Object.keys(overflows).sort(function(a, b) { - return overflows[a] - overflows[b]; - }); -} - -// node_modules/@popperjs/core/lib/modifiers/flip.js -function getExpandedFallbackPlacements(placement) { - if (getBasePlacement(placement) === auto) { - return []; - } - var oppositePlacement = getOppositePlacement(placement); - return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)]; -} -function flip(_ref) { - var state = _ref.state, options = _ref.options, name = _ref.name; - if (state.modifiersData[name]._skip) { - return; - } - var _options$mainAxis = options.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, _options$altAxis = options.altAxis, checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis, specifiedFallbackPlacements = options.fallbackPlacements, padding = options.padding, boundary = options.boundary, rootBoundary = options.rootBoundary, altBoundary = options.altBoundary, _options$flipVariatio = options.flipVariations, flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio, allowedAutoPlacements = options.allowedAutoPlacements; - var preferredPlacement = state.options.placement; - var basePlacement = getBasePlacement(preferredPlacement); - var isBasePlacement = basePlacement === preferredPlacement; - var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement)); - var placements2 = [preferredPlacement].concat(fallbackPlacements).reduce(function(acc, placement2) { - return acc.concat(getBasePlacement(placement2) === auto ? computeAutoPlacement(state, { - placement: placement2, - boundary, - rootBoundary, - padding, - flipVariations, - allowedAutoPlacements - }) : placement2); - }, []); - var referenceRect = state.rects.reference; - var popperRect = state.rects.popper; - var checksMap = new Map(); - var makeFallbackChecks = true; - var firstFittingPlacement = placements2[0]; - for (var i = 0; i < placements2.length; i++) { - var placement = placements2[i]; - var _basePlacement = getBasePlacement(placement); - var isStartVariation = getVariation(placement) === start; - var isVertical = [top, bottom].indexOf(_basePlacement) >= 0; - var len = isVertical ? "width" : "height"; - var overflow = detectOverflow(state, { - placement, - boundary, - rootBoundary, - altBoundary, - padding - }); - var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top; - if (referenceRect[len] > popperRect[len]) { - mainVariationSide = getOppositePlacement(mainVariationSide); - } - var altVariationSide = getOppositePlacement(mainVariationSide); - var checks = []; - if (checkMainAxis) { - checks.push(overflow[_basePlacement] <= 0); - } - if (checkAltAxis) { - checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0); - } - if (checks.every(function(check) { - return check; - })) { - firstFittingPlacement = placement; - makeFallbackChecks = false; - break; - } - checksMap.set(placement, checks); - } - if (makeFallbackChecks) { - var numberOfChecks = flipVariations ? 3 : 1; - var _loop = function _loop2(_i2) { - var fittingPlacement = placements2.find(function(placement2) { - var checks2 = checksMap.get(placement2); - if (checks2) { - return checks2.slice(0, _i2).every(function(check) { - return check; - }); - } - }); - if (fittingPlacement) { - firstFittingPlacement = fittingPlacement; - return "break"; - } - }; - for (var _i = numberOfChecks; _i > 0; _i--) { - var _ret = _loop(_i); - if (_ret === "break") - break; - } - } - if (state.placement !== firstFittingPlacement) { - state.modifiersData[name]._skip = true; - state.placement = firstFittingPlacement; - state.reset = true; - } -} -var flip_default = { - name: "flip", - enabled: true, - phase: "main", - fn: flip, - requiresIfExists: ["offset"], - data: { - _skip: false - } -}; - -// node_modules/@popperjs/core/lib/modifiers/hide.js -function getSideOffsets(overflow, rect, preventedOffsets) { - if (preventedOffsets === void 0) { - preventedOffsets = { - x: 0, - y: 0 - }; - } - return { - top: overflow.top - rect.height - preventedOffsets.y, - right: overflow.right - rect.width + preventedOffsets.x, - bottom: overflow.bottom - rect.height + preventedOffsets.y, - left: overflow.left - rect.width - preventedOffsets.x - }; -} -function isAnySideFullyClipped(overflow) { - return [top, right, bottom, left].some(function(side) { - return overflow[side] >= 0; - }); -} -function hide(_ref) { - var state = _ref.state, name = _ref.name; - var referenceRect = state.rects.reference; - var popperRect = state.rects.popper; - var preventedOffsets = state.modifiersData.preventOverflow; - var referenceOverflow = detectOverflow(state, { - elementContext: "reference" - }); - var popperAltOverflow = detectOverflow(state, { - altBoundary: true - }); - var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect); - var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets); - var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets); - var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets); - state.modifiersData[name] = { - referenceClippingOffsets, - popperEscapeOffsets, - isReferenceHidden, - hasPopperEscaped - }; - state.attributes.popper = Object.assign({}, state.attributes.popper, { - "data-popper-reference-hidden": isReferenceHidden, - "data-popper-escaped": hasPopperEscaped - }); -} -var hide_default = { - name: "hide", - enabled: true, - phase: "main", - requiresIfExists: ["preventOverflow"], - fn: hide -}; - -// node_modules/@popperjs/core/lib/modifiers/offset.js -function distanceAndSkiddingToXY(placement, rects, offset2) { - var basePlacement = getBasePlacement(placement); - var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1; - var _ref = typeof offset2 === "function" ? offset2(Object.assign({}, rects, { - placement - })) : offset2, skidding = _ref[0], distance = _ref[1]; - skidding = skidding || 0; - distance = (distance || 0) * invertDistance; - return [left, right].indexOf(basePlacement) >= 0 ? { - x: distance, - y: skidding - } : { - x: skidding, - y: distance - }; -} -function offset(_ref2) { - var state = _ref2.state, options = _ref2.options, name = _ref2.name; - var _options$offset = options.offset, offset2 = _options$offset === void 0 ? [0, 0] : _options$offset; - var data = placements.reduce(function(acc, placement) { - acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset2); - return acc; - }, {}); - var _data$state$placement = data[state.placement], x = _data$state$placement.x, y = _data$state$placement.y; - if (state.modifiersData.popperOffsets != null) { - state.modifiersData.popperOffsets.x += x; - state.modifiersData.popperOffsets.y += y; - } - state.modifiersData[name] = data; -} -var offset_default = { - name: "offset", - enabled: true, - phase: "main", - requires: ["popperOffsets"], - fn: offset -}; - -// node_modules/@popperjs/core/lib/modifiers/popperOffsets.js -function popperOffsets(_ref) { - var state = _ref.state, name = _ref.name; - state.modifiersData[name] = computeOffsets({ - reference: state.rects.reference, - element: state.rects.popper, - strategy: "absolute", - placement: state.placement - }); -} -var popperOffsets_default = { - name: "popperOffsets", - enabled: true, - phase: "read", - fn: popperOffsets, - data: {} -}; - -// node_modules/@popperjs/core/lib/utils/getAltAxis.js -function getAltAxis(axis) { - return axis === "x" ? "y" : "x"; -} - -// node_modules/@popperjs/core/lib/modifiers/preventOverflow.js -function preventOverflow(_ref) { - var state = _ref.state, options = _ref.options, name = _ref.name; - var _options$mainAxis = options.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, _options$altAxis = options.altAxis, checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis, boundary = options.boundary, rootBoundary = options.rootBoundary, altBoundary = options.altBoundary, padding = options.padding, _options$tether = options.tether, tether = _options$tether === void 0 ? true : _options$tether, _options$tetherOffset = options.tetherOffset, tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset; - var overflow = detectOverflow(state, { - boundary, - rootBoundary, - padding, - altBoundary - }); - var basePlacement = getBasePlacement(state.placement); - var variation = getVariation(state.placement); - var isBasePlacement = !variation; - var mainAxis = getMainAxisFromPlacement(basePlacement); - var altAxis = getAltAxis(mainAxis); - var popperOffsets2 = state.modifiersData.popperOffsets; - var referenceRect = state.rects.reference; - var popperRect = state.rects.popper; - var tetherOffsetValue = typeof tetherOffset === "function" ? tetherOffset(Object.assign({}, state.rects, { - placement: state.placement - })) : tetherOffset; - var normalizedTetherOffsetValue = typeof tetherOffsetValue === "number" ? { - mainAxis: tetherOffsetValue, - altAxis: tetherOffsetValue - } : Object.assign({ - mainAxis: 0, - altAxis: 0 - }, tetherOffsetValue); - var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null; - var data = { - x: 0, - y: 0 - }; - if (!popperOffsets2) { - return; - } - if (checkMainAxis) { - var _offsetModifierState$; - var mainSide = mainAxis === "y" ? top : left; - var altSide = mainAxis === "y" ? bottom : right; - var len = mainAxis === "y" ? "height" : "width"; - var offset2 = popperOffsets2[mainAxis]; - var min2 = offset2 + overflow[mainSide]; - var max2 = offset2 - overflow[altSide]; - var additive = tether ? -popperRect[len] / 2 : 0; - var minLen = variation === start ? referenceRect[len] : popperRect[len]; - var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; - var arrowElement = state.elements.arrow; - var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : { - width: 0, - height: 0 - }; - var arrowPaddingObject = state.modifiersData["arrow#persistent"] ? state.modifiersData["arrow#persistent"].padding : getFreshSideObject(); - var arrowPaddingMin = arrowPaddingObject[mainSide]; - var arrowPaddingMax = arrowPaddingObject[altSide]; - var arrowLen = within(0, referenceRect[len], arrowRect[len]); - var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis; - var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis; - var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow); - var clientOffset = arrowOffsetParent ? mainAxis === "y" ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0; - var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0; - var tetherMin = offset2 + minOffset - offsetModifierValue - clientOffset; - var tetherMax = offset2 + maxOffset - offsetModifierValue; - var preventedOffset = within(tether ? min(min2, tetherMin) : min2, offset2, tether ? max(max2, tetherMax) : max2); - popperOffsets2[mainAxis] = preventedOffset; - data[mainAxis] = preventedOffset - offset2; - } - if (checkAltAxis) { - var _offsetModifierState$2; - var _mainSide = mainAxis === "x" ? top : left; - var _altSide = mainAxis === "x" ? bottom : right; - var _offset = popperOffsets2[altAxis]; - var _len = altAxis === "y" ? "height" : "width"; - var _min = _offset + overflow[_mainSide]; - var _max = _offset - overflow[_altSide]; - var isOriginSide = [top, left].indexOf(basePlacement) !== -1; - var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0; - var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis; - var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max; - var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max); - popperOffsets2[altAxis] = _preventedOffset; - data[altAxis] = _preventedOffset - _offset; - } - state.modifiersData[name] = data; -} -var preventOverflow_default = { - name: "preventOverflow", - enabled: true, - phase: "main", - fn: preventOverflow, - requiresIfExists: ["offset"] -}; - -// node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js -function getHTMLElementScroll(element) { - return { - scrollLeft: element.scrollLeft, - scrollTop: element.scrollTop - }; -} - -// node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js -function getNodeScroll(node) { - if (node === getWindow(node) || !isHTMLElement(node)) { - return getWindowScroll(node); - } else { - return getHTMLElementScroll(node); - } -} - -// node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js -function isElementScaled(element) { - var rect = element.getBoundingClientRect(); - var scaleX = round(rect.width) / element.offsetWidth || 1; - var scaleY = round(rect.height) / element.offsetHeight || 1; - return scaleX !== 1 || scaleY !== 1; -} -function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) { - if (isFixed === void 0) { - isFixed = false; - } - var isOffsetParentAnElement = isHTMLElement(offsetParent); - var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent); - var documentElement = getDocumentElement(offsetParent); - var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed); - var scroll = { - scrollLeft: 0, - scrollTop: 0 - }; - var offsets = { - x: 0, - y: 0 - }; - if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) { - if (getNodeName(offsetParent) !== "body" || isScrollParent(documentElement)) { - scroll = getNodeScroll(offsetParent); - } - if (isHTMLElement(offsetParent)) { - offsets = getBoundingClientRect(offsetParent, true); - offsets.x += offsetParent.clientLeft; - offsets.y += offsetParent.clientTop; - } else if (documentElement) { - offsets.x = getWindowScrollBarX(documentElement); - } - } - return { - x: rect.left + scroll.scrollLeft - offsets.x, - y: rect.top + scroll.scrollTop - offsets.y, - width: rect.width, - height: rect.height - }; -} - -// node_modules/@popperjs/core/lib/utils/orderModifiers.js -function order(modifiers) { - var map = new Map(); - var visited = new Set(); - var result = []; - modifiers.forEach(function(modifier) { - map.set(modifier.name, modifier); - }); - function sort(modifier) { - visited.add(modifier.name); - var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []); - requires.forEach(function(dep) { - if (!visited.has(dep)) { - var depModifier = map.get(dep); - if (depModifier) { - sort(depModifier); - } - } - }); - result.push(modifier); - } - modifiers.forEach(function(modifier) { - if (!visited.has(modifier.name)) { - sort(modifier); - } - }); - return result; -} -function orderModifiers(modifiers) { - var orderedModifiers = order(modifiers); - return modifierPhases.reduce(function(acc, phase) { - return acc.concat(orderedModifiers.filter(function(modifier) { - return modifier.phase === phase; - })); - }, []); -} - -// node_modules/@popperjs/core/lib/utils/debounce.js -function debounce(fn2) { - var pending; - return function() { - if (!pending) { - pending = new Promise(function(resolve) { - Promise.resolve().then(function() { - pending = void 0; - resolve(fn2()); - }); - }); - } - return pending; - }; -} - -// node_modules/@popperjs/core/lib/utils/mergeByName.js -function mergeByName(modifiers) { - var merged = modifiers.reduce(function(merged2, current) { - var existing = merged2[current.name]; - merged2[current.name] = existing ? Object.assign({}, existing, current, { - options: Object.assign({}, existing.options, current.options), - data: Object.assign({}, existing.data, current.data) - }) : current; - return merged2; - }, {}); - return Object.keys(merged).map(function(key) { - return merged[key]; - }); -} - -// node_modules/@popperjs/core/lib/createPopper.js -var DEFAULT_OPTIONS = { - placement: "bottom", - modifiers: [], - strategy: "absolute" -}; -function areValidElements() { - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - return !args.some(function(element) { - return !(element && typeof element.getBoundingClientRect === "function"); - }); -} -function popperGenerator(generatorOptions) { - if (generatorOptions === void 0) { - generatorOptions = {}; - } - var _generatorOptions = generatorOptions, _generatorOptions$def = _generatorOptions.defaultModifiers, defaultModifiers2 = _generatorOptions$def === void 0 ? [] : _generatorOptions$def, _generatorOptions$def2 = _generatorOptions.defaultOptions, defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2; - return function createPopper2(reference2, popper2, options) { - if (options === void 0) { - options = defaultOptions; - } - var state = { - placement: "bottom", - orderedModifiers: [], - options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions), - modifiersData: {}, - elements: { - reference: reference2, - popper: popper2 - }, - attributes: {}, - styles: {} - }; - var effectCleanupFns = []; - var isDestroyed = false; - var instance = { - state, - setOptions: function setOptions(setOptionsAction) { - var options2 = typeof setOptionsAction === "function" ? setOptionsAction(state.options) : setOptionsAction; - cleanupModifierEffects(); - state.options = Object.assign({}, defaultOptions, state.options, options2); - state.scrollParents = { - reference: isElement(reference2) ? listScrollParents(reference2) : reference2.contextElement ? listScrollParents(reference2.contextElement) : [], - popper: listScrollParents(popper2) - }; - var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers2, state.options.modifiers))); - state.orderedModifiers = orderedModifiers.filter(function(m) { - return m.enabled; - }); - runModifierEffects(); - return instance.update(); - }, - forceUpdate: function forceUpdate() { - if (isDestroyed) { - return; - } - var _state$elements = state.elements, reference3 = _state$elements.reference, popper3 = _state$elements.popper; - if (!areValidElements(reference3, popper3)) { - return; - } - state.rects = { - reference: getCompositeRect(reference3, getOffsetParent(popper3), state.options.strategy === "fixed"), - popper: getLayoutRect(popper3) - }; - state.reset = false; - state.placement = state.options.placement; - state.orderedModifiers.forEach(function(modifier) { - return state.modifiersData[modifier.name] = Object.assign({}, modifier.data); - }); - for (var index = 0; index < state.orderedModifiers.length; index++) { - if (state.reset === true) { - state.reset = false; - index = -1; - continue; - } - var _state$orderedModifie = state.orderedModifiers[index], fn2 = _state$orderedModifie.fn, _state$orderedModifie2 = _state$orderedModifie.options, _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2, name = _state$orderedModifie.name; - if (typeof fn2 === "function") { - state = fn2({ - state, - options: _options, - name, - instance - }) || state; - } - } - }, - update: debounce(function() { - return new Promise(function(resolve) { - instance.forceUpdate(); - resolve(state); - }); - }), - destroy: function destroy() { - cleanupModifierEffects(); - isDestroyed = true; - } - }; - if (!areValidElements(reference2, popper2)) { - return instance; - } - instance.setOptions(options).then(function(state2) { - if (!isDestroyed && options.onFirstUpdate) { - options.onFirstUpdate(state2); - } - }); - function runModifierEffects() { - state.orderedModifiers.forEach(function(_ref) { - var name = _ref.name, _ref$options = _ref.options, options2 = _ref$options === void 0 ? {} : _ref$options, effect4 = _ref.effect; - if (typeof effect4 === "function") { - var cleanupFn = effect4({ - state, - name, - instance, - options: options2 - }); - var noopFn = function noopFn2() { - }; - effectCleanupFns.push(cleanupFn || noopFn); - } - }); - } - function cleanupModifierEffects() { - effectCleanupFns.forEach(function(fn2) { - return fn2(); - }); - effectCleanupFns = []; - } - return instance; - }; -} - -// node_modules/@popperjs/core/lib/popper.js -var defaultModifiers = [eventListeners_default, popperOffsets_default, computeStyles_default, applyStyles_default, offset_default, flip_default, preventOverflow_default, arrow_default, hide_default]; -var createPopper = /* @__PURE__ */ popperGenerator({ - defaultModifiers -}); - -// src/settings/suggesters/suggest.ts -var wrapAround = (value, size) => { - return (value % size + size) % size; -}; -var Suggest = class { - constructor(owner, containerEl, scope) { - this.owner = owner; - this.containerEl = containerEl; - containerEl.on("click", ".suggestion-item", this.onSuggestionClick.bind(this)); - containerEl.on("mousemove", ".suggestion-item", this.onSuggestionMouseover.bind(this)); - scope.register([], "ArrowUp", (event) => { - if (!event.isComposing) { - this.setSelectedItem(this.selectedItem - 1, true); - return false; - } - }); - scope.register([], "ArrowDown", (event) => { - if (!event.isComposing) { - this.setSelectedItem(this.selectedItem + 1, true); - return false; - } - }); - scope.register([], "Enter", (event) => { - if (!event.isComposing) { - this.useSelectedItem(event); - return false; - } - }); - } - onSuggestionClick(event, el) { - event.preventDefault(); - const item = this.suggestions.indexOf(el); - this.setSelectedItem(item, false); - this.useSelectedItem(event); - } - onSuggestionMouseover(_event, el) { - const item = this.suggestions.indexOf(el); - this.setSelectedItem(item, false); - } - setSuggestions(values) { - this.containerEl.empty(); - const suggestionEls = []; - values.forEach((value) => { - const suggestionEl = this.containerEl.createDiv("suggestion-item"); - this.owner.renderSuggestion(value, suggestionEl); - suggestionEls.push(suggestionEl); - }); - this.values = values; - this.suggestions = suggestionEls; - this.setSelectedItem(0, false); - } - useSelectedItem(event) { - const currentValue = this.values[this.selectedItem]; - if (currentValue) { - this.owner.selectSuggestion(currentValue, event); - } - } - setSelectedItem(selectedIndex, scrollIntoView) { - const normalizedIndex = wrapAround(selectedIndex, this.suggestions.length); - const prevSelectedSuggestion = this.suggestions[this.selectedItem]; - const selectedSuggestion = this.suggestions[normalizedIndex]; - prevSelectedSuggestion?.removeClass("is-selected"); - selectedSuggestion?.addClass("is-selected"); - this.selectedItem = normalizedIndex; - if (scrollIntoView) { - selectedSuggestion.scrollIntoView(false); - } - } -}; -var TextInputSuggest = class { - constructor(inputEl) { - this.inputEl = inputEl; - this.scope = new import_obsidian2.Scope(); - this.suggestEl = createDiv("suggestion-container"); - const suggestion = this.suggestEl.createDiv("suggestion"); - this.suggest = new Suggest(this, suggestion, this.scope); - this.scope.register([], "Escape", this.close.bind(this)); - this.inputEl.addEventListener("input", this.onInputChanged.bind(this)); - this.inputEl.addEventListener("focus", this.onInputChanged.bind(this)); - this.inputEl.addEventListener("blur", this.close.bind(this)); - this.suggestEl.on("mousedown", ".suggestion-container", (event) => { - event.preventDefault(); - }); - } - onInputChanged() { - const inputStr = this.inputEl.value; - const suggestions = this.getSuggestions(inputStr); - if (!suggestions) { - this.close(); - return; - } - if (suggestions.length > 0) { - this.suggest.setSuggestions(suggestions); - this.open(app.dom.appContainerEl, this.inputEl); - } else { - this.close(); - } - } - open(container, inputEl) { - app.keymap.pushScope(this.scope); - container.appendChild(this.suggestEl); - this.popper = createPopper(inputEl, this.suggestEl, { - placement: "bottom-start", - modifiers: [ - { - name: "sameWidth", - enabled: true, - fn: ({ state, instance }) => { - const targetWidth = `${state.rects.reference.width}px`; - if (state.styles.popper.width === targetWidth) { - return; - } - state.styles.popper.width = targetWidth; - instance.update(); - }, - phase: "beforeWrite", - requires: ["computeStyles"] - } - ] - }); - } - close() { - app.keymap.popScope(this.scope); - this.suggest.setSuggestions([]); - if (this.popper) - this.popper.destroy(); - this.suggestEl.detach(); - } -}; - -// src/settings/suggesters/FolderSuggester.ts -var FolderSuggest = class extends TextInputSuggest { - getSuggestions(inputStr) { - const abstractFiles = app.vault.getAllLoadedFiles(); - const folders = []; - const lowerCaseInputStr = inputStr.toLowerCase(); - abstractFiles.forEach((folder) => { - if (folder instanceof import_obsidian3.TFolder && folder.path.toLowerCase().contains(lowerCaseInputStr)) { - folders.push(folder); - } - }); - return folders; - } - renderSuggestion(file, el) { - el.setText(file.path); - } - selectSuggestion(file) { - this.inputEl.value = file.path; - this.inputEl.trigger("input"); - this.close(); - } -}; - -// src/settings/suggesters/FileSuggester.ts -var import_obsidian5 = __toModule(require("obsidian")); - -// src/utils/Utils.ts -var import_obsidian4 = __toModule(require("obsidian")); -function delay(ms) { - return new Promise((resolve) => setTimeout(resolve, ms)); -} -function escape_RegExp(str) { - return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); -} -function generate_dynamic_command_regex() { - return /(<%(?:-|_)?\s*[*~]{0,1})\+((?:.|\s)*?%>)/g; -} -function resolve_tfolder(folder_str) { - folder_str = (0, import_obsidian4.normalizePath)(folder_str); - const folder = app.vault.getAbstractFileByPath(folder_str); - if (!folder) { - throw new TemplaterError(`Folder "${folder_str}" doesn't exist`); - } - if (!(folder instanceof import_obsidian4.TFolder)) { - throw new TemplaterError(`${folder_str} is a file, not a folder`); - } - return folder; -} -function resolve_tfile(file_str) { - file_str = (0, import_obsidian4.normalizePath)(file_str); - const file = app.vault.getAbstractFileByPath(file_str); - if (!file) { - throw new TemplaterError(`File "${file_str}" doesn't exist`); - } - if (!(file instanceof import_obsidian4.TFile)) { - throw new TemplaterError(`${file_str} is a folder, not a file`); - } - return file; -} -function get_tfiles_from_folder(folder_str) { - const folder = resolve_tfolder(folder_str); - const files = []; - import_obsidian4.Vault.recurseChildren(folder, (file) => { - if (file instanceof import_obsidian4.TFile) { - files.push(file); - } - }); - files.sort((a, b) => { - return a.basename.localeCompare(b.basename); - }); - return files; -} -function arraymove(arr, fromIndex, toIndex) { - if (toIndex < 0 || toIndex === arr.length) { - return; - } - const element = arr[fromIndex]; - arr[fromIndex] = arr[toIndex]; - arr[toIndex] = element; -} -function get_active_file(app2) { - return app2.workspace.activeEditor?.file ?? app2.workspace.getActiveFile(); -} - -// src/settings/suggesters/FileSuggester.ts -var FileSuggestMode; -(function(FileSuggestMode2) { - FileSuggestMode2[FileSuggestMode2["TemplateFiles"] = 0] = "TemplateFiles"; - FileSuggestMode2[FileSuggestMode2["ScriptFiles"] = 1] = "ScriptFiles"; -})(FileSuggestMode || (FileSuggestMode = {})); -var FileSuggest = class extends TextInputSuggest { - constructor(inputEl, plugin, mode) { - super(inputEl); - this.inputEl = inputEl; - this.plugin = plugin; - this.mode = mode; - } - get_folder(mode) { - switch (mode) { - case 0: - return this.plugin.settings.templates_folder; - case 1: - return this.plugin.settings.user_scripts_folder; - } - } - get_error_msg(mode) { - switch (mode) { - case 0: - return `Templates folder doesn't exist`; - case 1: - return `User Scripts folder doesn't exist`; - } - } - getSuggestions(input_str) { - const all_files = errorWrapperSync(() => get_tfiles_from_folder(this.get_folder(this.mode)), this.get_error_msg(this.mode)); - if (!all_files) { - return []; - } - const files = []; - const lower_input_str = input_str.toLowerCase(); - all_files.forEach((file) => { - if (file instanceof import_obsidian5.TFile && file.extension === "md" && file.path.toLowerCase().contains(lower_input_str)) { - files.push(file); - } - }); - return files; - } - renderSuggestion(file, el) { - el.setText(file.path); - } - selectSuggestion(file) { - this.inputEl.value = file.path; - this.inputEl.trigger("input"); - this.close(); - } -}; - -// src/settings/Settings.ts -var DEFAULT_SETTINGS = { - command_timeout: 5, - templates_folder: "", - templates_pairs: [["", ""]], - trigger_on_file_creation: false, - auto_jump_to_cursor: false, - enable_system_commands: false, - shell_path: "", - user_scripts_folder: "", - enable_folder_templates: true, - folder_templates: [{ folder: "", template: "" }], - syntax_highlighting: true, - syntax_highlighting_mobile: false, - enabled_templates_hotkeys: [""], - startup_templates: [""], - enable_ribbon_icon: true -}; -var TemplaterSettingTab = class extends import_obsidian6.PluginSettingTab { - constructor(plugin) { - super(app, plugin); - this.plugin = plugin; - } - display() { - this.containerEl.empty(); - this.add_general_setting_header(); - this.add_template_folder_setting(); - this.add_internal_functions_setting(); - this.add_syntax_highlighting_settings(); - this.add_auto_jump_to_cursor(); - this.add_trigger_on_new_file_creation_setting(); - this.add_ribbon_icon_setting(); - this.add_templates_hotkeys_setting(); - if (this.plugin.settings.trigger_on_file_creation) { - this.add_folder_templates_setting(); - } - this.add_startup_templates_setting(); - this.add_user_script_functions_setting(); - this.add_user_system_command_functions_setting(); - this.add_donating_setting(); - } - add_general_setting_header() { - this.containerEl.createEl("h2", { text: "General Settings" }); - } - add_template_folder_setting() { - new import_obsidian6.Setting(this.containerEl).setName("Template folder location").setDesc("Files in this folder will be available as templates.").addSearch((cb) => { - new FolderSuggest(cb.inputEl); - cb.setPlaceholder("Example: folder1/folder2").setValue(this.plugin.settings.templates_folder).onChange((new_folder) => { - this.plugin.settings.templates_folder = new_folder; - this.plugin.save_settings(); - }); - cb.containerEl.addClass("templater_search"); - }); - } - add_internal_functions_setting() { - const desc = document.createDocumentFragment(); - desc.append("Templater provides multiples predefined variables / functions that you can use.", desc.createEl("br"), "Check the ", desc.createEl("a", { - href: "https://silentvoid13.github.io/Templater/", - text: "documentation" - }), " to get a list of all the available internal variables / functions."); - new import_obsidian6.Setting(this.containerEl).setName("Internal Variables and Functions").setDesc(desc); - } - add_syntax_highlighting_settings() { - const desktopDesc = document.createDocumentFragment(); - desktopDesc.append("Adds syntax highlighting for Templater commands in edit mode."); - const mobileDesc = document.createDocumentFragment(); - mobileDesc.append("Adds syntax highlighting for Templater commands in edit mode on mobile. Use with caution: this may break live preview on mobile platforms."); - new import_obsidian6.Setting(this.containerEl).setName("Syntax Highlighting on Desktop").setDesc(desktopDesc).addToggle((toggle) => { - toggle.setValue(this.plugin.settings.syntax_highlighting).onChange((syntax_highlighting) => { - this.plugin.settings.syntax_highlighting = syntax_highlighting; - this.plugin.save_settings(); - this.plugin.event_handler.update_syntax_highlighting(); - }); - }); - new import_obsidian6.Setting(this.containerEl).setName("Syntax Highlighting on Mobile").setDesc(mobileDesc).addToggle((toggle) => { - toggle.setValue(this.plugin.settings.syntax_highlighting_mobile).onChange((syntax_highlighting_mobile) => { - this.plugin.settings.syntax_highlighting_mobile = syntax_highlighting_mobile; - this.plugin.save_settings(); - this.plugin.event_handler.update_syntax_highlighting(); - }); - }); - } - add_auto_jump_to_cursor() { - const desc = document.createDocumentFragment(); - desc.append("Automatically triggers ", desc.createEl("code", { text: "tp.file.cursor" }), " after inserting a template.", desc.createEl("br"), "You can also set a hotkey to manually trigger ", desc.createEl("code", { text: "tp.file.cursor" }), "."); - new import_obsidian6.Setting(this.containerEl).setName("Automatic jump to cursor").setDesc(desc).addToggle((toggle) => { - toggle.setValue(this.plugin.settings.auto_jump_to_cursor).onChange((auto_jump_to_cursor) => { - this.plugin.settings.auto_jump_to_cursor = auto_jump_to_cursor; - this.plugin.save_settings(); - }); - }); - } - add_trigger_on_new_file_creation_setting() { - const desc = document.createDocumentFragment(); - desc.append("Templater will listen for the new file creation event, and replace every command it finds in the new file's content.", desc.createEl("br"), "This makes Templater compatible with other plugins like the Daily note core plugin, Calendar plugin, Review plugin, Note refactor plugin, ...", desc.createEl("br"), desc.createEl("b", { - text: "Warning: " - }), "This can be dangerous if you create new files with unknown / unsafe content on creation. Make sure that every new file's content is safe on creation."); - new import_obsidian6.Setting(this.containerEl).setName("Trigger Templater on new file creation").setDesc(desc).addToggle((toggle) => { - toggle.setValue(this.plugin.settings.trigger_on_file_creation).onChange((trigger_on_file_creation) => { - this.plugin.settings.trigger_on_file_creation = trigger_on_file_creation; - this.plugin.save_settings(); - this.plugin.event_handler.update_trigger_file_on_creation(); - this.display(); - }); - }); - } - add_ribbon_icon_setting() { - const desc = document.createDocumentFragment(); - desc.append("Show Templater icon in sidebar ribbon, allowing you to quickly use templates anywhere."); - new import_obsidian6.Setting(this.containerEl).setName("Show icon in sidebar").setDesc(desc).addToggle((toggle) => { - toggle.setValue(this.plugin.settings.enable_ribbon_icon).onChange((enable_ribbon_icon) => { - this.plugin.settings.enable_ribbon_icon = enable_ribbon_icon; - this.plugin.save_settings(); - if (this.plugin.settings.enable_ribbon_icon) { - this.plugin.addRibbonIcon("templater-icon", "Templater", async () => { - this.plugin.fuzzy_suggester.insert_template(); - }).setAttribute("id", "rb-templater-icon"); - } else { - document.getElementById("rb-templater-icon")?.remove(); - } - }); - }); - } - add_templates_hotkeys_setting() { - this.containerEl.createEl("h2", { text: "Template Hotkeys" }); - const desc = document.createDocumentFragment(); - desc.append("Template Hotkeys allows you to bind a template to a hotkey."); - new import_obsidian6.Setting(this.containerEl).setDesc(desc); - this.plugin.settings.enabled_templates_hotkeys.forEach((template, index) => { - const s = new import_obsidian6.Setting(this.containerEl).addSearch((cb) => { - new FileSuggest(cb.inputEl, this.plugin, FileSuggestMode.TemplateFiles); - cb.setPlaceholder("Example: folder1/template_file").setValue(template).onChange((new_template) => { - if (new_template && this.plugin.settings.enabled_templates_hotkeys.contains(new_template)) { - log_error(new TemplaterError("This template is already bound to a hotkey")); - return; - } - this.plugin.command_handler.add_template_hotkey(this.plugin.settings.enabled_templates_hotkeys[index], new_template); - this.plugin.settings.enabled_templates_hotkeys[index] = new_template; - this.plugin.save_settings(); - }); - cb.containerEl.addClass("templater_search"); - }).addExtraButton((cb) => { - cb.setIcon("any-key").setTooltip("Configure Hotkey").onClick(() => { - app.setting.openTabById("hotkeys"); - const tab = app.setting.activeTab; - tab.searchInputEl.value = "Templater: Insert"; - tab.updateHotkeyVisibility(); - }); - }).addExtraButton((cb) => { - cb.setIcon("up-chevron-glyph").setTooltip("Move up").onClick(() => { - arraymove(this.plugin.settings.enabled_templates_hotkeys, index, index - 1); - this.plugin.save_settings(); - this.display(); - }); - }).addExtraButton((cb) => { - cb.setIcon("down-chevron-glyph").setTooltip("Move down").onClick(() => { - arraymove(this.plugin.settings.enabled_templates_hotkeys, index, index + 1); - this.plugin.save_settings(); - this.display(); - }); - }).addExtraButton((cb) => { - cb.setIcon("cross").setTooltip("Delete").onClick(() => { - this.plugin.command_handler.remove_template_hotkey(this.plugin.settings.enabled_templates_hotkeys[index]); - this.plugin.settings.enabled_templates_hotkeys.splice(index, 1); - this.plugin.save_settings(); - this.display(); - }); - }); - s.infoEl.remove(); - }); - new import_obsidian6.Setting(this.containerEl).addButton((cb) => { - cb.setButtonText("Add new hotkey for template").setCta().onClick(() => { - this.plugin.settings.enabled_templates_hotkeys.push(""); - this.plugin.save_settings(); - this.display(); - }); - }); - } - add_folder_templates_setting() { - this.containerEl.createEl("h2", { text: "Folder Templates" }); - const descHeading = document.createDocumentFragment(); - descHeading.append("Folder Templates are triggered when a new ", descHeading.createEl("strong", { text: "empty " }), "file is created in a given folder.", descHeading.createEl("br"), "Templater will fill the empty file with the specified template.", descHeading.createEl("br"), "The deepest match is used. A global default template would be defined on the root ", descHeading.createEl("code", { text: "/" }), "."); - new import_obsidian6.Setting(this.containerEl).setDesc(descHeading); - const descUseNewFileTemplate = document.createDocumentFragment(); - descUseNewFileTemplate.append("When enabled Templater will make use of the folder templates defined below."); - new import_obsidian6.Setting(this.containerEl).setName("Enable Folder Templates").setDesc(descUseNewFileTemplate).addToggle((toggle) => { - toggle.setValue(this.plugin.settings.enable_folder_templates).onChange((use_new_file_templates) => { - this.plugin.settings.enable_folder_templates = use_new_file_templates; - this.plugin.save_settings(); - this.display(); - }); - }); - if (!this.plugin.settings.enable_folder_templates) { - return; - } - new import_obsidian6.Setting(this.containerEl).setName("Add New").setDesc("Add new folder template").addButton((button) => { - button.setTooltip("Add additional folder template").setButtonText("+").setCta().onClick(() => { - this.plugin.settings.folder_templates.push({ - folder: "", - template: "" - }); - this.plugin.save_settings(); - this.display(); - }); - }); - this.plugin.settings.folder_templates.forEach((folder_template, index) => { - const s = new import_obsidian6.Setting(this.containerEl).addSearch((cb) => { - new FolderSuggest(cb.inputEl); - cb.setPlaceholder("Folder").setValue(folder_template.folder).onChange((new_folder) => { - if (new_folder && this.plugin.settings.folder_templates.some((e) => e.folder == new_folder)) { - log_error(new TemplaterError("This folder already has a template associated with it")); - return; - } - this.plugin.settings.folder_templates[index].folder = new_folder; - this.plugin.save_settings(); - }); - cb.containerEl.addClass("templater_search"); - }).addSearch((cb) => { - new FileSuggest(cb.inputEl, this.plugin, FileSuggestMode.TemplateFiles); - cb.setPlaceholder("Template").setValue(folder_template.template).onChange((new_template) => { - this.plugin.settings.folder_templates[index].template = new_template; - this.plugin.save_settings(); - }); - cb.containerEl.addClass("templater_search"); - }).addExtraButton((cb) => { - cb.setIcon("up-chevron-glyph").setTooltip("Move up").onClick(() => { - arraymove(this.plugin.settings.folder_templates, index, index - 1); - this.plugin.save_settings(); - this.display(); - }); - }).addExtraButton((cb) => { - cb.setIcon("down-chevron-glyph").setTooltip("Move down").onClick(() => { - arraymove(this.plugin.settings.folder_templates, index, index + 1); - this.plugin.save_settings(); - this.display(); - }); - }).addExtraButton((cb) => { - cb.setIcon("cross").setTooltip("Delete").onClick(() => { - this.plugin.settings.folder_templates.splice(index, 1); - this.plugin.save_settings(); - this.display(); - }); - }); - s.infoEl.remove(); - }); - } - add_startup_templates_setting() { - this.containerEl.createEl("h2", { text: "Startup Templates" }); - const desc = document.createDocumentFragment(); - desc.append("Startup Templates are templates that will get executed once when Templater starts.", desc.createEl("br"), "These templates won't output anything.", desc.createEl("br"), "This can be useful to set up templates adding hooks to obsidian events for example."); - new import_obsidian6.Setting(this.containerEl).setDesc(desc); - this.plugin.settings.startup_templates.forEach((template, index) => { - const s = new import_obsidian6.Setting(this.containerEl).addSearch((cb) => { - new FileSuggest(cb.inputEl, this.plugin, FileSuggestMode.TemplateFiles); - cb.setPlaceholder("Example: folder1/template_file").setValue(template).onChange((new_template) => { - if (new_template && this.plugin.settings.startup_templates.contains(new_template)) { - log_error(new TemplaterError("This startup template already exist")); - return; - } - this.plugin.settings.startup_templates[index] = new_template; - this.plugin.save_settings(); - }); - cb.containerEl.addClass("templater_search"); - }).addExtraButton((cb) => { - cb.setIcon("cross").setTooltip("Delete").onClick(() => { - this.plugin.settings.startup_templates.splice(index, 1); - this.plugin.save_settings(); - this.display(); - }); - }); - s.infoEl.remove(); - }); - new import_obsidian6.Setting(this.containerEl).addButton((cb) => { - cb.setButtonText("Add new startup template").setCta().onClick(() => { - this.plugin.settings.startup_templates.push(""); - this.plugin.save_settings(); - this.display(); - }); - }); - } - add_user_script_functions_setting() { - this.containerEl.createEl("h2", { text: "User Script Functions" }); - let desc = document.createDocumentFragment(); - desc.append("All JavaScript files in this folder will be loaded as CommonJS modules, to import custom user functions.", desc.createEl("br"), "The folder needs to be accessible from the vault.", desc.createEl("br"), "Check the ", desc.createEl("a", { - href: "https://silentvoid13.github.io/Templater/", - text: "documentation" - }), " for more information."); - new import_obsidian6.Setting(this.containerEl).setName("Script files folder location").setDesc(desc).addSearch((cb) => { - new FolderSuggest(cb.inputEl); - cb.setPlaceholder("Example: folder1/folder2").setValue(this.plugin.settings.user_scripts_folder).onChange((new_folder) => { - this.plugin.settings.user_scripts_folder = new_folder; - this.plugin.save_settings(); - }); - cb.containerEl.addClass("templater_search"); - }); - desc = document.createDocumentFragment(); - let name; - if (!this.plugin.settings.user_scripts_folder) { - name = "No User Scripts folder set"; - } else { - const files = errorWrapperSync(() => get_tfiles_from_folder(this.plugin.settings.user_scripts_folder), `User Scripts folder doesn't exist`); - if (!files || files.length === 0) { - name = "No User Scripts detected"; - } else { - let count = 0; - for (const file of files) { - if (file.extension === "js") { - count++; - desc.append(desc.createEl("li", { - text: `tp.user.${file.basename}` - })); - } - } - name = `Detected ${count} User Script(s)`; - } - } - new import_obsidian6.Setting(this.containerEl).setName(name).setDesc(desc).addExtraButton((extra) => { - extra.setIcon("sync").setTooltip("Refresh").onClick(() => { - this.display(); - }); - }); - } - add_user_system_command_functions_setting() { - let desc = document.createDocumentFragment(); - desc.append("Allows you to create user functions linked to system commands.", desc.createEl("br"), desc.createEl("b", { - text: "Warning: " - }), "It can be dangerous to execute arbitrary system commands from untrusted sources. Only run system commands that you understand, from trusted sources."); - this.containerEl.createEl("h2", { - text: "User System Command Functions" - }); - new import_obsidian6.Setting(this.containerEl).setName("Enable User System Command Functions").setDesc(desc).addToggle((toggle) => { - toggle.setValue(this.plugin.settings.enable_system_commands).onChange((enable_system_commands) => { - this.plugin.settings.enable_system_commands = enable_system_commands; - this.plugin.save_settings(); - this.display(); - }); - }); - if (this.plugin.settings.enable_system_commands) { - new import_obsidian6.Setting(this.containerEl).setName("Timeout").setDesc("Maximum timeout in seconds for a system command.").addText((text) => { - text.setPlaceholder("Timeout").setValue(this.plugin.settings.command_timeout.toString()).onChange((new_value) => { - const new_timeout = Number(new_value); - if (isNaN(new_timeout)) { - log_error(new TemplaterError("Timeout must be a number")); - return; - } - this.plugin.settings.command_timeout = new_timeout; - this.plugin.save_settings(); - }); - }); - desc = document.createDocumentFragment(); - desc.append("Full path to the shell binary to execute the command with.", desc.createEl("br"), "This setting is optional and will default to the system's default shell if not specified.", desc.createEl("br"), "You can use forward slashes ('/') as path separators on all platforms if in doubt."); - new import_obsidian6.Setting(this.containerEl).setName("Shell binary location").setDesc(desc).addText((text) => { - text.setPlaceholder("Example: /bin/bash, ...").setValue(this.plugin.settings.shell_path).onChange((shell_path) => { - this.plugin.settings.shell_path = shell_path; - this.plugin.save_settings(); - }); - }); - let i = 1; - this.plugin.settings.templates_pairs.forEach((template_pair) => { - const div2 = this.containerEl.createEl("div"); - div2.addClass("templater_div"); - const title = this.containerEl.createEl("h4", { - text: "User Function n\xB0" + i - }); - title.addClass("templater_title"); - const setting2 = new import_obsidian6.Setting(this.containerEl).addExtraButton((extra) => { - extra.setIcon("cross").setTooltip("Delete").onClick(() => { - const index = this.plugin.settings.templates_pairs.indexOf(template_pair); - if (index > -1) { - this.plugin.settings.templates_pairs.splice(index, 1); - this.plugin.save_settings(); - this.display(); - } - }); - }).addText((text) => { - const t = text.setPlaceholder("Function name").setValue(template_pair[0]).onChange((new_value) => { - const index = this.plugin.settings.templates_pairs.indexOf(template_pair); - if (index > -1) { - this.plugin.settings.templates_pairs[index][0] = new_value; - this.plugin.save_settings(); - } - }); - t.inputEl.addClass("templater_template"); - return t; - }).addTextArea((text) => { - const t = text.setPlaceholder("System Command").setValue(template_pair[1]).onChange((new_cmd) => { - const index = this.plugin.settings.templates_pairs.indexOf(template_pair); - if (index > -1) { - this.plugin.settings.templates_pairs[index][1] = new_cmd; - this.plugin.save_settings(); - } - }); - t.inputEl.setAttr("rows", 2); - t.inputEl.addClass("templater_cmd"); - return t; - }); - setting2.infoEl.remove(); - div2.appendChild(title); - div2.appendChild(this.containerEl.lastChild); - i += 1; - }); - const div = this.containerEl.createEl("div"); - div.addClass("templater_div2"); - const setting = new import_obsidian6.Setting(this.containerEl).addButton((button) => { - button.setButtonText("Add New User Function").setCta().onClick(() => { - this.plugin.settings.templates_pairs.push(["", ""]); - this.plugin.save_settings(); - this.display(); - }); - }); - setting.infoEl.remove(); - div.appendChild(this.containerEl.lastChild); - } - } - add_donating_setting() { - const s = new import_obsidian6.Setting(this.containerEl).setName("Donate").setDesc("If you like this Plugin, consider donating to support continued development."); - const a1 = document.createElement("a"); - a1.setAttribute("href", "https://github.com/sponsors/silentvoid13"); - a1.addClass("templater_donating"); - const img1 = document.createElement("img"); - img1.src = "https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86"; - a1.appendChild(img1); - const a2 = document.createElement("a"); - a2.setAttribute("href", "https://www.paypal.com/donate?hosted_button_id=U2SRGAFYXT32Q"); - a2.addClass("templater_donating"); - const img2 = document.createElement("img"); - img2.src = "https://img.shields.io/badge/paypal-silentvoid13-yellow?style=social&logo=paypal"; - a2.appendChild(img2); - s.settingEl.appendChild(a1); - s.settingEl.appendChild(a2); - } -}; - -// src/handlers/FuzzySuggester.ts -var import_obsidian7 = __toModule(require("obsidian")); -var OpenMode; -(function(OpenMode2) { - OpenMode2[OpenMode2["InsertTemplate"] = 0] = "InsertTemplate"; - OpenMode2[OpenMode2["CreateNoteTemplate"] = 1] = "CreateNoteTemplate"; -})(OpenMode || (OpenMode = {})); -var FuzzySuggester = class extends import_obsidian7.FuzzySuggestModal { - constructor(plugin) { - super(app); - this.plugin = plugin; - this.setPlaceholder("Type name of a template..."); - } - getItems() { - if (!this.plugin.settings.templates_folder) { - return app.vault.getMarkdownFiles(); - } - const files = errorWrapperSync(() => get_tfiles_from_folder(this.plugin.settings.templates_folder), `Couldn't retrieve template files from templates folder ${this.plugin.settings.templates_folder}`); - if (!files) { - return []; - } - return files; - } - getItemText(item) { - return item.basename; - } - onChooseItem(item) { - switch (this.open_mode) { - case 0: - this.plugin.templater.append_template_to_active_file(item); - break; - case 1: - this.plugin.templater.create_new_note_from_template(item, this.creation_folder); - break; - } - } - start() { - try { - this.open(); - } catch (e) { - log_error(e); - } - } - insert_template() { - this.open_mode = 0; - this.start(); - } - create_new_note_from_template(folder) { - this.creation_folder = folder; - this.open_mode = 1; - this.start(); - } -}; - -// src/utils/Constants.ts -var UNSUPPORTED_MOBILE_TEMPLATE = "Error_MobileUnsupportedTemplate"; -var ICON_DATA = ``; - -// src/core/Templater.ts -var import_obsidian13 = __toModule(require("obsidian")); - -// src/core/functions/internal_functions/InternalModule.ts -var InternalModule = class { - constructor(plugin) { - this.plugin = plugin; - this.static_functions = new Map(); - this.dynamic_functions = new Map(); - } - getName() { - return this.name; - } - async init() { - await this.create_static_templates(); - this.static_object = Object.fromEntries(this.static_functions); - } - async generate_object(new_config) { - this.config = new_config; - await this.create_dynamic_templates(); - return { - ...this.static_object, - ...Object.fromEntries(this.dynamic_functions) - }; - } -}; - -// src/core/functions/internal_functions/date/InternalModuleDate.ts -var InternalModuleDate = class extends InternalModule { - constructor() { - super(...arguments); - this.name = "date"; - } - async create_static_templates() { - this.static_functions.set("now", this.generate_now()); - this.static_functions.set("tomorrow", this.generate_tomorrow()); - this.static_functions.set("weekday", this.generate_weekday()); - this.static_functions.set("yesterday", this.generate_yesterday()); - } - async create_dynamic_templates() { - } - generate_now() { - return (format = "YYYY-MM-DD", offset2, reference2, reference_format) => { - if (reference2 && !window.moment(reference2, reference_format).isValid()) { - throw new TemplaterError("Invalid reference date format, try specifying one with the argument 'reference_format'"); - } - let duration; - if (typeof offset2 === "string") { - duration = window.moment.duration(offset2); - } else if (typeof offset2 === "number") { - duration = window.moment.duration(offset2, "days"); - } - return window.moment(reference2, reference_format).add(duration).format(format); - }; - } - generate_tomorrow() { - return (format = "YYYY-MM-DD") => { - return window.moment().add(1, "days").format(format); - }; - } - generate_weekday() { - return (format = "YYYY-MM-DD", weekday, reference2, reference_format) => { - if (reference2 && !window.moment(reference2, reference_format).isValid()) { - throw new TemplaterError("Invalid reference date format, try specifying one with the argument 'reference_format'"); - } - return window.moment(reference2, reference_format).weekday(weekday).format(format); - }; - } - generate_yesterday() { - return (format = "YYYY-MM-DD") => { - return window.moment().add(-1, "days").format(format); - }; - } -}; - -// src/core/functions/internal_functions/file/InternalModuleFile.ts -var import_obsidian8 = __toModule(require("obsidian")); -var DEPTH_LIMIT = 10; -var InternalModuleFile = class extends InternalModule { - constructor() { - super(...arguments); - this.name = "file"; - this.include_depth = 0; - this.create_new_depth = 0; - this.linkpath_regex = new RegExp("^\\[\\[(.*)\\]\\]$"); - } - async create_static_templates() { - this.static_functions.set("creation_date", this.generate_creation_date()); - this.static_functions.set("create_new", this.generate_create_new()); - this.static_functions.set("cursor", this.generate_cursor()); - this.static_functions.set("cursor_append", this.generate_cursor_append()); - this.static_functions.set("exists", this.generate_exists()); - this.static_functions.set("find_tfile", this.generate_find_tfile()); - this.static_functions.set("folder", this.generate_folder()); - this.static_functions.set("include", this.generate_include()); - this.static_functions.set("last_modified_date", this.generate_last_modified_date()); - this.static_functions.set("move", this.generate_move()); - this.static_functions.set("path", this.generate_path()); - this.static_functions.set("rename", this.generate_rename()); - this.static_functions.set("selection", this.generate_selection()); - } - async create_dynamic_templates() { - this.dynamic_functions.set("content", await this.generate_content()); - this.dynamic_functions.set("tags", this.generate_tags()); - this.dynamic_functions.set("title", this.generate_title()); - } - async generate_content() { - return await app.vault.read(this.config.target_file); - } - generate_create_new() { - return async (template, filename, open_new = false, folder) => { - this.create_new_depth += 1; - if (this.create_new_depth > DEPTH_LIMIT) { - this.create_new_depth = 0; - throw new TemplaterError("Reached create_new depth limit (max = 10)"); - } - const new_file = await this.plugin.templater.create_new_note_from_template(template, folder, filename, open_new); - this.create_new_depth -= 1; - return new_file; - }; - } - generate_creation_date() { - return (format = "YYYY-MM-DD HH:mm") => { - return window.moment(this.config.target_file.stat.ctime).format(format); - }; - } - generate_cursor() { - return (order2) => { - return `<% tp.file.cursor(${order2 ?? ""}) %>`; - }; - } - generate_cursor_append() { - return (content) => { - const active_editor = app.workspace.activeEditor; - if (!active_editor || !active_editor.editor) { - log_error(new TemplaterError("No active editor, can't append to cursor.")); - return; - } - const editor = active_editor.editor; - const doc = editor.getDoc(); - doc.replaceSelection(content); - return ""; - }; - } - generate_exists() { - return async (filename) => { - const path = (0, import_obsidian8.normalizePath)(filename); - return await app.vault.exists(path); - }; - } - generate_find_tfile() { - return (filename) => { - const path = (0, import_obsidian8.normalizePath)(filename); - return app.metadataCache.getFirstLinkpathDest(path, ""); - }; - } - generate_folder() { - return (relative = false) => { - const parent = this.config.target_file.parent; - let folder; - if (relative) { - folder = parent.path; - } else { - folder = parent.name; - } - return folder; - }; - } - generate_include() { - return async (include_link) => { - this.include_depth += 1; - if (this.include_depth > DEPTH_LIMIT) { - this.include_depth -= 1; - throw new TemplaterError("Reached inclusion depth limit (max = 10)"); - } - let inc_file_content; - if (include_link instanceof import_obsidian8.TFile) { - inc_file_content = await app.vault.read(include_link); - } else { - let match; - if ((match = this.linkpath_regex.exec(include_link)) === null) { - this.include_depth -= 1; - throw new TemplaterError("Invalid file format, provide an obsidian link between quotes."); - } - const { path, subpath } = (0, import_obsidian8.parseLinktext)(match[1]); - const inc_file = app.metadataCache.getFirstLinkpathDest(path, ""); - if (!inc_file) { - this.include_depth -= 1; - throw new TemplaterError(`File ${include_link} doesn't exist`); - } - inc_file_content = await app.vault.read(inc_file); - if (subpath) { - const cache = app.metadataCache.getFileCache(inc_file); - if (cache) { - const result = (0, import_obsidian8.resolveSubpath)(cache, subpath); - if (result) { - inc_file_content = inc_file_content.slice(result.start.offset, result.end?.offset); - } - } - } - } - try { - const parsed_content = await this.plugin.templater.parser.parse_commands(inc_file_content, this.plugin.templater.current_functions_object); - this.include_depth -= 1; - return parsed_content; - } catch (e) { - this.include_depth -= 1; - throw e; - } - }; - } - generate_last_modified_date() { - return (format = "YYYY-MM-DD HH:mm") => { - return window.moment(this.config.target_file.stat.mtime).format(format); - }; - } - generate_move() { - return async (path, file_to_move) => { - const file = file_to_move || this.config.target_file; - const new_path = (0, import_obsidian8.normalizePath)(`${path}.${file.extension}`); - const dirs = new_path.replace(/\\/g, "/").split("/"); - dirs.pop(); - if (dirs.length) { - const dir = dirs.join("/"); - if (!window.app.vault.getAbstractFileByPath(dir)) { - await window.app.vault.createFolder(dir); - } - } - await app.fileManager.renameFile(file, new_path); - return ""; - }; - } - generate_path() { - return (relative = false) => { - let vault_path = ""; - if (import_obsidian8.Platform.isMobileApp) { - const vault_adapter = app.vault.adapter.fs.uri; - const vault_base = app.vault.adapter.basePath; - vault_path = `${vault_adapter}/${vault_base}`; - } else { - if (app.vault.adapter instanceof import_obsidian8.FileSystemAdapter) { - vault_path = app.vault.adapter.getBasePath(); - } else { - throw new TemplaterError("app.vault is not a FileSystemAdapter instance"); - } - } - if (relative) { - return this.config.target_file.path; - } else { - return `${vault_path}/${this.config.target_file.path}`; - } - }; - } - generate_rename() { - return async (new_title) => { - if (new_title.match(/[\\/:]+/g)) { - throw new TemplaterError("File name cannot contain any of these characters: \\ / :"); - } - const new_path = (0, import_obsidian8.normalizePath)(`${this.config.target_file.parent.path}/${new_title}.${this.config.target_file.extension}`); - await app.fileManager.renameFile(this.config.target_file, new_path); - return ""; - }; - } - generate_selection() { - return () => { - const active_editor = app.workspace.activeEditor; - if (!active_editor || !active_editor.editor) { - throw new TemplaterError("Active editor is null, can't read selection."); - } - const editor = active_editor.editor; - return editor.getSelection(); - }; - } - generate_tags() { - const cache = app.metadataCache.getFileCache(this.config.target_file); - if (cache) { - return (0, import_obsidian8.getAllTags)(cache); - } - return null; - } - generate_title() { - return this.config.target_file.basename; - } -}; - -// src/core/functions/internal_functions/web/InternalModuleWeb.ts -var InternalModuleWeb = class extends InternalModule { - constructor() { - super(...arguments); - this.name = "web"; - } - async create_static_templates() { - this.static_functions.set("daily_quote", this.generate_daily_quote()); - this.static_functions.set("random_picture", this.generate_random_picture()); - } - async create_dynamic_templates() { - } - async getRequest(url) { - try { - const response = await fetch(url); - if (!response.ok) { - throw new TemplaterError("Error performing GET request"); - } - return response; - } catch (error) { - throw new TemplaterError("Error performing GET request"); - } - } - generate_daily_quote() { - return async () => { - try { - const response = await this.getRequest("https://api.quotable.io/random"); - const json = await response.json(); - const author = json.author; - const quote = json.content; - const new_content = `> ${quote} -> \u2014 ${author}`; - return new_content; - } catch (error) { - new TemplaterError("Error generating daily quote"); - return "Error generating daily quote"; - } - }; - } - generate_random_picture() { - return async (size, query, include_size = false) => { - try { - const response = await this.getRequest(`https://templater-unsplash.fly.dev/${query ? "?q=" + query : ""}`).then((res) => res.json()); - let url = response.full; - if (size && !include_size) { - if (size.includes("x")) { - const [width, height] = size.split("x"); - url = url.concat(`&w=${width}&h=${height}`); - } else { - url = url.concat(`&w=${size}`); - } - } - if (include_size) { - return `![photo by ${response.photog} on Unsplash|${size}](${url})`; - } - return `![photo by ${response.photog} on Unsplash](${url})`; - } catch (error) { - new TemplaterError("Error generating random picture"); - return "Error generating random picture"; - } - }; - } -}; - -// src/core/functions/internal_functions/frontmatter/InternalModuleFrontmatter.ts -var InternalModuleFrontmatter = class extends InternalModule { - constructor() { - super(...arguments); - this.name = "frontmatter"; - } - async create_static_templates() { - } - async create_dynamic_templates() { - const cache = app.metadataCache.getFileCache(this.config.target_file); - this.dynamic_functions = new Map(Object.entries(cache?.frontmatter || {})); - } -}; - -// src/core/functions/internal_functions/system/InternalModuleSystem.ts -var import_obsidian11 = __toModule(require("obsidian")); - -// src/core/functions/internal_functions/system/PromptModal.ts -var import_obsidian9 = __toModule(require("obsidian")); -var PromptModal = class extends import_obsidian9.Modal { - constructor(prompt_text, default_value, multi_line) { - super(app); - this.prompt_text = prompt_text; - this.default_value = default_value; - this.multi_line = multi_line; - this.submitted = false; - } - onOpen() { - this.titleEl.setText(this.prompt_text); - this.createForm(); - } - onClose() { - this.contentEl.empty(); - if (!this.submitted) { - this.reject(); - } - } - createForm() { - const div = this.contentEl.createDiv(); - div.addClass("templater-prompt-div"); - let textInput; - if (this.multi_line) { - textInput = new import_obsidian9.TextAreaComponent(div); - const buttonDiv = this.contentEl.createDiv(); - buttonDiv.addClass("templater-button-div"); - const submitButton = new import_obsidian9.ButtonComponent(buttonDiv); - submitButton.buttonEl.addClass("mod-cta"); - submitButton.setButtonText("Submit").onClick((evt) => { - this.resolveAndClose(evt); - }); - } else { - textInput = new import_obsidian9.TextComponent(div); - } - this.value = this.default_value ?? ""; - textInput.inputEl.addClass("templater-prompt-input"); - textInput.setPlaceholder("Type text here"); - textInput.setValue(this.value); - textInput.onChange((value) => this.value = value); - textInput.inputEl.addEventListener("keydown", (evt) => this.enterCallback(evt)); - } - enterCallback(evt) { - if (this.multi_line) { - if (import_obsidian9.Platform.isDesktop) { - if (evt.shiftKey && evt.key === "Enter") { - } else if (evt.key === "Enter") { - this.resolveAndClose(evt); - } - } else { - if (evt.key === "Enter") { - evt.preventDefault(); - } - } - } else { - if (evt.key === "Enter") { - this.resolveAndClose(evt); - } - } - } - resolveAndClose(evt) { - this.submitted = true; - evt.preventDefault(); - this.resolve(this.value); - this.close(); - } - async openAndGetValue(resolve, reject) { - this.resolve = resolve; - this.reject = reject; - this.open(); - } -}; - -// src/core/functions/internal_functions/system/SuggesterModal.ts -var import_obsidian10 = __toModule(require("obsidian")); -var SuggesterModal = class extends import_obsidian10.FuzzySuggestModal { - constructor(text_items, items, placeholder, limit) { - super(app); - this.text_items = text_items; - this.items = items; - this.submitted = false; - this.setPlaceholder(placeholder); - limit && (this.limit = limit); - } - getItems() { - return this.items; - } - onClose() { - if (!this.submitted) { - this.reject(new TemplaterError("Cancelled prompt")); - } - } - selectSuggestion(value, evt) { - this.submitted = true; - this.close(); - this.onChooseSuggestion(value, evt); - } - getItemText(item) { - if (this.text_items instanceof Function) { - return this.text_items(item); - } - return this.text_items[this.items.indexOf(item)] || "Undefined Text Item"; - } - onChooseItem(item) { - this.resolve(item); - } - async openAndGetValue(resolve, reject) { - this.resolve = resolve; - this.reject = reject; - this.open(); - } -}; - -// src/core/functions/internal_functions/system/InternalModuleSystem.ts -var InternalModuleSystem = class extends InternalModule { - constructor() { - super(...arguments); - this.name = "system"; - } - async create_static_templates() { - this.static_functions.set("clipboard", this.generate_clipboard()); - this.static_functions.set("prompt", this.generate_prompt()); - this.static_functions.set("suggester", this.generate_suggester()); - } - async create_dynamic_templates() { - } - generate_clipboard() { - return async () => { - if (import_obsidian11.Platform.isMobileApp) { - return UNSUPPORTED_MOBILE_TEMPLATE; - } - return await navigator.clipboard.readText(); - }; - } - generate_prompt() { - return async (prompt_text, default_value, throw_on_cancel = false, multi_line = false) => { - const prompt = new PromptModal(prompt_text, default_value, multi_line); - const promise = new Promise((resolve, reject) => prompt.openAndGetValue(resolve, reject)); - try { - return await promise; - } catch (error) { - if (throw_on_cancel) { - throw error; - } - return null; - } - }; - } - generate_suggester() { - return async (text_items, items, throw_on_cancel = false, placeholder = "", limit) => { - const suggester = new SuggesterModal(text_items, items, placeholder, limit); - const promise = new Promise((resolve, reject) => suggester.openAndGetValue(resolve, reject)); - try { - return await promise; - } catch (error) { - if (throw_on_cancel) { - throw error; - } - return null; - } - }; - } -}; - -// src/core/functions/internal_functions/config/InternalModuleConfig.ts -var InternalModuleConfig = class extends InternalModule { - constructor() { - super(...arguments); - this.name = "config"; - } - async create_static_templates() { - } - async create_dynamic_templates() { - } - async generate_object(config) { - return config; - } -}; - -// src/core/functions/internal_functions/InternalFunctions.ts -var InternalFunctions = class { - constructor(plugin) { - this.plugin = plugin; - this.modules_array = []; - this.modules_array.push(new InternalModuleDate(this.plugin)); - this.modules_array.push(new InternalModuleFile(this.plugin)); - this.modules_array.push(new InternalModuleWeb(this.plugin)); - this.modules_array.push(new InternalModuleFrontmatter(this.plugin)); - this.modules_array.push(new InternalModuleSystem(this.plugin)); - this.modules_array.push(new InternalModuleConfig(this.plugin)); - } - async init() { - for (const mod of this.modules_array) { - await mod.init(); - } - } - async generate_object(config) { - const internal_functions_object = {}; - for (const mod of this.modules_array) { - internal_functions_object[mod.getName()] = await mod.generate_object(config); - } - return internal_functions_object; - } -}; - -// src/core/functions/user_functions/UserSystemFunctions.ts -var import_child_process = __toModule(require("child_process")); -var import_util = __toModule(require("util")); -var import_obsidian12 = __toModule(require("obsidian")); -var UserSystemFunctions = class { - constructor(plugin) { - this.plugin = plugin; - if (import_obsidian12.Platform.isMobileApp || !(app.vault.adapter instanceof import_obsidian12.FileSystemAdapter)) { - this.cwd = ""; - } else { - this.cwd = app.vault.adapter.getBasePath(); - this.exec_promise = (0, import_util.promisify)(import_child_process.exec); - } - } - async generate_system_functions(config) { - const user_system_functions = new Map(); - const internal_functions_object = await this.plugin.templater.functions_generator.generate_object(config, FunctionsMode.INTERNAL); - for (const template_pair of this.plugin.settings.templates_pairs) { - const template = template_pair[0]; - let cmd = template_pair[1]; - if (!template || !cmd) { - continue; - } - if (import_obsidian12.Platform.isMobileApp) { - user_system_functions.set(template, () => { - return new Promise((resolve) => resolve(UNSUPPORTED_MOBILE_TEMPLATE)); - }); - } else { - cmd = await this.plugin.templater.parser.parse_commands(cmd, internal_functions_object); - user_system_functions.set(template, async (user_args) => { - const process_env = { - ...process.env, - ...user_args - }; - const cmd_options = { - timeout: this.plugin.settings.command_timeout * 1e3, - cwd: this.cwd, - env: process_env, - ...this.plugin.settings.shell_path && { - shell: this.plugin.settings.shell_path - } - }; - try { - const { stdout } = await this.exec_promise(cmd, cmd_options); - return stdout.trimRight(); - } catch (error) { - throw new TemplaterError(`Error with User Template ${template}`, error); - } - }); - } - } - return user_system_functions; - } - async generate_object(config) { - const user_system_functions = await this.generate_system_functions(config); - return Object.fromEntries(user_system_functions); - } -}; - -// src/core/functions/user_functions/UserScriptFunctions.ts -var UserScriptFunctions = class { - constructor(plugin) { - this.plugin = plugin; - } - async generate_user_script_functions() { - const user_script_functions = new Map(); - const files = errorWrapperSync(() => get_tfiles_from_folder(this.plugin.settings.user_scripts_folder), `Couldn't find user script folder "${this.plugin.settings.user_scripts_folder}"`); - if (!files) { - return new Map(); - } - for (const file of files) { - if (file.extension.toLowerCase() === "js") { - await this.load_user_script_function(file, user_script_functions); - } - } - return user_script_functions; - } - async load_user_script_function(file, user_script_functions) { - const req = (s) => { - return window.require && window.require(s); - }; - const exp = {}; - const mod = { - exports: exp - }; - const file_content = await app.vault.read(file); - const wrapping_fn = window.eval("(function anonymous(require, module, exports){" + file_content + "\n})"); - wrapping_fn(req, mod, exp); - const user_function = exp["default"] || mod.exports; - if (!user_function) { - throw new TemplaterError(`Failed to load user script ${file.path}. No exports detected.`); - } - if (!(user_function instanceof Function)) { - throw new TemplaterError(`Failed to load user script ${file.path}. Default export is not a function.`); - } - user_script_functions.set(`${file.basename}`, user_function); - } - async generate_object() { - const user_script_functions = await this.generate_user_script_functions(); - return Object.fromEntries(user_script_functions); - } -}; - -// src/core/functions/user_functions/UserFunctions.ts -var UserFunctions = class { - constructor(plugin) { - this.plugin = plugin; - this.user_system_functions = new UserSystemFunctions(plugin); - this.user_script_functions = new UserScriptFunctions(plugin); - } - async generate_object(config) { - let user_system_functions = {}; - let user_script_functions = {}; - if (this.plugin.settings.enable_system_commands) { - user_system_functions = await this.user_system_functions.generate_object(config); - } - if (this.plugin.settings.user_scripts_folder) { - user_script_functions = await this.user_script_functions.generate_object(); - } - return { - ...user_system_functions, - ...user_script_functions - }; - } -}; - -// src/core/functions/FunctionsGenerator.ts -var obsidian_module = __toModule(require("obsidian")); -var FunctionsMode; -(function(FunctionsMode2) { - FunctionsMode2[FunctionsMode2["INTERNAL"] = 0] = "INTERNAL"; - FunctionsMode2[FunctionsMode2["USER_INTERNAL"] = 1] = "USER_INTERNAL"; -})(FunctionsMode || (FunctionsMode = {})); -var FunctionsGenerator = class { - constructor(plugin) { - this.plugin = plugin; - this.internal_functions = new InternalFunctions(this.plugin); - this.user_functions = new UserFunctions(this.plugin); - } - async init() { - await this.internal_functions.init(); - } - additional_functions() { - return { - obsidian: obsidian_module - }; - } - async generate_object(config, functions_mode = 1) { - const final_object = {}; - const additional_functions_object = this.additional_functions(); - const internal_functions_object = await this.internal_functions.generate_object(config); - let user_functions_object = {}; - Object.assign(final_object, additional_functions_object); - switch (functions_mode) { - case 0: - Object.assign(final_object, internal_functions_object); - break; - case 1: - user_functions_object = await this.user_functions.generate_object(config); - Object.assign(final_object, { - ...internal_functions_object, - user: user_functions_object - }); - break; - } - return final_object; - } -}; - -// node_modules/@silentvoid13/rusty_engine/rusty_engine.js -var import_meta = {}; -var wasm; -var heap = new Array(32).fill(void 0); -heap.push(void 0, null, true, false); -function getObject(idx) { - return heap[idx]; -} -var heap_next = heap.length; -function dropObject(idx) { - if (idx < 36) - return; - heap[idx] = heap_next; - heap_next = idx; -} -function takeObject(idx) { - const ret = getObject(idx); - dropObject(idx); - return ret; -} -var cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true }); -cachedTextDecoder.decode(); -var cachedUint8Memory0 = new Uint8Array(); -function getUint8Memory0() { - if (cachedUint8Memory0.byteLength === 0) { - cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer); - } - return cachedUint8Memory0; -} -function getStringFromWasm0(ptr, len) { - return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len)); -} -function addHeapObject(obj) { - if (heap_next === heap.length) - heap.push(heap.length + 1); - const idx = heap_next; - heap_next = heap[idx]; - heap[idx] = obj; - return idx; -} -var WASM_VECTOR_LEN = 0; -var cachedTextEncoder = new TextEncoder("utf-8"); -var encodeString = typeof cachedTextEncoder.encodeInto === "function" ? function(arg, view) { - return cachedTextEncoder.encodeInto(arg, view); -} : function(arg, view) { - const buf = cachedTextEncoder.encode(arg); - view.set(buf); - return { - read: arg.length, - written: buf.length - }; -}; -function passStringToWasm0(arg, malloc, realloc) { - if (realloc === void 0) { - const buf = cachedTextEncoder.encode(arg); - const ptr2 = malloc(buf.length); - getUint8Memory0().subarray(ptr2, ptr2 + buf.length).set(buf); - WASM_VECTOR_LEN = buf.length; - return ptr2; - } - let len = arg.length; - let ptr = malloc(len); - const mem = getUint8Memory0(); - let offset2 = 0; - for (; offset2 < len; offset2++) { - const code = arg.charCodeAt(offset2); - if (code > 127) - break; - mem[ptr + offset2] = code; - } - if (offset2 !== len) { - if (offset2 !== 0) { - arg = arg.slice(offset2); - } - ptr = realloc(ptr, len, len = offset2 + arg.length * 3); - const view = getUint8Memory0().subarray(ptr + offset2, ptr + len); - const ret = encodeString(arg, view); - offset2 += ret.written; - } - WASM_VECTOR_LEN = offset2; - return ptr; -} -function isLikeNone(x) { - return x === void 0 || x === null; -} -var cachedInt32Memory0 = new Int32Array(); -function getInt32Memory0() { - if (cachedInt32Memory0.byteLength === 0) { - cachedInt32Memory0 = new Int32Array(wasm.memory.buffer); - } - return cachedInt32Memory0; -} -function debugString(val) { - const type = typeof val; - if (type == "number" || type == "boolean" || val == null) { - return `${val}`; - } - if (type == "string") { - return `"${val}"`; - } - if (type == "symbol") { - const description = val.description; - if (description == null) { - return "Symbol"; - } else { - return `Symbol(${description})`; - } - } - if (type == "function") { - const name = val.name; - if (typeof name == "string" && name.length > 0) { - return `Function(${name})`; - } else { - return "Function"; - } - } - if (Array.isArray(val)) { - const length = val.length; - let debug = "["; - if (length > 0) { - debug += debugString(val[0]); - } - for (let i = 1; i < length; i++) { - debug += ", " + debugString(val[i]); - } - debug += "]"; - return debug; - } - const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val)); - let className; - if (builtInMatches.length > 1) { - className = builtInMatches[1]; - } else { - return toString.call(val); - } - if (className == "Object") { - try { - return "Object(" + JSON.stringify(val) + ")"; - } catch (_) { - return "Object"; - } - } - if (val instanceof Error) { - return `${val.name}: ${val.message} -${val.stack}`; - } - return className; -} -function _assertClass(instance, klass) { - if (!(instance instanceof klass)) { - throw new Error(`expected instance of ${klass.name}`); - } - return instance.ptr; -} -var stack_pointer = 32; -function addBorrowedObject(obj) { - if (stack_pointer == 1) - throw new Error("out of js stack"); - heap[--stack_pointer] = obj; - return stack_pointer; -} -function handleError(f, args) { - try { - return f.apply(this, args); - } catch (e) { - wasm.__wbindgen_exn_store(addHeapObject(e)); - } -} -var ParserConfig = class { - static __wrap(ptr) { - const obj = Object.create(ParserConfig.prototype); - obj.ptr = ptr; - return obj; - } - __destroy_into_raw() { - const ptr = this.ptr; - this.ptr = 0; - return ptr; - } - free() { - const ptr = this.__destroy_into_raw(); - wasm.__wbg_parserconfig_free(ptr); - } - get interpolate() { - const ret = wasm.__wbg_get_parserconfig_interpolate(this.ptr); - return String.fromCodePoint(ret); - } - set interpolate(arg0) { - wasm.__wbg_set_parserconfig_interpolate(this.ptr, arg0.codePointAt(0)); - } - get execution() { - const ret = wasm.__wbg_get_parserconfig_execution(this.ptr); - return String.fromCodePoint(ret); - } - set execution(arg0) { - wasm.__wbg_set_parserconfig_execution(this.ptr, arg0.codePointAt(0)); - } - get single_whitespace() { - const ret = wasm.__wbg_get_parserconfig_single_whitespace(this.ptr); - return String.fromCodePoint(ret); - } - set single_whitespace(arg0) { - wasm.__wbg_set_parserconfig_single_whitespace(this.ptr, arg0.codePointAt(0)); - } - get multiple_whitespace() { - const ret = wasm.__wbg_get_parserconfig_multiple_whitespace(this.ptr); - return String.fromCodePoint(ret); - } - set multiple_whitespace(arg0) { - wasm.__wbg_set_parserconfig_multiple_whitespace(this.ptr, arg0.codePointAt(0)); - } - constructor(opt, clt, inte, ex, sw, mw, gv) { - const ptr0 = passStringToWasm0(opt, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - const ptr1 = passStringToWasm0(clt, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - const ptr2 = passStringToWasm0(gv, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len2 = WASM_VECTOR_LEN; - const ret = wasm.parserconfig_new(ptr0, len0, ptr1, len1, inte.codePointAt(0), ex.codePointAt(0), sw.codePointAt(0), mw.codePointAt(0), ptr2, len2); - return ParserConfig.__wrap(ret); - } - get opening_tag() { - try { - const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); - wasm.parserconfig_opening_tag(retptr, this.ptr); - var r0 = getInt32Memory0()[retptr / 4 + 0]; - var r1 = getInt32Memory0()[retptr / 4 + 1]; - return getStringFromWasm0(r0, r1); - } finally { - wasm.__wbindgen_add_to_stack_pointer(16); - wasm.__wbindgen_free(r0, r1); - } - } - set opening_tag(val) { - const ptr0 = passStringToWasm0(val, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - wasm.parserconfig_set_opening_tag(this.ptr, ptr0, len0); - } - get closing_tag() { - try { - const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); - wasm.parserconfig_closing_tag(retptr, this.ptr); - var r0 = getInt32Memory0()[retptr / 4 + 0]; - var r1 = getInt32Memory0()[retptr / 4 + 1]; - return getStringFromWasm0(r0, r1); - } finally { - wasm.__wbindgen_add_to_stack_pointer(16); - wasm.__wbindgen_free(r0, r1); - } - } - set closing_tag(val) { - const ptr0 = passStringToWasm0(val, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - wasm.parserconfig_set_closing_tag(this.ptr, ptr0, len0); - } - get global_var() { - try { - const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); - wasm.parserconfig_global_var(retptr, this.ptr); - var r0 = getInt32Memory0()[retptr / 4 + 0]; - var r1 = getInt32Memory0()[retptr / 4 + 1]; - return getStringFromWasm0(r0, r1); - } finally { - wasm.__wbindgen_add_to_stack_pointer(16); - wasm.__wbindgen_free(r0, r1); - } - } - set global_var(val) { - const ptr0 = passStringToWasm0(val, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - wasm.parserconfig_set_global_var(this.ptr, ptr0, len0); - } -}; -var Renderer = class { - static __wrap(ptr) { - const obj = Object.create(Renderer.prototype); - obj.ptr = ptr; - return obj; - } - __destroy_into_raw() { - const ptr = this.ptr; - this.ptr = 0; - return ptr; - } - free() { - const ptr = this.__destroy_into_raw(); - wasm.__wbg_renderer_free(ptr); - } - constructor(config) { - _assertClass(config, ParserConfig); - var ptr0 = config.ptr; - config.ptr = 0; - const ret = wasm.renderer_new(ptr0); - return Renderer.__wrap(ret); - } - render_content(content, context) { - try { - const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); - const ptr0 = passStringToWasm0(content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - wasm.renderer_render_content(retptr, this.ptr, ptr0, len0, addBorrowedObject(context)); - var r0 = getInt32Memory0()[retptr / 4 + 0]; - var r1 = getInt32Memory0()[retptr / 4 + 1]; - var r2 = getInt32Memory0()[retptr / 4 + 2]; - if (r2) { - throw takeObject(r1); - } - return takeObject(r0); - } finally { - wasm.__wbindgen_add_to_stack_pointer(16); - heap[stack_pointer++] = void 0; - } - } -}; -async function load(module2, imports) { - if (typeof Response === "function" && module2 instanceof Response) { - if (typeof WebAssembly.instantiateStreaming === "function") { - try { - return await WebAssembly.instantiateStreaming(module2, imports); - } catch (e) { - if (module2.headers.get("Content-Type") != "application/wasm") { - console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e); - } else { - throw e; - } - } - } - const bytes = await module2.arrayBuffer(); - return await WebAssembly.instantiate(bytes, imports); - } else { - const instance = await WebAssembly.instantiate(module2, imports); - if (instance instanceof WebAssembly.Instance) { - return { instance, module: module2 }; - } else { - return instance; - } - } -} -function getImports() { - const imports = {}; - imports.wbg = {}; - imports.wbg.__wbindgen_object_drop_ref = function(arg0) { - takeObject(arg0); - }; - imports.wbg.__wbindgen_string_new = function(arg0, arg1) { - const ret = getStringFromWasm0(arg0, arg1); - return addHeapObject(ret); - }; - imports.wbg.__wbindgen_string_get = function(arg0, arg1) { - const obj = getObject(arg1); - const ret = typeof obj === "string" ? obj : void 0; - var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0; - getInt32Memory0()[arg0 / 4 + 0] = ptr0; - }; - imports.wbg.__wbg_call_97ae9d8645dc388b = function() { - return handleError(function(arg0, arg1) { - const ret = getObject(arg0).call(getObject(arg1)); - return addHeapObject(ret); - }, arguments); - }; - imports.wbg.__wbg_new_8d2af00bc1e329ee = function(arg0, arg1) { - const ret = new Error(getStringFromWasm0(arg0, arg1)); - return addHeapObject(ret); - }; - imports.wbg.__wbg_message_fe2af63ccc8985bc = function(arg0) { - const ret = getObject(arg0).message; - return addHeapObject(ret); - }; - imports.wbg.__wbg_newwithargs_8fe23e3842840c8e = function(arg0, arg1, arg2, arg3) { - const ret = new Function(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3)); - return addHeapObject(ret); - }; - imports.wbg.__wbg_call_168da88779e35f61 = function() { - return handleError(function(arg0, arg1, arg2) { - const ret = getObject(arg0).call(getObject(arg1), getObject(arg2)); - return addHeapObject(ret); - }, arguments); - }; - imports.wbg.__wbg_call_3999bee59e9f7719 = function() { - return handleError(function(arg0, arg1, arg2, arg3) { - const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3)); - return addHeapObject(ret); - }, arguments); - }; - imports.wbg.__wbindgen_debug_string = function(arg0, arg1) { - const ret = debugString(getObject(arg1)); - const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0; - getInt32Memory0()[arg0 / 4 + 0] = ptr0; - }; - imports.wbg.__wbindgen_throw = function(arg0, arg1) { - throw new Error(getStringFromWasm0(arg0, arg1)); - }; - return imports; -} -function initMemory(imports, maybe_memory) { -} -function finalizeInit(instance, module2) { - wasm = instance.exports; - init.__wbindgen_wasm_module = module2; - cachedInt32Memory0 = new Int32Array(); - cachedUint8Memory0 = new Uint8Array(); - return wasm; -} -async function init(input) { - if (typeof input === "undefined") { - input = new URL("rusty_engine_bg.wasm", import_meta.url); - } - const imports = getImports(); - if (typeof input === "string" || typeof Request === "function" && input instanceof Request || typeof URL === "function" && input instanceof URL) { - input = fetch(input); - } - initMemory(imports); - const { instance, module: module2 } = await load(await input, imports); - return finalizeInit(instance, module2); -} -var rusty_engine_default = init; - -// wasm-embed:/home/runner/work/Templater/Templater/node_modules/@silentvoid13/rusty_engine/rusty_engine_bg.wasm -var rusty_engine_bg_default = __toBinary("AGFzbQEAAAABvwEaYAJ/fwBgAn9/AX9gAX8Bf2ADf39/AX9gA39/fwBgAX8AYAV/f39/fwBgBH9/f38AYAR/f39/AX9gAABgBX9/f39/AX9gAX8BfmAAAX9gBn9/f39/fwBgB39/f39/f38AYAV/f35/fwBgBX9/fX9/AGAFf398f38AYAR/fn9/AGAFf35/f38AYAR/fX9/AGAEf3x/fwBgBn9/f39/fwF/YAd/f39/f39/AX9gCn9/f39/f39/f38Bf2ACfn8BfwLkAgsDd2JnGl9f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AALyAsBCH8jAEHgAGsiAyQAIABCATcCACAAQQhqIgRBADYCACAAQQBBEBBBIAQoAgAiBSAAKAIAaiIGQdSDwAApAAA3AAAgBCAFQRBqNgIAIAZBCGpB3IPAACkAADcAACADQQE2AiwgAyABKAIIQShqIgU2AiggAyAANgIYIANB3ABqQQE2AgAgA0ICNwJMIANB8IPAADYCSCADIANBKGo2AlgCQAJAAkACQAJAAkAgA0EYakGYisAAIANByABqEB5FBEAgAigCACEIAkAgAigCCCIBRQ0AIAFBBHQhCkGQhMAAIQZBACEBQQAhBANAAn8gASAIaiIHQQRqIgkgBygCAEUNABoCQCAERQ0AIANBEGogBCgCACAEKAIEQQAgBiAGLQAAQQJGG0EBEBAgA0EIaiADKAIQIAMoAhRBACAHQQ1qIgQgBC0AAEECRhtBABAQIANBGGogAygCCCADKAIMEBIgA0EBNgI0IANBATYCLCADIAU2AiggAyADQRhqNgIwIAMgADYCRCADQQI2AlwgA0IDNwJMIANBmITAADYCSCADIANBKGo2AlggA0HEAGpBmIrAACADQcgAahAeDQUgAygCHEUNACADKAIYEBULIAdBDmohBgJAIAdBDGotAABFBEAgA0ECNgIsIAMgCTYCKCADIAA2AhggA0EBNgJcIANCAjcCTCADQfSEwAA2AkggAyADQShqNgJYIANBGGpBmIrAACADQcgAahAeDQcgA0ECNgI0IANBoIXAADYCMCADQQE2AiwgAyAFNgIoIAMgADYCGCADQQI2AlwgA0IDNwJMIANBmITAADYCSCADIANBKGo2AlggA0EYakGYisAAIANByABqEB5FDQFBq4HAAEErIANByABqQdiBwABBqIXAABBSAAsgA0ECNgIsIAMgCTYCKCADIAA2AhggA0EBNgJcIANCAjcCTCADQcSEwAA2AkggAyADQShqNgJYIANBGGpBmIrAACADQcgAahAeDQcLQQALIQQgCiABQRBqIgFHDQALIARFDQAgAyAEKAIAIAQoAgRBACAGIAYtAABBAkYbQQEQECADQRhqIAMoAgAgAygCBBASIANBNGpBATYCACADQQE2AiwgAyAFNgIoIAMgA0EYajYCMCADIAA2AkQgA0HcAGpBAjYCACADQgM3AkwgA0GYhMAANgJIIAMgA0EoajYCWCADQcQAakGYisAAIANByABqEB4NBSADKAIcRQ0AIAMoAhgQFQsgAEEEaigCACAAQQhqIgQoAgAiAWtBJ00EQCAAIAFBKBBBIAQoAgAhAQsgBCABQShqNgIAIAAoAgAgAWoiAUHIhcAAKQAANwAAIAFBCGpB0IXAACkAADcAACABQRBqQdiFwAApAAA3AAAgAUEYakHghcAAKQAANwAAIAFBIGpB6IXAACkAADcAACADQTxqQQI2AgAgA0E0akEBNgIAIANBoIXAADYCOCADIAU2AjAgA0EBNgIsIAMgBTYCKCADIAA2AhggA0HcAGoiAUEDNgIAIANCBDcCTCADQZiGwAA2AkggAyADQShqNgJYIANBGGpBmIrAACADQcgAahAeDQUgA0EBNgIsIAMgBTYCKCADIAA2AhggAUEBNgIAIANCAjcCTCADQdCGwAA2AkggAyADQShqNgJYIANBGGpBmIrAACADQcgAahAeDQYgAkEEaigCAARAIAgQFQsgA0HgAGokAA8LQauBwABBKyADQcgAakHYgcAAQYCEwAAQUgALQauBwABBKyADQcgAakHYgcAAQbCEwAAQUgALQauBwABBKyADQcgAakHYgcAAQYSFwAAQUgALQauBwABBKyADQcgAakHYgcAAQdSEwAAQUgALQauBwABBKyADQcgAakHYgcAAQbiFwAAQUgALQauBwABBKyADQcgAakHYgcAAQbiGwAAQUgALQauBwABBKyADQcgAakHYgcAAQeCGwAAQUgAL7QkCCH8GfiMAQdAAayIDJAACQAJAAkAQVCIEBEAgA0EgakIANwMAIANBHGpBkIrAADYCACAEIAQpAwAiC0IBfDcDACADQQA2AhggAyALNwMIIAMgBEEIaikDADcDECADQqeAgIDwBDcDSCADQo2AgICgDjcDQCADQoqAgIDgDTcDOCADQtyAgIDACzcDMCADQQhqIANBMGoQGSADQQA2AjggA0IENwMwIAJFBEAgAEEANgIIIABCATcCAEEEIQRBBCEBDAQLIAEgAmohCEEAIQIDQAJ/IAEsAAAiBEF/SgRAIARB/wFxIQQgAU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iCSABQYwBaikCADcDACABQSBqIgogAUGUAWopAgA3AwAgAUEoaiILIAFBnAFqKQIANwMAIAFBMGoiDCABQaQBaikCADcDACABQThqIg0gAUGsAWooAgA2AgAgASAAKQIANwN4IAEgASkCfDcDCCAAEBUgAUHwAGogDSgCADYCACABQegAaiAMKQMANwMAIAFB4ABqIAspAwA3AwAgAUHYAGogCikDADcDACABQdAAaiAJKQMANwMAIAFByABqIAgpAwA3AwAgASABKQMINwNAIAFB+ABqIAFBQGsQOkE8QQQQngEiAEUNAiAAQQA2AgAgACABKQN4NwIEIABBDGogAykDADcCACAAQRRqIAIpAwA3AgAgAEEcaiAEKQMANwIAIABBJGogBSkDADcCACAAQSxqIAYpAwA3AgAgAEE0aiAHKQMANwIAIAFBsAFqJAAgAA8LEK0BAAsQrgEAC0E8QQQQswEAC9cEAQR/IAAgARC6ASECAkACQAJAIAAQsAENACAAKAIAIQMCQCAAEKUBRQRAIAEgA2ohASAAIAMQuwEiAEHAscAAKAIARw0BIAIoAgRBA3FBA0cNAkG4scAAIAE2AgAgACABIAIQhgEPCyABIANqQRBqIQAMAgsgA0GAAk8EQCAAEDUMAQsgAEEMaigCACIEIABBCGooAgAiBUcEQCAFIAQ2AgwgBCAFNgIIDAELQaiuwABBqK7AACgCAEF+IANBA3Z3cTYCAAsgAhCiAQRAIAAgASACEIYBDAILAkBBxLHAACgCACACRwRAIAJBwLHAACgCAEcNAUHAscAAIAA2AgBBuLHAAEG4scAAKAIAIAFqIgE2AgAgACABEJQBDwtBxLHAACAANgIAQbyxwABBvLHAACgCACABaiIBNgIAIAAgAUEBcjYCBCAAQcCxwAAoAgBHDQFBuLHAAEEANgIAQcCxwABBADYCAA8LIAIQrwEiAyABaiEBAkAgA0GAAk8EQCACEDUMAQsgAkEMaigCACIEIAJBCGooAgAiAkcEQCACIAQ2AgwgBCACNgIIDAELQaiuwABBqK7AACgCAEF+IANBA3Z3cTYCAAsgACABEJQBIABBwLHAACgCAEcNAUG4scAAIAE2AgALD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gAUE/cUGAAXI6AA8gAiABQQZ2QT9xQYABcjoADiACIAFBDHZBP3FBgAFyOgANIAIgAUESdkEHcUHwAXI6AAxBBAshASAAQQRqKAIAIABBCGoiBCgCACIDayABSQRAIAAgAyABEEEgBCgCACEDCyAAKAIAIANqIAJBDGogARC5ARogBCABIANqNgIACyACQRBqJABBAAvVAgEDfyMAQRBrIgIkAAJAAn8CQCABQYABTwRAIAJBADYCDCABQYAQTw0BIAIgAUE/cUGAAXI6AA0gAiABQQZ2QcABcjoADEECDAILIAAoAggiAyAAQQRqKAIARgRAIAAgAxBDIAAoAgghAwsgACADQQFqNgIIIAAoAgAgA2ogAToAAAwCCyABQYCABE8EQCACIAFBP3FBgAFyOgAPIAIgAUEGdkE/cUGAAXI6AA4gAiABQQx2QT9xQYABcjoADSACIAFBEnZBB3FB8AFyOgAMQQQMAQsgAiABQT9xQYABcjoADiACIAFBDHZB4AFyOgAMIAIgAUEGdkE/cUGAAXI6AA1BAwshASAAQQRqKAIAIABBCGoiBCgCACIDayABSQRAIAAgAyABEEIgBCgCACEDCyAAKAIAIANqIAJBDGogARC5ARogBCABIANqNgIACyACQRBqJAAL1wIBA38jAEEQayICJAACQAJ/AkACQCABQYABTwRAIAJBADYCDCABQYAQSQ0BIAFBgIAETw0CIAIgAUE/cUGAAXI6AA4gAiABQQx2QeABcjoADCACIAFBBnZBP3FBgAFyOgANQQMMAwsgACgCCCIDIABBBGooAgBGBEAgACADEEMgACgCCCEDCyAAIANBAWo2AgggACgCACADaiABOgAADAMLIAIgAUE/cUGAAXI6AA0gAiABQQZ2QcABcjoADEECDAELIAIgAUE/cUGAAXI6AA8gAiABQQZ2QT9xQYABcjoADiACIAFBDHZBP3FBgAFyOgANIAIgAUESdkEHcUHwAXI6AAxBBAshASAAQQRqKAIAIABBCGoiBCgCACIDayABSQRAIAAgAyABEEIgBCgCACEDCyAAKAIAIANqIAJBDGogARC5ARogBCABIANqNgIACyACQRBqJAALtgIBB38CQCACQQ9NBEAgACED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IANgIQQQEFQQALNgIYIAIgA0EBIAJBEGoQSyACKAIABEAgAkEIaigCACIARQ0BIAIoAgQgABCzAQALIAIoAgQhASAAQQRqIAM2AgAgACABNgIAIAJBIGokAA8LEHMAC68BAQJ/IwBBIGsiAyQAAkAgASACaiICIAFJDQAgAEEEaigCACIBQQF0IgQgAiAEIAJLGyICQQggAkEISxshBCADIAEEfyADIAE2AhQgAyAAKAIANgIQQQEFQQALNgIYIAMgBEEBIANBEGoQSyADKAIABEAgA0EIaigCACIARQ0BIAMoAgQgABCzAQALIAMoAgQhASAAQQRqIAQ2AgAgACABNgIAIANBIGokAA8LEHMAC60BAQJ/IwBBIGsiAyQAAkAgASACaiICIAFJDQAgAEEEaigCACIBQQF0IgQgAiAEIAJLGyICQQggAkEISxshBCADIAEEfyADIAE2AhQgAyAAKAIANgIQQQEFQQALNgIYIAMgBCADQRBqEEogAygCAARAIANBCGooAgAiAEUNASADKAIEIAAQswEACyADKAIEIQEgAEEEaiAENgIAIAAgATYCACADQSBqJAAPCxBzAAutAQEDfyMAQSBrIgIkAAJAIAFBAWoiAyABSQ0AIABBBGooAgAiAUEBdCIEIAMgBCADSxsiA0EIIANBCEsbIQMgAiABBH8gAiABNgIUIAIgACgCADYCEEEBBUEACzYCGCACIAMgAkEQahBKIAIoAgAEQCACQQhqKAIAIgBFDQEgAigCBCAAELMBAAsgAigCBCEBIABBBGogAzYCACAAIAE2AgAgAkEgaiQADwsQcwAL7wEBA38jAEEgayIFJABBjK7AAEGMrsAAKAIAIgdBAWo2AgBB7LHAAEHsscAAKAIAQQFqIgY2AgACQAJAIAdBAEggBkECS3INACAFIAQ6ABggBSADNgIUIAUgAjYCEEGArsAAKAIAIgJBf0wNAEGArsAAIAJBAWoiAjYCAEGArsAAQYiuwAAoAgAiAwR/QYSuwAAoAgAgBSAAIAEoAhARAAAgBSAFKQMANwMIIAVBCGogAygCFBEAAEGArsAAKAIABSACC0F/ajYCACAGQQFLDQAgBA0BCwALIwBBEGsiAiQAIAIgATYCDCACIAA2AggAC58BAQN/AkAgAUEPTQRAIAAhAgwBCyAAQQAgAGtBA3EiBGohAyAEBEAgACECA0AgAkH/AToAACACQQFqIgIgA0kNAAsLIAMgASAEayIBQXxxIgRqIQIgBEEBTgRAA0AgA0F/NgIAIANBBGoiAyACSQ0ACwsgAUEDcSEBCyABBEAgASACaiEBA0AgAkH/AToAACACQQFqIgIgAUkNAAsLIAALrAEBA38jAEEQayIDJAACQAJAIAEEQCABKAIAIgJBf0YNASABIAJBAWo2AgAgAyABQQRqEGEgASABKAIAQX9qNgIAIAMoAgAhAQJAIAMoAgQiAiADKAIIIgRNBEAgASECDAELIARFBEBBASECIAEQFQwBCyABIAJBASAEEJkBIgJFDQMLIAAgBDYCBCAAIAI2AgAgA0EQaiQADwsQrQEACxCuAQALIARBARCzAQALrAEBA38jAEEQayIDJAACQAJAIAEEQCABKAIAIgJBf0YNASABIAJBAWo2AgAgAyABQRBqEGEgASABKAIAQX9qNgIAIAMoAgAhAQJAIAMoAgQiAiADKAIIIgRNBEAgASECDAELIARFBEBBASECIAEQFQwBCyABIAJBASAEEJkBIgJFDQMLIAAgBDYCBCAAIAI2AgAgA0EQaiQADwsQrQEACxCuAQALIARBARCzAQALrAEBA38jAEEQayIDJAACQAJAIAEEQCABKAIAIgJBf0YNASABIAJBAWo2AgAgAyABQSxqEGEgASABKAIAQX9qNgIAIAMoAgAhAQJAIAMoAgQiAiADKAIIIgRNBEAgASECDAELIARFBEBBASECIAEQFQwBCyABIAJBASAEEJkBIgJFDQMLIAAgBDYCBCAAIAI2AgAgA0EQaiQADwsQrQEACxCuAQALIARBARCzAQALrAEBA38jAEEwayICJAAgAUEEaiEDIAEoAgRFBEAgASgCACEBIAJBEGoiBEEANgIAIAJCATcDCCACIAJBCGo2AhQgAkEoaiABQRBqKQIANwMAIAJBIGogAUEIaikCADcDACACIAEpAgA3AxggAkEUakGAjsAAIAJBGGoQHhogA0EIaiAEKAIANgIAIAMgAikDCDcCAAsgAEHo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6ASEAQbyxwAAgASACayIBNgIAQcSxwAAgADYCACAAIAFBAXI2AgRBCEEIEJcBIQJBFEEIEJcBIQNBEEEIEJcBIQQgACABELoBIAQgAyACQQhramo2AgRB4LHAAEGAgIABNgIAC28BBH8jAEEgayICJABBASEDAkAgACABEDMNACABQRxqKAIAIQQgASgCGCACQRxqQQA2AgAgAkGAk8AANgIYIAJCATcCDCACQYSTwAA2AgggBCACQQhqEB4NACAAQQRqIAEQMyEDCyACQSBqJAAgAwtvAQF/IwBBMGsiAiQAIAIgATYCBCACIAA2AgAgAkEcakECNgIAIAJBLGpBAzYCACACQgI3AgwgAkGklsAANgIIIAJBAzYCJCACIAJBIGo2AhggAiACQQRqNgIoIAIgAjYCICACQQhqQdSWwAAQdAALbwEBfyMAQTBrIgIkACACIAE2AgQgAiAANgIAIAJBHGpBAjYCACACQSxqQQM2AgAgAkICNwIMIAJBuJfAADYCCCACQQM2AiQgAiACQSBqNgIYIAIgAkEEajYCKCACIAI2AiAgAkEIakHIl8AAEHQAC28BAX8jAEEwayICJAAgAiABNgIEIAIgADYCACACQRxqQQI2AgAgAkEsakEDNgIAIAJCAjcCDCACQfSWwAA2AgggAkEDNgIkIAIgAkEgajYCGCACIAJBBGo2AiggAiACNgIgIAJBCGpBhJfAABB0AAtsAQF/IwBBMGsiAyQAIAMgATYCBCADIAA2AgAgA0EcakECNgIAIANBLGpBAzYCACADQgI3AgwgA0HAk8AANgIIIANBAzYCJCADIANBIGo2AhggAyADNgIoIAMgA0EEajYCICADQQhqIAIQdAALVgECfyMAQSBrIgIkACAAQRxqKAIAIQMgACgCGCACQRhqIAFBEGopAgA3AwAgAkEQaiABQQhqKQIANwMAIAIgASkCADcDCCADIAJBCGoQHiACQSBqJAALWQEBfyMAQSBrIgIkACACIAAoAgA2AgQgAkEYaiABQRBqKQIANwMAIAJBEGogAUEIaikCADcDACACIAEpAgA3AwggAkEEakGYisAAIAJBCGoQHiACQSBqJAALWQEBfyMAQSBrIgIkACACIAAoAgA2AgQgAkEYaiABQRBqKQIANwMAIAJBEGogAUEIaikCADcDACACIAEpAgA3AwggAkEEakGAjsAAIAJBCGoQHiACQSBqJAALZwAjAEEwayIBJABB2K3AAC0AAARAIAFBHGpBATYCACABQgI3AgwgAUH0jsAANgIIIAFBAzYCJCABIAA2AiwgASABQSBqNgIYIAEgAUEsajYCICABQQhqQZyPwAAQdAALIAFBMGokAAtZAQF/IwBBIGsiAiQAIAIgACgCADYCBCACQRhqIAFBEGopAgA3AwAgAkEQaiABQQhqKQIANwMAIAIgASkCADcDCCACQQRqQbSRwAAgAkEIahAeIAJBIGokAAtnAQJ/IAEoAgAhAwJAAkACQCABQQhqKAIAIgFFBEBBASECDAELIAFBf0wNASABQQEQngEiAkUNAgsgAiADIAEQuQEhAiAAIAE2AgggACABNgIEIAAgAjYCAA8LEHMACyABQQEQswEAC1YBAX8jAEEgayICJAAgAiAANgIEIAJBGGogAUEQaikCADcDACACQRBqIAFBCGopAgA3AwAgAiABKQIANwMIIAJBBGpBmIrAACACQQhqEB4gAkEgaiQAC1YBAX8CQCAABEAgACgCAA0BIABBfzYCACAAQQhqIgMoAgAEQCAAKAIEEBULIAAgATYCBCAAQQA2AgAgAEEMaiACNgIAIAMgAjYCAA8LEK0BAAsQrgEAC1YBAX8CQCAABEAgACgCAA0BIABBfzYCACAAQRRqIgMoAgAEQCAAKAIQEBULIAAgATYCECAAQQA2AgAgAEEYaiACNgIAIAMgAjYCAA8LEK0BAAsQrgEAC1YBAX8CQCAABEAgACgCAA0BIABBfzYCACAAQTBqIgMoAgAEQCAAKAIsEBULIAAgATYCLCAAQQA2AgAgAEE0aiACNgIAIAMgAjYCAA8LEK0BAAsQrgEAC1YBAX8jAEEQayIFJAAgASgCACACKAIAIAMoAgAgBCgCABAIIQEgBUEIahCDASAFKAIMIQIgACAFKAIIIgNBAEc2AgAgACACIAEgAxs2AgQgBUEQaiQAC08BAn8gACgCACIDQQRqKAIAIANBCGoiBCgCACIAayACSQRAIAMgACACEEEgBCgCACEACyADKAIAIABqIAEgAhC5ARogBCAAIAJqNgIAQQALTwECfyAAKAIAIgNBBGooAgAgA0EIaiIEKAIAIgBrIAJJBEAgAyAAIAIQQiAEKAIAIQALIAMoAgAgAGogASACELkBGiAEIAAgAmo2AgBBAAtRAQF/IwBBEGsiBCQAIAEoAgAgAigCACADKAIAEAchASAEQQhqEIMBIAQoAgwhAiAAIAQoAggiA0EARzYCACAAIAIgASADGzYCBCAEQRBqJAALSgECfyAAQQRqKAIAIABBCGoiBCgCACIDayACSQRAIAAgAyACEEEgBCgCACEDCyAAKAIAIANqIAEgAhC5ARogBCACIANqNgIAQQALPwEBfyMAQSBrIgAkACAAQRxqQQA2AgAgAEGwkMAANgIYIABCATcCDCAAQcyQwAA2AgggAEEIakGkkcAAEHQAC0MBA38CQCACRQ0AA0AgAC0AACIEIAEtAAAiBUYEQCAAQQFqIQAgAUEBaiEBIAJBf2oiAg0BDAILCyAEIAVrIQMLIAMLTAECfyMAQRBrIgMkACABKAIAIAIoAgAQAyEBIANBCGoQgwEgAygCDCECIAAgAygCCCIEQQBHNgIAIAAgAiABIAQbNgIEIANBEGokAAtLAAJAAn8gAUGAgMQARwRAQQEgACgCGCABIABBHGooAgAoAhARAQANARoLIAINAUEACw8LIAAoAhggAiADIABBHGooAgAoAgwRAwALRwEBfyMAQSBrIgIkACACQRRqQQA2AgAgAkGAk8AANgIQIAJCATcCBCACQSs2AhwgAiAANgIYIAIgAkEYajYCACACIAEQdAALRgECfyABKAIEIQIgASgCACEDQQhBBBCeASIBRQRAQQhBBBCzAQALIAEgAjYCBCABIAM2AgAgAEH4j8AANgIEIAAgATYCAAs5AQF/IAFBEHZAACECIABBADYCCCAAQQAgAUGAgHxxIAJBf0YiARs2AgQgAEEAIAJBEHQgARs2AgALZAEDfyMAQRBrIgEkACAAKAIMIgJFBEBBmI7AAEHIj8AAEG8ACyAAKAIIIgNFBEBBmI7AAEHYj8AAEG8ACyABIAI2AgggASAANgIEIAEgAzYCACABKAIAIAEoAgQgASgCCBBQAAs/AQF/IwBBIGsiACQAIABBHGpBADYCACAAQcyRwAA2AhggAEIBNwIMIABBjJLAADYCCCAAQQhqQZSSwAAQdAALPgEBfyMAQSBrIgIkACACQQE6ABggAiABNgIUIAIgADYCECACQfyTwAA2AgwgAkGAk8AANgIIIAJBCGoQcgALKwACQCAAQXxLDQAgAEUEQEEEDwsgACAAQX1JQQJ0EJ4BIgBFDQAgAA8LAAsiACMAQRBrIgAkACAAQQhqIAEQfSAAQQhqEFMgAEEQaiQACysAAkAgAARAIAAoAgANASAAQQA2AgAgAEEcaiABNgIADwsQrQEACxCuAQALKwACQCAABEAgACgCAA0BIABBADYCACAAQSBqIAE2AgAPCxCtAQALEK4BAAsrAAJAIAAEQCAAKAIADQEgAEEANgIAIABBJGogATYCAA8LEK0BAAsQrgEACysAAkAgAARAIAAoAgANASAAQQA2AgAgAEEoaiABNgIADwsQrQEACxCuAQALQAEBfyMAQRBrIgQkACAEIAM2AgwgBCACNgIIIAQgATYCBCAEIAA2AgAgBCgCACAEKAIEIAQoAgggBCgCDBATAAs3ACAAQQM6ACAgAEKAgICAgAQ3AgAgACABNgIYIABBADYCECAAQQA2AgggAEEcakHEh8AANgIACzUBAX8gASgCGEHDjsAAQQsgAUEcaigCACgCDBEDACECIABBADoABSAAIAI6AAQgACABNgIACyUAAkAgAARAIAAoAgBBf0YNASAAQRxqKAIADwsQrQEACxCuAQALJQACQCAABEAgACgCAEF/Rg0BIABBIGooAgAPCxCtAQALEK4BAAslAAJAIAAEQCAAKAIAQX9GDQEgAEEkaigCAA8LEK0BAAsQrgEACyUAAkAgAARAIAAoAgBBf0YNASAAQShqKAIADwsQrQEACxCuAQALJwAgACAAKAIEQQFxIAFyQQJyNgIEIAAgAWoiACAAKAIEQQFyNgIECzoBAn9B3K3AAC0AACEBQdytwABBADoAAEHgrcAAKAIAIQJB4K3AAEEANgIAIAAgAjYCBCAAIAE2AgALIAEBfwJAIAAoAgQiAUUNACAAQQhqKAIARQ0AIAEQFQsLHwACQCABQXxNBEAgACABQQQgAhCZASIADQELAAsgAAsjACACIAIoAgRBfnE2AgQgACABQQFyNgIEIAAgAWogATYCAAslACAARQRAQciMwABBMBCsAQALIAAgAiADIAQgBSABKAIQEQoACyMAIABFBEBByIzAAEEwEKwBAAsgACACIAMgBCABKAIQEQgACyMAIABFBEBByIzAAEEwEKwBAAsgACACIAMgBCABKAIQEQcACyMAIABFBEBByIzAAEEwEKwBAAsgACACIAMgBCABKAIQERUACyMAIABFBEBByIzAAEEwEKwBAAsgACACIAMgBCABKAIQERIACyMAIABFBEBByIzAAEEwEKwBAAsgACACIAMgBCABKAIQERQACx4AIAAgAUEDcjYCBCAAIAFqIgAgACgCBEEBcjYCBAsUACAAQQRqKAIABEAgACgCABAVCwshACAARQRAQciMwABBMBCsAQALIAAgAiADIAEoAhARBAALHwAgAEUEQEHIjMAAQTAQrAEACyAAIAIgASgCEBEBAAsZAQF/IAAoAhAiAQR/IAEFIABBFGooAgALCxkAIAAoAgAiACgCACAAQQhqKAIAIAEQtwELEgBBAEEZIABBAXZrIABBH0YbCxYAIAAgAUEBcjYCBCAAIAFqIAE2AgALHAAgASgCGEHgpsAAQQUgAUEcaigCACgCDBEDAAsTACAAKAIAIgBBJE8EQCAAEAALCxAAIAAgAWpBf2pBACABa3ELFAAgACgCACAAQQhqKAIAIAEQtwELDAAgACABIAIgAxAYCwsAIAEEQCAAEBULCw8AIABBAXQiAEEAIABrcgsUACAAKAIAIAEgACgCBCgCDBEBAAsRACAAKAIAIAAoAgQgARC3AQsIACAAIAEQJwsWAEHgrcAAIAA2AgBB3K3AAEEBOgAACw0AIAAoAgAgARAuQQALEwAgAEH4j8AANgIEIAAgATYCAAsNACAALQAEQQJxQQF2CxAAIAEgACgCACAAKAIEEBYLCgBBACAAayAAcQsLACAALQAEQQNxRQsMACAAIAFBA3I2AgQLDQAgACgCACAAKAIEagsNACAAKAIAIAEQL0EACw4AIAAoAgAaA0AMAAsACwsAIAA1AgAg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Ah4CHgJAAgEHCAECCwkBLQMBAXUCIgF2AwQCCQEGA9sCAgE6AQEHAQEBAQIIBgoCATAfMQQwBwEBBQEoCQwCIAQCAgEDOAEBAgMBAQM6CAICmAMBDQEHBAEGAQMCxkAAAcMhAAONAWAgAAZpAgAEAQogAlACAAEDAQQBGQIFAZcCGhINASYIGQsuAzABAgQCAicBQwYCAgICDAEIAS8BMwEBAwICBQIBASoCCAHuAQIBBAEAAQAQEBAAAgAB4gGVBQADAQIFBCgDBAGlAgAEAAKZCzEEewE2DykBAgIKAzEEAgIHAT0DJAUBCD4BDAI0CQoEAgFfAwIBAQIGAaABAwgVAjkCAQEBARYBDgcDBcMIAgMBARcBUQECBgEBAgEBAgEC6wECBAYCAQIbAlUIAgEBAmoBAQECBgEBZQMCBAEFAAkBAvUBCgIBAQQBkAQCAgQBIAooBgIECAEJBgIDLg0BAgAHAQYBAVIWAgcBAgECegYDAQECAQcBAUgCAwEBAQACAAU7BwABPwRRAQACAC4CFwABAQMEBQgIAgceBJQDADcEMggBDgEWBQEPAAcBEQIHAQIBBQAHAAE9BAAHbQcAYIDwAACAFgAAACAgAQAwYAEBMHECCQUSAWQBGgEAAQALHQIFAS8BAAEAewlwcm9kdWNlcnMCCGxhbmd1YWdlAQRSdXN0AAxwcm9jZXNzZWQtYnkDBXJ1c3RjHTEuNjQuMCAoYTU1ZGQ3MWQ1IDIwMjItMDktMTkpBndhbHJ1cwYwLjE5LjAMd2FzbS1iaW5kZ2VuEjAuMi44MyAoZWJhNjkxZjM4KQ=="); - -// src/core/parser/Parser.ts -var Parser = class { - async init() { - await rusty_engine_default(rusty_engine_bg_default); - const config = new ParserConfig("<%", "%>", "\0", "*", "-", "_", "tR"); - this.renderer = new Renderer(config); - } - async parse_commands(content, context) { - return this.renderer.render_content(content, context); - } -}; - -// src/core/Templater.ts -var RunMode; -(function(RunMode2) { - RunMode2[RunMode2["CreateNewFromTemplate"] = 0] = "CreateNewFromTemplate"; - RunMode2[RunMode2["AppendActiveFile"] = 1] = "AppendActiveFile"; - RunMode2[RunMode2["OverwriteFile"] = 2] = "OverwriteFile"; - RunMode2[RunMode2["OverwriteActiveFile"] = 3] = "OverwriteActiveFile"; - RunMode2[RunMode2["DynamicProcessor"] = 4] = "DynamicProcessor"; - RunMode2[RunMode2["StartupTemplate"] = 5] = "StartupTemplate"; -})(RunMode || (RunMode = {})); -var Templater = class { - constructor(plugin) { - this.plugin = plugin; - this.functions_generator = new FunctionsGenerator(this.plugin); - this.parser = new Parser(); - } - async setup() { - await this.parser.init(); - await this.functions_generator.init(); - this.plugin.registerMarkdownPostProcessor((el, ctx) => this.process_dynamic_templates(el, ctx)); - } - create_running_config(template_file, target_file, run_mode) { - const active_file = get_active_file(app); - return { - template_file, - target_file, - run_mode, - active_file - }; - } - async read_and_parse_template(config) { - const template_content = await app.vault.read(config.template_file); - return this.parse_template(config, template_content); - } - async parse_template(config, template_content) { - const functions_object = await this.functions_generator.generate_object(config, FunctionsMode.USER_INTERNAL); - this.current_functions_object = functions_object; - const content = await this.parser.parse_commands(template_content, functions_object); - return content; - } - async create_new_note_from_template(template, folder, filename, open_new_note = true) { - if (!folder) { - const new_file_location = app.vault.getConfig("newFileLocation"); - switch (new_file_location) { - case "current": { - const active_file = get_active_file(app); - if (active_file) { - folder = active_file.parent; - } - break; - } - case "folder": - folder = app.fileManager.getNewFileParent(""); - break; - case "root": - folder = app.vault.getRoot(); - break; - default: - break; - } - } - const created_note = await app.fileManager.createNewMarkdownFile(folder, filename ?? "Untitled"); - let running_config; - let output_content; - if (template instanceof import_obsidian13.TFile) { - running_config = this.create_running_config(template, created_note, 0); - output_content = await errorWrapper(async () => this.read_and_parse_template(running_config), "Template parsing error, aborting."); - } else { - running_config = this.create_running_config(void 0, created_note, 0); - output_content = await errorWrapper(async () => this.parse_template(running_config, template), "Template parsing error, aborting."); - } - if (output_content == null) { - await app.vault.delete(created_note); - return; - } - await app.vault.modify(created_note, output_content); - app.workspace.trigger("templater:new-note-from-template", { - file: created_note, - content: output_content - }); - if (open_new_note) { - const active_leaf = app.workspace.getLeaf(false); - if (!active_leaf) { - log_error(new TemplaterError("No active leaf")); - return; - } - await active_leaf.openFile(created_note, { - state: { mode: "source" } - }); - await this.plugin.editor_handler.jump_to_next_cursor_location(created_note, true); - active_leaf.setEphemeralState({ - rename: "all" - }); - } - return created_note; - } - async append_template_to_active_file(template_file) { - const active_view = app.workspace.getActiveViewOfType(import_obsidian13.MarkdownView); - const active_editor = app.workspace.activeEditor; - if (!active_editor || !active_editor.file || !active_editor.editor) { - log_error(new TemplaterError("No active editor, can't append templates.")); - return; - } - const running_config = this.create_running_config(template_file, active_editor.file, 1); - const output_content = await errorWrapper(async () => this.read_and_parse_template(running_config), "Template parsing error, aborting."); - if (output_content == null) { - return; - } - const editor = active_editor.editor; - const doc = editor.getDoc(); - const oldSelections = doc.listSelections(); - doc.replaceSelection(output_content); - app.workspace.trigger("templater:template-appended", { - view: active_view, - editor: active_editor, - content: output_content, - oldSelections, - newSelections: doc.listSelections() - }); - await this.plugin.editor_handler.jump_to_next_cursor_location(active_editor.file, true); - } - async write_template_to_file(template_file, file) { - const running_config = this.create_running_config(template_file, file, 2); - const output_content = await errorWrapper(async () => this.read_and_parse_template(running_config), "Template parsing error, aborting."); - if (output_content == null) { - return; - } - await app.vault.modify(file, output_content); - app.workspace.trigger("templater:new-note-from-template", { - file, - content: output_content - }); - await this.plugin.editor_handler.jump_to_next_cursor_location(file, true); - } - overwrite_active_file_commands() { - const active_editor = app.workspace.activeEditor; - if (!active_editor || !active_editor.file) { - log_error(new TemplaterError("Active editor is null, can't overwrite content")); - return; - } - this.overwrite_file_commands(active_editor.file, true); - } - async overwrite_file_commands(file, active_file = false) { - const running_config = this.create_running_config(file, file, active_file ? 3 : 2); - const output_content = await errorWrapper(async () => this.read_and_parse_template(running_config), "Template parsing error, aborting."); - if (output_content == null) { - return; - } - await app.vault.modify(file, output_content); - app.workspace.trigger("templater:overwrite-file", { - file, - content: output_content - }); - await this.plugin.editor_handler.jump_to_next_cursor_location(file, true); - } - async process_dynamic_templates(el, ctx) { - const dynamic_command_regex = generate_dynamic_command_regex(); - const walker = document.createNodeIterator(el, NodeFilter.SHOW_TEXT); - let node; - let pass = false; - let functions_object; - while (node = walker.nextNode()) { - let content = node.nodeValue; - if (content !== null) { - let match = dynamic_command_regex.exec(content); - if (match !== null) { - const file = app.metadataCache.getFirstLinkpathDest("", ctx.sourcePath); - if (!file || !(file instanceof import_obsidian13.TFile)) { - return; - } - if (!pass) { - pass = true; - const config = this.create_running_config(file, file, 4); - functions_object = await this.functions_generator.generate_object(config, FunctionsMode.USER_INTERNAL); - this.current_functions_object = functions_object; - } - } - while (match != null) { - const complete_command = match[1] + match[2]; - const command_output = await errorWrapper(async () => { - return await this.parser.parse_commands(complete_command, functions_object); - }, `Command Parsing error in dynamic command '${complete_command}'`); - if (command_output == null) { - return; - } - const start2 = dynamic_command_regex.lastIndex - match[0].length; - const end2 = dynamic_command_regex.lastIndex; - content = content.substring(0, start2) + command_output + content.substring(end2); - dynamic_command_regex.lastIndex += command_output.length - match[0].length; - match = dynamic_command_regex.exec(content); - } - node.nodeValue = content; - } - } - } - get_new_file_template_for_folder(folder) { - do { - const match = this.plugin.settings.folder_templates.find((e) => e.folder == folder.path); - if (match && match.template) { - return match.template; - } - folder = folder.parent; - } while (folder); - } - static async on_file_creation(templater, file) { - if (!(file instanceof import_obsidian13.TFile) || file.extension !== "md") { - return; - } - const template_folder = (0, import_obsidian13.normalizePath)(templater.plugin.settings.templates_folder); - if (file.path.includes(template_folder) && template_folder !== "/") { - return; - } - if (!(0, import_obsidian13.requireApiVersion)("1.0")) { - await delay(300); - } - if (file.stat.size == 0 && templater.plugin.settings.enable_folder_templates) { - const folder_template_match = templater.get_new_file_template_for_folder(file.parent); - if (!folder_template_match) { - return; - } - const template_file = await errorWrapper(async () => { - return resolve_tfile(folder_template_match); - }, `Couldn't find template ${folder_template_match}`); - if (template_file == null) { - return; - } - await templater.write_template_to_file(template_file, file); - } else { - if (file.stat.size <= 1e5) { - await templater.overwrite_file_commands(file); - } else { - console.log(`Templater skipped parsing ${file.path} because file size exceeds 10000`); - } - } - } - async execute_startup_scripts() { - for (const template of this.plugin.settings.startup_templates) { - if (!template) { - continue; - } - const file = errorWrapperSync(() => resolve_tfile(template), `Couldn't find startup template "${template}"`); - if (!file) { - continue; - } - const running_config = this.create_running_config(file, file, 5); - await errorWrapper(async () => this.read_and_parse_template(running_config), `Startup Template parsing error, aborting.`); - } - } -}; - -// src/handlers/EventHandler.ts -var import_obsidian14 = __toModule(require("obsidian")); -var EventHandler = class { - constructor(plugin, templater, settings) { - this.plugin = plugin; - this.templater = templater; - this.settings = settings; - } - setup() { - app.workspace.onLayoutReady(() => { - this.update_trigger_file_on_creation(); - }); - this.update_syntax_highlighting(); - this.update_file_menu(); - } - update_syntax_highlighting() { - const desktopShouldHighlight = this.plugin.editor_handler.desktopShouldHighlight(); - const mobileShouldHighlight = this.plugin.editor_handler.mobileShouldHighlight(); - if (desktopShouldHighlight || mobileShouldHighlight) { - this.syntax_highlighting_event = app.workspace.on("codemirror", (cm) => { - cm.setOption("mode", "templater"); - }); - app.workspace.iterateCodeMirrors((cm) => { - cm.setOption("mode", "templater"); - }); - this.plugin.registerEvent(this.syntax_highlighting_event); - } else { - if (this.syntax_highlighting_event) { - app.vault.offref(this.syntax_highlighting_event); - } - app.workspace.iterateCodeMirrors((cm) => { - cm.setOption("mode", "hypermd"); - }); - } - } - update_trigger_file_on_creation() { - if (this.settings.trigger_on_file_creation) { - this.trigger_on_file_creation_event = app.vault.on("create", (file) => Templater.on_file_creation(this.templater, file)); - this.plugin.registerEvent(this.trigger_on_file_creation_event); - } else { - if (this.trigger_on_file_creation_event) { - app.vault.offref(this.trigger_on_file_creation_event); - this.trigger_on_file_creation_event = void 0; - } - } - } - update_file_menu() { - this.plugin.registerEvent(app.workspace.on("file-menu", (menu, file) => { - if (file instanceof import_obsidian14.TFolder) { - menu.addItem((item) => { - item.setTitle("Create new note from template").setIcon("templater-icon").onClick(() => { - this.plugin.fuzzy_suggester.create_new_note_from_template(file); - }); - }); - } - })); - } -}; - -// src/handlers/CommandHandler.ts -var CommandHandler = class { - constructor(plugin) { - this.plugin = plugin; - } - setup() { - this.plugin.addCommand({ - id: "insert-templater", - name: "Open Insert Template modal", - hotkeys: [ - { - modifiers: ["Alt"], - key: "e" - } - ], - callback: () => { - this.plugin.fuzzy_suggester.insert_template(); - } - }); - this.plugin.addCommand({ - id: "replace-in-file-templater", - name: "Replace templates in the active file", - hotkeys: [ - { - modifiers: ["Alt"], - key: "r" - } - ], - callback: () => { - this.plugin.templater.overwrite_active_file_commands(); - } - }); - this.plugin.addCommand({ - id: "jump-to-next-cursor-location", - name: "Jump to next cursor location", - hotkeys: [ - { - modifiers: ["Alt"], - key: "Tab" - } - ], - callback: () => { - this.plugin.editor_handler.jump_to_next_cursor_location(); - } - }); - this.plugin.addCommand({ - id: "create-new-note-from-template", - name: "Create new note from template", - hotkeys: [ - { - modifiers: ["Alt"], - key: "n" - } - ], - callback: () => { - this.plugin.fuzzy_suggester.create_new_note_from_template(); - } - }); - this.register_templates_hotkeys(); - } - register_templates_hotkeys() { - this.plugin.settings.enabled_templates_hotkeys.forEach((template) => { - if (template) { - this.add_template_hotkey(null, template); - } - }); - } - add_template_hotkey(old_template, new_template) { - this.remove_template_hotkey(old_template); - if (new_template) { - this.plugin.addCommand({ - id: new_template, - name: `Insert ${new_template}`, - callback: () => { - const template = errorWrapperSync(() => resolve_tfile(new_template), `Couldn't find the template file associated with this hotkey`); - if (!template) { - return; - } - this.plugin.templater.append_template_to_active_file(template); - } - }); - } - } - remove_template_hotkey(template) { - if (template) { - app.commands.removeCommand(`${this.plugin.manifest.id}:${template}`); - } - } -}; - -// src/editor/Editor.ts -var import_obsidian16 = __toModule(require("obsidian")); - -// src/editor/CursorJumper.ts -var CursorJumper = class { - constructor() { - } - async jump_to_next_cursor_location() { - const active_editor = app.workspace.activeEditor; - if (!active_editor || !active_editor.editor) { - return; - } - const content = active_editor.editor.getValue(); - const { new_content, positions } = this.replace_and_get_cursor_positions(content); - if (positions) { - active_editor.editor.setValue(new_content); - this.set_cursor_location(positions); - } - if (app.vault.getConfig("vimMode")) { - const cm = active_editor.editor.cm.cm; - window.CodeMirrorAdapter.Vim.handleKey(cm, "i", "mapping"); - } - } - get_editor_position_from_index(content, index) { - const substr = content.slice(0, index); - let l = 0; - let offset2 = -1; - let r = -1; - for (; (r = substr.indexOf("\n", r + 1)) !== -1; l++, offset2 = r) - ; - offset2 += 1; - const ch = content.slice(offset2, index).length; - return { line: l, ch }; - } - replace_and_get_cursor_positions(content) { - let cursor_matches = []; - let match; - const cursor_regex = new RegExp("<%\\s*tp.file.cursor\\((?[0-9]*)\\)\\s*%>", "g"); - while ((match = cursor_regex.exec(content)) != null) { - cursor_matches.push(match); - } - if (cursor_matches.length === 0) { - return {}; - } - cursor_matches.sort((m1, m2) => { - return Number(m1.groups && m1.groups["order"]) - Number(m2.groups && m2.groups["order"]); - }); - const match_str = cursor_matches[0][0]; - cursor_matches = cursor_matches.filter((m) => { - return m[0] === match_str; - }); - const positions = []; - let index_offset = 0; - for (const match2 of cursor_matches) { - const index = match2.index - index_offset; - positions.push(this.get_editor_position_from_index(content, index)); - content = content.replace(new RegExp(escape_RegExp(match2[0])), ""); - index_offset += match2[0].length; - if (match2[1] === "") { - break; - } - } - return { new_content: content, positions }; - } - set_cursor_location(positions) { - const active_editor = app.workspace.activeEditor; - if (!active_editor || !active_editor.editor) { - return; - } - const editor = active_editor.editor; - const selections = []; - for (const pos of positions) { - selections.push({ from: pos }); - } - const transaction = { - selections - }; - editor.transaction(transaction); - } -}; - -// src/editor/Autocomplete.ts -var import_obsidian15 = __toModule(require("obsidian")); - -// toml:/home/runner/work/Templater/Templater/docs/documentation.toml -var tp = { config: { name: "config", description: "This module exposes Templater's running configuration.\n\nThis is mostly useful when writing scripts requiring some context information.\n", functions: { template_file: { name: "template_file", description: "The `TFile` object representing the template file.", definition: "tp.config.template_file" }, target_file: { name: "target_file", description: "The `TFile` object representing the target file where the template will be inserted.", definition: "tp.config.target_file" }, run_mode: { name: "run_mode", description: "The `RunMode`, representing the way Templater was launched (Create new from template, Append to active file, ...)", definition: "tp.config.run_mode" }, active_file: { name: "active_file", description: "The active file (if existing) when launching Templater.", definition: "tp.config.active_file?" } } }, date: { name: "date", description: "This module contains every internal function related to dates.", functions: { now: { name: "now", description: "Retrieves the date.", definition: 'tp.date.now(format: string = "YYYY-MM-DD", offset?: number\u23AEstring, reference?: string, reference_format?: string)', args: [{ name: "format", description: "Format for the date, refer to [format reference](https://momentjs.com/docs/#/displaying/format/)" }, { name: "offset", description: "Offset for the day, e.g. set this to `-7` to get last week's date. You can also specify the offset as a string using the ISO 8601 format" }, { name: "reference", description: "The date referential, e.g. set this to the note's title" }, { name: "reference_format", description: "The date reference format." }] }, tomorrow: { name: "tomorrow", description: "Retrieves tomorrow's date.", definition: 'tp.date.tomorrow(format: string = "YYYY-MM-DD")', args: [{ name: "format", description: "Format for the date, refer to [format reference](https://momentjs.com/docs/#/displaying/format/)" }] }, yesterday: { name: "yesterday", description: "Retrieves yesterday's date.", definition: 'tp.date.yesterday(format: string = "YYYY-MM-DD")', args: [{ name: "format", description: "Format for the date, refer to [format reference](https://momentjs.com/docs/#/displaying/format/)" }] }, weekday: { name: "weekday", description: "", definition: 'tp.date.weekday(format: string = "YYYY-MM-DD", weekday: number, reference?: string, reference_format?: string)', args: [{ name: "format", description: "Format for the date, refer to [format reference](https://momentjs.com/docs/#/displaying/format/)" }, { name: "weekday", description: "Week day number. If the locale assigns Monday as the first day of the week, `0` will be Monday, `-7` will be last week's day." }, { name: "reference", description: "The date referential, e.g. set this to the note's title" }, { name: "reference_format", description: "The date reference format." }] } } }, file: { name: "file", description: "This module contains every internal function related to files.", functions: { content: { name: "content", description: "Retrieves the file's content", definition: "tp.file.content" }, create_new: { name: "create_new", description: "Creates a new file using a specified template or with a specified content.", definition: "tp.file.create_new(template: TFile \u23AE string, filename?: string, open_new: boolean = false, folder?: TFolder)", args: [{ name: "template", description: "Either the template used for the new file content, or the file content as a string. If it is the template to use, you retrieve it with `tp.file.find_tfile(TEMPLATENAME)`" }, { name: "filename", description: 'The filename of the new file, defaults to "Untitled".' }, { name: "open_new", description: "Whether to open or not the newly created file. Warning: if you use this option, since commands are executed asynchronously, the file can be opened first and then other commands are appended to that new file and not the previous file." }, { name: "folder", description: 'The folder to put the new file in, defaults to obsidian\'s default location. If you want the file to appear in a different folder, specify it with `app.vault.getAbstractFileByPath("FOLDERNAME")`' }] }, creation_date: { name: "creation_date", description: "Retrieves the file's creation date.", definition: 'tp.file.creation_date(format: string = "YYYY-MM-DD HH:mm")', args: [{ name: "format", description: "Format for the date, refer to format reference" }] }, cursor: { name: "cursor", description: "Sets the cursor to this location after the template has been inserted. \n\nYou can navigate between the different tp.file.cursor using the configured hotkey in obsidian settings.\n", definition: "tp.file.cursor(order?: number)", args: [{ name: "order", description: "The order of the different cursors jump, e.g. it will jump from 1 to 2 to 3, and so on.\nIf you specify multiple tp.file.cursor with the same order, the editor will switch to multi-cursor.\n" }] }, cursor_append: { name: "cursor_append", description: "Appends some content after the active cursor in the file.", definition: "tp.file.cursor_append(content: string)", args: [{ name: "content", description: "The content to append after the active cursor" }] }, exists: { name: "exists", description: "The filename of the file we want to check existence. The fullpath to the file, relative to the Vault and containing the extension, must be provided. e.g. MyFolder/SubFolder/MyFile.", definition: "tp.file.exists(filename: string)", args: [{ name: "filename", description: "The filename of the file we want to check existence, e.g. MyFile." }] }, find_tfile: { name: "find_tfile", description: "Search for a file and returns its `TFile` instance", definition: "tp.file.find_tfile(filename: string)", args: [{ name: "filename", description: "The filename we want to search and resolve as a `TFile`" }] }, folder: { name: "folder", description: "Retrieves the file's folder name.", definition: "tp.file.folder(relative: boolean = false)", args: [{ name: "relative", description: "If set to true, appends the vault relative path to the folder name." }] }, include: { name: "include", description: "Includes the file's link content. Templates in the included content will be resolved.", definition: "tp.file.include(include_link: string \u23AE TFile)", args: [{ name: "include_link", description: "The link to the file to include, e.g. [[MyFile]], or a TFile object. Also supports sections or blocks inclusions, e.g. [[MyFile#Section1]]" }] }, last_modified_date: { name: "last_modified_date", description: "Retrieves the file's last modification date.", definition: 'tp.file.last_modified_date(format: string = "YYYY-MM-DD HH:mm")', args: [{ name: "format", description: "Format for the date, refer to format reference." }] }, move: { name: "functions.move", description: "Moves the file to the desired vault location.", definition: "tp.file.move(new_path: string, file_to_move?: TFile)", args: [{ name: "new_path", description: "The new vault relative path of the file, without the file extension. Note: the new path needs to include the folder and the filename, e.g. /Notes/MyNote" }] }, path: { name: "path", description: "Retrieves the file's absolute path on the system.", definition: "tp.file.path(relative: boolean = false)", args: [{ name: "relative", description: "If set to true, only retrieves the vault's relative path." }] }, rename: { name: "rename", description: "Renames the file (keeps the same file extension).", definition: "tp.file.rename(new_title: string)", args: [{ name: "new_title", description: "The new file title." }] }, selection: { name: "selection", description: "Retrieves the active file's text selection.", definition: "tp.file.selection()" }, tags: { name: "tags", description: "Retrieves the file's tags (array of string)", definition: "tp.file.tags" }, title: { name: "title", definition: "tp.file.title", description: "Retrieves the file's title." } } }, frontmatter: { name: "frontmatter", description: "This modules exposes all the frontmatter variables of a file as variables." }, obsidian: { name: "obsidian", description: "This module exposes all the functions and classes from the obsidian API." }, system: { name: "system", description: "This module contains system related functions.", functions: { clipboard: { name: "clipboard", description: "Retrieves the clipboard's content", definition: "tp.system.clipboard()" }, prompt: { name: "prompt", description: "Spawns a prompt modal and returns the user's input.", definition: "tp.system.prompt(prompt_text?: string, default_value?: string, throw_on_cancel: boolean = false, multiline?: boolean = false)", args: [{ name: "prompt_text", description: "Text placed above the input field" }, { name: "default_value", description: "A default value for the input field" }, { name: "throw_on_cancel", description: "Throws an error if the prompt is canceled, instead of returning a `null` value" }, { name: "multiline", description: "If set to true, the input field will be a multiline textarea" }] }, suggester: { name: "suggester", description: "Spawns a suggester prompt and returns the user's chosen item.", definition: 'tp.system.suggester(text_items: string[] \u23AE ((item: T) => string), items: T[], throw_on_cancel: boolean = false, placeholder: string = "", limit?: number = undefined)', args: [{ name: "text_items", description: "Array of strings representing the text that will be displayed for each item in the suggester prompt. This can also be a function that maps an item to its text representation." }, { name: "items", description: "Array containing the values of each item in the correct order." }, { name: "throw_on_cancel", description: "Throws an error if the prompt is canceled, instead of returning a `null` value" }, { name: "placeholder", description: "Placeholder string of the prompt" }, { name: "limit", description: "Limit the number of items rendered at once (useful to improve performance when displaying large lists)" }] } } }, web: { name: "web", description: "This modules contains every internal function related to the web (making web requests).", functions: { daily_quote: { name: "daily_quote", description: "Retrieves and parses the daily quote from the API https://api.quotable.io", definition: "tp.web.daily_quote()" }, random_picture: { name: "random_picture", description: "Gets a random image from https://unsplash.com/", definition: "tp.web.random_picture(size?: string, query?: string, include_size?: boolean)", args: [{ name: "size", description: "Image size in the format `x`" }, { name: "query", description: "Limits selection to photos matching a search term. Multiple search terms can be passed separated by a comma `,`" }, { name: "include_size", description: "Optional argument to include the specified size in the image link markdown. Defaults to false" }] } } } }; -var documentation_default = { tp }; - -// src/editor/TpDocumentation.ts -var module_names = [ - "config", - "date", - "file", - "frontmatter", - "obsidian", - "system", - "user", - "web" -]; -var module_names_checker = new Set(module_names); -function is_module_name(x) { - return typeof x === "string" && module_names_checker.has(x); -} -function is_function_documentation(x) { - if (x.definition) { - return true; - } - return false; -} -var Documentation = class { - constructor() { - this.documentation = documentation_default; - } - get_all_modules_documentation() { - return Object.values(this.documentation.tp); - } - get_all_functions_documentation(module_name) { - if (!this.documentation.tp[module_name].functions) { - return; - } - return Object.values(this.documentation.tp[module_name].functions); - } - get_module_documentation(module_name) { - return this.documentation.tp[module_name]; - } - get_function_documentation(module_name, function_name) { - return this.documentation.tp[module_name].functions[function_name]; - } - get_argument_documentation(module_name, function_name, argument_name) { - const function_doc = this.get_function_documentation(module_name, function_name); - if (!function_doc || !function_doc.args) { - return null; - } - return function_doc.args[argument_name]; - } -}; - -// src/editor/Autocomplete.ts -var Autocomplete = class extends import_obsidian15.EditorSuggest { - constructor() { - super(app); - this.tp_keyword_regex = /tp\.(?[a-z]*)?(?\.(?[a-z_]*)?)?$/; - this.documentation = new Documentation(); - } - onTrigger(cursor, editor, _file) { - const range = editor.getRange({ line: cursor.line, ch: 0 }, { line: cursor.line, ch: cursor.ch }); - const match = this.tp_keyword_regex.exec(range); - if (!match) { - return null; - } - let query; - const module_name = match.groups && match.groups["module"] || ""; - this.module_name = module_name; - if (match.groups && match.groups["fn_trigger"]) { - if (module_name == "" || !is_module_name(module_name)) { - return null; - } - this.function_trigger = true; - this.function_name = match.groups["fn"] || ""; - query = this.function_name; - } else { - this.function_trigger = false; - query = this.module_name; - } - const trigger_info = { - start: { line: cursor.line, ch: cursor.ch - query.length }, - end: { line: cursor.line, ch: cursor.ch }, - query - }; - this.latest_trigger_info = trigger_info; - return trigger_info; - } - getSuggestions(context) { - let suggestions; - if (this.module_name && this.function_trigger) { - suggestions = this.documentation.get_all_functions_documentation(this.module_name); - } else { - suggestions = this.documentation.get_all_modules_documentation(); - } - if (!suggestions) { - return []; - } - return suggestions.filter((s) => s.name.startsWith(context.query)); - } - renderSuggestion(value, el) { - el.createEl("b", { text: value.name }); - el.createEl("br"); - if (this.function_trigger && is_function_documentation(value)) { - el.createEl("code", { text: value.definition }); - } - if (value.description) { - el.createEl("div", { text: value.description }); - } - } - selectSuggestion(value, _evt) { - const active_editor = app.workspace.activeEditor; - if (!active_editor || !active_editor.editor) { - return; - } - active_editor.editor.replaceRange(value.name, this.latest_trigger_info.start, this.latest_trigger_info.end); - if (this.latest_trigger_info.start.ch == this.latest_trigger_info.end.ch) { - const cursor_pos = this.latest_trigger_info.end; - cursor_pos.ch += value.name.length; - active_editor.editor.setCursor(cursor_pos); - } - } -}; - -// src/editor/mode/javascript.js -(function(mod) { - mod(window.CodeMirror); -})(function(CodeMirror) { - "use strict"; - CodeMirror.defineMode("javascript", function(config, parserConfig) { - var indentUnit = config.indentUnit; - var statementIndent = parserConfig.statementIndent; - var jsonldMode = parserConfig.jsonld; - var jsonMode = parserConfig.json || jsonldMode; - var trackScope = parserConfig.trackScope !== false; - var isTS = parserConfig.typescript; - var wordRE = parserConfig.wordCharacters || /[\w$\xa1-\uffff]/; - var keywords = function() { - function kw(type2) { - return { type: type2, style: "keyword" }; - } - var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c"), D = kw("keyword d"); - var operator = kw("operator"), atom = { type: "atom", style: "atom" }; - return { - if: kw("if"), - while: A, - with: A, - else: B, - do: B, - try: B, - finally: B, - return: D, - break: D, - continue: D, - new: kw("new"), - delete: C, - void: C, - throw: C, - debugger: kw("debugger"), - var: kw("var"), - const: kw("var"), - let: kw("var"), - function: kw("function"), - catch: kw("catch"), - for: kw("for"), - switch: kw("switch"), - case: kw("case"), - default: kw("default"), - in: operator, - typeof: operator, - instanceof: operator, - true: atom, - false: atom, - null: atom, - undefined: atom, - NaN: atom, - Infinity: atom, - this: kw("this"), - class: kw("class"), - super: kw("atom"), - yield: C, - export: kw("export"), - import: kw("import"), - extends: C, - await: C - }; - }(); - var isOperatorChar = /[+\-*&%=<>!?|~^@]/; - var isJsonldKeyword = /^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/; - function readRegexp(stream) { - var escaped = false, next, inSet = false; - while ((next = stream.next()) != null) { - if (!escaped) { - if (next == "/" && !inSet) - return; - if (next == "[") - inSet = true; - else if (inSet && next == "]") - inSet = false; - } - escaped = !escaped && next == "\\"; - } - } - var type, content; - function ret(tp2, style, cont2) { - type = tp2; - content = cont2; - return style; - } - function tokenBase(stream, state) { - var ch = stream.next(); - if (ch == '"' || ch == "'") { - state.tokenize = tokenString(ch); - return state.tokenize(stream, state); - } else if (ch == "." && stream.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/)) { - return ret("number", "number"); - } else if (ch == "." && stream.match("..")) { - return ret("spread", "meta"); - } else if (/[\[\]{}\(\),;\:\.]/.test(ch)) { - return ret(ch); - } else if (ch == "=" && stream.eat(">")) { - return ret("=>", "operator"); - } else if (ch == "0" && stream.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/)) { - return ret("number", "number"); - } else if (/\d/.test(ch)) { - stream.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/); - return ret("number", "number"); - } else if (ch == "/") { - if (stream.eat("*")) { - state.tokenize = tokenComment; - return tokenComment(stream, state); - } else if (stream.eat("/")) { - stream.skipToEnd(); - return ret("comment", "comment"); - } else if (expressionAllowed(stream, state, 1)) { - readRegexp(stream); - stream.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/); - return ret("regexp", "string-2"); - } else { - stream.eat("="); - return ret("operator", "operator", stream.current()); - } - } else if (ch == "`") { - state.tokenize = tokenQuasi; - return tokenQuasi(stream, state); - } else if (ch == "#" && stream.peek() == "!") { - stream.skipToEnd(); - return ret("meta", "meta"); - } else if (ch == "#" && stream.eatWhile(wordRE)) { - return ret("variable", "property"); - } else if (ch == "<" && stream.match("!--") || ch == "-" && stream.match("->") && !/\S/.test(stream.string.slice(0, stream.start))) { - stream.skipToEnd(); - return ret("comment", "comment"); - } else if (isOperatorChar.test(ch)) { - if (ch != ">" || !state.lexical || state.lexical.type != ">") { - if (stream.eat("=")) { - if (ch == "!" || ch == "=") - stream.eat("="); - } else if (/[<>*+\-|&?]/.test(ch)) { - stream.eat(ch); - if (ch == ">") - stream.eat(ch); - } - } - if (ch == "?" && stream.eat(".")) - return ret("."); - return ret("operator", "operator", stream.current()); - } else if (wordRE.test(ch)) { - stream.eatWhile(wordRE); - var word = stream.current(); - if (state.lastType != ".") { - if (keywords.propertyIsEnumerable(word)) { - var kw = keywords[word]; - return ret(kw.type, kw.style, word); - } - if (word == "async" && stream.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/, false)) - return ret("async", "keyword", word); - } - return ret("variable", "variable", word); - } - } - function tokenString(quote) { - return function(stream, state) { - var escaped = false, next; - if (jsonldMode && stream.peek() == "@" && stream.match(isJsonldKeyword)) { - state.tokenize = tokenBase; - return ret("jsonld-keyword", "meta"); - } - while ((next = stream.next()) != null) { - if (next == quote && !escaped) - break; - escaped = !escaped && next == "\\"; - } - if (!escaped) - state.tokenize = tokenBase; - return ret("string", "string"); - }; - } - function tokenComment(stream, state) { - var maybeEnd = false, ch; - while (ch = stream.next()) { - if (ch == "/" && maybeEnd) { - state.tokenize = tokenBase; - break; - } - maybeEnd = ch == "*"; - } - return ret("comment", "comment"); - } - function tokenQuasi(stream, state) { - var escaped = false, next; - while ((next = stream.next()) != null) { - if (!escaped && (next == "`" || next == "$" && stream.eat("{"))) { - state.tokenize = tokenBase; - break; - } - escaped = !escaped && next == "\\"; - } - return ret("quasi", "string-2", stream.current()); - } - var brackets = "([{}])"; - function findFatArrow(stream, state) { - if (state.fatArrowAt) - state.fatArrowAt = null; - var arrow2 = stream.string.indexOf("=>", stream.start); - if (arrow2 < 0) - return; - if (isTS) { - var m = /:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(stream.string.slice(stream.start, arrow2)); - if (m) - arrow2 = m.index; - } - var depth = 0, sawSomething = false; - for (var pos = arrow2 - 1; pos >= 0; --pos) { - var ch = stream.string.charAt(pos); - var bracket = brackets.indexOf(ch); - if (bracket >= 0 && bracket < 3) { - if (!depth) { - ++pos; - break; - } - if (--depth == 0) { - if (ch == "(") - sawSomething = true; - break; - } - } else if (bracket >= 3 && bracket < 6) { - ++depth; - } else if (wordRE.test(ch)) { - sawSomething = true; - } else if (/["'\/`]/.test(ch)) { - for (; ; --pos) { - if (pos == 0) - return; - var next = stream.string.charAt(pos - 1); - if (next == ch && stream.string.charAt(pos - 2) != "\\") { - pos--; - break; - } - } - } else if (sawSomething && !depth) { - ++pos; - break; - } - } - if (sawSomething && !depth) - state.fatArrowAt = pos; - } - var atomicTypes = { - atom: true, - number: true, - variable: true, - string: true, - regexp: true, - this: true, - import: true, - "jsonld-keyword": true - }; - function JSLexical(indented, column, type2, align, prev, info) { - this.indented = indented; - this.column = column; - this.type = type2; - this.prev = prev; - this.info = info; - if (align != null) - this.align = align; - } - function inScope(state, varname) { - if (!trackScope) - return false; - for (var v = state.localVars; v; v = v.next) - if (v.name == varname) - return true; - for (var cx2 = state.context; cx2; cx2 = cx2.prev) { - for (var v = cx2.vars; v; v = v.next) - if (v.name == varname) - return true; - } - } - function parseJS(state, style, type2, content2, stream) { - var cc = state.cc; - cx.state = state; - cx.stream = stream; - cx.marked = null, cx.cc = cc; - cx.style = style; - if (!state.lexical.hasOwnProperty("align")) - state.lexical.align = true; - while (true) { - var combinator = cc.length ? cc.pop() : jsonMode ? expression : statement; - if (combinator(type2, content2)) { - while (cc.length && cc[cc.length - 1].lex) - cc.pop()(); - if (cx.marked) - return cx.marked; - if (type2 == "variable" && inScope(state, content2)) - return "variable-2"; - return style; - } - } - } - var cx = { state: null, column: null, marked: null, cc: null }; - function pass() { - for (var i = arguments.length - 1; i >= 0; i--) - cx.cc.push(arguments[i]); - } - function cont() { - pass.apply(null, arguments); - return true; - } - function inList(name, list) { - for (var v = list; v; v = v.next) - if (v.name == name) - return true; - return false; - } - function register(varname) { - var state = cx.state; - cx.marked = "def"; - if (!trackScope) - return; - if (state.context) { - if (state.lexical.info == "var" && state.context && state.context.block) { - var newContext = registerVarScoped(varname, state.context); - if (newContext != null) { - state.context = newContext; - return; - } - } else if (!inList(varname, state.localVars)) { - state.localVars = new Var(varname, state.localVars); - return; - } - } - if (parserConfig.globalVars && !inList(varname, state.globalVars)) - state.globalVars = new Var(varname, state.globalVars); - } - function registerVarScoped(varname, context) { - if (!context) { - return null; - } else if (context.block) { - var inner = registerVarScoped(varname, context.prev); - if (!inner) - return null; - if (inner == context.prev) - return context; - return new Context(inner, context.vars, true); - } else if (inList(varname, context.vars)) { - return context; - } else { - return new Context(context.prev, new Var(varname, context.vars), false); - } - } - function isModifier(name) { - return name == "public" || name == "private" || name == "protected" || name == "abstract" || name == "readonly"; - } - function Context(prev, vars, block2) { - this.prev = prev; - this.vars = vars; - this.block = block2; - } - function Var(name, next) { - this.name = name; - this.next = next; - } - var defaultVars = new Var("this", new Var("arguments", null)); - function pushcontext() { - cx.state.context = new Context(cx.state.context, cx.state.localVars, false); - cx.state.localVars = defaultVars; - } - function pushblockcontext() { - cx.state.context = new Context(cx.state.context, cx.state.localVars, true); - cx.state.localVars = null; - } - function popcontext() { - cx.state.localVars = cx.state.context.vars; - cx.state.context = cx.state.context.prev; - } - popcontext.lex = true; - function pushlex(type2, info) { - var result = function() { - var state = cx.state, indent = state.indented; - if (state.lexical.type == "stat") - indent = state.lexical.indented; - else - for (var outer = state.lexical; outer && outer.type == ")" && outer.align; outer = outer.prev) - indent = outer.indented; - state.lexical = new JSLexical(indent, cx.stream.column(), type2, null, state.lexical, info); - }; - result.lex = true; - return result; - } - function poplex() { - var state = cx.state; - if (state.lexical.prev) { - if (state.lexical.type == ")") - state.indented = state.lexical.indented; - state.lexical = state.lexical.prev; - } - } - poplex.lex = true; - function expect(wanted) { - function exp(type2) { - if (type2 == wanted) - return cont(); - else if (wanted == ";" || type2 == "}" || type2 == ")" || type2 == "]") - return pass(); - else - return cont(exp); - } - return exp; - } - function statement(type2, value) { - if (type2 == "var") - return cont(pushlex("vardef", value), vardef, expect(";"), poplex); - if (type2 == "keyword a") - return cont(pushlex("form"), parenExpr, statement, poplex); - if (type2 == "keyword b") - return cont(pushlex("form"), statement, poplex); - if (type2 == "keyword d") - return cx.stream.match(/^\s*$/, false) ? cont() : cont(pushlex("stat"), maybeexpression, expect(";"), poplex); - if (type2 == "debugger") - return cont(expect(";")); - if (type2 == "{") - return cont(pushlex("}"), pushblockcontext, block, poplex, popcontext); - if (type2 == ";") - return cont(); - if (type2 == "if") { - if (cx.state.lexical.info == "else" && cx.state.cc[cx.state.cc.length - 1] == poplex) - cx.state.cc.pop()(); - return cont(pushlex("form"), parenExpr, statement, poplex, maybeelse); - } - if (type2 == "function") - return cont(functiondef); - if (type2 == "for") - return cont(pushlex("form"), pushblockcontext, forspec, statement, popcontext, poplex); - if (type2 == "class" || isTS && value == "interface") { - cx.marked = "keyword"; - return cont(pushlex("form", type2 == "class" ? type2 : value), className, poplex); - } - if (type2 == "variable") { - if (isTS && value == "declare") { - cx.marked = "keyword"; - return cont(statement); - } else if (isTS && (value == "module" || value == "enum" || value == "type") && cx.stream.match(/^\s*\w/, false)) { - cx.marked = "keyword"; - if (value == "enum") - return cont(enumdef); - else if (value == "type") - return cont(typename, expect("operator"), typeexpr, expect(";")); - else - return cont(pushlex("form"), pattern, expect("{"), pushlex("}"), block, poplex, poplex); - } else if (isTS && value == "namespace") { - cx.marked = "keyword"; - return cont(pushlex("form"), expression, statement, poplex); - } else if (isTS && value == "abstract") { - cx.marked = "keyword"; - return cont(statement); - } else { - return cont(pushlex("stat"), maybelabel); - } - } - if (type2 == "switch") - return cont(pushlex("form"), parenExpr, expect("{"), pushlex("}", "switch"), pushblockcontext, block, poplex, poplex, popcontext); - if (type2 == "case") - return cont(expression, expect(":")); - if (type2 == "default") - return cont(expect(":")); - if (type2 == "catch") - return cont(pushlex("form"), pushcontext, maybeCatchBinding, statement, poplex, popcontext); - if (type2 == "export") - return cont(pushlex("stat"), afterExport, poplex); - if (type2 == "import") - return cont(pushlex("stat"), afterImport, poplex); - if (type2 == "async") - return cont(statement); - if (value == "@") - return cont(expression, statement); - return pass(pushlex("stat"), expression, expect(";"), poplex); - } - function maybeCatchBinding(type2) { - if (type2 == "(") - return cont(funarg, expect(")")); - } - function expression(type2, value) { - return expressionInner(type2, value, false); - } - function expressionNoComma(type2, value) { - return expressionInner(type2, value, true); - } - function parenExpr(type2) { - if (type2 != "(") - return pass(); - return cont(pushlex(")"), maybeexpression, expect(")"), poplex); - } - function expressionInner(type2, value, noComma) { - if (cx.state.fatArrowAt == cx.stream.start) { - var body = noComma ? arrowBodyNoComma : arrowBody; - if (type2 == "(") - return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, expect("=>"), body, popcontext); - else if (type2 == "variable") - return pass(pushcontext, pattern, expect("=>"), body, popcontext); - } - var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma; - if (atomicTypes.hasOwnProperty(type2)) - return cont(maybeop); - if (type2 == "function") - return cont(functiondef, maybeop); - if (type2 == "class" || isTS && value == "interface") { - cx.marked = "keyword"; - return cont(pushlex("form"), classExpression, poplex); - } - if (type2 == "keyword c" || type2 == "async") - return cont(noComma ? expressionNoComma : expression); - if (type2 == "(") - return cont(pushlex(")"), maybeexpression, expect(")"), poplex, maybeop); - if (type2 == "operator" || type2 == "spread") - return cont(noComma ? expressionNoComma : expression); - if (type2 == "[") - return cont(pushlex("]"), arrayLiteral, poplex, maybeop); - if (type2 == "{") - return contCommasep(objprop, "}", null, maybeop); - if (type2 == "quasi") - return pass(quasi, maybeop); - if (type2 == "new") - return cont(maybeTarget(noComma)); - return cont(); - } - function maybeexpression(type2) { - if (type2.match(/[;\}\)\],]/)) - return pass(); - return pass(expression); - } - function maybeoperatorComma(type2, value) { - if (type2 == ",") - return cont(maybeexpression); - return maybeoperatorNoComma(type2, value, false); - } - function maybeoperatorNoComma(type2, value, noComma) { - var me = noComma == false ? maybeoperatorComma : maybeoperatorNoComma; - var expr = noComma == false ? expression : expressionNoComma; - if (type2 == "=>") - return cont(pushcontext, noComma ? arrowBodyNoComma : arrowBody, popcontext); - if (type2 == "operator") { - if (/\+\+|--/.test(value) || isTS && value == "!") - return cont(me); - if (isTS && value == "<" && cx.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/, false)) - return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, me); - if (value == "?") - return cont(expression, expect(":"), expr); - return cont(expr); - } - if (type2 == "quasi") { - return pass(quasi, me); - } - if (type2 == ";") - return; - if (type2 == "(") - return contCommasep(expressionNoComma, ")", "call", me); - if (type2 == ".") - return cont(property, me); - if (type2 == "[") - return cont(pushlex("]"), maybeexpression, expect("]"), poplex, me); - if (isTS && value == "as") { - cx.marked = "keyword"; - return cont(typeexpr, me); - } - if (type2 == "regexp") { - cx.state.lastType = cx.marked = "operator"; - cx.stream.backUp(cx.stream.pos - cx.stream.start - 1); - return cont(expr); - } - } - function quasi(type2, value) { - if (type2 != "quasi") - return pass(); - if (value.slice(value.length - 2) != "${") - return cont(quasi); - return cont(maybeexpression, continueQuasi); - } - function continueQuasi(type2) { - if (type2 == "}") { - cx.marked = "string-2"; - cx.state.tokenize = tokenQuasi; - return cont(quasi); - } - } - function arrowBody(type2) { - findFatArrow(cx.stream, cx.state); - return pass(type2 == "{" ? statement : expression); - } - function arrowBodyNoComma(type2) { - findFatArrow(cx.stream, cx.state); - return pass(type2 == "{" ? statement : expressionNoComma); - } - function maybeTarget(noComma) { - return function(type2) { - if (type2 == ".") - return cont(noComma ? targetNoComma : target); - else if (type2 == "variable" && isTS) - return cont(maybeTypeArgs, noComma ? maybeoperatorNoComma : maybeoperatorComma); - else - return pass(noComma ? expressionNoComma : expression); - }; - } - function target(_, value) { - if (value == "target") { - cx.marked = "keyword"; - return cont(maybeoperatorComma); - } - } - function targetNoComma(_, value) { - if (value == "target") { - cx.marked = "keyword"; - return cont(maybeoperatorNoComma); - } - } - function maybelabel(type2) { - if (type2 == ":") - return cont(poplex, statement); - return pass(maybeoperatorComma, expect(";"), poplex); - } - function property(type2) { - if (type2 == "variable") { - cx.marked = "property"; - return cont(); - } - } - function objprop(type2, value) { - if (type2 == "async") { - cx.marked = "property"; - return cont(objprop); - } else if (type2 == "variable" || cx.style == "keyword") { - cx.marked = "property"; - if (value == "get" || value == "set") - return cont(getterSetter); - var m; - if (isTS && cx.state.fatArrowAt == cx.stream.start && (m = cx.stream.match(/^\s*:\s*/, false))) - cx.state.fatArrowAt = cx.stream.pos + m[0].length; - return cont(afterprop); - } else if (type2 == "number" || type2 == "string") { - cx.marked = jsonldMode ? "property" : cx.style + " property"; - return cont(afterprop); - } else if (type2 == "jsonld-keyword") { - return cont(afterprop); - } else if (isTS && isModifier(value)) { - cx.marked = "keyword"; - return cont(objprop); - } else if (type2 == "[") { - return cont(expression, maybetype, expect("]"), afterprop); - } else if (type2 == "spread") { - return cont(expressionNoComma, afterprop); - } else if (value == "*") { - cx.marked = "keyword"; - return cont(objprop); - } else if (type2 == ":") { - return pass(afterprop); - } - } - function getterSetter(type2) { - if (type2 != "variable") - return pass(afterprop); - cx.marked = "property"; - return cont(functiondef); - } - function afterprop(type2) { - if (type2 == ":") - return cont(expressionNoComma); - if (type2 == "(") - return pass(functiondef); - } - function commasep(what, end2, sep) { - function proceed(type2, value) { - if (sep ? sep.indexOf(type2) > -1 : type2 == ",") { - var lex = cx.state.lexical; - if (lex.info == "call") - lex.pos = (lex.pos || 0) + 1; - return cont(function(type3, value2) { - if (type3 == end2 || value2 == end2) - return pass(); - return pass(what); - }, proceed); - } - if (type2 == end2 || value == end2) - return cont(); - if (sep && sep.indexOf(";") > -1) - return pass(what); - return cont(expect(end2)); - } - return function(type2, value) { - if (type2 == end2 || value == end2) - return cont(); - return pass(what, proceed); - }; - } - function contCommasep(what, end2, info) { - for (var i = 3; i < arguments.length; i++) - cx.cc.push(arguments[i]); - return cont(pushlex(end2, info), commasep(what, end2), poplex); - } - function block(type2) { - if (type2 == "}") - return cont(); - return pass(statement, block); - } - function maybetype(type2, value) { - if (isTS) { - if (type2 == ":") - return cont(typeexpr); - if (value == "?") - return cont(maybetype); - } - } - function maybetypeOrIn(type2, value) { - if (isTS && (type2 == ":" || value == "in")) - return cont(typeexpr); - } - function mayberettype(type2) { - if (isTS && type2 == ":") { - if (cx.stream.match(/^\s*\w+\s+is\b/, false)) - return cont(expression, isKW, typeexpr); - else - return cont(typeexpr); - } - } - function isKW(_, value) { - if (value == "is") { - cx.marked = "keyword"; - return cont(); - } - } - function typeexpr(type2, value) { - if (value == "keyof" || value == "typeof" || value == "infer" || value == "readonly") { - cx.marked = "keyword"; - return cont(value == "typeof" ? expressionNoComma : typeexpr); - } - if (type2 == "variable" || value == "void") { - cx.marked = "type"; - return cont(afterType); - } - if (value == "|" || value == "&") - return cont(typeexpr); - if (type2 == "string" || type2 == "number" || type2 == "atom") - return cont(afterType); - if (type2 == "[") - return cont(pushlex("]"), commasep(typeexpr, "]", ","), poplex, afterType); - if (type2 == "{") - return cont(pushlex("}"), typeprops, poplex, afterType); - if (type2 == "(") - return cont(commasep(typearg, ")"), maybeReturnType, afterType); - if (type2 == "<") - return cont(commasep(typeexpr, ">"), typeexpr); - if (type2 == "quasi") { - return pass(quasiType, afterType); - } - } - function maybeReturnType(type2) { - if (type2 == "=>") - return cont(typeexpr); - } - function typeprops(type2) { - if (type2.match(/[\}\)\]]/)) - return cont(); - if (type2 == "," || type2 == ";") - return cont(typeprops); - return pass(typeprop, typeprops); - } - function typeprop(type2, value) { - if (type2 == "variable" || cx.style == "keyword") { - cx.marked = "property"; - return cont(typeprop); - } else if (value == "?" || type2 == "number" || type2 == "string") { - return cont(typeprop); - } else if (type2 == ":") { - return cont(typeexpr); - } else if (type2 == "[") { - return cont(expect("variable"), maybetypeOrIn, expect("]"), typeprop); - } else if (type2 == "(") { - return pass(functiondecl, typeprop); - } else if (!type2.match(/[;\}\)\],]/)) { - return cont(); - } - } - function quasiType(type2, value) { - if (type2 != "quasi") - return pass(); - if (value.slice(value.length - 2) != "${") - return cont(quasiType); - return cont(typeexpr, continueQuasiType); - } - function continueQuasiType(type2) { - if (type2 == "}") { - cx.marked = "string-2"; - cx.state.tokenize = tokenQuasi; - return cont(quasiType); - } - } - function typearg(type2, value) { - if (type2 == "variable" && cx.stream.match(/^\s*[?:]/, false) || value == "?") - return cont(typearg); - if (type2 == ":") - return cont(typeexpr); - if (type2 == "spread") - return cont(typearg); - return pass(typeexpr); - } - function afterType(type2, value) { - if (value == "<") - return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType); - if (value == "|" || type2 == "." || value == "&") - return cont(typeexpr); - if (type2 == "[") - return cont(typeexpr, expect("]"), afterType); - if (value == "extends" || value == "implements") { - cx.marked = "keyword"; - return cont(typeexpr); - } - if (value == "?") - return cont(typeexpr, expect(":"), typeexpr); - } - function maybeTypeArgs(_, value) { - if (value == "<") - return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType); - } - function typeparam() { - return pass(typeexpr, maybeTypeDefault); - } - function maybeTypeDefault(_, value) { - if (value == "=") - return cont(typeexpr); - } - function vardef(_, value) { - if (value == "enum") { - cx.marked = "keyword"; - return cont(enumdef); - } - return pass(pattern, maybetype, maybeAssign, vardefCont); - } - function pattern(type2, value) { - if (isTS && isModifier(value)) { - cx.marked = "keyword"; - return cont(pattern); - } - if (type2 == "variable") { - register(value); - return cont(); - } - if (type2 == "spread") - return cont(pattern); - if (type2 == "[") - return contCommasep(eltpattern, "]"); - if (type2 == "{") - return contCommasep(proppattern, "}"); - } - function proppattern(type2, value) { - if (type2 == "variable" && !cx.stream.match(/^\s*:/, false)) { - register(value); - return cont(maybeAssign); - } - if (type2 == "variable") - cx.marked = "property"; - if (type2 == "spread") - return cont(pattern); - if (type2 == "}") - return pass(); - if (type2 == "[") - return cont(expression, expect("]"), expect(":"), proppattern); - return cont(expect(":"), pattern, maybeAssign); - } - function eltpattern() { - return pass(pattern, maybeAssign); - } - function maybeAssign(_type, value) { - if (value == "=") - return cont(expressionNoComma); - } - function vardefCont(type2) { - if (type2 == ",") - return cont(vardef); - } - function maybeelse(type2, value) { - if (type2 == "keyword b" && value == "else") - return cont(pushlex("form", "else"), statement, poplex); - } - function forspec(type2, value) { - if (value == "await") - return cont(forspec); - if (type2 == "(") - return cont(pushlex(")"), forspec1, poplex); - } - function forspec1(type2) { - if (type2 == "var") - return cont(vardef, forspec2); - if (type2 == "variable") - return cont(forspec2); - return pass(forspec2); - } - function forspec2(type2, value) { - if (type2 == ")") - return cont(); - if (type2 == ";") - return cont(forspec2); - if (value == "in" || value == "of") { - cx.marked = "keyword"; - return cont(expression, forspec2); - } - return pass(expression, forspec2); - } - function functiondef(type2, value) { - if (value == "*") { - cx.marked = "keyword"; - return cont(functiondef); - } - if (type2 == "variable") { - register(value); - return cont(functiondef); - } - if (type2 == "(") - return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, mayberettype, statement, popcontext); - if (isTS && value == "<") - return cont(pushlex(">"), commasep(typeparam, ">"), poplex, functiondef); - } - function functiondecl(type2, value) { - if (value == "*") { - cx.marked = "keyword"; - return cont(functiondecl); - } - if (type2 == "variable") { - register(value); - return cont(functiondecl); - } - if (type2 == "(") - return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, mayberettype, popcontext); - if (isTS && value == "<") - return cont(pushlex(">"), commasep(typeparam, ">"), poplex, functiondecl); - } - function typename(type2, value) { - if (type2 == "keyword" || type2 == "variable") { - cx.marked = "type"; - return cont(typename); - } else if (value == "<") { - return cont(pushlex(">"), commasep(typeparam, ">"), poplex); - } - } - function funarg(type2, value) { - if (value == "@") - cont(expression, funarg); - if (type2 == "spread") - return cont(funarg); - if (isTS && isModifier(value)) { - cx.marked = "keyword"; - return cont(funarg); - } - if (isTS && type2 == "this") - return cont(maybetype, maybeAssign); - return pass(pattern, maybetype, maybeAssign); - } - function classExpression(type2, value) { - if (type2 == "variable") - return className(type2, value); - return classNameAfter(type2, value); - } - function className(type2, value) { - if (type2 == "variable") { - register(value); - return cont(classNameAfter); - } - } - function classNameAfter(type2, value) { - if (value == "<") - return cont(pushlex(">"), commasep(typeparam, ">"), poplex, classNameAfter); - if (value == "extends" || value == "implements" || isTS && type2 == ",") { - if (value == "implements") - cx.marked = "keyword"; - return cont(isTS ? typeexpr : expression, classNameAfter); - } - if (type2 == "{") - return cont(pushlex("}"), classBody, poplex); - } - function classBody(type2, value) { - if (type2 == "async" || type2 == "variable" && (value == "static" || value == "get" || value == "set" || isTS && isModifier(value)) && cx.stream.match(/^\s+[\w$\xa1-\uffff]/, false)) { - cx.marked = "keyword"; - return cont(classBody); - } - if (type2 == "variable" || cx.style == "keyword") { - cx.marked = "property"; - return cont(classfield, classBody); - } - if (type2 == "number" || type2 == "string") - return cont(classfield, classBody); - if (type2 == "[") - return cont(expression, maybetype, expect("]"), classfield, classBody); - if (value == "*") { - cx.marked = "keyword"; - return cont(classBody); - } - if (isTS && type2 == "(") - return pass(functiondecl, classBody); - if (type2 == ";" || type2 == ",") - return cont(classBody); - if (type2 == "}") - return cont(); - if (value == "@") - return cont(expression, classBody); - } - function classfield(type2, value) { - if (value == "!") - return cont(classfield); - if (value == "?") - return cont(classfield); - if (type2 == ":") - return cont(typeexpr, maybeAssign); - if (value == "=") - return cont(expressionNoComma); - var context = cx.state.lexical.prev, isInterface = context && context.info == "interface"; - return pass(isInterface ? functiondecl : functiondef); - } - function afterExport(type2, value) { - if (value == "*") { - cx.marked = "keyword"; - return cont(maybeFrom, expect(";")); - } - if (value == "default") { - cx.marked = "keyword"; - return cont(expression, expect(";")); - } - if (type2 == "{") - return cont(commasep(exportField, "}"), maybeFrom, expect(";")); - return pass(statement); - } - function exportField(type2, value) { - if (value == "as") { - cx.marked = "keyword"; - return cont(expect("variable")); - } - if (type2 == "variable") - return pass(expressionNoComma, exportField); - } - function afterImport(type2) { - if (type2 == "string") - return cont(); - if (type2 == "(") - return pass(expression); - if (type2 == ".") - return pass(maybeoperatorComma); - return pass(importSpec, maybeMoreImports, maybeFrom); - } - function importSpec(type2, value) { - if (type2 == "{") - return contCommasep(importSpec, "}"); - if (type2 == "variable") - register(value); - if (value == "*") - cx.marked = "keyword"; - return cont(maybeAs); - } - function maybeMoreImports(type2) { - if (type2 == ",") - return cont(importSpec, maybeMoreImports); - } - function maybeAs(_type, value) { - if (value == "as") { - cx.marked = "keyword"; - return cont(importSpec); - } - } - function maybeFrom(_type, value) { - if (value == "from") { - cx.marked = "keyword"; - return cont(expression); - } - } - function arrayLiteral(type2) { - if (type2 == "]") - return cont(); - return pass(commasep(expressionNoComma, "]")); - } - function enumdef() { - return pass(pushlex("form"), pattern, expect("{"), pushlex("}"), commasep(enummember, "}"), poplex, poplex); - } - function enummember() { - return pass(pattern, maybeAssign); - } - function isContinuedStatement(state, textAfter) { - return state.lastType == "operator" || state.lastType == "," || isOperatorChar.test(textAfter.charAt(0)) || /[,.]/.test(textAfter.charAt(0)); - } - function expressionAllowed(stream, state, backUp) { - return state.tokenize == tokenBase && /^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(state.lastType) || state.lastType == "quasi" && /\{\s*$/.test(stream.string.slice(0, stream.pos - (backUp || 0))); - } - return { - startState: function(basecolumn) { - var state = { - tokenize: tokenBase, - lastType: "sof", - cc: [], - lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, "block", false), - localVars: parserConfig.localVars, - context: parserConfig.localVars && new Context(null, null, false), - indented: basecolumn || 0 - }; - if (parserConfig.globalVars && typeof parserConfig.globalVars == "object") - state.globalVars = parserConfig.globalVars; - return state; - }, - token: function(stream, state) { - if (stream.sol()) { - if (!state.lexical.hasOwnProperty("align")) - state.lexical.align = false; - state.indented = stream.indentation(); - findFatArrow(stream, state); - } - if (state.tokenize != tokenComment && stream.eatSpace()) - return null; - var style = state.tokenize(stream, state); - if (type == "comment") - return style; - state.lastType = type == "operator" && (content == "++" || content == "--") ? "incdec" : type; - return parseJS(state, style, type, content, stream); - }, - indent: function(state, textAfter) { - if (state.tokenize == tokenComment || state.tokenize == tokenQuasi) - return CodeMirror.Pass; - if (state.tokenize != tokenBase) - return 0; - var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical, top2; - if (!/^\s*else\b/.test(textAfter)) - for (var i = state.cc.length - 1; i >= 0; --i) { - var c = state.cc[i]; - if (c == poplex) - lexical = lexical.prev; - else if (c != maybeelse && c != popcontext) - break; - } - while ((lexical.type == "stat" || lexical.type == "form") && (firstChar == "}" || (top2 = state.cc[state.cc.length - 1]) && (top2 == maybeoperatorComma || top2 == maybeoperatorNoComma) && !/^[,\.=+\-*:?[\(]/.test(textAfter))) - lexical = lexical.prev; - if (statementIndent && lexical.type == ")" && lexical.prev.type == "stat") - lexical = lexical.prev; - var type2 = lexical.type, closing = firstChar == type2; - if (type2 == "vardef") - return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? lexical.info.length + 1 : 0); - else if (type2 == "form" && firstChar == "{") - return lexical.indented; - else if (type2 == "form") - return lexical.indented + indentUnit; - else if (type2 == "stat") - return lexical.indented + (isContinuedStatement(state, textAfter) ? statementIndent || indentUnit : 0); - else if (lexical.info == "switch" && !closing && parserConfig.doubleIndentSwitch != false) - return lexical.indented + (/^(?:case|default)\b/.test(textAfter) ? indentUnit : 2 * indentUnit); - else if (lexical.align) - return lexical.column + (closing ? 0 : 1); - else - return lexical.indented + (closing ? 0 : indentUnit); - }, - electricInput: /^\s*(?:case .*?:|default:|\{|\})$/, - blockCommentStart: jsonMode ? null : "/*", - blockCommentEnd: jsonMode ? null : "*/", - blockCommentContinue: jsonMode ? null : " * ", - lineComment: jsonMode ? null : "//", - fold: "brace", - closeBrackets: "()[]{}''\"\"``", - helperType: jsonMode ? "json" : "javascript", - jsonldMode, - jsonMode, - expressionAllowed, - skipExpression: function(state) { - parseJS(state, "atom", "atom", "true", new CodeMirror.StringStream("", 2, null)); - } - }; - }); - CodeMirror.registerHelper("wordChars", "javascript", /[\w$]/); - CodeMirror.defineMIME("text/javascript", "javascript"); - CodeMirror.defineMIME("text/ecmascript", "javascript"); - CodeMirror.defineMIME("application/javascript", "javascript"); - CodeMirror.defineMIME("application/x-javascript", "javascript"); - CodeMirror.defineMIME("application/ecmascript", "javascript"); - CodeMirror.defineMIME("application/json", { - name: "javascript", - json: true - }); - CodeMirror.defineMIME("application/x-json", { - name: "javascript", - json: true - }); - CodeMirror.defineMIME("application/manifest+json", { - name: "javascript", - json: true - }); - CodeMirror.defineMIME("application/ld+json", { - name: "javascript", - jsonld: true - }); - CodeMirror.defineMIME("text/typescript", { - name: "javascript", - typescript: true - }); - CodeMirror.defineMIME("application/typescript", { - name: "javascript", - typescript: true - }); -}); - -// src/editor/mode/custom_overlay.js -(function(mod) { - mod(window.CodeMirror); -})(function(CodeMirror) { - "use strict"; - CodeMirror.customOverlayMode = function(base, overlay, combine) { - return { - startState: function() { - return { - base: CodeMirror.startState(base), - overlay: CodeMirror.startState(overlay), - basePos: 0, - baseCur: null, - overlayPos: 0, - overlayCur: null, - streamSeen: null - }; - }, - copyState: function(state) { - return { - base: CodeMirror.copyState(base, state.base), - overlay: CodeMirror.copyState(overlay, state.overlay), - basePos: state.basePos, - baseCur: null, - overlayPos: state.overlayPos, - overlayCur: null - }; - }, - token: function(stream, state) { - if (stream != state.streamSeen || Math.min(state.basePos, state.overlayPos) < stream.start) { - state.streamSeen = stream; - state.basePos = state.overlayPos = stream.start; - } - if (stream.start == state.basePos) { - state.baseCur = base.token(stream, state.base); - state.basePos = stream.pos; - } - if (stream.start == state.overlayPos) { - stream.pos = stream.start; - state.overlayCur = overlay.token(stream, state.overlay); - state.overlayPos = stream.pos; - } - stream.pos = Math.min(state.basePos, state.overlayPos); - if (state.baseCur && state.overlayCur && state.baseCur.contains("line-HyperMD-codeblock")) { - state.overlayCur = state.overlayCur.replace("line-templater-inline", ""); - state.overlayCur += ` line-background-HyperMD-codeblock-bg`; - } - if (state.overlayCur == null) - return state.baseCur; - else if (state.baseCur != null && state.overlay.combineTokens || combine && state.overlay.combineTokens == null) - return state.baseCur + " " + state.overlayCur; - else - return state.overlayCur; - }, - indent: base.indent && function(state, textAfter, line) { - return base.indent(state.base, textAfter, line); - }, - electricChars: base.electricChars, - innerMode: function(state) { - return { state: state.base, mode: base }; - }, - blankLine: function(state) { - var baseToken, overlayToken; - if (base.blankLine) - baseToken = base.blankLine(state.base); - if (overlay.blankLine) - overlayToken = overlay.blankLine(state.overlay); - return overlayToken == null ? baseToken : combine && baseToken != null ? baseToken + " " + overlayToken : overlayToken; - } - }; - }; -}); - -// src/editor/Editor.ts -var import_language = __toModule(require("@codemirror/language")); -var TP_CMD_TOKEN_CLASS = "templater-command"; -var TP_INLINE_CLASS = "templater-inline"; -var TP_OPENING_TAG_TOKEN_CLASS = "templater-opening-tag"; -var TP_CLOSING_TAG_TOKEN_CLASS = "templater-closing-tag"; -var TP_INTERPOLATION_TAG_TOKEN_CLASS = "templater-interpolation-tag"; -var TP_EXEC_TAG_TOKEN_CLASS = "templater-execution-tag"; -var Editor2 = class { - constructor(plugin) { - this.plugin = plugin; - this.cursor_jumper = new CursorJumper(); - } - desktopShouldHighlight() { - return import_obsidian16.Platform.isDesktopApp && this.plugin.settings.syntax_highlighting; - } - mobileShouldHighlight() { - return import_obsidian16.Platform.isMobileApp && this.plugin.settings.syntax_highlighting_mobile; - } - async setup() { - await this.registerCodeMirrorMode(); - this.plugin.registerEditorSuggest(new Autocomplete()); - if (this.desktopShouldHighlight() || this.mobileShouldHighlight()) { - this.plugin.registerEditorExtension(import_language.StreamLanguage.define(window.CodeMirror.getMode({}, { name: "templater" }))); - } - } - async jump_to_next_cursor_location(file = null, auto_jump = false) { - if (auto_jump && !this.plugin.settings.auto_jump_to_cursor) { - return; - } - if (file && get_active_file(app) !== file) { - return; - } - await this.cursor_jumper.jump_to_next_cursor_location(); - } - async registerCodeMirrorMode() { - if (!this.desktopShouldHighlight() && !this.mobileShouldHighlight()) { - return; - } - const js_mode = window.CodeMirror.getMode({}, "javascript"); - if (js_mode.name === "null") { - log_error(new TemplaterError("Javascript syntax mode couldn't be found, can't enable syntax highlighting.")); - return; - } - const overlay_mode = window.CodeMirror.customOverlayMode; - if (overlay_mode == null) { - log_error(new TemplaterError("Couldn't find customOverlayMode, can't enable syntax highlighting.")); - return; - } - window.CodeMirror.defineMode("templater", function(config) { - const templaterOverlay = { - startState: function() { - const js_state = window.CodeMirror.startState(js_mode); - return { - ...js_state, - inCommand: false, - tag_class: "", - freeLine: false - }; - }, - copyState: function(state) { - const js_state = window.CodeMirror.startState(js_mode); - const new_state = { - ...js_state, - inCommand: state.inCommand, - tag_class: state.tag_class, - freeLine: state.freeLine - }; - return new_state; - }, - blankLine: function(state) { - if (state.inCommand) { - return `line-background-templater-command-bg`; - } - return null; - }, - token: function(stream, state) { - if (stream.sol() && state.inCommand) { - state.freeLine = true; - } - if (state.inCommand) { - let keywords = ""; - if (stream.match(/[-_]{0,1}%>/, true)) { - state.inCommand = false; - state.freeLine = false; - const tag_class = state.tag_class; - state.tag_class = ""; - return `line-${TP_INLINE_CLASS} ${TP_CMD_TOKEN_CLASS} ${TP_CLOSING_TAG_TOKEN_CLASS} ${tag_class}`; - } - const js_result = js_mode.token && js_mode.token(stream, state); - if (stream.peek() == null && state.freeLine) { - keywords += ` line-background-templater-command-bg`; - } - if (!state.freeLine) { - keywords += ` line-${TP_INLINE_CLASS}`; - } - return `${keywords} ${TP_CMD_TOKEN_CLASS} ${js_result}`; - } - const match = stream.match(/<%[-_]{0,1}\s*([*+]{0,1})/, true); - if (match != null) { - switch (match[1]) { - case "*": - state.tag_class = TP_EXEC_TAG_TOKEN_CLASS; - break; - default: - state.tag_class = TP_INTERPOLATION_TAG_TOKEN_CLASS; - break; - } - state.inCommand = true; - return `line-${TP_INLINE_CLASS} ${TP_CMD_TOKEN_CLASS} ${TP_OPENING_TAG_TOKEN_CLASS} ${state.tag_class}`; - } - while (stream.next() != null && !stream.match(/<%/, false)) - ; - return null; - } - }; - return overlay_mode(window.CodeMirror.getMode(config, "hypermd"), templaterOverlay); - }); - } -}; - -// src/main.ts -var TemplaterPlugin = class extends import_obsidian17.Plugin { - async onload() { - await this.load_settings(); - this.templater = new Templater(this); - await this.templater.setup(); - this.editor_handler = new Editor2(this); - await this.editor_handler.setup(); - this.fuzzy_suggester = new FuzzySuggester(this); - this.event_handler = new EventHandler(this, this.templater, this.settings); - this.event_handler.setup(); - this.command_handler = new CommandHandler(this); - this.command_handler.setup(); - (0, import_obsidian17.addIcon)("templater-icon", ICON_DATA); - if (this.settings.enable_ribbon_icon) { - this.addRibbonIcon("templater-icon", "Templater", async () => { - this.fuzzy_suggester.insert_template(); - }).setAttribute("id", "rb-templater-icon"); - } - this.addSettingTab(new TemplaterSettingTab(this)); - app.workspace.onLayoutReady(() => { - this.templater.execute_startup_scripts(); - }); - } - async save_settings() { - await this.saveData(this.settings); - } - async load_settings() { - this.settings = Object.assign({}, DEFAULT_SETTINGS, await this.loadData()); - } -}; diff --git a/ObsidianRnDVault/.obsidian/plugins/templater-obsidian/manifest.json b/ObsidianRnDVault/.obsidian/plugins/templater-obsidian/manifest.json index cc3b921..7a2e6e4 100644 --- a/ObsidianRnDVault/.obsidian/plugins/templater-obsidian/manifest.json +++ b/ObsidianRnDVault/.obsidian/plugins/templater-obsidian/manifest.json @@ -1,7 +1,7 @@ { "id": "templater-obsidian", "name": "Templater", - "version": "1.16.2", + "version": "1.16.3", "description": "Create and use templates", "minAppVersion": "0.11.13", "author": "SilentVoid", diff --git a/ObsidianRnDVault/.obsidian/plugins/wikidata-importer/data.json b/ObsidianRnDVault/.obsidian/plugins/wikidata-importer/data.json new file mode 100644 index 0000000..ff8e43c --- /dev/null +++ b/ObsidianRnDVault/.obsidian/plugins/wikidata-importer/data.json @@ -0,0 +1,7 @@ +{ + "entityIdKey": "wikidata entity id", + "internalLinkPrefix": "Database/", + "ignoreCategories": false, + "ignorePropertiesWithTimeRanges": true, + "overwriteExistingProperties": true +} \ No newline at end of file diff --git a/ObsidianRnDVault/.obsidian/plugins/wikidata-importer/manifest.json b/ObsidianRnDVault/.obsidian/plugins/wikidata-importer/manifest.json new file mode 100644 index 0000000..1bc43a5 --- /dev/null +++ b/ObsidianRnDVault/.obsidian/plugins/wikidata-importer/manifest.json @@ -0,0 +1,10 @@ +{ + "id": "wikidata-importer", + "name": "Wikidata Importer", + "version": "1.0.3", + "minAppVersion": "0.15.0", + "description": "Import data from Wikidata into your vault.", + "author": "Sam Rose", + "authorUrl": "https://samwho.dev", + "isDesktopOnly": false +}